@vanelsas/baredom 2.4.1 → 2.6.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 (187) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +63 -270
  3. package/custom-elements.json +7373 -0
  4. package/dist/baredom.d.ts +97 -0
  5. package/dist/base.js +74 -74
  6. package/dist/integrity.json +93 -93
  7. package/dist/x-alert.d.ts +43 -0
  8. package/dist/x-alert.js +17 -17
  9. package/dist/x-avatar-group.d.ts +18 -0
  10. package/dist/x-avatar-group.js +10 -10
  11. package/dist/x-avatar.d.ts +21 -0
  12. package/dist/x-avatar.js +13 -13
  13. package/dist/x-badge.d.ts +19 -0
  14. package/dist/x-badge.js +11 -11
  15. package/dist/x-bento-grid.d.ts +12 -0
  16. package/dist/x-bento-grid.js +5 -5
  17. package/dist/x-bento-item.d.ts +12 -0
  18. package/dist/x-bento-item.js +4 -4
  19. package/dist/x-breadcrumbs.d.ts +20 -0
  20. package/dist/x-breadcrumbs.js +14 -14
  21. package/dist/x-button.d.ts +45 -0
  22. package/dist/x-button.js +15 -15
  23. package/dist/x-cancel-dialogue.d.ts +50 -0
  24. package/dist/x-cancel-dialogue.js +12 -12
  25. package/dist/x-card.d.ts +39 -0
  26. package/dist/x-card.js +7 -7
  27. package/dist/x-carousel.d.ts +48 -0
  28. package/dist/x-carousel.js +28 -28
  29. package/dist/x-chart.d.ts +23 -0
  30. package/dist/x-chart.js +46 -46
  31. package/dist/x-checkbox.d.ts +45 -0
  32. package/dist/x-checkbox.js +11 -11
  33. package/dist/x-chip.d.ts +41 -0
  34. package/dist/x-chip.js +8 -8
  35. package/dist/x-collapse.d.ts +42 -0
  36. package/dist/x-collapse.js +10 -10
  37. package/dist/x-color-picker.d.ts +47 -0
  38. package/dist/x-color-picker.js +41 -41
  39. package/dist/x-combobox.d.ts +47 -0
  40. package/dist/x-combobox.js +25 -25
  41. package/dist/x-command-palette.d.ts +46 -0
  42. package/dist/x-command-palette.js +24 -24
  43. package/dist/x-container.d.ts +14 -0
  44. package/dist/x-container.js +6 -6
  45. package/dist/x-context-menu.d.ts +17 -0
  46. package/dist/x-context-menu.js +18 -18
  47. package/dist/x-copy.d.ts +51 -0
  48. package/dist/x-copy.js +20 -20
  49. package/dist/x-currency-field.d.ts +52 -0
  50. package/dist/x-currency-field.js +23 -21
  51. package/dist/x-date-picker.d.ts +20 -0
  52. package/dist/x-date-picker.js +37 -37
  53. package/dist/x-divider.d.ts +20 -0
  54. package/dist/x-divider.js +8 -8
  55. package/dist/x-drawer.d.ts +44 -0
  56. package/dist/x-drawer.js +11 -11
  57. package/dist/x-dropdown.d.ts +42 -0
  58. package/dist/x-dropdown.js +9 -9
  59. package/dist/x-fieldset.d.ts +14 -0
  60. package/dist/x-fieldset.js +5 -5
  61. package/dist/x-file-download.d.ts +40 -0
  62. package/dist/x-file-download.js +7 -7
  63. package/dist/x-file-upload.d.ts +46 -0
  64. package/dist/x-file-upload.js +22 -22
  65. package/dist/x-form-field.d.ts +47 -0
  66. package/dist/x-form-field.js +15 -15
  67. package/dist/x-form.d.ts +41 -0
  68. package/dist/x-form.js +9 -9
  69. package/dist/x-gaussian-blur.d.ts +20 -0
  70. package/dist/x-gaussian-blur.js +16 -16
  71. package/dist/x-grid.d.ts +12 -0
  72. package/dist/x-grid.js +6 -6
  73. package/dist/x-icon.d.ts +15 -0
  74. package/dist/x-icon.js +7 -7
  75. package/dist/x-image.d.ts +48 -0
  76. package/dist/x-image.js +18 -18
  77. package/dist/x-kinetic-font.d.ts +48 -0
  78. package/dist/x-kinetic-font.js +28 -28
  79. package/dist/x-kinetic-typography.d.ts +27 -0
  80. package/dist/x-kinetic-typography.js +37 -37
  81. package/dist/x-liquid-dock.d.ts +47 -0
  82. package/dist/x-liquid-dock.js +35 -35
  83. package/dist/x-liquid-fill.d.ts +46 -0
  84. package/dist/x-liquid-fill.js +40 -40
  85. package/dist/x-liquid-glass.d.ts +25 -0
  86. package/dist/x-liquid-glass.js +35 -35
  87. package/dist/x-menu-item.d.ts +41 -0
  88. package/dist/x-menu-item.js +10 -10
  89. package/dist/x-menu.d.ts +42 -0
  90. package/dist/x-menu.js +10 -10
  91. package/dist/x-metaball-cursor.d.ts +21 -0
  92. package/dist/x-metaball-cursor.js +25 -25
  93. package/dist/x-modal.d.ts +44 -0
  94. package/dist/x-modal.js +11 -11
  95. package/dist/x-morph-stack.d.ts +46 -0
  96. package/dist/x-morph-stack.js +39 -39
  97. package/dist/x-navbar.d.ts +46 -0
  98. package/dist/x-navbar.js +12 -12
  99. package/dist/x-neural-glow.d.ts +22 -0
  100. package/dist/x-neural-glow.js +30 -30
  101. package/dist/x-notification-center.d.ts +42 -0
  102. package/dist/x-notification-center.js +10 -10
  103. package/dist/x-organic-divider.d.ts +19 -0
  104. package/dist/x-organic-divider.js +15 -15
  105. package/dist/x-organic-progress.d.ts +45 -0
  106. package/dist/x-organic-progress.js +35 -35
  107. package/dist/x-organic-shape.d.ts +18 -0
  108. package/dist/x-organic-shape.js +12 -12
  109. package/dist/x-pagination.d.ts +45 -0
  110. package/dist/x-pagination.js +17 -16
  111. package/dist/x-particle-button.d.ts +47 -0
  112. package/dist/x-particle-button.js +46 -46
  113. package/dist/x-popover.d.ts +45 -0
  114. package/dist/x-popover.js +23 -23
  115. package/dist/x-progress-circle.d.ts +41 -0
  116. package/dist/x-progress-circle.js +7 -7
  117. package/dist/x-progress.d.ts +44 -0
  118. package/dist/x-progress.js +7 -7
  119. package/dist/x-radio.d.ts +44 -0
  120. package/dist/x-radio.js +11 -11
  121. package/dist/x-ripple-effect.d.ts +42 -0
  122. package/dist/x-ripple-effect.js +11 -11
  123. package/dist/x-scroll-parallax.d.ts +45 -0
  124. package/dist/x-scroll-parallax.js +17 -17
  125. package/dist/x-scroll-stack.d.ts +46 -0
  126. package/dist/x-scroll-stack.js +18 -18
  127. package/dist/x-scroll-story.d.ts +56 -0
  128. package/dist/x-scroll-story.js +33 -33
  129. package/dist/x-scroll-timeline.d.ts +58 -0
  130. package/dist/x-scroll-timeline.js +44 -44
  131. package/dist/x-scroll.d.ts +51 -0
  132. package/dist/x-scroll.js +39 -39
  133. package/dist/x-search-field.d.ts +47 -0
  134. package/dist/x-search-field.js +15 -14
  135. package/dist/x-select.d.ts +41 -0
  136. package/dist/x-select.js +10 -10
  137. package/dist/x-sidebar.d.ts +40 -0
  138. package/dist/x-sidebar.js +16 -16
  139. package/dist/x-skeleton-group.d.ts +15 -0
  140. package/dist/x-skeleton-group.js +13 -13
  141. package/dist/x-skeleton.d.ts +16 -0
  142. package/dist/x-skeleton.js +1 -1
  143. package/dist/x-slider.d.ts +49 -0
  144. package/dist/x-slider.js +18 -16
  145. package/dist/x-soft-body.d.ts +44 -0
  146. package/dist/x-soft-body.js +20 -20
  147. package/dist/x-spacer.d.ts +15 -0
  148. package/dist/x-spacer.js +5 -5
  149. package/dist/x-spinner.d.ts +15 -0
  150. package/dist/x-spinner.js +5 -5
  151. package/dist/x-splash.d.ts +42 -0
  152. package/dist/x-splash.js +13 -13
  153. package/dist/x-stat.d.ts +21 -0
  154. package/dist/x-stat.js +9 -9
  155. package/dist/x-stepper.d.ts +42 -0
  156. package/dist/x-stepper.js +14 -14
  157. package/dist/x-switch.d.ts +44 -0
  158. package/dist/x-switch.js +10 -10
  159. package/dist/x-tab.d.ts +40 -0
  160. package/dist/x-tab.js +7 -7
  161. package/dist/x-table-cell.d.ts +50 -0
  162. package/dist/x-table-cell.js +19 -19
  163. package/dist/x-table-row.d.ts +43 -0
  164. package/dist/x-table-row.js +10 -10
  165. package/dist/x-table.d.ts +124 -0
  166. package/dist/x-table.js +13 -13
  167. package/dist/x-tabs.d.ts +71 -0
  168. package/dist/x-tabs.js +11 -11
  169. package/dist/x-text-area.d.ts +48 -0
  170. package/dist/x-text-area.js +20 -18
  171. package/dist/x-theme.d.ts +15 -0
  172. package/dist/x-theme.js +24 -24
  173. package/dist/x-timeline-item.d.ts +46 -0
  174. package/dist/x-timeline-item.js +19 -19
  175. package/dist/x-timeline.d.ts +78 -0
  176. package/dist/x-timeline.js +9 -9
  177. package/dist/x-toast.d.ts +45 -0
  178. package/dist/x-toast.js +21 -21
  179. package/dist/x-toaster.d.ts +41 -0
  180. package/dist/x-toaster.js +8 -8
  181. package/dist/x-tooltip.d.ts +43 -0
  182. package/dist/x-tooltip.js +12 -12
  183. package/dist/x-typography.d.ts +16 -0
  184. package/dist/x-typography.js +8 -8
  185. package/dist/x-welcome-tour.d.ts +92 -0
  186. package/dist/x-welcome-tour.js +58 -58
  187. package/package.json +506 -392
@@ -0,0 +1,44 @@
1
+ // x-soft-body.d.ts — auto-generated by generate_types.bb, do not edit
2
+
3
+ export function init(): void;
4
+
5
+ export interface XSoftBodyEventMap {
6
+ "x-soft-body-grab": CustomEvent<{}>;
7
+ "x-soft-body-release": CustomEvent<{}>;
8
+ }
9
+
10
+ export interface XSoftBody extends HTMLElement {
11
+ stiffness: number;
12
+ damping: number;
13
+ radius: number;
14
+ intensity: number;
15
+ grabRadius: number;
16
+ disabled: boolean;
17
+
18
+ addEventListener<K extends keyof XSoftBodyEventMap>(
19
+ type: K,
20
+ listener: (this: XSoftBody, ev: XSoftBodyEventMap[K]) => any,
21
+ options?: boolean | AddEventListenerOptions
22
+ ): void;
23
+ addEventListener(
24
+ type: string,
25
+ listener: EventListenerOrEventListenerObject,
26
+ options?: boolean | AddEventListenerOptions
27
+ ): void;
28
+ removeEventListener<K extends keyof XSoftBodyEventMap>(
29
+ type: K,
30
+ listener: (this: XSoftBody, ev: XSoftBodyEventMap[K]) => any,
31
+ options?: boolean | EventListenerOptions
32
+ ): void;
33
+ removeEventListener(
34
+ type: string,
35
+ listener: EventListenerOrEventListenerObject,
36
+ options?: boolean | EventListenerOptions
37
+ ): void;
38
+ }
39
+
40
+ declare global {
41
+ interface HTMLElementTagNameMap {
42
+ "x-soft-body": XSoftBody;
43
+ }
44
+ }
@@ -1,23 +1,23 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var MK=function(a,b,c,d){if(typeof a==="string"){a=a.trim();if($APP.B.i(a,""))return b;a=parseFloat(a);return $APP.n(isNaN(a))?b:Math.min(d,Math.max(c,a))}return b},NK=function(a,b,c,d,e,g){b=c+(e*(b-a)-g*c)*d;return[a+b*d,b]},OK=function(a,b,c,d,e,g,h){a=c-a;b=d-b;d=Math.sqrt(a*a+b*b);if(d<=.001||d>=e)return[0,0];e=1-d/e;g*=e*e*($APP.n(h)?50:20);return[a/d*g,b/d*g]},PK=function(){return $APP.F(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},QK=function(a,b){for(var c=0;;){if(c>=20)return!0;
3
- if(Math.abs(a[c])>.1||Math.abs(b[c])>.1)return!1;c+=1}},SK=function(a){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElementNS("http://www.w3.org/2000/svg","svg"),e=document.createElementNS("http://www.w3.org/2000/svg","path"),g=document.createElement("div"),h=document.createElement("slot");c.textContent=RK;d.setAttribute("part","svg");d.setAttribute("viewBox","0 0 300 200");d.setAttribute("preserveAspectRatio","none");d.setAttribute("aria-hidden","true");
4
- e.setAttribute("part","shape");g.setAttribute("part","content");d.appendChild(e);g.appendChild(h);b.appendChild(c);b.appendChild(d);b.appendChild(g);a.__xSoftBodyRefs=new $APP.R(null,4,[$APP.Hi,b,$APP.mk,d,$APP.Yk,e,$APP.zi,g],null)},VK=function(a){a=new $APP.R(null,6,[$APP.im,a.getAttribute("stiffness"),$APP.Wm,a.getAttribute("damping"),$APP.Ij,a.getAttribute("radius"),$APP.Gk,a.getAttribute("intensity"),TK,a.getAttribute("grab-radius"),$APP.ej,a.getAttribute("disabled")],null);var b=$APP.M(a);a=
5
- $APP.D(b,$APP.im);var c=$APP.D(b,$APP.Wm),d=$APP.D(b,$APP.Ij),e=$APP.D(b,$APP.Gk),g=$APP.D(b,TK);b=$APP.D(b,$APP.ej);return new $APP.R(null,6,[$APP.Rl,MK(a,180,10,1E3),$APP.Pk,MK(c,12,1,100),$APP.Rm,MK(d,16,6,200),$APP.xk,MK(e,1,0,5),UK,MK(g,80,10,500),$APP.X,b!=null],null)},WK=function(a,b,c){var d=$APP.Rm.g($APP.k(a,"__xSoftBodyModel"));d=Math.max(6,Math.min(d,Math.min(b,c)/2));var e=Math.cos(Math.PI/6),g=Math.sin(Math.PI/6),h=Math.cos(Math.PI/3),l=Math.sin(Math.PI/3),m=new Float64Array(20),p=new Float64Array(20);
2
+ var NK=function(a,b,c,d){if(typeof a==="string"){a=a.trim();if($APP.B.i(a,""))return b;a=parseFloat(a);return $APP.n(isNaN(a))?b:Math.min(d,Math.max(c,a))}return b},OK=function(a,b,c,d,e,g){b=c+(e*(b-a)-g*c)*d;return[a+b*d,b]},PK=function(a,b,c,d,e,g,h){a=c-a;b=d-b;d=Math.sqrt(a*a+b*b);if(d<=.001||d>=e)return[0,0];e=1-d/e;g*=e*e*($APP.n(h)?50:20);return[a/d*g,b/d*g]},QK=function(){return $APP.F(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},RK=function(a,b){for(var c=0;;){if(c>=20)return!0;
3
+ if(Math.abs(a[c])>.1||Math.abs(b[c])>.1)return!1;c+=1}},TK=function(a){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElementNS("http://www.w3.org/2000/svg","svg"),e=document.createElementNS("http://www.w3.org/2000/svg","path"),g=document.createElement("div"),h=document.createElement("slot");c.textContent=SK;d.setAttribute("part","svg");d.setAttribute("viewBox","0 0 300 200");d.setAttribute("preserveAspectRatio","none");d.setAttribute("aria-hidden","true");
4
+ e.setAttribute("part","shape");g.setAttribute("part","content");d.appendChild(e);g.appendChild(h);b.appendChild(c);b.appendChild(d);b.appendChild(g);a.__xSoftBodyRefs=new $APP.Q(null,4,[$APP.Hi,b,$APP.mk,d,$APP.Zk,e,$APP.zi,g],null)},WK=function(a){a=new $APP.Q(null,6,[$APP.km,a.getAttribute("stiffness"),$APP.Ym,a.getAttribute("damping"),$APP.Ij,a.getAttribute("radius"),$APP.Gk,a.getAttribute("intensity"),UK,a.getAttribute("grab-radius"),$APP.ej,a.getAttribute("disabled")],null);var b=$APP.M(a);a=
5
+ $APP.D(b,$APP.km);var c=$APP.D(b,$APP.Ym),d=$APP.D(b,$APP.Ij),e=$APP.D(b,$APP.Gk),g=$APP.D(b,UK);b=$APP.D(b,$APP.ej);return new $APP.Q(null,6,[$APP.Tl,NK(a,180,10,1E3),$APP.Pk,NK(c,12,1,100),$APP.Tm,NK(d,16,6,200),$APP.xk,NK(e,1,0,5),VK,NK(g,80,10,500),$APP.X,b!=null],null)},XK=function(a,b,c){var d=$APP.Tm.g($APP.k(a,"__xSoftBodyModel"));d=Math.max(6,Math.min(d,Math.min(b,c)/2));var e=Math.cos(Math.PI/6),g=Math.sin(Math.PI/6),h=Math.cos(Math.PI/3),l=Math.sin(Math.PI/3),m=new Float64Array(20),p=new Float64Array(20);
6
6
  m[0]=d;p[0]=0;m[1]=b*.5;p[1]=0;m[2]=b-d;p[2]=0;m[3]=b-d+d*g;p[3]=d-d*e;m[4]=b-d+d*l;p[4]=d-d*h;m[5]=b;p[5]=d;m[6]=b;p[6]=c*.5;m[7]=b;p[7]=c-d;m[8]=b-d+d*e;p[8]=c-d+d*g;m[9]=b-d+d*h;p[9]=c-d+d*l;m[10]=b-d;p[10]=c;m[11]=b*.5;p[11]=c;m[12]=d;p[12]=c;m[13]=d-d*g;p[13]=c-d+d*e;m[14]=d-d*l;p[14]=c-d+d*h;m[15]=0;p[15]=c-d;m[16]=0;p[16]=c*.5;m[17]=0;p[17]=d;m[18]=d-d*e;p[18]=d-d*g;m[19]=d-d*h;p[19]=d-d*l;c=[m,p];b=c[0];c=c[1];d=new Float64Array(20);e=new Float64Array(20);g=new Float64Array(20);h=new Float64Array(20);
7
- for(l=0;;)if(l<20)d[l]=b[l],e[l]=c[l],g[l]=0,h[l]=0,l+=1;else break;a.__xSoftBodyRX=b;a.__xSoftBodyRY=c;a.__xSoftBodyCX=d;a.__xSoftBodyCY=e;a.__xSoftBodyVX=g;a.__xSoftBodyVY=h},XK=function(a){var b=$APP.M($APP.k(a,"__xSoftBodyRefs"));b=$APP.D(b,$APP.Yk);var c=$APP.k(a,"__xSoftBodyCX");a=$APP.k(a,"__xSoftBodyCY");var d=[];d.push("M"+$APP.T.g(c[0].toFixed(2))+","+$APP.T.g(a[0].toFixed(2)));for(var e=0;;)if(e<20){var g=$APP.fd(e+19,20),h=e,l=$APP.fd(e+1,20),m=$APP.fd(e+2,20),p=(c[l]-c[g])/6,q=(a[l]-
8
- a[g])/6;g=(c[m]-c[h])/6;m=(a[m]-a[h])/6;var v=c[l]-c[h],x=a[l]-a[h];x=Math.sqrt(v*v+x*x)*.4;v=Math.sqrt(p*p+q*q);v=v>x?x/(v+.001):1;q=a[h]+q*v;var y=Math.sqrt(g*g+m*m);x=y>x?x/(y+.001):1;g=c[l]-g*x;m=a[l]-m*x;d.push("C"+$APP.T.g((c[h]+p*v).toFixed(2))+","+$APP.T.g(q.toFixed(2))+" "+$APP.T.g(g.toFixed(2))+","+$APP.T.g(m.toFixed(2))+" "+$APP.T.g(c[l].toFixed(2))+","+$APP.T.g(a[l].toFixed(2)));e+=1}else break;d.push("Z");b.setAttribute("d",d.join(""))},YK=function(a){var b=$APP.M($APP.k(a,"__xSoftBodyRefs"));
9
- b=$APP.D(b,$APP.Yk);var c=$APP.k(a,"__xSoftBodyW"),d=$APP.k(a,"__xSoftBodyH");a=$APP.Rm.g($APP.k(a,"__xSoftBodyModel"));a=Math.max(6,Math.min(a,Math.min(c,d)/2));var e=.5522847498*a;c="M"+$APP.T.g(a.toFixed(2))+",0L"+$APP.T.g((c-a).toFixed(2))+",0C"+$APP.T.g((c-a+e).toFixed(2))+",0 "+$APP.T.g(c.toFixed(2))+","+$APP.T.g((a-e).toFixed(2))+" "+$APP.T.g(c.toFixed(2))+","+$APP.T.g(a.toFixed(2))+"L"+$APP.T.g(c.toFixed(2))+","+$APP.T.g((d-a).toFixed(2))+"C"+$APP.T.g(c.toFixed(2))+","+$APP.T.g((d-a+e).toFixed(2))+
10
- " "+$APP.T.g((c-a+e).toFixed(2))+","+$APP.T.g(d.toFixed(2))+" "+$APP.T.g((c-a).toFixed(2))+","+$APP.T.g(d.toFixed(2))+"L"+$APP.T.g(a.toFixed(2))+","+$APP.T.g(d.toFixed(2))+"C"+$APP.T.g((a-e).toFixed(2))+","+$APP.T.g(d.toFixed(2))+" 0,"+$APP.T.g((d-a+e).toFixed(2))+" 0,"+$APP.T.g((d-a).toFixed(2))+"L0,"+$APP.T.g(a.toFixed(2))+"C0,"+$APP.T.g((a-e).toFixed(2))+" "+$APP.T.g((a-e).toFixed(2))+",0 "+$APP.T.g(a.toFixed(2))+",0Z";b.setAttribute("d",c)},$K=function(a){$APP.n($APP.k(a,"__xSoftBodyRaf"))||($APP.ja(a,
11
- "__xSoftBodyLF",performance.now()),$APP.ja(a,"__xSoftBodyRaf",requestAnimationFrame(function(){return ZK(a)})))},dL=function(a){var b=$APP.k(a,"__xSoftBodyRaf");$APP.n(b)&&(cancelAnimationFrame(b),a.__xSoftBodyRaf=null)},eL=function(a,b){var c=$APP.M($APP.k(a,"__xSoftBodyRefs"));c=$APP.D(c,$APP.mk).getBoundingClientRect();a.__xSoftBodyPX=b.clientX-c.left;a.__xSoftBodyPY=b.clientY-c.top;return null},fL=function(a){function b(){a.__xSoftBodyGrab=!1;a.dispatchEvent(new CustomEvent("x-soft-body-release",
12
- {bubbles:!0,composed:!0,detail:{}}));return null}function c(h){a.__xSoftBodyGrab=!0;eL(a,h);a.dispatchEvent(new CustomEvent("x-soft-body-grab",{bubbles:!0,composed:!0,detail:{}}));return null}function d(){a.__xSoftBodyPA=!1;a.__xSoftBodyGrab=!1;return null}function e(){a.__xSoftBodyPA=!0;var h=$APP.X.g($APP.k(a,"__xSoftBodyModel"));h=$APP.n(h)?h:PK();$APP.n(h)||$K(a);return null}function g(h){return eL(a,h)}$APP.ja(a,"__xSoftBodyHdl",{move:g,enter:e,leave:d,down:c,up:b});a.addEventListener("pointermove",
13
- g,{passive:!0});a.addEventListener("pointerenter",e);a.addEventListener("pointerleave",d);a.addEventListener("pointerdown",c);a.addEventListener("pointerup",b)},AL=function(a){var b=$APP.k(a,"__xSoftBodyHdl");$APP.n(b)&&(a.removeEventListener("pointermove",$APP.k(b,"move")),a.removeEventListener("pointerenter",$APP.k(b,"enter")),a.removeEventListener("pointerleave",$APP.k(b,"leave")),a.removeEventListener("pointerdown",$APP.k(b,"down")),a.removeEventListener("pointerup",$APP.k(b,"up")),a.__xSoftBodyHdl=
14
- null)},BL=function(a){Object.defineProperty(a,"stiffness",{get:function(){var b=this.getAttribute("stiffness");return MK(b,180,10,1E3)},set:function(b){return b==null?this.removeAttribute("stiffness"):this.setAttribute("stiffness",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"damping",{get:function(){var b=this.getAttribute("damping");return MK(b,12,1,100)},set:function(b){return b==null?this.removeAttribute("damping"):this.setAttribute("damping",""+$APP.T.g(b))},enumerable:!0,
15
- configurable:!0});Object.defineProperty(a,"radius",{get:function(){var b=this.getAttribute("radius");return MK(b,16,6,200)},set:function(b){return b==null?this.removeAttribute("radius"):this.setAttribute("radius",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"intensity",{get:function(){var b=this.getAttribute("intensity");return MK(b,1,0,5)},set:function(b){return b==null?this.removeAttribute("intensity"):this.setAttribute("intensity",""+$APP.T.g(b))},enumerable:!0,configurable:!0});
16
- Object.defineProperty(a,"grabRadius",{get:function(){var b=this.getAttribute("grab-radius");return MK(b,80,10,500)},set:function(b){return b==null?this.removeAttribute("grab-radius"):this.setAttribute("grab-radius",""+$APP.T.g(b))},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})},DL=function(){var a=
17
- class extends HTMLElement{};a.observedAttributes=CL;a.prototype.connectedCallback=function(){var b=this,c=VK(b);b.__xSoftBodyModel=c;$APP.n($APP.k(b,"__xSoftBodyRefs"))||SK(b);b.__xSoftBodyPA=!1;b.__xSoftBodyGrab=!1;b.__xSoftBodyPX=0;b.__xSoftBodyPY=0;c=new ResizeObserver(function(d){if(d.length>0){var e=d[0].contentRect;d=e.width;e=e.height;if(d>0&&e>0){b.__xSoftBodyW=d;b.__xSoftBodyH=e;var g=$APP.M($APP.k(b,"__xSoftBodyRefs"));$APP.D(g,$APP.mk).setAttribute("viewBox","0 0 "+$APP.T.g(d)+" "+$APP.T.g(e));
18
- WK(b,d,e);d=$APP.X.g($APP.k(b,"__xSoftBodyModel"));d=$APP.n(d)?d:PK();$APP.n(d)?YK(b):(XK(b),$K(b))}}return null});b.__xSoftBodyRO=c;c.observe(b);AL(b);fL(b);return null};a.prototype.disconnectedCallback=function(){dL(this);AL(this);var b=$APP.k(this,"__xSoftBodyRO");$APP.n(b)&&(b.disconnect(),this.__xSoftBodyRO=null);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&$APP.n($APP.k(this,"__xSoftBodyRefs"))&&(this.__xSoftBodyModel=b=VK(this),c=$APP.k(this,"__xSoftBodyW"),
19
- d=$APP.k(this,"__xSoftBodyH"),$APP.n($APP.n(c)?$APP.n(d)?c>0&&d>0:d:c)&&(WK(this,c,d),b=$APP.X.g(b),b=$APP.n(b)?b:PK(),$APP.n(b)?(dL(this),YK(this)):(XK(this),$K(this))));return null};BL(a.prototype);return a},EL=function(){$APP.n(customElements.get("x-soft-body"))||customElements.define("x-soft-body",DL());return null},UK=new $APP.K(null,"grab-radius","grab-radius",771838535),TK=new $APP.K(null,"grab-radius-raw","grab-radius-raw",-1019405976);var CL="stiffness damping radius intensity grab-radius disabled".split(" ");$APP.Pd(["x-soft-body-grab",new $APP.R(null,2,[$APP.V,$APP.Qd,$APP.jm,!1],null),"x-soft-body-release",new $APP.R(null,2,[$APP.V,$APP.Qd,$APP.jm,!1],null)]);var RK=":host{display:block;position:relative;background:none;overflow:visible;"+$APP.T.g("--x-soft-body-bg")+":var(--x-color-surface,#ffffff);"+$APP.T.g("--x-soft-body-border")+":var(--x-color-border,#e2e8f0);"+$APP.T.g("--x-soft-body-border-width")+":1.5;"+$APP.T.g("--x-soft-body-shadow")+":var(--x-shadow-sm,0 1px 3px rgba(0,0,0,0.1));"+$APP.T.g("--x-soft-body-padding")+":1rem;}[part\x3dsvg]{display:block;width:100%;height:100%;position:absolute;inset:0;overflow:visible;pointer-events:none;}[part\x3dshape]{fill:var("+
7
+ for(l=0;;)if(l<20)d[l]=b[l],e[l]=c[l],g[l]=0,h[l]=0,l+=1;else break;a.__xSoftBodyRX=b;a.__xSoftBodyRY=c;a.__xSoftBodyCX=d;a.__xSoftBodyCY=e;a.__xSoftBodyVX=g;a.__xSoftBodyVY=h},YK=function(a){var b=$APP.M($APP.k(a,"__xSoftBodyRefs"));b=$APP.D(b,$APP.Zk);var c=$APP.k(a,"__xSoftBodyCX");a=$APP.k(a,"__xSoftBodyCY");var d=[];d.push("M"+$APP.T.g(c[0].toFixed(2))+","+$APP.T.g(a[0].toFixed(2)));for(var e=0;;)if(e<20){var g=$APP.fd(e+19,20),h=e,l=$APP.fd(e+1,20),m=$APP.fd(e+2,20),p=(c[l]-c[g])/6,q=(a[l]-
8
+ a[g])/6;g=(c[m]-c[h])/6;m=(a[m]-a[h])/6;var v=c[l]-c[h],x=a[l]-a[h];x=Math.sqrt(v*v+x*x)*.4;v=Math.sqrt(p*p+q*q);v=v>x?x/(v+.001):1;q=a[h]+q*v;var y=Math.sqrt(g*g+m*m);x=y>x?x/(y+.001):1;g=c[l]-g*x;m=a[l]-m*x;d.push("C"+$APP.T.g((c[h]+p*v).toFixed(2))+","+$APP.T.g(q.toFixed(2))+" "+$APP.T.g(g.toFixed(2))+","+$APP.T.g(m.toFixed(2))+" "+$APP.T.g(c[l].toFixed(2))+","+$APP.T.g(a[l].toFixed(2)));e+=1}else break;d.push("Z");b.setAttribute("d",d.join(""))},ZK=function(a){var b=$APP.M($APP.k(a,"__xSoftBodyRefs"));
9
+ b=$APP.D(b,$APP.Zk);var c=$APP.k(a,"__xSoftBodyW"),d=$APP.k(a,"__xSoftBodyH");a=$APP.Tm.g($APP.k(a,"__xSoftBodyModel"));a=Math.max(6,Math.min(a,Math.min(c,d)/2));var e=.5522847498*a;c="M"+$APP.T.g(a.toFixed(2))+",0L"+$APP.T.g((c-a).toFixed(2))+",0C"+$APP.T.g((c-a+e).toFixed(2))+",0 "+$APP.T.g(c.toFixed(2))+","+$APP.T.g((a-e).toFixed(2))+" "+$APP.T.g(c.toFixed(2))+","+$APP.T.g(a.toFixed(2))+"L"+$APP.T.g(c.toFixed(2))+","+$APP.T.g((d-a).toFixed(2))+"C"+$APP.T.g(c.toFixed(2))+","+$APP.T.g((d-a+e).toFixed(2))+
10
+ " "+$APP.T.g((c-a+e).toFixed(2))+","+$APP.T.g(d.toFixed(2))+" "+$APP.T.g((c-a).toFixed(2))+","+$APP.T.g(d.toFixed(2))+"L"+$APP.T.g(a.toFixed(2))+","+$APP.T.g(d.toFixed(2))+"C"+$APP.T.g((a-e).toFixed(2))+","+$APP.T.g(d.toFixed(2))+" 0,"+$APP.T.g((d-a+e).toFixed(2))+" 0,"+$APP.T.g((d-a).toFixed(2))+"L0,"+$APP.T.g(a.toFixed(2))+"C0,"+$APP.T.g((a-e).toFixed(2))+" "+$APP.T.g((a-e).toFixed(2))+",0 "+$APP.T.g(a.toFixed(2))+",0Z";b.setAttribute("d",c)},aL=function(a){$APP.n($APP.k(a,"__xSoftBodyRaf"))||($APP.ja(a,
11
+ "__xSoftBodyLF",performance.now()),$APP.ja(a,"__xSoftBodyRaf",requestAnimationFrame(function(){return $K(a)})))},eL=function(a){var b=$APP.k(a,"__xSoftBodyRaf");$APP.n(b)&&(cancelAnimationFrame(b),a.__xSoftBodyRaf=null)},fL=function(a,b){var c=$APP.M($APP.k(a,"__xSoftBodyRefs"));c=$APP.D(c,$APP.mk).getBoundingClientRect();a.__xSoftBodyPX=b.clientX-c.left;a.__xSoftBodyPY=b.clientY-c.top;return null},gL=function(a){function b(){a.__xSoftBodyGrab=!1;a.dispatchEvent(new CustomEvent("x-soft-body-release",
12
+ {bubbles:!0,composed:!0,detail:{}}));return null}function c(h){a.__xSoftBodyGrab=!0;fL(a,h);a.dispatchEvent(new CustomEvent("x-soft-body-grab",{bubbles:!0,composed:!0,detail:{}}));return null}function d(){a.__xSoftBodyPA=!1;a.__xSoftBodyGrab=!1;return null}function e(){a.__xSoftBodyPA=!0;var h=$APP.X.g($APP.k(a,"__xSoftBodyModel"));h=$APP.n(h)?h:QK();$APP.n(h)||aL(a);return null}function g(h){return fL(a,h)}$APP.ja(a,"__xSoftBodyHdl",{move:g,enter:e,leave:d,down:c,up:b});a.addEventListener("pointermove",
13
+ g,{passive:!0});a.addEventListener("pointerenter",e);a.addEventListener("pointerleave",d);a.addEventListener("pointerdown",c);a.addEventListener("pointerup",b)},BL=function(a){var b=$APP.k(a,"__xSoftBodyHdl");$APP.n(b)&&(a.removeEventListener("pointermove",$APP.k(b,"move")),a.removeEventListener("pointerenter",$APP.k(b,"enter")),a.removeEventListener("pointerleave",$APP.k(b,"leave")),a.removeEventListener("pointerdown",$APP.k(b,"down")),a.removeEventListener("pointerup",$APP.k(b,"up")),a.__xSoftBodyHdl=
14
+ null)},CL=function(a){Object.defineProperty(a,"stiffness",{get:function(){var b=this.getAttribute("stiffness");return NK(b,180,10,1E3)},set:function(b){return b==null?this.removeAttribute("stiffness"):this.setAttribute("stiffness",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"damping",{get:function(){var b=this.getAttribute("damping");return NK(b,12,1,100)},set:function(b){return b==null?this.removeAttribute("damping"):this.setAttribute("damping",""+$APP.T.g(b))},enumerable:!0,
15
+ configurable:!0});Object.defineProperty(a,"radius",{get:function(){var b=this.getAttribute("radius");return NK(b,16,6,200)},set:function(b){return b==null?this.removeAttribute("radius"):this.setAttribute("radius",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"intensity",{get:function(){var b=this.getAttribute("intensity");return NK(b,1,0,5)},set:function(b){return b==null?this.removeAttribute("intensity"):this.setAttribute("intensity",""+$APP.T.g(b))},enumerable:!0,configurable:!0});
16
+ Object.defineProperty(a,"grabRadius",{get:function(){var b=this.getAttribute("grab-radius");return NK(b,80,10,500)},set:function(b){return b==null?this.removeAttribute("grab-radius"):this.setAttribute("grab-radius",""+$APP.T.g(b))},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})},EL=function(){var a=
17
+ class extends HTMLElement{};a.observedAttributes=DL;a.prototype.connectedCallback=function(){var b=this,c=WK(b);b.__xSoftBodyModel=c;$APP.n($APP.k(b,"__xSoftBodyRefs"))||TK(b);b.__xSoftBodyPA=!1;b.__xSoftBodyGrab=!1;b.__xSoftBodyPX=0;b.__xSoftBodyPY=0;c=new ResizeObserver(function(d){if(d.length>0){var e=d[0].contentRect;d=e.width;e=e.height;if(d>0&&e>0){b.__xSoftBodyW=d;b.__xSoftBodyH=e;var g=$APP.M($APP.k(b,"__xSoftBodyRefs"));$APP.D(g,$APP.mk).setAttribute("viewBox","0 0 "+$APP.T.g(d)+" "+$APP.T.g(e));
18
+ XK(b,d,e);d=$APP.X.g($APP.k(b,"__xSoftBodyModel"));d=$APP.n(d)?d:QK();$APP.n(d)?ZK(b):(YK(b),aL(b))}}return null});b.__xSoftBodyRO=c;c.observe(b);BL(b);gL(b);return null};a.prototype.disconnectedCallback=function(){eL(this);BL(this);var b=$APP.k(this,"__xSoftBodyRO");$APP.n(b)&&(b.disconnect(),this.__xSoftBodyRO=null);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&$APP.n($APP.k(this,"__xSoftBodyRefs"))&&(this.__xSoftBodyModel=b=WK(this),c=$APP.k(this,"__xSoftBodyW"),
19
+ d=$APP.k(this,"__xSoftBodyH"),$APP.n($APP.n(c)?$APP.n(d)?c>0&&d>0:d:c)&&(XK(this,c,d),b=$APP.X.g(b),b=$APP.n(b)?b:QK(),$APP.n(b)?(eL(this),ZK(this)):(YK(this),aL(this))));return null};CL(a.prototype);return a},FL=function(){$APP.n(customElements.get("x-soft-body"))||customElements.define("x-soft-body",EL());return null},VK=new $APP.K(null,"grab-radius","grab-radius",771838535),UK=new $APP.K(null,"grab-radius-raw","grab-radius-raw",-1019405976);var DL="stiffness damping radius intensity grab-radius disabled".split(" ");$APP.Pd(["x-soft-body-grab",new $APP.Q(null,2,[$APP.V,$APP.Qd,$APP.lm,!1],null),"x-soft-body-release",new $APP.Q(null,2,[$APP.V,$APP.Qd,$APP.lm,!1],null)]);var SK=":host{display:block;position:relative;background:none;overflow:visible;"+$APP.T.g("--x-soft-body-bg")+":var(--x-color-surface,#ffffff);"+$APP.T.g("--x-soft-body-border")+":var(--x-color-border,#e2e8f0);"+$APP.T.g("--x-soft-body-border-width")+":1.5;"+$APP.T.g("--x-soft-body-shadow")+":var(--x-shadow-sm,0 1px 3px rgba(0,0,0,0.1));"+$APP.T.g("--x-soft-body-padding")+":1rem;}[part\x3dsvg]{display:block;width:100%;height:100%;position:absolute;inset:0;overflow:visible;pointer-events:none;}[part\x3dshape]{fill:var("+
20
20
  $APP.T.g("--x-soft-body-bg")+",#ffffff);stroke:var("+$APP.T.g("--x-soft-body-border")+",#e2e8f0);stroke-width:var("+$APP.T.g("--x-soft-body-border-width")+",1.5);filter:drop-shadow(var("+$APP.T.g("--x-soft-body-shadow")+",0 1px 3px rgba(0,0,0,0.1)));}[part\x3dcontent]{position:relative;background:none;padding:var("+$APP.T.g("--x-soft-body-padding")+",1rem);z-index:1;}@media(prefers-color-scheme:dark){:host{"+$APP.T.g("--x-soft-body-bg")+":var(--x-color-surface,#1e293b);"+$APP.T.g("--x-soft-body-border")+
21
- ":var(--x-color-border,#475569);"+$APP.T.g("--x-soft-body-shadow")+":var(--x-shadow-sm,0 1px 3px rgba(0,0,0,0.3));}}@media(prefers-reduced-motion:reduce){[part\x3dshape]{transition:none!important;}}",ZK=function ZK(a){if($APP.n(a.isConnected)){var c=$APP.k(a,"__xSoftBodyModel"),d=performance.now(),e=Math.min(d-$APP.k(a,"__xSoftBodyLF"),100)/1E3,g=$APP.Rl.g(c),h=$APP.Pk.g(c),l=$APP.xk.g(c),m=UK.g(c);c=$APP.k(a,"__xSoftBodyRX");var p=$APP.k(a,"__xSoftBodyRY"),q=$APP.k(a,"__xSoftBodyCX"),v=$APP.k(a,
22
- "__xSoftBodyCY"),x=$APP.k(a,"__xSoftBodyVX"),y=$APP.k(a,"__xSoftBodyVY"),A=$APP.k(a,"__xSoftBodyPA"),C=$APP.k(a,"__xSoftBodyPX"),E=$APP.k(a,"__xSoftBodyPY"),H=$APP.k(a,"__xSoftBodyGrab");a.__xSoftBodyLF=d;for(d=0;;)if(d<20){var G=c[d],J=p[d],Q=$APP.n(A)?OK(G,J,C,E,m,l,H):[0,0];G=NK(q[d],G+Q[0],x[d],e,g,h);J=NK(v[d],J+Q[1],y[d],e,g,h);q[d]=G[0];x[d]=G[1];v[d]=J[0];y[d]=J[1];d+=1}else break;XK(a);if($APP.n($APP.n(A)?A:!QK(x,y)))$APP.ja(a,"__xSoftBodyRaf",requestAnimationFrame(function(){return ZK.g?
23
- ZK.g(a):ZK.call(null,a)}));else{for(e=0;;)if(e<20)q[e]=c[e],v[e]=p[e],e+=1;else break;XK(a);a.__xSoftBodyRaf=null}}return null};$APP.ha("baredom.exports.x_soft_body.init",EL);export const init=EL;
21
+ ":var(--x-color-border,#475569);"+$APP.T.g("--x-soft-body-shadow")+":var(--x-shadow-sm,0 1px 3px rgba(0,0,0,0.3));}}@media(prefers-reduced-motion:reduce){[part\x3dshape]{transition:none!important;}}",$K=function $K(a){if($APP.n(a.isConnected)){var c=$APP.k(a,"__xSoftBodyModel"),d=performance.now(),e=Math.min(d-$APP.k(a,"__xSoftBodyLF"),100)/1E3,g=$APP.Tl.g(c),h=$APP.Pk.g(c),l=$APP.xk.g(c),m=VK.g(c);c=$APP.k(a,"__xSoftBodyRX");var p=$APP.k(a,"__xSoftBodyRY"),q=$APP.k(a,"__xSoftBodyCX"),v=$APP.k(a,
22
+ "__xSoftBodyCY"),x=$APP.k(a,"__xSoftBodyVX"),y=$APP.k(a,"__xSoftBodyVY"),A=$APP.k(a,"__xSoftBodyPA"),C=$APP.k(a,"__xSoftBodyPX"),E=$APP.k(a,"__xSoftBodyPY"),H=$APP.k(a,"__xSoftBodyGrab");a.__xSoftBodyLF=d;for(d=0;;)if(d<20){var G=c[d],J=p[d],R=$APP.n(A)?PK(G,J,C,E,m,l,H):[0,0];G=OK(q[d],G+R[0],x[d],e,g,h);J=OK(v[d],J+R[1],y[d],e,g,h);q[d]=G[0];x[d]=G[1];v[d]=J[0];y[d]=J[1];d+=1}else break;YK(a);if($APP.n($APP.n(A)?A:!RK(x,y)))$APP.ja(a,"__xSoftBodyRaf",requestAnimationFrame(function(){return $K.g?
23
+ $K.g(a):$K.call(null,a)}));else{for(e=0;;)if(e<20)q[e]=c[e],v[e]=p[e],e+=1;else break;YK(a);a.__xSoftBodyRaf=null}}return null};$APP.ha("baredom.exports.x_soft_body.init",FL);export const init=FL;
@@ -0,0 +1,15 @@
1
+ // x-spacer.d.ts — auto-generated by generate_types.bb, do not edit
2
+
3
+ export function init(): void;
4
+
5
+ export interface XSpacer extends HTMLElement {
6
+ size: string;
7
+ axis: string;
8
+ grow: boolean;
9
+ }
10
+
11
+ declare global {
12
+ interface HTMLElementTagNameMap {
13
+ "x-spacer": XSpacer;
14
+ }
15
+ }
package/dist/x-spacer.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var sO=function(a){return a!=null&&$APP.N((""+$APP.T.g(a)).trim().toLowerCase(),"false")},yO=function(a){var b=new $APP.R(null,3,[$APP.Ul,a.getAttribute("size"),tO,a.getAttribute("axis"),uO,a.getAttribute("grow")],null);b=$APP.M(b);var c=$APP.D(b,$APP.Ul),d=$APP.D(b,tO);b=$APP.D(b,uO);c=typeof c==="string"&&c.trim().length>0?c.trim():"1rem";d=typeof d==="string"?d.trim().toLowerCase():null;d=$APP.I(vO,d)?d:"vertical";b=new $APP.R(null,3,[$APP.Mh,c,wO,d,xO,sO(b)],null);c=$APP.M(b);b=$APP.D(c,$APP.Mh);
3
- d=$APP.D(c,wO);c=$APP.D(c,xO);var e=a.style;a.setAttribute("data-axis",d);a.setAttribute("data-grow",$APP.n(c)?"true":"false");e.setProperty("--x-spacer-size",b);a.setAttribute("role","none");a.setAttribute("aria-hidden","true")},zO=function(a,b,c){Object.defineProperty(a,b,{get:function(){var d=this.getAttribute(b);return $APP.n(d)?d:c},set:function(d){return d!=null?this.setAttribute(b,""+$APP.T.g(d)):this.removeAttribute(b)},enumerable:!0,configurable:!0})},AO=function(a){Object.defineProperty(a,
4
- "grow",{get:function(){return sO(this.getAttribute("grow"))},set:function(b){return $APP.n(b)?this.setAttribute("grow",""):this.removeAttribute("grow")},enumerable:!0,configurable:!0})},BO=function(a){zO(a,"size","1rem");zO(a,"axis","vertical");AO(a)},DO=function(){var a=class extends HTMLElement{};a.observedAttributes=CO;a.prototype.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xSpacerRefs"))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style");c.textContent=":host{display:block;flex-shrink:0;height:var(--x-spacer-size,1rem);width:0;pointer-events:none;}:host([data-axis\x3d'horizontal']){height:0;width:var(--x-spacer-size,1rem);}:host([data-grow\x3d'true']){flex:1 0 var(--x-spacer-size,0px);height:0;width:0;}";
5
- b.appendChild(c);this.__xSpacerRefs={root:b}}yO(this);return null};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=function(b,c,d){b=$APP.N(c,d);$APP.n(b?$APP.k(this,"__xSpacerRefs"):b)&&yO(this);return null};BO(a.prototype);return a},EO=function(){$APP.n(customElements.get("x-spacer"))||customElements.define("x-spacer",DO());return null},wO=new $APP.K(null,"axis","axis",-1215390822),xO=new $APP.K(null,"grow?","grow?",2124334580),uO=new $APP.K(null,"grow-raw",
6
- "grow-raw",441172903),tO=new $APP.K(null,"axis-raw","axis-raw",291213231);var CO=["size","axis","grow"],vO=new $APP.S(null,new $APP.R(null,2,["vertical",null,"horizontal",null],null),null);$APP.ha("baredom.exports.x_spacer.init",EO);export const init=EO;
2
+ var uO=function(a){return a!=null&&$APP.N((""+$APP.T.g(a)).trim().toLowerCase(),"false")},AO=function(a){var b=new $APP.Q(null,3,[$APP.Wl,a.getAttribute("size"),vO,a.getAttribute("axis"),wO,a.getAttribute("grow")],null);b=$APP.M(b);var c=$APP.D(b,$APP.Wl),d=$APP.D(b,vO);b=$APP.D(b,wO);c=typeof c==="string"&&c.trim().length>0?c.trim():"1rem";d=typeof d==="string"?d.trim().toLowerCase():null;d=$APP.I(xO,d)?d:"vertical";b=new $APP.Q(null,3,[$APP.Mh,c,yO,d,zO,uO(b)],null);c=$APP.M(b);b=$APP.D(c,$APP.Mh);
3
+ d=$APP.D(c,yO);c=$APP.D(c,zO);var e=a.style;a.setAttribute("data-axis",d);a.setAttribute("data-grow",$APP.n(c)?"true":"false");e.setProperty("--x-spacer-size",b);a.setAttribute("role","none");a.setAttribute("aria-hidden","true")},BO=function(a,b,c){Object.defineProperty(a,b,{get:function(){var d=this.getAttribute(b);return $APP.n(d)?d:c},set:function(d){return d!=null?this.setAttribute(b,""+$APP.T.g(d)):this.removeAttribute(b)},enumerable:!0,configurable:!0})},CO=function(a){Object.defineProperty(a,
4
+ "grow",{get:function(){return uO(this.getAttribute("grow"))},set:function(b){return $APP.n(b)?this.setAttribute("grow",""):this.removeAttribute("grow")},enumerable:!0,configurable:!0})},DO=function(a){BO(a,"size","1rem");BO(a,"axis","vertical");CO(a)},FO=function(){var a=class extends HTMLElement{};a.observedAttributes=EO;a.prototype.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xSpacerRefs"))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style");c.textContent=":host{display:block;flex-shrink:0;height:var(--x-spacer-size,1rem);width:0;pointer-events:none;}:host([data-axis\x3d'horizontal']){height:0;width:var(--x-spacer-size,1rem);}:host([data-grow\x3d'true']){flex:1 0 var(--x-spacer-size,0px);height:0;width:0;}";
5
+ b.appendChild(c);this.__xSpacerRefs={root:b}}AO(this);return null};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=function(b,c,d){b=$APP.N(c,d);$APP.n(b?$APP.k(this,"__xSpacerRefs"):b)&&AO(this);return null};DO(a.prototype);return a},GO=function(){$APP.n(customElements.get("x-spacer"))||customElements.define("x-spacer",FO());return null},yO=new $APP.K(null,"axis","axis",-1215390822),zO=new $APP.K(null,"grow?","grow?",2124334580),wO=new $APP.K(null,"grow-raw",
6
+ "grow-raw",441172903),vO=new $APP.K(null,"axis-raw","axis-raw",291213231);var EO=["size","axis","grow"],xO=new $APP.S(null,new $APP.Q(null,2,["vertical",null,"horizontal",null],null),null);$APP.ha("baredom.exports.x_spacer.init",GO);export const init=GO;
@@ -0,0 +1,15 @@
1
+ // x-spinner.d.ts — auto-generated by generate_types.bb, do not edit
2
+
3
+ export function init(): void;
4
+
5
+ export interface XSpinner extends HTMLElement {
6
+ size: string;
7
+ variant: string;
8
+ label: string;
9
+ }
10
+
11
+ declare global {
12
+ interface HTMLElementTagNameMap {
13
+ "x-spinner": XSpinner;
14
+ }
15
+ }
package/dist/x-spinner.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var M3=function(a){var b=new $APP.R(null,3,[$APP.Mh,a.getAttribute("size"),$APP.Vg,a.getAttribute("variant"),$APP.U,a.getAttribute("label")],null);var c=$APP.M(b),d=$APP.D(c,$APP.Mh);b=$APP.D(c,$APP.Vg);c=$APP.D(c,$APP.U);d=typeof d==="string"&&$APP.I(K3,d)?d:"md";b=typeof b==="string"&&$APP.I(L3,b)?b:"default";c=typeof c==="string"&&$APP.N("",c.trim())?c.trim():"Loading";d=$APP.M(new $APP.R(null,3,[$APP.Mh,d,$APP.Vg,b,$APP.U,c],null));b=$APP.D(d,$APP.Mh);c=$APP.D(d,$APP.Vg);d=$APP.D(d,$APP.U);a.setAttribute("data-size",
3
- b);a.setAttribute("data-variant",c);a.setAttribute("aria-label",d)},N3=function(a){Object.defineProperty(a,"size",{get:function(){var b=this.getAttribute("size");return $APP.n(b)?b:"md"},set:function(b){return $APP.n(b)?this.setAttribute("size",""+$APP.T.g(b)):this.removeAttribute("size")},enumerable:!0,configurable:!0});Object.defineProperty(a,"variant",{get:function(){var b=this.getAttribute("variant");return $APP.n(b)?b:"default"},set:function(b){return $APP.n(b)?this.setAttribute("variant",""+
4
- $APP.T.g(b)):this.removeAttribute("variant")},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.n(b)?b:"Loading"},set:function(b){return $APP.n(b)?this.setAttribute("label",""+$APP.T.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0})},P3=function(){var a=class extends HTMLElement{};a.observedAttributes=O3;a.prototype.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xSpinnerInit"))){var b=this.attachShadow({mode:"open"}),
2
+ var Q3=function(a){var b=new $APP.Q(null,3,[$APP.Mh,a.getAttribute("size"),$APP.Vg,a.getAttribute("variant"),$APP.U,a.getAttribute("label")],null);var c=$APP.M(b),d=$APP.D(c,$APP.Mh);b=$APP.D(c,$APP.Vg);c=$APP.D(c,$APP.U);d=typeof d==="string"&&$APP.I(O3,d)?d:"md";b=typeof b==="string"&&$APP.I(P3,b)?b:"default";c=typeof c==="string"&&$APP.N("",c.trim())?c.trim():"Loading";d=$APP.M(new $APP.Q(null,3,[$APP.Mh,d,$APP.Vg,b,$APP.U,c],null));b=$APP.D(d,$APP.Mh);c=$APP.D(d,$APP.Vg);d=$APP.D(d,$APP.U);a.setAttribute("data-size",
3
+ b);a.setAttribute("data-variant",c);a.setAttribute("aria-label",d)},R3=function(a){Object.defineProperty(a,"size",{get:function(){var b=this.getAttribute("size");return $APP.n(b)?b:"md"},set:function(b){return $APP.n(b)?this.setAttribute("size",""+$APP.T.g(b)):this.removeAttribute("size")},enumerable:!0,configurable:!0});Object.defineProperty(a,"variant",{get:function(){var b=this.getAttribute("variant");return $APP.n(b)?b:"default"},set:function(b){return $APP.n(b)?this.setAttribute("variant",""+
4
+ $APP.T.g(b)):this.removeAttribute("variant")},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.n(b)?b:"Loading"},set:function(b){return $APP.n(b)?this.setAttribute("label",""+$APP.T.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0})},T3=function(){var a=class extends HTMLElement{};a.observedAttributes=S3;a.prototype.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xSpinnerInit"))){var b=this.attachShadow({mode:"open"}),
5
5
  c=document.createElement("style"),d=document.createElement("span");c.textContent=":host{display:inline-flex;align-items:center;justify-content:center;color-scheme:light dark;--x-spinner-size:24px;--x-spinner-color:currentColor;--x-spinner-track-color:rgba(0,0,0,0.12);--x-spinner-thickness:2px;--x-spinner-duration:0.75s;}@media (prefers-color-scheme:dark){:host{--x-spinner-track-color:rgba(255,255,255,0.15);}}:host([data-size\x3d'xs']){--x-spinner-size:16px;}:host([data-size\x3d'sm']){--x-spinner-size:20px;}:host([data-size\x3d'md']){--x-spinner-size:24px;}:host([data-size\x3d'lg']){--x-spinner-size:32px;}:host([data-size\x3d'xl']){--x-spinner-size:48px;}:host([data-variant\x3d'primary']){--x-spinner-color:var(--x-color-primary,#3b82f6);}:host([data-variant\x3d'success']){--x-spinner-color:var(--x-color-success,#22c55e);}:host([data-variant\x3d'warning']){--x-spinner-color:var(--x-color-warning,#f59e0b);}:host([data-variant\x3d'danger']){--x-spinner-color:var(--x-color-danger,#ef4444);}[part\x3dring]{display:block;width:var(--x-spinner-size);height:var(--x-spinner-size);border-radius:50%;border:var(--x-spinner-thickness) solid var(--x-spinner-track-color);border-top-color:var(--x-spinner-color);box-sizing:border-box;animation:x-spinner-spin var(--x-spinner-duration) linear infinite;}@keyframes x-spinner-spin{to{transform:rotate(360deg);}}@media (prefers-reduced-motion:reduce){[part\x3dring]{animation-play-state:paused;}}";
6
- d.setAttribute("part","ring");d.setAttribute("aria-hidden","true");b.appendChild(c);b.appendChild(d);this.setAttribute("role","status");this.setAttribute("aria-live","polite");this.__xSpinnerRing=d;this.__xSpinnerInit=!0}M3(this);return null};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=function(b,c,d){b=$APP.N(c,d);$APP.n(b?$APP.k(this,"__xSpinnerInit"):b)&&M3(this);return null};N3(a.prototype);return a},Q3=function(){$APP.n(customElements.get("x-spinner"))||
7
- customElements.define("x-spinner",P3());return null};var O3=["size","variant","label"],K3=new $APP.S(null,new $APP.R(null,5,["xs",null,"md",null,"lg",null,"xl",null,"sm",null],null),null),L3=new $APP.S(null,new $APP.R(null,5,["success",null,"warning",null,"primary",null,"danger",null,"default",null],null),null);$APP.ha("baredom.exports.x_spinner.init",Q3);export const init=Q3;
6
+ d.setAttribute("part","ring");d.setAttribute("aria-hidden","true");b.appendChild(c);b.appendChild(d);this.setAttribute("role","status");this.setAttribute("aria-live","polite");this.__xSpinnerRing=d;this.__xSpinnerInit=!0}Q3(this);return null};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=function(b,c,d){b=$APP.N(c,d);$APP.n(b?$APP.k(this,"__xSpinnerInit"):b)&&Q3(this);return null};R3(a.prototype);return a},U3=function(){$APP.n(customElements.get("x-spinner"))||
7
+ customElements.define("x-spinner",T3());return null};var S3=["size","variant","label"],O3=new $APP.S(null,new $APP.Q(null,5,["xs",null,"md",null,"lg",null,"xl",null,"sm",null],null),null),P3=new $APP.S(null,new $APP.Q(null,5,["success",null,"warning",null,"primary",null,"danger",null,"default",null],null),null);$APP.ha("baredom.exports.x_spinner.init",U3);export const init=U3;
@@ -0,0 +1,42 @@
1
+ // x-splash.d.ts — auto-generated by generate_types.bb, do not edit
2
+
3
+ export function init(): void;
4
+
5
+ export interface XSplashEventMap {
6
+ "x-splash-hidden": CustomEvent<{}>;
7
+ }
8
+
9
+ export interface XSplash extends HTMLElement {
10
+ active: boolean;
11
+ variant: string;
12
+ progress: number;
13
+ spinner: boolean;
14
+ overlay: string;
15
+
16
+ addEventListener<K extends keyof XSplashEventMap>(
17
+ type: K,
18
+ listener: (this: XSplash, ev: XSplashEventMap[K]) => any,
19
+ options?: boolean | AddEventListenerOptions
20
+ ): void;
21
+ addEventListener(
22
+ type: string,
23
+ listener: EventListenerOrEventListenerObject,
24
+ options?: boolean | AddEventListenerOptions
25
+ ): void;
26
+ removeEventListener<K extends keyof XSplashEventMap>(
27
+ type: K,
28
+ listener: (this: XSplash, ev: XSplashEventMap[K]) => any,
29
+ options?: boolean | EventListenerOptions
30
+ ): void;
31
+ removeEventListener(
32
+ type: string,
33
+ listener: EventListenerOrEventListenerObject,
34
+ options?: boolean | EventListenerOptions
35
+ ): void;
36
+ }
37
+
38
+ declare global {
39
+ interface HTMLElementTagNameMap {
40
+ "x-splash": XSplash;
41
+ }
42
+ }
package/dist/x-splash.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var LQ=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.n(isNaN(a))?null:$APP.oh.i(0,$APP.sh.i(100,a))):null},MQ=function(a){return a==null?!0:$APP.N((""+$APP.T.g(a)).trim().toLowerCase(),"false")},RQ=function(a){var b=$APP.k(a,"__xSplashRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("slot"),h=document.createElement("span"),l=document.createElement("div"),
2
+ var OQ=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.n(isNaN(a))?null:$APP.oh.i(0,$APP.ph.i(100,a))):null},PQ=function(a){return a==null?!0:$APP.N((""+$APP.T.g(a)).trim().toLowerCase(),"false")},UQ=function(a){var b=$APP.k(a,"__xSplashRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("slot"),h=document.createElement("span"),l=document.createElement("div"),
3
3
  m=document.createElement("div");c.textContent=":host{display:block;color-scheme:light dark;--x-splash-bg:var(--x-color-bg, #ffffff);--x-splash-color:var(--x-color-text, #0f172a);--x-splash-z-index:9999;--x-splash-fade-duration:var(--x-transition-duration, 400ms);--x-splash-fade-ease:cubic-bezier(0.4,0,0.2,1);--x-splash-spinner-size:40px;--x-splash-spinner-color:var(--x-color-text, currentColor);--x-splash-spinner-track-color:var(--x-color-border, rgba(0,0,0,0.12));--x-splash-spinner-thickness:3px;--x-splash-spinner-duration:0.75s;--x-splash-progress-height:4px;--x-splash-progress-color:var(--x-color-primary, #3b82f6);--x-splash-progress-track-color:var(--x-color-border, rgba(0,0,0,0.08));--x-splash-progress-radius:var(--x-radius-sm, 2px);--x-splash-gap:20px;--x-splash-blur-amount:8px;}@media (prefers-color-scheme:dark){:host{--x-splash-bg:var(--x-color-bg, #0f172a);--x-splash-color:var(--x-color-text, #f8fafc);--x-splash-spinner-track-color:var(--x-color-border, rgba(255,255,255,0.15));--x-splash-progress-track-color:var(--x-color-border, rgba(255,255,255,0.12));}}[part\x3doverlay]{position:fixed;inset:0;z-index:var(--x-splash-z-index);display:none;align-items:center;justify-content:center;background:var(--x-splash-bg);color:var(--x-splash-color);opacity:0;transition:opacity var(--x-splash-fade-duration) var(--x-splash-fade-ease);}:host([active]) [part\x3doverlay]{display:flex;opacity:1;}:host([data-fading-out]) [part\x3doverlay]{display:flex;opacity:0;}:host([data-variant\x3d'minimal']) [part\x3doverlay]{background:transparent;}:host([data-variant\x3d'branded']) [part\x3doverlay]{background:var(--x-splash-branded-bg,var(--x-splash-bg));}:host([data-overlay\x3d'blur']) [part\x3doverlay]{background:rgba(255,255,255,0.7);backdrop-filter:blur(var(--x-splash-blur-amount));-webkit-backdrop-filter:blur(var(--x-splash-blur-amount));}@media (prefers-color-scheme:dark){:host([data-overlay\x3d'blur']) [part\x3doverlay]{background:rgba(15,23,42,0.7);}}:host([data-overlay\x3d'transparent']) [part\x3doverlay]{background:transparent;}[part\x3dcontent]{display:flex;flex-direction:column;align-items:center;gap:var(--x-splash-gap);max-width:80vw;text-align:center;}[part\x3dspinner]{display:block;width:var(--x-splash-spinner-size);height:var(--x-splash-spinner-size);border:var(--x-splash-spinner-thickness) solid var(--x-splash-spinner-track-color);border-top-color:var(--x-splash-spinner-color);border-radius:50%;animation:x-splash-spin var(--x-splash-spinner-duration) linear infinite;box-sizing:border-box;}@keyframes x-splash-spin{to{transform:rotate(360deg);}}[part\x3dprogress]{display:none;width:min(300px,60vw);height:var(--x-splash-progress-height);background:var(--x-splash-progress-track-color);border-radius:var(--x-splash-progress-radius);overflow:hidden;}[part\x3dbar]{height:100%;background:var(--x-splash-progress-color);border-radius:var(--x-splash-progress-radius);transition:width 200ms ease;width:0%;}@media (prefers-reduced-motion:reduce){[part\x3doverlay]{transition:none !important;}[part\x3dspinner]{animation:none !important;}[part\x3dbar]{transition:none !important;}}";
4
- d.setAttribute("part","overlay");e.setAttribute("part","content");h.setAttribute("part","spinner");h.setAttribute("aria-hidden","true");l.setAttribute("part","progress");l.setAttribute("role","progressbar");l.setAttribute("aria-valuemin","0");l.setAttribute("aria-valuemax","100");m.setAttribute("part","bar");l.appendChild(m);e.appendChild(g);e.appendChild(h);e.appendChild(l);d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xSplashRefs=new $APP.R(null,6,[$APP.Hi,b,NQ,d,OQ,e,PQ,h,$APP.jj,l,QQ,
5
- m],null);return $APP.k(a,"__xSplashRefs")},SQ=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*a))):0},TQ=function(a){a=window.getComputedStyle(a);a=SQ(a.getPropertyValue("--x-splash-fade-duration"));return a>0?a:
6
- 400},UQ=function(a){var b=$APP.k(a,"__xSplashFadeTimer");$APP.n(b)&&(clearTimeout(b),a.__xSplashFadeTimer=null)},VQ=function(a){UQ(a);a.__xSplashFadingOut=!1;a.removeAttribute("data-fading-out");var b=RQ(a);b=$APP.M(b);$APP.D(b,NQ).style.display="none";a.removeAttribute("aria-busy");b=new CustomEvent("x-splash-hidden",{detail:{},bubbles:!0,composed:!0,cancelable:!1});a.dispatchEvent(b);return null},WQ=function(a){if(!$APP.n($APP.k(a,"__xSplashFadingOut")))if(a.__xSplashFadingOut=!0,$APP.F(window.matchMedia("(prefers-reduced-motion:reduce)").matches))VQ(a);
7
- else{var b=RQ(a);b=$APP.M(b);var c=$APP.D(b,NQ),d=function h(g){return $APP.B.i(g.target,c)&&$APP.B.i(g.propertyName,"opacity")?(c.removeEventListener("transitionend",h),$APP.n($APP.k(a,"__xSplashFadingOut"))?VQ(a):null):null};c.style.display="flex";c.style.opacity="1";a.setAttribute("data-fading-out","");c.addEventListener("transitionend",d);requestAnimationFrame(function(){return requestAnimationFrame(function(){return $APP.n($APP.k(a,"__xSplashFadingOut"))?c.style.opacity="0":null})});$APP.ja(a,
8
- "__xSplashFadeTimer",setTimeout(function(){return $APP.n($APP.k(a,"__xSplashFadingOut"))?(c.removeEventListener("transitionend",d),VQ(a)):null},TQ(a)+60))}},eR=function(a){var b=new $APP.R(null,5,[XQ,a.hasAttribute("active"),$APP.sl,a.getAttribute("variant"),$APP.fk,a.getAttribute("progress"),YQ,a.getAttribute("spinner"),ZQ,a.getAttribute("overlay")],null);var c=$APP.M(b);b=$APP.D(c,XQ);var d=$APP.D(c,$APP.sl),e=$APP.D(c,$APP.fk),g=$APP.D(c,YQ);c=$APP.D(c,ZQ);b=$APP.F(b);d=typeof d==="string"?d.trim().toLowerCase():
9
- null;d=$APP.I($Q,d)?d:"default";e=LQ(e);g=MQ(g);c=typeof c==="string"?c.trim().toLowerCase():null;c=$APP.I(aR,c)?c:"solid";b=new $APP.R(null,5,[bR,b,$APP.Vg,d,$APP.am,e,cR,g,dR,c],null);if($APP.N($APP.k(a,"__xSplashModel"),b)){b=$APP.M(b);c=$APP.D(b,bR);e=$APP.D(b,$APP.Vg);d=$APP.D(b,$APP.am);var h=$APP.D(b,cR),l=$APP.D(b,dR);g=RQ(a);var m=$APP.M(g);g=$APP.D(m,NQ);var p=$APP.D(m,PQ),q=$APP.D(m,$APP.jj),v=$APP.D(m,QQ);m=$APP.k(a,"__xSplashModel");var x=bR.g(m);a.setAttribute("data-variant",e);a.setAttribute("data-overlay",
10
- l);p.style.display=$APP.n(h)?"block":"none";d!=null?(q.style.display="block",v.style.width=""+$APP.T.g(d)+"%",q.setAttribute("aria-valuenow",""+$APP.T.g(d))):(q.style.display="none",q.removeAttribute("aria-valuenow"));$APP.n($APP.n(c)?$APP.r(x):c)?($APP.n($APP.k(a,"__xSplashFadingOut"))&&(UQ(a),a.__xSplashFadingOut=!1,a.removeAttribute("data-fading-out"),c=RQ(a),c=$APP.M(c),c=$APP.D(c,NQ),c.style.display="",c.style.opacity=""),a.setAttribute("aria-busy","true"),a.setAttribute("aria-live","polite"),
11
- a.setAttribute("role","status"),g.style.display="",g.style.opacity=""):(e=$APP.r(c),$APP.n(e?x:e)?WQ(a):$APP.r(c)&&m==null&&(g.style.display="none",a.removeAttribute("aria-busy")));$APP.n(a.hasAttribute("aria-label"))||a.setAttribute("aria-label","Loading");a.__xSplashModel=b}},fR=function(a){Object.defineProperty(a,"active",{get:function(){return this.hasAttribute("active")},set:function(b){return $APP.n(b)?this.setAttribute("active",""):this.removeAttribute("active")},enumerable:!0,configurable:!0});
12
- Object.defineProperty(a,"variant",{get:function(){var b=this.getAttribute("variant");return $APP.n(b)?b:"default"},set:function(b){return $APP.n(b)?this.setAttribute("variant",""+$APP.T.g(b)):this.removeAttribute("variant")},enumerable:!0,configurable:!0});Object.defineProperty(a,"progress",{get:function(){return LQ(this.getAttribute("progress"))},set:function(b){return b==null?this.removeAttribute("progress"):this.setAttribute("progress",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,
13
- "spinner",{get:function(){return MQ(this.getAttribute("spinner"))},set:function(b){return $APP.n(b)?this.setAttribute("spinner",""):this.setAttribute("spinner","false")},enumerable:!0,configurable:!0});Object.defineProperty(a,"overlay",{get:function(){var b=this.getAttribute("overlay");return $APP.n(b)?b:"solid"},set:function(b){return $APP.n(b)?this.setAttribute("overlay",""+$APP.T.g(b)):this.removeAttribute("overlay")},enumerable:!0,configurable:!0})},hR=function(){var a=class extends HTMLElement{};
14
- a.observedAttributes=gR;a.prototype.connectedCallback=function(){RQ(this);UQ(this);eR(this);return null};a.prototype.disconnectedCallback=function(){UQ(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&eR(this);return null};fR(a.prototype);return a},iR=function(){$APP.n(customElements.get("x-splash"))||customElements.define("x-splash",hR());return null},NQ=new $APP.K(null,"overlay-el","overlay-el",-308547109),OQ=new $APP.K(null,"content-el","content-el",-1423019925),
15
- PQ=new $APP.K(null,"spinner-el","spinner-el",-1536400516),QQ=new $APP.K(null,"bar-el","bar-el",2050414242),cR=new $APP.K(null,"spinner?","spinner?",939139177),bR=new $APP.K(null,"active?","active?",459499776),XQ=new $APP.K(null,"active-present?","active-present?",73064660),YQ=new $APP.K(null,"spinner-attr","spinner-attr",-479327548),ZQ=new $APP.K(null,"overlay-raw","overlay-raw",1018775670),dR=new $APP.K(null,"overlay","overlay",-139131598);var gR=["active","variant","progress","spinner","overlay"];$APP.Pd(["x-splash-hidden",new $APP.R(null,2,[$APP.V,$APP.Qd,$APP.jm,!1],null)]);var $Q=new $APP.S(null,new $APP.R(null,3,["minimal",null,"branded",null,"default",null],null),null),aR=new $APP.S(null,new $APP.R(null,3,["transparent",null,"solid",null,"blur",null],null),null);$APP.ha("baredom.exports.x_splash.init",iR);export const init=iR;
4
+ d.setAttribute("part","overlay");e.setAttribute("part","content");h.setAttribute("part","spinner");h.setAttribute("aria-hidden","true");l.setAttribute("part","progress");l.setAttribute("role","progressbar");l.setAttribute("aria-valuemin","0");l.setAttribute("aria-valuemax","100");m.setAttribute("part","bar");l.appendChild(m);e.appendChild(g);e.appendChild(h);e.appendChild(l);d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xSplashRefs=new $APP.Q(null,6,[$APP.Hi,b,QQ,d,RQ,e,SQ,h,$APP.jj,l,TQ,
5
+ m],null);return $APP.k(a,"__xSplashRefs")},VQ=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*a))):0},WQ=function(a){a=window.getComputedStyle(a);a=VQ(a.getPropertyValue("--x-splash-fade-duration"));return a>0?a:
6
+ 400},XQ=function(a){var b=$APP.k(a,"__xSplashFadeTimer");$APP.n(b)&&(clearTimeout(b),a.__xSplashFadeTimer=null)},YQ=function(a){XQ(a);a.__xSplashFadingOut=!1;a.removeAttribute("data-fading-out");var b=UQ(a);b=$APP.M(b);$APP.D(b,QQ).style.display="none";a.removeAttribute("aria-busy");b=new CustomEvent("x-splash-hidden",{detail:{},bubbles:!0,composed:!0,cancelable:!1});a.dispatchEvent(b);return null},ZQ=function(a){if(!$APP.n($APP.k(a,"__xSplashFadingOut")))if(a.__xSplashFadingOut=!0,$APP.F(window.matchMedia("(prefers-reduced-motion:reduce)").matches))YQ(a);
7
+ else{var b=UQ(a);b=$APP.M(b);var c=$APP.D(b,QQ),d=function h(g){return $APP.B.i(g.target,c)&&$APP.B.i(g.propertyName,"opacity")?(c.removeEventListener("transitionend",h),$APP.n($APP.k(a,"__xSplashFadingOut"))?YQ(a):null):null};c.style.display="flex";c.style.opacity="1";a.setAttribute("data-fading-out","");c.addEventListener("transitionend",d);requestAnimationFrame(function(){return requestAnimationFrame(function(){return $APP.n($APP.k(a,"__xSplashFadingOut"))?c.style.opacity="0":null})});$APP.ja(a,
8
+ "__xSplashFadeTimer",setTimeout(function(){return $APP.n($APP.k(a,"__xSplashFadingOut"))?(c.removeEventListener("transitionend",d),YQ(a)):null},WQ(a)+60))}},hR=function(a){var b=new $APP.Q(null,5,[$Q,a.hasAttribute("active"),$APP.ul,a.getAttribute("variant"),$APP.fk,a.getAttribute("progress"),aR,a.getAttribute("spinner"),bR,a.getAttribute("overlay")],null);var c=$APP.M(b);b=$APP.D(c,$Q);var d=$APP.D(c,$APP.ul),e=$APP.D(c,$APP.fk),g=$APP.D(c,aR);c=$APP.D(c,bR);b=$APP.F(b);d=typeof d==="string"?d.trim().toLowerCase():
9
+ null;d=$APP.I(cR,d)?d:"default";e=OQ(e);g=PQ(g);c=typeof c==="string"?c.trim().toLowerCase():null;c=$APP.I(dR,c)?c:"solid";b=new $APP.Q(null,5,[eR,b,$APP.Vg,d,$APP.cm,e,fR,g,gR,c],null);if($APP.N($APP.k(a,"__xSplashModel"),b)){b=$APP.M(b);c=$APP.D(b,eR);e=$APP.D(b,$APP.Vg);d=$APP.D(b,$APP.cm);var h=$APP.D(b,fR),l=$APP.D(b,gR);g=UQ(a);var m=$APP.M(g);g=$APP.D(m,QQ);var p=$APP.D(m,SQ),q=$APP.D(m,$APP.jj),v=$APP.D(m,TQ);m=$APP.k(a,"__xSplashModel");var x=eR.g(m);a.setAttribute("data-variant",e);a.setAttribute("data-overlay",
10
+ l);p.style.display=$APP.n(h)?"block":"none";d!=null?(q.style.display="block",v.style.width=""+$APP.T.g(d)+"%",q.setAttribute("aria-valuenow",""+$APP.T.g(d))):(q.style.display="none",q.removeAttribute("aria-valuenow"));$APP.n($APP.n(c)?$APP.r(x):c)?($APP.n($APP.k(a,"__xSplashFadingOut"))&&(XQ(a),a.__xSplashFadingOut=!1,a.removeAttribute("data-fading-out"),c=UQ(a),c=$APP.M(c),c=$APP.D(c,QQ),c.style.display="",c.style.opacity=""),a.setAttribute("aria-busy","true"),a.setAttribute("aria-live","polite"),
11
+ a.setAttribute("role","status"),g.style.display="",g.style.opacity=""):(e=$APP.r(c),$APP.n(e?x:e)?ZQ(a):$APP.r(c)&&m==null&&(g.style.display="none",a.removeAttribute("aria-busy")));$APP.n(a.hasAttribute("aria-label"))||a.setAttribute("aria-label","Loading");a.__xSplashModel=b}},iR=function(a){Object.defineProperty(a,"active",{get:function(){return this.hasAttribute("active")},set:function(b){return $APP.n(b)?this.setAttribute("active",""):this.removeAttribute("active")},enumerable:!0,configurable:!0});
12
+ Object.defineProperty(a,"variant",{get:function(){var b=this.getAttribute("variant");return $APP.n(b)?b:"default"},set:function(b){return $APP.n(b)?this.setAttribute("variant",""+$APP.T.g(b)):this.removeAttribute("variant")},enumerable:!0,configurable:!0});Object.defineProperty(a,"progress",{get:function(){return OQ(this.getAttribute("progress"))},set:function(b){return b==null?this.removeAttribute("progress"):this.setAttribute("progress",""+$APP.T.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,
13
+ "spinner",{get:function(){return PQ(this.getAttribute("spinner"))},set:function(b){return $APP.n(b)?this.setAttribute("spinner",""):this.setAttribute("spinner","false")},enumerable:!0,configurable:!0});Object.defineProperty(a,"overlay",{get:function(){var b=this.getAttribute("overlay");return $APP.n(b)?b:"solid"},set:function(b){return $APP.n(b)?this.setAttribute("overlay",""+$APP.T.g(b)):this.removeAttribute("overlay")},enumerable:!0,configurable:!0})},kR=function(){var a=class extends HTMLElement{};
14
+ a.observedAttributes=jR;a.prototype.connectedCallback=function(){UQ(this);XQ(this);hR(this);return null};a.prototype.disconnectedCallback=function(){XQ(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&hR(this);return null};iR(a.prototype);return a},lR=function(){$APP.n(customElements.get("x-splash"))||customElements.define("x-splash",kR());return null},QQ=new $APP.K(null,"overlay-el","overlay-el",-308547109),RQ=new $APP.K(null,"content-el","content-el",-1423019925),
15
+ SQ=new $APP.K(null,"spinner-el","spinner-el",-1536400516),TQ=new $APP.K(null,"bar-el","bar-el",2050414242),fR=new $APP.K(null,"spinner?","spinner?",939139177),eR=new $APP.K(null,"active?","active?",459499776),$Q=new $APP.K(null,"active-present?","active-present?",73064660),aR=new $APP.K(null,"spinner-attr","spinner-attr",-479327548),bR=new $APP.K(null,"overlay-raw","overlay-raw",1018775670),gR=new $APP.K(null,"overlay","overlay",-139131598);var jR=["active","variant","progress","spinner","overlay"];$APP.Pd(["x-splash-hidden",new $APP.Q(null,2,[$APP.V,$APP.Qd,$APP.lm,!1],null)]);var cR=new $APP.S(null,new $APP.Q(null,3,["minimal",null,"branded",null,"default",null],null),null),dR=new $APP.S(null,new $APP.Q(null,3,["transparent",null,"solid",null,"blur",null],null),null);$APP.ha("baredom.exports.x_splash.init",lR);export const init=lR;
@@ -0,0 +1,21 @@
1
+ // x-stat.d.ts — auto-generated by generate_types.bb, do not edit
2
+
3
+ export function init(): void;
4
+
5
+ export interface XStat extends HTMLElement {
6
+ trend: string;
7
+ align: string;
8
+ variant: string;
9
+ value: string;
10
+ hint: string;
11
+ size: string;
12
+ loading: boolean;
13
+ label: string;
14
+ emphasis: string;
15
+ }
16
+
17
+ declare global {
18
+ interface HTMLElementTagNameMap {
19
+ "x-stat": XStat;
20
+ }
21
+ }
package/dist/x-stat.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var kS=function(a,b,c){return $APP.I(b,a)?a:c},lS=function(a){return $APP.n($APP.n(a)?$APP.N("",a):a)?a:null},uS=function(a){var b=$APP.M(a),c=$APP.D(b,mS),d=$APP.D(b,nS),e=$APP.D(b,$APP.vj),g=$APP.D(b,$APP.Vg);a=$APP.D(b,$APP.Yi);var h=$APP.D(b,$APP.Xl),l=$APP.D(b,$APP.Mh),m=$APP.D(b,$APP.wl);b=$APP.D(b,$APP.U);g=kS(g,oS,"default");e=kS(e,pS,"start");l=kS(l,qS,"md");c=kS(c,rS,"normal");d=kS(d,sS,"neutral");m=$APP.F(m);return $APP.zf([nS,$APP.vj,$APP.Vg,$APP.Yi,$APP.Xl,$APP.Mh,$APP.wl,$APP.U,tS,mS],
3
- [d,e,g,lS(a),lS(h),l,m,lS(b),m?"true":null,c])},vS=function(a){return $APP.zf([nS,$APP.vj,$APP.Vg,$APP.Yi,$APP.Xl,$APP.Mh,$APP.wl,$APP.U,mS],[a.getAttribute("trend"),a.getAttribute("align"),a.getAttribute("variant"),a.getAttribute("value"),a.getAttribute("hint"),a.getAttribute("size"),a.hasAttribute("loading"),a.getAttribute("label"),a.getAttribute("emphasis")])},wS=function(a,b){a.setAttribute("role","figure");var c=tS.g(b);$APP.n(c)?a.setAttribute("aria-busy",c):a.removeAttribute("aria-busy");b=
4
- $APP.U.g(b);$APP.n(b)?a.setAttribute("aria-label",b):a.removeAttribute("aria-label")},xS=function(a,b){a.setAttribute("data-variant",$APP.Vg.g(b));a.setAttribute("data-align",$APP.vj.g(b));a.setAttribute("data-size",$APP.Mh.g(b));a.setAttribute("data-emphasis",mS.g(b));a.setAttribute("data-trend",nS.g(b));$APP.n($APP.wl.g(b))?a.setAttribute("data-loading","true"):a.removeAttribute("data-loading")},yS=function(a){var b=uS(vS(a)),c=$APP.k(a,"__x_stat_base"),d=$APP.k(a,"__x_stat_label"),e=$APP.k(a,"__x_stat_value"),
5
- g=$APP.k(a,"__x_stat_hint");return $APP.n(c)?(wS(a,b),xS(c,b),d.textContent=function(){var h=$APP.U.g(b);return $APP.n(h)?h:""}(),e.textContent=function(){var h=$APP.Yi.g(b);return $APP.n(h)?h:""}(),g.textContent=function(){var h=$APP.Xl.g(b);return $APP.n(h)?h:""}()):null},zS=function(a){if(!$APP.Dg(a,"__x_stat_initialized")){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("div"),
2
+ var nS=function(a,b,c){return $APP.I(b,a)?a:c},oS=function(a){return $APP.n($APP.n(a)?$APP.N("",a):a)?a:null},xS=function(a){var b=$APP.M(a),c=$APP.D(b,pS),d=$APP.D(b,qS),e=$APP.D(b,$APP.vj),g=$APP.D(b,$APP.Vg);a=$APP.D(b,$APP.Yi);var h=$APP.D(b,$APP.Zl),l=$APP.D(b,$APP.Mh),m=$APP.D(b,$APP.yl);b=$APP.D(b,$APP.U);g=nS(g,rS,"default");e=nS(e,sS,"start");l=nS(l,tS,"md");c=nS(c,uS,"normal");d=nS(d,vS,"neutral");m=$APP.F(m);return $APP.zf([qS,$APP.vj,$APP.Vg,$APP.Yi,$APP.Zl,$APP.Mh,$APP.yl,$APP.U,wS,pS],
3
+ [d,e,g,oS(a),oS(h),l,m,oS(b),m?"true":null,c])},yS=function(a){return $APP.zf([qS,$APP.vj,$APP.Vg,$APP.Yi,$APP.Zl,$APP.Mh,$APP.yl,$APP.U,pS],[a.getAttribute("trend"),a.getAttribute("align"),a.getAttribute("variant"),a.getAttribute("value"),a.getAttribute("hint"),a.getAttribute("size"),a.hasAttribute("loading"),a.getAttribute("label"),a.getAttribute("emphasis")])},zS=function(a,b){a.setAttribute("role","figure");var c=wS.g(b);$APP.n(c)?a.setAttribute("aria-busy",c):a.removeAttribute("aria-busy");b=
4
+ $APP.U.g(b);$APP.n(b)?a.setAttribute("aria-label",b):a.removeAttribute("aria-label")},AS=function(a,b){a.setAttribute("data-variant",$APP.Vg.g(b));a.setAttribute("data-align",$APP.vj.g(b));a.setAttribute("data-size",$APP.Mh.g(b));a.setAttribute("data-emphasis",pS.g(b));a.setAttribute("data-trend",qS.g(b));$APP.n($APP.yl.g(b))?a.setAttribute("data-loading","true"):a.removeAttribute("data-loading")},BS=function(a){var b=xS(yS(a)),c=$APP.k(a,"__x_stat_base"),d=$APP.k(a,"__x_stat_label"),e=$APP.k(a,"__x_stat_value"),
5
+ g=$APP.k(a,"__x_stat_hint");return $APP.n(c)?(zS(a,b),AS(c,b),d.textContent=function(){var h=$APP.U.g(b);return $APP.n(h)?h:""}(),e.textContent=function(){var h=$APP.Yi.g(b);return $APP.n(h)?h:""}(),g.textContent=function(){var h=$APP.Zl.g(b);return $APP.n(h)?h:""}()):null},CS=function(a){if(!$APP.Dg(a,"__x_stat_initialized")){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("div"),
6
6
  l=document.createElement("div"),m=document.createElement("div"),p=document.createElement("span"),q=document.createElement("span"),v=document.createElement("span"),x=document.createElement("slot"),y=document.createElement("slot"),A=document.createElement("slot"),C=document.createElement("slot"),E=document.createElement("slot");c.textContent=":host{display:block;color-scheme:light dark;--x-stat-background:transparent;--x-stat-color:var(--x-color-text,inherit);--x-stat-muted-color:var(--x-color-text-muted,rgba(0,0,0,0.55));--x-stat-border-color:var(--x-color-border,transparent);--x-stat-radius:var(--x-radius-md,12px);--x-stat-padding:16px;--x-stat-gap:6px;--x-stat-label-color:var(--x-stat-muted-color);--x-stat-label-size:12px;--x-stat-value-color:var(--x-stat-color);--x-stat-value-size:20px;--x-stat-hint-color:var(--x-stat-muted-color);--x-stat-hint-size:12px;--x-stat-icon-color:var(--x-stat-color);--x-stat-positive-color:var(--x-color-success,#16a34a);--x-stat-warning-color:var(--x-color-warning,#d97706);--x-stat-danger-color:var(--x-color-danger,#dc2626);--x-stat-transition-duration:var(--x-transition-duration,120ms);--x-stat-transition-timing:var(--x-transition-easing,ease);--x-stat-loading-opacity:0.6;}@media (prefers-color-scheme:dark){:host{--x-stat-muted-color:var(--x-color-text-muted,rgba(255,255,255,0.55));--x-stat-positive-color:var(--x-color-success,#4ade80);--x-stat-warning-color:var(--x-color-warning,#fbbf24);--x-stat-danger-color:var(--x-color-danger,#f87171);}}:host([variant\x3d'positive']){--x-stat-value-color:var(--x-stat-positive-color);}:host([variant\x3d'warning']){--x-stat-value-color:var(--x-stat-warning-color);}:host([variant\x3d'danger']){--x-stat-value-color:var(--x-stat-danger-color);}:host([variant\x3d'subtle']){--x-stat-value-color:var(--x-stat-muted-color);}[part\x3dbase]{display:grid;gap:var(--x-stat-gap);padding:var(--x-stat-padding);border-radius:var(--x-stat-radius);background:var(--x-stat-background);border:1px solid var(--x-stat-border-color);color:var(--x-stat-color);transition:background var(--x-stat-transition-duration) var(--x-stat-transition-timing),border-color var(--x-stat-transition-duration) var(--x-stat-transition-timing),color var(--x-stat-transition-duration) var(--x-stat-transition-timing),opacity var(--x-stat-transition-duration) var(--x-stat-transition-timing);}[part\x3dbase][data-align\x3d'center']{text-align:center;}[part\x3dbase][data-align\x3d'end']{text-align:end;}[part\x3dbase][data-size\x3d'sm'] [part\x3dvalue]{font-size:calc(var(--x-stat-value-size) * 0.8);}[part\x3dbase][data-size\x3d'lg'] [part\x3dvalue]{font-size:calc(var(--x-stat-value-size) * 1.6);}[part\x3dbase][data-emphasis\x3d'high'] [part\x3dvalue]{font-weight:800;}[part\x3dicon]{flex:0 0 auto;color:var(--x-stat-icon-color);line-height:1;}slot[name\x3dicon]::slotted(*){display:block;}[part\x3dlabel]{font-size:var(--x-stat-label-size);color:var(--x-stat-label-color);}[part\x3dvalue]{font-weight:600;font-size:var(--x-stat-value-size);color:var(--x-stat-value-color);}[part\x3dhint]{font-size:var(--x-stat-hint-size);color:var(--x-stat-hint-color);}[part\x3dbase][data-loading\x3d'true']{opacity:var(--x-stat-loading-opacity);}@media (prefers-reduced-motion:reduce){[part\x3dbase]{transition:none;}}";
7
7
  d.setAttribute("part","base");e.setAttribute("part","icon");g.setAttribute("part","body");h.setAttribute("part","label");l.setAttribute("part","value");m.setAttribute("part","hint");x.setAttribute("name","icon");y.setAttribute("name","label");A.setAttribute("name","value");C.setAttribute("name","hint");e.appendChild(x);h.appendChild(y);h.appendChild(p);l.appendChild(A);l.appendChild(q);m.appendChild(C);m.appendChild(v);g.appendChild(h);g.appendChild(l);g.appendChild(m);g.appendChild(E);d.appendChild(e);
8
- d.appendChild(g);b.appendChild(c);b.appendChild(d);a.__x_stat_root=b;a.__x_stat_base=d;a.__x_stat_label=p;a.__x_stat_value=q;a.__x_stat_hint=v;a.__x_stat_initialized=!0}yS(a);return a},AS=function(a,b){Object.defineProperty(a,b,{get:function(){var c=this.getAttribute(b);return $APP.n(c)?c:""},set:function(c){return $APP.n(c)?this.setAttribute(b,""+$APP.T.g(c)):this.removeAttribute(b)},enumerable:!0,configurable:!0})},BS=function(a){AS(a,"variant");AS(a,"align");AS(a,"size");AS(a,"emphasis");AS(a,
9
- "trend");AS(a,"label");AS(a,"value");AS(a,"hint");Object.defineProperty(a,"loading",{get:function(){return this.hasAttribute("loading")},set:function(b){return $APP.n(b)?this.setAttribute("loading",""):this.removeAttribute("loading")},enumerable:!0,configurable:!0})},DS=function(){var a=class extends HTMLElement{};a.observedAttributes=CS;a.prototype.connectedCallback=function(){return zS(this)};a.prototype.attributeChangedCallback=function(){return $APP.Dg(this,"__x_stat_initialized")?yS(this):zS(this)};
10
- BS(a.prototype);return a},ES=function(){return $APP.n(customElements.get("x-stat"))?null:customElements.define("x-stat",DS())},mS=new $APP.K(null,"emphasis","emphasis",293543451),tS=new $APP.K(null,"aria-busy","aria-busy",793864247),nS=new $APP.K(null,"trend","trend",54563841);var CS="variant align size emphasis trend loading label value hint".split(" "),oS=new $APP.S(null,new $APP.R(null,5,["warning",null,"positive",null,"subtle",null,"danger",null,"default",null],null),null),pS=new $APP.S(null,new $APP.R(null,3,["center",null,"start",null,"end",null],null),null),qS=new $APP.S(null,new $APP.R(null,3,["md",null,"lg",null,"sm",null],null),null),rS=new $APP.S(null,new $APP.R(null,2,["high",null,"normal",null],null),null),sS=new $APP.S(null,new $APP.R(null,3,["neutral",null,
8
+ d.appendChild(g);b.appendChild(c);b.appendChild(d);a.__x_stat_root=b;a.__x_stat_base=d;a.__x_stat_label=p;a.__x_stat_value=q;a.__x_stat_hint=v;a.__x_stat_initialized=!0}BS(a);return a},DS=function(a,b){Object.defineProperty(a,b,{get:function(){var c=this.getAttribute(b);return $APP.n(c)?c:""},set:function(c){return $APP.n(c)?this.setAttribute(b,""+$APP.T.g(c)):this.removeAttribute(b)},enumerable:!0,configurable:!0})},ES=function(a){DS(a,"variant");DS(a,"align");DS(a,"size");DS(a,"emphasis");DS(a,
9
+ "trend");DS(a,"label");DS(a,"value");DS(a,"hint");Object.defineProperty(a,"loading",{get:function(){return this.hasAttribute("loading")},set:function(b){return $APP.n(b)?this.setAttribute("loading",""):this.removeAttribute("loading")},enumerable:!0,configurable:!0})},GS=function(){var a=class extends HTMLElement{};a.observedAttributes=FS;a.prototype.connectedCallback=function(){return CS(this)};a.prototype.attributeChangedCallback=function(){return $APP.Dg(this,"__x_stat_initialized")?BS(this):CS(this)};
10
+ ES(a.prototype);return a},HS=function(){return $APP.n(customElements.get("x-stat"))?null:customElements.define("x-stat",GS())},pS=new $APP.K(null,"emphasis","emphasis",293543451),wS=new $APP.K(null,"aria-busy","aria-busy",793864247),qS=new $APP.K(null,"trend","trend",54563841);var FS="variant align size emphasis trend loading label value hint".split(" "),rS=new $APP.S(null,new $APP.Q(null,5,["warning",null,"positive",null,"subtle",null,"danger",null,"default",null],null),null),sS=new $APP.S(null,new $APP.Q(null,3,["center",null,"start",null,"end",null],null),null),tS=new $APP.S(null,new $APP.Q(null,3,["md",null,"lg",null,"sm",null],null),null),uS=new $APP.S(null,new $APP.Q(null,2,["high",null,"normal",null],null),null),vS=new $APP.S(null,new $APP.Q(null,3,["neutral",null,
11
11
  "up",null,"down",null],null),null);
12
- $APP.zf([nS,$APP.vj,$APP.Vg,$APP.Yi,$APP.Xl,$APP.Mh,$APP.wl,$APP.U,mS],[new $APP.R(null,4,[$APP.ll,"trend",$APP.Z,$APP.Y,$APP.li,"neutral",$APP.ni,!0],null),new $APP.R(null,4,[$APP.ll,"align",$APP.Z,$APP.Y,$APP.li,"start",$APP.ni,!0],null),new $APP.R(null,4,[$APP.ll,"variant",$APP.Z,$APP.Y,$APP.li,"default",$APP.ni,!0],null),new $APP.R(null,4,[$APP.ll,"value",$APP.Z,$APP.Y,$APP.li,"",$APP.ni,!0],null),new $APP.R(null,4,[$APP.ll,"hint",$APP.Z,$APP.Y,$APP.li,"",$APP.ni,!0],null),new $APP.R(null,4,[$APP.ll,
13
- "size",$APP.Z,$APP.Y,$APP.li,"md",$APP.ni,!0],null),new $APP.R(null,4,[$APP.ll,"loading",$APP.Z,$APP.Zj,$APP.li,!1,$APP.ni,!0],null),new $APP.R(null,4,[$APP.ll,"label",$APP.Z,$APP.Y,$APP.li,"",$APP.ni,!0],null),new $APP.R(null,4,[$APP.ll,"emphasis",$APP.Z,$APP.Y,$APP.li,"normal",$APP.ni,!0],null)]);$APP.ha("baredom.exports.x_stat.init",ES);export const init=ES;
12
+ $APP.zf([qS,$APP.vj,$APP.Vg,$APP.Yi,$APP.Zl,$APP.Mh,$APP.yl,$APP.U,pS],[new $APP.Q(null,4,[$APP.nl,"trend",$APP.Z,$APP.Y,$APP.li,"neutral",$APP.ni,!0],null),new $APP.Q(null,4,[$APP.nl,"align",$APP.Z,$APP.Y,$APP.li,"start",$APP.ni,!0],null),new $APP.Q(null,4,[$APP.nl,"variant",$APP.Z,$APP.Y,$APP.li,"default",$APP.ni,!0],null),new $APP.Q(null,4,[$APP.nl,"value",$APP.Z,$APP.Y,$APP.li,"",$APP.ni,!0],null),new $APP.Q(null,4,[$APP.nl,"hint",$APP.Z,$APP.Y,$APP.li,"",$APP.ni,!0],null),new $APP.Q(null,4,[$APP.nl,
13
+ "size",$APP.Z,$APP.Y,$APP.li,"md",$APP.ni,!0],null),new $APP.Q(null,4,[$APP.nl,"loading",$APP.Z,$APP.Zj,$APP.li,!1,$APP.ni,!0],null),new $APP.Q(null,4,[$APP.nl,"label",$APP.Z,$APP.Y,$APP.li,"",$APP.ni,!0],null),new $APP.Q(null,4,[$APP.nl,"emphasis",$APP.Z,$APP.Y,$APP.li,"normal",$APP.ni,!0],null)]);$APP.ha("baredom.exports.x_stat.init",HS);export const init=HS;
@@ -0,0 +1,42 @@
1
+ // x-stepper.d.ts — auto-generated by generate_types.bb, do not edit
2
+
3
+ export function init(): void;
4
+
5
+ export interface XStepperEventMap {
6
+ "x-stepper-change": CustomEvent<{ from: number; to: number }>;
7
+ }
8
+
9
+ export interface XStepper extends HTMLElement {
10
+ steps: string;
11
+ current: number;
12
+ orientation: string;
13
+ size: string;
14
+ disabled: boolean;
15
+
16
+ addEventListener<K extends keyof XStepperEventMap>(
17
+ type: K,
18
+ listener: (this: XStepper, ev: XStepperEventMap[K]) => any,
19
+ options?: boolean | AddEventListenerOptions
20
+ ): void;
21
+ addEventListener(
22
+ type: string,
23
+ listener: EventListenerOrEventListenerObject,
24
+ options?: boolean | AddEventListenerOptions
25
+ ): void;
26
+ removeEventListener<K extends keyof XStepperEventMap>(
27
+ type: K,
28
+ listener: (this: XStepper, ev: XStepperEventMap[K]) => any,
29
+ options?: boolean | EventListenerOptions
30
+ ): void;
31
+ removeEventListener(
32
+ type: string,
33
+ listener: EventListenerOrEventListenerObject,
34
+ options?: boolean | EventListenerOptions
35
+ ): void;
36
+ }
37
+
38
+ declare global {
39
+ interface HTMLElementTagNameMap {
40
+ "x-stepper": XStepper;
41
+ }
42
+ }
package/dist/x-stepper.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var kp=function(a,b){return new $APP.rd(null,function(){if(a>0){var c=$APP.t(b);return c?$APP.od($APP.u(c),kp(a-1,$APP.Yb(c))):null}return null},null)},mp=function(a){a=$APP.D(lp,typeof a==="string"?a.toLowerCase():null);return $APP.n(a)?a:$APP.Gl},op=function(a){a=$APP.D(np,a);return $APP.n(a)?a:"horizontal"},rp=function(a){a=$APP.D(pp,typeof a==="string"?a.toLowerCase():null);return $APP.n(a)?a:qp},tp=function(a){a=$APP.D(sp,a);return $APP.n(a)?a:"md"},up=function(a){return typeof a==="string"?
3
- (a=parseInt(a.trim(),10),typeof a==="number"&&$APP.r(isNaN(a))&&a>=0?a:0):0},vp=function(a){if(typeof a==="string"){var b=a.trim();if($APP.n($APP.eg(/^\d+$/,b)))return a=parseInt(b,10),a>0&&a<=200?$APP.ge(function(g){return new $APP.R(null,2,[$APP.U,"Step "+$APP.T.g(g),$APP.yk,null],null)},$APP.dg(1,a+1)):$APP.fe;if($APP.n(function(){var g=$APP.N("",b);return g?b.startsWith("["):g}()))try{var c=JSON.parse(b);if($APP.n(Array.isArray(c))){var d=$APP.uc(c),e=$APP.z(d)>200?kp(200,d):d;return $APP.ge(function(g){return new $APP.R(null,
4
- 2,[$APP.U,function(){var h=$APP.k(g,"label");return typeof h==="string"?h:""}(),$APP.yk,function(){var h=$APP.k(g,"description");return typeof h==="string"?h:null}()],null)},e)}return $APP.fe}catch(g){return $APP.fe}else return $APP.fe}else return $APP.fe},wp=function(a){var b=$APP.k(a,"__xStepperRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div");c.textContent=":host{display:block;color-scheme:light dark;--x-stepper-indicator-size:2rem;--x-stepper-connector-thickness:2px;--x-stepper-step-gap:0.75rem;--x-stepper-font-size:var(--x-font-size-sm,0.875rem);--x-stepper-label-font-weight:500;--x-stepper-desc-font-size:0.75rem;--x-stepper-radius:var(--x-radius-full,999px);--x-stepper-motion:var(--x-transition-duration,120ms);--x-stepper-press-scale:0.93;--x-stepper-focus-ring:var(--x-color-focus-ring,rgba(0,0,0,0.55));--x-stepper-disabled-opacity:0.5;--x-stepper-complete-bg:var(--x-color-success,rgba(16,140,72,1));--x-stepper-complete-color:#fff;--x-stepper-complete-connector:var(--x-color-success,rgba(16,140,72,1));--x-stepper-current-bg:var(--x-color-primary,rgba(0,102,204,1));--x-stepper-current-color:#fff;--x-stepper-upcoming-bg:rgba(0,0,0,0.08);--x-stepper-upcoming-color:var(--x-color-text-muted,rgba(0,0,0,0.45));--x-stepper-idle-connector:var(--x-color-border,rgba(0,0,0,0.12));--x-stepper-label-done-color:var(--x-color-text,rgba(0,0,0,0.85));--x-stepper-label-current-color:var(--x-color-text,rgba(0,0,0,0.85));--x-stepper-label-upcoming-color:var(--x-color-text-muted,rgba(0,0,0,0.4));--x-stepper-desc-color:var(--x-color-text-muted,rgba(0,0,0,0.4));}@media (prefers-color-scheme:dark){:host{--x-stepper-focus-ring:var(--x-color-focus-ring,rgba(255,255,255,0.7));--x-stepper-complete-bg:var(--x-color-success,rgba(60,210,120,1));--x-stepper-complete-color:#000;--x-stepper-complete-connector:var(--x-color-success,rgba(60,210,120,1));--x-stepper-current-bg:var(--x-color-primary,rgba(80,160,255,1));--x-stepper-current-color:#000;--x-stepper-upcoming-bg:rgba(255,255,255,0.1);--x-stepper-upcoming-color:var(--x-color-text-muted,rgba(255,255,255,0.35));--x-stepper-idle-connector:var(--x-color-border,rgba(255,255,255,0.12));--x-stepper-label-done-color:var(--x-color-text,rgba(255,255,255,0.9));--x-stepper-label-current-color:var(--x-color-text,rgba(255,255,255,0.9));--x-stepper-label-upcoming-color:var(--x-color-text-muted,rgba(255,255,255,0.3));--x-stepper-desc-color:var(--x-color-text-muted,rgba(255,255,255,0.35));}}[part\x3dcontainer]{display:flex;align-items:flex-start;margin:0;padding:0;list-style:none;}:host([data-orientation\x3dhorizontal]) [part\x3dcontainer]{flex-direction:row;}:host([data-orientation\x3dhorizontal]) [part\x3dstep]{display:flex;flex-direction:column;align-items:center;flex:1;min-width:0;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-track]{display:flex;align-items:center;width:100%;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-connector]{flex:1;height:var(--x-stepper-connector-thickness);min-width:8px;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-content]{display:flex;flex-direction:column;align-items:center;text-align:center;padding:var(--x-stepper-step-gap) 4px 0;width:100%;}:host([data-orientation\x3dvertical]) [part\x3dcontainer]{flex-direction:column;}:host([data-orientation\x3dvertical]) [part\x3dstep]{display:flex;flex-direction:row;gap:var(--x-stepper-step-gap);}:host([data-orientation\x3dvertical]) [part\x3dstep-track]{display:flex;flex-direction:column;align-items:center;flex-shrink:0;width:var(--x-stepper-indicator-size);}:host([data-orientation\x3dvertical]) [part\x3dstep-connector]{flex:1;width:var(--x-stepper-connector-thickness);min-height:16px;margin:4px 0;}:host([data-orientation\x3dvertical]) [part\x3dstep-content]{display:flex;flex-direction:column;flex:1;min-width:0;padding-bottom:var(--x-stepper-step-gap);}[part\x3dstep-indicator]{display:inline-flex;align-items:center;justify-content:center;width:var(--x-stepper-indicator-size);height:var(--x-stepper-indicator-size);border-radius:var(--x-stepper-radius);border:none;padding:0;margin:0;cursor:pointer;font-size:0.875em;font-weight:600;font-family:inherit;flex-shrink:0;position:relative;z-index:1;transition:background var(--x-stepper-motion) ease,color var(--x-stepper-motion) ease,transform 80ms ease;}[part\x3dstep-indicator]:focus{outline:none;}[part\x3dstep-indicator]:focus-visible{outline:2px solid var(--x-stepper-focus-ring);outline-offset:3px;}[data-state\x3dcomplete] [part\x3dstep-indicator]{background:var(--x-stepper-complete-bg);color:var(--x-stepper-complete-color);}[data-state\x3dcurrent] [part\x3dstep-indicator]{background:var(--x-stepper-current-bg);color:var(--x-stepper-current-color);cursor:default;}[data-state\x3dupcoming] [part\x3dstep-indicator]{background:var(--x-stepper-upcoming-bg);color:var(--x-stepper-upcoming-color);}[data-state\x3dcomplete] [part\x3dstep-connector]{background:var(--x-stepper-complete-connector);}[data-state\x3dcurrent] [part\x3dstep-connector],[data-state\x3dupcoming] [part\x3dstep-connector]{background:var(--x-stepper-idle-connector);}[part\x3dstep]:last-child [part\x3dstep-connector]{display:none;}[part\x3dstep-label]{font-size:var(--x-stepper-font-size);line-height:1.3;font-family:inherit;}[data-state\x3dcomplete] [part\x3dstep-label]{color:var(--x-stepper-label-done-color);}[data-state\x3dcurrent] [part\x3dstep-label]{color:var(--x-stepper-label-current-color);font-weight:var(--x-stepper-label-font-weight);}[data-state\x3dupcoming] [part\x3dstep-label]{color:var(--x-stepper-label-upcoming-color);}[part\x3dstep-description]{font-size:var(--x-stepper-desc-font-size);color:var(--x-stepper-desc-color);line-height:1.3;margin-top:0.2em;}:host(:not([disabled])) [data-state\x3dcomplete] [part\x3dstep-indicator]:hover,:host(:not([disabled])) [data-state\x3dupcoming] [part\x3dstep-indicator]:hover{filter:brightness(0.88);}:host(:not([disabled])) [data-state\x3dcomplete] [part\x3dstep-indicator]:active,:host(:not([disabled])) [data-state\x3dupcoming] [part\x3dstep-indicator]:active{transform:scale(var(--x-stepper-press-scale));}:host([disabled]){opacity:var(--x-stepper-disabled-opacity);}:host([disabled]) [part\x3dstep-indicator]{cursor:default;pointer-events:none;}:host([data-size\x3dsm]){--x-stepper-indicator-size:1.5rem;--x-stepper-font-size:0.8125rem;--x-stepper-desc-font-size:0.6875rem;}:host([data-size\x3dlg]){--x-stepper-indicator-size:2.5rem;--x-stepper-font-size:1rem;--x-stepper-desc-font-size:0.875rem;}@media (prefers-reduced-motion:reduce){[part\x3dstep-indicator]{transition:none;}}";
5
- d.setAttribute("part","container");d.setAttribute("role","list");b.appendChild(c);b.appendChild(d);a.__xStepperRefs=new $APP.R(null,2,[$APP.Hi,b,$APP.Hj,d],null);return $APP.k(a,"__xStepperRefs")},yp=function(a){a=new $APP.R(null,5,[xp,a.getAttribute("steps"),$APP.Vm,a.getAttribute("current"),$APP.Wl,a.getAttribute("orientation"),$APP.Ul,a.getAttribute("size"),$APP.X,a.hasAttribute("disabled")],null);var b=$APP.M(a),c=$APP.D(b,xp);a=$APP.D(b,$APP.Vm);var d=$APP.D(b,$APP.Wl),e=$APP.D(b,$APP.Ul);b=
6
- $APP.D(b,$APP.X);c=vp(c);var g=$APP.z(c);return new $APP.R(null,5,[$APP.Dm,c,$APP.$h,g===0?0:$APP.oh.i(0,$APP.sh.i(up(a),g-1)),$APP.pl,mp(d),$APP.Mh,rp(e),$APP.X,$APP.F(b)],null)},zp=function(a,b,c){return"Step "+$APP.T.g(a+1)+": "+$APP.T.g(b)+" ("+$APP.T.g(function(){var d=c instanceof $APP.K?c.pa:null;switch(d){case "complete":return"completed";case "current":return"current";case "upcoming":return"upcoming";default:throw Error("No matching clause: "+$APP.T.g(d));}}())+")"},Ap=function(a,b,c,d){var e=
2
+ var mp=function(a,b){return new $APP.rd(null,function(){if(a>0){var c=$APP.t(b);return c?$APP.od($APP.u(c),mp(a-1,$APP.Yb(c))):null}return null},null)},op=function(a){a=$APP.D(np,typeof a==="string"?a.toLowerCase():null);return $APP.n(a)?a:$APP.Il},qp=function(a){a=$APP.D(pp,a);return $APP.n(a)?a:"horizontal"},tp=function(a){a=$APP.D(rp,typeof a==="string"?a.toLowerCase():null);return $APP.n(a)?a:sp},vp=function(a){a=$APP.D(up,a);return $APP.n(a)?a:"md"},wp=function(a){return typeof a==="string"?
3
+ (a=parseInt(a.trim(),10),typeof a==="number"&&$APP.r(isNaN(a))&&a>=0?a:0):0},xp=function(a){if(typeof a==="string"){var b=a.trim();if($APP.n($APP.eg(/^\d+$/,b)))return a=parseInt(b,10),a>0&&a<=200?$APP.ge(function(g){return new $APP.Q(null,2,[$APP.U,"Step "+$APP.T.g(g),$APP.yk,null],null)},$APP.dg(1,a+1)):$APP.fe;if($APP.n(function(){var g=$APP.N("",b);return g?b.startsWith("["):g}()))try{var c=JSON.parse(b);if($APP.n(Array.isArray(c))){var d=$APP.uc(c),e=$APP.z(d)>200?mp(200,d):d;return $APP.ge(function(g){return new $APP.Q(null,
4
+ 2,[$APP.U,function(){var h=$APP.k(g,"label");return typeof h==="string"?h:""}(),$APP.yk,function(){var h=$APP.k(g,"description");return typeof h==="string"?h:null}()],null)},e)}return $APP.fe}catch(g){return $APP.fe}else return $APP.fe}else return $APP.fe},yp=function(a){var b=$APP.k(a,"__xStepperRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div");c.textContent=":host{display:block;color-scheme:light dark;--x-stepper-indicator-size:2rem;--x-stepper-connector-thickness:2px;--x-stepper-step-gap:0.75rem;--x-stepper-font-size:var(--x-font-size-sm,0.875rem);--x-stepper-label-font-weight:500;--x-stepper-desc-font-size:0.75rem;--x-stepper-radius:var(--x-radius-full,999px);--x-stepper-motion:var(--x-transition-duration,120ms);--x-stepper-press-scale:0.93;--x-stepper-focus-ring:var(--x-color-focus-ring,rgba(0,0,0,0.55));--x-stepper-disabled-opacity:0.5;--x-stepper-complete-bg:var(--x-color-success,rgba(16,140,72,1));--x-stepper-complete-color:#fff;--x-stepper-complete-connector:var(--x-color-success,rgba(16,140,72,1));--x-stepper-current-bg:var(--x-color-primary,rgba(0,102,204,1));--x-stepper-current-color:#fff;--x-stepper-upcoming-bg:rgba(0,0,0,0.08);--x-stepper-upcoming-color:var(--x-color-text-muted,rgba(0,0,0,0.45));--x-stepper-idle-connector:var(--x-color-border,rgba(0,0,0,0.12));--x-stepper-label-done-color:var(--x-color-text,rgba(0,0,0,0.85));--x-stepper-label-current-color:var(--x-color-text,rgba(0,0,0,0.85));--x-stepper-label-upcoming-color:var(--x-color-text-muted,rgba(0,0,0,0.4));--x-stepper-desc-color:var(--x-color-text-muted,rgba(0,0,0,0.4));}@media (prefers-color-scheme:dark){:host{--x-stepper-focus-ring:var(--x-color-focus-ring,rgba(255,255,255,0.7));--x-stepper-complete-bg:var(--x-color-success,rgba(60,210,120,1));--x-stepper-complete-color:#000;--x-stepper-complete-connector:var(--x-color-success,rgba(60,210,120,1));--x-stepper-current-bg:var(--x-color-primary,rgba(80,160,255,1));--x-stepper-current-color:#000;--x-stepper-upcoming-bg:rgba(255,255,255,0.1);--x-stepper-upcoming-color:var(--x-color-text-muted,rgba(255,255,255,0.35));--x-stepper-idle-connector:var(--x-color-border,rgba(255,255,255,0.12));--x-stepper-label-done-color:var(--x-color-text,rgba(255,255,255,0.9));--x-stepper-label-current-color:var(--x-color-text,rgba(255,255,255,0.9));--x-stepper-label-upcoming-color:var(--x-color-text-muted,rgba(255,255,255,0.3));--x-stepper-desc-color:var(--x-color-text-muted,rgba(255,255,255,0.35));}}[part\x3dcontainer]{display:flex;align-items:flex-start;margin:0;padding:0;list-style:none;}:host([data-orientation\x3dhorizontal]) [part\x3dcontainer]{flex-direction:row;}:host([data-orientation\x3dhorizontal]) [part\x3dstep]{display:flex;flex-direction:column;align-items:center;flex:1;min-width:0;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-track]{display:flex;align-items:center;width:100%;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-connector]{flex:1;height:var(--x-stepper-connector-thickness);min-width:8px;}:host([data-orientation\x3dhorizontal]) [part\x3dstep-content]{display:flex;flex-direction:column;align-items:center;text-align:center;padding:var(--x-stepper-step-gap) 4px 0;width:100%;}:host([data-orientation\x3dvertical]) [part\x3dcontainer]{flex-direction:column;}:host([data-orientation\x3dvertical]) [part\x3dstep]{display:flex;flex-direction:row;gap:var(--x-stepper-step-gap);}:host([data-orientation\x3dvertical]) [part\x3dstep-track]{display:flex;flex-direction:column;align-items:center;flex-shrink:0;width:var(--x-stepper-indicator-size);}:host([data-orientation\x3dvertical]) [part\x3dstep-connector]{flex:1;width:var(--x-stepper-connector-thickness);min-height:16px;margin:4px 0;}:host([data-orientation\x3dvertical]) [part\x3dstep-content]{display:flex;flex-direction:column;flex:1;min-width:0;padding-bottom:var(--x-stepper-step-gap);}[part\x3dstep-indicator]{display:inline-flex;align-items:center;justify-content:center;width:var(--x-stepper-indicator-size);height:var(--x-stepper-indicator-size);border-radius:var(--x-stepper-radius);border:none;padding:0;margin:0;cursor:pointer;font-size:0.875em;font-weight:600;font-family:inherit;flex-shrink:0;position:relative;z-index:1;transition:background var(--x-stepper-motion) ease,color var(--x-stepper-motion) ease,transform 80ms ease;}[part\x3dstep-indicator]:focus{outline:none;}[part\x3dstep-indicator]:focus-visible{outline:2px solid var(--x-stepper-focus-ring);outline-offset:3px;}[data-state\x3dcomplete] [part\x3dstep-indicator]{background:var(--x-stepper-complete-bg);color:var(--x-stepper-complete-color);}[data-state\x3dcurrent] [part\x3dstep-indicator]{background:var(--x-stepper-current-bg);color:var(--x-stepper-current-color);cursor:default;}[data-state\x3dupcoming] [part\x3dstep-indicator]{background:var(--x-stepper-upcoming-bg);color:var(--x-stepper-upcoming-color);}[data-state\x3dcomplete] [part\x3dstep-connector]{background:var(--x-stepper-complete-connector);}[data-state\x3dcurrent] [part\x3dstep-connector],[data-state\x3dupcoming] [part\x3dstep-connector]{background:var(--x-stepper-idle-connector);}[part\x3dstep]:last-child [part\x3dstep-connector]{display:none;}[part\x3dstep-label]{font-size:var(--x-stepper-font-size);line-height:1.3;font-family:inherit;}[data-state\x3dcomplete] [part\x3dstep-label]{color:var(--x-stepper-label-done-color);}[data-state\x3dcurrent] [part\x3dstep-label]{color:var(--x-stepper-label-current-color);font-weight:var(--x-stepper-label-font-weight);}[data-state\x3dupcoming] [part\x3dstep-label]{color:var(--x-stepper-label-upcoming-color);}[part\x3dstep-description]{font-size:var(--x-stepper-desc-font-size);color:var(--x-stepper-desc-color);line-height:1.3;margin-top:0.2em;}:host(:not([disabled])) [data-state\x3dcomplete] [part\x3dstep-indicator]:hover,:host(:not([disabled])) [data-state\x3dupcoming] [part\x3dstep-indicator]:hover{filter:brightness(0.88);}:host(:not([disabled])) [data-state\x3dcomplete] [part\x3dstep-indicator]:active,:host(:not([disabled])) [data-state\x3dupcoming] [part\x3dstep-indicator]:active{transform:scale(var(--x-stepper-press-scale));}:host([disabled]){opacity:var(--x-stepper-disabled-opacity);}:host([disabled]) [part\x3dstep-indicator]{cursor:default;pointer-events:none;}:host([data-size\x3dsm]){--x-stepper-indicator-size:1.5rem;--x-stepper-font-size:0.8125rem;--x-stepper-desc-font-size:0.6875rem;}:host([data-size\x3dlg]){--x-stepper-indicator-size:2.5rem;--x-stepper-font-size:1rem;--x-stepper-desc-font-size:0.875rem;}@media (prefers-reduced-motion:reduce){[part\x3dstep-indicator]{transition:none;}}";
5
+ d.setAttribute("part","container");d.setAttribute("role","list");b.appendChild(c);b.appendChild(d);a.__xStepperRefs=new $APP.Q(null,2,[$APP.Hi,b,$APP.Hj,d],null);return $APP.k(a,"__xStepperRefs")},Ap=function(a){a=new $APP.Q(null,5,[zp,a.getAttribute("steps"),$APP.Xm,a.getAttribute("current"),$APP.Yl,a.getAttribute("orientation"),$APP.Wl,a.getAttribute("size"),$APP.X,a.hasAttribute("disabled")],null);var b=$APP.M(a),c=$APP.D(b,zp);a=$APP.D(b,$APP.Xm);var d=$APP.D(b,$APP.Yl),e=$APP.D(b,$APP.Wl);b=
6
+ $APP.D(b,$APP.X);c=xp(c);var g=$APP.z(c);return new $APP.Q(null,5,[$APP.Fm,c,$APP.$h,g===0?0:$APP.oh.i(0,$APP.ph.i(wp(a),g-1)),$APP.rl,op(d),$APP.Mh,tp(e),$APP.X,$APP.F(b)],null)},Bp=function(a,b,c){return"Step "+$APP.T.g(a+1)+": "+$APP.T.g(b)+" ("+$APP.T.g(function(){var d=c instanceof $APP.K?c.pa:null;switch(d){case "complete":return"completed";case "current":return"current";case "upcoming":return"upcoming";default:throw Error("No matching clause: "+$APP.T.g(d));}}())+")"},Cp=function(a,b,c,d){var e=
7
7
  $APP.M(b);b=$APP.D(e,$APP.U);e=$APP.D(e,$APP.yk);var g=document.createElement("div"),h=document.createElement("div"),l=document.createElement("button"),m=document.createElement("span"),p=document.createElement("div"),q=document.createElement("div"),v=document.createElement("span"),x=document.createElement("span");a:{var y=c instanceof $APP.K?c.pa:null;switch(y){case "complete":y="complete";break a;case "current":y="current";break a;case "upcoming":y="upcoming";break a;default:throw Error("No matching clause: "+
8
- $APP.T.g(y));}}b=$APP.n(b)?b:"";g.setAttribute("part","step");g.setAttribute("role","listitem");g.setAttribute("data-index",""+$APP.T.g(a));g.setAttribute("data-state",y);h.setAttribute("part","step-track");l.setAttribute("part","step-indicator");l.setAttribute("type","button");l.setAttribute("aria-label",zp(a,b,c));$APP.B.i(c,$APP.$h)?l.setAttribute("aria-current","step"):l.removeAttribute("aria-current");l.setAttribute("tabindex",$APP.n(d)?"-1":"0");$APP.n(d)&&l.setAttribute("aria-disabled","true");
9
- m.setAttribute("part","step-number");m.setAttribute("aria-hidden","true");m.textContent=$APP.B.i(c,$APP.Nm)?"✓":""+$APP.T.g(a+1);p.setAttribute("part","step-connector");p.setAttribute("aria-hidden","true");q.setAttribute("part","step-content");v.setAttribute("part","step-label");v.textContent=b;x.setAttribute("part","step-description");$APP.n($APP.n(e)?$APP.N(e,""):e)?(x.textContent=e,x.style.display="block"):x.style.display="none";l.appendChild(m);h.appendChild(l);h.appendChild(p);q.appendChild(v);
10
- q.appendChild(x);g.appendChild(h);g.appendChild(q);return g},Cp=function(a){var b=yp(a);if($APP.N($APP.k(a,"__xStepperModel"),b)){b=$APP.M(b);var c=$APP.D(b,$APP.Dm),d=$APP.D(b,$APP.$h),e=$APP.D(b,$APP.pl),g=$APP.D(b,$APP.Mh),h=$APP.D(b,$APP.X),l=wp(a);l=$APP.M(l);l=$APP.D(l,$APP.Hj);a.setAttribute("data-orientation",op(e));a.setAttribute("data-size",tp(g));l.innerHTML="";c=$APP.t($APP.Xd($APP.xh,c));e=null;for(var m=g=0;;)if(m<g){var p=e.F(null,m),q=$APP.Ac(p,0,null);p=$APP.Ac(p,1,null);var v=q<
11
- d?$APP.Nm:$APP.B.i(q,d)?$APP.$h:Bp;l.appendChild(Ap(q,p,v,h));m+=1}else if(c=$APP.t(c))$APP.Nc(c)?(g=$APP.yb(c),c=$APP.zb(c),e=g,g=$APP.z(g)):(g=$APP.u(c),e=$APP.Ac(g,0,null),g=$APP.Ac(g,1,null),m=e<d?$APP.Nm:$APP.B.i(e,d)?$APP.$h:Bp,l.appendChild(Ap(e,g,m,h)),c=$APP.w(c),e=null,g=0),m=0;else break;a.__xStepperModel=b}},Dp=function(a){function b(d){var e=$APP.k(a,"__xStepperModel");e=$APP.n(e)?e:yp(a);$APP.n($APP.X.g(e))||(d=d.target.closest("[part\x3dstep-indicator]"),$APP.n(d)&&(d=parseInt(d.closest("[part\x3dstep]").getAttribute("data-index"),
12
- 10),e=$APP.$h.g(e),typeof d==="number"&&$APP.r(isNaN(d))&&$APP.N(d,e)&&(e=$APP.Hh(new $APP.R(null,2,[$APP.Vh,e,$APP.bm,d],null)),e=new CustomEvent("x-stepper-change",{detail:e,bubbles:!0,composed:!0,cancelable:!0}),e=a.dispatchEvent(e),$APP.n(e)&&a.setAttribute("current",""+$APP.T.g(d)))));return null}var c=wp(a);c=$APP.M(c);$APP.D(c,$APP.Hj).addEventListener("click",b);$APP.ja(a,"__xStepperHandlers",{click:b})},Ep=function(a){var b=$APP.k(a,"__xStepperHandlers");if($APP.n(b)){var c=$APP.k(a,"__xStepperRefs");
13
- $APP.n(c)&&(c=$APP.Hj.g(c),b=$APP.k(b,"click"),$APP.n($APP.n(c)?b:c)&&c.removeEventListener("click",b))}a.__xStepperHandlers=null},Fp=function(a){Object.defineProperty(a,"steps",{get:function(){var b=this.getAttribute("steps");return $APP.n(b)?b:"[]"},set:function(b){return $APP.n(b)?this.setAttribute("steps",""+$APP.T.g(b)):this.removeAttribute("steps")},enumerable:!0,configurable:!0});Object.defineProperty(a,"current",{get:function(){return up(this.getAttribute("current"))},set:function(b){return b==
14
- null?this.removeAttribute("current"):this.setAttribute("current",""+$APP.T.g(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"orientation",{get:function(){return op(mp(this.getAttribute("orientation")))},set:function(b){return $APP.n(b)?this.setAttribute("orientation",""+$APP.T.g(b)):this.removeAttribute("orientation")},enumerable:!0,configurable:!0});Object.defineProperty(a,"size",{get:function(){return tp(rp(this.getAttribute("size")))},set:function(b){return $APP.n(b)?this.setAttribute("size",
15
- ""+$APP.T.g(b)):this.removeAttribute("size")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0})},Hp=function(){var a=class extends HTMLElement{};a.observedAttributes=Gp;a.prototype.connectedCallback=function(){wp(this);Ep(this);Dp(this);Cp(this);return null};a.prototype.disconnectedCallback=function(){Ep(this);
16
- return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&Cp(this);return null};Fp(a.prototype);return a},Ip=function(){$APP.n(customElements.get("x-stepper"))||customElements.define("x-stepper",Hp());return null},Bp=new $APP.K(null,"upcoming","upcoming",1873315471),xp=new $APP.K(null,"steps-raw","steps-raw",1741812533),qp=new $APP.K(null,"md","md",707286655),Jp=new $APP.K(null,"lg","lg",-80787836),Kp=new $APP.K(null,"sm","sm",-1402575065);var Gp=["steps","current","orientation","size","disabled"];$APP.Pd(["x-stepper-change",new $APP.R(null,2,[$APP.V,new $APP.R(null,2,[$APP.Vh,$APP.W,$APP.bm,$APP.W],null),$APP.jm,!0],null)]);var lp=new $APP.R(null,2,["horizontal",$APP.Gl,"vertical",$APP.zj],null),np=new $APP.R(null,2,[$APP.Gl,"horizontal",$APP.zj,"vertical"],null),pp=new $APP.R(null,3,["sm",Kp,"md",qp,"lg",Jp],null),sp=new $APP.R(null,3,[Kp,"sm",qp,"md",Jp,"lg"],null);$APP.ha("baredom.exports.x_stepper.init",Ip);export const init=Ip;
8
+ $APP.T.g(y));}}b=$APP.n(b)?b:"";g.setAttribute("part","step");g.setAttribute("role","listitem");g.setAttribute("data-index",""+$APP.T.g(a));g.setAttribute("data-state",y);h.setAttribute("part","step-track");l.setAttribute("part","step-indicator");l.setAttribute("type","button");l.setAttribute("aria-label",Bp(a,b,c));$APP.B.i(c,$APP.$h)?l.setAttribute("aria-current","step"):l.removeAttribute("aria-current");l.setAttribute("tabindex",$APP.n(d)?"-1":"0");$APP.n(d)&&l.setAttribute("aria-disabled","true");
9
+ m.setAttribute("part","step-number");m.setAttribute("aria-hidden","true");m.textContent=$APP.B.i(c,$APP.Pm)?"✓":""+$APP.T.g(a+1);p.setAttribute("part","step-connector");p.setAttribute("aria-hidden","true");q.setAttribute("part","step-content");v.setAttribute("part","step-label");v.textContent=b;x.setAttribute("part","step-description");$APP.n($APP.n(e)?$APP.N(e,""):e)?(x.textContent=e,x.style.display="block"):x.style.display="none";l.appendChild(m);h.appendChild(l);h.appendChild(p);q.appendChild(v);
10
+ q.appendChild(x);g.appendChild(h);g.appendChild(q);return g},Ep=function(a){var b=Ap(a);if($APP.N($APP.k(a,"__xStepperModel"),b)){b=$APP.M(b);var c=$APP.D(b,$APP.Fm),d=$APP.D(b,$APP.$h),e=$APP.D(b,$APP.rl),g=$APP.D(b,$APP.Mh),h=$APP.D(b,$APP.X),l=yp(a);l=$APP.M(l);l=$APP.D(l,$APP.Hj);a.setAttribute("data-orientation",qp(e));a.setAttribute("data-size",vp(g));l.innerHTML="";c=$APP.t($APP.Wd($APP.xh,c));e=null;for(var m=g=0;;)if(m<g){var p=e.F(null,m),q=$APP.Ac(p,0,null);p=$APP.Ac(p,1,null);var v=q<
11
+ d?$APP.Pm:$APP.B.i(q,d)?$APP.$h:Dp;l.appendChild(Cp(q,p,v,h));m+=1}else if(c=$APP.t(c))$APP.Nc(c)?(g=$APP.yb(c),c=$APP.zb(c),e=g,g=$APP.z(g)):(g=$APP.u(c),e=$APP.Ac(g,0,null),g=$APP.Ac(g,1,null),m=e<d?$APP.Pm:$APP.B.i(e,d)?$APP.$h:Dp,l.appendChild(Cp(e,g,m,h)),c=$APP.w(c),e=null,g=0),m=0;else break;a.__xStepperModel=b}},Fp=function(a){function b(d){var e=$APP.k(a,"__xStepperModel");e=$APP.n(e)?e:Ap(a);$APP.n($APP.X.g(e))||(d=d.target.closest("[part\x3dstep-indicator]"),$APP.n(d)&&(d=parseInt(d.closest("[part\x3dstep]").getAttribute("data-index"),
12
+ 10),e=$APP.$h.g(e),typeof d==="number"&&$APP.r(isNaN(d))&&$APP.N(d,e)&&(e=$APP.Hh(new $APP.Q(null,2,[$APP.Vh,e,$APP.dm,d],null)),e=new CustomEvent("x-stepper-change",{detail:e,bubbles:!0,composed:!0,cancelable:!0}),e=a.dispatchEvent(e),$APP.n(e)&&a.setAttribute("current",""+$APP.T.g(d)))));return null}var c=yp(a);c=$APP.M(c);$APP.D(c,$APP.Hj).addEventListener("click",b);$APP.ja(a,"__xStepperHandlers",{click:b})},Gp=function(a){var b=$APP.k(a,"__xStepperHandlers");if($APP.n(b)){var c=$APP.k(a,"__xStepperRefs");
13
+ $APP.n(c)&&(c=$APP.Hj.g(c),b=$APP.k(b,"click"),$APP.n($APP.n(c)?b:c)&&c.removeEventListener("click",b))}a.__xStepperHandlers=null},Hp=function(a){Object.defineProperty(a,"steps",{get:function(){var b=this.getAttribute("steps");return $APP.n(b)?b:"[]"},set:function(b){return $APP.n(b)?this.setAttribute("steps",""+$APP.T.g(b)):this.removeAttribute("steps")},enumerable:!0,configurable:!0});Object.defineProperty(a,"current",{get:function(){return wp(this.getAttribute("current"))},set:function(b){return b==
14
+ null?this.removeAttribute("current"):this.setAttribute("current",""+$APP.T.g(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"orientation",{get:function(){return qp(op(this.getAttribute("orientation")))},set:function(b){return $APP.n(b)?this.setAttribute("orientation",""+$APP.T.g(b)):this.removeAttribute("orientation")},enumerable:!0,configurable:!0});Object.defineProperty(a,"size",{get:function(){return vp(tp(this.getAttribute("size")))},set:function(b){return $APP.n(b)?this.setAttribute("size",
15
+ ""+$APP.T.g(b)):this.removeAttribute("size")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0})},Jp=function(){var a=class extends HTMLElement{};a.observedAttributes=Ip;a.prototype.connectedCallback=function(){yp(this);Gp(this);Fp(this);Ep(this);return null};a.prototype.disconnectedCallback=function(){Gp(this);
16
+ return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&Ep(this);return null};Hp(a.prototype);return a},Kp=function(){$APP.n(customElements.get("x-stepper"))||customElements.define("x-stepper",Jp());return null},Dp=new $APP.K(null,"upcoming","upcoming",1873315471),zp=new $APP.K(null,"steps-raw","steps-raw",1741812533),sp=new $APP.K(null,"md","md",707286655),Lp=new $APP.K(null,"lg","lg",-80787836),Mp=new $APP.K(null,"sm","sm",-1402575065);var Ip=["steps","current","orientation","size","disabled"];$APP.Pd(["x-stepper-change",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,2,[$APP.Vh,$APP.W,$APP.dm,$APP.W],null),$APP.lm,!0],null)]);var np=new $APP.Q(null,2,["horizontal",$APP.Il,"vertical",$APP.zj],null),pp=new $APP.Q(null,2,[$APP.Il,"horizontal",$APP.zj,"vertical"],null),rp=new $APP.Q(null,3,["sm",Mp,"md",sp,"lg",Lp],null),up=new $APP.Q(null,3,[Mp,"sm",sp,"md",Lp,"lg"],null);$APP.ha("baredom.exports.x_stepper.init",Kp);export const init=Kp;