@vanelsas/baredom 1.2.0 → 1.4.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 +29 -0
- package/README.md +7 -5
- package/dist/base.js +397 -362
- package/dist/x-alert.js +19 -19
- 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 +19 -19
- package/dist/x-copy.js +23 -23
- package/dist/x-currency-field.js +22 -22
- package/dist/x-date-picker.js +41 -41
- package/dist/x-divider.js +13 -13
- 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 +10 -10
- package/dist/x-gaussian-blur.js +19 -32
- package/dist/x-grid.js +6 -7
- package/dist/x-kinetic-font.js +29 -0
- package/dist/x-kinetic-typography.js +39 -61
- package/dist/x-liquid-dock.js +40 -0
- package/dist/x-liquid-fill.js +45 -0
- package/dist/x-liquid-glass.js +48 -0
- package/dist/x-menu-item.js +10 -10
- package/dist/x-menu.js +11 -11
- package/dist/x-metaball-cursor.js +29 -0
- package/dist/x-modal.js +13 -13
- package/dist/x-morph-stack.js +41 -0
- package/dist/x-navbar.js +13 -13
- package/dist/x-neural-glow.js +35 -0
- package/dist/x-notification-center.js +9 -10
- package/dist/x-organic-divider.js +19 -19
- 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 +9 -9
- package/dist/x-progress.js +10 -10
- package/dist/x-radio.js +11 -11
- package/dist/x-ripple-effect.js +12 -13
- package/dist/x-scroll-parallax.js +19 -19
- package/dist/x-scroll-stack.js +18 -18
- package/dist/x-scroll-story.js +36 -36
- package/dist/x-scroll-timeline.js +50 -50
- package/dist/x-scroll.js +41 -41
- 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 +6 -6
- package/dist/x-slider.js +16 -16
- package/dist/x-soft-body.js +22 -0
- 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 +22 -23
- package/dist/x-table-row.js +10 -10
- package/dist/x-table.js +16 -16
- package/dist/x-tabs.js +11 -11
- package/dist/x-text-area.js +18 -18
- package/dist/x-timeline-item.js +24 -24
- package/dist/x-timeline.js +9 -9
- package/dist/x-toast.js +24 -24
- package/dist/x-toaster.js +8 -8
- package/dist/x-typography.js +8 -8
- package/package.json +50 -2
package/dist/x-dropdown.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
a)}return null},
|
|
4
|
-
$APP.l(b,"docClick"),d=$APP.l(b,"docKeydown");return setTimeout(function(){return $APP.
|
|
5
|
-
b.key;return $APP.
|
|
6
|
-
"escape"):null}}},
|
|
7
|
-
function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.
|
|
8
|
-
null:
|
|
2
|
+
var Ip=function(a,b,c){return $APP.r(c)?a.setAttribute(b,""):a.removeAttribute(b)},Kp=function(a){var b=$APP.l(a,"__xDropdownRefs");if($APP.r(b)){var c=$APP.l(b,"trigger"),d=$APP.l(b,"label");b=$APP.l(b,"panel");var e=a.hasAttribute("open"),g=a.hasAttribute("disabled");var h=a.getAttribute("label");h=$APP.r(h)?h:"";a=a.getAttribute("placement");a=$APP.J(Jp,a)?a:"bottom-start";d.textContent=h;c.setAttribute("aria-expanded",$APP.r(e)?"true":"false");Ip(c,"disabled",g);return b.setAttribute("data-placement",
|
|
3
|
+
a)}return null},Lp=function(a,b){if($APP.r(a.hasAttribute("disabled")))return null;var c=$APP.t(a.hasAttribute("open"));b=new CustomEvent("x-dropdown-toggle",{detail:{open:c,source:b},bubbles:!0,composed:!0,cancelable:!0});a.dispatchEvent(b);return $APP.t(b.defaultPrevented)?(c?a.setAttribute("open",""):a.removeAttribute("open"),a.dispatchEvent(new CustomEvent("x-dropdown-change",{detail:{open:c},bubbles:!0,composed:!0,cancelable:!1}))):null},Mp=function(a){var b=$APP.l(a,"__xDropdownHandlers");if($APP.r(b)){var c=
|
|
4
|
+
$APP.l(b,"docClick"),d=$APP.l(b,"docKeydown");return setTimeout(function(){return $APP.r(a.hasAttribute("open"))?(document.addEventListener("click",c),document.addEventListener("keydown",d)):null},0)}return null},Np=function(a){a=$APP.l(a,"__xDropdownHandlers");if($APP.r(a)){var b=$APP.l(a,"docKeydown");document.removeEventListener("click",$APP.l(a,"docClick"));return document.removeEventListener("keydown",b)}return null},Op=function(a){return{triggerClick:function(){return Lp(a,"pointer")},triggerKeydown:function(b){var c=
|
|
5
|
+
b.key;return $APP.D.i(c," ")||$APP.D.i(c,"Enter")?(b.preventDefault(),Lp(a,"keyboard")):null},hostFocusout:function(b){return $APP.r(a.hasAttribute("open"))?(b=b.relatedTarget,b==null||$APP.t(a.contains(b))?Lp(a,"focusout"):null):null},docClick:function(b){return $APP.r(a.hasAttribute("open"))?(b=$APP.xc(b.composedPath()),b=$APP.Wd(function(c){return c===a},b),$APP.r(b)?null:Lp(a,"outside-click")):null},docKeydown:function(b){b=$APP.D.i(b.key,"Escape");return $APP.r(b?a.hasAttribute("open"):b)?Lp(a,
|
|
6
|
+
"escape"):null}}},Pp=function(a){var b=$APP.l(a,"__xDropdownRefs");if($APP.r(b)){var c=$APP.l(a,"__xDropdownHandlers");$APP.r(c)&&(b=$APP.l(b,"trigger"),b.removeEventListener("click",$APP.l(c,"triggerClick")),b.removeEventListener("keydown",$APP.l(c,"triggerKeydown")),a.removeEventListener("focusout",$APP.l(c,"hostFocusout")))}},Qp=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return Ip(this,c,$APP.I(d))}})},Rp=
|
|
7
|
+
function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.r(d)?d:""},set:function(d){d!=null&&$APP.O(d)?(d=""+$APP.S.g(d),d=this.setAttribute(c,d)):d=this.removeAttribute(c);return d}})},Tp=function(){var a=class extends HTMLElement{},b=a.prototype;Object.defineProperty(a,"observedAttributes",{get:function(){return Sp}});Qp(b,"open","open");Qp(b,"disabled","disabled");Rp(b,"label","label");Rp(b,"placement","placement");b.show=function(){return $APP.r(this.hasAttribute("open"))?
|
|
8
|
+
null:Lp(this,"programmatic")};b.hide=function(){return $APP.r(this.hasAttribute("open"))?Lp(this,"programmatic"):null};b.toggle=function(){return Lp(this,"programmatic")};b.connectedCallback=function(){if(!$APP.r($APP.l(this,"__xDropdownRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("button"),g=document.createElement("span"),h=document.createElement("span"),k=document.createElement("div"),m=document.createElement("div"),p=document.createElement("slot");
|
|
9
9
|
d.textContent=":host{display:inline-block;position:relative;color-scheme:light dark;--x-dropdown-trigger-bg:#f8fafc;--x-dropdown-trigger-bg-hover:#f1f5f9;--x-dropdown-trigger-bg-active:#e2e8f0;--x-dropdown-trigger-color:#0f172a;--x-dropdown-trigger-border:1px solid #e2e8f0;--x-dropdown-trigger-radius:6px;--x-dropdown-trigger-padding:0 0.75rem;--x-dropdown-trigger-height:2.25rem;--x-dropdown-trigger-font-size:0.9375rem;--x-dropdown-trigger-font-weight:500;--x-dropdown-chevron-color:#64748b;--x-dropdown-focus-ring:#60a5fa;--x-dropdown-panel-bg:#ffffff;--x-dropdown-panel-border:1px solid #e2e8f0;--x-dropdown-panel-radius:8px;--x-dropdown-panel-shadow:0 4px 16px rgba(0,0,0,0.12);--x-dropdown-panel-padding:0.25rem;--x-dropdown-panel-min-width:10rem;--x-dropdown-panel-max-height:20rem;--x-dropdown-panel-offset:4px;--x-dropdown-transition-duration:150ms;--x-dropdown-transition-easing:ease;}@media (prefers-color-scheme:dark){:host{--x-dropdown-trigger-bg:#1e293b;--x-dropdown-trigger-bg-hover:#334155;--x-dropdown-trigger-bg-active:#475569;--x-dropdown-trigger-color:#e2e8f0;--x-dropdown-trigger-border:1px solid #334155;--x-dropdown-chevron-color:#94a3b8;--x-dropdown-focus-ring:#93c5fd;--x-dropdown-panel-bg:#1e293b;--x-dropdown-panel-border:1px solid #334155;--x-dropdown-panel-shadow:0 4px 24px rgba(0,0,0,0.4);}}[part\x3dtrigger]{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:0.375rem;height:var(--x-dropdown-trigger-height);padding:var(--x-dropdown-trigger-padding);background:var(--x-dropdown-trigger-bg);color:var(--x-dropdown-trigger-color);border:var(--x-dropdown-trigger-border);border-radius:var(--x-dropdown-trigger-radius);font-size:var(--x-dropdown-trigger-font-size);font-weight:var(--x-dropdown-trigger-font-weight);font-family:inherit;cursor:pointer;user-select:none;white-space:nowrap;}[part\x3dtrigger]:hover:not(:disabled){background:var(--x-dropdown-trigger-bg-hover);}[part\x3dtrigger]:active:not(:disabled){background:var(--x-dropdown-trigger-bg-active);}[part\x3dtrigger]:disabled{cursor:default;opacity:0.55;}[part\x3dtrigger]:focus-visible{outline:none;box-shadow:0 0 0 2px var(--x-dropdown-focus-ring);}[part\x3dtrigger-label]{flex:1;}[part\x3dchevron]{display:inline-block;color:var(--x-dropdown-chevron-color);font-style:normal;flex-shrink:0;transition:transform 200ms ease;}:host([open]) [part\x3dchevron]{transform:rotate(180deg);}[part\x3dpanel]{position:absolute;z-index:1000;box-sizing:border-box;background:var(--x-dropdown-panel-bg);border:var(--x-dropdown-panel-border);border-radius:var(--x-dropdown-panel-radius);box-shadow:var(--x-dropdown-panel-shadow);padding:var(--x-dropdown-panel-padding);min-width:var(--x-dropdown-panel-min-width);max-height:var(--x-dropdown-panel-max-height);overflow-y:auto;visibility:hidden;pointer-events:none;opacity:0;transform:scaleY(0.95);transition:opacity var(--x-dropdown-transition-duration) var(--x-dropdown-transition-easing),transform var(--x-dropdown-transition-duration) var(--x-dropdown-transition-easing),visibility 0s var(--x-dropdown-transition-duration);}:host([open]) [part\x3dpanel]{visibility:visible;pointer-events:auto;opacity:1;transform:scaleY(1);transition:opacity var(--x-dropdown-transition-duration) var(--x-dropdown-transition-easing),transform var(--x-dropdown-transition-duration) var(--x-dropdown-transition-easing),visibility 0s 0s;}[part\x3dpanel][data-placement\x3dbottom-start]{top:calc(100% + var(--x-dropdown-panel-offset));left:0;transform-origin:top left;}[part\x3dpanel][data-placement\x3dbottom-end]{top:calc(100% + var(--x-dropdown-panel-offset));right:0;transform-origin:top right;}[part\x3dpanel][data-placement\x3dtop-start]{bottom:calc(100% + var(--x-dropdown-panel-offset));left:0;transform-origin:bottom left;}[part\x3dpanel][data-placement\x3dtop-end]{bottom:calc(100% + var(--x-dropdown-panel-offset));right:0;transform-origin:bottom right;}[part\x3dpanel-inner]{display:contents;}@media (prefers-reduced-motion:reduce){[part\x3dpanel]{transition:none !important;}[part\x3dchevron]{transition:none !important;}}";
|
|
10
10
|
e.setAttribute("part","trigger");e.setAttribute("type","button");e.setAttribute("aria-haspopup","true");e.setAttribute("aria-expanded","false");e.setAttribute("aria-controls","panel");g.setAttribute("part","trigger-label");h.setAttribute("part","chevron");h.setAttribute("aria-hidden","true");h.textContent="▾";k.setAttribute("part","panel");k.setAttribute("id","panel");k.setAttribute("data-placement","bottom-start");m.setAttribute("part","panel-inner");e.appendChild(g);e.appendChild(h);m.appendChild(p);
|
|
11
|
-
k.appendChild(m);c.appendChild(d);c.appendChild(e);c.appendChild(k);this.__xDropdownRefs={trigger:e,label:g,chevron:h,panel:k}}
|
|
12
|
-
|
|
11
|
+
k.appendChild(m);c.appendChild(d);c.appendChild(e);c.appendChild(k);this.__xDropdownRefs={trigger:e,label:g,chevron:h,panel:k}}Pp(this);Np(this);this.__xDropdownHandlers=Op(this);d=$APP.l(this,"__xDropdownRefs");$APP.r(d)&&(c=$APP.l(this,"__xDropdownHandlers"),$APP.r(c)&&(d=$APP.l(d,"trigger"),d.addEventListener("click",$APP.l(c,"triggerClick")),d.addEventListener("keydown",$APP.l(c,"triggerKeydown")),this.addEventListener("focusout",$APP.l(c,"hostFocusout"))));$APP.r(this.hasAttribute("open"))&&
|
|
12
|
+
Mp(this);return Kp(this)};b.disconnectedCallback=function(){Pp(this);return Np(this)};b.attributeChangedCallback=function(c){$APP.r($APP.l(this,"__xDropdownRefs"))?(Kp(this),c=$APP.D.i(c,"open")?$APP.r(this.hasAttribute("open"))?Mp(this):Np(this):null):c=null;return c};return a},Up=function(){return $APP.r(customElements.get("x-dropdown"))?null:customElements.define("x-dropdown",Tp())};var Jp=new $APP.R(null,new $APP.P(null,4,["bottom-start",null,"bottom-end",null,"top-end",null,"top-start",null],null),null),Sp=["open","disabled","label","placement"];$APP.Sd(["x-dropdown-toggle",new $APP.P(null,2,[$APP.kl,!0,$APP.U,new $APP.P(null,2,[$APP.hl,$APP.qj,$APP.yk,$APP.Y],null)],null),"x-dropdown-change",new $APP.P(null,2,[$APP.kl,!1,$APP.U,new $APP.P(null,1,[$APP.hl,$APP.qj],null)],null)]);$APP.ka("baredom.exports.x_dropdown.init",Up);export const init=Up;
|
package/dist/x-fieldset.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
h:"";k=$APP.
|
|
4
|
-
c.removeAttribute("aria-describedby");
|
|
5
|
-
b)):b=this.removeAttribute("legend");return b}})},
|
|
6
|
-
e.setAttribute("part","root");e.setAttribute("role","group");g.setAttribute("part","legend");g.setAttribute("id","x-fieldset-legend");h.setAttribute("part","content");h.appendChild(k);e.appendChild(g);e.appendChild(h);c.appendChild(d);c.appendChild(e);this.__xFieldsetRefs={root:c,"root-el":e,"legend-el":g,"content-el":h}}return
|
|
7
|
-
null:customElements.define("x-fieldset",
|
|
2
|
+
var aA=function(a,b,c){return $APP.r(c)?a.setAttribute(b,""):a.removeAttribute(b)},eA=function(a){var b=$APP.l(a,"__xFieldsetRefs");if($APP.r(b)){var c=$APP.l(b,"root-el"),d=$APP.l(b,"legend-el");b=$APP.l(b,"content-el");var e=a.getAttribute("legend");e=new $APP.P(null,4,[bA,e,$APP.Rk,a.hasAttribute("disabled"),$APP.kj,a.getAttribute("aria-label"),$APP.Ui,a.getAttribute("aria-describedby")],null);var g=$APP.N(e),h=$APP.G(g,bA);var k=$APP.G(g,$APP.Rk);e=$APP.G(g,$APP.kj);g=$APP.G(g,$APP.Ui);h=$APP.r(h)?
|
|
3
|
+
h:"";k=$APP.I(k);k=new $APP.P(null,5,[cA,h,dA,$APP.O(h,""),$APP.W,k,$APP.Tk,e,$APP.Ol,g],null);h=cA.g(k);g=dA.g(k);e=$APP.W.g(k);d.textContent=h;$APP.r(g)?d.removeAttribute("hidden"):d.setAttribute("hidden","");d=$APP.Tk.g(k);$APP.r(d)?(c.setAttribute("aria-label",d),c.removeAttribute("aria-labelledby")):(c.removeAttribute("aria-label"),$APP.r(g)?c.setAttribute("aria-labelledby","x-fieldset-legend"):c.removeAttribute("aria-labelledby"));d=$APP.Ol.g(k);$APP.r(d)?c.setAttribute("aria-describedby",d):
|
|
4
|
+
c.removeAttribute("aria-describedby");aA(a,"data-disabled",e);return aA(b,"inert",e)}return null},fA=function(a){Object.defineProperty(a,"disabled",{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute("disabled")},set:function(b){return aA(this,"disabled",$APP.I(b))}})},gA=function(a){Object.defineProperty(a,"legend",{configurable:!0,enumerable:!0,get:function(){return this.getAttribute("legend")},set:function(b){b!=null&&$APP.O(b)?(b=""+$APP.S.g(b),b=this.setAttribute("legend",
|
|
5
|
+
b)):b=this.removeAttribute("legend");return b}})},iA=function(){var a=class extends HTMLElement{},b=a.prototype;a.observedAttributes=hA;gA(b);fA(b);b.connectedCallback=function(){if(!$APP.r($APP.l(this,"__xFieldsetRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("div"),k=document.createElement("slot");d.textContent=":host{display:block;color-scheme:light dark;--x-fieldset-border-color:#d1d5db;--x-fieldset-border-width:1px;--x-fieldset-border-radius:8px;--x-fieldset-padding:1rem;--x-fieldset-gap:0.75rem;--x-fieldset-bg:transparent;--x-fieldset-legend-color:#374151;--x-fieldset-legend-font-size:0.875rem;--x-fieldset-legend-font-weight:600;--x-fieldset-legend-padding:0 0.375rem;--x-fieldset-disabled-opacity:0.45;}@media (prefers-color-scheme:dark){:host{--x-fieldset-border-color:#374151;--x-fieldset-legend-color:#d1d5db;}}[part\x3droot]{display:block;border:var(--x-fieldset-border-width) solid var(--x-fieldset-border-color);border-radius:var(--x-fieldset-border-radius);padding:var(--x-fieldset-padding);background:var(--x-fieldset-bg);position:relative;}:host([data-disabled]) [part\x3droot]{opacity:var(--x-fieldset-disabled-opacity);}[part\x3dlegend]{display:block;position:absolute;top:calc(-0.5em);left:calc(var(--x-fieldset-border-radius) - 0.375rem);padding:var(--x-fieldset-legend-padding);color:var(--x-fieldset-legend-color);font-size:var(--x-fieldset-legend-font-size);font-weight:var(--x-fieldset-legend-font-weight);background:inherit;line-height:1;white-space:nowrap;}[part\x3dlegend][hidden]{display:none;}[part\x3dcontent]{display:flex;flex-direction:column;gap:var(--x-fieldset-gap);}";
|
|
6
|
+
e.setAttribute("part","root");e.setAttribute("role","group");g.setAttribute("part","legend");g.setAttribute("id","x-fieldset-legend");h.setAttribute("part","content");h.appendChild(k);e.appendChild(g);e.appendChild(h);c.appendChild(d);c.appendChild(e);this.__xFieldsetRefs={root:c,"root-el":e,"legend-el":g,"content-el":h}}return eA(this)};b.disconnectedCallback=function(){return null};b.attributeChangedCallback=function(){return eA(this)};return a},jA=function(){return $APP.r(customElements.get("x-fieldset"))?
|
|
7
|
+
null:customElements.define("x-fieldset",iA())},dA=new $APP.M(null,"legend-visible?","legend-visible?",-281107501),bA=new $APP.M(null,"legend-raw","legend-raw",907427195),cA=new $APP.M(null,"legend","legend",-1027192245);var hA=["legend","disabled","aria-label","aria-describedby"];$APP.ka("baredom.exports.x_fieldset.init",jA);export const init=jA;
|
package/dist/x-file-download.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
$APP.l(b,"anchor-el");var c=
|
|
4
|
-
var c=
|
|
5
|
-
b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.
|
|
6
|
-
{get:function(){return
|
|
2
|
+
var iw=function(a,b,c){return $APP.r(c)?a.setAttribute(b,""):a.removeAttribute(b)},mw=function(a){a=new $APP.P(null,4,[jw,a.getAttribute("href"),kw,a.getAttribute("filename"),$APP.Rk,a.hasAttribute("disabled"),$APP.kj,a.getAttribute("aria-label")],null);var b=$APP.N(a);a=$APP.G(b,jw);var c=$APP.G(b,kw),d=$APP.G(b,$APP.Rk);b=$APP.G(b,$APP.kj);return new $APP.P(null,4,[$APP.Pl,$APP.r(a)?a:"",lw,$APP.r(c)?c:"",$APP.W,$APP.I(d),$APP.Tk,b],null)},nw=function(a){var b=$APP.l(a,"__xFileDownloadRefs");if($APP.r(b)){b=
|
|
3
|
+
$APP.l(b,"anchor-el");var c=mw(a),d=$APP.Pl.g(c),e=lw.g(c),g=$APP.W.g(c);c=$APP.Tk.g(c);b.href=d;typeof e==="string"&&$APP.O(e,"")?b.setAttribute("download",e):(e=typeof d==="string",$APP.r(e?d.startsWith("data:"):e)?b.setAttribute("download",""):b.removeAttribute("download"));$APP.r(g)?b.setAttribute("aria-disabled","true"):b.removeAttribute("aria-disabled");$APP.r(c)?b.setAttribute("aria-label",c):b.removeAttribute("aria-label");return iw(a,"data-disabled",g)}return null},ow=function(a){return function(b){if($APP.r(a.hasAttribute("disabled")))return b.preventDefault();
|
|
4
|
+
var c=mw(a);c={href:$APP.Pl.g(c),filename:lw.g(c)};c=new CustomEvent("x-file-download-click",{detail:c,bubbles:!0,composed:!0,cancelable:!0});a.dispatchEvent(c);return $APP.r(c.defaultPrevented)?b.preventDefault():null}},pw=function(a){var b=$APP.l(a,"__xFileDownloadHandlers"),c=$APP.l(a,"__xFileDownloadRefs");$APP.r($APP.r(b)?c:b)&&(c=$APP.l(c,"anchor-el"),b=$APP.l(b,"click"),$APP.r(b)&&c.removeEventListener("click",b));return a.__xFileDownloadHandlers=null},qw=function(a,b,c){Object.defineProperty(a,
|
|
5
|
+
b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.r(d)?d:""},set:function(d){d!=null&&$APP.O(d)?(d=""+$APP.S.g(d),d=this.setAttribute(c,d)):d=this.removeAttribute(c);return d}})},rw=function(a){Object.defineProperty(a,"disabled",{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute("disabled")},set:function(b){return iw(this,"disabled",$APP.I(b))}})},tw=function(){var a=class extends HTMLElement{},b=a.prototype;Object.defineProperty(a,"observedAttributes",
|
|
6
|
+
{get:function(){return sw}});qw(b,"href","href");qw(b,"filename","filename");rw(b);b.connectedCallback=function(){if(!$APP.r($APP.l(this,"__xFileDownloadRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("a"),g=document.createElement("span"),h=document.createElement("span"),k=document.createElement("slot");d.textContent=":host{display:inline-block;color-scheme:light dark;--x-file-download-bg:#2563eb;--x-file-download-color:#ffffff;--x-file-download-hover-bg:#1d4ed8;--x-file-download-active-bg:#1e40af;--x-file-download-border-radius:6px;--x-file-download-padding:0.5rem 1rem;--x-file-download-font-size:0.875rem;--x-file-download-font-weight:500;--x-file-download-gap:0.375rem;--x-file-download-icon-size:1em;--x-file-download-focus-ring:#60a5fa;--x-file-download-disabled-opacity:0.45;--x-file-download-transition:background 120ms ease;}@media (prefers-color-scheme:dark){:host{--x-file-download-bg:#3b82f6;--x-file-download-hover-bg:#2563eb;--x-file-download-active-bg:#1d4ed8;--x-file-download-focus-ring:#93c5fd;}}[part\x3danchor]{display:inline-flex;align-items:center;gap:var(--x-file-download-gap);padding:var(--x-file-download-padding);background:var(--x-file-download-bg);color:var(--x-file-download-color);border-radius:var(--x-file-download-border-radius);font-size:var(--x-file-download-font-size);font-weight:var(--x-file-download-font-weight);text-decoration:none;cursor:pointer;box-sizing:border-box;transition:var(--x-file-download-transition);outline:none;user-select:none;-webkit-user-select:none;}[part\x3danchor]:hover{background:var(--x-file-download-hover-bg);}[part\x3danchor]:active{background:var(--x-file-download-active-bg);}[part\x3danchor]:focus-visible{outline:2px solid var(--x-file-download-focus-ring);outline-offset:2px;}[part\x3dicon]{display:inline-flex;align-items:center;justify-content:center;width:var(--x-file-download-icon-size);height:var(--x-file-download-icon-size);flex-shrink:0;}[part\x3dcontent]{display:inline;}:host([data-disabled]) [part\x3danchor]{opacity:var(--x-file-download-disabled-opacity);pointer-events:none;cursor:default;}@media (prefers-reduced-motion:reduce){[part\x3danchor]{transition:none;}}";
|
|
7
7
|
e.setAttribute("part","anchor");g.setAttribute("part","icon");h.setAttribute("part","content");g.innerHTML='\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" viewBox\x3d"0 0 16 16" fill\x3d"currentColor" width\x3d"1em" height\x3d"1em" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M8 1a.75.75 0 0 1 .75.75v6.19l1.97-1.97a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.03a.75.75 0 0 1 1.06-1.06L7.25 7.94V1.75A.75.75 0 0 1 8 1ZM2.5 13.25a.75.75 0 0 1 .75-.75h9.5a.75.75 0 0 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75Z"/\x3e\x3c/svg\x3e';
|
|
8
|
-
h.appendChild(k);e.appendChild(g);e.appendChild(h);c.appendChild(d);c.appendChild(e);this.__xFileDownloadRefs={"anchor-el":e,"icon-el":g,"content-el":h}}
|
|
9
|
-
|
|
8
|
+
h.appendChild(k);e.appendChild(g);e.appendChild(h);c.appendChild(d);c.appendChild(e);this.__xFileDownloadRefs={"anchor-el":e,"icon-el":g,"content-el":h}}pw(this);c=ow(this);$APP.l($APP.l(this,"__xFileDownloadRefs"),"anchor-el").addEventListener("click",c);this.__xFileDownloadHandlers={click:c};return nw(this)};b.disconnectedCallback=function(){return pw(this)};b.attributeChangedCallback=function(){return nw(this)};return a},uw=function(){return $APP.r(customElements.get("x-file-download"))?null:customElements.define("x-file-download",
|
|
9
|
+
tw())},kw=new $APP.M(null,"filename-raw","filename-raw",-706184256),jw=new $APP.M(null,"href-raw","href-raw",-1680949453),lw=new $APP.M(null,"filename","filename",-1428840783);var sw=["href","filename","disabled","aria-label"];$APP.ka("baredom.exports.x_file_download.init",uw);export const init=uw;
|
package/dist/x-form-field.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
e=$APP.l(b,"hint");b=$APP.l(b,"error");var g=$APP.
|
|
4
|
-
g=$APP.
|
|
5
|
-
"string"&&$APP.
|
|
6
|
-
$APP.
|
|
7
|
-
|
|
8
|
-
if($APP.
|
|
9
|
-
null;return}}return null},
|
|
10
|
-
enumerable:!0,get:function(){var b=$APP.l(this,"__xFormFieldRefs");if($APP.
|
|
11
|
-
"label","label");
|
|
2
|
+
var IN=function(a,b,c){return $APP.r(c)?a.setAttribute(b,""):a.removeAttribute(b)},JN=function(a,b,c){var d=a.hasAttribute("error");var e=a.getAttribute("error");e=$APP.r(e)?e:"";a=a.hasAttribute("required");var g=c.value;return $APP.r(d)?b.setValidity({customError:!0},e,c):$APP.r($APP.r(a)?$APP.D.i(g,""):a)?b.setValidity({valueMissing:!0},"Please fill in this field.",c):b.setValidity({},"",c)},LN=function(a){var b=$APP.l(a,"__xFormFieldRefs");if($APP.r(b)){var c=$APP.l(b,"label"),d=$APP.l(b,"input"),
|
|
3
|
+
e=$APP.l(b,"hint");b=$APP.l(b,"error");var g=$APP.Q([$APP.Oh,$APP.Ek,$APP.ci,$APP.wi,$APP.Rk,$APP.sh,$APP.cj,$APP.vl,$APP.Nh,$APP.Uh,$APP.ii],[a.getAttribute("label"),a.getAttribute("name"),a.getAttribute("error"),a.getAttribute("hint"),a.hasAttribute("disabled"),a.hasAttribute("required"),a.hasAttribute("readonly"),a.getAttribute("value"),a.getAttribute("autocomplete"),a.getAttribute("type"),a.getAttribute("placeholder")]);var h=$APP.N(g),k=$APP.G(h,$APP.ii),m=$APP.G(h,$APP.Oh),p=$APP.G(h,$APP.Ek);
|
|
4
|
+
g=$APP.G(h,$APP.ci);var q=$APP.G(h,$APP.wi),w=$APP.G(h,$APP.Rk),x=$APP.G(h,$APP.sh),y=$APP.G(h,$APP.cj),A=$APP.G(h,$APP.vl),C=$APP.G(h,$APP.Nh),E=$APP.G(h,$APP.Uh);h=$APP.r(g)?g:"";var H=$APP.r(q)?q:"",F=$APP.r(m)?m:"",K=[$APP.Lh,$APP.Sl,$APP.rl,$APP.Sh,$APP.Si,$APP.ui,$APP.Hk,$APP.Z,$APP.jk,$APP.$k,$APP.T,$APP.Zh,$APP.bl,$APP.W];x=$APP.I(x);y=$APP.I(y);k=$APP.r(k)?k:"";q=typeof q==="string"&&$APP.O(q,"")&&q!=null;p=$APP.r(p)?p:"";A=$APP.r(A)?A:"";m=typeof m==="string"&&$APP.O(m,"")&&m!=null;E=typeof E===
|
|
5
|
+
"string"&&$APP.J(KN,E)?E:"text";g=$APP.Q(K,[x,y,k,q,p,A,m,E,typeof g==="string"&&$APP.O(g,"")&&g!=null,H,F,h,$APP.r(C)?C:"",$APP.I(w)]);w=$APP.jk.g(g);C=$APP.Sh.g(g);h=$APP.Hk.g(g);d.type=$APP.Z.g(g);d.name=$APP.Si.g(g);d.placeholder=$APP.rl.g(g);d.disabled=$APP.W.g(g);d.readOnly=$APP.Sl.g(g);d.required=$APP.Lh.g(g);d.autocomplete=$APP.bl.g(g);H=$APP.r($APP.Lh.g(g))?"true":"false";d.setAttribute("aria-required",H);d.setAttribute("aria-invalid",$APP.r(w)?"true":"false");H=$APP.r($APP.r(C)?w:C)?"hint error":
|
|
6
|
+
$APP.r(C)?"hint":$APP.r(w)?"error":null;$APP.r(H)?d.setAttribute("aria-describedby",H):d.removeAttribute("aria-describedby");c.textContent=$APP.T.g(g);$APP.r(h)?c.classList.remove("label-hidden"):c.classList.add("label-hidden");e.textContent=$APP.$k.g(g);$APP.r(C)?e.classList.remove("hint-hidden"):e.classList.add("hint-hidden");b.textContent=$APP.Zh.g(g);$APP.r(w)?b.classList.remove("error-hidden"):b.classList.add("error-hidden");IN(a,"data-invalid",w);c=$APP.l(a,"__xFormFieldInternals");return $APP.r(c)?
|
|
7
|
+
JN(a,c,d):null}return null},MN=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1}))},NN=function(a){return function(){var b=$APP.l(a,"__xFormFieldRefs");if($APP.r(b)){b=$APP.l(b,"input");var c=b.value;var d=a.getAttribute("name");d=$APP.r(d)?d:"";var e=$APP.l(a,"__xFormFieldInternals");$APP.r(e)&&(e.setFormValue(c),JN(a,e,b));return MN(a,"x-form-field-input",{name:d,value:c})}return null}},ON=function(a){return function(){var b=$APP.l(a,"__xFormFieldRefs");
|
|
8
|
+
if($APP.r(b)){b=$APP.l(b,"input");var c=b.value;var d=a.getAttribute("name");d=$APP.r(d)?d:"";var e=$APP.l(a,"__xFormFieldInternals");$APP.r(e)&&(e.setFormValue(c),JN(a,e,b));return MN(a,"x-form-field-change",{name:d,value:c})}return null}},PN=function(a){var b=$APP.l(a,"__xFormFieldRefs");if($APP.r(b)){var c=$APP.l(a,"__xFormFieldHandlers");if($APP.r(c)){b=$APP.l(b,"input");b.removeEventListener("input",$APP.l(c,"input"));b.removeEventListener("change",$APP.l(c,"change"));a.__xFormFieldHandlers=
|
|
9
|
+
null;return}}return null},QN=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.r(d)?d:""},set:function(d){d!=null&&$APP.O(d)?(d=""+$APP.S.g(d),d=this.setAttribute(c,d)):d=this.removeAttribute(c);return d}})},RN=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return IN(this,c,$APP.I(d))}})},SN=function(a){Object.defineProperty(a,"value",{configurable:!0,
|
|
10
|
+
enumerable:!0,get:function(){var b=$APP.l(this,"__xFormFieldRefs");if($APP.r(b))return $APP.l(b,"input").value;b=this.getAttribute("value");return $APP.r(b)?b:""},set:function(b){b=b!=null&&$APP.O(b)?""+$APP.S.g(b):"";this.setAttribute("value",b);var c=$APP.l(this,"__xFormFieldRefs");return $APP.r(c)?$APP.l(c,"input").value=b:null}})},UN=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;Object.defineProperty(a,"observedAttributes",{get:function(){return TN}});SN(b);QN(b,
|
|
11
|
+
"label","label");QN(b,"type","type");QN(b,"name","name");QN(b,"placeholder","placeholder");QN(b,"autocomplete","autocomplete");RN(b,"disabled","disabled");RN(b,"readOnly","readonly");RN(b,"required","required");b.connectedCallback=function(){if(!$APP.r($APP.l(this,"__xFormFieldRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("div"),g=document.createElement("label"),h=document.createElement("div"),k=document.createElement("input"),m=document.createElement("span"),
|
|
12
12
|
p=document.createElement("span");d.textContent=":host{display:block;color-scheme:light dark;--x-form-field-label-color:#374151;--x-form-field-label-font-size:0.875rem;--x-form-field-input-bg:#ffffff;--x-form-field-input-color:#111827;--x-form-field-input-border:1px solid #d1d5db;--x-form-field-input-border-radius:6px;--x-form-field-input-padding:0.5rem 0.75rem;--x-form-field-focus-ring-color:#2563eb;--x-form-field-error-color:#dc2626;--x-form-field-hint-color:#6b7280;--x-form-field-disabled-opacity:0.45;}@media (prefers-color-scheme:dark){:host{--x-form-field-label-color:#d1d5db;--x-form-field-input-bg:#1f2937;--x-form-field-input-color:#f9fafb;--x-form-field-input-border:1px solid #4b5563;--x-form-field-focus-ring-color:#3b82f6;--x-form-field-error-color:#f87171;--x-form-field-hint-color:#9ca3af;}}[part\x3dfield]{display:flex;flex-direction:column;gap:0.25rem;}[part\x3dlabel]{display:block;font-size:var(--x-form-field-label-font-size);font-weight:500;color:var(--x-form-field-label-color);}.label-hidden{display:none;}[part\x3dinput-wrapper]{display:block;}[part\x3dinput]{display:block;width:100%;box-sizing:border-box;padding:var(--x-form-field-input-padding);background:var(--x-form-field-input-bg);color:var(--x-form-field-input-color);border:var(--x-form-field-input-border);border-radius:var(--x-form-field-input-border-radius);font-size:1rem;line-height:1.5;font-family:inherit;outline:none;transition:border-color 120ms ease,box-shadow 120ms ease;}[part\x3dinput]:focus{border-color:var(--x-form-field-focus-ring-color);box-shadow:0 0 0 3px color-mix(in srgb,var(--x-form-field-focus-ring-color) 20%,transparent);}:host([data-invalid]) [part\x3dinput]{border-color:var(--x-form-field-error-color);}:host([data-invalid]) [part\x3dinput]:focus{box-shadow:0 0 0 3px color-mix(in srgb,var(--x-form-field-error-color) 20%,transparent);}[part\x3dinput]:disabled{opacity:var(--x-form-field-disabled-opacity);cursor:not-allowed;}[part\x3dhint]{display:block;font-size:0.8125rem;color:var(--x-form-field-hint-color);}.hint-hidden{display:none;}[part\x3derror]{display:block;font-size:0.8125rem;color:var(--x-form-field-error-color);}.error-hidden{display:none;}@media (prefers-reduced-motion:reduce){[part\x3dinput]{transition:none;}}";
|
|
13
13
|
e.setAttribute("part","field");g.setAttribute("part","label");g.setAttribute("id","label");g.setAttribute("for","input");h.setAttribute("part","input-wrapper");k.setAttribute("part","input");k.setAttribute("id","input");k.setAttribute("aria-labelledby","label");m.setAttribute("part","hint");m.setAttribute("id","hint");m.setAttribute("aria-live","polite");p.setAttribute("part","error");p.setAttribute("id","error");p.setAttribute("role","alert");p.setAttribute("aria-live","assertive");h.appendChild(k);
|
|
14
|
-
e.appendChild(g);e.appendChild(h);e.appendChild(m);e.appendChild(p);c.appendChild(d);c.appendChild(e);this.__xFormFieldRefs={field:e,label:g,input:k,hint:m,error:p};$APP.
|
|
15
|
-
"__xFormFieldRefs");$APP.
|
|
16
|
-
return
|
|
17
|
-
$APP.
|
|
18
|
-
$APP.
|
|
14
|
+
e.appendChild(g);e.appendChild(h);e.appendChild(m);e.appendChild(p);c.appendChild(d);c.appendChild(e);this.__xFormFieldRefs={field:e,label:g,input:k,hint:m,error:p};$APP.r(this.attachInternals)&&(this.__xFormFieldInternals=this.attachInternals())}PN(this);c=$APP.l(this,"__xFormFieldRefs");$APP.r(c)&&(c=$APP.l(c,"input"),d=this.getAttribute("value"),$APP.r(d)&&(c.value=d));c=$APP.l(this,"__xFormFieldInternals");$APP.r(c)&&(d=c.setFormValue,e=this.getAttribute("value"),d.call(c,$APP.r(e)?e:""));c=$APP.l(this,
|
|
15
|
+
"__xFormFieldRefs");$APP.r(c)&&(c=$APP.l(c,"input"),d=NN(this),e=ON(this),c.addEventListener("input",d),c.addEventListener("change",e),this.__xFormFieldHandlers={input:d,change:e});return LN(this)};b.disconnectedCallback=function(){return PN(this)};b.attributeChangedCallback=function(c,d,e){$APP.D.i(c,"value")&&(c=$APP.l(this,"__xFormFieldRefs"),$APP.r(c)&&(c=$APP.l(c,"input"),$APP.O(c.value,e)&&(c.value=$APP.r(e)?e:"")));return LN(this)};b.formDisabledCallback=function(c){IN(this,"disabled",$APP.I(c));
|
|
16
|
+
return LN(this)};b.formResetCallback=function(){this.removeAttribute("value");var c=$APP.l(this,"__xFormFieldRefs");$APP.r(c)&&($APP.l(c,"input").value="");c=$APP.l(this,"__xFormFieldInternals");$APP.r(c)&&c.setFormValue("");return LN(this)};return a},VN=function(){return $APP.r(customElements.get("x-form-field"))?null:customElements.define("x-form-field",UN())};var TN="label type name value placeholder hint error disabled readonly required autocomplete".split(" "),KN=new $APP.R(null,new $APP.P(null,6,["url",null,"tel",null,"email",null,"text",null,"number",null,"password",null],null),null);
|
|
17
|
+
$APP.Q([$APP.rl,$APP.gj,$APP.Si,$APP.ui,$APP.Ti,$APP.Z,$APP.T,$APP.bl,$APP.Kj],[new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"placeholder"],null),new $APP.P(null,2,[$APP.Z,$APP.qj,$APP.Oj,"disabled"],null),new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"name"],null),new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"value"],null),new $APP.P(null,2,[$APP.Z,$APP.qj,$APP.Oj,"readonly"],null),new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"type"],null),new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"label"],null),new $APP.P(null,2,
|
|
18
|
+
[$APP.Z,$APP.Y,$APP.Oj,"autocomplete"],null),new $APP.P(null,2,[$APP.Z,$APP.qj,$APP.Oj,"required"],null)]);$APP.ka("baredom.exports.x_form_field.init",VN);export const init=VN;
|
package/dist/x-form.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
if($APP.
|
|
4
|
-
(b[g]=function(){var m=e.value;return $APP.
|
|
5
|
-
k=g.length,m=0;;)if(m<k){var p=g[m];$APP.
|
|
6
|
-
var h=$APP.l(a,"__xFormRefs");if($APP.
|
|
7
|
-
b.removeEventListener("reset",$APP.l(c,"reset"));a.removeEventListener("click",$APP.l(c,"click"));a.__xFormHandlers=null;return}}return null},
|
|
8
|
-
b:""},set:function(b){return b!=null&&$APP.O(b)?
|
|
9
|
-
d.textContent=":host{display:block;}[part\x3droot]{display:flex;flex-direction:column;gap:var(--x-form-gap,1rem);width:var(--x-form-width,100%);}:host([loading]){pointer-events:none;opacity:0.6;}";e.setAttribute("part","root");e.setAttribute("novalidate","");e.appendChild(g);c.appendChild(d);c.appendChild(e);this.__xFormRefs={form:e}}
|
|
10
|
-
$APP.l(this,"__xFormRefs");return $APP.
|
|
11
|
-
e+=1;else return null};return a},
|
|
2
|
+
var MJ=function(a,b){return a.setAttribute("autocomplete",b)},RJ=function(a){a=new $APP.P(null,3,[NJ,a.getAttribute("loading"),OJ,$APP.r(a.hasAttribute("novalidate"))?"":null,$APP.Nh,a.getAttribute("autocomplete")],null);var b=$APP.N(a),c=$APP.G(b,NJ);a=$APP.G(b,OJ);b=$APP.G(b,$APP.Nh);c=c!=null&&$APP.O(c,"false");b=$APP.J(PJ,b)?b:"on";return new $APP.P(null,3,[$APP.Yh,c,QJ,a!=null,$APP.bl,b],null)},SJ=function(a){var b=$APP.l(a,"__xFormRefs");if($APP.r(b)){b=$APP.l(b,"form");a=RJ(a);MJ(b,$APP.bl.g(a));
|
|
3
|
+
if($APP.r($APP.Yh.g(a)))return b.setAttribute("aria-busy","true"),b.setAttribute("data-loading","");b.removeAttribute("aria-busy");return b.removeAttribute("data-loading")}return null},TJ=function(a){a=a.querySelectorAll("[name]:not([disabled])");for(var b={},c=a.length,d=0;;)if(d<c){var e=a[d],g=e.name;if($APP.r(function(){var m=g;return $APP.r(m)?$APP.O(g,""):m}())){var h=e.tagName.toLowerCase(),k=e.getAttribute("type");$APP.D.i(k,"checkbox")||$APP.D.i(k,"radio")||$APP.D.i(h,"x-checkbox")?$APP.r(e.checked)&&
|
|
4
|
+
(b[g]=function(){var m=e.value;return $APP.r(m)?m:"on"}()):b[g]=function(){var m=e.value;return $APP.r(m)?m:""}()}d+=1}else break;return b},UJ=function(a,b,c,d){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:d}))},VJ=function(a){var b=$APP.l(a,"__xFormRefs");if($APP.r(b)){b=$APP.l(b,"form");var c=function(g){g.preventDefault();g=RJ(a);if($APP.r($APP.Yh.g(g)))g=null;else{g=QJ.g(g);if(!$APP.r(g)){g=a.querySelectorAll("[name]:not([disabled])");for(var h={ok:!0},
|
|
5
|
+
k=g.length,m=0;;)if(m<k){var p=g[m];$APP.r(p.reportValidity)&&($APP.r(p.reportValidity())||(h.ok=!1));m+=1}else break;g=h.ok}$APP.r(g)?(g=TJ(a),g=UJ(a,"x-form-submit",{values:g},!0)):g=null}return g},d=function(){for(var g=a.querySelectorAll("[name]"),h=g.length,k=0;;)if(k<h){var m=g[k];$APP.r(m.formResetCallback)&&m.formResetCallback();k+=1}else break;return UJ(a,"x-form-reset",{},!1)},e=function(g){a:{g=g.target.closest("button,input[type\x3dsubmit],input[type\x3dreset]");if($APP.r(g)){g=g.type;
|
|
6
|
+
var h=$APP.l(a,"__xFormRefs");if($APP.r(h)){h=$APP.l(h,"form");g=$APP.D.i(g,"submit")||$APP.D.i(g,"")?h.requestSubmit():$APP.D.i(g,"reset")?h.reset():null;break a}}g=null}return g};b.addEventListener("submit",c);b.addEventListener("reset",d);a.addEventListener("click",e);$APP.n(a,"__xFormHandlers",{submit:c,reset:d,click:e})}},WJ=function(a){var b=$APP.l(a,"__xFormRefs");if($APP.r(b)){var c=$APP.l(a,"__xFormHandlers");if($APP.r(c)){b=$APP.l(b,"form");b.removeEventListener("submit",$APP.l(c,"submit"));
|
|
7
|
+
b.removeEventListener("reset",$APP.l(c,"reset"));a.removeEventListener("click",$APP.l(c,"click"));a.__xFormHandlers=null;return}}return null},XJ=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return $APP.I(d)?this.setAttribute(c,""):this.removeAttribute(c)}})},YJ=function(a){Object.defineProperty(a,"autocomplete",{configurable:!0,enumerable:!0,get:function(){var b=this.getAttribute("autocomplete");return $APP.r(b)?
|
|
8
|
+
b:""},set:function(b){return b!=null&&$APP.O(b)?MJ(this,""+$APP.S.g(b)):this.removeAttribute("autocomplete")}})},$J=function(){var a=class extends HTMLElement{},b=a.prototype;Object.defineProperty(a,"observedAttributes",{get:function(){return ZJ}});XJ(b,"loading","loading");XJ(b,"novalidate","novalidate");YJ(b);b.connectedCallback=function(){if(!$APP.r(this.shadowRoot)){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("form"),g=document.createElement("slot");
|
|
9
|
+
d.textContent=":host{display:block;}[part\x3droot]{display:flex;flex-direction:column;gap:var(--x-form-gap,1rem);width:var(--x-form-width,100%);}:host([loading]){pointer-events:none;opacity:0.6;}";e.setAttribute("part","root");e.setAttribute("novalidate","");e.appendChild(g);c.appendChild(d);c.appendChild(e);this.__xFormRefs={form:e}}WJ(this);VJ(this);return SJ(this)};b.disconnectedCallback=function(){return WJ(this)};b.attributeChangedCallback=function(){return SJ(this)};b.submit=function(){var c=
|
|
10
|
+
$APP.l(this,"__xFormRefs");return $APP.r(c)?$APP.l(c,"form").requestSubmit():null};b.reset=function(){var c=$APP.l(this,"__xFormRefs");return $APP.r(c)?$APP.l(c,"form").reset():null};b.setFieldError=function(c,d){c=this.querySelector('[name\x3d"'+$APP.S.g(c)+'"]');return $APP.r(c)?d==null||$APP.D.i(d,"")||$APP.D.i(d,void 0)?c.removeAttribute("error"):c.setAttribute("error",d):null};b.clearErrors=function(){for(var c=this.querySelectorAll("[error]"),d=c.length,e=0;;)if(e<d)c[e].removeAttribute("error"),
|
|
11
|
+
e+=1;else return null};return a},aK=function(){return $APP.r(customElements.get("x-form"))?null:customElements.define("x-form",$J())},OJ=new $APP.M(null,"novalidate-raw","novalidate-raw",1783236714),NJ=new $APP.M(null,"loading-raw","loading-raw",-1707143099),QJ=new $APP.M(null,"novalidate?","novalidate?",491529885);var ZJ=["loading","novalidate","autocomplete"],PJ=new $APP.R(null,new $APP.P(null,2,["off",null,"on",null],null),null);$APP.ka("baredom.exports.x_form.init",aK);export const init=aK;
|
package/dist/x-gaussian-blur.js
CHANGED
|
@@ -1,33 +1,20 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"string"&&$APP.O("",F)?this.setAttribute(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
$APP.
|
|
18
|
-
$APP.
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
3],++A;A=new $APP.Hb(D,0,null)}return p.call(this,r,v,x,A)}function p(r,v,x,y){r=$APP.wd(b,r,v,x,y);return a.g?a.g(r):a.call(null,r)}m.P=3;m.K=function(r){var v=$APP.w(r);r=$APP.z(r);var x=$APP.w(r);r=$APP.z(r);var y=$APP.w(r);r=$APP.Lb(r);return p(v,x,y,r)};m.B=p;return m}();h=function(m,p,r,v){switch(arguments.length){case 0:return g.call(this);case 1:return e.call(this,m);case 2:return d.call(this,m,p);case 3:return c.call(this,m,p,r);default:var x=null;if(arguments.length>3){x=0;for(var y=Array(arguments.length-
|
|
22
|
-
3);x<y.length;)y[x]=arguments[x+3],++x;x=new $APP.Hb(y,0,null)}return k.B(m,p,r,x)}throw Error("Invalid arity: "+arguments.length);};h.P=3;h.K=k.K;h.G=g;h.g=e;h.h=d;h.m=c;h.B=k.B;return h}()};
|
|
23
|
-
tK.m=function(a,b,c){return function(){function d(p,r,v){p=c.m?c.m(p,r,v):c.call(null,p,r,v);p=b.g?b.g(p):b.call(null,p);return a.g?a.g(p):a.call(null,p)}function e(p,r){p=c.h?c.h(p,r):c.call(null,p,r);p=b.g?b.g(p):b.call(null,p);return a.g?a.g(p):a.call(null,p)}function g(p){p=c.g?c.g(p):c.call(null,p);p=b.g?b.g(p):b.call(null,p);return a.g?a.g(p):a.call(null,p)}function h(){var p=c.G?c.G():c.call(null);p=b.g?b.g(p):b.call(null,p);return a.g?a.g(p):a.call(null,p)}var k=null,m=function(){function p(v,
|
|
24
|
-
x,y,A){var D=null;if(arguments.length>3){D=0;for(var G=Array(arguments.length-3);D<G.length;)G[D]=arguments[D+3],++D;D=new $APP.Hb(G,0,null)}return r.call(this,v,x,y,D)}function r(v,x,y,A){v=$APP.wd(c,v,x,y,A);v=b.g?b.g(v):b.call(null,v);return a.g?a.g(v):a.call(null,v)}p.P=3;p.K=function(v){var x=$APP.w(v);v=$APP.z(v);var y=$APP.w(v);v=$APP.z(v);var A=$APP.w(v);v=$APP.Lb(v);return r(x,y,A,v)};p.B=r;return p}();k=function(p,r,v,x){switch(arguments.length){case 0:return h.call(this);case 1:return g.call(this,
|
|
25
|
-
p);case 2:return e.call(this,p,r);case 3:return d.call(this,p,r,v);default:var y=null;if(arguments.length>3){y=0;for(var A=Array(arguments.length-3);y<A.length;)A[y]=arguments[y+3],++y;y=new $APP.Hb(A,0,null)}return m.B(p,r,v,y)}throw Error("Invalid arity: "+arguments.length);};k.P=3;k.K=m.K;k.G=h;k.g=g;k.h=e;k.m=d;k.B=m.B;return k}()};
|
|
26
|
-
tK.B=function(a,b,c,d){var e=VJ($APP.Zc(a,$APP.Zc(b,$APP.Zc(c,d))));return function(){function g(k){var m=null;if(arguments.length>0){m=0;for(var p=Array(arguments.length-0);m<p.length;)p[m]=arguments[m+0],++m;m=new $APP.Hb(p,0,null)}return h.call(this,m)}function h(k){k=$APP.td($APP.w(e),k);for(var m=$APP.z(e);;)if(m){var p=$APP.w(m);k=p.g?p.g(k):p.call(null,k);m=$APP.z(m)}else return k}g.P=0;g.K=function(k){k=$APP.u(k);return h(k)};g.B=h;return g}()};
|
|
27
|
-
tK.K=function(a){var b=$APP.w(a),c=$APP.z(a);a=$APP.w(c);var d=$APP.z(c);c=$APP.w(d);d=$APP.z(d);return this.B(b,a,c,d)};tK.P=3;
|
|
28
|
-
var dK=new $APP.M(null,"blur","blur",-453500461),bK=new $APP.M(null,"paused","paused",-1710376127),mK=new $APP.M(null,"size-pct","size-pct",-741809955),kK=new $APP.M(null,"speed-s","speed-s",-1018350546),WJ=new $APP.M(null,"anim-index","anim-index",-1563021855),cK=new $APP.M(null,"colors","colors",1157174732),YJ=new $APP.M(null,"delay-factor","delay-factor",-751650178),lK=new $APP.M(null,"blobs","blobs",-1606355916),XJ=new $APP.M(null,"duration-factor","duration-factor",-409465019),eK=new $APP.M(null,
|
|
29
|
-
"blend","blend",249565561);var qK="colors blur speed count size opacity animation blend paused".split(" ");
|
|
30
|
-
$APP.gf([bK,$APP.ej,$APP.uj,cK,$APP.Qg,dK,$APP.Fh,$APP.Yg,eK],[new $APP.Q(null,2,[$APP.Z,$APP.Yj,$APP.T,"paused"],null),new $APP.Q(null,2,[$APP.Z,$APP.X,$APP.T,"animation"],null),new $APP.Q(null,2,[$APP.Z,$APP.X,$APP.T,"speed"],null),new $APP.Q(null,2,[$APP.Z,$APP.X,$APP.T,"colors"],null),new $APP.Q(null,2,[$APP.Z,$APP.X,$APP.T,"size"],null),new $APP.Q(null,2,[$APP.Z,$APP.X,$APP.T,"blur"],null),new $APP.Q(null,2,[$APP.Z,$APP.X,$APP.T,"opacity"],null),new $APP.Q(null,2,[$APP.Z,$APP.X,$APP.T,"count"],
|
|
31
|
-
null),new $APP.Q(null,2,[$APP.Z,$APP.X,$APP.T,"blend"],null)]);
|
|
32
|
-
var iK=new $APP.R(null,new $APP.Q(null,3,["float",null,"none",null,"pulse",null],null),null),jK=new $APP.R(null,new $APP.Q(null,5,["soft-light",null,"multiply",null,"screen",null,"normal",null,"overlay",null],null),null),hK=new $APP.Q(null,3,["slow",18,"medium",10,"fast",5],null),gK=new $APP.Q(null,3,["small",30,"medium",50,"large",70],null),fK=function fK(a){return typeof a==="string"&&$APP.O("",a.trim())?(a=a.trim().split(/,/),$APP.Ee.m($APP.Nd,tK.h($APP.Jd.g(function(c){return c.trim()}),UJ(function(c){return $APP.O("",
|
|
33
|
-
c)})),a)):fK.g?fK.g("#6366f1, #ec4899, #14b8a6, #f59e0b"):fK.call(null,"#6366f1, #ec4899, #14b8a6, #f59e0b")};$APP.ja("baredom.exports.x_gaussian_blur.init",sK);export const init=sK;
|
|
2
|
+
var zP=function(a,b,c){var d=$APP.B(a);return $APP.af.o($APP.ie,$APP.de.g(function(e){var g=e*2.39996323,h=50+30*Math.cos(g);g=50+30*Math.sin(g);var k=10*Math.sin(e*2.39996323),m=10*Math.cos(e*Math.PI),p=Math.sin(e*1.618);p=.7+p*p*.6;var q=.8+.4*Math.sin(e*1.3),w=-(e/$APP.Yg.i(b,1));return new $APP.P(null,7,[$APP.fj,$APP.rc(a,$APP.hd(e,d)),$APP.Ok,h+k,$APP.Nk,g+m,$APP.rh,c*p,wP,$APP.hd(e,4),xP,q,yP,w],null)}),$APP.kg(0,b))},AP=function(a){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),
|
|
3
|
+
d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("slot");c.textContent=":host{display:block;position:relative;width:100%;height:100%;overflow:hidden;box-sizing:border-box;color-scheme:light dark;--x-gaussian-blur-bg:transparent;--x-gaussian-blur-z-index:0;--x-gaussian-blur-border-radius:0;}:host{border-radius:var(--x-gaussian-blur-border-radius);}[part\x3dbackdrop]{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:var(--x-gaussian-blur-z-index);background:var(--x-gaussian-blur-bg);}[part\x3dcontent]{position:relative;z-index:1;width:100%;height:100%;}.blob{position:absolute;border-radius:50%;will-change:transform;pointer-events:none;}@keyframes x-gb-float-0{0%,100%{transform:translate(-50%,-50%) translate(0,0);}25%{transform:translate(-50%,-50%) translate(12%,-18%);}50%{transform:translate(-50%,-50%) translate(-10%,15%);}75%{transform:translate(-50%,-50%) translate(15%,6%);}}@keyframes x-gb-float-1{0%,100%{transform:translate(-50%,-50%) translate(0,0);}25%{transform:translate(-50%,-50%) translate(-15%,10%);}50%{transform:translate(-50%,-50%) translate(18%,-12%);}75%{transform:translate(-50%,-50%) translate(-8%,-16%);}}@keyframes x-gb-float-2{0%,100%{transform:translate(-50%,-50%) translate(0,0);}25%{transform:translate(-50%,-50%) translate(10%,16%);}50%{transform:translate(-50%,-50%) translate(-18%,-8%);}75%{transform:translate(-50%,-50%) translate(14%,-12%);}}@keyframes x-gb-float-3{0%,100%{transform:translate(-50%,-50%) translate(0,0);}25%{transform:translate(-50%,-50%) translate(-12%,-10%);}50%{transform:translate(-50%,-50%) translate(16%,18%);}75%{transform:translate(-50%,-50%) translate(-10%,14%);}}@keyframes x-gb-pulse-0{0%,100%{transform:translate(-50%,-50%) scale(1) translate(0,0);}33%{transform:translate(-50%,-50%) scale(1.2) translate(10%,-14%);}66%{transform:translate(-50%,-50%) scale(0.85) translate(-10%,10%);}}@keyframes x-gb-pulse-1{0%,100%{transform:translate(-50%,-50%) scale(1) translate(0,0);}33%{transform:translate(-50%,-50%) scale(0.85) translate(-14%,10%);}66%{transform:translate(-50%,-50%) scale(1.2) translate(12%,-8%);}}@keyframes x-gb-pulse-2{0%,100%{transform:translate(-50%,-50%) scale(1) translate(0,0);}33%{transform:translate(-50%,-50%) scale(1.18) translate(8%,16%);}66%{transform:translate(-50%,-50%) scale(0.82) translate(-16%,-10%);}}@keyframes x-gb-pulse-3{0%,100%{transform:translate(-50%,-50%) scale(1) translate(0,0);}33%{transform:translate(-50%,-50%) scale(0.88) translate(-10%,-14%);}66%{transform:translate(-50%,-50%) scale(1.15) translate(10%,16%);}}:host([data-paused]) .blob{animation-play-state:paused;}@media (prefers-reduced-motion:reduce){.blob{animation:none!important;}}";
|
|
4
|
+
d.setAttribute("part","backdrop");d.setAttribute("aria-hidden","true");e.setAttribute("part","content");e.appendChild(g);b.appendChild(c);b.appendChild(d);b.appendChild(e);a.__xGaussianBlurBackdrop=d;a.__xGaussianBlurSlot=g;a.__xGaussianBlurBlobs=[];a.__xGaussianBlurInit=!0},BP=function(a,b){if($APP.r($APP.r(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=
|
|
5
|
+
$APP.Q([CP,$APP.Oi,$APP.Yi,$APP.ql,$APP.rh,$APP.Jh,$APP.Ph,$APP.vh,DP],[a.getAttribute("paused"),a.getAttribute("animation"),a.getAttribute("speed"),a.getAttribute("colors"),a.getAttribute("size"),a.getAttribute("blur"),a.getAttribute("opacity"),a.getAttribute("count"),a.getAttribute("blend")]);var c=$APP.N(b);b=$APP.G(c,DP);var d=$APP.G(c,CP),e=$APP.G(c,$APP.Oi),g=$APP.G(c,$APP.Yi);var h=$APP.G(c,$APP.ql);var k=$APP.G(c,$APP.rh),m=$APP.G(c,$APP.Jh),p=$APP.G(c,$APP.Ph);c=$APP.G(c,$APP.vh);h=EP(h);
|
|
6
|
+
typeof c==="string"&&$APP.O("",c.trim())?(c=parseInt(c.trim(),10),c=$APP.r(isFinite(c))?$APP.Zg.i(12,$APP.Yg.i(1,c)):5):c=5;if(typeof k==="string"&&$APP.O("",k.trim())){k=k.trim();var q=$APP.G(FP,k);$APP.r(q)?k=q:(k=parseFloat(k),q=isFinite(k),k=$APP.r($APP.r(q)?k>0:q)?$APP.Zg.i(100,$APP.Yg.i(10,k)):50)}else k=50;typeof g==="string"&&$APP.O("",g.trim())?(g=g.trim(),q=$APP.G(GP,g),$APP.r(q)?g=q:(g=parseFloat(g),q=isFinite(g),g=$APP.r($APP.r(q)?g>0:q)?g:10)):g=10;e=typeof e==="string"&&$APP.J(HP,e)?
|
|
7
|
+
e:"float";d=d!=null;typeof m==="string"&&$APP.O("",m.trim())?(m=parseFloat(m.trim()),q=isFinite(m),m=$APP.r($APP.r(q)?m>0:q)?m:60):m=60;q=zP(h,c,k);typeof p==="string"&&$APP.O("",p.trim())?(p=parseFloat(p.trim()),p=$APP.r(isFinite(p))?$APP.Zg.i(1,$APP.Yg.i(0,p)):.7):p=.7;b=typeof b==="string"&&$APP.J(IP,b)?b:"normal";h=$APP.Q([CP,$APP.Oi,$APP.ql,JP,$APP.Jh,$APP.Fl,$APP.Ph,$APP.vh,DP,KP],[d,e,h,g,m,q,p,c,b,k]);b=$APP.N(h);p=$APP.G(b,$APP.Jh);c=$APP.G(b,$APP.Ph);m=$APP.G(b,DP);k=$APP.G(b,$APP.Oi);d=
|
|
8
|
+
$APP.G(b,CP);e=$APP.l(a,"__xGaussianBlurBackdrop");b=$APP.l(a,"__xGaussianBlurSlot");e.style.setProperty("filter","blur("+$APP.S.g(p)+"px)");e.style.setProperty("opacity",""+$APP.S.g(c));e.style.setProperty("mix-blend-mode",m);$APP.r(d)?a.setAttribute("data-paused",""):a.removeAttribute("data-paused");a.setAttribute("data-animation",k);a:{m=$APP.N(h);h=$APP.G(m,$APP.Fl);p=$APP.G(m,$APP.Oi);c=$APP.G(m,JP);$APP.G(m,$APP.Jh);d=$APP.l(a,"__xGaussianBlurBackdrop");m=$APP.l(a,"__xGaussianBlurBlobs");e=
|
|
9
|
+
m.length;k=$APP.B(h);for(g=e;;)if(g<k)q=document.createElement("div"),q.className="blob",d.appendChild(q),m.push(q),g+=1;else break;for(;;)if(e>k)g=m.pop(),d.removeChild(g),--e;else break;for(d=0;;)if(d<k){var w=m[d];q=$APP.rc(h,d);g=p;e=c;var x=$APP.N(q),y=$APP.G(x,$APP.fj),A=$APP.G(x,$APP.Ok),C=$APP.G(x,$APP.Nk),E=$APP.G(x,$APP.rh),H=$APP.G(x,wP);q=$APP.G(x,xP);x=$APP.G(x,yP);w=w.style;E=""+$APP.S.g(E)+"%";w.setProperty("left",""+$APP.S.g(A)+"%");w.setProperty("top",""+$APP.S.g(C)+"%");w.setProperty("width",
|
|
10
|
+
E);w.setProperty("height",E);w.setProperty("background","radial-gradient(circle,"+$APP.S.g(y)+" 0%,transparent 70%)");w.setProperty("transform","translate(-50%,-50%)");b:switch(y=H,g){case "float":g="x-gb-float-"+$APP.S.g(y);break b;case "pulse":g="x-gb-pulse-"+$APP.S.g(y);break b;default:g=null}$APP.r(g)?(q*=e,e*=x,w.setProperty("animation",""+$APP.S.g(g)+" "+$APP.S.g(q)+"s ease-in-out "+$APP.S.g(e)+"s infinite")):w.removeProperty("animation");d+=1}else break a}BP(a,b)},MP=function(a){function b(){return BP(a,
|
|
11
|
+
c)}$APP.r($APP.l(a,"__xGaussianBlurInit"))||AP(a);var c=$APP.l(a,"__xGaussianBlurSlot");a.__xGaussianBlurSlotHandler=b;c.addEventListener("slotchange",b);LP(a)},NP=function(a){for(var b=$APP.u(new $APP.ve(null,8,5,$APP.we,[new $APP.ve(null,3,5,$APP.we,["colors","colors","#6366f1, #ec4899, #14b8a6, #f59e0b"],null),new $APP.ve(null,3,5,$APP.we,["blur","blur","60"],null),new $APP.ve(null,3,5,$APP.we,["speed","speed","medium"],null),new $APP.ve(null,3,5,$APP.we,["count","count","5"],null),new $APP.ve(null,
|
|
12
|
+
3,5,$APP.we,["size","size","medium"],null),new $APP.ve(null,3,5,$APP.we,["opacity","opacity","0.7"],null),new $APP.ve(null,3,5,$APP.we,["animation","animation","float"],null),new $APP.ve(null,3,5,$APP.we,["blend","blend","normal"],null)],null)),c=null,d=0,e=0;;)if(e<d){var g=c.G(null,e),h=$APP.Cc(g,0,null),k=$APP.Cc(g,1,null),m=$APP.Cc(g,2,null);Object.defineProperty(a,h,{get:function(w,x,y,A,C,E,H,F){return function(){var K=this.getAttribute(H);return $APP.r(K)?K:F}}(b,c,d,e,g,h,k,m),set:function(w,
|
|
13
|
+
x,y,A,C,E,H){return function(F){return typeof F==="string"&&$APP.O("",F)?this.setAttribute(H,F):this.removeAttribute(H)}}(b,c,d,e,g,h,k,m),enumerable:!0,configurable:!0});e+=1}else if(h=$APP.u(b)){g=h;if($APP.Pc(g))b=$APP.yb(g),e=$APP.zb(g),c=b,d=$APP.B(b),b=e;else{k=$APP.v(g);m=$APP.Cc(k,0,null);var p=$APP.Cc(k,1,null),q=$APP.Cc(k,2,null);Object.defineProperty(a,m,{get:function(w,x,y,A,C,E,H,F){return function(){var K=this.getAttribute(H);return $APP.r(K)?K:F}}(b,c,d,e,k,m,p,q,g,h),set:function(w,
|
|
14
|
+
x,y,A,C,E,H){return function(F){return typeof F==="string"&&$APP.O("",F)?this.setAttribute(H,F):this.removeAttribute(H)}}(b,c,d,e,k,m,p,q,g,h),enumerable:!0,configurable:!0});b=$APP.z(g);c=null;d=0}e=0}else break;Object.defineProperty(a,"paused",{get:function(){return this.hasAttribute("paused")},set:function(w){return $APP.r(w)?this.setAttribute("paused",""):this.removeAttribute("paused")},enumerable:!0,configurable:!0})},PP=function(){var a=class extends HTMLElement{};a.observedAttributes=OP;a.prototype.connectedCallback=
|
|
15
|
+
function(){MP(this);return null};a.prototype.disconnectedCallback=function(){var b=$APP.l(this,"__xGaussianBlurSlot"),c=$APP.l(this,"__xGaussianBlurSlotHandler");$APP.r($APP.r(b)?c:b)&&b.removeEventListener("slotchange",c);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&$APP.r($APP.l(this,"__xGaussianBlurInit"))&&LP(this);return null};NP(a.prototype);return a},QP=function(){$APP.r(customElements.get("x-gaussian-blur"))||customElements.define("x-gaussian-blur",PP());
|
|
16
|
+
return null},JP=new $APP.M(null,"speed-s","speed-s",-1018350546),DP=new $APP.M(null,"blend","blend",249565561),CP=new $APP.M(null,"paused","paused",-1710376127),KP=new $APP.M(null,"size-pct","size-pct",-741809955),wP=new $APP.M(null,"anim-index","anim-index",-1563021855),yP=new $APP.M(null,"delay-factor","delay-factor",-751650178),xP=new $APP.M(null,"duration-factor","duration-factor",-409465019);var OP="colors blur speed count size opacity animation blend paused".split(" ");
|
|
17
|
+
$APP.Q([CP,$APP.Oi,$APP.Yi,$APP.ql,$APP.rh,$APP.Jh,$APP.Ph,$APP.vh,DP],[new $APP.P(null,2,[$APP.Z,$APP.qj,$APP.Oj,"paused"],null),new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"animation"],null),new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"speed"],null),new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"colors"],null),new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"size"],null),new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"blur"],null),new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"opacity"],null),new $APP.P(null,2,[$APP.Z,$APP.Y,
|
|
18
|
+
$APP.Oj,"count"],null),new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"blend"],null)]);
|
|
19
|
+
var HP=new $APP.R(null,new $APP.P(null,3,["float",null,"none",null,"pulse",null],null),null),IP=new $APP.R(null,new $APP.P(null,5,["soft-light",null,"multiply",null,"screen",null,"normal",null,"overlay",null],null),null),GP=new $APP.P(null,3,["slow",18,"medium",10,"fast",5],null),FP=new $APP.P(null,3,["small",30,"medium",50,"large",70],null),EP=function EP(a){return typeof a==="string"&&$APP.O("",a.trim())?(a=a.trim().split(/,/),$APP.af.o($APP.ie,$APP.$g.i($APP.de.g(function(c){return c.trim()}),
|
|
20
|
+
$APP.fe(function(c){return $APP.O("",c)})),a)):EP.g?EP.g("#6366f1, #ec4899, #14b8a6, #f59e0b"):EP.call(null,"#6366f1, #ec4899, #14b8a6, #f59e0b")};$APP.ka("baredom.exports.x_gaussian_blur.init",QP);export const init=QP;
|
package/dist/x-grid.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
a=$APP.
|
|
4
|
-
h,
|
|
5
|
-
c.setProperty("--x-grid-row-gap"
|
|
6
|
-
d.setAttribute("part","base");d.className="base";d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__x_grid_root=b;a.__x_grid_base=d;a.__x_grid_initialized=!0}
|
|
7
|
-
|
|
8
|
-
"row-gap-token",-219143816);var IC="columns min-column-size gap row-gap column-gap align-items justify-items auto-flow inline".split(" "),AC=new $APP.R(null,new $APP.Q(null,6,["none",null,"xs",null,"md",null,"lg",null,"xl",null,"sm",null],null),null),BC=new $APP.R(null,new $APP.Q(null,4,["center",null,"start",null,"stretch",null,"end",null],null),null),CC=new $APP.R(null,new $APP.Q(null,5,["column-dense",null,"row-dense",null,"dense",null,"column",null,"row",null],null),null);$APP.ja("baredom.exports.x_grid.init",KC);export const init=KC;
|
|
2
|
+
var KH=function(a){switch(a){case "none":return"0";case "xs":return"4px";case "sm":return"8px";case "md":return"16px";case "lg":return"24px";case "xl":return"32px";default:return"16px"}},LH=function(a,b,c){return $APP.J(b,a)?a:c},MH=function(a){switch(a){case "row-dense":return"row dense";case "column-dense":return"column dense";default:return a}},NH=function(a){return $APP.r($APP.r(a)?$APP.O("",a):a)?a:null},OH=function(a){return $APP.r($APP.r(a)?$APP.O("",a):a)?a:"16rem"},ZH=function(a){var b=$APP.N(a);
|
|
3
|
+
a=$APP.G(b,PH);var c=$APP.G(b,QH),d=$APP.G(b,$APP.ol),e=$APP.G(b,RH),g=$APP.G(b,SH),h=$APP.G(b,$APP.Sj),k=$APP.G(b,TH),m=$APP.G(b,$APP.Ki);b=$APP.G(b,$APP.oj);h=NH(h);k=OH(k);var p=LH(b,UH,"md");b=function(){var w=$APP.J(UH,d)?d:null;return $APP.r(w)?w:p}();var q=function(){var w=$APP.J(UH,m)?m:null;return $APP.r(w)?w:p}();g=LH(g,VH,"stretch");c=LH(c,VH,"stretch");e=MH(LH(e,WH,"row"));h=$APP.r(h)?h:"repeat(auto-fit,minmax("+$APP.S.g(k)+",1fr))";return $APP.Q([RH,SH,$APP.Sj,$APP.Ki,$APP.oj,XH,PH,YH,
|
|
4
|
+
$APP.ol,QH],[e,g,h,KH(q),p,b,$APP.I(a),q,KH(b),c])},$H=function(a){var b=$APP.Q([RH,SH,$APP.Sj,TH,$APP.Ki,$APP.oj,PH,$APP.ol,QH],[a.getAttribute("auto-flow"),a.getAttribute("align-items"),a.getAttribute("columns"),a.getAttribute("min-column-size"),a.getAttribute("column-gap"),a.getAttribute("gap"),a.hasAttribute("inline"),a.getAttribute("row-gap"),a.getAttribute("justify-items")]);b=ZH(b);a=$APP.l(a,"__x_grid_base");if($APP.r(a)){var c=a.style;a.setAttribute("data-gap",$APP.oj.g(b));c.setProperty("--x-grid-columns",
|
|
5
|
+
$APP.Sj.g(b));c.setProperty("--x-grid-row-gap",$APP.ol.g(b));c.setProperty("--x-grid-column-gap",$APP.Ki.g(b));c.setProperty("--x-grid-align-items",SH.g(b));c.setProperty("--x-grid-justify-items",QH.g(b));b=c.setProperty("--x-grid-auto-flow",RH.g(b))}else b=null;return b},aI=function(a){if($APP.l(a,"__x_grid_initialized")!==!0){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");c.textContent="\n :host {\n display:block;\n }\n\n :host([inline]) {\n display:inline-block;\n }\n\n .base {\n display:grid;\n box-sizing:border-box;\n grid-template-columns:var(--x-grid-columns);\n row-gap:var(--x-grid-row-gap);\n column-gap:var(--x-grid-column-gap);\n align-items:var(--x-grid-align-items);\n justify-items:var(--x-grid-justify-items);\n grid-auto-flow:var(--x-grid-auto-flow);\n }\n ";
|
|
6
|
+
d.setAttribute("part","base");d.className="base";d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__x_grid_root=b;a.__x_grid_base=d;a.__x_grid_initialized=!0}$H(a);return a},cI=function(){var a=class extends HTMLElement{};a.observedAttributes=bI;a.prototype.connectedCallback=function(){return aI(this)};a.prototype.attributeChangedCallback=function(){return $APP.l(this,"__x_grid_initialized")===!0?$H(this):aI(this)};return a},dI=function(){return $APP.r(customElements.get("x-grid"))?null:customElements.define("x-grid",
|
|
7
|
+
cI())},TH=new $APP.M(null,"min-column-size","min-column-size",-1066019378),PH=new $APP.M(null,"inline","inline",1399884222),YH=new $APP.M(null,"column-gap-token","column-gap-token",-10192833),SH=new $APP.M(null,"align-items","align-items",-267946462),XH=new $APP.M(null,"row-gap-token","row-gap-token",-219143816),RH=new $APP.M(null,"auto-flow","auto-flow",-1524521728),QH=new $APP.M(null,"justify-items","justify-items",1638310783);var bI="columns min-column-size gap row-gap column-gap align-items justify-items auto-flow inline".split(" "),UH=new $APP.R(null,new $APP.P(null,6,["none",null,"xs",null,"md",null,"lg",null,"xl",null,"sm",null],null),null),VH=new $APP.R(null,new $APP.P(null,4,["center",null,"start",null,"stretch",null,"end",null],null),null),WH=new $APP.R(null,new $APP.P(null,5,["column-dense",null,"row-dense",null,"dense",null,"column",null,"row",null],null),null);$APP.ka("baredom.exports.x_grid.init",dI);export const init=dI;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
+
var dU=function(a,b,c,d){if(typeof a==="string"){a=a.trim();if($APP.D.i(a,""))return b;a=parseFloat(a);return $APP.r(isNaN(a))?b:Math.min(d,Math.max(c,a))}return b},fU=function(a){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.J(eU,a)?a:"cursor"},iU=function(a){return typeof a==="string"?(a=$APP.af.o($APP.Xf,$APP.fe(function(b){return $APP.J(gU,b)}),a.trim().toLowerCase().split(/\s+/)),$APP.Jc(a)?hU:a):hU},jU=function(a){return typeof a==="string"?(a=a.trim(),$APP.D.i(a,"")?null:a):
|
|
3
|
+
null},kU=function(a,b,c,d,e,g,h){b=c+(g*(b-a)-h*c)/e*d;return[a+b*d,b]},lU=function(a,b){if(a>=b)return 0;a=1-a/b;return a*a},mU=function(a,b,c,d,e,g,h,k,m,p,q){a*=c;d=$APP.J(b,"bulge")?d+a*(e-d):d;g=$APP.J(b,"stretch")?g+a*(h-g):g;k=$APP.J(b,"lean")?m+a*(k-m):m;b=$APP.J(b,"breathe")?p+a*(q-p):p;return[d,g,k,b]},nU=function(){return $APP.I(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},zU=function(a){a=$APP.Q([$APP.Xi,$APP.Mj,oU,pU,qU,$APP.qh,$APP.Bk,rU,$APP.$i,sU],[a.getAttribute("mass"),
|
|
4
|
+
a.getAttribute("intensity"),a.getAttribute("trigger"),a.getAttribute("per-char"),a.getAttribute("font-family"),a.getAttribute("text"),a.getAttribute("mode"),a.getAttribute("friction"),a.getAttribute("radius"),a.getAttribute("tension")]);var b=$APP.N(a);a=$APP.G(b,$APP.$i);var c=$APP.G(b,sU),d=$APP.G(b,$APP.Xi),e=$APP.G(b,$APP.Mj),g=$APP.G(b,pU),h=$APP.G(b,oU),k=$APP.G(b,qU),m=$APP.G(b,$APP.qh),p=$APP.G(b,$APP.Bk);b=$APP.G(b,rU);return $APP.Q([$APP.sl,tU,uU,$APP.Il,$APP.Gj,vU,wU,xU,yU,$APP.Gk],[dU(d,
|
|
5
|
+
1,.1,10),dU(c,170,10,500),iU(p),dU(a,200,20,1E3),dU(e,.5,0,1),g!=null,dU(b,26,1,100),fU(h),jU(k),typeof m==="string"?m:""])},AU=function(a,b){if(typeof a==="string"){a=a.trim();if($APP.D.i(a,""))return b;a=parseFloat(a);return $APP.r(isNaN(a))?b:a}return b},BU=function(a,b,c){a=a.style;var d=a.setProperty;b="'wght' "+$APP.S.g(b[0].toFixed(1))+", 'wdth' "+$APP.S.g(b[1].toFixed(1))+", 'slnt' "+$APP.S.g(b[2].toFixed(1))+", 'opsz' "+$APP.S.g(b[3].toFixed(1));d.call(a,"font-variation-settings",b);c===
|
|
6
|
+
0?a.removeProperty("transform"):a.setProperty("transform","skewX("+$APP.S.g(c.toFixed(1))+"deg)")},DU=function(a){$APP.r($APP.l(a,"__xKineticFontRaf"))||($APP.r($APP.l(a,"__xKineticFontAct"))||(a.__xKineticFontAct=!0,a.dispatchEvent(new CustomEvent("x-kinetic-font-spring-activate",{bubbles:!0,composed:!0,detail:{}}))),$APP.n(a,"__xKineticFontLF",performance.now()),$APP.n(a,"__xKineticFontRaf",requestAnimationFrame(function(){return CU(a)})))},EU=function(a){var b=window.scrollY,c=b-function(){var d=
|
|
7
|
+
$APP.l(a,"__xKineticFontLSY");return $APP.r(d)?d:b}();a.__xKineticFontLSY=b;$APP.n(a,"__xKineticFontSD",function(){var d=$APP.l(a,"__xKineticFontSD");return $APP.r(d)?d:0}()+Math.abs(c));nU()||DU(a);return null},FU=function(a){var b=xU.g($APP.l(a,"__xKineticFontModel")),c={};if($APP.D.i(b,"cursor")||$APP.D.i(b,"both")){var d=function(e){a.__xKineticFontMX=e.clientX;a.__xKineticFontMY=e.clientY;nU()||DU(a);return null};c.move=d;document.addEventListener("mousemove",d,{passive:!0})}if($APP.D.i(b,"scroll")||
|
|
8
|
+
$APP.D.i(b,"both"))b=function(){return EU(a)},c.scroll=b,a.__xKineticFontLSY=window.scrollY,window.addEventListener("scroll",b,{passive:!0});a.__xKineticFontHdl=c},GU=function(a){var b=$APP.l(a,"__xKineticFontHdl");if($APP.r(b)){var c=$APP.l(b,"move");$APP.r(c)&&document.removeEventListener("mousemove",c);b=$APP.l(b,"scroll");$APP.r(b)&&window.removeEventListener("scroll",b);a.__xKineticFontHdl=null}},RU=function(a,b){var c=$APP.l(a,"__xKineticFontModel");a.__xKineticFontModel=b;if($APP.O($APP.Gk.g(b),
|
|
9
|
+
$APP.Gk.g(c))||$APP.O(vU.g(b),vU.g(c)))if($APP.r(vU.g(b))){var d=$APP.Gk.g(b),e=$APP.N($APP.l(a,"__xKineticFontRefs"));e=$APP.G(e,$APP.Zi);d=$APP.Be(d);var g=$APP.B(d),h=Array(g),k=Array(g);e.textContent="";for(var m=0;;)if(m<g){var p=$APP.rc(d,m),q=document.createElement("span");q.setAttribute("part","char");$APP.D.i(p," ")?(q.setAttribute("data-ws",""),q.innerHTML="\x26nbsp;"):q.textContent=p;e.appendChild(q);h[m]=q;k[m]=[0,0];m+=1}else break;a.__xKineticFontCS=h;a.__xKineticFontSpr=k}else e=$APP.Gk.g(b),
|
|
10
|
+
d=$APP.N($APP.l(a,"__xKineticFontRefs")),$APP.G(d,$APP.Zi).textContent=e,a.__xKineticFontCS=null,a.__xKineticFontSpr=[[0,0]];$APP.O(xU.g(b),xU.g(c))&&(GU(a),FU(a));c=$APP.N($APP.l(a,"__xKineticFontRefs"));c=$APP.G(c,$APP.Zi);e=yU.g(b);$APP.r(e)?c.style.setProperty("font-family",e):c.style.removeProperty("font-family");c=getComputedStyle(a);c=$APP.Q([HU,IU,JU,KU,LU,MU,NU,OU,PU],[AU(c.getPropertyValue("--x-kinetic-font-slant-max"),0),AU(c.getPropertyValue("--x-kinetic-font-slant-min"),-12),AU(c.getPropertyValue("--x-kinetic-font-opsz-max"),
|
|
11
|
+
144),AU(c.getPropertyValue("--x-kinetic-font-opsz-min"),8),AU(c.getPropertyValue("--x-kinetic-font-weight-min"),100),AU(c.getPropertyValue("--x-kinetic-font-skew-max"),-15),AU(c.getPropertyValue("--x-kinetic-font-width-max"),125),AU(c.getPropertyValue("--x-kinetic-font-width-min"),75),AU(c.getPropertyValue("--x-kinetic-font-weight-max"),900)]);a.__xKineticFontCV=c;c=$APP.Gk.g(b);e=$APP.N($APP.l(a,"__xKineticFontRefs"));$APP.G(e,QU).textContent=c;$APP.D.i(c,"")?(a.setAttribute("aria-hidden","true"),
|
|
12
|
+
a.removeAttribute("role")):(a.removeAttribute("aria-hidden"),a.setAttribute("role","text"),a.setAttribute("aria-label",c));if(!nU())if(c=$APP.l(a,"__xKineticFontCV"),c=mU(0,uU.g(b),$APP.Gj.g(b),LU.g(c),PU.g(c),OU.g(c),NU.g(c),IU.g(c),HU.g(c),KU.g(c),JU.g(c)),$APP.r(vU.g(b))){if(a=$APP.l(a,"__xKineticFontCS"),$APP.r(a))for(b=a.length,e=0;;)if(e<b)BU(a[e],c,0),e+=1;else break}else a=$APP.N($APP.l(a,"__xKineticFontRefs")),a=$APP.G(a,$APP.Zi),BU(a,c,0)},SU=function(a){Object.defineProperty(a,"text",{get:function(){var b=
|
|
13
|
+
this.getAttribute("text");return $APP.r(b)?b:""},set:function(b){return b==null?this.removeAttribute("text"):this.setAttribute("text",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"trigger",{get:function(){return fU(this.getAttribute("trigger"))},set:function(b){return b==null?this.removeAttribute("trigger"):this.setAttribute("trigger",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"mode",{get:function(){var b=this.getAttribute("mode");return $APP.r(b)?
|
|
14
|
+
b:"bulge"},set:function(b){return b==null?this.removeAttribute("mode"):this.setAttribute("mode",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"perChar",{get:function(){return this.hasAttribute("per-char")},set:function(b){return $APP.r(b)?this.setAttribute("per-char",""):this.removeAttribute("per-char")},enumerable:!0,configurable:!0});Object.defineProperty(a,"mass",{get:function(){var b=this.getAttribute("mass");return dU(b,1,.1,10)},set:function(b){return b==null?this.removeAttribute("mass"):
|
|
15
|
+
this.setAttribute("mass",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"tension",{get:function(){var b=this.getAttribute("tension");return dU(b,170,10,500)},set:function(b){return b==null?this.removeAttribute("tension"):this.setAttribute("tension",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"friction",{get:function(){var b=this.getAttribute("friction");return dU(b,26,1,100)},set:function(b){return b==null?this.removeAttribute("friction"):this.setAttribute("friction",
|
|
16
|
+
""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"intensity",{get:function(){var b=this.getAttribute("intensity");return dU(b,.5,0,1)},set:function(b){return b==null?this.removeAttribute("intensity"):this.setAttribute("intensity",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"radius",{get:function(){var b=this.getAttribute("radius");return dU(b,200,20,1E3)},set:function(b){return b==null?this.removeAttribute("radius"):this.setAttribute("radius",""+
|
|
17
|
+
$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"fontFamily",{get:function(){return jU(this.getAttribute("font-family"))},set:function(b){return b==null?this.removeAttribute("font-family"):this.setAttribute("font-family",""+$APP.S.g(b))},enumerable:!0,configurable:!0})},VU=function(){var a=class extends HTMLElement{};a.observedAttributes=TU;a.prototype.connectedCallback=function(){if(!$APP.r($APP.l(this,"__xKineticFontRefs"))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style"),
|
|
18
|
+
d=document.createElement("div"),e=document.createElement("span");c.textContent=UU;d.setAttribute("part","container");e.setAttribute("class","sr-only");e.setAttribute("part","sr-only");b.appendChild(c);b.appendChild(d);b.appendChild(e);this.__xKineticFontRefs=new $APP.P(null,3,[$APP.bi,b,$APP.Zi,d,QU,e],null)}b=zU(this);this.__xKineticFontModel=null;this.__xKineticFontSD=this.__xKineticFontMY=this.__xKineticFontMX=0;this.__xKineticFontAct=!1;RU(this,b);return null};a.prototype.disconnectedCallback=
|
|
19
|
+
function(){var b=$APP.l(this,"__xKineticFontRaf");$APP.r(b)&&(cancelAnimationFrame(b),this.__xKineticFontRaf=null);GU(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&$APP.r($APP.l(this,"__xKineticFontRefs"))&&(b=zU(this),$APP.O(b,$APP.l(this,"__xKineticFontModel"))&&RU(this,b));return null};SU(a.prototype);return a},WU=function(){$APP.r(customElements.get("x-kinetic-font"))||customElements.define("x-kinetic-font",VU());return null},pU=new $APP.M(null,"per-char-attr",
|
|
20
|
+
"per-char-attr",-403667422),oU=new $APP.M(null,"trigger-raw","trigger-raw",-1649744606),IU=new $APP.M(null,"slnt-min","slnt-min",71363427),NU=new $APP.M(null,"wdth-max","wdth-max",-522030121),MU=new $APP.M(null,"skew-max","skew-max",1543858453),OU=new $APP.M(null,"wdth-min","wdth-min",-986627045),qU=new $APP.M(null,"font-family-raw","font-family-raw",1729457924),vU=new $APP.M(null,"per-char?","per-char?",-1016397834),xU=new $APP.M(null,"trigger","trigger",103466139),KU=new $APP.M(null,"opsz-min",
|
|
21
|
+
"opsz-min",-829837010),QU=new $APP.M(null,"sr-only","sr-only",-173275148),wU=new $APP.M(null,"friction","friction",-1603603910),HU=new $APP.M(null,"slnt-max","slnt-max",1716167520),rU=new $APP.M(null,"friction-raw","friction-raw",-1078184200),JU=new $APP.M(null,"opsz-max","opsz-max",454458088),LU=new $APP.M(null,"wght-min","wght-min",529224020),uU=new $APP.M(null,"modes","modes",-1377787092),PU=new $APP.M(null,"wght-max","wght-max",-514604421),sU=new $APP.M(null,"tension-raw","tension-raw",961657279),
|
|
22
|
+
yU=new $APP.M(null,"font-family","font-family",-667419874),tU=new $APP.M(null,"tension","tension",58343589);var TU="text trigger mode per-char mass tension friction intensity radius font-family".split(" ");
|
|
23
|
+
$APP.Q([$APP.sl,tU,$APP.Ri,new $APP.M(null,"perChar","perChar",2082880685),$APP.Il,$APP.Gj,new $APP.M(null,"fontFamily","fontFamily",1493518353),wU,xU,$APP.Gk],[new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.Y],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.Y],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,
|
|
24
|
+
$APP.Y],null),new $APP.P(null,1,[$APP.Z,$APP.Y],null)]);$APP.Sd(["x-kinetic-font-spring-activate",new $APP.P(null,2,[$APP.U,$APP.Td,$APP.kl,!1],null),"x-kinetic-font-spring-settle",new $APP.P(null,2,[$APP.U,$APP.Td,$APP.kl,!1],null)]);var eU=new $APP.R(null,new $APP.P(null,3,["scroll",null,"both",null,"cursor",null],null),null),gU=new $APP.R(null,new $APP.P(null,4,["breathe",null,"lean",null,"bulge",null,"stretch",null],null),null),hU=new $APP.R(null,new $APP.P(null,1,["bulge",null],null),null);var UU=":host{display:inline-block;box-sizing:border-box;color-scheme:light dark;"+$APP.S.g("--x-kinetic-font-color")+":currentColor;"+$APP.S.g("--x-kinetic-font-family")+":system-ui,sans-serif;"+$APP.S.g("--x-kinetic-font-size")+":2rem;"+$APP.S.g("--x-kinetic-font-weight-min")+":100;"+$APP.S.g("--x-kinetic-font-weight-max")+":900;"+$APP.S.g("--x-kinetic-font-width-min")+":75;"+$APP.S.g("--x-kinetic-font-width-max")+":125;"+$APP.S.g("--x-kinetic-font-slant-min")+":-12;"+$APP.S.g("--x-kinetic-font-slant-max")+
|
|
25
|
+
":0;"+$APP.S.g("--x-kinetic-font-opsz-min")+":8;"+$APP.S.g("--x-kinetic-font-opsz-max")+":144;"+$APP.S.g("--x-kinetic-font-skew-max")+":-15;}[part\x3dcontainer]{color:var("+$APP.S.g("--x-kinetic-font-color")+",currentColor);font-family:var("+$APP.S.g("--x-kinetic-font-family")+",system-ui,sans-serif);font-size:var("+$APP.S.g("--x-kinetic-font-size")+",2rem);line-height:1.2;will-change:font-variation-settings,transform;}[part\x3dchar]{display:inline-block;will-change:font-variation-settings,transform;}[part\x3dchar][data-ws]{white-space:pre;}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}@media(prefers-reduced-motion:reduce){[part\x3dcontainer],[part\x3dchar]{font-variation-settings:normal!important;will-change:auto;}}",
|
|
26
|
+
CU=function CU(a){if($APP.r(a.isConnected)){var c=$APP.l(a,"__xKineticFontModel"),d=$APP.l(a,"__xKineticFontCV"),e=performance.now(),g=Math.min(e-$APP.l(a,"__xKineticFontLF"),100)/1E3,h=$APP.sl.g(c),k=tU.g(c),m=wU.g(c),p=$APP.Gj.g(c),q=$APP.Il.g(c),w=xU.g(c);c=uU.g(c);var x=LU.g(d),y=PU.g(d),A=OU.g(d),C=NU.g(d),E=IU.g(d),H=HU.g(d),F=KU.g(d),K=JU.g(d);d=MU.g(d);var X=$APP.J(c,"lean"),da=$APP.l(a,"__xKineticFontMX"),sa=$APP.l(a,"__xKineticFontMY"),Ga=function(){var vb=$APP.l(a,"__xKineticFontSD");return $APP.r(vb)?
|
|
27
|
+
vb:0}(),Na=Math.min(1,Math.abs(Ga)/100),Xa=$APP.l(a,"__xKineticFontSpr"),Ya=$APP.l(a,"__xKineticFontCS"),ib=Ya!=null,Lb=Xa.length;a.__xKineticFontLF=e;a.__xKineticFontSD=Ga*.85;for(var ab=new $APP.ae(!0),gc=0;;)if(gc<Lb){Ga=ib&&($APP.D.i(w,"cursor")||$APP.D.i(w,"both"))?function(){var vb=Ya[gc].getBoundingClientRect(),kd=da-(vb.left+.5*vb.width);vb=sa-(vb.top+.5*vb.height);return Math.max(lU(Math.sqrt(kd*kd+vb*vb),q),Na)}():ib&&$APP.D.i(w,"scroll")?Na:ib||!$APP.D.i(w,"cursor")&&!$APP.D.i(w,"both")?
|
|
28
|
+
$APP.D.i(w,"scroll")?Na:0:function(){var vb=$APP.N($APP.l(a,"__xKineticFontRefs")),kd=$APP.G(vb,$APP.Zi).getBoundingClientRect();vb=da-(kd.left+.5*kd.width);kd=sa-(kd.top+.5*kd.height);return Math.max(lU(Math.sqrt(vb*vb+kd*kd),q),Na)}();var Tb=Xa[gc],Wc=kU(Tb[0],Ga,Tb[1],g,h,k,m);e=Wc[0];Wc=Wc[1];Tb[0]=e;Tb[1]=Wc;Math.abs(e-Ga)<.001&&Math.abs(Wc)<.01||$APP.Ab(ab,!1);Ga=mU(e,c,p,x,y,A,C,E,H,F,K);e=X?e*p*d:0;ib?BU(Ya[gc],Ga,e):(Tb=$APP.N($APP.l(a,"__xKineticFontRefs")),Tb=$APP.G(Tb,$APP.Zi),BU(Tb,Ga,
|
|
29
|
+
e));gc+=1}else break;var Fe=function(){var vb=$APP.l(a,"__xKineticFontSD");return $APP.r(vb)?vb:0}()>.5;$APP.r(function(){var vb=$APP.Ua(ab);return $APP.r(vb)?!Fe:vb}())?(a.__xKineticFontRaf=null,a.__xKineticFontSD=0,$APP.r($APP.l(a,"__xKineticFontAct"))&&(a.__xKineticFontAct=!1,a.dispatchEvent(new CustomEvent("x-kinetic-font-spring-settle",{bubbles:!0,composed:!0,detail:{}})))):$APP.n(a,"__xKineticFontRaf",requestAnimationFrame(function(){return CU.g?CU.g(a):CU.call(null,a)}))}return null};$APP.ka("baredom.exports.x_kinetic_font.init",WU);export const init=WU;
|