@vanelsas/baredom 1.1.0 → 1.3.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 +25 -0
- package/README.md +8 -6
- package/dist/base.js +364 -353
- package/dist/x-alert.js +18 -18
- package/dist/x-avatar-group.js +11 -11
- package/dist/x-avatar.js +15 -15
- package/dist/x-badge.js +11 -11
- package/dist/x-bento-grid.js +6 -0
- package/dist/x-bento-item.js +5 -0
- package/dist/x-breadcrumbs.js +14 -14
- package/dist/x-button.js +16 -16
- package/dist/x-cancel-dialogue.js +17 -17
- package/dist/x-card.js +7 -7
- package/dist/x-chart.js +48 -48
- package/dist/x-checkbox.js +11 -11
- package/dist/x-chip.js +8 -8
- package/dist/x-collapse.js +12 -12
- package/dist/x-command-palette.js +31 -31
- package/dist/x-container.js +6 -6
- package/dist/x-context-menu.js +18 -18
- package/dist/x-copy.js +23 -23
- package/dist/x-currency-field.js +22 -22
- package/dist/x-date-picker.js +40 -40
- package/dist/x-divider.js +12 -12
- package/dist/x-drawer.js +12 -12
- package/dist/x-dropdown.js +9 -9
- package/dist/x-fieldset.js +6 -6
- package/dist/x-file-download.js +7 -7
- package/dist/x-form-field.js +15 -15
- package/dist/x-form.js +9 -9
- package/dist/x-gaussian-blur.js +19 -32
- package/dist/x-grid.js +6 -7
- package/dist/x-kinetic-typography.js +61 -61
- package/dist/x-menu-item.js +10 -10
- package/dist/x-menu.js +10 -10
- package/dist/x-metaball-cursor.js +28 -0
- package/dist/x-modal.js +13 -13
- package/dist/x-navbar.js +13 -13
- package/dist/x-neural-glow.js +35 -0
- package/dist/x-notification-center.js +10 -10
- package/dist/x-organic-divider.js +16 -16
- package/dist/x-organic-progress.js +40 -0
- package/dist/x-organic-shape.js +14 -14
- package/dist/x-pagination.js +16 -16
- package/dist/x-popover.js +15 -15
- package/dist/x-progress-circle.js +8 -8
- package/dist/x-progress.js +8 -8
- package/dist/x-radio.js +11 -11
- package/dist/x-ripple-effect.js +12 -12
- package/dist/x-scroll-parallax.js +17 -17
- package/dist/x-scroll-stack.js +20 -0
- package/dist/x-scroll-story.js +35 -35
- package/dist/x-scroll-timeline.js +47 -47
- package/dist/x-scroll.js +39 -39
- package/dist/x-search-field.js +14 -14
- package/dist/x-select.js +9 -9
- package/dist/x-sidebar.js +16 -16
- package/dist/x-skeleton.js +5 -5
- package/dist/x-slider.js +16 -16
- package/dist/x-spacer.js +5 -5
- package/dist/x-spinner.js +5 -5
- package/dist/x-splash.js +15 -0
- package/dist/x-stat.js +11 -11
- package/dist/x-stepper.js +16 -16
- package/dist/x-switch.js +10 -10
- package/dist/x-tab.js +7 -7
- package/dist/x-table-cell.js +20 -21
- package/dist/x-table-row.js +10 -10
- package/dist/x-table.js +14 -14
- package/dist/x-tabs.js +11 -11
- package/dist/x-text-area.js +17 -17
- package/dist/x-timeline-item.js +23 -23
- package/dist/x-timeline.js +9 -9
- package/dist/x-toast.js +23 -23
- package/dist/x-toaster.js +8 -8
- package/dist/x-typography.js +8 -8
- package/package.json +30 -2
package/dist/x-popover.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
a=$APP.I(c,$APP.
|
|
4
|
-
"popover-heading"):k.removeAttribute("aria-labelledby");m.textContent=h;b.setAttribute("aria-label",c);
|
|
5
|
-
$APP.
|
|
6
|
-
a.isConnected;return $APP.n($APP.n(e)?a.hasAttribute("open"):e)?(document.addEventListener("click",c),document.addEventListener("keydown",d)):null},0)}return null},
|
|
7
|
-
(b=b.relatedTarget,b==null||$APP.
|
|
8
|
-
0)):null}}}
|
|
9
|
-
get:function(){return this.hasAttribute(c)},set:function(d){return
|
|
10
|
-
|
|
11
|
-
v=
|
|
12
|
-
e.setAttribute("part","trigger");g.setAttribute("name","trigger");h.setAttribute("part","panel");h.setAttribute("role","dialog");h.setAttribute("inert","");h.setAttribute("data-placement","bottom-start");k.setAttribute("part","arrow");k.setAttribute("aria-hidden","true");m.setAttribute("part","header");p.setAttribute("part","heading");p.setAttribute("id","popover-heading");
|
|
13
|
-
v.setAttribute("part","body");y.setAttribute("part","footer");y.setAttribute("hidden","");A.setAttribute("name","footer");e.appendChild(g);m.appendChild(p);m.appendChild(
|
|
14
|
-
$APP.n(c)&&(d=$APP.l(this,"__xPopoverHandlers"),$APP.n(d)&&(e=$APP.l(c,"closeBtn"),g=$APP.l(c,"footerSlot"),$APP.l(c,"trigger").addEventListener("click",$APP.l(d,"triggerClick")),e.addEventListener("click",$APP.l(d,"closeBtnClick")),this.addEventListener("focusout",$APP.l(d,"hostFocusout")),g.addEventListener("slotchange",$APP.l(d,"footerSlotchange"))));$APP.n(this.hasAttribute("open"))&&
|
|
15
|
-
function(c){$APP.n($APP.l(this,"__xPopoverRefs"))?(
|
|
16
|
-
|
|
2
|
+
var Jo=function(a){return document.createElement(a)},Ko=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},Ro=function(a){var b=$APP.l(a,"__xPopoverRefs");if($APP.n(b)){a=new $APP.R(null,6,[$APP.Ih,a.hasAttribute("open"),$APP.ck,a.hasAttribute("disabled"),Lo,a.hasAttribute("no-close"),Mo,a.getAttribute("heading"),$APP.Yk,a.getAttribute("placement"),No,a.getAttribute("close-label")],null);var c=$APP.N(a),d=$APP.I(c,$APP.Ih),e=$APP.I(c,$APP.ck),g=$APP.I(c,Lo),h=$APP.I(c,Mo);
|
|
3
|
+
a=$APP.I(c,$APP.Yk);c=$APP.I(c,No);d=$APP.J(d);e=$APP.J(e);g=$APP.J(g);h=$APP.n(h)?h:"";c=$APP.n(c)?c:"Close";a=$APP.K(Oo,a)?a:"bottom-start";e=$APP.N(new $APP.R(null,6,[$APP.Ik,d,$APP.X,e,Po,g,$APP.Qj,h,Qo,c,$APP.Ei,a],null));d=$APP.I(e,$APP.Ik);a=$APP.I(e,Po);h=$APP.I(e,$APP.Qj);c=$APP.I(e,Qo);g=$APP.I(e,$APP.Ei);var k=$APP.l(b,"panel");e=$APP.l(b,"header");var m=$APP.l(b,"heading");b=$APP.l(b,"closeBtn");k.setAttribute("data-placement",g);Ko(k,"inert",$APP.r(d));$APP.O(h,"")?k.setAttribute("aria-labelledby",
|
|
4
|
+
"popover-heading"):k.removeAttribute("aria-labelledby");m.textContent=h;b.setAttribute("aria-label",c);Ko(b,"hidden",a);b=$APP.C.h(h,"");return Ko(e,"hidden",b?a:b)}return null},So=function(a,b){b=new CustomEvent("x-popover-toggle",{detail:b,bubbles:!0,composed:!0,cancelable:!0});a.dispatchEvent(b);return $APP.r(b.defaultPrevented)},To=function(a,b){return a.dispatchEvent(new CustomEvent("x-popover-change",{detail:b,bubbles:!0,composed:!0,cancelable:!1}))},Uo=function(a,b){return $APP.r(a.hasAttribute("disabled"))&&
|
|
5
|
+
$APP.r(a.hasAttribute("open"))&&So(a,{open:!0,source:b})?(a.setAttribute("open",""),To(a,{open:!0})):null},Vo=function(a,b){var c=$APP.r(a.hasAttribute("disabled"));return $APP.n(c?a.hasAttribute("open"):c)&&So(a,{open:!1,source:b})?(a.removeAttribute("open"),To(a,{open:!1})):null},Wo=function(a,b){return $APP.n(a.hasAttribute("open"))?Vo(a,b):Uo(a,b)},Xo=function(a){var b=$APP.l(a,"__xPopoverHandlers");if($APP.n(b)){var c=$APP.l(b,"docClick"),d=$APP.l(b,"docKeydown");return setTimeout(function(){var e=
|
|
6
|
+
a.isConnected;return $APP.n($APP.n(e)?a.hasAttribute("open"):e)?(document.addEventListener("click",c),document.addEventListener("keydown",d)):null},0)}return null},Yo=function(a){a=$APP.l(a,"__xPopoverHandlers");if($APP.n(a)){var b=$APP.l(a,"docKeydown");document.removeEventListener("click",$APP.l(a,"docClick"));return document.removeEventListener("keydown",b)}return null},Zo=function(a){return{triggerClick:function(){return Wo(a,"pointer")},closeBtnClick:function(){return Vo(a,"close-button")},hostFocusout:function(b){return $APP.n(a.hasAttribute("open"))?
|
|
7
|
+
(b=b.relatedTarget,b==null||$APP.r(a.contains(b))?Vo(a,"focusout"):null):null},docClick:function(b){return $APP.n(a.hasAttribute("open"))?(b=$APP.lc(b.composedPath()),b=$APP.Id(function(c){return c===a},b),$APP.n(b)?null:Vo(a,"outside-click")):null},docKeydown:function(b){b=$APP.C.h(b.key,"Escape");return $APP.n(b?a.hasAttribute("open"):b)?Vo(a,"escape"):null},footerSlotchange:function(){var b=$APP.l(a,"__xPopoverRefs");return $APP.n(b)?Ko($APP.l(b,"footer"),"hidden",!($APP.l(b,"footerSlot").assignedNodes().length>
|
|
8
|
+
0)):null}}},$o=function(a){var b=$APP.l(a,"__xPopoverRefs");if($APP.n(b)){var c=$APP.l(a,"__xPopoverHandlers");if($APP.n(c)){var d=$APP.l(b,"closeBtn"),e=$APP.l(b,"footerSlot");$APP.l(b,"trigger").removeEventListener("click",$APP.l(c,"triggerClick"));d.removeEventListener("click",$APP.l(c,"closeBtnClick"));a.removeEventListener("focusout",$APP.l(c,"hostFocusout"));e.removeEventListener("slotchange",$APP.l(c,"footerSlotchange"))}}},ap=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,
|
|
9
|
+
get:function(){return this.hasAttribute(c)},set:function(d){return Ko(this,c,$APP.J(d))}})},bp=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.n(d)?d:""},set:function(d){d!=null&&$APP.O(d)?(d=""+$APP.T.g(d),d=this.setAttribute(c,d)):d=this.removeAttribute(c);return d}})},dp=function(){var a=class extends HTMLElement{},b=a.prototype;Object.defineProperty(a,"observedAttributes",{get:function(){return cp}});ap(b,"open","open");
|
|
10
|
+
ap(b,"disabled","disabled");ap(b,"noClose","no-close");bp(b,"placement","placement");bp(b,"heading","heading");bp(b,"closeLabel","close-label");b.show=function(){return Uo(this,"programmatic")};b.hide=function(){return Vo(this,"programmatic")};b.toggle=function(){return Wo(this,"programmatic")};b.connectedCallback=function(){if(!$APP.n($APP.l(this,"__xPopoverRefs"))){var c=this.attachShadow({mode:"open"}),d=Jo("style"),e=Jo("span"),g=Jo("slot"),h=Jo("div"),k=Jo("div"),m=Jo("div"),p=Jo("span"),q=Jo("button"),
|
|
11
|
+
v=Jo("div"),x=Jo("slot"),y=Jo("div"),A=Jo("slot");d.textContent=":host{display:inline-block;position:relative;color-scheme:light dark;--x-popover-panel-bg:#ffffff;--x-popover-panel-border:1px solid #e2e8f0;--x-popover-panel-radius:8px;--x-popover-panel-shadow:0 4px 16px rgba(0,0,0,0.12);--x-popover-panel-min-width:12rem;--x-popover-panel-max-width:24rem;--x-popover-panel-max-height:24rem;--x-popover-panel-offset:4px;--x-popover-panel-z:1000;--x-popover-header-padding:0.625rem 0.75rem 0.625rem 0.875rem;--x-popover-header-border:1px solid #e2e8f0;--x-popover-heading-color:#0f172a;--x-popover-heading-font-size:0.9375rem;--x-popover-heading-font-weight:600;--x-popover-close-bg:transparent;--x-popover-close-bg-hover:#f1f5f9;--x-popover-close-color:#64748b;--x-popover-close-color-hover:#0f172a;--x-popover-close-radius:4px;--x-popover-close-size:1.5rem;--x-popover-focus-ring:#60a5fa;--x-popover-body-padding:0.875rem;--x-popover-body-color:#334155;--x-popover-body-font-size:0.9375rem;--x-popover-footer-padding:0.625rem 0.875rem;--x-popover-footer-border:1px solid #e2e8f0;--x-popover-arrow-size:8px;--x-popover-arrow-bg:#ffffff;--x-popover-arrow-border:#e2e8f0;--x-popover-transition-duration:150ms;--x-popover-transition-easing:ease;}@media (prefers-color-scheme:dark){:host{--x-popover-panel-bg:#1e293b;--x-popover-panel-border:1px solid #334155;--x-popover-panel-shadow:0 4px 24px rgba(0,0,0,0.4);--x-popover-header-border:1px solid #334155;--x-popover-heading-color:#e2e8f0;--x-popover-close-bg-hover:#334155;--x-popover-close-color:#94a3b8;--x-popover-close-color-hover:#e2e8f0;--x-popover-focus-ring:#93c5fd;--x-popover-body-color:#cbd5e1;--x-popover-footer-border:1px solid #334155;--x-popover-arrow-bg:#1e293b;--x-popover-arrow-border:#334155;}}[part\x3dtrigger]{display:inline-block;}[part\x3dpanel]{position:absolute;z-index:var(--x-popover-panel-z);box-sizing:border-box;background:var(--x-popover-panel-bg);border:var(--x-popover-panel-border);border-radius:var(--x-popover-panel-radius);box-shadow:var(--x-popover-panel-shadow);min-width:var(--x-popover-panel-min-width);max-width:var(--x-popover-panel-max-width);max-height:var(--x-popover-panel-max-height);overflow-y:auto;visibility:hidden;pointer-events:none;opacity:0;transform:scale(0.96) translateY(-4px);transition:opacity var(--x-popover-transition-duration) var(--x-popover-transition-easing),transform var(--x-popover-transition-duration) var(--x-popover-transition-easing),visibility 0s var(--x-popover-transition-duration);}:host([open]) [part\x3dpanel]{visibility:visible;pointer-events:auto;opacity:1;transform:scale(1) translateY(0);transition:opacity var(--x-popover-transition-duration) var(--x-popover-transition-easing),transform var(--x-popover-transition-duration) var(--x-popover-transition-easing),visibility 0s 0s;}[part\x3dpanel][data-placement\x3dbottom-start]{top:calc(100% + var(--x-popover-arrow-size) + var(--x-popover-panel-offset));left:0;transform-origin:top left;}[part\x3dpanel][data-placement\x3dbottom-end]{top:calc(100% + var(--x-popover-arrow-size) + var(--x-popover-panel-offset));right:0;transform-origin:top right;}[part\x3dpanel][data-placement\x3dtop-start]{bottom:calc(100% + var(--x-popover-arrow-size) + var(--x-popover-panel-offset));left:0;transform-origin:bottom left;}[part\x3dpanel][data-placement\x3dtop-end]{bottom:calc(100% + var(--x-popover-arrow-size) + var(--x-popover-panel-offset));right:0;transform-origin:bottom right;}[part\x3darrow]{position:absolute;width:var(--x-popover-arrow-size);height:var(--x-popover-arrow-size);background:var(--x-popover-arrow-bg);transform:rotate(45deg);pointer-events:none;}[part\x3dpanel][data-placement\x3dbottom-start] [part\x3darrow],[part\x3dpanel][data-placement\x3dbottom-end] [part\x3darrow]{top:calc(var(--x-popover-arrow-size) / -2 - 1px);border-left:1px solid var(--x-popover-arrow-border);border-top:1px solid var(--x-popover-arrow-border);}[part\x3dpanel][data-placement\x3dbottom-start] [part\x3darrow]{left:1rem;}[part\x3dpanel][data-placement\x3dbottom-end] [part\x3darrow]{right:1rem;}[part\x3dpanel][data-placement\x3dtop-start] [part\x3darrow],[part\x3dpanel][data-placement\x3dtop-end] [part\x3darrow]{bottom:calc(var(--x-popover-arrow-size) / -2 - 1px);border-right:1px solid var(--x-popover-arrow-border);border-bottom:1px solid var(--x-popover-arrow-border);}[part\x3dpanel][data-placement\x3dtop-start] [part\x3darrow]{left:1rem;}[part\x3dpanel][data-placement\x3dtop-end] [part\x3darrow]{right:1rem;}[part\x3dheader]{display:flex;align-items:center;justify-content:space-between;padding:var(--x-popover-header-padding);border-bottom:var(--x-popover-header-border);gap:0.5rem;}[part\x3dheading]{flex:1;font-size:var(--x-popover-heading-font-size);font-weight:var(--x-popover-heading-font-weight);color:var(--x-popover-heading-color);font-family:inherit;}[part\x3dclose-button]{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:var(--x-popover-close-size);height:var(--x-popover-close-size);background:var(--x-popover-close-bg);color:var(--x-popover-close-color);border-radius:var(--x-popover-close-radius);cursor:pointer;flex-shrink:0;transition:background 100ms ease,color 100ms ease;}[part\x3dclose-button]:hover{background:var(--x-popover-close-bg-hover);color:var(--x-popover-close-color-hover);}[part\x3dclose-button]:focus-visible{outline:none;box-shadow:0 0 0 2px var(--x-popover-focus-ring);}[part\x3dclose-button][hidden]{display:none;}[part\x3dheader][hidden]{display:none;}[part\x3dbody]{padding:var(--x-popover-body-padding);color:var(--x-popover-body-color);font-size:var(--x-popover-body-font-size);font-family:inherit;}[part\x3dfooter]{padding:var(--x-popover-footer-padding);border-top:var(--x-popover-footer-border);}[part\x3dfooter][hidden]{display:none;}@media (prefers-reduced-motion:reduce){[part\x3dpanel]{transition:none !important;}[part\x3dclose-button]{transition:none !important;}}";
|
|
12
|
+
e.setAttribute("part","trigger");g.setAttribute("name","trigger");h.setAttribute("part","panel");h.setAttribute("role","dialog");h.setAttribute("inert","");h.setAttribute("data-placement","bottom-start");k.setAttribute("part","arrow");k.setAttribute("aria-hidden","true");m.setAttribute("part","header");p.setAttribute("part","heading");p.setAttribute("id","popover-heading");q.setAttribute("part","close-button");q.setAttribute("type","button");q.setAttribute("aria-label","Close");q.innerHTML='\x3csvg width\x3d"14" height\x3d"14" viewBox\x3d"0 0 14 14" fill\x3d"none" xmlns\x3d"http://www.w3.org/2000/svg" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M1 1L13 13M13 1L1 13" stroke\x3d"currentColor" stroke-width\x3d"2" stroke-linecap\x3d"round"/\x3e\x3c/svg\x3e';
|
|
13
|
+
v.setAttribute("part","body");y.setAttribute("part","footer");y.setAttribute("hidden","");A.setAttribute("name","footer");e.appendChild(g);m.appendChild(p);m.appendChild(q);v.appendChild(x);y.appendChild(A);h.appendChild(k);h.appendChild(m);h.appendChild(v);h.appendChild(y);c.appendChild(d);c.appendChild(e);c.appendChild(h);this.__xPopoverRefs={trigger:e,panel:h,header:m,heading:p,closeBtn:q,body:v,footer:y,footerSlot:A}}$o(this);Yo(this);this.__xPopoverHandlers=Zo(this);c=$APP.l(this,"__xPopoverRefs");
|
|
14
|
+
$APP.n(c)&&(d=$APP.l(this,"__xPopoverHandlers"),$APP.n(d)&&(e=$APP.l(c,"closeBtn"),g=$APP.l(c,"footerSlot"),$APP.l(c,"trigger").addEventListener("click",$APP.l(d,"triggerClick")),e.addEventListener("click",$APP.l(d,"closeBtnClick")),this.addEventListener("focusout",$APP.l(d,"hostFocusout")),g.addEventListener("slotchange",$APP.l(d,"footerSlotchange"))));$APP.n(this.hasAttribute("open"))&&Xo(this);return Ro(this)};b.disconnectedCallback=function(){$o(this);return Yo(this)};b.attributeChangedCallback=
|
|
15
|
+
function(c){$APP.n($APP.l(this,"__xPopoverRefs"))?(Ro(this),c=$APP.C.h(c,"open")?$APP.n(this.hasAttribute("open"))?Xo(this):Yo(this):null):c=null;return c};return a},ep=function(){return $APP.n(customElements.get("x-popover"))?null:customElements.define("x-popover",dp())},Qo=new $APP.M(null,"close-label","close-label",-1088385889),Po=new $APP.M(null,"no-close?","no-close?",1842227643),No=new $APP.M(null,"close-label-raw","close-label-raw",798572883),Mo=new $APP.M(null,"heading-raw","heading-raw",
|
|
16
|
+
116296555),Lo=new $APP.M(null,"no-close-present?","no-close-present?",-154717274);var Oo=new $APP.S(null,new $APP.R(null,4,["bottom-start",null,"bottom-end",null,"top-end",null,"top-start",null],null),null),cp="open placement heading close-label no-close disabled".split(" ");$APP.Ed(["x-popover-toggle",new $APP.R(null,2,[$APP.rk,!0,$APP.V,new $APP.R(null,2,[$APP.pk,$APP.Ni,$APP.Jj,$APP.Y],null)],null),"x-popover-change",new $APP.R(null,2,[$APP.rk,!1,$APP.V,new $APP.R(null,1,[$APP.pk,$APP.Ni],null)],null)]);$APP.ja("baredom.exports.x_popover.init",ep);export const init=ep;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
$APP.
|
|
4
|
-
$APP.
|
|
5
|
-
v.setAttribute("stroke-dashoffset",""+$APP.T.g(D));x.textContent=$APP.n($APP.n(d)?$APP.
|
|
6
|
-
e),a.removeAttribute("aria-busy"));m!=null?a.setAttribute("aria-label",m):a.removeAttribute("aria-label");A&&$APP.
|
|
2
|
+
var zM=function(a,b){return typeof a==="string"?(a=parseFloat(a),$APP.n(isNaN(a))?b:a):b},CM=function(a){var b=new $APP.R(null,7,[$APP.Xh,a.getAttribute("value"),$APP.wj,a.getAttribute("max"),$APP.jh,a.getAttribute("variant"),$APP.Wg,a.getAttribute("size"),$APP.U,a.getAttribute("label"),$APP.Ui,a.hasAttribute("show-value"),$APP.uk,a.hasAttribute("indeterminate")],null);var c=$APP.N(b),d=$APP.I(c,$APP.wj),e=$APP.I(c,$APP.Xh),g=$APP.I(c,$APP.jh),h=$APP.I(c,$APP.Wg);b=$APP.I(c,$APP.U);var k=$APP.I(c,
|
|
3
|
+
$APP.Ui);c=$APP.I(c,$APP.uk);d=zM(d,100);d=d>0?d:100;e=$APP.Gg.h($APP.Fg.h(zM(e,0),0),d);g=typeof g==="string"&&$APP.K(AM,g)?g:"default";h=typeof h==="string"&&$APP.K(BM,h)?h:"md";c=$APP.J(c);k=$APP.J(k);var m=c?50:$APP.Gg.h($APP.Fg.h(e/d*100,0),100);b=$APP.mf([$APP.jh,$APP.Ui,$APP.Xh,$APP.Wg,$APP.uk,$APP.Pk,$APP.wj,$APP.U,$APP.bk],[g,k,e,h,c,c?"Loading…":""+$APP.T.g(Math.round(m))+"%",d,typeof b==="string"&&$APP.O("",b)?b:null,m]);var p=$APP.N(b);b=$APP.I(p,$APP.bk);k=$APP.I(p,$APP.jh);d=$APP.I(p,
|
|
4
|
+
$APP.Ui);h=$APP.I(p,$APP.Xh);c=$APP.I(p,$APP.Wg);e=$APP.I(p,$APP.Pk);g=$APP.I(p,$APP.uk);m=$APP.I(p,$APP.U);p=$APP.I(p,$APP.wj);var q=$APP.l(a,"__xProgressCircleBase"),v=$APP.l(a,"__xProgressCircleFill"),x=$APP.l(a,"__xProgressCircleValueNode"),y=$APP.l(a,"__xProgressCircleCompleted"),A=$APP.r(g)&&h>=p,D=$APP.n(g)?75:100*(1-b/100);q.setAttribute("data-variant",k);q.setAttribute("data-size",c);q.setAttribute("data-indeterminate",$APP.n(g)?"true":"false");v.setAttribute("stroke-dasharray",""+$APP.T.g(100));
|
|
5
|
+
v.setAttribute("stroke-dashoffset",""+$APP.T.g(D));x.textContent=$APP.n($APP.n(d)?$APP.r(g):d)?""+$APP.T.g(Math.round(b))+"%":"";x.style.display=$APP.n($APP.n(d)?$APP.r(g):d)?"":"none";a.setAttribute("role","progressbar");a.setAttribute("aria-valuemin","0");$APP.n(g)?(a.removeAttribute("aria-valuenow"),a.setAttribute("aria-busy","true"),a.setAttribute("aria-valuetext",e)):(a.setAttribute("aria-valuenow",""+$APP.T.g(h)),a.setAttribute("aria-valuemax",""+$APP.T.g(p)),a.setAttribute("aria-valuetext",
|
|
6
|
+
e),a.removeAttribute("aria-busy"));m!=null?a.setAttribute("aria-label",m):a.removeAttribute("aria-label");A&&$APP.r(y)&&a.dispatchEvent(new CustomEvent("x-progress-circle-complete",{bubbles:!0,composed:!0,detail:{value:h,max:p}}));a.__xProgressCircleCompleted=$APP.J(A)},DM=function(a){Object.defineProperty(a,"value",{get:function(){var b=this.getAttribute("value");return $APP.n(b)?b:"0"},set:function(b){return this.setAttribute("value",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,
|
|
7
7
|
"max",{get:function(){var b=this.getAttribute("max");return $APP.n(b)?b:"100"},set:function(b){return this.setAttribute("max",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"indeterminate",{get:function(){return this.hasAttribute("indeterminate")},set:function(b){return $APP.n(b)?this.setAttribute("indeterminate",""):this.removeAttribute("indeterminate")},enumerable:!0,configurable:!0});Object.defineProperty(a,"showValue",{get:function(){return this.hasAttribute("show-value")},
|
|
8
|
-
set:function(b){return $APP.n(b)?this.setAttribute("show-value",""):this.removeAttribute("show-value")},enumerable:!0,configurable:!0})},
|
|
8
|
+
set:function(b){return $APP.n(b)?this.setAttribute("show-value",""):this.removeAttribute("show-value")},enumerable:!0,configurable:!0})},FM=function(){var a=class extends HTMLElement{};a.observedAttributes=EM;a.prototype.connectedCallback=function(){if(!$APP.n($APP.l(this,"__xProgressCircleInit"))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElementNS("http://www.w3.org/2000/svg","svg"),g=document.createElementNS("http://www.w3.org/2000/svg",
|
|
9
9
|
"circle"),h=document.createElementNS("http://www.w3.org/2000/svg","circle"),k=document.createElement("div"),m=document.createElement("span");c.textContent=":host{display:inline-flex;color-scheme:light dark;box-sizing:border-box;--x-progress-circle-size:64px;--x-progress-circle-track-color:rgba(0,0,0,0.10);--x-progress-circle-fill-color:#3b82f6;--x-progress-circle-stroke-width:2.8;--x-progress-circle-value-color:rgba(0,0,0,0.50);--x-progress-circle-transition-duration:0.3s;}@media (prefers-color-scheme:dark){:host{--x-progress-circle-track-color:rgba(255,255,255,0.12);--x-progress-circle-value-color:rgba(255,255,255,0.50);}}[part\x3dbase][data-size\x3d'sm']{--x-progress-circle-size:40px;}[part\x3dbase][data-size\x3d'md']{--x-progress-circle-size:64px;}[part\x3dbase][data-size\x3d'lg']{--x-progress-circle-size:96px;}[part\x3dbase][data-variant\x3d'success']{--x-progress-circle-fill-color:#22c55e;}[part\x3dbase][data-variant\x3d'warning']{--x-progress-circle-fill-color:#f59e0b;}[part\x3dbase][data-variant\x3d'danger']{--x-progress-circle-fill-color:#ef4444;}[part\x3dbase]{position:relative;display:inline-flex;width:var(--x-progress-circle-size);height:var(--x-progress-circle-size);}[part\x3dsvg]{width:100%;height:100%;}[part\x3dtrack]{fill:none;stroke:var(--x-progress-circle-track-color);stroke-width:var(--x-progress-circle-stroke-width);}[part\x3dfill]{fill:none;stroke:var(--x-progress-circle-fill-color);stroke-width:var(--x-progress-circle-stroke-width);stroke-linecap:round;transform:rotate(-90deg);transform-origin:center;transition:stroke-dashoffset var(--x-progress-circle-transition-duration) ease;}[part\x3dcenter]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;}[part\x3dvalue-text]{font-size:calc(var(--x-progress-circle-size) * 0.22);color:var(--x-progress-circle-value-color);font-weight:500;line-height:1;}@keyframes x-progress-circle-spin{from{transform:rotate(-90deg);}to{transform:rotate(270deg);}}[part\x3dbase][data-indeterminate\x3d'true'] [part\x3dfill]{animation:x-progress-circle-spin 1.2s linear infinite;}@media (prefers-reduced-motion:reduce){[part\x3dfill]{transition:none;}[part\x3dbase][data-indeterminate\x3d'true'] [part\x3dfill]{animation:none;}}";
|
|
10
10
|
d.setAttribute("part","base");e.setAttribute("part","svg");e.setAttribute("viewBox","0 0 36 36");e.setAttribute("aria-hidden","true");e.setAttribute("focusable","false");g.setAttribute("part","track");g.setAttribute("cx","18");g.setAttribute("cy","18");g.setAttribute("r","15.9155");h.setAttribute("part","fill");h.setAttribute("cx","18");h.setAttribute("cy","18");h.setAttribute("r","15.9155");k.setAttribute("part","center");m.setAttribute("part","value-text");e.appendChild(g);e.appendChild(h);k.appendChild(m);
|
|
11
|
-
d.appendChild(e);d.appendChild(k);b.appendChild(c);b.appendChild(d);this.__xProgressCircleBase=d;this.__xProgressCircleFill=h;this.__xProgressCircleValueNode=m;this.__xProgressCircleInit=!0}
|
|
12
|
-
|
|
11
|
+
d.appendChild(e);d.appendChild(k);b.appendChild(c);b.appendChild(d);this.__xProgressCircleBase=d;this.__xProgressCircleFill=h;this.__xProgressCircleValueNode=m;this.__xProgressCircleInit=!0}CM(this);return null};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&$APP.n($APP.l(this,"__xProgressCircleInit"))&&CM(this);return null};DM(a.prototype);return a},GM=function(){$APP.n(customElements.get("x-progress-circle"))||customElements.define("x-progress-circle",
|
|
12
|
+
FM());return null};var AM=new $APP.S(null,new $APP.R(null,4,["success",null,"warning",null,"danger",null,"default",null],null),null),BM=new $APP.S(null,new $APP.R(null,3,["md",null,"lg",null,"sm",null],null),null),EM="value max variant size label show-value indeterminate".split(" ");$APP.Ed(["x-progress-circle-complete",new $APP.R(null,1,[$APP.V,new $APP.R(null,2,[$APP.Xh,$APP.W,$APP.wj,$APP.W],null)],null)]);$APP.ja("baredom.exports.x_progress_circle.init",GM);export const init=GM;
|
package/dist/x-progress.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
$APP.
|
|
4
|
-
$APP.
|
|
5
|
-
$APP.n(g)?"40%":""+$APP.T.g(b.toFixed(2))+"%";v.style.display=$APP.n(D)?"flex":"none";y.textContent=$APP.n(m)?m:"";y.style.display=m!=null?"":"none";A.textContent=$APP.n($APP.n(d)?$APP.
|
|
6
|
-
a.setAttribute("aria-valuemax",""+$APP.T.g(p)),a.setAttribute("aria-valuetext",e),a.removeAttribute("aria-busy"));m!=null?a.setAttribute("aria-label",m):a.removeAttribute("aria-label");
|
|
2
|
+
var WU=function(a,b){return typeof a==="string"?(a=parseFloat(a),$APP.n(isNaN(a))?b:a):b},ZU=function(a){var b=new $APP.R(null,7,[$APP.Xh,a.getAttribute("value"),$APP.wj,a.getAttribute("max"),$APP.jh,a.getAttribute("variant"),$APP.Wg,a.getAttribute("size"),$APP.U,a.getAttribute("label"),$APP.Ui,a.hasAttribute("show-value"),$APP.uk,a.hasAttribute("indeterminate")],null);var c=$APP.N(b),d=$APP.I(c,$APP.wj),e=$APP.I(c,$APP.Xh),g=$APP.I(c,$APP.jh),h=$APP.I(c,$APP.Wg);b=$APP.I(c,$APP.U);var k=$APP.I(c,
|
|
3
|
+
$APP.Ui);c=$APP.I(c,$APP.uk);d=WU(d,100);d=d>0?d:100;e=$APP.Gg.h($APP.Fg.h(WU(e,0),0),d);g=typeof g==="string"&&$APP.K(XU,g)?g:"default";h=typeof h==="string"&&$APP.K(YU,h)?h:"md";c=$APP.J(c);k=$APP.J(k);var m=c?50:$APP.Gg.h($APP.Fg.h(e/d*100,0),100);b=$APP.mf([$APP.jh,$APP.Ui,$APP.Xh,$APP.Wg,$APP.uk,$APP.Pk,$APP.wj,$APP.U,$APP.bk],[g,k,e,h,c,c?"Loading…":""+$APP.T.g(Math.round(m))+"%",d,typeof b==="string"&&$APP.O("",b)?b:null,m]);var p=$APP.N(b);b=$APP.I(p,$APP.bk);k=$APP.I(p,$APP.jh);d=$APP.I(p,
|
|
4
|
+
$APP.Ui);h=$APP.I(p,$APP.Xh);c=$APP.I(p,$APP.Wg);e=$APP.I(p,$APP.Pk);g=$APP.I(p,$APP.uk);m=$APP.I(p,$APP.U);p=$APP.I(p,$APP.wj);var q=$APP.l(a,"__xProgressBase"),v=$APP.l(a,"__xProgressHeader"),x=$APP.l(a,"__xProgressFill"),y=$APP.l(a,"__xProgressLabel"),A=$APP.l(a,"__xProgressValue");var D=(D=m!=null)?D:d;var G=$APP.l(a,"__xProgressCompleted"),H=$APP.r(g)&&h>=p;q.setAttribute("data-variant",k);q.setAttribute("data-size",c);q.setAttribute("data-indeterminate",$APP.n(g)?"true":"false");x.style.width=
|
|
5
|
+
$APP.n(g)?"40%":""+$APP.T.g(b.toFixed(2))+"%";v.style.display=$APP.n(D)?"flex":"none";y.textContent=$APP.n(m)?m:"";y.style.display=m!=null?"":"none";A.textContent=$APP.n($APP.n(d)?$APP.r(g):d)?""+$APP.T.g(Math.round(b))+"%":"";A.style.display=$APP.n(d)?"":"none";a.setAttribute("role","progressbar");a.setAttribute("aria-valuemin","0");$APP.n(g)?(a.removeAttribute("aria-valuenow"),a.setAttribute("aria-busy","true"),a.setAttribute("aria-valuetext",e)):(a.setAttribute("aria-valuenow",""+$APP.T.g(h)),
|
|
6
|
+
a.setAttribute("aria-valuemax",""+$APP.T.g(p)),a.setAttribute("aria-valuetext",e),a.removeAttribute("aria-busy"));m!=null?a.setAttribute("aria-label",m):a.removeAttribute("aria-label");H&&$APP.r(G)&&a.dispatchEvent(new CustomEvent("x-progress-complete",{bubbles:!0,composed:!0,detail:{value:h,max:p}}));a.__xProgressCompleted=$APP.J(H)},$U=function(a){Object.defineProperty(a,"value",{get:function(){var b=this.getAttribute("value");return $APP.n(b)?b:"0"},set:function(b){return this.setAttribute("value",
|
|
7
7
|
""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"max",{get:function(){var b=this.getAttribute("max");return $APP.n(b)?b:"100"},set:function(b){return this.setAttribute("max",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"indeterminate",{get:function(){return this.hasAttribute("indeterminate")},set:function(b){return $APP.n(b)?this.setAttribute("indeterminate",""):this.removeAttribute("indeterminate")},enumerable:!0,configurable:!0});Object.defineProperty(a,
|
|
8
8
|
"showValue",{get:function(){return this.hasAttribute("show-value")},set:function(b){return $APP.n(b)?this.setAttribute("show-value",""):this.removeAttribute("show-value")},enumerable:!0,configurable:!0});Object.defineProperty(a,"variant",{get:function(){var b=this.getAttribute("variant");return $APP.n(b)?b:""},set:function(b){return this.setAttribute("variant",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"size",{get:function(){var b=this.getAttribute("size");return $APP.n(b)?
|
|
9
|
-
b:""},set:function(b){return this.setAttribute("size",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){return this.getAttribute("label")},set:function(b){return $APP.n(b)?this.setAttribute("label",""+$APP.T.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0})},
|
|
9
|
+
b:""},set:function(b){return this.setAttribute("size",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){return this.getAttribute("label")},set:function(b){return $APP.n(b)?this.setAttribute("label",""+$APP.T.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0})},bV=function(){var a=class extends HTMLElement{};a.observedAttributes=aV;a.prototype.connectedCallback=function(){if(!$APP.n($APP.l(this,"__xProgressInit"))){var b=this.attachShadow({mode:"open"}),
|
|
10
10
|
c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("span"),h=document.createElement("span"),k=document.createElement("div"),m=document.createElement("div");c.textContent=":host{display:block;color-scheme:light dark;box-sizing:border-box;--x-progress-border-radius:9999px;--x-progress-track-color:rgba(0,0,0,0.10);--x-progress-fill-color:#3b82f6;--x-progress-label-color:rgba(0,0,0,0.60);--x-progress-value-color:rgba(0,0,0,0.50);}@media (prefers-color-scheme:dark){:host{--x-progress-track-color:rgba(255,255,255,0.12);--x-progress-label-color:rgba(255,255,255,0.60);--x-progress-value-color:rgba(255,255,255,0.50);}}[part\x3dbase][data-size\x3d'sm']{--x-progress-height:4px;}[part\x3dbase][data-size\x3d'md']{--x-progress-height:8px;}[part\x3dbase][data-size\x3d'lg']{--x-progress-height:12px;}[part\x3dbase][data-variant\x3d'success']{--x-progress-fill-color:#22c55e;}[part\x3dbase][data-variant\x3d'warning']{--x-progress-fill-color:#f59e0b;}[part\x3dbase][data-variant\x3d'danger']{--x-progress-fill-color:#ef4444;}[part\x3dbase]{width:100%;box-sizing:border-box;}[part\x3dheader]{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:4px;}[part\x3dlabel-text]{font-size:0.875rem;color:var(--x-progress-label-color);font-weight:500;}[part\x3dvalue-text]{font-size:0.8125rem;color:var(--x-progress-value-color);}[part\x3dtrack]{height:var(--x-progress-height,8px);border-radius:var(--x-progress-border-radius,9999px);background:var(--x-progress-track-color);overflow:hidden;position:relative;}[part\x3dfill]{height:100%;background:var(--x-progress-fill-color);border-radius:var(--x-progress-border-radius,9999px);transition:width 0.3s ease;width:0%;}@keyframes x-progress-indeterminate{0%{transform:translateX(-100%) scaleX(0.5);}50%{transform:translateX(60%) scaleX(0.8);}100%{transform:translateX(200%) scaleX(0.5);}}[part\x3dbase][data-indeterminate\x3d'true'] [part\x3dfill]{animation:x-progress-indeterminate 1.5s ease infinite;width:40%;transform-origin:left center;}@media (prefers-reduced-motion:reduce){[part\x3dfill]{transition:none;}[part\x3dbase][data-indeterminate\x3d'true'] [part\x3dfill]{animation:none;width:50%;}}";
|
|
11
|
-
d.setAttribute("part","base");e.setAttribute("part","header");g.setAttribute("part","label-text");h.setAttribute("part","value-text");k.setAttribute("part","track");m.setAttribute("part","fill");e.appendChild(g);e.appendChild(h);k.appendChild(m);d.appendChild(e);d.appendChild(k);b.appendChild(c);b.appendChild(d);this.__xProgressBase=d;this.__xProgressHeader=e;this.__xProgressFill=m;this.__xProgressLabel=g;this.__xProgressValue=h;this.__xProgressInit=!0}
|
|
12
|
-
function(){return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.
|
|
11
|
+
d.setAttribute("part","base");e.setAttribute("part","header");g.setAttribute("part","label-text");h.setAttribute("part","value-text");k.setAttribute("part","track");m.setAttribute("part","fill");e.appendChild(g);e.appendChild(h);k.appendChild(m);d.appendChild(e);d.appendChild(k);b.appendChild(c);b.appendChild(d);this.__xProgressBase=d;this.__xProgressHeader=e;this.__xProgressFill=m;this.__xProgressLabel=g;this.__xProgressValue=h;this.__xProgressInit=!0}ZU(this);return null};a.prototype.disconnectedCallback=
|
|
12
|
+
function(){return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&$APP.n($APP.l(this,"__xProgressInit"))&&ZU(this);return null};$U(a.prototype);return a},cV=function(){$APP.n(customElements.get("x-progress"))||customElements.define("x-progress",bV());return null};var XU=new $APP.S(null,new $APP.R(null,4,["success",null,"warning",null,"danger",null,"default",null],null),null),YU=new $APP.S(null,new $APP.R(null,3,["md",null,"lg",null,"sm",null],null),null),aV="value max variant size label show-value indeterminate".split(" ");$APP.Ed(["x-progress-complete",new $APP.R(null,1,[$APP.V,new $APP.R(null,2,[$APP.Xh,$APP.W,$APP.wj,$APP.W],null)],null)]);$APP.ja("baredom.exports.x_progress.init",cV);export const init=cV;
|
package/dist/x-radio.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
$APP.I(b,$APP.
|
|
4
|
-
e=$APP.
|
|
5
|
-
$APP.n(d)?c.setAttribute("disabled",""):c.removeAttribute("disabled");
|
|
6
|
-
function(a){a=
|
|
7
|
-
{detail:b,bubbles:!0,composed:!0,cancelable:!1}))},
|
|
8
|
-
$APP.l(a,"control").focus():null},
|
|
9
|
-
$APP.l(a,"__xRadioRefs");if($APP.n(b)){var c=$APP.l(a,"__xRadioHandlers");if($APP.n(c)){b=$APP.l(b,"control");a.removeEventListener("click",$APP.l(c,"click"));b.removeEventListener("keydown",$APP.l(c,"keydown"));a.__xRadioHandlers=null;return}}return null},
|
|
10
|
-
get:function(){var d=this.getAttribute(c);return $APP.n(d)?d:null},set:function(d){return d!=null&&$APP.
|
|
2
|
+
var vp=function(a,b,c){return a.setAttribute(b,c)},wp=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},xp=function(a){a=$APP.mf([$APP.Pj,$APP.ck,$APP.Xg,$APP.hh,$APP.mi,$APP.Bi,$APP.Ak,$APP.Hi,$APP.ui],[a.getAttribute("name"),a.hasAttribute("disabled"),a.hasAttribute("required"),a.getAttribute("aria-labelledby"),a.hasAttribute("checked"),a.hasAttribute("readonly"),a.getAttribute("value"),a.getAttribute("aria-label"),a.getAttribute("aria-describedby")]);var b=$APP.N(a);a=
|
|
3
|
+
$APP.I(b,$APP.Hi);var c=$APP.I(b,$APP.ui),d=$APP.I(b,$APP.Pj),e=$APP.I(b,$APP.ck),g=$APP.I(b,$APP.Xg),h=$APP.I(b,$APP.hh),k=$APP.I(b,$APP.mi),m=$APP.I(b,$APP.Bi);b=$APP.I(b,$APP.Ak);k=$APP.J(k);g=$APP.J(g);return $APP.mf([$APP.ph,$APP.kh,$APP.Uk,$APP.wi,$APP.bh,$APP.si,$APP.Xh,$APP.Pi,$APP.Qk,$APP.dk,$APP.X],[g,k?"true":"false",$APP.J(m),k,$APP.n(g)?k:!0,d,b!=null?b:"on",h,c,a,$APP.J(e)])},yp=function(a){var b=$APP.l(a,"__xRadioRefs");if($APP.n(b)){var c=$APP.l(b,"control");b=xp(a);var d=$APP.X.g(b),
|
|
4
|
+
e=$APP.wi.g(b);vp(c,"aria-checked",$APP.kh.g(b));c.setAttribute("aria-disabled",$APP.n(d)?"true":"false");vp(c,"aria-required",$APP.n($APP.ph.g(b))?"true":"false");vp(c,"aria-readonly",$APP.n($APP.Uk.g(b))?"true":"false");var g=$APP.dk.g(b);$APP.n(g)?c.setAttribute("aria-label",g):c.removeAttribute("aria-label");g=$APP.Pi.g(b);$APP.n(g)?c.setAttribute("aria-labelledby",g):c.removeAttribute("aria-labelledby");g=$APP.Qk.g(b);$APP.n(g)?c.setAttribute("aria-describedby",g):c.removeAttribute("aria-describedby");
|
|
5
|
+
$APP.n(d)?c.setAttribute("disabled",""):c.removeAttribute("disabled");wp(a,"data-checked",e);wp(a,"data-disabled",d);a=$APP.l(a,"__xRadioInternals");return $APP.n(a)?a.setFormValue($APP.n(e)?$APP.Xh.g(b):null):null}return null},zp=function(a){var b=a.getAttribute("name"),c=$APP.n(a.form)?a.form:null;c=$APP.n(c)?c:document;if($APP.n($APP.n(b)?$APP.O(b,""):b)){var d=[];c.querySelectorAll("x-radio").forEach(function(e){return $APP.C.h(e.getAttribute("name"),b)?d.push(e):null});return d}return[a]},Ap=
|
|
6
|
+
function(a){a=zp(a);var b=a.find(function(d){return d.hasAttribute("checked")}),c=a.length>0?a[0]:null;return a.forEach(function(d){var e=$APP.l(d,"__xRadioRefs");return $APP.n(e)?(e=$APP.l(e,"control"),d=$APP.n(b)?$APP.C.h(d,b)?0:-1:$APP.C.h(d,c)?0:-1,e.tabIndex=d):null})},Bp=function(a,b){b=new CustomEvent("x-radio-change-request",{detail:b,bubbles:!0,composed:!0,cancelable:!0});a.dispatchEvent(b);return $APP.r(b.defaultPrevented)},Cp=function(a,b){return a.dispatchEvent(new CustomEvent("x-radio-change",
|
|
7
|
+
{detail:b,bubbles:!0,composed:!0,cancelable:!1}))},Dp=function(a){var b=xp(a),c=$APP.X.g(b),d=$APP.Uk.g(b),e=$APP.wi.g(b);if($APP.n($APP.n(c)?c:$APP.n(d)?d:e))return null;b=$APP.Xh.g(b);return Bp(a,{value:b,previousChecked:!1,nextChecked:!0})?(a.setAttribute("checked",""),yp(a),zp(a).forEach(function(g){var h=$APP.O(g,a);return $APP.n(h?g.hasAttribute("checked"):h)?(g.removeAttribute("checked"),yp(g)):null}),Ap(a),Cp(a,{value:b,checked:!0})):null},Ep=function(a){a=$APP.l(a,"__xRadioRefs");return $APP.n(a)?
|
|
8
|
+
$APP.l(a,"control").focus():null},Fp=function(a){return function(b){var c=b.key,d=zp(a),e=d.length,g=d.indexOf(a);if($APP.C.h(c," ")||$APP.C.h(c,"Enter"))return b.preventDefault(),Dp(a);if($APP.C.h(c,"ArrowDown")||$APP.C.h(c,"ArrowRight")){if(b.preventDefault(),e>0)return b=d[$APP.Vc(g+1,e)],Dp(b),Ep(b)}else if($APP.C.h(c,"ArrowUp")||$APP.C.h(c,"ArrowLeft"))if(b.preventDefault(),e>0)return b=d[$APP.Vc(g-1,e)],Dp(b),Ep(b);return null}},Gp=function(a){return function(){return Dp(a)}},Hp=function(a){var b=
|
|
9
|
+
$APP.l(a,"__xRadioRefs");if($APP.n(b)){var c=$APP.l(a,"__xRadioHandlers");if($APP.n(c)){b=$APP.l(b,"control");a.removeEventListener("click",$APP.l(c,"click"));b.removeEventListener("keydown",$APP.l(c,"keydown"));a.__xRadioHandlers=null;return}}return null},Ip=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return wp(this,c,$APP.J(d))}})},Jp=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,
|
|
10
|
+
get:function(){var d=this.getAttribute(c);return $APP.n(d)?d:null},set:function(d){return d!=null&&$APP.O(d)?vp(this,c,""+$APP.T.g(d)):this.removeAttribute(c)}})},Lp=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;Object.defineProperty(a,"observedAttributes",{get:function(){return Kp}});Ip(b,"checked","checked");Ip(b,"disabled","disabled");Ip(b,"readOnly","readonly");Ip(b,"required","required");Jp(b,"name","name");Jp(b,"value","value");b.connectedCallback=function(){if(!$APP.n($APP.l(this,
|
|
11
11
|
"__xRadioRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("button"),g=document.createElement("span");d.textContent=":host{display:inline-block;vertical-align:middle;color-scheme:light dark;--x-radio-size:16px;--x-radio-border-width:2px;--x-radio-border-color:#6b7280;--x-radio-bg:#ffffff;--x-radio-checked-color:#2563eb;--x-radio-dot-size:6px;--x-radio-focus-ring:#60a5fa;--x-radio-disabled-opacity:0.45;--x-radio-transition:background 120ms ease,border-color 120ms ease;}@media (prefers-color-scheme:dark){:host{--x-radio-border-color:#9ca3af;--x-radio-bg:#1f2937;--x-radio-checked-color:#3b82f6;--x-radio-focus-ring:#93c5fd;}}[part\x3dcontrol]{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:var(--x-radio-size);height:var(--x-radio-size);border:var(--x-radio-border-width) solid var(--x-radio-border-color);border-radius:50%;background:var(--x-radio-bg);transition:var(--x-radio-transition);cursor:pointer;flex-shrink:0;position:relative;}[part\x3dcontrol][disabled]{cursor:default;opacity:var(--x-radio-disabled-opacity);}[part\x3dcontrol]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--x-radio-focus-ring);}:host([data-checked]) [part\x3dcontrol]{border-color:var(--x-radio-checked-color);}[part\x3ddot]{display:block;width:var(--x-radio-dot-size);height:var(--x-radio-dot-size);border-radius:50%;background:var(--x-radio-checked-color);opacity:0;transition:opacity 100ms ease;}:host([data-checked]) [part\x3ddot]{opacity:1;}@media (prefers-reduced-motion:reduce){[part\x3dcontrol]{transition:none;}[part\x3ddot]{transition:none;}}";
|
|
12
|
-
e.setAttribute("part","control");e.setAttribute("type","button");e.setAttribute("role","radio");g.setAttribute("part","dot");e.appendChild(g);c.appendChild(d);c.appendChild(e);this.__xRadioRefs={root:c,control:e,dot:g};$APP.n(this.attachInternals)&&(this.__xRadioInternals=this.attachInternals())}
|
|
13
|
-
g);
|
|
12
|
+
e.setAttribute("part","control");e.setAttribute("type","button");e.setAttribute("role","radio");g.setAttribute("part","dot");e.appendChild(g);c.appendChild(d);c.appendChild(e);this.__xRadioRefs={root:c,control:e,dot:g};$APP.n(this.attachInternals)&&(this.__xRadioInternals=this.attachInternals())}Hp(this);c=$APP.l(this,"__xRadioRefs");$APP.n(c)&&(c=$APP.l(c,"control"),d=Gp(this),e=Fp(this),g={click:d,keydown:e},this.addEventListener("click",d),c.addEventListener("keydown",e),this.__xRadioHandlers=
|
|
13
|
+
g);yp(this);return Ap(this)};b.disconnectedCallback=function(){return Hp(this)};b.attributeChangedCallback=function(){return yp(this)};b.formDisabledCallback=function(c){wp(this,"disabled",$APP.J(c));return yp(this)};b.formResetCallback=function(){this.removeAttribute("checked");return yp(this)};return a},Mp=function(){return $APP.n(customElements.get("x-radio"))?null:customElements.define("x-radio",Lp())};var Kp="checked disabled readonly required name value aria-label aria-describedby aria-labelledby".split(" ");$APP.Ed(["x-radio-change-request",new $APP.R(null,2,[$APP.rk,!0,$APP.V,new $APP.R(null,3,[$APP.Xh,$APP.Y,$APP.fj,$APP.Ni,$APP.gk,$APP.Ni],null)],null),"x-radio-change",new $APP.R(null,2,[$APP.rk,!1,$APP.V,new $APP.R(null,2,[$APP.Xh,$APP.Y,$APP.Lk,$APP.Ni],null)],null)]);$APP.ja("baredom.exports.x_radio.init",Mp);export const init=Mp;
|
package/dist/x-ripple-effect.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
2
|
+
var lI=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.n($APP.n(b)?b:!(a>0))?25:Math.min(100,Math.max(1,a))}return 25},mI=function(a){if(typeof a==="string"){a=parseInt(a.trim(),10);var b=isNaN(a);return $APP.n($APP.n(b)?b:!(a>0))?800:Math.min(5E3,Math.max(100,a))}return 800},nI=function(a){if(typeof a==="string"){a=parseFloat(a.trim());var b=isNaN(a);return $APP.n($APP.n(b)?b:!(a>0))?.04:Math.min(.2,Math.max(.005,a))}return.04},oI=function(a){var b=$APP.l(a,
|
|
3
3
|
"__xRippleRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot"),g=document.createElementNS("http://www.w3.org/2000/svg","svg");c.textContent=":host{display:inline-block;position:relative;}:host([disabled]){cursor:default;}[part\x3dcontainer]{display:block;width:100%;height:100%;}";d.setAttribute("part","container");d.appendChild(e);g.setAttribute("part","filters");g.style.position="absolute";
|
|
4
|
-
g.style.width="0";g.style.height="0";g.style.overflow="hidden";b.appendChild(c);b.appendChild(d);b.appendChild(g);a.__xRippleRefs=new $APP.
|
|
5
|
-
$APP.
|
|
6
|
-
e.setAttribute("baseFrequency",""+$APP.T.g(c));e.setAttribute("numOctaves","3");e.setAttribute("seed",""+$APP.T.g(Math.floor(Math.random()*1E3)));e.setAttribute("result","turbulence");g.setAttribute("in","SourceGraphic");g.setAttribute("in2","turbulence");g.setAttribute("scale","0");g.setAttribute("xChannelSelector","R");g.setAttribute("yChannelSelector","G");d.appendChild(e);d.appendChild(g);a.appendChild(d);return new $APP.
|
|
7
|
-
$APP.
|
|
8
|
-
{detail:{x,y},bubbles:!0,composed:!0}));b?(v.setAttribute("scale",""+$APP.T.g(d/2)),b=requestAnimationFrame(function(){v.setAttribute("scale","0");k.removeChild(p);h.style.filter="";return a.dispatchEvent(new CustomEvent("x-ripple-effect-end",{detail:{x,y},bubbles:!0,composed:!0}))})):b=requestAnimationFrame(function
|
|
9
|
-
1)return k.removeChild(p),k.childNodes.length===0&&(h.style.filter=""),a.dispatchEvent(new CustomEvent("x-ripple-effect-end",{detail:{x,y},bubbles:!0,composed:!0}));
|
|
10
|
-
"__xRippleRefs");if($APP.n(b)){c=$APP.
|
|
11
|
-
configurable:!0});Object.defineProperty(a,"duration",{get:function(){return
|
|
12
|
-
"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0})},
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
g.style.width="0";g.style.height="0";g.style.overflow="hidden";b.appendChild(c);b.appendChild(d);b.appendChild(g);a.__xRippleRefs=new $APP.R(null,3,[$APP.Jh,b,$APP.yi,d,$APP.Ti,g],null);a.__xRippleCounter=0;a.__xRippleFrames=[];return $APP.l(a,"__xRippleRefs")},vI=function(a){a=new $APP.R(null,4,[pI,a.getAttribute("intensity"),qI,a.getAttribute("duration"),rI,a.getAttribute("frequency"),$APP.ck,a.hasAttribute("disabled")],null);var b=$APP.N(a);a=$APP.I(b,pI);var c=$APP.I(b,qI),d=$APP.I(b,rI);b=$APP.I(b,
|
|
5
|
+
$APP.ck);return new $APP.R(null,4,[sI,lI(a),tI,mI(c),uI,nI(d),$APP.X,$APP.J(b)],null)},yI=function(a,b,c){var d=document.createElementNS("http://www.w3.org/2000/svg","filter"),e=document.createElementNS("http://www.w3.org/2000/svg","feTurbulence"),g=document.createElementNS("http://www.w3.org/2000/svg","feDisplacementMap");d.setAttribute("id",b);d.setAttribute("x","-10%");d.setAttribute("y","-10%");d.setAttribute("width","120%");d.setAttribute("height","120%");e.setAttribute("type","turbulence");
|
|
6
|
+
e.setAttribute("baseFrequency",""+$APP.T.g(c));e.setAttribute("numOctaves","3");e.setAttribute("seed",""+$APP.T.g(Math.floor(Math.random()*1E3)));e.setAttribute("result","turbulence");g.setAttribute("in","SourceGraphic");g.setAttribute("in2","turbulence");g.setAttribute("scale","0");g.setAttribute("xChannelSelector","R");g.setAttribute("yChannelSelector","G");d.appendChild(e);d.appendChild(g);a.appendChild(d);return new $APP.R(null,3,[$APP.Dj,d,wI,e,xI,g],null)},zI=function(a,b){var c=vI(a);if(!$APP.n($APP.X.g(c))){c=
|
|
7
|
+
$APP.N(c);var d=$APP.I(c,sI),e=$APP.I(c,tI),g=$APP.I(c,uI);c=oI(a);c=$APP.N(c);var h=$APP.I(c,$APP.yi),k=$APP.I(c,$APP.Ti),m=$APP.l(a,"__xRippleCounter");c="xr-"+$APP.T.g(m);a.__xRippleCounter=m+1;m=yI(k,c,g);m=$APP.N(m);var p=$APP.I(m,$APP.Dj),q=$APP.I(m,wI),v=$APP.I(m,xI),x=b.clientX,y=b.clientY,A=performance.now(),D=$APP.l(a,"__xRippleFrames");b=$APP.J(window.matchMedia("(prefers-reduced-motion:reduce)").matches);h.style.filter="url(#"+$APP.T.g(c)+")";a.dispatchEvent(new CustomEvent("x-ripple-effect-start",
|
|
8
|
+
{detail:{x,y},bubbles:!0,composed:!0}));b?(v.setAttribute("scale",""+$APP.T.g(d/2)),b=requestAnimationFrame(function(){v.setAttribute("scale","0");k.removeChild(p);h.style.filter="";return a.dispatchEvent(new CustomEvent("x-ripple-effect-end",{detail:{x,y},bubbles:!0,composed:!0}))})):b=requestAnimationFrame(function H(){var F=performance.now()-A;F=Math.min(1,F/e);var P=1-F;P=1-P*P*P;var la=g*(1-P*.7);v.setAttribute("scale",""+$APP.T.g(d*(1-P)));q.setAttribute("baseFrequency",""+$APP.T.g(la));if(F>=
|
|
9
|
+
1)return k.removeChild(p),k.childNodes.length===0&&(h.style.filter=""),a.dispatchEvent(new CustomEvent("x-ripple-effect-end",{detail:{x,y},bubbles:!0,composed:!0}));F=requestAnimationFrame(H);return D.push(F)});D.push(b)}},AI=function(a){function b(c){c.button===0&&zI(a,c);return null}a.addEventListener("pointerdown",b);a.__xRippleHandler=b},BI=function(a){var b=$APP.l(a,"__xRippleFrames");if($APP.n(b)){for(var c=b.length,d=0;;)if(d<c)cancelAnimationFrame(b[d]),d+=1;else break;b.length=0}b=$APP.l(a,
|
|
10
|
+
"__xRippleRefs");if($APP.n(b)){c=$APP.N(b);b=$APP.I(c,$APP.Ti);for(c=$APP.I(c,$APP.yi);;)if(d=b.firstChild,$APP.n(d))b.removeChild(d);else break;c.style.filter=""}b=$APP.l(a,"__xRippleHandler");$APP.n(b)&&(a.removeEventListener("pointerdown",b),a.__xRippleHandler=null)},CI=function(a){Object.defineProperty(a,"intensity",{get:function(){return lI(this.getAttribute("intensity"))},set:function(b){return b==null?this.removeAttribute("intensity"):this.setAttribute("intensity",""+$APP.T.g(b))},enumerable:!0,
|
|
11
|
+
configurable:!0});Object.defineProperty(a,"duration",{get:function(){return mI(this.getAttribute("duration"))},set:function(b){return b==null?this.removeAttribute("duration"):this.setAttribute("duration",""+$APP.T.g(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"frequency",{get:function(){return nI(this.getAttribute("frequency"))},set:function(b){return b==null?this.removeAttribute("frequency"):this.setAttribute("frequency",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,
|
|
12
|
+
"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0})},EI=function(){var a=class extends HTMLElement{};a.observedAttributes=DI;a.prototype.connectedCallback=function(){oI(this);BI(this);AI(this);return null};a.prototype.disconnectedCallback=function(){BI(this);return null};a.prototype.attributeChangedCallback=function(){return null};CI(a.prototype);return a},
|
|
13
|
+
FI=function(){$APP.n(customElements.get("x-ripple-effect"))||customElements.define("x-ripple-effect",EI());return null},wI=new $APP.M(null,"turb","turb",-804768361),qI=new $APP.M(null,"duration-raw","duration-raw",-510770508),sI=new $APP.M(null,"intensity","intensity",1142770863),pI=new $APP.M(null,"intensity-raw","intensity-raw",135576065),tI=new $APP.M(null,"duration","duration",1444101068),rI=new $APP.M(null,"frequency-raw","frequency-raw",-1367383022),xI=new $APP.M(null,"disp","disp",-2047544334),
|
|
14
|
+
uI=new $APP.M(null,"frequency","frequency",-1408891382);var DI=["intensity","duration","frequency","disabled"];$APP.Ed(["x-ripple-effect-start",new $APP.R(null,2,[$APP.V,new $APP.R(null,2,[$APP.Zj,$APP.W,$APP.Yj,$APP.W],null),$APP.rk,!1],null),"x-ripple-effect-end",new $APP.R(null,2,[$APP.V,new $APP.R(null,2,[$APP.Zj,$APP.W,$APP.Yj,$APP.W],null),$APP.rk,!1],null)]);$APP.ja("baredom.exports.x_ripple_effect.init",FI);export const init=FI;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
d.setAttribute("part","viewport");d.setAttribute("role","region");d.appendChild(e);g.setAttribute("part","live");g.setAttribute("aria-live","polite");g.setAttribute("aria-atomic","true");b.appendChild(c);b.appendChild(d);b.appendChild(g);a.__xScrollParallaxRefs=new $APP.
|
|
4
|
-
$APP.n(a.hasAttribute("disabled"))?"":null,$APP.
|
|
5
|
-
b:""],null)},
|
|
6
|
-
$APP.l(a,"__xScrollParallaxChildCache");if($APP.n(b))return b;b=
|
|
7
|
-
a=typeof a==="string"?parseFloat(a.trim()):null;var b=a==null;return $APP.n(b?b:isNaN(a))?.85:a},
|
|
8
|
-
c.height)));c=$APP.l(a,"__xScrollParallaxLastProg");d=
|
|
9
|
-
k?g/k:g>1-k?(1-g)/k:1))}
|
|
10
|
-
null},
|
|
11
|
-
var c=$APP.
|
|
12
|
-
"__xScrollParallaxVisible"))?(
|
|
13
|
-
$APP.l(b,"slot");$APP.n(d)&&c.removeEventListener("slotchange",d)}b=$APP.l(b,"resize");$APP.n(b)&&window.removeEventListener("resize",b)}b=$APP.l(a,"__xScrollParallaxRAF");$APP.n(b)&&(cancelAnimationFrame(b),a.__xScrollParallaxRAF=null);a.__xScrollParallaxHandlers=null},
|
|
14
|
-
"__xScrollParallaxModel"),b)){var c=$APP.
|
|
2
|
+
var LN=function(a){return new $APP.R(null,1,[$APP.mk,a],null)},MN=function(a){var b=$APP.l(a,"__xScrollParallaxRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot"),g=document.createElement("div");c.textContent=":host{display:block;position:relative;color-scheme:light dark;--x-scroll-parallax-perspective:none;--x-scroll-parallax-overflow:hidden;--x-scroll-parallax-smooth-duration:80ms;--x-scroll-parallax-fade-range:20%;--x-scroll-parallax-scale-min:0.85;--x-scroll-parallax-disabled-opacity:0.55;}[part\x3dviewport]{position:relative;width:100%;height:100%;overflow:var(--x-scroll-parallax-overflow);perspective:var(--x-scroll-parallax-perspective);}::slotted(*){will-change:transform;}:host([disabled]){opacity:var(--x-scroll-parallax-disabled-opacity);}:host([easing\x3dsmooth]) ::slotted(*){transition:transform var(--x-scroll-parallax-smooth-duration) ease-out,opacity var(--x-scroll-parallax-smooth-duration) ease-out;}[part\x3dlive]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0;}@media (prefers-reduced-motion:reduce){::slotted(*){transform:none !important;opacity:1 !important;}}";
|
|
3
|
+
d.setAttribute("part","viewport");d.setAttribute("role","region");d.appendChild(e);g.setAttribute("part","live");g.setAttribute("aria-live","polite");g.setAttribute("aria-atomic","true");b.appendChild(c);b.appendChild(d);b.appendChild(g);a.__xScrollParallaxRefs=new $APP.R(null,4,[$APP.Jh,b,$APP.hi,d,$APP.fi,e,$APP.Hh,g],null);return $APP.l(a,"__xScrollParallaxRefs")},TN=function(a){a=new $APP.R(null,5,[$APP.Yh,a.getAttribute("direction"),NN,a.getAttribute("source"),ON,a.getAttribute("easing"),$APP.bi,
|
|
4
|
+
$APP.n(a.hasAttribute("disabled"))?"":null,$APP.sh,a.getAttribute("label")],null);var b=$APP.N(a),c=$APP.I(b,$APP.Yh),d=$APP.I(b,NN),e=$APP.I(b,ON);a=$APP.I(b,$APP.bi);b=$APP.I(b,$APP.sh);c=typeof c==="string"?c.trim().toLowerCase():null;c=$APP.K(PN,c)?c:"vertical";d=typeof d==="string"?d.trim().toLowerCase():null;d=$APP.K(QN,d)?d:"document";e=typeof e==="string"?e.trim().toLowerCase():null;e=$APP.K(RN,e)?e:"none";return new $APP.R(null,5,[$APP.ni,c,$APP.Jj,d,SN,e,$APP.X,a!=null,$APP.U,$APP.n(b)?
|
|
5
|
+
b:""],null)},UN=function(a){a=MN(a);a=$APP.N(a);return $APP.I(a,$APP.fi).assignedElements()},WN=function(a){var b=a.getAttribute("data-speed");typeof b==="string"?(b=parseFloat(b.trim()),b=$APP.n(isNaN(b))?1:b):b=1;var c=a.getAttribute("data-offset");typeof c==="string"?(c=parseFloat(c.trim()),c=$APP.n(isNaN(c))?0:c):c=0;return new $APP.R(null,4,[$APP.xi,b,$APP.vh,c,$APP.th,$APP.C.h("fade",a.getAttribute("data-opacity")),VN,$APP.C.h("grow",a.getAttribute("data-scale"))],null)},XN=function(a){var b=
|
|
6
|
+
$APP.l(a,"__xScrollParallaxChildCache");if($APP.n(b))return b;b=UN(a);b=$APP.Je.m($APP.Td,$APP.Od.g(WN),$APP.kc(b));return a.__xScrollParallaxChildCache=b},YN=function(a){a.__xScrollParallaxChildCache=null},ZN=function(a){a=window.getComputedStyle(a).getPropertyValue("--x-scroll-parallax-fade-range");a=typeof a==="string"?a.trim():null;return $APP.n($APP.n(a)?a.endsWith("%"):a)?(a=parseFloat(a.slice(0,-1)),$APP.n(isNaN(a))?.2:a/100):.2},$N=function(a){a=window.getComputedStyle(a).getPropertyValue("--x-scroll-parallax-scale-min");
|
|
7
|
+
a=typeof a==="string"?parseFloat(a.trim()):null;var b=a==null;return $APP.n(b?b:isNaN(a))?.85:a},aO=function(a,b,c){b=new CustomEvent(b,{detail:$APP.Sg(c),bubbles:!0,composed:!0,cancelable:!1});return a.dispatchEvent(b)},bO=function(a){var b=function(){var H=$APP.l(a,"__xScrollParallaxModel");return $APP.n(H)?H:TN(a)}();if(!$APP.n($APP.X.g(b))){var c=a.getBoundingClientRect();b=$APP.C.h("vertical",$APP.ni.g(b));var d=window.innerHeight,e=b?d:window.innerWidth,g=$APP.Fg.h(0,$APP.Gg.h(1,(d-c.top)/(d+
|
|
8
|
+
c.height)));c=$APP.l(a,"__xScrollParallaxLastProg");d=UN(a);for(var h=XN(a),k=ZN(a),m=$N(a),p=d.length,q=0;;)if(q<p){if(q<$APP.B(h)){var v=d[q],x=$APP.fc(h,q),y=$APP.N(x),A=$APP.I(y,$APP.xi),D=$APP.I(y,$APP.vh);x=$APP.I(y,$APP.th);y=$APP.I(y,VN);A=(g-.5)*e*(A-1)+D;var G=b?"translateY("+$APP.T.g(A)+"px)":"translateX("+$APP.T.g(A)+"px)";A=$APP.n(y)?function(){var H=m+(1-m)*(1-Math.abs(g-.5)*2);return""+$APP.T.g(G)+" scale("+$APP.T.g(H)+")"}():G;v.style.transform=A;$APP.n(x)&&(v.style.opacity=""+$APP.T.g(g<
|
|
9
|
+
k?g/k:g>1-k?(1-g)/k:1))}q+=1}else break;if(c==null||Math.abs(g-c)>.001)a.__xScrollParallaxLastProg=g,aO(a,"x-scroll-parallax-progress",LN(g))}a.__xScrollParallaxRAF=null},cO=function(a){return $APP.n(function(){var b=a.isConnected;return $APP.n(b)?(b=$APP.l(a,"__xScrollParallaxVisible"),$APP.n(b)?!$APP.J(window.matchMedia("(prefers-reduced-motion:reduce)").matches):b):b}())?$APP.n($APP.l(a,"__xScrollParallaxRAF"))?null:$APP.ma(a,"__xScrollParallaxRAF",requestAnimationFrame(function(){return bO(a)})):
|
|
10
|
+
null},dO=function(a){a=$APP.l(a,"__xScrollParallaxHandlers");$APP.n($APP.n(a)?$APP.r($APP.l(a,"scrollAttached")):a)&&(window.addEventListener("scroll",$APP.l(a,"scroll"),{passive:!0}),a.scrollAttached=!0)},eO=function(a){a=$APP.l(a,"__xScrollParallaxHandlers");$APP.n($APP.n(a)?$APP.l(a,"scrollAttached"):a)&&(window.removeEventListener("scroll",$APP.l(a,"scroll")),a.scrollAttached=!1)},fO=function(a,b){a.textContent=b;setTimeout(function(){return a.textContent=""},1E3)},gO=function(a,b){b=b[0].isIntersecting;
|
|
11
|
+
var c=$APP.N($APP.l(a,"__xScrollParallaxRefs"));c=$APP.I(c,$APP.Hh);a.__xScrollParallaxVisible=b;if($APP.n(b))return dO(a),bO(a),fO(c,"Parallax section entered viewport"),aO(a,"x-scroll-parallax-enter",LN(function(){var d=$APP.l(a,"__xScrollParallaxLastProg");return $APP.n(d)?d:0}()));eO(a);fO(c,"Parallax section left viewport");return aO(a,"x-scroll-parallax-leave",LN(function(){var d=$APP.l(a,"__xScrollParallaxLastProg");return $APP.n(d)?d:0}()))},hO=function(a){function b(){return $APP.n($APP.l(a,
|
|
12
|
+
"__xScrollParallaxVisible"))?(YN(a),bO(a)):null}function c(){YN(a);return $APP.n($APP.l(a,"__xScrollParallaxVisible"))?bO(a):null}var d=MN(a);d=$APP.N(d);$APP.I(d,$APP.fi).addEventListener("slotchange",c);window.addEventListener("resize",b);$APP.ma(a,"__xScrollParallaxHandlers",{scroll:function(){return cO(a)},slot:c,resize:b,scrollAttached:!1})},iO=function(a){var b=$APP.l(a,"__xScrollParallaxHandlers");if($APP.n(b)){eO(a);var c=$APP.l(a,"__xScrollParallaxRefs");if($APP.n(c)){c=$APP.fi.g(c);var d=
|
|
13
|
+
$APP.l(b,"slot");$APP.n(d)&&c.removeEventListener("slotchange",d)}b=$APP.l(b,"resize");$APP.n(b)&&window.removeEventListener("resize",b)}b=$APP.l(a,"__xScrollParallaxRAF");$APP.n(b)&&(cancelAnimationFrame(b),a.__xScrollParallaxRAF=null);a.__xScrollParallaxHandlers=null},jO=function(a){var b=$APP.l(a,"__xScrollParallaxIO");$APP.n(b)&&b.disconnect();b=new IntersectionObserver(function(c){return gO(a,c)},{threshold:[0]});b.observe(a);a.__xScrollParallaxIO=b},kO=function(a){var b=TN(a);if($APP.O($APP.l(a,
|
|
14
|
+
"__xScrollParallaxModel"),b)){var c=$APP.N(b),d=$APP.I(c,$APP.ni);$APP.I(c,SN);b=$APP.I(c,$APP.X);var e=$APP.I(c,$APP.U),g=MN(a);g=$APP.N(g);var h=$APP.I(g,$APP.hi);$APP.I(g,$APP.Hh);a.setAttribute("data-direction",d);$APP.u(e)?h.setAttribute("aria-label",e):h.removeAttribute("aria-label");a.__xScrollParallaxModel=c;c=$APP.l(a,"__xScrollParallaxVisible");$APP.n($APP.n(c)?$APP.r(b):c)&&bO(a)}},lO=function(a){Object.defineProperty(a,"direction",{get:function(){var b=this.getAttribute("direction");return $APP.n(b)?
|
|
15
15
|
b:"vertical"},set:function(b){return $APP.n(b)?this.setAttribute("direction",""+$APP.T.g(b)):this.removeAttribute("direction")},enumerable:!0,configurable:!0});Object.defineProperty(a,"source",{get:function(){var b=this.getAttribute("source");return $APP.n(b)?b:"document"},set:function(b){return $APP.n(b)?this.setAttribute("source",""+$APP.T.g(b)):this.removeAttribute("source")},enumerable:!0,configurable:!0});Object.defineProperty(a,"easing",{get:function(){var b=this.getAttribute("easing");return $APP.n(b)?
|
|
16
16
|
b:"none"},set:function(b){return $APP.n(b)?this.setAttribute("easing",""+$APP.T.g(b)):this.removeAttribute("easing")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.n(b)?b:""},set:function(b){return $APP.n($APP.n(b)?
|
|
17
|
-
$APP.
|
|
18
|
-
c=b.length,d=0;;)if(d<c){var e=b[d];e.style.transform="";e.style.opacity="";d+=1}else break;$APP.n($APP.l(this,"__xScrollParallaxVisible"))&&(b=$APP.l(this,"__xScrollParallaxLastProg"),
|
|
19
|
-
return null};
|
|
20
|
-
var
|
|
17
|
+
$APP.O(b,""):b)?this.setAttribute("label",""+$APP.T.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0});Object.defineProperty(a,"progress",{get:function(){var b=$APP.l(this,"__xScrollParallaxLastProg");return $APP.n(b)?b:0},enumerable:!0,configurable:!0})},nO=function(){var a=class extends HTMLElement{};a.observedAttributes=mO;a.prototype.connectedCallback=function(){MN(this);iO(this);hO(this);jO(this);kO(this);return null};a.prototype.disconnectedCallback=function(){for(var b=UN(this),
|
|
18
|
+
c=b.length,d=0;;)if(d<c){var e=b[d];e.style.transform="";e.style.opacity="";d+=1}else break;$APP.n($APP.l(this,"__xScrollParallaxVisible"))&&(b=$APP.l(this,"__xScrollParallaxLastProg"),aO(this,"x-scroll-parallax-leave",LN($APP.n(b)?b:0)));iO(this);b=$APP.l(this,"__xScrollParallaxIO");$APP.n(b)&&(b.disconnect(),this.__xScrollParallaxIO=null);YN(this);this.__xScrollParallaxVisible=!1;return this.__xScrollParallaxLastProg=null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&kO(this);
|
|
19
|
+
return null};lO(a.prototype);return a},tO=function(){$APP.n(customElements.get("x-scroll-parallax"))||customElements.define("x-scroll-parallax",nO());return null},VN=new $APP.M(null,"scale","scale",-230427353),NN=new $APP.M(null,"source-raw","source-raw",396083546),ON=new $APP.M(null,"easing-raw","easing-raw",440485546),SN=new $APP.M(null,"easing","easing",735372043);var mO=["direction","source","easing","disabled","label"];$APP.Ed(["x-scroll-parallax-enter",new $APP.R(null,2,[$APP.V,new $APP.R(null,1,[$APP.mk,$APP.W],null),$APP.rk,!1],null),"x-scroll-parallax-leave",new $APP.R(null,2,[$APP.V,new $APP.R(null,1,[$APP.mk,$APP.W],null),$APP.rk,!1],null),"x-scroll-parallax-progress",new $APP.R(null,2,[$APP.V,new $APP.R(null,1,[$APP.mk,$APP.W],null),$APP.rk,!1],null)]);
|
|
20
|
+
var PN=new $APP.S(null,new $APP.R(null,2,["vertical",null,"horizontal",null],null),null),QN=new $APP.S(null,new $APP.R(null,1,["document",null],null),null),RN=new $APP.S(null,new $APP.R(null,2,["none",null,"smooth",null],null),null);$APP.ja("baredom.exports.x_scroll_parallax.init",tO);export const init=tO;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
+
var Tv=function(a,b){return typeof a==="string"?(a=parseFloat(a.trim()),typeof a==="number"&&$APP.r(isNaN(a))&&a>0?a:b):b},Vv=function(a){return typeof a==="string"&&$APP.K(Uv,a.trim().toLowerCase())?a.trim().toLowerCase():"center"},Wv=function(a,b,c){b*=c;c=b+c-b;return Math.max(0,Math.min(1,c<=0?0:(a-b)/c))},Xv=function(a,b,c){b*=c;return b<=0?0:Math.max(0,Math.min(1,a/b))},Yv=function(a){var b=$APP.l(a,"__xScrollStackRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),
|
|
3
|
+
d=document.createElement("div"),e=document.createElement("slot");c.textContent=":host{display:block;position:relative;color-scheme:light dark;--x-scroll-stack-peek:6px;--x-scroll-stack-rotation:3deg;--x-scroll-stack-gap:1rem;}[part\x3dcontainer]{position:sticky;top:0;height:100vh;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding-top:var(--x-scroll-stack-padding-top,2rem);gap:var(--x-scroll-stack-gap);}::slotted(*){flex-shrink:0;will-change:transform;transition:transform 60ms linear;}:host([disabled]){opacity:0.55;}@media (prefers-reduced-motion:reduce){::slotted(*){transition:none !important;}}";
|
|
4
|
+
d.setAttribute("part","container");d.setAttribute("role","region");d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xScrollStackRefs=new $APP.R(null,3,[$APP.Jh,b,$APP.yi,d,$APP.fi,e],null);return $APP.l(a,"__xScrollStackRefs")},ew=function(a){a=new $APP.R(null,5,[Zv,a.getAttribute("peek"),$v,a.getAttribute("rotation"),aw,a.getAttribute("scroll-distance"),$APP.Wh,a.getAttribute("align"),$APP.bi,$APP.n(a.hasAttribute("disabled"))?"":null],null);var b=$APP.N(a);a=$APP.I(b,Zv);var c=$APP.I(b,$v),
|
|
5
|
+
d=$APP.I(b,aw),e=$APP.I(b,$APP.Wh);b=$APP.I(b,$APP.bi);return new $APP.R(null,5,[bw,Tv(a,6),cw,Tv(c,3),dw,Tv(d,150),$APP.qi,Vv(e),$APP.X,b!=null],null)},fw=function(a){a=Yv(a);a=$APP.N(a);return $APP.I(a,$APP.fi).assignedElements()},gw=function(a,b,c){b=new CustomEvent(b,{detail:$APP.Sg(c),bubbles:!0,composed:!0,cancelable:!1});a.dispatchEvent(b)},hw=function(a){var b=$APP.l(a,"__xScrollStackModel");b=$APP.n(b)?b:ew(a);var c=fw(a).length;b=window.innerHeight+c*dw.g(b);a.style.height=""+$APP.T.g(b)+
|
|
6
|
+
"px"},nw=function(a){var b=function(){var Xa=$APP.l(a,"__xScrollStackModel");return $APP.n(Xa)?Xa:ew(a)}(),c=a.getBoundingClientRect();c=Math.max(0,-c.top);var d=fw(a),e=d.length,g=$APP.l(a,"__xScrollStackNaturalOffsets"),h=$APP.l(a,"__xScrollStackChildHeights");if($APP.n(function(){var Xa=e>0;return Xa?$APP.n(g)?$APP.n(h)?$APP.C.h(g.length,e)&&$APP.C.h(h.length,e):h:g:Xa}())){var k=dw.g(b),m=bw.g(b),p=cw.g(b),q=$APP.qi.g(b),v=g[0],x=$APP.n(a.hasAttribute("align"))?function(){var Xa=(e-1)*m+h[e-1],
|
|
7
|
+
Wb=$APP.N($APP.l(a,"__xScrollStackRefs"));Wb=$APP.I(Wb,$APP.yi).clientHeight;a:switch(q){case "top":Xa=32;break a;case "bottom":Xa=Wb-Xa-32;break a;default:Xa=(Wb-Xa)/2}return Xa-v}():0;b=Xv(c,e,k);for(var y=Math.max(0,Math.min(e,Math.floor(c/Math.max(1,k)))),A=function(){var Xa=$APP.l(a,"__xScrollStackStackedCount");return $APP.n(Xa)?Xa:0}(),D=0;;)if(D<e){var G=d[D],H=Wv(c,D,k),F=new $APP.R(null,3,[iw,D*m,jw,p*Math.sin(D*2.3),kw,2*Math.cos(D*3.7)],null),P=g[D];P=v+iw.g(F)-P;P=H*P+H*x;var la=H*jw.g(F);
|
|
8
|
+
F=H*kw.g(F);var Ca=H>0?""+$APP.T.g(D):"";G.style.transform=H===0?"":"translate("+$APP.T.g(F.toFixed(2))+"px,"+$APP.T.g(P.toFixed(2))+"px) rotate("+$APP.T.g(la.toFixed(3))+"deg)";G.style.zIndex=Ca;D+=1}else break;$APP.O(y,A)&&(a.__xScrollStackStackedCount=y,gw(a,"x-scroll-stack-change",new $APP.R(null,3,[lw,y,mw,e,$APP.mk,b],null)));c=$APP.l(a,"__xScrollStackLastProg");if(c==null||Math.abs(b-c)>.001)a.__xScrollStackLastProg=b,gw(a,"x-scroll-stack-progress",new $APP.R(null,3,[$APP.mk,b,lw,y,mw,e],null))}a.__xScrollStackRAF=
|
|
9
|
+
null},ow=function(a){a=$APP.l(a,"__xScrollStackModel");return $APP.n(a)?$APP.X.g(a):a},pw=function(a){return $APP.n(function(){var b=a.isConnected;return $APP.n(b)?(b=$APP.l(a,"__xScrollStackVisible"),$APP.n(b)?$APP.r(ow(a)):b):b}())?$APP.n($APP.l(a,"__xScrollStackRAF"))?null:$APP.ma(a,"__xScrollStackRAF",requestAnimationFrame(function(){return nw(a)})):null},qw=function(a){a=$APP.l(a,"__xScrollStackHandlers");$APP.n($APP.n(a)?$APP.r($APP.l(a,"scrollAttached")):a)&&(window.addEventListener("scroll",
|
|
10
|
+
$APP.l(a,"scroll"),{passive:!0}),a.scrollAttached=!0)},rw=function(a){a=$APP.l(a,"__xScrollStackHandlers");if($APP.n($APP.n(a)?$APP.l(a,"scrollAttached"):a))window.removeEventListener("scroll",$APP.l(a,"scroll")),a.scrollAttached=!1;else return null},sw=function(a){var b=$APP.l(a,"__xScrollStackCacheRAF");$APP.n(b)&&(cancelAnimationFrame(b),a.__xScrollStackCacheRAF=null);return $APP.ma(a,"__xScrollStackCacheRAF",requestAnimationFrame(function(){a.__xScrollStackCacheRAF=null;if($APP.n(a.isConnected)){var c=
|
|
11
|
+
fw(a),d=c.length;if(d>0){var e=$APP.N($APP.l(a,"__xScrollStackRefs")),g=$APP.I(e,$APP.yi);e=Array(d);for(var h=Array(d),k=0;;)if(k<d){var m=c[k];m.style.transform="";m.style.zIndex="";k+=1}else break;g.offsetHeight;g=g.getBoundingClientRect();for(k=0;;)if(k<d)m=c[k].getBoundingClientRect(),e[k]=m.top-g.top,h[k]=m.height,k+=1;else break;a.__xScrollStackNaturalOffsets=e;a.__xScrollStackChildHeights=h}return nw(a)}return null}))},tw=function(a){var b=$APP.l(a,"__xScrollStackIO");$APP.n(b)&&b.disconnect();
|
|
12
|
+
b=new IntersectionObserver(function(c){c=c[0].isIntersecting;a.__xScrollStackVisible=c;$APP.n(c)?$APP.n(ow(a))?c=null:(qw(a),c=sw(a)):c=rw(a);return c},{threshold:[0]});b.observe(a);a.__xScrollStackIO=b},uw=function(a){a=fw(a);for(var b=a.length,c=0;;)if(c<b){var d=a[c];d.style.transform="";d.style.zIndex="";c+=1}else break},vw=function(a){function b(){hw(a);return $APP.n($APP.l(a,"__xScrollStackVisible"))?sw(a):null}function c(){hw(a);return $APP.n($APP.l(a,"__xScrollStackVisible"))?sw(a):null}var d=
|
|
13
|
+
Yv(a);d=$APP.N(d);$APP.I(d,$APP.fi).addEventListener("slotchange",c);window.addEventListener("resize",b);$APP.ma(a,"__xScrollStackHandlers",{scroll:function(){return pw(a)},slot:c,resize:b,scrollAttached:!1})},ww=function(a){var b=$APP.l(a,"__xScrollStackHandlers");if($APP.n(b)){rw(a);var c=$APP.l(a,"__xScrollStackRefs");if($APP.n(c)){c=$APP.fi.g(c);var d=$APP.l(b,"slot");$APP.n(d)&&c.removeEventListener("slotchange",d)}b=$APP.l(b,"resize");$APP.n(b)&&window.removeEventListener("resize",b)}b=$APP.l(a,
|
|
14
|
+
"__xScrollStackRAF");$APP.n(b)&&(cancelAnimationFrame(b),a.__xScrollStackRAF=null);b=$APP.l(a,"__xScrollStackCacheRAF");$APP.n(b)&&(cancelAnimationFrame(b),a.__xScrollStackCacheRAF=null);a.__xScrollStackHandlers=null},xw=function(a){var b=ew(a);if($APP.O($APP.l(a,"__xScrollStackModel"),b)){b=$APP.N(b);var c=$APP.I(b,$APP.X);a.__xScrollStackModel=b;$APP.n(c)?(uw(a),a.__xScrollStackStackedCount=0,a.__xScrollStackLastProg=null,rw(a)):$APP.n($APP.l(a,"__xScrollStackVisible"))&&(qw(a),sw(a))}},yw=function(a){Object.defineProperty(a,
|
|
15
|
+
"peek",{get:function(){return Tv(this.getAttribute("peek"),6)},set:function(b){return b!=null?this.setAttribute("peek",""+$APP.T.g(b)):this.removeAttribute("peek")},enumerable:!0,configurable:!0});Object.defineProperty(a,"rotation",{get:function(){return Tv(this.getAttribute("rotation"),3)},set:function(b){return b!=null?this.setAttribute("rotation",""+$APP.T.g(b)):this.removeAttribute("rotation")},enumerable:!0,configurable:!0});Object.defineProperty(a,"scrollDistance",{get:function(){return Tv(this.getAttribute("scroll-distance"),
|
|
16
|
+
150)},set:function(b){return b!=null?this.setAttribute("scroll-distance",""+$APP.T.g(b)):this.removeAttribute("scroll-distance")},enumerable:!0,configurable:!0});Object.defineProperty(a,"align",{get:function(){return Vv(this.getAttribute("align"))},set:function(b){return b!=null?this.setAttribute("align",""+$APP.T.g(b)):this.removeAttribute("align")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.n(b)?
|
|
17
|
+
this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"stackedCount",{get:function(){var b=$APP.l(this,"__xScrollStackStackedCount");return $APP.n(b)?b:0},enumerable:!0,configurable:!0});Object.defineProperty(a,"progress",{get:function(){var b=$APP.l(this,"__xScrollStackLastProg");return $APP.n(b)?b:0},enumerable:!0,configurable:!0});Object.defineProperty(a,"refresh",{value:function(){hw(this);return $APP.n($APP.l(this,"__xScrollStackVisible"))?
|
|
18
|
+
sw(this):null},enumerable:!0,configurable:!0})},Aw=function(){var a=class extends HTMLElement{};a.observedAttributes=zw;a.prototype.connectedCallback=function(){Yv(this);ww(this);vw(this);tw(this);xw(this);hw(this);return null};a.prototype.disconnectedCallback=function(){uw(this);ww(this);var b=$APP.l(this,"__xScrollStackIO");$APP.n(b)&&(b.disconnect(),this.__xScrollStackIO=null);this.__xScrollStackVisible=!1;this.__xScrollStackStackedCount=0;return this.__xScrollStackChildHeights=this.__xScrollStackNaturalOffsets=
|
|
19
|
+
this.__xScrollStackLastProg=null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&(xw(this),hw(this),$APP.n($APP.l(this,"__xScrollStackVisible"))&&sw(this));return null};yw(a.prototype);return a},Bw=function(){$APP.n(customElements.get("x-scroll-stack"))||customElements.define("x-scroll-stack",Aw());return null},jw=new $APP.M(null,"stack-rot","stack-rot",-949440704),bw=new $APP.M(null,"peek","peek",-291396325),mw=new $APP.M(null,"totalCount","totalCount",2101470328),aw=new $APP.M(null,
|
|
20
|
+
"scroll-distance-raw","scroll-distance-raw",1537519796),kw=new $APP.M(null,"stack-x","stack-x",-1557848736),iw=new $APP.M(null,"stack-y","stack-y",146748620),$v=new $APP.M(null,"rotation-raw","rotation-raw",318004495),cw=new $APP.M(null,"rotation","rotation",-1728051644),Zv=new $APP.M(null,"peek-raw","peek-raw",361729174),lw=new $APP.M(null,"stackedCount","stackedCount",137366007),dw=new $APP.M(null,"scroll-distance","scroll-distance",-544947824);var zw=["peek","rotation","scroll-distance","align","disabled"];$APP.Ed(["x-scroll-stack-change",new $APP.R(null,2,[$APP.V,new $APP.R(null,3,[lw,$APP.W,mw,$APP.W,$APP.mk,$APP.W],null),$APP.rk,!1],null),"x-scroll-stack-progress",new $APP.R(null,2,[$APP.V,new $APP.R(null,3,[$APP.mk,$APP.W,lw,$APP.W,mw,$APP.W],null),$APP.rk,!1],null)]);var Uv=new $APP.S(null,new $APP.R(null,3,["top",null,"center",null,"bottom",null],null),null);$APP.ja("baredom.exports.x_scroll_stack.init",Bw);export const init=Bw;
|