@nldd/design-system 0.8.82 → 0.8.84

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 (487) hide show
  1. package/custom-elements.json +3849 -542
  2. package/dist/components/actions/button/button.d.ts +9 -2
  3. package/dist/components/actions/button/button.d.ts.map +1 -1
  4. package/dist/components/actions/button/button.js +15 -2
  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 +2 -0
  8. package/dist/components/actions/button/button.template.js.map +1 -1
  9. package/dist/components/actions/icon-button/icon-button.d.ts +2 -2
  10. package/dist/components/actions/icon-button/icon-button.js +2 -2
  11. package/dist/components/actions/menu/menu.d.ts +3 -1
  12. package/dist/components/actions/menu/menu.d.ts.map +1 -1
  13. package/dist/components/actions/menu/menu.js +22 -11
  14. package/dist/components/actions/menu/menu.js.map +1 -1
  15. package/dist/components/actions/toolbar/toolbar.styles.js +2 -2
  16. package/dist/components/components.js +2911 -1157
  17. package/dist/components/content/avatar/avatar.d.ts +6 -0
  18. package/dist/components/content/avatar/avatar.d.ts.map +1 -1
  19. package/dist/components/content/avatar/avatar.js +9 -0
  20. package/dist/components/content/avatar/avatar.js.map +1 -1
  21. package/dist/components/content/avatar/avatar.styles.d.ts.map +1 -1
  22. package/dist/components/content/avatar/avatar.styles.js +5 -1
  23. package/dist/components/content/avatar/avatar.styles.js.map +1 -1
  24. package/dist/components/content/avatar/avatar.template.d.ts.map +1 -1
  25. package/dist/components/content/avatar/avatar.template.js +2 -0
  26. package/dist/components/content/avatar/avatar.template.js.map +1 -1
  27. package/dist/components/content/avatar-group/avatar-group.styles.d.ts.map +1 -1
  28. package/dist/components/content/avatar-group/avatar-group.styles.js +6 -16
  29. package/dist/components/content/avatar-group/avatar-group.styles.js.map +1 -1
  30. package/dist/components/content/blockquote/blockquote.d.ts +3 -4
  31. package/dist/components/content/blockquote/blockquote.d.ts.map +1 -1
  32. package/dist/components/content/blockquote/blockquote.js +3 -4
  33. package/dist/components/content/blockquote/blockquote.js.map +1 -1
  34. package/dist/components/content/icon/icon-aliases.d.ts.map +1 -1
  35. package/dist/components/content/icon/icon-aliases.js +80 -6
  36. package/dist/components/content/icon/icon-aliases.js.map +1 -1
  37. package/dist/components/content/icon/icon-gallery-status.d.ts.map +1 -1
  38. package/dist/components/content/icon/icon-gallery-status.js +57 -94
  39. package/dist/components/content/icon/icon-gallery-status.js.map +1 -1
  40. package/dist/components/content/icon/icon-registry.d.ts.map +1 -1
  41. package/dist/components/content/icon/icon-registry.js +36 -4
  42. package/dist/components/content/icon/icon-registry.js.map +1 -1
  43. package/dist/components/content/icon/icon.d.ts +8 -2
  44. package/dist/components/content/icon/icon.d.ts.map +1 -1
  45. package/dist/components/content/icon/icon.js +17 -2
  46. package/dist/components/content/icon/icon.js.map +1 -1
  47. package/dist/components/content/icon/icon.styles.d.ts.map +1 -1
  48. package/dist/components/content/icon/icon.styles.js +8 -0
  49. package/dist/components/content/icon/icon.styles.js.map +1 -1
  50. package/dist/components/content/image/image.d.ts +1 -1
  51. package/dist/components/content/image/image.js +1 -1
  52. package/dist/components/content/image/image.styles.d.ts.map +1 -1
  53. package/dist/components/content/image/image.styles.js +11 -0
  54. package/dist/components/content/image/image.styles.js.map +1 -1
  55. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.d.ts +30 -30
  56. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.js +30 -30
  57. package/dist/components/content/rich-text/rich-text.d.ts +20 -20
  58. package/dist/components/content/rich-text/rich-text.js +20 -20
  59. package/dist/components/content/text/text.d.ts +50 -0
  60. package/dist/components/content/text/text.d.ts.map +1 -0
  61. package/dist/components/content/text/text.js +81 -0
  62. package/dist/components/content/text/text.js.map +1 -0
  63. package/dist/components/content/text/text.styles.d.ts +2 -0
  64. package/dist/components/content/text/text.styles.d.ts.map +1 -0
  65. package/dist/components/content/text/text.styles.js +116 -0
  66. package/dist/components/content/text/text.styles.js.map +1 -0
  67. package/dist/components/content/text/text.template.d.ts +3 -0
  68. package/dist/components/content/text/text.template.d.ts.map +1 -0
  69. package/dist/components/content/text/text.template.js +7 -0
  70. package/dist/components/content/text/text.template.js.map +1 -0
  71. package/dist/components/content/title/title.d.ts +4 -4
  72. package/dist/components/content/title/title.js +4 -4
  73. package/dist/components/content/title/title.styles.d.ts.map +1 -1
  74. package/dist/components/content/title/title.styles.js +9 -13
  75. package/dist/components/content/title/title.styles.js.map +1 -1
  76. package/dist/components/content/tooltip/tooltip.d.ts +1 -1
  77. package/dist/components/content/tooltip/tooltip.js +1 -1
  78. package/dist/components/{decorate-BKn10QQi.js → decorate-lwt_OrAG.js} +1 -1
  79. package/dist/components/{dist-TpIL8G4G.js → dist-762GHPyH.js} +3 -3
  80. package/dist/components/{dist-OBifyiJS.js → dist-BB7TxeMK.js} +2 -2
  81. package/dist/components/{dist-CJR_Rwhh.js → dist-BJI4-6iQ.js} +1 -1
  82. package/dist/components/{dist-C400RcFU.js → dist-B_3OW7pC.js} +1 -1
  83. package/dist/components/{dist-afrAoubg.js → dist-C09E9-dJ.js} +34 -34
  84. package/dist/components/{dist-Ccw7ZfsU.js → dist-C6gnorjP.js} +4 -3
  85. package/dist/components/{dist-bO14jlsr.js → dist-CRsR6ckU.js} +1 -1
  86. package/dist/components/{dist-C0PiB1dr.js → dist-CjaG8dOI.js} +2 -2
  87. package/dist/components/{dist-CCg5Mso_.js → dist-DZoFKUO-.js} +1 -1
  88. package/dist/components/{dist-Bq4xc7Bm.js → dist-DaavuU6W.js} +14 -3
  89. package/dist/components/{dist-BYVOPNHp.js → dist-la_b3ZSq.js} +1 -1
  90. package/dist/components/forms/form/form.d.ts +76 -22
  91. package/dist/components/forms/form/form.d.ts.map +1 -1
  92. package/dist/components/forms/form/form.js +127 -22
  93. package/dist/components/forms/form/form.js.map +1 -1
  94. package/dist/components/forms/form-actions/form-actions.d.ts +14 -15
  95. package/dist/components/forms/form-actions/form-actions.d.ts.map +1 -1
  96. package/dist/components/forms/form-actions/form-actions.js +14 -15
  97. package/dist/components/forms/form-actions/form-actions.js.map +1 -1
  98. package/dist/components/forms/form-field/form-field.d.ts +42 -39
  99. package/dist/components/forms/form-field/form-field.d.ts.map +1 -1
  100. package/dist/components/forms/form-field/form-field.js +79 -111
  101. package/dist/components/forms/form-field/form-field.js.map +1 -1
  102. package/dist/components/forms/form-field/form-field.styles.d.ts +0 -1
  103. package/dist/components/forms/form-field/form-field.styles.d.ts.map +1 -1
  104. package/dist/components/forms/form-field/form-field.styles.js +7 -73
  105. package/dist/components/forms/form-field/form-field.styles.js.map +1 -1
  106. package/dist/components/forms/form-field/form-field.template.d.ts +0 -2
  107. package/dist/components/forms/form-field/form-field.template.d.ts.map +1 -1
  108. package/dist/components/forms/form-field/form-field.template.js +0 -15
  109. package/dist/components/forms/form-field/form-field.template.js.map +1 -1
  110. package/dist/components/forms/form-section/form-section.d.ts +26 -28
  111. package/dist/components/forms/form-section/form-section.d.ts.map +1 -1
  112. package/dist/components/forms/form-section/form-section.js +27 -29
  113. package/dist/components/forms/form-section/form-section.js.map +1 -1
  114. package/dist/components/forms/validation-list/validation-list.d.ts +193 -0
  115. package/dist/components/forms/validation-list/validation-list.d.ts.map +1 -0
  116. package/dist/components/forms/validation-list/validation-list.js +358 -0
  117. package/dist/components/forms/validation-list/validation-list.js.map +1 -0
  118. package/dist/components/forms/validation-list/validation-list.styles.d.ts +3 -0
  119. package/dist/components/forms/validation-list/validation-list.styles.d.ts.map +1 -0
  120. package/dist/components/forms/validation-list/validation-list.styles.js +58 -0
  121. package/dist/components/forms/validation-list/validation-list.styles.js.map +1 -0
  122. package/dist/components/forms/validation-list/validation-list.template.d.ts +5 -0
  123. package/dist/components/forms/validation-list/validation-list.template.d.ts.map +1 -0
  124. package/dist/components/forms/validation-list/validation-list.template.js +16 -0
  125. package/dist/components/forms/validation-list/validation-list.template.js.map +1 -0
  126. package/dist/components/{icon-CIpJq_cf.js → icon-VTLbdcvZ.js} +104 -11
  127. package/dist/components/{icon-button-BAkUJTn6.js → icon-button-Sne5TwRG.js} +6 -6
  128. package/dist/components/index.d.ts +3 -1
  129. package/dist/components/index.d.ts.map +1 -1
  130. package/dist/components/index.js +3 -1
  131. package/dist/components/index.js.map +1 -1
  132. package/dist/components/inputs/checkbox/checkbox.d.ts +20 -1
  133. package/dist/components/inputs/checkbox/checkbox.d.ts.map +1 -1
  134. package/dist/components/inputs/checkbox/checkbox.js +32 -2
  135. package/dist/components/inputs/checkbox/checkbox.js.map +1 -1
  136. package/dist/components/inputs/checkbox/checkbox.template.d.ts.map +1 -1
  137. package/dist/components/inputs/checkbox/checkbox.template.js +2 -0
  138. package/dist/components/inputs/checkbox/checkbox.template.js.map +1 -1
  139. package/dist/components/inputs/checkbox-field/checkbox-field.d.ts +16 -1
  140. package/dist/components/inputs/checkbox-field/checkbox-field.d.ts.map +1 -1
  141. package/dist/components/inputs/checkbox-field/checkbox-field.js +27 -2
  142. package/dist/components/inputs/checkbox-field/checkbox-field.js.map +1 -1
  143. package/dist/components/inputs/checkbox-field/checkbox-field.template.d.ts.map +1 -1
  144. package/dist/components/inputs/checkbox-field/checkbox-field.template.js +2 -0
  145. package/dist/components/inputs/checkbox-field/checkbox-field.template.js.map +1 -1
  146. package/dist/components/inputs/code-editor/code-editor.d.ts +14 -1
  147. package/dist/components/inputs/code-editor/code-editor.d.ts.map +1 -1
  148. package/dist/components/inputs/code-editor/code-editor.js +21 -2
  149. package/dist/components/inputs/code-editor/code-editor.js.map +1 -1
  150. package/dist/components/inputs/combo-box/combo-box.d.ts +15 -2
  151. package/dist/components/inputs/combo-box/combo-box.d.ts.map +1 -1
  152. package/dist/components/inputs/combo-box/combo-box.js +54 -5
  153. package/dist/components/inputs/combo-box/combo-box.js.map +1 -1
  154. package/dist/components/inputs/combo-box/combo-box.styles.d.ts.map +1 -1
  155. package/dist/components/inputs/combo-box/combo-box.styles.js +14 -0
  156. package/dist/components/inputs/combo-box/combo-box.styles.js.map +1 -1
  157. package/dist/components/inputs/combo-box/combo-box.template.d.ts.map +1 -1
  158. package/dist/components/inputs/combo-box/combo-box.template.js +27 -20
  159. package/dist/components/inputs/combo-box/combo-box.template.js.map +1 -1
  160. package/dist/components/inputs/date-field/date-field.d.ts +29 -31
  161. package/dist/components/inputs/date-field/date-field.d.ts.map +1 -1
  162. package/dist/components/inputs/date-field/date-field.js +40 -37
  163. package/dist/components/inputs/date-field/date-field.js.map +1 -1
  164. package/dist/components/inputs/date-field/date-field.styles.d.ts.map +1 -1
  165. package/dist/components/inputs/date-field/date-field.styles.js +11 -0
  166. package/dist/components/inputs/date-field/date-field.styles.js.map +1 -1
  167. package/dist/components/inputs/date-field/date-field.template.d.ts.map +1 -1
  168. package/dist/components/inputs/date-field/date-field.template.js +7 -2
  169. package/dist/components/inputs/date-field/date-field.template.js.map +1 -1
  170. package/dist/components/inputs/date-picker/date-picker.d.ts +34 -21
  171. package/dist/components/inputs/date-picker/date-picker.d.ts.map +1 -1
  172. package/dist/components/inputs/date-picker/date-picker.js +42 -22
  173. package/dist/components/inputs/date-picker/date-picker.js.map +1 -1
  174. package/dist/components/inputs/dropdown/dropdown.d.ts +23 -2
  175. package/dist/components/inputs/dropdown/dropdown.d.ts.map +1 -1
  176. package/dist/components/inputs/dropdown/dropdown.js +36 -3
  177. package/dist/components/inputs/dropdown/dropdown.js.map +1 -1
  178. package/dist/components/inputs/file-field/file-field.d.ts +4 -3
  179. package/dist/components/inputs/file-field/file-field.d.ts.map +1 -1
  180. package/dist/components/inputs/file-field/file-field.js +8 -7
  181. package/dist/components/inputs/file-field/file-field.js.map +1 -1
  182. package/dist/components/inputs/file-field/file-field.template.d.ts.map +1 -1
  183. package/dist/components/inputs/file-field/file-field.template.js +0 -1
  184. package/dist/components/inputs/file-field/file-field.template.js.map +1 -1
  185. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.d.ts +15 -4
  186. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.d.ts.map +1 -1
  187. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.js +20 -8
  188. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.js.map +1 -1
  189. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.template.d.ts.map +1 -1
  190. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.template.js +4 -1
  191. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.template.js.map +1 -1
  192. package/dist/components/inputs/number-field/number-field.d.ts +12 -1
  193. package/dist/components/inputs/number-field/number-field.d.ts.map +1 -1
  194. package/dist/components/inputs/number-field/number-field.js +18 -3
  195. package/dist/components/inputs/number-field/number-field.js.map +1 -1
  196. package/dist/components/inputs/number-field/number-field.styles.d.ts.map +1 -1
  197. package/dist/components/inputs/number-field/number-field.styles.js +8 -16
  198. package/dist/components/inputs/number-field/number-field.styles.js.map +1 -1
  199. package/dist/components/inputs/password-field/password-field.d.ts +10 -3
  200. package/dist/components/inputs/password-field/password-field.d.ts.map +1 -1
  201. package/dist/components/inputs/password-field/password-field.js +18 -8
  202. package/dist/components/inputs/password-field/password-field.js.map +1 -1
  203. package/dist/components/inputs/password-field/password-field.template.d.ts.map +1 -1
  204. package/dist/components/inputs/password-field/password-field.template.js +3 -1
  205. package/dist/components/inputs/password-field/password-field.template.js.map +1 -1
  206. package/dist/components/inputs/radio-button/radio-button.d.ts +18 -1
  207. package/dist/components/inputs/radio-button/radio-button.d.ts.map +1 -1
  208. package/dist/components/inputs/radio-button/radio-button.js +27 -2
  209. package/dist/components/inputs/radio-button/radio-button.js.map +1 -1
  210. package/dist/components/inputs/radio-button/radio-button.template.d.ts.map +1 -1
  211. package/dist/components/inputs/radio-button/radio-button.template.js +1 -0
  212. package/dist/components/inputs/radio-button/radio-button.template.js.map +1 -1
  213. package/dist/components/inputs/radio-button-field/radio-button-field.d.ts +14 -1
  214. package/dist/components/inputs/radio-button-field/radio-button-field.d.ts.map +1 -1
  215. package/dist/components/inputs/radio-button-field/radio-button-field.js +22 -2
  216. package/dist/components/inputs/radio-button-field/radio-button-field.js.map +1 -1
  217. package/dist/components/inputs/radio-button-field/radio-button-field.template.d.ts.map +1 -1
  218. package/dist/components/inputs/radio-button-field/radio-button-field.template.js +1 -0
  219. package/dist/components/inputs/radio-button-field/radio-button-field.template.js.map +1 -1
  220. package/dist/components/inputs/radio-button-group/radio-button-group.d.ts +11 -0
  221. package/dist/components/inputs/radio-button-group/radio-button-group.d.ts.map +1 -1
  222. package/dist/components/inputs/radio-button-group/radio-button-group.js +21 -0
  223. package/dist/components/inputs/radio-button-group/radio-button-group.js.map +1 -1
  224. package/dist/components/inputs/search-field/search-field.d.ts +23 -1
  225. package/dist/components/inputs/search-field/search-field.d.ts.map +1 -1
  226. package/dist/components/inputs/search-field/search-field.js +37 -3
  227. package/dist/components/inputs/search-field/search-field.js.map +1 -1
  228. package/dist/components/inputs/search-field/search-field.template.d.ts.map +1 -1
  229. package/dist/components/inputs/search-field/search-field.template.js +4 -0
  230. package/dist/components/inputs/search-field/search-field.template.js.map +1 -1
  231. package/dist/components/inputs/segmented-control/segmented-control.d.ts +28 -0
  232. package/dist/components/inputs/segmented-control/segmented-control.d.ts.map +1 -1
  233. package/dist/components/inputs/segmented-control/segmented-control.js +52 -2
  234. package/dist/components/inputs/segmented-control/segmented-control.js.map +1 -1
  235. package/dist/components/inputs/segmented-control/segmented-control.template.d.ts.map +1 -1
  236. package/dist/components/inputs/segmented-control/segmented-control.template.js +1 -0
  237. package/dist/components/inputs/segmented-control/segmented-control.template.js.map +1 -1
  238. package/dist/components/inputs/stepper/stepper.d.ts +14 -1
  239. package/dist/components/inputs/stepper/stepper.d.ts.map +1 -1
  240. package/dist/components/inputs/stepper/stepper.js +21 -2
  241. package/dist/components/inputs/stepper/stepper.js.map +1 -1
  242. package/dist/components/inputs/switch/switch.d.ts +20 -1
  243. package/dist/components/inputs/switch/switch.d.ts.map +1 -1
  244. package/dist/components/inputs/switch/switch.js +31 -2
  245. package/dist/components/inputs/switch/switch.js.map +1 -1
  246. package/dist/components/inputs/switch/switch.template.d.ts.map +1 -1
  247. package/dist/components/inputs/switch/switch.template.js +2 -0
  248. package/dist/components/inputs/switch/switch.template.js.map +1 -1
  249. package/dist/components/inputs/switch-field/switch-field.d.ts +18 -1
  250. package/dist/components/inputs/switch-field/switch-field.d.ts.map +1 -1
  251. package/dist/components/inputs/switch-field/switch-field.js +25 -1
  252. package/dist/components/inputs/switch-field/switch-field.js.map +1 -1
  253. package/dist/components/inputs/switch-field/switch-field.template.d.ts.map +1 -1
  254. package/dist/components/inputs/switch-field/switch-field.template.js +2 -0
  255. package/dist/components/inputs/switch-field/switch-field.template.js.map +1 -1
  256. package/dist/components/inputs/text-editor/text-editor.d.ts +14 -1
  257. package/dist/components/inputs/text-editor/text-editor.d.ts.map +1 -1
  258. package/dist/components/inputs/text-editor/text-editor.js +21 -2
  259. package/dist/components/inputs/text-editor/text-editor.js.map +1 -1
  260. package/dist/components/inputs/text-field/text-field.d.ts +31 -3
  261. package/dist/components/inputs/text-field/text-field.d.ts.map +1 -1
  262. package/dist/components/inputs/text-field/text-field.js +65 -7
  263. package/dist/components/inputs/text-field/text-field.js.map +1 -1
  264. package/dist/components/inputs/text-field/text-field.template.d.ts.map +1 -1
  265. package/dist/components/inputs/text-field/text-field.template.js +5 -1
  266. package/dist/components/inputs/text-field/text-field.template.js.map +1 -1
  267. package/dist/components/inputs/time-field/time-field.d.ts +33 -35
  268. package/dist/components/inputs/time-field/time-field.d.ts.map +1 -1
  269. package/dist/components/inputs/time-field/time-field.js +43 -40
  270. package/dist/components/inputs/time-field/time-field.js.map +1 -1
  271. package/dist/components/inputs/time-field/time-field.styles.d.ts.map +1 -1
  272. package/dist/components/inputs/time-field/time-field.styles.js +12 -0
  273. package/dist/components/inputs/time-field/time-field.styles.js.map +1 -1
  274. package/dist/components/inputs/time-field/time-field.template.d.ts.map +1 -1
  275. package/dist/components/inputs/time-field/time-field.template.js +7 -2
  276. package/dist/components/inputs/time-field/time-field.template.js.map +1 -1
  277. package/dist/components/inputs/time-picker/time-picker.d.ts +34 -19
  278. package/dist/components/inputs/time-picker/time-picker.d.ts.map +1 -1
  279. package/dist/components/inputs/time-picker/time-picker.js +42 -22
  280. package/dist/components/inputs/time-picker/time-picker.js.map +1 -1
  281. package/dist/components/inputs/toggle-button/toggle-button.d.ts +22 -1
  282. package/dist/components/inputs/toggle-button/toggle-button.d.ts.map +1 -1
  283. package/dist/components/inputs/toggle-button/toggle-button.js +35 -2
  284. package/dist/components/inputs/toggle-button/toggle-button.js.map +1 -1
  285. package/dist/components/inputs/toggle-button/toggle-button.template.d.ts.map +1 -1
  286. package/dist/components/inputs/toggle-button/toggle-button.template.js +3 -0
  287. package/dist/components/inputs/toggle-button/toggle-button.template.js.map +1 -1
  288. package/dist/components/inputs/toggle-button-group/toggle-button-group.d.ts +27 -0
  289. package/dist/components/inputs/toggle-button-group/toggle-button-group.d.ts.map +1 -1
  290. package/dist/components/inputs/toggle-button-group/toggle-button-group.js +46 -0
  291. package/dist/components/inputs/toggle-button-group/toggle-button-group.js.map +1 -1
  292. package/dist/components/inputs/token-field/token-field.d.ts +7 -1
  293. package/dist/components/inputs/token-field/token-field.d.ts.map +1 -1
  294. package/dist/components/inputs/token-field/token-field.js +14 -1
  295. package/dist/components/inputs/token-field/token-field.js.map +1 -1
  296. package/dist/components/layout/app-view/app-view.d.ts.map +1 -1
  297. package/dist/components/layout/app-view/app-view.js +12 -0
  298. package/dist/components/layout/app-view/app-view.js.map +1 -1
  299. package/dist/components/layout/box/box.d.ts +4 -4
  300. package/dist/components/layout/box/box.d.ts.map +1 -1
  301. package/dist/components/layout/box/box.js +4 -4
  302. package/dist/components/layout/box/box.js.map +1 -1
  303. package/dist/components/layout/box/box.styles.d.ts.map +1 -1
  304. package/dist/components/layout/box/box.styles.js +4 -6
  305. package/dist/components/layout/box/box.styles.js.map +1 -1
  306. package/dist/components/layout/card/card.d.ts +18 -19
  307. package/dist/components/layout/card/card.d.ts.map +1 -1
  308. package/dist/components/layout/card/card.js +18 -19
  309. package/dist/components/layout/card/card.js.map +1 -1
  310. package/dist/components/layout/card/card.styles.d.ts.map +1 -1
  311. package/dist/components/layout/card/card.styles.js +1 -0
  312. package/dist/components/layout/card/card.styles.js.map +1 -1
  313. package/dist/components/layout/collection/collection.d.ts.map +1 -1
  314. package/dist/components/layout/collection/collection.js +6 -2
  315. package/dist/components/layout/collection/collection.js.map +1 -1
  316. package/dist/components/layout/divider/divider.d.ts +1 -1
  317. package/dist/components/layout/divider/divider.js +1 -1
  318. package/dist/components/layout/popover/popover.d.ts +1 -1
  319. package/dist/components/layout/popover/popover.d.ts.map +1 -1
  320. package/dist/components/layout/popover/popover.js +15 -2
  321. package/dist/components/layout/popover/popover.js.map +1 -1
  322. package/dist/components/layout/sheet/sheet.d.ts +1 -1
  323. package/dist/components/layout/sheet/sheet.js +2 -2
  324. package/dist/components/layout/sheet/sheet.js.map +1 -1
  325. package/dist/components/layout/sheet/sheet.styles.d.ts.map +1 -1
  326. package/dist/components/layout/sheet/sheet.styles.js +15 -3
  327. package/dist/components/layout/sheet/sheet.styles.js.map +1 -1
  328. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.d.ts +8 -0
  329. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.d.ts.map +1 -1
  330. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.js +29 -11
  331. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.js.map +1 -1
  332. package/dist/components/layout/window/window.d.ts +20 -21
  333. package/dist/components/layout/window/window.d.ts.map +1 -1
  334. package/dist/components/layout/window/window.js +21 -22
  335. package/dist/components/layout/window/window.js.map +1 -1
  336. package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.d.ts +41 -12
  337. package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.d.ts.map +1 -1
  338. package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.js +47 -17
  339. package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.js.map +1 -1
  340. package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.styles.d.ts.map +1 -1
  341. package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.styles.js +42 -13
  342. package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.styles.js.map +1 -1
  343. package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.template.d.ts.map +1 -1
  344. package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.template.js +12 -4
  345. package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.template.js.map +1 -1
  346. package/dist/components/lists-and-tables/list/list.d.ts +168 -61
  347. package/dist/components/lists-and-tables/list/list.d.ts.map +1 -1
  348. package/dist/components/lists-and-tables/list/list.i18n.d.ts +0 -1
  349. package/dist/components/lists-and-tables/list/list.i18n.d.ts.map +1 -1
  350. package/dist/components/lists-and-tables/list/list.i18n.js +0 -1
  351. package/dist/components/lists-and-tables/list/list.i18n.js.map +1 -1
  352. package/dist/components/lists-and-tables/list/list.js +361 -122
  353. package/dist/components/lists-and-tables/list/list.js.map +1 -1
  354. package/dist/components/lists-and-tables/list/list.styles.d.ts.map +1 -1
  355. package/dist/components/lists-and-tables/list/list.styles.js +5 -0
  356. package/dist/components/lists-and-tables/list/list.styles.js.map +1 -1
  357. package/dist/components/lists-and-tables/list/list.template.d.ts +1 -3
  358. package/dist/components/lists-and-tables/list/list.template.d.ts.map +1 -1
  359. package/dist/components/lists-and-tables/list/list.template.js +2 -7
  360. package/dist/components/lists-and-tables/list/list.template.js.map +1 -1
  361. package/dist/components/lists-and-tables/list-item/list-item.d.ts +134 -23
  362. package/dist/components/lists-and-tables/list-item/list-item.d.ts.map +1 -1
  363. package/dist/components/lists-and-tables/list-item/list-item.js +354 -61
  364. package/dist/components/lists-and-tables/list-item/list-item.js.map +1 -1
  365. package/dist/components/lists-and-tables/list-item/list-item.styles.d.ts.map +1 -1
  366. package/dist/components/lists-and-tables/list-item/list-item.styles.js +116 -34
  367. package/dist/components/lists-and-tables/list-item/list-item.styles.js.map +1 -1
  368. package/dist/components/lists-and-tables/list-item/list-item.template.d.ts +1 -1
  369. package/dist/components/lists-and-tables/list-item/list-item.template.d.ts.map +1 -1
  370. package/dist/components/lists-and-tables/list-item/list-item.template.js +5 -2
  371. package/dist/components/lists-and-tables/list-item/list-item.template.js.map +1 -1
  372. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts +116 -0
  373. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts.map +1 -0
  374. package/dist/components/lists-and-tables/{list-item-action/list-item-action.js → list-item-segment/list-item-segment.js} +85 -56
  375. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js.map +1 -0
  376. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.d.ts +2 -0
  377. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.d.ts.map +1 -0
  378. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.js +179 -0
  379. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.js.map +1 -0
  380. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.d.ts +3 -0
  381. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.d.ts.map +1 -0
  382. package/dist/components/lists-and-tables/{list-item-action/list-item-action.template.js → list-item-segment/list-item-segment.template.js} +5 -4
  383. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.js.map +1 -0
  384. package/dist/components/lists-and-tables/table/table.d.ts +12 -9
  385. package/dist/components/lists-and-tables/table/table.d.ts.map +1 -1
  386. package/dist/components/lists-and-tables/table/table.i18n.d.ts +0 -1
  387. package/dist/components/lists-and-tables/table/table.i18n.d.ts.map +1 -1
  388. package/dist/components/lists-and-tables/table/table.i18n.js +0 -1
  389. package/dist/components/lists-and-tables/table/table.i18n.js.map +1 -1
  390. package/dist/components/lists-and-tables/table/table.js +26 -16
  391. package/dist/components/lists-and-tables/table/table.js.map +1 -1
  392. package/dist/components/lists-and-tables/table/table.styles.d.ts.map +1 -1
  393. package/dist/components/lists-and-tables/table/table.styles.js +5 -0
  394. package/dist/components/lists-and-tables/table/table.styles.js.map +1 -1
  395. package/dist/components/lists-and-tables/table/table.template.d.ts +1 -1
  396. package/dist/components/lists-and-tables/table/table.template.d.ts.map +1 -1
  397. package/dist/components/lists-and-tables/table/table.template.js +5 -9
  398. package/dist/components/lists-and-tables/table/table.template.js.map +1 -1
  399. package/dist/components/navigation/link/link.d.ts +30 -24
  400. package/dist/components/navigation/link/link.d.ts.map +1 -1
  401. package/dist/components/navigation/link/link.js +33 -24
  402. package/dist/components/navigation/link/link.js.map +1 -1
  403. package/dist/components/navigation/link/link.template.js +1 -1
  404. package/dist/components/navigation/link/link.template.js.map +1 -1
  405. package/dist/components/navigation/menu-bar/menu-bar.d.ts +7 -7
  406. package/dist/components/navigation/menu-bar/menu-bar.js +7 -7
  407. package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts +23 -23
  408. package/dist/components/navigation/menu-bar-item/menu-bar-item.js +23 -23
  409. package/dist/components/navigation/pagination/pagination.d.ts +4 -4
  410. package/dist/components/navigation/pagination/pagination.js +4 -4
  411. package/dist/components/navigation/skip-link/skip-link.d.ts +7 -7
  412. package/dist/components/navigation/skip-link/skip-link.js +7 -7
  413. package/dist/components/navigation/tab-bar/tab-bar.d.ts +5 -3
  414. package/dist/components/navigation/tab-bar/tab-bar.d.ts.map +1 -1
  415. package/dist/components/navigation/tab-bar/tab-bar.js +18 -13
  416. package/dist/components/navigation/tab-bar/tab-bar.js.map +1 -1
  417. package/dist/components/navigation/tab-bar/tab-bar.styles.js +8 -8
  418. package/dist/components/navigation/tab-bar/tab-bar.template.js +5 -5
  419. package/dist/components/navigation/tab-bar/tab-bar.template.js.map +1 -1
  420. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts +15 -15
  421. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js +15 -15
  422. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.d.ts.map +1 -1
  423. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js +14 -2
  424. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js.map +1 -1
  425. package/dist/components/navigation/top-title-bar/top-title-bar.d.ts +2 -2
  426. package/dist/components/navigation/top-title-bar/top-title-bar.js +2 -2
  427. package/dist/components/navigation/top-title-bar/top-title-bar.styles.js +2 -2
  428. package/dist/components/status-and-feedback/badge/badge.d.ts +8 -2
  429. package/dist/components/status-and-feedback/badge/badge.d.ts.map +1 -1
  430. package/dist/components/status-and-feedback/badge/badge.js +17 -1
  431. package/dist/components/status-and-feedback/badge/badge.js.map +1 -1
  432. package/dist/components/status-and-feedback/badge/badge.styles.d.ts.map +1 -1
  433. package/dist/components/status-and-feedback/badge/badge.styles.js +41 -10
  434. package/dist/components/status-and-feedback/badge/badge.styles.js.map +1 -1
  435. package/dist/components/status-and-feedback/badge/badge.template.js +1 -1
  436. package/dist/components/status-and-feedback/badge/badge.template.js.map +1 -1
  437. package/dist/components/status-and-feedback/banner/banner.styles.js +2 -2
  438. package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.d.ts +37 -36
  439. package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.d.ts.map +1 -1
  440. package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.js +37 -36
  441. package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.js.map +1 -1
  442. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.d.ts +1 -1
  443. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js +2 -2
  444. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js.map +1 -1
  445. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.d.ts.map +1 -1
  446. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.js +7 -0
  447. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.js.map +1 -1
  448. package/dist/components/status-and-feedback/notification/notification-region.js +1 -1
  449. package/dist/components/status-and-feedback/status-bar/status-bar.d.ts +29 -28
  450. package/dist/components/status-and-feedback/status-bar/status-bar.d.ts.map +1 -1
  451. package/dist/components/status-and-feedback/status-bar/status-bar.js +29 -28
  452. package/dist/components/status-and-feedback/status-bar/status-bar.js.map +1 -1
  453. package/dist/components/status-and-feedback/step-indicator/step-indicator.styles.js +1 -1
  454. package/dist/components/{visibility-mixin-GxbwkBb1.js → visibility-mixin-vbfhyo7f.js} +1 -1
  455. package/dist/components/{with-translations-DzAdFTK8.js → with-translations-CqUV9S5g.js} +1 -1
  456. package/dist/css/form-section.css +28 -46
  457. package/dist/css/form.css +7 -13
  458. package/dist/css/rich-text.css +5 -5
  459. package/dist/css/variables.css +133 -8
  460. package/dist/nldd.min.js +1382 -875
  461. package/dist/types/vue.d.ts +530 -336
  462. package/dist/utilities/codemirror/codemirror-element.d.ts.map +1 -1
  463. package/dist/utilities/codemirror/codemirror-element.js +5 -0
  464. package/dist/utilities/codemirror/codemirror-element.js.map +1 -1
  465. package/dist/utilities/described-by-mixin.d.ts +49 -0
  466. package/dist/utilities/described-by-mixin.d.ts.map +1 -0
  467. package/dist/utilities/described-by-mixin.js +109 -0
  468. package/dist/utilities/described-by-mixin.js.map +1 -0
  469. package/dist/utilities/form-associated-mixin.d.ts +5 -0
  470. package/dist/utilities/form-associated-mixin.d.ts.map +1 -1
  471. package/dist/utilities/form-associated-mixin.js +69 -0
  472. package/dist/utilities/form-associated-mixin.js.map +1 -1
  473. package/dist/utilities/scroll-mode-controller.d.ts +9 -1
  474. package/dist/utilities/scroll-mode-controller.d.ts.map +1 -1
  475. package/dist/utilities/scroll-mode-controller.js +10 -2
  476. package/dist/utilities/scroll-mode-controller.js.map +1 -1
  477. package/package.json +21 -9
  478. package/dist/components/lists-and-tables/list-item-action/list-item-action.d.ts +0 -108
  479. package/dist/components/lists-and-tables/list-item-action/list-item-action.d.ts.map +0 -1
  480. package/dist/components/lists-and-tables/list-item-action/list-item-action.js.map +0 -1
  481. package/dist/components/lists-and-tables/list-item-action/list-item-action.styles.d.ts +0 -2
  482. package/dist/components/lists-and-tables/list-item-action/list-item-action.styles.d.ts.map +0 -1
  483. package/dist/components/lists-and-tables/list-item-action/list-item-action.styles.js +0 -145
  484. package/dist/components/lists-and-tables/list-item-action/list-item-action.styles.js.map +0 -1
  485. package/dist/components/lists-and-tables/list-item-action/list-item-action.template.d.ts +0 -3
  486. package/dist/components/lists-and-tables/list-item-action/list-item-action.template.d.ts.map +0 -1
  487. package/dist/components/lists-and-tables/list-item-action/list-item-action.template.js.map +0 -1
@@ -1,19 +1,18 @@
1
1
  /**
2
2
  * Nederlandse Digitale Dienst Form Component
3
3
  *
4
- * Plain custom element (extends HTMLElement, no Lit) required for light-DOM
4
+ * Plain custom element (extends HTMLElement, no Lit), required for light-DOM
5
5
  * autofill. Renders a real <form> element in the LIGHT DOM around its
6
6
  * children. Chrome's autofill engine looks for native <input> elements that
7
7
  * have a <form> ancestor in the light DOM; with shadow-DOM inputs it can't
8
8
  * find them, so we keep this component shadow-less.
9
9
  *
10
10
  * **Differs from other nldd-* components:**
11
- * - Geen shadowRoot alle children leven in light DOM (binnen het inner <form>)
12
- * - Geen Lit pure HTMLElement met handmatige attribute-mirroring
13
- * - **Vereist global stylesheet import** vertical rhythm en form-section
14
- * divider-suppression regels staan in `dist/css/form.css` (of `global.css`),
15
- * niet in een component-specifieke shadow stylesheet. Import deze als deel
16
- * van je app's globale CSS bundle.
11
+ * - No shadowRoot: all children live in the light DOM (inside the inner <form>)
12
+ * - No Lit: a plain HTMLElement with manual attribute mirroring
13
+ * - **Requires a global stylesheet import**: the vertical rhythm rules live in
14
+ * `dist/css/form.css` (or `global.css`), not in a component-specific shadow
15
+ * stylesheet. Import it as part of your app's global CSS bundle.
17
16
  *
18
17
  * **Two usage modes:**
19
18
  *
@@ -22,25 +21,26 @@
22
21
  * Simplest API.
23
22
  *
24
23
  * 2. **User-provided form** (framework-friendly): write your own `<form>`
25
- * as direct child. Component detects it, takes over attribute-mirroring,
26
- * en skipt de migration. Children blijven waar je framework ze plaatst —
27
- * geen DOM-shuffling die met React/Vue/Angular reconciliation conflicteert.
24
+ * as direct child. Component detects it, takes over attribute mirroring,
25
+ * and skips the migration. Children stay where your framework puts them,
26
+ * so there is no DOM shuffling to conflict with React/Vue/Angular
27
+ * reconciliation.
28
28
  *
29
29
  * **Framework interop:**
30
30
  *
31
- * In auto-wrap mode wordt elke direct child verplaatst naar het inner form
32
- * via een MutationObserver. Voor de meeste React/Vue use cases werkt dit
33
- * prima omdat frameworks alleen DOM-mutaties doen wanneer hun virtual DOM
34
- * verandert. Voor edge cases (animatie-libs die DOM-positie tracken,
35
- * SSR-hydration mismatches, frameworks die actief sibling-positions
36
- * controleren) gebruik dan **user-provided form** mode.
31
+ * In auto-wrap mode every direct child is moved into the inner form through a
32
+ * MutationObserver. That works fine for most React/Vue use cases, because
33
+ * frameworks only mutate the DOM when their virtual DOM changes. For edge
34
+ * cases (animation libraries that track DOM position, SSR hydration
35
+ * mismatches, frameworks that actively check sibling positions) use
36
+ * **user-provided form** mode instead.
37
37
  *
38
- * Voor programmatische manipulatie: gebruik de `form` getter zodat je
39
- * direct met het inner `<form>` element werkt:
38
+ * For programmatic manipulation, use the `form` getter so you work with the
39
+ * inner `<form>` element directly:
40
40
  *
41
41
  * const inner = document.querySelector('nldd-form').form;
42
42
  * inner.checkValidity();
43
- * inner.appendChild(myInput); // skipt migration-overhead
43
+ * inner.appendChild(myInput); // skips the migration overhead
44
44
  *
45
45
  * @element nldd-form
46
46
  *
@@ -51,16 +51,16 @@
51
51
  * @attr {string} enctype - Encoding type for submission
52
52
  * @attr {string} target - Submit target ('_self' | '_blank' | ...)
53
53
  * @attr {string} autocomplete - 'on' | 'off' (form-level autofill toggle)
54
- * @attr {string} label-alignment - Default `label-alignment` voor descendant nldd-form-field en nldd-form-actions ('top' | 'right' | 'left'). Wordt naar descendants gepropageerd als `form-label-alignment`. Een eigen `label-alignment` op de descendant heeft voorrang via CSS-cascade.
54
+ * @attr {string} label-alignment - Default `label-alignment` for descendant nldd-form-field and nldd-form-actions ('top' | 'right' | 'left'). Propagated to descendants as `form-label-alignment`. A `label-alignment` of its own on the descendant takes precedence through the CSS cascade.
55
55
  *
56
- * @prop {HTMLFormElement | null} form - The inner <form> element (read-only). Use voor `form.checkValidity()`, directe DOM-manipulatie, of als doel voor framework-managed children.
56
+ * @prop {HTMLFormElement | null} form - The inner <form> element (read-only). Use it for `form.checkValidity()`, direct DOM manipulation, or as the target for framework-managed children.
57
57
  *
58
58
  * Events bubble naturally from the inner <form>:
59
59
  * @fires submit
60
60
  * @fires reset
61
61
  *
62
62
  * @example
63
- * Globale stylesheet import (eenmalig in je app entry):
63
+ * Global stylesheet import (once, in your app entry):
64
64
  * ```js
65
65
  * import '@nldd/design-system/styles';
66
66
  * ```
@@ -98,6 +98,105 @@ export class NLDDForm extends HTMLElement {
98
98
  super(...arguments);
99
99
  this._form = null;
100
100
  this._observer = null;
101
+ /**
102
+ * Marks a control as invalid at the moment the platform says so, and
103
+ * unmarks it as soon as it is fixed.
104
+ *
105
+ * `setValidity` and the `invalid` attribute answer different questions.
106
+ * The first is whether the value is acceptable, which decides whether the
107
+ * form goes; the second is whether to show that, which is a design
108
+ * decision about timing. Without something joining them, a control whose
109
+ * validation list refuses a value blocks the submit while the screen says
110
+ * nothing.
111
+ *
112
+ * The browser already picks the moment: it fires `invalid` on every failing
113
+ * control when the form is submitted. That event does not bubble, so this
114
+ * listens in the capture phase. Setting the attribute earlier stays the
115
+ * consumer's call.
116
+ *
117
+ * Cancelling that event takes the native validation bubble away, and that is
118
+ * the point. This system writes its own messages, under the field, in its
119
+ * own type: a second one from the browser says the same thing again, in
120
+ * browser chrome, above the field, and disappears on its own while ours
121
+ * stays. A field that then has nothing to say is a field that needs an
122
+ * nldd-validation-list, not a bubble.
123
+ */
124
+ this._handleInvalid = (e) => {
125
+ e.preventDefault();
126
+ const control = e.target;
127
+ if (!control)
128
+ return;
129
+ // Every control, not just this one. The browser judged the whole form,
130
+ // and a field that happened to pass has been asked the same question as
131
+ // the one that failed. Marking only the failures would leave two fields
132
+ // in one form behaving differently: break the one that passed and it
133
+ // stays quiet, while its neighbour speaks up as you type.
134
+ for (const el of this._form?.elements ?? [])
135
+ this._judged.add(el);
136
+ this._judged.add(control);
137
+ control.toggleAttribute('invalid', true);
138
+ // The browser fires invalid on every failing control in tree order, so
139
+ // the first event of a round is the field to land on. Cancelling that
140
+ // event above takes away the native bubble and, with it, the browser's
141
+ // own move to the first failing field. Without this a submit that fails
142
+ // leaves focus where it was, which for anyone not looking at the screen
143
+ // means nothing happened at all: no bubble, no focus, and no live region
144
+ // anywhere in a form. Deferred, so the whole round has been fired and
145
+ // the submit algorithm is done before focus moves.
146
+ if (this._focusTarget)
147
+ return;
148
+ this._focusTarget = control;
149
+ queueMicrotask(() => {
150
+ this._focusTarget?.focus?.();
151
+ this._focusTarget = null;
152
+ });
153
+ };
154
+ /** The first control to fail this round, focused once the round is over. */
155
+ this._focusTarget = null;
156
+ /**
157
+ * A reset takes the marks off with the values.
158
+ *
159
+ * A reset fires no `input`, so nothing above hears it and a field that was
160
+ * refused keeps its mark over a value the user just cleared. `judging` goes
161
+ * with it: the question has been withdrawn, so the hints come back and the
162
+ * field is what it was before anyone submitted.
163
+ *
164
+ * Deferred because the event comes first and the values go back after it,
165
+ * so anything read here would still be the old one.
166
+ */
167
+ this._handleReset = () => {
168
+ queueMicrotask(() => {
169
+ this._judged = new WeakSet();
170
+ for (const el of this._form?.elements ?? [])
171
+ el.removeAttribute('invalid');
172
+ for (const list of this.querySelectorAll('nldd-validation-list')) {
173
+ list.removeAttribute('judging');
174
+ }
175
+ });
176
+ };
177
+ /**
178
+ * From the first verdict onward, the mark follows the value.
179
+ *
180
+ * The platform has no "valid" event, so without this a control that is put
181
+ * right keeps its mark until the next submit: you fixed it and the field
182
+ * still says you did not. And it has to work the other way too. Undo the
183
+ * fix and the value is refused again, so a form that stays quiet leaves you
184
+ * with a submit that does nothing and nothing on screen saying why.
185
+ *
186
+ * Only after that first verdict, which is what `_judged` remembers. Before
187
+ * it, a field would turn red on the first character typed into it, about a
188
+ * value nobody has asked for yet.
189
+ */
190
+ this._handleInput = (e) => {
191
+ const control = e.target;
192
+ if (!control || !this._judged.has(control))
193
+ return;
194
+ const validity = control.internals?.validity ?? control.validity;
195
+ if (validity)
196
+ control.toggleAttribute('invalid', !validity.valid);
197
+ };
198
+ /** Controls the platform has judged at least once. */
199
+ this._judged = new WeakSet();
101
200
  /** When true, user provided their own <form> child — skip migration. */
102
201
  this._userProvidedForm = false;
103
202
  }
@@ -169,12 +268,18 @@ export class NLDDForm extends HTMLElement {
169
268
  // nested form-section are pulled in by the propagation as well.
170
269
  this._observer.observe(this, { childList: true, subtree: true });
171
270
  }
271
+ this.addEventListener('invalid', this._handleInvalid, true);
272
+ this.addEventListener('input', this._handleInput);
273
+ this.addEventListener('reset', this._handleReset);
172
274
  // Propagate label-alignment to current children (initial + after reconnect)
173
275
  this._propagateLabelAlignment(this.getAttribute('label-alignment'));
174
276
  }
175
277
  disconnectedCallback() {
176
278
  this._observer?.disconnect();
177
279
  this._observer = null;
280
+ this.removeEventListener('invalid', this._handleInvalid, true);
281
+ this.removeEventListener('input', this._handleInput);
282
+ this.removeEventListener('reset', this._handleReset);
178
283
  }
179
284
  attributeChangedCallback(name, _oldVal, newVal) {
180
285
  if (name === 'label-alignment') {
@@ -1 +1 @@
1
- {"version":3,"file":"form.js","sourceRoot":"","sources":["../../../../src/components/forms/form/form.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoFG;AAEH,MAAM,oBAAoB,GAAG;IAC5B,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,YAAY;IACZ,SAAS;IACT,QAAQ;IACR,cAAc;CACL,CAAC;AAEX,MAAM,mBAAmB,GA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AAI,CAAC,cAAc,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;IACtC,cAAc,CAAC,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;AAC9C,CAAC"}
@@ -1,19 +1,18 @@
1
1
  /**
2
2
  * Nederlandse Digitale Dienst Form Actions Component (Lit + TypeScript)
3
3
  *
4
- * Een layout-wrapper voor de actie-knoppen onderaan een formulier (typisch
5
- * een submit-button of button-group). Volgt dezelfde responsive layout als
6
- * `nldd-form-field`: met `label-alignment="right"` of `"left"` krijgt de
7
- * inhoud dezelfde insprong als de invoervelden boven, dankzij een
8
- * `::before`-pseudo-element dat fungeert als spacer-kolom waar de label
9
- * zou staan.
4
+ * A layout wrapper for the action buttons at the bottom of a form (typically a
5
+ * submit button or a button group). Follows the same responsive layout as
6
+ * `nldd-form-field`: with `label-alignment="right"` or `"left"` the content
7
+ * gets the same indent as the fields above it, thanks to a `::before`
8
+ * pseudo-element that acts as the spacer column where the label would sit.
10
9
  *
11
- * Erft `label-alignment` automatisch over van een wrappende `<nldd-form>`:
12
- * de form propageert z'n eigen `label-alignment` als `form-label-alignment`
13
- * naar descendant `nldd-form-actions` (en `nldd-form-field`) via een
14
- * MutationObserver. Een expliciete eigen `label-alignment` op de form-actions
15
- * wint via CSS-cascade de form-code raakt het `label-alignment` attribuut
16
- * van de descendant nooit aan.
10
+ * Inherits `label-alignment` automatically from a wrapping `<nldd-form>`: the
11
+ * form propagates its own `label-alignment` as `form-label-alignment` to
12
+ * descendant `nldd-form-actions` (and `nldd-form-field`) through a
13
+ * MutationObserver. An explicit `label-alignment` on the form-actions itself
14
+ * wins through the CSS cascade, and the form code never touches the
15
+ * `label-alignment` attribute of the descendant.
17
16
  *
18
17
  * <nldd-form label-alignment="right">
19
18
  * <nldd-form-field>...</nldd-form-field>
@@ -26,10 +25,10 @@
26
25
  *
27
26
  * @element nldd-form-actions
28
27
  *
29
- * @attr {string} label-alignment - 'top' (default) | 'right' | 'left'. Een eigen waarde wint altijd over de inherited form-label-alignment.
30
- * @attr {string} form-label-alignment - Door wrappende nldd-form gezet als fallback. Niet zelf zetten in consumer-code.
28
+ * @attr {string} label-alignment - 'top' (default) | 'right' | 'left'. A value of its own always wins over the inherited form-label-alignment.
29
+ * @attr {string} form-label-alignment - Set by a wrapping nldd-form as a fallback. Do not set it yourself in consumer code.
31
30
  *
32
- * @slot - Actie-elementen (button, button-group, etc.)
31
+ * @slot - Action elements (button, button-group, and so on)
33
32
  */
34
33
  import { LitElement } from 'lit';
35
34
  export type LabelAlignment = 'top' | 'left' | 'right';
@@ -1 +1 @@
1
- {"version":3,"file":"form-actions.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/form-actions/form-actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAKjC,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;AAEtD,qBACa,eAAgB,SAAQ,UAAU;IAC9C,OAAgB,MAAM,0BAAqB;IAE3C;;;;;OAKG;IAEH,cAAc,EAAE,cAAc,GAAG,SAAS,CAAa;IAE9C,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,mBAAmB,EAAE,eAAe,CAAC;KACrC;CACD"}
1
+ {"version":3,"file":"form-actions.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/form-actions/form-actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAKjC,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;AAEtD,qBACa,eAAgB,SAAQ,UAAU;IAC9C,OAAgB,MAAM,0BAAqB;IAE3C;;;;;OAKG;IAEH,cAAc,EAAE,cAAc,GAAG,SAAS,CAAa;IAE9C,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,mBAAmB,EAAE,eAAe,CAAC;KACrC;CACD"}
@@ -1,19 +1,18 @@
1
1
  /**
2
2
  * Nederlandse Digitale Dienst Form Actions Component (Lit + TypeScript)
3
3
  *
4
- * Een layout-wrapper voor de actie-knoppen onderaan een formulier (typisch
5
- * een submit-button of button-group). Volgt dezelfde responsive layout als
6
- * `nldd-form-field`: met `label-alignment="right"` of `"left"` krijgt de
7
- * inhoud dezelfde insprong als de invoervelden boven, dankzij een
8
- * `::before`-pseudo-element dat fungeert als spacer-kolom waar de label
9
- * zou staan.
4
+ * A layout wrapper for the action buttons at the bottom of a form (typically a
5
+ * submit button or a button group). Follows the same responsive layout as
6
+ * `nldd-form-field`: with `label-alignment="right"` or `"left"` the content
7
+ * gets the same indent as the fields above it, thanks to a `::before`
8
+ * pseudo-element that acts as the spacer column where the label would sit.
10
9
  *
11
- * Erft `label-alignment` automatisch over van een wrappende `<nldd-form>`:
12
- * de form propageert z'n eigen `label-alignment` als `form-label-alignment`
13
- * naar descendant `nldd-form-actions` (en `nldd-form-field`) via een
14
- * MutationObserver. Een expliciete eigen `label-alignment` op de form-actions
15
- * wint via CSS-cascade de form-code raakt het `label-alignment` attribuut
16
- * van de descendant nooit aan.
10
+ * Inherits `label-alignment` automatically from a wrapping `<nldd-form>`: the
11
+ * form propagates its own `label-alignment` as `form-label-alignment` to
12
+ * descendant `nldd-form-actions` (and `nldd-form-field`) through a
13
+ * MutationObserver. An explicit `label-alignment` on the form-actions itself
14
+ * wins through the CSS cascade, and the form code never touches the
15
+ * `label-alignment` attribute of the descendant.
17
16
  *
18
17
  * <nldd-form label-alignment="right">
19
18
  * <nldd-form-field>...</nldd-form-field>
@@ -26,10 +25,10 @@
26
25
  *
27
26
  * @element nldd-form-actions
28
27
  *
29
- * @attr {string} label-alignment - 'top' (default) | 'right' | 'left'. Een eigen waarde wint altijd over de inherited form-label-alignment.
30
- * @attr {string} form-label-alignment - Door wrappende nldd-form gezet als fallback. Niet zelf zetten in consumer-code.
28
+ * @attr {string} label-alignment - 'top' (default) | 'right' | 'left'. A value of its own always wins over the inherited form-label-alignment.
29
+ * @attr {string} form-label-alignment - Set by a wrapping nldd-form as a fallback. Do not set it yourself in consumer code.
31
30
  *
32
- * @slot - Actie-elementen (button, button-group, etc.)
31
+ * @slot - Action elements (button, button-group, and so on)
33
32
  */
34
33
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
35
34
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -1 +1 @@
1
- {"version":3,"file":"form-actions.js","sourceRoot":"","sources":["../../../../src/components/forms/form-actions/form-actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAK1D,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,UAAU;IAAxC;;QAGN;;;;;WAKG;QAEH,mBAAc,GAA+B,SAAS,CAAC;IAKxD,CAAC;IAHS,MAAM;QACd,OAAO,mBAAmB,EAAE,CAAC;IAC9B,CAAC;;AAbe,sBAAM,GAAG,iBAAiB,AAApB,CAAqB;AAS3C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;uDACjB;AAV3C,eAAe;IAD3B,aAAa,CAAC,mBAAmB,CAAC;GACtB,eAAe,CAe3B"}
1
+ {"version":3,"file":"form-actions.js","sourceRoot":"","sources":["../../../../src/components/forms/form-actions/form-actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAK1D,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,UAAU;IAAxC;;QAGN;;;;;WAKG;QAEH,mBAAc,GAA+B,SAAS,CAAC;IAKxD,CAAC;IAHS,MAAM;QACd,OAAO,mBAAmB,EAAE,CAAC;IAC9B,CAAC;;AAbe,sBAAM,GAAG,iBAAiB,AAApB,CAAqB;AAS3C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;uDACjB;AAV3C,eAAe;IAD3B,aAAa,CAAC,mBAAmB,CAAC;GACtB,eAAe,CAe3B"}
@@ -3,14 +3,14 @@
3
3
  *
4
4
  * @element nldd-form-field
5
5
  *
6
- * @attr {string} label-alignment - 'top' (default) | 'right' | 'left'. Een eigen waarde wint altijd over de inherited form-label-alignment.
7
- * @attr {string} form-label-alignment - Door wrappende nldd-form gezet als fallback. Niet zelf zetten in consumer-code.
6
+ * @attr {string} label-alignment - 'top' (default) | 'right' | 'left'. A value of its own always wins over the inherited form-label-alignment.
7
+ * @attr {string} form-label-alignment - Set by a wrapping nldd-form as a fallback. Do not set it yourself in consumer code.
8
8
  * @attr {string} label - Field label text. Omit for no-label layout.
9
9
  * @attr {string} supporting-label - Short supporting text below the label. Same typography as optional badge.
10
10
  * @attr {boolean} optional - Shows an optional badge next to the label.
11
11
  * @attr {string} optional-label - Text for the optional badge. Defaults to 'Optioneel'.
12
12
  *
13
- * @slot - The slotted input (e.g. nldd-text-field). Set `invalid` and `error-message="id1 id2"` on the input to wire up error texts. nldd-form-field-error-text elements assign themselves to the errors slot automatically.
13
+ * @slot - The slotted input (e.g. nldd-text-field), its nldd-validation-list and its nldd-form-field-help-text.
14
14
  *
15
15
  * ─────────────────────────────────────────────────────────────────────────
16
16
  *
@@ -20,23 +20,16 @@
20
20
  *
21
21
  * ─────────────────────────────────────────────────────────────────────────
22
22
  *
23
- * @element nldd-form-field-error-text
24
- *
25
- * @attr {string} id - Referenced by the input's `error-message` attribute.
26
- * @attr {boolean} invalid - Visibility managed automatically by nldd-form-field.
27
- *
28
- * @slot - The error message text.
29
- *
30
- * ─────────────────────────────────────────────────────────────────────────
31
- *
32
23
  * @example
33
24
  * <nldd-form-field label="Password">
25
+ * <nldd-password-field invalid></nldd-password-field>
26
+ * <nldd-validation-list>
27
+ * <nldd-validation-item id="password-required" required>This field is required.</nldd-validation-item>
28
+ * <nldd-validation-item id="password-length" minlength="8">Must be at least 8 characters.</nldd-validation-item>
29
+ * </nldd-validation-list>
34
30
  * <nldd-form-field-help-text>
35
- * At least 8 characters. <a href="/help">Learn more</a>.
31
+ * We only use this to sign you in. <a href="/help">Learn more</a>.
36
32
  * </nldd-form-field-help-text>
37
- * <nldd-text-field invalid error-message="error-required error-length"></nldd-text-field>
38
- * <nldd-form-field-error-text id="error-required">This field is required.</nldd-form-field-error-text>
39
- * <nldd-form-field-error-text id="error-length">Must be at least 8 characters.</nldd-form-field-error-text>
40
33
  * </nldd-form-field>
41
34
  */
42
35
  import { LitElement } from 'lit';
@@ -78,12 +71,10 @@ export declare class NLDDFormField extends LitElement {
78
71
  /** Label text for the optional badge. Defaults to 'Optioneel'. Override for localisation. */
79
72
  optionalLabel: string;
80
73
  private _childObserver;
81
- private _observer;
82
74
  /** The last label this field wrote onto the control, so it only takes back its own. */
83
75
  private _appliedLabel;
84
76
  /** Keeps the "no input found" warning to one per field rather than one per mutation. */
85
77
  private _warnedNoInput;
86
- private _hasErrors;
87
78
  render(): import("lit-html").TemplateResult;
88
79
  updated(changed: Map<PropertyKey, unknown>): void;
89
80
  connectedCallback(): void;
@@ -128,6 +119,20 @@ export declare class NLDDFormField extends LitElement {
128
119
  * takes back what it did not write.
129
120
  */
130
121
  private _applyAccessibleLabel;
122
+ /**
123
+ * Hands every validation list in this field the control it is about, so it
124
+ * does not have to go looking for one.
125
+ *
126
+ * A list with a `for` of its own is left alone: that is how you say it is
127
+ * about a different control than the first.
128
+ *
129
+ * More than one control in a field is allowed and sometimes right, a radio
130
+ * group with an "Anders" text field beside it being the case this component
131
+ * is built for. But a list that reads a value would then quietly read the
132
+ * wrong one, and nothing on screen would show it: the rules simply never
133
+ * match. Say so once, where it can still be fixed.
134
+ */
135
+ private _adoptValidationLists;
131
136
  /**
132
137
  * The input this field is about: the first one in the light DOM, wrapped or
133
138
  * not.
@@ -148,38 +153,36 @@ export declare class NLDDFormField extends LitElement {
148
153
  */
149
154
  private _findInput;
150
155
  /**
151
- * Reads `invalid` and `error-message` from the input and toggles
152
- * the `invalid` attribute on the referenced nldd-form-field-error-text elements.
153
- * Also sets `aria-describedby` on the input to reference visible error texts.
154
- *
155
- * Note: this mechanism relies on the slotted input reflecting an `invalid`
156
- * attribute, which nldd-text-field and nldd-password-field do. Plain native
157
- * `<input>` elements use constraint validation (validity.valid, the `invalid`
158
- * event) instead support for native inputs is a known limitation and
159
- * tracked as a follow-up.
156
+ * Hands the control the elements that describe it.
157
+ *
158
+ * Elements and not ids. An IDREF resolves inside the tree of the element
159
+ * that carries it, so an id written here cannot be found from inside a
160
+ * component's shadow root: the attribute lands, the id is right, and the
161
+ * description comes out empty. A control that renders its own input takes
162
+ * `describedByElements` and puts the references where they belong; anything
163
+ * that is the control itself, a native input or a host with a role of its
164
+ * own, is pointed at directly.
165
+ *
166
+ * The list once, not each of its items. The items come and go while you
167
+ * type, and a description rewritten per keystroke is a lot of churn in
168
+ * something assistive software is reading. A hidden item counts for nothing
169
+ * in the description, so one reference gives exactly what is on screen, and
170
+ * this never has to run again when the value changes.
171
+ *
172
+ * The requirements before the plain help text: what is wrong is why you are
173
+ * here.
160
174
  */
161
- private _syncErrorText;
175
+ private _syncDescription;
162
176
  }
163
177
  export declare class NLDDFormFieldHelpText extends LitElement {
164
178
  static styles: import("lit").CSSResult;
165
179
  connectedCallback(): void;
166
180
  render(): import("lit-html").TemplateResult;
167
181
  }
168
- export declare class NLDDFormFieldErrorText extends LitElement {
169
- static styles: import("lit").CSSResult;
170
- /**
171
- * When present the error text is visible.
172
- * Managed automatically by the parent nldd-form-field — do not set manually.
173
- */
174
- invalid: boolean;
175
- connectedCallback(): void;
176
- render(): import("lit-html").TemplateResult;
177
- }
178
182
  declare global {
179
183
  interface HTMLElementTagNameMap {
180
184
  'nldd-form-field': NLDDFormField;
181
185
  'nldd-form-field-help-text': NLDDFormFieldHelpText;
182
- 'nldd-form-field-error-text': NLDDFormFieldErrorText;
183
186
  }
184
187
  }
185
188
  //# sourceMappingURL=form-field.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"form-field.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/form-field/form-field.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAcjC,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;AAqCtD,qBACa,aAAc,SAAQ,UAAU;IAC5C,OAAgB,MAAM,0BAAmB;IAEzC;;;;;;;;;;;;;;OAcG;IAEH,cAAc,EAAE,cAAc,GAAG,SAAS,CAAa;IAEvD,0FAA0F;IAE1F,KAAK,SAAM;IAEX;;;OAGG;IAEH,eAAe,SAAM;IAErB;;;;;;;OAOG;IAEH,QAAQ,UAAS;IAEjB,6FAA6F;IAE7F,aAAa,SAAe;IAE5B,OAAO,CAAC,cAAc,CAAiC;IACvD,OAAO,CAAC,SAAS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