@db-ux/wc-core-components 4.13.1-angular-signal-forms13-577b861 → 4.14.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 (145) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/bundle/db-badge.js +1 -1
  3. package/bundle/db-brand.js +1 -1
  4. package/bundle/db-checkbox.js +1 -1
  5. package/bundle/db-custom-select.js +1 -1
  6. package/bundle/db-drawer.js +1 -1
  7. package/bundle/db-header.js +1 -1
  8. package/bundle/db-input.js +1 -1
  9. package/bundle/db-navigation-item.js +1 -1
  10. package/bundle/db-notification.js +1 -1
  11. package/bundle/db-popover.js +1 -1
  12. package/bundle/db-select.js +1 -1
  13. package/bundle/db-switch.js +1 -1
  14. package/bundle/db-tabs.js +1 -1
  15. package/bundle/db-tag.js +1 -1
  16. package/bundle/db-textarea.js +1 -1
  17. package/bundle/db-tooltip.js +1 -1
  18. package/bundle/index.js +1 -1
  19. package/bundle/p-BXHP_qH1.js +1 -0
  20. package/bundle/{p-Be1wVxvg.js → p-Bl3Nkowh.js} +1 -1
  21. package/bundle/p-Bsv9xU74.js +1 -0
  22. package/bundle/p-C3D_kjdU.js +1 -0
  23. package/bundle/p-Cm3dPtkD.js +1 -0
  24. package/bundle/{p-By8B0zRG.js → p-Cmc3AFmy.js} +1 -1
  25. package/bundle/{p-C_qYW0Kh.js → p-DmKfvZy3.js} +1 -1
  26. package/bundle/p-DzJeNSBs.js +1 -0
  27. package/bundle/{p-Dd85RhMq.js → p-OXsRLHzG.js} +1 -1
  28. package/dist/cjs/{constants-bMY2_d8A.js → constants-Dy7QIUQi.js} +5 -1
  29. package/dist/cjs/db-badge.cjs.entry.js +1 -1
  30. package/dist/cjs/db-brand.cjs.entry.js +1 -1
  31. package/dist/cjs/db-checkbox.cjs.entry.js +1 -1
  32. package/dist/cjs/db-custom-select-dropdown_5.cjs.entry.js +1 -1
  33. package/dist/cjs/db-custom-select.cjs.entry.js +40 -25
  34. package/dist/cjs/db-drawer.cjs.entry.js +1 -1
  35. package/dist/cjs/db-header.cjs.entry.js +3 -3
  36. package/dist/cjs/db-navigation-item.cjs.entry.js +3 -3
  37. package/dist/cjs/db-notification.cjs.entry.js +1 -1
  38. package/dist/cjs/db-popover.cjs.entry.js +50 -23
  39. package/dist/cjs/db-select.cjs.entry.js +1 -1
  40. package/dist/cjs/db-switch.cjs.entry.js +1 -1
  41. package/dist/cjs/db-tabs.cjs.entry.js +22 -17
  42. package/dist/cjs/db-textarea.cjs.entry.js +1 -1
  43. package/dist/cjs/db-tooltip.cjs.entry.js +40 -28
  44. package/dist/cjs/db-ux.cjs.js +1 -1
  45. package/dist/cjs/{document-click-listener-Bt1Iysz5.js → document-click-listener-DyO00UZC.js} +5 -9
  46. package/dist/cjs/{floating-components-SpHkZuLA.js → floating-components-Ns3Jt7dw.js} +161 -106
  47. package/dist/cjs/index.cjs.js +9 -6
  48. package/dist/cjs/intersection-observer-listener-BBUA6END.js +101 -0
  49. package/dist/cjs/loader.cjs.js +1 -1
  50. package/dist/cjs/{navigation-DUTSDY4q.js → navigation-fsWSnlKn.js} +1 -1
  51. package/dist/cjs/resize-observer-listener-B1uhHzqv.js +103 -0
  52. package/dist/collection/components/custom-select/custom-select.js +37 -20
  53. package/dist/collection/components/popover/popover.js +75 -46
  54. package/dist/collection/components/tabs/tabs.js +75 -18
  55. package/dist/collection/components/tooltip/tooltip.js +63 -49
  56. package/dist/collection/shared/constants.js +3 -1
  57. package/dist/collection/utils/abstract-document-listener.js +23 -0
  58. package/dist/collection/utils/abstract-observer-listener.js +61 -0
  59. package/dist/collection/utils/document-click-listener.js +5 -9
  60. package/dist/collection/utils/document-scroll-listener.js +5 -9
  61. package/dist/collection/utils/floating-components.js +161 -106
  62. package/dist/collection/utils/intersection-observer-listener.js +36 -0
  63. package/dist/collection/utils/resize-observer-listener.js +36 -0
  64. package/dist/custom-elements.json +232 -257
  65. package/dist/db-ux/db-ux.esm.js +1 -1
  66. package/dist/db-ux/index.esm.js +1 -1
  67. package/dist/db-ux/{p-d40a44ca.entry.js → p-1006233c.entry.js} +1 -1
  68. package/dist/db-ux/p-24767117.entry.js +1 -0
  69. package/dist/db-ux/{p-c83a359f.entry.js → p-40e78127.entry.js} +1 -1
  70. package/dist/db-ux/p-4a1282b9.entry.js +1 -0
  71. package/dist/db-ux/p-5b4ad0fd.entry.js +1 -0
  72. package/dist/db-ux/{p-dfc9ad26.entry.js → p-6a77f198.entry.js} +1 -1
  73. package/dist/db-ux/{p-1f740a3b.entry.js → p-6dfb57d0.entry.js} +1 -1
  74. package/dist/db-ux/p-775ef2b5.entry.js +1 -0
  75. package/dist/db-ux/p-78b4f191.entry.js +1 -0
  76. package/dist/db-ux/{p-2e66b25f.entry.js → p-7c26be27.entry.js} +1 -1
  77. package/dist/db-ux/{p-f4eb1ad4.entry.js → p-7fb6bf32.entry.js} +1 -1
  78. package/dist/db-ux/p-Bn4tE1v7.js +1 -0
  79. package/dist/db-ux/p-C3D_kjdU.js +1 -0
  80. package/dist/db-ux/p-Cm3dPtkD.js +1 -0
  81. package/dist/db-ux/{p-C_qYW0Kh.js → p-DmKfvZy3.js} +1 -1
  82. package/dist/db-ux/p-MhMqbaAW.js +1 -0
  83. package/dist/db-ux/p-aClGBxfA.js +1 -0
  84. package/dist/db-ux/{p-3649de37.entry.js → p-bfaec517.entry.js} +1 -1
  85. package/dist/db-ux/{p-3b9d4cc3.entry.js → p-c9b6ae8f.entry.js} +1 -1
  86. package/dist/db-ux/{p-c33fe9e0.entry.js → p-e8d5f721.entry.js} +1 -1
  87. package/dist/db-ux/{p-e35b2f5d.entry.js → p-fbb85f89.entry.js} +1 -1
  88. package/dist/esm/{constants-BdL-nI5y.js → constants-Cm3dPtkD.js} +4 -2
  89. package/dist/esm/db-badge.entry.js +1 -1
  90. package/dist/esm/db-brand.entry.js +1 -1
  91. package/dist/esm/db-checkbox.entry.js +1 -1
  92. package/dist/esm/db-custom-select-dropdown_5.entry.js +1 -1
  93. package/dist/esm/db-custom-select.entry.js +38 -23
  94. package/dist/esm/db-drawer.entry.js +1 -1
  95. package/dist/esm/db-header.entry.js +3 -3
  96. package/dist/esm/db-navigation-item.entry.js +3 -3
  97. package/dist/esm/db-notification.entry.js +1 -1
  98. package/dist/esm/db-popover.entry.js +48 -21
  99. package/dist/esm/db-select.entry.js +1 -1
  100. package/dist/esm/db-switch.entry.js +1 -1
  101. package/dist/esm/db-tabs.entry.js +22 -17
  102. package/dist/esm/db-textarea.entry.js +1 -1
  103. package/dist/esm/db-tooltip.entry.js +37 -25
  104. package/dist/esm/db-ux.js +1 -1
  105. package/dist/esm/{document-click-listener-B9qg-hEl.js → document-click-listener-Cqaqu5Jn.js} +5 -9
  106. package/dist/esm/{floating-components-C0q9XJSc.js → floating-components-C3D_kjdU.js} +162 -107
  107. package/dist/esm/index.js +6 -5
  108. package/dist/esm/intersection-observer-listener-DNd-fDFa.js +97 -0
  109. package/dist/esm/loader.js +1 -1
  110. package/dist/esm/{navigation-Cd7KZ6E2.js → navigation-BET7zThU.js} +1 -1
  111. package/dist/esm/resize-observer-listener-ed-nCkCj.js +100 -0
  112. package/dist/types/components/custom-select/custom-select.d.ts +3 -2
  113. package/dist/types/components/custom-select/model.d.ts +5 -1
  114. package/dist/types/components/popover/popover.d.ts +3 -2
  115. package/dist/types/components/tabs/model.d.ts +4 -12
  116. package/dist/types/components/tabs/tabs.d.ts +3 -1
  117. package/dist/types/components/tooltip/tooltip.d.ts +3 -2
  118. package/dist/types/components.d.ts +8 -2
  119. package/dist/types/shared/constants.d.ts +2 -0
  120. package/dist/types/shared/model.d.ts +27 -4
  121. package/dist/types/utils/abstract-document-listener.d.ts +18 -0
  122. package/dist/types/utils/abstract-observer-listener.d.ts +39 -0
  123. package/dist/types/utils/document-click-listener.d.ts +3 -3
  124. package/dist/types/utils/document-scroll-listener.d.ts +3 -3
  125. package/dist/types/utils/floating-components.d.ts +29 -6
  126. package/dist/types/utils/intersection-observer-listener.d.ts +15 -0
  127. package/dist/types/utils/resize-observer-listener.d.ts +15 -0
  128. package/dist/vscode.html-custom-data.json +29 -19
  129. package/dist/web-types.json +82 -75
  130. package/package.json +3 -3
  131. package/bundle/p-BdL-nI5y.js +0 -1
  132. package/bundle/p-C0q9XJSc.js +0 -1
  133. package/bundle/p-CTkfdjBp.js +0 -1
  134. package/bundle/p-LpyedXhR.js +0 -1
  135. package/dist/cjs/document-scroll-listener-Dd_hGebZ.js +0 -43
  136. package/dist/db-ux/p-177f3aeb.entry.js +0 -1
  137. package/dist/db-ux/p-2aee37e2.entry.js +0 -1
  138. package/dist/db-ux/p-550bd66a.entry.js +0 -1
  139. package/dist/db-ux/p-91d7fcc4.entry.js +0 -1
  140. package/dist/db-ux/p-B-HK8lhm.js +0 -1
  141. package/dist/db-ux/p-BdL-nI5y.js +0 -1
  142. package/dist/db-ux/p-C0q9XJSc.js +0 -1
  143. package/dist/db-ux/p-Z7eYHp_l.js +0 -1
  144. package/dist/db-ux/p-bc835df4.entry.js +0 -1
  145. package/dist/esm/document-scroll-listener-ewGU9bif.js +0 -41
@@ -0,0 +1 @@
1
+ const t=(t,e,i)=>{if(!t||!e)return;const l="full"===t.dataset.width,n="auto"===t.dataset.width;t.style.inlineSize="",t.style.minInlineSize="";const r=getComputedStyle(t);if("9999"===r.zIndex||"fixed"!==r.position&&"absolute"!==r.position)return;const{top:d,bottom:h,childHeight:p,childWidth:a,width:s,right:c,left:f,correctedPlacement:u,innerWidth:b}=o(t,e,i);let m=s;if(n){const o=parseFloat(getComputedStyle(t).maxInlineSize);!isNaN(o)&&o>0&&(m=Math.min(s,o))}l?t.style.inlineSize=`${s}px`:n&&(t.style.minInlineSize=`${m}px`);let g=a;n?g=Math.max(a,m):l&&(g=s);let $=u;n&&("top"===$||"bottom"===$||"top-start"===$||"bottom-start"===$)&&f+g>b&&($=$.startsWith("top")?"top-end":"bottom-end"),"top"===$||"bottom"===$||"top-start"===$||"bottom-start"===$?t.style.insetInlineStart=`${f}px`:"top-end"!==$&&"bottom-end"!==$||(t.style.insetInlineStart=`${Math.max(c-g,0)}px`),(null==$?void 0:$.startsWith("top"))?t.style.insetBlockStart=d-p+"px":(null==$?void 0:$.startsWith("bottom"))&&(t.style.insetBlockStart=`${h}px`),t.style.position="fixed"},o=(t,o,e)=>{if(!t||!o)return{top:0,bottom:0,right:0,height:0,width:0,left:0,childHeight:0,childWidth:0,correctedPlacement:e,innerWidth:window.innerWidth,innerHeight:window.innerHeight};const i=t.getBoundingClientRect(),{top:l,height:n,bottom:r,right:d,left:h,width:p}=o.getBoundingClientRect(),{innerHeight:a,innerWidth:s}=window;let c=i.height,f=i.width;"bottom"!==e&&"top"!==e||(f=p>f?0:f/2),"left"!==e&&"right"!==e||(c=n>c?0:c/2);const u=Math.floor(r+c)>a,b=Math.ceil(l-c)<0,m=Math.ceil(h-f)<0,g=Math.floor(d+f)>s;let $=e;return e.startsWith("bottom")?u?b?m?$="bottom-start":g&&($="bottom-end"):($=null==e?void 0:e.replace("bottom","top"),m&&g?$="top":m?$="top-start":g&&($="top-end")):m&&g?$="bottom":m?$="bottom-start":g&&($="bottom-end"):e.startsWith("top")?b?u?m?$="top-start":g&&($="top-end"):($=null==e?void 0:e.replace("top","bottom"),m&&g?$="bottom":m?$="bottom-start":g&&($="bottom-end")):m&&g?$="top":m?$="top-start":g&&($="top-end"):e.startsWith("left")?m?g||($=null==e?void 0:e.replace("left","right"),u&&b?$="right":u?$="right-end":b&&($="right-start")):u&&b?$="left":u?$="left-end":b&&($="left-start"):$.startsWith("right")&&(g?m||($=null==e?void 0:e.replace("right","left"),u&&b?$="left":u?$="left-end":b&&($="left-start")):u&&b?$="right":u?$="right-end":b&&($="right-start")),{top:l,bottom:r,right:d,height:n,width:p,left:h,childHeight:i.height,childWidth:i.width,correctedPlacement:$,innerWidth:s,innerHeight:a,outsideYBoth:b&&u}},e=new WeakMap,i=(t,i,n)=>{var r,d,h;if(!t||!i)return;const p=getComputedStyle(i),a=["absolute","fixed"].includes(p.position),s=(t=>{if(e.has(t))return e.get(t);let o=t.parentElement,i=0;for(;o&&i<10;){if(o.dataset.correctedPlacement)return e.set(t,o),o;o=o.parentElement,i+=1}return e.set(t,null),null})(t),c=!s&&!a,f=getComputedStyle(t);if("fixed"!==f.position&&"absolute"!==f.position)return;let u=f.getPropertyValue("--db-popover-distance");u.length||(u="0px");const b=null!==(h=null!==(d=null===(r=null==t?void 0:t.dataset)||void 0===r?void 0:r.placement)&&void 0!==d?d:n)&&void 0!==h?h:"bottom";let{top:m,height:g,width:$,childHeight:x,childWidth:v,right:w,left:M,bottom:W,correctedPlacement:H,innerWidth:y,innerHeight:k,outsideYBoth:B}=o(t,i,b);if(s){const t=s.getBoundingClientRect();M=Math.abs(M-t.left),w=1.5*($+Math.abs(w-t.right)),m=Math.abs(m-t.top),W=1.5*(g+Math.abs(W-t.bottom))}if(a&&(M=0,w=$,m=0,W=g,["auto","inherit","0"].includes(p.zIndex)&&(i.style.zIndex="1")),v>$&&(H.startsWith("bottom")||H.startsWith("top"))){const o=$/2/v*100;H.endsWith("start")?t.style.setProperty("--db-tooltip-arrow-inline-start",`${o}%`):H.endsWith("end")?t.style.setProperty("--db-tooltip-arrow-inline-start",100-o+"%"):t.style.setProperty("--db-tooltip-arrow-inline-start","50%")}if(x>g&&(H.startsWith("left")||H.startsWith("bottom"))){const o=g/2/x*100;H.endsWith("start")?t.style.setProperty("--db-tooltip-arrow-block-start",`${o}%`):H.endsWith("end")?t.style.setProperty("--db-tooltip-arrow-block-start",100-o+"%"):t.style.setProperty("--db-tooltip-arrow-block-start","50%")}if(t.style.insetBlock="",t.style.insetInline="","right"===H||"left"===H)t.style.insetBlockStart=`${m+g/2}px`;else if("right-start"===H||"left-start"===H){const o=m+x;t.style.insetBlockStart=`${m}px`,t.style.insetBlockEnd=`${!a&&o>k?k:o}px`}else if("right-end"===H||"left-end"===H){const o=W-x;t.style.insetBlockStart=`${!a&&o<0?0:o}px`,t.style.insetBlockEnd=`${W}px`}else if("top"===H||"bottom"===H)t.style.insetInlineStart=`${M+$/2}px`;else if("top-start"===H||"bottom-start"===H){const o=M+v;t.style.insetInlineStart=`${M}px`,t.style.insetInlineEnd=`${!a&&o>y?y:o}px`}else if("top-end"===H||"bottom-end"===H){const o=w-v;t.style.insetInlineStart=`${!a&&o<0?0:o}px`,t.style.insetInlineEnd=`${w}px`}if(null==H?void 0:H.startsWith("right")){const o=w+v;t.style.insetInlineStart=`calc(${w}px + ${u})`,t.style.insetInlineEnd=`calc(${c&&o>y?y:o}px + ${u})`}else if(null==H?void 0:H.startsWith("left")){const o=M-v;t.style.insetInlineStart=`calc(${c&&o<0?0:o}px - ${u})`,t.style.insetInlineEnd=`calc(${w}px - ${u})`}else if(null==H?void 0:H.startsWith("top")){const o=m-x;t.style.insetBlockStart=`calc(${c&&o<0?0:o}px - ${u})`,t.style.insetBlockEnd=`calc(${a?o:W}px - ${u})`}else if(null==H?void 0:H.startsWith("bottom")){const o=W+x;t.style.insetBlockStart=`calc(${a?o:W}px + ${u})`,t.style.insetBlockEnd=`calc(${c&&o>k?k:o}px + ${u})`}B?(t.style.overflow="hidden auto",t.style.insetBlock=u,t.style.maxBlockSize=`calc(${k}px - 2 * ${u})`):(t.style.overflow="",t.style.maxBlockSize=""),t.style.position="fixed",t.dataset.correctedPlacement=H,l(t)},l=t=>{const{outTop:o,outBottom:e,outLeft:i,outRight:l}=n(t);let r={};return o||e?(r={vy:o?"top":"bottom"},t.dataset.outsideVy=r.vy):delete t.dataset.outsideVy,i||l?(r=Object.assign(Object.assign({},r),{vx:l?"right":"left"}),t.dataset.outsideVx=r.vx):delete t.dataset.outsideVx,r},n=t=>{var o;const{top:e,bottom:i,left:l,right:n}=t.getBoundingClientRect(),{innerHeight:r,innerWidth:d}=window;let h=e<0,p=i>r,a=l<0,s=n>d;const c=t.dataset.outsideVy,f=t.dataset.outsideVx,u=null===(o=null==t?void 0:t.parentElement)||void 0===o?void 0:o.getBoundingClientRect();return u&&(c&&("top"===t.dataset.outsideVy?h=u.top-(i-u.bottom)<0:p=u.bottom+(u.top-e)>r),f&&("left"===t.dataset.outsideVx?a=u.left-(n-u.right)<0:s=u.right+(u.left-l)>d)),{outTop:h,outBottom:p,outLeft:a,outRight:s}};export{i as a,l as b,o as g,t as h}
@@ -0,0 +1 @@
1
+ const a="OVERWRITE_DEFAULT_ID",s="LABEL SHOULD BE SET",e=" ",l="MESSAGE SHOULD BE SET",i="-label",n="-select",b="-message",c="-valid-message",t="-invalid-message",r="-placeholder",g="-datalist",o="TODO: Add a validMessage",u="TODO: Add an invalidMessage",v="Remove",d="Back",f="Selected",m="Scroll left",p="Scroll right",O="Open navigation menu",h="brand",w=4,E="Close",S="density",j="color";var D;!function(a){a.FUNCTIONAL="functional",a.REGULAR="regular",a.EXPRESSIVE="expressive"}(D||(D={}));const T=Object.entries(D).map((([,a])=>a));var A,x;!function(a){a.PRIMARY="primary"}(A||(A={})),function(a){a.NEUTRAL_BG_LEVEL_1="neutral-bg-basic-level-1",a.NEUTRAL_BG_LEVEL_2="neutral-bg-basic-level-2",a.NEUTRAL_BG_LEVEL_3="neutral-bg-basic-level-3",a.NEUTRAL_BG_TRANSPARENT_SEMI="neutral-bg-basic-transparent-semi",a.NEUTRAL_BG_TRANSPARENT_FULL="neutral-bg-basic-transparent-full",a.BRAND_BG_LEVEL_1="brand-bg-basic-level-1",a.BRAND_BG_LEVEL_2="brand-bg-basic-level-2",a.BRAND_BG_LEVEL_3="brand-bg-basic-level-3",a.BRAND_BG_TRANSPARENT_SEMI="brand-bg-basic-transparent-semi",a.BRAND_BG_TRANSPARENT_FULL="brand-bg-basic-transparent-full",a.SUCCESSFUL_BG_LEVEL_1="successful-bg-basic-level-1",a.SUCCESSFUL_BG_LEVEL_2="successful-bg-basic-level-2",a.SUCCESSFUL_BG_LEVEL_3="successful-bg-basic-level-3",a.SUCCESSFUL_BG_TRANSPARENT_SEMI="successful-bg-basic-transparent-semi",a.SUCCESSFUL_BG_TRANSPARENT_FULL="successful-bg-basic-transparent-full",a.CRITICAL_BG_LEVEL_1="critical-bg-basic-level-1",a.CRITICAL_BG_LEVEL_2="critical-bg-basic-level-2",a.CRITICAL_BG_LEVEL_3="critical-bg-basic-level-3",a.CRITICAL_BG_TRANSPARENT_SEMI="critical-bg-basic-transparent-semi",a.CRITICAL_BG_TRANSPARENT_Full="critical-bg-basic-transparent-full",a.WARNING_BG_LEVEL_1="warning-bg-basic-level-1",a.WARNING_BG_LEVEL_2="warning-bg-basic-level-2",a.WARNING_BG_LEVEL_3="warning-bg-basic-level-3",a.WARNING_BG_TRANSPARENT_SEMI="warning-bg-basic-transparent-semi",a.WARNING_BG_TRANSPARENT_FULL="warning-bg-basic-transparent-full",a.INFORMATIONAL_BG_LEVEL_1="informational-bg-basic-level-1",a.INFORMATIONAL_BG_LEVEL_2="informational-bg-basic-level-2",a.INFORMATIONAL_BG_LEVEL_3="informational-bg-basic-level-3",a.INFORMATIONAL_BG_TRANSPARENT_SEMI="informational-bg-basic-transparent-semi",a.INFORMATIONAL_BG_TRANSPARENT_FULL="informational-bg-basic-transparent-full"}(x||(x={}));const B=Object.entries(x).map((([,a])=>a)),L=Object.entries(A).map((([,a])=>a));var k;!function(a){a.CRITICAL="critical",a.INFORMATIONAL="informational",a.WARNING="warning",a.SUCCESSFUL="successful"}(k||(k={}));const y=Object.entries(k).map((([,a])=>a)),H={width:390,height:884},I={width:1920,height:1280},M=[Object.assign({name:"desktop"},I),{name:"tablet",width:768,height:1024},Object.assign({name:"mobile"},H)],R="db-ux-framework",U="db-ux-mode";export{B as A,L as B,j as C,a as D,y as E,H as F,I as G,R as H,U as I,k as S,M as T,s as a,e as b,l as c,i as d,n as e,b as f,c as g,t as h,r as i,g as j,o as k,u as l,v as m,d as n,f as o,m as p,p as q,O as r,h as s,w as t,E as u,S as v,D as w,T as x,A as y,x as z}
@@ -1 +1 @@
1
- import{h as i}from"./p-C0q9XJSc.js";const t=i=>{var t,s;const{target:h}=i;return Boolean(!(null===(t=null==h?void 0:h.classList)||void 0===t?void 0:t.contains("db-navigation-item-expand-button"))&&(null===(s=null==h?void 0:h.parentElement)||void 0===s?void 0:s.classList.contains("db-navigation-item")))};class s{constructor(i,t){var s;this.parentSubNavigation=null,this.initialized=!1,this.mouseX=0,this.mouseY=0,this.element=i,this.subNavigation=t,this.element&&this.subNavigation&&(this.parentSubNavigation=null===(s=this.element)||void 0===s?void 0:s.closest(".db-sub-navigation"),this.parentSubNavigation&&!this.element.closest(".db-drawer")&&this.init())}init(){var i,t,s;const h=null!==(t=null===(i=this.parentSubNavigation)||void 0===i?void 0:i.getBoundingClientRect().width)&&void 0!==t?t:0;null===(s=this.element)||void 0===s||s.style.setProperty("--db-navigation-item-inline-size",`${h}px`),this.initialized=!0}enableFollow(){var t,s;if(!this.initialized||this.triangleData||!this.element||!this.subNavigation)return;const h=i(this.subNavigation),n=this.element.getBoundingClientRect(),o=null!==(s=null===(t=this.parentSubNavigation)||void 0===t?void 0:t.getBoundingClientRect().width)&&void 0!==s?s:0;this.triangleData={itemRect:n,parentElementWidth:o,subNavigationHeight:this.subNavigation.getBoundingClientRect().height,padding:(o-n.width)/2,outsideVX:h.vx,outsideVY:h.vy}}disableFollow(){this.triangleData=void 0}getTriangleTipX(){return this.triangleData?"right"===this.triangleData.outsideVX?this.triangleData.itemRect.width-this.mouseX:Math.min(this.mouseX,.75*this.triangleData.itemRect.width):0}getTriangleTipY(){if(!this.triangleData)return 0;const i=Math.max(Math.min(this.mouseY,this.triangleData.itemRect.height),0)+this.triangleData.padding;return"bottom"===this.triangleData.outsideVY?i+(this.triangleData.subNavigationHeight-2*this.triangleData.padding-this.triangleData.itemRect.height):i}hasMouseEnteredSubNavigation(){if(!this.triangleData)return!1;const i="right"===this.triangleData.outsideVX;return!!(i&&this.mouseX<-1*this.triangleData.padding)||!i&&this.mouseX>this.triangleData.parentElementWidth-this.triangleData.padding}getTriangleCoordinates(i){if(!this.triangleData)return;if("fill-gap"===i){const i=`${this.triangleData.itemRect.height+2*this.triangleData.padding}px`,t=this.triangleData.parentElementWidth-this.triangleData.padding+"px";return{lb:`${t} ${i}`,lt:`${t} 0`,rt:"100% 0",rb:`100% ${i}`}}const t=this.getTriangleTipX(),s=this.getTriangleTipY();return{lb:`${t}px ${s}px`,lt:`${t}px ${s}px`,rt:"100% 0",rb:"100% 100%"}}followByMouseEvent(i){if(!(this.initialized&&this.triangleData&&this.element&&this.subNavigation))return;this.mouseX=i.clientX-this.triangleData.itemRect.left,this.mouseY=i.clientY-this.triangleData.itemRect.top;const t=this.hasMouseEnteredSubNavigation(),s=this.getTriangleCoordinates(t?"fill-gap":"safe-triangle");s&&(this.element.style.setProperty("--db-navigation-item-clip-path",`polygon(${s.lb}, ${s.lt}, ${s.rt}, ${s.rb})`),t&&(this.triangleData=void 0))}}export{s as N,t as i}
1
+ import{b as i}from"./p-C3D_kjdU.js";const t=i=>{var t,s;const{target:h}=i;return Boolean(!(null===(t=null==h?void 0:h.classList)||void 0===t?void 0:t.contains("db-navigation-item-expand-button"))&&(null===(s=null==h?void 0:h.parentElement)||void 0===s?void 0:s.classList.contains("db-navigation-item")))};class s{constructor(i,t){var s;this.parentSubNavigation=null,this.initialized=!1,this.mouseX=0,this.mouseY=0,this.element=i,this.subNavigation=t,this.element&&this.subNavigation&&(this.parentSubNavigation=null===(s=this.element)||void 0===s?void 0:s.closest(".db-sub-navigation"),this.parentSubNavigation&&!this.element.closest(".db-drawer")&&this.init())}init(){var i,t,s;const h=null!==(t=null===(i=this.parentSubNavigation)||void 0===i?void 0:i.getBoundingClientRect().width)&&void 0!==t?t:0;null===(s=this.element)||void 0===s||s.style.setProperty("--db-navigation-item-inline-size",`${h}px`),this.initialized=!0}enableFollow(){var t,s;if(!this.initialized||this.triangleData||!this.element||!this.subNavigation)return;const h=i(this.subNavigation),n=this.element.getBoundingClientRect(),o=null!==(s=null===(t=this.parentSubNavigation)||void 0===t?void 0:t.getBoundingClientRect().width)&&void 0!==s?s:0;this.triangleData={itemRect:n,parentElementWidth:o,subNavigationHeight:this.subNavigation.getBoundingClientRect().height,padding:(o-n.width)/2,outsideVX:h.vx,outsideVY:h.vy}}disableFollow(){this.triangleData=void 0}getTriangleTipX(){return this.triangleData?"right"===this.triangleData.outsideVX?this.triangleData.itemRect.width-this.mouseX:Math.min(this.mouseX,.75*this.triangleData.itemRect.width):0}getTriangleTipY(){if(!this.triangleData)return 0;const i=Math.max(Math.min(this.mouseY,this.triangleData.itemRect.height),0)+this.triangleData.padding;return"bottom"===this.triangleData.outsideVY?i+(this.triangleData.subNavigationHeight-2*this.triangleData.padding-this.triangleData.itemRect.height):i}hasMouseEnteredSubNavigation(){if(!this.triangleData)return!1;const i="right"===this.triangleData.outsideVX;return!!(i&&this.mouseX<-1*this.triangleData.padding)||!i&&this.mouseX>this.triangleData.parentElementWidth-this.triangleData.padding}getTriangleCoordinates(i){if(!this.triangleData)return;if("fill-gap"===i){const i=`${this.triangleData.itemRect.height+2*this.triangleData.padding}px`,t=this.triangleData.parentElementWidth-this.triangleData.padding+"px";return{lb:`${t} ${i}`,lt:`${t} 0`,rt:"100% 0",rb:`100% ${i}`}}const t=this.getTriangleTipX(),s=this.getTriangleTipY();return{lb:`${t}px ${s}px`,lt:`${t}px ${s}px`,rt:"100% 0",rb:"100% 100%"}}followByMouseEvent(i){if(!(this.initialized&&this.triangleData&&this.element&&this.subNavigation))return;this.mouseX=i.clientX-this.triangleData.itemRect.left,this.mouseY=i.clientY-this.triangleData.itemRect.top;const t=this.hasMouseEnteredSubNavigation(),s=this.getTriangleCoordinates(t?"fill-gap":"safe-triangle");s&&(this.element.style.setProperty("--db-navigation-item-clip-path",`polygon(${s.lb}, ${s.lt}, ${s.rt}, ${s.rb})`),t&&(this.triangleData=void 0))}}export{s as N,t as i}
@@ -0,0 +1 @@
1
+ import{u as e}from"./p-BiyJ0WOE.js";import{A as t}from"./p-aClGBxfA.js";class s{addCallback(t){const s=e();return this.getCallbacks()[s]=t,s}removeCallback(e){delete this.getCallbacks()[e]}}class r extends s{static runCallbacks(e){for(const t of Object.values(r.callbacks))"function"==typeof t&&t(e)}constructor(){if(super(),this.ticking=!1,r._instance)return r._instance;r._instance=this,self.document&&self.document.addEventListener("scroll",(e=>{this.ticking||(window.requestAnimationFrame((()=>{r.runCallbacks(e),this.ticking=!1})),this.ticking=!0)}),!0)}getCallbacks(){return r.callbacks}}r.callbacks={},r._instance=null;class n extends t{constructor(){if(super(),n._instance)return n._instance;n._instance=this,"undefined"!=typeof window&&"IntersectionObserver"in window&&(n.observer=new IntersectionObserver((e=>{for(const t of e)this.dispatchEntry(t.target,t)})))}getCallbacksByElement(){return n.callbacksByElement}getIdToElement(){return n.idToElement}getObserver(){return n.observer}observeElement(e,t){e.observe(t)}unobserveElement(e,t){e.unobserve(t)}}n._instance=null,n.callbacksByElement=new Map,n.idToElement=new Map,n.observer=null;export{s as A,r as D,n as I}
@@ -0,0 +1 @@
1
+ import{u as e}from"./p-BiyJ0WOE.js";class t{observe(t,s){const n=this.getObserver();if(!n)return;const r=e(),i=this.getCallbacksByElement(),o=this.getIdToElement();let u=i.get(t);return u||(u=new Map,i.set(t,u),this.observeElement(n,t)),u.set(r,s),o.set(r,t),r}unobserve(e){const t=this.getCallbacksByElement(),s=this.getIdToElement(),n=this.getObserver(),r=s.get(e);if(!r||!n)return;const i=t.get(r);i&&(i.delete(e),0===i.size&&(t.delete(r),this.unobserveElement(n,r))),s.delete(e)}dispatchEntry(e,t){const s=this.getCallbacksByElement().get(e);s&&s.forEach((e=>{e(t)}))}}class s extends t{constructor(){if(super(),s._instance)return s._instance;s._instance=this,"undefined"!=typeof window&&"ResizeObserver"in window&&(s.observer=new ResizeObserver((e=>{for(const t of e)this.dispatchEntry(t.target,t)})))}getCallbacksByElement(){return s.callbacksByElement}getIdToElement(){return s.idToElement}getObserver(){return s.observer}observeElement(e,t){e.observe(t)}unobserveElement(e,t){e.unobserve(t)}}s._instance=null,s.callbacksByElement=new Map,s.idToElement=new Map,s.observer=null;export{t as A,s as R}
@@ -1 +1 @@
1
- import{r as i,c as t,h as s,g as h}from"./p-BlbKvvUv.js";import{l as a,f as d,g as e,h as l,k as o}from"./p-BdL-nI5y.js";import{h as n,d as c,s as r,u as v,e as u,l as b,g as f,c as w}from"./p-BiyJ0WOE.js";import{a as m}from"./p-BXROp_k8.js";const y=class{constructor(s){i(this,s),this.change=t(this,"change"),this.blur=t(this,"blur"),this.focus=t(this,"focus"),this._id=void 0,this._messageId=void 0,this._validMessageId=void 0,this._invalidMessageId=void 0,this._invalidMessage=void 0,this._descByIds=void 0,this._voiceOverFallback="",this.abortController=void 0,this.observer=void 0}hasValidState(){var i;return!!(null!==(i=this.validMessage)&&void 0!==i?i:"valid"===this.validation)}handleValidation(){var i,t,s,h,d,e;return(null===(t=null===(i=this._ref)||void 0===i?void 0:i.validity)||void 0===t?void 0:t.valid)&&"invalid"!==this.validation?this.hasValidState()&&(null===(d=null===(h=this._ref)||void 0===h?void 0:h.validity)||void 0===d?void 0:d.valid)&&this.required?(this._descByIds=this._validMessageId,void(n()&&(this._voiceOverFallback=null!==(e=this.validMessage)&&void 0!==e?e:o,c((()=>{this._voiceOverFallback=""}),1e3)))):void(this._descByIds=r(this.message,this.showMessage)?this._messageId:void 0):(this._descByIds=this._invalidMessageId,this._invalidMessage=this.invalidMessage||(null===(s=this._ref)||void 0===s?void 0:s.validationMessage)||a,void(n()&&(this._voiceOverFallback=this._invalidMessage||a,c((()=>{this._voiceOverFallback=""}),1e3))))}handleChange(i,t){this.change&&this.change.emit(i),this.handleValidation()}handleBlur(i){this.blur&&this.blur.emit(i)}handleFocus(i){this.focus&&this.focus.emit(i)}handleKeyDown(i){var t;"Enter"===i.key&&(i.preventDefault(),this.disabled||null===(t=this._ref)||void 0===t||t.click())}resetIds(){var i,t,s;const h=null!==(s=null!==(i=this.id)&&void 0!==i?i:null===(t=this.propOverrides)||void 0===t?void 0:t.id)&&void 0!==s?s:`switch-${v()}`;this._id=h,this._messageId=`${h}${d}`,this._validMessageId=`${h}${e}`,this._invalidMessageId=`${h}${l}`}setupObserver(i){if(!i)return;const t=i.closest("db-switch");t&&!this.observer&&(this.observer=new MutationObserver((t=>{t.some((i=>{var t;const s=i.target.attributes.getNamedItem(null!==(t=i.attributeName)&&void 0!==t?t:"");return(null==s?void 0:s.value)!==i.oldValue}))&&this.enableAttributePassing(i,"db-switch")})),this.observer.observe(t,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(i,t){const s=null==i?void 0:i.closest(t);if(i&&s){const t=s.attributes;for(let h=0;h<t.length;h++){const a=t.item(h);if(a&&"data-density"!==a.name&&(a.name.startsWith("data-")||a.name.startsWith("aria-")))a.value?i.setAttribute(a.name,a.value):i.removeAttribute(a.name),s.removeAttribute(a.name);else if(a&&["style"].includes(a.name))i.setAttribute(a.name,a.value),s.removeAttribute(a.name);else if(a&&"class"===a.name){const t=a.value.includes("hydrated"),h=a.value.replace("hydrated","").trim(),d=i.getAttribute("class");i.setAttribute(a.name,`${d||""}${h?` ${h}`:""}`),t?s.setAttribute("class","hydrated"):s.removeAttribute(a.name)}}}}watch0Fn(){var i,t;(null!==(i=this.id)&&void 0!==i?i:null===(t=this.propOverrides)||void 0===t?void 0:t.id)&&this.resetIds()}watch0(){this.watch0Fn()}watch1Fn(){this.handleValidation()}watch1(){this.watch1Fn()}watch2Fn(){var i;this._invalidMessage=this.invalidMessage||(null===(i=this._ref)||void 0===i?void 0:i.validationMessage)||a}watch2(){this.watch2Fn()}watch3Fn(){if(this._ref){const i=void 0;let t=this.abortController;t||(t=new AbortController,this.abortController=t),m(this._ref,{checked:this.checked,defaultChecked:i},(i=>{this.handleChange(i,!0)}),t.signal)}}watch3(){this.watch3Fn()}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const i=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);i&&i.remove()}this.enableAttributePassing(this._ref,"db-switch"),(()=>{this.resetIds(),this.handleValidation(),this._invalidMessage=this.invalidMessage||a})(),(()=>{this.setupObserver(this._ref)})(),this.watch0Fn(),this.watch1Fn(),this.watch2Fn(),this.watch3Fn()}disconnectedCallback(){var i,t;null===(i=this.abortController)||void 0===i||i.abort(),null===(t=this.observer)||void 0===t||t.disconnect()}render(){var i,t;return s("div",{key:"f9182aa08b0ac9a58767d5de15bada3b31850b1b",class:w("db-switch",this.className),"data-visual-aid":f(this.visualAid,"visualAid"),"data-size":this.size,"data-hide-label":b(this.showLabel),"data-variant":this.variant,"data-hide-asterisk":b(this.showRequiredAsterisk),"data-custom-validity":this.validation},s("label",{key:"4f27226dbe245461f2fd9bd6913db00a5b207732",htmlFor:this._id},s("input",{key:"b0995a9fb3246105d0769c32b16342f76e74f40c",type:"checkbox",role:"switch",id:this._id,ref:i=>{this._ref=i},checked:u(this.checked,"checked"),value:this.value,disabled:u(this.disabled,"disabled"),"aria-invalid":"invalid"===this.validation?"true":void 0,"aria-describedby":this._descByIds,name:this.name,required:u(this.required,"required"),"data-aid-icon":null!==(i=this.iconLeading)&&void 0!==i?i:this.icon,"data-aid-icon-trailing":this.iconTrailing,onChange:i=>this.handleChange(i),onBlur:i=>this.handleBlur(i),onFocus:i=>this.handleFocus(i),onKeyDown:i=>this.handleKeyDown(i)}),this.label?this.label:null,s("slot",{key:"d03438513412079f745be2671d54e4ddb87c042c"})),r(this.message,this.showMessage)?s("db-infotext",{size:"small",semantic:"adaptive",id:this._messageId,icon:this.messageIcon},this.message):null,this.hasValidState()?s("db-infotext",{size:"small",semantic:"successful",id:this._validMessageId},null!==(t=this.validMessage)&&void 0!==t?t:o):null,s("db-infotext",{key:"5f2f82215ffd9119b3f27f5d37c2349cecc28325",size:"small",semantic:"critical",id:this._invalidMessageId},this._invalidMessage),s("span",{key:"27278f4285a7aa297d4e985c2710eec5e4bb45ce","data-visually-hidden":"true",role:"status"},this._voiceOverFallback))}get rootElement(){return h(this)}static get watchers(){return{id:[{watch0:0}],"propOverrides?.id":[{watch0:0}],validation:[{watch1:0}],required:[{watch1:0}],message:[{watch1:0}],showMessage:[{watch1:0}],validMessage:[{watch1:0}],invalidMessage:[{watch1:0},{watch2:0}],checked:[{watch1:0}],_ref:[{watch2:0},{watch3:0}]}}};export{y as db_switch}
1
+ import{r as i,c as t,h as s,g as h}from"./p-BlbKvvUv.js";import{l as a,f as d,g as e,h as l,k as o}from"./p-Cm3dPtkD.js";import{h as n,d as c,s as r,u as v,e as u,l as b,g as f,c as w}from"./p-BiyJ0WOE.js";import{a as m}from"./p-BXROp_k8.js";const p=class{constructor(s){i(this,s),this.change=t(this,"change"),this.blur=t(this,"blur"),this.focus=t(this,"focus"),this._id=void 0,this._messageId=void 0,this._validMessageId=void 0,this._invalidMessageId=void 0,this._invalidMessage=void 0,this._descByIds=void 0,this._voiceOverFallback="",this.abortController=void 0,this.observer=void 0}hasValidState(){var i;return!!(null!==(i=this.validMessage)&&void 0!==i?i:"valid"===this.validation)}handleValidation(){var i,t,s,h,d,e;return(null===(t=null===(i=this._ref)||void 0===i?void 0:i.validity)||void 0===t?void 0:t.valid)&&"invalid"!==this.validation?this.hasValidState()&&(null===(d=null===(h=this._ref)||void 0===h?void 0:h.validity)||void 0===d?void 0:d.valid)&&this.required?(this._descByIds=this._validMessageId,void(n()&&(this._voiceOverFallback=null!==(e=this.validMessage)&&void 0!==e?e:o,c((()=>{this._voiceOverFallback=""}),1e3)))):void(this._descByIds=r(this.message,this.showMessage)?this._messageId:void 0):(this._descByIds=this._invalidMessageId,this._invalidMessage=this.invalidMessage||(null===(s=this._ref)||void 0===s?void 0:s.validationMessage)||a,void(n()&&(this._voiceOverFallback=this._invalidMessage||a,c((()=>{this._voiceOverFallback=""}),1e3))))}handleChange(i,t){this.change&&this.change.emit(i),this.handleValidation()}handleBlur(i){this.blur&&this.blur.emit(i)}handleFocus(i){this.focus&&this.focus.emit(i)}handleKeyDown(i){var t;"Enter"===i.key&&(i.preventDefault(),this.disabled||null===(t=this._ref)||void 0===t||t.click())}resetIds(){var i,t,s;const h=null!==(s=null!==(i=this.id)&&void 0!==i?i:null===(t=this.propOverrides)||void 0===t?void 0:t.id)&&void 0!==s?s:`switch-${v()}`;this._id=h,this._messageId=`${h}${d}`,this._validMessageId=`${h}${e}`,this._invalidMessageId=`${h}${l}`}setupObserver(i){if(!i)return;const t=i.closest("db-switch");t&&!this.observer&&(this.observer=new MutationObserver((t=>{t.some((i=>{var t;const s=i.target.attributes.getNamedItem(null!==(t=i.attributeName)&&void 0!==t?t:"");return(null==s?void 0:s.value)!==i.oldValue}))&&this.enableAttributePassing(i,"db-switch")})),this.observer.observe(t,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(i,t){const s=null==i?void 0:i.closest(t);if(i&&s){const t=s.attributes;for(let h=0;h<t.length;h++){const a=t.item(h);if(a&&"data-density"!==a.name&&(a.name.startsWith("data-")||a.name.startsWith("aria-")))a.value?i.setAttribute(a.name,a.value):i.removeAttribute(a.name),s.removeAttribute(a.name);else if(a&&["style"].includes(a.name))i.setAttribute(a.name,a.value),s.removeAttribute(a.name);else if(a&&"class"===a.name){const t=a.value.includes("hydrated"),h=a.value.replace("hydrated","").trim(),d=i.getAttribute("class");i.setAttribute(a.name,`${d||""}${h?` ${h}`:""}`),t?s.setAttribute("class","hydrated"):s.removeAttribute(a.name)}}}}watch0Fn(){var i,t;(null!==(i=this.id)&&void 0!==i?i:null===(t=this.propOverrides)||void 0===t?void 0:t.id)&&this.resetIds()}watch0(){this.watch0Fn()}watch1Fn(){this.handleValidation()}watch1(){this.watch1Fn()}watch2Fn(){var i;this._invalidMessage=this.invalidMessage||(null===(i=this._ref)||void 0===i?void 0:i.validationMessage)||a}watch2(){this.watch2Fn()}watch3Fn(){if(this._ref){const i=void 0;let t=this.abortController;t||(t=new AbortController,this.abortController=t),m(this._ref,{checked:this.checked,defaultChecked:i},(i=>{this.handleChange(i,!0)}),t.signal)}}watch3(){this.watch3Fn()}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const i=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);i&&i.remove()}this.enableAttributePassing(this._ref,"db-switch"),(()=>{this.resetIds(),this.handleValidation(),this._invalidMessage=this.invalidMessage||a})(),(()=>{this.setupObserver(this._ref)})(),this.watch0Fn(),this.watch1Fn(),this.watch2Fn(),this.watch3Fn()}disconnectedCallback(){var i,t;null===(i=this.abortController)||void 0===i||i.abort(),null===(t=this.observer)||void 0===t||t.disconnect()}render(){var i,t;return s("div",{key:"f9182aa08b0ac9a58767d5de15bada3b31850b1b",class:w("db-switch",this.className),"data-visual-aid":f(this.visualAid,"visualAid"),"data-size":this.size,"data-hide-label":b(this.showLabel),"data-variant":this.variant,"data-hide-asterisk":b(this.showRequiredAsterisk),"data-custom-validity":this.validation},s("label",{key:"4f27226dbe245461f2fd9bd6913db00a5b207732",htmlFor:this._id},s("input",{key:"b0995a9fb3246105d0769c32b16342f76e74f40c",type:"checkbox",role:"switch",id:this._id,ref:i=>{this._ref=i},checked:u(this.checked,"checked"),value:this.value,disabled:u(this.disabled,"disabled"),"aria-invalid":"invalid"===this.validation?"true":void 0,"aria-describedby":this._descByIds,name:this.name,required:u(this.required,"required"),"data-aid-icon":null!==(i=this.iconLeading)&&void 0!==i?i:this.icon,"data-aid-icon-trailing":this.iconTrailing,onChange:i=>this.handleChange(i),onBlur:i=>this.handleBlur(i),onFocus:i=>this.handleFocus(i),onKeyDown:i=>this.handleKeyDown(i)}),this.label?this.label:null,s("slot",{key:"d03438513412079f745be2671d54e4ddb87c042c"})),r(this.message,this.showMessage)?s("db-infotext",{size:"small",semantic:"adaptive",id:this._messageId,icon:this.messageIcon},this.message):null,this.hasValidState()?s("db-infotext",{size:"small",semantic:"successful",id:this._validMessageId},null!==(t=this.validMessage)&&void 0!==t?t:o):null,s("db-infotext",{key:"5f2f82215ffd9119b3f27f5d37c2349cecc28325",size:"small",semantic:"critical",id:this._invalidMessageId},this._invalidMessage),s("span",{key:"27278f4285a7aa297d4e985c2710eec5e4bb45ce","data-visually-hidden":"true",role:"status"},this._voiceOverFallback))}get rootElement(){return h(this)}static get watchers(){return{id:[{watch0:0}],"propOverrides?.id":[{watch0:0}],validation:[{watch1:0}],required:[{watch1:0}],message:[{watch1:0}],showMessage:[{watch1:0}],validMessage:[{watch1:0}],invalidMessage:[{watch1:0},{watch2:0}],checked:[{watch1:0}],_ref:[{watch2:0},{watch3:0}]}}};export{p as db_switch}
@@ -1 +1 @@
1
- import{r as i,c as t,h as s,F as a,g as n}from"./p-BlbKvvUv.js";import{n as h}from"./p-BdL-nI5y.js";import{d as o,e,g as d,c as l,u as r}from"./p-BiyJ0WOE.js";import{N as c}from"./p-C_qYW0Kh.js";import"./p-C0q9XJSc.js";const v=class{constructor(s){i(this,s),this.click=t(this,"click"),this.initialized=!1,this.hasAreaPopup=!1,this.hasSubNavigation=!0,this.isSubNavigationExpanded=!1,this.autoClose=!1,this.navigationItemSafeTriangle=void 0,this.subNavigationId=void 0,this.subNavigationToggleId=void 0,this.observer=void 0}handleNavigationItemClick(i){var t;"A"===(null===(t=null==i?void 0:i.target)||void 0===t?void 0:t.nodeName)&&(this.autoClose=!0,o((()=>{this.autoClose=!1}),1e3))}handleClick(i){this.click&&(i.stopPropagation(),this.click.emit(i)),this.hasAreaPopup&&(this.isSubNavigationExpanded=!0)}handleBackClick(i){i.stopPropagation(),this.isSubNavigationExpanded=!1}setupObserver(i){if(!i)return;const t=i.closest("db-navigation-item");t&&!this.observer&&(this.observer=new MutationObserver((t=>{t.some((i=>{var t;const s=i.target.attributes.getNamedItem(null!==(t=i.attributeName)&&void 0!==t?t:"");return(null==s?void 0:s.value)!==i.oldValue}))&&this.enableAttributePassing(i,"db-navigation-item")})),this.observer.observe(t,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(i,t){const s=null==i?void 0:i.closest(t);if(i&&s){const t=s.attributes;for(let a=0;a<t.length;a++){const n=t.item(a);if(n&&"data-density"!==n.name&&(n.name.startsWith("data-")||n.name.startsWith("aria-")))n.value?i.setAttribute(n.name,n.value):i.removeAttribute(n.name),s.removeAttribute(n.name);else if(n&&["style"].includes(n.name))i.setAttribute(n.name,n.value),s.removeAttribute(n.name);else if(n&&"class"===n.name){const t=n.value.includes("hydrated"),a=n.value.replace("hydrated","").trim(),h=i.getAttribute("class");i.setAttribute(n.name,`${h||""}${a?` ${a}`:""}`),t?s.setAttribute("class","hydrated"):s.removeAttribute(n.name)}}}}watch0Fn(){void 0!==this.subNavigationExpanded&&(this.isSubNavigationExpanded=!!e(this.subNavigationExpanded,"subNavigationExpanded"))}watch0(){this.watch0Fn()}watch1Fn(){var i;if(this.initialized&&this._ref){const t=this._ref.querySelector("menu");t&&((null===(i=t.children)||void 0===i?void 0:i.length)>0?(this.hasAreaPopup=!0,this.navigationItemSafeTriangle||(this.navigationItemSafeTriangle=new c(this._ref,t))):this.hasSubNavigation=!1)}}watch1(){this.watch1Fn()}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const i=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);i&&i.remove()}this.enableAttributePassing(this._ref,"db-navigation-item"),(()=>{var i;this.initialized=!0;const t=`sub-nav-${null!==(i=this.id)&&void 0!==i?i:r()}`;this.subNavigationId=t,this.subNavigationToggleId=`${t}-toggle`})(),(()=>{this.setupObserver(this._ref)})(),this.watch0Fn(),this.watch1Fn()}disconnectedCallback(){var i;null===(i=this.observer)||void 0===i||i.disconnect()}render(){var i,t,n;return s("li",{key:"c7821549626fe4b55c4bc6907832c972723bc174",class:l("db-navigation-item",this.className),ref:i=>{this._ref=i},id:null!==(i=this.id)&&void 0!==i?i:null===(t=this.propOverrides)||void 0===t?void 0:t.id,onMouseOver:()=>{var i;return null===(i=this.navigationItemSafeTriangle)||void 0===i?void 0:i.enableFollow()},onMouseLeave:()=>{var i;return null===(i=this.navigationItemSafeTriangle)||void 0===i?void 0:i.disableFollow()},onMouseMove:i=>{var t;return null===(t=this.navigationItemSafeTriangle)||void 0===t?void 0:t.followByMouseEvent(i)},"data-width":this.width,"data-icon":this.icon,"data-show-icon":d(this.showIcon,"showIcon"),"data-active":this.active,"data-wrap":d(this.wrap,"wrap"),"aria-disabled":d(this.disabled,"disabled")},!e(this.hideSubNavigation,"hideSubNavigation")&&this.hasSubNavigation?s(a,null,s("button",{class:"db-navigation-item-expand-button",id:this.subNavigationToggleId,"aria-haspopup":this.hasAreaPopup?"true":void 0,"aria-expanded":this.isSubNavigationExpanded,"aria-controls":this.subNavigationId,disabled:e(this.disabled,"disabled"),onClick:i=>this.handleClick(i)},this.text?this.text:s("slot",{name:"expandButton"})),s("menu",{class:"db-sub-navigation",id:this.subNavigationId,"aria-labelledby":this.subNavigationToggleId,"data-force-close":this.autoClose,onClick:i=>this.handleNavigationItemClick(i)},this.hasAreaPopup?s("div",{class:"db-mobile-navigation-back"},s("db-button",{icon:"arrow_left",variant:"ghost",id:this.backButtonId,onClick:i=>this.handleBackClick(i)},null!==(n=this.backButtonText)&&void 0!==n?n:h)):null,s("slot",{name:"subNavigation"}))):this.text?this.text:s("slot",null))}get rootElement(){return n(this)}static get watchers(){return{subNavigationExpanded:[{watch0:0}],initialized:[{watch1:0}],_ref:[{watch1:0}]}}};export{v as db_navigation_item}
1
+ import{r as i,c as t,h as s,F as a,g as n}from"./p-BlbKvvUv.js";import{n as o}from"./p-Cm3dPtkD.js";import{d as h,e,g as d,c as l,u as r}from"./p-BiyJ0WOE.js";import{N as c}from"./p-DmKfvZy3.js";import"./p-C3D_kjdU.js";const v=class{constructor(s){i(this,s),this.click=t(this,"click"),this.initialized=!1,this.hasAreaPopup=!1,this.hasSubNavigation=!0,this.isSubNavigationExpanded=!1,this.autoClose=!1,this.navigationItemSafeTriangle=void 0,this.subNavigationId=void 0,this.subNavigationToggleId=void 0,this.observer=void 0}handleNavigationItemClick(i){var t;"A"===(null===(t=null==i?void 0:i.target)||void 0===t?void 0:t.nodeName)&&(this.autoClose=!0,h((()=>{this.autoClose=!1}),1e3))}handleClick(i){this.click&&(i.stopPropagation(),this.click.emit(i)),this.hasAreaPopup&&(this.isSubNavigationExpanded=!0)}handleBackClick(i){i.stopPropagation(),this.isSubNavigationExpanded=!1}setupObserver(i){if(!i)return;const t=i.closest("db-navigation-item");t&&!this.observer&&(this.observer=new MutationObserver((t=>{t.some((i=>{var t;const s=i.target.attributes.getNamedItem(null!==(t=i.attributeName)&&void 0!==t?t:"");return(null==s?void 0:s.value)!==i.oldValue}))&&this.enableAttributePassing(i,"db-navigation-item")})),this.observer.observe(t,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(i,t){const s=null==i?void 0:i.closest(t);if(i&&s){const t=s.attributes;for(let a=0;a<t.length;a++){const n=t.item(a);if(n&&"data-density"!==n.name&&(n.name.startsWith("data-")||n.name.startsWith("aria-")))n.value?i.setAttribute(n.name,n.value):i.removeAttribute(n.name),s.removeAttribute(n.name);else if(n&&["style"].includes(n.name))i.setAttribute(n.name,n.value),s.removeAttribute(n.name);else if(n&&"class"===n.name){const t=n.value.includes("hydrated"),a=n.value.replace("hydrated","").trim(),o=i.getAttribute("class");i.setAttribute(n.name,`${o||""}${a?` ${a}`:""}`),t?s.setAttribute("class","hydrated"):s.removeAttribute(n.name)}}}}watch0Fn(){void 0!==this.subNavigationExpanded&&(this.isSubNavigationExpanded=!!e(this.subNavigationExpanded,"subNavigationExpanded"))}watch0(){this.watch0Fn()}watch1Fn(){var i;if(this.initialized&&this._ref){const t=this._ref.querySelector("menu");t&&((null===(i=t.children)||void 0===i?void 0:i.length)>0?(this.hasAreaPopup=!0,this.navigationItemSafeTriangle||(this.navigationItemSafeTriangle=new c(this._ref,t))):this.hasSubNavigation=!1)}}watch1(){this.watch1Fn()}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const i=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);i&&i.remove()}this.enableAttributePassing(this._ref,"db-navigation-item"),(()=>{var i;this.initialized=!0;const t=`sub-nav-${null!==(i=this.id)&&void 0!==i?i:r()}`;this.subNavigationId=t,this.subNavigationToggleId=`${t}-toggle`})(),(()=>{this.setupObserver(this._ref)})(),this.watch0Fn(),this.watch1Fn()}disconnectedCallback(){var i;null===(i=this.observer)||void 0===i||i.disconnect()}render(){var i,t,n;return s("li",{key:"c7821549626fe4b55c4bc6907832c972723bc174",class:l("db-navigation-item",this.className),ref:i=>{this._ref=i},id:null!==(i=this.id)&&void 0!==i?i:null===(t=this.propOverrides)||void 0===t?void 0:t.id,onMouseOver:()=>{var i;return null===(i=this.navigationItemSafeTriangle)||void 0===i?void 0:i.enableFollow()},onMouseLeave:()=>{var i;return null===(i=this.navigationItemSafeTriangle)||void 0===i?void 0:i.disableFollow()},onMouseMove:i=>{var t;return null===(t=this.navigationItemSafeTriangle)||void 0===t?void 0:t.followByMouseEvent(i)},"data-width":this.width,"data-icon":this.icon,"data-show-icon":d(this.showIcon,"showIcon"),"data-active":this.active,"data-wrap":d(this.wrap,"wrap"),"aria-disabled":d(this.disabled,"disabled")},!e(this.hideSubNavigation,"hideSubNavigation")&&this.hasSubNavigation?s(a,null,s("button",{class:"db-navigation-item-expand-button",id:this.subNavigationToggleId,"aria-haspopup":this.hasAreaPopup?"true":void 0,"aria-expanded":this.isSubNavigationExpanded,"aria-controls":this.subNavigationId,disabled:e(this.disabled,"disabled"),onClick:i=>this.handleClick(i)},this.text?this.text:s("slot",{name:"expandButton"})),s("menu",{class:"db-sub-navigation",id:this.subNavigationId,"aria-labelledby":this.subNavigationToggleId,"data-force-close":this.autoClose,onClick:i=>this.handleNavigationItemClick(i)},this.hasAreaPopup?s("div",{class:"db-mobile-navigation-back"},s("db-button",{icon:"arrow_left",variant:"ghost",id:this.backButtonId,onClick:i=>this.handleBackClick(i)},null!==(n=this.backButtonText)&&void 0!==n?n:o)):null,s("slot",{name:"subNavigation"}))):this.text?this.text:s("slot",null))}get rootElement(){return n(this)}static get watchers(){return{subNavigationExpanded:[{watch0:0}],initialized:[{watch1:0}],_ref:[{watch1:0}]}}};export{v as db_navigation_item}
@@ -1 +1 @@
1
- import{r as i,c as t,h as s,F as h,g as e}from"./p-BlbKvvUv.js";import{l as a,f as l,g as d,h as o,i as n,k as c,a as r}from"./p-BdL-nI5y.js";import{h as v,d as u,s as b,u as f,e as p,g as w,l as m,c as y}from"./p-BiyJ0WOE.js";import{c as k}from"./p-BXROp_k8.js";const g=class{constructor(s){i(this,s),this.click=t(this,"click"),this.input=t(this,"input"),this.change=t(this,"change"),this.blur=t(this,"blur"),this.focus=t(this,"focus"),this._id=void 0,this._messageId=void 0,this._validMessageId=void 0,this._invalidMessageId=void 0,this._invalidMessage=void 0,this._placeholderId="",this._descByIds=void 0,this._value="",this.initialized=!1,this._voiceOverFallback="",this.abortController=void 0,this.observer=void 0}hasValidState(){var i;return!!(null!==(i=this.validMessage)&&void 0!==i?i:"valid"===this.validation)}handleValidation(){var i,t,s,h;(null===(i=this._ref)||void 0===i?void 0:i.validity.valid)&&"invalid"!==this.validation?this.hasValidState()&&(null===(s=this._ref)||void 0===s?void 0:s.validity.valid)&&this.required?(this._descByIds=this._validMessageId,v()&&(this._voiceOverFallback=null!==(h=this.validMessage)&&void 0!==h?h:c,u((()=>this._voiceOverFallback=""),1e3))):this._descByIds=b(this.message,this.showMessage)?this._messageId:this.placeholder?this._placeholderId:void 0:(this._descByIds=this._invalidMessageId,this._invalidMessage=this.invalidMessage||(null===(t=this._ref)||void 0===t?void 0:t.validationMessage)||a,v()&&(this._voiceOverFallback=this._invalidMessage,u((()=>this._voiceOverFallback=""),1e3)))}handleClick(i){this.click&&this.click.emit(i)}handleInput(i,t){this.input&&this.input.emit(i),this.handleValidation()}handleChange(i,t){this.change&&this.change.emit(i),this.handleValidation()}handleBlur(i){this.blur&&this.blur.emit(i)}handleFocus(i){this.focus&&this.focus.emit(i)}getOptionLabel(i){var t,s;return null!==(t=i.label)&&void 0!==t?t:null===(s=i.value)||void 0===s?void 0:s.toString()}shouldShowEmptyOption(){return!("floating"!==this.variant&&!this.placeholder)&&(void 0!==this.showEmptyOption?this.showEmptyOption:!this.required)}resetIds(){var i,t,s;const h=null!==(s=null!==(i=this.id)&&void 0!==i?i:null===(t=this.propOverrides)||void 0===t?void 0:t.id)&&void 0!==s?s:`select-${f()}`;this._id=h,this._messageId=h+l,this._validMessageId=h+d,this._invalidMessageId=h+o,this._placeholderId=h+n}setupObserver(i){if(!i)return;const t=i.closest("db-select");t&&!this.observer&&(this.observer=new MutationObserver((t=>{t.some((i=>{var t;const s=i.target.attributes.getNamedItem(null!==(t=i.attributeName)&&void 0!==t?t:"");return(null==s?void 0:s.value)!==i.oldValue}))&&this.enableAttributePassing(i,"db-select")})),this.observer.observe(t,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(i,t){const s=null==i?void 0:i.closest(t);if(i&&s){const t=s.attributes;for(let h=0;h<t.length;h++){const e=t.item(h);if(e&&"data-density"!==e.name&&(e.name.startsWith("data-")||e.name.startsWith("aria-")))e.value?i.setAttribute(e.name,e.value):i.removeAttribute(e.name),s.removeAttribute(e.name);else if(e&&["style"].includes(e.name))i.setAttribute(e.name,e.value),s.removeAttribute(e.name);else if(e&&"class"===e.name){const t=e.value.includes("hydrated"),h=e.value.replace("hydrated","").trim(),a=i.getAttribute("class");i.setAttribute(e.name,`${a||""}${h?` ${h}`:""}`),t?s.setAttribute("class","hydrated"):s.removeAttribute(e.name)}}}}watch0Fn(){var i,t;(null!==(i=this.id)&&void 0!==i?i:null===(t=this.propOverrides)||void 0===t?void 0:t.id)&&this.resetIds()}watch0(){this.watch0Fn()}watch1Fn(){var i;this._invalidMessage=this.invalidMessage||(null===(i=this._ref)||void 0===i?void 0:i.validationMessage)||a}watch1(){this.watch1Fn()}watch2Fn(){if(this._id&&this.initialized){const i=this._id+l,t=this._id+n;this._messageId=i,this._validMessageId=this._id+d,this._invalidMessageId=this._id+o,this._placeholderId=t,this._descByIds=b(this.message,this.showMessage)?i:this.placeholder?t:void 0,this.handleValidation(),this.initialized=!1}}watch2(){this.watch2Fn()}watch3Fn(){this._value=this.value}watch3(){this.watch3Fn()}watch4Fn(){if(this._ref){const i=void 0;let t=this.abortController;t||(t=new AbortController,this.abortController=t),k(this._ref,{value:this.value,defaultValue:i},(i=>{this.handleChange(i,!0),this.handleInput(i,!0)}),t.signal)}}watch4(){this.watch4Fn()}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const i=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);i&&i.remove()}this.enableAttributePassing(this._ref,"db-select"),(()=>{this.initialized=!0,this.resetIds(),this._invalidMessage=this.invalidMessage||a})(),(()=>{this.setupObserver(this._ref)})(),this.watch0Fn(),this.watch1Fn(),this.watch2Fn(),this.watch3Fn(),this.watch4Fn()}disconnectedCallback(){var i,t;null===(i=this.abortController)||void 0===i||i.abort(),null===(t=this.observer)||void 0===t||t.disconnect()}render(){var i,t,e,a,l,d;return s("div",{key:"5273757e8379f6601c23f4b343812c233ddf86eb",class:y("db-select",this.className),"data-variant":this.variant,"data-hide-label":m(this.showLabel),"data-hide-asterisk":m(this.showRequiredAsterisk),"data-icon":this.icon,"data-show-icon":w(this.showIcon,"showIcon")},s("label",{key:"9c75ec7cd982b4b8d283ce9365f6642c363dae16",htmlFor:this._id},null!==(i=this.label)&&void 0!==i?i:r),s("select",{key:"8b2e0dc14717704e45524cf7803163c6c640de32","aria-invalid":"invalid"===this.validation,"data-custom-validity":this.validation,ref:i=>{this._ref=i},required:p(this.required,"required"),disabled:p(this.disabled,"disabled"),id:this._id,name:this.name,size:this.size,value:null!==(e=null!==(t=this.value)&&void 0!==t?t:this._value)&&void 0!==e?e:void 0,autocomplete:this.autocomplete,multiple:this.multiple,onInput:i=>this.handleInput(i),onClick:i=>this.handleClick(i),onChange:i=>this.handleChange(i),onBlur:i=>this.handleBlur(i),onFocus:i=>this.handleFocus(i),"aria-describedby":null!==(a=this.ariaDescribedBy)&&void 0!==a?a:this._descByIds},"floating"===this.variant||this.placeholder?s("option",{class:"placeholder",value:"","data-show-empty-option":w(this.shouldShowEmptyOption(),"showEmptyOption")}):null,(null===(l=this.options)||void 0===l?void 0:l.length)?null===(d=this.options)||void 0===d?void 0:d.map((i=>{var t;return s(h,null,i.options?s("optgroup",{label:this.getOptionLabel(i),key:void 0},null===(t=i.options)||void 0===t?void 0:t.map((i=>s("option",{value:i.value,selected:i.selected,disabled:i.disabled,key:void 0},this.getOptionLabel(i))))):s("option",{value:i.value,disabled:i.disabled,selected:i.selected,key:void 0},this.getOptionLabel(i)))})):s("slot",null)),this.placeholder?s("span",{class:"db-select-placeholder",id:this._placeholderId},this.placeholder):null,b(this.message,this.showMessage)?s("db-infotext",{size:"small",icon:this.messageIcon,id:this._messageId},this.message):null,this.hasValidState()?s("db-infotext",{size:"small",semantic:"successful",id:this._validMessageId},this.validMessage||c):null,s("db-infotext",{key:"5c7dbe0b5e75b5f4b704cf469f0806451e3d0c4a",size:"small",semantic:"critical",id:this._invalidMessageId},this._invalidMessage),s("span",{key:"932f5a52716c95629ed4eb12e3b2eee3ce1c559f","data-visually-hidden":"true",role:"status"},this._voiceOverFallback))}get rootElement(){return e(this)}static get watchers(){return{id:[{watch0:0}],"propOverrides?.id":[{watch0:0}],_ref:[{watch1:0},{watch4:0}],invalidMessage:[{watch1:0}],_id:[{watch2:0}],initialized:[{watch2:0}],value:[{watch3:0}]}}};export{g as db_select}
1
+ import{r as i,c as t,h as s,F as h,g as e}from"./p-BlbKvvUv.js";import{l as a,f as l,g as d,h as o,i as n,k as c,a as r}from"./p-Cm3dPtkD.js";import{h as v,d as u,s as b,u as f,e as p,g as m,l as w,c as y}from"./p-BiyJ0WOE.js";import{c as k}from"./p-BXROp_k8.js";const g=class{constructor(s){i(this,s),this.click=t(this,"click"),this.input=t(this,"input"),this.change=t(this,"change"),this.blur=t(this,"blur"),this.focus=t(this,"focus"),this._id=void 0,this._messageId=void 0,this._validMessageId=void 0,this._invalidMessageId=void 0,this._invalidMessage=void 0,this._placeholderId="",this._descByIds=void 0,this._value="",this.initialized=!1,this._voiceOverFallback="",this.abortController=void 0,this.observer=void 0}hasValidState(){var i;return!!(null!==(i=this.validMessage)&&void 0!==i?i:"valid"===this.validation)}handleValidation(){var i,t,s,h;(null===(i=this._ref)||void 0===i?void 0:i.validity.valid)&&"invalid"!==this.validation?this.hasValidState()&&(null===(s=this._ref)||void 0===s?void 0:s.validity.valid)&&this.required?(this._descByIds=this._validMessageId,v()&&(this._voiceOverFallback=null!==(h=this.validMessage)&&void 0!==h?h:c,u((()=>this._voiceOverFallback=""),1e3))):this._descByIds=b(this.message,this.showMessage)?this._messageId:this.placeholder?this._placeholderId:void 0:(this._descByIds=this._invalidMessageId,this._invalidMessage=this.invalidMessage||(null===(t=this._ref)||void 0===t?void 0:t.validationMessage)||a,v()&&(this._voiceOverFallback=this._invalidMessage,u((()=>this._voiceOverFallback=""),1e3)))}handleClick(i){this.click&&this.click.emit(i)}handleInput(i,t){this.input&&this.input.emit(i),this.handleValidation()}handleChange(i,t){this.change&&this.change.emit(i),this.handleValidation()}handleBlur(i){this.blur&&this.blur.emit(i)}handleFocus(i){this.focus&&this.focus.emit(i)}getOptionLabel(i){var t,s;return null!==(t=i.label)&&void 0!==t?t:null===(s=i.value)||void 0===s?void 0:s.toString()}shouldShowEmptyOption(){return!("floating"!==this.variant&&!this.placeholder)&&(void 0!==this.showEmptyOption?this.showEmptyOption:!this.required)}resetIds(){var i,t,s;const h=null!==(s=null!==(i=this.id)&&void 0!==i?i:null===(t=this.propOverrides)||void 0===t?void 0:t.id)&&void 0!==s?s:`select-${f()}`;this._id=h,this._messageId=h+l,this._validMessageId=h+d,this._invalidMessageId=h+o,this._placeholderId=h+n}setupObserver(i){if(!i)return;const t=i.closest("db-select");t&&!this.observer&&(this.observer=new MutationObserver((t=>{t.some((i=>{var t;const s=i.target.attributes.getNamedItem(null!==(t=i.attributeName)&&void 0!==t?t:"");return(null==s?void 0:s.value)!==i.oldValue}))&&this.enableAttributePassing(i,"db-select")})),this.observer.observe(t,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(i,t){const s=null==i?void 0:i.closest(t);if(i&&s){const t=s.attributes;for(let h=0;h<t.length;h++){const e=t.item(h);if(e&&"data-density"!==e.name&&(e.name.startsWith("data-")||e.name.startsWith("aria-")))e.value?i.setAttribute(e.name,e.value):i.removeAttribute(e.name),s.removeAttribute(e.name);else if(e&&["style"].includes(e.name))i.setAttribute(e.name,e.value),s.removeAttribute(e.name);else if(e&&"class"===e.name){const t=e.value.includes("hydrated"),h=e.value.replace("hydrated","").trim(),a=i.getAttribute("class");i.setAttribute(e.name,`${a||""}${h?` ${h}`:""}`),t?s.setAttribute("class","hydrated"):s.removeAttribute(e.name)}}}}watch0Fn(){var i,t;(null!==(i=this.id)&&void 0!==i?i:null===(t=this.propOverrides)||void 0===t?void 0:t.id)&&this.resetIds()}watch0(){this.watch0Fn()}watch1Fn(){var i;this._invalidMessage=this.invalidMessage||(null===(i=this._ref)||void 0===i?void 0:i.validationMessage)||a}watch1(){this.watch1Fn()}watch2Fn(){if(this._id&&this.initialized){const i=this._id+l,t=this._id+n;this._messageId=i,this._validMessageId=this._id+d,this._invalidMessageId=this._id+o,this._placeholderId=t,this._descByIds=b(this.message,this.showMessage)?i:this.placeholder?t:void 0,this.handleValidation(),this.initialized=!1}}watch2(){this.watch2Fn()}watch3Fn(){this._value=this.value}watch3(){this.watch3Fn()}watch4Fn(){if(this._ref){const i=void 0;let t=this.abortController;t||(t=new AbortController,this.abortController=t),k(this._ref,{value:this.value,defaultValue:i},(i=>{this.handleChange(i,!0),this.handleInput(i,!0)}),t.signal)}}watch4(){this.watch4Fn()}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const i=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);i&&i.remove()}this.enableAttributePassing(this._ref,"db-select"),(()=>{this.initialized=!0,this.resetIds(),this._invalidMessage=this.invalidMessage||a})(),(()=>{this.setupObserver(this._ref)})(),this.watch0Fn(),this.watch1Fn(),this.watch2Fn(),this.watch3Fn(),this.watch4Fn()}disconnectedCallback(){var i,t;null===(i=this.abortController)||void 0===i||i.abort(),null===(t=this.observer)||void 0===t||t.disconnect()}render(){var i,t,e,a,l,d;return s("div",{key:"5273757e8379f6601c23f4b343812c233ddf86eb",class:y("db-select",this.className),"data-variant":this.variant,"data-hide-label":w(this.showLabel),"data-hide-asterisk":w(this.showRequiredAsterisk),"data-icon":this.icon,"data-show-icon":m(this.showIcon,"showIcon")},s("label",{key:"9c75ec7cd982b4b8d283ce9365f6642c363dae16",htmlFor:this._id},null!==(i=this.label)&&void 0!==i?i:r),s("select",{key:"8b2e0dc14717704e45524cf7803163c6c640de32","aria-invalid":"invalid"===this.validation,"data-custom-validity":this.validation,ref:i=>{this._ref=i},required:p(this.required,"required"),disabled:p(this.disabled,"disabled"),id:this._id,name:this.name,size:this.size,value:null!==(e=null!==(t=this.value)&&void 0!==t?t:this._value)&&void 0!==e?e:void 0,autocomplete:this.autocomplete,multiple:this.multiple,onInput:i=>this.handleInput(i),onClick:i=>this.handleClick(i),onChange:i=>this.handleChange(i),onBlur:i=>this.handleBlur(i),onFocus:i=>this.handleFocus(i),"aria-describedby":null!==(a=this.ariaDescribedBy)&&void 0!==a?a:this._descByIds},"floating"===this.variant||this.placeholder?s("option",{class:"placeholder",value:"","data-show-empty-option":m(this.shouldShowEmptyOption(),"showEmptyOption")}):null,(null===(l=this.options)||void 0===l?void 0:l.length)?null===(d=this.options)||void 0===d?void 0:d.map((i=>{var t;return s(h,null,i.options?s("optgroup",{label:this.getOptionLabel(i),key:void 0},null===(t=i.options)||void 0===t?void 0:t.map((i=>s("option",{value:i.value,selected:i.selected,disabled:i.disabled,key:void 0},this.getOptionLabel(i))))):s("option",{value:i.value,disabled:i.disabled,selected:i.selected,key:void 0},this.getOptionLabel(i)))})):s("slot",null)),this.placeholder?s("span",{class:"db-select-placeholder",id:this._placeholderId},this.placeholder):null,b(this.message,this.showMessage)?s("db-infotext",{size:"small",icon:this.messageIcon,id:this._messageId},this.message):null,this.hasValidState()?s("db-infotext",{size:"small",semantic:"successful",id:this._validMessageId},this.validMessage||c):null,s("db-infotext",{key:"5c7dbe0b5e75b5f4b704cf469f0806451e3d0c4a",size:"small",semantic:"critical",id:this._invalidMessageId},this._invalidMessage),s("span",{key:"932f5a52716c95629ed4eb12e3b2eee3ce1c559f","data-visually-hidden":"true",role:"status"},this._voiceOverFallback))}get rootElement(){return e(this)}static get watchers(){return{id:[{watch0:0}],"propOverrides?.id":[{watch0:0}],_ref:[{watch1:0},{watch4:0}],invalidMessage:[{watch1:0}],_id:[{watch2:0}],initialized:[{watch2:0}],value:[{watch3:0}]}}};export{g as db_select}
@@ -1 +1 @@
1
- import{r as a,c as e,h as d,g as t}from"./p-BlbKvvUv.js";import{p as i}from"./p-BdL-nI5y.js";import{e as s,a as c,c as n}from"./p-BiyJ0WOE.js";import{i as b}from"./p-C_qYW0Kh.js";import"./p-C0q9XJSc.js";const o=class{constructor(d){a(this,d),this.toggle=e(this,"toggle"),this.initialized=!1,this.forcedToMobile=!1,this.observer=void 0}handleToggle(a){a&&a.stopPropagation&&a.stopPropagation();const e=!s(this.drawerOpen,"drawerOpen");this.toggle&&this.toggle.emit(e)}handleNavigationItemClick(a){b(a)&&this.handleToggle()}setupObserver(a){if(!a)return;const e=a.closest("db-header");e&&!this.observer&&(this.observer=new MutationObserver((e=>{e.some((a=>{var e;const d=a.target.attributes.getNamedItem(null!==(e=a.attributeName)&&void 0!==e?e:"");return(null==d?void 0:d.value)!==a.oldValue}))&&this.enableAttributePassing(a,"db-header")})),this.observer.observe(e,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(a,e){const d=null==a?void 0:a.closest(e);if(a&&d){const e=d.attributes;for(let t=0;t<e.length;t++){const i=e.item(t);if(i&&"data-density"!==i.name&&(i.name.startsWith("data-")||i.name.startsWith("aria-")))i.value?a.setAttribute(i.name,i.value):a.removeAttribute(i.name),d.removeAttribute(i.name);else if(i&&["style"].includes(i.name))a.setAttribute(i.name,i.value),d.removeAttribute(i.name);else if(i&&"class"===i.name){const e=i.value.includes("hydrated"),t=i.value.replace("hydrated","").trim(),s=a.getAttribute("class");a.setAttribute(i.name,`${s||""}${t?` ${t}`:""}`),e?d.setAttribute("class","hydrated"):d.removeAttribute(i.name)}}}}watch0Fn(){this.initialized&&this._ref&&this.forceMobile&&(c(this._ref,{key:"data-force-mobile",value:"true"}),this.forcedToMobile=!0)}watch0(){this.watch0Fn()}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const a=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);a&&a.remove()}this.enableAttributePassing(this._ref,"db-header"),(()=>{this.initialized=!0})(),(()=>{this.setupObserver(this._ref)})(),this.watch0Fn()}disconnectedCallback(){var a;null===(a=this.observer)||void 0===a||a.disconnect()}render(){var a,e,t;return d("header",{key:"aeeac33c4b9db2b9749b24ccca840aa03bac81df",class:n("db-header",this.className),ref:a=>{this._ref=a},id:null!==(a=this.id)&&void 0!==a?a:null===(e=this.propOverrides)||void 0===e?void 0:e.id,"data-width":this.width,"data-on-forcing-mobile":this.forceMobile&&!this.forcedToMobile},d("div",{key:"1078f960dbc6ed24664b5ff5c23c3524d725b822",class:"db-header-meta-navigation"},d("slot",{key:"c55739d8ae17254c2aa457795a31017a07ab5a88",name:"metaNavigation"})),d("div",{key:"6e82ab28439854dec6bcc6dcf9ed3fa36c6f5e69",class:"db-header-navigation-bar"},d("div",{key:"7e991f8cdee7c1767ea3aefdd9a01c662fb5d178",class:"db-header-brand-container"},d("slot",{key:"a1e2aea32b28520095612367e97a8b955f93bd96",name:"brand"})),d("div",{key:"273f17e3b8594dad83d8fbad021008405d865176",class:"db-header-navigation-container"},d("div",{key:"8bd9a08a0f3cf8083d238963c2cc3715edf1d5a4",class:"db-header-navigation"},d("slot",{key:"abfd95ef152c34e53806c114f243ff26b63a9bbe"})),d("div",{key:"4a61c6d86a0362913b45a432095a621ca22d1268",class:"db-header-primary-action"},d("slot",{key:"3b79bfc6d85a0a39fcb3ca2550be0a2a36b6a682",name:"primaryAction"}))),d("div",{key:"1c506669010a04ae260b692811ed17d76a3ecc03",class:"db-header-action-container"},d("div",{key:"aa522f5b0010a1747a1bc7f550c3700a0bad4e8a",class:"db-header-burger-menu-container"},d("db-button",{key:"2223a3865ed4ea94e3a3849e73e4113e1db0fb66",icon:"menu",variant:"ghost",noText:!0,onClick:()=>this.handleToggle()},null!==(t=this.burgerMenuLabel)&&void 0!==t?t:i)),d("div",{key:"86f41a6b354de871ac3f4d9cf8b7205c699ba189",class:"db-header-secondary-action"},d("slot",{key:"43e443323eb93871bb19cbea2222da6eb8ebd0e8",name:"secondaryAction"})))),d("db-drawer",{key:"8a8474e8a7f54d827f5844f76dea9ce44ef565e0",class:"db-header-drawer",spacing:"small",rounded:!0,closeButtonId:this.closeButtonId,closeButtonText:this.closeButtonText,open:s(this.drawerOpen),onClose:()=>this.handleToggle()},d("div",{key:"21f360dc09f2d53aea13fde8b13c1ffb3781f558",class:"db-header-drawer-navigation"},d("div",{key:"0c567049a2c1788decb48b10b0115348d2f3b406",class:"db-header-navigation",onClick:a=>this.handleNavigationItemClick(a)},d("slot",{key:"1403d518f5f63eca522ccecaf5a4b5f153649a33"})),d("div",{key:"c624cf3f4ea7e89a87e430ef96b34fa4ce6d4236",class:"db-header-meta-navigation"},d("slot",{key:"4fde72b2d7d8c098a8a09160e8f36ca2ddbd0702",name:"metaNavigation"}))),d("div",{key:"91d6fc1b39b3cfc39b8563956971f56a168da218",class:"db-header-secondary-action"},d("slot",{key:"a9745f3cf4c91db6a3cd0bc4e4bf904b8bc7a2aa",name:"secondaryAction"}))))}get rootElement(){return t(this)}static get watchers(){return{initialized:[{watch0:0}],_ref:[{watch0:0}]}}};export{o as db_header}
1
+ import{r as a,c as e,h as d,g as t}from"./p-BlbKvvUv.js";import{r as i}from"./p-Cm3dPtkD.js";import{e as s,a as c,c as n}from"./p-BiyJ0WOE.js";import{i as b}from"./p-DmKfvZy3.js";import"./p-C3D_kjdU.js";const o=class{constructor(d){a(this,d),this.toggle=e(this,"toggle"),this.initialized=!1,this.forcedToMobile=!1,this.observer=void 0}handleToggle(a){a&&a.stopPropagation&&a.stopPropagation();const e=!s(this.drawerOpen,"drawerOpen");this.toggle&&this.toggle.emit(e)}handleNavigationItemClick(a){b(a)&&this.handleToggle()}setupObserver(a){if(!a)return;const e=a.closest("db-header");e&&!this.observer&&(this.observer=new MutationObserver((e=>{e.some((a=>{var e;const d=a.target.attributes.getNamedItem(null!==(e=a.attributeName)&&void 0!==e?e:"");return(null==d?void 0:d.value)!==a.oldValue}))&&this.enableAttributePassing(a,"db-header")})),this.observer.observe(e,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(a,e){const d=null==a?void 0:a.closest(e);if(a&&d){const e=d.attributes;for(let t=0;t<e.length;t++){const i=e.item(t);if(i&&"data-density"!==i.name&&(i.name.startsWith("data-")||i.name.startsWith("aria-")))i.value?a.setAttribute(i.name,i.value):a.removeAttribute(i.name),d.removeAttribute(i.name);else if(i&&["style"].includes(i.name))a.setAttribute(i.name,i.value),d.removeAttribute(i.name);else if(i&&"class"===i.name){const e=i.value.includes("hydrated"),t=i.value.replace("hydrated","").trim(),s=a.getAttribute("class");a.setAttribute(i.name,`${s||""}${t?` ${t}`:""}`),e?d.setAttribute("class","hydrated"):d.removeAttribute(i.name)}}}}watch0Fn(){this.initialized&&this._ref&&this.forceMobile&&(c(this._ref,{key:"data-force-mobile",value:"true"}),this.forcedToMobile=!0)}watch0(){this.watch0Fn()}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const a=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);a&&a.remove()}this.enableAttributePassing(this._ref,"db-header"),(()=>{this.initialized=!0})(),(()=>{this.setupObserver(this._ref)})(),this.watch0Fn()}disconnectedCallback(){var a;null===(a=this.observer)||void 0===a||a.disconnect()}render(){var a,e,t;return d("header",{key:"aeeac33c4b9db2b9749b24ccca840aa03bac81df",class:n("db-header",this.className),ref:a=>{this._ref=a},id:null!==(a=this.id)&&void 0!==a?a:null===(e=this.propOverrides)||void 0===e?void 0:e.id,"data-width":this.width,"data-on-forcing-mobile":this.forceMobile&&!this.forcedToMobile},d("div",{key:"1078f960dbc6ed24664b5ff5c23c3524d725b822",class:"db-header-meta-navigation"},d("slot",{key:"c55739d8ae17254c2aa457795a31017a07ab5a88",name:"metaNavigation"})),d("div",{key:"6e82ab28439854dec6bcc6dcf9ed3fa36c6f5e69",class:"db-header-navigation-bar"},d("div",{key:"7e991f8cdee7c1767ea3aefdd9a01c662fb5d178",class:"db-header-brand-container"},d("slot",{key:"a1e2aea32b28520095612367e97a8b955f93bd96",name:"brand"})),d("div",{key:"273f17e3b8594dad83d8fbad021008405d865176",class:"db-header-navigation-container"},d("div",{key:"8bd9a08a0f3cf8083d238963c2cc3715edf1d5a4",class:"db-header-navigation"},d("slot",{key:"abfd95ef152c34e53806c114f243ff26b63a9bbe"})),d("div",{key:"4a61c6d86a0362913b45a432095a621ca22d1268",class:"db-header-primary-action"},d("slot",{key:"3b79bfc6d85a0a39fcb3ca2550be0a2a36b6a682",name:"primaryAction"}))),d("div",{key:"1c506669010a04ae260b692811ed17d76a3ecc03",class:"db-header-action-container"},d("div",{key:"aa522f5b0010a1747a1bc7f550c3700a0bad4e8a",class:"db-header-burger-menu-container"},d("db-button",{key:"2223a3865ed4ea94e3a3849e73e4113e1db0fb66",icon:"menu",variant:"ghost",noText:!0,onClick:()=>this.handleToggle()},null!==(t=this.burgerMenuLabel)&&void 0!==t?t:i)),d("div",{key:"86f41a6b354de871ac3f4d9cf8b7205c699ba189",class:"db-header-secondary-action"},d("slot",{key:"43e443323eb93871bb19cbea2222da6eb8ebd0e8",name:"secondaryAction"})))),d("db-drawer",{key:"8a8474e8a7f54d827f5844f76dea9ce44ef565e0",class:"db-header-drawer",spacing:"small",rounded:!0,closeButtonId:this.closeButtonId,closeButtonText:this.closeButtonText,open:s(this.drawerOpen),onClose:()=>this.handleToggle()},d("div",{key:"21f360dc09f2d53aea13fde8b13c1ffb3781f558",class:"db-header-drawer-navigation"},d("div",{key:"0c567049a2c1788decb48b10b0115348d2f3b406",class:"db-header-navigation",onClick:a=>this.handleNavigationItemClick(a)},d("slot",{key:"1403d518f5f63eca522ccecaf5a4b5f153649a33"})),d("div",{key:"c624cf3f4ea7e89a87e430ef96b34fa4ce6d4236",class:"db-header-meta-navigation"},d("slot",{key:"4fde72b2d7d8c098a8a09160e8f36ca2ddbd0702",name:"metaNavigation"}))),d("div",{key:"91d6fc1b39b3cfc39b8563956971f56a168da218",class:"db-header-secondary-action"},d("slot",{key:"a9745f3cf4c91db6a3cd0bc4e4bf904b8bc7a2aa",name:"secondaryAction"}))))}get rootElement(){return t(this)}static get watchers(){return{initialized:[{watch0:0}],_ref:[{watch0:0}]}}};export{o as db_header}
@@ -14,7 +14,9 @@ const DEFAULT_INVALID_MESSAGE = 'TODO: Add an invalidMessage';
14
14
  const DEFAULT_REMOVE = 'Remove';
15
15
  const DEFAULT_BACK = 'Back';
16
16
  const DEFAULT_SELECTED = 'Selected';
17
- const DEFAULT_BURGER_MENU = 'BurgerMenu';
17
+ const DEFAULT_SCROLL_LEFT = 'Scroll left';
18
+ const DEFAULT_SCROLL_RIGHT = 'Scroll right';
19
+ const DEFAULT_BURGER_MENU = 'Open navigation menu';
18
20
  const DEFAULT_ICON = 'brand';
19
21
  const DEFAULT_ROWS = 4;
20
22
  const DEFAULT_CLOSE_BUTTON = 'Close';
@@ -93,4 +95,4 @@ const TESTING_VIEWPORTS = [Object.assign({ name: 'desktop' }, DESKTOP_VIEWPORT),
93
95
  const DB_UX_LOCAL_STORAGE_FRAMEWORK = 'db-ux-framework';
94
96
  const DB_UX_LOCAL_STORAGE_MODE = 'db-ux-mode';
95
97
 
96
- export { SEMANTICS as A, DEFAULT_VIEWPORT as B, COLOR_CONST as C, DEFAULT_ID as D, DESKTOP_VIEWPORT as E, DB_UX_LOCAL_STORAGE_FRAMEWORK as F, DB_UX_LOCAL_STORAGE_MODE as G, SEMANTIC as S, TESTING_VIEWPORTS as T, DEFAULT_LABEL as a, DEFAULT_PLACEHOLDER as b, DEFAULT_MESSAGE as c, DEFAULT_LABEL_ID_SUFFIX as d, DEFAULT_SELECT_ID_SUFFIX as e, DEFAULT_MESSAGE_ID_SUFFIX as f, DEFAULT_VALID_MESSAGE_ID_SUFFIX as g, DEFAULT_INVALID_MESSAGE_ID_SUFFIX as h, DEFAULT_PLACEHOLDER_ID_SUFFIX as i, DEFAULT_DATALIST_ID_SUFFIX as j, DEFAULT_VALID_MESSAGE as k, DEFAULT_INVALID_MESSAGE as l, DEFAULT_REMOVE as m, DEFAULT_BACK as n, DEFAULT_SELECTED as o, DEFAULT_BURGER_MENU as p, DEFAULT_ICON as q, DEFAULT_ROWS as r, DEFAULT_CLOSE_BUTTON as s, DENSITY_CONST as t, DENSITY as u, DENSITIES as v, COLOR_SIMPLE as w, COLOR as x, COLORS as y, COLORS_SIMPLE as z };
98
+ export { COLORS as A, COLORS_SIMPLE as B, COLOR_CONST as C, DEFAULT_ID as D, SEMANTICS as E, DEFAULT_VIEWPORT as F, DESKTOP_VIEWPORT as G, DB_UX_LOCAL_STORAGE_FRAMEWORK as H, DB_UX_LOCAL_STORAGE_MODE as I, SEMANTIC as S, TESTING_VIEWPORTS as T, DEFAULT_LABEL as a, DEFAULT_PLACEHOLDER as b, DEFAULT_MESSAGE as c, DEFAULT_LABEL_ID_SUFFIX as d, DEFAULT_SELECT_ID_SUFFIX as e, DEFAULT_MESSAGE_ID_SUFFIX as f, DEFAULT_VALID_MESSAGE_ID_SUFFIX as g, DEFAULT_INVALID_MESSAGE_ID_SUFFIX as h, DEFAULT_PLACEHOLDER_ID_SUFFIX as i, DEFAULT_DATALIST_ID_SUFFIX as j, DEFAULT_VALID_MESSAGE as k, DEFAULT_INVALID_MESSAGE as l, DEFAULT_REMOVE as m, DEFAULT_BACK as n, DEFAULT_SELECTED as o, DEFAULT_SCROLL_LEFT as p, DEFAULT_SCROLL_RIGHT as q, DEFAULT_BURGER_MENU as r, DEFAULT_ICON as s, DEFAULT_ROWS as t, DEFAULT_CLOSE_BUTTON as u, DENSITY_CONST as v, DENSITY as w, DENSITIES as x, COLOR_SIMPLE as y, COLOR as z };
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, g as getElement } from './index-BlbKvvUv.js';
2
- import { a as DEFAULT_LABEL } from './constants-BdL-nI5y.js';
2
+ import { a as DEFAULT_LABEL } from './constants-Cm3dPtkD.js';
3
3
  import { g as getBooleanAsString, c as cls } from './index-BiyJ0WOE.js';
4
4
 
5
5
  const DBBadge = class {
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, g as getElement } from './index-BlbKvvUv.js';
2
- import { q as DEFAULT_ICON } from './constants-BdL-nI5y.js';
2
+ import { s as DEFAULT_ICON } from './constants-Cm3dPtkD.js';
3
3
  import { g as getBooleanAsString, c as cls } from './index-BiyJ0WOE.js';
4
4
 
5
5
  const DBBrand = class {
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-BlbKvvUv.js';
2
- import { l as DEFAULT_INVALID_MESSAGE, f as DEFAULT_MESSAGE_ID_SUFFIX, g as DEFAULT_VALID_MESSAGE_ID_SUFFIX, h as DEFAULT_INVALID_MESSAGE_ID_SUFFIX, k as DEFAULT_VALID_MESSAGE } from './constants-BdL-nI5y.js';
2
+ import { l as DEFAULT_INVALID_MESSAGE, f as DEFAULT_MESSAGE_ID_SUFFIX, g as DEFAULT_VALID_MESSAGE_ID_SUFFIX, h as DEFAULT_INVALID_MESSAGE_ID_SUFFIX, k as DEFAULT_VALID_MESSAGE } from './constants-Cm3dPtkD.js';
3
3
  import { h as hasVoiceOver, d as delay, s as stringPropVisible, u as uuid, e as getBoolean, l as getHideProp, c as cls } from './index-BiyJ0WOE.js';
4
4
  import { a as addCheckedResetEventListener } from './form-components-DvI2f9Yi.js';
5
5
 
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, g as getElement, c as createEvent } from './index-BlbKvvUv.js';
2
2
  import { c as cls, e as getBoolean, g as getBooleanAsString, h as hasVoiceOver, d as delay, s as stringPropVisible, i as isArrayOfStrings, u as uuid, k as getInputValue, f as getNumber, j as getStep, b as isIOSSafari, l as getHideProp } from './index-BiyJ0WOE.js';
3
- import { l as DEFAULT_INVALID_MESSAGE, f as DEFAULT_MESSAGE_ID_SUFFIX, g as DEFAULT_VALID_MESSAGE_ID_SUFFIX, h as DEFAULT_INVALID_MESSAGE_ID_SUFFIX, j as DEFAULT_DATALIST_ID_SUFFIX, k as DEFAULT_VALID_MESSAGE, b as DEFAULT_PLACEHOLDER, a as DEFAULT_LABEL, m as DEFAULT_REMOVE } from './constants-BdL-nI5y.js';
3
+ import { l as DEFAULT_INVALID_MESSAGE, f as DEFAULT_MESSAGE_ID_SUFFIX, g as DEFAULT_VALID_MESSAGE_ID_SUFFIX, h as DEFAULT_INVALID_MESSAGE_ID_SUFFIX, j as DEFAULT_DATALIST_ID_SUFFIX, k as DEFAULT_VALID_MESSAGE, b as DEFAULT_PLACEHOLDER, a as DEFAULT_LABEL, m as DEFAULT_REMOVE } from './constants-Cm3dPtkD.js';
4
4
  import { c as addValueResetEventListener } from './form-components-DvI2f9Yi.js';
5
5
 
6
6
  const DBCustomSelectDropdown = class {
@@ -1,10 +1,11 @@
1
1
  import { r as registerInstance, c as createEvent, h, F as Fragment, g as getElement } from './index-BlbKvvUv.js';
2
- import { l as DEFAULT_INVALID_MESSAGE, a as DEFAULT_LABEL, m as DEFAULT_REMOVE, f as DEFAULT_MESSAGE_ID_SUFFIX, g as DEFAULT_VALID_MESSAGE_ID_SUFFIX, h as DEFAULT_INVALID_MESSAGE_ID_SUFFIX, e as DEFAULT_SELECT_ID_SUFFIX, d as DEFAULT_LABEL_ID_SUFFIX, i as DEFAULT_PLACEHOLDER_ID_SUFFIX, o as DEFAULT_SELECTED, k as DEFAULT_VALID_MESSAGE, c as DEFAULT_MESSAGE, s as DEFAULT_CLOSE_BUTTON } from './constants-BdL-nI5y.js';
2
+ import { l as DEFAULT_INVALID_MESSAGE, a as DEFAULT_LABEL, m as DEFAULT_REMOVE, f as DEFAULT_MESSAGE_ID_SUFFIX, g as DEFAULT_VALID_MESSAGE_ID_SUFFIX, h as DEFAULT_INVALID_MESSAGE_ID_SUFFIX, e as DEFAULT_SELECT_ID_SUFFIX, d as DEFAULT_LABEL_ID_SUFFIX, i as DEFAULT_PLACEHOLDER_ID_SUFFIX, o as DEFAULT_SELECTED, k as DEFAULT_VALID_MESSAGE, c as DEFAULT_MESSAGE, u as DEFAULT_CLOSE_BUTTON } from './constants-Cm3dPtkD.js';
3
3
  import { h as hasVoiceOver, d as delay, s as stringPropVisible, m as getSearchInput, u as uuid, e as getBoolean, g as getBooleanAsString, l as getHideProp, c as cls } from './index-BiyJ0WOE.js';
4
- import { D as DocumentClickListener } from './document-click-listener-B9qg-hEl.js';
5
- import { D as DocumentScrollListener } from './document-scroll-listener-ewGU9bif.js';
6
- import { a as handleFixedDropdown } from './floating-components-C0q9XJSc.js';
4
+ import { D as DocumentClickListener } from './document-click-listener-Cqaqu5Jn.js';
5
+ import { D as DocumentScrollListener, I as IntersectionObserverListener } from './intersection-observer-listener-DNd-fDFa.js';
6
+ import { h as handleFixedDropdown } from './floating-components-C3D_kjdU.js';
7
7
  import { b as addResetEventListener } from './form-components-DvI2f9Yi.js';
8
+ import { R as ResizeObserverListener } from './resize-observer-listener-ed-nCkCj.js';
8
9
 
9
10
  const DBCustomSelect = class {
10
11
  constructor(hostRef) {
@@ -42,7 +43,8 @@ const DBCustomSelect = class {
42
43
  this._documentClickListenerCallbackId = undefined;
43
44
  this._internalChangeTimestamp = 0;
44
45
  this._documentScrollListenerCallbackId = undefined;
45
- this._observer = undefined;
46
+ this._intersectionObserverCallbackId = undefined;
47
+ this._resizeObserverCallbackId = undefined;
46
48
  this._searchValue = undefined;
47
49
  this.selectAllChecked = false;
48
50
  this.selectAllIndeterminate = false;
@@ -102,7 +104,6 @@ const DBCustomSelect = class {
102
104
  }
103
105
  }
104
106
  handleDropdownToggle(event) {
105
- var _a, _b;
106
107
  if (this.dropdownToggle) {
107
108
  event.stopPropagation();
108
109
  this.dropdownToggle.emit(event);
@@ -113,7 +114,13 @@ const DBCustomSelect = class {
113
114
  this._documentScrollListenerCallbackId =
114
115
  new DocumentScrollListener().addCallback((event) => this.handleDocumentScroll(event));
115
116
  this.handleAutoPlacement();
116
- (_a = this._observer) === null || _a === void 0 ? void 0 : _a.observe(this.detailsRef);
117
+ this._resizeObserverCallbackId = new ResizeObserverListener().observe(document.documentElement, () => this.handleAutoPlacement());
118
+ this._intersectionObserverCallbackId =
119
+ new IntersectionObserverListener().observe(this.detailsRef, (entry) => {
120
+ if (!entry.isIntersecting && this.detailsRef.open) {
121
+ this.detailsRef.open = false;
122
+ }
123
+ });
117
124
  if (!event.target.dataset["test"]) {
118
125
  // We need this workaround for snapshot testing
119
126
  this.handleOpenByKeyboardFocus();
@@ -126,7 +133,12 @@ const DBCustomSelect = class {
126
133
  if (this._documentScrollListenerCallbackId) {
127
134
  new DocumentScrollListener().removeCallback(this._documentScrollListenerCallbackId);
128
135
  }
129
- (_b = this._observer) === null || _b === void 0 ? void 0 : _b.unobserve(this.detailsRef);
136
+ if (this._resizeObserverCallbackId) {
137
+ new ResizeObserverListener().unobserve(this._resizeObserverCallbackId);
138
+ }
139
+ if (this._intersectionObserverCallbackId) {
140
+ new IntersectionObserverListener().unobserve(this._intersectionObserverCallbackId);
141
+ }
130
142
  }
131
143
  }
132
144
  getNativeSelectValue() {
@@ -797,16 +809,6 @@ const DBCustomSelect = class {
797
809
  const onMountHook_0 = () => {
798
810
  this.resetIds();
799
811
  this._invalidMessage = this.invalidMessage || DEFAULT_INVALID_MESSAGE;
800
- if (typeof window !== "undefined" && "IntersectionObserver" in window) {
801
- this._observer = new IntersectionObserver((payload) => {
802
- if (this.detailsRef) {
803
- const entry = payload.find(({ target }) => target === this.detailsRef);
804
- if (entry && !entry.isIntersecting && this.detailsRef.open) {
805
- this.detailsRef.open = false;
806
- }
807
- }
808
- });
809
- }
810
812
  };
811
813
  onMountHook_0();
812
814
  const onMountHook_1 = () => {
@@ -836,23 +838,36 @@ const DBCustomSelect = class {
836
838
  disconnectedCallback() {
837
839
  var _a, _b;
838
840
  (_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
841
+ // Clean up singleton observers if dropdown was open when unmounting
842
+ if (this._documentClickListenerCallbackId) {
843
+ new DocumentClickListener().removeCallback(this._documentClickListenerCallbackId);
844
+ }
845
+ if (this._documentScrollListenerCallbackId) {
846
+ new DocumentScrollListener().removeCallback(this._documentScrollListenerCallbackId);
847
+ }
848
+ if (this._resizeObserverCallbackId) {
849
+ new ResizeObserverListener().unobserve(this._resizeObserverCallbackId);
850
+ }
851
+ if (this._intersectionObserverCallbackId) {
852
+ new IntersectionObserverListener().unobserve(this._intersectionObserverCallbackId);
853
+ }
839
854
  (_b = this.observer) === null || _b === void 0 ? void 0 : _b.disconnect();
840
855
  }
841
856
  render() {
842
857
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
843
- return (h("div", { key: '9f804bd057ef9cde5cc83263e5b1e3a477ad5d2e', class: cls("db-custom-select", this.className), id: this._id, ref: (el) => {
858
+ return (h("div", { key: 'bda216afb16404d7d1b75bd2ff88fdc526aaed51', class: cls("db-custom-select", this.className), id: this._id, ref: (el) => {
844
859
  this._ref = el;
845
860
  }, "aria-invalid": this._validity === "invalid", "data-custom-validity": this._validity, "data-width": this.formFieldWidth, "data-variant": this.variant === "floating" &&
846
861
  this.selectedType === "tag" &&
847
862
  this.multiple
848
863
  ? "above"
849
- : this.variant, "data-required": getBooleanAsString(this.required, "required"), "data-hide-asterisk": getHideProp(this.showRequiredAsterisk), "data-placement": this.placement, "data-selected-type": this.multiple ? this.selectedType : "text", "data-hide-label": getHideProp(this.showLabel), "data-icon": this.icon, "data-show-icon": getBooleanAsString(this.showIcon, "showIcon") }, h("label", { key: '1ce826237b63c3abfad8b55068c25fdc4acc2d7a', id: this._labelId }, (_a = this.label) !== null && _a !== void 0 ? _a : DEFAULT_LABEL, h("select", { key: '9f16da6b3d9e633e4ce70e8654925df86a901074', role: "none", hidden: true, id: this._selectId, tabIndex: -1, ref: (el) => {
864
+ : this.variant, "data-required": getBooleanAsString(this.required, "required"), "data-hide-asterisk": getHideProp(this.showRequiredAsterisk), "data-placement": this.placement, "data-selected-type": this.multiple ? this.selectedType : "text", "data-hide-label": getHideProp(this.showLabel), "data-icon": this.icon, "data-show-icon": getBooleanAsString(this.showIcon, "showIcon") }, h("label", { key: 'b03e2a77f30db9e04582dfc0436ea7a01fa76630', id: this._labelId }, (_a = this.label) !== null && _a !== void 0 ? _a : DEFAULT_LABEL, h("select", { key: '9199d84585ab6ab4ba2d5301abcc9b04167af19a', role: "none", hidden: true, id: this._selectId, tabIndex: -1, ref: (el) => {
850
865
  this.selectRef = el;
851
866
  }, form: this.form, name: this.name, "data-custom-validity": this._validity, multiple: getBoolean(this.multiple, "multiple"), disabled: getBoolean(this.disabled, "disabled"), required: getBoolean(this.required, "required"), onChange: (event) => this.satisfyReact(event) }, ((_b = this.options) === null || _b === void 0 ? void 0 : _b.length)
852
867
  ? (_c = this.options) === null || _c === void 0 ? void 0 : _c.map((option) => (h("option", { disabled: option.disabled, value: option.value, key: undefined }, this.getOptionLabel(option))))
853
- : null)), h("details", { key: '6a88c236898236ee539bced6fa3b3918be8f693d', ref: (el) => {
868
+ : null)), h("details", { key: '51d1fa7a7babfe3186626426ba24d0d9e3f1dc37', ref: (el) => {
854
869
  this.detailsRef = el;
855
- }, open: this.open, onToggle: (event) => this.handleDropdownToggle(event), onKeyDown: (event) => this.handleKeyboardPress(event) }, h("slot", { key: 'c9dd3e30dd094da51de1b2064749a211fef6eb36' }), this.options ? (h(Fragment, null, h("summary", { class: "db-custom-select-form-field", id: this._summaryId, "aria-disabled": getBooleanAsString(this.disabled, "disabled"), tabIndex: this.disabled ? -1 : undefined, "aria-labelledby": this._labelId }, ((_d = this._selectedLabels) === null || _d === void 0 ? void 0 : _d.length) ? (h("span", { "data-visually-hidden": getBooleanAsString(this.selectedType === "tag", "selectedType"), id: this._selectedLabelsId }, this.selectedPrefix ? (h("span", { "data-visually-hidden": "true" }, this.selectedPrefix)) : null, this._selectedLabels)) : null, this.selectedType === "tag" ? (h("div", null, (_e = this._selectedOptions) === null || _e === void 0 ? void 0 : _e.map((option) => (h("db-tag", { emphasis: "strong", behavior: "removable", removeButton: this.getTagRemoveLabel(option), onRemove: (event) => this.handleTagRemove(option, event), key: undefined }, this.getOptionLabel(option)))))) : null), h("db-custom-select-dropdown", { width: this.dropdownWidth }, this.searchEnabled ? (h("div", null, h("db-input", { type: "search", ref: (el) => {
870
+ }, open: this.open, onToggle: (event) => this.handleDropdownToggle(event), onKeyDown: (event) => this.handleKeyboardPress(event) }, h("slot", { key: '43e42b641ff32aaebb69f19e18aa691aa45d51bb' }), this.options ? (h(Fragment, null, h("summary", { class: "db-custom-select-form-field", id: this._summaryId, "aria-disabled": getBooleanAsString(this.disabled, "disabled"), tabIndex: this.disabled ? -1 : undefined, "aria-labelledby": this._labelId }, ((_d = this._selectedLabels) === null || _d === void 0 ? void 0 : _d.length) ? (h("span", { "data-visually-hidden": getBooleanAsString(this.selectedType === "tag", "selectedType"), id: this._selectedLabelsId }, this.selectedPrefix ? (h("span", { "data-visually-hidden": "true" }, this.selectedPrefix)) : null, this._selectedLabels)) : null, this.selectedType === "tag" ? (h("div", null, (_e = this._selectedOptions) === null || _e === void 0 ? void 0 : _e.map((option) => (h("db-tag", { emphasis: "strong", behavior: "removable", removeButton: this.getTagRemoveLabel(option), onRemove: (event) => this.handleTagRemove(option, event), key: undefined }, this.getOptionLabel(option)))))) : null), h("db-custom-select-dropdown", { width: this.dropdownWidth }, this.searchEnabled ? (h("div", null, h("db-input", { type: "search", ref: (el) => {
856
871
  this.searchInputRef = el;
857
872
  }, name: this._id, form: this._id, showLabel: false, value: this._searchValue, label: (_f = this.searchLabel) !== null && _f !== void 0 ? _f : DEFAULT_LABEL, placeholder: (_g = this.searchPlaceholder) !== null && _g !== void 0 ? _g : this.searchLabel, ariaDescribedBy: this._hasNoOptions || this.showLoading
858
873
  ? this._infoTextId
@@ -862,7 +877,7 @@ const DBCustomSelect = class {
862
877
  this.selectAllRef = el;
863
878
  }, form: this._id, checked: this.selectAllChecked, onChange: (event) => this.handleSelectAll(event) }), this.getSelectAllLabel())))) : null, h("db-custom-select-list", { multiple: getBoolean(this.multiple, "multiple"), label: (_k = (_j = this.listLabel) !== null && _j !== void 0 ? _j : this.label) !== null && _k !== void 0 ? _k : DEFAULT_LABEL }, (_l = this._options) === null || _l === void 0 ? void 0 : _l.map((option) => (h("db-custom-select-list-item", { type: this.multiple ? "checkbox" : "radio", showDivider: option.showDivider, icon: option.icon, isGroupTitle: option.isGroupTitle, groupTitle: this.getOptionLabel(option), name: this._id, checked: this.getOptionChecked(option.value), disabled: option.disabled, value: option.value, onChange: () => this.handleSelect(option.value), key: undefined }, !option.isGroupTitle
864
879
  ? this.getOptionLabel(option)
865
- : null)))))), h("div", null, h("db-button", { variant: "ghost", width: "full", icon: "cross", size: "small", name: this._id, form: this._id, onClick: () => this.handleClose(undefined, true) }, (_m = this.mobileCloseButtonText) !== null && _m !== void 0 ? _m : DEFAULT_CLOSE_BUTTON))))) : null), ((_o = this.showClearSelection) !== null && _o !== void 0 ? _o : true) && ((_p = this._values) === null || _p === void 0 ? void 0 : _p.length) ? (h("db-button", { icon: "cross", variant: "ghost", size: "small", noText: true, name: this._id, form: this._id, disabled: getBoolean(this.disabled, "disabled"), onClick: (event) => this.handleClearAll(event) }, this.clearSelectionText, h("db-tooltip", { placement: "top" }, this.clearSelectionText))) : null, h("span", { key: '3210abcd9df6f8232346aa78def9e3bd078f35db', class: "db-custom-select-placeholder", "aria-hidden": "true", id: this._placeholderId }, (_q = this.placeholder) !== null && _q !== void 0 ? _q : this.label), stringPropVisible(this.message, this.showMessage) ? (h("db-infotext", { size: "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, this.hasValidState() ? (h("db-infotext", { size: "small", semantic: "successful", id: this._validMessageId }, this.validMessage || DEFAULT_VALID_MESSAGE)) : null, h("db-infotext", { key: 'a552df2b93f899230e80623e2014691e411c3b40', size: "small", semantic: "critical", id: this._invalidMessageId }, this._invalidMessage), h("span", { key: 'b29045acf1f702b90b434dc4aa9d589c0c6c57f5', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
880
+ : null)))))), h("div", null, h("db-button", { variant: "ghost", width: "full", icon: "cross", size: "small", name: this._id, form: this._id, onClick: () => this.handleClose(undefined, true) }, (_m = this.mobileCloseButtonText) !== null && _m !== void 0 ? _m : DEFAULT_CLOSE_BUTTON))))) : null), ((_o = this.showClearSelection) !== null && _o !== void 0 ? _o : true) && ((_p = this._values) === null || _p === void 0 ? void 0 : _p.length) ? (h("db-button", { icon: "cross", variant: "ghost", size: "small", noText: true, name: this._id, form: this._id, disabled: getBoolean(this.disabled, "disabled"), onClick: (event) => this.handleClearAll(event) }, this.clearSelectionText, h("db-tooltip", { placement: "top" }, this.clearSelectionText))) : null, h("span", { key: 'be8bfd29257ff0a1704521328ca89859aa90316c', class: "db-custom-select-placeholder", "aria-hidden": "true", id: this._placeholderId }, (_q = this.placeholder) !== null && _q !== void 0 ? _q : this.label), stringPropVisible(this.message, this.showMessage) ? (h("db-infotext", { size: "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, this.hasValidState() ? (h("db-infotext", { size: "small", semantic: "successful", id: this._validMessageId }, this.validMessage || DEFAULT_VALID_MESSAGE)) : null, h("db-infotext", { key: '2f4a7d001908b0d869a6e0a791ff5850e4424973', size: "small", semantic: "critical", id: this._invalidMessageId }, this._invalidMessage), h("span", { key: 'fbf4b18e031650164d4fda62c2a94fe14b753f9b', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
866
881
  }
867
882
  get rootElement() { return getElement(this); }
868
883
  static get watchers() { return {
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-BlbKvvUv.js';
2
- import { s as DEFAULT_CLOSE_BUTTON } from './constants-BdL-nI5y.js';
2
+ import { u as DEFAULT_CLOSE_BUTTON } from './constants-Cm3dPtkD.js';
3
3
  import { o as isKeyboardEvent, e as getBoolean, d as delay, g as getBooleanAsString, c as cls } from './index-BiyJ0WOE.js';
4
4
 
5
5
  const DBDrawer = class {
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-BlbKvvUv.js';
2
- import { p as DEFAULT_BURGER_MENU } from './constants-BdL-nI5y.js';
2
+ import { r as DEFAULT_BURGER_MENU } from './constants-Cm3dPtkD.js';
3
3
  import { e as getBoolean, a as addAttributeToChildren, c as cls } from './index-BiyJ0WOE.js';
4
- import { i as isEventTargetNavigationItem } from './navigation-Cd7KZ6E2.js';
5
- import './floating-components-C0q9XJSc.js';
4
+ import { i as isEventTargetNavigationItem } from './navigation-BET7zThU.js';
5
+ import './floating-components-C3D_kjdU.js';
6
6
 
7
7
  const DBHeader = class {
8
8
  constructor(hostRef) {
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, c as createEvent, h, F as Fragment, g as getElement } from './index-BlbKvvUv.js';
2
- import { n as DEFAULT_BACK } from './constants-BdL-nI5y.js';
2
+ import { n as DEFAULT_BACK } from './constants-Cm3dPtkD.js';
3
3
  import { d as delay, e as getBoolean, g as getBooleanAsString, c as cls, u as uuid } from './index-BiyJ0WOE.js';
4
- import { N as NavigationItemSafeTriangle } from './navigation-Cd7KZ6E2.js';
5
- import './floating-components-C0q9XJSc.js';
4
+ import { N as NavigationItemSafeTriangle } from './navigation-BET7zThU.js';
5
+ import './floating-components-C3D_kjdU.js';
6
6
 
7
7
  const DBNavigationItem = class {
8
8
  constructor(hostRef) {
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-BlbKvvUv.js';
2
- import { s as DEFAULT_CLOSE_BUTTON } from './constants-BdL-nI5y.js';
2
+ import { u as DEFAULT_CLOSE_BUTTON } from './constants-Cm3dPtkD.js';
3
3
  import { e as getBoolean, s as stringPropVisible, g as getBooleanAsString, p as getNotificationRole, c as cls } from './index-BiyJ0WOE.js';
4
4
 
5
5
  const DBNotification = class {
@@ -1,7 +1,8 @@
1
1
  import { r as registerInstance, h, g as getElement } from './index-BlbKvvUv.js';
2
2
  import { d as delay, g as getBooleanAsString, c as cls } from './index-BiyJ0WOE.js';
3
- import { D as DocumentScrollListener } from './document-scroll-listener-ewGU9bif.js';
4
- import { b as handleFixedPopover } from './floating-components-C0q9XJSc.js';
3
+ import { D as DocumentScrollListener, I as IntersectionObserverListener } from './intersection-observer-listener-DNd-fDFa.js';
4
+ import { a as handleFixedPopover } from './floating-components-C3D_kjdU.js';
5
+ import { R as ResizeObserverListener } from './resize-observer-listener-ed-nCkCj.js';
5
6
 
6
7
  const DBPopover = class {
7
8
  constructor(hostRef) {
@@ -9,7 +10,8 @@ const DBPopover = class {
9
10
  this.initialized = false;
10
11
  this.isExpanded = false;
11
12
  this._documentScrollListenerCallbackId = undefined;
12
- this._observer = undefined;
13
+ this._intersectionObserverCallbackId = undefined;
14
+ this._resizeObserverCallbackId = undefined;
13
15
  this.observer = undefined;
14
16
  }
15
17
  handleEscape(event) {
@@ -27,8 +29,7 @@ const DBPopover = class {
27
29
  if (article) {
28
30
  // This is a workaround for angular
29
31
  void delay(() => {
30
- var _a;
31
- handleFixedPopover(article, this._ref, (_a = this.placement) !== null && _a !== void 0 ? _a : "bottom");
32
+ handleFixedPopover(article, this._ref);
32
33
  }, 1);
33
34
  }
34
35
  }
@@ -39,18 +40,35 @@ const DBPopover = class {
39
40
  }
40
41
  }
41
42
  handleEnter() {
42
- var _a;
43
43
  this.isExpanded = true;
44
+ // Clean up any existing observers to prevent leaks from repeated enter
45
+ if (this._documentScrollListenerCallbackId) {
46
+ new DocumentScrollListener().removeCallback(this._documentScrollListenerCallbackId);
47
+ this._documentScrollListenerCallbackId = undefined;
48
+ }
49
+ if (this._resizeObserverCallbackId) {
50
+ new ResizeObserverListener().unobserve(this._resizeObserverCallbackId);
51
+ this._resizeObserverCallbackId = undefined;
52
+ }
53
+ if (this._intersectionObserverCallbackId) {
54
+ new IntersectionObserverListener().unobserve(this._intersectionObserverCallbackId);
55
+ this._intersectionObserverCallbackId = undefined;
56
+ }
44
57
  this._documentScrollListenerCallbackId =
45
58
  new DocumentScrollListener().addCallback((event) => this.handleDocumentScroll(event));
46
59
  this.handleAutoPlacement();
60
+ this._resizeObserverCallbackId = new ResizeObserverListener().observe(document.documentElement, () => this.handleAutoPlacement());
47
61
  const child = this.getTrigger();
48
62
  if (child) {
49
- (_a = this._observer) === null || _a === void 0 ? void 0 : _a.observe(child);
63
+ this._intersectionObserverCallbackId =
64
+ new IntersectionObserverListener().observe(child, (entry) => {
65
+ if (!entry.isIntersecting) {
66
+ this.handleEscape(false);
67
+ }
68
+ });
50
69
  }
51
70
  }
52
71
  handleLeave(event) {
53
- var _a;
54
72
  const element = event === null || event === void 0 ? void 0 : event.target;
55
73
  const parent = element === null || element === void 0 ? void 0 : element.parentNode;
56
74
  if (!parent ||
@@ -60,10 +78,15 @@ const DBPopover = class {
60
78
  this.isExpanded = false;
61
79
  if (this._documentScrollListenerCallbackId) {
62
80
  new DocumentScrollListener().removeCallback(this._documentScrollListenerCallbackId);
81
+ this._documentScrollListenerCallbackId = undefined;
63
82
  }
64
- const child = this.getTrigger();
65
- if (child) {
66
- (_a = this._observer) === null || _a === void 0 ? void 0 : _a.unobserve(child);
83
+ if (this._resizeObserverCallbackId) {
84
+ new ResizeObserverListener().unobserve(this._resizeObserverCallbackId);
85
+ this._resizeObserverCallbackId = undefined;
86
+ }
87
+ if (this._intersectionObserverCallbackId) {
88
+ new IntersectionObserverListener().unobserve(this._intersectionObserverCallbackId);
89
+ this._intersectionObserverCallbackId = undefined;
67
90
  }
68
91
  }
69
92
  }
@@ -162,14 +185,6 @@ const DBPopover = class {
162
185
  ["mouseleave", "focusout"].forEach((event) => {
163
186
  this._ref.addEventListener(event, () => this.handleLeave());
164
187
  });
165
- if (typeof window !== "undefined" && "IntersectionObserver" in window) {
166
- this._observer = new IntersectionObserver((payload) => {
167
- const entry = payload.find(({ target }) => target === this.getTrigger());
168
- if (entry && !entry.isIntersecting) {
169
- this.handleEscape(false);
170
- }
171
- });
172
- }
173
188
  }
174
189
  }
175
190
  watch0() {
@@ -207,13 +222,25 @@ const DBPopover = class {
207
222
  }
208
223
  disconnectedCallback() {
209
224
  var _a;
225
+ if (this._documentScrollListenerCallbackId) {
226
+ new DocumentScrollListener().removeCallback(this._documentScrollListenerCallbackId);
227
+ this._documentScrollListenerCallbackId = undefined;
228
+ }
229
+ if (this._resizeObserverCallbackId) {
230
+ new ResizeObserverListener().unobserve(this._resizeObserverCallbackId);
231
+ this._resizeObserverCallbackId = undefined;
232
+ }
233
+ if (this._intersectionObserverCallbackId) {
234
+ new IntersectionObserverListener().unobserve(this._intersectionObserverCallbackId);
235
+ this._intersectionObserverCallbackId = undefined;
236
+ }
210
237
  (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
211
238
  }
212
239
  render() {
213
240
  var _a, _b, _c;
214
- return (h("div", { key: '6c495cb9c8f329dd2cf07bfc55b56eb9aa524fb9', class: cls("db-popover", this.className), ref: (el) => {
241
+ return (h("div", { key: '124a7610347af23e253e44d6dd375bee39497aee', class: cls("db-popover", this.className), ref: (el) => {
215
242
  this._ref = el;
216
- }, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, h("slot", { key: 'f74be440cae4d35f76ff2899bae864fc9e3e5c8a', name: "trigger" }), h("article", { key: 'efec32b56bf7267aed0f0723306398f9e5f66c75', class: "db-popover-content", "data-spacing": this.spacing, "data-gap": getBooleanAsString(this.gap, "gap"), "data-animation": getBooleanAsString((_c = this.animation) !== null && _c !== void 0 ? _c : true, "animation"), "data-open": getBooleanAsString(this.open, "open"), "data-delay": this.delay, "data-width": this.width, "data-placement": this.placement }, h("slot", { key: '2a1957f512ad0c9eca6e9e5f50721dda1ce56cf3' }))));
243
+ }, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, h("slot", { key: '991ca1af404118228b483944a0bed68e8309afee', name: "trigger" }), h("article", { key: '1cafb0e20aa5bab2a5dd324f86ef20f1cde09239', class: "db-popover-content", "data-spacing": this.spacing, "data-gap": getBooleanAsString(this.gap, "gap"), "data-animation": getBooleanAsString((_c = this.animation) !== null && _c !== void 0 ? _c : true, "animation"), "data-open": getBooleanAsString(this.open, "open"), "data-delay": this.delay, "data-width": this.width, "data-placement": this.placement }, h("slot", { key: '0f53e6ebb0eb04ddc766d116cf4fc7f4a37516b1' }))));
217
244
  }
218
245
  get rootElement() { return getElement(this); }
219
246
  static get watchers() { return {
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, F as Fragment, g as getElement } from './index-BlbKvvUv.js';
2
- import { l as DEFAULT_INVALID_MESSAGE, f as DEFAULT_MESSAGE_ID_SUFFIX, g as DEFAULT_VALID_MESSAGE_ID_SUFFIX, h as DEFAULT_INVALID_MESSAGE_ID_SUFFIX, i as DEFAULT_PLACEHOLDER_ID_SUFFIX, k as DEFAULT_VALID_MESSAGE, a as DEFAULT_LABEL } from './constants-BdL-nI5y.js';
2
+ import { l as DEFAULT_INVALID_MESSAGE, f as DEFAULT_MESSAGE_ID_SUFFIX, g as DEFAULT_VALID_MESSAGE_ID_SUFFIX, h as DEFAULT_INVALID_MESSAGE_ID_SUFFIX, i as DEFAULT_PLACEHOLDER_ID_SUFFIX, k as DEFAULT_VALID_MESSAGE, a as DEFAULT_LABEL } from './constants-Cm3dPtkD.js';
3
3
  import { h as hasVoiceOver, d as delay, s as stringPropVisible, u as uuid, e as getBoolean, g as getBooleanAsString, l as getHideProp, c as cls } from './index-BiyJ0WOE.js';
4
4
  import { c as addValueResetEventListener } from './form-components-DvI2f9Yi.js';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-BlbKvvUv.js';
2
- import { l as DEFAULT_INVALID_MESSAGE, f as DEFAULT_MESSAGE_ID_SUFFIX, g as DEFAULT_VALID_MESSAGE_ID_SUFFIX, h as DEFAULT_INVALID_MESSAGE_ID_SUFFIX, k as DEFAULT_VALID_MESSAGE } from './constants-BdL-nI5y.js';
2
+ import { l as DEFAULT_INVALID_MESSAGE, f as DEFAULT_MESSAGE_ID_SUFFIX, g as DEFAULT_VALID_MESSAGE_ID_SUFFIX, h as DEFAULT_INVALID_MESSAGE_ID_SUFFIX, k as DEFAULT_VALID_MESSAGE } from './constants-Cm3dPtkD.js';
3
3
  import { h as hasVoiceOver, d as delay, s as stringPropVisible, u as uuid, e as getBoolean, l as getHideProp, g as getBooleanAsString, c as cls } from './index-BiyJ0WOE.js';
4
4
  import { a as addCheckedResetEventListener } from './form-components-DvI2f9Yi.js';
5
5