@vanelsas/baredom 1.4.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/CHANGELOG.md +28 -1
  2. package/README.md +57 -5
  3. package/dist/base.js +212 -212
  4. package/dist/x-alert.js +16 -16
  5. package/dist/x-avatar-group.js +11 -11
  6. package/dist/x-avatar.js +16 -16
  7. package/dist/x-badge.js +11 -11
  8. package/dist/x-bento-grid.js +5 -5
  9. package/dist/x-bento-item.js +4 -4
  10. package/dist/x-breadcrumbs.js +14 -14
  11. package/dist/x-button.js +15 -15
  12. package/dist/x-cancel-dialogue.js +16 -16
  13. package/dist/x-card.js +7 -7
  14. package/dist/x-chart.js +46 -46
  15. package/dist/x-checkbox.js +11 -11
  16. package/dist/x-chip.js +9 -9
  17. package/dist/x-collapse.js +11 -11
  18. package/dist/x-command-palette.js +29 -29
  19. package/dist/x-container.js +6 -6
  20. package/dist/x-context-menu.js +20 -19
  21. package/dist/x-copy.js +23 -23
  22. package/dist/x-currency-field.js +21 -21
  23. package/dist/x-date-picker.js +36 -36
  24. package/dist/x-divider.js +12 -12
  25. package/dist/x-drawer.js +11 -11
  26. package/dist/x-dropdown.js +10 -10
  27. package/dist/x-fieldset.js +6 -6
  28. package/dist/x-file-download.js +7 -7
  29. package/dist/x-form-field.js +16 -16
  30. package/dist/x-form.js +9 -9
  31. package/dist/x-gaussian-blur.js +18 -18
  32. package/dist/x-grid.js +6 -6
  33. package/dist/x-kinetic-font.js +27 -27
  34. package/dist/x-kinetic-typography.js +37 -37
  35. package/dist/x-liquid-dock.js +37 -37
  36. package/dist/x-liquid-fill.js +42 -42
  37. package/dist/x-liquid-glass.js +38 -38
  38. package/dist/x-menu-item.js +10 -10
  39. package/dist/x-menu.js +11 -11
  40. package/dist/x-metaball-cursor.js +28 -28
  41. package/dist/x-modal.js +11 -11
  42. package/dist/x-morph-stack.js +39 -39
  43. package/dist/x-navbar.js +13 -13
  44. package/dist/x-neural-glow.js +31 -31
  45. package/dist/x-notification-center.js +9 -9
  46. package/dist/x-organic-divider.js +17 -17
  47. package/dist/x-organic-progress.js +38 -38
  48. package/dist/x-organic-shape.js +12 -12
  49. package/dist/x-pagination.js +16 -16
  50. package/dist/x-popover.js +14 -14
  51. package/dist/x-progress-circle.js +9 -9
  52. package/dist/x-progress.js +9 -9
  53. package/dist/x-radio.js +12 -12
  54. package/dist/x-ripple-effect.js +11 -11
  55. package/dist/x-scroll-parallax.js +17 -17
  56. package/dist/x-scroll-stack.js +18 -18
  57. package/dist/x-scroll-story.js +34 -35
  58. package/dist/x-scroll-timeline.js +46 -49
  59. package/dist/x-scroll.js +39 -39
  60. package/dist/x-search-field.js +15 -15
  61. package/dist/x-select.js +10 -10
  62. package/dist/x-sidebar.js +17 -17
  63. package/dist/x-skeleton.js +5 -5
  64. package/dist/x-slider.js +16 -16
  65. package/dist/x-soft-body.js +21 -20
  66. package/dist/x-spacer.js +5 -5
  67. package/dist/x-spinner.js +6 -6
  68. package/dist/x-splash.js +14 -14
  69. package/dist/x-stat.js +11 -11
  70. package/dist/x-stepper.js +16 -16
  71. package/dist/x-switch.js +11 -11
  72. package/dist/x-tab.js +8 -8
  73. package/dist/x-table-cell.js +21 -21
  74. package/dist/x-table-row.js +10 -10
  75. package/dist/x-table.js +13 -13
  76. package/dist/x-tabs.js +11 -11
  77. package/dist/x-text-area.js +18 -18
  78. package/dist/x-theme.js +25 -0
  79. package/dist/x-timeline-item.js +21 -21
  80. package/dist/x-timeline.js +9 -9
  81. package/dist/x-toast.js +23 -23
  82. package/dist/x-toaster.js +8 -8
  83. package/dist/x-typography.js +11 -10
  84. package/package.json +6 -2
package/dist/x-slider.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var SD=function(a,b){return typeof a==="string"?(a=parseFloat(a),$APP.r(isNaN(a))?b:a):b},TD=function(a,b,c){return a.setAttribute(b,c)},UD=function(a,b,c){return $APP.r(c)?a.setAttribute(b,""):a.removeAttribute(b)},ZD=function(a){var b=$APP.l(a,"__xSliderRefs");if($APP.r(b)){var c=$APP.l(b,"base"),d=$APP.l(b,"header"),e=$APP.l(b,"label"),g=$APP.l(b,"value");b=$APP.l(b,"input");var h=$APP.Q([$APP.vj,$APP.gj,$APP.yj,$APP.Si,$APP.ui,$APP.Ti,$APP.sj,$APP.rh,$APP.Zj,$APP.T,$APP.Ol,$APP.Tk,VD],[a.getAttribute("min"),
3
- a.hasAttribute("disabled"),a.hasAttribute("show-value"),a.getAttribute("name"),a.getAttribute("value"),a.hasAttribute("readonly"),a.getAttribute("aria-labelledby"),a.getAttribute("size"),a.getAttribute("max"),a.getAttribute("label"),a.getAttribute("aria-describedby"),a.getAttribute("aria-label"),a.getAttribute("step")]);var k=$APP.N(h);h=$APP.G(k,$APP.Tk);var m=$APP.G(k,VD),p=$APP.G(k,$APP.vj),q=$APP.G(k,$APP.gj),w=$APP.G(k,$APP.yj),x=$APP.G(k,$APP.ui),y=$APP.G(k,$APP.Si),A=$APP.G(k,$APP.Ti),C=$APP.G(k,
4
- $APP.sj),E=$APP.G(k,$APP.rh),H=$APP.G(k,$APP.T),F=$APP.G(k,$APP.Zj);k=$APP.G(k,$APP.Ol);p=SD(p,0);F=SD(F,100);x=$APP.Zg.i($APP.Yg.i(SD(x,0),p),F);$APP.D.i(m,"any")?m="any":(m=typeof m==="string"?parseFloat(m):NaN,m=$APP.t(isNaN(m))&&m>0?""+$APP.S.g(m):"1");E=typeof E==="string"&&$APP.J(WD,E)?E:"md";q=$APP.I(q);A=$APP.I(A);w=$APP.I(w);var K=F>p?$APP.Zg.i($APP.Yg.i((x-p)/(F-p)*100,0),100):0;h=$APP.Q([$APP.vj,$APP.Sl,$APP.Si,$APP.ui,$APP.sj,XD,$APP.rh,$APP.Zj,$APP.T,$APP.Ol,$APP.Tk,$APP.W,VD,YD],[p,
5
- A,typeof y==="string"&&$APP.O("",y)?y:null,x,typeof C==="string"&&$APP.O("",C)?C:null,w,E,F,typeof H==="string"&&$APP.O("",H)?H:null,typeof k==="string"&&$APP.O("",k)?k:null,typeof h==="string"&&$APP.O("",h)?h:null,q,m,K]);m=$APP.N(h);y=$APP.G(m,$APP.Tk);C=$APP.G(m,$APP.W);H=$APP.G(m,VD);k=$APP.G(m,YD);w=$APP.G(m,$APP.vj);p=$APP.G(m,$APP.Sl);h=$APP.G(m,$APP.ui);A=$APP.G(m,$APP.sj);F=$APP.G(m,XD);q=$APP.G(m,$APP.rh);x=$APP.G(m,$APP.T);E=$APP.G(m,$APP.Zj);m=$APP.G(m,$APP.Ol);K=(K=x!=null)?K:F;c.setAttribute("data-size",
6
- q);UD(a,"data-disabled",C);UD(a,"data-readonly",p);d.style.display=$APP.r(K)?"flex":"none";e.textContent=$APP.r(x)?x:"";e.style.display=x!=null?"":"none";g.textContent=$APP.r(F)?""+$APP.S.g(h):"";g.style.display=$APP.r(F)?"":"none";a.style.setProperty("--_x-slider-fill",""+$APP.S.g(k.toFixed(2))+"%");TD(b,"min",""+$APP.S.g(w));TD(b,"max",""+$APP.S.g(E));b.setAttribute("step",H);$APP.O(b.value,""+$APP.S.g(h))&&(b.value=""+$APP.S.g(h));TD(b,"aria-valuemin",""+$APP.S.g(w));TD(b,"aria-valuemax",""+$APP.S.g(E));
7
- TD(b,"aria-valuenow",""+$APP.S.g(h));b.setAttribute("aria-readonly",$APP.r(p)?"true":"false");$APP.r(y)?b.setAttribute("aria-label",y):x!=null?b.setAttribute("aria-label",x):b.removeAttribute("aria-label");$APP.r(A)?b.setAttribute("aria-labelledby",A):b.removeAttribute("aria-labelledby");$APP.r(m)?b.setAttribute("aria-describedby",m):b.removeAttribute("aria-describedby");$APP.r(C)?b.setAttribute("disabled",""):b.removeAttribute("disabled");a=$APP.l(a,"__xSliderInternals");return $APP.r(a)?a.setFormValue(""+
8
- $APP.S.g(h)):null}return null},$D=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1}))},aE=function(a){return function(){if($APP.r(a.hasAttribute("disabled")))return null;var b=$APP.l($APP.l(a,"__xSliderRefs"),"input").value,c=parseFloat(b),d=parseFloat(function(){var g=a.getAttribute("min");return $APP.r(g)?g:"0"}()),e=parseFloat(function(){var g=a.getAttribute("max");return $APP.r(g)?g:"100"}());a.setAttribute("value",b);return $D(a,"x-slider-input",
9
- {value:c,min:d,max:e})}},bE=function(a){return function(){if($APP.r(a.hasAttribute("disabled")))return null;var b=parseFloat($APP.l($APP.l(a,"__xSliderRefs"),"input").value),c=parseFloat(function(){var e=a.getAttribute("min");return $APP.r(e)?e:"0"}()),d=parseFloat(function(){var e=a.getAttribute("max");return $APP.r(e)?e:"100"}());return $D(a,"x-slider-change",{value:b,min:c,max:d})}},dE=function(a){return function(b){var c=a.hasAttribute("readonly");c=$APP.r(c)?$APP.J(cE,b.key):c;return $APP.r(c)?
10
- b.preventDefault():null}},eE=function(a){var b=$APP.l(a,"__xSliderRefs");if($APP.r(b)){var c=$APP.l(a,"__xSliderHandlers");if($APP.r(c)){b=$APP.l(b,"input");b.removeEventListener("input",$APP.l(c,"input"));b.removeEventListener("change",$APP.l(c,"change"));b.removeEventListener("keydown",$APP.l(c,"keydown"));a.__xSliderHandlers=null;return}}return null},fE=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return UD(this,
11
- c,$APP.I(d))}})},gE=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.r(d)?d:null},set:function(d){return d!=null&&$APP.O(d)?TD(this,c,""+$APP.S.g(d)):this.removeAttribute(c)}})},iE=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;Object.defineProperty(a,"observedAttributes",{get:function(){return hE}});fE(b,"disabled","disabled");fE(b,"readOnly","readonly");fE(b,"showValue","show-value");gE(b,
12
- "value","value");gE(b,"min","min");gE(b,"max","max");gE(b,"step","step");gE(b,"name","name");gE(b,"label","label");gE(b,"size","size");b.connectedCallback=function(){if(!$APP.r($APP.l(this,"__xSliderRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("span"),k=document.createElement("span"),m=document.createElement("input");d.textContent=":host{display:block;color-scheme:light dark;--x-slider-track-color:rgba(0,0,0,0.15);--x-slider-fill-color:#3b82f6;--x-slider-thumb-color:#ffffff;--x-slider-thumb-border:2px solid #3b82f6;--x-slider-thumb-shadow:0 1px 4px rgba(0,0,0,0.20);--x-slider-focus-ring:#60a5fa;--x-slider-disabled-opacity:0.45;--x-slider-label-color:rgba(0,0,0,0.60);--x-slider-value-color:rgba(0,0,0,0.50);--x-slider-radius:9999px;}@media (prefers-color-scheme:dark){:host{--x-slider-track-color:rgba(255,255,255,0.15);--x-slider-fill-color:#3b82f6;--x-slider-thumb-color:#ffffff;--x-slider-thumb-border:2px solid #3b82f6;--x-slider-focus-ring:#93c5fd;--x-slider-label-color:rgba(255,255,255,0.60);--x-slider-value-color:rgba(255,255,255,0.50);}}[part\x3dbase]{width:100%;box-sizing:border-box;}[part\x3dbase][data-size\x3dsm]{--_x-slider-track-h:4px;--_x-slider-thumb-sz:14px;}[part\x3dbase][data-size\x3dmd]{--_x-slider-track-h:6px;--_x-slider-thumb-sz:18px;}[part\x3dbase][data-size\x3dlg]{--_x-slider-track-h:8px;--_x-slider-thumb-sz:22px;}[part\x3dheader]{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:4px;}[part\x3dlabel-text]{font-size:0.875rem;color:var(--x-slider-label-color);font-weight:500;}[part\x3dvalue-text]{font-size:0.8125rem;color:var(--x-slider-value-color);}[part\x3dinput]{-webkit-appearance:none;appearance:none;display:block;width:100%;height:var(--_x-slider-thumb-sz,18px);cursor:pointer;margin:0;padding:0;background:transparent;outline:none;box-sizing:border-box;}[part\x3dinput]::-webkit-slider-runnable-track{height:var(--_x-slider-track-h,6px);border-radius:var(--x-slider-radius);background:linear-gradient(to right,var(--x-slider-fill-color) var(--_x-slider-fill,0%),var(--x-slider-track-color) var(--_x-slider-fill,0%));}[part\x3dinput]::-moz-range-track{height:var(--_x-slider-track-h,6px);border-radius:var(--x-slider-radius);background:var(--x-slider-track-color);border:none;}[part\x3dinput]::-moz-range-progress{height:var(--_x-slider-track-h,6px);border-radius:var(--x-slider-radius);background:var(--x-slider-fill-color);}[part\x3dinput]::-webkit-slider-thumb{-webkit-appearance:none;width:var(--_x-slider-thumb-sz,18px);height:var(--_x-slider-thumb-sz,18px);border-radius:50%;background:var(--x-slider-thumb-color);border:var(--x-slider-thumb-border);box-shadow:var(--x-slider-thumb-shadow);margin-top:calc(var(--_x-slider-track-h,6px)/2 - var(--_x-slider-thumb-sz,18px)/2);cursor:pointer;transition:box-shadow 100ms ease;}[part\x3dinput]::-moz-range-thumb{width:var(--_x-slider-thumb-sz,18px);height:var(--_x-slider-thumb-sz,18px);border-radius:50%;background:var(--x-slider-thumb-color);border:var(--x-slider-thumb-border);box-shadow:var(--x-slider-thumb-shadow);cursor:pointer;transition:box-shadow 100ms ease;}[part\x3dinput]:focus-visible::-webkit-slider-thumb{box-shadow:var(--x-slider-thumb-shadow),0 0 0 3px var(--x-slider-focus-ring);}[part\x3dinput]:focus-visible::-moz-range-thumb{box-shadow:var(--x-slider-thumb-shadow),0 0 0 3px var(--x-slider-focus-ring);}:host([data-disabled]) [part\x3dinput]{opacity:var(--x-slider-disabled-opacity);cursor:default;pointer-events:none;}:host([data-readonly]) [part\x3dinput]{pointer-events:none;}@media (prefers-reduced-motion:reduce){[part\x3dinput]::-webkit-slider-thumb{transition:none;}[part\x3dinput]::-moz-range-thumb{transition:none;}}";
13
- e.setAttribute("part","base");g.setAttribute("part","header");h.setAttribute("part","label-text");k.setAttribute("part","value-text");m.setAttribute("part","input");m.setAttribute("type","range");g.appendChild(h);g.appendChild(k);e.appendChild(g);e.appendChild(m);c.appendChild(d);c.appendChild(e);this.__xSliderRefs={base:e,header:g,label:h,value:k,input:m};$APP.r(this.attachInternals)&&(this.__xSliderInternals=this.attachInternals())}eE(this);c=$APP.l(this,"__xSliderRefs");$APP.r(c)&&(c=$APP.l(c,
14
- "input"),d=aE(this),e=bE(this),g=dE(this),h={input:d,change:e,keydown:g},c.addEventListener("input",d),c.addEventListener("change",e),c.addEventListener("keydown",g),this.__xSliderHandlers=h);return ZD(this)};b.disconnectedCallback=function(){return eE(this)};b.attributeChangedCallback=function(){return ZD(this)};b.formDisabledCallback=function(c){UD(this,"disabled",$APP.I(c));return ZD(this)};b.formResetCallback=function(){TD(this,"value",""+$APP.S.g(0));return ZD(this)};return a},jE=function(){return $APP.r(customElements.get("x-slider"))?
15
- null:customElements.define("x-slider",iE())},XD=new $APP.M(null,"show-value?","show-value?",-1960833108),YD=new $APP.M(null,"fill-percent","fill-percent",-1813848228),VD=new $APP.M(null,"step","step",1288888124);var WD=new $APP.R(null,new $APP.P(null,3,["md",null,"lg",null,"sm",null],null),null),hE="value min max step disabled readonly name label show-value size aria-label aria-labelledby aria-describedby".split(" ");
16
- $APP.Q([$APP.vj,$APP.gj,$APP.th,$APP.Si,$APP.ui,$APP.rh,$APP.ml,$APP.Zj,$APP.T,VD],[new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"min"],null),new $APP.P(null,2,[$APP.Z,$APP.qj,$APP.Oj,"disabled"],null),new $APP.P(null,2,[$APP.Z,$APP.qj,$APP.Oj,"show-value"],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.Y,$APP.Oj,"size"],null),new $APP.P(null,2,[$APP.Z,$APP.qj,$APP.Oj,"readonly"],null),new $APP.P(null,
17
- 2,[$APP.Z,$APP.Y,$APP.Oj,"max"],null),new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"label"],null),new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"step"],null)]);$APP.Sd(["x-slider-input",new $APP.P(null,1,[$APP.U,new $APP.P(null,3,[$APP.ui,$APP.V,$APP.vj,$APP.V,$APP.Zj,$APP.V],null)],null),"x-slider-change",new $APP.P(null,1,[$APP.U,new $APP.P(null,3,[$APP.ui,$APP.V,$APP.vj,$APP.V,$APP.Zj,$APP.V],null)],null)]);var cE=new $APP.R(null,new $APP.P(null,8,["PageDown",null,"ArrowUp",null,"ArrowDown",null,"End",null,"ArrowRight",null,"ArrowLeft",null,"PageUp",null,"Home",null],null),null);$APP.ka("baredom.exports.x_slider.init",jE);export const init=jE;
2
+ var xE=function(a,b){return typeof a==="string"?(a=parseFloat(a),$APP.r(isNaN(a))?b:a):b},yE=function(a,b,c){return a.setAttribute(b,c)},zE=function(a,b,c){return $APP.r(c)?a.setAttribute(b,""):a.removeAttribute(b)},EE=function(a){var b=$APP.l(a,"__xSliderRefs");if($APP.r(b)){var c=$APP.l(b,"base"),d=$APP.l(b,"header"),e=$APP.l(b,"label"),g=$APP.l(b,"value");b=$APP.l(b,"input");var h=$APP.Q([$APP.vj,$APP.gj,$APP.yj,$APP.Si,$APP.ri,$APP.Ti,$APP.sj,$APP.rh,$APP.ak,$APP.T,$APP.Pl,$APP.Uk,AE],[a.getAttribute("min"),
3
+ a.hasAttribute("disabled"),a.hasAttribute("show-value"),a.getAttribute("name"),a.getAttribute("value"),a.hasAttribute("readonly"),a.getAttribute("aria-labelledby"),a.getAttribute("size"),a.getAttribute("max"),a.getAttribute("label"),a.getAttribute("aria-describedby"),a.getAttribute("aria-label"),a.getAttribute("step")]);var k=$APP.N(h);h=$APP.G(k,$APP.Uk);var m=$APP.G(k,AE),p=$APP.G(k,$APP.vj),q=$APP.G(k,$APP.gj),w=$APP.G(k,$APP.yj),x=$APP.G(k,$APP.ri),y=$APP.G(k,$APP.Si),A=$APP.G(k,$APP.Ti),B=$APP.G(k,
4
+ $APP.sj),E=$APP.G(k,$APP.rh),H=$APP.G(k,$APP.T),F=$APP.G(k,$APP.ak);k=$APP.G(k,$APP.Pl);p=xE(p,0);F=xE(F,100);x=$APP.Zg.i($APP.Yg.i(xE(x,0),p),F);$APP.D.i(m,"any")?m="any":(m=typeof m==="string"?parseFloat(m):NaN,m=$APP.t(isNaN(m))&&m>0?""+$APP.S.g(m):"1");E=typeof E==="string"&&$APP.J(BE,E)?E:"md";q=$APP.I(q);A=$APP.I(A);w=$APP.I(w);var M=F>p?$APP.Zg.i($APP.Yg.i((x-p)/(F-p)*100,0),100):0;h=$APP.Q([$APP.vj,$APP.Tl,$APP.Si,$APP.ri,$APP.sj,CE,$APP.rh,$APP.ak,$APP.T,$APP.Pl,$APP.Uk,$APP.W,AE,DE],[p,
5
+ A,typeof y==="string"&&$APP.O("",y)?y:null,x,typeof B==="string"&&$APP.O("",B)?B:null,w,E,F,typeof H==="string"&&$APP.O("",H)?H:null,typeof k==="string"&&$APP.O("",k)?k:null,typeof h==="string"&&$APP.O("",h)?h:null,q,m,M]);m=$APP.N(h);y=$APP.G(m,$APP.Uk);B=$APP.G(m,$APP.W);H=$APP.G(m,AE);k=$APP.G(m,DE);w=$APP.G(m,$APP.vj);p=$APP.G(m,$APP.Tl);h=$APP.G(m,$APP.ri);A=$APP.G(m,$APP.sj);F=$APP.G(m,CE);q=$APP.G(m,$APP.rh);x=$APP.G(m,$APP.T);E=$APP.G(m,$APP.ak);m=$APP.G(m,$APP.Pl);M=(M=x!=null)?M:F;c.setAttribute("data-size",
6
+ q);zE(a,"data-disabled",B);zE(a,"data-readonly",p);d.style.display=$APP.r(M)?"flex":"none";e.textContent=$APP.r(x)?x:"";e.style.display=x!=null?"":"none";g.textContent=$APP.r(F)?""+$APP.S.g(h):"";g.style.display=$APP.r(F)?"":"none";a.style.setProperty("--_x-slider-fill",""+$APP.S.g(k.toFixed(2))+"%");yE(b,"min",""+$APP.S.g(w));yE(b,"max",""+$APP.S.g(E));b.setAttribute("step",H);$APP.O(b.value,""+$APP.S.g(h))&&(b.value=""+$APP.S.g(h));yE(b,"aria-valuemin",""+$APP.S.g(w));yE(b,"aria-valuemax",""+$APP.S.g(E));
7
+ yE(b,"aria-valuenow",""+$APP.S.g(h));b.setAttribute("aria-readonly",$APP.r(p)?"true":"false");$APP.r(y)?b.setAttribute("aria-label",y):x!=null?b.setAttribute("aria-label",x):b.removeAttribute("aria-label");$APP.r(A)?b.setAttribute("aria-labelledby",A):b.removeAttribute("aria-labelledby");$APP.r(m)?b.setAttribute("aria-describedby",m):b.removeAttribute("aria-describedby");$APP.r(B)?b.setAttribute("disabled",""):b.removeAttribute("disabled");a=$APP.l(a,"__xSliderInternals");return $APP.r(a)?a.setFormValue(""+
8
+ $APP.S.g(h)):null}return null},FE=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1}))},GE=function(a){return function(){if($APP.r(a.hasAttribute("disabled")))return null;var b=$APP.l($APP.l(a,"__xSliderRefs"),"input").value,c=parseFloat(b),d=parseFloat(function(){var g=a.getAttribute("min");return $APP.r(g)?g:"0"}()),e=parseFloat(function(){var g=a.getAttribute("max");return $APP.r(g)?g:"100"}());a.setAttribute("value",b);return FE(a,"x-slider-input",
9
+ {value:c,min:d,max:e})}},HE=function(a){return function(){if($APP.r(a.hasAttribute("disabled")))return null;var b=parseFloat($APP.l($APP.l(a,"__xSliderRefs"),"input").value),c=parseFloat(function(){var e=a.getAttribute("min");return $APP.r(e)?e:"0"}()),d=parseFloat(function(){var e=a.getAttribute("max");return $APP.r(e)?e:"100"}());return FE(a,"x-slider-change",{value:b,min:c,max:d})}},JE=function(a){return function(b){var c=a.hasAttribute("readonly");c=$APP.r(c)?$APP.J(IE,b.key):c;return $APP.r(c)?
10
+ b.preventDefault():null}},KE=function(a){var b=$APP.l(a,"__xSliderRefs");if($APP.r(b)){var c=$APP.l(a,"__xSliderHandlers");if($APP.r(c)){b=$APP.l(b,"input");b.removeEventListener("input",$APP.l(c,"input"));b.removeEventListener("change",$APP.l(c,"change"));b.removeEventListener("keydown",$APP.l(c,"keydown"));a.__xSliderHandlers=null;return}}return null},LE=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return zE(this,
11
+ c,$APP.I(d))}})},ME=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.r(d)?d:null},set:function(d){return d!=null&&$APP.O(d)?yE(this,c,""+$APP.S.g(d)):this.removeAttribute(c)}})},OE=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;Object.defineProperty(a,"observedAttributes",{get:function(){return NE}});LE(b,"disabled","disabled");LE(b,"readOnly","readonly");LE(b,"showValue","show-value");ME(b,
12
+ "value","value");ME(b,"min","min");ME(b,"max","max");ME(b,"step","step");ME(b,"name","name");ME(b,"label","label");ME(b,"size","size");b.connectedCallback=function(){if(!$APP.r($APP.l(this,"__xSliderRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("span"),k=document.createElement("span"),m=document.createElement("input");d.textContent=":host{display:block;color-scheme:light dark;--x-slider-track-color:rgba(0,0,0,0.15);--x-slider-fill-color:var(--x-color-primary,#3b82f6);--x-slider-thumb-color:var(--x-color-surface,#ffffff);--x-slider-thumb-border:2px solid var(--x-color-primary,#3b82f6);--x-slider-thumb-shadow:0 1px 4px rgba(0,0,0,0.20);--x-slider-focus-ring:var(--x-color-focus-ring,#60a5fa);--x-slider-disabled-opacity:0.45;--x-slider-label-color:rgba(0,0,0,0.60);--x-slider-value-color:rgba(0,0,0,0.50);--x-slider-radius:var(--x-radius-full,9999px);}@media (prefers-color-scheme:dark){:host{--x-slider-track-color:rgba(255,255,255,0.15);--x-slider-fill-color:var(--x-color-primary,#3b82f6);--x-slider-thumb-color:var(--x-color-surface,#ffffff);--x-slider-thumb-border:2px solid var(--x-color-primary,#3b82f6);--x-slider-focus-ring:var(--x-color-focus-ring,#93c5fd);--x-slider-label-color:rgba(255,255,255,0.60);--x-slider-value-color:rgba(255,255,255,0.50);}}[part\x3dbase]{width:100%;box-sizing:border-box;}[part\x3dbase][data-size\x3dsm]{--_x-slider-track-h:4px;--_x-slider-thumb-sz:14px;}[part\x3dbase][data-size\x3dmd]{--_x-slider-track-h:6px;--_x-slider-thumb-sz:18px;}[part\x3dbase][data-size\x3dlg]{--_x-slider-track-h:8px;--_x-slider-thumb-sz:22px;}[part\x3dheader]{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:4px;}[part\x3dlabel-text]{font-size:0.875rem;color:var(--x-slider-label-color);font-weight:500;}[part\x3dvalue-text]{font-size:0.8125rem;color:var(--x-slider-value-color);}[part\x3dinput]{-webkit-appearance:none;appearance:none;display:block;width:100%;height:var(--_x-slider-thumb-sz,18px);cursor:pointer;margin:0;padding:0;background:transparent;outline:none;box-sizing:border-box;}[part\x3dinput]::-webkit-slider-runnable-track{height:var(--_x-slider-track-h,6px);border-radius:var(--x-slider-radius);background:linear-gradient(to right,var(--x-slider-fill-color) var(--_x-slider-fill,0%),var(--x-slider-track-color) var(--_x-slider-fill,0%));}[part\x3dinput]::-moz-range-track{height:var(--_x-slider-track-h,6px);border-radius:var(--x-slider-radius);background:var(--x-slider-track-color);border:none;}[part\x3dinput]::-moz-range-progress{height:var(--_x-slider-track-h,6px);border-radius:var(--x-slider-radius);background:var(--x-slider-fill-color);}[part\x3dinput]::-webkit-slider-thumb{-webkit-appearance:none;width:var(--_x-slider-thumb-sz,18px);height:var(--_x-slider-thumb-sz,18px);border-radius:50%;background:var(--x-slider-thumb-color);border:var(--x-slider-thumb-border);box-shadow:var(--x-slider-thumb-shadow);margin-top:calc(var(--_x-slider-track-h,6px)/2 - var(--_x-slider-thumb-sz,18px)/2);cursor:pointer;transition:box-shadow 100ms ease;}[part\x3dinput]::-moz-range-thumb{width:var(--_x-slider-thumb-sz,18px);height:var(--_x-slider-thumb-sz,18px);border-radius:50%;background:var(--x-slider-thumb-color);border:var(--x-slider-thumb-border);box-shadow:var(--x-slider-thumb-shadow);cursor:pointer;transition:box-shadow 100ms ease;}[part\x3dinput]:focus-visible::-webkit-slider-thumb{box-shadow:var(--x-slider-thumb-shadow),0 0 0 3px var(--x-slider-focus-ring);}[part\x3dinput]:focus-visible::-moz-range-thumb{box-shadow:var(--x-slider-thumb-shadow),0 0 0 3px var(--x-slider-focus-ring);}:host([data-disabled]) [part\x3dinput]{opacity:var(--x-slider-disabled-opacity);cursor:default;pointer-events:none;}:host([data-readonly]) [part\x3dinput]{pointer-events:none;}@media (prefers-reduced-motion:reduce){[part\x3dinput]::-webkit-slider-thumb{transition:none;}[part\x3dinput]::-moz-range-thumb{transition:none;}}@media (pointer:coarse){[part\x3dbase]{--_x-slider-thumb-sz:28px;}}";
13
+ e.setAttribute("part","base");g.setAttribute("part","header");h.setAttribute("part","label-text");k.setAttribute("part","value-text");m.setAttribute("part","input");m.setAttribute("type","range");g.appendChild(h);g.appendChild(k);e.appendChild(g);e.appendChild(m);c.appendChild(d);c.appendChild(e);this.__xSliderRefs={base:e,header:g,label:h,value:k,input:m};$APP.r(this.attachInternals)&&(this.__xSliderInternals=this.attachInternals())}KE(this);c=$APP.l(this,"__xSliderRefs");$APP.r(c)&&(c=$APP.l(c,
14
+ "input"),d=GE(this),e=HE(this),g=JE(this),h={input:d,change:e,keydown:g},c.addEventListener("input",d),c.addEventListener("change",e),c.addEventListener("keydown",g),this.__xSliderHandlers=h);return EE(this)};b.disconnectedCallback=function(){return KE(this)};b.attributeChangedCallback=function(){return EE(this)};b.formDisabledCallback=function(c){zE(this,"disabled",$APP.I(c));return EE(this)};b.formResetCallback=function(){yE(this,"value",""+$APP.S.g(0));return EE(this)};return a},PE=function(){return $APP.r(customElements.get("x-slider"))?
15
+ null:customElements.define("x-slider",OE())},CE=new $APP.K(null,"show-value?","show-value?",-1960833108),DE=new $APP.K(null,"fill-percent","fill-percent",-1813848228),AE=new $APP.K(null,"step","step",1288888124);var BE=new $APP.R(null,new $APP.P(null,3,["md",null,"lg",null,"sm",null],null),null),NE="value min max step disabled readonly name label show-value size aria-label aria-labelledby aria-describedby".split(" ");
16
+ $APP.Q([$APP.vj,$APP.gj,$APP.th,$APP.Si,$APP.ri,$APP.rh,$APP.nl,$APP.ak,$APP.T,AE],[new $APP.P(null,2,[$APP.Z,$APP.X,$APP.Pj,"min"],null),new $APP.P(null,2,[$APP.Z,$APP.qj,$APP.Pj,"disabled"],null),new $APP.P(null,2,[$APP.Z,$APP.qj,$APP.Pj,"show-value"],null),new $APP.P(null,2,[$APP.Z,$APP.X,$APP.Pj,"name"],null),new $APP.P(null,2,[$APP.Z,$APP.X,$APP.Pj,"value"],null),new $APP.P(null,2,[$APP.Z,$APP.X,$APP.Pj,"size"],null),new $APP.P(null,2,[$APP.Z,$APP.qj,$APP.Pj,"readonly"],null),new $APP.P(null,
17
+ 2,[$APP.Z,$APP.X,$APP.Pj,"max"],null),new $APP.P(null,2,[$APP.Z,$APP.X,$APP.Pj,"label"],null),new $APP.P(null,2,[$APP.Z,$APP.X,$APP.Pj,"step"],null)]);$APP.Sd(["x-slider-input",new $APP.P(null,1,[$APP.U,new $APP.P(null,3,[$APP.ri,$APP.V,$APP.vj,$APP.V,$APP.ak,$APP.V],null)],null),"x-slider-change",new $APP.P(null,1,[$APP.U,new $APP.P(null,3,[$APP.ri,$APP.V,$APP.vj,$APP.V,$APP.ak,$APP.V],null)],null)]);var IE=new $APP.R(null,new $APP.P(null,8,["PageDown",null,"ArrowUp",null,"ArrowDown",null,"End",null,"ArrowRight",null,"ArrowLeft",null,"PageUp",null,"Home",null],null),null);$APP.ka("baredom.exports.x_slider.init",PE);export const init=PE;
@@ -1,22 +1,23 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var vD=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},wD=function(a,b,c,d,e,g){b=c+(e*(b-a)-g*c)*d;return[a+b*d,b]},xD=function(a,b,c,d,e,g,h){a=c-a;b=d-b;d=Math.sqrt(a*a+b*b);if(d<=.001||d>=e)return[0,0];e=1-d/e;g*=e*e*($APP.r(h)?50:20);return[a/d*g,b/d*g]},yD=function(){return $APP.I(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},zD=function(a,b){for(var c=0;;){if(c>=20)return!0;
3
- if(Math.abs(a[c])>.1||Math.abs(b[c])>.1)return!1;c+=1}},BD=function(a){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElementNS("http://www.w3.org/2000/svg","svg"),e=document.createElementNS("http://www.w3.org/2000/svg","path"),g=document.createElement("div"),h=document.createElement("slot");c.textContent=AD;d.setAttribute("part","svg");d.setAttribute("viewBox","0 0 300 200");d.setAttribute("preserveAspectRatio","none");d.setAttribute("aria-hidden","true");
4
- e.setAttribute("part","shape");g.setAttribute("part","content");d.appendChild(e);g.appendChild(h);b.appendChild(c);b.appendChild(d);b.appendChild(g);a.__xSoftBodyRefs=new $APP.P(null,4,[$APP.bi,b,$APP.xj,d,$APP.ak,e,$APP.Vh,g],null)},ED=function(a){a=new $APP.P(null,6,[$APP.jl,a.getAttribute("stiffness"),$APP.Ml,a.getAttribute("damping"),$APP.$i,a.getAttribute("radius"),$APP.Mj,a.getAttribute("intensity"),CD,a.getAttribute("grab-radius"),$APP.Ai,a.getAttribute("disabled")],null);var b=$APP.N(a);a=
5
- $APP.G(b,$APP.jl);var c=$APP.G(b,$APP.Ml),d=$APP.G(b,$APP.$i),e=$APP.G(b,$APP.Mj),g=$APP.G(b,CD);b=$APP.G(b,$APP.Ai);return new $APP.P(null,6,[$APP.Vk,vD(a,180,10,1E3),$APP.Vj,vD(c,12,1,100),$APP.Il,vD(d,16,6,200),$APP.Gj,vD(e,1,0,5),DD,vD(g,80,10,500),$APP.W,b!=null],null)},FD=function(a,b,c){var d=$APP.Il.g($APP.l(a,"__xSoftBodyModel"));d=Math.max(6,Math.min(d,Math.min(b,c)/2));var e=Math.cos(Math.PI/6),g=Math.sin(Math.PI/6),h=Math.cos(Math.PI/3),k=Math.sin(Math.PI/3),m=new Float64Array(20),p=new Float64Array(20);
2
+ var aE=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},bE=function(a,b,c,d,e,g){b=c+(e*(b-a)-g*c)*d;return[a+b*d,b]},cE=function(a,b,c,d,e,g,h){a=c-a;b=d-b;d=Math.sqrt(a*a+b*b);if(d<=.001||d>=e)return[0,0];e=1-d/e;g*=e*e*($APP.r(h)?50:20);return[a/d*g,b/d*g]},dE=function(){return $APP.I(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},eE=function(a,b){for(var c=0;;){if(c>=20)return!0;
3
+ if(Math.abs(a[c])>.1||Math.abs(b[c])>.1)return!1;c+=1}},gE=function(a){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElementNS("http://www.w3.org/2000/svg","svg"),e=document.createElementNS("http://www.w3.org/2000/svg","path"),g=document.createElement("div"),h=document.createElement("slot");c.textContent=fE;d.setAttribute("part","svg");d.setAttribute("viewBox","0 0 300 200");d.setAttribute("preserveAspectRatio","none");d.setAttribute("aria-hidden","true");
4
+ e.setAttribute("part","shape");g.setAttribute("part","content");d.appendChild(e);g.appendChild(h);b.appendChild(c);b.appendChild(d);b.appendChild(g);a.__xSoftBodyRefs=new $APP.P(null,4,[$APP.bi,b,$APP.xj,d,$APP.bk,e,$APP.Vh,g],null)},jE=function(a){a=new $APP.P(null,6,[$APP.kl,a.getAttribute("stiffness"),$APP.Nl,a.getAttribute("damping"),$APP.$i,a.getAttribute("radius"),$APP.Nj,a.getAttribute("intensity"),hE,a.getAttribute("grab-radius"),$APP.Ai,a.getAttribute("disabled")],null);var b=$APP.N(a);a=
5
+ $APP.G(b,$APP.kl);var c=$APP.G(b,$APP.Nl),d=$APP.G(b,$APP.$i),e=$APP.G(b,$APP.Nj),g=$APP.G(b,hE);b=$APP.G(b,$APP.Ai);return new $APP.P(null,6,[$APP.Wk,aE(a,180,10,1E3),$APP.Wj,aE(c,12,1,100),$APP.Jl,aE(d,16,6,200),$APP.Gj,aE(e,1,0,5),iE,aE(g,80,10,500),$APP.W,b!=null],null)},kE=function(a,b,c){var d=$APP.Jl.g($APP.l(a,"__xSoftBodyModel"));d=Math.max(6,Math.min(d,Math.min(b,c)/2));var e=Math.cos(Math.PI/6),g=Math.sin(Math.PI/6),h=Math.cos(Math.PI/3),k=Math.sin(Math.PI/3),m=new Float64Array(20),p=new Float64Array(20);
6
6
  m[0]=d;p[0]=0;m[1]=b*.5;p[1]=0;m[2]=b-d;p[2]=0;m[3]=b-d+d*g;p[3]=d-d*e;m[4]=b-d+d*k;p[4]=d-d*h;m[5]=b;p[5]=d;m[6]=b;p[6]=c*.5;m[7]=b;p[7]=c-d;m[8]=b-d+d*e;p[8]=c-d+d*g;m[9]=b-d+d*h;p[9]=c-d+d*k;m[10]=b-d;p[10]=c;m[11]=b*.5;p[11]=c;m[12]=d;p[12]=c;m[13]=d-d*g;p[13]=c-d+d*e;m[14]=d-d*k;p[14]=c-d+d*h;m[15]=0;p[15]=c-d;m[16]=0;p[16]=c*.5;m[17]=0;p[17]=d;m[18]=d-d*e;p[18]=d-d*g;m[19]=d-d*h;p[19]=d-d*k;c=[m,p];b=c[0];c=c[1];d=new Float64Array(20);e=new Float64Array(20);g=new Float64Array(20);h=new Float64Array(20);
7
- for(k=0;;)if(k<20)d[k]=b[k],e[k]=c[k],g[k]=0,h[k]=0,k+=1;else break;a.__xSoftBodyRX=b;a.__xSoftBodyRY=c;a.__xSoftBodyCX=d;a.__xSoftBodyCY=e;a.__xSoftBodyVX=g;a.__xSoftBodyVY=h},GD=function(a){var b=$APP.N($APP.l(a,"__xSoftBodyRefs"));b=$APP.G(b,$APP.ak);var c=$APP.l(a,"__xSoftBodyCX");a=$APP.l(a,"__xSoftBodyCY");var d=[];d.push("M"+$APP.S.g(c[0].toFixed(2))+","+$APP.S.g(a[0].toFixed(2)));for(var e=0;;)if(e<20){var g=$APP.hd(e+19,20),h=e,k=$APP.hd(e+1,20),m=$APP.hd(e+2,20),p=(c[k]-c[g])/6,q=(a[k]-
8
- a[g])/6;g=(c[m]-c[h])/6;m=(a[m]-a[h])/6;var w=c[k]-c[h],x=a[k]-a[h];x=Math.sqrt(w*w+x*x)*.4;w=Math.sqrt(p*p+q*q);w=w>x?x/(w+.001):1;q=a[h]+q*w;var y=Math.sqrt(g*g+m*m);x=y>x?x/(y+.001):1;g=c[k]-g*x;m=a[k]-m*x;d.push("C"+$APP.S.g((c[h]+p*w).toFixed(2))+","+$APP.S.g(q.toFixed(2))+" "+$APP.S.g(g.toFixed(2))+","+$APP.S.g(m.toFixed(2))+" "+$APP.S.g(c[k].toFixed(2))+","+$APP.S.g(a[k].toFixed(2)));e+=1}else break;d.push("Z");b.setAttribute("d",d.join(""))},HD=function(a){var b=$APP.N($APP.l(a,"__xSoftBodyRefs"));
9
- b=$APP.G(b,$APP.ak);var c=$APP.l(a,"__xSoftBodyW"),d=$APP.l(a,"__xSoftBodyH");a=$APP.Il.g($APP.l(a,"__xSoftBodyModel"));a=Math.max(6,Math.min(a,Math.min(c,d)/2));var e=.5522847498*a;c="M"+$APP.S.g(a.toFixed(2))+",0L"+$APP.S.g((c-a).toFixed(2))+",0C"+$APP.S.g((c-a+e).toFixed(2))+",0 "+$APP.S.g(c.toFixed(2))+","+$APP.S.g((a-e).toFixed(2))+" "+$APP.S.g(c.toFixed(2))+","+$APP.S.g(a.toFixed(2))+"L"+$APP.S.g(c.toFixed(2))+","+$APP.S.g((d-a).toFixed(2))+"C"+$APP.S.g(c.toFixed(2))+","+$APP.S.g((d-a+e).toFixed(2))+
10
- " "+$APP.S.g((c-a+e).toFixed(2))+","+$APP.S.g(d.toFixed(2))+" "+$APP.S.g((c-a).toFixed(2))+","+$APP.S.g(d.toFixed(2))+"L"+$APP.S.g(a.toFixed(2))+","+$APP.S.g(d.toFixed(2))+"C"+$APP.S.g((a-e).toFixed(2))+","+$APP.S.g(d.toFixed(2))+" 0,"+$APP.S.g((d-a+e).toFixed(2))+" 0,"+$APP.S.g((d-a).toFixed(2))+"L0,"+$APP.S.g(a.toFixed(2))+"C0,"+$APP.S.g((a-e).toFixed(2))+" "+$APP.S.g((a-e).toFixed(2))+",0 "+$APP.S.g(a.toFixed(2))+",0Z";b.setAttribute("d",c)},JD=function(a){$APP.r($APP.l(a,"__xSoftBodyRaf"))||($APP.n(a,
11
- "__xSoftBodyLF",performance.now()),$APP.n(a,"__xSoftBodyRaf",requestAnimationFrame(function(){return ID(a)})))},KD=function(a){var b=$APP.l(a,"__xSoftBodyRaf");$APP.r(b)&&(cancelAnimationFrame(b),a.__xSoftBodyRaf=null)},LD=function(a,b){var c=$APP.N($APP.l(a,"__xSoftBodyRefs"));c=$APP.G(c,$APP.xj).getBoundingClientRect();a.__xSoftBodyPX=b.clientX-c.left;a.__xSoftBodyPY=b.clientY-c.top;return null},MD=function(a){function b(){a.__xSoftBodyGrab=!1;a.dispatchEvent(new CustomEvent("x-soft-body-release",
12
- {bubbles:!0,composed:!0,detail:{}}));return null}function c(h){a.__xSoftBodyGrab=!0;LD(a,h);a.dispatchEvent(new CustomEvent("x-soft-body-grab",{bubbles:!0,composed:!0,detail:{}}));return null}function d(){a.__xSoftBodyPA=!1;a.__xSoftBodyGrab=!1;return null}function e(){a.__xSoftBodyPA=!0;var h=$APP.W.g($APP.l(a,"__xSoftBodyModel"));h=$APP.r(h)?h:yD();$APP.r(h)||JD(a);return null}function g(h){return LD(a,h)}$APP.n(a,"__xSoftBodyHdl",{move:g,enter:e,leave:d,down:c,up:b});a.addEventListener("pointermove",
13
- g,{passive:!0});a.addEventListener("pointerenter",e);a.addEventListener("pointerleave",d);a.addEventListener("pointerdown",c);a.addEventListener("pointerup",b)},ND=function(a){var b=$APP.l(a,"__xSoftBodyHdl");$APP.r(b)&&(a.removeEventListener("pointermove",$APP.l(b,"move")),a.removeEventListener("pointerenter",$APP.l(b,"enter")),a.removeEventListener("pointerleave",$APP.l(b,"leave")),a.removeEventListener("pointerdown",$APP.l(b,"down")),a.removeEventListener("pointerup",$APP.l(b,"up")),a.__xSoftBodyHdl=
14
- null)},OD=function(a){Object.defineProperty(a,"stiffness",{get:function(){var b=this.getAttribute("stiffness");return vD(b,180,10,1E3)},set:function(b){return b==null?this.removeAttribute("stiffness"):this.setAttribute("stiffness",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"damping",{get:function(){var b=this.getAttribute("damping");return vD(b,12,1,100)},set:function(b){return b==null?this.removeAttribute("damping"):this.setAttribute("damping",""+$APP.S.g(b))},enumerable:!0,
15
- configurable:!0});Object.defineProperty(a,"radius",{get:function(){var b=this.getAttribute("radius");return vD(b,16,6,200)},set:function(b){return b==null?this.removeAttribute("radius"):this.setAttribute("radius",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"intensity",{get:function(){var b=this.getAttribute("intensity");return vD(b,1,0,5)},set:function(b){return b==null?this.removeAttribute("intensity"):this.setAttribute("intensity",""+$APP.S.g(b))},enumerable:!0,configurable:!0});
16
- Object.defineProperty(a,"grabRadius",{get:function(){var b=this.getAttribute("grab-radius");return vD(b,80,10,500)},set:function(b){return b==null?this.removeAttribute("grab-radius"):this.setAttribute("grab-radius",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.r(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0})},QD=function(){var a=
17
- class extends HTMLElement{};a.observedAttributes=PD;a.prototype.connectedCallback=function(){var b=this,c=ED(b);b.__xSoftBodyModel=c;$APP.r($APP.l(b,"__xSoftBodyRefs"))||BD(b);b.__xSoftBodyPA=!1;b.__xSoftBodyGrab=!1;b.__xSoftBodyPX=0;b.__xSoftBodyPY=0;c=new ResizeObserver(function(d){if(d.length>0){var e=d[0].contentRect;d=e.width;e=e.height;if(d>0&&e>0){b.__xSoftBodyW=d;b.__xSoftBodyH=e;var g=$APP.N($APP.l(b,"__xSoftBodyRefs"));$APP.G(g,$APP.xj).setAttribute("viewBox","0 0 "+$APP.S.g(d)+" "+$APP.S.g(e));
18
- FD(b,d,e);d=$APP.W.g($APP.l(b,"__xSoftBodyModel"));d=$APP.r(d)?d:yD();$APP.r(d)?HD(b):(GD(b),JD(b))}}return null});b.__xSoftBodyRO=c;c.observe(b);ND(b);MD(b);return null};a.prototype.disconnectedCallback=function(){KD(this);ND(this);var b=$APP.l(this,"__xSoftBodyRO");$APP.r(b)&&(b.disconnect(),this.__xSoftBodyRO=null);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&$APP.r($APP.l(this,"__xSoftBodyRefs"))&&(this.__xSoftBodyModel=b=ED(this),c=$APP.l(this,"__xSoftBodyW"),
19
- d=$APP.l(this,"__xSoftBodyH"),$APP.r($APP.r(c)?$APP.r(d)?c>0&&d>0:d:c)&&(FD(this,c,d),b=$APP.W.g(b),b=$APP.r(b)?b:yD(),$APP.r(b)?(KD(this),HD(this)):(GD(this),JD(this))));return null};OD(a.prototype);return a},RD=function(){$APP.r(customElements.get("x-soft-body"))||customElements.define("x-soft-body",QD());return null},DD=new $APP.M(null,"grab-radius","grab-radius",771838535),CD=new $APP.M(null,"grab-radius-raw","grab-radius-raw",-1019405976);var PD="stiffness damping radius intensity grab-radius disabled".split(" ");$APP.Sd(["x-soft-body-grab",new $APP.P(null,2,[$APP.U,$APP.Td,$APP.kl,!1],null),"x-soft-body-release",new $APP.P(null,2,[$APP.U,$APP.Td,$APP.kl,!1],null)]);var AD=":host{display:block;position:relative;background:none;overflow:visible;"+$APP.S.g("--x-soft-body-bg")+":#ffffff;"+$APP.S.g("--x-soft-body-border")+":#e2e8f0;"+$APP.S.g("--x-soft-body-border-width")+":1.5;"+$APP.S.g("--x-soft-body-shadow")+":0 1px 3px rgba(0,0,0,0.1);"+$APP.S.g("--x-soft-body-padding")+":1rem;}[part\x3dsvg]{display:block;width:100%;height:100%;position:absolute;inset:0;overflow:visible;pointer-events:none;}[part\x3dshape]{fill:var("+$APP.S.g("--x-soft-body-bg")+",#ffffff);stroke:var("+
20
- $APP.S.g("--x-soft-body-border")+",#e2e8f0);stroke-width:var("+$APP.S.g("--x-soft-body-border-width")+",1.5);filter:drop-shadow(var("+$APP.S.g("--x-soft-body-shadow")+",0 1px 3px rgba(0,0,0,0.1)));}[part\x3dcontent]{position:relative;background:none;padding:var("+$APP.S.g("--x-soft-body-padding")+",1rem);z-index:1;}@media(prefers-color-scheme:dark){:host{"+$APP.S.g("--x-soft-body-bg")+":#1e293b;"+$APP.S.g("--x-soft-body-border")+":#475569;"+$APP.S.g("--x-soft-body-shadow")+":0 1px 3px rgba(0,0,0,0.3);}}@media(prefers-reduced-motion:reduce){[part\x3dshape]{transition:none!important;}}",
21
- ID=function ID(a){if($APP.r(a.isConnected)){var c=$APP.l(a,"__xSoftBodyModel"),d=performance.now(),e=Math.min(d-$APP.l(a,"__xSoftBodyLF"),100)/1E3,g=$APP.Vk.g(c),h=$APP.Vj.g(c),k=$APP.Gj.g(c),m=DD.g(c);c=$APP.l(a,"__xSoftBodyRX");var p=$APP.l(a,"__xSoftBodyRY"),q=$APP.l(a,"__xSoftBodyCX"),w=$APP.l(a,"__xSoftBodyCY"),x=$APP.l(a,"__xSoftBodyVX"),y=$APP.l(a,"__xSoftBodyVY"),A=$APP.l(a,"__xSoftBodyPA"),C=$APP.l(a,"__xSoftBodyPX"),E=$APP.l(a,"__xSoftBodyPY"),H=$APP.l(a,"__xSoftBodyGrab");a.__xSoftBodyLF=
22
- d;for(d=0;;)if(d<20){var F=c[d],K=p[d],X=$APP.r(A)?xD(F,K,C,E,m,k,H):[0,0];F=wD(q[d],F+X[0],x[d],e,g,h);K=wD(w[d],K+X[1],y[d],e,g,h);q[d]=F[0];x[d]=F[1];w[d]=K[0];y[d]=K[1];d+=1}else break;GD(a);if($APP.r($APP.r(A)?A:!zD(x,y)))$APP.n(a,"__xSoftBodyRaf",requestAnimationFrame(function(){return ID.g?ID.g(a):ID.call(null,a)}));else{for(e=0;;)if(e<20)q[e]=c[e],w[e]=p[e],e+=1;else break;GD(a);a.__xSoftBodyRaf=null}}return null};$APP.ka("baredom.exports.x_soft_body.init",RD);export const init=RD;
7
+ for(k=0;;)if(k<20)d[k]=b[k],e[k]=c[k],g[k]=0,h[k]=0,k+=1;else break;a.__xSoftBodyRX=b;a.__xSoftBodyRY=c;a.__xSoftBodyCX=d;a.__xSoftBodyCY=e;a.__xSoftBodyVX=g;a.__xSoftBodyVY=h},lE=function(a){var b=$APP.N($APP.l(a,"__xSoftBodyRefs"));b=$APP.G(b,$APP.bk);var c=$APP.l(a,"__xSoftBodyCX");a=$APP.l(a,"__xSoftBodyCY");var d=[];d.push("M"+$APP.S.g(c[0].toFixed(2))+","+$APP.S.g(a[0].toFixed(2)));for(var e=0;;)if(e<20){var g=$APP.hd(e+19,20),h=e,k=$APP.hd(e+1,20),m=$APP.hd(e+2,20),p=(c[k]-c[g])/6,q=(a[k]-
8
+ a[g])/6;g=(c[m]-c[h])/6;m=(a[m]-a[h])/6;var w=c[k]-c[h],x=a[k]-a[h];x=Math.sqrt(w*w+x*x)*.4;w=Math.sqrt(p*p+q*q);w=w>x?x/(w+.001):1;q=a[h]+q*w;var y=Math.sqrt(g*g+m*m);x=y>x?x/(y+.001):1;g=c[k]-g*x;m=a[k]-m*x;d.push("C"+$APP.S.g((c[h]+p*w).toFixed(2))+","+$APP.S.g(q.toFixed(2))+" "+$APP.S.g(g.toFixed(2))+","+$APP.S.g(m.toFixed(2))+" "+$APP.S.g(c[k].toFixed(2))+","+$APP.S.g(a[k].toFixed(2)));e+=1}else break;d.push("Z");b.setAttribute("d",d.join(""))},mE=function(a){var b=$APP.N($APP.l(a,"__xSoftBodyRefs"));
9
+ b=$APP.G(b,$APP.bk);var c=$APP.l(a,"__xSoftBodyW"),d=$APP.l(a,"__xSoftBodyH");a=$APP.Jl.g($APP.l(a,"__xSoftBodyModel"));a=Math.max(6,Math.min(a,Math.min(c,d)/2));var e=.5522847498*a;c="M"+$APP.S.g(a.toFixed(2))+",0L"+$APP.S.g((c-a).toFixed(2))+",0C"+$APP.S.g((c-a+e).toFixed(2))+",0 "+$APP.S.g(c.toFixed(2))+","+$APP.S.g((a-e).toFixed(2))+" "+$APP.S.g(c.toFixed(2))+","+$APP.S.g(a.toFixed(2))+"L"+$APP.S.g(c.toFixed(2))+","+$APP.S.g((d-a).toFixed(2))+"C"+$APP.S.g(c.toFixed(2))+","+$APP.S.g((d-a+e).toFixed(2))+
10
+ " "+$APP.S.g((c-a+e).toFixed(2))+","+$APP.S.g(d.toFixed(2))+" "+$APP.S.g((c-a).toFixed(2))+","+$APP.S.g(d.toFixed(2))+"L"+$APP.S.g(a.toFixed(2))+","+$APP.S.g(d.toFixed(2))+"C"+$APP.S.g((a-e).toFixed(2))+","+$APP.S.g(d.toFixed(2))+" 0,"+$APP.S.g((d-a+e).toFixed(2))+" 0,"+$APP.S.g((d-a).toFixed(2))+"L0,"+$APP.S.g(a.toFixed(2))+"C0,"+$APP.S.g((a-e).toFixed(2))+" "+$APP.S.g((a-e).toFixed(2))+",0 "+$APP.S.g(a.toFixed(2))+",0Z";b.setAttribute("d",c)},oE=function(a){$APP.r($APP.l(a,"__xSoftBodyRaf"))||($APP.n(a,
11
+ "__xSoftBodyLF",performance.now()),$APP.n(a,"__xSoftBodyRaf",requestAnimationFrame(function(){return nE(a)})))},pE=function(a){var b=$APP.l(a,"__xSoftBodyRaf");$APP.r(b)&&(cancelAnimationFrame(b),a.__xSoftBodyRaf=null)},qE=function(a,b){var c=$APP.N($APP.l(a,"__xSoftBodyRefs"));c=$APP.G(c,$APP.xj).getBoundingClientRect();a.__xSoftBodyPX=b.clientX-c.left;a.__xSoftBodyPY=b.clientY-c.top;return null},rE=function(a){function b(){a.__xSoftBodyGrab=!1;a.dispatchEvent(new CustomEvent("x-soft-body-release",
12
+ {bubbles:!0,composed:!0,detail:{}}));return null}function c(h){a.__xSoftBodyGrab=!0;qE(a,h);a.dispatchEvent(new CustomEvent("x-soft-body-grab",{bubbles:!0,composed:!0,detail:{}}));return null}function d(){a.__xSoftBodyPA=!1;a.__xSoftBodyGrab=!1;return null}function e(){a.__xSoftBodyPA=!0;var h=$APP.W.g($APP.l(a,"__xSoftBodyModel"));h=$APP.r(h)?h:dE();$APP.r(h)||oE(a);return null}function g(h){return qE(a,h)}$APP.n(a,"__xSoftBodyHdl",{move:g,enter:e,leave:d,down:c,up:b});a.addEventListener("pointermove",
13
+ g,{passive:!0});a.addEventListener("pointerenter",e);a.addEventListener("pointerleave",d);a.addEventListener("pointerdown",c);a.addEventListener("pointerup",b)},sE=function(a){var b=$APP.l(a,"__xSoftBodyHdl");$APP.r(b)&&(a.removeEventListener("pointermove",$APP.l(b,"move")),a.removeEventListener("pointerenter",$APP.l(b,"enter")),a.removeEventListener("pointerleave",$APP.l(b,"leave")),a.removeEventListener("pointerdown",$APP.l(b,"down")),a.removeEventListener("pointerup",$APP.l(b,"up")),a.__xSoftBodyHdl=
14
+ null)},tE=function(a){Object.defineProperty(a,"stiffness",{get:function(){var b=this.getAttribute("stiffness");return aE(b,180,10,1E3)},set:function(b){return b==null?this.removeAttribute("stiffness"):this.setAttribute("stiffness",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"damping",{get:function(){var b=this.getAttribute("damping");return aE(b,12,1,100)},set:function(b){return b==null?this.removeAttribute("damping"):this.setAttribute("damping",""+$APP.S.g(b))},enumerable:!0,
15
+ configurable:!0});Object.defineProperty(a,"radius",{get:function(){var b=this.getAttribute("radius");return aE(b,16,6,200)},set:function(b){return b==null?this.removeAttribute("radius"):this.setAttribute("radius",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"intensity",{get:function(){var b=this.getAttribute("intensity");return aE(b,1,0,5)},set:function(b){return b==null?this.removeAttribute("intensity"):this.setAttribute("intensity",""+$APP.S.g(b))},enumerable:!0,configurable:!0});
16
+ Object.defineProperty(a,"grabRadius",{get:function(){var b=this.getAttribute("grab-radius");return aE(b,80,10,500)},set:function(b){return b==null?this.removeAttribute("grab-radius"):this.setAttribute("grab-radius",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.r(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0})},vE=function(){var a=
17
+ class extends HTMLElement{};a.observedAttributes=uE;a.prototype.connectedCallback=function(){var b=this,c=jE(b);b.__xSoftBodyModel=c;$APP.r($APP.l(b,"__xSoftBodyRefs"))||gE(b);b.__xSoftBodyPA=!1;b.__xSoftBodyGrab=!1;b.__xSoftBodyPX=0;b.__xSoftBodyPY=0;c=new ResizeObserver(function(d){if(d.length>0){var e=d[0].contentRect;d=e.width;e=e.height;if(d>0&&e>0){b.__xSoftBodyW=d;b.__xSoftBodyH=e;var g=$APP.N($APP.l(b,"__xSoftBodyRefs"));$APP.G(g,$APP.xj).setAttribute("viewBox","0 0 "+$APP.S.g(d)+" "+$APP.S.g(e));
18
+ kE(b,d,e);d=$APP.W.g($APP.l(b,"__xSoftBodyModel"));d=$APP.r(d)?d:dE();$APP.r(d)?mE(b):(lE(b),oE(b))}}return null});b.__xSoftBodyRO=c;c.observe(b);sE(b);rE(b);return null};a.prototype.disconnectedCallback=function(){pE(this);sE(this);var b=$APP.l(this,"__xSoftBodyRO");$APP.r(b)&&(b.disconnect(),this.__xSoftBodyRO=null);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&$APP.r($APP.l(this,"__xSoftBodyRefs"))&&(this.__xSoftBodyModel=b=jE(this),c=$APP.l(this,"__xSoftBodyW"),
19
+ d=$APP.l(this,"__xSoftBodyH"),$APP.r($APP.r(c)?$APP.r(d)?c>0&&d>0:d:c)&&(kE(this,c,d),b=$APP.W.g(b),b=$APP.r(b)?b:dE(),$APP.r(b)?(pE(this),mE(this)):(lE(this),oE(this))));return null};tE(a.prototype);return a},wE=function(){$APP.r(customElements.get("x-soft-body"))||customElements.define("x-soft-body",vE());return null},iE=new $APP.K(null,"grab-radius","grab-radius",771838535),hE=new $APP.K(null,"grab-radius-raw","grab-radius-raw",-1019405976);var uE="stiffness damping radius intensity grab-radius disabled".split(" ");$APP.Sd(["x-soft-body-grab",new $APP.P(null,2,[$APP.U,$APP.Td,$APP.ll,!1],null),"x-soft-body-release",new $APP.P(null,2,[$APP.U,$APP.Td,$APP.ll,!1],null)]);var fE=":host{display:block;position:relative;background:none;overflow:visible;"+$APP.S.g("--x-soft-body-bg")+":var(--x-color-surface,#ffffff);"+$APP.S.g("--x-soft-body-border")+":var(--x-color-border,#e2e8f0);"+$APP.S.g("--x-soft-body-border-width")+":1.5;"+$APP.S.g("--x-soft-body-shadow")+":var(--x-shadow-sm,0 1px 3px rgba(0,0,0,0.1));"+$APP.S.g("--x-soft-body-padding")+":1rem;}[part\x3dsvg]{display:block;width:100%;height:100%;position:absolute;inset:0;overflow:visible;pointer-events:none;}[part\x3dshape]{fill:var("+
20
+ $APP.S.g("--x-soft-body-bg")+",#ffffff);stroke:var("+$APP.S.g("--x-soft-body-border")+",#e2e8f0);stroke-width:var("+$APP.S.g("--x-soft-body-border-width")+",1.5);filter:drop-shadow(var("+$APP.S.g("--x-soft-body-shadow")+",0 1px 3px rgba(0,0,0,0.1)));}[part\x3dcontent]{position:relative;background:none;padding:var("+$APP.S.g("--x-soft-body-padding")+",1rem);z-index:1;}@media(prefers-color-scheme:dark){:host{"+$APP.S.g("--x-soft-body-bg")+":var(--x-color-surface,#1e293b);"+$APP.S.g("--x-soft-body-border")+
21
+ ":var(--x-color-border,#475569);"+$APP.S.g("--x-soft-body-shadow")+":var(--x-shadow-sm,0 1px 3px rgba(0,0,0,0.3));}}@media(prefers-reduced-motion:reduce){[part\x3dshape]{transition:none!important;}}",nE=function nE(a){if($APP.r(a.isConnected)){var c=$APP.l(a,"__xSoftBodyModel"),d=performance.now(),e=Math.min(d-$APP.l(a,"__xSoftBodyLF"),100)/1E3,g=$APP.Wk.g(c),h=$APP.Wj.g(c),k=$APP.Gj.g(c),m=iE.g(c);c=$APP.l(a,"__xSoftBodyRX");var p=$APP.l(a,"__xSoftBodyRY"),q=$APP.l(a,"__xSoftBodyCX"),w=$APP.l(a,
22
+ "__xSoftBodyCY"),x=$APP.l(a,"__xSoftBodyVX"),y=$APP.l(a,"__xSoftBodyVY"),A=$APP.l(a,"__xSoftBodyPA"),B=$APP.l(a,"__xSoftBodyPX"),E=$APP.l(a,"__xSoftBodyPY"),H=$APP.l(a,"__xSoftBodyGrab");a.__xSoftBodyLF=d;for(d=0;;)if(d<20){var F=c[d],M=p[d],Y=$APP.r(A)?cE(F,M,B,E,m,k,H):[0,0];F=bE(q[d],F+Y[0],x[d],e,g,h);M=bE(w[d],M+Y[1],y[d],e,g,h);q[d]=F[0];x[d]=F[1];w[d]=M[0];y[d]=M[1];d+=1}else break;lE(a);if($APP.r($APP.r(A)?A:!eE(x,y)))$APP.n(a,"__xSoftBodyRaf",requestAnimationFrame(function(){return nE.g?
23
+ nE.g(a):nE.call(null,a)}));else{for(e=0;;)if(e<20)q[e]=c[e],w[e]=p[e],e+=1;else break;lE(a);a.__xSoftBodyRaf=null}}return null};$APP.ka("baredom.exports.x_soft_body.init",wE);export const init=wE;
package/dist/x-spacer.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var DG=function(a){return a!=null&&$APP.O((""+$APP.S.g(a)).trim().toLowerCase(),"false")},JG=function(a){var b=new $APP.P(null,3,[$APP.Yk,a.getAttribute("size"),EG,a.getAttribute("axis"),FG,a.getAttribute("grow")],null);b=$APP.N(b);var c=$APP.G(b,$APP.Yk),d=$APP.G(b,EG);b=$APP.G(b,FG);c=typeof c==="string"&&c.trim().length>0?c.trim():"1rem";d=typeof d==="string"?d.trim().toLowerCase():null;d=$APP.J(GG,d)?d:"vertical";b=new $APP.P(null,3,[$APP.rh,c,HG,d,IG,DG(b)],null);c=$APP.N(b);b=$APP.G(c,$APP.rh);
3
- d=$APP.G(c,HG);c=$APP.G(c,IG);var e=a.style;a.setAttribute("data-axis",d);a.setAttribute("data-grow",$APP.r(c)?"true":"false");e.setProperty("--x-spacer-size",b);a.setAttribute("role","none");a.setAttribute("aria-hidden","true")},KG=function(a,b,c){Object.defineProperty(a,b,{get:function(){var d=this.getAttribute(b);return $APP.r(d)?d:c},set:function(d){return d!=null?this.setAttribute(b,""+$APP.S.g(d)):this.removeAttribute(b)},enumerable:!0,configurable:!0})},LG=function(a){Object.defineProperty(a,
4
- "grow",{get:function(){return DG(this.getAttribute("grow"))},set:function(b){return $APP.r(b)?this.setAttribute("grow",""):this.removeAttribute("grow")},enumerable:!0,configurable:!0})},MG=function(a){KG(a,"size","1rem");KG(a,"axis","vertical");LG(a)},OG=function(){var a=class extends HTMLElement{};a.observedAttributes=NG;a.prototype.connectedCallback=function(){if(!$APP.r($APP.l(this,"__xSpacerRefs"))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style");c.textContent=":host{display:block;flex-shrink:0;height:var(--x-spacer-size,1rem);width:0;pointer-events:none;}:host([data-axis\x3d'horizontal']){height:0;width:var(--x-spacer-size,1rem);}:host([data-grow\x3d'true']){flex:1 0 var(--x-spacer-size,0px);height:0;width:0;}";
5
- b.appendChild(c);this.__xSpacerRefs={root:b}}JG(this);return null};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=function(b,c,d){b=$APP.O(c,d);$APP.r(b?$APP.l(this,"__xSpacerRefs"):b)&&JG(this);return null};MG(a.prototype);return a},PG=function(){$APP.r(customElements.get("x-spacer"))||customElements.define("x-spacer",OG());return null},HG=new $APP.M(null,"axis","axis",-1215390822),IG=new $APP.M(null,"grow?","grow?",2124334580),FG=new $APP.M(null,"grow-raw",
6
- "grow-raw",441172903),EG=new $APP.M(null,"axis-raw","axis-raw",291213231);var NG=["size","axis","grow"],GG=new $APP.R(null,new $APP.P(null,2,["vertical",null,"horizontal",null],null),null);$APP.ka("baredom.exports.x_spacer.init",PG);export const init=PG;
2
+ var hH=function(a){return a!=null&&$APP.O((""+$APP.S.g(a)).trim().toLowerCase(),"false")},nH=function(a){var b=new $APP.P(null,3,[$APP.Zk,a.getAttribute("size"),iH,a.getAttribute("axis"),jH,a.getAttribute("grow")],null);b=$APP.N(b);var c=$APP.G(b,$APP.Zk),d=$APP.G(b,iH);b=$APP.G(b,jH);c=typeof c==="string"&&c.trim().length>0?c.trim():"1rem";d=typeof d==="string"?d.trim().toLowerCase():null;d=$APP.J(kH,d)?d:"vertical";b=new $APP.P(null,3,[$APP.rh,c,lH,d,mH,hH(b)],null);c=$APP.N(b);b=$APP.G(c,$APP.rh);
3
+ d=$APP.G(c,lH);c=$APP.G(c,mH);var e=a.style;a.setAttribute("data-axis",d);a.setAttribute("data-grow",$APP.r(c)?"true":"false");e.setProperty("--x-spacer-size",b);a.setAttribute("role","none");a.setAttribute("aria-hidden","true")},oH=function(a,b,c){Object.defineProperty(a,b,{get:function(){var d=this.getAttribute(b);return $APP.r(d)?d:c},set:function(d){return d!=null?this.setAttribute(b,""+$APP.S.g(d)):this.removeAttribute(b)},enumerable:!0,configurable:!0})},pH=function(a){Object.defineProperty(a,
4
+ "grow",{get:function(){return hH(this.getAttribute("grow"))},set:function(b){return $APP.r(b)?this.setAttribute("grow",""):this.removeAttribute("grow")},enumerable:!0,configurable:!0})},qH=function(a){oH(a,"size","1rem");oH(a,"axis","vertical");pH(a)},sH=function(){var a=class extends HTMLElement{};a.observedAttributes=rH;a.prototype.connectedCallback=function(){if(!$APP.r($APP.l(this,"__xSpacerRefs"))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style");c.textContent=":host{display:block;flex-shrink:0;height:var(--x-spacer-size,1rem);width:0;pointer-events:none;}:host([data-axis\x3d'horizontal']){height:0;width:var(--x-spacer-size,1rem);}:host([data-grow\x3d'true']){flex:1 0 var(--x-spacer-size,0px);height:0;width:0;}";
5
+ b.appendChild(c);this.__xSpacerRefs={root:b}}nH(this);return null};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=function(b,c,d){b=$APP.O(c,d);$APP.r(b?$APP.l(this,"__xSpacerRefs"):b)&&nH(this);return null};qH(a.prototype);return a},tH=function(){$APP.r(customElements.get("x-spacer"))||customElements.define("x-spacer",sH());return null},lH=new $APP.K(null,"axis","axis",-1215390822),mH=new $APP.K(null,"grow?","grow?",2124334580),jH=new $APP.K(null,"grow-raw",
6
+ "grow-raw",441172903),iH=new $APP.K(null,"axis-raw","axis-raw",291213231);var rH=["size","axis","grow"],kH=new $APP.R(null,new $APP.P(null,2,["vertical",null,"horizontal",null],null),null);$APP.ka("baredom.exports.x_spacer.init",tH);export const init=tH;
package/dist/x-spinner.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var wV=function(a){var b=new $APP.P(null,3,[$APP.rh,a.getAttribute("size"),$APP.Fh,a.getAttribute("variant"),$APP.T,a.getAttribute("label")],null);var c=$APP.N(b),d=$APP.G(c,$APP.rh);b=$APP.G(c,$APP.Fh);c=$APP.G(c,$APP.T);d=typeof d==="string"&&$APP.J(uV,d)?d:"md";b=typeof b==="string"&&$APP.J(vV,b)?b:"default";c=typeof c==="string"&&$APP.O("",c.trim())?c.trim():"Loading";d=$APP.N(new $APP.P(null,3,[$APP.rh,d,$APP.Fh,b,$APP.T,c],null));b=$APP.G(d,$APP.rh);c=$APP.G(d,$APP.Fh);d=$APP.G(d,$APP.T);a.setAttribute("data-size",
3
- b);a.setAttribute("data-variant",c);a.setAttribute("aria-label",d)},xV=function(a){Object.defineProperty(a,"size",{get:function(){var b=this.getAttribute("size");return $APP.r(b)?b:"md"},set:function(b){return $APP.r(b)?this.setAttribute("size",""+$APP.S.g(b)):this.removeAttribute("size")},enumerable:!0,configurable:!0});Object.defineProperty(a,"variant",{get:function(){var b=this.getAttribute("variant");return $APP.r(b)?b:"default"},set:function(b){return $APP.r(b)?this.setAttribute("variant",""+
4
- $APP.S.g(b)):this.removeAttribute("variant")},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.r(b)?b:"Loading"},set:function(b){return $APP.r(b)?this.setAttribute("label",""+$APP.S.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0})},zV=function(){var a=class extends HTMLElement{};a.observedAttributes=yV;a.prototype.connectedCallback=function(){if(!$APP.r($APP.l(this,"__xSpinnerInit"))){var b=this.attachShadow({mode:"open"}),
5
- c=document.createElement("style"),d=document.createElement("span");c.textContent=":host{display:inline-flex;align-items:center;justify-content:center;color-scheme:light dark;--x-spinner-size:24px;--x-spinner-color:currentColor;--x-spinner-track-color:rgba(0,0,0,0.12);--x-spinner-thickness:2px;--x-spinner-duration:0.75s;}@media (prefers-color-scheme:dark){:host{--x-spinner-track-color:rgba(255,255,255,0.15);}}:host([data-size\x3d'xs']){--x-spinner-size:16px;}:host([data-size\x3d'sm']){--x-spinner-size:20px;}:host([data-size\x3d'md']){--x-spinner-size:24px;}:host([data-size\x3d'lg']){--x-spinner-size:32px;}:host([data-size\x3d'xl']){--x-spinner-size:48px;}:host([data-variant\x3d'primary']){--x-spinner-color:#3b82f6;}:host([data-variant\x3d'success']){--x-spinner-color:#22c55e;}:host([data-variant\x3d'warning']){--x-spinner-color:#f59e0b;}:host([data-variant\x3d'danger']){--x-spinner-color:#ef4444;}[part\x3dring]{display:block;width:var(--x-spinner-size);height:var(--x-spinner-size);border-radius:50%;border:var(--x-spinner-thickness) solid var(--x-spinner-track-color);border-top-color:var(--x-spinner-color);box-sizing:border-box;animation:x-spinner-spin var(--x-spinner-duration) linear infinite;}@keyframes x-spinner-spin{to{transform:rotate(360deg);}}@media (prefers-reduced-motion:reduce){[part\x3dring]{animation-play-state:paused;}}";
6
- d.setAttribute("part","ring");d.setAttribute("aria-hidden","true");b.appendChild(c);b.appendChild(d);this.setAttribute("role","status");this.setAttribute("aria-live","polite");this.__xSpinnerRing=d;this.__xSpinnerInit=!0}wV(this);return null};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=function(b,c,d){b=$APP.O(c,d);$APP.r(b?$APP.l(this,"__xSpinnerInit"):b)&&wV(this);return null};xV(a.prototype);return a},AV=function(){$APP.r(customElements.get("x-spinner"))||
7
- customElements.define("x-spinner",zV());return null};var yV=["size","variant","label"],uV=new $APP.R(null,new $APP.P(null,5,["xs",null,"md",null,"lg",null,"xl",null,"sm",null],null),null),vV=new $APP.R(null,new $APP.P(null,5,["success",null,"warning",null,"primary",null,"danger",null,"default",null],null),null);$APP.ka("baredom.exports.x_spinner.init",AV);export const init=AV;
2
+ var aW=function(a){var b=new $APP.P(null,3,[$APP.rh,a.getAttribute("size"),$APP.Fh,a.getAttribute("variant"),$APP.T,a.getAttribute("label")],null);var c=$APP.N(b),d=$APP.G(c,$APP.rh);b=$APP.G(c,$APP.Fh);c=$APP.G(c,$APP.T);d=typeof d==="string"&&$APP.J(ZV,d)?d:"md";b=typeof b==="string"&&$APP.J($V,b)?b:"default";c=typeof c==="string"&&$APP.O("",c.trim())?c.trim():"Loading";d=$APP.N(new $APP.P(null,3,[$APP.rh,d,$APP.Fh,b,$APP.T,c],null));b=$APP.G(d,$APP.rh);c=$APP.G(d,$APP.Fh);d=$APP.G(d,$APP.T);a.setAttribute("data-size",
3
+ b);a.setAttribute("data-variant",c);a.setAttribute("aria-label",d)},bW=function(a){Object.defineProperty(a,"size",{get:function(){var b=this.getAttribute("size");return $APP.r(b)?b:"md"},set:function(b){return $APP.r(b)?this.setAttribute("size",""+$APP.S.g(b)):this.removeAttribute("size")},enumerable:!0,configurable:!0});Object.defineProperty(a,"variant",{get:function(){var b=this.getAttribute("variant");return $APP.r(b)?b:"default"},set:function(b){return $APP.r(b)?this.setAttribute("variant",""+
4
+ $APP.S.g(b)):this.removeAttribute("variant")},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.r(b)?b:"Loading"},set:function(b){return $APP.r(b)?this.setAttribute("label",""+$APP.S.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0})},dW=function(){var a=class extends HTMLElement{};a.observedAttributes=cW;a.prototype.connectedCallback=function(){if(!$APP.r($APP.l(this,"__xSpinnerInit"))){var b=this.attachShadow({mode:"open"}),
5
+ c=document.createElement("style"),d=document.createElement("span");c.textContent=":host{display:inline-flex;align-items:center;justify-content:center;color-scheme:light dark;--x-spinner-size:24px;--x-spinner-color:currentColor;--x-spinner-track-color:rgba(0,0,0,0.12);--x-spinner-thickness:2px;--x-spinner-duration:0.75s;}@media (prefers-color-scheme:dark){:host{--x-spinner-track-color:rgba(255,255,255,0.15);}}:host([data-size\x3d'xs']){--x-spinner-size:16px;}:host([data-size\x3d'sm']){--x-spinner-size:20px;}:host([data-size\x3d'md']){--x-spinner-size:24px;}:host([data-size\x3d'lg']){--x-spinner-size:32px;}:host([data-size\x3d'xl']){--x-spinner-size:48px;}:host([data-variant\x3d'primary']){--x-spinner-color:var(--x-color-primary,#3b82f6);}:host([data-variant\x3d'success']){--x-spinner-color:var(--x-color-success,#22c55e);}:host([data-variant\x3d'warning']){--x-spinner-color:var(--x-color-warning,#f59e0b);}:host([data-variant\x3d'danger']){--x-spinner-color:var(--x-color-danger,#ef4444);}[part\x3dring]{display:block;width:var(--x-spinner-size);height:var(--x-spinner-size);border-radius:50%;border:var(--x-spinner-thickness) solid var(--x-spinner-track-color);border-top-color:var(--x-spinner-color);box-sizing:border-box;animation:x-spinner-spin var(--x-spinner-duration) linear infinite;}@keyframes x-spinner-spin{to{transform:rotate(360deg);}}@media (prefers-reduced-motion:reduce){[part\x3dring]{animation-play-state:paused;}}";
6
+ d.setAttribute("part","ring");d.setAttribute("aria-hidden","true");b.appendChild(c);b.appendChild(d);this.setAttribute("role","status");this.setAttribute("aria-live","polite");this.__xSpinnerRing=d;this.__xSpinnerInit=!0}aW(this);return null};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=function(b,c,d){b=$APP.O(c,d);$APP.r(b?$APP.l(this,"__xSpinnerInit"):b)&&aW(this);return null};bW(a.prototype);return a},eW=function(){$APP.r(customElements.get("x-spinner"))||
7
+ customElements.define("x-spinner",dW());return null};var cW=["size","variant","label"],ZV=new $APP.R(null,new $APP.P(null,5,["xs",null,"md",null,"lg",null,"xl",null,"sm",null],null),null),$V=new $APP.R(null,new $APP.P(null,5,["success",null,"warning",null,"primary",null,"danger",null,"default",null],null),null);$APP.ka("baredom.exports.x_spinner.init",eW);export const init=eW;
package/dist/x-splash.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var CI=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.r(isNaN(a))?null:$APP.Yg.i(0,$APP.Zg.i(100,a))):null},DI=function(a){return a==null?!0:$APP.O((""+$APP.S.g(a)).trim().toLowerCase(),"false")},II=function(a){var b=$APP.l(a,"__xSplashRefs");if($APP.r(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("slot"),h=document.createElement("span"),k=document.createElement("div"),
3
- m=document.createElement("div");c.textContent=":host{display:block;color-scheme:light dark;--x-splash-bg:#ffffff;--x-splash-color:#0f172a;--x-splash-z-index:9999;--x-splash-fade-duration:400ms;--x-splash-fade-ease:cubic-bezier(0.4,0,0.2,1);--x-splash-spinner-size:40px;--x-splash-spinner-color:currentColor;--x-splash-spinner-track-color:rgba(0,0,0,0.12);--x-splash-spinner-thickness:3px;--x-splash-spinner-duration:0.75s;--x-splash-progress-height:4px;--x-splash-progress-color:#3b82f6;--x-splash-progress-track-color:rgba(0,0,0,0.08);--x-splash-progress-radius:2px;--x-splash-gap:20px;--x-splash-blur-amount:8px;}@media (prefers-color-scheme:dark){:host{--x-splash-bg:#0f172a;--x-splash-color:#f8fafc;--x-splash-spinner-track-color:rgba(255,255,255,0.15);--x-splash-progress-track-color:rgba(255,255,255,0.12);}}[part\x3doverlay]{position:fixed;inset:0;z-index:var(--x-splash-z-index);display:none;align-items:center;justify-content:center;background:var(--x-splash-bg);color:var(--x-splash-color);opacity:0;transition:opacity var(--x-splash-fade-duration) var(--x-splash-fade-ease);}:host([active]) [part\x3doverlay]{display:flex;opacity:1;}:host([data-fading-out]) [part\x3doverlay]{display:flex;opacity:0;}:host([data-variant\x3d'minimal']) [part\x3doverlay]{background:transparent;}:host([data-variant\x3d'branded']) [part\x3doverlay]{background:var(--x-splash-branded-bg,var(--x-splash-bg));}:host([data-overlay\x3d'blur']) [part\x3doverlay]{background:rgba(255,255,255,0.7);backdrop-filter:blur(var(--x-splash-blur-amount));-webkit-backdrop-filter:blur(var(--x-splash-blur-amount));}@media (prefers-color-scheme:dark){:host([data-overlay\x3d'blur']) [part\x3doverlay]{background:rgba(15,23,42,0.7);}}:host([data-overlay\x3d'transparent']) [part\x3doverlay]{background:transparent;}[part\x3dcontent]{display:flex;flex-direction:column;align-items:center;gap:var(--x-splash-gap);max-width:80vw;text-align:center;}[part\x3dspinner]{display:block;width:var(--x-splash-spinner-size);height:var(--x-splash-spinner-size);border:var(--x-splash-spinner-thickness) solid var(--x-splash-spinner-track-color);border-top-color:var(--x-splash-spinner-color);border-radius:50%;animation:x-splash-spin var(--x-splash-spinner-duration) linear infinite;box-sizing:border-box;}@keyframes x-splash-spin{to{transform:rotate(360deg);}}[part\x3dprogress]{display:none;width:min(300px,60vw);height:var(--x-splash-progress-height);background:var(--x-splash-progress-track-color);border-radius:var(--x-splash-progress-radius);overflow:hidden;}[part\x3dbar]{height:100%;background:var(--x-splash-progress-color);border-radius:var(--x-splash-progress-radius);transition:width 200ms ease;width:0%;}@media (prefers-reduced-motion:reduce){[part\x3doverlay]{transition:none !important;}[part\x3dspinner]{animation:none !important;}[part\x3dbar]{transition:none !important;}}";
4
- d.setAttribute("part","overlay");e.setAttribute("part","content");h.setAttribute("part","spinner");h.setAttribute("aria-hidden","true");k.setAttribute("part","progress");k.setAttribute("role","progressbar");k.setAttribute("aria-valuemin","0");k.setAttribute("aria-valuemax","100");m.setAttribute("part","bar");k.appendChild(m);e.appendChild(g);e.appendChild(h);e.appendChild(k);d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xSplashRefs=new $APP.P(null,6,[$APP.bi,b,EI,d,FI,e,GI,h,$APP.Ei,k,HI,
5
- m],null);return $APP.l(a,"__xSplashRefs")},JI=function(a){a=typeof a==="string"?a.trim():"";return $APP.D.i(a,"")||$APP.D.i(a,"0")||$APP.D.i(a,"0ms")||$APP.D.i(a,"0s")?0:$APP.r(a.endsWith("ms"))?(a=parseFloat(a.slice(0,a.length-2)),$APP.r(isNaN(a))?0:Math.max(0,Math.round(a))):$APP.r(a.endsWith("s"))?(a=parseFloat(a.slice(0,a.length-1)),$APP.r(isNaN(a))?0:Math.max(0,Math.round(1E3*a))):0},KI=function(a){a=window.getComputedStyle(a);a=JI(a.getPropertyValue("--x-splash-fade-duration"));return a>0?a:
6
- 400},LI=function(a){var b=$APP.l(a,"__xSplashFadeTimer");$APP.r(b)&&(clearTimeout(b),a.__xSplashFadeTimer=null)},MI=function(a){LI(a);a.__xSplashFadingOut=!1;a.removeAttribute("data-fading-out");var b=II(a);b=$APP.N(b);$APP.G(b,EI).style.display="none";a.removeAttribute("aria-busy");b=new CustomEvent("x-splash-hidden",{detail:{},bubbles:!0,composed:!0,cancelable:!1});a.dispatchEvent(b);return null},NI=function(a){if(!$APP.r($APP.l(a,"__xSplashFadingOut")))if(a.__xSplashFadingOut=!0,$APP.I(window.matchMedia("(prefers-reduced-motion:reduce)").matches))MI(a);
7
- else{var b=II(a);b=$APP.N(b);var c=$APP.G(b,EI),d=function h(g){return $APP.D.i(g.target,c)&&$APP.D.i(g.propertyName,"opacity")?(c.removeEventListener("transitionend",h),$APP.r($APP.l(a,"__xSplashFadingOut"))?MI(a):null):null};c.style.display="flex";c.style.opacity="1";a.setAttribute("data-fading-out","");c.addEventListener("transitionend",d);requestAnimationFrame(function(){return requestAnimationFrame(function(){return $APP.r($APP.l(a,"__xSplashFadingOut"))?c.style.opacity="0":null})});$APP.n(a,
8
- "__xSplashFadeTimer",setTimeout(function(){return $APP.r($APP.l(a,"__xSplashFadingOut"))?(c.removeEventListener("transitionend",d),MI(a)):null},KI(a)+60))}},WI=function(a){var b=new $APP.P(null,5,[OI,a.hasAttribute("active"),$APP.Ak,a.getAttribute("variant"),$APP.tj,a.getAttribute("progress"),PI,a.getAttribute("spinner"),QI,a.getAttribute("overlay")],null);var c=$APP.N(b);b=$APP.G(c,OI);var d=$APP.G(c,$APP.Ak),e=$APP.G(c,$APP.tj),g=$APP.G(c,PI);c=$APP.G(c,QI);b=$APP.I(b);d=typeof d==="string"?d.trim().toLowerCase():
9
- null;d=$APP.J(RI,d)?d:"default";e=CI(e);g=DI(g);c=typeof c==="string"?c.trim().toLowerCase():null;c=$APP.J(SI,c)?c:"solid";b=new $APP.P(null,5,[TI,b,$APP.Fh,d,$APP.dl,e,UI,g,VI,c],null);if($APP.O($APP.l(a,"__xSplashModel"),b)){b=$APP.N(b);c=$APP.G(b,TI);e=$APP.G(b,$APP.Fh);d=$APP.G(b,$APP.dl);var h=$APP.G(b,UI),k=$APP.G(b,VI);g=II(a);var m=$APP.N(g);g=$APP.G(m,EI);var p=$APP.G(m,GI),q=$APP.G(m,$APP.Ei),w=$APP.G(m,HI);m=$APP.l(a,"__xSplashModel");var x=TI.g(m);a.setAttribute("data-variant",e);a.setAttribute("data-overlay",
10
- k);p.style.display=$APP.r(h)?"block":"none";d!=null?(q.style.display="block",w.style.width=""+$APP.S.g(d)+"%",q.setAttribute("aria-valuenow",""+$APP.S.g(d))):(q.style.display="none",q.removeAttribute("aria-valuenow"));$APP.r($APP.r(c)?$APP.t(x):c)?($APP.r($APP.l(a,"__xSplashFadingOut"))&&(LI(a),a.__xSplashFadingOut=!1,a.removeAttribute("data-fading-out"),c=II(a),c=$APP.N(c),c=$APP.G(c,EI),c.style.display="",c.style.opacity=""),a.setAttribute("aria-busy","true"),a.setAttribute("aria-live","polite"),
11
- a.setAttribute("role","status"),g.style.display="",g.style.opacity=""):(e=$APP.t(c),$APP.r(e?x:e)?NI(a):$APP.t(c)&&m==null&&(g.style.display="none",a.removeAttribute("aria-busy")));$APP.r(a.hasAttribute("aria-label"))||a.setAttribute("aria-label","Loading");a.__xSplashModel=b}},XI=function(a){Object.defineProperty(a,"active",{get:function(){return this.hasAttribute("active")},set:function(b){return $APP.r(b)?this.setAttribute("active",""):this.removeAttribute("active")},enumerable:!0,configurable:!0});
12
- Object.defineProperty(a,"variant",{get:function(){var b=this.getAttribute("variant");return $APP.r(b)?b:"default"},set:function(b){return $APP.r(b)?this.setAttribute("variant",""+$APP.S.g(b)):this.removeAttribute("variant")},enumerable:!0,configurable:!0});Object.defineProperty(a,"progress",{get:function(){return CI(this.getAttribute("progress"))},set:function(b){return b==null?this.removeAttribute("progress"):this.setAttribute("progress",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,
13
- "spinner",{get:function(){return DI(this.getAttribute("spinner"))},set:function(b){return $APP.r(b)?this.setAttribute("spinner",""):this.setAttribute("spinner","false")},enumerable:!0,configurable:!0});Object.defineProperty(a,"overlay",{get:function(){var b=this.getAttribute("overlay");return $APP.r(b)?b:"solid"},set:function(b){return $APP.r(b)?this.setAttribute("overlay",""+$APP.S.g(b)):this.removeAttribute("overlay")},enumerable:!0,configurable:!0})},ZI=function(){var a=class extends HTMLElement{};
14
- a.observedAttributes=YI;a.prototype.connectedCallback=function(){II(this);LI(this);WI(this);return null};a.prototype.disconnectedCallback=function(){LI(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&WI(this);return null};XI(a.prototype);return a},$I=function(){$APP.r(customElements.get("x-splash"))||customElements.define("x-splash",ZI());return null},EI=new $APP.M(null,"overlay-el","overlay-el",-308547109),FI=new $APP.M(null,"content-el","content-el",-1423019925),
15
- GI=new $APP.M(null,"spinner-el","spinner-el",-1536400516),HI=new $APP.M(null,"bar-el","bar-el",2050414242),UI=new $APP.M(null,"spinner?","spinner?",939139177),TI=new $APP.M(null,"active?","active?",459499776),OI=new $APP.M(null,"active-present?","active-present?",73064660),PI=new $APP.M(null,"spinner-attr","spinner-attr",-479327548),QI=new $APP.M(null,"overlay-raw","overlay-raw",1018775670),VI=new $APP.M(null,"overlay","overlay",-139131598);var YI=["active","variant","progress","spinner","overlay"];$APP.Sd(["x-splash-hidden",new $APP.P(null,2,[$APP.U,$APP.Td,$APP.kl,!1],null)]);var RI=new $APP.R(null,new $APP.P(null,3,["minimal",null,"branded",null,"default",null],null),null),SI=new $APP.R(null,new $APP.P(null,3,["transparent",null,"solid",null,"blur",null],null),null);$APP.ka("baredom.exports.x_splash.init",$I);export const init=$I;
2
+ var gJ=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.r(isNaN(a))?null:$APP.Yg.i(0,$APP.Zg.i(100,a))):null},hJ=function(a){return a==null?!0:$APP.O((""+$APP.S.g(a)).trim().toLowerCase(),"false")},mJ=function(a){var b=$APP.l(a,"__xSplashRefs");if($APP.r(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("slot"),h=document.createElement("span"),k=document.createElement("div"),
3
+ m=document.createElement("div");c.textContent=":host{display:block;color-scheme:light dark;--x-splash-bg:var(--x-color-bg, #ffffff);--x-splash-color:var(--x-color-text, #0f172a);--x-splash-z-index:9999;--x-splash-fade-duration:var(--x-transition-duration, 400ms);--x-splash-fade-ease:cubic-bezier(0.4,0,0.2,1);--x-splash-spinner-size:40px;--x-splash-spinner-color:var(--x-color-text, currentColor);--x-splash-spinner-track-color:var(--x-color-border, rgba(0,0,0,0.12));--x-splash-spinner-thickness:3px;--x-splash-spinner-duration:0.75s;--x-splash-progress-height:4px;--x-splash-progress-color:var(--x-color-primary, #3b82f6);--x-splash-progress-track-color:var(--x-color-border, rgba(0,0,0,0.08));--x-splash-progress-radius:var(--x-radius-sm, 2px);--x-splash-gap:20px;--x-splash-blur-amount:8px;}@media (prefers-color-scheme:dark){:host{--x-splash-bg:var(--x-color-bg, #0f172a);--x-splash-color:var(--x-color-text, #f8fafc);--x-splash-spinner-track-color:var(--x-color-border, rgba(255,255,255,0.15));--x-splash-progress-track-color:var(--x-color-border, rgba(255,255,255,0.12));}}[part\x3doverlay]{position:fixed;inset:0;z-index:var(--x-splash-z-index);display:none;align-items:center;justify-content:center;background:var(--x-splash-bg);color:var(--x-splash-color);opacity:0;transition:opacity var(--x-splash-fade-duration) var(--x-splash-fade-ease);}:host([active]) [part\x3doverlay]{display:flex;opacity:1;}:host([data-fading-out]) [part\x3doverlay]{display:flex;opacity:0;}:host([data-variant\x3d'minimal']) [part\x3doverlay]{background:transparent;}:host([data-variant\x3d'branded']) [part\x3doverlay]{background:var(--x-splash-branded-bg,var(--x-splash-bg));}:host([data-overlay\x3d'blur']) [part\x3doverlay]{background:rgba(255,255,255,0.7);backdrop-filter:blur(var(--x-splash-blur-amount));-webkit-backdrop-filter:blur(var(--x-splash-blur-amount));}@media (prefers-color-scheme:dark){:host([data-overlay\x3d'blur']) [part\x3doverlay]{background:rgba(15,23,42,0.7);}}:host([data-overlay\x3d'transparent']) [part\x3doverlay]{background:transparent;}[part\x3dcontent]{display:flex;flex-direction:column;align-items:center;gap:var(--x-splash-gap);max-width:80vw;text-align:center;}[part\x3dspinner]{display:block;width:var(--x-splash-spinner-size);height:var(--x-splash-spinner-size);border:var(--x-splash-spinner-thickness) solid var(--x-splash-spinner-track-color);border-top-color:var(--x-splash-spinner-color);border-radius:50%;animation:x-splash-spin var(--x-splash-spinner-duration) linear infinite;box-sizing:border-box;}@keyframes x-splash-spin{to{transform:rotate(360deg);}}[part\x3dprogress]{display:none;width:min(300px,60vw);height:var(--x-splash-progress-height);background:var(--x-splash-progress-track-color);border-radius:var(--x-splash-progress-radius);overflow:hidden;}[part\x3dbar]{height:100%;background:var(--x-splash-progress-color);border-radius:var(--x-splash-progress-radius);transition:width 200ms ease;width:0%;}@media (prefers-reduced-motion:reduce){[part\x3doverlay]{transition:none !important;}[part\x3dspinner]{animation:none !important;}[part\x3dbar]{transition:none !important;}}";
4
+ d.setAttribute("part","overlay");e.setAttribute("part","content");h.setAttribute("part","spinner");h.setAttribute("aria-hidden","true");k.setAttribute("part","progress");k.setAttribute("role","progressbar");k.setAttribute("aria-valuemin","0");k.setAttribute("aria-valuemax","100");m.setAttribute("part","bar");k.appendChild(m);e.appendChild(g);e.appendChild(h);e.appendChild(k);d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xSplashRefs=new $APP.P(null,6,[$APP.bi,b,iJ,d,jJ,e,kJ,h,$APP.Ei,k,lJ,
5
+ m],null);return $APP.l(a,"__xSplashRefs")},nJ=function(a){a=typeof a==="string"?a.trim():"";return $APP.D.i(a,"")||$APP.D.i(a,"0")||$APP.D.i(a,"0ms")||$APP.D.i(a,"0s")?0:$APP.r(a.endsWith("ms"))?(a=parseFloat(a.slice(0,a.length-2)),$APP.r(isNaN(a))?0:Math.max(0,Math.round(a))):$APP.r(a.endsWith("s"))?(a=parseFloat(a.slice(0,a.length-1)),$APP.r(isNaN(a))?0:Math.max(0,Math.round(1E3*a))):0},oJ=function(a){a=window.getComputedStyle(a);a=nJ(a.getPropertyValue("--x-splash-fade-duration"));return a>0?a:
6
+ 400},pJ=function(a){var b=$APP.l(a,"__xSplashFadeTimer");$APP.r(b)&&(clearTimeout(b),a.__xSplashFadeTimer=null)},qJ=function(a){pJ(a);a.__xSplashFadingOut=!1;a.removeAttribute("data-fading-out");var b=mJ(a);b=$APP.N(b);$APP.G(b,iJ).style.display="none";a.removeAttribute("aria-busy");b=new CustomEvent("x-splash-hidden",{detail:{},bubbles:!0,composed:!0,cancelable:!1});a.dispatchEvent(b);return null},rJ=function(a){if(!$APP.r($APP.l(a,"__xSplashFadingOut")))if(a.__xSplashFadingOut=!0,$APP.I(window.matchMedia("(prefers-reduced-motion:reduce)").matches))qJ(a);
7
+ else{var b=mJ(a);b=$APP.N(b);var c=$APP.G(b,iJ),d=function h(g){return $APP.D.i(g.target,c)&&$APP.D.i(g.propertyName,"opacity")?(c.removeEventListener("transitionend",h),$APP.r($APP.l(a,"__xSplashFadingOut"))?qJ(a):null):null};c.style.display="flex";c.style.opacity="1";a.setAttribute("data-fading-out","");c.addEventListener("transitionend",d);requestAnimationFrame(function(){return requestAnimationFrame(function(){return $APP.r($APP.l(a,"__xSplashFadingOut"))?c.style.opacity="0":null})});$APP.n(a,
8
+ "__xSplashFadeTimer",setTimeout(function(){return $APP.r($APP.l(a,"__xSplashFadingOut"))?(c.removeEventListener("transitionend",d),qJ(a)):null},oJ(a)+60))}},AJ=function(a){var b=new $APP.P(null,5,[sJ,a.hasAttribute("active"),$APP.Bk,a.getAttribute("variant"),$APP.tj,a.getAttribute("progress"),tJ,a.getAttribute("spinner"),uJ,a.getAttribute("overlay")],null);var c=$APP.N(b);b=$APP.G(c,sJ);var d=$APP.G(c,$APP.Bk),e=$APP.G(c,$APP.tj),g=$APP.G(c,tJ);c=$APP.G(c,uJ);b=$APP.I(b);d=typeof d==="string"?d.trim().toLowerCase():
9
+ null;d=$APP.J(vJ,d)?d:"default";e=gJ(e);g=hJ(g);c=typeof c==="string"?c.trim().toLowerCase():null;c=$APP.J(wJ,c)?c:"solid";b=new $APP.P(null,5,[xJ,b,$APP.Fh,d,$APP.el,e,yJ,g,zJ,c],null);if($APP.O($APP.l(a,"__xSplashModel"),b)){b=$APP.N(b);c=$APP.G(b,xJ);e=$APP.G(b,$APP.Fh);d=$APP.G(b,$APP.el);var h=$APP.G(b,yJ),k=$APP.G(b,zJ);g=mJ(a);var m=$APP.N(g);g=$APP.G(m,iJ);var p=$APP.G(m,kJ),q=$APP.G(m,$APP.Ei),w=$APP.G(m,lJ);m=$APP.l(a,"__xSplashModel");var x=xJ.g(m);a.setAttribute("data-variant",e);a.setAttribute("data-overlay",
10
+ k);p.style.display=$APP.r(h)?"block":"none";d!=null?(q.style.display="block",w.style.width=""+$APP.S.g(d)+"%",q.setAttribute("aria-valuenow",""+$APP.S.g(d))):(q.style.display="none",q.removeAttribute("aria-valuenow"));$APP.r($APP.r(c)?$APP.t(x):c)?($APP.r($APP.l(a,"__xSplashFadingOut"))&&(pJ(a),a.__xSplashFadingOut=!1,a.removeAttribute("data-fading-out"),c=mJ(a),c=$APP.N(c),c=$APP.G(c,iJ),c.style.display="",c.style.opacity=""),a.setAttribute("aria-busy","true"),a.setAttribute("aria-live","polite"),
11
+ a.setAttribute("role","status"),g.style.display="",g.style.opacity=""):(e=$APP.t(c),$APP.r(e?x:e)?rJ(a):$APP.t(c)&&m==null&&(g.style.display="none",a.removeAttribute("aria-busy")));$APP.r(a.hasAttribute("aria-label"))||a.setAttribute("aria-label","Loading");a.__xSplashModel=b}},BJ=function(a){Object.defineProperty(a,"active",{get:function(){return this.hasAttribute("active")},set:function(b){return $APP.r(b)?this.setAttribute("active",""):this.removeAttribute("active")},enumerable:!0,configurable:!0});
12
+ Object.defineProperty(a,"variant",{get:function(){var b=this.getAttribute("variant");return $APP.r(b)?b:"default"},set:function(b){return $APP.r(b)?this.setAttribute("variant",""+$APP.S.g(b)):this.removeAttribute("variant")},enumerable:!0,configurable:!0});Object.defineProperty(a,"progress",{get:function(){return gJ(this.getAttribute("progress"))},set:function(b){return b==null?this.removeAttribute("progress"):this.setAttribute("progress",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,
13
+ "spinner",{get:function(){return hJ(this.getAttribute("spinner"))},set:function(b){return $APP.r(b)?this.setAttribute("spinner",""):this.setAttribute("spinner","false")},enumerable:!0,configurable:!0});Object.defineProperty(a,"overlay",{get:function(){var b=this.getAttribute("overlay");return $APP.r(b)?b:"solid"},set:function(b){return $APP.r(b)?this.setAttribute("overlay",""+$APP.S.g(b)):this.removeAttribute("overlay")},enumerable:!0,configurable:!0})},DJ=function(){var a=class extends HTMLElement{};
14
+ a.observedAttributes=CJ;a.prototype.connectedCallback=function(){mJ(this);pJ(this);AJ(this);return null};a.prototype.disconnectedCallback=function(){pJ(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&AJ(this);return null};BJ(a.prototype);return a},EJ=function(){$APP.r(customElements.get("x-splash"))||customElements.define("x-splash",DJ());return null},iJ=new $APP.K(null,"overlay-el","overlay-el",-308547109),jJ=new $APP.K(null,"content-el","content-el",-1423019925),
15
+ kJ=new $APP.K(null,"spinner-el","spinner-el",-1536400516),lJ=new $APP.K(null,"bar-el","bar-el",2050414242),yJ=new $APP.K(null,"spinner?","spinner?",939139177),xJ=new $APP.K(null,"active?","active?",459499776),sJ=new $APP.K(null,"active-present?","active-present?",73064660),tJ=new $APP.K(null,"spinner-attr","spinner-attr",-479327548),uJ=new $APP.K(null,"overlay-raw","overlay-raw",1018775670),zJ=new $APP.K(null,"overlay","overlay",-139131598);var CJ=["active","variant","progress","spinner","overlay"];$APP.Sd(["x-splash-hidden",new $APP.P(null,2,[$APP.U,$APP.Td,$APP.ll,!1],null)]);var vJ=new $APP.R(null,new $APP.P(null,3,["minimal",null,"branded",null,"default",null],null),null),wJ=new $APP.R(null,new $APP.P(null,3,["transparent",null,"solid",null,"blur",null],null),null);$APP.ka("baredom.exports.x_splash.init",EJ);export const init=EJ;
package/dist/x-stat.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var bK=function(a,b,c){return $APP.J(b,a)?a:c},cK=function(a){return $APP.r($APP.r(a)?$APP.O("",a):a)?a:null},lK=function(a){var b=$APP.N(a),c=$APP.G(b,dK),d=$APP.G(b,eK),e=$APP.G(b,$APP.Qi),g=$APP.G(b,$APP.Fh);a=$APP.G(b,$APP.ui);var h=$APP.G(b,$APP.$k),k=$APP.G(b,$APP.rh),m=$APP.G(b,$APP.Ck);b=$APP.G(b,$APP.T);g=bK(g,fK,"default");e=bK(e,gK,"start");k=bK(k,hK,"md");c=bK(c,iK,"normal");d=bK(d,jK,"neutral");m=$APP.I(m);return $APP.Q([eK,$APP.Qi,$APP.Fh,$APP.ui,$APP.$k,$APP.rh,$APP.Ck,$APP.T,kK,dK],
3
- [d,e,g,cK(a),cK(h),k,m,cK(b),m?"true":null,c])},mK=function(a){return $APP.Q([eK,$APP.Qi,$APP.Fh,$APP.ui,$APP.$k,$APP.rh,$APP.Ck,$APP.T,dK],[a.getAttribute("trend"),a.getAttribute("align"),a.getAttribute("variant"),a.getAttribute("value"),a.getAttribute("hint"),a.getAttribute("size"),a.hasAttribute("loading"),a.getAttribute("label"),a.getAttribute("emphasis")])},nK=function(a,b){a.setAttribute("role","figure");var c=kK.g(b);$APP.r(c)?a.setAttribute("aria-busy",c):a.removeAttribute("aria-busy");b=
4
- $APP.T.g(b);$APP.r(b)?a.setAttribute("aria-label",b):a.removeAttribute("aria-label")},oK=function(a,b){a.setAttribute("data-variant",$APP.Fh.g(b));a.setAttribute("data-align",$APP.Qi.g(b));a.setAttribute("data-size",$APP.rh.g(b));a.setAttribute("data-emphasis",dK.g(b));a.setAttribute("data-trend",eK.g(b));$APP.r($APP.Ck.g(b))?a.setAttribute("data-loading","true"):a.removeAttribute("data-loading")},pK=function(a){var b=lK(mK(a)),c=$APP.l(a,"__x_stat_base"),d=$APP.l(a,"__x_stat_label"),e=$APP.l(a,"__x_stat_value"),
5
- g=$APP.l(a,"__x_stat_hint");return $APP.r(c)?(nK(a,b),oK(c,b),d.textContent=function(){var h=$APP.T.g(b);return $APP.r(h)?h:""}(),e.textContent=function(){var h=$APP.ui.g(b);return $APP.r(h)?h:""}(),g.textContent=function(){var h=$APP.$k.g(b);return $APP.r(h)?h:""}()):null},qK=function(a){if($APP.l(a,"__x_stat_initialized")!==!0){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("div"),
6
- k=document.createElement("div"),m=document.createElement("div"),p=document.createElement("span"),q=document.createElement("span"),w=document.createElement("span"),x=document.createElement("slot"),y=document.createElement("slot"),A=document.createElement("slot"),C=document.createElement("slot"),E=document.createElement("slot");c.textContent=":host{display:block;color-scheme:light dark;--x-stat-background:transparent;--x-stat-color:inherit;--x-stat-muted-color:rgba(0,0,0,0.55);--x-stat-border-color:transparent;--x-stat-radius:12px;--x-stat-padding:16px;--x-stat-gap:6px;--x-stat-label-color:var(--x-stat-muted-color);--x-stat-label-size:12px;--x-stat-value-color:var(--x-stat-color);--x-stat-value-size:20px;--x-stat-hint-color:var(--x-stat-muted-color);--x-stat-hint-size:12px;--x-stat-icon-color:var(--x-stat-color);--x-stat-positive-color:#16a34a;--x-stat-warning-color:#d97706;--x-stat-danger-color:#dc2626;--x-stat-transition-duration:120ms;--x-stat-transition-timing:ease;--x-stat-loading-opacity:0.6;}@media (prefers-color-scheme:dark){:host{--x-stat-muted-color:rgba(255,255,255,0.55);--x-stat-positive-color:#4ade80;--x-stat-warning-color:#fbbf24;--x-stat-danger-color:#f87171;}}:host([variant\x3d'positive']){--x-stat-value-color:var(--x-stat-positive-color);}:host([variant\x3d'warning']){--x-stat-value-color:var(--x-stat-warning-color);}:host([variant\x3d'danger']){--x-stat-value-color:var(--x-stat-danger-color);}:host([variant\x3d'subtle']){--x-stat-value-color:var(--x-stat-muted-color);}[part\x3dbase]{display:grid;gap:var(--x-stat-gap);padding:var(--x-stat-padding);border-radius:var(--x-stat-radius);background:var(--x-stat-background);border:1px solid var(--x-stat-border-color);color:var(--x-stat-color);transition:background var(--x-stat-transition-duration) var(--x-stat-transition-timing),border-color var(--x-stat-transition-duration) var(--x-stat-transition-timing),color var(--x-stat-transition-duration) var(--x-stat-transition-timing),opacity var(--x-stat-transition-duration) var(--x-stat-transition-timing);}[part\x3dbase][data-align\x3d'center']{text-align:center;}[part\x3dbase][data-align\x3d'end']{text-align:end;}[part\x3dbase][data-size\x3d'sm'] [part\x3dvalue]{font-size:calc(var(--x-stat-value-size) * 0.8);}[part\x3dbase][data-size\x3d'lg'] [part\x3dvalue]{font-size:calc(var(--x-stat-value-size) * 1.6);}[part\x3dbase][data-emphasis\x3d'high'] [part\x3dvalue]{font-weight:800;}[part\x3dicon]{flex:0 0 auto;color:var(--x-stat-icon-color);line-height:1;}slot[name\x3dicon]::slotted(*){display:block;}[part\x3dlabel]{font-size:var(--x-stat-label-size);color:var(--x-stat-label-color);}[part\x3dvalue]{font-weight:600;font-size:var(--x-stat-value-size);color:var(--x-stat-value-color);}[part\x3dhint]{font-size:var(--x-stat-hint-size);color:var(--x-stat-hint-color);}[part\x3dbase][data-loading\x3d'true']{opacity:var(--x-stat-loading-opacity);}@media (prefers-reduced-motion:reduce){[part\x3dbase]{transition:none;}}";
7
- d.setAttribute("part","base");e.setAttribute("part","icon");g.setAttribute("part","body");h.setAttribute("part","label");k.setAttribute("part","value");m.setAttribute("part","hint");x.setAttribute("name","icon");y.setAttribute("name","label");A.setAttribute("name","value");C.setAttribute("name","hint");e.appendChild(x);h.appendChild(y);h.appendChild(p);k.appendChild(A);k.appendChild(q);m.appendChild(C);m.appendChild(w);g.appendChild(h);g.appendChild(k);g.appendChild(m);g.appendChild(E);d.appendChild(e);
8
- d.appendChild(g);b.appendChild(c);b.appendChild(d);a.__x_stat_root=b;a.__x_stat_base=d;a.__x_stat_label=p;a.__x_stat_value=q;a.__x_stat_hint=w;a.__x_stat_initialized=!0}pK(a);return a},rK=function(a,b){Object.defineProperty(a,b,{get:function(){var c=this.getAttribute(b);return $APP.r(c)?c:""},set:function(c){return $APP.r(c)?this.setAttribute(b,""+$APP.S.g(c)):this.removeAttribute(b)},enumerable:!0,configurable:!0})},sK=function(a){rK(a,"variant");rK(a,"align");rK(a,"size");rK(a,"emphasis");rK(a,
9
- "trend");rK(a,"label");rK(a,"value");rK(a,"hint");Object.defineProperty(a,"loading",{get:function(){return this.hasAttribute("loading")},set:function(b){return $APP.r(b)?this.setAttribute("loading",""):this.removeAttribute("loading")},enumerable:!0,configurable:!0})},uK=function(){var a=class extends HTMLElement{};a.observedAttributes=tK;a.prototype.connectedCallback=function(){return qK(this)};a.prototype.attributeChangedCallback=function(){return $APP.l(this,"__x_stat_initialized")===!0?pK(this):
10
- qK(this)};sK(a.prototype);return a},vK=function(){return $APP.r(customElements.get("x-stat"))?null:customElements.define("x-stat",uK())},dK=new $APP.M(null,"emphasis","emphasis",293543451),kK=new $APP.M(null,"aria-busy","aria-busy",793864247),eK=new $APP.M(null,"trend","trend",54563841);var tK="variant align size emphasis trend loading label value hint".split(" "),fK=new $APP.R(null,new $APP.P(null,5,["warning",null,"positive",null,"subtle",null,"danger",null,"default",null],null),null),gK=new $APP.R(null,new $APP.P(null,3,["center",null,"start",null,"end",null],null),null),hK=new $APP.R(null,new $APP.P(null,3,["md",null,"lg",null,"sm",null],null),null),iK=new $APP.R(null,new $APP.P(null,2,["high",null,"normal",null],null),null),jK=new $APP.R(null,new $APP.P(null,3,["neutral",null,
2
+ var GK=function(a,b,c){return $APP.J(b,a)?a:c},HK=function(a){return $APP.r($APP.r(a)?$APP.O("",a):a)?a:null},QK=function(a){var b=$APP.N(a),c=$APP.G(b,IK),d=$APP.G(b,JK),e=$APP.G(b,$APP.Qi),g=$APP.G(b,$APP.Fh);a=$APP.G(b,$APP.ri);var h=$APP.G(b,$APP.al),k=$APP.G(b,$APP.rh),m=$APP.G(b,$APP.Dk);b=$APP.G(b,$APP.T);g=GK(g,KK,"default");e=GK(e,LK,"start");k=GK(k,MK,"md");c=GK(c,NK,"normal");d=GK(d,OK,"neutral");m=$APP.I(m);return $APP.Q([JK,$APP.Qi,$APP.Fh,$APP.ri,$APP.al,$APP.rh,$APP.Dk,$APP.T,PK,IK],
3
+ [d,e,g,HK(a),HK(h),k,m,HK(b),m?"true":null,c])},RK=function(a){return $APP.Q([JK,$APP.Qi,$APP.Fh,$APP.ri,$APP.al,$APP.rh,$APP.Dk,$APP.T,IK],[a.getAttribute("trend"),a.getAttribute("align"),a.getAttribute("variant"),a.getAttribute("value"),a.getAttribute("hint"),a.getAttribute("size"),a.hasAttribute("loading"),a.getAttribute("label"),a.getAttribute("emphasis")])},SK=function(a,b){a.setAttribute("role","figure");var c=PK.g(b);$APP.r(c)?a.setAttribute("aria-busy",c):a.removeAttribute("aria-busy");b=
4
+ $APP.T.g(b);$APP.r(b)?a.setAttribute("aria-label",b):a.removeAttribute("aria-label")},TK=function(a,b){a.setAttribute("data-variant",$APP.Fh.g(b));a.setAttribute("data-align",$APP.Qi.g(b));a.setAttribute("data-size",$APP.rh.g(b));a.setAttribute("data-emphasis",IK.g(b));a.setAttribute("data-trend",JK.g(b));$APP.r($APP.Dk.g(b))?a.setAttribute("data-loading","true"):a.removeAttribute("data-loading")},UK=function(a){var b=QK(RK(a)),c=$APP.l(a,"__x_stat_base"),d=$APP.l(a,"__x_stat_label"),e=$APP.l(a,"__x_stat_value"),
5
+ g=$APP.l(a,"__x_stat_hint");return $APP.r(c)?(SK(a,b),TK(c,b),d.textContent=function(){var h=$APP.T.g(b);return $APP.r(h)?h:""}(),e.textContent=function(){var h=$APP.ri.g(b);return $APP.r(h)?h:""}(),g.textContent=function(){var h=$APP.al.g(b);return $APP.r(h)?h:""}()):null},VK=function(a){if($APP.l(a,"__x_stat_initialized")!==!0){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("div"),
6
+ k=document.createElement("div"),m=document.createElement("div"),p=document.createElement("span"),q=document.createElement("span"),w=document.createElement("span"),x=document.createElement("slot"),y=document.createElement("slot"),A=document.createElement("slot"),B=document.createElement("slot"),E=document.createElement("slot");c.textContent=":host{display:block;color-scheme:light dark;--x-stat-background:transparent;--x-stat-color:var(--x-color-text,inherit);--x-stat-muted-color:var(--x-color-text-muted,rgba(0,0,0,0.55));--x-stat-border-color:var(--x-color-border,transparent);--x-stat-radius:var(--x-radius-md,12px);--x-stat-padding:16px;--x-stat-gap:6px;--x-stat-label-color:var(--x-stat-muted-color);--x-stat-label-size:12px;--x-stat-value-color:var(--x-stat-color);--x-stat-value-size:20px;--x-stat-hint-color:var(--x-stat-muted-color);--x-stat-hint-size:12px;--x-stat-icon-color:var(--x-stat-color);--x-stat-positive-color:var(--x-color-success,#16a34a);--x-stat-warning-color:var(--x-color-warning,#d97706);--x-stat-danger-color:var(--x-color-danger,#dc2626);--x-stat-transition-duration:var(--x-transition-duration,120ms);--x-stat-transition-timing:var(--x-transition-easing,ease);--x-stat-loading-opacity:0.6;}@media (prefers-color-scheme:dark){:host{--x-stat-muted-color:var(--x-color-text-muted,rgba(255,255,255,0.55));--x-stat-positive-color:var(--x-color-success,#4ade80);--x-stat-warning-color:var(--x-color-warning,#fbbf24);--x-stat-danger-color:var(--x-color-danger,#f87171);}}:host([variant\x3d'positive']){--x-stat-value-color:var(--x-stat-positive-color);}:host([variant\x3d'warning']){--x-stat-value-color:var(--x-stat-warning-color);}:host([variant\x3d'danger']){--x-stat-value-color:var(--x-stat-danger-color);}:host([variant\x3d'subtle']){--x-stat-value-color:var(--x-stat-muted-color);}[part\x3dbase]{display:grid;gap:var(--x-stat-gap);padding:var(--x-stat-padding);border-radius:var(--x-stat-radius);background:var(--x-stat-background);border:1px solid var(--x-stat-border-color);color:var(--x-stat-color);transition:background var(--x-stat-transition-duration) var(--x-stat-transition-timing),border-color var(--x-stat-transition-duration) var(--x-stat-transition-timing),color var(--x-stat-transition-duration) var(--x-stat-transition-timing),opacity var(--x-stat-transition-duration) var(--x-stat-transition-timing);}[part\x3dbase][data-align\x3d'center']{text-align:center;}[part\x3dbase][data-align\x3d'end']{text-align:end;}[part\x3dbase][data-size\x3d'sm'] [part\x3dvalue]{font-size:calc(var(--x-stat-value-size) * 0.8);}[part\x3dbase][data-size\x3d'lg'] [part\x3dvalue]{font-size:calc(var(--x-stat-value-size) * 1.6);}[part\x3dbase][data-emphasis\x3d'high'] [part\x3dvalue]{font-weight:800;}[part\x3dicon]{flex:0 0 auto;color:var(--x-stat-icon-color);line-height:1;}slot[name\x3dicon]::slotted(*){display:block;}[part\x3dlabel]{font-size:var(--x-stat-label-size);color:var(--x-stat-label-color);}[part\x3dvalue]{font-weight:600;font-size:var(--x-stat-value-size);color:var(--x-stat-value-color);}[part\x3dhint]{font-size:var(--x-stat-hint-size);color:var(--x-stat-hint-color);}[part\x3dbase][data-loading\x3d'true']{opacity:var(--x-stat-loading-opacity);}@media (prefers-reduced-motion:reduce){[part\x3dbase]{transition:none;}}";
7
+ d.setAttribute("part","base");e.setAttribute("part","icon");g.setAttribute("part","body");h.setAttribute("part","label");k.setAttribute("part","value");m.setAttribute("part","hint");x.setAttribute("name","icon");y.setAttribute("name","label");A.setAttribute("name","value");B.setAttribute("name","hint");e.appendChild(x);h.appendChild(y);h.appendChild(p);k.appendChild(A);k.appendChild(q);m.appendChild(B);m.appendChild(w);g.appendChild(h);g.appendChild(k);g.appendChild(m);g.appendChild(E);d.appendChild(e);
8
+ d.appendChild(g);b.appendChild(c);b.appendChild(d);a.__x_stat_root=b;a.__x_stat_base=d;a.__x_stat_label=p;a.__x_stat_value=q;a.__x_stat_hint=w;a.__x_stat_initialized=!0}UK(a);return a},WK=function(a,b){Object.defineProperty(a,b,{get:function(){var c=this.getAttribute(b);return $APP.r(c)?c:""},set:function(c){return $APP.r(c)?this.setAttribute(b,""+$APP.S.g(c)):this.removeAttribute(b)},enumerable:!0,configurable:!0})},XK=function(a){WK(a,"variant");WK(a,"align");WK(a,"size");WK(a,"emphasis");WK(a,
9
+ "trend");WK(a,"label");WK(a,"value");WK(a,"hint");Object.defineProperty(a,"loading",{get:function(){return this.hasAttribute("loading")},set:function(b){return $APP.r(b)?this.setAttribute("loading",""):this.removeAttribute("loading")},enumerable:!0,configurable:!0})},ZK=function(){var a=class extends HTMLElement{};a.observedAttributes=YK;a.prototype.connectedCallback=function(){return VK(this)};a.prototype.attributeChangedCallback=function(){return $APP.l(this,"__x_stat_initialized")===!0?UK(this):
10
+ VK(this)};XK(a.prototype);return a},$K=function(){return $APP.r(customElements.get("x-stat"))?null:customElements.define("x-stat",ZK())},IK=new $APP.K(null,"emphasis","emphasis",293543451),PK=new $APP.K(null,"aria-busy","aria-busy",793864247),JK=new $APP.K(null,"trend","trend",54563841);var YK="variant align size emphasis trend loading label value hint".split(" "),KK=new $APP.R(null,new $APP.P(null,5,["warning",null,"positive",null,"subtle",null,"danger",null,"default",null],null),null),LK=new $APP.R(null,new $APP.P(null,3,["center",null,"start",null,"end",null],null),null),MK=new $APP.R(null,new $APP.P(null,3,["md",null,"lg",null,"sm",null],null),null),NK=new $APP.R(null,new $APP.P(null,2,["high",null,"normal",null],null),null),OK=new $APP.R(null,new $APP.P(null,3,["neutral",null,
11
11
  "up",null,"down",null],null),null);
12
- $APP.Q([eK,$APP.Qi,$APP.Fh,$APP.ui,$APP.$k,$APP.rh,$APP.Ck,$APP.T,dK],[new $APP.P(null,4,[$APP.tk,"trend",$APP.Z,$APP.Y,$APP.Kh,"neutral",$APP.Mh,!0],null),new $APP.P(null,4,[$APP.tk,"align",$APP.Z,$APP.Y,$APP.Kh,"start",$APP.Mh,!0],null),new $APP.P(null,4,[$APP.tk,"variant",$APP.Z,$APP.Y,$APP.Kh,"default",$APP.Mh,!0],null),new $APP.P(null,4,[$APP.tk,"value",$APP.Z,$APP.Y,$APP.Kh,"",$APP.Mh,!0],null),new $APP.P(null,4,[$APP.tk,"hint",$APP.Z,$APP.Y,$APP.Kh,"",$APP.Mh,!0],null),new $APP.P(null,4,[$APP.tk,
13
- "size",$APP.Z,$APP.Y,$APP.Kh,"md",$APP.Mh,!0],null),new $APP.P(null,4,[$APP.tk,"loading",$APP.Z,$APP.qj,$APP.Kh,!1,$APP.Mh,!0],null),new $APP.P(null,4,[$APP.tk,"label",$APP.Z,$APP.Y,$APP.Kh,"",$APP.Mh,!0],null),new $APP.P(null,4,[$APP.tk,"emphasis",$APP.Z,$APP.Y,$APP.Kh,"normal",$APP.Mh,!0],null)]);$APP.ka("baredom.exports.x_stat.init",vK);export const init=vK;
12
+ $APP.Q([JK,$APP.Qi,$APP.Fh,$APP.ri,$APP.al,$APP.rh,$APP.Dk,$APP.T,IK],[new $APP.P(null,4,[$APP.uk,"trend",$APP.Z,$APP.X,$APP.Kh,"neutral",$APP.Mh,!0],null),new $APP.P(null,4,[$APP.uk,"align",$APP.Z,$APP.X,$APP.Kh,"start",$APP.Mh,!0],null),new $APP.P(null,4,[$APP.uk,"variant",$APP.Z,$APP.X,$APP.Kh,"default",$APP.Mh,!0],null),new $APP.P(null,4,[$APP.uk,"value",$APP.Z,$APP.X,$APP.Kh,"",$APP.Mh,!0],null),new $APP.P(null,4,[$APP.uk,"hint",$APP.Z,$APP.X,$APP.Kh,"",$APP.Mh,!0],null),new $APP.P(null,4,[$APP.uk,
13
+ "size",$APP.Z,$APP.X,$APP.Kh,"md",$APP.Mh,!0],null),new $APP.P(null,4,[$APP.uk,"loading",$APP.Z,$APP.qj,$APP.Kh,!1,$APP.Mh,!0],null),new $APP.P(null,4,[$APP.uk,"label",$APP.Z,$APP.X,$APP.Kh,"",$APP.Mh,!0],null),new $APP.P(null,4,[$APP.uk,"emphasis",$APP.Z,$APP.X,$APP.Kh,"normal",$APP.Mh,!0],null)]);$APP.ka("baredom.exports.x_stat.init",$K);export const init=$K;
package/dist/x-stepper.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var Jn=function(a,b){return new $APP.ud(null,function(){if(a>0){var c=$APP.u(b);return c?$APP.rd($APP.v(c),Jn(a-1,$APP.Zb(c))):null}return null},null)},Mn=function(a){a=$APP.G(Kn,typeof a==="string"?a.toLowerCase():null);return $APP.r(a)?a:Ln},On=function(a){a=$APP.G(Nn,a);return $APP.r(a)?a:"horizontal"},Rn=function(a){a=$APP.G(Pn,typeof a==="string"?a.toLowerCase():null);return $APP.r(a)?a:Qn},Tn=function(a){a=$APP.G(Sn,a);return $APP.r(a)?a:"md"},Un=function(a){return typeof a==="string"?(a=parseInt(a.trim(),
3
- 10),typeof a==="number"&&$APP.t(isNaN(a))&&a>=0?a:0):0},Vn=function(a){if(typeof a==="string"){var b=a.trim();if($APP.r($APP.lg(/^\d+$/,b)))return a=parseInt(b,10),a>0&&a<=200?$APP.je(function(g){return new $APP.P(null,2,[$APP.T,"Step "+$APP.S.g(g),$APP.Hj,null],null)},$APP.kg(1,a+1)):$APP.ie;if($APP.r(function(){var g=$APP.O("",b);return g?b.startsWith("["):g}()))try{var c=JSON.parse(b);if($APP.r(Array.isArray(c))){var d=$APP.wc(c),e=$APP.B(d)>200?Jn(200,d):d;return $APP.je(function(g){return new $APP.P(null,
4
- 2,[$APP.T,function(){var h=$APP.l(g,"label");return typeof h==="string"?h:""}(),$APP.Hj,function(){var h=$APP.l(g,"description");return typeof h==="string"?h:null}()],null)},e)}return $APP.ie}catch(g){return $APP.ie}else return $APP.ie}else return $APP.ie},Wn=function(a){var b=$APP.l(a,"__xStepperRefs");if($APP.r(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div");c.textContent=":host{display:block;color-scheme:light dark;--x-stepper-indicator-size:2rem;--x-stepper-connector-thickness:2px;--x-stepper-step-gap:0.75rem;--x-stepper-font-size:0.875rem;--x-stepper-label-font-weight:500;--x-stepper-desc-font-size:0.75rem;--x-stepper-radius:999px;--x-stepper-motion:120ms;--x-stepper-press-scale:0.93;--x-stepper-focus-ring:rgba(0,0,0,0.55);--x-stepper-disabled-opacity:0.5;--x-stepper-complete-bg:rgba(16,140,72,1);--x-stepper-complete-color:#fff;--x-stepper-complete-connector:rgba(16,140,72,1);--x-stepper-current-bg:rgba(0,102,204,1);--x-stepper-current-color:#fff;--x-stepper-upcoming-bg:rgba(0,0,0,0.08);--x-stepper-upcoming-color:rgba(0,0,0,0.45);--x-stepper-idle-connector:rgba(0,0,0,0.12);--x-stepper-label-done-color:rgba(0,0,0,0.85);--x-stepper-label-current-color:rgba(0,0,0,0.85);--x-stepper-label-upcoming-color:rgba(0,0,0,0.4);--x-stepper-desc-color:rgba(0,0,0,0.4);}@media (prefers-color-scheme:dark){:host{--x-stepper-focus-ring:rgba(255,255,255,0.7);--x-stepper-complete-bg:rgba(60,210,120,1);--x-stepper-complete-color:#000;--x-stepper-complete-connector:rgba(60,210,120,1);--x-stepper-current-bg:rgba(80,160,255,1);--x-stepper-current-color:#000;--x-stepper-upcoming-bg:rgba(255,255,255,0.1);--x-stepper-upcoming-color:rgba(255,255,255,0.35);--x-stepper-idle-connector:rgba(255,255,255,0.12);--x-stepper-label-done-color:rgba(255,255,255,0.9);--x-stepper-label-current-color:rgba(255,255,255,0.9);--x-stepper-label-upcoming-color:rgba(255,255,255,0.3);--x-stepper-desc-color:rgba(255,255,255,0.35);}}[part\x3dcontainer]{display:flex;align-items:flex-start;margin:0;padding:0;list-style:none;}:host([data-orientation\x3dhorizontal]) [part\x3dcontainer]{flex-direction:row;}:host([data-orientation\x3dhorizontal]) [part\x3dstep]{display:flex;flex-direction:column;align-items:center;flex:1;min-width:0;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-track]{display:flex;align-items:center;width:100%;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-connector]{flex:1;height:var(--x-stepper-connector-thickness);min-width:8px;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-content]{display:flex;flex-direction:column;align-items:center;text-align:center;padding:var(--x-stepper-step-gap) 4px 0;width:100%;}:host([data-orientation\x3dvertical]) [part\x3dcontainer]{flex-direction:column;}:host([data-orientation\x3dvertical]) [part\x3dstep]{display:flex;flex-direction:row;gap:var(--x-stepper-step-gap);}:host([data-orientation\x3dvertical]) [part\x3dstep-track]{display:flex;flex-direction:column;align-items:center;flex-shrink:0;width:var(--x-stepper-indicator-size);}:host([data-orientation\x3dvertical]) [part\x3dstep-connector]{flex:1;width:var(--x-stepper-connector-thickness);min-height:16px;margin:4px 0;}:host([data-orientation\x3dvertical]) [part\x3dstep-content]{display:flex;flex-direction:column;flex:1;min-width:0;padding-bottom:var(--x-stepper-step-gap);}[part\x3dstep-indicator]{display:inline-flex;align-items:center;justify-content:center;width:var(--x-stepper-indicator-size);height:var(--x-stepper-indicator-size);border-radius:var(--x-stepper-radius);border:none;padding:0;margin:0;cursor:pointer;font-size:0.875em;font-weight:600;font-family:inherit;flex-shrink:0;position:relative;z-index:1;transition:background var(--x-stepper-motion) ease,color var(--x-stepper-motion) ease,transform 80ms ease;}[part\x3dstep-indicator]:focus{outline:none;}[part\x3dstep-indicator]:focus-visible{outline:2px solid var(--x-stepper-focus-ring);outline-offset:3px;}[data-state\x3dcomplete] [part\x3dstep-indicator]{background:var(--x-stepper-complete-bg);color:var(--x-stepper-complete-color);}[data-state\x3dcurrent] [part\x3dstep-indicator]{background:var(--x-stepper-current-bg);color:var(--x-stepper-current-color);cursor:default;}[data-state\x3dupcoming] [part\x3dstep-indicator]{background:var(--x-stepper-upcoming-bg);color:var(--x-stepper-upcoming-color);}[data-state\x3dcomplete] [part\x3dstep-connector]{background:var(--x-stepper-complete-connector);}[data-state\x3dcurrent] [part\x3dstep-connector],[data-state\x3dupcoming] [part\x3dstep-connector]{background:var(--x-stepper-idle-connector);}[part\x3dstep]:last-child [part\x3dstep-connector]{display:none;}[part\x3dstep-label]{font-size:var(--x-stepper-font-size);line-height:1.3;font-family:inherit;}[data-state\x3dcomplete] [part\x3dstep-label]{color:var(--x-stepper-label-done-color);}[data-state\x3dcurrent] [part\x3dstep-label]{color:var(--x-stepper-label-current-color);font-weight:var(--x-stepper-label-font-weight);}[data-state\x3dupcoming] [part\x3dstep-label]{color:var(--x-stepper-label-upcoming-color);}[part\x3dstep-description]{font-size:var(--x-stepper-desc-font-size);color:var(--x-stepper-desc-color);line-height:1.3;margin-top:0.2em;}:host(:not([disabled])) [data-state\x3dcomplete] [part\x3dstep-indicator]:hover,:host(:not([disabled])) [data-state\x3dupcoming] [part\x3dstep-indicator]:hover{filter:brightness(0.88);}:host(:not([disabled])) [data-state\x3dcomplete] [part\x3dstep-indicator]:active,:host(:not([disabled])) [data-state\x3dupcoming] [part\x3dstep-indicator]:active{transform:scale(var(--x-stepper-press-scale));}:host([disabled]){opacity:var(--x-stepper-disabled-opacity);}:host([disabled]) [part\x3dstep-indicator]{cursor:default;pointer-events:none;}:host([data-size\x3dsm]){--x-stepper-indicator-size:1.5rem;--x-stepper-font-size:0.8125rem;--x-stepper-desc-font-size:0.6875rem;}:host([data-size\x3dlg]){--x-stepper-indicator-size:2.5rem;--x-stepper-font-size:1rem;--x-stepper-desc-font-size:0.875rem;}@media (prefers-reduced-motion:reduce){[part\x3dstep-indicator]{transition:none;}}";
5
- d.setAttribute("part","container");d.setAttribute("role","list");b.appendChild(c);b.appendChild(d);a.__xStepperRefs=new $APP.P(null,2,[$APP.bi,b,$APP.Zi,d],null);return $APP.l(a,"__xStepperRefs")},$n=function(a){a=new $APP.P(null,5,[Xn,a.getAttribute("steps"),Yn,a.getAttribute("current"),$APP.Zk,a.getAttribute("orientation"),$APP.Yk,a.getAttribute("size"),$APP.W,a.hasAttribute("disabled")],null);var b=$APP.N(a),c=$APP.G(b,Xn);a=$APP.G(b,Yn);var d=$APP.G(b,$APP.Zk),e=$APP.G(b,$APP.Yk);b=$APP.G(b,$APP.W);
6
- c=Vn(c);var g=$APP.B(c);return new $APP.P(null,5,[$APP.wl,c,Zn,g===0?0:$APP.Yg.i(0,$APP.Zg.i(Un(a),g-1)),$APP.xk,Mn(d),$APP.rh,Rn(e),$APP.W,$APP.I(b)],null)},ao=function(a,b,c){return"Step "+$APP.S.g(a+1)+": "+$APP.S.g(b)+" ("+$APP.S.g(function(){var d=c instanceof $APP.M?c.ra:null;switch(d){case "complete":return"completed";case "current":return"current";case "upcoming":return"upcoming";default:throw Error("No matching clause: "+$APP.S.g(d));}}())+")"},bo=function(a,b,c,d){var e=$APP.N(b);b=$APP.G(e,
7
- $APP.T);e=$APP.G(e,$APP.Hj);var g=document.createElement("div"),h=document.createElement("div"),k=document.createElement("button"),m=document.createElement("span"),p=document.createElement("div"),q=document.createElement("div"),w=document.createElement("span"),x=document.createElement("span");a:{var y=c instanceof $APP.M?c.ra:null;switch(y){case "complete":y="complete";break a;case "current":y="current";break a;case "upcoming":y="upcoming";break a;default:throw Error("No matching clause: "+$APP.S.g(y));
8
- }}b=$APP.r(b)?b:"";g.setAttribute("part","step");g.setAttribute("role","listitem");g.setAttribute("data-index",""+$APP.S.g(a));g.setAttribute("data-state",y);h.setAttribute("part","step-track");k.setAttribute("part","step-indicator");k.setAttribute("type","button");k.setAttribute("aria-label",ao(a,b,c));$APP.D.i(c,Zn)?k.setAttribute("aria-current","step"):k.removeAttribute("aria-current");k.setAttribute("tabindex",$APP.r(d)?"-1":"0");$APP.r(d)&&k.setAttribute("aria-disabled","true");m.setAttribute("part",
9
- "step-number");m.setAttribute("aria-hidden","true");m.textContent=$APP.D.i(c,$APP.El)?"✓":""+$APP.S.g(a+1);p.setAttribute("part","step-connector");p.setAttribute("aria-hidden","true");q.setAttribute("part","step-content");w.setAttribute("part","step-label");w.textContent=b;x.setAttribute("part","step-description");$APP.r($APP.r(e)?$APP.O(e,""):e)?(x.textContent=e,x.style.display="block"):x.style.display="none";k.appendChild(m);h.appendChild(k);h.appendChild(p);q.appendChild(w);q.appendChild(x);g.appendChild(h);
10
- g.appendChild(q);return g},eo=function(a){var b=$n(a);if($APP.O($APP.l(a,"__xStepperModel"),b)){b=$APP.N(b);var c=$APP.G(b,$APP.wl),d=$APP.G(b,Zn),e=$APP.G(b,$APP.xk),g=$APP.G(b,$APP.rh),h=$APP.G(b,$APP.W),k=Wn(a);k=$APP.N(k);k=$APP.G(k,$APP.Zi);a.setAttribute("data-orientation",On(e));a.setAttribute("data-size",Tn(g));k.innerHTML="";c=$APP.u($APP.Zd($APP.ch,c));e=null;for(var m=g=0;;)if(m<g){var p=e.G(null,m),q=$APP.Cc(p,0,null);p=$APP.Cc(p,1,null);var w=q<d?$APP.El:$APP.D.i(q,d)?Zn:co;k.appendChild(bo(q,
11
- p,w,h));m+=1}else if(c=$APP.u(c))$APP.Pc(c)?(g=$APP.yb(c),c=$APP.zb(c),e=g,g=$APP.B(g)):(g=$APP.v(c),e=$APP.Cc(g,0,null),g=$APP.Cc(g,1,null),m=e<d?$APP.El:$APP.D.i(e,d)?Zn:co,k.appendChild(bo(e,g,m,h)),c=$APP.z(c),e=null,g=0),m=0;else break;a.__xStepperModel=b}},fo=function(a){function b(d){var e=$APP.l(a,"__xStepperModel");e=$APP.r(e)?e:$n(a);$APP.r($APP.W.g(e))||(d=d.target.closest("[part\x3dstep-indicator]"),$APP.r(d)&&(d=parseInt(d.closest("[part\x3dstep]").getAttribute("data-index"),10),e=Zn.g(e),
12
- typeof d==="number"&&$APP.t(isNaN(d))&&$APP.O(d,e)&&(e=$APP.nh(new $APP.P(null,2,[$APP.zh,e,$APP.el,d],null)),e=new CustomEvent("x-stepper-change",{detail:e,bubbles:!0,composed:!0,cancelable:!0}),e=a.dispatchEvent(e),$APP.r(e)&&a.setAttribute("current",""+$APP.S.g(d)))));return null}var c=Wn(a);c=$APP.N(c);$APP.G(c,$APP.Zi).addEventListener("click",b);$APP.n(a,"__xStepperHandlers",{click:b})},go=function(a){var b=$APP.l(a,"__xStepperHandlers");if($APP.r(b)){var c=$APP.l(a,"__xStepperRefs");$APP.r(c)&&
13
- (c=$APP.Zi.g(c),b=$APP.l(b,"click"),$APP.r($APP.r(c)?b:c)&&c.removeEventListener("click",b))}a.__xStepperHandlers=null},ho=function(a){Object.defineProperty(a,"steps",{get:function(){var b=this.getAttribute("steps");return $APP.r(b)?b:"[]"},set:function(b){return $APP.r(b)?this.setAttribute("steps",""+$APP.S.g(b)):this.removeAttribute("steps")},enumerable:!0,configurable:!0});Object.defineProperty(a,"current",{get:function(){return Un(this.getAttribute("current"))},set:function(b){return b==null?
14
- this.removeAttribute("current"):this.setAttribute("current",""+$APP.S.g(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"orientation",{get:function(){return On(Mn(this.getAttribute("orientation")))},set:function(b){return $APP.r(b)?this.setAttribute("orientation",""+$APP.S.g(b)):this.removeAttribute("orientation")},enumerable:!0,configurable:!0});Object.defineProperty(a,"size",{get:function(){return Tn(Rn(this.getAttribute("size")))},set:function(b){return $APP.r(b)?this.setAttribute("size",
15
- ""+$APP.S.g(b)):this.removeAttribute("size")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.r(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0})},jo=function(){var a=class extends HTMLElement{};a.observedAttributes=io;a.prototype.connectedCallback=function(){Wn(this);go(this);fo(this);eo(this);return null};a.prototype.disconnectedCallback=function(){go(this);
16
- return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&eo(this);return null};ho(a.prototype);return a},ko=function(){$APP.r(customElements.get("x-stepper"))||customElements.define("x-stepper",jo());return null},Zn=new $APP.M(null,"current","current",-1088038603),lo=new $APP.M(null,"vertical","vertical",718696748),co=new $APP.M(null,"upcoming","upcoming",1873315471),Xn=new $APP.M(null,"steps-raw","steps-raw",1741812533),Qn=new $APP.M(null,"md","md",707286655),mo=new $APP.M(null,
17
- "lg","lg",-80787836),Ln=new $APP.M(null,"horizontal","horizontal",2062109475),no=new $APP.M(null,"sm","sm",-1402575065),Yn=new $APP.M(null,"current-raw","current-raw",-1440665509);var io=["steps","current","orientation","size","disabled"];$APP.Sd(["x-stepper-change",new $APP.P(null,2,[$APP.U,new $APP.P(null,2,[$APP.zh,$APP.V,$APP.el,$APP.V],null),$APP.kl,!0],null)]);var Kn=new $APP.P(null,2,["horizontal",Ln,"vertical",lo],null),Nn=new $APP.P(null,2,[Ln,"horizontal",lo,"vertical"],null),Pn=new $APP.P(null,3,["sm",no,"md",Qn,"lg",mo],null),Sn=new $APP.P(null,3,[no,"sm",Qn,"md",mo,"lg"],null);$APP.ka("baredom.exports.x_stepper.init",ko);export const init=ko;
2
+ var Kn=function(a,b){return new $APP.ud(null,function(){if(a>0){var c=$APP.u(b);return c?$APP.rd($APP.v(c),Kn(a-1,$APP.Zb(c))):null}return null},null)},Nn=function(a){a=$APP.G(Ln,typeof a==="string"?a.toLowerCase():null);return $APP.r(a)?a:Mn},Pn=function(a){a=$APP.G(On,a);return $APP.r(a)?a:"horizontal"},Sn=function(a){a=$APP.G(Qn,typeof a==="string"?a.toLowerCase():null);return $APP.r(a)?a:Rn},Un=function(a){a=$APP.G(Tn,a);return $APP.r(a)?a:"md"},Vn=function(a){return typeof a==="string"?(a=parseInt(a.trim(),
3
+ 10),typeof a==="number"&&$APP.t(isNaN(a))&&a>=0?a:0):0},Wn=function(a){if(typeof a==="string"){var b=a.trim();if($APP.r($APP.lg(/^\d+$/,b)))return a=parseInt(b,10),a>0&&a<=200?$APP.je(function(g){return new $APP.P(null,2,[$APP.T,"Step "+$APP.S.g(g),$APP.Hj,null],null)},$APP.kg(1,a+1)):$APP.ie;if($APP.r(function(){var g=$APP.O("",b);return g?b.startsWith("["):g}()))try{var c=JSON.parse(b);if($APP.r(Array.isArray(c))){var d=$APP.wc(c),e=$APP.C(d)>200?Kn(200,d):d;return $APP.je(function(g){return new $APP.P(null,
4
+ 2,[$APP.T,function(){var h=$APP.l(g,"label");return typeof h==="string"?h:""}(),$APP.Hj,function(){var h=$APP.l(g,"description");return typeof h==="string"?h:null}()],null)},e)}return $APP.ie}catch(g){return $APP.ie}else return $APP.ie}else return $APP.ie},Xn=function(a){var b=$APP.l(a,"__xStepperRefs");if($APP.r(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div");c.textContent=":host{display:block;color-scheme:light dark;--x-stepper-indicator-size:2rem;--x-stepper-connector-thickness:2px;--x-stepper-step-gap:0.75rem;--x-stepper-font-size:var(--x-font-size-sm,0.875rem);--x-stepper-label-font-weight:500;--x-stepper-desc-font-size:0.75rem;--x-stepper-radius:var(--x-radius-full,999px);--x-stepper-motion:var(--x-transition-duration,120ms);--x-stepper-press-scale:0.93;--x-stepper-focus-ring:var(--x-color-focus-ring,rgba(0,0,0,0.55));--x-stepper-disabled-opacity:0.5;--x-stepper-complete-bg:var(--x-color-success,rgba(16,140,72,1));--x-stepper-complete-color:#fff;--x-stepper-complete-connector:var(--x-color-success,rgba(16,140,72,1));--x-stepper-current-bg:var(--x-color-primary,rgba(0,102,204,1));--x-stepper-current-color:#fff;--x-stepper-upcoming-bg:rgba(0,0,0,0.08);--x-stepper-upcoming-color:var(--x-color-text-muted,rgba(0,0,0,0.45));--x-stepper-idle-connector:var(--x-color-border,rgba(0,0,0,0.12));--x-stepper-label-done-color:var(--x-color-text,rgba(0,0,0,0.85));--x-stepper-label-current-color:var(--x-color-text,rgba(0,0,0,0.85));--x-stepper-label-upcoming-color:var(--x-color-text-muted,rgba(0,0,0,0.4));--x-stepper-desc-color:var(--x-color-text-muted,rgba(0,0,0,0.4));}@media (prefers-color-scheme:dark){:host{--x-stepper-focus-ring:var(--x-color-focus-ring,rgba(255,255,255,0.7));--x-stepper-complete-bg:var(--x-color-success,rgba(60,210,120,1));--x-stepper-complete-color:#000;--x-stepper-complete-connector:var(--x-color-success,rgba(60,210,120,1));--x-stepper-current-bg:var(--x-color-primary,rgba(80,160,255,1));--x-stepper-current-color:#000;--x-stepper-upcoming-bg:rgba(255,255,255,0.1);--x-stepper-upcoming-color:var(--x-color-text-muted,rgba(255,255,255,0.35));--x-stepper-idle-connector:var(--x-color-border,rgba(255,255,255,0.12));--x-stepper-label-done-color:var(--x-color-text,rgba(255,255,255,0.9));--x-stepper-label-current-color:var(--x-color-text,rgba(255,255,255,0.9));--x-stepper-label-upcoming-color:var(--x-color-text-muted,rgba(255,255,255,0.3));--x-stepper-desc-color:var(--x-color-text-muted,rgba(255,255,255,0.35));}}[part\x3dcontainer]{display:flex;align-items:flex-start;margin:0;padding:0;list-style:none;}:host([data-orientation\x3dhorizontal]) [part\x3dcontainer]{flex-direction:row;}:host([data-orientation\x3dhorizontal]) [part\x3dstep]{display:flex;flex-direction:column;align-items:center;flex:1;min-width:0;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-track]{display:flex;align-items:center;width:100%;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-connector]{flex:1;height:var(--x-stepper-connector-thickness);min-width:8px;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-content]{display:flex;flex-direction:column;align-items:center;text-align:center;padding:var(--x-stepper-step-gap) 4px 0;width:100%;}:host([data-orientation\x3dvertical]) [part\x3dcontainer]{flex-direction:column;}:host([data-orientation\x3dvertical]) [part\x3dstep]{display:flex;flex-direction:row;gap:var(--x-stepper-step-gap);}:host([data-orientation\x3dvertical]) [part\x3dstep-track]{display:flex;flex-direction:column;align-items:center;flex-shrink:0;width:var(--x-stepper-indicator-size);}:host([data-orientation\x3dvertical]) [part\x3dstep-connector]{flex:1;width:var(--x-stepper-connector-thickness);min-height:16px;margin:4px 0;}:host([data-orientation\x3dvertical]) [part\x3dstep-content]{display:flex;flex-direction:column;flex:1;min-width:0;padding-bottom:var(--x-stepper-step-gap);}[part\x3dstep-indicator]{display:inline-flex;align-items:center;justify-content:center;width:var(--x-stepper-indicator-size);height:var(--x-stepper-indicator-size);border-radius:var(--x-stepper-radius);border:none;padding:0;margin:0;cursor:pointer;font-size:0.875em;font-weight:600;font-family:inherit;flex-shrink:0;position:relative;z-index:1;transition:background var(--x-stepper-motion) ease,color var(--x-stepper-motion) ease,transform 80ms ease;}[part\x3dstep-indicator]:focus{outline:none;}[part\x3dstep-indicator]:focus-visible{outline:2px solid var(--x-stepper-focus-ring);outline-offset:3px;}[data-state\x3dcomplete] [part\x3dstep-indicator]{background:var(--x-stepper-complete-bg);color:var(--x-stepper-complete-color);}[data-state\x3dcurrent] [part\x3dstep-indicator]{background:var(--x-stepper-current-bg);color:var(--x-stepper-current-color);cursor:default;}[data-state\x3dupcoming] [part\x3dstep-indicator]{background:var(--x-stepper-upcoming-bg);color:var(--x-stepper-upcoming-color);}[data-state\x3dcomplete] [part\x3dstep-connector]{background:var(--x-stepper-complete-connector);}[data-state\x3dcurrent] [part\x3dstep-connector],[data-state\x3dupcoming] [part\x3dstep-connector]{background:var(--x-stepper-idle-connector);}[part\x3dstep]:last-child [part\x3dstep-connector]{display:none;}[part\x3dstep-label]{font-size:var(--x-stepper-font-size);line-height:1.3;font-family:inherit;}[data-state\x3dcomplete] [part\x3dstep-label]{color:var(--x-stepper-label-done-color);}[data-state\x3dcurrent] [part\x3dstep-label]{color:var(--x-stepper-label-current-color);font-weight:var(--x-stepper-label-font-weight);}[data-state\x3dupcoming] [part\x3dstep-label]{color:var(--x-stepper-label-upcoming-color);}[part\x3dstep-description]{font-size:var(--x-stepper-desc-font-size);color:var(--x-stepper-desc-color);line-height:1.3;margin-top:0.2em;}:host(:not([disabled])) [data-state\x3dcomplete] [part\x3dstep-indicator]:hover,:host(:not([disabled])) [data-state\x3dupcoming] [part\x3dstep-indicator]:hover{filter:brightness(0.88);}:host(:not([disabled])) [data-state\x3dcomplete] [part\x3dstep-indicator]:active,:host(:not([disabled])) [data-state\x3dupcoming] [part\x3dstep-indicator]:active{transform:scale(var(--x-stepper-press-scale));}:host([disabled]){opacity:var(--x-stepper-disabled-opacity);}:host([disabled]) [part\x3dstep-indicator]{cursor:default;pointer-events:none;}:host([data-size\x3dsm]){--x-stepper-indicator-size:1.5rem;--x-stepper-font-size:0.8125rem;--x-stepper-desc-font-size:0.6875rem;}:host([data-size\x3dlg]){--x-stepper-indicator-size:2.5rem;--x-stepper-font-size:1rem;--x-stepper-desc-font-size:0.875rem;}@media (prefers-reduced-motion:reduce){[part\x3dstep-indicator]{transition:none;}}";
5
+ d.setAttribute("part","container");d.setAttribute("role","list");b.appendChild(c);b.appendChild(d);a.__xStepperRefs=new $APP.P(null,2,[$APP.bi,b,$APP.Zi,d],null);return $APP.l(a,"__xStepperRefs")},ao=function(a){a=new $APP.P(null,5,[Yn,a.getAttribute("steps"),Zn,a.getAttribute("current"),$APP.$k,a.getAttribute("orientation"),$APP.Zk,a.getAttribute("size"),$APP.W,a.hasAttribute("disabled")],null);var b=$APP.N(a),c=$APP.G(b,Yn);a=$APP.G(b,Zn);var d=$APP.G(b,$APP.$k),e=$APP.G(b,$APP.Zk);b=$APP.G(b,$APP.W);
6
+ c=Wn(c);var g=$APP.C(c);return new $APP.P(null,5,[$APP.xl,c,$n,g===0?0:$APP.Yg.i(0,$APP.Zg.i(Vn(a),g-1)),$APP.yk,Nn(d),$APP.rh,Sn(e),$APP.W,$APP.I(b)],null)},bo=function(a,b,c){return"Step "+$APP.S.g(a+1)+": "+$APP.S.g(b)+" ("+$APP.S.g(function(){var d=c instanceof $APP.K?c.ra:null;switch(d){case "complete":return"completed";case "current":return"current";case "upcoming":return"upcoming";default:throw Error("No matching clause: "+$APP.S.g(d));}}())+")"},co=function(a,b,c,d){var e=$APP.N(b);b=$APP.G(e,
7
+ $APP.T);e=$APP.G(e,$APP.Hj);var g=document.createElement("div"),h=document.createElement("div"),k=document.createElement("button"),m=document.createElement("span"),p=document.createElement("div"),q=document.createElement("div"),w=document.createElement("span"),x=document.createElement("span");a:{var y=c instanceof $APP.K?c.ra:null;switch(y){case "complete":y="complete";break a;case "current":y="current";break a;case "upcoming":y="upcoming";break a;default:throw Error("No matching clause: "+$APP.S.g(y));
8
+ }}b=$APP.r(b)?b:"";g.setAttribute("part","step");g.setAttribute("role","listitem");g.setAttribute("data-index",""+$APP.S.g(a));g.setAttribute("data-state",y);h.setAttribute("part","step-track");k.setAttribute("part","step-indicator");k.setAttribute("type","button");k.setAttribute("aria-label",bo(a,b,c));$APP.D.i(c,$n)?k.setAttribute("aria-current","step"):k.removeAttribute("aria-current");k.setAttribute("tabindex",$APP.r(d)?"-1":"0");$APP.r(d)&&k.setAttribute("aria-disabled","true");m.setAttribute("part",
9
+ "step-number");m.setAttribute("aria-hidden","true");m.textContent=$APP.D.i(c,$APP.Fl)?"✓":""+$APP.S.g(a+1);p.setAttribute("part","step-connector");p.setAttribute("aria-hidden","true");q.setAttribute("part","step-content");w.setAttribute("part","step-label");w.textContent=b;x.setAttribute("part","step-description");$APP.r($APP.r(e)?$APP.O(e,""):e)?(x.textContent=e,x.style.display="block"):x.style.display="none";k.appendChild(m);h.appendChild(k);h.appendChild(p);q.appendChild(w);q.appendChild(x);g.appendChild(h);
10
+ g.appendChild(q);return g},fo=function(a){var b=ao(a);if($APP.O($APP.l(a,"__xStepperModel"),b)){b=$APP.N(b);var c=$APP.G(b,$APP.xl),d=$APP.G(b,$n),e=$APP.G(b,$APP.yk),g=$APP.G(b,$APP.rh),h=$APP.G(b,$APP.W),k=Xn(a);k=$APP.N(k);k=$APP.G(k,$APP.Zi);a.setAttribute("data-orientation",Pn(e));a.setAttribute("data-size",Un(g));k.innerHTML="";c=$APP.u($APP.Zd($APP.ch,c));e=null;for(var m=g=0;;)if(m<g){var p=e.G(null,m),q=$APP.Cc(p,0,null);p=$APP.Cc(p,1,null);var w=q<d?$APP.Fl:$APP.D.i(q,d)?$n:eo;k.appendChild(co(q,
11
+ p,w,h));m+=1}else if(c=$APP.u(c))$APP.Pc(c)?(g=$APP.yb(c),c=$APP.zb(c),e=g,g=$APP.C(g)):(g=$APP.v(c),e=$APP.Cc(g,0,null),g=$APP.Cc(g,1,null),m=e<d?$APP.Fl:$APP.D.i(e,d)?$n:eo,k.appendChild(co(e,g,m,h)),c=$APP.z(c),e=null,g=0),m=0;else break;a.__xStepperModel=b}},go=function(a){function b(d){var e=$APP.l(a,"__xStepperModel");e=$APP.r(e)?e:ao(a);$APP.r($APP.W.g(e))||(d=d.target.closest("[part\x3dstep-indicator]"),$APP.r(d)&&(d=parseInt(d.closest("[part\x3dstep]").getAttribute("data-index"),10),e=$n.g(e),
12
+ typeof d==="number"&&$APP.t(isNaN(d))&&$APP.O(d,e)&&(e=$APP.nh(new $APP.P(null,2,[$APP.zh,e,$APP.fl,d],null)),e=new CustomEvent("x-stepper-change",{detail:e,bubbles:!0,composed:!0,cancelable:!0}),e=a.dispatchEvent(e),$APP.r(e)&&a.setAttribute("current",""+$APP.S.g(d)))));return null}var c=Xn(a);c=$APP.N(c);$APP.G(c,$APP.Zi).addEventListener("click",b);$APP.n(a,"__xStepperHandlers",{click:b})},ho=function(a){var b=$APP.l(a,"__xStepperHandlers");if($APP.r(b)){var c=$APP.l(a,"__xStepperRefs");$APP.r(c)&&
13
+ (c=$APP.Zi.g(c),b=$APP.l(b,"click"),$APP.r($APP.r(c)?b:c)&&c.removeEventListener("click",b))}a.__xStepperHandlers=null},io=function(a){Object.defineProperty(a,"steps",{get:function(){var b=this.getAttribute("steps");return $APP.r(b)?b:"[]"},set:function(b){return $APP.r(b)?this.setAttribute("steps",""+$APP.S.g(b)):this.removeAttribute("steps")},enumerable:!0,configurable:!0});Object.defineProperty(a,"current",{get:function(){return Vn(this.getAttribute("current"))},set:function(b){return b==null?
14
+ this.removeAttribute("current"):this.setAttribute("current",""+$APP.S.g(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"orientation",{get:function(){return Pn(Nn(this.getAttribute("orientation")))},set:function(b){return $APP.r(b)?this.setAttribute("orientation",""+$APP.S.g(b)):this.removeAttribute("orientation")},enumerable:!0,configurable:!0});Object.defineProperty(a,"size",{get:function(){return Un(Sn(this.getAttribute("size")))},set:function(b){return $APP.r(b)?this.setAttribute("size",
15
+ ""+$APP.S.g(b)):this.removeAttribute("size")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.r(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0})},ko=function(){var a=class extends HTMLElement{};a.observedAttributes=jo;a.prototype.connectedCallback=function(){Xn(this);ho(this);go(this);fo(this);return null};a.prototype.disconnectedCallback=function(){ho(this);
16
+ return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&fo(this);return null};io(a.prototype);return a},lo=function(){$APP.r(customElements.get("x-stepper"))||customElements.define("x-stepper",ko());return null},$n=new $APP.K(null,"current","current",-1088038603),mo=new $APP.K(null,"vertical","vertical",718696748),eo=new $APP.K(null,"upcoming","upcoming",1873315471),Yn=new $APP.K(null,"steps-raw","steps-raw",1741812533),Rn=new $APP.K(null,"md","md",707286655),no=new $APP.K(null,
17
+ "lg","lg",-80787836),Mn=new $APP.K(null,"horizontal","horizontal",2062109475),oo=new $APP.K(null,"sm","sm",-1402575065),Zn=new $APP.K(null,"current-raw","current-raw",-1440665509);var jo=["steps","current","orientation","size","disabled"];$APP.Sd(["x-stepper-change",new $APP.P(null,2,[$APP.U,new $APP.P(null,2,[$APP.zh,$APP.V,$APP.fl,$APP.V],null),$APP.ll,!0],null)]);var Ln=new $APP.P(null,2,["horizontal",Mn,"vertical",mo],null),On=new $APP.P(null,2,[Mn,"horizontal",mo,"vertical"],null),Qn=new $APP.P(null,3,["sm",oo,"md",Rn,"lg",no],null),Tn=new $APP.P(null,3,[oo,"sm",Rn,"md",no,"lg"],null);$APP.ka("baredom.exports.x_stepper.init",lo);export const init=lo;
package/dist/x-switch.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var ZM=function(a,b,c){return a.setAttribute(b,c)},$M=function(a,b,c){return $APP.r(c)?a.setAttribute(b,""):a.removeAttribute(b)},aN=function(a){a=$APP.Q([$APP.Ek,$APP.Rk,$APP.sh,$APP.Dh,$APP.Mi,$APP.cj,$APP.vl,$APP.kj,$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.G(b,$APP.kj);var c=$APP.G(b,$APP.Ui),d=$APP.G(b,$APP.Ek),e=$APP.G(b,$APP.Rk),g=$APP.G(b,$APP.sh),h=$APP.G(b,$APP.Dh),k=$APP.G(b,$APP.Mi),m=$APP.G(b,$APP.cj);b=$APP.G(b,$APP.vl);k=$APP.I(k);g=$APP.I(g);return $APP.Q([$APP.Lh,$APP.Gh,$APP.Sl,$APP.Wi,$APP.xh,$APP.Si,$APP.ui,$APP.sj,$APP.Ol,$APP.Tk,$APP.W],[g,k?"true":"false",$APP.I(m),k,$APP.r(g)?k:!0,d,b!=null?b:"on",h,c,a,$APP.I(e)])},bN=function(a){var b=$APP.l(a,"__xSwitchRefs");if($APP.r(b)){var c=$APP.l(b,"control");b=aN(a);var d=$APP.W.g(b),
4
- e=$APP.Wi.g(b);ZM(c,"aria-checked",$APP.Gh.g(b));c.setAttribute("aria-disabled",$APP.r(d)?"true":"false");ZM(c,"aria-required",$APP.r($APP.Lh.g(b))?"true":"false");ZM(c,"aria-readonly",$APP.r($APP.Sl.g(b))?"true":"false");var g=$APP.Tk.g(b);$APP.r(g)?c.setAttribute("aria-label",g):c.removeAttribute("aria-label");g=$APP.sj.g(b);$APP.r(g)?c.setAttribute("aria-labelledby",g):c.removeAttribute("aria-labelledby");g=$APP.Ol.g(b);$APP.r(g)?c.setAttribute("aria-describedby",g):c.removeAttribute("aria-describedby");
5
- c.tabIndex=$APP.r(d)?-1:0;$APP.r(d)?c.setAttribute("disabled",""):c.removeAttribute("disabled");$M(a,"data-checked",e);$M(a,"data-disabled",d);a=$APP.l(a,"__xSwitchInternals");return $APP.r(a)?a.setFormValue($APP.r(e)?$APP.ui.g(b):null):null}return null},cN=function(a){var b=aN(a),c=$APP.W.g(b),d=$APP.Sl.g(b);if($APP.r($APP.r(c)?c:d))return null;d=$APP.Wi.g(b);c=$APP.t(d);b=$APP.ui.g(b);d=new CustomEvent("x-switch-change-request",{detail:{value:b,previousChecked:d,nextChecked:c},bubbles:!0,composed:!0,
6
- cancelable:!0});a.dispatchEvent(d);return $APP.t(d.defaultPrevented)?($M(a,"checked",c),bN(a),a.dispatchEvent(new CustomEvent("x-switch-change",{detail:{value:b,checked:c},bubbles:!0,composed:!0,cancelable:!1}))):null},dN=function(a){return function(){return cN(a)}},eN=function(a){return function(b){var c=b.key;return $APP.D.i(c," ")||$APP.D.i(c,"Enter")?(b.preventDefault(),cN(a)):null}},fN=function(a){var b=$APP.l(a,"__xSwitchRefs");if($APP.r(b)){var c=$APP.l(a,"__xSwitchHandlers");if($APP.r(c)){b=
7
- $APP.l(b,"control");b.removeEventListener("click",$APP.l(c,"click"));b.removeEventListener("keydown",$APP.l(c,"keydown"));a.__xSwitchHandlers=null;return}}return null},gN=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return $M(this,c,$APP.I(d))}})},hN=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.r(d)?d:null},set:function(d){return d!=
8
- null&&$APP.O(d)?ZM(this,c,""+$APP.S.g(d)):this.removeAttribute(c)}})},jN=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;Object.defineProperty(a,"observedAttributes",{get:function(){return iN}});gN(b,"checked","checked");gN(b,"disabled","disabled");gN(b,"readOnly","readonly");gN(b,"required","required");hN(b,"name","name");hN(b,"value","value");b.connectedCallback=function(){if(!$APP.r($APP.l(this,"__xSwitchRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),
9
- e=document.createElement("button"),g=document.createElement("span"),h=document.createElement("span");d.textContent=":host{display:inline-block;vertical-align:middle;color-scheme:light dark;--x-switch-track-width:44px;--x-switch-track-height:24px;--x-switch-thumb-size:18px;--x-switch-thumb-offset:3px;--x-switch-track-radius:999px;--x-switch-track-bg:#d1d5db;--x-switch-track-bg-checked:#2563eb;--x-switch-thumb-bg:#ffffff;--x-switch-focus-ring:#60a5fa;--x-switch-disabled-opacity:0.45;--x-switch-transition:background 150ms ease,transform 150ms ease;}@media (prefers-color-scheme:dark){:host{--x-switch-track-bg:#4b5563;--x-switch-track-bg-checked:#3b82f6;--x-switch-thumb-bg:#f9fafb;--x-switch-focus-ring:#93c5fd;}}[part\x3dcontrol]{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;padding:0;cursor:pointer;}[part\x3dcontrol][disabled]{cursor:default;opacity:var(--x-switch-disabled-opacity);}[part\x3dcontrol]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--x-switch-focus-ring);border-radius:calc(var(--x-switch-track-radius) + 2px);}[part\x3dtrack]{position:relative;display:inline-block;width:var(--x-switch-track-width);height:var(--x-switch-track-height);border-radius:var(--x-switch-track-radius);background:var(--x-switch-track-bg);transition:background 150ms ease;flex-shrink:0;}:host([data-checked]) [part\x3dtrack]{background:var(--x-switch-track-bg-checked);}[part\x3dthumb]{position:absolute;top:var(--x-switch-thumb-offset);left:var(--x-switch-thumb-offset);width:var(--x-switch-thumb-size);height:var(--x-switch-thumb-size);border-radius:50%;background:var(--x-switch-thumb-bg);box-shadow:0 1px 3px rgba(0,0,0,0.25);transition:transform 150ms ease;}:host([data-checked]) [part\x3dthumb]{transform:translateX(calc(var(--x-switch-track-width) - var(--x-switch-thumb-size) - calc(var(--x-switch-thumb-offset) * 2)));}@media (prefers-reduced-motion:reduce){[part\x3dtrack]{transition:none;}[part\x3dthumb]{transition:none;}}";
10
- e.setAttribute("part","control");e.setAttribute("type","button");e.setAttribute("role","switch");g.setAttribute("part","track");h.setAttribute("part","thumb");g.appendChild(h);e.appendChild(g);c.appendChild(d);c.appendChild(e);this.__xSwitchRefs={root:c,control:e,track:g,thumb:h};$APP.r(this.attachInternals)&&(this.__xSwitchInternals=this.attachInternals())}fN(this);c=$APP.l(this,"__xSwitchRefs");$APP.r(c)&&(c=$APP.l(c,"control"),d=dN(this),e=eN(this),g={click:d,keydown:e},c.addEventListener("click",
11
- d),c.addEventListener("keydown",e),this.__xSwitchHandlers=g);d=this.getAttribute("id");$APP.r(d)&&(c=document.querySelector("label[for\x3d'"+$APP.S.g(d)+"']"),$APP.r(c)&&(e=c.getAttribute("id"),$APP.r(e)?c=e:(d="x-sw-lbl-"+$APP.S.g(d),c.setAttribute("id",d),c=d),d=$APP.l(this,"__xSwitchRefs"),$APP.r(d)&&$APP.l(d,"control").setAttribute("aria-labelledby",c)));return bN(this)};b.disconnectedCallback=function(){return fN(this)};b.attributeChangedCallback=function(){return bN(this)};b.formDisabledCallback=
12
- function(c){$M(this,"disabled",$APP.I(c));return bN(this)};b.formResetCallback=function(){this.removeAttribute("checked");return bN(this)};return a},kN=function(){return $APP.r(customElements.get("x-switch"))?null:customElements.define("x-switch",jN())};var iN="checked disabled readonly required name value aria-label aria-describedby aria-labelledby".split(" ");$APP.Sd(["x-switch-change-request",new $APP.P(null,2,[$APP.kl,!0,$APP.U,new $APP.P(null,3,[$APP.ui,$APP.Y,$APP.Ej,$APP.qj,$APP.Xk,$APP.qj],null)],null),"x-switch-change",new $APP.P(null,2,[$APP.kl,!1,$APP.U,new $APP.P(null,2,[$APP.ui,$APP.Y,$APP.Hl,$APP.qj],null)],null)]);$APP.ka("baredom.exports.x_switch.init",kN);export const init=kN;
2
+ var DN=function(a,b,c){return a.setAttribute(b,c)},EN=function(a,b,c){return $APP.r(c)?a.setAttribute(b,""):a.removeAttribute(b)},FN=function(a){a=$APP.Q([$APP.Fk,$APP.Sk,$APP.sh,$APP.Dh,$APP.Mi,$APP.cj,$APP.wl,$APP.kj,$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.G(b,$APP.kj);var c=$APP.G(b,$APP.Ui),d=$APP.G(b,$APP.Fk),e=$APP.G(b,$APP.Sk),g=$APP.G(b,$APP.sh),h=$APP.G(b,$APP.Dh),k=$APP.G(b,$APP.Mi),m=$APP.G(b,$APP.cj);b=$APP.G(b,$APP.wl);k=$APP.I(k);g=$APP.I(g);return $APP.Q([$APP.Lh,$APP.Gh,$APP.Tl,$APP.Wi,$APP.xh,$APP.Si,$APP.ri,$APP.sj,$APP.Pl,$APP.Uk,$APP.W],[g,k?"true":"false",$APP.I(m),k,$APP.r(g)?k:!0,d,b!=null?b:"on",h,c,a,$APP.I(e)])},GN=function(a){var b=$APP.l(a,"__xSwitchRefs");if($APP.r(b)){var c=$APP.l(b,"control");b=FN(a);var d=$APP.W.g(b),
4
+ e=$APP.Wi.g(b);DN(c,"aria-checked",$APP.Gh.g(b));c.setAttribute("aria-disabled",$APP.r(d)?"true":"false");DN(c,"aria-required",$APP.r($APP.Lh.g(b))?"true":"false");DN(c,"aria-readonly",$APP.r($APP.Tl.g(b))?"true":"false");var g=$APP.Uk.g(b);$APP.r(g)?c.setAttribute("aria-label",g):c.removeAttribute("aria-label");g=$APP.sj.g(b);$APP.r(g)?c.setAttribute("aria-labelledby",g):c.removeAttribute("aria-labelledby");g=$APP.Pl.g(b);$APP.r(g)?c.setAttribute("aria-describedby",g):c.removeAttribute("aria-describedby");
5
+ c.tabIndex=$APP.r(d)?-1:0;$APP.r(d)?c.setAttribute("disabled",""):c.removeAttribute("disabled");EN(a,"data-checked",e);EN(a,"data-disabled",d);a=$APP.l(a,"__xSwitchInternals");return $APP.r(a)?a.setFormValue($APP.r(e)?$APP.ri.g(b):null):null}return null},HN=function(a){var b=FN(a),c=$APP.W.g(b),d=$APP.Tl.g(b);if($APP.r($APP.r(c)?c:d))return null;d=$APP.Wi.g(b);c=$APP.t(d);b=$APP.ri.g(b);d=new CustomEvent("x-switch-change-request",{detail:{value:b,previousChecked:d,nextChecked:c},bubbles:!0,composed:!0,
6
+ cancelable:!0});a.dispatchEvent(d);return $APP.t(d.defaultPrevented)?(EN(a,"checked",c),GN(a),a.dispatchEvent(new CustomEvent("x-switch-change",{detail:{value:b,checked:c},bubbles:!0,composed:!0,cancelable:!1}))):null},IN=function(a){return function(){return HN(a)}},JN=function(a){return function(b){var c=b.key;return $APP.D.i(c," ")||$APP.D.i(c,"Enter")?(b.preventDefault(),HN(a)):null}},KN=function(a){var b=$APP.l(a,"__xSwitchRefs");if($APP.r(b)){var c=$APP.l(a,"__xSwitchHandlers");if($APP.r(c)){b=
7
+ $APP.l(b,"control");b.removeEventListener("click",$APP.l(c,"click"));b.removeEventListener("keydown",$APP.l(c,"keydown"));a.__xSwitchHandlers=null;return}}return null},LN=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return EN(this,c,$APP.I(d))}})},MN=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.r(d)?d:null},set:function(d){return d!=
8
+ null&&$APP.O(d)?DN(this,c,""+$APP.S.g(d)):this.removeAttribute(c)}})},ON=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;Object.defineProperty(a,"observedAttributes",{get:function(){return NN}});LN(b,"checked","checked");LN(b,"disabled","disabled");LN(b,"readOnly","readonly");LN(b,"required","required");MN(b,"name","name");MN(b,"value","value");b.connectedCallback=function(){if(!$APP.r($APP.l(this,"__xSwitchRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),
9
+ e=document.createElement("button"),g=document.createElement("span"),h=document.createElement("span");d.textContent=":host{display:inline-block;vertical-align:middle;color-scheme:light dark;--x-switch-track-width:44px;--x-switch-track-height:24px;--x-switch-thumb-size:18px;--x-switch-thumb-offset:3px;--x-switch-track-radius:var(--x-radius-full,999px);--x-switch-track-bg:var(--x-color-border,#d1d5db);--x-switch-track-bg-checked:var(--x-color-primary,#2563eb);--x-switch-thumb-bg:var(--x-color-bg,#ffffff);--x-switch-focus-ring:var(--x-color-focus-ring,#60a5fa);--x-switch-disabled-opacity:0.45;--x-switch-transition:background var(--x-transition-duration,150ms) var(--x-transition-easing,ease),transform var(--x-transition-duration,150ms) var(--x-transition-easing,ease);}@media (prefers-color-scheme:dark){:host{--x-switch-track-bg:var(--x-color-border,#4b5563);--x-switch-track-bg-checked:var(--x-color-primary,#3b82f6);--x-switch-thumb-bg:var(--x-color-bg,#f9fafb);--x-switch-focus-ring:var(--x-color-focus-ring,#93c5fd);}}[part\x3dcontrol]{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;padding:0;cursor:pointer;}[part\x3dcontrol][disabled]{cursor:default;opacity:var(--x-switch-disabled-opacity);}[part\x3dcontrol]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--x-switch-focus-ring);border-radius:calc(var(--x-switch-track-radius) + 2px);}[part\x3dtrack]{position:relative;display:inline-block;width:var(--x-switch-track-width);height:var(--x-switch-track-height);border-radius:var(--x-switch-track-radius);background:var(--x-switch-track-bg);transition:background 150ms ease;flex-shrink:0;}:host([data-checked]) [part\x3dtrack]{background:var(--x-switch-track-bg-checked);}[part\x3dthumb]{position:absolute;top:var(--x-switch-thumb-offset);left:var(--x-switch-thumb-offset);width:var(--x-switch-thumb-size);height:var(--x-switch-thumb-size);border-radius:50%;background:var(--x-switch-thumb-bg);box-shadow:0 1px 3px rgba(0,0,0,0.25);transition:transform 150ms ease;}:host([data-checked]) [part\x3dthumb]{transform:translateX(calc(var(--x-switch-track-width) - var(--x-switch-thumb-size) - calc(var(--x-switch-thumb-offset) * 2)));}@media (prefers-reduced-motion:reduce){[part\x3dtrack]{transition:none;}[part\x3dthumb]{transition:none;}}";
10
+ e.setAttribute("part","control");e.setAttribute("type","button");e.setAttribute("role","switch");g.setAttribute("part","track");h.setAttribute("part","thumb");g.appendChild(h);e.appendChild(g);c.appendChild(d);c.appendChild(e);this.__xSwitchRefs={root:c,control:e,track:g,thumb:h};$APP.r(this.attachInternals)&&(this.__xSwitchInternals=this.attachInternals())}KN(this);c=$APP.l(this,"__xSwitchRefs");$APP.r(c)&&(c=$APP.l(c,"control"),d=IN(this),e=JN(this),g={click:d,keydown:e},c.addEventListener("click",
11
+ d),c.addEventListener("keydown",e),this.__xSwitchHandlers=g);d=this.getAttribute("id");$APP.r(d)&&(c=document.querySelector("label[for\x3d'"+$APP.S.g(d)+"']"),$APP.r(c)&&(e=c.getAttribute("id"),$APP.r(e)?c=e:(d="x-sw-lbl-"+$APP.S.g(d),c.setAttribute("id",d),c=d),d=$APP.l(this,"__xSwitchRefs"),$APP.r(d)&&$APP.l(d,"control").setAttribute("aria-labelledby",c)));return GN(this)};b.disconnectedCallback=function(){return KN(this)};b.attributeChangedCallback=function(){return GN(this)};b.formDisabledCallback=
12
+ function(c){EN(this,"disabled",$APP.I(c));return GN(this)};b.formResetCallback=function(){this.removeAttribute("checked");return GN(this)};return a},PN=function(){return $APP.r(customElements.get("x-switch"))?null:customElements.define("x-switch",ON())};var NN="checked disabled readonly required name value aria-label aria-describedby aria-labelledby".split(" ");$APP.Sd(["x-switch-change-request",new $APP.P(null,2,[$APP.ll,!0,$APP.U,new $APP.P(null,3,[$APP.ri,$APP.X,$APP.Ej,$APP.qj,$APP.Yk,$APP.qj],null)],null),"x-switch-change",new $APP.P(null,2,[$APP.ll,!1,$APP.U,new $APP.P(null,2,[$APP.ri,$APP.X,$APP.Il,$APP.qj],null)],null)]);$APP.ka("baredom.exports.x_switch.init",PN);export const init=PN;