@nldd/design-system 0.8.79 → 0.8.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (446) hide show
  1. package/custom-elements.json +2400 -664
  2. package/dist/components/actions/button/button.styles.d.ts.map +1 -1
  3. package/dist/components/actions/button/button.styles.js +4 -1
  4. package/dist/components/actions/button/button.styles.js.map +1 -1
  5. package/dist/components/actions/icon-button/icon-button.styles.d.ts.map +1 -1
  6. package/dist/components/actions/icon-button/icon-button.styles.js +4 -1
  7. package/dist/components/actions/icon-button/icon-button.styles.js.map +1 -1
  8. package/dist/components/actions/menu/menu.d.ts +44 -3
  9. package/dist/components/actions/menu/menu.d.ts.map +1 -1
  10. package/dist/components/actions/menu/menu.js +86 -33
  11. package/dist/components/actions/menu/menu.js.map +1 -1
  12. package/dist/components/actions/menu/menu.template.d.ts +1 -1
  13. package/dist/components/actions/menu/menu.template.d.ts.map +1 -1
  14. package/dist/components/actions/menu/menu.template.js +7 -3
  15. package/dist/components/actions/menu/menu.template.js.map +1 -1
  16. package/dist/components/actions/toolbar/toolbar.d.ts +29 -0
  17. package/dist/components/actions/toolbar/toolbar.d.ts.map +1 -1
  18. package/dist/components/actions/toolbar/toolbar.i18n.d.ts +1 -0
  19. package/dist/components/actions/toolbar/toolbar.i18n.d.ts.map +1 -1
  20. package/dist/components/actions/toolbar/toolbar.i18n.js +1 -0
  21. package/dist/components/actions/toolbar/toolbar.i18n.js.map +1 -1
  22. package/dist/components/actions/toolbar/toolbar.js +74 -0
  23. package/dist/components/actions/toolbar/toolbar.js.map +1 -1
  24. package/dist/components/actions/toolbar/toolbar.styles.d.ts.map +1 -1
  25. package/dist/components/actions/toolbar/toolbar.styles.js +39 -5
  26. package/dist/components/actions/toolbar/toolbar.styles.js.map +1 -1
  27. package/dist/components/actions/toolbar/toolbar.template.d.ts.map +1 -1
  28. package/dist/components/actions/toolbar/toolbar.template.js +19 -1
  29. package/dist/components/actions/toolbar/toolbar.template.js.map +1 -1
  30. package/dist/components/breakpoints-CkxsiRgH.js +10 -0
  31. package/dist/components/components.js +51975 -114
  32. package/dist/components/content/avatar/avatar.d.ts +51 -47
  33. package/dist/components/content/avatar/avatar.d.ts.map +1 -1
  34. package/dist/components/content/avatar/avatar.js +85 -75
  35. package/dist/components/content/avatar/avatar.js.map +1 -1
  36. package/dist/components/content/avatar/avatar.styles.js +2 -2
  37. package/dist/components/content/avatar/avatar.template.d.ts +1 -0
  38. package/dist/components/content/avatar/avatar.template.d.ts.map +1 -1
  39. package/dist/components/content/avatar/avatar.template.js +26 -18
  40. package/dist/components/content/avatar/avatar.template.js.map +1 -1
  41. package/dist/components/content/avatar-group/avatar-group.d.ts +90 -0
  42. package/dist/components/content/avatar-group/avatar-group.d.ts.map +1 -0
  43. package/dist/components/content/avatar-group/avatar-group.i18n.d.ts +6 -0
  44. package/dist/components/content/avatar-group/avatar-group.i18n.d.ts.map +1 -0
  45. package/dist/components/content/avatar-group/avatar-group.i18n.js +5 -0
  46. package/dist/components/content/avatar-group/avatar-group.i18n.js.map +1 -0
  47. package/dist/components/content/avatar-group/avatar-group.js +169 -0
  48. package/dist/components/content/avatar-group/avatar-group.js.map +1 -0
  49. package/dist/components/content/avatar-group/avatar-group.styles.d.ts +2 -0
  50. package/dist/components/content/avatar-group/avatar-group.styles.d.ts.map +1 -0
  51. package/dist/components/content/avatar-group/avatar-group.styles.js +132 -0
  52. package/dist/components/content/avatar-group/avatar-group.styles.js.map +1 -0
  53. package/dist/components/content/avatar-group/avatar-group.template.d.ts +3 -0
  54. package/dist/components/content/avatar-group/avatar-group.template.d.ts.map +1 -0
  55. package/dist/components/content/avatar-group/avatar-group.template.js +50 -0
  56. package/dist/components/content/avatar-group/avatar-group.template.js.map +1 -0
  57. package/dist/components/content/blockquote/blockquote.d.ts +3 -3
  58. package/dist/components/content/blockquote/blockquote.d.ts.map +1 -1
  59. package/dist/components/content/blockquote/blockquote.js +8 -8
  60. package/dist/components/content/blockquote/blockquote.js.map +1 -1
  61. package/dist/components/content/blockquote/blockquote.styles.js +1 -1
  62. package/dist/components/content/blockquote/blockquote.template.js +1 -1
  63. package/dist/components/content/blockquote/blockquote.template.js.map +1 -1
  64. package/dist/components/content/code-viewer/code-viewer.d.ts +4 -4
  65. package/dist/components/content/code-viewer/code-viewer.d.ts.map +1 -1
  66. package/dist/components/content/code-viewer/code-viewer.js +5 -13
  67. package/dist/components/content/code-viewer/code-viewer.js.map +1 -1
  68. package/dist/components/content/code-viewer/code-viewer.styles.js +1 -1
  69. package/dist/components/content/icon/icon-aliases.d.ts.map +1 -1
  70. package/dist/components/content/icon/icon-aliases.js +18 -0
  71. package/dist/components/content/icon/icon-aliases.js.map +1 -1
  72. package/dist/components/content/icon/icon-gallery-status.d.ts.map +1 -1
  73. package/dist/components/content/icon/icon-gallery-status.js +75 -27
  74. package/dist/components/content/icon/icon-gallery-status.js.map +1 -1
  75. package/dist/components/content/icon/icon-registry.d.ts.map +1 -1
  76. package/dist/components/content/icon/icon-registry.js +25 -13
  77. package/dist/components/content/icon/icon-registry.js.map +1 -1
  78. package/dist/components/content/identity/identity.d.ts +71 -0
  79. package/dist/components/content/identity/identity.d.ts.map +1 -0
  80. package/dist/components/content/identity/identity.js +124 -0
  81. package/dist/components/content/identity/identity.js.map +1 -0
  82. package/dist/components/content/identity/identity.styles.d.ts +2 -0
  83. package/dist/components/content/identity/identity.styles.d.ts.map +1 -0
  84. package/dist/components/content/{byline/byline.styles.js → identity/identity.styles.js} +28 -47
  85. package/dist/components/content/identity/identity.styles.js.map +1 -0
  86. package/dist/components/content/identity/identity.template.d.ts +3 -0
  87. package/dist/components/content/identity/identity.template.d.ts.map +1 -0
  88. package/dist/components/content/{byline/byline.template.js → identity/identity.template.js} +12 -11
  89. package/dist/components/content/identity/identity.template.js.map +1 -0
  90. package/dist/components/content/tag/tag.d.ts +15 -10
  91. package/dist/components/content/tag/tag.d.ts.map +1 -1
  92. package/dist/components/content/tag/tag.js +15 -10
  93. package/dist/components/content/tag/tag.js.map +1 -1
  94. package/dist/components/content/title/title.d.ts +4 -4
  95. package/dist/components/content/title/title.js +4 -4
  96. package/dist/components/content/title/title.styles.js +1 -1
  97. package/dist/components/content/title/title.template.js +2 -2
  98. package/dist/components/content/token/token.d.ts +6 -2
  99. package/dist/components/content/token/token.d.ts.map +1 -1
  100. package/dist/components/content/token/token.js +6 -2
  101. package/dist/components/content/token/token.js.map +1 -1
  102. package/dist/components/content/tooltip/tooltip.d.ts +26 -25
  103. package/dist/components/content/tooltip/tooltip.d.ts.map +1 -1
  104. package/dist/components/content/tooltip/tooltip.js +31 -25
  105. package/dist/components/content/tooltip/tooltip.js.map +1 -1
  106. package/dist/components/decorate-BKn10QQi.js +9 -0
  107. package/dist/components/dist-BYVOPNHp.js +381 -0
  108. package/dist/components/dist-Bq4xc7Bm.js +624 -0
  109. package/dist/components/dist-C0PiB1dr.js +870 -0
  110. package/dist/components/dist-C400RcFU.js +1498 -0
  111. package/dist/components/dist-CCg5Mso_.js +390 -0
  112. package/dist/components/dist-CJR_Rwhh.js +464 -0
  113. package/dist/components/dist-Ccw7ZfsU.js +18481 -0
  114. package/dist/components/dist-OBifyiJS.js +887 -0
  115. package/dist/components/dist-TpIL8G4G.js +1480 -0
  116. package/dist/components/dist-afrAoubg.js +1181 -0
  117. package/dist/components/dist-bO14jlsr.js +78 -0
  118. package/dist/components/forms/form-field/form-field.d.ts +59 -2
  119. package/dist/components/forms/form-field/form-field.d.ts.map +1 -1
  120. package/dist/components/forms/form-field/form-field.js +120 -35
  121. package/dist/components/forms/form-field/form-field.js.map +1 -1
  122. package/dist/components/gherkin-uCVRxsGf.js +108 -0
  123. package/dist/components/icon-CIpJq_cf.js +751 -0
  124. package/dist/components/icon-button-BAkUJTn6.js +1676 -0
  125. package/dist/components/index.d.ts +4 -1
  126. package/dist/components/index.d.ts.map +1 -1
  127. package/dist/components/index.js +4 -1
  128. package/dist/components/index.js.map +1 -1
  129. package/dist/components/input-modality-DhTeUxKi.js +43 -0
  130. package/dist/components/inputs/checkbox/checkbox.d.ts +13 -0
  131. package/dist/components/inputs/checkbox/checkbox.d.ts.map +1 -1
  132. package/dist/components/inputs/checkbox/checkbox.js +18 -0
  133. package/dist/components/inputs/checkbox/checkbox.js.map +1 -1
  134. package/dist/components/inputs/checkbox/checkbox.styles.d.ts.map +1 -1
  135. package/dist/components/inputs/checkbox/checkbox.styles.js +17 -0
  136. package/dist/components/inputs/checkbox/checkbox.styles.js.map +1 -1
  137. package/dist/components/inputs/checkbox/checkbox.template.d.ts.map +1 -1
  138. package/dist/components/inputs/checkbox/checkbox.template.js +11 -0
  139. package/dist/components/inputs/checkbox/checkbox.template.js.map +1 -1
  140. package/dist/components/inputs/checkbox-field/checkbox-field.d.ts +9 -0
  141. package/dist/components/inputs/checkbox-field/checkbox-field.d.ts.map +1 -1
  142. package/dist/components/inputs/checkbox-field/checkbox-field.js +11 -0
  143. package/dist/components/inputs/checkbox-field/checkbox-field.js.map +1 -1
  144. package/dist/components/inputs/code-editor/code-editor.d.ts +3 -0
  145. package/dist/components/inputs/code-editor/code-editor.d.ts.map +1 -1
  146. package/dist/components/inputs/code-editor/code-editor.js +3 -0
  147. package/dist/components/inputs/code-editor/code-editor.js.map +1 -1
  148. package/dist/components/inputs/combo-box/combo-box.d.ts +6 -0
  149. package/dist/components/inputs/combo-box/combo-box.d.ts.map +1 -1
  150. package/dist/components/inputs/combo-box/combo-box.js +21 -0
  151. package/dist/components/inputs/combo-box/combo-box.js.map +1 -1
  152. package/dist/components/inputs/date-field/date-field.d.ts +6 -0
  153. package/dist/components/inputs/date-field/date-field.d.ts.map +1 -1
  154. package/dist/components/inputs/date-field/date-field.js +11 -0
  155. package/dist/components/inputs/date-field/date-field.js.map +1 -1
  156. package/dist/components/inputs/date-picker/date-picker.d.ts +3 -0
  157. package/dist/components/inputs/date-picker/date-picker.d.ts.map +1 -1
  158. package/dist/components/inputs/date-picker/date-picker.js +4 -1
  159. package/dist/components/inputs/date-picker/date-picker.js.map +1 -1
  160. package/dist/components/inputs/date-picker/date-picker.styles.d.ts.map +1 -1
  161. package/dist/components/inputs/date-picker/date-picker.styles.js +7 -2
  162. package/dist/components/inputs/date-picker/date-picker.styles.js.map +1 -1
  163. package/dist/components/inputs/dropdown/dropdown.d.ts +29 -0
  164. package/dist/components/inputs/dropdown/dropdown.d.ts.map +1 -1
  165. package/dist/components/inputs/dropdown/dropdown.js +44 -1
  166. package/dist/components/inputs/dropdown/dropdown.js.map +1 -1
  167. package/dist/components/inputs/file-field/file-field.d.ts +115 -0
  168. package/dist/components/inputs/file-field/file-field.d.ts.map +1 -0
  169. package/dist/components/inputs/file-field/file-field.i18n.d.ts +10 -0
  170. package/dist/components/inputs/file-field/file-field.i18n.d.ts.map +1 -0
  171. package/dist/components/inputs/file-field/file-field.i18n.js +9 -0
  172. package/dist/components/inputs/file-field/file-field.i18n.js.map +1 -0
  173. package/dist/components/inputs/file-field/file-field.js +249 -0
  174. package/dist/components/inputs/file-field/file-field.js.map +1 -0
  175. package/dist/components/inputs/file-field/file-field.styles.d.ts +2 -0
  176. package/dist/components/inputs/file-field/file-field.styles.d.ts.map +1 -0
  177. package/dist/components/inputs/file-field/file-field.styles.js +134 -0
  178. package/dist/components/inputs/file-field/file-field.styles.js.map +1 -0
  179. package/dist/components/inputs/file-field/file-field.template.d.ts +7 -0
  180. package/dist/components/inputs/file-field/file-field.template.d.ts.map +1 -0
  181. package/dist/components/inputs/file-field/file-field.template.js +63 -0
  182. package/dist/components/inputs/file-field/file-field.template.js.map +1 -0
  183. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.d.ts +3 -0
  184. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.d.ts.map +1 -1
  185. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.js +3 -0
  186. package/dist/components/inputs/multi-line-text-field/multi-line-text-field.js.map +1 -1
  187. package/dist/components/inputs/number-field/number-field.d.ts +9 -0
  188. package/dist/components/inputs/number-field/number-field.d.ts.map +1 -1
  189. package/dist/components/inputs/number-field/number-field.js +12 -0
  190. package/dist/components/inputs/number-field/number-field.js.map +1 -1
  191. package/dist/components/inputs/number-field/number-field.template.d.ts.map +1 -1
  192. package/dist/components/inputs/number-field/number-field.template.js +1 -0
  193. package/dist/components/inputs/number-field/number-field.template.js.map +1 -1
  194. package/dist/components/inputs/password-field/password-field.d.ts +9 -0
  195. package/dist/components/inputs/password-field/password-field.d.ts.map +1 -1
  196. package/dist/components/inputs/password-field/password-field.js +12 -0
  197. package/dist/components/inputs/password-field/password-field.js.map +1 -1
  198. package/dist/components/inputs/password-field/password-field.template.d.ts.map +1 -1
  199. package/dist/components/inputs/password-field/password-field.template.js +1 -0
  200. package/dist/components/inputs/password-field/password-field.template.js.map +1 -1
  201. package/dist/components/inputs/radio-button/radio-button.d.ts +13 -0
  202. package/dist/components/inputs/radio-button/radio-button.d.ts.map +1 -1
  203. package/dist/components/inputs/radio-button/radio-button.js +18 -0
  204. package/dist/components/inputs/radio-button/radio-button.js.map +1 -1
  205. package/dist/components/inputs/radio-button/radio-button.styles.d.ts.map +1 -1
  206. package/dist/components/inputs/radio-button/radio-button.styles.js +11 -0
  207. package/dist/components/inputs/radio-button/radio-button.styles.js.map +1 -1
  208. package/dist/components/inputs/radio-button/radio-button.template.d.ts.map +1 -1
  209. package/dist/components/inputs/radio-button/radio-button.template.js +10 -0
  210. package/dist/components/inputs/radio-button/radio-button.template.js.map +1 -1
  211. package/dist/components/inputs/radio-button-field/radio-button-field.d.ts +9 -0
  212. package/dist/components/inputs/radio-button-field/radio-button-field.d.ts.map +1 -1
  213. package/dist/components/inputs/radio-button-field/radio-button-field.js +11 -0
  214. package/dist/components/inputs/radio-button-field/radio-button-field.js.map +1 -1
  215. package/dist/components/inputs/radio-button-group/radio-button-group.d.ts +16 -0
  216. package/dist/components/inputs/radio-button-group/radio-button-group.d.ts.map +1 -1
  217. package/dist/components/inputs/radio-button-group/radio-button-group.js +33 -0
  218. package/dist/components/inputs/radio-button-group/radio-button-group.js.map +1 -1
  219. package/dist/components/inputs/search-field/search-field.d.ts +6 -0
  220. package/dist/components/inputs/search-field/search-field.d.ts.map +1 -1
  221. package/dist/components/inputs/search-field/search-field.js +6 -0
  222. package/dist/components/inputs/search-field/search-field.js.map +1 -1
  223. package/dist/components/inputs/segmented-control/segmented-control.d.ts +16 -0
  224. package/dist/components/inputs/segmented-control/segmented-control.d.ts.map +1 -1
  225. package/dist/components/inputs/segmented-control/segmented-control.js +26 -7
  226. package/dist/components/inputs/segmented-control/segmented-control.js.map +1 -1
  227. package/dist/components/inputs/stepper/stepper.d.ts +17 -0
  228. package/dist/components/inputs/stepper/stepper.d.ts.map +1 -1
  229. package/dist/components/inputs/stepper/stepper.js +22 -0
  230. package/dist/components/inputs/stepper/stepper.js.map +1 -1
  231. package/dist/components/inputs/stepper/stepper.template.js +1 -1
  232. package/dist/components/inputs/stepper/stepper.template.js.map +1 -1
  233. package/dist/components/inputs/switch/switch.d.ts +3 -0
  234. package/dist/components/inputs/switch/switch.d.ts.map +1 -1
  235. package/dist/components/inputs/switch/switch.js +3 -0
  236. package/dist/components/inputs/switch/switch.js.map +1 -1
  237. package/dist/components/inputs/switch-field/switch-field.d.ts +3 -0
  238. package/dist/components/inputs/switch-field/switch-field.d.ts.map +1 -1
  239. package/dist/components/inputs/switch-field/switch-field.js +3 -0
  240. package/dist/components/inputs/switch-field/switch-field.js.map +1 -1
  241. package/dist/components/inputs/text-editor/text-editor.caret.d.ts.map +1 -1
  242. package/dist/components/inputs/text-editor/text-editor.caret.js +7 -1
  243. package/dist/components/inputs/text-editor/text-editor.caret.js.map +1 -1
  244. package/dist/components/inputs/text-editor/text-editor.d.ts +3 -4
  245. package/dist/components/inputs/text-editor/text-editor.d.ts.map +1 -1
  246. package/dist/components/inputs/text-editor/text-editor.js +4 -7
  247. package/dist/components/inputs/text-editor/text-editor.js.map +1 -1
  248. package/dist/components/inputs/text-editor/text-editor.styles.d.ts.map +1 -1
  249. package/dist/components/inputs/text-editor/text-editor.styles.js +1 -9
  250. package/dist/components/inputs/text-editor/text-editor.styles.js.map +1 -1
  251. package/dist/components/inputs/text-field/text-field.d.ts +9 -0
  252. package/dist/components/inputs/text-field/text-field.d.ts.map +1 -1
  253. package/dist/components/inputs/text-field/text-field.js +12 -0
  254. package/dist/components/inputs/text-field/text-field.js.map +1 -1
  255. package/dist/components/inputs/text-field/text-field.template.d.ts.map +1 -1
  256. package/dist/components/inputs/text-field/text-field.template.js +1 -0
  257. package/dist/components/inputs/text-field/text-field.template.js.map +1 -1
  258. package/dist/components/inputs/time-field/time-field.d.ts +6 -0
  259. package/dist/components/inputs/time-field/time-field.d.ts.map +1 -1
  260. package/dist/components/inputs/time-field/time-field.js +11 -0
  261. package/dist/components/inputs/time-field/time-field.js.map +1 -1
  262. package/dist/components/inputs/time-field/time-field.template.js +1 -1
  263. package/dist/components/inputs/time-picker/time-picker.d.ts +3 -0
  264. package/dist/components/inputs/time-picker/time-picker.d.ts.map +1 -1
  265. package/dist/components/inputs/time-picker/time-picker.js +4 -1
  266. package/dist/components/inputs/time-picker/time-picker.js.map +1 -1
  267. package/dist/components/inputs/time-picker/time-picker.styles.d.ts.map +1 -1
  268. package/dist/components/inputs/time-picker/time-picker.styles.js +7 -2
  269. package/dist/components/inputs/time-picker/time-picker.styles.js.map +1 -1
  270. package/dist/components/inputs/toggle-button/toggle-button.d.ts +10 -0
  271. package/dist/components/inputs/toggle-button/toggle-button.d.ts.map +1 -1
  272. package/dist/components/inputs/toggle-button/toggle-button.js +14 -0
  273. package/dist/components/inputs/toggle-button/toggle-button.js.map +1 -1
  274. package/dist/components/inputs/toggle-button-group/toggle-button-group.d.ts +11 -0
  275. package/dist/components/inputs/toggle-button-group/toggle-button-group.d.ts.map +1 -1
  276. package/dist/components/inputs/toggle-button-group/toggle-button-group.js +16 -6
  277. package/dist/components/inputs/toggle-button-group/toggle-button-group.js.map +1 -1
  278. package/dist/components/inputs/token-field/token-field.d.ts +6 -0
  279. package/dist/components/inputs/token-field/token-field.d.ts.map +1 -1
  280. package/dist/components/inputs/token-field/token-field.js +13 -0
  281. package/dist/components/inputs/token-field/token-field.js.map +1 -1
  282. package/dist/components/layout/box/box.d.ts +17 -7
  283. package/dist/components/layout/box/box.d.ts.map +1 -1
  284. package/dist/components/layout/box/box.js +17 -7
  285. package/dist/components/layout/box/box.js.map +1 -1
  286. package/dist/components/layout/box/box.styles.d.ts.map +1 -1
  287. package/dist/components/layout/box/box.styles.js +9 -2
  288. package/dist/components/layout/box/box.styles.js.map +1 -1
  289. package/dist/components/layout/container/container.d.ts +10 -0
  290. package/dist/components/layout/container/container.d.ts.map +1 -1
  291. package/dist/components/layout/container/container.js +38 -0
  292. package/dist/components/layout/container/container.js.map +1 -1
  293. package/dist/components/layout/container/container.styles.d.ts.map +1 -1
  294. package/dist/components/layout/container/container.styles.js +10 -1
  295. package/dist/components/layout/container/container.styles.js.map +1 -1
  296. package/dist/components/layout/page/page.styles.d.ts.map +1 -1
  297. package/dist/components/layout/page/page.styles.js +8 -1
  298. package/dist/components/layout/page/page.styles.js.map +1 -1
  299. package/dist/components/layout/page-sections/hero/hero.d.ts +32 -33
  300. package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
  301. package/dist/components/layout/page-sections/hero/hero.js +32 -33
  302. package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
  303. package/dist/components/layout/page-sections/hero/hero.template.js +1 -1
  304. package/dist/components/layout/page-sections/hero/hero.template.js.map +1 -1
  305. package/dist/components/layout/page-sections/simple-section/simple-section.d.ts +7 -0
  306. package/dist/components/layout/page-sections/simple-section/simple-section.d.ts.map +1 -1
  307. package/dist/components/layout/page-sections/simple-section/simple-section.js +12 -0
  308. package/dist/components/layout/page-sections/simple-section/simple-section.js.map +1 -1
  309. package/dist/components/layout/page-sections/simple-section/simple-section.styles.d.ts.map +1 -1
  310. package/dist/components/layout/page-sections/simple-section/simple-section.styles.js +19 -0
  311. package/dist/components/layout/page-sections/simple-section/simple-section.styles.js.map +1 -1
  312. package/dist/components/layout/popover/popover.d.ts +34 -28
  313. package/dist/components/layout/popover/popover.d.ts.map +1 -1
  314. package/dist/components/layout/popover/popover.js +44 -31
  315. package/dist/components/layout/popover/popover.js.map +1 -1
  316. package/dist/components/layout/sheet/sheet.d.ts +2 -0
  317. package/dist/components/layout/sheet/sheet.d.ts.map +1 -1
  318. package/dist/components/layout/sheet/sheet.js +12 -1
  319. package/dist/components/layout/sheet/sheet.js.map +1 -1
  320. package/dist/components/lists-and-tables/cells/description-cell/description-cell.styles.d.ts.map +1 -1
  321. package/dist/components/lists-and-tables/cells/description-cell/description-cell.styles.js +9 -1
  322. package/dist/components/lists-and-tables/cells/description-cell/description-cell.styles.js.map +1 -1
  323. package/dist/components/lists-and-tables/cells/text-cell/text-cell.styles.d.ts.map +1 -1
  324. package/dist/components/lists-and-tables/cells/text-cell/text-cell.styles.js +9 -1
  325. package/dist/components/lists-and-tables/cells/text-cell/text-cell.styles.js.map +1 -1
  326. package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.d.ts +14 -14
  327. package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.d.ts.map +1 -1
  328. package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.js +13 -13
  329. package/dist/components/lists-and-tables/cells/title-cell/title-cell.styles.d.ts.map +1 -1
  330. package/dist/components/lists-and-tables/cells/title-cell/title-cell.styles.js +13 -2
  331. package/dist/components/lists-and-tables/cells/title-cell/title-cell.styles.js.map +1 -1
  332. package/dist/components/lists-and-tables/list/list.d.ts +8 -11
  333. package/dist/components/lists-and-tables/list/list.d.ts.map +1 -1
  334. package/dist/components/lists-and-tables/list/list.js +8 -10
  335. package/dist/components/lists-and-tables/list/list.js.map +1 -1
  336. package/dist/components/lists-and-tables/list/list.styles.d.ts.map +1 -1
  337. package/dist/components/lists-and-tables/list/list.styles.js +13 -6
  338. package/dist/components/lists-and-tables/list/list.styles.js.map +1 -1
  339. package/dist/components/lists-and-tables/list-item/list-item.d.ts +20 -16
  340. package/dist/components/lists-and-tables/list-item/list-item.d.ts.map +1 -1
  341. package/dist/components/lists-and-tables/list-item/list-item.js +44 -30
  342. package/dist/components/lists-and-tables/list-item/list-item.js.map +1 -1
  343. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js +1 -1
  344. package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js.map +1 -1
  345. package/dist/components/navigation/top-title-bar/top-title-bar.d.ts +15 -0
  346. package/dist/components/navigation/top-title-bar/top-title-bar.d.ts.map +1 -1
  347. package/dist/components/navigation/top-title-bar/top-title-bar.js +44 -1
  348. package/dist/components/navigation/top-title-bar/top-title-bar.js.map +1 -1
  349. package/dist/components/navigation/top-title-bar/top-title-bar.template.d.ts.map +1 -1
  350. package/dist/components/navigation/top-title-bar/top-title-bar.template.js +3 -1
  351. package/dist/components/navigation/top-title-bar/top-title-bar.template.js.map +1 -1
  352. package/dist/components/reflect-non-default-OLaK60rT.js +37 -0
  353. package/dist/components/rolldown-runtime-D7D4PA-g.js +13 -0
  354. package/dist/components/shadow-resets-aG-rgyNQ.js +61 -0
  355. package/dist/components/shell-C61GCsJA.js +223 -0
  356. package/dist/components/status-and-feedback/badge/badge.d.ts +23 -11
  357. package/dist/components/status-and-feedback/badge/badge.d.ts.map +1 -1
  358. package/dist/components/status-and-feedback/badge/badge.js +32 -14
  359. package/dist/components/status-and-feedback/badge/badge.js.map +1 -1
  360. package/dist/components/status-and-feedback/badge/badge.styles.d.ts.map +1 -1
  361. package/dist/components/status-and-feedback/badge/badge.styles.js +59 -2
  362. package/dist/components/status-and-feedback/badge/badge.styles.js.map +1 -1
  363. package/dist/components/status-and-feedback/badge/badge.template.d.ts.map +1 -1
  364. package/dist/components/status-and-feedback/badge/badge.template.js +6 -1
  365. package/dist/components/status-and-feedback/badge/badge.template.js.map +1 -1
  366. package/dist/components/status-and-feedback/banner/banner.styles.d.ts.map +1 -1
  367. package/dist/components/status-and-feedback/banner/banner.styles.js +6 -0
  368. package/dist/components/status-and-feedback/banner/banner.styles.js.map +1 -1
  369. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.d.ts +2 -0
  370. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.d.ts.map +1 -1
  371. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js +14 -1
  372. package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js.map +1 -1
  373. package/dist/components/status-and-feedback/notification/notification-region.d.ts +6 -0
  374. package/dist/components/status-and-feedback/notification/notification-region.d.ts.map +1 -0
  375. package/dist/components/status-and-feedback/notification/notification-region.js +245 -0
  376. package/dist/components/status-and-feedback/notification/notification-region.js.map +1 -0
  377. package/dist/components/status-and-feedback/notification/notification.d.ts +129 -0
  378. package/dist/components/status-and-feedback/notification/notification.d.ts.map +1 -0
  379. package/dist/components/status-and-feedback/notification/notification.i18n.d.ts +6 -0
  380. package/dist/components/status-and-feedback/notification/notification.i18n.d.ts.map +1 -0
  381. package/dist/components/status-and-feedback/notification/notification.i18n.js +5 -0
  382. package/dist/components/status-and-feedback/notification/notification.i18n.js.map +1 -0
  383. package/dist/components/status-and-feedback/notification/notification.js +269 -0
  384. package/dist/components/status-and-feedback/notification/notification.js.map +1 -0
  385. package/dist/components/status-and-feedback/notification/notification.styles.d.ts +2 -0
  386. package/dist/components/status-and-feedback/notification/notification.styles.d.ts.map +1 -0
  387. package/dist/components/status-and-feedback/notification/notification.styles.js +177 -0
  388. package/dist/components/status-and-feedback/notification/notification.styles.js.map +1 -0
  389. package/dist/components/status-and-feedback/notification/notification.template.d.ts +4 -0
  390. package/dist/components/status-and-feedback/notification/notification.template.d.ts.map +1 -0
  391. package/dist/components/status-and-feedback/notification/notification.template.js +40 -0
  392. package/dist/components/status-and-feedback/notification/notification.template.js.map +1 -0
  393. package/dist/components/status-and-feedback/progress-bar/progress-bar.styles.d.ts.map +1 -1
  394. package/dist/components/status-and-feedback/progress-bar/progress-bar.styles.js +1 -0
  395. package/dist/components/status-and-feedback/progress-bar/progress-bar.styles.js.map +1 -1
  396. package/dist/components/status-and-feedback/step-indicator/step-indicator.d.ts +30 -30
  397. package/dist/components/status-and-feedback/step-indicator/step-indicator.d.ts.map +1 -1
  398. package/dist/components/status-and-feedback/step-indicator/step-indicator.js +33 -30
  399. package/dist/components/status-and-feedback/step-indicator/step-indicator.js.map +1 -1
  400. package/dist/components/toml-C2HBbPgG.js +59 -0
  401. package/dist/components/visibility-mixin-GxbwkBb1.js +104 -0
  402. package/dist/components/with-translations-DzAdFTK8.js +48 -0
  403. package/dist/css/variables.css +24 -0
  404. package/dist/nldd.min.js +10763 -9942
  405. package/dist/types/vue.d.ts +270 -153
  406. package/dist/utilities/implicit-submission.d.ts +31 -0
  407. package/dist/utilities/implicit-submission.d.ts.map +1 -0
  408. package/dist/utilities/implicit-submission.js +65 -0
  409. package/dist/utilities/implicit-submission.js.map +1 -0
  410. package/dist/utilities/open-when-rendered.d.ts +21 -0
  411. package/dist/utilities/open-when-rendered.d.ts.map +1 -0
  412. package/dist/utilities/open-when-rendered.js +30 -0
  413. package/dist/utilities/open-when-rendered.js.map +1 -0
  414. package/dist/utilities/owned-attribute.d.ts +19 -0
  415. package/dist/utilities/owned-attribute.d.ts.map +1 -0
  416. package/dist/utilities/owned-attribute.js +32 -0
  417. package/dist/utilities/owned-attribute.js.map +1 -0
  418. package/dist/utilities/reflect-non-default.d.ts +3 -3
  419. package/dist/utilities/reflect-non-default.d.ts.map +1 -1
  420. package/dist/utilities/reflect-non-default.js +7 -4
  421. package/dist/utilities/reflect-non-default.js.map +1 -1
  422. package/dist/utilities/visibility-mixin.d.ts +5 -0
  423. package/dist/utilities/visibility-mixin.d.ts.map +1 -1
  424. package/dist/utilities/visibility-mixin.js +22 -0
  425. package/dist/utilities/visibility-mixin.js.map +1 -1
  426. package/package.json +34 -23
  427. package/dist/components/content/byline/byline.d.ts +0 -73
  428. package/dist/components/content/byline/byline.d.ts.map +0 -1
  429. package/dist/components/content/byline/byline.js +0 -125
  430. package/dist/components/content/byline/byline.js.map +0 -1
  431. package/dist/components/content/byline/byline.styles.d.ts +0 -2
  432. package/dist/components/content/byline/byline.styles.d.ts.map +0 -1
  433. package/dist/components/content/byline/byline.styles.js.map +0 -1
  434. package/dist/components/content/byline/byline.template.d.ts +0 -3
  435. package/dist/components/content/byline/byline.template.d.ts.map +0 -1
  436. package/dist/components/content/byline/byline.template.js.map +0 -1
  437. package/dist/components/gherkin-DhZlEZiy.js +0 -115
  438. package/dist/components/index--8_4HvE9.js +0 -688
  439. package/dist/components/index-BMeSmtdw.js +0 -384
  440. package/dist/components/index-Bonuul3m.js +0 -73466
  441. package/dist/components/index-CdOU-HVN.js +0 -81
  442. package/dist/components/index-CqhFJR7l.js +0 -703
  443. package/dist/components/index-CwmDMN6X.js +0 -177
  444. package/dist/components/index-yX0V7C44.js +0 -405
  445. package/dist/components/shell-BlsXDxCn.js +0 -222
  446. package/dist/components/toml-BOuWGMcf.js +0 -76
@@ -0,0 +1,115 @@
1
+ /**
2
+ * Nederlandse Digitale Dienst File Field Component (Lit + TypeScript)
3
+ *
4
+ * A file picker that reads as one control: an nldd-button flush in the corner of
5
+ * a tinted surface, the chosen file next to it, and a dismiss button to clear it
6
+ * again. It wraps a hidden native `<input type="file">`, which is what makes the
7
+ * picker open at all — a file dialog only opens from a user gesture on a real
8
+ * input.
9
+ *
10
+ * The surface deliberately does not look like an input field. A border with
11
+ * field semantics promises you can type into it; here you can only press a
12
+ * button, so it uses button and surface colors instead of
13
+ * `--semantics-input-fields-*`. The button keeps its own tinted background and
14
+ * therefore sits a shade darker in the surface, which is what marks it as the
15
+ * thing to press.
16
+ *
17
+ * Several files are summarized, not listed: "3 bestanden" with a single cross
18
+ * that clears all of them. Every pick replaces the whole FileList, and rebuilding
19
+ * it to add or drop one file means going through DataTransfer, which does not
20
+ * deduplicate (even the same File object twice yields two entries) — and a File
21
+ * has no id, so deduplicating would come down to guessing from name, size and
22
+ * last-modified. A list with a cross per file would promise an edit the platform
23
+ * does not support. A page that does want to show the files renders its own list
24
+ * from the `File[]` in the change event.
25
+ *
26
+ * @element nldd-file-field
27
+ * @attr {string} size - Field size: 'md' (default) | 'sm'. Set automatically by nldd-form-field.
28
+ * @attr {string} accept - Comma-separated list of accepted file types, forwarded to the input (e.g. ".pdf,image/*")
29
+ * @attr {boolean} multiple - Allows choosing more than one file
30
+ * @attr {string} accessible-label - Accessible label forwarded to the inner input. Set automatically by nldd-form-field.
31
+ * @attr {string} input-id - Sets the id on the native input. Set automatically by nldd-form-field.
32
+ * @attr {string} error-message-ids - Ids for aria-describedby on the inner input. Set automatically by nldd-form-field.
33
+ * @attr {boolean} valid - Marks the field as valid; shows a check icon on the right, like nldd-dropdown
34
+ * @attr {boolean} invalid - Marks the field as invalid; shows an alert icon on the right, like nldd-dropdown
35
+ * @attr {boolean} disabled - Disabled state
36
+ * @attr {string} name - Name for form submission
37
+ * @attr {boolean} required - Marks the field required (invalid while no file is chosen)
38
+ * @attr {object} translations - Override translation keys; unset keys fall back to Dutch
39
+ *
40
+ * @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.
41
+ *
42
+ * @fires change - When the chosen files change, including a clear; detail: { files: File[] }
43
+ */
44
+ import { LitElement, type PropertyValues } from 'lit';
45
+ import { type FormValue } from '../../../utilities/form-associated-mixin.js';
46
+ import { type NLDDFileFieldTranslations } from './file-field.i18n.js';
47
+ declare const NLDDFileField_base: typeof LitElement & (abstract new (...args: any[]) => LitElement & import("../../../utilities/form-associated-mixin.js").FormAssociatedElement);
48
+ export declare class NLDDFileField extends NLDDFileField_base {
49
+ static styles: import("lit").CSSResult;
50
+ /** Says this is the control an nldd-form-field is about, so the field can
51
+ * find it, name it and move focus into it. See nldd-form-field. */
52
+ static isFormInput: boolean;
53
+ size: 'md' | 'sm';
54
+ accept: string;
55
+ multiple: boolean;
56
+ /** Accessible label forwarded to the inner <input>. Set automatically by nldd-form-field. */
57
+ accessibleLabel: string;
58
+ inputId: string;
59
+ errorMessageIds: string;
60
+ valid: boolean;
61
+ invalid: boolean;
62
+ disabled: boolean;
63
+ name: string;
64
+ required: boolean;
65
+ translations: Partial<NLDDFileFieldTranslations>;
66
+ /** The chosen files. Mirrors the input's FileList; there is no setter, because
67
+ * browsers refuse a programmatic file selection. */
68
+ private _files;
69
+ get files(): File[];
70
+ private _input;
71
+ /** @internal */
72
+ _t(key: keyof NLDDFileFieldTranslations, vars?: Record<string, string | number>): string;
73
+ /** @internal */
74
+ _chooseLabel(): string;
75
+ /**
76
+ * The native input carries the field's label but is hidden, so it is not in
77
+ * the accessibility tree. The button is what you tab to, and on its own it
78
+ * only says "choose a file" — for which field is the part that matters.
79
+ *
80
+ * @internal
81
+ */
82
+ _chooseAccessibleLabel(): string;
83
+ /** @internal */
84
+ _valueLabel(): string;
85
+ willUpdate(changed: PropertyValues): void;
86
+ /** @internal */
87
+ _handleChoose(): void;
88
+ /** @internal */
89
+ _handleInputChange(e: Event): void;
90
+ /** @internal */
91
+ _handleClear(): void;
92
+ private _commit;
93
+ /** Submit one entry per file under `name`, the way a native multiple file
94
+ * input does. A single file is submitted as itself, so a form with one file
95
+ * reads back as a File rather than as FormData wrapping one. */
96
+ formValue(): FormValue;
97
+ commitFormValue(): void;
98
+ /** A required field without a file is invalid (valueMissing). */
99
+ private _updateValidity;
100
+ formResetCallback(): void;
101
+ /**
102
+ * Delegates focus to the choose button rather than the hidden input: an input
103
+ * that is `display: none` cannot take focus, and the button is what a user
104
+ * sees as the control.
105
+ */
106
+ focus(options?: FocusOptions): void;
107
+ render(): import("lit-html").TemplateResult;
108
+ }
109
+ declare global {
110
+ interface HTMLElementTagNameMap {
111
+ 'nldd-file-field': NLDDFileField;
112
+ }
113
+ }
114
+ export {};
115
+ //# sourceMappingURL=file-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-field.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/file-field/file-field.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;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AC,OAAO;IAYf;;qEAEiE;IACxD,SAAS,IAAI,SAAS;IAQtB,eAAe,IAAI,IAAI;IAKhC,iEAAiE;IACjE,OAAO,CAAC,eAAe;IAYvB,iBAAiB,IAAI,IAAI;IAMzB;;;;OAIG;IACM,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI;IAKnC,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,iBAAiB,EAAE,aAAa,CAAC;KACjC;CACD"}
@@ -0,0 +1,10 @@
1
+ export declare const nlddFileFieldTranslations: {
2
+ 'components.file-field.to-choose-file-action': string;
3
+ 'components.file-field.to-choose-files-action': string;
4
+ 'components.file-field.no-file-chosen-text': string;
5
+ 'components.file-field.file-count-text': string;
6
+ 'components.file-field.clear-action': string;
7
+ 'components.file-field.required-error-text': string;
8
+ };
9
+ export type NLDDFileFieldTranslations = typeof nlddFileFieldTranslations;
10
+ //# sourceMappingURL=file-field.i18n.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-field.i18n.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/file-field/file-field.i18n.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB;;;;;;;CAOrC,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAC"}
@@ -0,0 +1,9 @@
1
+ export const nlddFileFieldTranslations = {
2
+ 'components.file-field.to-choose-file-action': 'Bestand kiezen',
3
+ 'components.file-field.to-choose-files-action': 'Bestanden kiezen',
4
+ 'components.file-field.no-file-chosen-text': 'Geen bestand gekozen',
5
+ 'components.file-field.file-count-text': '{count} bestanden',
6
+ 'components.file-field.clear-action': 'Wis selectie',
7
+ 'components.file-field.required-error-text': 'Kies een bestand',
8
+ };
9
+ //# sourceMappingURL=file-field.i18n.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-field.i18n.js","sourceRoot":"","sources":["../../../../src/components/inputs/file-field/file-field.i18n.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACxC,6CAA6C,EAAE,gBAAgB;IAC/D,8CAA8C,EAAE,kBAAkB;IAClE,2CAA2C,EAAE,sBAAsB;IACnE,uCAAuC,EAAE,mBAAmB;IAC5D,oCAAoC,EAAE,cAAc;IACpD,2CAA2C,EAAE,kBAAkB;CAC/D,CAAC"}
@@ -0,0 +1,249 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ /**
8
+ * Nederlandse Digitale Dienst File Field Component (Lit + TypeScript)
9
+ *
10
+ * A file picker that reads as one control: an nldd-button flush in the corner of
11
+ * a tinted surface, the chosen file next to it, and a dismiss button to clear it
12
+ * again. It wraps a hidden native `<input type="file">`, which is what makes the
13
+ * picker open at all — a file dialog only opens from a user gesture on a real
14
+ * input.
15
+ *
16
+ * The surface deliberately does not look like an input field. A border with
17
+ * field semantics promises you can type into it; here you can only press a
18
+ * button, so it uses button and surface colors instead of
19
+ * `--semantics-input-fields-*`. The button keeps its own tinted background and
20
+ * therefore sits a shade darker in the surface, which is what marks it as the
21
+ * thing to press.
22
+ *
23
+ * Several files are summarized, not listed: "3 bestanden" with a single cross
24
+ * that clears all of them. Every pick replaces the whole FileList, and rebuilding
25
+ * it to add or drop one file means going through DataTransfer, which does not
26
+ * deduplicate (even the same File object twice yields two entries) — and a File
27
+ * has no id, so deduplicating would come down to guessing from name, size and
28
+ * last-modified. A list with a cross per file would promise an edit the platform
29
+ * does not support. A page that does want to show the files renders its own list
30
+ * from the `File[]` in the change event.
31
+ *
32
+ * @element nldd-file-field
33
+ * @attr {string} size - Field size: 'md' (default) | 'sm'. Set automatically by nldd-form-field.
34
+ * @attr {string} accept - Comma-separated list of accepted file types, forwarded to the input (e.g. ".pdf,image/*")
35
+ * @attr {boolean} multiple - Allows choosing more than one file
36
+ * @attr {string} accessible-label - Accessible label forwarded to the inner input. Set automatically by nldd-form-field.
37
+ * @attr {string} input-id - Sets the id on the native input. Set automatically by nldd-form-field.
38
+ * @attr {string} error-message-ids - Ids for aria-describedby on the inner input. Set automatically by nldd-form-field.
39
+ * @attr {boolean} valid - Marks the field as valid; shows a check icon on the right, like nldd-dropdown
40
+ * @attr {boolean} invalid - Marks the field as invalid; shows an alert icon on the right, like nldd-dropdown
41
+ * @attr {boolean} disabled - Disabled state
42
+ * @attr {string} name - Name for form submission
43
+ * @attr {boolean} required - Marks the field required (invalid while no file is chosen)
44
+ * @attr {object} translations - Override translation keys; unset keys fall back to Dutch
45
+ *
46
+ * @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.
47
+ *
48
+ * @fires change - When the chosen files change, including a clear; detail: { files: File[] }
49
+ */
50
+ import { LitElement } from 'lit';
51
+ import { customElement, property, query, state } from 'lit/decorators.js';
52
+ import { FormAssociated } from '../../../utilities/form-associated-mixin.js';
53
+ import { reflectNonDefault } from '../../../utilities/reflect-non-default.js';
54
+ import { fileFieldStyles } from './file-field.styles.js';
55
+ import { fileFieldTemplate } from './file-field.template.js';
56
+ import { nlddFileFieldTranslations } from './file-field.i18n.js';
57
+ let NLDDFileField = class NLDDFileField extends FormAssociated(LitElement) {
58
+ constructor() {
59
+ super(...arguments);
60
+ // Property order matches the story controls.
61
+ this.size = 'md';
62
+ this.accept = '';
63
+ this.multiple = false;
64
+ /** Accessible label forwarded to the inner <input>. Set automatically by nldd-form-field. */
65
+ this.accessibleLabel = '';
66
+ this.inputId = '';
67
+ this.errorMessageIds = '';
68
+ this.valid = false;
69
+ this.invalid = false;
70
+ this.disabled = false;
71
+ this.name = '';
72
+ this.required = false;
73
+ this.translations = {};
74
+ /** The chosen files. Mirrors the input's FileList; there is no setter, because
75
+ * browsers refuse a programmatic file selection. */
76
+ this._files = [];
77
+ }
78
+ get files() {
79
+ return this._files;
80
+ }
81
+ /** @internal */
82
+ _t(key, vars) {
83
+ let text = this.translations[key] ?? nlddFileFieldTranslations[key];
84
+ if (vars) {
85
+ for (const [name, value] of Object.entries(vars)) {
86
+ text = text.split(`{${name}}`).join(String(value));
87
+ }
88
+ }
89
+ return text;
90
+ }
91
+ /** @internal */
92
+ _chooseLabel() {
93
+ return this.multiple
94
+ ? this._t('components.file-field.to-choose-files-action')
95
+ : this._t('components.file-field.to-choose-file-action');
96
+ }
97
+ /**
98
+ * The native input carries the field's label but is hidden, so it is not in
99
+ * the accessibility tree. The button is what you tab to, and on its own it
100
+ * only says "choose a file" — for which field is the part that matters.
101
+ *
102
+ * @internal
103
+ */
104
+ _chooseAccessibleLabel() {
105
+ if (!this.accessibleLabel)
106
+ return '';
107
+ return `${this._chooseLabel()}, ${this.accessibleLabel}`;
108
+ }
109
+ /** @internal */
110
+ _valueLabel() {
111
+ if (this._files.length === 0)
112
+ return this._t('components.file-field.no-file-chosen-text');
113
+ if (this._files.length === 1)
114
+ return this._files[0].name;
115
+ return this._t('components.file-field.file-count-text', { count: this._files.length });
116
+ }
117
+ willUpdate(changed) {
118
+ if (changed.has('required'))
119
+ this._updateValidity();
120
+ if (changed.has('accessibleLabel'))
121
+ this.internals.ariaLabel = this.accessibleLabel || null;
122
+ }
123
+ /** @internal */
124
+ _handleChoose() {
125
+ this._input?.click();
126
+ }
127
+ /** @internal */
128
+ _handleInputChange(e) {
129
+ e.stopPropagation();
130
+ const input = e.target;
131
+ this._files = input.files ? Array.from(input.files) : [];
132
+ this._commit();
133
+ }
134
+ /** @internal */
135
+ _handleClear() {
136
+ // Clearing the input as well as the array: the element keeps the previous
137
+ // FileList otherwise, so choosing the same file again would fire no change.
138
+ if (this._input)
139
+ this._input.value = '';
140
+ this._files = [];
141
+ this._commit();
142
+ // Focus would land on the body when the cross unmounts with the last file.
143
+ void this.updateComplete.then(() => this.focus());
144
+ }
145
+ _commit() {
146
+ this.commitFormValue();
147
+ this.dispatchEvent(new CustomEvent('change', {
148
+ detail: { files: this._files },
149
+ bubbles: true,
150
+ composed: true,
151
+ }));
152
+ }
153
+ // — Form participation ————————————————————————————————————————————————————
154
+ /** Submit one entry per file under `name`, the way a native multiple file
155
+ * input does. A single file is submitted as itself, so a form with one file
156
+ * reads back as a File rather than as FormData wrapping one. */
157
+ formValue() {
158
+ if (!this.name || this._files.length === 0)
159
+ return null;
160
+ if (this._files.length === 1)
161
+ return this._files[0];
162
+ const data = new FormData();
163
+ for (const file of this._files)
164
+ data.append(this.name, file);
165
+ return data;
166
+ }
167
+ commitFormValue() {
168
+ super.commitFormValue();
169
+ this._updateValidity();
170
+ }
171
+ /** A required field without a file is invalid (valueMissing). */
172
+ _updateValidity() {
173
+ if (this.required && this._files.length === 0) {
174
+ this.internals.setValidity({ valueMissing: true }, this._t('components.file-field.required-error-text'), this._input ?? this);
175
+ }
176
+ else {
177
+ this.internals.setValidity({});
178
+ }
179
+ }
180
+ formResetCallback() {
181
+ if (this._input)
182
+ this._input.value = '';
183
+ this._files = [];
184
+ this.commitFormValue();
185
+ }
186
+ /**
187
+ * Delegates focus to the choose button rather than the hidden input: an input
188
+ * that is `display: none` cannot take focus, and the button is what a user
189
+ * sees as the control.
190
+ */
191
+ focus(options) {
192
+ const button = this.shadowRoot?.querySelector('nldd-button');
193
+ button?.focus(options);
194
+ }
195
+ render() {
196
+ return fileFieldTemplate(this);
197
+ }
198
+ };
199
+ NLDDFileField.styles = fileFieldStyles;
200
+ /** Says this is the control an nldd-form-field is about, so the field can
201
+ * find it, name it and move focus into it. See nldd-form-field. */
202
+ NLDDFileField.isFormInput = true;
203
+ __decorate([
204
+ property({ reflect: true, converter: reflectNonDefault('md') })
205
+ ], NLDDFileField.prototype, "size", void 0);
206
+ __decorate([
207
+ property({ type: String, reflect: true })
208
+ ], NLDDFileField.prototype, "accept", void 0);
209
+ __decorate([
210
+ property({ type: Boolean, reflect: true })
211
+ ], NLDDFileField.prototype, "multiple", void 0);
212
+ __decorate([
213
+ property({ type: String, attribute: 'accessible-label' })
214
+ ], NLDDFileField.prototype, "accessibleLabel", void 0);
215
+ __decorate([
216
+ property({ type: String, attribute: 'input-id' })
217
+ ], NLDDFileField.prototype, "inputId", void 0);
218
+ __decorate([
219
+ property({ type: String, attribute: 'error-message-ids' })
220
+ ], NLDDFileField.prototype, "errorMessageIds", void 0);
221
+ __decorate([
222
+ property({ type: Boolean, reflect: true })
223
+ ], NLDDFileField.prototype, "valid", void 0);
224
+ __decorate([
225
+ property({ type: Boolean, reflect: true })
226
+ ], NLDDFileField.prototype, "invalid", void 0);
227
+ __decorate([
228
+ property({ type: Boolean, reflect: true })
229
+ ], NLDDFileField.prototype, "disabled", void 0);
230
+ __decorate([
231
+ property({ type: String, reflect: true })
232
+ ], NLDDFileField.prototype, "name", void 0);
233
+ __decorate([
234
+ property({ type: Boolean, reflect: true })
235
+ ], NLDDFileField.prototype, "required", void 0);
236
+ __decorate([
237
+ property({ type: Object })
238
+ ], NLDDFileField.prototype, "translations", void 0);
239
+ __decorate([
240
+ state()
241
+ ], NLDDFileField.prototype, "_files", void 0);
242
+ __decorate([
243
+ query('.file-field__input')
244
+ ], NLDDFileField.prototype, "_input", void 0);
245
+ NLDDFileField = __decorate([
246
+ customElement('nldd-file-field')
247
+ ], NLDDFileField);
248
+ export { NLDDFileField };
249
+ //# sourceMappingURL=file-field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-field.js","sourceRoot":"","sources":["../../../../src/components/inputs/file-field/file-field.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,OAAO,EAAE,UAAU,EAAuB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a,CAAC,iBAAiB,CAAC;GACpB,aAAa,CAwLzB"}
@@ -0,0 +1,2 @@
1
+ export declare const fileFieldStyles: import("lit").CSSResult;
2
+ //# sourceMappingURL=file-field.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-field.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/file-field/file-field.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe,yBAkI3B,CAAC"}
@@ -0,0 +1,134 @@
1
+ import { css } from 'lit';
2
+ import { inheritedTextReset } from '../../../assets/styles/shadow-resets.js';
3
+ export const fileFieldStyles = css `
4
+ :host {
5
+ box-sizing: border-box;
6
+ }
7
+
8
+
9
+ /* # Host */
10
+
11
+ :host {
12
+ --_width: 100%;
13
+ --_corner-radius: var(--semantics-controls-md-corner-radius);
14
+ --_min-size: var(--semantics-controls-md-min-size);
15
+ --_inline-padding: var(--semantics-controls-md-inline-padding);
16
+ --_value-color: var(--components-file-field-value-color);
17
+ --_text-font: var(--semantics-input-fields-md-text-font);
18
+ --_clear-button-padding-right: calc((var(--_min-size) - var(--semantics-controls-sm-min-size)) / 2);
19
+ --_validation-icon-area-padding-right: var(--_inline-padding);
20
+ --_validation-icon-size: var(--semantics-input-fields-md-validation-icon-size);
21
+
22
+ ${inheritedTextReset}
23
+ display: block;
24
+ width: var(--_width);
25
+ max-width: 100%;
26
+ min-width: 0;
27
+ -webkit-tap-highlight-color: transparent;
28
+ }
29
+
30
+ :host([hidden]) {
31
+ display: none;
32
+ }
33
+
34
+ :host([disabled]) {
35
+ opacity: var(--primitives-opacity-disabled);
36
+ pointer-events: none;
37
+ }
38
+
39
+ :host([size="sm"]) {
40
+ --_corner-radius: var(--semantics-controls-sm-corner-radius);
41
+ --_min-size: var(--semantics-controls-sm-min-size);
42
+ --_inline-padding: var(--semantics-controls-sm-inline-padding);
43
+ --_text-font: var(--semantics-input-fields-sm-text-font);
44
+ --_clear-button-padding-right: calc((var(--_min-size) - var(--semantics-controls-xs-min-size)) / 2);
45
+ --_validation-icon-size: var(--semantics-input-fields-sm-validation-icon-size);
46
+ }
47
+
48
+
49
+ /* # Block */
50
+
51
+ .file-field {
52
+ box-sizing: border-box;
53
+ display: flex;
54
+ border-radius: var(--_corner-radius);
55
+ box-shadow: inset 0 0 0 var(--components-file-field-highlight-border-width) var(--components-file-field-highlight-border-color);
56
+ background-color: var(--components-file-field-background-color);
57
+ width: 100%;
58
+ min-width: 0;
59
+ min-height: var(--_min-size);
60
+ align-items: center;
61
+ }
62
+
63
+
64
+ /* # Elements */
65
+
66
+ .file-field__input {
67
+ display: none;
68
+ }
69
+
70
+ .file-field__choose-button {
71
+ display: flex;
72
+ flex-shrink: 0;
73
+ align-self: stretch;
74
+ }
75
+
76
+ .file-field__value {
77
+ box-sizing: border-box;
78
+ min-width: 0;
79
+ padding-right: var(--_inline-padding);
80
+ padding-left: var(--_inline-padding);
81
+ flex-grow: 1;
82
+ color: var(--_value-color);
83
+ font: var(--_text-font);
84
+ text-overflow: ellipsis;
85
+ white-space: nowrap;
86
+ overflow: hidden;
87
+ }
88
+
89
+ .file-field__value.is-empty {
90
+ --_value-color: var(--components-file-field-is-empty-value-color);
91
+ }
92
+
93
+ .file-field__clear-button {
94
+ display: flex;
95
+ flex-shrink: 0;
96
+ padding-right: var(--_clear-button-padding-right);
97
+ }
98
+
99
+ .file-field__clear-button:not(:last-child) {
100
+ padding-right: var(--primitives-space-0);
101
+ }
102
+
103
+ .file-field__validation-icon-area {
104
+ display: flex;
105
+ height: 100%;
106
+ flex-shrink: 0;
107
+ padding-right: var(--_validation-icon-area-padding-right);
108
+ align-items: center;
109
+ justify-content: center;
110
+ }
111
+
112
+ :host([valid]) .file-field__validation-icon-area {
113
+ color: var(--semantics-input-fields-is-valid-icon-color);
114
+ }
115
+
116
+ :host([invalid]) .file-field__validation-icon-area {
117
+ color: var(--semantics-input-fields-is-invalid-icon-color);
118
+ }
119
+
120
+ .file-field__validation-icon {
121
+ width: var(--_validation-icon-size);
122
+ height: var(--_validation-icon-size);
123
+ }
124
+
125
+
126
+ /* # High contrast */
127
+
128
+ @media (forced-colors: active) {
129
+ .file-field {
130
+ border: var(--components-file-field-highlight-border-width) solid CanvasText;
131
+ }
132
+ }
133
+ `;
134
+ //# sourceMappingURL=file-field.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-field.styles.js","sourceRoot":"","sources":["../../../../src/components/inputs/file-field/file-field.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;IAmB9B,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+GrB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { TemplateResult } from 'lit';
2
+ import type { NLDDFileField } from './file-field.js';
3
+ import '../../actions/button/button.js';
4
+ import '../../actions/icon-button/icon-button.js';
5
+ import '../../content/icon/icon.js';
6
+ export declare function fileFieldTemplate(component: NLDDFileField): TemplateResult;
7
+ //# sourceMappingURL=file-field.template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-field.template.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/file-field/file-field.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAE,MAAM,KAAK,CAAC;AAEpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,gCAAgC,CAAC;AACxC,OAAO,0CAA0C,CAAC;AAClD,OAAO,4BAA4B,CAAC;AAepC,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,aAAa,GAAG,cAAc,CA6C1E"}
@@ -0,0 +1,63 @@
1
+ import { html, nothing } from 'lit';
2
+ import { classMap } from 'lit/directives/class-map.js';
3
+ import '../../actions/button/button.js';
4
+ import '../../actions/icon-button/icon-button.js';
5
+ import '../../content/icon/icon.js';
6
+ function renderValidationIcon(component) {
7
+ if (!component.invalid && !component.valid)
8
+ return nothing;
9
+ return html `
10
+ <div class="file-field__validation-icon-area">
11
+ <nldd-icon class="file-field__validation-icon"
12
+ name=${component.invalid ? 'invalid' : 'valid'}
13
+ aria-hidden="true"
14
+ ></nldd-icon>
15
+ </div>
16
+ `;
17
+ }
18
+ export function fileFieldTemplate(component) {
19
+ const buttonSize = component.size === 'sm' ? 'xs' : 'sm';
20
+ const hasFiles = component.files.length > 0;
21
+ return html `
22
+ <div class="file-field">
23
+ <input class="file-field__input"
24
+ type="file"
25
+ id=${component.inputId || nothing}
26
+ accept=${component.accept || nothing}
27
+ ?multiple=${component.multiple}
28
+ ?disabled=${component.disabled}
29
+ ?required=${component.required}
30
+ aria-label=${component.accessibleLabel || nothing}
31
+ aria-describedby=${component.errorMessageIds || nothing}
32
+ @change=${component._handleInputChange}
33
+ >
34
+ <div class="file-field__choose-button">
35
+ <nldd-button
36
+ variant="neutral-tinted"
37
+ size=${component.size}
38
+ text=${component._chooseLabel()}
39
+ accessible-label=${component._chooseAccessibleLabel() || nothing}
40
+ ?disabled=${component.disabled}
41
+ @click=${component._handleChoose}
42
+ ></nldd-button>
43
+ </div>
44
+ <span class=${classMap({ 'file-field__value': true, 'is-empty': !hasFiles })}>
45
+ ${component._valueLabel()}
46
+ </span>
47
+ ${hasFiles ? html `
48
+ <div class="file-field__clear-button">
49
+ <nldd-icon-button
50
+ variant="neutral-transparent"
51
+ size=${buttonSize}
52
+ icon="dismiss"
53
+ text=${component._t('components.file-field.clear-action')}
54
+ ?disabled=${component.disabled}
55
+ @click=${component._handleClear}
56
+ ></nldd-icon-button>
57
+ </div>
58
+ ` : nothing}
59
+ ${renderValidationIcon(component)}
60
+ </div>
61
+ `;
62
+ }
63
+ //# sourceMappingURL=file-field.template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-field.template.js","sourceRoot":"","sources":["../../../../src/components/inputs/file-field/file-field.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,OAAO,gCAAgC,CAAC;AACxC,OAAO,0CAA0C,CAAC;AAClD,OAAO,4BAA4B,CAAC;AAEpC,SAAS,oBAAoB,CAAC,SAAwB;IACrD,IAAI,CAAC,SAAS,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK;QAAE,OAAO,OAAO,CAAC;IAE3D,OAAO,IAAI,CAAA;;;WAGD,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO;;;;EAIhD,CAAC;AACH,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,SAAwB;IACzD,MAAM,UAAU,GAAG,SAAS,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IACzD,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IAE5C,OAAO,IAAI,CAAA;;;;SAIH,SAAS,CAAC,OAAO,IAAI,OAAO;aACxB,SAAS,CAAC,MAAM,IAAI,OAAO;gBACxB,SAAS,CAAC,QAAQ;gBAClB,SAAS,CAAC,QAAQ;gBAClB,SAAS,CAAC,QAAQ;iBACjB,SAAS,CAAC,eAAe,IAAI,OAAO;uBAC9B,SAAS,CAAC,eAAe,IAAI,OAAO;cAC7C,SAAS,CAAC,kBAAkB;;;;;YAK9B,SAAS,CAAC,IAAI;YACd,SAAS,CAAC,YAAY,EAAE;wBACZ,SAAS,CAAC,sBAAsB,EAAE,IAAI,OAAO;iBACpD,SAAS,CAAC,QAAQ;cACrB,SAAS,CAAC,aAAa;;;iBAGpB,QAAQ,CAAC,EAAE,mBAAmB,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,QAAQ,EAAE,CAAC;MACzE,SAAS,CAAC,WAAW,EAAE;;KAExB,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAA;;;;aAIP,UAAU;;aAEV,SAAS,CAAC,EAAE,CAAC,oCAAoC,CAAC;kBAC7C,SAAS,CAAC,QAAQ;eACrB,SAAS,CAAC,YAAY;;;IAGjC,CAAC,CAAC,CAAC,OAAO;KACT,oBAAoB,CAAC,SAAS,CAAC;;EAElC,CAAC;AACH,CAAC"}
@@ -38,6 +38,9 @@ export declare class NLDDMultiLineTextField extends NLDDMultiLineTextField_base
38
38
  slotAssignment?: SlotAssignmentMode;
39
39
  };
40
40
  static styles: import("lit").CSSResult;
41
+ /** Says this is the control an nldd-form-field is about, so the field can
42
+ * find it, name it and move focus into it. See nldd-form-field. */
43
+ static isFormInput: boolean;
41
44
  private _initialValue;
42
45
  size: 'md' | 'sm';
43
46
  value: string;
@@ -1 +1 @@
1
- {"version":3,"file":"multi-line-text-field.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/multi-line-text-field/multi-line-text-field.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAEtD,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,6CAA6C,CAAC;AAK7F,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC;;AAEtD,qBACa,sBAAuB,SAAQ,2BAA0B;IAErE,OAAgB,iBAAiB;;;;;;;MAG/B;IAEF,OAAgB,MAAM,0BAA4B;IAGlD,OAAO,CAAC,aAAa,CAAM;IAG3B,IAAI,EAAE,IAAI,GAAG,IAAI,CAAQ;IAGzB,KAAK,SAAM;IAGX,OAAO,SAAM;IAGb,WAAW,SAAM;IAGjB,OAAO,UAAS;IAGhB,KAAK,UAAS;IAGd,QAAQ,UAAS;IAGjB,IAAI,SAAM;IAGV,QAAQ,UAAS;IAGjB,QAAQ,UAAS;IAGjB,YAAY,SAAM;IAGlB,IAAI,SAAK;IAGT,MAAM,EAAE,UAAU,CAAU;IAE5B,gGAAgG;IAEhG,eAAe,SAAM;IAGrB,eAAe,SAAM;IAGrB,YAAY,UAAS;IAErB,oGAAoG;IAEpG,KAAK,SAAM;IAIX,OAAO,CAAC,SAAS,CAAuB;IAE/B,YAAY,IAAI,IAAI;IAOpB,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAuBtC,SAAS,IAAI,SAAS;IAI/B,iBAAiB,IAAI,IAAI;IAKzB,wBAAwB,CAAC,KAAK,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,IAAI,GAAG,IAAI;IAI/D,YAAY,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI;IAY5B,aAAa,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI;IAY3B,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,4BAA4B,EAAE,sBAAsB,CAAC;KACrD;CACD"}
1
+ {"version":3,"file":"multi-line-text-field.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/multi-line-text-field/multi-line-text-field.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAEtD,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,6CAA6C,CAAC;AAK7F,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC;;AAEtD,qBACa,sBAAuB,SAAQ,2BAA0B;IAErE,OAAgB,iBAAiB;;;;;;;MAG/B;IAEF,OAAgB,MAAM,0BAA4B;IAElD;wEACoE;IACpE,MAAM,CAAC,WAAW,UAAQ;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