@vanelsas/baredom 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +3 -3
  3. package/dist/base.js +402 -393
  4. package/dist/x-alert.js +17 -17
  5. package/dist/x-avatar-group.js +11 -11
  6. package/dist/x-avatar.js +14 -14
  7. package/dist/x-badge.js +11 -11
  8. package/dist/x-bento-grid.js +5 -5
  9. package/dist/x-bento-item.js +4 -4
  10. package/dist/x-breadcrumbs.js +14 -14
  11. package/dist/x-button.js +15 -15
  12. package/dist/x-cancel-dialogue.js +16 -16
  13. package/dist/x-card.js +7 -7
  14. package/dist/x-carousel.js +29 -29
  15. package/dist/x-chart.js +46 -46
  16. package/dist/x-checkbox.js +11 -11
  17. package/dist/x-chip.js +8 -8
  18. package/dist/x-collapse.js +10 -10
  19. package/dist/x-color-picker.js +41 -41
  20. package/dist/x-combobox.js +28 -0
  21. package/dist/x-command-palette.js +25 -25
  22. package/dist/x-container.js +6 -6
  23. package/dist/x-context-menu.js +18 -18
  24. package/dist/x-copy.js +22 -22
  25. package/dist/x-currency-field.js +21 -21
  26. package/dist/x-date-picker.js +37 -37
  27. package/dist/x-divider.js +8 -8
  28. package/dist/x-drawer.js +11 -11
  29. package/dist/x-dropdown.js +9 -9
  30. package/dist/x-fieldset.js +5 -5
  31. package/dist/x-file-download.js +7 -7
  32. package/dist/x-form-field.js +15 -15
  33. package/dist/x-form.js +9 -9
  34. package/dist/x-gaussian-blur.js +18 -18
  35. package/dist/x-grid.js +6 -6
  36. package/dist/x-icon.js +7 -7
  37. package/dist/x-image.js +18 -18
  38. package/dist/x-kinetic-font.js +28 -28
  39. package/dist/x-kinetic-typography.js +37 -37
  40. package/dist/x-liquid-dock.js +35 -35
  41. package/dist/x-liquid-fill.js +40 -40
  42. package/dist/x-liquid-glass.js +36 -36
  43. package/dist/x-menu-item.js +10 -10
  44. package/dist/x-menu.js +10 -10
  45. package/dist/x-metaball-cursor.js +25 -25
  46. package/dist/x-modal.js +12 -12
  47. package/dist/x-morph-stack.js +39 -39
  48. package/dist/x-navbar.js +12 -12
  49. package/dist/x-neural-glow.js +31 -31
  50. package/dist/x-notification-center.js +10 -10
  51. package/dist/x-organic-divider.js +15 -15
  52. package/dist/x-organic-progress.js +35 -35
  53. package/dist/x-organic-shape.js +12 -12
  54. package/dist/x-pagination.js +16 -16
  55. package/dist/x-particle-button.js +47 -47
  56. package/dist/x-popover.js +14 -14
  57. package/dist/x-progress-circle.js +7 -7
  58. package/dist/x-progress.js +7 -7
  59. package/dist/x-radio.js +11 -11
  60. package/dist/x-ripple-effect.js +11 -11
  61. package/dist/x-scroll-parallax.js +17 -17
  62. package/dist/x-scroll-stack.js +18 -18
  63. package/dist/x-scroll-story.js +34 -34
  64. package/dist/x-scroll-timeline.js +45 -45
  65. package/dist/x-scroll.js +40 -40
  66. package/dist/x-search-field.js +14 -14
  67. package/dist/x-select.js +9 -9
  68. package/dist/x-sidebar.js +16 -16
  69. package/dist/x-skeleton-group.js +15 -0
  70. package/dist/x-skeleton.js +1 -6
  71. package/dist/x-slider.js +16 -16
  72. package/dist/x-soft-body.js +20 -20
  73. package/dist/x-spacer.js +5 -5
  74. package/dist/x-spinner.js +5 -5
  75. package/dist/x-splash.js +13 -13
  76. package/dist/x-stat.js +9 -9
  77. package/dist/x-stepper.js +15 -16
  78. package/dist/x-switch.js +10 -10
  79. package/dist/x-tab.js +7 -7
  80. package/dist/x-table-cell.js +19 -19
  81. package/dist/x-table-row.js +10 -10
  82. package/dist/x-table.js +13 -13
  83. package/dist/x-tabs.js +11 -11
  84. package/dist/x-text-area.js +17 -17
  85. package/dist/x-theme.js +25 -25
  86. package/dist/x-timeline-item.js +20 -20
  87. package/dist/x-timeline.js +9 -9
  88. package/dist/x-toast.js +21 -21
  89. package/dist/x-toaster.js +8 -8
  90. package/dist/x-tooltip.js +14 -0
  91. package/dist/x-typography.js +8 -8
  92. package/package.json +13 -1
package/dist/x-stepper.js CHANGED
@@ -1,17 +1,16 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var eo=function(a,b){return new $APP.qd(null,function(){if(a>0){var c=$APP.t(b);return c?$APP.nd($APP.u(c),eo(a-1,$APP.Yb(c))):null}return null},null)},ho=function(a){a=$APP.D(fo,typeof a==="string"?a.toLowerCase():null);return $APP.n(a)?a:go},jo=function(a){a=$APP.D(io,a);return $APP.n(a)?a:"horizontal"},mo=function(a){a=$APP.D(ko,typeof a==="string"?a.toLowerCase():null);return $APP.n(a)?a:lo},oo=function(a){a=$APP.D(no,a);return $APP.n(a)?a:"md"},po=function(a){return typeof a==="string"?(a=parseInt(a.trim(),
3
- 10),typeof a==="number"&&$APP.r(isNaN(a))&&a>=0?a:0):0},qo=function(a){if(typeof a==="string"){var b=a.trim();if($APP.n($APP.cg(/^\d+$/,b)))return a=parseInt(b,10),a>0&&a<=200?$APP.fe(function(g){return new $APP.R(null,2,[$APP.U,"Step "+$APP.T.g(g),$APP.Yj,null],null)},$APP.bg(1,a+1)):$APP.ee;if($APP.n(function(){var g=$APP.N("",b);return g?b.startsWith("["):g}()))try{var c=JSON.parse(b);if($APP.n(Array.isArray(c))){var d=$APP.tc(c),e=$APP.z(d)>200?eo(200,d):d;return $APP.fe(function(g){return new $APP.R(null,
4
- 2,[$APP.U,function(){var h=$APP.k(g,"label");return typeof h==="string"?h:""}(),$APP.Yj,function(){var h=$APP.k(g,"description");return typeof h==="string"?h:null}()],null)},e)}return $APP.ee}catch(g){return $APP.ee}else return $APP.ee}else return $APP.ee},ro=function(a){var b=$APP.k(a,"__xStepperRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div");c.textContent=":host{display:block;color-scheme:light dark;--x-stepper-indicator-size:2rem;--x-stepper-connector-thickness:2px;--x-stepper-step-gap:0.75rem;--x-stepper-font-size:var(--x-font-size-sm,0.875rem);--x-stepper-label-font-weight:500;--x-stepper-desc-font-size:0.75rem;--x-stepper-radius:var(--x-radius-full,999px);--x-stepper-motion:var(--x-transition-duration,120ms);--x-stepper-press-scale:0.93;--x-stepper-focus-ring:var(--x-color-focus-ring,rgba(0,0,0,0.55));--x-stepper-disabled-opacity:0.5;--x-stepper-complete-bg:var(--x-color-success,rgba(16,140,72,1));--x-stepper-complete-color:#fff;--x-stepper-complete-connector:var(--x-color-success,rgba(16,140,72,1));--x-stepper-current-bg:var(--x-color-primary,rgba(0,102,204,1));--x-stepper-current-color:#fff;--x-stepper-upcoming-bg:rgba(0,0,0,0.08);--x-stepper-upcoming-color:var(--x-color-text-muted,rgba(0,0,0,0.45));--x-stepper-idle-connector:var(--x-color-border,rgba(0,0,0,0.12));--x-stepper-label-done-color:var(--x-color-text,rgba(0,0,0,0.85));--x-stepper-label-current-color:var(--x-color-text,rgba(0,0,0,0.85));--x-stepper-label-upcoming-color:var(--x-color-text-muted,rgba(0,0,0,0.4));--x-stepper-desc-color:var(--x-color-text-muted,rgba(0,0,0,0.4));}@media (prefers-color-scheme:dark){:host{--x-stepper-focus-ring:var(--x-color-focus-ring,rgba(255,255,255,0.7));--x-stepper-complete-bg:var(--x-color-success,rgba(60,210,120,1));--x-stepper-complete-color:#000;--x-stepper-complete-connector:var(--x-color-success,rgba(60,210,120,1));--x-stepper-current-bg:var(--x-color-primary,rgba(80,160,255,1));--x-stepper-current-color:#000;--x-stepper-upcoming-bg:rgba(255,255,255,0.1);--x-stepper-upcoming-color:var(--x-color-text-muted,rgba(255,255,255,0.35));--x-stepper-idle-connector:var(--x-color-border,rgba(255,255,255,0.12));--x-stepper-label-done-color:var(--x-color-text,rgba(255,255,255,0.9));--x-stepper-label-current-color:var(--x-color-text,rgba(255,255,255,0.9));--x-stepper-label-upcoming-color:var(--x-color-text-muted,rgba(255,255,255,0.3));--x-stepper-desc-color:var(--x-color-text-muted,rgba(255,255,255,0.35));}}[part\x3dcontainer]{display:flex;align-items:flex-start;margin:0;padding:0;list-style:none;}:host([data-orientation\x3dhorizontal]) [part\x3dcontainer]{flex-direction:row;}:host([data-orientation\x3dhorizontal]) [part\x3dstep]{display:flex;flex-direction:column;align-items:center;flex:1;min-width:0;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-track]{display:flex;align-items:center;width:100%;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-connector]{flex:1;height:var(--x-stepper-connector-thickness);min-width:8px;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-content]{display:flex;flex-direction:column;align-items:center;text-align:center;padding:var(--x-stepper-step-gap) 4px 0;width:100%;}:host([data-orientation\x3dvertical]) [part\x3dcontainer]{flex-direction:column;}:host([data-orientation\x3dvertical]) [part\x3dstep]{display:flex;flex-direction:row;gap:var(--x-stepper-step-gap);}:host([data-orientation\x3dvertical]) [part\x3dstep-track]{display:flex;flex-direction:column;align-items:center;flex-shrink:0;width:var(--x-stepper-indicator-size);}:host([data-orientation\x3dvertical]) [part\x3dstep-connector]{flex:1;width:var(--x-stepper-connector-thickness);min-height:16px;margin:4px 0;}:host([data-orientation\x3dvertical]) [part\x3dstep-content]{display:flex;flex-direction:column;flex:1;min-width:0;padding-bottom:var(--x-stepper-step-gap);}[part\x3dstep-indicator]{display:inline-flex;align-items:center;justify-content:center;width:var(--x-stepper-indicator-size);height:var(--x-stepper-indicator-size);border-radius:var(--x-stepper-radius);border:none;padding:0;margin:0;cursor:pointer;font-size:0.875em;font-weight:600;font-family:inherit;flex-shrink:0;position:relative;z-index:1;transition:background var(--x-stepper-motion) ease,color var(--x-stepper-motion) ease,transform 80ms ease;}[part\x3dstep-indicator]:focus{outline:none;}[part\x3dstep-indicator]:focus-visible{outline:2px solid var(--x-stepper-focus-ring);outline-offset:3px;}[data-state\x3dcomplete] [part\x3dstep-indicator]{background:var(--x-stepper-complete-bg);color:var(--x-stepper-complete-color);}[data-state\x3dcurrent] [part\x3dstep-indicator]{background:var(--x-stepper-current-bg);color:var(--x-stepper-current-color);cursor:default;}[data-state\x3dupcoming] [part\x3dstep-indicator]{background:var(--x-stepper-upcoming-bg);color:var(--x-stepper-upcoming-color);}[data-state\x3dcomplete] [part\x3dstep-connector]{background:var(--x-stepper-complete-connector);}[data-state\x3dcurrent] [part\x3dstep-connector],[data-state\x3dupcoming] [part\x3dstep-connector]{background:var(--x-stepper-idle-connector);}[part\x3dstep]:last-child [part\x3dstep-connector]{display:none;}[part\x3dstep-label]{font-size:var(--x-stepper-font-size);line-height:1.3;font-family:inherit;}[data-state\x3dcomplete] [part\x3dstep-label]{color:var(--x-stepper-label-done-color);}[data-state\x3dcurrent] [part\x3dstep-label]{color:var(--x-stepper-label-current-color);font-weight:var(--x-stepper-label-font-weight);}[data-state\x3dupcoming] [part\x3dstep-label]{color:var(--x-stepper-label-upcoming-color);}[part\x3dstep-description]{font-size:var(--x-stepper-desc-font-size);color:var(--x-stepper-desc-color);line-height:1.3;margin-top:0.2em;}:host(:not([disabled])) [data-state\x3dcomplete] [part\x3dstep-indicator]:hover,:host(:not([disabled])) [data-state\x3dupcoming] [part\x3dstep-indicator]:hover{filter:brightness(0.88);}:host(:not([disabled])) [data-state\x3dcomplete] [part\x3dstep-indicator]:active,:host(:not([disabled])) [data-state\x3dupcoming] [part\x3dstep-indicator]:active{transform:scale(var(--x-stepper-press-scale));}:host([disabled]){opacity:var(--x-stepper-disabled-opacity);}:host([disabled]) [part\x3dstep-indicator]{cursor:default;pointer-events:none;}:host([data-size\x3dsm]){--x-stepper-indicator-size:1.5rem;--x-stepper-font-size:0.8125rem;--x-stepper-desc-font-size:0.6875rem;}:host([data-size\x3dlg]){--x-stepper-indicator-size:2.5rem;--x-stepper-font-size:1rem;--x-stepper-desc-font-size:0.875rem;}@media (prefers-reduced-motion:reduce){[part\x3dstep-indicator]{transition:none;}}";
5
- d.setAttribute("part","container");d.setAttribute("role","list");b.appendChild(c);b.appendChild(d);a.__xStepperRefs=new $APP.R(null,2,[$APP.li,b,$APP.ij,d],null);return $APP.k(a,"__xStepperRefs")},to=function(a){a=new $APP.R(null,5,[so,a.getAttribute("steps"),$APP.nm,a.getAttribute("current"),$APP.pl,a.getAttribute("orientation"),$APP.ol,a.getAttribute("size"),$APP.W,a.hasAttribute("disabled")],null);var b=$APP.M(a),c=$APP.D(b,so);a=$APP.D(b,$APP.nm);var d=$APP.D(b,$APP.pl),e=$APP.D(b,$APP.ol);b=
6
- $APP.D(b,$APP.W);c=qo(c);var g=$APP.z(c);return new $APP.R(null,5,[$APP.Xl,c,$APP.Hh,g===0?0:$APP.$g.i(0,$APP.ah.i(po(a),g-1)),$APP.Mk,ho(d),$APP.th,mo(e),$APP.W,$APP.F(b)],null)},uo=function(a,b,c){return"Step "+$APP.T.g(a+1)+": "+$APP.T.g(b)+" ("+$APP.T.g(function(){var d=c instanceof $APP.K?c.pa:null;switch(d){case "complete":return"completed";case "current":return"current";case "upcoming":return"upcoming";default:throw Error("No matching clause: "+$APP.T.g(d));}}())+")"},vo=function(a,b,c,d){var e=
7
- $APP.M(b);b=$APP.D(e,$APP.U);e=$APP.D(e,$APP.Yj);var g=document.createElement("div"),h=document.createElement("div"),l=document.createElement("button"),m=document.createElement("span"),p=document.createElement("div"),q=document.createElement("div"),v=document.createElement("span"),x=document.createElement("span");a:{var y=c instanceof $APP.K?c.pa:null;switch(y){case "complete":y="complete";break a;case "current":y="current";break a;case "upcoming":y="upcoming";break a;default:throw Error("No matching clause: "+
8
- $APP.T.g(y));}}b=$APP.n(b)?b:"";g.setAttribute("part","step");g.setAttribute("role","listitem");g.setAttribute("data-index",""+$APP.T.g(a));g.setAttribute("data-state",y);h.setAttribute("part","step-track");l.setAttribute("part","step-indicator");l.setAttribute("type","button");l.setAttribute("aria-label",uo(a,b,c));$APP.C.i(c,$APP.Hh)?l.setAttribute("aria-current","step"):l.removeAttribute("aria-current");l.setAttribute("tabindex",$APP.n(d)?"-1":"0");$APP.n(d)&&l.setAttribute("aria-disabled","true");
9
- m.setAttribute("part","step-number");m.setAttribute("aria-hidden","true");m.textContent=$APP.C.i(c,$APP.fm)?"✓":""+$APP.T.g(a+1);p.setAttribute("part","step-connector");p.setAttribute("aria-hidden","true");q.setAttribute("part","step-content");v.setAttribute("part","step-label");v.textContent=b;x.setAttribute("part","step-description");$APP.n($APP.n(e)?$APP.N(e,""):e)?(x.textContent=e,x.style.display="block"):x.style.display="none";l.appendChild(m);h.appendChild(l);h.appendChild(p);q.appendChild(v);
10
- q.appendChild(x);g.appendChild(h);g.appendChild(q);return g},xo=function(a){var b=to(a);if($APP.N($APP.k(a,"__xStepperModel"),b)){b=$APP.M(b);var c=$APP.D(b,$APP.Xl),d=$APP.D(b,$APP.Hh),e=$APP.D(b,$APP.Mk),g=$APP.D(b,$APP.th),h=$APP.D(b,$APP.W),l=ro(a);l=$APP.M(l);l=$APP.D(l,$APP.ij);a.setAttribute("data-orientation",jo(e));a.setAttribute("data-size",oo(g));l.innerHTML="";c=$APP.t($APP.Wd($APP.fh,c));e=null;for(var m=g=0;;)if(m<g){var p=e.G(null,m),q=$APP.zc(p,0,null);p=$APP.zc(p,1,null);var v=q<
11
- d?$APP.fm:$APP.C.i(q,d)?$APP.Hh:wo;l.appendChild(vo(q,p,v,h));m+=1}else if(c=$APP.t(c))$APP.Nc(c)?(g=$APP.xb(c),c=$APP.yb(c),e=g,g=$APP.z(g)):(g=$APP.u(c),e=$APP.zc(g,0,null),g=$APP.zc(g,1,null),m=e<d?$APP.fm:$APP.C.i(e,d)?$APP.Hh:wo,l.appendChild(vo(e,g,m,h)),c=$APP.w(c),e=null,g=0),m=0;else break;a.__xStepperModel=b}},yo=function(a){function b(d){var e=$APP.k(a,"__xStepperModel");e=$APP.n(e)?e:to(a);$APP.n($APP.W.g(e))||(d=d.target.closest("[part\x3dstep-indicator]"),$APP.n(d)&&(d=parseInt(d.closest("[part\x3dstep]").getAttribute("data-index"),
12
- 10),e=$APP.Hh.g(e),typeof d==="number"&&$APP.r(isNaN(d))&&$APP.N(d,e)&&(e=$APP.ph(new $APP.R(null,2,[$APP.Ch,e,$APP.vl,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=ro(a);c=$APP.M(c);$APP.D(c,$APP.ij).addEventListener("click",b);$APP.ia(a,"__xStepperHandlers",{click:b})},zo=function(a){var b=$APP.k(a,"__xStepperHandlers");if($APP.n(b)){var c=$APP.k(a,"__xStepperRefs");
13
- $APP.n(c)&&(c=$APP.ij.g(c),b=$APP.k(b,"click"),$APP.n($APP.n(c)?b:c)&&c.removeEventListener("click",b))}a.__xStepperHandlers=null},Ao=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 po(this.getAttribute("current"))},set:function(b){return b==
14
- null?this.removeAttribute("current"):this.setAttribute("current",""+$APP.T.g(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"orientation",{get:function(){return jo(ho(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 oo(mo(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})},Co=function(){var a=class extends HTMLElement{};a.observedAttributes=Bo;a.prototype.connectedCallback=function(){ro(this);zo(this);yo(this);xo(this);return null};a.prototype.disconnectedCallback=function(){zo(this);
16
- return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&xo(this);return null};Ao(a.prototype);return a},Do=function(){$APP.n(customElements.get("x-stepper"))||customElements.define("x-stepper",Co());return null},Eo=new $APP.K(null,"vertical","vertical",718696748),wo=new $APP.K(null,"upcoming","upcoming",1873315471),so=new $APP.K(null,"steps-raw","steps-raw",1741812533),lo=new $APP.K(null,"md","md",707286655),Fo=new $APP.K(null,"lg","lg",-80787836),go=new $APP.K(null,"horizontal",
17
- "horizontal",2062109475),Go=new $APP.K(null,"sm","sm",-1402575065);var Bo=["steps","current","orientation","size","disabled"];$APP.Pd(["x-stepper-change",new $APP.R(null,2,[$APP.Cj,new $APP.R(null,2,[$APP.Ch,$APP.V,$APP.vl,$APP.V],null),$APP.Dl,!0],null)]);var fo=new $APP.R(null,2,["horizontal",go,"vertical",Eo],null),io=new $APP.R(null,2,[go,"horizontal",Eo,"vertical"],null),ko=new $APP.R(null,3,["sm",Go,"md",lo,"lg",Fo],null),no=new $APP.R(null,3,[Go,"sm",lo,"md",Fo,"lg"],null);$APP.fa("baredom.exports.x_stepper.init",Do);export const init=Do;
2
+ var Vo=function(a,b){return new $APP.rd(null,function(){if(a>0){var c=$APP.t(b);return c?$APP.od($APP.u(c),Vo(a-1,$APP.Zb(c))):null}return null},null)},Xo=function(a){a=$APP.D(Wo,typeof a==="string"?a.toLowerCase():null);return $APP.n(a)?a:$APP.ol},Zo=function(a){a=$APP.D(Yo,a);return $APP.n(a)?a:"horizontal"},bp=function(a){a=$APP.D($o,typeof a==="string"?a.toLowerCase():null);return $APP.n(a)?a:ap},dp=function(a){a=$APP.D(cp,a);return $APP.n(a)?a:"md"},ep=function(a){return typeof a==="string"?
3
+ (a=parseInt(a.trim(),10),typeof a==="number"&&$APP.r(isNaN(a))&&a>=0?a:0):0},fp=function(a){if(typeof a==="string"){var b=a.trim();if($APP.n($APP.eg(/^\d+$/,b)))return a=parseInt(b,10),a>0&&a<=200?$APP.ge(function(g){return new $APP.Q(null,2,[$APP.U,"Step "+$APP.T.g(g),$APP.mk,null],null)},$APP.dg(1,a+1)):$APP.fe;if($APP.n(function(){var g=$APP.N("",b);return g?b.startsWith("["):g}()))try{var c=JSON.parse(b);if($APP.n(Array.isArray(c))){var d=$APP.uc(c),e=$APP.z(d)>200?Vo(200,d):d;return $APP.ge(function(g){return new $APP.Q(null,
4
+ 2,[$APP.U,function(){var h=$APP.k(g,"label");return typeof h==="string"?h:""}(),$APP.mk,function(){var h=$APP.k(g,"description");return typeof h==="string"?h:null}()],null)},e)}return $APP.fe}catch(g){return $APP.fe}else return $APP.fe}else return $APP.fe},gp=function(a){var b=$APP.k(a,"__xStepperRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div");c.textContent=":host{display:block;color-scheme:light dark;--x-stepper-indicator-size:2rem;--x-stepper-connector-thickness:2px;--x-stepper-step-gap:0.75rem;--x-stepper-font-size:var(--x-font-size-sm,0.875rem);--x-stepper-label-font-weight:500;--x-stepper-desc-font-size:0.75rem;--x-stepper-radius:var(--x-radius-full,999px);--x-stepper-motion:var(--x-transition-duration,120ms);--x-stepper-press-scale:0.93;--x-stepper-focus-ring:var(--x-color-focus-ring,rgba(0,0,0,0.55));--x-stepper-disabled-opacity:0.5;--x-stepper-complete-bg:var(--x-color-success,rgba(16,140,72,1));--x-stepper-complete-color:#fff;--x-stepper-complete-connector:var(--x-color-success,rgba(16,140,72,1));--x-stepper-current-bg:var(--x-color-primary,rgba(0,102,204,1));--x-stepper-current-color:#fff;--x-stepper-upcoming-bg:rgba(0,0,0,0.08);--x-stepper-upcoming-color:var(--x-color-text-muted,rgba(0,0,0,0.45));--x-stepper-idle-connector:var(--x-color-border,rgba(0,0,0,0.12));--x-stepper-label-done-color:var(--x-color-text,rgba(0,0,0,0.85));--x-stepper-label-current-color:var(--x-color-text,rgba(0,0,0,0.85));--x-stepper-label-upcoming-color:var(--x-color-text-muted,rgba(0,0,0,0.4));--x-stepper-desc-color:var(--x-color-text-muted,rgba(0,0,0,0.4));}@media (prefers-color-scheme:dark){:host{--x-stepper-focus-ring:var(--x-color-focus-ring,rgba(255,255,255,0.7));--x-stepper-complete-bg:var(--x-color-success,rgba(60,210,120,1));--x-stepper-complete-color:#000;--x-stepper-complete-connector:var(--x-color-success,rgba(60,210,120,1));--x-stepper-current-bg:var(--x-color-primary,rgba(80,160,255,1));--x-stepper-current-color:#000;--x-stepper-upcoming-bg:rgba(255,255,255,0.1);--x-stepper-upcoming-color:var(--x-color-text-muted,rgba(255,255,255,0.35));--x-stepper-idle-connector:var(--x-color-border,rgba(255,255,255,0.12));--x-stepper-label-done-color:var(--x-color-text,rgba(255,255,255,0.9));--x-stepper-label-current-color:var(--x-color-text,rgba(255,255,255,0.9));--x-stepper-label-upcoming-color:var(--x-color-text-muted,rgba(255,255,255,0.3));--x-stepper-desc-color:var(--x-color-text-muted,rgba(255,255,255,0.35));}}[part\x3dcontainer]{display:flex;align-items:flex-start;margin:0;padding:0;list-style:none;}:host([data-orientation\x3dhorizontal]) [part\x3dcontainer]{flex-direction:row;}:host([data-orientation\x3dhorizontal]) [part\x3dstep]{display:flex;flex-direction:column;align-items:center;flex:1;min-width:0;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-track]{display:flex;align-items:center;width:100%;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-connector]{flex:1;height:var(--x-stepper-connector-thickness);min-width:8px;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-content]{display:flex;flex-direction:column;align-items:center;text-align:center;padding:var(--x-stepper-step-gap) 4px 0;width:100%;}:host([data-orientation\x3dvertical]) [part\x3dcontainer]{flex-direction:column;}:host([data-orientation\x3dvertical]) [part\x3dstep]{display:flex;flex-direction:row;gap:var(--x-stepper-step-gap);}:host([data-orientation\x3dvertical]) [part\x3dstep-track]{display:flex;flex-direction:column;align-items:center;flex-shrink:0;width:var(--x-stepper-indicator-size);}:host([data-orientation\x3dvertical]) [part\x3dstep-connector]{flex:1;width:var(--x-stepper-connector-thickness);min-height:16px;margin:4px 0;}:host([data-orientation\x3dvertical]) [part\x3dstep-content]{display:flex;flex-direction:column;flex:1;min-width:0;padding-bottom:var(--x-stepper-step-gap);}[part\x3dstep-indicator]{display:inline-flex;align-items:center;justify-content:center;width:var(--x-stepper-indicator-size);height:var(--x-stepper-indicator-size);border-radius:var(--x-stepper-radius);border:none;padding:0;margin:0;cursor:pointer;font-size:0.875em;font-weight:600;font-family:inherit;flex-shrink:0;position:relative;z-index:1;transition:background var(--x-stepper-motion) ease,color var(--x-stepper-motion) ease,transform 80ms ease;}[part\x3dstep-indicator]:focus{outline:none;}[part\x3dstep-indicator]:focus-visible{outline:2px solid var(--x-stepper-focus-ring);outline-offset:3px;}[data-state\x3dcomplete] [part\x3dstep-indicator]{background:var(--x-stepper-complete-bg);color:var(--x-stepper-complete-color);}[data-state\x3dcurrent] [part\x3dstep-indicator]{background:var(--x-stepper-current-bg);color:var(--x-stepper-current-color);cursor:default;}[data-state\x3dupcoming] [part\x3dstep-indicator]{background:var(--x-stepper-upcoming-bg);color:var(--x-stepper-upcoming-color);}[data-state\x3dcomplete] [part\x3dstep-connector]{background:var(--x-stepper-complete-connector);}[data-state\x3dcurrent] [part\x3dstep-connector],[data-state\x3dupcoming] [part\x3dstep-connector]{background:var(--x-stepper-idle-connector);}[part\x3dstep]:last-child [part\x3dstep-connector]{display:none;}[part\x3dstep-label]{font-size:var(--x-stepper-font-size);line-height:1.3;font-family:inherit;}[data-state\x3dcomplete] [part\x3dstep-label]{color:var(--x-stepper-label-done-color);}[data-state\x3dcurrent] [part\x3dstep-label]{color:var(--x-stepper-label-current-color);font-weight:var(--x-stepper-label-font-weight);}[data-state\x3dupcoming] [part\x3dstep-label]{color:var(--x-stepper-label-upcoming-color);}[part\x3dstep-description]{font-size:var(--x-stepper-desc-font-size);color:var(--x-stepper-desc-color);line-height:1.3;margin-top:0.2em;}:host(:not([disabled])) [data-state\x3dcomplete] [part\x3dstep-indicator]:hover,:host(:not([disabled])) [data-state\x3dupcoming] [part\x3dstep-indicator]:hover{filter:brightness(0.88);}:host(:not([disabled])) [data-state\x3dcomplete] [part\x3dstep-indicator]:active,:host(:not([disabled])) [data-state\x3dupcoming] [part\x3dstep-indicator]:active{transform:scale(var(--x-stepper-press-scale));}:host([disabled]){opacity:var(--x-stepper-disabled-opacity);}:host([disabled]) [part\x3dstep-indicator]{cursor:default;pointer-events:none;}:host([data-size\x3dsm]){--x-stepper-indicator-size:1.5rem;--x-stepper-font-size:0.8125rem;--x-stepper-desc-font-size:0.6875rem;}:host([data-size\x3dlg]){--x-stepper-indicator-size:2.5rem;--x-stepper-font-size:1rem;--x-stepper-desc-font-size:0.875rem;}@media (prefers-reduced-motion:reduce){[part\x3dstep-indicator]{transition:none;}}";
5
+ d.setAttribute("part","container");d.setAttribute("role","list");b.appendChild(c);b.appendChild(d);a.__xStepperRefs=new $APP.Q(null,2,[$APP.yi,b,$APP.xj,d],null);return $APP.k(a,"__xStepperRefs")},ip=function(a){a=new $APP.Q(null,5,[hp,a.getAttribute("steps"),$APP.Bm,a.getAttribute("current"),$APP.Dl,a.getAttribute("orientation"),$APP.Cl,a.getAttribute("size"),$APP.X,a.hasAttribute("disabled")],null);var b=$APP.M(a),c=$APP.D(b,hp);a=$APP.D(b,$APP.Bm);var d=$APP.D(b,$APP.Dl),e=$APP.D(b,$APP.Cl);b=
6
+ $APP.D(b,$APP.X);c=fp(c);var g=$APP.z(c);return new $APP.Q(null,5,[$APP.km,c,$APP.Zh,g===0?0:$APP.nh.i(0,$APP.oh.i(ep(a),g-1)),$APP.Zk,Xo(d),$APP.Hh,bp(e),$APP.X,$APP.F(b)],null)},jp=function(a,b,c){return"Step "+$APP.T.g(a+1)+": "+$APP.T.g(b)+" ("+$APP.T.g(function(){var d=c instanceof $APP.K?c.pa:null;switch(d){case "complete":return"completed";case "current":return"current";case "upcoming":return"upcoming";default:throw Error("No matching clause: "+$APP.T.g(d));}}())+")"},kp=function(a,b,c,d){var e=
7
+ $APP.M(b);b=$APP.D(e,$APP.U);e=$APP.D(e,$APP.mk);var g=document.createElement("div"),h=document.createElement("div"),l=document.createElement("button"),m=document.createElement("span"),p=document.createElement("div"),q=document.createElement("div"),v=document.createElement("span"),x=document.createElement("span");a:{var y=c instanceof $APP.K?c.pa:null;switch(y){case "complete":y="complete";break a;case "current":y="current";break a;case "upcoming":y="upcoming";break a;default:throw Error("No matching clause: "+
8
+ $APP.T.g(y));}}b=$APP.n(b)?b:"";g.setAttribute("part","step");g.setAttribute("role","listitem");g.setAttribute("data-index",""+$APP.T.g(a));g.setAttribute("data-state",y);h.setAttribute("part","step-track");l.setAttribute("part","step-indicator");l.setAttribute("type","button");l.setAttribute("aria-label",jp(a,b,c));$APP.C.i(c,$APP.Zh)?l.setAttribute("aria-current","step"):l.removeAttribute("aria-current");l.setAttribute("tabindex",$APP.n(d)?"-1":"0");$APP.n(d)&&l.setAttribute("aria-disabled","true");
9
+ m.setAttribute("part","step-number");m.setAttribute("aria-hidden","true");m.textContent=$APP.C.i(c,$APP.tm)?"✓":""+$APP.T.g(a+1);p.setAttribute("part","step-connector");p.setAttribute("aria-hidden","true");q.setAttribute("part","step-content");v.setAttribute("part","step-label");v.textContent=b;x.setAttribute("part","step-description");$APP.n($APP.n(e)?$APP.N(e,""):e)?(x.textContent=e,x.style.display="block"):x.style.display="none";l.appendChild(m);h.appendChild(l);h.appendChild(p);q.appendChild(v);
10
+ q.appendChild(x);g.appendChild(h);g.appendChild(q);return g},mp=function(a){var b=ip(a);if($APP.N($APP.k(a,"__xStepperModel"),b)){b=$APP.M(b);var c=$APP.D(b,$APP.km),d=$APP.D(b,$APP.Zh),e=$APP.D(b,$APP.Zk),g=$APP.D(b,$APP.Hh),h=$APP.D(b,$APP.X),l=gp(a);l=$APP.M(l);l=$APP.D(l,$APP.xj);a.setAttribute("data-orientation",Zo(e));a.setAttribute("data-size",dp(g));l.innerHTML="";c=$APP.t($APP.Xd($APP.th,c));e=null;for(var m=g=0;;)if(m<g){var p=e.F(null,m),q=$APP.Ac(p,0,null);p=$APP.Ac(p,1,null);var v=q<
11
+ d?$APP.tm:$APP.C.i(q,d)?$APP.Zh:lp;l.appendChild(kp(q,p,v,h));m+=1}else if(c=$APP.t(c))$APP.Nc(c)?(g=$APP.yb(c),c=$APP.zb(c),e=g,g=$APP.z(g)):(g=$APP.u(c),e=$APP.Ac(g,0,null),g=$APP.Ac(g,1,null),m=e<d?$APP.tm:$APP.C.i(e,d)?$APP.Zh:lp,l.appendChild(kp(e,g,m,h)),c=$APP.w(c),e=null,g=0),m=0;else break;a.__xStepperModel=b}},np=function(a){function b(d){var e=$APP.k(a,"__xStepperModel");e=$APP.n(e)?e:ip(a);$APP.n($APP.X.g(e))||(d=d.target.closest("[part\x3dstep-indicator]"),$APP.n(d)&&(d=parseInt(d.closest("[part\x3dstep]").getAttribute("data-index"),
12
+ 10),e=$APP.Zh.g(e),typeof d==="number"&&$APP.r(isNaN(d))&&$APP.N(d,e)&&(e=$APP.Dh(new $APP.Q(null,2,[$APP.Uh,e,$APP.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.T.g(d)))));return null}var c=gp(a);c=$APP.M(c);$APP.D(c,$APP.xj).addEventListener("click",b);$APP.ja(a,"__xStepperHandlers",{click:b})},op=function(a){var b=$APP.k(a,"__xStepperHandlers");if($APP.n(b)){var c=$APP.k(a,"__xStepperRefs");
13
+ $APP.n(c)&&(c=$APP.xj.g(c),b=$APP.k(b,"click"),$APP.n($APP.n(c)?b:c)&&c.removeEventListener("click",b))}a.__xStepperHandlers=null},pp=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 ep(this.getAttribute("current"))},set:function(b){return b==
14
+ null?this.removeAttribute("current"):this.setAttribute("current",""+$APP.T.g(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"orientation",{get:function(){return Zo(Xo(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 dp(bp(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})},rp=function(){var a=class extends HTMLElement{};a.observedAttributes=qp;a.prototype.connectedCallback=function(){gp(this);op(this);np(this);mp(this);return null};a.prototype.disconnectedCallback=function(){op(this);
16
+ return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&mp(this);return null};pp(a.prototype);return a},sp=function(){$APP.n(customElements.get("x-stepper"))||customElements.define("x-stepper",rp());return null},lp=new $APP.K(null,"upcoming","upcoming",1873315471),hp=new $APP.K(null,"steps-raw","steps-raw",1741812533),ap=new $APP.K(null,"md","md",707286655),tp=new $APP.K(null,"lg","lg",-80787836),up=new $APP.K(null,"sm","sm",-1402575065);var qp=["steps","current","orientation","size","disabled"];$APP.Qd(["x-stepper-change",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,2,[$APP.Uh,$APP.W,$APP.Jl,$APP.W],null),$APP.Rl,!0],null)]);var Wo=new $APP.Q(null,2,["horizontal",$APP.ol,"vertical",$APP.pj],null),Yo=new $APP.Q(null,2,[$APP.ol,"horizontal",$APP.pj,"vertical"],null),$o=new $APP.Q(null,3,["sm",up,"md",ap,"lg",tp],null),cp=new $APP.Q(null,3,[up,"sm",ap,"md",tp,"lg"],null);$APP.ha("baredom.exports.x_stepper.init",sp);export const init=sp;
package/dist/x-switch.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var LQ=function(a,b,c){return a.setAttribute(b,c)},MQ=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},NQ=function(a){a=$APP.xf([$APP.Uk,$APP.gl,$APP.uh,$APP.Gh,$APP.Ui,$APP.mj,$APP.Wl,$APP.vj,$APP.dj],[a.getAttribute("name"),a.hasAttribute("disabled"),a.hasAttribute("required"),a.getAttribute("aria-labelledby"),a.hasAttribute("checked"),a.hasAttribute("readonly"),a.getAttribute("value"),a.getAttribute("aria-label"),a.getAttribute("aria-describedby")]);var b=$APP.M(a);a=
3
- $APP.D(b,$APP.vj);var c=$APP.D(b,$APP.dj),d=$APP.D(b,$APP.Uk),e=$APP.D(b,$APP.gl),g=$APP.D(b,$APP.uh),h=$APP.D(b,$APP.Gh),l=$APP.D(b,$APP.Ui),m=$APP.D(b,$APP.mj);b=$APP.D(b,$APP.Wl);l=$APP.F(l);g=$APP.F(g);return $APP.xf([$APP.Vh,$APP.Ph,$APP.um,$APP.fj,$APP.Ah,$APP.bj,$APP.Bi,$APP.Hj,$APP.qm,$APP.il,$APP.W],[g,l?"true":"false",$APP.F(m),l,$APP.n(g)?l:!0,d,b!=null?b:"on",h,c,a,$APP.F(e)])},OQ=function(a){var b=$APP.k(a,"__xSwitchRefs");if($APP.n(b)){var c=$APP.k(b,"control");b=NQ(a);var d=$APP.W.g(b),
4
- e=$APP.fj.g(b);LQ(c,"aria-checked",$APP.Ph.g(b));c.setAttribute("aria-disabled",$APP.n(d)?"true":"false");LQ(c,"aria-required",$APP.n($APP.Vh.g(b))?"true":"false");LQ(c,"aria-readonly",$APP.n($APP.um.g(b))?"true":"false");var g=$APP.il.g(b);$APP.n(g)?c.setAttribute("aria-label",g):c.removeAttribute("aria-label");g=$APP.Hj.g(b);$APP.n(g)?c.setAttribute("aria-labelledby",g):c.removeAttribute("aria-labelledby");g=$APP.qm.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");MQ(a,"data-checked",e);MQ(a,"data-disabled",d);a=$APP.k(a,"__xSwitchInternals");return $APP.n(a)?a.setFormValue($APP.n(e)?$APP.Bi.g(b):null):null}return null},PQ=function(a){var b=NQ(a),c=$APP.W.g(b),d=$APP.um.g(b);if($APP.n($APP.n(c)?c:d))return null;d=$APP.fj.g(b);c=$APP.r(d);b=$APP.Bi.g(b);d=new CustomEvent("x-switch-change-request",{detail:{value:b,previousChecked:d,nextChecked:c},bubbles:!0,composed:!0,
6
- cancelable:!0});a.dispatchEvent(d);return $APP.r(d.defaultPrevented)?(MQ(a,"checked",c),OQ(a),a.dispatchEvent(new CustomEvent("x-switch-change",{detail:{value:b,checked:c},bubbles:!0,composed:!0,cancelable:!1}))):null},QQ=function(a){return function(){return PQ(a)}},RQ=function(a){return function(b){var c=b.key;return $APP.C.i(c," ")||$APP.C.i(c,"Enter")?(b.preventDefault(),PQ(a)):null}},SQ=function(a){var b=$APP.k(a,"__xSwitchRefs");if($APP.n(b)){var c=$APP.k(a,"__xSwitchHandlers");if($APP.n(c)){b=
7
- $APP.k(b,"control");b.removeEventListener("click",$APP.k(c,"click"));b.removeEventListener("keydown",$APP.k(c,"keydown"));a.__xSwitchHandlers=null;return}}return null},TQ=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return MQ(this,c,$APP.F(d))}})},UQ=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)?LQ(this,c,""+$APP.T.g(d)):this.removeAttribute(c)}})},WQ=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;Object.defineProperty(a,"observedAttributes",{get:function(){return VQ}});TQ(b,"checked","checked");TQ(b,"disabled","disabled");TQ(b,"readOnly","readonly");TQ(b,"required","required");UQ(b,"name","name");UQ(b,"value","value");b.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xSwitchRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),
2
+ var cS=function(a,b,c){return a.setAttribute(b,c)},dS=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},eS=function(a){a=$APP.zf([$APP.gl,$APP.ul,$APP.Ih,$APP.Yh,$APP.ij,$APP.Bj,$APP.jm,$APP.Nj,$APP.sj],[a.getAttribute("name"),a.hasAttribute("disabled"),a.hasAttribute("required"),a.getAttribute("aria-labelledby"),a.hasAttribute("checked"),a.hasAttribute("readonly"),a.getAttribute("value"),a.getAttribute("aria-label"),a.getAttribute("aria-describedby")]);var b=$APP.M(a);a=
3
+ $APP.D(b,$APP.Nj);var c=$APP.D(b,$APP.sj),d=$APP.D(b,$APP.gl),e=$APP.D(b,$APP.ul),g=$APP.D(b,$APP.Ih),h=$APP.D(b,$APP.Yh),l=$APP.D(b,$APP.ij),m=$APP.D(b,$APP.Bj);b=$APP.D(b,$APP.jm);l=$APP.F(l);g=$APP.F(g);return $APP.zf([$APP.hi,$APP.bi,$APP.Im,$APP.uj,$APP.Oh,$APP.qj,$APP.Pi,$APP.Uj,$APP.Em,$APP.wl,$APP.X],[g,l?"true":"false",$APP.F(m),l,$APP.n(g)?l:!0,d,b!=null?b:"on",h,c,a,$APP.F(e)])},fS=function(a){var b=$APP.k(a,"__xSwitchRefs");if($APP.n(b)){var c=$APP.k(b,"control");b=eS(a);var d=$APP.X.g(b),
4
+ e=$APP.uj.g(b);cS(c,"aria-checked",$APP.bi.g(b));c.setAttribute("aria-disabled",$APP.n(d)?"true":"false");cS(c,"aria-required",$APP.n($APP.hi.g(b))?"true":"false");cS(c,"aria-readonly",$APP.n($APP.Im.g(b))?"true":"false");var g=$APP.wl.g(b);$APP.n(g)?c.setAttribute("aria-label",g):c.removeAttribute("aria-label");g=$APP.Uj.g(b);$APP.n(g)?c.setAttribute("aria-labelledby",g):c.removeAttribute("aria-labelledby");g=$APP.Em.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");dS(a,"data-checked",e);dS(a,"data-disabled",d);a=$APP.k(a,"__xSwitchInternals");return $APP.n(a)?a.setFormValue($APP.n(e)?$APP.Pi.g(b):null):null}return null},gS=function(a){var b=eS(a),c=$APP.X.g(b),d=$APP.Im.g(b);if($APP.n($APP.n(c)?c:d))return null;d=$APP.uj.g(b);c=$APP.r(d);b=$APP.Pi.g(b);d=new CustomEvent("x-switch-change-request",{detail:{value:b,previousChecked:d,nextChecked:c},bubbles:!0,composed:!0,
6
+ cancelable:!0});a.dispatchEvent(d);return $APP.r(d.defaultPrevented)?(dS(a,"checked",c),fS(a),a.dispatchEvent(new CustomEvent("x-switch-change",{detail:{value:b,checked:c},bubbles:!0,composed:!0,cancelable:!1}))):null},hS=function(a){return function(){return gS(a)}},iS=function(a){return function(b){var c=b.key;return $APP.C.i(c," ")||$APP.C.i(c,"Enter")?(b.preventDefault(),gS(a)):null}},jS=function(a){var b=$APP.k(a,"__xSwitchRefs");if($APP.n(b)){var c=$APP.k(a,"__xSwitchHandlers");if($APP.n(c)){b=
7
+ $APP.k(b,"control");b.removeEventListener("click",$APP.k(c,"click"));b.removeEventListener("keydown",$APP.k(c,"keydown"));a.__xSwitchHandlers=null;return}}return null},kS=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return dS(this,c,$APP.F(d))}})},lS=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)?cS(this,c,""+$APP.T.g(d)):this.removeAttribute(c)}})},nS=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;Object.defineProperty(a,"observedAttributes",{get:function(){return mS}});kS(b,"checked","checked");kS(b,"disabled","disabled");kS(b,"readOnly","readonly");kS(b,"required","required");lS(b,"name","name");lS(b,"value","value");b.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xSwitchRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),
9
9
  e=document.createElement("button"),g=document.createElement("span"),h=document.createElement("span");d.textContent=":host{display:inline-block;vertical-align:middle;color-scheme:light dark;--x-switch-track-width:44px;--x-switch-track-height:24px;--x-switch-thumb-size:18px;--x-switch-thumb-offset:3px;--x-switch-track-radius:var(--x-radius-full,999px);--x-switch-track-bg:var(--x-color-border,#d1d5db);--x-switch-track-bg-checked:var(--x-color-primary,#2563eb);--x-switch-thumb-bg:var(--x-color-bg,#ffffff);--x-switch-focus-ring:var(--x-color-focus-ring,#60a5fa);--x-switch-disabled-opacity:0.45;--x-switch-transition:background var(--x-transition-duration,150ms) var(--x-transition-easing,ease),transform var(--x-transition-duration,150ms) var(--x-transition-easing,ease);}@media (prefers-color-scheme:dark){:host{--x-switch-track-bg:var(--x-color-border,#4b5563);--x-switch-track-bg-checked:var(--x-color-primary,#3b82f6);--x-switch-thumb-bg:var(--x-color-bg,#f9fafb);--x-switch-focus-ring:var(--x-color-focus-ring,#93c5fd);}}[part\x3dcontrol]{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;padding:0;cursor:pointer;}[part\x3dcontrol][disabled]{cursor:default;opacity:var(--x-switch-disabled-opacity);}[part\x3dcontrol]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--x-switch-focus-ring);border-radius:calc(var(--x-switch-track-radius) + 2px);}[part\x3dtrack]{position:relative;display:inline-block;width:var(--x-switch-track-width);height:var(--x-switch-track-height);border-radius:var(--x-switch-track-radius);background:var(--x-switch-track-bg);transition:background 150ms ease;flex-shrink:0;}:host([data-checked]) [part\x3dtrack]{background:var(--x-switch-track-bg-checked);}[part\x3dthumb]{position:absolute;top:var(--x-switch-thumb-offset);left:var(--x-switch-thumb-offset);width:var(--x-switch-thumb-size);height:var(--x-switch-thumb-size);border-radius:50%;background:var(--x-switch-thumb-bg);box-shadow:0 1px 3px rgba(0,0,0,0.25);transition:transform 150ms ease;}:host([data-checked]) [part\x3dthumb]{transform:translateX(calc(var(--x-switch-track-width) - var(--x-switch-thumb-size) - calc(var(--x-switch-thumb-offset) * 2)));}@media (prefers-reduced-motion:reduce){[part\x3dtrack]{transition:none;}[part\x3dthumb]{transition:none;}}";
10
- e.setAttribute("part","control");e.setAttribute("type","button");e.setAttribute("role","switch");g.setAttribute("part","track");h.setAttribute("part","thumb");g.appendChild(h);e.appendChild(g);c.appendChild(d);c.appendChild(e);this.__xSwitchRefs={root:c,control:e,track:g,thumb:h};$APP.n(this.attachInternals)&&(this.__xSwitchInternals=this.attachInternals())}SQ(this);c=$APP.k(this,"__xSwitchRefs");$APP.n(c)&&(c=$APP.k(c,"control"),d=QQ(this),e=RQ(this),g={click:d,keydown:e},c.addEventListener("click",
11
- d),c.addEventListener("keydown",e),this.__xSwitchHandlers=g);d=this.getAttribute("id");$APP.n(d)&&(c=document.querySelector("label[for\x3d'"+$APP.T.g(d)+"']"),$APP.n(c)&&(e=c.getAttribute("id"),$APP.n(e)?c=e:(d="x-sw-lbl-"+$APP.T.g(d),c.setAttribute("id",d),c=d),d=$APP.k(this,"__xSwitchRefs"),$APP.n(d)&&$APP.k(d,"control").setAttribute("aria-labelledby",c)));return OQ(this)};b.disconnectedCallback=function(){return SQ(this)};b.attributeChangedCallback=function(){return OQ(this)};b.formDisabledCallback=
12
- function(c){MQ(this,"disabled",$APP.F(c));return OQ(this)};b.formResetCallback=function(){this.removeAttribute("checked");return OQ(this)};return a},XQ=function(){return $APP.n(customElements.get("x-switch"))?null:customElements.define("x-switch",WQ())};var VQ="checked disabled readonly required name value aria-label aria-describedby aria-labelledby".split(" ");$APP.Pd(["x-switch-change-request",new $APP.R(null,2,[$APP.Dl,!0,$APP.Cj,new $APP.R(null,3,[$APP.Bi,$APP.X,$APP.Vj,$APP.Fj,$APP.nl,$APP.Fj],null)],null),"x-switch-change",new $APP.R(null,2,[$APP.Dl,!1,$APP.Cj,new $APP.R(null,2,[$APP.Bi,$APP.X,$APP.im,$APP.Fj],null)],null)]);$APP.fa("baredom.exports.x_switch.init",XQ);export const init=XQ;
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())}jS(this);c=$APP.k(this,"__xSwitchRefs");$APP.n(c)&&(c=$APP.k(c,"control"),d=hS(this),e=iS(this),g={click:d,keydown:e},c.addEventListener("click",
11
+ d),c.addEventListener("keydown",e),this.__xSwitchHandlers=g);d=this.getAttribute("id");$APP.n(d)&&(c=document.querySelector("label[for\x3d'"+$APP.T.g(d)+"']"),$APP.n(c)&&(e=c.getAttribute("id"),$APP.n(e)?c=e:(d="x-sw-lbl-"+$APP.T.g(d),c.setAttribute("id",d),c=d),d=$APP.k(this,"__xSwitchRefs"),$APP.n(d)&&$APP.k(d,"control").setAttribute("aria-labelledby",c)));return fS(this)};b.disconnectedCallback=function(){return jS(this)};b.attributeChangedCallback=function(){return fS(this)};b.formDisabledCallback=
12
+ function(c){dS(this,"disabled",$APP.F(c));return fS(this)};b.formResetCallback=function(){this.removeAttribute("checked");return fS(this)};return a},oS=function(){return $APP.n(customElements.get("x-switch"))?null:customElements.define("x-switch",nS())};var mS="checked disabled readonly required name value aria-label aria-describedby aria-labelledby".split(" ");$APP.Qd(["x-switch-change-request",new $APP.Q(null,2,[$APP.Rl,!0,$APP.V,new $APP.Q(null,3,[$APP.Pi,$APP.Y,$APP.jk,$APP.Sj,$APP.Bl,$APP.Sj],null)],null),"x-switch-change",new $APP.Q(null,2,[$APP.Rl,!1,$APP.V,new $APP.Q(null,2,[$APP.Pi,$APP.Y,$APP.wm,$APP.Sj],null)],null)]);$APP.ha("baredom.exports.x_switch.init",oS);export const init=oS;
package/dist/x-tab.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var Dm=function(a,b,c){return $APP.J(b,a)?a:c},Im=function(a){var b=$APP.M(a),c=$APP.D(b,$APP.Pj),d=$APP.D(b,$APP.qj);a=$APP.D(b,$APP.Mk);var e=$APP.D(b,$APP.th),g=$APP.D(b,$APP.Oh),h=$APP.D(b,$APP.U);b=$APP.D(b,Em);c=$APP.F(c);var l=(d=$APP.F(d))?"-1":c?"0":"-1";return new $APP.R(null,8,[$APP.Pj,c,$APP.qj,d,$APP.Mk,Dm(a,Fm,"horizontal"),$APP.th,Dm(e,Gm,"md"),$APP.Oh,Dm(g,Hm,"default"),$APP.U,h,Em,b,$APP.nk,l],null)},Jm=function(a){return new $APP.R(null,8,[$APP.Bi,a.getAttribute("value"),$APP.Pj,
3
- a.hasAttribute("selected"),$APP.qj,a.hasAttribute("disabled"),$APP.Mk,a.getAttribute("orientation"),$APP.th,a.getAttribute("size"),$APP.Oh,a.getAttribute("variant"),$APP.U,a.getAttribute("label"),Em,a.getAttribute("controls")],null)},Km=function(a){var b=Im(Jm(a)),c=$APP.k(a,"__x_tab_base");if($APP.n(c)){a.setAttribute("role","tab");a.setAttribute("aria-selected",$APP.n($APP.Pj.g(b))?"true":"false");$APP.n($APP.qj.g(b))?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled");a.setAttribute("tabindex",
4
- $APP.nk.g(b));var d=Em.g(b),e=$APP.U.g(b);$APP.n($APP.n(d)?$APP.N(d,""):d)?a.setAttribute("aria-controls",d):a.removeAttribute("aria-controls");$APP.n($APP.n(e)?$APP.N(e,""):e)?a.setAttribute("aria-label",e):a.removeAttribute("aria-label");c.setAttribute("data-selected",$APP.n($APP.Pj.g(b))?"true":"false");c.setAttribute("data-disabled",$APP.n($APP.qj.g(b))?"true":"false");c.setAttribute("data-size",$APP.th.g(b));c.setAttribute("data-variant",$APP.Oh.g(b));return c.setAttribute("data-orientation",
5
- $APP.Mk.g(b))}return null},Lm=function(a){var b=Im(Jm(a)),c=$APP.M(b);b=$APP.D(c,$APP.Pj);c=$APP.D(c,$APP.qj);$APP.r(c)&&$APP.r(b)?(b=a.getAttribute("value"),a=a.dispatchEvent(new CustomEvent("tab-select",{detail:{value:$APP.n(b)?b:""},bubbles:!0,composed:!0}))):a=null;return a},Mm=function(a){a.addEventListener("click",function(){return Lm(a)});a.addEventListener("keydown",function(b){var c=b.key;$APP.C.i(c,"Enter")||$APP.C.i(c," ")?(b.preventDefault(),b=Lm(a)):b=null;return b})},Nm=function(a){if(!$APP.Bg(a,
2
+ var Rm=function(a,b,c){return $APP.I(b,a)?a:c},Wm=function(a){var b=$APP.M(a),c=$APP.D(b,$APP.dk),d=$APP.D(b,$APP.Fj);a=$APP.D(b,$APP.Zk);var e=$APP.D(b,$APP.Hh),g=$APP.D(b,$APP.Qg),h=$APP.D(b,$APP.U);b=$APP.D(b,Sm);c=$APP.F(c);var l=(d=$APP.F(d))?"-1":c?"0":"-1";return new $APP.Q(null,8,[$APP.dk,c,$APP.Fj,d,$APP.Zk,Rm(a,Tm,"horizontal"),$APP.Hh,Rm(e,Um,"md"),$APP.Qg,Rm(g,Vm,"default"),$APP.U,h,Sm,b,$APP.Ak,l],null)},Xm=function(a){return new $APP.Q(null,8,[$APP.Pi,a.getAttribute("value"),$APP.dk,
3
+ a.hasAttribute("selected"),$APP.Fj,a.hasAttribute("disabled"),$APP.Zk,a.getAttribute("orientation"),$APP.Hh,a.getAttribute("size"),$APP.Qg,a.getAttribute("variant"),$APP.U,a.getAttribute("label"),Sm,a.getAttribute("controls")],null)},Ym=function(a){var b=Wm(Xm(a)),c=$APP.k(a,"__x_tab_base");if($APP.n(c)){a.setAttribute("role","tab");a.setAttribute("aria-selected",$APP.n($APP.dk.g(b))?"true":"false");$APP.n($APP.Fj.g(b))?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled");a.setAttribute("tabindex",
4
+ $APP.Ak.g(b));var d=Sm.g(b),e=$APP.U.g(b);$APP.n($APP.n(d)?$APP.N(d,""):d)?a.setAttribute("aria-controls",d):a.removeAttribute("aria-controls");$APP.n($APP.n(e)?$APP.N(e,""):e)?a.setAttribute("aria-label",e):a.removeAttribute("aria-label");c.setAttribute("data-selected",$APP.n($APP.dk.g(b))?"true":"false");c.setAttribute("data-disabled",$APP.n($APP.Fj.g(b))?"true":"false");c.setAttribute("data-size",$APP.Hh.g(b));c.setAttribute("data-variant",$APP.Qg.g(b));return c.setAttribute("data-orientation",
5
+ $APP.Zk.g(b))}return null},Zm=function(a){var b=Wm(Xm(a)),c=$APP.M(b);b=$APP.D(c,$APP.dk);c=$APP.D(c,$APP.Fj);$APP.r(c)&&$APP.r(b)?(b=a.getAttribute("value"),a=a.dispatchEvent(new CustomEvent("tab-select",{detail:{value:$APP.n(b)?b:""},bubbles:!0,composed:!0}))):a=null;return a},$m=function(a){a.addEventListener("click",function(){return Zm(a)});a.addEventListener("keydown",function(b){var c=b.key;$APP.C.i(c,"Enter")||$APP.C.i(c," ")?(b.preventDefault(),b=Zm(a)):b=null;return b})},an=function(a){if(!$APP.Dg(a,
6
6
  "__x_tab_initialized")){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");c.textContent=":host{display:inline-block;color-scheme:light dark;outline:none;--x-tab-color:var(--x-color-text,#0f172a);--x-tab-hover-background:rgba(15,23,42,0.05);--x-tab-selected-color:var(--x-color-primary-hover,#1d4ed8);--x-tab-selected-background:rgba(59,130,246,0.12);--x-tab-selected-border-color:transparent;}@media (prefers-color-scheme:dark){:host{--x-tab-color:var(--x-color-text-muted,#94a3b8);--x-tab-hover-background:rgba(248,250,252,0.06);--x-tab-selected-color:var(--x-color-focus-ring,#60a5fa);--x-tab-selected-background:rgba(59,130,246,0.18);--x-tab-selected-border-color:var(--x-color-focus-ring,#60a5fa);}}.base{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;user-select:none;padding:var(--x-tab-padding-md,10px 16px);border-radius:var(--x-tab-radius,8px);color:var(--x-tab-color);background:var(--x-tab-background,transparent);border:1px solid var(--x-tab-border-color,transparent);transition:background var(--x-tab-transition-duration,120ms) var(--x-tab-transition-timing,ease),color var(--x-tab-transition-duration,120ms) var(--x-tab-transition-timing,ease),border-color var(--x-tab-transition-duration,120ms) var(--x-tab-transition-timing,ease);}.base[data-size\x3d'sm']{padding:var(--x-tab-padding-sm,6px 12px);}.base[data-size\x3d'md']{padding:var(--x-tab-padding-md,10px 16px);}.base[data-size\x3d'lg']{padding:var(--x-tab-padding-lg,14px 20px);}.base:hover{background:var(--x-tab-hover-background);}.base[data-selected\x3d'true']{color:var(--x-tab-selected-color);background:var(--x-tab-selected-background);border-color:var(--x-tab-selected-border-color);}.base[data-variant\x3d'underline'][data-selected\x3d'true']{border-bottom:2px solid var(--x-tab-selected-color);background:transparent;}.base[data-variant\x3d'pill'][data-selected\x3d'true']{background:var(--x-tab-selected-background);}.base[data-disabled\x3d'true']{opacity:var(--x-tab-disabled-opacity,0.5);cursor:default;}:host(:focus-visible) .base{box-shadow:0 0 0 3px var(--x-tab-focus-ring,rgba(59,130,246,0.4));}@media (prefers-reduced-motion: reduce){.base{transition:none;}}";
7
- d.setAttribute("part","base");d.className="base";d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__x_tab_root=b;a.__x_tab_base=d;Mm(a);a.__x_tab_initialized=!0}Km(a);return a},Om=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})},Qm=function(){var a=class extends HTMLElement{};a.observedAttributes=Pm;a.prototype.connectedCallback=function(){return Nm(this)};a.prototype.attributeChangedCallback=
9
- function(){return $APP.Bg(this,"__x_tab_initialized")?Km(this):Nm(this)};Om(a);return a},Rm=function(){return $APP.n(customElements.get("x-tab"))?null:customElements.define("x-tab",Qm())},Em=new $APP.K(null,"controls","controls",1340701452);var Pm="value selected disabled orientation size variant label controls".split(" "),Fm=new $APP.S(null,new $APP.R(null,2,["vertical",null,"horizontal",null],null),null),Gm=new $APP.S(null,new $APP.R(null,3,["md",null,"lg",null,"sm",null],null),null),Hm=new $APP.S(null,new $APP.R(null,3,["default",null,"underline",null,"pill",null],null),null);$APP.Pd(["tab-select",new $APP.R(null,1,[$APP.Cj,new $APP.R(null,1,[$APP.Bi,$APP.X],null)],null)]);$APP.fa("baredom.exports.x_tab.init",Rm);export const init=Rm;
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;$m(a);a.__x_tab_initialized=!0}Ym(a);return a},bn=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})},dn=function(){var a=class extends HTMLElement{};a.observedAttributes=cn;a.prototype.connectedCallback=function(){return an(this)};a.prototype.attributeChangedCallback=
9
+ function(){return $APP.Dg(this,"__x_tab_initialized")?Ym(this):an(this)};bn(a);return a},en=function(){return $APP.n(customElements.get("x-tab"))?null:customElements.define("x-tab",dn())},Sm=new $APP.K(null,"controls","controls",1340701452);var cn="value selected disabled orientation size variant label controls".split(" "),Tm=new $APP.S(null,new $APP.Q(null,2,["vertical",null,"horizontal",null],null),null),Um=new $APP.S(null,new $APP.Q(null,3,["md",null,"lg",null,"sm",null],null),null),Vm=new $APP.S(null,new $APP.Q(null,3,["default",null,"underline",null,"pill",null],null),null);$APP.Qd(["tab-select",new $APP.Q(null,1,[$APP.V,new $APP.Q(null,1,[$APP.Pi,$APP.Y],null)],null)]);$APP.ha("baredom.exports.x_tab.init",en);export const init=en;
@@ -1,25 +1,25 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var PM=function(a,b,c){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.J(b,a)?a:c},QM=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),$APP.r(isNaN(a))&&a>0?Math.floor(a):1):1},TM=function(a){var b=$APP.M(a);a=$APP.D(b,RM);b=$APP.D(b,SM);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},UM=function(a){var b=$APP.M(a);a=$APP.D(b,$APP.Y);b=$APP.D(b,RM);return(a=$APP.C.i(a,
3
- "header"))?b:a},VM=function(a){switch(a){case "none":return"asc";case "asc":return"desc";case "desc":return"none";default:return"asc"}},WM=function(a){switch(a){case "none":return"Sort ascending";case "asc":return"Sort descending";case "desc":return"Remove sort";default:return"Sort ascending"}},$M=function(a){var b=$APP.k(a,"__xTableCellRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("span"),
2
+ var mO=function(a,b,c){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.I(b,a)?a:c},nO=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),$APP.r(isNaN(a))&&a>0?Math.floor(a):1):1},qO=function(a){var b=$APP.M(a);a=$APP.D(b,oO);b=$APP.D(b,pO);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},rO=function(a){var b=$APP.M(a);a=$APP.D(b,$APP.Z);b=$APP.D(b,oO);return(a=$APP.C.i(a,
3
+ "header"))?b:a},sO=function(a){switch(a){case "none":return"asc";case "asc":return"desc";case "desc":return"none";default:return"asc"}},tO=function(a){switch(a){case "none":return"Sort ascending";case "asc":return"Sort descending";case "desc":return"Remove sort";default:return"Sort ascending"}},xO=function(a){var b=$APP.k(a,"__xTableCellRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("span"),
4
4
  g=document.createElement("slot"),h=document.createElement("button"),l=document.createElement("slot"),m=document.createElement("span");c.textContent=":host{display:block;box-sizing:border-box;color-scheme:light dark;--x-table-cell-padding:0.5rem 0.75rem;--x-table-cell-bg:transparent;--x-table-cell-header-bg:rgba(0,0,0,0.04);--x-table-cell-border-color:var(--x-color-border,rgba(0,0,0,0.1));--x-table-cell-border-width:1px;--x-table-cell-color:var(--x-color-text,inherit);--x-table-cell-header-color:var(--x-color-text,inherit);--x-table-cell-font-size:inherit;--x-table-cell-header-font-weight:600;--x-table-cell-min-width:0;--x-table-cell-max-width:none;--x-table-cell-sort-color:var(--x-color-text-muted,rgba(0,0,0,0.4));--x-table-cell-sort-hover-color:var(--x-color-text,rgba(0,0,0,0.7));--x-table-cell-focus-ring:var(--x-color-focus-ring,rgba(59,130,246,0.5));--x-table-cell-transition-duration:var(--x-transition-duration,150ms);--x-table-cell-sticky-bg:var(--x-color-bg,#ffffff);--x-table-cell-disabled-opacity:0.45;min-width:var(--x-table-cell-min-width);max-width:var(--x-table-cell-max-width);}@media (prefers-color-scheme:dark){:host{--x-table-cell-header-bg:rgba(255,255,255,0.06);--x-table-cell-border-color:var(--x-color-border,rgba(255,255,255,0.1));--x-table-cell-sort-color:var(--x-color-text-muted,rgba(255,255,255,0.4));--x-table-cell-sort-hover-color:var(--x-color-text,rgba(255,255,255,0.7));--x-table-cell-sticky-bg:var(--x-color-bg,#1f2937);}}:host([data-sticky\x3d'start']){position:sticky;inset-inline-start:0;background:var(--x-table-cell-sticky-bg);z-index:1;}:host([data-sticky\x3d'end']){position:sticky;inset-inline-end:0;background:var(--x-table-cell-sticky-bg);z-index:1;}:host([disabled]){opacity:var(--x-table-cell-disabled-opacity);}[part\x3dcell]{display:flex;align-items:center;justify-content:flex-start;padding:var(--x-table-cell-padding);background:var(--x-table-cell-bg);border-bottom:var(--x-table-cell-border-width) solid var(--x-table-cell-border-color);color:var(--x-table-cell-color);font-size:var(--x-table-cell-font-size);min-width:0;height:100%;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");l.setAttribute("name","sort-icon");m.setAttribute("part","sort-icon-default");m.setAttribute("aria-hidden","true");m.innerHTML='\x3csvg width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"currentColor" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M8 3L5 7h6L8 3zm0 10l3-4H5l3 4z"/\x3e\x3c/svg\x3e';l.appendChild(m);h.appendChild(l);d.appendChild(e);d.appendChild(h);
6
- b.appendChild(c);b.appendChild(d);a.__xTableCellRefs=new $APP.R(null,5,[$APP.li,b,XM,d,$APP.ei,e,YM,h,ZM,m],null);return $APP.k(a,"__xTableCellRefs")},oN=function(a){a=$APP.xf([$APP.Ai,aN,bN,cN,RM,$APP.pi,$APP.di,dN,eN,$APP.W,fN],[a.getAttribute("align"),a.getAttribute("row-span"),a.getAttribute("valign"),a.getAttribute("sort-direction"),a.hasAttribute("sortable"),a.hasAttribute("truncate"),a.getAttribute("type"),a.getAttribute("sticky"),a.getAttribute("scope"),a.hasAttribute("disabled"),a.getAttribute("col-span")]);
7
- var b=$APP.M(a);a=$APP.D(b,$APP.W);var c=$APP.D(b,fN),d=$APP.D(b,$APP.Ai),e=$APP.D(b,aN),g=$APP.D(b,bN),h=$APP.D(b,cN),l=$APP.D(b,RM),m=$APP.D(b,$APP.pi),p=$APP.D(b,$APP.di),q=$APP.D(b,dN);b=$APP.D(b,eN);return $APP.xf([$APP.Yi,SM,gN,$APP.Y,hN,RM,$APP.al,$APP.Ul,$APP.pi,$APP.W,$APP.Fh],[PM(d,iN,"start"),PM(h,jN,"none"),PM(g,kN,"middle"),PM(p,lN,"data"),PM(b,mN,"col"),$APP.F(l),PM(q,nN,"none"),QM(c),$APP.F(m),$APP.F(a),QM(e)])},pN=function(a){var b=oN(a);if($APP.N($APP.k(a,"__xTableCellModel"),b)){b=
8
- $APP.M(b);var c=$APP.D(b,$APP.Ul),d=$APP.D(b,$APP.Fh),e=$APP.D(b,$APP.W),g=$APP.D(b,SM),h=$M(a);h=$APP.M(h);var l=$APP.D(h,YM);h=$APP.D(h,ZM);var m=UM(b),p=$APP.M(b),q=$APP.D(p,$APP.Y),v=$APP.D(p,$APP.Yi),x=$APP.D(p,gN),y=$APP.D(p,$APP.al),A=$APP.D(p,$APP.pi),B=$APP.D(p,$APP.W),E=a.setAttribute,H=$APP.M(p);var G=$APP.D(H,$APP.Y);H=$APP.D(H,hN);G=$APP.C.i(G,"header")?$APP.C.i(H,"row")||$APP.C.i(H,"rowgroup")?"rowheader":"columnheader":"cell";E.call(a,"role",G);p=TM(p);$APP.n(p)?a.setAttribute("aria-sort",
6
+ b.appendChild(c);b.appendChild(d);a.__xTableCellRefs=new $APP.Q(null,5,[$APP.yi,b,uO,d,$APP.ri,e,vO,h,wO,m],null);return $APP.k(a,"__xTableCellRefs")},MO=function(a){a=$APP.zf([$APP.Oi,yO,zO,AO,oO,$APP.Di,$APP.qi,BO,CO,$APP.X,DO],[a.getAttribute("align"),a.getAttribute("row-span"),a.getAttribute("valign"),a.getAttribute("sort-direction"),a.hasAttribute("sortable"),a.hasAttribute("truncate"),a.getAttribute("type"),a.getAttribute("sticky"),a.getAttribute("scope"),a.hasAttribute("disabled"),a.getAttribute("col-span")]);
7
+ var b=$APP.M(a);a=$APP.D(b,$APP.X);var c=$APP.D(b,DO),d=$APP.D(b,$APP.Oi),e=$APP.D(b,yO),g=$APP.D(b,zO),h=$APP.D(b,AO),l=$APP.D(b,oO),m=$APP.D(b,$APP.Di),p=$APP.D(b,$APP.qi),q=$APP.D(b,BO);b=$APP.D(b,CO);return $APP.zf([$APP.lj,pO,EO,$APP.Z,FO,oO,$APP.nl,$APP.hm,$APP.Di,$APP.X,$APP.Xh],[mO(d,GO,"start"),mO(h,HO,"none"),mO(g,IO,"middle"),mO(p,JO,"data"),mO(b,KO,"col"),$APP.F(l),mO(q,LO,"none"),nO(c),$APP.F(m),$APP.F(a),nO(e)])},NO=function(a){var b=MO(a);if($APP.N($APP.k(a,"__xTableCellModel"),b)){b=
8
+ $APP.M(b);var c=$APP.D(b,$APP.hm),d=$APP.D(b,$APP.Xh),e=$APP.D(b,$APP.X),g=$APP.D(b,pO),h=xO(a);h=$APP.M(h);var l=$APP.D(h,vO);h=$APP.D(h,wO);var m=rO(b),p=$APP.M(b),q=$APP.D(p,$APP.Z),v=$APP.D(p,$APP.lj),x=$APP.D(p,EO),y=$APP.D(p,$APP.nl),A=$APP.D(p,$APP.Di),B=$APP.D(p,$APP.X),E=a.setAttribute,H=$APP.M(p);var G=$APP.D(H,$APP.Z);H=$APP.D(H,FO);G=$APP.C.i(G,"header")?$APP.C.i(H,"row")||$APP.C.i(H,"rowgroup")?"rowheader":"columnheader":"cell";E.call(a,"role",G);p=qO(p);$APP.n(p)?a.setAttribute("aria-sort",
9
9
  p):a.removeAttribute("aria-sort");$APP.n(B)?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled");a.setAttribute("data-type",q);a.setAttribute("data-align",v);a.setAttribute("data-valign",x);$APP.C.i(y,"none")?a.removeAttribute("data-sticky"):a.setAttribute("data-sticky",y);$APP.n(A)?a.setAttribute("data-truncate",""):a.removeAttribute("data-truncate");a.style.gridColumn=c>1?"span "+$APP.T.g(c):"";a.style.gridRow=d>1?"span "+$APP.T.g(d):"";l.hidden=$APP.r(m);c=parseInt;q=$APP.M(b);
10
- m=$APP.D(q,$APP.Y);d=$APP.D(q,RM);q=$APP.D(q,$APP.W);m=$APP.C.i(m,"header");l.tabIndex=c($APP.n(m?$APP.n(d)?$APP.r(q):d:m)?"0":"-1",10);l.setAttribute("aria-label",WM(g));l.disabled=$APP.F(e);a:switch(e=$APP.M(b),$APP.D(e,SM)){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}},qN=function(a){var b=a.getAttribute("sort-direction");b=PM(b,jN,"none");b=new CustomEvent("x-table-cell-sort",{detail:{direction:VM(b),previousDirection:b},bubbles:!0,composed:!0,cancelable:!0});a.dispatchEvent(b)},rN=function(a){var b=function(){var c=$APP.k(a,"__xTableCellModel");
12
- return $APP.n(c)?c:oN(a)}();$APP.n(function(){var c=UM(b);return $APP.n(c)?$APP.r($APP.W.g(b)):c}())&&qN(a);return null},sN=function(a){function b(){return rN(a)}var c=$M(a);c=$APP.M(c);$APP.D(c,YM).addEventListener("click",b);$APP.ia(a,"__xTableCellHandlers",{"sort-click":b})},tN=function(a){var b=$APP.k(a,"__xTableCellHandlers"),c=$APP.k(a,"__xTableCellRefs");$APP.n($APP.n(b)?c:b)&&(c=$APP.M(c),c=$APP.D(c,YM),b=$APP.k(b,"sort-click"),$APP.n(b)&&c.removeEventListener("click",b));a.__xTableCellHandlers=
13
- null},uN=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});
10
+ m=$APP.D(q,$APP.Z);d=$APP.D(q,oO);q=$APP.D(q,$APP.X);m=$APP.C.i(m,"header");l.tabIndex=c($APP.n(m?$APP.n(d)?$APP.r(q):d:m)?"0":"-1",10);l.setAttribute("aria-label",tO(g));l.disabled=$APP.F(e);a:switch(e=$APP.M(b),$APP.D(e,pO)){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}},OO=function(a){var b=a.getAttribute("sort-direction");b=mO(b,HO,"none");b=new CustomEvent("x-table-cell-sort",{detail:{direction:sO(b),previousDirection:b},bubbles:!0,composed:!0,cancelable:!0});a.dispatchEvent(b)},PO=function(a){var b=function(){var c=$APP.k(a,"__xTableCellModel");
12
+ return $APP.n(c)?c:MO(a)}();$APP.n(function(){var c=rO(b);return $APP.n(c)?$APP.r($APP.X.g(b)):c}())&&OO(a);return null},QO=function(a){function b(){return PO(a)}var c=xO(a);c=$APP.M(c);$APP.D(c,vO).addEventListener("click",b);$APP.ja(a,"__xTableCellHandlers",{"sort-click":b})},RO=function(a){var b=$APP.k(a,"__xTableCellHandlers"),c=$APP.k(a,"__xTableCellRefs");$APP.n($APP.n(b)?c:b)&&(c=$APP.M(c),c=$APP.D(c,vO),b=$APP.k(b,"sort-click"),$APP.n(b)&&c.removeEventListener("click",b));a.__xTableCellHandlers=
13
+ null},SO=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
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
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 QM(this.getAttribute("col-span"))},set:function(b){b=parseInt(b,10);return $APP.r(isNaN(b))&&
17
- b>0?this.setAttribute("col-span",""+$APP.T.g(b)):this.removeAttribute("col-span")},enumerable:!0,configurable:!0});Object.defineProperty(a,"rowSpan",{get:function(){return QM(this.getAttribute("row-span"))},set:function(b){b=parseInt(b,10);return $APP.r(isNaN(b))&&b>0?this.setAttribute("row-span",""+$APP.T.g(b)):this.removeAttribute("row-span")},enumerable:!0,configurable:!0});Object.defineProperty(a,"sortDirection",{get:function(){var b=this.getAttribute("sort-direction");return $APP.n(b)?b:"none"},
18
- set:function(b){return $APP.n(b)?this.setAttribute("sort-direction",""+$APP.T.g(b)):this.removeAttribute("sort-direction")},enumerable:!0,configurable:!0})},yN=function(){var a=class extends HTMLElement{};a.observedAttributes=vN;a.prototype.connectedCallback=function(){$M(this);tN(this);sN(this);pN(this);var b=$APP.k(this,"__xTableCellModel");var c=$APP.n(b)?b:oN(this);b=this.dispatchEvent;var d=CustomEvent,e=$APP.M(c);c=$APP.D(e,$APP.Y);var g=$APP.D(e,hN),h=$APP.D(e,$APP.Ul),l=$APP.D(e,$APP.Fh);
19
- e=$APP.D(e,$APP.Yi);b.call(this,new d("x-table-cell-connected",{detail:$APP.ph(new $APP.R(null,5,[$APP.Y,c,hN,g,wN,h,xN,l,$APP.Yi,e],null)),bubbles:!0,composed:!0,cancelable:!1}));return null};a.prototype.disconnectedCallback=function(){tN(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)&&pN(this);return null};uN(a.prototype);return a},zN=function(){$APP.n(customElements.get("x-table-cell"))||
20
- customElements.define("x-table-cell",yN());return null},YM=new $APP.K(null,"sort-btn","sort-btn",1913954560),wN=new $APP.K(null,"colSpan","colSpan",872137394),XM=new $APP.K(null,"cell","cell",764245084),gN=new $APP.K(null,"valign","valign",1485197511),ZM=new $APP.K(null,"sort-icon-default","sort-icon-default",-596209230),fN=new $APP.K(null,"col-span-raw","col-span-raw",1425293661),cN=new $APP.K(null,"sort-direction-raw","sort-direction-raw",-1822100883),dN=new $APP.K(null,"sticky-raw","sticky-raw",
21
- 1857578519),aN=new $APP.K(null,"row-span-raw","row-span-raw",-1130003707),eN=new $APP.K(null,"scope-raw","scope-raw",-773628648),SM=new $APP.K(null,"sort-direction","sort-direction",-1635889628),hN=new $APP.K(null,"scope","scope",-439358418),RM=new $APP.K(null,"sortable?","sortable?",291547474),bN=new $APP.K(null,"valign-raw","valign-raw",-1083375124),xN=new $APP.K(null,"rowSpan","rowSpan",826884002);var vN="type scope align valign col-span row-span truncate sticky sortable sort-direction disabled".split(" ");
22
- $APP.xf([$APP.Yi,xN,$APP.xi,$APP.qj,gN,$APP.Y,hN,wN,$APP.al,new $APP.K(null,"sortable","sortable",2109633621),new $APP.K(null,"sortDirection","sortDirection",-45816999)],[new $APP.R(null,1,[$APP.Y,$APP.X],null),new $APP.R(null,1,[$APP.Y,$APP.V],null),new $APP.R(null,1,[$APP.Y,$APP.Fj],null),new $APP.R(null,1,[$APP.Y,$APP.Fj],null),new $APP.R(null,1,[$APP.Y,$APP.X],null),new $APP.R(null,1,[$APP.Y,$APP.X],null),new $APP.R(null,1,[$APP.Y,$APP.X],null),new $APP.R(null,1,[$APP.Y,$APP.V],null),new $APP.R(null,
23
- 1,[$APP.Y,$APP.X],null),new $APP.R(null,1,[$APP.Y,$APP.Fj],null),new $APP.R(null,1,[$APP.Y,$APP.X],null)]);$APP.Pd(["x-table-cell-sort",new $APP.R(null,2,[$APP.Cj,new $APP.R(null,2,[$APP.Vi,$APP.X,$APP.Zl,$APP.X],null),$APP.Dl,!0],null),"x-table-cell-connected",new $APP.R(null,1,[$APP.Cj,new $APP.R(null,5,[$APP.Y,$APP.X,hN,$APP.X,wN,$APP.V,xN,$APP.V,$APP.Yi,$APP.X],null)],null),"x-table-cell-disconnected",new $APP.R(null,1,[$APP.Cj,$APP.Qd],null)]);
24
- var lN=new $APP.S(null,new $APP.R(null,2,["data",null,"header",null],null),null),mN=new $APP.S(null,new $APP.R(null,4,["rowgroup",null,"col",null,"row",null,"colgroup",null],null),null),iN=new $APP.S(null,new $APP.R(null,3,["center",null,"start",null,"end",null],null),null),kN=new $APP.S(null,new $APP.R(null,3,["top",null,"middle",null,"bottom",null],null),null),nN=new $APP.S(null,new $APP.R(null,3,["none",null,"start",null,"end",null],null),null),jN=new $APP.S(null,new $APP.R(null,3,["none",null,
25
- "desc",null,"asc",null],null),null);$APP.fa("baredom.exports.x_table_cell.init",zN);export const init=zN;
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 nO(this.getAttribute("col-span"))},set:function(b){b=parseInt(b,10);return $APP.r(isNaN(b))&&
17
+ b>0?this.setAttribute("col-span",""+$APP.T.g(b)):this.removeAttribute("col-span")},enumerable:!0,configurable:!0});Object.defineProperty(a,"rowSpan",{get:function(){return nO(this.getAttribute("row-span"))},set:function(b){b=parseInt(b,10);return $APP.r(isNaN(b))&&b>0?this.setAttribute("row-span",""+$APP.T.g(b)):this.removeAttribute("row-span")},enumerable:!0,configurable:!0});Object.defineProperty(a,"sortDirection",{get:function(){var b=this.getAttribute("sort-direction");return $APP.n(b)?b:"none"},
18
+ set:function(b){return $APP.n(b)?this.setAttribute("sort-direction",""+$APP.T.g(b)):this.removeAttribute("sort-direction")},enumerable:!0,configurable:!0})},WO=function(){var a=class extends HTMLElement{};a.observedAttributes=TO;a.prototype.connectedCallback=function(){xO(this);RO(this);QO(this);NO(this);var b=$APP.k(this,"__xTableCellModel");var c=$APP.n(b)?b:MO(this);b=this.dispatchEvent;var d=CustomEvent,e=$APP.M(c);c=$APP.D(e,$APP.Z);var g=$APP.D(e,FO),h=$APP.D(e,$APP.hm),l=$APP.D(e,$APP.Xh);
19
+ e=$APP.D(e,$APP.lj);b.call(this,new d("x-table-cell-connected",{detail:$APP.Dh(new $APP.Q(null,5,[$APP.Z,c,FO,g,UO,h,VO,l,$APP.lj,e],null)),bubbles:!0,composed:!0,cancelable:!1}));return null};a.prototype.disconnectedCallback=function(){RO(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)&&NO(this);return null};SO(a.prototype);return a},XO=function(){$APP.n(customElements.get("x-table-cell"))||
20
+ customElements.define("x-table-cell",WO());return null},vO=new $APP.K(null,"sort-btn","sort-btn",1913954560),UO=new $APP.K(null,"colSpan","colSpan",872137394),uO=new $APP.K(null,"cell","cell",764245084),EO=new $APP.K(null,"valign","valign",1485197511),wO=new $APP.K(null,"sort-icon-default","sort-icon-default",-596209230),DO=new $APP.K(null,"col-span-raw","col-span-raw",1425293661),AO=new $APP.K(null,"sort-direction-raw","sort-direction-raw",-1822100883),BO=new $APP.K(null,"sticky-raw","sticky-raw",
21
+ 1857578519),yO=new $APP.K(null,"row-span-raw","row-span-raw",-1130003707),CO=new $APP.K(null,"scope-raw","scope-raw",-773628648),pO=new $APP.K(null,"sort-direction","sort-direction",-1635889628),FO=new $APP.K(null,"scope","scope",-439358418),oO=new $APP.K(null,"sortable?","sortable?",291547474),zO=new $APP.K(null,"valign-raw","valign-raw",-1083375124),VO=new $APP.K(null,"rowSpan","rowSpan",826884002);var TO="type scope align valign col-span row-span truncate sticky sortable sort-direction disabled".split(" ");
22
+ $APP.zf([$APP.lj,VO,$APP.Li,$APP.Fj,EO,$APP.Z,FO,UO,$APP.nl,new $APP.K(null,"sortable","sortable",2109633621),new $APP.K(null,"sortDirection","sortDirection",-45816999)],[new $APP.Q(null,1,[$APP.Z,$APP.Y],null),new $APP.Q(null,1,[$APP.Z,$APP.W],null),new $APP.Q(null,1,[$APP.Z,$APP.Sj],null),new $APP.Q(null,1,[$APP.Z,$APP.Sj],null),new $APP.Q(null,1,[$APP.Z,$APP.Y],null),new $APP.Q(null,1,[$APP.Z,$APP.Y],null),new $APP.Q(null,1,[$APP.Z,$APP.Y],null),new $APP.Q(null,1,[$APP.Z,$APP.W],null),new $APP.Q(null,
23
+ 1,[$APP.Z,$APP.Y],null),new $APP.Q(null,1,[$APP.Z,$APP.Sj],null),new $APP.Q(null,1,[$APP.Z,$APP.Y],null)]);$APP.Qd(["x-table-cell-sort",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,2,[$APP.jj,$APP.Y,$APP.mm,$APP.Y],null),$APP.Rl,!0],null),"x-table-cell-connected",new $APP.Q(null,1,[$APP.V,new $APP.Q(null,5,[$APP.Z,$APP.Y,FO,$APP.Y,UO,$APP.W,VO,$APP.W,$APP.lj,$APP.Y],null)],null),"x-table-cell-disconnected",new $APP.Q(null,1,[$APP.V,$APP.Rd],null)]);
24
+ var JO=new $APP.S(null,new $APP.Q(null,2,["data",null,"header",null],null),null),KO=new $APP.S(null,new $APP.Q(null,4,["rowgroup",null,"col",null,"row",null,"colgroup",null],null),null),GO=new $APP.S(null,new $APP.Q(null,3,["center",null,"start",null,"end",null],null),null),IO=new $APP.S(null,new $APP.Q(null,3,["top",null,"middle",null,"bottom",null],null),null),LO=new $APP.S(null,new $APP.Q(null,3,["none",null,"start",null,"end",null],null),null),HO=new $APP.S(null,new $APP.Q(null,3,["none",null,
25
+ "desc",null,"asc",null],null),null);$APP.ha("baredom.exports.x_table_cell.init",XO);export const init=XO;
@@ -1,11 +1,11 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var hx=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),$APP.r(isNaN(a))&&a>0?Math.floor(a):null):null},ix=function(a){var b=$APP.M(a);a=$APP.D(b,$APP.bl);b=$APP.D(b,$APP.W);return $APP.n(a)?$APP.r(b):a},jx=function(a){if(!$APP.n($APP.k(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:var(--x-color-focus-ring,rgba(59,130,246,0.5));--x-table-row-transition-duration:var(--x-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.R(null,2,[$APP.li,b,$APP.Zk,d],null)}},mx=function(a){a=new $APP.R(null,4,[$APP.Gi,a.hasAttribute("selected"),$APP.W,a.hasAttribute("disabled"),$APP.bl,a.hasAttribute("interactive"),kx,a.getAttribute("row-index")],null);var b=$APP.M(a);a=$APP.D(b,$APP.Gi);var c=$APP.D(b,$APP.W),d=$APP.D(b,$APP.bl);b=$APP.D(b,kx);return new $APP.R(null,4,[$APP.Gi,$APP.F(a),$APP.W,$APP.F(c),$APP.bl,$APP.F(d),lx,hx(b)],null)},nx=function(a){var b=mx(a);if($APP.N($APP.k(a,
4
- "__xTableRowModel"),b)){jx(a);var c=$APP.M(b),d=$APP.D(c,$APP.Gi),e=$APP.D(c,$APP.W),g=$APP.D(c,$APP.bl),h=$APP.D(c,lx);a.setAttribute("role","row");var l=$APP.M(c);var m=$APP.D(l,$APP.Gi);l=$APP.D(l,$APP.bl);m=$APP.n(m)?"true":$APP.n(l)?"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");
5
- $APP.n(d)?a.setAttribute("data-selected",""):a.removeAttribute("data-selected");$APP.n(g)?a.setAttribute("data-interactive",""):a.removeAttribute("data-interactive");a.tabIndex=$APP.n(ix(c))?0:-1;a.__xTableRowModel=b}},ox=function(a){var b=$APP.k(a,"__xTableRowModel");var c=$APP.n(b)?b:mx(a);b=a.dispatchEvent;var d=CustomEvent,e=$APP.M(c);c=$APP.D(e,$APP.Gi);var g=$APP.D(e,$APP.W);e=$APP.D(e,lx);b.call(a,new d("x-table-row-click",{detail:$APP.ph(new $APP.R(null,3,[$APP.kj,$APP.n(e)?e:0,$APP.Pj,c,
6
- $APP.qj,g],null)),bubbles:!0,composed:!0,cancelable:!0}))},px=function(a){function b(d){var e=d.key;if($APP.C.i(e,"Enter")||$APP.C.i(e," "))e=$APP.k(a,"__xTableRowModel"),e=$APP.n(e)?e:mx(a),$APP.n(ix(e))&&(d.preventDefault(),ox(a));return null}function c(){var d=$APP.k(a,"__xTableRowModel");d=$APP.n(d)?d:mx(a);$APP.n(ix(d))&&ox(a);return null}a.addEventListener("click",c);a.addEventListener("keydown",b);$APP.ia(a,"__xTableRowHandlers",{click:c,keydown:b})},qx=function(a){var b=$APP.k(a,"__xTableRowHandlers");
7
- if($APP.n(b)){var c=$APP.k(b,"click");b=$APP.k(b,"keydown");$APP.n(c)&&a.removeEventListener("click",c);$APP.n(b)&&a.removeEventListener("keydown",b)}a.__xTableRowHandlers=null},rx=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 hx(this.getAttribute("row-index"))},set:function(b){b=parseInt(b,10);return $APP.r(isNaN(b))&&
9
- b>0?this.setAttribute("row-index",""+$APP.T.g(b)):this.removeAttribute("row-index")},enumerable:!0,configurable:!0})},tx=function(){var a=class extends HTMLElement{};a.observedAttributes=sx;a.prototype.connectedCallback=function(){jx(this);qx(this);px(this);nx(this);var b=$APP.k(this,"__xTableRowModel");var c=$APP.n(b)?b:mx(this);b=this.dispatchEvent;var d=CustomEvent,e=$APP.M(c);c=$APP.D(e,$APP.Gi);var g=$APP.D(e,$APP.W),h=$APP.D(e,$APP.bl);e=$APP.D(e,lx);b.call(this,new d("x-table-row-connected",
10
- {detail:$APP.ph(new $APP.R(null,4,[$APP.kj,$APP.n(e)?e:0,$APP.Pj,c,$APP.qj,g,$APP.Oi,h],null)),bubbles:!0,composed:!0,cancelable:!1}));return null};a.prototype.disconnectedCallback=function(){qx(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)&&nx(this);return null};rx(a.prototype);return a},ux=function(){$APP.n(customElements.get("x-table-row"))||
11
- customElements.define("x-table-row",tx());return null},lx=new $APP.K(null,"row-index","row-index",-828710296),kx=new $APP.K(null,"row-index-raw","row-index-raw",1490649093);var sx=["selected","disabled","interactive","row-index"];$APP.Pd(["x-table-row-click",new $APP.R(null,2,[$APP.Cj,new $APP.R(null,3,[$APP.kj,$APP.V,$APP.Pj,$APP.Fj,$APP.qj,$APP.Fj],null),$APP.Dl,!0],null),"x-table-row-connected",new $APP.R(null,2,[$APP.Cj,new $APP.R(null,4,[$APP.kj,$APP.V,$APP.Pj,$APP.Fj,$APP.qj,$APP.Fj,$APP.Oi,$APP.Fj],null),$APP.Dl,!1],null),"x-table-row-disconnected",new $APP.R(null,2,[$APP.Cj,$APP.Qd,$APP.Dl,!1],null)]);$APP.fa("baredom.exports.x_table_row.init",ux);export const init=ux;
2
+ var ny=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),$APP.r(isNaN(a))&&a>0?Math.floor(a):null):null},oy=function(a){var b=$APP.M(a);a=$APP.D(b,$APP.pl);b=$APP.D(b,$APP.X);return $APP.n(a)?$APP.r(b):a},py=function(a){if(!$APP.n($APP.k(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:var(--x-color-focus-ring,rgba(59,130,246,0.5));--x-table-row-transition-duration:var(--x-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.yi,b,$APP.ll,d],null)}},sy=function(a){a=new $APP.Q(null,4,[$APP.Ui,a.hasAttribute("selected"),$APP.X,a.hasAttribute("disabled"),$APP.pl,a.hasAttribute("interactive"),qy,a.getAttribute("row-index")],null);var b=$APP.M(a);a=$APP.D(b,$APP.Ui);var c=$APP.D(b,$APP.X),d=$APP.D(b,$APP.pl);b=$APP.D(b,qy);return new $APP.Q(null,4,[$APP.Ui,$APP.F(a),$APP.X,$APP.F(c),$APP.pl,$APP.F(d),ry,ny(b)],null)},ty=function(a){var b=sy(a);if($APP.N($APP.k(a,
4
+ "__xTableRowModel"),b)){py(a);var c=$APP.M(b),d=$APP.D(c,$APP.Ui),e=$APP.D(c,$APP.X),g=$APP.D(c,$APP.pl),h=$APP.D(c,ry);a.setAttribute("role","row");var l=$APP.M(c);var m=$APP.D(l,$APP.Ui);l=$APP.D(l,$APP.pl);m=$APP.n(m)?"true":$APP.n(l)?"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");
5
+ $APP.n(d)?a.setAttribute("data-selected",""):a.removeAttribute("data-selected");$APP.n(g)?a.setAttribute("data-interactive",""):a.removeAttribute("data-interactive");a.tabIndex=$APP.n(oy(c))?0:-1;a.__xTableRowModel=b}},uy=function(a){var b=$APP.k(a,"__xTableRowModel");var c=$APP.n(b)?b:sy(a);b=a.dispatchEvent;var d=CustomEvent,e=$APP.M(c);c=$APP.D(e,$APP.Ui);var g=$APP.D(e,$APP.X);e=$APP.D(e,ry);b.call(a,new d("x-table-row-click",{detail:$APP.Dh(new $APP.Q(null,3,[$APP.zj,$APP.n(e)?e:0,$APP.dk,c,
6
+ $APP.Fj,g],null)),bubbles:!0,composed:!0,cancelable:!0}))},vy=function(a){function b(d){var e=d.key;if($APP.C.i(e,"Enter")||$APP.C.i(e," "))e=$APP.k(a,"__xTableRowModel"),e=$APP.n(e)?e:sy(a),$APP.n(oy(e))&&(d.preventDefault(),uy(a));return null}function c(){var d=$APP.k(a,"__xTableRowModel");d=$APP.n(d)?d:sy(a);$APP.n(oy(d))&&uy(a);return null}a.addEventListener("click",c);a.addEventListener("keydown",b);$APP.ja(a,"__xTableRowHandlers",{click:c,keydown:b})},wy=function(a){var b=$APP.k(a,"__xTableRowHandlers");
7
+ if($APP.n(b)){var c=$APP.k(b,"click");b=$APP.k(b,"keydown");$APP.n(c)&&a.removeEventListener("click",c);$APP.n(b)&&a.removeEventListener("keydown",b)}a.__xTableRowHandlers=null},xy=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 ny(this.getAttribute("row-index"))},set:function(b){b=parseInt(b,10);return $APP.r(isNaN(b))&&
9
+ b>0?this.setAttribute("row-index",""+$APP.T.g(b)):this.removeAttribute("row-index")},enumerable:!0,configurable:!0})},zy=function(){var a=class extends HTMLElement{};a.observedAttributes=yy;a.prototype.connectedCallback=function(){py(this);wy(this);vy(this);ty(this);var b=$APP.k(this,"__xTableRowModel");var c=$APP.n(b)?b:sy(this);b=this.dispatchEvent;var d=CustomEvent,e=$APP.M(c);c=$APP.D(e,$APP.Ui);var g=$APP.D(e,$APP.X),h=$APP.D(e,$APP.pl);e=$APP.D(e,ry);b.call(this,new d("x-table-row-connected",
10
+ {detail:$APP.Dh(new $APP.Q(null,4,[$APP.zj,$APP.n(e)?e:0,$APP.dk,c,$APP.Fj,g,$APP.cj,h],null)),bubbles:!0,composed:!0,cancelable:!1}));return null};a.prototype.disconnectedCallback=function(){wy(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)&&ty(this);return null};xy(a.prototype);return a},Ay=function(){$APP.n(customElements.get("x-table-row"))||
11
+ customElements.define("x-table-row",zy());return null},ry=new $APP.K(null,"row-index","row-index",-828710296),qy=new $APP.K(null,"row-index-raw","row-index-raw",1490649093);var yy=["selected","disabled","interactive","row-index"];$APP.Qd(["x-table-row-click",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,3,[$APP.zj,$APP.W,$APP.dk,$APP.Sj,$APP.Fj,$APP.Sj],null),$APP.Rl,!0],null),"x-table-row-connected",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,4,[$APP.zj,$APP.W,$APP.dk,$APP.Sj,$APP.Fj,$APP.Sj,$APP.cj,$APP.Sj],null),$APP.Rl,!1],null),"x-table-row-disconnected",new $APP.Q(null,2,[$APP.V,$APP.Rd,$APP.Rl,!1],null)]);$APP.ha("baredom.exports.x_table_row.init",Ay);export const init=Ay;
package/dist/x-table.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var WB=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),$APP.r(isNaN(a))&&a>0?Math.floor(a):null):null},YB=function(a){var b=$APP.k(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:var(--x-color-border,rgba(0,0,0,0.1));--x-table-border-radius:var(--x-radius-md,8px);--x-table-stripe-bg:rgba(0,0,0,0.025);--x-table-caption-color:var(--x-color-text,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:var(--x-color-border,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.R(null,3,[$APP.li,b,XB,d,$APP.Zk,e],null);return $APP.k(a,"__xTableRefs")},jC=function(a){a=new $APP.R(null,8,[ZB,a.getAttribute("columns"),$B,a.getAttribute("caption"),aC,a.getAttribute("selectable"),$APP.yk,a.hasAttribute("striped"),bC,a.hasAttribute("bordered"),cC,a.hasAttribute("full-width"),dC,a.hasAttribute("compact"),eC,a.getAttribute("row-count")],null);var b=
4
- $APP.M(a),c=$APP.D(b,ZB),d=$APP.D(b,$B),e=$APP.D(b,aC);a=$APP.D(b,$APP.yk);var g=$APP.D(b,bC),h=$APP.D(b,cC),l=$APP.D(b,dC);b=$APP.D(b,eC);a:{if(typeof c==="string"&&(c=c.trim(),$APP.N(c,""))){var m=parseInt(c,10);c=$APP.r(isNaN(m))&&m>0&&$APP.C.i(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.J(fC,e)?e:"none";return new $APP.R(null,8,[$APP.mk,c,gC,d,hC,e,$APP.yk,$APP.F(a),bC,$APP.F(g),cC,$APP.F(h),dC,$APP.F(l),
5
- iC,WB(b)],null)},kC=function(a){a=a.querySelectorAll("x-table-row");for(var b=a.length,c=0;;)if(c<b){var d=a[c];$APP.ed(c+1,2)===0?d.setAttribute("data-stripe","even"):d.removeAttribute("data-stripe");c+=1}else break},lC=function(a){var b=jC(a);if($APP.N($APP.k(a,"__xTableModel"),b)){b=$APP.M(b);var c=$APP.D(b,$APP.mk),d=$APP.D(b,gC),e=$APP.D(b,hC),g=$APP.D(b,$APP.yk),h=$APP.D(b,bC),l=$APP.D(b,cC),m=$APP.D(b,dC),p=$APP.D(b,iC),q=YB(a);q=$APP.M(q);q=$APP.D(q,XB);a.style.gridTemplateColumns=$APP.n(c)?
2
+ var bD=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),$APP.r(isNaN(a))&&a>0?Math.floor(a):null):null},dD=function(a){var b=$APP.k(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:var(--x-color-border,rgba(0,0,0,0.1));--x-table-border-radius:var(--x-radius-md,8px);--x-table-stripe-bg:rgba(0,0,0,0.025);--x-table-caption-color:var(--x-color-text,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:var(--x-color-border,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.yi,b,cD,d,$APP.ll,e],null);return $APP.k(a,"__xTableRefs")},pD=function(a){a=new $APP.Q(null,8,[eD,a.getAttribute("columns"),fD,a.getAttribute("caption"),gD,a.getAttribute("selectable"),$APP.Lk,a.hasAttribute("striped"),hD,a.hasAttribute("bordered"),iD,a.hasAttribute("full-width"),jD,a.hasAttribute("compact"),kD,a.getAttribute("row-count")],null);var b=
4
+ $APP.M(a),c=$APP.D(b,eD),d=$APP.D(b,fD),e=$APP.D(b,gD);a=$APP.D(b,$APP.Lk);var g=$APP.D(b,hD),h=$APP.D(b,iD),l=$APP.D(b,jD);b=$APP.D(b,kD);a:{if(typeof c==="string"&&(c=c.trim(),$APP.N(c,""))){var m=parseInt(c,10);c=$APP.r(isNaN(m))&&m>0&&$APP.C.i(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.I(lD,e)?e:"none";return new $APP.Q(null,8,[$APP.zk,c,mD,d,nD,e,$APP.Lk,$APP.F(a),hD,$APP.F(g),iD,$APP.F(h),jD,$APP.F(l),
5
+ oD,bD(b)],null)},qD=function(a){a=a.querySelectorAll("x-table-row");for(var b=a.length,c=0;;)if(c<b){var d=a[c];$APP.fd(c+1,2)===0?d.setAttribute("data-stripe","even"):d.removeAttribute("data-stripe");c+=1}else break},rD=function(a){var b=pD(a);if($APP.N($APP.k(a,"__xTableModel"),b)){b=$APP.M(b);var c=$APP.D(b,$APP.zk),d=$APP.D(b,mD),e=$APP.D(b,nD),g=$APP.D(b,$APP.Lk),h=$APP.D(b,hD),l=$APP.D(b,iD),m=$APP.D(b,jD),p=$APP.D(b,oD),q=dD(a);q=$APP.M(q);q=$APP.D(q,cD);a.style.gridTemplateColumns=$APP.n(c)?
6
6
  c:"";a.setAttribute("role",$APP.C.i(e,"none")?"table":"grid");c=$APP.C.i(e,"multi")?"true":null;$APP.n(c)?a.setAttribute("aria-multiselectable",c):a.removeAttribute("aria-multiselectable");p!=null?a.setAttribute("aria-rowcount",""+$APP.T.g(p)):a.removeAttribute("aria-rowcount");$APP.N(d,"")?a.setAttribute("aria-label",d):a.removeAttribute("aria-label");$APP.N(d,"")?(q.textContent=d,q.removeAttribute("hidden")):(q.textContent="",q.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(l)?a.setAttribute("data-full-width",""):a.removeAttribute("data-full-width");$APP.n(m)?a.setAttribute("data-compact",""):a.removeAttribute("data-compact");$APP.n(g)&&kC(a);a.__xTableModel=b}},oC=function(a){function b(){var e=$APP.k(a,"__xTableModel");e=$APP.n(e)?e:jC(a);$APP.n($APP.yk.g(e))&&kC(a);return null}function c(e){var g=$APP.k(a,"__xTableModel");g=$APP.n(g)?g:jC(a);
8
- var h=hC.g(g);if($APP.N(h,"none"))if(g=e.target,e=$APP.k(e.detail,"rowIndex"),e=$APP.ph(new $APP.R(null,3,[$APP.kj,$APP.n(e)?e:0,$APP.Pj,$APP.r(g.hasAttribute("selected")),mC,h],null)),a.dispatchEvent(new CustomEvent("x-table-row-select",{detail:e,bubbles:!0,composed:!0,cancelable:!0})),$APP.C.i(h,"single")){e=g.hasAttribute("selected");h=a.querySelectorAll("x-table-row[selected]");for(var l=h.length,m=0;;)if(m<l)h[m].removeAttribute("selected"),m+=1;else break;$APP.n(e)||g.setAttribute("selected",
9
- "")}else $APP.C.i(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.k(e.detail,"direction"),l=$APP.k(e.detail,"previousDirection");g>=0&&(e.stopPropagation(),e=$APP.ph(new $APP.R(null,3,[nC,g,$APP.Vi,h,$APP.Zl,l],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.ia(a,"__xTableHandlers",{sort:d,"row-click":c,"row-conn":b})},pC=function(a){var b=$APP.k(a,"__xTableHandlers");if($APP.n(b)){var c=$APP.k(b,"sort"),d=$APP.k(b,"row-click");b=$APP.k(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},qC=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")},
7
+ ""):a.removeAttribute("data-striped");$APP.n(h)?a.setAttribute("data-bordered",""):a.removeAttribute("data-bordered");$APP.n(l)?a.setAttribute("data-full-width",""):a.removeAttribute("data-full-width");$APP.n(m)?a.setAttribute("data-compact",""):a.removeAttribute("data-compact");$APP.n(g)&&qD(a);a.__xTableModel=b}},uD=function(a){function b(){var e=$APP.k(a,"__xTableModel");e=$APP.n(e)?e:pD(a);$APP.n($APP.Lk.g(e))&&qD(a);return null}function c(e){var g=$APP.k(a,"__xTableModel");g=$APP.n(g)?g:pD(a);
8
+ var h=nD.g(g);if($APP.N(h,"none"))if(g=e.target,e=$APP.k(e.detail,"rowIndex"),e=$APP.Dh(new $APP.Q(null,3,[$APP.zj,$APP.n(e)?e:0,$APP.dk,$APP.r(g.hasAttribute("selected")),sD,h],null)),a.dispatchEvent(new CustomEvent("x-table-row-select",{detail:e,bubbles:!0,composed:!0,cancelable:!0})),$APP.C.i(h,"single")){e=g.hasAttribute("selected");h=a.querySelectorAll("x-table-row[selected]");for(var l=h.length,m=0;;)if(m<l)h[m].removeAttribute("selected"),m+=1;else break;$APP.n(e)||g.setAttribute("selected",
9
+ "")}else $APP.C.i(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.k(e.detail,"direction"),l=$APP.k(e.detail,"previousDirection");g>=0&&(e.stopPropagation(),e=$APP.Dh(new $APP.Q(null,3,[tD,g,$APP.jj,h,$APP.mm,l],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.ja(a,"__xTableHandlers",{sort:d,"row-click":c,"row-conn":b})},vD=function(a){var b=$APP.k(a,"__xTableHandlers");if($APP.n(b)){var c=$APP.k(b,"sort"),d=$APP.k(b,"row-click");b=$APP.k(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},wD=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
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
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 WB(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})},sC=function(){var a=class extends HTMLElement{};a.observedAttributes=rC;a.prototype.connectedCallback=function(){YB(this);
15
- pC(this);oC(this);lC(this);return null};a.prototype.disconnectedCallback=function(){pC(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&lC(this);return null};qC(a.prototype);return a},tC=function(){$APP.n(customElements.get("x-table"))||customElements.define("x-table",sC());return null},cC=new $APP.K(null,"full-width?","full-width?",1477288349),eC=new $APP.K(null,"row-count-raw","row-count-raw",-1432781274),aC=new $APP.K(null,"selectable-raw","selectable-raw",-1276314763),
16
- nC=new $APP.K(null,"colIndex","colIndex",171239635),iC=new $APP.K(null,"row-count","row-count",1060167988),$B=new $APP.K(null,"caption-raw","caption-raw",-375935083),mC=new $APP.K(null,"selectionMode","selectionMode",1264773367),ZB=new $APP.K(null,"columns-raw","columns-raw",-2093994046),hC=new $APP.K(null,"selectable","selectable",370587038),gC=new $APP.K(null,"caption","caption",-855383902),bC=new $APP.K(null,"bordered?","bordered?",562358476),XB=new $APP.K(null,"caption-div","caption-div",1485363333),
17
- dC=new $APP.K(null,"compact?","compact?",1216893298);var rC="columns caption selectable striped bordered full-width compact row-count".split(" ");$APP.Pd(["x-table-sort",new $APP.R(null,2,[$APP.Cj,new $APP.R(null,3,[nC,$APP.V,$APP.Vi,$APP.X,$APP.Zl,$APP.X],null),$APP.Dl,!0],null),"x-table-row-select",new $APP.R(null,2,[$APP.Cj,new $APP.R(null,3,[$APP.kj,$APP.V,$APP.Pj,$APP.Fj,mC,$APP.X],null),$APP.Dl,!0],null)]);var fC=new $APP.S(null,new $APP.R(null,3,["none",null,"single",null,"multi",null],null),null);$APP.fa("baredom.exports.x_table.init",tC);export const init=tC;
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 bD(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})},yD=function(){var a=class extends HTMLElement{};a.observedAttributes=xD;a.prototype.connectedCallback=function(){dD(this);
15
+ vD(this);uD(this);rD(this);return null};a.prototype.disconnectedCallback=function(){vD(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&rD(this);return null};wD(a.prototype);return a},zD=function(){$APP.n(customElements.get("x-table"))||customElements.define("x-table",yD());return null},iD=new $APP.K(null,"full-width?","full-width?",1477288349),kD=new $APP.K(null,"row-count-raw","row-count-raw",-1432781274),gD=new $APP.K(null,"selectable-raw","selectable-raw",-1276314763),
16
+ tD=new $APP.K(null,"colIndex","colIndex",171239635),oD=new $APP.K(null,"row-count","row-count",1060167988),fD=new $APP.K(null,"caption-raw","caption-raw",-375935083),sD=new $APP.K(null,"selectionMode","selectionMode",1264773367),eD=new $APP.K(null,"columns-raw","columns-raw",-2093994046),nD=new $APP.K(null,"selectable","selectable",370587038),mD=new $APP.K(null,"caption","caption",-855383902),hD=new $APP.K(null,"bordered?","bordered?",562358476),cD=new $APP.K(null,"caption-div","caption-div",1485363333),
17
+ jD=new $APP.K(null,"compact?","compact?",1216893298);var xD="columns caption selectable striped bordered full-width compact row-count".split(" ");$APP.Qd(["x-table-sort",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,3,[tD,$APP.W,$APP.jj,$APP.Y,$APP.mm,$APP.Y],null),$APP.Rl,!0],null),"x-table-row-select",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,3,[$APP.zj,$APP.W,$APP.dk,$APP.Sj,sD,$APP.Y],null),$APP.Rl,!0],null)]);var lD=new $APP.S(null,new $APP.Q(null,3,["none",null,"single",null,"multi",null],null),null);$APP.ha("baredom.exports.x_table.init",zD);export const init=zD;
package/dist/x-tabs.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var UE=function(a){var b=$APP.M(a);a=$APP.D(b,$APP.Bi);var c=$APP.D(b,$APP.Mk),d=$APP.D(b,RE),e=$APP.D(b,$APP.U);b=$APP.D(b,$APP.$l);c=$APP.J(SE,c)?c:"horizontal";d=$APP.J(TE,d)?d:"auto";return new $APP.R(null,5,[$APP.Bi,a,$APP.Mk,c,RE,d,$APP.U,e,$APP.$l,$APP.F(b)],null)},VE=function(a){return new $APP.R(null,5,[$APP.Bi,a.getAttribute("value"),$APP.Mk,a.getAttribute("orientation"),RE,a.getAttribute("activation"),$APP.U,a.getAttribute("label"),$APP.$l,a.hasAttribute("loop")],null)},WE=function(a){return $APP.ve($APP.ce(function(b){return $APP.C.i("X-TAB",
3
- b.tagName)},$APP.tc(a.children)))},XE=function(a){return $APP.r(a.hasAttribute("disabled"))},YE=function(a){return a.getAttribute("value")},ZE=function(a){return $APP.Td(function(b){return XE(b)?b:null},a)},$E=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.C.i(b,""),$APP.n(b?c:b)&&a.removeAttribute("value"))},aF=function(a,b){var c=a.hasAttribute("selected");$APP.n($APP.n(b)?$APP.r(c):b)?a.setAttribute("selected",""):(b=$APP.r(b),
4
- $APP.n(b?c:b)&&a.removeAttribute("selected"))},bF=function(a,b){var c=a.getAttribute("tabindex");$APP.N(c,b)&&a.setAttribute("tabindex",b)},cF=function(a,b){a=a.getAttribute("controls");$APP.n($APP.n(a)?$APP.N(a,""):a)&&(a=document.getElementById(a),$APP.n(a)&&($APP.n(b)?a.removeAttribute("hidden"):a.setAttribute("hidden","")))},dF=function(a){var b=WE(a),c=a.getAttribute("value"),d=$APP.Vf($APP.Xd(YE,b));$APP.n($APP.n(c)?$APP.J(d,c):c)||(c=ZE(b),c=$APP.n(c)?YE(c):null);if($APP.n(c)){a:{d=$APP.t(b);
5
- for(var e=null,g=0,h=0;;)if(h<g){var l=e.G(null,h),m=$APP.C.i(YE(l),c);aF(l,m);m&&XE(l)?bF(l,"0"):bF(l,"-1");h+=1}else if(d=$APP.t(d))$APP.Nc(d)?(e=$APP.xb(d),d=$APP.yb(d),l=e,g=$APP.z(e),e=l):(l=$APP.u(d),e=$APP.C.i(YE(l),c),aF(l,e),e&&XE(l)?bF(l,"0"):bF(l,"-1"),d=$APP.w(d),e=null,g=0),h=0;else break a}a:for(b=$APP.t(b),d=null,g=e=0;;)if(g<e)l=d.G(null,g),cF(l,$APP.C.i(YE(l),c)),g+=1;else if(b=$APP.t(b))d=b,$APP.Nc(d)?(b=$APP.xb(d),e=$APP.yb(d),d=b,l=$APP.z(b),b=e,e=l):(l=$APP.u(d),cF(l,$APP.C.i(YE(l),
6
- c)),b=$APP.w(d),d=null,e=0),g=0;else break a;$E(a,c)}return c},eF=function(a,b){var c=a.getAttribute("value");return $APP.n($APP.n(b)?$APP.N(c,b):b)?($E(a,b),dF(a),a.dispatchEvent(new CustomEvent("value-change",{detail:{value:$APP.n(b)?b:""},bubbles:!0,composed:!0}))):null},fF=function(a,b,c){b=$APP.z(b)-1;var d=a+1;return d<=b?d:$APP.n(c)?0:a},gF=function(a,b,c){var d=a-1;b=$APP.z(b)-1;return d>=0?d:$APP.n(c)?b:a},hF=function(a){var b=$APP.k(a,"__x_tabs_base"),c=UE(VE(a));$APP.n(b)&&(b.setAttribute("role",
7
- "tablist"),b.setAttribute("aria-orientation",$APP.Mk.g(c)),c=$APP.U.g(c),$APP.n($APP.n(c)?$APP.N(c,""):c)?b.setAttribute("aria-label",c):b.removeAttribute("aria-label"));return dF(a)},iF=function(a){var b=new MutationObserver(function(){return hF(a)});b.observe(a,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value","selected","disabled","controls"]});a.__x_tabs_observer=b},jF=function(a){function b(d){a:{var e=$APP.ve($APP.ce(XE,WE(a))),g=UE(VE(a)),h=$APP.Mk.g(g);var l=RE.g(g);g=$APP.$l.g(g);
8
- var m=d.key,p=e.indexOf(document.activeElement);if(p>=0&&(h=$APP.C.i(h,"horizontal")&&$APP.C.i(m,"ArrowRight")?fF(p,e,g):$APP.C.i(h,"horizontal")&&$APP.C.i(m,"ArrowLeft")?gF(p,e,g):$APP.C.i(h,"vertical")&&$APP.C.i(m,"ArrowDown")?fF(p,e,g):$APP.C.i(h,"vertical")&&$APP.C.i(m,"ArrowUp")?gF(p,e,g):$APP.C.i(m,"Home")?0:$APP.C.i(m,"End")?$APP.z(e)-1:null,h!=null)){d.preventDefault();d=$APP.zc(e,h,null);$APP.n(d)?d.focus():d=null;l=$APP.n(d)?$APP.C.i(l,"auto")?eF(a,YE(d)):null:null;break a}l=null}return l}
9
- function c(d){d.stopPropagation();return eF(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;iF(a)},kF=function(a){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})},mF=function(){var a=class extends HTMLElement{};a.observedAttributes=lF;a.prototype.connectedCallback=
10
- function(){if($APP.Bg(this,"__x_tabs_initialized")){jF(this);var b=hF(this)}else{if(!$APP.Bg(this,"__x_tabs_initialized")){b=this.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");c.textContent=":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);}";
11
- 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;jF(this);this.__x_tabs_initialized=!0}hF(this);b=this}return b};a.prototype.disconnectedCallback=function(){var b=$APP.k(this,"__x_tabs_on_tab_select");$APP.n(b)&&this.removeEventListener("tab-select",b);b=$APP.k(this,"__x_tabs_on_keydown");$APP.n(b)&&this.removeEventListener("keydown",b);b=$APP.k(this,"__x_tabs_observer");return $APP.n(b)?
12
- b.disconnect():null};a.prototype.attributeChangedCallback=function(){return $APP.Bg(this,"__x_tabs_initialized")?hF(this):null};kF(a);return a},nF=function(){return $APP.n(customElements.get("x-tabs"))?null:customElements.define("x-tabs",mF())},RE=new $APP.K(null,"activation","activation",2128521072);var lF=["value","orientation","activation","label","loop"],SE=new $APP.S(null,new $APP.R(null,2,["vertical",null,"horizontal",null],null),null),TE=new $APP.S(null,new $APP.R(null,2,["auto",null,"manual",null],null),null);$APP.Pd(["value-change",new $APP.R(null,1,[$APP.Cj,new $APP.R(null,1,[$APP.Bi,$APP.X],null)],null)]);$APP.fa("baredom.exports.x_tabs.init",nF);export const init=nF;
2
+ var rG=function(a){var b=$APP.M(a);a=$APP.D(b,$APP.Pi);var c=$APP.D(b,$APP.Zk),d=$APP.D(b,oG),e=$APP.D(b,$APP.U);b=$APP.D(b,$APP.nm);c=$APP.I(pG,c)?c:"horizontal";d=$APP.I(qG,d)?d:"auto";return new $APP.Q(null,5,[$APP.Pi,a,$APP.Zk,c,oG,d,$APP.U,e,$APP.nm,$APP.F(b)],null)},sG=function(a){return new $APP.Q(null,5,[$APP.Pi,a.getAttribute("value"),$APP.Zk,a.getAttribute("orientation"),oG,a.getAttribute("activation"),$APP.U,a.getAttribute("label"),$APP.nm,a.hasAttribute("loop")],null)},tG=function(a){return $APP.xe($APP.de(function(b){return $APP.C.i("X-TAB",
3
+ b.tagName)},$APP.uc(a.children)))},uG=function(a){return $APP.r(a.hasAttribute("disabled"))},vG=function(a){return a.getAttribute("value")},wG=function(a){return $APP.Ud(function(b){return uG(b)?b:null},a)},xG=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.C.i(b,""),$APP.n(b?c:b)&&a.removeAttribute("value"))},yG=function(a,b){var c=a.hasAttribute("selected");$APP.n($APP.n(b)?$APP.r(c):b)?a.setAttribute("selected",""):(b=$APP.r(b),
4
+ $APP.n(b?c:b)&&a.removeAttribute("selected"))},zG=function(a,b){var c=a.getAttribute("tabindex");$APP.N(c,b)&&a.setAttribute("tabindex",b)},AG=function(a,b){a=a.getAttribute("controls");$APP.n($APP.n(a)?$APP.N(a,""):a)&&(a=document.getElementById(a),$APP.n(a)&&($APP.n(b)?a.removeAttribute("hidden"):a.setAttribute("hidden","")))},BG=function(a){var b=tG(a),c=a.getAttribute("value"),d=$APP.Xf($APP.Yd(vG,b));$APP.n($APP.n(c)?$APP.I(d,c):c)||(c=wG(b),c=$APP.n(c)?vG(c):null);if($APP.n(c)){a:{d=$APP.t(b);
5
+ for(var e=null,g=0,h=0;;)if(h<g){var l=e.F(null,h),m=$APP.C.i(vG(l),c);yG(l,m);m&&uG(l)?zG(l,"0"):zG(l,"-1");h+=1}else if(d=$APP.t(d))$APP.Nc(d)?(e=$APP.yb(d),d=$APP.zb(d),l=e,g=$APP.z(e),e=l):(l=$APP.u(d),e=$APP.C.i(vG(l),c),yG(l,e),e&&uG(l)?zG(l,"0"):zG(l,"-1"),d=$APP.w(d),e=null,g=0),h=0;else break a}a:for(b=$APP.t(b),d=null,g=e=0;;)if(g<e)l=d.F(null,g),AG(l,$APP.C.i(vG(l),c)),g+=1;else if(b=$APP.t(b))d=b,$APP.Nc(d)?(b=$APP.yb(d),e=$APP.zb(d),d=b,l=$APP.z(b),b=e,e=l):(l=$APP.u(d),AG(l,$APP.C.i(vG(l),
6
+ c)),b=$APP.w(d),d=null,e=0),g=0;else break a;xG(a,c)}return c},CG=function(a,b){var c=a.getAttribute("value");return $APP.n($APP.n(b)?$APP.N(c,b):b)?(xG(a,b),BG(a),a.dispatchEvent(new CustomEvent("value-change",{detail:{value:$APP.n(b)?b:""},bubbles:!0,composed:!0}))):null},DG=function(a,b,c){b=$APP.z(b)-1;var d=a+1;return d<=b?d:$APP.n(c)?0:a},EG=function(a,b,c){var d=a-1;b=$APP.z(b)-1;return d>=0?d:$APP.n(c)?b:a},FG=function(a){var b=$APP.k(a,"__x_tabs_base"),c=rG(sG(a));$APP.n(b)&&(b.setAttribute("role",
7
+ "tablist"),b.setAttribute("aria-orientation",$APP.Zk.g(c)),c=$APP.U.g(c),$APP.n($APP.n(c)?$APP.N(c,""):c)?b.setAttribute("aria-label",c):b.removeAttribute("aria-label"));return BG(a)},GG=function(a){var b=new MutationObserver(function(){return FG(a)});b.observe(a,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value","selected","disabled","controls"]});a.__x_tabs_observer=b},HG=function(a){function b(d){a:{var e=$APP.xe($APP.de(uG,tG(a))),g=rG(sG(a)),h=$APP.Zk.g(g);var l=oG.g(g);g=$APP.nm.g(g);
8
+ var m=d.key,p=e.indexOf(document.activeElement);if(p>=0&&(h=$APP.C.i(h,"horizontal")&&$APP.C.i(m,"ArrowRight")?DG(p,e,g):$APP.C.i(h,"horizontal")&&$APP.C.i(m,"ArrowLeft")?EG(p,e,g):$APP.C.i(h,"vertical")&&$APP.C.i(m,"ArrowDown")?DG(p,e,g):$APP.C.i(h,"vertical")&&$APP.C.i(m,"ArrowUp")?EG(p,e,g):$APP.C.i(m,"Home")?0:$APP.C.i(m,"End")?$APP.z(e)-1:null,h!=null)){d.preventDefault();d=$APP.Ac(e,h,null);$APP.n(d)?d.focus():d=null;l=$APP.n(d)?$APP.C.i(l,"auto")?CG(a,vG(d)):null:null;break a}l=null}return l}
9
+ function c(d){d.stopPropagation();return CG(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;GG(a)},IG=function(a){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})},KG=function(){var a=class extends HTMLElement{};a.observedAttributes=JG;a.prototype.connectedCallback=
10
+ function(){if($APP.Dg(this,"__x_tabs_initialized")){HG(this);var b=FG(this)}else{if(!$APP.Dg(this,"__x_tabs_initialized")){b=this.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");c.textContent=":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);}";
11
+ 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;HG(this);this.__x_tabs_initialized=!0}FG(this);b=this}return b};a.prototype.disconnectedCallback=function(){var b=$APP.k(this,"__x_tabs_on_tab_select");$APP.n(b)&&this.removeEventListener("tab-select",b);b=$APP.k(this,"__x_tabs_on_keydown");$APP.n(b)&&this.removeEventListener("keydown",b);b=$APP.k(this,"__x_tabs_observer");return $APP.n(b)?
12
+ b.disconnect():null};a.prototype.attributeChangedCallback=function(){return $APP.Dg(this,"__x_tabs_initialized")?FG(this):null};IG(a);return a},LG=function(){return $APP.n(customElements.get("x-tabs"))?null:customElements.define("x-tabs",KG())},oG=new $APP.K(null,"activation","activation",2128521072);var JG=["value","orientation","activation","label","loop"],pG=new $APP.S(null,new $APP.Q(null,2,["vertical",null,"horizontal",null],null),null),qG=new $APP.S(null,new $APP.Q(null,2,["auto",null,"manual",null],null),null);$APP.Qd(["value-change",new $APP.Q(null,1,[$APP.V,new $APP.Q(null,1,[$APP.Pi,$APP.Y],null)],null)]);$APP.ha("baredom.exports.x_tabs.init",LG);export const init=LG;