@vanelsas/baredom 0.2.3-alpha → 1.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/CHANGELOG.md +8 -1
  2. package/README.md +4 -4
  3. package/dist/base.js +349 -346
  4. package/dist/x-alert.js +19 -19
  5. package/dist/x-avatar-group.js +11 -11
  6. package/dist/x-avatar.js +17 -17
  7. package/dist/x-badge.js +11 -11
  8. package/dist/x-breadcrumbs.js +14 -14
  9. package/dist/x-button.js +15 -15
  10. package/dist/x-cancel-dialogue.js +16 -16
  11. package/dist/x-card.js +7 -7
  12. package/dist/x-chart.js +47 -47
  13. package/dist/x-checkbox.js +11 -11
  14. package/dist/x-chip.js +8 -8
  15. package/dist/x-collapse.js +12 -12
  16. package/dist/x-command-palette.js +31 -31
  17. package/dist/x-container.js +6 -6
  18. package/dist/x-context-menu.js +20 -20
  19. package/dist/x-copy.js +22 -23
  20. package/dist/x-currency-field.js +22 -20
  21. package/dist/x-date-picker.js +42 -36
  22. package/dist/x-divider.js +13 -10
  23. package/dist/x-drawer.js +11 -11
  24. package/dist/x-dropdown.js +9 -9
  25. package/dist/x-fieldset.js +6 -6
  26. package/dist/x-file-download.js +7 -7
  27. package/dist/x-form-field.js +15 -15
  28. package/dist/x-form.js +10 -10
  29. package/dist/x-grid.js +7 -7
  30. package/dist/x-menu-item.js +10 -10
  31. package/dist/x-menu.js +10 -10
  32. package/dist/x-modal.js +12 -12
  33. package/dist/x-navbar.js +13 -12
  34. package/dist/x-notification-center.js +10 -9
  35. package/dist/x-pagination.js +16 -16
  36. package/dist/x-popover.js +14 -11
  37. package/dist/x-progress-circle.js +9 -9
  38. package/dist/x-progress.js +11 -10
  39. package/dist/x-radio.js +11 -11
  40. package/dist/x-search-field.js +14 -14
  41. package/dist/x-select.js +10 -10
  42. package/dist/x-sidebar.js +17 -26
  43. package/dist/x-skeleton.js +6 -6
  44. package/dist/x-slider.js +16 -16
  45. package/dist/x-spacer.js +5 -5
  46. package/dist/x-spinner.js +5 -5
  47. package/dist/x-stat.js +12 -9
  48. package/dist/x-stepper.js +16 -16
  49. package/dist/x-switch.js +10 -10
  50. package/dist/x-tab.js +8 -8
  51. package/dist/x-table-cell.js +23 -23
  52. package/dist/x-table-row.js +10 -10
  53. package/dist/x-table.js +16 -15
  54. package/dist/x-tabs.js +12 -11
  55. package/dist/x-text-area.js +17 -17
  56. package/dist/x-timeline-item.js +23 -23
  57. package/dist/x-timeline.js +9 -9
  58. package/dist/x-toast.js +23 -23
  59. package/dist/x-toaster.js +8 -8
  60. package/package.json +1 -1
package/dist/x-stepper.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var Qk=function(a){a=$APP.I(Ok,typeof a==="string"?a.toLowerCase():null);return $APP.n(a)?a:Pk},Sk=function(a){a=$APP.I(Rk,a);return $APP.n(a)?a:"horizontal"},Vk=function(a){a=$APP.I(Tk,typeof a==="string"?a.toLowerCase():null);return $APP.n(a)?a:Uk},Xk=function(a){a=$APP.I(Wk,a);return $APP.n(a)?a:"md"},Yk=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),typeof a==="number"&&$APP.p(isNaN(a))&&a>=0?a:0):0},Zk=function(a){if(typeof a==="string"){var b=a.trim();if($APP.n($APP.Ef(/^\d+$/,
3
- b)))return a=parseInt(b,10),a>0&&a<=200?$APP.Md(function(d){return new $APP.P(null,2,[$APP.W,"Step "+$APP.S.g(d),$APP.Dg,null],null)},$APP.Cf(1,a+1)):$APP.Ld;if($APP.n(function(){var d=$APP.N("",b);return d?b.startsWith("["):d}()))try{var c=JSON.parse(b);return $APP.n(Array.isArray(c))?$APP.Md(function(d){return new $APP.P(null,2,[$APP.W,function(){var e=$APP.l(d,"label");return typeof e==="string"?e:""}(),$APP.Dg,function(){var e=$APP.l(d,"description");return typeof e==="string"?e:null}()],null)},
4
- $APP.gc(c)):$APP.Ld}catch(d){return $APP.Ld}else return $APP.Ld}else return $APP.Ld},$k=function(a){var b=$APP.l(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:0.875rem;--x-stepper-label-font-weight:500;--x-stepper-desc-font-size:0.75rem;--x-stepper-radius:999px;--x-stepper-motion:120ms;--x-stepper-press-scale:0.93;--x-stepper-focus-ring:rgba(0,0,0,0.55);--x-stepper-disabled-opacity:0.5;--x-stepper-complete-bg:rgba(16,140,72,1);--x-stepper-complete-color:#fff;--x-stepper-complete-connector:rgba(16,140,72,1);--x-stepper-current-bg:rgba(0,102,204,1);--x-stepper-current-color:#fff;--x-stepper-upcoming-bg:rgba(0,0,0,0.08);--x-stepper-upcoming-color:rgba(0,0,0,0.45);--x-stepper-idle-connector:rgba(0,0,0,0.12);--x-stepper-label-done-color:rgba(0,0,0,0.85);--x-stepper-label-current-color:rgba(0,0,0,0.85);--x-stepper-label-upcoming-color:rgba(0,0,0,0.4);--x-stepper-desc-color:rgba(0,0,0,0.4);}@media (prefers-color-scheme:dark){:host{--x-stepper-focus-ring:rgba(255,255,255,0.7);--x-stepper-complete-bg:rgba(60,210,120,1);--x-stepper-complete-color:#000;--x-stepper-complete-connector:rgba(60,210,120,1);--x-stepper-current-bg:rgba(80,160,255,1);--x-stepper-current-color:#000;--x-stepper-upcoming-bg:rgba(255,255,255,0.1);--x-stepper-upcoming-color:rgba(255,255,255,0.35);--x-stepper-idle-connector:rgba(255,255,255,0.12);--x-stepper-label-done-color:rgba(255,255,255,0.9);--x-stepper-label-current-color:rgba(255,255,255,0.9);--x-stepper-label-upcoming-color:rgba(255,255,255,0.3);--x-stepper-desc-color:rgba(255,255,255,0.35);}}[part\x3dcontainer]{display:flex;align-items:flex-start;margin:0;padding:0;list-style:none;}:host([data-orientation\x3dhorizontal]) [part\x3dcontainer]{flex-direction:row;}:host([data-orientation\x3dhorizontal]) [part\x3dstep]{display:flex;flex-direction:column;align-items:center;flex:1;min-width:0;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-track]{display:flex;align-items:center;width:100%;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-connector]{flex:1;height:var(--x-stepper-connector-thickness);min-width:8px;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-content]{display:flex;flex-direction:column;align-items:center;text-align:center;padding:var(--x-stepper-step-gap) 4px 0;width:100%;}:host([data-orientation\x3dvertical]) [part\x3dcontainer]{flex-direction:column;}:host([data-orientation\x3dvertical]) [part\x3dstep]{display:flex;flex-direction:row;gap:var(--x-stepper-step-gap);}:host([data-orientation\x3dvertical]) [part\x3dstep-track]{display:flex;flex-direction:column;align-items:center;flex-shrink:0;width:var(--x-stepper-indicator-size);}:host([data-orientation\x3dvertical]) [part\x3dstep-connector]{flex:1;width:var(--x-stepper-connector-thickness);min-height:16px;margin:4px 0;}:host([data-orientation\x3dvertical]) [part\x3dstep-content]{display:flex;flex-direction:column;flex:1;min-width:0;padding-bottom:var(--x-stepper-step-gap);}[part\x3dstep-indicator]{display:inline-flex;align-items:center;justify-content:center;width:var(--x-stepper-indicator-size);height:var(--x-stepper-indicator-size);border-radius:var(--x-stepper-radius);border:none;padding:0;margin:0;cursor:pointer;font-size:0.875em;font-weight:600;font-family:inherit;flex-shrink:0;position:relative;z-index:1;transition:background var(--x-stepper-motion) ease,color var(--x-stepper-motion) ease,transform 80ms ease;}[part\x3dstep-indicator]:focus{outline:none;}[part\x3dstep-indicator]:focus-visible{outline:2px solid var(--x-stepper-focus-ring);outline-offset:3px;}[data-state\x3dcomplete] [part\x3dstep-indicator]{background:var(--x-stepper-complete-bg);color:var(--x-stepper-complete-color);}[data-state\x3dcurrent] [part\x3dstep-indicator]{background:var(--x-stepper-current-bg);color:var(--x-stepper-current-color);cursor:default;}[data-state\x3dupcoming] [part\x3dstep-indicator]{background:var(--x-stepper-upcoming-bg);color:var(--x-stepper-upcoming-color);}[data-state\x3dcomplete] [part\x3dstep-connector]{background:var(--x-stepper-complete-connector);}[data-state\x3dcurrent] [part\x3dstep-connector],[data-state\x3dupcoming] [part\x3dstep-connector]{background:var(--x-stepper-idle-connector);}[part\x3dstep]:last-child [part\x3dstep-connector]{display:none;}[part\x3dstep-label]{font-size:var(--x-stepper-font-size);line-height:1.3;font-family:inherit;}[data-state\x3dcomplete] [part\x3dstep-label]{color:var(--x-stepper-label-done-color);}[data-state\x3dcurrent] [part\x3dstep-label]{color:var(--x-stepper-label-current-color);font-weight:var(--x-stepper-label-font-weight);}[data-state\x3dupcoming] [part\x3dstep-label]{color:var(--x-stepper-label-upcoming-color);}[part\x3dstep-description]{font-size:var(--x-stepper-desc-font-size);color:var(--x-stepper-desc-color);line-height:1.3;margin-top:0.2em;}:host(:not([disabled])) [data-state\x3dcomplete] [part\x3dstep-indicator]:hover,:host(:not([disabled])) [data-state\x3dupcoming] [part\x3dstep-indicator]:hover{filter:brightness(0.88);}:host(:not([disabled])) [data-state\x3dcomplete] [part\x3dstep-indicator]:active,:host(:not([disabled])) [data-state\x3dupcoming] [part\x3dstep-indicator]:active{transform:scale(var(--x-stepper-press-scale));}:host([disabled]){opacity:var(--x-stepper-disabled-opacity);}:host([disabled]) [part\x3dstep-indicator]{cursor:default;pointer-events:none;}:host([data-size\x3dsm]){--x-stepper-indicator-size:1.5rem;--x-stepper-font-size:0.8125rem;--x-stepper-desc-font-size:0.6875rem;}:host([data-size\x3dlg]){--x-stepper-indicator-size:2.5rem;--x-stepper-font-size:1rem;--x-stepper-desc-font-size:0.875rem;}@media (prefers-reduced-motion:reduce){[part\x3dstep-indicator]{transition:none;}}";
5
- d.setAttribute("part","container");d.setAttribute("role","list");b.appendChild(c);b.appendChild(d);a.__xStepperRefs=new $APP.P(null,2,[$APP.rh,b,$APP.pi,d],null);return $APP.l(a,"__xStepperRefs")},el=function(a){a=new $APP.P(null,5,[al,a.getAttribute("steps"),bl,a.getAttribute("current"),$APP.ji,a.getAttribute("orientation"),$APP.fi,a.getAttribute("size"),$APP.U,a.hasAttribute("disabled")],null);var b=$APP.M(a),c=$APP.I(b,al);a=$APP.I(b,bl);var d=$APP.I(b,$APP.ji),e=$APP.I(b,$APP.fi);b=$APP.I(b,$APP.U);
6
- c=Zk(c);var g=$APP.B(c);return new $APP.P(null,5,[cl,c,dl,g===0?0:$APP.kg.h(0,$APP.lg.h(Yk(a),g-1)),$APP.zh,Qk(d),$APP.Ag,Vk(e),$APP.U,$APP.J(b)],null)},fl=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.oa: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));}}())+")"},gl=function(a,b,c,d){var e=$APP.M(b);b=$APP.I(e,
7
- $APP.W);e=$APP.I(e,$APP.Dg);var g=document.createElement("div"),h=document.createElement("div"),k=document.createElement("button"),m=document.createElement("span"),q=document.createElement("div"),r=document.createElement("div"),v=document.createElement("span"),w=document.createElement("span");a:{var z=c instanceof $APP.K?c.oa:null;switch(z){case "complete":z="complete";break a;case "current":z="current";break a;case "upcoming":z="upcoming";break a;default:throw Error("No matching clause: "+$APP.S.g(z));
8
- }}b=$APP.n(b)?b:"";g.setAttribute("part","step");g.setAttribute("role","listitem");g.setAttribute("data-index",""+$APP.S.g(a));g.setAttribute("data-state",z);h.setAttribute("part","step-track");k.setAttribute("part","step-indicator");k.setAttribute("type","button");k.setAttribute("aria-label",fl(a,b,c));$APP.E.h(c,dl)?k.setAttribute("aria-current","step"):k.removeAttribute("aria-current");k.setAttribute("tabindex",$APP.n(d)?"-1":"0");m.setAttribute("part","step-number");m.setAttribute("aria-hidden",
9
- "true");m.textContent=$APP.E.h(c,$APP.Oi)?"✓":""+$APP.S.g(a+1);q.setAttribute("part","step-connector");q.setAttribute("aria-hidden","true");r.setAttribute("part","step-content");v.setAttribute("part","step-label");v.textContent=b;w.setAttribute("part","step-description");$APP.n($APP.n(e)?$APP.N(e,""):e)?(w.textContent=e,w.style.display="block"):w.style.display="none";k.appendChild(m);h.appendChild(k);h.appendChild(q);r.appendChild(v);r.appendChild(w);g.appendChild(h);g.appendChild(r);return g},il=
10
- function(a){var b=el(a);if($APP.N($APP.l(a,"__xStepperModel"),b)){b=$APP.M(b);var c=$APP.I(b,cl),d=$APP.I(b,dl),e=$APP.I(b,$APP.zh),g=$APP.I(b,$APP.Ag),h=$APP.I(b,$APP.U),k=$k(a);k=$APP.M(k);k=$APP.I(k,$APP.pi);a.setAttribute("data-orientation",Sk(e));a.setAttribute("data-size",Xk(g));k.innerHTML="";c=$APP.u($APP.Bd($APP.og,c));e=null;for(var m=g=0;;)if(m<g){var q=e.F(null,m),r=$APP.H(q,0,null);q=$APP.H(q,1,null);var v=r<d?$APP.Oi:$APP.E.h(r,d)?dl:hl;k.appendChild(gl(r,q,v,h));m+=1}else if(c=$APP.u(c))$APP.yc(c)?
11
- (g=$APP.ob(c),c=$APP.pb(c),e=g,g=$APP.B(g)):(g=$APP.x(c),e=$APP.H(g,0,null),g=$APP.H(g,1,null),m=e<d?$APP.Oi:$APP.E.h(e,d)?dl:hl,k.appendChild(gl(e,g,m,h)),c=$APP.y(c),e=null,g=0),m=0;else break;a.__xStepperModel=b}},kl=function(a){function b(d){var e=$APP.l(a,"__xStepperModel");e=$APP.n(e)?e:el(a);$APP.n($APP.U.g(e))||(d=d.target.closest("[part\x3dstep-indicator]"),$APP.n(d)&&(d=parseInt(d.closest("[part\x3dstep]").getAttribute("data-index"),10),e=dl.g(e),typeof d==="number"&&$APP.p(isNaN(d))&&$APP.N(d,
12
- e)&&(e=$APP.xg(new $APP.P(null,2,[$APP.Lg,e,jl,d],null)),e=new CustomEvent("x-stepper-change",{detail:e,bubbles:!0,composed:!0,cancelable:!0}),e=a.dispatchEvent(e),$APP.n(e)&&a.setAttribute("current",""+$APP.S.g(d)))));return null}var c=$k(a);c=$APP.M(c);$APP.I(c,$APP.pi).addEventListener("click",b);$APP.ma(a,"__xStepperHandlers",{click:b})},ll=function(a){var b=$APP.l(a,"__xStepperHandlers");if($APP.n(b)){var c=$APP.l(a,"__xStepperRefs");$APP.n(c)&&(c=$APP.pi.g(c),b=$APP.l(b,"click"),$APP.n($APP.n(c)?
13
- b:c)&&c.removeEventListener("click",b))}a.__xStepperHandlers=null},ml=function(a){Object.defineProperty(a,"steps",{get:function(){var b=this.getAttribute("steps");return $APP.n(b)?b:"[]"},set:function(b){return $APP.n(b)?this.setAttribute("steps",""+$APP.S.g(b)):this.removeAttribute("steps")},enumerable:!0,configurable:!0});Object.defineProperty(a,"current",{get:function(){return Yk(this.getAttribute("current"))},set:function(b){return b==null?this.removeAttribute("current"):this.setAttribute("current",
14
- ""+$APP.S.g(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"orientation",{get:function(){return Sk(Qk(this.getAttribute("orientation")))},set:function(b){return $APP.n(b)?this.setAttribute("orientation",""+$APP.S.g(b)):this.removeAttribute("orientation")},enumerable:!0,configurable:!0});Object.defineProperty(a,"size",{get:function(){return Xk(Vk(this.getAttribute("size")))},set:function(b){return $APP.n(b)?this.setAttribute("size",""+$APP.S.g(b)):this.removeAttribute("size")},enumerable:!0,
15
- 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})},ol=function(){var a=class extends HTMLElement{};a.observedAttributes=nl;a.prototype.connectedCallback=function(){$k(this);ll(this);kl(this);il(this);return null};a.prototype.disconnectedCallback=function(){ll(this);return null};a.prototype.attributeChangedCallback=
16
- function(b,c,d){$APP.N(c,d)&&il(this);return null};ml(a.prototype);return a},pl=function(){$APP.n(customElements.get("x-stepper"))||customElements.define("x-stepper",ol());return null},hl=new $APP.K(null,"upcoming","upcoming",1873315471),dl=new $APP.K(null,"current","current",-1088038603),al=new $APP.K(null,"steps-raw","steps-raw",1741812533),Uk=new $APP.K(null,"md","md",707286655),ql=new $APP.K(null,"lg","lg",-80787836),Pk=new $APP.K(null,"horizontal","horizontal",2062109475),rl=new $APP.K(null,
17
- "vertical","vertical",718696748),sl=new $APP.K(null,"sm","sm",-1402575065),jl=new $APP.K(null,"to","to",192099007),cl=new $APP.K(null,"steps","steps",-128433302),bl=new $APP.K(null,"current-raw","current-raw",-1440665509);var nl=["steps","current","orientation","size","disabled"];$APP.wd(["x-stepper-change",new $APP.P(null,2,[$APP.Y,new $APP.P(null,2,[$APP.Lg,$APP.Fh,jl,$APP.Fh],null),$APP.ui,!0],null)]);var Ok=new $APP.P(null,2,["horizontal",Pk,"vertical",rl],null),Rk=new $APP.P(null,2,[Pk,"horizontal",rl,"vertical"],null),Tk=new $APP.P(null,3,["sm",sl,"md",Uk,"lg",ql],null),Wk=new $APP.P(null,3,[sl,"sm",Uk,"md",ql,"lg"],null);$APP.ka("baredom.exports.x_stepper.init",pl);export const init=pl;
2
+ var Ik=function(a,b){return new $APP.Wc(null,function(){if(a>0){var c=$APP.u(b);return c?$APP.Tc($APP.x(c),Ik(a-1,$APP.Jb(c))):null}return null},null)},Lk=function(a){a=$APP.I(Jk,typeof a==="string"?a.toLowerCase():null);return $APP.n(a)?a:Kk},Nk=function(a){a=$APP.I(Mk,a);return $APP.n(a)?a:"horizontal"},Qk=function(a){a=$APP.I(Ok,typeof a==="string"?a.toLowerCase():null);return $APP.n(a)?a:Pk},Sk=function(a){a=$APP.I(Rk,a);return $APP.n(a)?a:"md"},Tk=function(a){return typeof a==="string"?(a=parseInt(a.trim(),
3
+ 10),typeof a==="number"&&$APP.p(isNaN(a))&&a>=0?a:0):0},Uk=function(a){if(typeof a==="string"){var b=a.trim();if($APP.n($APP.xf(/^\d+$/,b)))return a=parseInt(b,10),a>0&&a<=200?$APP.Gd(function(g){return new $APP.Q(null,2,[$APP.W,"Step "+$APP.T.g(g),$APP.vg,null],null)},$APP.wf(1,a+1)):$APP.Fd;if($APP.n(function(){var g=$APP.O("",b);return g?b.startsWith("["):g}()))try{var c=JSON.parse(b);if($APP.n(Array.isArray(c))){var d=$APP.dc(c),e=$APP.B(d)>200?Ik(200,d):d;return $APP.Gd(function(g){return new $APP.Q(null,
4
+ 2,[$APP.W,function(){var h=$APP.l(g,"label");return typeof h==="string"?h:""}(),$APP.vg,function(){var h=$APP.l(g,"description");return typeof h==="string"?h:null}()],null)},e)}return $APP.Fd}catch(g){return $APP.Fd}else return $APP.Fd}else return $APP.Fd},Vk=function(a){var b=$APP.l(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:0.875rem;--x-stepper-label-font-weight:500;--x-stepper-desc-font-size:0.75rem;--x-stepper-radius:999px;--x-stepper-motion:120ms;--x-stepper-press-scale:0.93;--x-stepper-focus-ring:rgba(0,0,0,0.55);--x-stepper-disabled-opacity:0.5;--x-stepper-complete-bg:rgba(16,140,72,1);--x-stepper-complete-color:#fff;--x-stepper-complete-connector:rgba(16,140,72,1);--x-stepper-current-bg:rgba(0,102,204,1);--x-stepper-current-color:#fff;--x-stepper-upcoming-bg:rgba(0,0,0,0.08);--x-stepper-upcoming-color:rgba(0,0,0,0.45);--x-stepper-idle-connector:rgba(0,0,0,0.12);--x-stepper-label-done-color:rgba(0,0,0,0.85);--x-stepper-label-current-color:rgba(0,0,0,0.85);--x-stepper-label-upcoming-color:rgba(0,0,0,0.4);--x-stepper-desc-color:rgba(0,0,0,0.4);}@media (prefers-color-scheme:dark){:host{--x-stepper-focus-ring:rgba(255,255,255,0.7);--x-stepper-complete-bg:rgba(60,210,120,1);--x-stepper-complete-color:#000;--x-stepper-complete-connector:rgba(60,210,120,1);--x-stepper-current-bg:rgba(80,160,255,1);--x-stepper-current-color:#000;--x-stepper-upcoming-bg:rgba(255,255,255,0.1);--x-stepper-upcoming-color:rgba(255,255,255,0.35);--x-stepper-idle-connector:rgba(255,255,255,0.12);--x-stepper-label-done-color:rgba(255,255,255,0.9);--x-stepper-label-current-color:rgba(255,255,255,0.9);--x-stepper-label-upcoming-color:rgba(255,255,255,0.3);--x-stepper-desc-color:rgba(255,255,255,0.35);}}[part\x3dcontainer]{display:flex;align-items:flex-start;margin:0;padding:0;list-style:none;}:host([data-orientation\x3dhorizontal]) [part\x3dcontainer]{flex-direction:row;}:host([data-orientation\x3dhorizontal]) [part\x3dstep]{display:flex;flex-direction:column;align-items:center;flex:1;min-width:0;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-track]{display:flex;align-items:center;width:100%;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-connector]{flex:1;height:var(--x-stepper-connector-thickness);min-width:8px;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-content]{display:flex;flex-direction:column;align-items:center;text-align:center;padding:var(--x-stepper-step-gap) 4px 0;width:100%;}:host([data-orientation\x3dvertical]) [part\x3dcontainer]{flex-direction:column;}:host([data-orientation\x3dvertical]) [part\x3dstep]{display:flex;flex-direction:row;gap:var(--x-stepper-step-gap);}:host([data-orientation\x3dvertical]) [part\x3dstep-track]{display:flex;flex-direction:column;align-items:center;flex-shrink:0;width:var(--x-stepper-indicator-size);}:host([data-orientation\x3dvertical]) [part\x3dstep-connector]{flex:1;width:var(--x-stepper-connector-thickness);min-height:16px;margin:4px 0;}:host([data-orientation\x3dvertical]) [part\x3dstep-content]{display:flex;flex-direction:column;flex:1;min-width:0;padding-bottom:var(--x-stepper-step-gap);}[part\x3dstep-indicator]{display:inline-flex;align-items:center;justify-content:center;width:var(--x-stepper-indicator-size);height:var(--x-stepper-indicator-size);border-radius:var(--x-stepper-radius);border:none;padding:0;margin:0;cursor:pointer;font-size:0.875em;font-weight:600;font-family:inherit;flex-shrink:0;position:relative;z-index:1;transition:background var(--x-stepper-motion) ease,color var(--x-stepper-motion) ease,transform 80ms ease;}[part\x3dstep-indicator]:focus{outline:none;}[part\x3dstep-indicator]:focus-visible{outline:2px solid var(--x-stepper-focus-ring);outline-offset:3px;}[data-state\x3dcomplete] [part\x3dstep-indicator]{background:var(--x-stepper-complete-bg);color:var(--x-stepper-complete-color);}[data-state\x3dcurrent] [part\x3dstep-indicator]{background:var(--x-stepper-current-bg);color:var(--x-stepper-current-color);cursor:default;}[data-state\x3dupcoming] [part\x3dstep-indicator]{background:var(--x-stepper-upcoming-bg);color:var(--x-stepper-upcoming-color);}[data-state\x3dcomplete] [part\x3dstep-connector]{background:var(--x-stepper-complete-connector);}[data-state\x3dcurrent] [part\x3dstep-connector],[data-state\x3dupcoming] [part\x3dstep-connector]{background:var(--x-stepper-idle-connector);}[part\x3dstep]:last-child [part\x3dstep-connector]{display:none;}[part\x3dstep-label]{font-size:var(--x-stepper-font-size);line-height:1.3;font-family:inherit;}[data-state\x3dcomplete] [part\x3dstep-label]{color:var(--x-stepper-label-done-color);}[data-state\x3dcurrent] [part\x3dstep-label]{color:var(--x-stepper-label-current-color);font-weight:var(--x-stepper-label-font-weight);}[data-state\x3dupcoming] [part\x3dstep-label]{color:var(--x-stepper-label-upcoming-color);}[part\x3dstep-description]{font-size:var(--x-stepper-desc-font-size);color:var(--x-stepper-desc-color);line-height:1.3;margin-top:0.2em;}:host(:not([disabled])) [data-state\x3dcomplete] [part\x3dstep-indicator]:hover,:host(:not([disabled])) [data-state\x3dupcoming] [part\x3dstep-indicator]:hover{filter:brightness(0.88);}:host(:not([disabled])) [data-state\x3dcomplete] [part\x3dstep-indicator]:active,:host(:not([disabled])) [data-state\x3dupcoming] [part\x3dstep-indicator]:active{transform:scale(var(--x-stepper-press-scale));}:host([disabled]){opacity:var(--x-stepper-disabled-opacity);}:host([disabled]) [part\x3dstep-indicator]{cursor:default;pointer-events:none;}:host([data-size\x3dsm]){--x-stepper-indicator-size:1.5rem;--x-stepper-font-size:0.8125rem;--x-stepper-desc-font-size:0.6875rem;}:host([data-size\x3dlg]){--x-stepper-indicator-size:2.5rem;--x-stepper-font-size:1rem;--x-stepper-desc-font-size:0.875rem;}@media (prefers-reduced-motion:reduce){[part\x3dstep-indicator]{transition:none;}}";
5
+ d.setAttribute("part","container");d.setAttribute("role","list");b.appendChild(c);b.appendChild(d);a.__xStepperRefs=new $APP.Q(null,2,[$APP.kh,b,$APP.ii,d],null);return $APP.l(a,"__xStepperRefs")},$k=function(a){a=new $APP.Q(null,5,[Wk,a.getAttribute("steps"),Xk,a.getAttribute("current"),$APP.di,a.getAttribute("orientation"),$APP.$h,a.getAttribute("size"),$APP.V,a.hasAttribute("disabled")],null);var b=$APP.N(a),c=$APP.I(b,Wk);a=$APP.I(b,Xk);var d=$APP.I(b,$APP.di),e=$APP.I(b,$APP.$h);b=$APP.I(b,$APP.V);
6
+ c=Uk(c);var g=$APP.B(c);return new $APP.Q(null,5,[Yk,c,Zk,g===0?0:$APP.dg.h(0,$APP.eg.h(Tk(a),g-1)),$APP.th,Lk(d),$APP.sg,Qk(e),$APP.V,$APP.K(b)],null)},al=function(a,b,c){return"Step "+$APP.T.g(a+1)+": "+$APP.T.g(b)+" ("+$APP.T.g(function(){var d=c instanceof $APP.M?c.na: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));}}())+")"},bl=function(a,b,c,d){var e=$APP.N(b);b=$APP.I(e,
7
+ $APP.W);e=$APP.I(e,$APP.vg);var g=document.createElement("div"),h=document.createElement("div"),k=document.createElement("button"),m=document.createElement("span"),q=document.createElement("div"),r=document.createElement("div"),v=document.createElement("span"),w=document.createElement("span");a:{var z=c instanceof $APP.M?c.na:null;switch(z){case "complete":z="complete";break a;case "current":z="current";break a;case "upcoming":z="upcoming";break a;default:throw Error("No matching clause: "+$APP.T.g(z));
8
+ }}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",z);h.setAttribute("part","step-track");k.setAttribute("part","step-indicator");k.setAttribute("type","button");k.setAttribute("aria-label",al(a,b,c));$APP.C.h(c,Zk)?k.setAttribute("aria-current","step"):k.removeAttribute("aria-current");k.setAttribute("tabindex",$APP.n(d)?"-1":"0");$APP.n(d)&&k.setAttribute("aria-disabled","true");m.setAttribute("part",
9
+ "step-number");m.setAttribute("aria-hidden","true");m.textContent=$APP.C.h(c,$APP.Ii)?"✓":""+$APP.T.g(a+1);q.setAttribute("part","step-connector");q.setAttribute("aria-hidden","true");r.setAttribute("part","step-content");v.setAttribute("part","step-label");v.textContent=b;w.setAttribute("part","step-description");$APP.n($APP.n(e)?$APP.O(e,""):e)?(w.textContent=e,w.style.display="block"):w.style.display="none";k.appendChild(m);h.appendChild(k);h.appendChild(q);r.appendChild(v);r.appendChild(w);g.appendChild(h);
10
+ g.appendChild(r);return g},dl=function(a){var b=$k(a);if($APP.O($APP.l(a,"__xStepperModel"),b)){b=$APP.N(b);var c=$APP.I(b,Yk),d=$APP.I(b,Zk),e=$APP.I(b,$APP.th),g=$APP.I(b,$APP.sg),h=$APP.I(b,$APP.V),k=Vk(a);k=$APP.N(k);k=$APP.I(k,$APP.ii);a.setAttribute("data-orientation",Nk(e));a.setAttribute("data-size",Sk(g));k.innerHTML="";c=$APP.u($APP.yd($APP.hg,c));e=null;for(var m=g=0;;)if(m<g){var q=e.D(null,m),r=$APP.H(q,0,null);q=$APP.H(q,1,null);var v=r<d?$APP.Ii:$APP.C.h(r,d)?Zk:cl;k.appendChild(bl(r,
11
+ q,v,h));m+=1}else if(c=$APP.u(c))$APP.uc(c)?(g=$APP.mb(c),c=$APP.nb(c),e=g,g=$APP.B(g)):(g=$APP.x(c),e=$APP.H(g,0,null),g=$APP.H(g,1,null),m=e<d?$APP.Ii:$APP.C.h(e,d)?Zk:cl,k.appendChild(bl(e,g,m,h)),c=$APP.y(c),e=null,g=0),m=0;else break;a.__xStepperModel=b}},fl=function(a){function b(d){var e=$APP.l(a,"__xStepperModel");e=$APP.n(e)?e:$k(a);$APP.n($APP.V.g(e))||(d=d.target.closest("[part\x3dstep-indicator]"),$APP.n(d)&&(d=parseInt(d.closest("[part\x3dstep]").getAttribute("data-index"),10),e=Zk.g(e),
12
+ typeof d==="number"&&$APP.p(isNaN(d))&&$APP.O(d,e)&&(e=$APP.pg(new $APP.Q(null,2,[$APP.Dg,e,el,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=Vk(a);c=$APP.N(c);$APP.I(c,$APP.ii).addEventListener("click",b);$APP.la(a,"__xStepperHandlers",{click:b})},gl=function(a){var b=$APP.l(a,"__xStepperHandlers");if($APP.n(b)){var c=$APP.l(a,"__xStepperRefs");$APP.n(c)&&
13
+ (c=$APP.ii.g(c),b=$APP.l(b,"click"),$APP.n($APP.n(c)?b:c)&&c.removeEventListener("click",b))}a.__xStepperHandlers=null},hl=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 Tk(this.getAttribute("current"))},set:function(b){return b==null?
14
+ this.removeAttribute("current"):this.setAttribute("current",""+$APP.T.g(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"orientation",{get:function(){return Nk(Lk(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 Sk(Qk(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})},jl=function(){var a=class extends HTMLElement{};a.observedAttributes=il;a.prototype.connectedCallback=function(){Vk(this);gl(this);fl(this);dl(this);return null};a.prototype.disconnectedCallback=function(){gl(this);
16
+ return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&dl(this);return null};hl(a.prototype);return a},kl=function(){$APP.n(customElements.get("x-stepper"))||customElements.define("x-stepper",jl());return null},cl=new $APP.M(null,"upcoming","upcoming",1873315471),Zk=new $APP.M(null,"current","current",-1088038603),Wk=new $APP.M(null,"steps-raw","steps-raw",1741812533),Pk=new $APP.M(null,"md","md",707286655),ll=new $APP.M(null,"lg","lg",-80787836),Kk=new $APP.M(null,"horizontal",
17
+ "horizontal",2062109475),ml=new $APP.M(null,"vertical","vertical",718696748),nl=new $APP.M(null,"sm","sm",-1402575065),el=new $APP.M(null,"to","to",192099007),Yk=new $APP.M(null,"steps","steps",-128433302),Xk=new $APP.M(null,"current-raw","current-raw",-1440665509);var il=["steps","current","orientation","size","disabled"];$APP.sd(["x-stepper-change",new $APP.Q(null,2,[$APP.Y,new $APP.Q(null,2,[$APP.Dg,$APP.zh,el,$APP.zh],null),$APP.ni,!0],null)]);var Jk=new $APP.Q(null,2,["horizontal",Kk,"vertical",ml],null),Mk=new $APP.Q(null,2,[Kk,"horizontal",ml,"vertical"],null),Ok=new $APP.Q(null,3,["sm",nl,"md",Pk,"lg",ll],null),Rk=new $APP.Q(null,3,[nl,"sm",Pk,"md",ll,"lg"],null);$APP.ja("baredom.exports.x_stepper.init",kl);export const init=kl;
package/dist/x-switch.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var XA=function(a,b,c){return a.setAttribute(b,c)},YA=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},ZA=function(a){a=$APP.cf([$APP.Jh,$APP.Yh,$APP.Cg,$APP.Qg,$APP.Zh,$APP.ti,$APP.Ei,$APP.Ci,$APP.ii],[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.I(b,$APP.Ci);var c=$APP.I(b,$APP.ii),d=$APP.I(b,$APP.Jh),e=$APP.I(b,$APP.Yh),g=$APP.I(b,$APP.Cg),h=$APP.I(b,$APP.Qg),k=$APP.I(b,$APP.Zh),m=$APP.I(b,$APP.ti);b=$APP.I(b,$APP.Ei);k=$APP.J(k);g=$APP.J(g);return $APP.cf([$APP.ah,$APP.Wg,$APP.aj,$APP.ni,$APP.Ig,$APP.gi,$APP.T,$APP.Mi,$APP.Vi,$APP.$h,$APP.U],[g,k?"true":"false",$APP.J(m),k,$APP.n(g)?k:!0,d,b!=null?b:"on",h,c,a,$APP.J(e)])},$A=function(a){var b=$APP.l(a,"__xSwitchRefs");if($APP.n(b)){var c=$APP.l(b,"control");b=ZA(a);var d=$APP.U.g(b),
4
- e=$APP.ni.g(b);XA(c,"aria-checked",$APP.Wg.g(b));c.setAttribute("aria-disabled",$APP.n(d)?"true":"false");XA(c,"aria-required",$APP.n($APP.ah.g(b))?"true":"false");XA(c,"aria-readonly",$APP.n($APP.aj.g(b))?"true":"false");var g=$APP.$h.g(b);$APP.n(g)?c.setAttribute("aria-label",g):c.removeAttribute("aria-label");g=$APP.Mi.g(b);$APP.n(g)?c.setAttribute("aria-labelledby",g):c.removeAttribute("aria-labelledby");g=$APP.Vi.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");YA(a,"data-checked",e);YA(a,"data-disabled",d);a=$APP.l(a,"__xSwitchInternals");return $APP.n(a)?a.setFormValue($APP.n(e)?$APP.T.g(b):null):null}return null},aB=function(a){var b=ZA(a),c=$APP.U.g(b),d=$APP.aj.g(b);if($APP.n($APP.n(c)?c:d))return null;d=$APP.ni.g(b);c=$APP.p(d);b=$APP.T.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.p(d.defaultPrevented)?(YA(a,"checked",c),$A(a),a.dispatchEvent(new CustomEvent("x-switch-change",{detail:{value:b,checked:c},bubbles:!0,composed:!0,cancelable:!1}))):null},bB=function(a){return function(){return aB(a)}},cB=function(a){return function(b){var c=b.key;return $APP.E.h(c," ")||$APP.E.h(c,"Enter")?(b.preventDefault(),aB(a)):null}},dB=function(a){var b=$APP.l(a,"__xSwitchRefs");if($APP.n(b)){var c=$APP.l(a,"__xSwitchHandlers");if($APP.n(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},eB=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return YA(this,c,$APP.J(d))}})},fB=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)?XA(this,c,""+$APP.S.g(d)):this.removeAttribute(c)}})},hB=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;Object.defineProperty(a,"observedAttributes",{get:function(){return gB}});eB(b,"checked","checked");eB(b,"disabled","disabled");eB(b,"readOnly","readonly");eB(b,"required","required");fB(b,"name","name");fB(b,"value","value");b.connectedCallback=function(){if(!$APP.n($APP.l(this,"__xSwitchRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),
2
+ var ZA=function(a,b,c){return a.setAttribute(b,c)},$A=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},aB=function(a){a=$APP.Xe([$APP.Dh,$APP.Sh,$APP.ug,$APP.Ig,$APP.Th,$APP.mi,$APP.yi,$APP.wi,$APP.ci],[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.I(b,$APP.wi);var c=$APP.I(b,$APP.ci),d=$APP.I(b,$APP.Dh),e=$APP.I(b,$APP.Sh),g=$APP.I(b,$APP.ug),h=$APP.I(b,$APP.Ig),k=$APP.I(b,$APP.Th),m=$APP.I(b,$APP.mi);b=$APP.I(b,$APP.yi);k=$APP.K(k);g=$APP.K(g);return $APP.Xe([$APP.Tg,$APP.Og,$APP.Vi,$APP.hi,$APP.Ag,$APP.ai,$APP.U,$APP.Gi,$APP.Pi,$APP.Uh,$APP.V],[g,k?"true":"false",$APP.K(m),k,$APP.n(g)?k:!0,d,b!=null?b:"on",h,c,a,$APP.K(e)])},bB=function(a){var b=$APP.l(a,"__xSwitchRefs");if($APP.n(b)){var c=$APP.l(b,"control");b=aB(a);var d=$APP.V.g(b),
4
+ e=$APP.hi.g(b);ZA(c,"aria-checked",$APP.Og.g(b));c.setAttribute("aria-disabled",$APP.n(d)?"true":"false");ZA(c,"aria-required",$APP.n($APP.Tg.g(b))?"true":"false");ZA(c,"aria-readonly",$APP.n($APP.Vi.g(b))?"true":"false");var g=$APP.Uh.g(b);$APP.n(g)?c.setAttribute("aria-label",g):c.removeAttribute("aria-label");g=$APP.Gi.g(b);$APP.n(g)?c.setAttribute("aria-labelledby",g):c.removeAttribute("aria-labelledby");g=$APP.Pi.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");$A(a,"data-checked",e);$A(a,"data-disabled",d);a=$APP.l(a,"__xSwitchInternals");return $APP.n(a)?a.setFormValue($APP.n(e)?$APP.U.g(b):null):null}return null},cB=function(a){var b=aB(a),c=$APP.V.g(b),d=$APP.Vi.g(b);if($APP.n($APP.n(c)?c:d))return null;d=$APP.hi.g(b);c=$APP.p(d);b=$APP.U.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.p(d.defaultPrevented)?($A(a,"checked",c),bB(a),a.dispatchEvent(new CustomEvent("x-switch-change",{detail:{value:b,checked:c},bubbles:!0,composed:!0,cancelable:!1}))):null},dB=function(a){return function(){return cB(a)}},eB=function(a){return function(b){var c=b.key;return $APP.C.h(c," ")||$APP.C.h(c,"Enter")?(b.preventDefault(),cB(a)):null}},fB=function(a){var b=$APP.l(a,"__xSwitchRefs");if($APP.n(b)){var c=$APP.l(a,"__xSwitchHandlers");if($APP.n(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},gB=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return $A(this,c,$APP.K(d))}})},hB=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.O(d)?ZA(this,c,""+$APP.T.g(d)):this.removeAttribute(c)}})},jB=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;Object.defineProperty(a,"observedAttributes",{get:function(){return iB}});gB(b,"checked","checked");gB(b,"disabled","disabled");gB(b,"readOnly","readonly");gB(b,"required","required");hB(b,"name","name");hB(b,"value","value");b.connectedCallback=function(){if(!$APP.n($APP.l(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:999px;--x-switch-track-bg:#d1d5db;--x-switch-track-bg-checked:#2563eb;--x-switch-thumb-bg:#ffffff;--x-switch-focus-ring:#60a5fa;--x-switch-disabled-opacity:0.45;--x-switch-transition:background 150ms ease,transform 150ms ease;}@media (prefers-color-scheme:dark){:host{--x-switch-track-bg:#4b5563;--x-switch-track-bg-checked:#3b82f6;--x-switch-thumb-bg:#f9fafb;--x-switch-focus-ring:#93c5fd;}}[part\x3dcontrol]{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;padding:0;cursor:pointer;}[part\x3dcontrol][disabled]{cursor:default;opacity:var(--x-switch-disabled-opacity);}[part\x3dcontrol]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--x-switch-focus-ring);border-radius:calc(var(--x-switch-track-radius) + 2px);}[part\x3dtrack]{position:relative;display:inline-block;width:var(--x-switch-track-width);height:var(--x-switch-track-height);border-radius:var(--x-switch-track-radius);background:var(--x-switch-track-bg);transition:background 150ms ease;flex-shrink:0;}:host([data-checked]) [part\x3dtrack]{background:var(--x-switch-track-bg-checked);}[part\x3dthumb]{position:absolute;top:var(--x-switch-thumb-offset);left:var(--x-switch-thumb-offset);width:var(--x-switch-thumb-size);height:var(--x-switch-thumb-size);border-radius:50%;background:var(--x-switch-thumb-bg);box-shadow:0 1px 3px rgba(0,0,0,0.25);transition:transform 150ms ease;}:host([data-checked]) [part\x3dthumb]{transform:translateX(calc(var(--x-switch-track-width) - var(--x-switch-thumb-size) - calc(var(--x-switch-thumb-offset) * 2)));}@media (prefers-reduced-motion:reduce){[part\x3dtrack]{transition:none;}[part\x3dthumb]{transition:none;}}";
10
- e.setAttribute("part","control");e.setAttribute("type","button");e.setAttribute("role","switch");g.setAttribute("part","track");h.setAttribute("part","thumb");g.appendChild(h);e.appendChild(g);c.appendChild(d);c.appendChild(e);this.__xSwitchRefs={root:c,control:e,track:g,thumb:h};$APP.n(this.attachInternals)&&(this.__xSwitchInternals=this.attachInternals())}dB(this);c=$APP.l(this,"__xSwitchRefs");$APP.n(c)&&(c=$APP.l(c,"control"),d=bB(this),e=cB(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.S.g(d)+"']"),$APP.n(c)&&(e=c.getAttribute("id"),$APP.n(e)?c=e:(d="x-sw-lbl-"+$APP.S.g(d),c.setAttribute("id",d),c=d),d=$APP.l(this,"__xSwitchRefs"),$APP.n(d)&&$APP.l(d,"control").setAttribute("aria-labelledby",c)));return $A(this)};b.disconnectedCallback=function(){return dB(this)};b.attributeChangedCallback=function(){return $A(this)};b.formDisabledCallback=
12
- function(c){YA(this,"disabled",$APP.J(c));return $A(this)};b.formResetCallback=function(){this.removeAttribute("checked");return $A(this)};return a},iB=function(){return $APP.n(customElements.get("x-switch"))?null:customElements.define("x-switch",hB())};var gB="checked disabled readonly required name value aria-label aria-describedby aria-labelledby".split(" ");$APP.wd(["x-switch-change-request",new $APP.P(null,2,[$APP.ui,!0,$APP.Y,new $APP.P(null,3,[$APP.T,$APP.X,$APP.Bg,$APP.Ji,$APP.ei,$APP.Ji],null)],null),"x-switch-change",new $APP.P(null,2,[$APP.ui,!1,$APP.Y,new $APP.P(null,2,[$APP.T,$APP.X,$APP.Qi,$APP.Ji],null)],null)]);$APP.ka("baredom.exports.x_switch.init",iB);export const init=iB;
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())}fB(this);c=$APP.l(this,"__xSwitchRefs");$APP.n(c)&&(c=$APP.l(c,"control"),d=dB(this),e=eB(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.l(this,"__xSwitchRefs"),$APP.n(d)&&$APP.l(d,"control").setAttribute("aria-labelledby",c)));return bB(this)};b.disconnectedCallback=function(){return fB(this)};b.attributeChangedCallback=function(){return bB(this)};b.formDisabledCallback=
12
+ function(c){$A(this,"disabled",$APP.K(c));return bB(this)};b.formResetCallback=function(){this.removeAttribute("checked");return bB(this)};return a},kB=function(){return $APP.n(customElements.get("x-switch"))?null:customElements.define("x-switch",jB())};var iB="checked disabled readonly required name value aria-label aria-describedby aria-labelledby".split(" ");$APP.sd(["x-switch-change-request",new $APP.Q(null,2,[$APP.ni,!0,$APP.Y,new $APP.Q(null,3,[$APP.U,$APP.X,$APP.tg,$APP.Di,$APP.Zh,$APP.Di],null)],null),"x-switch-change",new $APP.Q(null,2,[$APP.ni,!1,$APP.Y,new $APP.Q(null,2,[$APP.U,$APP.X,$APP.Ki,$APP.Di],null)],null)]);$APP.ja("baredom.exports.x_switch.init",kB);export const init=kB;
package/dist/x-tab.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var hj=function(a,b,c){return $APP.Cc(b,a)?a:c},mj=function(a){var b=$APP.M(a),c=$APP.I(b,$APP.$i),d=$APP.I(b,$APP.wi);a=$APP.I(b,$APP.zh);var e=$APP.I(b,$APP.Ag),g=$APP.I(b,$APP.Vg),h=$APP.I(b,$APP.W);b=$APP.I(b,ij);c=$APP.J(c);var k=(d=$APP.J(d))?"-1":c?"0":"-1";return new $APP.P(null,8,[$APP.$i,c,$APP.wi,d,$APP.zh,hj(a,jj,"horizontal"),$APP.Ag,hj(e,kj,"md"),$APP.Vg,hj(g,lj,"default"),$APP.W,h,ij,b,$APP.Tg,k],null)},nj=function(a){return new $APP.P(null,8,[$APP.T,a.getAttribute("value"),$APP.$i,
3
- a.hasAttribute("selected"),$APP.wi,a.hasAttribute("disabled"),$APP.zh,a.getAttribute("orientation"),$APP.Ag,a.getAttribute("size"),$APP.Vg,a.getAttribute("variant"),$APP.W,a.getAttribute("label"),ij,a.getAttribute("controls")],null)},oj=function(a){var b=mj(nj(a)),c=$APP.l(a,"__x_tab_base");if($APP.n(c)){a.setAttribute("role","tab");a.setAttribute("aria-selected",$APP.n($APP.$i.g(b))?"true":"false");$APP.n($APP.wi.g(b))?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled");a.setAttribute("tabindex",
4
- $APP.Tg.g(b));var d=ij.g(b),e=$APP.W.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.$i.g(b))?"true":"false");c.setAttribute("data-disabled",$APP.n($APP.wi.g(b))?"true":"false");c.setAttribute("data-size",$APP.Ag.g(b));c.setAttribute("data-variant",$APP.Vg.g(b));return c.setAttribute("data-orientation",
5
- $APP.zh.g(b))}return null},pj=function(a){var b=mj(nj(a)),c=$APP.M(b);b=$APP.I(c,$APP.$i);c=$APP.I(c,$APP.wi);$APP.p(c)&&$APP.p(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},qj=function(a){a.addEventListener("click",function(){return pj(a)});a.addEventListener("keydown",function(b){var c=b.key;$APP.E.h(c,"Enter")||$APP.E.h(c," ")?(b.preventDefault(),b=pj(a)):b=null;return b})},vj=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:#0f172a;--x-tab-hover-background:rgba(15,23,42,0.05);--x-tab-selected-color:#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:#94a3b8;--x-tab-hover-background:rgba(248,250,252,0.06);--x-tab-selected-color:#60a5fa;--x-tab-selected-background:rgba(59,130,246,0.18);--x-tab-selected-border-color:#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) ease,color var(--x-tab-transition-duration,120ms) ease,border-color var(--x-tab-transition-duration,120ms) 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;qj(a);a.__x_tab_initialized=!0}oj(a);return a},wj=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})},yj=function(){var a=class extends HTMLElement{};a.observedAttributes=xj;a.prototype.connectedCallback=function(){return vj(this)};a.prototype.attributeChangedCallback=
9
- function(){return $APP.l(this,"__x_tab_initialized")===!0?oj(this):vj(this)};wj(a);return a},zj=function(){return $APP.n(customElements.get("x-tab"))?null:customElements.define("x-tab",yj())},ij=new $APP.K(null,"controls","controls",1340701452);var xj="value selected disabled orientation size variant label controls".split(" "),jj=new $APP.R(null,new $APP.P(null,2,["vertical",null,"horizontal",null],null),null),kj=new $APP.R(null,new $APP.P(null,3,["md",null,"lg",null,"sm",null],null),null),lj=new $APP.R(null,new $APP.P(null,3,["default",null,"underline",null,"pill",null],null),null);$APP.wd(["tab-select",new $APP.P(null,1,[$APP.Y,new $APP.P(null,1,[$APP.T,$APP.X],null)],null)]);$APP.ka("baredom.exports.x_tab.init",zj);export const init=zj;
2
+ var bj=function(a,b,c){return $APP.yc(b,a)?a:c},gj=function(a){var b=$APP.N(a),c=$APP.I(b,$APP.Ui),d=$APP.I(b,$APP.pi);a=$APP.I(b,$APP.th);var e=$APP.I(b,$APP.sg),g=$APP.I(b,$APP.Ng),h=$APP.I(b,$APP.W);b=$APP.I(b,cj);c=$APP.K(c);var k=(d=$APP.K(d))?"-1":c?"0":"-1";return new $APP.Q(null,8,[$APP.Ui,c,$APP.pi,d,$APP.th,bj(a,dj,"horizontal"),$APP.sg,bj(e,ej,"md"),$APP.Ng,bj(g,fj,"default"),$APP.W,h,cj,b,$APP.Lg,k],null)},hj=function(a){return new $APP.Q(null,8,[$APP.U,a.getAttribute("value"),$APP.Ui,
3
+ a.hasAttribute("selected"),$APP.pi,a.hasAttribute("disabled"),$APP.th,a.getAttribute("orientation"),$APP.sg,a.getAttribute("size"),$APP.Ng,a.getAttribute("variant"),$APP.W,a.getAttribute("label"),cj,a.getAttribute("controls")],null)},ij=function(a){var b=gj(hj(a)),c=$APP.l(a,"__x_tab_base");if($APP.n(c)){a.setAttribute("role","tab");a.setAttribute("aria-selected",$APP.n($APP.Ui.g(b))?"true":"false");$APP.n($APP.pi.g(b))?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled");a.setAttribute("tabindex",
4
+ $APP.Lg.g(b));var d=cj.g(b),e=$APP.W.g(b);$APP.n($APP.n(d)?$APP.O(d,""):d)?a.setAttribute("aria-controls",d):a.removeAttribute("aria-controls");$APP.n($APP.n(e)?$APP.O(e,""):e)?a.setAttribute("aria-label",e):a.removeAttribute("aria-label");c.setAttribute("data-selected",$APP.n($APP.Ui.g(b))?"true":"false");c.setAttribute("data-disabled",$APP.n($APP.pi.g(b))?"true":"false");c.setAttribute("data-size",$APP.sg.g(b));c.setAttribute("data-variant",$APP.Ng.g(b));return c.setAttribute("data-orientation",
5
+ $APP.th.g(b))}return null},jj=function(a){var b=gj(hj(a)),c=$APP.N(b);b=$APP.I(c,$APP.Ui);c=$APP.I(c,$APP.pi);$APP.p(c)&&$APP.p(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},kj=function(a){a.addEventListener("click",function(){return jj(a)});a.addEventListener("keydown",function(b){var c=b.key;$APP.C.h(c,"Enter")||$APP.C.h(c," ")?(b.preventDefault(),b=jj(a)):b=null;return b})},lj=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:#0f172a;--x-tab-hover-background:rgba(15,23,42,0.05);--x-tab-selected-color:#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:#94a3b8;--x-tab-hover-background:rgba(248,250,252,0.06);--x-tab-selected-color:#60a5fa;--x-tab-selected-background:rgba(59,130,246,0.18);--x-tab-selected-border-color:#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;kj(a);a.__x_tab_initialized=!0}ij(a);return a},mj=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})},oj=function(){var a=class extends HTMLElement{};a.observedAttributes=nj;a.prototype.connectedCallback=function(){return lj(this)};a.prototype.attributeChangedCallback=
9
+ function(){return $APP.l(this,"__x_tab_initialized")===!0?ij(this):lj(this)};mj(a);return a},pj=function(){return $APP.n(customElements.get("x-tab"))?null:customElements.define("x-tab",oj())},cj=new $APP.M(null,"controls","controls",1340701452);var nj="value selected disabled orientation size variant label controls".split(" "),dj=new $APP.S(null,new $APP.Q(null,2,["vertical",null,"horizontal",null],null),null),ej=new $APP.S(null,new $APP.Q(null,3,["md",null,"lg",null,"sm",null],null),null),fj=new $APP.S(null,new $APP.Q(null,3,["default",null,"underline",null,"pill",null],null),null);$APP.sd(["tab-select",new $APP.Q(null,1,[$APP.Y,new $APP.Q(null,1,[$APP.U,$APP.X],null)],null)]);$APP.ja("baredom.exports.x_tab.init",pj);export const init=pj;
@@ -1,26 +1,26 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var Dx=function(a,b,c){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.Cc(b,a)?a:c},Ex=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),$APP.p(isNaN(a))&&a>0?Math.floor(a):1):1},Hx=function(a){var b=$APP.M(a);a=$APP.I(b,Fx);b=$APP.I(b,Gx);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},Ix=function(a){var b=$APP.M(a);a=$APP.I(b,$APP.Z);b=$APP.I(b,Fx);return(a=$APP.E.h(a,
3
- "header"))?b:a},Jx=function(a){switch(a){case "none":return"asc";case "asc":return"desc";case "desc":return"none";default:return"asc"}},Kx=function(a){switch(a){case "none":return"Sort ascending";case "asc":return"Sort descending";case "desc":return"Remove sort";default:return"Sort ascending"}},Px=function(a){var b=$APP.l(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"),
2
+ var Cx=function(a,b,c){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.yc(b,a)?a:c},Dx=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),$APP.p(isNaN(a))&&a>0?Math.floor(a):1):1},Gx=function(a){var b=$APP.N(a);a=$APP.I(b,Ex);b=$APP.I(b,Fx);if($APP.n($APP.n(a)?a:$APP.O(b,"none")))switch(b){case "asc":return"ascending";case "desc":return"descending";default:return"none"}else return null},Hx=function(a){var b=$APP.N(a);a=$APP.I(b,$APP.Z);b=$APP.I(b,Ex);return(a=$APP.C.h(a,
3
+ "header"))?b:a},Ix=function(a){switch(a){case "none":return"asc";case "asc":return"desc";case "desc":return"none";default:return"asc"}},Jx=function(a){switch(a){case "none":return"Sort ascending";case "asc":return"Sort descending";case "desc":return"Remove sort";default:return"Sort ascending"}},Ox=function(a){var b=$APP.l(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
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:rgba(0,0,0,0.1);--x-table-cell-border-width:1px;--x-table-cell-color:inherit;--x-table-cell-header-color: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:rgba(0,0,0,0.4);--x-table-cell-sort-hover-color:rgba(0,0,0,0.7);--x-table-cell-focus-ring:rgba(59,130,246,0.5);--x-table-cell-transition-duration:150ms;--x-table-cell-sticky-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:rgba(255,255,255,0.1);--x-table-cell-sort-color:rgba(255,255,255,0.4);--x-table-cell-sort-hover-color:rgba(255,255,255,0.7);--x-table-cell-sticky-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
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.rh,b,Lx,d,Mx,e,Nx,h,Ox,m],null);return $APP.l(a,"__xTableCellRefs")},gy=function(a){a=$APP.cf([$APP.Ch,Qx,Rx,Sx,Fx,Tx,$APP.ih,Ux,Vx,$APP.U,Wx],[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.I(b,$APP.U);var c=$APP.I(b,Wx),d=$APP.I(b,$APP.Ch),e=$APP.I(b,Qx),g=$APP.I(b,Rx),h=$APP.I(b,Sx),k=$APP.I(b,Fx),m=$APP.I(b,Tx),q=$APP.I(b,$APP.ih),r=$APP.I(b,Ux);b=$APP.I(b,Vx);return $APP.cf([$APP.ci,Gx,Xx,$APP.Z,Yx,Fx,$APP.Qh,Zx,Tx,$APP.U,$x],[Dx(d,ay,"start"),Dx(h,by,"none"),Dx(g,cy,"middle"),Dx(q,dy,"data"),Dx(b,ey,"col"),$APP.J(k),Dx(r,fy,"none"),Ex(c),$APP.J(m),$APP.J(a),Ex(e)])},hy=function(a){var b=gy(a);if($APP.N($APP.l(a,"__xTableCellModel"),b)){b=$APP.M(b);var c=$APP.I(b,
8
- Zx),d=$APP.I(b,$x),e=$APP.I(b,$APP.U),g=$APP.I(b,Gx),h=Px(a);h=$APP.M(h);var k=$APP.I(h,Nx);h=$APP.I(h,Ox);var m=Ix(b),q=$APP.M(b),r=$APP.I(q,$APP.Z),v=$APP.I(q,$APP.ci),w=$APP.I(q,Xx),z=$APP.I(q,$APP.Qh),A=$APP.I(q,Tx),C=$APP.I(q,$APP.U);$APP.I(q,Fx);$APP.I(q,Gx);var F=a.setAttribute,D=$APP.M(q);var Q=$APP.I(D,$APP.Z);D=$APP.I(D,Yx);Q=$APP.E.h(Q,"header")?$APP.E.h(D,"row")||$APP.E.h(D,"rowgroup")?"rowheader":"columnheader":"cell";F.call(a,"role",Q);q=Hx(q);$APP.n(q)?a.setAttribute("aria-sort",q):
9
- a.removeAttribute("aria-sort");$APP.n(C)?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled");a.setAttribute("data-type",r);a.setAttribute("data-align",v);a.setAttribute("data-valign",w);$APP.E.h(z,"none")?a.removeAttribute("data-sticky"):a.setAttribute("data-sticky",z);$APP.n(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):"";k.hidden=$APP.p(m);c=parseInt;r=$APP.M(b);
10
- m=$APP.I(r,$APP.Z);d=$APP.I(r,Fx);r=$APP.I(r,$APP.U);m=$APP.E.h(m,"header");k.tabIndex=c($APP.n(m?$APP.n(d)?$APP.p(r):d:m)?"0":"-1",10);k.setAttribute("aria-label",Kx(g));k.disabled=$APP.J(e);a:switch(e=$APP.M(b),$APP.I(e,Gx)){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}},iy=function(a){var b=a.getAttribute("sort-direction");b=Dx(b,by,"none");b=new CustomEvent("x-table-cell-sort",{detail:{direction:Jx(b),previousDirection:b},bubbles:!0,composed:!0,cancelable:!0});a.dispatchEvent(b)},jy=function(a){var b=function(){var c=$APP.l(a,"__xTableCellModel");
12
- return $APP.n(c)?c:gy(a)}();$APP.n(function(){var c=Ix(b);return $APP.n(c)?$APP.p($APP.U.g(b)):c}())&&iy(a);return null},ky=function(a){function b(){return jy(a)}var c=Px(a);c=$APP.M(c);$APP.I(c,Nx).addEventListener("click",b);$APP.ma(a,"__xTableCellHandlers",{"sort-click":b})},ly=function(a){var b=$APP.l(a,"__xTableCellHandlers"),c=$APP.l(a,"__xTableCellRefs");$APP.n($APP.n(b)?c:b)&&(c=$APP.M(c),c=$APP.I(c,Nx),b=$APP.l(b,"sort-click"),$APP.n(b)&&c.removeEventListener("click",b));a.__xTableCellHandlers=
13
- null},my=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.S.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.S.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.S.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.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.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.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.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 Ex(this.getAttribute("col-span"))},set:function(b){b=parseInt(b,10);return $APP.p(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 Ex(this.getAttribute("row-span"))},set:function(b){b=parseInt(b,10);return $APP.p(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.n(b)?b:"none"},
18
- set:function(b){return $APP.n(b)?this.setAttribute("sort-direction",""+$APP.S.g(b)):this.removeAttribute("sort-direction")},enumerable:!0,configurable:!0})},qy=function(){var a=class extends HTMLElement{};a.observedAttributes=ny;a.prototype.connectedCallback=function(){Px(this);ly(this);ky(this);hy(this);var b=$APP.l(this,"__xTableCellModel");var c=$APP.n(b)?b:gy(this);b=this.dispatchEvent;var d=CustomEvent,e=$APP.M(c);c=$APP.I(e,$APP.Z);var g=$APP.I(e,Yx),h=$APP.I(e,Zx),k=$APP.I(e,$x);e=$APP.I(e,
19
- $APP.ci);b.call(this,new d("x-table-cell-connected",{detail:$APP.xg(new $APP.P(null,5,[$APP.Z,c,Yx,g,oy,h,py,k,$APP.ci,e],null)),bubbles:!0,composed:!0,cancelable:!1}));return null};a.prototype.disconnectedCallback=function(){ly(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)&&hy(this);return null};my(a.prototype);return a},ry=function(){$APP.n(customElements.get("x-table-cell"))||
20
- customElements.define("x-table-cell",qy());return null},$x=new $APP.K(null,"row-span","row-span",-365554241),Yx=new $APP.K(null,"scope","scope",-439358418),Nx=new $APP.K(null,"sort-btn","sort-btn",1913954560),Mx=new $APP.K(null,"content","content",15833224),Tx=new $APP.K(null,"truncate?","truncate?",135673334),oy=new $APP.K(null,"colSpan","colSpan",872137394),Lx=new $APP.K(null,"cell","cell",764245084),Xx=new $APP.K(null,"valign","valign",1485197511),Fx=new $APP.K(null,"sortable?","sortable?",291547474),
21
- Ox=new $APP.K(null,"sort-icon-default","sort-icon-default",-596209230),Wx=new $APP.K(null,"col-span-raw","col-span-raw",1425293661),Rx=new $APP.K(null,"valign-raw","valign-raw",-1083375124),Sx=new $APP.K(null,"sort-direction-raw","sort-direction-raw",-1822100883),Ux=new $APP.K(null,"sticky-raw","sticky-raw",1857578519),Zx=new $APP.K(null,"col-span","col-span",-232603210),py=new $APP.K(null,"rowSpan","rowSpan",826884002),Qx=new $APP.K(null,"row-span-raw","row-span-raw",-1130003707),Vx=new $APP.K(null,
22
- "scope-raw","scope-raw",-773628648),Gx=new $APP.K(null,"sort-direction","sort-direction",-1635889628);var ny="type scope align valign col-span row-span truncate sticky sortable sort-direction disabled".split(" ");
23
- $APP.cf([$APP.ci,py,new $APP.K(null,"truncate","truncate",-1327322939),$APP.wi,Xx,$APP.Z,Yx,oy,$APP.Qh,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.Fh],null),new $APP.P(null,1,[$APP.Z,$APP.Ji],null),new $APP.P(null,1,[$APP.Z,$APP.Ji],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,
24
- 1,[$APP.Z,$APP.Fh],null),new $APP.P(null,1,[$APP.Z,$APP.X],null),new $APP.P(null,1,[$APP.Z,$APP.Ji],null),new $APP.P(null,1,[$APP.Z,$APP.X],null)]);$APP.wd(["x-table-cell-sort",new $APP.P(null,2,[$APP.Y,new $APP.P(null,2,[$APP.ai,$APP.X,$APP.Hi,$APP.X],null),$APP.ui,!0],null),"x-table-cell-connected",new $APP.P(null,1,[$APP.Y,new $APP.P(null,5,[$APP.Z,$APP.X,Yx,$APP.X,oy,$APP.Fh,py,$APP.Fh,$APP.ci,$APP.X],null)],null),"x-table-cell-disconnected",new $APP.P(null,1,[$APP.Y,$APP.xd],null)]);
25
- var dy=new $APP.R(null,new $APP.P(null,2,["data",null,"header",null],null),null),ey=new $APP.R(null,new $APP.P(null,4,["rowgroup",null,"col",null,"row",null,"colgroup",null],null),null),ay=new $APP.R(null,new $APP.P(null,3,["center",null,"start",null,"end",null],null),null),cy=new $APP.R(null,new $APP.P(null,3,["top",null,"middle",null,"bottom",null],null),null),fy=new $APP.R(null,new $APP.P(null,3,["none",null,"start",null,"end",null],null),null),by=new $APP.R(null,new $APP.P(null,3,["none",null,
26
- "desc",null,"asc",null],null),null);$APP.ka("baredom.exports.x_table_cell.init",ry);export const init=ry;
6
+ b.appendChild(c);b.appendChild(d);a.__xTableCellRefs=new $APP.Q(null,5,[$APP.kh,b,Kx,d,Lx,e,Mx,h,Nx,m],null);return $APP.l(a,"__xTableCellRefs")},fy=function(a){a=$APP.Xe([$APP.wh,Px,Qx,Rx,Ex,Sx,$APP.bh,Tx,Ux,$APP.V,Vx],[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.I(b,$APP.V);var c=$APP.I(b,Vx),d=$APP.I(b,$APP.wh),e=$APP.I(b,Px),g=$APP.I(b,Qx),h=$APP.I(b,Rx),k=$APP.I(b,Ex),m=$APP.I(b,Sx),q=$APP.I(b,$APP.bh),r=$APP.I(b,Tx);b=$APP.I(b,Ux);return $APP.Xe([$APP.Xh,Fx,Wx,$APP.Z,Xx,Ex,$APP.Kh,Yx,Sx,$APP.V,Zx],[Cx(d,$x,"start"),Cx(h,ay,"none"),Cx(g,by,"middle"),Cx(q,cy,"data"),Cx(b,dy,"col"),$APP.K(k),Cx(r,ey,"none"),Dx(c),$APP.K(m),$APP.K(a),Dx(e)])},gy=function(a){var b=fy(a);if($APP.O($APP.l(a,"__xTableCellModel"),b)){b=$APP.N(b);var c=$APP.I(b,
8
+ Yx),d=$APP.I(b,Zx),e=$APP.I(b,$APP.V),g=$APP.I(b,Fx),h=Ox(a);h=$APP.N(h);var k=$APP.I(h,Mx);h=$APP.I(h,Nx);var m=Hx(b),q=$APP.N(b),r=$APP.I(q,$APP.Z),v=$APP.I(q,$APP.Xh),w=$APP.I(q,Wx),z=$APP.I(q,$APP.Kh),A=$APP.I(q,Sx),D=$APP.I(q,$APP.V);$APP.I(q,Ex);$APP.I(q,Fx);var G=a.setAttribute,J=$APP.N(q);var E=$APP.I(J,$APP.Z);J=$APP.I(J,Xx);E=$APP.C.h(E,"header")?$APP.C.h(J,"row")||$APP.C.h(J,"rowgroup")?"rowheader":"columnheader":"cell";G.call(a,"role",E);q=Gx(q);$APP.n(q)?a.setAttribute("aria-sort",q):
9
+ a.removeAttribute("aria-sort");$APP.n(D)?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled");a.setAttribute("data-type",r);a.setAttribute("data-align",v);a.setAttribute("data-valign",w);$APP.C.h(z,"none")?a.removeAttribute("data-sticky"):a.setAttribute("data-sticky",z);$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):"";k.hidden=$APP.p(m);c=parseInt;r=$APP.N(b);
10
+ m=$APP.I(r,$APP.Z);d=$APP.I(r,Ex);r=$APP.I(r,$APP.V);m=$APP.C.h(m,"header");k.tabIndex=c($APP.n(m?$APP.n(d)?$APP.p(r):d:m)?"0":"-1",10);k.setAttribute("aria-label",Jx(g));k.disabled=$APP.K(e);a:switch(e=$APP.N(b),$APP.I(e,Fx)){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}},hy=function(a){var b=a.getAttribute("sort-direction");b=Cx(b,ay,"none");b=new CustomEvent("x-table-cell-sort",{detail:{direction:Ix(b),previousDirection:b},bubbles:!0,composed:!0,cancelable:!0});a.dispatchEvent(b)},iy=function(a){var b=function(){var c=$APP.l(a,"__xTableCellModel");
12
+ return $APP.n(c)?c:fy(a)}();$APP.n(function(){var c=Hx(b);return $APP.n(c)?$APP.p($APP.V.g(b)):c}())&&hy(a);return null},jy=function(a){function b(){return iy(a)}var c=Ox(a);c=$APP.N(c);$APP.I(c,Mx).addEventListener("click",b);$APP.la(a,"__xTableCellHandlers",{"sort-click":b})},ky=function(a){var b=$APP.l(a,"__xTableCellHandlers"),c=$APP.l(a,"__xTableCellRefs");$APP.n($APP.n(b)?c:b)&&(c=$APP.N(c),c=$APP.I(c,Mx),b=$APP.l(b,"sort-click"),$APP.n(b)&&c.removeEventListener("click",b));a.__xTableCellHandlers=
13
+ null},ly=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 Dx(this.getAttribute("col-span"))},set:function(b){b=parseInt(b,10);return $APP.p(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 Dx(this.getAttribute("row-span"))},set:function(b){b=parseInt(b,10);return $APP.p(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})},py=function(){var a=class extends HTMLElement{};a.observedAttributes=my;a.prototype.connectedCallback=function(){Ox(this);ky(this);jy(this);gy(this);var b=$APP.l(this,"__xTableCellModel");var c=$APP.n(b)?b:fy(this);b=this.dispatchEvent;var d=CustomEvent,e=$APP.N(c);c=$APP.I(e,$APP.Z);var g=$APP.I(e,Xx),h=$APP.I(e,Yx),k=$APP.I(e,Zx);e=$APP.I(e,
19
+ $APP.Xh);b.call(this,new d("x-table-cell-connected",{detail:$APP.pg(new $APP.Q(null,5,[$APP.Z,c,Xx,g,ny,h,oy,k,$APP.Xh,e],null)),bubbles:!0,composed:!0,cancelable:!1}));return null};a.prototype.disconnectedCallback=function(){ky(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)&&gy(this);return null};ly(a.prototype);return a},qy=function(){$APP.n(customElements.get("x-table-cell"))||
20
+ customElements.define("x-table-cell",py());return null},Zx=new $APP.M(null,"row-span","row-span",-365554241),Xx=new $APP.M(null,"scope","scope",-439358418),Mx=new $APP.M(null,"sort-btn","sort-btn",1913954560),Lx=new $APP.M(null,"content","content",15833224),Sx=new $APP.M(null,"truncate?","truncate?",135673334),ny=new $APP.M(null,"colSpan","colSpan",872137394),Kx=new $APP.M(null,"cell","cell",764245084),Wx=new $APP.M(null,"valign","valign",1485197511),Ex=new $APP.M(null,"sortable?","sortable?",291547474),
21
+ Nx=new $APP.M(null,"sort-icon-default","sort-icon-default",-596209230),Vx=new $APP.M(null,"col-span-raw","col-span-raw",1425293661),Qx=new $APP.M(null,"valign-raw","valign-raw",-1083375124),Rx=new $APP.M(null,"sort-direction-raw","sort-direction-raw",-1822100883),Tx=new $APP.M(null,"sticky-raw","sticky-raw",1857578519),Yx=new $APP.M(null,"col-span","col-span",-232603210),oy=new $APP.M(null,"rowSpan","rowSpan",826884002),Px=new $APP.M(null,"row-span-raw","row-span-raw",-1130003707),Ux=new $APP.M(null,
22
+ "scope-raw","scope-raw",-773628648),Fx=new $APP.M(null,"sort-direction","sort-direction",-1635889628);var my="type scope align valign col-span row-span truncate sticky sortable sort-direction disabled".split(" ");
23
+ $APP.Xe([$APP.Xh,oy,new $APP.M(null,"truncate","truncate",-1327322939),$APP.pi,Wx,$APP.Z,Xx,ny,$APP.Kh,new $APP.M(null,"sortable","sortable",2109633621),new $APP.M(null,"sortDirection","sortDirection",-45816999)],[new $APP.Q(null,1,[$APP.Z,$APP.X],null),new $APP.Q(null,1,[$APP.Z,$APP.zh],null),new $APP.Q(null,1,[$APP.Z,$APP.Di],null),new $APP.Q(null,1,[$APP.Z,$APP.Di],null),new $APP.Q(null,1,[$APP.Z,$APP.X],null),new $APP.Q(null,1,[$APP.Z,$APP.X],null),new $APP.Q(null,1,[$APP.Z,$APP.X],null),new $APP.Q(null,
24
+ 1,[$APP.Z,$APP.zh],null),new $APP.Q(null,1,[$APP.Z,$APP.X],null),new $APP.Q(null,1,[$APP.Z,$APP.Di],null),new $APP.Q(null,1,[$APP.Z,$APP.X],null)]);$APP.sd(["x-table-cell-sort",new $APP.Q(null,2,[$APP.Y,new $APP.Q(null,2,[$APP.Vh,$APP.X,$APP.Bi,$APP.X],null),$APP.ni,!0],null),"x-table-cell-connected",new $APP.Q(null,1,[$APP.Y,new $APP.Q(null,5,[$APP.Z,$APP.X,Xx,$APP.X,ny,$APP.zh,oy,$APP.zh,$APP.Xh,$APP.X],null)],null),"x-table-cell-disconnected",new $APP.Q(null,1,[$APP.Y,$APP.td],null)]);
25
+ var cy=new $APP.S(null,new $APP.Q(null,2,["data",null,"header",null],null),null),dy=new $APP.S(null,new $APP.Q(null,4,["rowgroup",null,"col",null,"row",null,"colgroup",null],null),null),$x=new $APP.S(null,new $APP.Q(null,3,["center",null,"start",null,"end",null],null),null),by=new $APP.S(null,new $APP.Q(null,3,["top",null,"middle",null,"bottom",null],null),null),ey=new $APP.S(null,new $APP.Q(null,3,["none",null,"start",null,"end",null],null),null),ay=new $APP.S(null,new $APP.Q(null,3,["none",null,
26
+ "desc",null,"asc",null],null),null);$APP.ja("baredom.exports.x_table_cell.init",qy);export const init=qy;
@@ -1,11 +1,11 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var Cp=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),$APP.p(isNaN(a))&&a>0?Math.floor(a):null):null},Ep=function(a){var b=$APP.M(a);a=$APP.I(b,Dp);b=$APP.I(b,$APP.U);return $APP.n(a)?$APP.p(b):a},Fp=function(a){if(!$APP.n($APP.l(a,"__xTableRowRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("slot");c.textContent=":host{display:grid;grid-template-columns:subgrid;grid-column:1 / -1;box-sizing:border-box;color-scheme:light dark;--x-table-row-bg:transparent;--x-table-row-hover-bg:rgba(0,0,0,0.03);--x-table-row-selected-bg:rgba(59,130,246,0.08);--x-table-row-selected-hover-bg:rgba(59,130,246,0.12);--x-table-row-focus-ring:rgba(59,130,246,0.5);--x-table-row-transition-duration:150ms;--x-table-row-disabled-opacity:0.45;--x-table-row-cursor:pointer;background:var(--x-table-row-bg);transition:background var(--x-table-row-transition-duration) ease;}@media (prefers-color-scheme:dark){:host{--x-table-row-hover-bg:rgba(255,255,255,0.04);--x-table-row-selected-bg:rgba(99,160,255,0.12);--x-table-row-selected-hover-bg:rgba(99,160,255,0.16);}}:host([data-selected]){background:var(--x-table-row-selected-bg);}:host([data-interactive]){cursor:var(--x-table-row-cursor);}:host([data-interactive]:hover){background:var(--x-table-row-hover-bg);}:host([data-interactive][data-selected]:hover){background:var(--x-table-row-selected-hover-bg);}:host([data-interactive]:focus){outline:none;}:host([data-interactive]:focus-visible){outline:2px solid var(--x-table-row-focus-ring);outline-offset:-2px;}:host([disabled]){opacity:var(--x-table-row-disabled-opacity);pointer-events:none;}slot{display:contents;}@media (prefers-reduced-motion:reduce){:host{transition:none !important;}}";
3
- b.appendChild(c);b.appendChild(d);a.__xTableRowRefs=new $APP.P(null,2,[$APP.rh,b,$APP.Ph,d],null)}},Ip=function(a){a=new $APP.P(null,4,[$APP.Ih,a.hasAttribute("selected"),$APP.U,a.hasAttribute("disabled"),Dp,a.hasAttribute("interactive"),Gp,a.getAttribute("row-index")],null);var b=$APP.M(a);a=$APP.I(b,$APP.Ih);var c=$APP.I(b,$APP.U),d=$APP.I(b,Dp);b=$APP.I(b,Gp);return new $APP.P(null,4,[$APP.Ih,$APP.J(a),$APP.U,$APP.J(c),Dp,$APP.J(d),Hp,Cp(b)],null)},Jp=function(a){var b=Ip(a);if($APP.N($APP.l(a,
4
- "__xTableRowModel"),b)){Fp(a);var c=$APP.M(b),d=$APP.I(c,$APP.Ih),e=$APP.I(c,$APP.U),g=$APP.I(c,Dp),h=$APP.I(c,Hp);a.setAttribute("role","row");var k=$APP.M(c);var m=$APP.I(k,$APP.Ih);k=$APP.I(k,Dp);m=$APP.n(m)?"true":$APP.n(k)?"false":null;$APP.n(m)?a.setAttribute("aria-selected",m):a.removeAttribute("aria-selected");$APP.n(e)?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled");h!=null?a.setAttribute("aria-rowindex",""+$APP.S.g(h)):a.removeAttribute("aria-rowindex");$APP.n(d)?
5
- a.setAttribute("data-selected",""):a.removeAttribute("data-selected");$APP.n(g)?a.setAttribute("data-interactive",""):a.removeAttribute("data-interactive");a.tabIndex=$APP.n(Ep(c))?0:-1;a.__xTableRowModel=b}},Kp=function(a){var b=$APP.l(a,"__xTableRowModel");var c=$APP.n(b)?b:Ip(a);b=a.dispatchEvent;var d=CustomEvent,e=$APP.M(c);c=$APP.I(e,$APP.Ih);var g=$APP.I(e,$APP.U);e=$APP.I(e,Hp);b.call(a,new d("x-table-row-click",{detail:$APP.xg(new $APP.P(null,3,[$APP.ri,$APP.n(e)?e:0,$APP.$i,c,$APP.wi,g],
6
- null)),bubbles:!0,composed:!0,cancelable:!0}))},Lp=function(a){function b(d){var e=d.key;if($APP.E.h(e,"Enter")||$APP.E.h(e," "))e=$APP.l(a,"__xTableRowModel"),e=$APP.n(e)?e:Ip(a),$APP.n(Ep(e))&&(d.preventDefault(),Kp(a));return null}function c(){var d=$APP.l(a,"__xTableRowModel");d=$APP.n(d)?d:Ip(a);$APP.n(Ep(d))&&Kp(a);return null}a.addEventListener("click",c);a.addEventListener("keydown",b);$APP.ma(a,"__xTableRowHandlers",{click:c,keydown:b})},Mp=function(a){var b=$APP.l(a,"__xTableRowHandlers");
7
- if($APP.n(b)){var c=$APP.l(b,"click");b=$APP.l(b,"keydown");$APP.n(c)&&a.removeEventListener("click",c);$APP.n(b)&&a.removeEventListener("keydown",b)}a.__xTableRowHandlers=null},Np=function(a){Object.defineProperty(a,"selected",{get:function(){return this.hasAttribute("selected")},set:function(b){return $APP.n(b)?this.setAttribute("selected",""):this.removeAttribute("selected")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},
8
- set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"interactive",{get:function(){return this.hasAttribute("interactive")},set:function(b){return $APP.n(b)?this.setAttribute("interactive",""):this.removeAttribute("interactive")},enumerable:!0,configurable:!0});Object.defineProperty(a,"rowIndex",{get:function(){return Cp(this.getAttribute("row-index"))},set:function(b){b=parseInt(b,10);return $APP.p(isNaN(b))&&
9
- b>0?this.setAttribute("row-index",""+$APP.S.g(b)):this.removeAttribute("row-index")},enumerable:!0,configurable:!0})},Pp=function(){var a=class extends HTMLElement{};a.observedAttributes=Op;a.prototype.connectedCallback=function(){Fp(this);Mp(this);Lp(this);Jp(this);var b=$APP.l(this,"__xTableRowModel");var c=$APP.n(b)?b:Ip(this);b=this.dispatchEvent;var d=CustomEvent,e=$APP.M(c);c=$APP.I(e,$APP.Ih);var g=$APP.I(e,$APP.U),h=$APP.I(e,Dp);e=$APP.I(e,Hp);b.call(this,new d("x-table-row-connected",{detail:$APP.xg(new $APP.P(null,
10
- 4,[$APP.ri,$APP.n(e)?e:0,$APP.$i,c,$APP.wi,g,$APP.Rh,h],null)),bubbles:!0,composed:!0,cancelable:!1}));return null};a.prototype.disconnectedCallback=function(){Mp(this);document.dispatchEvent(new CustomEvent("x-table-row-disconnected",{detail:{},bubbles:!1,composed:!1,cancelable:!1}));return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&Jp(this);return null};Np(a.prototype);return a},Qp=function(){$APP.n(customElements.get("x-table-row"))||customElements.define("x-table-row",
11
- Pp());return null},Dp=new $APP.K(null,"interactive?","interactive?",367617676),Hp=new $APP.K(null,"row-index","row-index",-828710296),Gp=new $APP.K(null,"row-index-raw","row-index-raw",1490649093);var Op=["selected","disabled","interactive","row-index"];$APP.wd(["x-table-row-click",new $APP.P(null,2,[$APP.Y,new $APP.P(null,3,[$APP.ri,$APP.Fh,$APP.$i,$APP.Ji,$APP.wi,$APP.Ji],null),$APP.ui,!0],null),"x-table-row-connected",new $APP.P(null,2,[$APP.Y,new $APP.P(null,4,[$APP.ri,$APP.Fh,$APP.$i,$APP.Ji,$APP.wi,$APP.Ji,$APP.Rh,$APP.Ji],null),$APP.ui,!1],null),"x-table-row-disconnected",new $APP.P(null,2,[$APP.Y,$APP.xd,$APP.ui,!1],null)]);$APP.ka("baredom.exports.x_table_row.init",Qp);export const init=Qp;
2
+ var Bp=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),$APP.p(isNaN(a))&&a>0?Math.floor(a):null):null},Dp=function(a){var b=$APP.N(a);a=$APP.I(b,Cp);b=$APP.I(b,$APP.V);return $APP.n(a)?$APP.p(b):a},Ep=function(a){if(!$APP.n($APP.l(a,"__xTableRowRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("slot");c.textContent=":host{display:grid;grid-template-columns:subgrid;grid-column:1 / -1;box-sizing:border-box;color-scheme:light dark;--x-table-row-bg:transparent;--x-table-row-hover-bg:rgba(0,0,0,0.03);--x-table-row-selected-bg:rgba(59,130,246,0.08);--x-table-row-selected-hover-bg:rgba(59,130,246,0.12);--x-table-row-focus-ring:rgba(59,130,246,0.5);--x-table-row-transition-duration:150ms;--x-table-row-disabled-opacity:0.45;--x-table-row-cursor:pointer;background:var(--x-table-row-bg);transition:background var(--x-table-row-transition-duration) ease;}@media (prefers-color-scheme:dark){:host{--x-table-row-hover-bg:rgba(255,255,255,0.04);--x-table-row-selected-bg:rgba(99,160,255,0.12);--x-table-row-selected-hover-bg:rgba(99,160,255,0.16);}}:host([data-selected]){background:var(--x-table-row-selected-bg);}:host([data-interactive]){cursor:var(--x-table-row-cursor);}:host([data-interactive]:hover){background:var(--x-table-row-hover-bg);}:host([data-interactive][data-selected]:hover){background:var(--x-table-row-selected-hover-bg);}:host([data-interactive]:focus){outline:none;}:host([data-interactive]:focus-visible){outline:2px solid var(--x-table-row-focus-ring);outline-offset:-2px;}:host([disabled]){opacity:var(--x-table-row-disabled-opacity);pointer-events:none;}slot{display:contents;}@media (prefers-reduced-motion:reduce){:host{transition:none !important;}}";
3
+ b.appendChild(c);b.appendChild(d);a.__xTableRowRefs=new $APP.Q(null,2,[$APP.kh,b,$APP.Jh,d],null)}},Hp=function(a){a=new $APP.Q(null,4,[$APP.Ch,a.hasAttribute("selected"),$APP.V,a.hasAttribute("disabled"),Cp,a.hasAttribute("interactive"),Fp,a.getAttribute("row-index")],null);var b=$APP.N(a);a=$APP.I(b,$APP.Ch);var c=$APP.I(b,$APP.V),d=$APP.I(b,Cp);b=$APP.I(b,Fp);return new $APP.Q(null,4,[$APP.Ch,$APP.K(a),$APP.V,$APP.K(c),Cp,$APP.K(d),Gp,Bp(b)],null)},Ip=function(a){var b=Hp(a);if($APP.O($APP.l(a,
4
+ "__xTableRowModel"),b)){Ep(a);var c=$APP.N(b),d=$APP.I(c,$APP.Ch),e=$APP.I(c,$APP.V),g=$APP.I(c,Cp),h=$APP.I(c,Gp);a.setAttribute("role","row");var k=$APP.N(c);var m=$APP.I(k,$APP.Ch);k=$APP.I(k,Cp);m=$APP.n(m)?"true":$APP.n(k)?"false":null;$APP.n(m)?a.setAttribute("aria-selected",m):a.removeAttribute("aria-selected");$APP.n(e)?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled");h!=null?a.setAttribute("aria-rowindex",""+$APP.T.g(h)):a.removeAttribute("aria-rowindex");$APP.n(d)?
5
+ a.setAttribute("data-selected",""):a.removeAttribute("data-selected");$APP.n(g)?a.setAttribute("data-interactive",""):a.removeAttribute("data-interactive");a.tabIndex=$APP.n(Dp(c))?0:-1;a.__xTableRowModel=b}},Jp=function(a){var b=$APP.l(a,"__xTableRowModel");var c=$APP.n(b)?b:Hp(a);b=a.dispatchEvent;var d=CustomEvent,e=$APP.N(c);c=$APP.I(e,$APP.Ch);var g=$APP.I(e,$APP.V);e=$APP.I(e,Gp);b.call(a,new d("x-table-row-click",{detail:$APP.pg(new $APP.Q(null,3,[$APP.ki,$APP.n(e)?e:0,$APP.Ui,c,$APP.pi,g],
6
+ null)),bubbles:!0,composed:!0,cancelable:!0}))},Kp=function(a){function b(d){var e=d.key;if($APP.C.h(e,"Enter")||$APP.C.h(e," "))e=$APP.l(a,"__xTableRowModel"),e=$APP.n(e)?e:Hp(a),$APP.n(Dp(e))&&(d.preventDefault(),Jp(a));return null}function c(){var d=$APP.l(a,"__xTableRowModel");d=$APP.n(d)?d:Hp(a);$APP.n(Dp(d))&&Jp(a);return null}a.addEventListener("click",c);a.addEventListener("keydown",b);$APP.la(a,"__xTableRowHandlers",{click:c,keydown:b})},Lp=function(a){var b=$APP.l(a,"__xTableRowHandlers");
7
+ if($APP.n(b)){var c=$APP.l(b,"click");b=$APP.l(b,"keydown");$APP.n(c)&&a.removeEventListener("click",c);$APP.n(b)&&a.removeEventListener("keydown",b)}a.__xTableRowHandlers=null},Mp=function(a){Object.defineProperty(a,"selected",{get:function(){return this.hasAttribute("selected")},set:function(b){return $APP.n(b)?this.setAttribute("selected",""):this.removeAttribute("selected")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},
8
+ set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"interactive",{get:function(){return this.hasAttribute("interactive")},set:function(b){return $APP.n(b)?this.setAttribute("interactive",""):this.removeAttribute("interactive")},enumerable:!0,configurable:!0});Object.defineProperty(a,"rowIndex",{get:function(){return Bp(this.getAttribute("row-index"))},set:function(b){b=parseInt(b,10);return $APP.p(isNaN(b))&&
9
+ b>0?this.setAttribute("row-index",""+$APP.T.g(b)):this.removeAttribute("row-index")},enumerable:!0,configurable:!0})},Op=function(){var a=class extends HTMLElement{};a.observedAttributes=Np;a.prototype.connectedCallback=function(){Ep(this);Lp(this);Kp(this);Ip(this);var b=$APP.l(this,"__xTableRowModel");var c=$APP.n(b)?b:Hp(this);b=this.dispatchEvent;var d=CustomEvent,e=$APP.N(c);c=$APP.I(e,$APP.Ch);var g=$APP.I(e,$APP.V),h=$APP.I(e,Cp);e=$APP.I(e,Gp);b.call(this,new d("x-table-row-connected",{detail:$APP.pg(new $APP.Q(null,
10
+ 4,[$APP.ki,$APP.n(e)?e:0,$APP.Ui,c,$APP.pi,g,$APP.Lh,h],null)),bubbles:!0,composed:!0,cancelable:!1}));return null};a.prototype.disconnectedCallback=function(){Lp(this);document.dispatchEvent(new CustomEvent("x-table-row-disconnected",{detail:{},bubbles:!1,composed:!1,cancelable:!1}));return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&Ip(this);return null};Mp(a.prototype);return a},Pp=function(){$APP.n(customElements.get("x-table-row"))||customElements.define("x-table-row",
11
+ Op());return null},Cp=new $APP.M(null,"interactive?","interactive?",367617676),Gp=new $APP.M(null,"row-index","row-index",-828710296),Fp=new $APP.M(null,"row-index-raw","row-index-raw",1490649093);var Np=["selected","disabled","interactive","row-index"];$APP.sd(["x-table-row-click",new $APP.Q(null,2,[$APP.Y,new $APP.Q(null,3,[$APP.ki,$APP.zh,$APP.Ui,$APP.Di,$APP.pi,$APP.Di],null),$APP.ni,!0],null),"x-table-row-connected",new $APP.Q(null,2,[$APP.Y,new $APP.Q(null,4,[$APP.ki,$APP.zh,$APP.Ui,$APP.Di,$APP.pi,$APP.Di,$APP.Lh,$APP.Di],null),$APP.ni,!1],null),"x-table-row-disconnected",new $APP.Q(null,2,[$APP.Y,$APP.td,$APP.ni,!1],null)]);$APP.ja("baredom.exports.x_table_row.init",Pp);export const init=Pp;
package/dist/x-table.js CHANGED
@@ -1,16 +1,17 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var xs=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),$APP.p(isNaN(a))&&a>0?Math.floor(a):null):null},zs=function(a){var b=$APP.l(a,"__xTableRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");c.textContent=":host{display:grid;box-sizing:border-box;color-scheme:light dark;--x-table-border-color:rgba(0,0,0,0.1);--x-table-border-radius:8px;--x-table-stripe-bg:rgba(0,0,0,0.025);--x-table-caption-color:inherit;--x-table-caption-font-size:0.875rem;--x-table-caption-font-weight:600;--x-table-caption-padding:0 0 0.5rem;--x-table-compact-padding:0.25rem 0.5rem;}@media (prefers-color-scheme:dark){:host{--x-table-border-color:rgba(255,255,255,0.1);--x-table-stripe-bg:rgba(255,255,255,0.03);}}:host([data-bordered]){border:1px solid var(--x-table-border-color);border-radius:var(--x-table-border-radius);overflow:hidden;}:host([data-full-width]){width:100%;}:host([data-compact]){--x-table-cell-padding:var(--x-table-compact-padding);}:host([data-striped]) ::slotted(x-table-row[data-stripe\x3d'even']){--x-table-row-bg:var(--x-table-stripe-bg);}[part\x3dcaption]{grid-column:1 / -1;color:var(--x-table-caption-color);font-size:var(--x-table-caption-font-size);font-weight:var(--x-table-caption-font-weight);padding:var(--x-table-caption-padding);box-sizing:border-box;}[part\x3dcaption][hidden]{display:none !important;}slot{display:contents;}";
3
- d.setAttribute("part","caption");d.setAttribute("hidden","");b.appendChild(c);b.appendChild(d);b.appendChild(e);a.__xTableRefs=new $APP.P(null,3,[$APP.rh,b,ys,d,$APP.Ph,e],null);return $APP.l(a,"__xTableRefs")},Ls=function(a){a=new $APP.P(null,8,[As,a.getAttribute("columns"),Bs,a.getAttribute("caption"),Cs,a.getAttribute("selectable"),$APP.kh,a.hasAttribute("striped"),Ds,a.hasAttribute("bordered"),Es,a.hasAttribute("full-width"),Fs,a.hasAttribute("compact"),Gs,a.getAttribute("row-count")],null);var b=
4
- $APP.M(a),c=$APP.I(b,As),d=$APP.I(b,Bs),e=$APP.I(b,Cs);a=$APP.I(b,$APP.kh);var g=$APP.I(b,Ds),h=$APP.I(b,Es),k=$APP.I(b,Fs);b=$APP.I(b,Gs);a:{if(typeof c==="string"&&(c=c.trim(),$APP.N(c,""))){var m=parseInt(c,10);c=$APP.p(isNaN(m))&&m>0&&$APP.E.h(c,""+$APP.S.g(m))?"repeat("+$APP.S.g(m)+",1fr)":c;break a}c=null}d=$APP.n(d)?d:"";e=typeof e==="string"?e.trim().toLowerCase():null;e=$APP.Cc(Hs,e)?e:"none";return new $APP.P(null,8,[$APP.Sg,c,Is,d,Js,e,$APP.kh,$APP.J(a),Ds,$APP.J(g),Es,$APP.J(h),Fs,$APP.J(k),
5
- Ks,xs(b)],null)},Ms=function(a){a=a.querySelectorAll("x-table-row");for(var b=a.length,c=0;;)if(c<b){var d=a[c];$APP.Qc(c+1,2)===0?d.setAttribute("data-stripe","even"):d.removeAttribute("data-stripe");c+=1}else break},Ns=function(a){var b=Ls(a);if($APP.N($APP.l(a,"__xTableModel"),b)){b=$APP.M(b);var c=$APP.I(b,$APP.Sg),d=$APP.I(b,Is),e=$APP.I(b,Js),g=$APP.I(b,$APP.kh),h=$APP.I(b,Ds),k=$APP.I(b,Es),m=$APP.I(b,Fs),q=$APP.I(b,Ks),r=zs(a);r=$APP.M(r);r=$APP.I(r,ys);a.style.gridTemplateColumns=$APP.n(c)?
6
- c:"";a.setAttribute("role",$APP.E.h(e,"none")?"table":"grid");c=$APP.E.h(e,"multi")?"true":null;$APP.n(c)?a.setAttribute("aria-multiselectable",c):a.removeAttribute("aria-multiselectable");q!=null?a.setAttribute("aria-rowcount",""+$APP.S.g(q)):a.removeAttribute("aria-rowcount");$APP.N(d,"")?a.setAttribute("aria-label",d):a.removeAttribute("aria-label");$APP.N(d,"")?(r.textContent=d,r.removeAttribute("hidden")):(r.textContent="",r.setAttribute("hidden",""));$APP.n(g)?a.setAttribute("data-striped",
7
- ""):a.removeAttribute("data-striped");$APP.n(h)?a.setAttribute("data-bordered",""):a.removeAttribute("data-bordered");$APP.n(k)?a.setAttribute("data-full-width",""):a.removeAttribute("data-full-width");$APP.n(m)?a.setAttribute("data-compact",""):a.removeAttribute("data-compact");$APP.n(g)&&Ms(a);a.__xTableModel=b}},Qs=function(a){function b(){var e=$APP.l(a,"__xTableModel");e=$APP.n(e)?e:Ls(a);$APP.n($APP.kh.g(e))&&Ms(a);return null}function c(e){var g=$APP.l(a,"__xTableModel");g=$APP.n(g)?g:Ls(a);
8
- var h=Js.g(g);if($APP.N(h,"none")){g=e.target;e=$APP.l(e.detail,"rowIndex");var k=g.hasAttribute("selected");k=($APP.E.h(h,"single"),$APP.p(k));e=$APP.xg(new $APP.P(null,3,[$APP.ri,$APP.n(e)?e:0,$APP.$i,k,Os,h],null));a.dispatchEvent(new CustomEvent("x-table-row-select",{detail:e,bubbles:!0,composed:!0,cancelable:!0}));if($APP.E.h(h,"single")){h=a.querySelectorAll("x-table-row[selected]");e=h.length;for(k=0;;)if(k<e)h[k].removeAttribute("selected"),k+=1;else break;g.setAttribute("selected","")}else $APP.E.h(h,
9
- "multi")&&($APP.n(g.hasAttribute("selected"))?g.removeAttribute("selected"):g.setAttribute("selected",""))}return null}function d(e){var g=e.target;g=Array.from(g.parentElement.querySelectorAll("x-table-cell")).indexOf(g);var h=$APP.l(e.detail,"direction"),k=$APP.l(e.detail,"previousDirection");g>=0&&(e.stopPropagation(),e=$APP.xg(new $APP.P(null,3,[Ps,g,$APP.ai,h,$APP.Hi,k],null)),a.dispatchEvent(new CustomEvent("x-table-sort",{detail:e,bubbles:!0,composed:!0,cancelable:!0})));return null}a.addEventListener("x-table-cell-sort",
10
- d);a.addEventListener("x-table-row-click",c);a.addEventListener("x-table-row-connected",b);$APP.ma(a,"__xTableHandlers",{sort:d,"row-click":c,"row-conn":b})},Rs=function(a){var b=$APP.l(a,"__xTableHandlers");if($APP.n(b)){var c=$APP.l(b,"sort"),d=$APP.l(b,"row-click");b=$APP.l(b,"row-conn");$APP.n(c)&&a.removeEventListener("x-table-cell-sort",c);$APP.n(d)&&a.removeEventListener("x-table-row-click",d);$APP.n(b)&&a.removeEventListener("x-table-row-connected",b)}a.__xTableHandlers=null},Ss=function(a){Object.defineProperty(a,
11
- "columns",{get:function(){var b=this.getAttribute("columns");return $APP.n(b)?b:""},set:function(b){return $APP.n(b)?this.setAttribute("columns",""+$APP.S.g(b)):this.removeAttribute("columns")},enumerable:!0,configurable:!0});Object.defineProperty(a,"caption",{get:function(){var b=this.getAttribute("caption");return $APP.n(b)?b:""},set:function(b){return $APP.n(b)?this.setAttribute("caption",""+$APP.S.g(b)):this.removeAttribute("caption")},enumerable:!0,configurable:!0});Object.defineProperty(a,"selectable",
12
- {get:function(){var b=this.getAttribute("selectable");return $APP.n(b)?b:"none"},set:function(b){return $APP.n(b)?this.setAttribute("selectable",""+$APP.S.g(b)):this.removeAttribute("selectable")},enumerable:!0,configurable:!0});Object.defineProperty(a,"striped",{get:function(){return this.hasAttribute("striped")},set:function(b){return $APP.n(b)?this.setAttribute("striped",""):this.removeAttribute("striped")},enumerable:!0,configurable:!0});Object.defineProperty(a,"bordered",{get:function(){return this.hasAttribute("bordered")},
13
- set:function(b){return $APP.n(b)?this.setAttribute("bordered",""):this.removeAttribute("bordered")},enumerable:!0,configurable:!0});Object.defineProperty(a,"compact",{get:function(){return this.hasAttribute("compact")},set:function(b){return $APP.n(b)?this.setAttribute("compact",""):this.removeAttribute("compact")},enumerable:!0,configurable:!0});Object.defineProperty(a,"fullWidth",{get:function(){return this.hasAttribute("full-width")},set:function(b){return $APP.n(b)?this.setAttribute("full-width",
14
- ""):this.removeAttribute("full-width")},enumerable:!0,configurable:!0});Object.defineProperty(a,"rowCount",{get:function(){return xs(this.getAttribute("row-count"))},set:function(b){return b==null?this.removeAttribute("row-count"):this.setAttribute("row-count",""+$APP.S.g(Math.floor(b)))},enumerable:!0,configurable:!0})},Us=function(){var a=class extends HTMLElement{};a.observedAttributes=Ts;a.prototype.connectedCallback=function(){zs(this);Rs(this);Qs(this);Ns(this);return null};a.prototype.disconnectedCallback=
15
- function(){Rs(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&Ns(this);return null};Ss(a.prototype);return a},Vs=function(){$APP.n(customElements.get("x-table"))||customElements.define("x-table",Us());return null},Js=new $APP.K(null,"selectable","selectable",370587038),Es=new $APP.K(null,"full-width?","full-width?",1477288349),Gs=new $APP.K(null,"row-count-raw","row-count-raw",-1432781274),Cs=new $APP.K(null,"selectable-raw","selectable-raw",-1276314763),Ps=new $APP.K(null,
16
- "colIndex","colIndex",171239635),Is=new $APP.K(null,"caption","caption",-855383902),Ds=new $APP.K(null,"bordered?","bordered?",562358476),Ks=new $APP.K(null,"row-count","row-count",1060167988),ys=new $APP.K(null,"caption-div","caption-div",1485363333),Bs=new $APP.K(null,"caption-raw","caption-raw",-375935083),Os=new $APP.K(null,"selectionMode","selectionMode",1264773367),As=new $APP.K(null,"columns-raw","columns-raw",-2093994046),Fs=new $APP.K(null,"compact?","compact?",1216893298);var Ts="columns caption selectable striped bordered full-width compact row-count".split(" ");$APP.wd(["x-table-sort",new $APP.P(null,2,[$APP.Y,new $APP.P(null,3,[Ps,$APP.Fh,$APP.ai,$APP.X,$APP.Hi,$APP.X],null),$APP.ui,!0],null),"x-table-row-select",new $APP.P(null,2,[$APP.Y,new $APP.P(null,3,[$APP.ri,$APP.Fh,$APP.$i,$APP.Ji,Os,$APP.X],null),$APP.ui,!0],null)]);var Hs=new $APP.R(null,new $APP.P(null,3,["none",null,"single",null,"multi",null],null),null);$APP.ka("baredom.exports.x_table.init",Vs);export const init=Vs;
2
+ var vs=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),$APP.p(isNaN(a))&&a>0?Math.floor(a):null):null},xs=function(a){var b=$APP.l(a,"__xTableRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");c.textContent=":host{display:grid;box-sizing:border-box;color-scheme:light dark;--x-table-border-color:rgba(0,0,0,0.1);--x-table-border-radius:8px;--x-table-stripe-bg:rgba(0,0,0,0.025);--x-table-caption-color:inherit;--x-table-caption-font-size:0.875rem;--x-table-caption-font-weight:600;--x-table-caption-padding:0 0 0.5rem;--x-table-compact-padding:0.25rem 0.5rem;}@media (prefers-color-scheme:dark){:host{--x-table-border-color:rgba(255,255,255,0.1);--x-table-stripe-bg:rgba(255,255,255,0.03);}}:host([data-bordered]){border:1px solid var(--x-table-border-color);border-radius:var(--x-table-border-radius);overflow:hidden;}:host([data-full-width]){width:100%;}:host([data-compact]){--x-table-cell-padding:var(--x-table-compact-padding);}:host([data-striped]) ::slotted(x-table-row[data-stripe\x3d'even']){--x-table-row-bg:var(--x-table-stripe-bg);}[part\x3dcaption]{grid-column:1 / -1;color:var(--x-table-caption-color);font-size:var(--x-table-caption-font-size);font-weight:var(--x-table-caption-font-weight);padding:var(--x-table-caption-padding);box-sizing:border-box;}[part\x3dcaption][hidden]{display:none !important;}slot{display:contents;}";
3
+ d.setAttribute("part","caption");d.setAttribute("hidden","");b.appendChild(c);b.appendChild(d);b.appendChild(e);a.__xTableRefs=new $APP.Q(null,3,[$APP.kh,b,ws,d,$APP.Jh,e],null);return $APP.l(a,"__xTableRefs")},Js=function(a){a=new $APP.Q(null,8,[ys,a.getAttribute("columns"),zs,a.getAttribute("caption"),As,a.getAttribute("selectable"),$APP.dh,a.hasAttribute("striped"),Bs,a.hasAttribute("bordered"),Cs,a.hasAttribute("full-width"),Ds,a.hasAttribute("compact"),Es,a.getAttribute("row-count")],null);var b=
4
+ $APP.N(a),c=$APP.I(b,ys),d=$APP.I(b,zs),e=$APP.I(b,As);a=$APP.I(b,$APP.dh);var g=$APP.I(b,Bs),h=$APP.I(b,Cs),k=$APP.I(b,Ds);b=$APP.I(b,Es);a:{if(typeof c==="string"&&(c=c.trim(),$APP.O(c,""))){var m=parseInt(c,10);c=$APP.p(isNaN(m))&&m>0&&$APP.C.h(c,""+$APP.T.g(m))?"repeat("+$APP.T.g(m)+",1fr)":c;break a}c=null}d=$APP.n(d)?d:"";e=typeof e==="string"?e.trim().toLowerCase():null;e=$APP.yc(Fs,e)?e:"none";return new $APP.Q(null,8,[$APP.Kg,c,Gs,d,Hs,e,$APP.dh,$APP.K(a),Bs,$APP.K(g),Cs,$APP.K(h),Ds,$APP.K(k),
5
+ Is,vs(b)],null)},Ks=function(a){a=a.querySelectorAll("x-table-row");for(var b=a.length,c=0;;)if(c<b){var d=a[c];$APP.Lc(c+1,2)===0?d.setAttribute("data-stripe","even"):d.removeAttribute("data-stripe");c+=1}else break},Ls=function(a){var b=Js(a);if($APP.O($APP.l(a,"__xTableModel"),b)){b=$APP.N(b);var c=$APP.I(b,$APP.Kg),d=$APP.I(b,Gs),e=$APP.I(b,Hs),g=$APP.I(b,$APP.dh),h=$APP.I(b,Bs),k=$APP.I(b,Cs),m=$APP.I(b,Ds),q=$APP.I(b,Is),r=xs(a);r=$APP.N(r);r=$APP.I(r,ws);a.style.gridTemplateColumns=$APP.n(c)?
6
+ c:"";a.setAttribute("role",$APP.C.h(e,"none")?"table":"grid");c=$APP.C.h(e,"multi")?"true":null;$APP.n(c)?a.setAttribute("aria-multiselectable",c):a.removeAttribute("aria-multiselectable");q!=null?a.setAttribute("aria-rowcount",""+$APP.T.g(q)):a.removeAttribute("aria-rowcount");$APP.O(d,"")?a.setAttribute("aria-label",d):a.removeAttribute("aria-label");$APP.O(d,"")?(r.textContent=d,r.removeAttribute("hidden")):(r.textContent="",r.setAttribute("hidden",""));$APP.n(g)?a.setAttribute("data-striped",
7
+ ""):a.removeAttribute("data-striped");$APP.n(h)?a.setAttribute("data-bordered",""):a.removeAttribute("data-bordered");$APP.n(k)?a.setAttribute("data-full-width",""):a.removeAttribute("data-full-width");$APP.n(m)?a.setAttribute("data-compact",""):a.removeAttribute("data-compact");$APP.n(g)&&Ks(a);a.__xTableModel=b}},Os=function(a){function b(){var e=$APP.l(a,"__xTableModel");e=$APP.n(e)?e:Js(a);$APP.n($APP.dh.g(e))&&Ks(a);return null}function c(e){var g=$APP.l(a,"__xTableModel");g=$APP.n(g)?g:Js(a);
8
+ var h=Hs.g(g);if($APP.O(h,"none"))if(g=e.target,e=$APP.l(e.detail,"rowIndex"),e=$APP.pg(new $APP.Q(null,3,[$APP.ki,$APP.n(e)?e:0,$APP.Ui,$APP.p(g.hasAttribute("selected")),Ms,h],null)),a.dispatchEvent(new CustomEvent("x-table-row-select",{detail:e,bubbles:!0,composed:!0,cancelable:!0})),$APP.C.h(h,"single")){e=g.hasAttribute("selected");h=a.querySelectorAll("x-table-row[selected]");for(var k=h.length,m=0;;)if(m<k)h[m].removeAttribute("selected"),m+=1;else break;$APP.n(e)||g.setAttribute("selected",
9
+ "")}else $APP.C.h(h,"multi")&&($APP.n(g.hasAttribute("selected"))?g.removeAttribute("selected"):g.setAttribute("selected",""));return null}function d(e){var g=e.target;g=Array.from(g.parentElement.querySelectorAll("x-table-cell")).indexOf(g);var h=$APP.l(e.detail,"direction"),k=$APP.l(e.detail,"previousDirection");g>=0&&(e.stopPropagation(),e=$APP.pg(new $APP.Q(null,3,[Ns,g,$APP.Vh,h,$APP.Bi,k],null)),a.dispatchEvent(new CustomEvent("x-table-sort",{detail:e,bubbles:!0,composed:!0,cancelable:!0})));
10
+ return null}a.addEventListener("x-table-cell-sort",d);a.addEventListener("x-table-row-click",c);a.addEventListener("x-table-row-connected",b);$APP.la(a,"__xTableHandlers",{sort:d,"row-click":c,"row-conn":b})},Ps=function(a){var b=$APP.l(a,"__xTableHandlers");if($APP.n(b)){var c=$APP.l(b,"sort"),d=$APP.l(b,"row-click");b=$APP.l(b,"row-conn");$APP.n(c)&&a.removeEventListener("x-table-cell-sort",c);$APP.n(d)&&a.removeEventListener("x-table-row-click",d);$APP.n(b)&&a.removeEventListener("x-table-row-connected",
11
+ b)}a.__xTableHandlers=null},Qs=function(a){Object.defineProperty(a,"columns",{get:function(){var b=this.getAttribute("columns");return $APP.n(b)?b:""},set:function(b){return $APP.n(b)?this.setAttribute("columns",""+$APP.T.g(b)):this.removeAttribute("columns")},enumerable:!0,configurable:!0});Object.defineProperty(a,"caption",{get:function(){var b=this.getAttribute("caption");return $APP.n(b)?b:""},set:function(b){return $APP.n(b)?this.setAttribute("caption",""+$APP.T.g(b)):this.removeAttribute("caption")},
12
+ enumerable:!0,configurable:!0});Object.defineProperty(a,"selectable",{get:function(){var b=this.getAttribute("selectable");return $APP.n(b)?b:"none"},set:function(b){return $APP.n(b)?this.setAttribute("selectable",""+$APP.T.g(b)):this.removeAttribute("selectable")},enumerable:!0,configurable:!0});Object.defineProperty(a,"striped",{get:function(){return this.hasAttribute("striped")},set:function(b){return $APP.n(b)?this.setAttribute("striped",""):this.removeAttribute("striped")},enumerable:!0,configurable:!0});
13
+ Object.defineProperty(a,"bordered",{get:function(){return this.hasAttribute("bordered")},set:function(b){return $APP.n(b)?this.setAttribute("bordered",""):this.removeAttribute("bordered")},enumerable:!0,configurable:!0});Object.defineProperty(a,"compact",{get:function(){return this.hasAttribute("compact")},set:function(b){return $APP.n(b)?this.setAttribute("compact",""):this.removeAttribute("compact")},enumerable:!0,configurable:!0});Object.defineProperty(a,"fullWidth",{get:function(){return this.hasAttribute("full-width")},
14
+ set:function(b){return $APP.n(b)?this.setAttribute("full-width",""):this.removeAttribute("full-width")},enumerable:!0,configurable:!0});Object.defineProperty(a,"rowCount",{get:function(){return vs(this.getAttribute("row-count"))},set:function(b){return b==null?this.removeAttribute("row-count"):this.setAttribute("row-count",""+$APP.T.g(Math.floor(b)))},enumerable:!0,configurable:!0})},Ss=function(){var a=class extends HTMLElement{};a.observedAttributes=Rs;a.prototype.connectedCallback=function(){xs(this);
15
+ Ps(this);Os(this);Ls(this);return null};a.prototype.disconnectedCallback=function(){Ps(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&Ls(this);return null};Qs(a.prototype);return a},Ts=function(){$APP.n(customElements.get("x-table"))||customElements.define("x-table",Ss());return null},Hs=new $APP.M(null,"selectable","selectable",370587038),Cs=new $APP.M(null,"full-width?","full-width?",1477288349),Es=new $APP.M(null,"row-count-raw","row-count-raw",-1432781274),
16
+ As=new $APP.M(null,"selectable-raw","selectable-raw",-1276314763),Ns=new $APP.M(null,"colIndex","colIndex",171239635),Gs=new $APP.M(null,"caption","caption",-855383902),Bs=new $APP.M(null,"bordered?","bordered?",562358476),Is=new $APP.M(null,"row-count","row-count",1060167988),ws=new $APP.M(null,"caption-div","caption-div",1485363333),zs=new $APP.M(null,"caption-raw","caption-raw",-375935083),Ms=new $APP.M(null,"selectionMode","selectionMode",1264773367),ys=new $APP.M(null,"columns-raw","columns-raw",
17
+ -2093994046),Ds=new $APP.M(null,"compact?","compact?",1216893298);var Rs="columns caption selectable striped bordered full-width compact row-count".split(" ");$APP.sd(["x-table-sort",new $APP.Q(null,2,[$APP.Y,new $APP.Q(null,3,[Ns,$APP.zh,$APP.Vh,$APP.X,$APP.Bi,$APP.X],null),$APP.ni,!0],null),"x-table-row-select",new $APP.Q(null,2,[$APP.Y,new $APP.Q(null,3,[$APP.ki,$APP.zh,$APP.Ui,$APP.Di,Ms,$APP.X],null),$APP.ni,!0],null)]);var Fs=new $APP.S(null,new $APP.Q(null,3,["none",null,"single",null,"multi",null],null),null);$APP.ja("baredom.exports.x_table.init",Ts);export const init=Ts;
package/dist/x-tabs.js CHANGED
@@ -1,12 +1,13 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var xt=function(a){if($APP.tc(a))return $APP.pc(a,null);a=$APP.u(a);if(a==null)return $APP.sf;if(a instanceof $APP.Ib&&a.u===0)return $APP.tf(a.i);for(var b=$APP.hb($APP.sf);;)if(a!=null){var c=$APP.y(a);b=$APP.ib(b,$APP.Da(a));a=c}else return $APP.jb(b)},Ct=function(a){var b=$APP.M(a);a=$APP.I(b,$APP.T);var c=$APP.I(b,$APP.zh),d=$APP.I(b,yt),e=$APP.I(b,$APP.W);b=$APP.I(b,zt);c=$APP.Cc(At,c)?c:"horizontal";d=$APP.Cc(Bt,d)?d:"auto";return new $APP.P(null,5,[$APP.T,a,$APP.zh,c,yt,d,$APP.W,e,zt,$APP.J(b)],
3
- null)},Dt=function(a){return $APP.l(a,"__x_tabs_initialized")===!0},Et=function(a){return new $APP.P(null,5,[$APP.T,a.getAttribute("value"),$APP.zh,a.getAttribute("orientation"),yt,a.getAttribute("activation"),$APP.W,a.getAttribute("label"),zt,a.hasAttribute("loop")],null)},Ft=function(a){return $APP.be($APP.Kd(function(b){return $APP.E.h("X-TAB",b.tagName)},$APP.gc(a.children)))},Gt=function(a){return $APP.p(a.hasAttribute("disabled"))},Ht=function(a){return a.getAttribute("value")},It=function(a){return $APP.Ad(function(b){return Gt(b)?
4
- b:null},a)},Jt=function(a,b){var c=a.getAttribute("value");$APP.n($APP.n(b)?$APP.N(c,b):b)?a.setAttribute("value",b):(b=b==null||$APP.E.h(b,""),$APP.n(b?c:b)&&a.removeAttribute("value"))},Kt=function(a,b){var c=a.hasAttribute("selected");$APP.n($APP.n(b)?$APP.p(c):b)?a.setAttribute("selected",""):(b=$APP.p(b),$APP.n(b?c:b)&&a.removeAttribute("selected"))},Lt=function(a,b){var c=a.getAttribute("tabindex");$APP.N(c,b)&&a.setAttribute("tabindex",b)},Mt=function(a,b){a=a.getAttribute("controls");$APP.n($APP.n(a)?
5
- $APP.N(a,""):a)&&(a=document.getElementById(a),$APP.n(a)&&($APP.n(b)?a.removeAttribute("hidden"):a.setAttribute("hidden","")))},Nt=function(a){var b=Ft(a),c=a.getAttribute("value"),d=xt($APP.Cd(Ht,b));$APP.n($APP.n(c)?$APP.Cc(d,c):c)||(c=It(b),c=$APP.n(c)?Ht(c):null);if($APP.n(c)){a:{d=$APP.u(b);for(var e=null,g=0,h=0;;)if(h<g){var k=e.F(null,h),m=$APP.E.h(Ht(k),c);Kt(k,m);m&&Gt(k)?Lt(k,"0"):Lt(k,"-1");h+=1}else if(d=$APP.u(d))$APP.yc(d)?(e=$APP.ob(d),d=$APP.pb(d),k=e,g=$APP.B(e),e=k):(k=$APP.x(d),
6
- e=$APP.E.h(Ht(k),c),Kt(k,e),e&&Gt(k)?Lt(k,"0"):Lt(k,"-1"),d=$APP.y(d),e=null,g=0),h=0;else break a}a:for(b=$APP.u(b),d=null,g=e=0;;)if(g<e)k=d.F(null,g),Mt(k,$APP.E.h(Ht(k),c)),g+=1;else if(b=$APP.u(b))d=b,$APP.yc(d)?(b=$APP.ob(d),e=$APP.pb(d),d=b,k=$APP.B(b),b=e,e=k):(k=$APP.x(d),Mt(k,$APP.E.h(Ht(k),c)),b=$APP.y(d),d=null,e=0),g=0;else break a;Jt(a,c)}return c},Ot=function(a,b){var c=a.getAttribute("value");return $APP.n($APP.n(b)?$APP.N(c,b):b)?(Jt(a,b),Nt(a),a.dispatchEvent(new CustomEvent("value-change",
7
- {detail:{value:$APP.n(b)?b:""},bubbles:!0,composed:!0}))):null},Pt=function(a,b,c){b=$APP.B(b)-1;var d=a+1;return d<=b?d:$APP.n(c)?0:a},Qt=function(a,b,c){var d=a-1;b=$APP.B(b)-1;return d>=0?d:$APP.n(c)?b:a},Rt=function(a){var b=$APP.l(a,"__x_tabs_base"),c=Ct(Et(a));$APP.n(b)&&(b.setAttribute("role","tablist"),b.setAttribute("aria-orientation",$APP.zh.g(c)),c=$APP.W.g(c),$APP.n($APP.n(c)?$APP.N(c,""):c)?b.setAttribute("aria-label",c):b.removeAttribute("aria-label"));return Nt(a)},St=function(a){var b=
8
- new MutationObserver(function(){return Rt(a)});b.observe(a,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["value","selected","disabled","controls"]});a.__x_tabs_observer=b},Tt=function(a){function b(d){a:{var e=$APP.be($APP.Kd(Gt,Ft(a))),g=Ct(Et(a)),h=$APP.zh.g(g);var k=yt.g(g);g=zt.g(g);var m=d.key,q=e.indexOf(document.activeElement);if(q>=0&&(h=$APP.E.h(h,"horizontal")&&$APP.E.h(m,"ArrowRight")?Pt(q,e,g):$APP.E.h(h,"horizontal")&&$APP.E.h(m,"ArrowLeft")?Qt(q,e,g):$APP.E.h(h,"vertical")&&
9
- $APP.E.h(m,"ArrowDown")?Pt(q,e,g):$APP.E.h(h,"vertical")&&$APP.E.h(m,"ArrowUp")?Qt(q,e,g):$APP.E.h(m,"Home")?0:$APP.E.h(m,"End")?$APP.B(e)-1:null,h!=null)){d.preventDefault();d=$APP.H(e,h,null);$APP.n(d)?d.focus():d=null;k=$APP.n(d)?$APP.E.h(k,"auto")?Ot(a,Ht(d)):null:null;break a}k=null}return k}function c(d){d.stopPropagation();return Ot(a,d.detail.value)}a.addEventListener("tab-select",c);a.addEventListener("keydown",b);a.__x_tabs_on_tab_select=c;a.__x_tabs_on_keydown=b;St(a)},Ut=function(a){Object.defineProperty(a.prototype,
10
- "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})},Wt=function(){var a=class extends HTMLElement{};a.observedAttributes=Vt;a.prototype.connectedCallback=function(){if(Dt(this)){Tt(this);var b=Rt(this)}else{if(!Dt(this)){b=this.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");c.textContent=
11
- ":host{display:block;color-scheme:light dark;}.base{display:block;}::slotted(x-tab){margin-inline-end:var(--x-tabs-gap,8px);}";d.setAttribute("part","base");d.className="base";d.appendChild(e);b.appendChild(c);b.appendChild(d);this.__x_tabs_root=b;this.__x_tabs_base=d;this.__x_tabs_slot=e;Tt(this);this.__x_tabs_initialized=!0}Rt(this);b=this}return b};a.prototype.disconnectedCallback=function(){var b=$APP.l(this,"__x_tabs_on_tab_select");$APP.n(b)&&this.removeEventListener("tab-select",b);b=$APP.l(this,
12
- "__x_tabs_on_keydown");$APP.n(b)&&this.removeEventListener("keydown",b);b=$APP.l(this,"__x_tabs_observer");return $APP.n(b)?b.disconnect():null};a.prototype.attributeChangedCallback=function(){return Dt(this)?Rt(this):null};Ut(a);return a},Xt=function(){return $APP.n(customElements.get("x-tabs"))?null:customElements.define("x-tabs",Wt())},yt=new $APP.K(null,"activation","activation",2128521072),zt=new $APP.K(null,"loop","loop",-395552849);var Vt=["value","orientation","activation","label","loop"],At=new $APP.R(null,new $APP.P(null,2,["vertical",null,"horizontal",null],null),null),Bt=new $APP.R(null,new $APP.P(null,2,["auto",null,"manual",null],null),null);$APP.wd(["value-change",new $APP.P(null,1,[$APP.Y,new $APP.P(null,1,[$APP.T,$APP.X],null)],null)]);$APP.ka("baredom.exports.x_tabs.init",Xt);export const init=Xt;
2
+ var vt=function(a){if($APP.pc(a))return $APP.mc(a,null);a=$APP.u(a);if(a==null)return $APP.mf;if(a instanceof $APP.Fb&&a.s===0)return $APP.nf(a.i);for(var b=$APP.fb($APP.mf);;)if(a!=null){var c=$APP.y(a);b=$APP.gb(b,$APP.Ba(a));a=c}else return $APP.hb(b)},At=function(a){var b=$APP.N(a);a=$APP.I(b,$APP.U);var c=$APP.I(b,$APP.th),d=$APP.I(b,wt),e=$APP.I(b,$APP.W);b=$APP.I(b,xt);c=$APP.yc(yt,c)?c:"horizontal";d=$APP.yc(zt,d)?d:"auto";return new $APP.Q(null,5,[$APP.U,a,$APP.th,c,wt,d,$APP.W,e,xt,$APP.K(b)],
3
+ null)},Bt=function(a){return $APP.l(a,"__x_tabs_initialized")===!0},Ct=function(a){return new $APP.Q(null,5,[$APP.U,a.getAttribute("value"),$APP.th,a.getAttribute("orientation"),wt,a.getAttribute("activation"),$APP.W,a.getAttribute("label"),xt,a.hasAttribute("loop")],null)},Dt=function(a){return $APP.Wd($APP.Ed(function(b){return $APP.C.h("X-TAB",b.tagName)},$APP.dc(a.children)))},Et=function(a){return $APP.p(a.hasAttribute("disabled"))},Ft=function(a){return a.getAttribute("value")},Gt=function(a){return $APP.xd(function(b){return Et(b)?
4
+ b:null},a)},Ht=function(a,b){var c=a.getAttribute("value");$APP.n($APP.n(b)?$APP.O(c,b):b)?a.setAttribute("value",b):(b=b==null||$APP.C.h(b,""),$APP.n(b?c:b)&&a.removeAttribute("value"))},It=function(a,b){var c=a.hasAttribute("selected");$APP.n($APP.n(b)?$APP.p(c):b)?a.setAttribute("selected",""):(b=$APP.p(b),$APP.n(b?c:b)&&a.removeAttribute("selected"))},Jt=function(a,b){var c=a.getAttribute("tabindex");$APP.O(c,b)&&a.setAttribute("tabindex",b)},Kt=function(a,b){a=a.getAttribute("controls");$APP.n($APP.n(a)?
5
+ $APP.O(a,""):a)&&(a=document.getElementById(a),$APP.n(a)&&($APP.n(b)?a.removeAttribute("hidden"):a.setAttribute("hidden","")))},Lt=function(a){var b=Dt(a),c=a.getAttribute("value"),d=vt($APP.zd(Ft,b));$APP.n($APP.n(c)?$APP.yc(d,c):c)||(c=Gt(b),c=$APP.n(c)?Ft(c):null);if($APP.n(c)){a:{d=$APP.u(b);for(var e=null,g=0,h=0;;)if(h<g){var k=e.D(null,h),m=$APP.C.h(Ft(k),c);It(k,m);m&&Et(k)?Jt(k,"0"):Jt(k,"-1");h+=1}else if(d=$APP.u(d))$APP.uc(d)?(e=$APP.mb(d),d=$APP.nb(d),k=e,g=$APP.B(e),e=k):(k=$APP.x(d),
6
+ e=$APP.C.h(Ft(k),c),It(k,e),e&&Et(k)?Jt(k,"0"):Jt(k,"-1"),d=$APP.y(d),e=null,g=0),h=0;else break a}a:for(b=$APP.u(b),d=null,g=e=0;;)if(g<e)k=d.D(null,g),Kt(k,$APP.C.h(Ft(k),c)),g+=1;else if(b=$APP.u(b))d=b,$APP.uc(d)?(b=$APP.mb(d),e=$APP.nb(d),d=b,k=$APP.B(b),b=e,e=k):(k=$APP.x(d),Kt(k,$APP.C.h(Ft(k),c)),b=$APP.y(d),d=null,e=0),g=0;else break a;Ht(a,c)}return c},Mt=function(a,b){var c=a.getAttribute("value");return $APP.n($APP.n(b)?$APP.O(c,b):b)?(Ht(a,b),Lt(a),a.dispatchEvent(new CustomEvent("value-change",
7
+ {detail:{value:$APP.n(b)?b:""},bubbles:!0,composed:!0}))):null},Nt=function(a,b,c){b=$APP.B(b)-1;var d=a+1;return d<=b?d:$APP.n(c)?0:a},Ot=function(a,b,c){var d=a-1;b=$APP.B(b)-1;return d>=0?d:$APP.n(c)?b:a},Pt=function(a){var b=$APP.l(a,"__x_tabs_base"),c=At(Ct(a));$APP.n(b)&&(b.setAttribute("role","tablist"),b.setAttribute("aria-orientation",$APP.th.g(c)),c=$APP.W.g(c),$APP.n($APP.n(c)?$APP.O(c,""):c)?b.setAttribute("aria-label",c):b.removeAttribute("aria-label"));return Lt(a)},Qt=function(a){var b=
8
+ new MutationObserver(function(){return Pt(a)});b.observe(a,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value","selected","disabled","controls"]});a.__x_tabs_observer=b},Rt=function(a){function b(d){a:{var e=$APP.Wd($APP.Ed(Et,Dt(a))),g=At(Ct(a)),h=$APP.th.g(g);var k=wt.g(g);g=xt.g(g);var m=d.key,q=e.indexOf(document.activeElement);if(q>=0&&(h=$APP.C.h(h,"horizontal")&&$APP.C.h(m,"ArrowRight")?Nt(q,e,g):$APP.C.h(h,"horizontal")&&$APP.C.h(m,"ArrowLeft")?Ot(q,e,g):$APP.C.h(h,"vertical")&&
9
+ $APP.C.h(m,"ArrowDown")?Nt(q,e,g):$APP.C.h(h,"vertical")&&$APP.C.h(m,"ArrowUp")?Ot(q,e,g):$APP.C.h(m,"Home")?0:$APP.C.h(m,"End")?$APP.B(e)-1:null,h!=null)){d.preventDefault();d=$APP.H(e,h,null);$APP.n(d)?d.focus():d=null;k=$APP.n(d)?$APP.C.h(k,"auto")?Mt(a,Ft(d)):null:null;break a}k=null}return k}function c(d){d.stopPropagation();return Mt(a,d.detail.value)}a.addEventListener("tab-select",c);a.addEventListener("keydown",b);a.__x_tabs_on_tab_select=c;a.__x_tabs_on_keydown=b;Qt(a)},St=function(a){Object.defineProperty(a.prototype,
10
+ "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})},Ut=function(){var a=class extends HTMLElement{};a.observedAttributes=Tt;a.prototype.connectedCallback=function(){if(Bt(this)){Rt(this);var b=Pt(this)}else{if(!Bt(this)){b=this.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");c.textContent=
11
+ ":host{display:block;color-scheme:light dark;}.base{display:flex;flex-direction:row;}.base[aria-orientation\x3d'vertical']{flex-direction:column;}::slotted(x-tab){margin-inline-end:var(--x-tabs-gap,8px);}:host([orientation\x3d'vertical']) ::slotted(x-tab){margin-inline-end:0;margin-block-end:var(--x-tabs-gap,8px);}";d.setAttribute("part","base");d.className="base";d.appendChild(e);b.appendChild(c);b.appendChild(d);this.__x_tabs_root=b;this.__x_tabs_base=d;this.__x_tabs_slot=e;Rt(this);this.__x_tabs_initialized=
12
+ !0}Pt(this);b=this}return b};a.prototype.disconnectedCallback=function(){var b=$APP.l(this,"__x_tabs_on_tab_select");$APP.n(b)&&this.removeEventListener("tab-select",b);b=$APP.l(this,"__x_tabs_on_keydown");$APP.n(b)&&this.removeEventListener("keydown",b);b=$APP.l(this,"__x_tabs_observer");return $APP.n(b)?b.disconnect():null};a.prototype.attributeChangedCallback=function(){return Bt(this)?Pt(this):null};St(a);return a},Vt=function(){return $APP.n(customElements.get("x-tabs"))?null:customElements.define("x-tabs",
13
+ Ut())},wt=new $APP.M(null,"activation","activation",2128521072),xt=new $APP.M(null,"loop","loop",-395552849);var Tt=["value","orientation","activation","label","loop"],yt=new $APP.S(null,new $APP.Q(null,2,["vertical",null,"horizontal",null],null),null),zt=new $APP.S(null,new $APP.Q(null,2,["auto",null,"manual",null],null),null);$APP.sd(["value-change",new $APP.Q(null,1,[$APP.Y,new $APP.Q(null,1,[$APP.U,$APP.X],null)],null)]);$APP.ja("baredom.exports.x_tabs.init",Vt);export const init=Vt;