@nldd/design-system 0.8.79 → 0.8.82

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 (446) hide show
  1. package/custom-elements.json +2400 -664
  2. package/dist/components/actions/button/button.styles.d.ts.map +1 -1
  3. package/dist/components/actions/button/button.styles.js +4 -1
  4. package/dist/components/actions/button/button.styles.js.map +1 -1
  5. package/dist/components/actions/icon-button/icon-button.styles.d.ts.map +1 -1
  6. package/dist/components/actions/icon-button/icon-button.styles.js +4 -1
  7. package/dist/components/actions/icon-button/icon-button.styles.js.map +1 -1
  8. package/dist/components/actions/menu/menu.d.ts +44 -3
  9. package/dist/components/actions/menu/menu.d.ts.map +1 -1
  10. package/dist/components/actions/menu/menu.js +86 -33
  11. package/dist/components/actions/menu/menu.js.map +1 -1
  12. package/dist/components/actions/menu/menu.template.d.ts +1 -1
  13. package/dist/components/actions/menu/menu.template.d.ts.map +1 -1
  14. package/dist/components/actions/menu/menu.template.js +7 -3
  15. package/dist/components/actions/menu/menu.template.js.map +1 -1
  16. package/dist/components/actions/toolbar/toolbar.d.ts +29 -0
  17. package/dist/components/actions/toolbar/toolbar.d.ts.map +1 -1
  18. package/dist/components/actions/toolbar/toolbar.i18n.d.ts +1 -0
  19. package/dist/components/actions/toolbar/toolbar.i18n.d.ts.map +1 -1
  20. package/dist/components/actions/toolbar/toolbar.i18n.js +1 -0
  21. package/dist/components/actions/toolbar/toolbar.i18n.js.map +1 -1
  22. package/dist/components/actions/toolbar/toolbar.js +74 -0
  23. package/dist/components/actions/toolbar/toolbar.js.map +1 -1
  24. package/dist/components/actions/toolbar/toolbar.styles.d.ts.map +1 -1
  25. package/dist/components/actions/toolbar/toolbar.styles.js +39 -5
  26. package/dist/components/actions/toolbar/toolbar.styles.js.map +1 -1
  27. package/dist/components/actions/toolbar/toolbar.template.d.ts.map +1 -1
  28. package/dist/components/actions/toolbar/toolbar.template.js +19 -1
  29. package/dist/components/actions/toolbar/toolbar.template.js.map +1 -1
  30. package/dist/components/breakpoints-CkxsiRgH.js +10 -0
  31. package/dist/components/components.js +51975 -114
  32. package/dist/components/content/avatar/avatar.d.ts +51 -47
  33. package/dist/components/content/avatar/avatar.d.ts.map +1 -1
  34. package/dist/components/content/avatar/avatar.js +85 -75
  35. package/dist/components/content/avatar/avatar.js.map +1 -1
  36. package/dist/components/content/avatar/avatar.styles.js +2 -2
  37. package/dist/components/content/avatar/avatar.template.d.ts +1 -0
  38. package/dist/components/content/avatar/avatar.template.d.ts.map +1 -1
  39. package/dist/components/content/avatar/avatar.template.js +26 -18
  40. package/dist/components/content/avatar/avatar.template.js.map +1 -1
  41. package/dist/components/content/avatar-group/avatar-group.d.ts +90 -0
  42. package/dist/components/content/avatar-group/avatar-group.d.ts.map +1 -0
  43. package/dist/components/content/avatar-group/avatar-group.i18n.d.ts +6 -0
  44. package/dist/components/content/avatar-group/avatar-group.i18n.d.ts.map +1 -0
  45. package/dist/components/content/avatar-group/avatar-group.i18n.js +5 -0
  46. package/dist/components/content/avatar-group/avatar-group.i18n.js.map +1 -0
  47. package/dist/components/content/avatar-group/avatar-group.js +169 -0
  48. package/dist/components/content/avatar-group/avatar-group.js.map +1 -0
  49. package/dist/components/content/avatar-group/avatar-group.styles.d.ts +2 -0
  50. package/dist/components/content/avatar-group/avatar-group.styles.d.ts.map +1 -0
  51. package/dist/components/content/avatar-group/avatar-group.styles.js +132 -0
  52. package/dist/components/content/avatar-group/avatar-group.styles.js.map +1 -0
  53. package/dist/components/content/avatar-group/avatar-group.template.d.ts +3 -0
  54. package/dist/components/content/avatar-group/avatar-group.template.d.ts.map +1 -0
  55. package/dist/components/content/avatar-group/avatar-group.template.js +50 -0
  56. package/dist/components/content/avatar-group/avatar-group.template.js.map +1 -0
  57. package/dist/components/content/blockquote/blockquote.d.ts +3 -3
  58. package/dist/components/content/blockquote/blockquote.d.ts.map +1 -1
  59. package/dist/components/content/blockquote/blockquote.js +8 -8
  60. package/dist/components/content/blockquote/blockquote.js.map +1 -1
  61. package/dist/components/content/blockquote/blockquote.styles.js +1 -1
  62. package/dist/components/content/blockquote/blockquote.template.js +1 -1
  63. package/dist/components/content/blockquote/blockquote.template.js.map +1 -1
  64. package/dist/components/content/code-viewer/code-viewer.d.ts +4 -4
  65. package/dist/components/content/code-viewer/code-viewer.d.ts.map +1 -1
  66. package/dist/components/content/code-viewer/code-viewer.js +5 -13
  67. package/dist/components/content/code-viewer/code-viewer.js.map +1 -1
  68. package/dist/components/content/code-viewer/code-viewer.styles.js +1 -1
  69. package/dist/components/content/icon/icon-aliases.d.ts.map +1 -1
  70. package/dist/components/content/icon/icon-aliases.js +18 -0
  71. package/dist/components/content/icon/icon-aliases.js.map +1 -1
  72. package/dist/components/content/icon/icon-gallery-status.d.ts.map +1 -1
  73. package/dist/components/content/icon/icon-gallery-status.js +75 -27
  74. package/dist/components/content/icon/icon-gallery-status.js.map +1 -1
  75. package/dist/components/content/icon/icon-registry.d.ts.map +1 -1
  76. package/dist/components/content/icon/icon-registry.js +25 -13
  77. package/dist/components/content/icon/icon-registry.js.map +1 -1
  78. package/dist/components/content/identity/identity.d.ts +71 -0
  79. package/dist/components/content/identity/identity.d.ts.map +1 -0
  80. package/dist/components/content/identity/identity.js +124 -0
  81. package/dist/components/content/identity/identity.js.map +1 -0
  82. package/dist/components/content/identity/identity.styles.d.ts +2 -0
  83. package/dist/components/content/identity/identity.styles.d.ts.map +1 -0
  84. package/dist/components/content/{byline/byline.styles.js → identity/identity.styles.js} +28 -47
  85. package/dist/components/content/identity/identity.styles.js.map +1 -0
  86. package/dist/components/content/identity/identity.template.d.ts +3 -0
  87. package/dist/components/content/identity/identity.template.d.ts.map +1 -0
  88. package/dist/components/content/{byline/byline.template.js → identity/identity.template.js} +12 -11
  89. package/dist/components/content/identity/identity.template.js.map +1 -0
  90. package/dist/components/content/tag/tag.d.ts +15 -10
  91. package/dist/components/content/tag/tag.d.ts.map +1 -1
  92. package/dist/components/content/tag/tag.js +15 -10
  93. package/dist/components/content/tag/tag.js.map +1 -1
  94. package/dist/components/content/title/title.d.ts +4 -4
  95. package/dist/components/content/title/title.js +4 -4
  96. package/dist/components/content/title/title.styles.js +1 -1
  97. package/dist/components/content/title/title.template.js +2 -2
  98. package/dist/components/content/token/token.d.ts +6 -2
  99. package/dist/components/content/token/token.d.ts.map +1 -1
  100. package/dist/components/content/token/token.js +6 -2
  101. package/dist/components/content/token/token.js.map +1 -1
  102. package/dist/components/content/tooltip/tooltip.d.ts +26 -25
  103. package/dist/components/content/tooltip/tooltip.d.ts.map +1 -1
  104. package/dist/components/content/tooltip/tooltip.js +31 -25
  105. package/dist/components/content/tooltip/tooltip.js.map +1 -1
  106. package/dist/components/decorate-BKn10QQi.js +9 -0
  107. package/dist/components/dist-BYVOPNHp.js +381 -0
  108. package/dist/components/dist-Bq4xc7Bm.js +624 -0
  109. package/dist/components/dist-C0PiB1dr.js +870 -0
  110. package/dist/components/dist-C400RcFU.js +1498 -0
  111. package/dist/components/dist-CCg5Mso_.js +390 -0
  112. package/dist/components/dist-CJR_Rwhh.js +464 -0
  113. package/dist/components/dist-Ccw7ZfsU.js +18481 -0
  114. package/dist/components/dist-OBifyiJS.js +887 -0
  115. package/dist/components/dist-TpIL8G4G.js +1480 -0
  116. package/dist/components/dist-afrAoubg.js +1181 -0
  117. package/dist/components/dist-bO14jlsr.js +78 -0
  118. package/dist/components/forms/form-field/form-field.d.ts +59 -2
  119. package/dist/components/forms/form-field/form-field.d.ts.map +1 -1
  120. package/dist/components/forms/form-field/form-field.js +120 -35
  121. package/dist/components/forms/form-field/form-field.js.map +1 -1
  122. package/dist/components/gherkin-uCVRxsGf.js +108 -0
  123. package/dist/components/icon-CIpJq_cf.js +751 -0
  124. package/dist/components/icon-button-BAkUJTn6.js +1676 -0
  125. package/dist/components/index.d.ts +4 -1
  126. package/dist/components/index.d.ts.map +1 -1
  127. package/dist/components/index.js +4 -1
  128. package/dist/components/index.js.map +1 -1
  129. package/dist/components/input-modality-DhTeUxKi.js +43 -0
  130. package/dist/components/inputs/checkbox/checkbox.d.ts +13 -0
  131. package/dist/components/inputs/checkbox/checkbox.d.ts.map +1 -1
  132. package/dist/components/inputs/checkbox/checkbox.js +18 -0
  133. package/dist/components/inputs/checkbox/checkbox.js.map +1 -1
  134. package/dist/components/inputs/checkbox/checkbox.styles.d.ts.map +1 -1
  135. package/dist/components/inputs/checkbox/checkbox.styles.js +17 -0
  136. package/dist/components/inputs/checkbox/checkbox.styles.js.map +1 -1
  137. package/dist/components/inputs/checkbox/checkbox.template.d.ts.map +1 -1
  138. package/dist/components/inputs/checkbox/checkbox.template.js +11 -0
  139. package/dist/components/inputs/checkbox/checkbox.template.js.map +1 -1
  140. package/dist/components/inputs/checkbox-field/checkbox-field.d.ts +9 -0
  141. package/dist/components/inputs/checkbox-field/checkbox-field.d.ts.map +1 -1
  142. package/dist/components/inputs/checkbox-field/checkbox-field.js +11 -0
  143. package/dist/components/inputs/checkbox-field/checkbox-field.js.map +1 -1
  144. package/dist/components/inputs/code-editor/code-editor.d.ts +3 -0
  145. package/dist/components/inputs/code-editor/code-editor.d.ts.map +1 -1
  146. package/dist/components/inputs/code-editor/code-editor.js +3 -0
  147. package/dist/components/inputs/code-editor/code-editor.js.map +1 -1
  148. package/dist/components/inputs/combo-box/combo-box.d.ts +6 -0
  149. package/dist/components/inputs/combo-box/combo-box.d.ts.map +1 -1
  150. package/dist/components/inputs/combo-box/combo-box.js +21 -0
  151. package/dist/components/inputs/combo-box/combo-box.js.map +1 -1
  152. package/dist/components/inputs/date-field/date-field.d.ts +6 -0
  153. package/dist/components/inputs/date-field/date-field.d.ts.map +1 -1
  154. package/dist/components/inputs/date-field/date-field.js +11 -0
  155. package/dist/components/inputs/date-field/date-field.js.map +1 -1
  156. package/dist/components/inputs/date-picker/date-picker.d.ts +3 -0
  157. package/dist/components/inputs/date-picker/date-picker.d.ts.map +1 -1
  158. package/dist/components/inputs/date-picker/date-picker.js +4 -1
  159. package/dist/components/inputs/date-picker/date-picker.js.map +1 -1
  160. package/dist/components/inputs/date-picker/date-picker.styles.d.ts.map +1 -1
  161. package/dist/components/inputs/date-picker/date-picker.styles.js +7 -2
  162. package/dist/components/inputs/date-picker/date-picker.styles.js.map +1 -1
  163. package/dist/components/inputs/dropdown/dropdown.d.ts +29 -0
  164. package/dist/components/inputs/dropdown/dropdown.d.ts.map +1 -1
  165. package/dist/components/inputs/dropdown/dropdown.js +44 -1
  166. package/dist/components/inputs/dropdown/dropdown.js.map +1 -1
  167. package/dist/components/inputs/file-field/file-field.d.ts +115 -0
  168. package/dist/components/inputs/file-field/file-field.d.ts.map +1 -0
  169. package/dist/components/inputs/file-field/file-field.i18n.d.ts +10 -0
  170. package/dist/components/inputs/file-field/file-field.i18n.d.ts.map +1 -0
  171. package/dist/components/inputs/file-field/file-field.i18n.js +9 -0
  172. package/dist/components/inputs/file-field/file-field.i18n.js.map +1 -0
  173. package/dist/components/inputs/file-field/file-field.js +249 -0
  174. package/dist/components/inputs/file-field/file-field.js.map +1 -0
  175. package/dist/components/inputs/file-field/file-field.styles.d.ts +2 -0
  176. package/dist/components/inputs/file-field/file-field.styles.d.ts.map +1 -0
  177. package/dist/components/inputs/file-field/file-field.styles.js +134 -0
  178. package/dist/components/inputs/file-field/file-field.styles.js.map +1 -0
  179. package/dist/components/inputs/file-field/file-field.template.d.ts +7 -0
  180. package/dist/components/inputs/file-field/file-field.template.d.ts.map +1 -0
  181. package/dist/components/inputs/file-field/file-field.template.js +63 -0
  182. package/dist/components/inputs/file-field/file-field.template.js.map +1 -0
  183. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.d.ts +3 -0
  184. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.d.ts.map +1 -1
  185. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.js +3 -0
  186. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.js.map +1 -1
  187. package/dist/components/inputs/number-field/number-field.d.ts +9 -0
  188. package/dist/components/inputs/number-field/number-field.d.ts.map +1 -1
  189. package/dist/components/inputs/number-field/number-field.js +12 -0
  190. package/dist/components/inputs/number-field/number-field.js.map +1 -1
  191. package/dist/components/inputs/number-field/number-field.template.d.ts.map +1 -1
  192. package/dist/components/inputs/number-field/number-field.template.js +1 -0
  193. package/dist/components/inputs/number-field/number-field.template.js.map +1 -1
  194. package/dist/components/inputs/password-field/password-field.d.ts +9 -0
  195. package/dist/components/inputs/password-field/password-field.d.ts.map +1 -1
  196. package/dist/components/inputs/password-field/password-field.js +12 -0
  197. package/dist/components/inputs/password-field/password-field.js.map +1 -1
  198. package/dist/components/inputs/password-field/password-field.template.d.ts.map +1 -1
  199. package/dist/components/inputs/password-field/password-field.template.js +1 -0
  200. package/dist/components/inputs/password-field/password-field.template.js.map +1 -1
  201. package/dist/components/inputs/radio-button/radio-button.d.ts +13 -0
  202. package/dist/components/inputs/radio-button/radio-button.d.ts.map +1 -1
  203. package/dist/components/inputs/radio-button/radio-button.js +18 -0
  204. package/dist/components/inputs/radio-button/radio-button.js.map +1 -1
  205. package/dist/components/inputs/radio-button/radio-button.styles.d.ts.map +1 -1
  206. package/dist/components/inputs/radio-button/radio-button.styles.js +11 -0
  207. package/dist/components/inputs/radio-button/radio-button.styles.js.map +1 -1
  208. package/dist/components/inputs/radio-button/radio-button.template.d.ts.map +1 -1
  209. package/dist/components/inputs/radio-button/radio-button.template.js +10 -0
  210. package/dist/components/inputs/radio-button/radio-button.template.js.map +1 -1
  211. package/dist/components/inputs/radio-button-field/radio-button-field.d.ts +9 -0
  212. package/dist/components/inputs/radio-button-field/radio-button-field.d.ts.map +1 -1
  213. package/dist/components/inputs/radio-button-field/radio-button-field.js +11 -0
  214. package/dist/components/inputs/radio-button-field/radio-button-field.js.map +1 -1
  215. package/dist/components/inputs/radio-button-group/radio-button-group.d.ts +16 -0
  216. package/dist/components/inputs/radio-button-group/radio-button-group.d.ts.map +1 -1
  217. package/dist/components/inputs/radio-button-group/radio-button-group.js +33 -0
  218. package/dist/components/inputs/radio-button-group/radio-button-group.js.map +1 -1
  219. package/dist/components/inputs/search-field/search-field.d.ts +6 -0
  220. package/dist/components/inputs/search-field/search-field.d.ts.map +1 -1
  221. package/dist/components/inputs/search-field/search-field.js +6 -0
  222. package/dist/components/inputs/search-field/search-field.js.map +1 -1
  223. package/dist/components/inputs/segmented-control/segmented-control.d.ts +16 -0
  224. package/dist/components/inputs/segmented-control/segmented-control.d.ts.map +1 -1
  225. package/dist/components/inputs/segmented-control/segmented-control.js +26 -7
  226. package/dist/components/inputs/segmented-control/segmented-control.js.map +1 -1
  227. package/dist/components/inputs/stepper/stepper.d.ts +17 -0
  228. package/dist/components/inputs/stepper/stepper.d.ts.map +1 -1
  229. package/dist/components/inputs/stepper/stepper.js +22 -0
  230. package/dist/components/inputs/stepper/stepper.js.map +1 -1
  231. package/dist/components/inputs/stepper/stepper.template.js +1 -1
  232. package/dist/components/inputs/stepper/stepper.template.js.map +1 -1
  233. package/dist/components/inputs/switch/switch.d.ts +3 -0
  234. package/dist/components/inputs/switch/switch.d.ts.map +1 -1
  235. package/dist/components/inputs/switch/switch.js +3 -0
  236. package/dist/components/inputs/switch/switch.js.map +1 -1
  237. package/dist/components/inputs/switch-field/switch-field.d.ts +3 -0
  238. package/dist/components/inputs/switch-field/switch-field.d.ts.map +1 -1
  239. package/dist/components/inputs/switch-field/switch-field.js +3 -0
  240. package/dist/components/inputs/switch-field/switch-field.js.map +1 -1
  241. package/dist/components/inputs/text-editor/text-editor.caret.d.ts.map +1 -1
  242. package/dist/components/inputs/text-editor/text-editor.caret.js +7 -1
  243. package/dist/components/inputs/text-editor/text-editor.caret.js.map +1 -1
  244. package/dist/components/inputs/text-editor/text-editor.d.ts +3 -4
  245. package/dist/components/inputs/text-editor/text-editor.d.ts.map +1 -1
  246. package/dist/components/inputs/text-editor/text-editor.js +4 -7
  247. package/dist/components/inputs/text-editor/text-editor.js.map +1 -1
  248. package/dist/components/inputs/text-editor/text-editor.styles.d.ts.map +1 -1
  249. package/dist/components/inputs/text-editor/text-editor.styles.js +1 -9
  250. package/dist/components/inputs/text-editor/text-editor.styles.js.map +1 -1
  251. package/dist/components/inputs/text-field/text-field.d.ts +9 -0
  252. package/dist/components/inputs/text-field/text-field.d.ts.map +1 -1
  253. package/dist/components/inputs/text-field/text-field.js +12 -0
  254. package/dist/components/inputs/text-field/text-field.js.map +1 -1
  255. package/dist/components/inputs/text-field/text-field.template.d.ts.map +1 -1
  256. package/dist/components/inputs/text-field/text-field.template.js +1 -0
  257. package/dist/components/inputs/text-field/text-field.template.js.map +1 -1
  258. package/dist/components/inputs/time-field/time-field.d.ts +6 -0
  259. package/dist/components/inputs/time-field/time-field.d.ts.map +1 -1
  260. package/dist/components/inputs/time-field/time-field.js +11 -0
  261. package/dist/components/inputs/time-field/time-field.js.map +1 -1
  262. package/dist/components/inputs/time-field/time-field.template.js +1 -1
  263. package/dist/components/inputs/time-picker/time-picker.d.ts +3 -0
  264. package/dist/components/inputs/time-picker/time-picker.d.ts.map +1 -1
  265. package/dist/components/inputs/time-picker/time-picker.js +4 -1
  266. package/dist/components/inputs/time-picker/time-picker.js.map +1 -1
  267. package/dist/components/inputs/time-picker/time-picker.styles.d.ts.map +1 -1
  268. package/dist/components/inputs/time-picker/time-picker.styles.js +7 -2
  269. package/dist/components/inputs/time-picker/time-picker.styles.js.map +1 -1
  270. package/dist/components/inputs/toggle-button/toggle-button.d.ts +10 -0
  271. package/dist/components/inputs/toggle-button/toggle-button.d.ts.map +1 -1
  272. package/dist/components/inputs/toggle-button/toggle-button.js +14 -0
  273. package/dist/components/inputs/toggle-button/toggle-button.js.map +1 -1
  274. package/dist/components/inputs/toggle-button-group/toggle-button-group.d.ts +11 -0
  275. package/dist/components/inputs/toggle-button-group/toggle-button-group.d.ts.map +1 -1
  276. package/dist/components/inputs/toggle-button-group/toggle-button-group.js +16 -6
  277. package/dist/components/inputs/toggle-button-group/toggle-button-group.js.map +1 -1
  278. package/dist/components/inputs/token-field/token-field.d.ts +6 -0
  279. package/dist/components/inputs/token-field/token-field.d.ts.map +1 -1
  280. package/dist/components/inputs/token-field/token-field.js +13 -0
  281. package/dist/components/inputs/token-field/token-field.js.map +1 -1
  282. package/dist/components/layout/box/box.d.ts +17 -7
  283. package/dist/components/layout/box/box.d.ts.map +1 -1
  284. package/dist/components/layout/box/box.js +17 -7
  285. package/dist/components/layout/box/box.js.map +1 -1
  286. package/dist/components/layout/box/box.styles.d.ts.map +1 -1
  287. package/dist/components/layout/box/box.styles.js +9 -2
  288. package/dist/components/layout/box/box.styles.js.map +1 -1
  289. package/dist/components/layout/container/container.d.ts +10 -0
  290. package/dist/components/layout/container/container.d.ts.map +1 -1
  291. package/dist/components/layout/container/container.js +38 -0
  292. package/dist/components/layout/container/container.js.map +1 -1
  293. package/dist/components/layout/container/container.styles.d.ts.map +1 -1
  294. package/dist/components/layout/container/container.styles.js +10 -1
  295. package/dist/components/layout/container/container.styles.js.map +1 -1
  296. package/dist/components/layout/page/page.styles.d.ts.map +1 -1
  297. package/dist/components/layout/page/page.styles.js +8 -1
  298. package/dist/components/layout/page/page.styles.js.map +1 -1
  299. package/dist/components/layout/page-sections/hero/hero.d.ts +32 -33
  300. package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
  301. package/dist/components/layout/page-sections/hero/hero.js +32 -33
  302. package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
  303. package/dist/components/layout/page-sections/hero/hero.template.js +1 -1
  304. package/dist/components/layout/page-sections/hero/hero.template.js.map +1 -1
  305. package/dist/components/layout/page-sections/simple-section/simple-section.d.ts +7 -0
  306. package/dist/components/layout/page-sections/simple-section/simple-section.d.ts.map +1 -1
  307. package/dist/components/layout/page-sections/simple-section/simple-section.js +12 -0
  308. package/dist/components/layout/page-sections/simple-section/simple-section.js.map +1 -1
  309. package/dist/components/layout/page-sections/simple-section/simple-section.styles.d.ts.map +1 -1
  310. package/dist/components/layout/page-sections/simple-section/simple-section.styles.js +19 -0
  311. package/dist/components/layout/page-sections/simple-section/simple-section.styles.js.map +1 -1
  312. package/dist/components/layout/popover/popover.d.ts +34 -28
  313. package/dist/components/layout/popover/popover.d.ts.map +1 -1
  314. package/dist/components/layout/popover/popover.js +44 -31
  315. package/dist/components/layout/popover/popover.js.map +1 -1
  316. package/dist/components/layout/sheet/sheet.d.ts +2 -0
  317. package/dist/components/layout/sheet/sheet.d.ts.map +1 -1
  318. package/dist/components/layout/sheet/sheet.js +12 -1
  319. package/dist/components/layout/sheet/sheet.js.map +1 -1
  320. package/dist/components/lists-and-tables/cells/description-cell/description-cell.styles.d.ts.map +1 -1
  321. package/dist/components/lists-and-tables/cells/description-cell/description-cell.styles.js +9 -1
  322. package/dist/components/lists-and-tables/cells/description-cell/description-cell.styles.js.map +1 -1
  323. package/dist/components/lists-and-tables/cells/text-cell/text-cell.styles.d.ts.map +1 -1
  324. package/dist/components/lists-and-tables/cells/text-cell/text-cell.styles.js +9 -1
  325. package/dist/components/lists-and-tables/cells/text-cell/text-cell.styles.js.map +1 -1
  326. package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.d.ts +14 -14
  327. package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.d.ts.map +1 -1
  328. package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.js +13 -13
  329. package/dist/components/lists-and-tables/cells/title-cell/title-cell.styles.d.ts.map +1 -1
  330. package/dist/components/lists-and-tables/cells/title-cell/title-cell.styles.js +13 -2
  331. package/dist/components/lists-and-tables/cells/title-cell/title-cell.styles.js.map +1 -1
  332. package/dist/components/lists-and-tables/list/list.d.ts +8 -11
  333. package/dist/components/lists-and-tables/list/list.d.ts.map +1 -1
  334. package/dist/components/lists-and-tables/list/list.js +8 -10
  335. package/dist/components/lists-and-tables/list/list.js.map +1 -1
  336. package/dist/components/lists-and-tables/list/list.styles.d.ts.map +1 -1
  337. package/dist/components/lists-and-tables/list/list.styles.js +13 -6
  338. package/dist/components/lists-and-tables/list/list.styles.js.map +1 -1
  339. package/dist/components/lists-and-tables/list-item/list-item.d.ts +20 -16
  340. package/dist/components/lists-and-tables/list-item/list-item.d.ts.map +1 -1
  341. package/dist/components/lists-and-tables/list-item/list-item.js +44 -30
  342. package/dist/components/lists-and-tables/list-item/list-item.js.map +1 -1
  343. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js +1 -1
  344. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js.map +1 -1
  345. package/dist/components/navigation/top-title-bar/top-title-bar.d.ts +15 -0
  346. package/dist/components/navigation/top-title-bar/top-title-bar.d.ts.map +1 -1
  347. package/dist/components/navigation/top-title-bar/top-title-bar.js +44 -1
  348. package/dist/components/navigation/top-title-bar/top-title-bar.js.map +1 -1
  349. package/dist/components/navigation/top-title-bar/top-title-bar.template.d.ts.map +1 -1
  350. package/dist/components/navigation/top-title-bar/top-title-bar.template.js +3 -1
  351. package/dist/components/navigation/top-title-bar/top-title-bar.template.js.map +1 -1
  352. package/dist/components/reflect-non-default-OLaK60rT.js +37 -0
  353. package/dist/components/rolldown-runtime-D7D4PA-g.js +13 -0
  354. package/dist/components/shadow-resets-aG-rgyNQ.js +61 -0
  355. package/dist/components/shell-C61GCsJA.js +223 -0
  356. package/dist/components/status-and-feedback/badge/badge.d.ts +23 -11
  357. package/dist/components/status-and-feedback/badge/badge.d.ts.map +1 -1
  358. package/dist/components/status-and-feedback/badge/badge.js +32 -14
  359. package/dist/components/status-and-feedback/badge/badge.js.map +1 -1
  360. package/dist/components/status-and-feedback/badge/badge.styles.d.ts.map +1 -1
  361. package/dist/components/status-and-feedback/badge/badge.styles.js +59 -2
  362. package/dist/components/status-and-feedback/badge/badge.styles.js.map +1 -1
  363. package/dist/components/status-and-feedback/badge/badge.template.d.ts.map +1 -1
  364. package/dist/components/status-and-feedback/badge/badge.template.js +6 -1
  365. package/dist/components/status-and-feedback/badge/badge.template.js.map +1 -1
  366. package/dist/components/status-and-feedback/banner/banner.styles.d.ts.map +1 -1
  367. package/dist/components/status-and-feedback/banner/banner.styles.js +6 -0
  368. package/dist/components/status-and-feedback/banner/banner.styles.js.map +1 -1
  369. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.d.ts +2 -0
  370. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.d.ts.map +1 -1
  371. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js +14 -1
  372. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js.map +1 -1
  373. package/dist/components/status-and-feedback/notification/notification-region.d.ts +6 -0
  374. package/dist/components/status-and-feedback/notification/notification-region.d.ts.map +1 -0
  375. package/dist/components/status-and-feedback/notification/notification-region.js +245 -0
  376. package/dist/components/status-and-feedback/notification/notification-region.js.map +1 -0
  377. package/dist/components/status-and-feedback/notification/notification.d.ts +129 -0
  378. package/dist/components/status-and-feedback/notification/notification.d.ts.map +1 -0
  379. package/dist/components/status-and-feedback/notification/notification.i18n.d.ts +6 -0
  380. package/dist/components/status-and-feedback/notification/notification.i18n.d.ts.map +1 -0
  381. package/dist/components/status-and-feedback/notification/notification.i18n.js +5 -0
  382. package/dist/components/status-and-feedback/notification/notification.i18n.js.map +1 -0
  383. package/dist/components/status-and-feedback/notification/notification.js +269 -0
  384. package/dist/components/status-and-feedback/notification/notification.js.map +1 -0
  385. package/dist/components/status-and-feedback/notification/notification.styles.d.ts +2 -0
  386. package/dist/components/status-and-feedback/notification/notification.styles.d.ts.map +1 -0
  387. package/dist/components/status-and-feedback/notification/notification.styles.js +177 -0
  388. package/dist/components/status-and-feedback/notification/notification.styles.js.map +1 -0
  389. package/dist/components/status-and-feedback/notification/notification.template.d.ts +4 -0
  390. package/dist/components/status-and-feedback/notification/notification.template.d.ts.map +1 -0
  391. package/dist/components/status-and-feedback/notification/notification.template.js +40 -0
  392. package/dist/components/status-and-feedback/notification/notification.template.js.map +1 -0
  393. package/dist/components/status-and-feedback/progress-bar/progress-bar.styles.d.ts.map +1 -1
  394. package/dist/components/status-and-feedback/progress-bar/progress-bar.styles.js +1 -0
  395. package/dist/components/status-and-feedback/progress-bar/progress-bar.styles.js.map +1 -1
  396. package/dist/components/status-and-feedback/step-indicator/step-indicator.d.ts +30 -30
  397. package/dist/components/status-and-feedback/step-indicator/step-indicator.d.ts.map +1 -1
  398. package/dist/components/status-and-feedback/step-indicator/step-indicator.js +33 -30
  399. package/dist/components/status-and-feedback/step-indicator/step-indicator.js.map +1 -1
  400. package/dist/components/toml-C2HBbPgG.js +59 -0
  401. package/dist/components/visibility-mixin-GxbwkBb1.js +104 -0
  402. package/dist/components/with-translations-DzAdFTK8.js +48 -0
  403. package/dist/css/variables.css +24 -0
  404. package/dist/nldd.min.js +10763 -9942
  405. package/dist/types/vue.d.ts +270 -153
  406. package/dist/utilities/implicit-submission.d.ts +31 -0
  407. package/dist/utilities/implicit-submission.d.ts.map +1 -0
  408. package/dist/utilities/implicit-submission.js +65 -0
  409. package/dist/utilities/implicit-submission.js.map +1 -0
  410. package/dist/utilities/open-when-rendered.d.ts +21 -0
  411. package/dist/utilities/open-when-rendered.d.ts.map +1 -0
  412. package/dist/utilities/open-when-rendered.js +30 -0
  413. package/dist/utilities/open-when-rendered.js.map +1 -0
  414. package/dist/utilities/owned-attribute.d.ts +19 -0
  415. package/dist/utilities/owned-attribute.d.ts.map +1 -0
  416. package/dist/utilities/owned-attribute.js +32 -0
  417. package/dist/utilities/owned-attribute.js.map +1 -0
  418. package/dist/utilities/reflect-non-default.d.ts +3 -3
  419. package/dist/utilities/reflect-non-default.d.ts.map +1 -1
  420. package/dist/utilities/reflect-non-default.js +7 -4
  421. package/dist/utilities/reflect-non-default.js.map +1 -1
  422. package/dist/utilities/visibility-mixin.d.ts +5 -0
  423. package/dist/utilities/visibility-mixin.d.ts.map +1 -1
  424. package/dist/utilities/visibility-mixin.js +22 -0
  425. package/dist/utilities/visibility-mixin.js.map +1 -1
  426. package/package.json +34 -23
  427. package/dist/components/content/byline/byline.d.ts +0 -73
  428. package/dist/components/content/byline/byline.d.ts.map +0 -1
  429. package/dist/components/content/byline/byline.js +0 -125
  430. package/dist/components/content/byline/byline.js.map +0 -1
  431. package/dist/components/content/byline/byline.styles.d.ts +0 -2
  432. package/dist/components/content/byline/byline.styles.d.ts.map +0 -1
  433. package/dist/components/content/byline/byline.styles.js.map +0 -1
  434. package/dist/components/content/byline/byline.template.d.ts +0 -3
  435. package/dist/components/content/byline/byline.template.d.ts.map +0 -1
  436. package/dist/components/content/byline/byline.template.js.map +0 -1
  437. package/dist/components/gherkin-DhZlEZiy.js +0 -115
  438. package/dist/components/index--8_4HvE9.js +0 -688
  439. package/dist/components/index-BMeSmtdw.js +0 -384
  440. package/dist/components/index-Bonuul3m.js +0 -73466
  441. package/dist/components/index-CdOU-HVN.js +0 -81
  442. package/dist/components/index-CqhFJR7l.js +0 -703
  443. package/dist/components/index-CwmDMN6X.js +0 -177
  444. package/dist/components/index-yX0V7C44.js +0 -405
  445. package/dist/components/shell-BlsXDxCn.js +0 -222
  446. package/dist/components/toml-BOuWGMcf.js +0 -76
@@ -0,0 +1,1676 @@
1
+ import { t as inheritedTextReset } from "./shadow-resets-aG-rgyNQ.js";
2
+ import { t as __decorate } from "./decorate-BKn10QQi.js";
3
+ import { t as withTranslations } from "./with-translations-DzAdFTK8.js";
4
+ import { t as reflectNonDefault } from "./reflect-non-default-OLaK60rT.js";
5
+ import "./icon-CIpJq_cf.js";
6
+ import { r as isTouchMode } from "./input-modality-DhTeUxKi.js";
7
+ import { LitElement, css, html, nothing } from "lit";
8
+ import { customElement, property, state } from "lit/decorators.js";
9
+ import { classMap } from "lit/directives/class-map.js";
10
+ import { computePosition, flip, offset, shift } from "@floating-ui/dom";
11
+ //#region src/utilities/popup-anchor-controller.ts
12
+ var OVERLAY_SELECTOR = "nldd-menu, nldd-popover";
13
+ var PopupAnchorController = class {
14
+ constructor(host, options = {}) {
15
+ this._overlay = null;
16
+ this._wasOpenOnPointerdown = false;
17
+ this.handleSlotChange = (event) => {
18
+ const overlay = event.target.assignedElements().find((el) => el.matches(OVERLAY_SELECTOR)) ?? null;
19
+ this.setOverlay(overlay);
20
+ };
21
+ this.handlePointerdown = () => {
22
+ this._wasOpenOnPointerdown = this._overlay?.matches(":popover-open") ?? false;
23
+ };
24
+ this._anchorFor = options.anchorFor ?? (() => host);
25
+ this._onChange = options.onChange;
26
+ }
27
+ /** The slotted overlay, or null when none is slotted. */
28
+ get overlay() {
29
+ return this._overlay;
30
+ }
31
+ /** Adopt an overlay (or none). Releases the previous one first: left
32
+ * anchored, a removed overlay keeps positioning against this control and
33
+ * syncing `expanded` onto it, and the pair can never be collected. */
34
+ setOverlay(overlay) {
35
+ if (overlay === this._overlay) return;
36
+ const previous = this._overlay;
37
+ if (previous) previous.anchorElement = null;
38
+ this._overlay = overlay;
39
+ this.anchor();
40
+ this._onChange?.(overlay, previous);
41
+ }
42
+ /** (Re-)anchor the current overlay. Call once the anchor target exists when
43
+ * it resolves later than the first `slotchange`. */
44
+ anchor() {
45
+ const target = this._anchorFor();
46
+ if (this._overlay && target) this._overlay.anchorElement = target;
47
+ }
48
+ /** Call from the control's click handler. Returns true when the click was
49
+ * consumed (an overlay is slotted, so the control is its invoker and
50
+ * neither submits a form nor navigates); false to fall through. */
51
+ handleClick(event) {
52
+ if (!this._overlay) return false;
53
+ const wasOpen = event.detail > 0 && this._wasOpenOnPointerdown;
54
+ this._wasOpenOnPointerdown = false;
55
+ if (!wasOpen && !this._overlay.matches(":popover-open")) this._overlay.showPopover();
56
+ return true;
57
+ }
58
+ };
59
+ //#endregion
60
+ //#region src/components/status-and-feedback/activity-indicator/activity-indicator.styles.ts
61
+ var activityIndicatorStyles = css`
62
+ :host {
63
+ box-sizing: border-box;
64
+ }
65
+
66
+
67
+ /* # Host */
68
+
69
+ :host {
70
+ --_circle-size: var(--primitives-space-32);
71
+ --_color: var(--context-content-color, currentColor);
72
+ --_track-opacity: 0.25;
73
+ --_stroke-width: 2;
74
+ --_rotation-duration: 0.8s;
75
+ --_fade-duration: var(--primitives-transition-duration-slow);
76
+ --_fade-easing: ease-out;
77
+ --_pulse-duration: 2s;
78
+ --_pulse-easing: ease-in-out;
79
+ --_max-width: var(--primitives-area-240);
80
+ --_gap: var(--primitives-space-4);
81
+ --_text-font: var(--primitives-font-body-sm-regular-flat);
82
+ --_backdrop-blur: 3px;
83
+ --_overlay-panel-padding: var(--primitives-space-12);
84
+ --_overlay-panel-corner-radius: var(--primitives-corner-radius-md);
85
+
86
+ ${inheritedTextReset}
87
+ box-sizing: border-box;
88
+ display: flex;
89
+ flex-grow: 1;
90
+ flex-shrink: 1;
91
+ flex-basis: auto;
92
+ width: 100%;
93
+ height: 100%;
94
+ align-items: center;
95
+ justify-content: center;
96
+ }
97
+
98
+ :host([hidden]) {
99
+ display: none;
100
+ }
101
+
102
+ /* Overlay mode (content in the default slot): the host wraps the content and
103
+ is the containing block for the absolutely-positioned indicator + backdrop,
104
+ so it sizes to the content instead of filling its parent. */
105
+ :host([has-content]) {
106
+ display: block;
107
+ position: relative;
108
+ height: auto;
109
+ }
110
+
111
+
112
+ /* ## Sizes (icon scale) */
113
+
114
+ :host([size="16"]) { --_circle-size: var(--primitives-space-16); }
115
+ :host([size="20"]) { --_circle-size: var(--primitives-space-20); }
116
+ :host([size="24"]) { --_circle-size: var(--primitives-space-24); }
117
+ :host([size="28"]) { --_circle-size: var(--primitives-space-28); }
118
+ :host([size="40"]) { --_circle-size: var(--primitives-space-40); }
119
+ :host([size="44"]) { --_circle-size: var(--primitives-space-44); }
120
+ :host([size="48"]) { --_circle-size: var(--primitives-space-48); }
121
+ :host([size="56"]) { --_circle-size: var(--primitives-space-56); }
122
+ :host([size="64"]) { --_circle-size: var(--primitives-space-64); }
123
+ :host([size="80"]) { --_circle-size: var(--primitives-space-80); }
124
+ :host([size="96"]) { --_circle-size: var(--primitives-space-96); }
125
+
126
+
127
+ /* # Block
128
+ Stacks the default circle + label as a centered column. width:100% +
129
+ max-width gives a slotted progress-bar a width to fill; the fixed-size
130
+ circle and the label stay centered via align-items. */
131
+
132
+ .activity-indicator {
133
+ /* position:relative so it paints above the absolutely-positioned backdrop
134
+ (both are z-index:auto; the backdrop comes first in the DOM). Hidden by
135
+ default; the loading host attribute fades it (and the backdrop) in and
136
+ out — opacity + display via transition-behavior: allow-discrete, with a
137
+ starting-style for the entry. */
138
+ position: relative;
139
+ display: none;
140
+ opacity: 0;
141
+ pointer-events: none;
142
+ width: 100%;
143
+ max-width: var(--_max-width);
144
+ flex-direction: column;
145
+ align-items: center;
146
+ gap: var(--_gap);
147
+ transition-property: opacity, display;
148
+ transition-duration: var(--_fade-duration);
149
+ transition-timing-function: var(--_fade-easing);
150
+ transition-behavior: allow-discrete;
151
+ }
152
+
153
+ :host([loading]) .activity-indicator {
154
+ display: flex;
155
+ opacity: 1;
156
+ }
157
+
158
+ @starting-style {
159
+ :host([loading]) .activity-indicator {
160
+ opacity: 0;
161
+ }
162
+ }
163
+
164
+ /* Overlay mode: the wrapped content flows normally; the indicator + backdrop
165
+ sit on top as absolute layers that fill the host. */
166
+ .activity-indicator__content {
167
+ display: block;
168
+ }
169
+
170
+ /* Overlay mode: the indicator + label sit on a small rounded base-surface
171
+ panel that hugs them with padding (not the full component width) so they
172
+ keep contrast over the dimmed content, and read in the content color
173
+ instead of inheriting currentColor. */
174
+ :host([has-content]) .activity-indicator {
175
+ box-sizing: border-box;
176
+ position: absolute;
177
+ top: 50%;
178
+ left: 50%;
179
+ border-radius: var(--_overlay-panel-corner-radius);
180
+ background-color: var(--semantics-surfaces-base-background-color);
181
+ width: max-content;
182
+ max-width: calc(100% - var(--primitives-space-32));
183
+ padding: var(--_overlay-panel-padding);
184
+ color: var(--semantics-content-color);
185
+ transform: translate(-50%, -50%);
186
+ }
187
+
188
+ /* Dimming layer (overlay mode, on by default; opt out with no-backdrop): the
189
+ context parent background color — fallback the base surface — at one minus
190
+ the disabled opacity, so the content underneath reads as inactive while
191
+ loading. Fades in and out with the indicator via the loading attribute. */
192
+ .activity-indicator__backdrop {
193
+ position: absolute;
194
+ inset: 0;
195
+ display: none;
196
+ opacity: 0;
197
+ /* Frosted dim: the parent surface — fallback base surface — as a
198
+ translucent fill at one minus the disabled opacity (a translucent
199
+ color, not element opacity, which would hide the blur), plus a blur so
200
+ the content behind reads as inactive. backdrop-filter degrades
201
+ gracefully where unsupported, leaving just the translucent fill. */
202
+ background-color: color-mix(in oklab, var(--context-parent-background-color, var(--semantics-surfaces-base-background-color)) calc((1 - var(--primitives-opacity-disabled)) * 100%), transparent);
203
+ -webkit-backdrop-filter: blur(var(--_backdrop-blur));
204
+ backdrop-filter: blur(var(--_backdrop-blur));
205
+ pointer-events: none;
206
+ transition-property: opacity, display;
207
+ transition-duration: var(--_fade-duration);
208
+ transition-timing-function: var(--_fade-easing);
209
+ transition-behavior: allow-discrete;
210
+ }
211
+
212
+ :host([loading]) .activity-indicator__backdrop {
213
+ display: block;
214
+ opacity: 1;
215
+ }
216
+
217
+ @starting-style {
218
+ :host([loading]) .activity-indicator__backdrop {
219
+ opacity: 0;
220
+ }
221
+ }
222
+
223
+ /* display:contents so the default circle + label (or a slotted override)
224
+ are direct flex items of the block. */
225
+ slot {
226
+ display: contents;
227
+ }
228
+
229
+
230
+ /* # Elements */
231
+
232
+ /* The whole SVG (stroke included) scales with the size, like an icon. */
233
+ .activity-indicator__circle {
234
+ display: block;
235
+ width: var(--_circle-size);
236
+ height: var(--_circle-size);
237
+ }
238
+
239
+ .activity-indicator__track {
240
+ opacity: var(--_track-opacity);
241
+ stroke: var(--_color);
242
+ stroke-width: var(--_stroke-width);
243
+ }
244
+
245
+ /* Rotate only the arc inside the SVG (around the view-box center via
246
+ transform-origin) rather than the whole <svg> element — rotating the
247
+ element visibly wobbles when it sits at a sub-pixel position (next to a
248
+ label, or overlaid on a button). Mirrors nldd-progress-circle. */
249
+ .activity-indicator__indicator {
250
+ stroke: var(--_color);
251
+ stroke-width: var(--_stroke-width);
252
+ stroke-linecap: round;
253
+ stroke-dasharray: 25 100;
254
+ transform-origin: 50% 50%;
255
+ animation: activity-indicator-rotate var(--_rotation-duration) linear infinite;
256
+ }
257
+
258
+ @keyframes activity-indicator-rotate {
259
+ to { transform: rotate(360deg); }
260
+ }
261
+
262
+ .activity-indicator__text {
263
+ color: currentColor;
264
+ font: var(--_text-font);
265
+ text-align: center;
266
+ }
267
+
268
+ /* show-text off (default): the label still renders as the announced
269
+ content of the role="status" host, but is visually hidden.
270
+ Standard visually-hidden recipe. */
271
+ .activity-indicator__text--visually-hidden {
272
+ position: absolute;
273
+ width: 1px;
274
+ height: 1px;
275
+ overflow: hidden;
276
+ clip-path: inset(50%);
277
+ white-space: nowrap;
278
+ }
279
+
280
+
281
+ /* # Reduced Motion */
282
+
283
+ @media (prefers-reduced-motion: reduce) {
284
+ .activity-indicator,
285
+ .activity-indicator__backdrop {
286
+ transition: none;
287
+ }
288
+
289
+ .activity-indicator__indicator {
290
+ /* Drop the rotation (vestibular safety); keep the 25 / 100 arc and
291
+ pulse its opacity instead, mirroring nldd-progress-circle. */
292
+ animation: activity-indicator-pulse var(--_pulse-duration) var(--_pulse-easing) infinite;
293
+ }
294
+
295
+ @keyframes activity-indicator-pulse {
296
+ 0%, 100% { opacity: 0.3; }
297
+ 50% { opacity: 0.7; }
298
+ }
299
+ }
300
+ `;
301
+ //#endregion
302
+ //#region src/components/status-and-feedback/activity-indicator/activity-indicator.template.ts
303
+ function activityIndicatorTemplate(component) {
304
+ const disableContent = component._visible && !component.complete && component._hasContent;
305
+ const renderBackdrop = component._hasContent && !component.noBackdrop;
306
+ const text = component._accessibleName;
307
+ return html`
308
+ <div class="activity-indicator__content"
309
+ ?inert=${disableContent}
310
+ aria-busy=${disableContent ? "true" : "false"}
311
+ >
312
+ <slot @slotchange=${component._onContentSlotChange}></slot>
313
+ </div>
314
+ ${renderBackdrop ? html`<div class="activity-indicator__backdrop" aria-hidden="true"></div>` : nothing}
315
+ <div class="activity-indicator">
316
+ <slot name="indicator">
317
+ <svg class="activity-indicator__circle"
318
+ viewBox="0 0 24 24"
319
+ fill="none"
320
+ aria-hidden="true"
321
+ focusable="false"
322
+ >
323
+ <circle class="activity-indicator__track"
324
+ cx="12"
325
+ cy="12"
326
+ r="9"
327
+ ></circle>
328
+ <circle class="activity-indicator__indicator"
329
+ cx="12"
330
+ cy="12"
331
+ r="9"
332
+ pathLength="100"
333
+ ></circle>
334
+ </svg>
335
+ <span class=${classMap({
336
+ "activity-indicator__text": true,
337
+ "activity-indicator__text--visually-hidden": !component.showText
338
+ })}>${text}</span>
339
+ </slot>
340
+ </div>
341
+ `;
342
+ }
343
+ //#endregion
344
+ //#region src/components/status-and-feedback/activity-indicator/activity-indicator.i18n.ts
345
+ var nlddActivityIndicatorTranslations = { "components.activity-indicator.loading-label": "Laden" };
346
+ //#endregion
347
+ //#region src/components/status-and-feedback/activity-indicator/activity-indicator.ts
348
+ /**
349
+ * Nederlandse Digitale Dienst Activity Indicator Component (Lit + TypeScript)
350
+ *
351
+ * Layout placeholder that fills its parent and centers an indeterminate
352
+ * activity indicator. By default the indicator is held back for 1000ms so
353
+ * brief loading states don't flash; once the delay passes it fades in. Set
354
+ * `timing="instant"` to skip the delay (the fade-in still plays) — this is
355
+ * what embedding components such as `nldd-button` use for their loading state.
356
+ *
357
+ * The default indicator is a simple icon-sized circle that follows the shared
358
+ * `--context-content-color` channel (set by list-item / table / menu on their
359
+ * content), falling back to `currentColor` wherever that channel is unset
360
+ * (buttons, rich-text, standalone) — so a spinner inside a cell tracks the
361
+ * row's state-aware content color, while embedders relying on currentColor are
362
+ * unaffected. An optional label sits below (hidden unless `show-text` is set).
363
+ * Drop a
364
+ * `<nldd-progress-circle>`, `<nldd-progress-bar>` or any element in the
365
+ * `indicator` slot to override it.
366
+ *
367
+ * Icon alignment: the visible ring already sits at 5/6 of its box (the SVG's
368
+ * r=9 plus a 2-unit stroke in a 24 view-box, the same optical inset a filled
369
+ * icon glyph has), so a standalone spinner lines up with an icon or an
370
+ * `icon-aligned` `nldd-avatar` on the same grid — no extra option needed
371
+ * (unlike `nldd-avatar`, which fills edge-to-edge and opts in via
372
+ * `icon-aligned`).
373
+ *
374
+ * Overlay mode: put content in the default slot and the indicator wraps it — it
375
+ * becomes a `position: relative` container, renders the spinner over a dimming
376
+ * backdrop (opt out with `no-backdrop`), and makes the content `inert` so its
377
+ * controls can't be focused or clicked. Toggle loading with `complete`
378
+ * (`?complete=${!isLoading}`). With no slotted content it stays the standalone
379
+ * placeholder described above.
380
+ *
381
+ * Reconnect behavior: every `connectedCallback` resets the timer and hides
382
+ * the indicator again. If a consumer toggles the element via a conditional
383
+ * render (remove + re-insert) the indicator disappears and re-fades after
384
+ * another delay. Keep the element mounted and toggle visibility / `hidden`
385
+ * instead if you want the timer to run only once.
386
+ *
387
+ * Accessibility: while connected and not `complete` the host is a polite live
388
+ * region (`role="status"`). The label (`text`, or the translated "Laden"
389
+ * fallback) always renders as the region's content — visually hidden when
390
+ * `show-text` is off (the default) — so assistive tech announces the loading
391
+ * state when the indicator appears. Set `complete` (or unmount) to clear it.
392
+ *
393
+ * @element nldd-activity-indicator
394
+ *
395
+ * @attr {string} size - Circle diameter on the icon scale: 16,20,24,28,32,40,44,48,56,64,80,96 (default '32')
396
+ * @attr {boolean} show-text - Show the label under the indicator (default false; the label still feeds the accessible name)
397
+ * @attr {string} text - Label text. Falls back to the translated "Laden" when unset.
398
+ * @attr {'default'|'instant'} timing - 'default' waits 1000ms before showing (anti-flash); 'instant' shows immediately (the fade-in still plays). Default 'default'.
399
+ * @attr {boolean} complete - Mark the loader as finished while keeping the element mounted; clears aria-busy and hides the indicator.
400
+ * @attr {boolean} no-backdrop - Overlay mode dims and blurs the wrapped content with a frosted backdrop by default; set this to show only the indicator panel without dimming. No effect in standalone mode.
401
+ * @attr {object} translations - Override translation keys; unset keys fall back to Dutch
402
+ *
403
+ * @slot - Content to wrap (overlay mode); made inert while loading. Leave empty
404
+ * for the standalone placeholder.
405
+ * @slot indicator - Optional custom indicator; overrides the default circle (and
406
+ * its visually-hidden label). Consumers replacing it supply their own indicator
407
+ * semantics; the host's role="status" still marks the loading region.
408
+ *
409
+ * @migration The custom-indicator override moved from the default slot to the
410
+ * `indicator` slot, since the default slot now holds wrapped content:
411
+ * `<nldd-progress-bar slot="indicator">`.
412
+ */
413
+ var _NLDDActivityIndicator;
414
+ /** Delay before the indicator fades in. Brief loading states finish within
415
+ * this window and the indicator is never shown — avoids a jarring flash. */
416
+ var DELAY_MS = 1e3;
417
+ var NLDDActivityIndicator = (_NLDDActivityIndicator = class NLDDActivityIndicator extends LitElement {
418
+ constructor(..._args) {
419
+ super(..._args);
420
+ this.size = "32";
421
+ this.showText = false;
422
+ this.text = "";
423
+ this.timing = "default";
424
+ this.complete = false;
425
+ this.noBackdrop = false;
426
+ this.translations = {};
427
+ this._visible = false;
428
+ this._hasContent = false;
429
+ this._onContentSlotChange = (e) => {
430
+ const slot = e.target;
431
+ this._hasContent = slot.assignedElements().length > 0;
432
+ };
433
+ }
434
+ _t(key) {
435
+ return this.translations[key] ?? nlddActivityIndicatorTranslations[key];
436
+ }
437
+ /** Accessible name announced while loading. */
438
+ get _accessibleName() {
439
+ return this.text || this._t("components.activity-indicator.loading-label");
440
+ }
441
+ connectedCallback() {
442
+ super.connectedCallback();
443
+ this._syncAria();
444
+ this._visible = this.timing === "instant";
445
+ if (!this._visible && !this.complete) this._scheduleDelay();
446
+ }
447
+ willUpdate(changed) {
448
+ if (changed.has("complete")) this._syncAria();
449
+ if (changed.has("timing")) {
450
+ this._clearDelay();
451
+ if (this.timing === "instant") this._visible = true;
452
+ else if (!this._visible && !this.complete) this._scheduleDelay();
453
+ }
454
+ }
455
+ disconnectedCallback() {
456
+ super.disconnectedCallback();
457
+ this._clearDelay();
458
+ }
459
+ _clearDelay() {
460
+ if (this._delayTimeout) {
461
+ clearTimeout(this._delayTimeout);
462
+ this._delayTimeout = void 0;
463
+ }
464
+ }
465
+ _scheduleDelay() {
466
+ this._delayTimeout = setTimeout(() => {
467
+ this._visible = true;
468
+ this._delayTimeout = void 0;
469
+ }, DELAY_MS);
470
+ }
471
+ /** A polite live region (role="status") while loading; cleared when
472
+ * complete. The announced text is the visually-hidden label rendered by
473
+ * the template — not an aria-label, and without aria-busy, since a busy
474
+ * live region would defer the very announcement we want. */
475
+ _syncAria() {
476
+ if (this.complete) this.removeAttribute("role");
477
+ else this.setAttribute("role", "status");
478
+ }
479
+ updated() {
480
+ this.toggleAttribute("loading", this._visible && !this.complete);
481
+ this.toggleAttribute("has-content", this._hasContent);
482
+ }
483
+ render() {
484
+ return activityIndicatorTemplate(this);
485
+ }
486
+ }, _NLDDActivityIndicator.styles = activityIndicatorStyles, _NLDDActivityIndicator);
487
+ __decorate([property({
488
+ reflect: true,
489
+ converter: reflectNonDefault("32")
490
+ })], NLDDActivityIndicator.prototype, "size", void 0);
491
+ __decorate([property({
492
+ type: Boolean,
493
+ reflect: true,
494
+ attribute: "show-text"
495
+ })], NLDDActivityIndicator.prototype, "showText", void 0);
496
+ __decorate([property({
497
+ reflect: true,
498
+ converter: reflectNonDefault("")
499
+ })], NLDDActivityIndicator.prototype, "text", void 0);
500
+ __decorate([property({
501
+ reflect: true,
502
+ converter: reflectNonDefault("default")
503
+ })], NLDDActivityIndicator.prototype, "timing", void 0);
504
+ __decorate([property({
505
+ type: Boolean,
506
+ reflect: true
507
+ })], NLDDActivityIndicator.prototype, "complete", void 0);
508
+ __decorate([property({
509
+ type: Boolean,
510
+ reflect: true,
511
+ attribute: "no-backdrop"
512
+ })], NLDDActivityIndicator.prototype, "noBackdrop", void 0);
513
+ __decorate([property({ type: Object })], NLDDActivityIndicator.prototype, "translations", void 0);
514
+ __decorate([state()], NLDDActivityIndicator.prototype, "_visible", void 0);
515
+ __decorate([state()], NLDDActivityIndicator.prototype, "_hasContent", void 0);
516
+ NLDDActivityIndicator = __decorate([customElement("nldd-activity-indicator")], NLDDActivityIndicator);
517
+ //#endregion
518
+ //#region src/components/actions/icon-button/icon-button.styles.ts
519
+ var iconButtonStyles = css`
520
+ :host {
521
+ box-sizing: border-box;
522
+ }
523
+
524
+
525
+ /* # Host */
526
+
527
+ :host {
528
+ --_corner-radius: var(--semantics-controls-md-corner-radius);
529
+ --_width: auto;
530
+ --_min-size: var(--semantics-controls-md-min-size);
531
+ --_block-padding: var(--semantics-buttons-md-is-icon-only-inline-padding);
532
+ --_inline-padding: var(--semantics-buttons-md-is-icon-only-inline-padding);
533
+ --_icon-size: var(--semantics-buttons-md-is-icon-only-icon-size);
534
+ --_disclosure-icon-margin-right: calc(var(--primitives-space-2) * -1);
535
+ --_disclosure-icon-size: var(--primitives-space-20);
536
+ --_text-display: none;
537
+ --_text-font: var(--primitives-font-body-xxs-medium-flat);
538
+ --_background-color: var(--semantics-buttons-neutral-tinted-background-color);
539
+ --_primary-content-color: var(--semantics-buttons-neutral-tinted-content-color);
540
+ --_highlight-border-color: var(--semantics-buttons-neutral-tinted-highlight-border-color);
541
+ --_is-hovered-background-color: var(--semantics-buttons-neutral-tinted-is-hovered-background-color);
542
+ --_is-hovered-primary-content-color: var(--semantics-buttons-neutral-tinted-is-hovered-content-color);
543
+ --_is-hovered-highlight-border-color: var(--semantics-buttons-neutral-tinted-is-hovered-highlight-border-color);
544
+ --_is-active-background-color: var(--semantics-buttons-neutral-tinted-is-active-background-color);
545
+ --_is-active-primary-content-color: var(--semantics-buttons-neutral-tinted-is-active-content-color);
546
+ --_is-active-highlight-border-color: var(--semantics-buttons-neutral-tinted-is-active-highlight-border-color);
547
+
548
+ ${inheritedTextReset}
549
+ /* inline-flex, not inline-block: a block container puts the control on a
550
+ line, and the strut's descender then grows the host with the inherited
551
+ line-height, so the same button is taller in body text than in a form. */
552
+ display: inline-flex;
553
+ position: relative;
554
+ max-width: 100%;
555
+ -webkit-user-select: none;
556
+ user-select: none;
557
+ -webkit-tap-highlight-color: transparent;
558
+ }
559
+
560
+ :host([size="xs"]) {
561
+ --_corner-radius: var(--semantics-controls-xs-corner-radius);
562
+ --_min-size: var(--semantics-controls-xs-min-size);
563
+ --_block-padding: var(--semantics-buttons-xs-is-icon-only-inline-padding);
564
+ --_inline-padding: var(--semantics-buttons-xs-is-icon-only-inline-padding);
565
+ --_icon-size: var(--semantics-buttons-xs-is-icon-only-icon-size);
566
+ --_disclosure-icon-margin-right: 0;
567
+ --_disclosure-icon-size: var(--primitives-space-16);
568
+ }
569
+
570
+ :host([size="sm"]) {
571
+ --_corner-radius: var(--semantics-controls-sm-corner-radius);
572
+ --_min-size: var(--semantics-controls-sm-min-size);
573
+ --_block-padding: var(--semantics-buttons-sm-is-icon-only-inline-padding);
574
+ --_inline-padding: var(--semantics-buttons-sm-is-icon-only-inline-padding);
575
+ --_icon-size: var(--semantics-buttons-sm-is-icon-only-icon-size);
576
+ }
577
+
578
+ :host([size="lg"]) {
579
+ --_corner-radius: var(--semantics-controls-lg-corner-radius);
580
+ --_min-size: var(--semantics-controls-lg-min-size);
581
+ --_block-padding: var(--primitives-space-8);
582
+ --_inline-padding: var(--primitives-space-8);
583
+ --_text-display: block;
584
+ }
585
+
586
+ :host([size="lg"][hide-lg-text]) {
587
+ --_block-padding: var(--semantics-buttons-lg-is-icon-only-inline-padding);
588
+ --_inline-padding: var(--semantics-buttons-lg-is-icon-only-inline-padding);
589
+ --_icon-size: var(--semantics-buttons-lg-is-icon-only-icon-size);
590
+ --_text-display: none;
591
+ }
592
+
593
+ :host([variant="neutral-base"]) {
594
+ --_background-color: var(--semantics-buttons-neutral-base-background-color);
595
+ --_primary-content-color: var(--semantics-buttons-neutral-base-content-color);
596
+ --_highlight-border-color: var(--semantics-buttons-neutral-base-highlight-border-color);
597
+ --_is-hovered-background-color: var(--semantics-buttons-neutral-base-is-hovered-background-color);
598
+ --_is-hovered-primary-content-color: var(--semantics-buttons-neutral-base-is-hovered-content-color);
599
+ --_is-hovered-highlight-border-color: var(--semantics-buttons-neutral-base-is-hovered-highlight-border-color);
600
+ --_is-active-background-color: var(--semantics-buttons-neutral-base-is-active-background-color);
601
+ --_is-active-primary-content-color: var(--semantics-buttons-neutral-base-is-active-content-color);
602
+ --_is-active-highlight-border-color: var(--semantics-buttons-neutral-base-is-active-highlight-border-color);
603
+ }
604
+
605
+ :host([variant="neutral-transparent"]) {
606
+ --_background-color: transparent;
607
+ --_primary-content-color: var(--semantics-buttons-neutral-transparent-content-color);
608
+ --_highlight-border-color: transparent;
609
+ --_is-hovered-background-color: transparent;
610
+ --_is-hovered-primary-content-color: var(--semantics-buttons-neutral-transparent-is-hovered-content-color);
611
+ --_is-hovered-highlight-border-color: transparent;
612
+ --_is-active-background-color: transparent;
613
+ --_is-active-primary-content-color: var(--semantics-buttons-neutral-transparent-is-active-content-color);
614
+ --_is-active-highlight-border-color: transparent;
615
+ }
616
+
617
+ :host([variant="accent-filled"]),
618
+ :host([variant="primary"]) {
619
+ --_background-color: var(--semantics-buttons-accent-filled-background-color);
620
+ --_primary-content-color: var(--semantics-buttons-accent-filled-content-color);
621
+ --_highlight-border-color: var(--semantics-buttons-accent-filled-highlight-border-color);
622
+ --_is-hovered-background-color: var(--semantics-buttons-accent-filled-is-hovered-background-color);
623
+ --_is-hovered-primary-content-color: var(--semantics-buttons-accent-filled-is-hovered-content-color);
624
+ --_is-hovered-highlight-border-color: var(--semantics-buttons-accent-filled-is-hovered-highlight-border-color);
625
+ --_is-active-background-color: var(--semantics-buttons-accent-filled-is-active-background-color);
626
+ --_is-active-primary-content-color: var(--semantics-buttons-accent-filled-is-active-content-color);
627
+ --_is-active-highlight-border-color: var(--semantics-buttons-accent-filled-is-active-highlight-border-color);
628
+ }
629
+
630
+ :host([variant="accent-transparent"]) {
631
+ --_background-color: transparent;
632
+ --_primary-content-color: var(--semantics-buttons-accent-transparent-content-color);
633
+ --_highlight-border-color: transparent;
634
+ --_is-hovered-background-color: transparent;
635
+ --_is-hovered-primary-content-color: var(--semantics-buttons-accent-transparent-is-hovered-content-color);
636
+ --_is-hovered-highlight-border-color: transparent;
637
+ --_is-active-background-color: transparent;
638
+ --_is-active-primary-content-color: var(--semantics-buttons-accent-transparent-is-active-content-color);
639
+ --_is-active-highlight-border-color: transparent;
640
+ }
641
+
642
+ :host([variant="critical-tinted"]),
643
+ :host([variant="destructive"]) {
644
+ --_background-color: var(--semantics-buttons-critical-tinted-background-color);
645
+ --_primary-content-color: var(--semantics-buttons-critical-tinted-content-color);
646
+ --_highlight-border-color: var(--semantics-buttons-critical-tinted-highlight-border-color);
647
+ --_is-hovered-background-color: var(--semantics-buttons-critical-tinted-is-hovered-background-color);
648
+ --_is-hovered-primary-content-color: var(--semantics-buttons-critical-tinted-is-hovered-content-color);
649
+ --_is-hovered-highlight-border-color: var(--semantics-buttons-critical-tinted-is-hovered-highlight-border-color);
650
+ --_is-active-background-color: var(--semantics-buttons-critical-tinted-is-active-background-color);
651
+ --_is-active-primary-content-color: var(--semantics-buttons-critical-tinted-is-active-content-color);
652
+ --_is-active-highlight-border-color: var(--semantics-buttons-critical-tinted-is-active-highlight-border-color);
653
+ }
654
+
655
+ :host([variant="critical-transparent"]) {
656
+ --_background-color: transparent;
657
+ --_primary-content-color: var(--semantics-buttons-critical-transparent-content-color);
658
+ --_highlight-border-color: transparent;
659
+ --_is-hovered-background-color: transparent;
660
+ --_is-hovered-primary-content-color: var(--semantics-buttons-critical-transparent-is-hovered-content-color);
661
+ --_is-hovered-highlight-border-color: transparent;
662
+ --_is-active-background-color: transparent;
663
+ --_is-active-primary-content-color: var(--semantics-buttons-critical-transparent-is-active-content-color);
664
+ --_is-active-highlight-border-color: transparent;
665
+ }
666
+
667
+ /* The on-color variants derive from currentColor; see nldd-button for
668
+ the full rationale. The filled label resolves the context var here on
669
+ the host, with the tokens' white/black contrast flip as fallback. */
670
+
671
+ :host([variant="inherit-tinted"]) {
672
+ --_background-color: var(--semantics-buttons-inherit-tinted-background-color);
673
+ --_primary-content-color: var(--semantics-buttons-inherit-tinted-content-color);
674
+ --_highlight-border-color: var(--semantics-buttons-inherit-tinted-highlight-border-color);
675
+ --_is-hovered-background-color: var(--semantics-buttons-inherit-tinted-is-hovered-background-color);
676
+ --_is-hovered-primary-content-color: var(--semantics-buttons-inherit-tinted-is-hovered-content-color);
677
+ --_is-hovered-highlight-border-color: var(--semantics-buttons-inherit-tinted-is-hovered-highlight-border-color);
678
+ --_is-active-background-color: var(--semantics-buttons-inherit-tinted-is-active-background-color);
679
+ --_is-active-primary-content-color: var(--semantics-buttons-inherit-tinted-is-active-content-color);
680
+ --_is-active-highlight-border-color: var(--semantics-buttons-inherit-tinted-is-active-highlight-border-color);
681
+ }
682
+
683
+ :host([variant="inherit-filled"]) {
684
+ --_background-color: var(--semantics-buttons-inherit-filled-background-color);
685
+ --_primary-content-color: var(--context-parent-background-color, var(--semantics-buttons-inherit-filled-content-color));
686
+ --_highlight-border-color: var(--semantics-buttons-inherit-filled-highlight-border-color);
687
+ --_is-hovered-background-color: var(--semantics-buttons-inherit-filled-is-hovered-background-color);
688
+ --_is-hovered-primary-content-color: var(--semantics-buttons-inherit-filled-is-hovered-content-color);
689
+ --_is-hovered-highlight-border-color: var(--semantics-buttons-inherit-filled-is-hovered-highlight-border-color);
690
+ --_is-active-background-color: var(--semantics-buttons-inherit-filled-is-active-background-color);
691
+ --_is-active-primary-content-color: var(--semantics-buttons-inherit-filled-is-active-content-color);
692
+ --_is-active-highlight-border-color: var(--semantics-buttons-inherit-filled-is-active-highlight-border-color);
693
+ }
694
+
695
+ /* For inherit-filled the inner button keeps the inherited on-color:
696
+ its currentColor background and the label's contrast flip resolve
697
+ against it, and would otherwise self-reference the label. The label
698
+ color moves to the content layer instead; see nldd-button. */
699
+ :host([variant="inherit-filled"]) .icon-button {
700
+ color: inherit;
701
+ }
702
+
703
+ :host([variant="inherit-filled"]) .icon-button > * {
704
+ color: var(--_primary-content-color);
705
+ }
706
+
707
+ /* ## Expanded — default (incl. unknown variant) */
708
+
709
+ :host([expanded]) {
710
+ --_background-color: var(--semantics-buttons-neutral-tinted-is-expanded-background-color);
711
+ --_primary-content-color: var(--semantics-buttons-neutral-tinted-is-expanded-content-color);
712
+ --_highlight-border-color: var(--semantics-buttons-neutral-tinted-is-expanded-highlight-border-color);
713
+ --_is-hovered-background-color: var(--semantics-buttons-neutral-tinted-is-expanded-is-hovered-background-color);
714
+ --_is-hovered-primary-content-color: var(--semantics-buttons-neutral-tinted-is-expanded-is-hovered-content-color);
715
+ --_is-hovered-highlight-border-color: var(--semantics-buttons-neutral-tinted-is-expanded-is-hovered-highlight-border-color);
716
+ --_is-active-background-color: var(--semantics-buttons-neutral-tinted-is-expanded-is-active-background-color);
717
+ --_is-active-primary-content-color: var(--semantics-buttons-neutral-tinted-is-expanded-is-active-content-color);
718
+ --_is-active-highlight-border-color: var(--semantics-buttons-neutral-tinted-is-expanded-is-active-highlight-border-color);
719
+ }
720
+
721
+ :host([expanded][variant="neutral-base"]) {
722
+ --_background-color: var(--semantics-buttons-neutral-base-is-expanded-background-color);
723
+ --_primary-content-color: var(--semantics-buttons-neutral-base-is-expanded-content-color);
724
+ --_highlight-border-color: var(--semantics-buttons-neutral-base-is-expanded-highlight-border-color);
725
+ --_is-hovered-background-color: var(--semantics-buttons-neutral-base-is-expanded-is-hovered-background-color);
726
+ --_is-hovered-primary-content-color: var(--semantics-buttons-neutral-base-is-expanded-is-hovered-content-color);
727
+ --_is-hovered-highlight-border-color: var(--semantics-buttons-neutral-base-is-expanded-is-hovered-highlight-border-color);
728
+ --_is-active-background-color: var(--semantics-buttons-neutral-base-is-expanded-is-active-background-color);
729
+ --_is-active-primary-content-color: var(--semantics-buttons-neutral-base-is-expanded-is-active-content-color);
730
+ --_is-active-highlight-border-color: var(--semantics-buttons-neutral-base-is-expanded-is-active-highlight-border-color);
731
+ }
732
+
733
+ :host([expanded][variant="neutral-transparent"]) {
734
+ --_background-color: transparent;
735
+ --_primary-content-color: var(--semantics-buttons-neutral-transparent-content-color);
736
+ --_highlight-border-color: transparent;
737
+ --_is-hovered-background-color: transparent;
738
+ --_is-hovered-primary-content-color: var(--semantics-buttons-neutral-transparent-is-hovered-content-color);
739
+ --_is-hovered-highlight-border-color: transparent;
740
+ --_is-active-background-color: transparent;
741
+ --_is-active-primary-content-color: var(--semantics-buttons-neutral-transparent-is-active-content-color);
742
+ --_is-active-highlight-border-color: transparent;
743
+ }
744
+
745
+ :host([expanded][variant="accent-filled"]),
746
+ :host([expanded][variant="primary"]) {
747
+ --_background-color: var(--semantics-buttons-accent-filled-is-expanded-background-color);
748
+ --_primary-content-color: var(--semantics-buttons-accent-filled-is-expanded-content-color);
749
+ --_highlight-border-color: var(--semantics-buttons-accent-filled-is-expanded-highlight-border-color);
750
+ --_is-hovered-background-color: var(--semantics-buttons-accent-filled-is-expanded-is-hovered-background-color);
751
+ --_is-hovered-primary-content-color: var(--semantics-buttons-accent-filled-is-expanded-is-hovered-content-color);
752
+ --_is-hovered-highlight-border-color: var(--semantics-buttons-accent-filled-is-expanded-is-hovered-highlight-border-color);
753
+ --_is-active-background-color: var(--semantics-buttons-accent-filled-is-expanded-is-active-background-color);
754
+ --_is-active-primary-content-color: var(--semantics-buttons-accent-filled-is-expanded-is-active-content-color);
755
+ --_is-active-highlight-border-color: var(--semantics-buttons-accent-filled-is-expanded-is-active-highlight-border-color);
756
+ }
757
+
758
+ :host([expanded][variant="accent-transparent"]) {
759
+ --_background-color: transparent;
760
+ --_primary-content-color: var(--semantics-buttons-accent-transparent-content-color);
761
+ --_highlight-border-color: transparent;
762
+ --_is-hovered-background-color: transparent;
763
+ --_is-hovered-primary-content-color: var(--semantics-buttons-accent-transparent-is-hovered-content-color);
764
+ --_is-hovered-highlight-border-color: transparent;
765
+ --_is-active-background-color: transparent;
766
+ --_is-active-primary-content-color: var(--semantics-buttons-accent-transparent-is-active-content-color);
767
+ --_is-active-highlight-border-color: transparent;
768
+ }
769
+
770
+ :host([expanded][variant="critical-tinted"]),
771
+ :host([expanded][variant="destructive"]) {
772
+ --_background-color: var(--semantics-buttons-critical-tinted-is-expanded-background-color);
773
+ --_primary-content-color: var(--semantics-buttons-critical-tinted-is-expanded-content-color);
774
+ --_highlight-border-color: var(--semantics-buttons-critical-tinted-is-expanded-highlight-border-color);
775
+ --_is-hovered-background-color: var(--semantics-buttons-critical-tinted-is-expanded-is-hovered-background-color);
776
+ --_is-hovered-primary-content-color: var(--semantics-buttons-critical-tinted-is-expanded-is-hovered-content-color);
777
+ --_is-hovered-highlight-border-color: var(--semantics-buttons-critical-tinted-is-expanded-is-hovered-highlight-border-color);
778
+ --_is-active-background-color: var(--semantics-buttons-critical-tinted-is-expanded-is-active-background-color);
779
+ --_is-active-primary-content-color: var(--semantics-buttons-critical-tinted-is-expanded-is-active-content-color);
780
+ --_is-active-highlight-border-color: var(--semantics-buttons-critical-tinted-is-expanded-is-active-highlight-border-color);
781
+ }
782
+
783
+ :host([expanded][variant="critical-transparent"]) {
784
+ --_background-color: transparent;
785
+ --_primary-content-color: var(--semantics-buttons-critical-transparent-content-color);
786
+ --_highlight-border-color: transparent;
787
+ --_is-hovered-background-color: transparent;
788
+ --_is-hovered-primary-content-color: var(--semantics-buttons-critical-transparent-is-hovered-content-color);
789
+ --_is-hovered-highlight-border-color: transparent;
790
+ --_is-active-background-color: transparent;
791
+ --_is-active-primary-content-color: var(--semantics-buttons-critical-transparent-is-active-content-color);
792
+ --_is-active-highlight-border-color: transparent;
793
+ }
794
+
795
+ /* The on-color variants keep their currentColor-derived content; expanded
796
+ only deepens the background. Content is restated (not inherited from the
797
+ resting block) because the default [expanded] block has equal
798
+ specificity and later source order. See nldd-button for the rationale. */
799
+ :host([expanded][variant="inherit-tinted"]) {
800
+ --_background-color: var(--semantics-buttons-inherit-tinted-is-expanded-background-color);
801
+ --_primary-content-color: var(--semantics-buttons-inherit-tinted-is-expanded-content-color);
802
+ --_highlight-border-color: var(--semantics-buttons-inherit-tinted-is-expanded-highlight-border-color);
803
+ --_is-hovered-background-color: var(--semantics-buttons-inherit-tinted-is-expanded-is-hovered-background-color);
804
+ --_is-hovered-primary-content-color: var(--semantics-buttons-inherit-tinted-is-expanded-is-hovered-content-color);
805
+ --_is-hovered-highlight-border-color: var(--semantics-buttons-inherit-tinted-is-expanded-is-hovered-highlight-border-color);
806
+ --_is-active-background-color: var(--semantics-buttons-inherit-tinted-is-expanded-is-active-background-color);
807
+ --_is-active-primary-content-color: var(--semantics-buttons-inherit-tinted-is-expanded-is-active-content-color);
808
+ --_is-active-highlight-border-color: var(--semantics-buttons-inherit-tinted-is-expanded-is-active-highlight-border-color);
809
+ }
810
+
811
+ :host([expanded][variant="inherit-filled"]) {
812
+ --_background-color: var(--semantics-buttons-inherit-filled-is-expanded-background-color);
813
+ --_primary-content-color: var(--context-parent-background-color, var(--semantics-buttons-inherit-filled-is-expanded-content-color));
814
+ --_highlight-border-color: var(--semantics-buttons-inherit-filled-is-expanded-highlight-border-color);
815
+ --_is-hovered-background-color: var(--semantics-buttons-inherit-filled-is-expanded-is-hovered-background-color);
816
+ --_is-hovered-primary-content-color: var(--semantics-buttons-inherit-filled-is-expanded-is-hovered-content-color);
817
+ --_is-hovered-highlight-border-color: var(--semantics-buttons-inherit-filled-is-expanded-is-hovered-highlight-border-color);
818
+ --_is-active-background-color: var(--semantics-buttons-inherit-filled-is-expanded-is-active-background-color);
819
+ --_is-active-primary-content-color: var(--semantics-buttons-inherit-filled-is-expanded-is-active-content-color);
820
+ --_is-active-highlight-border-color: var(--semantics-buttons-inherit-filled-is-expanded-is-active-highlight-border-color);
821
+ }
822
+
823
+ :host([width="full"]) {
824
+ display: block;
825
+ width: 100%;
826
+ flex-grow: 1;
827
+ }
828
+
829
+ :host([hidden]) {
830
+ display: none;
831
+ }
832
+
833
+ :host([disabled]) {
834
+ opacity: var(--primitives-opacity-disabled);
835
+ pointer-events: none;
836
+ }
837
+
838
+ :host([no-highlight-border]),
839
+ :host([no-highlight-border][expanded]) {
840
+ --_highlight-border-color: transparent;
841
+ --_is-hovered-highlight-border-color: transparent;
842
+ --_is-active-highlight-border-color: transparent;
843
+ }
844
+
845
+
846
+ /* # Block */
847
+
848
+ .icon-button {
849
+ box-sizing: border-box;
850
+ display: inline-flex;
851
+ margin: 0;
852
+ border: none;
853
+ border-radius: var(--_corner-radius);
854
+ background: none;
855
+ background-color: var(--_background-color);
856
+ box-shadow: inset 0 0 0 var(--primitives-border-width-thin) var(--_highlight-border-color);
857
+ width: var(--_width);
858
+ min-width: var(--_min-size);
859
+ height: var(--_min-size);
860
+ min-height: var(--_min-size);
861
+ padding: var(--_block-padding) var(--_inline-padding);
862
+ flex-direction: column;
863
+ align-items: center;
864
+ justify-content: center;
865
+ color: var(--_primary-content-color);
866
+ font: inherit;
867
+ text-decoration: none;
868
+ transition:
869
+ background-color var(--primitives-transition-duration-fast) var(--primitives-transition-easing-default),
870
+ color var(--primitives-transition-duration-fast) var(--primitives-transition-easing-default)
871
+ ;
872
+ appearance: none;
873
+ }
874
+
875
+ a.icon-button {
876
+ cursor: var(--semantics-controls-link-cursor);
877
+ }
878
+
879
+ @media (prefers-reduced-motion: reduce) {
880
+ .icon-button,
881
+ .icon-button__icon-area,
882
+ .icon-button__text {
883
+ transition: none;
884
+ }
885
+ }
886
+
887
+ .icon-button:focus-visible {
888
+ outline: var(--semantics-focus-ring-outline);
889
+ outline-offset: var(--semantics-focus-ring-outline-offset);
890
+ box-shadow: var(--semantics-focus-ring-box-shadow), inset 0 0 0 var(--primitives-border-width-thin) var(--_highlight-border-color);
891
+ }
892
+
893
+ .icon-button:focus:not(:focus-visible) {
894
+ outline: none;
895
+ }
896
+
897
+ @media (hover: hover) {
898
+ .icon-button:hover {
899
+ background-color: var(--_is-hovered-background-color);
900
+ color: var(--_is-hovered-primary-content-color);
901
+ --_highlight-border-color: var(--_is-hovered-highlight-border-color);
902
+ }
903
+ }
904
+
905
+ .icon-button:active {
906
+ background-color: var(--_is-active-background-color);
907
+ color: var(--_is-active-primary-content-color);
908
+ --_highlight-border-color: var(--_is-active-highlight-border-color);
909
+ }
910
+
911
+ /* Loading keeps the control focusable (not disabled); activation is blocked in JS. */
912
+ :host([loading]) .icon-button {
913
+ cursor: default;
914
+ }
915
+
916
+
917
+ /* # Elements */
918
+
919
+ .icon-button__icon-area {
920
+ display: inline-flex;
921
+ flex-direction: row;
922
+ align-items: center;
923
+ justify-content: center;
924
+ transition: opacity var(--primitives-transition-duration-slow) var(--primitives-transition-easing-default);
925
+ }
926
+
927
+ /* Loading crossfades the content out (opacity, not visibility, so the control
928
+ keeps its accessible name) while the indicator fades in. The content stays
929
+ laid out, so the control keeps its size. */
930
+ :host([loading]) .icon-button__icon-area {
931
+ opacity: 0;
932
+ }
933
+
934
+ .icon-button__icon {
935
+ display: flex;
936
+ width: var(--_icon-size);
937
+ height: var(--_icon-size);
938
+ flex-shrink: 0;
939
+ align-items: center;
940
+ justify-content: center;
941
+ }
942
+
943
+ .icon-button__disclosure-icon {
944
+ display: flex;
945
+ margin-right: var(--_disclosure-icon-margin-right);
946
+ width: var(--_disclosure-icon-size);
947
+ height: var(--_disclosure-icon-size);
948
+ flex-shrink: 0;
949
+ }
950
+
951
+ .icon-button__text {
952
+ display: var(--_text-display);
953
+ text-align: center;
954
+ color: inherit;
955
+ font: var(--_text-font);
956
+ white-space: nowrap;
957
+ transition: opacity var(--primitives-transition-duration-slow) var(--primitives-transition-easing-default);
958
+ }
959
+
960
+ :host([loading]) .icon-button__text {
961
+ opacity: 0;
962
+ }
963
+
964
+ /* Wrapper overlaid on the control, positioned against the host (which is
965
+ position:relative). It lives outside the <button>/<a> and the tooltip
966
+ wrapper so the indicator's role="status" live region works reliably. The
967
+ activity-indicator inside fills it and centers its circle, which inherits
968
+ the content color via currentColor. */
969
+ .icon-button__activity-indicator {
970
+ position: absolute;
971
+ inset: 0;
972
+ color: var(--_primary-content-color);
973
+ }
974
+ `;
975
+ //#endregion
976
+ //#region src/components/content/tooltip/tooltip.styles.ts
977
+ var tooltipStyles = css`
978
+ :host {
979
+ box-sizing: border-box;
980
+ }
981
+
982
+
983
+ /* # Host */
984
+
985
+ :host {
986
+ --_hide-duration: var(--primitives-transition-duration-fast);
987
+ --_show-duration: var(--primitives-transition-duration-fast);
988
+ --_max-width: var(--primitives-area-280);
989
+ --_z-index: 10000;
990
+ --_show-delay: 700ms;
991
+ --_hide-delay: 50; /* unitless ms, read by JavaScript */
992
+ --_offset: 4; /* px, unitless — read by JS */
993
+ --_shift-padding: 8; /* px, unitless — read by JS */
994
+
995
+ ${inheritedTextReset}
996
+ display: contents;
997
+ }
998
+
999
+ :host([hidden]) {
1000
+ display: none;
1001
+ }
1002
+
1003
+
1004
+ /* # Block */
1005
+
1006
+ .tooltip {
1007
+ position: fixed;
1008
+ opacity: 0;
1009
+ margin: 0;
1010
+ border: none;
1011
+ background: none;
1012
+ padding: 0;
1013
+ transition:
1014
+ opacity var(--_hide-duration) ease,
1015
+ display var(--_hide-duration) allow-discrete,
1016
+ overlay var(--_hide-duration) allow-discrete;
1017
+ }
1018
+
1019
+ .tooltip:popover-open {
1020
+ opacity: 1;
1021
+ transition:
1022
+ opacity var(--_show-duration) ease,
1023
+ display var(--_show-duration) allow-discrete,
1024
+ overlay var(--_show-duration) allow-discrete;
1025
+ }
1026
+
1027
+ /* Stay invisible (no fade) until Floating UI has placed it, so the fade-in plays at
1028
+ the final position rather than flashing at the popover's default spot. The
1029
+ positioned attribute is set once _updatePosition writes the coordinates. */
1030
+ .tooltip:popover-open:not([positioned]) {
1031
+ /* visibility (like nldd-menu/nldd-popover) keeps the not-yet-placed tooltip out
1032
+ of hit-testing at its stale default spot; opacity still drives the fade. */
1033
+ visibility: hidden;
1034
+ opacity: 0;
1035
+ transition: none;
1036
+ }
1037
+
1038
+ @starting-style {
1039
+ .tooltip:popover-open {
1040
+ opacity: 0;
1041
+ }
1042
+ }
1043
+
1044
+ @media (prefers-reduced-motion: reduce) {
1045
+ .tooltip,
1046
+ .tooltip.is-visible,
1047
+ .tooltip.is-focus-visible {
1048
+ transition: none;
1049
+ }
1050
+ }
1051
+
1052
+
1053
+ /* ## Tooltip body */
1054
+
1055
+ .tooltip__body {
1056
+ border-radius: var(--primitives-corner-radius-xs);
1057
+ box-shadow: var(--components-tooltip-box-shadow);
1058
+ background-color: var(--components-tooltip-background-color);
1059
+ width: max-content;
1060
+ max-width: var(--_max-width);
1061
+ padding-block: var(--primitives-space-4);
1062
+ padding-inline: var(--primitives-space-8);
1063
+ color: var(--components-tooltip-content-color);
1064
+ font: var(--primitives-font-body-xs-regular-tight);
1065
+ overflow-wrap: break-word;
1066
+ }
1067
+
1068
+ @media (forced-colors: active) {
1069
+ .tooltip__body {
1070
+ border: 1px solid CanvasText;
1071
+ }
1072
+ }
1073
+ `;
1074
+ //#endregion
1075
+ //#region src/components/content/tooltip/tooltip.template.ts
1076
+ function tooltipTemplate(component) {
1077
+ return html`
1078
+ <slot
1079
+ @mouseenter=${component._handleTriggerEnter}
1080
+ @mouseleave=${component._handleTriggerLeave}
1081
+ @focusin=${component._handleFocusIn}
1082
+ @focusout=${component._handleFocusOut}
1083
+ @click=${component._handleTriggerActivate}
1084
+ ></slot>
1085
+ <div class="tooltip"
1086
+ popover="manual"
1087
+ aria-hidden="true"
1088
+ @mouseenter=${component._handleTooltipEnter}
1089
+ @mouseleave=${component._handleTooltipLeave}
1090
+ >
1091
+ <div class="tooltip__body">${component.text}</div>
1092
+ </div>
1093
+ `;
1094
+ }
1095
+ //#endregion
1096
+ //#region src/components/content/tooltip/tooltip.ts
1097
+ /**
1098
+ * Nederlandse Digitale Dienst Tooltip Component (Lit + TypeScript)
1099
+ *
1100
+ * A wrapper that shows a tooltip on hover or focus of its child element. It
1101
+ * uses `display: contents`, so it does not affect the child's layout.
1102
+ *
1103
+ * @element nldd-tooltip
1104
+ * @attr {string} text - Tooltip text
1105
+ * @attr {boolean} open - Forces the tooltip visible, whatever hover or focus does. Use it for programmatic feedback ("Copied", for instance). Reset it to false to restore the hover behaviour.
1106
+ * @attr {string} placement - Position: 'top' | 'bottom' | 'left' | 'right' (default: 'bottom'; automatically 'top' on touch devices)
1107
+ * @attr {string} timing - When the tooltip appears on hover: 'instant' — right away, without a show delay. 'default' — after the standard show delay (700ms). 'never' — the tooltip is never shown; hover and focus events are ignored, aria-describedby is suppressed, and a tooltip that is already visible disappears. The hide delay and the touch suppression stay in force under every value. A focus trigger is always instant.
1108
+ *
1109
+ * @slot - The element the tooltip is shown for
1110
+ *
1111
+ * @fires nldd-tooltip-dismiss - When a user presses Escape while `open=true`.
1112
+ * The consumer owns the open lifecycle from there (we cannot clear `open`
1113
+ * on our own), so this event is the consumer's chance to set `open` back to
1114
+ * `false`. WCAG 1.4.13: a persistent hover or focus overlay has to be
1115
+ * dismissible without moving focus.
1116
+ *
1117
+ * @note It renders through the native Popover API (`popover="manual"`) in the
1118
+ * top layer. That escapes every ancestor stacking context and `overflow:
1119
+ * hidden` clipping, so no more z-index fights with overlay containers, panes
1120
+ * or transform containers. Positioning still goes through Floating UI with
1121
+ * `strategy: 'fixed'`.
1122
+ *
1123
+ * @note aria-describedby only works when the trigger element is in the light
1124
+ * DOM. With a web component as the trigger (with a shadow DOM of its own) the
1125
+ * link is a known shadow DOM plus ARIA limitation. For nldd-icon-button that
1126
+ * does not matter, because aria-label already sits on the inner button. Tooltip
1127
+ * text on an icon-button must therefore hold nothing that aria-label does not
1128
+ * already say.
1129
+ *
1130
+ * @note With a disabled trigger (a disabled nldd-icon-button, for instance) the
1131
+ * tooltip is not shown, because disabled buttons fire no mouseenter or focusin
1132
+ * and `display: contents` has no layout box of its own to catch events on.
1133
+ */
1134
+ var _NLDDTooltip;
1135
+ var tooltipCounter = 0;
1136
+ var coarsePointerQuery = matchMedia("(pointer: coarse)");
1137
+ var DEFAULT_SHOW_DELAY_MS = 700;
1138
+ var DEFAULT_HIDE_DELAY_MS = 50;
1139
+ var NLDDTooltip = (_NLDDTooltip = class NLDDTooltip extends LitElement {
1140
+ constructor(..._args) {
1141
+ super(..._args);
1142
+ this.text = "";
1143
+ this.open = false;
1144
+ this.placement = "bottom";
1145
+ this.timing = "default";
1146
+ this._visible = false;
1147
+ this._tooltipId = `nldd-tooltip-${++tooltipCounter}`;
1148
+ this._hideTimeout = null;
1149
+ this._showTimeout = null;
1150
+ this._descriptionEl = null;
1151
+ this._currentTrigger = null;
1152
+ this._boundSlotChange = () => this._syncAriaDescribedBy();
1153
+ this._positionVersion = 0;
1154
+ this._handleKeyDown = (e) => {
1155
+ if (e.key !== "Escape" || !this._visible) return;
1156
+ if (this.open) {
1157
+ this.dispatchEvent(new CustomEvent("nldd-tooltip-dismiss", {
1158
+ bubbles: true,
1159
+ composed: true
1160
+ }));
1161
+ e.preventDefault();
1162
+ return;
1163
+ }
1164
+ this._visible = false;
1165
+ };
1166
+ }
1167
+ get _effectivePlacement() {
1168
+ return this.placement;
1169
+ }
1170
+ connectedCallback() {
1171
+ super.connectedCallback();
1172
+ this.addEventListener("keydown", this._handleKeyDown);
1173
+ if (this.hasUpdated) this.shadowRoot?.querySelector("slot")?.addEventListener("slotchange", this._boundSlotChange);
1174
+ }
1175
+ firstUpdated() {
1176
+ this.shadowRoot?.querySelector("slot")?.addEventListener("slotchange", this._boundSlotChange);
1177
+ }
1178
+ updated(changed) {
1179
+ if (changed.has("open")) {
1180
+ if (this.open) {
1181
+ if (this._hideTimeout) {
1182
+ clearTimeout(this._hideTimeout);
1183
+ this._hideTimeout = null;
1184
+ }
1185
+ if (this._showTimeout) {
1186
+ clearTimeout(this._showTimeout);
1187
+ this._showTimeout = null;
1188
+ }
1189
+ this._visible = true;
1190
+ } else if (this._visible) this._visible = false;
1191
+ }
1192
+ if (changed.has("_visible")) {
1193
+ const tooltip = this._getTooltipElement();
1194
+ if (tooltip) {
1195
+ if (this._visible) {
1196
+ if (!tooltip.matches(":popover-open")) {
1197
+ tooltip.removeAttribute("positioned");
1198
+ tooltip.showPopover();
1199
+ }
1200
+ this._updatePosition();
1201
+ } else if (tooltip.matches(":popover-open")) tooltip.hidePopover();
1202
+ }
1203
+ }
1204
+ if (changed.has("text") || changed.has("timing")) this._syncAriaDescribedBy();
1205
+ if (changed.has("text") && this._visible) this._updatePosition();
1206
+ if (changed.has("timing") && this.timing === "never") {
1207
+ if (this._showTimeout) {
1208
+ clearTimeout(this._showTimeout);
1209
+ this._showTimeout = null;
1210
+ }
1211
+ if (this._visible) this._visible = false;
1212
+ }
1213
+ }
1214
+ _syncAriaDescribedBy() {
1215
+ const trigger = this._getTriggerElement();
1216
+ if (this._currentTrigger && this._currentTrigger !== trigger) this._currentTrigger.removeAttribute("aria-describedby");
1217
+ this._currentTrigger = trigger;
1218
+ if (!trigger) return;
1219
+ if (trigger.getRootNode() !== document) return;
1220
+ if (this.text && this.timing !== "never") {
1221
+ if (!this._descriptionEl) {
1222
+ this._descriptionEl = document.createElement("span");
1223
+ this._descriptionEl.id = this._tooltipId;
1224
+ Object.assign(this._descriptionEl.style, {
1225
+ position: "absolute",
1226
+ top: "0",
1227
+ left: "0",
1228
+ width: "1px",
1229
+ height: "1px",
1230
+ overflow: "hidden",
1231
+ clipPath: "inset(50%)",
1232
+ whiteSpace: "nowrap"
1233
+ });
1234
+ document.body.appendChild(this._descriptionEl);
1235
+ }
1236
+ this._descriptionEl.textContent = this.text;
1237
+ trigger.setAttribute("aria-describedby", this._tooltipId);
1238
+ } else {
1239
+ trigger.removeAttribute("aria-describedby");
1240
+ this._descriptionEl?.remove();
1241
+ this._descriptionEl = null;
1242
+ }
1243
+ }
1244
+ _getTriggerElement() {
1245
+ return ((this.shadowRoot?.querySelector("slot"))?.assignedElements({ flatten: true }))?.[0] ?? null;
1246
+ }
1247
+ _getTooltipElement() {
1248
+ return this.shadowRoot?.querySelector(".tooltip") ?? null;
1249
+ }
1250
+ _handleTriggerEnter() {
1251
+ if (this.timing === "never") return;
1252
+ if (!this.text) return;
1253
+ if (coarsePointerQuery.matches) return;
1254
+ if (this._hideTimeout) {
1255
+ clearTimeout(this._hideTimeout);
1256
+ this._hideTimeout = null;
1257
+ }
1258
+ if (this._showTimeout) clearTimeout(this._showTimeout);
1259
+ if (this.timing === "instant") {
1260
+ this._showTimeout = null;
1261
+ this._visible = true;
1262
+ return;
1263
+ }
1264
+ const parsedShow = parseInt(getComputedStyle(this).getPropertyValue("--_show-delay"), 10);
1265
+ const showDelay = Number.isFinite(parsedShow) ? parsedShow : DEFAULT_SHOW_DELAY_MS;
1266
+ this._showTimeout = setTimeout(() => {
1267
+ this._showTimeout = null;
1268
+ this._visible = true;
1269
+ }, showDelay);
1270
+ }
1271
+ _handleFocusIn() {
1272
+ if (this.timing === "never") return;
1273
+ if (!this.text) return;
1274
+ if (isTouchMode()) return;
1275
+ if (this._hideTimeout) {
1276
+ clearTimeout(this._hideTimeout);
1277
+ this._hideTimeout = null;
1278
+ }
1279
+ if (this._showTimeout) {
1280
+ clearTimeout(this._showTimeout);
1281
+ this._showTimeout = null;
1282
+ }
1283
+ this._visible = true;
1284
+ }
1285
+ _handleTriggerLeave() {
1286
+ if (this._showTimeout) {
1287
+ clearTimeout(this._showTimeout);
1288
+ this._showTimeout = null;
1289
+ }
1290
+ if (this.open) return;
1291
+ if (this._hideTimeout) clearTimeout(this._hideTimeout);
1292
+ const parsedHide = parseInt(getComputedStyle(this).getPropertyValue("--_hide-delay"), 10);
1293
+ const hideDelay = Number.isFinite(parsedHide) ? parsedHide : DEFAULT_HIDE_DELAY_MS;
1294
+ this._hideTimeout = setTimeout(() => {
1295
+ this._visible = false;
1296
+ this._hideTimeout = null;
1297
+ }, hideDelay);
1298
+ }
1299
+ /** Focus guard checks one shadow root level deep for composite triggers. */
1300
+ _handleFocusOut(e) {
1301
+ const assigned = (this.shadowRoot?.querySelector("slot"))?.assignedElements({ flatten: true }) ?? [];
1302
+ const related = e.relatedTarget;
1303
+ if (!(related && assigned.some((el) => el.contains(related) || el.shadowRoot?.contains(related)))) this._handleTriggerLeave();
1304
+ }
1305
+ _handleTriggerActivate() {
1306
+ if (this.open) return;
1307
+ if (this._showTimeout) {
1308
+ clearTimeout(this._showTimeout);
1309
+ this._showTimeout = null;
1310
+ }
1311
+ if (this._hideTimeout) {
1312
+ clearTimeout(this._hideTimeout);
1313
+ this._hideTimeout = null;
1314
+ }
1315
+ this._visible = false;
1316
+ }
1317
+ _handleTooltipEnter() {
1318
+ if (this._hideTimeout) {
1319
+ clearTimeout(this._hideTimeout);
1320
+ this._hideTimeout = null;
1321
+ }
1322
+ }
1323
+ _handleTooltipLeave() {
1324
+ this._handleTriggerLeave();
1325
+ }
1326
+ async _updatePosition() {
1327
+ const version = ++this._positionVersion;
1328
+ const trigger = this._getTriggerElement();
1329
+ const tooltip = this._getTooltipElement();
1330
+ if (!trigger || !tooltip) {
1331
+ tooltip?.setAttribute("positioned", "");
1332
+ return;
1333
+ }
1334
+ if (document.fonts?.status !== "loaded") {
1335
+ await document.fonts?.ready;
1336
+ if (version !== this._positionVersion) return;
1337
+ }
1338
+ const styles = getComputedStyle(this);
1339
+ const { x, y } = await computePosition(trigger, tooltip, {
1340
+ placement: this._effectivePlacement,
1341
+ strategy: "fixed",
1342
+ middleware: [
1343
+ offset(parseInt(styles.getPropertyValue("--_offset"), 10)),
1344
+ flip(),
1345
+ shift({ padding: parseInt(styles.getPropertyValue("--_shift-padding"), 10) })
1346
+ ]
1347
+ });
1348
+ if (version !== this._positionVersion) return;
1349
+ tooltip.style.left = `${x}px`;
1350
+ tooltip.style.top = `${y}px`;
1351
+ tooltip.setAttribute("positioned", "");
1352
+ }
1353
+ disconnectedCallback() {
1354
+ super.disconnectedCallback();
1355
+ this.removeEventListener("keydown", this._handleKeyDown);
1356
+ this.shadowRoot?.querySelector("slot")?.removeEventListener("slotchange", this._boundSlotChange);
1357
+ if (this._hideTimeout) {
1358
+ clearTimeout(this._hideTimeout);
1359
+ this._hideTimeout = null;
1360
+ }
1361
+ if (this._showTimeout) {
1362
+ clearTimeout(this._showTimeout);
1363
+ this._showTimeout = null;
1364
+ }
1365
+ this._currentTrigger?.removeAttribute("aria-describedby");
1366
+ this._currentTrigger = null;
1367
+ this._descriptionEl?.remove();
1368
+ this._descriptionEl = null;
1369
+ }
1370
+ render() {
1371
+ return tooltipTemplate(this);
1372
+ }
1373
+ }, _NLDDTooltip.styles = tooltipStyles, _NLDDTooltip);
1374
+ __decorate([property({
1375
+ reflect: true,
1376
+ converter: reflectNonDefault("")
1377
+ })], NLDDTooltip.prototype, "text", void 0);
1378
+ __decorate([property({
1379
+ type: Boolean,
1380
+ reflect: true
1381
+ })], NLDDTooltip.prototype, "open", void 0);
1382
+ __decorate([property({
1383
+ reflect: true,
1384
+ converter: reflectNonDefault("bottom")
1385
+ })], NLDDTooltip.prototype, "placement", void 0);
1386
+ __decorate([property({
1387
+ reflect: true,
1388
+ converter: reflectNonDefault("default")
1389
+ })], NLDDTooltip.prototype, "timing", void 0);
1390
+ __decorate([state()], NLDDTooltip.prototype, "_visible", void 0);
1391
+ NLDDTooltip = __decorate([customElement("nldd-tooltip")], NLDDTooltip);
1392
+ //#endregion
1393
+ //#region src/components/actions/icon-button/icon-button.template.ts
1394
+ function renderContent(component) {
1395
+ return html`
1396
+ <span class="icon-button__icon-area">
1397
+ <span class="icon-button__icon">
1398
+ ${component.icon ? html`<nldd-icon name=${component.icon}></nldd-icon>` : html`<slot name="icon" @slotchange=${component._onIconSlotChange}>
1399
+ <nldd-icon name="icon-placeholder"></nldd-icon>
1400
+ </slot>`}
1401
+ </span>
1402
+ ${component.expandable ? html`
1403
+ <span class="icon-button__disclosure-icon">
1404
+ <nldd-icon name="chevron-down-small"></nldd-icon>
1405
+ </span>
1406
+ ` : nothing}
1407
+ </span>
1408
+ ${component.text ? html`
1409
+ <span class="icon-button__text">${component.text}</span>
1410
+ ` : ""}
1411
+ `;
1412
+ }
1413
+ function template() {
1414
+ const opensInNewTabHint = this.href && this.target === "_blank" ? this._t("components.icon-button.opens-in-new-tab-label") : "";
1415
+ const label = [this.accessibleLabel || this.text || "", opensInNewTabHint].filter(Boolean).join(", ") || nothing;
1416
+ const content = renderContent(this);
1417
+ const tooltipText = this.accessibleLabel || (this.size !== "lg" || this.hideLgText ? this.text : "");
1418
+ const ariaExpanded = this.expandable || !!this.popupType ? String(this.expanded) : this.expanded ? "true" : nothing;
1419
+ const ariaBusy = this.loading ? "true" : nothing;
1420
+ const loadingSize = this.size === "xs" ? "16" : this.size === "sm" ? "20" : this.size === "lg" ? "28" : "24";
1421
+ const loadingIndicator = this.loading ? html`
1422
+ <div class="icon-button__activity-indicator">
1423
+ <nldd-activity-indicator
1424
+ timing="instant"
1425
+ size=${loadingSize}
1426
+ ></nldd-activity-indicator>
1427
+ </div>
1428
+ ` : nothing;
1429
+ const renderButton = () => {
1430
+ if (this.href) {
1431
+ const resolvedRel = this._resolvedRel();
1432
+ return html`
1433
+ <a class="icon-button"
1434
+ href=${this.href}
1435
+ target=${this.target || nothing}
1436
+ rel=${resolvedRel || nothing}
1437
+ aria-disabled=${this.disabled ? "true" : nothing}
1438
+ aria-label=${label}
1439
+ aria-haspopup=${this.popupType || nothing}
1440
+ aria-expanded=${ariaExpanded}
1441
+ aria-busy=${ariaBusy}
1442
+ tabindex=${this.noTab ? "-1" : nothing}
1443
+ @pointerdown=${this._popup.handlePointerdown}
1444
+ @click=${this._handleClick}
1445
+ >
1446
+ ${content}
1447
+ </a>
1448
+ `;
1449
+ }
1450
+ return html`
1451
+ <button class="icon-button"
1452
+ type=${this.type}
1453
+ ?disabled=${this.disabled}
1454
+ aria-disabled=${this.disabled ? "true" : nothing}
1455
+ aria-label=${label}
1456
+ aria-haspopup=${this.popupType || nothing}
1457
+ aria-expanded=${ariaExpanded}
1458
+ aria-busy=${ariaBusy}
1459
+ tabindex=${this.noTab ? "-1" : nothing}
1460
+ popovertarget=${this.popovertarget || nothing}
1461
+ .popoverTargetElement=${this.popoverTargetElement}
1462
+ .popoverTargetAction=${this.popoverTargetAction}
1463
+ @pointerdown=${this._popup.handlePointerdown}
1464
+ @click=${this._handleClick}
1465
+ >
1466
+ ${content}
1467
+ </button>
1468
+ `;
1469
+ };
1470
+ const control = tooltipText && this.tooltipTiming !== "never" ? html`
1471
+ <nldd-tooltip text=${tooltipText} timing=${this.tooltipTiming}>
1472
+ ${renderButton()}
1473
+ </nldd-tooltip>
1474
+ ` : renderButton();
1475
+ const popupSlot = html`<slot name="popup" @slotchange=${this._popup.handleSlotChange}></slot>`;
1476
+ return html`${control}${loadingIndicator}${popupSlot}`;
1477
+ }
1478
+ //#endregion
1479
+ //#region src/components/actions/icon-button/icon-button.i18n.ts
1480
+ var nlddIconButtonTranslations = { "components.icon-button.opens-in-new-tab-label": "Opent in nieuw tabblad" };
1481
+ //#endregion
1482
+ //#region src/components/actions/icon-button/icon-button.ts
1483
+ /**
1484
+ * Nederlandse Digitale Dienst Icon Button Component (Lit + TypeScript)
1485
+ *
1486
+ * @element nldd-icon-button
1487
+ * @attr {string} variant - Button variant: 'accent-filled' | 'accent-transparent' | 'neutral-tinted' | 'neutral-transparent' | 'critical-tinted' | 'critical-transparent' | 'inherit-filled' | 'inherit-tinted' | 'primary' | 'secondary' | 'destructive'. De inherit-varianten leiden hun kleuren af van currentColor, voor knoppen op gekleurde vlakken.
1488
+ * @attr {string} size - Button size: 'xs' | 'sm' | 'md' | 'lg' (default: 'md')
1489
+ * @attr {boolean} hide-lg-text - In lg size, hides the text label and enlarges the icon by one step (28px)
1490
+ * @attr {boolean} no-highlight-border - Removes the per-variant highlight border (e.g. when a control group draws a single border instead).
1491
+ * @attr {boolean} loading - Loading state (default: false). Shows an activity indicator over the visually hidden icon, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled).
1492
+ * @attr {boolean} disabled - Disabled state
1493
+ * @attr {boolean} no-tab - Takes the button out of the tab order (tabindex="-1"), for a control owned by a roving container (e.g. an nldd-token in nldd-token-field) that manages focus itself. Still mouse- and script-focusable.
1494
+ * @attr {string} type - Button type for form submission: 'button' | 'submit' | 'reset' (ignored when href is set)
1495
+ * @attr {boolean} expandable - Whether the button opens a menu or popover and shows chevron next to the icon
1496
+ * @attr {boolean} expanded - Whether the popover/menu controlled by this button is currently open. Forwarded as aria-expanded on the inner button; toggles the is-expanded visual state.
1497
+ * @attr {string} popup-type - Type of popup container this button opens: 'menu' | 'listbox' | 'dialog' | 'tree' | 'grid'. Sets aria-haspopup on the inner button and forces aria-expanded to always be present (true/false) so screen readers know the popup state.
1498
+ * @attr {string} width - Width mode: 'full' (stretches to container) or any CSS length (e.g. '240px')
1499
+ * @attr {string} text - Button text, used as aria-label and shown below the icon in lg size
1500
+ * @attr {string} icon - Icon name for the nldd-icon element. Defaults to a placeholder icon when neither this attribute nor the icon slot is set.
1501
+ * @attr {string} accessible-label - Accessible label for screen readers. Overrides text as aria-label and title tooltip. Use when the visible text alone lacks context for screen readers (e.g. text "Toon", accessible-label "Toon wachtwoord"). The text is still shown visually in lg size regardless.
1502
+ * @attr {string} tooltip-timing - Forwarded to the inner nldd-tooltip's `timing`: 'default' (700 ms show-delay), 'instant', or 'never' (suppress the visual tooltip; screen readers still get the aria-label). Use 'never' when the surrounding context already explains the button (e.g. spin buttons in nldd-number-field, the chevron in nldd-split-button).
1503
+ * @attr {string} href - When set, renders an <a> element instead of <button>
1504
+ * @attr {string} target - Link target (e.g. '_blank'); only used when href is set. With '_blank' the "opens in new tab" announcement is folded into the aria-label for screen readers (WCAG 2.1 SC 3.2.2).
1505
+ * @attr {string} rel - Link rel attribute; defaults to 'noopener noreferrer' when target is '_blank'
1506
+ * @attr {object} translations - Override translation keys (e.g. the "opens in new tab" announcement); unset keys fall back to Dutch.
1507
+ * @attr {string} popovertarget - ID of a popover element to toggle; forwarded to the inner <button>
1508
+ *
1509
+ * @slot icon - Slot for a custom icon (e.g. custom SVG). Only used when icon attribute is not set; falls back to a placeholder icon when the slot is empty.
1510
+ * @slot popup - A single `nldd-menu` or `nldd-popover` this button invokes. Slotting it auto-anchors the overlay to the button and toggles it on click (no id/anchor wiring). The overlay syncs `expanded` and `aria-haspopup` back onto the button. Add `expandable` for the disclosure chevron. Mirrors nldd-split-button; manual `popovertarget` wiring keeps working without a slotted overlay.
1511
+ *
1512
+ * @example
1513
+ * ```html
1514
+ * <nldd-icon-button text="Download" icon="download"></nldd-icon-button>
1515
+ * ```
1516
+ *
1517
+ * @fires click - When button is clicked (not fired when disabled)
1518
+ */
1519
+ var _NLDDIconButton;
1520
+ var NLDDIconButton = (_NLDDIconButton = class NLDDIconButton extends withTranslations(LitElement, nlddIconButtonTranslations) {
1521
+ constructor(..._args) {
1522
+ super(..._args);
1523
+ this._internals = this.attachInternals();
1524
+ this.variant = "neutral-tinted";
1525
+ this.size = "md";
1526
+ this.hideLgText = false;
1527
+ this.loading = false;
1528
+ this.disabled = false;
1529
+ this.noHighlightBorder = false;
1530
+ this.type = "button";
1531
+ this.expandable = false;
1532
+ this.expanded = false;
1533
+ this.noTab = false;
1534
+ this.width = "";
1535
+ this.popovertarget = void 0;
1536
+ this.popoverTargetElement = null;
1537
+ this.popoverTargetAction = "toggle";
1538
+ this.text = "";
1539
+ this.icon = "";
1540
+ this.accessibleLabel = "";
1541
+ this.tooltipTiming = "default";
1542
+ this.href = void 0;
1543
+ this.target = void 0;
1544
+ this.rel = void 0;
1545
+ this._warnedA11y = false;
1546
+ this._popup = new PopupAnchorController(this);
1547
+ }
1548
+ /** Whether an icon is present via attribute or slot. */
1549
+ get _hasIcon() {
1550
+ if (this.icon) return true;
1551
+ return ((this.shadowRoot?.querySelector("slot[name=\"icon\"]"))?.assignedElements().length ?? 0) > 0;
1552
+ }
1553
+ updated(changedProperties) {
1554
+ if (changedProperties.has("width")) {
1555
+ const w = this.width;
1556
+ const isFull = w === "full";
1557
+ const isValidLength = !!w && !isFull && CSS.supports("width", w);
1558
+ this.style.width = isValidLength ? w : "";
1559
+ if (isFull || isValidLength) this.style.setProperty("--_width", "100%");
1560
+ else this.style.removeProperty("--_width");
1561
+ }
1562
+ if (!(this._hasIcon && !this.text && !this.accessibleLabel)) this._warnedA11y = false;
1563
+ }
1564
+ /** Resolves the effective rel value for link rendering. */
1565
+ _resolvedRel() {
1566
+ if (this.rel) return this.rel;
1567
+ if (this.target === "_blank") return "noopener noreferrer";
1568
+ return "";
1569
+ }
1570
+ _handleClick(e) {
1571
+ if (this.disabled || this.loading) {
1572
+ e.preventDefault();
1573
+ e.stopPropagation();
1574
+ return;
1575
+ }
1576
+ if (this._popup.handleClick(e)) {
1577
+ e.preventDefault();
1578
+ return;
1579
+ }
1580
+ if (this.href) return;
1581
+ if (this.type === "submit") this._internals.form?.requestSubmit();
1582
+ else if (this.type === "reset") this._internals.form?.reset();
1583
+ }
1584
+ /**
1585
+ * Delegates focus to the inner `<button>` (or `<a>` when `href` is set), so
1586
+ * consumers can call `iconButtonEl.focus()` without reaching into shadow DOM.
1587
+ */
1588
+ focus(options) {
1589
+ this.shadowRoot?.querySelector(".icon-button")?.focus(options);
1590
+ }
1591
+ _onIconSlotChange() {
1592
+ this.requestUpdate();
1593
+ }
1594
+ render() {
1595
+ return template.call(this);
1596
+ }
1597
+ }, _NLDDIconButton.styles = iconButtonStyles, _NLDDIconButton.formAssociated = true, _NLDDIconButton);
1598
+ __decorate([property({
1599
+ reflect: true,
1600
+ converter: reflectNonDefault("neutral-tinted")
1601
+ })], NLDDIconButton.prototype, "variant", void 0);
1602
+ __decorate([property({
1603
+ reflect: true,
1604
+ converter: reflectNonDefault("md")
1605
+ })], NLDDIconButton.prototype, "size", void 0);
1606
+ __decorate([property({
1607
+ type: Boolean,
1608
+ reflect: true,
1609
+ attribute: "hide-lg-text"
1610
+ })], NLDDIconButton.prototype, "hideLgText", void 0);
1611
+ __decorate([property({
1612
+ type: Boolean,
1613
+ reflect: true
1614
+ })], NLDDIconButton.prototype, "loading", void 0);
1615
+ __decorate([property({
1616
+ type: Boolean,
1617
+ reflect: true
1618
+ })], NLDDIconButton.prototype, "disabled", void 0);
1619
+ __decorate([property({
1620
+ type: Boolean,
1621
+ reflect: true,
1622
+ attribute: "no-highlight-border"
1623
+ })], NLDDIconButton.prototype, "noHighlightBorder", void 0);
1624
+ __decorate([property({
1625
+ type: String,
1626
+ reflect: true
1627
+ })], NLDDIconButton.prototype, "type", void 0);
1628
+ __decorate([property({
1629
+ type: Boolean,
1630
+ reflect: true,
1631
+ attribute: "expandable"
1632
+ })], NLDDIconButton.prototype, "expandable", void 0);
1633
+ __decorate([property({
1634
+ type: Boolean,
1635
+ reflect: true
1636
+ })], NLDDIconButton.prototype, "expanded", void 0);
1637
+ __decorate([property({
1638
+ type: Boolean,
1639
+ reflect: true,
1640
+ attribute: "no-tab"
1641
+ })], NLDDIconButton.prototype, "noTab", void 0);
1642
+ __decorate([property({
1643
+ type: String,
1644
+ reflect: true,
1645
+ attribute: "popup-type"
1646
+ })], NLDDIconButton.prototype, "popupType", void 0);
1647
+ __decorate([property({
1648
+ reflect: true,
1649
+ converter: reflectNonDefault("")
1650
+ })], NLDDIconButton.prototype, "width", void 0);
1651
+ __decorate([property({ type: String })], NLDDIconButton.prototype, "popovertarget", void 0);
1652
+ __decorate([property({ attribute: false })], NLDDIconButton.prototype, "popoverTargetElement", void 0);
1653
+ __decorate([property({ attribute: false })], NLDDIconButton.prototype, "popoverTargetAction", void 0);
1654
+ __decorate([property({
1655
+ reflect: true,
1656
+ converter: reflectNonDefault("")
1657
+ })], NLDDIconButton.prototype, "text", void 0);
1658
+ __decorate([property({ type: String })], NLDDIconButton.prototype, "icon", void 0);
1659
+ __decorate([property({
1660
+ type: String,
1661
+ attribute: "accessible-label"
1662
+ })], NLDDIconButton.prototype, "accessibleLabel", void 0);
1663
+ __decorate([property({
1664
+ reflect: true,
1665
+ attribute: "tooltip-timing",
1666
+ converter: reflectNonDefault("default")
1667
+ })], NLDDIconButton.prototype, "tooltipTiming", void 0);
1668
+ __decorate([property({
1669
+ type: String,
1670
+ reflect: true
1671
+ })], NLDDIconButton.prototype, "href", void 0);
1672
+ __decorate([property({ type: String })], NLDDIconButton.prototype, "target", void 0);
1673
+ __decorate([property({ type: String })], NLDDIconButton.prototype, "rel", void 0);
1674
+ NLDDIconButton = __decorate([customElement("nldd-icon-button")], NLDDIconButton);
1675
+ //#endregion
1676
+ export { PopupAnchorController as i, NLDDTooltip as n, NLDDActivityIndicator as r, NLDDIconButton as t };