@m3e/web 2.3.0 → 2.3.2

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 (152) hide show
  1. package/LICENSE +1 -1
  2. package/dist/all.js +249 -26
  3. package/dist/all.js.map +1 -1
  4. package/dist/all.min.js +45 -45
  5. package/dist/all.min.js.map +1 -1
  6. package/dist/app-bar.js +1 -1
  7. package/dist/app-bar.min.js +1 -1
  8. package/dist/autocomplete.js +27 -7
  9. package/dist/autocomplete.js.map +1 -1
  10. package/dist/autocomplete.min.js +2 -2
  11. package/dist/autocomplete.min.js.map +1 -1
  12. package/dist/avatar.js +1 -1
  13. package/dist/avatar.min.js +1 -1
  14. package/dist/badge.js +1 -1
  15. package/dist/badge.min.js +1 -1
  16. package/dist/bottom-sheet.js +1 -1
  17. package/dist/bottom-sheet.min.js +1 -1
  18. package/dist/button-group.js +1 -1
  19. package/dist/button-group.min.js +1 -1
  20. package/dist/button.js +1 -1
  21. package/dist/button.min.js +1 -1
  22. package/dist/calendar.js +1 -1
  23. package/dist/calendar.min.js +1 -1
  24. package/dist/card.js +1 -1
  25. package/dist/card.min.js +1 -1
  26. package/dist/checkbox.js +1 -1
  27. package/dist/checkbox.min.js +1 -1
  28. package/dist/chips.js +1 -1
  29. package/dist/chips.min.js +1 -1
  30. package/dist/core-a11y.js +5 -3
  31. package/dist/core-a11y.js.map +1 -1
  32. package/dist/core-a11y.min.js +6 -6
  33. package/dist/core-a11y.min.js.map +1 -1
  34. package/dist/core-anchoring.js +1 -1
  35. package/dist/core-anchoring.min.js +1 -1
  36. package/dist/core-bidi.js +1 -1
  37. package/dist/core-bidi.min.js +1 -1
  38. package/dist/core-layout.js +1 -1
  39. package/dist/core-layout.min.js +1 -1
  40. package/dist/core-platform.js +1 -1
  41. package/dist/core-platform.min.js +1 -1
  42. package/dist/core.js +4 -4
  43. package/dist/core.js.map +1 -1
  44. package/dist/core.min.js +1 -1
  45. package/dist/core.min.js.map +1 -1
  46. package/dist/css-custom-data.json +60 -60
  47. package/dist/custom-elements.json +986 -837
  48. package/dist/datepicker.js +1 -1
  49. package/dist/datepicker.min.js +1 -1
  50. package/dist/dialog.js +1 -1
  51. package/dist/dialog.min.js +1 -1
  52. package/dist/divider.js +1 -1
  53. package/dist/divider.min.js +1 -1
  54. package/dist/drawer-container.js +1 -1
  55. package/dist/drawer-container.min.js +1 -1
  56. package/dist/expansion-panel.js +1 -1
  57. package/dist/expansion-panel.min.js +1 -1
  58. package/dist/fab-menu.js +1 -1
  59. package/dist/fab-menu.min.js +1 -1
  60. package/dist/fab.js +1 -1
  61. package/dist/fab.min.js +1 -1
  62. package/dist/form-field.js +1 -1
  63. package/dist/form-field.min.js +1 -1
  64. package/dist/heading.js +1 -1
  65. package/dist/heading.min.js +1 -1
  66. package/dist/html-custom-data.json +25 -25
  67. package/dist/icon-button.js +1 -1
  68. package/dist/icon-button.min.js +1 -1
  69. package/dist/icon.js +146 -6
  70. package/dist/icon.js.map +1 -1
  71. package/dist/icon.min.js +2 -2
  72. package/dist/icon.min.js.map +1 -1
  73. package/dist/index.js +1 -1
  74. package/dist/index.min.js +1 -1
  75. package/dist/list.js +1 -1
  76. package/dist/list.min.js +1 -1
  77. package/dist/loading-indicator.js +1 -1
  78. package/dist/loading-indicator.min.js +1 -1
  79. package/dist/menu.js +1 -1
  80. package/dist/menu.min.js +1 -1
  81. package/dist/nav-bar.js +1 -1
  82. package/dist/nav-bar.min.js +1 -1
  83. package/dist/nav-menu.js +1 -1
  84. package/dist/nav-menu.min.js +1 -1
  85. package/dist/nav-rail.js +1 -1
  86. package/dist/nav-rail.min.js +1 -1
  87. package/dist/option.js +1 -1
  88. package/dist/option.min.js +1 -1
  89. package/dist/paginator.js +1 -1
  90. package/dist/paginator.min.js +1 -1
  91. package/dist/progress-indicator.js +1 -1
  92. package/dist/progress-indicator.min.js +1 -1
  93. package/dist/radio-group.js +1 -1
  94. package/dist/radio-group.min.js +1 -1
  95. package/dist/search.js +1 -1
  96. package/dist/search.min.js +1 -1
  97. package/dist/segmented-button.js +1 -1
  98. package/dist/segmented-button.min.js +1 -1
  99. package/dist/select.js +29 -10
  100. package/dist/select.js.map +1 -1
  101. package/dist/select.min.js +2 -2
  102. package/dist/select.min.js.map +1 -1
  103. package/dist/shape.js +1 -1
  104. package/dist/shape.min.js +1 -1
  105. package/dist/skeleton.js +48 -4
  106. package/dist/skeleton.js.map +1 -1
  107. package/dist/skeleton.min.js +2 -2
  108. package/dist/skeleton.min.js.map +1 -1
  109. package/dist/slide-group.js +1 -1
  110. package/dist/slide-group.min.js +1 -1
  111. package/dist/slider.js +1 -1
  112. package/dist/slider.min.js +1 -1
  113. package/dist/snackbar.js +1 -1
  114. package/dist/snackbar.min.js +1 -1
  115. package/dist/split-button.js +1 -1
  116. package/dist/split-button.min.js +1 -1
  117. package/dist/split-pane.js +1 -1
  118. package/dist/split-pane.min.js +1 -1
  119. package/dist/src/autocomplete/AutocompleteElement.d.ts.map +1 -1
  120. package/dist/src/core/a11y/list-key/ListKeyManager.d.ts.map +1 -1
  121. package/dist/src/core/shared/primitives/ElevationElement.d.ts +1 -1
  122. package/dist/src/core/shared/primitives/FocusRingElement.d.ts +1 -1
  123. package/dist/src/core/shared/primitives/RippleElement.d.ts +1 -1
  124. package/dist/src/icon/IconElement.d.ts +7 -1
  125. package/dist/src/icon/IconElement.d.ts.map +1 -1
  126. package/dist/src/icon/IconRegistry.d.ts +54 -0
  127. package/dist/src/icon/IconRegistry.d.ts.map +1 -0
  128. package/dist/src/icon/IconWeight.d.ts +3 -0
  129. package/dist/src/icon/IconWeight.d.ts.map +1 -0
  130. package/dist/src/icon/index.d.ts +1 -0
  131. package/dist/src/icon/index.d.ts.map +1 -1
  132. package/dist/src/icon/registerIcon.d.ts +14 -0
  133. package/dist/src/icon/registerIcon.d.ts.map +1 -0
  134. package/dist/src/select/SelectElement.d.ts.map +1 -1
  135. package/dist/src/skeleton/SkeletonElement.d.ts.map +1 -1
  136. package/dist/stepper.js +1 -1
  137. package/dist/stepper.min.js +1 -1
  138. package/dist/switch.js +1 -1
  139. package/dist/switch.min.js +1 -1
  140. package/dist/tabs.js +1 -1
  141. package/dist/tabs.min.js +1 -1
  142. package/dist/textarea-autosize.js +1 -1
  143. package/dist/textarea-autosize.min.js +1 -1
  144. package/dist/theme.js +1 -1
  145. package/dist/theme.min.js +1 -1
  146. package/dist/toc.js +1 -1
  147. package/dist/toc.min.js +1 -1
  148. package/dist/toolbar.js +1 -1
  149. package/dist/toolbar.min.js +1 -1
  150. package/dist/tooltip.js +1 -1
  151. package/dist/tooltip.min.js +1 -1
  152. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license MIT
3
- * Copyright (c) 2025 matraic
3
+ * Copyright (c) 2025–2026 matraic
4
4
  * See LICENSE file in the project root for full license text.
5
5
  */
6
6
  import{__classPrivateFieldGet as t,__classPrivateFieldSet as e,__decorate as n}from"tslib";import{LitElement as o,html as i,unsafeCSS as r,css as s}from"lit";import{property as l}from"lit/decorators.js";import{SuppressInitialAnimation as a,AttachInternals as c,ScrollController as f,ResizeController as h,DesignToken as u,customElement as d,setCustomState as p}from"@m3e/web/core";import{M3eDirectionality as m}from"@m3e/web/core/bidi";const g=Math.min,y=Math.max,w=Math.round,x=Math.floor,v=t=>({x:t,y:t}),b={left:"right",right:"left",bottom:"top",top:"bottom"};function R(t,e,n){return y(t,g(e,n))}function A(t,e){return"function"==typeof t?t(e):t}function k(t){return t.split("-")[0]}function L(t){return t.split("-")[1]}function E(t){return"x"===t?"y":"x"}function S(t){return"y"===t?"height":"width"}function T(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function W(t){return E(T(t))}function C(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const O=["left","right"],$=["right","left"],D=["top","bottom"],P=["bottom","top"];function M(t,e,n,o){const i=L(t);let r=function(t,e,n){switch(t){case"top":case"bottom":return n?e?$:O:e?O:$;case"left":case"right":return e?D:P;default:return[]}}(k(t),"start"===n,o);return i&&(r=r.map(t=>t+"-"+i),e&&(r=r.concat(r.map(C)))),r}function F(t){const e=k(t);return b[e]+t.slice(e.length)}function B(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function N(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function H(t,e,n){let{reference:o,floating:i}=t;const r=T(e),s=W(e),l=S(s),a=k(e),c="y"===r,f=o.x+o.width/2-i.width/2,h=o.y+o.height/2-i.height/2,u=o[l]/2-i[l]/2;let d;switch(a){case"top":d={x:f,y:o.y-i.height};break;case"bottom":d={x:f,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:h};break;case"left":d={x:o.x-i.width,y:h};break;default:d={x:o.x,y:o.y}}switch(L(e)){case"start":d[s]-=u*(n&&c?-1:1);break;case"end":d[s]+=u*(n&&c?-1:1)}return d}async function V(t,e){var n;void 0===e&&(e={});const{x:o,y:i,platform:r,rects:s,elements:l,strategy:a}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:u=!1,padding:d=0}=A(e,t),p=B(d),m=l[u?"floating"===h?"reference":"floating":h],g=N(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(m)))||n?m:m.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(l.floating)),boundary:c,rootBoundary:f,strategy:a})),y="floating"===h?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,w=await(null==r.getOffsetParent?void 0:r.getOffsetParent(l.floating)),x=await(null==r.isElement?void 0:r.isElement(w))&&await(null==r.getScale?void 0:r.getScale(w))||{x:1,y:1},v=N(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:w,strategy:a}):y);return{top:(g.top-v.top+p.top)/x.y,bottom:(v.bottom-g.bottom+p.bottom)/x.y,left:(g.left-v.left+p.left)/x.x,right:(v.right-g.right+p.right)/x.x}}function z(t){const e=g(...t.map(t=>t.left)),n=g(...t.map(t=>t.top));return{x:e,y:n,width:y(...t.map(t=>t.right))-e,height:y(...t.map(t=>t.bottom))-n}}const Y=new Set(["left","top"]);function j(){return"undefined"!=typeof window}function I(t){return _(t)?(t.nodeName||"").toLowerCase():"#document"}function q(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function X(t){var e;return null==(e=(_(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function _(t){return!!j()&&(t instanceof Node||t instanceof q(t).Node)}function G(t){return!!j()&&(t instanceof Element||t instanceof q(t).Element)}function J(t){return!!j()&&(t instanceof HTMLElement||t instanceof q(t).HTMLElement)}function K(t){return!(!j()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof q(t).ShadowRoot)}function Q(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=lt(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&"inline"!==i&&"contents"!==i}function U(t){return/^(table|td|th)$/.test(I(t))}function Z(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const tt=/transform|translate|scale|rotate|perspective|filter/,et=/paint|layout|strict|content/,nt=t=>!!t&&"none"!==t;let ot;function it(t){const e=G(t)?lt(t):t;return nt(e.transform)||nt(e.translate)||nt(e.scale)||nt(e.rotate)||nt(e.perspective)||!rt()&&(nt(e.backdropFilter)||nt(e.filter))||tt.test(e.willChange||"")||et.test(e.contain||"")}function rt(){return null==ot&&(ot="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ot}function st(t){return/^(html|body|#document)$/.test(I(t))}function lt(t){return q(t).getComputedStyle(t)}function at(t){return G(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ct(t){if("html"===I(t))return t;const e=t.assignedSlot||t.parentNode||K(t)&&t.host||X(t);return K(e)?e.host:e}function ft(t){const e=ct(t);return st(e)?t.ownerDocument?t.ownerDocument.body:t.body:J(e)&&Q(e)?e:ft(e)}function ht(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const i=ft(t),r=i===(null==(o=t.ownerDocument)?void 0:o.body),s=q(i);if(r){const t=ut(s);return e.concat(s,s.visualViewport||[],Q(i)?i:[],t&&n?ht(t):[])}return e.concat(i,ht(i,[],n))}function ut(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function dt(t){const e=lt(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=J(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,l=w(n)!==r||w(o)!==s;return l&&(n=r,o=s),{width:n,height:o,$:l}}function pt(t){return G(t)?t:t.contextElement}function mt(t){const e=pt(t);if(!J(e))return v(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=dt(e);let s=(r?w(n.width):n.width)/o,l=(r?w(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),l&&Number.isFinite(l)||(l=1),{x:s,y:l}}const gt=v(0);function yt(t){const e=q(t);return rt()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:gt}function wt(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const i=t.getBoundingClientRect(),r=pt(t);let s=v(1);e&&(o?G(o)&&(s=mt(o)):s=mt(t));const l=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==q(t))&&e}(r,n,o)?yt(r):v(0);let a=(i.left+l.x)/s.x,c=(i.top+l.y)/s.y,f=i.width/s.x,h=i.height/s.y;if(r){const t=q(r),e=o&&G(o)?q(o):o;let n=t,i=ut(n);for(;i&&o&&e!==n;){const t=mt(i),e=i.getBoundingClientRect(),o=lt(i),r=e.left+(i.clientLeft+parseFloat(o.paddingLeft))*t.x,s=e.top+(i.clientTop+parseFloat(o.paddingTop))*t.y;a*=t.x,c*=t.y,f*=t.x,h*=t.y,a+=r,c+=s,n=q(i),i=ut(n)}}return N({width:f,height:h,x:a,y:c})}function xt(t,e){const n=at(t).scrollLeft;return e?e.left+n:wt(X(t)).left+n}function vt(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-xt(t,n),y:n.top+e.scrollTop}}function bt(t,e,n){let o;if("viewport"===e)o=function(t,e){const n=q(t),o=X(t),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,l=0,a=0;if(i){r=i.width,s=i.height;const t=rt();(!t||t&&"fixed"===e)&&(l=i.offsetLeft,a=i.offsetTop)}const c=xt(o);if(c<=0){const t=o.ownerDocument,e=t.body,n=getComputedStyle(e),i="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(o.clientWidth-e.clientWidth-i);s<=25&&(r-=s)}else c<=25&&(r+=c);return{width:r,height:s,x:l,y:a}}(t,n);else if("document"===e)o=function(t){const e=X(t),n=at(t),o=t.ownerDocument.body,i=y(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=y(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+xt(t);const l=-n.scrollTop;return"rtl"===lt(o).direction&&(s+=y(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:l}}(X(t));else if(G(e))o=function(t,e){const n=wt(t,!0,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=J(t)?mt(t):v(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:i*r.x,y:o*r.y}}(e,n);else{const n=yt(t);o={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return N(o)}function Rt(t,e){const n=ct(t);return!(n===e||!G(n)||st(n))&&("fixed"===lt(n).position||Rt(n,e))}function At(t,e,n){const o=J(e),i=X(e),r="fixed"===n,s=wt(t,!0,r,e);let l={scrollLeft:0,scrollTop:0};const a=v(0);function c(){a.x=xt(i)}if(o||!o&&!r)if(("body"!==I(e)||Q(i))&&(l=at(e)),o){const t=wt(e,!0,r,e);a.x=t.x+e.clientLeft,a.y=t.y+e.clientTop}else i&&c();r&&!o&&i&&c();const f=!i||o||r?v(0):vt(i,l);return{x:s.left+l.scrollLeft-a.x-f.x,y:s.top+l.scrollTop-a.y-f.y,width:s.width,height:s.height}}function kt(t){return"static"===lt(t).position}function Lt(t,e){if(!J(t)||"fixed"===lt(t).position)return null;if(e)return e(t);let n=t.offsetParent;return X(t)===n&&(n=n.ownerDocument.body),n}function Et(t,e){const n=q(t);if(Z(t))return n;if(!J(t)){let e=ct(t);for(;e&&!st(e);){if(G(e)&&!kt(e))return e;e=ct(e)}return n}let o=Lt(t,e);for(;o&&U(o)&&kt(o);)o=Lt(o,e);return o&&st(o)&&kt(o)&&!it(o)?n:o||function(t){let e=ct(t);for(;J(e)&&!st(e);){if(it(e))return e;if(Z(e))return null;e=ct(e)}return null}(t)||n}const St={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r="fixed"===i,s=X(o),l=!!e&&Z(e.floating);if(o===s||l&&r)return n;let a={scrollLeft:0,scrollTop:0},c=v(1);const f=v(0),h=J(o);if((h||!h&&!r)&&(("body"!==I(o)||Q(s))&&(a=at(o)),h)){const t=wt(o);c=mt(o),f.x=t.x+o.clientLeft,f.y=t.y+o.clientTop}const u=!s||h||r?v(0):vt(s,a);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+f.x+u.x,y:n.y*c.y-a.scrollTop*c.y+f.y+u.y}},getDocumentElement:X,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[..."clippingAncestors"===n?Z(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=ht(t,[],!1).filter(t=>G(t)&&"body"!==I(t)),i=null;const r="fixed"===lt(t).position;let s=r?ct(t):t;for(;G(s)&&!st(s);){const e=lt(s),n=it(s);n||"fixed"!==e.position||(i=null),(r?!n&&!i:!n&&"static"===e.position&&i&&("absolute"===i.position||"fixed"===i.position)||Q(s)&&!n&&Rt(t,s))?o=o.filter(t=>t!==s):i=e,s=ct(s)}return e.set(t,o),o}(e,this._c):[].concat(n),o],s=bt(e,r[0],i);let l=s.top,a=s.right,c=s.bottom,f=s.left;for(let t=1;t<r.length;t++){const n=bt(e,r[t],i);l=y(n.top,l),a=g(n.right,a),c=g(n.bottom,c),f=y(n.left,f)}return{width:a-f,height:c-l,x:f,y:l}},getOffsetParent:Et,getElementRects:async function(t){const e=this.getOffsetParent||Et,n=this.getDimensions,o=await n(t.floating);return{reference:At(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=dt(t);return{width:e,height:n}},getScale:mt,isElement:G,isRTL:function(t){return"rtl"===lt(t).direction}};function Tt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Wt(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:a=!1}=o,c=pt(t),f=i||r?[...c?ht(c):[],...e?ht(e):[]]:[];f.forEach(t=>{i&&t.addEventListener("scroll",n,{passive:!0}),r&&t.addEventListener("resize",n)});const h=c&&l?function(t,e){let n,o=null;const i=X(t);function r(){var t;clearTimeout(n),null==(t=o)||t.disconnect(),o=null}return function s(l,a){void 0===l&&(l=!1),void 0===a&&(a=1),r();const c=t.getBoundingClientRect(),{left:f,top:h,width:u,height:d}=c;if(l||e(),!u||!d)return;const p={rootMargin:-x(h)+"px "+-x(i.clientWidth-(f+u))+"px "+-x(i.clientHeight-(h+d))+"px "+-x(f)+"px",threshold:y(0,g(1,a))||1};let m=!0;function w(e){const o=e[0].intersectionRatio;if(o!==a){if(!m)return s();o?s(!1,o):n=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==o||Tt(c,t.getBoundingClientRect())||s(),m=!1}try{o=new IntersectionObserver(w,{...p,root:i.ownerDocument})}catch(t){o=new IntersectionObserver(w,p)}o.observe(t)}(!0),r}(c,n):null;let u,d=-1,p=null;s&&(p=new ResizeObserver(t=>{let[o]=t;o&&o.target===c&&p&&e&&(p.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var t;null==(t=p)||t.observe(e)})),n()}),c&&!a&&p.observe(c),e&&p.observe(e));let m=a?wt(t):null;return a&&function e(){const o=wt(t);m&&!Tt(m,o)&&n();m=o,u=requestAnimationFrame(e)}(),n(),()=>{var t;f.forEach(t=>{i&&t.removeEventListener("scroll",n),r&&t.removeEventListener("resize",n)}),null==h||h(),null==(t=p)||t.disconnect(),p=null,a&&cancelAnimationFrame(u)}}const Ct=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:s,middlewareData:l}=e,a=await async function(t,e){const{placement:n,platform:o,elements:i}=t,r=await(null==o.isRTL?void 0:o.isRTL(i.floating)),s=k(n),l=L(n),a="y"===T(n),c=Y.has(s)?-1:1,f=r&&a?-1:1,h=A(e,t);let{mainAxis:u,crossAxis:d,alignmentAxis:p}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&"number"==typeof p&&(d="end"===l?-1*p:p),a?{x:d*f,y:u*c}:{x:u*c,y:d*f}}(e,t);return s===(null==(n=l.offset)?void 0:n.placement)&&null!=(o=l.arrow)&&o.alignmentOffset?{}:{x:i+a.x,y:r+a.y,data:{...a,placement:s}}}}},Ot=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i,platform:r}=e,{mainAxis:s=!0,crossAxis:l=!1,limiter:a={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...c}=A(t,e),f={x:n,y:o},h=await r.detectOverflow(e,c),u=T(k(i)),d=E(u);let p=f[d],m=f[u];if(s){const t="y"===d?"bottom":"right";p=R(p+h["y"===d?"top":"left"],p,p-h[t])}if(l){const t="y"===u?"bottom":"right";m=R(m+h["y"===u?"top":"left"],m,m-h[t])}const g=a.fn({...e,[d]:p,[u]:m});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[d]:s,[u]:l}}}}}},$t=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:l,platform:a,elements:c}=e,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:u,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=A(t,e);if(null!=(n=r.arrow)&&n.alignmentOffset)return{};const y=k(i),w=T(l),x=k(l)===l,v=await(null==a.isRTL?void 0:a.isRTL(c.floating)),b=u||(x||!m?[F(l)]:function(t){const e=F(t);return[C(t),e,C(e)]}(l)),R="none"!==p;!u&&R&&b.push(...M(l,m,p,v));const E=[l,...b],O=await a.detectOverflow(e,g),$=[];let D=(null==(o=r.flip)?void 0:o.overflows)||[];if(f&&$.push(O[y]),h){const t=function(t,e,n){void 0===n&&(n=!1);const o=L(t),i=W(t),r=S(i);let s="x"===i?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=F(s)),[s,F(s)]}(i,s,v);$.push(O[t[0]],O[t[1]])}if(D=[...D,{placement:i,overflows:$}],!$.every(t=>t<=0)){var P,B;const t=((null==(P=r.flip)?void 0:P.index)||0)+1,e=E[t];if(e){if(!("alignment"===h&&w!==T(e))||D.every(t=>T(t.placement)!==w||t.overflows[0]>0))return{data:{index:t,overflows:D},reset:{placement:e}}}let n=null==(B=D.filter(t=>t.overflows[0]<=0).sort((t,e)=>t.overflows[1]-e.overflows[1])[0])?void 0:B.placement;if(!n)switch(d){case"bestFit":{var N;const t=null==(N=D.filter(t=>{if(R){const e=T(t.placement);return e===w||"y"===e}return!0}).map(t=>[t.placement,t.overflows.filter(t=>t>0).reduce((t,e)=>t+e,0)]).sort((t,e)=>t[1]-e[1])[0])?void 0:N[0];t&&(n=t);break}case"initialPlacement":n=l}if(i!==n)return{reset:{placement:n}}}return{}}}},Dt=function(t){return void 0===t&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:o,rects:i,platform:r,strategy:s}=e,{padding:l=2,x:a,y:c}=A(t,e),f=Array.from(await(null==r.getClientRects?void 0:r.getClientRects(o.reference))||[]),h=function(t){const e=t.slice().sort((t,e)=>t.y-e.y),n=[];let o=null;for(let t=0;t<e.length;t++){const i=e[t];!o||i.y-o.y>o.height/2?n.push([i]):n[n.length-1].push(i),o=i}return n.map(t=>N(z(t)))}(f),u=N(z(f)),d=B(l);const p=await r.getElementRects({reference:{getBoundingClientRect:function(){if(2===h.length&&h[0].left>h[1].right&&null!=a&&null!=c)return h.find(t=>a>t.left-d.left&&a<t.right+d.right&&c>t.top-d.top&&c<t.bottom+d.bottom)||u;if(h.length>=2){if("y"===T(n)){const t=h[0],e=h[h.length-1],o="top"===k(n),i=t.top,r=e.bottom,s=o?t.left:e.left,l=o?t.right:e.right;return{top:i,bottom:r,left:s,right:l,width:l-s,height:r-i,x:s,y:i}}const t="left"===k(n),e=y(...h.map(t=>t.right)),o=g(...h.map(t=>t.left)),i=h.filter(n=>t?n.left===o:n.right===e),r=i[0].top,s=i[i.length-1].bottom;return{top:r,bottom:s,left:o,right:e,width:e-o,height:s-r,x:o,y:r}}return u}},floating:o.floating,strategy:s});return i.reference.x!==p.reference.x||i.reference.y!==p.reference.y||i.reference.width!==p.reference.width||i.reference.height!==p.reference.height?{reset:{rects:p}}:{}}}},Pt=function(t){return void 0===t&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:i,rects:r,middlewareData:s}=e,{offset:l=0,mainAxis:a=!0,crossAxis:c=!0}=A(t,e),f={x:n,y:o},h=T(i),u=E(h);let d=f[u],p=f[h];const m=A(l,e),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(a){const t="y"===u?"height":"width",e=r.reference[u]-r.floating[t]+g.mainAxis,n=r.reference[u]+r.reference[t]-g.mainAxis;d<e?d=e:d>n&&(d=n)}if(c){var y,w;const t="y"===u?"width":"height",e=Y.has(k(i)),n=r.reference[h]-r.floating[t]+(e&&(null==(y=s.offset)?void 0:y[h])||0)+(e?0:g.crossAxis),o=r.reference[h]+r.reference[t]+(e?0:(null==(w=s.offset)?void 0:w[h])||0)-(e?g.crossAxis:0);p<n?p=n:p>o&&(p=o)}return{[u]:d,[h]:p}}}},Mt=(t,e,n)=>{const o=new Map,i={platform:St,...n},r={...i.platform,_c:o};return(async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,l=s.detectOverflow?s:{...s,detectOverflow:V},a=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:h}=H(c,o,a),u=o,d=0;const p={};for(let n=0;n<r.length;n++){const m=r[n];if(!m)continue;const{name:g,fn:y}=m,{x:w,y:x,data:v,reset:b}=await y({x:f,y:h,initialPlacement:o,placement:u,strategy:i,middlewareData:p,rects:c,platform:l,elements:{reference:t,floating:e}});f=null!=w?w:f,h=null!=x?x:h,p[g]={...p[g],...v},b&&d<50&&(d++,"object"==typeof b&&(b.placement&&(u=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:t,floating:e,strategy:i}):b.rects),({x:f,y:h}=H(c,u,a))),n=-1)}return{x:f,y:h,placement:u,strategy:i,middlewareData:p}})(t,e,{...i,platform:r})};function Ft(t){return function(t){for(let e=t;e;e=Bt(e))if(e instanceof Element&&"none"===getComputedStyle(e).display)return null;for(let e=Bt(t);e;e=Bt(e)){if(!(e instanceof Element))continue;const t=getComputedStyle(e);if("contents"!==t.display){if("static"!==t.position||it(t))return e;if("BODY"===e.tagName)return e}}return null}(t)}function Bt(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}async function Nt(t,e,n,o){async function i(){const i=new Array;n?.inline&&i.push(Dt()),n.flip&&i.push(!0===n.flip?$t():$t({fallbackPlacements:n.flip})),n.shift&&i.push(Ot({mainAxis:"main"===n.shift||"both"===n.shift,crossAxis:"cross"===n.shift||"both"===n.shift,limiter:Pt()})),n.offset&&!isNaN(n.offset)&&i.push(Ct(n.offset));const r=await Mt(e,t,{placement:n.position,middleware:i,platform:{...St,getOffsetParent:t=>St.getOffsetParent(t,Ft)}});o(r.x,r.y,r.placement)}return await i(),Wt(e,t,async()=>await i())}var Ht,Vt,zt,Yt,jt,It,qt,Xt,_t;let Gt=class extends(a(c(o))){constructor(){super(...arguments),Ht.add(this),Vt.set(this,void 0),zt.set(this,void 0),Yt.set(this,void 0),jt.set(this,e=>t(this,Ht,"m",_t).call(this,e)),It.set(this,n=>{"closed"===n.newState&&(t(this,Yt,"f")?.call(this),e(this,Yt,void 0,"f"))}),qt.set(this,new f(this,{target:null,callback:()=>this.hide(!1)})),Xt.set(this,new h(this,{target:null,callback:()=>{t(this,zt,"f")&&this.fitAnchorWidth&&(this.style.minWidth=`${t(this,zt,"f").clientWidth}px`)}})),this.scrollStrategy="hide",this.fitAnchorWidth=!1,this.anchorOffset=0}get isOpen(){return void 0!==t(this,Vt,"f")}get trigger(){return t(this,Vt,"f")??null}connectedCallback(){super.connectedCallback(),this.setAttribute("popover","manual"),this.addEventListener("toggle",t(this,It,"f")),document.addEventListener("click",t(this,jt,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("toggle",t(this,It,"f")),document.removeEventListener("click",t(this,jt,"f"))}async show(n,o){t(this,Vt,"f")&&t(this,Vt,"f")!==n&&this.hide(),e(this,Vt,n,"f"),t(this,Vt,"f").ariaExpanded="true",e(this,zt,o??n,"f"),"hide"===this.scrollStrategy&&t(this,qt,"f").observe(t(this,zt,"f")),this.fitAnchorWidth&&(t(this,Xt,"f").observe(t(this,zt,"f")),this.style.minWidth=`${t(this,zt,"f").clientWidth}px`),e(this,Yt,await Nt(this,t(this,zt,"f"),{position:"bottom-start",inline:!0,flip:!0,offset:this.anchorOffset>0?this.anchorOffset:void 0},(t,e,n)=>{p(this,"-top",n.includes("top")),p(this,"-bottom",n.includes("bottom")),"rtl"===m.current?(this.style.right=window.innerWidth-t-this.clientWidth+"px",this.style.left=""):(this.style.left=`${t}px`,this.style.right=""),this.style.top=`${e}px`}),"f"),this.showPopover()}hide(n=!1){this.hidePopover(),t(this,Vt,"f")&&(t(this,Vt,"f").ariaExpanded="false",n&&t(this,Vt,"f").focus(),t(this,zt,"f")&&(t(this,qt,"f").unobserve(t(this,zt,"f")),this.fitAnchorWidth&&t(this,Xt,"f").unobserve(t(this,zt,"f"))),e(this,Vt,void 0,"f"),e(this,zt,void 0,"f"))}async toggle(e,n){t(this,Vt,"f")?this.hide():await this.show(e,n)}render(){return i`<div class="base"><slot></slot></div>`}};Vt=new WeakMap,zt=new WeakMap,Yt=new WeakMap,jt=new WeakMap,It=new WeakMap,qt=new WeakMap,Xt=new WeakMap,Ht=new WeakSet,_t=function(e){this.isOpen&&!e.composedPath().some(e=>e===this||e===t(this,zt,"f"))&&this.hide()},Gt.styles=s`:host { position: absolute; flex-direction: column; padding: unset; margin: unset; border: unset; overflow-y: auto; scrollbar-width: ${u.scrollbar.thinWidth}; scrollbar-color: ${u.scrollbar.color}; scroll-padding-block: calc( var(--m3e-focus-ring-thickness, 3px) + var(--m3e-floating-panel-container-padding-block, 0.25rem) ); border-radius: var(--m3e-floating-panel-container-shape, ${u.shape.corner.large}); min-width: var(--m3e-floating-panel-container-min-width, 7rem); max-width: var(--m3e-floating-panel-container-max-width, 17.5rem); max-height: var(--m3e-floating-panel-container-max-height, 17.5rem); background-color: var(--m3e-floating-panel-container-color, ${u.color.surfaceContainer}); box-shadow: var(--m3e-floating-panel-container-elevation, ${u.elevation.level3}); opacity: 0; display: none; } .base { box-sizing: border-box; display: flex; flex-direction: column; padding-block: var(--m3e-floating-panel-container-padding-block, 0.25rem); padding-inline: var(--m3e-floating-panel-container-padding-inline, 0.25rem); } :host(:not(:state(-no-animate))) { transition: ${r(`opacity ${u.motion.duration.short2} ${u.motion.easing.standard}, \n transform ${u.motion.duration.short2} ${u.motion.easing.standard},\n overlay ${u.motion.duration.short2} ${u.motion.easing.standard} allow-discrete,\n display ${u.motion.duration.short2} ${u.motion.easing.standard} allow-discrete`)}; } :host { transform: scaleY(0.8); } :host(:popover-open) { transform: scaleY(1); display: block; opacity: 1; } :host::backdrop { background-color: transparent; } :host(:state(-bottom)) { transform-origin: top; } :host(:state(-top)) { transform-origin: bottom; } @starting-style { :host(:popover-open) { transform: scaleY(0.8); } } @media (prefers-reduced-motion) { :host(:not(:state(-no-animate))) { transition: none; } } @media (forced-colors: active) { :host { background-color: Menu; color: MenuText; outline: 1px solid MenuText; } }`,n([l({attribute:"scroll-strategy"})],Gt.prototype,"scrollStrategy",void 0),n([l({attribute:"fit-anchor-width",type:Boolean})],Gt.prototype,"fitAnchorWidth",void 0),n([l({attribute:"anchor-offset",type:Number})],Gt.prototype,"anchorOffset",void 0),Gt=n([d("m3e-floating-panel")],Gt);export{Gt as M3eFloatingPanelElement,Nt as positionAnchor};
package/dist/core-bidi.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license MIT
3
- * Copyright (c) 2025 matraic
3
+ * Copyright (c) 2025–2026 matraic
4
4
  * See LICENSE file in the project root for full license text.
5
5
  */
6
6
  import { __classPrivateFieldGet, __classPrivateFieldSet } from 'tslib';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license MIT
3
- * Copyright (c) 2025 matraic
3
+ * Copyright (c) 2025–2026 matraic
4
4
  * See LICENSE file in the project root for full license text.
5
5
  */
6
6
  import{__classPrivateFieldGet as t,__classPrivateFieldSet as e}from"tslib";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license MIT
3
- * Copyright (c) 2025 matraic
3
+ * Copyright (c) 2025–2026 matraic
4
4
  * See LICENSE file in the project root for full license text.
5
5
  */
6
6
  import { isServer } from 'lit';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license MIT
3
- * Copyright (c) 2025 matraic
3
+ * Copyright (c) 2025–2026 matraic
4
4
  * See LICENSE file in the project root for full license text.
5
5
  */
6
6
  import{isServer as a}from"lit";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license MIT
3
- * Copyright (c) 2025 matraic
3
+ * Copyright (c) 2025–2026 matraic
4
4
  * See LICENSE file in the project root for full license text.
5
5
  */
6
6
  import { isServer } from 'lit';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license MIT
3
- * Copyright (c) 2025 matraic
3
+ * Copyright (c) 2025–2026 matraic
4
4
  * See LICENSE file in the project root for full license text.
5
5
  */
6
6
  import{isServer as e}from"lit";
package/dist/core.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license MIT
3
- * Copyright (c) 2025 matraic
3
+ * Copyright (c) 2025–2026 matraic
4
4
  * See LICENSE file in the project root for full license text.
5
5
  */
6
6
  import { __classPrivateFieldGet, __classPrivateFieldSet, __decorate } from 'tslib';
@@ -3969,7 +3969,7 @@ var _M3eElevationElement_instances, _M3eElevationElement_hoverController, _M3eEl
3969
3969
  * The component can also be attached to another element using the `for` attribute. When attached, elevation will
3970
3970
  * be lifted by 1 level on hover. This can be disabled using the `disabled` attribute.
3971
3971
  *
3972
- * Alternately, use the `attach` and `detach` methods to programmatically attach and detach this element to another.
3972
+ * Alternatively, use the `attach` and `detach` methods to programmatically attach and detach this element to another.
3973
3973
  *
3974
3974
  * @example
3975
3975
  * The following example illustrates basic markup. Note how the parenting element's position is `relative`. A parenting
@@ -4147,7 +4147,7 @@ var _M3eFocusRingElement_instances, _M3eFocusRingElement_focusController, _M3eFo
4147
4147
  * The focus ring is displayed when the interactive element receives visible focus and hidden when focus is lost.
4148
4148
  * This can be disabled using the `disabled` attribute.
4149
4149
  *
4150
- * Alternately, you can use the `show` and `hide` methods to programmatically control the focus ring.
4150
+ * Alternatively, you can use the `show` and `hide` methods to programmatically control the focus ring.
4151
4151
  *
4152
4152
  * @example
4153
4153
  * The following example illustrates attaching a focus ring to an interactive element. In this example, the parenting div
@@ -4376,7 +4376,7 @@ var _M3eRippleElement_instances, _M3eRippleElement_ripple, _M3eRippleElement_pre
4376
4376
  *
4377
4377
  * The pressed state actives either using both pointer and keyboard events. For keyboard events, `SPACE` activate a ripple.
4378
4378
  *
4379
- * Alternately, you can use the `show` and `hide` methods to programmatically control the ripple.
4379
+ * Alternatively, you can use the `show` and `hide` methods to programmatically control the ripple.
4380
4380
  *
4381
4381
  * @example
4382
4382
  * The following example illustrates attaching a ripple to an interactive element. In this example, the parenting div