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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/base.js +349 -346
  2. package/dist/x-alert.js +17 -17
  3. package/dist/x-avatar-group.js +11 -11
  4. package/dist/x-avatar.js +17 -17
  5. package/dist/x-badge.js +11 -11
  6. package/dist/x-breadcrumbs.js +14 -14
  7. package/dist/x-button.js +15 -15
  8. package/dist/x-cancel-dialogue.js +16 -16
  9. package/dist/x-card.js +7 -7
  10. package/dist/x-chart.js +47 -47
  11. package/dist/x-checkbox.js +11 -11
  12. package/dist/x-chip.js +8 -8
  13. package/dist/x-collapse.js +10 -10
  14. package/dist/x-command-palette.js +30 -30
  15. package/dist/x-container.js +6 -6
  16. package/dist/x-context-menu.js +19 -19
  17. package/dist/x-copy.js +22 -22
  18. package/dist/x-currency-field.js +21 -21
  19. package/dist/x-date-picker.js +37 -37
  20. package/dist/x-divider.js +13 -10
  21. package/dist/x-drawer.js +11 -11
  22. package/dist/x-dropdown.js +9 -9
  23. package/dist/x-fieldset.js +6 -6
  24. package/dist/x-file-download.js +7 -7
  25. package/dist/x-form-field.js +15 -15
  26. package/dist/x-form.js +9 -9
  27. package/dist/x-grid.js +7 -7
  28. package/dist/x-menu-item.js +10 -10
  29. package/dist/x-menu.js +10 -10
  30. package/dist/x-modal.js +12 -12
  31. package/dist/x-navbar.js +13 -12
  32. package/dist/x-notification-center.js +10 -9
  33. package/dist/x-pagination.js +16 -16
  34. package/dist/x-popover.js +14 -11
  35. package/dist/x-progress-circle.js +7 -7
  36. package/dist/x-progress.js +9 -8
  37. package/dist/x-radio.js +11 -11
  38. package/dist/x-search-field.js +14 -14
  39. package/dist/x-select.js +10 -10
  40. package/dist/x-sidebar.js +17 -26
  41. package/dist/x-skeleton.js +5 -5
  42. package/dist/x-slider.js +16 -16
  43. package/dist/x-spacer.js +5 -5
  44. package/dist/x-spinner.js +5 -5
  45. package/dist/x-stat.js +12 -9
  46. package/dist/x-stepper.js +16 -16
  47. package/dist/x-switch.js +10 -10
  48. package/dist/x-tab.js +8 -8
  49. package/dist/x-table-cell.js +20 -20
  50. package/dist/x-table-row.js +10 -10
  51. package/dist/x-table.js +15 -14
  52. package/dist/x-tabs.js +12 -11
  53. package/dist/x-text-area.js +17 -17
  54. package/dist/x-timeline-item.js +21 -21
  55. package/dist/x-timeline.js +9 -9
  56. package/dist/x-toast.js +23 -23
  57. package/dist/x-toaster.js +8 -8
  58. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var Ss=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},Ws=function(a){var b=$APP.l(a,"__xFieldsetRefs");if($APP.n(b)){var c=$APP.l(b,"root-el"),d=$APP.l(b,"legend-el");b=$APP.l(b,"content-el");var e=a.getAttribute("legend");e=new $APP.Q(null,4,[Ts,e,$APP.Yh,a.hasAttribute("disabled"),$APP.Ci,a.getAttribute("aria-label"),$APP.ii,a.getAttribute("aria-describedby")],null);var g=$APP.N(e),h=$APP.J(g,Ts);var k=$APP.J(g,$APP.Yh);e=$APP.J(g,$APP.Ci);g=$APP.J(g,$APP.ii);h=$APP.n(h)?
3
- h:"";k=$APP.K(k);k=new $APP.Q(null,5,[Us,h,Vs,$APP.O(h,""),$APP.V,k,$APP.$h,e,$APP.Vi,g],null);h=Us.g(k);g=Vs.g(k);e=$APP.V.g(k);d.textContent=h;$APP.n(g)?d.removeAttribute("hidden"):d.setAttribute("hidden","");d=$APP.$h.g(k);$APP.n(d)?(c.setAttribute("aria-label",d),c.removeAttribute("aria-labelledby")):(c.removeAttribute("aria-label"),$APP.n(g)?c.setAttribute("aria-labelledby","x-fieldset-legend"):c.removeAttribute("aria-labelledby"));d=$APP.Vi.g(k);$APP.n(d)?c.setAttribute("aria-describedby",d):
4
- c.removeAttribute("aria-describedby");Ss(a,"data-disabled",e);return Ss(b,"inert",e)}return null},Xs=function(a){Object.defineProperty(a,"disabled",{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute("disabled")},set:function(b){return Ss(this,"disabled",$APP.K(b))}})},Ys=function(a){Object.defineProperty(a,"legend",{configurable:!0,enumerable:!0,get:function(){return this.getAttribute("legend")},set:function(b){b!=null&&$APP.O(b)?(b=""+$APP.T.g(b),b=this.setAttribute("legend",
5
- b)):b=this.removeAttribute("legend");return b}})},$s=function(){var a=class extends HTMLElement{},b=a.prototype;a.observedAttributes=Zs;Ys(b);Xs(b);b.connectedCallback=function(){if(!$APP.n($APP.l(this,"__xFieldsetRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("div"),k=document.createElement("slot");d.textContent=":host{display:block;color-scheme:light dark;--x-fieldset-border-color:#d1d5db;--x-fieldset-border-width:1px;--x-fieldset-border-radius:8px;--x-fieldset-padding:1rem;--x-fieldset-gap:0.75rem;--x-fieldset-bg:transparent;--x-fieldset-legend-color:#374151;--x-fieldset-legend-font-size:0.875rem;--x-fieldset-legend-font-weight:600;--x-fieldset-legend-padding:0 0.375rem;--x-fieldset-disabled-opacity:0.45;}@media (prefers-color-scheme:dark){:host{--x-fieldset-border-color:#374151;--x-fieldset-legend-color:#d1d5db;}}[part\x3droot]{display:block;border:var(--x-fieldset-border-width) solid var(--x-fieldset-border-color);border-radius:var(--x-fieldset-border-radius);padding:var(--x-fieldset-padding);background:var(--x-fieldset-bg);position:relative;}:host([data-disabled]) [part\x3droot]{opacity:var(--x-fieldset-disabled-opacity);}[part\x3dlegend]{display:block;position:absolute;top:calc(-0.5em);left:calc(var(--x-fieldset-border-radius) - 0.375rem);padding:var(--x-fieldset-legend-padding);color:var(--x-fieldset-legend-color);font-size:var(--x-fieldset-legend-font-size);font-weight:var(--x-fieldset-legend-font-weight);background:inherit;line-height:1;white-space:nowrap;}[part\x3dlegend][hidden]{display:none;}[part\x3dcontent]{display:flex;flex-direction:column;gap:var(--x-fieldset-gap);}";
6
- e.setAttribute("part","root");e.setAttribute("role","group");g.setAttribute("part","legend");g.setAttribute("id","x-fieldset-legend");h.setAttribute("part","content");h.appendChild(k);e.appendChild(g);e.appendChild(h);c.appendChild(d);c.appendChild(e);this.__xFieldsetRefs={root:c,"root-el":e,"legend-el":g,"content-el":h}}return Ws(this)};b.disconnectedCallback=function(){return null};b.attributeChangedCallback=function(){return Ws(this)};return a},at=function(){return $APP.n(customElements.get("x-fieldset"))?
7
- null:customElements.define("x-fieldset",$s())},Us=new $APP.M(null,"legend","legend",-1027192245),Vs=new $APP.M(null,"legend-visible?","legend-visible?",-281107501),Ts=new $APP.M(null,"legend-raw","legend-raw",907427195);var Zs=["legend","disabled","aria-label","aria-describedby"];$APP.ka("baredom.exports.x_fieldset.init",at);export const init=at;
2
+ var Us=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},Ys=function(a){var b=$APP.l(a,"__xFieldsetRefs");if($APP.n(b)){var c=$APP.l(b,"root-el"),d=$APP.l(b,"legend-el");b=$APP.l(b,"content-el");var e=a.getAttribute("legend");e=new $APP.Q(null,4,[Vs,e,$APP.Sh,a.hasAttribute("disabled"),$APP.wi,a.getAttribute("aria-label"),$APP.ci,a.getAttribute("aria-describedby")],null);var g=$APP.N(e),h=$APP.I(g,Vs);var k=$APP.I(g,$APP.Sh);e=$APP.I(g,$APP.wi);g=$APP.I(g,$APP.ci);h=$APP.n(h)?
3
+ h:"";k=$APP.K(k);k=new $APP.Q(null,5,[Ws,h,Xs,$APP.O(h,""),$APP.V,k,$APP.Uh,e,$APP.Pi,g],null);h=Ws.g(k);g=Xs.g(k);e=$APP.V.g(k);d.textContent=h;$APP.n(g)?d.removeAttribute("hidden"):d.setAttribute("hidden","");d=$APP.Uh.g(k);$APP.n(d)?(c.setAttribute("aria-label",d),c.removeAttribute("aria-labelledby")):(c.removeAttribute("aria-label"),$APP.n(g)?c.setAttribute("aria-labelledby","x-fieldset-legend"):c.removeAttribute("aria-labelledby"));d=$APP.Pi.g(k);$APP.n(d)?c.setAttribute("aria-describedby",d):
4
+ c.removeAttribute("aria-describedby");Us(a,"data-disabled",e);return Us(b,"inert",e)}return null},Zs=function(a){Object.defineProperty(a,"disabled",{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute("disabled")},set:function(b){return Us(this,"disabled",$APP.K(b))}})},$s=function(a){Object.defineProperty(a,"legend",{configurable:!0,enumerable:!0,get:function(){return this.getAttribute("legend")},set:function(b){b!=null&&$APP.O(b)?(b=""+$APP.T.g(b),b=this.setAttribute("legend",
5
+ b)):b=this.removeAttribute("legend");return b}})},bt=function(){var a=class extends HTMLElement{},b=a.prototype;a.observedAttributes=at;$s(b);Zs(b);b.connectedCallback=function(){if(!$APP.n($APP.l(this,"__xFieldsetRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("div"),k=document.createElement("slot");d.textContent=":host{display:block;color-scheme:light dark;--x-fieldset-border-color:#d1d5db;--x-fieldset-border-width:1px;--x-fieldset-border-radius:8px;--x-fieldset-padding:1rem;--x-fieldset-gap:0.75rem;--x-fieldset-bg:transparent;--x-fieldset-legend-color:#374151;--x-fieldset-legend-font-size:0.875rem;--x-fieldset-legend-font-weight:600;--x-fieldset-legend-padding:0 0.375rem;--x-fieldset-disabled-opacity:0.45;}@media (prefers-color-scheme:dark){:host{--x-fieldset-border-color:#374151;--x-fieldset-legend-color:#d1d5db;}}[part\x3droot]{display:block;border:var(--x-fieldset-border-width) solid var(--x-fieldset-border-color);border-radius:var(--x-fieldset-border-radius);padding:var(--x-fieldset-padding);background:var(--x-fieldset-bg);position:relative;}:host([data-disabled]) [part\x3droot]{opacity:var(--x-fieldset-disabled-opacity);}[part\x3dlegend]{display:block;position:absolute;top:calc(-0.5em);left:calc(var(--x-fieldset-border-radius) - 0.375rem);padding:var(--x-fieldset-legend-padding);color:var(--x-fieldset-legend-color);font-size:var(--x-fieldset-legend-font-size);font-weight:var(--x-fieldset-legend-font-weight);background:inherit;line-height:1;white-space:nowrap;}[part\x3dlegend][hidden]{display:none;}[part\x3dcontent]{display:flex;flex-direction:column;gap:var(--x-fieldset-gap);}";
6
+ e.setAttribute("part","root");e.setAttribute("role","group");g.setAttribute("part","legend");g.setAttribute("id","x-fieldset-legend");h.setAttribute("part","content");h.appendChild(k);e.appendChild(g);e.appendChild(h);c.appendChild(d);c.appendChild(e);this.__xFieldsetRefs={root:c,"root-el":e,"legend-el":g,"content-el":h}}return Ys(this)};b.disconnectedCallback=function(){return null};b.attributeChangedCallback=function(){return Ys(this)};return a},ct=function(){return $APP.n(customElements.get("x-fieldset"))?
7
+ null:customElements.define("x-fieldset",bt())},Ws=new $APP.M(null,"legend","legend",-1027192245),Xs=new $APP.M(null,"legend-visible?","legend-visible?",-281107501),Vs=new $APP.M(null,"legend-raw","legend-raw",907427195);var at=["legend","disabled","aria-label","aria-describedby"];$APP.ja("baredom.exports.x_fieldset.init",ct);export const init=ct;
@@ -1,9 +1,9 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var Op=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},Sp=function(a){a=new $APP.Q(null,4,[Pp,a.getAttribute("href"),Qp,a.getAttribute("filename"),$APP.Yh,a.hasAttribute("disabled"),$APP.Ci,a.getAttribute("aria-label")],null);var b=$APP.N(a);a=$APP.J(b,Pp);var c=$APP.J(b,Qp),d=$APP.J(b,$APP.Yh);b=$APP.J(b,$APP.Ci);return new $APP.Q(null,4,[$APP.Wi,$APP.n(a)?a:"",Rp,$APP.n(c)?c:"",$APP.V,$APP.K(d),$APP.$h,b],null)},Tp=function(a){var b=$APP.l(a,"__xFileDownloadRefs");if($APP.n(b)){b=
3
- $APP.l(b,"anchor-el");var c=Sp(a),d=$APP.Wi.g(c),e=Rp.g(c),g=$APP.V.g(c);c=$APP.$h.g(c);b.href=d;typeof e==="string"&&$APP.O(e,"")?b.setAttribute("download",e):(e=typeof d==="string",$APP.n(e?d.startsWith("data:"):e)?b.setAttribute("download",""):b.removeAttribute("download"));$APP.n(g)?b.setAttribute("aria-disabled","true"):b.removeAttribute("aria-disabled");$APP.n(c)?b.setAttribute("aria-label",c):b.removeAttribute("aria-label");return Op(a,"data-disabled",g)}return null},Up=function(a){return function(b){if($APP.n(a.hasAttribute("disabled")))return b.preventDefault();
4
- var c=Sp(a);c={href:$APP.Wi.g(c),filename:Rp.g(c)};c=new CustomEvent("x-file-download-click",{detail:c,bubbles:!0,composed:!0,cancelable:!0});a.dispatchEvent(c);return $APP.n(c.defaultPrevented)?b.preventDefault():null}},Vp=function(a){var b=$APP.l(a,"__xFileDownloadHandlers"),c=$APP.l(a,"__xFileDownloadRefs");$APP.n($APP.n(b)?c:b)&&(c=$APP.l(c,"anchor-el"),b=$APP.l(b,"click"),$APP.n(b)&&c.removeEventListener("click",b));return a.__xFileDownloadHandlers=null},Wp=function(a,b,c){Object.defineProperty(a,
5
- b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.n(d)?d:""},set:function(d){d!=null&&$APP.O(d)?(d=""+$APP.T.g(d),d=this.setAttribute(c,d)):d=this.removeAttribute(c);return d}})},Xp=function(a){Object.defineProperty(a,"disabled",{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute("disabled")},set:function(b){return Op(this,"disabled",$APP.K(b))}})},Zp=function(){var a=class extends HTMLElement{},b=a.prototype;Object.defineProperty(a,"observedAttributes",
6
- {get:function(){return Yp}});Wp(b,"href","href");Wp(b,"filename","filename");Xp(b);b.connectedCallback=function(){if(!$APP.n($APP.l(this,"__xFileDownloadRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("a"),g=document.createElement("span"),h=document.createElement("span"),k=document.createElement("slot");d.textContent=":host{display:inline-block;color-scheme:light dark;--x-file-download-bg:#2563eb;--x-file-download-color:#ffffff;--x-file-download-hover-bg:#1d4ed8;--x-file-download-active-bg:#1e40af;--x-file-download-border-radius:6px;--x-file-download-padding:0.5rem 1rem;--x-file-download-font-size:0.875rem;--x-file-download-font-weight:500;--x-file-download-gap:0.375rem;--x-file-download-icon-size:1em;--x-file-download-focus-ring:#60a5fa;--x-file-download-disabled-opacity:0.45;--x-file-download-transition:background 120ms ease;}@media (prefers-color-scheme:dark){:host{--x-file-download-bg:#3b82f6;--x-file-download-hover-bg:#2563eb;--x-file-download-active-bg:#1d4ed8;--x-file-download-focus-ring:#93c5fd;}}[part\x3danchor]{display:inline-flex;align-items:center;gap:var(--x-file-download-gap);padding:var(--x-file-download-padding);background:var(--x-file-download-bg);color:var(--x-file-download-color);border-radius:var(--x-file-download-border-radius);font-size:var(--x-file-download-font-size);font-weight:var(--x-file-download-font-weight);text-decoration:none;cursor:pointer;box-sizing:border-box;transition:var(--x-file-download-transition);outline:none;user-select:none;-webkit-user-select:none;}[part\x3danchor]:hover{background:var(--x-file-download-hover-bg);}[part\x3danchor]:active{background:var(--x-file-download-active-bg);}[part\x3danchor]:focus-visible{outline:2px solid var(--x-file-download-focus-ring);outline-offset:2px;}[part\x3dicon]{display:inline-flex;align-items:center;justify-content:center;width:var(--x-file-download-icon-size);height:var(--x-file-download-icon-size);flex-shrink:0;}[part\x3dcontent]{display:inline;}:host([data-disabled]) [part\x3danchor]{opacity:var(--x-file-download-disabled-opacity);pointer-events:none;cursor:default;}@media (prefers-reduced-motion:reduce){[part\x3danchor]{transition:none;}}";
2
+ var Qp=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},Up=function(a){a=new $APP.Q(null,4,[Rp,a.getAttribute("href"),Sp,a.getAttribute("filename"),$APP.Sh,a.hasAttribute("disabled"),$APP.wi,a.getAttribute("aria-label")],null);var b=$APP.N(a);a=$APP.I(b,Rp);var c=$APP.I(b,Sp),d=$APP.I(b,$APP.Sh);b=$APP.I(b,$APP.wi);return new $APP.Q(null,4,[$APP.Qi,$APP.n(a)?a:"",Tp,$APP.n(c)?c:"",$APP.V,$APP.K(d),$APP.Uh,b],null)},Vp=function(a){var b=$APP.l(a,"__xFileDownloadRefs");if($APP.n(b)){b=
3
+ $APP.l(b,"anchor-el");var c=Up(a),d=$APP.Qi.g(c),e=Tp.g(c),g=$APP.V.g(c);c=$APP.Uh.g(c);b.href=d;typeof e==="string"&&$APP.O(e,"")?b.setAttribute("download",e):(e=typeof d==="string",$APP.n(e?d.startsWith("data:"):e)?b.setAttribute("download",""):b.removeAttribute("download"));$APP.n(g)?b.setAttribute("aria-disabled","true"):b.removeAttribute("aria-disabled");$APP.n(c)?b.setAttribute("aria-label",c):b.removeAttribute("aria-label");return Qp(a,"data-disabled",g)}return null},Wp=function(a){return function(b){if($APP.n(a.hasAttribute("disabled")))return b.preventDefault();
4
+ var c=Up(a);c={href:$APP.Qi.g(c),filename:Tp.g(c)};c=new CustomEvent("x-file-download-click",{detail:c,bubbles:!0,composed:!0,cancelable:!0});a.dispatchEvent(c);return $APP.n(c.defaultPrevented)?b.preventDefault():null}},Xp=function(a){var b=$APP.l(a,"__xFileDownloadHandlers"),c=$APP.l(a,"__xFileDownloadRefs");$APP.n($APP.n(b)?c:b)&&(c=$APP.l(c,"anchor-el"),b=$APP.l(b,"click"),$APP.n(b)&&c.removeEventListener("click",b));return a.__xFileDownloadHandlers=null},Yp=function(a,b,c){Object.defineProperty(a,
5
+ b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.n(d)?d:""},set:function(d){d!=null&&$APP.O(d)?(d=""+$APP.T.g(d),d=this.setAttribute(c,d)):d=this.removeAttribute(c);return d}})},Zp=function(a){Object.defineProperty(a,"disabled",{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute("disabled")},set:function(b){return Qp(this,"disabled",$APP.K(b))}})},aq=function(){var a=class extends HTMLElement{},b=a.prototype;Object.defineProperty(a,"observedAttributes",
6
+ {get:function(){return $p}});Yp(b,"href","href");Yp(b,"filename","filename");Zp(b);b.connectedCallback=function(){if(!$APP.n($APP.l(this,"__xFileDownloadRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("a"),g=document.createElement("span"),h=document.createElement("span"),k=document.createElement("slot");d.textContent=":host{display:inline-block;color-scheme:light dark;--x-file-download-bg:#2563eb;--x-file-download-color:#ffffff;--x-file-download-hover-bg:#1d4ed8;--x-file-download-active-bg:#1e40af;--x-file-download-border-radius:6px;--x-file-download-padding:0.5rem 1rem;--x-file-download-font-size:0.875rem;--x-file-download-font-weight:500;--x-file-download-gap:0.375rem;--x-file-download-icon-size:1em;--x-file-download-focus-ring:#60a5fa;--x-file-download-disabled-opacity:0.45;--x-file-download-transition:background 120ms ease;}@media (prefers-color-scheme:dark){:host{--x-file-download-bg:#3b82f6;--x-file-download-hover-bg:#2563eb;--x-file-download-active-bg:#1d4ed8;--x-file-download-focus-ring:#93c5fd;}}[part\x3danchor]{display:inline-flex;align-items:center;gap:var(--x-file-download-gap);padding:var(--x-file-download-padding);background:var(--x-file-download-bg);color:var(--x-file-download-color);border-radius:var(--x-file-download-border-radius);font-size:var(--x-file-download-font-size);font-weight:var(--x-file-download-font-weight);text-decoration:none;cursor:pointer;box-sizing:border-box;transition:var(--x-file-download-transition);outline:none;user-select:none;-webkit-user-select:none;}[part\x3danchor]:hover{background:var(--x-file-download-hover-bg);}[part\x3danchor]:active{background:var(--x-file-download-active-bg);}[part\x3danchor]:focus-visible{outline:2px solid var(--x-file-download-focus-ring);outline-offset:2px;}[part\x3dicon]{display:inline-flex;align-items:center;justify-content:center;width:var(--x-file-download-icon-size);height:var(--x-file-download-icon-size);flex-shrink:0;}[part\x3dcontent]{display:inline;}:host([data-disabled]) [part\x3danchor]{opacity:var(--x-file-download-disabled-opacity);pointer-events:none;cursor:default;}@media (prefers-reduced-motion:reduce){[part\x3danchor]{transition:none;}}";
7
7
  e.setAttribute("part","anchor");g.setAttribute("part","icon");h.setAttribute("part","content");g.innerHTML='\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" viewBox\x3d"0 0 16 16" fill\x3d"currentColor" width\x3d"1em" height\x3d"1em" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M8 1a.75.75 0 0 1 .75.75v6.19l1.97-1.97a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.03a.75.75 0 0 1 1.06-1.06L7.25 7.94V1.75A.75.75 0 0 1 8 1ZM2.5 13.25a.75.75 0 0 1 .75-.75h9.5a.75.75 0 0 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75Z"/\x3e\x3c/svg\x3e';
8
- h.appendChild(k);e.appendChild(g);e.appendChild(h);c.appendChild(d);c.appendChild(e);this.__xFileDownloadRefs={"anchor-el":e,"icon-el":g,"content-el":h}}Vp(this);c=Up(this);$APP.l($APP.l(this,"__xFileDownloadRefs"),"anchor-el").addEventListener("click",c);this.__xFileDownloadHandlers={click:c};return Tp(this)};b.disconnectedCallback=function(){return Vp(this)};b.attributeChangedCallback=function(){return Tp(this)};return a},$p=function(){return $APP.n(customElements.get("x-file-download"))?null:customElements.define("x-file-download",
9
- Zp())},Qp=new $APP.M(null,"filename-raw","filename-raw",-706184256),Rp=new $APP.M(null,"filename","filename",-1428840783),Pp=new $APP.M(null,"href-raw","href-raw",-1680949453);var Yp=["href","filename","disabled","aria-label"];$APP.ka("baredom.exports.x_file_download.init",$p);export const init=$p;
8
+ h.appendChild(k);e.appendChild(g);e.appendChild(h);c.appendChild(d);c.appendChild(e);this.__xFileDownloadRefs={"anchor-el":e,"icon-el":g,"content-el":h}}Xp(this);c=Wp(this);$APP.l($APP.l(this,"__xFileDownloadRefs"),"anchor-el").addEventListener("click",c);this.__xFileDownloadHandlers={click:c};return Vp(this)};b.disconnectedCallback=function(){return Xp(this)};b.attributeChangedCallback=function(){return Vp(this)};return a},bq=function(){return $APP.n(customElements.get("x-file-download"))?null:customElements.define("x-file-download",
9
+ aq())},Sp=new $APP.M(null,"filename-raw","filename-raw",-706184256),Tp=new $APP.M(null,"filename","filename",-1428840783),Rp=new $APP.M(null,"href-raw","href-raw",-1680949453);var $p=["href","filename","disabled","aria-label"];$APP.ja("baredom.exports.x_file_download.init",bq);export const init=bq;
@@ -1,18 +1,18 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var zB=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},AB=function(a,b,c){var d=a.hasAttribute("error");var e=a.getAttribute("error");e=$APP.n(e)?e:"";a=a.hasAttribute("required");var g=c.value;return $APP.n(d)?b.setValidity({customError:!0},e,c):$APP.n($APP.n(a)?$APP.C.h(g,""):a)?b.setValidity({valueMissing:!0},"Please fill in this field.",c):b.setValidity({},"",c)},CB=function(a){var b=$APP.l(a,"__xFormFieldRefs");if($APP.n(b)){var c=$APP.l(b,"label"),d=$APP.l(b,"input"),
3
- e=$APP.l(b,"hint");b=$APP.l(b,"error");var g=$APP.cf([$APP.ch,$APP.Jh,$APP.sh,$APP.Eh,$APP.Yh,$APP.Cg,$APP.ti,$APP.Ei,$APP.bh,$APP.ih,$APP.vh],[a.getAttribute("label"),a.getAttribute("name"),a.getAttribute("error"),a.getAttribute("hint"),a.hasAttribute("disabled"),a.hasAttribute("required"),a.hasAttribute("readonly"),a.getAttribute("value"),a.getAttribute("autocomplete"),a.getAttribute("type"),a.getAttribute("placeholder")]);var h=$APP.N(g),k=$APP.J(h,$APP.vh),m=$APP.J(h,$APP.ch),q=$APP.J(h,$APP.Jh);
4
- g=$APP.J(h,$APP.sh);var r=$APP.J(h,$APP.Eh),v=$APP.J(h,$APP.Yh),w=$APP.J(h,$APP.Cg),z=$APP.J(h,$APP.ti),A=$APP.J(h,$APP.Ei),D=$APP.J(h,$APP.bh),F=$APP.J(h,$APP.ih);h=$APP.n(g)?g:"";var I=$APP.n(r)?r:"",E=$APP.n(m)?m:"",R=[$APP.ah,$APP.aj,$APP.Bi,$APP.fh,$APP.gi,$APP.U,$APP.Mh,$APP.Z,$APP.jh,$APP.ki,$APP.W,$APP.ph,$APP.mi,$APP.V];w=$APP.K(w);z=$APP.K(z);k=$APP.n(k)?k:"";r=typeof r==="string"&&$APP.O(r,"")&&r!=null;q=$APP.n(q)?q:"";A=$APP.n(A)?A:"";m=typeof m==="string"&&$APP.O(m,"")&&m!=null;F=typeof F===
5
- "string"&&$APP.Cc(BB,F)?F:"text";g=$APP.cf(R,[w,z,k,r,q,A,m,F,typeof g==="string"&&$APP.O(g,"")&&g!=null,I,E,h,$APP.n(D)?D:"",$APP.K(v)]);v=$APP.jh.g(g);D=$APP.fh.g(g);h=$APP.Mh.g(g);d.type=$APP.Z.g(g);d.name=$APP.gi.g(g);d.placeholder=$APP.Bi.g(g);d.disabled=$APP.V.g(g);d.readOnly=$APP.aj.g(g);d.required=$APP.ah.g(g);d.autocomplete=$APP.mi.g(g);I=$APP.n($APP.ah.g(g))?"true":"false";d.setAttribute("aria-required",I);d.setAttribute("aria-invalid",$APP.n(v)?"true":"false");I=$APP.n($APP.n(D)?v:D)?"hint error":
6
- $APP.n(D)?"hint":$APP.n(v)?"error":null;$APP.n(I)?d.setAttribute("aria-describedby",I):d.removeAttribute("aria-describedby");c.textContent=$APP.W.g(g);$APP.n(h)?c.classList.remove("label-hidden"):c.classList.add("label-hidden");e.textContent=$APP.ki.g(g);$APP.n(D)?e.classList.remove("hint-hidden"):e.classList.add("hint-hidden");b.textContent=$APP.ph.g(g);$APP.n(v)?b.classList.remove("error-hidden"):b.classList.add("error-hidden");zB(a,"data-invalid",v);c=$APP.l(a,"__xFormFieldInternals");return $APP.n(c)?
7
- AB(a,c,d):null}return null},DB=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1}))},EB=function(a){return function(){var b=$APP.l(a,"__xFormFieldRefs");if($APP.n(b)){b=$APP.l(b,"input");var c=b.value;var d=a.getAttribute("name");d=$APP.n(d)?d:"";var e=$APP.l(a,"__xFormFieldInternals");$APP.n(e)&&(e.setFormValue(c),AB(a,e,b));return DB(a,"x-form-field-input",{name:d,value:c})}return null}},FB=function(a){return function(){var b=$APP.l(a,"__xFormFieldRefs");
8
- if($APP.n(b)){b=$APP.l(b,"input");var c=b.value;var d=a.getAttribute("name");d=$APP.n(d)?d:"";var e=$APP.l(a,"__xFormFieldInternals");$APP.n(e)&&(e.setFormValue(c),AB(a,e,b));return DB(a,"x-form-field-change",{name:d,value:c})}return null}},GB=function(a){var b=$APP.l(a,"__xFormFieldRefs");if($APP.n(b)){var c=$APP.l(a,"__xFormFieldHandlers");if($APP.n(c)){b=$APP.l(b,"input");b.removeEventListener("input",$APP.l(c,"input"));b.removeEventListener("change",$APP.l(c,"change"));a.__xFormFieldHandlers=
9
- null;return}}return null},HB=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.n(d)?d:""},set:function(d){d!=null&&$APP.O(d)?(d=""+$APP.T.g(d),d=this.setAttribute(c,d)):d=this.removeAttribute(c);return d}})},IB=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return zB(this,c,$APP.K(d))}})},JB=function(a){Object.defineProperty(a,"value",{configurable:!0,
10
- enumerable:!0,get:function(){var b=$APP.l(this,"__xFormFieldRefs");if($APP.n(b))return $APP.l(b,"input").value;b=this.getAttribute("value");return $APP.n(b)?b:""},set:function(b){b=b!=null&&$APP.O(b)?""+$APP.T.g(b):"";this.setAttribute("value",b);var c=$APP.l(this,"__xFormFieldRefs");return $APP.n(c)?$APP.l(c,"input").value=b:null}})},LB=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;Object.defineProperty(a,"observedAttributes",{get:function(){return KB}});JB(b);HB(b,
11
- "label","label");HB(b,"type","type");HB(b,"name","name");HB(b,"placeholder","placeholder");HB(b,"autocomplete","autocomplete");IB(b,"disabled","disabled");IB(b,"readOnly","readonly");IB(b,"required","required");b.connectedCallback=function(){if(!$APP.n($APP.l(this,"__xFormFieldRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("div"),g=document.createElement("label"),h=document.createElement("div"),k=document.createElement("input"),m=document.createElement("span"),
2
+ var JB=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},KB=function(a,b,c){var d=a.hasAttribute("error");var e=a.getAttribute("error");e=$APP.n(e)?e:"";a=a.hasAttribute("required");var g=c.value;return $APP.n(d)?b.setValidity({customError:!0},e,c):$APP.n($APP.n(a)?$APP.C.h(g,""):a)?b.setValidity({valueMissing:!0},"Please fill in this field.",c):b.setValidity({},"",c)},MB=function(a){var b=$APP.l(a,"__xFormFieldRefs");if($APP.n(b)){var c=$APP.l(b,"label"),d=$APP.l(b,"input"),
3
+ e=$APP.l(b,"hint");b=$APP.l(b,"error");var g=$APP.Xe([$APP.Wg,$APP.Dh,$APP.lh,$APP.yh,$APP.Sh,$APP.ug,$APP.mi,$APP.yi,$APP.Vg,$APP.bh,$APP.ph],[a.getAttribute("label"),a.getAttribute("name"),a.getAttribute("error"),a.getAttribute("hint"),a.hasAttribute("disabled"),a.hasAttribute("required"),a.hasAttribute("readonly"),a.getAttribute("value"),a.getAttribute("autocomplete"),a.getAttribute("type"),a.getAttribute("placeholder")]);var h=$APP.N(g),k=$APP.I(h,$APP.ph),m=$APP.I(h,$APP.Wg),q=$APP.I(h,$APP.Dh);
4
+ g=$APP.I(h,$APP.lh);var r=$APP.I(h,$APP.yh),v=$APP.I(h,$APP.Sh),w=$APP.I(h,$APP.ug),z=$APP.I(h,$APP.mi),A=$APP.I(h,$APP.yi),D=$APP.I(h,$APP.Vg),G=$APP.I(h,$APP.bh);h=$APP.n(g)?g:"";var J=$APP.n(r)?r:"",E=$APP.n(m)?m:"",R=[$APP.Tg,$APP.Vi,$APP.vi,$APP.Zg,$APP.ai,$APP.U,$APP.Gh,$APP.Z,$APP.ch,$APP.ei,$APP.W,$APP.ih,$APP.gi,$APP.V];w=$APP.K(w);z=$APP.K(z);k=$APP.n(k)?k:"";r=typeof r==="string"&&$APP.O(r,"")&&r!=null;q=$APP.n(q)?q:"";A=$APP.n(A)?A:"";m=typeof m==="string"&&$APP.O(m,"")&&m!=null;G=typeof G===
5
+ "string"&&$APP.yc(LB,G)?G:"text";g=$APP.Xe(R,[w,z,k,r,q,A,m,G,typeof g==="string"&&$APP.O(g,"")&&g!=null,J,E,h,$APP.n(D)?D:"",$APP.K(v)]);v=$APP.ch.g(g);D=$APP.Zg.g(g);h=$APP.Gh.g(g);d.type=$APP.Z.g(g);d.name=$APP.ai.g(g);d.placeholder=$APP.vi.g(g);d.disabled=$APP.V.g(g);d.readOnly=$APP.Vi.g(g);d.required=$APP.Tg.g(g);d.autocomplete=$APP.gi.g(g);J=$APP.n($APP.Tg.g(g))?"true":"false";d.setAttribute("aria-required",J);d.setAttribute("aria-invalid",$APP.n(v)?"true":"false");J=$APP.n($APP.n(D)?v:D)?"hint error":
6
+ $APP.n(D)?"hint":$APP.n(v)?"error":null;$APP.n(J)?d.setAttribute("aria-describedby",J):d.removeAttribute("aria-describedby");c.textContent=$APP.W.g(g);$APP.n(h)?c.classList.remove("label-hidden"):c.classList.add("label-hidden");e.textContent=$APP.ei.g(g);$APP.n(D)?e.classList.remove("hint-hidden"):e.classList.add("hint-hidden");b.textContent=$APP.ih.g(g);$APP.n(v)?b.classList.remove("error-hidden"):b.classList.add("error-hidden");JB(a,"data-invalid",v);c=$APP.l(a,"__xFormFieldInternals");return $APP.n(c)?
7
+ KB(a,c,d):null}return null},NB=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1}))},OB=function(a){return function(){var b=$APP.l(a,"__xFormFieldRefs");if($APP.n(b)){b=$APP.l(b,"input");var c=b.value;var d=a.getAttribute("name");d=$APP.n(d)?d:"";var e=$APP.l(a,"__xFormFieldInternals");$APP.n(e)&&(e.setFormValue(c),KB(a,e,b));return NB(a,"x-form-field-input",{name:d,value:c})}return null}},PB=function(a){return function(){var b=$APP.l(a,"__xFormFieldRefs");
8
+ if($APP.n(b)){b=$APP.l(b,"input");var c=b.value;var d=a.getAttribute("name");d=$APP.n(d)?d:"";var e=$APP.l(a,"__xFormFieldInternals");$APP.n(e)&&(e.setFormValue(c),KB(a,e,b));return NB(a,"x-form-field-change",{name:d,value:c})}return null}},QB=function(a){var b=$APP.l(a,"__xFormFieldRefs");if($APP.n(b)){var c=$APP.l(a,"__xFormFieldHandlers");if($APP.n(c)){b=$APP.l(b,"input");b.removeEventListener("input",$APP.l(c,"input"));b.removeEventListener("change",$APP.l(c,"change"));a.__xFormFieldHandlers=
9
+ null;return}}return null},RB=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.n(d)?d:""},set:function(d){d!=null&&$APP.O(d)?(d=""+$APP.T.g(d),d=this.setAttribute(c,d)):d=this.removeAttribute(c);return d}})},SB=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return JB(this,c,$APP.K(d))}})},TB=function(a){Object.defineProperty(a,"value",{configurable:!0,
10
+ enumerable:!0,get:function(){var b=$APP.l(this,"__xFormFieldRefs");if($APP.n(b))return $APP.l(b,"input").value;b=this.getAttribute("value");return $APP.n(b)?b:""},set:function(b){b=b!=null&&$APP.O(b)?""+$APP.T.g(b):"";this.setAttribute("value",b);var c=$APP.l(this,"__xFormFieldRefs");return $APP.n(c)?$APP.l(c,"input").value=b:null}})},VB=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;Object.defineProperty(a,"observedAttributes",{get:function(){return UB}});TB(b);RB(b,
11
+ "label","label");RB(b,"type","type");RB(b,"name","name");RB(b,"placeholder","placeholder");RB(b,"autocomplete","autocomplete");SB(b,"disabled","disabled");SB(b,"readOnly","readonly");SB(b,"required","required");b.connectedCallback=function(){if(!$APP.n($APP.l(this,"__xFormFieldRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("div"),g=document.createElement("label"),h=document.createElement("div"),k=document.createElement("input"),m=document.createElement("span"),
12
12
  q=document.createElement("span");d.textContent=":host{display:block;color-scheme:light dark;--x-form-field-label-color:#374151;--x-form-field-label-font-size:0.875rem;--x-form-field-input-bg:#ffffff;--x-form-field-input-color:#111827;--x-form-field-input-border:1px solid #d1d5db;--x-form-field-input-border-radius:6px;--x-form-field-input-padding:0.5rem 0.75rem;--x-form-field-focus-ring-color:#2563eb;--x-form-field-error-color:#dc2626;--x-form-field-hint-color:#6b7280;--x-form-field-disabled-opacity:0.45;}@media (prefers-color-scheme:dark){:host{--x-form-field-label-color:#d1d5db;--x-form-field-input-bg:#1f2937;--x-form-field-input-color:#f9fafb;--x-form-field-input-border:1px solid #4b5563;--x-form-field-focus-ring-color:#3b82f6;--x-form-field-error-color:#f87171;--x-form-field-hint-color:#9ca3af;}}[part\x3dfield]{display:flex;flex-direction:column;gap:0.25rem;}[part\x3dlabel]{display:block;font-size:var(--x-form-field-label-font-size);font-weight:500;color:var(--x-form-field-label-color);}.label-hidden{display:none;}[part\x3dinput-wrapper]{display:block;}[part\x3dinput]{display:block;width:100%;box-sizing:border-box;padding:var(--x-form-field-input-padding);background:var(--x-form-field-input-bg);color:var(--x-form-field-input-color);border:var(--x-form-field-input-border);border-radius:var(--x-form-field-input-border-radius);font-size:1rem;line-height:1.5;font-family:inherit;outline:none;transition:border-color 120ms ease,box-shadow 120ms ease;}[part\x3dinput]:focus{border-color:var(--x-form-field-focus-ring-color);box-shadow:0 0 0 3px color-mix(in srgb,var(--x-form-field-focus-ring-color) 20%,transparent);}:host([data-invalid]) [part\x3dinput]{border-color:var(--x-form-field-error-color);}:host([data-invalid]) [part\x3dinput]:focus{box-shadow:0 0 0 3px color-mix(in srgb,var(--x-form-field-error-color) 20%,transparent);}[part\x3dinput]:disabled{opacity:var(--x-form-field-disabled-opacity);cursor:not-allowed;}[part\x3dhint]{display:block;font-size:0.8125rem;color:var(--x-form-field-hint-color);}.hint-hidden{display:none;}[part\x3derror]{display:block;font-size:0.8125rem;color:var(--x-form-field-error-color);}.error-hidden{display:none;}@media (prefers-reduced-motion:reduce){[part\x3dinput]{transition:none;}}";
13
13
  e.setAttribute("part","field");g.setAttribute("part","label");g.setAttribute("id","label");g.setAttribute("for","input");h.setAttribute("part","input-wrapper");k.setAttribute("part","input");k.setAttribute("id","input");k.setAttribute("aria-labelledby","label");m.setAttribute("part","hint");m.setAttribute("id","hint");m.setAttribute("aria-live","polite");q.setAttribute("part","error");q.setAttribute("id","error");q.setAttribute("role","alert");q.setAttribute("aria-live","assertive");h.appendChild(k);
14
- e.appendChild(g);e.appendChild(h);e.appendChild(m);e.appendChild(q);c.appendChild(d);c.appendChild(e);this.__xFormFieldRefs={field:e,label:g,input:k,hint:m,error:q};$APP.n(this.attachInternals)&&(this.__xFormFieldInternals=this.attachInternals())}GB(this);c=$APP.l(this,"__xFormFieldRefs");$APP.n(c)&&(c=$APP.l(c,"input"),d=this.getAttribute("value"),$APP.n(d)&&(c.value=d));c=$APP.l(this,"__xFormFieldInternals");$APP.n(c)&&(d=c.setFormValue,e=this.getAttribute("value"),d.call(c,$APP.n(e)?e:""));c=$APP.l(this,
15
- "__xFormFieldRefs");$APP.n(c)&&(c=$APP.l(c,"input"),d=EB(this),e=FB(this),c.addEventListener("input",d),c.addEventListener("change",e),this.__xFormFieldHandlers={input:d,change:e});return CB(this)};b.disconnectedCallback=function(){return GB(this)};b.attributeChangedCallback=function(c,d,e){$APP.C.h(c,"value")&&(c=$APP.l(this,"__xFormFieldRefs"),$APP.n(c)&&(c=$APP.l(c,"input"),$APP.O(c.value,e)&&(c.value=$APP.n(e)?e:"")));return CB(this)};b.formDisabledCallback=function(c){zB(this,"disabled",$APP.K(c));
16
- return CB(this)};b.formResetCallback=function(){this.removeAttribute("value");var c=$APP.l(this,"__xFormFieldRefs");$APP.n(c)&&($APP.l(c,"input").value="");c=$APP.l(this,"__xFormFieldInternals");$APP.n(c)&&c.setFormValue("");return CB(this)};return a},MB=function(){return $APP.n(customElements.get("x-form-field"))?null:customElements.define("x-form-field",LB())};var KB="label type name value placeholder hint error disabled readonly required autocomplete".split(" "),BB=new $APP.S(null,new $APP.Q(null,6,["url",null,"tel",null,"email",null,"text",null,"number",null,"password",null],null),null);
17
- $APP.cf([$APP.Bi,$APP.wi,$APP.gi,$APP.U,$APP.hi,$APP.Z,$APP.W,$APP.mi,$APP.Mg],[new $APP.Q(null,2,[$APP.Z,$APP.X,$APP.Pg,"placeholder"],null),new $APP.Q(null,2,[$APP.Z,$APP.Ji,$APP.Pg,"disabled"],null),new $APP.Q(null,2,[$APP.Z,$APP.X,$APP.Pg,"name"],null),new $APP.Q(null,2,[$APP.Z,$APP.X,$APP.Pg,"value"],null),new $APP.Q(null,2,[$APP.Z,$APP.Ji,$APP.Pg,"readonly"],null),new $APP.Q(null,2,[$APP.Z,$APP.X,$APP.Pg,"type"],null),new $APP.Q(null,2,[$APP.Z,$APP.X,$APP.Pg,"label"],null),new $APP.Q(null,2,
18
- [$APP.Z,$APP.X,$APP.Pg,"autocomplete"],null),new $APP.Q(null,2,[$APP.Z,$APP.Ji,$APP.Pg,"required"],null)]);$APP.ka("baredom.exports.x_form_field.init",MB);export const init=MB;
14
+ e.appendChild(g);e.appendChild(h);e.appendChild(m);e.appendChild(q);c.appendChild(d);c.appendChild(e);this.__xFormFieldRefs={field:e,label:g,input:k,hint:m,error:q};$APP.n(this.attachInternals)&&(this.__xFormFieldInternals=this.attachInternals())}QB(this);c=$APP.l(this,"__xFormFieldRefs");$APP.n(c)&&(c=$APP.l(c,"input"),d=this.getAttribute("value"),$APP.n(d)&&(c.value=d));c=$APP.l(this,"__xFormFieldInternals");$APP.n(c)&&(d=c.setFormValue,e=this.getAttribute("value"),d.call(c,$APP.n(e)?e:""));c=$APP.l(this,
15
+ "__xFormFieldRefs");$APP.n(c)&&(c=$APP.l(c,"input"),d=OB(this),e=PB(this),c.addEventListener("input",d),c.addEventListener("change",e),this.__xFormFieldHandlers={input:d,change:e});return MB(this)};b.disconnectedCallback=function(){return QB(this)};b.attributeChangedCallback=function(c,d,e){$APP.C.h(c,"value")&&(c=$APP.l(this,"__xFormFieldRefs"),$APP.n(c)&&(c=$APP.l(c,"input"),$APP.O(c.value,e)&&(c.value=$APP.n(e)?e:"")));return MB(this)};b.formDisabledCallback=function(c){JB(this,"disabled",$APP.K(c));
16
+ return MB(this)};b.formResetCallback=function(){this.removeAttribute("value");var c=$APP.l(this,"__xFormFieldRefs");$APP.n(c)&&($APP.l(c,"input").value="");c=$APP.l(this,"__xFormFieldInternals");$APP.n(c)&&c.setFormValue("");return MB(this)};return a},WB=function(){return $APP.n(customElements.get("x-form-field"))?null:customElements.define("x-form-field",VB())};var UB="label type name value placeholder hint error disabled readonly required autocomplete".split(" "),LB=new $APP.S(null,new $APP.Q(null,6,["url",null,"tel",null,"email",null,"text",null,"number",null,"password",null],null),null);
17
+ $APP.Xe([$APP.vi,$APP.pi,$APP.ai,$APP.U,$APP.bi,$APP.Z,$APP.W,$APP.gi,$APP.Eg],[new $APP.Q(null,2,[$APP.Z,$APP.X,$APP.Hg,"placeholder"],null),new $APP.Q(null,2,[$APP.Z,$APP.Di,$APP.Hg,"disabled"],null),new $APP.Q(null,2,[$APP.Z,$APP.X,$APP.Hg,"name"],null),new $APP.Q(null,2,[$APP.Z,$APP.X,$APP.Hg,"value"],null),new $APP.Q(null,2,[$APP.Z,$APP.Di,$APP.Hg,"readonly"],null),new $APP.Q(null,2,[$APP.Z,$APP.X,$APP.Hg,"type"],null),new $APP.Q(null,2,[$APP.Z,$APP.X,$APP.Hg,"label"],null),new $APP.Q(null,2,
18
+ [$APP.Z,$APP.X,$APP.Hg,"autocomplete"],null),new $APP.Q(null,2,[$APP.Z,$APP.Di,$APP.Hg,"required"],null)]);$APP.ja("baredom.exports.x_form_field.init",WB);export const init=WB;
package/dist/x-form.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var ny=function(a,b){return a.setAttribute("autocomplete",b)},sy=function(a){a=new $APP.Q(null,3,[oy,a.getAttribute("loading"),py,$APP.n(a.hasAttribute("novalidate"))?"":null,$APP.bh,a.getAttribute("autocomplete")],null);var b=$APP.N(a),c=$APP.J(b,oy);a=$APP.J(b,py);b=$APP.J(b,$APP.bh);c=c!=null&&$APP.O(c,"false");b=$APP.Cc(qy,b)?b:"on";return new $APP.Q(null,3,[$APP.nh,c,ry,a!=null,$APP.mi,b],null)},ty=function(a){var b=$APP.l(a,"__xFormRefs");if($APP.n(b)){b=$APP.l(b,"form");a=sy(a);ny(b,$APP.mi.g(a));
3
- if($APP.n($APP.nh.g(a)))return b.setAttribute("aria-busy","true"),b.setAttribute("data-loading","");b.removeAttribute("aria-busy");return b.removeAttribute("data-loading")}return null},uy=function(a){a=a.querySelectorAll("[name]:not([disabled])");for(var b={},c=a.length,d=0;;)if(d<c){var e=a[d],g=e.name;if($APP.n(function(){var m=g;return $APP.n(m)?$APP.O(g,""):m}())){var h=e.tagName.toLowerCase(),k=e.getAttribute("type");$APP.C.h(k,"checkbox")||$APP.C.h(k,"radio")||$APP.C.h(h,"x-checkbox")?$APP.n(e.checked)&&
4
- (b[g]=function(){var m=e.value;return $APP.n(m)?m:"on"}()):b[g]=function(){var m=e.value;return $APP.n(m)?m:""}()}d+=1}else break;return b},vy=function(a,b,c,d){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:d}))},wy=function(a){var b=$APP.l(a,"__xFormRefs");if($APP.n(b)){b=$APP.l(b,"form");var c=function(g){g.preventDefault();g=sy(a);if($APP.n($APP.nh.g(g)))g=null;else{g=ry.g(g);if(!$APP.n(g)){g=a.querySelectorAll("[name]:not([disabled])");for(var h={ok:!0},
5
- k=g.length,m=0;;)if(m<k){var q=g[m];$APP.n(q.reportValidity)&&($APP.n(q.reportValidity())||(h.ok=!1));m+=1}else break;g=h.ok}$APP.n(g)?(g=uy(a),g=vy(a,"x-form-submit",{values:g},!0)):g=null}return g},d=function(){for(var g=a.querySelectorAll("[name]"),h=g.length,k=0;;)if(k<h){var m=g[k];$APP.n(m.formResetCallback)&&m.formResetCallback();k+=1}else break;return vy(a,"x-form-reset",{},!1)},e=function(g){a:{g=g.target.closest("button,input[type\x3dsubmit],input[type\x3dreset]");if($APP.n(g)){g=g.type;
6
- var h=$APP.l(a,"__xFormRefs");if($APP.n(h)){h=$APP.l(h,"form");g=$APP.C.h(g,"submit")||$APP.C.h(g,"")?h.requestSubmit():$APP.C.h(g,"reset")?h.reset():null;break a}}g=null}return g};b.addEventListener("submit",c);b.addEventListener("reset",d);a.addEventListener("click",e);$APP.ma(a,"__xFormHandlers",{submit:c,reset:d,click:e})}},xy=function(a){var b=$APP.l(a,"__xFormRefs");if($APP.n(b)){var c=$APP.l(a,"__xFormHandlers");if($APP.n(c)){b=$APP.l(b,"form");b.removeEventListener("submit",$APP.l(c,"submit"));
7
- b.removeEventListener("reset",$APP.l(c,"reset"));a.removeEventListener("click",$APP.l(c,"click"));a.__xFormHandlers=null;return}}return null},yy=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return $APP.K(d)?this.setAttribute(c,""):this.removeAttribute(c)}})},zy=function(a){Object.defineProperty(a,"autocomplete",{configurable:!0,enumerable:!0,get:function(){var b=this.getAttribute("autocomplete");return $APP.n(b)?
8
- b:""},set:function(b){return b!=null&&$APP.O(b)?ny(this,""+$APP.T.g(b)):this.removeAttribute("autocomplete")}})},By=function(){var a=class extends HTMLElement{},b=a.prototype;Object.defineProperty(a,"observedAttributes",{get:function(){return Ay}});yy(b,"loading","loading");yy(b,"novalidate","novalidate");zy(b);b.connectedCallback=function(){if(!$APP.n(this.shadowRoot)){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("form"),g=document.createElement("slot");
9
- d.textContent=":host{display:block;}[part\x3droot]{display:flex;flex-direction:column;gap:var(--x-form-gap,1rem);width:var(--x-form-width,100%);}:host([loading]){pointer-events:none;opacity:0.6;}";e.setAttribute("part","root");e.setAttribute("novalidate","");e.appendChild(g);c.appendChild(d);c.appendChild(e);this.__xFormRefs={form:e}}xy(this);wy(this);return ty(this)};b.disconnectedCallback=function(){return xy(this)};b.attributeChangedCallback=function(){return ty(this)};b.submit=function(){var c=
2
+ var ry=function(a,b){return a.setAttribute("autocomplete",b)},wy=function(a){a=new $APP.Q(null,3,[sy,a.getAttribute("loading"),ty,$APP.n(a.hasAttribute("novalidate"))?"":null,$APP.Vg,a.getAttribute("autocomplete")],null);var b=$APP.N(a),c=$APP.I(b,sy);a=$APP.I(b,ty);b=$APP.I(b,$APP.Vg);c=c!=null&&$APP.O(c,"false");b=$APP.yc(uy,b)?b:"on";return new $APP.Q(null,3,[$APP.gh,c,vy,a!=null,$APP.gi,b],null)},xy=function(a){var b=$APP.l(a,"__xFormRefs");if($APP.n(b)){b=$APP.l(b,"form");a=wy(a);ry(b,$APP.gi.g(a));
3
+ if($APP.n($APP.gh.g(a)))return b.setAttribute("aria-busy","true"),b.setAttribute("data-loading","");b.removeAttribute("aria-busy");return b.removeAttribute("data-loading")}return null},yy=function(a){a=a.querySelectorAll("[name]:not([disabled])");for(var b={},c=a.length,d=0;;)if(d<c){var e=a[d],g=e.name;if($APP.n(function(){var m=g;return $APP.n(m)?$APP.O(g,""):m}())){var h=e.tagName.toLowerCase(),k=e.getAttribute("type");$APP.C.h(k,"checkbox")||$APP.C.h(k,"radio")||$APP.C.h(h,"x-checkbox")?$APP.n(e.checked)&&
4
+ (b[g]=function(){var m=e.value;return $APP.n(m)?m:"on"}()):b[g]=function(){var m=e.value;return $APP.n(m)?m:""}()}d+=1}else break;return b},zy=function(a,b,c,d){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:d}))},Ay=function(a){var b=$APP.l(a,"__xFormRefs");if($APP.n(b)){b=$APP.l(b,"form");var c=function(g){g.preventDefault();g=wy(a);if($APP.n($APP.gh.g(g)))g=null;else{g=vy.g(g);if(!$APP.n(g)){g=a.querySelectorAll("[name]:not([disabled])");for(var h={ok:!0},
5
+ k=g.length,m=0;;)if(m<k){var q=g[m];$APP.n(q.reportValidity)&&($APP.n(q.reportValidity())||(h.ok=!1));m+=1}else break;g=h.ok}$APP.n(g)?(g=yy(a),g=zy(a,"x-form-submit",{values:g},!0)):g=null}return g},d=function(){for(var g=a.querySelectorAll("[name]"),h=g.length,k=0;;)if(k<h){var m=g[k];$APP.n(m.formResetCallback)&&m.formResetCallback();k+=1}else break;return zy(a,"x-form-reset",{},!1)},e=function(g){a:{g=g.target.closest("button,input[type\x3dsubmit],input[type\x3dreset]");if($APP.n(g)){g=g.type;
6
+ var h=$APP.l(a,"__xFormRefs");if($APP.n(h)){h=$APP.l(h,"form");g=$APP.C.h(g,"submit")||$APP.C.h(g,"")?h.requestSubmit():$APP.C.h(g,"reset")?h.reset():null;break a}}g=null}return g};b.addEventListener("submit",c);b.addEventListener("reset",d);a.addEventListener("click",e);$APP.la(a,"__xFormHandlers",{submit:c,reset:d,click:e})}},By=function(a){var b=$APP.l(a,"__xFormRefs");if($APP.n(b)){var c=$APP.l(a,"__xFormHandlers");if($APP.n(c)){b=$APP.l(b,"form");b.removeEventListener("submit",$APP.l(c,"submit"));
7
+ b.removeEventListener("reset",$APP.l(c,"reset"));a.removeEventListener("click",$APP.l(c,"click"));a.__xFormHandlers=null;return}}return null},Cy=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return $APP.K(d)?this.setAttribute(c,""):this.removeAttribute(c)}})},Dy=function(a){Object.defineProperty(a,"autocomplete",{configurable:!0,enumerable:!0,get:function(){var b=this.getAttribute("autocomplete");return $APP.n(b)?
8
+ b:""},set:function(b){return b!=null&&$APP.O(b)?ry(this,""+$APP.T.g(b)):this.removeAttribute("autocomplete")}})},Fy=function(){var a=class extends HTMLElement{},b=a.prototype;Object.defineProperty(a,"observedAttributes",{get:function(){return Ey}});Cy(b,"loading","loading");Cy(b,"novalidate","novalidate");Dy(b);b.connectedCallback=function(){if(!$APP.n(this.shadowRoot)){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("form"),g=document.createElement("slot");
9
+ d.textContent=":host{display:block;}[part\x3droot]{display:flex;flex-direction:column;gap:var(--x-form-gap,1rem);width:var(--x-form-width,100%);}:host([loading]){pointer-events:none;opacity:0.6;}";e.setAttribute("part","root");e.setAttribute("novalidate","");e.appendChild(g);c.appendChild(d);c.appendChild(e);this.__xFormRefs={form:e}}By(this);Ay(this);return xy(this)};b.disconnectedCallback=function(){return By(this)};b.attributeChangedCallback=function(){return xy(this)};b.submit=function(){var c=
10
10
  $APP.l(this,"__xFormRefs");return $APP.n(c)?$APP.l(c,"form").requestSubmit():null};b.reset=function(){var c=$APP.l(this,"__xFormRefs");return $APP.n(c)?$APP.l(c,"form").reset():null};b.setFieldError=function(c,d){c=this.querySelector('[name\x3d"'+$APP.T.g(c)+'"]');return $APP.n(c)?d==null||$APP.C.h(d,"")||$APP.C.h(d,void 0)?c.removeAttribute("error"):c.setAttribute("error",d):null};b.clearErrors=function(){for(var c=this.querySelectorAll("[error]"),d=c.length,e=0;;)if(e<d)c[e].removeAttribute("error"),
11
- e+=1;else return null};return a},Cy=function(){return $APP.n(customElements.get("x-form"))?null:customElements.define("x-form",By())},oy=new $APP.M(null,"loading-raw","loading-raw",-1707143099),ry=new $APP.M(null,"novalidate?","novalidate?",491529885),py=new $APP.M(null,"novalidate-raw","novalidate-raw",1783236714);var Ay=["loading","novalidate","autocomplete"],qy=new $APP.S(null,new $APP.Q(null,2,["off",null,"on",null],null),null);$APP.ka("baredom.exports.x_form.init",Cy);export const init=Cy;
11
+ e+=1;else return null};return a},Gy=function(){return $APP.n(customElements.get("x-form"))?null:customElements.define("x-form",Fy())},sy=new $APP.M(null,"loading-raw","loading-raw",-1707143099),vy=new $APP.M(null,"novalidate?","novalidate?",491529885),ty=new $APP.M(null,"novalidate-raw","novalidate-raw",1783236714);var Ey=["loading","novalidate","autocomplete"],uy=new $APP.S(null,new $APP.Q(null,2,["off",null,"on",null],null),null);$APP.ja("baredom.exports.x_form.init",Gy);export const init=Gy;
package/dist/x-grid.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var Dw=function(a){switch(a){case "none":return"0";case "xs":return"4px";case "sm":return"8px";case "md":return"16px";case "lg":return"24px";case "xl":return"32px";default:return"16px"}},Ew=function(a,b,c){return $APP.Cc(b,a)?a:c},Fw=function(a){switch(a){case "row-dense":return"row dense";case "column-dense":return"column dense";default:return a}},Gw=function(a){return $APP.n($APP.n(a)?$APP.O("",a):a)?a:null},Hw=function(a){return $APP.n($APP.n(a)?$APP.O("",a):a)?a:"16rem"},Vw=function(a){var b=
3
- $APP.N(a);a=$APP.J(b,Iw);var c=$APP.J(b,Jw),d=$APP.J(b,Kw),e=$APP.J(b,Lw),g=$APP.J(b,Mw),h=$APP.J(b,$APP.Sg),k=$APP.J(b,Nw),m=$APP.J(b,Ow);b=$APP.J(b,Pw);h=Gw(h);k=Hw(k);var q=Ew(b,Qw,"md");b=function(){var v=$APP.Cc(Qw,d)?d:null;return $APP.n(v)?v:q}();var r=function(){var v=$APP.Cc(Qw,m)?m:null;return $APP.n(v)?v:q}();g=Ew(g,Rw,"stretch");c=Ew(c,Rw,"stretch");e=Fw(Ew(e,Sw,"row"));h=$APP.n(h)?h:"repeat(auto-fit,minmax("+$APP.T.g(k)+",1fr))";return $APP.cf([Lw,Mw,$APP.Sg,Ow,Pw,Tw,Iw,Uw,Kw,Jw],[e,
4
- g,h,Dw(r),q,b,$APP.K(a),r,Dw(b),c])},Ww=function(a){var b=$APP.cf([Lw,Mw,$APP.Sg,Nw,Ow,Pw,Iw,Kw,Jw],[a.getAttribute("auto-flow"),a.getAttribute("align-items"),a.getAttribute("columns"),a.getAttribute("min-column-size"),a.getAttribute("column-gap"),a.getAttribute("gap"),a.hasAttribute("inline"),a.getAttribute("row-gap"),a.getAttribute("justify-items")]);b=Vw(b);a=$APP.l(a,"__x_grid_base");if($APP.n(a)){var c=a.style;a.setAttribute("data-gap",Pw.g(b));c.setProperty("--x-grid-columns",$APP.Sg.g(b));
5
- c.setProperty("--x-grid-row-gap",Kw.g(b));c.setProperty("--x-grid-column-gap",Ow.g(b));c.setProperty("--x-grid-align-items",Mw.g(b));c.setProperty("--x-grid-justify-items",Jw.g(b));b=c.setProperty("--x-grid-auto-flow",Lw.g(b))}else b=null;return b},Xw=function(a){if($APP.l(a,"__x_grid_initialized")!==!0){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");c.textContent="\n :host {\n display:block;\n }\n\n :host([inline]) {\n display:inline-block;\n }\n\n .base {\n display:grid;\n box-sizing:border-box;\n grid-template-columns:var(--x-grid-columns);\n row-gap:var(--x-grid-row-gap);\n column-gap:var(--x-grid-column-gap);\n align-items:var(--x-grid-align-items);\n justify-items:var(--x-grid-justify-items);\n grid-auto-flow:var(--x-grid-auto-flow);\n }\n ";
6
- d.setAttribute("part","base");d.className="base";d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__x_grid_root=b;a.__x_grid_base=d;a.__x_grid_initialized=!0}Ww(a);return a},Zw=function(){var a=class extends HTMLElement{};a.observedAttributes=Yw;a.prototype.connectedCallback=function(){return Xw(this)};a.prototype.attributeChangedCallback=function(){return $APP.l(this,"__x_grid_initialized")===!0?Ww(this):Xw(this)};return a},$w=function(){return $APP.n(customElements.get("x-grid"))?null:customElements.define("x-grid",
7
- Zw())},Nw=new $APP.M(null,"min-column-size","min-column-size",-1066019378),Iw=new $APP.M(null,"inline","inline",1399884222),Lw=new $APP.M(null,"auto-flow","auto-flow",-1524521728),Ow=new $APP.M(null,"column-gap","column-gap",384822863),Jw=new $APP.M(null,"justify-items","justify-items",1638310783),Kw=new $APP.M(null,"row-gap","row-gap",-1809905537),Uw=new $APP.M(null,"column-gap-token","column-gap-token",-10192833),Pw=new $APP.M(null,"gap","gap",80255254),Mw=new $APP.M(null,"align-items","align-items",
8
- -267946462),Tw=new $APP.M(null,"row-gap-token","row-gap-token",-219143816);var Yw="columns min-column-size gap row-gap column-gap align-items justify-items auto-flow inline".split(" "),Qw=new $APP.S(null,new $APP.Q(null,6,["none",null,"xs",null,"md",null,"lg",null,"xl",null,"sm",null],null),null),Rw=new $APP.S(null,new $APP.Q(null,4,["center",null,"start",null,"stretch",null,"end",null],null),null),Sw=new $APP.S(null,new $APP.Q(null,5,["column-dense",null,"row-dense",null,"dense",null,"column",null,"row",null],null),null);$APP.ka("baredom.exports.x_grid.init",$w);export const init=$w;
2
+ var Hw=function(a){switch(a){case "none":return"0";case "xs":return"4px";case "sm":return"8px";case "md":return"16px";case "lg":return"24px";case "xl":return"32px";default:return"16px"}},Iw=function(a,b,c){return $APP.yc(b,a)?a:c},Jw=function(a){switch(a){case "row-dense":return"row dense";case "column-dense":return"column dense";default:return a}},Kw=function(a){return $APP.n($APP.n(a)?$APP.O("",a):a)?a:null},Lw=function(a){return $APP.n($APP.n(a)?$APP.O("",a):a)?a:"16rem"},Zw=function(a){var b=
3
+ $APP.N(a);a=$APP.I(b,Mw);var c=$APP.I(b,Nw),d=$APP.I(b,Ow),e=$APP.I(b,Pw),g=$APP.I(b,Qw),h=$APP.I(b,$APP.Kg),k=$APP.I(b,Rw),m=$APP.I(b,Sw);b=$APP.I(b,Tw);h=Kw(h);k=Lw(k);var q=Iw(b,Uw,"md");b=function(){var v=$APP.yc(Uw,d)?d:null;return $APP.n(v)?v:q}();var r=function(){var v=$APP.yc(Uw,m)?m:null;return $APP.n(v)?v:q}();g=Iw(g,Vw,"stretch");c=Iw(c,Vw,"stretch");e=Jw(Iw(e,Ww,"row"));h=$APP.n(h)?h:"repeat(auto-fit,minmax("+$APP.T.g(k)+",1fr))";return $APP.Xe([Pw,Qw,$APP.Kg,Sw,Tw,Xw,Mw,Yw,Ow,Nw],[e,
4
+ g,h,Hw(r),q,b,$APP.K(a),r,Hw(b),c])},$w=function(a){var b=$APP.Xe([Pw,Qw,$APP.Kg,Rw,Sw,Tw,Mw,Ow,Nw],[a.getAttribute("auto-flow"),a.getAttribute("align-items"),a.getAttribute("columns"),a.getAttribute("min-column-size"),a.getAttribute("column-gap"),a.getAttribute("gap"),a.hasAttribute("inline"),a.getAttribute("row-gap"),a.getAttribute("justify-items")]);b=Zw(b);a=$APP.l(a,"__x_grid_base");if($APP.n(a)){var c=a.style;a.setAttribute("data-gap",Tw.g(b));c.setProperty("--x-grid-columns",$APP.Kg.g(b));
5
+ c.setProperty("--x-grid-row-gap",Ow.g(b));c.setProperty("--x-grid-column-gap",Sw.g(b));c.setProperty("--x-grid-align-items",Qw.g(b));c.setProperty("--x-grid-justify-items",Nw.g(b));b=c.setProperty("--x-grid-auto-flow",Pw.g(b))}else b=null;return b},ax=function(a){if($APP.l(a,"__x_grid_initialized")!==!0){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");c.textContent="\n :host {\n display:block;\n }\n\n :host([inline]) {\n display:inline-block;\n }\n\n .base {\n display:grid;\n box-sizing:border-box;\n grid-template-columns:var(--x-grid-columns);\n row-gap:var(--x-grid-row-gap);\n column-gap:var(--x-grid-column-gap);\n align-items:var(--x-grid-align-items);\n justify-items:var(--x-grid-justify-items);\n grid-auto-flow:var(--x-grid-auto-flow);\n }\n ";
6
+ d.setAttribute("part","base");d.className="base";d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__x_grid_root=b;a.__x_grid_base=d;a.__x_grid_initialized=!0}$w(a);return a},cx=function(){var a=class extends HTMLElement{};a.observedAttributes=bx;a.prototype.connectedCallback=function(){return ax(this)};a.prototype.attributeChangedCallback=function(){return $APP.l(this,"__x_grid_initialized")===!0?$w(this):ax(this)};return a},dx=function(){return $APP.n(customElements.get("x-grid"))?null:customElements.define("x-grid",
7
+ cx())},Rw=new $APP.M(null,"min-column-size","min-column-size",-1066019378),Mw=new $APP.M(null,"inline","inline",1399884222),Pw=new $APP.M(null,"auto-flow","auto-flow",-1524521728),Sw=new $APP.M(null,"column-gap","column-gap",384822863),Nw=new $APP.M(null,"justify-items","justify-items",1638310783),Ow=new $APP.M(null,"row-gap","row-gap",-1809905537),Yw=new $APP.M(null,"column-gap-token","column-gap-token",-10192833),Tw=new $APP.M(null,"gap","gap",80255254),Qw=new $APP.M(null,"align-items","align-items",
8
+ -267946462),Xw=new $APP.M(null,"row-gap-token","row-gap-token",-219143816);var bx="columns min-column-size gap row-gap column-gap align-items justify-items auto-flow inline".split(" "),Uw=new $APP.S(null,new $APP.Q(null,6,["none",null,"xs",null,"md",null,"lg",null,"xl",null,"sm",null],null),null),Vw=new $APP.S(null,new $APP.Q(null,4,["center",null,"start",null,"stretch",null,"end",null],null),null),Ww=new $APP.S(null,new $APP.Q(null,5,["column-dense",null,"row-dense",null,"dense",null,"column",null,"row",null],null),null);$APP.ja("baredom.exports.x_grid.init",dx);export const init=dx;
@@ -1,11 +1,11 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var ZC=function(a){var b=$APP.N(a);a=$APP.J(b,$APP.U);var c=$APP.J(b,$APP.wi),d=$APP.J(b,$APP.Vg);b=$APP.J(b,$APP.Z);a=$APP.n(a)?a:"";c=$APP.K(c);d=$APP.n(d)?d:"";d=$APP.Cc(XC,d)?d:"";b=$APP.n(b)?b:"";b=$APP.Cc(YC,b)?b:"";return new $APP.Q(null,4,[$APP.U,a,$APP.wi,c,$APP.Vg,d,$APP.Z,b],null)},$C=function(a){return $APP.l(a,"__xMenuItemInit")===!0},aD=function(a){return new $APP.Q(null,4,[$APP.U,a.getAttribute("value"),$APP.wi,a.hasAttribute("disabled"),$APP.Vg,a.getAttribute("variant"),$APP.Z,a.getAttribute("type")],
3
- null)},bD=function(a){var b=a.getAttribute("value");return a.dispatchEvent(new CustomEvent("x-menu-item-select",{detail:{value:$APP.n(b)?b:""},bubbles:!0,composed:!0}))},cD=function(a){var b=$APP.l(a,"__xMenuItemRefs");b=$APP.n(b)?$APP.l(b,"base"):null;var c=ZC(aD(a));if($APP.n(b)){if($APP.C.h($APP.Z.g(c),"divider"))return a.setAttribute("role","separator"),a.removeAttribute("tabindex"),a.removeAttribute("aria-disabled"),b.setAttribute("data-type","divider"),b.setAttribute("data-variant",""),b.setAttribute("data-disabled",
4
- "false");a.setAttribute("role","menuitem");a.setAttribute("tabindex","-1");b.setAttribute("data-type","");b.setAttribute("data-variant",$APP.Vg.g(c));b.setAttribute("data-disabled",$APP.n($APP.wi.g(c))?"true":"false");return $APP.n($APP.wi.g(c))?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled")}return null},dD=function(a){function b(){return e.assignedNodes().length>0?a.setAttribute("has-icon",""):a.removeAttribute("has-icon")}function c(h){var k=h.key,m=ZC(aD(a));($APP.C.h(k,
5
- "Enter")||$APP.C.h(k," "))&&$APP.p($APP.wi.g(m))&&$APP.O($APP.Z.g(m),"divider")?(h.preventDefault(),h=bD(a)):h=null;return h}function d(h){var k=ZC(aD(a));var m=$APP.wi.g(k);m=$APP.n(m)?m:$APP.C.h($APP.Z.g(k),"divider");$APP.n(m)&&h.preventDefault();return $APP.p($APP.wi.g(k))&&$APP.O($APP.Z.g(k),"divider")?bD(a):null}var e=$APP.l($APP.l(a,"__xMenuItemRefs"),"icon-slot"),g={};a.addEventListener("click",d);a.addEventListener("keydown",c);e.addEventListener("slotchange",b);g.click=d;g.keydown=c;g["icon-slotchange"]=
6
- b;a.__xMenuItemHandlers=g},eD=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});Object.defineProperty(a.prototype,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,
7
- "variant",{get:function(){return this.getAttribute("variant")},set:function(b){return $APP.n(b)?this.setAttribute("variant",b):this.removeAttribute("variant")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,"type",{get:function(){return this.getAttribute("type")},set:function(b){return $APP.n(b)?this.setAttribute("type",b):this.removeAttribute("type")},configurable:!0,enumerable:!0})},gD=function(){var a=class extends HTMLElement{};a.observedAttributes=fD;a.prototype.connectedCallback=
8
- function(){if($C(this)){dD(this);var b=cD(this)}else{if(!$C(this)){var c=this.attachShadow({mode:"open"}),d=document.createElement("style");b=document.createElement("div");var e=document.createElement("span"),g=document.createElement("slot"),h=document.createElement("span"),k=document.createElement("slot"),m=document.createElement("hr");d.textContent=":host{display:block;outline:none;color-scheme:light dark;--x-menu-item-color:#111827;--x-menu-item-hover-bg:#f3f4f6;--x-menu-item-focus-bg:#eff6ff;--x-menu-item-focus-color:#1d4ed8;--x-menu-item-disabled-opacity:0.45;--x-menu-item-danger-color:#dc2626;--x-menu-item-danger-hover-bg:#fef2f2;--x-menu-item-padding:8px 12px;--x-menu-item-border-radius:4px;--x-menu-item-font-size:0.9375rem;--x-menu-item-icon-gap:8px;--x-menu-item-divider-color:#e5e7eb;}:host([disabled]){pointer-events:none;}@media (prefers-color-scheme:dark){:host{--x-menu-item-color:#f9fafb;--x-menu-item-hover-bg:#1f2937;--x-menu-item-focus-bg:#1e3a5f;--x-menu-item-focus-color:#60a5fa;--x-menu-item-danger-color:#f87171;--x-menu-item-danger-hover-bg:#2d1515;--x-menu-item-divider-color:#374151;}}.base{display:flex;align-items:center;gap:var(--x-menu-item-icon-gap);padding:var(--x-menu-item-padding);border-radius:var(--x-menu-item-border-radius);font-size:var(--x-menu-item-font-size);color:var(--x-menu-item-color);cursor:pointer;user-select:none;transition:background 100ms ease,color 100ms ease;}.base:hover{background:var(--x-menu-item-hover-bg);}:host(:focus) .base{background:var(--x-menu-item-focus-bg);color:var(--x-menu-item-focus-color);}.base[data-variant\x3d'danger']{color:var(--x-menu-item-danger-color);}.base[data-variant\x3d'danger']:hover{background:var(--x-menu-item-danger-hover-bg);}:host(:focus) .base[data-variant\x3d'danger']{background:var(--x-menu-item-danger-hover-bg);}.base[data-disabled\x3d'true']{opacity:var(--x-menu-item-disabled-opacity);cursor:default;pointer-events:none;}.base[data-type\x3d'divider']{padding:0;cursor:default;pointer-events:none;}.icon-span{display:none;flex-shrink:0;align-items:center;}:host([has-icon]) .icon-span{display:flex;}.divider-hr{display:none;}.base[data-type\x3d'divider'] .icon-span,.base[data-type\x3d'divider'] .label-span{display:none;}.base[data-type\x3d'divider'] .divider-hr{display:block;width:100%;border:none;border-top:1px solid var(--x-menu-item-divider-color);margin:4px 0;}@media (prefers-reduced-motion:reduce){.base{transition:none;}}";
9
- b.setAttribute("part","base");b.className="base";e.setAttribute("part","icon");e.className="icon-span";g.setAttribute("name","icon");e.appendChild(g);h.className="label-span";h.appendChild(k);m.className="divider-hr";b.appendChild(e);b.appendChild(h);b.appendChild(m);c.appendChild(d);c.appendChild(b);c={};c.base=b;c["icon-span"]=e;c["icon-slot"]=g;this.__xMenuItemRefs=c;dD(this);this.__xMenuItemInit=!0}cD(this);b=this}return b};a.prototype.disconnectedCallback=function(){var b=$APP.l(this,"__xMenuItemHandlers");
10
- var c=$APP.l(this,"__xMenuItemRefs");if($APP.n(b)){var d=$APP.l(b,"keydown"),e=$APP.l(b,"icon-slotchange");c=$APP.n(c)?$APP.l(c,"icon-slot"):null;this.removeEventListener("click",$APP.l(b,"click"));this.removeEventListener("keydown",d);b=$APP.n(c)?c.removeEventListener("slotchange",e):null}else b=null;return b};a.prototype.attributeChangedCallback=function(){return $C(this)?cD(this):null};eD(a);return a},hD=function(){return $APP.n(customElements.get("x-menu-item"))?null:customElements.define("x-menu-item",
11
- gD())};var fD=["value","disabled","variant","type"],XC=new $APP.S(null,new $APP.Q(null,2,["",null,"danger",null],null),null),YC=new $APP.S(null,new $APP.Q(null,2,["",null,"divider",null],null),null);$APP.wd(["x-menu-item-select",new $APP.Q(null,1,[$APP.Y,new $APP.Q(null,1,[$APP.U,$APP.X],null)],null)]);$APP.ka("baredom.exports.x_menu_item.init",hD);export const init=hD;
2
+ var iD=function(a){var b=$APP.N(a);a=$APP.I(b,$APP.U);var c=$APP.I(b,$APP.pi),d=$APP.I(b,$APP.Ng);b=$APP.I(b,$APP.Z);a=$APP.n(a)?a:"";c=$APP.K(c);d=$APP.n(d)?d:"";d=$APP.yc(gD,d)?d:"";b=$APP.n(b)?b:"";b=$APP.yc(hD,b)?b:"";return new $APP.Q(null,4,[$APP.U,a,$APP.pi,c,$APP.Ng,d,$APP.Z,b],null)},jD=function(a){return $APP.l(a,"__xMenuItemInit")===!0},kD=function(a){return new $APP.Q(null,4,[$APP.U,a.getAttribute("value"),$APP.pi,a.hasAttribute("disabled"),$APP.Ng,a.getAttribute("variant"),$APP.Z,a.getAttribute("type")],
3
+ null)},lD=function(a){var b=a.getAttribute("value");return a.dispatchEvent(new CustomEvent("x-menu-item-select",{detail:{value:$APP.n(b)?b:""},bubbles:!0,composed:!0}))},mD=function(a){var b=$APP.l(a,"__xMenuItemRefs");b=$APP.n(b)?$APP.l(b,"base"):null;var c=iD(kD(a));if($APP.n(b)){if($APP.C.h($APP.Z.g(c),"divider"))return a.setAttribute("role","separator"),a.removeAttribute("tabindex"),a.removeAttribute("aria-disabled"),b.setAttribute("data-type","divider"),b.setAttribute("data-variant",""),b.setAttribute("data-disabled",
4
+ "false");a.setAttribute("role","menuitem");a.setAttribute("tabindex","-1");b.setAttribute("data-type","");b.setAttribute("data-variant",$APP.Ng.g(c));b.setAttribute("data-disabled",$APP.n($APP.pi.g(c))?"true":"false");return $APP.n($APP.pi.g(c))?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled")}return null},nD=function(a){function b(){return e.assignedNodes().length>0?a.setAttribute("has-icon",""):a.removeAttribute("has-icon")}function c(h){var k=h.key,m=iD(kD(a));($APP.C.h(k,
5
+ "Enter")||$APP.C.h(k," "))&&$APP.p($APP.pi.g(m))&&$APP.O($APP.Z.g(m),"divider")?(h.preventDefault(),h=lD(a)):h=null;return h}function d(h){var k=iD(kD(a));var m=$APP.pi.g(k);m=$APP.n(m)?m:$APP.C.h($APP.Z.g(k),"divider");$APP.n(m)&&h.preventDefault();return $APP.p($APP.pi.g(k))&&$APP.O($APP.Z.g(k),"divider")?lD(a):null}var e=$APP.l($APP.l(a,"__xMenuItemRefs"),"icon-slot"),g={};a.addEventListener("click",d);a.addEventListener("keydown",c);e.addEventListener("slotchange",b);g.click=d;g.keydown=c;g["icon-slotchange"]=
6
+ b;a.__xMenuItemHandlers=g},oD=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});Object.defineProperty(a.prototype,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,
7
+ "variant",{get:function(){return this.getAttribute("variant")},set:function(b){return $APP.n(b)?this.setAttribute("variant",b):this.removeAttribute("variant")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,"type",{get:function(){return this.getAttribute("type")},set:function(b){return $APP.n(b)?this.setAttribute("type",b):this.removeAttribute("type")},configurable:!0,enumerable:!0})},qD=function(){var a=class extends HTMLElement{};a.observedAttributes=pD;a.prototype.connectedCallback=
8
+ function(){if(jD(this)){nD(this);var b=mD(this)}else{if(!jD(this)){var c=this.attachShadow({mode:"open"}),d=document.createElement("style");b=document.createElement("div");var e=document.createElement("span"),g=document.createElement("slot"),h=document.createElement("span"),k=document.createElement("slot"),m=document.createElement("hr");d.textContent=":host{display:block;outline:none;color-scheme:light dark;--x-menu-item-color:#111827;--x-menu-item-hover-bg:#f3f4f6;--x-menu-item-focus-bg:#eff6ff;--x-menu-item-focus-color:#1d4ed8;--x-menu-item-disabled-opacity:0.45;--x-menu-item-danger-color:#dc2626;--x-menu-item-danger-hover-bg:#fef2f2;--x-menu-item-padding:8px 12px;--x-menu-item-border-radius:4px;--x-menu-item-font-size:0.9375rem;--x-menu-item-icon-gap:8px;--x-menu-item-divider-color:#e5e7eb;}:host([disabled]){pointer-events:none;}@media (prefers-color-scheme:dark){:host{--x-menu-item-color:#f9fafb;--x-menu-item-hover-bg:#1f2937;--x-menu-item-focus-bg:#1e3a5f;--x-menu-item-focus-color:#60a5fa;--x-menu-item-danger-color:#f87171;--x-menu-item-danger-hover-bg:#2d1515;--x-menu-item-divider-color:#374151;}}.base{display:flex;align-items:center;gap:var(--x-menu-item-icon-gap);padding:var(--x-menu-item-padding);border-radius:var(--x-menu-item-border-radius);font-size:var(--x-menu-item-font-size);color:var(--x-menu-item-color);cursor:pointer;user-select:none;transition:background 100ms ease,color 100ms ease;}.base:hover{background:var(--x-menu-item-hover-bg);}:host(:focus) .base{background:var(--x-menu-item-focus-bg);color:var(--x-menu-item-focus-color);}.base[data-variant\x3d'danger']{color:var(--x-menu-item-danger-color);}.base[data-variant\x3d'danger']:hover{background:var(--x-menu-item-danger-hover-bg);}:host(:focus) .base[data-variant\x3d'danger']{background:var(--x-menu-item-danger-hover-bg);}.base[data-disabled\x3d'true']{opacity:var(--x-menu-item-disabled-opacity);cursor:default;pointer-events:none;}.base[data-type\x3d'divider']{padding:0;cursor:default;pointer-events:none;}.icon-span{display:none;flex-shrink:0;align-items:center;}:host([has-icon]) .icon-span{display:flex;}.divider-hr{display:none;}.base[data-type\x3d'divider'] .icon-span,.base[data-type\x3d'divider'] .label-span{display:none;}.base[data-type\x3d'divider'] .divider-hr{display:block;width:100%;border:none;border-top:1px solid var(--x-menu-item-divider-color);margin:4px 0;}@media (prefers-reduced-motion:reduce){.base{transition:none;}}";
9
+ b.setAttribute("part","base");b.className="base";e.setAttribute("part","icon");e.className="icon-span";g.setAttribute("name","icon");e.appendChild(g);h.className="label-span";h.appendChild(k);m.className="divider-hr";b.appendChild(e);b.appendChild(h);b.appendChild(m);c.appendChild(d);c.appendChild(b);c={};c.base=b;c["icon-span"]=e;c["icon-slot"]=g;this.__xMenuItemRefs=c;nD(this);this.__xMenuItemInit=!0}mD(this);b=this}return b};a.prototype.disconnectedCallback=function(){var b=$APP.l(this,"__xMenuItemHandlers");
10
+ var c=$APP.l(this,"__xMenuItemRefs");if($APP.n(b)){var d=$APP.l(b,"keydown"),e=$APP.l(b,"icon-slotchange");c=$APP.n(c)?$APP.l(c,"icon-slot"):null;this.removeEventListener("click",$APP.l(b,"click"));this.removeEventListener("keydown",d);b=$APP.n(c)?c.removeEventListener("slotchange",e):null}else b=null;return b};a.prototype.attributeChangedCallback=function(){return jD(this)?mD(this):null};oD(a);return a},rD=function(){return $APP.n(customElements.get("x-menu-item"))?null:customElements.define("x-menu-item",
11
+ qD())};var pD=["value","disabled","variant","type"],gD=new $APP.S(null,new $APP.Q(null,2,["",null,"danger",null],null),null),hD=new $APP.S(null,new $APP.Q(null,2,["",null,"divider",null],null),null);$APP.sd(["x-menu-item-select",new $APP.Q(null,1,[$APP.Y,new $APP.Q(null,1,[$APP.U,$APP.X],null)],null)]);$APP.ja("baredom.exports.x_menu_item.init",rD);export const init=rD;
package/dist/x-menu.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var dv=function(a){return $APP.l(a,"__xMenuInit")===!0},ev=function(a){a=a.querySelectorAll("x-menu-item");for(var b=[],c=a.length,d=0;;)if(d<c){var e=a[d];$APP.p(e.hasAttribute("disabled"))&&$APP.O(e.getAttribute("type"),"divider")&&b.push(e);d+=1}else break;return b},fv=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0}))},iv=function(a){$APP.n(a.hasAttribute("open"))||(a.setAttribute("open",""),fv(a,"x-menu-open",{}));if($APP.n(null)){a=ev(a);var b=a.length;
3
- return b>0?$APP.C.h(null,gv)?a[0].focus():$APP.C.h(null,hv)?a[b-1].focus():null:null}return null},jv=function(a,b){$APP.n(a.hasAttribute("open"))&&(a.removeAttribute("open"),fv(a,"x-menu-close",{}));return $APP.n(b)?(a=$APP.l(a,"__xMenuRefs"),a=$APP.n(a)?$APP.l(a,"trigger-slot"):null,a=$APP.n(a)?a.assignedElements():null,a=$APP.n($APP.n(a)?a.length>0:a)?a[0]:null,$APP.n(a)?a.focus():null):null},kv=function(a,b){var c=b.composedPath();a=$APP.hc(a.assignedElements());return $APP.K($APP.Ad(function(d){return c.indexOf(d)>
4
- -1},a))},lv=function(a,b){var c=b.key,d=a.hasAttribute("open");if($APP.C.h(c,"Escape"))return $APP.n(d)?(b.preventDefault(),jv(a,!0)):null;if($APP.C.h(c,"Tab"))return $APP.n(d)?jv(a,!1):null;if($APP.C.h(c,"ArrowDown")||$APP.C.h(c,"ArrowUp")){var e=ev(a),g=e.length;if(g>0){b.preventDefault();if($APP.n(d))return a=e.indexOf(document.activeElement),c=$APP.C.h(c,"ArrowDown")?a>=g-1?0:a<0?0:a+1:a<=0?g-1:a-1,e[c].focus();iv(a);return e[$APP.C.h(c,"ArrowDown")?0:g-1].focus()}}else if($APP.C.h(c,"Home")){if($APP.n(d)&&
5
- (e=ev(a),e.length>0))return b.preventDefault(),e[0].focus()}else if($APP.C.h(c,"End")&&$APP.n(d)&&(e=ev(a),e.length>0))return b.preventDefault(),e[e.length-1].focus();return null},nv=function(a){var b=$APP.l(a,"__xMenuRefs");b=$APP.n(b)?$APP.l(b,"popup"):null;a=new $APP.Q(null,3,[$APP.qi,a.hasAttribute("open"),$APP.yi,a.getAttribute("placement"),$APP.W,a.getAttribute("label")],null);a=$APP.N(a);var c=$APP.J(a,$APP.qi),d=$APP.J(a,$APP.yi);a=$APP.J(a,$APP.W);c=$APP.K(c);d=$APP.n(d)?d:"";d=$APP.Cc(mv,
6
- d)?d:"bottom-start";a=new $APP.Q(null,3,[$APP.qi,c,$APP.yi,d,$APP.W,$APP.n(a)?a:""],null);return $APP.n(b)?(b.setAttribute("data-placement",$APP.yi.g(a)),a=$APP.W.g(a),$APP.n($APP.n(a)?$APP.O(a,""):a)?b.setAttribute("aria-label",a):b.removeAttribute("aria-label")):null},ov=function(a){function b(h){h.stopPropagation();h=h.detail.value;jv(a,!1);return fv(a,"x-menu-select",{value:$APP.n(h)?h:""})}function c(h){return lv(a,h)}function d(h){$APP.n(a.hasAttribute("open"))?(h=h.composedPath(),h=$APP.C.h(-1,
7
- h.indexOf(a))?jv(a,!1):null):h=null;return h}function e(h){var k=$APP.l(a,"__xMenuRefs");k=$APP.n(k)?$APP.l(k,"trigger-slot"):null;return $APP.n($APP.n(k)?kv(k,h):k)?$APP.n(a.hasAttribute("open"))?jv(a,!0):iv(a):null}var g={};a.addEventListener("click",e);document.addEventListener("click",d,!0);a.addEventListener("keydown",c);a.addEventListener("x-menu-item-select",b);g.click=e;g["doc-click"]=d;g.keydown=c;g["item-select"]=b;a.__xMenuHandlers=g},pv=function(a){Object.defineProperty(a.prototype,"open",
2
+ var gv=function(a){return $APP.l(a,"__xMenuInit")===!0},hv=function(a){a=a.querySelectorAll("x-menu-item");for(var b=[],c=a.length,d=0;;)if(d<c){var e=a[d];$APP.p(e.hasAttribute("disabled"))&&$APP.O(e.getAttribute("type"),"divider")&&b.push(e);d+=1}else break;return b},iv=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0}))},lv=function(a){$APP.n(a.hasAttribute("open"))||(a.setAttribute("open",""),iv(a,"x-menu-open",{}));if($APP.n(null)){a=hv(a);var b=a.length;
3
+ return b>0?$APP.C.h(null,jv)?a[0].focus():$APP.C.h(null,kv)?a[b-1].focus():null:null}return null},mv=function(a,b){$APP.n(a.hasAttribute("open"))&&(a.removeAttribute("open"),iv(a,"x-menu-close",{}));return $APP.n(b)?(a=$APP.l(a,"__xMenuRefs"),a=$APP.n(a)?$APP.l(a,"trigger-slot"):null,a=$APP.n(a)?a.assignedElements():null,a=$APP.n($APP.n(a)?a.length>0:a)?a[0]:null,$APP.n(a)?a.focus():null):null},nv=function(a,b){var c=b.composedPath();a=$APP.ec(a.assignedElements());return $APP.K($APP.xd(function(d){return c.indexOf(d)>
4
+ -1},a))},ov=function(a,b){var c=b.key,d=a.hasAttribute("open");if($APP.C.h(c,"Escape"))return $APP.n(d)?(b.preventDefault(),mv(a,!0)):null;if($APP.C.h(c,"Tab"))return $APP.n(d)?mv(a,!1):null;if($APP.C.h(c,"ArrowDown")||$APP.C.h(c,"ArrowUp")){var e=hv(a),g=e.length;if(g>0){b.preventDefault();if($APP.n(d))return a=e.indexOf(document.activeElement),c=$APP.C.h(c,"ArrowDown")?a>=g-1?0:a<0?0:a+1:a<=0?g-1:a-1,e[c].focus();lv(a);return e[$APP.C.h(c,"ArrowDown")?0:g-1].focus()}}else if($APP.C.h(c,"Home")){if($APP.n(d)&&
5
+ (e=hv(a),e.length>0))return b.preventDefault(),e[0].focus()}else if($APP.C.h(c,"End")&&$APP.n(d)&&(e=hv(a),e.length>0))return b.preventDefault(),e[e.length-1].focus();return null},qv=function(a){var b=$APP.l(a,"__xMenuRefs");b=$APP.n(b)?$APP.l(b,"popup"):null;a=new $APP.Q(null,3,[$APP.ji,a.hasAttribute("open"),$APP.ri,a.getAttribute("placement"),$APP.W,a.getAttribute("label")],null);a=$APP.N(a);var c=$APP.I(a,$APP.ji),d=$APP.I(a,$APP.ri);a=$APP.I(a,$APP.W);c=$APP.K(c);d=$APP.n(d)?d:"";d=$APP.yc(pv,
6
+ d)?d:"bottom-start";a=new $APP.Q(null,3,[$APP.ji,c,$APP.ri,d,$APP.W,$APP.n(a)?a:""],null);return $APP.n(b)?(b.setAttribute("data-placement",$APP.ri.g(a)),a=$APP.W.g(a),$APP.n($APP.n(a)?$APP.O(a,""):a)?b.setAttribute("aria-label",a):b.removeAttribute("aria-label")):null},rv=function(a){function b(h){h.stopPropagation();h=h.detail.value;mv(a,!1);return iv(a,"x-menu-select",{value:$APP.n(h)?h:""})}function c(h){return ov(a,h)}function d(h){$APP.n(a.hasAttribute("open"))?(h=h.composedPath(),h=$APP.C.h(-1,
7
+ h.indexOf(a))?mv(a,!1):null):h=null;return h}function e(h){var k=$APP.l(a,"__xMenuRefs");k=$APP.n(k)?$APP.l(k,"trigger-slot"):null;return $APP.n($APP.n(k)?nv(k,h):k)?$APP.n(a.hasAttribute("open"))?mv(a,!0):lv(a):null}var g={};a.addEventListener("click",e);document.addEventListener("click",d,!0);a.addEventListener("keydown",c);a.addEventListener("x-menu-item-select",b);g.click=e;g["doc-click"]=d;g.keydown=c;g["item-select"]=b;a.__xMenuHandlers=g},sv=function(a){Object.defineProperty(a.prototype,"open",
8
8
  {get:function(){return this.hasAttribute("open")},set:function(b){return $APP.n(b)?this.setAttribute("open",""):this.removeAttribute("open")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,"placement",{get:function(){return this.getAttribute("placement")},set:function(b){return $APP.n(b)?this.setAttribute("placement",b):this.removeAttribute("placement")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,"label",{get:function(){return this.getAttribute("label")},
9
- set:function(b){return $APP.n(b)?this.setAttribute("label",b):this.removeAttribute("label")},configurable:!0,enumerable:!0})},rv=function(){var a=class extends HTMLElement{};a.observedAttributes=qv;a.prototype.connectedCallback=function(){if(dv(this)){ov(this);var b=nv(this)}else{if(!dv(this)){var c=this.attachShadow({mode:"open"}),d=document.createElement("style");b=document.createElement("div");var e=document.createElement("slot"),g=document.createElement("div"),h=document.createElement("slot");
9
+ set:function(b){return $APP.n(b)?this.setAttribute("label",b):this.removeAttribute("label")},configurable:!0,enumerable:!0})},uv=function(){var a=class extends HTMLElement{};a.observedAttributes=tv;a.prototype.connectedCallback=function(){if(gv(this)){rv(this);var b=qv(this)}else{if(!gv(this)){var c=this.attachShadow({mode:"open"}),d=document.createElement("style");b=document.createElement("div");var e=document.createElement("slot"),g=document.createElement("div"),h=document.createElement("slot");
10
10
  d.textContent=":host{display:inline-block;position:relative;color-scheme:light dark;--x-menu-bg:#ffffff;--x-menu-border:1px solid #e5e7eb;--x-menu-border-radius:8px;--x-menu-shadow:0 4px 16px rgba(0,0,0,0.12);--x-menu-min-width:160px;--x-menu-padding:4px;--x-menu-z-index:1000;}@media (prefers-color-scheme:dark){:host{--x-menu-bg:#1f2937;--x-menu-border:1px solid #374151;--x-menu-shadow:0 4px 16px rgba(0,0,0,0.4);}}.base{position:relative;display:inline-block;}.popup{display:none;position:absolute;background:var(--x-menu-bg);border:var(--x-menu-border);border-radius:var(--x-menu-border-radius);box-shadow:var(--x-menu-shadow);min-width:var(--x-menu-min-width);padding:var(--x-menu-padding);z-index:var(--x-menu-z-index);box-sizing:border-box;}:host([open]) .popup{display:block;}.popup[data-placement\x3d'bottom-start']{top:100%;left:0;margin-top:4px;}.popup[data-placement\x3d'bottom-end']{top:100%;right:0;margin-top:4px;}.popup[data-placement\x3d'top-start']{bottom:100%;left:0;margin-bottom:4px;}.popup[data-placement\x3d'top-end']{bottom:100%;right:0;margin-bottom:4px;}";
11
- b.setAttribute("part","base");b.className="base";e.setAttribute("name","trigger");g.setAttribute("part","popup");g.className="popup";g.setAttribute("role","menu");g.appendChild(h);b.appendChild(e);b.appendChild(g);c.appendChild(d);c.appendChild(b);c={};c.base=b;c.popup=g;c["trigger-slot"]=e;c["item-slot"]=h;this.__xMenuRefs=c;ov(this);this.__xMenuInit=!0}nv(this);b=this}return b};a.prototype.disconnectedCallback=function(){var b=$APP.l(this,"__xMenuHandlers");if($APP.n(b)){var c=$APP.l(b,"doc-click"),
12
- d=$APP.l(b,"keydown"),e=$APP.l(b,"item-select");this.removeEventListener("click",$APP.l(b,"click"));document.removeEventListener("click",c,!0);this.removeEventListener("keydown",d);b=this.removeEventListener("x-menu-item-select",e)}else b=null;return b};a.prototype.attributeChangedCallback=function(){return dv(this)?nv(this):null};pv(a);return a},sv=function(){return $APP.n(customElements.get("x-menu"))?null:customElements.define("x-menu",rv())},gv=new $APP.M(null,"first","first",-644103046),hv=new $APP.M(null,
13
- "last","last",1105735132);var qv=["open","placement","label"],mv=new $APP.S(null,new $APP.Q(null,4,["bottom-start",null,"bottom-end",null,"top-end",null,"top-start",null],null),null);$APP.wd(["x-menu-open",new $APP.Q(null,1,[$APP.Y,$APP.xd],null),"x-menu-close",new $APP.Q(null,1,[$APP.Y,$APP.xd],null),"x-menu-select",new $APP.Q(null,1,[$APP.Y,new $APP.Q(null,1,[$APP.U,$APP.X],null)],null)]);$APP.ka("baredom.exports.x_menu.init",sv);export const init=sv;
11
+ b.setAttribute("part","base");b.className="base";e.setAttribute("name","trigger");g.setAttribute("part","popup");g.className="popup";g.setAttribute("role","menu");g.appendChild(h);b.appendChild(e);b.appendChild(g);c.appendChild(d);c.appendChild(b);c={};c.base=b;c.popup=g;c["trigger-slot"]=e;c["item-slot"]=h;this.__xMenuRefs=c;rv(this);this.__xMenuInit=!0}qv(this);b=this}return b};a.prototype.disconnectedCallback=function(){var b=$APP.l(this,"__xMenuHandlers");if($APP.n(b)){var c=$APP.l(b,"doc-click"),
12
+ d=$APP.l(b,"keydown"),e=$APP.l(b,"item-select");this.removeEventListener("click",$APP.l(b,"click"));document.removeEventListener("click",c,!0);this.removeEventListener("keydown",d);b=this.removeEventListener("x-menu-item-select",e)}else b=null;return b};a.prototype.attributeChangedCallback=function(){return gv(this)?qv(this):null};sv(a);return a},vv=function(){return $APP.n(customElements.get("x-menu"))?null:customElements.define("x-menu",uv())},jv=new $APP.M(null,"first","first",-644103046),kv=new $APP.M(null,
13
+ "last","last",1105735132);var tv=["open","placement","label"],pv=new $APP.S(null,new $APP.Q(null,4,["bottom-start",null,"bottom-end",null,"top-end",null,"top-start",null],null),null);$APP.sd(["x-menu-open",new $APP.Q(null,1,[$APP.Y,$APP.td],null),"x-menu-close",new $APP.Q(null,1,[$APP.Y,$APP.td],null),"x-menu-select",new $APP.Q(null,1,[$APP.Y,new $APP.Q(null,1,[$APP.U,$APP.X],null)],null)]);$APP.ja("baredom.exports.x_menu.init",vv);export const init=vv;
package/dist/x-modal.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var KD=function(a){var b=$APP.l(a,"__xModalRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("slot"),k=document.createElement("div"),m=document.createElement("slot"),q=document.createElement("div"),r=document.createElement("slot");c.textContent=":host{display:contents;color-scheme:light dark;--x-modal-bg:Canvas;--x-modal-fg:CanvasText;--x-modal-backdrop:rgb(0 0 0/0.45);--x-modal-shadow:0 20px 60px rgb(0 0 0/0.25);--x-modal-radius:0.75rem;--x-modal-width-sm:22rem;--x-modal-width-md:32rem;--x-modal-width-lg:44rem;--x-modal-width-xl:60rem;--x-modal-max-height:90vh;--x-modal-header-padding:1rem 1.25rem;--x-modal-body-padding:1rem 1.25rem;--x-modal-footer-padding:0.75rem 1.25rem;--x-modal-border:color-mix(in srgb,currentColor 12%,transparent);--x-modal-duration:180ms;--x-modal-easing:ease;--x-modal-z:1000;}[part\x3dbackdrop]{position:fixed;inset:0;background:var(--x-modal-backdrop);z-index:var(--x-modal-z);opacity:0;visibility:hidden;pointer-events:none;transition:opacity var(--x-modal-duration) var(--x-modal-easing),visibility 0s var(--x-modal-easing) var(--x-modal-duration);}:host([data-open\x3dtrue]) [part\x3dbackdrop]{opacity:1;visibility:visible;pointer-events:auto;transition:opacity var(--x-modal-duration) var(--x-modal-easing),visibility 0s;}[part\x3ddialog]{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%) scale(0.96);opacity:0;visibility:hidden;pointer-events:none;background:var(--x-modal-bg);color:var(--x-modal-fg);box-shadow:var(--x-modal-shadow);border-radius:var(--x-modal-radius);display:flex;flex-direction:column;overflow:hidden;z-index:calc(var(--x-modal-z) + 1);max-height:var(--x-modal-max-height);transition:opacity var(--x-modal-duration) var(--x-modal-easing),transform var(--x-modal-duration) var(--x-modal-easing),visibility 0s var(--x-modal-easing) var(--x-modal-duration);}:host([data-size\x3dsm]) [part\x3ddialog]{width:var(--x-modal-width-sm);}:host([data-size\x3dmd]) [part\x3ddialog]{width:var(--x-modal-width-md);}:host([data-size\x3dlg]) [part\x3ddialog]{width:var(--x-modal-width-lg);}:host([data-size\x3dxl]) [part\x3ddialog]{width:var(--x-modal-width-xl);}:host([data-size\x3dfull]) [part\x3ddialog]{inset:0;top:0;left:0;width:100vw;height:100dvh;border-radius:0;max-width:100vw;max-height:100dvh;transform:scale(0.98);}:host([data-open\x3dtrue]) [part\x3ddialog]{opacity:1;transform:translate(-50%,-50%) scale(1);visibility:visible;pointer-events:auto;transition:opacity var(--x-modal-duration) var(--x-modal-easing),transform var(--x-modal-duration) var(--x-modal-easing),visibility 0s;}:host([data-open\x3dtrue][data-size\x3dfull]) [part\x3ddialog]{transform:scale(1);}[part\x3ddialog]:focus{outline:none;}[part\x3dheader]{padding:var(--x-modal-header-padding);border-bottom:1px solid var(--x-modal-border);flex-shrink:0;}[part\x3dbody]{padding:var(--x-modal-body-padding);overflow-y:auto;flex:1;}[part\x3dfooter]{padding:var(--x-modal-footer-padding);border-top:1px solid var(--x-modal-border);flex-shrink:0;}@media (prefers-reduced-motion:reduce){[part\x3ddialog],[part\x3dbackdrop]{transition:none;}}";
2
+ var TD=function(a){var b=$APP.l(a,"__xModalRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("slot"),k=document.createElement("div"),m=document.createElement("slot"),q=document.createElement("div"),r=document.createElement("slot");c.textContent=":host{display:contents;color-scheme:light dark;--x-modal-bg:Canvas;--x-modal-fg:CanvasText;--x-modal-backdrop:rgb(0 0 0/0.45);--x-modal-shadow:0 20px 60px rgb(0 0 0/0.25);--x-modal-radius:0.75rem;--x-modal-width-sm:22rem;--x-modal-width-md:32rem;--x-modal-width-lg:44rem;--x-modal-width-xl:60rem;--x-modal-max-height:90vh;--x-modal-header-padding:1rem 1.25rem;--x-modal-body-padding:1rem 1.25rem;--x-modal-footer-padding:0.75rem 1.25rem;--x-modal-border:color-mix(in srgb,currentColor 12%,transparent);--x-modal-duration:180ms;--x-modal-easing:ease;--x-modal-z:1000;}[part\x3dbackdrop]{position:fixed;inset:0;background:var(--x-modal-backdrop);z-index:var(--x-modal-z);opacity:0;visibility:hidden;pointer-events:none;transition:opacity var(--x-modal-duration) var(--x-modal-easing),visibility 0s var(--x-modal-easing) var(--x-modal-duration);}:host([data-open\x3dtrue]) [part\x3dbackdrop]{opacity:1;visibility:visible;pointer-events:auto;transition:opacity var(--x-modal-duration) var(--x-modal-easing),visibility 0s;}[part\x3ddialog]{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%) scale(0.96);opacity:0;visibility:hidden;pointer-events:none;background:var(--x-modal-bg);color:var(--x-modal-fg);box-shadow:var(--x-modal-shadow);border-radius:var(--x-modal-radius);display:flex;flex-direction:column;overflow:hidden;z-index:calc(var(--x-modal-z) + 1);max-height:var(--x-modal-max-height);transition:opacity var(--x-modal-duration) var(--x-modal-easing),transform var(--x-modal-duration) var(--x-modal-easing),visibility 0s var(--x-modal-easing) var(--x-modal-duration);}:host([data-size\x3dsm]) [part\x3ddialog]{width:var(--x-modal-width-sm);}:host([data-size\x3dmd]) [part\x3ddialog]{width:var(--x-modal-width-md);}:host([data-size\x3dlg]) [part\x3ddialog]{width:var(--x-modal-width-lg);}:host([data-size\x3dxl]) [part\x3ddialog]{width:var(--x-modal-width-xl);}:host([data-size\x3dfull]) [part\x3ddialog]{inset:0;top:0;left:0;width:100vw;height:100dvh;border-radius:0;max-width:100vw;max-height:100dvh;transform:scale(0.98);}:host([data-open\x3dtrue]) [part\x3ddialog]{opacity:1;transform:translate(-50%,-50%) scale(1);visibility:visible;pointer-events:auto;transition:opacity var(--x-modal-duration) var(--x-modal-easing),transform var(--x-modal-duration) var(--x-modal-easing),visibility 0s;}:host([data-open\x3dtrue][data-size\x3dfull]) [part\x3ddialog]{transform:scale(1);}[part\x3ddialog]:focus{outline:none;}[part\x3dheader]{padding:var(--x-modal-header-padding);border-bottom:1px solid var(--x-modal-border);flex-shrink:0;}[part\x3dbody]{padding:var(--x-modal-body-padding);overflow-y:auto;flex:1;}[part\x3dfooter]{padding:var(--x-modal-footer-padding);border-top:1px solid var(--x-modal-border);flex-shrink:0;}@media (prefers-reduced-motion:reduce){[part\x3ddialog],[part\x3dbackdrop]{transition:none;}}";
3
3
  d.setAttribute("part","backdrop");e.setAttribute("part","dialog");e.setAttribute("role","dialog");e.setAttribute("aria-modal","true");g.setAttribute("part","header");h.setAttribute("name","header");k.setAttribute("part","body");q.setAttribute("part","footer");r.setAttribute("name","footer");g.appendChild(h);k.appendChild(m);q.appendChild(r);e.appendChild(g);e.appendChild(k);e.appendChild(q);b.appendChild(c);b.appendChild(d);b.appendChild(e);a.__xModalRefs={root:b,backdrop:d,dialog:e,header:g,body:k,
4
- footer:q};return $APP.l(a,"__xModalRefs")},LD=function(a,b,c){a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1}))},MD=function(a){function b(d){var e=window.getComputedStyle(d);return $APP.O("none",e.display)&&$APP.O("hidden",e.visibility)&&d.offsetWidth>0&&d.offsetHeight>0}var c=$APP.Kd(b,$APP.gc($APP.l(a,"dialog").querySelectorAll("a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex\x3d'-1'])")));
5
- a=$APP.Jd(function(d){return $APP.Kd(b,$APP.Jd(function(e){var g=$APP.gc(e.querySelectorAll("a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex\x3d'-1'])"));return $APP.n(e.matches("a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex\x3d'-1'])"))?$APP.Xc(e,g):g},$APP.gc([$APP.hc(d.assignedElements({flatten:!0}))])))},$APP.gc([$APP.gc($APP.l(a,"root").querySelectorAll("slot"))]));
6
- return $APP.be($APP.Gd.h(c,a))},ND=function(a){var b=$APP.l(a,"__xModalRefs");b=$APP.n(b)?$APP.l(b,"dialog"):null;var c=$APP.l(a,"__xModalRestore"),d=$APP.l(a,"__xModalDialogTab")===!0;a.__xModalTabbables=null;a.__xModalRestore=null;$APP.n($APP.n(b)?d:b)&&(b.removeAttribute("tabindex"),a.__xModalDialogTab=!1);$APP.n($APP.n(c)?c.isConnected:c)&&c.focus()},OD=function(a,b){LD(a,"x-modal-dismiss",{reason:b});a.removeAttribute("open");return null},PD=function(a){$APP.n(a.hasAttribute("open"))||a.setAttribute("open",
7
- "");return null},QD=function(a){a.removeAttribute("open");return null},RD=function(a,b){$APP.O($APP.l(a,"__xModalPrevOpen"),b)&&(a.__xModalPrevOpen=b,LD(a,"x-modal-toggle",{open:b}),$APP.n(b)?setTimeout(function(){var c=$APP.l(a,"__xModalRefs"),d=$APP.n(c)?$APP.l(c,"dialog"):null;c=$APP.n(c)?MD(c):null;a.__xModalRestore=document.activeElement;var e=$APP.n(c)?$APP.xg(c):null;a.__xModalTabbables=e;$APP.u(c)?$APP.x(c).focus():$APP.n(d)&&($APP.n(d.hasAttribute("tabindex"))||(d.setAttribute("tabindex",
8
- "-1"),a.__xModalDialogTab=!0),d.focus());return null},0):ND(a))},TD=function(a){var b=KD(a);b=$APP.l(b,"dialog");var c=new $APP.Q(null,3,[$APP.qh,a.hasAttribute("open"),$APP.fi,a.getAttribute("size"),$APP.ch,a.getAttribute("label")],null);var d=$APP.N(c),e=$APP.J(d,$APP.qh);c=$APP.J(d,$APP.fi);d=$APP.J(d,$APP.ch);e=$APP.K(e);c=typeof c==="string"&&$APP.Cc(SD,c)?c:"md";d=typeof d==="string"&&$APP.O(d,"")?d:"Modal";c=new $APP.Q(null,3,[$APP.Ni,e,$APP.Ag,c,$APP.W,d],null);d=$APP.Ni.g(c);a.setAttribute("data-open",
9
- $APP.n(d)?"true":"false");a.setAttribute("data-size",$APP.Ag.g(c));b.setAttribute("aria-label",$APP.W.g(c));RD(a,d)},UD=function(a){function b(g){var h=g.key;if($APP.C.h(h,"Escape"))g.preventDefault(),OD(a,"escape");else if($APP.C.h(h,"Tab")){h=$APP.l(a,"__xModalTabbables");h=$APP.n(h)?$APP.be($APP.gc(h)):$APP.Ld;var k=$APP.l(a,"__xModalRefs");k=$APP.n(k)?$APP.l(k,"dialog"):null;if($APP.rc(h))g.preventDefault(),$APP.n(k)&&k.focus();else{k=document.activeElement;var m=$APP.x(h);h=$APP.ic(h);var q=
10
- g.shiftKey;$APP.n($APP.n(q)?$APP.C.h(k,m):q)?(g.preventDefault(),h.focus()):$APP.p(q)&&$APP.C.h(k,h)&&(g.preventDefault(),m.focus())}}return null}function c(){return OD(a,"backdrop")}var d=KD(a),e=$APP.l(d,"dialog");$APP.l(d,"backdrop").addEventListener("click",c);e.addEventListener("keydown",b);$APP.ma(a,"__xModalHandlers",{backdrop:c,keydown:b})},VD=function(a){var b=$APP.l(a,"__xModalHandlers"),c=$APP.l(a,"__xModalRefs");if($APP.n($APP.n(b)?c:b)){var d=$APP.l(c,"backdrop");c=$APP.l(c,"dialog");
11
- var e=$APP.l(b,"backdrop");b=$APP.l(b,"keydown");$APP.n(e)&&d.removeEventListener("click",e);$APP.n(b)&&c.removeEventListener("keydown",b)}a.__xModalHandlers=null},WD=function(a){Object.defineProperty(a,"open",{get:function(){return this.hasAttribute("open")},set:function(b){return $APP.n(b)?PD(this):QD(this)},enumerable:!0,configurable:!0});Object.defineProperty(a,"size",{get:function(){var b=this.getAttribute("size");return $APP.n(b)?b:"md"},set:function(b){return b==null?this.removeAttribute("size"):
12
- this.setAttribute("size",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.n(b)?b:"Modal"},set:function(b){return b==null?this.removeAttribute("label"):this.setAttribute("label",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"show",{value:function(){return PD(this)},enumerable:!0,configurable:!0,writable:!0});Object.defineProperty(a,"hide",{value:function(){return QD(this)},enumerable:!0,
13
- configurable:!0,writable:!0});Object.defineProperty(a,"toggle",{value:function(){$APP.n(this.hasAttribute("open"))?QD(this):PD(this);return null},enumerable:!0,configurable:!0,writable:!0})},YD=function(){if(!$APP.n(customElements.get("x-modal"))){var a=class extends HTMLElement{};a.observedAttributes=XD;a.prototype.connectedCallback=function(){KD(this);VD(this);UD(this);TD(this);return null};a.prototype.disconnectedCallback=function(){VD(this);ND(this);return null};a.prototype.attributeChangedCallback=
14
- function(b,c,d){$APP.O(c,d)&&TD(this);return null};WD(a.prototype);customElements.define("x-modal",a)}return null},ZD=function(){return YD()};var SD=new $APP.S(null,new $APP.Q(null,5,["md",null,"lg",null,"full",null,"xl",null,"sm",null],null),null),XD=["open","size","label"];$APP.wd(["x-modal-toggle",new $APP.Q(null,2,[$APP.ui,!1,$APP.Y,new $APP.Q(null,1,[$APP.qi,$APP.Ji],null)],null),"x-modal-dismiss",new $APP.Q(null,2,[$APP.ui,!1,$APP.Y,new $APP.Q(null,1,[$APP.wh,$APP.X],null)],null)]);$APP.ka("baredom.exports.x_modal.init",ZD);export const init=ZD;
4
+ footer:q};return $APP.l(a,"__xModalRefs")},UD=function(a,b,c){a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1}))},VD=function(a){function b(d){var e=window.getComputedStyle(d);return $APP.O("none",e.display)&&$APP.O("hidden",e.visibility)&&d.offsetWidth>0&&d.offsetHeight>0}var c=$APP.Ed(b,$APP.dc($APP.l(a,"dialog").querySelectorAll("a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex\x3d'-1'])")));
5
+ a=$APP.Dd(function(d){return $APP.Ed(b,$APP.Dd(function(e){var g=$APP.dc(e.querySelectorAll("a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex\x3d'-1'])"));return $APP.n(e.matches("a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex\x3d'-1'])"))?$APP.Tc(e,g):g},$APP.dc([$APP.ec(d.assignedElements({flatten:!0}))])))},$APP.dc([$APP.dc($APP.l(a,"root").querySelectorAll("slot"))]));
6
+ return $APP.Wd($APP.Bd.h(c,a))},WD=function(a){var b=$APP.l(a,"__xModalRefs");b=$APP.n(b)?$APP.l(b,"dialog"):null;var c=$APP.l(a,"__xModalRestore"),d=$APP.l(a,"__xModalDialogTab")===!0;a.__xModalTabbables=null;a.__xModalRestore=null;$APP.n($APP.n(b)?d:b)&&(b.removeAttribute("tabindex"),a.__xModalDialogTab=!1);$APP.n($APP.n(c)?c.isConnected:c)&&c.focus()},XD=function(a,b){UD(a,"x-modal-dismiss",{reason:b});a.removeAttribute("open");return null},YD=function(a){$APP.n(a.hasAttribute("open"))||a.setAttribute("open",
7
+ "");return null},ZD=function(a){a.removeAttribute("open");return null},$D=function(a,b){$APP.O($APP.l(a,"__xModalPrevOpen"),b)&&(a.__xModalPrevOpen=b,UD(a,"x-modal-toggle",{open:b}),$APP.n(b)?setTimeout(function(){var c=$APP.l(a,"__xModalRefs"),d=$APP.n(c)?$APP.l(c,"dialog"):null;c=$APP.n(c)?VD(c):null;a.__xModalRestore=document.activeElement;var e=$APP.n(c)?$APP.pg(c):null;a.__xModalTabbables=e;$APP.u(c)?$APP.x(c).focus():$APP.n(d)&&($APP.n(d.hasAttribute("tabindex"))||(d.setAttribute("tabindex",
8
+ "-1"),a.__xModalDialogTab=!0),d.focus());return null},0):WD(a))},bE=function(a){var b=TD(a);b=$APP.l(b,"dialog");var c=new $APP.Q(null,3,[$APP.jh,a.hasAttribute("open"),$APP.$h,a.getAttribute("size"),$APP.Wg,a.getAttribute("label")],null);var d=$APP.N(c),e=$APP.I(d,$APP.jh);c=$APP.I(d,$APP.$h);d=$APP.I(d,$APP.Wg);e=$APP.K(e);c=typeof c==="string"&&$APP.yc(aE,c)?c:"md";d=typeof d==="string"&&$APP.O(d,"")?d:"Modal";c=new $APP.Q(null,3,[$APP.Hi,e,$APP.sg,c,$APP.W,d],null);d=$APP.Hi.g(c);a.setAttribute("data-open",
9
+ $APP.n(d)?"true":"false");a.setAttribute("data-size",$APP.sg.g(c));b.setAttribute("aria-label",$APP.W.g(c));$D(a,d)},cE=function(a){function b(g){var h=g.key;if($APP.C.h(h,"Escape"))g.preventDefault(),XD(a,"escape");else if($APP.C.h(h,"Tab")){h=$APP.l(a,"__xModalTabbables");h=$APP.n(h)?$APP.Wd($APP.dc(h)):$APP.Fd;var k=$APP.l(a,"__xModalRefs");k=$APP.n(k)?$APP.l(k,"dialog"):null;if($APP.oc(h))g.preventDefault(),$APP.n(k)&&k.focus();else{k=document.activeElement;var m=$APP.x(h);h=$APP.fc(h);var q=
10
+ g.shiftKey;$APP.n($APP.n(q)?$APP.C.h(k,m):q)?(g.preventDefault(),h.focus()):$APP.p(q)&&$APP.C.h(k,h)&&(g.preventDefault(),m.focus())}}return null}function c(){return XD(a,"backdrop")}var d=TD(a),e=$APP.l(d,"dialog");$APP.l(d,"backdrop").addEventListener("click",c);e.addEventListener("keydown",b);$APP.la(a,"__xModalHandlers",{backdrop:c,keydown:b})},dE=function(a){var b=$APP.l(a,"__xModalHandlers"),c=$APP.l(a,"__xModalRefs");if($APP.n($APP.n(b)?c:b)){var d=$APP.l(c,"backdrop");c=$APP.l(c,"dialog");
11
+ var e=$APP.l(b,"backdrop");b=$APP.l(b,"keydown");$APP.n(e)&&d.removeEventListener("click",e);$APP.n(b)&&c.removeEventListener("keydown",b)}a.__xModalHandlers=null},eE=function(a){Object.defineProperty(a,"open",{get:function(){return this.hasAttribute("open")},set:function(b){return $APP.n(b)?YD(this):ZD(this)},enumerable:!0,configurable:!0});Object.defineProperty(a,"size",{get:function(){var b=this.getAttribute("size");return $APP.n(b)?b:"md"},set:function(b){return b==null?this.removeAttribute("size"):
12
+ this.setAttribute("size",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.n(b)?b:"Modal"},set:function(b){return b==null?this.removeAttribute("label"):this.setAttribute("label",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"show",{value:function(){return YD(this)},enumerable:!0,configurable:!0,writable:!0});Object.defineProperty(a,"hide",{value:function(){return ZD(this)},enumerable:!0,
13
+ configurable:!0,writable:!0});Object.defineProperty(a,"toggle",{value:function(){$APP.n(this.hasAttribute("open"))?ZD(this):YD(this);return null},enumerable:!0,configurable:!0,writable:!0})},gE=function(){if(!$APP.n(customElements.get("x-modal"))){var a=class extends HTMLElement{};a.observedAttributes=fE;a.prototype.connectedCallback=function(){TD(this);dE(this);cE(this);bE(this);return null};a.prototype.disconnectedCallback=function(){dE(this);WD(this);return null};a.prototype.attributeChangedCallback=
14
+ function(b,c,d){$APP.O(c,d)&&bE(this);return null};eE(a.prototype);customElements.define("x-modal",a)}return null},hE=function(){return gE()};var aE=new $APP.S(null,new $APP.Q(null,5,["md",null,"lg",null,"full",null,"xl",null,"sm",null],null),null),fE=["open","size","label"];$APP.sd(["x-modal-toggle",new $APP.Q(null,2,[$APP.ni,!1,$APP.Y,new $APP.Q(null,1,[$APP.ji,$APP.Di],null)],null),"x-modal-dismiss",new $APP.Q(null,2,[$APP.ni,!1,$APP.Y,new $APP.Q(null,1,[$APP.qh,$APP.X],null)],null)]);$APP.ja("baredom.exports.x_modal.init",hE);export const init=hE;
package/dist/x-navbar.js CHANGED
@@ -1,13 +1,14 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var qD=function(a,b,c){return typeof a==="string"&&$APP.Cc(b,a)?a:c},rD=function(a){return a.__xNavbarState},sD=function(a,b){return a.__xNavbarFocusVisible=$APP.K(b)},tD=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1}))},uD=function(a){return a.assignedNodes({flatten:!0})},vD=function(a){return document.createElement(a)},CD=function(a,b){var c=b.base,d=b.bar,e=b.brand,g=b.start,h=b.actions,k=b.toggle,m=b.end,q=b["brand-slot"],r=b["start-slot"],
3
- v=b["actions-slot"],w=b["toggle-slot"];b=b["end-slot"];a=new $APP.Q(null,7,[$APP.W,a.getAttribute("label"),$APP.zh,a.getAttribute("orientation"),$APP.Vg,a.getAttribute("variant"),$APP.Qh,a.hasAttribute("sticky"),wD,a.hasAttribute("elevated"),$APP.Oh,a.getAttribute("breakpoint"),xD,a.getAttribute("alignment")],null);var z=$APP.N(a);a=$APP.J(z,$APP.W);var A=$APP.J(z,$APP.zh),D=$APP.J(z,$APP.Vg),F=$APP.J(z,$APP.Qh),I=$APP.J(z,wD),E=$APP.J(z,$APP.Oh);z=$APP.J(z,xD);a=new $APP.Q(null,7,[$APP.W,typeof a===
4
- "string"?a:null,$APP.zh,qD(A,yD,"horizontal"),$APP.Vg,qD(D,zD,"default"),$APP.Qh,$APP.K(F),wD,$APP.K(I),$APP.Oh,qD(E,AD,"md"),xD,qD(z,BD,"space-between")],null);q=uD(q).length>0;r=uD(r).length>0;v=uD(v).length>0;w=uD(w).length>0;b=uD(b).length>0;A=$APP.N(a);A=$APP.J(A,$APP.W);A=typeof A==="string"&&$APP.O("",A)?A:null;$APP.n(A)?c.setAttribute("aria-label",A):c.removeAttribute("aria-label");c.setAttribute("data-variant",$APP.Vg.g(a));c.setAttribute("data-orientation",$APP.zh.g(a));c.setAttribute("data-breakpoint",
5
- $APP.Oh.g(a));d.setAttribute("data-alignment",xD.g(a));e.setAttribute("data-has-brand",q?"true":"false");g.setAttribute("data-has-start",r?"true":"false");h.setAttribute("data-has-actions",v?"true":"false");k.setAttribute("data-has-toggle",w?"true":"false");return m.setAttribute("data-has-end",b?"true":"false")},DD=function(a,b){b.addEventListener("click",function(c){var d=rD(a),e=c.target,g=$APP.n(e)?e.closest("a"):null;c=c instanceof PointerEvent?"pointer":c instanceof MouseEvent?"pointer":c instanceof
6
- KeyboardEvent?"keyboard":"programmatic";$APP.n(g)&&(g=g.getAttribute("href"),tD(a,"navigate",{href:$APP.n(g)?g:"",source:c}));a:{d=uD(d["brand-slot"]);for(g=0;;)if(g<d.length){var h=d[g];var k=$APP.C.h(h,e);h=k?k:(k=$APP.C.h(h.nodeType,Node.ELEMENT_NODE))?h.contains(e):k;if($APP.n(h)){e=!0;break a}g+=1}else{e=!1;break a}e=void 0}return e?tD(a,"brand-activate",{source:c}):null});b.addEventListener("focusin",function(c){c=c.target;if($APP.n($APP.n(c)?c.matches(":focus-visible"):c)){if($APP.C.h(!0,a.__xNavbarFocusVisible))return null;
7
- sD(a,!0);a.setAttribute("data-focus-visible-within","true");return tD(a,"focus-visible",{})}return null});b.addEventListener("focusout",function(c){c=c.relatedTarget;if($APP.n($APP.n(c)?a.contains(c):c))return null;sD(a,!1);return a.removeAttribute("data-focus-visible-within")})},ED=function(a,b){function c(){return CD(a,b)}b["brand-slot"].addEventListener("slotchange",c);b["start-slot"].addEventListener("slotchange",c);b["default-slot"].addEventListener("slotchange",c);b["actions-slot"].addEventListener("slotchange",
8
- c);b["toggle-slot"].addEventListener("slotchange",c);b["end-slot"].addEventListener("slotchange",c)},FD=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return $APP.n($APP.K(d))?this.setAttribute(c,""):this.removeAttribute(c)}})},GD=function(){function a(){return Reflect.construct(HTMLElement,[],$APP.Ra(b))}var b=new $APP.Dd;$APP.Ed(b,a);return a},ID=function(){if($APP.n(customElements.get("x-navbar")))return null;
9
- var a=Object.create(HTMLElement.prototype),b=GD();Object.setPrototypeOf(b,HTMLElement);a.constructor=b;FD(a,"sticky","sticky");FD(a,"elevated","elevated");a.connectedCallback=function(){if(!$APP.n(rD(this))){var c=this.attachShadow({mode:"open"});var d=vD("style"),e=vD("nav"),g=vD("div"),h=vD("div"),k=vD("div"),m=vD("div"),q=vD("div"),r=vD("div"),v=vD("div"),w=vD("slot"),z=vD("slot"),A=vD("slot"),D=vD("slot"),F=vD("slot"),I=vD("slot");d.textContent=":host{display:block;color-scheme:light dark;--x-navbar-height:4rem;--x-navbar-padding-inline:1rem;--x-navbar-gap:0.75rem;--x-navbar-bg:rgba(255,255,255,0.88);--x-navbar-color:#0f172a;--x-navbar-border:rgba(148,163,184,0.22);--x-navbar-divider:rgba(148,163,184,0.18);--x-navbar-shadow:0 8px 24px rgba(15,23,42,0.08);--x-navbar-focus-ring:#60a5fa;--x-navbar-z-index:40;--x-navbar-radius:1rem;--x-navbar-transition-duration:180ms;--x-navbar-transition-easing:cubic-bezier(0.2,0,0,1);--x-navbar-align-items:center;}@media (prefers-color-scheme: dark){:host{--x-navbar-bg:rgba(15,23,42,0.84);--x-navbar-color:#e5e7eb;--x-navbar-border:rgba(51,65,85,0.9);--x-navbar-divider:rgba(51,65,85,0.8);--x-navbar-shadow:0 14px 36px rgba(0,0,0,0.35);--x-navbar-focus-ring:#93c5fd;}}:host([hidden]){display:none;}[part\x3d'base']{display:block;color:var(--x-navbar-color);background:var(--x-navbar-bg);border:1px solid var(--x-navbar-border);border-radius:var(--x-navbar-radius);box-shadow:none;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);transition:background var(--x-navbar-transition-duration) var(--x-navbar-transition-easing),border-color var(--x-navbar-transition-duration) var(--x-navbar-transition-easing),box-shadow var(--x-navbar-transition-duration) var(--x-navbar-transition-easing);}:host([sticky]) [part\x3d'base']{position:sticky;top:0;z-index:var(--x-navbar-z-index);}:host([elevated]) [part\x3d'base']{box-shadow:var(--x-navbar-shadow);}[part\x3d'base'][data-variant\x3d'subtle']{background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:none;}[part\x3d'base'][data-variant\x3d'inverted']{background:#0f172a;color:#f8fafc;border-color:#1e293b;}@media (prefers-color-scheme: dark){[part\x3d'base'][data-variant\x3d'inverted']{background:#020617;color:#f8fafc;border-color:#172033;}}[part\x3d'base'][data-variant\x3d'transparent']{background:transparent;border-color:transparent;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;}[part\x3d'bar']{display:grid;grid-template-columns:auto auto 1fr auto auto auto;align-items:var(--x-navbar-align-items, center);gap:var(--x-navbar-gap);min-block-size:var(--x-navbar-height);padding-inline:var(--x-navbar-padding-inline);}[part\x3d'bar'][data-alignment\x3d'start']{justify-items:start;}[part\x3d'bar'][data-alignment\x3d'center']{justify-items:center;}[part\x3d'bar'][data-alignment\x3d'space-between']{justify-items:stretch;}[part\x3d'base'][data-orientation\x3d'vertical'] [part\x3d'bar']{grid-template-columns:1fr;grid-auto-rows:auto;align-items:var(--x-navbar-align-items, center);padding-block:0.75rem;}[part\x3d'brand'],[part\x3d'start'],[part\x3d'nav'],[part\x3d'actions'],[part\x3d'toggle'],[part\x3d'end']{display:flex;align-items:inherit;min-inline-size:0;}[part\x3d'nav']{gap:var(--x-navbar-gap);}[part\x3d'actions'],[part\x3d'end'],[part\x3d'toggle']{justify-self:end;}[part\x3d'base'][data-orientation\x3d'vertical'] [part\x3d'actions'],[part\x3d'base'][data-orientation\x3d'vertical'] [part\x3d'end'],[part\x3d'base'][data-orientation\x3d'vertical'] [part\x3d'toggle']{justify-self:start;}[part\x3d'brand'][data-has-brand\x3d'false'],[part\x3d'start'][data-has-start\x3d'false'],[part\x3d'actions'][data-has-actions\x3d'false'],[part\x3d'toggle'][data-has-toggle\x3d'false'],[part\x3d'end'][data-has-end\x3d'false']{display:none;}slot[name\x3d'brand'],slot[name\x3d'start'],slot[name\x3d'actions'],slot[name\x3d'toggle'],slot[name\x3d'end']{display:contents;}slot{display:contents;}:host(:focus-within) [part\x3d'base']{box-shadow:var(--x-navbar-shadow);}:host([data-focus-visible-within\x3d'true']) [part\x3d'base']{box-shadow:0 0 0 2px var(--x-navbar-focus-ring), var(--x-navbar-shadow);}@media (prefers-reduced-motion: reduce){[part\x3d'base']{transition:none;}}";
10
- e.setAttribute("part","base");g.setAttribute("part","bar");h.setAttribute("part","brand");k.setAttribute("part","start");m.setAttribute("part","nav");q.setAttribute("part","actions");r.setAttribute("part","toggle");v.setAttribute("part","end");w.setAttribute("name","brand");z.setAttribute("name","start");D.setAttribute("name","actions");F.setAttribute("name","toggle");I.setAttribute("name","end");h.appendChild(w);k.appendChild(z);m.appendChild(A);q.appendChild(D);r.appendChild(F);v.appendChild(I);
11
- g.appendChild(h);g.appendChild(k);g.appendChild(m);g.appendChild(q);g.appendChild(r);g.appendChild(v);e.appendChild(g);c.appendChild(d);c.appendChild(e);c={"end-slot":I,bar:g,start:k,toggle:r,actions:q,brand:h,"default-slot":A,root:c,"brand-slot":w,"start-slot":z,"actions-slot":D,"toggle-slot":F,end:v,base:e,nav:m};d=c.base;sD(this,!1);DD(this,d);ED(this,c);this.__xNavbarState=c}return CD(this,rD(this))};a.disconnectedCallback=function(){return sD(this,!1)};a.attributeChangedCallback=function(){var c=
12
- rD(this);return $APP.n(c)?CD(this,c):null};b.observedAttributes=HD;b.prototype=a;return customElements.define("x-navbar",b)},JD=function(){return ID()},wD=new $APP.M(null,"elevated","elevated",-7323953),xD=new $APP.M(null,"alignment","alignment",1040093386);var yD=new $APP.S(null,new $APP.Q(null,2,["vertical",null,"horizontal",null],null),null),zD=new $APP.S(null,new $APP.Q(null,4,["transparent",null,"inverted",null,"subtle",null,"default",null],null),null),AD=new $APP.S(null,new $APP.Q(null,4,["md",null,"lg",null,"xl",null,"sm",null],null),null),BD=new $APP.S(null,new $APP.Q(null,3,["center",null,"start",null,"space-between",null],null),null),HD="label orientation variant sticky elevated breakpoint alignment".split(" ");
13
- $APP.wd(["focus-visible",new $APP.Q(null,1,[$APP.Y,$APP.xd],null),"navigate",new $APP.Q(null,1,[$APP.Y,new $APP.Q(null,2,[$APP.Wi,$APP.X,$APP.Bh,$APP.X],null)],null),"brand-activate",new $APP.Q(null,1,[$APP.Y,new $APP.Q(null,1,[$APP.Bh,$APP.X],null)],null)]);$APP.ka("baredom.exports.x_navbar.init",JD);export const init=JD;
2
+ var AD=function(a,b,c){return typeof a==="string"&&$APP.yc(b,a)?a:c},BD=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1}))},CD=function(a){return a.assignedNodes({flatten:!0})},DD=function(a){return document.createElement(a)},KD=function(a,b){var c=$APP.l(b,"base"),d=$APP.l(b,"bar"),e=$APP.l(b,"brand"),g=$APP.l(b,"start"),h=$APP.l(b,"actions"),k=$APP.l(b,"toggle"),m=$APP.l(b,"end"),q=$APP.l(b,"brand-slot"),r=$APP.l(b,"start-slot"),v=$APP.l(b,
3
+ "actions-slot"),w=$APP.l(b,"toggle-slot");b=$APP.l(b,"end-slot");a=new $APP.Q(null,7,[$APP.W,a.getAttribute("label"),$APP.th,a.getAttribute("orientation"),$APP.Ng,a.getAttribute("variant"),$APP.Kh,a.hasAttribute("sticky"),ED,a.hasAttribute("elevated"),$APP.Ih,a.getAttribute("breakpoint"),FD,a.getAttribute("alignment")],null);var z=$APP.N(a);a=$APP.I(z,$APP.W);var A=$APP.I(z,$APP.th),D=$APP.I(z,$APP.Ng),G=$APP.I(z,$APP.Kh),J=$APP.I(z,ED),E=$APP.I(z,$APP.Ih);z=$APP.I(z,FD);a=new $APP.Q(null,7,[$APP.W,
4
+ typeof a==="string"?a:null,$APP.th,AD(A,GD,"horizontal"),$APP.Ng,AD(D,HD,"default"),$APP.Kh,$APP.K(G),ED,$APP.K(J),$APP.Ih,AD(E,ID,"md"),FD,AD(z,JD,"space-between")],null);q=CD(q).length>0;r=CD(r).length>0;v=CD(v).length>0;w=CD(w).length>0;b=CD(b).length>0;A=$APP.N(a);A=$APP.I(A,$APP.W);A=typeof A==="string"&&$APP.O("",A)?A:null;$APP.n(A)?c.setAttribute("aria-label",A):c.removeAttribute("aria-label");c.setAttribute("data-variant",$APP.Ng.g(a));c.setAttribute("data-orientation",$APP.th.g(a));c.setAttribute("data-breakpoint",
5
+ $APP.Ih.g(a));d.setAttribute("data-alignment",FD.g(a));e.setAttribute("data-has-brand",q?"true":"false");g.setAttribute("data-has-start",r?"true":"false");h.setAttribute("data-has-actions",v?"true":"false");k.setAttribute("data-has-toggle",w?"true":"false");return m.setAttribute("data-has-end",b?"true":"false")},LD=function(a,b){b.addEventListener("click",function(c){var d=$APP.l(a,"__xNavbarRefs"),e=c.target,g=$APP.n(e)?e.closest("a"):null;c=c instanceof PointerEvent?"pointer":c instanceof MouseEvent?
6
+ "pointer":c instanceof KeyboardEvent?"keyboard":"programmatic";$APP.n(g)&&(g=g.getAttribute("href"),BD(a,"navigate",{href:$APP.n(g)?g:"",source:c}));a:{d=CD($APP.l(d,"brand-slot"));for(g=0;;)if(g<d.length){var h=d[g];var k=$APP.C.h(h,e);h=k?k:(k=$APP.C.h(h.nodeType,Node.ELEMENT_NODE))?h.contains(e):k;if($APP.n(h)){e=!0;break a}g+=1}else{e=!1;break a}e=void 0}return e?BD(a,"brand-activate",{source:c}):null});b.addEventListener("focusin",function(c){c=c.target;if($APP.n($APP.n(c)?c.matches(":focus-visible"):
7
+ c)){if($APP.n($APP.l(a,"__xNavbarFocusVisible")))return null;a.__xNavbarFocusVisible=!0;a.setAttribute("data-focus-visible-within","true");return BD(a,"focus-visible",{})}return null});b.addEventListener("focusout",function(c){c=c.relatedTarget;if($APP.n($APP.n(c)?a.contains(c):c))return null;a.__xNavbarFocusVisible=!1;return a.removeAttribute("data-focus-visible-within")})},MD=function(a,b){function c(){return KD(a,b)}$APP.l(b,"brand-slot").addEventListener("slotchange",c);$APP.l(b,"start-slot").addEventListener("slotchange",
8
+ c);$APP.l(b,"default-slot").addEventListener("slotchange",c);$APP.l(b,"actions-slot").addEventListener("slotchange",c);$APP.l(b,"toggle-slot").addEventListener("slotchange",c);$APP.l(b,"end-slot").addEventListener("slotchange",c)},ND=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return $APP.n($APP.K(d))?this.setAttribute(c,""):this.removeAttribute(c)}})},OD=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,
9
+ enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.n(d)?d:""},set:function(d){return $APP.n(d)?this.setAttribute(c,""+$APP.T.g(d)):this.removeAttribute(c)}})},PD=function(a){ND(a,"sticky","sticky");ND(a,"elevated","elevated");OD(a,"label","label");OD(a,"variant","variant");OD(a,"orientation","orientation");OD(a,"alignment","alignment");OD(a,"breakpoint","breakpoint")},RD=function(){var a=class extends HTMLElement{};a.observedAttributes=QD;a.prototype.connectedCallback=function(){var b=
10
+ $APP.l(this,"__xNavbarRefs")==null;var c=$APP.l(this,"__xNavbarRefs");if(!$APP.n(c)){c=this.attachShadow({mode:"open"});var d=DD("style"),e=DD("nav"),g=DD("div"),h=DD("div"),k=DD("div"),m=DD("div"),q=DD("div"),r=DD("div"),v=DD("div"),w=DD("slot"),z=DD("slot"),A=DD("slot"),D=DD("slot"),G=DD("slot"),J=DD("slot");d.textContent=":host{display:block;color-scheme:light dark;--x-navbar-height:4rem;--x-navbar-padding-inline:1rem;--x-navbar-gap:0.75rem;--x-navbar-bg:rgba(255,255,255,0.88);--x-navbar-color:#0f172a;--x-navbar-border:rgba(148,163,184,0.22);--x-navbar-shadow:0 8px 24px rgba(15,23,42,0.08);--x-navbar-focus-ring:#60a5fa;--x-navbar-z-index:40;--x-navbar-radius:1rem;--x-navbar-transition-duration:180ms;--x-navbar-transition-easing:cubic-bezier(0.2,0,0,1);--x-navbar-align-items:center;}@media (prefers-color-scheme: dark){:host{--x-navbar-bg:rgba(15,23,42,0.84);--x-navbar-color:#e5e7eb;--x-navbar-border:rgba(51,65,85,0.9);--x-navbar-shadow:0 14px 36px rgba(0,0,0,0.35);--x-navbar-focus-ring:#93c5fd;}}:host([hidden]){display:none;}[part\x3d'base']{display:block;color:var(--x-navbar-color);background:var(--x-navbar-bg);border:1px solid var(--x-navbar-border);border-radius:var(--x-navbar-radius);box-shadow:none;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);transition:background var(--x-navbar-transition-duration) var(--x-navbar-transition-easing),border-color var(--x-navbar-transition-duration) var(--x-navbar-transition-easing),box-shadow var(--x-navbar-transition-duration) var(--x-navbar-transition-easing);}:host([sticky]) [part\x3d'base']{position:sticky;top:0;z-index:var(--x-navbar-z-index);}:host([elevated]) [part\x3d'base']{box-shadow:var(--x-navbar-shadow);}[part\x3d'base'][data-variant\x3d'subtle']{background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:none;}[part\x3d'base'][data-variant\x3d'inverted']{background:#0f172a;color:#f8fafc;border-color:#1e293b;}@media (prefers-color-scheme: dark){[part\x3d'base'][data-variant\x3d'inverted']{background:#020617;color:#f8fafc;border-color:#172033;}}[part\x3d'base'][data-variant\x3d'transparent']{background:transparent;border-color:transparent;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;}[part\x3d'bar']{display:grid;grid-template-columns:auto auto 1fr auto auto auto;align-items:var(--x-navbar-align-items, center);gap:var(--x-navbar-gap);min-block-size:var(--x-navbar-height);padding-inline:var(--x-navbar-padding-inline);}[part\x3d'bar'][data-alignment\x3d'start']{justify-items:start;}[part\x3d'bar'][data-alignment\x3d'center']{justify-items:center;}[part\x3d'bar'][data-alignment\x3d'space-between']{justify-items:stretch;}[part\x3d'base'][data-orientation\x3d'vertical'] [part\x3d'bar']{grid-template-columns:1fr;grid-auto-rows:auto;align-items:var(--x-navbar-align-items, center);padding-block:0.75rem;}[part\x3d'brand'],[part\x3d'start'],[part\x3d'nav'],[part\x3d'actions'],[part\x3d'toggle'],[part\x3d'end']{display:flex;align-items:inherit;min-inline-size:0;}[part\x3d'nav']{gap:var(--x-navbar-gap);}[part\x3d'actions'],[part\x3d'end'],[part\x3d'toggle']{justify-self:end;}[part\x3d'base'][data-orientation\x3d'vertical'] [part\x3d'actions'],[part\x3d'base'][data-orientation\x3d'vertical'] [part\x3d'end'],[part\x3d'base'][data-orientation\x3d'vertical'] [part\x3d'toggle']{justify-self:start;}[part\x3d'brand'][data-has-brand\x3d'false'],[part\x3d'start'][data-has-start\x3d'false'],[part\x3d'actions'][data-has-actions\x3d'false'],[part\x3d'toggle'][data-has-toggle\x3d'false'],[part\x3d'end'][data-has-end\x3d'false']{display:none;}slot[name\x3d'brand'],slot[name\x3d'start'],slot[name\x3d'actions'],slot[name\x3d'toggle'],slot[name\x3d'end']{display:contents;}slot{display:contents;}:host(:focus-within) [part\x3d'base']{box-shadow:var(--x-navbar-shadow);}:host([data-focus-visible-within\x3d'true']) [part\x3d'base']{box-shadow:0 0 0 2px var(--x-navbar-focus-ring), var(--x-navbar-shadow);}@media (prefers-reduced-motion: reduce){[part\x3d'base']{transition:none;}}";
11
+ e.setAttribute("part","base");g.setAttribute("part","bar");h.setAttribute("part","brand");k.setAttribute("part","start");m.setAttribute("part","nav");q.setAttribute("part","actions");r.setAttribute("part","toggle");v.setAttribute("part","end");w.setAttribute("name","brand");z.setAttribute("name","start");D.setAttribute("name","actions");G.setAttribute("name","toggle");J.setAttribute("name","end");h.appendChild(w);k.appendChild(z);m.appendChild(A);q.appendChild(D);r.appendChild(G);v.appendChild(J);
12
+ g.appendChild(h);g.appendChild(k);g.appendChild(m);g.appendChild(q);g.appendChild(r);g.appendChild(v);e.appendChild(g);c.appendChild(d);c.appendChild(e);this.__xNavbarRefs=c={"end-slot":J,bar:g,start:k,toggle:r,actions:q,brand:h,"default-slot":A,root:c,"brand-slot":w,"start-slot":z,"actions-slot":D,"toggle-slot":G,end:v,base:e,nav:m}}b&&(this.__xNavbarFocusVisible=!1,LD(this,$APP.l(c,"base")),MD(this,c));return KD(this,c)};a.prototype.disconnectedCallback=function(){this.__xNavbarFocusVisible=!1};
13
+ a.prototype.attributeChangedCallback=function(){var b=$APP.l(this,"__xNavbarRefs");return $APP.n(b)?KD(this,b):null};PD(a.prototype);return a},SD=function(){$APP.n(customElements.get("x-navbar"))||customElements.define("x-navbar",RD());return null},ED=new $APP.M(null,"elevated","elevated",-7323953),FD=new $APP.M(null,"alignment","alignment",1040093386);var GD=new $APP.S(null,new $APP.Q(null,2,["vertical",null,"horizontal",null],null),null),HD=new $APP.S(null,new $APP.Q(null,4,["transparent",null,"inverted",null,"subtle",null,"default",null],null),null),ID=new $APP.S(null,new $APP.Q(null,4,["md",null,"lg",null,"xl",null,"sm",null],null),null),JD=new $APP.S(null,new $APP.Q(null,3,["center",null,"start",null,"space-between",null],null),null),QD="label orientation variant sticky elevated breakpoint alignment".split(" ");
14
+ $APP.sd(["focus-visible",new $APP.Q(null,1,[$APP.Y,$APP.td],null),"navigate",new $APP.Q(null,1,[$APP.Y,new $APP.Q(null,2,[$APP.Qi,$APP.X,$APP.vh,$APP.X],null)],null),"brand-activate",new $APP.Q(null,1,[$APP.Y,new $APP.Q(null,1,[$APP.vh,$APP.X],null)],null)]);$APP.ja("baredom.exports.x_navbar.init",SD);export const init=SD;