@duetds/components 4.32.0 → 4.33.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 (350) hide show
  1. package/hydrate/index.js +1933 -87
  2. package/lib/cjs/{dom-a28e5c5f.js → dom-c850c8d7.js} +1 -1
  3. package/lib/cjs/duet-alert.cjs.entry.js +2 -2
  4. package/lib/cjs/duet-badge.cjs.entry.js +1 -1
  5. package/lib/cjs/duet-button_2.cjs.entry.js +4 -4
  6. package/lib/cjs/duet-caption_4.cjs.entry.js +17 -10
  7. package/lib/cjs/duet-card.cjs.entry.js +3 -3
  8. package/lib/cjs/duet-checkbox.cjs.entry.js +2 -2
  9. package/lib/cjs/duet-choice_2.cjs.entry.js +40 -18
  10. package/lib/cjs/duet-collapsible.cjs.entry.js +4 -1
  11. package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
  12. package/lib/cjs/duet-date-picker.cjs.entry.js +7 -7
  13. package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
  14. package/lib/cjs/duet-editable-table-button_3.cjs.entry.js +232 -0
  15. package/lib/cjs/{duet-table.cjs.entry.js → duet-editable-table_3.cjs.entry.js} +206 -2
  16. package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
  17. package/lib/cjs/duet-footer.cjs.entry.js +2 -2
  18. package/lib/cjs/duet-grid_2.cjs.entry.js +52 -4
  19. package/lib/cjs/duet-header_2.cjs.entry.js +3 -3
  20. package/lib/cjs/duet-hero.cjs.entry.js +2 -2
  21. package/lib/cjs/duet-icon.cjs.entry.js +4 -4
  22. package/lib/cjs/duet-input_2.cjs.entry.js +6 -6
  23. package/lib/cjs/duet-layout.cjs.entry.js +1 -1
  24. package/lib/cjs/duet-list_2.cjs.entry.js +2 -2
  25. package/lib/cjs/duet-modal.cjs.entry.js +3 -3
  26. package/lib/cjs/duet-notification_2.cjs.entry.js +2 -2
  27. package/lib/cjs/duet-number-input.cjs.entry.js +2 -2
  28. package/lib/cjs/duet-progress.cjs.entry.js +75 -0
  29. package/lib/cjs/duet-radio_2.cjs.entry.js +2 -2
  30. package/lib/cjs/duet-range-slider.cjs.entry.js +2 -2
  31. package/lib/cjs/duet-select.cjs.entry.js +5 -5
  32. package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
  33. package/lib/cjs/duet-tab_2.cjs.entry.js +3 -3
  34. package/lib/cjs/duet-textarea.cjs.entry.js +5 -5
  35. package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
  36. package/lib/cjs/duet-tooltip.cjs.entry.js +2 -2
  37. package/lib/cjs/duet-tray.cjs.entry.js +3 -3
  38. package/lib/cjs/duet-upload.cjs.entry.js +1089 -0
  39. package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
  40. package/lib/cjs/duet.cjs.js +4 -4
  41. package/lib/cjs/{focus-utils-55b5a616.js → focus-utils-a7a1fb8b.js} +1 -1
  42. package/lib/cjs/{index-03ed1f55.js → index-b724d698.js} +5 -2
  43. package/lib/cjs/js-utils-33a9dbe3.js +16 -0
  44. package/lib/cjs/{language-utils-48b8860b.js → language-utils-aa282901.js} +6 -2
  45. package/lib/cjs/loader.cjs.js +3 -3
  46. package/lib/cjs/{shadow-css-6560c90c.js → shadow-css-e3edeed1.js} +9 -10
  47. package/lib/cjs/{token-utils-13e5d13e.js → token-utils-63a9c8dc.js} +1 -1
  48. package/lib/cjs/{tokens.module-53b3bd92.js → tokens.module-6b2df1c2.js} +2 -0
  49. package/lib/cjs/{watch-options-3877c082.js → watch-options-d88afac0.js} +29 -6
  50. package/lib/collection/collection-manifest.json +15 -2
  51. package/lib/collection/components/duet-checkbox/duet-checkbox.css +1 -1
  52. package/lib/collection/components/duet-choice/duet-choice.js +95 -21
  53. package/lib/collection/components/duet-date-picker/duet-date-picker.js +9 -9
  54. package/lib/collection/components/duet-editable-table/duet-editable-table-button.css +32 -0
  55. package/lib/collection/components/duet-editable-table/duet-editable-table-button.js +218 -0
  56. package/lib/collection/components/duet-editable-table/duet-editable-table-item.css +36 -0
  57. package/lib/collection/components/duet-editable-table/duet-editable-table-item.js +203 -0
  58. package/lib/collection/components/duet-editable-table/duet-editable-table-tabledata.js +13 -0
  59. package/lib/collection/components/duet-editable-table/duet-editable-table.css +16 -0
  60. package/lib/collection/components/duet-editable-table/duet-editable-table.js +348 -0
  61. package/lib/collection/components/duet-grid/duet-grid.js +57 -6
  62. package/lib/collection/components/duet-heading/duet-heading.css +3 -0
  63. package/lib/collection/components/duet-heading/duet-heading.js +7 -6
  64. package/lib/collection/components/duet-icon/duet-icon.js +2 -6
  65. package/lib/collection/components/duet-input/duet-input.css +15 -0
  66. package/lib/collection/components/duet-input/duet-input.js +4 -4
  67. package/lib/collection/components/duet-paragraph/duet-paragraph.css +6 -0
  68. package/lib/collection/components/duet-paragraph/duet-paragraph.js +34 -3
  69. package/lib/collection/components/duet-progress/duet-progress.css +103 -0
  70. package/lib/collection/components/duet-progress/duet-progress.js +240 -0
  71. package/lib/collection/components/duet-select/duet-select.css +15 -0
  72. package/lib/collection/components/duet-select/duet-select.js +3 -3
  73. package/lib/collection/components/duet-tab-group/duet-tab-group.css +2 -2
  74. package/lib/collection/components/duet-textarea/duet-textarea.css +19 -0
  75. package/lib/collection/components/duet-textarea/duet-textarea.js +5 -4
  76. package/lib/collection/components/duet-upload/duet-upload-aria-status.js +217 -0
  77. package/lib/collection/components/duet-upload/duet-upload-editable-item-error.js +16 -0
  78. package/lib/collection/components/duet-upload/duet-upload-editable-item-inprogres.js +8 -0
  79. package/lib/collection/components/duet-upload/duet-upload-editable-item-success.js +30 -0
  80. package/lib/collection/components/duet-upload/duet-upload-validators.js +93 -0
  81. package/lib/collection/components/duet-upload/duet-upload.css +64 -0
  82. package/lib/collection/components/duet-upload/duet-upload.js +1838 -0
  83. package/lib/collection/components/duet-upload/errorcodes.utils.js +32 -0
  84. package/lib/collection/components/duet-upload/mock.helpers.js +91 -0
  85. package/lib/collection/components/duet-upload/upload.helpers.js +13 -0
  86. package/lib/collection/components/duet-upload/xhr.helpers.js +30 -0
  87. package/lib/collection/utils/js-utils.js +12 -0
  88. package/lib/collection/utils/language-utils.js +6 -3
  89. package/lib/collection/utils/watch-options.js +35 -6
  90. package/lib/custom-elements-bundle/index.d.ts +36 -0
  91. package/lib/custom-elements-bundle/index.js +1917 -277
  92. package/lib/duet/duet.esm.js +1 -1
  93. package/lib/duet/duet.js +1 -1
  94. package/lib/duet/{p-1391ec53.entry.js → p-00735436.entry.js} +1 -1
  95. package/lib/duet/p-060d79be.entry.js +4 -0
  96. package/lib/duet/p-0d22396e.system.js +16 -0
  97. package/lib/duet/p-10deead0.system.js +4 -0
  98. package/lib/duet/{p-72fd384a.entry.js → p-1208c84f.entry.js} +1 -1
  99. package/lib/duet/p-12721178.js +4 -0
  100. package/lib/duet/p-155ef581.system.entry.js +4 -0
  101. package/lib/duet/{p-08729381.entry.js → p-16c48c5d.entry.js} +1 -1
  102. package/lib/duet/p-1797df7b.system.entry.js +4 -0
  103. package/lib/duet/p-1a08fc22.system.entry.js +4 -0
  104. package/lib/duet/{p-b6a0caf8.system.entry.js → p-237e47b4.system.entry.js} +1 -1
  105. package/lib/duet/{p-4fcbcecd.system.entry.js → p-2443bdca.system.entry.js} +1 -1
  106. package/lib/duet/{p-432ba72e.system.entry.js → p-263bc9cd.system.entry.js} +1 -1
  107. package/lib/duet/p-2764f081.js +4 -0
  108. package/lib/duet/{p-b0bbbdba.system.entry.js → p-27d80cef.system.entry.js} +1 -1
  109. package/lib/duet/p-28e02c08.entry.js +4 -0
  110. package/lib/duet/{p-8740fa38.entry.js → p-2bb1460c.entry.js} +1 -1
  111. package/lib/duet/p-33c58756.entry.js +4 -0
  112. package/lib/duet/{p-9cdd361e.js → p-35a3794e.js} +0 -0
  113. package/lib/duet/{p-8c511832.system.entry.js → p-374fb7e6.system.entry.js} +1 -1
  114. package/lib/duet/{p-5a817929.system.entry.js → p-387823af.system.entry.js} +1 -1
  115. package/lib/duet/{p-a678da8c.entry.js → p-3af5d66f.entry.js} +1 -1
  116. package/lib/duet/{p-322d1c38.js → p-3c1971d8.js} +1 -1
  117. package/lib/duet/{p-d13874cb.entry.js → p-4607af59.entry.js} +1 -1
  118. package/lib/duet/{p-2c0dd9ba.system.entry.js → p-48d1eb1f.system.entry.js} +1 -1
  119. package/lib/duet/p-4a87e9ab.system.entry.js +4 -0
  120. package/lib/duet/{p-92103298.system.entry.js → p-4b6ebe40.system.entry.js} +1 -1
  121. package/lib/duet/{p-6cf41bfe.system.entry.js → p-4e28da18.system.entry.js} +1 -1
  122. package/lib/duet/p-548d484e.js +4 -0
  123. package/lib/duet/{p-2c679963.entry.js → p-5826523b.entry.js} +1 -1
  124. package/lib/duet/{p-7331f2fe.system.entry.js → p-58750bae.system.entry.js} +1 -1
  125. package/lib/duet/{p-7a868085.entry.js → p-597d99c7.entry.js} +1 -1
  126. package/lib/duet/p-5ea0cd19.entry.js +4 -0
  127. package/lib/duet/p-63d5bf73.system.entry.js +4 -0
  128. package/lib/duet/{p-68d09837.system.entry.js → p-67d9a9a9.system.entry.js} +1 -1
  129. package/lib/duet/{p-9542c540.entry.js → p-6a19b5ec.entry.js} +1 -1
  130. package/lib/duet/p-6cc3be76.system.entry.js +4 -0
  131. package/lib/duet/p-6e363557.system.js +4 -0
  132. package/lib/duet/{p-3b3bac3f.system.entry.js → p-6e6e76db.system.entry.js} +1 -1
  133. package/lib/duet/p-70fafc98.system.js +4 -0
  134. package/lib/duet/{p-2d1e2b23.system.entry.js → p-7368b14e.system.entry.js} +1 -1
  135. package/lib/duet/{p-2a3411b5.system.entry.js → p-751542a0.system.entry.js} +1 -1
  136. package/lib/duet/{p-b75c5f13.entry.js → p-794659ac.entry.js} +1 -1
  137. package/lib/duet/{p-b04d738f.system.entry.js → p-7e8d5bb9.system.entry.js} +1 -1
  138. package/lib/duet/p-7fee0d23.system.entry.js +4 -0
  139. package/lib/duet/p-81867417.system.js +4 -0
  140. package/lib/duet/{p-84ece735.entry.js → p-86daec1c.entry.js} +1 -1
  141. package/lib/duet/{p-94a5fd74.system.entry.js → p-8b5ca0e7.system.entry.js} +1 -1
  142. package/lib/duet/{p-ffc2ffff.entry.js → p-8cb7416d.entry.js} +1 -1
  143. package/lib/duet/p-8f826843.system.entry.js +4 -0
  144. package/lib/duet/p-94169303.entry.js +4 -0
  145. package/lib/duet/{p-807b2087.entry.js → p-9481e312.entry.js} +1 -1
  146. package/lib/duet/{p-977f2826.entry.js → p-984576c9.entry.js} +1 -1
  147. package/lib/duet/p-987edcd0.js +15 -0
  148. package/lib/duet/p-9d73343a.entry.js +4 -0
  149. package/lib/duet/{p-8652a7ab.system.entry.js → p-9dca5c22.system.entry.js} +1 -1
  150. package/lib/duet/p-a207b008.entry.js +4 -0
  151. package/lib/duet/p-a5b9c192.system.entry.js +4 -0
  152. package/lib/duet/p-a6a84ec6.entry.js +4 -0
  153. package/lib/duet/{p-9f0f5674.entry.js → p-a890da72.entry.js} +1 -1
  154. package/lib/duet/{p-0f2a478e.entry.js → p-a9859a82.entry.js} +1 -1
  155. package/lib/duet/{p-3040debf.entry.js → p-aba68b7b.entry.js} +1 -1
  156. package/lib/duet/p-acc57c77.entry.js +4 -0
  157. package/lib/duet/{p-2826f987.js → p-ad07f399.js} +1 -1
  158. package/lib/duet/{p-fb898d94.system.entry.js → p-aee24388.system.entry.js} +1 -1
  159. package/lib/duet/p-aef1b720.system.entry.js +4 -0
  160. package/lib/duet/{p-00eac879.system.entry.js → p-af41d894.system.entry.js} +1 -1
  161. package/lib/duet/p-b25d3769.js +4 -0
  162. package/lib/duet/{p-43dde575.system.entry.js → p-b32224fe.system.entry.js} +1 -1
  163. package/lib/duet/{p-f13a0883.entry.js → p-b3744481.entry.js} +1 -1
  164. package/lib/duet/{p-b374d7c2.system.js → p-b42d81c3.system.js} +1 -1
  165. package/lib/duet/{p-ed479d09.system.entry.js → p-b4e87f02.system.entry.js} +1 -1
  166. package/lib/duet/{p-b9683731.entry.js → p-bf93a991.entry.js} +1 -1
  167. package/lib/duet/{p-a962c8c1.system.js → p-c18a599e.system.js} +0 -0
  168. package/lib/duet/p-c2e77278.entry.js +4 -0
  169. package/lib/duet/p-c34329f3.entry.js +4 -0
  170. package/lib/duet/{p-c19094dd.entry.js → p-c36b4da0.entry.js} +1 -1
  171. package/lib/duet/{p-8002a095.entry.js → p-cdd70b93.entry.js} +1 -1
  172. package/lib/duet/p-d1c19f04.system.entry.js +4 -0
  173. package/lib/duet/{p-cc0bd28f.system.entry.js → p-d3a3c3c7.system.entry.js} +1 -1
  174. package/lib/duet/{p-19c28d99.system.entry.js → p-d4118b6e.system.entry.js} +1 -1
  175. package/lib/duet/{p-abd3bfb4.system.entry.js → p-d744d188.system.entry.js} +1 -1
  176. package/lib/duet/p-ddb6344c.system.js +4 -0
  177. package/lib/duet/p-de07c7d7.entry.js +4 -0
  178. package/lib/duet/{p-57cb58d4.system.entry.js → p-dfe79666.system.entry.js} +1 -1
  179. package/lib/duet/{p-c723d36e.system.js → p-e12f2b8b.system.js} +1 -1
  180. package/lib/duet/p-e2a44156.js +4 -0
  181. package/lib/duet/p-e76b722f.entry.js +4 -0
  182. package/lib/duet/{p-0b9b6393.entry.js → p-e964d062.entry.js} +1 -1
  183. package/lib/duet/p-eb55ccd2.system.js +4 -0
  184. package/lib/duet/p-f0a4b68d.system.entry.js +4 -0
  185. package/lib/duet/p-f364eb96.entry.js +4 -0
  186. package/lib/duet/{p-fbb7d194.entry.js → p-f8ce39fb.entry.js} +1 -1
  187. package/lib/esm/{dom-8516b24e.js → dom-58cd15f6.js} +1 -1
  188. package/lib/esm/duet-alert.entry.js +2 -2
  189. package/lib/esm/duet-badge.entry.js +1 -1
  190. package/lib/esm/duet-button_2.entry.js +4 -4
  191. package/lib/esm/duet-caption_4.entry.js +17 -10
  192. package/lib/esm/duet-card.entry.js +3 -3
  193. package/lib/esm/duet-checkbox.entry.js +2 -2
  194. package/lib/esm/duet-choice_2.entry.js +41 -19
  195. package/lib/esm/duet-collapsible.entry.js +4 -1
  196. package/lib/esm/duet-cookie-consent.entry.js +1 -1
  197. package/lib/esm/duet-date-picker.entry.js +7 -7
  198. package/lib/esm/duet-divider_2.entry.js +1 -1
  199. package/lib/esm/duet-editable-table-button_3.entry.js +226 -0
  200. package/lib/esm/{duet-table.entry.js → duet-editable-table_3.entry.js} +205 -3
  201. package/lib/esm/duet-empty-state.entry.js +1 -1
  202. package/lib/esm/duet-footer.entry.js +2 -2
  203. package/lib/esm/duet-grid_2.entry.js +52 -4
  204. package/lib/esm/duet-header_2.entry.js +3 -3
  205. package/lib/esm/duet-hero.entry.js +2 -2
  206. package/lib/esm/duet-icon.entry.js +4 -4
  207. package/lib/esm/duet-input_2.entry.js +6 -6
  208. package/lib/esm/duet-layout.entry.js +1 -1
  209. package/lib/esm/duet-list_2.entry.js +2 -2
  210. package/lib/esm/duet-modal.entry.js +3 -3
  211. package/lib/esm/duet-notification_2.entry.js +2 -2
  212. package/lib/esm/duet-number-input.entry.js +2 -2
  213. package/lib/esm/duet-progress.entry.js +71 -0
  214. package/lib/esm/duet-radio_2.entry.js +2 -2
  215. package/lib/esm/duet-range-slider.entry.js +2 -2
  216. package/lib/esm/duet-select.entry.js +5 -5
  217. package/lib/esm/duet-step_2.entry.js +1 -1
  218. package/lib/esm/duet-tab_2.entry.js +3 -3
  219. package/lib/esm/duet-textarea.entry.js +5 -5
  220. package/lib/esm/duet-toggle.entry.js +1 -1
  221. package/lib/esm/duet-tooltip.entry.js +2 -2
  222. package/lib/esm/duet-tray.entry.js +3 -3
  223. package/lib/esm/duet-upload.entry.js +1085 -0
  224. package/lib/esm/duet-visually-hidden.entry.js +1 -1
  225. package/lib/esm/duet.js +4 -4
  226. package/lib/esm/{focus-utils-6a282066.js → focus-utils-1fe0dcd0.js} +1 -1
  227. package/lib/esm/{index-3a265449.js → index-84d97bd1.js} +5 -2
  228. package/lib/esm/js-utils-b69f17df.js +14 -0
  229. package/lib/esm/{language-utils-d5c38f65.js → language-utils-344d894c.js} +6 -3
  230. package/lib/esm/loader.js +3 -3
  231. package/lib/esm/{shadow-css-9178c864.js → shadow-css-7c726abb.js} +9 -10
  232. package/lib/esm/{token-utils-5a35377f.js → token-utils-590d9413.js} +1 -1
  233. package/lib/esm/{tokens.module-edb66c04.js → tokens.module-49cbf963.js} +3 -1
  234. package/lib/esm/watch-options-dd55bce8.js +57 -0
  235. package/lib/esm-es5/{dom-8516b24e.js → dom-58cd15f6.js} +0 -0
  236. package/lib/esm-es5/duet-alert.entry.js +1 -1
  237. package/lib/esm-es5/duet-badge.entry.js +1 -1
  238. package/lib/esm-es5/duet-button_2.entry.js +1 -1
  239. package/lib/esm-es5/duet-caption_4.entry.js +2 -2
  240. package/lib/esm-es5/duet-card.entry.js +1 -1
  241. package/lib/esm-es5/duet-checkbox.entry.js +1 -1
  242. package/lib/esm-es5/duet-choice_2.entry.js +2 -2
  243. package/lib/esm-es5/duet-collapsible.entry.js +1 -1
  244. package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
  245. package/lib/esm-es5/duet-date-picker.entry.js +1 -1
  246. package/lib/esm-es5/duet-divider_2.entry.js +1 -1
  247. package/lib/esm-es5/duet-editable-table-button_3.entry.js +4 -0
  248. package/lib/esm-es5/duet-editable-table_3.entry.js +4 -0
  249. package/lib/esm-es5/duet-empty-state.entry.js +1 -1
  250. package/lib/esm-es5/duet-footer.entry.js +1 -1
  251. package/lib/esm-es5/duet-grid_2.entry.js +2 -2
  252. package/lib/esm-es5/duet-header_2.entry.js +1 -1
  253. package/lib/esm-es5/duet-hero.entry.js +1 -1
  254. package/lib/esm-es5/duet-icon.entry.js +1 -1
  255. package/lib/esm-es5/duet-input_2.entry.js +1 -1
  256. package/lib/esm-es5/duet-layout.entry.js +1 -1
  257. package/lib/esm-es5/duet-list_2.entry.js +1 -1
  258. package/lib/esm-es5/duet-modal.entry.js +1 -1
  259. package/lib/esm-es5/duet-notification_2.entry.js +1 -1
  260. package/lib/esm-es5/duet-number-input.entry.js +1 -1
  261. package/lib/esm-es5/duet-progress.entry.js +4 -0
  262. package/lib/esm-es5/duet-radio_2.entry.js +1 -1
  263. package/lib/esm-es5/duet-range-slider.entry.js +1 -1
  264. package/lib/esm-es5/duet-select.entry.js +1 -1
  265. package/lib/esm-es5/duet-step_2.entry.js +1 -1
  266. package/lib/esm-es5/duet-tab_2.entry.js +2 -2
  267. package/lib/esm-es5/duet-textarea.entry.js +1 -1
  268. package/lib/esm-es5/duet-toggle.entry.js +1 -1
  269. package/lib/esm-es5/duet-tooltip.entry.js +1 -1
  270. package/lib/esm-es5/duet-tray.entry.js +1 -1
  271. package/lib/esm-es5/duet-upload.entry.js +4 -0
  272. package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
  273. package/lib/esm-es5/duet.js +1 -1
  274. package/lib/esm-es5/{focus-utils-6a282066.js → focus-utils-1fe0dcd0.js} +1 -1
  275. package/lib/esm-es5/index-84d97bd1.js +4 -0
  276. package/lib/esm-es5/js-utils-b69f17df.js +4 -0
  277. package/lib/esm-es5/{language-utils-d5c38f65.js → language-utils-344d894c.js} +1 -1
  278. package/lib/esm-es5/loader.js +1 -1
  279. package/lib/esm-es5/shadow-css-7c726abb.js +15 -0
  280. package/lib/esm-es5/{token-utils-5a35377f.js → token-utils-590d9413.js} +1 -1
  281. package/lib/esm-es5/tokens.module-49cbf963.js +4 -0
  282. package/lib/esm-es5/watch-options-dd55bce8.js +4 -0
  283. package/lib/types/components/duet-choice/duet-choice.d.ts +20 -1
  284. package/lib/types/components/duet-date-picker/duet-date-picker.d.ts +5 -5
  285. package/lib/types/components/duet-editable-table/duet-editable-table-button.d.ts +72 -0
  286. package/lib/types/components/duet-editable-table/duet-editable-table-item.d.ts +72 -0
  287. package/lib/types/components/duet-editable-table/duet-editable-table-tabledata.d.ts +7 -0
  288. package/lib/types/components/duet-editable-table/duet-editable-table.d.ts +84 -0
  289. package/lib/types/components/duet-grid/duet-grid.d.ts +16 -2
  290. package/lib/types/components/duet-heading/duet-heading.d.ts +2 -2
  291. package/lib/types/components/duet-icon/duet-icon.d.ts +1 -1
  292. package/lib/types/components/duet-paragraph/duet-paragraph.d.ts +9 -1
  293. package/lib/types/components/duet-progress/duet-progress.d.ts +64 -0
  294. package/lib/types/components/duet-upload/duet-upload-aria-status.d.ts +49 -0
  295. package/lib/types/components/duet-upload/duet-upload-editable-item-error.d.ts +7 -0
  296. package/lib/types/components/duet-upload/duet-upload-editable-item-inprogres.d.ts +7 -0
  297. package/lib/types/components/duet-upload/duet-upload-editable-item-success.d.ts +8 -0
  298. package/lib/types/components/duet-upload/duet-upload-validators.d.ts +12 -0
  299. package/lib/types/components/duet-upload/duet-upload.d.ts +380 -0
  300. package/lib/types/components/duet-upload/errorcodes.utils.d.ts +8 -0
  301. package/lib/types/components/duet-upload/mock.helpers.d.ts +2 -0
  302. package/lib/types/components/duet-upload/upload.helpers.d.ts +1 -0
  303. package/lib/types/components/duet-upload/xhr.helpers.d.ts +18 -0
  304. package/lib/types/components.d.ts +789 -19
  305. package/lib/types/utils/js-utils.d.ts +1 -0
  306. package/lib/types/utils/language-utils.d.ts +5 -1
  307. package/lib/types/utils/watch-options.d.ts +2 -0
  308. package/package.json +6 -6
  309. package/lib/cjs/duet-fieldset.cjs.entry.js +0 -62
  310. package/lib/duet/p-0058512b.js +0 -4
  311. package/lib/duet/p-0b00e8d6.system.js +0 -16
  312. package/lib/duet/p-15922601.system.js +0 -4
  313. package/lib/duet/p-194e25ce.system.entry.js +0 -4
  314. package/lib/duet/p-1d87ea02.system.entry.js +0 -4
  315. package/lib/duet/p-3618aaee.entry.js +0 -4
  316. package/lib/duet/p-40d68321.entry.js +0 -4
  317. package/lib/duet/p-418b2ce7.system.js +0 -4
  318. package/lib/duet/p-43e39d98.system.js +0 -4
  319. package/lib/duet/p-4603830b.entry.js +0 -4
  320. package/lib/duet/p-52d7fbec.entry.js +0 -4
  321. package/lib/duet/p-60478325.system.entry.js +0 -4
  322. package/lib/duet/p-64ed7add.entry.js +0 -4
  323. package/lib/duet/p-6a356ab1.system.js +0 -4
  324. package/lib/duet/p-753b406c.entry.js +0 -4
  325. package/lib/duet/p-76c00d0c.entry.js +0 -4
  326. package/lib/duet/p-85fe1132.js +0 -4
  327. package/lib/duet/p-8c8e82aa.system.js +0 -4
  328. package/lib/duet/p-9a89ec39.js +0 -4
  329. package/lib/duet/p-a11df1b6.js +0 -15
  330. package/lib/duet/p-a1eccee1.system.entry.js +0 -4
  331. package/lib/duet/p-a89e88a3.js +0 -4
  332. package/lib/duet/p-ade33230.entry.js +0 -4
  333. package/lib/duet/p-cb827bb7.entry.js +0 -4
  334. package/lib/duet/p-d85fba2c.system.entry.js +0 -4
  335. package/lib/duet/p-dfa90f8a.system.entry.js +0 -4
  336. package/lib/duet/p-e6b9bd1d.entry.js +0 -4
  337. package/lib/duet/p-ec3eef3a.entry.js +0 -4
  338. package/lib/duet/p-ee64d6be.system.entry.js +0 -4
  339. package/lib/duet/p-f113671b.system.entry.js +0 -4
  340. package/lib/duet/p-f2f04396.entry.js +0 -4
  341. package/lib/duet/p-f364ce8b.system.entry.js +0 -4
  342. package/lib/duet/p-fc6624fe.system.entry.js +0 -4
  343. package/lib/esm/duet-fieldset.entry.js +0 -58
  344. package/lib/esm/watch-options-de55ea78.js +0 -35
  345. package/lib/esm-es5/duet-fieldset.entry.js +0 -4
  346. package/lib/esm-es5/duet-table.entry.js +0 -4
  347. package/lib/esm-es5/index-3a265449.js +0 -4
  348. package/lib/esm-es5/shadow-css-9178c864.js +0 -15
  349. package/lib/esm-es5/tokens.module-edb66c04.js +0 -4
  350. package/lib/esm-es5/watch-options-de55ea78.js +0 -4
@@ -0,0 +1,240 @@
1
+ /*!
2
+ * Built with Duet Design System
3
+ */
4
+ import { Component, Element, h, Host, Prop } from "@stencil/core";
5
+ import { createID } from "../../utils/create-id";
6
+ import { getLocaleString } from "../../utils/language-utils";
7
+ import { inheritGlobalTheme } from "../../utils/themeable-component";
8
+ export class DuetProgress {
9
+ constructor() {
10
+ /**
11
+ * Own Properties
12
+ */
13
+ this.progressId = createID("DuetProgress");
14
+ this.progressLabelId = createID("DuetProgressLabel");
15
+ /**
16
+ * Defaults for accessibleLabel
17
+ */
18
+ this.accessibleLabelUploadDefaults = {
19
+ fi: ["lähetys valmis", "lähetys käynnissä"],
20
+ sv: ["Uppladdningen är klar", "Uppladdning pågår"],
21
+ en: ["upload completed", "upload in progress"],
22
+ };
23
+ /**
24
+ * Adds accessible label for upload in progress and upload complete states
25
+ * @default {fi: ["lähetys valmis", "lähetys käynnissä"],sv: ["Uppladdningen är klar", "Uppladdning pågår"], en: ["completed", "in progress"]}
26
+ */
27
+ this.accessibleLabelUpload = getLocaleString(this.accessibleLabelUploadDefaults);
28
+ /**
29
+ * Progress of the bar, a value from 0-100
30
+ */
31
+ this.progress = 0;
32
+ /**
33
+ * Height of progressbar
34
+ */
35
+ this.height = "10px";
36
+ /**
37
+ * Theme of the input.
38
+ */
39
+ this.theme = "";
40
+ }
41
+ /**
42
+ * Component lifecycle events.
43
+ */
44
+ componentWillLoad() {
45
+ inheritGlobalTheme(this);
46
+ }
47
+ /**
48
+ * render() function
49
+ * Always the last one in the class.
50
+ */
51
+ render() {
52
+ return (h(Host, null,
53
+ h("div", { "aria-live": this.accessibleLabel ? "polite" : "off", "aria-hidden": this.accessibleLabel ? "false" : "true", "aria-atomic": "true", style: {
54
+ height: this.height,
55
+ }, id: this.progressId, class: {
56
+ "duet-progress": true,
57
+ "duet-progress-done": this.progress === 100,
58
+ "duet-progress-start": this.progress === 0,
59
+ "duet-progress-inprogress": this.progress < 99 && this.progress !== 0,
60
+ "duet-theme-turva": this.theme === "turva",
61
+ } },
62
+ h("duet-visually-hidden", null,
63
+ h("label", { htmlFor: this.progressLabelId }, this.progress !== 0 && (h("span", null,
64
+ this.accessibleLabel,
65
+ ", ",
66
+ this.accessibleLabelUpload[this.progress < 99 ? 1 : 0])))),
67
+ this.caption && (h("div", { class: "duet-progress-caption" },
68
+ h("span", null, this.caption))),
69
+ h("progress", { id: this.progressLabelId, "aria-describedby": this.accessibleDescribedBy, role: "progressbar", value: this.progress, max: "100", "aria-valuemin": "0", "aria-valuemax": "100" },
70
+ h("div", { class: "progress-bar" },
71
+ h("span", { style: { width: `${this.progress}%;` } },
72
+ "Progress: ",
73
+ this.progress,
74
+ "%"))))));
75
+ }
76
+ static get is() { return "duet-progress"; }
77
+ static get originalStyleUrls() { return {
78
+ "$": ["duet-progress.scss"]
79
+ }; }
80
+ static get styleUrls() { return {
81
+ "$": ["duet-progress.css"]
82
+ }; }
83
+ static get properties() { return {
84
+ "accessibleDescribedBy": {
85
+ "type": "string",
86
+ "mutable": false,
87
+ "complexType": {
88
+ "original": "string",
89
+ "resolved": "string",
90
+ "references": {}
91
+ },
92
+ "required": false,
93
+ "optional": false,
94
+ "docs": {
95
+ "tags": [],
96
+ "text": "Indicates the id of a component that describes the upload component."
97
+ },
98
+ "attribute": "accessible-described-by",
99
+ "reflect": false
100
+ },
101
+ "accessibleLabel": {
102
+ "type": "string",
103
+ "mutable": false,
104
+ "complexType": {
105
+ "original": "string",
106
+ "resolved": "string",
107
+ "references": {}
108
+ },
109
+ "required": false,
110
+ "optional": false,
111
+ "docs": {
112
+ "tags": [],
113
+ "text": "Indicates the aria-label of the component -\nthis will get combined with an label+uploading when uploading,\nand label+upload complete when upload is complete"
114
+ },
115
+ "attribute": "accessible-label",
116
+ "reflect": false
117
+ },
118
+ "accessibleLabelUploadDefaults": {
119
+ "type": "string",
120
+ "mutable": false,
121
+ "complexType": {
122
+ "original": "DuetLangObject | string",
123
+ "resolved": "DuetLangObject | string",
124
+ "references": {
125
+ "DuetLangObject": {
126
+ "location": "import",
127
+ "path": "../../utils/language-utils"
128
+ }
129
+ }
130
+ },
131
+ "required": false,
132
+ "optional": false,
133
+ "docs": {
134
+ "tags": [],
135
+ "text": "Defaults for accessibleLabel"
136
+ },
137
+ "attribute": "accessible-label-upload-defaults",
138
+ "reflect": false,
139
+ "defaultValue": "{\n fi: [\"l\u00E4hetys valmis\", \"l\u00E4hetys k\u00E4ynniss\u00E4\"],\n sv: [\"Uppladdningen \u00E4r klar\", \"Uppladdning p\u00E5g\u00E5r\"],\n en: [\"upload completed\", \"upload in progress\"],\n }"
140
+ },
141
+ "accessibleLabelUpload": {
142
+ "type": "string",
143
+ "mutable": false,
144
+ "complexType": {
145
+ "original": "string",
146
+ "resolved": "string",
147
+ "references": {}
148
+ },
149
+ "required": false,
150
+ "optional": false,
151
+ "docs": {
152
+ "tags": [{
153
+ "name": "default",
154
+ "text": "{fi: [\"l\u00E4hetys valmis\", \"l\u00E4hetys k\u00E4ynniss\u00E4\"],sv: [\"Uppladdningen \u00E4r klar\", \"Uppladdning p\u00E5g\u00E5r\"], en: [\"completed\", \"in progress\"]}"
155
+ }],
156
+ "text": "Adds accessible label for upload in progress and upload complete states"
157
+ },
158
+ "attribute": "accessible-label-upload",
159
+ "reflect": false,
160
+ "defaultValue": "getLocaleString(this.accessibleLabelUploadDefaults)"
161
+ },
162
+ "progress": {
163
+ "type": "number",
164
+ "mutable": true,
165
+ "complexType": {
166
+ "original": "number",
167
+ "resolved": "number",
168
+ "references": {}
169
+ },
170
+ "required": false,
171
+ "optional": false,
172
+ "docs": {
173
+ "tags": [],
174
+ "text": "Progress of the bar, a value from 0-100"
175
+ },
176
+ "attribute": "progress",
177
+ "reflect": true,
178
+ "defaultValue": "0"
179
+ },
180
+ "caption": {
181
+ "type": "string",
182
+ "mutable": false,
183
+ "complexType": {
184
+ "original": "string",
185
+ "resolved": "string",
186
+ "references": {}
187
+ },
188
+ "required": false,
189
+ "optional": false,
190
+ "docs": {
191
+ "tags": [],
192
+ "text": "Caption (underneath label) that can be set as a way of adding extra information"
193
+ },
194
+ "attribute": "caption",
195
+ "reflect": false
196
+ },
197
+ "height": {
198
+ "type": "string",
199
+ "mutable": false,
200
+ "complexType": {
201
+ "original": "string",
202
+ "resolved": "string",
203
+ "references": {}
204
+ },
205
+ "required": false,
206
+ "optional": false,
207
+ "docs": {
208
+ "tags": [],
209
+ "text": "Height of progressbar"
210
+ },
211
+ "attribute": "height",
212
+ "reflect": false,
213
+ "defaultValue": "\"10px\""
214
+ },
215
+ "theme": {
216
+ "type": "string",
217
+ "mutable": true,
218
+ "complexType": {
219
+ "original": "DuetTheme",
220
+ "resolved": "\"\" | \"default\" | \"turva\"",
221
+ "references": {
222
+ "DuetTheme": {
223
+ "location": "import",
224
+ "path": "../../common-types"
225
+ }
226
+ }
227
+ },
228
+ "required": false,
229
+ "optional": false,
230
+ "docs": {
231
+ "tags": [],
232
+ "text": "Theme of the input."
233
+ },
234
+ "attribute": "theme",
235
+ "reflect": false,
236
+ "defaultValue": "\"\""
237
+ }
238
+ }; }
239
+ static get elementRef() { return "element"; }
240
+ }
@@ -57,6 +57,21 @@ duet-tooltip {
57
57
  }
58
58
  }
59
59
 
60
+ .duet-select-placeholder {
61
+ position: absolute;
62
+ top: -9px;
63
+ left: 9px;
64
+ z-index: 200;
65
+ display: block;
66
+ width: auto;
67
+ max-width: 60%;
68
+ padding: 0 0.25rem;
69
+ overflow: hidden;
70
+ text-overflow: ellipsis;
71
+ white-space: nowrap;
72
+ background: white;
73
+ }
74
+
60
75
  .duet-select-container {
61
76
  position: relative;
62
77
  width: 100%;
@@ -121,14 +121,14 @@ export class DuetSelect {
121
121
  if (this.nativeSelect) {
122
122
  this.nativeSelect.value = this.value;
123
123
  }
124
- this.isCaptionVisible = !!(this.caption || (this.placeholder && this.echoPlaceholder && this.value));
124
+ this.isCaptionVisible = !!this.caption;
125
125
  }
126
126
  /**
127
127
  * Component lifecycle events.
128
128
  */
129
129
  componentWillLoad() {
130
130
  inheritGlobalTheme(this);
131
- this.isCaptionVisible = !!(this.caption || (this.placeholder && this.echoPlaceholder && this.value));
131
+ this.isCaptionVisible = !!this.caption;
132
132
  this.refresh();
133
133
  }
134
134
  /**
@@ -176,8 +176,8 @@ export class DuetSelect {
176
176
  h("duet-label", { theme: this.theme === "turva" ? "turva" : "default", class: { "duet-has-tooltip": !!this.tooltip }, id: this.labelId, for: identifier }, this.label),
177
177
  this.tooltip && (h("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)),
178
178
  this.caption && (h("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)),
179
- this.placeholder && this.echoPlaceholder && this.value && (h("duet-caption", { id: this.topCaptionPlaceholderId, size: "small" }, this.placeholder)),
180
179
  h("div", { class: "duet-select-wrapper" },
180
+ this.placeholder && this.echoPlaceholder && this.value && (h("duet-caption", { id: this.topCaptionPlaceholderId, class: "duet-select-placeholder", size: "small" }, this.placeholder)),
181
181
  h("select", { ref: select => (this.nativeSelect = select), disabled: this.disabled, name: this.name, id: identifier, role: this.role, "aria-labelledby": `${this.labelId} ${this.errorId}`, "aria-controls": this.accessibleControls, "aria-activedescendant": this.accessibleActiveDescendant, "aria-owns": this.accessibleOwns, onFocus: this.onFocus, onBlur: this.onBlur, onChange: this.onChange, required: this.required, "aria-describedby": this.accessibleDescribedBy },
182
182
  this.placeholder && (h("option", { disabled: true, selected: true, value: "" }, this.placeholder)),
183
183
  !this.processedItems ? (h("option", null, "Virhe valintoja ladattaessa. P\u00E4ivit\u00E4 sivu ja kokeile uusiksi.")) : (this.processedItems.map(item => {
@@ -124,8 +124,8 @@
124
124
  }
125
125
  .duet-theme-turva .duet-tab-button.selected {
126
126
  color: white !important;
127
- background-color: #444445;
128
- border-color: #444445 !important;
127
+ background-color: #171c3a;
128
+ border-color: #171c3a !important;
129
129
  }
130
130
  .duet-tab-button:focus {
131
131
  z-index: 200;
@@ -68,6 +68,25 @@ duet-tooltip {
68
68
  display: flex !important;
69
69
  }
70
70
 
71
+ .duet-textarea-wrapper {
72
+ position: relative;
73
+ }
74
+
75
+ .duet-textarea-placeholder {
76
+ position: absolute;
77
+ top: -9px;
78
+ left: 9px;
79
+ z-index: 200;
80
+ display: block;
81
+ width: auto;
82
+ max-width: 60%;
83
+ padding: 0 0.25rem;
84
+ overflow: hidden;
85
+ text-overflow: ellipsis;
86
+ white-space: nowrap;
87
+ background: white;
88
+ }
89
+
71
90
  .duet-textarea {
72
91
  padding: 15px !important;
73
92
  position: relative;
@@ -105,7 +105,7 @@ export class DuetTextarea {
105
105
  cleanValue(this.nativeInput, this.disallowPatternRegex);
106
106
  }
107
107
  this.value = this.nativeInput.value;
108
- this.isCaptionVisible = !!(this.caption || (this.placeholder && this.echoPlaceholder && this.value));
108
+ this.isCaptionVisible = !!this.caption;
109
109
  this.duetInput.emit({
110
110
  originalEvent: ev,
111
111
  value: this.value,
@@ -144,7 +144,7 @@ export class DuetTextarea {
144
144
  componentWillLoad() {
145
145
  inheritGlobalTheme(this);
146
146
  this.disallowedPatternChange();
147
- this.isCaptionVisible = !!(this.caption || (this.placeholder && this.echoPlaceholder && this.value));
147
+ this.isCaptionVisible = !!this.caption;
148
148
  if (this.counter && this.maxlength == null) {
149
149
  console.warn("[DUET WARNING]: counter will only take effect if maxlength is set");
150
150
  }
@@ -183,8 +183,9 @@ export class DuetTextarea {
183
183
  h("duet-label", { theme: this.theme === "turva" ? "turva" : "default", class: { "duet-has-tooltip": !!this.tooltip }, margin: this.isCaptionVisible ? "small" : "auto", id: this.labelId, for: identifier }, this.label),
184
184
  this.tooltip && (h("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)),
185
185
  this.caption && (h("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)),
186
- this.placeholder && this.echoPlaceholder && this.value && (h("duet-caption", { id: this.topCaptionPlaceholderId, size: "small" }, this.placeholder)),
187
- h("textarea", { onInput: this.handleInput, onChange: this.handleChange, onBlur: this.handleBlur, onFocus: this.handleFocus, ref: input => (this.nativeInput = input), class: { "duet-textarea": true, disabled: this.disabled }, value: this.value, disabled: this.disabled, "aria-labelledby": `${this.labelId} ${this.errorId}`, "aria-controls": this.accessibleControls, "aria-autocomplete": this.accessibleAutocomplete, "aria-activedescendant": this.accessibleActiveDescendant, "aria-owns": this.accessibleOwns, "aria-describedby": `${this.isCaptionVisible ? this.topCaptionId : ""} ${this.accessibleDescribedBy}`, placeholder: this.placeholder, spellcheck: "false", required: this.required, minlength: this.minlength, maxlength: this.maxlength, role: this.role, name: this.name, id: identifier }),
186
+ h("div", { class: "duet-textarea-wrapper" },
187
+ this.placeholder && this.echoPlaceholder && this.value && (h("duet-caption", { id: this.topCaptionPlaceholderId, class: "duet-textarea-placeholder", size: "small" }, this.placeholder)),
188
+ h("textarea", { onInput: this.handleInput, onChange: this.handleChange, onBlur: this.handleBlur, onFocus: this.handleFocus, ref: input => (this.nativeInput = input), class: { "duet-textarea": true, disabled: this.disabled }, value: this.value, disabled: this.disabled, "aria-labelledby": `${this.labelId} ${this.errorId}`, "aria-controls": this.accessibleControls, "aria-autocomplete": this.accessibleAutocomplete, "aria-activedescendant": this.accessibleActiveDescendant, "aria-owns": this.accessibleOwns, "aria-describedby": `${this.isCaptionVisible ? this.topCaptionId : ""} ${this.accessibleDescribedBy}`, placeholder: this.placeholder, spellcheck: "false", required: this.required, minlength: this.minlength, maxlength: this.maxlength, role: this.role, name: this.name, id: identifier })),
188
189
  h("duet-grid", { alignment: "stretch" },
189
190
  h("duet-grid-item", { margin: "none", fill: true },
190
191
  h("div", { class: "duet-textarea-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && h("span", null, this.error))),
@@ -0,0 +1,217 @@
1
+ /*!
2
+ * Built with Duet Design System
3
+ */
4
+ import { Component, h, Host, Prop, State, Watch } from "@stencil/core";
5
+ export class DuetUploadAriaStatus {
6
+ constructor() {
7
+ /**
8
+ * State() variables
9
+ */
10
+ this.statusMessage = null;
11
+ /**
12
+ * State() variables
13
+ */
14
+ this.statusMessageLabel = null;
15
+ /**
16
+ * Adds accessible label that is read aloud
17
+ */
18
+ this.accessibleAriaLive = "polite";
19
+ /**
20
+ * valid file amount
21
+ */
22
+ this.valid = undefined;
23
+ /**
24
+ * total files
25
+ */
26
+ this.total = undefined;
27
+ /**
28
+ * invalid file amount
29
+ */
30
+ this.invalid = undefined;
31
+ /**
32
+ * valid file amount
33
+ */
34
+ this.inprogress = undefined;
35
+ /**
36
+ * Component lifecycle events.
37
+ */
38
+ this.replacePlaceHolders = (statusString) => {
39
+ const addFiles = (amount) => {
40
+ return amount > 1 ? `${amount} ${this.statusMessageLabel.files}` : `${amount} ${this.statusMessageLabel.file}`;
41
+ };
42
+ return statusString
43
+ .replace("{filesUploaded}", addFiles(this.valid))
44
+ .replace("{filesInProgress}", addFiles(this.inprogress))
45
+ .replace("{filesTotal}", addFiles(this.total))
46
+ .replace("{filesWithErrors}", addFiles(this.invalid));
47
+ };
48
+ this.getStatusMessage = () => {
49
+ const { done, inProgress, doneWithErrors, inProgressWithErrors } = this.statusMessageLabel;
50
+ const hasErrors = this.invalid > 0;
51
+ const isInProgress = this.inprogress > 0;
52
+ const isInProgressWithErrors = this.inprogress > 0 && hasErrors;
53
+ const isDone = this.valid === this.total && !isInProgress && !hasErrors;
54
+ const isDoneWithErrors = this.valid + this.invalid === this.total && !isInProgress;
55
+ if (isDone) {
56
+ this.statusMessage = this.replacePlaceHolders(done);
57
+ return;
58
+ }
59
+ else if (isInProgressWithErrors) {
60
+ this.statusMessage = this.replacePlaceHolders(inProgressWithErrors);
61
+ return;
62
+ }
63
+ else if (isInProgress) {
64
+ this.statusMessage = this.replacePlaceHolders(inProgress);
65
+ return;
66
+ }
67
+ else if (isDoneWithErrors) {
68
+ this.statusMessage = this.replacePlaceHolders(doneWithErrors);
69
+ return;
70
+ }
71
+ return;
72
+ };
73
+ }
74
+ watchHandler(newValue, oldValue) {
75
+ if (newValue !== oldValue) {
76
+ this.getStatusMessage();
77
+ }
78
+ }
79
+ /**
80
+ * render() function
81
+ * Always the last one in the class.
82
+ */
83
+ render() {
84
+ return (h(Host, { role: "status", "aria-live": "assertive", "aria-atomic": "true", "aria-relevant": "all" },
85
+ h("duet-visually-hidden", null, this.statusMessage)));
86
+ }
87
+ static get is() { return "duet-upload-aria-status"; }
88
+ static get encapsulation() { return "shadow"; }
89
+ static get properties() { return {
90
+ "statusMessageLabel": {
91
+ "type": "unknown",
92
+ "mutable": false,
93
+ "complexType": {
94
+ "original": "StatusMessage",
95
+ "resolved": "{ inProgress: string; inProgressWithErrors: string; done: string; doneWithErrors: string; file: string; files: string; }",
96
+ "references": {
97
+ "StatusMessage": {
98
+ "location": "local"
99
+ }
100
+ }
101
+ },
102
+ "required": false,
103
+ "optional": false,
104
+ "docs": {
105
+ "tags": [],
106
+ "text": "State() variables"
107
+ },
108
+ "defaultValue": "null"
109
+ },
110
+ "accessibleAriaLive": {
111
+ "type": "string",
112
+ "mutable": false,
113
+ "complexType": {
114
+ "original": "\"off\" | \"polite\" | \"assertive\"",
115
+ "resolved": "\"assertive\" | \"off\" | \"polite\"",
116
+ "references": {}
117
+ },
118
+ "required": false,
119
+ "optional": false,
120
+ "docs": {
121
+ "tags": [],
122
+ "text": "Adds accessible label that is read aloud"
123
+ },
124
+ "attribute": "accessible-aria-live",
125
+ "reflect": false,
126
+ "defaultValue": "\"polite\""
127
+ },
128
+ "valid": {
129
+ "type": "number",
130
+ "mutable": false,
131
+ "complexType": {
132
+ "original": "number",
133
+ "resolved": "number",
134
+ "references": {}
135
+ },
136
+ "required": false,
137
+ "optional": false,
138
+ "docs": {
139
+ "tags": [],
140
+ "text": "valid file amount"
141
+ },
142
+ "attribute": "valid",
143
+ "reflect": false,
144
+ "defaultValue": "undefined"
145
+ },
146
+ "total": {
147
+ "type": "number",
148
+ "mutable": false,
149
+ "complexType": {
150
+ "original": "number",
151
+ "resolved": "number",
152
+ "references": {}
153
+ },
154
+ "required": false,
155
+ "optional": false,
156
+ "docs": {
157
+ "tags": [],
158
+ "text": "total files"
159
+ },
160
+ "attribute": "total",
161
+ "reflect": false,
162
+ "defaultValue": "undefined"
163
+ },
164
+ "invalid": {
165
+ "type": "number",
166
+ "mutable": false,
167
+ "complexType": {
168
+ "original": "number",
169
+ "resolved": "number",
170
+ "references": {}
171
+ },
172
+ "required": false,
173
+ "optional": false,
174
+ "docs": {
175
+ "tags": [],
176
+ "text": "invalid file amount"
177
+ },
178
+ "attribute": "invalid",
179
+ "reflect": false,
180
+ "defaultValue": "undefined"
181
+ },
182
+ "inprogress": {
183
+ "type": "number",
184
+ "mutable": false,
185
+ "complexType": {
186
+ "original": "number",
187
+ "resolved": "number",
188
+ "references": {}
189
+ },
190
+ "required": false,
191
+ "optional": false,
192
+ "docs": {
193
+ "tags": [],
194
+ "text": "valid file amount"
195
+ },
196
+ "attribute": "inprogress",
197
+ "reflect": false,
198
+ "defaultValue": "undefined"
199
+ }
200
+ }; }
201
+ static get states() { return {
202
+ "statusMessage": {}
203
+ }; }
204
+ static get watchers() { return [{
205
+ "propName": "valid",
206
+ "methodName": "watchHandler"
207
+ }, {
208
+ "propName": "invalid",
209
+ "methodName": "watchHandler"
210
+ }, {
211
+ "propName": "inprogress",
212
+ "methodName": "watchHandler"
213
+ }, {
214
+ "propName": "total",
215
+ "methodName": "watchHandler"
216
+ }]; }
217
+ }
@@ -0,0 +1,16 @@
1
+ /*!
2
+ * Built with Duet Design System
3
+ */
4
+ import { h } from "@stencil/core";
5
+ import { getI18nError } from "./errorcodes.utils";
6
+ export const ErrorItem = ({ data }) => {
7
+ const { item, error } = data;
8
+ const { name } = item;
9
+ const { type } = error;
10
+ return (h("span", { class: "duet-upload-item-error", role: "status" },
11
+ h("duet-paragraph", { class: "duet-upload-item-name", color: "danger", margin: "none", weight: "semi-bold" },
12
+ h("duet-icon", { margin: "none", size: "xx-small", name: "messaging-attachment" }),
13
+ " ",
14
+ name),
15
+ h("duet-paragraph", { class: "duet-upload-item-error-label", size: "small", margin: "none", color: "danger" }, getI18nError(type))));
16
+ };
@@ -0,0 +1,8 @@
1
+ /*!
2
+ * Built with Duet Design System
3
+ */
4
+ import { h } from "@stencil/core";
5
+ export const ProgressItem = ({ progress, name }) => (h("span", null,
6
+ h("duet-paragraph", { color: "secondary", margin: "none", size: "small" }, name),
7
+ h("duet-spacer", { size: "xx-small" }),
8
+ h("duet-progress", { progress: Math.ceil(progress), "aria-hidden": true })));
@@ -0,0 +1,30 @@
1
+ /*!
2
+ * Built with Duet Design System
3
+ */
4
+ import { h } from "@stencil/core";
5
+ import { formatBytes } from "./upload.helpers";
6
+ export const SuccessItem = ({ data, showLinks }) => {
7
+ const { item, size, uploaded, url, meta } = data;
8
+ const { name } = item;
9
+ const ContentName = (h("span", { class: "duet-upload-item-name" },
10
+ h("duet-icon", { margin: "none", size: "xx-small", name: "messaging-attachment" }),
11
+ h("duet-spacer", { size: "xx-small", direction: "horizontal" }),
12
+ name));
13
+ const SizeText = (h("span", { class: "duet-upload-item-size", style: { fontSize: "14px", fontWeight: "400" } },
14
+ "(",
15
+ formatBytes(size),
16
+ ")"));
17
+ const FilenameLine = uploaded && url && showLinks ? (h("duet-paragraph", { color: "secondary", margin: "none", weight: "semi-bold" },
18
+ h("duet-link", { url: url, external: true }, ContentName),
19
+ h("duet-spacer", { size: "xx-small", direction: "horizontal" }),
20
+ SizeText)) : (h("duet-paragraph", { color: "secondary", margin: "none", weight: "semi-bold" },
21
+ ContentName,
22
+ h("duet-spacer", { size: "xx-small", direction: "horizontal" }),
23
+ SizeText));
24
+ const Badges = meta && meta.badges ? (h("span", null,
25
+ h("duet-spacer", { size: "xx-small" }),
26
+ meta.badges.map(badgeText => (h("duet-badge", { color: "primary" }, badgeText))))) : undefined;
27
+ return (h("span", { class: "duet-upload-item-success" },
28
+ h("div", null, FilenameLine),
29
+ Badges));
30
+ };