@nldd/design-system 0.13.2 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (686) hide show
  1. package/NOTICES.md +1 -1
  2. package/README.md +4 -2
  3. package/custom-elements.json +2089 -172
  4. package/dist/components/actions/button/button.d.ts +1 -3
  5. package/dist/components/actions/button/button.d.ts.map +1 -1
  6. package/dist/components/actions/button/button.js +27 -34
  7. package/dist/components/actions/button/button.js.map +1 -1
  8. package/dist/components/actions/button/button.template.d.ts.map +1 -1
  9. package/dist/components/actions/button/button.template.js +4 -4
  10. package/dist/components/actions/button/button.template.js.map +1 -1
  11. package/dist/components/actions/button-bar/button-bar.d.ts +0 -2
  12. package/dist/components/actions/button-bar/button-bar.d.ts.map +1 -1
  13. package/dist/components/actions/button-bar/button-bar.js +2 -12
  14. package/dist/components/actions/button-bar/button-bar.js.map +1 -1
  15. package/dist/components/actions/button-group/button-group.d.ts +8 -3
  16. package/dist/components/actions/button-group/button-group.d.ts.map +1 -1
  17. package/dist/components/actions/button-group/button-group.js +40 -22
  18. package/dist/components/actions/button-group/button-group.js.map +1 -1
  19. package/dist/components/actions/icon-button/icon-button.d.ts +1 -2
  20. package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
  21. package/dist/components/actions/icon-button/icon-button.js +14 -12
  22. package/dist/components/actions/icon-button/icon-button.js.map +1 -1
  23. package/dist/components/actions/icon-button/icon-button.template.d.ts.map +1 -1
  24. package/dist/components/actions/icon-button/icon-button.template.js +4 -4
  25. package/dist/components/actions/icon-button/icon-button.template.js.map +1 -1
  26. package/dist/components/actions/menu/menu-divider.d.ts +1 -0
  27. package/dist/components/actions/menu/menu-divider.d.ts.map +1 -1
  28. package/dist/components/actions/menu/menu-divider.js +1 -0
  29. package/dist/components/actions/menu/menu-divider.js.map +1 -1
  30. package/dist/components/actions/menu/menu-group.d.ts +1 -0
  31. package/dist/components/actions/menu/menu-group.d.ts.map +1 -1
  32. package/dist/components/actions/menu/menu-group.js +1 -0
  33. package/dist/components/actions/menu/menu-group.js.map +1 -1
  34. package/dist/components/actions/menu/menu-item.d.ts +1 -0
  35. package/dist/components/actions/menu/menu-item.d.ts.map +1 -1
  36. package/dist/components/actions/menu/menu-item.js +7 -7
  37. package/dist/components/actions/menu/menu-item.js.map +1 -1
  38. package/dist/components/actions/menu/menu.d.ts +26 -4
  39. package/dist/components/actions/menu/menu.d.ts.map +1 -1
  40. package/dist/components/actions/menu/menu.i18n.d.ts +2 -0
  41. package/dist/components/actions/menu/menu.i18n.d.ts.map +1 -1
  42. package/dist/components/actions/menu/menu.i18n.js +4 -0
  43. package/dist/components/actions/menu/menu.i18n.js.map +1 -1
  44. package/dist/components/actions/menu/menu.js +57 -19
  45. package/dist/components/actions/menu/menu.js.map +1 -1
  46. package/dist/components/actions/split-button/split-button.d.ts.map +1 -1
  47. package/dist/components/actions/split-button/split-button.js +2 -1
  48. package/dist/components/actions/split-button/split-button.js.map +1 -1
  49. package/dist/components/actions/toolbar/toolbar-item.d.ts +0 -2
  50. package/dist/components/actions/toolbar/toolbar-item.d.ts.map +1 -1
  51. package/dist/components/actions/toolbar/toolbar-item.js +2 -20
  52. package/dist/components/actions/toolbar/toolbar-item.js.map +1 -1
  53. package/dist/components/actions/toolbar/toolbar-title.d.ts.map +1 -1
  54. package/dist/components/actions/toolbar/toolbar-title.js +2 -1
  55. package/dist/components/actions/toolbar/toolbar-title.js.map +1 -1
  56. package/dist/components/actions/toolbar/toolbar.d.ts.map +1 -1
  57. package/dist/components/actions/toolbar/toolbar.js +2 -1
  58. package/dist/components/actions/toolbar/toolbar.js.map +1 -1
  59. package/dist/components/button.i18n-DiDGynnq.js +8 -0
  60. package/dist/components/components.js +2357 -1255
  61. package/dist/components/content/avatar/avatar.d.ts +0 -2
  62. package/dist/components/content/avatar/avatar.d.ts.map +1 -1
  63. package/dist/components/content/avatar/avatar.js +2 -27
  64. package/dist/components/content/avatar/avatar.js.map +1 -1
  65. package/dist/components/content/avatar-group/avatar-group.d.ts +0 -1
  66. package/dist/components/content/avatar-group/avatar-group.d.ts.map +1 -1
  67. package/dist/components/content/avatar-group/avatar-group.js +2 -24
  68. package/dist/components/content/avatar-group/avatar-group.js.map +1 -1
  69. package/dist/components/content/blockquote/blockquote.d.ts.map +1 -1
  70. package/dist/components/content/blockquote/blockquote.js +2 -1
  71. package/dist/components/content/blockquote/blockquote.js.map +1 -1
  72. package/dist/components/content/code-viewer/code-viewer.d.ts +1 -0
  73. package/dist/components/content/code-viewer/code-viewer.d.ts.map +1 -1
  74. package/dist/components/content/code-viewer/code-viewer.diff.d.ts +2 -0
  75. package/dist/components/content/code-viewer/code-viewer.diff.d.ts.map +1 -1
  76. package/dist/components/content/code-viewer/code-viewer.diff.js +1 -4
  77. package/dist/components/content/code-viewer/code-viewer.diff.js.map +1 -1
  78. package/dist/components/content/code-viewer/code-viewer.js +16 -11
  79. package/dist/components/content/code-viewer/code-viewer.js.map +1 -1
  80. package/dist/components/content/icon/icon-aliases.d.ts.map +1 -1
  81. package/dist/components/content/icon/icon-aliases.js +2 -0
  82. package/dist/components/content/icon/icon-aliases.js.map +1 -1
  83. package/dist/components/content/icon/icon.d.ts +3 -0
  84. package/dist/components/content/icon/icon.d.ts.map +1 -1
  85. package/dist/components/content/icon/icon.js +19 -15
  86. package/dist/components/content/icon/icon.js.map +1 -1
  87. package/dist/components/content/identity/identity.d.ts.map +1 -1
  88. package/dist/components/content/identity/identity.js +2 -1
  89. package/dist/components/content/identity/identity.js.map +1 -1
  90. package/dist/components/content/image/image.d.ts +5 -11
  91. package/dist/components/content/image/image.d.ts.map +1 -1
  92. package/dist/components/content/image/image.js +14 -31
  93. package/dist/components/content/image/image.js.map +1 -1
  94. package/dist/components/content/image/lqip-encoder-element.d.ts.map +1 -1
  95. package/dist/components/content/image/lqip-encoder-element.js +2 -1
  96. package/dist/components/content/image/lqip-encoder-element.js.map +1 -1
  97. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.d.ts.map +1 -1
  98. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.js +2 -1
  99. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
  100. package/dist/components/content/rich-text/rich-text.d.ts +4 -1
  101. package/dist/components/content/rich-text/rich-text.d.ts.map +1 -1
  102. package/dist/components/content/rich-text/rich-text.js +6 -2
  103. package/dist/components/content/rich-text/rich-text.js.map +1 -1
  104. package/dist/components/content/tag/tag.d.ts.map +1 -1
  105. package/dist/components/content/tag/tag.js +5 -5
  106. package/dist/components/content/tag/tag.js.map +1 -1
  107. package/dist/components/content/text/text.d.ts.map +1 -1
  108. package/dist/components/content/text/text.js +2 -1
  109. package/dist/components/content/text/text.js.map +1 -1
  110. package/dist/components/content/title/title.d.ts +9 -5
  111. package/dist/components/content/title/title.d.ts.map +1 -1
  112. package/dist/components/content/title/title.js +23 -27
  113. package/dist/components/content/title/title.js.map +1 -1
  114. package/dist/components/content/title/title.styles.d.ts.map +1 -1
  115. package/dist/components/content/title/title.styles.js +13 -0
  116. package/dist/components/content/title/title.styles.js.map +1 -1
  117. package/dist/components/content/token/token.d.ts.map +1 -1
  118. package/dist/components/content/token/token.js +2 -1
  119. package/dist/components/content/token/token.js.map +1 -1
  120. package/dist/components/content/tooltip/tooltip.d.ts.map +1 -1
  121. package/dist/components/content/tooltip/tooltip.js +6 -2
  122. package/dist/components/content/tooltip/tooltip.js.map +1 -1
  123. package/dist/components/content/visually-hidden/visually-hidden.js +1 -1
  124. package/dist/components/content/visually-hidden/visually-hidden.js.map +1 -1
  125. package/dist/components/{decorate-Cz9-peTN.js → decorate-CzRe1eif.js} +9 -1
  126. package/dist/components/{with-translations-DRuOq3QK.js → defer-focus-DIPAUUJa.js} +57 -5
  127. package/dist/components/dev-checks-tdnaA2UV.js +2518 -0
  128. package/dist/components/{dist-BaLc58I_.js → dist-245LaK9m.js} +1 -1
  129. package/dist/components/{dist-DgjvHvsN.js → dist-4g23YHP0.js} +1 -1
  130. package/dist/components/{dist-YYLChwRq.js → dist-Bf823YyL.js} +1 -1
  131. package/dist/components/{dist-Bm3708s5.js → dist-CeMOOqgP.js} +13 -1
  132. package/dist/components/{dist-CJ9uLG0u.js → dist-DFjwTlJV.js} +1 -1
  133. package/dist/components/element-state-BnarBv0M.js +42 -0
  134. package/dist/components/forms/form/form.d.ts +1 -96
  135. package/dist/components/forms/form/form.d.ts.map +1 -1
  136. package/dist/components/forms/form/form.js +1 -0
  137. package/dist/components/forms/form/form.js.map +1 -1
  138. package/dist/components/forms/form-actions/form-actions.d.ts.map +1 -1
  139. package/dist/components/forms/form-actions/form-actions.js +2 -1
  140. package/dist/components/forms/form-actions/form-actions.js.map +1 -1
  141. package/dist/components/forms/form-field/form-field.d.ts +3 -4
  142. package/dist/components/forms/form-field/form-field.d.ts.map +1 -1
  143. package/dist/components/forms/form-field/form-field.js +14 -29
  144. package/dist/components/forms/form-field/form-field.js.map +1 -1
  145. package/dist/components/forms/form-field/form-field.template.d.ts.map +1 -1
  146. package/dist/components/forms/form-field/form-field.template.js +3 -2
  147. package/dist/components/forms/form-field/form-field.template.js.map +1 -1
  148. package/dist/components/forms/form-section/form-section.d.ts +1 -67
  149. package/dist/components/forms/form-section/form-section.d.ts.map +1 -1
  150. package/dist/components/forms/form-section/form-section.js +2 -16
  151. package/dist/components/forms/form-section/form-section.js.map +1 -1
  152. package/dist/components/forms/validation-list/validation-list.d.ts +26 -0
  153. package/dist/components/forms/validation-list/validation-list.d.ts.map +1 -1
  154. package/dist/components/forms/validation-list/validation-list.i18n.d.ts +12 -0
  155. package/dist/components/forms/validation-list/validation-list.i18n.d.ts.map +1 -0
  156. package/dist/components/forms/validation-list/validation-list.i18n.js +11 -0
  157. package/dist/components/forms/validation-list/validation-list.i18n.js.map +1 -0
  158. package/dist/components/forms/validation-list/validation-list.js +81 -8
  159. package/dist/components/forms/validation-list/validation-list.js.map +1 -1
  160. package/dist/components/{icon-DRpTWSIg.js → icon-BPNDyhu9.js} +18 -4
  161. package/dist/components/{icon-button-DUEmWlBD.js → icon-button-Dbo_SGor.js} +51 -29
  162. package/dist/components/icon-button.i18n-1_N-wN6x.js +10 -0
  163. package/dist/components/inputs/checkbox/checkbox.d.ts.map +1 -1
  164. package/dist/components/inputs/checkbox/checkbox.js +5 -1
  165. package/dist/components/inputs/checkbox/checkbox.js.map +1 -1
  166. package/dist/components/inputs/checkbox-field/checkbox-field.d.ts.map +1 -1
  167. package/dist/components/inputs/checkbox-field/checkbox-field.js +5 -1
  168. package/dist/components/inputs/checkbox-field/checkbox-field.js.map +1 -1
  169. package/dist/components/inputs/code-editor/code-editor.d.ts.map +1 -1
  170. package/dist/components/inputs/code-editor/code-editor.js +2 -1
  171. package/dist/components/inputs/code-editor/code-editor.js.map +1 -1
  172. package/dist/components/inputs/code-editor/code-editor.styles.d.ts.map +1 -1
  173. package/dist/components/inputs/code-editor/code-editor.styles.js +36 -13
  174. package/dist/components/inputs/code-editor/code-editor.styles.js.map +1 -1
  175. package/dist/components/inputs/combo-box/combo-box.d.ts +4 -0
  176. package/dist/components/inputs/combo-box/combo-box.d.ts.map +1 -1
  177. package/dist/components/inputs/combo-box/combo-box.js +16 -5
  178. package/dist/components/inputs/combo-box/combo-box.js.map +1 -1
  179. package/dist/components/inputs/date-field/date-field.d.ts.map +1 -1
  180. package/dist/components/inputs/date-field/date-field.i18n.js +4 -4
  181. package/dist/components/inputs/date-field/date-field.i18n.js.map +1 -1
  182. package/dist/components/inputs/date-field/date-field.js +2 -1
  183. package/dist/components/inputs/date-field/date-field.js.map +1 -1
  184. package/dist/components/inputs/date-picker/date-picker.d.ts +3 -3
  185. package/dist/components/inputs/date-picker/date-picker.d.ts.map +1 -1
  186. package/dist/components/inputs/date-picker/date-picker.i18n.d.ts +2 -2
  187. package/dist/components/inputs/date-picker/date-picker.i18n.js +2 -2
  188. package/dist/components/inputs/date-picker/date-picker.i18n.js.map +1 -1
  189. package/dist/components/inputs/date-picker/date-picker.js +5 -1
  190. package/dist/components/inputs/date-picker/date-picker.js.map +1 -1
  191. package/dist/components/inputs/date-picker/date-picker.template.js +2 -2
  192. package/dist/components/inputs/date-picker/date-picker.template.js.map +1 -1
  193. package/dist/components/inputs/dropdown/dropdown.d.ts.map +1 -1
  194. package/dist/components/inputs/dropdown/dropdown.js +10 -5
  195. package/dist/components/inputs/dropdown/dropdown.js.map +1 -1
  196. package/dist/components/inputs/file-field/file-field.d.ts +147 -17
  197. package/dist/components/inputs/file-field/file-field.d.ts.map +1 -1
  198. package/dist/components/inputs/file-field/file-field.drop.d.ts +16 -1
  199. package/dist/components/inputs/file-field/file-field.drop.d.ts.map +1 -1
  200. package/dist/components/inputs/file-field/file-field.drop.js +33 -0
  201. package/dist/components/inputs/file-field/file-field.drop.js.map +1 -1
  202. package/dist/components/inputs/file-field/file-field.i18n.d.ts +11 -1
  203. package/dist/components/inputs/file-field/file-field.i18n.d.ts.map +1 -1
  204. package/dist/components/inputs/file-field/file-field.i18n.js +16 -6
  205. package/dist/components/inputs/file-field/file-field.i18n.js.map +1 -1
  206. package/dist/components/inputs/file-field/file-field.js +421 -75
  207. package/dist/components/inputs/file-field/file-field.js.map +1 -1
  208. package/dist/components/inputs/file-field/file-field.styles.d.ts.map +1 -1
  209. package/dist/components/inputs/file-field/file-field.styles.js +235 -91
  210. package/dist/components/inputs/file-field/file-field.styles.js.map +1 -1
  211. package/dist/components/inputs/file-field/file-field.template.d.ts +2 -1
  212. package/dist/components/inputs/file-field/file-field.template.d.ts.map +1 -1
  213. package/dist/components/inputs/file-field/file-field.template.js +282 -83
  214. package/dist/components/inputs/file-field/file-field.template.js.map +1 -1
  215. package/dist/components/inputs/file-field/file-field.truncate.d.ts +17 -0
  216. package/dist/components/inputs/file-field/file-field.truncate.d.ts.map +1 -1
  217. package/dist/components/inputs/file-field/file-field.truncate.js +26 -3
  218. package/dist/components/inputs/file-field/file-field.truncate.js.map +1 -1
  219. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.d.ts.map +1 -1
  220. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.js +2 -4
  221. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.js.map +1 -1
  222. package/dist/components/inputs/number-field/number-field.d.ts.map +1 -1
  223. package/dist/components/inputs/number-field/number-field.js +5 -4
  224. package/dist/components/inputs/number-field/number-field.js.map +1 -1
  225. package/dist/components/inputs/password-field/password-field.d.ts.map +1 -1
  226. package/dist/components/inputs/password-field/password-field.js +2 -1
  227. package/dist/components/inputs/password-field/password-field.js.map +1 -1
  228. package/dist/components/inputs/radio-button/radio-button.d.ts.map +1 -1
  229. package/dist/components/inputs/radio-button/radio-button.js +2 -1
  230. package/dist/components/inputs/radio-button/radio-button.js.map +1 -1
  231. package/dist/components/inputs/radio-button-field/radio-button-field.d.ts.map +1 -1
  232. package/dist/components/inputs/radio-button-field/radio-button-field.js +2 -1
  233. package/dist/components/inputs/radio-button-field/radio-button-field.js.map +1 -1
  234. package/dist/components/inputs/radio-button-group/radio-button-group.d.ts +0 -1
  235. package/dist/components/inputs/radio-button-group/radio-button-group.d.ts.map +1 -1
  236. package/dist/components/inputs/radio-button-group/radio-button-group.js +5 -6
  237. package/dist/components/inputs/radio-button-group/radio-button-group.js.map +1 -1
  238. package/dist/components/inputs/search-field/search-field.d.ts.map +1 -1
  239. package/dist/components/inputs/search-field/search-field.js +5 -1
  240. package/dist/components/inputs/search-field/search-field.js.map +1 -1
  241. package/dist/components/inputs/segmented-control/segmented-control.d.ts +0 -1
  242. package/dist/components/inputs/segmented-control/segmented-control.d.ts.map +1 -1
  243. package/dist/components/inputs/segmented-control/segmented-control.js +7 -11
  244. package/dist/components/inputs/segmented-control/segmented-control.js.map +1 -1
  245. package/dist/components/inputs/slider/slider.d.ts +32 -10
  246. package/dist/components/inputs/slider/slider.d.ts.map +1 -1
  247. package/dist/components/inputs/slider/slider.js +115 -35
  248. package/dist/components/inputs/slider/slider.js.map +1 -1
  249. package/dist/components/inputs/slider/slider.styles.d.ts.map +1 -1
  250. package/dist/components/inputs/slider/slider.styles.js +22 -13
  251. package/dist/components/inputs/slider/slider.styles.js.map +1 -1
  252. package/dist/components/inputs/slider/slider.template.d.ts.map +1 -1
  253. package/dist/components/inputs/slider/slider.template.js +12 -4
  254. package/dist/components/inputs/slider/slider.template.js.map +1 -1
  255. package/dist/components/inputs/stepper/stepper.d.ts.map +1 -1
  256. package/dist/components/inputs/stepper/stepper.js +5 -1
  257. package/dist/components/inputs/stepper/stepper.js.map +1 -1
  258. package/dist/components/inputs/switch/switch.d.ts.map +1 -1
  259. package/dist/components/inputs/switch/switch.js +5 -4
  260. package/dist/components/inputs/switch/switch.js.map +1 -1
  261. package/dist/components/inputs/switch-field/switch-field.d.ts.map +1 -1
  262. package/dist/components/inputs/switch-field/switch-field.js +5 -1
  263. package/dist/components/inputs/switch-field/switch-field.js.map +1 -1
  264. package/dist/components/inputs/text-editor/text-editor.code-copy.js +2 -2
  265. package/dist/components/inputs/text-editor/text-editor.code-copy.js.map +1 -1
  266. package/dist/components/inputs/text-editor/text-editor.cursor.d.ts.map +1 -1
  267. package/dist/components/inputs/text-editor/text-editor.cursor.js +1 -11
  268. package/dist/components/inputs/text-editor/text-editor.cursor.js.map +1 -1
  269. package/dist/components/inputs/text-editor/text-editor.d.ts.map +1 -1
  270. package/dist/components/inputs/text-editor/text-editor.hidden-syntax.d.ts.map +1 -1
  271. package/dist/components/inputs/text-editor/text-editor.hidden-syntax.js +127 -11
  272. package/dist/components/inputs/text-editor/text-editor.hidden-syntax.js.map +1 -1
  273. package/dist/components/inputs/text-editor/text-editor.i18n.d.ts +3 -1
  274. package/dist/components/inputs/text-editor/text-editor.i18n.d.ts.map +1 -1
  275. package/dist/components/inputs/text-editor/text-editor.i18n.js +5 -1
  276. package/dist/components/inputs/text-editor/text-editor.i18n.js.map +1 -1
  277. package/dist/components/inputs/text-editor/text-editor.js +14 -8
  278. package/dist/components/inputs/text-editor/text-editor.js.map +1 -1
  279. package/dist/components/inputs/text-editor/text-editor.markdown.d.ts +3 -0
  280. package/dist/components/inputs/text-editor/text-editor.markdown.d.ts.map +1 -1
  281. package/dist/components/inputs/text-editor/text-editor.markdown.js +9 -1
  282. package/dist/components/inputs/text-editor/text-editor.markdown.js.map +1 -1
  283. package/dist/components/inputs/text-editor/text-editor.mentions.d.ts +9 -2
  284. package/dist/components/inputs/text-editor/text-editor.mentions.d.ts.map +1 -1
  285. package/dist/components/inputs/text-editor/text-editor.mentions.js +61 -147
  286. package/dist/components/inputs/text-editor/text-editor.mentions.js.map +1 -1
  287. package/dist/components/inputs/text-editor/text-editor.styles.d.ts.map +1 -1
  288. package/dist/components/inputs/text-editor/text-editor.styles.js +187 -2
  289. package/dist/components/inputs/text-editor/text-editor.styles.js.map +1 -1
  290. package/dist/components/inputs/text-field/text-field.d.ts +1 -5
  291. package/dist/components/inputs/text-field/text-field.d.ts.map +1 -1
  292. package/dist/components/inputs/text-field/text-field.js +9 -23
  293. package/dist/components/inputs/text-field/text-field.js.map +1 -1
  294. package/dist/components/inputs/time-field/time-field.d.ts.map +1 -1
  295. package/dist/components/inputs/time-field/time-field.i18n.js +3 -3
  296. package/dist/components/inputs/time-field/time-field.i18n.js.map +1 -1
  297. package/dist/components/inputs/time-field/time-field.js +2 -1
  298. package/dist/components/inputs/time-field/time-field.js.map +1 -1
  299. package/dist/components/inputs/time-picker/time-picker.d.ts.map +1 -1
  300. package/dist/components/inputs/time-picker/time-picker.js +5 -1
  301. package/dist/components/inputs/time-picker/time-picker.js.map +1 -1
  302. package/dist/components/inputs/toggle-button/toggle-button.d.ts +0 -2
  303. package/dist/components/inputs/toggle-button/toggle-button.d.ts.map +1 -1
  304. package/dist/components/inputs/toggle-button/toggle-button.js +5 -23
  305. package/dist/components/inputs/toggle-button/toggle-button.js.map +1 -1
  306. package/dist/components/inputs/toggle-button-group/toggle-button-group.d.ts +0 -2
  307. package/dist/components/inputs/toggle-button-group/toggle-button-group.d.ts.map +1 -1
  308. package/dist/components/inputs/toggle-button-group/toggle-button-group.js +5 -12
  309. package/dist/components/inputs/toggle-button-group/toggle-button-group.js.map +1 -1
  310. package/dist/components/inputs/token-field/token-field.d.ts +4 -0
  311. package/dist/components/inputs/token-field/token-field.d.ts.map +1 -1
  312. package/dist/components/inputs/token-field/token-field.i18n.d.ts +1 -1
  313. package/dist/components/inputs/token-field/token-field.i18n.js +1 -1
  314. package/dist/components/inputs/token-field/token-field.i18n.js.map +1 -1
  315. package/dist/components/inputs/token-field/token-field.js +14 -1
  316. package/dist/components/inputs/token-field/token-field.js.map +1 -1
  317. package/dist/components/inputs/token-field/token-field.template.js +1 -1
  318. package/dist/components/inputs/token-field/token-field.template.js.map +1 -1
  319. package/dist/components/just-in-time-education.i18n-BgCd3s-c.js +395 -0
  320. package/dist/components/layout/box/box.d.ts.map +1 -1
  321. package/dist/components/layout/box/box.js +2 -1
  322. package/dist/components/layout/box/box.js.map +1 -1
  323. package/dist/components/layout/card/card.d.ts +0 -1
  324. package/dist/components/layout/card/card.d.ts.map +1 -1
  325. package/dist/components/layout/card/card.js +2 -15
  326. package/dist/components/layout/card/card.js.map +1 -1
  327. package/dist/components/layout/card/card.template.js +2 -2
  328. package/dist/components/layout/collection/collection.d.ts +4 -2
  329. package/dist/components/layout/collection/collection.d.ts.map +1 -1
  330. package/dist/components/layout/collection/collection.js +64 -32
  331. package/dist/components/layout/collection/collection.js.map +1 -1
  332. package/dist/components/layout/collection/collection.template.js +1 -1
  333. package/dist/components/layout/collection/collection.template.js.map +1 -1
  334. package/dist/components/layout/container/container.d.ts +6 -3
  335. package/dist/components/layout/container/container.d.ts.map +1 -1
  336. package/dist/components/layout/container/container.js +17 -23
  337. package/dist/components/layout/container/container.js.map +1 -1
  338. package/dist/components/layout/divider/divider.js +1 -1
  339. package/dist/components/layout/divider/divider.js.map +1 -1
  340. package/dist/components/layout/page/page.d.ts +2 -3
  341. package/dist/components/layout/page/page.d.ts.map +1 -1
  342. package/dist/components/layout/page/page.js +9 -12
  343. package/dist/components/layout/page/page.js.map +1 -1
  344. package/dist/components/layout/page-footer/page-footer.d.ts +2 -0
  345. package/dist/components/layout/page-footer/page-footer.d.ts.map +1 -1
  346. package/dist/components/layout/page-footer/page-footer.js +13 -7
  347. package/dist/components/layout/page-footer/page-footer.js.map +1 -1
  348. package/dist/components/layout/page-footer/page-footer.styles.d.ts.map +1 -1
  349. package/dist/components/layout/page-footer/page-footer.styles.js +22 -8
  350. package/dist/components/layout/page-footer/page-footer.styles.js.map +1 -1
  351. package/dist/components/layout/page-footer/page-footer.template.d.ts.map +1 -1
  352. package/dist/components/layout/page-footer/page-footer.template.js +2 -0
  353. package/dist/components/layout/page-footer/page-footer.template.js.map +1 -1
  354. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts.map +1 -1
  355. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js +2 -1
  356. package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js.map +1 -1
  357. package/dist/components/layout/page-sections/hero/hero-corner.d.ts +0 -1
  358. package/dist/components/layout/page-sections/hero/hero-corner.d.ts.map +1 -1
  359. package/dist/components/layout/page-sections/hero/hero-corner.js +9 -28
  360. package/dist/components/layout/page-sections/hero/hero-corner.js.map +1 -1
  361. package/dist/components/layout/page-sections/hero/hero.d.ts +1 -4
  362. package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
  363. package/dist/components/layout/page-sections/hero/hero.js +7 -29
  364. package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
  365. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts.map +1 -1
  366. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js +2 -1
  367. package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js.map +1 -1
  368. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts.map +1 -1
  369. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js +2 -1
  370. package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js.map +1 -1
  371. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts.map +1 -1
  372. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js +2 -1
  373. package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js.map +1 -1
  374. package/dist/components/layout/page-sections/simple-section/simple-section.d.ts.map +1 -1
  375. package/dist/components/layout/page-sections/simple-section/simple-section.js +2 -1
  376. package/dist/components/layout/page-sections/simple-section/simple-section.js.map +1 -1
  377. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts.map +1 -1
  378. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js +2 -1
  379. package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js.map +1 -1
  380. package/dist/components/layout/popover/popover.d.ts +14 -6
  381. package/dist/components/layout/popover/popover.d.ts.map +1 -1
  382. package/dist/components/layout/popover/popover.js +26 -30
  383. package/dist/components/layout/popover/popover.js.map +1 -1
  384. package/dist/components/layout/sheet/sheet.d.ts +0 -2
  385. package/dist/components/layout/sheet/sheet.d.ts.map +1 -1
  386. package/dist/components/layout/sheet/sheet.js +9 -20
  387. package/dist/components/layout/sheet/sheet.js.map +1 -1
  388. package/dist/components/layout/shell/shell.d.ts.map +1 -1
  389. package/dist/components/layout/shell/shell.js +2 -1
  390. package/dist/components/layout/shell/shell.js.map +1 -1
  391. package/dist/components/layout/spacer/spacer.d.ts.map +1 -1
  392. package/dist/components/layout/spacer/spacer.js +2 -1
  393. package/dist/components/layout/spacer/spacer.js.map +1 -1
  394. package/dist/components/layout/split-views/bar-split-view/bar-split-view.d.ts +6 -6
  395. package/dist/components/layout/split-views/bar-split-view/bar-split-view.d.ts.map +1 -1
  396. package/dist/components/layout/split-views/bar-split-view/bar-split-view.js +9 -12
  397. package/dist/components/layout/split-views/bar-split-view/bar-split-view.js.map +1 -1
  398. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.d.ts.map +1 -1
  399. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.js +2 -1
  400. package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.js.map +1 -1
  401. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.d.ts.map +1 -1
  402. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.js +2 -1
  403. package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.js.map +1 -1
  404. package/dist/components/layout/split-views/split-view-divider/split-view-divider.d.ts.map +1 -1
  405. package/dist/components/layout/split-views/split-view-divider/split-view-divider.js +2 -1
  406. package/dist/components/layout/split-views/split-view-divider/split-view-divider.js.map +1 -1
  407. package/dist/components/layout/split-views/split-view-pane/split-view-pane.d.ts.map +1 -1
  408. package/dist/components/layout/split-views/split-view-pane/split-view-pane.js +2 -1
  409. package/dist/components/layout/split-views/split-view-pane/split-view-pane.js.map +1 -1
  410. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.d.ts.map +1 -1
  411. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.js +2 -1
  412. package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.js.map +1 -1
  413. package/dist/components/layout/task-board/task-board-column.d.ts.map +1 -1
  414. package/dist/components/layout/task-board/task-board-column.js +2 -4
  415. package/dist/components/layout/task-board/task-board-column.js.map +1 -1
  416. package/dist/components/layout/task-board/task-board.d.ts +1 -1
  417. package/dist/components/layout/task-board/task-board.d.ts.map +1 -1
  418. package/dist/components/layout/task-board/task-board.js +12 -7
  419. package/dist/components/layout/task-board/task-board.js.map +1 -1
  420. package/dist/components/layout/window/window.d.ts +0 -1
  421. package/dist/components/layout/window/window.d.ts.map +1 -1
  422. package/dist/components/layout/window/window.js +4 -6
  423. package/dist/components/layout/window/window.js.map +1 -1
  424. package/dist/components/list-item.i18n-89uqlBMK.js +8 -0
  425. package/dist/components/list.i18n-CKqbhFQ_.js +13 -0
  426. package/dist/components/lists-and-tables/cells/cell/cell.d.ts +2 -0
  427. package/dist/components/lists-and-tables/cells/cell/cell.d.ts.map +1 -1
  428. package/dist/components/lists-and-tables/cells/cell/cell.js +4 -2
  429. package/dist/components/lists-and-tables/cells/cell/cell.js.map +1 -1
  430. package/dist/components/lists-and-tables/cells/description-cell/description-cell.d.ts +2 -0
  431. package/dist/components/lists-and-tables/cells/description-cell/description-cell.d.ts.map +1 -1
  432. package/dist/components/lists-and-tables/cells/description-cell/description-cell.js +4 -2
  433. package/dist/components/lists-and-tables/cells/description-cell/description-cell.js.map +1 -1
  434. package/dist/components/lists-and-tables/cells/drag-handle-cell/drag-handle-cell.d.ts.map +1 -1
  435. package/dist/components/lists-and-tables/cells/drag-handle-cell/drag-handle-cell.js +2 -1
  436. package/dist/components/lists-and-tables/cells/drag-handle-cell/drag-handle-cell.js.map +1 -1
  437. package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.d.ts +1 -0
  438. package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.d.ts.map +1 -1
  439. package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.js +3 -1
  440. package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.js.map +1 -1
  441. package/dist/components/lists-and-tables/cells/spacer-cell/spacer-cell.d.ts.map +1 -1
  442. package/dist/components/lists-and-tables/cells/spacer-cell/spacer-cell.js +2 -1
  443. package/dist/components/lists-and-tables/cells/spacer-cell/spacer-cell.js.map +1 -1
  444. package/dist/components/lists-and-tables/cells/step-cell/step-cell.d.ts +0 -1
  445. package/dist/components/lists-and-tables/cells/step-cell/step-cell.d.ts.map +1 -1
  446. package/dist/components/lists-and-tables/cells/step-cell/step-cell.js +5 -15
  447. package/dist/components/lists-and-tables/cells/step-cell/step-cell.js.map +1 -1
  448. package/dist/components/lists-and-tables/cells/text-cell/text-cell.d.ts +2 -0
  449. package/dist/components/lists-and-tables/cells/text-cell/text-cell.d.ts.map +1 -1
  450. package/dist/components/lists-and-tables/cells/text-cell/text-cell.js +4 -2
  451. package/dist/components/lists-and-tables/cells/text-cell/text-cell.js.map +1 -1
  452. package/dist/components/lists-and-tables/cells/title-cell/title-cell.d.ts +7 -2
  453. package/dist/components/lists-and-tables/cells/title-cell/title-cell.d.ts.map +1 -1
  454. package/dist/components/lists-and-tables/cells/title-cell/title-cell.js +5 -4
  455. package/dist/components/lists-and-tables/cells/title-cell/title-cell.js.map +1 -1
  456. package/dist/components/lists-and-tables/list/list.d.ts +5 -23
  457. package/dist/components/lists-and-tables/list/list.d.ts.map +1 -1
  458. package/dist/components/lists-and-tables/list/list.i18n.d.ts +1 -1
  459. package/dist/components/lists-and-tables/list/list.i18n.js +1 -1
  460. package/dist/components/lists-and-tables/list/list.js +54 -99
  461. package/dist/components/lists-and-tables/list/list.js.map +1 -1
  462. package/dist/components/lists-and-tables/list-item/list-item.d.ts +18 -16
  463. package/dist/components/lists-and-tables/list-item/list-item.d.ts.map +1 -1
  464. package/dist/components/lists-and-tables/list-item/list-item.js +61 -88
  465. package/dist/components/lists-and-tables/list-item/list-item.js.map +1 -1
  466. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts +3 -3
  467. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts.map +1 -1
  468. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js +17 -13
  469. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js.map +1 -1
  470. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.d.ts +1 -1
  471. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.d.ts.map +1 -1
  472. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.js +1 -2
  473. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.js.map +1 -1
  474. package/dist/components/lists-and-tables/table/table.d.ts +24 -13
  475. package/dist/components/lists-and-tables/table/table.d.ts.map +1 -1
  476. package/dist/components/lists-and-tables/table/table.js +58 -45
  477. package/dist/components/lists-and-tables/table/table.js.map +1 -1
  478. package/dist/components/navigation/breadcrumbs/breadcrumbs.d.ts.map +1 -1
  479. package/dist/components/navigation/breadcrumbs/breadcrumbs.js +2 -1
  480. package/dist/components/navigation/breadcrumbs/breadcrumbs.js.map +1 -1
  481. package/dist/components/navigation/document-tab-bar/document-tab-bar.d.ts +4 -4
  482. package/dist/components/navigation/document-tab-bar/document-tab-bar.d.ts.map +1 -1
  483. package/dist/components/navigation/document-tab-bar/document-tab-bar.i18n.d.ts +1 -1
  484. package/dist/components/navigation/document-tab-bar/document-tab-bar.i18n.js +1 -1
  485. package/dist/components/navigation/document-tab-bar/document-tab-bar.i18n.js.map +1 -1
  486. package/dist/components/navigation/document-tab-bar/document-tab-bar.js +7 -6
  487. package/dist/components/navigation/document-tab-bar/document-tab-bar.js.map +1 -1
  488. package/dist/components/navigation/document-tab-bar/document-tab-bar.template.js +1 -1
  489. package/dist/components/navigation/document-tab-bar/document-tab-bar.template.js.map +1 -1
  490. package/dist/components/navigation/link/link.d.ts.map +1 -1
  491. package/dist/components/navigation/link/link.js +2 -1
  492. package/dist/components/navigation/link/link.js.map +1 -1
  493. package/dist/components/navigation/link/link.styles.d.ts.map +1 -1
  494. package/dist/components/navigation/link/link.styles.js +0 -4
  495. package/dist/components/navigation/link/link.styles.js.map +1 -1
  496. package/dist/components/navigation/link/link.template.js +2 -2
  497. package/dist/components/navigation/menu-bar/menu-bar.d.ts +4 -0
  498. package/dist/components/navigation/menu-bar/menu-bar.d.ts.map +1 -1
  499. package/dist/components/navigation/menu-bar/menu-bar.js +17 -10
  500. package/dist/components/navigation/menu-bar/menu-bar.js.map +1 -1
  501. package/dist/components/navigation/menu-bar/menu-bar.styles.d.ts.map +1 -1
  502. package/dist/components/navigation/menu-bar/menu-bar.styles.js +9 -0
  503. package/dist/components/navigation/menu-bar/menu-bar.styles.js.map +1 -1
  504. package/dist/components/navigation/menu-bar/menu-bar.template.d.ts.map +1 -1
  505. package/dist/components/navigation/menu-bar/menu-bar.template.js +25 -19
  506. package/dist/components/navigation/menu-bar/menu-bar.template.js.map +1 -1
  507. package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts.map +1 -1
  508. package/dist/components/navigation/menu-bar-item/menu-bar-item.js +12 -1
  509. package/dist/components/navigation/menu-bar-item/menu-bar-item.js.map +1 -1
  510. package/dist/components/navigation/pagination/pagination.d.ts.map +1 -1
  511. package/dist/components/navigation/pagination/pagination.i18n.d.ts +3 -3
  512. package/dist/components/navigation/pagination/pagination.i18n.js +3 -3
  513. package/dist/components/navigation/pagination/pagination.i18n.js.map +1 -1
  514. package/dist/components/navigation/pagination/pagination.js +2 -1
  515. package/dist/components/navigation/pagination/pagination.js.map +1 -1
  516. package/dist/components/navigation/pagination/pagination.template.js +3 -3
  517. package/dist/components/navigation/pagination/pagination.template.js.map +1 -1
  518. package/dist/components/navigation/skip-link/skip-link.d.ts.map +1 -1
  519. package/dist/components/navigation/skip-link/skip-link.js +6 -8
  520. package/dist/components/navigation/skip-link/skip-link.js.map +1 -1
  521. package/dist/components/navigation/tab-bar/tab-bar.d.ts +1 -1
  522. package/dist/components/navigation/tab-bar/tab-bar.d.ts.map +1 -1
  523. package/dist/components/navigation/tab-bar/tab-bar.js +8 -15
  524. package/dist/components/navigation/tab-bar/tab-bar.js.map +1 -1
  525. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts +0 -1
  526. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts.map +1 -1
  527. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js +6 -6
  528. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js.map +1 -1
  529. package/dist/components/navigation/top-title-bar/top-title-bar.d.ts +11 -0
  530. package/dist/components/navigation/top-title-bar/top-title-bar.d.ts.map +1 -1
  531. package/dist/components/navigation/top-title-bar/top-title-bar.js +44 -6
  532. package/dist/components/navigation/top-title-bar/top-title-bar.js.map +1 -1
  533. package/dist/components/navigation/top-title-bar/top-title-bar.template.js +1 -1
  534. package/dist/components/navigation/top-title-bar/top-title-bar.template.js.map +1 -1
  535. package/dist/components/nl.generated-D-8UF1iR.js +62 -0
  536. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.d.ts +1 -1
  537. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.d.ts.map +1 -1
  538. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.js +5 -4
  539. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.js.map +1 -1
  540. package/dist/components/status-and-feedback/badge/badge.d.ts.map +1 -1
  541. package/dist/components/status-and-feedback/badge/badge.js +3 -6
  542. package/dist/components/status-and-feedback/badge/badge.js.map +1 -1
  543. package/dist/components/status-and-feedback/banner/banner.d.ts.map +1 -1
  544. package/dist/components/status-and-feedback/banner/banner.js +2 -1
  545. package/dist/components/status-and-feedback/banner/banner.js.map +1 -1
  546. package/dist/components/status-and-feedback/inline-dialog/inline-dialog.d.ts +2 -2
  547. package/dist/components/status-and-feedback/inline-dialog/inline-dialog.d.ts.map +1 -1
  548. package/dist/components/status-and-feedback/inline-dialog/inline-dialog.js +4 -3
  549. package/dist/components/status-and-feedback/inline-dialog/inline-dialog.js.map +1 -1
  550. package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.d.ts.map +1 -1
  551. package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.js +9 -2
  552. package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.js.map +1 -1
  553. package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.d.ts.map +1 -1
  554. package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.js +2 -1
  555. package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.js.map +1 -1
  556. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.d.ts +1 -4
  557. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.d.ts.map +1 -1
  558. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js +3 -15
  559. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js.map +1 -1
  560. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.d.ts.map +1 -1
  561. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.js +9 -6
  562. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.js.map +1 -1
  563. package/dist/components/status-and-feedback/notification/notification.d.ts.map +1 -1
  564. package/dist/components/status-and-feedback/notification/notification.js +3 -7
  565. package/dist/components/status-and-feedback/notification/notification.js.map +1 -1
  566. package/dist/components/status-and-feedback/progress-bar/progress-bar.d.ts.map +1 -1
  567. package/dist/components/status-and-feedback/progress-bar/progress-bar.js +4 -5
  568. package/dist/components/status-and-feedback/progress-bar/progress-bar.js.map +1 -1
  569. package/dist/components/status-and-feedback/progress-circle/progress-circle.d.ts.map +1 -1
  570. package/dist/components/status-and-feedback/progress-circle/progress-circle.js +2 -1
  571. package/dist/components/status-and-feedback/progress-circle/progress-circle.js.map +1 -1
  572. package/dist/components/status-and-feedback/status-bar/status-bar.d.ts +1 -1
  573. package/dist/components/status-and-feedback/status-bar/status-bar.d.ts.map +1 -1
  574. package/dist/components/status-and-feedback/status-bar/status-bar.js +8 -7
  575. package/dist/components/status-and-feedback/status-bar/status-bar.js.map +1 -1
  576. package/dist/components/status-and-feedback/step-bar/step-bar.d.ts +0 -7
  577. package/dist/components/status-and-feedback/step-bar/step-bar.d.ts.map +1 -1
  578. package/dist/components/status-and-feedback/step-bar/step-bar.js +2 -24
  579. package/dist/components/status-and-feedback/step-bar/step-bar.js.map +1 -1
  580. package/dist/components/{visibility-mixin-C-K7ho5Q.js → visibility-mixin-CNCT26tu.js} +1 -7
  581. package/dist/css/rich-text.css +5 -0
  582. package/dist/nldd.min.js +1493 -997
  583. package/dist/translations/en-US.d.ts.map +1 -1
  584. package/dist/translations/en-US.js +44 -22
  585. package/dist/translations/en-US.js.map +1 -1
  586. package/dist/translations/fy.d.ts.map +1 -1
  587. package/dist/translations/fy.js +44 -22
  588. package/dist/translations/fy.js.map +1 -1
  589. package/dist/translations/nl.generated.d.ts +32 -10
  590. package/dist/translations/nl.generated.d.ts.map +1 -1
  591. package/dist/translations/nl.generated.js +2 -0
  592. package/dist/translations/nl.generated.js.map +1 -1
  593. package/dist/translations/pap-AW.d.ts.map +1 -1
  594. package/dist/translations/pap-AW.js +44 -22
  595. package/dist/translations/pap-AW.js.map +1 -1
  596. package/dist/translations/pap-CW.d.ts.map +1 -1
  597. package/dist/translations/pap-CW.js +44 -22
  598. package/dist/translations/pap-CW.js.map +1 -1
  599. package/dist/types/vue.d.ts +123 -35
  600. package/dist/utilities/carried-context.d.ts +14 -3
  601. package/dist/utilities/carried-context.d.ts.map +1 -1
  602. package/dist/utilities/carried-context.js +12 -5
  603. package/dist/utilities/carried-context.js.map +1 -1
  604. package/dist/utilities/codemirror/codemirror-input.d.ts +0 -2
  605. package/dist/utilities/codemirror/codemirror-input.d.ts.map +1 -1
  606. package/dist/utilities/codemirror/codemirror-input.js +0 -14
  607. package/dist/utilities/codemirror/codemirror-input.js.map +1 -1
  608. package/dist/utilities/custom-element.d.ts +7 -0
  609. package/dist/utilities/custom-element.d.ts.map +1 -0
  610. package/dist/utilities/custom-element.js +7 -0
  611. package/dist/utilities/custom-element.js.map +1 -0
  612. package/dist/utilities/defer-focus.d.ts +24 -0
  613. package/dist/utilities/defer-focus.d.ts.map +1 -0
  614. package/dist/utilities/defer-focus.js +33 -0
  615. package/dist/utilities/defer-focus.js.map +1 -0
  616. package/dist/utilities/dev-checks-trigger.d.ts +2 -0
  617. package/dist/utilities/dev-checks-trigger.d.ts.map +1 -0
  618. package/dist/utilities/dev-checks-trigger.js +10 -0
  619. package/dist/utilities/dev-checks-trigger.js.map +1 -0
  620. package/dist/utilities/dev-checks.d.ts +40 -0
  621. package/dist/utilities/dev-checks.d.ts.map +1 -0
  622. package/dist/utilities/dev-checks.js +115 -0
  623. package/dist/utilities/dev-checks.js.map +1 -0
  624. package/dist/utilities/dev-rules.generated.d.ts +3 -0
  625. package/dist/utilities/dev-rules.generated.d.ts.map +1 -0
  626. package/dist/utilities/dev-rules.generated.js +2487 -0
  627. package/dist/utilities/dev-rules.generated.js.map +1 -0
  628. package/dist/utilities/element-state.d.ts +19 -0
  629. package/dist/utilities/element-state.d.ts.map +1 -0
  630. package/dist/utilities/element-state.js +49 -0
  631. package/dist/utilities/element-state.js.map +1 -0
  632. package/dist/utilities/file-drag-and-drop.d.ts +18 -0
  633. package/dist/utilities/file-drag-and-drop.d.ts.map +1 -0
  634. package/dist/utilities/file-drag-and-drop.js +31 -0
  635. package/dist/utilities/file-drag-and-drop.js.map +1 -0
  636. package/dist/utilities/form-associated-mixin.d.ts.map +1 -1
  637. package/dist/utilities/form-associated-mixin.js +2 -1
  638. package/dist/utilities/form-associated-mixin.js.map +1 -1
  639. package/dist/utilities/link-hint.d.ts +2 -21
  640. package/dist/utilities/link-hint.d.ts.map +1 -1
  641. package/dist/utilities/link-hint.js +22 -8
  642. package/dist/utilities/link-hint.js.map +1 -1
  643. package/dist/utilities/list-items.d.ts +10 -0
  644. package/dist/utilities/list-items.d.ts.map +1 -0
  645. package/dist/utilities/list-items.js +21 -0
  646. package/dist/utilities/list-items.js.map +1 -0
  647. package/dist/utilities/popover-target.d.ts +14 -0
  648. package/dist/utilities/popover-target.d.ts.map +1 -0
  649. package/dist/utilities/popover-target.js +21 -0
  650. package/dist/utilities/popover-target.js.map +1 -0
  651. package/dist/utilities/popup-anchor-controller.d.ts.map +1 -1
  652. package/dist/utilities/popup-anchor-controller.js +6 -1
  653. package/dist/utilities/popup-anchor-controller.js.map +1 -1
  654. package/dist/utilities/render-marked.d.ts +2 -0
  655. package/dist/utilities/render-marked.d.ts.map +1 -1
  656. package/dist/utilities/render-marked.js +4 -0
  657. package/dist/utilities/render-marked.js.map +1 -1
  658. package/dist/utilities/row-header-mixin.d.ts +31 -0
  659. package/dist/utilities/row-header-mixin.d.ts.map +1 -0
  660. package/dist/utilities/row-header-mixin.js +44 -0
  661. package/dist/utilities/row-header-mixin.js.map +1 -0
  662. package/dist/utilities/spacing-scale.d.ts +4 -5
  663. package/dist/utilities/spacing-scale.d.ts.map +1 -1
  664. package/dist/utilities/spacing-scale.js +4 -23
  665. package/dist/utilities/spacing-scale.js.map +1 -1
  666. package/dist/utilities/translations.d.ts.map +1 -1
  667. package/dist/utilities/translations.js +3 -15
  668. package/dist/utilities/translations.js.map +1 -1
  669. package/dist/utilities/visibility-mixin.d.ts +7 -0
  670. package/dist/utilities/visibility-mixin.d.ts.map +1 -1
  671. package/dist/utilities/visibility-mixin.js +0 -10
  672. package/dist/utilities/visibility-mixin.js.map +1 -1
  673. package/lint/cli.js +18 -0
  674. package/lint/data.generated.json +1 -0
  675. package/lint/engine.js +191 -0
  676. package/lint/fix.js +293 -0
  677. package/lint/format.js +133 -0
  678. package/lint/frontends.js +483 -0
  679. package/lint/linter.js +262 -0
  680. package/lint/main.js +279 -0
  681. package/lint/project.js +143 -0
  682. package/lint/rule-data.js +83 -0
  683. package/lint/rule-index.js +20 -0
  684. package/lint/rule.schema.json +65 -0
  685. package/lint/tree.js +131 -0
  686. package/package.json +22 -4
@@ -23,12 +23,38 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
23
23
  * a pick. `accept` and `multiple` hold for a drop too, which the native input
24
24
  * does not do: a drop that does not fit is refused as a whole, the previous
25
25
  * choice stays, and the field says why for a few seconds: "Sleep één
26
- * bestand", or what `accept` takes, named from it ("Het bestand moet een PDF
27
- * zijn"; "Dit bestandstype past niet" where a type in it has no name). A
28
- * dropped folder is refused as well ("Sleep een bestand, geen map"): it
29
- * arrives as a file without a type that cannot be read, and only the drop
30
- * tells it apart, not the drag. The message stays for a few seconds and then
31
- * gives way to the field again.
26
+ * bestand", or what `accept` takes, named from it ("Alleen PDF";
27
+ * "Bestandstype past niet" where a type in it has no name). The
28
+ * message stays for a few seconds and then gives way to the field again.
29
+ * While it shows, the message is a button of its own over the whole field,
30
+ * "Alleen PDF, sluit melding, Bijlage" to a screen reader: a press on it, or
31
+ * Enter, Space or Escape, dismisses it and puts focus on the button of the
32
+ * field again. A field that had focus when the message came gives it to the
33
+ * message, so focus does not fall back to the page.
34
+ *
35
+ * With `multiple`, a dropped folder is read down to the files in it, its
36
+ * subfolders included, and mixed with loose files in one drop if need be. The
37
+ * field then names the folder ("site (124 bestanden)", also "site (1 bestand)"
38
+ * for one), `paths` says where each
39
+ * file sat ("site/css/main.css"), and a form submits each file with its path as
40
+ * its name, as a native folder input does, so two files with one name in
41
+ * different folders stay apart. `accept` holds for every file in it. Without
42
+ * `multiple` a folder is refused ("Sleep bestand, geen map"): one file
43
+ * cannot be a folder. Only a drop tells a folder apart, not the drag. A folder
44
+ * that takes longer than a second to read shows the field empty with an
45
+ * `nldd-activity-indicator` ("Laden" in an area, the circle alone otherwise),
46
+ * as what was chosen gives way to it. An empty or unreadable folder is refused
47
+ * as any other drop, and the previous choice comes back after the message.
48
+ *
49
+ * `directory` offers a folder in the file dialog too. A dialog picks files or a
50
+ * folder, never both, so with it the field says "Bestanden of map kiezen" and
51
+ * a click opens a menu with both where it lands, as a context menu does; the
52
+ * keyboard opens it under the button. An area has room for both, so there it
53
+ * shows "Bestanden kiezen" and "Map kiezen" as two buttons with the drop hint
54
+ * under them, and the surface around them only takes a drop.
55
+ * "Wijzigen" opens the menu under itself. A folder is many files, so `directory`
56
+ * takes several without `multiple`. Safari on iOS picks a folder as well; a
57
+ * browser that cannot opens a dialog for files instead.
32
58
  *
33
59
  * While files are dragged over the page, every field marks itself as a place
34
60
  * to put them, and the field under the pointer says it will take them (a field
@@ -38,6 +64,16 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
38
64
  * editable field takes is left alone. On a device without hover there is no
39
65
  * dragging, so the field there drops the hint.
40
66
  *
67
+ * A control reserves the height of every text it can show, so fields of a
68
+ * size are as tall at one width, empty or with a file. Only a field with
69
+ * `directory` reserves the sentence that offers a folder, the longest of them. The name takes the lines
70
+ * that leaves it, and is cut in the middle only once those are full. A narrow
71
+ * field makes more room: below 320px "Wijzigen" and "Wis selectie" go in one
72
+ * menu behind "Toon opties" and a folder is counted as "site (3)", below 240px
73
+ * it leaves out the icon of the format. A refused drop says why in place of
74
+ * the name and the buttons, and an area shows its upload icon in red with it,
75
+ * as it did while the drop was refused.
76
+ *
41
77
  * The surface deliberately does not look like an input field. A border with
42
78
  * field semantics promises you can type into it; here you can only press it or
43
79
  * drop a file on it, so it has the border of a tinted surface instead of
@@ -55,15 +91,20 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
55
91
  * `variant="area"` lays the same field out as a tall surface, for a page where
56
92
  * handing in files is the main task. Empty, it shows an upload icon, the
57
93
  * sentence and the types it takes ("Toegestaan: PDF of JPG"), named from
58
- * `accept`; with a file, the icon of its format, its name and the buttons
94
+ * `accept`; with a file, the icon of its format (a folder for a folder, a
95
+ * stack for several files), its name and the buttons
59
96
  * "Wijzigen" and "Wis selectie" stacked in the middle. Both states have the same
60
- * height, so the page does not move when a file is chosen.
97
+ * height, so the page does not move when a file is chosen: 160px, 120px at
98
+ * `size="sm"`, and a step more with `directory`, whose buttons take a row of
99
+ * their own. Where those buttons no longer fit side by side, below 360px or
100
+ * 300px at `size="sm"`, it is one step taller again.
61
101
  *
62
102
  * @element nldd-file-field
63
103
  * @attr {string} variant - 'control' (default): a row the height of a field. 'area': a tall surface with the upload icon and the accepted types when empty, and the file icon, name and buttons stacked once chosen; both states keep the same height
64
104
  * @attr {string} size - Field size: 'md' (default) | 'sm'. Set automatically by nldd-form-field.
65
105
  * @attr {string} accept - Comma-separated list of accepted file types, forwarded to the input (e.g. ".pdf,image/*")
66
- * @attr {boolean} multiple - Allows choosing more than one file
106
+ * @attr {boolean} multiple - Allows choosing more than one file, and dropping a folder
107
+ * @attr {boolean} directory - Offers a folder beside files, since one dialog picks either: choosing and changing open a menu with both, and an area shows a button for each. Takes several files, as `multiple` does
67
108
  * @attr {string} accessible-label - Accessible label forwarded to the inner input. Set automatically by nldd-form-field.
68
109
  * @attr {string} input-id - Sets the id on the native input. Set automatically by nldd-form-field.
69
110
  * @attr {boolean} valid - Marks the field as valid; shows a check icon on the right, like nldd-dropdown
@@ -74,22 +115,31 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
74
115
  * @attr {object} translations - Override translation keys; unset keys fall back to Dutch
75
116
  *
76
117
  * @prop {File[]} files - The chosen files. Read-only: browsers forbid setting a file input's value, so there is no `value` attribute and no way to preselect a file.
118
+ * @prop {string[]} paths - Where each of `files` sat, in the same order: its name, or for a file from a dropped folder the path from that folder down. Read-only.
77
119
  *
78
- * @fires change - When the chosen files change, including a clear; detail: { files: File[] }
120
+ * @fires change - When the chosen files change, including a clear; detail: { files: File[], paths: string[] }
79
121
  */
80
122
  import { LitElement } from 'lit';
81
- import { customElement, property, query, state } from 'lit/decorators.js';
123
+ import { property, query, state } from 'lit/decorators.js';
124
+ import { customElement } from '../../../utilities/custom-element.js';
82
125
  import { FormAssociated } from '../../../utilities/form-associated-mixin.js';
83
126
  import { reflectNonDefault } from '../../../utilities/reflect-non-default.js';
84
127
  import { fileFieldStyles } from './file-field.styles.js';
85
128
  import { fileFieldTemplate } from './file-field.template.js';
86
129
  import { nlddFileFieldTranslations } from './file-field.i18n.js';
87
- import { acceptNames, carriesFiles, holdsFolder, fileMatches, typeRuledOut, unwatchDrags, watchDrags, } from './file-field.drop.js';
88
- import { textMeasurer, truncateMiddle } from './file-field.truncate.js';
130
+ import { acceptNames, carriesFiles, holdsFolder, readDrop, fileMatches, typeRuledOut, unwatchDrags, watchDrags, } from './file-field.drop.js';
131
+ import { lineFitter, textMeasurer, truncateMiddle, truncateMiddleToFit } from './file-field.truncate.js';
89
132
  import { DescribedBy } from '../../../utilities/described-by-mixin.js';
90
133
  import { translate } from '../../../utilities/translations.js';
134
+ import { deferFocus } from '../../../utilities/defer-focus.js';
135
+ import { fileDragAndDropAvailable, FileDragAndDropAvailabilityController } from '../../../utilities/file-drag-and-drop.js';
91
136
  /** How long the message of a refused drop stays in the field. */
92
137
  const REJECTION_MS = 4000;
138
+ /** How long a folder is read before the field shows it is busy. Most folders
139
+ * are read sooner, and the field then does not flash. */
140
+ const READING_INDICATOR_DELAY_MS = 1000;
141
+ /** A click this soon after the choose menu closed is the one that closed it. */
142
+ const REOPEN_GUARD_MS = 300;
93
143
  /** The word for a family of types in `accept`, such as `image/*`. */
94
144
  const FAMILY_KEYS = {
95
145
  image: 'components.file-field.image-lowercase',
@@ -104,6 +154,8 @@ let NLDDFileField = class NLDDFileField extends DescribedBy(FormAssociated(LitEl
104
154
  this.size = 'md';
105
155
  this.accept = '';
106
156
  this.multiple = false;
157
+ /** Offers a folder beside files: choosing opens a menu with both. */
158
+ this.directory = false;
107
159
  /** Accessible label forwarded to the inner <input>. Set automatically by nldd-form-field. */
108
160
  this.accessibleLabel = '';
109
161
  this.inputId = '';
@@ -116,6 +168,8 @@ let NLDDFileField = class NLDDFileField extends DescribedBy(FormAssociated(LitEl
116
168
  /** The chosen files. Mirrors the input's FileList; there is no setter, because
117
169
  * browsers refuse a programmatic file selection. */
118
170
  this._files = [];
171
+ /** Where each of `_files` sat, in the same order. */
172
+ this._paths = [];
119
173
  /** @internal Where a dragged file is, seen from this field. */
120
174
  this._drag = 'none';
121
175
  /** @internal Why the file under the pointer would be refused. */
@@ -125,10 +179,28 @@ let NLDDFileField = class NLDDFileField extends DescribedBy(FormAssociated(LitEl
125
179
  this._fittedName = null;
126
180
  /** @internal Whether the name is cut short, and so shows whole in a tooltip. */
127
181
  this._nameTruncated = false;
182
+ /** @internal The name of the chosen folder cut in the middle to fit, or null
183
+ * while it fits or CSS cuts it on one line. */
184
+ this._fittedFolder = null;
185
+ /** @internal The lines the name has room for. */
186
+ this._nameLines = 1;
128
187
  /** @internal What a screen reader hears after a drop that was taken. */
129
188
  this._announcement = '';
189
+ /** @internal Whether a dropped folder has been read for a while now, so the
190
+ * field shows it is busy. */
191
+ this._reading = false;
130
192
  /** @internal Why the last drop was refused; shown for a few seconds. */
131
193
  this._rejection = null;
194
+ /** @internal Whether the choose menu is open, for `expanded` on the button. */
195
+ this._menuOpen = false;
196
+ /** When the choose menu last closed, for the press that closed it. */
197
+ this._menuClosedAt = -Infinity;
198
+ /** Renders again when dragging files becomes possible or not, so the drop
199
+ * hint in the name of the button follows the one on screen. */
200
+ this._fileDrag = new FileDragAndDropAvailabilityController(this);
201
+ /** Counts every pick, drop and clear, so a folder that takes long to read
202
+ * does not overwrite what the user did in the meantime. */
203
+ this._action = 0;
132
204
  this._handleDragOver = (e) => {
133
205
  if (this.disabled || !e.dataTransfer || !carriesFiles(e.dataTransfer))
134
206
  return;
@@ -144,64 +216,108 @@ let NLDDFileField = class NLDDFileField extends DescribedBy(FormAssociated(LitEl
144
216
  e.preventDefault();
145
217
  if (this.disabled)
146
218
  return;
219
+ const action = ++this._action;
220
+ this._stopReading();
147
221
  const files = Array.from(e.dataTransfer.files);
148
222
  const rejection = this._judge(e.dataTransfer, files);
149
223
  if (rejection) {
150
- this._rejection = rejection;
151
- // Shown for a while, then the field reads as itself again: the message
152
- // takes the place of "Bestand kiezen", and a field that kept it looked
153
- // as if it no longer did anything. The status line keeps it for a
154
- // screen reader.
155
- clearTimeout(this._rejectionTimer);
156
- this._rejectionTimer = setTimeout(() => {
157
- this._announcement = this._rejectionText(rejection);
158
- this._rejection = null;
159
- }, REJECTION_MS);
224
+ this._refuse(rejection);
160
225
  return;
161
226
  }
162
- if (this._input)
163
- this._input.files = e.dataTransfer.files;
164
- this._files = files;
165
- this._rejection = null;
166
- // A pick moves focus to the change button, which names the file; a drop
167
- // moves nothing, so it is said.
168
- this._announcement = this._t('components.file-field.file-chosen-text', { name: this._valueLabel() });
169
- this._commit();
227
+ if (holdsFolder(e.dataTransfer)) {
228
+ // A folder with nothing in it, or one the browser could not read (a file
229
+ // gone mid-drop, no permission), says so, as any other refused drop does.
230
+ this._readingTimer = setTimeout(() => {
231
+ this._reading = true;
232
+ }, READING_INDICATOR_DELAY_MS);
233
+ void readDrop(e.dataTransfer).then((dropped) => {
234
+ if (action !== this._action)
235
+ return;
236
+ this._stopReading();
237
+ if (dropped.length)
238
+ this._takeDrop(dropped);
239
+ else
240
+ this._refuse('empty-folder');
241
+ }, () => {
242
+ if (action !== this._action)
243
+ return;
244
+ this._stopReading();
245
+ this._refuse('unreadable-folder');
246
+ });
247
+ return;
248
+ }
249
+ this._takeDrop(files.map((file) => ({ file, path: file.name })));
170
250
  };
251
+ /** Takes the message away, and gives focus back to the button of the field
252
+ * when the message had it, as it goes with the message. */
171
253
  this._clearRejection = () => {
254
+ const hadFocus = this.shadowRoot?.activeElement?.classList.contains('file-field__dismiss-button') ?? false;
172
255
  clearTimeout(this._rejectionTimer);
173
256
  this._rejection = null;
174
257
  this._announcement = '';
258
+ if (hadFocus)
259
+ void this.updateComplete.then(() => this.focus());
175
260
  };
176
261
  this._handleKeydown = (e) => {
177
262
  if (e.key === 'Escape')
178
263
  this._clearRejection();
179
264
  };
180
265
  }
266
+ /** @internal A folder is many files, so `directory` takes several too. */
267
+ get _multiple() {
268
+ return this.multiple || this.directory;
269
+ }
181
270
  get files() {
182
271
  return this._files;
183
272
  }
273
+ /** Where each file sat: its name, or for a file from a dropped folder the
274
+ * path from that folder down ("site/css/main.css"). Same order as `files`. */
275
+ get paths() {
276
+ return this._paths;
277
+ }
278
+ /** @internal Whether the field says why a drop was refused, which a new drag
279
+ * takes the place of. */
280
+ get _refused() {
281
+ return this._rejection !== null && this._drag === 'none';
282
+ }
184
283
  /** @internal */
185
284
  _t(key, vars) {
186
285
  return translate(this.translations, nlddFileFieldTranslations, key, vars);
187
286
  }
188
287
  /** @internal */
189
288
  _chooseLabel() {
190
- return this.multiple
289
+ if (this.directory)
290
+ return this._t('components.file-field.to-choose-files-or-folder-action');
291
+ return this._multiple
191
292
  ? this._t('components.file-field.to-choose-files-action')
192
293
  : this._t('components.file-field.to-choose-file-action');
193
294
  }
194
295
  /**
195
296
  * The native input carries the field's label but is hidden, so it is not in
196
297
  * the accessibility tree. The button is what you tab to, and on its own it
197
- * only says "choose a file" — for which field is the part that matters.
298
+ * does not say for which field, so the label comes in its name.
299
+ *
300
+ * After everything the button shows, and not in place of part of it: a voice
301
+ * command or an audit compares the name with the visible text, and "Bestand
302
+ * kiezen, Bijlage" under "Bestand kiezen of sleep het hierheen" is a mismatch
303
+ * (WCAG 2.5.3). The change button does the same.
304
+ *
305
+ * The drop hint only where it shows: a device without hover cannot drag, so
306
+ * there the hint is gone from the field and from the name alike, and a screen
307
+ * reader is not told to do what cannot be done.
198
308
  *
199
309
  * @internal
200
310
  */
201
311
  _chooseAccessibleLabel() {
202
- if (!this.accessibleLabel)
203
- return '';
204
- return `${this._chooseLabel()}, ${this.accessibleLabel}`;
312
+ const hint = !fileDragAndDropAvailable() ? '' : this._multiple
313
+ ? this._t('components.file-field.drop-hint-multiple-lowercase-text')
314
+ : this._t('components.file-field.drop-hint-lowercase-text');
315
+ const types = this.variant === 'area' ? this._acceptTypes() : null;
316
+ return [
317
+ hint ? `${this._chooseLabel()} ${hint}` : this._chooseLabel(),
318
+ types ? this._t('components.file-field.accepted-types-text', { types }) : '',
319
+ this.accessibleLabel,
320
+ ].filter(Boolean).join(', ');
205
321
  }
206
322
  /**
207
323
  * The change button is where focus lands after a pick, so its name says for
@@ -237,24 +353,42 @@ let NLDDFileField = class NLDDFileField extends DescribedBy(FormAssociated(LitEl
237
353
  _rejectionText(reason) {
238
354
  if (reason === 'count')
239
355
  return this._t('components.file-field.too-many-files-error-text');
240
- if (reason === 'folder') {
241
- return this.multiple
242
- ? this._t('components.file-field.folder-multiple-error-text')
243
- : this._t('components.file-field.folder-error-text');
244
- }
356
+ if (reason === 'folder')
357
+ return this._t('components.file-field.folder-error-text');
358
+ if (reason === 'empty-folder')
359
+ return this._t('components.file-field.empty-folder-error-text');
360
+ if (reason === 'unreadable-folder')
361
+ return this._t('components.file-field.unreadable-folder-error-text');
245
362
  const types = this._acceptTypes();
246
363
  if (!types)
247
364
  return this._t('components.file-field.wrong-file-type-error-text');
248
- return this.multiple
365
+ return this._multiple
249
366
  ? this._t('components.file-field.files-type-error-text', { types })
250
367
  : this._t('components.file-field.file-type-error-text', { types });
251
368
  }
369
+ /** @internal "Toon opties" with what they are for: "Toon opties, rapport.pdf". */
370
+ _moreAccessibleLabel() {
371
+ return `${this._t('components.file-field.show-options-action')}, ${this._valueLabel()}`;
372
+ }
252
373
  /** @internal */
253
374
  _valueLabel() {
375
+ const folder = this._folderName();
376
+ if (folder) {
377
+ return this._files.length === 1
378
+ ? this._t('components.file-field.folder-one-file-text', { folder })
379
+ : this._t('components.file-field.folder-count-text', { folder, count: this._files.length });
380
+ }
254
381
  if (this._files.length === 1)
255
382
  return this._files[0].name;
256
383
  return this._t('components.file-field.file-count-text', { count: this._files.length });
257
384
  }
385
+ /** @internal The folder everything came from, picked or dropped, or null.
386
+ * A folder with one file is still named as a folder, as `paths` has it. */
387
+ _folderName() {
388
+ const folders = new Set(this._paths.map((path) => (path.includes('/') ? path.split('/')[0] : '')));
389
+ const [folder] = folders;
390
+ return folders.size === 1 && folder ? folder : null;
391
+ }
258
392
  connectedCallback() {
259
393
  super.connectedCallback();
260
394
  watchDrags(this);
@@ -267,7 +401,6 @@ let NLDDFileField = class NLDDFileField extends DescribedBy(FormAssociated(LitEl
267
401
  });
268
402
  this.addEventListener('dragover', this._handleDragOver);
269
403
  this.addEventListener('drop', this._handleDrop);
270
- this.addEventListener('pointerdown', this._clearRejection);
271
404
  this.addEventListener('keydown', this._handleKeydown);
272
405
  }
273
406
  disconnectedCallback() {
@@ -275,10 +408,10 @@ let NLDDFileField = class NLDDFileField extends DescribedBy(FormAssociated(LitEl
275
408
  unwatchDrags(this);
276
409
  this._resizeObserver?.disconnect();
277
410
  clearTimeout(this._rejectionTimer);
411
+ this._stopReading();
278
412
  this._observedValue = undefined;
279
413
  this.removeEventListener('dragover', this._handleDragOver);
280
414
  this.removeEventListener('drop', this._handleDrop);
281
- this.removeEventListener('pointerdown', this._clearRejection);
282
415
  this.removeEventListener('keydown', this._handleKeydown);
283
416
  }
284
417
  updated(changed) {
@@ -294,14 +427,20 @@ let NLDDFileField = class NLDDFileField extends DescribedBy(FormAssociated(LitEl
294
427
  await Promise.all(Array.from(buttons, (button) => button.updateComplete));
295
428
  this._fitName();
296
429
  }
297
- /** Cuts the chosen name in the middle to the width it has. Without a width
298
- * (a hidden field), it falls back to the CSS cut of the first render. */
430
+ /** Cuts the chosen name in the middle to the room it has: one line, or in a
431
+ * control as many lines as its texts reserve anyway, so a name never makes
432
+ * the field taller. A folder keeps its count whole and gives up its name.
433
+ * Without a width (a hidden field), it falls back to the CSS cut of the
434
+ * first render. */
299
435
  _fitName() {
300
- const value = this.shadowRoot?.querySelector('.file-field__value');
301
- const name = this.shadowRoot?.querySelector('.file-field__name');
302
- if (this._files.length !== 1 || !value || !name) {
303
- this._fittedName = null;
304
- this._nameTruncated = false;
436
+ const root = this.shadowRoot;
437
+ const value = root?.querySelector('.file-field__value');
438
+ const folder = this._folderName();
439
+ const label = folder
440
+ ? Array.from(root?.querySelectorAll('.file-field__folder') ?? []).find((variant) => variant.checkVisibility())
441
+ : root?.querySelector('.file-field__name');
442
+ if (!value || !label || (!folder && this._files.length !== 1)) {
443
+ this._resetFit();
305
444
  return;
306
445
  }
307
446
  // The buttons beside the name take their width after their own render, so
@@ -315,44 +454,146 @@ let NLDDFileField = class NLDDFileField extends DescribedBy(FormAssociated(LitEl
315
454
  const style = getComputedStyle(value);
316
455
  const width = value.clientWidth - parseFloat(style.paddingLeft) - parseFloat(style.paddingRight);
317
456
  if (width <= 0) {
318
- this._fittedName = null;
319
- this._nameTruncated = false;
457
+ this._resetFit();
320
458
  return;
321
459
  }
322
- const { measure, done } = textMeasurer(name);
323
- try {
324
- const { text, truncated } = truncateMiddle(this._files[0].name, width, measure);
325
- this._fittedName = text;
460
+ const lines = this._nameLinesFor(value);
461
+ this._nameLines = lines;
462
+ if (folder) {
463
+ if (lines === 1) {
464
+ // CSS gives up the name of the folder before its count.
465
+ this._fittedFolder = null;
466
+ this._nameTruncated = false;
467
+ return;
468
+ }
469
+ const text = label.classList.contains('file-field__folder--short')
470
+ ? this._t('components.file-field.folder-count-short-text', { folder, count: this._files.length })
471
+ : this._valueLabel();
472
+ const at = text.indexOf(folder);
473
+ const [before, after] = at < 0 ? ['', ''] : [text.slice(0, at), text.slice(at + folder.length)];
474
+ const { text: fitted, truncated } = this._cutToLines(value, width, lines, folder, (name) => before + name + after, false);
475
+ this._fittedFolder = fitted;
326
476
  this._nameTruncated = truncated;
477
+ return;
478
+ }
479
+ const name = this._files[0].name;
480
+ if (lines === 1) {
481
+ const { measure, done } = textMeasurer(label);
482
+ try {
483
+ const { text, truncated } = truncateMiddle(name, width, measure);
484
+ this._fittedName = text;
485
+ this._nameTruncated = truncated;
486
+ }
487
+ finally {
488
+ done();
489
+ }
490
+ return;
491
+ }
492
+ const { text, truncated } = this._cutToLines(value, width, lines, name);
493
+ this._fittedName = text;
494
+ this._nameTruncated = truncated;
495
+ }
496
+ /** `name` cut in the middle until `shown(name)` fits on `lines` lines. */
497
+ _cutToLines(value, width, lines, name, shown = (text) => text, keepExtension = true) {
498
+ const { fits, done } = lineFitter(value, width, lines);
499
+ try {
500
+ return truncateMiddleToFit(name, (text) => fits(shown(text)), { keepExtension });
327
501
  }
328
502
  finally {
329
503
  done();
330
504
  }
331
505
  }
506
+ /** The lines a control has for its name: what its tallest text takes, the
507
+ * room around a text off. An area shows one. */
508
+ _nameLinesFor(value) {
509
+ const text = this.shadowRoot?.querySelector('.file-field__replace-area .file-field__text');
510
+ if (this.variant === 'area' || !text)
511
+ return 1;
512
+ const style = getComputedStyle(text);
513
+ const room = text.clientHeight - parseFloat(style.paddingTop) - parseFloat(style.paddingBottom);
514
+ return Math.max(1, Math.floor((room + 0.5) / parseFloat(getComputedStyle(value).lineHeight)));
515
+ }
516
+ _resetFit() {
517
+ this._fittedName = null;
518
+ this._fittedFolder = null;
519
+ this._nameTruncated = false;
520
+ this._nameLines = 1;
521
+ }
332
522
  willUpdate(changed) {
333
- if (changed.has('_files')) {
334
- this._fittedName = null;
335
- this._nameTruncated = false;
336
- }
523
+ if (changed.has('_files'))
524
+ this._resetFit();
337
525
  if (changed.has('required'))
338
526
  this._updateValidity();
339
527
  if (changed.has('accessibleLabel'))
340
528
  this.internals.ariaLabel = this.accessibleLabel || null;
341
529
  }
342
530
  /** @internal */
343
- _handleChoose() {
531
+ _handleChoose(e) {
344
532
  this._clearRejection();
533
+ // With a folder on offer, a press asks which of the two: one dialog picks
534
+ // files or a folder, never both.
535
+ const menu = this._chooseMenu;
536
+ if (this.directory && menu && e?.currentTarget instanceof Element) {
537
+ // A press on the field while the menu is open closes it. Light dismiss
538
+ // usually did so on pointerdown already, so this click must not reopen it.
539
+ if (menu.matches(':popover-open')) {
540
+ menu.hidePopover();
541
+ return;
542
+ }
543
+ if (performance.now() - this._menuClosedAt < REOPEN_GUARD_MS)
544
+ return;
545
+ // The field opens it where it was clicked; "Wijzigen" opens it under itself.
546
+ const field = e.currentTarget.classList.contains('file-field__choose-button');
547
+ menu.anchorElement = (field && this._pointAt(e)) || e.currentTarget;
548
+ menu.showPopover();
549
+ return;
550
+ }
345
551
  this._input?.click();
346
552
  }
553
+ /** The point a mouse or a finger pressed, as an element the menu can hang
554
+ * from, so it opens there. Null for the keyboard, whose click has no point
555
+ * (`detail` 0): the menu then hangs under the button. */
556
+ _pointAt(e) {
557
+ const anchor = this._menuAnchor;
558
+ const field = anchor?.parentElement;
559
+ if (!(e instanceof MouseEvent) || e.detail === 0 || !anchor || !field)
560
+ return null;
561
+ const box = field.getBoundingClientRect();
562
+ anchor.style.left = `${e.clientX - box.left}px`;
563
+ anchor.style.top = `${e.clientY - box.top}px`;
564
+ return anchor;
565
+ }
566
+ /** @internal */
567
+ _handleMenuToggle(e) {
568
+ this._menuOpen = e.newState === 'open';
569
+ if (!this._menuOpen)
570
+ this._menuClosedAt = performance.now();
571
+ }
572
+ /** @internal Picked in the menu of a field with `directory`. */
573
+ _chooseFiles() {
574
+ this._input?.click();
575
+ }
576
+ /** @internal Picked in the menu of a field with `directory`. */
577
+ _chooseFolder() {
578
+ this._folderInput?.click();
579
+ }
347
580
  /** @internal */
348
581
  _handleInputChange(e) {
349
582
  e.stopPropagation();
350
583
  const input = e.target;
584
+ this._action++;
585
+ this._stopReading();
586
+ // The other input keeps its previous pick otherwise, and picking that
587
+ // again would fire no change.
588
+ const other = input === this._input ? this._folderInput : this._input;
589
+ if (other)
590
+ other.value = '';
351
591
  // The choose button gives way to the change button once there is a file,
352
592
  // and the other way round, so focus would land on the body.
353
593
  const hadFocus = this.matches(':focus-within');
354
594
  this._files = input.files ? Array.from(input.files) : [];
355
- this._rejection = null;
595
+ this._paths = this._files.map((file) => file.webkitRelativePath || file.name);
596
+ this._clearRejection();
356
597
  this._commit();
357
598
  if (hadFocus)
358
599
  void this.updateComplete.then(() => this.focus());
@@ -363,14 +604,17 @@ let NLDDFileField = class NLDDFileField extends DescribedBy(FormAssociated(LitEl
363
604
  * on names and types; without, a drag only on what it shows before the drop. */
364
605
  _judge(transfer, files) {
365
606
  if (files) {
366
- if (!this.multiple && files.length > 1)
607
+ if (!this._multiple && files.length > 1)
367
608
  return 'count';
368
- if (holdsFolder(transfer))
369
- return 'folder';
609
+ if (holdsFolder(transfer)) {
610
+ // Several files may come from a folder; one file cannot be a folder.
611
+ // The types are judged once the folder is read.
612
+ return this._multiple ? null : 'folder';
613
+ }
370
614
  return files.every((file) => fileMatches(this.accept, file)) ? null : 'type';
371
615
  }
372
616
  const items = Array.from(transfer.items).filter((item) => item.kind === 'file');
373
- if (!this.multiple && items.length > 1)
617
+ if (!this._multiple && items.length > 1)
374
618
  return 'count';
375
619
  return items.some((item) => typeRuledOut(this.accept, item.type)) ? 'type' : null;
376
620
  }
@@ -387,13 +631,73 @@ let NLDDFileField = class NLDDFileField extends DescribedBy(FormAssociated(LitEl
387
631
  this._dragRejection = state === 'over' && transfer ? this._judge(transfer) : null;
388
632
  this._drag = this._dragRejection ? 'rejected' : state;
389
633
  }
634
+ /** A drop that passed the count, with its folders read: judged on the types
635
+ * of the files in it, then taken in place of what the field had. */
636
+ _takeDrop(dropped) {
637
+ if (!dropped.every(({ file }) => fileMatches(this.accept, file))) {
638
+ this._refuse('type');
639
+ return;
640
+ }
641
+ const transfer = new DataTransfer();
642
+ for (const { file } of dropped)
643
+ transfer.items.add(file);
644
+ if (this._input)
645
+ this._input.files = transfer.files;
646
+ if (this._folderInput)
647
+ this._folderInput.value = '';
648
+ this._files = dropped.map(({ file }) => file);
649
+ this._paths = dropped.map(({ path }) => path);
650
+ this._clearRejection();
651
+ // A pick moves focus to the change button, which names the file; a drop
652
+ // moves nothing, so it is said.
653
+ this._announcement = this._t('components.file-field.file-chosen-text', { name: this._valueLabel() });
654
+ this._commit();
655
+ }
656
+ /** Shown for a while, then the field reads as itself again: the message
657
+ * takes the place of "Bestand kiezen", and a field that kept it looked as if
658
+ * it no longer did anything. The status line keeps it for a screen reader. */
659
+ _refuse(rejection) {
660
+ const hadFocus = this.matches(':focus-within');
661
+ this._rejection = rejection;
662
+ clearTimeout(this._rejectionTimer);
663
+ this._rejectionTimer = setTimeout(() => {
664
+ this._clearRejection();
665
+ this._announcement = this._rejectionText(rejection);
666
+ }, REJECTION_MS);
667
+ // The buttons give way to the message, so focus goes to it.
668
+ if (hadFocus)
669
+ void this.updateComplete.then(() => this.focus());
670
+ }
671
+ _stopReading() {
672
+ clearTimeout(this._readingTimer);
673
+ this._reading = false;
674
+ }
675
+ /** @internal A press on the message dismisses it, and does nothing else. */
676
+ _handleDismiss() {
677
+ this._clearRejection();
678
+ void this.updateComplete.then(() => this.focus());
679
+ }
680
+ /** @internal "Alleen PDF, sluit melding, Bijlage": the message as it shows,
681
+ * what a press does, and for which field. */
682
+ _dismissAccessibleLabel() {
683
+ if (!this._rejection)
684
+ return '';
685
+ return [this._rejectionText(this._rejection), this._t('components.file-field.dismiss-message-lowercase-action'), this.accessibleLabel]
686
+ .filter(Boolean)
687
+ .join(', ');
688
+ }
390
689
  /** @internal */
391
690
  _handleClear() {
392
691
  // Clearing the input as well as the array: the element keeps the previous
393
692
  // FileList otherwise, so choosing the same file again would fire no change.
693
+ this._action++;
694
+ this._stopReading();
394
695
  if (this._input)
395
696
  this._input.value = '';
697
+ if (this._folderInput)
698
+ this._folderInput.value = '';
396
699
  this._files = [];
700
+ this._paths = [];
397
701
  this._commit();
398
702
  // Focus would land on the body when the cross unmounts with the last file.
399
703
  void this.updateComplete.then(() => this.focus());
@@ -401,7 +705,7 @@ let NLDDFileField = class NLDDFileField extends DescribedBy(FormAssociated(LitEl
401
705
  _commit() {
402
706
  this.commitFormValue();
403
707
  this.dispatchEvent(new CustomEvent('change', {
404
- detail: { files: this._files },
708
+ detail: { files: this._files, paths: this._paths },
405
709
  bubbles: true,
406
710
  composed: true,
407
711
  }));
@@ -409,15 +713,17 @@ let NLDDFileField = class NLDDFileField extends DescribedBy(FormAssociated(LitEl
409
713
  // — Form participation ————————————————————————————————————————————————————
410
714
  /** Submit one entry per file under `name`, the way a native multiple file
411
715
  * input does. A single file is submitted as itself, so a form with one file
412
- * reads back as a File rather than as FormData wrapping one. */
716
+ * reads back as a File rather than as FormData wrapping one. A file from a
717
+ * dropped folder goes with its path as its file name, which is how a native
718
+ * folder input submits it too. */
413
719
  formValue() {
414
720
  if (!this.name || this._files.length === 0)
415
721
  return null;
416
- if (this._files.length === 1)
722
+ const nested = this._paths.some((path) => path.includes('/'));
723
+ if (this._files.length === 1 && !nested)
417
724
  return this._files[0];
418
725
  const data = new FormData();
419
- for (const file of this._files)
420
- data.append(this.name, file);
726
+ this._files.forEach((file, index) => data.append(this.name, file, this._paths[index] ?? file.name));
421
727
  return data;
422
728
  }
423
729
  commitFormValue() {
@@ -433,16 +739,30 @@ let NLDDFileField = class NLDDFileField extends DescribedBy(FormAssociated(LitEl
433
739
  this.internals.setValidity({});
434
740
  }
435
741
  }
742
+ /** Back to empty, as a clear, but without a change event, as a native
743
+ * input resets: a folder still being read is dropped too. */
436
744
  formResetCallback() {
745
+ this._action++;
746
+ this._stopReading();
747
+ this._clearRejection();
437
748
  if (this._input)
438
749
  this._input.value = '';
750
+ if (this._folderInput)
751
+ this._folderInput.value = '';
439
752
  this._files = [];
753
+ this._paths = [];
440
754
  this.commitFormValue();
441
755
  }
442
- /** The button that opens the dialog: the whole surface while the field is
443
- * empty, "Wijzigen" once it has a file. */
756
+ /** The message of a refused drop while it shows. Otherwise the button that
757
+ * opens the dialog: the whole surface while the field is
758
+ * empty, or the first of its two choices in an area with `directory`, and
759
+ * "Wijzigen" once it has a file, or the menu that holds it in a narrow field. */
444
760
  _chooseButton() {
445
- return this.shadowRoot?.querySelector('.file-field__browse-button, nldd-button') ?? null;
761
+ const dismiss = this.shadowRoot?.querySelector('.file-field__dismiss-button');
762
+ if (dismiss)
763
+ return dismiss;
764
+ const buttons = this.shadowRoot?.querySelectorAll('.file-field__choose-button, .file-field__choose-button-group nldd-button, .file-field__change-button, .file-field__more-button') ?? [];
765
+ return Array.from(buttons).find((button) => button.checkVisibility?.() ?? true) ?? buttons[0] ?? null;
446
766
  }
447
767
  /**
448
768
  * Delegates focus to the choose button rather than the hidden input: an input
@@ -450,6 +770,8 @@ let NLDDFileField = class NLDDFileField extends DescribedBy(FormAssociated(LitEl
450
770
  * sees as the control.
451
771
  */
452
772
  focus(options) {
773
+ if (deferFocus(this, options))
774
+ return;
453
775
  this._chooseButton()?.focus(options);
454
776
  }
455
777
  /** The file input is display:none and therefore not in the accessibility tree.
@@ -477,6 +799,9 @@ __decorate([
477
799
  __decorate([
478
800
  property({ type: Boolean, reflect: true })
479
801
  ], NLDDFileField.prototype, "multiple", void 0);
802
+ __decorate([
803
+ property({ type: Boolean, reflect: true })
804
+ ], NLDDFileField.prototype, "directory", void 0);
480
805
  __decorate([
481
806
  property({ type: String, attribute: 'accessible-label' })
482
807
  ], NLDDFileField.prototype, "accessibleLabel", void 0);
@@ -516,15 +841,36 @@ __decorate([
516
841
  __decorate([
517
842
  state()
518
843
  ], NLDDFileField.prototype, "_nameTruncated", void 0);
844
+ __decorate([
845
+ state()
846
+ ], NLDDFileField.prototype, "_fittedFolder", void 0);
847
+ __decorate([
848
+ state()
849
+ ], NLDDFileField.prototype, "_nameLines", void 0);
519
850
  __decorate([
520
851
  state()
521
852
  ], NLDDFileField.prototype, "_announcement", void 0);
853
+ __decorate([
854
+ state()
855
+ ], NLDDFileField.prototype, "_reading", void 0);
522
856
  __decorate([
523
857
  state()
524
858
  ], NLDDFileField.prototype, "_rejection", void 0);
859
+ __decorate([
860
+ state()
861
+ ], NLDDFileField.prototype, "_menuOpen", void 0);
525
862
  __decorate([
526
863
  query('.file-field__input')
527
864
  ], NLDDFileField.prototype, "_input", void 0);
865
+ __decorate([
866
+ query('.file-field__folder-input')
867
+ ], NLDDFileField.prototype, "_folderInput", void 0);
868
+ __decorate([
869
+ query('.file-field__choose-menu')
870
+ ], NLDDFileField.prototype, "_chooseMenu", void 0);
871
+ __decorate([
872
+ query('.file-field__menu-anchor')
873
+ ], NLDDFileField.prototype, "_menuAnchor", void 0);
528
874
  NLDDFileField = __decorate([
529
875
  customElement('nldd-file-field')
530
876
  ], NLDDFileField);