@nldd/design-system 0.18.0 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (301) hide show
  1. package/custom-elements.json +339 -52
  2. package/dist/components/actions/button/button.d.ts +5 -5
  3. package/dist/components/actions/button/button.d.ts.map +1 -1
  4. package/dist/components/actions/button/button.js +6 -6
  5. package/dist/components/actions/button/button.js.map +1 -1
  6. package/dist/components/actions/button/button.template.d.ts.map +1 -1
  7. package/dist/components/actions/button/button.template.js +6 -8
  8. package/dist/components/actions/button/button.template.js.map +1 -1
  9. package/dist/components/actions/button-bar/button-bar.d.ts.map +1 -1
  10. package/dist/components/actions/button-bar/button-bar.js +15 -4
  11. package/dist/components/actions/button-bar/button-bar.js.map +1 -1
  12. package/dist/components/actions/button-group/button-group.d.ts.map +1 -1
  13. package/dist/components/actions/button-group/button-group.js +7 -1
  14. package/dist/components/actions/button-group/button-group.js.map +1 -1
  15. package/dist/components/actions/button-group/button-group.styles.js +2 -2
  16. package/dist/components/actions/icon-button/icon-button.d.ts +3 -3
  17. package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
  18. package/dist/components/actions/icon-button/icon-button.js +4 -4
  19. package/dist/components/actions/icon-button/icon-button.js.map +1 -1
  20. package/dist/components/actions/icon-button/icon-button.template.d.ts.map +1 -1
  21. package/dist/components/actions/icon-button/icon-button.template.js +2 -4
  22. package/dist/components/actions/icon-button/icon-button.template.js.map +1 -1
  23. package/dist/components/actions/menu/menu-item.d.ts +6 -1
  24. package/dist/components/actions/menu/menu-item.d.ts.map +1 -1
  25. package/dist/components/actions/menu/menu-item.js +15 -5
  26. package/dist/components/actions/menu/menu-item.js.map +1 -1
  27. package/dist/components/actions/menu/menu.d.ts +31 -8
  28. package/dist/components/actions/menu/menu.d.ts.map +1 -1
  29. package/dist/components/actions/menu/menu.js +107 -31
  30. package/dist/components/actions/menu/menu.js.map +1 -1
  31. package/dist/components/actions/menu/menu.pointer.d.ts +7 -0
  32. package/dist/components/actions/menu/menu.pointer.d.ts.map +1 -1
  33. package/dist/components/actions/menu/menu.pointer.js +17 -0
  34. package/dist/components/actions/menu/menu.pointer.js.map +1 -1
  35. package/dist/components/actions/menu/menu.safe-triangle.d.ts +6 -5
  36. package/dist/components/actions/menu/menu.safe-triangle.d.ts.map +1 -1
  37. package/dist/components/actions/menu/menu.safe-triangle.js +3 -3
  38. package/dist/components/actions/menu/menu.safe-triangle.js.map +1 -1
  39. package/dist/components/actions/menu/menu.styles.d.ts.map +1 -1
  40. package/dist/components/actions/menu/menu.styles.js +6 -0
  41. package/dist/components/actions/menu/menu.styles.js.map +1 -1
  42. package/dist/components/actions/menu/menu.template.d.ts.map +1 -1
  43. package/dist/components/actions/menu/menu.template.js +15 -8
  44. package/dist/components/actions/menu/menu.template.js.map +1 -1
  45. package/dist/components/actions/toolbar/toolbar-title.js +2 -2
  46. package/dist/components/actions/toolbar/toolbar-title.js.map +1 -1
  47. package/dist/components/components.js +920 -318
  48. package/dist/components/content/avatar/avatar.js +1 -1
  49. package/dist/components/content/avatar/avatar.js.map +1 -1
  50. package/dist/components/content/avatar-group/avatar-group.d.ts.map +1 -1
  51. package/dist/components/content/avatar-group/avatar-group.js +2 -1
  52. package/dist/components/content/avatar-group/avatar-group.js.map +1 -1
  53. package/dist/components/content/icon/icon-gallery-status.d.ts.map +1 -1
  54. package/dist/components/content/icon/icon-gallery-status.js +12 -6
  55. package/dist/components/content/icon/icon-gallery-status.js.map +1 -1
  56. package/dist/components/content/icon/icon-registry.d.ts.map +1 -1
  57. package/dist/components/content/icon/icon-registry.js +373 -372
  58. package/dist/components/content/icon/icon-registry.js.map +1 -1
  59. package/dist/components/content/image/image.js +1 -1
  60. package/dist/components/content/image/image.js.map +1 -1
  61. package/dist/components/content/tag/tag.d.ts +3 -3
  62. package/dist/components/content/tag/tag.js +3 -3
  63. package/dist/components/content/tag/tag.template.js +3 -3
  64. package/dist/components/content/tag/tag.template.js.map +1 -1
  65. package/dist/components/content/title/title.js +1 -1
  66. package/dist/components/content/title/title.js.map +1 -1
  67. package/dist/components/content/token/token.d.ts +6 -4
  68. package/dist/components/content/token/token.d.ts.map +1 -1
  69. package/dist/components/content/token/token.js +6 -4
  70. package/dist/components/content/token/token.js.map +1 -1
  71. package/dist/components/content/token/token.template.js +1 -1
  72. package/dist/components/content/token/token.template.js.map +1 -1
  73. package/dist/components/{reflect-non-default-B9wQcnne.js → decorate-DD7uUxHb.js} +16 -1
  74. package/dist/components/{defer-focus-CtZ0JSne.js → defer-focus-dzorHsCQ.js} +2 -2
  75. package/dist/components/{dev-checks-Bl2WXSBI.js → dev-checks-CLB9G43h.js} +12 -2
  76. package/dist/components/icon-_Eox7ZfO.js +968 -0
  77. package/dist/components/{icon-button-BJR_r6Wo.js → icon-button-8gvQCwCW.js} +8 -11
  78. package/dist/components/{input-modality-CiPLYYMN.js → input-modality-D_CY185R.js} +8 -2
  79. package/dist/components/inputs/file-field/file-field.js +1 -1
  80. package/dist/components/inputs/file-field/file-field.js.map +1 -1
  81. package/dist/components/inputs/one-time-code-field/one-time-code-field.d.ts +20 -1
  82. package/dist/components/inputs/one-time-code-field/one-time-code-field.d.ts.map +1 -1
  83. package/dist/components/inputs/one-time-code-field/one-time-code-field.js +97 -3
  84. package/dist/components/inputs/one-time-code-field/one-time-code-field.js.map +1 -1
  85. package/dist/components/inputs/one-time-code-field/one-time-code-field.styles.d.ts.map +1 -1
  86. package/dist/components/inputs/one-time-code-field/one-time-code-field.styles.js +134 -4
  87. package/dist/components/inputs/one-time-code-field/one-time-code-field.styles.js.map +1 -1
  88. package/dist/components/inputs/one-time-code-field/one-time-code-field.template.d.ts +1 -0
  89. package/dist/components/inputs/one-time-code-field/one-time-code-field.template.d.ts.map +1 -1
  90. package/dist/components/inputs/one-time-code-field/one-time-code-field.template.js +21 -1
  91. package/dist/components/inputs/one-time-code-field/one-time-code-field.template.js.map +1 -1
  92. package/dist/components/inputs/search-field/search-field.d.ts +2 -2
  93. package/dist/components/inputs/search-field/search-field.d.ts.map +1 -1
  94. package/dist/components/inputs/search-field/search-field.js +1 -1
  95. package/dist/components/inputs/search-field/search-field.template.js +1 -1
  96. package/dist/components/inputs/search-field/search-field.template.js.map +1 -1
  97. package/dist/components/inputs/segmented-control/segmented-control.d.ts +2 -2
  98. package/dist/components/inputs/segmented-control/segmented-control.js +4 -4
  99. package/dist/components/inputs/segmented-control/segmented-control.js.map +1 -1
  100. package/dist/components/inputs/segmented-control/segmented-control.template.js +2 -2
  101. package/dist/components/inputs/segmented-control/segmented-control.template.js.map +1 -1
  102. package/dist/components/inputs/slider/slider.styles.d.ts.map +1 -1
  103. package/dist/components/inputs/slider/slider.styles.js +2 -1
  104. package/dist/components/inputs/slider/slider.styles.js.map +1 -1
  105. package/dist/components/inputs/swatch-picker/swatch-picker.js +1 -1
  106. package/dist/components/inputs/swatch-picker/swatch-picker.js.map +1 -1
  107. package/dist/components/inputs/time-picker/time-picker.d.ts +11 -3
  108. package/dist/components/inputs/time-picker/time-picker.d.ts.map +1 -1
  109. package/dist/components/inputs/time-picker/time-picker.js +31 -15
  110. package/dist/components/inputs/time-picker/time-picker.js.map +1 -1
  111. package/dist/components/inputs/time-picker/time-picker.template.d.ts.map +1 -1
  112. package/dist/components/inputs/time-picker/time-picker.template.js +3 -0
  113. package/dist/components/inputs/time-picker/time-picker.template.js.map +1 -1
  114. package/dist/components/inputs/toggle-button/toggle-button.d.ts +2 -2
  115. package/dist/components/inputs/toggle-button/toggle-button.js +3 -3
  116. package/dist/components/inputs/toggle-button/toggle-button.js.map +1 -1
  117. package/dist/components/inputs/toggle-button/toggle-button.template.d.ts.map +1 -1
  118. package/dist/components/inputs/toggle-button/toggle-button.template.js +7 -10
  119. package/dist/components/inputs/toggle-button/toggle-button.template.js.map +1 -1
  120. package/dist/components/inputs/toggle-button-group/toggle-button-group.js +1 -1
  121. package/dist/components/inputs/toggle-button-group/toggle-button-group.js.map +1 -1
  122. package/dist/components/inputs/toggle-button-group/toggle-button-group.styles.js +3 -3
  123. package/dist/components/layout/card/card.js +1 -1
  124. package/dist/components/layout/card/card.js.map +1 -1
  125. package/dist/components/layout/card/card.styles.d.ts.map +1 -1
  126. package/dist/components/layout/card/card.styles.js +3 -1
  127. package/dist/components/layout/card/card.styles.js.map +1 -1
  128. package/dist/components/layout/kanban/kanban.d.ts.map +1 -1
  129. package/dist/components/layout/kanban/kanban.js +2 -1
  130. package/dist/components/layout/kanban/kanban.js.map +1 -1
  131. package/dist/components/layout/page/page.d.ts.map +1 -1
  132. package/dist/components/layout/page/page.js +3 -2
  133. package/dist/components/layout/page/page.js.map +1 -1
  134. package/dist/components/layout/page/page.styles.d.ts.map +1 -1
  135. package/dist/components/layout/page/page.styles.js +3 -2
  136. package/dist/components/layout/page/page.styles.js.map +1 -1
  137. package/dist/components/layout/page-footer/page-footer.d.ts +5 -2
  138. package/dist/components/layout/page-footer/page-footer.d.ts.map +1 -1
  139. package/dist/components/layout/page-footer/page-footer.js +5 -2
  140. package/dist/components/layout/page-footer/page-footer.js.map +1 -1
  141. package/dist/components/layout/page-footer/page-footer.template.d.ts.map +1 -1
  142. package/dist/components/layout/page-footer/page-footer.template.js +2 -4
  143. package/dist/components/layout/page-footer/page-footer.template.js.map +1 -1
  144. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts +1 -1
  145. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts.map +1 -1
  146. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js +2 -2
  147. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js.map +1 -1
  148. package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
  149. package/dist/components/layout/page-sections/hero/hero.js +2 -2
  150. package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
  151. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts +1 -1
  152. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts.map +1 -1
  153. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js +2 -2
  154. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js.map +1 -1
  155. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts +1 -1
  156. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts.map +1 -1
  157. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js +2 -2
  158. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js.map +1 -1
  159. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts +1 -1
  160. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts.map +1 -1
  161. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js +4 -4
  162. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js.map +1 -1
  163. package/dist/components/layout/page-sections/simple-section/simple-section.d.ts +1 -1
  164. package/dist/components/layout/page-sections/simple-section/simple-section.d.ts.map +1 -1
  165. package/dist/components/layout/page-sections/simple-section/simple-section.js +2 -2
  166. package/dist/components/layout/page-sections/simple-section/simple-section.js.map +1 -1
  167. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts +1 -1
  168. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts.map +1 -1
  169. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js +2 -2
  170. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js.map +1 -1
  171. package/dist/components/layout/popover/popover.d.ts +1 -2
  172. package/dist/components/layout/popover/popover.d.ts.map +1 -1
  173. package/dist/components/layout/popover/popover.js +10 -12
  174. package/dist/components/layout/popover/popover.js.map +1 -1
  175. package/dist/components/layout/sheet/sheet.d.ts +1 -0
  176. package/dist/components/layout/sheet/sheet.d.ts.map +1 -1
  177. package/dist/components/layout/sheet/sheet.js +6 -1
  178. package/dist/components/layout/sheet/sheet.js.map +1 -1
  179. package/dist/components/layout/spacer/spacer.js +1 -1
  180. package/dist/components/layout/spacer/spacer.js.map +1 -1
  181. package/dist/components/layout/split-views/bar-split-view/bar-split-view.d.ts.map +1 -1
  182. package/dist/components/layout/split-views/bar-split-view/bar-split-view.js +2 -1
  183. package/dist/components/layout/split-views/bar-split-view/bar-split-view.js.map +1 -1
  184. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.d.ts.map +1 -1
  185. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.js +3 -2
  186. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.js.map +1 -1
  187. package/dist/components/layout/split-views/split-view-pane/split-view-pane.d.ts.map +1 -1
  188. package/dist/components/layout/split-views/split-view-pane/split-view-pane.js +2 -1
  189. package/dist/components/layout/split-views/split-view-pane/split-view-pane.js.map +1 -1
  190. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.d.ts.map +1 -1
  191. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.js +3 -2
  192. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.js.map +1 -1
  193. package/dist/components/layout/window/window.d.ts +1 -0
  194. package/dist/components/layout/window/window.d.ts.map +1 -1
  195. package/dist/components/layout/window/window.js +7 -1
  196. package/dist/components/layout/window/window.js.map +1 -1
  197. package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.d.ts +5 -2
  198. package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.d.ts.map +1 -1
  199. package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.js +7 -4
  200. package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.js.map +1 -1
  201. package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.template.js +3 -3
  202. package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.template.js.map +1 -1
  203. package/dist/components/lists-and-tables/cells/spacer-cell/spacer-cell.d.ts.map +1 -1
  204. package/dist/components/lists-and-tables/cells/spacer-cell/spacer-cell.js +2 -1
  205. package/dist/components/lists-and-tables/cells/spacer-cell/spacer-cell.js.map +1 -1
  206. package/dist/components/lists-and-tables/cells/text-cell/text-cell.d.ts +2 -2
  207. package/dist/components/lists-and-tables/cells/text-cell/text-cell.js +2 -2
  208. package/dist/components/lists-and-tables/cells/title-cell/title-cell.d.ts +2 -2
  209. package/dist/components/lists-and-tables/cells/title-cell/title-cell.js +2 -2
  210. package/dist/components/lists-and-tables/list/list.d.ts.map +1 -1
  211. package/dist/components/lists-and-tables/list/list.js +4 -1
  212. package/dist/components/lists-and-tables/list/list.js.map +1 -1
  213. package/dist/components/lists-and-tables/list-item/list-item.d.ts +12 -9
  214. package/dist/components/lists-and-tables/list-item/list-item.d.ts.map +1 -1
  215. package/dist/components/lists-and-tables/list-item/list-item.js +17 -11
  216. package/dist/components/lists-and-tables/list-item/list-item.js.map +1 -1
  217. package/dist/components/lists-and-tables/list-item/list-item.styles.d.ts.map +1 -1
  218. package/dist/components/lists-and-tables/list-item/list-item.styles.js +20 -0
  219. package/dist/components/lists-and-tables/list-item/list-item.styles.js.map +1 -1
  220. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.d.ts.map +1 -1
  221. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.js +6 -0
  222. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.js.map +1 -1
  223. package/dist/components/lists-and-tables/table/table.js +5 -5
  224. package/dist/components/lists-and-tables/table/table.js.map +1 -1
  225. package/dist/components/navigation/breadcrumbs/breadcrumbs.d.ts +5 -2
  226. package/dist/components/navigation/breadcrumbs/breadcrumbs.d.ts.map +1 -1
  227. package/dist/components/navigation/breadcrumbs/breadcrumbs.js +5 -2
  228. package/dist/components/navigation/breadcrumbs/breadcrumbs.js.map +1 -1
  229. package/dist/components/navigation/breadcrumbs/breadcrumbs.template.d.ts.map +1 -1
  230. package/dist/components/navigation/breadcrumbs/breadcrumbs.template.js +2 -4
  231. package/dist/components/navigation/breadcrumbs/breadcrumbs.template.js.map +1 -1
  232. package/dist/components/navigation/link/link.d.ts +7 -4
  233. package/dist/components/navigation/link/link.d.ts.map +1 -1
  234. package/dist/components/navigation/link/link.js +7 -4
  235. package/dist/components/navigation/link/link.js.map +1 -1
  236. package/dist/components/navigation/link/link.template.js +5 -5
  237. package/dist/components/navigation/link/link.template.js.map +1 -1
  238. package/dist/components/navigation/menu-bar-item/menu-bar-item.js +1 -1
  239. package/dist/components/navigation/menu-bar-item/menu-bar-item.js.map +1 -1
  240. package/dist/components/navigation/pagination/pagination.d.ts.map +1 -1
  241. package/dist/components/navigation/pagination/pagination.js +3 -2
  242. package/dist/components/navigation/pagination/pagination.js.map +1 -1
  243. package/dist/components/navigation/tab-bar/tab-bar.d.ts +18 -2
  244. package/dist/components/navigation/tab-bar/tab-bar.d.ts.map +1 -1
  245. package/dist/components/navigation/tab-bar/tab-bar.js +51 -3
  246. package/dist/components/navigation/tab-bar/tab-bar.js.map +1 -1
  247. package/dist/components/navigation/tab-bar/tab-bar.template.d.ts.map +1 -1
  248. package/dist/components/navigation/tab-bar/tab-bar.template.js +5 -3
  249. package/dist/components/navigation/tab-bar/tab-bar.template.js.map +1 -1
  250. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js +2 -2
  251. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js.map +1 -1
  252. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.menu-sheet.d.ts +4 -0
  253. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.menu-sheet.d.ts.map +1 -1
  254. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.menu-sheet.js +26 -2
  255. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.menu-sheet.js.map +1 -1
  256. package/dist/components/status-and-feedback/banner/banner.js +1 -1
  257. package/dist/components/status-and-feedback/banner/banner.js.map +1 -1
  258. package/dist/components/status-and-feedback/inline-dialog/inline-dialog.js +2 -2
  259. package/dist/components/status-and-feedback/inline-dialog/inline-dialog.js.map +1 -1
  260. package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.js +1 -1
  261. package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.js.map +1 -1
  262. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js +1 -1
  263. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js.map +1 -1
  264. package/dist/components/status-and-feedback/notification/notification.js +2 -2
  265. package/dist/components/status-and-feedback/notification/notification.js.map +1 -1
  266. package/dist/components/status-and-feedback/progress-bar/progress-bar.js +4 -4
  267. package/dist/components/status-and-feedback/progress-bar/progress-bar.js.map +1 -1
  268. package/dist/components/status-and-feedback/progress-circle/progress-circle.js +4 -4
  269. package/dist/components/status-and-feedback/progress-circle/progress-circle.js.map +1 -1
  270. package/dist/components/status-and-feedback/step-bar/step-bar.d.ts +5 -2
  271. package/dist/components/status-and-feedback/step-bar/step-bar.d.ts.map +1 -1
  272. package/dist/components/status-and-feedback/step-bar/step-bar.js +6 -3
  273. package/dist/components/status-and-feedback/step-bar/step-bar.js.map +1 -1
  274. package/dist/components/status-and-feedback/step-bar/step-bar.template.js +1 -1
  275. package/dist/components/status-and-feedback/step-bar/step-bar.template.js.map +1 -1
  276. package/dist/components/{visibility-mixin-DrsvxcmK.js → visibility-mixin-Dzn48SL8.js} +1 -1
  277. package/dist/css/variables.css +6 -0
  278. package/dist/nldd.min.js +1464 -1322
  279. package/dist/types/vue.d.ts +20 -14
  280. package/dist/utilities/dev-rules.generated.d.ts.map +1 -1
  281. package/dist/utilities/dev-rules.generated.js +12 -2
  282. package/dist/utilities/dev-rules.generated.js.map +1 -1
  283. package/dist/utilities/input-modality.d.ts.map +1 -1
  284. package/dist/utilities/input-modality.js +4 -2
  285. package/dist/utilities/input-modality.js.map +1 -1
  286. package/dist/utilities/page-section-mixin.d.ts +10 -4
  287. package/dist/utilities/page-section-mixin.d.ts.map +1 -1
  288. package/dist/utilities/page-section-mixin.js +29 -23
  289. package/dist/utilities/page-section-mixin.js.map +1 -1
  290. package/dist/utilities/return-focus.d.ts +44 -0
  291. package/dist/utilities/return-focus.d.ts.map +1 -0
  292. package/dist/utilities/return-focus.js +99 -0
  293. package/dist/utilities/return-focus.js.map +1 -0
  294. package/dist/utilities/slot-content.d.ts +30 -0
  295. package/dist/utilities/slot-content.d.ts.map +1 -0
  296. package/dist/utilities/slot-content.js +38 -0
  297. package/dist/utilities/slot-content.js.map +1 -0
  298. package/lint/data.generated.json +1 -1
  299. package/package.json +1 -1
  300. package/dist/components/decorate-Bwufpnmp.js +0 -16
  301. package/dist/components/icon-BH4iy_z4.js +0 -968
@@ -1,16 +1,15 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D8jQpDG7.js";
2
- import { n as customElement, t as __decorate } from "./decorate-Bwufpnmp.js";
2
+ import { n as reflectNonDefault, r as customElement, t as __decorate } from "./decorate-DD7uUxHb.js";
3
3
  import { n as slottedReset, t as inheritedTextReset } from "./shadow-resets-BwOyyZFH.js";
4
- import { a as downloadLinkHintKey, c as linkRel, i as translate, n as withTranslations, o as linkHintKey, r as setTranslations, s as markDownloadTarget, t as deferFocus } from "./defer-focus-CtZ0JSne.js";
4
+ import { a as downloadLinkHintKey, c as linkRel, i as translate, n as withTranslations, o as linkHintKey, r as setTranslations, s as markDownloadTarget, t as deferFocus } from "./defer-focus-dzorHsCQ.js";
5
5
  import { n as internalsOf, r as setState$1 } from "./element-state-BnarBv0M.js";
6
- import { a as releaseContext, c as anchorPopoverTarget, d as ShortcutAvailabilityController, f as hasShortcut, i as langOf, l as popoverTargetOf, m as shortcutsAvailable, n as NLDDTooltip, o as NLDDActivityIndicator, p as shortcutLabel, r as carryContext, s as PopupAnchorController, t as NLDDIconButton, u as NLDDKeyboardShortcut } from "./icon-button-BJR_r6Wo.js";
7
- import { t as reflectNonDefault } from "./reflect-non-default-B9wQcnne.js";
6
+ import { a as releaseContext, c as anchorPopoverTarget, d as ShortcutAvailabilityController, f as hasShortcut, i as langOf, l as popoverTargetOf, m as shortcutsAvailable, n as NLDDTooltip, o as NLDDActivityIndicator, p as shortcutLabel, r as carryContext, s as PopupAnchorController, t as NLDDIconButton, u as NLDDKeyboardShortcut } from "./icon-button-8gvQCwCW.js";
8
7
  import { t as nlddButtonTranslations } from "./button.i18n-DiDGynnq.js";
9
- import { t as NLDDIcon } from "./icon-BH4iy_z4.js";
10
- import { n as isPointerMode, r as isTouchMode, t as isKeyboardMode } from "./input-modality-CiPLYYMN.js";
8
+ import { t as NLDDIcon } from "./icon-_Eox7ZfO.js";
9
+ import { n as isPointerMode, r as isTouchMode, t as isKeyboardMode } from "./input-modality-D_CY185R.js";
11
10
  import { A as nlddStepperTranslations, B as nlddComboBoxTranslations, C as nlddCardTranslations, D as nlddTimeFieldTranslations, E as nlddTokenFieldTranslations, F as nlddFileFieldTranslations, G as nlddCodeViewerTranslations, H as nlddTokenTranslations, I as nlddDateFieldTranslations, J as nlddAvatarTranslations, K as nlddAvatarGroupTranslations, L as MONTH_KEYS, M as nlddSearchFieldTranslations, N as nlddPasswordFieldTranslations, O as nlddTimePickerTranslations, P as nlddNumberFieldTranslations, R as WEEKDAY_KEYS, S as nlddCollectionTranslations, T as nlddSliderTranslations, U as nlddRichTextTranslations, V as nlddValidationListTranslations, W as nlddImageTranslations, X as nlddMenuTranslations, Y as nlddToolbarTranslations, Z as nlddSplitButtonTranslations, _ as nlddTableTranslations, a as nlddBadgeTranslations, b as nlddPageFooterTranslations, c as nlddPaginationTranslations, d as nlddTopNavigationBarTranslations, f as nlddSkipLinkTranslations, g as nlddDragHandleCellTranslations, h as nlddBreadcrumbsTranslations, i as nlddProgressBarTranslations, j as nlddSwatchPickerItemTranslations, k as nlddTextEditorTranslations, l as nlddDocumentTabBarTranslations, m as nlddMenuBarTranslations, n as nlddStepBarTranslations, o as nlddNotificationTranslations, p as nlddLinkTranslations, q as nlddPopoverTranslations, r as nlddProgressCircleTranslations, s as nlddBannerTranslations, t as nlddJustInTimeEducationTranslations, u as nlddTabBarTranslations, v as nlddListItemSegmentTranslations, w as nlddSidebarSectionTranslations, x as nlddWindowTranslations, y as nlddKanbanTranslations, z as nlddDatePickerTranslations } from "./just-in-time-education.i18n-BqU1ImP4.js";
12
11
  import { i as splitSectionBreakpoints, n as queryBreakpoints, r as rootFontSize, t as breakpointPx } from "./breakpoints-DtL62nLI.js";
13
- import { t as VisibilityMixin } from "./visibility-mixin-DrsvxcmK.js";
12
+ import { t as VisibilityMixin } from "./visibility-mixin-Dzn48SL8.js";
14
13
  import { t as nlddListTranslations } from "./list.i18n-CKqbhFQ_.js";
15
14
  import { t as nlddListItemTranslations } from "./list-item.i18n-89uqlBMK.js";
16
15
  import { $ as ChangeSet, A as syntaxTree, B as getDrawSelectionConfig, C as indentNodeProp, D as matchBrackets, E as languageDataProp, F as RectangleMarker, G as layer, H as gutter, I as ViewPlugin, J as placeholder, K as lineNumbers, L as WidgetType, M as Direction, N as EditorView, P as GutterMarker, Q as ChangeDesc, R as drawSelection, S as getIndentation, T as indentUnit, U as gutterLineClass, W as keymap, X as tooltips, Y as showTooltip, Z as Annotation, _t as findClusterBreak, a as HighlightStyle, at as Prec, b as foldService, c as Language, d as ParseContext, dt as Text, et as Compartment, f as StreamLanguage, ft as Transaction, gt as countColumn, h as defineLanguageFacet, ht as combineConfig, j as Decoration, k as syntaxHighlighting, l as LanguageDescription, lt as StateEffect, nt as EditorState, o as IndentContext, ot as RangeSet, rt as Facet, st as RangeSetBuilder, tt as EditorSelection, u as LanguageSupport, ut as StateField, w as indentString, x as getIndentUnit, y as foldNodeProp, z as dropCursor } from "./dist-BFZM0YsR.js";
@@ -651,13 +650,13 @@ var buttonStyles = css`
651
650
  function renderContent(component) {
652
651
  return html`
653
652
  <span class="button__content">
654
- ${component.startIcon ? html`
653
+ <slot name="start-icon">${component.startIcon ? html`
655
654
  <span class="button__start-icon">
656
655
  <nldd-icon icon=${component.startIcon}></nldd-icon>
657
656
  </span>
658
- ` : html`<slot name="start-icon"></slot>`}
657
+ ` : nothing}</slot>
659
658
  <span class="button__text-area">
660
- <span class="button__text">${component.text ? component.text : html`<slot name="text"></slot>`}</span>
659
+ <span class="button__text"><slot name="text">${component.text}</slot></span>
661
660
  ${component.supportingText ? html`<span class="button__supporting-text">${component.supportingText}</span>` : nothing}
662
661
  </span>
663
662
  ${hasShortcut(component) ? html`
@@ -673,11 +672,11 @@ function renderContent(component) {
673
672
  ></nldd-keyboard-shortcut>
674
673
  </span>
675
674
  ` : nothing}
676
- ${component.endIcon ? html`
675
+ <slot name="end-icon">${component.endIcon ? html`
677
676
  <span class="button__end-icon">
678
677
  <nldd-icon icon=${component.endIcon}></nldd-icon>
679
678
  </span>
680
- ` : html`<slot name="end-icon"></slot>`}
679
+ ` : nothing}</slot>
681
680
  </span>
682
681
  ${component.expandable ? html`
683
682
  <nldd-icon class="button__disclosure-icon"
@@ -904,9 +903,9 @@ function ownerForm(host, internals) {
904
903
  * @attr {string} rel - Link rel attribute, used with href; with target '_blank', 'noopener noreferrer' is added to whatever you set
905
904
  * @attr {object} translations - Override translation keys (e.g. the "opens in new tab" announcement); unset keys fall back to Dutch.
906
905
  *
907
- * @slot text - Slot for custom button content (e.g. text with inline markup). Used when the text attribute is empty or not set (an empty string counts as "not set", since the attribute and the unset property are indistinguishable). Provide accessible-label when the slotted content isn't plain text.
908
- * @slot start-icon - Slot for a custom start icon (e.g. custom SVG). Only used when start-icon attribute is not set.
909
- * @slot end-icon - Slot for a custom end icon (e.g. custom SVG). Only used when end-icon attribute is not set.
906
+ * @slot text - Slot for custom button content (e.g. text with inline markup). Wins over `text`. Provide accessible-label when the slotted content isn't plain text.
907
+ * @slot start-icon - Slot for a custom start icon (e.g. custom SVG). Wins over `start-icon`.
908
+ * @slot end-icon - Slot for a custom end icon (e.g. custom SVG). Wins over `end-icon`.
910
909
  * @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; the manual `anchor`/`popovertarget` wiring keeps working when you don't slot an overlay.
911
910
  *
912
911
  * @fires click - When button is clicked (not fired when disabled)
@@ -1048,8 +1047,8 @@ __decorate([property({
1048
1047
  attribute: "popup-type"
1049
1048
  })], NLDDButton.prototype, "popupType", void 0);
1050
1049
  __decorate([property({
1051
- type: String,
1052
- reflect: true
1050
+ reflect: true,
1051
+ converter: reflectNonDefault("button")
1053
1052
  })], NLDDButton.prototype, "type", void 0);
1054
1053
  __decorate([property({ type: String })], NLDDButton.prototype, "popovertarget", void 0);
1055
1054
  __decorate([property({ attribute: false })], NLDDButton.prototype, "popoverTargetElement", void 0);
@@ -1574,6 +1573,12 @@ var menuItemStyles = css`
1574
1573
  }
1575
1574
  }
1576
1575
 
1576
+ /* The icon cell gives what it holds display: block; the slot that passes the
1577
+ icon on must stay out of the layout. */
1578
+ .menu__item-icon {
1579
+ display: contents;
1580
+ }
1581
+
1577
1582
  /* A link item (href) renders as <a>; strip the UA link color/underline so
1578
1583
  it is visually identical to the button variant. The text color is owned
1579
1584
  by the inner nldd-text-cell. The control cursor token (default, like the
@@ -1837,22 +1842,27 @@ function menuItemTemplate(variant = null) {
1837
1842
  const hasSubmenu = this._hasSubmenu;
1838
1843
  const safeHref = sanitizeUrl(this.href) ?? "";
1839
1844
  const asLink = !!safeHref && this.type === "button" && !hasSubmenu && !this.disabled;
1845
+ const hasIcon = Boolean(this.icon) || this._hasIconSlot;
1840
1846
  const content = html`
1841
1847
  ${hasCheckColumn ? html`
1842
1848
  <nldd-icon-cell
1843
- size="24"
1844
1849
  horizontal-alignment="center"
1845
1850
  icon=${hasCheckState && this.selected ? "check-mark" : nothing}
1846
1851
  ></nldd-icon-cell>
1847
1852
  <nldd-spacer-cell size="4"></nldd-spacer-cell>
1848
1853
  ` : nothing}
1849
- ${this.icon ? html`
1850
- <nldd-icon-cell
1851
- size="20"
1852
- icon=${this.icon}
1853
- ></nldd-icon-cell>
1854
- <nldd-spacer-cell size="8"></nldd-spacer-cell>
1855
- ` : nothing}
1854
+ <nldd-icon-cell
1855
+ size="20"
1856
+ ?hidden=${!hasIcon}
1857
+ ><slot
1858
+ name="icon"
1859
+ class="menu__item-icon"
1860
+ @slotchange=${this._onIconSlotChange}
1861
+ >${this.icon ? html`<nldd-icon icon=${this.icon}></nldd-icon>` : nothing}</slot></nldd-icon-cell>
1862
+ <nldd-spacer-cell
1863
+ size="8"
1864
+ ?hidden=${!hasIcon}
1865
+ ></nldd-spacer-cell>
1856
1866
  <nldd-text-cell
1857
1867
  text=${this.text}
1858
1868
  query=${this.query}
@@ -2080,10 +2090,46 @@ function template$22() {
2080
2090
  part="icon"
2081
2091
  class="icon-cell__glyph"
2082
2092
  >
2083
- ${this.icon ? html`<nldd-icon icon=${this.icon}></nldd-icon>` : html`<slot></slot>`}
2093
+ ${this.icon && !this._slot.has ? html`<nldd-icon icon=${this.icon}></nldd-icon>` : nothing}<slot @slotchange=${this._slot.onChange}></slot>
2084
2094
  </span>
2085
2095
  `;
2086
2096
  }
2097
+ // src/utilities/slot-content.ts
2098
+ /**
2099
+ * Whether a slot holds something to show: an element, or text that is more
2100
+ * than whitespace.
2101
+ *
2102
+ * A default slot also gets the whitespace and line breaks between the tags of
2103
+ * the markup around it, and that whitespace switches off the slot's fallback
2104
+ * content. A component that lets its slot win over an attribute therefore
2105
+ * renders the attribute beside the slot, and hides it when this says so.
2106
+ */
2107
+ function hasSlotContent(slot) {
2108
+ return slot.assignedNodes().some((node) => node.nodeType === Node.ELEMENT_NODE || node.nodeType === Node.TEXT_NODE && (node.textContent ?? "").trim().length > 0);
2109
+ }
2110
+ /**
2111
+ * Tracks whether a slot holds something, for a component whose slot wins over
2112
+ * an attribute. Pass `onChange` to the slot's `@slotchange` and render the
2113
+ * attribute only while `has` is false:
2114
+ *
2115
+ * ```ts
2116
+ * private _textSlot = new SlotContent(this);
2117
+ * // in the template
2118
+ * html`${this._textSlot.has ? nothing : this.text}<slot @slotchange=${this._textSlot.onChange}></slot>`
2119
+ * ```
2120
+ */
2121
+ var SlotContent = class {
2122
+ constructor(_host) {
2123
+ this._host = _host;
2124
+ this.has = false;
2125
+ this.onChange = (e) => {
2126
+ const has = hasSlotContent(e.target);
2127
+ if (has === this.has) return;
2128
+ this.has = has;
2129
+ this._host.requestUpdate();
2130
+ };
2131
+ }
2132
+ };
2087
2133
  // src/components/lists-and-tables/cells/icon-cell/icon-cell.ts
2088
2134
  /**
2089
2135
  * Nederlandse Digitale Dienst Icon Cell Component (Lit + TypeScript)
@@ -2096,10 +2142,10 @@ function template$22() {
2096
2142
  * @attr {string} size - Size: '16' | '20' | '24' | '32' (default: '24')
2097
2143
  * @attr {'content' | 'secondary' | 'accent' | 'success' | 'warning' | 'critical'} color - Color variant of the icon (default: 'content')
2098
2144
  * @attr {string} vertical-alignment - Vertical alignment: 'top' | 'center' | 'bottom' (default: 'center')
2099
- * @attr {string} icon - Icon name (renders `<nldd-icon>`). Takes precedence over the default slot.
2145
+ * @attr {string} icon - Icon name (renders `<nldd-icon>`). Content in the default slot wins.
2100
2146
  * @attr {boolean} disclosure - Marks this icon as the chevron of a row or segment that opens and closes: the row turns it with `expanded`.
2101
2147
  *
2102
- * @slot - Fallback for custom icon content when `icon` is not set.
2148
+ * @slot - Custom icon content, for iconography outside the icon set. Wins over `icon`.
2103
2149
  *
2104
2150
  * @csspart icon - The glyph itself, whether it comes from `icon` or from the slot. Transform this rather than the cell: a transform on the host changes the box `getBoundingClientRect()` reports, and a row measures its cells to place the divider.
2105
2151
  */
@@ -2111,6 +2157,7 @@ var _NLDDIconCell = class NLDDIconCell extends VisibilityMixin(LitElement, "cell
2111
2157
  this.color = "content";
2112
2158
  this.verticalAlignment = "center";
2113
2159
  this.icon = "";
2160
+ this._slot = new SlotContent(this);
2114
2161
  }
2115
2162
  render() {
2116
2163
  return template$22.call(this);
@@ -2118,8 +2165,8 @@ var _NLDDIconCell = class NLDDIconCell extends VisibilityMixin(LitElement, "cell
2118
2165
  };
2119
2166
  var NLDDIconCell = (_NLDDIconCell.styles = iconCellStyles, _NLDDIconCell);
2120
2167
  __decorate([property({
2121
- type: String,
2122
- reflect: true
2168
+ reflect: true,
2169
+ converter: reflectNonDefault("24")
2123
2170
  })], NLDDIconCell.prototype, "size", void 0);
2124
2171
  __decorate([property({
2125
2172
  reflect: true,
@@ -2131,8 +2178,8 @@ __decorate([property({
2131
2178
  converter: reflectNonDefault("center")
2132
2179
  })], NLDDIconCell.prototype, "verticalAlignment", void 0);
2133
2180
  __decorate([property({
2134
- type: String,
2135
- reflect: true
2181
+ reflect: true,
2182
+ converter: reflectNonDefault("")
2136
2183
  })], NLDDIconCell.prototype, "icon", void 0);
2137
2184
  NLDDIconCell = __decorate([customElement("nldd-icon-cell")], NLDDIconCell);
2138
2185
  // src/components/lists-and-tables/cells/spacer-cell/spacer-cell.styles.ts
@@ -2205,8 +2252,8 @@ var _NLDDSpacerCell = class NLDDSpacerCell extends VisibilityMixin(LitElement, "
2205
2252
  };
2206
2253
  var NLDDSpacerCell = (_NLDDSpacerCell.styles = spacerCellStyles, _NLDDSpacerCell);
2207
2254
  __decorate([property({
2208
- type: String,
2209
- reflect: true
2255
+ reflect: true,
2256
+ converter: reflectNonDefault("16")
2210
2257
  })], NLDDSpacerCell.prototype, "size", void 0);
2211
2258
  NLDDSpacerCell = __decorate([customElement("nldd-spacer-cell")], NLDDSpacerCell);
2212
2259
  // src/components/lists-and-tables/cells/text-cell/text-cell.styles.ts
@@ -2559,12 +2606,12 @@ function RowHeaderMixin(Base) {
2559
2606
  * @attr {string} horizontal-alignment - Horizontal alignment: 'left' | 'center' | 'right' (default: 'left')
2560
2607
  * @attr {string} vertical-alignment - Vertical alignment: 'top' | 'center' | 'bottom' (default: 'center')
2561
2608
  *
2562
- * @attr {string} text - Main text content. Supports **bold** syntax for inline bold segments. Falls back to default slot.
2609
+ * @attr {string} text - Main text content. Supports **bold** syntax for inline bold segments. Content in the default slot wins.
2563
2610
  * @attr {string} supporting-text - Optional supporting text displayed below the main content. Supports **bold**. Falls back to `supporting-text` slot.
2564
2611
  * @attr {string} overline - Optional overline text displayed above the main content. Supports **bold**. Falls back to `overline` slot.
2565
2612
  *
2566
2613
  * @slot overline - Rich content for the overline region. Overrides the `overline` attribute when content is assigned.
2567
- * @slot - (default) Rich content for the main text region. Overrides the `text` attribute when content is assigned.
2614
+ * @slot - (default) Rich content for the main text region. Wins over `text`.
2568
2615
  * @slot supporting-text - Rich content for the supporting text region. Overrides the `supporting-text` attribute when content is assigned.
2569
2616
  *
2570
2617
  * ### Query mark
@@ -2907,7 +2954,7 @@ var buttonGroupStyles = css`
2907
2954
  :host {
2908
2955
  --_button-group-flex-direction: column;
2909
2956
  --_button-group-flex-wrap: nowrap;
2910
- --_button-group-gap: var(--primitives-space-8);
2957
+ --_button-group-gap: var(--semantics-button-groups-md-gap);
2911
2958
 
2912
2959
  box-sizing: border-box;
2913
2960
  display: flex;
@@ -2923,7 +2970,7 @@ var buttonGroupStyles = css`
2923
2970
  }
2924
2971
 
2925
2972
  :host([size="sm"]) {
2926
- --_button-group-gap: var(--primitives-space-6);
2973
+ --_button-group-gap: var(--semantics-button-groups-sm-gap);
2927
2974
  }
2928
2975
 
2929
2976
  :host([hidden]) {
@@ -3109,7 +3156,8 @@ var NLDDButtonGroup = (_NLDDButtonGroup = class NLDDButtonGroup extends LitEleme
3109
3156
  for (const el of assigned) {
3110
3157
  const own = el.getAttribute("size");
3111
3158
  if (own !== null && own !== this.size && !this._sized.has(el)) setState$1(this, "own-size-overwritten", true);
3112
- el.setAttribute("size", this.size);
3159
+ if ("size" in el) el.size = this.size;
3160
+ else el.setAttribute("size", this.size);
3113
3161
  this._sized.add(el);
3114
3162
  }
3115
3163
  }
@@ -3285,13 +3333,13 @@ __decorate([property({
3285
3333
  converter: reflectNonDefault("md")
3286
3334
  })], NLDDInlineDialog.prototype, "size", void 0);
3287
3335
  __decorate([property({
3288
- type: String,
3289
- reflect: true
3336
+ reflect: true,
3337
+ converter: reflectNonDefault("")
3290
3338
  })], NLDDInlineDialog.prototype, "icon", void 0);
3291
3339
  __decorate([property({
3292
- type: String,
3293
3340
  reflect: true,
3294
- attribute: "icon-color"
3341
+ attribute: "icon-color",
3342
+ converter: reflectNonDefault("")
3295
3343
  })], NLDDInlineDialog.prototype, "iconColor", void 0);
3296
3344
  __decorate([property({
3297
3345
  reflect: true,
@@ -3315,6 +3363,98 @@ __decorate([property({
3315
3363
  __decorate([state()], NLDDInlineDialog.prototype, "_hasContent", void 0);
3316
3364
  __decorate([state()], NLDDInlineDialog.prototype, "_hasActions", void 0);
3317
3365
  NLDDInlineDialog = __decorate([customElement("nldd-inline-dialog")], NLDDInlineDialog);
3366
+ // src/utilities/return-focus.ts
3367
+ /** The element that really holds focus, inside any shadow roots. */
3368
+ function deepActiveElement() {
3369
+ let el = document.activeElement;
3370
+ while (el?.shadowRoot?.activeElement) el = el.shadowRoot.activeElement;
3371
+ return el;
3372
+ }
3373
+ /**
3374
+ * Hands focus back to `target` once `overlay` (a popover, menu, sheet or window)
3375
+ * has closed. Call it after the close, with the element that had focus when the
3376
+ * overlay opened.
3377
+ *
3378
+ * - Focus the user moved elsewhere, by a click into a field or Tab out of the
3379
+ * overlay, stays there. Only focus still in the overlay, on nothing, or on
3380
+ * `target` itself is handed back.
3381
+ * - After the keyboard, `target` gets a plain `focus()` and its ring.
3382
+ * - After a mouse or a finger, it gets no ring. The browser's own close step
3383
+ * has often moved focus back already, and WebKit draws a ring for that
3384
+ * script focus. A second `focus()` would be a no-op, so it blurs first and
3385
+ * focuses with `focusVisible: false`. Chromium leaves the ring off itself.
3386
+ * A text field keeps its ring, as it does on any click.
3387
+ */
3388
+ function returnFocus(target, overlay) {
3389
+ if (!target || target === document.body || !target.isConnected) return;
3390
+ const active = deepActiveElement();
3391
+ const onTarget = !!active && isWithin(active, target);
3392
+ if (!(!active || active === document.body || onTarget || isWithin(active, overlay))) return;
3393
+ if (!isPointerMode()) {
3394
+ target.focus();
3395
+ return;
3396
+ }
3397
+ if (active && onTarget) {
3398
+ if (!active.matches(":focus-visible") || isTextEntry(active)) return;
3399
+ active.blur();
3400
+ }
3401
+ target.focus({ focusVisible: false });
3402
+ }
3403
+ /** Whether `node` is `container` or inside it, across shadow roots. */
3404
+ function isWithin(node, container) {
3405
+ for (let n = node; n; n = n.parentNode ?? (n instanceof ShadowRoot ? n.host : null)) if (n === container) return true;
3406
+ return false;
3407
+ }
3408
+ function isTextEntry(el) {
3409
+ if (el.isContentEditable || el instanceof HTMLTextAreaElement) return true;
3410
+ return el instanceof HTMLInputElement && ![
3411
+ "button",
3412
+ "checkbox",
3413
+ "color",
3414
+ "file",
3415
+ "image",
3416
+ "radio",
3417
+ "range",
3418
+ "reset",
3419
+ "submit"
3420
+ ].includes(el.type);
3421
+ }
3422
+ /**
3423
+ * Remembers where focus was when an overlay opened, and hands it back when it
3424
+ * closes, through `returnFocus`. One per overlay:
3425
+ *
3426
+ * ```ts
3427
+ * private _focusReturn = new FocusReturn();
3428
+ * // on open, before the overlay takes focus
3429
+ * this._focusReturn.remember(anchor);
3430
+ * // once it has closed
3431
+ * this._focusReturn.restore(this);
3432
+ * ```
3433
+ */
3434
+ var FocusReturn = class {
3435
+ constructor() {
3436
+ this._target = null;
3437
+ this._fallback = null;
3438
+ }
3439
+ /** Remembers what has focus now, inside any shadow roots, so focus goes
3440
+ * back to that element and not to the host it sits in. With nothing
3441
+ * focused, as after a click on a button in Safari, it remembers
3442
+ * `fallback`: an overlay's anchor, so Tab goes on from there. The
3443
+ * fallback also stands in for a remembered element that has left the page
3444
+ * by the time the overlay closes, as when a framework renders it anew. */
3445
+ remember(fallback) {
3446
+ const active = deepActiveElement();
3447
+ this._fallback = fallback ?? null;
3448
+ this._target = active && active !== document.body ? active : this._fallback;
3449
+ }
3450
+ /** Hands focus back once `overlay` has closed. */
3451
+ restore(overlay) {
3452
+ const target = this._target?.isConnected ? this._target : this._fallback;
3453
+ this._target = null;
3454
+ this._fallback = null;
3455
+ returnFocus(target, overlay);
3456
+ }
3457
+ };
3318
3458
  /**
3319
3459
  * The menu-item under a point, piercing shadow boundaries.
3320
3460
  * `document.elementFromPoint` stops at the outermost shadow host, so a menu
@@ -3336,6 +3476,22 @@ function menuItemFromPoint(x, y) {
3336
3476
  return null;
3337
3477
  }
3338
3478
  /**
3479
+ * The element under a point, in the tree of the menu it lies in. Like
3480
+ * `menuItemFromPoint` it descends shadow roots, but only until it reaches a
3481
+ * menu, so an item still resolves to the item and not to the inside of it.
3482
+ * Null where the point is on nothing.
3483
+ */
3484
+ function menuElementFromPoint(x, y) {
3485
+ let root = document;
3486
+ const MAX_PIERCE_DEPTH = 20;
3487
+ for (let depth = 0; depth < MAX_PIERCE_DEPTH; depth++) {
3488
+ const el = root.elementFromPoint(x, y);
3489
+ if (!el || el.closest("nldd-menu") || !el.shadowRoot) return el;
3490
+ root = el.shadowRoot;
3491
+ }
3492
+ return null;
3493
+ }
3494
+ /**
3339
3495
  * The pointer gestures of a menu, each with its own coordinates and listeners:
3340
3496
  *
3341
3497
  * 1. **Press, drag and release.** A native `<select>` lets you press on one
@@ -3673,7 +3829,7 @@ var SafeTriangleController = class {
3673
3829
  this.movingToward = false;
3674
3830
  this._lastPos = p;
3675
3831
  this._removeOverlay();
3676
- if (wasMoving) this._host.activateItemAt(p);
3832
+ if (wasMoving) this._host.releaseAt(p);
3677
3833
  }
3678
3834
  } else {
3679
3835
  const shape = wedge(this._apex, p, r);
@@ -3683,7 +3839,7 @@ var SafeTriangleController = class {
3683
3839
  this._lastPos = p;
3684
3840
  const opener = this._host.safeTriangleOpener;
3685
3841
  if (opener && this.movingToward && !opener.hasAttribute("highlighted")) this._host.highlightOpener();
3686
- if (wasMoving && !this.movingToward) this._host.activateItemAt(p);
3842
+ if (wasMoving && !this.movingToward) this._host.releaseAt(p);
3687
3843
  this._scheduleStall();
3688
3844
  }
3689
3845
  _clearStall() {
@@ -3698,7 +3854,7 @@ var SafeTriangleController = class {
3698
3854
  this._stallTimer = null;
3699
3855
  this.movingToward = false;
3700
3856
  this._apex = null;
3701
- if (this._lastPos) this._host.activateItemAt(this._lastPos);
3857
+ if (this._lastPos) this._host.releaseAt(this._lastPos);
3702
3858
  }, 500);
3703
3859
  }
3704
3860
  _drawOverlay(vertices) {
@@ -3793,7 +3949,7 @@ function syncListItemRole(host, variant) {
3793
3949
  * @attr {boolean} destructive - Marks the item as destructive (red text; red highlight bg). Use for irreversible actions like "Delete". Color is the only built-in signal, so per WCAG 1.4.1 the item's own label must convey the destructive nature (e.g. "Verwijder") — don't rely on the red alone. Confirming the action (e.g. a follow-up dialog) is the consumer's responsibility.
3794
3950
  * @attr {string} text - Display text. Supports **bold** markdown syntax.
3795
3951
  * @attr {string} details - Secondary label shown on the right side.
3796
- * @attr {string} icon - Icon name rendered before the text.
3952
+ * @attr {string} icon - Icon name rendered before the text. An icon in the `icon` slot takes its place.
3797
3953
  * @attr {string} shortcut - Keyboard shortcut hint shown on the right, e.g. 'Cmd+E'. Display only (rendered via nldd-keyboard-shortcut) — it does not bind the key; wire up the handling in your app. Hidden on touch-only devices, where it isn't invokable.
3798
3954
  * @attr {string} shortcut-mac / shortcut-windows / shortcut-linux - Per-OS overrides for `shortcut`, picked by detected OS (falls back to `shortcut`).
3799
3955
  * @attr {string} href - Optional link target. A plain button item with an href renders as an `<a>` so it is a real link (middle-click, open in new tab, copy link). Ignored for submenu openers, checkbox/radio items, and while disabled.
@@ -3805,6 +3961,8 @@ function syncListItemRole(host, variant) {
3805
3961
  * @attr {string} query - Query substring to bold-highlight in text. Set by menu's filter(); also settable by consumers.
3806
3962
  * @attr {string} query-mark-mode - 'match' | 'predictive' (default: 'predictive'). See text-cell for details.
3807
3963
  *
3964
+ * @slot icon - An icon of your own before the text, such as an `<img>`: one that is not in the icon set. Wins over `icon`.
3965
+ *
3808
3966
  * @fires select - Fired when the item is clicked and not disabled.
3809
3967
  */
3810
3968
  var NLDDMenuItem = class NLDDMenuItem extends LitElement {
@@ -3829,6 +3987,10 @@ var NLDDMenuItem = class NLDDMenuItem extends LitElement {
3829
3987
  this.menuVariant = null;
3830
3988
  this.checkColumn = false;
3831
3989
  this._submenuOpen = false;
3990
+ this._hasIconSlot = false;
3991
+ this._onIconSlotChange = (e) => {
3992
+ this._hasIconSlot = e.target.assignedElements().length > 0;
3993
+ };
3832
3994
  this._cachedSubmenuEl = null;
3833
3995
  this._submenuMutationObserver = null;
3834
3996
  }
@@ -3925,8 +4087,8 @@ __decorate([property({
3925
4087
  converter: reflectNonDefault("")
3926
4088
  })], NLDDMenuItem.prototype, "details", void 0);
3927
4089
  __decorate([property({
3928
- type: String,
3929
- reflect: true
4090
+ reflect: true,
4091
+ converter: reflectNonDefault("")
3930
4092
  })], NLDDMenuItem.prototype, "icon", void 0);
3931
4093
  __decorate([property({
3932
4094
  reflect: true,
@@ -3948,12 +4110,12 @@ __decorate([property({
3948
4110
  converter: reflectNonDefault("")
3949
4111
  })], NLDDMenuItem.prototype, "shortcutLinux", void 0);
3950
4112
  __decorate([property({
3951
- type: String,
3952
- reflect: true
4113
+ reflect: true,
4114
+ converter: reflectNonDefault("")
3953
4115
  })], NLDDMenuItem.prototype, "href", void 0);
3954
4116
  __decorate([property({
3955
- type: String,
3956
- reflect: true
4117
+ reflect: true,
4118
+ converter: reflectNonDefault("button")
3957
4119
  })], NLDDMenuItem.prototype, "type", void 0);
3958
4120
  __decorate([property({
3959
4121
  type: Boolean,
@@ -3964,8 +4126,8 @@ __decorate([property({
3964
4126
  reflect: true
3965
4127
  })], NLDDMenuItem.prototype, "disabled", void 0);
3966
4128
  __decorate([property({
3967
- type: String,
3968
- reflect: true
4129
+ reflect: true,
4130
+ converter: reflectNonDefault("")
3969
4131
  })], NLDDMenuItem.prototype, "value", void 0);
3970
4132
  __decorate([property({
3971
4133
  reflect: true,
@@ -3983,6 +4145,7 @@ __decorate([property({
3983
4145
  __decorate([state()], NLDDMenuItem.prototype, "menuVariant", void 0);
3984
4146
  __decorate([state()], NLDDMenuItem.prototype, "checkColumn", void 0);
3985
4147
  __decorate([state()], NLDDMenuItem.prototype, "_submenuOpen", void 0);
4148
+ __decorate([state()], NLDDMenuItem.prototype, "_hasIconSlot", void 0);
3986
4149
  if (!customElements.get("nldd-menu-item")) customElements.define("nldd-menu-item", NLDDMenuItem);
3987
4150
  // src/components/actions/menu/menu-group.ts
3988
4151
  var _NLDDMenuGroup;
@@ -4072,6 +4235,12 @@ function nameOfAnchor(anchor) {
4072
4235
  }
4073
4236
  /** How long the options have to stay the same before their number is said. */
4074
4237
  var ANNOUNCE_RESULTS_DELAY_MS = 500;
4238
+ /** A submenu opens when the pointer has not moved over its item for this long. */
4239
+ var HOVER_REST_MS = 40;
4240
+ /** Or when it moves slower than this, about 100 pixels a second. */
4241
+ var HOVER_SLOW_PX_PER_MS = .1;
4242
+ /** Or, at the latest, when it has stayed on the item this long. */
4243
+ var HOVER_OPEN_MAX_MS = 150;
4075
4244
  /**
4076
4245
  * A floating menu component using the Popover API.
4077
4246
  * Positioned relative to an anchor element using Floating UI.
@@ -4128,6 +4297,7 @@ var NLDDMenu = class NLDDMenu extends LitElement {
4128
4297
  this._parentMenu = null;
4129
4298
  this._parentItem = null;
4130
4299
  this._isOpen = false;
4300
+ this._focusReturn = new FocusReturn();
4131
4301
  this._previousAnchorForResync = null;
4132
4302
  this._collapsedByPointerGesture = false;
4133
4303
  this._cleanupAutoUpdate = null;
@@ -4156,7 +4326,10 @@ var NLDDMenu = class NLDDMenu extends LitElement {
4156
4326
  if (this._isOpen) this.hidePopover();
4157
4327
  else this.showPopover();
4158
4328
  };
4329
+ this._hoverOpenItem = null;
4159
4330
  this._hoverOpenTimer = null;
4331
+ this._hoverOpenDeadline = 0;
4332
+ this._lastHoverMove = null;
4160
4333
  this._safeTriangle = new SafeTriangleController(this);
4161
4334
  this._handleMenuItemMouseenter = (event) => {
4162
4335
  if (isTouchMode()) return;
@@ -4166,14 +4339,33 @@ var NLDDMenu = class NLDDMenu extends LitElement {
4166
4339
  };
4167
4340
  this._handleMouseover = (event) => {
4168
4341
  if (isTouchMode() || this.variant === "listbox") return;
4169
- if (this._activeSubmenu || this._safeTriangle.movingToward) return;
4170
4342
  if (event.composedPath().some((node) => node instanceof Element && node.localName === "nldd-menu-item")) return;
4171
- this._clearHighlight();
4343
+ if (this._safeTriangle.movingToward) return;
4344
+ this._leaveItems();
4172
4345
  };
4173
4346
  this._handleMouseleave = () => {
4174
4347
  if (this.variant !== "listbox") this._clearHighlight();
4175
4348
  this._cancelHoverOpen();
4176
4349
  };
4350
+ this._handleHoverMove = (event) => {
4351
+ const item = this._hoverOpenItem;
4352
+ if (!item || !event.composedPath().includes(item)) return;
4353
+ const last = this._lastHoverMove;
4354
+ this._lastHoverMove = {
4355
+ x: event.clientX,
4356
+ y: event.clientY,
4357
+ t: event.timeStamp
4358
+ };
4359
+ if (last) {
4360
+ const elapsed = event.timeStamp - last.t;
4361
+ const distance = Math.hypot(event.clientX - last.x, event.clientY - last.y);
4362
+ if (elapsed > 0 && distance > 0 && distance / elapsed < HOVER_SLOW_PX_PER_MS) {
4363
+ this._openHoverItem();
4364
+ return;
4365
+ }
4366
+ }
4367
+ this._waitForRest();
4368
+ };
4177
4369
  this._handleMenuItemFocused = (event) => {
4178
4370
  const item = event.target.closest("nldd-menu-item");
4179
4371
  if (!item || item.disabled || item.hasAttribute("hidden")) return;
@@ -4327,7 +4519,9 @@ var NLDDMenu = class NLDDMenu extends LitElement {
4327
4519
  });
4328
4520
  };
4329
4521
  this._handleBeforeToggle = (event) => {
4330
- if (event.newState === "open") this.removeAttribute("positioned");
4522
+ if (event.newState !== "open") return;
4523
+ this.removeAttribute("positioned");
4524
+ if (this.variant !== "listbox" && !this._isSubmenu) this._focusReturn.remember(this._getAnchorEl());
4331
4525
  };
4332
4526
  this._handleToggle = async (event) => {
4333
4527
  const toggleEvent = event;
@@ -4341,6 +4535,7 @@ var NLDDMenu = class NLDDMenu extends LitElement {
4341
4535
  document.removeEventListener("pointerdown", this._handleDocumentPointerdown, true);
4342
4536
  this._pointer.stopOutsideTap();
4343
4537
  this._clearHighlight();
4538
+ this._focusReturn.restore(this);
4344
4539
  return;
4345
4540
  }
4346
4541
  this._updateDividerVisibility();
@@ -4526,7 +4721,7 @@ var NLDDMenu = class NLDDMenu extends LitElement {
4526
4721
  }
4527
4722
  /**
4528
4723
  * Item-activation logic shared between the native `mouseenter` capture
4529
- * handler and the safe-triangle recovery paths (sideways exit, direction
4724
+ * handler and the safe triangle's `releaseAt` (sideways exit, direction
4530
4725
  * reversal, stall dismissal). Those paths know which item is under the
4531
4726
  * cursor — they don't need to synthesize a MouseEvent just to re-enter
4532
4727
  * the handler. Factoring out the body keeps the entry contracts honest:
@@ -4541,24 +4736,57 @@ var NLDDMenu = class NLDDMenu extends LitElement {
4541
4736
  if (this._drillInMode) return;
4542
4737
  if (this._activeSubmenu && item !== this._activeSubmenuOpener) this._activeSubmenu.hidePopover?.();
4543
4738
  this._cancelHoverOpen();
4544
- if (item._hasSubmenu && this._activeSubmenuOpener !== item) this._hoverOpenTimer = window.setTimeout(() => {
4545
- this._hoverOpenTimer = null;
4546
- item._handleClick();
4547
- }, 150);
4548
- }
4549
- /** @internal Resolve the menu-item under a viewport point and activate it
4550
- * via `_activateItem`. Used by the safe triangle, whose natural mouseenter
4551
- * has already fired (and bailed): it re-triggers activation without
4552
- * synthesizing a MouseEvent. */
4553
- activateItemAt(p) {
4554
- const item = document.elementFromPoint(p.x, p.y)?.closest("nldd-menu-item");
4739
+ if (item._hasSubmenu && this._activeSubmenuOpener !== item) this._scheduleHoverOpen(item);
4740
+ }
4741
+ /** @internal For the safe triangle: the cursor has turned away from the
4742
+ * submenu, or stalled, at `p`. An item of this menu there takes over, as its
4743
+ * mouseenter would have while the cursor was protected. Anything else in or
4744
+ * out of this menu (a divider, the padding, the page) leaves the items. A
4745
+ * point in another menu is that menu's to handle: a menu is an auto
4746
+ * popover, so the only other one open is a submenu in this chain. */
4747
+ releaseAt(p) {
4748
+ const el = menuElementFromPoint(p.x, p.y);
4749
+ const menu = el?.closest("nldd-menu");
4750
+ if (menu && menu !== this) return;
4751
+ const item = el?.closest("nldd-menu-item");
4555
4752
  if (item) this._activateItem(item);
4753
+ else this._leaveItems();
4754
+ }
4755
+ /** The pointer is over none of this menu's items: nothing stays open or
4756
+ * highlighted for an item it has left. */
4757
+ _leaveItems() {
4758
+ this._cancelHoverOpen();
4759
+ this._activeSubmenu?.hidePopover?.();
4760
+ if (this.variant !== "listbox") this._clearHighlight();
4761
+ }
4762
+ /**
4763
+ * Opens the item's submenu once the pointer comes to rest on it: it stops
4764
+ * ({@link HOVER_REST_MS} without a move), slows below
4765
+ * {@link HOVER_SLOW_PX_PER_MS}, or has stayed on the item for
4766
+ * {@link HOVER_OPEN_MAX_MS}. A pointer passing over the menu on its way
4767
+ * somewhere does none of that, so it opens nothing.
4768
+ */
4769
+ _scheduleHoverOpen(item) {
4770
+ this._hoverOpenItem = item;
4771
+ this._hoverOpenDeadline = performance.now() + HOVER_OPEN_MAX_MS;
4772
+ this._waitForRest();
4773
+ }
4774
+ /** (Re)starts the wait for the pointer to rest, never past the deadline. */
4775
+ _waitForRest() {
4776
+ if (this._hoverOpenTimer !== null) clearTimeout(this._hoverOpenTimer);
4777
+ const wait = Math.min(HOVER_REST_MS, this._hoverOpenDeadline - performance.now());
4778
+ this._hoverOpenTimer = window.setTimeout(() => this._openHoverItem(), Math.max(0, wait));
4779
+ }
4780
+ _openHoverItem() {
4781
+ const item = this._hoverOpenItem;
4782
+ this._cancelHoverOpen();
4783
+ item?._handleClick();
4556
4784
  }
4557
4785
  _cancelHoverOpen() {
4558
- if (this._hoverOpenTimer !== null) {
4559
- clearTimeout(this._hoverOpenTimer);
4560
- this._hoverOpenTimer = null;
4561
- }
4786
+ if (this._hoverOpenTimer !== null) clearTimeout(this._hoverOpenTimer);
4787
+ this._hoverOpenTimer = null;
4788
+ this._hoverOpenItem = null;
4789
+ this._lastHoverMove = null;
4562
4790
  }
4563
4791
  static _getDrillInModeQuery() {
4564
4792
  if (NLDDMenu._drillInModeQuery === null) NLDDMenu._drillInModeQuery = matchMedia(`(pointer: coarse), (max-width: ${queryBreakpoints.smMax})`);
@@ -4593,6 +4821,7 @@ var NLDDMenu = class NLDDMenu extends LitElement {
4593
4821
  this.addEventListener("focusout", this._handleFocusOut);
4594
4822
  this.addEventListener("mouseenter", this._handleMenuItemMouseenter, true);
4595
4823
  this.addEventListener("mouseover", this._handleMouseover);
4824
+ this.addEventListener("mousemove", this._handleHoverMove);
4596
4825
  this.addEventListener("mouseleave", this._handleMouseleave);
4597
4826
  this.addEventListener("menu-item-focused", this._handleMenuItemFocused);
4598
4827
  this.addEventListener("submenu-open", this._handleSubmenuOpen);
@@ -4625,6 +4854,7 @@ var NLDDMenu = class NLDDMenu extends LitElement {
4625
4854
  this._tabbing = false;
4626
4855
  this.removeEventListener("mouseenter", this._handleMenuItemMouseenter, true);
4627
4856
  this.removeEventListener("mouseover", this._handleMouseover);
4857
+ this.removeEventListener("mousemove", this._handleHoverMove);
4628
4858
  this.removeEventListener("mouseleave", this._handleMouseleave);
4629
4859
  this.removeEventListener("menu-item-focused", this._handleMenuItemFocused);
4630
4860
  this.removeEventListener("submenu-open", this._handleSubmenuOpen);
@@ -4914,13 +5144,10 @@ __decorate([property({
4914
5144
  reflect: true,
4915
5145
  converter: reflectNonDefault("menu")
4916
5146
  })], NLDDMenu.prototype, "variant", void 0);
5147
+ __decorate([property({ type: String })], NLDDMenu.prototype, "width", void 0);
4917
5148
  __decorate([property({
4918
- type: String,
4919
- reflect: true
4920
- })], NLDDMenu.prototype, "width", void 0);
4921
- __decorate([property({
4922
- type: String,
4923
- reflect: true
5149
+ reflect: true,
5150
+ converter: reflectNonDefault("")
4924
5151
  })], NLDDMenu.prototype, "anchor", void 0);
4925
5152
  __decorate([property({ attribute: false })], NLDDMenu.prototype, "anchorElement", void 0);
4926
5153
  __decorate([property({ attribute: "accessible-label" })], NLDDMenu.prototype, "accessibleLabel", void 0);
@@ -5316,6 +5543,15 @@ var _NLDDButtonBar;
5316
5543
  */
5317
5544
  if (!customElements.get("nldd-button-bar-divider")) customElements.define("nldd-button-bar-divider", class extends HTMLElement {});
5318
5545
  var BUTTON_TAGS = ["nldd-button", "nldd-icon-button"];
5546
+ /**
5547
+ * Hands a value the bar decides to a button. The property, not the attribute:
5548
+ * a framework such as Vue sets these as properties, only the property
5549
+ * overrides that, and the button's converter leaves no attribute at its default.
5550
+ */
5551
+ function assign(el, name, value) {
5552
+ if (name in el) el[name] = value;
5553
+ else el.setAttribute(name, value);
5554
+ }
5319
5555
  var NLDDButtonBar = (_NLDDButtonBar = class NLDDButtonBar extends LitElement {
5320
5556
  constructor(..._args) {
5321
5557
  super(..._args);
@@ -5358,10 +5594,10 @@ var NLDDButtonBar = (_NLDDButtonBar = class NLDDButtonBar extends LitElement {
5358
5594
  if (BUTTON_TAGS.includes(target.tagName.toLowerCase())) target.removeAttribute("data-focused");
5359
5595
  }
5360
5596
  _propagateSize() {
5361
- Array.from(this.children).filter((el) => BUTTON_TAGS.includes(el.tagName.toLowerCase())).forEach((el) => el.setAttribute("size", this.size));
5597
+ Array.from(this.children).filter((el) => BUTTON_TAGS.includes(el.tagName.toLowerCase())).forEach((el) => assign(el, "size", this.size));
5362
5598
  }
5363
5599
  _propagateAppearance() {
5364
- Array.from(this.children).filter((el) => BUTTON_TAGS.includes(el.tagName.toLowerCase())).forEach((el) => el.setAttribute("appearance", this.appearance));
5600
+ Array.from(this.children).filter((el) => BUTTON_TAGS.includes(el.tagName.toLowerCase())).forEach((el) => assign(el, "appearance", this.appearance));
5365
5601
  }
5366
5602
  _propagateDisabled() {
5367
5603
  const buttons = Array.from(this.children).filter((el) => BUTTON_TAGS.includes(el.tagName.toLowerCase()));
@@ -5388,8 +5624,8 @@ var NLDDButtonBar = (_NLDDButtonBar = class NLDDButtonBar extends LitElement {
5388
5624
  id: this._idCounter++
5389
5625
  };
5390
5626
  if (BUTTON_TAGS.includes(tag)) {
5391
- el.setAttribute("size", this.size);
5392
- el.setAttribute("appearance", this.appearance);
5627
+ assign(el, "size", this.size);
5628
+ assign(el, "appearance", this.appearance);
5393
5629
  el.setAttribute("no-highlight-border", "");
5394
5630
  }
5395
5631
  const id = this._idCounter++;
@@ -6167,12 +6403,12 @@ __decorate([property({
6167
6403
  converter: reflectNonDefault("")
6168
6404
  })], NLDDToolbarTitle.prototype, "supportingText", void 0);
6169
6405
  __decorate([property({
6170
- type: String,
6171
- reflect: true
6406
+ reflect: true,
6407
+ converter: reflectNonDefault("")
6172
6408
  })], NLDDToolbarTitle.prototype, "href", void 0);
6173
6409
  __decorate([property({
6174
- type: String,
6175
- reflect: true
6410
+ reflect: true,
6411
+ converter: reflectNonDefault("")
6176
6412
  })], NLDDToolbarTitle.prototype, "target", void 0);
6177
6413
  __decorate([property({ type: Object })], NLDDToolbarTitle.prototype, "translations", void 0);
6178
6414
  __decorate([property({
@@ -7103,8 +7339,8 @@ __decorate([property({
7103
7339
  converter: reflectNonDefault("delay")
7104
7340
  })], NLDDAvatar.prototype, "tooltipTiming", void 0);
7105
7341
  __decorate([property({
7106
- type: String,
7107
- reflect: true
7342
+ reflect: true,
7343
+ converter: reflectNonDefault("")
7108
7344
  })], NLDDAvatar.prototype, "href", void 0);
7109
7345
  __decorate([property({
7110
7346
  type: Boolean,
@@ -7909,7 +8145,7 @@ var NLDDPopover = (_NLDDPopover2 = class NLDDPopover extends LitElement {
7909
8145
  this.translations = {};
7910
8146
  this.open = false;
7911
8147
  this._isOpen = false;
7912
- this._previousFocus = null;
8148
+ this._focusReturn = new FocusReturn();
7913
8149
  this._pointerdownOnAnchorWhileOpen = false;
7914
8150
  this._cleanupAutoUpdate = null;
7915
8151
  this._smQuery = null;
@@ -7966,7 +8202,9 @@ var NLDDPopover = (_NLDDPopover2 = class NLDDPopover extends LitElement {
7966
8202
  else this.showPopover();
7967
8203
  };
7968
8204
  this._handleBeforeToggle = (event) => {
7969
- if (event.newState === "open") this.removeAttribute("positioned");
8205
+ if (event.newState !== "open") return;
8206
+ this.removeAttribute("positioned");
8207
+ this._focusReturn.remember(this._getAnchorEl());
7970
8208
  };
7971
8209
  this._handleToggle = async (event) => {
7972
8210
  const toggleEvent = event;
@@ -7976,14 +8214,13 @@ var NLDDPopover = (_NLDDPopover2 = class NLDDPopover extends LitElement {
7976
8214
  if (toggleEvent.newState !== "open") {
7977
8215
  this._cleanupAutoUpdate?.();
7978
8216
  this._cleanupAutoUpdate = null;
7979
- this._returnFocus();
8217
+ this._focusReturn.restore(this);
7980
8218
  this.dispatchEvent(new CustomEvent("close", {
7981
8219
  bubbles: false,
7982
8220
  composed: true
7983
8221
  }));
7984
8222
  return;
7985
8223
  }
7986
- this._previousFocus = document.activeElement ?? this._getAnchorEl();
7987
8224
  await this.reposition();
7988
8225
  this.setAttribute("positioned", "");
7989
8226
  const anchorEl = this._getAnchorEl();
@@ -8001,7 +8238,6 @@ var NLDDPopover = (_NLDDPopover2 = class NLDDPopover extends LitElement {
8001
8238
  event.preventDefault();
8002
8239
  event.stopPropagation();
8003
8240
  this.hide();
8004
- this._getAnchorEl()?.focus();
8005
8241
  return;
8006
8242
  }
8007
8243
  if (event.key !== "Tab") return;
@@ -8217,11 +8453,6 @@ var NLDDPopover = (_NLDDPopover2 = class NLDDPopover extends LitElement {
8217
8453
  }
8218
8454
  this.focus();
8219
8455
  }
8220
- _returnFocus() {
8221
- const target = this._previousFocus ?? this._getAnchorEl();
8222
- this._previousFocus = null;
8223
- target?.focus();
8224
- }
8225
8456
  _getFocusables() {
8226
8457
  const selector = [
8227
8458
  "a[href]",
@@ -8266,8 +8497,8 @@ __decorate([property({
8266
8497
  attribute: "sm-full-height"
8267
8498
  })], NLDDPopover.prototype, "smFullHeight", void 0);
8268
8499
  __decorate([property({
8269
- type: String,
8270
- reflect: true
8500
+ reflect: true,
8501
+ converter: reflectNonDefault("")
8271
8502
  })], NLDDPopover.prototype, "anchor", void 0);
8272
8503
  __decorate([property({ attribute: false })], NLDDPopover.prototype, "anchorElement", void 0);
8273
8504
  __decorate([property({
@@ -9558,9 +9789,10 @@ var pageStyles = css`
9558
9789
  opacity: 0;
9559
9790
  }
9560
9791
 
9561
- /* Root-scroll mode: footer sticks to the document bottom, above any bottom bars. */
9792
+ /* Root-scroll mode: the footer sits inside .page__scroll, where the inset
9793
+ already holds its own height. */
9562
9794
  :host([data-scroll="root"][sticky-footer]) .page__footer {
9563
- bottom: var(--context-inset-bottom, 0px);
9795
+ bottom: var(--_page-outer-inset-bottom);
9564
9796
  }
9565
9797
  `;
9566
9798
  // src/components/layout/page/page.template.ts
@@ -9951,8 +10183,8 @@ var NLDDPage = (_NLDDPage = class NLDDPage extends LitElement {
9951
10183
  }
9952
10184
  }, _NLDDPage.styles = pageStyles, _NLDDPage);
9953
10185
  __decorate([property({
9954
- type: String,
9955
- reflect: true
10186
+ reflect: true,
10187
+ converter: reflectNonDefault("inherit")
9956
10188
  })], NLDDPage.prototype, "background", void 0);
9957
10189
  __decorate([property({
9958
10190
  type: String,
@@ -9969,8 +10201,8 @@ __decorate([property({
9969
10201
  attribute: "sticky-footer"
9970
10202
  })], NLDDPage.prototype, "stickyFooter", void 0);
9971
10203
  __decorate([property({
9972
- type: String,
9973
- reflect: true
10204
+ reflect: true,
10205
+ converter: reflectNonDefault("auto")
9974
10206
  })], NLDDPage.prototype, "landmarks", void 0);
9975
10207
  __decorate([state()], NLDDPage.prototype, "_scrolled", void 0);
9976
10208
  __decorate([state()], NLDDPage.prototype, "_atEnd", void 0);
@@ -11151,6 +11383,7 @@ var NLDDList = (_NLDDList2 = class NLDDList extends LitElement {
11151
11383
  this._syncUnmanagedControls();
11152
11384
  }
11153
11385
  if (changed.has("appearance")) this._updateItemContext();
11386
+ if (changed.has("dividers") && changed.get("dividers") !== void 0) this._getItems().forEach((item) => item._measureDividerMarkers());
11154
11387
  if (changed.has("type")) {
11155
11388
  this._applyHostType();
11156
11389
  if (changed.get("type") === "listbox" && this.type !== "listbox") {
@@ -11738,8 +11971,8 @@ __decorate([property({
11738
11971
  converter: reflectNonDefault("always")
11739
11972
  })], NLDDList.prototype, "dividers", void 0);
11740
11973
  __decorate([property({
11741
- type: String,
11742
- reflect: true
11974
+ reflect: true,
11975
+ converter: reflectNonDefault("")
11743
11976
  })], NLDDList.prototype, "height", void 0);
11744
11977
  __decorate([property({
11745
11978
  type: String,
@@ -11953,11 +12186,17 @@ var listItemStyles = css`
11953
12186
  --context-content-secondary-color: var(--semantics-list-items-is-selected-content-color);
11954
12187
  }
11955
12188
 
12189
+ /* On the row, not the host, so a ring inside matches the fill without
12190
+ reaching the child rows. :where keeps it as light as the fill it mirrors. */
12191
+ :host(:where([selected], [checkbox][checked], [current], [data-current])) .list-item {
12192
+ --context-parent-background-color: var(--semantics-list-items-is-selected-background-color);
12193
+ }
11956
12194
 
11957
12195
  /* A checked checkbox action selects the whole row, so the fill runs across
11958
12196
  the disclosure action too instead of stopping at its boundary. */
11959
12197
  .list-item.is-action-checked {
11960
12198
  --_list-item-background-color: var(--semantics-list-items-is-selected-background-color);
12199
+ --context-parent-background-color: var(--semantics-list-items-is-selected-background-color);
11961
12200
  --context-content-color: var(--semantics-list-items-is-selected-content-color);
11962
12201
  --context-content-secondary-color: var(--semantics-list-items-is-selected-content-color);
11963
12202
  }
@@ -11972,6 +12211,7 @@ var listItemStyles = css`
11972
12211
  @media (hover: hover) {
11973
12212
  :host(:not([disabled])) .list-item__action:hover {
11974
12213
  --_list-item-background-color: var(--semantics-list-items-is-hovered-background-color);
12214
+ --context-parent-background-color: var(--semantics-list-items-is-hovered-background-color);
11975
12215
  --context-content-color: var(--semantics-list-items-is-hovered-content-color);
11976
12216
  --context-content-secondary-color: var(--semantics-list-items-is-hovered-content-color);
11977
12217
  }
@@ -11979,6 +12219,7 @@ var listItemStyles = css`
11979
12219
  :host(:is([selected], [checkbox][checked]):not([disabled])) .list-item__action:hover,
11980
12220
  :host(:is([current], [data-current]):not([disabled])) .list-item__action:hover {
11981
12221
  --_list-item-background-color: var(--semantics-list-items-is-selected-is-hovered-background-color);
12222
+ --context-parent-background-color: var(--semantics-list-items-is-selected-is-hovered-background-color);
11982
12223
  --context-content-color: var(--semantics-list-items-is-selected-content-color);
11983
12224
  --context-content-secondary-color: var(--semantics-list-items-is-selected-content-color);
11984
12225
  }
@@ -12009,6 +12250,7 @@ var listItemStyles = css`
12009
12250
  hovering it as well, and the state it just gave focus to has to win. */
12010
12251
  :host(:is([current], [data-current]):focus-within) .list-item,
12011
12252
  :host(:is([current], [data-current]):focus-within) .list-item__action {
12253
+ --context-parent-background-color: var(--semantics-list-items-is-highlighted-background-color);
12012
12254
  --context-content-color: var(--semantics-list-items-is-highlighted-content-color);
12013
12255
  --context-content-secondary-color: var(--semantics-list-items-is-highlighted-content-color);
12014
12256
  }
@@ -12045,6 +12287,7 @@ var listItemStyles = css`
12045
12287
  /* The content color has to travel with the fill: the neutral press rule
12046
12288
  above sets it too, and black on a deep accent is unreadable. */
12047
12289
  :host(:is([current], [data-current]):focus-within:not([disabled])) .list-item__action:hover {
12290
+ --context-parent-background-color: var(--semantics-list-items-is-highlighted-is-hovered-background-color);
12048
12291
  --context-content-color: var(--semantics-list-items-is-highlighted-content-color);
12049
12292
  --context-content-secondary-color: var(--semantics-list-items-is-highlighted-content-color);
12050
12293
  }
@@ -12053,6 +12296,7 @@ var listItemStyles = css`
12053
12296
  the press (pointercancel) instead of flashing it. */
12054
12297
  :host(:not([disabled])) .list-item__action.is-pressed {
12055
12298
  --_list-item-background-color: var(--semantics-list-items-is-active-background-color);
12299
+ --context-parent-background-color: var(--semantics-list-items-is-active-background-color);
12056
12300
  --context-content-color: var(--semantics-list-items-is-active-content-color);
12057
12301
  --context-content-secondary-color: var(--semantics-list-items-is-active-content-color);
12058
12302
  }
@@ -12060,12 +12304,14 @@ var listItemStyles = css`
12060
12304
  :host(:is([selected], [checkbox][checked]):not([disabled])) .list-item__action.is-pressed,
12061
12305
  :host(:is([current], [data-current]):not([disabled])) .list-item__action.is-pressed {
12062
12306
  --_list-item-background-color: var(--semantics-list-items-is-selected-is-active-background-color);
12307
+ --context-parent-background-color: var(--semantics-list-items-is-selected-is-active-background-color);
12063
12308
  --context-content-color: var(--semantics-list-items-is-selected-content-color);
12064
12309
  --context-content-secondary-color: var(--semantics-list-items-is-selected-content-color);
12065
12310
  }
12066
12311
 
12067
12312
  :host(:is([selected], [checkbox][checked])) .list-item__action {
12068
12313
  --_list-item-background-color: var(--semantics-list-items-is-selected-background-color);
12314
+ --context-parent-background-color: var(--semantics-list-items-is-selected-background-color);
12069
12315
  --context-content-color: var(--semantics-list-items-is-selected-content-color);
12070
12316
  --context-content-secondary-color: var(--semantics-list-items-is-selected-content-color);
12071
12317
  }
@@ -12078,9 +12324,16 @@ var listItemStyles = css`
12078
12324
  --context-content-secondary-color: var(--semantics-list-items-is-highlighted-content-color);
12079
12325
  }
12080
12326
 
12327
+ /* The same two selectors as the fill above, so the hover rule cannot win. */
12328
+ :host(:is([current], [data-current]):not([disabled])) .list-item__action.is-pressed,
12329
+ :host(:is([current], [data-current]):focus-within:not([disabled])) .list-item__action.is-pressed {
12330
+ --context-parent-background-color: var(--semantics-list-items-is-highlighted-is-active-background-color);
12331
+ }
12332
+
12081
12333
  .list-item.is-highlighted,
12082
12334
  :host(:is([selected], [checkbox][checked])) .list-item.is-highlighted .list-item__action {
12083
12335
  --_list-item-background-color: var(--semantics-list-items-is-highlighted-background-color);
12336
+ --context-parent-background-color: var(--semantics-list-items-is-highlighted-background-color);
12084
12337
  --context-content-color: var(--semantics-list-items-is-highlighted-content-color);
12085
12338
  --context-content-secondary-color: var(--semantics-list-items-is-highlighted-content-color);
12086
12339
  }
@@ -12714,14 +12967,6 @@ var NLDDListItem = (_NLDDListItem2 = class NLDDListItem extends withTranslations
12714
12967
  else action?.removeAttribute("aria-current");
12715
12968
  }
12716
12969
  /**
12717
- * Measures the divider markers and writes the result as `--_list-item-divider-inset-
12718
- * start/-end` on the host. No markers → the vars are cleared and CSS falls
12719
- * back to the content width. Union semantics: the divider runs from the
12720
- * FIRST `divider-start` to the LAST `divider-end`; a side without markers
12721
- * keeps its default. Insets are measured against the row block (the widened
12722
- * box on interactive rows), so the values compose with the edge geometry.
12723
- */
12724
- /**
12725
12970
  * The cell the divider starts at when nobody said otherwise: the row's first
12726
12971
  * text or title cell. The line lands on the words rather than on whatever
12727
12972
  * leads up to them — an icon, an avatar, a checkbox, or the spacers a tree
@@ -12732,11 +12977,23 @@ var NLDDListItem = (_NLDDListItem2 = class NLDDListItem extends withTranslations
12732
12977
  _implicitDividerStart() {
12733
12978
  return this._ownDescendants("nldd-text-cell, nldd-title-cell");
12734
12979
  }
12980
+ /**
12981
+ * Measures the divider markers and writes the result as `--_list-item-divider-inset-
12982
+ * start/-end` on the host. No markers → the vars are cleared and CSS falls
12983
+ * back to the content width. Union semantics: the divider runs from the
12984
+ * FIRST `divider-start` to the LAST `divider-end`; a side without markers
12985
+ * keeps its default. Insets are measured against the row block (the widened
12986
+ * box on interactive rows), so the values compose with the edge geometry.
12987
+ * A list with `dividers="never"` draws no line, so its rows measure nothing.
12988
+ *
12989
+ * @internal Also called by the list when its `dividers` changes.
12990
+ */
12735
12991
  _measureDividerMarkers() {
12736
12992
  if (this.hasAttribute("data-nldd-clone")) return;
12737
- const explicitStarts = this._ownDescendants("[divider-start]");
12738
- const starts = explicitStarts.length ? explicitStarts : this._implicitDividerStart();
12739
- const ends = this._ownDescendants("[divider-end]");
12993
+ const drawsDivider = this._parentList?.getAttribute("dividers") !== "never";
12994
+ const explicitStarts = drawsDivider ? this._ownDescendants("[divider-start]") : [];
12995
+ const starts = !drawsDivider ? [] : explicitStarts.length ? explicitStarts : this._implicitDividerStart();
12996
+ const ends = drawsDivider ? this._ownDescendants("[divider-end]") : [];
12740
12997
  const targets = starts.length || ends.length ? [
12741
12998
  this,
12742
12999
  ...starts,
@@ -13351,8 +13608,8 @@ var NLDDAvatarGroup = (_NLDDAvatarGroup = class NLDDAvatarGroup extends withTran
13351
13608
  }
13352
13609
  }, _NLDDAvatarGroup.styles = avatarGroupStyles, _NLDDAvatarGroup);
13353
13610
  __decorate([property({
13354
- type: String,
13355
- reflect: true
13611
+ reflect: true,
13612
+ converter: reflectNonDefault("40")
13356
13613
  })], NLDDAvatarGroup.prototype, "size", void 0);
13357
13614
  __decorate([property({
13358
13615
  type: Number,
@@ -15770,9 +16027,9 @@ __decorate([property({
15770
16027
  attribute: "fetchpriority"
15771
16028
  })], NLDDImage.prototype, "fetchPriority", void 0);
15772
16029
  __decorate([property({
15773
- type: String,
16030
+ reflect: true,
15774
16031
  attribute: "aspect-ratio",
15775
- reflect: true
16032
+ converter: reflectNonDefault("")
15776
16033
  })], NLDDImage.prototype, "aspectRatio", void 0);
15777
16034
  __decorate([property({
15778
16035
  reflect: true,
@@ -16189,12 +16446,12 @@ function template$13(component) {
16189
16446
  >
16190
16447
  ${showIcon ? html`
16191
16448
  <span class="tag__icon">
16192
- ${component.icon ? html`<nldd-icon icon=${component.icon}></nldd-icon>` : html`<slot name="icon">${variant === "icon" ? html`<nldd-icon icon="icon-placeholder"></nldd-icon>` : nothing}</slot>`}
16449
+ <slot name="icon">${component.icon ? html`<nldd-icon icon=${component.icon}></nldd-icon>` : variant === "icon" ? html`<nldd-icon icon="icon-placeholder"></nldd-icon>` : nothing}</slot>
16193
16450
  </span>
16194
16451
  ` : nothing}
16195
16452
  ${showText ? html`
16196
16453
  <span class="tag__text">
16197
- ${component.text ? component.text : html`<slot></slot>`}
16454
+ ${component._hasSlotText ? nothing : component.text}<slot></slot>
16198
16455
  </span>
16199
16456
  ` : nothing}
16200
16457
  </span>
@@ -16216,12 +16473,12 @@ function template$13(component) {
16216
16473
  * @attr {string} variant - What is visible: 'text' | 'icon' | 'icon-and-text'. Unset → detected from which of text/icon is present.
16217
16474
  * @attr {string} color - Color variant. Semantic: 'neutral' | 'accent' | 'success' | 'warning' | 'critical'. Rijkshuisstijl colors: 'lintblauw' | 'donkerblauw' | 'hemelblauw' | 'lichtblauw' | 'paars' | 'violet' | 'robijnrood' | 'roze' | 'rood' | 'oranje' | 'donkergeel' | 'geel' | 'donkerbruin' | 'bruin' | 'donkergroen' | 'groen' | 'mosgroen' | 'mintgroen'. (default: 'neutral')
16218
16475
  * @attr {string} size - Tag size: 'sm' | 'md' (default: 'md')
16219
- * @attr {string} text - Tag text (alternative to the default slot)
16476
+ * @attr {string} text - Tag text. Content in the default slot wins.
16220
16477
  * @attr {string} icon - Icon before the text
16221
16478
  * @attr {string} accessible-label - Accessible label for screen readers. Use this on icon-only tags without visible text.
16222
16479
  *
16223
- * @slot - Tag text
16224
- * @slot icon - Custom icon before the text
16480
+ * @slot - Tag text. Wins over `text`.
16481
+ * @slot icon - Custom icon before the text. Wins over `icon`.
16225
16482
  */
16226
16483
  var _NLDDTag = class NLDDTag extends LitElement {
16227
16484
  constructor(..._args) {
@@ -17212,6 +17469,7 @@ function titleTemplate(component) {
17212
17469
  * @slot supporting-text - Supporting text that is more than text. Takes the place of the supporting-text attribute.
17213
17470
  * @slot end - Whatever belongs at the end of the title line: a button, a menu, a status badge, a version. Named for the position, not for a kind of content, because anything can sit there.
17214
17471
  */
17472
+ var title_exports = /* @__PURE__ */ __exportAll({ NLDDTitle: () => NLDDTitle });
17215
17473
  var _NLDDTitle = class NLDDTitle extends LitElement {
17216
17474
  constructor(..._args) {
17217
17475
  super(..._args);
@@ -17256,8 +17514,8 @@ var _NLDDTitle = class NLDDTitle extends LitElement {
17256
17514
  };
17257
17515
  var NLDDTitle = (_NLDDTitle.styles = titleStyles, _NLDDTitle);
17258
17516
  __decorate([property({
17259
- type: Number,
17260
- reflect: true
17517
+ reflect: true,
17518
+ converter: reflectNonDefault(3)
17261
17519
  })], NLDDTitle.prototype, "size", void 0);
17262
17520
  __decorate([property({
17263
17521
  reflect: true,
@@ -17428,7 +17686,7 @@ var tokenStyles = css`
17428
17686
  function tokenTemplate(component) {
17429
17687
  return html`
17430
17688
  <div class="token">
17431
- <span class="token__text">${component.text || html`<slot></slot>`}</span>
17689
+ <span class="token__text">${component._textSlot.has ? nothing : component.text}<slot @slotchange=${component._textSlot.onChange}></slot></span>
17432
17690
  ${component.control === "dismiss" ? html`
17433
17691
  <div class="token__dismiss-action">
17434
17692
  <nldd-icon-button
@@ -17479,7 +17737,7 @@ function tokenTemplate(component) {
17479
17737
  *
17480
17738
  * @element nldd-token
17481
17739
  *
17482
- * @attr {string} text - Token text; falls back to the default slot when unset.
17740
+ * @attr {string} text - Token text. Content in the default slot wins.
17483
17741
  * @attr {'none' | 'dismiss' | 'menu'} control - Control type (default: 'none')
17484
17742
  * @attr {string} dismiss-text - Accessible label for the dismiss button. Unset, it names the token: `Verwijder "{text}"`, so a row of tokens does not read as a row of identical buttons.
17485
17743
  * @attr {string} menu-text - Accessible label for the menu button. Unset, it is `Toon opties voor "{text}"`.
@@ -17488,7 +17746,7 @@ function tokenTemplate(component) {
17488
17746
  * @attr {boolean} expanded - Reflects whether the token's menu is open (control="menu"); managed by the token.
17489
17747
  * @attr {boolean} disabled - Disabled state. Avoid it where you can; the design guidelines say why.
17490
17748
  *
17491
- * @slot - Token text
17749
+ * @slot - Token text. Wins over `text`.
17492
17750
  * @slot menu - An nldd-menu that the token opens from its menu button (control="menu").
17493
17751
  *
17494
17752
  * @fires dismiss - When the dismiss button is clicked
@@ -17496,6 +17754,7 @@ function tokenTemplate(component) {
17496
17754
  var _NLDDToken = class NLDDToken extends LitElement {
17497
17755
  constructor(..._args) {
17498
17756
  super(..._args);
17757
+ this._textSlot = new SlotContent(this);
17499
17758
  this.text = "";
17500
17759
  this.control = "none";
17501
17760
  this.dismissText = "";
@@ -24708,7 +24967,7 @@ function renderInput$1(component, text, index) {
24708
24967
  >
24709
24968
  `;
24710
24969
  }
24711
- function renderSeparator(component) {
24970
+ function renderSeparator$1(component) {
24712
24971
  return html`
24713
24972
  <span class="date-field__separator"
24714
24973
  aria-hidden="true"
@@ -24725,7 +24984,7 @@ function dateFieldTemplate(component) {
24725
24984
  @focusout=${component._handleFieldBlur}
24726
24985
  >
24727
24986
  ${component._texts.map((text, index) => html`
24728
- ${index > 0 ? renderSeparator(component) : nothing}
24987
+ ${index > 0 ? renderSeparator$1(component) : nothing}
24729
24988
  ${renderInput$1(component, text, index)}
24730
24989
  `)}
24731
24990
  <div class="date-field__input-fade"></div>
@@ -27699,8 +27958,8 @@ __decorate([property({
27699
27958
  converter: reflectNonDefault("md")
27700
27959
  })], NLDDFileField.prototype, "size", void 0);
27701
27960
  __decorate([property({
27702
- type: String,
27703
- reflect: true
27961
+ reflect: true,
27962
+ converter: reflectNonDefault("")
27704
27963
  })], NLDDFileField.prototype, "accept", void 0);
27705
27964
  __decorate([property({
27706
27965
  type: Boolean,
@@ -28538,38 +28797,58 @@ var oneTimeCodeFieldStyles = css`
28538
28797
  :host {
28539
28798
  --_one-time-code-field-gap: var(--primitives-space-8);
28540
28799
  --_one-time-code-field-box-size: var(--semantics-controls-md-min-size);
28800
+ --_one-time-code-field-box-width: var(--primitives-space-32);
28541
28801
  --_one-time-code-field-box-corner-radius: var(--semantics-controls-md-corner-radius);
28542
28802
  --_one-time-code-field-box-background-color: var(--semantics-input-fields-background-color);
28543
28803
  --_one-time-code-field-font: var(--semantics-input-fields-md-text-font);
28544
28804
  --_one-time-code-field-box-font: var(--primitives-font-monospace-md-regular-flat);
28545
28805
  --_one-time-code-field-caret-width: var(--primitives-space-2);
28546
28806
  --_one-time-code-field-caret-height: var(--primitives-space-20);
28807
+ --_one-time-code-field-space-width: var(--primitives-space-12);
28808
+ --_one-time-code-field-dash-width: var(--primitives-space-12);
28809
+ --_one-time-code-field-dash-height: var(--primitives-space-3);
28810
+ --_one-time-code-field-inline-padding: var(--semantics-controls-md-inline-padding);
28811
+ --_one-time-code-field-letter-spacing: 0.1em;
28812
+ --_one-time-code-field-validation-icon-size: var(--semantics-input-fields-md-validation-icon-size);
28547
28813
 
28548
28814
  ${inheritedTextReset}
28549
28815
  display: block;
28550
28816
  max-width: 100%;
28551
28817
  -webkit-tap-highlight-color: transparent;
28818
+ pointer-events: none;
28552
28819
  }
28553
28820
 
28554
28821
  :host([hidden]) {
28555
28822
  display: none;
28556
28823
  }
28557
28824
 
28558
- :host([size="sm"]) {
28825
+ :host([size="sm"]),
28826
+ :host([data-fit="sm"]) {
28559
28827
  --_one-time-code-field-gap: var(--primitives-space-6);
28560
28828
  --_one-time-code-field-box-size: var(--semantics-controls-sm-min-size);
28829
+ --_one-time-code-field-box-width: var(--primitives-space-24);
28561
28830
  --_one-time-code-field-box-corner-radius: var(--semantics-controls-sm-corner-radius);
28562
28831
  --_one-time-code-field-font: var(--semantics-input-fields-sm-text-font);
28563
28832
  --_one-time-code-field-box-font: var(--primitives-font-monospace-sm-regular-flat);
28564
28833
  --_one-time-code-field-caret-height: var(--primitives-space-16);
28834
+ --_one-time-code-field-space-width: var(--primitives-space-8);
28835
+ --_one-time-code-field-dash-width: var(--primitives-space-10);
28836
+ --_one-time-code-field-dash-height: var(--primitives-space-2);
28837
+ --_one-time-code-field-inline-padding: var(--semantics-controls-sm-inline-padding);
28838
+ --_one-time-code-field-validation-icon-size: var(--semantics-input-fields-sm-validation-icon-size);
28565
28839
  }
28566
28840
 
28567
- :host([size="lg"]) {
28841
+ :host([size="lg"]:not([data-fit="md"], [data-fit="sm"])) {
28568
28842
  --_one-time-code-field-gap: var(--primitives-space-10);
28569
28843
  --_one-time-code-field-box-size: var(--semantics-controls-lg-min-size);
28844
+ --_one-time-code-field-box-width: var(--primitives-space-40);
28570
28845
  --_one-time-code-field-box-corner-radius: var(--semantics-controls-lg-corner-radius);
28571
28846
  --_one-time-code-field-box-font: var(--primitives-font-weight-body-regular) var(--primitives-font-size-300) / var(--primitives-line-height-flat) var(--primitives-font-family-monospace);
28572
28847
  --_one-time-code-field-caret-height: var(--primitives-space-28);
28848
+ --_one-time-code-field-space-width: var(--primitives-space-16);
28849
+ --_one-time-code-field-dash-width: var(--primitives-space-16);
28850
+ --_one-time-code-field-dash-height: var(--primitives-space-4);
28851
+ --_one-time-code-field-inline-padding: var(--semantics-controls-lg-inline-padding);
28573
28852
  }
28574
28853
 
28575
28854
  :host([readonly]) {
@@ -28584,6 +28863,11 @@ var oneTimeCodeFieldStyles = css`
28584
28863
  position: relative;
28585
28864
  width: fit-content;
28586
28865
  max-width: 100%;
28866
+ pointer-events: auto;
28867
+ }
28868
+
28869
+ :host([centered]) .one-time-code-field {
28870
+ margin-inline: auto;
28587
28871
  }
28588
28872
 
28589
28873
  :host([disabled]) .one-time-code-field {
@@ -28611,7 +28895,7 @@ var oneTimeCodeFieldStyles = css`
28611
28895
  appearance: none;
28612
28896
  }
28613
28897
 
28614
- .one-time-code-field__input::selection {
28898
+ :host(:not([data-fit="field"])) .one-time-code-field__input::selection {
28615
28899
  background: transparent;
28616
28900
  }
28617
28901
 
@@ -28636,7 +28920,7 @@ var oneTimeCodeFieldStyles = css`
28636
28920
  border: var(--semantics-input-fields-border);
28637
28921
  border-radius: var(--_one-time-code-field-box-corner-radius);
28638
28922
  background-color: var(--_one-time-code-field-box-background-color);
28639
- width: var(--_one-time-code-field-box-size);
28923
+ width: var(--_one-time-code-field-box-width);
28640
28924
  min-width: 0;
28641
28925
  height: var(--_one-time-code-field-box-size);
28642
28926
  flex-shrink: 1;
@@ -28668,6 +28952,20 @@ var oneTimeCodeFieldStyles = css`
28668
28952
  white-space: pre;
28669
28953
  }
28670
28954
 
28955
+ .one-time-code-field__separator--space {
28956
+ width: var(--_one-time-code-field-space-width);
28957
+ flex-shrink: 0;
28958
+ }
28959
+
28960
+ .one-time-code-field__separator--dash {
28961
+ border-radius: calc(var(--_one-time-code-field-dash-height) / 2);
28962
+ background-color: currentColor;
28963
+ width: var(--_one-time-code-field-dash-width);
28964
+ height: var(--_one-time-code-field-dash-height);
28965
+ flex-shrink: 0;
28966
+ align-self: center;
28967
+ }
28968
+
28671
28969
  .one-time-code-field__character {
28672
28970
  position: relative;
28673
28971
  }
@@ -28700,6 +28998,97 @@ var oneTimeCodeFieldStyles = css`
28700
28998
  }
28701
28999
 
28702
29000
 
29001
+ /* # Field */
29002
+
29003
+ :host([data-fit="field"]) .one-time-code-field {
29004
+ box-sizing: border-box;
29005
+ border: var(--semantics-input-fields-border);
29006
+ border-radius: var(--_one-time-code-field-box-corner-radius);
29007
+ background-color: var(--_one-time-code-field-box-background-color);
29008
+ width: 100%;
29009
+ height: var(--_one-time-code-field-box-size);
29010
+ overflow: hidden;
29011
+ padding-left: calc(var(--_one-time-code-field-inline-padding) - var(--semantics-input-fields-border-width));
29012
+ align-items: center;
29013
+ }
29014
+
29015
+ .one-time-code-field__input-fade,
29016
+ .one-time-code-field__validation-icon-area {
29017
+ display: none;
29018
+ }
29019
+
29020
+ :host([data-fit="field"]) .one-time-code-field__input-fade {
29021
+ display: block;
29022
+ position: relative;
29023
+ width: 0;
29024
+ flex-shrink: 0;
29025
+ align-self: stretch;
29026
+ }
29027
+
29028
+ :host([data-fit="field"]) .one-time-code-field__input-fade::after {
29029
+ content: '';
29030
+ position: absolute;
29031
+ top: 0;
29032
+ right: 0;
29033
+ bottom: 0;
29034
+ background: linear-gradient(90deg, color-mix(in oklch, var(--_one-time-code-field-box-background-color) 0%, transparent) 0%, var(--_one-time-code-field-box-background-color) 100%);
29035
+ pointer-events: none;
29036
+ width: var(--primitives-space-8);
29037
+ }
29038
+
29039
+ :host([data-fit="field"]) .one-time-code-field__validation-icon-area {
29040
+ display: flex;
29041
+ width: calc(var(--_one-time-code-field-box-size) - var(--semantics-input-fields-border-width) * 2);
29042
+ height: 100%;
29043
+ flex-shrink: 0;
29044
+ align-items: center;
29045
+ justify-content: center;
29046
+ color: var(--semantics-input-fields-is-invalid-icon-color);
29047
+ }
29048
+
29049
+ .one-time-code-field__validation-icon {
29050
+ width: var(--_one-time-code-field-validation-icon-size);
29051
+ height: var(--_one-time-code-field-validation-icon-size);
29052
+ }
29053
+
29054
+ :host([data-fit="field"]) .one-time-code-field:has(.one-time-code-field__input:focus-visible) {
29055
+ outline: var(--semantics-focus-ring-outline);
29056
+ outline-offset: var(--semantics-focus-ring-outline-offset);
29057
+ box-shadow: var(--semantics-focus-ring-box-shadow);
29058
+ }
29059
+
29060
+ :host([data-fit="field"][invalid]) .one-time-code-field {
29061
+ border-color: var(--semantics-input-fields-is-invalid-border-color);
29062
+ }
29063
+
29064
+ :host([data-fit="field"][readonly]) .one-time-code-field {
29065
+ border-color: var(--semantics-input-fields-is-read-only-border-color);
29066
+ }
29067
+
29068
+ :host([data-fit="field"]) .one-time-code-field__boxes {
29069
+ display: none;
29070
+ }
29071
+
29072
+ :host([data-fit="field"]) .one-time-code-field__input {
29073
+ position: static;
29074
+ z-index: auto;
29075
+ width: auto;
29076
+ min-width: 0;
29077
+ height: 100%;
29078
+ flex-grow: 1;
29079
+ color: var(--semantics-content-color);
29080
+ font: var(--_one-time-code-field-box-font);
29081
+ letter-spacing: var(--_one-time-code-field-letter-spacing);
29082
+ caret-color: auto;
29083
+ }
29084
+
29085
+ :host([data-fit="field"]) .one-time-code-field__input:-webkit-autofill,
29086
+ :host([data-fit="field"]) .one-time-code-field__input:autofill {
29087
+ box-shadow: 0 0 0 999px var(--_one-time-code-field-box-background-color) inset;
29088
+ -webkit-text-fill-color: currentColor;
29089
+ }
29090
+
29091
+
28703
29092
  /* # Accessibility */
28704
29093
 
28705
29094
  @media (forced-colors: active) {
@@ -28736,7 +29125,15 @@ function renderBoxes(component) {
28736
29125
  const parts = component.formatParts;
28737
29126
  if (!parts) return Array.from({ length: component.boxes }, (_, index) => renderBox(component, index));
28738
29127
  let index = 0;
28739
- return parts.map((part) => part === BOX ? renderBox(component, index++) : html`<span class="one-time-code-field__separator">${part}</span>`);
29128
+ return parts.map((part) => part === BOX ? renderBox(component, index++) : renderSeparator(part));
29129
+ }
29130
+ /** A space becomes room between the groups and a dash a drawn bar, both sized
29131
+ * with the boxes; any other character stays text. */
29132
+ function renderSeparator(part) {
29133
+ const mark = part.trim();
29134
+ if (mark === "") return html`<span class="one-time-code-field__separator one-time-code-field__separator--space"></span>`;
29135
+ if (mark === "-" || mark === "–") return html`<span class="one-time-code-field__separator one-time-code-field__separator--dash"></span>`;
29136
+ return html`<span class="one-time-code-field__separator">${part}</span>`;
28740
29137
  }
28741
29138
  function oneTimeCodeFieldTemplate(component) {
28742
29139
  return html`
@@ -28767,6 +29164,15 @@ function oneTimeCodeFieldTemplate(component) {
28767
29164
  @input=${component._handleInput}
28768
29165
  @change=${component._handleChange}
28769
29166
  >
29167
+ <div class="one-time-code-field__input-fade"></div>
29168
+ ${component.invalid ? html`
29169
+ <div class="one-time-code-field__validation-icon-area">
29170
+ <nldd-icon class="one-time-code-field__validation-icon"
29171
+ icon="invalid"
29172
+ aria-hidden="true"
29173
+ ></nldd-icon>
29174
+ </div>
29175
+ ` : nothing}
28770
29176
  <div class="one-time-code-field__boxes"
28771
29177
  aria-hidden="true"
28772
29178
  >
@@ -28805,7 +29211,8 @@ function oneTimeCodeFieldTemplate(component) {
28805
29211
  *
28806
29212
  * @element nldd-one-time-code-field
28807
29213
  *
28808
- * @attr {string} size - 'sm' | 'md' (default) | 'lg'. 'lg' has boxes of 56px with larger characters, for a page where the code is the only thing to do, such as signing in.
29214
+ * @attr {string} size - 'sm' | 'md' (default) | 'lg'. 'lg' has boxes 56px tall with larger characters, for a page where the code is the only thing to do, such as signing in. Where the boxes do not fit the width, the field steps down a size, to md and then sm: a code never wraps onto a second line. Where not even sm fits, the field shows the code in a text field of its own size.
29215
+ * @attr {boolean} centered - Puts the boxes in the middle of the row, as on a sign-in page where the code is the only field. The field keeps the full width of the row, so it still sees when the boxes no longer fit and steps down a size; centering it from outside, with the alignment of its parent, would shrink it to its boxes and take that away.
28809
29216
  * @attr {number} length - How many characters the code has (default: 6).
28810
29217
  * @attr {string} format - The shape of a code that is printed in groups, such as '###-###' or '#### ####': each `#` is a box, anything else a separator you see but a screen reader does not hear. The number of `#` is then the length, so `format` wins over `length`. The value never holds a separator: '123-234' is submitted as '123234'. Leave it out for a code without groups, as most codes from a text message are.
28811
29218
  * @attr {string} accessible-label - Accessible label forwarded to the inner input. Set automatically by nldd-form-field.
@@ -28841,6 +29248,7 @@ var NLDDOneTimeCodeField = (_NLDDOneTimeCodeField = class NLDDOneTimeCodeField e
28841
29248
  super(..._args);
28842
29249
  this._initialValue = "";
28843
29250
  this.size = "md";
29251
+ this.centered = false;
28844
29252
  this.length = DEFAULT_LENGTH;
28845
29253
  this.format = "";
28846
29254
  this.accessibleLabel = "";
@@ -28924,6 +29332,49 @@ var NLDDOneTimeCodeField = (_NLDDOneTimeCodeField = class NLDDOneTimeCodeField e
28924
29332
  firstUpdated() {
28925
29333
  this._initialValue = this.value;
28926
29334
  }
29335
+ connectedCallback() {
29336
+ super.connectedCallback();
29337
+ this._resizeObserver = new ResizeObserver(() => this._fit());
29338
+ this._resizeObserver.observe(this);
29339
+ }
29340
+ disconnectedCallback() {
29341
+ this._resizeObserver?.disconnect();
29342
+ super.disconnectedCallback();
29343
+ }
29344
+ updated(changed) {
29345
+ super.updated(changed);
29346
+ if ([
29347
+ "size",
29348
+ "length",
29349
+ "format"
29350
+ ].some((key) => changed.has(key))) this._fit();
29351
+ }
29352
+ /** Steps down from `size` until the boxes fit the width, so a code never
29353
+ * wraps. Where not even sm fits, the input itself shows as a text field in
29354
+ * the size of `size`. The boxes are measured at their full width for this. */
29355
+ _fit() {
29356
+ const boxes = this.shadowRoot?.querySelector(".one-time-code-field__boxes");
29357
+ const available = this.clientWidth;
29358
+ if (!boxes || available === 0) return;
29359
+ const sizes = [
29360
+ "lg",
29361
+ "md",
29362
+ "sm"
29363
+ ];
29364
+ const start = sizes.includes(this.size) ? sizes.indexOf(this.size) : sizes.indexOf("md");
29365
+ this.removeAttribute("data-fit");
29366
+ boxes.style.minWidth = "max-content";
29367
+ let fits = false;
29368
+ for (const size of sizes.slice(start)) {
29369
+ if (size !== this.size) this.setAttribute("data-fit", size);
29370
+ if (boxes.getBoundingClientRect().width <= available + .5) {
29371
+ fits = true;
29372
+ break;
29373
+ }
29374
+ }
29375
+ boxes.style.removeProperty("min-width");
29376
+ if (!fits) this.setAttribute("data-fit", "field");
29377
+ }
28927
29378
  formValue() {
28928
29379
  return this.value;
28929
29380
  }
@@ -28962,6 +29413,7 @@ var NLDDOneTimeCodeField = (_NLDDOneTimeCodeField = class NLDDOneTimeCodeField e
28962
29413
  * keeps the browser's focus, which is what raises the keyboard.
28963
29414
  */
28964
29415
  _handlePointerDown(e) {
29416
+ if (this._asField) return;
28965
29417
  const box = this._boxAt(e.clientX);
28966
29418
  this._pressedBox = box;
28967
29419
  this._moveTo(box);
@@ -28971,6 +29423,7 @@ var NLDDOneTimeCodeField = (_NLDDOneTimeCodeField = class NLDDOneTimeCodeField e
28971
29423
  }
28972
29424
  _handleFocus() {
28973
29425
  this._focused = true;
29426
+ if (this._asField) return;
28974
29427
  if (this._pressedBox === null) this._moveTo(this._nextBox);
28975
29428
  this._pressedBox = null;
28976
29429
  this._keepNativeCaretAtEnd();
@@ -28982,7 +29435,7 @@ var NLDDOneTimeCodeField = (_NLDDOneTimeCodeField = class NLDDOneTimeCodeField e
28982
29435
  /** The native caret means nothing here; at the end it never selects a part of the code. */
28983
29436
  _keepNativeCaretAtEnd() {
28984
29437
  const input = this._input;
28985
- if (!input || this.shadowRoot?.activeElement !== input) return;
29438
+ if (!input || this._asField || this.shadowRoot?.activeElement !== input) return;
28986
29439
  const end = input.value.length;
28987
29440
  if (input.selectionStart !== end || input.selectionEnd !== end) input.setSelectionRange(end, end);
28988
29441
  }
@@ -28995,6 +29448,10 @@ var NLDDOneTimeCodeField = (_NLDDOneTimeCodeField = class NLDDOneTimeCodeField e
28995
29448
  */
28996
29449
  _handleBeforeInput(e) {
28997
29450
  if (this.readonly || this.disabled) return;
29451
+ if (this._asField) {
29452
+ this._beforeFieldInput(e);
29453
+ return;
29454
+ }
28998
29455
  switch (e.inputType) {
28999
29456
  case "insertText": {
29000
29457
  e.preventDefault();
@@ -29027,6 +29484,44 @@ var NLDDOneTimeCodeField = (_NLDDOneTimeCodeField = class NLDDOneTimeCodeField e
29027
29484
  return;
29028
29485
  }
29029
29486
  }
29487
+ /**
29488
+ * As a text field the input edits like any other: select, move and delete
29489
+ * where you like. Only what cannot be in the code is kept out, and a pasted
29490
+ * code is cut out of the text around it.
29491
+ */
29492
+ _beforeFieldInput(e) {
29493
+ const input = this._input;
29494
+ if (e.inputType === "insertText") {
29495
+ if (!this._clean(e.data ?? "")) e.preventDefault();
29496
+ return;
29497
+ }
29498
+ if ([
29499
+ "insertFromPaste",
29500
+ "insertFromDrop",
29501
+ "insertReplacementText"
29502
+ ].includes(e.inputType)) {
29503
+ e.preventDefault();
29504
+ const text = this._codeIn(e.dataTransfer?.getData("text/plain") ?? e.data ?? "");
29505
+ if (text.length === this.boxes) input.value = text;
29506
+ else input.setRangeText(text, input.selectionStart ?? 0, input.selectionEnd ?? 0, "end");
29507
+ this._syncFromField();
29508
+ }
29509
+ }
29510
+ /** Reads the text field back into the code, keeping the caret where it was. */
29511
+ _syncFromField() {
29512
+ const input = this._input;
29513
+ const caret = input.selectionStart ?? input.value.length;
29514
+ const clean = this._clean(input.value);
29515
+ if (input.value !== clean) {
29516
+ const at = this._clean(input.value.slice(0, caret)).length;
29517
+ input.value = clean;
29518
+ input.setSelectionRange(at, at);
29519
+ }
29520
+ this._setChars(this._charsOf(clean), Math.min(clean.length, this.boxes - 1));
29521
+ }
29522
+ get _asField() {
29523
+ return this.getAttribute("data-fit") === "field";
29524
+ }
29030
29525
  /** Writes characters from the caret on; a whole code at once replaces what was there. */
29031
29526
  _write(text, pasted) {
29032
29527
  if (pasted && text.length === this.boxes) {
@@ -29045,7 +29540,7 @@ var NLDDOneTimeCodeField = (_NLDDOneTimeCodeField = class NLDDOneTimeCodeField e
29045
29540
  }
29046
29541
  _handleKeydown(e) {
29047
29542
  submitOnEnter(this, e);
29048
- if (e.altKey || e.ctrlKey || e.metaKey) return;
29543
+ if (this._asField || e.altKey || e.ctrlKey || e.metaKey) return;
29049
29544
  const move = {
29050
29545
  ArrowLeft: () => this._box - 1,
29051
29546
  ArrowRight: () => Math.min(this._box + 1, this._nextBox),
@@ -29059,6 +29554,10 @@ var NLDDOneTimeCodeField = (_NLDDOneTimeCodeField = class NLDDOneTimeCodeField e
29059
29554
  /** Input that did not come through beforeinput, such as a code a phone fills in: take it from the start. */
29060
29555
  _handleInput(e) {
29061
29556
  e.stopPropagation();
29557
+ if (this._asField) {
29558
+ this._syncFromField();
29559
+ return;
29560
+ }
29062
29561
  const clean = this._clean(this._input.value);
29063
29562
  this._setChars(this._charsOf(clean), Math.min(clean.length, this.boxes - 1));
29064
29563
  }
@@ -29116,6 +29615,10 @@ __decorate([property({
29116
29615
  reflect: true,
29117
29616
  converter: reflectNonDefault("md")
29118
29617
  })], NLDDOneTimeCodeField.prototype, "size", void 0);
29618
+ __decorate([property({
29619
+ type: Boolean,
29620
+ reflect: true
29621
+ })], NLDDOneTimeCodeField.prototype, "centered", void 0);
29119
29622
  __decorate([property({
29120
29623
  reflect: true,
29121
29624
  converter: reflectNonDefault(DEFAULT_LENGTH)
@@ -30843,7 +31346,7 @@ function searchFieldTemplate(component) {
30843
31346
  ${hasSearchButton ? html`
30844
31347
  <div class="search-field__search-button">
30845
31348
  <nldd-button
30846
- appearance=${component.searchButton === "accent-filled" ? "accent-filled" : "neutral-tinted"}
31349
+ appearance=${component.searchButton === "primary" ? "primary" : "secondary"}
30847
31350
  size=${buttonSize}
30848
31351
  text=${component._t("components.search-field.search-action")}
30849
31352
  @click=${component._handleSearch}
@@ -30867,7 +31370,7 @@ function searchFieldTemplate(component) {
30867
31370
  * @attr {string} width - Optional fixed width (any CSS length, e.g. "240px"). Default: stretches to fill container.
30868
31371
  * @attr {string} placeholder - Placeholder text for the input
30869
31372
  * @attr {string} accessible-label - Accessible name (aria-label) of the native input. Falls back to `placeholder`, and keeps it when a value is typed. That works while the placeholder names the field ('Zoek een gebruiker'); set this when the placeholder is an example instead ('bijv. Jansen'). Without a visible label the placeholder is the only text on screen, so a name of your own starts with it: someone who works the computer by voice says what they see, and a name that leaves it out does not answer (WCAG 2.5.3).
30870
- * @attr {string} search-button - Shows a search button on the right, in the appearance you name: 'neutral-tinted' (also with no value) | 'accent-filled'. Leave it out for no button: Enter searches as well. 'accent-filled' is for a page where searching is the main task, such as a search page; in a header or above a list the quiet one fits.
31373
+ * @attr {string} search-button - Shows a search button on the right, in the appearance you name: 'secondary' (also with no value) | 'primary'. Leave it out for no button: Enter searches as well. 'primary' is for a page where searching is the main task, such as a search page; in a header or above a list the quiet one fits.
30871
31374
  * @attr {string} shortcut - Keyboard shortcut hint shown at the right end of the empty field, e.g. 'Cmd+K' or '/'. Display only (rendered via nldd-keyboard-shortcut): it does not bind the key, wire up focusing the field in your app. Hidden while the field has focus or a value, and on touch-only devices. Joins the field's description for screen readers.
30872
31375
  * @attr {string} shortcut-mac - Override of `shortcut` on macOS, where the keys differ (falls back to `shortcut`).
30873
31376
  * @attr {string} shortcut-windows - Override of `shortcut` on Windows (falls back to `shortcut`).
@@ -31423,7 +31926,7 @@ function segmentedControlItemTemplate(component) {
31423
31926
  <span class="segmented-control__item-icon"
31424
31927
  aria-hidden=${isIcon ? nothing : "true"}
31425
31928
  >
31426
- ${component.icon ? html`<nldd-icon icon=${component.icon}></nldd-icon>` : html`<slot name="icon">${showPlaceholder ? html`<nldd-icon icon="icon-placeholder"></nldd-icon>` : nothing}</slot>`}
31929
+ <slot name="icon">${component.icon ? html`<nldd-icon icon=${component.icon}></nldd-icon>` : showPlaceholder ? html`<nldd-icon icon="icon-placeholder"></nldd-icon>` : nothing}</slot>
31427
31930
  </span>
31428
31931
  <span class="segmented-control__item-text"
31429
31932
  aria-hidden=${isIcon ? "true" : nothing}
@@ -31502,7 +32005,7 @@ function segmentedControlItemTemplate(component) {
31502
32005
  * @attr {string} group-name - Name of the group for form submission, put on the native checkbox. Set by nldd-segmented-control.
31503
32006
  * @attr {boolean} required - Required state of the native checkbox. In radio mode the group carries the constraint.
31504
32007
  *
31505
- * @slot icon - Slot for a custom icon (e.g. custom SVG). Only used when icon attribute is not set.
32008
+ * @slot icon - Slot for a custom icon (e.g. custom SVG). Wins over `icon`.
31506
32009
  *
31507
32010
  * @fires item-change - When item is activated; detail: { value: string, checked: boolean }
31508
32011
  */
@@ -31924,8 +32427,8 @@ __decorate([property({
31924
32427
  reflect: true
31925
32428
  })], NLDDSegmentedControl.prototype, "invalid", void 0);
31926
32429
  __decorate([property({
31927
- type: String,
31928
- reflect: true
32430
+ reflect: true,
32431
+ converter: reflectNonDefault("")
31929
32432
  })], NLDDSegmentedControl.prototype, "value", void 0);
31930
32433
  __decorate([property({
31931
32434
  type: Array,
@@ -31940,8 +32443,8 @@ __decorate([property({
31940
32443
  converter: reflectNonDefault("md")
31941
32444
  })], NLDDSegmentedControl.prototype, "size", void 0);
31942
32445
  __decorate([property({
31943
- type: String,
31944
- reflect: true
32446
+ reflect: true,
32447
+ converter: reflectNonDefault("radio")
31945
32448
  })], NLDDSegmentedControl.prototype, "type", void 0);
31946
32449
  __decorate([property({
31947
32450
  reflect: true,
@@ -32578,8 +33081,8 @@ __decorate([property({
32578
33081
  converter: reflectNonDefault("")
32579
33082
  })], NLDDSwatchPicker.prototype, "name", void 0);
32580
33083
  __decorate([property({
32581
- type: String,
32582
- reflect: true
33084
+ reflect: true,
33085
+ converter: reflectNonDefault("")
32583
33086
  })], NLDDSwatchPicker.prototype, "value", void 0);
32584
33087
  __decorate([property({
32585
33088
  type: Boolean,
@@ -41839,8 +42342,8 @@ var _NLDDSpacer = class NLDDSpacer extends LitElement {
41839
42342
  };
41840
42343
  var NLDDSpacer = (_NLDDSpacer.styles = spacerStyles, _NLDDSpacer);
41841
42344
  __decorate([property({
41842
- type: String,
41843
- reflect: true
42345
+ reflect: true,
42346
+ converter: reflectNonDefault("16")
41844
42347
  })], NLDDSpacer.prototype, "size", void 0);
41845
42348
  __decorate([property({
41846
42349
  type: String,
@@ -42076,6 +42579,9 @@ function renderColumn(component, column, numbers, selected) {
42076
42579
  data-column=${column}
42077
42580
  @keydown=${(e) => component._handleKeydown(e, column)}
42078
42581
  @scroll=${(e) => component._handleScroll(e, column)}
42582
+ @wheel=${component._takeOver}
42583
+ @touchstart=${component._takeOver}
42584
+ @pointerdown=${component._takeOver}
42079
42585
  >
42080
42586
  ${numbers.map((number) => {
42081
42587
  return html`
@@ -42184,12 +42690,6 @@ function toMs(time) {
42184
42690
  if (Number.isNaN(value)) return 0;
42185
42691
  return time.trim().endsWith("ms") ? value : time.trim().endsWith("s") ? value * 1e3 : 0;
42186
42692
  }
42187
- /** What ends a glide: the user scrolling the column themselves. */
42188
- var GLIDE_INTERRUPTIONS = [
42189
- "wheel",
42190
- "touchstart",
42191
- "pointerdown"
42192
- ];
42193
42693
  var NLDDTimePicker = (_NLDDTimePicker = class NLDDTimePicker extends DescribedBy(LitElement) {
42194
42694
  constructor(..._args) {
42195
42695
  super(..._args);
@@ -42214,10 +42714,13 @@ var NLDDTimePicker = (_NLDDTimePicker = class NLDDTimePicker extends DescribedBy
42214
42714
  this._selfScrollTimer = 0;
42215
42715
  this._chosenHere = false;
42216
42716
  this._glides = /* @__PURE__ */ new Map();
42217
- this._interruptGlide = () => {
42218
- for (const column of [...this._glides.keys()]) this._stopGlide(column);
42219
- clearTimeout(this._selfScrollTimer);
42220
- this._scrollingSelf = false;
42717
+ this._takeOver = {
42718
+ passive: true,
42719
+ handleEvent: () => {
42720
+ for (const column of [...this._glides.keys()]) this._stopGlide(column);
42721
+ clearTimeout(this._selfScrollTimer);
42722
+ this._scrollingSelf = false;
42723
+ }
42221
42724
  };
42222
42725
  }
42223
42726
  _t(key) {
@@ -42294,10 +42797,18 @@ var NLDDTimePicker = (_NLDDTimePicker = class NLDDTimePicker extends DescribedBy
42294
42797
  next = (this._selected === null ? this._hours[0] : Math.floor(this._selected / 60)) * 60 + number;
42295
42798
  if (!slots.includes(next)) return;
42296
42799
  }
42800
+ if (commit) this._cancelSettle();
42297
42801
  const changed = fromMinutes$1(next) !== this.value;
42298
42802
  this._chosenHere = changed;
42299
42803
  this.value = fromMinutes$1(next);
42300
42804
  if (changed) this._emit("input");
42805
+ else if (commit) {
42806
+ this._scrolledTo = {
42807
+ hours: null,
42808
+ minutes: null
42809
+ };
42810
+ this.scrollSelectedIntoView(true);
42811
+ }
42301
42812
  if (commit) this._emit("change");
42302
42813
  }
42303
42814
  _emit(type) {
@@ -42393,6 +42904,11 @@ var NLDDTimePicker = (_NLDDTimePicker = class NLDDTimePicker extends DescribedBy
42393
42904
  this.toggleAttribute("data-scrolling", false);
42394
42905
  }, 120);
42395
42906
  }
42907
+ _cancelSettle() {
42908
+ clearTimeout(this._scrollTimers.hours);
42909
+ clearTimeout(this._scrollTimers.minutes);
42910
+ this.toggleAttribute("data-scrolling", false);
42911
+ }
42396
42912
  /** The number of the option closest to the middle of the column. */
42397
42913
  _centeredOption(el) {
42398
42914
  const center = el.scrollTop + el.clientHeight / 2;
@@ -42451,7 +42967,6 @@ var NLDDTimePicker = (_NLDDTimePicker = class NLDDTimePicker extends DescribedBy
42451
42967
  const duration = toMs(getComputedStyle(this).getPropertyValue("--_time-picker-glide-duration"));
42452
42968
  const start = performance.now();
42453
42969
  column.toggleAttribute("data-gliding", true);
42454
- for (const type of GLIDE_INTERRUPTIONS) column.addEventListener(type, this._interruptGlide, { passive: true });
42455
42970
  const step = (now) => {
42456
42971
  const t = duration > 0 ? Math.min(1, (now - start) / duration) : 1;
42457
42972
  column.scrollTop = from + distance * (1 - (1 - t) ** 3);
@@ -42464,7 +42979,6 @@ var NLDDTimePicker = (_NLDDTimePicker = class NLDDTimePicker extends DescribedBy
42464
42979
  cancelAnimationFrame(this._glides.get(column) ?? 0);
42465
42980
  this._glides.delete(column);
42466
42981
  column.removeAttribute("data-gliding");
42467
- for (const type of GLIDE_INTERRUPTIONS) column.removeEventListener(type, this._interruptGlide);
42468
42982
  }
42469
42983
  /** Listen to scrolling again once our own has been still a little longer than
42470
42984
  * the debounce above, so all its scroll events have been ignored. */
@@ -42504,8 +43018,8 @@ __decorate([property({ type: String })], NLDDTimePicker.prototype, "min", void 0
42504
43018
  __decorate([property({ type: String })], NLDDTimePicker.prototype, "max", void 0);
42505
43019
  __decorate([property({ type: Number })], NLDDTimePicker.prototype, "step", void 0);
42506
43020
  __decorate([property({
42507
- type: Number,
42508
- reflect: true
43021
+ reflect: true,
43022
+ converter: reflectNonDefault(7)
42509
43023
  })], NLDDTimePicker.prototype, "rows", void 0);
42510
43024
  __decorate([property({
42511
43025
  reflect: true,
@@ -43498,15 +44012,13 @@ function toggleButtonTemplate(component) {
43498
44012
  const name = component.accessibleLabel || ((component.variant === "icon" || shortcutWords) && component.text ? component.text : "");
43499
44013
  const ariaLabel = name ? [name, shortcutWords].filter(Boolean).join(" ") : nothing;
43500
44014
  const tooltipText = (showIcon || component.variant === "icon") && !showText ? component.accessibleLabel || component.text || "" : "";
43501
- const iconName = component.selected && component.selectedIcon ? component.selectedIcon : component.icon;
43502
- const icon = iconName ? html`<nldd-icon class="toggle-button__icon"
43503
- icon=${iconName}
43504
- ></nldd-icon>` : html`<slot
43505
- name="icon"
43506
- @slotchange=${component.requestUpdate}
43507
- >${showPlaceholder ? html`<nldd-icon class="toggle-button__icon"
43508
- icon="icon-placeholder"
43509
- ></nldd-icon>` : nothing}</slot>`;
44015
+ const fallbackIcon = (component.selected && component.selectedIcon ? component.selectedIcon : component.icon) || (showPlaceholder ? "icon-placeholder" : "");
44016
+ const icon = html`<slot
44017
+ name="icon"
44018
+ @slotchange=${component.requestUpdate}
44019
+ >${fallbackIcon ? html`<nldd-icon class="toggle-button__icon"
44020
+ icon=${fallbackIcon}
44021
+ ></nldd-icon>` : nothing}</slot>`;
43510
44022
  const textContent = showText ? html`<span class="toggle-button__text">${component.text}</span>` : nothing;
43511
44023
  let result;
43512
44024
  if (component.type === "radio") result = html`
@@ -43604,7 +44116,7 @@ function toggleButtonTemplate(component) {
43604
44116
  * @attr {boolean} required - Required state. Set by nldd-toggle-button-group.
43605
44117
  * @attr {boolean} invalid - Marks the control as invalid. Announced with aria-invalid; nothing is drawn for it.
43606
44118
  *
43607
- * @slot icon - Slot for a custom icon (e.g. custom SVG). Only used when icon attribute is not set.
44119
+ * @slot icon - Slot for a custom icon (e.g. custom SVG). Wins over `icon` and `selected-icon`.
43608
44120
  *
43609
44121
  * @fires change - When selection changes; detail: { selected: boolean, value: string }
43610
44122
  */
@@ -43802,8 +44314,8 @@ __decorate([property({
43802
44314
  reflect: true
43803
44315
  })], NLDDToggleButton.prototype, "required", void 0);
43804
44316
  __decorate([property({
43805
- type: String,
43806
- reflect: true
44317
+ reflect: true,
44318
+ converter: reflectNonDefault("button")
43807
44319
  })], NLDDToggleButton.prototype, "type", void 0);
43808
44320
  __decorate([property({
43809
44321
  reflect: true,
@@ -43885,9 +44397,9 @@ var toggleButtonGroupStyles = css`
43885
44397
  /* # Host */
43886
44398
 
43887
44399
  :host {
43888
- --_toggle-button-group-md-gap: var(--primitives-space-8);
43889
- --_toggle-button-group-sm-gap: var(--primitives-space-6);
43890
- --_toggle-button-group-xs-gap: var(--primitives-space-4);
44400
+ --_toggle-button-group-md-gap: var(--semantics-button-groups-md-gap);
44401
+ --_toggle-button-group-sm-gap: var(--semantics-button-groups-sm-gap);
44402
+ --_toggle-button-group-xs-gap: var(--semantics-button-groups-xs-gap);
43891
44403
 
43892
44404
  display: block;
43893
44405
  isolation: isolate;
@@ -44097,8 +44609,8 @@ __decorate([property({
44097
44609
  reflect: true
44098
44610
  })], NLDDToggleButtonGroup.prototype, "required", void 0);
44099
44611
  __decorate([property({
44100
- type: String,
44101
- reflect: true
44612
+ reflect: true,
44613
+ converter: reflectNonDefault("checkbox")
44102
44614
  })], NLDDToggleButtonGroup.prototype, "type", void 0);
44103
44615
  __decorate([property({ type: String })], NLDDToggleButtonGroup.prototype, "name", void 0);
44104
44616
  __decorate([property({
@@ -45200,6 +45712,7 @@ var sliderStyles = css`
45200
45712
  --_slider-histogram-bar-corner-radius: var(--primitives-space-2);
45201
45713
  --_slider-histogram-bar-height: 0;
45202
45714
  --_slider-tooltip-offset: var(--primitives-space-8);
45715
+ --_slider-histogram-tooltip-offset: var(--primitives-space-4);
45203
45716
  --_slider-tooltip-touch-offset: calc(var(--semantics-fingertip-size) / 2);
45204
45717
  --_slider-tooltip-shift: 0px;
45205
45718
  --_slider-tooltip-background-color: var(--semantics-tooltips-background-color);
@@ -45505,7 +46018,7 @@ var sliderStyles = css`
45505
46018
  }
45506
46019
 
45507
46020
  .slider__control.has-histogram .slider__tooltip {
45508
- bottom: calc(50% + var(--_slider-track-height) / 2 + var(--_slider-histogram-track-gap) + var(--_slider-histogram-height) + var(--_slider-tooltip-offset));
46021
+ bottom: calc(50% + var(--_slider-track-height) / 2 + var(--_slider-histogram-track-gap) + var(--_slider-histogram-height) + var(--_slider-histogram-tooltip-offset));
45509
46022
  }
45510
46023
 
45511
46024
  .slider__tooltip--start {
@@ -46844,8 +47357,8 @@ var _NLDDBarSplitView = class NLDDBarSplitView extends LitElement {
46844
47357
  };
46845
47358
  var NLDDBarSplitView = (_NLDDBarSplitView.styles = barSplitViewStyles, _NLDDBarSplitView);
46846
47359
  __decorate([property({
46847
- type: String,
46848
- reflect: true
47360
+ reflect: true,
47361
+ converter: reflectNonDefault("inherit")
46849
47362
  })], NLDDBarSplitView.prototype, "background", void 0);
46850
47363
  __decorate([state()], NLDDBarSplitView.prototype, "_currentBreakpoint", void 0);
46851
47364
  NLDDBarSplitView = __decorate([customElement("nldd-bar-split-view")], NLDDBarSplitView);
@@ -47856,12 +48369,12 @@ var _NLDDSideBySideSplitView = class NLDDSideBySideSplitView extends LitElement
47856
48369
  };
47857
48370
  var NLDDSideBySideSplitView = (_NLDDSideBySideSplitView.styles = sideBySideSplitViewStyles, _NLDDSideBySideSplitView);
47858
48371
  __decorate([property({
47859
- type: String,
47860
- reflect: true
48372
+ reflect: true,
48373
+ converter: reflectNonDefault("inherit")
47861
48374
  })], NLDDSideBySideSplitView.prototype, "background", void 0);
47862
48375
  __decorate([property({
47863
- type: Number,
47864
- reflect: true
48376
+ reflect: true,
48377
+ converter: reflectNonDefault(2)
47865
48378
  })], NLDDSideBySideSplitView.prototype, "panes", void 0);
47866
48379
  __decorate([state()], NLDDSideBySideSplitView.prototype, "_visiblePanes", void 0);
47867
48380
  NLDDSideBySideSplitView = __decorate([customElement("nldd-side-by-side-split-view")], NLDDSideBySideSplitView);
@@ -48039,12 +48552,12 @@ var _NLDDStackedSplitView = class NLDDStackedSplitView extends LitElement {
48039
48552
  };
48040
48553
  var NLDDStackedSplitView = (_NLDDStackedSplitView.styles = stackedSplitViewStyles, _NLDDStackedSplitView);
48041
48554
  __decorate([property({
48042
- type: String,
48043
- reflect: true
48555
+ reflect: true,
48556
+ converter: reflectNonDefault("inherit")
48044
48557
  })], NLDDStackedSplitView.prototype, "background", void 0);
48045
48558
  __decorate([property({
48046
- type: Number,
48047
- reflect: true
48559
+ reflect: true,
48560
+ converter: reflectNonDefault(2)
48048
48561
  })], NLDDStackedSplitView.prototype, "panes", void 0);
48049
48562
  __decorate([state()], NLDDStackedSplitView.prototype, "_visiblePanes", void 0);
48050
48563
  NLDDStackedSplitView = __decorate([customElement("nldd-stacked-split-view")], NLDDStackedSplitView);
@@ -48199,8 +48712,8 @@ var _NLDDSplitViewPane = class NLDDSplitViewPane extends LitElement {
48199
48712
  };
48200
48713
  var NLDDSplitViewPane = (_NLDDSplitViewPane.styles = splitViewPaneStyles, _NLDDSplitViewPane);
48201
48714
  __decorate([property({
48202
- type: String,
48203
- reflect: true
48715
+ reflect: true,
48716
+ converter: reflectNonDefault("inherit")
48204
48717
  })], NLDDSplitViewPane.prototype, "background", void 0);
48205
48718
  __decorate([property({
48206
48719
  type: Boolean,
@@ -48214,11 +48727,30 @@ __decorate([property({
48214
48727
  })], NLDDSplitViewPane.prototype, "hasContent", void 0);
48215
48728
  NLDDSplitViewPane = __decorate([customElement("nldd-split-view-pane")], NLDDSplitViewPane);
48216
48729
  // src/utilities/page-section-mixin.ts
48217
- var BACKGROUND_TOKEN = {
48218
- base: "var(--semantics-surfaces-base-background-color)",
48219
- tinted: "var(--semantics-surfaces-tinted-background-color)",
48220
- "accent-tinted": "var(--semantics-surfaces-accent-tinted-background-color)"
48221
- };
48730
+ /**
48731
+ * The surface a `background` paints, and passes on through
48732
+ * `--context-parent-background-color` so cards and nested sections read the
48733
+ * same surface. Every section puts this first in its `styles`.
48734
+ */
48735
+ var pageSectionBackgroundStyles = css`
48736
+ :host([background="base"]) {
48737
+ --context-parent-background-color: var(--semantics-surfaces-base-background-color);
48738
+ }
48739
+
48740
+ :host([background="tinted"]) {
48741
+ --context-parent-background-color: var(--semantics-surfaces-tinted-background-color);
48742
+ }
48743
+
48744
+ :host([background="accent-tinted"]) {
48745
+ --context-parent-background-color: var(--semantics-surfaces-accent-tinted-background-color);
48746
+ }
48747
+
48748
+ :host([background="base"]),
48749
+ :host([background="tinted"]),
48750
+ :host([background="accent-tinted"]) {
48751
+ background-color: var(--context-parent-background-color);
48752
+ }
48753
+ `;
48222
48754
  function paddingToValue(size) {
48223
48755
  if (size === void 0 || size === "") return null;
48224
48756
  if (size === "0") return "0";
@@ -48246,10 +48778,10 @@ var PADDING_KEYS = [
48246
48778
  ];
48247
48779
  /**
48248
48780
  * Shared surface controls for the page-section components. Adds three
48249
- * orthogonal capabilities, all written as inline host styles / custom
48250
- * properties (no per-component CSS needed for the background — custom
48251
- * properties inherit through the shadow boundary into the section's block
48252
- * element and slotted content):
48781
+ * orthogonal capabilities. Padding and height are written as custom
48782
+ * properties on the host, which inherit through the shadow boundary into the
48783
+ * section's block element and slotted content; the background comes from
48784
+ * `pageSectionBackgroundStyles`:
48253
48785
  *
48254
48786
  * - **background**: `inherit` (the default — transparent, shows the ancestor's
48255
48787
  * surface) | `base` (the base surface color) | `tinted` | `accent-tinted`
@@ -48284,7 +48816,6 @@ function PageSectionMixin(Base) {
48284
48816
  }
48285
48817
  updated(changed) {
48286
48818
  super.updated(changed);
48287
- if (changed.has("background")) this._applyBackground();
48288
48819
  if (PADDING_KEYS.some((k) => changed.has(k))) this._applyPadding();
48289
48820
  if (changed.has("height")) this._applyHeight();
48290
48821
  }
@@ -48294,16 +48825,6 @@ function PageSectionMixin(Base) {
48294
48825
  if (!wrapper) return;
48295
48826
  wrapper.hidden = slot.assignedElements().length === 0;
48296
48827
  }
48297
- _applyBackground() {
48298
- const token = this.background === "inherit" ? void 0 : BACKGROUND_TOKEN[this.background];
48299
- if (token) {
48300
- this.style.backgroundColor = token;
48301
- this.style.setProperty("--context-parent-background-color", token);
48302
- } else {
48303
- this.style.backgroundColor = "";
48304
- this.style.removeProperty("--context-parent-background-color");
48305
- }
48306
- }
48307
48828
  _applyPadding() {
48308
48829
  const self = this;
48309
48830
  for (const scope of PADDING_SCOPES) {
@@ -48615,7 +49136,7 @@ var _NLDDSimpleSection = class NLDDSimpleSection extends PageSectionMixin(LitEle
48615
49136
  return simpleSectionTemplate(this);
48616
49137
  }
48617
49138
  };
48618
- var NLDDSimpleSection = (_NLDDSimpleSection.styles = simpleSectionStyles, _NLDDSimpleSection);
49139
+ var NLDDSimpleSection = (_NLDDSimpleSection.styles = [pageSectionBackgroundStyles, simpleSectionStyles], _NLDDSimpleSection);
48619
49140
  __decorate([property({
48620
49141
  reflect: true,
48621
49142
  converter: reflectNonDefault("")
@@ -49509,7 +50030,11 @@ var NLDDHero = (_NLDDHero = class NLDDHero extends PageSectionMixin(LitElement)
49509
50030
  render() {
49510
50031
  return heroTemplate(this);
49511
50032
  }
49512
- }, _NLDDHero.styles = [heroStyles, heroCornerStyles], _NLDDHero);
50033
+ }, _NLDDHero.styles = [
50034
+ pageSectionBackgroundStyles,
50035
+ heroStyles,
50036
+ heroCornerStyles
50037
+ ], _NLDDHero);
49513
50038
  __decorate([property({
49514
50039
  reflect: true,
49515
50040
  converter: reflectNonDefault("")
@@ -49749,7 +50274,7 @@ var _NLDDFullBleedSection = class NLDDFullBleedSection extends PageSectionMixin(
49749
50274
  return fullBleedSectionTemplate(this);
49750
50275
  }
49751
50276
  };
49752
- var NLDDFullBleedSection = (_NLDDFullBleedSection.styles = fullBleedSectionStyles, _NLDDFullBleedSection);
50277
+ var NLDDFullBleedSection = (_NLDDFullBleedSection.styles = [pageSectionBackgroundStyles, fullBleedSectionStyles], _NLDDFullBleedSection);
49753
50278
  __decorate([property({
49754
50279
  reflect: true,
49755
50280
  converter: reflectNonDefault("")
@@ -49987,7 +50512,7 @@ var _NLDDOneThirdTwoThirdsSection = class NLDDOneThirdTwoThirdsSection extends P
49987
50512
  return oneThirdTwoThirdsSectionTemplate(this);
49988
50513
  }
49989
50514
  };
49990
- var NLDDOneThirdTwoThirdsSection = (_NLDDOneThirdTwoThirdsSection.styles = oneThirdTwoThirdsSectionStyles, _NLDDOneThirdTwoThirdsSection);
50515
+ var NLDDOneThirdTwoThirdsSection = (_NLDDOneThirdTwoThirdsSection.styles = [pageSectionBackgroundStyles, oneThirdTwoThirdsSectionStyles], _NLDDOneThirdTwoThirdsSection);
49991
50516
  __decorate([property({
49992
50517
  reflect: true,
49993
50518
  converter: reflectNonDefault("")
@@ -50230,7 +50755,7 @@ var _NLDDTwoThirdsOneThirdSection = class NLDDTwoThirdsOneThirdSection extends P
50230
50755
  return twoThirdsOneThirdSectionTemplate(this);
50231
50756
  }
50232
50757
  };
50233
- var NLDDTwoThirdsOneThirdSection = (_NLDDTwoThirdsOneThirdSection.styles = twoThirdsOneThirdSectionStyles, _NLDDTwoThirdsOneThirdSection);
50758
+ var NLDDTwoThirdsOneThirdSection = (_NLDDTwoThirdsOneThirdSection.styles = [pageSectionBackgroundStyles, twoThirdsOneThirdSectionStyles], _NLDDTwoThirdsOneThirdSection);
50234
50759
  __decorate([property({
50235
50760
  reflect: true,
50236
50761
  converter: reflectNonDefault("")
@@ -50473,7 +50998,7 @@ var _NLDDOneHalfOneHalfSection = class NLDDOneHalfOneHalfSection extends PageSec
50473
50998
  return oneHalfOneHalfSectionTemplate(this);
50474
50999
  }
50475
51000
  };
50476
- var NLDDOneHalfOneHalfSection = (_NLDDOneHalfOneHalfSection.styles = oneHalfOneHalfSectionStyles, _NLDDOneHalfOneHalfSection);
51001
+ var NLDDOneHalfOneHalfSection = (_NLDDOneHalfOneHalfSection.styles = [pageSectionBackgroundStyles, oneHalfOneHalfSectionStyles], _NLDDOneHalfOneHalfSection);
50477
51002
  __decorate([property({
50478
51003
  reflect: true,
50479
51004
  converter: reflectNonDefault("")
@@ -51128,6 +51653,7 @@ var NLDDSheet = (_NLDDSheet = class NLDDSheet extends LitElement {
51128
51653
  this._pointerDownOnBackdrop = false;
51129
51654
  this._pointerUpOnBackdrop = false;
51130
51655
  this._closeEmitted = false;
51656
+ this._focusReturn = new FocusReturn();
51131
51657
  this._handleDismiss = (e) => {
51132
51658
  if (isDismissFromTitleBar(e)) {
51133
51659
  e.stopPropagation();
@@ -51185,7 +51711,10 @@ var NLDDSheet = (_NLDDSheet = class NLDDSheet extends LitElement {
51185
51711
  window.clearTimeout(this._closeFallback);
51186
51712
  this._closing = false;
51187
51713
  dialog.classList.remove("is-closing");
51188
- } else dialog.showModal();
51714
+ } else {
51715
+ this._focusReturn.remember();
51716
+ dialog.showModal();
51717
+ }
51189
51718
  this.open = true;
51190
51719
  this._manageFocus();
51191
51720
  this.dispatchEvent(new CustomEvent("open", {
@@ -51242,6 +51771,7 @@ var NLDDSheet = (_NLDDSheet = class NLDDSheet extends LitElement {
51242
51771
  bubbles: false,
51243
51772
  composed: true
51244
51773
  }));
51774
+ this._focusReturn.restore(this);
51245
51775
  }
51246
51776
  _handleDialogClose(e) {
51247
51777
  if (e.target !== this._dialog) return;
@@ -51262,8 +51792,8 @@ __decorate([property({
51262
51792
  converter: reflectNonDefault("")
51263
51793
  })], NLDDSheet.prototype, "width", void 0);
51264
51794
  __decorate([property({
51265
- type: String,
51266
- reflect: true
51795
+ reflect: true,
51796
+ converter: reflectNonDefault("")
51267
51797
  })], NLDDSheet.prototype, "height", void 0);
51268
51798
  __decorate([property({
51269
51799
  reflect: true,
@@ -51534,7 +52064,7 @@ var _NLDDSidebarSection = class NLDDSidebarSection extends PageSectionMixin(LitE
51534
52064
  return sidebarSectionTemplate(this);
51535
52065
  }
51536
52066
  };
51537
- var NLDDSidebarSection = (_NLDDSidebarSection.styles = sidebarSectionStyles, _NLDDSidebarSection);
52067
+ var NLDDSidebarSection = (_NLDDSidebarSection.styles = [pageSectionBackgroundStyles, sidebarSectionStyles], _NLDDSidebarSection);
51538
52068
  __decorate([property({
51539
52069
  reflect: true,
51540
52070
  converter: reflectNonDefault("")
@@ -51550,14 +52080,14 @@ __decorate([property({
51550
52080
  attribute: "no-collapse"
51551
52081
  })], NLDDSidebarSection.prototype, "noCollapse", void 0);
51552
52082
  __decorate([property({
51553
- type: String,
51554
52083
  reflect: true,
51555
- attribute: "sticky-top"
52084
+ attribute: "sticky-top",
52085
+ converter: reflectNonDefault("")
51556
52086
  })], NLDDSidebarSection.prototype, "stickyTop", void 0);
51557
52087
  __decorate([property({
51558
- type: String,
51559
52088
  reflect: true,
51560
- attribute: "sticky-bottom"
52089
+ attribute: "sticky-bottom",
52090
+ converter: reflectNonDefault("")
51561
52091
  })], NLDDSidebarSection.prototype, "stickyBottom", void 0);
51562
52092
  __decorate([property({
51563
52093
  type: Boolean,
@@ -51765,10 +52295,12 @@ var cardStyles = css`
51765
52295
 
51766
52296
  /* # Link / button overlay */
51767
52297
 
52298
+ /* z-index 1, not 0: content that is only position: relative, such as an
52299
+ nldd-image, would otherwise paint over the overlay and take its clicks. */
51768
52300
  .card__action {
51769
52301
  position: absolute;
51770
52302
  inset: 0;
51771
- z-index: 0;
52303
+ z-index: 1;
51772
52304
  border-radius: inherit;
51773
52305
  }
51774
52306
 
@@ -51987,8 +52519,8 @@ __decorate([property({
51987
52519
  attribute: "accessible-label"
51988
52520
  })], NLDDCard.prototype, "accessibleLabel", void 0);
51989
52521
  __decorate([property({
51990
- type: String,
51991
- reflect: true
52522
+ reflect: true,
52523
+ converter: reflectNonDefault("")
51992
52524
  })], NLDDCard.prototype, "href", void 0);
51993
52525
  __decorate([property({ type: String })], NLDDCard.prototype, "target", void 0);
51994
52526
  __decorate([property({ type: String })], NLDDCard.prototype, "download", void 0);
@@ -52757,6 +53289,7 @@ var _NLDDWindow = class NLDDWindow extends LitElement {
52757
53289
  this._titleBar = new TitleBarLabelController(this);
52758
53290
  this._cancelPendingOpen = null;
52759
53291
  this._closeEmitted = false;
53292
+ this._focusReturn = new FocusReturn();
52760
53293
  this._handleDialogClose = (e) => {
52761
53294
  if (e.target !== this._dialog) return;
52762
53295
  this._closing = false;
@@ -52833,6 +53366,7 @@ var _NLDDWindow = class NLDDWindow extends LitElement {
52833
53366
  this._cancelPendingOpen = null;
52834
53367
  this._closeEmitted = false;
52835
53368
  setState$1(this, "unnamed", !this.accessibleLabel && !this._titleBar.text);
53369
+ this._focusReturn.remember();
52836
53370
  dialog.showModal();
52837
53371
  this.open = true;
52838
53372
  this._applyPositionStyles();
@@ -52861,6 +53395,7 @@ var _NLDDWindow = class NLDDWindow extends LitElement {
52861
53395
  bubbles: false,
52862
53396
  composed: true
52863
53397
  }));
53398
+ this._focusReturn.restore(this);
52864
53399
  }
52865
53400
  _manageFocus() {
52866
53401
  if (focusAutofocusTarget(this)) return;
@@ -52902,8 +53437,8 @@ var _NLDDWindow = class NLDDWindow extends LitElement {
52902
53437
  };
52903
53438
  var NLDDWindow = (_NLDDWindow.styles = windowStyles, _NLDDWindow);
52904
53439
  __decorate([property({
52905
- type: String,
52906
- reflect: true
53440
+ reflect: true,
53441
+ converter: reflectNonDefault("inherit")
52907
53442
  })], NLDDWindow.prototype, "scheme", void 0);
52908
53443
  __decorate([property({
52909
53444
  type: String,
@@ -53262,7 +53797,7 @@ function pageFooterLegalBarTemplate(component) {
53262
53797
  `;
53263
53798
  }
53264
53799
  function pageFooterLegalBarItemTemplate(component) {
53265
- const label = component.text || html`<slot></slot>`;
53800
+ const label = html`${component._textSlot.has ? nothing : component.text}<slot @slotchange=${component._textSlot.onChange}></slot>`;
53266
53801
  if (component.href) return html`
53267
53802
  <span class="page-footer__legal-bar-item">
53268
53803
  <a class="page-footer__legal-bar-item-link"
@@ -53307,14 +53842,15 @@ var _NLDDPageFooter;
53307
53842
  *
53308
53843
  * @element nldd-page-footer-legal-bar-item
53309
53844
  *
53310
- * @attr {string} text - Item label. Falls back to the default slot.
53845
+ * @attr {string} text - Item label. Content in the default slot wins.
53311
53846
  * @attr {string} href - Link target. When omitted, the item renders as plain text.
53312
53847
  *
53313
- * @slot - Item label (alternative to `text`).
53848
+ * @slot - Item label. Wins over `text`.
53314
53849
  */
53315
53850
  var NLDDPageFooterLegalBarItem = class extends LitElement {
53316
53851
  constructor(..._args) {
53317
53852
  super(..._args);
53853
+ this._textSlot = new SlotContent(this);
53318
53854
  this.text = "";
53319
53855
  }
53320
53856
  render() {
@@ -54576,8 +55112,8 @@ __decorate([property({
54576
55112
  attribute: "accessible-label"
54577
55113
  })], NLDDKanban.prototype, "accessibleLabel", void 0);
54578
55114
  __decorate([property({
54579
- type: String,
54580
- reflect: true
55115
+ reflect: true,
55116
+ converter: reflectNonDefault("")
54581
55117
  })], NLDDKanban.prototype, "height", void 0);
54582
55118
  __decorate([property({
54583
55119
  type: Boolean,
@@ -54696,6 +55232,7 @@ var listItemSegmentStyles = css`
54696
55232
  :host(:not([disabled])) a.list-item-segment:hover,
54697
55233
  button.list-item-segment:not(:disabled):hover {
54698
55234
  --_list-item-segment-background-color: var(--context-list-item-hovered-background-color, var(--semantics-list-items-is-hovered-background-color));
55235
+ --context-parent-background-color: var(--_list-item-segment-background-color);
54699
55236
  --context-content-color: var(--context-list-item-hovered-content-color, var(--semantics-list-items-is-hovered-content-color));
54700
55237
  --context-content-secondary-color: var(--context-list-item-hovered-content-color, var(--semantics-list-items-is-hovered-content-color));
54701
55238
  }
@@ -54709,6 +55246,7 @@ var listItemSegmentStyles = css`
54709
55246
  button.list-item-segment:not(:disabled).is-pressed,
54710
55247
  :host(:not([disabled])) .list-item-segment.is-pressed {
54711
55248
  --_list-item-segment-background-color: var(--context-list-item-active-background-color, var(--semantics-list-items-is-active-background-color));
55249
+ --context-parent-background-color: var(--_list-item-segment-background-color);
54712
55250
  --context-content-color: var(--context-list-item-active-content-color, var(--context-list-item-hovered-content-color, var(--semantics-list-items-is-active-content-color)));
54713
55251
  --context-content-secondary-color: var(--context-list-item-active-content-color, var(--context-list-item-hovered-content-color, var(--semantics-list-items-is-active-content-color)));
54714
55252
  }
@@ -54717,6 +55255,7 @@ var listItemSegmentStyles = css`
54717
55255
  dim it while what it opened is still on screen. */
54718
55256
  :host([expanded]) .list-item-segment {
54719
55257
  --_list-item-segment-background-color: var(--semantics-list-items-is-expanded-background-color);
55258
+ --context-parent-background-color: var(--_list-item-segment-background-color);
54720
55259
  --context-content-color: var(--semantics-list-items-is-expanded-content-color);
54721
55260
  --context-content-secondary-color: var(--semantics-list-items-is-expanded-content-color);
54722
55261
  }
@@ -54725,6 +55264,7 @@ var listItemSegmentStyles = css`
54725
55264
  :host([expanded]:not([disabled])) a.list-item-segment:hover,
54726
55265
  :host([expanded]) button.list-item-segment:not(:disabled):hover {
54727
55266
  --_list-item-segment-background-color: var(--semantics-list-items-is-expanded-is-hovered-background-color);
55267
+ --context-parent-background-color: var(--_list-item-segment-background-color);
54728
55268
  --context-content-color: var(--semantics-list-items-is-expanded-content-color);
54729
55269
  --context-content-secondary-color: var(--semantics-list-items-is-expanded-content-color);
54730
55270
  }
@@ -54734,12 +55274,14 @@ var listItemSegmentStyles = css`
54734
55274
  :host([expanded]) button.list-item-segment:not(:disabled).is-pressed,
54735
55275
  :host([expanded]:not([disabled])) .list-item-segment.is-pressed {
54736
55276
  --_list-item-segment-background-color: var(--semantics-list-items-is-expanded-is-active-background-color);
55277
+ --context-parent-background-color: var(--_list-item-segment-background-color);
54737
55278
  --context-content-color: var(--semantics-list-items-is-expanded-content-color);
54738
55279
  --context-content-secondary-color: var(--semantics-list-items-is-expanded-content-color);
54739
55280
  }
54740
55281
 
54741
55282
  :host([checked]) .list-item-segment {
54742
55283
  --_list-item-segment-background-color: var(--semantics-list-items-is-selected-background-color);
55284
+ --context-parent-background-color: var(--_list-item-segment-background-color);
54743
55285
  --context-content-color: var(--semantics-list-items-is-selected-content-color);
54744
55286
  --context-content-secondary-color: var(--semantics-list-items-is-selected-content-color);
54745
55287
  }
@@ -55330,28 +55872,28 @@ __decorate([property({
55330
55872
  converter: reflectNonDefault("base")
55331
55873
  })], NLDDTable.prototype, "background", void 0);
55332
55874
  __decorate([property({
55333
- type: String,
55334
- reflect: true
55875
+ reflect: true,
55876
+ converter: reflectNonDefault("")
55335
55877
  })], NLDDTable.prototype, "columns", void 0);
55336
55878
  __decorate([property({
55337
- type: String,
55338
55879
  reflect: true,
55339
- attribute: "sm-columns"
55880
+ attribute: "sm-columns",
55881
+ converter: reflectNonDefault("")
55340
55882
  })], NLDDTable.prototype, "smColumns", void 0);
55341
55883
  __decorate([property({
55342
- type: String,
55343
55884
  reflect: true,
55344
- attribute: "md-columns"
55885
+ attribute: "md-columns",
55886
+ converter: reflectNonDefault("")
55345
55887
  })], NLDDTable.prototype, "mdColumns", void 0);
55346
55888
  __decorate([property({
55347
- type: String,
55348
55889
  reflect: true,
55349
- attribute: "lg-columns"
55890
+ attribute: "lg-columns",
55891
+ converter: reflectNonDefault("")
55350
55892
  })], NLDDTable.prototype, "lgColumns", void 0);
55351
55893
  __decorate([property({
55352
- type: String,
55353
55894
  reflect: true,
55354
- attribute: "accessible-label"
55895
+ attribute: "accessible-label",
55896
+ converter: reflectNonDefault("")
55355
55897
  })], NLDDTable.prototype, "accessibleLabel", void 0);
55356
55898
  __decorate([property({ type: Object })], NLDDTable.prototype, "translations", void 0);
55357
55899
  __decorate([property({
@@ -55707,13 +56249,13 @@ var template$9 = function() {
55707
56249
  * @attr {'left' | 'center' | 'right'} horizontal-alignment - Horizontal alignment (default: 'left')
55708
56250
  * @attr {'top' | 'center' | 'bottom'} vertical-alignment - Vertical alignment (default: 'center')
55709
56251
  *
55710
- * @attr {string} text - Title text content. Supports **bold** syntax for inline bold segments. Falls back to default slot.
56252
+ * @attr {string} text - Title text content. Supports **bold** syntax for inline bold segments. Content in the default slot wins.
55711
56253
  * @attr {string} supporting-text - Optional supporting text displayed below the title. Supports **bold**. Falls back to `supporting-text` slot.
55712
56254
  * @attr {string} overline - Optional overline text displayed above the title. Supports **bold**. Falls back to `overline` slot.
55713
56255
  * @attr {number} heading-level - Heading level for the title element: 1–6 (default: none, renders a <p>)
55714
56256
  *
55715
56257
  * @slot overline - Rich content for the overline region. Overrides the `overline` attribute when content is assigned.
55716
- * @slot - (default) Rich content for the title. Overrides the `text` attribute when content is assigned.
56258
+ * @slot - (default) Rich content for the title. Wins over `text`.
55717
56259
  * @slot supporting-text - Rich content for the supporting text region. Overrides the `supporting-text` attribute when content is assigned.
55718
56260
  *
55719
56261
  * ### Query mark
@@ -56733,7 +57275,7 @@ function breadcrumbsTemplate(component) {
56733
57275
  `;
56734
57276
  }
56735
57277
  function breadcrumbsItemTemplate(component) {
56736
- const label = component.text || html`<slot></slot>`;
57278
+ const label = html`${component._textSlot.has ? nothing : component.text}<slot @slotchange=${component._textSlot.onChange}></slot>`;
56737
57279
  const separator = html`<span class="breadcrumbs__separator"
56738
57280
  aria-hidden="true"
56739
57281
  ><nldd-icon icon="chevron-right-small"></nldd-icon></span>`;
@@ -56778,13 +57320,14 @@ var _NLDDBreadcrumbs;
56778
57320
  *
56779
57321
  * @attr {string} href - Link target. Ignored when `current` is set.
56780
57322
  * @attr {boolean} current - Marks this item as the current page (renders as plain text + `aria-current="page"`). Typical use is on the last item.
56781
- * @attr {string} text - Item label. Falls back to the default slot.
57323
+ * @attr {string} text - Item label. Content in the default slot wins.
56782
57324
  *
56783
- * @slot - Item label (alternative to `text`).
57325
+ * @slot - Item label. Wins over `text`.
56784
57326
  */
56785
57327
  var NLDDBreadcrumbsItem = class extends LitElement {
56786
57328
  constructor(..._args) {
56787
57329
  super(..._args);
57330
+ this._textSlot = new SlotContent(this);
56788
57331
  this.current = false;
56789
57332
  this.text = "";
56790
57333
  }
@@ -57375,8 +57918,8 @@ __decorate([property({
57375
57918
  })], NLDDMenuBarItem.prototype, "currentType", void 0);
57376
57919
  __decorate([property({ type: String })], NLDDMenuBarItem.prototype, "href", void 0);
57377
57920
  __decorate([property({
57378
- type: String,
57379
- reflect: true
57921
+ reflect: true,
57922
+ converter: reflectNonDefault("")
57380
57923
  })], NLDDMenuBarItem.prototype, "icon", void 0);
57381
57924
  __decorate([property({
57382
57925
  type: Boolean,
@@ -57846,9 +58389,9 @@ function template$4(helpers) {
57846
58389
  const renderLinkHint = !!linkHint && !this.accessibleLabel;
57847
58390
  const hasStartIcon = !!this.startIcon || this._hasStartSlot;
57848
58391
  const hasEndIcon = !!this.endIcon || this._hasEndSlot;
57849
- const startIcon = this.startIcon ? html`<span class="link__start-icon"><nldd-icon icon=${this.startIcon}></nldd-icon></span>` : html`<slot name="start-icon" @slotchange=${helpers.handleSlotChange}></slot>`;
57850
- const endIcon = this.endIcon ? html`<span class="link__end-icon"><nldd-icon icon=${this.endIcon}></nldd-icon></span>` : html`<slot name="end-icon" @slotchange=${helpers.handleSlotChange}></slot>`;
57851
- const label = html`<span class="link__label">${this.text ? this.text : html`<slot></slot>`}</span>`;
58392
+ const startIcon = html`<slot name="start-icon" @slotchange=${helpers.handleSlotChange}>${this.startIcon ? html`<span class="link__start-icon"><nldd-icon icon=${this.startIcon}></nldd-icon></span>` : nothing}</slot>`;
58393
+ const endIcon = html`<slot name="end-icon" @slotchange=${helpers.handleSlotChange}>${this.endIcon ? html`<span class="link__end-icon"><nldd-icon icon=${this.endIcon}></nldd-icon></span>` : nothing}</slot>`;
58394
+ const label = html`<span class="link__label">${this._textSlot.has ? nothing : this.text}<slot @slotchange=${this._textSlot.onChange}></slot></span>`;
57852
58395
  return html`<a class="link"
57853
58396
  href=${this.disabled ? nothing : this.href || nothing}
57854
58397
  role=${this.disabled ? "link" : nothing}
@@ -57886,7 +58429,7 @@ function template$4(helpers) {
57886
58429
  * @attr {string} download - Saves the file the link points at instead of opening it; only used with href. Without a value the browser takes the name from the URL, with one that is the file name. A browser ignores it for a URL on another origin and opens the file there. Adds a visually hidden "downloadt bestand" for screen readers. Leave `target` off: a download opens no tab.
57887
58430
  * @attr {string} rel - Link rel attribute; with target '_blank', 'noopener noreferrer' is added to whatever you set
57888
58431
  * @attr {string} size - Text size: 'inherit' (the default) follows the surrounding text and lays the link out inline, so it wraps in running prose. 'xs' | 'sm' | 'md' | 'lg' pin a size and switch to inline-flex, which baseline-aligns a start or end icon with an explicit gap.
57889
- * @attr {string} text - Link text (alternative to the default slot)
58432
+ * @attr {string} text - Link text. Content in the default slot wins.
57890
58433
  * @attr {string} start-icon - Icon before the text
57891
58434
  * @attr {string} end-icon - Icon after the text
57892
58435
  * @attr {string} accessible-label - Accessible label for screen readers
@@ -57894,13 +58437,14 @@ function template$4(helpers) {
57894
58437
  * @attr {boolean} no-tab - Takes the control out of the tab order (tabindex="-1"), for a control owned by a roving container (a row of an nldd-list, where the arrow keys move between rows) that manages focus itself. Still mouse- and script-focusable.
57895
58438
  * @attr {object} translations - Override translation keys (e.g. the "opent in nieuw tabblad" announcement); unset keys fall back to Dutch.
57896
58439
  *
57897
- * @slot - Link text (alternative to the text attribute)
57898
- * @slot start-icon - Custom icon before the text
57899
- * @slot end-icon - Custom icon after the text
58440
+ * @slot - Link text. Wins over `text`.
58441
+ * @slot start-icon - Custom icon before the text. Wins over `start-icon`.
58442
+ * @slot end-icon - Custom icon after the text. Wins over `end-icon`.
57900
58443
  */
57901
58444
  var _NLDDLink = class NLDDLink extends withTranslations(LitElement, nlddLinkTranslations) {
57902
58445
  constructor(..._args) {
57903
58446
  super(..._args);
58447
+ this._textSlot = new SlotContent(this);
57904
58448
  this.href = void 0;
57905
58449
  this.target = void 0;
57906
58450
  this.download = void 0;
@@ -58968,7 +59512,9 @@ var TopNavigationMenuSheet = class {
58968
59512
  this._host = _host;
58969
59513
  this.list = null;
58970
59514
  this.titleBar = null;
59515
+ this.title = null;
58971
59516
  this._sheet = null;
59517
+ this._page = null;
58972
59518
  this._stack = [];
58973
59519
  this._back = () => {
58974
59520
  if (this._stack.length <= 1) return;
@@ -59022,6 +59568,8 @@ var TopNavigationMenuSheet = class {
59022
59568
  this._sheet = null;
59023
59569
  this.list = null;
59024
59570
  this.titleBar = null;
59571
+ this.title = null;
59572
+ this._page = null;
59025
59573
  this._stack = [];
59026
59574
  }
59027
59575
  _create() {
@@ -59036,7 +59584,14 @@ var TopNavigationMenuSheet = class {
59036
59584
  titleBar.addEventListener("back", this._back);
59037
59585
  this.titleBar = titleBar;
59038
59586
  page.appendChild(titleBar);
59587
+ const title = document.createElement("nldd-title");
59588
+ title.id = `nldd-menu-sheet-title-${++sheetCount}`;
59589
+ title.setAttribute("slot", "header");
59590
+ title.setAttribute("size", "2");
59591
+ titleBar.setAttribute("collapse-anchor", title.id);
59592
+ this.title = title;
59039
59593
  const section = document.createElement("nldd-simple-section");
59594
+ section.appendChild(title);
59040
59595
  const list = document.createElement("nldd-list");
59041
59596
  list.setAttribute("type", "navigation");
59042
59597
  list.setAttribute("appearance", "simple");
@@ -59044,6 +59599,7 @@ var TopNavigationMenuSheet = class {
59044
59599
  this.list = list;
59045
59600
  section.appendChild(list);
59046
59601
  page.appendChild(section);
59602
+ this._page = page;
59047
59603
  sheet.appendChild(page);
59048
59604
  document.body.appendChild(sheet);
59049
59605
  return sheet;
@@ -59052,12 +59608,15 @@ var TopNavigationMenuSheet = class {
59052
59608
  * rows. With `moveFocus` after a step down or back, focus lands on the row
59053
59609
  * that opened the level going back, else on the first row. */
59054
59610
  _render(moveFocus = false, focusOpenerText) {
59055
- const { list, titleBar } = this;
59056
- if (!list || !titleBar || this._stack.length === 0) return;
59611
+ const { list, titleBar, title } = this;
59612
+ if (!list || !titleBar || !title || this._stack.length === 0) return;
59057
59613
  const depth = this._stack.length;
59058
59614
  const level = this._stack[depth - 1];
59059
59615
  list.setAttribute("aria-label", this._host._globalMenuBar?.getAttribute("accessible-label") || this._host._t("components.top-navigation-bar.global-menu-bar-label"));
59060
59616
  titleBar.setAttribute("text", level.title);
59617
+ title.setAttribute("text", level.title);
59618
+ const scroller = this._page?.scrollTarget;
59619
+ if (scroller && scroller !== document.scrollingElement) scroller.scrollTop = 0;
59061
59620
  if (depth > 1) titleBar.setAttribute("back-text", this._stack[depth - 2].title);
59062
59621
  else titleBar.removeAttribute("back-text");
59063
59622
  list.replaceChildren();
@@ -59101,17 +59660,20 @@ var TopNavigationMenuSheet = class {
59101
59660
  });
59102
59661
  }
59103
59662
  };
59663
+ /** Numbers the title of each bar's sheet, so two bars never share an id. */
59664
+ var sheetCount = 0;
59104
59665
  async function loadDependencies() {
59105
59666
  await Promise.all([
59106
59667
  Promise.resolve().then(() => sheet_exports),
59107
59668
  Promise.resolve().then(() => page_exports),
59108
59669
  Promise.resolve().then(() => simple_section_exports),
59109
59670
  Promise.resolve().then(() => top_title_bar_exports),
59671
+ Promise.resolve().then(() => title_exports),
59110
59672
  Promise.resolve().then(() => list_exports),
59111
59673
  Promise.resolve().then(() => list_item_exports),
59112
59674
  Promise.resolve().then(() => text_cell_exports),
59113
59675
  Promise.resolve().then(() => icon_cell_exports),
59114
- import("./icon-BH4iy_z4.js").then((n) => n.n)
59676
+ import("./icon-_Eox7ZfO.js").then((n) => n.n)
59115
59677
  ]);
59116
59678
  }
59117
59679
  /** The rows of a level, read from its container: the global menu bar's items
@@ -59225,7 +59787,7 @@ var NLDDTopNavigationBar = (_NLDDTopNavigationBar = class NLDDTopNavigationBar e
59225
59787
  if (!selectEvent.defaultPrevented) {
59226
59788
  detail.item.current = true;
59227
59789
  globalItems.forEach((item) => {
59228
- if (item !== detail.item) item.removeAttribute("current");
59790
+ if (item !== detail.item) item.current = false;
59229
59791
  });
59230
59792
  }
59231
59793
  };
@@ -59404,8 +59966,8 @@ __decorate([property({
59404
59966
  reflect: true
59405
59967
  })], NLDDTopNavigationBar.prototype, "noLogo", void 0);
59406
59968
  __decorate([property({
59407
- type: String,
59408
- reflect: true
59969
+ reflect: true,
59970
+ converter: reflectNonDefault("")
59409
59971
  })], NLDDTopNavigationBar.prototype, "width", void 0);
59410
59972
  __decorate([property({
59411
59973
  reflect: true,
@@ -59821,6 +60383,9 @@ function tabBarTemplate(component) {
59821
60383
  <nldd-menu
59822
60384
  slot="popup"
59823
60385
  placement="bottom-end"
60386
+ @beforetoggle=${(event) => {
60387
+ if (event.newState === "open") component.requestUpdate();
60388
+ }}
59824
60389
  >
59825
60390
  ${component._overflowItems.map((item) => html`
59826
60391
  <nldd-menu-item
@@ -59828,7 +60393,7 @@ function tabBarTemplate(component) {
59828
60393
  icon=${item.icon || nothing}
59829
60394
  href=${sanitizeUrl(item.href) || nothing}
59830
60395
  @select=${(event) => component._selectFromOverflow(event, item)}
59831
- ></nldd-menu-item>
60396
+ >${item._slottedIcon?.cloneNode(true) ?? nothing}</nldd-menu-item>
59832
60397
  `)}
59833
60398
  </nldd-menu>
59834
60399
  </nldd-icon-button>
@@ -59861,7 +60426,7 @@ function tabBarItemTemplate(component) {
59861
60426
  <span class="tab-bar__item-icon"
59862
60427
  aria-hidden="true"
59863
60428
  >
59864
- ${component.icon ? html`<nldd-icon icon=${component.icon}></nldd-icon>` : html`<slot name="icon" @slotchange=${component._onIconSlotChange}>${showPlaceholder ? html`<nldd-icon icon="icon-placeholder"></nldd-icon>` : nothing}</slot>`}
60429
+ <slot name="icon" @slotchange=${component._onIconSlotChange}>${component.icon ? html`<nldd-icon icon=${component.icon}></nldd-icon>` : showPlaceholder ? html`<nldd-icon icon="icon-placeholder"></nldd-icon>` : nothing}</slot>
59865
60430
  </span>
59866
60431
  <span class="tab-bar__item-text">
59867
60432
  ${component.text}
@@ -59934,10 +60499,12 @@ function tabBarItemTemplate(component) {
59934
60499
  * @attr {string} text - Tab text; also used as accessible name for icon-only items
59935
60500
  * @attr {string} href - Optional link URL; renders an anchor instead of a button
59936
60501
  * @attr {'icon-and-text'|'text'|'icon'} variant - Forces this presentation on this item, over the one from nldd-tab-bar
59937
- * @attr {string} icon - Icon name for nldd-icon; an alternative to the icon slot. The icon and icon-and-text variants fall back to a placeholder icon when neither is provided.
60502
+ * @attr {string} icon - Icon name for nldd-icon; an icon in the icon slot wins. The icon and icon-and-text variants fall back to a placeholder icon when neither is provided.
59938
60503
  * @attr {'md'|'lg'} size - Size: 'md' (default) | 'lg'. Set by nldd-tab-bar from its own size; 'lg' enlarges the touch target while keeping the variant layout.
60504
+ * @attr {string} controls - Id of the element this tab shows, looked up in the tab's own tree. The tab announces it as the content it controls (`aria-controls`). Give that element `role="tabpanel"` and an `aria-labelledby` with the id of this item, which names it after the tab. No effect in a `navigation` bar.
60505
+ * @prop {Element | null} controlsElement - The element this tab shows, for where an id does not reach: content in another shadow root, or content a framework renders after the tab (`controls` is looked up when the page loads and on every update of the tab, such as when it becomes current). Wins over `controls`. Browsers without element references (`ariaControlsElements`) get no relation.
59939
60506
  *
59940
- * @slot icon - Icon content
60507
+ * @slot icon - Icon content, such as an `<img>`. Wins over `icon`. The overflow menu shows a copy, made again each time the menu opens, so a new `src` shows there too.
59941
60508
  *
59942
60509
  * @fires select - When the item is activated; detail: { item: NLDDTabBarItem }
59943
60510
  */
@@ -59950,11 +60517,14 @@ var _NLDDTabBarItem = class NLDDTabBarItem extends LitElement {
59950
60517
  this._authorVariant = "";
59951
60518
  this.text = "";
59952
60519
  this.icon = "";
60520
+ this.controls = "";
60521
+ this.controlsElement = null;
59953
60522
  this.size = "md";
59954
60523
  this._hasIconSlot = false;
59955
60524
  this._navigation = false;
59956
60525
  this._isFallbackFocusable = false;
59957
60526
  this._groupDisabled = false;
60527
+ this._awaitingLoad = false;
59958
60528
  }
59959
60529
  get _effectiveVariant() {
59960
60530
  if (this._authorVariant) return this._authorVariant;
@@ -59972,6 +60542,27 @@ var _NLDDTabBarItem = class NLDDTabBarItem extends LitElement {
59972
60542
  }
59973
60543
  updated() {
59974
60544
  this.setAttribute("variant", this._effectiveVariant);
60545
+ this._applyControls();
60546
+ }
60547
+ /** Points the tab at the element it shows. By reference, not by id: the tab
60548
+ * sits in this item's shadow root, where an id from the page does not
60549
+ * resolve. Content that follows the tab bar may not be parsed yet on the
60550
+ * first update, so a missing id is looked up again once the page is in. */
60551
+ _applyControls() {
60552
+ const tab = this.renderRoot.querySelector("[role=\"tab\"]");
60553
+ const target = this.controlsElement ?? this._findControls();
60554
+ if (tab && "ariaControlsElements" in tab && (tab.ariaControlsElements?.[0] ?? null) !== target) tab.ariaControlsElements = target ? [target] : null;
60555
+ if (!target && this.controls && !this.controlsElement && document.readyState === "loading" && !this._awaitingLoad) {
60556
+ this._awaitingLoad = true;
60557
+ document.addEventListener("DOMContentLoaded", () => {
60558
+ this._awaitingLoad = false;
60559
+ if (this.isConnected) this._applyControls();
60560
+ }, { once: true });
60561
+ }
60562
+ }
60563
+ _findControls() {
60564
+ if (!this.controls) return null;
60565
+ return this.getRootNode().getElementById?.(this.controls) ?? null;
59975
60566
  }
59976
60567
  focus(options) {
59977
60568
  if (deferFocus(this, options)) return;
@@ -59980,6 +60571,11 @@ var _NLDDTabBarItem = class NLDDTabBarItem extends LitElement {
59980
60571
  _onIconSlotChange(e) {
59981
60572
  const slot = e.target;
59982
60573
  this._hasIconSlot = slot.assignedElements({ flatten: true }).length > 0;
60574
+ this.closest("nldd-tab-bar")?.requestUpdate();
60575
+ }
60576
+ /** The icon in the slot, which the overflow menu copies. */
60577
+ get _slottedIcon() {
60578
+ return this.querySelector(":scope > [slot=\"icon\"]");
59983
60579
  }
59984
60580
  _handleClick(event) {
59985
60581
  if (this._groupDisabled) {
@@ -60010,9 +60606,14 @@ __decorate([property({
60010
60606
  converter: reflectNonDefault("")
60011
60607
  })], NLDDTabBarItem.prototype, "text", void 0);
60012
60608
  __decorate([property({
60013
- type: String,
60014
- reflect: true
60609
+ reflect: true,
60610
+ converter: reflectNonDefault("")
60015
60611
  })], NLDDTabBarItem.prototype, "icon", void 0);
60612
+ __decorate([property({
60613
+ reflect: true,
60614
+ converter: reflectNonDefault("")
60615
+ })], NLDDTabBarItem.prototype, "controls", void 0);
60616
+ __decorate([property({ attribute: false })], NLDDTabBarItem.prototype, "controlsElement", void 0);
60016
60617
  __decorate([property({
60017
60618
  reflect: true,
60018
60619
  converter: reflectNonDefault("md")
@@ -62153,12 +62754,12 @@ var _NLDDPagination = class NLDDPagination extends LitElement {
62153
62754
  };
62154
62755
  var NLDDPagination = (_NLDDPagination.styles = paginationStyles, _NLDDPagination);
62155
62756
  __decorate([property({
62156
- type: Number,
62157
- reflect: true
62757
+ reflect: true,
62758
+ converter: reflectNonDefault(1)
62158
62759
  })], NLDDPagination.prototype, "current", void 0);
62159
62760
  __decorate([property({
62160
- type: Number,
62161
- reflect: true
62761
+ reflect: true,
62762
+ converter: reflectNonDefault(1)
62162
62763
  })], NLDDPagination.prototype, "total", void 0);
62163
62764
  __decorate([property({
62164
62765
  type: Boolean,
@@ -62485,8 +63086,8 @@ __decorate([property({
62485
63086
  converter: reflectNonDefault("")
62486
63087
  })], NLDDModalDialog.prototype, "supportingText", void 0);
62487
63088
  __decorate([property({
62488
- type: String,
62489
- reflect: true
63089
+ reflect: true,
63090
+ converter: reflectNonDefault("")
62490
63091
  })], NLDDModalDialog.prototype, "icon", void 0);
62491
63092
  __decorate([property({
62492
63093
  type: String,
@@ -62880,8 +63481,8 @@ __decorate([property({
62880
63481
  converter: reflectNonDefault("md")
62881
63482
  })], NLDDBanner.prototype, "size", void 0);
62882
63483
  __decorate([property({
62883
- type: String,
62884
- reflect: true
63484
+ reflect: true,
63485
+ converter: reflectNonDefault("")
62885
63486
  })], NLDDBanner.prototype, "icon", void 0);
62886
63487
  __decorate([property({
62887
63488
  reflect: true,
@@ -63780,13 +64381,13 @@ __decorate([property({
63780
64381
  converter: reflectNonDefault("")
63781
64382
  })], NLDDNotification.prototype, "icon", void 0);
63782
64383
  __decorate([property({
63783
- type: String,
63784
- reflect: true
64384
+ reflect: true,
64385
+ converter: reflectNonDefault("")
63785
64386
  })], NLDDNotification.prototype, "text", void 0);
63786
64387
  __decorate([property({
63787
- type: String,
63788
64388
  reflect: true,
63789
- attribute: "supporting-text"
64389
+ attribute: "supporting-text",
64390
+ converter: reflectNonDefault("")
63790
64391
  })], NLDDNotification.prototype, "supportingText", void 0);
63791
64392
  __decorate([property({
63792
64393
  reflect: true,
@@ -64724,8 +65325,8 @@ __decorate([property({
64724
65325
  converter: reflectNonDefault("accent")
64725
65326
  })], NLDDProgressBarSegmentIndicator.prototype, "color", void 0);
64726
65327
  __decorate([property({
64727
- type: String,
64728
- reflect: true
65328
+ reflect: true,
65329
+ converter: reflectNonDefault("")
64729
65330
  })], NLDDProgressBarSegmentIndicator.prototype, "name", void 0);
64730
65331
  __decorate([property({
64731
65332
  reflect: true,
@@ -64925,8 +65526,8 @@ __decorate([property({
64925
65526
  converter: reflectNonDefault("progress")
64926
65527
  })], NLDDProgressBar.prototype, "variant", void 0);
64927
65528
  __decorate([property({
64928
- type: Number,
64929
- reflect: true
65529
+ reflect: true,
65530
+ converter: reflectNonDefault(100)
64930
65531
  })], NLDDProgressBar.prototype, "max", void 0);
64931
65532
  __decorate([property({
64932
65533
  type: Number,
@@ -64950,9 +65551,9 @@ __decorate([property({
64950
65551
  converter: reflectNonDefault("percentage")
64951
65552
  })], NLDDProgressBar.prototype, "valueFormat", void 0);
64952
65553
  __decorate([property({
64953
- type: String,
64954
65554
  reflect: true,
64955
- attribute: "value-text"
65555
+ attribute: "value-text",
65556
+ converter: reflectNonDefault("")
64956
65557
  })], NLDDProgressBar.prototype, "valueText", void 0);
64957
65558
  __decorate([property({
64958
65559
  reflect: true,
@@ -64960,9 +65561,9 @@ __decorate([property({
64960
65561
  converter: reflectNonDefault("inline")
64961
65562
  })], NLDDProgressBar.prototype, "valueDisplay", void 0);
64962
65563
  __decorate([property({
64963
- type: String,
64964
65564
  reflect: true,
64965
- attribute: "accessible-label"
65565
+ attribute: "accessible-label",
65566
+ converter: reflectNonDefault("")
64966
65567
  })], NLDDProgressBar.prototype, "accessibleLabel", void 0);
64967
65568
  __decorate([property({
64968
65569
  type: Boolean,
@@ -65539,8 +66140,8 @@ __decorate([property({
65539
66140
  converter: reflectNonDefault("accent")
65540
66141
  })], NLDDProgressCircleSegmentIndicator.prototype, "color", void 0);
65541
66142
  __decorate([property({
65542
- type: String,
65543
- reflect: true
66143
+ reflect: true,
66144
+ converter: reflectNonDefault("")
65544
66145
  })], NLDDProgressCircleSegmentIndicator.prototype, "name", void 0);
65545
66146
  NLDDProgressCircleSegmentIndicator = __decorate([customElement("nldd-progress-circle-segment-indicator")], NLDDProgressCircleSegmentIndicator);
65546
66147
  var NLDDProgressCircle = (_NLDDProgressCircle2 = class NLDDProgressCircle extends LitElement {
@@ -65777,8 +66378,8 @@ __decorate([property({
65777
66378
  converter: reflectNonDefault("progress")
65778
66379
  })], NLDDProgressCircle.prototype, "variant", void 0);
65779
66380
  __decorate([property({
65780
- type: Number,
65781
- reflect: true
66381
+ reflect: true,
66382
+ converter: reflectNonDefault(100)
65782
66383
  })], NLDDProgressCircle.prototype, "max", void 0);
65783
66384
  __decorate([property({
65784
66385
  type: Number,
@@ -65802,9 +66403,9 @@ __decorate([property({
65802
66403
  converter: reflectNonDefault("percentage")
65803
66404
  })], NLDDProgressCircle.prototype, "valueFormat", void 0);
65804
66405
  __decorate([property({
65805
- type: String,
65806
66406
  reflect: true,
65807
- attribute: "value-text"
66407
+ attribute: "value-text",
66408
+ converter: reflectNonDefault("")
65808
66409
  })], NLDDProgressCircle.prototype, "valueText", void 0);
65809
66410
  __decorate([property({
65810
66411
  reflect: true,
@@ -65812,9 +66413,9 @@ __decorate([property({
65812
66413
  converter: reflectNonDefault("tooltip")
65813
66414
  })], NLDDProgressCircle.prototype, "valueDisplay", void 0);
65814
66415
  __decorate([property({
65815
- type: String,
65816
66416
  reflect: true,
65817
- attribute: "accessible-label"
66417
+ attribute: "accessible-label",
66418
+ converter: reflectNonDefault("")
65818
66419
  })], NLDDProgressCircle.prototype, "accessibleLabel", void 0);
65819
66420
  __decorate([property({
65820
66421
  type: Boolean,
@@ -66197,7 +66798,7 @@ function stepBarItemTemplate(component) {
66197
66798
  aria-hidden="true"
66198
66799
  >${marker}</span>
66199
66800
  <span class="step-bar__item-title">
66200
- ${component.text || html`<slot></slot>`}
66801
+ ${component._textSlot.has ? nothing : component.text}<slot @slotchange=${component._textSlot.onChange}></slot>
66201
66802
  <span class="step-bar__item-status">, ${component._statusText}</span>
66202
66803
  </span>
66203
66804
  `;
@@ -66282,16 +66883,17 @@ var _NLDDStepBar;
66282
66883
  * @element nldd-step-bar-item
66283
66884
  *
66284
66885
  * @attr {'past' | 'current' | 'future'} status - How far along this step is. `current` marks the step you are on (`aria-current="step"`) and the parent derives the others from it: with none marked step 1 is current, with more than one the last wins. `past` and `future` override what is derived for this step only
66285
- * @attr {string} text - Label under the disc
66886
+ * @attr {string} text - Label under the disc. Content in the default slot wins.
66286
66887
  * @attr {string} icon - Icon in the disc instead of the number or the check mark
66287
66888
  * @attr {string} href - Makes the step a link (back to a completed step, for instance)
66288
66889
  * @attr {boolean} button - Makes the step a button, for flows without a URL per step; ignored when `href` is set
66289
66890
  *
66290
- * @slot - Label (an alternative to `text`)
66891
+ * @slot - Label. Wins over `text`.
66291
66892
  */
66292
66893
  var NLDDStepBarItem = class extends LitElement {
66293
66894
  constructor(..._args) {
66294
66895
  super(..._args);
66896
+ this._textSlot = new SlotContent(this);
66295
66897
  this.text = "";
66296
66898
  this.icon = "";
66297
66899
  this.href = "";
@@ -66334,8 +66936,8 @@ __decorate([property({
66334
66936
  })], NLDDStepBarItem.prototype, "text", void 0);
66335
66937
  __decorate([property({ type: String })], NLDDStepBarItem.prototype, "icon", void 0);
66336
66938
  __decorate([property({
66337
- type: String,
66338
- reflect: true
66939
+ reflect: true,
66940
+ converter: reflectNonDefault("")
66339
66941
  })], NLDDStepBarItem.prototype, "href", void 0);
66340
66942
  __decorate([property({
66341
66943
  type: Boolean,
@@ -67628,9 +68230,9 @@ __decorate([property({
67628
68230
  reflect: true
67629
68231
  })], NLDDJustInTimeEducation.prototype, "dismissable", void 0);
67630
68232
  __decorate([property({
67631
- type: String,
67632
68233
  reflect: true,
67633
- attribute: "arrow-length"
68234
+ attribute: "arrow-length",
68235
+ converter: reflectNonDefault("")
67634
68236
  })], NLDDJustInTimeEducation.prototype, "arrowLength", void 0);
67635
68237
  __decorate([property({
67636
68238
  type: Boolean,