@db-ux/wc-core-components 4.13.1-angular-signal-forms6-a1510bb → 4.13.1-angular-signal-forms9-42cbbed

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 (226) hide show
  1. package/bundle/db-accordion-item.js +1 -1
  2. package/bundle/db-accordion.js +1 -1
  3. package/bundle/db-badge.js +1 -1
  4. package/bundle/db-brand.js +1 -1
  5. package/bundle/db-button.js +1 -1
  6. package/bundle/db-card.js +1 -1
  7. package/bundle/db-checkbox.js +1 -1
  8. package/bundle/db-custom-button.js +1 -1
  9. package/bundle/db-custom-select-dropdown.js +1 -1
  10. package/bundle/db-custom-select-form-field.js +1 -1
  11. package/bundle/db-custom-select-list-item.js +1 -1
  12. package/bundle/db-custom-select-list.js +1 -1
  13. package/bundle/db-custom-select.js +1 -1
  14. package/bundle/db-divider.js +1 -1
  15. package/bundle/db-drawer.js +1 -1
  16. package/bundle/db-header.js +1 -1
  17. package/bundle/db-icon.js +1 -1
  18. package/bundle/db-infotext.js +1 -1
  19. package/bundle/db-input.js +1 -1
  20. package/bundle/db-link.js +1 -1
  21. package/bundle/db-navigation-item.js +1 -1
  22. package/bundle/db-navigation.js +1 -1
  23. package/bundle/db-notification.js +1 -1
  24. package/bundle/db-page.js +1 -1
  25. package/bundle/db-popover.js +1 -1
  26. package/bundle/db-radio.js +1 -1
  27. package/bundle/db-section.js +1 -1
  28. package/bundle/db-select.js +1 -1
  29. package/bundle/db-stack.js +1 -1
  30. package/bundle/db-switch.js +1 -1
  31. package/bundle/db-tab-item.js +1 -1
  32. package/bundle/db-tab-list.js +1 -1
  33. package/bundle/db-tab-panel.js +1 -1
  34. package/bundle/db-table-body.js +1 -1
  35. package/bundle/db-table-caption.js +1 -1
  36. package/bundle/db-table-data-cell.js +1 -1
  37. package/bundle/db-table-footer.js +1 -1
  38. package/bundle/db-table-head.js +1 -1
  39. package/bundle/db-table-header-cell.js +1 -1
  40. package/bundle/db-table-row.js +1 -1
  41. package/bundle/db-table.js +1 -1
  42. package/bundle/db-tabs.js +1 -1
  43. package/bundle/db-tag.js +1 -1
  44. package/bundle/db-textarea.js +1 -1
  45. package/bundle/db-tooltip.js +1 -1
  46. package/bundle/index.js +1 -1
  47. package/bundle/{p-C9llbu6g.js → p-BEB81OKc.js} +1 -1
  48. package/bundle/{p-CEfk-PhT.js → p-BEk7DV7j.js} +1 -1
  49. package/bundle/p-BHbH4m9P.js +1 -0
  50. package/bundle/p-B_Ym2iQI.js +1 -0
  51. package/bundle/{p-DcgghWWs.js → p-Be1wVxvg.js} +1 -1
  52. package/bundle/{p-to845Mg2.js → p-BeY5dlW3.js} +1 -1
  53. package/bundle/p-Bpe95kXk.js +1 -0
  54. package/bundle/{p-C4lguqGn.js → p-By8B0zRG.js} +1 -1
  55. package/bundle/{p-CYYSsu3p.js → p-BygObMH8.js} +1 -1
  56. package/bundle/{p-BQov9sQb.js → p-C7oh-1Gi.js} +1 -1
  57. package/bundle/{p-fu0VCCbW.js → p-CSvl-BIi.js} +1 -1
  58. package/{dist/db-ux/p-BtImZ8Nt.js → bundle/p-CTkfdjBp.js} +1 -1
  59. package/bundle/{p-k8bCF_aj.js → p-DNIQoAaq.js} +1 -1
  60. package/bundle/{p-Cc5hdI0x.js → p-DURkJXL0.js} +1 -1
  61. package/bundle/{p-BpO8Ok-r.js → p-DY4zD5g8.js} +1 -1
  62. package/bundle/{p-CuC4YsIB.js → p-Dd85RhMq.js} +1 -1
  63. package/bundle/{p-C0JLpZ9Q.js → p-DdPms_08.js} +1 -1
  64. package/bundle/p-DmQrjhko.js +1 -0
  65. package/bundle/{p-G57oLrr4.js → p-DmmLQjqi.js} +1 -1
  66. package/bundle/{p-DTM6Wcbf.js → p-Du6xs6Aw.js} +1 -1
  67. package/bundle/{p-gIJnyld5.js → p-LpyedXhR.js} +1 -1
  68. package/bundle/p-_LLUUEFR.js +1 -0
  69. package/bundle/p-sxMcNIKS.js +1 -0
  70. package/dist/cjs/db-accordion-item.cjs.entry.js +1 -1
  71. package/dist/cjs/db-accordion.cjs.entry.js +1 -1
  72. package/dist/cjs/db-badge.cjs.entry.js +1 -1
  73. package/dist/cjs/db-brand.cjs.entry.js +1 -1
  74. package/dist/cjs/db-button.cjs.entry.js +1 -1
  75. package/dist/cjs/db-card.cjs.entry.js +1 -1
  76. package/dist/cjs/db-checkbox.cjs.entry.js +2 -2
  77. package/dist/cjs/db-custom-button.cjs.entry.js +1 -1
  78. package/dist/cjs/db-custom-select-dropdown_5.cjs.entry.js +2 -2
  79. package/dist/cjs/db-custom-select-form-field.cjs.entry.js +1 -1
  80. package/dist/cjs/db-custom-select.cjs.entry.js +4 -4
  81. package/dist/cjs/db-divider.cjs.entry.js +1 -1
  82. package/dist/cjs/db-drawer.cjs.entry.js +1 -1
  83. package/dist/cjs/db-header.cjs.entry.js +1 -1
  84. package/dist/cjs/db-icon.cjs.entry.js +1 -1
  85. package/dist/cjs/db-infotext.cjs.entry.js +1 -1
  86. package/dist/cjs/db-link_4.cjs.entry.js +10 -8
  87. package/dist/cjs/db-navigation-item.cjs.entry.js +1 -1
  88. package/dist/cjs/db-navigation.cjs.entry.js +1 -1
  89. package/dist/cjs/db-notification.cjs.entry.js +1 -1
  90. package/dist/cjs/db-page.cjs.entry.js +1 -1
  91. package/dist/cjs/db-popover.cjs.entry.js +2 -2
  92. package/dist/cjs/db-radio.cjs.entry.js +2 -2
  93. package/dist/cjs/db-section.cjs.entry.js +1 -1
  94. package/dist/cjs/db-select.cjs.entry.js +2 -2
  95. package/dist/cjs/db-stack.cjs.entry.js +1 -1
  96. package/dist/cjs/db-switch.cjs.entry.js +2 -2
  97. package/dist/cjs/db-tab-item_3.cjs.entry.js +1 -1
  98. package/dist/cjs/db-table-body_3.cjs.entry.js +10 -10
  99. package/dist/cjs/db-table-caption.cjs.entry.js +4 -3
  100. package/dist/cjs/db-table.cjs.entry.js +4 -4
  101. package/dist/cjs/db-tabs.cjs.entry.js +1 -1
  102. package/dist/cjs/db-textarea.cjs.entry.js +2 -2
  103. package/dist/cjs/db-tooltip.cjs.entry.js +2 -2
  104. package/dist/cjs/db-ux.cjs.js +1 -1
  105. package/dist/cjs/{document-click-listener-DdNXbErU.js → document-click-listener-Bt1Iysz5.js} +1 -1
  106. package/dist/cjs/{document-scroll-listener-CvAZ6uPr.js → document-scroll-listener-Dd_hGebZ.js} +1 -1
  107. package/dist/cjs/{form-components-CmQlkARp.js → form-components-oFHK6vKb.js} +1 -1
  108. package/dist/cjs/{index-spuu3sXz.js → index-BmNxQ4GI.js} +30 -2
  109. package/dist/cjs/index.cjs.js +3 -3
  110. package/dist/cjs/loader.cjs.js +1 -1
  111. package/dist/collection/components/table/table.js +27 -3
  112. package/dist/collection/components/table-body/table-body.js +27 -3
  113. package/dist/collection/components/table-caption/table-caption.js +27 -2
  114. package/dist/collection/components/table-data-cell/table-data-cell.js +27 -2
  115. package/dist/collection/components/table-footer/table-footer.js +27 -3
  116. package/dist/collection/components/table-head/table-head.js +27 -3
  117. package/dist/collection/components/table-header-cell/table-header-cell.js +27 -2
  118. package/dist/collection/components/table-row/table-row.js +27 -3
  119. package/dist/collection/utils/index.js +30 -2
  120. package/dist/custom-elements.json +154 -42
  121. package/dist/db-ux/db-ux.esm.js +1 -1
  122. package/dist/db-ux/index.esm.js +1 -1
  123. package/dist/db-ux/{p-38c55e9c.entry.js → p-0dc302c9.entry.js} +1 -1
  124. package/dist/db-ux/{p-d9d006e7.entry.js → p-1052a73c.entry.js} +1 -1
  125. package/dist/db-ux/{p-eedf08e0.entry.js → p-15858e34.entry.js} +1 -1
  126. package/dist/db-ux/{p-71399ee3.entry.js → p-15fd6665.entry.js} +1 -1
  127. package/dist/db-ux/{p-87281518.entry.js → p-177f3aeb.entry.js} +1 -1
  128. package/dist/db-ux/{p-f271332c.entry.js → p-1f740a3b.entry.js} +1 -1
  129. package/dist/db-ux/{p-f0b5c785.entry.js → p-2aee37e2.entry.js} +1 -1
  130. package/dist/db-ux/{p-a8556349.entry.js → p-2e2603dc.entry.js} +1 -1
  131. package/dist/db-ux/{p-a6f33f3b.entry.js → p-2e66b25f.entry.js} +1 -1
  132. package/dist/db-ux/{p-68f00121.entry.js → p-3649de37.entry.js} +1 -1
  133. package/dist/db-ux/{p-f964d5f5.entry.js → p-38639909.entry.js} +1 -1
  134. package/dist/db-ux/{p-5623ff36.entry.js → p-3b9d4cc3.entry.js} +1 -1
  135. package/dist/db-ux/p-53cabb2c.entry.js +1 -0
  136. package/dist/db-ux/{p-e58fbd4d.entry.js → p-550bd66a.entry.js} +1 -1
  137. package/dist/db-ux/{p-77a47225.entry.js → p-66ffa296.entry.js} +1 -1
  138. package/dist/db-ux/{p-57527cef.entry.js → p-72004bee.entry.js} +1 -1
  139. package/dist/db-ux/{p-a176424b.entry.js → p-826856e9.entry.js} +1 -1
  140. package/dist/db-ux/p-911828b3.entry.js +1 -0
  141. package/dist/db-ux/{p-f5f73623.entry.js → p-91d7fcc4.entry.js} +1 -1
  142. package/dist/db-ux/{p-6fdc00bd.entry.js → p-98071987.entry.js} +1 -1
  143. package/dist/db-ux/{p-6d41baf1.entry.js → p-99148e01.entry.js} +1 -1
  144. package/dist/db-ux/{p-db1b9f5d.entry.js → p-9b550357.entry.js} +1 -1
  145. package/dist/db-ux/{p-OOIf-5XP.js → p-B-HK8lhm.js} +1 -1
  146. package/{bundle/p-D6L0n3gO.js → dist/db-ux/p-BXROp_k8.js} +1 -1
  147. package/dist/db-ux/p-BiyJ0WOE.js +1 -0
  148. package/dist/db-ux/p-Z7eYHp_l.js +1 -0
  149. package/dist/db-ux/{p-8540dbb7.entry.js → p-b37a3904.entry.js} +1 -1
  150. package/dist/db-ux/{p-6ce4a109.entry.js → p-bb01adbe.entry.js} +1 -1
  151. package/dist/db-ux/{p-4751361d.entry.js → p-bc835df4.entry.js} +1 -1
  152. package/dist/db-ux/{p-70b6ebcd.entry.js → p-c33fe9e0.entry.js} +1 -1
  153. package/dist/db-ux/{p-81edb316.entry.js → p-c83a359f.entry.js} +1 -1
  154. package/dist/db-ux/{p-1e70d93f.entry.js → p-caa963ed.entry.js} +1 -1
  155. package/dist/db-ux/{p-2c23efe2.entry.js → p-d40a44ca.entry.js} +1 -1
  156. package/dist/db-ux/{p-a07e33e7.entry.js → p-dfc9ad26.entry.js} +1 -1
  157. package/dist/db-ux/{p-183c78b7.entry.js → p-e35b2f5d.entry.js} +1 -1
  158. package/dist/db-ux/{p-37bf8d87.entry.js → p-e95bc40d.entry.js} +1 -1
  159. package/dist/db-ux/{p-e66aa9d8.entry.js → p-ebb8dbb2.entry.js} +1 -1
  160. package/dist/db-ux/{p-6b8375e8.entry.js → p-f4eb1ad4.entry.js} +1 -1
  161. package/dist/esm/db-accordion-item.entry.js +1 -1
  162. package/dist/esm/db-accordion.entry.js +1 -1
  163. package/dist/esm/db-badge.entry.js +1 -1
  164. package/dist/esm/db-brand.entry.js +1 -1
  165. package/dist/esm/db-button.entry.js +1 -1
  166. package/dist/esm/db-card.entry.js +1 -1
  167. package/dist/esm/db-checkbox.entry.js +2 -2
  168. package/dist/esm/db-custom-button.entry.js +1 -1
  169. package/dist/esm/db-custom-select-dropdown_5.entry.js +2 -2
  170. package/dist/esm/db-custom-select-form-field.entry.js +1 -1
  171. package/dist/esm/db-custom-select.entry.js +4 -4
  172. package/dist/esm/db-divider.entry.js +1 -1
  173. package/dist/esm/db-drawer.entry.js +1 -1
  174. package/dist/esm/db-header.entry.js +1 -1
  175. package/dist/esm/db-icon.entry.js +1 -1
  176. package/dist/esm/db-infotext.entry.js +1 -1
  177. package/dist/esm/db-link_4.entry.js +10 -8
  178. package/dist/esm/db-navigation-item.entry.js +1 -1
  179. package/dist/esm/db-navigation.entry.js +1 -1
  180. package/dist/esm/db-notification.entry.js +1 -1
  181. package/dist/esm/db-page.entry.js +1 -1
  182. package/dist/esm/db-popover.entry.js +2 -2
  183. package/dist/esm/db-radio.entry.js +2 -2
  184. package/dist/esm/db-section.entry.js +1 -1
  185. package/dist/esm/db-select.entry.js +2 -2
  186. package/dist/esm/db-stack.entry.js +1 -1
  187. package/dist/esm/db-switch.entry.js +2 -2
  188. package/dist/esm/db-tab-item_3.entry.js +1 -1
  189. package/dist/esm/db-table-body_3.entry.js +10 -10
  190. package/dist/esm/db-table-caption.entry.js +4 -3
  191. package/dist/esm/db-table.entry.js +4 -4
  192. package/dist/esm/db-tabs.entry.js +1 -1
  193. package/dist/esm/db-textarea.entry.js +2 -2
  194. package/dist/esm/db-tooltip.entry.js +2 -2
  195. package/dist/esm/db-ux.js +1 -1
  196. package/dist/esm/{document-click-listener-9wJfRcvz.js → document-click-listener-B9qg-hEl.js} +1 -1
  197. package/dist/esm/{document-scroll-listener-4F0ZAg9p.js → document-scroll-listener-ewGU9bif.js} +1 -1
  198. package/dist/esm/{form-components-ZV7IN0oG.js → form-components-DvI2f9Yi.js} +1 -1
  199. package/dist/esm/{index-fumiz06Y.js → index-BiyJ0WOE.js} +30 -2
  200. package/dist/esm/index.js +3 -3
  201. package/dist/esm/loader.js +1 -1
  202. package/dist/types/components/table/table.d.ts +1 -0
  203. package/dist/types/components/table-body/table-body.d.ts +1 -0
  204. package/dist/types/components/table-caption/table-caption.d.ts +1 -0
  205. package/dist/types/components/table-data-cell/table-data-cell.d.ts +1 -0
  206. package/dist/types/components/table-footer/table-footer.d.ts +1 -0
  207. package/dist/types/components/table-head/table-head.d.ts +1 -0
  208. package/dist/types/components/table-header-cell/table-header-cell.d.ts +1 -0
  209. package/dist/types/components/table-row/table-row.d.ts +1 -0
  210. package/dist/types/components.d.ts +16 -0
  211. package/dist/types/shared/constants.d.ts +38 -38
  212. package/dist/types/shared/figma.d.ts +11 -4
  213. package/dist/types/utils/index.d.ts +1 -0
  214. package/dist/vscode.html-custom-data.json +32 -0
  215. package/dist/web-types.json +64 -0
  216. package/package.json +4 -4
  217. package/bundle/p-2eQDIPlF.js +0 -1
  218. package/bundle/p-C2w7ILj8.js +0 -1
  219. package/bundle/p-C47AKJPy.js +0 -1
  220. package/bundle/p-Cn5NdjPW.js +0 -1
  221. package/bundle/p-DJTpgiBy.js +0 -1
  222. package/bundle/p-DiEfz0o1.js +0 -1
  223. package/dist/db-ux/p-5706f20a.entry.js +0 -1
  224. package/dist/db-ux/p-90e9ec2d.entry.js +0 -1
  225. package/dist/db-ux/p-BihrW11j.js +0 -1
  226. package/dist/db-ux/p-fumiz06Y.js +0 -1
@@ -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-fumiz06Y.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 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}
@@ -0,0 +1 @@
1
+ import{r as t,h as e,g as s}from"./p-BlbKvvUv.js";import{u as i,c as d}from"./p-BiyJ0WOE.js";const l=class{constructor(e){t(this,e)}enableAttributePassing(t,e){const s=null==t?void 0:t.closest(e);if(t&&s){const e=s.attributes;for(let i=0;i<e.length;i++){const d=e.item(i);if(d&&"data-density"!==d.name&&(d.name.startsWith("data-")||d.name.startsWith("aria-")))d.value?t.setAttribute(d.name,d.value):t.removeAttribute(d.name),s.removeAttribute(d.name);else if(d&&["style"].includes(d.name))t.setAttribute(d.name,d.value),s.removeAttribute(d.name);else if(d&&"class"===d.name){const e=d.value.includes("hydrated"),i=d.value.replace("hydrated","").trim(),l=t.getAttribute("class");t.setAttribute(d.name,`${l||""}${i?` ${i}`:""}`),e?s.setAttribute("class","hydrated"):s.removeAttribute(d.name)}}}}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-table-body")}render(){var t,s,l;return e("tbody",{key:"10a65b64f330303f9af74809cd236fd00cb71b60",class:d("db-table-body",this.className),ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(s=this.propOverrides)||void 0===s?void 0:s.id},this.rows?null===(l=this.rows)||void 0===l?void 0:l.map(((t,s)=>{var d,l,a;return e("db-table-row",{class:null!==(d=t.className)&&void 0!==d?d:t.class,key:`${null!==(a=null!==(l=t.id)&&void 0!==l?l:this.id)&&void 0!==a?a:i()}-table-body-row-${s}`,cells:t.cells,interactive:t.interactive,id:t.id})})):e("slot",null))}get rootElement(){return s(this)}},a=class{constructor(e){t(this,e)}enableAttributePassing(t,e){const s=null==t?void 0:t.closest(e);if(t&&s){const e=s.attributes;for(let i=0;i<e.length;i++){const d=e.item(i);if(d&&"data-density"!==d.name&&(d.name.startsWith("data-")||d.name.startsWith("aria-")))d.value?t.setAttribute(d.name,d.value):t.removeAttribute(d.name),s.removeAttribute(d.name);else if(d&&["style"].includes(d.name))t.setAttribute(d.name,d.value),s.removeAttribute(d.name);else if(d&&"class"===d.name){const e=d.value.includes("hydrated"),i=d.value.replace("hydrated","").trim(),l=t.getAttribute("class");t.setAttribute(d.name,`${l||""}${i?` ${i}`:""}`),e?s.setAttribute("class","hydrated"):s.removeAttribute(d.name)}}}}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-table-footer")}render(){var t,s,l;return e("tfoot",{key:"7d5d85ba53e2c47cef6137e0ff2c1e716c513acf",class:d("db-table-footer",this.className),ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(s=this.propOverrides)||void 0===s?void 0:s.id},this.rows?null===(l=this.rows)||void 0===l?void 0:l.map(((t,s)=>{var d,l,a;return e("db-table-row",{class:null!==(d=t.className)&&void 0!==d?d:t.class,key:`${null!==(a=null!==(l=t.id)&&void 0!==l?l:this.id)&&void 0!==a?a:i()}-table-footer-row-${s}`,cells:t.cells,interactive:t.interactive,id:t.id})})):e("slot",null))}get rootElement(){return s(this)}},o=class{constructor(e){t(this,e),this.observer=void 0}getCells(t){return null==t?void 0:t.map((t=>Object.assign(Object.assign({},t),{headerCell:!0})))}setupObserver(t){if(!t)return;const e=t.closest("db-table-head");e&&!this.observer&&(this.observer=new MutationObserver((e=>{e.some((t=>{var e;const s=t.target.attributes.getNamedItem(null!==(e=t.attributeName)&&void 0!==e?e:"");return(null==s?void 0:s.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-table-head")})),this.observer.observe(e,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,e){const s=null==t?void 0:t.closest(e);if(t&&s){const e=s.attributes;for(let i=0;i<e.length;i++){const d=e.item(i);if(d&&"data-density"!==d.name&&(d.name.startsWith("data-")||d.name.startsWith("aria-")))d.value?t.setAttribute(d.name,d.value):t.removeAttribute(d.name),s.removeAttribute(d.name);else if(d&&["style"].includes(d.name))t.setAttribute(d.name,d.value),s.removeAttribute(d.name);else if(d&&"class"===d.name){const e=d.value.includes("hydrated"),i=d.value.replace("hydrated","").trim(),l=t.getAttribute("class");t.setAttribute(d.name,`${l||""}${i?` ${i}`:""}`),e?s.setAttribute("class","hydrated"):s.removeAttribute(d.name)}}}}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-table-head"),this.setupObserver(this._ref)}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect()}render(){var t,s,l;return e("thead",{key:"1dd4a210694620a6c99a4f6f3192e099b607dfc3",class:d("db-table-head",this.className),ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(s=this.propOverrides)||void 0===s?void 0:s.id},this.rows?null===(l=this.rows)||void 0===l?void 0:l.map(((t,s)=>{var d,l,a;return e("db-table-row",{class:null!==(d=t.className)&&void 0!==d?d:t.class,key:`${null!==(a=null!==(l=t.id)&&void 0!==l?l:this.id)&&void 0!==a?a:i()}-table-head-row-${s}`,cells:this.getCells(t.cells),subHeaderEmphasis:t.subHeaderEmphasis,interactive:t.interactive,id:t.id})})):e("slot",null))}get rootElement(){return s(this)}};export{l as db_table_body,a as db_table_footer,o as db_table_head}
@@ -1 +1 @@
1
- import{r as t,c as i,h as s,g as h}from"./p-BlbKvvUv.js";import{l as a,f as e,g as d,h as l,k as n,b as o,r,a as c}from"./p-BdL-nI5y.js";import{h as u,d as v,s as f,u as b,f as m,e as p,l as w,c as y}from"./p-fumiz06Y.js";import{c as g}from"./p-BihrW11j.js";const x=class{constructor(s){t(this,s),this.input=i(this,"input"),this.change=i(this,"change"),this.blur=i(this,"blur"),this.focus=i(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._value="",this._voiceOverFallback="",this.abortController=void 0,this.observer=void 0}hasValidState(){var t;return!!(null!==(t=this.validMessage)&&void 0!==t?t:"valid"===this.validation)}handleValidation(){var t,i,s,h;(null===(t=this._ref)||void 0===t?void 0:t.validity.valid)&&"invalid"!==this.validation?this.hasValidState()&&(null===(s=this._ref)||void 0===s?void 0:s.validity.valid)&&(this.required||this.minLength||this.maxLength)?(this._descByIds=this._validMessageId,u()&&(this._voiceOverFallback=null!==(h=this.validMessage)&&void 0!==h?h:n,v((()=>this._voiceOverFallback=""),1e3))):this._descByIds=f(this.message,this.showMessage)?this._messageId:void 0:(this._descByIds=this._invalidMessageId,this._invalidMessage=this.invalidMessage||(null===(i=this._ref)||void 0===i?void 0:i.validationMessage)||a,u()&&(this._voiceOverFallback=this._invalidMessage,v((()=>this._voiceOverFallback=""),1e3)))}handleInput(t,i){this.input&&this.input.emit(t),this.handleValidation()}handleChange(t,i){this.change&&this.change.emit(t),this.handleValidation()}handleBlur(t){this.blur&&this.blur.emit(t)}handleFocus(t){this.focus&&this.focus.emit(t)}resetIds(){var t,i,s;const h=null!==(s=null!==(t=this.id)&&void 0!==t?t:null===(i=this.propOverrides)||void 0===i?void 0:i.id)&&void 0!==s?s:`textarea-${b()}`;this._id=h,this._messageId=h+e,this._validMessageId=h+d,this._invalidMessageId=h+l}setupObserver(t){if(!t)return;const i=t.closest("db-textarea");i&&!this.observer&&(this.observer=new MutationObserver((i=>{i.some((t=>{var i;const s=t.target.attributes.getNamedItem(null!==(i=t.attributeName)&&void 0!==i?i:"");return(null==s?void 0:s.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-textarea")})),this.observer.observe(i,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,i){const s=null==t?void 0:t.closest(i);if(t&&s){const i=s.attributes;for(let h=0;h<i.length;h++){const a=i.item(h);if(a&&"data-density"!==a.name&&(a.name.startsWith("data-")||a.name.startsWith("aria-")))a.value?t.setAttribute(a.name,a.value):t.removeAttribute(a.name),s.removeAttribute(a.name);else if(a&&["style"].includes(a.name))t.setAttribute(a.name,a.value),s.removeAttribute(a.name);else if(a&&"class"===a.name){const i=a.value.includes("hydrated"),h=a.value.replace("hydrated","").trim(),e=t.getAttribute("class");t.setAttribute(a.name,`${e||""}${h?` ${h}`:""}`),i?s.setAttribute("class","hydrated"):s.removeAttribute(a.name)}}}}watch0Fn(){var t,i;(null!==(t=this.id)&&void 0!==t?t:null===(i=this.propOverrides)||void 0===i?void 0:i.id)&&this.resetIds()}watch0(){this.watch0Fn()}watch1Fn(){var t;this._invalidMessage=this.invalidMessage||(null===(t=this._ref)||void 0===t?void 0:t.validationMessage)||a}watch1(){this.watch1Fn()}watch2Fn(){if(this._id){const t=this._id+e;this._messageId=t,this._validMessageId=this._id+d,this._invalidMessageId=this._id+l,f(this.message,this.showMessage)&&(this._descByIds=t),this.handleValidation()}}watch2(){this.watch2Fn()}watch3Fn(){this._value=this.value}watch3(){this.watch3Fn()}watch4Fn(){if(this._ref){const t=void 0;let i=this.abortController;i||(i=new AbortController,this.abortController=i),g(this._ref,{value:this.value,defaultValue:t},(t=>{this.handleChange(t,!0),this.handleInput(t,!0)}),i.signal)}}watch4(){this.watch4Fn()}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-textarea"),(()=>{this.resetIds(),this._invalidMessage=this.invalidMessage||a})(),(()=>{this.setupObserver(this._ref)})(),this.watch0Fn(),this.watch1Fn(),this.watch2Fn(),this.watch3Fn(),this.watch4Fn()}disconnectedCallback(){var t,i;null===(t=this.abortController)||void 0===t||t.abort(),null===(i=this.observer)||void 0===i||i.disconnect()}render(){var t,i,h,a,e,d;return s("div",{key:"cf9afaea12a18dbe916bf11e4cfeed5721833f96",class:y("db-textarea",this.className),"data-variant":this.variant,"data-hide-asterisk":w(this.showRequiredAsterisk),"data-hide-label":w(this.showLabel)},s("label",{key:"fd7444fe2963eabdb755d2bc9d0b664103813493",htmlFor:this._id},null!==(t=this.label)&&void 0!==t?t:c),s("textarea",{key:"282e969c036a0cd079a77cd6373103084dd5e75b","aria-invalid":"invalid"===this.validation,"data-custom-validity":this.validation,"data-field-sizing":this.fieldSizing,ref:t=>{this._ref=t},id:this._id,"data-resize":this.resize,"data-hide-resizer":w(null===(i=this.showResizer)||void 0===i||i),disabled:p(this.disabled,"disabled"),required:p(this.required,"required"),readOnly:p(this.readOnly,"readOnly")||p(this.readonly,"readonly")||void 0,form:this.form,maxLength:m(this.maxLength,this.maxlength),minLength:m(this.minLength,this.minlength),name:this.name,wrap:this.wrap,spellcheck:this.spellCheck,autocomplete:this.autocomplete,onInput:t=>this.handleInput(t),onChange:t=>this.handleChange(t),onBlur:t=>this.handleBlur(t),onFocus:t=>this.handleFocus(t),value:null!==(a=null!==(h=this.value)&&void 0!==h?h:this._value)&&void 0!==a?a:"","aria-describedby":null!==(e=this.ariaDescribedBy)&&void 0!==e?e:this._descByIds,placeholder:null!==(d=this.placeholder)&&void 0!==d?d:o,rows:m(this.rows,r),cols:m(this.cols)}),f(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||n):null,s("db-infotext",{key:"07e6585b6a89335004382796a9c06da736260028",size:"small",semantic:"critical",id:this._invalidMessageId},this._invalidMessage),s("span",{key:"6a8394ae7d62809422e54a810e75cf0628327223","data-visually-hidden":"true",role:"status"},this._voiceOverFallback))}get rootElement(){return h(this)}static get watchers(){return{id:[{watch0:0}],"propOverrides?.id":[{watch0:0}],_ref:[{watch1:0},{watch4:0}],invalidMessage:[{watch1:0}],_id:[{watch2:0}],value:[{watch3:0}]}}};export{x as db_textarea}
1
+ import{r as t,c as i,h as s,g as h}from"./p-BlbKvvUv.js";import{l as a,f as e,g as d,h as l,k as n,b as o,r,a as c}from"./p-BdL-nI5y.js";import{h as v,d as u,s as f,u as b,f as m,e as p,l as w,c as y}from"./p-BiyJ0WOE.js";import{c as g}from"./p-BXROp_k8.js";const x=class{constructor(s){t(this,s),this.input=i(this,"input"),this.change=i(this,"change"),this.blur=i(this,"blur"),this.focus=i(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._value="",this._voiceOverFallback="",this.abortController=void 0,this.observer=void 0}hasValidState(){var t;return!!(null!==(t=this.validMessage)&&void 0!==t?t:"valid"===this.validation)}handleValidation(){var t,i,s,h;(null===(t=this._ref)||void 0===t?void 0:t.validity.valid)&&"invalid"!==this.validation?this.hasValidState()&&(null===(s=this._ref)||void 0===s?void 0:s.validity.valid)&&(this.required||this.minLength||this.maxLength)?(this._descByIds=this._validMessageId,v()&&(this._voiceOverFallback=null!==(h=this.validMessage)&&void 0!==h?h:n,u((()=>this._voiceOverFallback=""),1e3))):this._descByIds=f(this.message,this.showMessage)?this._messageId:void 0:(this._descByIds=this._invalidMessageId,this._invalidMessage=this.invalidMessage||(null===(i=this._ref)||void 0===i?void 0:i.validationMessage)||a,v()&&(this._voiceOverFallback=this._invalidMessage,u((()=>this._voiceOverFallback=""),1e3)))}handleInput(t,i){this.input&&this.input.emit(t),this.handleValidation()}handleChange(t,i){this.change&&this.change.emit(t),this.handleValidation()}handleBlur(t){this.blur&&this.blur.emit(t)}handleFocus(t){this.focus&&this.focus.emit(t)}resetIds(){var t,i,s;const h=null!==(s=null!==(t=this.id)&&void 0!==t?t:null===(i=this.propOverrides)||void 0===i?void 0:i.id)&&void 0!==s?s:`textarea-${b()}`;this._id=h,this._messageId=h+e,this._validMessageId=h+d,this._invalidMessageId=h+l}setupObserver(t){if(!t)return;const i=t.closest("db-textarea");i&&!this.observer&&(this.observer=new MutationObserver((i=>{i.some((t=>{var i;const s=t.target.attributes.getNamedItem(null!==(i=t.attributeName)&&void 0!==i?i:"");return(null==s?void 0:s.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-textarea")})),this.observer.observe(i,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,i){const s=null==t?void 0:t.closest(i);if(t&&s){const i=s.attributes;for(let h=0;h<i.length;h++){const a=i.item(h);if(a&&"data-density"!==a.name&&(a.name.startsWith("data-")||a.name.startsWith("aria-")))a.value?t.setAttribute(a.name,a.value):t.removeAttribute(a.name),s.removeAttribute(a.name);else if(a&&["style"].includes(a.name))t.setAttribute(a.name,a.value),s.removeAttribute(a.name);else if(a&&"class"===a.name){const i=a.value.includes("hydrated"),h=a.value.replace("hydrated","").trim(),e=t.getAttribute("class");t.setAttribute(a.name,`${e||""}${h?` ${h}`:""}`),i?s.setAttribute("class","hydrated"):s.removeAttribute(a.name)}}}}watch0Fn(){var t,i;(null!==(t=this.id)&&void 0!==t?t:null===(i=this.propOverrides)||void 0===i?void 0:i.id)&&this.resetIds()}watch0(){this.watch0Fn()}watch1Fn(){var t;this._invalidMessage=this.invalidMessage||(null===(t=this._ref)||void 0===t?void 0:t.validationMessage)||a}watch1(){this.watch1Fn()}watch2Fn(){if(this._id){const t=this._id+e;this._messageId=t,this._validMessageId=this._id+d,this._invalidMessageId=this._id+l,f(this.message,this.showMessage)&&(this._descByIds=t),this.handleValidation()}}watch2(){this.watch2Fn()}watch3Fn(){this._value=this.value}watch3(){this.watch3Fn()}watch4Fn(){if(this._ref){const t=void 0;let i=this.abortController;i||(i=new AbortController,this.abortController=i),g(this._ref,{value:this.value,defaultValue:t},(t=>{this.handleChange(t,!0),this.handleInput(t,!0)}),i.signal)}}watch4(){this.watch4Fn()}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-textarea"),(()=>{this.resetIds(),this._invalidMessage=this.invalidMessage||a})(),(()=>{this.setupObserver(this._ref)})(),this.watch0Fn(),this.watch1Fn(),this.watch2Fn(),this.watch3Fn(),this.watch4Fn()}disconnectedCallback(){var t,i;null===(t=this.abortController)||void 0===t||t.abort(),null===(i=this.observer)||void 0===i||i.disconnect()}render(){var t,i,h,a,e,d;return s("div",{key:"cf9afaea12a18dbe916bf11e4cfeed5721833f96",class:y("db-textarea",this.className),"data-variant":this.variant,"data-hide-asterisk":w(this.showRequiredAsterisk),"data-hide-label":w(this.showLabel)},s("label",{key:"fd7444fe2963eabdb755d2bc9d0b664103813493",htmlFor:this._id},null!==(t=this.label)&&void 0!==t?t:c),s("textarea",{key:"282e969c036a0cd079a77cd6373103084dd5e75b","aria-invalid":"invalid"===this.validation,"data-custom-validity":this.validation,"data-field-sizing":this.fieldSizing,ref:t=>{this._ref=t},id:this._id,"data-resize":this.resize,"data-hide-resizer":w(null===(i=this.showResizer)||void 0===i||i),disabled:p(this.disabled,"disabled"),required:p(this.required,"required"),readOnly:p(this.readOnly,"readOnly")||p(this.readonly,"readonly")||void 0,form:this.form,maxLength:m(this.maxLength,this.maxlength),minLength:m(this.minLength,this.minlength),name:this.name,wrap:this.wrap,spellcheck:this.spellCheck,autocomplete:this.autocomplete,onInput:t=>this.handleInput(t),onChange:t=>this.handleChange(t),onBlur:t=>this.handleBlur(t),onFocus:t=>this.handleFocus(t),value:null!==(a=null!==(h=this.value)&&void 0!==h?h:this._value)&&void 0!==a?a:"","aria-describedby":null!==(e=this.ariaDescribedBy)&&void 0!==e?e:this._descByIds,placeholder:null!==(d=this.placeholder)&&void 0!==d?d:o,rows:m(this.rows,r),cols:m(this.cols)}),f(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||n):null,s("db-infotext",{key:"07e6585b6a89335004382796a9c06da736260028",size:"small",semantic:"critical",id:this._invalidMessageId},this._invalidMessage),s("span",{key:"6a8394ae7d62809422e54a810e75cf0628327223","data-visually-hidden":"true",role:"status"},this._voiceOverFallback))}get rootElement(){return h(this)}static get watchers(){return{id:[{watch0:0}],"propOverrides?.id":[{watch0:0}],_ref:[{watch1:0},{watch4:0}],invalidMessage:[{watch1:0}],_id:[{watch2:0}],value:[{watch3:0}]}}};export{x as db_textarea}
@@ -1 +1 @@
1
- import{r as t,h as i,F as s,g as a}from"./p-BlbKvvUv.js";import{d as e,g as o,c as h}from"./p-fumiz06Y.js";const d=class{constructor(i){t(this,i),this._data=void 0,this._style=void 0,this.observer=void 0}convertData(){try{return"string"==typeof this.data?JSON.parse(this.data):this.data}catch(t){console.error(t)}return{}}setupObserver(t){if(!t)return;const i=t.closest("db-table");i&&!this.observer&&(this.observer=new MutationObserver((i=>{i.some((t=>{var i;const s=t.target.attributes.getNamedItem(null!==(i=t.attributeName)&&void 0!==i?i:"");return(null==s?void 0:s.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-table")})),this.observer.observe(i,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,i){const s=null==t?void 0:t.closest(i);if(t&&s){const i=s.attributes;for(let a=0;a<i.length;a++){const e=i.item(a);if(e&&"data-density"!==e.name&&(e.name.startsWith("data-")||e.name.startsWith("aria-")))e.value?t.setAttribute(e.name,e.value):t.removeAttribute(e.name),s.removeAttribute(e.name);else if(e&&["style"].includes(e.name))t.setAttribute(e.name,e.value),s.removeAttribute(e.name);else if(e&&"class"===e.name){const i=e.value.includes("hydrated"),a=e.value.replace("hydrated","").trim(),o=t.getAttribute("class");t.setAttribute(e.name,`${o||""}${a?` ${a}`:""}`),i?s.setAttribute("class","hydrated"):s.removeAttribute(e.name)}}}}watch0Fn(){this._data=this.data?this.convertData():void 0}watch0(){this.watch0Fn()}watch1Fn(){this._ref&&"list"===this.mobileVariant&&e((()=>{const t=this._ref;if(!t)return;const i=t.querySelectorAll("thead tr th");i.length&&t.querySelectorAll(":is(tbody,tfoot) tr").forEach((t=>{t.querySelectorAll(":is(td,th)").forEach(((t,s)=>{const a=i[s];if(a){const i=Array.from(a.childNodes).filter((t=>t.nodeType===Node.TEXT_NODE)).map((t=>{var i;return null===(i=t.textContent)||void 0===i?void 0:i.trim()})).filter(Boolean).join(" ");i&&(t.dataset.header=i)}}))}))}),1)}watch1(){this.watch1Fn()}watch2Fn(){if(this.columnSizes){const t={};Object.entries(this.columnSizes).forEach((([i,s])=>{t[`--db-table-column-size-${i}`]=s})),this._style=t}else this._style=void 0}watch2(){this.watch2Fn()}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-table"),this.setupObserver(this._ref),this.watch0Fn(),this.watch1Fn(),this.watch2Fn()}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect()}render(){var t,a,e,d,n,l;return i("div",{key:"8baec1021c6c8aa2bafc4e735b81e7d149e4ca6e",class:h("db-table",this.className),style:this._style,"data-width":this.width,"data-size":this.size,"data-divider":this.divider,"data-variant":this.variant,"data-mobile-variant":this.mobileVariant,"data-show-caption":o(this.showCaption),"data-sticky-header":this.stickyHeader},i("table",{key:"423304ec355a57e6df37c48baca039a9aabdf7b5",ref:t=>{this._ref=t},id:this.id},this.captionPlain?i("caption",null,this.captionPlain):i("slot",{name:"caption"}),this._data?i(s,null,(null===(t=this._data)||void 0===t?void 0:t.header)?i("db-table-head",{rows:null===(a=this._data)||void 0===a?void 0:a.header}):null,(null===(e=this._data)||void 0===e?void 0:e.body)?i("db-table-body",{rows:null===(d=this._data)||void 0===d?void 0:d.body}):null,(null===(n=this._data)||void 0===n?void 0:n.footer)?i("db-table-footer",{rows:null===(l=this._data)||void 0===l?void 0:l.footer}):null):i("slot",null)))}get rootElement(){return a(this)}static get watchers(){return{data:[{watch0:0}],mobileVariant:[{watch1:0}],_ref:[{watch1:0}],_data:[{watch1:0}],columnSizes:[{watch2:0}]}}};export{d as db_table}
1
+ import{r as t,h as i,F as s,g as a}from"./p-BlbKvvUv.js";import{d as e,g as o,c as d}from"./p-BiyJ0WOE.js";const h=class{constructor(i){t(this,i),this._data=void 0,this._style=void 0,this.observer=void 0}convertData(){try{return"string"==typeof this.data?JSON.parse(this.data):this.data}catch(t){console.error(t)}return{}}setupObserver(t){if(!t)return;const i=t.closest("db-table");i&&!this.observer&&(this.observer=new MutationObserver((i=>{i.some((t=>{var i;const s=t.target.attributes.getNamedItem(null!==(i=t.attributeName)&&void 0!==i?i:"");return(null==s?void 0:s.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-table")})),this.observer.observe(i,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,i){const s=null==t?void 0:t.closest(i);if(t&&s){const i=s.attributes;for(let a=0;a<i.length;a++){const e=i.item(a);if(e&&"data-density"!==e.name&&(e.name.startsWith("data-")||e.name.startsWith("aria-")))e.value?t.setAttribute(e.name,e.value):t.removeAttribute(e.name),s.removeAttribute(e.name);else if(e&&["style"].includes(e.name))t.setAttribute(e.name,e.value),s.removeAttribute(e.name);else if(e&&"class"===e.name){const i=e.value.includes("hydrated"),a=e.value.replace("hydrated","").trim(),o=t.getAttribute("class");t.setAttribute(e.name,`${o||""}${a?` ${a}`:""}`),i?s.setAttribute("class","hydrated"):s.removeAttribute(e.name)}}}}watch0Fn(){this._data=this.data?this.convertData():void 0}watch0(){this.watch0Fn()}watch1Fn(){this._ref&&"list"===this.mobileVariant&&e((()=>{const t=this._ref;if(!t)return;const i=t.querySelectorAll("thead tr th");i.length&&t.querySelectorAll(":is(tbody,tfoot) tr").forEach((t=>{t.querySelectorAll(":is(td,th)").forEach(((t,s)=>{const a=i[s];if(a){const i=Array.from(a.childNodes).filter((t=>t.nodeType===Node.TEXT_NODE)).map((t=>{var i;return null===(i=t.textContent)||void 0===i?void 0:i.trim()})).filter(Boolean).join(" ");i&&(t.dataset.header=i)}}))}))}),1)}watch1(){this.watch1Fn()}watch2Fn(){if(this.columnSizes){const t={};Object.entries(this.columnSizes).forEach((([i,s])=>{t[`--db-table-column-size-${i}`]=s})),this._style=t}else this._style=void 0}watch2(){this.watch2Fn()}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-table"),this.setupObserver(this._ref),this.watch0Fn(),this.watch1Fn(),this.watch2Fn()}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect()}render(){var t,a,e,h,l,n,r,c;return i("div",{key:"09812eb3029fe69f8d3facfcaf03f0077749614b",class:d("db-table",this.className),style:this._style,"data-width":this.width,"data-size":this.size,"data-divider":this.divider,"data-variant":this.variant,"data-mobile-variant":this.mobileVariant,"data-show-caption":o(this.showCaption),"data-sticky-header":this.stickyHeader},i("table",{key:"16a82398948bd4d2e42b0ed8c0acdaecaebbcfc2",ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(a=this.propOverrides)||void 0===a?void 0:a.id},this.captionPlain?i("caption",null,this.captionPlain):i("slot",{name:"caption"}),this._data?i(s,null,(null===(e=this._data)||void 0===e?void 0:e.header)?i("db-table-head",{rows:null===(h=this._data)||void 0===h?void 0:h.header}):null,(null===(l=this._data)||void 0===l?void 0:l.body)?i("db-table-body",{rows:null===(n=this._data)||void 0===n?void 0:n.body}):null,(null===(r=this._data)||void 0===r?void 0:r.footer)?i("db-table-footer",{rows:null===(c=this._data)||void 0===c?void 0:c.footer}):null):i("slot",null)))}get rootElement(){return a(this)}static get watchers(){return{data:[{watch0:0}],mobileVariant:[{watch1:0}],_ref:[{watch1:0}],_data:[{watch1:0}],columnSizes:[{watch2:0}]}}};export{h as db_table}
@@ -1 +1 @@
1
- import{r as t,h as i,g as s}from"./p-BlbKvvUv.js";import{c as d}from"./p-fumiz06Y.js";const e=class{constructor(i){t(this,i),this.observer=void 0}setupObserver(t){if(!t)return;const i=t.closest("db-divider");i&&!this.observer&&(this.observer=new MutationObserver((i=>{i.some((t=>{var i;const s=t.target.attributes.getNamedItem(null!==(i=t.attributeName)&&void 0!==i?i:"");return(null==s?void 0:s.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-divider")})),this.observer.observe(i,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,i){const s=null==t?void 0:t.closest(i);if(t&&s){const i=s.attributes;for(let d=0;d<i.length;d++){const e=i.item(d);if(e&&"data-density"!==e.name&&(e.name.startsWith("data-")||e.name.startsWith("aria-")))e.value?t.setAttribute(e.name,e.value):t.removeAttribute(e.name),s.removeAttribute(e.name);else if(e&&["style"].includes(e.name))t.setAttribute(e.name,e.value),s.removeAttribute(e.name);else if(e&&"class"===e.name){const i=e.value.includes("hydrated"),d=e.value.replace("hydrated","").trim(),a=t.getAttribute("class");t.setAttribute(e.name,`${a||""}${d?` ${d}`:""}`),i?s.setAttribute("class","hydrated"):s.removeAttribute(e.name)}}}}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-divider"),this.setupObserver(this._ref)}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect()}render(){var t,s;return i("div",{key:"4f8780fd8ac04d3d4db08bbfeae57f0a86cf36ad",class:d("db-divider",this.className),ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(s=this.propOverrides)||void 0===s?void 0:s.id,"data-margin":this.margin,"data-variant":this.variant,"data-emphasis":this.emphasis,"data-width":this.width})}get rootElement(){return s(this)}};export{e as db_divider}
1
+ import{r as t,h as i,g as s}from"./p-BlbKvvUv.js";import{c as d}from"./p-BiyJ0WOE.js";const e=class{constructor(i){t(this,i),this.observer=void 0}setupObserver(t){if(!t)return;const i=t.closest("db-divider");i&&!this.observer&&(this.observer=new MutationObserver((i=>{i.some((t=>{var i;const s=t.target.attributes.getNamedItem(null!==(i=t.attributeName)&&void 0!==i?i:"");return(null==s?void 0:s.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-divider")})),this.observer.observe(i,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,i){const s=null==t?void 0:t.closest(i);if(t&&s){const i=s.attributes;for(let d=0;d<i.length;d++){const e=i.item(d);if(e&&"data-density"!==e.name&&(e.name.startsWith("data-")||e.name.startsWith("aria-")))e.value?t.setAttribute(e.name,e.value):t.removeAttribute(e.name),s.removeAttribute(e.name);else if(e&&["style"].includes(e.name))t.setAttribute(e.name,e.value),s.removeAttribute(e.name);else if(e&&"class"===e.name){const i=e.value.includes("hydrated"),d=e.value.replace("hydrated","").trim(),a=t.getAttribute("class");t.setAttribute(e.name,`${a||""}${d?` ${d}`:""}`),i?s.setAttribute("class","hydrated"):s.removeAttribute(e.name)}}}}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-divider"),this.setupObserver(this._ref)}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect()}render(){var t,s;return i("div",{key:"4f8780fd8ac04d3d4db08bbfeae57f0a86cf36ad",class:d("db-divider",this.className),ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(s=this.propOverrides)||void 0===s?void 0:s.id,"data-margin":this.margin,"data-variant":this.variant,"data-emphasis":this.emphasis,"data-width":this.width})}get rootElement(){return s(this)}};export{e as db_divider}
@@ -1 +1 @@
1
- import{r as t,h as s,g as i}from"./p-BlbKvvUv.js";import{g as a,c as e}from"./p-fumiz06Y.js";const d=class{constructor(s){t(this,s),this.observer=void 0}setupObserver(t){if(!t)return;const s=t.closest("db-stack");s&&!this.observer&&(this.observer=new MutationObserver((s=>{s.some((t=>{var s;const i=t.target.attributes.getNamedItem(null!==(s=t.attributeName)&&void 0!==s?s:"");return(null==i?void 0:i.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-stack")})),this.observer.observe(s,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,s){const i=null==t?void 0:t.closest(s);if(t&&i){const s=i.attributes;for(let a=0;a<s.length;a++){const e=s.item(a);if(e&&"data-density"!==e.name&&(e.name.startsWith("data-")||e.name.startsWith("aria-")))e.value?t.setAttribute(e.name,e.value):t.removeAttribute(e.name),i.removeAttribute(e.name);else if(e&&["style"].includes(e.name))t.setAttribute(e.name,e.value),i.removeAttribute(e.name);else if(e&&"class"===e.name){const s=e.value.includes("hydrated"),a=e.value.replace("hydrated","").trim(),d=t.getAttribute("class");t.setAttribute(e.name,`${d||""}${a?` ${a}`:""}`),s?i.setAttribute("class","hydrated"):i.removeAttribute(e.name)}}}}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-stack"),this.setupObserver(this._ref)}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect()}render(){var t,i;return s("div",{key:"643002e053cb9d039f2e212c526586503c322ccc",class:e("db-stack",this.className),ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(i=this.propOverrides)||void 0===i?void 0:i.id,"data-gap":this.gap,"data-variant":this.variant,"data-direction":this.direction,"data-alignment":this.alignment,"data-justify-content":this.justifyContent,"data-wrap":a(this.wrap,"wrap")},s("slot",{key:"d38d30e92d276b6c31328ede2a68db8eb62fe05e"}))}get rootElement(){return i(this)}};export{d as db_stack}
1
+ import{r as t,h as s,g as i}from"./p-BlbKvvUv.js";import{g as a,c as e}from"./p-BiyJ0WOE.js";const d=class{constructor(s){t(this,s),this.observer=void 0}setupObserver(t){if(!t)return;const s=t.closest("db-stack");s&&!this.observer&&(this.observer=new MutationObserver((s=>{s.some((t=>{var s;const i=t.target.attributes.getNamedItem(null!==(s=t.attributeName)&&void 0!==s?s:"");return(null==i?void 0:i.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-stack")})),this.observer.observe(s,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,s){const i=null==t?void 0:t.closest(s);if(t&&i){const s=i.attributes;for(let a=0;a<s.length;a++){const e=s.item(a);if(e&&"data-density"!==e.name&&(e.name.startsWith("data-")||e.name.startsWith("aria-")))e.value?t.setAttribute(e.name,e.value):t.removeAttribute(e.name),i.removeAttribute(e.name);else if(e&&["style"].includes(e.name))t.setAttribute(e.name,e.value),i.removeAttribute(e.name);else if(e&&"class"===e.name){const s=e.value.includes("hydrated"),a=e.value.replace("hydrated","").trim(),d=t.getAttribute("class");t.setAttribute(e.name,`${d||""}${a?` ${a}`:""}`),s?i.setAttribute("class","hydrated"):i.removeAttribute(e.name)}}}}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-stack"),this.setupObserver(this._ref)}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect()}render(){var t,i;return s("div",{key:"643002e053cb9d039f2e212c526586503c322ccc",class:e("db-stack",this.className),ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(i=this.propOverrides)||void 0===i?void 0:i.id,"data-gap":this.gap,"data-variant":this.variant,"data-direction":this.direction,"data-alignment":this.alignment,"data-justify-content":this.justifyContent,"data-wrap":a(this.wrap,"wrap")},s("slot",{key:"d38d30e92d276b6c31328ede2a68db8eb62fe05e"}))}get rootElement(){return i(this)}};export{d as db_stack}
@@ -0,0 +1 @@
1
+ import{r as i,h as t,g as d}from"./p-BlbKvvUv.js";import{g as l,c as e,f as o,u as s}from"./p-BiyJ0WOE.js";const a=class{constructor(t){i(this,t),this.observer=void 0}setupObserver(i){if(!i)return;const t=i.closest("db-link");t&&!this.observer&&(this.observer=new MutationObserver((t=>{t.some((i=>{var t;const d=i.target.attributes.getNamedItem(null!==(t=i.attributeName)&&void 0!==t?t:"");return(null==d?void 0:d.value)!==i.oldValue}))&&this.enableAttributePassing(i,"db-link")})),this.observer.observe(t,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(i,t){const d=null==i?void 0:i.closest(t);if(i&&d){const t=d.attributes;for(let l=0;l<t.length;l++){const e=t.item(l);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),d.removeAttribute(e.name);else if(e&&["style"].includes(e.name))i.setAttribute(e.name,e.value),d.removeAttribute(e.name);else if(e&&"class"===e.name){const t=e.value.includes("hydrated"),l=e.value.replace("hydrated","").trim(),o=i.getAttribute("class");i.setAttribute(e.name,`${o||""}${l?` ${l}`:""}`),t?d.setAttribute("class","hydrated"):d.removeAttribute(e.name)}}}}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-link"),this.setupObserver(this._ref)}disconnectedCallback(){var i;null===(i=this.observer)||void 0===i||i.disconnect()}render(){var i,d,o,s;return t("a",{key:"7d627d40c68589558b3e33b1304f4c57b95203e3",class:e("db-link",this.className),ref:i=>{this._ref=i},id:null!==(i=this.id)&&void 0!==i?i:null===(d=this.propOverrides)||void 0===d?void 0:d.id,href:this.href,target:this.target,rel:this.rel,role:this.role,referrerPolicy:null!==(o=this.referrerpolicy)&&void 0!==o?o:this.referrerPolicy,hrefLang:this.hreflang,"aria-disabled":l(this.disabled,"disabled"),tabIndex:this.disabled?-1:0,"data-size":this.size,"data-show-icon-trailing":l(null===(s=this.showIcon)||void 0===s||s,"showIcon"),"data-variant":this.variant,"data-content":this.content||"internal","data-wrap":l(this.wrap,"wrap")},this.text?this.text:null,t("slot",{key:"fc12c0b064d4c5d03347bea0f6de4ad5fcf78223"}))}get rootElement(){return d(this)}},n=class{constructor(t){i(this,t)}enableAttributePassing(i,t){const d=null==i?void 0:i.closest(t);if(i&&d){const t=d.attributes;for(let l=0;l<t.length;l++){const e=t.item(l);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),d.removeAttribute(e.name);else if(e&&["style"].includes(e.name))i.setAttribute(e.name,e.value),d.removeAttribute(e.name);else if(e&&"class"===e.name){const t=e.value.includes("hydrated"),l=e.value.replace("hydrated","").trim(),o=i.getAttribute("class");i.setAttribute(e.name,`${o||""}${l?` ${l}`:""}`),t?d.setAttribute("class","hydrated"):d.removeAttribute(e.name)}}}}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-table-data-cell")}render(){var i,d;return t("td",{key:"bc848b50d8a6b5e7baa2ad8b77fc8a2980aa4973",class:e("db-table-data-cell",this.className),ref:i=>{this._ref=i},id:null!==(i=this.id)&&void 0!==i?i:null===(d=this.propOverrides)||void 0===d?void 0:d.id,"data-horizontal-alignment":this.horizontalAlignment,"data-vertical-alignment":this.verticalAlignment,colSpan:o(this.colSpan,this.colspan),rowSpan:o(this.rowSpan,this.rowspan),headers:this.headers},t("slot",{key:"3042815d7974ea5928f3882bd6bd1951dd4f0aa9"}))}get rootElement(){return d(this)}},r=class{constructor(t){i(this,t)}enableAttributePassing(i,t){const d=null==i?void 0:i.closest(t);if(i&&d){const t=d.attributes;for(let l=0;l<t.length;l++){const e=t.item(l);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),d.removeAttribute(e.name);else if(e&&["style"].includes(e.name))i.setAttribute(e.name,e.value),d.removeAttribute(e.name);else if(e&&"class"===e.name){const t=e.value.includes("hydrated"),l=e.value.replace("hydrated","").trim(),o=i.getAttribute("class");i.setAttribute(e.name,`${o||""}${l?` ${l}`:""}`),t?d.setAttribute("class","hydrated"):d.removeAttribute(e.name)}}}}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-table-header-cell")}render(){var i,d;return t("th",{key:"27fcbcfeed4ac89de6ab7f2b17d70a28a346108a",class:e("db-table-header-cell",this.className),ref:i=>{this._ref=i},id:null!==(i=this.id)&&void 0!==i?i:null===(d=this.propOverrides)||void 0===d?void 0:d.id,"data-horizontal-alignment":this.horizontalAlignment,"data-vertical-alignment":this.verticalAlignment,"data-no-text":l(this.noText),scope:this.scope,colSpan:o(this.colSpan,this.colspan),rowSpan:o(this.rowSpan,this.rowspan),headers:this.headers,abbr:this.abbr},t("slot",{key:"461ea9da0980e7699ffffd61884f83023d2e6c64"}))}get rootElement(){return d(this)}},h=class{constructor(t){i(this,t)}getHeaderCell(i){if(i.headerCell)return i}enableAttributePassing(i,t){const d=null==i?void 0:i.closest(t);if(i&&d){const t=d.attributes;for(let l=0;l<t.length;l++){const e=t.item(l);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),d.removeAttribute(e.name);else if(e&&["style"].includes(e.name))i.setAttribute(e.name,e.value),d.removeAttribute(e.name);else if(e&&"class"===e.name){const t=e.value.includes("hydrated"),l=e.value.replace("hydrated","").trim(),o=i.getAttribute("class");i.setAttribute(e.name,`${o||""}${l?` ${l}`:""}`),t?d.setAttribute("class","hydrated"):d.removeAttribute(e.name)}}}}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-table-row")}render(){var i,d,o;return t("tr",{key:"61420ea211f0de3ad1d587cb1854dbdeb84ea6de",class:e("db-table-row",this.className),ref:i=>{this._ref=i},id:null!==(i=this.id)&&void 0!==i?i:null===(d=this.propOverrides)||void 0===d?void 0:d.id,"data-interactive":l(this.interactive),"data-sub-header-emphasis":this.subHeaderEmphasis},this.cells?null===(o=this.cells)||void 0===o?void 0:o.map(((i,d)=>{var l,e,o,a,n,r,h,v,c,u,b,f,y,p,m,g,w,$,k,_,A,S,z,P,x,E,L,D,I,O,j,B,C,H,J,K,M,T,U,V,W,q,F,G,N,Q,R;return i.headerCell?t("db-table-header-cell",{class:null!==(l=i.className)&&void 0!==l?l:i.class,key:`${null!==(o=null!==(e=i.id)&&void 0!==e?e:this.id)&&void 0!==o?o:s()}-table-row-header-cell-${d}`,id:i.id,abbr:null===(a=this.getHeaderCell(i))||void 0===a?void 0:a.abbr,scope:null===(n=this.getHeaderCell(i))||void 0===n?void 0:n.scope,noText:null===(r=this.getHeaderCell(i))||void 0===r?void 0:r.noText,horizontalAlignment:i.horizontalAlignment,verticalAlignment:i.verticalAlignment,headers:i.headers,colSpan:i.colSpan,colspan:i.colspan,rowSpan:i.rowSpan,rowspan:i.rowspan},i.link?t("db-link",{class:null!==(v=null===(h=i.link)||void 0===h?void 0:h.className)&&void 0!==v?v:null===(c=i.link)||void 0===c?void 0:c.class,content:null===(u=i.link)||void 0===u?void 0:u.content,size:null===(b=i.link)||void 0===b?void 0:b.size,variant:null===(f=i.link)||void 0===f?void 0:f.variant,id:null===(y=i.link)||void 0===y?void 0:y.id,autofocus:null===(p=i.link)||void 0===p?void 0:p.autofocus,disabled:null===(m=i.link)||void 0===m?void 0:m.disabled,href:null===(g=i.link)||void 0===g?void 0:g.href,hreflang:null===(w=i.link)||void 0===w?void 0:w.hreflang,target:null===($=i.link)||void 0===$?void 0:$.target,rel:null===(k=i.link)||void 0===k?void 0:k.rel,referrerPolicy:null===(_=i.link)||void 0===_?void 0:_.referrerPolicy,role:null===(A=i.link)||void 0===A?void 0:A.role,showIcon:null===(S=i.link)||void 0===S?void 0:S.showIcon,text:null===(z=i.link)||void 0===z?void 0:z.text,wrap:null===(P=i.link)||void 0===P?void 0:P.wrap},null===(x=i.link)||void 0===x?void 0:x.children):i.content):t("db-table-data-cell",{class:null!==(E=i.className)&&void 0!==E?E:i.class,key:`${null!==(D=null!==(L=i.id)&&void 0!==L?L:this.id)&&void 0!==D?D:s()}-table-row-data-cell-${d}`,id:i.id,horizontalAlignment:i.horizontalAlignment,verticalAlignment:i.verticalAlignment,headers:i.headers,colSpan:i.colSpan,colspan:i.colspan,rowSpan:i.rowSpan,rowspan:i.rowspan},i.link?t("db-link",{class:null!==(O=null===(I=i.link)||void 0===I?void 0:I.className)&&void 0!==O?O:null===(j=i.link)||void 0===j?void 0:j.class,content:null===(B=i.link)||void 0===B?void 0:B.content,size:null===(C=i.link)||void 0===C?void 0:C.size,variant:null===(H=i.link)||void 0===H?void 0:H.variant,id:null===(J=i.link)||void 0===J?void 0:J.id,autofocus:null===(K=i.link)||void 0===K?void 0:K.autofocus,disabled:null===(M=i.link)||void 0===M?void 0:M.disabled,href:null===(T=i.link)||void 0===T?void 0:T.href,hreflang:null===(U=i.link)||void 0===U?void 0:U.hreflang,target:null===(V=i.link)||void 0===V?void 0:V.target,rel:null===(W=i.link)||void 0===W?void 0:W.rel,referrerPolicy:null===(q=i.link)||void 0===q?void 0:q.referrerPolicy,role:null===(F=i.link)||void 0===F?void 0:F.role,showIcon:null===(G=i.link)||void 0===G?void 0:G.showIcon,text:null===(N=i.link)||void 0===N?void 0:N.text,wrap:null===(Q=i.link)||void 0===Q?void 0:Q.wrap},null===(R=i.link)||void 0===R?void 0:R.children):i.content)})):t("slot",null))}get rootElement(){return d(this)}};export{a as db_link,n as db_table_data_cell,r as db_table_header_cell,h as db_table_row}
@@ -1 +1 @@
1
- import{r as t,h as i,g as s}from"./p-BlbKvvUv.js";import{D as e}from"./p-BdL-nI5y.js";import{d as a,u as h,g as o,c as d}from"./p-fumiz06Y.js";import{D as n}from"./p-BtImZ8Nt.js";import{b as l}from"./p-C0q9XJSc.js";const r=class{constructor(i){t(this,i),this._id=e,this.initialized=!1,this._documentScrollListenerCallbackId=void 0,this._observer=void 0,this._attachedParent=void 0,this._attachedId=void 0,this._activeTriggerCount=0,this._boundListeners=[],this.observer=void 0}handleClick(t){t.stopPropagation()}handleEscape(t){t&&"Escape"!==t.key||!this._ref||"visible"!==getComputedStyle(this._ref).visibility||this.getParent().blur()}getParent(){let t=this._ref.parentElement;return t&&t.localName.includes("tooltip")&&(t=t.parentElement),t}handleAutoPlacement(t){t&&this._ref&&a((()=>{var i;this._ref&&l(this._ref,t,null!==(i=this.placement)&&void 0!==i?i:"bottom")}),1)}handleDocumentScroll(t,i){var s,e;(null===(s=null==t?void 0:t.target)||void 0===s?void 0:s.contains)&&(null===(e=null==t?void 0:t.target)||void 0===e?void 0:e.contains(this._ref))&&this.handleAutoPlacement(i)}handleLeave(){var t,i,s;this._activeTriggerCount=Math.max((null!==(t=this._activeTriggerCount)&&void 0!==t?t:0)-1,0),(null!==(i=this._activeTriggerCount)&&void 0!==i?i:0)>0||(this._documentScrollListenerCallbackId&&((new n).removeCallback(this._documentScrollListenerCallbackId),this._documentScrollListenerCallbackId=void 0),null===(s=this._observer)||void 0===s||s.unobserve(this.getParent()))}handleEnter(t){var i,s;this._activeTriggerCount=(null!==(i=this._activeTriggerCount)&&void 0!==i?i:0)+1,1===this._activeTriggerCount&&(this._documentScrollListenerCallbackId=(new n).addCallback((i=>this.handleDocumentScroll(i,t))),null===(s=this._observer)||void 0===s||s.observe(this.getParent())),this.handleAutoPlacement(t)}resetIds(){var t,i,s;this._id=null!==(s=null!==(t=this.id)&&void 0!==t?t:null===(i=this.propOverrides)||void 0===i?void 0:i.id)&&void 0!==s?s:"tooltip-"+h()}_detachListeners(){var t,i,s;const e=this._documentScrollListenerCallbackId;e&&((new n).removeCallback(e),this._documentScrollListenerCallbackId=void 0),null===(t=this._observer)||void 0===t||t.disconnect(),this._observer=void 0,this._activeTriggerCount=0,(null!==(i=this._boundListeners)&&void 0!==i?i:[]).forEach((t=>{t.parent.removeEventListener(t.type,t.fn)})),this._boundListeners=[];const a=this._attachedParent;if(a){const t=null!==(s=this._attachedId)&&void 0!==s?s:this._id,i=a.querySelectorAll(".db-tooltip"),e=Array.from(i).some((t=>t!==this._ref));"true"!==a.dataset.hasTooltip||e||delete a.dataset.hasTooltip,a.getAttribute("aria-labelledby")===t&&a.removeAttribute("aria-labelledby"),a.getAttribute("aria-describedby")===t&&a.removeAttribute("aria-describedby"),this._attachedParent=void 0,this._attachedId=void 0}}setupObserver(t){if(!t)return;const i=t.closest("db-tooltip");i&&!this.observer&&(this.observer=new MutationObserver((i=>{i.some((t=>{var i;const s=t.target.attributes.getNamedItem(null!==(i=t.attributeName)&&void 0!==i?i:"");return(null==s?void 0:s.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-tooltip")})),this.observer.observe(i,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,i){const s=null==t?void 0:t.closest(i);if(t&&s){const i=s.attributes;for(let e=0;e<i.length;e++){const a=i.item(e);if(a&&"data-density"!==a.name&&(a.name.startsWith("data-")||a.name.startsWith("aria-")))a.value?t.setAttribute(a.name,a.value):t.removeAttribute(a.name),s.removeAttribute(a.name);else if(a&&["style"].includes(a.name))t.setAttribute(a.name,a.value),s.removeAttribute(a.name);else if(a&&"class"===a.name){const i=a.value.includes("hydrated"),e=a.value.replace("hydrated","").trim(),h=t.getAttribute("class");t.setAttribute(a.name,`${h||""}${e?` ${e}`:""}`),i?s.setAttribute("class","hydrated"):s.removeAttribute(a.name)}}}}watch0Fn(){var t,i;(null!==(t=this.id)&&void 0!==t?t:null===(i=this.propOverrides)||void 0===i?void 0:i.id)&&this.resetIds()}watch0(){this.watch0Fn()}watch1Fn(){var t;if(this._ref&&this.initialized&&this._id){const i=this.getParent();if(i){this.handleAutoPlacement(i);const s=()=>this.handleEnter(i),e=()=>this.handleLeave(),a=t=>this.handleEscape(t);i.addEventListener("mouseenter",s),i.addEventListener("focusin",s),i.addEventListener("keydown",a),i.addEventListener("mouseleave",e),i.addEventListener("focusout",e),this._boundListeners=[...null!==(t=this._boundListeners)&&void 0!==t?t:[],{parent:i,type:"mouseenter",fn:s},{parent:i,type:"focusin",fn:s},{parent:i,type:"keydown",fn:a},{parent:i,type:"mouseleave",fn:e},{parent:i,type:"focusout",fn:e}],i.dataset.hasTooltip="true",i.setAttribute("label"===this.variant?"aria-labelledby":"aria-describedby",this._id),this._attachedParent=i,this._attachedId=this._id}"undefined"!=typeof window&&"IntersectionObserver"in window&&(this._observer=new IntersectionObserver((t=>{const i=t.find((({target:t})=>t===this.getParent()));i&&!i.isIntersecting&&this.handleEscape(!1)}))),this.initialized=!1}}watch1(){this.watch1Fn()}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-tooltip"),(()=>{this.resetIds(),this.initialized=!0})(),(()=>{this.setupObserver(this._ref)})(),this.watch0Fn(),this.watch1Fn()}disconnectedCallback(){var t;this._detachListeners(),null===(t=this.observer)||void 0===t||t.disconnect()}render(){var t,s;return i("i",{key:"a35fc9349a599145e2ea2287aa6467500854fadd",class:d("db-tooltip",this.className),role:"tooltip","aria-hidden":"true","data-gap":"true",ref:t=>{this._ref=t},id:this._id,"data-emphasis":this.emphasis,"data-wrap":o(this.wrap,"wrap"),"data-animation":o(null===(t=this.animation)||void 0===t||t,"animation"),"data-delay":this.delay,"data-width":this.width,"data-show-arrow":o(null===(s=this.showArrow)||void 0===s||s,"showArrow"),"data-placement":this.placement,onClick:t=>this.handleClick(t)},this.text?this.text:null,i("slot",{key:"63d102dc8c4c4022c2dc3bad582f0167635adcb2"}))}get rootElement(){return s(this)}static get watchers(){return{id:[{watch0:0}],"propOverrides?.id":[{watch0:0}],_ref:[{watch1:0}],initialized:[{watch1:0}],_id:[{watch1:0}]}}};export{r as db_tooltip}
1
+ import{r as t,h as i,g as s}from"./p-BlbKvvUv.js";import{D as e}from"./p-BdL-nI5y.js";import{d as a,u as h,g as o,c as d}from"./p-BiyJ0WOE.js";import{D as n}from"./p-Z7eYHp_l.js";import{b as l}from"./p-C0q9XJSc.js";const r=class{constructor(i){t(this,i),this._id=e,this.initialized=!1,this._documentScrollListenerCallbackId=void 0,this._observer=void 0,this._attachedParent=void 0,this._attachedId=void 0,this._activeTriggerCount=0,this._boundListeners=[],this.observer=void 0}handleClick(t){t.stopPropagation()}handleEscape(t){t&&"Escape"!==t.key||!this._ref||"visible"!==getComputedStyle(this._ref).visibility||this.getParent().blur()}getParent(){let t=this._ref.parentElement;return t&&t.localName.includes("tooltip")&&(t=t.parentElement),t}handleAutoPlacement(t){t&&this._ref&&a((()=>{var i;this._ref&&l(this._ref,t,null!==(i=this.placement)&&void 0!==i?i:"bottom")}),1)}handleDocumentScroll(t,i){var s,e;(null===(s=null==t?void 0:t.target)||void 0===s?void 0:s.contains)&&(null===(e=null==t?void 0:t.target)||void 0===e?void 0:e.contains(this._ref))&&this.handleAutoPlacement(i)}handleLeave(){var t,i,s;this._activeTriggerCount=Math.max((null!==(t=this._activeTriggerCount)&&void 0!==t?t:0)-1,0),(null!==(i=this._activeTriggerCount)&&void 0!==i?i:0)>0||(this._documentScrollListenerCallbackId&&((new n).removeCallback(this._documentScrollListenerCallbackId),this._documentScrollListenerCallbackId=void 0),null===(s=this._observer)||void 0===s||s.unobserve(this.getParent()))}handleEnter(t){var i,s;this._activeTriggerCount=(null!==(i=this._activeTriggerCount)&&void 0!==i?i:0)+1,1===this._activeTriggerCount&&(this._documentScrollListenerCallbackId=(new n).addCallback((i=>this.handleDocumentScroll(i,t))),null===(s=this._observer)||void 0===s||s.observe(this.getParent())),this.handleAutoPlacement(t)}resetIds(){var t,i,s;this._id=null!==(s=null!==(t=this.id)&&void 0!==t?t:null===(i=this.propOverrides)||void 0===i?void 0:i.id)&&void 0!==s?s:"tooltip-"+h()}_detachListeners(){var t,i,s;const e=this._documentScrollListenerCallbackId;e&&((new n).removeCallback(e),this._documentScrollListenerCallbackId=void 0),null===(t=this._observer)||void 0===t||t.disconnect(),this._observer=void 0,this._activeTriggerCount=0,(null!==(i=this._boundListeners)&&void 0!==i?i:[]).forEach((t=>{t.parent.removeEventListener(t.type,t.fn)})),this._boundListeners=[];const a=this._attachedParent;if(a){const t=null!==(s=this._attachedId)&&void 0!==s?s:this._id,i=a.querySelectorAll(".db-tooltip"),e=Array.from(i).some((t=>t!==this._ref));"true"!==a.dataset.hasTooltip||e||delete a.dataset.hasTooltip,a.getAttribute("aria-labelledby")===t&&a.removeAttribute("aria-labelledby"),a.getAttribute("aria-describedby")===t&&a.removeAttribute("aria-describedby"),this._attachedParent=void 0,this._attachedId=void 0}}setupObserver(t){if(!t)return;const i=t.closest("db-tooltip");i&&!this.observer&&(this.observer=new MutationObserver((i=>{i.some((t=>{var i;const s=t.target.attributes.getNamedItem(null!==(i=t.attributeName)&&void 0!==i?i:"");return(null==s?void 0:s.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-tooltip")})),this.observer.observe(i,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,i){const s=null==t?void 0:t.closest(i);if(t&&s){const i=s.attributes;for(let e=0;e<i.length;e++){const a=i.item(e);if(a&&"data-density"!==a.name&&(a.name.startsWith("data-")||a.name.startsWith("aria-")))a.value?t.setAttribute(a.name,a.value):t.removeAttribute(a.name),s.removeAttribute(a.name);else if(a&&["style"].includes(a.name))t.setAttribute(a.name,a.value),s.removeAttribute(a.name);else if(a&&"class"===a.name){const i=a.value.includes("hydrated"),e=a.value.replace("hydrated","").trim(),h=t.getAttribute("class");t.setAttribute(a.name,`${h||""}${e?` ${e}`:""}`),i?s.setAttribute("class","hydrated"):s.removeAttribute(a.name)}}}}watch0Fn(){var t,i;(null!==(t=this.id)&&void 0!==t?t:null===(i=this.propOverrides)||void 0===i?void 0:i.id)&&this.resetIds()}watch0(){this.watch0Fn()}watch1Fn(){var t;if(this._ref&&this.initialized&&this._id){const i=this.getParent();if(i){this.handleAutoPlacement(i);const s=()=>this.handleEnter(i),e=()=>this.handleLeave(),a=t=>this.handleEscape(t);i.addEventListener("mouseenter",s),i.addEventListener("focusin",s),i.addEventListener("keydown",a),i.addEventListener("mouseleave",e),i.addEventListener("focusout",e),this._boundListeners=[...null!==(t=this._boundListeners)&&void 0!==t?t:[],{parent:i,type:"mouseenter",fn:s},{parent:i,type:"focusin",fn:s},{parent:i,type:"keydown",fn:a},{parent:i,type:"mouseleave",fn:e},{parent:i,type:"focusout",fn:e}],i.dataset.hasTooltip="true",i.setAttribute("label"===this.variant?"aria-labelledby":"aria-describedby",this._id),this._attachedParent=i,this._attachedId=this._id}"undefined"!=typeof window&&"IntersectionObserver"in window&&(this._observer=new IntersectionObserver((t=>{const i=t.find((({target:t})=>t===this.getParent()));i&&!i.isIntersecting&&this.handleEscape(!1)}))),this.initialized=!1}}watch1(){this.watch1Fn()}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-tooltip"),(()=>{this.resetIds(),this.initialized=!0})(),(()=>{this.setupObserver(this._ref)})(),this.watch0Fn(),this.watch1Fn()}disconnectedCallback(){var t;this._detachListeners(),null===(t=this.observer)||void 0===t||t.disconnect()}render(){var t,s;return i("i",{key:"a35fc9349a599145e2ea2287aa6467500854fadd",class:d("db-tooltip",this.className),role:"tooltip","aria-hidden":"true","data-gap":"true",ref:t=>{this._ref=t},id:this._id,"data-emphasis":this.emphasis,"data-wrap":o(this.wrap,"wrap"),"data-animation":o(null===(t=this.animation)||void 0===t||t,"animation"),"data-delay":this.delay,"data-width":this.width,"data-show-arrow":o(null===(s=this.showArrow)||void 0===s||s,"showArrow"),"data-placement":this.placement,onClick:t=>this.handleClick(t)},this.text?this.text:null,i("slot",{key:"63d102dc8c4c4022c2dc3bad582f0167635adcb2"}))}get rootElement(){return s(this)}static get watchers(){return{id:[{watch0:0}],"propOverrides?.id":[{watch0:0}],_ref:[{watch1:0}],initialized:[{watch1:0}],_id:[{watch1:0}]}}};export{r as db_tooltip}
@@ -1 +1 @@
1
- import{r as t,h as s,g as i}from"./p-BlbKvvUv.js";import{c as e}from"./p-fumiz06Y.js";const a=class{constructor(s){t(this,s),this.observer=void 0}setupObserver(t){if(!t)return;const s=t.closest("db-section");s&&!this.observer&&(this.observer=new MutationObserver((s=>{s.some((t=>{var s;const i=t.target.attributes.getNamedItem(null!==(s=t.attributeName)&&void 0!==s?s:"");return(null==i?void 0:i.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-section")})),this.observer.observe(s,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,s){const i=null==t?void 0:t.closest(s);if(t&&i){const s=i.attributes;for(let e=0;e<s.length;e++){const a=s.item(e);if(a&&"data-density"!==a.name&&(a.name.startsWith("data-")||a.name.startsWith("aria-")))a.value?t.setAttribute(a.name,a.value):t.removeAttribute(a.name),i.removeAttribute(a.name);else if(a&&["style"].includes(a.name))t.setAttribute(a.name,a.value),i.removeAttribute(a.name);else if(a&&"class"===a.name){const s=a.value.includes("hydrated"),e=a.value.replace("hydrated","").trim(),d=t.getAttribute("class");t.setAttribute(a.name,`${d||""}${e?` ${e}`:""}`),s?i.setAttribute("class","hydrated"):i.removeAttribute(a.name)}}}}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-section"),this.setupObserver(this._ref)}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect()}render(){var t,i;return s("section",{key:"1dc0a8e37a04cd3a4caba5a50b94ea876e80d462",class:e("db-section",this.className),ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(i=this.propOverrides)||void 0===i?void 0:i.id,"data-spacing":this.spacing||"medium","data-width":this.width},s("slot",{key:"74e62afdc9b8922d1cbd57e801fff67969831ac9"}))}get rootElement(){return i(this)}};export{a as db_section}
1
+ import{r as t,h as s,g as i}from"./p-BlbKvvUv.js";import{c as e}from"./p-BiyJ0WOE.js";const a=class{constructor(s){t(this,s),this.observer=void 0}setupObserver(t){if(!t)return;const s=t.closest("db-section");s&&!this.observer&&(this.observer=new MutationObserver((s=>{s.some((t=>{var s;const i=t.target.attributes.getNamedItem(null!==(s=t.attributeName)&&void 0!==s?s:"");return(null==i?void 0:i.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-section")})),this.observer.observe(s,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,s){const i=null==t?void 0:t.closest(s);if(t&&i){const s=i.attributes;for(let e=0;e<s.length;e++){const a=s.item(e);if(a&&"data-density"!==a.name&&(a.name.startsWith("data-")||a.name.startsWith("aria-")))a.value?t.setAttribute(a.name,a.value):t.removeAttribute(a.name),i.removeAttribute(a.name);else if(a&&["style"].includes(a.name))t.setAttribute(a.name,a.value),i.removeAttribute(a.name);else if(a&&"class"===a.name){const s=a.value.includes("hydrated"),e=a.value.replace("hydrated","").trim(),d=t.getAttribute("class");t.setAttribute(a.name,`${d||""}${e?` ${e}`:""}`),s?i.setAttribute("class","hydrated"):i.removeAttribute(a.name)}}}}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-section"),this.setupObserver(this._ref)}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect()}render(){var t,i;return s("section",{key:"1dc0a8e37a04cd3a4caba5a50b94ea876e80d462",class:e("db-section",this.className),ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(i=this.propOverrides)||void 0===i?void 0:i.id,"data-spacing":this.spacing||"medium","data-width":this.width},s("slot",{key:"74e62afdc9b8922d1cbd57e801fff67969831ac9"}))}get rootElement(){return i(this)}};export{a as db_section}
@@ -1 +1 @@
1
- import{r as t,h as s,g as i}from"./p-BlbKvvUv.js";import{g as e,c as a}from"./p-fumiz06Y.js";const n=class{constructor(s){t(this,s),this.observer=void 0}setupObserver(t){if(!t)return;const s=t.closest("db-infotext");s&&!this.observer&&(this.observer=new MutationObserver((s=>{s.some((t=>{var s;const i=t.target.attributes.getNamedItem(null!==(s=t.attributeName)&&void 0!==s?s:"");return(null==i?void 0:i.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-infotext")})),this.observer.observe(s,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,s){const i=null==t?void 0:t.closest(s);if(t&&i){const s=i.attributes;for(let e=0;e<s.length;e++){const a=s.item(e);if(a&&"data-density"!==a.name&&(a.name.startsWith("data-")||a.name.startsWith("aria-")))a.value?t.setAttribute(a.name,a.value):t.removeAttribute(a.name),i.removeAttribute(a.name);else if(a&&["style"].includes(a.name))t.setAttribute(a.name,a.value),i.removeAttribute(a.name);else if(a&&"class"===a.name){const s=a.value.includes("hydrated"),e=a.value.replace("hydrated","").trim(),n=t.getAttribute("class");t.setAttribute(a.name,`${n||""}${e?` ${e}`:""}`),s?i.setAttribute("class","hydrated"):i.removeAttribute(a.name)}}}}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-infotext"),this.setupObserver(this._ref)}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect()}render(){var t,i,n;return s("span",{key:"5f43b3937dc8adf310a519fc581f6c3162e86ebb",class:a("db-infotext",this.className),ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(i=this.propOverrides)||void 0===i?void 0:i.id,"data-icon":this.icon,"data-semantic":this.semantic,"data-size":this.size,"data-wrap":e(this.wrap,"wrap"),"data-show-icon-leading":e(null===(n=this.showIcon)||void 0===n||n,"showIcon")},this.text?this.text:null,s("slot",{key:"253fc89f2cb83a9ca89c66eed70988b7b69b8507"}))}get rootElement(){return i(this)}};export{n as db_infotext}
1
+ import{r as t,h as s,g as i}from"./p-BlbKvvUv.js";import{g as e,c as a}from"./p-BiyJ0WOE.js";const n=class{constructor(s){t(this,s),this.observer=void 0}setupObserver(t){if(!t)return;const s=t.closest("db-infotext");s&&!this.observer&&(this.observer=new MutationObserver((s=>{s.some((t=>{var s;const i=t.target.attributes.getNamedItem(null!==(s=t.attributeName)&&void 0!==s?s:"");return(null==i?void 0:i.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-infotext")})),this.observer.observe(s,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,s){const i=null==t?void 0:t.closest(s);if(t&&i){const s=i.attributes;for(let e=0;e<s.length;e++){const a=s.item(e);if(a&&"data-density"!==a.name&&(a.name.startsWith("data-")||a.name.startsWith("aria-")))a.value?t.setAttribute(a.name,a.value):t.removeAttribute(a.name),i.removeAttribute(a.name);else if(a&&["style"].includes(a.name))t.setAttribute(a.name,a.value),i.removeAttribute(a.name);else if(a&&"class"===a.name){const s=a.value.includes("hydrated"),e=a.value.replace("hydrated","").trim(),n=t.getAttribute("class");t.setAttribute(a.name,`${n||""}${e?` ${e}`:""}`),s?i.setAttribute("class","hydrated"):i.removeAttribute(a.name)}}}}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-infotext"),this.setupObserver(this._ref)}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect()}render(){var t,i,n;return s("span",{key:"5f43b3937dc8adf310a519fc581f6c3162e86ebb",class:a("db-infotext",this.className),ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(i=this.propOverrides)||void 0===i?void 0:i.id,"data-icon":this.icon,"data-semantic":this.semantic,"data-size":this.size,"data-wrap":e(this.wrap,"wrap"),"data-show-icon-leading":e(null===(n=this.showIcon)||void 0===n||n,"showIcon")},this.text?this.text:null,s("slot",{key:"253fc89f2cb83a9ca89c66eed70988b7b69b8507"}))}get rootElement(){return i(this)}};export{n as db_infotext}
@@ -1 +1 @@
1
- import{r as t,h as i,g as s}from"./p-BlbKvvUv.js";import{c as e}from"./p-fumiz06Y.js";const n=class{constructor(i){t(this,i),this.observer=void 0}setupObserver(t){if(!t)return;const i=t.closest("db-icon");i&&!this.observer&&(this.observer=new MutationObserver((i=>{i.some((t=>{var i;const s=t.target.attributes.getNamedItem(null!==(i=t.attributeName)&&void 0!==i?i:"");return(null==s?void 0:s.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-icon")})),this.observer.observe(i,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,i){const s=null==t?void 0:t.closest(i);if(t&&s){const i=s.attributes;for(let e=0;e<i.length;e++){const n=i.item(e);if(n&&"data-density"!==n.name&&(n.name.startsWith("data-")||n.name.startsWith("aria-")))n.value?t.setAttribute(n.name,n.value):t.removeAttribute(n.name),s.removeAttribute(n.name);else if(n&&["style"].includes(n.name))t.setAttribute(n.name,n.value),s.removeAttribute(n.name);else if(n&&"class"===n.name){const i=n.value.includes("hydrated"),e=n.value.replace("hydrated","").trim(),a=t.getAttribute("class");t.setAttribute(n.name,`${a||""}${e?` ${e}`:""}`),i?s.setAttribute("class","hydrated"):s.removeAttribute(n.name)}}}}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-icon"),this.setupObserver(this._ref)}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect()}render(){var t,s;return i("span",{key:"45475f5547eb46fee1e5046a3adf5602b8427d1e",class:e("db-icon",this.className),"aria-hidden":"true",ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(s=this.propOverrides)||void 0===s?void 0:s.id,"data-icon":this.icon,"data-icon-weight":this.weight,"data-icon-variant":this.variant},this.text?this.text:null,i("slot",{key:"05089e47e87077e6227760806584f49715080c38"}))}get rootElement(){return s(this)}};export{n as db_icon}
1
+ import{r as t,h as i,g as s}from"./p-BlbKvvUv.js";import{c as e}from"./p-BiyJ0WOE.js";const n=class{constructor(i){t(this,i),this.observer=void 0}setupObserver(t){if(!t)return;const i=t.closest("db-icon");i&&!this.observer&&(this.observer=new MutationObserver((i=>{i.some((t=>{var i;const s=t.target.attributes.getNamedItem(null!==(i=t.attributeName)&&void 0!==i?i:"");return(null==s?void 0:s.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-icon")})),this.observer.observe(i,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,i){const s=null==t?void 0:t.closest(i);if(t&&s){const i=s.attributes;for(let e=0;e<i.length;e++){const n=i.item(e);if(n&&"data-density"!==n.name&&(n.name.startsWith("data-")||n.name.startsWith("aria-")))n.value?t.setAttribute(n.name,n.value):t.removeAttribute(n.name),s.removeAttribute(n.name);else if(n&&["style"].includes(n.name))t.setAttribute(n.name,n.value),s.removeAttribute(n.name);else if(n&&"class"===n.name){const i=n.value.includes("hydrated"),e=n.value.replace("hydrated","").trim(),a=t.getAttribute("class");t.setAttribute(n.name,`${a||""}${e?` ${e}`:""}`),i?s.setAttribute("class","hydrated"):s.removeAttribute(n.name)}}}}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-icon"),this.setupObserver(this._ref)}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect()}render(){var t,s;return i("span",{key:"45475f5547eb46fee1e5046a3adf5602b8427d1e",class:e("db-icon",this.className),"aria-hidden":"true",ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(s=this.propOverrides)||void 0===s?void 0:s.id,"data-icon":this.icon,"data-icon-weight":this.weight,"data-icon-variant":this.variant},this.text?this.text:null,i("slot",{key:"05089e47e87077e6227760806584f49715080c38"}))}get rootElement(){return s(this)}};export{n as db_icon}
@@ -1 +1 @@
1
- import{u as t}from"./p-fumiz06Y.js";class c{static runCallbacks(t){for(const l of Object.values(c.callbacks))"function"==typeof l&&l(t)}constructor(){if(c._instance)return c._instance;c._instance=this,self.document&&self.document.addEventListener("click",(t=>c.runCallbacks(t)))}addCallback(l){const s=t();return c.callbacks[s]=l,s}removeCallback(t){delete c.callbacks[t]}}c.callbacks={},c._instance=null;export{c as D}
1
+ import{u as t}from"./p-BiyJ0WOE.js";class c{static runCallbacks(t){for(const l of Object.values(c.callbacks))"function"==typeof l&&l(t)}constructor(){if(c._instance)return c._instance;c._instance=this,self.document&&self.document.addEventListener("click",(t=>c.runCallbacks(t)))}addCallback(l){const s=t();return c.callbacks[s]=l,s}removeCallback(t){delete c.callbacks[t]}}c.callbacks={},c._instance=null;export{c as D}
@@ -1 +1 @@
1
- import{f as t}from"./p-CYYSsu3p.js";const e=(t,e,c)=>{t.form&&!t._dbFormResetListenerAdded&&(t.form.addEventListener("reset",(t=>{e(t)}),{signal:c}),t._dbFormResetListenerAdded=!0)},c=(c,s,a,b)=>{e(c,(e=>{t((()=>{const t=s.checked?s.checked:s.defaultChecked?s.defaultChecked:c.checked,b=Object.assign(Object.assign({},e),{target:Object.assign(Object.assign({},e.target),{checked:t})});a(b)}),1)}),b)},s=(c,s,a,b)=>{e(c,(e=>{t((()=>{const t=s.value?s.value:s.defaultValue?s.defaultValue:c.value,b=Object.assign(Object.assign({},e),{target:Object.assign(Object.assign({},e.target),{value:t})});a(b)}),1)}),b)};export{c as a,e as b,s as c}
1
+ import{d as t}from"./p-BiyJ0WOE.js";const e=(t,e,c)=>{t.form&&!t._dbFormResetListenerAdded&&(t.form.addEventListener("reset",(t=>{e(t)}),{signal:c}),t._dbFormResetListenerAdded=!0)},c=(c,s,a,b)=>{e(c,(e=>{t((()=>{const t=s.checked?s.checked:s.defaultChecked?s.defaultChecked:c.checked,b=Object.assign(Object.assign({},e),{target:Object.assign(Object.assign({},e.target),{checked:t})});a(b)}),1)}),b)},s=(c,s,a,b)=>{e(c,(e=>{t((()=>{const t=s.value?s.value:s.defaultValue?s.defaultValue:c.value,b=Object.assign(Object.assign({},e),{target:Object.assign(Object.assign({},e.target),{value:t})});a(b)}),1)}),b)};export{c as a,e as b,s as c}
@@ -0,0 +1 @@
1
+ const n=()=>{var n,e;if("undefined"!=typeof window){if(null===(n=window.crypto)||void 0===n?void 0:n.randomUUID)return window.crypto.randomUUID();if(null===(e=window.crypto)||void 0===e?void 0:e.getRandomValues)return window.crypto.getRandomValues(new Uint32Array(3)).join("-")}return Math.random().toString().substring(2)},e=(n,r)=>{Object.values(n.children).forEach((n=>{n.setAttribute(r.key,r.value),n.children.length>0&&e(n,r)}))},r=(...n)=>{let e="";for(const r of n)if(r)if("string"==typeof r)e+=`${r} `;else for(const n in r)r[n]&&(e+=`${n} `);return e.trim()},i=n=>Array.isArray(n)&&n.every((n=>"string"==typeof n)),t=["Mac","iPhone","iPad","iPod"],a=()=>"undefined"!=typeof window&&t.some((n=>window.navigator.userAgent.includes(n))),o=()=>{if("undefined"==typeof window||"undefined"==typeof navigator)return!1;const n=navigator.userAgent,e=/iP(ad|hone|od)/.test(n),r=!!n.match(/Safari/)&&!n.match(/CriOS|FxiOS|OPiOS|EdgiOS/);return e&&r},u=(n,e)=>new Promise((()=>setTimeout(n,e))),s=(n,e)=>{if(null!=n)return String("string"==typeof n?""===n||"true"===n||(null==e?void 0:e.toLowerCase())===n.toLowerCase():n)},l=(n,e)=>{if(null!=n)return"string"==typeof n?Boolean(""===n||"true"===n||(null==e?void 0:e.toLowerCase())===n.toLowerCase()):Boolean(n)},f=(n,e)=>{if(null!=n||null!=e)return Number(null!=n?n:e)},d=n=>{if(null!=n)return"any"===n?"any":Number(n)},w=(n,e)=>e&&["number","range"].includes(e)?f(n):n,c=n=>"string"==typeof n?"false"!==n:n,v=n=>{if(null!=n)return s(!c(n),"show")},p=(n,e)=>void 0===e?!!n:c(e)&&Boolean(n),y=n=>n.querySelector('input[type="search"]'),g=new WeakMap,$=(e,r)=>{var i;if(e.id)return`${r}${e.id}`;const t=void 0!==e.value&&""!==e.value?String(e.value):"",a=null!==(i=e.label)&&void 0!==i?i:"";if(t||a)return`${r}${t.length}:${t}.${a}`;let o=g.get(e);return o||(o=n(),g.set(e,o)),`${r}${o}`},m=n=>void 0!==n.key,h=({semantic:n,role:e,ariaLive:r})=>{if(e)return e;if(r)return"article";switch(n){case"critical":case"warning":return"alert";case"informational":case"successful":return"status";default:return"article"}};export{e as a,o as b,r as c,u as d,l as e,f,s as g,a as h,i,d as j,w as k,v as l,y as m,$ as n,m as o,h as p,p as s,n as u}
@@ -0,0 +1 @@
1
+ import{u as t}from"./p-BiyJ0WOE.js";class s{static runCallbacks(t){for(const l of Object.values(s.callbacks))"function"==typeof l&&l(t)}constructor(){if(this.ticking=!1,s._instance)return s._instance;s._instance=this,self.document&&self.document.addEventListener("scroll",(t=>{this.ticking||(window.requestAnimationFrame((()=>{s.runCallbacks(t),this.ticking=!1})),this.ticking=!0)}),!0)}addCallback(l){const o=t();return s.callbacks[o]=l,o}removeCallback(t){delete s.callbacks[t]}}s.callbacks={},s._instance=null;export{s as D}
@@ -1 +1 @@
1
- import{r as t,c as s,h as i,g as a}from"./p-BlbKvvUv.js";import{g as n,e as o,c as e}from"./p-fumiz06Y.js";const d=class{constructor(i){t(this,i),this.click=s(this,"click"),this.observer=void 0}getButtonType(){return this.type?this.type:this.click||this.commandfor?"button":"submit"}setupObserver(t){if(!t)return;const s=t.closest("db-button");s&&!this.observer&&(this.observer=new MutationObserver((s=>{s.some((t=>{var s;const i=t.target.attributes.getNamedItem(null!==(s=t.attributeName)&&void 0!==s?s:"");return(null==i?void 0:i.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-button")})),this.observer.observe(s,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,s){const i=null==t?void 0:t.closest(s);if(t&&i){const s=i.attributes;for(let a=0;a<s.length;a++){const n=s.item(a);if(n&&"data-density"!==n.name&&(n.name.startsWith("data-")||n.name.startsWith("aria-")))n.value?t.setAttribute(n.name,n.value):t.removeAttribute(n.name),i.removeAttribute(n.name);else if(n&&["style"].includes(n.name))t.setAttribute(n.name,n.value),i.removeAttribute(n.name);else if(n&&"class"===n.name){const s=n.value.includes("hydrated"),a=n.value.replace("hydrated","").trim(),o=t.getAttribute("class");t.setAttribute(n.name,`${o||""}${a?` ${a}`:""}`),s?i.setAttribute("class","hydrated"):i.removeAttribute(n.name)}}}}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-button"),this.setupObserver(this._ref)}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect()}render(){var t,s,a;return i("button",{key:"bd382d51378136c65704c74fdad02b9b8433890f",class:e("db-button",this.className),ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(s=this.propOverrides)||void 0===s?void 0:s.id,type:this.getButtonType(),disabled:o(this.disabled,"disabled"),"data-icon":null!==(a=this.iconLeading)&&void 0!==a?a:this.icon,"data-show-icon":n(this.showIconLeading,"showIconLeading")||n(this.showIcon,"showIcon"),"data-icon-trailing":this.iconTrailing,"data-show-icon-trailing":n(this.showIconTrailing,"showIconTrailing"),"data-size":this.size,"data-width":this.width,"data-variant":this.variant,"data-wrap":n(this.wrap,"wrap"),"data-no-text":n(this.noText,"noText"),name:this.name,form:this.form,value:this.value,command:this.command,commandfor:this.commandfor},this.text?this.text:null,i("slot",{key:"76611f6bae15865842bcfa1c1b2666f905633b1f"}))}get rootElement(){return a(this)}};export{d as db_button}
1
+ import{r as t,c as s,h as i,g as a}from"./p-BlbKvvUv.js";import{g as n,e as o,c as e}from"./p-BiyJ0WOE.js";const d=class{constructor(i){t(this,i),this.click=s(this,"click"),this.observer=void 0}getButtonType(){return this.type?this.type:this.click||this.commandfor?"button":"submit"}setupObserver(t){if(!t)return;const s=t.closest("db-button");s&&!this.observer&&(this.observer=new MutationObserver((s=>{s.some((t=>{var s;const i=t.target.attributes.getNamedItem(null!==(s=t.attributeName)&&void 0!==s?s:"");return(null==i?void 0:i.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-button")})),this.observer.observe(s,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,s){const i=null==t?void 0:t.closest(s);if(t&&i){const s=i.attributes;for(let a=0;a<s.length;a++){const n=s.item(a);if(n&&"data-density"!==n.name&&(n.name.startsWith("data-")||n.name.startsWith("aria-")))n.value?t.setAttribute(n.name,n.value):t.removeAttribute(n.name),i.removeAttribute(n.name);else if(n&&["style"].includes(n.name))t.setAttribute(n.name,n.value),i.removeAttribute(n.name);else if(n&&"class"===n.name){const s=n.value.includes("hydrated"),a=n.value.replace("hydrated","").trim(),o=t.getAttribute("class");t.setAttribute(n.name,`${o||""}${a?` ${a}`:""}`),s?i.setAttribute("class","hydrated"):i.removeAttribute(n.name)}}}}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-button"),this.setupObserver(this._ref)}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect()}render(){var t,s,a;return i("button",{key:"bd382d51378136c65704c74fdad02b9b8433890f",class:e("db-button",this.className),ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(s=this.propOverrides)||void 0===s?void 0:s.id,type:this.getButtonType(),disabled:o(this.disabled,"disabled"),"data-icon":null!==(a=this.iconLeading)&&void 0!==a?a:this.icon,"data-show-icon":n(this.showIconLeading,"showIconLeading")||n(this.showIcon,"showIcon"),"data-icon-trailing":this.iconTrailing,"data-show-icon-trailing":n(this.showIconTrailing,"showIconTrailing"),"data-size":this.size,"data-width":this.width,"data-variant":this.variant,"data-wrap":n(this.wrap,"wrap"),"data-no-text":n(this.noText,"noText"),name:this.name,form:this.form,value:this.value,command:this.command,commandfor:this.commandfor},this.text?this.text:null,i("slot",{key:"76611f6bae15865842bcfa1c1b2666f905633b1f"}))}get rootElement(){return a(this)}};export{d as db_button}
@@ -1 +1 @@
1
- import{r as t,h as e,g as s}from"./p-BlbKvvUv.js";import{c as d,g as a}from"./p-fumiz06Y.js";const i=class{constructor(e){t(this,e),this.fontsLoaded=!1,this.observer=void 0}setupObserver(t){if(!t)return;const e=t.closest("db-page");e&&!this.observer&&(this.observer=new MutationObserver((e=>{e.some((t=>{var e;const s=t.target.attributes.getNamedItem(null!==(e=t.attributeName)&&void 0!==e?e:"");return(null==s?void 0:s.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-page")})),this.observer.observe(e,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,e){const s=null==t?void 0:t.closest(e);if(t&&s){const e=s.attributes;for(let d=0;d<e.length;d++){const a=e.item(d);if(a&&"data-density"!==a.name&&(a.name.startsWith("data-")||a.name.startsWith("aria-")))a.value?t.setAttribute(a.name,a.value):t.removeAttribute(a.name),s.removeAttribute(a.name);else if(a&&["style"].includes(a.name))t.setAttribute(a.name,a.value),s.removeAttribute(a.name);else if(a&&"class"===a.name){const e=a.value.includes("hydrated"),d=a.value.replace("hydrated","").trim(),i=t.getAttribute("class");t.setAttribute(a.name,`${i||""}${d?` ${d}`:""}`),e?s.setAttribute("class","hydrated"):s.removeAttribute(a.name)}}}}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-page"),(()=>{this.fontsLoaded=!this.fadeIn,document&&this.fadeIn?document.fonts.ready.then((()=>{this.fontsLoaded=!0})):this.fontsLoaded=!0})(),(()=>{this.setupObserver(this._ref)})()}disconnectedCallback(){var t;"undefined"!=typeof window&&document.documentElement.classList.contains("db-page-document")&&document.documentElement.classList.remove("db-page-document"),null===(t=this.observer)||void 0===t||t.disconnect()}render(){var t,s;return e("div",{key:"d8c086f8eb07ec85955f140adabfa43f78286635",class:d("db-page",this.className),ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(s=this.propOverrides)||void 0===s?void 0:s.id,"data-variant":this.variant,"data-fade-in":a(this.fadeIn,"fadeIn"),"data-fonts-loaded":a(this.fontsLoaded,"fontsLoaded")},e("slot",{key:"9122b1310ce8e47ad01576dcd124da4c37f6c702",name:"header"}),e("main",{key:"27318129c99bdf85882dfe1e28265ebf7abe0437",class:d("db-main",this.mainClass)},e("slot",{key:"cc1e59ff392c38010ffb61fc7dcfffc30bb75990"})),e("slot",{key:"d0335d70f621f133e68f3a79a90a62ecf1b65be5",name:"footer"}))}get rootElement(){return s(this)}};export{i as db_page}
1
+ import{r as t,h as e,g as s}from"./p-BlbKvvUv.js";import{c as d,g as a}from"./p-BiyJ0WOE.js";const i=class{constructor(e){t(this,e),this.fontsLoaded=!1,this.observer=void 0}setupObserver(t){if(!t)return;const e=t.closest("db-page");e&&!this.observer&&(this.observer=new MutationObserver((e=>{e.some((t=>{var e;const s=t.target.attributes.getNamedItem(null!==(e=t.attributeName)&&void 0!==e?e:"");return(null==s?void 0:s.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-page")})),this.observer.observe(e,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,e){const s=null==t?void 0:t.closest(e);if(t&&s){const e=s.attributes;for(let d=0;d<e.length;d++){const a=e.item(d);if(a&&"data-density"!==a.name&&(a.name.startsWith("data-")||a.name.startsWith("aria-")))a.value?t.setAttribute(a.name,a.value):t.removeAttribute(a.name),s.removeAttribute(a.name);else if(a&&["style"].includes(a.name))t.setAttribute(a.name,a.value),s.removeAttribute(a.name);else if(a&&"class"===a.name){const e=a.value.includes("hydrated"),d=a.value.replace("hydrated","").trim(),i=t.getAttribute("class");t.setAttribute(a.name,`${i||""}${d?` ${d}`:""}`),e?s.setAttribute("class","hydrated"):s.removeAttribute(a.name)}}}}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-page"),(()=>{this.fontsLoaded=!this.fadeIn,document&&this.fadeIn?document.fonts.ready.then((()=>{this.fontsLoaded=!0})):this.fontsLoaded=!0})(),(()=>{this.setupObserver(this._ref)})()}disconnectedCallback(){var t;"undefined"!=typeof window&&document.documentElement.classList.contains("db-page-document")&&document.documentElement.classList.remove("db-page-document"),null===(t=this.observer)||void 0===t||t.disconnect()}render(){var t,s;return e("div",{key:"d8c086f8eb07ec85955f140adabfa43f78286635",class:d("db-page",this.className),ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(s=this.propOverrides)||void 0===s?void 0:s.id,"data-variant":this.variant,"data-fade-in":a(this.fadeIn,"fadeIn"),"data-fonts-loaded":a(this.fontsLoaded,"fontsLoaded")},e("slot",{key:"9122b1310ce8e47ad01576dcd124da4c37f6c702",name:"header"}),e("main",{key:"27318129c99bdf85882dfe1e28265ebf7abe0437",class:d("db-main",this.mainClass)},e("slot",{key:"cc1e59ff392c38010ffb61fc7dcfffc30bb75990"})),e("slot",{key:"d0335d70f621f133e68f3a79a90a62ecf1b65be5",name:"footer"}))}get rootElement(){return s(this)}};export{i as db_page}
@@ -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,a as o,m as a,f as d,g as n,h as c,e as v,d as r,i as u,o as w,k as f,c as b,s as m}from"./p-BdL-nI5y.js";import{h as p,d as y,s as g,m as k,u as F,e as A,g as x,l as D,c as C}from"./p-fumiz06Y.js";import{D as O}from"./p-OOIf-5XP.js";import{D as S}from"./p-BtImZ8Nt.js";import{a as I}from"./p-C0q9XJSc.js";import{b as L}from"./p-BihrW11j.js";const T=class{constructor(s){i(this,s),this.amountChange=t(this,"amountChange"),this.dropdownToggle=t(this,"dropdownToggle"),this.optionSelected=t(this,"optionSelected"),this.search=t(this,"search"),this.showClearSelection=!0,this.clearSelectionText="Clear selection",this._id=void 0,this._messageId=void 0,this._validMessageId=void 0,this._invalidMessageId=void 0,this._invalidMessage=void 0,this._selectId=void 0,this._labelId=void 0,this._summaryId=void 0,this._placeholderId=void 0,this._infoTextId=void 0,this._validity="no-validation",this._userInteraction=!1,this.abortController=void 0,this._descByIds=void 0,this._selectedLabels="",this._selectedLabelsId=void 0,this._voiceOverFallback="",this._selectedOptions=[],this.selectAllEnabled=!1,this.searchEnabled=!1,this.amountOptions=0,this._values=[],this._options=[],this._hasNoOptions=!1,this._documentClickListenerCallbackId=void 0,this._internalChangeTimestamp=0,this._documentScrollListenerCallbackId=void 0,this._observer=void 0,this._searchValue=void 0,this.selectAllChecked=!1,this.selectAllIndeterminate=!1,this.observer=void 0,this.satisfyReact=function(i){i.stopPropagation()}}handleDocumentScroll(i){var t,s;(null===(t=null==i?void 0:i.target)||void 0===t?void 0:t.contains)&&(null===(s=null==i?void 0:i.target)||void 0===s?void 0:s.contains(this.detailsRef))&&this.handleAutoPlacement()}hasValidState(){var i;return!!(null!==(i=this.validMessage)&&void 0!==i?i:"valid"===this.validation)}handleValidation(){var i,t,s,h,e,o,a,d;this.selectRef&&(this.selectRef.value=this.getNativeSelectValue()),(null===(i=this.selectRef)||void 0===i?void 0:i.validity.valid)&&"invalid"!==this.validation?this.hasValidState()&&(null===(h=this.selectRef)||void 0===h?void 0:h.validity.valid)&&this.required?(this.setDescById(this._validMessageId),p()&&(this._voiceOverFallback=null!==(e=this.validMessage)&&void 0!==e?e:f,y((()=>this._voiceOverFallback=""),1e3)),this._validity=null!==(o=this.validation)&&void 0!==o?o:"valid"):g(this.message,this.showMessage)?(this.setDescById(this._messageId),this._validity=null!==(a=this.validation)&&void 0!==a?a:"no-validation"):(this.setDescById(this._placeholderId),this._validity=null!==(d=this.validation)&&void 0!==d?d:"no-validation"):(this.setDescById(this._invalidMessageId),this._invalidMessage=this.invalidMessage||(null===(t=this.selectRef)||void 0===t?void 0:t.validationMessage)||l,p()&&(this._voiceOverFallback=this._invalidMessage,y((()=>this._voiceOverFallback=""),1e3)),this._userInteraction&&(this._validity=null!==(s=this.validation)&&void 0!==s?s:"invalid"))}handleDropdownToggle(i){var t,s;this.dropdownToggle&&(i.stopPropagation(),this.dropdownToggle.emit(i)),i.target instanceof HTMLDetailsElement&&i.target.open?(this._documentClickListenerCallbackId=(new O).addCallback((i=>this.handleDocumentClose(i))),this._documentScrollListenerCallbackId=(new S).addCallback((i=>this.handleDocumentScroll(i))),this.handleAutoPlacement(),null===(t=this._observer)||void 0===t||t.observe(this.detailsRef),i.target.dataset.test||this.handleOpenByKeyboardFocus()):(this._documentClickListenerCallbackId&&(new O).removeCallback(this._documentClickListenerCallbackId),this._documentScrollListenerCallbackId&&(new S).removeCallback(this._documentScrollListenerCallbackId),null===(s=this._observer)||void 0===s||s.unobserve(this.detailsRef))}getNativeSelectValue(){var i,t;return(null===(i=this._values)||void 0===i?void 0:i.length)&&null!==(t=this._values.at(0))&&void 0!==t?t:""}setDescById(i){var t;const s=[];i&&s.push(i),this._selectedLabelsId&&(null===(t=this._selectedLabels)||void 0===t?void 0:t.length)&&s.push(this._selectedLabelsId),this._descByIds=s.join(" ")}getSelectAllLabel(){var i;return null!==(i=this.selectAllLabel)&&void 0!==i?i:o}getOptionLabel(i){var t,s,h;return null!==(h=null!==(t=i.label)&&void 0!==t?t:null===(s=i.value)||void 0===s?void 0:s.toString())&&void 0!==h?h:""}getOptionChecked(i){var t,s;return!(!i||!(null===(t=this._values)||void 0===t?void 0:t.includes))&&(null===(s=this._values)||void 0===s?void 0:s.includes(i))}getTagRemoveLabel(i){const t=this.removeTagsTexts,s=this.options;if(t&&s){const h=s.findIndex((t=>t.value===i.value));if(h>=0&&h<t.length)return t[h]}return`${a} ${this.getOptionLabel(i)}`}handleTagRemove(i,t){t&&t.stopPropagation(),this.handleSelect(i.value),this.handleSummaryFocus()}handleAutoPlacement(){if(this.detailsRef){const i=this.detailsRef.querySelector("article");i&&y((()=>{var t;I(i,this.detailsRef,null!==(t=this.placement)&&void 0!==t?t:"bottom")}),1)}}handleArrowDownUp(i){var t,s,h;if(null===(t=this.detailsRef)||void 0===t?void 0:t.open){if(self.document){const t=self.document.activeElement;if(t)if("checkbox"===t.getAttribute("type")||"radio"===t.getAttribute("type")){const e=null==t?void 0:t.closest("li");if("ArrowDown"===i.key||"ArrowRight"===i.key){let i=null==e?void 0:e.nextElementSibling;for(;i;){const t=i.querySelector("input");if(t){t.focus();break}i=i.nextElementSibling}i||this.handleFocusFirstDropdownCheckbox(t)}else{let i=null==e?void 0:e.previousElementSibling;for(;i;){const t=i.querySelector("input");if(t){t.focus();break}i=i.previousElementSibling}if(!i){const i=this.detailsRef.querySelector('input[type="checkbox"]');if(i&&i!==t)this.handleFocusFirstDropdownCheckbox(t);else{const i=k(this.detailsRef);if(i)y((()=>{i.focus()}),100);else{const i=Array.from(null===(s=this.detailsRef)||void 0===s?void 0:s.querySelectorAll('input[type="checkbox"],input[type="radio"]'));i.length&&(null===(h=i.at(-1))||void 0===h||h.focus())}}}}}else"search"!==t.getAttribute("type")||"ArrowUp"!==i.key&&"ArrowLeft"!==i.key?this.handleFocusFirstDropdownCheckbox(t):(this.handleClose(void 0,!0),this.handleSummaryFocus())}}else"ArrowDown"!==i.key&&"ArrowRight"!==i.key||(this.handleAutoPlacement(),this.detailsRef&&(this.detailsRef.open=!0),this.handleOpenByKeyboardFocus());i.stopPropagation(),i.preventDefault()}handleKeyboardPress(i){var t,s,h;if(i.stopPropagation(),"Escape"===i.key&&(null===(t=this.detailsRef)||void 0===t?void 0:t.open))this.handleClose(void 0,!0),this.handleSummaryFocus();else if("Enter"===i.key&&(null===(s=this.detailsRef)||void 0===s?void 0:s.open)){if(self.document){const t=self.document.activeElement;if(["checkbox","radio"].includes(t.getAttribute("type")||""))t.click(),i.preventDefault();else if("search"===t.getAttribute("type")){const t=null===(h=this._options)||void 0===h?void 0:h.find((i=>!i.isGroupTitle&&!i.disabled));(null==t?void 0:t.value)&&(this.handleSelect(t.value),i.preventDefault())}}}else"ArrowDown"!==i.key&&"ArrowUp"!==i.key&&"ArrowLeft"!==i.key&&"ArrowRight"!==i.key||this.handleArrowDownUp(i)}handleClose(i,t){if(this.detailsRef)if(t)this.detailsRef.open=!1,this.handleSummaryFocus();else if(this.detailsRef.open&&i&&i.relatedTarget){const t=i.relatedTarget;this.detailsRef.contains(t)||"dialog"===t.localName||y((()=>this.detailsRef.open=!1),1)}}handleDocumentClose(i){var t,s;if(i){const h="number"==typeof i.detail?i.target:null===(t=i.detail)||void 0===t?void 0:t.target;(null===(s=this.detailsRef)||void 0===s?void 0:s.open)&&!this.detailsRef.contains(h)&&(this.detailsRef.open=!1)}}handleOptionSelected(i){(new Date).getTime()-this._internalChangeTimestamp<200||(this._values=i,this._userInteraction=!0,this.optionSelected&&this.optionSelected.emit(null!=i?i:[]),this._internalChangeTimestamp=(new Date).getTime())}handleSelect(i){var t;i&&(this.multiple?(null===(t=this._values)||void 0===t?void 0:t.includes(i))?this.handleOptionSelected(this._values.filter((t=>t!==i))):this.handleOptionSelected([...this._values||[],i]):(this.handleOptionSelected([i]),this.handleClose(void 0,!0)))}handleSelectAll(i){var t;if(i.stopPropagation(),(null===(t=this._values)||void 0===t?void 0:t.length)===this.amountOptions)this.handleOptionSelected([]);else{const i=this.searchEnabled&&this.searchInputRef?this.searchInputRef.value:void 0;this.handleOptionSelected(this.options?this.options.filter((t=>{var s;return!t.isGroupTitle&&(!i||(null===(s=t.value)||void 0===s?void 0:s.toLowerCase().includes(i.toLowerCase())))})).map((i=>{var t;return null!==(t=i.value)&&void 0!==t?t:""})):[])}}handleFocusFirstDropdownCheckbox(i){if(this.detailsRef){const t=Array.from(this.detailsRef.querySelectorAll('input[type="checkbox"],input[type="radio"]'));if(t.length){const s=t.at(0),h=s===i&&t.length>1?t.at(1):s;h&&y((()=>{h.focus()}),1)}}}handleOpenByKeyboardFocus(){if(this.detailsRef){const i=k(this.detailsRef);i?y((()=>{i.focus()}),1):this.handleFocusFirstDropdownCheckbox()}}handleSearch(i){var t;if(void 0===i)return;let s;if("string"==typeof i)s=i;else{const t=i;t.stopPropagation(),this.search&&this.search.emit(t),s=t.target.value,this._searchValue=s}this._options=this.options&&s&&0!==s.length?this.options.filter(this.searchFilter?i=>this.searchFilter(i,s):i=>!i.isGroupTitle&&this.getOptionLabel(i).toLowerCase().includes(s.toLowerCase())):this.options,(null===(t=this.detailsRef)||void 0===t?void 0:t.open)&&this.handleAutoPlacement()}handleClearAll(i){i.stopPropagation(),this.handleOptionSelected([]),this.handleSummaryFocus()}handleSummaryFocus(){var i;this.detailsRef&&(null===(i=this.detailsRef.querySelector("summary"))||void 0===i||i.focus())}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:`custom-select-${F()}`;this._id=h,this._messageId=h+d,this._validMessageId=h+n,this._invalidMessageId=h+c,this._selectId=h+v,this._labelId=h+r,this._summaryId=h+"-summary",this._placeholderId=h+u,this._selectedLabelsId=h+"-selected-labels",this._infoTextId=h+"-info"}setupObserver(i){if(!i)return;const t=i.closest("db-custom-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-custom-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(),l=i.getAttribute("class");i.setAttribute(e.name,`${l||""}${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(){this.detailsRef&&this.detailsRef.addEventListener("focusout",(i=>this.handleClose(i)))}watch1(){this.watch1Fn()}watch2Fn(){if(this._id){const i=this._id+d;this._labelId=this._id+r,this._selectId=this._id+v,this._validMessageId=this._id+n,this._invalidMessageId=this._id+c,this._placeholderId=this._id+u,g(this.message,this.showMessage)?this.setDescById(i):this.setDescById()}}watch2(){this.watch2Fn()}watch3Fn(){var i;if(this.detailsRef){const t=this.detailsRef.querySelector("summary");t&&t.setAttribute("aria-describedby",null!==(i=this.ariaDescribedBy)&&void 0!==i?i:this._descByIds||"")}}watch3(){this.watch3Fn()}watch4Fn(){void 0!==this.showNoResults?this._hasNoOptions=this.showNoResults:this._options&&(this._hasNoOptions=0===this._options.length)}watch4(){this.watch4Fn()}watch5Fn(){var i;this.selectAllEnabled=Boolean(this.multiple&&(null!==(i=this.showSelectAll)&&void 0!==i?i:this.amountOptions>5))}watch5(){this.watch5Fn()}watch6Fn(){var i;this.searchEnabled=null!==(i=this.showSearch)&&void 0!==i?i:this.amountOptions>9}watch6(){this.watch6Fn()}watch7Fn(){var i;const t=this.values;Array.isArray(t)?this._values!==t&&(this._values=t):null==t&&0!==(null===(i=this._values)||void 0===i?void 0:i.length)&&(this._values=[])}watch7(){this.watch7Fn()}watch8Fn(){this.selectRef&&this.handleValidation()}watch8(){this.watch8Fn()}watch9Fn(){if(this.selectRef){let i=this.abortController;i||(i=new AbortController,this.abortController=i);const t=this.values;L(this.selectRef,(()=>{this.handleOptionSelected(t||(this.selectRef.value?[this.selectRef.value]:[])),this.handleValidation()}),i.signal)}}watch9(){this.watch9Fn()}watch10Fn(){this._validity=this.validation}watch10(){this.watch10Fn()}watch11Fn(){var i,t;0===(null===(i=this._values)||void 0===i?void 0:i.length)?(this.selectAllChecked=!1,this.selectAllIndeterminate=!1):(null===(t=this._values)||void 0===t?void 0:t.length)===this.amountOptions?(this.selectAllIndeterminate=!1,this.selectAllChecked=!0):this._values&&(this.selectAllIndeterminate=!0)}watch11(){this.watch11Fn()}watch12Fn(){var i,t,s;this._options=this.options,this.amountOptions=null!==(t=null===(i=this.options)||void 0===i?void 0:i.filter((i=>!i.isGroupTitle)).length)&&void 0!==t?t:0,(null===(s=this.detailsRef)||void 0===s?void 0:s.open)&&this.handleAutoPlacement()}watch12(){this.watch12Fn()}watch13Fn(){this._searchValue=this.searchValue,this.searchValue&&this.handleSearch(this.searchValue)}watch13(){this.watch13Fn()}watch14Fn(){var i,t;(null===(i=this.options)||void 0===i?void 0:i.length)&&(this._selectedOptions=null===(t=this.options)||void 0===t?void 0:t.filter((i=>{var t,s;return!(!i.value||!(null===(t=this._values)||void 0===t?void 0:t.includes))&&!i.isGroupTitle&&(null===(s=this._values)||void 0===s?void 0:s.includes(i.value))})))}watch14(){this.watch14Fn()}watch15Fn(){var i,t,s;if(this.selectedLabels)this._selectedLabels=this.selectedLabels;else if(null===(i=this._selectedOptions)||void 0===i?void 0:i.length){if(this.transformSelectedLabels)return void(this._selectedLabels=(0,this.transformSelectedLabels)(this._selectedOptions));this._selectedLabels="amount"===this.selectedType?this.amountText?this.amountText:`${null===(t=this._selectedOptions)||void 0===t?void 0:t.length} ${w}`:null===(s=this._selectedOptions)||void 0===s?void 0:s.map((i=>this.getOptionLabel(i))).join(", ")}else this._selectedLabels=""}watch15(){this.watch15Fn()}watch16Fn(){var i,t;this.amountChange&&this.amountChange.emit(null!==(t=null===(i=this._selectedOptions)||void 0===i?void 0:i.length)&&void 0!==t?t:0)}watch16(){this.watch16Fn()}watch17Fn(){this.selectAllRef&&(this.selectAllRef.indeterminate=Boolean(this.selectAllIndeterminate))}watch17(){this.watch17Fn()}watch18Fn(){var i;this._invalidMessage=this.invalidMessage||(null===(i=this.selectRef)||void 0===i?void 0:i.validationMessage)||l}watch18(){this.watch18Fn()}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-custom-select"),(()=>{this.resetIds(),this._invalidMessage=this.invalidMessage||l,"undefined"!=typeof window&&"IntersectionObserver"in window&&(this._observer=new IntersectionObserver((i=>{if(this.detailsRef){const t=i.find((({target:i})=>i===this.detailsRef));t&&!t.isIntersecting&&this.detailsRef.open&&(this.detailsRef.open=!1)}})))})(),(()=>{this.setupObserver(this._ref)})(),this.watch0Fn(),this.watch1Fn(),this.watch2Fn(),this.watch3Fn(),this.watch4Fn(),this.watch5Fn(),this.watch6Fn(),this.watch7Fn(),this.watch8Fn(),this.watch9Fn(),this.watch10Fn(),this.watch11Fn(),this.watch12Fn(),this.watch13Fn(),this.watch14Fn(),this.watch15Fn(),this.watch16Fn(),this.watch17Fn(),this.watch18Fn()}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,l,a,d,n,c,v,r,u,w,p,y,k;return s("div",{key:"9f804bd057ef9cde5cc83263e5b1e3a477ad5d2e",class:C("db-custom-select",this.className),id:this._id,ref:i=>{this._ref=i},"aria-invalid":"invalid"===this._validity,"data-custom-validity":this._validity,"data-width":this.formFieldWidth,"data-variant":"floating"===this.variant&&"tag"===this.selectedType&&this.multiple?"above":this.variant,"data-required":x(this.required,"required"),"data-hide-asterisk":D(this.showRequiredAsterisk),"data-placement":this.placement,"data-selected-type":this.multiple?this.selectedType:"text","data-hide-label":D(this.showLabel),"data-icon":this.icon,"data-show-icon":x(this.showIcon,"showIcon")},s("label",{key:"1ce826237b63c3abfad8b55068c25fdc4acc2d7a",id:this._labelId},null!==(i=this.label)&&void 0!==i?i:o,s("select",{key:"9f16da6b3d9e633e4ce70e8654925df86a901074",role:"none",hidden:!0,id:this._selectId,tabIndex:-1,ref:i=>{this.selectRef=i},form:this.form,name:this.name,"data-custom-validity":this._validity,multiple:A(this.multiple,"multiple"),disabled:A(this.disabled,"disabled"),required:A(this.required,"required"),onChange:i=>this.satisfyReact(i)},(null===(t=this.options)||void 0===t?void 0:t.length)?null===(e=this.options)||void 0===e?void 0:e.map((i=>s("option",{disabled:i.disabled,value:i.value,key:void 0},this.getOptionLabel(i)))):null)),s("details",{key:"6a88c236898236ee539bced6fa3b3918be8f693d",ref:i=>{this.detailsRef=i},open:this.open,onToggle:i=>this.handleDropdownToggle(i),onKeyDown:i=>this.handleKeyboardPress(i)},s("slot",{key:"c9dd3e30dd094da51de1b2064749a211fef6eb36"}),this.options?s(h,null,s("summary",{class:"db-custom-select-form-field",id:this._summaryId,"aria-disabled":x(this.disabled,"disabled"),tabIndex:this.disabled?-1:void 0,"aria-labelledby":this._labelId},(null===(l=this._selectedLabels)||void 0===l?void 0:l.length)?s("span",{"data-visually-hidden":x("tag"===this.selectedType,"selectedType"),id:this._selectedLabelsId},this.selectedPrefix?s("span",{"data-visually-hidden":"true"},this.selectedPrefix):null,this._selectedLabels):null,"tag"===this.selectedType?s("div",null,null===(a=this._selectedOptions)||void 0===a?void 0:a.map((i=>s("db-tag",{emphasis:"strong",behavior:"removable",removeButton:this.getTagRemoveLabel(i),onRemove:t=>this.handleTagRemove(i,t),key:void 0},this.getOptionLabel(i))))):null),s("db-custom-select-dropdown",{width:this.dropdownWidth},this.searchEnabled?s("div",null,s("db-input",{type:"search",ref:i=>{this.searchInputRef=i},name:this._id,form:this._id,showLabel:!1,value:this._searchValue,label:null!==(d=this.searchLabel)&&void 0!==d?d:o,placeholder:null!==(n=this.searchPlaceholder)&&void 0!==n?n:this.searchLabel,ariaDescribedBy:this._hasNoOptions||this.showLoading?this._infoTextId:void 0,onInput:i=>this.handleSearch(i)})):null,this._hasNoOptions||this.showLoading?s("db-infotext",{id:this._infoTextId,icon:this.showLoading?"circular_arrows":void 0,semantic:this.showLoading?"informational":"warning"},null!==(c=this.showLoading?this.loadingText:this.noResultsText)&&void 0!==c?c:b):s(h,null,this.selectAllEnabled?s("div",null,s("div",{class:"db-checkbox db-custom-select-list-item"},s("label",null,s("input",{type:"checkbox",value:"select-all",ref:i=>{this.selectAllRef=i},form:this._id,checked:this.selectAllChecked,onChange:i=>this.handleSelectAll(i)}),this.getSelectAllLabel()))):null,s("db-custom-select-list",{multiple:A(this.multiple,"multiple"),label:null!==(r=null!==(v=this.listLabel)&&void 0!==v?v:this.label)&&void 0!==r?r:o},null===(u=this._options)||void 0===u?void 0:u.map((i=>s("db-custom-select-list-item",{type:this.multiple?"checkbox":"radio",showDivider:i.showDivider,icon:i.icon,isGroupTitle:i.isGroupTitle,groupTitle:this.getOptionLabel(i),name:this._id,checked:this.getOptionChecked(i.value),disabled:i.disabled,value:i.value,onChange:()=>this.handleSelect(i.value),key:void 0},i.isGroupTitle?null:this.getOptionLabel(i)))))),s("div",null,s("db-button",{variant:"ghost",width:"full",icon:"cross",size:"small",name:this._id,form:this._id,onClick:()=>this.handleClose(void 0,!0)},null!==(w=this.mobileCloseButtonText)&&void 0!==w?w:m)))):null),(null===(p=this.showClearSelection)||void 0===p||p)&&(null===(y=this._values)||void 0===y?void 0:y.length)?s("db-button",{icon:"cross",variant:"ghost",size:"small",noText:!0,name:this._id,form:this._id,disabled:A(this.disabled,"disabled"),onClick:i=>this.handleClearAll(i)},this.clearSelectionText,s("db-tooltip",{placement:"top"},this.clearSelectionText)):null,s("span",{key:"3210abcd9df6f8232346aa78def9e3bd078f35db",class:"db-custom-select-placeholder","aria-hidden":"true",id:this._placeholderId},null!==(k=this.placeholder)&&void 0!==k?k:this.label),g(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||f):null,s("db-infotext",{key:"a552df2b93f899230e80623e2014691e411c3b40",size:"small",semantic:"critical",id:this._invalidMessageId},this._invalidMessage),s("span",{key:"b29045acf1f702b90b434dc4aa9d589c0c6c57f5","data-visually-hidden":"true",role:"status"},this._voiceOverFallback))}get rootElement(){return e(this)}static get watchers(){return{id:[{watch0:0}],"propOverrides?.id":[{watch0:0}],detailsRef:[{watch1:0},{watch3:0}],_id:[{watch2:0}],_descByIds:[{watch3:0}],showNoResults:[{watch4:0}],showLoading:[{watch4:0}],_options:[{watch4:0}],showSelectAll:[{watch5:0}],amountOptions:[{watch5:0},{watch6:0},{watch11:0}],multiple:[{watch5:0}],showSearch:[{watch6:0}],values:[{watch7:0}],_values:[{watch8:0},{watch11:0},{watch14:0}],selectRef:[{watch8:0},{watch9:0},{watch18:0}],validation:[{watch10:0}],options:[{watch12:0},{watch14:0}],searchValue:[{watch13:0}],_selectedOptions:[{watch15:0},{watch16:0}],selectedType:[{watch15:0}],amountText:[{watch15:0}],selectedLabels:[{watch15:0}],transformSelectedLabels:[{watch15:0}],selectAllIndeterminate:[{watch17:0}],selectAllRef:[{watch17:0}],invalidMessage:[{watch18:0}]}}};export{T as db_custom_select}
1
+ import{r as i,c as t,h as s,F as h,g as e}from"./p-BlbKvvUv.js";import{l,a as o,m as a,f as d,g as n,h as c,e as v,d as r,i as u,o as w,k as f,c as b,s as m}from"./p-BdL-nI5y.js";import{h as p,d as y,s as g,m as k,u as F,e as A,g as x,l as D,c as C}from"./p-BiyJ0WOE.js";import{D as O}from"./p-B-HK8lhm.js";import{D as S}from"./p-Z7eYHp_l.js";import{a as B}from"./p-C0q9XJSc.js";import{b as L}from"./p-BXROp_k8.js";const T=class{constructor(s){i(this,s),this.amountChange=t(this,"amountChange"),this.dropdownToggle=t(this,"dropdownToggle"),this.optionSelected=t(this,"optionSelected"),this.search=t(this,"search"),this.showClearSelection=!0,this.clearSelectionText="Clear selection",this._id=void 0,this._messageId=void 0,this._validMessageId=void 0,this._invalidMessageId=void 0,this._invalidMessage=void 0,this._selectId=void 0,this._labelId=void 0,this._summaryId=void 0,this._placeholderId=void 0,this._infoTextId=void 0,this._validity="no-validation",this._userInteraction=!1,this.abortController=void 0,this._descByIds=void 0,this._selectedLabels="",this._selectedLabelsId=void 0,this._voiceOverFallback="",this._selectedOptions=[],this.selectAllEnabled=!1,this.searchEnabled=!1,this.amountOptions=0,this._values=[],this._options=[],this._hasNoOptions=!1,this._documentClickListenerCallbackId=void 0,this._internalChangeTimestamp=0,this._documentScrollListenerCallbackId=void 0,this._observer=void 0,this._searchValue=void 0,this.selectAllChecked=!1,this.selectAllIndeterminate=!1,this.observer=void 0,this.satisfyReact=function(i){i.stopPropagation()}}handleDocumentScroll(i){var t,s;(null===(t=null==i?void 0:i.target)||void 0===t?void 0:t.contains)&&(null===(s=null==i?void 0:i.target)||void 0===s?void 0:s.contains(this.detailsRef))&&this.handleAutoPlacement()}hasValidState(){var i;return!!(null!==(i=this.validMessage)&&void 0!==i?i:"valid"===this.validation)}handleValidation(){var i,t,s,h,e,o,a,d;this.selectRef&&(this.selectRef.value=this.getNativeSelectValue()),(null===(i=this.selectRef)||void 0===i?void 0:i.validity.valid)&&"invalid"!==this.validation?this.hasValidState()&&(null===(h=this.selectRef)||void 0===h?void 0:h.validity.valid)&&this.required?(this.setDescById(this._validMessageId),p()&&(this._voiceOverFallback=null!==(e=this.validMessage)&&void 0!==e?e:f,y((()=>this._voiceOverFallback=""),1e3)),this._validity=null!==(o=this.validation)&&void 0!==o?o:"valid"):g(this.message,this.showMessage)?(this.setDescById(this._messageId),this._validity=null!==(a=this.validation)&&void 0!==a?a:"no-validation"):(this.setDescById(this._placeholderId),this._validity=null!==(d=this.validation)&&void 0!==d?d:"no-validation"):(this.setDescById(this._invalidMessageId),this._invalidMessage=this.invalidMessage||(null===(t=this.selectRef)||void 0===t?void 0:t.validationMessage)||l,p()&&(this._voiceOverFallback=this._invalidMessage,y((()=>this._voiceOverFallback=""),1e3)),this._userInteraction&&(this._validity=null!==(s=this.validation)&&void 0!==s?s:"invalid"))}handleDropdownToggle(i){var t,s;this.dropdownToggle&&(i.stopPropagation(),this.dropdownToggle.emit(i)),i.target instanceof HTMLDetailsElement&&i.target.open?(this._documentClickListenerCallbackId=(new O).addCallback((i=>this.handleDocumentClose(i))),this._documentScrollListenerCallbackId=(new S).addCallback((i=>this.handleDocumentScroll(i))),this.handleAutoPlacement(),null===(t=this._observer)||void 0===t||t.observe(this.detailsRef),i.target.dataset.test||this.handleOpenByKeyboardFocus()):(this._documentClickListenerCallbackId&&(new O).removeCallback(this._documentClickListenerCallbackId),this._documentScrollListenerCallbackId&&(new S).removeCallback(this._documentScrollListenerCallbackId),null===(s=this._observer)||void 0===s||s.unobserve(this.detailsRef))}getNativeSelectValue(){var i,t;return(null===(i=this._values)||void 0===i?void 0:i.length)&&null!==(t=this._values.at(0))&&void 0!==t?t:""}setDescById(i){var t;const s=[];i&&s.push(i),this._selectedLabelsId&&(null===(t=this._selectedLabels)||void 0===t?void 0:t.length)&&s.push(this._selectedLabelsId),this._descByIds=s.join(" ")}getSelectAllLabel(){var i;return null!==(i=this.selectAllLabel)&&void 0!==i?i:o}getOptionLabel(i){var t,s,h;return null!==(h=null!==(t=i.label)&&void 0!==t?t:null===(s=i.value)||void 0===s?void 0:s.toString())&&void 0!==h?h:""}getOptionChecked(i){var t,s;return!(!i||!(null===(t=this._values)||void 0===t?void 0:t.includes))&&(null===(s=this._values)||void 0===s?void 0:s.includes(i))}getTagRemoveLabel(i){const t=this.removeTagsTexts,s=this.options;if(t&&s){const h=s.findIndex((t=>t.value===i.value));if(h>=0&&h<t.length)return t[h]}return`${a} ${this.getOptionLabel(i)}`}handleTagRemove(i,t){t&&t.stopPropagation(),this.handleSelect(i.value),this.handleSummaryFocus()}handleAutoPlacement(){if(this.detailsRef){const i=this.detailsRef.querySelector("article");i&&y((()=>{var t;B(i,this.detailsRef,null!==(t=this.placement)&&void 0!==t?t:"bottom")}),1)}}handleArrowDownUp(i){var t,s,h;if(null===(t=this.detailsRef)||void 0===t?void 0:t.open){if(self.document){const t=self.document.activeElement;if(t)if("checkbox"===t.getAttribute("type")||"radio"===t.getAttribute("type")){const e=null==t?void 0:t.closest("li");if("ArrowDown"===i.key||"ArrowRight"===i.key){let i=null==e?void 0:e.nextElementSibling;for(;i;){const t=i.querySelector("input");if(t){t.focus();break}i=i.nextElementSibling}i||this.handleFocusFirstDropdownCheckbox(t)}else{let i=null==e?void 0:e.previousElementSibling;for(;i;){const t=i.querySelector("input");if(t){t.focus();break}i=i.previousElementSibling}if(!i){const i=this.detailsRef.querySelector('input[type="checkbox"]');if(i&&i!==t)this.handleFocusFirstDropdownCheckbox(t);else{const i=k(this.detailsRef);if(i)y((()=>{i.focus()}),100);else{const i=Array.from(null===(s=this.detailsRef)||void 0===s?void 0:s.querySelectorAll('input[type="checkbox"],input[type="radio"]'));i.length&&(null===(h=i.at(-1))||void 0===h||h.focus())}}}}}else"search"!==t.getAttribute("type")||"ArrowUp"!==i.key&&"ArrowLeft"!==i.key?this.handleFocusFirstDropdownCheckbox(t):(this.handleClose(void 0,!0),this.handleSummaryFocus())}}else"ArrowDown"!==i.key&&"ArrowRight"!==i.key||(this.handleAutoPlacement(),this.detailsRef&&(this.detailsRef.open=!0),this.handleOpenByKeyboardFocus());i.stopPropagation(),i.preventDefault()}handleKeyboardPress(i){var t,s,h;if(i.stopPropagation(),"Escape"===i.key&&(null===(t=this.detailsRef)||void 0===t?void 0:t.open))this.handleClose(void 0,!0),this.handleSummaryFocus();else if("Enter"===i.key&&(null===(s=this.detailsRef)||void 0===s?void 0:s.open)){if(self.document){const t=self.document.activeElement;if(["checkbox","radio"].includes(t.getAttribute("type")||""))t.click(),i.preventDefault();else if("search"===t.getAttribute("type")){const t=null===(h=this._options)||void 0===h?void 0:h.find((i=>!i.isGroupTitle&&!i.disabled));(null==t?void 0:t.value)&&(this.handleSelect(t.value),i.preventDefault())}}}else"ArrowDown"!==i.key&&"ArrowUp"!==i.key&&"ArrowLeft"!==i.key&&"ArrowRight"!==i.key||this.handleArrowDownUp(i)}handleClose(i,t){if(this.detailsRef)if(t)this.detailsRef.open=!1,this.handleSummaryFocus();else if(this.detailsRef.open&&i&&i.relatedTarget){const t=i.relatedTarget;this.detailsRef.contains(t)||"dialog"===t.localName||y((()=>this.detailsRef.open=!1),1)}}handleDocumentClose(i){var t,s;if(i){const h="number"==typeof i.detail?i.target:null===(t=i.detail)||void 0===t?void 0:t.target;(null===(s=this.detailsRef)||void 0===s?void 0:s.open)&&!this.detailsRef.contains(h)&&(this.detailsRef.open=!1)}}handleOptionSelected(i){(new Date).getTime()-this._internalChangeTimestamp<200||(this._values=i,this._userInteraction=!0,this.optionSelected&&this.optionSelected.emit(null!=i?i:[]),this._internalChangeTimestamp=(new Date).getTime())}handleSelect(i){var t;i&&(this.multiple?(null===(t=this._values)||void 0===t?void 0:t.includes(i))?this.handleOptionSelected(this._values.filter((t=>t!==i))):this.handleOptionSelected([...this._values||[],i]):(this.handleOptionSelected([i]),this.handleClose(void 0,!0)))}handleSelectAll(i){var t;if(i.stopPropagation(),(null===(t=this._values)||void 0===t?void 0:t.length)===this.amountOptions)this.handleOptionSelected([]);else{const i=this.searchEnabled&&this.searchInputRef?this.searchInputRef.value:void 0;this.handleOptionSelected(this.options?this.options.filter((t=>{var s;return!t.isGroupTitle&&(!i||(null===(s=t.value)||void 0===s?void 0:s.toLowerCase().includes(i.toLowerCase())))})).map((i=>{var t;return null!==(t=i.value)&&void 0!==t?t:""})):[])}}handleFocusFirstDropdownCheckbox(i){if(this.detailsRef){const t=Array.from(this.detailsRef.querySelectorAll('input[type="checkbox"],input[type="radio"]'));if(t.length){const s=t.at(0),h=s===i&&t.length>1?t.at(1):s;h&&y((()=>{h.focus()}),1)}}}handleOpenByKeyboardFocus(){if(this.detailsRef){const i=k(this.detailsRef);i?y((()=>{i.focus()}),1):this.handleFocusFirstDropdownCheckbox()}}handleSearch(i){var t;if(void 0===i)return;let s;if("string"==typeof i)s=i;else{const t=i;t.stopPropagation(),this.search&&this.search.emit(t),s=t.target.value,this._searchValue=s}this._options=this.options&&s&&0!==s.length?this.options.filter(this.searchFilter?i=>this.searchFilter(i,s):i=>!i.isGroupTitle&&this.getOptionLabel(i).toLowerCase().includes(s.toLowerCase())):this.options,(null===(t=this.detailsRef)||void 0===t?void 0:t.open)&&this.handleAutoPlacement()}handleClearAll(i){i.stopPropagation(),this.handleOptionSelected([]),this.handleSummaryFocus()}handleSummaryFocus(){var i;this.detailsRef&&(null===(i=this.detailsRef.querySelector("summary"))||void 0===i||i.focus())}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:`custom-select-${F()}`;this._id=h,this._messageId=h+d,this._validMessageId=h+n,this._invalidMessageId=h+c,this._selectId=h+v,this._labelId=h+r,this._summaryId=h+"-summary",this._placeholderId=h+u,this._selectedLabelsId=h+"-selected-labels",this._infoTextId=h+"-info"}setupObserver(i){if(!i)return;const t=i.closest("db-custom-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-custom-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(),l=i.getAttribute("class");i.setAttribute(e.name,`${l||""}${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(){this.detailsRef&&this.detailsRef.addEventListener("focusout",(i=>this.handleClose(i)))}watch1(){this.watch1Fn()}watch2Fn(){if(this._id){const i=this._id+d;this._labelId=this._id+r,this._selectId=this._id+v,this._validMessageId=this._id+n,this._invalidMessageId=this._id+c,this._placeholderId=this._id+u,g(this.message,this.showMessage)?this.setDescById(i):this.setDescById()}}watch2(){this.watch2Fn()}watch3Fn(){var i;if(this.detailsRef){const t=this.detailsRef.querySelector("summary");t&&t.setAttribute("aria-describedby",null!==(i=this.ariaDescribedBy)&&void 0!==i?i:this._descByIds||"")}}watch3(){this.watch3Fn()}watch4Fn(){void 0!==this.showNoResults?this._hasNoOptions=this.showNoResults:this._options&&(this._hasNoOptions=0===this._options.length)}watch4(){this.watch4Fn()}watch5Fn(){var i;this.selectAllEnabled=Boolean(this.multiple&&(null!==(i=this.showSelectAll)&&void 0!==i?i:this.amountOptions>5))}watch5(){this.watch5Fn()}watch6Fn(){var i;this.searchEnabled=null!==(i=this.showSearch)&&void 0!==i?i:this.amountOptions>9}watch6(){this.watch6Fn()}watch7Fn(){var i;const t=this.values;Array.isArray(t)?this._values!==t&&(this._values=t):null==t&&0!==(null===(i=this._values)||void 0===i?void 0:i.length)&&(this._values=[])}watch7(){this.watch7Fn()}watch8Fn(){this.selectRef&&this.handleValidation()}watch8(){this.watch8Fn()}watch9Fn(){if(this.selectRef){let i=this.abortController;i||(i=new AbortController,this.abortController=i);const t=this.values;L(this.selectRef,(()=>{this.handleOptionSelected(t||(this.selectRef.value?[this.selectRef.value]:[])),this.handleValidation()}),i.signal)}}watch9(){this.watch9Fn()}watch10Fn(){this._validity=this.validation}watch10(){this.watch10Fn()}watch11Fn(){var i,t;0===(null===(i=this._values)||void 0===i?void 0:i.length)?(this.selectAllChecked=!1,this.selectAllIndeterminate=!1):(null===(t=this._values)||void 0===t?void 0:t.length)===this.amountOptions?(this.selectAllIndeterminate=!1,this.selectAllChecked=!0):this._values&&(this.selectAllIndeterminate=!0)}watch11(){this.watch11Fn()}watch12Fn(){var i,t,s;this._options=this.options,this.amountOptions=null!==(t=null===(i=this.options)||void 0===i?void 0:i.filter((i=>!i.isGroupTitle)).length)&&void 0!==t?t:0,(null===(s=this.detailsRef)||void 0===s?void 0:s.open)&&this.handleAutoPlacement()}watch12(){this.watch12Fn()}watch13Fn(){this._searchValue=this.searchValue,this.searchValue&&this.handleSearch(this.searchValue)}watch13(){this.watch13Fn()}watch14Fn(){var i,t;(null===(i=this.options)||void 0===i?void 0:i.length)&&(this._selectedOptions=null===(t=this.options)||void 0===t?void 0:t.filter((i=>{var t,s;return!(!i.value||!(null===(t=this._values)||void 0===t?void 0:t.includes))&&!i.isGroupTitle&&(null===(s=this._values)||void 0===s?void 0:s.includes(i.value))})))}watch14(){this.watch14Fn()}watch15Fn(){var i,t,s;if(this.selectedLabels)this._selectedLabels=this.selectedLabels;else if(null===(i=this._selectedOptions)||void 0===i?void 0:i.length){if(this.transformSelectedLabels)return void(this._selectedLabels=(0,this.transformSelectedLabels)(this._selectedOptions));this._selectedLabels="amount"===this.selectedType?this.amountText?this.amountText:`${null===(t=this._selectedOptions)||void 0===t?void 0:t.length} ${w}`:null===(s=this._selectedOptions)||void 0===s?void 0:s.map((i=>this.getOptionLabel(i))).join(", ")}else this._selectedLabels=""}watch15(){this.watch15Fn()}watch16Fn(){var i,t;this.amountChange&&this.amountChange.emit(null!==(t=null===(i=this._selectedOptions)||void 0===i?void 0:i.length)&&void 0!==t?t:0)}watch16(){this.watch16Fn()}watch17Fn(){this.selectAllRef&&(this.selectAllRef.indeterminate=Boolean(this.selectAllIndeterminate))}watch17(){this.watch17Fn()}watch18Fn(){var i;this._invalidMessage=this.invalidMessage||(null===(i=this.selectRef)||void 0===i?void 0:i.validationMessage)||l}watch18(){this.watch18Fn()}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-custom-select"),(()=>{this.resetIds(),this._invalidMessage=this.invalidMessage||l,"undefined"!=typeof window&&"IntersectionObserver"in window&&(this._observer=new IntersectionObserver((i=>{if(this.detailsRef){const t=i.find((({target:i})=>i===this.detailsRef));t&&!t.isIntersecting&&this.detailsRef.open&&(this.detailsRef.open=!1)}})))})(),(()=>{this.setupObserver(this._ref)})(),this.watch0Fn(),this.watch1Fn(),this.watch2Fn(),this.watch3Fn(),this.watch4Fn(),this.watch5Fn(),this.watch6Fn(),this.watch7Fn(),this.watch8Fn(),this.watch9Fn(),this.watch10Fn(),this.watch11Fn(),this.watch12Fn(),this.watch13Fn(),this.watch14Fn(),this.watch15Fn(),this.watch16Fn(),this.watch17Fn(),this.watch18Fn()}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,l,a,d,n,c,v,r,u,w,p,y,k;return s("div",{key:"9f804bd057ef9cde5cc83263e5b1e3a477ad5d2e",class:C("db-custom-select",this.className),id:this._id,ref:i=>{this._ref=i},"aria-invalid":"invalid"===this._validity,"data-custom-validity":this._validity,"data-width":this.formFieldWidth,"data-variant":"floating"===this.variant&&"tag"===this.selectedType&&this.multiple?"above":this.variant,"data-required":x(this.required,"required"),"data-hide-asterisk":D(this.showRequiredAsterisk),"data-placement":this.placement,"data-selected-type":this.multiple?this.selectedType:"text","data-hide-label":D(this.showLabel),"data-icon":this.icon,"data-show-icon":x(this.showIcon,"showIcon")},s("label",{key:"1ce826237b63c3abfad8b55068c25fdc4acc2d7a",id:this._labelId},null!==(i=this.label)&&void 0!==i?i:o,s("select",{key:"9f16da6b3d9e633e4ce70e8654925df86a901074",role:"none",hidden:!0,id:this._selectId,tabIndex:-1,ref:i=>{this.selectRef=i},form:this.form,name:this.name,"data-custom-validity":this._validity,multiple:A(this.multiple,"multiple"),disabled:A(this.disabled,"disabled"),required:A(this.required,"required"),onChange:i=>this.satisfyReact(i)},(null===(t=this.options)||void 0===t?void 0:t.length)?null===(e=this.options)||void 0===e?void 0:e.map((i=>s("option",{disabled:i.disabled,value:i.value,key:void 0},this.getOptionLabel(i)))):null)),s("details",{key:"6a88c236898236ee539bced6fa3b3918be8f693d",ref:i=>{this.detailsRef=i},open:this.open,onToggle:i=>this.handleDropdownToggle(i),onKeyDown:i=>this.handleKeyboardPress(i)},s("slot",{key:"c9dd3e30dd094da51de1b2064749a211fef6eb36"}),this.options?s(h,null,s("summary",{class:"db-custom-select-form-field",id:this._summaryId,"aria-disabled":x(this.disabled,"disabled"),tabIndex:this.disabled?-1:void 0,"aria-labelledby":this._labelId},(null===(l=this._selectedLabels)||void 0===l?void 0:l.length)?s("span",{"data-visually-hidden":x("tag"===this.selectedType,"selectedType"),id:this._selectedLabelsId},this.selectedPrefix?s("span",{"data-visually-hidden":"true"},this.selectedPrefix):null,this._selectedLabels):null,"tag"===this.selectedType?s("div",null,null===(a=this._selectedOptions)||void 0===a?void 0:a.map((i=>s("db-tag",{emphasis:"strong",behavior:"removable",removeButton:this.getTagRemoveLabel(i),onRemove:t=>this.handleTagRemove(i,t),key:void 0},this.getOptionLabel(i))))):null),s("db-custom-select-dropdown",{width:this.dropdownWidth},this.searchEnabled?s("div",null,s("db-input",{type:"search",ref:i=>{this.searchInputRef=i},name:this._id,form:this._id,showLabel:!1,value:this._searchValue,label:null!==(d=this.searchLabel)&&void 0!==d?d:o,placeholder:null!==(n=this.searchPlaceholder)&&void 0!==n?n:this.searchLabel,ariaDescribedBy:this._hasNoOptions||this.showLoading?this._infoTextId:void 0,onInput:i=>this.handleSearch(i)})):null,this._hasNoOptions||this.showLoading?s("db-infotext",{id:this._infoTextId,icon:this.showLoading?"circular_arrows":void 0,semantic:this.showLoading?"informational":"warning"},null!==(c=this.showLoading?this.loadingText:this.noResultsText)&&void 0!==c?c:b):s(h,null,this.selectAllEnabled?s("div",null,s("div",{class:"db-checkbox db-custom-select-list-item"},s("label",null,s("input",{type:"checkbox",value:"select-all",ref:i=>{this.selectAllRef=i},form:this._id,checked:this.selectAllChecked,onChange:i=>this.handleSelectAll(i)}),this.getSelectAllLabel()))):null,s("db-custom-select-list",{multiple:A(this.multiple,"multiple"),label:null!==(r=null!==(v=this.listLabel)&&void 0!==v?v:this.label)&&void 0!==r?r:o},null===(u=this._options)||void 0===u?void 0:u.map((i=>s("db-custom-select-list-item",{type:this.multiple?"checkbox":"radio",showDivider:i.showDivider,icon:i.icon,isGroupTitle:i.isGroupTitle,groupTitle:this.getOptionLabel(i),name:this._id,checked:this.getOptionChecked(i.value),disabled:i.disabled,value:i.value,onChange:()=>this.handleSelect(i.value),key:void 0},i.isGroupTitle?null:this.getOptionLabel(i)))))),s("div",null,s("db-button",{variant:"ghost",width:"full",icon:"cross",size:"small",name:this._id,form:this._id,onClick:()=>this.handleClose(void 0,!0)},null!==(w=this.mobileCloseButtonText)&&void 0!==w?w:m)))):null),(null===(p=this.showClearSelection)||void 0===p||p)&&(null===(y=this._values)||void 0===y?void 0:y.length)?s("db-button",{icon:"cross",variant:"ghost",size:"small",noText:!0,name:this._id,form:this._id,disabled:A(this.disabled,"disabled"),onClick:i=>this.handleClearAll(i)},this.clearSelectionText,s("db-tooltip",{placement:"top"},this.clearSelectionText)):null,s("span",{key:"3210abcd9df6f8232346aa78def9e3bd078f35db",class:"db-custom-select-placeholder","aria-hidden":"true",id:this._placeholderId},null!==(k=this.placeholder)&&void 0!==k?k:this.label),g(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||f):null,s("db-infotext",{key:"a552df2b93f899230e80623e2014691e411c3b40",size:"small",semantic:"critical",id:this._invalidMessageId},this._invalidMessage),s("span",{key:"b29045acf1f702b90b434dc4aa9d589c0c6c57f5","data-visually-hidden":"true",role:"status"},this._voiceOverFallback))}get rootElement(){return e(this)}static get watchers(){return{id:[{watch0:0}],"propOverrides?.id":[{watch0:0}],detailsRef:[{watch1:0},{watch3:0}],_id:[{watch2:0}],_descByIds:[{watch3:0}],showNoResults:[{watch4:0}],showLoading:[{watch4:0}],_options:[{watch4:0}],showSelectAll:[{watch5:0}],amountOptions:[{watch5:0},{watch6:0},{watch11:0}],multiple:[{watch5:0}],showSearch:[{watch6:0}],values:[{watch7:0}],_values:[{watch8:0},{watch11:0},{watch14:0}],selectRef:[{watch8:0},{watch9:0},{watch18:0}],validation:[{watch10:0}],options:[{watch12:0},{watch14:0}],searchValue:[{watch13:0}],_selectedOptions:[{watch15:0},{watch16:0}],selectedType:[{watch15:0}],amountText:[{watch15:0}],selectedLabels:[{watch15:0}],transformSelectedLabels:[{watch15:0}],selectAllIndeterminate:[{watch17:0}],selectAllRef:[{watch17:0}],invalidMessage:[{watch18:0}]}}};export{T as db_custom_select}
@@ -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 m,l as w,c as y}from"./p-fumiz06Y.js";import{c as g}from"./p-BihrW11j.js";const k=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),g(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{k 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-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 +1 @@
1
- import{r as t,c as i,h as s,g as h}from"./p-BlbKvvUv.js";import{l as a,f as e,g as d,h as c,k as l}from"./p-BdL-nI5y.js";import{h as o,d as n,s as r,u as v,e as u,l as f,c as b}from"./p-fumiz06Y.js";import{a as w}from"./p-BihrW11j.js";const m=class{constructor(s){t(this,s),this.change=i(this,"change"),this.blur=i(this,"blur"),this.focus=i(this,"focus"),this.initialized=!1,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 t;return!!(null!==(t=this.validMessage)&&void 0!==t?t:"valid"===this.validation)}handleValidation(){var t,i,s,h;(null===(t=this._ref)||void 0===t?void 0:t.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,o()&&(this._voiceOverFallback=null!==(h=this.validMessage)&&void 0!==h?h:l,n((()=>this._voiceOverFallback=""),1e3))):this._descByIds=r(this.message,this.showMessage)?this._messageId:void 0:(this._descByIds=this._invalidMessageId,this._invalidMessage=this.invalidMessage||(null===(i=this._ref)||void 0===i?void 0:i.validationMessage)||a,o()&&(this._voiceOverFallback=this._invalidMessage,n((()=>this._voiceOverFallback=""),1e3)))}handleChange(t,i){this.change&&this.change.emit(t),this.handleValidation()}handleBlur(t){this.blur&&this.blur.emit(t)}handleFocus(t){this.focus&&this.focus.emit(t)}resetIds(){var t,i,s;const h=null!==(s=null!==(t=this.id)&&void 0!==t?t:null===(i=this.propOverrides)||void 0===i?void 0:i.id)&&void 0!==s?s:`checkbox-${v()}`;this._id=h,this._messageId=h+e,this._validMessageId=h+d,this._invalidMessageId=h+c}setupObserver(t){if(!t)return;const i=t.closest("db-checkbox");i&&!this.observer&&(this.observer=new MutationObserver((i=>{i.some((t=>{var i;const s=t.target.attributes.getNamedItem(null!==(i=t.attributeName)&&void 0!==i?i:"");return(null==s?void 0:s.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-checkbox")})),this.observer.observe(i,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,i){const s=null==t?void 0:t.closest(i);if(t&&s){const i=s.attributes;for(let h=0;h<i.length;h++){const a=i.item(h);if(a&&"data-density"!==a.name&&(a.name.startsWith("data-")||a.name.startsWith("aria-")))a.value?t.setAttribute(a.name,a.value):t.removeAttribute(a.name),s.removeAttribute(a.name);else if(a&&["style"].includes(a.name))t.setAttribute(a.name,a.value),s.removeAttribute(a.name);else if(a&&"class"===a.name){const i=a.value.includes("hydrated"),h=a.value.replace("hydrated","").trim(),e=t.getAttribute("class");t.setAttribute(a.name,`${e||""}${h?` ${h}`:""}`),i?s.setAttribute("class","hydrated"):s.removeAttribute(a.name)}}}}watch0Fn(){var t,i;(null!==(t=this.id)&&void 0!==t?t:null===(i=this.propOverrides)||void 0===i?void 0:i.id)&&this.resetIds()}watch0(){this.watch0Fn()}watch1Fn(){var t;this._invalidMessage=this.invalidMessage||(null===(t=this._ref)||void 0===t?void 0:t.validationMessage)||a}watch1(){this.watch1Fn()}watch2Fn(){if(this._id){const t=this._id+e;this._messageId=t,this._validMessageId=this._id+d,this._invalidMessageId=this._id+c,r(this.message,this.showMessage)&&(this._descByIds=t),this.handleValidation()}}watch2(){this.watch2Fn()}watch3Fn(){this._ref&&void 0!==this.indeterminate&&(this._ref.indeterminate=!!u(this.indeterminate))}watch3(){this.watch3Fn()}watch4Fn(){this.initialized&&this._ref&&(null!=this.checked&&(this._ref.checked=!!u(this.checked)),this.initialized=!1)}watch4(){this.watch4Fn()}watch5Fn(){if(this._ref){const t=void 0;let i=this.abortController;i||(i=new AbortController,this.abortController=i),w(this._ref,{checked:this.checked,defaultChecked:t},(t=>{this.handleChange(t,!0)}),i.signal)}}watch5(){this.watch5Fn()}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-checkbox"),(()=>{this.initialized=!0,this.resetIds(),this._invalidMessage=this.invalidMessage||a})(),(()=>{this.setupObserver(this._ref)})(),this.watch0Fn(),this.watch1Fn(),this.watch2Fn(),this.watch3Fn(),this.watch4Fn(),this.watch5Fn()}disconnectedCallback(){var t,i;null===(t=this.abortController)||void 0===t||t.abort(),null===(i=this.observer)||void 0===i||i.disconnect()}render(){var t;return s("div",{key:"b386e9507944ca665310bd874fdee124af12f071",class:b("db-checkbox",this.className),"data-size":this.size,"data-hide-asterisk":f(this.showRequiredAsterisk),"data-hide-label":f(this.showLabel)},s("label",{key:"d6963dfdb59a00f027231babd6d985681c331b99",htmlFor:this._id},s("input",{key:"81848aef05a7288c4ae200f48be6f8614e68607f",type:"checkbox","aria-invalid":"invalid"===this.validation,"data-custom-validity":this.validation,ref:t=>{this._ref=t},id:this._id,name:this.name,checked:u(this.checked,"checked"),disabled:u(this.disabled,"disabled"),value:this.value,required:u(this.required,"required"),onChange:t=>this.handleChange(t),onBlur:t=>this.handleBlur(t),onFocus:t=>this.handleFocus(t),"aria-describedby":null!==(t=this.ariaDescribedBy)&&void 0!==t?t:this._descByIds}),this.label?this.label:null,s("slot",{key:"433ec6a708da3f342f8fc745ddefbdc9c15d8b9a"})),r(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||l):null,s("db-infotext",{key:"4295a01b6f8f0a9d78f337dac875f53c45ddefa6",size:"small",semantic:"critical",id:this._invalidMessageId},this._invalidMessage),s("span",{key:"85e87a85df4ca25e535cf0c890ba943f5cfa978b","data-visually-hidden":"true",role:"status"},this._voiceOverFallback))}get rootElement(){return h(this)}static get watchers(){return{id:[{watch0:0}],"propOverrides?.id":[{watch0:0}],_ref:[{watch1:0},{watch3:0},{watch4:0},{watch5:0}],invalidMessage:[{watch1:0}],_id:[{watch2:0}],initialized:[{watch3:0},{watch4:0}],indeterminate:[{watch3:0}],checked:[{watch4:0}]}}};export{m as db_checkbox}
1
+ import{r as t,c as i,h as s,g as h}from"./p-BlbKvvUv.js";import{l as a,f as e,g as d,h as c,k as l}from"./p-BdL-nI5y.js";import{h as o,d as n,s as r,u as v,e as u,l as f,c as b}from"./p-BiyJ0WOE.js";import{a as w}from"./p-BXROp_k8.js";const k=class{constructor(s){t(this,s),this.change=i(this,"change"),this.blur=i(this,"blur"),this.focus=i(this,"focus"),this.initialized=!1,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 t;return!!(null!==(t=this.validMessage)&&void 0!==t?t:"valid"===this.validation)}handleValidation(){var t,i,s,h;(null===(t=this._ref)||void 0===t?void 0:t.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,o()&&(this._voiceOverFallback=null!==(h=this.validMessage)&&void 0!==h?h:l,n((()=>this._voiceOverFallback=""),1e3))):this._descByIds=r(this.message,this.showMessage)?this._messageId:void 0:(this._descByIds=this._invalidMessageId,this._invalidMessage=this.invalidMessage||(null===(i=this._ref)||void 0===i?void 0:i.validationMessage)||a,o()&&(this._voiceOverFallback=this._invalidMessage,n((()=>this._voiceOverFallback=""),1e3)))}handleChange(t,i){this.change&&this.change.emit(t),this.handleValidation()}handleBlur(t){this.blur&&this.blur.emit(t)}handleFocus(t){this.focus&&this.focus.emit(t)}resetIds(){var t,i,s;const h=null!==(s=null!==(t=this.id)&&void 0!==t?t:null===(i=this.propOverrides)||void 0===i?void 0:i.id)&&void 0!==s?s:`checkbox-${v()}`;this._id=h,this._messageId=h+e,this._validMessageId=h+d,this._invalidMessageId=h+c}setupObserver(t){if(!t)return;const i=t.closest("db-checkbox");i&&!this.observer&&(this.observer=new MutationObserver((i=>{i.some((t=>{var i;const s=t.target.attributes.getNamedItem(null!==(i=t.attributeName)&&void 0!==i?i:"");return(null==s?void 0:s.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-checkbox")})),this.observer.observe(i,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,i){const s=null==t?void 0:t.closest(i);if(t&&s){const i=s.attributes;for(let h=0;h<i.length;h++){const a=i.item(h);if(a&&"data-density"!==a.name&&(a.name.startsWith("data-")||a.name.startsWith("aria-")))a.value?t.setAttribute(a.name,a.value):t.removeAttribute(a.name),s.removeAttribute(a.name);else if(a&&["style"].includes(a.name))t.setAttribute(a.name,a.value),s.removeAttribute(a.name);else if(a&&"class"===a.name){const i=a.value.includes("hydrated"),h=a.value.replace("hydrated","").trim(),e=t.getAttribute("class");t.setAttribute(a.name,`${e||""}${h?` ${h}`:""}`),i?s.setAttribute("class","hydrated"):s.removeAttribute(a.name)}}}}watch0Fn(){var t,i;(null!==(t=this.id)&&void 0!==t?t:null===(i=this.propOverrides)||void 0===i?void 0:i.id)&&this.resetIds()}watch0(){this.watch0Fn()}watch1Fn(){var t;this._invalidMessage=this.invalidMessage||(null===(t=this._ref)||void 0===t?void 0:t.validationMessage)||a}watch1(){this.watch1Fn()}watch2Fn(){if(this._id){const t=this._id+e;this._messageId=t,this._validMessageId=this._id+d,this._invalidMessageId=this._id+c,r(this.message,this.showMessage)&&(this._descByIds=t),this.handleValidation()}}watch2(){this.watch2Fn()}watch3Fn(){this._ref&&void 0!==this.indeterminate&&(this._ref.indeterminate=!!u(this.indeterminate))}watch3(){this.watch3Fn()}watch4Fn(){this.initialized&&this._ref&&(null!=this.checked&&(this._ref.checked=!!u(this.checked)),this.initialized=!1)}watch4(){this.watch4Fn()}watch5Fn(){if(this._ref){const t=void 0;let i=this.abortController;i||(i=new AbortController,this.abortController=i),w(this._ref,{checked:this.checked,defaultChecked:t},(t=>{this.handleChange(t,!0)}),i.signal)}}watch5(){this.watch5Fn()}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-checkbox"),(()=>{this.initialized=!0,this.resetIds(),this._invalidMessage=this.invalidMessage||a})(),(()=>{this.setupObserver(this._ref)})(),this.watch0Fn(),this.watch1Fn(),this.watch2Fn(),this.watch3Fn(),this.watch4Fn(),this.watch5Fn()}disconnectedCallback(){var t,i;null===(t=this.abortController)||void 0===t||t.abort(),null===(i=this.observer)||void 0===i||i.disconnect()}render(){var t;return s("div",{key:"b386e9507944ca665310bd874fdee124af12f071",class:b("db-checkbox",this.className),"data-size":this.size,"data-hide-asterisk":f(this.showRequiredAsterisk),"data-hide-label":f(this.showLabel)},s("label",{key:"d6963dfdb59a00f027231babd6d985681c331b99",htmlFor:this._id},s("input",{key:"81848aef05a7288c4ae200f48be6f8614e68607f",type:"checkbox","aria-invalid":"invalid"===this.validation,"data-custom-validity":this.validation,ref:t=>{this._ref=t},id:this._id,name:this.name,checked:u(this.checked,"checked"),disabled:u(this.disabled,"disabled"),value:this.value,required:u(this.required,"required"),onChange:t=>this.handleChange(t),onBlur:t=>this.handleBlur(t),onFocus:t=>this.handleFocus(t),"aria-describedby":null!==(t=this.ariaDescribedBy)&&void 0!==t?t:this._descByIds}),this.label?this.label:null,s("slot",{key:"433ec6a708da3f342f8fc745ddefbdc9c15d8b9a"})),r(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||l):null,s("db-infotext",{key:"4295a01b6f8f0a9d78f337dac875f53c45ddefa6",size:"small",semantic:"critical",id:this._invalidMessageId},this._invalidMessage),s("span",{key:"85e87a85df4ca25e535cf0c890ba943f5cfa978b","data-visually-hidden":"true",role:"status"},this._voiceOverFallback))}get rootElement(){return h(this)}static get watchers(){return{id:[{watch0:0}],"propOverrides?.id":[{watch0:0}],_ref:[{watch1:0},{watch3:0},{watch4:0},{watch5:0}],invalidMessage:[{watch1:0}],_id:[{watch2:0}],initialized:[{watch3:0},{watch4:0}],indeterminate:[{watch3:0}],checked:[{watch4:0}]}}};export{k as db_checkbox}
@@ -1 +1 @@
1
- import{r as t,h as i,g as s}from"./p-BlbKvvUv.js";import{c as e}from"./p-fumiz06Y.js";const a=class{constructor(i){t(this,i),this.observer=void 0}setupObserver(t){if(!t)return;const i=t.closest("db-navigation");i&&!this.observer&&(this.observer=new MutationObserver((i=>{i.some((t=>{var i;const s=t.target.attributes.getNamedItem(null!==(i=t.attributeName)&&void 0!==i?i:"");return(null==s?void 0:s.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-navigation")})),this.observer.observe(i,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,i){const s=null==t?void 0:t.closest(i);if(t&&s){const i=s.attributes;for(let e=0;e<i.length;e++){const a=i.item(e);if(a&&"data-density"!==a.name&&(a.name.startsWith("data-")||a.name.startsWith("aria-")))a.value?t.setAttribute(a.name,a.value):t.removeAttribute(a.name),s.removeAttribute(a.name);else if(a&&["style"].includes(a.name))t.setAttribute(a.name,a.value),s.removeAttribute(a.name);else if(a&&"class"===a.name){const i=a.value.includes("hydrated"),e=a.value.replace("hydrated","").trim(),n=t.getAttribute("class");t.setAttribute(a.name,`${n||""}${e?` ${e}`:""}`),i?s.setAttribute("class","hydrated"):s.removeAttribute(a.name)}}}}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-navigation"),this.setupObserver(this._ref)}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect()}render(){var t,s;return i("nav",{key:"e9dbd8ab905cbb2dd887dfe21fc96afea70b9f70",class:e("db-navigation",this.className),ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(s=this.propOverrides)||void 0===s?void 0:s.id},i("menu",{key:"421231c4fabc97119732586bf221c07ebc914a19"},i("slot",{key:"f015b010c2d2e09570ead913a90d14160eed857c"})))}get rootElement(){return s(this)}};export{a as db_navigation}
1
+ import{r as t,h as i,g as s}from"./p-BlbKvvUv.js";import{c as e}from"./p-BiyJ0WOE.js";const a=class{constructor(i){t(this,i),this.observer=void 0}setupObserver(t){if(!t)return;const i=t.closest("db-navigation");i&&!this.observer&&(this.observer=new MutationObserver((i=>{i.some((t=>{var i;const s=t.target.attributes.getNamedItem(null!==(i=t.attributeName)&&void 0!==i?i:"");return(null==s?void 0:s.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-navigation")})),this.observer.observe(i,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,i){const s=null==t?void 0:t.closest(i);if(t&&s){const i=s.attributes;for(let e=0;e<i.length;e++){const a=i.item(e);if(a&&"data-density"!==a.name&&(a.name.startsWith("data-")||a.name.startsWith("aria-")))a.value?t.setAttribute(a.name,a.value):t.removeAttribute(a.name),s.removeAttribute(a.name);else if(a&&["style"].includes(a.name))t.setAttribute(a.name,a.value),s.removeAttribute(a.name);else if(a&&"class"===a.name){const i=a.value.includes("hydrated"),e=a.value.replace("hydrated","").trim(),n=t.getAttribute("class");t.setAttribute(a.name,`${n||""}${e?` ${e}`:""}`),i?s.setAttribute("class","hydrated"):s.removeAttribute(a.name)}}}}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-navigation"),this.setupObserver(this._ref)}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect()}render(){var t,s;return i("nav",{key:"e9dbd8ab905cbb2dd887dfe21fc96afea70b9f70",class:e("db-navigation",this.className),ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(s=this.propOverrides)||void 0===s?void 0:s.id},i("menu",{key:"421231c4fabc97119732586bf221c07ebc914a19"},i("slot",{key:"f015b010c2d2e09570ead913a90d14160eed857c"})))}get rootElement(){return s(this)}};export{a as db_navigation}
@@ -1 +1 @@
1
- import{r as t,h as s,g as i}from"./p-BlbKvvUv.js";import{q as n}from"./p-BdL-nI5y.js";import{g as a,c as e}from"./p-fumiz06Y.js";const d=class{constructor(s){t(this,s),this.observer=void 0}setupObserver(t){if(!t)return;const s=t.closest("db-brand");s&&!this.observer&&(this.observer=new MutationObserver((s=>{s.some((t=>{var s;const i=t.target.attributes.getNamedItem(null!==(s=t.attributeName)&&void 0!==s?s:"");return(null==i?void 0:i.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-brand")})),this.observer.observe(s,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,s){const i=null==t?void 0:t.closest(s);if(t&&i){const s=i.attributes;for(let n=0;n<s.length;n++){const a=s.item(n);if(a&&"data-density"!==a.name&&(a.name.startsWith("data-")||a.name.startsWith("aria-")))a.value?t.setAttribute(a.name,a.value):t.removeAttribute(a.name),i.removeAttribute(a.name);else if(a&&["style"].includes(a.name))t.setAttribute(a.name,a.value),i.removeAttribute(a.name);else if(a&&"class"===a.name){const s=a.value.includes("hydrated"),n=a.value.replace("hydrated","").trim(),e=t.getAttribute("class");t.setAttribute(a.name,`${e||""}${n?` ${n}`:""}`),s?i.setAttribute("class","hydrated"):i.removeAttribute(a.name)}}}}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-brand"),this.setupObserver(this._ref)}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect()}render(){var t,i,d;return s("div",{key:"eb7ad13ac7dc2b56c0611996975b6f140cb837c8",class:e("db-brand",this.className),ref:t=>{this._ref=t},"data-icon":this.hideLogo?"none":null!==(t=this.icon)&&void 0!==t?t:n,"data-show-icon":a(this.showIcon,"showIcon"),id:null!==(i=this.id)&&void 0!==i?i:null===(d=this.propOverrides)||void 0===d?void 0:d.id},s("slot",{key:"21a1bf9ea2f921c6a38e24062890c7f674213605"}),this.text?this.text:null)}get rootElement(){return i(this)}};export{d as db_brand}
1
+ import{r as t,h as s,g as i}from"./p-BlbKvvUv.js";import{q as n}from"./p-BdL-nI5y.js";import{g as a,c as e}from"./p-BiyJ0WOE.js";const d=class{constructor(s){t(this,s),this.observer=void 0}setupObserver(t){if(!t)return;const s=t.closest("db-brand");s&&!this.observer&&(this.observer=new MutationObserver((s=>{s.some((t=>{var s;const i=t.target.attributes.getNamedItem(null!==(s=t.attributeName)&&void 0!==s?s:"");return(null==i?void 0:i.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-brand")})),this.observer.observe(s,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,s){const i=null==t?void 0:t.closest(s);if(t&&i){const s=i.attributes;for(let n=0;n<s.length;n++){const a=s.item(n);if(a&&"data-density"!==a.name&&(a.name.startsWith("data-")||a.name.startsWith("aria-")))a.value?t.setAttribute(a.name,a.value):t.removeAttribute(a.name),i.removeAttribute(a.name);else if(a&&["style"].includes(a.name))t.setAttribute(a.name,a.value),i.removeAttribute(a.name);else if(a&&"class"===a.name){const s=a.value.includes("hydrated"),n=a.value.replace("hydrated","").trim(),e=t.getAttribute("class");t.setAttribute(a.name,`${e||""}${n?` ${n}`:""}`),s?i.setAttribute("class","hydrated"):i.removeAttribute(a.name)}}}}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-brand"),this.setupObserver(this._ref)}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect()}render(){var t,i,d;return s("div",{key:"eb7ad13ac7dc2b56c0611996975b6f140cb837c8",class:e("db-brand",this.className),ref:t=>{this._ref=t},"data-icon":this.hideLogo?"none":null!==(t=this.icon)&&void 0!==t?t:n,"data-show-icon":a(this.showIcon,"showIcon"),id:null!==(i=this.id)&&void 0!==i?i:null===(d=this.propOverrides)||void 0===d?void 0:d.id},s("slot",{key:"21a1bf9ea2f921c6a38e24062890c7f674213605"}),this.text?this.text:null)}get rootElement(){return i(this)}};export{d as db_brand}
@@ -1 +1 @@
1
- import{r as t,c as i,h as s,g as a}from"./p-BlbKvvUv.js";import{s as e}from"./p-BdL-nI5y.js";import{e as n,s as d,g as o,p as h,c}from"./p-fumiz06Y.js";const l=class{constructor(s){t(this,s),this.close=i(this,"close"),this.observer=void 0}handleClose(t){t&&(t.stopPropagation(),this.close&&this.close.emit(t))}setupObserver(t){if(!t)return;const i=t.closest("db-notification");i&&!this.observer&&(this.observer=new MutationObserver((i=>{i.some((t=>{var i;const s=t.target.attributes.getNamedItem(null!==(i=t.attributeName)&&void 0!==i?i:"");return(null==s?void 0:s.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-notification")})),this.observer.observe(i,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,i){const s=null==t?void 0:t.closest(i);if(t&&s){const i=s.attributes;for(let a=0;a<i.length;a++){const e=i.item(a);if(e&&"data-density"!==e.name&&(e.name.startsWith("data-")||e.name.startsWith("aria-")))e.value?t.setAttribute(e.name,e.value):t.removeAttribute(e.name),s.removeAttribute(e.name);else if(e&&["style"].includes(e.name))t.setAttribute(e.name,e.value),s.removeAttribute(e.name);else if(e&&"class"===e.name){const i=e.value.includes("hydrated"),a=e.value.replace("hydrated","").trim(),n=t.getAttribute("class");t.setAttribute(e.name,`${n||""}${a?` ${a}`:""}`),i?s.setAttribute("class","hydrated"):s.removeAttribute(e.name)}}}}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-notification"),this.setupObserver(this._ref)}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect()}render(){var t,i,a;return s("div",{key:"3f6ef4d3d506873a5b4bd15fde4d2c2fbedc9746",class:c("db-notification",this.className),ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(i=this.propOverrides)||void 0===i?void 0:i.id,role:h({semantic:this.semantic,role:this.role,ariaLive:this.ariaLive}),"aria-live":this.ariaLive,"data-semantic":this.semantic,"data-variant":this.variant,"data-icon":!1!==n(this.showIcon)?this.icon:void 0,"data-show-icon":o(this.showIcon,"showIcon"),"data-link-variant":this.linkVariant},s("slot",{key:"869ddc92d88e68d689215add30f1eefbfababc21",name:"image"}),d(this.headline,this.showHeadline)?s("header",{"data-area":"head"},this.headline):null,s("div",{key:"f3eb313619e046c8eb3fa7b527470b8145003173","data-area":"content"},this.text?this.text:null,s("slot",{key:"ff2a9c542527cf6da87bace3b77b9477899626ea"})),d(this.timestamp,this.showTimestamp)?s("time",{"data-area":"timestamp",dateTime:this.timestampDatetime},this.timestamp):null,s("slot",{key:"5529bddb13c7a39c5fcf6b9bca844cbe1f16fee3",name:"link"}),n(this.closeable,"closeable")?s("db-button",{icon:"cross",variant:"ghost",size:"small",id:this.closeButtonId,noText:!0,onClick:t=>this.handleClose(t)},null!==(a=this.closeButtonText)&&void 0!==a?a:e):null)}get rootElement(){return a(this)}};export{l as db_notification}
1
+ import{r as t,c as i,h as s,g as a}from"./p-BlbKvvUv.js";import{s as e}from"./p-BdL-nI5y.js";import{e as n,s as d,g as o,p as h,c}from"./p-BiyJ0WOE.js";const l=class{constructor(s){t(this,s),this.close=i(this,"close"),this.observer=void 0}handleClose(t){t&&(t.stopPropagation(),this.close&&this.close.emit(t))}setupObserver(t){if(!t)return;const i=t.closest("db-notification");i&&!this.observer&&(this.observer=new MutationObserver((i=>{i.some((t=>{var i;const s=t.target.attributes.getNamedItem(null!==(i=t.attributeName)&&void 0!==i?i:"");return(null==s?void 0:s.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-notification")})),this.observer.observe(i,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,i){const s=null==t?void 0:t.closest(i);if(t&&s){const i=s.attributes;for(let a=0;a<i.length;a++){const e=i.item(a);if(e&&"data-density"!==e.name&&(e.name.startsWith("data-")||e.name.startsWith("aria-")))e.value?t.setAttribute(e.name,e.value):t.removeAttribute(e.name),s.removeAttribute(e.name);else if(e&&["style"].includes(e.name))t.setAttribute(e.name,e.value),s.removeAttribute(e.name);else if(e&&"class"===e.name){const i=e.value.includes("hydrated"),a=e.value.replace("hydrated","").trim(),n=t.getAttribute("class");t.setAttribute(e.name,`${n||""}${a?` ${a}`:""}`),i?s.setAttribute("class","hydrated"):s.removeAttribute(e.name)}}}}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-notification"),this.setupObserver(this._ref)}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect()}render(){var t,i,a;return s("div",{key:"3f6ef4d3d506873a5b4bd15fde4d2c2fbedc9746",class:c("db-notification",this.className),ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(i=this.propOverrides)||void 0===i?void 0:i.id,role:h({semantic:this.semantic,role:this.role,ariaLive:this.ariaLive}),"aria-live":this.ariaLive,"data-semantic":this.semantic,"data-variant":this.variant,"data-icon":!1!==n(this.showIcon)?this.icon:void 0,"data-show-icon":o(this.showIcon,"showIcon"),"data-link-variant":this.linkVariant},s("slot",{key:"869ddc92d88e68d689215add30f1eefbfababc21",name:"image"}),d(this.headline,this.showHeadline)?s("header",{"data-area":"head"},this.headline):null,s("div",{key:"f3eb313619e046c8eb3fa7b527470b8145003173","data-area":"content"},this.text?this.text:null,s("slot",{key:"ff2a9c542527cf6da87bace3b77b9477899626ea"})),d(this.timestamp,this.showTimestamp)?s("time",{"data-area":"timestamp",dateTime:this.timestampDatetime},this.timestamp):null,s("slot",{key:"5529bddb13c7a39c5fcf6b9bca844cbe1f16fee3",name:"link"}),n(this.closeable,"closeable")?s("db-button",{icon:"cross",variant:"ghost",size:"small",id:this.closeButtonId,noText:!0,onClick:t=>this.handleClose(t)},null!==(a=this.closeButtonText)&&void 0!==a?a:e):null)}get rootElement(){return a(this)}};export{l as db_notification}