@vanelsas/baredom 2.6.0 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +12 -41
  3. package/dist/base.js +355 -349
  4. package/dist/integrity.json +93 -93
  5. package/dist/x-alert.js +18 -19
  6. package/dist/x-avatar-group.js +10 -11
  7. package/dist/x-avatar.js +14 -14
  8. package/dist/x-badge.js +10 -11
  9. package/dist/x-bento-grid.js +5 -5
  10. package/dist/x-bento-item.js +4 -4
  11. package/dist/x-breadcrumbs.js +14 -14
  12. package/dist/x-button.js +18 -16
  13. package/dist/x-cancel-dialogue.js +17 -17
  14. package/dist/x-card.js +7 -7
  15. package/dist/x-carousel.js +34 -34
  16. package/dist/x-chart.js +46 -48
  17. package/dist/x-checkbox.js +10 -11
  18. package/dist/x-chip.js +9 -9
  19. package/dist/x-collapse.js +10 -12
  20. package/dist/x-color-picker.js +44 -45
  21. package/dist/x-combobox.js +26 -27
  22. package/dist/x-command-palette.js +26 -27
  23. package/dist/x-container.js +5 -6
  24. package/dist/x-context-menu.js +18 -18
  25. package/dist/x-copy.js +22 -22
  26. package/dist/x-currency-field.js +22 -24
  27. package/dist/x-date-picker.js +41 -42
  28. package/dist/x-divider.js +8 -9
  29. package/dist/x-drawer.js +11 -12
  30. package/dist/x-dropdown.js +10 -11
  31. package/dist/x-fieldset.js +6 -6
  32. package/dist/x-file-download.js +7 -8
  33. package/dist/x-file-upload.js +22 -25
  34. package/dist/x-form-field.js +15 -17
  35. package/dist/x-form.js +8 -10
  36. package/dist/x-gaussian-blur.js +18 -18
  37. package/dist/x-grid.js +6 -6
  38. package/dist/x-icon.js +7 -7
  39. package/dist/x-image.js +19 -19
  40. package/dist/x-kinetic-font.js +28 -29
  41. package/dist/x-kinetic-typography.js +39 -39
  42. package/dist/x-liquid-dock.js +39 -39
  43. package/dist/x-liquid-fill.js +44 -44
  44. package/dist/x-liquid-glass.js +47 -47
  45. package/dist/x-menu-item.js +9 -10
  46. package/dist/x-menu.js +11 -11
  47. package/dist/x-metaball-cursor.js +27 -27
  48. package/dist/x-modal.js +12 -13
  49. package/dist/x-morph-stack.js +38 -39
  50. package/dist/x-navbar.js +12 -13
  51. package/dist/x-neural-glow.js +32 -33
  52. package/dist/x-notification-center.js +9 -10
  53. package/dist/x-organic-divider.js +18 -19
  54. package/dist/x-organic-progress.js +37 -38
  55. package/dist/x-organic-shape.js +13 -14
  56. package/dist/x-pagination.js +16 -17
  57. package/dist/x-particle-button.js +48 -49
  58. package/dist/x-popover.js +24 -25
  59. package/dist/x-progress-circle.js +8 -9
  60. package/dist/x-progress.js +11 -11
  61. package/dist/x-radio.js +10 -12
  62. package/dist/x-ripple-effect.js +11 -11
  63. package/dist/x-scroll-parallax.js +19 -19
  64. package/dist/x-scroll-stack.js +18 -18
  65. package/dist/x-scroll-story.js +35 -35
  66. package/dist/x-scroll-timeline.js +46 -47
  67. package/dist/x-scroll.js +40 -41
  68. package/dist/x-search-field.js +15 -17
  69. package/dist/x-select.js +10 -11
  70. package/dist/x-sidebar.js +16 -16
  71. package/dist/x-skeleton-group.js +12 -14
  72. package/dist/x-skeleton.js +1 -1
  73. package/dist/x-slider.js +16 -18
  74. package/dist/x-soft-body.js +21 -21
  75. package/dist/x-spacer.js +5 -5
  76. package/dist/x-spinner.js +5 -6
  77. package/dist/x-splash.js +13 -13
  78. package/dist/x-stat.js +11 -11
  79. package/dist/x-stepper.js +15 -15
  80. package/dist/x-switch.js +9 -11
  81. package/dist/x-tab.js +7 -7
  82. package/dist/x-table-cell.js +22 -22
  83. package/dist/x-table-row.js +9 -10
  84. package/dist/x-table.js +14 -15
  85. package/dist/x-tabs.js +11 -11
  86. package/dist/x-text-area.js +19 -21
  87. package/dist/x-theme.d.ts +1 -1
  88. package/dist/x-theme.js +25 -25
  89. package/dist/x-timeline-item.js +23 -23
  90. package/dist/x-timeline.js +9 -9
  91. package/dist/x-toast.js +24 -24
  92. package/dist/x-toaster.js +8 -8
  93. package/dist/x-tooltip.js +11 -13
  94. package/dist/x-typography.js +11 -11
  95. package/dist/x-welcome-tour.js +64 -65
  96. package/package.json +181 -181
package/dist/x-toast.js CHANGED
@@ -1,26 +1,26 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var Br=function(a){a=$APP.D(Ar,typeof a==="string"?a.toLowerCase():null);return $APP.n(a)?a:$APP.pl},Dr=function(a){a=$APP.D(Cr,a);return $APP.n(a)?a:"info"},Er=function(a){return a==null?!0:$APP.N((""+$APP.T.g(a)).trim().toLowerCase(),"false")},Fr=function(a){return a==null?!1:$APP.N((""+$APP.T.g(a)).trim().toLowerCase(),"false")},Gr=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),typeof a==="number"&&$APP.r(isNaN(a))&&a>0?a:null):null},Hr=function(a){return typeof a==="string"?(a=
3
- a.trim(),$APP.N(a,"")&&$APP.N(a.toLowerCase(),"none")?a:null):null},Kr=function(a){var b=$APP.M(a),c=$APP.D(b,$APP.Bk),d=$APP.D(b,$APP.Bl);a=$APP.D(b,$APP.rj);var e=$APP.D(b,$APP.Ol),g=$APP.D(b,$APP.wi),h=$APP.D(b,$APP.Uh),l=$APP.D(b,Ir),m=$APP.D(b,$APP.yi);b=$APP.D(b,$APP.Dj);m=Br(m);b=Hr(b);h=$APP.n($APP.n(h)?b==null:h)?$APP.bn:b!=null?$APP.El:$APP.li;return $APP.zf([Jr,$APP.Oi,$APP.Z,$APP.Qk,$APP.rk,$APP.X,$APP.um,$APP.Bk,$APP.Bl],[Fr(l),Er(a),m,$APP.B.i(h,$APP.El)?b:null,h,$APP.F(e),Gr(g),function(){var p=
4
- typeof c==="string"?c.trim():null;return $APP.n(p)?p:""}(),function(){var p=typeof d==="string"?d.trim():null;return $APP.n(p)?p:""}()])},Lr=function(a){var b=$APP.M(a);a=$APP.D(b,$APP.Oi);b=$APP.D(b,$APP.X);return $APP.n(a)?$APP.r(b):a},Mr=function(a,b){var c=$APP.M(a);a=$APP.D(c,$APP.Z);var d=$APP.D(c,$APP.Bl);c=$APP.D(c,$APP.Bk);return new $APP.Q(null,4,[$APP.Z,Dr(a),$APP.Qi,b,$APP.Bl,d,$APP.Bk,c],null)},Nr=function(a){var b=$APP.M(a);a=$APP.D(b,Jr);b=$APP.D(b,$APP.um);return $APP.F($APP.n(a)?
5
- b!=null&&b>0:a)},Sr=function(a){var b=$APP.k(a,"__xToastRefs");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("span"),h=document.createElement("slot"),l=document.createElement("span"),m=document.createElement("div"),p=document.createElement("span"),q=document.createElement("span"),v=document.createElement("button"),x=document.createElement("span"),y=document.createElement("div"),
2
+ var bs=function(a){a=$APP.D(as,typeof a==="string"?a.toLowerCase():null);return $APP.n(a)?a:$APP.Hl},ds=function(a){a=$APP.D(cs,a);return $APP.n(a)?a:"info"},es=function(a){return a==null?!0:$APP.N((""+$APP.S.g(a)).trim().toLowerCase(),"false")},fs=function(a){return a==null?!1:$APP.N((""+$APP.S.g(a)).trim().toLowerCase(),"false")},gs=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),typeof a==="number"&&$APP.q(isNaN(a))&&a>0?a:null):null},hs=function(a){return typeof a==="string"?(a=
3
+ a.trim(),$APP.N(a,"")&&$APP.N(a.toLowerCase(),"none")?a:null):null},ks=function(a){var b=$APP.M(a),c=$APP.D(b,$APP.Tk),d=$APP.D(b,$APP.Tl);a=$APP.D(b,$APP.Jj);var e=$APP.D(b,$APP.fm),g=$APP.D(b,$APP.Oi),h=$APP.D(b,$APP.pi),l=$APP.D(b,is),m=$APP.D(b,$APP.Qi);b=$APP.D(b,$APP.Vj);m=bs(m);b=hs(b);h=$APP.n($APP.n(h)?b==null:h)?$APP.un:b!=null?$APP.Wl:$APP.Di;return $APP.zf([js,$APP.fj,$APP.Z,$APP.hl,$APP.Jk,$APP.X,$APP.Tm,$APP.Tk,$APP.Tl],[fs(l),es(a),m,$APP.B.i(h,$APP.Wl)?b:null,h,$APP.F(e),gs(g),function(){var p=
4
+ typeof c==="string"?c.trim():null;return $APP.n(p)?p:""}(),function(){var p=typeof d==="string"?d.trim():null;return $APP.n(p)?p:""}()])},ls=function(a){var b=$APP.M(a);a=$APP.D(b,$APP.fj);b=$APP.D(b,$APP.X);return $APP.n(a)?$APP.q(b):a},ms=function(a,b){var c=$APP.M(a);a=$APP.D(c,$APP.Z);var d=$APP.D(c,$APP.Tl);c=$APP.D(c,$APP.Tk);return new $APP.Q(null,4,[$APP.Z,ds(a),$APP.hj,b,$APP.Tl,d,$APP.Tk,c],null)},ns=function(a){var b=$APP.M(a);a=$APP.D(b,js);b=$APP.D(b,$APP.Tm);return $APP.F($APP.n(a)?
5
+ b!=null&&b>0:a)},ss=function(a){var b=$APP.k(a,"__xToastRefs");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("span"),h=document.createElement("slot"),l=document.createElement("span"),m=document.createElement("div"),p=document.createElement("span"),r=document.createElement("span"),v=document.createElement("button"),x=document.createElement("span"),y=document.createElement("div"),
6
6
  A=document.createElement("div");c.textContent=":host{display:block;color-scheme:light dark;--x-toast-radius:var(--x-radius-lg,12px);--x-toast-padding-y:14px;--x-toast-padding-x:16px;--x-toast-gap:12px;--x-toast-font-size:var(--x-font-size-sm,0.875rem);--x-toast-heading-font-size:0.9375rem;--x-toast-heading-weight:600;--x-toast-min-width:min(280px,calc(100vw - 2rem));--x-toast-max-width:min(480px,calc(100vw - 2rem));--x-toast-border-width:1px;--x-toast-shadow:var(--x-shadow-md,0 4px 16px rgba(0,0,0,0.12),0 1px 4px rgba(0,0,0,0.08));--x-toast-motion-fast:var(--x-transition-duration,120ms);--x-toast-motion-ease:var(--x-transition-easing,cubic-bezier(0.2,0,0,1));--x-toast-enter-duration:200ms;--x-toast-exit-duration:180ms;--x-toast-press-scale:0.97;--x-toast-disabled-opacity:0.55;--x-toast-focus-ring:var(--x-color-focus-ring,rgba(0,0,0,0.6));--x-toast-dismiss-color:var(--x-color-text-muted,rgba(0,0,0,0.50));--x-toast-dismiss-hover-bg:var(--x-color-surface-hover,rgba(0,0,0,0.06));--x-toast-progress-height:3px;--x-toast-progress-bg:var(--x-color-border,rgba(0,0,0,0.08));--x-toast-info-bg:var(--x-color-bg,#ffffff);--x-toast-info-border:rgba(0,102,204,0.30);--x-toast-info-color:rgba(15,23,42,0.92);--x-toast-info-icon-color:rgba(0,102,204,0.85);--x-toast-info-progress-fill:rgba(0,102,204,0.70);--x-toast-success-bg:var(--x-color-bg,#ffffff);--x-toast-success-border:rgba(16,140,72,0.30);--x-toast-success-color:rgba(15,23,42,0.92);--x-toast-success-icon-color:rgba(16,140,72,0.85);--x-toast-success-progress-fill:rgba(16,140,72,0.70);--x-toast-warning-bg:var(--x-color-bg,#ffffff);--x-toast-warning-border:rgba(204,120,0,0.40);--x-toast-warning-color:rgba(15,23,42,0.92);--x-toast-warning-icon-color:rgba(180,100,0,0.85);--x-toast-warning-progress-fill:rgba(204,120,0,0.70);--x-toast-error-bg:var(--x-color-bg,#ffffff);--x-toast-error-border:rgba(190,20,40,0.40);--x-toast-error-color:rgba(15,23,42,0.92);--x-toast-error-icon-color:rgba(190,20,40,0.85);--x-toast-error-progress-fill:rgba(190,20,40,0.70);--x-toast-bg:transparent;--x-toast-border-color:transparent;--x-toast-color:inherit;--x-toast-icon-color:inherit;--x-toast-progress-fill:currentColor;}@media (prefers-color-scheme:dark){:host{--x-toast-shadow:var(--x-shadow-md,0 4px 20px rgba(0,0,0,0.40),0 1px 6px rgba(0,0,0,0.30));--x-toast-focus-ring:var(--x-color-focus-ring,rgba(255,255,255,0.75));--x-toast-dismiss-color:var(--x-color-text-muted,rgba(255,255,255,0.65));--x-toast-dismiss-hover-bg:var(--x-color-surface-hover,rgba(255,255,255,0.12));--x-toast-progress-bg:var(--x-color-border,rgba(255,255,255,0.10));--x-toast-info-bg:var(--x-color-bg,#1e293b);--x-toast-info-border:rgba(80,160,255,0.35);--x-toast-info-color:rgba(248,250,252,0.92);--x-toast-info-icon-color:rgba(96,165,250,0.90);--x-toast-info-progress-fill:rgba(96,165,250,0.75);--x-toast-success-bg:var(--x-color-bg,#1e293b);--x-toast-success-border:rgba(60,210,120,0.35);--x-toast-success-color:rgba(248,250,252,0.92);--x-toast-success-icon-color:rgba(52,211,153,0.90);--x-toast-success-progress-fill:rgba(52,211,153,0.75);--x-toast-warning-bg:var(--x-color-bg,#1e293b);--x-toast-warning-border:rgba(255,190,90,0.40);--x-toast-warning-color:rgba(248,250,252,0.92);--x-toast-warning-icon-color:rgba(251,191,36,0.90);--x-toast-warning-progress-fill:rgba(251,191,36,0.75);--x-toast-error-bg:var(--x-color-bg,#1e293b);--x-toast-error-border:rgba(255,90,110,0.40);--x-toast-error-color:rgba(248,250,252,0.92);--x-toast-error-icon-color:rgba(248,113,113,0.90);--x-toast-error-progress-fill:rgba(248,113,113,0.75);}}:host([data-type\x3d'info']){--x-toast-bg:var(--x-toast-info-bg);--x-toast-border-color:var(--x-toast-info-border);--x-toast-color:var(--x-toast-info-color);--x-toast-icon-color:var(--x-toast-info-icon-color);--x-toast-progress-fill:var(--x-toast-info-progress-fill);}:host([data-type\x3d'success']){--x-toast-bg:var(--x-toast-success-bg);--x-toast-border-color:var(--x-toast-success-border);--x-toast-color:var(--x-toast-success-color);--x-toast-icon-color:var(--x-toast-success-icon-color);--x-toast-progress-fill:var(--x-toast-success-progress-fill);}:host([data-type\x3d'warning']){--x-toast-bg:var(--x-toast-warning-bg);--x-toast-border-color:var(--x-toast-warning-border);--x-toast-color:var(--x-toast-warning-color);--x-toast-icon-color:var(--x-toast-warning-icon-color);--x-toast-progress-fill:var(--x-toast-warning-progress-fill);}:host([data-type\x3d'error']){--x-toast-bg:var(--x-toast-error-bg);--x-toast-border-color:var(--x-toast-error-border);--x-toast-color:var(--x-toast-error-color);--x-toast-icon-color:var(--x-toast-error-icon-color);--x-toast-progress-fill:var(--x-toast-error-progress-fill);}[part\x3dcontainer]{display:flex;flex-direction:column;background:var(--x-toast-bg);border:var(--x-toast-border-width) solid var(--x-toast-border-color);border-radius:var(--x-toast-radius);box-shadow:var(--x-toast-shadow);color:var(--x-toast-color);min-width:var(--x-toast-min-width);max-width:var(--x-toast-max-width);overflow:hidden;transition:background var(--x-toast-motion-fast) var(--x-toast-motion-ease),border-color var(--x-toast-motion-fast) var(--x-toast-motion-ease),opacity var(--x-toast-motion-fast) var(--x-toast-motion-ease),transform var(--x-toast-motion-fast) var(--x-toast-motion-ease);}[part\x3dinner]{display:flex;align-items:flex-start;gap:var(--x-toast-gap);padding:var(--x-toast-padding-y) var(--x-toast-padding-x);}[part\x3dicon]{flex:0 0 auto;color:var(--x-toast-icon-color);line-height:1;margin-top:0.15em;}slot[name\x3dicon]::slotted(*){display:block;}[part\x3dbody]{flex:1 1 auto;display:flex;flex-direction:column;gap:3px;min-width:0;}[part\x3dheading]{font-size:var(--x-toast-heading-font-size);font-weight:var(--x-toast-heading-weight);line-height:1.2;overflow-wrap:anywhere;}[part\x3dmessage]{font-size:var(--x-toast-font-size);line-height:1.35;overflow-wrap:anywhere;opacity:0.82;}[part\x3ddismiss]{flex:0 0 auto;appearance:none;border:0;background:transparent;color:var(--x-toast-dismiss-color);width:1.5em;height:1.5em;padding:0;margin:0;border-radius:999px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background var(--x-toast-motion-fast) var(--x-toast-motion-ease),transform var(--x-toast-motion-fast) var(--x-toast-motion-ease);}:host(:not([disabled])) [part\x3ddismiss]:hover{background:var(--x-toast-dismiss-hover-bg);}:host(:not([disabled])) [part\x3ddismiss]:active{transform:scale(var(--x-toast-press-scale));}[part\x3ddismiss]:focus{outline:none;}:host(:not([disabled])) [part\x3ddismiss]:focus-visible{outline:2px solid var(--x-toast-focus-ring);outline-offset:2px;}:host([disabled]){opacity:var(--x-toast-disabled-opacity);}:host([disabled]) [part\x3ddismiss]{cursor:default;pointer-events:none;}[part\x3dprogress]{height:var(--x-toast-progress-height);background:var(--x-toast-progress-bg);overflow:hidden;display:none;}[part\x3dprogress-bar]{height:100%;width:100%;background:var(--x-toast-progress-fill);animation:x-toast-progress var(--x-toast-timeout,0ms) linear forwards;animation-play-state:paused;}:host([data-progress-active]) [part\x3dprogress-bar]{animation-play-state:running;}@keyframes x-toast-progress{from{width:100%;}to{width:0%;}}:host([data-entering]) [part\x3dcontainer]{animation:x-toast-enter var(--x-toast-enter-duration) var(--x-toast-motion-ease) both;}@keyframes x-toast-enter{from{opacity:0;transform:translateY(-8px);}to{opacity:1;transform:translateY(0);}}:host([data-exiting]) [part\x3dcontainer]{animation:x-toast-exit var(--x-toast-exit-duration) var(--x-toast-motion-ease) forwards;}@keyframes x-toast-exit{from{opacity:1;transform:translateY(0);}to{opacity:0;transform:translateY(-8px);}}@media (prefers-reduced-motion:reduce){[part\x3dcontainer],[part\x3ddismiss]{transition:none !important;}:host([data-entering]) [part\x3dcontainer],:host([data-exiting]) [part\x3dcontainer]{animation:none !important;}:host([data-progress-active]) [part\x3dprogress-bar]{animation:none !important;}}";
7
- d.setAttribute("part","container");e.setAttribute("part","inner");g.setAttribute("part","icon");g.setAttribute("aria-hidden","true");h.setAttribute("name","icon");l.setAttribute("part","default-icon");h.appendChild(l);g.appendChild(h);m.setAttribute("part","body");p.setAttribute("part","heading");q.setAttribute("part","message");m.appendChild(p);m.appendChild(q);v.setAttribute("part","dismiss");v.setAttribute("type","button");v.setAttribute("aria-label","Dismiss toast");x.setAttribute("aria-hidden",
8
- "true");x.textContent="×";v.appendChild(x);e.appendChild(g);e.appendChild(m);e.appendChild(v);y.setAttribute("part","progress");A.setAttribute("part","progress-bar");y.appendChild(A);d.appendChild(e);d.appendChild(y);b.appendChild(c);b.appendChild(d);b=$APP.zf([Or,$APP.Wm,Pr,$APP.Sk,$APP.Km,Qr,$APP.Hi,$APP.Hj,$APP.jj,$APP.Ph,$APP.uj,Rr],[A,l,q,v,m,e,b,d,y,g,h,p]);a.__xToastRefs=b;return $APP.k(a,"__xToastRefs")},Tr=function(a){return Kr($APP.zf([$APP.rj,$APP.Ol,$APP.wi,$APP.Uh,Ir,$APP.Dj,$APP.yi,
9
- $APP.Bk,$APP.Bl],[a.getAttribute("dismissible"),a.hasAttribute("disabled"),a.getAttribute("timeout-ms"),a.hasAttribute("icon"),a.getAttribute("show-progress"),a.getAttribute("icon"),a.getAttribute("type"),a.getAttribute("message"),a.getAttribute("heading")]))},Vr=function(a){var b=Tr(a);if($APP.N($APP.k(a,"__xToastModel"),b)){b=$APP.M(b);var c=$APP.D(b,$APP.Z),d=$APP.D(b,$APP.Bl),e=$APP.D(b,$APP.Bk),g=$APP.D(b,$APP.rk),h=$APP.D(b,$APP.Qk),l=$APP.D(b,$APP.Oi),m=$APP.D(b,$APP.X),p=$APP.D(b,$APP.um),
10
- q=Sr(a),v=$APP.M(q),x=$APP.D(v,$APP.uj);q=$APP.D(v,Rr);var y=$APP.D(v,Or),A=$APP.D(v,$APP.Wm),C=$APP.D(v,Pr),E=$APP.D(v,$APP.Sk),H=$APP.D(v,$APP.Hj),G=$APP.D(v,$APP.jj);v=$APP.D(v,$APP.Ph);x=$APP.n(x)?x.assignedNodes().length>0:null;$APP.B.i(g,$APP.El)||(h=$APP.D(Ur,c),h=$APP.n(h)?h:$APP.D(Ur,$APP.pl));g=$APP.r(x)&&$APP.B.i(g,$APP.bn);x=Nr(b);a.setAttribute("data-type",Dr(c));var J=H.setAttribute;c=$APP.B.i(c,$APP.jm)||$APP.B.i(c,$APP.Ei)?"alert":"status";J.call(H,"role",c);q.textContent=d;q.style.display=
11
- $APP.B.i(d,"")?"none":"";C.textContent=e;g?(A.textContent="",v.style.display="none"):(A.textContent=h,v.style.display="inline");$APP.n(l)?(E.disabled=$APP.F(m),E.style.display="inline-flex"):(E.disabled=!0,E.style.display="none");x?(G.style.display="block",y.style.setProperty("--x-toast-timeout",""+$APP.T.g(p)+"ms")):G.style.display="none";d=$APP.n(l)?$APP.r(m):l;a.tabIndex=$APP.n(d)?0:-1;$APP.n(m)?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled");$APP.n(d)?a.setAttribute("aria-keyshortcuts",
12
- "Escape"):a.removeAttribute("aria-keyshortcuts");a.__xToastModel=b}},Wr=function(){return $APP.F(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},Xr=function(a){a=typeof a==="string"?a.trim():"";return $APP.B.i(a,"")||$APP.B.i(a,"0")||$APP.B.i(a,"0ms")||$APP.B.i(a,"0s")?0:$APP.n(a.endsWith("ms"))?(a=parseFloat(a.slice(0,a.length-2)),$APP.n(isNaN(a))?0:Math.max(0,Math.round(a))):$APP.n(a.endsWith("s"))?(a=parseFloat(a.slice(0,a.length-1)),$APP.n(isNaN(a))?0:Math.max(0,Math.round(1E3*
13
- a))):0},Yr=function(a){var b=window.getComputedStyle(a);a=Xr(b.getPropertyValue("--x-toast-exit-duration"));b=Xr(b.getPropertyValue("--x-motion-exit-duration"));return a>0?a:b>0?b:180},Zr=function(a){var b=$APP.k(a,"__xToastTimeout");$APP.n(b)&&(clearTimeout(b),a.__xToastTimeout=null)},as=function(a){Zr(a);var b=function(){var c=$APP.k(a,"__xToastModel");return $APP.n(c)?c:Tr(a)}();$APP.n(function(){var c=Lr(b);return $APP.n(c)?typeof $APP.um.g(b)==="number"&&$APP.r($APP.k(a,"__xToastExiting")):c}())&&
14
- $APP.ja(a,"__xToastTimeout",setTimeout(function(){a.__xToastTimeout=null;if($APP.n(function(){var d=a.isConnected;return $APP.n(d)?$APP.r($APP.k(a,"__xToastExiting")):d}())){var c=function(){var d=$APP.k(a,"__xToastModel");return $APP.n(d)?d:Tr(a)}();if($APP.n(Lr(c)))return c=$APP.Hh(Mr(c,"timeout")),c=new CustomEvent("x-toast-dismiss",{detail:c,bubbles:!0,composed:!0,cancelable:!0}),c=a.dispatchEvent(c),$APP.n(c)?$r.g?$r.g(a):$r.call(null,a):null}return null},$APP.um.g(b)));return null},bs=function(a){var b=
15
- $APP.k(a,"__xToastModel");$APP.n($APP.n(b)?Nr(b):b)&&a.setAttribute("data-progress-active","");return as(a)},cs=function(a){if(!$APP.n($APP.k(a,"__xToastEntered")))if(a.__xToastEntered=!0,a.setAttribute("data-entering",""),Wr())a.removeAttribute("data-entering"),bs(a);else{var b=Sr(a);b=$APP.M(b);var c=$APP.D(b,$APP.Hj);c.addEventListener("animationend",function g(e){return $APP.B.i(e.target,c)?(c.removeEventListener("animationend",g),a.removeAttribute("data-entering"),bs(a)):null})}},$r=function(a){if(!$APP.n($APP.k(a,
16
- "__xToastExiting"))){a.__xToastExiting=!0;Zr(a);a.removeAttribute("data-entering");a.removeAttribute("data-progress-active");var b=Yr(a);if(b===0||Wr())a.remove();else{var c=Sr(a);c=$APP.M(c);var d=$APP.D(c,$APP.Hj),e=function l(h){return $APP.B.i(h.target,d)?(d.removeEventListener("animationend",l),h=$APP.k(a,"__xToastExitTimer"),$APP.n(h)&&(clearTimeout(h),a.__xToastExitTimer=null),$APP.n(a.isConnected)?a.remove():null):null};a.setAttribute("data-exiting","");d.addEventListener("animationend",e);
17
- $APP.ja(a,"__xToastExitTimer",setTimeout(function(){var h=a.isConnected;return $APP.n($APP.n(h)?$APP.k(a,"__xToastExiting"):h)?(d.removeEventListener("animationend",e),a.__xToastExitTimer=null,a.remove()):null},b+60))}}return null},ds=function(a,b){var c=$APP.k(a,"__xToastModel");c=$APP.n(c)?c:Tr(a);b=$APP.Hh(Mr(c,b));b=new CustomEvent("x-toast-dismiss",{detail:b,bubbles:!0,composed:!0,cancelable:!0});b=a.dispatchEvent(b);$APP.n(b)&&$r(a)},es=function(a,b){var c=function(){var d=$APP.k(a,"__xToastModel");
18
- return $APP.n(d)?d:Tr(a)}();$APP.n(function(){var d=Lr(c);return $APP.n(d)?$APP.r($APP.k(a,"__xToastExiting")):d}())&&(b.preventDefault(),ds(a,"button"));return null},fs=function(a,b){if($APP.B.i(b.key,"Escape")){var c=function(){var d=$APP.k(a,"__xToastModel");return $APP.n(d)?d:Tr(a)}();$APP.n(function(){var d=Lr(c);return $APP.n(d)?$APP.r($APP.k(a,"__xToastExiting")):d}())&&(b.preventDefault(),ds(a,"keyboard"))}return null},gs=function(a){function b(e){return fs(a,e)}function c(e){return es(a,
19
- e)}var d=Sr(a);d=$APP.M(d);$APP.D(d,$APP.Sk).addEventListener("click",c);a.addEventListener("keydown",b);$APP.ja(a,"__xToastHandlers",{click:c,keydown:b})},hs=function(a){Zr(a);var b=$APP.k(a,"__xToastExitTimer");$APP.n(b)&&(clearTimeout(b),a.__xToastExitTimer=null);b=$APP.k(a,"__xToastHandlers");var c=$APP.k(a,"__xToastRefs");if($APP.n($APP.n(b)?c:b)){c=$APP.Sk.g(c);var d=$APP.k(b,"click");b=$APP.k(b,"keydown");$APP.n(d)&&c.removeEventListener("click",d);$APP.n(b)&&a.removeEventListener("keydown",
20
- b)}a.__xToastHandlers=null},is=function(a){Object.defineProperty(a,"type",{get:function(){var b=this.getAttribute("type");return $APP.n(b)?b:"info"},set:function(b){return $APP.n(b)?this.setAttribute("type",""+$APP.T.g(b)):this.removeAttribute("type")},enumerable:!0,configurable:!0});Object.defineProperty(a,"heading",{get:function(){var b=this.getAttribute("heading");return $APP.n(b)?b:""},set:function(b){return $APP.n(b)?this.setAttribute("heading",""+$APP.T.g(b)):this.removeAttribute("heading")},
21
- enumerable:!0,configurable:!0});Object.defineProperty(a,"message",{get:function(){var b=this.getAttribute("message");return $APP.n(b)?b:""},set:function(b){return $APP.n(b)?this.setAttribute("message",""+$APP.T.g(b)):this.removeAttribute("message")},enumerable:!0,configurable:!0});Object.defineProperty(a,"icon",{get:function(){return this.getAttribute("icon")},set:function(b){return $APP.n(b)?this.setAttribute("icon",""+$APP.T.g(b)):this.removeAttribute("icon")},enumerable:!0,configurable:!0});Object.defineProperty(a,
22
- "dismissible",{get:function(){return Er(this.getAttribute("dismissible"))},set:function(b){return $APP.n(b)?this.setAttribute("dismissible",""):this.setAttribute("dismissible","false")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"timeoutMs",{get:function(){return Gr(this.getAttribute("timeout-ms"))},
23
- set:function(b){return b==null?this.removeAttribute("timeout-ms"):this.setAttribute("timeout-ms",""+$APP.T.g(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"showProgress",{get:function(){return Fr(this.getAttribute("show-progress"))},set:function(b){return $APP.n(b)?this.setAttribute("show-progress",""):this.removeAttribute("show-progress")},enumerable:!0,configurable:!0})},js=function(a){a.dismiss=function(b){var c=$APP.r($APP.k(this,"__xToastExiting"));$APP.n(c?this.isConnected:
24
- c)&&ds(this,typeof b==="string"?b:"api");return null}},ls=function(){var a=class extends HTMLElement{};a.observedAttributes=ks;a.prototype.connectedCallback=function(){Sr(this);hs(this);gs(this);Vr(this);cs(this);return null};a.prototype.disconnectedCallback=function(){hs(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&(Vr(this),$APP.n(this.isConnected)&&as(this));return null};is(a.prototype);js(a.prototype);return a},ms=function(){$APP.n(customElements.get("x-toast"))||
25
- customElements.define("x-toast",ls());return null},Rr=new $APP.K(null,"heading-el","heading-el",-1277272161),Jr=new $APP.K(null,"show-progress?","show-progress?",-1681518912),Qr=new $APP.K(null,"inner","inner",-1383171215),Pr=new $APP.K(null,"message-el","message-el",-683533234),Or=new $APP.K(null,"progress-bar","progress-bar",-123877022),Ir=new $APP.K(null,"show-progress-attr","show-progress-attr",1680262066);var ks="type heading message icon dismissible disabled timeout-ms show-progress".split(" ");$APP.Pd(["x-toast-dismiss",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,4,[$APP.Z,$APP.Y,$APP.Qi,$APP.Y,$APP.Bl,$APP.Y,$APP.Bk,$APP.Y],null),$APP.lm,!0],null)]);
26
- var Ar=new $APP.Q(null,4,["info",$APP.pl,"success",$APP.Lk,"warning",$APP.jm,"error",$APP.Ei],null),Cr=new $APP.Q(null,4,[$APP.pl,"info",$APP.Lk,"success",$APP.jm,"warning",$APP.Ei,"error"],null),Ur=new $APP.Q(null,4,[$APP.pl,"ℹ",$APP.Lk,"✓",$APP.jm,"!",$APP.Ei,"⨯"],null);$APP.ha("baredom.exports.x_toast.init",ms);export const init=ms;
7
+ d.setAttribute("part","container");e.setAttribute("part","inner");g.setAttribute("part","icon");g.setAttribute("aria-hidden","true");h.setAttribute("name","icon");l.setAttribute("part","default-icon");h.appendChild(l);g.appendChild(h);m.setAttribute("part","body");p.setAttribute("part","heading");r.setAttribute("part","message");m.appendChild(p);m.appendChild(r);v.setAttribute("part","dismiss");v.setAttribute("type","button");v.setAttribute("aria-label","Dismiss toast");x.setAttribute("aria-hidden",
8
+ "true");x.textContent="×";v.appendChild(x);e.appendChild(g);e.appendChild(m);e.appendChild(v);y.setAttribute("part","progress");A.setAttribute("part","progress-bar");y.appendChild(A);d.appendChild(e);d.appendChild(y);b.appendChild(c);b.appendChild(d);b=$APP.zf([os,$APP.on,ps,$APP.jl,$APP.bn,qs,$APP.Zi,$APP.Zj,$APP.Bj,$APP.gi,$APP.Mj,rs],[A,l,r,v,m,e,b,d,y,g,h,p]);a.__xToastRefs=b;return $APP.k(a,"__xToastRefs")},ts=function(a){return ks($APP.zf([$APP.Jj,$APP.fm,$APP.Oi,$APP.pi,is,$APP.Vj,$APP.Qi,
9
+ $APP.Tk,$APP.Tl],[a.getAttribute("dismissible"),a.hasAttribute("disabled"),a.getAttribute("timeout-ms"),a.hasAttribute("icon"),a.getAttribute("show-progress"),a.getAttribute("icon"),a.getAttribute("type"),a.getAttribute("message"),a.getAttribute("heading")]))},vs=function(a){var b=ts(a);if($APP.N($APP.k(a,"__xToastModel"),b)){b=$APP.M(b);var c=$APP.D(b,$APP.Z),d=$APP.D(b,$APP.Tl),e=$APP.D(b,$APP.Tk),g=$APP.D(b,$APP.Jk),h=$APP.D(b,$APP.hl),l=$APP.D(b,$APP.fj),m=$APP.D(b,$APP.X),p=$APP.D(b,$APP.Tm),
10
+ r=ss(a),v=$APP.M(r),x=$APP.D(v,$APP.Mj);r=$APP.D(v,rs);var y=$APP.D(v,os),A=$APP.D(v,$APP.on),C=$APP.D(v,ps),E=$APP.D(v,$APP.jl),H=$APP.D(v,$APP.Zj),G=$APP.D(v,$APP.Bj);v=$APP.D(v,$APP.gi);x=$APP.n(x)?x.assignedNodes().length>0:null;$APP.B.i(g,$APP.Wl)||(h=$APP.D(us,c),h=$APP.n(h)?h:$APP.D(us,$APP.Hl));g=$APP.q(x)&&$APP.B.i(g,$APP.un);x=ns(b);a.setAttribute("data-type",ds(c));var J=H.setAttribute;c=$APP.B.i(c,$APP.Im)||$APP.B.i(c,$APP.Wi)?"alert":"status";J.call(H,"role",c);r.textContent=d;r.style.display=
11
+ $APP.B.i(d,"")?"none":"";C.textContent=e;g?(A.textContent="",v.style.display="none"):(A.textContent=h,v.style.display="inline");$APP.n(l)?(E.disabled=$APP.F(m),E.style.display="inline-flex"):(E.disabled=!0,E.style.display="none");x?(G.style.display="block",y.style.setProperty("--x-toast-timeout",""+$APP.S.g(p)+"ms")):G.style.display="none";d=$APP.n(l)?$APP.q(m):l;a.tabIndex=$APP.n(d)?0:-1;$APP.n(m)?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled");$APP.n(d)?a.setAttribute("aria-keyshortcuts",
12
+ "Escape"):a.removeAttribute("aria-keyshortcuts");a.__xToastModel=b}},ws=function(){return $APP.F(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},xs=function(a){a=typeof a==="string"?a.trim():"";return $APP.B.i(a,"")||$APP.B.i(a,"0")||$APP.B.i(a,"0ms")||$APP.B.i(a,"0s")?0:$APP.n(a.endsWith("ms"))?(a=parseFloat(a.slice(0,a.length-2)),$APP.n(isNaN(a))?0:Math.max(0,Math.round(a))):$APP.n(a.endsWith("s"))?(a=parseFloat(a.slice(0,a.length-1)),$APP.n(isNaN(a))?0:Math.max(0,Math.round(1E3*
13
+ a))):0},ys=function(a){var b=window.getComputedStyle(a);a=xs(b.getPropertyValue("--x-toast-exit-duration"));b=xs(b.getPropertyValue("--x-motion-exit-duration"));return a>0?a:b>0?b:180},zs=function(a){var b=$APP.k(a,"__xToastTimeout");$APP.n(b)&&(clearTimeout(b),a.__xToastTimeout=null)},Bs=function(a){zs(a);var b=function(){var c=$APP.k(a,"__xToastModel");return $APP.n(c)?c:ts(a)}();$APP.n(function(){var c=ls(b);return $APP.n(c)?typeof $APP.Tm.g(b)==="number"&&$APP.q($APP.k(a,"__xToastExiting")):c}())&&
14
+ $APP.ja(a,"__xToastTimeout",setTimeout(function(){a.__xToastTimeout=null;if($APP.n(function(){var d=a.isConnected;return $APP.n(d)?$APP.q($APP.k(a,"__xToastExiting")):d}())){var c=function(){var d=$APP.k(a,"__xToastModel");return $APP.n(d)?d:ts(a)}();if($APP.n(ls(c)))return c=$APP.Zh(ms(c,"timeout")),c=new CustomEvent("x-toast-dismiss",{detail:c,bubbles:!0,composed:!0,cancelable:!0}),c=a.dispatchEvent(c),$APP.n(c)?As.g?As.g(a):As.call(null,a):null}return null},$APP.Tm.g(b)));return null},Cs=function(a){var b=
15
+ $APP.k(a,"__xToastModel");$APP.n($APP.n(b)?ns(b):b)&&a.setAttribute("data-progress-active","");return Bs(a)},Ds=function(a){if(!$APP.n($APP.k(a,"__xToastEntered")))if(a.__xToastEntered=!0,a.setAttribute("data-entering",""),ws())a.removeAttribute("data-entering"),Cs(a);else{var b=ss(a);b=$APP.M(b);var c=$APP.D(b,$APP.Zj);c.addEventListener("animationend",function g(e){return $APP.B.i(e.target,c)?(c.removeEventListener("animationend",g),a.removeAttribute("data-entering"),Cs(a)):null})}},As=function(a){if(!$APP.n($APP.k(a,
16
+ "__xToastExiting"))){a.__xToastExiting=!0;zs(a);a.removeAttribute("data-entering");a.removeAttribute("data-progress-active");var b=ys(a);if(b===0||ws())a.remove();else{var c=ss(a);c=$APP.M(c);var d=$APP.D(c,$APP.Zj),e=function l(h){return $APP.B.i(h.target,d)?(d.removeEventListener("animationend",l),h=$APP.k(a,"__xToastExitTimer"),$APP.n(h)&&(clearTimeout(h),a.__xToastExitTimer=null),$APP.n(a.isConnected)?a.remove():null):null};a.setAttribute("data-exiting","");d.addEventListener("animationend",e);
17
+ $APP.ja(a,"__xToastExitTimer",setTimeout(function(){var h=a.isConnected;return $APP.n($APP.n(h)?$APP.k(a,"__xToastExiting"):h)?(d.removeEventListener("animationend",e),a.__xToastExitTimer=null,a.remove()):null},b+60))}}return null},Es=function(a,b){var c=$APP.k(a,"__xToastModel");c=$APP.n(c)?c:ts(a);b=$APP.Zh(ms(c,b));b=new CustomEvent("x-toast-dismiss",{detail:b,bubbles:!0,composed:!0,cancelable:!0});b=a.dispatchEvent(b);$APP.n(b)&&As(a)},Fs=function(a,b){var c=function(){var d=$APP.k(a,"__xToastModel");
18
+ return $APP.n(d)?d:ts(a)}();$APP.n(function(){var d=ls(c);return $APP.n(d)?$APP.q($APP.k(a,"__xToastExiting")):d}())&&(b.preventDefault(),Es(a,"button"));return null},Gs=function(a,b){if($APP.B.i(b.key,"Escape")){var c=function(){var d=$APP.k(a,"__xToastModel");return $APP.n(d)?d:ts(a)}();$APP.n(function(){var d=ls(c);return $APP.n(d)?$APP.q($APP.k(a,"__xToastExiting")):d}())&&(b.preventDefault(),Es(a,"keyboard"))}return null},Hs=function(a){function b(e){return Gs(a,e)}function c(e){return Fs(a,
19
+ e)}var d=ss(a);d=$APP.M(d);$APP.D(d,$APP.jl).addEventListener("click",c);a.addEventListener("keydown",b);$APP.ja(a,"__xToastHandlers",{click:c,keydown:b})},Is=function(a){zs(a);var b=$APP.k(a,"__xToastExitTimer");$APP.n(b)&&(clearTimeout(b),a.__xToastExitTimer=null);b=$APP.k(a,"__xToastHandlers");var c=$APP.k(a,"__xToastRefs");if($APP.n($APP.n(b)?c:b)){c=$APP.jl.g(c);var d=$APP.k(b,"click");b=$APP.k(b,"keydown");$APP.n(d)&&c.removeEventListener("click",d);$APP.n(b)&&a.removeEventListener("keydown",
20
+ b)}a.__xToastHandlers=null},Js=function(a){Object.defineProperty(a,"type",{get:function(){var b=this.getAttribute("type");return $APP.n(b)?b:"info"},set:function(b){return $APP.n(b)?this.setAttribute("type",""+$APP.S.g(b)):this.removeAttribute("type")},enumerable:!0,configurable:!0});Object.defineProperty(a,"heading",{get:function(){var b=this.getAttribute("heading");return $APP.n(b)?b:""},set:function(b){return $APP.n(b)?this.setAttribute("heading",""+$APP.S.g(b)):this.removeAttribute("heading")},
21
+ enumerable:!0,configurable:!0});Object.defineProperty(a,"message",{get:function(){var b=this.getAttribute("message");return $APP.n(b)?b:""},set:function(b){return $APP.n(b)?this.setAttribute("message",""+$APP.S.g(b)):this.removeAttribute("message")},enumerable:!0,configurable:!0});Object.defineProperty(a,"icon",{get:function(){return this.getAttribute("icon")},set:function(b){return $APP.n(b)?this.setAttribute("icon",""+$APP.S.g(b)):this.removeAttribute("icon")},enumerable:!0,configurable:!0});Object.defineProperty(a,
22
+ "dismissible",{get:function(){return es(this.getAttribute("dismissible"))},set:function(b){return $APP.n(b)?this.setAttribute("dismissible",""):this.setAttribute("dismissible","false")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"timeoutMs",{get:function(){return gs(this.getAttribute("timeout-ms"))},
23
+ set:function(b){return b==null?this.removeAttribute("timeout-ms"):this.setAttribute("timeout-ms",""+$APP.S.g(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"showProgress",{get:function(){return fs(this.getAttribute("show-progress"))},set:function(b){return $APP.n(b)?this.setAttribute("show-progress",""):this.removeAttribute("show-progress")},enumerable:!0,configurable:!0})},Ks=function(a){return a.dismiss=function(b){var c=$APP.q($APP.k(this,"__xToastExiting"));$APP.n(c?this.isConnected:
24
+ c)&&Es(this,typeof b==="string"?b:"api");return null}},Ls=function(a){ss(a);Is(a);Hs(a);vs(a);Ds(a);return null},Ms=function(a){Is(a);return null},Ns=function(a,b,c,d){$APP.N(c,d)&&(vs(a),$APP.n(a.isConnected)&&Bs(a));return null},Ps=function(){return $APP.Lg("x-toast",new $APP.Q(null,5,[$APP.Cg,Os,$APP.Dg,Ls,$APP.Eg,Ms,$APP.Fg,Ns,$APP.Jg,function(a){Js(a);return Ks(a)}],null))},Qs=function(){return Ps()},rs=new $APP.K(null,"heading-el","heading-el",-1277272161),js=new $APP.K(null,"show-progress?",
25
+ "show-progress?",-1681518912),qs=new $APP.K(null,"inner","inner",-1383171215),ps=new $APP.K(null,"message-el","message-el",-683533234),os=new $APP.K(null,"progress-bar","progress-bar",-123877022),is=new $APP.K(null,"show-progress-attr","show-progress-attr",1680262066);var Os="type heading message icon dismissible disabled timeout-ms show-progress".split(" ");$APP.Pd(["x-toast-dismiss",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,4,[$APP.Z,$APP.Y,$APP.hj,$APP.Y,$APP.Tl,$APP.Y,$APP.Tk,$APP.Y],null),$APP.Km,!0],null)]);
26
+ var as=new $APP.Q(null,4,["info",$APP.Hl,"success",$APP.cl,"warning",$APP.Im,"error",$APP.Wi],null),cs=new $APP.Q(null,4,[$APP.Hl,"info",$APP.cl,"success",$APP.Im,"warning",$APP.Wi,"error"],null),us=new $APP.Q(null,4,[$APP.Hl,"ℹ",$APP.cl,"✓",$APP.Im,"!",$APP.Wi,"⨯"],null);$APP.ha("baredom.exports.x_toast.init",Qs);export const init=Qs;
package/dist/x-toaster.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var Gu=function(a){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.I(Fu,a)?a:"top-end"},Hu=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),$APP.r(isNaN(a))&&a>0?Math.floor(a):null):null},Ju=function(a){if(!$APP.n($APP.k(a,"__xToasterRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("slot");c.textContent=Iu;b.appendChild(c);b.appendChild(d);a.__xToasterRefs=new $APP.Q(null,2,[$APP.Hi,b,$APP.Fl,d],null)}},Mu=function(a){a=
3
- new $APP.Q(null,3,[$APP.Xj,a.getAttribute("position"),Ku,a.getAttribute("max-toasts"),$APP.pi,a.getAttribute("label")],null);var b=$APP.M(a),c=$APP.D(b,$APP.Xj);a=$APP.D(b,Ku);b=$APP.D(b,$APP.pi);c=Gu(c);a=Hu(a);return new $APP.Q(null,3,[$APP.cn,c,Lu,$APP.n(a)?a:5,$APP.U,typeof b==="string"&&$APP.N(b.trim(),"")?b:"Notifications"],null)},Nu=function(a){var b=Mu(a);if($APP.N($APP.k(a,"__xToasterModel"),b)){b=$APP.M(b);var c=$APP.D(b,$APP.cn),d=$APP.D(b,$APP.U);Ju(a);a.setAttribute("role","region");
4
- a.setAttribute("aria-label",d);a.setAttribute("data-position",c);a.__xToasterModel=b}},Ou=function(a){function b(c){var d=c.detail;if($APP.N($APP.k(d,"reason"),"toaster-remove")){c.preventDefault();var e=$APP.k(d,"type");var g=$APP.k(d,"reason"),h=$APP.k(d,"heading");d=$APP.k(d,"message");e=$APP.Hh(new $APP.Q(null,4,[$APP.Z,$APP.n(e)?e:"info",$APP.Qi,$APP.n(g)?g:"",$APP.Bl,$APP.n(h)?h:"",$APP.Bk,$APP.n(d)?d:""],null));e=new CustomEvent("x-toaster-dismiss",{detail:e,bubbles:!0,composed:!0,cancelable:!0});
5
- e=a.dispatchEvent(e);$APP.n(e)&&c.target.dismiss("toaster-remove")}return null}a.addEventListener("x-toast-dismiss",b);$APP.ja(a,"__xToasterHandlers",{dismiss:b})},Pu=function(a){var b=$APP.k(a,"__xToasterHandlers");$APP.n(b)&&(b=$APP.k(b,"dismiss"),$APP.n(b)&&a.removeEventListener("x-toast-dismiss",b));a.__xToasterHandlers=null},Qu=function(a){a=a.prototype;Object.defineProperty(a,"position",{get:function(){return Gu(this.getAttribute("position"))},set:function(b){return $APP.n(b)?this.setAttribute("position",
6
- ""+$APP.T.g(b)):this.removeAttribute("position")},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.n(b)?b:"Notifications"},set:function(b){return $APP.n($APP.n(b)?$APP.N(b,""):b)?this.setAttribute("label",""+$APP.T.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0});Object.defineProperty(a,"maxToasts",{get:function(){var b=Hu(this.getAttribute("max-toasts"));return $APP.n(b)?b:5},set:function(b){return b==
7
- null?this.removeAttribute("max-toasts"):this.setAttribute("max-toasts",""+$APP.T.g(Math.floor(b)))},enumerable:!0,configurable:!0});Object.defineProperty(a,"toast",{value:function(b){b=$APP.n(b)?b:{};var c=$APP.k(this,"__xToasterModel");c=$APP.n(c)?c:Mu(this);var d=Lu.g(c);c=this.querySelectorAll("x-toast");var e=c.length;if(e>=d)for(d=e-d- -1,e=0;;)if(e<d)c[e].dismiss("toaster-remove"),e+=1;else break;c=document.createElement("x-toast");d=$APP.k(b,"type");$APP.n(d)&&c.setAttribute("type",d);d=$APP.k(b,
8
- "heading");$APP.n(d)&&c.setAttribute("heading",d);d=$APP.k(b,"message");$APP.n(d)&&c.setAttribute("message",d);d=$APP.k(b,"icon");$APP.n(d)&&c.setAttribute("icon",d);$APP.k(b,"dismissible")===!1&&c.setAttribute("dismissible","false");d=$APP.k(b,"timeoutMs");$APP.n(d)&&c.setAttribute("timeout-ms",""+$APP.T.g(d));$APP.n($APP.k(b,"showProgress"))&&c.setAttribute("show-progress","");this.appendChild(c);return c},writable:!0,configurable:!0})},Su=function(){var a=class extends HTMLElement{};a.observedAttributes=
9
- Ru;a.prototype.connectedCallback=function(){Ju(this);Pu(this);Ou(this);Nu(this);return null};a.prototype.disconnectedCallback=function(){Pu(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&Nu(this);return null};Qu(a);return a},Tu=function(){$APP.n(customElements.get("x-toaster"))||customElements.define("x-toaster",Su());return null},Ku=new $APP.K(null,"max-toasts-raw","max-toasts-raw",-815087069),Lu=new $APP.K(null,"max-toasts","max-toasts",-1982289139);var Ru=["position","max-toasts","label"];$APP.Pd(["x-toaster-dismiss",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,4,[$APP.Z,$APP.Y,$APP.Qi,$APP.Y,$APP.Bl,$APP.Y,$APP.Bk,$APP.Y],null),$APP.lm,!0],null)]);var Fu=new $APP.S(null,new $APP.Q(null,6,["top-center",null,"bottom-start",null,"bottom-end",null,"bottom-center",null,"top-end",null,"top-start",null],null),null);var Iu=":host{display:flex;position:fixed;z-index:var(--x-toaster-z-index,9000);gap:var(--x-toaster-gap,8px);width:max-content;max-width:var(--x-toaster-max-width,min(480px,calc(100vw - 2rem)));box-sizing:border-box;pointer-events:none;color-scheme:light dark;}::slotted("+$APP.T.g("x-toast")+"){pointer-events:auto;}slot{display:contents;}:host([data-position\x3d'top-start']){top:var(--x-toaster-inset,16px);inset-inline-start:var(--x-toaster-inset,16px);flex-direction:column-reverse;}:host([data-position\x3d'top-center']){top:var(--x-toaster-inset,16px);left:50%;transform:translateX(-50%);flex-direction:column-reverse;align-items:center;}:host([data-position\x3d'top-end']){top:var(--x-toaster-inset,16px);inset-inline-end:var(--x-toaster-inset,16px);flex-direction:column-reverse;}:host([data-position\x3d'bottom-start']){bottom:var(--x-toaster-inset,16px);inset-inline-start:var(--x-toaster-inset,16px);flex-direction:column;}:host([data-position\x3d'bottom-center']){bottom:var(--x-toaster-inset,16px);left:50%;transform:translateX(-50%);flex-direction:column;align-items:center;}:host([data-position\x3d'bottom-end']){bottom:var(--x-toaster-inset,16px);inset-inline-end:var(--x-toaster-inset,16px);flex-direction:column;}";$APP.ha("baredom.exports.x_toaster.init",Tu);export const init=Tu;
2
+ var xv=function(a){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.I(wv,a)?a:"top-end"},yv=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),$APP.q(isNaN(a))&&a>0?Math.floor(a):null):null},Av=function(a){if(!$APP.n($APP.k(a,"__xToasterRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("slot");c.textContent=zv;b.appendChild(c);b.appendChild(d);a.__xToasterRefs=new $APP.Q(null,2,[$APP.Zi,b,$APP.Xl,d],null)}},Dv=function(a){a=
3
+ new $APP.Q(null,3,[$APP.sk,a.getAttribute("position"),Bv,a.getAttribute("max-toasts"),$APP.Hi,a.getAttribute("label")],null);var b=$APP.M(a),c=$APP.D(b,$APP.sk);a=$APP.D(b,Bv);b=$APP.D(b,$APP.Hi);c=xv(c);a=yv(a);return new $APP.Q(null,3,[$APP.vn,c,Cv,$APP.n(a)?a:5,$APP.T,typeof b==="string"&&$APP.N(b.trim(),"")?b:"Notifications"],null)},Ev=function(a){var b=Dv(a);if($APP.N($APP.k(a,"__xToasterModel"),b)){b=$APP.M(b);var c=$APP.D(b,$APP.vn),d=$APP.D(b,$APP.T);Av(a);a.setAttribute("role","region");
4
+ a.setAttribute("aria-label",d);a.setAttribute("data-position",c);a.__xToasterModel=b}},Fv=function(a){function b(c){var d=c.detail;if($APP.N($APP.k(d,"reason"),"toaster-remove")){c.preventDefault();var e=$APP.k(d,"type");var g=$APP.k(d,"reason"),h=$APP.k(d,"heading");d=$APP.k(d,"message");e=$APP.Zh(new $APP.Q(null,4,[$APP.Z,$APP.n(e)?e:"info",$APP.hj,$APP.n(g)?g:"",$APP.Tl,$APP.n(h)?h:"",$APP.Tk,$APP.n(d)?d:""],null));e=new CustomEvent("x-toaster-dismiss",{detail:e,bubbles:!0,composed:!0,cancelable:!0});
5
+ e=a.dispatchEvent(e);$APP.n(e)&&c.target.dismiss("toaster-remove")}return null}a.addEventListener("x-toast-dismiss",b);$APP.ja(a,"__xToasterHandlers",{dismiss:b})},Gv=function(a){var b=$APP.k(a,"__xToasterHandlers");$APP.n(b)&&(b=$APP.k(b,"dismiss"),$APP.n(b)&&a.removeEventListener("x-toast-dismiss",b));a.__xToasterHandlers=null},Hv=function(a){Object.defineProperty(a,"position",{get:function(){return xv(this.getAttribute("position"))},set:function(b){return $APP.n(b)?this.setAttribute("position",
6
+ ""+$APP.S.g(b)):this.removeAttribute("position")},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.n(b)?b:"Notifications"},set:function(b){return $APP.n($APP.n(b)?$APP.N(b,""):b)?this.setAttribute("label",""+$APP.S.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0});Object.defineProperty(a,"maxToasts",{get:function(){var b=yv(this.getAttribute("max-toasts"));return $APP.n(b)?b:5},set:function(b){return b==
7
+ null?this.removeAttribute("max-toasts"):this.setAttribute("max-toasts",""+$APP.S.g(Math.floor(b)))},enumerable:!0,configurable:!0});return Object.defineProperty(a,"toast",{value:function(b){b=$APP.n(b)?b:{};var c=$APP.k(this,"__xToasterModel");c=$APP.n(c)?c:Dv(this);var d=Cv.g(c);c=this.querySelectorAll("x-toast");var e=c.length;if(e>=d)for(d=e-d- -1,e=0;;)if(e<d)c[e].dismiss("toaster-remove"),e+=1;else break;c=document.createElement("x-toast");d=$APP.k(b,"type");$APP.n(d)&&c.setAttribute("type",
8
+ d);d=$APP.k(b,"heading");$APP.n(d)&&c.setAttribute("heading",d);d=$APP.k(b,"message");$APP.n(d)&&c.setAttribute("message",d);d=$APP.k(b,"icon");$APP.n(d)&&c.setAttribute("icon",d);$APP.k(b,"dismissible")===!1&&c.setAttribute("dismissible","false");d=$APP.k(b,"timeoutMs");$APP.n(d)&&c.setAttribute("timeout-ms",""+$APP.S.g(d));$APP.n($APP.k(b,"showProgress"))&&c.setAttribute("show-progress","");this.appendChild(c);return c},writable:!0,configurable:!0})},Iv=function(a){Av(a);Gv(a);Fv(a);Ev(a);return null},
9
+ Jv=function(a){Gv(a);return null},Kv=function(a,b,c,d){$APP.N(c,d)&&Ev(a);return null},Mv=function(){return $APP.Lg("x-toaster",new $APP.Q(null,5,[$APP.Cg,Lv,$APP.Dg,Iv,$APP.Eg,Jv,$APP.Fg,Kv,$APP.Jg,Hv],null))},Bv=new $APP.K(null,"max-toasts-raw","max-toasts-raw",-815087069),Cv=new $APP.K(null,"max-toasts","max-toasts",-1982289139);var Lv=["position","max-toasts","label"];$APP.Pd(["x-toaster-dismiss",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,4,[$APP.Z,$APP.Y,$APP.hj,$APP.Y,$APP.Tl,$APP.Y,$APP.Tk,$APP.Y],null),$APP.Km,!0],null)]);var wv=new $APP.R(null,new $APP.Q(null,6,["top-center",null,"bottom-start",null,"bottom-end",null,"bottom-center",null,"top-end",null,"top-start",null],null),null);var zv=":host{display:flex;position:fixed;z-index:var(--x-toaster-z-index,9000);gap:var(--x-toaster-gap,8px);width:max-content;max-width:var(--x-toaster-max-width,min(480px,calc(100vw - 2rem)));box-sizing:border-box;pointer-events:none;color-scheme:light dark;}::slotted("+$APP.S.g("x-toast")+"){pointer-events:auto;}slot{display:contents;}:host([data-position\x3d'top-start']){top:var(--x-toaster-inset,16px);inset-inline-start:var(--x-toaster-inset,16px);flex-direction:column-reverse;}:host([data-position\x3d'top-center']){top:var(--x-toaster-inset,16px);left:50%;transform:translateX(-50%);flex-direction:column-reverse;align-items:center;}:host([data-position\x3d'top-end']){top:var(--x-toaster-inset,16px);inset-inline-end:var(--x-toaster-inset,16px);flex-direction:column-reverse;}:host([data-position\x3d'bottom-start']){bottom:var(--x-toaster-inset,16px);inset-inline-start:var(--x-toaster-inset,16px);flex-direction:column;}:host([data-position\x3d'bottom-center']){bottom:var(--x-toaster-inset,16px);left:50%;transform:translateX(-50%);flex-direction:column;align-items:center;}:host([data-position\x3d'bottom-end']){bottom:var(--x-toaster-inset,16px);inset-inline-end:var(--x-toaster-inset,16px);flex-direction:column;}";$APP.ha("baredom.exports.x_toaster.init",Mv);export const init=Mv;
package/dist/x-tooltip.js CHANGED
@@ -1,14 +1,12 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var pu=function(a){a=new $APP.Q(null,5,[$APP.Kh,a.getAttribute("text"),$APP.jn,a.getAttribute("placement"),mu,a.getAttribute("delay"),$APP.Ol,a.hasAttribute("disabled"),$APP.Gi,a.hasAttribute("open")],null);var b=$APP.M(a),c=$APP.D(b,$APP.Kh),d=$APP.D(b,$APP.jn),e=$APP.D(b,mu);a=$APP.D(b,$APP.Ol);b=$APP.D(b,$APP.Gi);c=$APP.n(c)?c:"";d=$APP.I(nu,d)?d:"top";e!=null?(e=parseInt(e,10),e=$APP.n(isNaN(e))?400:$APP.ph.i($APP.oh.i(e,0),5E3)):e=400;return new $APP.Q(null,5,[$APP.Cl,c,$APP.Qj,d,ou,e,$APP.X,
3
- $APP.F(a),$APP.Om,$APP.F(b)],null)},qu=function(a){var b=$APP.k(a,"__xTooltipRefs");if($APP.n(b)){a=pu(a);var c=$APP.M(a);a=$APP.D(c,$APP.Cl);var d=$APP.D(c,$APP.Qj),e=$APP.D(c,$APP.Om);c=$APP.k(b,"panel");b=$APP.k(b,"text");c.setAttribute("data-placement",d);d=""+$APP.T.g($APP.r(e));c.setAttribute("aria-hidden",d);b.textContent=a}},ru=function(a,b){return a.dispatchEvent(new CustomEvent(b,{detail:{},bubbles:!0,composed:!0,cancelable:!1}))},su=function(a){var b=$APP.k(a,"__xTooltipShowTimer");$APP.n(b)&&
4
- (clearTimeout(b),a.__xTooltipShowTimer=null)},tu=function(a,b){if($APP.n(a.hasAttribute("disabled")))return null;su(a);if($APP.n($APP.n(b)?b:a.hasAttribute("open"))){if($APP.n(a.hasAttribute("open")))return null;a.setAttribute("open","");return ru(a,"x-tooltip-show")}b=pu(a);b=$APP.M(b);b=$APP.D(b,ou);return b===0?(a.setAttribute("open",""),ru(a,"x-tooltip-show")):$APP.Cg(a,"__xTooltipShowTimer",setTimeout(function(){a.__xTooltipShowTimer=null;return $APP.n(a.isConnected)?(a.setAttribute("open",""),
5
- ru(a,"x-tooltip-show")):null},b))},uu=function(a){su(a);return $APP.n(a.hasAttribute("open"))?(a.removeAttribute("open"),ru(a,"x-tooltip-hide")):null},vu=function(a){var b=$APP.k(a,"__xTooltipRefs");if($APP.n(b)){var c=$APP.k(b,"triggerSlot").assignedElements();b=$APP.k(a,"__xTooltipId");var d=$APP.k(a,"__xTooltipTriggerEl");$APP.n(d)&&(d.removeAttribute("aria-describedby"),a.__xTooltipTriggerEl=null);if(c.length>0){c=c[0];c.setAttribute("aria-describedby",b);a.__xTooltipTriggerEl=c;return}}return null},
6
- wu=function(a){return{pointerenter:function(){return tu(a,!1)},pointerleave:function(){return uu(a)},focusin:function(){return tu(a,!0)},focusout:function(b){b=b.relatedTarget;return b==null||$APP.r(a.contains(b))?uu(a):null},keydown:function(b){b=$APP.B.i(b.key,"Escape");return $APP.n(b?a.hasAttribute("open"):b)?uu(a):null},slotchange:function(){return vu(a)}}},xu=function(a){var b=$APP.k(a,"__xTooltipRefs");if($APP.n(b)){var c=$APP.k(a,"__xTooltipHandlers");$APP.n(c)&&(b=$APP.k(b,"triggerSlot"),
7
- a.removeEventListener("pointerenter",$APP.k(c,"pointerenter")),a.removeEventListener("pointerleave",$APP.k(c,"pointerleave")),a.removeEventListener("focusin",$APP.k(c,"focusin")),a.removeEventListener("focusout",$APP.k(c,"focusout")),a.removeEventListener("keydown",$APP.k(c,"keydown")),b.removeEventListener("slotchange",$APP.k(c,"slotchange")))}},yu=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return $APP.Eg(this,
8
- c,$APP.F(d))}})},zu=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){return d!=null&&$APP.N(d)?this.setAttribute(c,""+$APP.T.g(d)):this.removeAttribute(c)}})},Au=function(a){Object.defineProperty(a,"delay",{configurable:!0,enumerable:!0,get:function(){var b=this.getAttribute("delay");return b!=null?(b=parseInt(b,10),$APP.n(isNaN(b))?null:b):null},set:function(b){return b!=null&&$APP.N(b)?this.setAttribute("delay",
9
- ""+$APP.T.g(b)):this.removeAttribute("delay")}})},Du=function(){var a=class extends HTMLElement{},b=a.prototype;Object.defineProperty(a,"observedAttributes",{get:function(){return Bu}});zu(b,"text","text");zu(b,"placement","placement");Au(b);yu(b,"disabled","disabled");yu(b,"open","open");b.show=function(){return tu(this,!0)};b.hide=function(){return uu(this)};b.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xTooltipRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),
10
- e=document.createElement("span"),g=document.createElement("slot"),h=document.createElement("div"),l=document.createElement("div"),m=document.createElement("div"),p=document.createElement("span"),q=document.createElement("slot");var v=$APP.k(Cu,"n")+1;Cu.n=v;v="x-tt-"+$APP.T.g(v);d.textContent=":host{display:inline-block;position:relative;color-scheme:light dark;--x-tooltip-bg:var(--x-color-bg,#ffffff);--x-tooltip-text:var(--x-color-text,#0f172a);--x-tooltip-border:1px solid var(--x-color-border,#e2e8f0);--x-tooltip-padding:var(--x-space-xs,4px) var(--x-space-sm,8px);--x-tooltip-radius:var(--x-radius-md,6px);--x-tooltip-shadow:var(--x-shadow-md,0 4px 16px rgba(0,0,0,0.12));--x-tooltip-z:var(--x-z-dropdown,1000);--x-tooltip-max-width:min(200px,calc(100% - 2rem));--x-tooltip-font-size:var(--x-font-size-xs,0.75rem);--x-tooltip-arrow-size:6px;--x-tooltip-offset:4px;--x-tooltip-transition-duration:var(--x-transition-duration,150ms);--x-tooltip-transition-easing:var(--x-transition-easing,ease);}@media (prefers-color-scheme:dark){:host{--x-tooltip-bg:var(--x-color-bg,#1e293b);--x-tooltip-text:var(--x-color-text,#e2e8f0);--x-tooltip-border:1px solid var(--x-color-border,#334155);--x-tooltip-shadow:0 4px 24px rgba(0,0,0,0.4);}}[part\x3dtrigger]{display:inline-block;}[part\x3dpanel]{position:absolute;z-index:var(--x-tooltip-z);box-sizing:border-box;background:var(--x-tooltip-bg);color:var(--x-tooltip-text);border:var(--x-tooltip-border);padding:var(--x-tooltip-padding);border-radius:var(--x-tooltip-radius);box-shadow:var(--x-tooltip-shadow);max-width:var(--x-tooltip-max-width);font-size:var(--x-tooltip-font-size);font-family:inherit;line-height:1.4;white-space:normal;word-wrap:break-word;pointer-events:none;visibility:hidden;opacity:0;transition:opacity var(--x-tooltip-transition-duration) var(--x-tooltip-transition-easing),transform var(--x-tooltip-transition-duration) var(--x-tooltip-transition-easing),visibility 0s var(--x-tooltip-transition-duration);}:host([open]) [part\x3dpanel]{visibility:visible;opacity:1;transition:opacity var(--x-tooltip-transition-duration) var(--x-tooltip-transition-easing),transform var(--x-tooltip-transition-duration) var(--x-tooltip-transition-easing),visibility 0s 0s;}[part\x3dpanel][data-placement\x3dtop]{bottom:calc(100% + var(--x-tooltip-arrow-size) + var(--x-tooltip-offset));left:50%;transform:translateX(-50%) translateY(4px);transform-origin:bottom center;}:host([open]) [part\x3dpanel][data-placement\x3dtop]{transform:translateX(-50%) translateY(0);}[part\x3dpanel][data-placement\x3dbottom]{top:calc(100% + var(--x-tooltip-arrow-size) + var(--x-tooltip-offset));left:50%;transform:translateX(-50%) translateY(-4px);transform-origin:top center;}:host([open]) [part\x3dpanel][data-placement\x3dbottom]{transform:translateX(-50%) translateY(0);}[part\x3dpanel][data-placement\x3dleft]{right:calc(100% + var(--x-tooltip-arrow-size) + var(--x-tooltip-offset));top:50%;transform:translateY(-50%) translateX(4px);transform-origin:center right;}:host([open]) [part\x3dpanel][data-placement\x3dleft]{transform:translateY(-50%) translateX(0);}[part\x3dpanel][data-placement\x3dright]{left:calc(100% + var(--x-tooltip-arrow-size) + var(--x-tooltip-offset));top:50%;transform:translateY(-50%) translateX(-4px);transform-origin:center left;}:host([open]) [part\x3dpanel][data-placement\x3dright]{transform:translateY(-50%) translateX(0);}[part\x3darrow]{position:absolute;width:var(--x-tooltip-arrow-size);height:var(--x-tooltip-arrow-size);background:var(--x-tooltip-bg);border:var(--x-tooltip-border);transform:rotate(45deg);pointer-events:none;}[part\x3dpanel][data-placement\x3dtop] [part\x3darrow]{bottom:calc(var(--x-tooltip-arrow-size) / -2);left:calc(50% - var(--x-tooltip-arrow-size) / 2);border-top:none;border-left:none;}[part\x3dpanel][data-placement\x3dbottom] [part\x3darrow]{top:calc(var(--x-tooltip-arrow-size) / -2);left:calc(50% - var(--x-tooltip-arrow-size) / 2);border-bottom:none;border-right:none;}[part\x3dpanel][data-placement\x3dleft] [part\x3darrow]{right:calc(var(--x-tooltip-arrow-size) / -2);top:calc(50% - var(--x-tooltip-arrow-size) / 2);border-bottom:none;border-left:none;}[part\x3dpanel][data-placement\x3dright] [part\x3darrow]{left:calc(var(--x-tooltip-arrow-size) / -2);top:calc(50% - var(--x-tooltip-arrow-size) / 2);border-top:none;border-right:none;}[part\x3dbody]{position:relative;}@media (prefers-reduced-motion:reduce){[part\x3dpanel]{transition:none !important;}}";
11
- e.setAttribute("part","trigger");h.setAttribute("part","panel");h.setAttribute("role","tooltip");h.setAttribute("id",v);h.setAttribute("aria-hidden","true");h.setAttribute("data-placement","top");l.setAttribute("part","arrow");l.setAttribute("aria-hidden","true");m.setAttribute("part","body");p.setAttribute("part","text");q.setAttribute("name","content");e.appendChild(g);m.appendChild(p);m.appendChild(q);h.appendChild(l);h.appendChild(m);c.appendChild(d);c.appendChild(e);c.appendChild(h);this.__xTooltipId=
12
- v;this.__xTooltipRefs={trigger:e,triggerSlot:g,panel:h,arrow:l,body:m,text:p,contentSlot:q}}xu(this);this.__xTooltipHandlers=wu(this);d=$APP.k(this,"__xTooltipRefs");$APP.n(d)&&(c=$APP.k(this,"__xTooltipHandlers"),$APP.n(c)&&(d=$APP.k(d,"triggerSlot"),this.addEventListener("pointerenter",$APP.k(c,"pointerenter")),this.addEventListener("pointerleave",$APP.k(c,"pointerleave")),this.addEventListener("focusin",$APP.k(c,"focusin")),this.addEventListener("focusout",$APP.k(c,"focusout")),this.addEventListener("keydown",
13
- $APP.k(c,"keydown")),d.addEventListener("slotchange",$APP.k(c,"slotchange"))));qu(this);return vu(this)};b.disconnectedCallback=function(){su(this);xu(this);var c=$APP.k(this,"__xTooltipTriggerEl");$APP.n(c)?(c.removeAttribute("aria-describedby"),this.__xTooltipTriggerEl=null,c=void 0):c=null;return c};b.attributeChangedCallback=function(){if($APP.n($APP.k(this,"__xTooltipRefs"))){qu(this);var c=this.hasAttribute("disabled");c=$APP.n($APP.n(c)?this.hasAttribute("open"):c)?uu(this):null}else c=null;
14
- return c};return a},Eu=function(){return $APP.n(customElements.get("x-tooltip"))?null:customElements.define("x-tooltip",Du())},ou=new $APP.K(null,"delay","delay",-574225219),mu=new $APP.K(null,"delay-raw","delay-raw",886290425);var nu=new $APP.S(null,new $APP.Q(null,4,["right",null,"top",null,"bottom",null,"left",null],null),null),Bu=["text","placement","delay","disabled","open"];$APP.Pd(["x-tooltip-show",new $APP.Q(null,2,[$APP.lm,!1,$APP.V,$APP.Qd],null),"x-tooltip-hide",new $APP.Q(null,2,[$APP.lm,!1,$APP.V,$APP.Qd],null)]);var Cu={n:0};$APP.ha("baredom.exports.x_tooltip.init",Eu);export const init=Eu;
2
+ var Uu=function(a){a=new $APP.Q(null,5,[$APP.bi,a.getAttribute("text"),$APP.Bn,a.getAttribute("placement"),Ru,a.getAttribute("delay"),$APP.fm,a.hasAttribute("disabled"),$APP.Yi,a.hasAttribute("open")],null);var b=$APP.M(a),c=$APP.D(b,$APP.bi),d=$APP.D(b,$APP.Bn),e=$APP.D(b,Ru);a=$APP.D(b,$APP.fm);b=$APP.D(b,$APP.Yi);c=$APP.n(c)?c:"";d=$APP.I(Su,d)?d:"top";e!=null?(e=parseInt(e,10),e=$APP.n(isNaN(e))?400:$APP.Kh.i($APP.Jh.i(e,0),5E3)):e=400;return new $APP.Q(null,5,[$APP.Ul,c,$APP.lk,d,Tu,e,$APP.X,
3
+ $APP.F(a),$APP.fn,$APP.F(b)],null)},Vu=function(a){var b=$APP.k(a,"__xTooltipRefs");if($APP.n(b)){a=Uu(a);var c=$APP.M(a);a=$APP.D(c,$APP.Ul);var d=$APP.D(c,$APP.lk);c=$APP.D(c,$APP.fn);var e=$APP.k(b,"panel");b=$APP.k(b,"text");e.setAttribute("data-placement",d);$APP.Og(e,"aria-hidden",""+$APP.S.g($APP.q(c)));b.textContent=a}},Wu=function(a){var b=$APP.k(a,"__xTooltipShowTimer");$APP.n(b)&&(clearTimeout(b),a.__xTooltipShowTimer=null)},Xu=function(a,b){if($APP.n(a.hasAttribute("disabled")))return null;
4
+ Wu(a);if($APP.n($APP.n(b)?b:a.hasAttribute("open"))){if($APP.n(a.hasAttribute("open")))return null;a.setAttribute("open","");return $APP.Qg(a,"x-tooltip-show",{})}b=Uu(a);b=$APP.M(b);b=$APP.D(b,Tu);return b===0?(a.setAttribute("open",""),$APP.Qg(a,"x-tooltip-show",{})):$APP.Mg(a,"__xTooltipShowTimer",setTimeout(function(){a.__xTooltipShowTimer=null;return $APP.n(a.isConnected)?(a.setAttribute("open",""),$APP.Qg(a,"x-tooltip-show",{})):null},b))},Yu=function(a){Wu(a);return $APP.n(a.hasAttribute("open"))?
5
+ (a.removeAttribute("open"),$APP.Qg(a,"x-tooltip-hide",{})):null},Zu=function(a){var b=$APP.k(a,"__xTooltipRefs");if($APP.n(b)){var c=$APP.k(b,"triggerSlot").assignedElements();b=$APP.k(a,"__xTooltipId");var d=$APP.k(a,"__xTooltipTriggerEl");$APP.n(d)&&(d.removeAttribute("aria-describedby"),a.__xTooltipTriggerEl=null);if(c.length>0){c=c[0];c.setAttribute("aria-describedby",b);a.__xTooltipTriggerEl=c;return}}return null},$u=function(a){return{pointerenter:function(){return Xu(a,!1)},pointerleave:function(){return Yu(a)},
6
+ focusin:function(){return Xu(a,!0)},focusout:function(b){b=b.relatedTarget;return b==null||$APP.q(a.contains(b))?Yu(a):null},keydown:function(b){b=$APP.B.i(b.key,"Escape");return $APP.n(b?a.hasAttribute("open"):b)?Yu(a):null},slotchange:function(){return Zu(a)}}},av=function(a){var b=$APP.k(a,"__xTooltipRefs");if($APP.n(b)){var c=$APP.k(a,"__xTooltipHandlers");$APP.n(c)&&(b=$APP.k(b,"triggerSlot"),a.removeEventListener("pointerenter",$APP.k(c,"pointerenter")),a.removeEventListener("pointerleave",
7
+ $APP.k(c,"pointerleave")),a.removeEventListener("focusin",$APP.k(c,"focusin")),a.removeEventListener("focusout",$APP.k(c,"focusout")),a.removeEventListener("keydown",$APP.k(c,"keydown")),b.removeEventListener("slotchange",$APP.k(c,"slotchange")))}},qv=function(a){if(!$APP.n($APP.k(a,"__xTooltipRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("span"),e=document.createElement("slot"),g=document.createElement("div"),h=document.createElement("div"),
8
+ l=document.createElement("div"),m=document.createElement("span"),p=document.createElement("slot");var r=$APP.k(bv,"n")+1;bv.n=r;r="x-tt-"+$APP.S.g(r);c.textContent=":host{display:inline-block;position:relative;color-scheme:light dark;--x-tooltip-bg:var(--x-color-bg,#ffffff);--x-tooltip-text:var(--x-color-text,#0f172a);--x-tooltip-border:1px solid var(--x-color-border,#e2e8f0);--x-tooltip-padding:var(--x-space-xs,4px) var(--x-space-sm,8px);--x-tooltip-radius:var(--x-radius-md,6px);--x-tooltip-shadow:var(--x-shadow-md,0 4px 16px rgba(0,0,0,0.12));--x-tooltip-z:var(--x-z-dropdown,1000);--x-tooltip-max-width:min(280px,calc(100vw - 2rem));--x-tooltip-font-size:var(--x-font-size-xs,0.75rem);--x-tooltip-arrow-size:6px;--x-tooltip-offset:4px;--x-tooltip-transition-duration:var(--x-transition-duration,150ms);--x-tooltip-transition-easing:var(--x-transition-easing,ease);}@media (prefers-color-scheme:dark){:host{--x-tooltip-bg:var(--x-color-bg,#1e293b);--x-tooltip-text:var(--x-color-text,#e2e8f0);--x-tooltip-border:1px solid var(--x-color-border,#334155);--x-tooltip-shadow:0 4px 24px rgba(0,0,0,0.4);}}[part\x3dtrigger]{display:inline-block;}[part\x3dpanel]{position:absolute;z-index:var(--x-tooltip-z);box-sizing:border-box;background:var(--x-tooltip-bg);color:var(--x-tooltip-text);border:var(--x-tooltip-border);padding:var(--x-tooltip-padding);border-radius:var(--x-tooltip-radius);box-shadow:var(--x-tooltip-shadow);max-width:var(--x-tooltip-max-width);font-size:var(--x-tooltip-font-size);font-family:inherit;line-height:1.4;white-space:normal;word-wrap:break-word;pointer-events:none;visibility:hidden;opacity:0;transition:opacity var(--x-tooltip-transition-duration) var(--x-tooltip-transition-easing),transform var(--x-tooltip-transition-duration) var(--x-tooltip-transition-easing),visibility 0s var(--x-tooltip-transition-duration);}:host([open]) [part\x3dpanel]{visibility:visible;opacity:1;transition:opacity var(--x-tooltip-transition-duration) var(--x-tooltip-transition-easing),transform var(--x-tooltip-transition-duration) var(--x-tooltip-transition-easing),visibility 0s 0s;}[part\x3dpanel][data-placement\x3dtop]{bottom:calc(100% + var(--x-tooltip-arrow-size) + var(--x-tooltip-offset));left:50%;transform:translateX(-50%) translateY(4px);transform-origin:bottom center;}:host([open]) [part\x3dpanel][data-placement\x3dtop]{transform:translateX(-50%) translateY(0);}[part\x3dpanel][data-placement\x3dbottom]{top:calc(100% + var(--x-tooltip-arrow-size) + var(--x-tooltip-offset));left:50%;transform:translateX(-50%) translateY(-4px);transform-origin:top center;}:host([open]) [part\x3dpanel][data-placement\x3dbottom]{transform:translateX(-50%) translateY(0);}[part\x3dpanel][data-placement\x3dleft]{right:calc(100% + var(--x-tooltip-arrow-size) + var(--x-tooltip-offset));top:50%;transform:translateY(-50%) translateX(4px);transform-origin:center right;}:host([open]) [part\x3dpanel][data-placement\x3dleft]{transform:translateY(-50%) translateX(0);}[part\x3dpanel][data-placement\x3dright]{left:calc(100% + var(--x-tooltip-arrow-size) + var(--x-tooltip-offset));top:50%;transform:translateY(-50%) translateX(-4px);transform-origin:center left;}:host([open]) [part\x3dpanel][data-placement\x3dright]{transform:translateY(-50%) translateX(0);}[part\x3darrow]{position:absolute;width:var(--x-tooltip-arrow-size);height:var(--x-tooltip-arrow-size);background:var(--x-tooltip-bg);border:var(--x-tooltip-border);transform:rotate(45deg);pointer-events:none;}[part\x3dpanel][data-placement\x3dtop] [part\x3darrow]{bottom:calc(var(--x-tooltip-arrow-size) / -2);left:calc(50% - var(--x-tooltip-arrow-size) / 2);border-top:none;border-left:none;}[part\x3dpanel][data-placement\x3dbottom] [part\x3darrow]{top:calc(var(--x-tooltip-arrow-size) / -2);left:calc(50% - var(--x-tooltip-arrow-size) / 2);border-bottom:none;border-right:none;}[part\x3dpanel][data-placement\x3dleft] [part\x3darrow]{right:calc(var(--x-tooltip-arrow-size) / -2);top:calc(50% - var(--x-tooltip-arrow-size) / 2);border-bottom:none;border-left:none;}[part\x3dpanel][data-placement\x3dright] [part\x3darrow]{left:calc(var(--x-tooltip-arrow-size) / -2);top:calc(50% - var(--x-tooltip-arrow-size) / 2);border-top:none;border-right:none;}[part\x3dbody]{position:relative;}@media (prefers-reduced-motion:reduce){[part\x3dpanel]{transition:none !important;}}";
9
+ d.setAttribute("part","trigger");g.setAttribute("part","panel");g.setAttribute("role","tooltip");g.setAttribute("id",r);g.setAttribute("aria-hidden","true");g.setAttribute("data-placement","top");h.setAttribute("part","arrow");h.setAttribute("aria-hidden","true");l.setAttribute("part","body");m.setAttribute("part","text");p.setAttribute("name","content");d.appendChild(e);l.appendChild(m);l.appendChild(p);g.appendChild(h);g.appendChild(l);b.appendChild(c);b.appendChild(d);b.appendChild(g);a.__xTooltipId=
10
+ r;a.__xTooltipRefs={trigger:d,triggerSlot:e,panel:g,arrow:h,body:l,text:m,contentSlot:p}}av(a);a.__xTooltipHandlers=$u(a);c=$APP.k(a,"__xTooltipRefs");$APP.n(c)&&(b=$APP.k(a,"__xTooltipHandlers"),$APP.n(b)&&(c=$APP.k(c,"triggerSlot"),a.addEventListener("pointerenter",$APP.k(b,"pointerenter")),a.addEventListener("pointerleave",$APP.k(b,"pointerleave")),a.addEventListener("focusin",$APP.k(b,"focusin")),a.addEventListener("focusout",$APP.k(b,"focusout")),a.addEventListener("keydown",$APP.k(b,"keydown")),
11
+ c.addEventListener("slotchange",$APP.k(b,"slotchange"))));Vu(a);return Zu(a)},rv=function(a){Wu(a);av(a);var b=$APP.k(a,"__xTooltipTriggerEl");$APP.n(b)?(b.removeAttribute("aria-describedby"),a.__xTooltipTriggerEl=null,a=void 0):a=null;return a},sv=function(a){if($APP.n($APP.k(a,"__xTooltipRefs"))){Vu(a);var b=a.hasAttribute("disabled");return $APP.n($APP.n(b)?a.hasAttribute("open"):b)?Yu(a):null}return null},tv=function(a){$APP.Ug(a,"text","text");$APP.Ug(a,"placement","placement");$APP.Vg(a,"delay",
12
+ "delay",400);$APP.Sg(a,"disabled","disabled");$APP.Sg(a,"open","open");a.show=function(){return Xu(this,!0)};return a.hide=function(){return Yu(this)}},vv=function(){return $APP.Lg("x-tooltip",new $APP.Q(null,5,[$APP.Cg,uv,$APP.Dg,qv,$APP.Eg,rv,$APP.Fg,sv,$APP.Jg,tv],null))},Tu=new $APP.K(null,"delay","delay",-574225219),Ru=new $APP.K(null,"delay-raw","delay-raw",886290425);var Su=new $APP.R(null,new $APP.Q(null,4,["right",null,"top",null,"bottom",null,"left",null],null),null),uv=["text","placement","delay","disabled","open"];$APP.Pd(["x-tooltip-show",new $APP.Q(null,2,[$APP.Km,!1,$APP.V,$APP.Qd],null),"x-tooltip-hide",new $APP.Q(null,2,[$APP.Km,!1,$APP.V,$APP.Qd],null)]);var bv={n:0};$APP.ha("baredom.exports.x_tooltip.init",vv);export const init=vv;
@@ -1,12 +1,12 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var aJ=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),typeof a==="number"&&$APP.r(isNaN(a))&&a>0?a:null):null},cJ=function(a){var b=$APP.k(a,"__xTypographyRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");c.textContent=bJ;d.setAttribute("part","container");d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xTypographyRefs=new $APP.Q(null,2,[$APP.Hi,b,$APP.Hj,d],null);
3
- return $APP.k(a,"__xTypographyRefs")},iJ=function(a){var b=new $APP.Q(null,4,[$APP.ul,a.getAttribute("variant"),$APP.Xi,a.getAttribute("align"),dJ,a.getAttribute("truncate"),eJ,a.getAttribute("line-clamp")],null);var c=$APP.M(b),d=$APP.D(c,$APP.ul),e=$APP.D(c,$APP.Xi);b=$APP.D(c,dJ);c=$APP.D(c,eJ);d=typeof d==="string"?d.toLowerCase():null;d=$APP.I(fJ,d)?d:"body1";e=typeof e==="string"?e.toLowerCase():null;e=$APP.I(gJ,e)?e:"left";b=new $APP.Q(null,4,[$APP.Vg,d,$APP.vj,e,$APP.Mi,b!=null,hJ,aJ(c)],
4
- null);if($APP.N($APP.k(a,"__xTypographyModel"),b)){b=$APP.M(b);e=$APP.D(b,$APP.Vg);d=$APP.D(b,$APP.vj);var g=$APP.D(b,$APP.Mi);c=$APP.D(b,hJ);var h=cJ(a);h=$APP.M(h);h=$APP.D(h,$APP.Hj);a.setAttribute("data-variant",e);a.setAttribute("data-align",d);$APP.n(g)?h.setAttribute("data-truncate",""):h.removeAttribute("data-truncate");c!=null&&$APP.r(g)?(e=h.style,e.display="-webkit-box",e.setProperty("-webkit-box-orient","vertical"),e.overflow="hidden",e.setProperty("-webkit-line-clamp",""+$APP.T.g(c))):
5
- (c=h.style,c.removeProperty("display"),c.removeProperty("-webkit-box-orient"),c.removeProperty("overflow"),c.removeProperty("-webkit-line-clamp"));a.__xTypographyModel=b}},jJ=function(a){Object.defineProperty(a,"variant",{get:function(){var b=this.getAttribute("variant");return $APP.n(b)?b:"body1"},set:function(b){return $APP.n(b)?this.setAttribute("variant",""+$APP.T.g(b)):this.removeAttribute("variant")},enumerable:!0,configurable:!0});Object.defineProperty(a,"align",{get:function(){var b=this.getAttribute("align");
6
- return $APP.n(b)?b:"left"},set:function(b){return $APP.n(b)?this.setAttribute("align",""+$APP.T.g(b)):this.removeAttribute("align")},enumerable:!0,configurable:!0});Object.defineProperty(a,"truncate",{get:function(){return this.hasAttribute("truncate")},set:function(b){return $APP.n(b)?this.setAttribute("truncate",""):this.removeAttribute("truncate")},enumerable:!0,configurable:!0});Object.defineProperty(a,"lineClamp",{get:function(){return aJ(this.getAttribute("line-clamp"))},set:function(b){return b==
7
- null?this.removeAttribute("line-clamp"):this.setAttribute("line-clamp",""+$APP.T.g(b|0))},enumerable:!0,configurable:!0})},lJ=function(){var a=class extends HTMLElement{};a.observedAttributes=kJ;a.prototype.connectedCallback=function(){cJ(this);iJ(this);return null};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&iJ(this);return null};jJ(a.prototype);return a},mJ=function(){$APP.n(customElements.get("x-typography"))||customElements.define("x-typography",
8
- lJ());return null},eJ=new $APP.K(null,"line-clamp-raw","line-clamp-raw",-1982923204),hJ=new $APP.K(null,"line-clamp","line-clamp",-1079334403),dJ=new $APP.K(null,"truncate-raw","truncate-raw",1178232402);var kJ=["variant","align","truncate","line-clamp"],fJ=new $APP.S(null,new $APP.Q(null,16,["subtitle2",null,"overline",null,"h3",null,"body1",null,"body2",null,"small",null,"subtitle1",null,"h2",null,"kbd",null,"h4",null,"h5",null,"blockquote",null,"h1",null,"caption",null,"code",null,"h6",null],null),null),gJ=new $APP.S(null,new $APP.Q(null,4,["right",null,"justify",null,"center",null,"left",null],null),null);var bJ=":host{display:block;color-scheme:light dark;font-family:var(--x-typography-font-family,"+$APP.T.g("system-ui,-apple-system,sans-serif")+");color:var(--x-typography-color,var(--x-color-text,inherit));}[part\x3dcontainer]{margin:0;padding:0;}:host(:not([data-variant])),:host([data-variant\x3d'body1']){font-size:1rem;font-weight:400;line-height:1.5;letter-spacing:normal;}:host([data-variant\x3d'h1']){font-size:2.5rem;font-weight:700;line-height:1.2;letter-spacing:-0.02em;}:host([data-variant\x3d'h2']){font-size:2rem;font-weight:700;line-height:1.25;letter-spacing:-0.015em;}:host([data-variant\x3d'h3']){font-size:1.75rem;font-weight:600;line-height:1.3;letter-spacing:-0.01em;}:host([data-variant\x3d'h4']){font-size:1.5rem;font-weight:600;line-height:1.35;letter-spacing:-0.005em;}:host([data-variant\x3d'h5']){font-size:1.25rem;font-weight:600;line-height:1.4;letter-spacing:normal;}:host([data-variant\x3d'h6']){font-size:1.125rem;font-weight:600;line-height:1.4;letter-spacing:normal;}:host([data-variant\x3d'subtitle1']){font-size:1.125rem;font-weight:500;line-height:1.4;letter-spacing:0.005em;}:host([data-variant\x3d'subtitle2']){font-size:0.875rem;font-weight:500;line-height:1.4;letter-spacing:0.01em;}:host([data-variant\x3d'body2']){font-size:0.875rem;font-weight:400;line-height:1.5;letter-spacing:normal;}:host([data-variant\x3d'caption']){font-size:0.75rem;font-weight:400;line-height:1.4;letter-spacing:0.02em;}:host([data-variant\x3d'overline']){font-size:0.625rem;font-weight:600;line-height:1.5;letter-spacing:0.1em;text-transform:uppercase;}:host([data-variant\x3d'small']){font-size:0.8125rem;font-weight:400;line-height:1.4;letter-spacing:normal;}:host([data-variant\x3d'blockquote']){font-size:1.125rem;font-weight:400;line-height:1.6;letter-spacing:normal;font-style:italic;}:host([data-variant\x3d'blockquote']) [part\x3dcontainer]{border-left:3px solid var(--x-typography-blockquote-border-color,var(--x-color-border,"+
9
- $APP.T.g("rgba(0,0,0,0.2)")+"));padding:var(--x-typography-blockquote-padding,0 0 0 1em);}@media (prefers-color-scheme:dark){:host([data-variant\x3d'blockquote']) [part\x3dcontainer]{border-left-color:var(--x-typography-blockquote-border-color,var(--x-color-border,"+$APP.T.g("rgba(255,255,255,0.25)")+"));}}:host([data-variant\x3d'code']){font-family:var(--x-typography-mono-font-family,"+$APP.T.g('ui-monospace,"SFMono-Regular","SF Mono",Menlo,Consolas,monospace')+");font-size:0.875rem;font-weight:400;line-height:1.5;}:host([data-variant\x3d'code']) [part\x3dcontainer]{background:var(--x-typography-code-bg,var(--x-color-surface,"+
10
- $APP.T.g("rgba(0,0,0,0.06)")+"));border-radius:var(--x-typography-code-radius,var(--x-radius-sm,4px));padding:var(--x-typography-code-padding,0.15em 0.35em);}@media (prefers-color-scheme:dark){:host([data-variant\x3d'code']) [part\x3dcontainer]{background:var(--x-typography-code-bg,var(--x-color-surface,"+$APP.T.g("rgba(255,255,255,0.1)")+"));}}:host([data-variant\x3d'kbd']){font-family:var(--x-typography-mono-font-family,"+$APP.T.g('ui-monospace,"SFMono-Regular","SF Mono",Menlo,Consolas,monospace')+
11
- ");font-size:0.875rem;font-weight:400;line-height:1.5;}:host([data-variant\x3d'kbd']) [part\x3dcontainer]{background:var(--x-typography-kbd-bg,var(--x-color-surface,"+$APP.T.g("rgba(0,0,0,0.06)")+"));border:1px solid var(--x-typography-kbd-border,var(--x-color-border,"+$APP.T.g("rgba(0,0,0,0.15)")+"));border-radius:var(--x-typography-kbd-radius,var(--x-radius-sm,4px));padding:var(--x-typography-kbd-padding,0.15em 0.4em);}@media (prefers-color-scheme:dark){:host([data-variant\x3d'kbd']) [part\x3dcontainer]{background:var(--x-typography-kbd-bg,var(--x-color-surface,"+
12
- $APP.T.g("rgba(255,255,255,0.1)")+"));border-color:var(--x-typography-kbd-border,var(--x-color-border,"+$APP.T.g("rgba(255,255,255,0.2)")+"));}}:host([data-align\x3d'left']){text-align:left;}:host([data-align\x3d'center']){text-align:center;}:host([data-align\x3d'right']){text-align:right;}:host([data-align\x3d'justify']){text-align:justify;}[part\x3dcontainer][data-truncate]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}";$APP.ha("baredom.exports.x_typography.init",mJ);export const init=mJ;
2
+ var GK=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),typeof a==="number"&&$APP.q(isNaN(a))&&a>0?a:null):null},IK=function(a){var b=$APP.k(a,"__xTypographyRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");c.textContent=HK;d.setAttribute("part","container");d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xTypographyRefs=new $APP.Q(null,2,[$APP.Zi,b,$APP.Zj,d],null);
3
+ return $APP.k(a,"__xTypographyRefs")},OK=function(a){var b=new $APP.Q(null,4,[$APP.Ml,a.getAttribute("variant"),$APP.oj,a.getAttribute("align"),JK,a.getAttribute("truncate"),KK,a.getAttribute("line-clamp")],null);var c=$APP.M(b),d=$APP.D(c,$APP.Ml),e=$APP.D(c,$APP.oj);b=$APP.D(c,JK);c=$APP.D(c,KK);d=typeof d==="string"?d.toLowerCase():null;d=$APP.I(LK,d)?d:"body1";e=typeof e==="string"?e.toLowerCase():null;e=$APP.I(MK,e)?e:"left";b=new $APP.Q(null,4,[$APP.lh,d,$APP.Nj,e,$APP.dj,b!=null,NK,GK(c)],
4
+ null);if($APP.N($APP.k(a,"__xTypographyModel"),b)){b=$APP.M(b);e=$APP.D(b,$APP.lh);d=$APP.D(b,$APP.Nj);var g=$APP.D(b,$APP.dj);c=$APP.D(b,NK);var h=IK(a);h=$APP.M(h);h=$APP.D(h,$APP.Zj);a.setAttribute("data-variant",e);a.setAttribute("data-align",d);$APP.n(g)?h.setAttribute("data-truncate",""):h.removeAttribute("data-truncate");c!=null&&$APP.q(g)?(e=h.style,e.display="-webkit-box",e.setProperty("-webkit-box-orient","vertical"),e.overflow="hidden",e.setProperty("-webkit-line-clamp",""+$APP.S.g(c))):
5
+ (c=h.style,c.removeProperty("display"),c.removeProperty("-webkit-box-orient"),c.removeProperty("overflow"),c.removeProperty("-webkit-line-clamp"));a.__xTypographyModel=b}},PK=function(a){Object.defineProperty(a,"variant",{get:function(){var b=this.getAttribute("variant");return $APP.n(b)?b:"body1"},set:function(b){return $APP.n(b)?this.setAttribute("variant",""+$APP.S.g(b)):this.removeAttribute("variant")},enumerable:!0,configurable:!0});Object.defineProperty(a,"align",{get:function(){var b=this.getAttribute("align");
6
+ return $APP.n(b)?b:"left"},set:function(b){return $APP.n(b)?this.setAttribute("align",""+$APP.S.g(b)):this.removeAttribute("align")},enumerable:!0,configurable:!0});Object.defineProperty(a,"truncate",{get:function(){return this.hasAttribute("truncate")},set:function(b){return $APP.n(b)?this.setAttribute("truncate",""):this.removeAttribute("truncate")},enumerable:!0,configurable:!0});return Object.defineProperty(a,"lineClamp",{get:function(){return GK(this.getAttribute("line-clamp"))},set:function(b){return b==
7
+ null?this.removeAttribute("line-clamp"):this.setAttribute("line-clamp",""+$APP.S.g(b|0))},enumerable:!0,configurable:!0})},QK=function(a){IK(a);OK(a);return null},RK=function(a,b,c,d){$APP.N(c,d)&&OK(a);return null},TK=function(){return $APP.Lg("x-typography",new $APP.Q(null,4,[$APP.Cg,SK,$APP.Dg,QK,$APP.Fg,RK,$APP.Jg,PK],null))},KK=new $APP.K(null,"line-clamp-raw","line-clamp-raw",-1982923204),NK=new $APP.K(null,"line-clamp","line-clamp",-1079334403),JK=new $APP.K(null,"truncate-raw","truncate-raw",
8
+ 1178232402);var SK=["variant","align","truncate","line-clamp"],LK=new $APP.R(null,new $APP.Q(null,16,["subtitle2",null,"overline",null,"h3",null,"body1",null,"body2",null,"small",null,"subtitle1",null,"h2",null,"kbd",null,"h4",null,"h5",null,"blockquote",null,"h1",null,"caption",null,"code",null,"h6",null],null),null),MK=new $APP.R(null,new $APP.Q(null,4,["right",null,"justify",null,"center",null,"left",null],null),null);var HK=":host{display:block;color-scheme:light dark;font-family:var(--x-typography-font-family,"+$APP.S.g("system-ui,-apple-system,sans-serif")+");color:var(--x-typography-color,var(--x-color-text,inherit));}[part\x3dcontainer]{margin:0;padding:0;}:host(:not([data-variant])),:host([data-variant\x3d'body1']){font-size:1rem;font-weight:400;line-height:1.5;letter-spacing:normal;}:host([data-variant\x3d'h1']){font-size:2.5rem;font-weight:700;line-height:1.2;letter-spacing:-0.02em;}:host([data-variant\x3d'h2']){font-size:2rem;font-weight:700;line-height:1.25;letter-spacing:-0.015em;}:host([data-variant\x3d'h3']){font-size:1.75rem;font-weight:600;line-height:1.3;letter-spacing:-0.01em;}:host([data-variant\x3d'h4']){font-size:1.5rem;font-weight:600;line-height:1.35;letter-spacing:-0.005em;}:host([data-variant\x3d'h5']){font-size:1.25rem;font-weight:600;line-height:1.4;letter-spacing:normal;}:host([data-variant\x3d'h6']){font-size:1.125rem;font-weight:600;line-height:1.4;letter-spacing:normal;}:host([data-variant\x3d'subtitle1']){font-size:1.125rem;font-weight:500;line-height:1.4;letter-spacing:0.005em;}:host([data-variant\x3d'subtitle2']){font-size:0.875rem;font-weight:500;line-height:1.4;letter-spacing:0.01em;}:host([data-variant\x3d'body2']){font-size:0.875rem;font-weight:400;line-height:1.5;letter-spacing:normal;}:host([data-variant\x3d'caption']){font-size:0.75rem;font-weight:400;line-height:1.4;letter-spacing:0.02em;}:host([data-variant\x3d'overline']){font-size:0.625rem;font-weight:600;line-height:1.5;letter-spacing:0.1em;text-transform:uppercase;}:host([data-variant\x3d'small']){font-size:0.8125rem;font-weight:400;line-height:1.4;letter-spacing:normal;}:host([data-variant\x3d'blockquote']){font-size:1.125rem;font-weight:400;line-height:1.6;letter-spacing:normal;font-style:italic;}:host([data-variant\x3d'blockquote']) [part\x3dcontainer]{border-left:3px solid var(--x-typography-blockquote-border-color,var(--x-color-border,"+
9
+ $APP.S.g("rgba(0,0,0,0.2)")+"));padding:var(--x-typography-blockquote-padding,0 0 0 1em);}@media (prefers-color-scheme:dark){:host([data-variant\x3d'blockquote']) [part\x3dcontainer]{border-left-color:var(--x-typography-blockquote-border-color,var(--x-color-border,"+$APP.S.g("rgba(255,255,255,0.25)")+"));}}:host([data-variant\x3d'code']){font-family:var(--x-typography-mono-font-family,"+$APP.S.g('ui-monospace,"SFMono-Regular","SF Mono",Menlo,Consolas,monospace')+");font-size:0.875rem;font-weight:400;line-height:1.5;}:host([data-variant\x3d'code']) [part\x3dcontainer]{background:var(--x-typography-code-bg,var(--x-color-surface,"+
10
+ $APP.S.g("rgba(0,0,0,0.06)")+"));border-radius:var(--x-typography-code-radius,var(--x-radius-sm,4px));padding:var(--x-typography-code-padding,0.15em 0.35em);}@media (prefers-color-scheme:dark){:host([data-variant\x3d'code']) [part\x3dcontainer]{background:var(--x-typography-code-bg,var(--x-color-surface,"+$APP.S.g("rgba(255,255,255,0.1)")+"));}}:host([data-variant\x3d'kbd']){font-family:var(--x-typography-mono-font-family,"+$APP.S.g('ui-monospace,"SFMono-Regular","SF Mono",Menlo,Consolas,monospace')+
11
+ ");font-size:0.875rem;font-weight:400;line-height:1.5;}:host([data-variant\x3d'kbd']) [part\x3dcontainer]{background:var(--x-typography-kbd-bg,var(--x-color-surface,"+$APP.S.g("rgba(0,0,0,0.06)")+"));border:1px solid var(--x-typography-kbd-border,var(--x-color-border,"+$APP.S.g("rgba(0,0,0,0.15)")+"));border-radius:var(--x-typography-kbd-radius,var(--x-radius-sm,4px));padding:var(--x-typography-kbd-padding,0.15em 0.4em);}@media (prefers-color-scheme:dark){:host([data-variant\x3d'kbd']) [part\x3dcontainer]{background:var(--x-typography-kbd-bg,var(--x-color-surface,"+
12
+ $APP.S.g("rgba(255,255,255,0.1)")+"));border-color:var(--x-typography-kbd-border,var(--x-color-border,"+$APP.S.g("rgba(255,255,255,0.2)")+"));}}:host([data-align\x3d'left']){text-align:left;}:host([data-align\x3d'center']){text-align:center;}:host([data-align\x3d'right']){text-align:right;}:host([data-align\x3d'justify']){text-align:justify;}[part\x3dcontainer][data-truncate]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}";$APP.ha("baredom.exports.x_typography.init",TK);export const init=TK;