@vanelsas/baredom 2.0.0 → 2.1.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 (87) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +26 -7
  3. package/dist/base.js +405 -403
  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-carousel.js +35 -0
  15. package/dist/x-chart.js +48 -48
  16. package/dist/x-checkbox.js +11 -11
  17. package/dist/x-chip.js +9 -9
  18. package/dist/x-collapse.js +11 -11
  19. package/dist/x-color-picker.js +46 -0
  20. package/dist/x-command-palette.js +27 -32
  21. package/dist/x-container.js +6 -6
  22. package/dist/x-context-menu.js +20 -20
  23. package/dist/x-copy.js +23 -23
  24. package/dist/x-currency-field.js +23 -23
  25. package/dist/x-date-picker.js +42 -42
  26. package/dist/x-divider.js +10 -13
  27. package/dist/x-drawer.js +12 -12
  28. package/dist/x-dropdown.js +10 -10
  29. package/dist/x-fieldset.js +6 -6
  30. package/dist/x-file-download.js +7 -7
  31. package/dist/x-form-field.js +16 -16
  32. package/dist/x-form.js +10 -10
  33. package/dist/x-gaussian-blur.js +18 -18
  34. package/dist/x-grid.js +6 -6
  35. package/dist/x-kinetic-font.js +29 -28
  36. package/dist/x-kinetic-typography.js +39 -39
  37. package/dist/x-liquid-dock.js +39 -39
  38. package/dist/x-liquid-fill.js +45 -44
  39. package/dist/x-liquid-glass.js +47 -47
  40. package/dist/x-menu-item.js +10 -10
  41. package/dist/x-menu.js +11 -12
  42. package/dist/x-metaball-cursor.js +27 -28
  43. package/dist/x-modal.js +13 -13
  44. package/dist/x-morph-stack.js +39 -39
  45. package/dist/x-navbar.js +13 -13
  46. package/dist/x-neural-glow.js +34 -34
  47. package/dist/x-notification-center.js +10 -9
  48. package/dist/x-organic-divider.js +19 -19
  49. package/dist/x-organic-progress.js +38 -38
  50. package/dist/x-organic-shape.js +14 -14
  51. package/dist/x-pagination.js +16 -16
  52. package/dist/x-particle-button.js +53 -0
  53. package/dist/x-popover.js +15 -15
  54. package/dist/x-progress-circle.js +11 -11
  55. package/dist/x-progress.js +11 -11
  56. package/dist/x-radio.js +11 -11
  57. package/dist/x-ripple-effect.js +12 -12
  58. package/dist/x-scroll-parallax.js +19 -19
  59. package/dist/x-scroll-stack.js +19 -19
  60. package/dist/x-scroll-story.js +36 -36
  61. package/dist/x-scroll-timeline.js +47 -47
  62. package/dist/x-scroll.js +42 -42
  63. package/dist/x-search-field.js +15 -15
  64. package/dist/x-select.js +11 -11
  65. package/dist/x-sidebar.js +17 -17
  66. package/dist/x-skeleton.js +6 -6
  67. package/dist/x-slider.js +16 -16
  68. package/dist/x-soft-body.js +22 -22
  69. package/dist/x-spacer.js +5 -5
  70. package/dist/x-spinner.js +5 -5
  71. package/dist/x-splash.js +13 -13
  72. package/dist/x-stat.js +11 -11
  73. package/dist/x-stepper.js +16 -16
  74. package/dist/x-switch.js +10 -10
  75. package/dist/x-tab.js +8 -8
  76. package/dist/x-table-cell.js +24 -24
  77. package/dist/x-table-row.js +10 -10
  78. package/dist/x-table.js +16 -16
  79. package/dist/x-tabs.js +11 -11
  80. package/dist/x-text-area.js +19 -19
  81. package/dist/x-theme.js +25 -24
  82. package/dist/x-timeline-item.js +24 -24
  83. package/dist/x-timeline.js +9 -9
  84. package/dist/x-toast.js +25 -25
  85. package/dist/x-toaster.js +8 -8
  86. package/dist/x-typography.js +11 -11
  87. package/package.json +14 -2
package/dist/x-spinner.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var aW=function(a){var b=new $APP.P(null,3,[$APP.rh,a.getAttribute("size"),$APP.Fh,a.getAttribute("variant"),$APP.T,a.getAttribute("label")],null);var c=$APP.N(b),d=$APP.G(c,$APP.rh);b=$APP.G(c,$APP.Fh);c=$APP.G(c,$APP.T);d=typeof d==="string"&&$APP.J(ZV,d)?d:"md";b=typeof b==="string"&&$APP.J($V,b)?b:"default";c=typeof c==="string"&&$APP.O("",c.trim())?c.trim():"Loading";d=$APP.N(new $APP.P(null,3,[$APP.rh,d,$APP.Fh,b,$APP.T,c],null));b=$APP.G(d,$APP.rh);c=$APP.G(d,$APP.Fh);d=$APP.G(d,$APP.T);a.setAttribute("data-size",
3
- b);a.setAttribute("data-variant",c);a.setAttribute("aria-label",d)},bW=function(a){Object.defineProperty(a,"size",{get:function(){var b=this.getAttribute("size");return $APP.r(b)?b:"md"},set:function(b){return $APP.r(b)?this.setAttribute("size",""+$APP.S.g(b)):this.removeAttribute("size")},enumerable:!0,configurable:!0});Object.defineProperty(a,"variant",{get:function(){var b=this.getAttribute("variant");return $APP.r(b)?b:"default"},set:function(b){return $APP.r(b)?this.setAttribute("variant",""+
4
- $APP.S.g(b)):this.removeAttribute("variant")},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.r(b)?b:"Loading"},set:function(b){return $APP.r(b)?this.setAttribute("label",""+$APP.S.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0})},dW=function(){var a=class extends HTMLElement{};a.observedAttributes=cW;a.prototype.connectedCallback=function(){if(!$APP.r($APP.l(this,"__xSpinnerInit"))){var b=this.attachShadow({mode:"open"}),
2
+ var CZ=function(a){var b=new $APP.R(null,3,[$APP.th,a.getAttribute("size"),$APP.Nh,a.getAttribute("variant"),$APP.U,a.getAttribute("label")],null);var c=$APP.M(b),d=$APP.D(c,$APP.th);b=$APP.D(c,$APP.Nh);c=$APP.D(c,$APP.U);d=typeof d==="string"&&$APP.J(AZ,d)?d:"md";b=typeof b==="string"&&$APP.J(BZ,b)?b:"default";c=typeof c==="string"&&$APP.N("",c.trim())?c.trim():"Loading";d=$APP.M(new $APP.R(null,3,[$APP.th,d,$APP.Nh,b,$APP.U,c],null));b=$APP.D(d,$APP.th);c=$APP.D(d,$APP.Nh);d=$APP.D(d,$APP.U);a.setAttribute("data-size",
3
+ b);a.setAttribute("data-variant",c);a.setAttribute("aria-label",d)},DZ=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})},FZ=function(){var a=class extends HTMLElement{};a.observedAttributes=EZ;a.prototype.connectedCallback=function(){if(!$APP.n($APP.k(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:var(--x-color-primary,#3b82f6);}:host([data-variant\x3d'success']){--x-spinner-color:var(--x-color-success,#22c55e);}:host([data-variant\x3d'warning']){--x-spinner-color:var(--x-color-warning,#f59e0b);}:host([data-variant\x3d'danger']){--x-spinner-color:var(--x-color-danger,#ef4444);}[part\x3dring]{display:block;width:var(--x-spinner-size);height:var(--x-spinner-size);border-radius:50%;border:var(--x-spinner-thickness) solid var(--x-spinner-track-color);border-top-color:var(--x-spinner-color);box-sizing:border-box;animation:x-spinner-spin var(--x-spinner-duration) linear infinite;}@keyframes x-spinner-spin{to{transform:rotate(360deg);}}@media (prefers-reduced-motion:reduce){[part\x3dring]{animation-play-state:paused;}}";
6
- d.setAttribute("part","ring");d.setAttribute("aria-hidden","true");b.appendChild(c);b.appendChild(d);this.setAttribute("role","status");this.setAttribute("aria-live","polite");this.__xSpinnerRing=d;this.__xSpinnerInit=!0}aW(this);return null};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=function(b,c,d){b=$APP.O(c,d);$APP.r(b?$APP.l(this,"__xSpinnerInit"):b)&&aW(this);return null};bW(a.prototype);return a},eW=function(){$APP.r(customElements.get("x-spinner"))||
7
- customElements.define("x-spinner",dW());return null};var cW=["size","variant","label"],ZV=new $APP.R(null,new $APP.P(null,5,["xs",null,"md",null,"lg",null,"xl",null,"sm",null],null),null),$V=new $APP.R(null,new $APP.P(null,5,["success",null,"warning",null,"primary",null,"danger",null,"default",null],null),null);$APP.ka("baredom.exports.x_spinner.init",eW);export const init=eW;
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}CZ(this);return null};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=function(b,c,d){b=$APP.N(c,d);$APP.n(b?$APP.k(this,"__xSpinnerInit"):b)&&CZ(this);return null};DZ(a.prototype);return a},GZ=function(){$APP.n(customElements.get("x-spinner"))||
7
+ customElements.define("x-spinner",FZ());return null};var EZ=["size","variant","label"],AZ=new $APP.S(null,new $APP.R(null,5,["xs",null,"md",null,"lg",null,"xl",null,"sm",null],null),null),BZ=new $APP.S(null,new $APP.R(null,5,["success",null,"warning",null,"primary",null,"danger",null,"default",null],null),null);$APP.fa("baredom.exports.x_spinner.init",GZ);export const init=GZ;
package/dist/x-splash.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var gJ=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.r(isNaN(a))?null:$APP.Yg.i(0,$APP.Zg.i(100,a))):null},hJ=function(a){return a==null?!0:$APP.O((""+$APP.S.g(a)).trim().toLowerCase(),"false")},mJ=function(a){var b=$APP.l(a,"__xSplashRefs");if($APP.r(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("slot"),h=document.createElement("span"),k=document.createElement("div"),
2
+ var lL=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.n(isNaN(a))?null:$APP.$g.i(0,$APP.ah.i(100,a))):null},mL=function(a){return a==null?!0:$APP.N((""+$APP.T.g(a)).trim().toLowerCase(),"false")},rL=function(a){var b=$APP.k(a,"__xSplashRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("slot"),h=document.createElement("span"),l=document.createElement("div"),
3
3
  m=document.createElement("div");c.textContent=":host{display:block;color-scheme:light dark;--x-splash-bg:var(--x-color-bg, #ffffff);--x-splash-color:var(--x-color-text, #0f172a);--x-splash-z-index:9999;--x-splash-fade-duration:var(--x-transition-duration, 400ms);--x-splash-fade-ease:cubic-bezier(0.4,0,0.2,1);--x-splash-spinner-size:40px;--x-splash-spinner-color:var(--x-color-text, currentColor);--x-splash-spinner-track-color:var(--x-color-border, rgba(0,0,0,0.12));--x-splash-spinner-thickness:3px;--x-splash-spinner-duration:0.75s;--x-splash-progress-height:4px;--x-splash-progress-color:var(--x-color-primary, #3b82f6);--x-splash-progress-track-color:var(--x-color-border, rgba(0,0,0,0.08));--x-splash-progress-radius:var(--x-radius-sm, 2px);--x-splash-gap:20px;--x-splash-blur-amount:8px;}@media (prefers-color-scheme:dark){:host{--x-splash-bg:var(--x-color-bg, #0f172a);--x-splash-color:var(--x-color-text, #f8fafc);--x-splash-spinner-track-color:var(--x-color-border, rgba(255,255,255,0.15));--x-splash-progress-track-color:var(--x-color-border, rgba(255,255,255,0.12));}}[part\x3doverlay]{position:fixed;inset:0;z-index:var(--x-splash-z-index);display:none;align-items:center;justify-content:center;background:var(--x-splash-bg);color:var(--x-splash-color);opacity:0;transition:opacity var(--x-splash-fade-duration) var(--x-splash-fade-ease);}:host([active]) [part\x3doverlay]{display:flex;opacity:1;}:host([data-fading-out]) [part\x3doverlay]{display:flex;opacity:0;}:host([data-variant\x3d'minimal']) [part\x3doverlay]{background:transparent;}:host([data-variant\x3d'branded']) [part\x3doverlay]{background:var(--x-splash-branded-bg,var(--x-splash-bg));}:host([data-overlay\x3d'blur']) [part\x3doverlay]{background:rgba(255,255,255,0.7);backdrop-filter:blur(var(--x-splash-blur-amount));-webkit-backdrop-filter:blur(var(--x-splash-blur-amount));}@media (prefers-color-scheme:dark){:host([data-overlay\x3d'blur']) [part\x3doverlay]{background:rgba(15,23,42,0.7);}}:host([data-overlay\x3d'transparent']) [part\x3doverlay]{background:transparent;}[part\x3dcontent]{display:flex;flex-direction:column;align-items:center;gap:var(--x-splash-gap);max-width:80vw;text-align:center;}[part\x3dspinner]{display:block;width:var(--x-splash-spinner-size);height:var(--x-splash-spinner-size);border:var(--x-splash-spinner-thickness) solid var(--x-splash-spinner-track-color);border-top-color:var(--x-splash-spinner-color);border-radius:50%;animation:x-splash-spin var(--x-splash-spinner-duration) linear infinite;box-sizing:border-box;}@keyframes x-splash-spin{to{transform:rotate(360deg);}}[part\x3dprogress]{display:none;width:min(300px,60vw);height:var(--x-splash-progress-height);background:var(--x-splash-progress-track-color);border-radius:var(--x-splash-progress-radius);overflow:hidden;}[part\x3dbar]{height:100%;background:var(--x-splash-progress-color);border-radius:var(--x-splash-progress-radius);transition:width 200ms ease;width:0%;}@media (prefers-reduced-motion:reduce){[part\x3doverlay]{transition:none !important;}[part\x3dspinner]{animation:none !important;}[part\x3dbar]{transition:none !important;}}";
4
- d.setAttribute("part","overlay");e.setAttribute("part","content");h.setAttribute("part","spinner");h.setAttribute("aria-hidden","true");k.setAttribute("part","progress");k.setAttribute("role","progressbar");k.setAttribute("aria-valuemin","0");k.setAttribute("aria-valuemax","100");m.setAttribute("part","bar");k.appendChild(m);e.appendChild(g);e.appendChild(h);e.appendChild(k);d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xSplashRefs=new $APP.P(null,6,[$APP.bi,b,iJ,d,jJ,e,kJ,h,$APP.Ei,k,lJ,
5
- m],null);return $APP.l(a,"__xSplashRefs")},nJ=function(a){a=typeof a==="string"?a.trim():"";return $APP.D.i(a,"")||$APP.D.i(a,"0")||$APP.D.i(a,"0ms")||$APP.D.i(a,"0s")?0:$APP.r(a.endsWith("ms"))?(a=parseFloat(a.slice(0,a.length-2)),$APP.r(isNaN(a))?0:Math.max(0,Math.round(a))):$APP.r(a.endsWith("s"))?(a=parseFloat(a.slice(0,a.length-1)),$APP.r(isNaN(a))?0:Math.max(0,Math.round(1E3*a))):0},oJ=function(a){a=window.getComputedStyle(a);a=nJ(a.getPropertyValue("--x-splash-fade-duration"));return a>0?a:
6
- 400},pJ=function(a){var b=$APP.l(a,"__xSplashFadeTimer");$APP.r(b)&&(clearTimeout(b),a.__xSplashFadeTimer=null)},qJ=function(a){pJ(a);a.__xSplashFadingOut=!1;a.removeAttribute("data-fading-out");var b=mJ(a);b=$APP.N(b);$APP.G(b,iJ).style.display="none";a.removeAttribute("aria-busy");b=new CustomEvent("x-splash-hidden",{detail:{},bubbles:!0,composed:!0,cancelable:!1});a.dispatchEvent(b);return null},rJ=function(a){if(!$APP.r($APP.l(a,"__xSplashFadingOut")))if(a.__xSplashFadingOut=!0,$APP.I(window.matchMedia("(prefers-reduced-motion:reduce)").matches))qJ(a);
7
- else{var b=mJ(a);b=$APP.N(b);var c=$APP.G(b,iJ),d=function h(g){return $APP.D.i(g.target,c)&&$APP.D.i(g.propertyName,"opacity")?(c.removeEventListener("transitionend",h),$APP.r($APP.l(a,"__xSplashFadingOut"))?qJ(a):null):null};c.style.display="flex";c.style.opacity="1";a.setAttribute("data-fading-out","");c.addEventListener("transitionend",d);requestAnimationFrame(function(){return requestAnimationFrame(function(){return $APP.r($APP.l(a,"__xSplashFadingOut"))?c.style.opacity="0":null})});$APP.n(a,
8
- "__xSplashFadeTimer",setTimeout(function(){return $APP.r($APP.l(a,"__xSplashFadingOut"))?(c.removeEventListener("transitionend",d),qJ(a)):null},oJ(a)+60))}},AJ=function(a){var b=new $APP.P(null,5,[sJ,a.hasAttribute("active"),$APP.Bk,a.getAttribute("variant"),$APP.tj,a.getAttribute("progress"),tJ,a.getAttribute("spinner"),uJ,a.getAttribute("overlay")],null);var c=$APP.N(b);b=$APP.G(c,sJ);var d=$APP.G(c,$APP.Bk),e=$APP.G(c,$APP.tj),g=$APP.G(c,tJ);c=$APP.G(c,uJ);b=$APP.I(b);d=typeof d==="string"?d.trim().toLowerCase():
9
- null;d=$APP.J(vJ,d)?d:"default";e=gJ(e);g=hJ(g);c=typeof c==="string"?c.trim().toLowerCase():null;c=$APP.J(wJ,c)?c:"solid";b=new $APP.P(null,5,[xJ,b,$APP.Fh,d,$APP.el,e,yJ,g,zJ,c],null);if($APP.O($APP.l(a,"__xSplashModel"),b)){b=$APP.N(b);c=$APP.G(b,xJ);e=$APP.G(b,$APP.Fh);d=$APP.G(b,$APP.el);var h=$APP.G(b,yJ),k=$APP.G(b,zJ);g=mJ(a);var m=$APP.N(g);g=$APP.G(m,iJ);var p=$APP.G(m,kJ),q=$APP.G(m,$APP.Ei),w=$APP.G(m,lJ);m=$APP.l(a,"__xSplashModel");var x=xJ.g(m);a.setAttribute("data-variant",e);a.setAttribute("data-overlay",
10
- k);p.style.display=$APP.r(h)?"block":"none";d!=null?(q.style.display="block",w.style.width=""+$APP.S.g(d)+"%",q.setAttribute("aria-valuenow",""+$APP.S.g(d))):(q.style.display="none",q.removeAttribute("aria-valuenow"));$APP.r($APP.r(c)?$APP.t(x):c)?($APP.r($APP.l(a,"__xSplashFadingOut"))&&(pJ(a),a.__xSplashFadingOut=!1,a.removeAttribute("data-fading-out"),c=mJ(a),c=$APP.N(c),c=$APP.G(c,iJ),c.style.display="",c.style.opacity=""),a.setAttribute("aria-busy","true"),a.setAttribute("aria-live","polite"),
11
- a.setAttribute("role","status"),g.style.display="",g.style.opacity=""):(e=$APP.t(c),$APP.r(e?x:e)?rJ(a):$APP.t(c)&&m==null&&(g.style.display="none",a.removeAttribute("aria-busy")));$APP.r(a.hasAttribute("aria-label"))||a.setAttribute("aria-label","Loading");a.__xSplashModel=b}},BJ=function(a){Object.defineProperty(a,"active",{get:function(){return this.hasAttribute("active")},set:function(b){return $APP.r(b)?this.setAttribute("active",""):this.removeAttribute("active")},enumerable:!0,configurable:!0});
12
- Object.defineProperty(a,"variant",{get:function(){var b=this.getAttribute("variant");return $APP.r(b)?b:"default"},set:function(b){return $APP.r(b)?this.setAttribute("variant",""+$APP.S.g(b)):this.removeAttribute("variant")},enumerable:!0,configurable:!0});Object.defineProperty(a,"progress",{get:function(){return gJ(this.getAttribute("progress"))},set:function(b){return b==null?this.removeAttribute("progress"):this.setAttribute("progress",""+$APP.S.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,
13
- "spinner",{get:function(){return hJ(this.getAttribute("spinner"))},set:function(b){return $APP.r(b)?this.setAttribute("spinner",""):this.setAttribute("spinner","false")},enumerable:!0,configurable:!0});Object.defineProperty(a,"overlay",{get:function(){var b=this.getAttribute("overlay");return $APP.r(b)?b:"solid"},set:function(b){return $APP.r(b)?this.setAttribute("overlay",""+$APP.S.g(b)):this.removeAttribute("overlay")},enumerable:!0,configurable:!0})},DJ=function(){var a=class extends HTMLElement{};
14
- a.observedAttributes=CJ;a.prototype.connectedCallback=function(){mJ(this);pJ(this);AJ(this);return null};a.prototype.disconnectedCallback=function(){pJ(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&AJ(this);return null};BJ(a.prototype);return a},EJ=function(){$APP.r(customElements.get("x-splash"))||customElements.define("x-splash",DJ());return null},iJ=new $APP.K(null,"overlay-el","overlay-el",-308547109),jJ=new $APP.K(null,"content-el","content-el",-1423019925),
15
- kJ=new $APP.K(null,"spinner-el","spinner-el",-1536400516),lJ=new $APP.K(null,"bar-el","bar-el",2050414242),yJ=new $APP.K(null,"spinner?","spinner?",939139177),xJ=new $APP.K(null,"active?","active?",459499776),sJ=new $APP.K(null,"active-present?","active-present?",73064660),tJ=new $APP.K(null,"spinner-attr","spinner-attr",-479327548),uJ=new $APP.K(null,"overlay-raw","overlay-raw",1018775670),zJ=new $APP.K(null,"overlay","overlay",-139131598);var CJ=["active","variant","progress","spinner","overlay"];$APP.Sd(["x-splash-hidden",new $APP.P(null,2,[$APP.U,$APP.Td,$APP.ll,!1],null)]);var vJ=new $APP.R(null,new $APP.P(null,3,["minimal",null,"branded",null,"default",null],null),null),wJ=new $APP.R(null,new $APP.P(null,3,["transparent",null,"solid",null,"blur",null],null),null);$APP.ka("baredom.exports.x_splash.init",EJ);export const init=EJ;
4
+ d.setAttribute("part","overlay");e.setAttribute("part","content");h.setAttribute("part","spinner");h.setAttribute("aria-hidden","true");l.setAttribute("part","progress");l.setAttribute("role","progressbar");l.setAttribute("aria-valuemin","0");l.setAttribute("aria-valuemax","100");m.setAttribute("part","bar");l.appendChild(m);e.appendChild(g);e.appendChild(h);e.appendChild(l);d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xSplashRefs=new $APP.R(null,6,[$APP.ji,b,nL,d,oL,e,pL,h,$APP.Ki,l,qL,
5
+ m],null);return $APP.k(a,"__xSplashRefs")},sL=function(a){a=typeof a==="string"?a.trim():"";return $APP.C.i(a,"")||$APP.C.i(a,"0")||$APP.C.i(a,"0ms")||$APP.C.i(a,"0s")?0:$APP.n(a.endsWith("ms"))?(a=parseFloat(a.slice(0,a.length-2)),$APP.n(isNaN(a))?0:Math.max(0,Math.round(a))):$APP.n(a.endsWith("s"))?(a=parseFloat(a.slice(0,a.length-1)),$APP.n(isNaN(a))?0:Math.max(0,Math.round(1E3*a))):0},tL=function(a){a=window.getComputedStyle(a);a=sL(a.getPropertyValue("--x-splash-fade-duration"));return a>0?a:
6
+ 400},uL=function(a){var b=$APP.k(a,"__xSplashFadeTimer");$APP.n(b)&&(clearTimeout(b),a.__xSplashFadeTimer=null)},vL=function(a){uL(a);a.__xSplashFadingOut=!1;a.removeAttribute("data-fading-out");var b=rL(a);b=$APP.M(b);$APP.D(b,nL).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},wL=function(a){if(!$APP.n($APP.k(a,"__xSplashFadingOut")))if(a.__xSplashFadingOut=!0,$APP.F(window.matchMedia("(prefers-reduced-motion:reduce)").matches))vL(a);
7
+ else{var b=rL(a);b=$APP.M(b);var c=$APP.D(b,nL),d=function h(g){return $APP.C.i(g.target,c)&&$APP.C.i(g.propertyName,"opacity")?(c.removeEventListener("transitionend",h),$APP.n($APP.k(a,"__xSplashFadingOut"))?vL(a):null):null};c.style.display="flex";c.style.opacity="1";a.setAttribute("data-fading-out","");c.addEventListener("transitionend",d);requestAnimationFrame(function(){return requestAnimationFrame(function(){return $APP.n($APP.k(a,"__xSplashFadingOut"))?c.style.opacity="0":null})});$APP.ia(a,
8
+ "__xSplashFadeTimer",setTimeout(function(){return $APP.n($APP.k(a,"__xSplashFadingOut"))?(c.removeEventListener("transitionend",d),vL(a)):null},tL(a)+60))}},FL=function(a){var b=new $APP.R(null,5,[xL,a.hasAttribute("active"),$APP.Jk,a.getAttribute("variant"),$APP.Ej,a.getAttribute("progress"),yL,a.getAttribute("spinner"),zL,a.getAttribute("overlay")],null);var c=$APP.M(b);b=$APP.D(c,xL);var d=$APP.D(c,$APP.Jk),e=$APP.D(c,$APP.Ej),g=$APP.D(c,yL);c=$APP.D(c,zL);b=$APP.F(b);d=typeof d==="string"?d.trim().toLowerCase():
9
+ null;d=$APP.J(AL,d)?d:"default";e=lL(e);g=mL(g);c=typeof c==="string"?c.trim().toLowerCase():null;c=$APP.J(BL,c)?c:"solid";b=new $APP.R(null,5,[CL,b,$APP.Nh,d,$APP.ol,e,DL,g,EL,c],null);if($APP.N($APP.k(a,"__xSplashModel"),b)){b=$APP.M(b);c=$APP.D(b,CL);e=$APP.D(b,$APP.Nh);d=$APP.D(b,$APP.ol);var h=$APP.D(b,DL),l=$APP.D(b,EL);g=rL(a);var m=$APP.M(g);g=$APP.D(m,nL);var p=$APP.D(m,pL),q=$APP.D(m,$APP.Ki),v=$APP.D(m,qL);m=$APP.k(a,"__xSplashModel");var x=CL.g(m);a.setAttribute("data-variant",e);a.setAttribute("data-overlay",
10
+ l);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.k(a,"__xSplashFadingOut"))&&(uL(a),a.__xSplashFadingOut=!1,a.removeAttribute("data-fading-out"),c=rL(a),c=$APP.M(c),c=$APP.D(c,nL),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)?wL(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}},GL=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 lL(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 mL(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})},IL=function(){var a=class extends HTMLElement{};
14
+ a.observedAttributes=HL;a.prototype.connectedCallback=function(){rL(this);uL(this);FL(this);return null};a.prototype.disconnectedCallback=function(){uL(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&FL(this);return null};GL(a.prototype);return a},JL=function(){$APP.n(customElements.get("x-splash"))||customElements.define("x-splash",IL());return null},nL=new $APP.K(null,"overlay-el","overlay-el",-308547109),oL=new $APP.K(null,"content-el","content-el",-1423019925),
15
+ pL=new $APP.K(null,"spinner-el","spinner-el",-1536400516),qL=new $APP.K(null,"bar-el","bar-el",2050414242),DL=new $APP.K(null,"spinner?","spinner?",939139177),CL=new $APP.K(null,"active?","active?",459499776),xL=new $APP.K(null,"active-present?","active-present?",73064660),yL=new $APP.K(null,"spinner-attr","spinner-attr",-479327548),zL=new $APP.K(null,"overlay-raw","overlay-raw",1018775670),EL=new $APP.K(null,"overlay","overlay",-139131598);var HL=["active","variant","progress","spinner","overlay"];$APP.Pd(["x-splash-hidden",new $APP.R(null,2,[$APP.yj,$APP.Qd,$APP.wl,!1],null)]);var AL=new $APP.S(null,new $APP.R(null,3,["minimal",null,"branded",null,"default",null],null),null),BL=new $APP.S(null,new $APP.R(null,3,["transparent",null,"solid",null,"blur",null],null),null);$APP.fa("baredom.exports.x_splash.init",JL);export const init=JL;
package/dist/x-stat.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var GK=function(a,b,c){return $APP.J(b,a)?a:c},HK=function(a){return $APP.r($APP.r(a)?$APP.O("",a):a)?a:null},QK=function(a){var b=$APP.N(a),c=$APP.G(b,IK),d=$APP.G(b,JK),e=$APP.G(b,$APP.Qi),g=$APP.G(b,$APP.Fh);a=$APP.G(b,$APP.ri);var h=$APP.G(b,$APP.al),k=$APP.G(b,$APP.rh),m=$APP.G(b,$APP.Dk);b=$APP.G(b,$APP.T);g=GK(g,KK,"default");e=GK(e,LK,"start");k=GK(k,MK,"md");c=GK(c,NK,"normal");d=GK(d,OK,"neutral");m=$APP.I(m);return $APP.Q([JK,$APP.Qi,$APP.Fh,$APP.ri,$APP.al,$APP.rh,$APP.Dk,$APP.T,PK,IK],
3
- [d,e,g,HK(a),HK(h),k,m,HK(b),m?"true":null,c])},RK=function(a){return $APP.Q([JK,$APP.Qi,$APP.Fh,$APP.ri,$APP.al,$APP.rh,$APP.Dk,$APP.T,IK],[a.getAttribute("trend"),a.getAttribute("align"),a.getAttribute("variant"),a.getAttribute("value"),a.getAttribute("hint"),a.getAttribute("size"),a.hasAttribute("loading"),a.getAttribute("label"),a.getAttribute("emphasis")])},SK=function(a,b){a.setAttribute("role","figure");var c=PK.g(b);$APP.r(c)?a.setAttribute("aria-busy",c):a.removeAttribute("aria-busy");b=
4
- $APP.T.g(b);$APP.r(b)?a.setAttribute("aria-label",b):a.removeAttribute("aria-label")},TK=function(a,b){a.setAttribute("data-variant",$APP.Fh.g(b));a.setAttribute("data-align",$APP.Qi.g(b));a.setAttribute("data-size",$APP.rh.g(b));a.setAttribute("data-emphasis",IK.g(b));a.setAttribute("data-trend",JK.g(b));$APP.r($APP.Dk.g(b))?a.setAttribute("data-loading","true"):a.removeAttribute("data-loading")},UK=function(a){var b=QK(RK(a)),c=$APP.l(a,"__x_stat_base"),d=$APP.l(a,"__x_stat_label"),e=$APP.l(a,"__x_stat_value"),
5
- g=$APP.l(a,"__x_stat_hint");return $APP.r(c)?(SK(a,b),TK(c,b),d.textContent=function(){var h=$APP.T.g(b);return $APP.r(h)?h:""}(),e.textContent=function(){var h=$APP.ri.g(b);return $APP.r(h)?h:""}(),g.textContent=function(){var h=$APP.al.g(b);return $APP.r(h)?h:""}()):null},VK=function(a){if($APP.l(a,"__x_stat_initialized")!==!0){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("div"),
6
- k=document.createElement("div"),m=document.createElement("div"),p=document.createElement("span"),q=document.createElement("span"),w=document.createElement("span"),x=document.createElement("slot"),y=document.createElement("slot"),A=document.createElement("slot"),B=document.createElement("slot"),E=document.createElement("slot");c.textContent=":host{display:block;color-scheme:light dark;--x-stat-background:transparent;--x-stat-color:var(--x-color-text,inherit);--x-stat-muted-color:var(--x-color-text-muted,rgba(0,0,0,0.55));--x-stat-border-color:var(--x-color-border,transparent);--x-stat-radius:var(--x-radius-md,12px);--x-stat-padding:16px;--x-stat-gap:6px;--x-stat-label-color:var(--x-stat-muted-color);--x-stat-label-size:12px;--x-stat-value-color:var(--x-stat-color);--x-stat-value-size:20px;--x-stat-hint-color:var(--x-stat-muted-color);--x-stat-hint-size:12px;--x-stat-icon-color:var(--x-stat-color);--x-stat-positive-color:var(--x-color-success,#16a34a);--x-stat-warning-color:var(--x-color-warning,#d97706);--x-stat-danger-color:var(--x-color-danger,#dc2626);--x-stat-transition-duration:var(--x-transition-duration,120ms);--x-stat-transition-timing:var(--x-transition-easing,ease);--x-stat-loading-opacity:0.6;}@media (prefers-color-scheme:dark){:host{--x-stat-muted-color:var(--x-color-text-muted,rgba(255,255,255,0.55));--x-stat-positive-color:var(--x-color-success,#4ade80);--x-stat-warning-color:var(--x-color-warning,#fbbf24);--x-stat-danger-color:var(--x-color-danger,#f87171);}}:host([variant\x3d'positive']){--x-stat-value-color:var(--x-stat-positive-color);}:host([variant\x3d'warning']){--x-stat-value-color:var(--x-stat-warning-color);}:host([variant\x3d'danger']){--x-stat-value-color:var(--x-stat-danger-color);}:host([variant\x3d'subtle']){--x-stat-value-color:var(--x-stat-muted-color);}[part\x3dbase]{display:grid;gap:var(--x-stat-gap);padding:var(--x-stat-padding);border-radius:var(--x-stat-radius);background:var(--x-stat-background);border:1px solid var(--x-stat-border-color);color:var(--x-stat-color);transition:background var(--x-stat-transition-duration) var(--x-stat-transition-timing),border-color var(--x-stat-transition-duration) var(--x-stat-transition-timing),color var(--x-stat-transition-duration) var(--x-stat-transition-timing),opacity var(--x-stat-transition-duration) var(--x-stat-transition-timing);}[part\x3dbase][data-align\x3d'center']{text-align:center;}[part\x3dbase][data-align\x3d'end']{text-align:end;}[part\x3dbase][data-size\x3d'sm'] [part\x3dvalue]{font-size:calc(var(--x-stat-value-size) * 0.8);}[part\x3dbase][data-size\x3d'lg'] [part\x3dvalue]{font-size:calc(var(--x-stat-value-size) * 1.6);}[part\x3dbase][data-emphasis\x3d'high'] [part\x3dvalue]{font-weight:800;}[part\x3dicon]{flex:0 0 auto;color:var(--x-stat-icon-color);line-height:1;}slot[name\x3dicon]::slotted(*){display:block;}[part\x3dlabel]{font-size:var(--x-stat-label-size);color:var(--x-stat-label-color);}[part\x3dvalue]{font-weight:600;font-size:var(--x-stat-value-size);color:var(--x-stat-value-color);}[part\x3dhint]{font-size:var(--x-stat-hint-size);color:var(--x-stat-hint-color);}[part\x3dbase][data-loading\x3d'true']{opacity:var(--x-stat-loading-opacity);}@media (prefers-reduced-motion:reduce){[part\x3dbase]{transition:none;}}";
7
- d.setAttribute("part","base");e.setAttribute("part","icon");g.setAttribute("part","body");h.setAttribute("part","label");k.setAttribute("part","value");m.setAttribute("part","hint");x.setAttribute("name","icon");y.setAttribute("name","label");A.setAttribute("name","value");B.setAttribute("name","hint");e.appendChild(x);h.appendChild(y);h.appendChild(p);k.appendChild(A);k.appendChild(q);m.appendChild(B);m.appendChild(w);g.appendChild(h);g.appendChild(k);g.appendChild(m);g.appendChild(E);d.appendChild(e);
8
- d.appendChild(g);b.appendChild(c);b.appendChild(d);a.__x_stat_root=b;a.__x_stat_base=d;a.__x_stat_label=p;a.__x_stat_value=q;a.__x_stat_hint=w;a.__x_stat_initialized=!0}UK(a);return a},WK=function(a,b){Object.defineProperty(a,b,{get:function(){var c=this.getAttribute(b);return $APP.r(c)?c:""},set:function(c){return $APP.r(c)?this.setAttribute(b,""+$APP.S.g(c)):this.removeAttribute(b)},enumerable:!0,configurable:!0})},XK=function(a){WK(a,"variant");WK(a,"align");WK(a,"size");WK(a,"emphasis");WK(a,
9
- "trend");WK(a,"label");WK(a,"value");WK(a,"hint");Object.defineProperty(a,"loading",{get:function(){return this.hasAttribute("loading")},set:function(b){return $APP.r(b)?this.setAttribute("loading",""):this.removeAttribute("loading")},enumerable:!0,configurable:!0})},ZK=function(){var a=class extends HTMLElement{};a.observedAttributes=YK;a.prototype.connectedCallback=function(){return VK(this)};a.prototype.attributeChangedCallback=function(){return $APP.l(this,"__x_stat_initialized")===!0?UK(this):
10
- VK(this)};XK(a.prototype);return a},$K=function(){return $APP.r(customElements.get("x-stat"))?null:customElements.define("x-stat",ZK())},IK=new $APP.K(null,"emphasis","emphasis",293543451),PK=new $APP.K(null,"aria-busy","aria-busy",793864247),JK=new $APP.K(null,"trend","trend",54563841);var YK="variant align size emphasis trend loading label value hint".split(" "),KK=new $APP.R(null,new $APP.P(null,5,["warning",null,"positive",null,"subtle",null,"danger",null,"default",null],null),null),LK=new $APP.R(null,new $APP.P(null,3,["center",null,"start",null,"end",null],null),null),MK=new $APP.R(null,new $APP.P(null,3,["md",null,"lg",null,"sm",null],null),null),NK=new $APP.R(null,new $APP.P(null,2,["high",null,"normal",null],null),null),OK=new $APP.R(null,new $APP.P(null,3,["neutral",null,
2
+ var LM=function(a,b,c){return $APP.J(b,a)?a:c},MM=function(a){return $APP.n($APP.n(a)?$APP.N("",a):a)?a:null},VM=function(a){var b=$APP.M(a),c=$APP.D(b,NM),d=$APP.D(b,OM),e=$APP.D(b,$APP.Wi),g=$APP.D(b,$APP.Nh);a=$APP.D(b,$APP.zi);var h=$APP.D(b,$APP.kl),l=$APP.D(b,$APP.th),m=$APP.D(b,$APP.Mk);b=$APP.D(b,$APP.U);g=LM(g,PM,"default");e=LM(e,QM,"start");l=LM(l,RM,"md");c=LM(c,SM,"normal");d=LM(d,TM,"neutral");m=$APP.F(m);return $APP.xf([OM,$APP.Wi,$APP.Nh,$APP.zi,$APP.kl,$APP.th,$APP.Mk,$APP.U,UM,NM],
3
+ [d,e,g,MM(a),MM(h),l,m,MM(b),m?"true":null,c])},WM=function(a){return $APP.xf([OM,$APP.Wi,$APP.Nh,$APP.zi,$APP.kl,$APP.th,$APP.Mk,$APP.U,NM],[a.getAttribute("trend"),a.getAttribute("align"),a.getAttribute("variant"),a.getAttribute("value"),a.getAttribute("hint"),a.getAttribute("size"),a.hasAttribute("loading"),a.getAttribute("label"),a.getAttribute("emphasis")])},XM=function(a,b){a.setAttribute("role","figure");var c=UM.g(b);$APP.n(c)?a.setAttribute("aria-busy",c):a.removeAttribute("aria-busy");b=
4
+ $APP.U.g(b);$APP.n(b)?a.setAttribute("aria-label",b):a.removeAttribute("aria-label")},YM=function(a,b){a.setAttribute("data-variant",$APP.Nh.g(b));a.setAttribute("data-align",$APP.Wi.g(b));a.setAttribute("data-size",$APP.th.g(b));a.setAttribute("data-emphasis",NM.g(b));a.setAttribute("data-trend",OM.g(b));$APP.n($APP.Mk.g(b))?a.setAttribute("data-loading","true"):a.removeAttribute("data-loading")},ZM=function(a){var b=VM(WM(a)),c=$APP.k(a,"__x_stat_base"),d=$APP.k(a,"__x_stat_label"),e=$APP.k(a,"__x_stat_value"),
5
+ g=$APP.k(a,"__x_stat_hint");return $APP.n(c)?(XM(a,b),YM(c,b),d.textContent=function(){var h=$APP.U.g(b);return $APP.n(h)?h:""}(),e.textContent=function(){var h=$APP.zi.g(b);return $APP.n(h)?h:""}(),g.textContent=function(){var h=$APP.kl.g(b);return $APP.n(h)?h:""}()):null},$M=function(a){if(!$APP.Bg(a,"__x_stat_initialized")){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("div"),
6
+ l=document.createElement("div"),m=document.createElement("div"),p=document.createElement("span"),q=document.createElement("span"),v=document.createElement("span"),x=document.createElement("slot"),y=document.createElement("slot"),A=document.createElement("slot"),B=document.createElement("slot"),E=document.createElement("slot");c.textContent=":host{display:block;color-scheme:light dark;--x-stat-background:transparent;--x-stat-color:var(--x-color-text,inherit);--x-stat-muted-color:var(--x-color-text-muted,rgba(0,0,0,0.55));--x-stat-border-color:var(--x-color-border,transparent);--x-stat-radius:var(--x-radius-md,12px);--x-stat-padding:16px;--x-stat-gap:6px;--x-stat-label-color:var(--x-stat-muted-color);--x-stat-label-size:12px;--x-stat-value-color:var(--x-stat-color);--x-stat-value-size:20px;--x-stat-hint-color:var(--x-stat-muted-color);--x-stat-hint-size:12px;--x-stat-icon-color:var(--x-stat-color);--x-stat-positive-color:var(--x-color-success,#16a34a);--x-stat-warning-color:var(--x-color-warning,#d97706);--x-stat-danger-color:var(--x-color-danger,#dc2626);--x-stat-transition-duration:var(--x-transition-duration,120ms);--x-stat-transition-timing:var(--x-transition-easing,ease);--x-stat-loading-opacity:0.6;}@media (prefers-color-scheme:dark){:host{--x-stat-muted-color:var(--x-color-text-muted,rgba(255,255,255,0.55));--x-stat-positive-color:var(--x-color-success,#4ade80);--x-stat-warning-color:var(--x-color-warning,#fbbf24);--x-stat-danger-color:var(--x-color-danger,#f87171);}}:host([variant\x3d'positive']){--x-stat-value-color:var(--x-stat-positive-color);}:host([variant\x3d'warning']){--x-stat-value-color:var(--x-stat-warning-color);}:host([variant\x3d'danger']){--x-stat-value-color:var(--x-stat-danger-color);}:host([variant\x3d'subtle']){--x-stat-value-color:var(--x-stat-muted-color);}[part\x3dbase]{display:grid;gap:var(--x-stat-gap);padding:var(--x-stat-padding);border-radius:var(--x-stat-radius);background:var(--x-stat-background);border:1px solid var(--x-stat-border-color);color:var(--x-stat-color);transition:background var(--x-stat-transition-duration) var(--x-stat-transition-timing),border-color var(--x-stat-transition-duration) var(--x-stat-transition-timing),color var(--x-stat-transition-duration) var(--x-stat-transition-timing),opacity var(--x-stat-transition-duration) var(--x-stat-transition-timing);}[part\x3dbase][data-align\x3d'center']{text-align:center;}[part\x3dbase][data-align\x3d'end']{text-align:end;}[part\x3dbase][data-size\x3d'sm'] [part\x3dvalue]{font-size:calc(var(--x-stat-value-size) * 0.8);}[part\x3dbase][data-size\x3d'lg'] [part\x3dvalue]{font-size:calc(var(--x-stat-value-size) * 1.6);}[part\x3dbase][data-emphasis\x3d'high'] [part\x3dvalue]{font-weight:800;}[part\x3dicon]{flex:0 0 auto;color:var(--x-stat-icon-color);line-height:1;}slot[name\x3dicon]::slotted(*){display:block;}[part\x3dlabel]{font-size:var(--x-stat-label-size);color:var(--x-stat-label-color);}[part\x3dvalue]{font-weight:600;font-size:var(--x-stat-value-size);color:var(--x-stat-value-color);}[part\x3dhint]{font-size:var(--x-stat-hint-size);color:var(--x-stat-hint-color);}[part\x3dbase][data-loading\x3d'true']{opacity:var(--x-stat-loading-opacity);}@media (prefers-reduced-motion:reduce){[part\x3dbase]{transition:none;}}";
7
+ d.setAttribute("part","base");e.setAttribute("part","icon");g.setAttribute("part","body");h.setAttribute("part","label");l.setAttribute("part","value");m.setAttribute("part","hint");x.setAttribute("name","icon");y.setAttribute("name","label");A.setAttribute("name","value");B.setAttribute("name","hint");e.appendChild(x);h.appendChild(y);h.appendChild(p);l.appendChild(A);l.appendChild(q);m.appendChild(B);m.appendChild(v);g.appendChild(h);g.appendChild(l);g.appendChild(m);g.appendChild(E);d.appendChild(e);
8
+ d.appendChild(g);b.appendChild(c);b.appendChild(d);a.__x_stat_root=b;a.__x_stat_base=d;a.__x_stat_label=p;a.__x_stat_value=q;a.__x_stat_hint=v;a.__x_stat_initialized=!0}ZM(a);return a},aN=function(a,b){Object.defineProperty(a,b,{get:function(){var c=this.getAttribute(b);return $APP.n(c)?c:""},set:function(c){return $APP.n(c)?this.setAttribute(b,""+$APP.T.g(c)):this.removeAttribute(b)},enumerable:!0,configurable:!0})},bN=function(a){aN(a,"variant");aN(a,"align");aN(a,"size");aN(a,"emphasis");aN(a,
9
+ "trend");aN(a,"label");aN(a,"value");aN(a,"hint");Object.defineProperty(a,"loading",{get:function(){return this.hasAttribute("loading")},set:function(b){return $APP.n(b)?this.setAttribute("loading",""):this.removeAttribute("loading")},enumerable:!0,configurable:!0})},dN=function(){var a=class extends HTMLElement{};a.observedAttributes=cN;a.prototype.connectedCallback=function(){return $M(this)};a.prototype.attributeChangedCallback=function(){return $APP.Bg(this,"__x_stat_initialized")?ZM(this):$M(this)};
10
+ bN(a.prototype);return a},eN=function(){return $APP.n(customElements.get("x-stat"))?null:customElements.define("x-stat",dN())},NM=new $APP.K(null,"emphasis","emphasis",293543451),UM=new $APP.K(null,"aria-busy","aria-busy",793864247),OM=new $APP.K(null,"trend","trend",54563841);var cN="variant align size emphasis trend loading label value hint".split(" "),PM=new $APP.S(null,new $APP.R(null,5,["warning",null,"positive",null,"subtle",null,"danger",null,"default",null],null),null),QM=new $APP.S(null,new $APP.R(null,3,["center",null,"start",null,"end",null],null),null),RM=new $APP.S(null,new $APP.R(null,3,["md",null,"lg",null,"sm",null],null),null),SM=new $APP.S(null,new $APP.R(null,2,["high",null,"normal",null],null),null),TM=new $APP.S(null,new $APP.R(null,3,["neutral",null,
11
11
  "up",null,"down",null],null),null);
12
- $APP.Q([JK,$APP.Qi,$APP.Fh,$APP.ri,$APP.al,$APP.rh,$APP.Dk,$APP.T,IK],[new $APP.P(null,4,[$APP.uk,"trend",$APP.Z,$APP.X,$APP.Kh,"neutral",$APP.Mh,!0],null),new $APP.P(null,4,[$APP.uk,"align",$APP.Z,$APP.X,$APP.Kh,"start",$APP.Mh,!0],null),new $APP.P(null,4,[$APP.uk,"variant",$APP.Z,$APP.X,$APP.Kh,"default",$APP.Mh,!0],null),new $APP.P(null,4,[$APP.uk,"value",$APP.Z,$APP.X,$APP.Kh,"",$APP.Mh,!0],null),new $APP.P(null,4,[$APP.uk,"hint",$APP.Z,$APP.X,$APP.Kh,"",$APP.Mh,!0],null),new $APP.P(null,4,[$APP.uk,
13
- "size",$APP.Z,$APP.X,$APP.Kh,"md",$APP.Mh,!0],null),new $APP.P(null,4,[$APP.uk,"loading",$APP.Z,$APP.qj,$APP.Kh,!1,$APP.Mh,!0],null),new $APP.P(null,4,[$APP.uk,"label",$APP.Z,$APP.X,$APP.Kh,"",$APP.Mh,!0],null),new $APP.P(null,4,[$APP.uk,"emphasis",$APP.Z,$APP.X,$APP.Kh,"normal",$APP.Mh,!0],null)]);$APP.ka("baredom.exports.x_stat.init",$K);export const init=$K;
12
+ $APP.xf([OM,$APP.Wi,$APP.Nh,$APP.zi,$APP.kl,$APP.th,$APP.Mk,$APP.U,NM],[new $APP.R(null,4,[$APP.Ck,"trend",$APP.Z,$APP.X,$APP.Sh,"neutral",$APP.Uh,!0],null),new $APP.R(null,4,[$APP.Ck,"align",$APP.Z,$APP.X,$APP.Sh,"start",$APP.Uh,!0],null),new $APP.R(null,4,[$APP.Ck,"variant",$APP.Z,$APP.X,$APP.Sh,"default",$APP.Uh,!0],null),new $APP.R(null,4,[$APP.Ck,"value",$APP.Z,$APP.X,$APP.Sh,"",$APP.Uh,!0],null),new $APP.R(null,4,[$APP.Ck,"hint",$APP.Z,$APP.X,$APP.Sh,"",$APP.Uh,!0],null),new $APP.R(null,4,[$APP.Ck,
13
+ "size",$APP.Z,$APP.X,$APP.Sh,"md",$APP.Uh,!0],null),new $APP.R(null,4,[$APP.Ck,"loading",$APP.Z,$APP.Bj,$APP.Sh,!1,$APP.Uh,!0],null),new $APP.R(null,4,[$APP.Ck,"label",$APP.Z,$APP.X,$APP.Sh,"",$APP.Uh,!0],null),new $APP.R(null,4,[$APP.Ck,"emphasis",$APP.Z,$APP.X,$APP.Sh,"normal",$APP.Uh,!0],null)]);$APP.fa("baredom.exports.x_stat.init",eN);export const init=eN;
package/dist/x-stepper.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var Kn=function(a,b){return new $APP.ud(null,function(){if(a>0){var c=$APP.u(b);return c?$APP.rd($APP.v(c),Kn(a-1,$APP.Zb(c))):null}return null},null)},Nn=function(a){a=$APP.G(Ln,typeof a==="string"?a.toLowerCase():null);return $APP.r(a)?a:Mn},Pn=function(a){a=$APP.G(On,a);return $APP.r(a)?a:"horizontal"},Sn=function(a){a=$APP.G(Qn,typeof a==="string"?a.toLowerCase():null);return $APP.r(a)?a:Rn},Un=function(a){a=$APP.G(Tn,a);return $APP.r(a)?a:"md"},Vn=function(a){return typeof a==="string"?(a=parseInt(a.trim(),
3
- 10),typeof a==="number"&&$APP.t(isNaN(a))&&a>=0?a:0):0},Wn=function(a){if(typeof a==="string"){var b=a.trim();if($APP.r($APP.lg(/^\d+$/,b)))return a=parseInt(b,10),a>0&&a<=200?$APP.je(function(g){return new $APP.P(null,2,[$APP.T,"Step "+$APP.S.g(g),$APP.Hj,null],null)},$APP.kg(1,a+1)):$APP.ie;if($APP.r(function(){var g=$APP.O("",b);return g?b.startsWith("["):g}()))try{var c=JSON.parse(b);if($APP.r(Array.isArray(c))){var d=$APP.wc(c),e=$APP.C(d)>200?Kn(200,d):d;return $APP.je(function(g){return new $APP.P(null,
4
- 2,[$APP.T,function(){var h=$APP.l(g,"label");return typeof h==="string"?h:""}(),$APP.Hj,function(){var h=$APP.l(g,"description");return typeof h==="string"?h:null}()],null)},e)}return $APP.ie}catch(g){return $APP.ie}else return $APP.ie}else return $APP.ie},Xn=function(a){var b=$APP.l(a,"__xStepperRefs");if($APP.r(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div");c.textContent=":host{display:block;color-scheme:light dark;--x-stepper-indicator-size:2rem;--x-stepper-connector-thickness:2px;--x-stepper-step-gap:0.75rem;--x-stepper-font-size:var(--x-font-size-sm,0.875rem);--x-stepper-label-font-weight:500;--x-stepper-desc-font-size:0.75rem;--x-stepper-radius:var(--x-radius-full,999px);--x-stepper-motion:var(--x-transition-duration,120ms);--x-stepper-press-scale:0.93;--x-stepper-focus-ring:var(--x-color-focus-ring,rgba(0,0,0,0.55));--x-stepper-disabled-opacity:0.5;--x-stepper-complete-bg:var(--x-color-success,rgba(16,140,72,1));--x-stepper-complete-color:#fff;--x-stepper-complete-connector:var(--x-color-success,rgba(16,140,72,1));--x-stepper-current-bg:var(--x-color-primary,rgba(0,102,204,1));--x-stepper-current-color:#fff;--x-stepper-upcoming-bg:rgba(0,0,0,0.08);--x-stepper-upcoming-color:var(--x-color-text-muted,rgba(0,0,0,0.45));--x-stepper-idle-connector:var(--x-color-border,rgba(0,0,0,0.12));--x-stepper-label-done-color:var(--x-color-text,rgba(0,0,0,0.85));--x-stepper-label-current-color:var(--x-color-text,rgba(0,0,0,0.85));--x-stepper-label-upcoming-color:var(--x-color-text-muted,rgba(0,0,0,0.4));--x-stepper-desc-color:var(--x-color-text-muted,rgba(0,0,0,0.4));}@media (prefers-color-scheme:dark){:host{--x-stepper-focus-ring:var(--x-color-focus-ring,rgba(255,255,255,0.7));--x-stepper-complete-bg:var(--x-color-success,rgba(60,210,120,1));--x-stepper-complete-color:#000;--x-stepper-complete-connector:var(--x-color-success,rgba(60,210,120,1));--x-stepper-current-bg:var(--x-color-primary,rgba(80,160,255,1));--x-stepper-current-color:#000;--x-stepper-upcoming-bg:rgba(255,255,255,0.1);--x-stepper-upcoming-color:var(--x-color-text-muted,rgba(255,255,255,0.35));--x-stepper-idle-connector:var(--x-color-border,rgba(255,255,255,0.12));--x-stepper-label-done-color:var(--x-color-text,rgba(255,255,255,0.9));--x-stepper-label-current-color:var(--x-color-text,rgba(255,255,255,0.9));--x-stepper-label-upcoming-color:var(--x-color-text-muted,rgba(255,255,255,0.3));--x-stepper-desc-color:var(--x-color-text-muted,rgba(255,255,255,0.35));}}[part\x3dcontainer]{display:flex;align-items:flex-start;margin:0;padding:0;list-style:none;}:host([data-orientation\x3dhorizontal]) [part\x3dcontainer]{flex-direction:row;}:host([data-orientation\x3dhorizontal]) [part\x3dstep]{display:flex;flex-direction:column;align-items:center;flex:1;min-width:0;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-track]{display:flex;align-items:center;width:100%;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-connector]{flex:1;height:var(--x-stepper-connector-thickness);min-width:8px;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-content]{display:flex;flex-direction:column;align-items:center;text-align:center;padding:var(--x-stepper-step-gap) 4px 0;width:100%;}:host([data-orientation\x3dvertical]) [part\x3dcontainer]{flex-direction:column;}:host([data-orientation\x3dvertical]) [part\x3dstep]{display:flex;flex-direction:row;gap:var(--x-stepper-step-gap);}:host([data-orientation\x3dvertical]) [part\x3dstep-track]{display:flex;flex-direction:column;align-items:center;flex-shrink:0;width:var(--x-stepper-indicator-size);}:host([data-orientation\x3dvertical]) [part\x3dstep-connector]{flex:1;width:var(--x-stepper-connector-thickness);min-height:16px;margin:4px 0;}:host([data-orientation\x3dvertical]) [part\x3dstep-content]{display:flex;flex-direction:column;flex:1;min-width:0;padding-bottom:var(--x-stepper-step-gap);}[part\x3dstep-indicator]{display:inline-flex;align-items:center;justify-content:center;width:var(--x-stepper-indicator-size);height:var(--x-stepper-indicator-size);border-radius:var(--x-stepper-radius);border:none;padding:0;margin:0;cursor:pointer;font-size:0.875em;font-weight:600;font-family:inherit;flex-shrink:0;position:relative;z-index:1;transition:background var(--x-stepper-motion) ease,color var(--x-stepper-motion) ease,transform 80ms ease;}[part\x3dstep-indicator]:focus{outline:none;}[part\x3dstep-indicator]:focus-visible{outline:2px solid var(--x-stepper-focus-ring);outline-offset:3px;}[data-state\x3dcomplete] [part\x3dstep-indicator]{background:var(--x-stepper-complete-bg);color:var(--x-stepper-complete-color);}[data-state\x3dcurrent] [part\x3dstep-indicator]{background:var(--x-stepper-current-bg);color:var(--x-stepper-current-color);cursor:default;}[data-state\x3dupcoming] [part\x3dstep-indicator]{background:var(--x-stepper-upcoming-bg);color:var(--x-stepper-upcoming-color);}[data-state\x3dcomplete] [part\x3dstep-connector]{background:var(--x-stepper-complete-connector);}[data-state\x3dcurrent] [part\x3dstep-connector],[data-state\x3dupcoming] [part\x3dstep-connector]{background:var(--x-stepper-idle-connector);}[part\x3dstep]:last-child [part\x3dstep-connector]{display:none;}[part\x3dstep-label]{font-size:var(--x-stepper-font-size);line-height:1.3;font-family:inherit;}[data-state\x3dcomplete] [part\x3dstep-label]{color:var(--x-stepper-label-done-color);}[data-state\x3dcurrent] [part\x3dstep-label]{color:var(--x-stepper-label-current-color);font-weight:var(--x-stepper-label-font-weight);}[data-state\x3dupcoming] [part\x3dstep-label]{color:var(--x-stepper-label-upcoming-color);}[part\x3dstep-description]{font-size:var(--x-stepper-desc-font-size);color:var(--x-stepper-desc-color);line-height:1.3;margin-top:0.2em;}:host(:not([disabled])) [data-state\x3dcomplete] [part\x3dstep-indicator]:hover,:host(:not([disabled])) [data-state\x3dupcoming] [part\x3dstep-indicator]:hover{filter:brightness(0.88);}:host(:not([disabled])) [data-state\x3dcomplete] [part\x3dstep-indicator]:active,:host(:not([disabled])) [data-state\x3dupcoming] [part\x3dstep-indicator]:active{transform:scale(var(--x-stepper-press-scale));}:host([disabled]){opacity:var(--x-stepper-disabled-opacity);}:host([disabled]) [part\x3dstep-indicator]{cursor:default;pointer-events:none;}:host([data-size\x3dsm]){--x-stepper-indicator-size:1.5rem;--x-stepper-font-size:0.8125rem;--x-stepper-desc-font-size:0.6875rem;}:host([data-size\x3dlg]){--x-stepper-indicator-size:2.5rem;--x-stepper-font-size:1rem;--x-stepper-desc-font-size:0.875rem;}@media (prefers-reduced-motion:reduce){[part\x3dstep-indicator]{transition:none;}}";
5
- d.setAttribute("part","container");d.setAttribute("role","list");b.appendChild(c);b.appendChild(d);a.__xStepperRefs=new $APP.P(null,2,[$APP.bi,b,$APP.Zi,d],null);return $APP.l(a,"__xStepperRefs")},ao=function(a){a=new $APP.P(null,5,[Yn,a.getAttribute("steps"),Zn,a.getAttribute("current"),$APP.$k,a.getAttribute("orientation"),$APP.Zk,a.getAttribute("size"),$APP.W,a.hasAttribute("disabled")],null);var b=$APP.N(a),c=$APP.G(b,Yn);a=$APP.G(b,Zn);var d=$APP.G(b,$APP.$k),e=$APP.G(b,$APP.Zk);b=$APP.G(b,$APP.W);
6
- c=Wn(c);var g=$APP.C(c);return new $APP.P(null,5,[$APP.xl,c,$n,g===0?0:$APP.Yg.i(0,$APP.Zg.i(Vn(a),g-1)),$APP.yk,Nn(d),$APP.rh,Sn(e),$APP.W,$APP.I(b)],null)},bo=function(a,b,c){return"Step "+$APP.S.g(a+1)+": "+$APP.S.g(b)+" ("+$APP.S.g(function(){var d=c instanceof $APP.K?c.ra:null;switch(d){case "complete":return"completed";case "current":return"current";case "upcoming":return"upcoming";default:throw Error("No matching clause: "+$APP.S.g(d));}}())+")"},co=function(a,b,c,d){var e=$APP.N(b);b=$APP.G(e,
7
- $APP.T);e=$APP.G(e,$APP.Hj);var g=document.createElement("div"),h=document.createElement("div"),k=document.createElement("button"),m=document.createElement("span"),p=document.createElement("div"),q=document.createElement("div"),w=document.createElement("span"),x=document.createElement("span");a:{var y=c instanceof $APP.K?c.ra:null;switch(y){case "complete":y="complete";break a;case "current":y="current";break a;case "upcoming":y="upcoming";break a;default:throw Error("No matching clause: "+$APP.S.g(y));
8
- }}b=$APP.r(b)?b:"";g.setAttribute("part","step");g.setAttribute("role","listitem");g.setAttribute("data-index",""+$APP.S.g(a));g.setAttribute("data-state",y);h.setAttribute("part","step-track");k.setAttribute("part","step-indicator");k.setAttribute("type","button");k.setAttribute("aria-label",bo(a,b,c));$APP.D.i(c,$n)?k.setAttribute("aria-current","step"):k.removeAttribute("aria-current");k.setAttribute("tabindex",$APP.r(d)?"-1":"0");$APP.r(d)&&k.setAttribute("aria-disabled","true");m.setAttribute("part",
9
- "step-number");m.setAttribute("aria-hidden","true");m.textContent=$APP.D.i(c,$APP.Fl)?"✓":""+$APP.S.g(a+1);p.setAttribute("part","step-connector");p.setAttribute("aria-hidden","true");q.setAttribute("part","step-content");w.setAttribute("part","step-label");w.textContent=b;x.setAttribute("part","step-description");$APP.r($APP.r(e)?$APP.O(e,""):e)?(x.textContent=e,x.style.display="block"):x.style.display="none";k.appendChild(m);h.appendChild(k);h.appendChild(p);q.appendChild(w);q.appendChild(x);g.appendChild(h);
10
- g.appendChild(q);return g},fo=function(a){var b=ao(a);if($APP.O($APP.l(a,"__xStepperModel"),b)){b=$APP.N(b);var c=$APP.G(b,$APP.xl),d=$APP.G(b,$n),e=$APP.G(b,$APP.yk),g=$APP.G(b,$APP.rh),h=$APP.G(b,$APP.W),k=Xn(a);k=$APP.N(k);k=$APP.G(k,$APP.Zi);a.setAttribute("data-orientation",Pn(e));a.setAttribute("data-size",Un(g));k.innerHTML="";c=$APP.u($APP.Zd($APP.ch,c));e=null;for(var m=g=0;;)if(m<g){var p=e.G(null,m),q=$APP.Cc(p,0,null);p=$APP.Cc(p,1,null);var w=q<d?$APP.Fl:$APP.D.i(q,d)?$n:eo;k.appendChild(co(q,
11
- p,w,h));m+=1}else if(c=$APP.u(c))$APP.Pc(c)?(g=$APP.yb(c),c=$APP.zb(c),e=g,g=$APP.C(g)):(g=$APP.v(c),e=$APP.Cc(g,0,null),g=$APP.Cc(g,1,null),m=e<d?$APP.Fl:$APP.D.i(e,d)?$n:eo,k.appendChild(co(e,g,m,h)),c=$APP.z(c),e=null,g=0),m=0;else break;a.__xStepperModel=b}},go=function(a){function b(d){var e=$APP.l(a,"__xStepperModel");e=$APP.r(e)?e:ao(a);$APP.r($APP.W.g(e))||(d=d.target.closest("[part\x3dstep-indicator]"),$APP.r(d)&&(d=parseInt(d.closest("[part\x3dstep]").getAttribute("data-index"),10),e=$n.g(e),
12
- typeof d==="number"&&$APP.t(isNaN(d))&&$APP.O(d,e)&&(e=$APP.nh(new $APP.P(null,2,[$APP.zh,e,$APP.fl,d],null)),e=new CustomEvent("x-stepper-change",{detail:e,bubbles:!0,composed:!0,cancelable:!0}),e=a.dispatchEvent(e),$APP.r(e)&&a.setAttribute("current",""+$APP.S.g(d)))));return null}var c=Xn(a);c=$APP.N(c);$APP.G(c,$APP.Zi).addEventListener("click",b);$APP.n(a,"__xStepperHandlers",{click:b})},ho=function(a){var b=$APP.l(a,"__xStepperHandlers");if($APP.r(b)){var c=$APP.l(a,"__xStepperRefs");$APP.r(c)&&
13
- (c=$APP.Zi.g(c),b=$APP.l(b,"click"),$APP.r($APP.r(c)?b:c)&&c.removeEventListener("click",b))}a.__xStepperHandlers=null},io=function(a){Object.defineProperty(a,"steps",{get:function(){var b=this.getAttribute("steps");return $APP.r(b)?b:"[]"},set:function(b){return $APP.r(b)?this.setAttribute("steps",""+$APP.S.g(b)):this.removeAttribute("steps")},enumerable:!0,configurable:!0});Object.defineProperty(a,"current",{get:function(){return Vn(this.getAttribute("current"))},set:function(b){return b==null?
14
- this.removeAttribute("current"):this.setAttribute("current",""+$APP.S.g(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"orientation",{get:function(){return Pn(Nn(this.getAttribute("orientation")))},set:function(b){return $APP.r(b)?this.setAttribute("orientation",""+$APP.S.g(b)):this.removeAttribute("orientation")},enumerable:!0,configurable:!0});Object.defineProperty(a,"size",{get:function(){return Un(Sn(this.getAttribute("size")))},set:function(b){return $APP.r(b)?this.setAttribute("size",
15
- ""+$APP.S.g(b)):this.removeAttribute("size")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.r(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0})},ko=function(){var a=class extends HTMLElement{};a.observedAttributes=jo;a.prototype.connectedCallback=function(){Xn(this);ho(this);go(this);fo(this);return null};a.prototype.disconnectedCallback=function(){ho(this);
16
- return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&fo(this);return null};io(a.prototype);return a},lo=function(){$APP.r(customElements.get("x-stepper"))||customElements.define("x-stepper",ko());return null},$n=new $APP.K(null,"current","current",-1088038603),mo=new $APP.K(null,"vertical","vertical",718696748),eo=new $APP.K(null,"upcoming","upcoming",1873315471),Yn=new $APP.K(null,"steps-raw","steps-raw",1741812533),Rn=new $APP.K(null,"md","md",707286655),no=new $APP.K(null,
17
- "lg","lg",-80787836),Mn=new $APP.K(null,"horizontal","horizontal",2062109475),oo=new $APP.K(null,"sm","sm",-1402575065),Zn=new $APP.K(null,"current-raw","current-raw",-1440665509);var jo=["steps","current","orientation","size","disabled"];$APP.Sd(["x-stepper-change",new $APP.P(null,2,[$APP.U,new $APP.P(null,2,[$APP.zh,$APP.V,$APP.fl,$APP.V],null),$APP.ll,!0],null)]);var Ln=new $APP.P(null,2,["horizontal",Mn,"vertical",mo],null),On=new $APP.P(null,2,[Mn,"horizontal",mo,"vertical"],null),Qn=new $APP.P(null,3,["sm",oo,"md",Rn,"lg",no],null),Tn=new $APP.P(null,3,[oo,"sm",Rn,"md",no,"lg"],null);$APP.ka("baredom.exports.x_stepper.init",lo);export const init=lo;
2
+ var Vn=function(a,b){return new $APP.qd(null,function(){if(a>0){var c=$APP.t(b);return c?$APP.nd($APP.u(c),Vn(a-1,$APP.Yb(c))):null}return null},null)},Yn=function(a){a=$APP.D(Wn,typeof a==="string"?a.toLowerCase():null);return $APP.n(a)?a:Xn},$n=function(a){a=$APP.D(Zn,a);return $APP.n(a)?a:"horizontal"},co=function(a){a=$APP.D(ao,typeof a==="string"?a.toLowerCase():null);return $APP.n(a)?a:bo},fo=function(a){a=$APP.D(eo,a);return $APP.n(a)?a:"md"},go=function(a){return typeof a==="string"?(a=parseInt(a.trim(),
3
+ 10),typeof a==="number"&&$APP.r(isNaN(a))&&a>=0?a:0):0},ho=function(a){if(typeof a==="string"){var b=a.trim();if($APP.n($APP.cg(/^\d+$/,b)))return a=parseInt(b,10),a>0&&a<=200?$APP.fe(function(g){return new $APP.R(null,2,[$APP.U,"Step "+$APP.T.g(g),$APP.Uj,null],null)},$APP.bg(1,a+1)):$APP.ee;if($APP.n(function(){var g=$APP.N("",b);return g?b.startsWith("["):g}()))try{var c=JSON.parse(b);if($APP.n(Array.isArray(c))){var d=$APP.tc(c),e=$APP.z(d)>200?Vn(200,d):d;return $APP.fe(function(g){return new $APP.R(null,
4
+ 2,[$APP.U,function(){var h=$APP.k(g,"label");return typeof h==="string"?h:""}(),$APP.Uj,function(){var h=$APP.k(g,"description");return typeof h==="string"?h:null}()],null)},e)}return $APP.ee}catch(g){return $APP.ee}else return $APP.ee}else return $APP.ee},io=function(a){var b=$APP.k(a,"__xStepperRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div");c.textContent=":host{display:block;color-scheme:light dark;--x-stepper-indicator-size:2rem;--x-stepper-connector-thickness:2px;--x-stepper-step-gap:0.75rem;--x-stepper-font-size:var(--x-font-size-sm,0.875rem);--x-stepper-label-font-weight:500;--x-stepper-desc-font-size:0.75rem;--x-stepper-radius:var(--x-radius-full,999px);--x-stepper-motion:var(--x-transition-duration,120ms);--x-stepper-press-scale:0.93;--x-stepper-focus-ring:var(--x-color-focus-ring,rgba(0,0,0,0.55));--x-stepper-disabled-opacity:0.5;--x-stepper-complete-bg:var(--x-color-success,rgba(16,140,72,1));--x-stepper-complete-color:#fff;--x-stepper-complete-connector:var(--x-color-success,rgba(16,140,72,1));--x-stepper-current-bg:var(--x-color-primary,rgba(0,102,204,1));--x-stepper-current-color:#fff;--x-stepper-upcoming-bg:rgba(0,0,0,0.08);--x-stepper-upcoming-color:var(--x-color-text-muted,rgba(0,0,0,0.45));--x-stepper-idle-connector:var(--x-color-border,rgba(0,0,0,0.12));--x-stepper-label-done-color:var(--x-color-text,rgba(0,0,0,0.85));--x-stepper-label-current-color:var(--x-color-text,rgba(0,0,0,0.85));--x-stepper-label-upcoming-color:var(--x-color-text-muted,rgba(0,0,0,0.4));--x-stepper-desc-color:var(--x-color-text-muted,rgba(0,0,0,0.4));}@media (prefers-color-scheme:dark){:host{--x-stepper-focus-ring:var(--x-color-focus-ring,rgba(255,255,255,0.7));--x-stepper-complete-bg:var(--x-color-success,rgba(60,210,120,1));--x-stepper-complete-color:#000;--x-stepper-complete-connector:var(--x-color-success,rgba(60,210,120,1));--x-stepper-current-bg:var(--x-color-primary,rgba(80,160,255,1));--x-stepper-current-color:#000;--x-stepper-upcoming-bg:rgba(255,255,255,0.1);--x-stepper-upcoming-color:var(--x-color-text-muted,rgba(255,255,255,0.35));--x-stepper-idle-connector:var(--x-color-border,rgba(255,255,255,0.12));--x-stepper-label-done-color:var(--x-color-text,rgba(255,255,255,0.9));--x-stepper-label-current-color:var(--x-color-text,rgba(255,255,255,0.9));--x-stepper-label-upcoming-color:var(--x-color-text-muted,rgba(255,255,255,0.3));--x-stepper-desc-color:var(--x-color-text-muted,rgba(255,255,255,0.35));}}[part\x3dcontainer]{display:flex;align-items:flex-start;margin:0;padding:0;list-style:none;}:host([data-orientation\x3dhorizontal]) [part\x3dcontainer]{flex-direction:row;}:host([data-orientation\x3dhorizontal]) [part\x3dstep]{display:flex;flex-direction:column;align-items:center;flex:1;min-width:0;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-track]{display:flex;align-items:center;width:100%;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-connector]{flex:1;height:var(--x-stepper-connector-thickness);min-width:8px;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-content]{display:flex;flex-direction:column;align-items:center;text-align:center;padding:var(--x-stepper-step-gap) 4px 0;width:100%;}:host([data-orientation\x3dvertical]) [part\x3dcontainer]{flex-direction:column;}:host([data-orientation\x3dvertical]) [part\x3dstep]{display:flex;flex-direction:row;gap:var(--x-stepper-step-gap);}:host([data-orientation\x3dvertical]) [part\x3dstep-track]{display:flex;flex-direction:column;align-items:center;flex-shrink:0;width:var(--x-stepper-indicator-size);}:host([data-orientation\x3dvertical]) [part\x3dstep-connector]{flex:1;width:var(--x-stepper-connector-thickness);min-height:16px;margin:4px 0;}:host([data-orientation\x3dvertical]) [part\x3dstep-content]{display:flex;flex-direction:column;flex:1;min-width:0;padding-bottom:var(--x-stepper-step-gap);}[part\x3dstep-indicator]{display:inline-flex;align-items:center;justify-content:center;width:var(--x-stepper-indicator-size);height:var(--x-stepper-indicator-size);border-radius:var(--x-stepper-radius);border:none;padding:0;margin:0;cursor:pointer;font-size:0.875em;font-weight:600;font-family:inherit;flex-shrink:0;position:relative;z-index:1;transition:background var(--x-stepper-motion) ease,color var(--x-stepper-motion) ease,transform 80ms ease;}[part\x3dstep-indicator]:focus{outline:none;}[part\x3dstep-indicator]:focus-visible{outline:2px solid var(--x-stepper-focus-ring);outline-offset:3px;}[data-state\x3dcomplete] [part\x3dstep-indicator]{background:var(--x-stepper-complete-bg);color:var(--x-stepper-complete-color);}[data-state\x3dcurrent] [part\x3dstep-indicator]{background:var(--x-stepper-current-bg);color:var(--x-stepper-current-color);cursor:default;}[data-state\x3dupcoming] [part\x3dstep-indicator]{background:var(--x-stepper-upcoming-bg);color:var(--x-stepper-upcoming-color);}[data-state\x3dcomplete] [part\x3dstep-connector]{background:var(--x-stepper-complete-connector);}[data-state\x3dcurrent] [part\x3dstep-connector],[data-state\x3dupcoming] [part\x3dstep-connector]{background:var(--x-stepper-idle-connector);}[part\x3dstep]:last-child [part\x3dstep-connector]{display:none;}[part\x3dstep-label]{font-size:var(--x-stepper-font-size);line-height:1.3;font-family:inherit;}[data-state\x3dcomplete] [part\x3dstep-label]{color:var(--x-stepper-label-done-color);}[data-state\x3dcurrent] [part\x3dstep-label]{color:var(--x-stepper-label-current-color);font-weight:var(--x-stepper-label-font-weight);}[data-state\x3dupcoming] [part\x3dstep-label]{color:var(--x-stepper-label-upcoming-color);}[part\x3dstep-description]{font-size:var(--x-stepper-desc-font-size);color:var(--x-stepper-desc-color);line-height:1.3;margin-top:0.2em;}:host(:not([disabled])) [data-state\x3dcomplete] [part\x3dstep-indicator]:hover,:host(:not([disabled])) [data-state\x3dupcoming] [part\x3dstep-indicator]:hover{filter:brightness(0.88);}:host(:not([disabled])) [data-state\x3dcomplete] [part\x3dstep-indicator]:active,:host(:not([disabled])) [data-state\x3dupcoming] [part\x3dstep-indicator]:active{transform:scale(var(--x-stepper-press-scale));}:host([disabled]){opacity:var(--x-stepper-disabled-opacity);}:host([disabled]) [part\x3dstep-indicator]{cursor:default;pointer-events:none;}:host([data-size\x3dsm]){--x-stepper-indicator-size:1.5rem;--x-stepper-font-size:0.8125rem;--x-stepper-desc-font-size:0.6875rem;}:host([data-size\x3dlg]){--x-stepper-indicator-size:2.5rem;--x-stepper-font-size:1rem;--x-stepper-desc-font-size:0.875rem;}@media (prefers-reduced-motion:reduce){[part\x3dstep-indicator]{transition:none;}}";
5
+ d.setAttribute("part","container");d.setAttribute("role","list");b.appendChild(c);b.appendChild(d);a.__xStepperRefs=new $APP.R(null,2,[$APP.ji,b,$APP.ej,d],null);return $APP.k(a,"__xStepperRefs")},ko=function(a){a=new $APP.R(null,5,[jo,a.getAttribute("steps"),$APP.em,a.getAttribute("current"),$APP.jl,a.getAttribute("orientation"),$APP.il,a.getAttribute("size"),$APP.W,a.hasAttribute("disabled")],null);var b=$APP.M(a),c=$APP.D(b,jo);a=$APP.D(b,$APP.em);var d=$APP.D(b,$APP.jl),e=$APP.D(b,$APP.il);b=
6
+ $APP.D(b,$APP.W);c=ho(c);var g=$APP.z(c);return new $APP.R(null,5,[$APP.Pl,c,$APP.Kh,g===0?0:$APP.$g.i(0,$APP.ah.i(go(a),g-1)),$APP.Gk,Yn(d),$APP.th,co(e),$APP.W,$APP.F(b)],null)},lo=function(a,b,c){return"Step "+$APP.T.g(a+1)+": "+$APP.T.g(b)+" ("+$APP.T.g(function(){var d=c instanceof $APP.K?c.pa:null;switch(d){case "complete":return"completed";case "current":return"current";case "upcoming":return"upcoming";default:throw Error("No matching clause: "+$APP.T.g(d));}}())+")"},mo=function(a,b,c,d){var e=
7
+ $APP.M(b);b=$APP.D(e,$APP.U);e=$APP.D(e,$APP.Uj);var g=document.createElement("div"),h=document.createElement("div"),l=document.createElement("button"),m=document.createElement("span"),p=document.createElement("div"),q=document.createElement("div"),v=document.createElement("span"),x=document.createElement("span");a:{var y=c instanceof $APP.K?c.pa:null;switch(y){case "complete":y="complete";break a;case "current":y="current";break a;case "upcoming":y="upcoming";break a;default:throw Error("No matching clause: "+
8
+ $APP.T.g(y));}}b=$APP.n(b)?b:"";g.setAttribute("part","step");g.setAttribute("role","listitem");g.setAttribute("data-index",""+$APP.T.g(a));g.setAttribute("data-state",y);h.setAttribute("part","step-track");l.setAttribute("part","step-indicator");l.setAttribute("type","button");l.setAttribute("aria-label",lo(a,b,c));$APP.C.i(c,$APP.Kh)?l.setAttribute("aria-current","step"):l.removeAttribute("aria-current");l.setAttribute("tabindex",$APP.n(d)?"-1":"0");$APP.n(d)&&l.setAttribute("aria-disabled","true");
9
+ m.setAttribute("part","step-number");m.setAttribute("aria-hidden","true");m.textContent=$APP.C.i(c,$APP.Xl)?"✓":""+$APP.T.g(a+1);p.setAttribute("part","step-connector");p.setAttribute("aria-hidden","true");q.setAttribute("part","step-content");v.setAttribute("part","step-label");v.textContent=b;x.setAttribute("part","step-description");$APP.n($APP.n(e)?$APP.N(e,""):e)?(x.textContent=e,x.style.display="block"):x.style.display="none";l.appendChild(m);h.appendChild(l);h.appendChild(p);q.appendChild(v);
10
+ q.appendChild(x);g.appendChild(h);g.appendChild(q);return g},oo=function(a){var b=ko(a);if($APP.N($APP.k(a,"__xStepperModel"),b)){b=$APP.M(b);var c=$APP.D(b,$APP.Pl),d=$APP.D(b,$APP.Kh),e=$APP.D(b,$APP.Gk),g=$APP.D(b,$APP.th),h=$APP.D(b,$APP.W),l=io(a);l=$APP.M(l);l=$APP.D(l,$APP.ej);a.setAttribute("data-orientation",$n(e));a.setAttribute("data-size",fo(g));l.innerHTML="";c=$APP.t($APP.Wd($APP.fh,c));e=null;for(var m=g=0;;)if(m<g){var p=e.G(null,m),q=$APP.zc(p,0,null);p=$APP.zc(p,1,null);var v=q<
11
+ d?$APP.Xl:$APP.C.i(q,d)?$APP.Kh:no;l.appendChild(mo(q,p,v,h));m+=1}else if(c=$APP.t(c))$APP.Nc(c)?(g=$APP.xb(c),c=$APP.yb(c),e=g,g=$APP.z(g)):(g=$APP.u(c),e=$APP.zc(g,0,null),g=$APP.zc(g,1,null),m=e<d?$APP.Xl:$APP.C.i(e,d)?$APP.Kh:no,l.appendChild(mo(e,g,m,h)),c=$APP.w(c),e=null,g=0),m=0;else break;a.__xStepperModel=b}},po=function(a){function b(d){var e=$APP.k(a,"__xStepperModel");e=$APP.n(e)?e:ko(a);$APP.n($APP.W.g(e))||(d=d.target.closest("[part\x3dstep-indicator]"),$APP.n(d)&&(d=parseInt(d.closest("[part\x3dstep]").getAttribute("data-index"),
12
+ 10),e=$APP.Kh.g(e),typeof d==="number"&&$APP.r(isNaN(d))&&$APP.N(d,e)&&(e=$APP.ph(new $APP.R(null,2,[$APP.Fh,e,$APP.pl,d],null)),e=new CustomEvent("x-stepper-change",{detail:e,bubbles:!0,composed:!0,cancelable:!0}),e=a.dispatchEvent(e),$APP.n(e)&&a.setAttribute("current",""+$APP.T.g(d)))));return null}var c=io(a);c=$APP.M(c);$APP.D(c,$APP.ej).addEventListener("click",b);$APP.ia(a,"__xStepperHandlers",{click:b})},qo=function(a){var b=$APP.k(a,"__xStepperHandlers");if($APP.n(b)){var c=$APP.k(a,"__xStepperRefs");
13
+ $APP.n(c)&&(c=$APP.ej.g(c),b=$APP.k(b,"click"),$APP.n($APP.n(c)?b:c)&&c.removeEventListener("click",b))}a.__xStepperHandlers=null},ro=function(a){Object.defineProperty(a,"steps",{get:function(){var b=this.getAttribute("steps");return $APP.n(b)?b:"[]"},set:function(b){return $APP.n(b)?this.setAttribute("steps",""+$APP.T.g(b)):this.removeAttribute("steps")},enumerable:!0,configurable:!0});Object.defineProperty(a,"current",{get:function(){return go(this.getAttribute("current"))},set:function(b){return b==
14
+ null?this.removeAttribute("current"):this.setAttribute("current",""+$APP.T.g(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"orientation",{get:function(){return $n(Yn(this.getAttribute("orientation")))},set:function(b){return $APP.n(b)?this.setAttribute("orientation",""+$APP.T.g(b)):this.removeAttribute("orientation")},enumerable:!0,configurable:!0});Object.defineProperty(a,"size",{get:function(){return fo(co(this.getAttribute("size")))},set:function(b){return $APP.n(b)?this.setAttribute("size",
15
+ ""+$APP.T.g(b)):this.removeAttribute("size")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0})},to=function(){var a=class extends HTMLElement{};a.observedAttributes=so;a.prototype.connectedCallback=function(){io(this);qo(this);po(this);oo(this);return null};a.prototype.disconnectedCallback=function(){qo(this);
16
+ return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&oo(this);return null};ro(a.prototype);return a},uo=function(){$APP.n(customElements.get("x-stepper"))||customElements.define("x-stepper",to());return null},vo=new $APP.K(null,"vertical","vertical",718696748),no=new $APP.K(null,"upcoming","upcoming",1873315471),jo=new $APP.K(null,"steps-raw","steps-raw",1741812533),bo=new $APP.K(null,"md","md",707286655),wo=new $APP.K(null,"lg","lg",-80787836),Xn=new $APP.K(null,"horizontal",
17
+ "horizontal",2062109475),xo=new $APP.K(null,"sm","sm",-1402575065);var so=["steps","current","orientation","size","disabled"];$APP.Pd(["x-stepper-change",new $APP.R(null,2,[$APP.yj,new $APP.R(null,2,[$APP.Fh,$APP.V,$APP.pl,$APP.V],null),$APP.wl,!0],null)]);var Wn=new $APP.R(null,2,["horizontal",Xn,"vertical",vo],null),Zn=new $APP.R(null,2,[Xn,"horizontal",vo,"vertical"],null),ao=new $APP.R(null,3,["sm",xo,"md",bo,"lg",wo],null),eo=new $APP.R(null,3,[xo,"sm",bo,"md",wo,"lg"],null);$APP.fa("baredom.exports.x_stepper.init",uo);export const init=uo;
package/dist/x-switch.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var DN=function(a,b,c){return a.setAttribute(b,c)},EN=function(a,b,c){return $APP.r(c)?a.setAttribute(b,""):a.removeAttribute(b)},FN=function(a){a=$APP.Q([$APP.Fk,$APP.Sk,$APP.sh,$APP.Dh,$APP.Mi,$APP.cj,$APP.wl,$APP.kj,$APP.Ui],[a.getAttribute("name"),a.hasAttribute("disabled"),a.hasAttribute("required"),a.getAttribute("aria-labelledby"),a.hasAttribute("checked"),a.hasAttribute("readonly"),a.getAttribute("value"),a.getAttribute("aria-label"),a.getAttribute("aria-describedby")]);var b=$APP.N(a);a=
3
- $APP.G(b,$APP.kj);var c=$APP.G(b,$APP.Ui),d=$APP.G(b,$APP.Fk),e=$APP.G(b,$APP.Sk),g=$APP.G(b,$APP.sh),h=$APP.G(b,$APP.Dh),k=$APP.G(b,$APP.Mi),m=$APP.G(b,$APP.cj);b=$APP.G(b,$APP.wl);k=$APP.I(k);g=$APP.I(g);return $APP.Q([$APP.Lh,$APP.Gh,$APP.Tl,$APP.Wi,$APP.xh,$APP.Si,$APP.ri,$APP.sj,$APP.Pl,$APP.Uk,$APP.W],[g,k?"true":"false",$APP.I(m),k,$APP.r(g)?k:!0,d,b!=null?b:"on",h,c,a,$APP.I(e)])},GN=function(a){var b=$APP.l(a,"__xSwitchRefs");if($APP.r(b)){var c=$APP.l(b,"control");b=FN(a);var d=$APP.W.g(b),
4
- e=$APP.Wi.g(b);DN(c,"aria-checked",$APP.Gh.g(b));c.setAttribute("aria-disabled",$APP.r(d)?"true":"false");DN(c,"aria-required",$APP.r($APP.Lh.g(b))?"true":"false");DN(c,"aria-readonly",$APP.r($APP.Tl.g(b))?"true":"false");var g=$APP.Uk.g(b);$APP.r(g)?c.setAttribute("aria-label",g):c.removeAttribute("aria-label");g=$APP.sj.g(b);$APP.r(g)?c.setAttribute("aria-labelledby",g):c.removeAttribute("aria-labelledby");g=$APP.Pl.g(b);$APP.r(g)?c.setAttribute("aria-describedby",g):c.removeAttribute("aria-describedby");
5
- c.tabIndex=$APP.r(d)?-1:0;$APP.r(d)?c.setAttribute("disabled",""):c.removeAttribute("disabled");EN(a,"data-checked",e);EN(a,"data-disabled",d);a=$APP.l(a,"__xSwitchInternals");return $APP.r(a)?a.setFormValue($APP.r(e)?$APP.ri.g(b):null):null}return null},HN=function(a){var b=FN(a),c=$APP.W.g(b),d=$APP.Tl.g(b);if($APP.r($APP.r(c)?c:d))return null;d=$APP.Wi.g(b);c=$APP.t(d);b=$APP.ri.g(b);d=new CustomEvent("x-switch-change-request",{detail:{value:b,previousChecked:d,nextChecked:c},bubbles:!0,composed:!0,
6
- cancelable:!0});a.dispatchEvent(d);return $APP.t(d.defaultPrevented)?(EN(a,"checked",c),GN(a),a.dispatchEvent(new CustomEvent("x-switch-change",{detail:{value:b,checked:c},bubbles:!0,composed:!0,cancelable:!1}))):null},IN=function(a){return function(){return HN(a)}},JN=function(a){return function(b){var c=b.key;return $APP.D.i(c," ")||$APP.D.i(c,"Enter")?(b.preventDefault(),HN(a)):null}},KN=function(a){var b=$APP.l(a,"__xSwitchRefs");if($APP.r(b)){var c=$APP.l(a,"__xSwitchHandlers");if($APP.r(c)){b=
7
- $APP.l(b,"control");b.removeEventListener("click",$APP.l(c,"click"));b.removeEventListener("keydown",$APP.l(c,"keydown"));a.__xSwitchHandlers=null;return}}return null},LN=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return EN(this,c,$APP.I(d))}})},MN=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.r(d)?d:null},set:function(d){return d!=
8
- null&&$APP.O(d)?DN(this,c,""+$APP.S.g(d)):this.removeAttribute(c)}})},ON=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;Object.defineProperty(a,"observedAttributes",{get:function(){return NN}});LN(b,"checked","checked");LN(b,"disabled","disabled");LN(b,"readOnly","readonly");LN(b,"required","required");MN(b,"name","name");MN(b,"value","value");b.connectedCallback=function(){if(!$APP.r($APP.l(this,"__xSwitchRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),
2
+ var IP=function(a,b,c){return a.setAttribute(b,c)},JP=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},KP=function(a){a=$APP.xf([$APP.Ok,$APP.al,$APP.uh,$APP.Jh,$APP.Si,$APP.ij,$APP.Ol,$APP.uj,$APP.$i],[a.getAttribute("name"),a.hasAttribute("disabled"),a.hasAttribute("required"),a.getAttribute("aria-labelledby"),a.hasAttribute("checked"),a.hasAttribute("readonly"),a.getAttribute("value"),a.getAttribute("aria-label"),a.getAttribute("aria-describedby")]);var b=$APP.M(a);a=
3
+ $APP.D(b,$APP.uj);var c=$APP.D(b,$APP.$i),d=$APP.D(b,$APP.Ok),e=$APP.D(b,$APP.al),g=$APP.D(b,$APP.uh),h=$APP.D(b,$APP.Jh),l=$APP.D(b,$APP.Si),m=$APP.D(b,$APP.ij);b=$APP.D(b,$APP.Ol);l=$APP.F(l);g=$APP.F(g);return $APP.xf([$APP.Th,$APP.Oh,$APP.lm,$APP.bj,$APP.zh,$APP.Yi,$APP.zi,$APP.Dj,$APP.hm,$APP.cl,$APP.W],[g,l?"true":"false",$APP.F(m),l,$APP.n(g)?l:!0,d,b!=null?b:"on",h,c,a,$APP.F(e)])},LP=function(a){var b=$APP.k(a,"__xSwitchRefs");if($APP.n(b)){var c=$APP.k(b,"control");b=KP(a);var d=$APP.W.g(b),
4
+ e=$APP.bj.g(b);IP(c,"aria-checked",$APP.Oh.g(b));c.setAttribute("aria-disabled",$APP.n(d)?"true":"false");IP(c,"aria-required",$APP.n($APP.Th.g(b))?"true":"false");IP(c,"aria-readonly",$APP.n($APP.lm.g(b))?"true":"false");var g=$APP.cl.g(b);$APP.n(g)?c.setAttribute("aria-label",g):c.removeAttribute("aria-label");g=$APP.Dj.g(b);$APP.n(g)?c.setAttribute("aria-labelledby",g):c.removeAttribute("aria-labelledby");g=$APP.hm.g(b);$APP.n(g)?c.setAttribute("aria-describedby",g):c.removeAttribute("aria-describedby");
5
+ c.tabIndex=$APP.n(d)?-1:0;$APP.n(d)?c.setAttribute("disabled",""):c.removeAttribute("disabled");JP(a,"data-checked",e);JP(a,"data-disabled",d);a=$APP.k(a,"__xSwitchInternals");return $APP.n(a)?a.setFormValue($APP.n(e)?$APP.zi.g(b):null):null}return null},MP=function(a){var b=KP(a),c=$APP.W.g(b),d=$APP.lm.g(b);if($APP.n($APP.n(c)?c:d))return null;d=$APP.bj.g(b);c=$APP.r(d);b=$APP.zi.g(b);d=new CustomEvent("x-switch-change-request",{detail:{value:b,previousChecked:d,nextChecked:c},bubbles:!0,composed:!0,
6
+ cancelable:!0});a.dispatchEvent(d);return $APP.r(d.defaultPrevented)?(JP(a,"checked",c),LP(a),a.dispatchEvent(new CustomEvent("x-switch-change",{detail:{value:b,checked:c},bubbles:!0,composed:!0,cancelable:!1}))):null},NP=function(a){return function(){return MP(a)}},OP=function(a){return function(b){var c=b.key;return $APP.C.i(c," ")||$APP.C.i(c,"Enter")?(b.preventDefault(),MP(a)):null}},PP=function(a){var b=$APP.k(a,"__xSwitchRefs");if($APP.n(b)){var c=$APP.k(a,"__xSwitchHandlers");if($APP.n(c)){b=
7
+ $APP.k(b,"control");b.removeEventListener("click",$APP.k(c,"click"));b.removeEventListener("keydown",$APP.k(c,"keydown"));a.__xSwitchHandlers=null;return}}return null},QP=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return JP(this,c,$APP.F(d))}})},RP=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!=
8
+ null&&$APP.N(d)?IP(this,c,""+$APP.T.g(d)):this.removeAttribute(c)}})},TP=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;Object.defineProperty(a,"observedAttributes",{get:function(){return SP}});QP(b,"checked","checked");QP(b,"disabled","disabled");QP(b,"readOnly","readonly");QP(b,"required","required");RP(b,"name","name");RP(b,"value","value");b.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xSwitchRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),
9
9
  e=document.createElement("button"),g=document.createElement("span"),h=document.createElement("span");d.textContent=":host{display:inline-block;vertical-align:middle;color-scheme:light dark;--x-switch-track-width:44px;--x-switch-track-height:24px;--x-switch-thumb-size:18px;--x-switch-thumb-offset:3px;--x-switch-track-radius:var(--x-radius-full,999px);--x-switch-track-bg:var(--x-color-border,#d1d5db);--x-switch-track-bg-checked:var(--x-color-primary,#2563eb);--x-switch-thumb-bg:var(--x-color-bg,#ffffff);--x-switch-focus-ring:var(--x-color-focus-ring,#60a5fa);--x-switch-disabled-opacity:0.45;--x-switch-transition:background var(--x-transition-duration,150ms) var(--x-transition-easing,ease),transform var(--x-transition-duration,150ms) var(--x-transition-easing,ease);}@media (prefers-color-scheme:dark){:host{--x-switch-track-bg:var(--x-color-border,#4b5563);--x-switch-track-bg-checked:var(--x-color-primary,#3b82f6);--x-switch-thumb-bg:var(--x-color-bg,#f9fafb);--x-switch-focus-ring:var(--x-color-focus-ring,#93c5fd);}}[part\x3dcontrol]{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;padding:0;cursor:pointer;}[part\x3dcontrol][disabled]{cursor:default;opacity:var(--x-switch-disabled-opacity);}[part\x3dcontrol]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--x-switch-focus-ring);border-radius:calc(var(--x-switch-track-radius) + 2px);}[part\x3dtrack]{position:relative;display:inline-block;width:var(--x-switch-track-width);height:var(--x-switch-track-height);border-radius:var(--x-switch-track-radius);background:var(--x-switch-track-bg);transition:background 150ms ease;flex-shrink:0;}:host([data-checked]) [part\x3dtrack]{background:var(--x-switch-track-bg-checked);}[part\x3dthumb]{position:absolute;top:var(--x-switch-thumb-offset);left:var(--x-switch-thumb-offset);width:var(--x-switch-thumb-size);height:var(--x-switch-thumb-size);border-radius:50%;background:var(--x-switch-thumb-bg);box-shadow:0 1px 3px rgba(0,0,0,0.25);transition:transform 150ms ease;}:host([data-checked]) [part\x3dthumb]{transform:translateX(calc(var(--x-switch-track-width) - var(--x-switch-thumb-size) - calc(var(--x-switch-thumb-offset) * 2)));}@media (prefers-reduced-motion:reduce){[part\x3dtrack]{transition:none;}[part\x3dthumb]{transition:none;}}";
10
- e.setAttribute("part","control");e.setAttribute("type","button");e.setAttribute("role","switch");g.setAttribute("part","track");h.setAttribute("part","thumb");g.appendChild(h);e.appendChild(g);c.appendChild(d);c.appendChild(e);this.__xSwitchRefs={root:c,control:e,track:g,thumb:h};$APP.r(this.attachInternals)&&(this.__xSwitchInternals=this.attachInternals())}KN(this);c=$APP.l(this,"__xSwitchRefs");$APP.r(c)&&(c=$APP.l(c,"control"),d=IN(this),e=JN(this),g={click:d,keydown:e},c.addEventListener("click",
11
- d),c.addEventListener("keydown",e),this.__xSwitchHandlers=g);d=this.getAttribute("id");$APP.r(d)&&(c=document.querySelector("label[for\x3d'"+$APP.S.g(d)+"']"),$APP.r(c)&&(e=c.getAttribute("id"),$APP.r(e)?c=e:(d="x-sw-lbl-"+$APP.S.g(d),c.setAttribute("id",d),c=d),d=$APP.l(this,"__xSwitchRefs"),$APP.r(d)&&$APP.l(d,"control").setAttribute("aria-labelledby",c)));return GN(this)};b.disconnectedCallback=function(){return KN(this)};b.attributeChangedCallback=function(){return GN(this)};b.formDisabledCallback=
12
- function(c){EN(this,"disabled",$APP.I(c));return GN(this)};b.formResetCallback=function(){this.removeAttribute("checked");return GN(this)};return a},PN=function(){return $APP.r(customElements.get("x-switch"))?null:customElements.define("x-switch",ON())};var NN="checked disabled readonly required name value aria-label aria-describedby aria-labelledby".split(" ");$APP.Sd(["x-switch-change-request",new $APP.P(null,2,[$APP.ll,!0,$APP.U,new $APP.P(null,3,[$APP.ri,$APP.X,$APP.Ej,$APP.qj,$APP.Yk,$APP.qj],null)],null),"x-switch-change",new $APP.P(null,2,[$APP.ll,!1,$APP.U,new $APP.P(null,2,[$APP.ri,$APP.X,$APP.Il,$APP.qj],null)],null)]);$APP.ka("baredom.exports.x_switch.init",PN);export const init=PN;
10
+ e.setAttribute("part","control");e.setAttribute("type","button");e.setAttribute("role","switch");g.setAttribute("part","track");h.setAttribute("part","thumb");g.appendChild(h);e.appendChild(g);c.appendChild(d);c.appendChild(e);this.__xSwitchRefs={root:c,control:e,track:g,thumb:h};$APP.n(this.attachInternals)&&(this.__xSwitchInternals=this.attachInternals())}PP(this);c=$APP.k(this,"__xSwitchRefs");$APP.n(c)&&(c=$APP.k(c,"control"),d=NP(this),e=OP(this),g={click:d,keydown:e},c.addEventListener("click",
11
+ d),c.addEventListener("keydown",e),this.__xSwitchHandlers=g);d=this.getAttribute("id");$APP.n(d)&&(c=document.querySelector("label[for\x3d'"+$APP.T.g(d)+"']"),$APP.n(c)&&(e=c.getAttribute("id"),$APP.n(e)?c=e:(d="x-sw-lbl-"+$APP.T.g(d),c.setAttribute("id",d),c=d),d=$APP.k(this,"__xSwitchRefs"),$APP.n(d)&&$APP.k(d,"control").setAttribute("aria-labelledby",c)));return LP(this)};b.disconnectedCallback=function(){return PP(this)};b.attributeChangedCallback=function(){return LP(this)};b.formDisabledCallback=
12
+ function(c){JP(this,"disabled",$APP.F(c));return LP(this)};b.formResetCallback=function(){this.removeAttribute("checked");return LP(this)};return a},UP=function(){return $APP.n(customElements.get("x-switch"))?null:customElements.define("x-switch",TP())};var SP="checked disabled readonly required name value aria-label aria-describedby aria-labelledby".split(" ");$APP.Pd(["x-switch-change-request",new $APP.R(null,2,[$APP.wl,!0,$APP.yj,new $APP.R(null,3,[$APP.zi,$APP.X,$APP.Rj,$APP.Bj,$APP.hl,$APP.Bj],null)],null),"x-switch-change",new $APP.R(null,2,[$APP.wl,!1,$APP.yj,new $APP.R(null,2,[$APP.zi,$APP.X,$APP.$l,$APP.Bj],null)],null)]);$APP.fa("baredom.exports.x_switch.init",UP);export const init=UP;
package/dist/x-tab.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var bm=function(a,b,c){return $APP.J(b,a)?a:c},gm=function(a){var b=$APP.N(a),c=$APP.G(b,$APP.zj),d=$APP.G(b,$APP.gj);a=$APP.G(b,$APP.yk);var e=$APP.G(b,$APP.rh),g=$APP.G(b,$APP.Fh),h=$APP.G(b,$APP.T);b=$APP.G(b,cm);c=$APP.I(c);var k=(d=$APP.I(d))?"-1":c?"0":"-1";return new $APP.P(null,8,[$APP.zj,c,$APP.gj,d,$APP.yk,bm(a,dm,"horizontal"),$APP.rh,bm(e,em,"md"),$APP.Fh,bm(g,fm,"default"),$APP.T,h,cm,b,$APP.Uj,k],null)},hm=function(a){return new $APP.P(null,8,[$APP.ri,a.getAttribute("value"),$APP.zj,
3
- a.hasAttribute("selected"),$APP.gj,a.hasAttribute("disabled"),$APP.yk,a.getAttribute("orientation"),$APP.rh,a.getAttribute("size"),$APP.Fh,a.getAttribute("variant"),$APP.T,a.getAttribute("label"),cm,a.getAttribute("controls")],null)},im=function(a){var b=gm(hm(a)),c=$APP.l(a,"__x_tab_base");if($APP.r(c)){a.setAttribute("role","tab");a.setAttribute("aria-selected",$APP.r($APP.zj.g(b))?"true":"false");$APP.r($APP.gj.g(b))?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled");a.setAttribute("tabindex",
4
- $APP.Uj.g(b));var d=cm.g(b),e=$APP.T.g(b);$APP.r($APP.r(d)?$APP.O(d,""):d)?a.setAttribute("aria-controls",d):a.removeAttribute("aria-controls");$APP.r($APP.r(e)?$APP.O(e,""):e)?a.setAttribute("aria-label",e):a.removeAttribute("aria-label");c.setAttribute("data-selected",$APP.r($APP.zj.g(b))?"true":"false");c.setAttribute("data-disabled",$APP.r($APP.gj.g(b))?"true":"false");c.setAttribute("data-size",$APP.rh.g(b));c.setAttribute("data-variant",$APP.Fh.g(b));return c.setAttribute("data-orientation",
5
- $APP.yk.g(b))}return null},jm=function(a){var b=gm(hm(a)),c=$APP.N(b);b=$APP.G(c,$APP.zj);c=$APP.G(c,$APP.gj);$APP.t(c)&&$APP.t(b)?(b=a.getAttribute("value"),a=a.dispatchEvent(new CustomEvent("tab-select",{detail:{value:$APP.r(b)?b:""},bubbles:!0,composed:!0}))):a=null;return a},km=function(a){a.addEventListener("click",function(){return jm(a)});a.addEventListener("keydown",function(b){var c=b.key;$APP.D.i(c,"Enter")||$APP.D.i(c," ")?(b.preventDefault(),b=jm(a)):b=null;return b})},lm=function(a){if($APP.l(a,
6
- "__x_tab_initialized")!==!0){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");c.textContent=":host{display:inline-block;color-scheme:light dark;outline:none;--x-tab-color:var(--x-color-text,#0f172a);--x-tab-hover-background:rgba(15,23,42,0.05);--x-tab-selected-color:var(--x-color-primary-hover,#1d4ed8);--x-tab-selected-background:rgba(59,130,246,0.12);--x-tab-selected-border-color:transparent;}@media (prefers-color-scheme:dark){:host{--x-tab-color:var(--x-color-text-muted,#94a3b8);--x-tab-hover-background:rgba(248,250,252,0.06);--x-tab-selected-color:var(--x-color-focus-ring,#60a5fa);--x-tab-selected-background:rgba(59,130,246,0.18);--x-tab-selected-border-color:var(--x-color-focus-ring,#60a5fa);}}.base{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;user-select:none;padding:var(--x-tab-padding-md,10px 16px);border-radius:var(--x-tab-radius,8px);color:var(--x-tab-color);background:var(--x-tab-background,transparent);border:1px solid var(--x-tab-border-color,transparent);transition:background var(--x-tab-transition-duration,120ms) var(--x-tab-transition-timing,ease),color var(--x-tab-transition-duration,120ms) var(--x-tab-transition-timing,ease),border-color var(--x-tab-transition-duration,120ms) var(--x-tab-transition-timing,ease);}.base[data-size\x3d'sm']{padding:var(--x-tab-padding-sm,6px 12px);}.base[data-size\x3d'md']{padding:var(--x-tab-padding-md,10px 16px);}.base[data-size\x3d'lg']{padding:var(--x-tab-padding-lg,14px 20px);}.base:hover{background:var(--x-tab-hover-background);}.base[data-selected\x3d'true']{color:var(--x-tab-selected-color);background:var(--x-tab-selected-background);border-color:var(--x-tab-selected-border-color);}.base[data-variant\x3d'underline'][data-selected\x3d'true']{border-bottom:2px solid var(--x-tab-selected-color);background:transparent;}.base[data-variant\x3d'pill'][data-selected\x3d'true']{background:var(--x-tab-selected-background);}.base[data-disabled\x3d'true']{opacity:var(--x-tab-disabled-opacity,0.5);cursor:default;}:host(:focus-visible) .base{box-shadow:0 0 0 3px var(--x-tab-focus-ring,rgba(59,130,246,0.4));}@media (prefers-reduced-motion: reduce){.base{transition:none;}}";
7
- d.setAttribute("part","base");d.className="base";d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__x_tab_root=b;a.__x_tab_base=d;km(a);a.__x_tab_initialized=!0}im(a);return a},mm=function(a){Object.defineProperty(a.prototype,"selected",{get:function(){return this.hasAttribute("selected")},set:function(b){return $APP.r(b)?this.setAttribute("selected",""):this.removeAttribute("selected")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,"disabled",{get:function(){return this.hasAttribute("disabled")},
8
- set:function(b){return $APP.r(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,"value",{get:function(){return this.getAttribute("value")},set:function(b){return $APP.r(b)?this.setAttribute("value",b):this.removeAttribute("value")},configurable:!0,enumerable:!0})},om=function(){var a=class extends HTMLElement{};a.observedAttributes=nm;a.prototype.connectedCallback=function(){return lm(this)};a.prototype.attributeChangedCallback=
9
- function(){return $APP.l(this,"__x_tab_initialized")===!0?im(this):lm(this)};mm(a);return a},pm=function(){return $APP.r(customElements.get("x-tab"))?null:customElements.define("x-tab",om())},cm=new $APP.K(null,"controls","controls",1340701452);var nm="value selected disabled orientation size variant label controls".split(" "),dm=new $APP.R(null,new $APP.P(null,2,["vertical",null,"horizontal",null],null),null),em=new $APP.R(null,new $APP.P(null,3,["md",null,"lg",null,"sm",null],null),null),fm=new $APP.R(null,new $APP.P(null,3,["default",null,"underline",null,"pill",null],null),null);$APP.Sd(["tab-select",new $APP.P(null,1,[$APP.U,new $APP.P(null,1,[$APP.ri,$APP.X],null)],null)]);$APP.ka("baredom.exports.x_tab.init",pm);export const init=pm;
2
+ var um=function(a,b,c){return $APP.J(b,a)?a:c},zm=function(a){var b=$APP.M(a),c=$APP.D(b,$APP.Lj),d=$APP.D(b,$APP.mj);a=$APP.D(b,$APP.Gk);var e=$APP.D(b,$APP.th),g=$APP.D(b,$APP.Nh),h=$APP.D(b,$APP.U);b=$APP.D(b,vm);c=$APP.F(c);var l=(d=$APP.F(d))?"-1":c?"0":"-1";return new $APP.R(null,8,[$APP.Lj,c,$APP.mj,d,$APP.Gk,um(a,wm,"horizontal"),$APP.th,um(e,xm,"md"),$APP.Nh,um(g,ym,"default"),$APP.U,h,vm,b,$APP.ik,l],null)},Am=function(a){return new $APP.R(null,8,[$APP.zi,a.getAttribute("value"),$APP.Lj,
3
+ a.hasAttribute("selected"),$APP.mj,a.hasAttribute("disabled"),$APP.Gk,a.getAttribute("orientation"),$APP.th,a.getAttribute("size"),$APP.Nh,a.getAttribute("variant"),$APP.U,a.getAttribute("label"),vm,a.getAttribute("controls")],null)},Bm=function(a){var b=zm(Am(a)),c=$APP.k(a,"__x_tab_base");if($APP.n(c)){a.setAttribute("role","tab");a.setAttribute("aria-selected",$APP.n($APP.Lj.g(b))?"true":"false");$APP.n($APP.mj.g(b))?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled");a.setAttribute("tabindex",
4
+ $APP.ik.g(b));var d=vm.g(b),e=$APP.U.g(b);$APP.n($APP.n(d)?$APP.N(d,""):d)?a.setAttribute("aria-controls",d):a.removeAttribute("aria-controls");$APP.n($APP.n(e)?$APP.N(e,""):e)?a.setAttribute("aria-label",e):a.removeAttribute("aria-label");c.setAttribute("data-selected",$APP.n($APP.Lj.g(b))?"true":"false");c.setAttribute("data-disabled",$APP.n($APP.mj.g(b))?"true":"false");c.setAttribute("data-size",$APP.th.g(b));c.setAttribute("data-variant",$APP.Nh.g(b));return c.setAttribute("data-orientation",
5
+ $APP.Gk.g(b))}return null},Cm=function(a){var b=zm(Am(a)),c=$APP.M(b);b=$APP.D(c,$APP.Lj);c=$APP.D(c,$APP.mj);$APP.r(c)&&$APP.r(b)?(b=a.getAttribute("value"),a=a.dispatchEvent(new CustomEvent("tab-select",{detail:{value:$APP.n(b)?b:""},bubbles:!0,composed:!0}))):a=null;return a},Dm=function(a){a.addEventListener("click",function(){return Cm(a)});a.addEventListener("keydown",function(b){var c=b.key;$APP.C.i(c,"Enter")||$APP.C.i(c," ")?(b.preventDefault(),b=Cm(a)):b=null;return b})},Em=function(a){if(!$APP.Bg(a,
6
+ "__x_tab_initialized")){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");c.textContent=":host{display:inline-block;color-scheme:light dark;outline:none;--x-tab-color:var(--x-color-text,#0f172a);--x-tab-hover-background:rgba(15,23,42,0.05);--x-tab-selected-color:var(--x-color-primary-hover,#1d4ed8);--x-tab-selected-background:rgba(59,130,246,0.12);--x-tab-selected-border-color:transparent;}@media (prefers-color-scheme:dark){:host{--x-tab-color:var(--x-color-text-muted,#94a3b8);--x-tab-hover-background:rgba(248,250,252,0.06);--x-tab-selected-color:var(--x-color-focus-ring,#60a5fa);--x-tab-selected-background:rgba(59,130,246,0.18);--x-tab-selected-border-color:var(--x-color-focus-ring,#60a5fa);}}.base{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;user-select:none;padding:var(--x-tab-padding-md,10px 16px);border-radius:var(--x-tab-radius,8px);color:var(--x-tab-color);background:var(--x-tab-background,transparent);border:1px solid var(--x-tab-border-color,transparent);transition:background var(--x-tab-transition-duration,120ms) var(--x-tab-transition-timing,ease),color var(--x-tab-transition-duration,120ms) var(--x-tab-transition-timing,ease),border-color var(--x-tab-transition-duration,120ms) var(--x-tab-transition-timing,ease);}.base[data-size\x3d'sm']{padding:var(--x-tab-padding-sm,6px 12px);}.base[data-size\x3d'md']{padding:var(--x-tab-padding-md,10px 16px);}.base[data-size\x3d'lg']{padding:var(--x-tab-padding-lg,14px 20px);}.base:hover{background:var(--x-tab-hover-background);}.base[data-selected\x3d'true']{color:var(--x-tab-selected-color);background:var(--x-tab-selected-background);border-color:var(--x-tab-selected-border-color);}.base[data-variant\x3d'underline'][data-selected\x3d'true']{border-bottom:2px solid var(--x-tab-selected-color);background:transparent;}.base[data-variant\x3d'pill'][data-selected\x3d'true']{background:var(--x-tab-selected-background);}.base[data-disabled\x3d'true']{opacity:var(--x-tab-disabled-opacity,0.5);cursor:default;}:host(:focus-visible) .base{box-shadow:0 0 0 3px var(--x-tab-focus-ring,rgba(59,130,246,0.4));}@media (prefers-reduced-motion: reduce){.base{transition:none;}}";
7
+ d.setAttribute("part","base");d.className="base";d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__x_tab_root=b;a.__x_tab_base=d;Dm(a);a.__x_tab_initialized=!0}Bm(a);return a},Fm=function(a){Object.defineProperty(a.prototype,"selected",{get:function(){return this.hasAttribute("selected")},set:function(b){return $APP.n(b)?this.setAttribute("selected",""):this.removeAttribute("selected")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,"disabled",{get:function(){return this.hasAttribute("disabled")},
8
+ set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,"value",{get:function(){return this.getAttribute("value")},set:function(b){return $APP.n(b)?this.setAttribute("value",b):this.removeAttribute("value")},configurable:!0,enumerable:!0})},Hm=function(){var a=class extends HTMLElement{};a.observedAttributes=Gm;a.prototype.connectedCallback=function(){return Em(this)};a.prototype.attributeChangedCallback=
9
+ function(){return $APP.Bg(this,"__x_tab_initialized")?Bm(this):Em(this)};Fm(a);return a},Im=function(){return $APP.n(customElements.get("x-tab"))?null:customElements.define("x-tab",Hm())},vm=new $APP.K(null,"controls","controls",1340701452);var Gm="value selected disabled orientation size variant label controls".split(" "),wm=new $APP.S(null,new $APP.R(null,2,["vertical",null,"horizontal",null],null),null),xm=new $APP.S(null,new $APP.R(null,3,["md",null,"lg",null,"sm",null],null),null),ym=new $APP.S(null,new $APP.R(null,3,["default",null,"underline",null,"pill",null],null),null);$APP.Pd(["tab-select",new $APP.R(null,1,[$APP.yj,new $APP.R(null,1,[$APP.zi,$APP.X],null)],null)]);$APP.fa("baredom.exports.x_tab.init",Im);export const init=Im;
@@ -1,25 +1,25 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var FJ=function(a,b,c){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.J(b,a)?a:c},GJ=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),$APP.t(isNaN(a))&&a>0?Math.floor(a):1):1},JJ=function(a){var b=$APP.N(a);a=$APP.G(b,HJ);b=$APP.G(b,IJ);if($APP.r($APP.r(a)?a:$APP.O(b,"none")))switch(b){case "asc":return"ascending";case "desc":return"descending";default:return"none"}else return null},KJ=function(a){var b=$APP.N(a);a=$APP.G(b,$APP.Z);b=$APP.G(b,HJ);return(a=$APP.D.i(a,
3
- "header"))?b:a},LJ=function(a){switch(a){case "none":return"asc";case "asc":return"desc";case "desc":return"none";default:return"asc"}},MJ=function(a){switch(a){case "none":return"Sort ascending";case "asc":return"Sort descending";case "desc":return"Remove sort";default:return"Sort ascending"}},QJ=function(a){var b=$APP.l(a,"__xTableCellRefs");if($APP.r(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("span"),
4
- g=document.createElement("slot"),h=document.createElement("button"),k=document.createElement("slot"),m=document.createElement("span");c.textContent=":host{display:block;box-sizing:border-box;color-scheme:light dark;--x-table-cell-padding:0.5rem 0.75rem;--x-table-cell-bg:transparent;--x-table-cell-header-bg:rgba(0,0,0,0.04);--x-table-cell-border-color:var(--x-color-border,rgba(0,0,0,0.1));--x-table-cell-border-width:1px;--x-table-cell-color:var(--x-color-text,inherit);--x-table-cell-header-color:var(--x-color-text,inherit);--x-table-cell-font-size:inherit;--x-table-cell-header-font-weight:600;--x-table-cell-min-width:0;--x-table-cell-max-width:none;--x-table-cell-sort-color:var(--x-color-text-muted,rgba(0,0,0,0.4));--x-table-cell-sort-hover-color:var(--x-color-text,rgba(0,0,0,0.7));--x-table-cell-focus-ring:var(--x-color-focus-ring,rgba(59,130,246,0.5));--x-table-cell-transition-duration:var(--x-transition-duration,150ms);--x-table-cell-sticky-bg:var(--x-color-bg,#ffffff);--x-table-cell-disabled-opacity:0.45;min-width:var(--x-table-cell-min-width);max-width:var(--x-table-cell-max-width);}@media (prefers-color-scheme:dark){:host{--x-table-cell-header-bg:rgba(255,255,255,0.06);--x-table-cell-border-color:var(--x-color-border,rgba(255,255,255,0.1));--x-table-cell-sort-color:var(--x-color-text-muted,rgba(255,255,255,0.4));--x-table-cell-sort-hover-color:var(--x-color-text,rgba(255,255,255,0.7));--x-table-cell-sticky-bg:var(--x-color-bg,#1f2937);}}:host([data-sticky\x3d'start']){position:sticky;inset-inline-start:0;background:var(--x-table-cell-sticky-bg);z-index:1;}:host([data-sticky\x3d'end']){position:sticky;inset-inline-end:0;background:var(--x-table-cell-sticky-bg);z-index:1;}:host([disabled]){opacity:var(--x-table-cell-disabled-opacity);}[part\x3dcell]{display:flex;align-items:center;justify-content:flex-start;padding:var(--x-table-cell-padding);background:var(--x-table-cell-bg);border-bottom:var(--x-table-cell-border-width) solid var(--x-table-cell-border-color);color:var(--x-table-cell-color);font-size:var(--x-table-cell-font-size);min-width:0;box-sizing:border-box;}:host([data-type\x3d'header']) [part\x3dcell]{background:var(--x-table-cell-header-bg);color:var(--x-table-cell-header-color);font-weight:var(--x-table-cell-header-font-weight);}:host([data-align\x3d'start']) [part\x3dcell]{justify-content:flex-start;}:host([data-align\x3d'center']) [part\x3dcell]{justify-content:center;}:host([data-align\x3d'end']) [part\x3dcell]{justify-content:flex-end;}:host([data-valign\x3d'top']) [part\x3dcell]{align-items:flex-start;}:host([data-valign\x3d'middle']) [part\x3dcell]{align-items:center;}:host([data-valign\x3d'bottom']) [part\x3dcell]{align-items:flex-end;}[part\x3dcontent]{flex:1 1 auto;min-width:0;}:host([data-truncate]) [part\x3dcontent]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}[part\x3dsort-btn]{flex:0 0 auto;appearance:none;border:0;background:transparent;padding:2px;margin:0 0 0 4px;cursor:pointer;color:var(--x-table-cell-sort-color);display:inline-flex;align-items:center;justify-content:center;border-radius:4px;transition:color var(--x-table-cell-transition-duration) ease;line-height:1;}[part\x3dsort-btn]:hover{color:var(--x-table-cell-sort-hover-color);}[part\x3dsort-btn]:focus{outline:none;}[part\x3dsort-btn]:focus-visible{outline:2px solid var(--x-table-cell-focus-ring);outline-offset:2px;}[part\x3dsort-btn][disabled]{cursor:default;pointer-events:none;opacity:0.4;}[part\x3dsort-btn][hidden]{display:none !important;}@media (prefers-reduced-motion:reduce){[part\x3dsort-btn]{transition:none !important;}}";
5
- d.setAttribute("part","cell");e.setAttribute("part","content");e.appendChild(g);h.setAttribute("part","sort-btn");h.setAttribute("type","button");k.setAttribute("name","sort-icon");m.setAttribute("part","sort-icon-default");m.setAttribute("aria-hidden","true");m.innerHTML='\x3csvg width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"currentColor" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M8 3L5 7h6L8 3zm0 10l3-4H5l3 4z"/\x3e\x3c/svg\x3e';k.appendChild(m);h.appendChild(k);d.appendChild(e);d.appendChild(h);
6
- b.appendChild(c);b.appendChild(d);a.__xTableCellRefs=new $APP.P(null,5,[$APP.bi,b,NJ,d,$APP.Vh,e,OJ,h,PJ,m],null);return $APP.l(a,"__xTableCellRefs")},eK=function(a){a=$APP.Q([$APP.qi,RJ,SJ,TJ,HJ,$APP.fi,$APP.Uh,UJ,VJ,$APP.W,WJ],[a.getAttribute("align"),a.getAttribute("row-span"),a.getAttribute("valign"),a.getAttribute("sort-direction"),a.hasAttribute("sortable"),a.hasAttribute("truncate"),a.getAttribute("type"),a.getAttribute("sticky"),a.getAttribute("scope"),a.hasAttribute("disabled"),a.getAttribute("col-span")]);
7
- var b=$APP.N(a);a=$APP.G(b,$APP.W);var c=$APP.G(b,WJ),d=$APP.G(b,$APP.qi),e=$APP.G(b,RJ),g=$APP.G(b,SJ),h=$APP.G(b,TJ),k=$APP.G(b,HJ),m=$APP.G(b,$APP.fi),p=$APP.G(b,$APP.Uh),q=$APP.G(b,UJ);b=$APP.G(b,VJ);return $APP.Q([$APP.Qi,IJ,XJ,$APP.Z,YJ,HJ,$APP.Mk,$APP.vl,$APP.fi,$APP.W,$APP.Ch],[FJ(d,ZJ,"start"),FJ(h,$J,"none"),FJ(g,aK,"middle"),FJ(p,bK,"data"),FJ(b,cK,"col"),$APP.I(k),FJ(q,dK,"none"),GJ(c),$APP.I(m),$APP.I(a),GJ(e)])},fK=function(a){var b=eK(a);if($APP.O($APP.l(a,"__xTableCellModel"),b)){b=
8
- $APP.N(b);var c=$APP.G(b,$APP.vl),d=$APP.G(b,$APP.Ch),e=$APP.G(b,$APP.W),g=$APP.G(b,IJ),h=QJ(a);h=$APP.N(h);var k=$APP.G(h,OJ);h=$APP.G(h,PJ);var m=KJ(b),p=$APP.N(b),q=$APP.G(p,$APP.Z),w=$APP.G(p,$APP.Qi),x=$APP.G(p,XJ),y=$APP.G(p,$APP.Mk),A=$APP.G(p,$APP.fi),B=$APP.G(p,$APP.W);$APP.G(p,HJ);$APP.G(p,IJ);var E=a.setAttribute,H=$APP.N(p);var F=$APP.G(H,$APP.Z);H=$APP.G(H,YJ);F=$APP.D.i(F,"header")?$APP.D.i(H,"row")||$APP.D.i(H,"rowgroup")?"rowheader":"columnheader":"cell";E.call(a,"role",F);p=JJ(p);
9
- $APP.r(p)?a.setAttribute("aria-sort",p):a.removeAttribute("aria-sort");$APP.r(B)?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled");a.setAttribute("data-type",q);a.setAttribute("data-align",w);a.setAttribute("data-valign",x);$APP.D.i(y,"none")?a.removeAttribute("data-sticky"):a.setAttribute("data-sticky",y);$APP.r(A)?a.setAttribute("data-truncate",""):a.removeAttribute("data-truncate");a.style.gridColumn=c>1?"span "+$APP.S.g(c):"";a.style.gridRow=d>1?"span "+$APP.S.g(d):"";
10
- k.hidden=$APP.t(m);c=parseInt;q=$APP.N(b);m=$APP.G(q,$APP.Z);d=$APP.G(q,HJ);q=$APP.G(q,$APP.W);m=$APP.D.i(m,"header");k.tabIndex=c($APP.r(m?$APP.r(d)?$APP.t(q):d:m)?"0":"-1",10);k.setAttribute("aria-label",MJ(g));k.disabled=$APP.I(e);a:switch(e=$APP.N(b),$APP.G(e,IJ)){case "asc":e='\x3csvg width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"currentColor" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M8 4L4 10h8L8 4z"/\x3e\x3c/svg\x3e';break a;case "desc":e='\x3csvg width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"currentColor" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M8 12l4-6H4l4 6z"/\x3e\x3c/svg\x3e';
11
- break a;default:e='\x3csvg width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"currentColor" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M8 3L5 7h6L8 3zm0 10l3-4H5l3 4z"/\x3e\x3c/svg\x3e'}h.innerHTML=e;a.__xTableCellModel=b}},gK=function(a){var b=a.getAttribute("sort-direction");b=FJ(b,$J,"none");b=new CustomEvent("x-table-cell-sort",{detail:{direction:LJ(b),previousDirection:b},bubbles:!0,composed:!0,cancelable:!0});a.dispatchEvent(b)},hK=function(a){var b=function(){var c=$APP.l(a,"__xTableCellModel");
12
- return $APP.r(c)?c:eK(a)}();$APP.r(function(){var c=KJ(b);return $APP.r(c)?$APP.t($APP.W.g(b)):c}())&&gK(a);return null},iK=function(a){function b(){return hK(a)}var c=QJ(a);c=$APP.N(c);$APP.G(c,OJ).addEventListener("click",b);$APP.n(a,"__xTableCellHandlers",{"sort-click":b})},jK=function(a){var b=$APP.l(a,"__xTableCellHandlers"),c=$APP.l(a,"__xTableCellRefs");$APP.r($APP.r(b)?c:b)&&(c=$APP.N(c),c=$APP.G(c,OJ),b=$APP.l(b,"sort-click"),$APP.r(b)&&c.removeEventListener("click",b));a.__xTableCellHandlers=
13
- null},kK=function(a){Object.defineProperty(a,"type",{get:function(){var b=this.getAttribute("type");return $APP.r(b)?b:"data"},set:function(b){return $APP.r(b)?this.setAttribute("type",""+$APP.S.g(b)):this.removeAttribute("type")},enumerable:!0,configurable:!0});Object.defineProperty(a,"scope",{get:function(){var b=this.getAttribute("scope");return $APP.r(b)?b:"col"},set:function(b){return $APP.r(b)?this.setAttribute("scope",""+$APP.S.g(b)):this.removeAttribute("scope")},enumerable:!0,configurable:!0});
14
- Object.defineProperty(a,"align",{get:function(){var b=this.getAttribute("align");return $APP.r(b)?b:"start"},set:function(b){return $APP.r(b)?this.setAttribute("align",""+$APP.S.g(b)):this.removeAttribute("align")},enumerable:!0,configurable:!0});Object.defineProperty(a,"valign",{get:function(){var b=this.getAttribute("valign");return $APP.r(b)?b:"middle"},set:function(b){return $APP.r(b)?this.setAttribute("valign",""+$APP.S.g(b)):this.removeAttribute("valign")},enumerable:!0,configurable:!0});Object.defineProperty(a,
15
- "truncate",{get:function(){return this.hasAttribute("truncate")},set:function(b){return $APP.r(b)?this.setAttribute("truncate",""):this.removeAttribute("truncate")},enumerable:!0,configurable:!0});Object.defineProperty(a,"sticky",{get:function(){var b=this.getAttribute("sticky");return $APP.r(b)?b:"none"},set:function(b){return $APP.r(b)?this.setAttribute("sticky",""+$APP.S.g(b)):this.removeAttribute("sticky")},enumerable:!0,configurable:!0});Object.defineProperty(a,"sortable",{get:function(){return this.hasAttribute("sortable")},
16
- set:function(b){return $APP.r(b)?this.setAttribute("sortable",""):this.removeAttribute("sortable")},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});Object.defineProperty(a,"colSpan",{get:function(){return GJ(this.getAttribute("col-span"))},set:function(b){b=parseInt(b,10);return $APP.t(isNaN(b))&&
17
- b>0?this.setAttribute("col-span",""+$APP.S.g(b)):this.removeAttribute("col-span")},enumerable:!0,configurable:!0});Object.defineProperty(a,"rowSpan",{get:function(){return GJ(this.getAttribute("row-span"))},set:function(b){b=parseInt(b,10);return $APP.t(isNaN(b))&&b>0?this.setAttribute("row-span",""+$APP.S.g(b)):this.removeAttribute("row-span")},enumerable:!0,configurable:!0});Object.defineProperty(a,"sortDirection",{get:function(){var b=this.getAttribute("sort-direction");return $APP.r(b)?b:"none"},
18
- set:function(b){return $APP.r(b)?this.setAttribute("sort-direction",""+$APP.S.g(b)):this.removeAttribute("sort-direction")},enumerable:!0,configurable:!0})},oK=function(){var a=class extends HTMLElement{};a.observedAttributes=lK;a.prototype.connectedCallback=function(){QJ(this);jK(this);iK(this);fK(this);var b=$APP.l(this,"__xTableCellModel");var c=$APP.r(b)?b:eK(this);b=this.dispatchEvent;var d=CustomEvent,e=$APP.N(c);c=$APP.G(e,$APP.Z);var g=$APP.G(e,YJ),h=$APP.G(e,$APP.vl),k=$APP.G(e,$APP.Ch);
19
- e=$APP.G(e,$APP.Qi);b.call(this,new d("x-table-cell-connected",{detail:$APP.nh(new $APP.P(null,5,[$APP.Z,c,YJ,g,mK,h,nK,k,$APP.Qi,e],null)),bubbles:!0,composed:!0,cancelable:!1}));return null};a.prototype.disconnectedCallback=function(){jK(this);this.dispatchEvent(new CustomEvent("x-table-cell-disconnected",{detail:{},bubbles:!0,composed:!0,cancelable:!1}));return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&fK(this);return null};kK(a.prototype);return a},pK=function(){$APP.r(customElements.get("x-table-cell"))||
20
- customElements.define("x-table-cell",oK());return null},OJ=new $APP.K(null,"sort-btn","sort-btn",1913954560),mK=new $APP.K(null,"colSpan","colSpan",872137394),NJ=new $APP.K(null,"cell","cell",764245084),XJ=new $APP.K(null,"valign","valign",1485197511),PJ=new $APP.K(null,"sort-icon-default","sort-icon-default",-596209230),WJ=new $APP.K(null,"col-span-raw","col-span-raw",1425293661),TJ=new $APP.K(null,"sort-direction-raw","sort-direction-raw",-1822100883),UJ=new $APP.K(null,"sticky-raw","sticky-raw",
21
- 1857578519),RJ=new $APP.K(null,"row-span-raw","row-span-raw",-1130003707),VJ=new $APP.K(null,"scope-raw","scope-raw",-773628648),IJ=new $APP.K(null,"sort-direction","sort-direction",-1635889628),YJ=new $APP.K(null,"scope","scope",-439358418),HJ=new $APP.K(null,"sortable?","sortable?",291547474),SJ=new $APP.K(null,"valign-raw","valign-raw",-1083375124),nK=new $APP.K(null,"rowSpan","rowSpan",826884002);var lK="type scope align valign col-span row-span truncate sticky sortable sort-direction disabled".split(" ");
22
- $APP.Q([$APP.Qi,nK,$APP.ni,$APP.gj,XJ,$APP.Z,YJ,mK,$APP.Mk,new $APP.K(null,"sortable","sortable",2109633621),new $APP.K(null,"sortDirection","sortDirection",-45816999)],[new $APP.P(null,1,[$APP.Z,$APP.X],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.X],null),new $APP.P(null,1,[$APP.Z,$APP.X],null),new $APP.P(null,1,[$APP.Z,$APP.X],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,
23
- 1,[$APP.Z,$APP.X],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.X],null)]);$APP.Sd(["x-table-cell-sort",new $APP.P(null,2,[$APP.U,new $APP.P(null,2,[$APP.Ni,$APP.X,$APP.zl,$APP.X],null),$APP.ll,!0],null),"x-table-cell-connected",new $APP.P(null,1,[$APP.U,new $APP.P(null,5,[$APP.Z,$APP.X,YJ,$APP.X,mK,$APP.V,nK,$APP.V,$APP.Qi,$APP.X],null)],null),"x-table-cell-disconnected",new $APP.P(null,1,[$APP.U,$APP.Td],null)]);
24
- var bK=new $APP.R(null,new $APP.P(null,2,["data",null,"header",null],null),null),cK=new $APP.R(null,new $APP.P(null,4,["rowgroup",null,"col",null,"row",null,"colgroup",null],null),null),ZJ=new $APP.R(null,new $APP.P(null,3,["center",null,"start",null,"end",null],null),null),aK=new $APP.R(null,new $APP.P(null,3,["top",null,"middle",null,"bottom",null],null),null),dK=new $APP.R(null,new $APP.P(null,3,["none",null,"start",null,"end",null],null),null),$J=new $APP.R(null,new $APP.P(null,3,["none",null,
25
- "desc",null,"asc",null],null),null);$APP.ka("baredom.exports.x_table_cell.init",pK);export const init=pK;
2
+ var KL=function(a,b,c){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.J(b,a)?a:c},LL=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),$APP.r(isNaN(a))&&a>0?Math.floor(a):1):1},OL=function(a){var b=$APP.M(a);a=$APP.D(b,ML);b=$APP.D(b,NL);if($APP.n($APP.n(a)?a:$APP.N(b,"none")))switch(b){case "asc":return"ascending";case "desc":return"descending";default:return"none"}else return null},PL=function(a){var b=$APP.M(a);a=$APP.D(b,$APP.Z);b=$APP.D(b,ML);return(a=$APP.C.i(a,
3
+ "header"))?b:a},QL=function(a){switch(a){case "none":return"asc";case "asc":return"desc";case "desc":return"none";default:return"asc"}},RL=function(a){switch(a){case "none":return"Sort ascending";case "asc":return"Sort descending";case "desc":return"Remove sort";default:return"Sort ascending"}},VL=function(a){var b=$APP.k(a,"__xTableCellRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("span"),
4
+ g=document.createElement("slot"),h=document.createElement("button"),l=document.createElement("slot"),m=document.createElement("span");c.textContent=":host{display:block;box-sizing:border-box;color-scheme:light dark;--x-table-cell-padding:0.5rem 0.75rem;--x-table-cell-bg:transparent;--x-table-cell-header-bg:rgba(0,0,0,0.04);--x-table-cell-border-color:var(--x-color-border,rgba(0,0,0,0.1));--x-table-cell-border-width:1px;--x-table-cell-color:var(--x-color-text,inherit);--x-table-cell-header-color:var(--x-color-text,inherit);--x-table-cell-font-size:inherit;--x-table-cell-header-font-weight:600;--x-table-cell-min-width:0;--x-table-cell-max-width:none;--x-table-cell-sort-color:var(--x-color-text-muted,rgba(0,0,0,0.4));--x-table-cell-sort-hover-color:var(--x-color-text,rgba(0,0,0,0.7));--x-table-cell-focus-ring:var(--x-color-focus-ring,rgba(59,130,246,0.5));--x-table-cell-transition-duration:var(--x-transition-duration,150ms);--x-table-cell-sticky-bg:var(--x-color-bg,#ffffff);--x-table-cell-disabled-opacity:0.45;min-width:var(--x-table-cell-min-width);max-width:var(--x-table-cell-max-width);}@media (prefers-color-scheme:dark){:host{--x-table-cell-header-bg:rgba(255,255,255,0.06);--x-table-cell-border-color:var(--x-color-border,rgba(255,255,255,0.1));--x-table-cell-sort-color:var(--x-color-text-muted,rgba(255,255,255,0.4));--x-table-cell-sort-hover-color:var(--x-color-text,rgba(255,255,255,0.7));--x-table-cell-sticky-bg:var(--x-color-bg,#1f2937);}}:host([data-sticky\x3d'start']){position:sticky;inset-inline-start:0;background:var(--x-table-cell-sticky-bg);z-index:1;}:host([data-sticky\x3d'end']){position:sticky;inset-inline-end:0;background:var(--x-table-cell-sticky-bg);z-index:1;}:host([disabled]){opacity:var(--x-table-cell-disabled-opacity);}[part\x3dcell]{display:flex;align-items:center;justify-content:flex-start;padding:var(--x-table-cell-padding);background:var(--x-table-cell-bg);border-bottom:var(--x-table-cell-border-width) solid var(--x-table-cell-border-color);color:var(--x-table-cell-color);font-size:var(--x-table-cell-font-size);min-width:0;box-sizing:border-box;}:host([data-type\x3d'header']) [part\x3dcell]{background:var(--x-table-cell-header-bg);color:var(--x-table-cell-header-color);font-weight:var(--x-table-cell-header-font-weight);}:host([data-align\x3d'start']) [part\x3dcell]{justify-content:flex-start;}:host([data-align\x3d'center']) [part\x3dcell]{justify-content:center;}:host([data-align\x3d'end']) [part\x3dcell]{justify-content:flex-end;}:host([data-valign\x3d'top']) [part\x3dcell]{align-items:flex-start;}:host([data-valign\x3d'middle']) [part\x3dcell]{align-items:center;}:host([data-valign\x3d'bottom']) [part\x3dcell]{align-items:flex-end;}[part\x3dcontent]{flex:1 1 auto;min-width:0;}:host([data-truncate]) [part\x3dcontent]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}[part\x3dsort-btn]{flex:0 0 auto;appearance:none;border:0;background:transparent;padding:2px;margin:0 0 0 4px;cursor:pointer;color:var(--x-table-cell-sort-color);display:inline-flex;align-items:center;justify-content:center;border-radius:4px;transition:color var(--x-table-cell-transition-duration) ease;line-height:1;}[part\x3dsort-btn]:hover{color:var(--x-table-cell-sort-hover-color);}[part\x3dsort-btn]:focus{outline:none;}[part\x3dsort-btn]:focus-visible{outline:2px solid var(--x-table-cell-focus-ring);outline-offset:2px;}[part\x3dsort-btn][disabled]{cursor:default;pointer-events:none;opacity:0.4;}[part\x3dsort-btn][hidden]{display:none !important;}@media (prefers-reduced-motion:reduce){[part\x3dsort-btn]{transition:none !important;}}";
5
+ d.setAttribute("part","cell");e.setAttribute("part","content");e.appendChild(g);h.setAttribute("part","sort-btn");h.setAttribute("type","button");l.setAttribute("name","sort-icon");m.setAttribute("part","sort-icon-default");m.setAttribute("aria-hidden","true");m.innerHTML='\x3csvg width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"currentColor" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M8 3L5 7h6L8 3zm0 10l3-4H5l3 4z"/\x3e\x3c/svg\x3e';l.appendChild(m);h.appendChild(l);d.appendChild(e);d.appendChild(h);
6
+ b.appendChild(c);b.appendChild(d);a.__xTableCellRefs=new $APP.R(null,5,[$APP.ji,b,SL,d,$APP.ci,e,TL,h,UL,m],null);return $APP.k(a,"__xTableCellRefs")},jM=function(a){a=$APP.xf([$APP.yi,WL,XL,YL,ML,$APP.ni,$APP.bi,ZL,$L,$APP.W,aM],[a.getAttribute("align"),a.getAttribute("row-span"),a.getAttribute("valign"),a.getAttribute("sort-direction"),a.hasAttribute("sortable"),a.hasAttribute("truncate"),a.getAttribute("type"),a.getAttribute("sticky"),a.getAttribute("scope"),a.hasAttribute("disabled"),a.getAttribute("col-span")]);
7
+ var b=$APP.M(a);a=$APP.D(b,$APP.W);var c=$APP.D(b,aM),d=$APP.D(b,$APP.yi),e=$APP.D(b,WL),g=$APP.D(b,XL),h=$APP.D(b,YL),l=$APP.D(b,ML),m=$APP.D(b,$APP.ni),p=$APP.D(b,$APP.bi),q=$APP.D(b,ZL);b=$APP.D(b,$L);return $APP.xf([$APP.Wi,NL,bM,$APP.Z,cM,ML,$APP.Vk,$APP.Nl,$APP.ni,$APP.W,$APP.Ih],[KL(d,dM,"start"),KL(h,eM,"none"),KL(g,fM,"middle"),KL(p,gM,"data"),KL(b,hM,"col"),$APP.F(l),KL(q,iM,"none"),LL(c),$APP.F(m),$APP.F(a),LL(e)])},kM=function(a){var b=jM(a);if($APP.N($APP.k(a,"__xTableCellModel"),b)){b=
8
+ $APP.M(b);var c=$APP.D(b,$APP.Nl),d=$APP.D(b,$APP.Ih),e=$APP.D(b,$APP.W),g=$APP.D(b,NL),h=VL(a);h=$APP.M(h);var l=$APP.D(h,TL);h=$APP.D(h,UL);var m=PL(b),p=$APP.M(b),q=$APP.D(p,$APP.Z),v=$APP.D(p,$APP.Wi),x=$APP.D(p,bM),y=$APP.D(p,$APP.Vk),A=$APP.D(p,$APP.ni),B=$APP.D(p,$APP.W),E=a.setAttribute,H=$APP.M(p);var G=$APP.D(H,$APP.Z);H=$APP.D(H,cM);G=$APP.C.i(G,"header")?$APP.C.i(H,"row")||$APP.C.i(H,"rowgroup")?"rowheader":"columnheader":"cell";E.call(a,"role",G);p=OL(p);$APP.n(p)?a.setAttribute("aria-sort",
9
+ p):a.removeAttribute("aria-sort");$APP.n(B)?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled");a.setAttribute("data-type",q);a.setAttribute("data-align",v);a.setAttribute("data-valign",x);$APP.C.i(y,"none")?a.removeAttribute("data-sticky"):a.setAttribute("data-sticky",y);$APP.n(A)?a.setAttribute("data-truncate",""):a.removeAttribute("data-truncate");a.style.gridColumn=c>1?"span "+$APP.T.g(c):"";a.style.gridRow=d>1?"span "+$APP.T.g(d):"";l.hidden=$APP.r(m);c=parseInt;q=$APP.M(b);
10
+ m=$APP.D(q,$APP.Z);d=$APP.D(q,ML);q=$APP.D(q,$APP.W);m=$APP.C.i(m,"header");l.tabIndex=c($APP.n(m?$APP.n(d)?$APP.r(q):d:m)?"0":"-1",10);l.setAttribute("aria-label",RL(g));l.disabled=$APP.F(e);a:switch(e=$APP.M(b),$APP.D(e,NL)){case "asc":e='\x3csvg width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"currentColor" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M8 4L4 10h8L8 4z"/\x3e\x3c/svg\x3e';break a;case "desc":e='\x3csvg width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"currentColor" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M8 12l4-6H4l4 6z"/\x3e\x3c/svg\x3e';
11
+ break a;default:e='\x3csvg width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"currentColor" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M8 3L5 7h6L8 3zm0 10l3-4H5l3 4z"/\x3e\x3c/svg\x3e'}h.innerHTML=e;a.__xTableCellModel=b}},lM=function(a){var b=a.getAttribute("sort-direction");b=KL(b,eM,"none");b=new CustomEvent("x-table-cell-sort",{detail:{direction:QL(b),previousDirection:b},bubbles:!0,composed:!0,cancelable:!0});a.dispatchEvent(b)},mM=function(a){var b=function(){var c=$APP.k(a,"__xTableCellModel");
12
+ return $APP.n(c)?c:jM(a)}();$APP.n(function(){var c=PL(b);return $APP.n(c)?$APP.r($APP.W.g(b)):c}())&&lM(a);return null},nM=function(a){function b(){return mM(a)}var c=VL(a);c=$APP.M(c);$APP.D(c,TL).addEventListener("click",b);$APP.ia(a,"__xTableCellHandlers",{"sort-click":b})},oM=function(a){var b=$APP.k(a,"__xTableCellHandlers"),c=$APP.k(a,"__xTableCellRefs");$APP.n($APP.n(b)?c:b)&&(c=$APP.M(c),c=$APP.D(c,TL),b=$APP.k(b,"sort-click"),$APP.n(b)&&c.removeEventListener("click",b));a.__xTableCellHandlers=
13
+ null},pM=function(a){Object.defineProperty(a,"type",{get:function(){var b=this.getAttribute("type");return $APP.n(b)?b:"data"},set:function(b){return $APP.n(b)?this.setAttribute("type",""+$APP.T.g(b)):this.removeAttribute("type")},enumerable:!0,configurable:!0});Object.defineProperty(a,"scope",{get:function(){var b=this.getAttribute("scope");return $APP.n(b)?b:"col"},set:function(b){return $APP.n(b)?this.setAttribute("scope",""+$APP.T.g(b)):this.removeAttribute("scope")},enumerable:!0,configurable:!0});
14
+ Object.defineProperty(a,"align",{get:function(){var b=this.getAttribute("align");return $APP.n(b)?b:"start"},set:function(b){return $APP.n(b)?this.setAttribute("align",""+$APP.T.g(b)):this.removeAttribute("align")},enumerable:!0,configurable:!0});Object.defineProperty(a,"valign",{get:function(){var b=this.getAttribute("valign");return $APP.n(b)?b:"middle"},set:function(b){return $APP.n(b)?this.setAttribute("valign",""+$APP.T.g(b)):this.removeAttribute("valign")},enumerable:!0,configurable:!0});Object.defineProperty(a,
15
+ "truncate",{get:function(){return this.hasAttribute("truncate")},set:function(b){return $APP.n(b)?this.setAttribute("truncate",""):this.removeAttribute("truncate")},enumerable:!0,configurable:!0});Object.defineProperty(a,"sticky",{get:function(){var b=this.getAttribute("sticky");return $APP.n(b)?b:"none"},set:function(b){return $APP.n(b)?this.setAttribute("sticky",""+$APP.T.g(b)):this.removeAttribute("sticky")},enumerable:!0,configurable:!0});Object.defineProperty(a,"sortable",{get:function(){return this.hasAttribute("sortable")},
16
+ set:function(b){return $APP.n(b)?this.setAttribute("sortable",""):this.removeAttribute("sortable")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"colSpan",{get:function(){return LL(this.getAttribute("col-span"))},set:function(b){b=parseInt(b,10);return $APP.r(isNaN(b))&&
17
+ b>0?this.setAttribute("col-span",""+$APP.T.g(b)):this.removeAttribute("col-span")},enumerable:!0,configurable:!0});Object.defineProperty(a,"rowSpan",{get:function(){return LL(this.getAttribute("row-span"))},set:function(b){b=parseInt(b,10);return $APP.r(isNaN(b))&&b>0?this.setAttribute("row-span",""+$APP.T.g(b)):this.removeAttribute("row-span")},enumerable:!0,configurable:!0});Object.defineProperty(a,"sortDirection",{get:function(){var b=this.getAttribute("sort-direction");return $APP.n(b)?b:"none"},
18
+ set:function(b){return $APP.n(b)?this.setAttribute("sort-direction",""+$APP.T.g(b)):this.removeAttribute("sort-direction")},enumerable:!0,configurable:!0})},tM=function(){var a=class extends HTMLElement{};a.observedAttributes=qM;a.prototype.connectedCallback=function(){VL(this);oM(this);nM(this);kM(this);var b=$APP.k(this,"__xTableCellModel");var c=$APP.n(b)?b:jM(this);b=this.dispatchEvent;var d=CustomEvent,e=$APP.M(c);c=$APP.D(e,$APP.Z);var g=$APP.D(e,cM),h=$APP.D(e,$APP.Nl),l=$APP.D(e,$APP.Ih);
19
+ e=$APP.D(e,$APP.Wi);b.call(this,new d("x-table-cell-connected",{detail:$APP.ph(new $APP.R(null,5,[$APP.Z,c,cM,g,rM,h,sM,l,$APP.Wi,e],null)),bubbles:!0,composed:!0,cancelable:!1}));return null};a.prototype.disconnectedCallback=function(){oM(this);this.dispatchEvent(new CustomEvent("x-table-cell-disconnected",{detail:{},bubbles:!0,composed:!0,cancelable:!1}));return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&kM(this);return null};pM(a.prototype);return a},uM=function(){$APP.n(customElements.get("x-table-cell"))||
20
+ customElements.define("x-table-cell",tM());return null},TL=new $APP.K(null,"sort-btn","sort-btn",1913954560),rM=new $APP.K(null,"colSpan","colSpan",872137394),SL=new $APP.K(null,"cell","cell",764245084),bM=new $APP.K(null,"valign","valign",1485197511),UL=new $APP.K(null,"sort-icon-default","sort-icon-default",-596209230),aM=new $APP.K(null,"col-span-raw","col-span-raw",1425293661),YL=new $APP.K(null,"sort-direction-raw","sort-direction-raw",-1822100883),ZL=new $APP.K(null,"sticky-raw","sticky-raw",
21
+ 1857578519),WL=new $APP.K(null,"row-span-raw","row-span-raw",-1130003707),$L=new $APP.K(null,"scope-raw","scope-raw",-773628648),NL=new $APP.K(null,"sort-direction","sort-direction",-1635889628),cM=new $APP.K(null,"scope","scope",-439358418),ML=new $APP.K(null,"sortable?","sortable?",291547474),XL=new $APP.K(null,"valign-raw","valign-raw",-1083375124),sM=new $APP.K(null,"rowSpan","rowSpan",826884002);var qM="type scope align valign col-span row-span truncate sticky sortable sort-direction disabled".split(" ");
22
+ $APP.xf([$APP.Wi,sM,$APP.vi,$APP.mj,bM,$APP.Z,cM,rM,$APP.Vk,new $APP.K(null,"sortable","sortable",2109633621),new $APP.K(null,"sortDirection","sortDirection",-45816999)],[new $APP.R(null,1,[$APP.Z,$APP.X],null),new $APP.R(null,1,[$APP.Z,$APP.V],null),new $APP.R(null,1,[$APP.Z,$APP.Bj],null),new $APP.R(null,1,[$APP.Z,$APP.Bj],null),new $APP.R(null,1,[$APP.Z,$APP.X],null),new $APP.R(null,1,[$APP.Z,$APP.X],null),new $APP.R(null,1,[$APP.Z,$APP.X],null),new $APP.R(null,1,[$APP.Z,$APP.V],null),new $APP.R(null,
23
+ 1,[$APP.Z,$APP.X],null),new $APP.R(null,1,[$APP.Z,$APP.Bj],null),new $APP.R(null,1,[$APP.Z,$APP.X],null)]);$APP.Pd(["x-table-cell-sort",new $APP.R(null,2,[$APP.yj,new $APP.R(null,2,[$APP.Ti,$APP.X,$APP.Rl,$APP.X],null),$APP.wl,!0],null),"x-table-cell-connected",new $APP.R(null,1,[$APP.yj,new $APP.R(null,5,[$APP.Z,$APP.X,cM,$APP.X,rM,$APP.V,sM,$APP.V,$APP.Wi,$APP.X],null)],null),"x-table-cell-disconnected",new $APP.R(null,1,[$APP.yj,$APP.Qd],null)]);
24
+ var gM=new $APP.S(null,new $APP.R(null,2,["data",null,"header",null],null),null),hM=new $APP.S(null,new $APP.R(null,4,["rowgroup",null,"col",null,"row",null,"colgroup",null],null),null),dM=new $APP.S(null,new $APP.R(null,3,["center",null,"start",null,"end",null],null),null),fM=new $APP.S(null,new $APP.R(null,3,["top",null,"middle",null,"bottom",null],null),null),iM=new $APP.S(null,new $APP.R(null,3,["none",null,"start",null,"end",null],null),null),eM=new $APP.S(null,new $APP.R(null,3,["none",null,
25
+ "desc",null,"asc",null],null),null);$APP.fa("baredom.exports.x_table_cell.init",uM);export const init=uM;