@vanelsas/baredom 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +6 -4
  3. package/dist/base.js +397 -373
  4. package/dist/x-alert.js +19 -19
  5. package/dist/x-avatar-group.js +11 -11
  6. package/dist/x-avatar.js +15 -15
  7. package/dist/x-badge.js +11 -11
  8. package/dist/x-bento-grid.js +5 -5
  9. package/dist/x-bento-item.js +4 -4
  10. package/dist/x-breadcrumbs.js +14 -14
  11. package/dist/x-button.js +16 -16
  12. package/dist/x-cancel-dialogue.js +17 -17
  13. package/dist/x-card.js +7 -7
  14. package/dist/x-chart.js +47 -47
  15. package/dist/x-checkbox.js +11 -11
  16. package/dist/x-chip.js +8 -8
  17. package/dist/x-collapse.js +10 -10
  18. package/dist/x-command-palette.js +31 -31
  19. package/dist/x-container.js +6 -6
  20. package/dist/x-context-menu.js +19 -19
  21. package/dist/x-copy.js +23 -23
  22. package/dist/x-currency-field.js +22 -22
  23. package/dist/x-date-picker.js +41 -41
  24. package/dist/x-divider.js +13 -13
  25. package/dist/x-drawer.js +11 -11
  26. package/dist/x-dropdown.js +9 -9
  27. package/dist/x-fieldset.js +6 -6
  28. package/dist/x-file-download.js +7 -7
  29. package/dist/x-form-field.js +15 -15
  30. package/dist/x-form.js +10 -10
  31. package/dist/x-gaussian-blur.js +18 -18
  32. package/dist/x-grid.js +6 -6
  33. package/dist/x-kinetic-font.js +29 -0
  34. package/dist/x-kinetic-typography.js +39 -61
  35. package/dist/x-liquid-dock.js +40 -0
  36. package/dist/x-liquid-fill.js +45 -0
  37. package/dist/x-liquid-glass.js +48 -0
  38. package/dist/x-menu-item.js +10 -10
  39. package/dist/x-menu.js +11 -11
  40. package/dist/x-metaball-cursor.js +28 -27
  41. package/dist/x-modal.js +12 -12
  42. package/dist/x-morph-stack.js +41 -0
  43. package/dist/x-navbar.js +13 -13
  44. package/dist/x-neural-glow.js +34 -34
  45. package/dist/x-notification-center.js +9 -10
  46. package/dist/x-organic-divider.js +19 -19
  47. package/dist/x-organic-progress.js +38 -38
  48. package/dist/x-organic-shape.js +14 -14
  49. package/dist/x-pagination.js +16 -16
  50. package/dist/x-popover.js +14 -14
  51. package/dist/x-progress-circle.js +9 -9
  52. package/dist/x-progress.js +10 -10
  53. package/dist/x-radio.js +11 -11
  54. package/dist/x-ripple-effect.js +12 -13
  55. package/dist/x-scroll-parallax.js +19 -19
  56. package/dist/x-scroll-stack.js +18 -18
  57. package/dist/x-scroll-story.js +36 -36
  58. package/dist/x-scroll-timeline.js +50 -50
  59. package/dist/x-scroll.js +41 -41
  60. package/dist/x-search-field.js +14 -14
  61. package/dist/x-select.js +9 -9
  62. package/dist/x-sidebar.js +16 -16
  63. package/dist/x-skeleton.js +6 -6
  64. package/dist/x-slider.js +16 -16
  65. package/dist/x-soft-body.js +22 -0
  66. package/dist/x-spacer.js +5 -5
  67. package/dist/x-spinner.js +5 -5
  68. package/dist/x-splash.js +13 -13
  69. package/dist/x-stat.js +11 -11
  70. package/dist/x-stepper.js +16 -16
  71. package/dist/x-switch.js +10 -10
  72. package/dist/x-tab.js +7 -7
  73. package/dist/x-table-cell.js +22 -22
  74. package/dist/x-table-row.js +10 -10
  75. package/dist/x-table.js +16 -16
  76. package/dist/x-tabs.js +11 -11
  77. package/dist/x-text-area.js +18 -18
  78. package/dist/x-timeline-item.js +24 -24
  79. package/dist/x-timeline.js +9 -9
  80. package/dist/x-toast.js +24 -24
  81. package/dist/x-toaster.js +8 -8
  82. package/dist/x-typography.js +10 -10
  83. package/package.json +25 -1
@@ -1,17 +1,17 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var rn=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},sn=function(a,b,c){a=$APP.C.h("",a.value);c=c.hasAttribute("disabled");$APP.n(a?a:c)?b.classList.add("clear-hidden"):b.classList.remove("clear-hidden")},tn=function(a,b,c){a=a.hasAttribute("required");var d=c.value;return $APP.n($APP.n(a)?$APP.C.h(d,""):a)?b.setValidity({valueMissing:!0},"Please fill in this field.",c):b.setValidity({},"",c)},vn=function(a){var b=$APP.l(a,"__xSearchFieldRefs");if($APP.n(b)){var c=$APP.l(b,
3
- "input");b=$APP.l(b,"clear");var d=new $APP.R(null,7,[$APP.Pj,a.getAttribute("name"),$APP.Ak,a.getAttribute("value"),$APP.Qh,a.getAttribute("placeholder"),$APP.sh,a.getAttribute("label"),$APP.ck,a.hasAttribute("disabled"),$APP.Xg,a.hasAttribute("required"),$APP.rh,a.getAttribute("autocomplete")],null);var e=$APP.N(d),g=$APP.I(e,$APP.Pj),h=$APP.I(e,$APP.Ak),k=$APP.I(e,$APP.Qh),m=$APP.I(e,$APP.sh),p=$APP.I(e,$APP.ck);d=$APP.I(e,$APP.Xg);e=$APP.I(e,$APP.rh);g=$APP.n(g)?g:"";h=$APP.n(h)?h:"";k=$APP.n(k)?
4
- k:"";m=$APP.n(m)?m:"";p=$APP.J(p);d=$APP.J(d);e=typeof e==="string"&&$APP.K(un,e)?e:"off";d=new $APP.R(null,7,[$APP.si,g,$APP.Xh,h,$APP.xk,k,$APP.U,m,$APP.X,p,$APP.ph,d,$APP.lk,e],null);c.name=$APP.si.g(d);c.placeholder=$APP.xk.g(d);c.disabled=$APP.X.g(d);c.required=$APP.ph.g(d);c.autocomplete=$APP.lk.g(d);e=$APP.U.g(d);$APP.n($APP.n(e)?$APP.O(e,""):e)?c.setAttribute("aria-label",e):c.removeAttribute("aria-label");d=$APP.n($APP.ph.g(d))?"true":"false";c.setAttribute("aria-required",d);sn(c,b,a);b=
5
- $APP.l(a,"__xSearchFieldInternals");return $APP.n(b)?tn(a,b,c):null}return null},wn=function(a,b,c,d){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:$APP.J(d)}))},xn=function(a){return function(){var b=$APP.l(a,"__xSearchFieldRefs");if($APP.n(b)){var c=$APP.l(b,"input");b=$APP.l(b,"clear");var d=c.value;var e=a.getAttribute("name");e=$APP.n(e)?e:"";var g=$APP.l(a,"__xSearchFieldInternals");$APP.n(g)&&(g.setFormValue(d),tn(a,g,c));sn(c,b,a);return wn(a,"x-search-field-input",
6
- {name:e,value:d},!1)}return null}},yn=function(a){return function(){var b=$APP.l(a,"__xSearchFieldRefs");if($APP.n(b)){b=$APP.l(b,"input");var c=b.value;var d=a.getAttribute("name");d=$APP.n(d)?d:"";var e=$APP.l(a,"__xSearchFieldInternals");$APP.n(e)&&(e.setFormValue(c),tn(a,e,b));return wn(a,"x-search-field-change",{name:d,value:c},!1)}return null}},zn=function(a){return function(b){if($APP.C.h("Enter",b.key)&&(b.preventDefault(),b=$APP.l(a,"__xSearchFieldRefs"),$APP.n(b))){var c=$APP.l(b,"input").value;
7
- b=function(){var d=a.getAttribute("name");return $APP.n(d)?d:""}();return $APP.n(function(){var d=a.hasAttribute("required");return $APP.n(d)?$APP.C.h(c,""):d}())?(b=$APP.l(a,"__xSearchFieldInternals"),$APP.n(b)?b.reportValidity():null):wn(a,"x-search-field-search",{name:b,value:c},!0)}return null}},An=function(a){return function(){var b=$APP.l(a,"__xSearchFieldRefs");if($APP.n(b)){var c=$APP.l(b,"input");b=$APP.l(b,"clear");var d=a.getAttribute("name");d=$APP.n(d)?d:"";c.value="";var e=$APP.l(a,
8
- "__xSearchFieldInternals");$APP.n(e)&&(e.setFormValue(""),tn(a,e,c));sn(c,b,a);wn(a,"x-search-field-clear",{name:d},!1);return c.focus()}return null}},Bn=function(a){var b=$APP.l(a,"__xSearchFieldRefs");if($APP.n(b)){var c=$APP.l(a,"__xSearchFieldHandlers");if($APP.n(c)){var d=$APP.l(b,"input");b=$APP.l(b,"clear");d.removeEventListener("input",$APP.l(c,"input"));d.removeEventListener("change",$APP.l(c,"change"));d.removeEventListener("keydown",$APP.l(c,"keydown"));b.removeEventListener("click",$APP.l(c,
9
- "click"));a.__xSearchFieldHandlers=null;return}}return null},Cn=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.n(d)?d:""},set:function(d){d!=null&&$APP.O(d)?(d=""+$APP.T.g(d),d=this.setAttribute(c,d)):d=this.removeAttribute(c);return d}})},Dn=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return rn(this,c,$APP.J(d))}})},En=function(a){Object.defineProperty(a,
10
- "value",{configurable:!0,enumerable:!0,get:function(){var b=$APP.l(this,"__xSearchFieldRefs");if($APP.n(b))return $APP.l(b,"input").value;b=this.getAttribute("value");return $APP.n(b)?b:""},set:function(b){b=b!=null&&$APP.O(b)?""+$APP.T.g(b):"";this.setAttribute("value",b);var c=$APP.l(this,"__xSearchFieldRefs");return $APP.n(c)?$APP.l(c,"input").value=b:null}})},Gn=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;Object.defineProperty(a,"observedAttributes",{get:function(){return Fn}});
11
- En(b);Cn(b,"name","name");Cn(b,"placeholder","placeholder");Cn(b,"label","label");Cn(b,"autocomplete","autocomplete");Dn(b,"disabled","disabled");Dn(b,"required","required");b.checkValidity=function(){var c=$APP.l(this,"__xSearchFieldInternals");return $APP.n(c)?c.checkValidity():!0};b.reportValidity=function(){var c=$APP.l(this,"__xSearchFieldInternals");return $APP.n(c)?c.reportValidity():!0};b.connectedCallback=function(){if(!$APP.n($APP.l(this,"__xSearchFieldRefs"))){if(!$APP.n(this.shadowRoot)){var c=
2
+ var oo=function(a,b,c){return $APP.r(c)?a.setAttribute(b,""):a.removeAttribute(b)},po=function(a,b,c){a=$APP.D.i("",a.value);c=c.hasAttribute("disabled");$APP.r(a?a:c)?b.classList.add("clear-hidden"):b.classList.remove("clear-hidden")},qo=function(a,b,c){a=a.hasAttribute("required");var d=c.value;return $APP.r($APP.r(a)?$APP.D.i(d,""):a)?b.setValidity({valueMissing:!0},"Please fill in this field.",c):b.setValidity({},"",c)},so=function(a){var b=$APP.l(a,"__xSearchFieldRefs");if($APP.r(b)){var c=$APP.l(b,
3
+ "input");b=$APP.l(b,"clear");var d=new $APP.P(null,7,[$APP.Ek,a.getAttribute("name"),$APP.vl,a.getAttribute("value"),$APP.ii,a.getAttribute("placeholder"),$APP.Oh,a.getAttribute("label"),$APP.Rk,a.hasAttribute("disabled"),$APP.sh,a.hasAttribute("required"),$APP.Nh,a.getAttribute("autocomplete")],null);var e=$APP.N(d),g=$APP.G(e,$APP.Ek),h=$APP.G(e,$APP.vl),k=$APP.G(e,$APP.ii),m=$APP.G(e,$APP.Oh),p=$APP.G(e,$APP.Rk);d=$APP.G(e,$APP.sh);e=$APP.G(e,$APP.Nh);g=$APP.r(g)?g:"";h=$APP.r(h)?h:"";k=$APP.r(k)?
4
+ k:"";m=$APP.r(m)?m:"";p=$APP.I(p);d=$APP.I(d);e=typeof e==="string"&&$APP.J(ro,e)?e:"off";d=new $APP.P(null,7,[$APP.Si,g,$APP.ui,h,$APP.rl,k,$APP.T,m,$APP.W,p,$APP.Lh,d,$APP.bl,e],null);c.name=$APP.Si.g(d);c.placeholder=$APP.rl.g(d);c.disabled=$APP.W.g(d);c.required=$APP.Lh.g(d);c.autocomplete=$APP.bl.g(d);e=$APP.T.g(d);$APP.r($APP.r(e)?$APP.O(e,""):e)?c.setAttribute("aria-label",e):c.removeAttribute("aria-label");d=$APP.r($APP.Lh.g(d))?"true":"false";c.setAttribute("aria-required",d);po(c,b,a);b=
5
+ $APP.l(a,"__xSearchFieldInternals");return $APP.r(b)?qo(a,b,c):null}return null},to=function(a,b,c,d){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:$APP.I(d)}))},uo=function(a){return function(){var b=$APP.l(a,"__xSearchFieldRefs");if($APP.r(b)){var c=$APP.l(b,"input");b=$APP.l(b,"clear");var d=c.value;var e=a.getAttribute("name");e=$APP.r(e)?e:"";var g=$APP.l(a,"__xSearchFieldInternals");$APP.r(g)&&(g.setFormValue(d),qo(a,g,c));po(c,b,a);return to(a,"x-search-field-input",
6
+ {name:e,value:d},!1)}return null}},vo=function(a){return function(){var b=$APP.l(a,"__xSearchFieldRefs");if($APP.r(b)){b=$APP.l(b,"input");var c=b.value;var d=a.getAttribute("name");d=$APP.r(d)?d:"";var e=$APP.l(a,"__xSearchFieldInternals");$APP.r(e)&&(e.setFormValue(c),qo(a,e,b));return to(a,"x-search-field-change",{name:d,value:c},!1)}return null}},wo=function(a){return function(b){if($APP.D.i("Enter",b.key)&&(b.preventDefault(),b=$APP.l(a,"__xSearchFieldRefs"),$APP.r(b))){var c=$APP.l(b,"input").value;
7
+ b=function(){var d=a.getAttribute("name");return $APP.r(d)?d:""}();return $APP.r(function(){var d=a.hasAttribute("required");return $APP.r(d)?$APP.D.i(c,""):d}())?(b=$APP.l(a,"__xSearchFieldInternals"),$APP.r(b)?b.reportValidity():null):to(a,"x-search-field-search",{name:b,value:c},!0)}return null}},xo=function(a){return function(){var b=$APP.l(a,"__xSearchFieldRefs");if($APP.r(b)){var c=$APP.l(b,"input");b=$APP.l(b,"clear");var d=a.getAttribute("name");d=$APP.r(d)?d:"";c.value="";var e=$APP.l(a,
8
+ "__xSearchFieldInternals");$APP.r(e)&&(e.setFormValue(""),qo(a,e,c));po(c,b,a);to(a,"x-search-field-clear",{name:d},!1);return c.focus()}return null}},yo=function(a){var b=$APP.l(a,"__xSearchFieldRefs");if($APP.r(b)){var c=$APP.l(a,"__xSearchFieldHandlers");if($APP.r(c)){var d=$APP.l(b,"input");b=$APP.l(b,"clear");d.removeEventListener("input",$APP.l(c,"input"));d.removeEventListener("change",$APP.l(c,"change"));d.removeEventListener("keydown",$APP.l(c,"keydown"));b.removeEventListener("click",$APP.l(c,
9
+ "click"));a.__xSearchFieldHandlers=null;return}}return null},zo=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.r(d)?d:""},set:function(d){d!=null&&$APP.O(d)?(d=""+$APP.S.g(d),d=this.setAttribute(c,d)):d=this.removeAttribute(c);return d}})},Ao=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return oo(this,c,$APP.I(d))}})},Bo=function(a){Object.defineProperty(a,
10
+ "value",{configurable:!0,enumerable:!0,get:function(){var b=$APP.l(this,"__xSearchFieldRefs");if($APP.r(b))return $APP.l(b,"input").value;b=this.getAttribute("value");return $APP.r(b)?b:""},set:function(b){b=b!=null&&$APP.O(b)?""+$APP.S.g(b):"";this.setAttribute("value",b);var c=$APP.l(this,"__xSearchFieldRefs");return $APP.r(c)?$APP.l(c,"input").value=b:null}})},Do=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;Object.defineProperty(a,"observedAttributes",{get:function(){return Co}});
11
+ Bo(b);zo(b,"name","name");zo(b,"placeholder","placeholder");zo(b,"label","label");zo(b,"autocomplete","autocomplete");Ao(b,"disabled","disabled");Ao(b,"required","required");b.checkValidity=function(){var c=$APP.l(this,"__xSearchFieldInternals");return $APP.r(c)?c.checkValidity():!0};b.reportValidity=function(){var c=$APP.l(this,"__xSearchFieldInternals");return $APP.r(c)?c.reportValidity():!0};b.connectedCallback=function(){if(!$APP.r($APP.l(this,"__xSearchFieldRefs"))){if(!$APP.r(this.shadowRoot)){var c=
12
12
  this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("div"),g=document.createElement("span"),h=document.createElement("input"),k=document.createElement("button");d.textContent=":host{display:block;color-scheme:light dark;--x-search-field-bg:#ffffff;--x-search-field-color:#111827;--x-search-field-border:1px solid #d1d5db;--x-search-field-border-radius:6px;--x-search-field-focus-ring-color:#2563eb;--x-search-field-icon-color:#9ca3af;--x-search-field-clear-color:#9ca3af;--x-search-field-disabled-opacity:0.45;}@media (prefers-color-scheme:dark){:host{--x-search-field-bg:#1f2937;--x-search-field-color:#f9fafb;--x-search-field-border:1px solid #4b5563;--x-search-field-focus-ring-color:#3b82f6;--x-search-field-icon-color:#6b7280;--x-search-field-clear-color:#6b7280;}}[part\x3dwrapper]{display:flex;align-items:center;position:relative;background:var(--x-search-field-bg);border:var(--x-search-field-border);border-radius:var(--x-search-field-border-radius);transition:border-color 120ms ease,box-shadow 120ms ease;}[part\x3dwrapper]:focus-within{border-color:var(--x-search-field-focus-ring-color);box-shadow:0 0 0 3px color-mix(in srgb,var(--x-search-field-focus-ring-color) 20%,transparent);}[part\x3dicon]{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:36px;color:var(--x-search-field-icon-color);pointer-events:none;}[part\x3dinput]{flex:1;min-width:0;padding:0.5rem 0.25rem;background:transparent;color:var(--x-search-field-color);border:none;outline:none;font-size:1rem;line-height:1.5;font-family:inherit;}[part\x3dinput]::-webkit-search-cancel-button{-webkit-appearance:none;}[part\x3dinput]::-webkit-search-decoration{-webkit-appearance:none;}[part\x3dclear]{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:32px;height:32px;margin-right:2px;background:none;border:none;cursor:pointer;color:var(--x-search-field-clear-color);font-size:1.125rem;line-height:1;border-radius:4px;padding:0;}[part\x3dclear]:hover{color:var(--x-search-field-color);}.clear-hidden{display:none;}:host([disabled]) [part\x3dwrapper]{opacity:var(--x-search-field-disabled-opacity);cursor:not-allowed;}:host([disabled]) [part\x3dinput]{cursor:not-allowed;}@media (prefers-reduced-motion:reduce){[part\x3dwrapper]{transition:none;}}";
13
13
  e.setAttribute("part","wrapper");g.setAttribute("part","icon");g.innerHTML='\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" width\x3d"16" height\x3d"16" viewBox\x3d"0 0 24 24" fill\x3d"none" stroke\x3d"currentColor" stroke-width\x3d"2" stroke-linecap\x3d"round" stroke-linejoin\x3d"round" aria-hidden\x3d"true"\x3e\x3ccircle cx\x3d"11" cy\x3d"11" r\x3d"8"/\x3e\x3cline x1\x3d"21" y1\x3d"21" x2\x3d"16.65" y2\x3d"16.65"/\x3e\x3c/svg\x3e';h.setAttribute("part","input");h.setAttribute("type","search");h.setAttribute("spellcheck",
14
- "false");k.setAttribute("part","clear");k.setAttribute("type","button");k.setAttribute("aria-label","Clear search");k.textContent="×";k.classList.add("clear-hidden");e.appendChild(g);e.appendChild(h);e.appendChild(k);c.appendChild(d);c.appendChild(e);this.__xSearchFieldRefs={wrapper:e,icon:g,input:h,clear:k}}$APP.n(this.attachInternals)&&(this.__xSearchFieldInternals=this.attachInternals())}Bn(this);c=$APP.l(this,"__xSearchFieldRefs");$APP.n(c)&&(c=$APP.l(c,"input"),d=this.getAttribute("value"),$APP.n(d)&&
15
- (c.value=d));c=$APP.l(this,"__xSearchFieldInternals");$APP.n(c)&&(d=c.setFormValue,e=this.getAttribute("value"),d.call(c,$APP.n(e)?e:""));d=$APP.l(this,"__xSearchFieldRefs");$APP.n(d)&&(c=$APP.l(d,"input"),d=$APP.l(d,"clear"),e=xn(this),g=yn(this),h=zn(this),k=An(this),c.addEventListener("input",e),c.addEventListener("change",g),c.addEventListener("keydown",h),d.addEventListener("click",k),this.__xSearchFieldHandlers={input:e,change:g,keydown:h,click:k});return vn(this)};b.disconnectedCallback=function(){return Bn(this)};
16
- b.attributeChangedCallback=function(c,d,e){$APP.C.h(c,"value")&&(c=$APP.l(this,"__xSearchFieldRefs"),$APP.n(c)&&(c=$APP.l(c,"input"),$APP.O(c.value,e)&&(c.value=$APP.n(e)?e:"")));return vn(this)};b.formDisabledCallback=function(c){rn(this,"disabled",$APP.J(c));return vn(this)};b.formResetCallback=function(){this.removeAttribute("value");var c=$APP.l(this,"__xSearchFieldRefs");$APP.n(c)&&($APP.l(c,"input").value="");c=$APP.l(this,"__xSearchFieldInternals");$APP.n(c)&&c.setFormValue("");return vn(this)};
17
- return a},Hn=function(){return $APP.n(customElements.get("x-search-field"))?null:customElements.define("x-search-field",Gn())};var Fn="name value placeholder label disabled required autocomplete".split(" "),un=new $APP.S(null,new $APP.R(null,2,["off",null,"on",null],null),null);$APP.ja("baredom.exports.x_search_field.init",Hn);export const init=Hn;
14
+ "false");k.setAttribute("part","clear");k.setAttribute("type","button");k.setAttribute("aria-label","Clear search");k.textContent="×";k.classList.add("clear-hidden");e.appendChild(g);e.appendChild(h);e.appendChild(k);c.appendChild(d);c.appendChild(e);this.__xSearchFieldRefs={wrapper:e,icon:g,input:h,clear:k}}$APP.r(this.attachInternals)&&(this.__xSearchFieldInternals=this.attachInternals())}yo(this);c=$APP.l(this,"__xSearchFieldRefs");$APP.r(c)&&(c=$APP.l(c,"input"),d=this.getAttribute("value"),$APP.r(d)&&
15
+ (c.value=d));c=$APP.l(this,"__xSearchFieldInternals");$APP.r(c)&&(d=c.setFormValue,e=this.getAttribute("value"),d.call(c,$APP.r(e)?e:""));d=$APP.l(this,"__xSearchFieldRefs");$APP.r(d)&&(c=$APP.l(d,"input"),d=$APP.l(d,"clear"),e=uo(this),g=vo(this),h=wo(this),k=xo(this),c.addEventListener("input",e),c.addEventListener("change",g),c.addEventListener("keydown",h),d.addEventListener("click",k),this.__xSearchFieldHandlers={input:e,change:g,keydown:h,click:k});return so(this)};b.disconnectedCallback=function(){return yo(this)};
16
+ b.attributeChangedCallback=function(c,d,e){$APP.D.i(c,"value")&&(c=$APP.l(this,"__xSearchFieldRefs"),$APP.r(c)&&(c=$APP.l(c,"input"),$APP.O(c.value,e)&&(c.value=$APP.r(e)?e:"")));return so(this)};b.formDisabledCallback=function(c){oo(this,"disabled",$APP.I(c));return so(this)};b.formResetCallback=function(){this.removeAttribute("value");var c=$APP.l(this,"__xSearchFieldRefs");$APP.r(c)&&($APP.l(c,"input").value="");c=$APP.l(this,"__xSearchFieldInternals");$APP.r(c)&&c.setFormValue("");return so(this)};
17
+ return a},Eo=function(){return $APP.r(customElements.get("x-search-field"))?null:customElements.define("x-search-field",Do())};var Co="name value placeholder label disabled required autocomplete".split(" "),ro=new $APP.R(null,new $APP.P(null,2,["off",null,"on",null],null),null);$APP.ka("baredom.exports.x_search_field.init",Eo);export const init=Eo;
package/dist/x-select.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var BH=function(a){var b=$APP.l(a,"__xSelectRefs");if($APP.n(b)){var c=new $APP.R(null,6,[$APP.ck,a.hasAttribute("disabled"),$APP.Xg,a.hasAttribute("required"),$APP.hk,a.getAttribute("size"),$APP.Qh,a.getAttribute("placeholder"),$APP.Ak,a.getAttribute("value"),$APP.Pj,a.getAttribute("name")],null);var d=$APP.N(c),e=$APP.I(d,$APP.ck),g=$APP.I(d,$APP.Xg),h=$APP.I(d,$APP.hk);c=$APP.I(d,$APP.Qh);var k=$APP.I(d,$APP.Ak);d=$APP.I(d,$APP.Pj);e=$APP.J(e);g=$APP.J(g);h=typeof h==="string"&&$APP.K(AH,h)?h:
3
- "md";c=new $APP.R(null,6,[$APP.X,e,$APP.ph,g,$APP.Wg,h,$APP.xk,c,$APP.Xh,k,$APP.si,d],null);if($APP.O(c,$APP.l(a,"__xSelectModel"))){a.__xSelectModel=c;a=$APP.l(b,"wrapper");k=$APP.l(b,"select");b=$APP.l(b,"placeholder-opt");h=$APP.X.g(c);d=$APP.ph.g(c);g=$APP.Wg.g(c);e=$APP.xk.g(c);var m=$APP.Xh.g(c);c=$APP.si.g(c);k.disabled=h;$APP.n(d)?k.setAttribute("required",""):k.removeAttribute("required");typeof c==="string"&&$APP.O(c,"")?k.setAttribute("name",c):k.removeAttribute("name");typeof e==="string"&&
4
- $APP.O(e,"")?(b.textContent=e,b.hidden=!1):b.hidden=!0;k.value=$APP.n(m)?m:"";a.setAttribute("data-size",g);$APP.n(h)?a.setAttribute("data-disabled",""):a.removeAttribute("data-disabled");return c==null||$APP.C.h(c,"")?k.setAttribute("aria-label",$APP.n(e)?e:"select"):k.removeAttribute("aria-label")}}return null},CH=function(a){var b=$APP.l(a,"__xSelectRefs");if($APP.n(b)){var c=$APP.l(b,"select"),d=$APP.l(b,"placeholder-opt");for(b=$APP.l(b,"slot").assignedElements({flatten:!0});;){var e=c.lastChild,
5
- g=e;if($APP.n($APP.n(g)?e!==d:g))c.removeChild(e);else break}d=$APP.u($APP.kc(b));b=null;for(g=e=0;;)if(g<e){var h=b.G(null,g),k=h.tagName.toLowerCase();($APP.C.h(k,"option")||$APP.C.h(k,"optgroup"))&&c.appendChild(h.cloneNode(!0));g+=1}else if(d=$APP.u(d))$APP.Cc(d)?(e=$APP.qb(d),d=$APP.rb(d),b=e,e=$APP.B(e)):(b=$APP.w(d),e=b.tagName.toLowerCase(),($APP.C.h(e,"option")||$APP.C.h(e,"optgroup"))&&c.appendChild(b.cloneNode(!0)),d=$APP.z(d),b=null,e=0),g=0;else break;a.__xSelectModel=null;return BH(a)}return null},
6
- DH=function(a){return function(){var b=$APP.l(a,"__xSelectRefs");return $APP.n(b)?(b=$APP.l(b,"select"),a.dispatchEvent(new CustomEvent("select-change",{detail:{value:b.value,label:b.selectedOptions.length>0?b.selectedOptions[0].text:""},bubbles:!0,composed:!0,cancelable:!1}))):null}},EH=function(a){return function(){return CH(a)}},FH=function(a){var b=$APP.l(a,"__xSelectRefs");if($APP.n(b)){var c=$APP.l(a,"__xSelectHandlers");if($APP.n(c)){var d=$APP.l(b,"slot");$APP.l(b,"select").removeEventListener("change",
7
- $APP.l(c,"change"));d.removeEventListener("slotchange",$APP.l(c,"slotchange"));a.__xSelectHandlers=null;return}}return null},GH=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return $APP.n($APP.J(d))?this.setAttribute(c,""):this.removeAttribute(c)}})},HH=function(a){Object.defineProperty(a,"value",{configurable:!0,enumerable:!0,get:function(){var b=this.getAttribute("value");return $APP.n(b)?b:null},set:function(b){b!=
8
- null&&$APP.O(b)?(b=""+$APP.T.g(b),b=this.setAttribute("value",b)):b=this.removeAttribute("value");return b}})},JH=function(){var a=class extends HTMLElement{},b=a.prototype;Object.defineProperty(a,"observedAttributes",{get:function(){return IH}});GH(b,"disabled","disabled");GH(b,"required","required");HH(b);b.connectedCallback=function(){if(!$APP.n($APP.l(this,"__xSelectRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("div"),g=document.createElement("select"),
2
+ var xK=function(a){var b=$APP.l(a,"__xSelectRefs");if($APP.r(b)){var c=new $APP.P(null,6,[$APP.Rk,a.hasAttribute("disabled"),$APP.sh,a.hasAttribute("required"),$APP.Yk,a.getAttribute("size"),$APP.ii,a.getAttribute("placeholder"),$APP.vl,a.getAttribute("value"),$APP.Ek,a.getAttribute("name")],null);var d=$APP.N(c),e=$APP.G(d,$APP.Rk),g=$APP.G(d,$APP.sh),h=$APP.G(d,$APP.Yk);c=$APP.G(d,$APP.ii);var k=$APP.G(d,$APP.vl);d=$APP.G(d,$APP.Ek);e=$APP.I(e);g=$APP.I(g);h=typeof h==="string"&&$APP.J(wK,h)?h:
3
+ "md";c=new $APP.P(null,6,[$APP.W,e,$APP.Lh,g,$APP.rh,h,$APP.rl,c,$APP.ui,k,$APP.Si,d],null);if($APP.O(c,$APP.l(a,"__xSelectModel"))){a.__xSelectModel=c;a=$APP.l(b,"wrapper");k=$APP.l(b,"select");b=$APP.l(b,"placeholder-opt");h=$APP.W.g(c);d=$APP.Lh.g(c);g=$APP.rh.g(c);e=$APP.rl.g(c);var m=$APP.ui.g(c);c=$APP.Si.g(c);k.disabled=h;$APP.r(d)?k.setAttribute("required",""):k.removeAttribute("required");typeof c==="string"&&$APP.O(c,"")?k.setAttribute("name",c):k.removeAttribute("name");typeof e==="string"&&
4
+ $APP.O(e,"")?(b.textContent=e,b.hidden=!1):b.hidden=!0;k.value=$APP.r(m)?m:"";a.setAttribute("data-size",g);$APP.r(h)?a.setAttribute("data-disabled",""):a.removeAttribute("data-disabled");return c==null||$APP.D.i(c,"")?k.setAttribute("aria-label",$APP.r(e)?e:"select"):k.removeAttribute("aria-label")}}return null},yK=function(a){var b=$APP.l(a,"__xSelectRefs");if($APP.r(b)){var c=$APP.l(b,"select"),d=$APP.l(b,"placeholder-opt");for(b=$APP.l(b,"slot").assignedElements({flatten:!0});;){var e=c.lastChild,
5
+ g=e;if($APP.r($APP.r(g)?e!==d:g))c.removeChild(e);else break}d=$APP.u($APP.wc(b));b=null;for(g=e=0;;)if(g<e){var h=b.G(null,g),k=h.tagName.toLowerCase();($APP.D.i(k,"option")||$APP.D.i(k,"optgroup"))&&c.appendChild(h.cloneNode(!0));g+=1}else if(d=$APP.u(d))$APP.Pc(d)?(e=$APP.yb(d),d=$APP.zb(d),b=e,e=$APP.B(e)):(b=$APP.v(d),e=b.tagName.toLowerCase(),($APP.D.i(e,"option")||$APP.D.i(e,"optgroup"))&&c.appendChild(b.cloneNode(!0)),d=$APP.z(d),b=null,e=0),g=0;else break;a.__xSelectModel=null;return xK(a)}return null},
6
+ zK=function(a){return function(){var b=$APP.l(a,"__xSelectRefs");return $APP.r(b)?(b=$APP.l(b,"select"),a.dispatchEvent(new CustomEvent("select-change",{detail:{value:b.value,label:b.selectedOptions.length>0?b.selectedOptions[0].text:""},bubbles:!0,composed:!0,cancelable:!1}))):null}},AK=function(a){return function(){return yK(a)}},BK=function(a){var b=$APP.l(a,"__xSelectRefs");if($APP.r(b)){var c=$APP.l(a,"__xSelectHandlers");if($APP.r(c)){var d=$APP.l(b,"slot");$APP.l(b,"select").removeEventListener("change",
7
+ $APP.l(c,"change"));d.removeEventListener("slotchange",$APP.l(c,"slotchange"));a.__xSelectHandlers=null;return}}return null},CK=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return $APP.r($APP.I(d))?this.setAttribute(c,""):this.removeAttribute(c)}})},DK=function(a){Object.defineProperty(a,"value",{configurable:!0,enumerable:!0,get:function(){var b=this.getAttribute("value");return $APP.r(b)?b:null},set:function(b){b!=
8
+ null&&$APP.O(b)?(b=""+$APP.S.g(b),b=this.setAttribute("value",b)):b=this.removeAttribute("value");return b}})},FK=function(){var a=class extends HTMLElement{},b=a.prototype;Object.defineProperty(a,"observedAttributes",{get:function(){return EK}});CK(b,"disabled","disabled");CK(b,"required","required");DK(b);b.connectedCallback=function(){if(!$APP.r($APP.l(this,"__xSelectRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("div"),g=document.createElement("select"),
9
9
  h=document.createElement("option"),k=document.createElement("span"),m=document.createElement("slot");d.textContent=":host{display:inline-block;color-scheme:light dark;--x-select-height-sm:2rem;--x-select-height-md:2.5rem;--x-select-height-lg:3rem;--x-select-radius:0.5rem;--x-select-font-size-sm:0.75rem;--x-select-font-size-md:0.875rem;--x-select-font-size-lg:1rem;--x-select-padding-inline:0.75rem;--x-select-bg:#ffffff;--x-select-bg-disabled:#f8fafc;--x-select-fg:#0f172a;--x-select-fg-disabled:#94a3b8;--x-select-placeholder-fg:#94a3b8;--x-select-border:#cbd5e1;--x-select-border-hover:#94a3b8;--x-select-border-focus:#3b82f6;--x-select-chevron:#64748b;--x-select-focus-ring:#93c5fd;--x-select-shadow:0 1px 2px rgba(15,23,42,0.06);--x-select-transition-duration:140ms;}@media (prefers-color-scheme:dark){:host{--x-select-bg:#1f2937;--x-select-bg-disabled:#111827;--x-select-fg:#f1f5f9;--x-select-border:#374151;--x-select-border-hover:#4b5563;--x-select-border-focus:#60a5fa;--x-select-chevron:#94a3b8;}}[part\x3dwrapper]{position:relative;display:flex;align-items:stretch;height:var(--x-select-height-md);border:1px solid var(--x-select-border);border-radius:var(--x-select-radius);background:var(--x-select-bg);box-shadow:var(--x-select-shadow);transition:border-color var(--x-select-transition-duration) ease,box-shadow var(--x-select-transition-duration) ease;overflow:hidden;font-size:var(--x-select-font-size-md);}[part\x3dwrapper][data-size\x3dsm]{height:var(--x-select-height-sm);font-size:var(--x-select-font-size-sm);}[part\x3dwrapper][data-size\x3dlg]{height:var(--x-select-height-lg);font-size:var(--x-select-font-size-lg);}[part\x3dwrapper][data-disabled]{background:var(--x-select-bg-disabled);opacity:0.6;pointer-events:none;}[part\x3dwrapper]:hover:not([data-disabled]){border-color:var(--x-select-border-hover);}[part\x3dwrapper]:focus-within:not([data-disabled]){border-color:var(--x-select-border-focus);box-shadow:0 0 0 3px var(--x-select-focus-ring);}[part\x3dselect]{appearance:none;-webkit-appearance:none;flex:1;min-width:0;background:transparent;border:none;outline:none;color:var(--x-select-fg);font-size:inherit;font-family:inherit;padding-inline:var(--x-select-padding-inline);padding-inline-end:calc(var(--x-select-padding-inline) + 1.75rem);cursor:pointer;width:100%;}[part\x3dselect]:disabled{color:var(--x-select-fg-disabled);cursor:default;}[part\x3dselect] option[data-placeholder]{color:var(--x-select-placeholder-fg);}[part\x3dchevron]{position:absolute;right:var(--x-select-padding-inline);top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;pointer-events:none;color:var(--x-select-chevron);width:1rem;height:1rem;}slot{display:none;}@media (prefers-reduced-motion:reduce){[part\x3dwrapper]{transition:none;}}";
10
10
  e.setAttribute("part","wrapper");g.setAttribute("part","select");k.setAttribute("part","chevron");k.setAttribute("aria-hidden","true");h.setAttribute("data-placeholder","");h.setAttribute("value","");h.hidden=!0;h.disabled=!0;h.selected=!0;k.innerHTML='\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"none" stroke\x3d"currentColor" stroke-width\x3d"2" stroke-linecap\x3d"round" stroke-linejoin\x3d"round" aria-hidden\x3d"true"\x3e\x3cpolyline points\x3d"4 6 8 10 12 6"/\x3e\x3c/svg\x3e';
11
- g.appendChild(h);e.appendChild(g);e.appendChild(k);c.appendChild(d);c.appendChild(e);c.appendChild(m);this.__xSelectRefs={root:c,wrapper:e,select:g,"placeholder-opt":h,slot:m,chevron:k}}FH(this);c=$APP.l(this,"__xSelectRefs");$APP.n(c)&&(d=$APP.l(c,"slot"),e=DH(this),g=EH(this),h={change:e,slotchange:g},$APP.l(c,"select").addEventListener("change",e),d.addEventListener("slotchange",g),this.__xSelectHandlers=h);CH(this);return BH(this)};b.disconnectedCallback=function(){return FH(this)};b.attributeChangedCallback=
12
- function(c,d,e){return $APP.O(d,e)?BH(this):null};return a},KH=function(){return $APP.n(customElements.get("x-select"))?null:customElements.define("x-select",JH())};var AH=new $APP.S(null,new $APP.R(null,3,["md",null,"lg",null,"sm",null],null),null),IH="disabled required size placeholder value name".split(" ");$APP.Ed(["select-change",new $APP.R(null,2,[$APP.rk,!1,$APP.V,new $APP.R(null,2,[$APP.Xh,$APP.Y,$APP.U,$APP.Y],null)],null)]);$APP.ja("baredom.exports.x_select.init",KH);export const init=KH;
11
+ g.appendChild(h);e.appendChild(g);e.appendChild(k);c.appendChild(d);c.appendChild(e);c.appendChild(m);this.__xSelectRefs={root:c,wrapper:e,select:g,"placeholder-opt":h,slot:m,chevron:k}}BK(this);c=$APP.l(this,"__xSelectRefs");$APP.r(c)&&(d=$APP.l(c,"slot"),e=zK(this),g=AK(this),h={change:e,slotchange:g},$APP.l(c,"select").addEventListener("change",e),d.addEventListener("slotchange",g),this.__xSelectHandlers=h);yK(this);return xK(this)};b.disconnectedCallback=function(){return BK(this)};b.attributeChangedCallback=
12
+ function(c,d,e){return $APP.O(d,e)?xK(this):null};return a},GK=function(){return $APP.r(customElements.get("x-select"))?null:customElements.define("x-select",FK())};var wK=new $APP.R(null,new $APP.P(null,3,["md",null,"lg",null,"sm",null],null),null),EK="disabled required size placeholder value name".split(" ");$APP.Sd(["select-change",new $APP.P(null,2,[$APP.kl,!1,$APP.U,new $APP.P(null,2,[$APP.ui,$APP.Y,$APP.T,$APP.Y],null)],null)]);$APP.ka("baredom.exports.x_select.init",GK);export const init=GK;
package/dist/x-sidebar.js CHANGED
@@ -1,18 +1,18 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var QQ=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},RQ=function(a,b,c){a.dispatchEvent(new CustomEvent(b,$APP.Sg(new $APP.R(null,3,[$APP.V,c,$APP.Ck,!0,$APP.Mk,!0],null))))},TQ=function(a,b){$APP.K(SQ,b)&&RQ(a,"dismiss",new $APP.R(null,1,[$APP.Rh,b],null))},UQ=function(a){var b=window.getComputedStyle(a);return $APP.O("none",b.display)&&$APP.O("hidden",b.visibility)&&a.offsetWidth>0&&a.offsetHeight>0},VQ=function(a){var b=$APP.l(a,"_panel");$APP.n(b.hasAttribute("tabindex"))||
3
- (b.setAttribute("tabindex","-1"),a._panelTabindexAdded=!0);return b.focus()},WQ=function(a){var b=$APP.l(a,"_restoreFocusTarget"),c=$APP.l(a,"_panel"),d=$APP.l(a,"_panelTabindexAdded")===!0,e=$APP.l(a,"_root");var g=$APP.l(a,"_sidebar");e=$APP.n(e)?e.activeElement:null;var h=document.activeElement;g=$APP.n($APP.n(e)?$APP.n(g)?g.contains(e):g:e)?e:$APP.n($APP.n(h)?$APP.n(g)?g.contains(h):g:h)?h:null;$APP.n(g)&&g.blur();a._tabbables=null;a._restoreFocusTarget=null;$APP.n($APP.n(c)?d:c)&&(c.removeAttribute("tabindex"),
4
- a._panelTabindexAdded=!1);return $APP.n($APP.n(b)?b.isConnected:b)?b.focus():null},XQ=function(a,b){var c=$APP.l(a,"_tabbables");c=$APP.n(c)?$APP.ke($APP.kc(c)):$APP.Td;var d=$APP.l(a,"_panel");if($APP.wc(c))return b.preventDefault(),$APP.n(d)?VQ(a):null;a=document.activeElement;d=$APP.w(c);c=$APP.nc(c);var e=b.shiftKey;return $APP.n($APP.n(e)?$APP.C.h(a,d):e)?(b.preventDefault(),c.focus()):$APP.r(e)&&$APP.C.h(a,c)?(b.preventDefault(),d.focus()):null},YQ=function(a){if(!$APP.n($APP.l(a,"_root"))){var b=
2
+ var BV=function(a,b,c){return $APP.r(c)?a.setAttribute(b,""):a.removeAttribute(b)},CV=function(a,b,c){a.dispatchEvent(new CustomEvent(b,$APP.nh(new $APP.P(null,3,[$APP.U,c,$APP.xl,!0,$APP.Jl,!0],null))))},EV=function(a,b){$APP.J(DV,b)&&CV(a,"dismiss",new $APP.P(null,1,[$APP.ji,b],null))},FV=function(a){var b=window.getComputedStyle(a);return $APP.O("none",b.display)&&$APP.O("hidden",b.visibility)&&a.offsetWidth>0&&a.offsetHeight>0},GV=function(a){var b=$APP.l(a,"_panel");$APP.r(b.hasAttribute("tabindex"))||
3
+ (b.setAttribute("tabindex","-1"),a._panelTabindexAdded=!0);return b.focus()},HV=function(a){var b=$APP.l(a,"_restoreFocusTarget"),c=$APP.l(a,"_panel"),d=$APP.l(a,"_panelTabindexAdded")===!0,e=$APP.l(a,"_root");var g=$APP.l(a,"_sidebar");e=$APP.r(e)?e.activeElement:null;var h=document.activeElement;g=$APP.r($APP.r(e)?$APP.r(g)?g.contains(e):g:e)?e:$APP.r($APP.r(h)?$APP.r(g)?g.contains(h):g:h)?h:null;$APP.r(g)&&g.blur();a._tabbables=null;a._restoreFocusTarget=null;$APP.r($APP.r(c)?d:c)&&(c.removeAttribute("tabindex"),
4
+ a._panelTabindexAdded=!1);return $APP.r($APP.r(b)?b.isConnected:b)?b.focus():null},IV=function(a,b){var c=$APP.l(a,"_tabbables");c=$APP.r(c)?$APP.Be($APP.wc(c)):$APP.ie;var d=$APP.l(a,"_panel");if($APP.Jc(c))return b.preventDefault(),$APP.r(d)?GV(a):null;a=document.activeElement;d=$APP.v(c);c=$APP.zc(c);var e=b.shiftKey;return $APP.r($APP.r(e)?$APP.D.i(a,d):e)?(b.preventDefault(),c.focus()):$APP.t(e)&&$APP.D.i(a,c)?(b.preventDefault(),d.focus()):null},JV=function(a){if(!$APP.r($APP.l(a,"_root"))){var b=
5
5
  a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("aside"),g=document.createElement("div"),h=document.createElement("slot");c.textContent=":host { --x-sidebar-bg: Canvas; --x-sidebar-fg: CanvasText; --x-sidebar-backdrop: rgb(0 0 0 / 0.4); --x-sidebar-shadow: 0 8px 24px rgb(0 0 0 / 0.18); --x-sidebar-width: 18rem; --x-sidebar-collapsed-width: 4rem; --x-sidebar-duration: 180ms; --x-sidebar-easing: ease; display: block; position: relative;}:host([hidden]) { display: none; }.backdrop[hidden] { display: none; }.backdrop { position: fixed; inset: 0; background: var(--x-sidebar-backdrop); opacity: 0; z-index: 999; pointer-events: none; transition: opacity var(--x-sidebar-duration) var(--x-sidebar-easing);}.backdrop[data-active\x3d'true'] { opacity: 1; pointer-events: auto;}.sidebar { position: relative; color: var(--x-sidebar-fg); block-size: 100%;}.panel { background: var(--x-sidebar-bg); color: var(--x-sidebar-fg); inline-size: var(--x-sidebar-width); min-block-size: 100%; overflow: hidden; box-shadow: var(--x-sidebar-shadow); will-change: transform, inline-size; transition: transform var(--x-sidebar-duration) var(--x-sidebar-easing), inline-size var(--x-sidebar-duration) var(--x-sidebar-easing), opacity var(--x-sidebar-duration) var(--x-sidebar-easing);}:host([data-effective-variant\x3d'docked']) .panel[data-collapsed\x3d'true'] { inline-size: var(--x-sidebar-collapsed-width);}:host([data-effective-variant\x3d'overlay']) .sidebar,:host([data-effective-variant\x3d'modal']) .sidebar { position: fixed; inset-block: 0; z-index: 1000; pointer-events: none;}:host([data-effective-variant\x3d'overlay'][data-open\x3d'true']) .sidebar,:host([data-effective-variant\x3d'modal'][data-open\x3d'true']) .sidebar { pointer-events: auto;}:host([data-effective-variant\x3d'overlay'][data-placement\x3d'left']) .sidebar,:host([data-effective-variant\x3d'modal'][data-placement\x3d'left']) .sidebar { inset-inline-start: 0;}:host([data-effective-variant\x3d'overlay'][data-placement\x3d'right']) .sidebar,:host([data-effective-variant\x3d'modal'][data-placement\x3d'right']) .sidebar { inset-inline-end: 0;}:host([data-effective-variant\x3d'overlay'][data-placement\x3d'left']) .panel[data-open\x3d'false'],:host([data-effective-variant\x3d'modal'][data-placement\x3d'left']) .panel[data-open\x3d'false'] { transform: translateX(-100%); pointer-events: none;}:host([data-effective-variant\x3d'overlay'][data-placement\x3d'right']) .panel[data-open\x3d'false'],:host([data-effective-variant\x3d'modal'][data-placement\x3d'right']) .panel[data-open\x3d'false'] { transform: translateX(100%); pointer-events: none;}:host([data-effective-variant\x3d'overlay']) .panel[data-open\x3d'true'],:host([data-effective-variant\x3d'modal']) .panel[data-open\x3d'true'] { transform: translateX(0); pointer-events: auto;}:host([data-reduced-motion\x3d'true']) .panel,:host([data-reduced-motion\x3d'true']) .backdrop { transition: none;}@media (prefers-color-scheme: dark) { :host { --x-sidebar-shadow: 0 8px 24px rgb(0 0 0 / 0.4); }}";
6
- d.className="backdrop";d.setAttribute("part","backdrop");d.hidden=!0;e.className="sidebar";e.setAttribute("part","sidebar");g.className="panel";g.setAttribute("part","panel");g.appendChild(h);e.appendChild(g);b.appendChild(c);b.appendChild(d);b.appendChild(e);a._root=b;a._backdrop=d;a._sidebar=e;a._panel=g;a._slot=h}},tR=function(a){YQ(a);var b=$APP.l(a,"_prevState");b=$APP.n(b)?b:$APP.Fd;var c=a.hasAttribute("open"),d=a.hasAttribute("collapsed"),e=a.getAttribute("placement"),g=a.getAttribute("variant"),
7
- h=a.getAttribute("breakpoint"),k=a.getAttribute("label"),m=window.innerWidth,p=window.matchMedia("(prefers-reduced-motion: reduce)");c=$APP.N(new $APP.R(null,8,[ZQ,c,$Q,d,aR,e,bR,g,cR,h,dR,k,eR,m,fR,$APP.J(p.matches)],null));k=$APP.I(c,ZQ);h=$APP.I(c,$Q);d=$APP.I(c,aR);e=$APP.I(c,bR);m=$APP.I(c,cR);p=$APP.I(c,dR);g=$APP.I(c,eR);c=$APP.I(c,fR);d=$APP.K(gR,d)?d:$APP.Ei.g(hR);e=$APP.K(iR,e)?e:$APP.jh.g(hR);var q=$APP.di.g(hR);m=m==null?null:""+$APP.T.g(m);m=m==null?null:(0,$APP.yg)(m);$APP.u(m)?(m=Number(m),
8
- m=$APP.n(Number.isFinite(m))?m:q):m=q;p=p!=null?(0,$APP.yg)(p):null;p=$APP.u(p)?p:null;p=$APP.n(p)?p:$APP.U.g(hR);k=$APP.N(new $APP.R(null,1,[ZQ,k],null));k=$APP.I(k,ZQ);k=$APP.J(k);h=$APP.J(h);g=g<m?"modal":e;q=$APP.C.h(g,"modal");var v=$APP.C.h(g,"overlay"),x=$APP.C.h(g,"docked");c=$APP.mf([$APP.pk,jR,kR,lR,$APP.di,mR,nR,oR,pR,$APP.U,$APP.Ei,qR,rR,sR],[k,g,!k,x&&h,m,x,h,e,k&&(q||v),p,d,$APP.J(c),q,v]);k=$APP.N(c);d=$APP.I(k,jR);e=$APP.I(k,$APP.Ei);g=$APP.I(k,$APP.pk);h=$APP.I(k,lR);k=$APP.I(k,qR);
9
- a.setAttribute("data-effective-variant",d);a.setAttribute("data-placement",e);a.setAttribute("data-open",$APP.n(g)?"true":"false");a.setAttribute("data-collapsed",$APP.n(h)?"true":"false");a.setAttribute("data-reduced-motion",$APP.n(k)?"true":"false");d=rR.g(c);$APP.n(d)&&(d=$APP.pk.g(c),$APP.n(d)&&(d=rR.g(b),d=$APP.n(d)?$APP.pk.g(b):d,d=$APP.r(d)));$APP.n(d)?(d=$APP.ke($APP.Rd(UQ,$APP.kc($APP.l(a,"_panel").querySelectorAll("a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex\x3d'-1'])")))),
10
- a._restoreFocusTarget=document.activeElement,e=$APP.Sg(d),a._tabbables=e,$APP.u(d)?$APP.w(d).focus():VQ(a)):(d=rR.g(b),$APP.n(d)&&(d=$APP.pk.g(b),$APP.n(d)&&(d=rR.g(c),d=$APP.n(d)?$APP.pk.g(c):d,d=$APP.r(d))),$APP.n(d)&&WQ(a));e=$APP.N(c);d=$APP.I(e,$APP.U);e=$APP.I(e,kR);g=$APP.l(a,"_sidebar");$APP.n(g)&&(g.setAttribute("role","navigation"),g.setAttribute("aria-label",d),g.setAttribute("aria-hidden",$APP.n(e)?"true":"false"));d=$APP.N(c);d=$APP.I(d,pR);e=$APP.l(a,"_backdrop");$APP.n(e)&&(e.setAttribute("data-active",
11
- $APP.n(d)?"true":"false"),e.hidden=$APP.r(d),e.inert!=null&&(e.inert=$APP.r(d)));h=$APP.N(c);d=$APP.I(h,$APP.pk);e=$APP.I(h,$APP.Ei);g=$APP.I(h,jR);h=$APP.I(h,lR);k=$APP.l(a,"_panel");$APP.n(k)&&(k.setAttribute("data-open",$APP.n(d)?"true":"false"),k.setAttribute("data-placement",e),k.setAttribute("data-variant",g),k.setAttribute("data-collapsed",$APP.n(h)?"true":"false"));$APP.O($APP.pk.g(b),$APP.pk.g(c))&&(b=$APP.pk.g(c),RQ(a,"toggle",new $APP.R(null,1,[$APP.pk,$APP.J(b)],null)));a._prevState=c},
12
- uR=function(a,b){var c=$APP.l(a,"_prevState"),d=b.key;return $APP.n(function(){var e=rR.g(c);e=$APP.n(e)?e:sR.g(c);return $APP.n(e)?$APP.pk.g(c):e}())?$APP.C.h(d,"Escape")?(b.preventDefault(),TQ(a,"escape"),QQ(a,"open",!1)):$APP.n(function(){var e=rR.g(c);return $APP.n(e)?$APP.C.h(d,"Tab"):e}())?XQ(a,b):null:null},vR=function(a){$APP.n($APP.l(a,"_handlers"))||$APP.ma(a,"_handlers",{onBackdropClick:function(b){var c=$APP.l(a,"_prevState"),d=$APP.l(a,"_backdrop");var e=rR.g(c);e=$APP.n(e)?e:sR.g(c);
13
- $APP.n(e)?(c=$APP.pk.g(c),b=$APP.n(c)?$APP.C.h(b.target,d):c):b=e;$APP.n(b)?(TQ(a,"backdrop"),b=QQ(a,"open",!1)):b=null;return b},onKeydown:function(b){return uR(a,b)},onResize:function(){return tR(a)}})},wR=function(a){Object.defineProperty(a,"open",{get:function(){return this.hasAttribute("open")},set:function(b){return QQ(this,"open",$APP.J(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"collapsed",{get:function(){return this.hasAttribute("collapsed")},set:function(b){return QQ(this,
14
- "collapsed",$APP.J(b))},enumerable:!0,configurable:!0})},yR=function(){var a=class extends HTMLElement{};a.observedAttributes=xR;a.prototype.connectedCallback=function(){YQ(this);vR(this);if($APP.l(this,"_listening")!==!0){var b=$APP.l(this,"_handlers"),c=$APP.l(this,"_backdrop"),d=$APP.l(this,"_root");$APP.n($APP.n(c)?b:c)&&c.addEventListener("click",$APP.l(b,"onBackdropClick"));$APP.n($APP.n(d)?b:d)&&d.addEventListener("keydown",$APP.l(b,"onKeydown"));$APP.n(b)&&window.addEventListener("resize",
15
- $APP.l(b,"onResize"));this._listening=!0}return tR(this)};a.prototype.disconnectedCallback=function(){if($APP.l(this,"_listening")===!0){var b=$APP.l(this,"_handlers"),c=$APP.l(this,"_backdrop"),d=$APP.l(this,"_root");$APP.n($APP.n(c)?b:c)&&c.removeEventListener("click",$APP.l(b,"onBackdropClick"));$APP.n($APP.n(d)?b:d)&&d.removeEventListener("keydown",$APP.l(b,"onKeydown"));$APP.n(b)&&window.removeEventListener("resize",$APP.l(b,"onResize"));this._listening=!1}return WQ(this)};a.prototype.attributeChangedCallback=
16
- function(b,c,d){return $APP.O(c,d)?tR(this):null};wR(a.prototype);return a},zR=function(){return $APP.n(customElements.get("x-sidebar"))?null:customElements.define("x-sidebar",yR())},oR=new $APP.M(null,"declared-variant","declared-variant",-2054964950),eR=new $APP.M(null,"viewport-width","viewport-width",-1146235948),kR=new $APP.M(null,"aria-hidden","aria-hidden",399337029),nR=new $APP.M(null,"collapsed-requested","collapsed-requested",1573505800),pR=new $APP.M(null,"show-backdrop","show-backdrop",
17
- -532209910),$Q=new $APP.M(null,"collapsed-attr","collapsed-attr",-1535396832),aR=new $APP.M(null,"placement-attr","placement-attr",-1321967286),ZQ=new $APP.M(null,"open-attr","open-attr",-1772289801),AR=new $APP.M(null,"collapsed","collapsed",-628494523),fR=new $APP.M(null,"prefers-reduced-motion","prefers-reduced-motion",-2023150975),cR=new $APP.M(null,"breakpoint-attr","breakpoint-attr",-250275627),bR=new $APP.M(null,"variant-attr","variant-attr",-1143729279),jR=new $APP.M(null,"effective-variant",
18
- "effective-variant",-829495195),qR=new $APP.M(null,"reduced-motion","reduced-motion",79621277),mR=new $APP.M(null,"is-docked","is-docked",875310728),rR=new $APP.M(null,"is-modal","is-modal",1610761086),sR=new $APP.M(null,"is-overlay","is-overlay",1953921119),dR=new $APP.M(null,"label-attr","label-attr",-571749887),lR=new $APP.M(null,"collapsed-applied","collapsed-applied",-1696231706);var xR="open collapsed placement variant breakpoint label".split(" "),gR=$APP.Kf(["right","left"]),iR=$APP.Kf(["overlay","docked","modal"]),SQ=$APP.Kf(["backdrop","escape"]),hR=new $APP.R(null,6,[$APP.Ei,"left",$APP.jh,"docked",$APP.di,768,$APP.U,"Sidebar",$APP.pk,!1,AR,!1],null);$APP.Ed(["toggle",new $APP.R(null,1,[$APP.V,new $APP.R(null,1,[$APP.pk,$APP.Ni],null)],null),"dismiss",new $APP.R(null,1,[$APP.V,new $APP.R(null,1,[$APP.Rh,$APP.Y],null)],null)]);$APP.ja("baredom.exports.x_sidebar.init",zR);export const init=zR;
6
+ d.className="backdrop";d.setAttribute("part","backdrop");d.hidden=!0;e.className="sidebar";e.setAttribute("part","sidebar");g.className="panel";g.setAttribute("part","panel");g.appendChild(h);e.appendChild(g);b.appendChild(c);b.appendChild(d);b.appendChild(e);a._root=b;a._backdrop=d;a._sidebar=e;a._panel=g;a._slot=h}},eW=function(a){JV(a);var b=$APP.l(a,"_prevState");b=$APP.r(b)?b:$APP.Td;var c=a.hasAttribute("open"),d=a.hasAttribute("collapsed"),e=a.getAttribute("placement"),g=a.getAttribute("variant"),
7
+ h=a.getAttribute("breakpoint"),k=a.getAttribute("label"),m=window.innerWidth,p=window.matchMedia("(prefers-reduced-motion: reduce)");c=$APP.N(new $APP.P(null,8,[KV,c,LV,d,MV,e,NV,g,OV,h,PV,k,QV,m,RV,$APP.I(p.matches)],null));k=$APP.G(c,KV);h=$APP.G(c,LV);d=$APP.G(c,MV);e=$APP.G(c,NV);m=$APP.G(c,OV);p=$APP.G(c,PV);g=$APP.G(c,QV);c=$APP.G(c,RV);d=$APP.J(SV,d)?d:$APP.hj.g(TV);e=$APP.J(UV,e)?e:$APP.Fh.g(TV);var q=$APP.Di.g(TV);m=m==null?null:""+$APP.S.g(m);m=m==null?null:(0,$APP.Qg)(m);$APP.u(m)?(m=Number(m),
8
+ m=$APP.r(Number.isFinite(m))?m:q):m=q;p=p!=null?(0,$APP.Qg)(p):null;p=$APP.u(p)?p:null;p=$APP.r(p)?p:$APP.T.g(TV);k=$APP.N(new $APP.P(null,1,[KV,k],null));k=$APP.G(k,KV);k=$APP.I(k);h=$APP.I(h);g=g<m?"modal":e;q=$APP.D.i(g,"modal");var w=$APP.D.i(g,"overlay"),x=$APP.D.i(g,"docked");c=$APP.Q([$APP.hl,VV,WV,XV,$APP.Di,YV,ZV,$V,aW,$APP.T,$APP.hj,bW,cW,dW],[k,g,!k,x&&h,m,x,h,e,k&&(q||w),p,d,$APP.I(c),q,w]);k=$APP.N(c);d=$APP.G(k,VV);e=$APP.G(k,$APP.hj);g=$APP.G(k,$APP.hl);h=$APP.G(k,XV);k=$APP.G(k,bW);
9
+ a.setAttribute("data-effective-variant",d);a.setAttribute("data-placement",e);a.setAttribute("data-open",$APP.r(g)?"true":"false");a.setAttribute("data-collapsed",$APP.r(h)?"true":"false");a.setAttribute("data-reduced-motion",$APP.r(k)?"true":"false");d=cW.g(c);$APP.r(d)&&(d=$APP.hl.g(c),$APP.r(d)&&(d=cW.g(b),d=$APP.r(d)?$APP.hl.g(b):d,d=$APP.t(d)));$APP.r(d)?(d=$APP.Be($APP.ge(FV,$APP.wc($APP.l(a,"_panel").querySelectorAll("a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex\x3d'-1'])")))),
10
+ a._restoreFocusTarget=document.activeElement,e=$APP.nh(d),a._tabbables=e,$APP.u(d)?$APP.v(d).focus():GV(a)):(d=cW.g(b),$APP.r(d)&&(d=$APP.hl.g(b),$APP.r(d)&&(d=cW.g(c),d=$APP.r(d)?$APP.hl.g(c):d,d=$APP.t(d))),$APP.r(d)&&HV(a));e=$APP.N(c);d=$APP.G(e,$APP.T);e=$APP.G(e,WV);g=$APP.l(a,"_sidebar");$APP.r(g)&&(g.setAttribute("role","navigation"),g.setAttribute("aria-label",d),g.setAttribute("aria-hidden",$APP.r(e)?"true":"false"));d=$APP.N(c);d=$APP.G(d,aW);e=$APP.l(a,"_backdrop");$APP.r(e)&&(e.setAttribute("data-active",
11
+ $APP.r(d)?"true":"false"),e.hidden=$APP.t(d),e.inert!=null&&(e.inert=$APP.t(d)));h=$APP.N(c);d=$APP.G(h,$APP.hl);e=$APP.G(h,$APP.hj);g=$APP.G(h,VV);h=$APP.G(h,XV);k=$APP.l(a,"_panel");$APP.r(k)&&(k.setAttribute("data-open",$APP.r(d)?"true":"false"),k.setAttribute("data-placement",e),k.setAttribute("data-variant",g),k.setAttribute("data-collapsed",$APP.r(h)?"true":"false"));$APP.O($APP.hl.g(b),$APP.hl.g(c))&&(b=$APP.hl.g(c),CV(a,"toggle",new $APP.P(null,1,[$APP.hl,$APP.I(b)],null)));a._prevState=c},
12
+ fW=function(a,b){var c=$APP.l(a,"_prevState"),d=b.key;return $APP.r(function(){var e=cW.g(c);e=$APP.r(e)?e:dW.g(c);return $APP.r(e)?$APP.hl.g(c):e}())?$APP.D.i(d,"Escape")?(b.preventDefault(),EV(a,"escape"),BV(a,"open",!1)):$APP.r(function(){var e=cW.g(c);return $APP.r(e)?$APP.D.i(d,"Tab"):e}())?IV(a,b):null:null},gW=function(a){$APP.r($APP.l(a,"_handlers"))||$APP.n(a,"_handlers",{onBackdropClick:function(b){var c=$APP.l(a,"_prevState"),d=$APP.l(a,"_backdrop");var e=cW.g(c);e=$APP.r(e)?e:dW.g(c);
13
+ $APP.r(e)?(c=$APP.hl.g(c),b=$APP.r(c)?$APP.D.i(b.target,d):c):b=e;$APP.r(b)?(EV(a,"backdrop"),b=BV(a,"open",!1)):b=null;return b},onKeydown:function(b){return fW(a,b)},onResize:function(){return eW(a)}})},hW=function(a){Object.defineProperty(a,"open",{get:function(){return this.hasAttribute("open")},set:function(b){return BV(this,"open",$APP.I(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"collapsed",{get:function(){return this.hasAttribute("collapsed")},set:function(b){return BV(this,
14
+ "collapsed",$APP.I(b))},enumerable:!0,configurable:!0})},jW=function(){var a=class extends HTMLElement{};a.observedAttributes=iW;a.prototype.connectedCallback=function(){JV(this);gW(this);if($APP.l(this,"_listening")!==!0){var b=$APP.l(this,"_handlers"),c=$APP.l(this,"_backdrop"),d=$APP.l(this,"_root");$APP.r($APP.r(c)?b:c)&&c.addEventListener("click",$APP.l(b,"onBackdropClick"));$APP.r($APP.r(d)?b:d)&&d.addEventListener("keydown",$APP.l(b,"onKeydown"));$APP.r(b)&&window.addEventListener("resize",
15
+ $APP.l(b,"onResize"));this._listening=!0}return eW(this)};a.prototype.disconnectedCallback=function(){if($APP.l(this,"_listening")===!0){var b=$APP.l(this,"_handlers"),c=$APP.l(this,"_backdrop"),d=$APP.l(this,"_root");$APP.r($APP.r(c)?b:c)&&c.removeEventListener("click",$APP.l(b,"onBackdropClick"));$APP.r($APP.r(d)?b:d)&&d.removeEventListener("keydown",$APP.l(b,"onKeydown"));$APP.r(b)&&window.removeEventListener("resize",$APP.l(b,"onResize"));this._listening=!1}return HV(this)};a.prototype.attributeChangedCallback=
16
+ function(b,c,d){return $APP.O(c,d)?eW(this):null};hW(a.prototype);return a},kW=function(){return $APP.r(customElements.get("x-sidebar"))?null:customElements.define("x-sidebar",jW())},$V=new $APP.M(null,"declared-variant","declared-variant",-2054964950),QV=new $APP.M(null,"viewport-width","viewport-width",-1146235948),WV=new $APP.M(null,"aria-hidden","aria-hidden",399337029),ZV=new $APP.M(null,"collapsed-requested","collapsed-requested",1573505800),aW=new $APP.M(null,"show-backdrop","show-backdrop",
17
+ -532209910),LV=new $APP.M(null,"collapsed-attr","collapsed-attr",-1535396832),MV=new $APP.M(null,"placement-attr","placement-attr",-1321967286),KV=new $APP.M(null,"open-attr","open-attr",-1772289801),lW=new $APP.M(null,"collapsed","collapsed",-628494523),RV=new $APP.M(null,"prefers-reduced-motion","prefers-reduced-motion",-2023150975),OV=new $APP.M(null,"breakpoint-attr","breakpoint-attr",-250275627),NV=new $APP.M(null,"variant-attr","variant-attr",-1143729279),VV=new $APP.M(null,"effective-variant",
18
+ "effective-variant",-829495195),bW=new $APP.M(null,"reduced-motion","reduced-motion",79621277),YV=new $APP.M(null,"is-docked","is-docked",875310728),cW=new $APP.M(null,"is-modal","is-modal",1610761086),dW=new $APP.M(null,"is-overlay","is-overlay",1953921119),PV=new $APP.M(null,"label-attr","label-attr",-571749887),XV=new $APP.M(null,"collapsed-applied","collapsed-applied",-1696231706);var iW="open collapsed placement variant breakpoint label".split(" "),SV=$APP.Yf(["right","left"]),UV=$APP.Yf(["overlay","docked","modal"]),DV=$APP.Yf(["backdrop","escape"]),TV=new $APP.P(null,6,[$APP.hj,"left",$APP.Fh,"docked",$APP.Di,768,$APP.T,"Sidebar",$APP.hl,!1,lW,!1],null);$APP.Sd(["toggle",new $APP.P(null,1,[$APP.U,new $APP.P(null,1,[$APP.hl,$APP.qj],null)],null),"dismiss",new $APP.P(null,1,[$APP.U,new $APP.P(null,1,[$APP.ji,$APP.Y],null)],null)]);$APP.ka("baredom.exports.x_sidebar.init",kW);export const init=kW;
@@ -1,7 +1,7 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var LH=function(a){return typeof a==="string"&&$APP.O("",a)?a:null},OH=function(a){var b=new $APP.R(null,4,[$APP.jh,a.getAttribute("variant"),$APP.oi,a.getAttribute("animation"),$APP.lj,a.getAttribute("width"),$APP.Mi,a.getAttribute("height")],null);var c=$APP.N(b),d=$APP.I(c,$APP.jh),e=$APP.I(c,$APP.oi);b=$APP.I(c,$APP.lj);c=$APP.I(c,$APP.Mi);d=typeof d==="string"&&$APP.K(MH,d)?d:"rect";e=typeof e==="string"&&$APP.K(NH,e)?e:"pulse";b=new $APP.R(null,4,[$APP.jh,d,$APP.oi,e,$APP.lj,LH(b),$APP.Mi,LH(c)],
3
- null);d=$APP.N(b);b=$APP.I(d,$APP.jh);e=$APP.I(d,$APP.oi);c=$APP.I(d,$APP.lj);d=$APP.I(d,$APP.Mi);var g=$APP.l(a,"__xSkeletonBase");g.setAttribute("data-variant",b);g.setAttribute("data-animation",e);$APP.n(c)?g.style.setProperty("width",c):g.style.removeProperty("width");$APP.n(d)?g.style.setProperty("height",d):g.style.removeProperty("height");a.setAttribute("aria-hidden","true")},PH=function(a){Object.defineProperty(a,"variant",{get:function(){var b=this.getAttribute("variant");return $APP.n(b)?
4
- b:"rect"},set:function(b){return typeof b==="string"&&$APP.O("",b)?this.setAttribute("variant",b):this.removeAttribute("variant")},enumerable:!0,configurable:!0});Object.defineProperty(a,"animation",{get:function(){var b=this.getAttribute("animation");return $APP.n(b)?b:"pulse"},set:function(b){return typeof b==="string"&&$APP.O("",b)?this.setAttribute("animation",b):this.removeAttribute("animation")},enumerable:!0,configurable:!0});Object.defineProperty(a,"width",{get:function(){var b=this.getAttribute("width");
5
- return $APP.n(b)?b:""},set:function(b){return typeof b==="string"&&$APP.O("",b)?this.setAttribute("width",b):this.removeAttribute("width")},enumerable:!0,configurable:!0});Object.defineProperty(a,"height",{get:function(){var b=this.getAttribute("height");return $APP.n(b)?b:""},set:function(b){return typeof b==="string"&&$APP.O("",b)?this.setAttribute("height",b):this.removeAttribute("height")},enumerable:!0,configurable:!0})},RH=function(){var a=class extends HTMLElement{};a.observedAttributes=QH;
6
- a.prototype.connectedCallback=function(){if(!$APP.n($APP.l(this,"__xSkeletonInit"))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div");c.textContent=":host{display:block;box-sizing:border-box;color-scheme:light dark;--x-skeleton-color:rgba(0,0,0,0.08);--x-skeleton-highlight:rgba(255,255,255,0.65);--x-skeleton-border-radius:4px;--x-skeleton-duration:1.5s;}@media (prefers-color-scheme:dark){:host{--x-skeleton-color:rgba(255,255,255,0.10);--x-skeleton-highlight:rgba(255,255,255,0.18);}}[part\x3dbase]{width:100%;height:1rem;position:relative;overflow:hidden;background:var(--x-skeleton-color);border-radius:var(--x-skeleton-border-radius);}[part\x3dbase][data-variant\x3d'text']{height:1em;border-radius:3px;}[part\x3dbase][data-variant\x3d'circle']{width:2.5rem;height:2.5rem;border-radius:50%;}[part\x3dshimmer]{position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,var(--x-skeleton-highlight) 50%,transparent 100%);transform:translateX(-100%);display:none;pointer-events:none;}@keyframes x-skeleton-pulse{0%,100%{opacity:1;}50%{opacity:0.4;}}@keyframes x-skeleton-wave{0%{transform:translateX(-100%);}100%{transform:translateX(200%);}}[part\x3dbase][data-animation\x3d'pulse']{animation:x-skeleton-pulse var(--x-skeleton-duration,1.5s) ease-in-out infinite;}[part\x3dbase][data-animation\x3d'wave'] [part\x3dshimmer]{display:block;animation:x-skeleton-wave var(--x-skeleton-duration,1.5s) linear infinite;}@media (prefers-reduced-motion:reduce){[part\x3dbase][data-animation\x3d'pulse']{animation:none;}[part\x3dbase][data-animation\x3d'wave'] [part\x3dshimmer]{animation:none;}}";
7
- d.setAttribute("part","base");e.setAttribute("part","shimmer");d.appendChild(e);b.appendChild(c);b.appendChild(d);this.__xSkeletonBase=d;this.__xSkeletonInit=!0}OH(this);return null};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&$APP.n($APP.l(this,"__xSkeletonInit"))&&OH(this);return null};PH(a.prototype);return a},SH=function(){$APP.n(customElements.get("x-skeleton"))||customElements.define("x-skeleton",RH());return null};var MH=new $APP.S(null,new $APP.R(null,3,["text",null,"rect",null,"circle",null],null),null),NH=new $APP.S(null,new $APP.R(null,3,["none",null,"pulse",null,"wave",null],null),null),QH=["variant","animation","width","height"];$APP.ja("baredom.exports.x_skeleton.init",SH);export const init=SH;
2
+ var HK=function(a){return typeof a==="string"&&$APP.O("",a)?a:null},KK=function(a){var b=new $APP.P(null,4,[$APP.Fh,a.getAttribute("variant"),$APP.Oi,a.getAttribute("animation"),$APP.Lj,a.getAttribute("width"),$APP.pj,a.getAttribute("height")],null);var c=$APP.N(b),d=$APP.G(c,$APP.Fh),e=$APP.G(c,$APP.Oi);b=$APP.G(c,$APP.Lj);c=$APP.G(c,$APP.pj);d=typeof d==="string"&&$APP.J(IK,d)?d:"rect";e=typeof e==="string"&&$APP.J(JK,e)?e:"pulse";b=new $APP.P(null,4,[$APP.Fh,d,$APP.Oi,e,$APP.Lj,HK(b),$APP.pj,HK(c)],
3
+ null);d=$APP.N(b);b=$APP.G(d,$APP.Fh);e=$APP.G(d,$APP.Oi);c=$APP.G(d,$APP.Lj);d=$APP.G(d,$APP.pj);var g=$APP.l(a,"__xSkeletonBase");g.setAttribute("data-variant",b);g.setAttribute("data-animation",e);$APP.r(c)?g.style.setProperty("width",c):g.style.removeProperty("width");$APP.r(d)?g.style.setProperty("height",d):g.style.removeProperty("height");a.setAttribute("aria-hidden","true")},LK=function(a){Object.defineProperty(a,"variant",{get:function(){var b=this.getAttribute("variant");return $APP.r(b)?
4
+ b:"rect"},set:function(b){return typeof b==="string"&&$APP.O("",b)?this.setAttribute("variant",b):this.removeAttribute("variant")},enumerable:!0,configurable:!0});Object.defineProperty(a,"animation",{get:function(){var b=this.getAttribute("animation");return $APP.r(b)?b:"pulse"},set:function(b){return typeof b==="string"&&$APP.O("",b)?this.setAttribute("animation",b):this.removeAttribute("animation")},enumerable:!0,configurable:!0});Object.defineProperty(a,"width",{get:function(){var b=this.getAttribute("width");
5
+ return $APP.r(b)?b:""},set:function(b){return typeof b==="string"&&$APP.O("",b)?this.setAttribute("width",b):this.removeAttribute("width")},enumerable:!0,configurable:!0});Object.defineProperty(a,"height",{get:function(){var b=this.getAttribute("height");return $APP.r(b)?b:""},set:function(b){return typeof b==="string"&&$APP.O("",b)?this.setAttribute("height",b):this.removeAttribute("height")},enumerable:!0,configurable:!0})},NK=function(){var a=class extends HTMLElement{};a.observedAttributes=MK;
6
+ a.prototype.connectedCallback=function(){if(!$APP.r($APP.l(this,"__xSkeletonInit"))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div");c.textContent=":host{display:block;box-sizing:border-box;color-scheme:light dark;--x-skeleton-color:rgba(0,0,0,0.08);--x-skeleton-highlight:rgba(255,255,255,0.65);--x-skeleton-border-radius:4px;--x-skeleton-duration:1.5s;}@media (prefers-color-scheme:dark){:host{--x-skeleton-color:rgba(255,255,255,0.10);--x-skeleton-highlight:rgba(255,255,255,0.18);}}[part\x3dbase]{width:100%;height:1rem;position:relative;overflow:hidden;background:var(--x-skeleton-color);border-radius:var(--x-skeleton-border-radius);}[part\x3dbase][data-variant\x3d'text']{height:1em;border-radius:3px;}[part\x3dbase][data-variant\x3d'circle']{width:2.5rem;height:2.5rem;border-radius:50%;}[part\x3dshimmer]{position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,var(--x-skeleton-highlight) 50%,transparent 100%);transform:translateX(-100%);display:none;pointer-events:none;}@keyframes x-skeleton-pulse{0%,100%{opacity:1;}50%{opacity:0.4;}}@keyframes x-skeleton-wave{0%{transform:translateX(-100%);}100%{transform:translateX(200%);}}[part\x3dbase][data-animation\x3d'pulse']{animation:x-skeleton-pulse var(--x-skeleton-duration,1.5s) ease-in-out infinite;}[part\x3dbase][data-animation\x3d'wave'] [part\x3dshimmer]{display:block;animation:x-skeleton-wave var(--x-skeleton-duration,1.5s) linear infinite;}@media (prefers-reduced-motion:reduce){[part\x3dbase][data-animation\x3d'pulse']{animation:none;}[part\x3dbase][data-animation\x3d'wave'] [part\x3dshimmer]{animation:none;}}";
7
+ d.setAttribute("part","base");e.setAttribute("part","shimmer");d.appendChild(e);b.appendChild(c);b.appendChild(d);this.__xSkeletonBase=d;this.__xSkeletonInit=!0}KK(this);return null};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&$APP.r($APP.l(this,"__xSkeletonInit"))&&KK(this);return null};LK(a.prototype);return a},OK=function(){$APP.r(customElements.get("x-skeleton"))||customElements.define("x-skeleton",NK());return null};var IK=new $APP.R(null,new $APP.P(null,3,["text",null,"rect",null,"circle",null],null),null),JK=new $APP.R(null,new $APP.P(null,3,["none",null,"pulse",null,"wave",null],null),null),MK=["variant","animation","width","height"];$APP.ka("baredom.exports.x_skeleton.init",OK);export const init=OK;
package/dist/x-slider.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var zA=function(a,b){return typeof a==="string"?(a=parseFloat(a),$APP.n(isNaN(a))?b:a):b},AA=function(a,b,c){return a.setAttribute(b,c)},BA=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},GA=function(a){var b=$APP.l(a,"__xSliderRefs");if($APP.n(b)){var c=$APP.l(b,"base"),d=$APP.l(b,"header"),e=$APP.l(b,"label"),g=$APP.l(b,"value");b=$APP.l(b,"input");var h=$APP.mf([$APP.Ri,$APP.Di,$APP.Ui,$APP.si,$APP.Xh,$APP.ti,$APP.Pi,$APP.Wg,$APP.wj,$APP.U,$APP.Qk,$APP.dk,CA],[a.getAttribute("min"),
3
- a.hasAttribute("disabled"),a.hasAttribute("show-value"),a.getAttribute("name"),a.getAttribute("value"),a.hasAttribute("readonly"),a.getAttribute("aria-labelledby"),a.getAttribute("size"),a.getAttribute("max"),a.getAttribute("label"),a.getAttribute("aria-describedby"),a.getAttribute("aria-label"),a.getAttribute("step")]);var k=$APP.N(h);h=$APP.I(k,$APP.dk);var m=$APP.I(k,CA),p=$APP.I(k,$APP.Ri),q=$APP.I(k,$APP.Di),v=$APP.I(k,$APP.Ui),x=$APP.I(k,$APP.Xh),y=$APP.I(k,$APP.si),A=$APP.I(k,$APP.ti),D=$APP.I(k,
4
- $APP.Pi),G=$APP.I(k,$APP.Wg),H=$APP.I(k,$APP.U),F=$APP.I(k,$APP.wj);k=$APP.I(k,$APP.Qk);p=zA(p,0);F=zA(F,100);x=$APP.Gg.h($APP.Fg.h(zA(x,0),p),F);$APP.C.h(m,"any")?m="any":(m=typeof m==="string"?parseFloat(m):NaN,m=$APP.r(isNaN(m))&&m>0?""+$APP.T.g(m):"1");G=typeof G==="string"&&$APP.K(DA,G)?G:"md";q=$APP.J(q);A=$APP.J(A);v=$APP.J(v);var P=F>p?$APP.Gg.h($APP.Fg.h((x-p)/(F-p)*100,0),100):0;h=$APP.mf([$APP.Ri,$APP.Uk,$APP.si,$APP.Xh,$APP.Pi,EA,$APP.Wg,$APP.wj,$APP.U,$APP.Qk,$APP.dk,$APP.X,CA,FA],[p,
5
- A,typeof y==="string"&&$APP.O("",y)?y:null,x,typeof D==="string"&&$APP.O("",D)?D:null,v,G,F,typeof H==="string"&&$APP.O("",H)?H:null,typeof k==="string"&&$APP.O("",k)?k:null,typeof h==="string"&&$APP.O("",h)?h:null,q,m,P]);m=$APP.N(h);y=$APP.I(m,$APP.dk);D=$APP.I(m,$APP.X);H=$APP.I(m,CA);k=$APP.I(m,FA);v=$APP.I(m,$APP.Ri);p=$APP.I(m,$APP.Uk);h=$APP.I(m,$APP.Xh);A=$APP.I(m,$APP.Pi);F=$APP.I(m,EA);q=$APP.I(m,$APP.Wg);x=$APP.I(m,$APP.U);G=$APP.I(m,$APP.wj);m=$APP.I(m,$APP.Qk);P=(P=x!=null)?P:F;c.setAttribute("data-size",
6
- q);BA(a,"data-disabled",D);BA(a,"data-readonly",p);d.style.display=$APP.n(P)?"flex":"none";e.textContent=$APP.n(x)?x:"";e.style.display=x!=null?"":"none";g.textContent=$APP.n(F)?""+$APP.T.g(h):"";g.style.display=$APP.n(F)?"":"none";a.style.setProperty("--_x-slider-fill",""+$APP.T.g(k.toFixed(2))+"%");AA(b,"min",""+$APP.T.g(v));AA(b,"max",""+$APP.T.g(G));b.setAttribute("step",H);$APP.O(b.value,""+$APP.T.g(h))&&(b.value=""+$APP.T.g(h));AA(b,"aria-valuemin",""+$APP.T.g(v));AA(b,"aria-valuemax",""+$APP.T.g(G));
7
- AA(b,"aria-valuenow",""+$APP.T.g(h));b.setAttribute("aria-readonly",$APP.n(p)?"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.l(a,"__xSliderInternals");return $APP.n(a)?a.setFormValue(""+
8
- $APP.T.g(h)):null}return null},HA=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1}))},IA=function(a){return function(){if($APP.n(a.hasAttribute("disabled")))return null;var b=$APP.l($APP.l(a,"__xSliderRefs"),"input").value,c=parseFloat(b),d=parseFloat(function(){var g=a.getAttribute("min");return $APP.n(g)?g:"0"}()),e=parseFloat(function(){var g=a.getAttribute("max");return $APP.n(g)?g:"100"}());a.setAttribute("value",b);return HA(a,"x-slider-input",
9
- {value:c,min:d,max:e})}},JA=function(a){return function(){if($APP.n(a.hasAttribute("disabled")))return null;var b=parseFloat($APP.l($APP.l(a,"__xSliderRefs"),"input").value),c=parseFloat(function(){var e=a.getAttribute("min");return $APP.n(e)?e:"0"}()),d=parseFloat(function(){var e=a.getAttribute("max");return $APP.n(e)?e:"100"}());return HA(a,"x-slider-change",{value:b,min:c,max:d})}},LA=function(a){return function(b){var c=a.hasAttribute("readonly");c=$APP.n(c)?$APP.K(KA,b.key):c;return $APP.n(c)?
10
- b.preventDefault():null}},MA=function(a){var b=$APP.l(a,"__xSliderRefs");if($APP.n(b)){var c=$APP.l(a,"__xSliderHandlers");if($APP.n(c)){b=$APP.l(b,"input");b.removeEventListener("input",$APP.l(c,"input"));b.removeEventListener("change",$APP.l(c,"change"));b.removeEventListener("keydown",$APP.l(c,"keydown"));a.__xSliderHandlers=null;return}}return null},NA=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return BA(this,
11
- c,$APP.J(d))}})},OA=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.n(d)?d:null},set:function(d){return d!=null&&$APP.O(d)?AA(this,c,""+$APP.T.g(d)):this.removeAttribute(c)}})},QA=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;Object.defineProperty(a,"observedAttributes",{get:function(){return PA}});NA(b,"disabled","disabled");NA(b,"readOnly","readonly");NA(b,"showValue","show-value");OA(b,
12
- "value","value");OA(b,"min","min");OA(b,"max","max");OA(b,"step","step");OA(b,"name","name");OA(b,"label","label");OA(b,"size","size");b.connectedCallback=function(){if(!$APP.n($APP.l(this,"__xSliderRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("span"),k=document.createElement("span"),m=document.createElement("input");d.textContent=":host{display:block;color-scheme:light dark;--x-slider-track-color:rgba(0,0,0,0.15);--x-slider-fill-color:#3b82f6;--x-slider-thumb-color:#ffffff;--x-slider-thumb-border:2px solid #3b82f6;--x-slider-thumb-shadow:0 1px 4px rgba(0,0,0,0.20);--x-slider-focus-ring:#60a5fa;--x-slider-disabled-opacity:0.45;--x-slider-label-color:rgba(0,0,0,0.60);--x-slider-value-color:rgba(0,0,0,0.50);--x-slider-radius:9999px;}@media (prefers-color-scheme:dark){:host{--x-slider-track-color:rgba(255,255,255,0.15);--x-slider-fill-color:#3b82f6;--x-slider-thumb-color:#ffffff;--x-slider-thumb-border:2px solid #3b82f6;--x-slider-focus-ring:#93c5fd;--x-slider-label-color:rgba(255,255,255,0.60);--x-slider-value-color:rgba(255,255,255,0.50);}}[part\x3dbase]{width:100%;box-sizing:border-box;}[part\x3dbase][data-size\x3dsm]{--_x-slider-track-h:4px;--_x-slider-thumb-sz:14px;}[part\x3dbase][data-size\x3dmd]{--_x-slider-track-h:6px;--_x-slider-thumb-sz:18px;}[part\x3dbase][data-size\x3dlg]{--_x-slider-track-h:8px;--_x-slider-thumb-sz:22px;}[part\x3dheader]{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:4px;}[part\x3dlabel-text]{font-size:0.875rem;color:var(--x-slider-label-color);font-weight:500;}[part\x3dvalue-text]{font-size:0.8125rem;color:var(--x-slider-value-color);}[part\x3dinput]{-webkit-appearance:none;appearance:none;display:block;width:100%;height:var(--_x-slider-thumb-sz,18px);cursor:pointer;margin:0;padding:0;background:transparent;outline:none;box-sizing:border-box;}[part\x3dinput]::-webkit-slider-runnable-track{height:var(--_x-slider-track-h,6px);border-radius:var(--x-slider-radius);background:linear-gradient(to right,var(--x-slider-fill-color) var(--_x-slider-fill,0%),var(--x-slider-track-color) var(--_x-slider-fill,0%));}[part\x3dinput]::-moz-range-track{height:var(--_x-slider-track-h,6px);border-radius:var(--x-slider-radius);background:var(--x-slider-track-color);border:none;}[part\x3dinput]::-moz-range-progress{height:var(--_x-slider-track-h,6px);border-radius:var(--x-slider-radius);background:var(--x-slider-fill-color);}[part\x3dinput]::-webkit-slider-thumb{-webkit-appearance:none;width:var(--_x-slider-thumb-sz,18px);height:var(--_x-slider-thumb-sz,18px);border-radius:50%;background:var(--x-slider-thumb-color);border:var(--x-slider-thumb-border);box-shadow:var(--x-slider-thumb-shadow);margin-top:calc(var(--_x-slider-track-h,6px)/2 - var(--_x-slider-thumb-sz,18px)/2);cursor:pointer;transition:box-shadow 100ms ease;}[part\x3dinput]::-moz-range-thumb{width:var(--_x-slider-thumb-sz,18px);height:var(--_x-slider-thumb-sz,18px);border-radius:50%;background:var(--x-slider-thumb-color);border:var(--x-slider-thumb-border);box-shadow:var(--x-slider-thumb-shadow);cursor:pointer;transition:box-shadow 100ms ease;}[part\x3dinput]:focus-visible::-webkit-slider-thumb{box-shadow:var(--x-slider-thumb-shadow),0 0 0 3px var(--x-slider-focus-ring);}[part\x3dinput]:focus-visible::-moz-range-thumb{box-shadow:var(--x-slider-thumb-shadow),0 0 0 3px var(--x-slider-focus-ring);}:host([data-disabled]) [part\x3dinput]{opacity:var(--x-slider-disabled-opacity);cursor:default;pointer-events:none;}:host([data-readonly]) [part\x3dinput]{pointer-events:none;}@media (prefers-reduced-motion:reduce){[part\x3dinput]::-webkit-slider-thumb{transition:none;}[part\x3dinput]::-moz-range-thumb{transition:none;}}";
13
- e.setAttribute("part","base");g.setAttribute("part","header");h.setAttribute("part","label-text");k.setAttribute("part","value-text");m.setAttribute("part","input");m.setAttribute("type","range");g.appendChild(h);g.appendChild(k);e.appendChild(g);e.appendChild(m);c.appendChild(d);c.appendChild(e);this.__xSliderRefs={base:e,header:g,label:h,value:k,input:m};$APP.n(this.attachInternals)&&(this.__xSliderInternals=this.attachInternals())}MA(this);c=$APP.l(this,"__xSliderRefs");$APP.n(c)&&(c=$APP.l(c,
14
- "input"),d=IA(this),e=JA(this),g=LA(this),h={input:d,change:e,keydown:g},c.addEventListener("input",d),c.addEventListener("change",e),c.addEventListener("keydown",g),this.__xSliderHandlers=h);return GA(this)};b.disconnectedCallback=function(){return MA(this)};b.attributeChangedCallback=function(){return GA(this)};b.formDisabledCallback=function(c){BA(this,"disabled",$APP.J(c));return GA(this)};b.formResetCallback=function(){AA(this,"value",""+$APP.T.g(0));return GA(this)};return a},RA=function(){return $APP.n(customElements.get("x-slider"))?
15
- null:customElements.define("x-slider",QA())},EA=new $APP.M(null,"show-value?","show-value?",-1960833108),FA=new $APP.M(null,"fill-percent","fill-percent",-1813848228),CA=new $APP.M(null,"step","step",1288888124);var DA=new $APP.S(null,new $APP.R(null,3,["md",null,"lg",null,"sm",null],null),null),PA="value min max step disabled readonly name label show-value size aria-label aria-labelledby aria-describedby".split(" ");
16
- $APP.mf([$APP.Ri,$APP.Di,$APP.Yg,$APP.si,$APP.Xh,$APP.Wg,$APP.tk,$APP.wj,$APP.U,CA],[new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.nj,"min"],null),new $APP.R(null,2,[$APP.Z,$APP.Ni,$APP.nj,"disabled"],null),new $APP.R(null,2,[$APP.Z,$APP.Ni,$APP.nj,"show-value"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.nj,"name"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.nj,"value"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.nj,"size"],null),new $APP.R(null,2,[$APP.Z,$APP.Ni,$APP.nj,"readonly"],null),new $APP.R(null,
17
- 2,[$APP.Z,$APP.Y,$APP.nj,"max"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.nj,"label"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.nj,"step"],null)]);$APP.Ed(["x-slider-input",new $APP.R(null,1,[$APP.V,new $APP.R(null,3,[$APP.Xh,$APP.W,$APP.Ri,$APP.W,$APP.wj,$APP.W],null)],null),"x-slider-change",new $APP.R(null,1,[$APP.V,new $APP.R(null,3,[$APP.Xh,$APP.W,$APP.Ri,$APP.W,$APP.wj,$APP.W],null)],null)]);var KA=new $APP.S(null,new $APP.R(null,8,["PageDown",null,"ArrowUp",null,"ArrowDown",null,"End",null,"ArrowRight",null,"ArrowLeft",null,"PageUp",null,"Home",null],null),null);$APP.ja("baredom.exports.x_slider.init",RA);export const init=RA;
2
+ var SD=function(a,b){return typeof a==="string"?(a=parseFloat(a),$APP.r(isNaN(a))?b:a):b},TD=function(a,b,c){return a.setAttribute(b,c)},UD=function(a,b,c){return $APP.r(c)?a.setAttribute(b,""):a.removeAttribute(b)},ZD=function(a){var b=$APP.l(a,"__xSliderRefs");if($APP.r(b)){var c=$APP.l(b,"base"),d=$APP.l(b,"header"),e=$APP.l(b,"label"),g=$APP.l(b,"value");b=$APP.l(b,"input");var h=$APP.Q([$APP.vj,$APP.gj,$APP.yj,$APP.Si,$APP.ui,$APP.Ti,$APP.sj,$APP.rh,$APP.Zj,$APP.T,$APP.Ol,$APP.Tk,VD],[a.getAttribute("min"),
3
+ a.hasAttribute("disabled"),a.hasAttribute("show-value"),a.getAttribute("name"),a.getAttribute("value"),a.hasAttribute("readonly"),a.getAttribute("aria-labelledby"),a.getAttribute("size"),a.getAttribute("max"),a.getAttribute("label"),a.getAttribute("aria-describedby"),a.getAttribute("aria-label"),a.getAttribute("step")]);var k=$APP.N(h);h=$APP.G(k,$APP.Tk);var m=$APP.G(k,VD),p=$APP.G(k,$APP.vj),q=$APP.G(k,$APP.gj),w=$APP.G(k,$APP.yj),x=$APP.G(k,$APP.ui),y=$APP.G(k,$APP.Si),A=$APP.G(k,$APP.Ti),C=$APP.G(k,
4
+ $APP.sj),E=$APP.G(k,$APP.rh),H=$APP.G(k,$APP.T),F=$APP.G(k,$APP.Zj);k=$APP.G(k,$APP.Ol);p=SD(p,0);F=SD(F,100);x=$APP.Zg.i($APP.Yg.i(SD(x,0),p),F);$APP.D.i(m,"any")?m="any":(m=typeof m==="string"?parseFloat(m):NaN,m=$APP.t(isNaN(m))&&m>0?""+$APP.S.g(m):"1");E=typeof E==="string"&&$APP.J(WD,E)?E:"md";q=$APP.I(q);A=$APP.I(A);w=$APP.I(w);var K=F>p?$APP.Zg.i($APP.Yg.i((x-p)/(F-p)*100,0),100):0;h=$APP.Q([$APP.vj,$APP.Sl,$APP.Si,$APP.ui,$APP.sj,XD,$APP.rh,$APP.Zj,$APP.T,$APP.Ol,$APP.Tk,$APP.W,VD,YD],[p,
5
+ A,typeof y==="string"&&$APP.O("",y)?y:null,x,typeof C==="string"&&$APP.O("",C)?C:null,w,E,F,typeof H==="string"&&$APP.O("",H)?H:null,typeof k==="string"&&$APP.O("",k)?k:null,typeof h==="string"&&$APP.O("",h)?h:null,q,m,K]);m=$APP.N(h);y=$APP.G(m,$APP.Tk);C=$APP.G(m,$APP.W);H=$APP.G(m,VD);k=$APP.G(m,YD);w=$APP.G(m,$APP.vj);p=$APP.G(m,$APP.Sl);h=$APP.G(m,$APP.ui);A=$APP.G(m,$APP.sj);F=$APP.G(m,XD);q=$APP.G(m,$APP.rh);x=$APP.G(m,$APP.T);E=$APP.G(m,$APP.Zj);m=$APP.G(m,$APP.Ol);K=(K=x!=null)?K:F;c.setAttribute("data-size",
6
+ q);UD(a,"data-disabled",C);UD(a,"data-readonly",p);d.style.display=$APP.r(K)?"flex":"none";e.textContent=$APP.r(x)?x:"";e.style.display=x!=null?"":"none";g.textContent=$APP.r(F)?""+$APP.S.g(h):"";g.style.display=$APP.r(F)?"":"none";a.style.setProperty("--_x-slider-fill",""+$APP.S.g(k.toFixed(2))+"%");TD(b,"min",""+$APP.S.g(w));TD(b,"max",""+$APP.S.g(E));b.setAttribute("step",H);$APP.O(b.value,""+$APP.S.g(h))&&(b.value=""+$APP.S.g(h));TD(b,"aria-valuemin",""+$APP.S.g(w));TD(b,"aria-valuemax",""+$APP.S.g(E));
7
+ TD(b,"aria-valuenow",""+$APP.S.g(h));b.setAttribute("aria-readonly",$APP.r(p)?"true":"false");$APP.r(y)?b.setAttribute("aria-label",y):x!=null?b.setAttribute("aria-label",x):b.removeAttribute("aria-label");$APP.r(A)?b.setAttribute("aria-labelledby",A):b.removeAttribute("aria-labelledby");$APP.r(m)?b.setAttribute("aria-describedby",m):b.removeAttribute("aria-describedby");$APP.r(C)?b.setAttribute("disabled",""):b.removeAttribute("disabled");a=$APP.l(a,"__xSliderInternals");return $APP.r(a)?a.setFormValue(""+
8
+ $APP.S.g(h)):null}return null},$D=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1}))},aE=function(a){return function(){if($APP.r(a.hasAttribute("disabled")))return null;var b=$APP.l($APP.l(a,"__xSliderRefs"),"input").value,c=parseFloat(b),d=parseFloat(function(){var g=a.getAttribute("min");return $APP.r(g)?g:"0"}()),e=parseFloat(function(){var g=a.getAttribute("max");return $APP.r(g)?g:"100"}());a.setAttribute("value",b);return $D(a,"x-slider-input",
9
+ {value:c,min:d,max:e})}},bE=function(a){return function(){if($APP.r(a.hasAttribute("disabled")))return null;var b=parseFloat($APP.l($APP.l(a,"__xSliderRefs"),"input").value),c=parseFloat(function(){var e=a.getAttribute("min");return $APP.r(e)?e:"0"}()),d=parseFloat(function(){var e=a.getAttribute("max");return $APP.r(e)?e:"100"}());return $D(a,"x-slider-change",{value:b,min:c,max:d})}},dE=function(a){return function(b){var c=a.hasAttribute("readonly");c=$APP.r(c)?$APP.J(cE,b.key):c;return $APP.r(c)?
10
+ b.preventDefault():null}},eE=function(a){var b=$APP.l(a,"__xSliderRefs");if($APP.r(b)){var c=$APP.l(a,"__xSliderHandlers");if($APP.r(c)){b=$APP.l(b,"input");b.removeEventListener("input",$APP.l(c,"input"));b.removeEventListener("change",$APP.l(c,"change"));b.removeEventListener("keydown",$APP.l(c,"keydown"));a.__xSliderHandlers=null;return}}return null},fE=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return UD(this,
11
+ c,$APP.I(d))}})},gE=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.r(d)?d:null},set:function(d){return d!=null&&$APP.O(d)?TD(this,c,""+$APP.S.g(d)):this.removeAttribute(c)}})},iE=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;Object.defineProperty(a,"observedAttributes",{get:function(){return hE}});fE(b,"disabled","disabled");fE(b,"readOnly","readonly");fE(b,"showValue","show-value");gE(b,
12
+ "value","value");gE(b,"min","min");gE(b,"max","max");gE(b,"step","step");gE(b,"name","name");gE(b,"label","label");gE(b,"size","size");b.connectedCallback=function(){if(!$APP.r($APP.l(this,"__xSliderRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("span"),k=document.createElement("span"),m=document.createElement("input");d.textContent=":host{display:block;color-scheme:light dark;--x-slider-track-color:rgba(0,0,0,0.15);--x-slider-fill-color:#3b82f6;--x-slider-thumb-color:#ffffff;--x-slider-thumb-border:2px solid #3b82f6;--x-slider-thumb-shadow:0 1px 4px rgba(0,0,0,0.20);--x-slider-focus-ring:#60a5fa;--x-slider-disabled-opacity:0.45;--x-slider-label-color:rgba(0,0,0,0.60);--x-slider-value-color:rgba(0,0,0,0.50);--x-slider-radius:9999px;}@media (prefers-color-scheme:dark){:host{--x-slider-track-color:rgba(255,255,255,0.15);--x-slider-fill-color:#3b82f6;--x-slider-thumb-color:#ffffff;--x-slider-thumb-border:2px solid #3b82f6;--x-slider-focus-ring:#93c5fd;--x-slider-label-color:rgba(255,255,255,0.60);--x-slider-value-color:rgba(255,255,255,0.50);}}[part\x3dbase]{width:100%;box-sizing:border-box;}[part\x3dbase][data-size\x3dsm]{--_x-slider-track-h:4px;--_x-slider-thumb-sz:14px;}[part\x3dbase][data-size\x3dmd]{--_x-slider-track-h:6px;--_x-slider-thumb-sz:18px;}[part\x3dbase][data-size\x3dlg]{--_x-slider-track-h:8px;--_x-slider-thumb-sz:22px;}[part\x3dheader]{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:4px;}[part\x3dlabel-text]{font-size:0.875rem;color:var(--x-slider-label-color);font-weight:500;}[part\x3dvalue-text]{font-size:0.8125rem;color:var(--x-slider-value-color);}[part\x3dinput]{-webkit-appearance:none;appearance:none;display:block;width:100%;height:var(--_x-slider-thumb-sz,18px);cursor:pointer;margin:0;padding:0;background:transparent;outline:none;box-sizing:border-box;}[part\x3dinput]::-webkit-slider-runnable-track{height:var(--_x-slider-track-h,6px);border-radius:var(--x-slider-radius);background:linear-gradient(to right,var(--x-slider-fill-color) var(--_x-slider-fill,0%),var(--x-slider-track-color) var(--_x-slider-fill,0%));}[part\x3dinput]::-moz-range-track{height:var(--_x-slider-track-h,6px);border-radius:var(--x-slider-radius);background:var(--x-slider-track-color);border:none;}[part\x3dinput]::-moz-range-progress{height:var(--_x-slider-track-h,6px);border-radius:var(--x-slider-radius);background:var(--x-slider-fill-color);}[part\x3dinput]::-webkit-slider-thumb{-webkit-appearance:none;width:var(--_x-slider-thumb-sz,18px);height:var(--_x-slider-thumb-sz,18px);border-radius:50%;background:var(--x-slider-thumb-color);border:var(--x-slider-thumb-border);box-shadow:var(--x-slider-thumb-shadow);margin-top:calc(var(--_x-slider-track-h,6px)/2 - var(--_x-slider-thumb-sz,18px)/2);cursor:pointer;transition:box-shadow 100ms ease;}[part\x3dinput]::-moz-range-thumb{width:var(--_x-slider-thumb-sz,18px);height:var(--_x-slider-thumb-sz,18px);border-radius:50%;background:var(--x-slider-thumb-color);border:var(--x-slider-thumb-border);box-shadow:var(--x-slider-thumb-shadow);cursor:pointer;transition:box-shadow 100ms ease;}[part\x3dinput]:focus-visible::-webkit-slider-thumb{box-shadow:var(--x-slider-thumb-shadow),0 0 0 3px var(--x-slider-focus-ring);}[part\x3dinput]:focus-visible::-moz-range-thumb{box-shadow:var(--x-slider-thumb-shadow),0 0 0 3px var(--x-slider-focus-ring);}:host([data-disabled]) [part\x3dinput]{opacity:var(--x-slider-disabled-opacity);cursor:default;pointer-events:none;}:host([data-readonly]) [part\x3dinput]{pointer-events:none;}@media (prefers-reduced-motion:reduce){[part\x3dinput]::-webkit-slider-thumb{transition:none;}[part\x3dinput]::-moz-range-thumb{transition:none;}}";
13
+ e.setAttribute("part","base");g.setAttribute("part","header");h.setAttribute("part","label-text");k.setAttribute("part","value-text");m.setAttribute("part","input");m.setAttribute("type","range");g.appendChild(h);g.appendChild(k);e.appendChild(g);e.appendChild(m);c.appendChild(d);c.appendChild(e);this.__xSliderRefs={base:e,header:g,label:h,value:k,input:m};$APP.r(this.attachInternals)&&(this.__xSliderInternals=this.attachInternals())}eE(this);c=$APP.l(this,"__xSliderRefs");$APP.r(c)&&(c=$APP.l(c,
14
+ "input"),d=aE(this),e=bE(this),g=dE(this),h={input:d,change:e,keydown:g},c.addEventListener("input",d),c.addEventListener("change",e),c.addEventListener("keydown",g),this.__xSliderHandlers=h);return ZD(this)};b.disconnectedCallback=function(){return eE(this)};b.attributeChangedCallback=function(){return ZD(this)};b.formDisabledCallback=function(c){UD(this,"disabled",$APP.I(c));return ZD(this)};b.formResetCallback=function(){TD(this,"value",""+$APP.S.g(0));return ZD(this)};return a},jE=function(){return $APP.r(customElements.get("x-slider"))?
15
+ null:customElements.define("x-slider",iE())},XD=new $APP.M(null,"show-value?","show-value?",-1960833108),YD=new $APP.M(null,"fill-percent","fill-percent",-1813848228),VD=new $APP.M(null,"step","step",1288888124);var WD=new $APP.R(null,new $APP.P(null,3,["md",null,"lg",null,"sm",null],null),null),hE="value min max step disabled readonly name label show-value size aria-label aria-labelledby aria-describedby".split(" ");
16
+ $APP.Q([$APP.vj,$APP.gj,$APP.th,$APP.Si,$APP.ui,$APP.rh,$APP.ml,$APP.Zj,$APP.T,VD],[new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"min"],null),new $APP.P(null,2,[$APP.Z,$APP.qj,$APP.Oj,"disabled"],null),new $APP.P(null,2,[$APP.Z,$APP.qj,$APP.Oj,"show-value"],null),new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"name"],null),new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"value"],null),new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"size"],null),new $APP.P(null,2,[$APP.Z,$APP.qj,$APP.Oj,"readonly"],null),new $APP.P(null,
17
+ 2,[$APP.Z,$APP.Y,$APP.Oj,"max"],null),new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"label"],null),new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"step"],null)]);$APP.Sd(["x-slider-input",new $APP.P(null,1,[$APP.U,new $APP.P(null,3,[$APP.ui,$APP.V,$APP.vj,$APP.V,$APP.Zj,$APP.V],null)],null),"x-slider-change",new $APP.P(null,1,[$APP.U,new $APP.P(null,3,[$APP.ui,$APP.V,$APP.vj,$APP.V,$APP.Zj,$APP.V],null)],null)]);var cE=new $APP.R(null,new $APP.P(null,8,["PageDown",null,"ArrowUp",null,"ArrowDown",null,"End",null,"ArrowRight",null,"ArrowLeft",null,"PageUp",null,"Home",null],null),null);$APP.ka("baredom.exports.x_slider.init",jE);export const init=jE;
@@ -0,0 +1,22 @@
1
+ import { $APP, shadow$provide } from "./base.js";
2
+ var vD=function(a,b,c,d){if(typeof a==="string"){a=a.trim();if($APP.D.i(a,""))return b;a=parseFloat(a);return $APP.r(isNaN(a))?b:Math.min(d,Math.max(c,a))}return b},wD=function(a,b,c,d,e,g){b=c+(e*(b-a)-g*c)*d;return[a+b*d,b]},xD=function(a,b,c,d,e,g,h){a=c-a;b=d-b;d=Math.sqrt(a*a+b*b);if(d<=.001||d>=e)return[0,0];e=1-d/e;g*=e*e*($APP.r(h)?50:20);return[a/d*g,b/d*g]},yD=function(){return $APP.I(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},zD=function(a,b){for(var c=0;;){if(c>=20)return!0;
3
+ if(Math.abs(a[c])>.1||Math.abs(b[c])>.1)return!1;c+=1}},BD=function(a){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElementNS("http://www.w3.org/2000/svg","svg"),e=document.createElementNS("http://www.w3.org/2000/svg","path"),g=document.createElement("div"),h=document.createElement("slot");c.textContent=AD;d.setAttribute("part","svg");d.setAttribute("viewBox","0 0 300 200");d.setAttribute("preserveAspectRatio","none");d.setAttribute("aria-hidden","true");
4
+ e.setAttribute("part","shape");g.setAttribute("part","content");d.appendChild(e);g.appendChild(h);b.appendChild(c);b.appendChild(d);b.appendChild(g);a.__xSoftBodyRefs=new $APP.P(null,4,[$APP.bi,b,$APP.xj,d,$APP.ak,e,$APP.Vh,g],null)},ED=function(a){a=new $APP.P(null,6,[$APP.jl,a.getAttribute("stiffness"),$APP.Ml,a.getAttribute("damping"),$APP.$i,a.getAttribute("radius"),$APP.Mj,a.getAttribute("intensity"),CD,a.getAttribute("grab-radius"),$APP.Ai,a.getAttribute("disabled")],null);var b=$APP.N(a);a=
5
+ $APP.G(b,$APP.jl);var c=$APP.G(b,$APP.Ml),d=$APP.G(b,$APP.$i),e=$APP.G(b,$APP.Mj),g=$APP.G(b,CD);b=$APP.G(b,$APP.Ai);return new $APP.P(null,6,[$APP.Vk,vD(a,180,10,1E3),$APP.Vj,vD(c,12,1,100),$APP.Il,vD(d,16,6,200),$APP.Gj,vD(e,1,0,5),DD,vD(g,80,10,500),$APP.W,b!=null],null)},FD=function(a,b,c){var d=$APP.Il.g($APP.l(a,"__xSoftBodyModel"));d=Math.max(6,Math.min(d,Math.min(b,c)/2));var e=Math.cos(Math.PI/6),g=Math.sin(Math.PI/6),h=Math.cos(Math.PI/3),k=Math.sin(Math.PI/3),m=new Float64Array(20),p=new Float64Array(20);
6
+ m[0]=d;p[0]=0;m[1]=b*.5;p[1]=0;m[2]=b-d;p[2]=0;m[3]=b-d+d*g;p[3]=d-d*e;m[4]=b-d+d*k;p[4]=d-d*h;m[5]=b;p[5]=d;m[6]=b;p[6]=c*.5;m[7]=b;p[7]=c-d;m[8]=b-d+d*e;p[8]=c-d+d*g;m[9]=b-d+d*h;p[9]=c-d+d*k;m[10]=b-d;p[10]=c;m[11]=b*.5;p[11]=c;m[12]=d;p[12]=c;m[13]=d-d*g;p[13]=c-d+d*e;m[14]=d-d*k;p[14]=c-d+d*h;m[15]=0;p[15]=c-d;m[16]=0;p[16]=c*.5;m[17]=0;p[17]=d;m[18]=d-d*e;p[18]=d-d*g;m[19]=d-d*h;p[19]=d-d*k;c=[m,p];b=c[0];c=c[1];d=new Float64Array(20);e=new Float64Array(20);g=new Float64Array(20);h=new Float64Array(20);
7
+ for(k=0;;)if(k<20)d[k]=b[k],e[k]=c[k],g[k]=0,h[k]=0,k+=1;else break;a.__xSoftBodyRX=b;a.__xSoftBodyRY=c;a.__xSoftBodyCX=d;a.__xSoftBodyCY=e;a.__xSoftBodyVX=g;a.__xSoftBodyVY=h},GD=function(a){var b=$APP.N($APP.l(a,"__xSoftBodyRefs"));b=$APP.G(b,$APP.ak);var c=$APP.l(a,"__xSoftBodyCX");a=$APP.l(a,"__xSoftBodyCY");var d=[];d.push("M"+$APP.S.g(c[0].toFixed(2))+","+$APP.S.g(a[0].toFixed(2)));for(var e=0;;)if(e<20){var g=$APP.hd(e+19,20),h=e,k=$APP.hd(e+1,20),m=$APP.hd(e+2,20),p=(c[k]-c[g])/6,q=(a[k]-
8
+ a[g])/6;g=(c[m]-c[h])/6;m=(a[m]-a[h])/6;var w=c[k]-c[h],x=a[k]-a[h];x=Math.sqrt(w*w+x*x)*.4;w=Math.sqrt(p*p+q*q);w=w>x?x/(w+.001):1;q=a[h]+q*w;var y=Math.sqrt(g*g+m*m);x=y>x?x/(y+.001):1;g=c[k]-g*x;m=a[k]-m*x;d.push("C"+$APP.S.g((c[h]+p*w).toFixed(2))+","+$APP.S.g(q.toFixed(2))+" "+$APP.S.g(g.toFixed(2))+","+$APP.S.g(m.toFixed(2))+" "+$APP.S.g(c[k].toFixed(2))+","+$APP.S.g(a[k].toFixed(2)));e+=1}else break;d.push("Z");b.setAttribute("d",d.join(""))},HD=function(a){var b=$APP.N($APP.l(a,"__xSoftBodyRefs"));
9
+ b=$APP.G(b,$APP.ak);var c=$APP.l(a,"__xSoftBodyW"),d=$APP.l(a,"__xSoftBodyH");a=$APP.Il.g($APP.l(a,"__xSoftBodyModel"));a=Math.max(6,Math.min(a,Math.min(c,d)/2));var e=.5522847498*a;c="M"+$APP.S.g(a.toFixed(2))+",0L"+$APP.S.g((c-a).toFixed(2))+",0C"+$APP.S.g((c-a+e).toFixed(2))+",0 "+$APP.S.g(c.toFixed(2))+","+$APP.S.g((a-e).toFixed(2))+" "+$APP.S.g(c.toFixed(2))+","+$APP.S.g(a.toFixed(2))+"L"+$APP.S.g(c.toFixed(2))+","+$APP.S.g((d-a).toFixed(2))+"C"+$APP.S.g(c.toFixed(2))+","+$APP.S.g((d-a+e).toFixed(2))+
10
+ " "+$APP.S.g((c-a+e).toFixed(2))+","+$APP.S.g(d.toFixed(2))+" "+$APP.S.g((c-a).toFixed(2))+","+$APP.S.g(d.toFixed(2))+"L"+$APP.S.g(a.toFixed(2))+","+$APP.S.g(d.toFixed(2))+"C"+$APP.S.g((a-e).toFixed(2))+","+$APP.S.g(d.toFixed(2))+" 0,"+$APP.S.g((d-a+e).toFixed(2))+" 0,"+$APP.S.g((d-a).toFixed(2))+"L0,"+$APP.S.g(a.toFixed(2))+"C0,"+$APP.S.g((a-e).toFixed(2))+" "+$APP.S.g((a-e).toFixed(2))+",0 "+$APP.S.g(a.toFixed(2))+",0Z";b.setAttribute("d",c)},JD=function(a){$APP.r($APP.l(a,"__xSoftBodyRaf"))||($APP.n(a,
11
+ "__xSoftBodyLF",performance.now()),$APP.n(a,"__xSoftBodyRaf",requestAnimationFrame(function(){return ID(a)})))},KD=function(a){var b=$APP.l(a,"__xSoftBodyRaf");$APP.r(b)&&(cancelAnimationFrame(b),a.__xSoftBodyRaf=null)},LD=function(a,b){var c=$APP.N($APP.l(a,"__xSoftBodyRefs"));c=$APP.G(c,$APP.xj).getBoundingClientRect();a.__xSoftBodyPX=b.clientX-c.left;a.__xSoftBodyPY=b.clientY-c.top;return null},MD=function(a){function b(){a.__xSoftBodyGrab=!1;a.dispatchEvent(new CustomEvent("x-soft-body-release",
12
+ {bubbles:!0,composed:!0,detail:{}}));return null}function c(h){a.__xSoftBodyGrab=!0;LD(a,h);a.dispatchEvent(new CustomEvent("x-soft-body-grab",{bubbles:!0,composed:!0,detail:{}}));return null}function d(){a.__xSoftBodyPA=!1;a.__xSoftBodyGrab=!1;return null}function e(){a.__xSoftBodyPA=!0;var h=$APP.W.g($APP.l(a,"__xSoftBodyModel"));h=$APP.r(h)?h:yD();$APP.r(h)||JD(a);return null}function g(h){return LD(a,h)}$APP.n(a,"__xSoftBodyHdl",{move:g,enter:e,leave:d,down:c,up:b});a.addEventListener("pointermove",
13
+ g,{passive:!0});a.addEventListener("pointerenter",e);a.addEventListener("pointerleave",d);a.addEventListener("pointerdown",c);a.addEventListener("pointerup",b)},ND=function(a){var b=$APP.l(a,"__xSoftBodyHdl");$APP.r(b)&&(a.removeEventListener("pointermove",$APP.l(b,"move")),a.removeEventListener("pointerenter",$APP.l(b,"enter")),a.removeEventListener("pointerleave",$APP.l(b,"leave")),a.removeEventListener("pointerdown",$APP.l(b,"down")),a.removeEventListener("pointerup",$APP.l(b,"up")),a.__xSoftBodyHdl=
14
+ null)},OD=function(a){Object.defineProperty(a,"stiffness",{get:function(){var b=this.getAttribute("stiffness");return vD(b,180,10,1E3)},set:function(b){return b==null?this.removeAttribute("stiffness"):this.setAttribute("stiffness",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"damping",{get:function(){var b=this.getAttribute("damping");return vD(b,12,1,100)},set:function(b){return b==null?this.removeAttribute("damping"):this.setAttribute("damping",""+$APP.S.g(b))},enumerable:!0,
15
+ configurable:!0});Object.defineProperty(a,"radius",{get:function(){var b=this.getAttribute("radius");return vD(b,16,6,200)},set:function(b){return b==null?this.removeAttribute("radius"):this.setAttribute("radius",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"intensity",{get:function(){var b=this.getAttribute("intensity");return vD(b,1,0,5)},set:function(b){return b==null?this.removeAttribute("intensity"):this.setAttribute("intensity",""+$APP.S.g(b))},enumerable:!0,configurable:!0});
16
+ Object.defineProperty(a,"grabRadius",{get:function(){var b=this.getAttribute("grab-radius");return vD(b,80,10,500)},set:function(b){return b==null?this.removeAttribute("grab-radius"):this.setAttribute("grab-radius",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.r(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0})},QD=function(){var a=
17
+ class extends HTMLElement{};a.observedAttributes=PD;a.prototype.connectedCallback=function(){var b=this,c=ED(b);b.__xSoftBodyModel=c;$APP.r($APP.l(b,"__xSoftBodyRefs"))||BD(b);b.__xSoftBodyPA=!1;b.__xSoftBodyGrab=!1;b.__xSoftBodyPX=0;b.__xSoftBodyPY=0;c=new ResizeObserver(function(d){if(d.length>0){var e=d[0].contentRect;d=e.width;e=e.height;if(d>0&&e>0){b.__xSoftBodyW=d;b.__xSoftBodyH=e;var g=$APP.N($APP.l(b,"__xSoftBodyRefs"));$APP.G(g,$APP.xj).setAttribute("viewBox","0 0 "+$APP.S.g(d)+" "+$APP.S.g(e));
18
+ FD(b,d,e);d=$APP.W.g($APP.l(b,"__xSoftBodyModel"));d=$APP.r(d)?d:yD();$APP.r(d)?HD(b):(GD(b),JD(b))}}return null});b.__xSoftBodyRO=c;c.observe(b);ND(b);MD(b);return null};a.prototype.disconnectedCallback=function(){KD(this);ND(this);var b=$APP.l(this,"__xSoftBodyRO");$APP.r(b)&&(b.disconnect(),this.__xSoftBodyRO=null);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&$APP.r($APP.l(this,"__xSoftBodyRefs"))&&(this.__xSoftBodyModel=b=ED(this),c=$APP.l(this,"__xSoftBodyW"),
19
+ d=$APP.l(this,"__xSoftBodyH"),$APP.r($APP.r(c)?$APP.r(d)?c>0&&d>0:d:c)&&(FD(this,c,d),b=$APP.W.g(b),b=$APP.r(b)?b:yD(),$APP.r(b)?(KD(this),HD(this)):(GD(this),JD(this))));return null};OD(a.prototype);return a},RD=function(){$APP.r(customElements.get("x-soft-body"))||customElements.define("x-soft-body",QD());return null},DD=new $APP.M(null,"grab-radius","grab-radius",771838535),CD=new $APP.M(null,"grab-radius-raw","grab-radius-raw",-1019405976);var PD="stiffness damping radius intensity grab-radius disabled".split(" ");$APP.Sd(["x-soft-body-grab",new $APP.P(null,2,[$APP.U,$APP.Td,$APP.kl,!1],null),"x-soft-body-release",new $APP.P(null,2,[$APP.U,$APP.Td,$APP.kl,!1],null)]);var AD=":host{display:block;position:relative;background:none;overflow:visible;"+$APP.S.g("--x-soft-body-bg")+":#ffffff;"+$APP.S.g("--x-soft-body-border")+":#e2e8f0;"+$APP.S.g("--x-soft-body-border-width")+":1.5;"+$APP.S.g("--x-soft-body-shadow")+":0 1px 3px rgba(0,0,0,0.1);"+$APP.S.g("--x-soft-body-padding")+":1rem;}[part\x3dsvg]{display:block;width:100%;height:100%;position:absolute;inset:0;overflow:visible;pointer-events:none;}[part\x3dshape]{fill:var("+$APP.S.g("--x-soft-body-bg")+",#ffffff);stroke:var("+
20
+ $APP.S.g("--x-soft-body-border")+",#e2e8f0);stroke-width:var("+$APP.S.g("--x-soft-body-border-width")+",1.5);filter:drop-shadow(var("+$APP.S.g("--x-soft-body-shadow")+",0 1px 3px rgba(0,0,0,0.1)));}[part\x3dcontent]{position:relative;background:none;padding:var("+$APP.S.g("--x-soft-body-padding")+",1rem);z-index:1;}@media(prefers-color-scheme:dark){:host{"+$APP.S.g("--x-soft-body-bg")+":#1e293b;"+$APP.S.g("--x-soft-body-border")+":#475569;"+$APP.S.g("--x-soft-body-shadow")+":0 1px 3px rgba(0,0,0,0.3);}}@media(prefers-reduced-motion:reduce){[part\x3dshape]{transition:none!important;}}",
21
+ ID=function ID(a){if($APP.r(a.isConnected)){var c=$APP.l(a,"__xSoftBodyModel"),d=performance.now(),e=Math.min(d-$APP.l(a,"__xSoftBodyLF"),100)/1E3,g=$APP.Vk.g(c),h=$APP.Vj.g(c),k=$APP.Gj.g(c),m=DD.g(c);c=$APP.l(a,"__xSoftBodyRX");var p=$APP.l(a,"__xSoftBodyRY"),q=$APP.l(a,"__xSoftBodyCX"),w=$APP.l(a,"__xSoftBodyCY"),x=$APP.l(a,"__xSoftBodyVX"),y=$APP.l(a,"__xSoftBodyVY"),A=$APP.l(a,"__xSoftBodyPA"),C=$APP.l(a,"__xSoftBodyPX"),E=$APP.l(a,"__xSoftBodyPY"),H=$APP.l(a,"__xSoftBodyGrab");a.__xSoftBodyLF=
22
+ d;for(d=0;;)if(d<20){var F=c[d],K=p[d],X=$APP.r(A)?xD(F,K,C,E,m,k,H):[0,0];F=wD(q[d],F+X[0],x[d],e,g,h);K=wD(w[d],K+X[1],y[d],e,g,h);q[d]=F[0];x[d]=F[1];w[d]=K[0];y[d]=K[1];d+=1}else break;GD(a);if($APP.r($APP.r(A)?A:!zD(x,y)))$APP.n(a,"__xSoftBodyRaf",requestAnimationFrame(function(){return ID.g?ID.g(a):ID.call(null,a)}));else{for(e=0;;)if(e<20)q[e]=c[e],w[e]=p[e],e+=1;else break;GD(a);a.__xSoftBodyRaf=null}}return null};$APP.ka("baredom.exports.x_soft_body.init",RD);export const init=RD;
package/dist/x-spacer.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var GD=function(a){return a!=null&&$APP.O((""+$APP.T.g(a)).trim().toLowerCase(),"false")},MD=function(a){var b=new $APP.R(null,3,[$APP.hk,a.getAttribute("size"),HD,a.getAttribute("axis"),ID,a.getAttribute("grow")],null);b=$APP.N(b);var c=$APP.I(b,$APP.hk),d=$APP.I(b,HD);b=$APP.I(b,ID);c=typeof c==="string"&&c.trim().length>0?c.trim():"1rem";d=typeof d==="string"?d.trim().toLowerCase():null;d=$APP.K(JD,d)?d:"vertical";b=new $APP.R(null,3,[$APP.Wg,c,KD,d,LD,GD(b)],null);c=$APP.N(b);b=$APP.I(c,$APP.Wg);
3
- d=$APP.I(c,KD);c=$APP.I(c,LD);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")},ND=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.T.g(d)):this.removeAttribute(b)},enumerable:!0,configurable:!0})},OD=function(a){Object.defineProperty(a,
4
- "grow",{get:function(){return GD(this.getAttribute("grow"))},set:function(b){return $APP.n(b)?this.setAttribute("grow",""):this.removeAttribute("grow")},enumerable:!0,configurable:!0})},PD=function(a){ND(a,"size","1rem");ND(a,"axis","vertical");OD(a)},RD=function(){var a=class extends HTMLElement{};a.observedAttributes=QD;a.prototype.connectedCallback=function(){if(!$APP.n($APP.l(this,"__xSpacerRefs"))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style");c.textContent=":host{display:block;flex-shrink:0;height:var(--x-spacer-size,1rem);width:0;pointer-events:none;}:host([data-axis\x3d'horizontal']){height:0;width:var(--x-spacer-size,1rem);}:host([data-grow\x3d'true']){flex:1 0 var(--x-spacer-size,0px);height:0;width:0;}";
5
- b.appendChild(c);this.__xSpacerRefs={root:b}}MD(this);return null};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=function(b,c,d){b=$APP.O(c,d);$APP.n(b?$APP.l(this,"__xSpacerRefs"):b)&&MD(this);return null};PD(a.prototype);return a},SD=function(){$APP.n(customElements.get("x-spacer"))||customElements.define("x-spacer",RD());return null},KD=new $APP.M(null,"axis","axis",-1215390822),LD=new $APP.M(null,"grow?","grow?",2124334580),ID=new $APP.M(null,"grow-raw",
6
- "grow-raw",441172903),HD=new $APP.M(null,"axis-raw","axis-raw",291213231);var QD=["size","axis","grow"],JD=new $APP.S(null,new $APP.R(null,2,["vertical",null,"horizontal",null],null),null);$APP.ja("baredom.exports.x_spacer.init",SD);export const init=SD;
2
+ var DG=function(a){return a!=null&&$APP.O((""+$APP.S.g(a)).trim().toLowerCase(),"false")},JG=function(a){var b=new $APP.P(null,3,[$APP.Yk,a.getAttribute("size"),EG,a.getAttribute("axis"),FG,a.getAttribute("grow")],null);b=$APP.N(b);var c=$APP.G(b,$APP.Yk),d=$APP.G(b,EG);b=$APP.G(b,FG);c=typeof c==="string"&&c.trim().length>0?c.trim():"1rem";d=typeof d==="string"?d.trim().toLowerCase():null;d=$APP.J(GG,d)?d:"vertical";b=new $APP.P(null,3,[$APP.rh,c,HG,d,IG,DG(b)],null);c=$APP.N(b);b=$APP.G(c,$APP.rh);
3
+ d=$APP.G(c,HG);c=$APP.G(c,IG);var e=a.style;a.setAttribute("data-axis",d);a.setAttribute("data-grow",$APP.r(c)?"true":"false");e.setProperty("--x-spacer-size",b);a.setAttribute("role","none");a.setAttribute("aria-hidden","true")},KG=function(a,b,c){Object.defineProperty(a,b,{get:function(){var d=this.getAttribute(b);return $APP.r(d)?d:c},set:function(d){return d!=null?this.setAttribute(b,""+$APP.S.g(d)):this.removeAttribute(b)},enumerable:!0,configurable:!0})},LG=function(a){Object.defineProperty(a,
4
+ "grow",{get:function(){return DG(this.getAttribute("grow"))},set:function(b){return $APP.r(b)?this.setAttribute("grow",""):this.removeAttribute("grow")},enumerable:!0,configurable:!0})},MG=function(a){KG(a,"size","1rem");KG(a,"axis","vertical");LG(a)},OG=function(){var a=class extends HTMLElement{};a.observedAttributes=NG;a.prototype.connectedCallback=function(){if(!$APP.r($APP.l(this,"__xSpacerRefs"))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style");c.textContent=":host{display:block;flex-shrink:0;height:var(--x-spacer-size,1rem);width:0;pointer-events:none;}:host([data-axis\x3d'horizontal']){height:0;width:var(--x-spacer-size,1rem);}:host([data-grow\x3d'true']){flex:1 0 var(--x-spacer-size,0px);height:0;width:0;}";
5
+ b.appendChild(c);this.__xSpacerRefs={root:b}}JG(this);return null};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=function(b,c,d){b=$APP.O(c,d);$APP.r(b?$APP.l(this,"__xSpacerRefs"):b)&&JG(this);return null};MG(a.prototype);return a},PG=function(){$APP.r(customElements.get("x-spacer"))||customElements.define("x-spacer",OG());return null},HG=new $APP.M(null,"axis","axis",-1215390822),IG=new $APP.M(null,"grow?","grow?",2124334580),FG=new $APP.M(null,"grow-raw",
6
+ "grow-raw",441172903),EG=new $APP.M(null,"axis-raw","axis-raw",291213231);var NG=["size","axis","grow"],GG=new $APP.R(null,new $APP.P(null,2,["vertical",null,"horizontal",null],null),null);$APP.ka("baredom.exports.x_spacer.init",PG);export const init=PG;
package/dist/x-spinner.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var LQ=function(a){var b=new $APP.R(null,3,[$APP.Wg,a.getAttribute("size"),$APP.jh,a.getAttribute("variant"),$APP.U,a.getAttribute("label")],null);var c=$APP.N(b),d=$APP.I(c,$APP.Wg);b=$APP.I(c,$APP.jh);c=$APP.I(c,$APP.U);d=typeof d==="string"&&$APP.K(JQ,d)?d:"md";b=typeof b==="string"&&$APP.K(KQ,b)?b:"default";c=typeof c==="string"&&$APP.O("",c.trim())?c.trim():"Loading";d=$APP.N(new $APP.R(null,3,[$APP.Wg,d,$APP.jh,b,$APP.U,c],null));b=$APP.I(d,$APP.Wg);c=$APP.I(d,$APP.jh);d=$APP.I(d,$APP.U);a.setAttribute("data-size",
3
- b);a.setAttribute("data-variant",c);a.setAttribute("aria-label",d)},MQ=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",""+$APP.T.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",""+
4
- $APP.T.g(b)):this.removeAttribute("variant")},enumerable:!0,configurable:!0});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",""+$APP.T.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0})},OQ=function(){var a=class extends HTMLElement{};a.observedAttributes=NQ;a.prototype.connectedCallback=function(){if(!$APP.n($APP.l(this,"__xSpinnerInit"))){var b=this.attachShadow({mode:"open"}),
2
+ var wV=function(a){var b=new $APP.P(null,3,[$APP.rh,a.getAttribute("size"),$APP.Fh,a.getAttribute("variant"),$APP.T,a.getAttribute("label")],null);var c=$APP.N(b),d=$APP.G(c,$APP.rh);b=$APP.G(c,$APP.Fh);c=$APP.G(c,$APP.T);d=typeof d==="string"&&$APP.J(uV,d)?d:"md";b=typeof b==="string"&&$APP.J(vV,b)?b:"default";c=typeof c==="string"&&$APP.O("",c.trim())?c.trim():"Loading";d=$APP.N(new $APP.P(null,3,[$APP.rh,d,$APP.Fh,b,$APP.T,c],null));b=$APP.G(d,$APP.rh);c=$APP.G(d,$APP.Fh);d=$APP.G(d,$APP.T);a.setAttribute("data-size",
3
+ b);a.setAttribute("data-variant",c);a.setAttribute("aria-label",d)},xV=function(a){Object.defineProperty(a,"size",{get:function(){var b=this.getAttribute("size");return $APP.r(b)?b:"md"},set:function(b){return $APP.r(b)?this.setAttribute("size",""+$APP.S.g(b)):this.removeAttribute("size")},enumerable:!0,configurable:!0});Object.defineProperty(a,"variant",{get:function(){var b=this.getAttribute("variant");return $APP.r(b)?b:"default"},set:function(b){return $APP.r(b)?this.setAttribute("variant",""+
4
+ $APP.S.g(b)):this.removeAttribute("variant")},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.r(b)?b:"Loading"},set:function(b){return $APP.r(b)?this.setAttribute("label",""+$APP.S.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0})},zV=function(){var a=class extends HTMLElement{};a.observedAttributes=yV;a.prototype.connectedCallback=function(){if(!$APP.r($APP.l(this,"__xSpinnerInit"))){var b=this.attachShadow({mode:"open"}),
5
5
  c=document.createElement("style"),d=document.createElement("span");c.textContent=":host{display:inline-flex;align-items:center;justify-content:center;color-scheme:light dark;--x-spinner-size:24px;--x-spinner-color:currentColor;--x-spinner-track-color:rgba(0,0,0,0.12);--x-spinner-thickness:2px;--x-spinner-duration:0.75s;}@media (prefers-color-scheme:dark){:host{--x-spinner-track-color:rgba(255,255,255,0.15);}}:host([data-size\x3d'xs']){--x-spinner-size:16px;}:host([data-size\x3d'sm']){--x-spinner-size:20px;}:host([data-size\x3d'md']){--x-spinner-size:24px;}:host([data-size\x3d'lg']){--x-spinner-size:32px;}:host([data-size\x3d'xl']){--x-spinner-size:48px;}:host([data-variant\x3d'primary']){--x-spinner-color:#3b82f6;}:host([data-variant\x3d'success']){--x-spinner-color:#22c55e;}:host([data-variant\x3d'warning']){--x-spinner-color:#f59e0b;}:host([data-variant\x3d'danger']){--x-spinner-color:#ef4444;}[part\x3dring]{display:block;width:var(--x-spinner-size);height:var(--x-spinner-size);border-radius:50%;border:var(--x-spinner-thickness) solid var(--x-spinner-track-color);border-top-color:var(--x-spinner-color);box-sizing:border-box;animation:x-spinner-spin var(--x-spinner-duration) linear infinite;}@keyframes x-spinner-spin{to{transform:rotate(360deg);}}@media (prefers-reduced-motion:reduce){[part\x3dring]{animation-play-state:paused;}}";
6
- d.setAttribute("part","ring");d.setAttribute("aria-hidden","true");b.appendChild(c);b.appendChild(d);this.setAttribute("role","status");this.setAttribute("aria-live","polite");this.__xSpinnerRing=d;this.__xSpinnerInit=!0}LQ(this);return null};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=function(b,c,d){b=$APP.O(c,d);$APP.n(b?$APP.l(this,"__xSpinnerInit"):b)&&LQ(this);return null};MQ(a.prototype);return a},PQ=function(){$APP.n(customElements.get("x-spinner"))||
7
- customElements.define("x-spinner",OQ());return null};var NQ=["size","variant","label"],JQ=new $APP.S(null,new $APP.R(null,5,["xs",null,"md",null,"lg",null,"xl",null,"sm",null],null),null),KQ=new $APP.S(null,new $APP.R(null,5,["success",null,"warning",null,"primary",null,"danger",null,"default",null],null),null);$APP.ja("baredom.exports.x_spinner.init",PQ);export const init=PQ;
6
+ d.setAttribute("part","ring");d.setAttribute("aria-hidden","true");b.appendChild(c);b.appendChild(d);this.setAttribute("role","status");this.setAttribute("aria-live","polite");this.__xSpinnerRing=d;this.__xSpinnerInit=!0}wV(this);return null};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=function(b,c,d){b=$APP.O(c,d);$APP.r(b?$APP.l(this,"__xSpinnerInit"):b)&&wV(this);return null};xV(a.prototype);return a},AV=function(){$APP.r(customElements.get("x-spinner"))||
7
+ customElements.define("x-spinner",zV());return null};var yV=["size","variant","label"],uV=new $APP.R(null,new $APP.P(null,5,["xs",null,"md",null,"lg",null,"xl",null,"sm",null],null),null),vV=new $APP.R(null,new $APP.P(null,5,["success",null,"warning",null,"primary",null,"danger",null,"default",null],null),null);$APP.ka("baredom.exports.x_spinner.init",AV);export const init=AV;
package/dist/x-splash.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var FF=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.n(isNaN(a))?null:$APP.Fg.h(0,$APP.Gg.h(100,a))):null},GF=function(a){return a==null?!0:$APP.O((""+$APP.T.g(a)).trim().toLowerCase(),"false")},LF=function(a){var b=$APP.l(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"),k=document.createElement("div"),
2
+ var CI=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.r(isNaN(a))?null:$APP.Yg.i(0,$APP.Zg.i(100,a))):null},DI=function(a){return a==null?!0:$APP.O((""+$APP.S.g(a)).trim().toLowerCase(),"false")},II=function(a){var b=$APP.l(a,"__xSplashRefs");if($APP.r(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("slot"),h=document.createElement("span"),k=document.createElement("div"),
3
3
  m=document.createElement("div");c.textContent=":host{display:block;color-scheme:light dark;--x-splash-bg:#ffffff;--x-splash-color:#0f172a;--x-splash-z-index:9999;--x-splash-fade-duration:400ms;--x-splash-fade-ease:cubic-bezier(0.4,0,0.2,1);--x-splash-spinner-size:40px;--x-splash-spinner-color:currentColor;--x-splash-spinner-track-color:rgba(0,0,0,0.12);--x-splash-spinner-thickness:3px;--x-splash-spinner-duration:0.75s;--x-splash-progress-height:4px;--x-splash-progress-color:#3b82f6;--x-splash-progress-track-color:rgba(0,0,0,0.08);--x-splash-progress-radius:2px;--x-splash-gap:20px;--x-splash-blur-amount:8px;}@media (prefers-color-scheme:dark){:host{--x-splash-bg:#0f172a;--x-splash-color:#f8fafc;--x-splash-spinner-track-color:rgba(255,255,255,0.15);--x-splash-progress-track-color:rgba(255,255,255,0.12);}}[part\x3doverlay]{position:fixed;inset:0;z-index:var(--x-splash-z-index);display:none;align-items:center;justify-content:center;background:var(--x-splash-bg);color:var(--x-splash-color);opacity:0;transition:opacity var(--x-splash-fade-duration) var(--x-splash-fade-ease);}:host([active]) [part\x3doverlay]{display:flex;opacity:1;}:host([data-fading-out]) [part\x3doverlay]{display:flex;opacity:0;}:host([data-variant\x3d'minimal']) [part\x3doverlay]{background:transparent;}:host([data-variant\x3d'branded']) [part\x3doverlay]{background:var(--x-splash-branded-bg,var(--x-splash-bg));}:host([data-overlay\x3d'blur']) [part\x3doverlay]{background:rgba(255,255,255,0.7);backdrop-filter:blur(var(--x-splash-blur-amount));-webkit-backdrop-filter:blur(var(--x-splash-blur-amount));}@media (prefers-color-scheme:dark){:host([data-overlay\x3d'blur']) [part\x3doverlay]{background:rgba(15,23,42,0.7);}}:host([data-overlay\x3d'transparent']) [part\x3doverlay]{background:transparent;}[part\x3dcontent]{display:flex;flex-direction:column;align-items:center;gap:var(--x-splash-gap);max-width:80vw;text-align:center;}[part\x3dspinner]{display:block;width:var(--x-splash-spinner-size);height:var(--x-splash-spinner-size);border:var(--x-splash-spinner-thickness) solid var(--x-splash-spinner-track-color);border-top-color:var(--x-splash-spinner-color);border-radius:50%;animation:x-splash-spin var(--x-splash-spinner-duration) linear infinite;box-sizing:border-box;}@keyframes x-splash-spin{to{transform:rotate(360deg);}}[part\x3dprogress]{display:none;width:min(300px,60vw);height:var(--x-splash-progress-height);background:var(--x-splash-progress-track-color);border-radius:var(--x-splash-progress-radius);overflow:hidden;}[part\x3dbar]{height:100%;background:var(--x-splash-progress-color);border-radius:var(--x-splash-progress-radius);transition:width 200ms ease;width:0%;}@media (prefers-reduced-motion:reduce){[part\x3doverlay]{transition:none !important;}[part\x3dspinner]{animation:none !important;}[part\x3dbar]{transition:none !important;}}";
4
- d.setAttribute("part","overlay");e.setAttribute("part","content");h.setAttribute("part","spinner");h.setAttribute("aria-hidden","true");k.setAttribute("part","progress");k.setAttribute("role","progressbar");k.setAttribute("aria-valuemin","0");k.setAttribute("aria-valuemax","100");m.setAttribute("part","bar");k.appendChild(m);e.appendChild(g);e.appendChild(h);e.appendChild(k);d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xSplashRefs=new $APP.R(null,6,[$APP.Jh,b,HF,d,IF,e,JF,h,$APP.ei,k,KF,
5
- m],null);return $APP.l(a,"__xSplashRefs")},MF=function(a){a=typeof a==="string"?a.trim():"";return $APP.C.h(a,"")||$APP.C.h(a,"0")||$APP.C.h(a,"0ms")||$APP.C.h(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},NF=function(a){a=window.getComputedStyle(a);a=MF(a.getPropertyValue("--x-splash-fade-duration"));return a>0?a:
6
- 400},OF=function(a){var b=$APP.l(a,"__xSplashFadeTimer");$APP.n(b)&&(clearTimeout(b),a.__xSplashFadeTimer=null)},PF=function(a){OF(a);a.__xSplashFadingOut=!1;a.removeAttribute("data-fading-out");var b=LF(a);b=$APP.N(b);$APP.I(b,HF).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},QF=function(a){if(!$APP.n($APP.l(a,"__xSplashFadingOut")))if(a.__xSplashFadingOut=!0,$APP.J(window.matchMedia("(prefers-reduced-motion:reduce)").matches))PF(a);
7
- else{var b=LF(a);b=$APP.N(b);var c=$APP.I(b,HF),d=function h(g){return $APP.C.h(g.target,c)&&$APP.C.h(g.propertyName,"opacity")?(c.removeEventListener("transitionend",h),$APP.n($APP.l(a,"__xSplashFadingOut"))?PF(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.l(a,"__xSplashFadingOut"))?c.style.opacity="0":null})});$APP.ma(a,
8
- "__xSplashFadeTimer",setTimeout(function(){return $APP.n($APP.l(a,"__xSplashFadingOut"))?(c.removeEventListener("transitionend",d),PF(a)):null},NF(a)+60))}},ZF=function(a){var b=new $APP.R(null,5,[RF,a.hasAttribute("active"),$APP.Lj,a.getAttribute("variant"),$APP.Qi,a.getAttribute("progress"),SF,a.getAttribute("spinner"),TF,a.getAttribute("overlay")],null);var c=$APP.N(b);b=$APP.I(c,RF);var d=$APP.I(c,$APP.Lj),e=$APP.I(c,$APP.Qi),g=$APP.I(c,SF);c=$APP.I(c,TF);b=$APP.J(b);d=typeof d==="string"?d.trim().toLowerCase():
9
- null;d=$APP.K(UF,d)?d:"default";e=FF(e);g=GF(g);c=typeof c==="string"?c.trim().toLowerCase():null;c=$APP.K(VF,c)?c:"solid";b=new $APP.R(null,5,[WF,b,$APP.jh,d,$APP.mk,e,XF,g,YF,c],null);if($APP.O($APP.l(a,"__xSplashModel"),b)){b=$APP.N(b);c=$APP.I(b,WF);e=$APP.I(b,$APP.jh);d=$APP.I(b,$APP.mk);var h=$APP.I(b,XF),k=$APP.I(b,YF);g=LF(a);var m=$APP.N(g);g=$APP.I(m,HF);var p=$APP.I(m,JF),q=$APP.I(m,$APP.ei),v=$APP.I(m,KF);m=$APP.l(a,"__xSplashModel");var x=WF.g(m);a.setAttribute("data-variant",e);a.setAttribute("data-overlay",
10
- k);p.style.display=$APP.n(h)?"block":"none";d!=null?(q.style.display="block",v.style.width=""+$APP.T.g(d)+"%",q.setAttribute("aria-valuenow",""+$APP.T.g(d))):(q.style.display="none",q.removeAttribute("aria-valuenow"));$APP.n($APP.n(c)?$APP.r(x):c)?($APP.n($APP.l(a,"__xSplashFadingOut"))&&(OF(a),a.__xSplashFadingOut=!1,a.removeAttribute("data-fading-out"),c=LF(a),c=$APP.N(c),c=$APP.I(c,HF),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.r(c),$APP.n(e?x:e)?QF(a):$APP.r(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}},$F=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.T.g(b)):this.removeAttribute("variant")},enumerable:!0,configurable:!0});Object.defineProperty(a,"progress",{get:function(){return FF(this.getAttribute("progress"))},set:function(b){return b==null?this.removeAttribute("progress"):this.setAttribute("progress",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,
13
- "spinner",{get:function(){return GF(this.getAttribute("spinner"))},set:function(b){return $APP.n(b)?this.setAttribute("spinner",""):this.setAttribute("spinner","false")},enumerable:!0,configurable:!0});Object.defineProperty(a,"overlay",{get:function(){var b=this.getAttribute("overlay");return $APP.n(b)?b:"solid"},set:function(b){return $APP.n(b)?this.setAttribute("overlay",""+$APP.T.g(b)):this.removeAttribute("overlay")},enumerable:!0,configurable:!0})},bG=function(){var a=class extends HTMLElement{};
14
- a.observedAttributes=aG;a.prototype.connectedCallback=function(){LF(this);OF(this);ZF(this);return null};a.prototype.disconnectedCallback=function(){OF(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&ZF(this);return null};$F(a.prototype);return a},cG=function(){$APP.n(customElements.get("x-splash"))||customElements.define("x-splash",bG());return null},HF=new $APP.M(null,"overlay-el","overlay-el",-308547109),IF=new $APP.M(null,"content-el","content-el",-1423019925),
15
- JF=new $APP.M(null,"spinner-el","spinner-el",-1536400516),KF=new $APP.M(null,"bar-el","bar-el",2050414242),XF=new $APP.M(null,"spinner?","spinner?",939139177),WF=new $APP.M(null,"active?","active?",459499776),RF=new $APP.M(null,"active-present?","active-present?",73064660),SF=new $APP.M(null,"spinner-attr","spinner-attr",-479327548),TF=new $APP.M(null,"overlay-raw","overlay-raw",1018775670),YF=new $APP.M(null,"overlay","overlay",-139131598);var aG=["active","variant","progress","spinner","overlay"];$APP.Ed(["x-splash-hidden",new $APP.R(null,2,[$APP.V,$APP.Fd,$APP.rk,!1],null)]);var UF=new $APP.S(null,new $APP.R(null,3,["minimal",null,"branded",null,"default",null],null),null),VF=new $APP.S(null,new $APP.R(null,3,["transparent",null,"solid",null,"blur",null],null),null);$APP.ja("baredom.exports.x_splash.init",cG);export const init=cG;
4
+ d.setAttribute("part","overlay");e.setAttribute("part","content");h.setAttribute("part","spinner");h.setAttribute("aria-hidden","true");k.setAttribute("part","progress");k.setAttribute("role","progressbar");k.setAttribute("aria-valuemin","0");k.setAttribute("aria-valuemax","100");m.setAttribute("part","bar");k.appendChild(m);e.appendChild(g);e.appendChild(h);e.appendChild(k);d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xSplashRefs=new $APP.P(null,6,[$APP.bi,b,EI,d,FI,e,GI,h,$APP.Ei,k,HI,
5
+ m],null);return $APP.l(a,"__xSplashRefs")},JI=function(a){a=typeof a==="string"?a.trim():"";return $APP.D.i(a,"")||$APP.D.i(a,"0")||$APP.D.i(a,"0ms")||$APP.D.i(a,"0s")?0:$APP.r(a.endsWith("ms"))?(a=parseFloat(a.slice(0,a.length-2)),$APP.r(isNaN(a))?0:Math.max(0,Math.round(a))):$APP.r(a.endsWith("s"))?(a=parseFloat(a.slice(0,a.length-1)),$APP.r(isNaN(a))?0:Math.max(0,Math.round(1E3*a))):0},KI=function(a){a=window.getComputedStyle(a);a=JI(a.getPropertyValue("--x-splash-fade-duration"));return a>0?a:
6
+ 400},LI=function(a){var b=$APP.l(a,"__xSplashFadeTimer");$APP.r(b)&&(clearTimeout(b),a.__xSplashFadeTimer=null)},MI=function(a){LI(a);a.__xSplashFadingOut=!1;a.removeAttribute("data-fading-out");var b=II(a);b=$APP.N(b);$APP.G(b,EI).style.display="none";a.removeAttribute("aria-busy");b=new CustomEvent("x-splash-hidden",{detail:{},bubbles:!0,composed:!0,cancelable:!1});a.dispatchEvent(b);return null},NI=function(a){if(!$APP.r($APP.l(a,"__xSplashFadingOut")))if(a.__xSplashFadingOut=!0,$APP.I(window.matchMedia("(prefers-reduced-motion:reduce)").matches))MI(a);
7
+ else{var b=II(a);b=$APP.N(b);var c=$APP.G(b,EI),d=function h(g){return $APP.D.i(g.target,c)&&$APP.D.i(g.propertyName,"opacity")?(c.removeEventListener("transitionend",h),$APP.r($APP.l(a,"__xSplashFadingOut"))?MI(a):null):null};c.style.display="flex";c.style.opacity="1";a.setAttribute("data-fading-out","");c.addEventListener("transitionend",d);requestAnimationFrame(function(){return requestAnimationFrame(function(){return $APP.r($APP.l(a,"__xSplashFadingOut"))?c.style.opacity="0":null})});$APP.n(a,
8
+ "__xSplashFadeTimer",setTimeout(function(){return $APP.r($APP.l(a,"__xSplashFadingOut"))?(c.removeEventListener("transitionend",d),MI(a)):null},KI(a)+60))}},WI=function(a){var b=new $APP.P(null,5,[OI,a.hasAttribute("active"),$APP.Ak,a.getAttribute("variant"),$APP.tj,a.getAttribute("progress"),PI,a.getAttribute("spinner"),QI,a.getAttribute("overlay")],null);var c=$APP.N(b);b=$APP.G(c,OI);var d=$APP.G(c,$APP.Ak),e=$APP.G(c,$APP.tj),g=$APP.G(c,PI);c=$APP.G(c,QI);b=$APP.I(b);d=typeof d==="string"?d.trim().toLowerCase():
9
+ null;d=$APP.J(RI,d)?d:"default";e=CI(e);g=DI(g);c=typeof c==="string"?c.trim().toLowerCase():null;c=$APP.J(SI,c)?c:"solid";b=new $APP.P(null,5,[TI,b,$APP.Fh,d,$APP.dl,e,UI,g,VI,c],null);if($APP.O($APP.l(a,"__xSplashModel"),b)){b=$APP.N(b);c=$APP.G(b,TI);e=$APP.G(b,$APP.Fh);d=$APP.G(b,$APP.dl);var h=$APP.G(b,UI),k=$APP.G(b,VI);g=II(a);var m=$APP.N(g);g=$APP.G(m,EI);var p=$APP.G(m,GI),q=$APP.G(m,$APP.Ei),w=$APP.G(m,HI);m=$APP.l(a,"__xSplashModel");var x=TI.g(m);a.setAttribute("data-variant",e);a.setAttribute("data-overlay",
10
+ k);p.style.display=$APP.r(h)?"block":"none";d!=null?(q.style.display="block",w.style.width=""+$APP.S.g(d)+"%",q.setAttribute("aria-valuenow",""+$APP.S.g(d))):(q.style.display="none",q.removeAttribute("aria-valuenow"));$APP.r($APP.r(c)?$APP.t(x):c)?($APP.r($APP.l(a,"__xSplashFadingOut"))&&(LI(a),a.__xSplashFadingOut=!1,a.removeAttribute("data-fading-out"),c=II(a),c=$APP.N(c),c=$APP.G(c,EI),c.style.display="",c.style.opacity=""),a.setAttribute("aria-busy","true"),a.setAttribute("aria-live","polite"),
11
+ a.setAttribute("role","status"),g.style.display="",g.style.opacity=""):(e=$APP.t(c),$APP.r(e?x:e)?NI(a):$APP.t(c)&&m==null&&(g.style.display="none",a.removeAttribute("aria-busy")));$APP.r(a.hasAttribute("aria-label"))||a.setAttribute("aria-label","Loading");a.__xSplashModel=b}},XI=function(a){Object.defineProperty(a,"active",{get:function(){return this.hasAttribute("active")},set:function(b){return $APP.r(b)?this.setAttribute("active",""):this.removeAttribute("active")},enumerable:!0,configurable:!0});
12
+ Object.defineProperty(a,"variant",{get:function(){var b=this.getAttribute("variant");return $APP.r(b)?b:"default"},set:function(b){return $APP.r(b)?this.setAttribute("variant",""+$APP.S.g(b)):this.removeAttribute("variant")},enumerable:!0,configurable:!0});Object.defineProperty(a,"progress",{get:function(){return CI(this.getAttribute("progress"))},set:function(b){return b==null?this.removeAttribute("progress"):this.setAttribute("progress",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,
13
+ "spinner",{get:function(){return DI(this.getAttribute("spinner"))},set:function(b){return $APP.r(b)?this.setAttribute("spinner",""):this.setAttribute("spinner","false")},enumerable:!0,configurable:!0});Object.defineProperty(a,"overlay",{get:function(){var b=this.getAttribute("overlay");return $APP.r(b)?b:"solid"},set:function(b){return $APP.r(b)?this.setAttribute("overlay",""+$APP.S.g(b)):this.removeAttribute("overlay")},enumerable:!0,configurable:!0})},ZI=function(){var a=class extends HTMLElement{};
14
+ a.observedAttributes=YI;a.prototype.connectedCallback=function(){II(this);LI(this);WI(this);return null};a.prototype.disconnectedCallback=function(){LI(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&WI(this);return null};XI(a.prototype);return a},$I=function(){$APP.r(customElements.get("x-splash"))||customElements.define("x-splash",ZI());return null},EI=new $APP.M(null,"overlay-el","overlay-el",-308547109),FI=new $APP.M(null,"content-el","content-el",-1423019925),
15
+ GI=new $APP.M(null,"spinner-el","spinner-el",-1536400516),HI=new $APP.M(null,"bar-el","bar-el",2050414242),UI=new $APP.M(null,"spinner?","spinner?",939139177),TI=new $APP.M(null,"active?","active?",459499776),OI=new $APP.M(null,"active-present?","active-present?",73064660),PI=new $APP.M(null,"spinner-attr","spinner-attr",-479327548),QI=new $APP.M(null,"overlay-raw","overlay-raw",1018775670),VI=new $APP.M(null,"overlay","overlay",-139131598);var YI=["active","variant","progress","spinner","overlay"];$APP.Sd(["x-splash-hidden",new $APP.P(null,2,[$APP.U,$APP.Td,$APP.kl,!1],null)]);var RI=new $APP.R(null,new $APP.P(null,3,["minimal",null,"branded",null,"default",null],null),null),SI=new $APP.R(null,new $APP.P(null,3,["transparent",null,"solid",null,"blur",null],null),null);$APP.ka("baredom.exports.x_splash.init",$I);export const init=$I;