@vanelsas/baredom 2.7.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/custom-elements.json +344 -5
  3. package/dist/baredom.d.ts +4 -0
  4. package/dist/base.js +451 -427
  5. package/dist/integrity.json +97 -93
  6. package/dist/x-alert.js +17 -18
  7. package/dist/x-avatar-group.js +9 -10
  8. package/dist/x-avatar.js +15 -15
  9. package/dist/x-badge.js +9 -10
  10. package/dist/x-bento-grid.js +5 -5
  11. package/dist/x-bento-item.js +4 -4
  12. package/dist/x-breadcrumbs.js +13 -14
  13. package/dist/x-button.js +16 -18
  14. package/dist/x-cancel-dialogue.js +13 -17
  15. package/dist/x-card.js +7 -7
  16. package/dist/x-carousel.js +33 -34
  17. package/dist/x-chart.d.ts +26 -0
  18. package/dist/x-chart.js +47 -46
  19. package/dist/x-checkbox.js +11 -10
  20. package/dist/x-chip.js +1 -9
  21. package/dist/x-collapse.js +10 -10
  22. package/dist/x-color-picker.js +44 -44
  23. package/dist/x-combobox.js +26 -26
  24. package/dist/x-command-palette.js +26 -26
  25. package/dist/x-container.js +4 -4
  26. package/dist/x-context-menu.d.ts +31 -2
  27. package/dist/x-context-menu.js +20 -18
  28. package/dist/x-copy.js +20 -23
  29. package/dist/x-currency-field.js +23 -23
  30. package/dist/x-date-picker.d.ts +27 -0
  31. package/dist/x-date-picker.js +42 -41
  32. package/dist/x-divider.js +9 -9
  33. package/dist/x-drawer.js +10 -11
  34. package/dist/x-dropdown.js +11 -10
  35. package/dist/x-fieldset.js +5 -6
  36. package/dist/x-file-download.js +7 -7
  37. package/dist/x-file-upload.js +20 -20
  38. package/dist/x-form-field.js +15 -15
  39. package/dist/x-form.js +9 -8
  40. package/dist/x-gaussian-blur.js +13 -19
  41. package/dist/x-grid.js +6 -6
  42. package/dist/x-i18n-provider.d.ts +43 -0
  43. package/dist/x-i18n-provider.js +8 -0
  44. package/dist/x-i18n.d.ts +14 -0
  45. package/dist/x-i18n.js +5 -0
  46. package/dist/x-icon.js +6 -7
  47. package/dist/x-image.js +18 -19
  48. package/dist/x-kinetic-canvas.d.ts +18 -0
  49. package/dist/x-kinetic-canvas.js +26 -0
  50. package/dist/x-kinetic-font.js +27 -28
  51. package/dist/x-kinetic-typography.js +33 -39
  52. package/dist/x-liquid-dock.js +39 -39
  53. package/dist/x-liquid-fill.js +45 -45
  54. package/dist/x-liquid-glass.js +47 -47
  55. package/dist/x-menu-item.js +8 -9
  56. package/dist/x-menu.js +10 -11
  57. package/dist/x-metaball-cursor.js +27 -27
  58. package/dist/x-modal.js +11 -12
  59. package/dist/x-morph-stack.js +37 -38
  60. package/dist/x-multi-combobox.d.ts +50 -0
  61. package/dist/x-multi-combobox.js +37 -0
  62. package/dist/x-navbar.js +12 -12
  63. package/dist/x-neural-glow.js +33 -33
  64. package/dist/x-notification-center.js +9 -9
  65. package/dist/x-organic-divider.js +17 -18
  66. package/dist/x-organic-progress.js +38 -38
  67. package/dist/x-organic-shape.js +13 -13
  68. package/dist/x-pagination.js +15 -16
  69. package/dist/x-particle-button.js +51 -51
  70. package/dist/x-popover.js +26 -24
  71. package/dist/x-progress-circle.js +9 -10
  72. package/dist/x-progress.js +10 -11
  73. package/dist/x-radio.js +11 -10
  74. package/dist/x-ripple-effect.js +11 -12
  75. package/dist/x-scroll-parallax.js +18 -19
  76. package/dist/x-scroll-stack.js +17 -18
  77. package/dist/x-scroll-story.js +34 -36
  78. package/dist/x-scroll-timeline.js +45 -46
  79. package/dist/x-scroll.js +40 -41
  80. package/dist/x-search-field.js +15 -15
  81. package/dist/x-select.js +10 -9
  82. package/dist/x-sidebar.js +17 -17
  83. package/dist/x-skeleton-group.js +12 -12
  84. package/dist/x-skeleton.js +1 -1
  85. package/dist/x-slider.js +15 -16
  86. package/dist/x-soft-body.js +22 -22
  87. package/dist/x-spacer.js +4 -5
  88. package/dist/x-spinner.js +4 -5
  89. package/dist/x-splash.js +12 -13
  90. package/dist/x-stat.js +10 -12
  91. package/dist/x-stepper.js +14 -15
  92. package/dist/x-switch.js +10 -9
  93. package/dist/x-tab.js +7 -8
  94. package/dist/x-table-cell.js +20 -24
  95. package/dist/x-table-row.js +8 -9
  96. package/dist/x-table.js +12 -15
  97. package/dist/x-tabs.js +11 -11
  98. package/dist/x-text-area.js +18 -18
  99. package/dist/x-theme.js +25 -25
  100. package/dist/x-timeline-item.js +21 -23
  101. package/dist/x-timeline.js +8 -9
  102. package/dist/x-toast.js +22 -24
  103. package/dist/x-toaster.js +8 -8
  104. package/dist/x-tooltip.js +12 -11
  105. package/dist/x-typography.js +9 -11
  106. package/dist/x-welcome-tour.js +60 -64
  107. package/package.json +21 -1
package/dist/x-slider.js CHANGED
@@ -1,17 +1,16 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var XM=function(a,b){return typeof a==="string"?(a=parseFloat(a),$APP.n(isNaN(a))?b:a):b},aN=function(a){var b=$APP.k(a,"__xSliderRefs");if($APP.n(b)){var c=$APP.k(b,"base"),d=$APP.k(b,"header"),e=$APP.k(b,"label"),g=$APP.k(b,"value");b=$APP.k(b,"input");var h=$APP.zf([$APP.Bk,$APP.kk,$APP.Fk,$APP.Sj,$APP.pj,$APP.Tj,$APP.wk,$APP.di,$APP.nl,$APP.T,$APP.sn,$APP.hm,$APP.Zm],[a.getAttribute("min"),a.hasAttribute("disabled"),a.hasAttribute("show-value"),a.getAttribute("name"),a.getAttribute("value"),a.hasAttribute("readonly"),
3
- 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 l=$APP.M(h);h=$APP.D(l,$APP.hm);var m=$APP.D(l,$APP.Zm),p=$APP.D(l,$APP.Bk),r=$APP.D(l,$APP.kk),v=$APP.D(l,$APP.Fk),x=$APP.D(l,$APP.pj),y=$APP.D(l,$APP.Sj),A=$APP.D(l,$APP.Tj),C=$APP.D(l,$APP.wk),E=$APP.D(l,$APP.di),H=$APP.D(l,$APP.T),G=$APP.D(l,$APP.nl);l=$APP.D(l,$APP.sn);p=XM(p,0);G=XM(G,100);x=$APP.Kh.i($APP.Jh.i(XM(x,
4
- 0),p),G);$APP.B.i(m,"any")?m="any":(m=typeof m==="string"?parseFloat(m):NaN,m=$APP.q(isNaN(m))&&m>0?""+$APP.S.g(m):"1");E=typeof E==="string"&&$APP.I(YM,E)?E:"md";r=$APP.F(r);A=$APP.F(A);v=$APP.F(v);var J=G>p?$APP.Kh.i($APP.Jh.i((x-p)/(G-p)*100,0),100):0;h=$APP.zf([$APP.Bk,$APP.wn,$APP.Sj,$APP.pj,$APP.wk,ZM,$APP.di,$APP.nl,$APP.T,$APP.sn,$APP.hm,$APP.X,$APP.Zm,$M],[p,A,typeof y==="string"&&$APP.N("",y)?y:null,x,typeof C==="string"&&$APP.N("",C)?C:null,v,E,G,typeof H==="string"&&$APP.N("",H)?H:null,
5
- typeof l==="string"&&$APP.N("",l)?l:null,typeof h==="string"&&$APP.N("",h)?h:null,r,m,J]);m=$APP.M(h);y=$APP.D(m,$APP.hm);C=$APP.D(m,$APP.X);H=$APP.D(m,$APP.Zm);l=$APP.D(m,$M);v=$APP.D(m,$APP.Bk);p=$APP.D(m,$APP.wn);h=$APP.D(m,$APP.pj);A=$APP.D(m,$APP.wk);G=$APP.D(m,ZM);r=$APP.D(m,$APP.di);x=$APP.D(m,$APP.T);E=$APP.D(m,$APP.nl);m=$APP.D(m,$APP.sn);J=(J=x!=null)?J:G;c.setAttribute("data-size",r);$APP.Pg(a,"data-disabled",C);$APP.Pg(a,"data-readonly",p);d.style.display=$APP.n(J)?"flex":"none";e.textContent=
6
- $APP.n(x)?x:"";e.style.display=x!=null?"":"none";g.textContent=$APP.n(G)?""+$APP.S.g(h):"";g.style.display=$APP.n(G)?"":"none";a.style.setProperty("--_x-slider-fill",""+$APP.S.g(l.toFixed(2))+"%");$APP.Og(b,"min",""+$APP.S.g(v));$APP.Og(b,"max",""+$APP.S.g(E));b.setAttribute("step",H);$APP.N(b.value,""+$APP.S.g(h))&&(b.value=""+$APP.S.g(h));$APP.Og(b,"aria-valuemin",""+$APP.S.g(v));$APP.Og(b,"aria-valuemax",""+$APP.S.g(E));$APP.Og(b,"aria-valuenow",""+$APP.S.g(h));b.setAttribute("aria-readonly",$APP.n(p)?
7
- "true":"false");$APP.n(y)?b.setAttribute("aria-label",y):x!=null?b.setAttribute("aria-label",x):b.removeAttribute("aria-label");$APP.n(A)?b.setAttribute("aria-labelledby",A):b.removeAttribute("aria-labelledby");$APP.n(m)?b.setAttribute("aria-describedby",m):b.removeAttribute("aria-describedby");$APP.n(C)?b.setAttribute("disabled",""):b.removeAttribute("disabled");a=$APP.k(a,"__xSliderInternals");return $APP.n(a)?a.setFormValue(""+$APP.S.g(h)):null}return null},bN=function(a){return function(){if($APP.n(a.hasAttribute("disabled")))return null;
8
- var b=$APP.k($APP.k(a,"__xSliderRefs"),"input"),c=b.value,d=parseFloat(c),e=parseFloat(function(){var l=a.getAttribute("value");return $APP.n(l)?l:"0"}()),g=parseFloat(function(){var l=a.getAttribute("min");return $APP.n(l)?l:"0"}()),h=parseFloat(function(){var l=a.getAttribute("max");return $APP.n(l)?l:"100"}());return $APP.Rg(a,"x-slider-change-request",{value:d,previousValue:e,min:g,max:h})?(a.setAttribute("value",c),$APP.Qg(a,"x-slider-input",{value:d,min:g,max:h})):b.value=function(){var l=a.getAttribute("value");
9
- return $APP.n(l)?l:"0"}()}},cN=function(a){return function(){if($APP.n(a.hasAttribute("disabled")))return null;var b=parseFloat($APP.k($APP.k(a,"__xSliderRefs"),"input").value),c=parseFloat(function(){var e=a.getAttribute("min");return $APP.n(e)?e:"0"}()),d=parseFloat(function(){var e=a.getAttribute("max");return $APP.n(e)?e:"100"}());return $APP.Qg(a,"x-slider-change",{value:b,min:c,max:d})}},eN=function(a){return function(b){var c=a.hasAttribute("readonly");c=$APP.n(c)?$APP.I(dN,b.key):c;return $APP.n(c)?
10
- b.preventDefault():null}},fN=function(a){var b=$APP.k(a,"__xSliderRefs");if($APP.n(b)){var c=$APP.k(a,"__xSliderHandlers");if($APP.n(c)){b=$APP.k(b,"input");b.removeEventListener("input",$APP.k(c,"input"));b.removeEventListener("change",$APP.k(c,"change"));b.removeEventListener("keydown",$APP.k(c,"keydown"));a.__xSliderHandlers=null;return}}return null},gN=function(a,b){$APP.Pg(a,"disabled",$APP.F(b));return aN(a)},hN=function(a){$APP.Og(a,"value",""+$APP.S.g(0));return aN(a)},iN=function(a){if(!$APP.n($APP.k(a,
11
- "__xSliderRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("span"),h=document.createElement("span"),l=document.createElement("input");c.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;}}";
12
- d.setAttribute("part","base");e.setAttribute("part","header");g.setAttribute("part","label-text");h.setAttribute("part","value-text");l.setAttribute("part","input");l.setAttribute("type","range");e.appendChild(g);e.appendChild(h);d.appendChild(e);d.appendChild(l);b.appendChild(c);b.appendChild(d);a.__xSliderRefs={base:d,header:e,label:g,value:h,input:l};$APP.n(a.attachInternals)&&(b=a.attachInternals(),a.__xSliderInternals=b)}fN(a);b=$APP.k(a,"__xSliderRefs");$APP.n(b)&&(b=$APP.k(b,"input"),c=bN(a),
13
- d=cN(a),e=eN(a),g={input:c,change:d,keydown:e},b.addEventListener("input",c),b.addEventListener("change",d),b.addEventListener("keydown",e),a.__xSliderHandlers=g);return aN(a)},jN=function(a){return fN(a)},kN=function(a){return aN(a)},lN=function(a){$APP.Sg(a,"disabled","disabled");$APP.Sg(a,"readOnly","readonly");$APP.Sg(a,"showValue","show-value");$APP.Ug(a,"value","value");$APP.Ug(a,"min","min");$APP.Ug(a,"max","max");$APP.Ug(a,"step","step");$APP.Ug(a,"name","name");$APP.Ug(a,"label","label");
14
- return $APP.Ug(a,"size","size")},nN=function(){return $APP.Lg("x-slider",new $APP.Q(null,8,[$APP.Cg,mN,$APP.Dg,iN,$APP.Eg,jN,$APP.Fg,kN,$APP.Gg,!0,$APP.Hg,gN,$APP.Ig,hN,$APP.Jg,lN],null))},ZM=new $APP.K(null,"show-value?","show-value?",-1960833108),$M=new $APP.K(null,"fill-percent","fill-percent",-1813848228);var YM=new $APP.R(null,new $APP.Q(null,3,["md",null,"lg",null,"sm",null],null),null),mN="value min max step disabled readonly name label show-value size aria-label aria-labelledby aria-describedby".split(" ");
15
- $APP.zf([$APP.Bk,$APP.kk,$APP.fi,$APP.Sj,$APP.pj,$APP.di,$APP.Mm,$APP.nl,$APP.T,$APP.Zm],[new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"min"],null),new $APP.Q(null,2,[$APP.Z,$APP.uk,$APP.$k,"disabled"],null),new $APP.Q(null,2,[$APP.Z,$APP.uk,$APP.$k,"show-value"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"name"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"value"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"size"],null),new $APP.Q(null,2,[$APP.Z,$APP.uk,$APP.$k,"readonly"],null),new $APP.Q(null,
16
- 2,[$APP.Z,$APP.Y,$APP.$k,"max"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"label"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.$k,"step"],null)]);
17
- $APP.Pd(["x-slider-change-request",new $APP.Q(null,2,[$APP.Km,!0,$APP.V,new $APP.Q(null,4,[$APP.pj,$APP.W,$APP.kl,$APP.W,$APP.Bk,$APP.W,$APP.nl,$APP.W],null)],null),"x-slider-input",new $APP.Q(null,1,[$APP.V,new $APP.Q(null,3,[$APP.pj,$APP.W,$APP.Bk,$APP.W,$APP.nl,$APP.W],null)],null),"x-slider-change",new $APP.Q(null,1,[$APP.V,new $APP.Q(null,3,[$APP.pj,$APP.W,$APP.Bk,$APP.W,$APP.nl,$APP.W],null)],null)]);var dN=new $APP.R(null,new $APP.Q(null,8,["PageDown",null,"ArrowUp",null,"ArrowDown",null,"End",null,"ArrowRight",null,"ArrowLeft",null,"PageUp",null,"Home",null],null),null);$APP.ha("baredom.exports.x_slider.init",nN);export const init=nN;
2
+ var jP=function(a,b){return typeof a==="string"?(a=parseFloat(a),$APP.n(isNaN(a))?b:a):b},nP=function(a){var b=$APP.k(a,"__xSliderRefs");if($APP.n(b)){var c=$APP.k(b,"base"),d=$APP.k(b,"header"),e=$APP.k(b,"label"),f=$APP.k(b,"value");b=$APP.k(b,"input");var h=$APP.Lf([$APP.ql,$APP.al,$APP.ul,$APP.Nk,$APP.Gh,$APP.hh,$APP.ll,$APP.bj,$APP.em,$APP.X,$APP.mo,$APP.gn,$APP.Tn],[a.getAttribute("min"),a.hasAttribute("disabled"),a.hasAttribute("show-value"),a.getAttribute("name"),a.getAttribute("value"),a.hasAttribute("readonly"),
3
+ 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 l=$APP.J(h);h=$APP.C(l,$APP.gn);var m=$APP.C(l,$APP.Tn),q=$APP.C(l,$APP.ql),r=$APP.C(l,$APP.al),v=$APP.C(l,$APP.ul),x=$APP.C(l,$APP.Gh),y=$APP.C(l,$APP.Nk),A=$APP.C(l,$APP.hh),D=$APP.C(l,$APP.ll),G=$APP.C(l,$APP.bj),I=$APP.C(l,$APP.X),H=$APP.C(l,$APP.em);l=$APP.C(l,$APP.mo);q=jP(q,0);H=jP(H,100);x=$APP.Ii.i($APP.Hi.i(jP(x,
4
+ 0),q),H);$APP.B.i(m,"any")?m="any":(m=typeof m==="string"?parseFloat(m):NaN,m=$APP.p(isNaN(m))&&m>0?""+$APP.Q.g(m):"1");G=typeof G==="string"&&$APP.Zc(kP,G)?G:"md";r=$APP.E(r);A=$APP.E(A);v=$APP.E(v);var K=H>q?$APP.Ii.i($APP.Hi.i((x-q)/(H-q)*100,0),100):0;h=$APP.Lf([$APP.ql,$APP.ro,$APP.Nk,$APP.Gh,$APP.ll,lP,$APP.bj,$APP.em,$APP.X,$APP.mo,$APP.gn,$APP.Y,$APP.Tn,mP],[q,A,typeof y==="string"&&$APP.M("",y)?y:null,x,typeof D==="string"&&$APP.M("",D)?D:null,v,G,H,typeof I==="string"&&$APP.M("",I)?I:null,
5
+ typeof l==="string"&&$APP.M("",l)?l:null,typeof h==="string"&&$APP.M("",h)?h:null,r,m,K]);m=$APP.J(h);y=$APP.C(m,$APP.gn);D=$APP.C(m,$APP.Y);I=$APP.C(m,$APP.Tn);l=$APP.C(m,mP);v=$APP.C(m,$APP.ql);q=$APP.C(m,$APP.ro);h=$APP.C(m,$APP.Gh);A=$APP.C(m,$APP.ll);H=$APP.C(m,lP);r=$APP.C(m,$APP.bj);x=$APP.C(m,$APP.X);G=$APP.C(m,$APP.em);m=$APP.C(m,$APP.mo);K=(K=x!=null)?K:H;c.setAttribute("data-size",r);$APP.bh(a,"data-disabled",D);$APP.bh(a,"data-readonly",q);d.style.display=$APP.n(K)?"flex":"none";e.textContent=
6
+ $APP.n(x)?x:"";e.style.display=x!=null?"":"none";f.textContent=$APP.n(H)?""+$APP.Q.g(h):"";f.style.display=$APP.n(H)?"":"none";a.style.setProperty("--_x-slider-fill",""+$APP.Q.g(l.toFixed(2))+"%");$APP.ah(b,"min",""+$APP.Q.g(v));$APP.ah(b,"max",""+$APP.Q.g(G));b.setAttribute("step",I);$APP.M(b.value,""+$APP.Q.g(h))&&(b.value=""+$APP.Q.g(h));$APP.ah(b,"aria-valuemin",""+$APP.Q.g(v));$APP.ah(b,"aria-valuemax",""+$APP.Q.g(G));$APP.ah(b,"aria-valuenow",""+$APP.Q.g(h));b.setAttribute("aria-readonly",$APP.n(q)?
7
+ "true":"false");$APP.n(y)?b.setAttribute("aria-label",y):x!=null?b.setAttribute("aria-label",x):b.removeAttribute("aria-label");$APP.n(A)?b.setAttribute("aria-labelledby",A):b.removeAttribute("aria-labelledby");$APP.n(m)?b.setAttribute("aria-describedby",m):b.removeAttribute("aria-describedby");$APP.n(D)?b.setAttribute("disabled",""):b.removeAttribute("disabled");a=$APP.k(a,"__xSliderInternals");return $APP.n(a)?a.setFormValue(""+$APP.Q.g(h)):null}return null},oP=function(a){return function(){if($APP.n(a.hasAttribute("disabled")))return null;
8
+ var b=$APP.k($APP.k(a,"__xSliderRefs"),"input"),c=b.value,d=parseFloat(c),e=parseFloat(function(){var l=a.getAttribute("value");return $APP.n(l)?l:"0"}()),f=parseFloat(function(){var l=a.getAttribute("min");return $APP.n(l)?l:"0"}()),h=parseFloat(function(){var l=a.getAttribute("max");return $APP.n(l)?l:"100"}());return $APP.ch(a,"x-slider-change-request",{value:d,previousValue:e,min:f,max:h})?(a.setAttribute("value",c),$APP.P(a,"x-slider-input",{value:d,min:f,max:h})):b.value=function(){var l=a.getAttribute("value");
9
+ return $APP.n(l)?l:"0"}()}},pP=function(a){return function(){if($APP.n(a.hasAttribute("disabled")))return null;var b=parseFloat($APP.k($APP.k(a,"__xSliderRefs"),"input").value),c=parseFloat(function(){var e=a.getAttribute("min");return $APP.n(e)?e:"0"}()),d=parseFloat(function(){var e=a.getAttribute("max");return $APP.n(e)?e:"100"}());return $APP.P(a,"x-slider-change",{value:b,min:c,max:d})}},rP=function(a){return function(b){var c=a.hasAttribute("readonly");c=$APP.n(c)?$APP.Zc(qP,b.key):c;return $APP.n(c)?
10
+ b.preventDefault():null}},sP=function(a){var b=$APP.k(a,"__xSliderRefs");if($APP.n(b)){var c=$APP.k(a,"__xSliderHandlers");if($APP.n(c)){b=$APP.k(b,"input");b.removeEventListener("input",$APP.k(c,"input"));b.removeEventListener("change",$APP.k(c,"change"));b.removeEventListener("keydown",$APP.k(c,"keydown"));a.__xSliderHandlers=null;return}}return null},tP=function(a,b){$APP.bh(a,"disabled",$APP.E(b));return nP(a)},uP=function(a){$APP.ah(a,"value",""+$APP.Q.g(0));return nP(a)},vP=function(a){if(!$APP.n($APP.k(a,
11
+ "__xSliderRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),f=document.createElement("span"),h=document.createElement("span"),l=document.createElement("input");c.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;}}";
12
+ d.setAttribute("part","base");e.setAttribute("part","header");f.setAttribute("part","label-text");h.setAttribute("part","value-text");l.setAttribute("part","input");l.setAttribute("type","range");e.appendChild(f);e.appendChild(h);d.appendChild(e);d.appendChild(l);b.appendChild(c);b.appendChild(d);a.__xSliderRefs={base:d,header:e,label:f,value:h,input:l};$APP.n(a.attachInternals)&&(b=a.attachInternals(),a.__xSliderInternals=b)}sP(a);b=$APP.k(a,"__xSliderRefs");$APP.n(b)&&(b=$APP.k(b,"input"),c=oP(a),
13
+ d=pP(a),e=rP(a),f={input:c,change:d,keydown:e},b.addEventListener("input",c),b.addEventListener("change",d),b.addEventListener("keydown",e),a.__xSliderHandlers=f);return nP(a)},wP=function(a){return sP(a)},xP=function(a){return nP(a)},zP=function(a){return $APP.jh(a,yP)},BP=function(){return $APP.Yg("x-slider",new $APP.N(null,8,[$APP.Pg,AP,$APP.Qg,vP,$APP.Rg,wP,$APP.Sg,xP,$APP.Tg,!0,$APP.Ug,tP,$APP.Vg,uP,$APP.Wg,zP],null))},lP=new $APP.F(null,"show-value?","show-value?",-1960833108),mP=new $APP.F(null,
14
+ "fill-percent","fill-percent",-1813848228);var kP=new $APP.O(null,new $APP.N(null,3,["md",null,"lg",null,"sm",null],null),null),AP="value min max step disabled readonly name label show-value size aria-label aria-labelledby aria-describedby".split(" "),yP=$APP.Lf([$APP.ql,$APP.al,$APP.dj,$APP.Nk,$APP.Gh,$APP.bj,$APP.Hn,$APP.em,$APP.X,$APP.Tn],[new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"min"],null),new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"disabled"],null),new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"show-value"],null),new $APP.N(null,2,[$APP.R,$APP.U,
15
+ $APP.S,"name"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"value"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"size"],null),new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"readonly"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"max"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"label"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"step"],null)]);
16
+ $APP.Yd(["x-slider-change-request",new $APP.N(null,2,[$APP.Fn,!0,$APP.Z,new $APP.N(null,4,[$APP.Gh,$APP.V,$APP.am,$APP.V,$APP.ql,$APP.V,$APP.em,$APP.V],null)],null),"x-slider-input",new $APP.N(null,1,[$APP.Z,new $APP.N(null,3,[$APP.Gh,$APP.V,$APP.ql,$APP.V,$APP.em,$APP.V],null)],null),"x-slider-change",new $APP.N(null,1,[$APP.Z,new $APP.N(null,3,[$APP.Gh,$APP.V,$APP.ql,$APP.V,$APP.em,$APP.V],null)],null)]);var qP=new $APP.O(null,new $APP.N(null,8,["PageDown",null,"ArrowUp",null,"ArrowDown",null,"End",null,"ArrowRight",null,"ArrowLeft",null,"PageUp",null,"Home",null],null),null);$APP.ca("baredom.exports.x_slider.init",BP);export const init=BP;
@@ -1,23 +1,23 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var yM=function(a,b,c,d){if(typeof a==="string"){a=a.trim();if($APP.B.i(a,""))return b;a=parseFloat(a);return $APP.n(isNaN(a))?b:Math.min(d,Math.max(c,a))}return b},zM=function(a,b,c,d,e,g){b=c+(e*(b-a)-g*c)*d;return[a+b*d,b]},AM=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.n(h)?50:20);return[a/d*g,b/d*g]},BM=function(){return $APP.F(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},CM=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}},EM=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=DM;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.Q(null,4,[$APP.Zi,b,$APP.Ek,d,$APP.ql,e,$APP.Ri,g],null)},HM=function(a){a=new $APP.Q(null,6,[$APP.Jm,a.getAttribute("stiffness"),$APP.qn,a.getAttribute("damping"),$APP.ak,a.getAttribute("radius"),$APP.Yk,a.getAttribute("intensity"),FM,a.getAttribute("grab-radius"),$APP.wj,a.getAttribute("disabled")],null);var b=$APP.M(a);a=
5
- $APP.D(b,$APP.Jm);var c=$APP.D(b,$APP.qn),d=$APP.D(b,$APP.ak),e=$APP.D(b,$APP.Yk),g=$APP.D(b,FM);b=$APP.D(b,$APP.wj);return new $APP.Q(null,6,[$APP.km,yM(a,180,10,1E3),$APP.gl,yM(c,12,1,100),$APP.ln,yM(d,16,6,200),$APP.Pk,yM(e,1,0,5),GM,yM(g,80,10,500),$APP.X,b!=null],null)},IM=function(a,b,c){var d=$APP.ln.g($APP.k(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),l=Math.sin(Math.PI/3),m=new Float64Array(20),p=new Float64Array(20);
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*l;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*l;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*l;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*l;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(l=0;;)if(l<20)d[l]=b[l],e[l]=c[l],g[l]=0,h[l]=0,l+=1;else break;a.__xSoftBodyRX=b;a.__xSoftBodyRY=c;a.__xSoftBodyCX=d;a.__xSoftBodyCY=e;a.__xSoftBodyVX=g;a.__xSoftBodyVY=h},JM=function(a){var b=$APP.M($APP.k(a,"__xSoftBodyRefs"));b=$APP.D(b,$APP.ql);var c=$APP.k(a,"__xSoftBodyCX");a=$APP.k(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.ed(e+19,20),h=e,l=$APP.ed(e+1,20),m=$APP.ed(e+2,20),p=(c[l]-c[g])/6,r=(a[l]-
8
- a[g])/6;g=(c[m]-c[h])/6;m=(a[m]-a[h])/6;var v=c[l]-c[h],x=a[l]-a[h];x=Math.sqrt(v*v+x*x)*.4;v=Math.sqrt(p*p+r*r);v=v>x?x/(v+.001):1;r=a[h]+r*v;var y=Math.sqrt(g*g+m*m);x=y>x?x/(y+.001):1;g=c[l]-g*x;m=a[l]-m*x;d.push("C"+$APP.S.g((c[h]+p*v).toFixed(2))+","+$APP.S.g(r.toFixed(2))+" "+$APP.S.g(g.toFixed(2))+","+$APP.S.g(m.toFixed(2))+" "+$APP.S.g(c[l].toFixed(2))+","+$APP.S.g(a[l].toFixed(2)));e+=1}else break;d.push("Z");b.setAttribute("d",d.join(""))},KM=function(a){var b=$APP.M($APP.k(a,"__xSoftBodyRefs"));
9
- b=$APP.D(b,$APP.ql);var c=$APP.k(a,"__xSoftBodyW"),d=$APP.k(a,"__xSoftBodyH");a=$APP.ln.g($APP.k(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)},MM=function(a){$APP.n($APP.k(a,"__xSoftBodyRaf"))||($APP.ja(a,
11
- "__xSoftBodyLF",performance.now()),$APP.ja(a,"__xSoftBodyRaf",requestAnimationFrame(function(){return LM(a)})))},NM=function(a){var b=$APP.k(a,"__xSoftBodyRaf");$APP.n(b)&&(cancelAnimationFrame(b),a.__xSoftBodyRaf=null)},OM=function(a,b){var c=$APP.M($APP.k(a,"__xSoftBodyRefs"));c=$APP.D(c,$APP.Ek).getBoundingClientRect();a.__xSoftBodyPX=b.clientX-c.left;a.__xSoftBodyPY=b.clientY-c.top;return null},PM=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;OM(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.X.g($APP.k(a,"__xSoftBodyModel"));h=$APP.n(h)?h:BM();$APP.n(h)||MM(a);return null}function g(h){return OM(a,h)}$APP.ja(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)},QM=function(a){var b=$APP.k(a,"__xSoftBodyHdl");$APP.n(b)&&(a.removeEventListener("pointermove",$APP.k(b,"move")),a.removeEventListener("pointerenter",$APP.k(b,"enter")),a.removeEventListener("pointerleave",$APP.k(b,"leave")),a.removeEventListener("pointerdown",$APP.k(b,"down")),a.removeEventListener("pointerup",$APP.k(b,"up")),a.__xSoftBodyHdl=
14
- null)},RM=function(a){Object.defineProperty(a,"stiffness",{get:function(){var b=this.getAttribute("stiffness");return yM(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 yM(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 yM(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 yM(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 yM(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});return Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0})},SM=function(a){var b=
17
- HM(a);a.__xSoftBodyModel=b;$APP.n($APP.k(a,"__xSoftBodyRefs"))||EM(a);a.__xSoftBodyPA=!1;a.__xSoftBodyGrab=!1;a.__xSoftBodyPX=0;a.__xSoftBodyPY=0;b=new ResizeObserver(function(c){if(c.length>0){var d=c[0].contentRect;c=d.width;d=d.height;if(c>0&&d>0){a.__xSoftBodyW=c;a.__xSoftBodyH=d;var e=$APP.M($APP.k(a,"__xSoftBodyRefs"));$APP.D(e,$APP.Ek).setAttribute("viewBox","0 0 "+$APP.S.g(c)+" "+$APP.S.g(d));IM(a,c,d);c=$APP.X.g($APP.k(a,"__xSoftBodyModel"));c=$APP.n(c)?c:BM();$APP.n(c)?KM(a):(JM(a),MM(a))}}return null});
18
- a.__xSoftBodyRO=b;b.observe(a);QM(a);PM(a);return null},TM=function(a){NM(a);QM(a);var b=$APP.k(a,"__xSoftBodyRO");$APP.n(b)&&(b.disconnect(),a.__xSoftBodyRO=null);return null},UM=function(a,b,c,d){$APP.N(c,d)&&$APP.n($APP.k(a,"__xSoftBodyRefs"))&&(b=HM(a),a.__xSoftBodyModel=b,c=$APP.k(a,"__xSoftBodyW"),d=$APP.k(a,"__xSoftBodyH"),$APP.n($APP.n(c)?$APP.n(d)?c>0&&d>0:d:c)&&(IM(a,c,d),b=$APP.X.g(b),b=$APP.n(b)?b:BM(),$APP.n(b)?(NM(a),KM(a)):(JM(a),MM(a))));return null},WM=function(){return $APP.Lg("x-soft-body",
19
- new $APP.Q(null,5,[$APP.Cg,VM,$APP.Dg,SM,$APP.Eg,TM,$APP.Fg,UM,$APP.Jg,RM],null))},GM=new $APP.K(null,"grab-radius","grab-radius",771838535),FM=new $APP.K(null,"grab-radius-raw","grab-radius-raw",-1019405976);var VM="stiffness damping radius intensity grab-radius disabled".split(" ");$APP.Pd(["x-soft-body-grab",new $APP.Q(null,2,[$APP.V,$APP.Qd,$APP.Km,!1],null),"x-soft-body-release",new $APP.Q(null,2,[$APP.V,$APP.Qd,$APP.Km,!1],null)]);var DM=":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;}}",LM=function LM(a){if($APP.n(a.isConnected)){var c=$APP.k(a,"__xSoftBodyModel"),d=performance.now(),e=Math.min(d-$APP.k(a,"__xSoftBodyLF"),100)/1E3,g=$APP.km.g(c),h=$APP.gl.g(c),l=$APP.Pk.g(c),m=GM.g(c);c=$APP.k(a,"__xSoftBodyRX");var p=$APP.k(a,"__xSoftBodyRY"),r=$APP.k(a,"__xSoftBodyCX"),v=$APP.k(a,
22
- "__xSoftBodyCY"),x=$APP.k(a,"__xSoftBodyVX"),y=$APP.k(a,"__xSoftBodyVY"),A=$APP.k(a,"__xSoftBodyPA"),C=$APP.k(a,"__xSoftBodyPX"),E=$APP.k(a,"__xSoftBodyPY"),H=$APP.k(a,"__xSoftBodyGrab");a.__xSoftBodyLF=d;for(d=0;;)if(d<20){var G=c[d],J=p[d],U=$APP.n(A)?AM(G,J,C,E,m,l,H):[0,0];G=zM(r[d],G+U[0],x[d],e,g,h);J=zM(v[d],J+U[1],y[d],e,g,h);r[d]=G[0];x[d]=G[1];v[d]=J[0];y[d]=J[1];d+=1}else break;JM(a);if($APP.n($APP.n(A)?A:!CM(x,y)))$APP.ja(a,"__xSoftBodyRaf",requestAnimationFrame(function(){return LM.g?
23
- LM.g(a):LM.call(null,a)}));else{for(e=0;;)if(e<20)r[e]=c[e],v[e]=p[e],e+=1;else break;JM(a);a.__xSoftBodyRaf=null}}return null};$APP.ha("baredom.exports.x_soft_body.init",WM);export const init=WM;
2
+ var LO=function(a,b,c,d){if(typeof a==="string"){a=a.trim();if($APP.B.i(a,""))return b;a=parseFloat(a);return $APP.n(isNaN(a))?b:Math.min(d,Math.max(c,a))}return b},MO=function(a,b,c,d,e,f){b=c+(e*(b-a)-f*c)*d;return[a+b*d,b]},NO=function(a,b,c,d,e,f,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;f*=e*e*($APP.n(h)?50:20);return[a/d*f,b/d*f]},OO=function(){return $APP.E(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},PO=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}},RO=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"),f=document.createElement("div"),h=document.createElement("slot");c.textContent=QO;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");f.setAttribute("part","content");d.appendChild(e);f.appendChild(h);b.appendChild(c);b.appendChild(d);b.appendChild(f);a.__xSoftBodyRefs=new $APP.N(null,4,[$APP.Uh,b,$APP.tl,d,$APP.hm,e,$APP.Ij,f],null)},UO=function(a){a=new $APP.N(null,6,[$APP.En,a.getAttribute("stiffness"),$APP.ko,a.getAttribute("damping"),$APP.Uk,a.getAttribute("radius"),$APP.Ol,a.getAttribute("intensity"),SO,a.getAttribute("grab-radius"),$APP.mk,a.getAttribute("disabled")],null);var b=$APP.J(a);a=
5
+ $APP.C(b,$APP.En);var c=$APP.C(b,$APP.ko),d=$APP.C(b,$APP.Uk),e=$APP.C(b,$APP.Ol),f=$APP.C(b,SO);b=$APP.C(b,$APP.mk);return new $APP.N(null,6,[$APP.kn,LO(a,180,10,1E3),$APP.Wl,LO(c,12,1,100),$APP.fo,LO(d,16,6,200),$APP.Fl,LO(e,1,0,5),TO,LO(f,80,10,500),$APP.Y,b!=null],null)},VO=function(a,b,c){var d=$APP.fo.g($APP.k(a,"__xSoftBodyModel"));d=Math.max(6,Math.min(d,Math.min(b,c)/2));var e=Math.cos(Math.PI/6),f=Math.sin(Math.PI/6),h=Math.cos(Math.PI/3),l=Math.sin(Math.PI/3),m=new Float64Array(20),q=new Float64Array(20);
6
+ m[0]=d;q[0]=0;m[1]=b*.5;q[1]=0;m[2]=b-d;q[2]=0;m[3]=b-d+d*f;q[3]=d-d*e;m[4]=b-d+d*l;q[4]=d-d*h;m[5]=b;q[5]=d;m[6]=b;q[6]=c*.5;m[7]=b;q[7]=c-d;m[8]=b-d+d*e;q[8]=c-d+d*f;m[9]=b-d+d*h;q[9]=c-d+d*l;m[10]=b-d;q[10]=c;m[11]=b*.5;q[11]=c;m[12]=d;q[12]=c;m[13]=d-d*f;q[13]=c-d+d*e;m[14]=d-d*l;q[14]=c-d+d*h;m[15]=0;q[15]=c-d;m[16]=0;q[16]=c*.5;m[17]=0;q[17]=d;m[18]=d-d*e;q[18]=d-d*f;m[19]=d-d*h;q[19]=d-d*l;c=[m,q];b=c[0];c=c[1];d=new Float64Array(20);e=new Float64Array(20);f=new Float64Array(20);h=new Float64Array(20);
7
+ for(l=0;;)if(l<20)d[l]=b[l],e[l]=c[l],f[l]=0,h[l]=0,l+=1;else break;a.__xSoftBodyRX=b;a.__xSoftBodyRY=c;a.__xSoftBodyCX=d;a.__xSoftBodyCY=e;a.__xSoftBodyVX=f;a.__xSoftBodyVY=h},WO=function(a){var b=$APP.J($APP.k(a,"__xSoftBodyRefs"));b=$APP.C(b,$APP.hm);var c=$APP.k(a,"__xSoftBodyCX");a=$APP.k(a,"__xSoftBodyCY");var d=[];d.push("M"+$APP.Q.g(c[0].toFixed(2))+","+$APP.Q.g(a[0].toFixed(2)));for(var e=0;;)if(e<20){var f=$APP.od(e+19,20),h=e,l=$APP.od(e+1,20),m=$APP.od(e+2,20),q=(c[l]-c[f])/6,r=(a[l]-
8
+ a[f])/6;f=(c[m]-c[h])/6;m=(a[m]-a[h])/6;var v=c[l]-c[h],x=a[l]-a[h];x=Math.sqrt(v*v+x*x)*.4;v=Math.sqrt(q*q+r*r);v=v>x?x/(v+.001):1;r=a[h]+r*v;var y=Math.sqrt(f*f+m*m);x=y>x?x/(y+.001):1;f=c[l]-f*x;m=a[l]-m*x;d.push("C"+$APP.Q.g((c[h]+q*v).toFixed(2))+","+$APP.Q.g(r.toFixed(2))+" "+$APP.Q.g(f.toFixed(2))+","+$APP.Q.g(m.toFixed(2))+" "+$APP.Q.g(c[l].toFixed(2))+","+$APP.Q.g(a[l].toFixed(2)));e+=1}else break;d.push("Z");b.setAttribute("d",d.join(""))},XO=function(a){var b=$APP.J($APP.k(a,"__xSoftBodyRefs"));
9
+ b=$APP.C(b,$APP.hm);var c=$APP.k(a,"__xSoftBodyW"),d=$APP.k(a,"__xSoftBodyH");a=$APP.fo.g($APP.k(a,"__xSoftBodyModel"));a=Math.max(6,Math.min(a,Math.min(c,d)/2));var e=.5522847498*a;c="M"+$APP.Q.g(a.toFixed(2))+",0L"+$APP.Q.g((c-a).toFixed(2))+",0C"+$APP.Q.g((c-a+e).toFixed(2))+",0 "+$APP.Q.g(c.toFixed(2))+","+$APP.Q.g((a-e).toFixed(2))+" "+$APP.Q.g(c.toFixed(2))+","+$APP.Q.g(a.toFixed(2))+"L"+$APP.Q.g(c.toFixed(2))+","+$APP.Q.g((d-a).toFixed(2))+"C"+$APP.Q.g(c.toFixed(2))+","+$APP.Q.g((d-a+e).toFixed(2))+
10
+ " "+$APP.Q.g((c-a+e).toFixed(2))+","+$APP.Q.g(d.toFixed(2))+" "+$APP.Q.g((c-a).toFixed(2))+","+$APP.Q.g(d.toFixed(2))+"L"+$APP.Q.g(a.toFixed(2))+","+$APP.Q.g(d.toFixed(2))+"C"+$APP.Q.g((a-e).toFixed(2))+","+$APP.Q.g(d.toFixed(2))+" 0,"+$APP.Q.g((d-a+e).toFixed(2))+" 0,"+$APP.Q.g((d-a).toFixed(2))+"L0,"+$APP.Q.g(a.toFixed(2))+"C0,"+$APP.Q.g((a-e).toFixed(2))+" "+$APP.Q.g((a-e).toFixed(2))+",0 "+$APP.Q.g(a.toFixed(2))+",0Z";b.setAttribute("d",c)},ZO=function(a){$APP.n($APP.k(a,"__xSoftBodyRaf"))||($APP.fa(a,
11
+ "__xSoftBodyLF",performance.now()),$APP.fa(a,"__xSoftBodyRaf",requestAnimationFrame(function(){return YO(a)})))},$O=function(a){var b=$APP.k(a,"__xSoftBodyRaf");$APP.n(b)&&(cancelAnimationFrame(b),a.__xSoftBodyRaf=null)},aP=function(a,b){var c=$APP.J($APP.k(a,"__xSoftBodyRefs"));c=$APP.C(c,$APP.tl).getBoundingClientRect();a.__xSoftBodyPX=b.clientX-c.left;a.__xSoftBodyPY=b.clientY-c.top;return null},bP=function(a){function b(){a.__xSoftBodyGrab=!1;$APP.P(a,"x-soft-body-release",{});return null}function c(h){a.__xSoftBodyGrab=
12
+ !0;aP(a,h);$APP.P(a,"x-soft-body-grab",{});return null}function d(){a.__xSoftBodyPA=!1;a.__xSoftBodyGrab=!1;return null}function e(){a.__xSoftBodyPA=!0;var h=$APP.Y.g($APP.k(a,"__xSoftBodyModel"));h=$APP.n(h)?h:OO();$APP.n(h)||ZO(a);return null}function f(h){return aP(a,h)}$APP.fa(a,"__xSoftBodyHdl",{move:f,enter:e,leave:d,down:c,up:b});a.addEventListener("pointermove",f,{passive:!0});a.addEventListener("pointerenter",e);a.addEventListener("pointerleave",d);a.addEventListener("pointerdown",c);a.addEventListener("pointerup",
13
+ b)},cP=function(a){var b=$APP.k(a,"__xSoftBodyHdl");$APP.n(b)&&(a.removeEventListener("pointermove",$APP.k(b,"move")),a.removeEventListener("pointerenter",$APP.k(b,"enter")),a.removeEventListener("pointerleave",$APP.k(b,"leave")),a.removeEventListener("pointerdown",$APP.k(b,"down")),a.removeEventListener("pointerup",$APP.k(b,"up")),a.__xSoftBodyHdl=null)},dP=function(a){Object.defineProperty(a,"stiffness",{get:function(){var b=this.getAttribute("stiffness");return LO(b,180,10,1E3)},set:function(b){return b==
14
+ null?this.removeAttribute("stiffness"):this.setAttribute("stiffness",""+$APP.Q.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"damping",{get:function(){var b=this.getAttribute("damping");return LO(b,12,1,100)},set:function(b){return b==null?this.removeAttribute("damping"):this.setAttribute("damping",""+$APP.Q.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"radius",{get:function(){var b=this.getAttribute("radius");return LO(b,16,6,200)},set:function(b){return b==null?
15
+ this.removeAttribute("radius"):this.setAttribute("radius",""+$APP.Q.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"intensity",{get:function(){var b=this.getAttribute("intensity");return LO(b,1,0,5)},set:function(b){return b==null?this.removeAttribute("intensity"):this.setAttribute("intensity",""+$APP.Q.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"grabRadius",{get:function(){var b=this.getAttribute("grab-radius");return LO(b,80,10,500)},set:function(b){return b==
16
+ null?this.removeAttribute("grab-radius"):this.setAttribute("grab-radius",""+$APP.Q.g(b))},enumerable:!0,configurable:!0});return Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0})},eP=function(a){var b=UO(a);a.__xSoftBodyModel=b;$APP.n($APP.k(a,"__xSoftBodyRefs"))||RO(a);a.__xSoftBodyPA=!1;a.__xSoftBodyGrab=!1;a.__xSoftBodyPX=0;a.__xSoftBodyPY=
17
+ 0;b=new ResizeObserver(function(c){if(c.length>0){var d=c[0].contentRect;c=d.width;d=d.height;if(c>0&&d>0){a.__xSoftBodyW=c;a.__xSoftBodyH=d;var e=$APP.J($APP.k(a,"__xSoftBodyRefs"));$APP.C(e,$APP.tl).setAttribute("viewBox","0 0 "+$APP.Q.g(c)+" "+$APP.Q.g(d));VO(a,c,d);c=$APP.Y.g($APP.k(a,"__xSoftBodyModel"));c=$APP.n(c)?c:OO();$APP.n(c)?XO(a):(WO(a),ZO(a))}}return null});a.__xSoftBodyRO=b;b.observe(a);cP(a);bP(a);return null},fP=function(a){$O(a);cP(a);var b=$APP.k(a,"__xSoftBodyRO");$APP.n(b)&&
18
+ (b.disconnect(),a.__xSoftBodyRO=null);return null},gP=function(a,b,c,d){$APP.M(c,d)&&$APP.n($APP.k(a,"__xSoftBodyRefs"))&&(b=UO(a),a.__xSoftBodyModel=b,c=$APP.k(a,"__xSoftBodyW"),d=$APP.k(a,"__xSoftBodyH"),$APP.n($APP.n(c)?$APP.n(d)?c>0&&d>0:d:c)&&(VO(a,c,d),b=$APP.Y.g(b),b=$APP.n(b)?b:OO(),$APP.n(b)?($O(a),XO(a)):(WO(a),ZO(a))));return null},iP=function(){return $APP.Yg("x-soft-body",new $APP.N(null,5,[$APP.Pg,hP,$APP.Qg,eP,$APP.Rg,fP,$APP.Sg,gP,$APP.Wg,dP],null))},TO=new $APP.F(null,"grab-radius",
19
+ "grab-radius",771838535),SO=new $APP.F(null,"grab-radius-raw","grab-radius-raw",-1019405976);var hP="stiffness damping radius intensity grab-radius disabled".split(" ");$APP.Yd(["x-soft-body-grab",new $APP.N(null,2,[$APP.Z,$APP.Zd,$APP.Fn,!1],null),"x-soft-body-release",new $APP.N(null,2,[$APP.Z,$APP.Zd,$APP.Fn,!1],null)]);var QO=":host{display:block;position:relative;background:none;overflow:visible;"+$APP.Q.g("--x-soft-body-bg")+":var(--x-color-surface,#ffffff);"+$APP.Q.g("--x-soft-body-border")+":var(--x-color-border,#e2e8f0);"+$APP.Q.g("--x-soft-body-border-width")+":1.5;"+$APP.Q.g("--x-soft-body-shadow")+":var(--x-shadow-sm,0 1px 3px rgba(0,0,0,0.1));"+$APP.Q.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.Q.g("--x-soft-body-bg")+",#ffffff);stroke:var("+$APP.Q.g("--x-soft-body-border")+",#e2e8f0);stroke-width:var("+$APP.Q.g("--x-soft-body-border-width")+",1.5);filter:drop-shadow(var("+$APP.Q.g("--x-soft-body-shadow")+",0 1px 3px rgba(0,0,0,0.1)));}[part\x3dcontent]{position:relative;background:none;padding:var("+$APP.Q.g("--x-soft-body-padding")+",1rem);z-index:1;}@media(prefers-color-scheme:dark){:host{"+$APP.Q.g("--x-soft-body-bg")+":var(--x-color-surface,#1e293b);"+$APP.Q.g("--x-soft-body-border")+
21
+ ":var(--x-color-border,#475569);"+$APP.Q.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;}}",YO=function YO(a){if($APP.n(a.isConnected)){var c=$APP.k(a,"__xSoftBodyModel"),d=performance.now(),e=Math.min(d-$APP.k(a,"__xSoftBodyLF"),100)/1E3,f=$APP.kn.g(c),h=$APP.Wl.g(c),l=$APP.Fl.g(c),m=TO.g(c);c=$APP.k(a,"__xSoftBodyRX");var q=$APP.k(a,"__xSoftBodyRY"),r=$APP.k(a,"__xSoftBodyCX"),v=$APP.k(a,
22
+ "__xSoftBodyCY"),x=$APP.k(a,"__xSoftBodyVX"),y=$APP.k(a,"__xSoftBodyVY"),A=$APP.k(a,"__xSoftBodyPA"),D=$APP.k(a,"__xSoftBodyPX"),G=$APP.k(a,"__xSoftBodyPY"),I=$APP.k(a,"__xSoftBodyGrab");a.__xSoftBodyLF=d;for(d=0;;)if(d<20){var H=c[d],K=q[d],W=$APP.n(A)?NO(H,K,D,G,m,l,I):[0,0];H=MO(r[d],H+W[0],x[d],e,f,h);K=MO(v[d],K+W[1],y[d],e,f,h);r[d]=H[0];x[d]=H[1];v[d]=K[0];y[d]=K[1];d+=1}else break;WO(a);if($APP.n($APP.n(A)?A:!PO(x,y)))$APP.fa(a,"__xSoftBodyRaf",requestAnimationFrame(function(){return YO.g?
23
+ YO.g(a):YO.call(null,a)}));else{for(e=0;;)if(e<20)r[e]=c[e],v[e]=q[e],e+=1;else break;WO(a);a.__xSoftBodyRaf=null}}return null};$APP.ca("baredom.exports.x_soft_body.init",iP);export const init=iP;
package/dist/x-spacer.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var TP=function(a){return a!=null&&$APP.N((""+$APP.S.g(a)).trim().toLowerCase(),"false")},ZP=function(a){var b=new $APP.Q(null,3,[$APP.nm,a.getAttribute("size"),UP,a.getAttribute("axis"),VP,a.getAttribute("grow")],null);b=$APP.M(b);var c=$APP.D(b,$APP.nm),d=$APP.D(b,UP);b=$APP.D(b,VP);c=typeof c==="string"&&c.trim().length>0?c.trim():"1rem";d=typeof d==="string"?d.trim().toLowerCase():null;d=$APP.I(WP,d)?d:"vertical";b=new $APP.Q(null,3,[$APP.di,c,XP,d,YP,TP(b)],null);c=$APP.M(b);b=$APP.D(c,$APP.di);
3
- d=$APP.D(c,XP);c=$APP.D(c,YP);var e=a.style;a.setAttribute("data-axis",d);a.setAttribute("data-grow",$APP.n(c)?"true":"false");e.setProperty("--x-spacer-size",b);a.setAttribute("role","none");a.setAttribute("aria-hidden","true");return null},$P=function(a){if(!$APP.n($APP.k(a,"__xSpacerRefs"))){var b=a.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;}";
4
- b.appendChild(c);a.__xSpacerRefs={root:b}}return ZP(a)},aQ=function(){return null},bQ=function(a,b,c,d){b=$APP.N(c,d);return $APP.n(b?$APP.k(a,"__xSpacerRefs"):b)?ZP(a):null},cQ=function(a,b,c){Object.defineProperty(a,b,{get:function(){var d=this.getAttribute(b);return $APP.n(d)?d:c},set:function(d){return d!=null?this.setAttribute(b,""+$APP.S.g(d)):this.removeAttribute(b)},enumerable:!0,configurable:!0})},dQ=function(a){return Object.defineProperty(a,"grow",{get:function(){return TP(this.getAttribute("grow"))},
5
- set:function(b){return $APP.n(b)?this.setAttribute("grow",""):this.removeAttribute("grow")},enumerable:!0,configurable:!0})},eQ=function(a){cQ(a,"size","1rem");cQ(a,"axis","vertical");return dQ(a)},gQ=function(){return $APP.Lg("x-spacer",new $APP.Q(null,5,[$APP.Cg,fQ,$APP.Dg,$P,$APP.Eg,aQ,$APP.Fg,bQ,$APP.Jg,eQ],null))},XP=new $APP.K(null,"axis","axis",-1215390822),YP=new $APP.K(null,"grow?","grow?",2124334580),VP=new $APP.K(null,"grow-raw","grow-raw",441172903),UP=new $APP.K(null,"axis-raw","axis-raw",
6
- 291213231);var fQ=["size","axis","grow"],WP=new $APP.R(null,new $APP.Q(null,2,["vertical",null,"horizontal",null],null),null);$APP.ha("baredom.exports.x_spacer.init",gQ);export const init=gQ;
2
+ var aS=function(a){return a!=null&&$APP.M((""+$APP.Q.g(a)).trim().toLowerCase(),"false")},gS=function(a){var b=new $APP.N(null,3,[$APP.on,a.getAttribute("size"),bS,a.getAttribute("axis"),cS,a.getAttribute("grow")],null);b=$APP.J(b);var c=$APP.C(b,$APP.on),d=$APP.C(b,bS);b=$APP.C(b,cS);c=typeof c==="string"&&c.trim().length>0?c.trim():"1rem";d=typeof d==="string"?d.trim().toLowerCase():null;d=$APP.Zc(dS,d)?d:"vertical";b=new $APP.N(null,3,[$APP.bj,c,eS,d,fS,aS(b)],null);c=$APP.J(b);b=$APP.C(c,$APP.bj);
3
+ d=$APP.C(c,eS);c=$APP.C(c,fS);var e=a.style;a.setAttribute("data-axis",d);a.setAttribute("data-grow",$APP.n(c)?"true":"false");e.setProperty("--x-spacer-size",b);a.setAttribute("role","none");a.setAttribute("aria-hidden","true");return null},hS=function(a){if(!$APP.n($APP.k(a,"__xSpacerRefs"))){var b=a.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;}";
4
+ b.appendChild(c);a.__xSpacerRefs={root:b}}return gS(a)},iS=function(){return null},jS=function(a,b,c,d){b=$APP.M(c,d);return $APP.n(b?$APP.k(a,"__xSpacerRefs"):b)?gS(a):null},kS=function(a){return Object.defineProperty(a,"grow",{get:function(){return aS(this.getAttribute("grow"))},set:function(b){return $APP.n(b)?this.setAttribute("grow",""):this.removeAttribute("grow")},enumerable:!0,configurable:!0})},lS=function(a){$APP.eh(a,"size","size","1rem");$APP.eh(a,"axis","axis","vertical");return kS(a)},
5
+ nS=function(){return $APP.Yg("x-spacer",new $APP.N(null,5,[$APP.Pg,mS,$APP.Qg,hS,$APP.Rg,iS,$APP.Sg,jS,$APP.Wg,lS],null))},eS=new $APP.F(null,"axis","axis",-1215390822),fS=new $APP.F(null,"grow?","grow?",2124334580),cS=new $APP.F(null,"grow-raw","grow-raw",441172903),bS=new $APP.F(null,"axis-raw","axis-raw",291213231);var mS=["size","axis","grow"],dS=new $APP.O(null,new $APP.N(null,2,["vertical",null,"horizontal",null],null),null);$APP.ca("baredom.exports.x_spacer.init",nS);export const init=nS;
package/dist/x-spinner.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var W5=function(a){var b=new $APP.Q(null,3,[$APP.di,a.getAttribute("size"),$APP.lh,a.getAttribute("variant"),$APP.T,a.getAttribute("label")],null);var c=$APP.M(b),d=$APP.D(c,$APP.di);b=$APP.D(c,$APP.lh);c=$APP.D(c,$APP.T);d=typeof d==="string"&&$APP.I(U5,d)?d:"md";b=typeof b==="string"&&$APP.I(V5,b)?b:"default";c=typeof c==="string"&&$APP.N("",c.trim())?c.trim():"Loading";d=$APP.M(new $APP.Q(null,3,[$APP.di,d,$APP.lh,b,$APP.T,c],null));b=$APP.D(d,$APP.di);c=$APP.D(d,$APP.lh);d=$APP.D(d,$APP.T);a.setAttribute("data-size",
3
- b);a.setAttribute("data-variant",c);a.setAttribute("aria-label",d)},X5=function(a){if(!$APP.n($APP.k(a,"__xSpinnerInit"))){var b=a.attachShadow({mode:"open"}),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;}}";
4
- d.setAttribute("part","ring");d.setAttribute("aria-hidden","true");b.appendChild(c);b.appendChild(d);a.setAttribute("role","status");a.setAttribute("aria-live","polite");a.__xSpinnerRing=d;a.__xSpinnerInit=!0}W5(a);return null},Y5=function(a,b,c,d){b=$APP.N(c,d);$APP.n(b?$APP.k(a,"__xSpinnerInit"):b)&&W5(a);return null},Z5=function(a){Object.defineProperty(a,"size",{get:function(){var b=this.getAttribute("size");return $APP.n(b)?b:"md"},set:function(b){return $APP.n(b)?this.setAttribute("size",""+
5
- $APP.S.g(b)):this.removeAttribute("size")},enumerable:!0,configurable:!0});Object.defineProperty(a,"variant",{get:function(){var b=this.getAttribute("variant");return $APP.n(b)?b:"default"},set:function(b){return $APP.n(b)?this.setAttribute("variant",""+$APP.S.g(b)):this.removeAttribute("variant")},enumerable:!0,configurable:!0});return Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.n(b)?b:"Loading"},set:function(b){return $APP.n(b)?this.setAttribute("label",
6
- ""+$APP.S.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0})},a6=function(){return $APP.Lg("x-spinner",new $APP.Q(null,4,[$APP.Cg,$5,$APP.Dg,X5,$APP.Fg,Y5,$APP.Jg,Z5],null))};var $5=["size","variant","label"],U5=new $APP.R(null,new $APP.Q(null,5,["xs",null,"md",null,"lg",null,"xl",null,"sm",null],null),null),V5=new $APP.R(null,new $APP.Q(null,5,["success",null,"warning",null,"primary",null,"danger",null,"default",null],null),null);$APP.ha("baredom.exports.x_spinner.init",a6);export const init=a6;
2
+ var C7=function(a){var b=new $APP.N(null,3,[$APP.bj,a.getAttribute("size"),$APP.ii,a.getAttribute("variant"),$APP.X,a.getAttribute("label")],null);var c=$APP.J(b),d=$APP.C(c,$APP.bj);b=$APP.C(c,$APP.ii);c=$APP.C(c,$APP.X);d=typeof d==="string"&&$APP.Zc(Eaa,d)?d:"md";b=typeof b==="string"&&$APP.Zc(Faa,b)?b:"default";c=typeof c==="string"&&$APP.M("",c.trim())?c.trim():"Loading";d=$APP.J(new $APP.N(null,3,[$APP.bj,d,$APP.ii,b,$APP.X,c],null));b=$APP.C(d,$APP.bj);c=$APP.C(d,$APP.ii);d=$APP.C(d,$APP.X);
3
+ a.setAttribute("data-size",b);a.setAttribute("data-variant",c);a.setAttribute("aria-label",d)},Gaa=function(a){if(!$APP.n($APP.k(a,"__xSpinnerInit"))){var b=a.attachShadow({mode:"open"}),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;}}";
4
+ d.setAttribute("part","ring");d.setAttribute("aria-hidden","true");b.appendChild(c);b.appendChild(d);a.setAttribute("role","status");a.setAttribute("aria-live","polite");a.__xSpinnerRing=d;a.__xSpinnerInit=!0}C7(a);return null},Haa=function(a,b,c,d){b=$APP.M(c,d);$APP.n(b?$APP.k(a,"__xSpinnerInit"):b)&&C7(a);return null},Jaa=function(a){return $APP.jh(a,Iaa)},D7=function(){return $APP.Yg("x-spinner",new $APP.N(null,4,[$APP.Pg,Kaa,$APP.Qg,Gaa,$APP.Sg,Haa,$APP.Wg,Jaa],null))};var Kaa=["size","variant","label"],Eaa=new $APP.O(null,new $APP.N(null,5,["xs",null,"md",null,"lg",null,"xl",null,"sm",null],null),null),Faa=new $APP.O(null,new $APP.N(null,5,["success",null,"warning",null,"primary",null,"danger",null,"default",null],null),null),Iaa=new $APP.N(null,3,[$APP.bj,new $APP.N(null,3,[$APP.R,$APP.U,$APP.S,"size",$APP.ih,"md"],null),$APP.ii,new $APP.N(null,3,[$APP.R,$APP.U,$APP.S,"variant",$APP.ih,"default"],null),$APP.X,new $APP.N(null,3,[$APP.R,$APP.U,$APP.S,"label",$APP.ih,
5
+ "Loading"],null)],null);$APP.ca("baredom.exports.x_spinner.init",D7);export const init=D7;
package/dist/x-splash.js CHANGED
@@ -1,15 +1,14 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var tS=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.n(isNaN(a))?null:$APP.Jh.i(0,$APP.Kh.i(100,a))):null},uS=function(a){return a==null?!0:$APP.N((""+$APP.S.g(a)).trim().toLowerCase(),"false")},zS=function(a){var b=$APP.k(a,"__xSplashRefs");if($APP.n(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"),l=document.createElement("div"),
2
+ var JU=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.n(isNaN(a))?null:$APP.Hi.i(0,$APP.Ii.i(100,a))):null},KU=function(a){return a==null?!0:$APP.M((""+$APP.Q.g(a)).trim().toLowerCase(),"false")},PU=function(a){var b=$APP.k(a,"__xSplashRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),f=document.createElement("slot"),h=document.createElement("span"),l=document.createElement("div"),
3
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");l.setAttribute("part","progress");l.setAttribute("role","progressbar");l.setAttribute("aria-valuemin","0");l.setAttribute("aria-valuemax","100");m.setAttribute("part","bar");l.appendChild(m);e.appendChild(g);e.appendChild(h);e.appendChild(l);d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xSplashRefs=new $APP.Q(null,6,[$APP.Zi,b,vS,d,wS,e,xS,h,$APP.Bj,l,yS,
5
- m],null);return $APP.k(a,"__xSplashRefs")},AS=function(a){a=typeof a==="string"?a.trim():"";return $APP.B.i(a,"")||$APP.B.i(a,"0")||$APP.B.i(a,"0ms")||$APP.B.i(a,"0s")?0:$APP.n(a.endsWith("ms"))?(a=parseFloat(a.slice(0,a.length-2)),$APP.n(isNaN(a))?0:Math.max(0,Math.round(a))):$APP.n(a.endsWith("s"))?(a=parseFloat(a.slice(0,a.length-1)),$APP.n(isNaN(a))?0:Math.max(0,Math.round(1E3*a))):0},BS=function(a){a=window.getComputedStyle(a);a=AS(a.getPropertyValue("--x-splash-fade-duration"));return a>0?a:
6
- 400},CS=function(a){var b=$APP.k(a,"__xSplashFadeTimer");$APP.n(b)&&(clearTimeout(b),a.__xSplashFadeTimer=null)},DS=function(a){CS(a);a.__xSplashFadingOut=!1;a.removeAttribute("data-fading-out");var b=zS(a);b=$APP.M(b);$APP.D(b,vS).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},ES=function(a){if(!$APP.n($APP.k(a,"__xSplashFadingOut")))if(a.__xSplashFadingOut=!0,$APP.F(window.matchMedia("(prefers-reduced-motion:reduce)").matches))DS(a);
7
- else{var b=zS(a);b=$APP.M(b);var c=$APP.D(b,vS),d=function h(g){return $APP.B.i(g.target,c)&&$APP.B.i(g.propertyName,"opacity")?(c.removeEventListener("transitionend",h),$APP.n($APP.k(a,"__xSplashFadingOut"))?DS(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.n($APP.k(a,"__xSplashFadingOut"))?c.style.opacity="0":null})});$APP.ja(a,
8
- "__xSplashFadeTimer",setTimeout(function(){return $APP.n($APP.k(a,"__xSplashFadingOut"))?(c.removeEventListener("transitionend",d),DS(a)):null},BS(a)+60))}},NS=function(a){var b=new $APP.Q(null,5,[FS,a.hasAttribute("active"),$APP.Ml,a.getAttribute("variant"),$APP.xk,a.getAttribute("progress"),GS,a.getAttribute("spinner"),HS,a.getAttribute("overlay")],null);var c=$APP.M(b);b=$APP.D(c,FS);var d=$APP.D(c,$APP.Ml),e=$APP.D(c,$APP.xk),g=$APP.D(c,GS);c=$APP.D(c,HS);b=$APP.F(b);d=typeof d==="string"?d.trim().toLowerCase():
9
- null;d=$APP.I(IS,d)?d:"default";e=tS(e);g=uS(g);c=typeof c==="string"?c.trim().toLowerCase():null;c=$APP.I(JS,c)?c:"solid";b=new $APP.Q(null,5,[KS,b,$APP.lh,d,$APP.um,e,LS,g,MS,c],null);if($APP.N($APP.k(a,"__xSplashModel"),b)){b=$APP.M(b);c=$APP.D(b,KS);e=$APP.D(b,$APP.lh);d=$APP.D(b,$APP.um);var h=$APP.D(b,LS),l=$APP.D(b,MS);g=zS(a);var m=$APP.M(g);g=$APP.D(m,vS);var p=$APP.D(m,xS),r=$APP.D(m,$APP.Bj),v=$APP.D(m,yS);m=$APP.k(a,"__xSplashModel");var x=KS.g(m);a.setAttribute("data-variant",e);a.setAttribute("data-overlay",
10
- l);p.style.display=$APP.n(h)?"block":"none";d!=null?(r.style.display="block",v.style.width=""+$APP.S.g(d)+"%",r.setAttribute("aria-valuenow",""+$APP.S.g(d))):(r.style.display="none",r.removeAttribute("aria-valuenow"));$APP.n($APP.n(c)?$APP.q(x):c)?($APP.n($APP.k(a,"__xSplashFadingOut"))&&(CS(a),a.__xSplashFadingOut=!1,a.removeAttribute("data-fading-out"),c=zS(a),c=$APP.M(c),c=$APP.D(c,vS),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.q(c),$APP.n(e?x:e)?ES(a):$APP.q(c)&&m==null&&(g.style.display="none",a.removeAttribute("aria-busy")));$APP.n(a.hasAttribute("aria-label"))||a.setAttribute("aria-label","Loading");a.__xSplashModel=b}},OS=function(a){Object.defineProperty(a,"active",{get:function(){return this.hasAttribute("active")},set:function(b){return $APP.n(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.n(b)?b:"default"},set:function(b){return $APP.n(b)?this.setAttribute("variant",""+$APP.S.g(b)):this.removeAttribute("variant")},enumerable:!0,configurable:!0});Object.defineProperty(a,"progress",{get:function(){return tS(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 uS(this.getAttribute("spinner"))},set:function(b){return $APP.n(b)?this.setAttribute("spinner",""):this.setAttribute("spinner","false")},enumerable:!0,configurable:!0});return Object.defineProperty(a,"overlay",{get:function(){var b=this.getAttribute("overlay");return $APP.n(b)?b:"solid"},set:function(b){return $APP.n(b)?this.setAttribute("overlay",""+$APP.S.g(b)):this.removeAttribute("overlay")},enumerable:!0,configurable:!0})},PS=function(a){zS(a);CS(a);NS(a);return null},
14
- QS=function(a){CS(a);return null},RS=function(a,b,c,d){$APP.N(c,d)&&NS(a);return null},TS=function(){return $APP.Lg("x-splash",new $APP.Q(null,5,[$APP.Cg,SS,$APP.Dg,PS,$APP.Eg,QS,$APP.Fg,RS,$APP.Jg,OS],null))},vS=new $APP.K(null,"overlay-el","overlay-el",-308547109),wS=new $APP.K(null,"content-el","content-el",-1423019925),xS=new $APP.K(null,"spinner-el","spinner-el",-1536400516),yS=new $APP.K(null,"bar-el","bar-el",2050414242),LS=new $APP.K(null,"spinner?","spinner?",939139177),KS=new $APP.K(null,
15
- "active?","active?",459499776),FS=new $APP.K(null,"active-present?","active-present?",73064660),GS=new $APP.K(null,"spinner-attr","spinner-attr",-479327548),HS=new $APP.K(null,"overlay-raw","overlay-raw",1018775670),MS=new $APP.K(null,"overlay","overlay",-139131598);var SS=["active","variant","progress","spinner","overlay"];$APP.Pd(["x-splash-hidden",new $APP.Q(null,2,[$APP.V,$APP.Qd,$APP.Km,!1],null)]);var IS=new $APP.R(null,new $APP.Q(null,3,["minimal",null,"branded",null,"default",null],null),null),JS=new $APP.R(null,new $APP.Q(null,3,["transparent",null,"solid",null,"blur",null],null),null);$APP.ha("baredom.exports.x_splash.init",TS);export const init=TS;
4
+ d.setAttribute("part","overlay");e.setAttribute("part","content");h.setAttribute("part","spinner");h.setAttribute("aria-hidden","true");l.setAttribute("part","progress");l.setAttribute("role","progressbar");l.setAttribute("aria-valuemin","0");l.setAttribute("aria-valuemax","100");m.setAttribute("part","bar");l.appendChild(m);e.appendChild(f);e.appendChild(h);e.appendChild(l);d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xSplashRefs=new $APP.N(null,6,[$APP.Uh,b,LU,d,MU,e,NU,h,$APP.sk,l,OU,
5
+ m],null);return $APP.k(a,"__xSplashRefs")},QU=function(a){a=typeof a==="string"?a.trim():"";return $APP.B.i(a,"")||$APP.B.i(a,"0")||$APP.B.i(a,"0ms")||$APP.B.i(a,"0s")?0:$APP.n(a.endsWith("ms"))?(a=parseFloat(a.slice(0,a.length-2)),$APP.n(isNaN(a))?0:Math.max(0,Math.round(a))):$APP.n(a.endsWith("s"))?(a=parseFloat(a.slice(0,a.length-1)),$APP.n(isNaN(a))?0:Math.max(0,Math.round(1E3*a))):0},RU=function(a){a=window.getComputedStyle(a);a=QU(a.getPropertyValue("--x-splash-fade-duration"));return a>0?a:
6
+ 400},SU=function(a){var b=$APP.k(a,"__xSplashFadeTimer");$APP.n(b)&&(clearTimeout(b),a.__xSplashFadeTimer=null)},TU=function(a){SU(a);a.__xSplashFadingOut=!1;a.removeAttribute("data-fading-out");var b=PU(a);b=$APP.J(b);$APP.C(b,LU).style.display="none";a.removeAttribute("aria-busy");$APP.P(a,"x-splash-hidden",{});return null},UU=function(a){if(!$APP.n($APP.k(a,"__xSplashFadingOut")))if(a.__xSplashFadingOut=!0,$APP.E(window.matchMedia("(prefers-reduced-motion:reduce)").matches))TU(a);else{var b=PU(a);
7
+ b=$APP.J(b);var c=$APP.C(b,LU),d=function h(f){return $APP.B.i(f.target,c)&&$APP.B.i(f.propertyName,"opacity")?(c.removeEventListener("transitionend",h),$APP.n($APP.k(a,"__xSplashFadingOut"))?TU(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.n($APP.k(a,"__xSplashFadingOut"))?c.style.opacity="0":null})});$APP.fa(a,"__xSplashFadeTimer",
8
+ setTimeout(function(){return $APP.n($APP.k(a,"__xSplashFadingOut"))?(c.removeEventListener("transitionend",d),TU(a)):null},RU(a)+60))}},cV=function(a){var b=new $APP.N(null,5,[VU,a.hasAttribute("active"),$APP.Gm,a.getAttribute("variant"),$APP.ml,a.getAttribute("progress"),WU,a.getAttribute("spinner"),XU,a.getAttribute("overlay")],null);var c=$APP.J(b);b=$APP.C(c,VU);var d=$APP.C(c,$APP.Gm),e=$APP.C(c,$APP.ml),f=$APP.C(c,WU);c=$APP.C(c,XU);b=$APP.E(b);d=typeof d==="string"?d.trim().toLowerCase():null;
9
+ d=$APP.Zc(YU,d)?d:"default";e=JU(e);f=KU(f);c=typeof c==="string"?c.trim().toLowerCase():null;c=$APP.Zc(ZU,c)?c:"solid";b=new $APP.N(null,5,[$U,b,$APP.ii,d,$APP.vn,e,aV,f,bV,c],null);if($APP.M($APP.k(a,"__xSplashModel"),b)){b=$APP.J(b);c=$APP.C(b,$U);e=$APP.C(b,$APP.ii);d=$APP.C(b,$APP.vn);var h=$APP.C(b,aV),l=$APP.C(b,bV);f=PU(a);var m=$APP.J(f);f=$APP.C(m,LU);var q=$APP.C(m,NU),r=$APP.C(m,$APP.sk),v=$APP.C(m,OU);m=$APP.k(a,"__xSplashModel");var x=$U.g(m);a.setAttribute("data-variant",e);a.setAttribute("data-overlay",
10
+ l);q.style.display=$APP.n(h)?"block":"none";d!=null?(r.style.display="block",v.style.width=""+$APP.Q.g(d)+"%",r.setAttribute("aria-valuenow",""+$APP.Q.g(d))):(r.style.display="none",r.removeAttribute("aria-valuenow"));$APP.n($APP.n(c)?$APP.p(x):c)?($APP.n($APP.k(a,"__xSplashFadingOut"))&&(SU(a),a.__xSplashFadingOut=!1,a.removeAttribute("data-fading-out"),c=PU(a),c=$APP.J(c),c=$APP.C(c,LU),c.style.display="",c.style.opacity=""),a.setAttribute("aria-busy","true"),a.setAttribute("aria-live","polite"),
11
+ a.setAttribute("role","status"),f.style.display="",f.style.opacity=""):(e=$APP.p(c),$APP.n(e?x:e)?UU(a):$APP.p(c)&&m==null&&(f.style.display="none",a.removeAttribute("aria-busy")));$APP.n(a.hasAttribute("aria-label"))||a.setAttribute("aria-label","Loading");a.__xSplashModel=b}},dV=function(a){$APP.dh(a,"active","active");$APP.eh(a,"variant","variant","default");Object.defineProperty(a,"progress",{get:function(){return JU(this.getAttribute("progress"))},set:function(b){return b==null?this.removeAttribute("progress"):
12
+ this.setAttribute("progress",""+$APP.Q.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"spinner",{get:function(){return KU(this.getAttribute("spinner"))},set:function(b){return $APP.n(b)?this.setAttribute("spinner",""):this.setAttribute("spinner","false")},enumerable:!0,configurable:!0});return $APP.eh(a,"overlay","overlay","solid")},eV=function(a){PU(a);SU(a);cV(a);return null},fV=function(a){SU(a);return null},gV=function(a,b,c,d){$APP.M(c,d)&&cV(a);return null},iV=function(){return $APP.Yg("x-splash",
13
+ new $APP.N(null,5,[$APP.Pg,hV,$APP.Qg,eV,$APP.Rg,fV,$APP.Sg,gV,$APP.Wg,dV],null))},LU=new $APP.F(null,"overlay-el","overlay-el",-308547109),MU=new $APP.F(null,"content-el","content-el",-1423019925),NU=new $APP.F(null,"spinner-el","spinner-el",-1536400516),OU=new $APP.F(null,"bar-el","bar-el",2050414242),aV=new $APP.F(null,"spinner?","spinner?",939139177),$U=new $APP.F(null,"active?","active?",459499776),VU=new $APP.F(null,"active-present?","active-present?",73064660),WU=new $APP.F(null,"spinner-attr",
14
+ "spinner-attr",-479327548),XU=new $APP.F(null,"overlay-raw","overlay-raw",1018775670),bV=new $APP.F(null,"overlay","overlay",-139131598);var hV=["active","variant","progress","spinner","overlay"];$APP.Yd(["x-splash-hidden",new $APP.N(null,2,[$APP.Z,$APP.Zd,$APP.Fn,!1],null)]);var YU=new $APP.O(null,new $APP.N(null,3,["minimal",null,"branded",null,"default",null],null),null),ZU=new $APP.O(null,new $APP.N(null,3,["transparent",null,"solid",null,"blur",null],null),null);$APP.ca("baredom.exports.x_splash.init",iV);export const init=iV;
package/dist/x-stat.js CHANGED
@@ -1,13 +1,11 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var VT=function(a,b,c){return $APP.I(b,a)?a:c},WT=function(a){return $APP.n($APP.n(a)?$APP.N("",a):a)?a:null},eU=function(a){var b=$APP.M(a),c=$APP.D(b,XT),d=$APP.D(b,YT),e=$APP.D(b,$APP.Nj),g=$APP.D(b,$APP.lh);a=$APP.D(b,$APP.pj);var h=$APP.D(b,$APP.qm),l=$APP.D(b,$APP.di),m=$APP.D(b,$APP.Ql);b=$APP.D(b,$APP.T);g=VT(g,ZT,"default");e=VT(e,$T,"start");l=VT(l,aU,"md");c=VT(c,bU,"normal");d=VT(d,cU,"neutral");m=$APP.F(m);return $APP.zf([YT,$APP.Nj,$APP.lh,$APP.pj,$APP.qm,$APP.di,$APP.Ql,$APP.T,dU,XT],
3
- [d,e,g,WT(a),WT(h),l,m,WT(b),m?"true":null,c])},fU=function(a){return $APP.zf([YT,$APP.Nj,$APP.lh,$APP.pj,$APP.qm,$APP.di,$APP.Ql,$APP.T,XT],[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")])},gU=function(a,b){a.setAttribute("role","figure");var c=dU.g(b);$APP.n(c)?a.setAttribute("aria-busy",c):a.removeAttribute("aria-busy");b=
4
- $APP.T.g(b);$APP.n(b)?a.setAttribute("aria-label",b):a.removeAttribute("aria-label")},hU=function(a,b){a.setAttribute("data-variant",$APP.lh.g(b));a.setAttribute("data-align",$APP.Nj.g(b));a.setAttribute("data-size",$APP.di.g(b));a.setAttribute("data-emphasis",XT.g(b));a.setAttribute("data-trend",YT.g(b));$APP.n($APP.Ql.g(b))?a.setAttribute("data-loading","true"):a.removeAttribute("data-loading")},iU=function(a){var b=eU(fU(a)),c=$APP.k(a,"__x_stat_base"),d=$APP.k(a,"__x_stat_label"),e=$APP.k(a,"__x_stat_value"),
5
- g=$APP.k(a,"__x_stat_hint");return $APP.n(c)?(gU(a,b),hU(c,b),d.textContent=function(){var h=$APP.T.g(b);return $APP.n(h)?h:""}(),e.textContent=function(){var h=$APP.pj.g(b);return $APP.n(h)?h:""}(),g.textContent=function(){var h=$APP.qm.g(b);return $APP.n(h)?h:""}()):null},jU=function(a){if(!$APP.Ng(a,"__x_stat_initialized")){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
- l=document.createElement("div"),m=document.createElement("div"),p=document.createElement("span"),r=document.createElement("span"),v=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: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");l.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);l.appendChild(A);l.appendChild(r);m.appendChild(C);m.appendChild(v);g.appendChild(h);g.appendChild(l);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=r;a.__x_stat_hint=v;a.__x_stat_initialized=!0}iU(a);return a},kU=function(a){return jU(a)},lU=function(a){return $APP.Ng(a,"__x_stat_initialized")?iU(a):jU(a)},mU=function(a,b){Object.defineProperty(a,b,{get:function(){var c=this.getAttribute(b);return $APP.n(c)?c:""},set:function(c){return $APP.n(c)?this.setAttribute(b,""+$APP.S.g(c)):this.removeAttribute(b)},enumerable:!0,configurable:!0})},
9
- nU=function(a){mU(a,"variant");mU(a,"align");mU(a,"size");mU(a,"emphasis");mU(a,"trend");mU(a,"label");mU(a,"value");mU(a,"hint");return Object.defineProperty(a,"loading",{get:function(){return this.hasAttribute("loading")},set:function(b){return $APP.n(b)?this.setAttribute("loading",""):this.removeAttribute("loading")},enumerable:!0,configurable:!0})},pU=function(){return $APP.Lg("x-stat",new $APP.Q(null,4,[$APP.Cg,oU,$APP.Dg,kU,$APP.Fg,lU,$APP.Jg,nU],null))},XT=new $APP.K(null,"emphasis","emphasis",
10
- 293543451),dU=new $APP.K(null,"aria-busy","aria-busy",793864247),YT=new $APP.K(null,"trend","trend",54563841);var oU="variant align size emphasis trend loading label value hint".split(" "),ZT=new $APP.R(null,new $APP.Q(null,5,["warning",null,"positive",null,"subtle",null,"danger",null,"default",null],null),null),$T=new $APP.R(null,new $APP.Q(null,3,["center",null,"start",null,"end",null],null),null),aU=new $APP.R(null,new $APP.Q(null,3,["md",null,"lg",null,"sm",null],null),null),bU=new $APP.R(null,new $APP.Q(null,2,["high",null,"normal",null],null),null),cU=new $APP.R(null,new $APP.Q(null,3,["neutral",null,
11
- "up",null,"down",null],null),null);
12
- $APP.zf([YT,$APP.Nj,$APP.lh,$APP.pj,$APP.qm,$APP.di,$APP.Ql,$APP.T,XT],[new $APP.Q(null,4,[$APP.Fl,"trend",$APP.Z,$APP.Y,$APP.Di,"neutral",$APP.Fi,!0],null),new $APP.Q(null,4,[$APP.Fl,"align",$APP.Z,$APP.Y,$APP.Di,"start",$APP.Fi,!0],null),new $APP.Q(null,4,[$APP.Fl,"variant",$APP.Z,$APP.Y,$APP.Di,"default",$APP.Fi,!0],null),new $APP.Q(null,4,[$APP.Fl,"value",$APP.Z,$APP.Y,$APP.Di,"",$APP.Fi,!0],null),new $APP.Q(null,4,[$APP.Fl,"hint",$APP.Z,$APP.Y,$APP.Di,"",$APP.Fi,!0],null),new $APP.Q(null,4,[$APP.Fl,
13
- "size",$APP.Z,$APP.Y,$APP.Di,"md",$APP.Fi,!0],null),new $APP.Q(null,4,[$APP.Fl,"loading",$APP.Z,$APP.uk,$APP.Di,!1,$APP.Fi,!0],null),new $APP.Q(null,4,[$APP.Fl,"label",$APP.Z,$APP.Y,$APP.Di,"",$APP.Fi,!0],null),new $APP.Q(null,4,[$APP.Fl,"emphasis",$APP.Z,$APP.Y,$APP.Di,"normal",$APP.Fi,!0],null)]);$APP.ha("baredom.exports.x_stat.init",pU);export const init=pU;
2
+ var lW=function(a,b,c){return $APP.Zc(b,a)?a:c},mW=function(a){return $APP.n($APP.n(a)?$APP.M("",a):a)?a:null},vW=function(a){var b=$APP.J(a),c=$APP.C(b,nW),d=$APP.C(b,oW),e=$APP.C(b,$APP.Ik),f=$APP.C(b,$APP.ii);a=$APP.C(b,$APP.Gh);var h=$APP.C(b,$APP.rn),l=$APP.C(b,$APP.bj),m=$APP.C(b,$APP.Km);b=$APP.C(b,$APP.X);f=lW(f,pW,"default");e=lW(e,qW,"start");l=lW(l,rW,"md");c=lW(c,sW,"normal");d=lW(d,tW,"neutral");m=$APP.E(m);return $APP.Lf([oW,$APP.Ik,$APP.ii,$APP.Gh,$APP.rn,$APP.bj,$APP.Km,$APP.X,uW,
3
+ nW],[d,e,f,mW(a),mW(h),l,m,mW(b),m?"true":null,c])},wW=function(a){return $APP.Lf([oW,$APP.Ik,$APP.ii,$APP.Gh,$APP.rn,$APP.bj,$APP.Km,$APP.X,nW],[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")])},xW=function(a,b){a.setAttribute("role","figure");var c=uW.g(b);$APP.n(c)?a.setAttribute("aria-busy",c):a.removeAttribute("aria-busy");
4
+ b=$APP.X.g(b);$APP.n(b)?a.setAttribute("aria-label",b):a.removeAttribute("aria-label")},yW=function(a,b){a.setAttribute("data-variant",$APP.ii.g(b));a.setAttribute("data-align",$APP.Ik.g(b));a.setAttribute("data-size",$APP.bj.g(b));a.setAttribute("data-emphasis",nW.g(b));a.setAttribute("data-trend",oW.g(b));$APP.n($APP.Km.g(b))?a.setAttribute("data-loading","true"):a.removeAttribute("data-loading")},zW=function(a){var b=vW(wW(a)),c=$APP.k(a,"__xStatBase"),d=$APP.k(a,"__xStatLabel"),e=$APP.k(a,"__xStatValue"),
5
+ f=$APP.k(a,"__xStatHint");return $APP.n(c)?(xW(a,b),yW(c,b),d.textContent=function(){var h=$APP.X.g(b);return $APP.n(h)?h:""}(),e.textContent=function(){var h=$APP.Gh.g(b);return $APP.n(h)?h:""}(),f.textContent=function(){var h=$APP.rn.g(b);return $APP.n(h)?h:""}()):null},AW=function(a){if(!$APP.$g(a,"__xStatInitialized")){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),f=document.createElement("div"),h=document.createElement("div"),
6
+ l=document.createElement("div"),m=document.createElement("div"),q=document.createElement("span"),r=document.createElement("span"),v=document.createElement("span"),x=document.createElement("slot"),y=document.createElement("slot"),A=document.createElement("slot"),D=document.createElement("slot"),G=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");f.setAttribute("part","body");h.setAttribute("part","label");l.setAttribute("part","value");m.setAttribute("part","hint");x.setAttribute("name","icon");y.setAttribute("name","label");A.setAttribute("name","value");D.setAttribute("name","hint");e.appendChild(x);h.appendChild(y);h.appendChild(q);l.appendChild(A);l.appendChild(r);m.appendChild(D);m.appendChild(v);f.appendChild(h);f.appendChild(l);f.appendChild(m);f.appendChild(G);d.appendChild(e);
8
+ d.appendChild(f);b.appendChild(c);b.appendChild(d);a.__xStatRoot=b;a.__xStatBase=d;a.__xStatLabel=q;a.__xStatValue=r;a.__xStatHint=v;a.__xStatInitialized=!0}zW(a);return a},BW=function(a){return AW(a)},CW=function(a){return $APP.$g(a,"__xStatInitialized")?zW(a):AW(a)},EW=function(a){return $APP.jh(a,DW)},GW=function(){return $APP.Yg("x-stat",new $APP.N(null,4,[$APP.Pg,FW,$APP.Qg,BW,$APP.Sg,CW,$APP.Wg,EW],null))},nW=new $APP.F(null,"emphasis","emphasis",293543451),uW=new $APP.F(null,"aria-busy","aria-busy",
9
+ 793864247),oW=new $APP.F(null,"trend","trend",54563841);var FW="variant align size emphasis trend loading label value hint".split(" "),pW=new $APP.O(null,new $APP.N(null,5,["warning",null,"positive",null,"subtle",null,"danger",null,"default",null],null),null),qW=new $APP.O(null,new $APP.N(null,3,["center",null,"start",null,"end",null],null),null),rW=new $APP.O(null,new $APP.N(null,3,["md",null,"lg",null,"sm",null],null),null),sW=new $APP.O(null,new $APP.N(null,2,["high",null,"normal",null],null),null),tW=new $APP.O(null,new $APP.N(null,3,["neutral",null,
10
+ "up",null,"down",null],null),null),DW=$APP.Lf([oW,$APP.Ik,$APP.ii,$APP.Gh,$APP.rn,$APP.bj,$APP.Km,$APP.X,nW],[new $APP.N(null,3,[$APP.R,$APP.U,$APP.S,"trend",$APP.ih,""],null),new $APP.N(null,3,[$APP.R,$APP.U,$APP.S,"align",$APP.ih,""],null),new $APP.N(null,3,[$APP.R,$APP.U,$APP.S,"variant",$APP.ih,""],null),new $APP.N(null,3,[$APP.R,$APP.U,$APP.S,"value",$APP.ih,""],null),new $APP.N(null,3,[$APP.R,$APP.U,$APP.S,"hint",$APP.ih,""],null),new $APP.N(null,3,[$APP.R,$APP.U,$APP.S,"size",$APP.ih,""],null),
11
+ new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"loading"],null),new $APP.N(null,3,[$APP.R,$APP.U,$APP.S,"label",$APP.ih,""],null),new $APP.N(null,3,[$APP.R,$APP.U,$APP.S,"emphasis",$APP.ih,""],null)]);$APP.ca("baredom.exports.x_stat.init",GW);export const init=GW;
package/dist/x-stepper.js CHANGED
@@ -1,16 +1,15 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var Ip=function(a,b){return new $APP.rd(null,function(){if(a>0){var c=$APP.t(b);return c?$APP.od($APP.u(c),Ip(a-1,$APP.Xb(c))):null}return null},null)},Kp=function(a){a=$APP.D(Jp,typeof a==="string"?a.toLowerCase():null);return $APP.n(a)?a:$APP.$l},Mp=function(a){a=$APP.D(Lp,a);return $APP.n(a)?a:"horizontal"},Pp=function(a){a=$APP.D(Np,typeof a==="string"?a.toLowerCase():null);return $APP.n(a)?a:Op},Rp=function(a){a=$APP.D(Qp,a);return $APP.n(a)?a:"md"},Sp=function(a){return typeof a==="string"?
3
- (a=parseInt(a.trim(),10),typeof a==="number"&&$APP.q(isNaN(a))&&a>=0?a:0):0},Tp=function(a){if(typeof a==="string"){var b=a.trim();if($APP.n($APP.eg(/^\d+$/,b)))return a=parseInt(b,10),a>0&&a<=200?$APP.fe(function(g){return new $APP.Q(null,2,[$APP.T,"Step "+$APP.S.g(g),$APP.Qk,null],null)},$APP.dg(1,a+1)):$APP.ee;if($APP.n(function(){var g=$APP.N("",b);return g?b.startsWith("["):g}()))try{var c=JSON.parse(b);if($APP.n(Array.isArray(c))){var d=$APP.uc(c),e=$APP.z(d)>200?Ip(200,d):d;return $APP.fe(function(g){return new $APP.Q(null,
4
- 2,[$APP.T,function(){var h=$APP.k(g,"label");return typeof h==="string"?h:""}(),$APP.Qk,function(){var h=$APP.k(g,"description");return typeof h==="string"?h:null}()],null)},e)}return $APP.ee}catch(g){return $APP.ee}else return $APP.ee}else return $APP.ee},Up=function(a){var b=$APP.k(a,"__xStepperRefs");if($APP.n(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.Q(null,2,[$APP.Zi,b,$APP.Zj,d],null);return $APP.k(a,"__xStepperRefs")},Wp=function(a){a=new $APP.Q(null,5,[Vp,a.getAttribute("steps"),$APP.pn,a.getAttribute("current"),$APP.pm,a.getAttribute("orientation"),$APP.nm,a.getAttribute("size"),$APP.X,a.hasAttribute("disabled")],null);var b=$APP.M(a),c=$APP.D(b,Vp);a=$APP.D(b,$APP.pn);var d=$APP.D(b,$APP.pm),e=$APP.D(b,$APP.nm);b=
6
- $APP.D(b,$APP.X);c=Tp(c);var g=$APP.z(c);return new $APP.Q(null,5,[$APP.Xm,c,$APP.vi,g===0?0:$APP.Jh.i(0,$APP.Kh.i(Sp(a),g-1)),$APP.Jl,Kp(d),$APP.di,Pp(e),$APP.X,$APP.F(b)],null)},Xp=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.pa: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));}}())+")"},Yp=function(a,b,c,d){var e=
7
- $APP.M(b);b=$APP.D(e,$APP.T);e=$APP.D(e,$APP.Qk);var g=document.createElement("div"),h=document.createElement("div"),l=document.createElement("button"),m=document.createElement("span"),p=document.createElement("div"),r=document.createElement("div"),v=document.createElement("span"),x=document.createElement("span");a:{var y=c instanceof $APP.K?c.pa: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: "+
8
- $APP.S.g(y));}}b=$APP.n(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");l.setAttribute("part","step-indicator");l.setAttribute("type","button");l.setAttribute("aria-label",Xp(a,b,c));$APP.B.i(c,$APP.vi)?l.setAttribute("aria-current","step"):l.removeAttribute("aria-current");l.setAttribute("tabindex",$APP.n(d)?"-1":"0");$APP.n(d)&&l.setAttribute("aria-disabled","true");
9
- m.setAttribute("part","step-number");m.setAttribute("aria-hidden","true");m.textContent=$APP.B.i(c,$APP.gn)?"✓":""+$APP.S.g(a+1);p.setAttribute("part","step-connector");p.setAttribute("aria-hidden","true");r.setAttribute("part","step-content");v.setAttribute("part","step-label");v.textContent=b;x.setAttribute("part","step-description");$APP.n($APP.n(e)?$APP.N(e,""):e)?(x.textContent=e,x.style.display="block"):x.style.display="none";l.appendChild(m);h.appendChild(l);h.appendChild(p);r.appendChild(v);
10
- r.appendChild(x);g.appendChild(h);g.appendChild(r);return g},$p=function(a){var b=Wp(a);if($APP.N($APP.k(a,"__xStepperModel"),b)){b=$APP.M(b);var c=$APP.D(b,$APP.Xm),d=$APP.D(b,$APP.vi),e=$APP.D(b,$APP.Jl),g=$APP.D(b,$APP.di),h=$APP.D(b,$APP.X),l=Up(a);l=$APP.M(l);l=$APP.D(l,$APP.Zj);a.setAttribute("data-orientation",Mp(e));a.setAttribute("data-size",Rp(g));l.innerHTML="";c=$APP.t($APP.Wd($APP.Ph,c));e=null;for(var m=g=0;;)if(m<g){var p=e.F(null,m),r=$APP.Ac(p,0,null);p=$APP.Ac(p,1,null);var v=r<
11
- d?$APP.gn:$APP.B.i(r,d)?$APP.vi:Zp;l.appendChild(Yp(r,p,v,h));m+=1}else if(c=$APP.t(c))$APP.Nc(c)?(g=$APP.xb(c),c=$APP.yb(c),e=g,g=$APP.z(g)):(g=$APP.u(c),e=$APP.Ac(g,0,null),g=$APP.Ac(g,1,null),m=e<d?$APP.gn:$APP.B.i(e,d)?$APP.vi:Zp,l.appendChild(Yp(e,g,m,h)),c=$APP.w(c),e=null,g=0),m=0;else break;a.__xStepperModel=b}},aq=function(a){function b(d){var e=$APP.k(a,"__xStepperModel");e=$APP.n(e)?e:Wp(a);$APP.n($APP.X.g(e))||(d=d.target.closest("[part\x3dstep-indicator]"),$APP.n(d)&&(d=parseInt(d.closest("[part\x3dstep]").getAttribute("data-index"),
12
- 10),e=$APP.vi.g(e),typeof d==="number"&&$APP.q(isNaN(d))&&$APP.N(d,e)&&(e=$APP.Zh(new $APP.Q(null,2,[$APP.qi,e,$APP.Cm,d],null)),e=new CustomEvent("x-stepper-change",{detail:e,bubbles:!0,composed:!0,cancelable:!0}),e=a.dispatchEvent(e),$APP.n(e)&&a.setAttribute("current",""+$APP.S.g(d)))));return null}var c=Up(a);c=$APP.M(c);$APP.D(c,$APP.Zj).addEventListener("click",b);$APP.ja(a,"__xStepperHandlers",{click:b})},bq=function(a){var b=$APP.k(a,"__xStepperHandlers");if($APP.n(b)){var c=$APP.k(a,"__xStepperRefs");
13
- $APP.n(c)&&(c=$APP.Zj.g(c),b=$APP.k(b,"click"),$APP.n($APP.n(c)?b:c)&&c.removeEventListener("click",b))}a.__xStepperHandlers=null},cq=function(a){Object.defineProperty(a,"steps",{get:function(){var b=this.getAttribute("steps");return $APP.n(b)?b:"[]"},set:function(b){return $APP.n(b)?this.setAttribute("steps",""+$APP.S.g(b)):this.removeAttribute("steps")},enumerable:!0,configurable:!0});Object.defineProperty(a,"current",{get:function(){return Sp(this.getAttribute("current"))},set:function(b){return b==
14
- null?this.removeAttribute("current"):this.setAttribute("current",""+$APP.S.g(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"orientation",{get:function(){return Mp(Kp(this.getAttribute("orientation")))},set:function(b){return $APP.n(b)?this.setAttribute("orientation",""+$APP.S.g(b)):this.removeAttribute("orientation")},enumerable:!0,configurable:!0});Object.defineProperty(a,"size",{get:function(){return Rp(Pp(this.getAttribute("size")))},set:function(b){return $APP.n(b)?this.setAttribute("size",
15
- ""+$APP.S.g(b)):this.removeAttribute("size")},enumerable:!0,configurable:!0});return Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0})},dq=function(a){Up(a);bq(a);aq(a);$p(a);return null},eq=function(a){bq(a);return null},fq=function(a,b,c,d){$APP.N(c,d)&&$p(a);return null},hq=function(){return $APP.Lg("x-stepper",new $APP.Q(null,
16
- 5,[$APP.Cg,gq,$APP.Dg,dq,$APP.Eg,eq,$APP.Fg,fq,$APP.Jg,cq],null))},Zp=new $APP.K(null,"upcoming","upcoming",1873315471),Vp=new $APP.K(null,"steps-raw","steps-raw",1741812533),Op=new $APP.K(null,"md","md",707286655),iq=new $APP.K(null,"lg","lg",-80787836),jq=new $APP.K(null,"sm","sm",-1402575065);var gq=["steps","current","orientation","size","disabled"];$APP.Pd(["x-stepper-change",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,2,[$APP.qi,$APP.W,$APP.Cm,$APP.W],null),$APP.Km,!0],null)]);var Jp=new $APP.Q(null,2,["horizontal",$APP.$l,"vertical",$APP.Rj],null),Lp=new $APP.Q(null,2,[$APP.$l,"horizontal",$APP.Rj,"vertical"],null),Np=new $APP.Q(null,3,["sm",jq,"md",Op,"lg",iq],null),Qp=new $APP.Q(null,3,[jq,"sm",Op,"md",iq,"lg"],null);$APP.ha("baredom.exports.x_stepper.init",hq);export const init=hq;
2
+ var Cq=function(a,b){return new $APP.Ad(null,function(){if(a>0){var c=$APP.t(b);return c?$APP.xd($APP.u(c),Cq(a-1,$APP.dc(c))):null}return null},null)},Eq=function(a){a=$APP.C(Dq,typeof a==="string"?a.toLowerCase():null);return $APP.n(a)?a:$APP.$m},Gq=function(a){a=$APP.C(Fq,a);return $APP.n(a)?a:"horizontal"},Jq=function(a){a=$APP.C(Hq,typeof a==="string"?a.toLowerCase():null);return $APP.n(a)?a:Iq},Lq=function(a){a=$APP.C(Kq,a);return $APP.n(a)?a:"md"},Mq=function(a){return typeof a==="string"?
3
+ (a=parseInt(a.trim(),10),typeof a==="number"&&$APP.p(isNaN(a))&&a>=0?a:0):0},Vq=function(a){if(typeof a==="string"){var b=a.trim();if($APP.n($APP.rg(/^\d+$/,b)))return a=parseInt(b,10),a>0&&a<=200?$APP.qe(function(f){return new $APP.N(null,2,[$APP.X,"Step "+$APP.Q.g(f),$APP.Gl,null],null)},$APP.pg(1,a+1)):$APP.pe;if($APP.n(function(){var f=$APP.M("",b);return f?b.startsWith("["):f}()))try{var c=JSON.parse(b);if($APP.n(Array.isArray(c))){var d=$APP.Bc(c),e=$APP.z(d)>200?Cq(200,d):d;return $APP.qe(function(f){return new $APP.N(null,
4
+ 2,[$APP.X,function(){var h=$APP.k(f,"label");return typeof h==="string"?h:""}(),$APP.Gl,function(){var h=$APP.k(f,"description");return typeof h==="string"?h:null}()],null)},e)}return $APP.pe}catch(f){return $APP.pe}else return $APP.pe}else return $APP.pe},Wq=function(a){var b=$APP.k(a,"__xStepperRefs");if($APP.n(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.N(null,2,[$APP.Uh,b,$APP.Vh,d],null);return $APP.k(a,"__xStepperRefs")},Yq=function(a){a=new $APP.N(null,5,[Xq,a.getAttribute("steps"),$APP.jo,a.getAttribute("current"),$APP.qn,a.getAttribute("orientation"),$APP.on,a.getAttribute("size"),$APP.Y,a.hasAttribute("disabled")],null);var b=$APP.J(a),c=$APP.C(b,Xq);a=$APP.C(b,$APP.jo);var d=$APP.C(b,$APP.qn),e=$APP.C(b,$APP.on);b=
6
+ $APP.C(b,$APP.Y);c=Vq(c);var f=$APP.z(c);return new $APP.N(null,5,[$APP.Rn,c,$APP.pj,f===0?0:$APP.Hi.i(0,$APP.Ii.i(Mq(a),f-1)),$APP.Cm,Eq(d),$APP.bj,Jq(e),$APP.Y,$APP.E(b)],null)},Zq=function(a,b,c){return"Step "+$APP.Q.g(a+1)+": "+$APP.Q.g(b)+" ("+$APP.Q.g(function(){var d=c instanceof $APP.F?c.qa:null;switch(d){case "complete":return"completed";case "current":return"current";case "upcoming":return"upcoming";default:throw Error("No matching clause: "+$APP.Q.g(d));}}())+")"},$q=function(a,b,c,d){var e=
7
+ $APP.J(b);b=$APP.C(e,$APP.X);e=$APP.C(e,$APP.Gl);var f=document.createElement("div"),h=document.createElement("div"),l=document.createElement("button"),m=document.createElement("span"),q=document.createElement("div"),r=document.createElement("div"),v=document.createElement("span"),x=document.createElement("span");a:{var y=c instanceof $APP.F?c.qa: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: "+
8
+ $APP.Q.g(y));}}b=$APP.n(b)?b:"";f.setAttribute("part","step");f.setAttribute("role","listitem");f.setAttribute("data-index",""+$APP.Q.g(a));f.setAttribute("data-state",y);h.setAttribute("part","step-track");l.setAttribute("part","step-indicator");l.setAttribute("type","button");l.setAttribute("aria-label",Zq(a,b,c));$APP.B.i(c,$APP.pj)?l.setAttribute("aria-current","step"):l.removeAttribute("aria-current");l.setAttribute("tabindex",$APP.n(d)?"-1":"0");$APP.n(d)&&l.setAttribute("aria-disabled","true");
9
+ m.setAttribute("part","step-number");m.setAttribute("aria-hidden","true");m.textContent=$APP.B.i(c,$APP.bo)?"✓":""+$APP.Q.g(a+1);q.setAttribute("part","step-connector");q.setAttribute("aria-hidden","true");r.setAttribute("part","step-content");v.setAttribute("part","step-label");v.textContent=b;x.setAttribute("part","step-description");$APP.n($APP.n(e)?$APP.M(e,""):e)?(x.textContent=e,x.style.display="block"):x.style.display="none";l.appendChild(m);h.appendChild(l);h.appendChild(q);r.appendChild(v);
10
+ r.appendChild(x);f.appendChild(h);f.appendChild(r);return f},br=function(a){var b=Yq(a);if($APP.M($APP.k(a,"__xStepperModel"),b)){b=$APP.J(b);var c=$APP.C(b,$APP.Rn),d=$APP.C(b,$APP.pj),e=$APP.C(b,$APP.Cm),f=$APP.C(b,$APP.bj),h=$APP.C(b,$APP.Y),l=Wq(a);l=$APP.J(l);l=$APP.C(l,$APP.Vh);a.setAttribute("data-orientation",Gq(e));a.setAttribute("data-size",Lq(f));l.innerHTML="";c=$APP.t($APP.ee($APP.Ni,c));e=null;for(var m=f=0;;)if(m<f){var q=e.F(null,m),r=$APP.Hc(q,0,null);q=$APP.Hc(q,1,null);var v=r<
11
+ d?$APP.bo:$APP.B.i(r,d)?$APP.pj:ar;l.appendChild($q(r,q,v,h));m+=1}else if(c=$APP.t(c))$APP.Vc(c)?(f=$APP.Db(c),c=$APP.Eb(c),e=f,f=$APP.z(f)):(f=$APP.u(c),e=$APP.Hc(f,0,null),f=$APP.Hc(f,1,null),m=e<d?$APP.bo:$APP.B.i(e,d)?$APP.pj:ar,l.appendChild($q(e,f,m,h)),c=$APP.w(c),e=null,f=0),m=0;else break;a.__xStepperModel=b}},cr=function(a){function b(d){var e=$APP.k(a,"__xStepperModel");e=$APP.n(e)?e:Yq(a);$APP.n($APP.Y.g(e))||(d=d.target.closest("[part\x3dstep-indicator]"),$APP.n(d)&&(d=parseInt(d.closest("[part\x3dstep]").getAttribute("data-index"),
12
+ 10),e=$APP.pj.g(e),typeof d==="number"&&$APP.p(isNaN(d))&&$APP.M(d,e)&&(e=$APP.Xi(new $APP.N(null,2,[$APP.kj,e,$APP.wn,d],null)),$APP.ch(a,"x-stepper-change",e)&&a.setAttribute("current",""+$APP.Q.g(d)))));return null}var c=Wq(a);c=$APP.J(c);$APP.C(c,$APP.Vh).addEventListener("click",b);$APP.fa(a,"__xStepperHandlers",{click:b})},dr=function(a){var b=$APP.k(a,"__xStepperHandlers");if($APP.n(b)){var c=$APP.k(a,"__xStepperRefs");$APP.n(c)&&(c=$APP.Vh.g(c),b=$APP.k(b,"click"),$APP.n($APP.n(c)?b:c)&&c.removeEventListener("click",
13
+ b))}a.__xStepperHandlers=null},er=function(a){$APP.eh(a,"steps","steps","[]");Object.defineProperty(a,"current",{get:function(){return Mq(this.getAttribute("current"))},set:function(b){return b==null?this.removeAttribute("current"):this.setAttribute("current",""+$APP.Q.g(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"orientation",{get:function(){return Gq(Eq(this.getAttribute("orientation")))},set:function(b){return $APP.n(b)?this.setAttribute("orientation",""+$APP.Q.g(b)):this.removeAttribute("orientation")},
14
+ enumerable:!0,configurable:!0});Object.defineProperty(a,"size",{get:function(){return Lq(Jq(this.getAttribute("size")))},set:function(b){return $APP.n(b)?this.setAttribute("size",""+$APP.Q.g(b)):this.removeAttribute("size")},enumerable:!0,configurable:!0});return $APP.dh(a,"disabled","disabled")},fr=function(a){Wq(a);dr(a);cr(a);br(a);return null},gr=function(a){dr(a);return null},hr=function(a,b,c,d){$APP.M(c,d)&&br(a);return null},jr=function(){return $APP.Yg("x-stepper",new $APP.N(null,5,[$APP.Pg,
15
+ ir,$APP.Qg,fr,$APP.Rg,gr,$APP.Sg,hr,$APP.Wg,er],null))},ar=new $APP.F(null,"upcoming","upcoming",1873315471),Xq=new $APP.F(null,"steps-raw","steps-raw",1741812533),Iq=new $APP.F(null,"md","md",707286655),kr=new $APP.F(null,"lg","lg",-80787836),lr=new $APP.F(null,"sm","sm",-1402575065);var ir=["steps","current","orientation","size","disabled"];$APP.Yd(["x-stepper-change",new $APP.N(null,2,[$APP.Z,new $APP.N(null,2,[$APP.kj,$APP.V,$APP.wn,$APP.V],null),$APP.Fn,!0],null)]);var Dq=new $APP.N(null,2,["horizontal",$APP.$m,"vertical",$APP.Mk],null),Fq=new $APP.N(null,2,[$APP.$m,"horizontal",$APP.Mk,"vertical"],null),Hq=new $APP.N(null,3,["sm",lr,"md",Iq,"lg",kr],null),Kq=new $APP.N(null,3,[lr,"sm",Iq,"md",kr,"lg"],null);$APP.ca("baredom.exports.x_stepper.init",jr);export const init=jr;