@dso-toolkit/core 73.2.1 → 74.0.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 (436) 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 +133 -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 +287 -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-BJv2m9ZZ.js +253 -0
  198. package/dist/bundle/p-BJv2m9ZZ.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-C_CoF0aB.js +163 -0
  216. package/dist/bundle/p-C_CoF0aB.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-CkBk3gL8.js +80 -0
  220. package/dist/bundle/p-CkBk3gL8.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-CwXjPr2h.js +36 -0
  230. package/dist/bundle/p-CwXjPr2h.js.map +1 -0
  231. package/dist/bundle/p-D2nuXSd0.js +723 -0
  232. package/dist/bundle/p-D2nuXSd0.js.map +1 -0
  233. package/dist/bundle/p-D9Yjz_Sm.js +125 -0
  234. package/dist/bundle/p-D9Yjz_Sm.js.map +1 -0
  235. package/dist/bundle/p-DDDh2Izf.js +12 -0
  236. package/dist/bundle/p-DDDh2Izf.js.map +1 -0
  237. package/dist/bundle/p-DGWbWwct.js +121 -0
  238. package/dist/bundle/p-DGWbWwct.js.map +1 -0
  239. package/dist/bundle/p-DHO_Za64.js +1729 -0
  240. package/dist/bundle/p-DHO_Za64.js.map +1 -0
  241. package/dist/bundle/p-DPH021KD.js +14 -0
  242. package/dist/bundle/p-DPH021KD.js.map +1 -0
  243. package/dist/bundle/p-DSyv-znO.js +18 -0
  244. package/dist/bundle/p-DSyv-znO.js.map +1 -0
  245. package/dist/bundle/p-DcpG4jOU.js +99 -0
  246. package/dist/bundle/p-DcpG4jOU.js.map +1 -0
  247. package/dist/bundle/p-DrR9RuIM.js +83 -0
  248. package/dist/bundle/p-DrR9RuIM.js.map +1 -0
  249. package/dist/bundle/p-DvqO1i1s.js +1162 -0
  250. package/dist/bundle/p-DvqO1i1s.js.map +1 -0
  251. package/dist/bundle/p-Hgv-pDpy.js +13 -0
  252. package/dist/bundle/p-Hgv-pDpy.js.map +1 -0
  253. package/dist/bundle/p-PMqbDJmA.js +78 -0
  254. package/dist/bundle/p-PMqbDJmA.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-advanced-select.cjs.entry.js +2 -2
  271. package/dist/cjs/dso-advanced-select.cjs.entry.js.map +1 -1
  272. package/dist/cjs/dso-advanced-select.entry.cjs.js.map +1 -1
  273. package/dist/cjs/dso-alert.dso-badge.dso-image-overlay.dso-ozon-content.dso-panel.dso-table.entry.cjs.js.map +1 -1
  274. package/dist/cjs/dso-alert_6.cjs.entry.js +5 -9
  275. package/dist/cjs/dso-alert_6.cjs.entry.js.map +1 -1
  276. package/dist/cjs/dso-banner.cjs.entry.js +2 -2
  277. package/dist/cjs/dso-banner.cjs.entry.js.map +1 -1
  278. package/dist/cjs/dso-banner.entry.cjs.js.map +1 -1
  279. package/dist/cjs/dso-label.dso-renvooi.dso-slide-toggle.entry.cjs.js.map +1 -1
  280. package/dist/cjs/dso-label_3.cjs.entry.js +1 -1
  281. package/dist/cjs/dso-label_3.cjs.entry.js.map +1 -1
  282. package/dist/cjs/dso-modal.cjs.entry.js +19 -6
  283. package/dist/cjs/dso-modal.cjs.entry.js.map +1 -1
  284. package/dist/cjs/dso-modal.entry.cjs.js.map +1 -1
  285. package/dist/cjs/dso-onboarding-tip.cjs.entry.js +24 -10
  286. package/dist/cjs/dso-onboarding-tip.cjs.entry.js.map +1 -1
  287. package/dist/cjs/dso-onboarding-tip.entry.cjs.js.map +1 -1
  288. package/dist/cjs/dso-project-item.cjs.entry.js +1 -1
  289. package/dist/cjs/dso-project-item.cjs.entry.js.map +1 -1
  290. package/dist/cjs/dso-project-item.entry.cjs.js.map +1 -1
  291. package/dist/cjs/dso-toolkit.cjs.js +1 -1
  292. package/dist/cjs/dso-viewer-grid.cjs.entry.js +37 -100
  293. package/dist/cjs/dso-viewer-grid.cjs.entry.js.map +1 -1
  294. package/dist/cjs/dso-viewer-grid.entry.cjs.js.map +1 -1
  295. package/dist/cjs/loader.cjs.js +1 -1
  296. package/dist/collection/components/accordion/components/accordion-section.js +4 -4
  297. package/dist/collection/components/accordion/components/accordion-section.js.map +1 -1
  298. package/dist/collection/components/advanced-select/advanced-select.css +0 -6
  299. package/dist/collection/components/advanced-select/advanced-select.interfaces.js.map +1 -1
  300. package/dist/collection/components/advanced-select/advanced-select.js +1 -1
  301. package/dist/collection/components/advanced-select/advanced-select.js.map +1 -1
  302. package/dist/collection/components/alert/alert.css +0 -117
  303. package/dist/collection/components/badge/badge.css +3 -8
  304. package/dist/collection/components/badge/badge.interfaces.js.map +1 -1
  305. package/dist/collection/components/badge/badge.js +1 -1
  306. package/dist/collection/components/banner/banner.js +4 -4
  307. package/dist/collection/components/banner/banner.js.map +1 -1
  308. package/dist/collection/components/label/label.css +8 -5
  309. package/dist/collection/components/label/label.interfaces.js.map +1 -1
  310. package/dist/collection/components/label/label.js +1 -1
  311. package/dist/collection/components/modal/modal.js +24 -11
  312. package/dist/collection/components/modal/modal.js.map +1 -1
  313. package/dist/collection/components/onboarding-tip/onboarding-tip.css +21 -1
  314. package/dist/collection/components/onboarding-tip/onboarding-tip.js +28 -9
  315. package/dist/collection/components/onboarding-tip/onboarding-tip.js.map +1 -1
  316. package/dist/collection/components/project-item/project-item.js +1 -1
  317. package/dist/collection/components/project-item/project-item.js.map +1 -1
  318. package/dist/collection/components/table/table.css +2 -2
  319. package/dist/collection/components/table/table.js +3 -26
  320. package/dist/collection/components/table/table.js.map +1 -1
  321. package/dist/collection/components/viewer-grid/components/filter-panel.js +3 -0
  322. package/dist/collection/components/viewer-grid/components/filter-panel.js.map +1 -0
  323. package/dist/collection/components/viewer-grid/components/index.js +1 -1
  324. package/dist/collection/components/viewer-grid/components/index.js.map +1 -1
  325. package/dist/collection/components/viewer-grid/components/main-panel.js +3 -6
  326. package/dist/collection/components/viewer-grid/components/main-panel.js.map +1 -1
  327. package/dist/collection/components/viewer-grid/viewer-grid.css +28 -343
  328. package/dist/collection/components/viewer-grid/viewer-grid.interfaces.js +1 -3
  329. package/dist/collection/components/viewer-grid/viewer-grid.interfaces.js.map +1 -1
  330. package/dist/collection/components/viewer-grid/viewer-grid.js +54 -185
  331. package/dist/collection/components/viewer-grid/viewer-grid.js.map +1 -1
  332. package/dist/components/alert.js +1 -1
  333. package/dist/components/alert.js.map +1 -1
  334. package/dist/components/badge.js +1 -1
  335. package/dist/components/badge.js.map +1 -1
  336. package/dist/components/dso-accordion-section.js +3 -3
  337. package/dist/components/dso-accordion-section.js.map +1 -1
  338. package/dist/components/dso-advanced-select.js +2 -2
  339. package/dist/components/dso-advanced-select.js.map +1 -1
  340. package/dist/components/dso-banner.js +2 -2
  341. package/dist/components/dso-banner.js.map +1 -1
  342. package/dist/components/dso-modal.js +20 -7
  343. package/dist/components/dso-modal.js.map +1 -1
  344. package/dist/components/dso-onboarding-tip.js +26 -11
  345. package/dist/components/dso-onboarding-tip.js.map +1 -1
  346. package/dist/components/dso-project-item.js +1 -1
  347. package/dist/components/dso-project-item.js.map +1 -1
  348. package/dist/components/dso-viewer-grid.js +41 -105
  349. package/dist/components/dso-viewer-grid.js.map +1 -1
  350. package/dist/components/label.js +1 -1
  351. package/dist/components/label.js.map +1 -1
  352. package/dist/components/table.js +4 -8
  353. package/dist/components/table.js.map +1 -1
  354. package/dist/dso-toolkit/dso-accordion-section.entry.esm.js.map +1 -1
  355. package/dist/dso-toolkit/dso-advanced-select.entry.esm.js.map +1 -1
  356. package/dist/dso-toolkit/dso-alert.dso-badge.dso-image-overlay.dso-ozon-content.dso-panel.dso-table.entry.esm.js.map +1 -1
  357. package/dist/dso-toolkit/dso-banner.entry.esm.js.map +1 -1
  358. package/dist/dso-toolkit/dso-label.dso-renvooi.dso-slide-toggle.entry.esm.js.map +1 -1
  359. package/dist/dso-toolkit/dso-modal.entry.esm.js.map +1 -1
  360. package/dist/dso-toolkit/dso-onboarding-tip.entry.esm.js.map +1 -1
  361. package/dist/dso-toolkit/dso-project-item.entry.esm.js.map +1 -1
  362. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  363. package/dist/dso-toolkit/dso-viewer-grid.entry.esm.js.map +1 -1
  364. package/dist/dso-toolkit/p-159be9e6.entry.js +2 -0
  365. package/dist/dso-toolkit/{p-e9053e12.entry.js.map → p-159be9e6.entry.js.map} +1 -1
  366. package/dist/dso-toolkit/{p-6a156238.entry.js → p-6f89da1c.entry.js} +2 -2
  367. package/dist/dso-toolkit/{p-6a156238.entry.js.map → p-6f89da1c.entry.js.map} +1 -1
  368. package/dist/dso-toolkit/p-8897189c.entry.js +2 -0
  369. package/dist/dso-toolkit/p-8897189c.entry.js.map +1 -0
  370. package/dist/dso-toolkit/p-8f4a2401.entry.js +2 -0
  371. package/dist/dso-toolkit/p-8f4a2401.entry.js.map +1 -0
  372. package/dist/dso-toolkit/p-909118a3.entry.js +2 -0
  373. package/dist/dso-toolkit/p-909118a3.entry.js.map +1 -0
  374. package/dist/dso-toolkit/p-9abdf5aa.entry.js +2 -0
  375. package/dist/dso-toolkit/p-9abdf5aa.entry.js.map +1 -0
  376. package/dist/dso-toolkit/{p-7020a1ec.entry.js → p-b6f5ca5e.entry.js} +2 -2
  377. package/dist/dso-toolkit/{p-7020a1ec.entry.js.map → p-b6f5ca5e.entry.js.map} +1 -1
  378. package/dist/dso-toolkit/p-d926863a.entry.js +2 -0
  379. package/dist/dso-toolkit/p-d926863a.entry.js.map +1 -0
  380. package/dist/dso-toolkit/p-e85e3e06.entry.js +2 -0
  381. package/dist/dso-toolkit/p-e85e3e06.entry.js.map +1 -0
  382. package/dist/esm/dso-accordion-section.entry.js +3 -3
  383. package/dist/esm/dso-accordion-section.entry.js.map +1 -1
  384. package/dist/esm/dso-advanced-select.entry.js +2 -2
  385. package/dist/esm/dso-advanced-select.entry.js.map +1 -1
  386. package/dist/esm/dso-alert.dso-badge.dso-image-overlay.dso-ozon-content.dso-panel.dso-table.entry.js.map +1 -1
  387. package/dist/esm/dso-alert_6.entry.js +5 -9
  388. package/dist/esm/dso-alert_6.entry.js.map +1 -1
  389. package/dist/esm/dso-banner.entry.js +2 -2
  390. package/dist/esm/dso-banner.entry.js.map +1 -1
  391. package/dist/esm/dso-label.dso-renvooi.dso-slide-toggle.entry.js.map +1 -1
  392. package/dist/esm/dso-label_3.entry.js +1 -1
  393. package/dist/esm/dso-label_3.entry.js.map +1 -1
  394. package/dist/esm/dso-modal.entry.js +19 -6
  395. package/dist/esm/dso-modal.entry.js.map +1 -1
  396. package/dist/esm/dso-onboarding-tip.entry.js +24 -10
  397. package/dist/esm/dso-onboarding-tip.entry.js.map +1 -1
  398. package/dist/esm/dso-project-item.entry.js +1 -1
  399. package/dist/esm/dso-project-item.entry.js.map +1 -1
  400. package/dist/esm/dso-toolkit.js +1 -1
  401. package/dist/esm/dso-viewer-grid.entry.js +38 -101
  402. package/dist/esm/dso-viewer-grid.entry.js.map +1 -1
  403. package/dist/esm/loader.js +1 -1
  404. package/dist/types/components/advanced-select/advanced-select.interfaces.d.ts +1 -1
  405. package/dist/types/components/badge/badge.interfaces.d.ts +1 -1
  406. package/dist/types/components/banner/banner.d.ts +1 -1
  407. package/dist/types/components/label/label.interfaces.d.ts +1 -1
  408. package/dist/types/components/modal/modal.d.ts +8 -3
  409. package/dist/types/components/onboarding-tip/onboarding-tip.d.ts +1 -0
  410. package/dist/types/components/table/table.d.ts +1 -4
  411. package/dist/types/components/viewer-grid/components/filter-panel.d.ts +7 -0
  412. package/dist/types/components/viewer-grid/components/index.d.ts +1 -1
  413. package/dist/types/components/viewer-grid/components/main-panel.d.ts +1 -4
  414. package/dist/types/components/viewer-grid/viewer-grid.d.ts +22 -43
  415. package/dist/types/components/viewer-grid/viewer-grid.interfaces.d.ts +3 -13
  416. package/dist/types/components.d.ts +39 -70
  417. package/package.json +3 -3
  418. package/dist/collection/components/viewer-grid/components/filterpanel.js +0 -13
  419. package/dist/collection/components/viewer-grid/components/filterpanel.js.map +0 -1
  420. package/dist/collection/components/viewer-grid/components/viewer-grid-filterpanel-buttons.js +0 -3
  421. package/dist/collection/components/viewer-grid/components/viewer-grid-filterpanel-buttons.js.map +0 -1
  422. package/dist/dso-toolkit/p-0c742a6a.entry.js +0 -2
  423. package/dist/dso-toolkit/p-0c742a6a.entry.js.map +0 -1
  424. package/dist/dso-toolkit/p-1107be6c.entry.js +0 -2
  425. package/dist/dso-toolkit/p-1107be6c.entry.js.map +0 -1
  426. package/dist/dso-toolkit/p-2b5f70a0.entry.js +0 -2
  427. package/dist/dso-toolkit/p-2b5f70a0.entry.js.map +0 -1
  428. package/dist/dso-toolkit/p-7d142b40.entry.js +0 -2
  429. package/dist/dso-toolkit/p-7d142b40.entry.js.map +0 -1
  430. package/dist/dso-toolkit/p-8084c884.entry.js +0 -2
  431. package/dist/dso-toolkit/p-8084c884.entry.js.map +0 -1
  432. package/dist/dso-toolkit/p-c0410277.entry.js +0 -2
  433. package/dist/dso-toolkit/p-c0410277.entry.js.map +0 -1
  434. package/dist/dso-toolkit/p-e9053e12.entry.js +0 -2
  435. package/dist/types/components/viewer-grid/components/filterpanel.d.ts +0 -11
  436. package/dist/types/components/viewer-grid/components/viewer-grid-filterpanel-buttons.d.ts +0 -6
@@ -20,9 +20,9 @@ const Banner = class {
20
20
  this.icon = false;
21
21
  }
22
22
  render() {
23
- return (index.h("section", { key: 'c0335c686d390d708a0a07091a19d68acf754f2f', class: clsx.clsx("dso-banner", `alert-${this.status}`, {
23
+ return (index.h("section", { key: '6ec542fbb7b329d79fb6065c74be3c30edaa5bcc', class: clsx.clsx("dso-banner", `alert-${this.status}`, {
24
24
  "dso-compact": this.compact,
25
- }), role: "alert" }, index.h("slot", { key: '1db4cbf2f5550d0c328954c211fff7261d951b81' })));
25
+ }), role: "alert" }, index.h("slot", { key: 'c940029d0ad0ec681811cd6bb68446ccd41878c9' })));
26
26
  }
27
27
  };
28
28
  Banner.style = bannerCss;
@@ -1 +1 @@
1
- {"file":"dso-banner.entry.cjs.js","mappings":";;;;;AAAA,MAAM,SAAS,GAAG,+LAA+L;;MCQpM,MAAM,GAAA,MAAA;AALnB,IAAA,WAAA,CAAA,OAAA,EAAA;;AAYE;;AAEG;AAEH,QAAA,IAAO,CAAA,OAAA,GAAG,KAAK;AAEf;;;;AAIG;AAEH,QAAA,IAAI,CAAA,IAAA,GAAG,KAAK;AAcb;IAZC,MAAM,GAAA;QACJ,QACEA,OAAA,CAAA,SAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAEC,SAAI,CAAC,YAAY,EAAE,SAAS,IAAI,CAAC,MAAM,CAAA,CAAE,EAAE;gBAChD,aAAa,EAAE,IAAI,CAAC,OAAO;AAC5B,aAAA,CAAC,EACF,IAAI,EAAC,OAAO,EAAA,EAEZD,OAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACL;;;;;;;","names":["h","clsx"],"sources":["src/components/banner/banner.scss?tag=dso-banner&encapsulation=shadow","src/components/banner/banner.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/components/banner\";\r\n\r\n:host {\r\n display: block;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n.dso-banner {\r\n @include banner.root();\r\n}\r\n","import { Component, Prop, h } from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\n\r\n@Component({\r\n tag: \"dso-banner\",\r\n styleUrl: \"banner.scss\",\r\n shadow: true,\r\n})\r\nexport class Banner {\r\n /**\r\n * The status of the banner.\r\n */\r\n @Prop({ reflect: true })\r\n status!: \"danger\" | \"error\" | \"info\" | \"warning\";\r\n\r\n /**\r\n * Compact mode.\r\n */\r\n @Prop()\r\n compact = false;\r\n\r\n /**\r\n * *Icon can only be hidden when the 'compact' property is set to true.\r\n *\r\n * Option to show banner icon.\r\n */\r\n @Prop({ reflect: true })\r\n icon = false;\r\n\r\n render() {\r\n return (\r\n <section\r\n class={clsx(\"dso-banner\", `alert-${this.status}`, {\r\n \"dso-compact\": this.compact,\r\n })}\r\n role=\"alert\"\r\n >\r\n <slot></slot>\r\n </section>\r\n );\r\n }\r\n}\r\n"],"version":3}
1
+ {"file":"dso-banner.entry.cjs.js","mappings":";;;;;AAAA,MAAM,SAAS,GAAG,+LAA+L;;MCQpM,MAAM,GAAA,MAAA;AALnB,IAAA,WAAA,CAAA,OAAA,EAAA;;AAYE;;AAEG;AAEH,QAAA,IAAO,CAAA,OAAA,GAAG,KAAK;AAEf;;;;AAIG;AAEH,QAAA,IAAI,CAAA,IAAA,GAAG,KAAK;AAcb;IAZC,MAAM,GAAA;QACJ,QACEA,OAAA,CAAA,SAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAEC,SAAI,CAAC,YAAY,EAAE,SAAS,IAAI,CAAC,MAAM,CAAA,CAAE,EAAE;gBAChD,aAAa,EAAE,IAAI,CAAC,OAAO;AAC5B,aAAA,CAAC,EACF,IAAI,EAAC,OAAO,EAAA,EAEZD,OAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACL;;;;;;;","names":["h","clsx"],"sources":["src/components/banner/banner.scss?tag=dso-banner&encapsulation=shadow","src/components/banner/banner.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/components/banner\";\r\n\r\n:host {\r\n display: block;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n.dso-banner {\r\n @include banner.root();\r\n}\r\n","import { Component, Prop, h } from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\n\r\n@Component({\r\n tag: \"dso-banner\",\r\n styleUrl: \"banner.scss\",\r\n shadow: true,\r\n})\r\nexport class Banner {\r\n /**\r\n * The status of the banner.\r\n */\r\n @Prop({ reflect: true })\r\n status!: \"success\" | \"error\" | \"info\" | \"warning\";\r\n\r\n /**\r\n * Compact mode.\r\n */\r\n @Prop()\r\n compact = false;\r\n\r\n /**\r\n * *Icon can only be hidden when the 'compact' property is set to true.\r\n *\r\n * Option to show banner icon.\r\n */\r\n @Prop({ reflect: true })\r\n icon = false;\r\n\r\n render() {\r\n return (\r\n <section\r\n class={clsx(\"dso-banner\", `alert-${this.status}`, {\r\n \"dso-compact\": this.compact,\r\n })}\r\n role=\"alert\"\r\n >\r\n <slot></slot>\r\n </section>\r\n );\r\n }\r\n}\r\n"],"version":3}
@@ -1 +1 @@
1
- {"version":3,"file":"dso-banner.entry.cjs.js","sources":["src/components/banner/banner.scss?tag=dso-banner&encapsulation=shadow","src/components/banner/banner.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/components/banner\";\r\n\r\n:host {\r\n display: block;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n.dso-banner {\r\n @include banner.root();\r\n}\r\n","import { Component, Prop, h } from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\n\r\n@Component({\r\n tag: \"dso-banner\",\r\n styleUrl: \"banner.scss\",\r\n shadow: true,\r\n})\r\nexport class Banner {\r\n /**\r\n * The status of the banner.\r\n */\r\n @Prop({ reflect: true })\r\n status!: \"danger\" | \"error\" | \"info\" | \"warning\";\r\n\r\n /**\r\n * Compact mode.\r\n */\r\n @Prop()\r\n compact = false;\r\n\r\n /**\r\n * *Icon can only be hidden when the 'compact' property is set to true.\r\n *\r\n * Option to show banner icon.\r\n */\r\n @Prop({ reflect: true })\r\n icon = false;\r\n\r\n render() {\r\n return (\r\n <section\r\n class={clsx(\"dso-banner\", `alert-${this.status}`, {\r\n \"dso-compact\": this.compact,\r\n })}\r\n role=\"alert\"\r\n >\r\n <slot></slot>\r\n </section>\r\n );\r\n }\r\n}\r\n"],"names":["h","clsx"],"mappings":";;;;;AAAA,MAAM,SAAS,GAAG,+LAA+L;;MCQpM,MAAM,GAAA,MAAA;AALnB,IAAA,WAAA,CAAA,OAAA,EAAA;;AAYE;;AAEG;AAEH,QAAA,IAAO,CAAA,OAAA,GAAG,KAAK;AAEf;;;;AAIG;AAEH,QAAA,IAAI,CAAA,IAAA,GAAG,KAAK;AAcb;IAZC,MAAM,GAAA;QACJ,QACEA,OAAA,CAAA,SAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAEC,SAAI,CAAC,YAAY,EAAE,SAAS,IAAI,CAAC,MAAM,CAAA,CAAE,EAAE;gBAChD,aAAa,EAAE,IAAI,CAAC,OAAO;AAC5B,aAAA,CAAC,EACF,IAAI,EAAC,OAAO,EAAA,EAEZD,OAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACL;;;;;;;"}
1
+ {"version":3,"file":"dso-banner.entry.cjs.js","sources":["src/components/banner/banner.scss?tag=dso-banner&encapsulation=shadow","src/components/banner/banner.tsx"],"sourcesContent":["@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/components/banner\";\r\n\r\n:host {\r\n display: block;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n.dso-banner {\r\n @include banner.root();\r\n}\r\n","import { Component, Prop, h } from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\n\r\n@Component({\r\n tag: \"dso-banner\",\r\n styleUrl: \"banner.scss\",\r\n shadow: true,\r\n})\r\nexport class Banner {\r\n /**\r\n * The status of the banner.\r\n */\r\n @Prop({ reflect: true })\r\n status!: \"success\" | \"error\" | \"info\" | \"warning\";\r\n\r\n /**\r\n * Compact mode.\r\n */\r\n @Prop()\r\n compact = false;\r\n\r\n /**\r\n * *Icon can only be hidden when the 'compact' property is set to true.\r\n *\r\n * Option to show banner icon.\r\n */\r\n @Prop({ reflect: true })\r\n icon = false;\r\n\r\n render() {\r\n return (\r\n <section\r\n class={clsx(\"dso-banner\", `alert-${this.status}`, {\r\n \"dso-compact\": this.compact,\r\n })}\r\n role=\"alert\"\r\n >\r\n <slot></slot>\r\n </section>\r\n );\r\n }\r\n}\r\n"],"names":["h","clsx"],"mappings":";;;;;AAAA,MAAM,SAAS,GAAG,+LAA+L;;MCQpM,MAAM,GAAA,MAAA;AALnB,IAAA,WAAA,CAAA,OAAA,EAAA;;AAYE;;AAEG;AAEH,QAAA,IAAO,CAAA,OAAA,GAAG,KAAK;AAEf;;;;AAIG;AAEH,QAAA,IAAI,CAAA,IAAA,GAAG,KAAK;AAcb;IAZC,MAAM,GAAA;QACJ,QACEA,OAAA,CAAA,SAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAEC,SAAI,CAAC,YAAY,EAAE,SAAS,IAAI,CAAC,MAAM,CAAA,CAAE,EAAE;gBAChD,aAAa,EAAE,IAAI,CAAC,OAAO;AAC5B,aAAA,CAAC,EACF,IAAI,EAAC,OAAO,EAAA,EAEZD,OAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACL;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"dso-label.dso-renvooi.dso-slide-toggle.entry.cjs.js","sources":["src/components/label/label.scss?tag=dso-label&encapsulation=shadow","src/components/label/label.tsx","src/components/renvooi/renvooi-render-text.tsx","src/components/renvooi/renvooi-render.tsx","src/components/renvooi/renvooi.scss?tag=dso-renvooi&encapsulation=shadow","src/components/renvooi/renvooi.tsx","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/units\";\r\n@use \"~dso-toolkit/src/components/label\";\r\n\r\n:host {\r\n display: inline-block;\r\n max-inline-size: 100%;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n// Todo: Replace .sr-only selector with web component specific selector, no need for .sr-only if we can generate the SCSS\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\n.dso-label {\r\n @include label.root();\r\n\r\n &.dso-hover {\r\n .dso-label-content {\r\n text-decoration: line-through;\r\n }\r\n }\r\n}\r\n\r\n.dso-truncate.dso-label-content {\r\n display: inline-block;\r\n max-inline-size: 100%;\r\n overflow: hidden;\r\n text-overflow: ellipsis; // stylelint-disable-line declaration-property-value-disallowed-list -- full text can be viewed via tooltip.\r\n vertical-align: bottom;\r\n white-space: nowrap; // stylelint-disable-line declaration-property-value-disallowed-list -- full text can be viewed via tooltip.\r\n}\r\n\r\n:host([removable]) {\r\n .dso-truncate.dso-label-content {\r\n max-inline-size: calc(100% - (units.$u3 + 4px));\r\n }\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 Listen,\r\n Method,\r\n Prop,\r\n State,\r\n Watch,\r\n h,\r\n} from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\nimport debounce from \"debounce\";\r\n\r\nimport { LabelStatus } from \"./label.interfaces\";\r\n\r\nconst resizeObserver = new ResizeObserver(\r\n debounce((entries: ResizeObserverEntry[]) => {\r\n entries.forEach(({ target }) => {\r\n if (isDsoLabelComponent(target)) {\r\n target._truncateLabel();\r\n }\r\n });\r\n }, 150),\r\n);\r\n\r\nfunction isDsoLabelComponent(element: Element): element is HTMLDsoLabelElement {\r\n return element.tagName === \"DSO-LABEL\";\r\n}\r\n\r\nfunction hasEllipses(el: HTMLElement): boolean {\r\n return el.scrollWidth > el.clientWidth;\r\n}\r\n\r\n@Component({\r\n tag: \"dso-label\",\r\n styleUrl: \"label.scss\",\r\n shadow: true,\r\n})\r\nexport class Label implements ComponentInterface {\r\n private labelContent: HTMLSpanElement | undefined;\r\n\r\n private mutationObserver?: MutationObserver;\r\n\r\n @Element()\r\n private host!: HTMLDsoLabelElement;\r\n\r\n /**\r\n * For compact Label\r\n */\r\n @Prop()\r\n compact?: boolean;\r\n\r\n /**\r\n * Shows a button that can be used to remove the Label.\r\n */\r\n @Prop({ reflect: true })\r\n removable?: boolean;\r\n\r\n /**\r\n * The status of this Label.\r\n */\r\n @Prop()\r\n status?: LabelStatus;\r\n\r\n /**\r\n * Emitted when the user activates the remove button.\r\n */\r\n @Event()\r\n dsoRemoveClick!: EventEmitter<MouseEvent>;\r\n\r\n @State()\r\n removeHover?: boolean;\r\n\r\n @State()\r\n removeFocus?: boolean;\r\n\r\n /**\r\n * Whether the Label is allowed to truncate the contents if it does not fit the container element.\r\n */\r\n @Prop()\r\n truncate?: boolean;\r\n\r\n @State()\r\n textHover?: boolean;\r\n\r\n @State()\r\n textFocus?: boolean;\r\n\r\n @State()\r\n isTruncated = false;\r\n\r\n @State()\r\n labelText = \"\";\r\n\r\n @Watch(\"removable\")\r\n watchRemovable(removable: boolean) {\r\n if (removable) {\r\n this.startMutationObserver();\r\n } else {\r\n this.stopMutationObserver();\r\n }\r\n }\r\n\r\n @Watch(\"truncate\")\r\n watchTruncate(truncate: boolean) {\r\n if (truncate) {\r\n this.startTruncate();\r\n } else {\r\n this.stopTruncate();\r\n }\r\n }\r\n\r\n @Listen(\"keydown\", { target: \"document\" })\r\n keyDownListener(event: KeyboardEvent) {\r\n if (event.key === \"Escape\") {\r\n this.textHover = false;\r\n this.textFocus = false;\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n @Method()\r\n async _truncateLabel() {\r\n setTimeout(() => {\r\n this.isTruncated = !!this.labelContent && hasEllipses(this.labelContent);\r\n });\r\n }\r\n\r\n private syncLabelText() {\r\n this.labelText = this.host.textContent?.trim() ?? \"\";\r\n }\r\n\r\n componentDidLoad() {\r\n if (this.truncate) {\r\n this.startTruncate();\r\n }\r\n\r\n if (this.removable) {\r\n this.startMutationObserver();\r\n }\r\n }\r\n\r\n disconnectedCallback() {\r\n this.stopTruncate();\r\n\r\n this.stopMutationObserver(true);\r\n }\r\n\r\n /** The mutationObserver fetches the text placed inside the label, this is then used for the remove button and tooltip. */\r\n private startMutationObserver(): void {\r\n this.mutationObserver = new MutationObserver(() => this.syncLabelText());\r\n\r\n this.mutationObserver.observe(this.host, {\r\n characterData: true,\r\n childList: true,\r\n subtree: true,\r\n attributes: true,\r\n });\r\n\r\n this.syncLabelText();\r\n }\r\n\r\n private stopMutationObserver(force = false): void {\r\n if (force || !(this.truncate && this.removable)) {\r\n this.mutationObserver?.disconnect();\r\n\r\n delete this.mutationObserver;\r\n }\r\n }\r\n\r\n private startTruncate(): void {\r\n resizeObserver.observe(this.host);\r\n this.startMutationObserver();\r\n this._truncateLabel();\r\n }\r\n\r\n private stopTruncate(): void {\r\n resizeObserver.unobserve(this.host);\r\n this.stopMutationObserver();\r\n this.isTruncated = false;\r\n }\r\n\r\n render() {\r\n return (\r\n <Fragment>\r\n <span\r\n aria-describedby=\"toggle-anchor\"\r\n class={clsx(\"dso-label\", {\r\n [`dso-label-${this.status}`]: this.status,\r\n \"dso-compact\": this.compact && !this.removable,\r\n \"dso-hover\": this.removeHover || this.removeFocus,\r\n })}\r\n >\r\n <slot name=\"symbol\"></slot>\r\n <span\r\n class={clsx(\"dso-label-content\", {\r\n \"dso-truncate\": !!this.truncate,\r\n })}\r\n ref={(element) => (this.labelContent = element)}\r\n tabindex={this.truncate && this.isTruncated ? 0 : undefined}\r\n onMouseEnter={() => (this.textHover = true)}\r\n onMouseLeave={() => (this.textHover = false)}\r\n onFocus={() => (this.textFocus = true)}\r\n onBlur={() => (this.textFocus = false)}\r\n >\r\n <slot></slot>\r\n </span>\r\n {this.removable && (\r\n <button\r\n type=\"button\"\r\n onClick={(e) => this.dsoRemoveClick.emit(e)}\r\n onMouseEnter={() => (this.removeHover = true)}\r\n onMouseLeave={() => (this.removeHover = false)}\r\n onFocus={() => (this.removeFocus = true)}\r\n onBlur={() => (this.removeFocus = false)}\r\n >\r\n <span class=\"sr-only\">Verwijder: {this.labelText}</span>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n </button>\r\n )}\r\n </span>\r\n {this.isTruncated && (\r\n <dso-tooltip\r\n stateless\r\n id=\"toggle-anchor\"\r\n active={this.textHover || this.textFocus}\r\n position=\"top\"\r\n strategy=\"absolute\"\r\n >\r\n {this.labelText}\r\n </dso-tooltip>\r\n )}\r\n </Fragment>\r\n );\r\n }\r\n}\r\n","import { Fragment, FunctionalComponent, h } from \"@stencil/core\";\r\n\r\nimport { RenvooiRenderMarkFunction } from \"./renvooi.interfaces\";\r\n\r\ninterface RenvooiRenderTextProps {\r\n text: string;\r\n mark: RenvooiRenderMarkFunction | undefined;\r\n onMarkItemHighlight: (text: string, ref: HTMLElement) => void | undefined;\r\n}\r\n\r\nexport const RenvooiRenderText: FunctionalComponent<RenvooiRenderTextProps> = ({ text, mark, onMarkItemHighlight }) => {\r\n if (!mark) {\r\n return <>{text}</>;\r\n }\r\n\r\n const result = mark(text);\r\n\r\n if (!result) {\r\n return <>{text}</>;\r\n }\r\n\r\n return (\r\n <>\r\n {result.map((renvooiText) => {\r\n if (typeof renvooiText === \"string\") {\r\n return <>{renvooiText}</>;\r\n }\r\n\r\n return (\r\n <mark\r\n class={renvooiText.highlight ? \"dso-highlight\" : undefined}\r\n ref={(ref) => renvooiText.highlight && ref && onMarkItemHighlight(renvooiText.text, ref)}\r\n >\r\n {renvooiText.text}\r\n </mark>\r\n );\r\n })}\r\n </>\r\n );\r\n};\r\n","import { Fragment, FunctionalComponent, h } from \"@stencil/core\";\r\n\r\nimport { RenvooiRenderText } from \"./renvooi-render-text\";\r\nimport { RenvooiRenderMarkFunction, RenvooiValue } from \"./renvooi.interfaces\";\r\n\r\ninterface RenvooiRenderProps {\r\n value: RenvooiValue;\r\n mark: RenvooiRenderMarkFunction | undefined;\r\n onMarkItemHighlight: (text: string, elementRef: HTMLElement) => void | undefined;\r\n}\r\n\r\nexport const RenvooiRender: FunctionalComponent<RenvooiRenderProps> = ({ value, mark, onMarkItemHighlight }) => {\r\n if (typeof value === \"string\" || !value) {\r\n // This element is used for --_dso-renvooi-text-decoration\r\n return (\r\n <span class=\"text\">\r\n <RenvooiRenderText text={value} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </span>\r\n );\r\n }\r\n\r\n if (\"toegevoegd\" in value) {\r\n return (\r\n <ins>\r\n <RenvooiRenderText text={value.toegevoegd} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </ins>\r\n );\r\n }\r\n\r\n if (\"verwijderd\" in value) {\r\n return (\r\n <del>\r\n <RenvooiRenderText text={value.verwijderd} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </del>\r\n );\r\n }\r\n\r\n return (\r\n <>\r\n <del>\r\n <RenvooiRenderText text={value.was} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </del>\r\n <ins>\r\n <RenvooiRenderText text={value.wordt} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </ins>\r\n </>\r\n );\r\n};\r\n","@use \"~dso-toolkit/src/utilities\";\r\n\r\n@use \"~dso-toolkit/src/components/insert/insert\";\r\n@use \"~dso-toolkit/src/components/delete/delete\";\r\n@use \"~dso-toolkit/src/components/mark/mark\";\r\n\r\n:host {\r\n display: inline;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n.text {\r\n text-decoration: var(--_dso-renvooi-text-decoration);\r\n}\r\n","import { Component, ComponentInterface, Event, EventEmitter, Fragment, Prop, h } from \"@stencil/core\";\r\n\r\nimport { RenvooiRender } from \"./renvooi-render\";\r\nimport { RenvooiMarkFunction, RenvooiMarkItemHighlightEvent, RenvooiValue } from \"./renvooi.interfaces\";\r\n\r\n/**\r\n * Met dit component kan een `RenvooiValue` worden gepresenteerd.\r\n */\r\n@Component({\r\n tag: \"dso-renvooi\",\r\n styleUrl: \"renvooi.scss\",\r\n shadow: true,\r\n})\r\nexport class Renvooi implements ComponentInterface {\r\n /**\r\n * The renvooi value to render.\r\n */\r\n @Prop()\r\n value?: RenvooiValue | RenvooiValue[];\r\n\r\n /**\r\n * To mark text.\r\n */\r\n @Prop()\r\n mark?: RenvooiMarkFunction;\r\n\r\n /**\r\n * Emitted when a marked item is highlighted.\r\n */\r\n @Event({ bubbles: false })\r\n dsoRenvooiMarkItemHighlight!: EventEmitter<RenvooiMarkItemHighlightEvent>;\r\n\r\n get values(): RenvooiValue[] {\r\n if (!this.value) {\r\n return [];\r\n }\r\n\r\n return Array.isArray(this.value) ? this.value : [this.value];\r\n }\r\n\r\n private handleMarkItemHighlight = (text: string, elementRef: HTMLElement) => {\r\n this.dsoRenvooiMarkItemHighlight.emit({ text, elementRef });\r\n };\r\n\r\n render() {\r\n return (\r\n <>\r\n {this.values.map((v) => (\r\n <RenvooiRender\r\n value={v}\r\n mark={this.mark && ((text) => this.mark?.(text, v, this.values))}\r\n onMarkItemHighlight={this.handleMarkItemHighlight}\r\n />\r\n ))}\r\n </>\r\n );\r\n }\r\n}\r\n","@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"],"names":["debounce","h","Fragment","clsx","v4"],"mappings":";;;;;;;;AAAA,MAAM,QAAQ,GAAG,44DAA44D;;ACmB75D,MAAM,cAAc,GAAG,IAAI,cAAc,CACvCA,cAAQ,CAAC,CAAC,OAA8B,KAAI;IAC1C,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,KAAI;AAC7B,QAAA,IAAI,mBAAmB,CAAC,MAAM,CAAC,EAAE;YAC/B,MAAM,CAAC,cAAc,EAAE;;AAE3B,KAAC,CAAC;AACJ,CAAC,EAAE,GAAG,CAAC,CACR;AAED,SAAS,mBAAmB,CAAC,OAAgB,EAAA;AAC3C,IAAA,OAAO,OAAO,CAAC,OAAO,KAAK,WAAW;AACxC;AAEA,SAAS,WAAW,CAAC,EAAe,EAAA;AAClC,IAAA,OAAO,EAAE,CAAC,WAAW,GAAG,EAAE,CAAC,WAAW;AACxC;MAOa,KAAK,GAAA,MAAA;AALlB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAwDE,QAAA,IAAW,CAAA,WAAA,GAAG,KAAK;AAGnB,QAAA,IAAS,CAAA,SAAA,GAAG,EAAE;AAiJf;AA9IC,IAAA,cAAc,CAAC,SAAkB,EAAA;QAC/B,IAAI,SAAS,EAAE;YACb,IAAI,CAAC,qBAAqB,EAAE;;aACvB;YACL,IAAI,CAAC,oBAAoB,EAAE;;;AAK/B,IAAA,aAAa,CAAC,QAAiB,EAAA;QAC7B,IAAI,QAAQ,EAAE;YACZ,IAAI,CAAC,aAAa,EAAE;;aACf;YACL,IAAI,CAAC,YAAY,EAAE;;;AAKvB,IAAA,eAAe,CAAC,KAAoB,EAAA;AAClC,QAAA,IAAI,KAAK,CAAC,GAAG,KAA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,EAAQ,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,GAAG,EAAC,IAAI,EAAC,cAAc,EAAG,CAAA,CAC1C,CACA,CACC,EACR,IAAI,CAAC,eAAe,KACnBA,sEAAO,OAAO,EAAE,IAAI,CAAC,UAAU,EAAA,EAC7BA,SAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAQ,CACF,CACT,CACA;;;;;;;;;;"}
1
+ {"version":3,"file":"dso-label.dso-renvooi.dso-slide-toggle.entry.cjs.js","sources":["src/components/label/label.scss?tag=dso-label&encapsulation=shadow","src/components/label/label.tsx","src/components/renvooi/renvooi-render-text.tsx","src/components/renvooi/renvooi-render.tsx","src/components/renvooi/renvooi.scss?tag=dso-renvooi&encapsulation=shadow","src/components/renvooi/renvooi.tsx","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/units\";\r\n@use \"~dso-toolkit/src/components/label\";\r\n\r\n:host {\r\n display: inline-block;\r\n max-inline-size: 100%;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n// Todo: Replace .sr-only selector with web component specific selector, no need for .sr-only if we can generate the SCSS\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\n.dso-label {\r\n @include label.root();\r\n\r\n &.dso-hover {\r\n .dso-label-content {\r\n text-decoration: line-through;\r\n }\r\n }\r\n}\r\n\r\n.dso-truncate.dso-label-content {\r\n display: inline-block;\r\n max-inline-size: 100%;\r\n overflow: hidden;\r\n text-overflow: ellipsis; // stylelint-disable-line declaration-property-value-disallowed-list -- full text can be viewed via tooltip.\r\n vertical-align: bottom;\r\n white-space: nowrap; // stylelint-disable-line declaration-property-value-disallowed-list -- full text can be viewed via tooltip.\r\n}\r\n\r\n:host([removable]) {\r\n .dso-truncate.dso-label-content {\r\n max-inline-size: calc(100% - (units.$u3 + 4px));\r\n }\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 Listen,\r\n Method,\r\n Prop,\r\n State,\r\n Watch,\r\n h,\r\n} from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\nimport debounce from \"debounce\";\r\n\r\nimport { LabelStatus } from \"./label.interfaces\";\r\n\r\nconst resizeObserver = new ResizeObserver(\r\n debounce((entries: ResizeObserverEntry[]) => {\r\n entries.forEach(({ target }) => {\r\n if (isDsoLabelComponent(target)) {\r\n target._truncateLabel();\r\n }\r\n });\r\n }, 150),\r\n);\r\n\r\nfunction isDsoLabelComponent(element: Element): element is HTMLDsoLabelElement {\r\n return element.tagName === \"DSO-LABEL\";\r\n}\r\n\r\nfunction hasEllipses(el: HTMLElement): boolean {\r\n return el.scrollWidth > el.clientWidth;\r\n}\r\n\r\n@Component({\r\n tag: \"dso-label\",\r\n styleUrl: \"label.scss\",\r\n shadow: true,\r\n})\r\nexport class Label implements ComponentInterface {\r\n private labelContent: HTMLSpanElement | undefined;\r\n\r\n private mutationObserver?: MutationObserver;\r\n\r\n @Element()\r\n private host!: HTMLDsoLabelElement;\r\n\r\n /**\r\n * For compact Label\r\n */\r\n @Prop()\r\n compact?: boolean;\r\n\r\n /**\r\n * Shows a button that can be used to remove the Label.\r\n */\r\n @Prop({ reflect: true })\r\n removable?: boolean;\r\n\r\n /**\r\n * The status of this Label.\r\n */\r\n @Prop()\r\n status?: LabelStatus;\r\n\r\n /**\r\n * Emitted when the user activates the remove button.\r\n */\r\n @Event()\r\n dsoRemoveClick!: EventEmitter<MouseEvent>;\r\n\r\n @State()\r\n removeHover?: boolean;\r\n\r\n @State()\r\n removeFocus?: boolean;\r\n\r\n /**\r\n * Whether the Label is allowed to truncate the contents if it does not fit the container element.\r\n */\r\n @Prop()\r\n truncate?: boolean;\r\n\r\n @State()\r\n textHover?: boolean;\r\n\r\n @State()\r\n textFocus?: boolean;\r\n\r\n @State()\r\n isTruncated = false;\r\n\r\n @State()\r\n labelText = \"\";\r\n\r\n @Watch(\"removable\")\r\n watchRemovable(removable: boolean) {\r\n if (removable) {\r\n this.startMutationObserver();\r\n } else {\r\n this.stopMutationObserver();\r\n }\r\n }\r\n\r\n @Watch(\"truncate\")\r\n watchTruncate(truncate: boolean) {\r\n if (truncate) {\r\n this.startTruncate();\r\n } else {\r\n this.stopTruncate();\r\n }\r\n }\r\n\r\n @Listen(\"keydown\", { target: \"document\" })\r\n keyDownListener(event: KeyboardEvent) {\r\n if (event.key === \"Escape\") {\r\n this.textHover = false;\r\n this.textFocus = false;\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n @Method()\r\n async _truncateLabel() {\r\n setTimeout(() => {\r\n this.isTruncated = !!this.labelContent && hasEllipses(this.labelContent);\r\n });\r\n }\r\n\r\n private syncLabelText() {\r\n this.labelText = this.host.textContent?.trim() ?? \"\";\r\n }\r\n\r\n componentDidLoad() {\r\n if (this.truncate) {\r\n this.startTruncate();\r\n }\r\n\r\n if (this.removable) {\r\n this.startMutationObserver();\r\n }\r\n }\r\n\r\n disconnectedCallback() {\r\n this.stopTruncate();\r\n\r\n this.stopMutationObserver(true);\r\n }\r\n\r\n /** The mutationObserver fetches the text placed inside the label, this is then used for the remove button and tooltip. */\r\n private startMutationObserver(): void {\r\n this.mutationObserver = new MutationObserver(() => this.syncLabelText());\r\n\r\n this.mutationObserver.observe(this.host, {\r\n characterData: true,\r\n childList: true,\r\n subtree: true,\r\n attributes: true,\r\n });\r\n\r\n this.syncLabelText();\r\n }\r\n\r\n private stopMutationObserver(force = false): void {\r\n if (force || !(this.truncate && this.removable)) {\r\n this.mutationObserver?.disconnect();\r\n\r\n delete this.mutationObserver;\r\n }\r\n }\r\n\r\n private startTruncate(): void {\r\n resizeObserver.observe(this.host);\r\n this.startMutationObserver();\r\n this._truncateLabel();\r\n }\r\n\r\n private stopTruncate(): void {\r\n resizeObserver.unobserve(this.host);\r\n this.stopMutationObserver();\r\n this.isTruncated = false;\r\n }\r\n\r\n render() {\r\n return (\r\n <Fragment>\r\n <span\r\n aria-describedby=\"toggle-anchor\"\r\n class={clsx(\"dso-label\", {\r\n [`dso-label-${this.status}`]: this.status,\r\n \"dso-compact\": this.compact && !this.removable,\r\n \"dso-hover\": this.removeHover || this.removeFocus,\r\n })}\r\n >\r\n <slot name=\"symbol\"></slot>\r\n <span\r\n class={clsx(\"dso-label-content\", {\r\n \"dso-truncate\": !!this.truncate,\r\n })}\r\n ref={(element) => (this.labelContent = element)}\r\n tabindex={this.truncate && this.isTruncated ? 0 : undefined}\r\n onMouseEnter={() => (this.textHover = true)}\r\n onMouseLeave={() => (this.textHover = false)}\r\n onFocus={() => (this.textFocus = true)}\r\n onBlur={() => (this.textFocus = false)}\r\n >\r\n <slot></slot>\r\n </span>\r\n {this.removable && (\r\n <button\r\n type=\"button\"\r\n onClick={(e) => this.dsoRemoveClick.emit(e)}\r\n onMouseEnter={() => (this.removeHover = true)}\r\n onMouseLeave={() => (this.removeHover = false)}\r\n onFocus={() => (this.removeFocus = true)}\r\n onBlur={() => (this.removeFocus = false)}\r\n >\r\n <span class=\"sr-only\">Verwijder: {this.labelText}</span>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n </button>\r\n )}\r\n </span>\r\n {this.isTruncated && (\r\n <dso-tooltip\r\n stateless\r\n id=\"toggle-anchor\"\r\n active={this.textHover || this.textFocus}\r\n position=\"top\"\r\n strategy=\"absolute\"\r\n >\r\n {this.labelText}\r\n </dso-tooltip>\r\n )}\r\n </Fragment>\r\n );\r\n }\r\n}\r\n","import { Fragment, FunctionalComponent, h } from \"@stencil/core\";\r\n\r\nimport { RenvooiRenderMarkFunction } from \"./renvooi.interfaces\";\r\n\r\ninterface RenvooiRenderTextProps {\r\n text: string;\r\n mark: RenvooiRenderMarkFunction | undefined;\r\n onMarkItemHighlight: (text: string, ref: HTMLElement) => void | undefined;\r\n}\r\n\r\nexport const RenvooiRenderText: FunctionalComponent<RenvooiRenderTextProps> = ({ text, mark, onMarkItemHighlight }) => {\r\n if (!mark) {\r\n return <>{text}</>;\r\n }\r\n\r\n const result = mark(text);\r\n\r\n if (!result) {\r\n return <>{text}</>;\r\n }\r\n\r\n return (\r\n <>\r\n {result.map((renvooiText) => {\r\n if (typeof renvooiText === \"string\") {\r\n return <>{renvooiText}</>;\r\n }\r\n\r\n return (\r\n <mark\r\n class={renvooiText.highlight ? \"dso-highlight\" : undefined}\r\n ref={(ref) => renvooiText.highlight && ref && onMarkItemHighlight(renvooiText.text, ref)}\r\n >\r\n {renvooiText.text}\r\n </mark>\r\n );\r\n })}\r\n </>\r\n );\r\n};\r\n","import { Fragment, FunctionalComponent, h } from \"@stencil/core\";\r\n\r\nimport { RenvooiRenderText } from \"./renvooi-render-text\";\r\nimport { RenvooiRenderMarkFunction, RenvooiValue } from \"./renvooi.interfaces\";\r\n\r\ninterface RenvooiRenderProps {\r\n value: RenvooiValue;\r\n mark: RenvooiRenderMarkFunction | undefined;\r\n onMarkItemHighlight: (text: string, elementRef: HTMLElement) => void | undefined;\r\n}\r\n\r\nexport const RenvooiRender: FunctionalComponent<RenvooiRenderProps> = ({ value, mark, onMarkItemHighlight }) => {\r\n if (typeof value === \"string\" || !value) {\r\n // This element is used for --_dso-renvooi-text-decoration\r\n return (\r\n <span class=\"text\">\r\n <RenvooiRenderText text={value} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </span>\r\n );\r\n }\r\n\r\n if (\"toegevoegd\" in value) {\r\n return (\r\n <ins>\r\n <RenvooiRenderText text={value.toegevoegd} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </ins>\r\n );\r\n }\r\n\r\n if (\"verwijderd\" in value) {\r\n return (\r\n <del>\r\n <RenvooiRenderText text={value.verwijderd} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </del>\r\n );\r\n }\r\n\r\n return (\r\n <>\r\n <del>\r\n <RenvooiRenderText text={value.was} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </del>\r\n <ins>\r\n <RenvooiRenderText text={value.wordt} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </ins>\r\n </>\r\n );\r\n};\r\n","@use \"~dso-toolkit/src/utilities\";\r\n\r\n@use \"~dso-toolkit/src/components/insert/insert\";\r\n@use \"~dso-toolkit/src/components/delete/delete\";\r\n@use \"~dso-toolkit/src/components/mark/mark\";\r\n\r\n:host {\r\n display: inline;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n.text {\r\n text-decoration: var(--_dso-renvooi-text-decoration);\r\n}\r\n","import { Component, ComponentInterface, Event, EventEmitter, Fragment, Prop, h } from \"@stencil/core\";\r\n\r\nimport { RenvooiRender } from \"./renvooi-render\";\r\nimport { RenvooiMarkFunction, RenvooiMarkItemHighlightEvent, RenvooiValue } from \"./renvooi.interfaces\";\r\n\r\n/**\r\n * Met dit component kan een `RenvooiValue` worden gepresenteerd.\r\n */\r\n@Component({\r\n tag: \"dso-renvooi\",\r\n styleUrl: \"renvooi.scss\",\r\n shadow: true,\r\n})\r\nexport class Renvooi implements ComponentInterface {\r\n /**\r\n * The renvooi value to render.\r\n */\r\n @Prop()\r\n value?: RenvooiValue | RenvooiValue[];\r\n\r\n /**\r\n * To mark text.\r\n */\r\n @Prop()\r\n mark?: RenvooiMarkFunction;\r\n\r\n /**\r\n * Emitted when a marked item is highlighted.\r\n */\r\n @Event({ bubbles: false })\r\n dsoRenvooiMarkItemHighlight!: EventEmitter<RenvooiMarkItemHighlightEvent>;\r\n\r\n get values(): RenvooiValue[] {\r\n if (!this.value) {\r\n return [];\r\n }\r\n\r\n return Array.isArray(this.value) ? this.value : [this.value];\r\n }\r\n\r\n private handleMarkItemHighlight = (text: string, elementRef: HTMLElement) => {\r\n this.dsoRenvooiMarkItemHighlight.emit({ text, elementRef });\r\n };\r\n\r\n render() {\r\n return (\r\n <>\r\n {this.values.map((v) => (\r\n <RenvooiRender\r\n value={v}\r\n mark={this.mark && ((text) => this.mark?.(text, v, this.values))}\r\n onMarkItemHighlight={this.handleMarkItemHighlight}\r\n />\r\n ))}\r\n </>\r\n );\r\n }\r\n}\r\n","@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"],"names":["debounce","h","Fragment","clsx","v4"],"mappings":";;;;;;;;AAAA,MAAM,QAAQ,GAAG,y8DAAy8D;;ACmB19D,MAAM,cAAc,GAAG,IAAI,cAAc,CACvCA,cAAQ,CAAC,CAAC,OAA8B,KAAI;IAC1C,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,KAAI;AAC7B,QAAA,IAAI,mBAAmB,CAAC,MAAM,CAAC,EAAE;YAC/B,MAAM,CAAC,cAAc,EAAE;;AAE3B,KAAC,CAAC;AACJ,CAAC,EAAE,GAAG,CAAC,CACR;AAED,SAAS,mBAAmB,CAAC,OAAgB,EAAA;AAC3C,IAAA,OAAO,OAAO,CAAC,OAAO,KAAK,WAAW;AACxC;AAEA,SAAS,WAAW,CAAC,EAAe,EAAA;AAClC,IAAA,OAAO,EAAE,CAAC,WAAW,GAAG,EAAE,CAAC,WAAW;AACxC;MAOa,KAAK,GAAA,MAAA;AALlB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAwDE,QAAA,IAAW,CAAA,WAAA,GAAG,KAAK;AAGnB,QAAA,IAAS,CAAA,SAAA,GAAG,EAAE;AAiJf;AA9IC,IAAA,cAAc,CAAC,SAAkB,EAAA;QAC/B,IAAI,SAAS,EAAE;YACb,IAAI,CAAC,qBAAqB,EAAE;;aACvB;YACL,IAAI,CAAC,oBAAoB,EAAE;;;AAK/B,IAAA,aAAa,CAAC,QAAiB,EAAA;QAC7B,IAAI,QAAQ,EAAE;YACZ,IAAI,CAAC,aAAa,EAAE;;aACf;YACL,IAAI,CAAC,YAAY,EAAE;;;AAKvB,IAAA,eAAe,CAAC,KAAoB,E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A,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,KACnBA,sEAAO,OAAO,EAAE,IAAI,CAAC,UAAU,EAAA,EAC7BA,SAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAQ,CACF,CACT,CACA;;;;;;;;;;"}
@@ -6,7 +6,7 @@ var index = require('./index-D8QM7CRO.js');
6
6
  var v4 = require('./v4-Br3XC_0C.js');
7
7
  require('./_commonjsHelpers-BJu3ubxk.js');
8
8
 
9
- const labelCss = ":host{display:inline-block;max-inline-size:100%}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.dso-label{border-radius:4px;display:inline-block;line-height:1.5;max-inline-size:100%;padding-block:4px;padding-inline:8px}.dso-label:focus-within,.dso-label.dso-hover{text-decoration:line-through}.dso-label button{background:none;border:0;border-radius:0 4px 4px 0;color:inherit;float:inline-end;font-size:1rem;margin-block-end:-4px;margin-inline-start:8px;margin-inline-end:-4px;margin-block-start:0;padding:0}.dso-label button:hover{cursor:pointer}.dso-label button>dso-icon,.dso-label button>svg.di{display:block}.dso-label{background-color:#f2f2f2;border-color:#f2f2f2;color:#191919}.dso-label.dso-label-info{background-color:#6ca4d9;border-color:#6ca4d9;color:#191919}.dso-label.dso-label-primary{background-color:#275937;border-color:#275937;color:#fff}.dso-label.dso-label-success{background-color:#39870c;border-color:#39870c;color:#fff}.dso-label.dso-label-warning{background-color:#dcd400;border-color:#dcd400;color:#191919}.dso-label.dso-label-danger{background-color:#ce3f51;border-color:#ce3f51;color:#fff}.dso-label.dso-label-error{background-color:#ce3f51;border-color:#ce3f51;color:#fff}.dso-label.dso-label-bright{background-color:#fff;border-color:#fff;color:#191919}.dso-label.dso-label-bright{outline:1px solid #ccc;outline-offset:-1px}.dso-label.dso-label-attention{background-color:#8b4a6a;border-color:#8b4a6a;color:#fff}.dso-label.dso-compact{padding-block:0;padding-inline:8px}.dso-label.dso-hover .dso-label-content{text-decoration:line-through}.dso-truncate.dso-label-content{display:inline-block;max-inline-size:100%;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom;white-space:nowrap}:host([removable]) .dso-truncate.dso-label-content{max-inline-size:calc(100% - 28px)}";
9
+ const labelCss = ":host{display:inline-block;max-inline-size:100%}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.dso-label{border-radius:4px;display:inline-block;line-height:1.5;max-inline-size:100%;padding-block:4px;padding-inline:8px}.dso-label:focus-within,.dso-label.dso-hover{text-decoration:line-through}.dso-label button{background:none;border:0;border-radius:0 4px 4px 0;color:inherit;float:inline-end;font-size:1rem;margin-block-end:-4px;margin-inline-start:8px;margin-inline-end:-4px;margin-block-start:0;padding:0}.dso-label button:hover{cursor:pointer}.dso-label button>dso-icon,.dso-label button>svg.di{display:block}.dso-label{background-color:#f2f2f2;border-color:#f2f2f2;color:#191919}.dso-label.dso-label-info{background-color:#6ca4d9;border-color:#6ca4d9;color:#191919}.dso-label.dso-label-primary{background-color:#275937;border-color:#275937;color:#fff}.dso-label.dso-label-success{background-color:#39870c;border-color:#39870c;color:#fff}.dso-label.dso-label-warning{background-color:#dcd400;border-color:#dcd400;color:#191919}.dso-label.dso-label-error{background-color:#ce3f51;border-color:#ce3f51;color:#fff}.dso-label.dso-label-bright{background-color:#fff;border-color:#fff;color:#191919}.dso-label.dso-label-bright{outline:1px solid #ccc;outline-offset:-1px}.dso-label.dso-label-attention{background-color:#8b4a6a;border-color:#8b4a6a;color:#fff}.dso-label.dso-label-filter{background-color:#e1ecf7;border-color:#2b5780;color:#191919}.dso-label.dso-label-filter{border-inline-start:5px solid}.dso-label.dso-compact{padding-block:0;padding-inline:8px}.dso-label.dso-hover .dso-label-content{text-decoration:line-through}.dso-truncate.dso-label-content{display:inline-block;max-inline-size:100%;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom;white-space:nowrap}:host([removable]) .dso-truncate.dso-label-content{max-inline-size:calc(100% - 28px)}";
10
10
 
11
11
  const resizeObserver = new ResizeObserver(index.debounce((entries) => {
12
12
  entries.forEach(({ target }) => {
@@ -1 +1 @@
1
- {"file":"dso-label.dso-renvooi.dso-slide-toggle.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,QAAQ,GAAG,44DAA44D;;ACmB75D,MAAM,cAAc,GAAG,IAAI,cAAc,CACvCA,cAAQ,CAAC,CAAC,OAA8B,KAAI;IAC1C,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,KAAI;AAC7B,QAAA,IAAI,mBAAmB,CAAC,MAAM,CAAC,EAAE;YAC/B,MAAM,CAAC,cAAc,EAAE;;AAE3B,KAAC,CAAC;AACJ,CAAC,EAAE,GAAG,CAAC,CACR;AAED,SAAS,mBAAmB,CAAC,OAAgB,EAAA;AAC3C,IAAA,OAAO,OAAO,CAAC,OAAO,KAAK,WAAW;AACxC;AAEA,SAAS,WAAW,CAAC,EAAe,EAAA;AAClC,IAAA,OAAO,EAAE,CAAC,WAAW,GAAG,EAAE,CAAC,WAAW;AACxC;MAOa,KAAK,GAAA,MAAA;AALlB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAwDE,QAAA,IAAW,CAAA,WAAA,GAAG,KAAK;AAGnB,QAAA,IAAS,CAAA,SAAA,GAAG,EAAE;AAiJf;AA9IC,IAAA,cAAc,CAAC,SAAkB,EAAA;QAC/B,IAAI,SAAS,EAAE;YACb,IAAI,CAAC,qBAAqB,EAAE;;aACvB;YACL,IAAI,CAAC,oBAAoB,EAAE;;;AAK/B,IAAA,aAAa,CAAC,QAAiB,EAAA;QAC7B,IAAI,QAAQ,EAAE;YACZ,I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AC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,cAAc,EAAC,EAAE,EAAC,IAAI,EAAG,CAAA,EAC3DA,SAAA,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,KACnBA,sEAAO,OAAO,EAAE,IAAI,CAAC,UAAU,EAAA,EAC7BA,SAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAQ,CACF,CACT,CACA;;;;;;;;;;","names":["debounce","h","Fragment","clsx","v4"],"sources":["src/components/label/label.scss?tag=dso-label&encapsulation=shadow","src/components/label/label.tsx","src/components/renvooi/renvooi-render-text.tsx","src/components/renvooi/renvooi-render.tsx","src/components/renvooi/renvooi.scss?tag=dso-renvooi&encapsulation=shadow","src/components/renvooi/renvooi.tsx","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/units\";\r\n@use \"~dso-toolkit/src/components/label\";\r\n\r\n:host {\r\n display: inline-block;\r\n max-inline-size: 100%;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n// Todo: Replace .sr-only selector with web component specific selector, no need for .sr-only if we can generate the SCSS\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\n.dso-label {\r\n @include label.root();\r\n\r\n &.dso-hover {\r\n .dso-label-content {\r\n text-decoration: line-through;\r\n }\r\n }\r\n}\r\n\r\n.dso-truncate.dso-label-content {\r\n display: inline-block;\r\n max-inline-size: 100%;\r\n overflow: hidden;\r\n text-overflow: ellipsis; // stylelint-disable-line declaration-property-value-disallowed-list -- full text can be viewed via tooltip.\r\n vertical-align: bottom;\r\n white-space: nowrap; // stylelint-disable-line declaration-property-value-disallowed-list -- full text can be viewed via tooltip.\r\n}\r\n\r\n:host([removable]) {\r\n .dso-truncate.dso-label-content {\r\n max-inline-size: calc(100% - (units.$u3 + 4px));\r\n }\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 Listen,\r\n Method,\r\n Prop,\r\n State,\r\n Watch,\r\n h,\r\n} from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\nimport debounce from \"debounce\";\r\n\r\nimport { LabelStatus } from \"./label.interfaces\";\r\n\r\nconst resizeObserver = new ResizeObserver(\r\n debounce((entries: ResizeObserverEntry[]) => {\r\n entries.forEach(({ target }) => {\r\n if (isDsoLabelComponent(target)) {\r\n target._truncateLabel();\r\n }\r\n });\r\n }, 150),\r\n);\r\n\r\nfunction isDsoLabelComponent(element: Element): element is HTMLDsoLabelElement {\r\n return element.tagName === \"DSO-LABEL\";\r\n}\r\n\r\nfunction hasEllipses(el: HTMLElement): boolean {\r\n return el.scrollWidth > el.clientWidth;\r\n}\r\n\r\n@Component({\r\n tag: \"dso-label\",\r\n styleUrl: \"label.scss\",\r\n shadow: true,\r\n})\r\nexport class Label implements ComponentInterface {\r\n private labelContent: HTMLSpanElement | undefined;\r\n\r\n private mutationObserver?: MutationObserver;\r\n\r\n @Element()\r\n private host!: HTMLDsoLabelElement;\r\n\r\n /**\r\n * For compact Label\r\n */\r\n @Prop()\r\n compact?: boolean;\r\n\r\n /**\r\n * Shows a button that can be used to remove the Label.\r\n */\r\n @Prop({ reflect: true })\r\n removable?: boolean;\r\n\r\n /**\r\n * The status of this Label.\r\n */\r\n @Prop()\r\n status?: LabelStatus;\r\n\r\n /**\r\n * Emitted when the user activates the remove button.\r\n */\r\n @Event()\r\n dsoRemoveClick!: EventEmitter<MouseEvent>;\r\n\r\n @State()\r\n removeHover?: boolean;\r\n\r\n @State()\r\n removeFocus?: boolean;\r\n\r\n /**\r\n * Whether the Label is allowed to truncate the contents if it does not fit the container element.\r\n */\r\n @Prop()\r\n truncate?: boolean;\r\n\r\n @State()\r\n textHover?: boolean;\r\n\r\n @State()\r\n textFocus?: boolean;\r\n\r\n @State()\r\n isTruncated = false;\r\n\r\n @State()\r\n labelText = \"\";\r\n\r\n @Watch(\"removable\")\r\n watchRemovable(removable: boolean) {\r\n if (removable) {\r\n this.startMutationObserver();\r\n } else {\r\n this.stopMutationObserver();\r\n }\r\n }\r\n\r\n @Watch(\"truncate\")\r\n watchTruncate(truncate: boolean) {\r\n if (truncate) {\r\n this.startTruncate();\r\n } else {\r\n this.stopTruncate();\r\n }\r\n }\r\n\r\n @Listen(\"keydown\", { target: \"document\" })\r\n keyDownListener(event: KeyboardEvent) {\r\n if (event.key === \"Escape\") {\r\n this.textHover = false;\r\n this.textFocus = false;\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n @Method()\r\n async _truncateLabel() {\r\n setTimeout(() => {\r\n this.isTruncated = !!this.labelContent && hasEllipses(this.labelContent);\r\n });\r\n }\r\n\r\n private syncLabelText() {\r\n this.labelText = this.host.textContent?.trim() ?? \"\";\r\n }\r\n\r\n componentDidLoad() {\r\n if (this.truncate) {\r\n this.startTruncate();\r\n }\r\n\r\n if (this.removable) {\r\n this.startMutationObserver();\r\n }\r\n }\r\n\r\n disconnectedCallback() {\r\n this.stopTruncate();\r\n\r\n this.stopMutationObserver(true);\r\n }\r\n\r\n /** The mutationObserver fetches the text placed inside the label, this is then used for the remove button and tooltip. */\r\n private startMutationObserver(): void {\r\n this.mutationObserver = new MutationObserver(() => this.syncLabelText());\r\n\r\n this.mutationObserver.observe(this.host, {\r\n characterData: true,\r\n childList: true,\r\n subtree: true,\r\n attributes: true,\r\n });\r\n\r\n this.syncLabelText();\r\n }\r\n\r\n private stopMutationObserver(force = false): void {\r\n if (force || !(this.truncate && this.removable)) {\r\n this.mutationObserver?.disconnect();\r\n\r\n delete this.mutationObserver;\r\n }\r\n }\r\n\r\n private startTruncate(): void {\r\n resizeObserver.observe(this.host);\r\n this.startMutationObserver();\r\n this._truncateLabel();\r\n }\r\n\r\n private stopTruncate(): void {\r\n resizeObserver.unobserve(this.host);\r\n this.stopMutationObserver();\r\n this.isTruncated = false;\r\n }\r\n\r\n render() {\r\n return (\r\n <Fragment>\r\n <span\r\n aria-describedby=\"toggle-anchor\"\r\n class={clsx(\"dso-label\", {\r\n [`dso-label-${this.status}`]: this.status,\r\n \"dso-compact\": this.compact && !this.removable,\r\n \"dso-hover\": this.removeHover || this.removeFocus,\r\n })}\r\n >\r\n <slot name=\"symbol\"></slot>\r\n <span\r\n class={clsx(\"dso-label-content\", {\r\n \"dso-truncate\": !!this.truncate,\r\n })}\r\n ref={(element) => (this.labelContent = element)}\r\n tabindex={this.truncate && this.isTruncated ? 0 : undefined}\r\n onMouseEnter={() => (this.textHover = true)}\r\n onMouseLeave={() => (this.textHover = false)}\r\n onFocus={() => (this.textFocus = true)}\r\n onBlur={() => (this.textFocus = false)}\r\n >\r\n <slot></slot>\r\n </span>\r\n {this.removable && (\r\n <button\r\n type=\"button\"\r\n onClick={(e) => this.dsoRemoveClick.emit(e)}\r\n onMouseEnter={() => (this.removeHover = true)}\r\n onMouseLeave={() => (this.removeHover = false)}\r\n onFocus={() => (this.removeFocus = true)}\r\n onBlur={() => (this.removeFocus = false)}\r\n >\r\n <span class=\"sr-only\">Verwijder: {this.labelText}</span>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n </button>\r\n )}\r\n </span>\r\n {this.isTruncated && (\r\n <dso-tooltip\r\n stateless\r\n id=\"toggle-anchor\"\r\n active={this.textHover || this.textFocus}\r\n position=\"top\"\r\n strategy=\"absolute\"\r\n >\r\n {this.labelText}\r\n </dso-tooltip>\r\n )}\r\n </Fragment>\r\n );\r\n }\r\n}\r\n","import { Fragment, FunctionalComponent, h } from \"@stencil/core\";\r\n\r\nimport { RenvooiRenderMarkFunction } from \"./renvooi.interfaces\";\r\n\r\ninterface RenvooiRenderTextProps {\r\n text: string;\r\n mark: RenvooiRenderMarkFunction | undefined;\r\n onMarkItemHighlight: (text: string, ref: HTMLElement) => void | undefined;\r\n}\r\n\r\nexport const RenvooiRenderText: FunctionalComponent<RenvooiRenderTextProps> = ({ text, mark, onMarkItemHighlight }) => {\r\n if (!mark) {\r\n return <>{text}</>;\r\n }\r\n\r\n const result = mark(text);\r\n\r\n if (!result) {\r\n return <>{text}</>;\r\n }\r\n\r\n return (\r\n <>\r\n {result.map((renvooiText) => {\r\n if (typeof renvooiText === \"string\") {\r\n return <>{renvooiText}</>;\r\n }\r\n\r\n return (\r\n <mark\r\n class={renvooiText.highlight ? \"dso-highlight\" : undefined}\r\n ref={(ref) => renvooiText.highlight && ref && onMarkItemHighlight(renvooiText.text, ref)}\r\n >\r\n {renvooiText.text}\r\n </mark>\r\n );\r\n })}\r\n </>\r\n );\r\n};\r\n","import { Fragment, FunctionalComponent, h } from \"@stencil/core\";\r\n\r\nimport { RenvooiRenderText } from \"./renvooi-render-text\";\r\nimport { RenvooiRenderMarkFunction, RenvooiValue } from \"./renvooi.interfaces\";\r\n\r\ninterface RenvooiRenderProps {\r\n value: RenvooiValue;\r\n mark: RenvooiRenderMarkFunction | undefined;\r\n onMarkItemHighlight: (text: string, elementRef: HTMLElement) => void | undefined;\r\n}\r\n\r\nexport const RenvooiRender: FunctionalComponent<RenvooiRenderProps> = ({ value, mark, onMarkItemHighlight }) => {\r\n if (typeof value === \"string\" || !value) {\r\n // This element is used for --_dso-renvooi-text-decoration\r\n return (\r\n <span class=\"text\">\r\n <RenvooiRenderText text={value} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </span>\r\n );\r\n }\r\n\r\n if (\"toegevoegd\" in value) {\r\n return (\r\n <ins>\r\n <RenvooiRenderText text={value.toegevoegd} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </ins>\r\n );\r\n }\r\n\r\n if (\"verwijderd\" in value) {\r\n return (\r\n <del>\r\n <RenvooiRenderText text={value.verwijderd} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </del>\r\n );\r\n }\r\n\r\n return (\r\n <>\r\n <del>\r\n <RenvooiRenderText text={value.was} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </del>\r\n <ins>\r\n <RenvooiRenderText text={value.wordt} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </ins>\r\n </>\r\n );\r\n};\r\n","@use \"~dso-toolkit/src/utilities\";\r\n\r\n@use \"~dso-toolkit/src/components/insert/insert\";\r\n@use \"~dso-toolkit/src/components/delete/delete\";\r\n@use \"~dso-toolkit/src/components/mark/mark\";\r\n\r\n:host {\r\n display: inline;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n.text {\r\n text-decoration: var(--_dso-renvooi-text-decoration);\r\n}\r\n","import { Component, ComponentInterface, Event, EventEmitter, Fragment, Prop, h } from \"@stencil/core\";\r\n\r\nimport { RenvooiRender } from \"./renvooi-render\";\r\nimport { RenvooiMarkFunction, RenvooiMarkItemHighlightEvent, RenvooiValue } from \"./renvooi.interfaces\";\r\n\r\n/**\r\n * Met dit component kan een `RenvooiValue` worden gepresenteerd.\r\n */\r\n@Component({\r\n tag: \"dso-renvooi\",\r\n styleUrl: \"renvooi.scss\",\r\n shadow: true,\r\n})\r\nexport class Renvooi implements ComponentInterface {\r\n /**\r\n * The renvooi value to render.\r\n */\r\n @Prop()\r\n value?: RenvooiValue | RenvooiValue[];\r\n\r\n /**\r\n * To mark text.\r\n */\r\n @Prop()\r\n mark?: RenvooiMarkFunction;\r\n\r\n /**\r\n * Emitted when a marked item is highlighted.\r\n */\r\n @Event({ bubbles: false })\r\n dsoRenvooiMarkItemHighlight!: EventEmitter<RenvooiMarkItemHighlightEvent>;\r\n\r\n get values(): RenvooiValue[] {\r\n if (!this.value) {\r\n return [];\r\n }\r\n\r\n return Array.isArray(this.value) ? this.value : [this.value];\r\n }\r\n\r\n private handleMarkItemHighlight = (text: string, elementRef: HTMLElement) => {\r\n this.dsoRenvooiMarkItemHighlight.emit({ text, elementRef });\r\n };\r\n\r\n render() {\r\n return (\r\n <>\r\n {this.values.map((v) => (\r\n <RenvooiRender\r\n value={v}\r\n mark={this.mark && ((text) => this.mark?.(text, v, this.values))}\r\n onMarkItemHighlight={this.handleMarkItemHighlight}\r\n />\r\n ))}\r\n </>\r\n );\r\n }\r\n}\r\n","@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}
1
+ {"file":"dso-label.dso-renvooi.dso-slide-toggle.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,QAAQ,GAAG,y8DAAy8D;;ACmB19D,MAAM,cAAc,GAAG,IAAI,cAAc,CACvCA,cAAQ,CAAC,CAAC,OAA8B,KAAI;IAC1C,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,KAAI;AAC7B,QAAA,IAAI,mBAAmB,CAAC,MAAM,CAAC,EAAE;YAC/B,MAAM,CAAC,cAAc,EAAE;;AAE3B,KAAC,CAAC;AACJ,CAAC,EAAE,GAAG,CAAC,CACR;AAED,SAAS,mBAAmB,CAAC,OAAgB,EAAA;AAC3C,IAAA,OAAO,OAAO,CAAC,OAAO,KAAK,WAAW;AACxC;AAEA,SAAS,WAAW,CAAC,EAAe,EAAA;AAClC,IAAA,OAAO,EAAE,CAAC,WAAW,GAAG,EAAE,CAAC,WAAW;AACxC;MAOa,KAAK,GAAA,MAAA;AALlB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAwDE,QAAA,IAAW,CAAA,WAAA,GAAG,KAAK;AAGnB,QAAA,IAAS,CAAA,SAAA,GAAG,EAAE;AAiJf;AA9IC,IAAA,cAAc,CAAC,SAAkB,EAAA;QAC/B,IAAI,SAAS,EAAE;YACb,IAAI,CAAC,qBAAqB,EAAE;;aACvB;YACL,IAAI,CAAC,oBAAoB,EAAE;;;AAK/B,IAAA,aAAa,CAAC,QAAi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A,EAAA,0CAAA,EAAM,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,cAAc,EAAC,EAAE,EAAC,IAAI,EAAG,CAAA,EAC3DA,SAAA,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,KACnBA,sEAAO,OAAO,EAAE,IAAI,CAAC,UAAU,EAAA,EAC7BA,SAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAQ,CACF,CACT,CACA;;;;;;;;;;","names":["debounce","h","Fragment","clsx","v4"],"sources":["src/components/label/label.scss?tag=dso-label&encapsulation=shadow","src/components/label/label.tsx","src/components/renvooi/renvooi-render-text.tsx","src/components/renvooi/renvooi-render.tsx","src/components/renvooi/renvooi.scss?tag=dso-renvooi&encapsulation=shadow","src/components/renvooi/renvooi.tsx","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/units\";\r\n@use \"~dso-toolkit/src/components/label\";\r\n\r\n:host {\r\n display: inline-block;\r\n max-inline-size: 100%;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n// Todo: Replace .sr-only selector with web component specific selector, no need for .sr-only if we can generate the SCSS\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\n.dso-label {\r\n @include label.root();\r\n\r\n &.dso-hover {\r\n .dso-label-content {\r\n text-decoration: line-through;\r\n }\r\n }\r\n}\r\n\r\n.dso-truncate.dso-label-content {\r\n display: inline-block;\r\n max-inline-size: 100%;\r\n overflow: hidden;\r\n text-overflow: ellipsis; // stylelint-disable-line declaration-property-value-disallowed-list -- full text can be viewed via tooltip.\r\n vertical-align: bottom;\r\n white-space: nowrap; // stylelint-disable-line declaration-property-value-disallowed-list -- full text can be viewed via tooltip.\r\n}\r\n\r\n:host([removable]) {\r\n .dso-truncate.dso-label-content {\r\n max-inline-size: calc(100% - (units.$u3 + 4px));\r\n }\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 Listen,\r\n Method,\r\n Prop,\r\n State,\r\n Watch,\r\n h,\r\n} from \"@stencil/core\";\r\nimport clsx from \"clsx\";\r\nimport debounce from \"debounce\";\r\n\r\nimport { LabelStatus } from \"./label.interfaces\";\r\n\r\nconst resizeObserver = new ResizeObserver(\r\n debounce((entries: ResizeObserverEntry[]) => {\r\n entries.forEach(({ target }) => {\r\n if (isDsoLabelComponent(target)) {\r\n target._truncateLabel();\r\n }\r\n });\r\n }, 150),\r\n);\r\n\r\nfunction isDsoLabelComponent(element: Element): element is HTMLDsoLabelElement {\r\n return element.tagName === \"DSO-LABEL\";\r\n}\r\n\r\nfunction hasEllipses(el: HTMLElement): boolean {\r\n return el.scrollWidth > el.clientWidth;\r\n}\r\n\r\n@Component({\r\n tag: \"dso-label\",\r\n styleUrl: \"label.scss\",\r\n shadow: true,\r\n})\r\nexport class Label implements ComponentInterface {\r\n private labelContent: HTMLSpanElement | undefined;\r\n\r\n private mutationObserver?: MutationObserver;\r\n\r\n @Element()\r\n private host!: HTMLDsoLabelElement;\r\n\r\n /**\r\n * For compact Label\r\n */\r\n @Prop()\r\n compact?: boolean;\r\n\r\n /**\r\n * Shows a button that can be used to remove the Label.\r\n */\r\n @Prop({ reflect: true })\r\n removable?: boolean;\r\n\r\n /**\r\n * The status of this Label.\r\n */\r\n @Prop()\r\n status?: LabelStatus;\r\n\r\n /**\r\n * Emitted when the user activates the remove button.\r\n */\r\n @Event()\r\n dsoRemoveClick!: EventEmitter<MouseEvent>;\r\n\r\n @State()\r\n removeHover?: boolean;\r\n\r\n @State()\r\n removeFocus?: boolean;\r\n\r\n /**\r\n * Whether the Label is allowed to truncate the contents if it does not fit the container element.\r\n */\r\n @Prop()\r\n truncate?: boolean;\r\n\r\n @State()\r\n textHover?: boolean;\r\n\r\n @State()\r\n textFocus?: boolean;\r\n\r\n @State()\r\n isTruncated = false;\r\n\r\n @State()\r\n labelText = \"\";\r\n\r\n @Watch(\"removable\")\r\n watchRemovable(removable: boolean) {\r\n if (removable) {\r\n this.startMutationObserver();\r\n } else {\r\n this.stopMutationObserver();\r\n }\r\n }\r\n\r\n @Watch(\"truncate\")\r\n watchTruncate(truncate: boolean) {\r\n if (truncate) {\r\n this.startTruncate();\r\n } else {\r\n this.stopTruncate();\r\n }\r\n }\r\n\r\n @Listen(\"keydown\", { target: \"document\" })\r\n keyDownListener(event: KeyboardEvent) {\r\n if (event.key === \"Escape\") {\r\n this.textHover = false;\r\n this.textFocus = false;\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n @Method()\r\n async _truncateLabel() {\r\n setTimeout(() => {\r\n this.isTruncated = !!this.labelContent && hasEllipses(this.labelContent);\r\n });\r\n }\r\n\r\n private syncLabelText() {\r\n this.labelText = this.host.textContent?.trim() ?? \"\";\r\n }\r\n\r\n componentDidLoad() {\r\n if (this.truncate) {\r\n this.startTruncate();\r\n }\r\n\r\n if (this.removable) {\r\n this.startMutationObserver();\r\n }\r\n }\r\n\r\n disconnectedCallback() {\r\n this.stopTruncate();\r\n\r\n this.stopMutationObserver(true);\r\n }\r\n\r\n /** The mutationObserver fetches the text placed inside the label, this is then used for the remove button and tooltip. */\r\n private startMutationObserver(): void {\r\n this.mutationObserver = new MutationObserver(() => this.syncLabelText());\r\n\r\n this.mutationObserver.observe(this.host, {\r\n characterData: true,\r\n childList: true,\r\n subtree: true,\r\n attributes: true,\r\n });\r\n\r\n this.syncLabelText();\r\n }\r\n\r\n private stopMutationObserver(force = false): void {\r\n if (force || !(this.truncate && this.removable)) {\r\n this.mutationObserver?.disconnect();\r\n\r\n delete this.mutationObserver;\r\n }\r\n }\r\n\r\n private startTruncate(): void {\r\n resizeObserver.observe(this.host);\r\n this.startMutationObserver();\r\n this._truncateLabel();\r\n }\r\n\r\n private stopTruncate(): void {\r\n resizeObserver.unobserve(this.host);\r\n this.stopMutationObserver();\r\n this.isTruncated = false;\r\n }\r\n\r\n render() {\r\n return (\r\n <Fragment>\r\n <span\r\n aria-describedby=\"toggle-anchor\"\r\n class={clsx(\"dso-label\", {\r\n [`dso-label-${this.status}`]: this.status,\r\n \"dso-compact\": this.compact && !this.removable,\r\n \"dso-hover\": this.removeHover || this.removeFocus,\r\n })}\r\n >\r\n <slot name=\"symbol\"></slot>\r\n <span\r\n class={clsx(\"dso-label-content\", {\r\n \"dso-truncate\": !!this.truncate,\r\n })}\r\n ref={(element) => (this.labelContent = element)}\r\n tabindex={this.truncate && this.isTruncated ? 0 : undefined}\r\n onMouseEnter={() => (this.textHover = true)}\r\n onMouseLeave={() => (this.textHover = false)}\r\n onFocus={() => (this.textFocus = true)}\r\n onBlur={() => (this.textFocus = false)}\r\n >\r\n <slot></slot>\r\n </span>\r\n {this.removable && (\r\n <button\r\n type=\"button\"\r\n onClick={(e) => this.dsoRemoveClick.emit(e)}\r\n onMouseEnter={() => (this.removeHover = true)}\r\n onMouseLeave={() => (this.removeHover = false)}\r\n onFocus={() => (this.removeFocus = true)}\r\n onBlur={() => (this.removeFocus = false)}\r\n >\r\n <span class=\"sr-only\">Verwijder: {this.labelText}</span>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n </button>\r\n )}\r\n </span>\r\n {this.isTruncated && (\r\n <dso-tooltip\r\n stateless\r\n id=\"toggle-anchor\"\r\n active={this.textHover || this.textFocus}\r\n position=\"top\"\r\n strategy=\"absolute\"\r\n >\r\n {this.labelText}\r\n </dso-tooltip>\r\n )}\r\n </Fragment>\r\n );\r\n }\r\n}\r\n","import { Fragment, FunctionalComponent, h } from \"@stencil/core\";\r\n\r\nimport { RenvooiRenderMarkFunction } from \"./renvooi.interfaces\";\r\n\r\ninterface RenvooiRenderTextProps {\r\n text: string;\r\n mark: RenvooiRenderMarkFunction | undefined;\r\n onMarkItemHighlight: (text: string, ref: HTMLElement) => void | undefined;\r\n}\r\n\r\nexport const RenvooiRenderText: FunctionalComponent<RenvooiRenderTextProps> = ({ text, mark, onMarkItemHighlight }) => {\r\n if (!mark) {\r\n return <>{text}</>;\r\n }\r\n\r\n const result = mark(text);\r\n\r\n if (!result) {\r\n return <>{text}</>;\r\n }\r\n\r\n return (\r\n <>\r\n {result.map((renvooiText) => {\r\n if (typeof renvooiText === \"string\") {\r\n return <>{renvooiText}</>;\r\n }\r\n\r\n return (\r\n <mark\r\n class={renvooiText.highlight ? \"dso-highlight\" : undefined}\r\n ref={(ref) => renvooiText.highlight && ref && onMarkItemHighlight(renvooiText.text, ref)}\r\n >\r\n {renvooiText.text}\r\n </mark>\r\n );\r\n })}\r\n </>\r\n );\r\n};\r\n","import { Fragment, FunctionalComponent, h } from \"@stencil/core\";\r\n\r\nimport { RenvooiRenderText } from \"./renvooi-render-text\";\r\nimport { RenvooiRenderMarkFunction, RenvooiValue } from \"./renvooi.interfaces\";\r\n\r\ninterface RenvooiRenderProps {\r\n value: RenvooiValue;\r\n mark: RenvooiRenderMarkFunction | undefined;\r\n onMarkItemHighlight: (text: string, elementRef: HTMLElement) => void | undefined;\r\n}\r\n\r\nexport const RenvooiRender: FunctionalComponent<RenvooiRenderProps> = ({ value, mark, onMarkItemHighlight }) => {\r\n if (typeof value === \"string\" || !value) {\r\n // This element is used for --_dso-renvooi-text-decoration\r\n return (\r\n <span class=\"text\">\r\n <RenvooiRenderText text={value} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </span>\r\n );\r\n }\r\n\r\n if (\"toegevoegd\" in value) {\r\n return (\r\n <ins>\r\n <RenvooiRenderText text={value.toegevoegd} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </ins>\r\n );\r\n }\r\n\r\n if (\"verwijderd\" in value) {\r\n return (\r\n <del>\r\n <RenvooiRenderText text={value.verwijderd} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </del>\r\n );\r\n }\r\n\r\n return (\r\n <>\r\n <del>\r\n <RenvooiRenderText text={value.was} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </del>\r\n <ins>\r\n <RenvooiRenderText text={value.wordt} mark={mark} onMarkItemHighlight={onMarkItemHighlight} />\r\n </ins>\r\n </>\r\n );\r\n};\r\n","@use \"~dso-toolkit/src/utilities\";\r\n\r\n@use \"~dso-toolkit/src/components/insert/insert\";\r\n@use \"~dso-toolkit/src/components/delete/delete\";\r\n@use \"~dso-toolkit/src/components/mark/mark\";\r\n\r\n:host {\r\n display: inline;\r\n}\r\n\r\n@include utilities.box-sizing();\r\n\r\n.text {\r\n text-decoration: var(--_dso-renvooi-text-decoration);\r\n}\r\n","import { Component, ComponentInterface, Event, EventEmitter, Fragment, Prop, h } from \"@stencil/core\";\r\n\r\nimport { RenvooiRender } from \"./renvooi-render\";\r\nimport { RenvooiMarkFunction, RenvooiMarkItemHighlightEvent, RenvooiValue } from \"./renvooi.interfaces\";\r\n\r\n/**\r\n * Met dit component kan een `RenvooiValue` worden gepresenteerd.\r\n */\r\n@Component({\r\n tag: \"dso-renvooi\",\r\n styleUrl: \"renvooi.scss\",\r\n shadow: true,\r\n})\r\nexport class Renvooi implements ComponentInterface {\r\n /**\r\n * The renvooi value to render.\r\n */\r\n @Prop()\r\n value?: RenvooiValue | RenvooiValue[];\r\n\r\n /**\r\n * To mark text.\r\n */\r\n @Prop()\r\n mark?: RenvooiMarkFunction;\r\n\r\n /**\r\n * Emitted when a marked item is highlighted.\r\n */\r\n @Event({ bubbles: false })\r\n dsoRenvooiMarkItemHighlight!: EventEmitter<RenvooiMarkItemHighlightEvent>;\r\n\r\n get values(): RenvooiValue[] {\r\n if (!this.value) {\r\n return [];\r\n }\r\n\r\n return Array.isArray(this.value) ? this.value : [this.value];\r\n }\r\n\r\n private handleMarkItemHighlight = (text: string, elementRef: HTMLElement) => {\r\n this.dsoRenvooiMarkItemHighlight.emit({ text, elementRef });\r\n };\r\n\r\n render() {\r\n return (\r\n <>\r\n {this.values.map((v) => (\r\n <RenvooiRender\r\n value={v}\r\n mark={this.mark && ((text) => this.mark?.(text, v, this.values))}\r\n onMarkItemHighlight={this.handleMarkItemHighlight}\r\n />\r\n ))}\r\n </>\r\n );\r\n }\r\n}\r\n","@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}
@@ -40,12 +40,20 @@ const Modal = class {
40
40
  */
41
41
  this.returnFocus = undefined;
42
42
  /**
43
- * when `false` the close button in the header will not be rendered. Defaults to `true`.
43
+ * when `false` the close button in the header will not be rendered.
44
44
  *
45
45
  * Needs `modalTitle` to be set.
46
46
  */
47
- this.showCloseButton = true;
47
+ this.closable = false;
48
48
  this.text = i18n.i18n(() => this.host, translations);
49
+ this.blockEscapeKey = (e) => {
50
+ if (e.key === "Escape") {
51
+ e.preventDefault();
52
+ if (this.closable) {
53
+ this.dsoClose.emit({ originalEvent: e });
54
+ }
55
+ }
56
+ };
49
57
  }
50
58
  get hasFooter() {
51
59
  return this.host.querySelector("[slot='footer']") !== null;
@@ -68,12 +76,17 @@ const Modal = class {
68
76
  }
69
77
  (_c = ((_b = this.returnFocus) !== null && _b !== void 0 ? _b : this.returnFocusElement)) === null || _c === void 0 ? void 0 : _c.focus();
70
78
  }
79
+ handleDialogClick(e) {
80
+ if (!this.closable) {
81
+ return;
82
+ }
83
+ if (e.target === this.htmlDialogElement) {
84
+ this.dsoClose.emit({ originalEvent: e });
85
+ }
86
+ }
71
87
  render() {
72
88
  var _a;
73
- return (index.h("dialog", { key: '83fe9d400195caeccad3ad786a259839e356afef', class: "dso-modal", role: (_a = this.dialogRole) !== null && _a !== void 0 ? _a : undefined, "aria-modal": "true", "aria-labelledby": this.ariaId, ref: (element) => (this.htmlDialogElement = element), onCancel: (e) => {
74
- e.preventDefault();
75
- this.dsoClose.emit({ originalEvent: e });
76
- } }, index.h("div", { key: '5e2b1b12dbaac1b5b71aa2a52b42b201d217ee63', class: "dso-dialog", role: "document" }, this.modalTitle ? (index.h("div", { class: "dso-header" }, index.h("h2", { id: this.ariaId }, this.modalTitle), this.showCloseButton && (index.h("button", { type: "button", class: "dso-close", onClick: (e) => this.dsoClose.emit({ originalEvent: e }) }, index.h("dso-icon", { icon: "times" }), index.h("span", { class: "sr-only" }, this.text("close")))))) : (index.h("span", { class: "sr-only", id: this.ariaId }, this.text("dialog"))), index.h("dso-scrollable", { key: '241b3f078306402613b94d843c393c065125a650' }, index.h("div", { key: 'fc0f58c85c287ce3fb424e8cc18bec91562fc143', class: "dso-body", tabIndex: 0 }, index.h("slot", { key: 'e6bc51e2320f995aa2ab7d817ff655189032cc69', name: "body" }))), this.hasFooter && (index.h("div", { key: '77aa9bac43c4f44c15c98a87986175d057ff1ad6', class: "dso-footer" }, index.h("slot", { key: 'ec30bcd66bb3214e4a0efcc8c5a793596a5e92e9', name: "footer" }))))));
89
+ return (index.h("dialog", { key: '3f82d0319743f333024c6e9924c08d48f85b738b', class: "dso-modal", role: (_a = this.dialogRole) !== null && _a !== void 0 ? _a : undefined, "aria-modal": "true", "aria-labelledby": this.ariaId, ref: (element) => (this.htmlDialogElement = element), onClick: (e) => this.handleDialogClick(e), onKeyDown: (e) => this.blockEscapeKey(e) }, index.h("div", { key: 'd94bad5e57a1b0c0a84e1bf5e27570df1ec00f20', class: "dso-dialog", role: "document" }, this.modalTitle ? (index.h("div", { class: "dso-header" }, index.h("h2", { id: this.ariaId }, this.modalTitle), this.closable && (index.h("button", { type: "button", class: "dso-close", onClick: (e) => this.dsoClose.emit({ originalEvent: e }) }, index.h("dso-icon", { icon: "times" }), index.h("span", { class: "sr-only" }, this.text("close")))))) : (index.h("span", { class: "sr-only", id: this.ariaId }, this.text("dialog"))), index.h("dso-scrollable", { key: 'cabd78ee548c897ea0402b885ced40f0091c3b9d' }, index.h("div", { key: 'df07ed09a89f9d450878d51977bda22009de6ab3', class: "dso-body", tabIndex: 0 }, index.h("slot", { key: 'ec5c000202ed7c47bc752cf45a5ddfc88df8120f', name: "body" }))), this.hasFooter && (index.h("div", { key: '7fa17d42d7b3d73360bb2ea302b7fe2e64b0ffc3', class: "dso-footer" }, index.h("slot", { key: '984f518013234ca807597c9287ff652211bd5794', name: "footer" }))))));
77
90
  }
78
91
  get host() { return index.getElement(this); }
79
92
  };
@@ -1 +1 @@
1
- {"file":"dso-modal.entry.cjs.js","mappings":";;;;;;;AAEO,MAAM,YAAY,GAAa;AACpC,IAAA,EAAE,EAAE;AACF,QAAA,WAAW,EAAE;AACX,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,MAAM,EAAE,QAAQ;AACjB,SAAA;AACF,KAAA;AACD,IAAA,EAAE,EAAE;AACF,QAAA,WAAW,EAAE;AACX,YAAA,KAAK,EAAE,SAAS;AAChB,YAAA,MAAM,EAAE,SAAS;AAClB,SAAA;AACF,KAAA;CACF;;ACfD,MAAM,QAAQ,GAAG,ylNAAylN;;MCc7lN,KAAK,GAAA,MAAA;AALlB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAYE,QAAA,IAAM,CAAA,MAAA,GAAGA,KAAE,EAAE;AAcb;;AAEG;AAEH,QAAA,IAAU,CAAA,UAAA,GAAkB,QAAQ;AAEpC;;;;;;AAMG;AAEH,QAAA,IAAW,CAAA,WAAA,GAAoC,SAAS;AAExD;;;;AAIG;AAEH,QAAA,IAAe,CAAA,eAAA,GAAG,IAAI;AAcd,QAAA,IAAA,CAAA,IAAI,GAAGC,SAAI,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC;AAqEnD;AAzEC,IAAA,IAAI,SAAS,GAAA;QACX,OAAO,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,iBAAiB,CAAC,KAAK,IAAI;;IAK5D,gBAAgB,GAAA;;QACd,IAAI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,KAAK,EAAC,YAAY,EAAA,EACrBA,OAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,QAAQ,EAAA,CAAG,CAClB,CACP,CACG,CACC;;;;;;;;","names":["v4","i18n","getActiveElement","h"],"sources":["src/components/modal/modal.i18n.ts","src/components/modal/modal.scss?tag=dso-modal&encapsulation=shadow","src/components/modal/modal.tsx"],"sourcesContent":["import { Resource } from \"../../utils/i18n\";\r\n\r\nexport const translations: Resource = {\r\n en: {\r\n \"dso-modal\": {\r\n close: \"Close\",\r\n dialog: \"Dialog\",\r\n },\r\n },\r\n nl: {\r\n \"dso-modal\": {\r\n close: \"Sluiten\",\r\n dialog: \"Dialoog\",\r\n },\r\n },\r\n};\r\n","@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/components/button\";\r\n@use \"~dso-toolkit/src/components/modal\";\r\n@use \"~dso-toolkit/src/variables/media-query-breakpoints\";\r\n\r\n@include utilities.box-sizing();\r\n\r\n:host {\r\n display: block;\r\n}\r\n\r\n// fullscreen option\r\n:host([fullscreen]) dialog {\r\n @include modal.fullscreen();\r\n}\r\n\r\n// Go to fullscreen on =< 480px viewport\r\n@media screen and (max-width: media-query-breakpoints.$screen-xs-min) {\r\n :host dialog {\r\n @include modal.fullscreen();\r\n }\r\n}\r\n\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\nbutton {\r\n @include button.element();\r\n}\r\n\r\n.dso-modal {\r\n @include modal.root();\r\n}\r\n\r\n.dso-close {\r\n dso-icon {\r\n color: modal.$close-icon-color;\r\n }\r\n}\r\n","import { Component, ComponentInterface, Element, Event, EventEmitter, Prop, State, h } from \"@stencil/core\";\r\nimport { v4 } from \"uuid\";\r\n\r\nimport { getActiveElement } from \"../../utils/get-active-element\";\r\nimport { i18n } from \"../../utils/i18n\";\r\n\r\nimport { translations } from \"./modal.i18n\";\r\nimport { ModalCloseEvent } from \"./modal.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-modal\",\r\n styleUrl: \"modal.scss\",\r\n shadow: true,\r\n})\r\nexport class Modal implements ComponentInterface {\r\n private htmlDialogElement?: HTMLDialogElement;\r\n\r\n @Element()\r\n host!: HTMLDsoModalElement;\r\n\r\n @State()\r\n ariaId = v4();\r\n\r\n /**\r\n * when set the modal will be shown in fullscreen.\r\n */\r\n @Prop({ reflect: true })\r\n fullscreen?: boolean;\r\n\r\n /**\r\n * The title of the Modal.\r\n */\r\n @Prop()\r\n modalTitle?: string;\r\n\r\n /**\r\n * the role for the modal `dialog` | `alert` | `alertdialog`.\r\n */\r\n @Prop()\r\n dialogRole: string | null = \"dialog\";\r\n\r\n /**\r\n * The element to return focus to after the modal is closed.\r\n *\r\n * * `undefined` will return focus to the previously focused element (default).\r\n * * `false` will not return focus to any element.\r\n * * or, provide your own `HTMLElement` that will receive focus upon closing.\r\n */\r\n @Prop()\r\n returnFocus: false | HTMLElement | undefined = undefined;\r\n\r\n /**\r\n * when `false` the close button in the header will not be rendered. Defaults to `true`.\r\n *\r\n * Needs `modalTitle` to be set.\r\n */\r\n @Prop()\r\n showCloseButton = true;\r\n\r\n private returnFocusElement: HTMLElement | undefined;\r\n\r\n /**\r\n * Emitted when the user wants to close the Modal.\r\n */\r\n @Event()\r\n dsoClose!: EventEmitter<ModalCloseEvent>;\r\n\r\n get hasFooter() {\r\n return this.host.querySelector(\"[slot='footer']\") !== null;\r\n }\r\n\r\n private text = i18n(() => this.host, translations);\r\n\r\n componentDidLoad(): void {\r\n if (this.htmlDialogElement?.isConnected) {\r\n const activeElement = getActiveElement();\r\n if (activeElement instanceof HTMLElement) {\r\n this.returnFocusElement = activeElement;\r\n }\r\n\r\n this.htmlDialogElement.showModal();\r\n }\r\n }\r\n\r\n disconnectedCallback(): void {\r\n this.htmlDialogElement?.close();\r\n\r\n if (this.returnFocus === false) {\r\n return;\r\n }\r\n\r\n (this.returnFocus ?? this.returnFocusElement)?.focus();\r\n }\r\n\r\n render() {\r\n return (\r\n <dialog\r\n class=\"dso-modal\"\r\n role={this.dialogRole ?? undefined}\r\n aria-modal=\"true\"\r\n aria-labelledby={this.ariaId}\r\n ref={(element) => (this.htmlDialogElement = element)}\r\n onCancel={(e) => {\r\n e.preventDefault();\r\n\r\n this.dsoClose.emit({ originalEvent: e });\r\n }}\r\n >\r\n <div class=\"dso-dialog\" role=\"document\">\r\n {this.modalTitle ? (\r\n <div class=\"dso-header\">\r\n <h2 id={this.ariaId}>{this.modalTitle}</h2>\r\n {this.showCloseButton && (\r\n <button type=\"button\" class=\"dso-close\" onClick={(e) => this.dsoClose.emit({ originalEvent: e })}>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n <span class=\"sr-only\">{this.text(\"close\")}</span>\r\n </button>\r\n )}\r\n </div>\r\n ) : (\r\n <span class=\"sr-only\" id={this.ariaId}>\r\n {this.text(\"dialog\")}\r\n </span>\r\n )}\r\n\r\n <dso-scrollable>\r\n <div class=\"dso-body\" tabIndex={0}>\r\n <slot name=\"body\" />\r\n </div>\r\n </dso-scrollable>\r\n\r\n {this.hasFooter && (\r\n <div class=\"dso-footer\">\r\n <slot name=\"footer\" />\r\n </div>\r\n )}\r\n </div>\r\n </dialog>\r\n );\r\n }\r\n}\r\n"],"version":3}
1
+ {"file":"dso-modal.entry.cjs.js","mappings":";;;;;;;AAEO,MAAM,YAAY,GAAa;AACpC,IAAA,EAAE,EAAE;AACF,QAAA,WAAW,EAAE;AACX,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,MAAM,EAAE,QAAQ;AACjB,SAAA;AACF,KAAA;AACD,IAAA,EAAE,EAAE;AACF,QAAA,WAAW,EAAE;AACX,YAAA,KAAK,EAAE,SAAS;AAChB,YAAA,MAAM,EAAE,SAAS;AAClB,SAAA;AACF,KAAA;CACF;;ACfD,MAAM,QAAQ,GAAG,ylNAAylN;;MCc7lN,KAAK,GAAA,MAAA;AALlB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAYE,QAAA,IAAM,CAAA,MA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M,EAAG,EAAA,IAAI,CAAC,UAAU,CAAM,EAC1C,IAAI,CAAC,QAAQ,KACZA,OAAQ,CAAA,QAAA,EAAA,EAAA,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,WAAW,EAAC,OAAO,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,CAAC,EAAA,EAC9FA,OAAU,CAAA,UAAA,EAAA,EAAA,IAAI,EAAC,OAAO,EAAY,CAAA,EAClCA,OAAA,CAAA,MAAA,EAAA,EAAM,KAAK,EAAC,SAAS,EAAE,EAAA,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAQ,CAC1C,CACV,CACG,KAENA,OAAA,CAAA,MAAA,EAAA,EAAM,KAAK,EAAC,SAAS,EAAC,EAAE,EAAE,IAAI,CAAC,MAAM,EAAA,EAClC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CACf,CACR,EAEDA,OAAA,CAAA,gBAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACEA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,UAAU,EAAC,QAAQ,EAAE,CAAC,EAAA,EAC/BA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,MAAM,EAAA,CAAG,CAChB,CACS,EAEhB,IAAI,CAAC,SAAS,KACbA,OAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,YAAY,EAAA,EACrBA,OAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,QAAQ,EAAA,CAAG,CAClB,CACP,CACG,CACC;;;;;;;;","names":["v4","i18n","getActiveElement","h"],"sources":["src/components/modal/modal.i18n.ts","src/components/modal/modal.scss?tag=dso-modal&encapsulation=shadow","src/components/modal/modal.tsx"],"sourcesContent":["import { Resource } from \"../../utils/i18n\";\r\n\r\nexport const translations: Resource = {\r\n en: {\r\n \"dso-modal\": {\r\n close: \"Close\",\r\n dialog: \"Dialog\",\r\n },\r\n },\r\n nl: {\r\n \"dso-modal\": {\r\n close: \"Sluiten\",\r\n dialog: \"Dialoog\",\r\n },\r\n },\r\n};\r\n","@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/components/button\";\r\n@use \"~dso-toolkit/src/components/modal\";\r\n@use \"~dso-toolkit/src/variables/media-query-breakpoints\";\r\n\r\n@include utilities.box-sizing();\r\n\r\n:host {\r\n display: block;\r\n}\r\n\r\n// fullscreen option\r\n:host([fullscreen]) dialog {\r\n @include modal.fullscreen();\r\n}\r\n\r\n// Go to fullscreen on =< 480px viewport\r\n@media screen and (max-width: media-query-breakpoints.$screen-xs-min) {\r\n :host dialog {\r\n @include modal.fullscreen();\r\n }\r\n}\r\n\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\nbutton {\r\n @include button.element();\r\n}\r\n\r\n.dso-modal {\r\n @include modal.root();\r\n}\r\n\r\n.dso-close {\r\n dso-icon {\r\n color: modal.$close-icon-color;\r\n }\r\n}\r\n","import { Component, ComponentInterface, Element, Event, EventEmitter, Prop, State, h } from \"@stencil/core\";\r\nimport { v4 } from \"uuid\";\r\n\r\nimport { getActiveElement } from \"../../utils/get-active-element\";\r\nimport { i18n } from \"../../utils/i18n\";\r\n\r\nimport { translations } from \"./modal.i18n\";\r\nimport { ModalCloseEvent } from \"./modal.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-modal\",\r\n styleUrl: \"modal.scss\",\r\n shadow: true,\r\n})\r\nexport class Modal implements ComponentInterface {\r\n private htmlDialogElement?: HTMLDialogElement;\r\n\r\n @Element()\r\n host!: HTMLDsoModalElement;\r\n\r\n @State()\r\n ariaId = v4();\r\n\r\n /**\r\n * when set the modal will be shown in fullscreen.\r\n */\r\n @Prop({ reflect: true })\r\n fullscreen?: boolean;\r\n\r\n /**\r\n * The title of the Modal.\r\n */\r\n @Prop()\r\n modalTitle?: string;\r\n\r\n /**\r\n * the role for the modal `dialog` | `alert` | `alertdialog`.\r\n */\r\n @Prop()\r\n dialogRole: string | null = \"dialog\";\r\n\r\n /**\r\n * The element to return focus to after the modal is closed.\r\n *\r\n * * `undefined` will return focus to the previously focused element (default).\r\n * * `false` will not return focus to any element.\r\n * * or, provide your own `HTMLElement` that will receive focus upon closing.\r\n */\r\n @Prop()\r\n returnFocus: false | HTMLElement | undefined = undefined;\r\n\r\n /**\r\n * when `false` the close button in the header will not be rendered.\r\n *\r\n * Needs `modalTitle` to be set.\r\n */\r\n @Prop()\r\n closable = false;\r\n\r\n private returnFocusElement: HTMLElement | undefined;\r\n\r\n /**\r\n * Emitted when the user:\r\n * - clicks the close button\r\n * - dismisses the Modal with the Escape button\r\n * - clicks or taps outside the Modal\r\n */\r\n @Event()\r\n dsoClose!: EventEmitter<ModalCloseEvent>;\r\n\r\n get hasFooter() {\r\n return this.host.querySelector(\"[slot='footer']\") !== null;\r\n }\r\n\r\n private text = i18n(() => this.host, translations);\r\n\r\n componentDidLoad(): void {\r\n if (this.htmlDialogElement?.isConnected) {\r\n const activeElement = getActiveElement();\r\n if (activeElement instanceof HTMLElement) {\r\n this.returnFocusElement = activeElement;\r\n }\r\n\r\n this.htmlDialogElement.showModal();\r\n }\r\n }\r\n\r\n disconnectedCallback(): void {\r\n this.htmlDialogElement?.close();\r\n\r\n if (this.returnFocus === false) {\r\n return;\r\n }\r\n\r\n (this.returnFocus ?? this.returnFocusElement)?.focus();\r\n }\r\n\r\n private handleDialogClick(e: MouseEvent) {\r\n if (!this.closable) {\r\n return;\r\n }\r\n\r\n if (e.target === this.htmlDialogElement) {\r\n this.dsoClose.emit({ originalEvent: e });\r\n }\r\n }\r\n\r\n private blockEscapeKey = (e: KeyboardEvent) => {\r\n if (e.key === \"Escape\") {\r\n e.preventDefault();\r\n\r\n if (this.closable) {\r\n this.dsoClose.emit({ originalEvent: e });\r\n }\r\n }\r\n };\r\n\r\n render() {\r\n return (\r\n <dialog\r\n class=\"dso-modal\"\r\n role={this.dialogRole ?? undefined}\r\n aria-modal=\"true\"\r\n aria-labelledby={this.ariaId}\r\n ref={(element) => (this.htmlDialogElement = element)}\r\n onClick={(e) => this.handleDialogClick(e)}\r\n onKeyDown={(e) => this.blockEscapeKey(e)}\r\n >\r\n <div class=\"dso-dialog\" role=\"document\">\r\n {this.modalTitle ? (\r\n <div class=\"dso-header\">\r\n <h2 id={this.ariaId}>{this.modalTitle}</h2>\r\n {this.closable && (\r\n <button type=\"button\" class=\"dso-close\" onClick={(e) => this.dsoClose.emit({ originalEvent: e })}>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n <span class=\"sr-only\">{this.text(\"close\")}</span>\r\n </button>\r\n )}\r\n </div>\r\n ) : (\r\n <span class=\"sr-only\" id={this.ariaId}>\r\n {this.text(\"dialog\")}\r\n </span>\r\n )}\r\n\r\n <dso-scrollable>\r\n <div class=\"dso-body\" tabIndex={0}>\r\n <slot name=\"body\" />\r\n </div>\r\n </dso-scrollable>\r\n\r\n {this.hasFooter && (\r\n <div class=\"dso-footer\">\r\n <slot name=\"footer\" />\r\n </div>\r\n )}\r\n </div>\r\n </dialog>\r\n );\r\n }\r\n}\r\n"],"version":3}
@@ -1 +1 @@
1
- {"version":3,"file":"dso-modal.entry.cjs.js","sources":["src/components/modal/modal.i18n.ts","src/components/modal/modal.scss?tag=dso-modal&encapsulation=shadow","src/components/modal/modal.tsx"],"sourcesContent":["import { Resource } from \"../../utils/i18n\";\r\n\r\nexport const translations: Resource = {\r\n en: {\r\n \"dso-modal\": {\r\n close: \"Close\",\r\n dialog: \"Dialog\",\r\n },\r\n },\r\n nl: {\r\n \"dso-modal\": {\r\n close: \"Sluiten\",\r\n dialog: \"Dialoog\",\r\n },\r\n },\r\n};\r\n","@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/components/button\";\r\n@use \"~dso-toolkit/src/components/modal\";\r\n@use \"~dso-toolkit/src/variables/media-query-breakpoints\";\r\n\r\n@include utilities.box-sizing();\r\n\r\n:host {\r\n display: block;\r\n}\r\n\r\n// fullscreen option\r\n:host([fullscreen]) dialog {\r\n @include modal.fullscreen();\r\n}\r\n\r\n// Go to fullscreen on =< 480px viewport\r\n@media screen and (max-width: media-query-breakpoints.$screen-xs-min) {\r\n :host dialog {\r\n @include modal.fullscreen();\r\n }\r\n}\r\n\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\nbutton {\r\n @include button.element();\r\n}\r\n\r\n.dso-modal {\r\n @include modal.root();\r\n}\r\n\r\n.dso-close {\r\n dso-icon {\r\n color: modal.$close-icon-color;\r\n }\r\n}\r\n","import { Component, ComponentInterface, Element, Event, EventEmitter, Prop, State, h } from \"@stencil/core\";\r\nimport { v4 } from \"uuid\";\r\n\r\nimport { getActiveElement } from \"../../utils/get-active-element\";\r\nimport { i18n } from \"../../utils/i18n\";\r\n\r\nimport { translations } from \"./modal.i18n\";\r\nimport { ModalCloseEvent } from \"./modal.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-modal\",\r\n styleUrl: \"modal.scss\",\r\n shadow: true,\r\n})\r\nexport class Modal implements ComponentInterface {\r\n private htmlDialogElement?: HTMLDialogElement;\r\n\r\n @Element()\r\n host!: HTMLDsoModalElement;\r\n\r\n @State()\r\n ariaId = v4();\r\n\r\n /**\r\n * when set the modal will be shown in fullscreen.\r\n */\r\n @Prop({ reflect: true })\r\n fullscreen?: boolean;\r\n\r\n /**\r\n * The title of the Modal.\r\n */\r\n @Prop()\r\n modalTitle?: string;\r\n\r\n /**\r\n * the role for the modal `dialog` | `alert` | `alertdialog`.\r\n */\r\n @Prop()\r\n dialogRole: string | null = \"dialog\";\r\n\r\n /**\r\n * The element to return focus to after the modal is closed.\r\n *\r\n * * `undefined` will return focus to the previously focused element (default).\r\n * * `false` will not return focus to any element.\r\n * * or, provide your own `HTMLElement` that will receive focus upon closing.\r\n */\r\n @Prop()\r\n returnFocus: false | HTMLElement | undefined = undefined;\r\n\r\n /**\r\n * when `false` the close button in the header will not be rendered. Defaults to `true`.\r\n *\r\n * Needs `modalTitle` to be set.\r\n */\r\n @Prop()\r\n showCloseButton = true;\r\n\r\n private returnFocusElement: HTMLElement | undefined;\r\n\r\n /**\r\n * Emitted when the user wants to close the Modal.\r\n */\r\n @Event()\r\n dsoClose!: EventEmitter<ModalCloseEvent>;\r\n\r\n get hasFooter() {\r\n return this.host.querySelector(\"[slot='footer']\") !== null;\r\n }\r\n\r\n private text = i18n(() => this.host, translations);\r\n\r\n componentDidLoad(): void {\r\n if (this.htmlDialogElement?.isConnected) {\r\n const activeElement = getActiveElement();\r\n if (activeElement instanceof HTMLElement) {\r\n this.returnFocusElement = activeElement;\r\n }\r\n\r\n this.htmlDialogElement.showModal();\r\n }\r\n }\r\n\r\n disconnectedCallback(): void {\r\n this.htmlDialogElement?.close();\r\n\r\n if (this.returnFocus === false) {\r\n return;\r\n }\r\n\r\n (this.returnFocus ?? this.returnFocusElement)?.focus();\r\n }\r\n\r\n render() {\r\n return (\r\n <dialog\r\n class=\"dso-modal\"\r\n role={this.dialogRole ?? undefined}\r\n aria-modal=\"true\"\r\n aria-labelledby={this.ariaId}\r\n ref={(element) => (this.htmlDialogElement = element)}\r\n onCancel={(e) => {\r\n e.preventDefault();\r\n\r\n this.dsoClose.emit({ originalEvent: e });\r\n }}\r\n >\r\n <div class=\"dso-dialog\" role=\"document\">\r\n {this.modalTitle ? (\r\n <div class=\"dso-header\">\r\n <h2 id={this.ariaId}>{this.modalTitle}</h2>\r\n {this.showCloseButton && (\r\n <button type=\"button\" class=\"dso-close\" onClick={(e) => this.dsoClose.emit({ originalEvent: e })}>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n <span class=\"sr-only\">{this.text(\"close\")}</span>\r\n </button>\r\n )}\r\n </div>\r\n ) : (\r\n <span class=\"sr-only\" id={this.ariaId}>\r\n {this.text(\"dialog\")}\r\n </span>\r\n )}\r\n\r\n <dso-scrollable>\r\n <div class=\"dso-body\" tabIndex={0}>\r\n <slot name=\"body\" />\r\n </div>\r\n </dso-scrollable>\r\n\r\n {this.hasFooter && (\r\n <div class=\"dso-footer\">\r\n <slot name=\"footer\" />\r\n </div>\r\n )}\r\n </div>\r\n </dialog>\r\n );\r\n }\r\n}\r\n"],"names":["v4","i18n","getActiveElement","h"],"mappings":";;;;;;;AAEO,MAAM,YAAY,GAAa;AACpC,IAAA,EAAE,EAAE;AACF,QAAA,WAAW,EAAE;AACX,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,MAAM,EAAE,QAAQ;AACjB,SAAA;AACF,KAAA;AACD,IAAA,EAAE,EAAE;AACF,QAAA,WAAW,EAAE;AACX,YAAA,KAAK,EAAE,SAAS;AAChB,YAAA,MAAM,EAAE,SAAS;AAClB,SAAA;AACF,KAAA;CACF;;ACfD,MAAM,QAAQ,GAAG,ylNAAylN;;MCc7lN,KAAK,GAAA,MAAA;AALlB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAYE,QAAA,IAAM,CAAA,MAAA,GAAGA,KAAE,EAAE;AAcb;;AAEG;AAEH,QAAA,IAAU,CAAA,UAAA,GAAkB,QAAQ;AAEpC;;;;;;AAMG;AAEH,QAAA,IAAW,CAAA,WAAA,GAAoC,SAAS;AAExD;;;;AAIG;AAEH,QAAA,IAAe,CAAA,eAAA,GAAG,IAAI;AAcd,QAAA,IAAA,CAAA,IAAI,GAAGC,SAAI,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC;AAqEnD;AAzEC,IAAA,IAAI,SAAS,GAAA;QACX,OAAO,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,iBAAiB,CAAC,KAAK,IAAI;;IAK5D,gBAAgB,GAAA;;QACd,IAAI,MAAA,IAAI,CAAC,iBAAiB,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,WAAW,EAAE;AACvC,YAAA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G,CAClB,CACP,CACG,CACC;;;;;;;;"}
1
+ {"version":3,"file":"dso-modal.entry.cjs.js","sources":["src/components/modal/modal.i18n.ts","src/components/modal/modal.scss?tag=dso-modal&encapsulation=shadow","src/components/modal/modal.tsx"],"sourcesContent":["import { Resource } from \"../../utils/i18n\";\r\n\r\nexport const translations: Resource = {\r\n en: {\r\n \"dso-modal\": {\r\n close: \"Close\",\r\n dialog: \"Dialog\",\r\n },\r\n },\r\n nl: {\r\n \"dso-modal\": {\r\n close: \"Sluiten\",\r\n dialog: \"Dialoog\",\r\n },\r\n },\r\n};\r\n","@use \"~dso-toolkit/src/utilities\";\r\n@use \"~dso-toolkit/src/components/button\";\r\n@use \"~dso-toolkit/src/components/modal\";\r\n@use \"~dso-toolkit/src/variables/media-query-breakpoints\";\r\n\r\n@include utilities.box-sizing();\r\n\r\n:host {\r\n display: block;\r\n}\r\n\r\n// fullscreen option\r\n:host([fullscreen]) dialog {\r\n @include modal.fullscreen();\r\n}\r\n\r\n// Go to fullscreen on =< 480px viewport\r\n@media screen and (max-width: media-query-breakpoints.$screen-xs-min) {\r\n :host dialog {\r\n @include modal.fullscreen();\r\n }\r\n}\r\n\r\n.sr-only {\r\n @include utilities.sr-only();\r\n}\r\n\r\nbutton {\r\n @include button.element();\r\n}\r\n\r\n.dso-modal {\r\n @include modal.root();\r\n}\r\n\r\n.dso-close {\r\n dso-icon {\r\n color: modal.$close-icon-color;\r\n }\r\n}\r\n","import { Component, ComponentInterface, Element, Event, EventEmitter, Prop, State, h } from \"@stencil/core\";\r\nimport { v4 } from \"uuid\";\r\n\r\nimport { getActiveElement } from \"../../utils/get-active-element\";\r\nimport { i18n } from \"../../utils/i18n\";\r\n\r\nimport { translations } from \"./modal.i18n\";\r\nimport { ModalCloseEvent } from \"./modal.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-modal\",\r\n styleUrl: \"modal.scss\",\r\n shadow: true,\r\n})\r\nexport class Modal implements ComponentInterface {\r\n private htmlDialogElement?: HTMLDialogElement;\r\n\r\n @Element()\r\n host!: HTMLDsoModalElement;\r\n\r\n @State()\r\n ariaId = v4();\r\n\r\n /**\r\n * when set the modal will be shown in fullscreen.\r\n */\r\n @Prop({ reflect: true })\r\n fullscreen?: boolean;\r\n\r\n /**\r\n * The title of the Modal.\r\n */\r\n @Prop()\r\n modalTitle?: string;\r\n\r\n /**\r\n * the role for the modal `dialog` | `alert` | `alertdialog`.\r\n */\r\n @Prop()\r\n dialogRole: string | null = \"dialog\";\r\n\r\n /**\r\n * The element to return focus to after the modal is closed.\r\n *\r\n * * `undefined` will return focus to the previously focused element (default).\r\n * * `false` will not return focus to any element.\r\n * * or, provide your own `HTMLElement` that will receive focus upon closing.\r\n */\r\n @Prop()\r\n returnFocus: false | HTMLElement | undefined = undefined;\r\n\r\n /**\r\n * when `false` the close button in the header will not be rendered.\r\n *\r\n * Needs `modalTitle` to be set.\r\n */\r\n @Prop()\r\n closable = false;\r\n\r\n private returnFocusElement: HTMLElement | undefined;\r\n\r\n /**\r\n * Emitted when the user:\r\n * - clicks the close button\r\n * - dismisses the Modal with the Escape button\r\n * - clicks or taps outside the Modal\r\n */\r\n @Event()\r\n dsoClose!: EventEmitter<ModalCloseEvent>;\r\n\r\n get hasFooter() {\r\n return this.host.querySelector(\"[slot='footer']\") !== null;\r\n }\r\n\r\n private text = i18n(() => this.host, translations);\r\n\r\n componentDidLoad(): void {\r\n if (this.htmlDialogElement?.isConnected) {\r\n const activeElement = getActiveElement();\r\n if (activeElement instanceof HTMLElement) {\r\n this.returnFocusElement = activeElement;\r\n }\r\n\r\n this.htmlDialogElement.showModal();\r\n }\r\n }\r\n\r\n disconnectedCallback(): void {\r\n this.htmlDialogElement?.close();\r\n\r\n if (this.returnFocus === false) {\r\n return;\r\n }\r\n\r\n (this.returnFocus ?? this.returnFocusElement)?.focus();\r\n }\r\n\r\n private handleDialogClick(e: MouseEvent) {\r\n if (!this.closable) {\r\n return;\r\n }\r\n\r\n if (e.target === this.htmlDialogElement) {\r\n this.dsoClose.emit({ originalEvent: e });\r\n }\r\n }\r\n\r\n private blockEscapeKey = (e: KeyboardEvent) => {\r\n if (e.key === \"Escape\") {\r\n e.preventDefault();\r\n\r\n if (this.closable) {\r\n this.dsoClose.emit({ originalEvent: e });\r\n }\r\n }\r\n };\r\n\r\n render() {\r\n return (\r\n <dialog\r\n class=\"dso-modal\"\r\n role={this.dialogRole ?? undefined}\r\n aria-modal=\"true\"\r\n aria-labelledby={this.ariaId}\r\n ref={(element) => (this.htmlDialogElement = element)}\r\n onClick={(e) => this.handleDialogClick(e)}\r\n onKeyDown={(e) => this.blockEscapeKey(e)}\r\n >\r\n <div class=\"dso-dialog\" role=\"document\">\r\n {this.modalTitle ? (\r\n <div class=\"dso-header\">\r\n <h2 id={this.ariaId}>{this.modalTitle}</h2>\r\n {this.closable && (\r\n <button type=\"button\" class=\"dso-close\" onClick={(e) => this.dsoClose.emit({ originalEvent: e })}>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n <span class=\"sr-only\">{this.text(\"close\")}</span>\r\n </button>\r\n )}\r\n </div>\r\n ) : (\r\n <span class=\"sr-only\" id={this.ariaId}>\r\n {this.text(\"dialog\")}\r\n </span>\r\n )}\r\n\r\n <dso-scrollable>\r\n <div class=\"dso-body\" tabIndex={0}>\r\n <slot name=\"body\" />\r\n </div>\r\n </dso-scrollable>\r\n\r\n {this.hasFooter && (\r\n <div class=\"dso-footer\">\r\n <slot name=\"footer\" />\r\n </div>\r\n )}\r\n </div>\r\n </dialog>\r\n );\r\n }\r\n}\r\n"],"names":["v4","i18n","getActiveElement","h"],"mappings":";;;;;;;AAEO,MAAM,YAAY,GAAa;AACpC,IAAA,EAAE,EAAE;AACF,QAAA,WAAW,EAAE;AACX,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,MAAM,EAAE,QAAQ;AACjB,SAAA;AACF,KAAA;AACD,IAAA,EAAE,EAAE;AACF,QAAA,WAAW,EAAE;AACX,YAAA,KAAK,EAAE,SAAS;AACh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AA,EAAA,IAAI,EAAC,QAAQ,EAAA,CAAG,CAClB,CACP,CACG,CACC;;;;;;;;"}
@@ -1661,7 +1661,7 @@ const computePosition = (reference, floating, options) => {
1661
1661
  });
1662
1662
  };
1663
1663
 
1664
- const onboardingTipCss = "*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}::slotted([slot=heading]){display:flex !important;align-items:center !important;margin-block-end:0 !important;margin-block-start:0 !important;color:#fff !important;line-height:1.375 !important}:host{--_dso-button-primary-background-color:#fff;--_dso-button-primary-border-color:#fff;--_dso-button-primary-color:#000;--_dso-button-primary-hover-background-color:#ccc;--_dso-button-primary-hover-border-color:#ccc;--_dso-button-primary-hover-color:#000;--_dso-button-primary-active-background-color:#999;--_dso-button-primary-active-border-color:#999;--_dso-button-primary-active-color:#000;--_dso-button-primary-disabled-background-color:#fff;--_dso-button-primary-disabled-border-color:#fff;--_dso-button-primary-disabled-color:#b2b2b2;--_dso-button-secondary-background-color:#fff;--_dso-button-secondary-border-color:#fff;--_dso-button-secondary-color:#000;--_dso-button-secondary-hover-background-color:#ccc;--_dso-button-secondary-hover-border-color:#ccc;--_dso-button-secondary-hover-color:#000;--_dso-button-secondary-active-background-color:#999;--_dso-button-secondary-active-border-color:#999;--_dso-button-secondary-active-color:#000;--_dso-button-secondary-disabled-background-color:#fff;--_dso-button-secondary-disabled-border-color:#fff;--_dso-button-secondary-disabled-color:#b2b2b2;display:block;filter:drop-shadow(2px 2px 16px rgba(0, 0, 0, 0.4))}:host([popover]){margin:0 !important;border:0;padding:0;background-color:transparent;overflow:unset}.onboarding-tip{font-family:Asap, sans-serif;font-style:normal;font-weight:400;line-height:1.5;line-break:auto;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;overflow-wrap:anywhere;word-spacing:normal;word-wrap:normal;white-space:normal;font-size:14px;inset-block-start:0;inset-inline-start:0;z-index:410}@media screen and (max-width: 360px){.onboarding-tip{padding-inline-start:8px !important}}.dso-close{-webkit-appearance:button;color:inherit;cursor:pointer;font:inherit;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none;position:absolute;inset-block-start:0;inset-inline-end:0;block-size:32px;inline-size:32px;padding:0;background-color:transparent;border:0;text-align:center}.dso-close[disabled]{cursor:default}.dso-close::-moz-focus-inner{border:0;padding:0}.onboarding-tip-inner{--link-color:#fff;--link-hover-color:#b2b2b2;--link-visited-color:#7f7f7f;max-inline-size:min(360px, 100vw - 2 * 8px);max-block-size:40vh;overflow:auto;padding-block:32px 8px;padding-inline:8px;border-radius:4px;display:block;font-size:1rem;position:relative;z-index:2}.onboarding-tip-inner{background-color:#2b5780;border-color:#2b5780;color:#fff}.onboarding-tip-arrow{border-start-start-radius:4px;position:absolute;block-size:20px;inline-size:20px;background:#2b5780;z-index:1;pointer-events:none}.onboarding-tip-content-wrapper{padding-inline:16px;padding-block-end:16px}.onboarding-tip-content-heading{display:flex}.onboarding-tip-content-heading dso-icon{margin-inline-end:8px}";
1664
+ const onboardingTipCss = "*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}::slotted([slot=heading]){display:flex !important;align-items:center !important;margin-block-end:0 !important;margin-block-start:0 !important;color:#fff !important;line-height:1.375 !important}:host{--_dso-button-primary-background-color:#fff;--_dso-button-primary-border-color:#fff;--_dso-button-primary-color:#000;--_dso-button-primary-hover-background-color:#ccc;--_dso-button-primary-hover-border-color:#ccc;--_dso-button-primary-hover-color:#000;--_dso-button-primary-active-background-color:#999;--_dso-button-primary-active-border-color:#999;--_dso-button-primary-active-color:#000;--_dso-button-primary-disabled-background-color:#fff;--_dso-button-primary-disabled-border-color:#fff;--_dso-button-primary-disabled-color:#b2b2b2;--_dso-button-secondary-background-color:#fff;--_dso-button-secondary-border-color:#fff;--_dso-button-secondary-color:#000;--_dso-button-secondary-hover-background-color:#ccc;--_dso-button-secondary-hover-border-color:#ccc;--_dso-button-secondary-hover-color:#000;--_dso-button-secondary-active-background-color:#999;--_dso-button-secondary-active-border-color:#999;--_dso-button-secondary-active-color:#000;--_dso-button-secondary-disabled-background-color:#fff;--_dso-button-secondary-disabled-border-color:#fff;--_dso-button-secondary-disabled-color:#b2b2b2;display:block;filter:drop-shadow(2px 2px 16px rgba(0, 0, 0, 0.4));transition:visibility 400ms, opacity 400ms}:host(:not([ready])){opacity:1;animation:400ms ease-in 1 normal both fadeInOpacity}:host([popover]){margin:0 !important;border:0;padding:0;background-color:transparent;overflow:unset}.onboarding-tip{font-family:Asap, sans-serif;font-style:normal;font-weight:400;line-height:1.5;line-break:auto;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;overflow-wrap:anywhere;word-spacing:normal;word-wrap:normal;white-space:normal;font-size:14px;inset-block-start:0;inset-inline-start:0;z-index:410}@media screen and (max-width: 360px){.onboarding-tip{padding-inline-start:8px !important}}.dso-close{-webkit-appearance:button;color:inherit;cursor:pointer;font:inherit;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none;position:absolute;inset-block-start:0;inset-inline-end:0;block-size:32px;inline-size:32px;padding:0;background-color:transparent;border:0;text-align:center}.dso-close[disabled]{cursor:default}.dso-close::-moz-focus-inner{border:0;padding:0}.onboarding-tip-inner{--link-color:#fff;--link-hover-color:#b2b2b2;--link-visited-color:#7f7f7f;max-inline-size:min(360px, 100vw - 2 * 8px);max-block-size:calc(100vh - 10px);overflow:auto;padding-block:32px 8px;padding-inline:8px;border-radius:4px;display:block;font-size:1rem;position:relative;z-index:2}.onboarding-tip-inner{background-color:#2b5780;border-color:#2b5780;color:#fff}@media screen and (max-width: 991px){.onboarding-tip-inner{max-block-size:unset}}.onboarding-tip-arrow{border-start-start-radius:4px;position:absolute;block-size:20px;inline-size:20px;background:#2b5780;z-index:1;pointer-events:none}.onboarding-tip-content-wrapper{padding-inline:16px;padding-block-end:16px}.onboarding-tip-content-heading{display:flex}.onboarding-tip-content-heading dso-icon{margin-inline-end:8px}@keyframes fadeInOpacity{0%{opacity:0}100%{opacity:1}}";
1665
1665
 
1666
1666
  const OnboardingTip = class {
1667
1667
  constructor(hostRef) {
@@ -1671,6 +1671,7 @@ const OnboardingTip = class {
1671
1671
  * Where to place the Onboarding Tip relative to its reference element.
1672
1672
  */
1673
1673
  this.placement = "right";
1674
+ this.ready = false;
1674
1675
  }
1675
1676
  componentDidRender() {
1676
1677
  if (!this.host.matches(":popover-open")) {
@@ -1692,16 +1693,25 @@ const OnboardingTip = class {
1692
1693
  * This function positions the Onboarding Tip relative to its reference element. It is static so the position is calculated
1693
1694
  * only using the passed arguments.
1694
1695
  */
1695
- static positionTip(referenceElement, tipRef, tipArrowRef, placement) {
1696
- // Get half the arrow box's hypotenuse length
1697
- const arrowLength = tipArrowRef.offsetWidth;
1698
- const floatingOffset = Math.sqrt(2 * arrowLength ** 2) / 2;
1696
+ static positionTip(referenceElement, tipRef, tipArrowRef, position) {
1699
1697
  const padding = 5;
1700
1698
  return autoUpdate(referenceElement, tipRef, () => {
1699
+ const arrowLength = tipArrowRef.offsetWidth;
1700
+ // Get half the arrow box's hypotenuse length
1701
+ const mainAxisOffset = Math.sqrt(2 * arrowLength ** 2) / 2;
1702
+ // 1.5 times the diagonal of the arrow box
1703
+ const arrowPadding = arrowLength * Math.sqrt(2) * 1.5;
1704
+ // Same as media-query-breakpoints.$screen-md-min
1705
+ const smallViewport = document.body.clientWidth < 992;
1706
+ // Only use top and bottom placement when the viewport is small
1707
+ const placement = smallViewport ? "top" : `${position}-start`;
1701
1708
  computePosition(referenceElement, tipRef, {
1702
1709
  strategy: "fixed",
1703
1710
  middleware: [
1704
- offset(floatingOffset),
1711
+ offset({
1712
+ mainAxis: mainAxisOffset,
1713
+ alignmentAxis: -arrowPadding,
1714
+ }),
1705
1715
  flip({
1706
1716
  padding,
1707
1717
  }),
@@ -1709,18 +1719,22 @@ const OnboardingTip = class {
1709
1719
  padding,
1710
1720
  }),
1711
1721
  arrow({
1712
- padding: padding + arrowLength,
1722
+ padding: arrowPadding,
1713
1723
  element: tipArrowRef,
1714
1724
  }),
1715
1725
  hide({
1716
- padding: 42,
1726
+ padding: arrowPadding + arrowLength + padding,
1717
1727
  }),
1718
1728
  ],
1719
1729
  placement,
1720
1730
  }).then(({ x, y, middlewareData, placement: computedPlacement }) => {
1721
1731
  if (middlewareData.hide) {
1732
+ // Tooltip needs to be visible at all times on small viewports
1733
+ const disappear = !smallViewport && middlewareData.hide.referenceHidden;
1722
1734
  Object.assign(tipRef.style, {
1723
- visibility: middlewareData.hide.referenceHidden ? "hidden" : "visible",
1735
+ // Both of these properties have a CSS transition
1736
+ visibility: disappear ? "hidden" : "visible",
1737
+ opacity: disappear ? 0 : 1,
1724
1738
  });
1725
1739
  }
1726
1740
  Object.assign(tipRef.style, {
@@ -1767,7 +1781,7 @@ const OnboardingTip = class {
1767
1781
  });
1768
1782
  }
1769
1783
  render() {
1770
- return (index.h(index.Host, { key: '7c5150901a9ecbe69c373333009130db322d2303', popover: "manual" }, index.h("div", { key: 'ea013d32e5d7b74da14d420ca37a4eaffe377270', class: "onboarding-tip", role: "tooltip" }, index.h("div", { key: 'adb76bcf17737a81ff9a84e091b95c706261588a', class: "onboarding-tip-inner" }, index.h("div", { key: '9485bf312830f8788e3768719ced93d589c35de0', class: "onboarding-tip-content-wrapper" }, this.headingSlottedElement !== null && (index.h("div", { key: '545450463fbf1c144481f5fa0cdf2b80744d3771', class: "onboarding-tip-content-heading" }, index.h("dso-icon", { key: '9c2ae3b0e5c6f3eb496dbbd46168ad10f417f4ab', icon: "light-bulb" }), index.h("slot", { key: 'a1db25995416339c41d1d2828a8b9257222a0917', name: "heading" }))), index.h("button", { key: '0a54cb67e9927602923fbda804f0839b1d995c4f', type: "button", class: "dso-close", onClick: (e) => this.dsoClose.emit({ originalEvent: e }) }, index.h("dso-icon", { key: 'e6c5d482f8ec171a6dd2969b66ac92b71d24bf8c', icon: "times" }), index.h("span", { key: '569fd4ac7d43b90c9c85d245636f34101dd28184', class: "sr-only" }, "Sluiten")), index.h("slot", { key: '984b8f980fa33e8d82a479c8c2a3b27a6645ee05' }))), index.h("div", { key: '7d0158f6329dec134ae9e049ce2110cbb4f27adf', class: "onboarding-tip-arrow", ref: (ref) => (this.tipArrowRef = ref) }))));
1784
+ return (index.h(index.Host, { key: 'f8cf37b8d7e355da0d6405553d9b711a342ff35b', popover: "manual", ready: this.ready, onAnimationend: () => (this.ready = true) }, index.h("div", { key: '2c24f70065a1739ac15645a2b95d0d1e7170bd69', class: "onboarding-tip", role: "tooltip" }, index.h("div", { key: '36ff549f3ee6540d95253aef4d42073f82c4e6ff', class: "onboarding-tip-inner" }, index.h("div", { key: '1679ac6427bf11e5204bd0558c2e3eb97e79f565', class: "onboarding-tip-content-wrapper" }, this.headingSlottedElement !== null && (index.h("div", { key: 'cd2ed8f12e580239a9f3b17f0c68e3cc47a354e3', class: "onboarding-tip-content-heading" }, index.h("dso-icon", { key: '75a04ff5bcf97b13350be0f9b73a1c4a2551469b', icon: "light-bulb" }), index.h("slot", { key: 'befb042560938e167ce7a4ddded30589cba74837', name: "heading" }))), index.h("button", { key: 'a39a55d736676f329ae0fb491dd20468c7a8ef90', type: "button", class: "dso-close", onClick: (e) => this.dsoClose.emit({ originalEvent: e }) }, index.h("dso-icon", { key: '32bd8339c3df104862246bc984ae590fe9134041', icon: "times" }), index.h("span", { key: '96e88dded1b34e9acee34a7e5a17416aee068f25', class: "sr-only" }, "Sluiten")), index.h("slot", { key: 'bdcee07fc2629e1026c8eb3a525d215305dcdb93' }))), index.h("div", { key: '2ce90e310b4e3b5b09bf155617b7280508551d72', class: "onboarding-tip-arrow", ref: (ref) => (this.tipArrowRef = ref) }))));
1771
1785
  }
1772
1786
  get headingSlottedElement() {
1773
1787
  return this.host.querySelector("[slot='heading']");