@nldd/design-system 0.13.0 → 0.13.2

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 (426) hide show
  1. package/NOTICES.md +18 -1
  2. package/README.md +32 -24
  3. package/custom-elements.json +4390 -1037
  4. package/dist/components/actions/button/button.d.ts +6 -1
  5. package/dist/components/actions/button/button.d.ts.map +1 -1
  6. package/dist/components/actions/button/button.i18n.d.ts +1 -0
  7. package/dist/components/actions/button/button.i18n.d.ts.map +1 -1
  8. package/dist/components/actions/button/button.i18n.js +1 -0
  9. package/dist/components/actions/button/button.i18n.js.map +1 -1
  10. package/dist/components/actions/button/button.js +7 -0
  11. package/dist/components/actions/button/button.js.map +1 -1
  12. package/dist/components/actions/button/button.template.d.ts.map +1 -1
  13. package/dist/components/actions/button/button.template.js +5 -2
  14. package/dist/components/actions/button/button.template.js.map +1 -1
  15. package/dist/components/actions/button-group/button-group.d.ts +22 -7
  16. package/dist/components/actions/button-group/button-group.d.ts.map +1 -1
  17. package/dist/components/actions/button-group/button-group.js +38 -19
  18. package/dist/components/actions/button-group/button-group.js.map +1 -1
  19. package/dist/components/actions/button-group/button-group.styles.d.ts.map +1 -1
  20. package/dist/components/actions/button-group/button-group.styles.js +43 -18
  21. package/dist/components/actions/button-group/button-group.styles.js.map +1 -1
  22. package/dist/components/actions/button-group/button-group.template.js +1 -1
  23. package/dist/components/actions/button-group/button-group.template.js.map +1 -1
  24. package/dist/components/actions/icon-button/icon-button.d.ts +8 -1
  25. package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
  26. package/dist/components/actions/icon-button/icon-button.i18n.d.ts +1 -0
  27. package/dist/components/actions/icon-button/icon-button.i18n.d.ts.map +1 -1
  28. package/dist/components/actions/icon-button/icon-button.i18n.js +1 -0
  29. package/dist/components/actions/icon-button/icon-button.i18n.js.map +1 -1
  30. package/dist/components/actions/icon-button/icon-button.js +9 -0
  31. package/dist/components/actions/icon-button/icon-button.js.map +1 -1
  32. package/dist/components/actions/icon-button/icon-button.template.d.ts.map +1 -1
  33. package/dist/components/actions/icon-button/icon-button.template.js +5 -2
  34. package/dist/components/actions/icon-button/icon-button.template.js.map +1 -1
  35. package/dist/components/actions/menu/menu-divider.d.ts +14 -0
  36. package/dist/components/actions/menu/menu-divider.d.ts.map +1 -0
  37. package/dist/components/actions/menu/menu-divider.js +33 -0
  38. package/dist/components/actions/menu/menu-divider.js.map +1 -0
  39. package/dist/components/actions/menu/menu-group.d.ts +35 -0
  40. package/dist/components/actions/menu/menu-group.d.ts.map +1 -0
  41. package/dist/components/actions/menu/menu-group.js +69 -0
  42. package/dist/components/actions/menu/menu-group.js.map +1 -0
  43. package/dist/components/actions/menu/menu-item.d.ts +86 -0
  44. package/dist/components/actions/menu/menu-item.d.ts.map +1 -0
  45. package/dist/components/actions/menu/menu-item.js +279 -0
  46. package/dist/components/actions/menu/menu-item.js.map +1 -0
  47. package/dist/components/actions/menu/menu.chain.d.ts +40 -0
  48. package/dist/components/actions/menu/menu.chain.d.ts.map +1 -0
  49. package/dist/components/actions/menu/menu.chain.js +150 -0
  50. package/dist/components/actions/menu/menu.chain.js.map +1 -0
  51. package/dist/components/actions/menu/menu.d.ts +68 -269
  52. package/dist/components/actions/menu/menu.d.ts.map +1 -1
  53. package/dist/components/actions/menu/menu.js +147 -984
  54. package/dist/components/actions/menu/menu.js.map +1 -1
  55. package/dist/components/actions/menu/menu.pointer.d.ts +61 -0
  56. package/dist/components/actions/menu/menu.pointer.d.ts.map +1 -0
  57. package/dist/components/actions/menu/menu.pointer.js +143 -0
  58. package/dist/components/actions/menu/menu.pointer.js.map +1 -0
  59. package/dist/components/actions/menu/menu.safe-triangle.d.ts +79 -0
  60. package/dist/components/actions/menu/menu.safe-triangle.d.ts.map +1 -0
  61. package/dist/components/actions/menu/menu.safe-triangle.js +198 -0
  62. package/dist/components/actions/menu/menu.safe-triangle.js.map +1 -0
  63. package/dist/components/actions/menu/menu.template.d.ts.map +1 -1
  64. package/dist/components/actions/menu/menu.template.js +5 -4
  65. package/dist/components/actions/menu/menu.template.js.map +1 -1
  66. package/dist/components/actions/toolbar/toolbar-item.d.ts +46 -0
  67. package/dist/components/actions/toolbar/toolbar-item.d.ts.map +1 -0
  68. package/dist/components/actions/toolbar/toolbar-item.js +113 -0
  69. package/dist/components/actions/toolbar/toolbar-item.js.map +1 -0
  70. package/dist/components/actions/toolbar/toolbar-item.template.d.ts +3 -0
  71. package/dist/components/actions/toolbar/toolbar-item.template.d.ts.map +1 -0
  72. package/dist/components/actions/toolbar/toolbar-item.template.js +12 -0
  73. package/dist/components/actions/toolbar/toolbar-item.template.js.map +1 -0
  74. package/dist/components/actions/toolbar/toolbar-title.d.ts +43 -0
  75. package/dist/components/actions/toolbar/toolbar-title.d.ts.map +1 -0
  76. package/dist/components/actions/toolbar/toolbar-title.js +111 -0
  77. package/dist/components/actions/toolbar/toolbar-title.js.map +1 -0
  78. package/dist/components/actions/toolbar/toolbar-title.template.d.ts +3 -0
  79. package/dist/components/actions/toolbar/toolbar-title.template.d.ts.map +1 -0
  80. package/dist/components/actions/toolbar/toolbar-title.template.js +33 -0
  81. package/dist/components/actions/toolbar/toolbar-title.template.js.map +1 -0
  82. package/dist/components/actions/toolbar/toolbar.d.ts +16 -111
  83. package/dist/components/actions/toolbar/toolbar.d.ts.map +1 -1
  84. package/dist/components/actions/toolbar/toolbar.js +50 -423
  85. package/dist/components/actions/toolbar/toolbar.js.map +1 -1
  86. package/dist/components/actions/toolbar/toolbar.layout.d.ts +40 -0
  87. package/dist/components/actions/toolbar/toolbar.layout.d.ts.map +1 -0
  88. package/dist/components/actions/toolbar/toolbar.layout.js +76 -0
  89. package/dist/components/actions/toolbar/toolbar.layout.js.map +1 -0
  90. package/dist/components/actions/toolbar/toolbar.overflow-menu.d.ts +52 -0
  91. package/dist/components/actions/toolbar/toolbar.overflow-menu.d.ts.map +1 -0
  92. package/dist/components/actions/toolbar/toolbar.overflow-menu.js +105 -0
  93. package/dist/components/actions/toolbar/toolbar.overflow-menu.js.map +1 -0
  94. package/dist/components/actions/toolbar/toolbar.template.d.ts +1 -4
  95. package/dist/components/actions/toolbar/toolbar.template.d.ts.map +1 -1
  96. package/dist/components/actions/toolbar/toolbar.template.js +0 -41
  97. package/dist/components/actions/toolbar/toolbar.template.js.map +1 -1
  98. package/dist/components/{breakpoints-Bpf2MgjM.js → breakpoints-Bti55RWY.js} +1 -2
  99. package/dist/components/components.js +4651 -2302
  100. package/dist/components/content/avatar-group/avatar-group.styles.d.ts.map +1 -1
  101. package/dist/components/content/avatar-group/avatar-group.styles.js +12 -1
  102. package/dist/components/content/avatar-group/avatar-group.styles.js.map +1 -1
  103. package/dist/components/content/code-viewer/code-viewer.styles.d.ts.map +1 -1
  104. package/dist/components/content/code-viewer/code-viewer.styles.js +2 -1
  105. package/dist/components/content/code-viewer/code-viewer.styles.js.map +1 -1
  106. package/dist/components/content/icon/icon-aliases.d.ts.map +1 -1
  107. package/dist/components/content/icon/icon-aliases.js +21 -5
  108. package/dist/components/content/icon/icon-aliases.js.map +1 -1
  109. package/dist/components/content/icon/icon-gallery-status.d.ts.map +1 -1
  110. package/dist/components/content/icon/icon-gallery-status.js +10 -0
  111. package/dist/components/content/icon/icon-gallery-status.js.map +1 -1
  112. package/dist/components/content/icon/icon-registry.d.ts.map +1 -1
  113. package/dist/components/content/icon/icon-registry.js +10 -3
  114. package/dist/components/content/icon/icon-registry.js.map +1 -1
  115. package/dist/components/content/text/text.d.ts +1 -1
  116. package/dist/components/content/text/text.js +1 -1
  117. package/dist/components/content/text/text.styles.d.ts.map +1 -1
  118. package/dist/components/content/text/text.styles.js +104 -1
  119. package/dist/components/content/text/text.styles.js.map +1 -1
  120. package/dist/components/content/token/token.styles.d.ts.map +1 -1
  121. package/dist/components/content/token/token.styles.js +2 -1
  122. package/dist/components/content/token/token.styles.js.map +1 -1
  123. package/dist/components/content/tooltip/tooltip.styles.js +7 -7
  124. package/dist/components/{decorate-CO88j7Lc.js → decorate-Cz9-peTN.js} +1 -2
  125. package/dist/components/{dist-B5E3q-ea.js → dist-B9YBOGFW.js} +4 -6
  126. package/dist/components/{dist-BWlUmyq3.js → dist-BFZM0YsR.js} +57 -36
  127. package/dist/components/{dist-BFw_yEMS.js → dist-BNkeFjc3.js} +5 -7
  128. package/dist/components/{dist-Co-tsc9S.js → dist-BaLc58I_.js} +7 -9
  129. package/dist/components/{dist-BOVSVPSz.js → dist-Bm3708s5.js} +3 -4
  130. package/dist/components/{dist-IPm8ilWf.js → dist-CJ9uLG0u.js} +5 -17
  131. package/dist/components/{dist-Dz28se9B.js → dist-CJm4tkNC.js} +4 -6
  132. package/dist/components/{dist-CC8oiVtm.js → dist-CSC1dG3L.js} +2 -3
  133. package/dist/components/{dist-BPB3rWnd.js → dist-DHhnz3Gv.js} +3 -4
  134. package/dist/components/{dist-Dn9pjiud.js → dist-DgjvHvsN.js} +6 -8
  135. package/dist/components/{dist-COKR0tYU.js → dist-PeUX4vPq.js} +3 -6
  136. package/dist/components/{dist-D_9ZyZ5v.js → dist-YYLChwRq.js} +5 -7
  137. package/dist/components/{dist-BNLAXAyO.js → dist-m70B83qb.js} +4 -6
  138. package/dist/components/forms/form-field/form-field.d.ts +9 -5
  139. package/dist/components/forms/form-field/form-field.d.ts.map +1 -1
  140. package/dist/components/forms/form-field/form-field.js +17 -6
  141. package/dist/components/forms/form-field/form-field.js.map +1 -1
  142. package/dist/components/{gherkin-uCVRxsGf.js → gherkin-DzYbEwDO.js} +1 -2
  143. package/dist/components/{icon-BJHKWhY5.js → icon-DRpTWSIg.js} +33 -20
  144. package/dist/components/{icon-button-DhBIq6lN.js → icon-button-DUEmWlBD.js} +41 -51
  145. package/dist/components/index.d.ts +2 -0
  146. package/dist/components/index.d.ts.map +1 -1
  147. package/dist/components/index.js +2 -0
  148. package/dist/components/index.js.map +1 -1
  149. package/dist/components/{input-modality-DhTeUxKi.js → input-modality-CiPLYYMN.js} +1 -2
  150. package/dist/components/inputs/code-editor/code-editor.styles.d.ts.map +1 -1
  151. package/dist/components/inputs/code-editor/code-editor.styles.js +6 -1
  152. package/dist/components/inputs/code-editor/code-editor.styles.js.map +1 -1
  153. package/dist/components/inputs/combo-box/combo-box.styles.d.ts.map +1 -1
  154. package/dist/components/inputs/combo-box/combo-box.styles.js +1 -0
  155. package/dist/components/inputs/combo-box/combo-box.styles.js.map +1 -1
  156. package/dist/components/inputs/date-field/date-field.d.ts +41 -28
  157. package/dist/components/inputs/date-field/date-field.d.ts.map +1 -1
  158. package/dist/components/inputs/date-field/date-field.dates.d.ts +60 -0
  159. package/dist/components/inputs/date-field/date-field.dates.d.ts.map +1 -0
  160. package/dist/components/inputs/date-field/date-field.dates.js +106 -0
  161. package/dist/components/inputs/date-field/date-field.dates.js.map +1 -0
  162. package/dist/components/inputs/date-field/date-field.i18n.d.ts +4 -0
  163. package/dist/components/inputs/date-field/date-field.i18n.d.ts.map +1 -1
  164. package/dist/components/inputs/date-field/date-field.i18n.js +6 -0
  165. package/dist/components/inputs/date-field/date-field.i18n.js.map +1 -1
  166. package/dist/components/inputs/date-field/date-field.js +110 -142
  167. package/dist/components/inputs/date-field/date-field.js.map +1 -1
  168. package/dist/components/inputs/date-field/date-field.styles.d.ts.map +1 -1
  169. package/dist/components/inputs/date-field/date-field.styles.js +1 -0
  170. package/dist/components/inputs/date-field/date-field.styles.js.map +1 -1
  171. package/dist/components/inputs/date-field/date-field.template.d.ts.map +1 -1
  172. package/dist/components/inputs/date-field/date-field.template.js +21 -17
  173. package/dist/components/inputs/date-field/date-field.template.js.map +1 -1
  174. package/dist/components/inputs/file-field/file-field.d.ts +12 -0
  175. package/dist/components/inputs/file-field/file-field.d.ts.map +1 -1
  176. package/dist/components/inputs/file-field/file-field.i18n.d.ts +1 -0
  177. package/dist/components/inputs/file-field/file-field.i18n.d.ts.map +1 -1
  178. package/dist/components/inputs/file-field/file-field.i18n.js +1 -0
  179. package/dist/components/inputs/file-field/file-field.i18n.js.map +1 -1
  180. package/dist/components/inputs/file-field/file-field.js +28 -9
  181. package/dist/components/inputs/file-field/file-field.js.map +1 -1
  182. package/dist/components/inputs/file-field/file-field.styles.d.ts.map +1 -1
  183. package/dist/components/inputs/file-field/file-field.styles.js +91 -8
  184. package/dist/components/inputs/file-field/file-field.styles.js.map +1 -1
  185. package/dist/components/inputs/file-field/file-field.template.d.ts +1 -0
  186. package/dist/components/inputs/file-field/file-field.template.d.ts.map +1 -1
  187. package/dist/components/inputs/file-field/file-field.template.js +51 -21
  188. package/dist/components/inputs/file-field/file-field.template.js.map +1 -1
  189. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.d.ts.map +1 -1
  190. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.js +1 -0
  191. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.styles.js.map +1 -1
  192. package/dist/components/inputs/password-field/password-field.styles.d.ts.map +1 -1
  193. package/dist/components/inputs/password-field/password-field.styles.js +1 -0
  194. package/dist/components/inputs/password-field/password-field.styles.js.map +1 -1
  195. package/dist/components/inputs/search-field/search-field.d.ts +1 -1
  196. package/dist/components/inputs/search-field/search-field.js +1 -1
  197. package/dist/components/inputs/search-field/search-field.styles.d.ts.map +1 -1
  198. package/dist/components/inputs/search-field/search-field.styles.js +1 -0
  199. package/dist/components/inputs/search-field/search-field.styles.js.map +1 -1
  200. package/dist/components/inputs/segmented-control/segmented-control.d.ts +6 -3
  201. package/dist/components/inputs/segmented-control/segmented-control.d.ts.map +1 -1
  202. package/dist/components/inputs/segmented-control/segmented-control.js +8 -10
  203. package/dist/components/inputs/segmented-control/segmented-control.js.map +1 -1
  204. package/dist/components/inputs/slider/slider.d.ts +161 -0
  205. package/dist/components/inputs/slider/slider.d.ts.map +1 -0
  206. package/dist/components/inputs/slider/slider.i18n.d.ts +6 -0
  207. package/dist/components/inputs/slider/slider.i18n.d.ts.map +1 -0
  208. package/dist/components/inputs/slider/slider.i18n.js +5 -0
  209. package/dist/components/inputs/slider/slider.i18n.js.map +1 -0
  210. package/dist/components/inputs/slider/slider.js +436 -0
  211. package/dist/components/inputs/slider/slider.js.map +1 -0
  212. package/dist/components/inputs/slider/slider.styles.d.ts +2 -0
  213. package/dist/components/inputs/slider/slider.styles.d.ts.map +1 -0
  214. package/dist/components/inputs/slider/slider.styles.js +360 -0
  215. package/dist/components/inputs/slider/slider.styles.js.map +1 -0
  216. package/dist/components/inputs/slider/slider.template.d.ts +5 -0
  217. package/dist/components/inputs/slider/slider.template.d.ts.map +1 -0
  218. package/dist/components/inputs/slider/slider.template.js +99 -0
  219. package/dist/components/inputs/slider/slider.template.js.map +1 -0
  220. package/dist/components/inputs/text-editor/text-editor.selection.d.ts.map +1 -1
  221. package/dist/components/inputs/text-editor/text-editor.selection.js +35 -9
  222. package/dist/components/inputs/text-editor/text-editor.selection.js.map +1 -1
  223. package/dist/components/inputs/text-editor/text-editor.styles.d.ts.map +1 -1
  224. package/dist/components/inputs/text-editor/text-editor.styles.js +17 -0
  225. package/dist/components/inputs/text-editor/text-editor.styles.js.map +1 -1
  226. package/dist/components/inputs/text-editor/text-editor.tasks.d.ts.map +1 -1
  227. package/dist/components/inputs/text-editor/text-editor.tasks.js +5 -1
  228. package/dist/components/inputs/text-editor/text-editor.tasks.js.map +1 -1
  229. package/dist/components/inputs/text-field/text-field.styles.d.ts.map +1 -1
  230. package/dist/components/inputs/text-field/text-field.styles.js +1 -0
  231. package/dist/components/inputs/text-field/text-field.styles.js.map +1 -1
  232. package/dist/components/inputs/time-field/time-field.d.ts +26 -40
  233. package/dist/components/inputs/time-field/time-field.d.ts.map +1 -1
  234. package/dist/components/inputs/time-field/time-field.i18n.d.ts +3 -0
  235. package/dist/components/inputs/time-field/time-field.i18n.d.ts.map +1 -1
  236. package/dist/components/inputs/time-field/time-field.i18n.js +5 -0
  237. package/dist/components/inputs/time-field/time-field.i18n.js.map +1 -1
  238. package/dist/components/inputs/time-field/time-field.js +68 -162
  239. package/dist/components/inputs/time-field/time-field.js.map +1 -1
  240. package/dist/components/inputs/time-field/time-field.styles.d.ts.map +1 -1
  241. package/dist/components/inputs/time-field/time-field.styles.js +1 -0
  242. package/dist/components/inputs/time-field/time-field.styles.js.map +1 -1
  243. package/dist/components/inputs/time-field/time-field.times.d.ts +74 -0
  244. package/dist/components/inputs/time-field/time-field.times.d.ts.map +1 -0
  245. package/dist/components/inputs/time-field/time-field.times.js +154 -0
  246. package/dist/components/inputs/time-field/time-field.times.js.map +1 -0
  247. package/dist/components/layout/card/card.d.ts +6 -1
  248. package/dist/components/layout/card/card.d.ts.map +1 -1
  249. package/dist/components/layout/card/card.i18n.d.ts +1 -0
  250. package/dist/components/layout/card/card.i18n.d.ts.map +1 -1
  251. package/dist/components/layout/card/card.i18n.js +1 -0
  252. package/dist/components/layout/card/card.i18n.js.map +1 -1
  253. package/dist/components/layout/card/card.js +7 -0
  254. package/dist/components/layout/card/card.js.map +1 -1
  255. package/dist/components/layout/card/card.template.d.ts.map +1 -1
  256. package/dist/components/layout/card/card.template.js +5 -2
  257. package/dist/components/layout/card/card.template.js.map +1 -1
  258. package/dist/components/layout/page/page.d.ts +3 -0
  259. package/dist/components/layout/page/page.d.ts.map +1 -1
  260. package/dist/components/layout/page/page.js +20 -3
  261. package/dist/components/layout/page/page.js.map +1 -1
  262. package/dist/components/layout/page/page.styles.d.ts.map +1 -1
  263. package/dist/components/layout/page/page.styles.js +25 -2
  264. package/dist/components/layout/page/page.styles.js.map +1 -1
  265. package/dist/components/layout/page/page.template.js +1 -1
  266. package/dist/components/layout/page/page.template.js.map +1 -1
  267. package/dist/components/layout/sheet/sheet.d.ts +5 -0
  268. package/dist/components/layout/sheet/sheet.d.ts.map +1 -1
  269. package/dist/components/layout/sheet/sheet.js +14 -6
  270. package/dist/components/layout/sheet/sheet.js.map +1 -1
  271. package/dist/components/layout/sheet/sheet.template.d.ts.map +1 -1
  272. package/dist/components/layout/sheet/sheet.template.js +1 -0
  273. package/dist/components/layout/sheet/sheet.template.js.map +1 -1
  274. package/dist/components/layout/task-board/task-board-column.d.ts +80 -0
  275. package/dist/components/layout/task-board/task-board-column.d.ts.map +1 -0
  276. package/dist/components/layout/task-board/task-board-column.js +207 -0
  277. package/dist/components/layout/task-board/task-board-column.js.map +1 -0
  278. package/dist/components/layout/task-board/task-board-column.template.d.ts +3 -0
  279. package/dist/components/layout/task-board/task-board-column.template.d.ts.map +1 -0
  280. package/dist/components/layout/task-board/task-board-column.template.js +45 -0
  281. package/dist/components/layout/task-board/task-board-column.template.js.map +1 -0
  282. package/dist/components/layout/task-board/task-board.d.ts +169 -0
  283. package/dist/components/layout/task-board/task-board.d.ts.map +1 -0
  284. package/dist/components/layout/task-board/task-board.i18n.d.ts +11 -0
  285. package/dist/components/layout/task-board/task-board.i18n.d.ts.map +1 -0
  286. package/dist/components/layout/task-board/task-board.i18n.js +10 -0
  287. package/dist/components/layout/task-board/task-board.i18n.js.map +1 -0
  288. package/dist/components/layout/task-board/task-board.js +701 -0
  289. package/dist/components/layout/task-board/task-board.js.map +1 -0
  290. package/dist/components/layout/task-board/task-board.styles.d.ts +3 -0
  291. package/dist/components/layout/task-board/task-board.styles.d.ts.map +1 -0
  292. package/dist/components/layout/task-board/task-board.styles.js +259 -0
  293. package/dist/components/layout/task-board/task-board.styles.js.map +1 -0
  294. package/dist/components/layout/task-board/task-board.template.d.ts +3 -0
  295. package/dist/components/layout/task-board/task-board.template.d.ts.map +1 -0
  296. package/dist/components/layout/task-board/task-board.template.js +25 -0
  297. package/dist/components/layout/task-board/task-board.template.js.map +1 -0
  298. package/dist/components/lists-and-tables/list-item/list-item.d.ts +6 -1
  299. package/dist/components/lists-and-tables/list-item/list-item.d.ts.map +1 -1
  300. package/dist/components/lists-and-tables/list-item/list-item.i18n.d.ts +1 -0
  301. package/dist/components/lists-and-tables/list-item/list-item.i18n.d.ts.map +1 -1
  302. package/dist/components/lists-and-tables/list-item/list-item.i18n.js +1 -0
  303. package/dist/components/lists-and-tables/list-item/list-item.i18n.js.map +1 -1
  304. package/dist/components/lists-and-tables/list-item/list-item.js +12 -3
  305. package/dist/components/lists-and-tables/list-item/list-item.js.map +1 -1
  306. package/dist/components/lists-and-tables/list-item/list-item.template.d.ts +1 -1
  307. package/dist/components/lists-and-tables/list-item/list-item.template.d.ts.map +1 -1
  308. package/dist/components/lists-and-tables/list-item/list-item.template.js +2 -1
  309. package/dist/components/lists-and-tables/list-item/list-item.template.js.map +1 -1
  310. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts +6 -1
  311. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts.map +1 -1
  312. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.i18n.d.ts +1 -0
  313. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.i18n.d.ts.map +1 -1
  314. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.i18n.js +1 -0
  315. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.i18n.js.map +1 -1
  316. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js +12 -3
  317. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js.map +1 -1
  318. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.d.ts +1 -1
  319. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.d.ts.map +1 -1
  320. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.js +2 -1
  321. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.js.map +1 -1
  322. package/dist/components/navigation/link/link.d.ts +11 -1
  323. package/dist/components/navigation/link/link.d.ts.map +1 -1
  324. package/dist/components/navigation/link/link.i18n.d.ts +1 -0
  325. package/dist/components/navigation/link/link.i18n.d.ts.map +1 -1
  326. package/dist/components/navigation/link/link.i18n.js +1 -0
  327. package/dist/components/navigation/link/link.i18n.js.map +1 -1
  328. package/dist/components/navigation/link/link.js +27 -1
  329. package/dist/components/navigation/link/link.js.map +1 -1
  330. package/dist/components/navigation/link/link.template.d.ts +1 -0
  331. package/dist/components/navigation/link/link.template.d.ts.map +1 -1
  332. package/dist/components/navigation/link/link.template.js +21 -16
  333. package/dist/components/navigation/link/link.template.js.map +1 -1
  334. package/dist/components/navigation/tab-bar/tab-bar.d.ts +1 -0
  335. package/dist/components/navigation/tab-bar/tab-bar.d.ts.map +1 -1
  336. package/dist/components/navigation/tab-bar/tab-bar.js +9 -0
  337. package/dist/components/navigation/tab-bar/tab-bar.js.map +1 -1
  338. package/dist/components/navigation/tab-bar/tab-bar.template.js +1 -1
  339. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts +9 -24
  340. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts.map +1 -1
  341. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js +29 -223
  342. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js.map +1 -1
  343. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.menu-sheet.d.ts +48 -0
  344. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.menu-sheet.d.ts.map +1 -0
  345. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.menu-sheet.js +220 -0
  346. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.menu-sheet.js.map +1 -0
  347. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.d.ts.map +1 -1
  348. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js +22 -2
  349. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js.map +1 -1
  350. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.template.d.ts.map +1 -1
  351. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.template.js +4 -0
  352. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.template.js.map +1 -1
  353. package/dist/components/{reflect-non-default-OLaK60rT.js → reflect-non-default-B9wQcnne.js} +1 -2
  354. package/dist/components/{rolldown-runtime-D7D4PA-g.js → rolldown-runtime-D8jQpDG7.js} +1 -2
  355. package/dist/components/{shadow-resets-CPa58rmc.js → shadow-resets-BwOyyZFH.js} +1 -2
  356. package/dist/components/{shell-C61GCsJA.js → shell-Dh5IwHd-.js} +1 -2
  357. package/dist/components/status-and-feedback/step-bar/step-bar.d.ts +10 -1
  358. package/dist/components/status-and-feedback/step-bar/step-bar.d.ts.map +1 -1
  359. package/dist/components/status-and-feedback/step-bar/step-bar.js +22 -1
  360. package/dist/components/status-and-feedback/step-bar/step-bar.js.map +1 -1
  361. package/dist/components/status-and-feedback/step-bar/step-bar.template.d.ts.map +1 -1
  362. package/dist/components/status-and-feedback/step-bar/step-bar.template.js +2 -0
  363. package/dist/components/status-and-feedback/step-bar/step-bar.template.js.map +1 -1
  364. package/dist/components/{toml-C2HBbPgG.js → toml-D0Pix_8Q.js} +1 -2
  365. package/dist/components/{visibility-mixin-djNSG5ZN.js → visibility-mixin-C-K7ho5Q.js} +4 -6
  366. package/dist/components/{with-translations-C6QfP6_S.js → with-translations-DRuOq3QK.js} +14 -10
  367. package/dist/css/{global-system-font.css → global-open-font.css} +2 -0
  368. package/dist/css/global.css +1 -0
  369. package/dist/css/inter-font.css +47 -0
  370. package/dist/css/jetbrains-mono-font.css +22 -0
  371. package/dist/css/rijksoverheid-fonts.css +4 -21
  372. package/dist/css/themes/bruin.css +1 -0
  373. package/dist/css/themes/donkerblauw.css +1 -0
  374. package/dist/css/themes/donkerbruin.css +1 -0
  375. package/dist/css/themes/donkergeel.css +1 -0
  376. package/dist/css/themes/donkergroen.css +1 -0
  377. package/dist/css/themes/geel.css +1 -0
  378. package/dist/css/themes/groen.css +1 -0
  379. package/dist/css/themes/hemelblauw.css +1 -0
  380. package/dist/css/themes/lichtblauw.css +1 -0
  381. package/dist/css/themes/mintgroen.css +1 -0
  382. package/dist/css/themes/mosgroen.css +1 -0
  383. package/dist/css/themes/oranje.css +1 -0
  384. package/dist/css/themes/paars.css +1 -0
  385. package/dist/css/themes/robijnrood.css +1 -0
  386. package/dist/css/themes/rood.css +1 -0
  387. package/dist/css/themes/roze.css +1 -0
  388. package/dist/css/themes/violet.css +1 -0
  389. package/dist/css/themes.css +17 -0
  390. package/dist/css/tokens.css +1 -0
  391. package/dist/css/variables.css +27 -5
  392. package/dist/fonts/Inter-Latin-Italic[wght].woff2 +0 -0
  393. package/dist/fonts/Inter-LatinExt-Italic[wght].woff2 +0 -0
  394. package/dist/fonts/Inter-LatinExt[wght].woff2 +0 -0
  395. package/dist/fonts/Inter-Latin[wght].woff2 +0 -0
  396. package/dist/nldd.min.js +1902 -842
  397. package/dist/translations/en-US.d.ts.map +1 -1
  398. package/dist/translations/en-US.js +23 -0
  399. package/dist/translations/en-US.js.map +1 -1
  400. package/dist/translations/fy.d.ts.map +1 -1
  401. package/dist/translations/fy.js +13 -0
  402. package/dist/translations/fy.js.map +1 -1
  403. package/dist/translations/nl.generated.d.ts +23 -0
  404. package/dist/translations/nl.generated.d.ts.map +1 -1
  405. package/dist/translations/nl.generated.js +4 -0
  406. package/dist/translations/nl.generated.js.map +1 -1
  407. package/dist/translations/pap-AW.d.ts.map +1 -1
  408. package/dist/translations/pap-AW.js +13 -0
  409. package/dist/translations/pap-AW.js.map +1 -1
  410. package/dist/translations/pap-CW.d.ts.map +1 -1
  411. package/dist/translations/pap-CW.js +13 -0
  412. package/dist/translations/pap-CW.js.map +1 -1
  413. package/dist/types/vue.d.ts +164 -24
  414. package/dist/utilities/form-associated-mixin.d.ts +7 -0
  415. package/dist/utilities/form-associated-mixin.d.ts.map +1 -1
  416. package/dist/utilities/form-associated-mixin.js +13 -1
  417. package/dist/utilities/form-associated-mixin.js.map +1 -1
  418. package/dist/utilities/link-hint.d.ts +11 -0
  419. package/dist/utilities/link-hint.d.ts.map +1 -1
  420. package/dist/utilities/link-hint.js +15 -0
  421. package/dist/utilities/link-hint.js.map +1 -1
  422. package/dist/utilities/tab-order.d.ts +11 -0
  423. package/dist/utilities/tab-order.d.ts.map +1 -0
  424. package/dist/utilities/tab-order.js +55 -0
  425. package/dist/utilities/tab-order.js.map +1 -0
  426. package/package.json +13 -4
@@ -32,211 +32,19 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
32
32
  * @slot center - nldd-toolbar-item and nldd-toolbar-title elements placed at the center
33
33
  * @slot end - nldd-toolbar-item and nldd-toolbar-title elements placed at the end
34
34
  * @slot overflow - nldd-menu-item, nldd-menu-divider and nldd-menu-group elements always shown in the overflow menu
35
- *
36
- * ---
37
- *
38
- * @element nldd-toolbar-item
39
- * @attr {string} width - Fluid width: a percentage (e.g. '40%') or any CSS length (e.g. '240px'). Setting it (or min-width or max-width) makes the item fluid so it grows to fill the available space.
40
- * @attr {string} min-width - Minimum (fluid) width as a CSS length (e.g. '240px'). Setting it also makes the item fluid.
41
- * @attr {string} max-width - Maximum (fluid) width as a CSS length (e.g. '480px'). Setting it also makes the item fluid.
42
- * @attr {string} label - Text label shown below the item when the toolbar has show-item-labels.
43
- * @attr {number} priority - Overflow order: items with a lower priority move into the overflow menu first (default 0). Items sharing a priority overflow together, regardless of position.
44
- * @attr {'sm'|'md'|'lg'} size - Set by nldd-toolbar, not a consumer attribute: mirrors the toolbar's size (default: 'md') onto the item host, so size-dependent styling can key off it.
45
- * @attr {boolean} show-item-labels - Set by nldd-toolbar, not a consumer attribute: mirrors the toolbar's show-item-labels, so the item renders its label below the control.
46
- * @attr {boolean} fluid - Set by nldd-toolbar, not a consumer attribute: marks an item that grows or shrinks to fill space. Toggled synchronously during measurement, so it can appear or disappear between layout frames — do not style against it. It is not reflected as a JS property — read it with hasAttribute('fluid').
47
- * @attr {boolean} solo-fluid - Set by nldd-toolbar, not a consumer attribute: the sole fluid item, allowed to shrink below its content. Same synchronous-toggle and property-read caveats as fluid.
48
- * @attr {boolean} hidden - Set by nldd-toolbar, not a consumer attribute, when the item moves into the overflow menu. Same synchronous-toggle caveat.
49
- * @attr {boolean} shrinkable - Set by nldd-toolbar, not a consumer attribute: the item holds a control that overflows by itself (nldd-tab-bar), so it gets the width that control wants with everything shown. Same synchronous-toggle caveat.
50
- * @attr {boolean} shrunk - Set by nldd-toolbar, not a consumer attribute: a shrinkable item narrowed down to what its control needs at least, before it would move into the overflow menu. Same synchronous-toggle caveat.
51
- *
52
- * @slot - The control shown in the toolbar (e.g. nldd-icon-button)
53
- * @slot overflow - Required: nldd-menu-item / nldd-menu-divider / nldd-menu-group children, shown in the overflow menu when this item overflows. Without them the action is gone on a narrow toolbar, and the item warns in development.
54
- *
55
- * ---
56
- *
57
- * @element nldd-toolbar-title
58
- * @attr {string} width - Preferred (fluid) width as a CSS length or percentage; the title grows toward it and shrinks to min-width.
59
- * @attr {string} min-width - Minimum width as a CSS length (default: the width of its own text, up to `max-width`). Items move into the overflow menu before the title gets narrower than this; only when no item is left to move does the title truncate below it. Set `0` to let the title shrink first.
60
- * @attr {string} max-width - Maximum width as a CSS length (default: '240px'); the title text truncates with an ellipsis beyond it. The cap is lifted while the title is the sole toolbar element (it then stretches to fill the row).
61
- * @attr {string} align - Text alignment: 'left' | 'center' (default: 'left').
62
- * @attr {string} text - Title text.
63
- * @attr {string} supporting-text - Secondary supporting text shown below the title.
64
- * @attr {'sm'|'md'|'lg'} size - Set by nldd-toolbar, not a consumer attribute: mirrors the toolbar's size (default: 'md'), which sets the title group height and, at 'sm', the title and supporting-text fonts.
65
- *
66
- * @attr {string} href - Makes the mark and the name one link, for the place this window belongs to (usually the app's own start). The `action` slot stays outside it: a control inside a link is a control you cannot reach without following the link.
67
- * @attr {string} target - Where the link opens; only meaningful with `href`. `_blank` adds rel="noopener noreferrer" and a visually hidden "opens in a new tab" announcement. An `href` to another origin than the page (another website, a subdomain too) adds a visually hidden "andere website", in one sentence with the new-tab announcement when both apply; there is no way to switch it off.
68
- * @attr {object} translations - Override translation keys (the new-tab announcement); unset keys fall back to Dutch.
69
- *
70
- * @slot media - Optional leading image before the title: a logo, a product mark, a file-type icon. Its height is capped to the title group so it cannot stretch the row; pick the size within that yourself. With no `text` the media stands alone and carries the name, so give it one (an `alt`, or an accessible label).
71
- * @slot action - Optional trailing control (e.g. an xs nldd-icon-button), shown inline after the title and tuned to sit against it. Empty by default.
72
35
  */
73
36
  import { LitElement } from 'lit';
74
37
  import { customElement, property, state } from 'lit/decorators.js';
75
38
  import { reflectNonDefault } from '../../../utilities/reflect-non-default.js';
76
- import { toolbarStyles, toolbarItemStyles, toolbarTitleStyles } from './toolbar.styles.js';
77
- import { template, toolbarItemTemplate, toolbarTitleTemplate } from './toolbar.template.js';
39
+ import { toolbarStyles } from './toolbar.styles.js';
40
+ import { template } from './toolbar.template.js';
78
41
  import { nlddToolbarTranslations } from './toolbar.i18n.js';
79
42
  import { translate } from '../../../utilities/translations.js';
80
- // # nldd-toolbar-item
81
- let NLDDToolbarItem = class NLDDToolbarItem extends LitElement {
82
- constructor() {
83
- super(...arguments);
84
- this.width = '';
85
- this.minWidth = '';
86
- this.maxWidth = '';
87
- this.label = '';
88
- // Overflow order. The parent toolbar reads this as a PROPERTY (el.priority), so
89
- // both a bound property (Vue/React `:priority`, `el.priority = 2`) and a plain
90
- // attribute (`priority="2"`) work. Reflected so an explicit value is visible in
91
- // the DOM and a runtime property change re-triggers the toolbar's overflow
92
- // recompute (its observer watches the attribute). The converter reflects the
93
- // default 0 as *no attribute* (toAttribute → null), so the DOM isn't polluted
94
- // with `priority="0"` on every item; 0 means "no explicit priority".
95
- this.priority = 0;
96
- /** Set by nldd-toolbar; not part of the public API. @internal */
97
- this.size = 'md';
98
- /** Set by nldd-toolbar; not part of the public API. @internal */
99
- this.showItemLabels = false;
100
- }
101
- // Layout state — `fluid`, `solo-fluid` and `hidden` — is owned by
102
- // nldd-toolbar and toggled directly as attributes during measurement
103
- // (synchronous, so the host box reflows immediately). They are not
104
- // reactive properties: Lit would reflect them asynchronously, which would
105
- // desync the attribute from the synchronous getBoundingClientRect reads.
106
- firstUpdated() {
107
- // Without an alternative the action is simply gone once the toolbar runs
108
- // out of room, and that only happens on a narrow screen. Say it at load,
109
- // where a wide screen sees it too, not at the moment the item overflows.
110
- //
111
- // A frame later, not now: a framework can append the overflow child right
112
- // after the element upgrades (Vue, React with async children), and asking
113
- // on the first render would call that a missing fallback.
114
- if (!import.meta.env?.DEV)
115
- return;
116
- requestAnimationFrame(() => this._warnWithoutOverflow());
117
- }
118
- _warnWithoutOverflow() {
119
- if (!this.isConnected || this.querySelector(':scope > [slot="overflow"]'))
120
- return;
121
- const control = this.querySelector(':scope > :not([slot])');
122
- const name = control?.getAttribute('accessible-label') || control?.getAttribute('text') || this.label;
123
- console.warn(`nldd-toolbar-item${name ? ` ("${name}")` : ''}: nothing in slot="overflow". On a narrow toolbar this item moves into the overflow menu, and without an nldd-menu-item there its action is gone. Add one in slot="overflow".`);
124
- }
125
- render() {
126
- return toolbarItemTemplate(this);
127
- }
128
- };
129
- NLDDToolbarItem.styles = toolbarItemStyles;
130
- __decorate([
131
- property({ reflect: true, converter: reflectNonDefault('') })
132
- ], NLDDToolbarItem.prototype, "width", void 0);
133
- __decorate([
134
- property({ reflect: true, attribute: 'min-width', converter: reflectNonDefault('') })
135
- ], NLDDToolbarItem.prototype, "minWidth", void 0);
136
- __decorate([
137
- property({ reflect: true, attribute: 'max-width', converter: reflectNonDefault('') })
138
- ], NLDDToolbarItem.prototype, "maxWidth", void 0);
139
- __decorate([
140
- property({ type: String })
141
- ], NLDDToolbarItem.prototype, "label", void 0);
142
- __decorate([
143
- property({
144
- reflect: true,
145
- converter: {
146
- fromAttribute: (value) => (value === null ? 0 : Number(value)),
147
- toAttribute: (value) => (value === 0 ? null : String(value)),
148
- },
149
- })
150
- ], NLDDToolbarItem.prototype, "priority", void 0);
151
- __decorate([
152
- property({ reflect: true, converter: reflectNonDefault('md') })
153
- ], NLDDToolbarItem.prototype, "size", void 0);
154
- __decorate([
155
- property({ type: Boolean, reflect: true, attribute: 'show-item-labels' })
156
- ], NLDDToolbarItem.prototype, "showItemLabels", void 0);
157
- NLDDToolbarItem = __decorate([
158
- customElement('nldd-toolbar-item')
159
- ], NLDDToolbarItem);
160
- export { NLDDToolbarItem };
161
- // # nldd-toolbar-title
162
- let NLDDToolbarTitle = class NLDDToolbarTitle extends LitElement {
163
- constructor() {
164
- super(...arguments);
165
- this.width = '';
166
- this.minWidth = '';
167
- this.maxWidth = '';
168
- this.align = 'left';
169
- this.text = '';
170
- this.supportingText = '';
171
- this.href = '';
172
- this.target = '';
173
- this.translations = {};
174
- /** Set by nldd-toolbar; not part of the public API. @internal */
175
- this.size = 'md';
176
- }
177
- _t(key) {
178
- return translate(this.translations, nlddToolbarTranslations, key);
179
- }
180
- // Layout state — `solo-fluid` and `hidden` — is owned by nldd-toolbar and
181
- // toggled directly as attributes during measurement (synchronous). Not a
182
- // reactive property for the same reflection-timing reason as the item.
183
- // willUpdate (not updated) so the size CSS variables are written before the
184
- // toolbar measures the title with getBoundingClientRect() on the same frame.
185
- willUpdate(changedProperties) {
186
- if (changedProperties.has('minWidth'))
187
- this._reflectSizeVar('--_toolbar-title-group-min-width', this.minWidth);
188
- if (changedProperties.has('width'))
189
- this._reflectSizeVar('--_toolbar-title-width', this.width);
190
- if (changedProperties.has('maxWidth'))
191
- this._reflectSizeVar('--_toolbar-title-max-width', this.maxWidth);
192
- }
193
- _reflectSizeVar(prop, value) {
194
- if (value) {
195
- this.style.setProperty(prop, value);
196
- }
197
- else {
198
- this.style.removeProperty(prop);
199
- }
200
- }
201
- render() {
202
- return toolbarTitleTemplate(this);
203
- }
204
- };
205
- NLDDToolbarTitle.styles = toolbarTitleStyles;
206
- __decorate([
207
- property({ reflect: true, converter: reflectNonDefault('') })
208
- ], NLDDToolbarTitle.prototype, "width", void 0);
209
- __decorate([
210
- property({ reflect: true, attribute: 'min-width', converter: reflectNonDefault('') })
211
- ], NLDDToolbarTitle.prototype, "minWidth", void 0);
212
- __decorate([
213
- property({ reflect: true, attribute: 'max-width', converter: reflectNonDefault('') })
214
- ], NLDDToolbarTitle.prototype, "maxWidth", void 0);
215
- __decorate([
216
- property({ reflect: true, converter: reflectNonDefault('left') })
217
- ], NLDDToolbarTitle.prototype, "align", void 0);
218
- __decorate([
219
- property({ reflect: true, converter: reflectNonDefault('') })
220
- ], NLDDToolbarTitle.prototype, "text", void 0);
221
- __decorate([
222
- property({ reflect: true, attribute: 'supporting-text', converter: reflectNonDefault('') })
223
- ], NLDDToolbarTitle.prototype, "supportingText", void 0);
224
- __decorate([
225
- property({ type: String, reflect: true })
226
- ], NLDDToolbarTitle.prototype, "href", void 0);
227
- __decorate([
228
- property({ type: String, reflect: true })
229
- ], NLDDToolbarTitle.prototype, "target", void 0);
230
- __decorate([
231
- property({ type: Object })
232
- ], NLDDToolbarTitle.prototype, "translations", void 0);
233
- __decorate([
234
- property({ reflect: true, converter: reflectNonDefault('md') })
235
- ], NLDDToolbarTitle.prototype, "size", void 0);
236
- NLDDToolbarTitle = __decorate([
237
- customElement('nldd-toolbar-title')
238
- ], NLDDToolbarTitle);
239
- export { NLDDToolbarTitle };
43
+ import { ToolbarOverflowMenu } from './toolbar.overflow-menu.js';
44
+ import { areaWidth, fillsRowAlone, itemsOf, overflowOrder, spacerZeros, groupForOverflow, } from './toolbar.layout.js';
45
+ export { NLDDToolbarItem } from './toolbar-item.js';
46
+ export { NLDDToolbarTitle } from './toolbar-title.js';
47
+ export { groupForOverflow } from './toolbar.layout.js';
240
48
  // # Component
241
49
  let NLDDToolbar = class NLDDToolbar extends LitElement {
242
50
  constructor() {
@@ -245,7 +53,8 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
245
53
  this.showItemLabels = false;
246
54
  this.accessibleLabel = '';
247
55
  this.translations = {};
248
- this._menuOpen = false;
56
+ /** The menu for what does not fit. @internal */
57
+ this._overflowMenu = new ToolbarOverflowMenu(this);
249
58
  this._startChildren = [];
250
59
  this._centerChildren = [];
251
60
  this._endChildren = [];
@@ -267,14 +76,9 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
267
76
  this._pinnedOverflowItems = [];
268
77
  this._childIds = new WeakMap();
269
78
  this._idCounter = 0;
270
- /** Maps the stamped `data-toolbar-oid` of an overflow item (and its
271
- * descendants) back to the original element, so a clone's `select` can be
272
- * forwarded to the original. Rebuilt on every _syncMenuItems. */
273
- this._overflowOriginalById = new Map();
274
79
  this._itemWidths = new Map();
275
80
  this._observer = null;
276
81
  this._resizeObserver = null;
277
- this._menu = null;
278
82
  this._isMeasuring = false;
279
83
  this._childResizeObserver = null;
280
84
  this._lastChildWidths = new WeakMap();
@@ -289,31 +93,6 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
289
93
  if (this._hasMeasured)
290
94
  this._measureAndUpdate();
291
95
  };
292
- /** The overflow menu holds CLONES of the slotted overflow items (see
293
- * _syncMenuItems), so a clone's `select` never reaches the original element's
294
- * listeners. Forward it: map the clicked clone back to its original via the
295
- * `data-toolbar-oid` stamped at clone time, then re-dispatch `select` on the
296
- * original so a consumer's `@select` handler (or a live-bound attribute) on
297
- * the real overflow item fires. */
298
- this._onOverflowMenuSelect = (event) => {
299
- let oid = null;
300
- for (const node of event.composedPath()) {
301
- if (node instanceof Element && node.hasAttribute('data-toolbar-oid')) {
302
- oid = node.getAttribute('data-toolbar-oid');
303
- break;
304
- }
305
- }
306
- if (!oid)
307
- return;
308
- const original = this._overflowOriginalById.get(oid);
309
- if (!original)
310
- return;
311
- original.dispatchEvent(new CustomEvent('select', {
312
- bubbles: true,
313
- composed: true,
314
- detail: event.detail,
315
- }));
316
- };
317
96
  }
318
97
  // — i18n —————————————————————————————————————————————————————————————————
319
98
  _t(key) {
@@ -359,8 +138,17 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
359
138
  else if (needsMenuResync)
360
139
  this._syncMenuItems();
361
140
  });
141
+ // Here and not in firstUpdated: disconnecting takes it down, and a toolbar
142
+ // moved in the DOM or kept by a framework connects again without a first
143
+ // update, so it would no longer follow its width.
144
+ this._resizeObserver = new ResizeObserver(() => {
145
+ if (this._isMeasuring)
146
+ return;
147
+ this._overflowMenu.hide();
148
+ this._measureAndUpdate();
149
+ });
150
+ this._resizeObserver.observe(this);
362
151
  setTimeout(() => this._buildChildren(), 0);
363
- this._createMenu();
364
152
  document.fonts?.addEventListener('loadingdone', this._onFontsLoaded);
365
153
  }
366
154
  disconnectedCallback() {
@@ -372,19 +160,8 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
372
160
  this._resizeObserver = null;
373
161
  this._childResizeObserver?.disconnect();
374
162
  this._childResizeObserver = null;
375
- this._menu?.remove();
376
- this._menu = null;
377
163
  }
378
164
  firstUpdated() {
379
- this._resizeObserver = new ResizeObserver(() => {
380
- if (this._isMeasuring)
381
- return;
382
- if (this._menuOpen) {
383
- this._menu?.hidePopover();
384
- }
385
- this._measureAndUpdate();
386
- });
387
- this._resizeObserver.observe(this);
388
165
  this._syncHosts();
389
166
  }
390
167
  updated(changedProperties) {
@@ -405,92 +182,18 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
405
182
  }
406
183
  }
407
184
  }
408
- _createMenu() {
409
- if (this._menu)
410
- return;
411
- const menu = document.createElement('nldd-menu');
412
- menu.setAttribute('placement', 'bottom-end');
413
- menu.id = `nldd-toolbar-overflow-menu-${this._idCounter++}`;
414
- menu.addEventListener('toggle', (event) => {
415
- this._menuOpen = event.newState === 'open';
416
- });
417
- menu.addEventListener('select', this._onOverflowMenuSelect);
418
- // In the shadow root, NOT document.body: the menu is a popover, so it
419
- // escapes clipping via the top layer anyway, and a body-level menu goes
420
- // inert (visible but untouchable) when the toolbar sits inside a modal
421
- // dialog — everything outside the dialog's subtree is inert then.
422
- this.renderRoot.appendChild(menu);
423
- this._menu = menu;
424
- }
425
185
  _syncMenuAnchor() {
426
- if (!this._menu)
427
- return;
428
- const overflowButton = this.shadowRoot?.querySelector('.toolbar__overflow-button nldd-icon-button');
429
- if (overflowButton) {
430
- this._menu.anchorElement = overflowButton;
431
- // Wire the button as the menu's invoker. The browser handles
432
- // open/close natively via popovertarget — no `@click` handler
433
- // needed. The menu syncs `popoverTargetAction` on every toggle
434
- // (`'hide'` while open, `'show'` while closed), so the next
435
- // click does the right thing without racing against light-
436
- // dismiss. Seed `'show'` here for the very first click before
437
- // the menu has ever toggled.
438
- if ('popoverTargetElement' in overflowButton) {
439
- overflowButton.popoverTargetElement = this._menu;
440
- }
441
- // Default IDL value is 'toggle'; replace it with 'show' so the
442
- // very first click opens via the explicit-show path. Once the
443
- // menu has opened, `_syncAnchorPopupState` keeps the action in
444
- // sync with state ('hide' while open, 'show' while closed) and
445
- // this seed never overrides it.
446
- if ('popoverTargetAction' in overflowButton && overflowButton.popoverTargetAction === 'toggle') {
447
- overflowButton.popoverTargetAction = 'show';
448
- }
449
- }
186
+ this._overflowMenu.anchorTo(this.shadowRoot?.querySelector('.toolbar__overflow-button nldd-icon-button') ?? null);
450
187
  }
451
- /**
452
- * Syncs overflow menu items by cloning the original `nldd-menu-item` elements.
453
- * Note: `cloneNode` does not copy event listeners added via `addEventListener`.
454
- * The `select` event works correctly since it is dispatched by `nldd-menu-item` internally.
455
- * Consumers should avoid adding extra listeners directly on overflow `nldd-menu-item` elements.
456
- */
188
+ /** Fills the overflow menu: the alternatives of the items that did not fit,
189
+ * the last to go first, then the toolbar's own overflow items. A clone does
190
+ * not carry listeners added with addEventListener; its `select` is sent on
191
+ * to the original (see toolbar.overflow-menu.ts). */
457
192
  _syncMenuItems() {
458
- if (!this._menu)
459
- return;
460
- this._menu.innerHTML = '';
461
- this._overflowOriginalById.clear();
462
- // Stamp the original (and every descendant) with a stable id — copied into
463
- // the clone by cloneNode — so _onOverflowMenuSelect can map a clone's
464
- // `select` back to the original. `data-toolbar-oid` is outside the
465
- // observer's attributeFilter, so stamping never retriggers a re-sync.
466
- const cloneWithForwarding = (el) => {
467
- for (const node of [el, ...el.querySelectorAll('*')]) {
468
- let oid = node.getAttribute('data-toolbar-oid');
469
- if (!oid) {
470
- oid = `oid-${this._idCounter++}`;
471
- node.setAttribute('data-toolbar-oid', oid);
472
- }
473
- this._overflowOriginalById.set(oid, node);
474
- }
475
- const clone = el.cloneNode(true);
476
- clone.removeAttribute('slot');
477
- return clone;
478
- };
479
- const prioritized = [...this._getPrioritizedItems()].reverse();
480
- prioritized.forEach(child => {
481
- if (!this._overflowIds.has(child.id))
482
- return;
483
- if (child.overflowItems.length === 0)
484
- return;
485
- child.overflowItems.forEach(el => {
486
- this._menu.appendChild(cloneWithForwarding(el));
487
- });
488
- });
489
- if (this._pinnedOverflowItems.length > 0) {
490
- this._pinnedOverflowItems.forEach(el => {
491
- this._menu.appendChild(cloneWithForwarding(el));
492
- });
493
- }
193
+ const overflowed = [...this._getPrioritizedItems()].reverse()
194
+ .filter(child => this._overflowIds.has(child.id))
195
+ .flatMap(child => child.overflowItems);
196
+ this._overflowMenu.fill([...overflowed, ...this._pinnedOverflowItems]);
494
197
  }
495
198
  /**
496
199
  * Syncs declarative state onto the slotted item and title hosts: size,
@@ -538,29 +241,8 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
538
241
  });
539
242
  }
540
243
  _getPrioritizedItems() {
541
- if (this._prioritizedItemsCache)
542
- return this._prioritizedItemsCache;
543
- const endItems = this._endChildren
544
- .filter((c) => c.type === 'item');
545
- const startItems = this._startChildren
546
- .filter((c) => c.type === 'item');
547
- const centerItems = this._centerChildren
548
- .filter((c) => c.type === 'item');
549
- const result = [
550
- ...endItems.map((item, index) => ({ item, areaOrder: 0, index })),
551
- ...centerItems.map((item, index) => ({ item, areaOrder: 1, index })),
552
- ...startItems.map((item, index) => ({ item, areaOrder: 2, index })),
553
- ]
554
- .sort((a, b) => {
555
- if (a.item.priority !== b.item.priority)
556
- return a.item.priority - b.item.priority;
557
- if (a.areaOrder !== b.areaOrder)
558
- return a.areaOrder - b.areaOrder;
559
- return b.index - a.index;
560
- })
561
- .map(({ item }) => item);
562
- this._prioritizedItemsCache = result;
563
- return result;
244
+ this._prioritizedItemsCache ?? (this._prioritizedItemsCache = overflowOrder(this._startChildren, this._centerChildren, this._endChildren));
245
+ return this._prioritizedItemsCache;
564
246
  }
565
247
  _allHostChildren() {
566
248
  return [...this._startChildren, ...this._centerChildren, ...this._endChildren];
@@ -579,28 +261,6 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
579
261
  }
580
262
  });
581
263
  }
582
- _computeAreaWidth(children, itemGap) {
583
- const visible = children.filter(c => !this._overflowIds.has(c.id));
584
- const gaps = Math.max(0, visible.length - 1) * itemGap;
585
- const itemsWidth = visible.reduce((sum, child) => {
586
- if (child.type === 'item' || child.type === 'title') {
587
- return sum + (this._itemWidths.get(child.id) ?? 0);
588
- }
589
- return sum;
590
- }, 0);
591
- return gaps + itemsWidth;
592
- }
593
- _computeSpacerZeros(hostWidth, itemGap, overflowButtonWidth, startWidth, centerWidth, endWidth) {
594
- if (startWidth === 0 && endWidth === 0) {
595
- return { leftZero: true, rightZero: true };
596
- }
597
- const leftSpacer = hostWidth / 2 - startWidth - centerWidth / 2 - itemGap;
598
- const rightSpacer = hostWidth / 2 - endWidth - centerWidth / 2 - itemGap - overflowButtonWidth;
599
- return {
600
- leftZero: leftSpacer <= 0,
601
- rightZero: rightSpacer <= 0,
602
- };
603
- }
604
264
  _updateAreaVars() {
605
265
  const itemsEl = this.shadowRoot?.querySelector('.toolbar__items');
606
266
  if (!itemsEl)
@@ -614,9 +274,9 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
614
274
  ? overflowButtonEl.getBoundingClientRect().width + hostGap
615
275
  : 0;
616
276
  this.style.setProperty('--_toolbar-overflow-button-width', `${overflowButtonWidth}px`);
617
- const startWidth = this._computeAreaWidth(this._startChildren, itemGap);
618
- const centerWidth = this._computeAreaWidth(this._centerChildren, itemGap);
619
- const endWidth = this._computeAreaWidth(this._endChildren, itemGap);
277
+ const startWidth = areaWidth(this._startChildren, this._overflowIds, this._itemWidths, itemGap);
278
+ const centerWidth = areaWidth(this._centerChildren, this._overflowIds, this._itemWidths, itemGap);
279
+ const endWidth = areaWidth(this._endChildren, this._overflowIds, this._itemWidths, itemGap);
620
280
  this.style.setProperty('--_toolbar-start-width', `${startWidth}px`);
621
281
  this.style.setProperty('--_toolbar-center-width', `${centerWidth}px`);
622
282
  this.style.setProperty('--_toolbar-end-width', `${endWidth}px`);
@@ -628,7 +288,7 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
628
288
  // side gains items.
629
289
  this.style.setProperty('--_toolbar-left-spacer-gap', startWidth > 0 ? `${itemGap}px` : '0px');
630
290
  this.style.setProperty('--_toolbar-right-spacer-gap', endWidth > 0 ? `${itemGap}px` : '0px');
631
- const { leftZero, rightZero } = this._computeSpacerZeros(hostWidth, itemGap, overflowButtonWidth, startWidth, centerWidth, endWidth);
291
+ const { leftZero, rightZero } = spacerZeros(hostWidth, itemGap, overflowButtonWidth, startWidth, centerWidth, endWidth);
632
292
  if (leftZero !== this._leftSpacerZero)
633
293
  this._leftSpacerZero = leftZero;
634
294
  if (rightZero !== this._rightSpacerZero)
@@ -641,16 +301,22 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
641
301
  // balancing spacers). An item the toolbar moved into the overflow menu
642
302
  // still counts: switching layout then changes what fits, so the next
643
303
  // measurement brings it back, and the two layouts take turns forever.
644
- const centerOnly = !this._hasPresentChild(this._startChildren)
645
- && !this._hasPresentChild(this._endChildren)
646
- && this._centerChildren.length > 0;
304
+ const centerOnly = this._isCenterOnly();
647
305
  if (centerOnly !== this._centerOnly)
648
306
  this._centerOnly = centerOnly;
649
307
  const rendered = this._allHostChildren().filter(c => !this._overflowIds.has(c.id) && c.element.getClientRects().length > 0);
650
- const soloFluid = rendered.length === 1 && (rendered[0].type === 'title' || (rendered[0].type === 'item' && rendered[0].isFluid));
308
+ const soloFluid = fillsRowAlone(rendered);
651
309
  if (soloFluid !== this._soloFluid)
652
310
  this._soloFluid = soloFluid;
653
311
  }
312
+ /** Whether only the center has anything in it: nothing rendered at the
313
+ * start or end, and nothing moved from there into the overflow menu. One
314
+ * definition for measuring and for the layout it picks. */
315
+ _isCenterOnly() {
316
+ return !this._hasPresentChild(this._startChildren)
317
+ && !this._hasPresentChild(this._endChildren)
318
+ && this._centerChildren.length > 0;
319
+ }
654
320
  /** Whether any child in the list is actually rendered. getClientRects() is
655
321
  * empty for a `display:none` element (consumer-hidden or toolbar-hidden via
656
322
  * `[hidden]`), so this counts real on-screen presence, not mere DOM presence. */
@@ -677,7 +343,7 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
677
343
  _measureOverflow(itemsEl) {
678
344
  const overflowButtonEl = this.shadowRoot?.querySelector('.toolbar__overflow-button');
679
345
  const allChildren = this._allHostChildren();
680
- const itemChildren = allChildren.filter((c) => c.type === 'item');
346
+ const itemChildren = itemsOf(allChildren);
681
347
  const titleChildren = allChildren.filter((c) => c.type === 'title');
682
348
  // Show all items, reset solo-fluid to fluid with min-width restored.
683
349
  itemChildren.forEach(child => {
@@ -704,9 +370,7 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
704
370
  overflowButtonEl?.classList.add('is-hidden');
705
371
  }
706
372
  void itemsEl.offsetWidth;
707
- const centerOnly = this._startChildren.length === 0
708
- && this._endChildren.length === 0
709
- && this._centerChildren.length > 0;
373
+ const centerOnly = this._isCenterOnly();
710
374
  const isOverflowing = () => itemsEl.scrollWidth > itemsEl.clientWidth + 1;
711
375
  if (!isOverflowing()) {
712
376
  if (this._overflowIds.size > 0) {
@@ -827,13 +491,7 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
827
491
  .map(el => {
828
492
  const tag = el.tagName.toLowerCase();
829
493
  if (tag === 'nldd-toolbar-title') {
830
- const id = this._getId(el);
831
- return {
832
- type: 'title',
833
- element: el,
834
- minWidth: el.minWidth || '200px',
835
- id,
836
- };
494
+ return { type: 'title', element: el, id: this._getId(el) };
837
495
  }
838
496
  if (tag === 'nldd-toolbar-item') {
839
497
  const id = this._getId(el);
@@ -940,13 +598,12 @@ let NLDDToolbar = class NLDDToolbar extends LitElement {
940
598
  });
941
599
  }
942
600
  render() {
943
- const visibleNonDivider = this._allHostChildren().filter(c => !this._overflowIds.has(c.id));
944
601
  // Pre-measurement fallback: before the first _updateAreaVars there is no
945
602
  // rendering to read, so fall back to mere DOM presence. _soloFluid takes
946
603
  // over from the first measurement on.
947
- const isSoloFluid = this._soloFluid || (visibleNonDivider.length === 1 && (visibleNonDivider[0].type === 'title' ||
948
- (visibleNonDivider[0].type === 'item' && visibleNonDivider[0].isFluid)));
949
- return template(this, this._centerChildren.length > 0, this._leftSpacerZero, this._rightSpacerZero, isSoloFluid, this._pinnedOverflowItems.length > 0 || this._overflowIds.size > 0, this._menuOpen, this.accessibleLabel, this._centerOnly, (key) => this._t(key));
604
+ const isSoloFluid = this._soloFluid
605
+ || fillsRowAlone(this._allHostChildren().filter(c => !this._overflowIds.has(c.id)));
606
+ return template(this, this._centerChildren.length > 0, this._leftSpacerZero, this._rightSpacerZero, isSoloFluid, this._pinnedOverflowItems.length > 0 || this._overflowIds.size > 0, this._overflowMenu.open, this.accessibleLabel, this._centerOnly, (key) => this._t(key));
950
607
  }
951
608
  };
952
609
  NLDDToolbar.styles = toolbarStyles;
@@ -962,9 +619,6 @@ __decorate([
962
619
  __decorate([
963
620
  property({ type: Object })
964
621
  ], NLDDToolbar.prototype, "translations", void 0);
965
- __decorate([
966
- state()
967
- ], NLDDToolbar.prototype, "_menuOpen", void 0);
968
622
  __decorate([
969
623
  state()
970
624
  ], NLDDToolbar.prototype, "_startChildren", void 0);
@@ -996,31 +650,4 @@ NLDDToolbar = __decorate([
996
650
  customElement('nldd-toolbar')
997
651
  ], NLDDToolbar);
998
652
  export { NLDDToolbar };
999
- /**
1000
- * Groups prioritized items for overflow. Items with an explicit priority that
1001
- * share a value form one group and overflow together regardless of their
1002
- * position; items without a priority attribute each form their own group
1003
- * (they overflow individually).
1004
- *
1005
- * @internal Exported for unit tests only; not part of the public API.
1006
- */
1007
- export function groupForOverflow(items) {
1008
- const groups = [];
1009
- const byPriority = new Map();
1010
- for (const child of items) {
1011
- if (!child.hasPriority) {
1012
- groups.push([child]);
1013
- continue;
1014
- }
1015
- const existing = byPriority.get(child.priority);
1016
- if (existing) {
1017
- existing.push(child);
1018
- continue;
1019
- }
1020
- const group = [child];
1021
- byPriority.set(child.priority, group);
1022
- groups.push(group);
1023
- }
1024
- return groups;
1025
- }
1026
653
  //# sourceMappingURL=toolbar.js.map