@dso-toolkit/core 73.2.1 → 73.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (316) hide show
  1. package/dist/bundle/dso-accordion-section.d.ts +11 -0
  2. package/dist/bundle/dso-accordion-section.js +281 -0
  3. package/dist/bundle/dso-accordion-section.js.map +1 -0
  4. package/dist/bundle/dso-accordion.d.ts +11 -0
  5. package/dist/bundle/dso-accordion.js +262 -0
  6. package/dist/bundle/dso-accordion.js.map +1 -0
  7. package/dist/bundle/dso-action-list-item.d.ts +11 -0
  8. package/dist/bundle/dso-action-list-item.js +63 -0
  9. package/dist/bundle/dso-action-list-item.js.map +1 -0
  10. package/dist/bundle/dso-action-list.d.ts +11 -0
  11. package/dist/bundle/dso-action-list.js +38 -0
  12. package/dist/bundle/dso-action-list.js.map +1 -0
  13. package/dist/bundle/dso-advanced-select.d.ts +11 -0
  14. package/dist/bundle/dso-advanced-select.js +155 -0
  15. package/dist/bundle/dso-advanced-select.js.map +1 -0
  16. package/dist/bundle/dso-alert.d.ts +11 -0
  17. package/dist/bundle/dso-alert.js +9 -0
  18. package/dist/bundle/dso-alert.js.map +1 -0
  19. package/dist/bundle/dso-annotation-activiteit.d.ts +11 -0
  20. package/dist/bundle/dso-annotation-activiteit.js +87 -0
  21. package/dist/bundle/dso-annotation-activiteit.js.map +1 -0
  22. package/dist/bundle/dso-annotation-gebiedsaanwijzing.d.ts +11 -0
  23. package/dist/bundle/dso-annotation-gebiedsaanwijzing.js +83 -0
  24. package/dist/bundle/dso-annotation-gebiedsaanwijzing.js.map +1 -0
  25. package/dist/bundle/dso-annotation-kaart.d.ts +11 -0
  26. package/dist/bundle/dso-annotation-kaart.js +72 -0
  27. package/dist/bundle/dso-annotation-kaart.js.map +1 -0
  28. package/dist/bundle/dso-annotation-locatie.d.ts +11 -0
  29. package/dist/bundle/dso-annotation-locatie.js +9 -0
  30. package/dist/bundle/dso-annotation-locatie.js.map +1 -0
  31. package/dist/bundle/dso-annotation-omgevingsnormwaarde.d.ts +11 -0
  32. package/dist/bundle/dso-annotation-omgevingsnormwaarde.js +87 -0
  33. package/dist/bundle/dso-annotation-omgevingsnormwaarde.js.map +1 -0
  34. package/dist/bundle/dso-attachments-counter.d.ts +11 -0
  35. package/dist/bundle/dso-attachments-counter.js +9 -0
  36. package/dist/bundle/dso-attachments-counter.js.map +1 -0
  37. package/dist/bundle/dso-autosuggest.d.ts +11 -0
  38. package/dist/bundle/dso-autosuggest.js +588 -0
  39. package/dist/bundle/dso-autosuggest.js.map +1 -0
  40. package/dist/bundle/dso-badge.d.ts +11 -0
  41. package/dist/bundle/dso-badge.js +9 -0
  42. package/dist/bundle/dso-badge.js.map +1 -0
  43. package/dist/bundle/dso-banner.d.ts +11 -0
  44. package/dist/bundle/dso-banner.js +53 -0
  45. package/dist/bundle/dso-banner.js.map +1 -0
  46. package/dist/bundle/dso-card-container.d.ts +11 -0
  47. package/dist/bundle/dso-card-container.js +42 -0
  48. package/dist/bundle/dso-card-container.js.map +1 -0
  49. package/dist/bundle/dso-card.d.ts +11 -0
  50. package/dist/bundle/dso-card.js +72 -0
  51. package/dist/bundle/dso-card.js.map +1 -0
  52. package/dist/bundle/dso-contact-information.d.ts +11 -0
  53. package/dist/bundle/dso-contact-information.js +36 -0
  54. package/dist/bundle/dso-contact-information.js.map +1 -0
  55. package/dist/bundle/dso-date-picker-legacy.d.ts +11 -0
  56. package/dist/bundle/dso-date-picker-legacy.js +773 -0
  57. package/dist/bundle/dso-date-picker-legacy.js.map +1 -0
  58. package/dist/bundle/dso-date-picker.d.ts +11 -0
  59. package/dist/bundle/dso-date-picker.js +187 -0
  60. package/dist/bundle/dso-date-picker.js.map +1 -0
  61. package/dist/bundle/dso-document-card.d.ts +11 -0
  62. package/dist/bundle/dso-document-card.js +66 -0
  63. package/dist/bundle/dso-document-card.js.map +1 -0
  64. package/dist/bundle/dso-document-component.d.ts +11 -0
  65. package/dist/bundle/dso-document-component.js +9 -0
  66. package/dist/bundle/dso-document-component.js.map +1 -0
  67. package/dist/bundle/dso-dropdown-menu.d.ts +11 -0
  68. package/dist/bundle/dso-dropdown-menu.js +9 -0
  69. package/dist/bundle/dso-dropdown-menu.js.map +1 -0
  70. package/dist/bundle/dso-expandable.d.ts +11 -0
  71. package/dist/bundle/dso-expandable.js +9 -0
  72. package/dist/bundle/dso-expandable.js.map +1 -0
  73. package/dist/bundle/dso-header.d.ts +11 -0
  74. package/dist/bundle/dso-header.js +218 -0
  75. package/dist/bundle/dso-header.js.map +1 -0
  76. package/dist/bundle/dso-highlight-box.d.ts +11 -0
  77. package/dist/bundle/dso-highlight-box.js +45 -0
  78. package/dist/bundle/dso-highlight-box.js.map +1 -0
  79. package/dist/bundle/dso-icon.d.ts +11 -0
  80. package/dist/bundle/dso-icon.js +9 -0
  81. package/dist/bundle/dso-icon.js.map +1 -0
  82. package/dist/bundle/dso-image-overlay.d.ts +11 -0
  83. package/dist/bundle/dso-image-overlay.js +9 -0
  84. package/dist/bundle/dso-image-overlay.js.map +1 -0
  85. package/dist/bundle/dso-info-button.d.ts +11 -0
  86. package/dist/bundle/dso-info-button.js +9 -0
  87. package/dist/bundle/dso-info-button.js.map +1 -0
  88. package/dist/bundle/dso-info.d.ts +11 -0
  89. package/dist/bundle/dso-info.js +9 -0
  90. package/dist/bundle/dso-info.js.map +1 -0
  91. package/dist/bundle/dso-input-range.d.ts +11 -0
  92. package/dist/bundle/dso-input-range.js +59 -0
  93. package/dist/bundle/dso-input-range.js.map +1 -0
  94. package/dist/bundle/dso-label.d.ts +11 -0
  95. package/dist/bundle/dso-label.js +9 -0
  96. package/dist/bundle/dso-label.js.map +1 -0
  97. package/dist/bundle/dso-legend-item.d.ts +11 -0
  98. package/dist/bundle/dso-legend-item.js +90 -0
  99. package/dist/bundle/dso-legend-item.js.map +1 -0
  100. package/dist/bundle/dso-list-button.d.ts +11 -0
  101. package/dist/bundle/dso-list-button.js +118 -0
  102. package/dist/bundle/dso-list-button.js.map +1 -0
  103. package/dist/bundle/dso-logo.d.ts +11 -0
  104. package/dist/bundle/dso-logo.js +64 -0
  105. package/dist/bundle/dso-logo.js.map +1 -0
  106. package/dist/bundle/dso-map-base-layers.d.ts +11 -0
  107. package/dist/bundle/dso-map-base-layers.js +101 -0
  108. package/dist/bundle/dso-map-base-layers.js.map +1 -0
  109. package/dist/bundle/dso-map-controls.d.ts +11 -0
  110. package/dist/bundle/dso-map-controls.js +138 -0
  111. package/dist/bundle/dso-map-controls.js.map +1 -0
  112. package/dist/bundle/dso-map-overlays.d.ts +11 -0
  113. package/dist/bundle/dso-map-overlays.js +102 -0
  114. package/dist/bundle/dso-map-overlays.js.map +1 -0
  115. package/dist/bundle/dso-mark-bar.d.ts +11 -0
  116. package/dist/bundle/dso-mark-bar.js +91 -0
  117. package/dist/bundle/dso-mark-bar.js.map +1 -0
  118. package/dist/bundle/dso-modal.d.ts +11 -0
  119. package/dist/bundle/dso-modal.js +120 -0
  120. package/dist/bundle/dso-modal.js.map +1 -0
  121. package/dist/bundle/dso-onboarding-tip.d.ts +11 -0
  122. package/dist/bundle/dso-onboarding-tip.js +1839 -0
  123. package/dist/bundle/dso-onboarding-tip.js.map +1 -0
  124. package/dist/bundle/dso-ozon-content.d.ts +11 -0
  125. package/dist/bundle/dso-ozon-content.js +9 -0
  126. package/dist/bundle/dso-ozon-content.js.map +1 -0
  127. package/dist/bundle/dso-pagination.d.ts +11 -0
  128. package/dist/bundle/dso-pagination.js +188 -0
  129. package/dist/bundle/dso-pagination.js.map +1 -0
  130. package/dist/bundle/dso-panel.d.ts +11 -0
  131. package/dist/bundle/dso-panel.js +9 -0
  132. package/dist/bundle/dso-panel.js.map +1 -0
  133. package/dist/bundle/dso-plekinfo-card.d.ts +11 -0
  134. package/dist/bundle/dso-plekinfo-card.js +88 -0
  135. package/dist/bundle/dso-plekinfo-card.js.map +1 -0
  136. package/dist/bundle/dso-progress-bar.d.ts +11 -0
  137. package/dist/bundle/dso-progress-bar.js +50 -0
  138. package/dist/bundle/dso-progress-bar.js.map +1 -0
  139. package/dist/bundle/dso-progress-indicator.d.ts +11 -0
  140. package/dist/bundle/dso-progress-indicator.js +9 -0
  141. package/dist/bundle/dso-progress-indicator.js.map +1 -0
  142. package/dist/bundle/dso-project-item.d.ts +11 -0
  143. package/dist/bundle/dso-project-item.js +56 -0
  144. package/dist/bundle/dso-project-item.js.map +1 -0
  145. package/dist/bundle/dso-renvooi.d.ts +11 -0
  146. package/dist/bundle/dso-renvooi.js +9 -0
  147. package/dist/bundle/dso-renvooi.js.map +1 -0
  148. package/dist/bundle/dso-responsive-element.d.ts +11 -0
  149. package/dist/bundle/dso-responsive-element.js +9 -0
  150. package/dist/bundle/dso-responsive-element.js.map +1 -0
  151. package/dist/bundle/dso-scrollable.d.ts +11 -0
  152. package/dist/bundle/dso-scrollable.js +9 -0
  153. package/dist/bundle/dso-scrollable.js.map +1 -0
  154. package/dist/bundle/dso-selectable.d.ts +11 -0
  155. package/dist/bundle/dso-selectable.js +9 -0
  156. package/dist/bundle/dso-selectable.js.map +1 -0
  157. package/dist/bundle/dso-skiplink.d.ts +11 -0
  158. package/dist/bundle/dso-skiplink.js +53 -0
  159. package/dist/bundle/dso-skiplink.js.map +1 -0
  160. package/dist/bundle/dso-slide-toggle.d.ts +11 -0
  161. package/dist/bundle/dso-slide-toggle.js +9 -0
  162. package/dist/bundle/dso-slide-toggle.js.map +1 -0
  163. package/dist/bundle/dso-survey-rating.d.ts +11 -0
  164. package/dist/bundle/dso-survey-rating.js +70 -0
  165. package/dist/bundle/dso-survey-rating.js.map +1 -0
  166. package/dist/bundle/dso-tab.d.ts +11 -0
  167. package/dist/bundle/dso-tab.js +70 -0
  168. package/dist/bundle/dso-tab.js.map +1 -0
  169. package/dist/bundle/dso-table.d.ts +11 -0
  170. package/dist/bundle/dso-table.js +9 -0
  171. package/dist/bundle/dso-table.js.map +1 -0
  172. package/dist/bundle/dso-tabs.d.ts +11 -0
  173. package/dist/bundle/dso-tabs.js +94 -0
  174. package/dist/bundle/dso-tabs.js.map +1 -0
  175. package/dist/bundle/dso-toggletip.d.ts +11 -0
  176. package/dist/bundle/dso-toggletip.js +9 -0
  177. package/dist/bundle/dso-toggletip.js.map +1 -0
  178. package/dist/bundle/dso-tooltip.d.ts +11 -0
  179. package/dist/bundle/dso-tooltip.js +9 -0
  180. package/dist/bundle/dso-tooltip.js.map +1 -0
  181. package/dist/bundle/dso-tree-view.d.ts +11 -0
  182. package/dist/bundle/dso-tree-view.js +237 -0
  183. package/dist/bundle/dso-tree-view.js.map +1 -0
  184. package/dist/bundle/dso-viewer-grid.d.ts +11 -0
  185. package/dist/bundle/dso-viewer-grid.js +351 -0
  186. package/dist/bundle/dso-viewer-grid.js.map +1 -0
  187. package/dist/bundle/dsot-document-component-demo.d.ts +11 -0
  188. package/dist/bundle/dsot-document-component-demo.js +1957 -0
  189. package/dist/bundle/dsot-document-component-demo.js.map +1 -0
  190. package/dist/bundle/index.d.ts +45 -0
  191. package/dist/bundle/index.js +143 -0
  192. package/dist/bundle/index.js.map +1 -0
  193. package/dist/bundle/p-0JGmXD8O.js +59 -0
  194. package/dist/bundle/p-0JGmXD8O.js.map +1 -0
  195. package/dist/bundle/p-BF0_OXTe.js +60 -0
  196. package/dist/bundle/p-BF0_OXTe.js.map +1 -0
  197. package/dist/bundle/p-BPLPqKUj.js +163 -0
  198. package/dist/bundle/p-BPLPqKUj.js.map +1 -0
  199. package/dist/bundle/p-B_kXuEcW.js +2178 -0
  200. package/dist/bundle/p-B_kXuEcW.js.map +1 -0
  201. package/dist/bundle/p-BacS1uCc.js +35 -0
  202. package/dist/bundle/p-BacS1uCc.js.map +1 -0
  203. package/dist/bundle/p-BdyXpl60.js +76 -0
  204. package/dist/bundle/p-BdyXpl60.js.map +1 -0
  205. package/dist/bundle/p-BocpUT46.js +992 -0
  206. package/dist/bundle/p-BocpUT46.js.map +1 -0
  207. package/dist/bundle/p-BtcZ9oZ6.js +115 -0
  208. package/dist/bundle/p-BtcZ9oZ6.js.map +1 -0
  209. package/dist/bundle/p-BxvZeNWe.js +126 -0
  210. package/dist/bundle/p-BxvZeNWe.js.map +1 -0
  211. package/dist/bundle/p-C1tscMvU.js +43 -0
  212. package/dist/bundle/p-C1tscMvU.js.map +1 -0
  213. package/dist/bundle/p-CZ2ipzNO.js +63 -0
  214. package/dist/bundle/p-CZ2ipzNO.js.map +1 -0
  215. package/dist/bundle/p-Cbba2ZRN.js +36 -0
  216. package/dist/bundle/p-Cbba2ZRN.js.map +1 -0
  217. package/dist/bundle/p-ChV9xqsO.js +6 -0
  218. package/dist/bundle/p-ChV9xqsO.js.map +1 -0
  219. package/dist/bundle/p-ChrHXjXh.js +80 -0
  220. package/dist/bundle/p-ChrHXjXh.js.map +1 -0
  221. package/dist/bundle/p-Cng7insW.js +145 -0
  222. package/dist/bundle/p-Cng7insW.js.map +1 -0
  223. package/dist/bundle/p-CodDyi2J.js +15 -0
  224. package/dist/bundle/p-CodDyi2J.js.map +1 -0
  225. package/dist/bundle/p-CsY83cJO.js +1801 -0
  226. package/dist/bundle/p-CsY83cJO.js.map +1 -0
  227. package/dist/bundle/p-CvGnEQcm.js +80 -0
  228. package/dist/bundle/p-CvGnEQcm.js.map +1 -0
  229. package/dist/bundle/p-D2nuXSd0.js +723 -0
  230. package/dist/bundle/p-D2nuXSd0.js.map +1 -0
  231. package/dist/bundle/p-D9Yjz_Sm.js +125 -0
  232. package/dist/bundle/p-D9Yjz_Sm.js.map +1 -0
  233. package/dist/bundle/p-DDDh2Izf.js +12 -0
  234. package/dist/bundle/p-DDDh2Izf.js.map +1 -0
  235. package/dist/bundle/p-DGWbWwct.js +121 -0
  236. package/dist/bundle/p-DGWbWwct.js.map +1 -0
  237. package/dist/bundle/p-DHO_Za64.js +1729 -0
  238. package/dist/bundle/p-DHO_Za64.js.map +1 -0
  239. package/dist/bundle/p-DPH021KD.js +14 -0
  240. package/dist/bundle/p-DPH021KD.js.map +1 -0
  241. package/dist/bundle/p-DSyv-znO.js +18 -0
  242. package/dist/bundle/p-DSyv-znO.js.map +1 -0
  243. package/dist/bundle/p-DWTXTDbr.js +253 -0
  244. package/dist/bundle/p-DWTXTDbr.js.map +1 -0
  245. package/dist/bundle/p-DacnxEpv.js +78 -0
  246. package/dist/bundle/p-DacnxEpv.js.map +1 -0
  247. package/dist/bundle/p-DcpG4jOU.js +99 -0
  248. package/dist/bundle/p-DcpG4jOU.js.map +1 -0
  249. package/dist/bundle/p-DrR9RuIM.js +83 -0
  250. package/dist/bundle/p-DrR9RuIM.js.map +1 -0
  251. package/dist/bundle/p-DvqO1i1s.js +1162 -0
  252. package/dist/bundle/p-DvqO1i1s.js.map +1 -0
  253. package/dist/bundle/p-Hgv-pDpy.js +13 -0
  254. package/dist/bundle/p-Hgv-pDpy.js.map +1 -0
  255. package/dist/bundle/p-Pk8qng7t.js +573 -0
  256. package/dist/bundle/p-Pk8qng7t.js.map +1 -0
  257. package/dist/bundle/p-WYm6cxra.js +64 -0
  258. package/dist/bundle/p-WYm6cxra.js.map +1 -0
  259. package/dist/bundle/p-dB3K6tfb.js +41 -0
  260. package/dist/bundle/p-dB3K6tfb.js.map +1 -0
  261. package/dist/bundle/p-kDtv6DeD.js +314 -0
  262. package/dist/bundle/p-kDtv6DeD.js.map +1 -0
  263. package/dist/bundle/p-pVO6m7lg.js +271 -0
  264. package/dist/bundle/p-pVO6m7lg.js.map +1 -0
  265. package/dist/bundle/p-xNnEBBZG.js +63 -0
  266. package/dist/bundle/p-xNnEBBZG.js.map +1 -0
  267. package/dist/cjs/dso-accordion-section.cjs.entry.js +3 -3
  268. package/dist/cjs/dso-accordion-section.cjs.entry.js.map +1 -1
  269. package/dist/cjs/dso-accordion-section.entry.cjs.js.map +1 -1
  270. package/dist/cjs/dso-alert.dso-badge.dso-image-overlay.dso-ozon-content.dso-panel.dso-table.entry.cjs.js.map +1 -1
  271. package/dist/cjs/dso-alert_6.cjs.entry.js +3 -7
  272. package/dist/cjs/dso-alert_6.cjs.entry.js.map +1 -1
  273. package/dist/cjs/dso-onboarding-tip.cjs.entry.js +24 -10
  274. package/dist/cjs/dso-onboarding-tip.cjs.entry.js.map +1 -1
  275. package/dist/cjs/dso-onboarding-tip.entry.cjs.js.map +1 -1
  276. package/dist/cjs/dso-toolkit.cjs.js +1 -1
  277. package/dist/cjs/loader.cjs.js +1 -1
  278. package/dist/collection/components/accordion/components/accordion-section.js +3 -3
  279. package/dist/collection/components/accordion/components/accordion-section.js.map +1 -1
  280. package/dist/collection/components/onboarding-tip/onboarding-tip.css +21 -1
  281. package/dist/collection/components/onboarding-tip/onboarding-tip.js +28 -9
  282. package/dist/collection/components/onboarding-tip/onboarding-tip.js.map +1 -1
  283. package/dist/collection/components/table/table.css +2 -2
  284. package/dist/collection/components/table/table.js +3 -26
  285. package/dist/collection/components/table/table.js.map +1 -1
  286. package/dist/components/dso-accordion-section.js +3 -3
  287. package/dist/components/dso-accordion-section.js.map +1 -1
  288. package/dist/components/dso-onboarding-tip.js +26 -11
  289. package/dist/components/dso-onboarding-tip.js.map +1 -1
  290. package/dist/components/table.js +4 -8
  291. package/dist/components/table.js.map +1 -1
  292. package/dist/dso-toolkit/dso-accordion-section.entry.esm.js.map +1 -1
  293. package/dist/dso-toolkit/dso-alert.dso-badge.dso-image-overlay.dso-ozon-content.dso-panel.dso-table.entry.esm.js.map +1 -1
  294. package/dist/dso-toolkit/dso-onboarding-tip.entry.esm.js.map +1 -1
  295. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  296. package/dist/dso-toolkit/{p-8084c884.entry.js → p-5fa008c6.entry.js} +2 -2
  297. package/dist/dso-toolkit/{p-8084c884.entry.js.map → p-5fa008c6.entry.js.map} +1 -1
  298. package/dist/dso-toolkit/{p-6a156238.entry.js → p-6f89da1c.entry.js} +2 -2
  299. package/dist/dso-toolkit/{p-6a156238.entry.js.map → p-6f89da1c.entry.js.map} +1 -1
  300. package/dist/dso-toolkit/p-909118a3.entry.js +2 -0
  301. package/dist/dso-toolkit/p-909118a3.entry.js.map +1 -0
  302. package/dist/esm/dso-accordion-section.entry.js +3 -3
  303. package/dist/esm/dso-accordion-section.entry.js.map +1 -1
  304. package/dist/esm/dso-alert.dso-badge.dso-image-overlay.dso-ozon-content.dso-panel.dso-table.entry.js.map +1 -1
  305. package/dist/esm/dso-alert_6.entry.js +3 -7
  306. package/dist/esm/dso-alert_6.entry.js.map +1 -1
  307. package/dist/esm/dso-onboarding-tip.entry.js +24 -10
  308. package/dist/esm/dso-onboarding-tip.entry.js.map +1 -1
  309. package/dist/esm/dso-toolkit.js +1 -1
  310. package/dist/esm/loader.js +1 -1
  311. package/dist/types/components/onboarding-tip/onboarding-tip.d.ts +1 -0
  312. package/dist/types/components/table/table.d.ts +1 -4
  313. package/dist/types/components.d.ts +0 -8
  314. package/package.json +3 -3
  315. package/dist/dso-toolkit/p-c0410277.entry.js +0 -2
  316. package/dist/dso-toolkit/p-c0410277.entry.js.map +0 -1
@@ -0,0 +1,271 @@
1
+ import { p as proxyCustomElement, H, h, d as Host } from './p-DHO_Za64.js';
2
+ import { t as tabbable } from './p-Pk8qng7t.js';
3
+ import { g as getActiveElement } from './p-CodDyi2J.js';
4
+ import { h as hasOverflow, c as createPopper } from './p-CsY83cJO.js';
5
+ import { v as v4 } from './p-BF0_OXTe.js';
6
+
7
+ const dropdownMenuCss = ":host(:focus){outline:none}:host{display:inline-block}";
8
+
9
+ const DropdownMenu = /*@__PURE__*/ proxyCustomElement(class DropdownMenu extends H {
10
+ constructor() {
11
+ super();
12
+ this.__registerHost();
13
+ this.__attachShadow();
14
+ /**
15
+ * Whether the menu is open or closed.
16
+ * This attribute is reflected and mutable.
17
+ */
18
+ this.open = false;
19
+ /**
20
+ * Alignment of the dropdown
21
+ */
22
+ this.dropdownAlign = "left";
23
+ /**
24
+ * Space between button and dropdown options
25
+ */
26
+ this.dropdownOptionsOffset = 2;
27
+ /**
28
+ * Whether the menu is checkable.
29
+ */
30
+ this.checkable = false;
31
+ /**
32
+ * Set position strategy of dropdown options
33
+ */
34
+ this.strategy = "auto";
35
+ this.focusOutListener = (event) => {
36
+ if (this.open &&
37
+ (!(event.relatedTarget instanceof H) || !this.tabbables(true).includes(event.relatedTarget))) {
38
+ this.open = false;
39
+ }
40
+ };
41
+ this.escape = () => {
42
+ this.button.focus();
43
+ this.open = false;
44
+ };
45
+ }
46
+ watchPosition() {
47
+ if (!this.popper) {
48
+ return;
49
+ }
50
+ this.popper.setOptions({
51
+ placement: this.placement || (this.dropdownAlign === "right" ? "bottom-end" : "bottom-start"),
52
+ });
53
+ }
54
+ watchOptionsOffset() {
55
+ var _a;
56
+ (_a = this.popper) === null || _a === void 0 ? void 0 : _a.setOptions({
57
+ modifiers: [
58
+ {
59
+ name: "offset",
60
+ options: {
61
+ offset: [0, this.dropdownOptionsOffset],
62
+ },
63
+ },
64
+ ],
65
+ });
66
+ }
67
+ watchStrategy() {
68
+ this.setStrategy();
69
+ }
70
+ setStrategy() {
71
+ if (!this.popper) {
72
+ return;
73
+ }
74
+ if (this.strategy === "absolute" || this.strategy === "fixed") {
75
+ this.popper.setOptions({
76
+ strategy: this.strategy,
77
+ });
78
+ return;
79
+ }
80
+ let element = this.host;
81
+ const boundary = this.boundary || document;
82
+ while (element && element.parentNode !== boundary) {
83
+ element = element.parentNode instanceof ShadowRoot ? element.parentNode.host : element.parentElement;
84
+ if (element !== null && hasOverflow(element)) {
85
+ this.popper.setOptions({
86
+ strategy: "fixed",
87
+ });
88
+ return;
89
+ }
90
+ }
91
+ this.popper.setOptions({
92
+ strategy: "absolute",
93
+ });
94
+ }
95
+ get button() {
96
+ const button = this.host.querySelector('button[slot="toggle"]');
97
+ if (!(button instanceof HTMLButtonElement)) {
98
+ throw new ReferenceError("Mandatory toggle button not found");
99
+ }
100
+ return button;
101
+ }
102
+ tabbables(withButton) {
103
+ const tabbables = this.host.isConnected ? tabbable(this.host) : [];
104
+ return withButton ? tabbables : tabbables.filter((element) => element !== this.button);
105
+ }
106
+ componentDidLoad() {
107
+ this.button.setAttribute("aria-haspopup", "menu");
108
+ this.button.setAttribute("aria-expanded", "false");
109
+ if (!this.button.id) {
110
+ this.button.id = v4();
111
+ }
112
+ const options = this.host.querySelector(".dso-dropdown-options");
113
+ if (!options) {
114
+ throw new ReferenceError("Dropdown options not found");
115
+ }
116
+ options.setAttribute("role", "menu");
117
+ options.setAttribute("aria-labelledby", this.button.id);
118
+ for (const ul of Array.from(this.host.getElementsByTagName("ul"))) {
119
+ ul.setAttribute("role", "group");
120
+ for (const li of Array.from(ul.getElementsByTagName("li"))) {
121
+ li.setAttribute("role", "none");
122
+ }
123
+ }
124
+ if (this.popper) {
125
+ return;
126
+ }
127
+ const dropdownOptionsElement = this.host.querySelector(".dso-dropdown-options");
128
+ if (!(dropdownOptionsElement instanceof H)) {
129
+ throw new Error("dropdown options element is not instanceof HTMLElement");
130
+ }
131
+ this.popper = createPopper(this.button, dropdownOptionsElement, {
132
+ placement: this.placement || (this.dropdownAlign === "right" ? "bottom-end" : "bottom-start"),
133
+ modifiers: [
134
+ {
135
+ name: "offset",
136
+ options: {
137
+ offset: [0, this.dropdownOptionsOffset],
138
+ },
139
+ },
140
+ {
141
+ name: "preventOverflow",
142
+ options: {
143
+ boundary: this.boundary ? document.querySelector(this.boundary) : null,
144
+ },
145
+ enabled: this.boundary !== undefined,
146
+ },
147
+ ],
148
+ });
149
+ }
150
+ componentDidRender() {
151
+ var _a;
152
+ this.setStrategy();
153
+ if (this.open) {
154
+ (_a = this.popper) === null || _a === void 0 ? void 0 : _a.update();
155
+ }
156
+ for (const li of Array.from(this.host.getElementsByTagName("li"))) {
157
+ for (const tab of this.host.isConnected ? tabbable(li) : []) {
158
+ tab.setAttribute("role", this.checkable ? "menuitemradio" : "menuitem");
159
+ if (this.checkable) {
160
+ tab.setAttribute("aria-checked", li.classList.contains("dso-checked").toString());
161
+ }
162
+ }
163
+ }
164
+ this.button.setAttribute("aria-expanded", this.open ? "true" : "false");
165
+ }
166
+ onClick(event) {
167
+ const composedPath = event.composedPath();
168
+ if (this.isToggleButtonEvent(composedPath)) {
169
+ this.open = !this.open;
170
+ }
171
+ else if (this.open && this.isMenuItemEvent(composedPath)) {
172
+ this.open = false;
173
+ }
174
+ }
175
+ isToggleButtonEvent(composedPath) {
176
+ return composedPath.includes(this.button);
177
+ }
178
+ isMenuItemEvent(composedPath) {
179
+ return composedPath.includes(this.host) && !this.isToggleButtonEvent(composedPath);
180
+ }
181
+ disconnectedCallback() {
182
+ var _a;
183
+ (_a = this.popper) === null || _a === void 0 ? void 0 : _a.destroy();
184
+ }
185
+ keyDownListener(event) {
186
+ if (event.defaultPrevented || !this.open) {
187
+ return;
188
+ }
189
+ switch (event.key) {
190
+ case "Tab":
191
+ if (event.shiftKey) {
192
+ this.tabInPopup(this.tabbables(true), -1);
193
+ }
194
+ else {
195
+ this.tabInPopup(this.tabbables(true), 1);
196
+ }
197
+ break;
198
+ case "ArrowDown":
199
+ this.tabInPopup(this.tabbables(false), 1);
200
+ break;
201
+ case "ArrowUp":
202
+ this.tabInPopup(this.tabbables(false), -1);
203
+ break;
204
+ case "Escape":
205
+ this.escape();
206
+ break;
207
+ case " ":
208
+ if (event.target instanceof H) {
209
+ event.target.click();
210
+ }
211
+ break;
212
+ default:
213
+ return;
214
+ }
215
+ event.preventDefault();
216
+ }
217
+ tabInPopup(tabbables, direction) {
218
+ var _a;
219
+ const currentIndex = tabbables.findIndex((e) => e === getActiveElement());
220
+ let nextIndex = currentIndex + direction;
221
+ if (nextIndex >= tabbables.length) {
222
+ nextIndex = 0;
223
+ }
224
+ else if (nextIndex < 0) {
225
+ nextIndex = tabbables.length - 1;
226
+ }
227
+ (_a = tabbables[nextIndex]) === null || _a === void 0 ? void 0 : _a.focus();
228
+ }
229
+ render() {
230
+ return (h(Host, { key: '7ac2c7b0cb53dd13854266943c3c4722f20d8fd7', onFocusout: this.focusOutListener }, h("slot", { key: '648bbf61fb7eb8062e593c2f1967b9cf46460cfb', name: "toggle" }), h("div", { key: 'd7d75b67cfd48f2734ae56c6b39c73b66b1ca7d8', hidden: !this.open }, h("slot", { key: '9c3d6dc3892a7a9cff71173e412fd7a5e4c0e7d4' }))));
231
+ }
232
+ get host() { return this; }
233
+ static get watchers() { return {
234
+ "placement": ["watchPosition"],
235
+ "dropdownAlign": ["watchPosition"],
236
+ "dropdownOptionsOffset": ["watchOptionsOffset"],
237
+ "strategy": ["watchStrategy"]
238
+ }; }
239
+ static get style() { return dropdownMenuCss; }
240
+ }, [1, "dso-dropdown-menu", {
241
+ "open": [1540],
242
+ "dropdownAlign": [1, "dropdown-align"],
243
+ "dropdownOptionsOffset": [2, "dropdown-options-offset"],
244
+ "checkable": [4],
245
+ "boundary": [1],
246
+ "placement": [1],
247
+ "strategy": [1]
248
+ }, [[8, "click", "onClick"], [8, "keydown", "keyDownListener"]], {
249
+ "placement": ["watchPosition"],
250
+ "dropdownAlign": ["watchPosition"],
251
+ "dropdownOptionsOffset": ["watchOptionsOffset"],
252
+ "strategy": ["watchStrategy"]
253
+ }]);
254
+ function defineCustomElement() {
255
+ if (typeof customElements === "undefined") {
256
+ return;
257
+ }
258
+ const components = ["dso-dropdown-menu"];
259
+ components.forEach(tagName => { switch (tagName) {
260
+ case "dso-dropdown-menu":
261
+ if (!customElements.get(tagName)) {
262
+ customElements.define(tagName, DropdownMenu);
263
+ }
264
+ break;
265
+ } });
266
+ }
267
+
268
+ export { DropdownMenu as D, defineCustomElement as d };
269
+ //# sourceMappingURL=p-pVO6m7lg.js.map
270
+
271
+ //# sourceMappingURL=p-pVO6m7lg.js.map
@@ -0,0 +1 @@
1
+ {"file":"p-pVO6m7lg.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,wDAAwD;;MCanE,YAAY,iBAAAA,kBAAA,CAAA,MAAA,YAAA,SAAAC,CAAA,CAAA;AALzB,IAAA,WAAA,GAAA;;;;AAME;;;AAGG;AAEH,QAAA,IAAI,CAAA,IAAA,GAAG,KAAK;AAEZ;;AAEG;AAEH,QAAA,IAAa,CAAA,aAA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SAAS,CAAC,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,KAAK,EAAE;;IAQ/B,MAAM,GAAA;AACJ,QAAA,QACE,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAC,UAAU,EAAE,IAAI,CAAC,gBAAgB,EAAA,EACrC,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,QAAQ,EAAG,CAAA,EACtB,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,MAAM,EAAE,CAAC,IAAI,CAAC,IAAI,EAAA,EACrB,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACJ,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","uuidv4"],"sources":["src/components/dropdown-menu/dropdown-menu.scss?tag=dso-dropdown-menu&encapsulation=shadow","src/components/dropdown-menu/dropdown-menu.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/components/dropdown-menu\";\r\n\r\n:host(:focus) {\r\n outline: none;\r\n}\r\n\r\n:host {\r\n @include dropdown-menu.root();\r\n}\r\n","import { Instance as PopperInstance, Placement, createPopper } from \"@popperjs/core\";\r\nimport { Component, Element, Host, Listen, Prop, Watch, h } from \"@stencil/core\";\r\nimport { FocusableElement, tabbable } from \"tabbable\";\r\nimport { v4 as uuidv4 } from \"uuid\";\r\n\r\nimport { getActiveElement } from \"../../utils/get-active-element\";\r\nimport { hasOverflow } from \"../../utils/has-overflow\";\r\n\r\n@Component({\r\n tag: \"dso-dropdown-menu\",\r\n styleUrl: \"dropdown-menu.scss\",\r\n shadow: true,\r\n})\r\nexport class DropdownMenu {\r\n /**\r\n * Whether the menu is open or closed.\r\n * This attribute is reflected and mutable.\r\n */\r\n @Prop({ reflect: true, mutable: true })\r\n open = false;\r\n\r\n /**\r\n * Alignment of the dropdown\r\n */\r\n @Prop()\r\n dropdownAlign: \"left\" | \"right\" = \"left\";\r\n\r\n /**\r\n * Space between button and dropdown options\r\n */\r\n @Prop()\r\n dropdownOptionsOffset = 2;\r\n\r\n /**\r\n * Whether the menu is checkable.\r\n */\r\n @Prop()\r\n checkable = false;\r\n\r\n /**\r\n * Selector for the element the dropdown options should not be overflowing.\r\n */\r\n @Prop()\r\n boundary?: string;\r\n\r\n /**\r\n * Force placement of dropdown.\r\n *\r\n * This property overrides `dropdownAlign`.\r\n */\r\n @Prop()\r\n placement?: Placement;\r\n\r\n /**\r\n * Set position strategy of dropdown options\r\n */\r\n @Prop()\r\n strategy: \"auto\" | \"absolute\" | \"fixed\" = \"auto\";\r\n\r\n @Watch(\"placement\")\r\n @Watch(\"dropdownAlign\")\r\n watchPosition() {\r\n if (!this.popper) {\r\n return;\r\n }\r\n\r\n this.popper.setOptions({\r\n placement: this.placement || (this.dropdownAlign === \"right\" ? \"bottom-end\" : \"bottom-start\"),\r\n });\r\n }\r\n\r\n @Watch(\"dropdownOptionsOffset\")\r\n watchOptionsOffset() {\r\n this.popper?.setOptions({\r\n modifiers: [\r\n {\r\n name: \"offset\",\r\n options: {\r\n offset: [0, this.dropdownOptionsOffset],\r\n },\r\n },\r\n ],\r\n });\r\n }\r\n\r\n @Watch(\"strategy\")\r\n watchStrategy() {\r\n this.setStrategy();\r\n }\r\n\r\n private setStrategy() {\r\n if (!this.popper) {\r\n return;\r\n }\r\n\r\n if (this.strategy === \"absolute\" || this.strategy === \"fixed\") {\r\n this.popper.setOptions({\r\n strategy: this.strategy,\r\n });\r\n\r\n return;\r\n }\r\n\r\n let element: Element | null = this.host;\r\n\r\n const boundary = this.boundary || document;\r\n\r\n while (element && element.parentNode !== boundary) {\r\n element = element.parentNode instanceof ShadowRoot ? element.parentNode.host : element.parentElement;\r\n if (element !== null && hasOverflow(element)) {\r\n this.popper.setOptions({\r\n strategy: \"fixed\",\r\n });\r\n\r\n return;\r\n }\r\n }\r\n\r\n this.popper.setOptions({\r\n strategy: \"absolute\",\r\n });\r\n }\r\n\r\n @Element()\r\n host!: HTMLDsoDropdownMenuElement;\r\n\r\n private popper: PopperInstance | undefined;\r\n\r\n get button(): HTMLButtonElement {\r\n const button = this.host.querySelector('button[slot=\"toggle\"]');\r\n\r\n if (!(button instanceof HTMLButtonElement)) {\r\n throw new ReferenceError(\"Mandatory toggle button not found\");\r\n }\r\n\r\n return button;\r\n }\r\n\r\n private tabbables(withButton: boolean): FocusableElement[] {\r\n const tabbables = this.host.isConnected ? tabbable(this.host) : [];\r\n\r\n return withButton ? tabbables : tabbables.filter((element) => element !== this.button);\r\n }\r\n\r\n componentDidLoad() {\r\n this.button.setAttribute(\"aria-haspopup\", \"menu\");\r\n this.button.setAttribute(\"aria-expanded\", \"false\");\r\n if (!this.button.id) {\r\n this.button.id = uuidv4();\r\n }\r\n\r\n const options = this.host.querySelector(\".dso-dropdown-options\");\r\n if (!options) {\r\n throw new ReferenceError(\"Dropdown options not found\");\r\n }\r\n\r\n options.setAttribute(\"role\", \"menu\");\r\n options.setAttribute(\"aria-labelledby\", this.button.id);\r\n\r\n for (const ul of Array.from(this.host.getElementsByTagName(\"ul\"))) {\r\n ul.setAttribute(\"role\", \"group\");\r\n for (const li of Array.from(ul.getElementsByTagName(\"li\"))) {\r\n li.setAttribute(\"role\", \"none\");\r\n }\r\n }\r\n\r\n if (this.popper) {\r\n return;\r\n }\r\n\r\n const dropdownOptionsElement = this.host.querySelector(\".dso-dropdown-options\");\r\n\r\n if (!(dropdownOptionsElement instanceof HTMLElement)) {\r\n throw new Error(\"dropdown options element is not instanceof HTMLElement\");\r\n }\r\n\r\n this.popper = createPopper(this.button, dropdownOptionsElement, {\r\n placement: this.placement || (this.dropdownAlign === \"right\" ? \"bottom-end\" : \"bottom-start\"),\r\n modifiers: [\r\n {\r\n name: \"offset\",\r\n options: {\r\n offset: [0, this.dropdownOptionsOffset],\r\n },\r\n },\r\n {\r\n name: \"preventOverflow\",\r\n options: {\r\n boundary: this.boundary ? document.querySelector(this.boundary) : null,\r\n },\r\n enabled: this.boundary !== undefined,\r\n },\r\n ],\r\n });\r\n }\r\n\r\n componentDidRender() {\r\n this.setStrategy();\r\n if (this.open) {\r\n this.popper?.update();\r\n }\r\n\r\n for (const li of Array.from(this.host.getElementsByTagName(\"li\"))) {\r\n for (const tab of this.host.isConnected ? tabbable(li) : []) {\r\n tab.setAttribute(\"role\", this.checkable ? \"menuitemradio\" : \"menuitem\");\r\n\r\n if (this.checkable) {\r\n tab.setAttribute(\"aria-checked\", li.classList.contains(\"dso-checked\").toString());\r\n }\r\n }\r\n }\r\n\r\n this.button.setAttribute(\"aria-expanded\", this.open ? \"true\" : \"false\");\r\n }\r\n\r\n @Listen(\"click\", { target: \"window\" })\r\n onClick(event: MouseEvent) {\r\n const composedPath = event.composedPath();\r\n\r\n if (this.isToggleButtonEvent(composedPath)) {\r\n this.open = !this.open;\r\n } else if (this.open && this.isMenuItemEvent(composedPath)) {\r\n this.open = false;\r\n }\r\n }\r\n\r\n private isToggleButtonEvent(composedPath: EventTarget[]) {\r\n return composedPath.includes(this.button);\r\n }\r\n\r\n private isMenuItemEvent(composedPath: EventTarget[]) {\r\n return composedPath.includes(this.host) && !this.isToggleButtonEvent(composedPath);\r\n }\r\n\r\n disconnectedCallback() {\r\n this.popper?.destroy();\r\n }\r\n\r\n private focusOutListener = (event: FocusEvent) => {\r\n if (\r\n this.open &&\r\n (!(event.relatedTarget instanceof HTMLElement) || !this.tabbables(true).includes(event.relatedTarget))\r\n ) {\r\n this.open = false;\r\n }\r\n };\r\n\r\n @Listen(\"keydown\", { target: \"window\" })\r\n keyDownListener(event: KeyboardEvent) {\r\n if (event.defaultPrevented || !this.open) {\r\n return;\r\n }\r\n\r\n switch (event.key) {\r\n case \"Tab\":\r\n if (event.shiftKey) {\r\n this.tabInPopup(this.tabbables(true), -1);\r\n } else {\r\n this.tabInPopup(this.tabbables(true), 1);\r\n }\r\n\r\n break;\r\n case \"ArrowDown\":\r\n this.tabInPopup(this.tabbables(false), 1);\r\n break;\r\n\r\n case \"ArrowUp\":\r\n this.tabInPopup(this.tabbables(false), -1);\r\n break;\r\n\r\n case \"Escape\":\r\n this.escape();\r\n break;\r\n\r\n case \" \":\r\n if (event.target instanceof HTMLElement) {\r\n event.target.click();\r\n }\r\n\r\n break;\r\n\r\n default:\r\n return;\r\n }\r\n\r\n event.preventDefault();\r\n }\r\n\r\n private tabInPopup(tabbables: FocusableElement[], direction: number) {\r\n const currentIndex = tabbables.findIndex((e) => e === getActiveElement());\r\n\r\n let nextIndex = currentIndex + direction;\r\n if (nextIndex >= tabbables.length) {\r\n nextIndex = 0;\r\n } else if (nextIndex < 0) {\r\n nextIndex = tabbables.length - 1;\r\n }\r\n\r\n tabbables[nextIndex]?.focus();\r\n }\r\n\r\n private escape = () => {\r\n this.button.focus();\r\n this.open = false;\r\n };\r\n\r\n render() {\r\n return (\r\n <Host onFocusout={this.focusOutListener}>\r\n <slot name=\"toggle\" />\r\n <div hidden={!this.open}>\r\n <slot />\r\n </div>\r\n </Host>\r\n );\r\n }\r\n}\r\n"],"version":3}
@@ -0,0 +1,63 @@
1
+ import { p as proxyCustomElement, H, e as createEvent, h, F as Fragment } from './p-DHO_Za64.js';
2
+ import { v as v4 } from './p-BF0_OXTe.js';
3
+
4
+ const slideToggleCss = ".sc-dso-slide-toggle-h{display:inline-block;padding-block-start:2px}button.dso-slider.sc-dso-slide-toggle{border:0;padding:0}button.dso-slider.sc-dso-slide-toggle:focus-visible{outline:2px solid #323232;outline-offset:1px}button.dso-slider.sc-dso-slide-toggle svg.sc-dso-slide-toggle rect.sc-dso-slide-toggle{fill:#999;transition:fill 0.25s}button.dso-slider.sc-dso-slide-toggle svg.sc-dso-slide-toggle circle.sc-dso-slide-toggle{transition:transform 260ms cubic-bezier(0.4, 0, 0.2, 1);transform:translateX(10px);fill:#fff}button.dso-slider[aria-checked=true].sc-dso-slide-toggle svg.sc-dso-slide-toggle rect.sc-dso-slide-toggle{fill:#275937}button.dso-slider[aria-checked=true].sc-dso-slide-toggle svg.sc-dso-slide-toggle circle.sc-dso-slide-toggle{transform:translateX(30px);fill:#fff}button.dso-slider[disabled].sc-dso-slide-toggle svg.sc-dso-slide-toggle rect.sc-dso-slide-toggle{fill:#ccc}button.dso-slider[disabled].sc-dso-slide-toggle svg.sc-dso-slide-toggle circle.sc-dso-slide-toggle{fill:#e5e5e5}button.dso-slider[disabled][aria-checked=true].sc-dso-slide-toggle svg.sc-dso-slide-toggle rect.sc-dso-slide-toggle{fill:#a8bcaf}button.dso-slider[disabled][aria-checked=true].sc-dso-slide-toggle svg.sc-dso-slide-toggle circle.sc-dso-slide-toggle{fill:#e5e5e5}.dso-slider.sc-dso-slide-toggle{border-radius:24px;display:inline-flex}.dso-slider.sc-dso-slide-toggle:hover{cursor:pointer}";
5
+
6
+ const SlideToggle = /*@__PURE__*/ proxyCustomElement(class SlideToggle extends H {
7
+ constructor() {
8
+ super();
9
+ this.__registerHost();
10
+ this.dsoActiveChange = createEvent(this, "dsoActiveChange", 5);
11
+ /**
12
+ * Set to true if Slide Toggle is checked.
13
+ */
14
+ this.checked = false;
15
+ /**
16
+ * Disables the Slide Toggle, preventing it from checking/unchecking and therefor not emitting any events.
17
+ */
18
+ this.disabled = false;
19
+ /**
20
+ * Provide an `id` for the `<button>`. Useful for placing your to place your own `<label for="id">`.
21
+ */
22
+ this.identifier = v4();
23
+ }
24
+ handleSwitch(e) {
25
+ this.dsoActiveChange.emit({
26
+ originalEvent: e,
27
+ checked: !this.checked,
28
+ });
29
+ }
30
+ componentWillLoad() {
31
+ this.hasVisibleLabel = this.host.querySelector("*") !== null;
32
+ }
33
+ render() {
34
+ return (h(Fragment, null, h("button", Object.assign({ key: 'b7dc0110eb83aa234b1d2b225ca8e4a3bfec426c', id: this.identifier, role: "switch", class: "dso-slider", "aria-checked": "" + this.checked, disabled: this.disabled, onClick: (e) => this.handleSwitch(e) }, (this.accessibleLabel ? { "aria-label": this.accessibleLabel } : {}), (this.labelledbyId ? { "aria-labelledby": this.labelledbyId } : {})), h("svg", { key: '8dfb32aa94195a577fbd960c33dfd8d23afa2921', xmlns: "http://www.w3.org/2000/svg", width: "40", height: "20", viewBox: "0 0 40 20" }, h("g", { key: 'b291fd2d918322729a1564a9d856ed66cb4465ad', fill: "none", "fill-rule": "evenodd" }, h("rect", { key: 'c51051570b80c247f4ff049ebcc7addd38a5f669', width: "40", height: "20", fill: "currentColor", rx: "10" }), h("circle", { key: '12e0f02816079d4ca1f9953f96ac6ae844f7d05a', cy: "10", r: "8", fill: "currentColor" })))), this.hasVisibleLabel && (h("label", { key: '56f7be1b63e0aed9b1048b2a6c8b21b1ab9360d8', htmlFor: this.identifier }, h("slot", { key: '4c6a01b02ca3b63959e91d6a5d94ce2983c51a2c' })))));
35
+ }
36
+ get host() { return this; }
37
+ static get style() { return slideToggleCss; }
38
+ }, [6, "dso-slide-toggle", {
39
+ "checked": [4],
40
+ "disabled": [4],
41
+ "accessibleLabel": [1, "accessible-label"],
42
+ "labelledbyId": [1, "labelledby-id"],
43
+ "identifier": [1],
44
+ "hasVisibleLabel": [32]
45
+ }]);
46
+ function defineCustomElement() {
47
+ if (typeof customElements === "undefined") {
48
+ return;
49
+ }
50
+ const components = ["dso-slide-toggle"];
51
+ components.forEach(tagName => { switch (tagName) {
52
+ case "dso-slide-toggle":
53
+ if (!customElements.get(tagName)) {
54
+ customElements.define(tagName, SlideToggle);
55
+ }
56
+ break;
57
+ } });
58
+ }
59
+
60
+ export { SlideToggle as S, defineCustomElement as d };
61
+ //# sourceMappingURL=p-xNnEBBZG.js.map
62
+
63
+ //# sourceMappingURL=p-xNnEBBZG.js.map
@@ -0,0 +1 @@
1
+ {"file":"p-xNnEBBZG.js","mappings":";;;AAAA,MAAM,cAAc,GAAG,g3CAAg3C;;MCW13C,WAAW,iBAAAA,kBAAA,CAAA,MAAA,WAAA,SAAAC,CAAA,CAAA;AANxB,IAAA,WAAA,GAAA;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A,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAG,IAAI,EAAC,MAAM,EAAA,WAAA,EAAW,SAAS,EAAA,EAChC,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,cAAc,EAAC,EAAE,EAAC,IAAI,EAAG,CAAA,EAC3D,CAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAQ,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,GAAG,EAAC,IAAI,EAAC,cAAc,EAAG,CAAA,CAC1C,CACA,CACC,EACR,IAAI,CAAC,eAAe,KACnB,8DAAO,OAAO,EAAE,IAAI,CAAC,UAAU,EAAA,EAC7B,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAQ,CACF,CACT,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/slide-toggle/slide-toggle.scss?tag=dso-slide-toggle&encapsulation=scoped","src/components/slide-toggle/slide-toggle.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/variables/colors\";\r\n@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/variables/typography\";\r\n\r\n$slide-toggle-height: 20px;\r\n\r\n:host {\r\n display: inline-block;\r\n padding-block-start: (typography.$line-height-base * typography.$font-size-base - $slide-toggle-height) * 0.5;\r\n}\r\n\r\nbutton.dso-slider {\r\n border: 0;\r\n padding: 0;\r\n\r\n &:focus-visible {\r\n outline: 2px solid colors.$grijs-80;\r\n outline-offset: 1px;\r\n }\r\n\r\n svg {\r\n rect {\r\n fill: colors.$grijs-40;\r\n transition: fill 0.25s;\r\n }\r\n\r\n circle {\r\n @include utilities.transition(transform);\r\n\r\n transform: translateX(10px);\r\n fill: colors.$wit;\r\n }\r\n }\r\n\r\n &[aria-checked=\"true\"] svg {\r\n rect {\r\n fill: colors.$bosgroen;\r\n }\r\n\r\n circle {\r\n transform: translateX(30px);\r\n fill: colors.$wit;\r\n }\r\n }\r\n\r\n &[disabled] svg {\r\n rect {\r\n fill: colors.$grijs-20;\r\n }\r\n\r\n circle {\r\n fill: colors.$grijs-10;\r\n }\r\n }\r\n\r\n &[disabled][aria-checked=\"true\"] svg {\r\n rect {\r\n fill: colors.$bosgroen-40;\r\n }\r\n\r\n circle {\r\n fill: colors.$grijs-10;\r\n }\r\n }\r\n}\r\n\r\n.dso-slider {\r\n border-radius: units.$u3;\r\n display: inline-flex;\r\n\r\n &:hover {\r\n cursor: pointer;\r\n }\r\n}\r\n","import { Component, ComponentInterface, Element, Event, EventEmitter, Fragment, Prop, State, h } from \"@stencil/core\";\r\nimport { v4 } from \"uuid\";\r\n\r\nimport { SlideToggleActiveEvent } from \"./slide-toggle.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-slide-toggle\",\r\n styleUrl: \"slide-toggle.scss\",\r\n scoped: true,\r\n shadow: false,\r\n})\r\nexport class SlideToggle implements ComponentInterface {\r\n @Element()\r\n private host!: HTMLDsoSlideToggleElement;\r\n\r\n /**\r\n * Set to true if Slide Toggle is checked.\r\n */\r\n @Prop()\r\n checked = false;\r\n\r\n /**\r\n * Disables the Slide Toggle, preventing it from checking/unchecking and therefor not emitting any events.\r\n */\r\n @Prop()\r\n disabled = false;\r\n\r\n /**\r\n * When provided the `<button>` will be labelled with `aria-label`. For a visible label provide a `<span>` inside the component.\r\n */\r\n @Prop()\r\n accessibleLabel?: string;\r\n\r\n /**\r\n * Provide the `id` of the element that labels this element. this property sets the `aria-labelledby` on the switch button.\r\n */\r\n @Prop()\r\n labelledbyId?: string;\r\n\r\n @State()\r\n hasVisibleLabel?: boolean;\r\n\r\n /**\r\n * Provide an `id` for the `<button>`. Useful for placing your to place your own `<label for=\"id\">`.\r\n */\r\n @Prop()\r\n identifier = v4();\r\n\r\n /**\r\n * Emitted when user checks or unchecks the Slide Toggle.\r\n */\r\n @Event({ composed: false })\r\n dsoActiveChange!: EventEmitter<SlideToggleActiveEvent>;\r\n\r\n private handleSwitch(e: Event): void {\r\n this.dsoActiveChange.emit({\r\n originalEvent: e,\r\n checked: !this.checked,\r\n });\r\n }\r\n\r\n componentWillLoad(): void {\r\n this.hasVisibleLabel = this.host.querySelector(\"*\") !== null;\r\n }\r\n\r\n render() {\r\n return (\r\n <>\r\n <button\r\n id={this.identifier}\r\n role=\"switch\"\r\n class=\"dso-slider\"\r\n aria-checked={\"\" + this.checked}\r\n disabled={this.disabled}\r\n onClick={(e) => this.handleSwitch(e)}\r\n {...(this.accessibleLabel ? { \"aria-label\": this.accessibleLabel } : {})}\r\n {...(this.labelledbyId ? { \"aria-labelledby\": this.labelledbyId } : {})}\r\n >\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"40\" height=\"20\" viewBox=\"0 0 40 20\">\r\n <g fill=\"none\" fill-rule=\"evenodd\">\r\n <rect width=\"40\" height=\"20\" fill=\"currentColor\" rx=\"10\" />\r\n <circle cy=\"10\" r=\"8\" fill=\"currentColor\" />\r\n </g>\r\n </svg>\r\n </button>\r\n {this.hasVisibleLabel && (\r\n <label htmlFor={this.identifier}>\r\n <slot />\r\n </label>\r\n )}\r\n </>\r\n );\r\n }\r\n}\r\n"],"version":3}
@@ -187,14 +187,14 @@ const AccordionSection = class {
187
187
  const { variant, reverseAlign } = (_a = this.accordionState) !== null && _a !== void 0 ? _a : {};
188
188
  const hasAddons = !!this.statusDescription || !!this.status || !!this.icon || !!this.attachmentCount;
189
189
  const showSlideToggle = this.activatable && variant === "compact-black" && !reverseAlign;
190
- return (index.h(index.Host, { key: '4b8933f4a7224bc4c4faeeb7952b85e0f8abc6b1', class: {
190
+ return (index.h(index.Host, { key: '303ebed8d1cac413142a54fa6eec261f0bd6d993', class: {
191
191
  "dso-accordion-section": true,
192
- ["dso-accordion-" + variant]: true,
192
+ ["dso-accordion-" + variant]: !!variant,
193
193
  "dso-nested-accordion": this.hasNestedAccordion || this.containsNestedAccordion,
194
194
  "dso-accordion-reverse-align": reverseAlign !== null && reverseAlign !== void 0 ? reverseAlign : false,
195
195
  ["dso-accordion-wijzigactie-" + this.wijzigactie]: !!this.wijzigactie,
196
196
  "dso-accordion-section-activate": showSlideToggle,
197
- }, hidden: !variant, onMouseenter: () => (this.hover = true), onMouseleave: () => (this.hover = false) }, index.h(Handle, { key: '790f4fbb2a06e78be36e714becc606771ea6422e', heading: this.heading, ref: (element) => (this.sectionHeading = element) }, index.h(HandleElement, { key: '9aa838b5a1f7129161f58e7a67aec6b2923ae319', handleUrl: this.handleUrl, onClick: this.handleClick, open: this.open, showSlideToggle: showSlideToggle, active: this.active, onActiveChange: this.handleActiveChange, handleElementRef: (e) => (this.handleElementRef = e) }, reverseAlign ? (index.h(index.Fragment, null, this.icon && (index.h("div", { class: "dso-section-handle-addons" }, index.h(HandleIcon, { icon: this.icon }))), index.h("dso-renvooi", { value: this.handleTitle }), this.label && (index.h("dso-label", { status: this.labelStatus, compact: true }, this.label)), index.h("div", { class: "dso-section-handle-addons" }, this.statusDescription && index.h("span", { class: "dso-status" }, this.statusDescription), index.h("dso-icon", { class: "dso-section-handle-chevron", icon: "chevron-down" })))) : (index.h(index.Fragment, null, index.h("dso-icon", { class: "dso-section-handle-chevron", icon: "chevron-right" }), this.status && index.h("span", { class: "sr-only" }, stateMap[this.status]), index.h("span", null, index.h("dso-renvooi", { value: this.handleTitle }), this.isNeutral && (index.h("dso-icon", { class: "info-icon", icon: this.open || this.hover ? "info-active" : "info" }))), this.label && (index.h("dso-label", { status: this.labelStatus, compact: true }, this.label)), hasAddons && (index.h("div", { class: "dso-section-handle-addons" }, this.statusDescription && index.h("span", { class: "dso-status" }, this.statusDescription), index.h(HandleIcon, { state: this.status, icon: this.icon, attachmentCount: this.attachmentCount }))))))), index.h("dso-expandable", { key: '816c9ecfcfcea8ecc3c35606fd64111da5b61366', class: "dso-section-body", open: this.open, enableAnimation: true, minimumHeight: this.isNeutral ? 0 : 4, onDsoExpandableAnimationStart: this.handleExpandableAnimationStart, onDsoExpandableAnimationEnd: this.handleExpandableAnimationEnd }, index.h("div", { key: '54c23da5a0d25bc29fce23ba44fe7277b2b387d7', class: "dso-section-body-content", ref: (element) => (this.sectionBody = element) }, index.h("slot", { key: 'd9f1d30c186c5f3e0613e1fded58f5ba0f6e70ca' })))));
197
+ }, hidden: !variant, onMouseenter: () => (this.hover = true), onMouseleave: () => (this.hover = false) }, index.h(Handle, { key: '9c928e6f05951e7918ef5031f368f91c3da9c83a', heading: this.heading, ref: (element) => (this.sectionHeading = element) }, index.h(HandleElement, { key: '2655d9059f74522be03ad988ed91785da5ef6ade', handleUrl: this.handleUrl, onClick: this.handleClick, open: this.open, showSlideToggle: showSlideToggle, active: this.active, onActiveChange: this.handleActiveChange, handleElementRef: (e) => (this.handleElementRef = e) }, reverseAlign ? (index.h(index.Fragment, null, this.icon && (index.h("div", { class: "dso-section-handle-addons" }, index.h(HandleIcon, { icon: this.icon }))), index.h("dso-renvooi", { value: this.handleTitle }), this.label && (index.h("dso-label", { status: this.labelStatus, compact: true }, this.label)), index.h("div", { class: "dso-section-handle-addons" }, this.statusDescription && index.h("span", { class: "dso-status" }, this.statusDescription), index.h("dso-icon", { class: "dso-section-handle-chevron", icon: "chevron-down" })))) : (index.h(index.Fragment, null, index.h("dso-icon", { class: "dso-section-handle-chevron", icon: "chevron-right" }), this.status && index.h("span", { class: "sr-only" }, stateMap[this.status]), index.h("span", null, index.h("dso-renvooi", { value: this.handleTitle }), this.isNeutral && (index.h("dso-icon", { class: "info-icon", icon: this.open || this.hover ? "info-active" : "info" }))), this.label && (index.h("dso-label", { status: this.labelStatus, compact: true }, this.label)), hasAddons && (index.h("div", { class: "dso-section-handle-addons" }, this.statusDescription && index.h("span", { class: "dso-status" }, this.statusDescription), index.h(HandleIcon, { state: this.status, icon: this.icon, attachmentCount: this.attachmentCount }))))))), index.h("dso-expandable", { key: '0033e8900a7f7c2b521f6ec0528d4bb80b98c85f', class: "dso-section-body", open: this.open, enableAnimation: true, minimumHeight: this.isNeutral ? 0 : 4, onDsoExpandableAnimationStart: this.handleExpandableAnimationStart, onDsoExpandableAnimationEnd: this.handleExpandableAnimationEnd }, index.h("div", { key: '8b87250e1310e61b9e9a344f0b57bb5deea5e18c', class: "dso-section-body-content", ref: (element) => (this.sectionBody = element) }, index.h("slot", { key: '1c346b660c4a417a81ac1ecb242c2e90f6a1974a' })))));
198
198
  }
199
199
  get host() { return index.getElement(this); }
200
200
  };
@@ -1 +1 @@
1
- {"file":"dso-accordion-section.entry.cjs.js","mappings":";;;;AAMO,MAAM,QAAQ,GAA0C;AAC7D,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,OAAO,EAAE,eAAe;AACxB,IAAA,MAAM,EAAE,OAAO;AACf,IAAA,KAAK,EAAE,OAAO;CACf;;ACZD,MAAM,mBAAmB,GAAG,ohjBAAohjB;;ACkChjjB;AACA,MAAM,GAAG,GAAI,MAAc,CAAC,SAAS,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,YAAa,GAAC;AAEhG,MAAM,aAAa,GAQd,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,cAAc,EAAE,gBAAgB,EAAE,EAAE,QAAQ,KAAI;IACzG,IAAI,SAAS,EAAE;AACb,QAAA,QACEA,OAAA,CAAAC,cAAA,EAAA,IAAA,EACED,OAAG,CAAA,GAAA,EAAA,EAAA,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAiB,eAAA,EAAA,IAAI,GAAG,MAAM,GAAG,OAAO,EAAE,GAAG,EAAE,gBAAgB,EAChG,EAAA,QAAQ,CACP,EACH,eAAe,KACdA,OAAA,CAAA,kBAAA,EAAA,EAAkB,eAAe,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AA,0CAAA,EAAK,KAAK,EAAC,0BAA0B,EAAC,GAAG,EAAE,CAAC,OAAO,MAAM,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,EAAA,EAClFA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAQ,CACJ,CACS,CACZ;;;;;;;;","names":["h","Fragment","forceUpdate","Host"],"sources":["src/components/accordion/components/accordion-section.interfaces.ts","src/components/accordion/components/accordion-section.scss?tag=dso-accordion-section&encapsulation=shadow","src/components/accordion/components/accordion-section.tsx"],"sourcesContent":["export type AccordionSectionState = \"success\" | \"info\" | \"warning\" | \"danger\" | \"error\";\r\n\r\nexport type AccordionHeading = \"h2\" | \"h3\" | \"h4\" | \"h5\";\r\n\r\nexport type AccordionSectionWijzigactie = \"voegtoe\" | \"verwijder\";\r\n\r\nexport const stateMap: Record<AccordionSectionState, string> = {\r\n success: \"succes:\",\r\n info: \"info:\",\r\n warning: \"waarschuwing:\",\r\n danger: \"fout:\",\r\n error: \"fout:\",\r\n};\r\n\r\nexport interface AccordionSectionToggleClickEvent {\r\n /**\r\n * The original MouseEvent that triggered the click.\r\n *\r\n * In case the Section Handle is an <a> this event can be used to preventDefault() so the framework router is reponsible for navigating the user.\r\n */\r\n originalEvent?: MouseEvent;\r\n\r\n /**\r\n * The requested state. If the Accordion Section is closed, `open = true`.\r\n */\r\n open: boolean;\r\n}\r\n\r\nexport interface AccordionSectionAnimationStartEvent {\r\n /**\r\n * Helper function to scroll the Accordion Section into view.\r\n */\r\n scrollIntoView(behavior?: ScrollBehavior): void;\r\n\r\n /**\r\n * Whether or not the Accordion opening or closing.\r\n */\r\n animation: \"opening\" | \"closing\";\r\n}\r\n\r\nexport interface AccordionSectionAnimationEndEvent {\r\n /**\r\n * Helper function to scroll the Accordion Section into view.\r\n */\r\n scrollIntoView(behavior?: ScrollBehavior): void;\r\n\r\n /**\r\n * The state of the Accordion Section after animation.\r\n */\r\n open: boolean;\r\n}\r\n\r\nexport interface AccordionSectionActiveChangeEvent {\r\n /**\r\n * De current status van de Accordion Section.\r\n */\r\n current: boolean;\r\n\r\n /**\r\n * De desired status van de Accordion Section.\r\n */\r\n next: boolean;\r\n\r\n originalEvent: Event;\r\n}\r\n","@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/variables/colors\";\r\n@use \"~dso-toolkit/src/variables/typography\";\r\n\r\n@use \"~dso-toolkit/src/components/accordion\";\r\n@use \"~dso-toolkit/src/components/link\";\r\n\r\n@use \"accordion-section-theme-compact\";\r\n@use \"accordion-section-theme-compact-black\";\r\n@use \"accordion-section-theme-conclusion\";\r\n@use \"accordion-section-theme-default\";\r\n@use \"accordion-section-theme-neutral\";\r\n\r\n@include utilities.box-sizing();\r\n\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\n:host {\r\n display: block;\r\n\r\n .dso-section-handle {\r\n font-size: 1em;\r\n font-weight: 600;\r\n line-height: accordion.$handle-line-height;\r\n margin: 0;\r\n position: relative;\r\n\r\n > a:active {\r\n text-decoration: none;\r\n }\r\n\r\n a {\r\n @include link.clean();\r\n }\r\n\r\n .dso-status {\r\n color: colors.$zwart;\r\n font-size: typography.$font-size-small;\r\n font-weight: 400;\r\n }\r\n }\r\n\r\n .dso-section-handle > button,\r\n .dso-section-handle > a {\r\n align-items: flex-start;\r\n background-color: transparent;\r\n border: 0;\r\n cursor: pointer;\r\n display: flex;\r\n font-family: typography.$font-family-base;\r\n font-size: 1em;\r\n font-weight: 600;\r\n line-height: accordion.$handle-line-height;\r\n margin: 0;\r\n padding-block: accordion.$block-padding;\r\n padding-inline: accordion.$inline-padding;\r\n text-align: start;\r\n inline-size: 100%;\r\n overflow-wrap: anywhere;\r\n\r\n dso-icon {\r\n flex-shrink: 0;\r\n\r\n &.dso-section-handle-chevron {\r\n @include utilities.transition(transform);\r\n\r\n transform: rotate(0);\r\n }\r\n }\r\n\r\n > .dso-section-handle-addons:first-child,\r\n > dso-icon:first-child {\r\n margin-inline-end: units.$u1;\r\n }\r\n\r\n > dso-icon:last-child {\r\n margin-inline-start: auto;\r\n }\r\n\r\n > .dso-section-handle-addons:last-child {\r\n margin-inline-start: auto;\r\n\r\n dso-attachments-counter,\r\n dso-icon {\r\n margin-inline-start: units.$u1;\r\n }\r\n }\r\n\r\n > dso-label {\r\n margin-inline-start: auto;\r\n padding-inline-start: units.$u1;\r\n word-break: normal;\r\n\r\n & + dso-icon:last-child,\r\n & + .dso-section-handle-addons:last-child {\r\n margin-inline-start: units.$u1;\r\n }\r\n }\r\n }\r\n}\r\n\r\n:host([open]:not([open=\"false\"])) {\r\n .dso-section-handle {\r\n > button,\r\n > a {\r\n .dso-section-handle-chevron {\r\n &:first-child {\r\n transform: rotate(90deg);\r\n }\r\n\r\n &:last-child {\r\n transform: rotate(-180deg);\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n.dso-section-body {\r\n background-color: colors.$wit;\r\n border-block-start: 0;\r\n\r\n .dso-section-body-content {\r\n padding-block: units.$u2 + accordion.$border-radius units.$u2;\r\n padding-inline: units.$u2;\r\n }\r\n}\r\n\r\n// Default\r\n:host(.dso-accordion-default) {\r\n @include accordion-section-theme-default.dso-web-component-accordion-default();\r\n}\r\n\r\n:host(.dso-accordion-default[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-default.dso-web-component-accordion-default-open();\r\n}\r\n\r\n:host(.dso-accordion-default.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-default.dso-web-component-accordion-default-open-nested();\r\n}\r\n\r\n// Compact\r\n:host(.dso-accordion-compact) {\r\n @include accordion-section-theme-compact.dso-web-component-accordion-compact();\r\n}\r\n\r\n:host(.dso-accordion-compact.dso-accordion-reverse-align) {\r\n @include accordion-section-theme-compact.dso-web-component-accordion-compact-reverse();\r\n}\r\n\r\n:host(.dso-accordion-compact[open]:not([open=\"false\"]):not(.dso-nested-accordion)) {\r\n @include accordion-section-theme-compact.dso-web-component-accordion-compact-open();\r\n}\r\n\r\n:host(.dso-accordion-compact.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-compact.dso-web-component-accordion-compact-open-nested();\r\n}\r\n\r\n// Compact black\r\n:host(.dso-accordion-compact-black) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black();\r\n}\r\n\r\n:host(.dso-accordion-compact-black.dso-accordion-section-activate) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black();\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-activate();\r\n}\r\n\r\n:host(.dso-accordion-compact-black.dso-accordion-wijzigactie-voegtoe) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-voegtoe();\r\n}\r\n\r\n:host(.dso-accordion-compact-black.dso-accordion-wijzigactie-verwijder) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-verwijder();\r\n}\r\n\r\n:host(.dso-accordion-compact-black.dso-accordion-reverse-align) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-reverse();\r\n}\r\n\r\n:host(.dso-accordion-compact-black[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-open();\r\n}\r\n\r\n:host(.dso-accordion-compact-black.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-open-nested();\r\n}\r\n\r\n// Conclusion\r\n:host(.dso-accordion-conclusion) {\r\n @include accordion-section-theme-conclusion.dso-web-component-accordion-conclusion();\r\n}\r\n\r\n:host(.dso-accordion-conclusion[open]:not([open=\"false\"]):not(.dso-nested-accordion)) {\r\n @include accordion-section-theme-conclusion.dso-web-component-accordion-conclusion-open();\r\n}\r\n\r\n:host(.dso-accordion-conclusion.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-conclusion.dso-web-component-accordion-conclusion-open-nested();\r\n}\r\n\r\n// Neutral\r\n:host(.dso-accordion-neutral) {\r\n @include accordion-section-theme-neutral.dso-web-component-accordion-neutral();\r\n}\r\n\r\n:host(.dso-accordion-neutral[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-neutral.dso-web-component-accordion-neutral-open();\r\n}\r\n\r\n:host(.dso-accordion-neutral.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-neutral.dso-web-component-accordion-neutral-open-nested();\r\n}\r\n","import {\r\n Component,\r\n ComponentInterface,\r\n Element,\r\n Event,\r\n EventEmitter,\r\n Fragment,\r\n FunctionalComponent,\r\n Host,\r\n Method,\r\n Prop,\r\n State,\r\n forceUpdate,\r\n h,\r\n} from \"@stencil/core\";\r\n\r\nimport { DsoSlideToggleCustomEvent } from \"../../../components\";\r\nimport { ExpandableAnimationEndEvent } from \"../../expandable/expandable\";\r\nimport { LabelStatus } from \"../../label/label.interfaces\";\r\nimport { RenvooiValue } from \"../../renvooi/renvooi.interfaces\";\r\nimport { SlideToggleActiveEvent } from \"../../slide-toggle/slide-toggle.interfaces\";\r\nimport { AccordionInternalState } from \"../accordion.interfaces\";\r\n\r\nimport {\r\n AccordionHeading,\r\n AccordionSectionActiveChangeEvent,\r\n AccordionSectionAnimationEndEvent,\r\n AccordionSectionAnimationStartEvent,\r\n AccordionSectionState,\r\n AccordionSectionToggleClickEvent,\r\n AccordionSectionWijzigactie,\r\n stateMap,\r\n} from \"./accordion-section.interfaces\";\r\n\r\n// eslint-disable-next-line no-console\r\nconst log = (window as any)[\"_dsoLog\"] === true ? console.log.bind(console.log) : function () {};\r\n\r\nconst HandleElement: FunctionalComponent<{\r\n handleUrl: string | undefined;\r\n open: boolean;\r\n showSlideToggle: boolean;\r\n active: boolean;\r\n onActiveChange: (e: DsoSlideToggleCustomEvent<SlideToggleActiveEvent>) => void;\r\n handleElementRef: (element: HTMLAnchorElement | HTMLButtonElement | undefined) => void;\r\n onClick: (e: MouseEvent) => void;\r\n}> = ({ handleUrl, onClick, open, showSlideToggle, active, onActiveChange, handleElementRef }, children) => {\r\n if (handleUrl) {\r\n return (\r\n <>\r\n <a href={handleUrl} onClick={onClick} aria-expanded={open ? \"true\" : \"false\"} ref={handleElementRef}>\r\n {children}\r\n </a>\r\n {showSlideToggle && (\r\n <dso-slide-toggle accessibleLabel=\"Toon op kaart\" checked={active} onDsoActiveChange={onActiveChange} />\r\n )}\r\n </>\r\n );\r\n }\r\n\r\n return (\r\n <>\r\n <button type=\"button\" onClick={onClick} aria-expanded={open ? \"true\" : \"false\"} ref={handleElementRef}>\r\n {children}\r\n </button>\r\n {showSlideToggle && (\r\n <dso-slide-toggle accessibleLabel=\"Toon op kaart\" checked={active} onDsoActiveChange={onActiveChange} />\r\n )}\r\n </>\r\n );\r\n};\r\n\r\nconst Handle: FunctionalComponent<{\r\n heading: AccordionHeading;\r\n ref: (element: HTMLHeadingElement | undefined) => void;\r\n}> = ({ heading, ref }, children) => {\r\n switch (heading) {\r\n default:\r\n case \"h2\":\r\n return (\r\n <h2 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h2>\r\n );\r\n case \"h3\":\r\n return (\r\n <h3 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h3>\r\n );\r\n case \"h4\":\r\n return (\r\n <h4 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h4>\r\n );\r\n case \"h5\":\r\n return (\r\n <h5 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h5>\r\n );\r\n }\r\n};\r\n\r\nconst HandleIcon: FunctionalComponent<{\r\n state?: AccordionSectionState;\r\n icon?: string;\r\n attachmentCount?: number;\r\n}> = ({ state, icon, attachmentCount }) => {\r\n if (state) {\r\n return <HandleStateIcon state={state} />;\r\n }\r\n\r\n if (attachmentCount) {\r\n return <dso-attachments-counter count={attachmentCount}></dso-attachments-counter>;\r\n }\r\n\r\n if (icon) {\r\n return <dso-icon icon={icon}></dso-icon>;\r\n }\r\n};\r\n\r\nconst HandleStateIcon: FunctionalComponent<{ state: AccordionSectionState }> = ({ state }) => {\r\n if (state === \"error\") {\r\n return <dso-icon icon=\"status-error\"></dso-icon>;\r\n }\r\n\r\n if (state === \"danger\") {\r\n return <dso-icon icon=\"status-danger\"></dso-icon>;\r\n }\r\n\r\n if (state === \"success\") {\r\n return <dso-icon icon=\"status-success\"></dso-icon>;\r\n }\r\n\r\n if (state === \"info\") {\r\n return <dso-icon icon=\"status-info\"></dso-icon>;\r\n }\r\n\r\n if (state === \"warning\") {\r\n return <dso-icon icon=\"status-warning\"></dso-icon>;\r\n }\r\n};\r\n\r\n@Component({\r\n tag: \"dso-accordion-section\",\r\n styleUrl: \"accordion-section.scss\",\r\n shadow: true,\r\n})\r\nexport class AccordionSection implements ComponentInterface {\r\n private accordionState?: AccordionInternalState;\r\n\r\n private sectionBody?: HTMLDivElement;\r\n\r\n private sectionHeading?: HTMLHeadingElement;\r\n\r\n @Element()\r\n host!: HTMLDsoAccordionSectionElement;\r\n\r\n /**\r\n * The title of the handle\r\n */\r\n @Prop()\r\n handleTitle!: RenvooiValue | RenvooiValue[] | undefined;\r\n\r\n /**\r\n * An optional 'wijzigactie' that signals if the section is added or removed.\r\n */\r\n @Prop()\r\n wijzigactie?: AccordionSectionWijzigactie;\r\n\r\n /**\r\n * Which heading element to use.\r\n */\r\n @Prop()\r\n heading: AccordionHeading = \"h2\";\r\n\r\n /**\r\n * When set the handle will render as a `<a>`. When undefined it renders as a `<button>`\r\n */\r\n @Prop()\r\n handleUrl?: string;\r\n\r\n /**\r\n * `state` takes precedence over `attachmentCount` and `icon`\r\n */\r\n @Prop()\r\n status?: AccordionSectionState;\r\n\r\n /**\r\n * `attachmentCount` takes precedence over `icon`\r\n */\r\n @Prop()\r\n attachmentCount?: number;\r\n\r\n /**\r\n * To set an icon in the heading handle.\r\n */\r\n @Prop()\r\n icon?: string;\r\n\r\n /**\r\n * The status of the section.\r\n */\r\n @Prop()\r\n statusDescription?: string;\r\n\r\n /**\r\n * Set the Accordion Section open.\r\n */\r\n @Prop({ reflect: true })\r\n open = false;\r\n\r\n /**\r\n * Set when this Accordion Section contains or will contain an Accordion.\r\n */\r\n @Prop({ reflect: true })\r\n hasNestedAccordion = false;\r\n\r\n /**\r\n * The label to be displayed in the heading handle inside a Label (optional)\r\n */\r\n @Prop()\r\n label?: string;\r\n\r\n /**\r\n * The status of the Label in the heading handle (optional)\r\n */\r\n @Prop()\r\n labelStatus?: LabelStatus;\r\n\r\n /**\r\n * A boolean to indicate if the Accordion Section is capable of being activated. When `true` a Slide Toggle displays\r\n * on the right in the heading handle (optional). Works only for `variant` `compact-black` and `reverseAlign` false.\r\n */\r\n @Prop({ reflect: true })\r\n activatable = false;\r\n\r\n /**\r\n * A boolean to indicate if the Accordion Section is `active`. Only applicable when the Accordion Section is\r\n * `activatable`.\r\n */\r\n @Prop({ reflect: true })\r\n active = false;\r\n\r\n /**\r\n * An optional event listener for changes on the value of property `active`.\r\n */\r\n @Event()\r\n dsoActiveChange!: EventEmitter<AccordionSectionActiveChangeEvent>;\r\n\r\n /**\r\n * Calling this method will set focus to the handle.\r\n */\r\n @Method()\r\n async focusHandle() {\r\n this.handleElementRef?.focus();\r\n }\r\n\r\n @State()\r\n hover = false;\r\n\r\n get containsNestedAccordion() {\r\n return this.host.querySelector(\"dso-accordion\") !== null;\r\n }\r\n\r\n componentWillLoad() {\r\n this.accordion?._getState().then((state) => {\r\n this.accordionState = state;\r\n\r\n forceUpdate(this.host);\r\n });\r\n }\r\n\r\n get isNeutral() {\r\n return this.accordionState?.variant === \"neutral\";\r\n }\r\n\r\n private async scrollIntoView(bodyHeight: number | undefined, behavior: ScrollBehavior = \"auto\"): Promise<void> {\r\n log(\r\n `DSO Toolkit [Accordion Section] scrollIntoView(bodyHeight: ${JSON.stringify(\r\n bodyHeight,\r\n )}, behavior: ${JSON.stringify(behavior)})`,\r\n );\r\n\r\n const bodyClientRect = this.sectionBody?.getBoundingClientRect();\r\n const headingClientRect = this.sectionHeading?.getBoundingClientRect();\r\n\r\n log(`DSO Toolkit [Accordion Section] const bodyClientRect = ${JSON.stringify(bodyClientRect)};`);\r\n log(`DSO Toolkit [Accordion Section] const headingClientRect = ${JSON.stringify(headingClientRect)};`);\r\n log(`DSO Toolkit [Accordion Section] this.accordionState = ${JSON.stringify(this.accordionState)};`);\r\n log(`DSO Toolkit [Accordion Section] this.open = ${JSON.stringify(this.open)};`);\r\n\r\n if (!bodyClientRect || !headingClientRect || !this.accordionState) {\r\n log(`DSO Toolkit [Accordion Section] returning`);\r\n\r\n return;\r\n }\r\n\r\n // this y is relative to the top of the viewport.\r\n const sectionBottomY = headingClientRect.top + headingClientRect.height + (this.open ? (bodyHeight ?? 0) : 0);\r\n\r\n log(`DSO Toolkit [Accordion Section] const sectionBottomY = ${JSON.stringify(sectionBottomY)};`);\r\n log(`DSO Toolkit [Accordion Section] window.innerHeight = ${JSON.stringify(window.innerHeight)};`);\r\n\r\n const box = this.host.getBoundingClientRect();\r\n\r\n const scrollTop = window.scrollY || document.documentElement.scrollTop || document.body.scrollTop;\r\n const clientTop = document.documentElement.clientTop || document.body.clientTop || 0;\r\n const top = box.top + scrollTop - clientTop;\r\n\r\n log(\"DSO Toolkit [Accordion Section] scroll\", { box, scrollTop, clientTop, top });\r\n\r\n if (sectionBottomY > window.innerHeight) {\r\n log(\r\n `DSO Toolkit [Accordion Section] sectionBottomY > window.innerHeight === ${JSON.stringify(\r\n sectionBottomY > window.innerHeight,\r\n )};`,\r\n );\r\n\r\n const expandedAccordionHeight = sectionBottomY - headingClientRect.top;\r\n const shouldScrollToTopOfSection = expandedAccordionHeight > window.innerHeight;\r\n\r\n log(\r\n `DSO Toolkit [Accordion Section] const expandedAccordionHeight = ${JSON.stringify(expandedAccordionHeight)};`,\r\n );\r\n log(\r\n `DSO Toolkit [Accordion Section] const shouldScrollToTopOfSection = ${JSON.stringify(\r\n shouldScrollToTopOfSection,\r\n )};`,\r\n );\r\n\r\n window.scrollTo({\r\n top: shouldScrollToTopOfSection ? top : top - (window.innerHeight - expandedAccordionHeight),\r\n behavior,\r\n });\r\n } else if (headingClientRect.top < 0) {\r\n log(\r\n `DSO Toolkit [Accordion Section] headingClientRect.top < 0 === ${JSON.stringify(headingClientRect.top < 0)};`,\r\n );\r\n\r\n window.scrollTo({\r\n top,\r\n behavior,\r\n });\r\n }\r\n }\r\n\r\n private get accordion() {\r\n return this.host.closest(\"dso-accordion\");\r\n }\r\n\r\n private handleClick = (event: MouseEvent) => {\r\n this.dsoToggleClick.emit({\r\n originalEvent: event,\r\n open: !this.open,\r\n });\r\n };\r\n\r\n private handleActiveChange = (event: DsoSlideToggleCustomEvent<SlideToggleActiveEvent>) => {\r\n this.dsoActiveChange.emit({\r\n current: Boolean(this.active),\r\n next: !this.active,\r\n originalEvent: event,\r\n });\r\n };\r\n\r\n private handleExpandableAnimationStart = (e: CustomEvent<any>) => {\r\n this.dsoAnimationStart.emit({\r\n animation: this.open ? \"opening\" : \"closing\",\r\n scrollIntoView: (behavior: ScrollBehavior = \"auto\") => this.scrollIntoView(e.detail.bodyHeight, behavior),\r\n });\r\n };\r\n\r\n private handleExpandableAnimationEnd = (e: CustomEvent<ExpandableAnimationEndEvent>) => {\r\n this.dsoAnimationEnd.emit({\r\n open: this.open,\r\n scrollIntoView: (behavior: ScrollBehavior = \"auto\") => this.scrollIntoView(e.detail.bodyHeight, behavior),\r\n });\r\n };\r\n\r\n /**\r\n * Emitted when the user activates the toggle button.\r\n */\r\n @Event({ bubbles: false })\r\n dsoToggleClick!: EventEmitter<AccordionSectionToggleClickEvent>;\r\n\r\n /**\r\n * Event emitted when the Accordion Section starts its toggle animation.\r\n */\r\n @Event({ bubbles: false })\r\n dsoAnimationStart!: EventEmitter<AccordionSectionAnimationStartEvent>;\r\n\r\n /**\r\n * Event emitted when the Accordion Section completes its toggle animation.\r\n */\r\n @Event({ bubbles: false })\r\n dsoAnimationEnd!: EventEmitter<AccordionSectionAnimationEndEvent>;\r\n\r\n private handleElementRef?: HTMLAnchorElement | HTMLButtonElement;\r\n\r\n render() {\r\n const { variant, reverseAlign } = this.accordionState ?? {};\r\n const hasAddons = !!this.statusDescription || !!this.status || !!this.icon || !!this.attachmentCount;\r\n const showSlideToggle = this.activatable && variant === \"compact-black\" && !reverseAlign;\r\n\r\n return (\r\n <Host\r\n class={{\r\n \"dso-accordion-section\": true,\r\n [\"dso-accordion-\" + variant]: true,\r\n \"dso-nested-accordion\": this.hasNestedAccordion || this.containsNestedAccordion,\r\n \"dso-accordion-reverse-align\": reverseAlign ?? false,\r\n [\"dso-accordion-wijzigactie-\" + this.wijzigactie]: !!this.wijzigactie,\r\n \"dso-accordion-section-activate\": showSlideToggle,\r\n }}\r\n hidden={!variant}\r\n onMouseenter={() => (this.hover = true)}\r\n onMouseleave={() => (this.hover = false)}\r\n >\r\n <Handle heading={this.heading} ref={(element) => (this.sectionHeading = element)}>\r\n <HandleElement\r\n handleUrl={this.handleUrl}\r\n onClick={this.handleClick}\r\n open={this.open}\r\n showSlideToggle={showSlideToggle}\r\n active={this.active}\r\n onActiveChange={this.handleActiveChange}\r\n handleElementRef={(e) => (this.handleElementRef = e)}\r\n >\r\n {reverseAlign ? (\r\n <Fragment>\r\n {this.icon && (\r\n <div class=\"dso-section-handle-addons\">\r\n <HandleIcon icon={this.icon} />\r\n </div>\r\n )}\r\n <dso-renvooi value={this.handleTitle} />\r\n {this.label && (\r\n <dso-label status={this.labelStatus} compact>\r\n {this.label}\r\n </dso-label>\r\n )}\r\n <div class=\"dso-section-handle-addons\">\r\n {this.statusDescription && <span class=\"dso-status\">{this.statusDescription}</span>}\r\n <dso-icon class=\"dso-section-handle-chevron\" icon=\"chevron-down\"></dso-icon>\r\n </div>\r\n </Fragment>\r\n ) : (\r\n <Fragment>\r\n <dso-icon class=\"dso-section-handle-chevron\" icon=\"chevron-right\"></dso-icon>\r\n {this.status && <span class=\"sr-only\">{stateMap[this.status]}</span>}\r\n <span>\r\n <dso-renvooi value={this.handleTitle} />\r\n {this.isNeutral && (\r\n <dso-icon class=\"info-icon\" icon={this.open || this.hover ? \"info-active\" : \"info\"} />\r\n )}\r\n </span>\r\n {this.label && (\r\n <dso-label status={this.labelStatus} compact>\r\n {this.label}\r\n </dso-label>\r\n )}\r\n {hasAddons && (\r\n <div class=\"dso-section-handle-addons\">\r\n {this.statusDescription && <span class=\"dso-status\">{this.statusDescription}</span>}\r\n <HandleIcon state={this.status} icon={this.icon} attachmentCount={this.attachmentCount} />\r\n </div>\r\n )}\r\n </Fragment>\r\n )}\r\n </HandleElement>\r\n </Handle>\r\n <dso-expandable\r\n class=\"dso-section-body\"\r\n open={this.open}\r\n enableAnimation\r\n minimumHeight={this.isNeutral ? 0 : 4}\r\n onDsoExpandableAnimationStart={this.handleExpandableAnimationStart}\r\n onDsoExpandableAnimationEnd={this.handleExpandableAnimationEnd}\r\n >\r\n <div class=\"dso-section-body-content\" ref={(element) => (this.sectionBody = element)}>\r\n <slot />\r\n </div>\r\n </dso-expandable>\r\n </Host>\r\n );\r\n }\r\n}\r\n"],"version":3}
1
+ {"file":"dso-accordion-section.entry.cjs.js","mappings":";;;;AAMO,MAAM,QAAQ,GAA0C;AAC7D,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,OAAO,EAAE,eAAe;AACxB,IAAA,MAAM,EAAE,OAAO;AACf,IAAA,KAAK,EAAE,OAAO;CACf;;ACZD,MAAM,mBAAmB,GAAG,ohjBAAohjB;;ACkChjjB;AACA,MAAM,GAAG,GAAI,MAAc,CAAC,SAAS,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,YAAa,GAAC;AAEhG,MAAM,aAAa,GAQd,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,cAAc,EAAE,gBAAgB,EAAE,EAAE,QAAQ,KAAI;IACzG,IAAI,SAAS,EAAE;AACb,QAAA,QACEA,OAAA,CAAAC,c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kBAAkB,EACxB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,eAAe,EACf,IAAA,EAAA,aAAa,EAAE,IAAI,CAAC,SAAS,GAAG,CAAC,GAAG,CAAC,EACrC,6BAA6B,EAAE,IAAI,CAAC,8BAA8B,EAClE,2BAA2B,EAAE,IAAI,CAAC,4BAA4B,EAAA,EAE9DA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,0BAA0B,EAAC,GAAG,EAAE,CAAC,OAAO,MAAM,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,EAAA,EAClFA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAQ,CACJ,CACS,CACZ;;;;;;;;","names":["h","Fragment","forceUpdate","Host"],"sources":["src/components/accordion/components/accordion-section.interfaces.ts","src/components/accordion/components/accordion-section.scss?tag=dso-accordion-section&encapsulation=shadow","src/components/accordion/components/accordion-section.tsx"],"sourcesContent":["export type AccordionSectionState = \"success\" | \"info\" | \"warning\" | \"danger\" | \"error\";\r\n\r\nexport type AccordionHeading = \"h2\" | \"h3\" | \"h4\" | \"h5\";\r\n\r\nexport type AccordionSectionWijzigactie = \"voegtoe\" | \"verwijder\";\r\n\r\nexport const stateMap: Record<AccordionSectionState, string> = {\r\n success: \"succes:\",\r\n info: \"info:\",\r\n warning: \"waarschuwing:\",\r\n danger: \"fout:\",\r\n error: \"fout:\",\r\n};\r\n\r\nexport interface AccordionSectionToggleClickEvent {\r\n /**\r\n * The original MouseEvent that triggered the click.\r\n *\r\n * In case the Section Handle is an <a> this event can be used to preventDefault() so the framework router is reponsible for navigating the user.\r\n */\r\n originalEvent?: MouseEvent;\r\n\r\n /**\r\n * The requested state. If the Accordion Section is closed, `open = true`.\r\n */\r\n open: boolean;\r\n}\r\n\r\nexport interface AccordionSectionAnimationStartEvent {\r\n /**\r\n * Helper function to scroll the Accordion Section into view.\r\n */\r\n scrollIntoView(behavior?: ScrollBehavior): void;\r\n\r\n /**\r\n * Whether or not the Accordion opening or closing.\r\n */\r\n animation: \"opening\" | \"closing\";\r\n}\r\n\r\nexport interface AccordionSectionAnimationEndEvent {\r\n /**\r\n * Helper function to scroll the Accordion Section into view.\r\n */\r\n scrollIntoView(behavior?: ScrollBehavior): void;\r\n\r\n /**\r\n * The state of the Accordion Section after animation.\r\n */\r\n open: boolean;\r\n}\r\n\r\nexport interface AccordionSectionActiveChangeEvent {\r\n /**\r\n * De current status van de Accordion Section.\r\n */\r\n current: boolean;\r\n\r\n /**\r\n * De desired status van de Accordion Section.\r\n */\r\n next: boolean;\r\n\r\n originalEvent: Event;\r\n}\r\n","@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/variables/units\";\r\n@use \"~dso-toolkit/src/variables/colors\";\r\n@use \"~dso-toolkit/src/variables/typography\";\r\n\r\n@use \"~dso-toolkit/src/components/accordion\";\r\n@use \"~dso-toolkit/src/components/link\";\r\n\r\n@use \"accordion-section-theme-compact\";\r\n@use \"accordion-section-theme-compact-black\";\r\n@use \"accordion-section-theme-conclusion\";\r\n@use \"accordion-section-theme-default\";\r\n@use \"accordion-section-theme-neutral\";\r\n\r\n@include utilities.box-sizing();\r\n\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\n:host {\r\n display: block;\r\n\r\n .dso-section-handle {\r\n font-size: 1em;\r\n font-weight: 600;\r\n line-height: accordion.$handle-line-height;\r\n margin: 0;\r\n position: relative;\r\n\r\n > a:active {\r\n text-decoration: none;\r\n }\r\n\r\n a {\r\n @include link.clean();\r\n }\r\n\r\n .dso-status {\r\n color: colors.$zwart;\r\n font-size: typography.$font-size-small;\r\n font-weight: 400;\r\n }\r\n }\r\n\r\n .dso-section-handle > button,\r\n .dso-section-handle > a {\r\n align-items: flex-start;\r\n background-color: transparent;\r\n border: 0;\r\n cursor: pointer;\r\n display: flex;\r\n font-family: typography.$font-family-base;\r\n font-size: 1em;\r\n font-weight: 600;\r\n line-height: accordion.$handle-line-height;\r\n margin: 0;\r\n padding-block: accordion.$block-padding;\r\n padding-inline: accordion.$inline-padding;\r\n text-align: start;\r\n inline-size: 100%;\r\n overflow-wrap: anywhere;\r\n\r\n dso-icon {\r\n flex-shrink: 0;\r\n\r\n &.dso-section-handle-chevron {\r\n @include utilities.transition(transform);\r\n\r\n transform: rotate(0);\r\n }\r\n }\r\n\r\n > .dso-section-handle-addons:first-child,\r\n > dso-icon:first-child {\r\n margin-inline-end: units.$u1;\r\n }\r\n\r\n > dso-icon:last-child {\r\n margin-inline-start: auto;\r\n }\r\n\r\n > .dso-section-handle-addons:last-child {\r\n margin-inline-start: auto;\r\n\r\n dso-attachments-counter,\r\n dso-icon {\r\n margin-inline-start: units.$u1;\r\n }\r\n }\r\n\r\n > dso-label {\r\n margin-inline-start: auto;\r\n padding-inline-start: units.$u1;\r\n word-break: normal;\r\n\r\n & + dso-icon:last-child,\r\n & + .dso-section-handle-addons:last-child {\r\n margin-inline-start: units.$u1;\r\n }\r\n }\r\n }\r\n}\r\n\r\n:host([open]:not([open=\"false\"])) {\r\n .dso-section-handle {\r\n > button,\r\n > a {\r\n .dso-section-handle-chevron {\r\n &:first-child {\r\n transform: rotate(90deg);\r\n }\r\n\r\n &:last-child {\r\n transform: rotate(-180deg);\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n.dso-section-body {\r\n background-color: colors.$wit;\r\n border-block-start: 0;\r\n\r\n .dso-section-body-content {\r\n padding-block: units.$u2 + accordion.$border-radius units.$u2;\r\n padding-inline: units.$u2;\r\n }\r\n}\r\n\r\n// Default\r\n:host(.dso-accordion-default) {\r\n @include accordion-section-theme-default.dso-web-component-accordion-default();\r\n}\r\n\r\n:host(.dso-accordion-default[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-default.dso-web-component-accordion-default-open();\r\n}\r\n\r\n:host(.dso-accordion-default.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-default.dso-web-component-accordion-default-open-nested();\r\n}\r\n\r\n// Compact\r\n:host(.dso-accordion-compact) {\r\n @include accordion-section-theme-compact.dso-web-component-accordion-compact();\r\n}\r\n\r\n:host(.dso-accordion-compact.dso-accordion-reverse-align) {\r\n @include accordion-section-theme-compact.dso-web-component-accordion-compact-reverse();\r\n}\r\n\r\n:host(.dso-accordion-compact[open]:not([open=\"false\"]):not(.dso-nested-accordion)) {\r\n @include accordion-section-theme-compact.dso-web-component-accordion-compact-open();\r\n}\r\n\r\n:host(.dso-accordion-compact.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-compact.dso-web-component-accordion-compact-open-nested();\r\n}\r\n\r\n// Compact black\r\n:host(.dso-accordion-compact-black) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black();\r\n}\r\n\r\n:host(.dso-accordion-compact-black.dso-accordion-section-activate) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black();\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-activate();\r\n}\r\n\r\n:host(.dso-accordion-compact-black.dso-accordion-wijzigactie-voegtoe) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-voegtoe();\r\n}\r\n\r\n:host(.dso-accordion-compact-black.dso-accordion-wijzigactie-verwijder) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-verwijder();\r\n}\r\n\r\n:host(.dso-accordion-compact-black.dso-accordion-reverse-align) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-reverse();\r\n}\r\n\r\n:host(.dso-accordion-compact-black[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-open();\r\n}\r\n\r\n:host(.dso-accordion-compact-black.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-compact-black.dso-web-component-accordion-compact-black-open-nested();\r\n}\r\n\r\n// Conclusion\r\n:host(.dso-accordion-conclusion) {\r\n @include accordion-section-theme-conclusion.dso-web-component-accordion-conclusion();\r\n}\r\n\r\n:host(.dso-accordion-conclusion[open]:not([open=\"false\"]):not(.dso-nested-accordion)) {\r\n @include accordion-section-theme-conclusion.dso-web-component-accordion-conclusion-open();\r\n}\r\n\r\n:host(.dso-accordion-conclusion.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-conclusion.dso-web-component-accordion-conclusion-open-nested();\r\n}\r\n\r\n// Neutral\r\n:host(.dso-accordion-neutral) {\r\n @include accordion-section-theme-neutral.dso-web-component-accordion-neutral();\r\n}\r\n\r\n:host(.dso-accordion-neutral[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-neutral.dso-web-component-accordion-neutral-open();\r\n}\r\n\r\n:host(.dso-accordion-neutral.dso-nested-accordion[open]:not([open=\"false\"])) {\r\n @include accordion-section-theme-neutral.dso-web-component-accordion-neutral-open-nested();\r\n}\r\n","import {\r\n Component,\r\n ComponentInterface,\r\n Element,\r\n Event,\r\n EventEmitter,\r\n Fragment,\r\n FunctionalComponent,\r\n Host,\r\n Method,\r\n Prop,\r\n State,\r\n forceUpdate,\r\n h,\r\n} from \"@stencil/core\";\r\n\r\nimport { DsoSlideToggleCustomEvent } from \"../../../components\";\r\nimport { ExpandableAnimationEndEvent } from \"../../expandable/expandable\";\r\nimport { LabelStatus } from \"../../label/label.interfaces\";\r\nimport { RenvooiValue } from \"../../renvooi/renvooi.interfaces\";\r\nimport { SlideToggleActiveEvent } from \"../../slide-toggle/slide-toggle.interfaces\";\r\nimport { AccordionInternalState } from \"../accordion.interfaces\";\r\n\r\nimport {\r\n AccordionHeading,\r\n AccordionSectionActiveChangeEvent,\r\n AccordionSectionAnimationEndEvent,\r\n AccordionSectionAnimationStartEvent,\r\n AccordionSectionState,\r\n AccordionSectionToggleClickEvent,\r\n AccordionSectionWijzigactie,\r\n stateMap,\r\n} from \"./accordion-section.interfaces\";\r\n\r\n// eslint-disable-next-line no-console\r\nconst log = (window as any)[\"_dsoLog\"] === true ? console.log.bind(console.log) : function () {};\r\n\r\nconst HandleElement: FunctionalComponent<{\r\n handleUrl: string | undefined;\r\n open: boolean;\r\n showSlideToggle: boolean;\r\n active: boolean;\r\n onActiveChange: (e: DsoSlideToggleCustomEvent<SlideToggleActiveEvent>) => void;\r\n handleElementRef: (element: HTMLAnchorElement | HTMLButtonElement | undefined) => void;\r\n onClick: (e: MouseEvent) => void;\r\n}> = ({ handleUrl, onClick, open, showSlideToggle, active, onActiveChange, handleElementRef }, children) => {\r\n if (handleUrl) {\r\n return (\r\n <>\r\n <a href={handleUrl} onClick={onClick} aria-expanded={open ? \"true\" : \"false\"} ref={handleElementRef}>\r\n {children}\r\n </a>\r\n {showSlideToggle && (\r\n <dso-slide-toggle accessibleLabel=\"Toon op kaart\" checked={active} onDsoActiveChange={onActiveChange} />\r\n )}\r\n </>\r\n );\r\n }\r\n\r\n return (\r\n <>\r\n <button type=\"button\" onClick={onClick} aria-expanded={open ? \"true\" : \"false\"} ref={handleElementRef}>\r\n {children}\r\n </button>\r\n {showSlideToggle && (\r\n <dso-slide-toggle accessibleLabel=\"Toon op kaart\" checked={active} onDsoActiveChange={onActiveChange} />\r\n )}\r\n </>\r\n );\r\n};\r\n\r\nconst Handle: FunctionalComponent<{\r\n heading: AccordionHeading;\r\n ref: (element: HTMLHeadingElement | undefined) => void;\r\n}> = ({ heading, ref }, children) => {\r\n switch (heading) {\r\n default:\r\n case \"h2\":\r\n return (\r\n <h2 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h2>\r\n );\r\n case \"h3\":\r\n return (\r\n <h3 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h3>\r\n );\r\n case \"h4\":\r\n return (\r\n <h4 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h4>\r\n );\r\n case \"h5\":\r\n return (\r\n <h5 ref={ref} class=\"dso-section-handle\">\r\n {children}\r\n </h5>\r\n );\r\n }\r\n};\r\n\r\nconst HandleIcon: FunctionalComponent<{\r\n state?: AccordionSectionState;\r\n icon?: string;\r\n attachmentCount?: number;\r\n}> = ({ state, icon, attachmentCount }) => {\r\n if (state) {\r\n return <HandleStateIcon state={state} />;\r\n }\r\n\r\n if (attachmentCount) {\r\n return <dso-attachments-counter count={attachmentCount}></dso-attachments-counter>;\r\n }\r\n\r\n if (icon) {\r\n return <dso-icon icon={icon}></dso-icon>;\r\n }\r\n};\r\n\r\nconst HandleStateIcon: FunctionalComponent<{ state: AccordionSectionState }> = ({ state }) => {\r\n if (state === \"error\") {\r\n return <dso-icon icon=\"status-error\"></dso-icon>;\r\n }\r\n\r\n if (state === \"danger\") {\r\n return <dso-icon icon=\"status-danger\"></dso-icon>;\r\n }\r\n\r\n if (state === \"success\") {\r\n return <dso-icon icon=\"status-success\"></dso-icon>;\r\n }\r\n\r\n if (state === \"info\") {\r\n return <dso-icon icon=\"status-info\"></dso-icon>;\r\n }\r\n\r\n if (state === \"warning\") {\r\n return <dso-icon icon=\"status-warning\"></dso-icon>;\r\n }\r\n};\r\n\r\n@Component({\r\n tag: \"dso-accordion-section\",\r\n styleUrl: \"accordion-section.scss\",\r\n shadow: true,\r\n})\r\nexport class AccordionSection implements ComponentInterface {\r\n private accordionState?: AccordionInternalState;\r\n\r\n private sectionBody?: HTMLDivElement;\r\n\r\n private sectionHeading?: HTMLHeadingElement;\r\n\r\n @Element()\r\n host!: HTMLDsoAccordionSectionElement;\r\n\r\n /**\r\n * The title of the handle\r\n */\r\n @Prop()\r\n handleTitle!: RenvooiValue | RenvooiValue[] | undefined;\r\n\r\n /**\r\n * An optional 'wijzigactie' that signals if the section is added or removed.\r\n */\r\n @Prop()\r\n wijzigactie?: AccordionSectionWijzigactie;\r\n\r\n /**\r\n * Which heading element to use.\r\n */\r\n @Prop()\r\n heading: AccordionHeading = \"h2\";\r\n\r\n /**\r\n * When set the handle will render as a `<a>`. When undefined it renders as a `<button>`\r\n */\r\n @Prop()\r\n handleUrl?: string;\r\n\r\n /**\r\n * `state` takes precedence over `attachmentCount` and `icon`\r\n */\r\n @Prop()\r\n status?: AccordionSectionState;\r\n\r\n /**\r\n * `attachmentCount` takes precedence over `icon`\r\n */\r\n @Prop()\r\n attachmentCount?: number;\r\n\r\n /**\r\n * To set an icon in the heading handle.\r\n */\r\n @Prop()\r\n icon?: string;\r\n\r\n /**\r\n * The status of the section.\r\n */\r\n @Prop()\r\n statusDescription?: string;\r\n\r\n /**\r\n * Set the Accordion Section open.\r\n */\r\n @Prop({ reflect: true })\r\n open = false;\r\n\r\n /**\r\n * Set when this Accordion Section contains or will contain an Accordion.\r\n */\r\n @Prop({ reflect: true })\r\n hasNestedAccordion = false;\r\n\r\n /**\r\n * The label to be displayed in the heading handle inside a Label (optional)\r\n */\r\n @Prop()\r\n label?: string;\r\n\r\n /**\r\n * The status of the Label in the heading handle (optional)\r\n */\r\n @Prop()\r\n labelStatus?: LabelStatus;\r\n\r\n /**\r\n * A boolean to indicate if the Accordion Section is capable of being activated. When `true` a Slide Toggle displays\r\n * on the right in the heading handle (optional). Works only for `variant` `compact-black` and `reverseAlign` false.\r\n */\r\n @Prop({ reflect: true })\r\n activatable = false;\r\n\r\n /**\r\n * A boolean to indicate if the Accordion Section is `active`. Only applicable when the Accordion Section is\r\n * `activatable`.\r\n */\r\n @Prop({ reflect: true })\r\n active = false;\r\n\r\n /**\r\n * An optional event listener for changes on the value of property `active`.\r\n */\r\n @Event()\r\n dsoActiveChange!: EventEmitter<AccordionSectionActiveChangeEvent>;\r\n\r\n /**\r\n * Calling this method will set focus to the handle.\r\n */\r\n @Method()\r\n async focusHandle() {\r\n this.handleElementRef?.focus();\r\n }\r\n\r\n @State()\r\n hover = false;\r\n\r\n get containsNestedAccordion() {\r\n return this.host.querySelector(\"dso-accordion\") !== null;\r\n }\r\n\r\n componentWillLoad() {\r\n this.accordion?._getState().then((state) => {\r\n this.accordionState = state;\r\n\r\n forceUpdate(this.host);\r\n });\r\n }\r\n\r\n get isNeutral() {\r\n return this.accordionState?.variant === \"neutral\";\r\n }\r\n\r\n private async scrollIntoView(bodyHeight: number | undefined, behavior: ScrollBehavior = \"auto\"): Promise<void> {\r\n log(\r\n `DSO Toolkit [Accordion Section] scrollIntoView(bodyHeight: ${JSON.stringify(\r\n bodyHeight,\r\n )}, behavior: ${JSON.stringify(behavior)})`,\r\n );\r\n\r\n const bodyClientRect = this.sectionBody?.getBoundingClientRect();\r\n const headingClientRect = this.sectionHeading?.getBoundingClientRect();\r\n\r\n log(`DSO Toolkit [Accordion Section] const bodyClientRect = ${JSON.stringify(bodyClientRect)};`);\r\n log(`DSO Toolkit [Accordion Section] const headingClientRect = ${JSON.stringify(headingClientRect)};`);\r\n log(`DSO Toolkit [Accordion Section] this.accordionState = ${JSON.stringify(this.accordionState)};`);\r\n log(`DSO Toolkit [Accordion Section] this.open = ${JSON.stringify(this.open)};`);\r\n\r\n if (!bodyClientRect || !headingClientRect || !this.accordionState) {\r\n log(`DSO Toolkit [Accordion Section] returning`);\r\n\r\n return;\r\n }\r\n\r\n // this y is relative to the top of the viewport.\r\n const sectionBottomY = headingClientRect.top + headingClientRect.height + (this.open ? (bodyHeight ?? 0) : 0);\r\n\r\n log(`DSO Toolkit [Accordion Section] const sectionBottomY = ${JSON.stringify(sectionBottomY)};`);\r\n log(`DSO Toolkit [Accordion Section] window.innerHeight = ${JSON.stringify(window.innerHeight)};`);\r\n\r\n const box = this.host.getBoundingClientRect();\r\n\r\n const scrollTop = window.scrollY || document.documentElement.scrollTop || document.body.scrollTop;\r\n const clientTop = document.documentElement.clientTop || document.body.clientTop || 0;\r\n const top = box.top + scrollTop - clientTop;\r\n\r\n log(\"DSO Toolkit [Accordion Section] scroll\", { box, scrollTop, clientTop, top });\r\n\r\n if (sectionBottomY > window.innerHeight) {\r\n log(\r\n `DSO Toolkit [Accordion Section] sectionBottomY > window.innerHeight === ${JSON.stringify(\r\n sectionBottomY > window.innerHeight,\r\n )};`,\r\n );\r\n\r\n const expandedAccordionHeight = sectionBottomY - headingClientRect.top;\r\n const shouldScrollToTopOfSection = expandedAccordionHeight > window.innerHeight;\r\n\r\n log(\r\n `DSO Toolkit [Accordion Section] const expandedAccordionHeight = ${JSON.stringify(expandedAccordionHeight)};`,\r\n );\r\n log(\r\n `DSO Toolkit [Accordion Section] const shouldScrollToTopOfSection = ${JSON.stringify(\r\n shouldScrollToTopOfSection,\r\n )};`,\r\n );\r\n\r\n window.scrollTo({\r\n top: shouldScrollToTopOfSection ? top : top - (window.innerHeight - expandedAccordionHeight),\r\n behavior,\r\n });\r\n } else if (headingClientRect.top < 0) {\r\n log(\r\n `DSO Toolkit [Accordion Section] headingClientRect.top < 0 === ${JSON.stringify(headingClientRect.top < 0)};`,\r\n );\r\n\r\n window.scrollTo({\r\n top,\r\n behavior,\r\n });\r\n }\r\n }\r\n\r\n private get accordion() {\r\n return this.host.closest(\"dso-accordion\");\r\n }\r\n\r\n private handleClick = (event: MouseEvent) => {\r\n this.dsoToggleClick.emit({\r\n originalEvent: event,\r\n open: !this.open,\r\n });\r\n };\r\n\r\n private handleActiveChange = (event: DsoSlideToggleCustomEvent<SlideToggleActiveEvent>) => {\r\n this.dsoActiveChange.emit({\r\n current: Boolean(this.active),\r\n next: !this.active,\r\n originalEvent: event,\r\n });\r\n };\r\n\r\n private handleExpandableAnimationStart = (e: CustomEvent<any>) => {\r\n this.dsoAnimationStart.emit({\r\n animation: this.open ? \"opening\" : \"closing\",\r\n scrollIntoView: (behavior: ScrollBehavior = \"auto\") => this.scrollIntoView(e.detail.bodyHeight, behavior),\r\n });\r\n };\r\n\r\n private handleExpandableAnimationEnd = (e: CustomEvent<ExpandableAnimationEndEvent>) => {\r\n this.dsoAnimationEnd.emit({\r\n open: this.open,\r\n scrollIntoView: (behavior: ScrollBehavior = \"auto\") => this.scrollIntoView(e.detail.bodyHeight, behavior),\r\n });\r\n };\r\n\r\n /**\r\n * Emitted when the user activates the toggle button.\r\n */\r\n @Event({ bubbles: false })\r\n dsoToggleClick!: EventEmitter<AccordionSectionToggleClickEvent>;\r\n\r\n /**\r\n * Event emitted when the Accordion Section starts its toggle animation.\r\n */\r\n @Event({ bubbles: false })\r\n dsoAnimationStart!: EventEmitter<AccordionSectionAnimationStartEvent>;\r\n\r\n /**\r\n * Event emitted when the Accordion Section completes its toggle animation.\r\n */\r\n @Event({ bubbles: false })\r\n dsoAnimationEnd!: EventEmitter<AccordionSectionAnimationEndEvent>;\r\n\r\n private handleElementRef?: HTMLAnchorElement | HTMLButtonElement;\r\n\r\n render() {\r\n const { variant, reverseAlign } = this.accordionState ?? {};\r\n const hasAddons = !!this.statusDescription || !!this.status || !!this.icon || !!this.attachmentCount;\r\n const showSlideToggle = this.activatable && variant === \"compact-black\" && !reverseAlign;\r\n\r\n return (\r\n <Host\r\n class={{\r\n \"dso-accordion-section\": true,\r\n [\"dso-accordion-\" + variant]: !!variant,\r\n \"dso-nested-accordion\": this.hasNestedAccordion || this.containsNestedAccordion,\r\n \"dso-accordion-reverse-align\": reverseAlign ?? false,\r\n [\"dso-accordion-wijzigactie-\" + this.wijzigactie]: !!this.wijzigactie,\r\n \"dso-accordion-section-activate\": showSlideToggle,\r\n }}\r\n hidden={!variant}\r\n onMouseenter={() => (this.hover = true)}\r\n onMouseleave={() => (this.hover = false)}\r\n >\r\n <Handle heading={this.heading} ref={(element) => (this.sectionHeading = element)}>\r\n <HandleElement\r\n handleUrl={this.handleUrl}\r\n onClick={this.handleClick}\r\n open={this.open}\r\n showSlideToggle={showSlideToggle}\r\n active={this.active}\r\n onActiveChange={this.handleActiveChange}\r\n handleElementRef={(e) => (this.handleElementRef = e)}\r\n >\r\n {reverseAlign ? (\r\n <Fragment>\r\n {this.icon && (\r\n <div class=\"dso-section-handle-addons\">\r\n <HandleIcon icon={this.icon} />\r\n </div>\r\n )}\r\n <dso-renvooi value={this.handleTitle} />\r\n {this.label && (\r\n <dso-label status={this.labelStatus} compact>\r\n {this.label}\r\n </dso-label>\r\n )}\r\n <div class=\"dso-section-handle-addons\">\r\n {this.statusDescription && <span class=\"dso-status\">{this.statusDescription}</span>}\r\n <dso-icon class=\"dso-section-handle-chevron\" icon=\"chevron-down\"></dso-icon>\r\n </div>\r\n </Fragment>\r\n ) : (\r\n <Fragment>\r\n <dso-icon class=\"dso-section-handle-chevron\" icon=\"chevron-right\"></dso-icon>\r\n {this.status && <span class=\"sr-only\">{stateMap[this.status]}</span>}\r\n <span>\r\n <dso-renvooi value={this.handleTitle} />\r\n {this.isNeutral && (\r\n <dso-icon class=\"info-icon\" icon={this.open || this.hover ? \"info-active\" : \"info\"} />\r\n )}\r\n </span>\r\n {this.label && (\r\n <dso-label status={this.labelStatus} compact>\r\n {this.label}\r\n </dso-label>\r\n )}\r\n {hasAddons && (\r\n <div class=\"dso-section-handle-addons\">\r\n {this.statusDescription && <span class=\"dso-status\">{this.statusDescription}</span>}\r\n <HandleIcon state={this.status} icon={this.icon} attachmentCount={this.attachmentCount} />\r\n </div>\r\n )}\r\n </Fragment>\r\n )}\r\n </HandleElement>\r\n </Handle>\r\n <dso-expandable\r\n class=\"dso-section-body\"\r\n open={this.open}\r\n enableAnimation\r\n minimumHeight={this.isNeutral ? 0 : 4}\r\n onDsoExpandableAnimationStart={this.handleExpandableAnimationStart}\r\n onDsoExpandableAnimationEnd={this.handleExpandableAnimationEnd}\r\n >\r\n <div class=\"dso-section-body-content\" ref={(element) => (this.sectionBody = element)}>\r\n <slot />\r\n </div>\r\n </dso-expandable>\r\n </Host>\r\n );\r\n }\r\n}\r\n"],"version":3}