@duetds/components 4.30.1 → 4.33.1

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 (427) hide show
  1. package/hydrate/index.js +1531 -442
  2. package/lib/cjs/{dom-e89ebf90.js → dom-c850c8d7.js} +1 -1
  3. package/lib/cjs/duet-alert.cjs.entry.js +4 -2
  4. package/lib/cjs/duet-badge.cjs.entry.js +2 -2
  5. package/lib/cjs/duet-button_2.cjs.entry.js +6 -5
  6. package/lib/cjs/duet-caption_4.cjs.entry.js +21 -15
  7. package/lib/cjs/duet-card.cjs.entry.js +6 -6
  8. package/lib/cjs/duet-checkbox.cjs.entry.js +2 -2
  9. package/lib/cjs/duet-choice_2.cjs.entry.js +55 -25
  10. package/lib/cjs/duet-collapsible.cjs.entry.js +5 -2
  11. package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
  12. package/lib/cjs/duet-date-picker.cjs.entry.js +23 -13
  13. package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
  14. package/lib/cjs/duet-editable-table-button.cjs.entry.js +89 -0
  15. package/lib/cjs/duet-editable-table_4.cjs.entry.js +1445 -0
  16. package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
  17. package/lib/cjs/duet-fieldset.cjs.entry.js +1 -1
  18. package/lib/cjs/duet-footer.cjs.entry.js +4 -4
  19. package/lib/cjs/duet-grid_2.cjs.entry.js +52 -4
  20. package/lib/cjs/duet-header_2.cjs.entry.js +26 -10
  21. package/lib/cjs/duet-hero.cjs.entry.js +6 -6
  22. package/lib/cjs/duet-icon.cjs.entry.js +21 -19
  23. package/lib/cjs/duet-input_2.cjs.entry.js +7 -7
  24. package/lib/cjs/duet-layout.cjs.entry.js +1 -1
  25. package/lib/cjs/duet-list_2.cjs.entry.js +2 -2
  26. package/lib/cjs/duet-modal.cjs.entry.js +8 -7
  27. package/lib/cjs/duet-notification_2.cjs.entry.js +6 -5
  28. package/lib/cjs/duet-number-input.cjs.entry.js +36 -15
  29. package/lib/cjs/duet-progress.cjs.entry.js +75 -0
  30. package/lib/cjs/duet-radio_2.cjs.entry.js +2 -2
  31. package/lib/cjs/duet-range-slider.cjs.entry.js +2 -2
  32. package/lib/cjs/duet-select.cjs.entry.js +6 -6
  33. package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
  34. package/lib/cjs/duet-tab_2.cjs.entry.js +12 -6
  35. package/lib/cjs/duet-textarea.cjs.entry.js +5 -5
  36. package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
  37. package/lib/cjs/duet-tooltip.cjs.entry.js +21 -10
  38. package/lib/cjs/duet-tray.cjs.entry.js +21 -10
  39. package/lib/cjs/duet-upload-aria-status.cjs.entry.js +100 -0
  40. package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
  41. package/lib/cjs/duet.cjs.js +4 -4
  42. package/lib/cjs/{focus-utils-7605778f.js → focus-utils-b609a7a5.js} +1 -1
  43. package/lib/cjs/{index-0c949193.js → index-9a57d969.js} +95 -77
  44. package/lib/cjs/{language-utils-70d6a9a4.js → language-utils-aa282901.js} +28 -9
  45. package/lib/cjs/loader.cjs.js +3 -3
  46. package/lib/cjs/{shadow-css-0c8c175b.js → shadow-css-e3edeed1.js} +9 -10
  47. package/lib/cjs/{string-utils-a6de43d8.js → string-utils-267e3dbb.js} +7 -0
  48. package/lib/cjs/{token-utils-13e5d13e.js → token-utils-63a9c8dc.js} +1 -1
  49. package/lib/cjs/{tokens.module-53b3bd92.js → tokens.module-6b2df1c2.js} +2 -0
  50. package/lib/cjs/{watch-options-3877c082.js → watch-options-d88afac0.js} +29 -6
  51. package/lib/collection/collection-manifest.json +16 -8
  52. package/lib/collection/components/duet-alert/duet-alert.js +12 -6
  53. package/lib/collection/components/duet-badge/duet-badge.css +1 -0
  54. package/lib/collection/components/duet-button/duet-button.js +17 -15
  55. package/lib/collection/components/duet-card/duet-card.css +30 -7
  56. package/lib/collection/components/duet-card/duet-card.js +4 -3
  57. package/lib/collection/components/duet-checkbox/duet-checkbox.css +1 -1
  58. package/lib/collection/components/duet-choice/duet-choice.css +16 -3
  59. package/lib/collection/components/duet-choice/duet-choice.js +122 -36
  60. package/lib/collection/components/duet-choice-group/duet-choice-group.css +1 -0
  61. package/lib/collection/components/duet-choice-group/duet-choice-group.js +4 -4
  62. package/lib/collection/components/duet-date-picker/duet-date-picker.css +1 -1
  63. package/lib/collection/components/duet-date-picker/duet-date-picker.js +78 -43
  64. package/lib/collection/components/duet-editable-table/duet-editable-table-button.css +32 -0
  65. package/lib/collection/components/duet-editable-table/duet-editable-table-button.js +218 -0
  66. package/lib/collection/components/duet-editable-table/duet-editable-table-item.css +36 -0
  67. package/lib/collection/components/duet-editable-table/duet-editable-table-item.js +203 -0
  68. package/lib/collection/components/duet-editable-table/duet-editable-table-tabledata.js +13 -0
  69. package/lib/collection/components/duet-editable-table/duet-editable-table.css +16 -0
  70. package/lib/collection/components/duet-editable-table/duet-editable-table.js +348 -0
  71. package/lib/collection/components/duet-footer/duet-footer.js +17 -15
  72. package/lib/collection/components/duet-grid/duet-grid.js +57 -6
  73. package/lib/collection/components/duet-grid-item/duet-grid-item.js +4 -4
  74. package/lib/collection/components/duet-header/duet-header.js +60 -35
  75. package/lib/collection/components/duet-heading/duet-heading.css +4 -0
  76. package/lib/collection/components/duet-heading/duet-heading.js +7 -6
  77. package/lib/collection/components/duet-hero/duet-hero.js +20 -15
  78. package/lib/collection/components/duet-icon/duet-icon.js +2 -6
  79. package/lib/collection/components/duet-icon/icon-utils.js +20 -13
  80. package/lib/collection/components/duet-input/duet-input.css +15 -0
  81. package/lib/collection/components/duet-input/duet-input.js +4 -4
  82. package/lib/collection/components/duet-label/duet-label.css +2 -0
  83. package/lib/collection/components/duet-link/duet-link.js +18 -19
  84. package/lib/collection/components/duet-logo/duet-logo.js +4 -4
  85. package/lib/collection/components/duet-modal/duet-modal.js +22 -17
  86. package/lib/collection/components/duet-notification/duet-notification.js +8 -8
  87. package/lib/collection/components/duet-notification-drawer/duet-notification-drawer.js +20 -15
  88. package/lib/collection/components/duet-number-input/duet-number-input.js +153 -29
  89. package/lib/collection/components/duet-paragraph/duet-paragraph.css +6 -0
  90. package/lib/collection/components/duet-paragraph/duet-paragraph.js +34 -3
  91. package/lib/collection/components/duet-progress/duet-progress.css +103 -0
  92. package/lib/collection/components/duet-progress/duet-progress.js +240 -0
  93. package/lib/collection/components/duet-radio/duet-radio.js +6 -6
  94. package/lib/collection/components/duet-select/duet-select.css +15 -0
  95. package/lib/collection/components/duet-select/duet-select.js +3 -3
  96. package/lib/collection/components/duet-step/duet-step.js +8 -8
  97. package/lib/collection/components/duet-tab-group/duet-tab-group.css +2 -2
  98. package/lib/collection/components/duet-tab-group/duet-tab-group.js +43 -12
  99. package/lib/collection/components/duet-textarea/duet-textarea.css +19 -0
  100. package/lib/collection/components/duet-textarea/duet-textarea.js +5 -4
  101. package/lib/collection/components/duet-tooltip/duet-tooltip.js +82 -20
  102. package/lib/collection/components/duet-tray/duet-tray.js +79 -17
  103. package/lib/collection/components/duet-upload/duet-upload.css +17 -86
  104. package/lib/collection/components/duet-upload/duet-upload.js +587 -164
  105. package/lib/collection/components/duet-upload/errorcodes.utils.js +16 -4
  106. package/lib/collection/components/duet-upload/upload-editable-item-error.js +16 -0
  107. package/lib/collection/components/duet-upload/upload-editable-item-inprogres.js +8 -0
  108. package/lib/collection/components/duet-upload/upload-editable-item-success.js +30 -0
  109. package/lib/collection/components/duet-upload/{duet-upload-validators.js → upload-validators.js} +0 -0
  110. package/lib/collection/components/duet-upload/xhr.helpers.js +2 -6
  111. package/lib/collection/components/duet-upload-aria-status/duet-upload-aria-status.js +217 -0
  112. package/lib/collection/utils/fixture-utils.js +7 -5
  113. package/lib/collection/utils/js-utils.js +12 -0
  114. package/lib/collection/utils/language-utils.js +26 -9
  115. package/lib/collection/utils/string-utils.js +6 -0
  116. package/lib/collection/utils/watch-options.js +35 -6
  117. package/lib/custom-elements-bundle/index.d.ts +30 -0
  118. package/lib/custom-elements-bundle/index.js +1651 -730
  119. package/lib/duet/duet.esm.js +1 -1
  120. package/lib/duet/duet.js +1 -1
  121. package/lib/duet/p-00210a63.entry.js +4 -0
  122. package/lib/duet/{p-66dde4d2.entry.js → p-0205162d.entry.js} +1 -1
  123. package/lib/duet/{p-3dc9d15d.system.entry.js → p-020a2c42.system.entry.js} +1 -1
  124. package/lib/duet/{p-59a07cf9.entry.js → p-079795e5.entry.js} +1 -1
  125. package/lib/duet/p-09013a48.system.entry.js +4 -0
  126. package/lib/duet/p-0a89315d.entry.js +4 -0
  127. package/lib/duet/p-0d22396e.system.js +16 -0
  128. package/lib/duet/p-0e90f075.system.entry.js +4 -0
  129. package/lib/duet/p-12721178.js +4 -0
  130. package/lib/duet/p-19d7d9d5.system.entry.js +4 -0
  131. package/lib/duet/p-1cbc6269.entry.js +4 -0
  132. package/lib/duet/p-2297d13f.system.entry.js +4 -0
  133. package/lib/duet/p-2764f081.js +4 -0
  134. package/lib/duet/p-2a822e91.system.entry.js +4 -0
  135. package/lib/duet/{p-f81d8534.entry.js → p-2fdcff82.entry.js} +1 -1
  136. package/lib/duet/p-3013c9bb.system.entry.js +4 -0
  137. package/lib/duet/p-3212a556.entry.js +4 -0
  138. package/lib/duet/{p-dee41056.system.entry.js → p-323643af.system.entry.js} +1 -1
  139. package/lib/duet/p-32b7397d.entry.js +4 -0
  140. package/lib/duet/{p-bd9a7d8f.js → p-35a3794e.js} +0 -0
  141. package/lib/duet/p-360086f8.entry.js +4 -0
  142. package/lib/duet/{p-f71f12ed.entry.js → p-37cda933.entry.js} +1 -1
  143. package/lib/duet/{p-62806bb6.system.entry.js → p-3ba62cf1.system.entry.js} +1 -1
  144. package/lib/duet/{p-322d1c38.js → p-3c1971d8.js} +1 -1
  145. package/lib/duet/p-3fd9190b.system.entry.js +4 -0
  146. package/lib/duet/p-43847557.entry.js +4 -0
  147. package/lib/duet/{p-bbc229d8.system.entry.js → p-4b6e8558.system.entry.js} +1 -1
  148. package/lib/duet/p-4c5eedf8.entry.js +4 -0
  149. package/lib/duet/p-4c827f0d.entry.js +4 -0
  150. package/lib/duet/{p-de2be65b.system.js → p-51955fc0.system.js} +1 -1
  151. package/lib/duet/p-5cfc53f9.entry.js +4 -0
  152. package/lib/duet/p-5decc259.system.entry.js +4 -0
  153. package/lib/duet/p-5e0071d6.js +4 -0
  154. package/lib/duet/p-5e77432e.system.entry.js +4 -0
  155. package/lib/duet/{p-ce1374a4.system.entry.js → p-6024e484.system.entry.js} +1 -1
  156. package/lib/duet/p-68008644.entry.js +4 -0
  157. package/lib/duet/p-69385972.system.entry.js +4 -0
  158. package/lib/duet/p-6a4d85ed.system.entry.js +4 -0
  159. package/lib/duet/{p-f82709ba.entry.js → p-6a5ab3eb.entry.js} +1 -1
  160. package/lib/duet/p-6e363557.system.js +4 -0
  161. package/lib/duet/p-6e4b1c0d.entry.js +4 -0
  162. package/lib/duet/p-6f36f647.system.entry.js +4 -0
  163. package/lib/duet/p-6fa6c4fb.system.entry.js +4 -0
  164. package/lib/duet/p-70fafc98.system.js +4 -0
  165. package/lib/duet/p-71a77368.system.entry.js +4 -0
  166. package/lib/duet/p-73f9db25.system.entry.js +4 -0
  167. package/lib/duet/p-74f4a0d8.system.entry.js +4 -0
  168. package/lib/duet/p-7530be48.system.entry.js +4 -0
  169. package/lib/duet/{p-36007600.entry.js → p-75edcaed.entry.js} +1 -1
  170. package/lib/duet/{p-d1817efe.system.entry.js → p-7a8597c2.system.entry.js} +1 -1
  171. package/lib/duet/{p-1cfe38b1.system.entry.js → p-85ad012a.system.entry.js} +1 -1
  172. package/lib/duet/{p-a321a98c.entry.js → p-85e52be8.entry.js} +1 -1
  173. package/lib/duet/p-8aaf3383.entry.js +4 -0
  174. package/lib/duet/p-986779fb.js +4 -0
  175. package/lib/duet/p-987edcd0.js +15 -0
  176. package/lib/duet/{p-35e45c19.system.js → p-9a945278.system.js} +1 -1
  177. package/lib/duet/p-9e79e033.entry.js +4 -0
  178. package/lib/duet/{p-7e108b7e.entry.js → p-9f35d682.entry.js} +1 -1
  179. package/lib/duet/{p-f71e337e.system.entry.js → p-a2a00146.system.entry.js} +1 -1
  180. package/lib/duet/p-a545398c.entry.js +4 -0
  181. package/lib/duet/{p-2826f987.js → p-ad07f399.js} +1 -1
  182. package/lib/duet/{p-4a7911fd.entry.js → p-af49d4f9.entry.js} +1 -1
  183. package/lib/duet/{p-1c41525a.entry.js → p-b25edbbe.entry.js} +1 -1
  184. package/lib/duet/p-b314348c.system.js +4 -0
  185. package/lib/duet/p-b4111e88.system.entry.js +4 -0
  186. package/lib/duet/p-b5c7d304.system.entry.js +4 -0
  187. package/lib/duet/p-b6e9860a.entry.js +4 -0
  188. package/lib/duet/p-ba18b56e.entry.js +4 -0
  189. package/lib/duet/p-bf4596bd.system.entry.js +4 -0
  190. package/lib/duet/{p-4265de16.system.entry.js → p-bf9f6d80.system.entry.js} +1 -1
  191. package/lib/duet/{p-fd98468a.system.js → p-c18a599e.system.js} +0 -0
  192. package/lib/duet/p-c1a1ea1b.js +4 -0
  193. package/lib/duet/p-c742856b.system.entry.js +4 -0
  194. package/lib/duet/p-cbdb9e98.system.entry.js +4 -0
  195. package/lib/duet/{p-27d538f7.system.entry.js → p-cf319832.system.entry.js} +1 -1
  196. package/lib/duet/p-d67fff56.entry.js +4 -0
  197. package/lib/duet/{p-031c2cd8.system.entry.js → p-dd76db9b.system.entry.js} +1 -1
  198. package/lib/duet/p-ddb6344c.system.js +4 -0
  199. package/lib/duet/{p-345ea4f2.system.entry.js → p-de5ec54e.system.entry.js} +1 -1
  200. package/lib/duet/p-df6f39a3.entry.js +4 -0
  201. package/lib/duet/p-e1dc86b5.system.js +4 -0
  202. package/lib/duet/p-e2596ea0.entry.js +4 -0
  203. package/lib/duet/p-e370c18b.entry.js +4 -0
  204. package/lib/duet/{p-e26116e0.system.entry.js → p-e48f3a32.system.entry.js} +1 -1
  205. package/lib/duet/p-e5031543.entry.js +4 -0
  206. package/lib/duet/p-e60ee8b0.entry.js +4 -0
  207. package/lib/duet/p-e70088d5.entry.js +4 -0
  208. package/lib/duet/p-e7b90769.system.entry.js +4 -0
  209. package/lib/duet/{p-a88df408.entry.js → p-e8123a53.entry.js} +1 -1
  210. package/lib/duet/p-eb55ccd2.system.js +4 -0
  211. package/lib/duet/{p-2d2c45f9.entry.js → p-ef7251bf.entry.js} +1 -1
  212. package/lib/duet/p-f0cfe033.system.entry.js +4 -0
  213. package/lib/duet/p-f2a087a8.system.entry.js +4 -0
  214. package/lib/duet/p-f5a55b3c.entry.js +4 -0
  215. package/lib/duet/p-fd613733.entry.js +4 -0
  216. package/lib/esm/{dom-21034390.js → dom-58cd15f6.js} +1 -1
  217. package/lib/esm/duet-alert.entry.js +4 -2
  218. package/lib/esm/duet-badge.entry.js +2 -2
  219. package/lib/esm/duet-button_2.entry.js +6 -5
  220. package/lib/esm/duet-caption_4.entry.js +21 -15
  221. package/lib/esm/duet-card.entry.js +6 -6
  222. package/lib/esm/duet-checkbox.entry.js +2 -2
  223. package/lib/esm/duet-choice_2.entry.js +56 -26
  224. package/lib/esm/duet-collapsible.entry.js +5 -2
  225. package/lib/esm/duet-cookie-consent.entry.js +1 -1
  226. package/lib/esm/duet-date-picker.entry.js +23 -13
  227. package/lib/esm/duet-divider_2.entry.js +1 -1
  228. package/lib/esm/duet-editable-table-button.entry.js +85 -0
  229. package/lib/esm/duet-editable-table_4.entry.js +1438 -0
  230. package/lib/esm/duet-empty-state.entry.js +1 -1
  231. package/lib/esm/duet-fieldset.entry.js +1 -1
  232. package/lib/esm/duet-footer.entry.js +4 -4
  233. package/lib/esm/duet-grid_2.entry.js +52 -4
  234. package/lib/esm/duet-header_2.entry.js +26 -10
  235. package/lib/esm/duet-hero.entry.js +6 -6
  236. package/lib/esm/duet-icon.entry.js +21 -19
  237. package/lib/esm/duet-input_2.entry.js +7 -7
  238. package/lib/esm/duet-layout.entry.js +1 -1
  239. package/lib/esm/duet-list_2.entry.js +2 -2
  240. package/lib/esm/duet-modal.entry.js +8 -7
  241. package/lib/esm/duet-notification_2.entry.js +6 -5
  242. package/lib/esm/duet-number-input.entry.js +36 -15
  243. package/lib/esm/duet-progress.entry.js +71 -0
  244. package/lib/esm/duet-radio_2.entry.js +2 -2
  245. package/lib/esm/duet-range-slider.entry.js +2 -2
  246. package/lib/esm/duet-select.entry.js +6 -6
  247. package/lib/esm/duet-step_2.entry.js +1 -1
  248. package/lib/esm/duet-tab_2.entry.js +12 -6
  249. package/lib/esm/duet-textarea.entry.js +5 -5
  250. package/lib/esm/duet-toggle.entry.js +1 -1
  251. package/lib/esm/duet-tooltip.entry.js +21 -10
  252. package/lib/esm/duet-tray.entry.js +21 -10
  253. package/lib/esm/duet-upload-aria-status.entry.js +96 -0
  254. package/lib/esm/duet-visually-hidden.entry.js +1 -1
  255. package/lib/esm/duet.js +4 -4
  256. package/lib/esm/{focus-utils-0b12f0df.js → focus-utils-aeb6ca93.js} +1 -1
  257. package/lib/esm/{index-f70ddc7f.js → index-e8c7d36f.js} +94 -78
  258. package/lib/esm/{language-utils-ab9c3afc.js → language-utils-344d894c.js} +28 -10
  259. package/lib/esm/loader.js +3 -3
  260. package/lib/esm/{shadow-css-31e2d504.js → shadow-css-7c726abb.js} +9 -10
  261. package/lib/esm/{string-utils-69cf0d09.js → string-utils-2f1793b8.js} +7 -1
  262. package/lib/esm/{token-utils-5a35377f.js → token-utils-590d9413.js} +1 -1
  263. package/lib/esm/{tokens.module-edb66c04.js → tokens.module-49cbf963.js} +3 -1
  264. package/lib/esm/watch-options-dd55bce8.js +57 -0
  265. package/lib/esm-es5/{dom-21034390.js → dom-58cd15f6.js} +0 -0
  266. package/lib/esm-es5/duet-alert.entry.js +1 -1
  267. package/lib/esm-es5/duet-badge.entry.js +1 -1
  268. package/lib/esm-es5/duet-button_2.entry.js +1 -1
  269. package/lib/esm-es5/duet-caption_4.entry.js +2 -2
  270. package/lib/esm-es5/duet-card.entry.js +1 -1
  271. package/lib/esm-es5/duet-checkbox.entry.js +1 -1
  272. package/lib/esm-es5/duet-choice_2.entry.js +1 -1
  273. package/lib/esm-es5/duet-collapsible.entry.js +1 -1
  274. package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
  275. package/lib/esm-es5/duet-date-picker.entry.js +1 -1
  276. package/lib/esm-es5/duet-divider_2.entry.js +1 -1
  277. package/lib/esm-es5/duet-editable-table-button.entry.js +4 -0
  278. package/lib/esm-es5/duet-editable-table_4.entry.js +4 -0
  279. package/lib/esm-es5/duet-empty-state.entry.js +1 -1
  280. package/lib/esm-es5/duet-fieldset.entry.js +1 -1
  281. package/lib/esm-es5/duet-footer.entry.js +1 -1
  282. package/lib/esm-es5/duet-grid_2.entry.js +2 -2
  283. package/lib/esm-es5/duet-header_2.entry.js +1 -1
  284. package/lib/esm-es5/duet-hero.entry.js +1 -1
  285. package/lib/esm-es5/duet-icon.entry.js +2 -2
  286. package/lib/esm-es5/duet-input_2.entry.js +1 -1
  287. package/lib/esm-es5/duet-layout.entry.js +1 -1
  288. package/lib/esm-es5/duet-list_2.entry.js +1 -1
  289. package/lib/esm-es5/duet-modal.entry.js +1 -1
  290. package/lib/esm-es5/duet-notification_2.entry.js +1 -1
  291. package/lib/esm-es5/duet-number-input.entry.js +2 -2
  292. package/lib/esm-es5/duet-progress.entry.js +4 -0
  293. package/lib/esm-es5/duet-radio_2.entry.js +1 -1
  294. package/lib/esm-es5/duet-range-slider.entry.js +1 -1
  295. package/lib/esm-es5/duet-select.entry.js +1 -1
  296. package/lib/esm-es5/duet-step_2.entry.js +1 -1
  297. package/lib/esm-es5/duet-tab_2.entry.js +2 -2
  298. package/lib/esm-es5/duet-textarea.entry.js +1 -1
  299. package/lib/esm-es5/duet-toggle.entry.js +1 -1
  300. package/lib/esm-es5/duet-tooltip.entry.js +1 -1
  301. package/lib/esm-es5/duet-tray.entry.js +1 -1
  302. package/lib/esm-es5/duet-upload-aria-status.entry.js +4 -0
  303. package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
  304. package/lib/esm-es5/duet.js +1 -1
  305. package/lib/esm-es5/focus-utils-aeb6ca93.js +4 -0
  306. package/lib/esm-es5/index-e8c7d36f.js +4 -0
  307. package/lib/esm-es5/language-utils-344d894c.js +4 -0
  308. package/lib/esm-es5/loader.js +1 -1
  309. package/lib/esm-es5/shadow-css-7c726abb.js +15 -0
  310. package/lib/esm-es5/{string-utils-69cf0d09.js → string-utils-2f1793b8.js} +1 -1
  311. package/lib/esm-es5/{token-utils-5a35377f.js → token-utils-590d9413.js} +1 -1
  312. package/lib/esm-es5/tokens.module-49cbf963.js +4 -0
  313. package/lib/esm-es5/watch-options-dd55bce8.js +4 -0
  314. package/lib/html.html-data.json +4906 -0
  315. package/lib/types/components/duet-alert/duet-alert.d.ts +2 -1
  316. package/lib/types/components/duet-button/duet-button.d.ts +1 -1
  317. package/lib/types/components/duet-choice/duet-choice.d.ts +24 -5
  318. package/lib/types/components/duet-date-picker/duet-date-picker.d.ts +15 -9
  319. package/lib/types/components/duet-editable-table/duet-editable-table-button.d.ts +72 -0
  320. package/lib/types/components/duet-editable-table/duet-editable-table-item.d.ts +72 -0
  321. package/lib/types/components/duet-editable-table/duet-editable-table-tabledata.d.ts +7 -0
  322. package/lib/types/components/duet-editable-table/duet-editable-table.d.ts +84 -0
  323. package/lib/types/components/duet-footer/duet-footer.d.ts +1 -1
  324. package/lib/types/components/duet-grid/duet-grid.d.ts +16 -2
  325. package/lib/types/components/duet-header/duet-header.d.ts +21 -5
  326. package/lib/types/components/duet-heading/duet-heading.d.ts +2 -2
  327. package/lib/types/components/duet-hero/duet-hero.d.ts +3 -3
  328. package/lib/types/components/duet-icon/duet-icon.d.ts +1 -1
  329. package/lib/types/components/duet-icon/icon-utils.d.ts +1 -1
  330. package/lib/types/components/duet-link/duet-link.d.ts +2 -3
  331. package/lib/types/components/duet-modal/duet-modal.d.ts +3 -3
  332. package/lib/types/components/duet-notification-drawer/duet-notification-drawer.d.ts +3 -3
  333. package/lib/types/components/duet-number-input/duet-number-input.d.ts +21 -0
  334. package/lib/types/components/duet-paragraph/duet-paragraph.d.ts +9 -1
  335. package/lib/types/components/duet-progress/duet-progress.d.ts +64 -0
  336. package/lib/types/components/duet-tab-group/duet-tab-group.d.ts +6 -0
  337. package/lib/types/components/duet-tooltip/duet-tooltip.d.ts +11 -0
  338. package/lib/types/components/duet-tray/duet-tray.d.ts +11 -0
  339. package/lib/types/components/duet-upload/duet-upload.d.ts +124 -31
  340. package/lib/types/components/duet-upload/errorcodes.utils.d.ts +1 -0
  341. package/lib/types/components/duet-upload/upload-editable-item-error.d.ts +7 -0
  342. package/lib/types/components/duet-upload/upload-editable-item-inprogres.d.ts +7 -0
  343. package/lib/types/components/duet-upload/upload-editable-item-success.d.ts +8 -0
  344. package/lib/types/components/duet-upload/{duet-upload-validators.d.ts → upload-validators.d.ts} +0 -0
  345. package/lib/types/components/duet-upload/xhr.helpers.d.ts +7 -1
  346. package/lib/types/components/duet-upload-aria-status/duet-upload-aria-status.d.ts +49 -0
  347. package/lib/types/components.d.ts +619 -87
  348. package/lib/types/utils/js-utils.d.ts +1 -0
  349. package/lib/types/utils/language-utils.d.ts +8 -3
  350. package/lib/types/utils/string-utils.d.ts +1 -0
  351. package/lib/types/utils/watch-options.d.ts +2 -0
  352. package/package.json +20 -15
  353. package/lib/cjs/duet-table.cjs.entry.js +0 -132
  354. package/lib/cjs/duet-upload.cjs.entry.js +0 -866
  355. package/lib/collection/components/duet-upload/duet-upload-file-list.js +0 -49
  356. package/lib/duet/p-0733c303.system.entry.js +0 -4
  357. package/lib/duet/p-095060cc.js +0 -4
  358. package/lib/duet/p-156864a1.system.entry.js +0 -4
  359. package/lib/duet/p-15c15c6a.js +0 -15
  360. package/lib/duet/p-1911dfe7.system.entry.js +0 -4
  361. package/lib/duet/p-2834a302.entry.js +0 -4
  362. package/lib/duet/p-28a3d38f.system.entry.js +0 -4
  363. package/lib/duet/p-2a1a9f9f.entry.js +0 -4
  364. package/lib/duet/p-2a4d7c5b.system.entry.js +0 -4
  365. package/lib/duet/p-4095dba5.entry.js +0 -4
  366. package/lib/duet/p-418b2ce7.system.js +0 -4
  367. package/lib/duet/p-4289b543.entry.js +0 -4
  368. package/lib/duet/p-43e39d98.system.js +0 -4
  369. package/lib/duet/p-46a3ae43.system.js +0 -4
  370. package/lib/duet/p-4a38cf9d.entry.js +0 -4
  371. package/lib/duet/p-4be8e814.entry.js +0 -4
  372. package/lib/duet/p-591b2137.entry.js +0 -4
  373. package/lib/duet/p-5c5bdb06.system.entry.js +0 -4
  374. package/lib/duet/p-5f70e318.entry.js +0 -4
  375. package/lib/duet/p-62c294d6.system.entry.js +0 -4
  376. package/lib/duet/p-6a356ab1.system.js +0 -4
  377. package/lib/duet/p-6c2729da.js +0 -4
  378. package/lib/duet/p-6f107847.system.entry.js +0 -4
  379. package/lib/duet/p-77a5fe4c.system.js +0 -4
  380. package/lib/duet/p-7809e78b.system.entry.js +0 -4
  381. package/lib/duet/p-7a36d76f.system.entry.js +0 -4
  382. package/lib/duet/p-7ee52f58.entry.js +0 -4
  383. package/lib/duet/p-884693f1.entry.js +0 -4
  384. package/lib/duet/p-8977b722.entry.js +0 -4
  385. package/lib/duet/p-89db3b94.entry.js +0 -4
  386. package/lib/duet/p-8cfce39e.system.entry.js +0 -4
  387. package/lib/duet/p-8ffe1461.system.entry.js +0 -4
  388. package/lib/duet/p-9381c2d4.entry.js +0 -4
  389. package/lib/duet/p-9a450c9a.entry.js +0 -4
  390. package/lib/duet/p-9a89ec39.js +0 -4
  391. package/lib/duet/p-9bbfe606.system.entry.js +0 -4
  392. package/lib/duet/p-a0a066cb.system.entry.js +0 -4
  393. package/lib/duet/p-a6096b05.system.entry.js +0 -4
  394. package/lib/duet/p-a89d5d7c.entry.js +0 -4
  395. package/lib/duet/p-b07055fd.system.entry.js +0 -4
  396. package/lib/duet/p-b4374f0e.entry.js +0 -4
  397. package/lib/duet/p-b456d684.system.entry.js +0 -4
  398. package/lib/duet/p-bd18c93f.js +0 -4
  399. package/lib/duet/p-bddb1c15.system.entry.js +0 -4
  400. package/lib/duet/p-c0b95b58.entry.js +0 -4
  401. package/lib/duet/p-c3688975.entry.js +0 -4
  402. package/lib/duet/p-c4d183e6.entry.js +0 -4
  403. package/lib/duet/p-c9303f9a.entry.js +0 -4
  404. package/lib/duet/p-cd4e8ccf.js +0 -4
  405. package/lib/duet/p-ceb75b35.system.entry.js +0 -4
  406. package/lib/duet/p-cf243bcb.system.entry.js +0 -4
  407. package/lib/duet/p-d37c8a05.system.js +0 -4
  408. package/lib/duet/p-d989af11.entry.js +0 -4
  409. package/lib/duet/p-e58ca7af.system.js +0 -16
  410. package/lib/duet/p-e6128d82.system.entry.js +0 -4
  411. package/lib/duet/p-e86cdc17.entry.js +0 -4
  412. package/lib/duet/p-eadb29c7.entry.js +0 -4
  413. package/lib/duet/p-f30b14d6.system.entry.js +0 -4
  414. package/lib/duet/p-f79f8da1.entry.js +0 -4
  415. package/lib/duet/p-fc397e03.system.entry.js +0 -4
  416. package/lib/esm/duet-table.entry.js +0 -128
  417. package/lib/esm/duet-upload.entry.js +0 -862
  418. package/lib/esm/watch-options-de55ea78.js +0 -35
  419. package/lib/esm-es5/duet-table.entry.js +0 -4
  420. package/lib/esm-es5/duet-upload.entry.js +0 -4
  421. package/lib/esm-es5/focus-utils-0b12f0df.js +0 -4
  422. package/lib/esm-es5/index-f70ddc7f.js +0 -4
  423. package/lib/esm-es5/language-utils-ab9c3afc.js +0 -4
  424. package/lib/esm-es5/shadow-css-31e2d504.js +0 -15
  425. package/lib/esm-es5/tokens.module-edb66c04.js +0 -4
  426. package/lib/esm-es5/watch-options-de55ea78.js +0 -4
  427. package/lib/types/components/duet-upload/duet-upload-file-list.d.ts +0 -9
package/hydrate/index.js CHANGED
@@ -6,7 +6,7 @@
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
8
  /*!
9
- Stencil Mock Doc v2.9.0 | MIT Licensed | https://stenciljs.com
9
+ Stencil Mock Doc v2.11.0 | MIT Licensed | https://stenciljs.com
10
10
  */
11
11
  const CONTENT_REF_ID = 'r';
12
12
  const ORG_LOCATION_ID = 'o';
@@ -4700,8 +4700,19 @@ function hydrateFactory($stencilWindow, $stencilHydrateOpts, $stencilHydrateResu
4700
4700
  /*hydrateAppClosure start*/
4701
4701
 
4702
4702
 
4703
+ var process = require('process');
4704
+
4705
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
4706
+
4707
+ var process__default = /*#__PURE__*/_interopDefaultLegacy(process);
4708
+
4709
+ var global$1 = (typeof global !== "undefined" ? global :
4710
+ typeof self !== "undefined" ? self :
4711
+ typeof window !== "undefined" ? window : {});
4712
+
4703
4713
  const NAMESPACE = 'duet';
4704
4714
  const BUILD = /* duet */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: true, constructableCSS: false, cssAnnotations: true, cssVarShim: false, devTools: false, disconnectedCallback: true, dynamicImportShim: false, element: false, event: true, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: true, hydrateServerSide: true, hydratedAttribute: false, hydratedClass: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, safari10: false, scoped: true, scriptDataOpts: false, shadowDelegatesFocus: true, shadowDom: true, shadowDomShim: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
4715
+ const Env = /* duet */ {"cdnURILocal":"http://0.0.0.0:3334","cdnURIProd":"https://cdn.duetds.com/api","duetIconVersion":"2.2.4"};
4705
4716
 
4706
4717
  const TAB_KEY = 9;
4707
4718
  var appGlobalScript = () => {
@@ -4742,7 +4753,7 @@ function forceUpdate() {}
4742
4753
 
4743
4754
  function hydrateApp(e, t, o, n, s) {
4744
4755
  function l() {
4745
- if (global.clearTimeout(p), i.clear(), r.clear(), !h) {
4756
+ if (global$1.clearTimeout(p), i.clear(), r.clear(), !h) {
4746
4757
  h = !0;
4747
4758
  try {
4748
4759
  t.clientHydrateAnnotations && insertVdomAnnotations(e.document, t.staticComponents),
@@ -4837,7 +4848,7 @@ function hydrateApp(e, t, o, n, s) {
4837
4848
  }, e.document.createElementNS = function t(o, n) {
4838
4849
  const s = $.call(e.document, o, n);
4839
4850
  return f(s), s;
4840
- }, p = global.setTimeout((function L() {
4851
+ }, p = global$1.setTimeout((function L() {
4841
4852
  a(`Hydrate exceeded timeout${function e(t) {
4842
4853
  return Array.from(t).map(waitingOnElementMsg);
4843
4854
  }(d)}`);
@@ -5321,7 +5332,8 @@ const callRender = (e, t, o) => {
5321
5332
  s.attributeChangedCallback = function(e, t, n) {
5322
5333
  plt.jmp((() => {
5323
5334
  const t = o.get(e);
5324
- this.hasOwnProperty(t) && (n = this[t], delete this[t]), this[t] = (null !== n || "boolean" != typeof this[t]) && n;
5335
+ if (this.hasOwnProperty(t)) n = this[t], delete this[t]; else if (s.hasOwnProperty(t) && "number" == typeof this[t] && this[t] == n) return;
5336
+ this[t] = (null !== n || "boolean" != typeof this[t]) && n;
5325
5337
  }));
5326
5338
  }, e.observedAttributes = n.filter((([e, t]) => 15 & t[0])).map((([e, n]) => {
5327
5339
  const s = n[1] || e;
@@ -5504,7 +5516,7 @@ const cmpModules = new Map, getModule = e => {
5504
5516
  });
5505
5517
  }
5506
5518
  }, win = window, doc = win.document, writeTask = e => {
5507
- process.nextTick((() => {
5519
+ process__default['default'].nextTick((() => {
5508
5520
  try {
5509
5521
  e();
5510
5522
  } catch (e) {
@@ -5538,6 +5550,51 @@ const cmpModules = new Map, getModule = e => {
5538
5550
  isTesting: !1
5539
5551
  }, styles = new Map;
5540
5552
 
5553
+ function isObject(maybeObj) {
5554
+ return Object.prototype.toString.call(maybeObj) === "[object Object]";
5555
+ }
5556
+ const parsePossibleJSON = (maybeJSON) => {
5557
+ if (Array.isArray(maybeJSON) || isObject(maybeJSON)) {
5558
+ return maybeJSON;
5559
+ }
5560
+ if (typeof maybeJSON === "string") {
5561
+ try {
5562
+ return JSON.parse(maybeJSON);
5563
+ }
5564
+ catch (e) {
5565
+ console.warn(e);
5566
+ }
5567
+ }
5568
+ // undefined is not a type in JSON,
5569
+ // so we use it here to signal invalid input
5570
+ return undefined;
5571
+ };
5572
+ /**
5573
+ * Format string, via simplistic sprintf equivalent
5574
+ * @example String.format('{0} is super, but {1} is best! {{0}}', 'Duet', 'Coffee'); -> "Duet is super, but Coffee ist best! {0}"
5575
+ *
5576
+ */
5577
+ // @ts-ignore
5578
+ if (!String.format) {
5579
+ // @ts-ignore
5580
+ String.format = function (format) {
5581
+ var args = Array.prototype.slice.call(arguments, 1);
5582
+ return format.replace(/\{\{|\}\}|\{(\d+)\}/g, function (curlyBrack, index) {
5583
+ return curlyBrack == "{{" ? "{" : curlyBrack == "}}" ? "}" : args[index];
5584
+ });
5585
+ };
5586
+ }
5587
+ const MATCH_DISALLOWED_CHARS = /[^a-z0-9áéíóúñüöäå \.,_-]/gim;
5588
+ function sanitizeString$1(string) {
5589
+ return string.replace(MATCH_DISALLOWED_CHARS, "").trim();
5590
+ }
5591
+ const convertHtmlQuotes = string => {
5592
+ if (typeof string === "string") {
5593
+ return string.replace(/"/g, '"').replace(/'/g, '"');
5594
+ }
5595
+ return string;
5596
+ };
5597
+
5541
5598
  const localeLookUpTable = {
5542
5599
  fi: "fi-FI",
5543
5600
  en: "en-GB",
@@ -5552,13 +5609,13 @@ const localeMonetarySignifierLookUpTable = {
5552
5609
  };
5553
5610
  const defLanguageArray = ["fi", "en", "sv"];
5554
5611
  const defaultLanguage = "fi";
5555
- const currentLanguage = document.documentElement.lang
5556
- ? document.documentElement.lang.toLowerCase()
5557
- : defaultLanguage;
5612
+ const getCurrentLanguage = () => {
5613
+ return document.documentElement.lang ? document.documentElement.lang.toLowerCase() : defaultLanguage;
5614
+ };
5558
5615
  const isOfTypeLanguage = (keyInput) => {
5559
5616
  return defLanguageArray.includes(keyInput);
5560
5617
  };
5561
- const checkForLanguage = (languageString = currentLanguage) => {
5618
+ const checkForLanguage = (languageString = getCurrentLanguage()) => {
5562
5619
  if (isOfTypeLanguage(languageString)) {
5563
5620
  return languageString;
5564
5621
  }
@@ -5572,7 +5629,7 @@ const checkForLanguage = (languageString = currentLanguage) => {
5572
5629
  * @param {string} lang=fi - "fi" | "sv" | "en"
5573
5630
  * @default {string} "fi"
5574
5631
  */
5575
- const getLanguage = (languageString = currentLanguage) => checkForLanguage(languageString);
5632
+ const getLanguage = (languageString = getCurrentLanguage()) => checkForLanguage(languageString);
5576
5633
  /**
5577
5634
  * Returns the current language and locale
5578
5635
  * If language is not fi|sv|en it will default to "fi"
@@ -5590,21 +5647,37 @@ const getLocale = (lang) => {
5590
5647
  }
5591
5648
  throw new Error(`Locale for "${lang}" not found`);
5592
5649
  };
5650
+ /**
5651
+ * Takes any json object that is passed and/or htmlencoded and converts it to proper json
5652
+ */
5653
+ const sanitizeString = (string) => {
5654
+ const argIsString = typeof string === "string";
5655
+ if (argIsString) {
5656
+ try {
5657
+ return JSON.parse(convertHtmlQuotes(string));
5658
+ }
5659
+ catch (e) {
5660
+ console.log("sanitizeString received a string, that didnt parse to json object", string, e);
5661
+ }
5662
+ }
5663
+ return string;
5664
+ };
5593
5665
  /**
5594
5666
  * Returns the current string / object from a given translation object
5595
5667
  * If language is not fi|sv|en it will default to "fi"
5596
5668
  * special case where lang can be ALSO be "us" in addition to other types - if user decides to override local language
5597
- * @param {object} langObject - {fi: "finnish", sv: "swedish", en: "english"}
5669
+ * @param {object} langObject - {fi: "finnish", sv: "swedish", en: "english"} | string will get JSON.parsed
5598
5670
  * @param {boolean} languageOverride = false - in case you want to override the actual language set in html tag
5599
5671
  * @default {object} {locale: "fi-FI", money: "€"}
5600
- * @returns {(string|Object)} given example contains {fi:"something"} and langua===fi this will return "something"
5672
+ * @returns {(string|Object)} given example contains {fi:"something"} and language===fi this will return "something"
5601
5673
  */
5602
5674
  const getLocaleString = (langObject, languageOverride) => {
5675
+ const obj = sanitizeString(langObject);
5603
5676
  if (languageOverride) {
5604
- return langObject[checkForLanguage(languageOverride)];
5677
+ return obj[checkForLanguage(languageOverride)];
5605
5678
  }
5606
5679
  else {
5607
- return langObject[getLanguage()];
5680
+ return obj[getLanguage()];
5608
5681
  }
5609
5682
  };
5610
5683
 
@@ -5632,6 +5705,7 @@ class DuetAlert {
5632
5705
  /**
5633
5706
  * Property to change languageDefaults on the component.
5634
5707
  * normally you would handle these strings on an application level and override @accessibleLabel when needed
5708
+ * @default {fi: "Sulje viesti", sv: "Stäng meddelandet", en: "Close the message"}
5635
5709
  */
5636
5710
  this.accessibleLabelDefaults = {
5637
5711
  fi: "Sulje viesti",
@@ -5714,7 +5788,7 @@ class DuetAlert {
5714
5788
  "$tagName$": "duet-alert",
5715
5789
  "$members$": {
5716
5790
  "theme": [1025],
5717
- "accessibleLabelDefaults": [16],
5791
+ "accessibleLabelDefaults": [1, "accessible-label-default"],
5718
5792
  "accessibleLabel": [1, "accessible-label"],
5719
5793
  "announcements": [4],
5720
5794
  "icon": [1],
@@ -5732,7 +5806,7 @@ class DuetAlert {
5732
5806
  }; }
5733
5807
  }
5734
5808
 
5735
- const duetBadgeCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-badge,*.sc-duet-badge::after,*.sc-duet-badge::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-badge-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:4px !important;margin-bottom:2px !important;display:inline-block;width:auto;vertical-align:middle}/*!@:host:last-child, :host:last-of-type*/.sc-duet-badge-h:last-child,.sc-duet-badge-h:last-of-type{margin-right:0 !important}/*!@:host(.duet-m-0)*/.duet-m-0.sc-duet-badge-h{margin:0 !important}/*!@.duet-badge*/.duet-badge.sc-duet-badge{width:100%;padding:4.4444444444px 12px 5.4444444444px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0.75rem;font-style:normal;font-weight:600;line-height:1.25;color:#00294d;text-align:center;vertical-align:middle;background:#e6f1f7;border-radius:20rem}/*!@.duet-badge.duet-p-0*/.duet-badge.duet-p-0.sc-duet-badge{padding:0 !important}/*!@.duet-badge.duet-m-0*/.duet-badge.duet-m-0.sc-duet-badge{margin:0 !important}/*!@.duet-badge.duet-theme-turva*/.duet-badge.duet-theme-turva.sc-duet-badge{padding:5.4444444444px 12px 4.4444444444px;font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-weight:700;color:#171c3a;background:#e8e8eb}/*!@.duet-badge.warning*/.duet-badge.warning.sc-duet-badge{background:#fef3df}/*!@.duet-badge.warning.duet-theme-turva*/.duet-badge.warning.duet-theme-turva.sc-duet-badge{background:#fef1db}/*!@.duet-badge.danger*/.duet-badge.danger.sc-duet-badge{background:#fce9ef}/*!@.duet-badge.danger.duet-theme-turva*/.duet-badge.danger.duet-theme-turva.sc-duet-badge{background:#fceae7}/*!@.duet-badge.success*/.duet-badge.success.sc-duet-badge{background:#e6f3ef}/*!@.duet-badge.success.duet-theme-turva*/.duet-badge.success.duet-theme-turva.sc-duet-badge{background:#e6f3ed}";
5809
+ const duetBadgeCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-badge,*.sc-duet-badge::after,*.sc-duet-badge::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-badge-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:4px !important;margin-bottom:2px !important;display:inline-block;width:auto;vertical-align:middle}/*!@:host:last-child, :host:last-of-type*/.sc-duet-badge-h:last-child,.sc-duet-badge-h:last-of-type{margin-right:0 !important}/*!@:host(.duet-m-0)*/.duet-m-0.sc-duet-badge-h{margin:0 !important}/*!@.duet-badge*/.duet-badge.sc-duet-badge{width:100%;padding:4.4444444444px 12px 5.4444444444px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0.75rem;font-style:normal;font-weight:600;line-height:1.25;color:#00294d;text-align:center;word-break:break-word;vertical-align:middle;background:#e6f1f7;border-radius:20rem}/*!@.duet-badge.duet-p-0*/.duet-badge.duet-p-0.sc-duet-badge{padding:0 !important}/*!@.duet-badge.duet-m-0*/.duet-badge.duet-m-0.sc-duet-badge{margin:0 !important}/*!@.duet-badge.duet-theme-turva*/.duet-badge.duet-theme-turva.sc-duet-badge{padding:5.4444444444px 12px 4.4444444444px;font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-weight:700;color:#171c3a;background:#e8e8eb}/*!@.duet-badge.warning*/.duet-badge.warning.sc-duet-badge{background:#fef3df}/*!@.duet-badge.warning.duet-theme-turva*/.duet-badge.warning.duet-theme-turva.sc-duet-badge{background:#fef1db}/*!@.duet-badge.danger*/.duet-badge.danger.sc-duet-badge{background:#fce9ef}/*!@.duet-badge.danger.duet-theme-turva*/.duet-badge.danger.duet-theme-turva.sc-duet-badge{background:#fceae7}/*!@.duet-badge.success*/.duet-badge.success.sc-duet-badge{background:#e6f3ef}/*!@.duet-badge.success.duet-theme-turva*/.duet-badge.success.duet-theme-turva.sc-duet-badge{background:#e6f3ed}";
5736
5810
 
5737
5811
  class DuetBadge {
5738
5812
  constructor(hostRef) {
@@ -5903,6 +5977,7 @@ const sizeTappableSquare = "48px";
5903
5977
  const sizeIconXSmall = "16px";
5904
5978
  const sizeIconXxxSmall = "7px";
5905
5979
  const sizeButtonBorder = "2px";
5980
+ const sizeButtonTinyBorder = "1px";
5906
5981
  const sizeIconMedium = "24px";
5907
5982
  const sizeIconSmall = "20px";
5908
5983
  const opacity85 = "0.85";
@@ -6052,6 +6127,7 @@ var tokens$2 = /*#__PURE__*/Object.freeze({
6052
6127
  sizeIconXSmall: sizeIconXSmall,
6053
6128
  sizeIconXxxSmall: sizeIconXxxSmall,
6054
6129
  sizeButtonBorder: sizeButtonBorder,
6130
+ sizeButtonTinyBorder: sizeButtonTinyBorder,
6055
6131
  sizeIconMedium: sizeIconMedium,
6056
6132
  sizeIconSmall: sizeIconSmall,
6057
6133
  opacity85: opacity85,
@@ -6179,7 +6255,7 @@ class DuetButton {
6179
6255
  * Adds accessible label for tooltip that is shown in external link (url & external have both been set)
6180
6256
  * @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"}
6181
6257
  */
6182
- this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults, this.language);
6258
+ this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults);
6183
6259
  /**
6184
6260
  * Icon to display to the left of the button content.
6185
6261
  * This is ignored/overridden when button is used as an external link.
@@ -6365,7 +6441,7 @@ class DuetButton {
6365
6441
  "submit": [516],
6366
6442
  "external": [4],
6367
6443
  "language": [1],
6368
- "accessibleLabelExternalDefaults": [16],
6444
+ "accessibleLabelExternalDefaults": [1, "accessible-label-external-default"],
6369
6445
  "accessibleLabelExternal": [1, "accessible-label-external"],
6370
6446
  "icon": [1],
6371
6447
  "color": [1],
@@ -6459,46 +6535,7 @@ const isQuestionKey = (e) => e.key === "?";
6459
6535
  const isEnterKey = (e) => e.key === "Enter" || e.keyCode === 13;
6460
6536
  const isKeyboardClick = (e) => isEnterKey(e) || isSpaceKey(e);
6461
6537
 
6462
- function isObject(maybeObj) {
6463
- return Object.prototype.toString.call(maybeObj) === "[object Object]";
6464
- }
6465
- const parsePossibleJSON = (maybeJSON) => {
6466
- if (Array.isArray(maybeJSON) || isObject(maybeJSON)) {
6467
- return maybeJSON;
6468
- }
6469
- if (typeof maybeJSON === "string") {
6470
- try {
6471
- return JSON.parse(maybeJSON);
6472
- }
6473
- catch (e) {
6474
- console.warn(e);
6475
- }
6476
- }
6477
- // undefined is not a type in JSON,
6478
- // so we use it here to signal invalid input
6479
- return undefined;
6480
- };
6481
- /**
6482
- * Format string, via simplistic sprintf equivalent
6483
- * @example String.format('{0} is super, but {1} is best! {{0}}', 'Duet', 'Coffee'); -> "Duet is super, but Coffee ist best! {0}"
6484
- *
6485
- */
6486
- // @ts-ignore
6487
- if (!String.format) {
6488
- // @ts-ignore
6489
- String.format = function (format) {
6490
- var args = Array.prototype.slice.call(arguments, 1);
6491
- return format.replace(/\{\{|\}\}|\{(\d+)\}/g, function (curlyBrack, index) {
6492
- return curlyBrack == "{{" ? "{" : curlyBrack == "}}" ? "}" : args[index];
6493
- });
6494
- };
6495
- }
6496
- const MATCH_DISALLOWED_CHARS = /[^a-z0-9áéíóúñüöäå \.,_-]/gim;
6497
- function sanitizeString(string) {
6498
- return string.replace(MATCH_DISALLOWED_CHARS, "").trim();
6499
- }
6500
-
6501
- const duetCardCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-card,*.sc-duet-card::after,*.sc-duet-card::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-card-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:flex;width:100%;vertical-align:top}/*!@:host(.duet-card-info)*/.duet-card-info.sc-duet-card-h{margin-bottom:16px !important}/*!@:host(.duet-m-0)*/.duet-m-0.sc-duet-card-h{margin:0 !important}/*!@.duet-card*/.duet-card.sc-duet-card{padding:20px !important;position:relative;display:block;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-style:normal;font-weight:400;line-height:1.5;color:#00294d;text-decoration:none;border-radius:4px;box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07)}/*!@.duet-card.duet-p-0*/.duet-card.duet-p-0.sc-duet-card{padding:0 !important}/*!@.duet-card.duet-m-0*/.duet-card.duet-m-0.sc-duet-card{margin:0 !important}/*!@.duet-card:focus*/.duet-card.sc-duet-card:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}/*!@.duet-theme-turva .duet-card:focus, .duet-card:focus.duet-theme-turva*/.duet-theme-turva.sc-duet-card .duet-card.sc-duet-card:focus,.duet-card.sc-duet-card:focus.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}@media (min-width: 36em){/*!@.duet-card*/.duet-card.sc-duet-card{padding:28px !important}}/*!@.duet-card.duet-theme-turva*/.duet-card.duet-theme-turva.sc-duet-card{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a;box-shadow:0 2px 6px 0 rgba(117, 117, 117, 0.13), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07)}@media (min-width: 36em){/*!@.duet-card.x-small*/.duet-card.x-small.sc-duet-card{padding:20px !important}}@media (min-width: 36em){/*!@.duet-card.medium*/.duet-card.medium.sc-duet-card{padding:28px !important}}@media (min-width: 48em){/*!@.duet-card.medium*/.duet-card.medium.sc-duet-card{padding:36px !important}}@media (min-width: 36em){/*!@.duet-card.large*/.duet-card.large.sc-duet-card{padding:36px !important}}@media (min-width: 48em){/*!@.duet-card.large*/.duet-card.large.sc-duet-card{padding:48px !important}}@media (min-width: 36em){/*!@.duet-card.x-large*/.duet-card.x-large.sc-duet-card{padding:48px !important}}@media (min-width: 48em){/*!@.duet-card.x-large*/.duet-card.x-large.sc-duet-card{padding:72px !important}}/*!@.duet-card.duet-card-collapsed*/.duet-card.duet-card-collapsed.sc-duet-card{padding-bottom:0 !important}@media (min-width: 36em){/*!@.duet-card.duet-card-collapsed*/.duet-card.duet-card-collapsed.sc-duet-card{padding-bottom:0 !important}}/*!@.duet-card.info*/.duet-card.info.sc-duet-card{background:rgba(0, 80, 128, 0.04) !important;box-shadow:none}/*!@.duet-card.info.duet-theme-turva*/.duet-card.info.duet-theme-turva.sc-duet-card{background:rgba(23, 28, 58, 0.035) !important}/*!@.duet-card.plain*/.duet-card.plain.sc-duet-card{box-shadow:none}/*!@.duet-card.plain:not(.duet-card-has-bg)*/.duet-card.plain.sc-duet-card:not(.duet-card-has-bg){background:transparent !important}/*!@.duet-card-heading-grid*/.duet-card-heading-grid.sc-duet-card{display:flex;align-items:center}/*!@.duet-card-heading-grid .expand*/.duet-card-heading-grid.sc-duet-card .expand.sc-duet-card{flex:1}/*!@.duet-card-heading-text*/.duet-card-heading-text.sc-duet-card{overflow:hidden;text-overflow:ellipsis}/*!@.duet-card-secondary-heading*/.duet-card-secondary-heading.sc-duet-card{font-size:1rem;font-weight:600}/*!@.duet-card-heading*/.duet-card-heading.sc-duet-card{position:relative;display:block;padding:16px 20px;margin:-20px -20px 20px;overflow:hidden;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1.25rem;font-weight:800;color:#00294d;text-overflow:ellipsis;white-space:nowrap;border-bottom:1px solid #e1e3e6}@media (min-width: 36em){/*!@.duet-card-heading*/.duet-card-heading.sc-duet-card{padding:15px 28px 16px !important;margin:-28px -28px 20px}}/*!@.duet-card-heading[role=button]*/.duet-card-heading[role=button].sc-duet-card{-webkit-user-select:none;user-select:none;cursor:pointer;border-radius:4px;-webkit-appearance:none;-webkit-tap-highlight-color:transparent;appearance:none}/*!@.duet-card-heading[role=button]:focus*/.duet-card-heading[role=button].sc-duet-card:focus{outline:0}/*!@:host(.user-is-tabbing) .duet-card-heading[role=button]:focus*/.user-is-tabbing.sc-duet-card-h .duet-card-heading[role=button].sc-duet-card:focus{border-radius:4px;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}/*!@:host(.user-is-tabbing) .duet-theme-turva .duet-card-heading[role=button]:focus*/.user-is-tabbing.sc-duet-card-h .duet-theme-turva.sc-duet-card .duet-card-heading[role=button].sc-duet-card:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}/*!@.duet-card-collapsed .duet-card-heading*/.duet-card-collapsed.sc-duet-card .duet-card-heading.sc-duet-card{margin-bottom:0 !important;border-bottom:0 !important}/*!@.duet-theme-turva .duet-card-heading*/.duet-theme-turva.sc-duet-card .duet-card-heading.sc-duet-card{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a;border-color:#e4e4e6}@media (min-width: 36em){/*!@.x-small .duet-card-heading*/.x-small.sc-duet-card .duet-card-heading.sc-duet-card{padding:10px 20px 11px !important;margin:-20px -20px 20px}}@media (min-width: 48em){/*!@.x-small .duet-card-heading*/.x-small.sc-duet-card .duet-card-heading.sc-duet-card{padding:10px 20px 11px !important;margin:-20px -20px 20px}}/*!@.medium .duet-card-heading*/.medium.sc-duet-card .duet-card-heading.sc-duet-card{margin:-20px -20px 20px}@media (min-width: 36em){/*!@.medium .duet-card-heading*/.medium.sc-duet-card .duet-card-heading.sc-duet-card{padding:15px 28px 16px !important;margin:-28px -28px 20px}}@media (min-width: 48em){/*!@.medium .duet-card-heading*/.medium.sc-duet-card .duet-card-heading.sc-duet-card{padding:19px 36px 20px !important;margin:-36px -36px 28px}}/*!@.large .duet-card-heading*/.large.sc-duet-card .duet-card-heading.sc-duet-card{margin:-20px -20px 20px}@media (min-width: 36em){/*!@.large .duet-card-heading*/.large.sc-duet-card .duet-card-heading.sc-duet-card{padding:19px 36px 20px !important;margin:-36px -36px 28px}}@media (min-width: 48em){/*!@.large .duet-card-heading*/.large.sc-duet-card .duet-card-heading.sc-duet-card{padding:26px 48px 27px !important;margin:-48px -48px 36px}}/*!@.x-large .duet-card-heading*/.x-large.sc-duet-card .duet-card-heading.sc-duet-card{margin:-20px -20px 20px}@media (min-width: 36em){/*!@.x-large .duet-card-heading*/.x-large.sc-duet-card .duet-card-heading.sc-duet-card{padding:26px 48px 27px !important;margin:-48px -48px 36px}}@media (min-width: 48em){/*!@.x-large .duet-card-heading*/.x-large.sc-duet-card .duet-card-heading.sc-duet-card{padding:39px 72px 40px !important;margin:-72px -72px 48px}}/*!@.none .duet-card-heading*/.none.sc-duet-card .duet-card-heading.sc-duet-card{padding:0 0 20px !important;margin:0 0 20px}/*!@.duet-card-footer*/.duet-card-footer.sc-duet-card{padding:20px;margin:20px -20px -20px;font-size:0.875rem;line-height:1.25;background:#f5f8fa;border-bottom-right-radius:4px;border-bottom-left-radius:4px}/*!@.duet-theme-turva .duet-card-footer*/.duet-theme-turva.sc-duet-card .duet-card-footer.sc-duet-card{background:#f5f5f7}@media (min-width: 36em){/*!@.duet-card-footer*/.duet-card-footer.sc-duet-card{padding:15px 28px 16px !important;margin:20px -28px -28px}}@media (min-width: 48em){/*!@.duet-card-footer*/.duet-card-footer.sc-duet-card{padding:15px 28px 16px !important;margin:20px -28px -28px}}@media (min-width: 36em){/*!@.x-small .duet-card-footer*/.x-small.sc-duet-card .duet-card-footer.sc-duet-card{padding:15px 28px 16px !important;padding-left:20px !important;margin:20px -20px -20px}}@media (min-width: 36em){/*!@.medium .duet-card-footer*/.medium.sc-duet-card .duet-card-footer.sc-duet-card{padding:15px 28px 16px !important;margin:20px -28px -28px}}@media (min-width: 48em){/*!@.medium .duet-card-footer*/.medium.sc-duet-card .duet-card-footer.sc-duet-card{padding:19px 36px 20px !important;margin:28px -36px -36px}}@media (min-width: 36em){/*!@.large .duet-card-footer*/.large.sc-duet-card .duet-card-footer.sc-duet-card{padding:19px 36px 20px !important;margin:28px -36px -36px}}@media (min-width: 48em){/*!@.large .duet-card-footer*/.large.sc-duet-card .duet-card-footer.sc-duet-card{padding:26px 48px 27px !important;margin:36px -48px -48px}}@media (min-width: 36em){/*!@.x-large .duet-card-footer*/.x-large.sc-duet-card .duet-card-footer.sc-duet-card{padding:26px 48px 27px !important;margin:36px -48px -48px}}@media (min-width: 48em){/*!@.x-large .duet-card-footer*/.x-large.sc-duet-card .duet-card-footer.sc-duet-card{padding:39px 72px 40px !important;margin:48px -72px -72px}}/*!@.none .duet-card-footer*/.none.sc-duet-card .duet-card-footer.sc-duet-card{padding:12px 0 !important;margin:20px 0 0}/*!@.duet-card-content*/.duet-card-content.sc-duet-card{width:100%}/*!@.duet-card-collapsed .duet-card-content*/.duet-card-collapsed.sc-duet-card .duet-card-content.sc-duet-card{display:none}/*!@.duet-card-caret*/.duet-card-caret.sc-duet-card{transition:300ms ease}/*!@[aria-expanded=false] .duet-card-caret*/[aria-expanded=false].sc-duet-card .duet-card-caret.sc-duet-card{transform:rotate(-180deg)}/*!@.duet-card-image-mask*/.duet-card-image-mask.sc-duet-card{position:relative;width:calc(100% + 40px);margin:-20px 0 20px -20px;overflow:hidden;border-top-left-radius:4px;border-top-right-radius:4px}@media (min-width: 36em){/*!@.small .duet-card-image-mask*/.small.sc-duet-card .duet-card-image-mask.sc-duet-card{width:calc(100% + 56px);margin:-28px 0 28px -28px}}@media (min-width: 36em){/*!@.medium .duet-card-image-mask*/.medium.sc-duet-card .duet-card-image-mask.sc-duet-card{width:calc(100% + 56px);margin:-28px 0 28px -28px}}@media (min-width: 48em){/*!@.medium .duet-card-image-mask*/.medium.sc-duet-card .duet-card-image-mask.sc-duet-card{width:calc(100% + 72px);margin:-36px 0 28px -36px}}@media (min-width: 36em){/*!@.large .duet-card-image-mask*/.large.sc-duet-card .duet-card-image-mask.sc-duet-card{width:calc(100% + 72px);margin:-36px 0 36px -36px}}@media (min-width: 48em){/*!@.large .duet-card-image-mask*/.large.sc-duet-card .duet-card-image-mask.sc-duet-card{width:calc(100% + 96px);margin:-48px 0 36px -48px}}@media (min-width: 36em){/*!@.x-large .duet-card-image-mask*/.x-large.sc-duet-card .duet-card-image-mask.sc-duet-card{width:calc(100% + 96px);margin:-48px 0 36px -48px}}@media (min-width: 48em){/*!@.x-large .duet-card-image-mask*/.x-large.sc-duet-card .duet-card-image-mask.sc-duet-card{width:calc(100% + 144px);margin:-72px 0 36px -72px}}/*!@.none .duet-card-image-mask*/.none.sc-duet-card .duet-card-image-mask.sc-duet-card{width:100%;margin:0 0 20px}/*!@.duet-card-image*/.duet-card-image.sc-duet-card{display:block;width:102%;min-width:1px;max-width:102%;height:auto;min-height:1px;margin-left:-1%;transition:transform 300ms ease;transform:scale(1.0001)}/*!@a.duet-card*/a.duet-card.sc-duet-card{transition:box-shadow 300ms ease, background-position 300ms ease}/*!@a.duet-card:hover*/a.duet-card.sc-duet-card:hover{box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07), 0 2px 10px 0 rgba(0, 41, 77, 0.1)}/*!@a.duet-card:hover .duet-card-image*/a.duet-card.sc-duet-card:hover .duet-card-image.sc-duet-card{transform:scale(1.024)}/*!@.duet-theme-turva a.duet-card:hover*/.duet-theme-turva.sc-duet-card a.duet-card.sc-duet-card:hover{box-shadow:0 2px 6px 0 rgba(117, 117, 117, 0.13), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07), 0 2px 10px 0 rgba(117, 117, 117, 0.15)}/*!@a.duet-card:active*/a.duet-card.sc-duet-card:active{transition:none;transform:translateY(1px)}";
6538
+ const duetCardCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-card,*.sc-duet-card::after,*.sc-duet-card::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-card-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:flex;width:100%;vertical-align:top}/*!@:host(.duet-card-info)*/.duet-card-info.sc-duet-card-h{margin-bottom:16px !important}/*!@:host(.duet-m-0)*/.duet-m-0.sc-duet-card-h{margin:0 !important}/*!@.duet-card*/.duet-card.sc-duet-card{padding:20px !important;position:relative;display:block;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-style:normal;font-weight:400;line-height:1.5;color:#00294d;text-decoration:none;border-radius:4px;box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07)}/*!@.duet-card.duet-p-0*/.duet-card.duet-p-0.sc-duet-card{padding:0 !important}/*!@.duet-card.duet-m-0*/.duet-card.duet-m-0.sc-duet-card{margin:0 !important}/*!@.duet-card:focus*/.duet-card.sc-duet-card:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}/*!@.duet-theme-turva .duet-card:focus, .duet-card:focus.duet-theme-turva*/.duet-theme-turva.sc-duet-card .duet-card.sc-duet-card:focus,.duet-card.sc-duet-card:focus.duet-theme-turva{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}@media (min-width: 36em){/*!@.duet-card*/.duet-card.sc-duet-card{padding:28px !important}}/*!@.duet-card.duet-theme-turva*/.duet-card.duet-theme-turva.sc-duet-card{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a;box-shadow:0 2px 6px 0 rgba(117, 117, 117, 0.13), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07)}@media (min-width: 36em){/*!@.duet-card.x-small*/.duet-card.x-small.sc-duet-card{padding:20px !important}}@media (min-width: 36em){/*!@.duet-card.medium*/.duet-card.medium.sc-duet-card{padding:28px !important}}@media (min-width: 48em){/*!@.duet-card.medium*/.duet-card.medium.sc-duet-card{padding:36px !important}}@media (min-width: 36em){/*!@.duet-card.large*/.duet-card.large.sc-duet-card{padding:36px !important}}@media (min-width: 48em){/*!@.duet-card.large*/.duet-card.large.sc-duet-card{padding:48px !important}}@media (min-width: 36em){/*!@.duet-card.x-large*/.duet-card.x-large.sc-duet-card{padding:48px !important}}@media (min-width: 48em){/*!@.duet-card.x-large*/.duet-card.x-large.sc-duet-card{padding:72px !important}}/*!@.duet-card.duet-card-collapsed*/.duet-card.duet-card-collapsed.sc-duet-card{padding-bottom:0 !important}@media (min-width: 36em){/*!@.duet-card.duet-card-collapsed*/.duet-card.duet-card-collapsed.sc-duet-card{padding-bottom:0 !important}}/*!@.duet-card.info*/.duet-card.info.sc-duet-card{background:rgba(0, 80, 128, 0.04) !important;box-shadow:none}/*!@.duet-card.info.duet-theme-turva*/.duet-card.info.duet-theme-turva.sc-duet-card{background:rgba(23, 28, 58, 0.035) !important}/*!@.duet-card.plain*/.duet-card.plain.sc-duet-card{box-shadow:none}/*!@.duet-card.plain:not(.duet-card-has-bg)*/.duet-card.plain.sc-duet-card:not(.duet-card-has-bg){background:transparent !important}/*!@.duet-card-heading-grid*/.duet-card-heading-grid.sc-duet-card{display:flex;flex-direction:row}/*!@.duet-card-icon*/.duet-card-icon.sc-duet-card{align-self:center}/*!@.duet-card-heading-text*/.duet-card-heading-text.sc-duet-card{flex:1;word-break:break-word}/*!@.duet-card-secondary-heading*/.duet-card-secondary-heading.sc-duet-card{font-size:1rem;font-weight:600;word-break:break-word}/*!@.duet-card-secondary-heading--inline*/.duet-card-secondary-heading--inline.sc-duet-card{display:block;flex:1;align-self:flex-start;line-height:1.875;text-align:right}@media (max-width: 22.5em){/*!@.duet-card-secondary-heading--inline*/.duet-card-secondary-heading--inline.sc-duet-card{display:none}}/*!@.duet-card-secondary-heading--new-line*/.duet-card-secondary-heading--new-line.sc-duet-card{display:none}@media (max-width: 22.5em){/*!@.duet-card-secondary-heading--new-line*/.duet-card-secondary-heading--new-line.sc-duet-card{display:block}}/*!@.duet-card-heading*/.duet-card-heading.sc-duet-card{position:relative;display:block;padding:16px 20px;margin:-20px -20px 20px;overflow:hidden;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1.25rem;font-weight:800;color:#00294d;border-bottom:1px solid #e1e3e6}@media (min-width: 36em){/*!@.duet-card-heading*/.duet-card-heading.sc-duet-card{padding:15px 28px 16px !important;margin:-28px -28px 20px}}/*!@.duet-card-heading[role=button]*/.duet-card-heading[role=button].sc-duet-card{-webkit-user-select:none;user-select:none;cursor:pointer;border-radius:4px;-webkit-appearance:none;-webkit-tap-highlight-color:transparent;appearance:none}/*!@.duet-card-heading[role=button]:focus*/.duet-card-heading[role=button].sc-duet-card:focus{outline:0}/*!@:host(.user-is-tabbing) .duet-card-heading[role=button]:focus*/.user-is-tabbing.sc-duet-card-h .duet-card-heading[role=button].sc-duet-card:focus{border-radius:4px;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}/*!@:host(.user-is-tabbing) .duet-theme-turva .duet-card-heading[role=button]:focus*/.user-is-tabbing.sc-duet-card-h .duet-theme-turva.sc-duet-card .duet-card-heading[role=button].sc-duet-card:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}/*!@.duet-card-collapsed .duet-card-heading*/.duet-card-collapsed.sc-duet-card .duet-card-heading.sc-duet-card{margin-bottom:0 !important;border-bottom:0 !important}/*!@.duet-theme-turva .duet-card-heading*/.duet-theme-turva.sc-duet-card .duet-card-heading.sc-duet-card{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a;border-color:#e4e4e6}@media (min-width: 36em){/*!@.x-small .duet-card-heading*/.x-small.sc-duet-card .duet-card-heading.sc-duet-card{padding:10px 20px 11px !important;margin:-20px -20px 20px}}@media (min-width: 48em){/*!@.x-small .duet-card-heading*/.x-small.sc-duet-card .duet-card-heading.sc-duet-card{padding:10px 20px 11px !important;margin:-20px -20px 20px}}/*!@.medium .duet-card-heading*/.medium.sc-duet-card .duet-card-heading.sc-duet-card{margin:-20px -20px 20px}@media (min-width: 36em){/*!@.medium .duet-card-heading*/.medium.sc-duet-card .duet-card-heading.sc-duet-card{padding:15px 28px 16px !important;margin:-28px -28px 20px}}@media (min-width: 48em){/*!@.medium .duet-card-heading*/.medium.sc-duet-card .duet-card-heading.sc-duet-card{padding:19px 36px 20px !important;margin:-36px -36px 28px}}/*!@.large .duet-card-heading*/.large.sc-duet-card .duet-card-heading.sc-duet-card{margin:-20px -20px 20px}@media (min-width: 36em){/*!@.large .duet-card-heading*/.large.sc-duet-card .duet-card-heading.sc-duet-card{padding:19px 36px 20px !important;margin:-36px -36px 28px}}@media (min-width: 48em){/*!@.large .duet-card-heading*/.large.sc-duet-card .duet-card-heading.sc-duet-card{padding:26px 48px 27px !important;margin:-48px -48px 36px}}/*!@.x-large .duet-card-heading*/.x-large.sc-duet-card .duet-card-heading.sc-duet-card{margin:-20px -20px 20px}@media (min-width: 36em){/*!@.x-large .duet-card-heading*/.x-large.sc-duet-card .duet-card-heading.sc-duet-card{padding:26px 48px 27px !important;margin:-48px -48px 36px}}@media (min-width: 48em){/*!@.x-large .duet-card-heading*/.x-large.sc-duet-card .duet-card-heading.sc-duet-card{padding:39px 72px 40px !important;margin:-72px -72px 48px}}/*!@.none .duet-card-heading*/.none.sc-duet-card .duet-card-heading.sc-duet-card{padding:0 0 20px !important;margin:0 0 20px}/*!@.duet-card-footer*/.duet-card-footer.sc-duet-card{padding:20px;margin:20px -20px -20px;font-size:0.875rem;line-height:1.25;background:#f5f8fa;border-bottom-right-radius:4px;border-bottom-left-radius:4px}/*!@.duet-theme-turva .duet-card-footer*/.duet-theme-turva.sc-duet-card .duet-card-footer.sc-duet-card{background:#f5f5f7}@media (min-width: 36em){/*!@.duet-card-footer*/.duet-card-footer.sc-duet-card{padding:15px 28px 16px !important;margin:20px -28px -28px}}@media (min-width: 48em){/*!@.duet-card-footer*/.duet-card-footer.sc-duet-card{padding:15px 28px 16px !important;margin:20px -28px -28px}}@media (min-width: 36em){/*!@.x-small .duet-card-footer*/.x-small.sc-duet-card .duet-card-footer.sc-duet-card{padding:15px 28px 16px !important;padding-left:20px !important;margin:20px -20px -20px}}@media (min-width: 36em){/*!@.medium .duet-card-footer*/.medium.sc-duet-card .duet-card-footer.sc-duet-card{padding:15px 28px 16px !important;margin:20px -28px -28px}}@media (min-width: 48em){/*!@.medium .duet-card-footer*/.medium.sc-duet-card .duet-card-footer.sc-duet-card{padding:19px 36px 20px !important;margin:28px -36px -36px}}@media (min-width: 36em){/*!@.large .duet-card-footer*/.large.sc-duet-card .duet-card-footer.sc-duet-card{padding:19px 36px 20px !important;margin:28px -36px -36px}}@media (min-width: 48em){/*!@.large .duet-card-footer*/.large.sc-duet-card .duet-card-footer.sc-duet-card{padding:26px 48px 27px !important;margin:36px -48px -48px}}@media (min-width: 36em){/*!@.x-large .duet-card-footer*/.x-large.sc-duet-card .duet-card-footer.sc-duet-card{padding:26px 48px 27px !important;margin:36px -48px -48px}}@media (min-width: 48em){/*!@.x-large .duet-card-footer*/.x-large.sc-duet-card .duet-card-footer.sc-duet-card{padding:39px 72px 40px !important;margin:48px -72px -72px}}/*!@.none .duet-card-footer*/.none.sc-duet-card .duet-card-footer.sc-duet-card{padding:12px 0 !important;margin:20px 0 0}/*!@.duet-card-content*/.duet-card-content.sc-duet-card{width:100%}/*!@.duet-card-collapsed .duet-card-content*/.duet-card-collapsed.sc-duet-card .duet-card-content.sc-duet-card{display:none}/*!@.duet-card-caret*/.duet-card-caret.sc-duet-card{position:relative;top:6px;align-self:flex-start;transition:300ms ease}/*!@[aria-expanded=false] .duet-card-caret*/[aria-expanded=false].sc-duet-card .duet-card-caret.sc-duet-card{transform:rotate(-180deg)}/*!@.duet-card-image-mask*/.duet-card-image-mask.sc-duet-card{position:relative;width:calc(100% + 40px);margin:-20px 0 20px -20px;overflow:hidden;border-top-left-radius:4px;border-top-right-radius:4px}@media (min-width: 36em){/*!@.small .duet-card-image-mask*/.small.sc-duet-card .duet-card-image-mask.sc-duet-card{width:calc(100% + 56px);margin:-28px 0 28px -28px}}@media (min-width: 36em){/*!@.medium .duet-card-image-mask*/.medium.sc-duet-card .duet-card-image-mask.sc-duet-card{width:calc(100% + 56px);margin:-28px 0 28px -28px}}@media (min-width: 48em){/*!@.medium .duet-card-image-mask*/.medium.sc-duet-card .duet-card-image-mask.sc-duet-card{width:calc(100% + 72px);margin:-36px 0 28px -36px}}@media (min-width: 36em){/*!@.large .duet-card-image-mask*/.large.sc-duet-card .duet-card-image-mask.sc-duet-card{width:calc(100% + 72px);margin:-36px 0 36px -36px}}@media (min-width: 48em){/*!@.large .duet-card-image-mask*/.large.sc-duet-card .duet-card-image-mask.sc-duet-card{width:calc(100% + 96px);margin:-48px 0 36px -48px}}@media (min-width: 36em){/*!@.x-large .duet-card-image-mask*/.x-large.sc-duet-card .duet-card-image-mask.sc-duet-card{width:calc(100% + 96px);margin:-48px 0 36px -48px}}@media (min-width: 48em){/*!@.x-large .duet-card-image-mask*/.x-large.sc-duet-card .duet-card-image-mask.sc-duet-card{width:calc(100% + 144px);margin:-72px 0 36px -72px}}/*!@.none .duet-card-image-mask*/.none.sc-duet-card .duet-card-image-mask.sc-duet-card{width:100%;margin:0 0 20px}/*!@.duet-card-image*/.duet-card-image.sc-duet-card{display:block;width:102%;min-width:1px;max-width:102%;height:auto;min-height:1px;margin-left:-1%;transition:transform 300ms ease;transform:scale(1.0001)}/*!@a.duet-card*/a.duet-card.sc-duet-card{transition:box-shadow 300ms ease, background-position 300ms ease}/*!@a.duet-card:hover*/a.duet-card.sc-duet-card:hover{box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07), 0 2px 10px 0 rgba(0, 41, 77, 0.1)}/*!@a.duet-card:hover .duet-card-image*/a.duet-card.sc-duet-card:hover .duet-card-image.sc-duet-card{transform:scale(1.024)}/*!@.duet-theme-turva a.duet-card:hover*/.duet-theme-turva.sc-duet-card a.duet-card.sc-duet-card:hover{box-shadow:0 2px 6px 0 rgba(117, 117, 117, 0.13), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07), 0 2px 10px 0 rgba(117, 117, 117, 0.15)}/*!@a.duet-card:active*/a.duet-card.sc-duet-card:active{transition:none;transform:translateY(1px)}";
6502
6539
 
6503
6540
  /**
6504
6541
  * @slot unnamed default slot - The component’s primary content. All child nodes that do not have a slot attribute defined are inserted into this primary slot.
@@ -6583,7 +6620,7 @@ class DuetCard {
6583
6620
  this.hasFooter = !!this.element.querySelector("[slot='footer']");
6584
6621
  }
6585
6622
  renderHeading() {
6586
- const HeadingTag = sanitizeString(this.headingLevel);
6623
+ const HeadingTag = sanitizeString$1(this.headingLevel);
6587
6624
  const headingProps = this.collapsible
6588
6625
  ? {
6589
6626
  role: "button",
@@ -6594,7 +6631,7 @@ class DuetCard {
6594
6631
  onKeyDown: this.handleKeyDown,
6595
6632
  }
6596
6633
  : {};
6597
- return (hAsync(HeadingTag, Object.assign({ class: "duet-card-heading" }, headingProps), hAsync("div", { class: "duet-card-heading-grid" }, this.icon && (hAsync(Fragment, null, hAsync("duet-icon", { class: "duet-card-icon", name: this.icon, size: "medium", margin: "none", color: "currentColor" }), hAsync("duet-spacer", { direction: "horizontal", size: "small" }))), hAsync("div", { class: "expand duet-card-heading-text" }, this.heading), this.secondaryHeading && (hAsync(Fragment, null, hAsync("duet-spacer", { direction: "horizontal", size: "small" }), hAsync("div", { class: "duet-card-secondary-heading" }, this.secondaryHeading))), this.collapsible && (hAsync(Fragment, null, hAsync("duet-spacer", { direction: "horizontal", size: "small" }), hAsync("duet-icon", { class: "duet-card-caret", icon: actionArrowUp.svg, size: "small", margin: "none", color: "currentColor" }))))));
6634
+ return (hAsync(HeadingTag, Object.assign({ class: "duet-card-heading" }, headingProps), hAsync("div", { class: "duet-card-heading-grid" }, this.icon && (hAsync(Fragment, null, hAsync("duet-icon", { class: "duet-card-icon", name: this.icon, size: "medium", margin: "none", color: "currentColor" }), hAsync("duet-spacer", { direction: "horizontal", size: "small" }))), hAsync("div", { class: "duet-card-heading-text" }, this.heading), this.secondaryHeading && (hAsync(Fragment, null, hAsync("duet-spacer", { direction: "horizontal", size: "small" }), hAsync("div", { class: "duet-card-secondary-heading duet-card-secondary-heading--inline" }, this.secondaryHeading))), this.collapsible && (hAsync(Fragment, null, hAsync("duet-spacer", { direction: "horizontal", size: "small" }), hAsync("duet-icon", { class: "duet-card-caret", icon: actionArrowUp.svg, size: "small", margin: "none", color: "currentColor" })))), this.secondaryHeading && (hAsync("div", { class: "duet-card-secondary-heading duet-card-secondary-heading--new-line" }, this.secondaryHeading))));
6598
6635
  }
6599
6636
  /**
6600
6637
  * Sets focus on the specified `duet-card`. Use this method instead of the global
@@ -6656,7 +6693,7 @@ class DuetCard {
6656
6693
  }; }
6657
6694
  }
6658
6695
 
6659
- const duetCheckboxCss = "*.sc-duet-checkbox,*.sc-duet-checkbox::after,*.sc-duet-checkbox::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-checkbox-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:8px !important;margin-bottom:12px !important;display:inline-flex;width:100%;vertical-align:bottom;-webkit-tap-highlight-color:transparent}.sc-duet-checkbox-h:last-child,.sc-duet-checkbox-h:last-of-type{margin-right:0 !important}.sc-duet-checkbox-h:last-of-type:not(:only-child){margin-bottom:0 !important}.duet-m-0.sc-duet-checkbox-h{margin:0 !important}.duet-label.sc-duet-checkbox{position:relative;z-index:100;display:inline;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;line-height:1.5;color:#00294d;vertical-align:top;cursor:pointer;background:transparent;transition:300ms ease}.duet-theme-turva.sc-duet-checkbox .duet-label.sc-duet-checkbox{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}.duet-label.sc-duet-checkbox span.sc-duet-checkbox{display:inline-block;width:calc(100% - 32px);font-size:1rem;font-weight:400;vertical-align:top}.duet-checkbox-container.sc-duet-checkbox{position:relative;width:100%;height:100%}.duet-checkbox.sc-duet-checkbox{padding:14px !important;position:absolute;top:0;left:0;z-index:2;width:100%;height:100%;cursor:pointer;opacity:0}.duet-checkbox.sc-duet-checkbox+label.sc-duet-checkbox::before{z-index:100;display:inline-block;width:20px;height:20px;margin:2px 10px 1px 1px;vertical-align:top;content:\"\";background:white;border:1px solid #00294d;border-radius:4px}.duet-theme-turva.sc-duet-checkbox .duet-checkbox.sc-duet-checkbox+label.sc-duet-checkbox::before{border-color:#171c3a}.duet-checkbox.sc-duet-checkbox:checked+label.sc-duet-checkbox::before{background:#00294d;border:1px solid #00294d}.duet-theme-turva.sc-duet-checkbox .duet-checkbox.sc-duet-checkbox:checked+label.sc-duet-checkbox::before{background:#171c3a;border-color:#171c3a}.duet-checkbox.sc-duet-checkbox:focus+label.sc-duet-checkbox::before{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva.sc-duet-checkbox .duet-checkbox.sc-duet-checkbox:focus+label.sc-duet-checkbox::before{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-checkbox.sc-duet-checkbox+label.sc-duet-checkbox{position:static}.duet-checkbox.sc-duet-checkbox:checked+label.sc-duet-checkbox::after{position:absolute;top:6px;left:5px;z-index:200;width:12px;height:12px;pointer-events:none;content:\"\";background:transparent url(\"data:image/svg+xml,%3Csvg%20fill%3D%27white%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20d%3D%27M23.374.287a1.5%2C1.5%2C0%2C0%2C0-2.093.345L7.246%2C20.2%2C2.561%2C15.511A1.5%2C1.5%2C0%2C1%2C0%2C.439%2C17.632l5.935%2C5.934a1.525%2C1.525%2C0%2C0%2C0%2C2.279-.186l15.066-21A1.5%2C1.5%2C0%2C0%2C0%2C23.374.287Z%27%20%2F%3E%3C%2Fsvg%3E\") no-repeat 0 0;background-size:100% auto}.duet-checkbox[disabled].sc-duet-checkbox{cursor:default}.duet-checkbox[disabled].sc-duet-checkbox+label.sc-duet-checkbox{color:#657787}.duet-theme-turva.sc-duet-checkbox .duet-checkbox[disabled].sc-duet-checkbox+label.sc-duet-checkbox{color:#747475}.duet-checkbox[disabled].sc-duet-checkbox+label.sc-duet-checkbox::before{border-color:#cfd2d4}.duet-theme-turva.sc-duet-checkbox .duet-checkbox[disabled].sc-duet-checkbox+label.sc-duet-checkbox::before{border-color:#cfcfd1}.duet-checkbox[disabled].sc-duet-checkbox:checked+label.sc-duet-checkbox::before{background:#657787;border:1px solid #657787}.duet-theme-turva.sc-duet-checkbox .duet-checkbox[disabled].sc-duet-checkbox:checked+label.sc-duet-checkbox::before{background:#747475;border-color:#747475}.duet-label-hidden.sc-duet-checkbox .duet-label.sc-duet-checkbox span.sc-duet-checkbox{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}";
6696
+ const duetCheckboxCss = "*.sc-duet-checkbox,*.sc-duet-checkbox::after,*.sc-duet-checkbox::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-checkbox-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:8px !important;margin-bottom:12px !important;display:inline-flex;width:100%;vertical-align:bottom;-webkit-tap-highlight-color:transparent}.sc-duet-checkbox-h:last-child,.sc-duet-checkbox-h:last-of-type{margin-right:0 !important}.sc-duet-checkbox-h:last-child:not(:only-child){margin-bottom:0 !important}.duet-m-0.sc-duet-checkbox-h{margin:0 !important}.duet-label.sc-duet-checkbox{position:relative;z-index:100;display:inline;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;line-height:1.5;color:#00294d;vertical-align:top;cursor:pointer;background:transparent;transition:300ms ease}.duet-theme-turva.sc-duet-checkbox .duet-label.sc-duet-checkbox{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}.duet-label.sc-duet-checkbox span.sc-duet-checkbox{display:inline-block;width:calc(100% - 32px);font-size:1rem;font-weight:400;vertical-align:top}.duet-checkbox-container.sc-duet-checkbox{position:relative;width:100%;height:100%}.duet-checkbox.sc-duet-checkbox{padding:14px !important;position:absolute;top:0;left:0;z-index:2;width:100%;height:100%;cursor:pointer;opacity:0}.duet-checkbox.sc-duet-checkbox+label.sc-duet-checkbox::before{z-index:100;display:inline-block;width:20px;height:20px;margin:2px 10px 1px 1px;vertical-align:top;content:\"\";background:white;border:1px solid #00294d;border-radius:4px}.duet-theme-turva.sc-duet-checkbox .duet-checkbox.sc-duet-checkbox+label.sc-duet-checkbox::before{border-color:#171c3a}.duet-checkbox.sc-duet-checkbox:checked+label.sc-duet-checkbox::before{background:#00294d;border:1px solid #00294d}.duet-theme-turva.sc-duet-checkbox .duet-checkbox.sc-duet-checkbox:checked+label.sc-duet-checkbox::before{background:#171c3a;border-color:#171c3a}.duet-checkbox.sc-duet-checkbox:focus+label.sc-duet-checkbox::before{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva.sc-duet-checkbox .duet-checkbox.sc-duet-checkbox:focus+label.sc-duet-checkbox::before{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-checkbox.sc-duet-checkbox+label.sc-duet-checkbox{position:static}.duet-checkbox.sc-duet-checkbox:checked+label.sc-duet-checkbox::after{position:absolute;top:6px;left:5px;z-index:200;width:12px;height:12px;pointer-events:none;content:\"\";background:transparent url(\"data:image/svg+xml,%3Csvg%20fill%3D%27white%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20d%3D%27M23.374.287a1.5%2C1.5%2C0%2C0%2C0-2.093.345L7.246%2C20.2%2C2.561%2C15.511A1.5%2C1.5%2C0%2C1%2C0%2C.439%2C17.632l5.935%2C5.934a1.525%2C1.525%2C0%2C0%2C0%2C2.279-.186l15.066-21A1.5%2C1.5%2C0%2C0%2C0%2C23.374.287Z%27%20%2F%3E%3C%2Fsvg%3E\") no-repeat 0 0;background-size:100% auto}.duet-checkbox[disabled].sc-duet-checkbox{cursor:default}.duet-checkbox[disabled].sc-duet-checkbox+label.sc-duet-checkbox{color:#657787}.duet-theme-turva.sc-duet-checkbox .duet-checkbox[disabled].sc-duet-checkbox+label.sc-duet-checkbox{color:#747475}.duet-checkbox[disabled].sc-duet-checkbox+label.sc-duet-checkbox::before{border-color:#cfd2d4}.duet-theme-turva.sc-duet-checkbox .duet-checkbox[disabled].sc-duet-checkbox+label.sc-duet-checkbox::before{border-color:#cfcfd1}.duet-checkbox[disabled].sc-duet-checkbox:checked+label.sc-duet-checkbox::before{background:#657787;border:1px solid #657787}.duet-theme-turva.sc-duet-checkbox .duet-checkbox[disabled].sc-duet-checkbox:checked+label.sc-duet-checkbox::before{background:#747475;border-color:#747475}.duet-label-hidden.sc-duet-checkbox .duet-label.sc-duet-checkbox span.sc-duet-checkbox{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}";
6660
6697
 
6661
6698
  class DuetCheckbox {
6662
6699
  constructor(hostRef) {
@@ -6789,11 +6826,24 @@ class DuetCheckbox {
6789
6826
 
6790
6827
  var messagingInfo={"title":"messaging-info","tags":"messaging info information circle","svg":"<svg fill=\"currentColor\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\"><path d=\"M13.5 17.25A2.252 2.252 0 0 1 11.25 15v-3.75h-.75a.75.75 0 0 1 0-1.5h.75c.827 0 1.5.673 1.5 1.5V15c0 .414.336.75.75.75h.75a.75.75 0 0 1 0 1.5z\"/><circle cx=\"11.625\" cy=\"7.125\" r=\"1.125\"/><path d=\"M12 24C5.383 24 0 18.617 0 12S5.383 0 12 0s12 5.383 12 12-5.383 12-12 12zm0-22.5C6.21 1.5 1.5 6.21 1.5 12S6.21 22.5 12 22.5 22.5 17.79 22.5 12 17.79 1.5 12 1.5z\"/></svg>"};
6791
6828
 
6792
- const duetChoiceCss = "*.sc-duet-choice,*.sc-duet-choice::after,*.sc-duet-choice::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-choice-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;display:inline-flex;flex-direction:column;width:auto;max-width:100%;vertical-align:bottom;-webkit-tap-highlight-color:transparent}.sc-duet-choice-h:last-child,.sc-duet-choice-h:last-of-type{margin-right:0 !important}@media (max-width: 35.9375em){.sc-duet-choice-h{width:100%}}.duet-expand.sc-duet-choice-h{width:100% !important}.duet-m-0.sc-duet-choice-h{margin:0 !important}.duet-fixed.sc-duet-choice-h{width:auto !important}.vertical.sc-duet-choice-h{margin-right:0 !important}.horizontal.sc-duet-choice-h{margin-bottom:0 !important}@media (min-width: 48em){.horizontal-responsive.sc-duet-choice-h{margin-bottom:0 !important;margin-right:16px !important}.horizontal-responsive.sc-duet-choice-h:last-child,.horizontal-responsive.sc-duet-choice-h:last-of-type{margin-right:0 !important}}.sc-duet-choice-h:last-child:not(:only-child){margin-right:0 !important}.duet-choice-card.sc-duet-choice{position:relative;display:block;width:100%;min-width:8rem;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;-webkit-hyphens:auto;hyphens:auto;line-height:1.1;color:#00294d !important;text-align:left;background:white;border-width:2px}.duet-choice-card.duet-p-0.sc-duet-choice{padding:0 !important}.duet-choice-card.duet-m-0.sc-duet-choice{margin:0 !important}.duet-theme-turva.sc-duet-choice .duet-choice-card.sc-duet-choice{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a !important}.duet-choice-card-flextainer.sc-duet-choice{display:flex}.duet-choice-label.sc-duet-choice{-webkit-user-select:none;user-select:none;position:relative;z-index:100;display:block;width:100%;padding:20px 48px 20px 16px;font-size:1rem;font-weight:600;text-decoration:none;cursor:pointer;border:2px solid #e1e3e6;border-radius:4px;transition:background-color 150ms ease}.has-info.sc-duet-choice .duet-choice-label.sc-duet-choice{padding-right:110px;border-top-right-radius:0;border-bottom-right-radius:0}.info.sc-duet-choice .duet-choice-label.sc-duet-choice{border-bottom-right-radius:0;border-bottom-left-radius:0}.duet-theme-turva.sc-duet-choice .duet-choice-label.sc-duet-choice{border-color:#e4e4e6}.duet-theme-turva.sc-duet-choice .info.sc-duet-choice .duet-choice-label.sc-duet-choice{border-color:#e4e4e6}.duet-choice-label.sc-duet-choice:not(.no-hover):hover{border-color:#909599}.duet-choice-label.sc-duet-choice:not(.no-hover):hover .duet-checkmark-container.sc-duet-choice{border-color:#909599}.duet-theme-turva.sc-duet-choice .duet-choice-label.sc-duet-choice:not(.no-hover):hover{border-color:#747475}.duet-theme-turva.sc-duet-choice .duet-choice-label.sc-duet-choice:not(.no-hover):hover .duet-checkmark-container.sc-duet-choice{border-color:#747475}.duet-theme-turva.sc-duet-choice .info.sc-duet-choice .duet-choice-label.sc-duet-choice:not(.no-hover):hover{border-color:#747475}.duet-choice-label.sc-duet-choice:active{opacity:0.75;transition:none !important}.has-icon.sc-duet-choice .duet-choice-label.sc-duet-choice{padding-left:48px}.checked.sc-duet-choice .duet-choice-label.sc-duet-choice{color:#0077b3 !important;background:#f3f9fc;border-color:#0077b3 !important}.checked.sc-duet-choice .duet-choice-label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#0077b3}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice .duet-choice-label.sc-duet-choice{color:#171c3a !important;background:#f5f5f7;border-color:#171c3a !important}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice .duet-choice-label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#c60c30}.checked.collapsible.sc-duet-choice .duet-choice-label.sc-duet-choice{border-bottom:0 !important;border-bottom-right-radius:0;border-bottom-left-radius:0}input.sc-duet-choice:focus{outline:0}.user-is-tabbing.sc-duet-choice-h input.sc-duet-choice:checked:focus+.duet-choice-label.sc-duet-choice{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3)}.user-is-tabbing.sc-duet-choice-h input.sc-duet-choice:not(:checked):focus+.duet-choice-label.sc-duet-choice{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.user-is-tabbing.duet-theme-turva.sc-duet-choice-h input.sc-duet-choice:checked:focus+.duet-choice-label.sc-duet-choice{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2)}.user-is-tabbing.duet-theme-turva.sc-duet-choice-h input.sc-duet-choice:not(:checked):focus+.duet-choice-label.sc-duet-choice{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice{color:#657787 !important;cursor:default !important;background:#f5f8fa !important;border-color:#e1e3e6 !important}input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice .duet-checkmark.sc-duet-choice{border-color:#657787 !important}.duet-theme-turva.sc-duet-choice input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice{color:#747475 !important;background:#f5f5f7 !important;border-color:#e4e4e6 !important}.duet-theme-turva.sc-duet-choice input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice .duet-checkmark.sc-duet-choice{border-color:#747475 !important}.checked.sc-duet-choice input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice{background:#e1e3e6 !important;border-color:#e1e3e6 !important}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice{background:#e4e4e6 !important;border-color:#e4e4e6 !important}.duet-checkmark-container.sc-duet-choice{position:absolute;top:17.7777777778px;right:16px;width:20px;height:20px;border:1px solid #909599;border-radius:4px;transition:border 300ms ease}.duet-theme-turva.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#747475}.checked.sc-duet-choice .duet-checkmark-container.sc-duet-choice{background:#0077b3;border-color:#0077b3;transition:none}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice .duet-checkmark-container.sc-duet-choice{background:#171c3a;border-color:#171c3a !important}.duet-checkmark-container.duet-checkmark-radio.sc-duet-choice{border-radius:50%}[disabled].sc-duet-choice+label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#cfd2d4 !important}.duet-theme-turva.sc-duet-choice [disabled].sc-duet-choice+label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#cfcfd1 !important}.checked.sc-duet-choice [disabled].sc-duet-choice+label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{background:#cfd2d4 !important}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice [disabled].sc-duet-choice+label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{background:#cfcfd1 !important}.duet-checkmark.sc-duet-choice{position:absolute;top:10px;left:3px;width:5.3333333333px;height:11.8518518519px;border-top:2px solid white;border-right:2px solid white;opacity:1;transform:scaleX(-1) rotate(135deg) translateZ(0);transform-origin:left top;animation-name:duet-checkmark;animation-duration:600ms;animation-timing-function:ease-out;animation-fill-mode:forwards}@keyframes duet-checkmark{0%{width:0;height:0;opacity:1}20%{width:5.3333333333px;height:0;opacity:1}40%,100%{width:5.3333333333px;height:11.8518518519px;opacity:1}}.duet-choice-card-icon.sc-duet-choice{position:absolute;top:50%;left:16px;transform:translateY(-50%)}.duet-choice-card-icon.sc-duet-choice duet-icon.sc-duet-choice{display:block}.duet-choice-card-info.sc-duet-choice,.duet-choice-card-collapsible.sc-duet-choice{padding:28px !important;position:relative;z-index:200;display:none;width:100%;font-weight:400;color:#00294d;border:2px solid #e1e3e6;border-top:0;border-radius:0 0 4px 4px}.duet-theme-turva.sc-duet-choice .duet-choice-card-info.sc-duet-choice,.duet-theme-turva.sc-duet-choice .duet-choice-card-collapsible.sc-duet-choice{color:#171c3a;border-color:#171c3a}.checked.sc-duet-choice .duet-choice-card-info.sc-duet-choice,.checked.sc-duet-choice .duet-choice-card-collapsible.sc-duet-choice{display:block}.duet-choice-card-info-expanded.sc-duet-choice,.duet-choice-card-collapsible-expanded.sc-duet-choice{display:block}.duet-choice-card-collapsible.sc-duet-choice{background:white;border:2px solid #0077b3;border-top:0}.duet-choice-card-collapsible.duet-theme-turva.sc-duet-choice{background:white;border-color:#171c3a}.duet-choice-card-collapsible-disabled.sc-duet-choice{background:#f5f8fa;border-color:#e1e3e6}.duet-choice-card-collapsible-disabled.duet-theme-turva.sc-duet-choice{background:#f5f5f7;border-color:#e4e4e6}.duet-choice-card-info.sc-duet-choice{font-size:0.875rem;line-height:1.5;background:#f5f8fa;transition:150ms ease-out}.duet-choice-card-info.duet-theme-turva.sc-duet-choice{background:#f5f5f7;border-color:#e4e4e6}.duet-choice-info-toggle.sc-duet-choice{display:flex;flex-shrink:0;justify-content:center;width:57.6px;padding-top:18px;cursor:pointer;background:white;border:2px solid #e1e3e6;border-left:0 none;border-top-right-radius:4px;border-bottom-right-radius:4px;-webkit-appearance:none;appearance:none}.duet-choice-info-toggle[aria-expanded=true].sc-duet-choice{background:#f5f8fa;border-bottom:0;border-bottom-right-radius:0}.duet-choice-info-toggle[disabled].sc-duet-choice{pointer-events:none;background:#f5f8fa !important;border-color:#e1e3e6 !important}.duet-choice-info-toggle[disabled].sc-duet-choice .duet-choice-info-icon.sc-duet-choice{color:#909599 !important}.duet-choice-info-toggle[disabled].duet-theme-turva.sc-duet-choice{background:#f5f5f7 !important;border-color:#e4e4e6 !important}.duet-choice-info-toggle[disabled].duet-theme-turva.sc-duet-choice .duet-choice-info-icon.sc-duet-choice{color:#747475 !important}.duet-choice-info-toggle.sc-duet-choice:focus{outline:none}.user-is-tabbing.sc-duet-choice-h .duet-choice-info-toggle.sc-duet-choice:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-choice-label.sc-duet-choice:not(.no-hover):hover .duet-choice-info-toggle.sc-duet-choice{border-left-color:#909599}.checked.sc-duet-choice .duet-choice-info-toggle.sc-duet-choice{border-left-color:#0077b3 !important}.duet-choice-info-toggle.sc-duet-choice duet-icon.sc-duet-choice{display:block}.duet-choice-info-toggle.sc-duet-choice .duet-choice-info-icon.sc-duet-choice{color:#0077b3}.duet-theme-turva.sc-duet-choice .duet-choice-info-toggle.sc-duet-choice .duet-choice-info-icon.sc-duet-choice{color:#c60c30}.duet-choice-input.sc-duet-choice{position:absolute !important;width:100%;height:100%;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);color:transparent}";
6829
+ const focusElement = (element) => {
6830
+ if ("setFocus" in element) {
6831
+ element.setFocus();
6832
+ }
6833
+ else {
6834
+ element.focus();
6835
+ }
6836
+ };
6837
+ const FocusGuard = ({ moveFocusTo }) => {
6838
+ return hAsync("div", { class: "duet-focus-guard", "aria-hidden": "true", tabIndex: 0, onFocus: () => focusElement(moveFocusTo) });
6839
+ };
6840
+
6841
+ const duetChoiceCss = "*.sc-duet-choice,*.sc-duet-choice::after,*.sc-duet-choice::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-choice-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;display:inline-flex;flex-direction:column;width:auto;max-width:100%;vertical-align:bottom;-webkit-tap-highlight-color:transparent}.sc-duet-choice-h:last-child,.sc-duet-choice-h:last-of-type{margin-right:0 !important}@media (max-width: 35.9375em){.sc-duet-choice-h{width:100%}}.duet-expand.sc-duet-choice-h{width:100% !important}.duet-m-0.sc-duet-choice-h{margin:0 !important}.duet-fixed.sc-duet-choice-h{width:auto !important}.vertical.sc-duet-choice-h{margin-right:0 !important}.horizontal.sc-duet-choice-h{margin-bottom:0 !important}@media (min-width: 48em){.horizontal-responsive.sc-duet-choice-h{margin-bottom:0 !important;margin-right:16px !important}.horizontal-responsive.sc-duet-choice-h:last-child,.horizontal-responsive.sc-duet-choice-h:last-of-type{margin-right:0 !important}}.sc-duet-choice-h:last-child:not(:only-child){margin-right:0 !important}.duet-choice-card.sc-duet-choice{position:relative;display:block;width:100%;min-width:8rem;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;-webkit-hyphens:auto;hyphens:auto;line-height:1.1;color:#00294d !important;text-align:left;background:white;border-width:2px}.duet-choice-card.duet-p-0.sc-duet-choice{padding:0 !important}.duet-choice-card.duet-m-0.sc-duet-choice{margin:0 !important}.duet-theme-turva.sc-duet-choice .duet-choice-card.sc-duet-choice{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a !important}.duet-choice-card-flextainer.sc-duet-choice{display:flex}.duet-choice-label.sc-duet-choice{-webkit-user-select:none;user-select:none;position:relative;z-index:100;display:block;width:100%;padding:20px 48px 20px 16px;font-size:1rem;font-weight:600;text-decoration:none;cursor:pointer;border:2px solid #e1e3e6;border-radius:4px;transition:background-color 150ms ease}.has-info.sc-duet-choice .duet-choice-label.sc-duet-choice{padding-right:110px;border-top-right-radius:0;border-bottom-right-radius:0}.info.sc-duet-choice .duet-choice-label.sc-duet-choice{border-bottom-right-radius:0;border-bottom-left-radius:0}.duet-theme-turva.sc-duet-choice .duet-choice-label.sc-duet-choice{border-color:#e4e4e6}.duet-theme-turva.sc-duet-choice .info.sc-duet-choice .duet-choice-label.sc-duet-choice{border-color:#e4e4e6}.duet-choice-label.sc-duet-choice:not(.no-hover):hover{border-color:#909599}.duet-choice-label.sc-duet-choice:not(.no-hover):hover .duet-checkmark-container.sc-duet-choice{border-color:#909599}.duet-theme-turva.sc-duet-choice .duet-choice-label.sc-duet-choice:not(.no-hover):hover{border-color:#747475}.duet-theme-turva.sc-duet-choice .duet-choice-label.sc-duet-choice:not(.no-hover):hover .duet-checkmark-container.sc-duet-choice{border-color:#747475}.duet-theme-turva.sc-duet-choice .info.sc-duet-choice .duet-choice-label.sc-duet-choice:not(.no-hover):hover{border-color:#747475}.duet-choice-label.sc-duet-choice:active{opacity:0.75;transition:none !important}.has-icon.sc-duet-choice .duet-choice-label.sc-duet-choice{padding-left:48px}.checked.sc-duet-choice .duet-choice-label.sc-duet-choice{color:#0077b3 !important;background:#f3f9fc;border-color:#0077b3 !important}.checked.sc-duet-choice .duet-choice-label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#0077b3}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice .duet-choice-label.sc-duet-choice{color:#171c3a !important;background:#f5f5f7;border-color:#171c3a !important}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice .duet-choice-label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#c60c30}.checked.collapsible.sc-duet-choice .duet-choice-label.sc-duet-choice{border-bottom:0 !important;border-bottom-right-radius:0;border-bottom-left-radius:0}input.sc-duet-choice:focus{outline:0}.user-is-tabbing.sc-duet-choice-h input.sc-duet-choice:checked:focus+.duet-choice-label.sc-duet-choice{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3)}.user-is-tabbing.sc-duet-choice-h input.sc-duet-choice:not(:checked):focus+.duet-choice-label.sc-duet-choice{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.user-is-tabbing.duet-theme-turva.sc-duet-choice-h input.sc-duet-choice:checked:focus+.duet-choice-label.sc-duet-choice{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2)}.user-is-tabbing.duet-theme-turva.sc-duet-choice-h input.sc-duet-choice:not(:checked):focus+.duet-choice-label.sc-duet-choice{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice{color:#657787 !important;cursor:default !important;background:#f5f8fa !important;border-color:#e1e3e6 !important}input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice .duet-checkmark.sc-duet-choice{border-color:#657787 !important}.duet-theme-turva.sc-duet-choice input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice{color:#747475 !important;background:#f5f5f7 !important;border-color:#e4e4e6 !important}.duet-theme-turva.sc-duet-choice input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice .duet-checkmark.sc-duet-choice{border-color:#747475 !important}.checked.sc-duet-choice input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice{background:#e1e3e6 !important;border-color:#e1e3e6 !important}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice{background:#e4e4e6 !important;border-color:#e4e4e6 !important}.duet-checkmark-container.sc-duet-choice{position:absolute;top:17.7777777778px;right:16px;width:20px;height:20px;border:1px solid #909599;border-radius:4px;transition:border 300ms ease}.duet-theme-turva.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#747475}.checked.sc-duet-choice .duet-checkmark-container.sc-duet-choice{background:#0077b3;border-color:#0077b3;transition:none}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice .duet-checkmark-container.sc-duet-choice{background:#171c3a;border-color:#171c3a !important}.duet-checkmark-container.duet-checkmark-radio.sc-duet-choice{border-radius:50%}[disabled].sc-duet-choice+label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#cfd2d4 !important}.duet-theme-turva.sc-duet-choice [disabled].sc-duet-choice+label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#cfcfd1 !important}.checked.sc-duet-choice [disabled].sc-duet-choice+label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{background:#cfd2d4 !important}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice [disabled].sc-duet-choice+label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{background:#cfcfd1 !important}.duet-checkmark.sc-duet-choice{position:absolute;top:10px;left:3px;width:5.3333333333px;height:11.8518518519px;border-top:2px solid white;border-right:2px solid white;opacity:1;transform:scaleX(-1) rotate(135deg) translateZ(0);transform-origin:left top;animation-name:duet-checkmark;animation-duration:600ms;animation-timing-function:ease-out;animation-fill-mode:forwards}@keyframes duet-checkmark{0%{width:0;height:0;opacity:1}20%{width:5.3333333333px;height:0;opacity:1}40%,100%{width:5.3333333333px;height:11.8518518519px;opacity:1}}.duet-choice-card-icon.sc-duet-choice{position:absolute;top:50%;left:16px;transform:translateY(-50%)}.duet-choice-card-icon.sc-duet-choice duet-icon.sc-duet-choice{display:block}.duet-choice-section-hidden.sc-duet-choice{display:none}.duet-choice-card-info.duet-choice-card-collapsed.sc-duet-choice,.duet-choice-card-collapsed.duet-choice-card-collapsible.sc-duet-choice{position:relative;width:auto;padding:0 !important;background:unset !important;border:0;border-radius:0}.duet-choice-card-info.sc-duet-choice,.duet-choice-card-collapsible.sc-duet-choice{padding:28px !important;position:relative;z-index:200;width:100%;font-weight:400;color:#00294d;border:2px solid #e1e3e6;border-top:0;border-radius:0 0 4px 4px}.duet-theme-turva.sc-duet-choice .duet-choice-card-info.sc-duet-choice,.duet-theme-turva.sc-duet-choice .duet-choice-card-collapsible.sc-duet-choice{color:#171c3a;border-color:#171c3a}.checked.sc-duet-choice .duet-choice-card-info.sc-duet-choice,.checked.sc-duet-choice .duet-choice-card-collapsible.sc-duet-choice{display:block}.duet-choice-card-info-expanded.sc-duet-choice,.duet-choice-card-collapsible-expanded.sc-duet-choice{display:block}.duet-choice-card-collapsible.sc-duet-choice{background:white;border:2px solid #0077b3;border-top:0}.duet-choice-card-collapsible.duet-theme-turva.sc-duet-choice{background:white;border-color:#171c3a}.duet-choice-card-collapsible-disabled.sc-duet-choice{background:#f5f8fa;border-color:#e1e3e6}.duet-choice-card-collapsible-disabled.duet-theme-turva.sc-duet-choice{background:#f5f5f7;border-color:#e4e4e6}.duet-choice-card-info.sc-duet-choice{font-size:0.875rem;line-height:1.5;background:#f5f8fa;transition:150ms ease-out}.duet-choice-card-info.duet-theme-turva.sc-duet-choice{background:#f5f5f7;border-color:#e4e4e6}.duet-choice-info-toggle.sc-duet-choice{display:flex;flex-shrink:0;justify-content:center;width:57.6px;padding-top:18px;cursor:pointer;background:white;border:2px solid #e1e3e6;border-left:0 none;border-top-right-radius:4px;border-bottom-right-radius:4px;-webkit-appearance:none;appearance:none}.duet-choice-info-toggle[aria-expanded=true].sc-duet-choice{background:#f5f8fa;border-bottom:0;border-bottom-right-radius:0}.duet-choice-info-toggle[disabled].sc-duet-choice{pointer-events:none;background:#f5f8fa !important;border-color:#e1e3e6 !important}.duet-choice-info-toggle[disabled].sc-duet-choice .duet-choice-info-icon.sc-duet-choice{color:#909599 !important}.duet-choice-info-toggle[disabled].duet-theme-turva.sc-duet-choice{background:#f5f5f7 !important;border-color:#e4e4e6 !important}.duet-choice-info-toggle[disabled].duet-theme-turva.sc-duet-choice .duet-choice-info-icon.sc-duet-choice{color:#747475 !important}.duet-choice-info-toggle.sc-duet-choice:focus{outline:none}.user-is-tabbing.sc-duet-choice-h .duet-choice-info-toggle.sc-duet-choice:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-choice-label.sc-duet-choice:not(.no-hover):hover .duet-choice-info-toggle.sc-duet-choice{border-left-color:#909599}.checked.sc-duet-choice .duet-choice-info-toggle.sc-duet-choice{border-left-color:#0077b3 !important}.duet-choice-info-toggle.sc-duet-choice duet-icon.sc-duet-choice{display:block}.duet-choice-info-toggle.sc-duet-choice .duet-choice-info-icon.sc-duet-choice{color:#0077b3}.duet-theme-turva.sc-duet-choice .duet-choice-info-toggle.sc-duet-choice .duet-choice-info-icon.sc-duet-choice{color:#c60c30}.duet-choice-input.sc-duet-choice{position:absolute !important;width:auto;height:auto;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);color:transparent}";
6793
6842
 
6794
6843
  /**
6795
6844
  * @slot unnamed default slot - The component’s primary content. All child nodes that do not have a slot attribute defined are inserted into this primary slot.
6796
6845
  * @slot info - Info content. Anything inserted into this slot is displayed in a collapsible info box.
6846
+ * @slot collapsible_header - header that is only added to collapsible element, this header should be used when the components collapsible area contains additional interactive elements (such as form items) and should be user for a short description of the content below it, it is mandatory for good accessibility to use this - and aria-decribe-by will point to it. If you use the collapsible area with simple text - describe-by will point to this area
6797
6847
  * @slot additional - Additional content. Anything inserted into this slot is displayed as additional content under the label and caption
6798
6848
  */
6799
6849
  class DuetChoice {
@@ -6802,9 +6852,11 @@ class DuetChoice {
6802
6852
  this.duetChange = createEvent$2(this, "duetChange", 7);
6803
6853
  this.duetFocus = createEvent$2(this, "duetFocus", 7);
6804
6854
  this.duetBlur = createEvent$2(this, "duetBlur", 7);
6855
+ this.hasHeader = false;
6805
6856
  this.choiceId = createID("DuetChoice");
6806
- this.collapsibleId = createID("DuetChoiceCollapsible");
6807
- this.infoId = createID("DuetInfo");
6857
+ this.expandId = createID("DuetChoiceExpand");
6858
+ this.headerId = createID("DuetChoiceHeader");
6859
+ this.infoButtonId = createID("DuetChoiceInfoButton");
6808
6860
  /**
6809
6861
  * State() variables
6810
6862
  * Inlined decorator, alphabetical order.
@@ -6882,6 +6934,24 @@ class DuetChoice {
6882
6934
  * browser from displaying its own validation errors.
6883
6935
  */
6884
6936
  this.required = false;
6937
+ /**
6938
+ * Placeholder defaults
6939
+ * @default { fi: "pp.kk.vvvv", en: "dd.mm.yyyy", sv: "dd.mm.åååå" }
6940
+ */
6941
+ this.infoLabelDefaults = {
6942
+ fi: "Lisätietoja",
6943
+ en: "More information about",
6944
+ sv: "Mera information om",
6945
+ };
6946
+ /**
6947
+ * Hint text to display before the user types into the date picker input.
6948
+ * @default {
6949
+ * fi: "Lisätietoja",
6950
+ * en: "More information about",
6951
+ * sv: "Mera information om",
6952
+ * }
6953
+ */
6954
+ this.infoLabel = getLocaleString(this.infoLabelDefaults, getLanguage());
6885
6955
  this.onMouseEnter = () => {
6886
6956
  this.isHovering = true;
6887
6957
  };
@@ -6889,7 +6959,6 @@ class DuetChoice {
6889
6959
  this.isHovering = false;
6890
6960
  };
6891
6961
  this.onClick = (ev) => {
6892
- this.setFocus();
6893
6962
  this.toggleChecked(ev);
6894
6963
  };
6895
6964
  this.handleKeyDown = (ev) => {
@@ -6897,7 +6966,7 @@ class DuetChoice {
6897
6966
  this.toggleChecked(ev);
6898
6967
  }
6899
6968
  if (isQuestionKey(ev) && this.hasInfo) {
6900
- this.toggleInfo(ev);
6969
+ this.toggleInfo();
6901
6970
  }
6902
6971
  };
6903
6972
  this.onChange = () => {
@@ -6931,8 +7000,6 @@ class DuetChoice {
6931
7000
  if (this.disabled || this.groupDisabled) {
6932
7001
  return;
6933
7002
  }
6934
- ev.stopPropagation();
6935
- ev.preventDefault();
6936
7003
  this.isInfoOpen = false;
6937
7004
  // if it's a radio button and it's already checked
6938
7005
  // we shouldn't fire an event, so exit early
@@ -6946,10 +7013,10 @@ class DuetChoice {
6946
7013
  value: this.value,
6947
7014
  component: "duet-choice",
6948
7015
  });
6949
- };
6950
- this.toggleInfo = ev => {
6951
- ev.stopPropagation();
6952
7016
  ev.preventDefault();
7017
+ ev.stopPropagation();
7018
+ };
7019
+ this.toggleInfo = () => {
6953
7020
  this.isInfoOpen = !this.isInfoOpen;
6954
7021
  };
6955
7022
  }
@@ -6959,6 +7026,7 @@ class DuetChoice {
6959
7026
  componentWillLoad() {
6960
7027
  inheritGlobalTheme(this);
6961
7028
  this.hasInfo = !!this.element.querySelector("[slot='info']");
7029
+ this.hasHeader = !!this.element.querySelector('[slot="header"]');
6962
7030
  this.hasAdditional = !!this.element.querySelector("[slot='additional']");
6963
7031
  }
6964
7032
  /**
@@ -6972,15 +7040,18 @@ class DuetChoice {
6972
7040
  // @ts-ignore
6973
7041
  const isTargetContainedInHost = this.element.contains(ev === null || ev === void 0 ? void 0 : ev.relatedTarget) || false;
6974
7042
  if (!isTargetContainedInHost) {
6975
- this.toggleInfo(ev);
7043
+ this.toggleInfo();
6976
7044
  }
6977
7045
  }
6978
7046
  }
6979
7047
  handleHostKeyDown() {
6980
7048
  this.isKeyDown = true;
6981
7049
  }
6982
- handleHostKeyUp() {
7050
+ handleHostKeyUp(ev) {
6983
7051
  this.isKeyDown = false;
7052
+ if (isEscapeKey(ev) && this.isInfoOpen) {
7053
+ this.toggleInfo();
7054
+ }
6984
7055
  }
6985
7056
  /**
6986
7057
  * Sets focus on the specified `duet-choice`. Use this method instead of the global
@@ -6993,11 +7064,13 @@ class DuetChoice {
6993
7064
  if (this.accessibleDescribedBy) {
6994
7065
  return this.accessibleDescribedBy;
6995
7066
  }
6996
- if (this.collapsible) {
6997
- return this.collapsibleId;
6998
- }
6999
- else if (this.hasInfo) {
7000
- return this.infoId;
7067
+ if (this.collapsible || this.hasInfo) {
7068
+ if (this.hasHeader) {
7069
+ return this.headerId;
7070
+ }
7071
+ else {
7072
+ return this.expandId;
7073
+ }
7001
7074
  }
7002
7075
  return null;
7003
7076
  }
@@ -7006,6 +7079,7 @@ class DuetChoice {
7006
7079
  return {
7007
7080
  "duet-choice-card-info": true,
7008
7081
  "duet-choice-card-info-expanded": this.isInfoOpen,
7082
+ "duet-choice-card-collapsed": !this.isInfoOpen,
7009
7083
  "duet-theme-turva": this.theme === "turva",
7010
7084
  };
7011
7085
  }
@@ -7013,6 +7087,7 @@ class DuetChoice {
7013
7087
  return {
7014
7088
  "duet-choice-card-collapsible": true,
7015
7089
  "duet-choice-card-collapsible-expanded": this.checked,
7090
+ "duet-choice-card-collapsed": !this.checked,
7016
7091
  "duet-choice-card-collapsible-disabled": this.disabled || this.groupDisabled ? true : false,
7017
7092
  "duet-theme-turva": this.theme === "turva",
7018
7093
  };
@@ -7044,10 +7119,13 @@ class DuetChoice {
7044
7119
  info: this.isInfoOpen,
7045
7120
  collapsible: this.collapsible,
7046
7121
  "duet-p-0": this.padding === "none",
7047
- } }, hAsync("input", { "aria-live": "assertive", "aria-atomic": "true", "aria-relevant": "all", class: "duet-choice-input", type: this.type, onFocus: this.onFocus, onBlur: this.onBlur, onChange: this.onChange, disabled: this.disabled || this.groupDisabled, required: this.required, id: identifier, name: this.name, value: this.value, checked: this.checked, "aria-controls": this.accessibleControls, "aria-activedescendant": this.accessibleActiveDescendant, "aria-owns": this.accessibleOwns, "aria-describedby": this.getAriaDescribedby(), "aria-flowto": this.hasInfo ? this.nativeInfoButton : "", onKeyDown: this.handleKeyDown, ref: input => (this.nativeInput = input) }), hAsync("label", { htmlFor: identifier, class: { "duet-choice-label": true, "no-hover": this.isHovering }, onClick: this.onClick }, this.icon && (hAsync("div", { class: "duet-choice-card-icon" }, hAsync("duet-icon", { margin: "none", size: "small", name: this.icon, color: "currentColor" }))), this.label, this.caption && (hAsync("div", null, hAsync("duet-spacer", { size: "xx-small" }), hAsync("duet-caption", { margin: "none", selected: this.checked }, this.caption))), this.hasAdditional && (hAsync("div", null, hAsync("duet-spacer", { size: "xx-small" }), hAsync("slot", { name: "additional" }))), hAsync("div", { class: { "duet-checkmark-container": true, "duet-checkmark-radio": this.type === "radio" } }, this.checked && hAsync("div", { class: "duet-checkmark" })))), this.hasInfo && !this.collapsible && (hAsync("button", { class: {
7122
+ } }, hAsync("input", { class: "duet-choice-input", type: this.type, onFocus: this.onFocus, onBlur: this.onBlur, onChange: this.onChange, disabled: this.disabled || this.groupDisabled, required: this.required, id: identifier, name: this.name, value: this.value, checked: this.checked, "aria-controls": this.accessibleControls, "aria-activedescendant": this.accessibleActiveDescendant, "aria-owns": this.accessibleOwns, "aria-describedby": this.getAriaDescribedby(), onKeyDown: this.handleKeyDown, ref: input => (this.nativeInput = input) }), hAsync("label", { htmlFor: identifier, class: { "duet-choice-label": true, "no-hover": this.isHovering }, onClick: this.onClick }, this.icon && (hAsync("div", { class: "duet-choice-card-icon" }, hAsync("duet-icon", { margin: "none", size: "small", name: this.icon, color: "currentColor" }))), this.label, this.caption && (hAsync("div", null, hAsync("duet-spacer", { size: "xx-small" }), hAsync("duet-caption", { margin: "none", selected: this.checked }, this.caption))), this.hasAdditional && (hAsync("div", null, hAsync("duet-spacer", { size: "xx-small" }), hAsync("slot", { name: "additional" }))), hAsync("div", { class: { "duet-checkmark-container": true, "duet-checkmark-radio": this.type === "radio" } }, this.checked && hAsync("div", { class: "duet-checkmark" })))), this.hasInfo && !this.collapsible && (hAsync("button", { ref: button => (this.infoButtonEl = button), id: this.infoButtonId, class: {
7048
7123
  "duet-choice-info-toggle": true,
7049
7124
  "duet-theme-turva": this.theme === "turva",
7050
- }, onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave, onClick: this.toggleInfo, disabled: this.disabled || this.groupDisabled, "aria-expanded": this.isInfoOpen ? "true" : "false", "aria-controls": this.infoId, "aria-flowto": this.infoId, tabindex: this.type === "radio" && !this.checked ? "-1" : "0", type: "button" }, hAsync("duet-visually-hidden", { "aria-hidden": !this.isBlurred ? "true" : "false" }, this.accessibleLabelInfoButton), hAsync("div", { class: "duet-choice-info-icon" }, hAsync("duet-icon", { icon: messagingInfo.svg, margin: "none", size: "small", color: "currentColor" }))))), hAsync("div", { "aria-live": "polite", "aria-atomic": "true", "aria-relevant": "all", role: this.hasInfo && !this.collapsible ? "note" : "none", class: this.getClassNames(), id: this.hasInfo ? this.infoId : this.collapsible ? this.collapsibleId : "" }, this.hasInfo && !this.collapsible && hAsync("slot", { name: "info" }), !this.hasInfo && hAsync("slot", null))));
7125
+ }, onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave, onClick: this.toggleInfo, disabled: this.disabled || this.groupDisabled, "aria-expanded": this.isInfoOpen ? "true" : "false", "aria-label": `${this.infoLabel} ${this.label}`, "aria-controls": this.expandId, "aria-flowto": this.expandId, tabindex: this.type === "radio" && !this.checked ? "-1" : "0", type: "button" }, hAsync("duet-visually-hidden", { "aria-hidden": !this.isBlurred ? "true" : "false" }, this.accessibleLabelInfoButton), hAsync("div", { class: "duet-choice-info-icon" }, hAsync("duet-icon", { icon: messagingInfo.svg, margin: "none", size: "small", color: "currentColor" }))))), this.collapsible || this.hasInfo ? (hAsync("div", { class: this.getClassNames(), id: this.expandId }, hAsync("span", { class: {
7126
+ "duet-choice-section-visible": this.collapsible ? this.checked : this.isInfoOpen,
7127
+ "duet-choice-section-hidden": this.collapsible ? !this.checked : !this.isInfoOpen,
7128
+ } }, hAsync("span", { id: this.headerId }, hAsync("slot", { name: "header" })), this.hasInfo ? (hAsync("span", null, hAsync("span", { "aria-relevant": "all", "aria-atomic": "true", "aria-live": this.isInfoOpen ? "polite" : "off" }, hAsync("slot", { name: "info" })), hAsync("slot", null))) : (hAsync("span", null, hAsync("slot", null)))), this.isInfoOpen && hAsync(FocusGuard, { moveFocusTo: this.infoButtonEl }))) : null));
7051
7129
  }
7052
7130
  get element() { return getElement(this); }
7053
7131
  static get style() { return duetChoiceCss; }
@@ -7057,7 +7135,7 @@ class DuetChoice {
7057
7135
  "$members$": {
7058
7136
  "theme": [1025],
7059
7137
  "label": [1],
7060
- "accessibleLabelInfoButtonDefaults": [16],
7138
+ "accessibleLabelInfoButtonDefaults": [1, "accessible-label-info-default"],
7061
7139
  "accessibleLabelInfoButton": [1, "accessible-label-info-button"],
7062
7140
  "accessibleActiveDescendant": [1, "accessible-active-descendant"],
7063
7141
  "accessibleControls": [1, "accessible-controls"],
@@ -7079,6 +7157,8 @@ class DuetChoice {
7079
7157
  "groupResponsive": [4, "group-responsive"],
7080
7158
  "disabled": [516],
7081
7159
  "required": [4],
7160
+ "infoLabelDefaults": [1, "accessible-label-info-default"],
7161
+ "infoLabel": [1, "info-label"],
7082
7162
  "isHovering": [32],
7083
7163
  "isInfoOpen": [32],
7084
7164
  "isBlurred": [32],
@@ -7090,19 +7170,41 @@ class DuetChoice {
7090
7170
  }; }
7091
7171
  }
7092
7172
 
7093
- const watchForOptions = (containerEl, tagName, onChange) => {
7173
+ const watchFor = (containerEl, tagName, onChange, changeHandler, options = {
7174
+ childList: true,
7175
+ subtree: true,
7176
+ }) => {
7094
7177
  let mutation;
7095
7178
  if (typeof MutationObserver !== "undefined") {
7096
7179
  mutation = new MutationObserver(mutationList => {
7097
- onChange(getSelectedOption(mutationList, tagName));
7098
- });
7099
- mutation.observe(containerEl, {
7100
- childList: true,
7101
- subtree: true,
7180
+ onChange(changeHandler(mutationList, tagName));
7102
7181
  });
7182
+ mutation.observe(containerEl, options);
7103
7183
  }
7104
7184
  return mutation;
7105
7185
  };
7186
+ const watchForOptions = (containerEl, tagName, onChange) => {
7187
+ return watchFor(containerEl, tagName, onChange, getSelectedOption);
7188
+ };
7189
+ const watchForElement = (containerEl, tagName, onChange) => {
7190
+ return watchFor(containerEl, tagName, onChange, getElementItem, {
7191
+ childList: true,
7192
+ subtree: true,
7193
+ });
7194
+ };
7195
+ const getElementItem = (mutationList) => {
7196
+ let addedNode = false;
7197
+ let removedNode = false;
7198
+ mutationList.forEach(mut => {
7199
+ if (mut.addedNodes.length) {
7200
+ addedNode = true;
7201
+ }
7202
+ if (mut.removedNodes.length) {
7203
+ removedNode = true;
7204
+ }
7205
+ });
7206
+ return { addedNode, removedNode, mutationList };
7207
+ };
7106
7208
  const getSelectedOption = (mutationList, tagName) => {
7107
7209
  let newOption;
7108
7210
  mutationList.forEach(mut => {
@@ -7121,7 +7223,7 @@ const findCheckedOption = (el, tagName) => {
7121
7223
  return options.find((o) => o.checked === true);
7122
7224
  };
7123
7225
 
7124
- const duetChoiceGroupCss = "*.sc-duet-choice-group,*.sc-duet-choice-group::after,*.sc-duet-choice-group::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-choice-group-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.horizontal.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group{display:block}@media (min-width: 48em){.horizontal.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group{display:flex}}.horizontal.sc-duet-choice-group-h .duet-choice-group.duet-no-stacking.sc-duet-choice-group{display:flex}.duet-choice-group.sc-duet-choice-group{position:relative;width:100%;margin-bottom:-12px}";
7226
+ const duetChoiceGroupCss = "*.sc-duet-choice-group,*.sc-duet-choice-group::after,*.sc-duet-choice-group::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-choice-group-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.horizontal.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group{display:block}@media (min-width: 48em){.horizontal.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group{display:flex;margin-bottom:0}}.horizontal.sc-duet-choice-group-h .duet-choice-group.duet-no-stacking.sc-duet-choice-group{display:flex}.duet-choice-group.sc-duet-choice-group{position:relative;width:100%;margin-bottom:-12px}";
7125
7227
 
7126
7228
  class DuetChoiceGroup {
7127
7229
  constructor(hostRef) {
@@ -7153,11 +7255,11 @@ class DuetChoiceGroup {
7153
7255
  /**
7154
7256
  * Additional caption to show inside the label of the choice group.
7155
7257
  */
7156
- this.caption = "";
7258
+ this.caption = undefined;
7157
7259
  /**
7158
7260
  * Tooltip to display next to the label of the choice group.
7159
7261
  */
7160
- this.tooltip = "";
7262
+ this.tooltip = undefined;
7161
7263
  /**
7162
7264
  * With direction setting you can force the tooltip to always open towards left
7163
7265
  * or right instead of automatically determining the direction.
@@ -7410,6 +7512,7 @@ const size_tappable_square = "48px";
7410
7512
  const size_icon_x_small = "16px";
7411
7513
  const size_icon_xxx_small = "7px";
7412
7514
  const size_button_border = "2px";
7515
+ const size_button_tiny_border = "1px";
7413
7516
  const size_icon_medium = "24px";
7414
7517
  const size_icon_small = "20px";
7415
7518
  const opacity_85 = "0.85";
@@ -7557,6 +7660,7 @@ var tokens = {
7557
7660
  size_icon_x_small: size_icon_x_small,
7558
7661
  size_icon_xxx_small: size_icon_xxx_small,
7559
7662
  size_button_border: size_button_border,
7663
+ size_button_tiny_border: size_button_tiny_border,
7560
7664
  size_icon_medium: size_icon_medium,
7561
7665
  size_icon_small: size_icon_small,
7562
7666
  opacity_85: opacity_85,
@@ -7707,6 +7811,7 @@ var tokens$1 = /*#__PURE__*/Object.freeze({
7707
7811
  size_icon_x_small: size_icon_x_small,
7708
7812
  size_icon_xxx_small: size_icon_xxx_small,
7709
7813
  size_button_border: size_button_border,
7814
+ size_button_tiny_border: size_button_tiny_border,
7710
7815
  size_icon_medium: size_icon_medium,
7711
7816
  size_icon_small: size_icon_small,
7712
7817
  opacity_85: opacity_85,
@@ -7856,7 +7961,7 @@ class DuetCollapsible {
7856
7961
  * Always the last one in the class.
7857
7962
  */
7858
7963
  render() {
7859
- const HeadingTagName = this.headingLevel ? sanitizeString(this.headingLevel) : "div";
7964
+ const HeadingTagName = this.headingLevel ? sanitizeString$1(this.headingLevel) : "div";
7860
7965
  return (hAsync(Host, { class: { "duet-m-0": this.margin === "none" } }, hAsync(HeadingTagName, { class: {
7861
7966
  "duet-collapsible-heading": true,
7862
7967
  "duet-theme-turva": this.theme === "turva",
@@ -7931,18 +8036,6 @@ class DuetCookieConsent {
7931
8036
  }; }
7932
8037
  }
7933
8038
 
7934
- const focusElement = (element) => {
7935
- if ("setFocus" in element) {
7936
- element.setFocus();
7937
- }
7938
- else {
7939
- element.focus();
7940
- }
7941
- };
7942
- const FocusGuard = ({ moveFocusTo }) => {
7943
- return hAsync("div", { class: "duet-focus-guard", "aria-hidden": "true", tabIndex: 0, onFocus: () => focusElement(moveFocusTo) });
7944
- };
7945
-
7946
8039
  const formatOptionsShort = { day: "numeric", month: "long" };
7947
8040
  const formatOptionsLong = { day: "numeric", month: "long", year: "numeric" };
7948
8041
  const i18n$2 = {
@@ -8333,7 +8426,7 @@ const DatePickerMonth = ({ selectedDate, focusedDate, labelledById, theme, langu
8333
8426
  } }))))))))));
8334
8427
  };
8335
8428
 
8336
- const duetDatePickerCss = "*.sc-duet-date-picker,*.sc-duet-date-picker::after,*.sc-duet-date-picker::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-date-picker-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;position:relative;display:inline-flex;width:100%;min-width:calc(33.333% - 8px);max-width:100%;text-align:left;vertical-align:bottom}.sc-duet-date-picker-h:last-child,.sc-duet-date-picker-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-date-picker-h{width:calc(50% - 16px - 3px)}}.duet-expand.sc-duet-date-picker-h{width:100% !important}.duet-m-0.sc-duet-date-picker-h{margin:0 !important}.duet-date.sc-duet-date-picker{position:relative;width:100%}.duet-date.sc-duet-date-picker button.sc-duet-date-picker,.duet-date-dialog.sc-duet-date-picker button.sc-duet-date-picker{max-width:initial !important;min-height:initial !important;padding:0 !important;margin:0 !important;transition:initial}.duet-date-button.sc-duet-date-picker{-webkit-user-select:none;user-select:none;position:absolute;top:1px;right:1px;z-index:200;display:flex;align-items:center;justify-content:center;width:48px;height:calc(100% - 2px);color:#00294d;cursor:pointer;background:transparent !important;border-left:1px solid #cfd2d4 !important;border-radius:0 4px 4px 0 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker{color:#171c3a;border-color:#cfcfd1}.duet-date-button.sc-duet-date-picker::before{position:absolute;top:0;left:-6px;width:6px;height:100%;content:\"\";background:linear-gradient(to left, rgba(207, 210, 212, 0.2) 0%, rgba(207, 210, 212, 0.2) 1px, rgba(207, 210, 212, 0.1) 1px, rgba(207, 210, 212, 0) 100%)}.duet-date-button.sc-duet-date-picker:disabled{pointer-events:none;cursor:default;background:#f5f8fa !important;border:0 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:disabled{background:#f5f5f7 !important}.duet-date-button.sc-duet-date-picker:disabled::before{display:none}.duet-date-button.sc-duet-date-picker:disabled duet-icon.sc-duet-date-picker{opacity:0.4}.duet-date-button.sc-duet-date-picker duet-icon.sc-duet-date-picker{transform:translateY(-1px)}.duet-date-button.sc-duet-date-picker:active duet-icon.sc-duet-date-picker{transform:translateY(0)}.duet-date-button.sc-duet-date-picker:focus{color:#0077b3;border-color:transparent;outline:0;box-shadow:0 0 0 2px #0077b3}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:focus{color:#171c3a;box-shadow:0 0 0 2px #171c3a}.duet-date-dialog.sc-duet-date-picker{position:absolute;top:100%;left:0;z-index:900;display:flex;width:100%;visibility:hidden;opacity:0;transition:transform 300ms ease, opacity 300ms ease, visibility 300ms ease;transform:scale(0.96) translateZ(0) translateY(-20px);transform-origin:top right}@media (min-width: 36em){.duet-date-dialog.left.sc-duet-date-picker{right:0;left:auto;width:auto}}@media (max-width: 35.9375em){.duet-date-dialog.sc-duet-date-picker{position:fixed;top:0;right:0;bottom:0;background:rgba(0, 41, 77, 0.75);transition:opacity 400ms ease, visibility 400ms ease;transform:translateZ(0);transform-origin:bottom center}.duet-date-dialog.duet-theme-turva.sc-duet-date-picker{background:rgba(23, 28, 58, 0.75)}}.duet-date-dialog.active.sc-duet-date-picker{visibility:visible;opacity:1;transition-property:transform, opacity;transform:scale(1.0001) translateZ(0) translateY(0)}@media (min-width: 36em){.duet-date-dialog.error.sc-duet-date-picker{top:calc(100% - 28px);margin-top:4px}}.duet-date-dialog-wrapper.sc-duet-date-picker{position:relative;z-index:600;width:100%;min-width:290px;max-width:310px;padding:16px 16px 20px;margin-top:8px;margin-left:auto;background:white;border:1px solid #e1e3e6;border-radius:4px;box-shadow:0 4px 10px 0 rgba(0, 41, 77, 0.15);transform:none}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-wrapper.sc-duet-date-picker{border-color:#e4e4e6}@media (max-width: 35.9375em){.duet-date-dialog-wrapper.sc-duet-date-picker{position:absolute;bottom:0;left:0;z-index:900;max-width:none;min-height:25em;padding:0 8% 20px;margin:0;visibility:hidden;border:0;border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px;opacity:0;transition:transform 400ms ease, opacity 400ms ease, visibility 400ms ease;transform:translateZ(0) translateY(100%)}.active.sc-duet-date-picker .duet-date-dialog-wrapper.sc-duet-date-picker{visibility:visible;opacity:1;transition-property:transform, opacity;transform:translateZ(0) translateY(0)}}.duet-date-table.sc-duet-date-picker{width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;line-height:1.25;color:#00294d;text-align:center;border-spacing:0;border-collapse:collapse}.duet-date-table.duet-theme-turva.sc-duet-date-picker{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}.duet-date-table.sc-duet-date-picker th.sc-duet-date-picker{padding-bottom:8px;font-size:0.75rem;font-weight:600;line-height:1.25;text-decoration:none;text-transform:uppercase;letter-spacing:1px}.duet-date-table.sc-duet-date-picker .duet-date-table-cell.sc-duet-date-picker{text-align:center}.duet-date-table-button.sc-duet-date-picker{position:relative;z-index:100;display:inline-block !important;width:36.9230769231px !important;height:36.9230769231px !important;min-height:initial !important;padding:0 !important;margin:0 !important;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0.875rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:1.25 !important;color:#00294d !important;text-align:center;vertical-align:initial !important;cursor:pointer;background:transparent !important;border-radius:50% !important;transition:initial !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\" !important;color:#171c3a !important}.duet-date-table-button.sc-duet-date-picker:hover{background:#e6f2f8 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:hover{background:#f9e6ea !important}.duet-date-table-button.today.sc-duet-date-picker{z-index:200;color:#004d80 !important;background:#f3f9fc !important;box-shadow:0 0 0 1px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.today.sc-duet-date-picker{color:#940925 !important;background:#fcf3f4 !important;box-shadow:0 0 0 1px #c60c30 !important}.duet-date-table-button[aria-pressed=true].sc-duet-date-picker,.duet-date-table-button.sc-duet-date-picker:focus{color:white !important;background:#0077b3 !important;outline:0}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button[aria-pressed=true].sc-duet-date-picker,.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:focus{color:white !important;background:#c60c30 !important}.duet-date-table-button.sc-duet-date-picker:active{z-index:200;color:white !important;background:#0077b3 !important;box-shadow:0 0 5px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:active{color:white !important;background:#c60c30 !important;box-shadow:0 0 5px #c60c30 !important}.duet-date-table-button.sc-duet-date-picker:focus{z-index:200;box-shadow:0 0 5px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:focus{box-shadow:0 0 5px #c60c30 !important}.duet-date-table-button.disabled.sc-duet-date-picker{color:#909599 !important;cursor:default;background:transparent !important;box-shadow:none !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.disabled.sc-duet-date-picker{color:#747475 !important;background:transparent !important;box-shadow:none !important}.duet-date-table-button.outside.sc-duet-date-picker{color:#909599 !important;pointer-events:none;cursor:default;background:#f5f8fa !important;box-shadow:none;opacity:0.75}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.outside.sc-duet-date-picker{color:#747475;background:#f5f5f7;box-shadow:none}.duet-date-dialog-header.sc-duet-date-picker{margin-bottom:16px !important;display:flex;align-items:center;justify-content:space-between;width:100%}.duet-date-dialog-buttons.sc-duet-date-picker{white-space:nowrap}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;min-height:auto !important;padding:0 !important;margin:0 0 0 8px !important;color:#00294d;cursor:pointer;background:#f5f8fa;border-radius:50%;transition:background-color 300ms ease !important}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker{color:#171c3a;background:#f5f5f7}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker duet-icon.sc-duet-date-picker{display:block}@media (max-width: 35.9375em){.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker{width:40px;height:40px}}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:not(:disabled):hover{background:#e9ecee !important}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:not(:disabled):hover{background:#e9e9eb !important}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:focus{outline:0;box-shadow:0 0 0 2px #0077b3}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:focus{box-shadow:0 0 0 2px #171c3a}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:active:focus{background:#dddfe1;box-shadow:none}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:active:focus{background:#ddddde}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:disabled{color:#909599;cursor:default;background:#f5f8fa;opacity:0.75}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:disabled{color:#747475;background:#f5f5f7}.duet-date-dialog-select.sc-duet-date-picker{position:relative;display:inline-flex;margin-top:4px}.duet-date-dialog-select.sc-duet-date-picker .duet-date-dialog-select-label.sc-duet-date-picker{position:relative;z-index:1;display:flex;align-items:center;width:100%;padding:0 8px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1.25rem;font-weight:600;line-height:1.25;color:#00294d;pointer-events:none;border-radius:4px}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-select.sc-duet-date-picker .duet-date-dialog-select-label.sc-duet-date-picker{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}.duet-date-dialog-select.sc-duet-date-picker span.sc-duet-date-picker{margin-right:4px}.duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker{position:absolute;top:0;left:0;z-index:2;width:100%;height:100%;font-size:1rem;cursor:pointer;opacity:0}.duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.sc-duet-date-picker{box-shadow:0 0 0 2px #0077b3}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.sc-duet-date-picker{box-shadow:0 0 0 2px #171c3a}.duet-date-dialog-mobile-header.sc-duet-date-picker{position:relative;display:flex;align-items:center;justify-content:space-between;width:120%;padding:12px 20px;margin-bottom:20px;margin-left:-10%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-bottom:1px solid #cfd2d4}@media (min-width: 36em){.duet-date-dialog-mobile-header.sc-duet-date-picker{position:absolute;top:-8px;right:-8px;width:auto;padding:0;margin:0;overflow:visible;border:0}}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-mobile-header.sc-duet-date-picker{border-color:#cfcfd1}.duet-date-dialog-mobile-header.sc-duet-date-picker duet-label.sc-duet-date-picker{display:inline-block;max-width:84%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 36em){.duet-date-dialog-mobile-header.sc-duet-date-picker duet-label.sc-duet-date-picker{display:none}}.duet-date-picker-close.sc-duet-date-picker{display:flex;align-items:center;justify-content:center;width:24px;height:24px !important;padding:0 !important;color:#00294d !important;cursor:pointer;background:#f5f8fa !important;border-radius:50%;-webkit-appearance:none;appearance:none}@media (min-width: 36em){.duet-date-picker-close.sc-duet-date-picker{opacity:0}}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker{background:#f5f5f7 !important}.duet-date-picker-close.sc-duet-date-picker:hover{background:#f5f8fa !important}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker:hover{background:#f5f5f7 !important}.duet-date-picker-close.sc-duet-date-picker:focus{outline:none;box-shadow:0 0 0 2px #0077b3}@media (min-width: 36em){.duet-date-picker-close.sc-duet-date-picker:focus{opacity:1}}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker:focus{box-shadow:0 0 0 2px #171c3a}";
8429
+ const duetDatePickerCss = "*.sc-duet-date-picker,*.sc-duet-date-picker::after,*.sc-duet-date-picker::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-date-picker-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;position:relative;display:inline-flex;width:100%;min-width:calc(33.333% - 8px);max-width:100%;text-align:left;vertical-align:top}.sc-duet-date-picker-h:last-child,.sc-duet-date-picker-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-date-picker-h{width:calc(50% - 16px - 3px)}}.duet-expand.sc-duet-date-picker-h{width:100% !important}.duet-m-0.sc-duet-date-picker-h{margin:0 !important}.duet-date.sc-duet-date-picker{position:relative;width:100%}.duet-date.sc-duet-date-picker button.sc-duet-date-picker,.duet-date-dialog.sc-duet-date-picker button.sc-duet-date-picker{max-width:initial !important;min-height:initial !important;padding:0 !important;margin:0 !important;transition:initial}.duet-date-button.sc-duet-date-picker{-webkit-user-select:none;user-select:none;position:absolute;top:1px;right:1px;z-index:200;display:flex;align-items:center;justify-content:center;width:48px;height:calc(100% - 2px);color:#00294d;cursor:pointer;background:transparent !important;border-left:1px solid #cfd2d4 !important;border-radius:0 4px 4px 0 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker{color:#171c3a;border-color:#cfcfd1}.duet-date-button.sc-duet-date-picker::before{position:absolute;top:0;left:-6px;width:6px;height:100%;content:\"\";background:linear-gradient(to left, rgba(207, 210, 212, 0.2) 0%, rgba(207, 210, 212, 0.2) 1px, rgba(207, 210, 212, 0.1) 1px, rgba(207, 210, 212, 0) 100%)}.duet-date-button.sc-duet-date-picker:disabled{pointer-events:none;cursor:default;background:#f5f8fa !important;border:0 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:disabled{background:#f5f5f7 !important}.duet-date-button.sc-duet-date-picker:disabled::before{display:none}.duet-date-button.sc-duet-date-picker:disabled duet-icon.sc-duet-date-picker{opacity:0.4}.duet-date-button.sc-duet-date-picker duet-icon.sc-duet-date-picker{transform:translateY(-1px)}.duet-date-button.sc-duet-date-picker:active duet-icon.sc-duet-date-picker{transform:translateY(0)}.duet-date-button.sc-duet-date-picker:focus{color:#0077b3;border-color:transparent;outline:0;box-shadow:0 0 0 2px #0077b3}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:focus{color:#171c3a;box-shadow:0 0 0 2px #171c3a}.duet-date-dialog.sc-duet-date-picker{position:absolute;top:100%;left:0;z-index:900;display:flex;width:100%;visibility:hidden;opacity:0;transition:transform 300ms ease, opacity 300ms ease, visibility 300ms ease;transform:scale(0.96) translateZ(0) translateY(-20px);transform-origin:top right}@media (min-width: 36em){.duet-date-dialog.left.sc-duet-date-picker{right:0;left:auto;width:auto}}@media (max-width: 35.9375em){.duet-date-dialog.sc-duet-date-picker{position:fixed;top:0;right:0;bottom:0;background:rgba(0, 41, 77, 0.75);transition:opacity 400ms ease, visibility 400ms ease;transform:translateZ(0);transform-origin:bottom center}.duet-date-dialog.duet-theme-turva.sc-duet-date-picker{background:rgba(23, 28, 58, 0.75)}}.duet-date-dialog.active.sc-duet-date-picker{visibility:visible;opacity:1;transition-property:transform, opacity;transform:scale(1.0001) translateZ(0) translateY(0)}@media (min-width: 36em){.duet-date-dialog.error.sc-duet-date-picker{top:calc(100% - 28px);margin-top:4px}}.duet-date-dialog-wrapper.sc-duet-date-picker{position:relative;z-index:600;width:100%;min-width:290px;max-width:310px;padding:16px 16px 20px;margin-top:8px;margin-left:auto;background:white;border:1px solid #e1e3e6;border-radius:4px;box-shadow:0 4px 10px 0 rgba(0, 41, 77, 0.15);transform:none}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-wrapper.sc-duet-date-picker{border-color:#e4e4e6}@media (max-width: 35.9375em){.duet-date-dialog-wrapper.sc-duet-date-picker{position:absolute;bottom:0;left:0;z-index:900;max-width:none;min-height:25em;padding:0 8% 20px;margin:0;visibility:hidden;border:0;border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px;opacity:0;transition:transform 400ms ease, opacity 400ms ease, visibility 400ms ease;transform:translateZ(0) translateY(100%)}.active.sc-duet-date-picker .duet-date-dialog-wrapper.sc-duet-date-picker{visibility:visible;opacity:1;transition-property:transform, opacity;transform:translateZ(0) translateY(0)}}.duet-date-table.sc-duet-date-picker{width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;line-height:1.25;color:#00294d;text-align:center;border-spacing:0;border-collapse:collapse}.duet-date-table.duet-theme-turva.sc-duet-date-picker{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}.duet-date-table.sc-duet-date-picker th.sc-duet-date-picker{padding-bottom:8px;font-size:0.75rem;font-weight:600;line-height:1.25;text-decoration:none;text-transform:uppercase;letter-spacing:1px}.duet-date-table.sc-duet-date-picker .duet-date-table-cell.sc-duet-date-picker{text-align:center}.duet-date-table-button.sc-duet-date-picker{position:relative;z-index:100;display:inline-block !important;width:36.9230769231px !important;height:36.9230769231px !important;min-height:initial !important;padding:0 !important;margin:0 !important;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0.875rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:1.25 !important;color:#00294d !important;text-align:center;vertical-align:initial !important;cursor:pointer;background:transparent !important;border-radius:50% !important;transition:initial !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\" !important;color:#171c3a !important}.duet-date-table-button.sc-duet-date-picker:hover{background:#e6f2f8 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:hover{background:#f9e6ea !important}.duet-date-table-button.today.sc-duet-date-picker{z-index:200;color:#004d80 !important;background:#f3f9fc !important;box-shadow:0 0 0 1px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.today.sc-duet-date-picker{color:#940925 !important;background:#fcf3f4 !important;box-shadow:0 0 0 1px #c60c30 !important}.duet-date-table-button[aria-pressed=true].sc-duet-date-picker,.duet-date-table-button.sc-duet-date-picker:focus{color:white !important;background:#0077b3 !important;outline:0}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button[aria-pressed=true].sc-duet-date-picker,.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:focus{color:white !important;background:#c60c30 !important}.duet-date-table-button.sc-duet-date-picker:active{z-index:200;color:white !important;background:#0077b3 !important;box-shadow:0 0 5px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:active{color:white !important;background:#c60c30 !important;box-shadow:0 0 5px #c60c30 !important}.duet-date-table-button.sc-duet-date-picker:focus{z-index:200;box-shadow:0 0 5px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:focus{box-shadow:0 0 5px #c60c30 !important}.duet-date-table-button.disabled.sc-duet-date-picker{color:#909599 !important;cursor:default;background:transparent !important;box-shadow:none !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.disabled.sc-duet-date-picker{color:#747475 !important;background:transparent !important;box-shadow:none !important}.duet-date-table-button.outside.sc-duet-date-picker{color:#909599 !important;pointer-events:none;cursor:default;background:#f5f8fa !important;box-shadow:none;opacity:0.75}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.outside.sc-duet-date-picker{color:#747475;background:#f5f5f7;box-shadow:none}.duet-date-dialog-header.sc-duet-date-picker{margin-bottom:16px !important;display:flex;align-items:center;justify-content:space-between;width:100%}.duet-date-dialog-buttons.sc-duet-date-picker{white-space:nowrap}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;min-height:auto !important;padding:0 !important;margin:0 0 0 8px !important;color:#00294d;cursor:pointer;background:#f5f8fa;border-radius:50%;transition:background-color 300ms ease !important}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker{color:#171c3a;background:#f5f5f7}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker duet-icon.sc-duet-date-picker{display:block}@media (max-width: 35.9375em){.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker{width:40px;height:40px}}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:not(:disabled):hover{background:#e9ecee !important}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:not(:disabled):hover{background:#e9e9eb !important}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:focus{outline:0;box-shadow:0 0 0 2px #0077b3}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:focus{box-shadow:0 0 0 2px #171c3a}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:active:focus{background:#dddfe1;box-shadow:none}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:active:focus{background:#ddddde}.duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:disabled{color:#909599;cursor:default;background:#f5f8fa;opacity:0.75}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-buttons.sc-duet-date-picker button.sc-duet-date-picker:disabled{color:#747475;background:#f5f5f7}.duet-date-dialog-select.sc-duet-date-picker{position:relative;display:inline-flex;margin-top:4px}.duet-date-dialog-select.sc-duet-date-picker .duet-date-dialog-select-label.sc-duet-date-picker{position:relative;z-index:1;display:flex;align-items:center;width:100%;padding:0 8px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1.25rem;font-weight:600;line-height:1.25;color:#00294d;pointer-events:none;border-radius:4px}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-select.sc-duet-date-picker .duet-date-dialog-select-label.sc-duet-date-picker{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}.duet-date-dialog-select.sc-duet-date-picker span.sc-duet-date-picker{margin-right:4px}.duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker{position:absolute;top:0;left:0;z-index:2;width:100%;height:100%;font-size:1rem;cursor:pointer;opacity:0}.duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.sc-duet-date-picker{box-shadow:0 0 0 2px #0077b3}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.sc-duet-date-picker{box-shadow:0 0 0 2px #171c3a}.duet-date-dialog-mobile-header.sc-duet-date-picker{position:relative;display:flex;align-items:center;justify-content:space-between;width:120%;padding:12px 20px;margin-bottom:20px;margin-left:-10%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-bottom:1px solid #cfd2d4}@media (min-width: 36em){.duet-date-dialog-mobile-header.sc-duet-date-picker{position:absolute;top:-8px;right:-8px;width:auto;padding:0;margin:0;overflow:visible;border:0}}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-mobile-header.sc-duet-date-picker{border-color:#cfcfd1}.duet-date-dialog-mobile-header.sc-duet-date-picker duet-label.sc-duet-date-picker{display:inline-block;max-width:84%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 36em){.duet-date-dialog-mobile-header.sc-duet-date-picker duet-label.sc-duet-date-picker{display:none}}.duet-date-picker-close.sc-duet-date-picker{display:flex;align-items:center;justify-content:center;width:24px;height:24px !important;padding:0 !important;color:#00294d !important;cursor:pointer;background:#f5f8fa !important;border-radius:50%;-webkit-appearance:none;appearance:none}@media (min-width: 36em){.duet-date-picker-close.sc-duet-date-picker{opacity:0}}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker{background:#f5f5f7 !important}.duet-date-picker-close.sc-duet-date-picker:hover{background:#f5f8fa !important}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker:hover{background:#f5f5f7 !important}.duet-date-picker-close.sc-duet-date-picker:focus{outline:none;box-shadow:0 0 0 2px #0077b3}@media (min-width: 36em){.duet-date-picker-close.sc-duet-date-picker:focus{opacity:1}}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker:focus{box-shadow:0 0 0 2px #171c3a}";
8337
8430
 
8338
8431
  class DuetDatePicker {
8339
8432
  constructor(hostRef) {
@@ -8374,11 +8467,27 @@ class DuetDatePicker {
8374
8467
  * Controls the margin of the component.
8375
8468
  */
8376
8469
  this.margin = "auto";
8470
+ /**
8471
+ * The currently active language. This setting changes the month/year/day.
8472
+ * names and button labels as well as all screen reader labels.
8473
+ * @deprecated this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing.
8474
+ * @default "fi"
8475
+ */
8476
+ this.language = getLanguage();
8477
+ /**
8478
+ * Placeholder defaults.
8479
+ * @default { fi: "pp.kk.vvvv", en: "dd.mm.yyyy", sv: "dd.mm.åååå" }
8480
+ */
8481
+ this.placeholderDefaults = {
8482
+ fi: "pp.kk.vvvv",
8483
+ en: "dd.mm.yyyy",
8484
+ sv: "dd.mm.åååå",
8485
+ };
8377
8486
  /**
8378
8487
  * Hint text to display before the user types into the date picker input.
8379
8488
  * @default { fi: "pp.kk.vvvv", en: "dd.mm.yyyy", sv: "dd.mm.åååå" }
8380
8489
  */
8381
- this.placeholder = getLocaleString({ fi: "pp.kk.vvvv", en: "dd.mm.yyyy", sv: "dd.mm.åååå" });
8490
+ this.placeholder = getLocaleString(this.placeholderDefaults, this.language);
8382
8491
  /**
8383
8492
  * If form input field has a placeholder text, and user types anything (causing the text to dissapear),
8384
8493
  * settings this to true will "echo" it into the caption slot - this option will be false by default for the next few versions, but will eventually be true by default (scheduled for 4.30.0)
@@ -8389,13 +8498,6 @@ class DuetDatePicker {
8389
8498
  * interact with the input, and conveys its inactive state to assistive technologies.
8390
8499
  */
8391
8500
  this.disabled = false;
8392
- /**
8393
- * The currently active language. This setting changes the month/year/day
8394
- * names and button labels as well as all screen reader labels.
8395
- * @deprecated this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing
8396
- * @default "fi"
8397
- */
8398
- this.language = getLanguage();
8399
8501
  /**
8400
8502
  * Display the date picker input in error state along with an error message.
8401
8503
  */
@@ -8436,7 +8538,7 @@ class DuetDatePicker {
8436
8538
  */
8437
8539
  this.min = "";
8438
8540
  /**
8439
- * Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD
8541
+ * Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.
8440
8542
  * This setting can be used alone or together with the min property.
8441
8543
  */
8442
8544
  this.max = "";
@@ -8740,10 +8842,11 @@ class DuetDatePicker {
8740
8842
  "label": [1],
8741
8843
  "caption": [1],
8742
8844
  "margin": [1],
8845
+ "language": [1],
8846
+ "placeholderDefaults": [1, "placeholder-default"],
8743
8847
  "placeholder": [1],
8744
8848
  "echoPlaceholder": [1540, "echo-placeholder"],
8745
8849
  "disabled": [516],
8746
- "language": [1],
8747
8850
  "error": [1],
8748
8851
  "labelHidden": [4, "label-hidden"],
8749
8852
  "role": [1],
@@ -8819,49 +8922,153 @@ class DuetDivider {
8819
8922
  }; }
8820
8923
  }
8821
8924
 
8822
- const duetEmptyStateCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-empty-state,*.sc-duet-empty-state::after,*.sc-duet-empty-state::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-empty-state-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%;height:100%}/*!@.duet-empty-state*/.duet-empty-state.sc-duet-empty-state{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;width:100%;height:100%;padding:48px;color:#00294d;text-align:center;background:#f5f8fa;border-radius:4px}/*!@.duet-empty-state.duet-theme-turva*/.duet-empty-state.duet-theme-turva.sc-duet-empty-state{color:#171c3a;background:#f5f5f7}";
8925
+ const debounce = (func, timeout = 50) => {
8926
+ let timer;
8927
+ return (...args) => {
8928
+ clearTimeout(timer);
8929
+ timer = setTimeout(() => {
8930
+ func.apply(undefined, args);
8931
+ }, timeout);
8932
+ };
8933
+ };
8823
8934
 
8824
- class DuetEmptyState {
8935
+ const duetEditableTableCss = "/*!@duet-editable-table*/duet-editable-table.sc-duet-editable-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@.duet-editable-table-header tr .duet-editable-table-header-hidden*/.duet-editable-table-header.sc-duet-editable-table tr.sc-duet-editable-table .duet-editable-table-header-hidden.sc-duet-editable-table{padding:0 !important;font-size:0;border-bottom:0}";
8936
+
8937
+ class DuetEditableTable {
8825
8938
  constructor(hostRef) {
8826
8939
  registerInstance(this, hostRef);
8827
8940
  /**
8828
- * Theme of the empty state component.
8941
+ * State() variables
8942
+ * @internal
8829
8943
  */
8830
- this.theme = "";
8944
+ this.tick = Date.now();
8831
8945
  /**
8832
- * Icon shown in the empty state component.
8946
+ * Map of items that contain list of things.
8833
8947
  */
8834
- this.icon = "messaging-question";
8948
+ this.items = new Map();
8835
8949
  /**
8836
- * The size of the empty state message.
8950
+ * Array of internationalized defaults for the default groups labels.
8837
8951
  */
8838
- this.size = "medium";
8952
+ this.groupsLabelDefaults = {
8953
+ fi: "Kaikki",
8954
+ en: "All items",
8955
+ sv: "Alla objekt",
8956
+ };
8957
+ /**
8958
+ * Array of internationalized defaults for the default action labels.
8959
+ */
8960
+ this.actionLabelDefaults = {
8961
+ fi: "Toiminnot",
8962
+ en: "Actions",
8963
+ sv: "Handlingar",
8964
+ };
8965
+ /**
8966
+ * Array of group names that you want the editable table to display (can be used to hide or show groups depending on conditions).
8967
+ * @default { id: "all", label: this.groupsLabelDefaults, actionLabel: this.actionLabelDefaults }.
8968
+ * @example [{ id: "success", label: {fi: "Onnistunut", en: "Success", sv: "Alt klart", }}].
8969
+ */
8970
+ this.groups = [
8971
+ { id: "all", label: this.groupsLabelDefaults, actionLabel: this.actionLabelDefaults },
8972
+ ];
8973
+ /**
8974
+ * Array of actions that are mapped via the map variable to the various groups defined in group.
8975
+ * @default undefined
8976
+ * @example [{
8977
+ variation: "default",
8978
+ icon: "action-edit-2",
8979
+ id: "edit",
8980
+ map: ["success"],
8981
+ label: {
8982
+ fi: " Label",
8983
+ en: " Label",
8984
+ sv: " Label",
8985
+ }
8986
+ }]
8987
+ */
8988
+ this.actions = undefined;
8989
+ /**
8990
+ * Shows or hides the table labels.
8991
+ */
8992
+ this.hideGroups = false;
8993
+ /**
8994
+ * Exposes the aria role for optimizing accessibility.
8995
+ */
8996
+ this.accessibleRole = undefined;
8997
+ /**
8998
+ * Private methods.
8999
+ */
9000
+ this.kick = debounce(() => {
9001
+ this.tick = Date.now();
9002
+ }, 100); // will trigger re-render
9003
+ this.filterMap = needle => {
9004
+ if (needle === "all") {
9005
+ return Array.from(this.items);
9006
+ }
9007
+ return Array.from(this.items).filter(item => needle === item[1].group);
9008
+ };
8839
9009
  }
8840
9010
  /**
8841
9011
  * Component lifecycle events.
8842
9012
  */
8843
9013
  componentWillLoad() {
9014
+ if (typeof this.groups === "string") {
9015
+ this.internalGroupArray = sanitizeString(this.groups);
9016
+ }
9017
+ else {
9018
+ this.internalGroupArray = this.groups;
9019
+ }
9020
+ if (typeof this.actions === "string") {
9021
+ this.internalActionsArray = sanitizeString(this.actions);
9022
+ }
9023
+ else {
9024
+ this.internalActionsArray = this.actions;
9025
+ }
8844
9026
  inheritGlobalTheme(this);
8845
9027
  }
8846
9028
  /**
8847
- * render() function
8848
- * Always the last one in the class.
9029
+ * Method to force an update of a tabular data array.
9030
+ * when called the method will rerender the entire tabular structure.
8849
9031
  */
9032
+ async updateTable(passedItems = undefined) {
9033
+ this.items = new Map(passedItems || this.items);
9034
+ this.kick();
9035
+ }
8850
9036
  render() {
8851
- return (hAsync(Host, null, hAsync("div", { class: {
8852
- "duet-empty-state": true,
9037
+ return (hAsync(Host, { class: {
8853
9038
  "duet-theme-turva": this.theme === "turva",
8854
- "duet-is-small": this.size === "small",
8855
- } }, hAsync("duet-icon", { color: "currentColor", name: this.icon, size: this.size === "small" ? "large" : "x-large" }), hAsync("div", null, hAsync("slot", null)))));
9039
+ } }, this.internalGroupArray.map(group => {
9040
+ const currentGroup = this.filterMap(group.id);
9041
+ if (!currentGroup.length) {
9042
+ return;
9043
+ }
9044
+ return (hAsync("duet-table", { variation: "plain", breakpoint: "none", role: "", margin: this.hideGroups ? "none" : "auto" }, hAsync("table", { class: "duet-editable-table", "aria-role": this.accessibleRole }, hAsync("thead", { class: "duet-editable-table-header" }, hAsync("tr", null, hAsync("th", { class: {
9045
+ "duet-editable-table-header-hidden": this.hideGroups,
9046
+ } }, !this.hideGroups ? (getLocaleString(group.label)) : (hAsync("duet-visually-hidden", null, getLocaleString(group.label)))), hAsync("th", { class: {
9047
+ "duet-editable-table-header-hidden": this.hideGroups,
9048
+ } }, hAsync("duet-visually-hidden", null, group.actionLabel
9049
+ ? getLocaleString(group.actionLabel)
9050
+ : getLocaleString(this.actionLabelDefaults))))), hAsync("tbody", null, currentGroup.map(dataAsArray => {
9051
+ const [key, value] = dataAsArray;
9052
+ return (hAsync("duet-editable-table-item", { keyName: key, data: Object.assign({}, value), groupId: group.id, part: group.id, actions: this.internalActionsArray }));
9053
+ })))));
9054
+ })));
8856
9055
  }
8857
- static get style() { return duetEmptyStateCss; }
9056
+ get element() { return getElement(this); }
9057
+ static get style() { return duetEditableTableCss; }
8858
9058
  static get cmpMeta() { return {
8859
9059
  "$flags$": 9,
8860
- "$tagName$": "duet-empty-state",
9060
+ "$tagName$": "duet-editable-table",
8861
9061
  "$members$": {
9062
+ "items": [1040],
9063
+ "groupsLabelDefaults": [16],
9064
+ "actionLabelDefaults": [16],
9065
+ "groups": [1],
9066
+ "actions": [1],
9067
+ "hideGroups": [4, "hide-table-labels"],
9068
+ "accessibleRole": [1, "accessible-role"],
8862
9069
  "theme": [1025],
8863
- "icon": [1],
8864
- "size": [1]
9070
+ "tick": [32],
9071
+ "updateTable": [64]
8865
9072
  },
8866
9073
  "$listeners$": undefined,
8867
9074
  "$lazyBundleId$": "-",
@@ -8869,47 +9076,275 @@ class DuetEmptyState {
8869
9076
  }; }
8870
9077
  }
8871
9078
 
8872
- const duetFieldsetCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-fieldset,*.sc-duet-fieldset::after,*.sc-duet-fieldset::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-fieldset-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:12px !important;display:block;width:100%}/*!@:host(.duet-m-0)*/.duet-m-0.sc-duet-fieldset-h{margin:0 !important}/*!@fieldset*/fieldset.sc-duet-fieldset{border:0}/*!@legend*/legend.sc-duet-fieldset{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}/*!@.duet-legend-wrapper*/.duet-legend-wrapper.sc-duet-fieldset{position:relative;display:block;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:600;line-height:1.5;color:#00294d;text-align:left;background:transparent}/*!@.duet-theme-turva .duet-legend-wrapper*/.duet-theme-turva.sc-duet-fieldset .duet-legend-wrapper.sc-duet-fieldset{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}/*!@.duet-fieldset-label*/.duet-fieldset-label.sc-duet-fieldset{margin-bottom:12px !important;margin-top:8px}/*!@.duet-legend-has-caption .duet-fieldset-label*/.duet-legend-has-caption.sc-duet-fieldset .duet-fieldset-label.sc-duet-fieldset{margin-bottom:6px !important}/*!@.duet-legend-has-tooltip .duet-fieldset-label*/.duet-legend-has-tooltip.sc-duet-fieldset .duet-fieldset-label.sc-duet-fieldset{padding-right:36px}@media (min-width: 48em){/*!@.duet-legend-has-tooltip .duet-fieldset-label*/.duet-legend-has-tooltip.sc-duet-fieldset .duet-fieldset-label.sc-duet-fieldset{margin-bottom:3px !important;padding-right:0}}@media (min-width: 48em){/*!@.duet-legend-has-tooltip.duet-legend-has-caption .duet-fieldset-label*/.duet-legend-has-tooltip.duet-legend-has-caption.sc-duet-fieldset .duet-fieldset-label.sc-duet-fieldset{margin-bottom:-3px !important}}/*!@.duet-fieldset-caption*/.duet-fieldset-caption.sc-duet-fieldset{margin-bottom:12px !important}/*!@.duet-fieldset-help*/.duet-fieldset-help.sc-duet-fieldset{display:block;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0.875rem;font-weight:400;line-height:1.25;color:#de2362;border-radius:4px}/*!@.duet-fieldset-help span*/.duet-fieldset-help.sc-duet-fieldset span.sc-duet-fieldset{display:block;margin-top:12px}/*!@.duet-theme-turva .duet-fieldset-help*/.duet-theme-turva.sc-duet-fieldset .duet-fieldset-help.sc-duet-fieldset{color:#e02a0d}/*!@::slotted(duet-tooltip)*/.sc-duet-fieldset-s>duet-tooltip{position:absolute;top:4px;right:0}@media (min-width: 48em){/*!@::slotted(duet-tooltip)*/.sc-duet-fieldset-s>duet-tooltip{position:relative;right:auto}}/*!@.duet-legend-hidden*/.duet-legend-hidden.sc-duet-fieldset{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}";
9079
+ const duetEditableTableButtonCss = "*.sc-duet-editable-table-button,*.sc-duet-editable-table-button::after,*.sc-duet-editable-table-button::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-editable-table-button-h button.sc-duet-editable-table-button{display:flex;align-content:space-between;justify-content:center;min-width:32px;max-width:32px;height:100%;min-height:32px;max-height:32px;padding:0;margin:0;cursor:pointer !important;background-color:transparent;border:1px solid;border-radius:50%}.sc-duet-editable-table-button-h button.sc-duet-editable-table-button duet-icon.sc-duet-editable-table-button{align-self:center}";
8873
9080
 
8874
- /**
8875
- * @slot unnamed default slot - The component’s primary content. All child nodes that do not have a slot attribute defined are inserted into this primary slot.
8876
- * @slot tooltip - Use to place a tooltip alongside the fieldset label.
8877
- */
8878
- class DuetFieldset {
9081
+ class DuetEditableTableButton {
8879
9082
  constructor(hostRef) {
8880
9083
  registerInstance(this, hostRef);
8881
- this.errorId = createID("DuetError");
8882
- this.labelId = createID("DuetLabel");
8883
- this.hasTooltip = false;
9084
+ this.duetEditableItemAction = createEvent$2(this, "duetEditableItemAction", 7);
9085
+ this.isHovering = false;
8884
9086
  /**
8885
- * Theme of the fieldset.
9087
+ * Theme of the empty state component.
8886
9088
  */
8887
9089
  this.theme = "";
8888
9090
  /**
8889
- * Controls the margin of the component.
9091
+ * action items passed from host component
9092
+ * @internal
8890
9093
  */
8891
- this.margin = "auto";
9094
+ this.actions = undefined;
8892
9095
  /**
8893
- * Visually hide the label, but still show it to screen readers.
9096
+ * uid that gets passed along when the action is emitted
9097
+ * @internal
8894
9098
  */
8895
- this.labelHidden = false;
8896
- this.checkHasTooltip = () => {
8897
- this.hasTooltip = !!this.element.querySelector("[slot='tooltip']");
9099
+ this.uid = "";
9100
+ /**
9101
+ * group associated with action
9102
+ * @internal
9103
+ */
9104
+ this.group = "";
9105
+ /**
9106
+ * key of the item in the map
9107
+ * @internal
9108
+ */
9109
+ this.keyName = "";
9110
+ this.onMouseEnter = () => {
9111
+ this.isHovering = true;
9112
+ };
9113
+ this.onMouseLeave = () => {
9114
+ this.isHovering = false;
8898
9115
  };
8899
9116
  }
8900
9117
  /**
9118
+ /**
8901
9119
  * Component lifecycle events.
8902
9120
  */
8903
9121
  componentWillLoad() {
8904
9122
  inheritGlobalTheme(this);
8905
- this.checkHasTooltip();
8906
9123
  }
8907
9124
  /**
8908
- * render() function
8909
- * Always the last one in the class.
9125
+ /**
9126
+ * private functions
8910
9127
  */
8911
- render() {
8912
- return (hAsync(Host, { class: { "duet-m-0": this.margin === "none" } }, hAsync("fieldset", { "aria-labelledby": `${this.labelId} ${this.errorId}`, class: {
9128
+ emitActionEvent(ev) {
9129
+ this.duetEditableItemAction.emit({
9130
+ originalEvent: ev,
9131
+ uid: this.uid,
9132
+ group: this.group,
9133
+ action: this.actions.id,
9134
+ keyName: this.keyName,
9135
+ component: "duet-editable-table-item",
9136
+ });
9137
+ }
9138
+ /**
9139
+ * render() function
9140
+ * Always the last one in the class.
9141
+ */
9142
+ render() {
9143
+ return (hAsync("button", { style: {
9144
+ "border-color": this.isHovering
9145
+ ? getColorByName(this.actions.color_hover)
9146
+ : getColorByName(this.actions.color),
9147
+ }, onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave, role: "menuitem", class: "duet-editable-table-actions-items-button", "aria-label": this.actions.label ? getLocaleString(this.actions.label) : undefined, onClick: ev => this.emitActionEvent(ev) }, hAsync("duet-icon", { class: "duet-editable-table-actions-items-icon", size: "x-small", name: this.actions.icon, color: this.isHovering ? this.actions.color_hover : this.actions.color, margin: "none" })));
9148
+ }
9149
+ get el() { return getElement(this); }
9150
+ static get style() { return duetEditableTableButtonCss; }
9151
+ static get cmpMeta() { return {
9152
+ "$flags$": 2,
9153
+ "$tagName$": "duet-editable-table-button",
9154
+ "$members$": {
9155
+ "theme": [1025],
9156
+ "actions": [16],
9157
+ "uid": [1],
9158
+ "group": [1],
9159
+ "keyName": [1, "key-name"],
9160
+ "isHovering": [32]
9161
+ },
9162
+ "$listeners$": undefined,
9163
+ "$lazyBundleId$": "-",
9164
+ "$attrsToReflect$": []
9165
+ }; }
9166
+ }
9167
+
9168
+ //simple functional component that renders the data in the table
9169
+ const TableData = ({ data, groupId }, _children) => {
9170
+ if (typeof data === "string") {
9171
+ return hAsync("td", { innerHTML: data, class: "duet-editable-table-content", part: `${groupId}content` });
9172
+ }
9173
+ else {
9174
+ return (hAsync("td", { class: "duet-editable-table-content", part: `${groupId}content` }, data));
9175
+ }
9176
+ };
9177
+
9178
+ const duetEditableTableItemCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-editable-table-item,*.sc-duet-editable-table-item::after,*.sc-duet-editable-table-item::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-editable-table-item-h{display:table-row;height:32px}/*!@.duet-editable-table-content, .duet-editable-table-actions*/.duet-editable-table-content.sc-duet-editable-table-item,.duet-editable-table-actions.sc-duet-editable-table-item{height:32px;padding:12px 0;vertical-align:middle;break-word:break-all;border-bottom:1px solid #e1e3e6}/*!@.duet-editable-table-actions-items*/.duet-editable-table-actions-items.sc-duet-editable-table-item{display:flex;justify-content:flex-end}/*!@.duet-editable-table-actions-items duet-editable-table-button*/.duet-editable-table-actions-items.sc-duet-editable-table-item duet-editable-table-button.sc-duet-editable-table-item{padding-left:8px}/*!@.duet-editable-table .editable-item-small*/.duet-editable-table.sc-duet-editable-table-item .editable-item-small.sc-duet-editable-table-item{font-size:0.75rem;font-weight:400}";
9179
+
9180
+ class DuetEditableTableItem {
9181
+ constructor(hostRef) {
9182
+ registerInstance(this, hostRef);
9183
+ this.duetEditableItemAction = createEvent$2(this, "duetEditableItemAction", 7);
9184
+ this.isHovering = false;
9185
+ /**
9186
+ * Theme of the empty state component.
9187
+ */
9188
+ this.theme = "";
9189
+ /**
9190
+ * Actions that can be performed on the element
9191
+ */
9192
+ this.actions = undefined;
9193
+ /**
9194
+ * GroupId used to pierce the shadowdom - gets concatenated with "content & actions" and used as part="groupIDcontent/actions" to pierce the content/Action item
9195
+ * @internal
9196
+ */
9197
+ this.groupId = "";
9198
+ /**
9199
+ * Key used to identify item, when running actions
9200
+ */
9201
+ this.keyName = "";
9202
+ /**
9203
+ * Object of data itemsused to render the entire row
9204
+ */
9205
+ this.data = undefined;
9206
+ }
9207
+ watchPropHandler(_newValue, _oldValue) {
9208
+ // console.log("The new value of activated is: ", _newValue)
9209
+ }
9210
+ /**
9211
+ /**
9212
+ * Component lifecycle events.
9213
+ */
9214
+ componentWillLoad() {
9215
+ inheritGlobalTheme(this);
9216
+ }
9217
+ /**
9218
+ /**
9219
+ * private functions
9220
+ */
9221
+ /**
9222
+ * render() function
9223
+ * Always the last one in the class.
9224
+ */
9225
+ render() {
9226
+ return (hAsync(Host, { role: "row" }, hAsync(TableData, { data: this.data.item, groupId: this.groupId }), hAsync("td", { class: "duet-editable-table-actions" }, hAsync("div", { class: "duet-editable-table-actions-items", part: `${this.groupId}actions` }, this.actions.map(result => {
9227
+ const { map = undefined } = result;
9228
+ // if map has been specified, only show the current action if groupID matches the map array
9229
+ if (map && !map.includes(this.groupId)) {
9230
+ return;
9231
+ }
9232
+ return (hAsync("duet-editable-table-button", { keyName: this.keyName, group: this.data.group, uid: this.data.uid, actions: result, theme: this.theme }));
9233
+ })))));
9234
+ }
9235
+ get el() { return getElement(this); }
9236
+ static get watchers() { return {
9237
+ "data": ["watchPropHandler"]
9238
+ }; }
9239
+ static get style() { return duetEditableTableItemCss; }
9240
+ static get cmpMeta() { return {
9241
+ "$flags$": 9,
9242
+ "$tagName$": "duet-editable-table-item",
9243
+ "$members$": {
9244
+ "theme": [1025],
9245
+ "actions": [16],
9246
+ "groupId": [1, "group-id"],
9247
+ "keyName": [1, "key-name"],
9248
+ "data": [1040],
9249
+ "isHovering": [32]
9250
+ },
9251
+ "$listeners$": undefined,
9252
+ "$lazyBundleId$": "-",
9253
+ "$attrsToReflect$": []
9254
+ }; }
9255
+ }
9256
+
9257
+ const duetEmptyStateCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-empty-state,*.sc-duet-empty-state::after,*.sc-duet-empty-state::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-empty-state-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%;height:100%}/*!@.duet-empty-state*/.duet-empty-state.sc-duet-empty-state{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;width:100%;height:100%;padding:48px;color:#00294d;text-align:center;background:#f5f8fa;border-radius:4px}/*!@.duet-empty-state.duet-theme-turva*/.duet-empty-state.duet-theme-turva.sc-duet-empty-state{color:#171c3a;background:#f5f5f7}";
9258
+
9259
+ class DuetEmptyState {
9260
+ constructor(hostRef) {
9261
+ registerInstance(this, hostRef);
9262
+ /**
9263
+ * Theme of the empty state component.
9264
+ */
9265
+ this.theme = "";
9266
+ /**
9267
+ * Icon shown in the empty state component.
9268
+ */
9269
+ this.icon = "messaging-question";
9270
+ /**
9271
+ * The size of the empty state message.
9272
+ */
9273
+ this.size = "medium";
9274
+ }
9275
+ /**
9276
+ * Component lifecycle events.
9277
+ */
9278
+ componentWillLoad() {
9279
+ inheritGlobalTheme(this);
9280
+ }
9281
+ /**
9282
+ * render() function
9283
+ * Always the last one in the class.
9284
+ */
9285
+ render() {
9286
+ return (hAsync(Host, null, hAsync("div", { class: {
9287
+ "duet-empty-state": true,
9288
+ "duet-theme-turva": this.theme === "turva",
9289
+ "duet-is-small": this.size === "small",
9290
+ } }, hAsync("duet-icon", { color: "currentColor", name: this.icon, size: this.size === "small" ? "large" : "x-large" }), hAsync("div", null, hAsync("slot", null)))));
9291
+ }
9292
+ static get style() { return duetEmptyStateCss; }
9293
+ static get cmpMeta() { return {
9294
+ "$flags$": 9,
9295
+ "$tagName$": "duet-empty-state",
9296
+ "$members$": {
9297
+ "theme": [1025],
9298
+ "icon": [1],
9299
+ "size": [1]
9300
+ },
9301
+ "$listeners$": undefined,
9302
+ "$lazyBundleId$": "-",
9303
+ "$attrsToReflect$": []
9304
+ }; }
9305
+ }
9306
+
9307
+ const duetFieldsetCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-fieldset,*.sc-duet-fieldset::after,*.sc-duet-fieldset::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-fieldset-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:12px !important;display:block;width:100%}/*!@:host(.duet-m-0)*/.duet-m-0.sc-duet-fieldset-h{margin:0 !important}/*!@fieldset*/fieldset.sc-duet-fieldset{border:0}/*!@legend*/legend.sc-duet-fieldset{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}/*!@.duet-legend-wrapper*/.duet-legend-wrapper.sc-duet-fieldset{position:relative;display:block;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:600;line-height:1.5;color:#00294d;text-align:left;background:transparent}/*!@.duet-theme-turva .duet-legend-wrapper*/.duet-theme-turva.sc-duet-fieldset .duet-legend-wrapper.sc-duet-fieldset{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}/*!@.duet-fieldset-label*/.duet-fieldset-label.sc-duet-fieldset{margin-bottom:12px !important;margin-top:8px}/*!@.duet-legend-has-caption .duet-fieldset-label*/.duet-legend-has-caption.sc-duet-fieldset .duet-fieldset-label.sc-duet-fieldset{margin-bottom:6px !important}/*!@.duet-legend-has-tooltip .duet-fieldset-label*/.duet-legend-has-tooltip.sc-duet-fieldset .duet-fieldset-label.sc-duet-fieldset{padding-right:36px}@media (min-width: 48em){/*!@.duet-legend-has-tooltip .duet-fieldset-label*/.duet-legend-has-tooltip.sc-duet-fieldset .duet-fieldset-label.sc-duet-fieldset{margin-bottom:3px !important;padding-right:0}}@media (min-width: 48em){/*!@.duet-legend-has-tooltip.duet-legend-has-caption .duet-fieldset-label*/.duet-legend-has-tooltip.duet-legend-has-caption.sc-duet-fieldset .duet-fieldset-label.sc-duet-fieldset{margin-bottom:-3px !important}}/*!@.duet-fieldset-caption*/.duet-fieldset-caption.sc-duet-fieldset{margin-bottom:12px !important}/*!@.duet-fieldset-help*/.duet-fieldset-help.sc-duet-fieldset{display:block;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0.875rem;font-weight:400;line-height:1.25;color:#de2362;border-radius:4px}/*!@.duet-fieldset-help span*/.duet-fieldset-help.sc-duet-fieldset span.sc-duet-fieldset{display:block;margin-top:12px}/*!@.duet-theme-turva .duet-fieldset-help*/.duet-theme-turva.sc-duet-fieldset .duet-fieldset-help.sc-duet-fieldset{color:#e02a0d}/*!@::slotted(duet-tooltip)*/.sc-duet-fieldset-s>duet-tooltip{position:absolute;top:4px;right:0}@media (min-width: 48em){/*!@::slotted(duet-tooltip)*/.sc-duet-fieldset-s>duet-tooltip{position:relative;right:auto}}/*!@.duet-legend-hidden*/.duet-legend-hidden.sc-duet-fieldset{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}";
9308
+
9309
+ /**
9310
+ * @slot unnamed default slot - The component’s primary content. All child nodes that do not have a slot attribute defined are inserted into this primary slot.
9311
+ * @slot tooltip - Use to place a tooltip alongside the fieldset label.
9312
+ */
9313
+ class DuetFieldset {
9314
+ constructor(hostRef) {
9315
+ registerInstance(this, hostRef);
9316
+ this.errorId = createID("DuetError");
9317
+ this.labelId = createID("DuetLabel");
9318
+ this.hasTooltip = false;
9319
+ /**
9320
+ * Theme of the fieldset.
9321
+ */
9322
+ this.theme = "";
9323
+ /**
9324
+ * Controls the margin of the component.
9325
+ */
9326
+ this.margin = "auto";
9327
+ /**
9328
+ * Visually hide the label, but still show it to screen readers.
9329
+ */
9330
+ this.labelHidden = false;
9331
+ this.checkHasTooltip = () => {
9332
+ this.hasTooltip = !!this.element.querySelector("[slot='tooltip']");
9333
+ };
9334
+ }
9335
+ /**
9336
+ * Component lifecycle events.
9337
+ */
9338
+ componentWillLoad() {
9339
+ inheritGlobalTheme(this);
9340
+ this.checkHasTooltip();
9341
+ }
9342
+ /**
9343
+ * render() function
9344
+ * Always the last one in the class.
9345
+ */
9346
+ render() {
9347
+ return (hAsync(Host, { class: { "duet-m-0": this.margin === "none" } }, hAsync("fieldset", { "aria-labelledby": `${this.labelId} ${this.errorId}`, class: {
8913
9348
  "duet-fieldset": true,
8914
9349
  "duet-theme-turva": this.theme === "turva",
8915
9350
  } }, hAsync("legend", { id: this.labelId }, hAsync("span", null, this.label), this.caption && hAsync("span", null, this.caption)), hAsync("div", { class: {
@@ -9004,7 +9439,7 @@ class DuetFooter {
9004
9439
  * Adds accessible label for tooltip that is shown in external link (url & external have both been set)
9005
9440
  * @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"}
9006
9441
  */
9007
- this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults);
9442
+ this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults, this.language);
9008
9443
  /**
9009
9444
  * Component event handling.
9010
9445
  */
@@ -9079,7 +9514,7 @@ class DuetFooter {
9079
9514
  "logoHref": [1, "logo-href"],
9080
9515
  "language": [1025],
9081
9516
  "items": [8],
9082
- "accessibleLabelExternalDefaults": [16],
9517
+ "accessibleLabelExternalDefaults": [1, "accessible-label-external-default"],
9083
9518
  "accessibleLabelExternal": [1, "accessible-label-external"],
9084
9519
  "menu": [8],
9085
9520
  "processedItems": [32],
@@ -9099,6 +9534,7 @@ function isGridItem(element) {
9099
9534
  class DuetGrid {
9100
9535
  constructor(hostRef) {
9101
9536
  registerInstance(this, hostRef);
9537
+ this.distributeFormElement = false;
9102
9538
  /**
9103
9539
  * Enable or disable the automatic responsive behaviour of the grid component.
9104
9540
  * Setting this option to "true" makes sure that contents are stacked vertically
@@ -9115,7 +9551,9 @@ class DuetGrid {
9115
9551
  */
9116
9552
  this.direction = "horizontal";
9117
9553
  /**
9118
- * Adjusts the vertical alignment of the grid items.
9554
+ * Adjusts the vertical alignment of the grid items, if set to "form_distribute"
9555
+ * the grid will try to calculate correct paddings for any duet-input fields inside duet-grid-items,
9556
+ * so that they align even when displaying errors.
9119
9557
  */
9120
9558
  this.alignment = "top";
9121
9559
  /**
@@ -9127,14 +9565,34 @@ class DuetGrid {
9127
9565
  */
9128
9566
  this.mobile = "";
9129
9567
  }
9568
+ /**
9569
+ * Private functions
9570
+ */
9571
+ /**
9572
+ * Returns the element height including margins
9573
+ * @param element - element
9574
+ * @returns {number}
9575
+ */
9576
+ outerHeight(element) {
9577
+ const height = element.offsetHeight, style = window.getComputedStyle(element);
9578
+ return ["top", "bottom"]
9579
+ .map(side => parseInt(style[`margin-${side}`]))
9580
+ .reduce((total, side) => total + side, height);
9581
+ }
9130
9582
  /**
9131
9583
  * Component lifecycle events.
9132
9584
  */
9133
9585
  async connectedCallback() {
9134
9586
  const el = this.element;
9587
+ this.distributeFormElement = this.alignment === "form_distribute";
9135
9588
  this.mutationO = watchForOptions(el, "duet-grid-item", () => {
9136
9589
  this.updateGridItems();
9137
9590
  });
9591
+ if (this.distributeFormElement) {
9592
+ this.mutation1 = watchForElement(el, "duet-input", () => {
9593
+ this.updateGridItemsWithInputFields();
9594
+ });
9595
+ }
9138
9596
  this.updateGridItems();
9139
9597
  }
9140
9598
  disconnectedCallback() {
@@ -9142,6 +9600,10 @@ class DuetGrid {
9142
9600
  this.mutationO.disconnect();
9143
9601
  this.mutationO = undefined;
9144
9602
  }
9603
+ if (this.mutation1) {
9604
+ this.mutation1.disconnect();
9605
+ this.mutation1 = undefined;
9606
+ }
9145
9607
  }
9146
9608
  /**
9147
9609
  * Local methods
@@ -9153,6 +9615,27 @@ class DuetGrid {
9153
9615
  item.breakpoint = this.breakpoint;
9154
9616
  });
9155
9617
  }
9618
+ async updateGridItemsWithInputFields() {
9619
+ const items = Array.from(this.element.children).filter(isGridItem);
9620
+ let maxHeight = 0;
9621
+ const sizes = [];
9622
+ items.forEach(item => {
9623
+ const inputErrorDom = item.querySelector("span.duet-input-error");
9624
+ const height = inputErrorDom ? this.outerHeight(inputErrorDom) : 0;
9625
+ sizes.push(height);
9626
+ });
9627
+ maxHeight = Math.max(...sizes);
9628
+ items.forEach(item => {
9629
+ const inputErrorDom = item.querySelector("span.duet-input-error");
9630
+ const height = inputErrorDom ? this.outerHeight(inputErrorDom) : 0;
9631
+ if (height < maxHeight) {
9632
+ item.setAttribute("style", `padding-bottom: ${maxHeight - height}px;`);
9633
+ }
9634
+ else if (height === maxHeight) {
9635
+ item.setAttribute("style", `padding-bottom: 0px;`);
9636
+ }
9637
+ });
9638
+ }
9156
9639
  /**
9157
9640
  * render() function
9158
9641
  * Always the last one in the class.
@@ -9162,7 +9645,7 @@ class DuetGrid {
9162
9645
  "duet-grid": true,
9163
9646
  "duet-no-stacking": !this.responsive,
9164
9647
  "duet-grid-align-top": this.alignment === "top",
9165
- "duet-grid-align-bottom": this.alignment === "bottom",
9648
+ "duet-grid-align-bottom": this.alignment === "bottom" || this.alignment === "form_distribute",
9166
9649
  "duet-grid-align-center": this.alignment === "center",
9167
9650
  "duet-grid-align-stretch": this.alignment === "stretch",
9168
9651
  "duet-grid-align-baseline": this.alignment === "baseline",
@@ -9197,7 +9680,8 @@ class DuetGrid {
9197
9680
  "direction": [1],
9198
9681
  "alignment": [1],
9199
9682
  "distribution": [1],
9200
- "mobile": [1]
9683
+ "mobile": [1],
9684
+ "distributeFormElement": [32]
9201
9685
  },
9202
9686
  "$listeners$": undefined,
9203
9687
  "$lazyBundleId$": "-",
@@ -9518,10 +10002,26 @@ class DuetHeader {
9518
10002
  */
9519
10003
  this.language = getLanguage();
9520
10004
  /**
9521
- * Property to change accessibleI18nLabels defaults on the component.
9522
- * normally you would handle these strings on an application level and override @accessibleI18nLabels when needed
10005
+ * Default strings for accessibleI18nLabels
10006
+ * @default {
10007
+ fi: {
10008
+ skipLabel: "Siirry pääsisältöön",
10009
+ changeLanguage: "Vaihda kieltä",
10010
+ activeLanguage: "Suomi valittuna",
10011
+ },
10012
+ sv: {
10013
+ skipLabel: "Hoppa till huvudinnehåll",
10014
+ changeLanguage: "Ändra Språk",
10015
+ activeLanguage: "Svenska valt",
10016
+ },
10017
+ en: {
10018
+ skipLabel: "Skip to main content",
10019
+ changeLanguage: "Change language",
10020
+ activeLanguage: "English selected",
10021
+ },
10022
+ }
9523
10023
  */
9524
- this.accessibleI18nLabelsDefault = {
10024
+ this.accessibleI18nLabelsDefaults = {
9525
10025
  fi: {
9526
10026
  skipLabel: "Siirry pääsisältöön",
9527
10027
  changeLanguage: "Vaihda kieltä",
@@ -9558,7 +10058,7 @@ class DuetHeader {
9558
10058
  },
9559
10059
  }
9560
10060
  */
9561
- this.accessibleI18nLabels = getLocaleString(this.accessibleI18nLabelsDefault, this.language);
10061
+ this.accessibleI18nLabels = getLocaleString(this.accessibleI18nLabelsDefaults);
9562
10062
  /**
9563
10063
  * Property to change accessibleLabelExternal defaults on the component.
9564
10064
  * normally you would handle these strings on an application level and override @accessibleLabelExternal when needed
@@ -9574,7 +10074,7 @@ class DuetHeader {
9574
10074
  * Property to change accessibleLabel defaults on the component.
9575
10075
  * normally you would handle these strings on an application level and override @accessibleLabel when needed
9576
10076
  */
9577
- this.accessibleLabelDefault = {
10077
+ this.accessibleLabelDefaults = {
9578
10078
  fi: "Valikko",
9579
10079
  sv: "Meny",
9580
10080
  en: "Menu",
@@ -9588,7 +10088,7 @@ class DuetHeader {
9588
10088
  en: "Menu",
9589
10089
  }
9590
10090
  */
9591
- this.accessibleLabel = getLocaleString(this.accessibleLabelDefault);
10091
+ this.accessibleLabel = getLocaleString(this.accessibleLabelDefaults);
9592
10092
  /**
9593
10093
  * URL that the logo link points to.
9594
10094
  */
@@ -9871,11 +10371,11 @@ class DuetHeader {
9871
10371
  "$members$": {
9872
10372
  "theme": [1025],
9873
10373
  "language": [1025],
9874
- "accessibleI18nLabelsDefault": [16],
10374
+ "accessibleI18nLabelsDefaults": [1, "accessible-labels-default"],
9875
10375
  "accessibleI18nLabels": [16],
9876
- "accessibleLabelExternalDefaults": [16],
10376
+ "accessibleLabelExternalDefaults": [1, "accessible-label-external-default"],
9877
10377
  "accessibleLabelExternal": [1, "accessible-label-external"],
9878
- "accessibleLabelDefault": [16],
10378
+ "accessibleLabelDefaults": [1, "accessible-label-default"],
9879
10379
  "accessibleLabel": [1, "accessible-label"],
9880
10380
  "user": [8],
9881
10381
  "logoHref": [1, "logo-href"],
@@ -9906,7 +10406,7 @@ class DuetHeader {
9906
10406
  }; }
9907
10407
  }
9908
10408
 
9909
- const duetHeadingCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-heading,*.sc-duet-heading::after,*.sc-duet-heading::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-heading-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:100%}/*!@.duet-heading*/.duet-heading.sc-duet-heading{margin-bottom:16px !important;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-style:normal;font-weight:800;font-variant-numeric:tabular-nums;line-height:1.25;color:#00294d;text-decoration:none;letter-spacing:-0.01rem}@media (min-width: 36em){/*!@.duet-heading*/.duet-heading.sc-duet-heading{margin-bottom:20px !important}}/*!@.duet-heading.duet-theme-turva*/.duet-heading.duet-theme-turva.sc-duet-heading{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-style:italic;font-weight:700;color:#171c3a}/*!@.duet-heading.duet-heading-border*/.duet-heading.duet-heading-border.sc-duet-heading{padding-bottom:20px;border-bottom:1px solid #e1e3e6}/*!@.duet-heading.duet-heading-hyphenate*/.duet-heading.duet-heading-hyphenate.sc-duet-heading{-webkit-hyphens:auto;hyphens:auto}/*!@.duet-heading.h0*/.duet-heading.h0.sc-duet-heading{font-size:9.4vw}/*!@.duet-heading.h0.duet-p-0*/.duet-heading.h0.duet-p-0.sc-duet-heading{padding:0 !important}/*!@.duet-heading.h0.duet-m-0*/.duet-heading.h0.duet-m-0.sc-duet-heading{margin:0 !important}@media (max-width: 31.914893617rem){/*!@.duet-heading.h0*/.duet-heading.h0.sc-duet-heading{font-size:3rem}}@media (min-width: 47.8723404255rem){/*!@.duet-heading.h0*/.duet-heading.h0.sc-duet-heading{font-size:4.5rem}}@media (max-width: 22.5em){/*!@.duet-heading.h0*/.duet-heading.h0.sc-duet-heading{font-size:2.25rem}}/*!@.duet-heading.h1*/.duet-heading.h1.sc-duet-heading{font-size:7vw}/*!@.duet-heading.h1.duet-p-0*/.duet-heading.h1.duet-p-0.sc-duet-heading{padding:0 !important}/*!@.duet-heading.h1.duet-m-0*/.duet-heading.h1.duet-m-0.sc-duet-heading{margin:0 !important}@media (max-width: 32.1428571429rem){/*!@.duet-heading.h1*/.duet-heading.h1.sc-duet-heading{font-size:2.25rem}}@media (min-width: 42.8571428571rem){/*!@.duet-heading.h1*/.duet-heading.h1.sc-duet-heading{font-size:3rem}}@media (max-width: 22.5em){/*!@.duet-heading.h1*/.duet-heading.h1.sc-duet-heading{font-size:1.5rem}}/*!@.duet-heading.h2*/.duet-heading.h2.sc-duet-heading{font-size:5.8vw}/*!@.duet-heading.h2.duet-p-0*/.duet-heading.h2.duet-p-0.sc-duet-heading{padding:0 !important}/*!@.duet-heading.h2.duet-m-0*/.duet-heading.h2.duet-m-0.sc-duet-heading{margin:0 !important}@media (max-width: 25.8620689655rem){/*!@.duet-heading.h2*/.duet-heading.h2.sc-duet-heading{font-size:1.5rem}}@media (min-width: 38.7931034483rem){/*!@.duet-heading.h2*/.duet-heading.h2.sc-duet-heading{font-size:2.25rem}}@media (max-width: 22.5em){/*!@.duet-heading.h2*/.duet-heading.h2.sc-duet-heading{font-size:1.375rem}}/*!@.duet-heading.h3*/.duet-heading.h3.sc-duet-heading{margin-bottom:12px !important;font-size:4.2vw}/*!@.duet-heading.h3.duet-p-0*/.duet-heading.h3.duet-p-0.sc-duet-heading{padding:0 !important}/*!@.duet-heading.h3.duet-m-0*/.duet-heading.h3.duet-m-0.sc-duet-heading{margin:0 !important}@media (max-width: 29.7619047619rem){/*!@.duet-heading.h3*/.duet-heading.h3.sc-duet-heading{font-size:1.25rem}}@media (min-width: 35.7142857143rem){/*!@.duet-heading.h3*/.duet-heading.h3.sc-duet-heading{font-size:1.5rem}}/*!@.duet-heading.h3.duet-theme-turva*/.duet-heading.h3.duet-theme-turva.sc-duet-heading{font-style:normal}/*!@.duet-heading.h3.duet-heading-border*/.duet-heading.h3.duet-heading-border.sc-duet-heading{padding-bottom:20px}/*!@.duet-heading.h4*/.duet-heading.h4.sc-duet-heading{margin-bottom:8px !important;font-size:4vw;letter-spacing:0}/*!@.duet-heading.h4.duet-p-0*/.duet-heading.h4.duet-p-0.sc-duet-heading{padding:0 !important}/*!@.duet-heading.h4.duet-m-0*/.duet-heading.h4.duet-m-0.sc-duet-heading{margin:0 !important}@media (max-width: 27.5rem){/*!@.duet-heading.h4*/.duet-heading.h4.sc-duet-heading{font-size:1.1rem}}@media (min-width: 31.25rem){/*!@.duet-heading.h4*/.duet-heading.h4.sc-duet-heading{font-size:1.25rem}}/*!@.duet-heading.h4.duet-theme-turva*/.duet-heading.h4.duet-theme-turva.sc-duet-heading{font-style:normal;font-weight:700}/*!@.duet-heading.h4.duet-heading-border*/.duet-heading.h4.duet-heading-border.sc-duet-heading{padding-bottom:20px}/*!@.duet-heading.h5*/.duet-heading.h5.sc-duet-heading{margin-bottom:8px !important;font-size:4vw;font-weight:600;letter-spacing:0}/*!@.duet-heading.h5.duet-p-0*/.duet-heading.h5.duet-p-0.sc-duet-heading{padding:0 !important}/*!@.duet-heading.h5.duet-m-0*/.duet-heading.h5.duet-m-0.sc-duet-heading{margin:0 !important}@media (max-width: 27.5rem){/*!@.duet-heading.h5*/.duet-heading.h5.sc-duet-heading{font-size:1.1rem}}@media (min-width: 28.4090909091rem){/*!@.duet-heading.h5*/.duet-heading.h5.sc-duet-heading{font-size:1.1363636364rem}}/*!@.duet-heading.h5.duet-theme-turva*/.duet-heading.h5.duet-theme-turva.sc-duet-heading{font-style:normal;font-weight:700}/*!@.duet-heading.h5.duet-heading-border*/.duet-heading.h5.duet-heading-border.sc-duet-heading{padding-bottom:16px}/*!@.duet-heading.h6*/.duet-heading.h6.sc-duet-heading{margin-bottom:8px !important;font-size:1rem;font-weight:600;letter-spacing:0}/*!@.duet-heading.h6.duet-p-0*/.duet-heading.h6.duet-p-0.sc-duet-heading{padding:0 !important}/*!@.duet-heading.h6.duet-m-0*/.duet-heading.h6.duet-m-0.sc-duet-heading{margin:0 !important}/*!@.duet-heading.h6.duet-theme-turva*/.duet-heading.h6.duet-theme-turva.sc-duet-heading{font-style:normal;font-weight:700}/*!@.duet-heading.h6.duet-heading-border*/.duet-heading.h6.duet-heading-border.sc-duet-heading{padding-bottom:16px}/*!@.duet-heading.duet-semibold, .duet-heading.duet-theme-turva.duet-semibold*/.duet-heading.duet-semibold.sc-duet-heading,.duet-heading.duet-theme-turva.duet-semibold.sc-duet-heading{font-style:normal !important;font-weight:600 !important}";
10409
+ const duetHeadingCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-heading,*.sc-duet-heading::after,*.sc-duet-heading::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-heading-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:100%}/*!@.duet-heading*/.duet-heading.sc-duet-heading{margin-bottom:16px !important;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-style:normal;font-weight:800;font-variant-numeric:tabular-nums;line-height:1.25;color:#00294d;text-decoration:none;letter-spacing:-0.01rem;word-break:break-word}@media (min-width: 36em){/*!@.duet-heading*/.duet-heading.sc-duet-heading{margin-bottom:20px !important}}/*!@.duet-heading.duet-theme-turva*/.duet-heading.duet-theme-turva.sc-duet-heading{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-style:italic;font-weight:700;color:#171c3a}/*!@.duet-heading.duet-heading-border*/.duet-heading.duet-heading-border.sc-duet-heading{padding-bottom:20px;border-bottom:1px solid #e1e3e6}/*!@.duet-heading.duet-heading-border.duet-heading-border-solid*/.duet-heading.duet-heading-border.duet-heading-border-solid.sc-duet-heading{border-bottom-color:#657787}/*!@.duet-heading.duet-heading-hyphenate*/.duet-heading.duet-heading-hyphenate.sc-duet-heading{-webkit-hyphens:auto;hyphens:auto}/*!@.duet-heading.h0*/.duet-heading.h0.sc-duet-heading{font-size:9.4vw}/*!@.duet-heading.h0.duet-p-0*/.duet-heading.h0.duet-p-0.sc-duet-heading{padding:0 !important}/*!@.duet-heading.h0.duet-m-0*/.duet-heading.h0.duet-m-0.sc-duet-heading{margin:0 !important}@media (max-width: 31.914893617rem){/*!@.duet-heading.h0*/.duet-heading.h0.sc-duet-heading{font-size:3rem}}@media (min-width: 47.8723404255rem){/*!@.duet-heading.h0*/.duet-heading.h0.sc-duet-heading{font-size:4.5rem}}@media (max-width: 22.5em){/*!@.duet-heading.h0*/.duet-heading.h0.sc-duet-heading{font-size:2.25rem}}/*!@.duet-heading.h1*/.duet-heading.h1.sc-duet-heading{font-size:7vw}/*!@.duet-heading.h1.duet-p-0*/.duet-heading.h1.duet-p-0.sc-duet-heading{padding:0 !important}/*!@.duet-heading.h1.duet-m-0*/.duet-heading.h1.duet-m-0.sc-duet-heading{margin:0 !important}@media (max-width: 32.1428571429rem){/*!@.duet-heading.h1*/.duet-heading.h1.sc-duet-heading{font-size:2.25rem}}@media (min-width: 42.8571428571rem){/*!@.duet-heading.h1*/.duet-heading.h1.sc-duet-heading{font-size:3rem}}@media (max-width: 22.5em){/*!@.duet-heading.h1*/.duet-heading.h1.sc-duet-heading{font-size:1.5rem}}/*!@.duet-heading.h2*/.duet-heading.h2.sc-duet-heading{font-size:5.8vw}/*!@.duet-heading.h2.duet-p-0*/.duet-heading.h2.duet-p-0.sc-duet-heading{padding:0 !important}/*!@.duet-heading.h2.duet-m-0*/.duet-heading.h2.duet-m-0.sc-duet-heading{margin:0 !important}@media (max-width: 25.8620689655rem){/*!@.duet-heading.h2*/.duet-heading.h2.sc-duet-heading{font-size:1.5rem}}@media (min-width: 38.7931034483rem){/*!@.duet-heading.h2*/.duet-heading.h2.sc-duet-heading{font-size:2.25rem}}@media (max-width: 22.5em){/*!@.duet-heading.h2*/.duet-heading.h2.sc-duet-heading{font-size:1.375rem}}/*!@.duet-heading.h3*/.duet-heading.h3.sc-duet-heading{margin-bottom:12px !important;font-size:4.2vw}/*!@.duet-heading.h3.duet-p-0*/.duet-heading.h3.duet-p-0.sc-duet-heading{padding:0 !important}/*!@.duet-heading.h3.duet-m-0*/.duet-heading.h3.duet-m-0.sc-duet-heading{margin:0 !important}@media (max-width: 29.7619047619rem){/*!@.duet-heading.h3*/.duet-heading.h3.sc-duet-heading{font-size:1.25rem}}@media (min-width: 35.7142857143rem){/*!@.duet-heading.h3*/.duet-heading.h3.sc-duet-heading{font-size:1.5rem}}/*!@.duet-heading.h3.duet-theme-turva*/.duet-heading.h3.duet-theme-turva.sc-duet-heading{font-style:normal}/*!@.duet-heading.h3.duet-heading-border*/.duet-heading.h3.duet-heading-border.sc-duet-heading{padding-bottom:20px}/*!@.duet-heading.h4*/.duet-heading.h4.sc-duet-heading{margin-bottom:8px !important;font-size:4vw;letter-spacing:0}/*!@.duet-heading.h4.duet-p-0*/.duet-heading.h4.duet-p-0.sc-duet-heading{padding:0 !important}/*!@.duet-heading.h4.duet-m-0*/.duet-heading.h4.duet-m-0.sc-duet-heading{margin:0 !important}@media (max-width: 27.5rem){/*!@.duet-heading.h4*/.duet-heading.h4.sc-duet-heading{font-size:1.1rem}}@media (min-width: 31.25rem){/*!@.duet-heading.h4*/.duet-heading.h4.sc-duet-heading{font-size:1.25rem}}/*!@.duet-heading.h4.duet-theme-turva*/.duet-heading.h4.duet-theme-turva.sc-duet-heading{font-style:normal;font-weight:700}/*!@.duet-heading.h4.duet-heading-border*/.duet-heading.h4.duet-heading-border.sc-duet-heading{padding-bottom:20px}/*!@.duet-heading.h5*/.duet-heading.h5.sc-duet-heading{margin-bottom:8px !important;font-size:4vw;font-weight:600;letter-spacing:0}/*!@.duet-heading.h5.duet-p-0*/.duet-heading.h5.duet-p-0.sc-duet-heading{padding:0 !important}/*!@.duet-heading.h5.duet-m-0*/.duet-heading.h5.duet-m-0.sc-duet-heading{margin:0 !important}@media (max-width: 27.5rem){/*!@.duet-heading.h5*/.duet-heading.h5.sc-duet-heading{font-size:1.1rem}}@media (min-width: 28.4090909091rem){/*!@.duet-heading.h5*/.duet-heading.h5.sc-duet-heading{font-size:1.1363636364rem}}/*!@.duet-heading.h5.duet-theme-turva*/.duet-heading.h5.duet-theme-turva.sc-duet-heading{font-style:normal;font-weight:700}/*!@.duet-heading.h5.duet-heading-border*/.duet-heading.h5.duet-heading-border.sc-duet-heading{padding-bottom:16px}/*!@.duet-heading.h6*/.duet-heading.h6.sc-duet-heading{margin-bottom:8px !important;font-size:1rem;font-weight:600;letter-spacing:0}/*!@.duet-heading.h6.duet-p-0*/.duet-heading.h6.duet-p-0.sc-duet-heading{padding:0 !important}/*!@.duet-heading.h6.duet-m-0*/.duet-heading.h6.duet-m-0.sc-duet-heading{margin:0 !important}/*!@.duet-heading.h6.duet-theme-turva*/.duet-heading.h6.duet-theme-turva.sc-duet-heading{font-style:normal;font-weight:700}/*!@.duet-heading.h6.duet-heading-border*/.duet-heading.h6.duet-heading-border.sc-duet-heading{padding-bottom:16px}/*!@.duet-heading.duet-semibold, .duet-heading.duet-theme-turva.duet-semibold*/.duet-heading.duet-semibold.sc-duet-heading,.duet-heading.duet-theme-turva.duet-semibold.sc-duet-heading{font-style:normal !important;font-weight:600 !important}";
9910
10410
 
9911
10411
  class DuetHeading {
9912
10412
  constructor(hostRef) {
@@ -9920,7 +10420,7 @@ class DuetHeading {
9920
10420
  */
9921
10421
  this.margin = "auto";
9922
10422
  /**
9923
- * Enable or disable the border underneath the heading.
10423
+ * Enable or disable the border underneath the heading, solid will darken the border
9924
10424
  */
9925
10425
  this.border = false;
9926
10426
  /**
@@ -9953,11 +10453,12 @@ class DuetHeading {
9953
10453
  * Always the last one in the class.
9954
10454
  */
9955
10455
  render() {
9956
- const TagName = sanitizeString(this.level);
10456
+ const TagName = sanitizeString$1(this.level);
9957
10457
  const color = getColorByName(this.color);
9958
10458
  return (hAsync(TagName, { class: {
9959
10459
  "duet-heading": true,
9960
- "duet-heading-border": this.border,
10460
+ "duet-heading-border": this.border !== false,
10461
+ "duet-heading-border-solid": this.border === "solid",
9961
10462
  "duet-semibold": this.weight === "semibold",
9962
10463
  "duet-heading-hyphenate": this.hyphenate,
9963
10464
  "duet-m-0": this.margin === "none",
@@ -9974,7 +10475,7 @@ class DuetHeading {
9974
10475
  "level": [513],
9975
10476
  "margin": [1],
9976
10477
  "visualLevel": [1, "visual-level"],
9977
- "border": [4],
10478
+ "border": [8],
9978
10479
  "weight": [1],
9979
10480
  "color": [1],
9980
10481
  "theme": [1025],
@@ -10059,15 +10560,15 @@ class DuetHero {
10059
10560
  */
10060
10561
  this.language = getLanguage();
10061
10562
  /**
10062
- * Property to change accessibleLabelExternal defaults on the component.
10063
- * normally you would handle these strings on an application level and override @accessibleLabelExternal when needed
10563
+ * Defaults for accessibleLabelExternal
10564
+ * @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"}
10064
10565
  */
10065
10566
  this.accessibleLabelExternalDefaults = DuetStringsExternalDefaults;
10066
10567
  /**
10067
10568
  * Adds accessible label for tooltip that is shown in external link (url & external have both been set)
10068
10569
  * @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"}
10069
10570
  */
10070
- this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults, this.language);
10571
+ this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults);
10071
10572
  /**
10072
10573
  * URL that the button links to.
10073
10574
  */
@@ -10211,7 +10712,7 @@ class DuetHero {
10211
10712
  "categoryIconColor": [1, "category-icon-color"],
10212
10713
  "buttonLabel": [1, "button-label"],
10213
10714
  "language": [1025],
10214
- "accessibleLabelExternalDefaults": [16],
10715
+ "accessibleLabelExternalDefaults": [1, "accessible-label-external-default"],
10215
10716
  "accessibleLabelExternal": [1, "accessible-label-external"],
10216
10717
  "buttonUrl": [1, "button-url"],
10217
10718
  "buttonId": [1, "button-id"],
@@ -10233,6 +10734,86 @@ class DuetHero {
10233
10734
  }; }
10234
10735
  }
10235
10736
 
10737
+ const cleanupSvg = (svgContent) => {
10738
+ if (typeof document === "undefined" || !svgContent) {
10739
+ return;
10740
+ }
10741
+ const div = document.createElement("div");
10742
+ div.innerHTML = svgContent;
10743
+ // setup this way to ensure it works on our buddy IE
10744
+ for (let i = div.childNodes.length - 1; i >= 0; i--) {
10745
+ const child = div.childNodes[i];
10746
+ if (child.nodeName.toLowerCase() !== "svg") {
10747
+ div.removeChild(div.childNodes[i]);
10748
+ }
10749
+ }
10750
+ return div.firstElementChild;
10751
+ };
10752
+ const isValid = (elm) => {
10753
+ if (elm.nodeName.toLowerCase() === "script") {
10754
+ return false;
10755
+ }
10756
+ for (let i = 0; i < elm.attributes.length; i++) {
10757
+ const attribute = elm.attributes[i];
10758
+ if (attribute.name.toLowerCase().indexOf("on") === 0) {
10759
+ return false;
10760
+ }
10761
+ }
10762
+ if (elm.children) {
10763
+ for (let i = 0; i < elm.children.length; i++) {
10764
+ if (!isValid(elm.children[i])) {
10765
+ return false;
10766
+ }
10767
+ }
10768
+ }
10769
+ return true;
10770
+ };
10771
+ const buildIconUrl = (iconName) => {
10772
+ // under normal operations the Icons should always be loaded from the CDN
10773
+ {
10774
+ return `${Env.cdnURIProd}/icons/${Env.duetIconVersion}/lib/assets/${iconName}.svg`;
10775
+ }
10776
+ };
10777
+ const iconCache = {};
10778
+ function fetchIconByUrl(url, isServer = Build.isServer) {
10779
+ if (iconCache[url]) {
10780
+ return iconCache[url];
10781
+ }
10782
+ // we create a function that covers all the fetching, cleanup, validation etc,
10783
+ // this way we can perform that work just once, and then return the same promise in future.
10784
+ async function doFetch() {
10785
+ let responseText = "";
10786
+ if (isServer) {
10787
+ const fs = require("fs");
10788
+ const path = require("path");
10789
+ const iconsPath = `${path.resolve(path.dirname(require.resolve("@duetds/icons")), "..")}/lib/assets`;
10790
+ const filenameFromUrl = url.split("/").pop().split("#")[0].split("?")[0];
10791
+ responseText = fs.readFileSync(`${iconsPath}/${filenameFromUrl}`, "utf-8");
10792
+ }
10793
+ else {
10794
+ const res = await fetch(url);
10795
+ if (!res.ok) {
10796
+ throw new Error(`SVG request failed: ${res.status} ${res.statusText}`);
10797
+ }
10798
+ responseText = await res.text();
10799
+ }
10800
+ const svgElement = cleanupSvg(responseText);
10801
+ if (!isValid(svgElement)) {
10802
+ throw new Error("SVG validation failed");
10803
+ }
10804
+ // OuterHTML does not unfortunately work here with IE11
10805
+ // was previously: resolve(svgElement.outerHTML)
10806
+ const div = document.createElement("div");
10807
+ div.appendChild(svgElement);
10808
+ return div.innerHTML;
10809
+ }
10810
+ // we do not `await` the fetch, as we only care about initiating the work,
10811
+ // it's the responsibility of the calling code to wait for the response.
10812
+ const req = doFetch();
10813
+ // cache for the repeat requests
10814
+ return (iconCache[url] = req);
10815
+ }
10816
+
10236
10817
  const duetIconCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-icon,*.sc-duet-icon::after,*.sc-duet-icon::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-icon-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:16px !important;display:inline-block;width:auto;max-width:100%;color:inherit;-webkit-tap-highlight-color:transparent}@media (max-width: 35.9375em){/*!@:host(.duet-icon-has-outline)*/.duet-icon-has-outline.sc-duet-icon-h{margin-bottom:0 !important}}@media (max-width: 35.9375em){/*!@:host(.duet-icon-has-background)*/.duet-icon-has-background.sc-duet-icon-h{margin-bottom:0 !important}}/*!@:host(.duet-m-0)*/.duet-m-0.sc-duet-icon-h{margin:0 !important}@media (max-width: 35.9375em){/*!@:host(.duet-m-0)*/.duet-m-0.sc-duet-icon-h{margin:0 !important}}/*!@.duet-icon*/.duet-icon.sc-duet-icon{-webkit-user-select:none;user-select:none;width:100%;height:100%;transform-origin:top center}/*!@.duet-icon.duet-icon-has-outline*/.duet-icon.duet-icon-has-outline.sc-duet-icon{padding:12px;border-style:solid;border-width:1px;border-radius:50%}@media (max-width: 35.9375em){/*!@.duet-icon.duet-icon-has-outline*/.duet-icon.duet-icon-has-outline.sc-duet-icon{outline:1px solid transparent;transform:scale(0.8)}}/*!@.duet-icon.duet-icon-has-background*/.duet-icon.duet-icon-has-background.sc-duet-icon{padding:16px;color:white;border-radius:50%}@media (max-width: 35.9375em){/*!@.duet-icon.duet-icon-has-background*/.duet-icon.duet-icon-has-background.sc-duet-icon{outline:1px solid transparent;transform:scale(0.8)}}/*!@.duet-icon.duet-icon-has-background.duet-theme-turva, .duet-icon.duet-icon-has-background.duet-theme-default*/.duet-icon.duet-icon-has-background.duet-theme-turva.sc-duet-icon,.duet-icon.duet-icon-has-background.duet-theme-default.sc-duet-icon{color:white}/*!@.duet-icon.duet-icon-has-background.xxx-small .duet-icon-svg, .duet-icon.duet-icon-has-outline.xxx-small .duet-icon-svg*/.duet-icon.duet-icon-has-background.xxx-small.sc-duet-icon .duet-icon-svg.sc-duet-icon,.duet-icon.duet-icon-has-outline.xxx-small.sc-duet-icon .duet-icon-svg.sc-duet-icon{width:10px;height:10px}/*!@.duet-icon.duet-icon-has-background.xx-small .duet-icon-svg, .duet-icon.duet-icon-has-outline.xx-small .duet-icon-svg*/.duet-icon.duet-icon-has-background.xx-small.sc-duet-icon .duet-icon-svg.sc-duet-icon,.duet-icon.duet-icon-has-outline.xx-small.sc-duet-icon .duet-icon-svg.sc-duet-icon{width:16px;height:16px}@media (max-width: 35.9375em){/*!@.duet-icon.duet-icon-not-responsive*/.duet-icon.duet-icon-not-responsive.sc-duet-icon{transform:scale(1) !important}}/*!@.duet-icon.duet-theme-default*/.duet-icon.duet-theme-default.sc-duet-icon{color:#0077b3}/*!@.duet-icon.duet-theme-turva*/.duet-icon.duet-theme-turva.sc-duet-icon{color:#c60c30}/*!@.duet-icon.auto .duet-icon-svg*/.duet-icon.auto.sc-duet-icon .duet-icon-svg.sc-duet-icon{width:100%;height:100%}/*!@.duet-icon.xxx-small .duet-icon-svg*/.duet-icon.xxx-small.sc-duet-icon .duet-icon-svg.sc-duet-icon{width:7px;height:7px}/*!@.duet-icon.duet-icon-has-background.xxx-small*/.duet-icon.duet-icon-has-background.xxx-small.sc-duet-icon{padding:6px}/*!@.duet-icon.duet-icon-has-outline.xxx-small*/.duet-icon.duet-icon-has-outline.xxx-small.sc-duet-icon{padding:4px}/*!@.duet-icon.xx-small .duet-icon-svg*/.duet-icon.xx-small.sc-duet-icon .duet-icon-svg.sc-duet-icon{width:10px;height:10px}/*!@.duet-icon.duet-icon-has-background.xx-small*/.duet-icon.duet-icon-has-background.xx-small.sc-duet-icon{padding:8px}/*!@.duet-icon.duet-icon-has-outline.xx-small*/.duet-icon.duet-icon-has-outline.xx-small.sc-duet-icon{padding:7px}/*!@.duet-icon.x-small .duet-icon-svg*/.duet-icon.x-small.sc-duet-icon .duet-icon-svg.sc-duet-icon{width:16px;height:16px}/*!@.duet-icon.duet-icon-has-outline.x-small*/.duet-icon.duet-icon-has-outline.x-small.sc-duet-icon{padding:10px}/*!@.duet-icon.duet-icon-has-background.x-small*/.duet-icon.duet-icon-has-background.x-small.sc-duet-icon{padding:12px}/*!@.duet-icon.small .duet-icon-svg*/.duet-icon.small.sc-duet-icon .duet-icon-svg.sc-duet-icon{width:20px;height:20px}/*!@.duet-icon.duet-icon-has-background.small*/.duet-icon.duet-icon-has-background.small.sc-duet-icon{padding:14px}/*!@.duet-icon.large .duet-icon-svg*/.duet-icon.large.sc-duet-icon .duet-icon-svg.sc-duet-icon{width:30px;height:30px}/*!@.duet-icon.x-large .duet-icon-svg*/.duet-icon.x-large.sc-duet-icon .duet-icon-svg.sc-duet-icon{width:36px;height:36px}/*!@.duet-icon.xx-large .duet-icon-svg*/.duet-icon.xx-large.sc-duet-icon .duet-icon-svg.sc-duet-icon{width:48px;height:48px}/*!@.duet-icon.xxx-large .duet-icon-svg*/.duet-icon.xxx-large.sc-duet-icon .duet-icon-svg.sc-duet-icon{width:48px;height:48px}@media (min-width: 48em){/*!@.duet-icon.xxx-large .duet-icon-svg*/.duet-icon.xxx-large.sc-duet-icon .duet-icon-svg.sc-duet-icon{width:72px;height:72px}}/*!@.duet-icon .duet-icon-svg*/.duet-icon.sc-duet-icon .duet-icon-svg.sc-duet-icon{display:block;width:24px;min-width:100%;height:24px;font-size:0}/*!@.duet-icon svg*/.duet-icon.sc-duet-icon svg.sc-duet-icon{width:100%;min-width:100%;fill:currentColor}";
10237
10818
 
10238
10819
  class DuetIcon {
@@ -10289,7 +10870,7 @@ class DuetIcon {
10289
10870
  if (this.src && this.icon) {
10290
10871
  console.warn("[DUET COMPONENTS]: <duet-icon> should have either have src or icon attributes, but not both. icon attribute will take precedence", "icon:", this.icon, "src:", this.src);
10291
10872
  }
10292
- this.loadIcon();
10873
+ return this.loadIcon();
10293
10874
  }
10294
10875
  async loadIcon() {
10295
10876
  // static icon known at build-time, so we can set it synchronously
@@ -10297,9 +10878,13 @@ class DuetIcon {
10297
10878
  this.svgContent = this.icon;
10298
10879
  return;
10299
10880
  }
10300
- // on server, don't make requests
10301
- {
10302
- return;
10881
+ // dynamically load icon from url
10882
+ const src = this.src ? this.src : buildIconUrl(this.name);
10883
+ try {
10884
+ this.svgContent = await fetchIconByUrl(src);
10885
+ }
10886
+ catch (e) {
10887
+ console.warn(`[DUET COMPONENTS]: <duet-icon> could not load SVG from URL: ${src}.`, e);
10303
10888
  }
10304
10889
  }
10305
10890
  /**
@@ -10409,7 +10994,7 @@ function cleanValue(input, regex) {
10409
10994
  return newValue;
10410
10995
  }
10411
10996
 
10412
- const duetInputCss = "*.sc-duet-input,*.sc-duet-input::after,*.sc-duet-input::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-input-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;display:inline-flex;width:100%;min-width:calc(33.333% - 8px);max-width:100%;text-align:left;vertical-align:bottom}.sc-duet-input-h:last-child,.sc-duet-input-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-input-h{width:calc(50% - 16px - 3px)}}.duet-expand.sc-duet-input-h{width:100% !important}.duet-m-0.sc-duet-input-h{margin:0 !important}duet-tooltip.sc-duet-input{position:absolute;top:12px;right:0}@media (min-width: 48em){duet-tooltip.sc-duet-input{position:relative;top:4px;right:auto}}duet-caption.sc-duet-input:not(:last-of-type){margin-bottom:0}.duet-input-icon.sc-duet-input{position:absolute;top:50%;right:16px;z-index:200;width:20px;height:20px;font-size:0;line-height:normal;color:#00294d;pointer-events:none;transform:translateY(-50%)}.duet-theme-turva.sc-duet-input .duet-input-icon.sc-duet-input{color:#171c3a}.duet-input-container.sc-duet-input{position:relative;width:100%;height:100%}.duet-input.sc-duet-input{position:relative;z-index:100;display:block !important;width:100% !important;min-width:8rem;max-width:initial !important;height:auto !important;padding:12px 14px !important;margin:initial !important;margin-bottom:initial !important;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400 !important;font-variant-numeric:tabular-nums;line-height:1.5 !important;color:#00294d !important;cursor:initial !important;background:white !important;background-clip:initial !important;border:1px solid #909599 !important;border-radius:4px !important;box-shadow:initial !important;transition:box-shadow 150ms ease, border 150ms ease !important}.duet-input.is-number.sc-duet-input{padding-right:112px !important}.duet-input.is-date.sc-duet-input{padding-right:64px !important}.has-error.sc-duet-input .duet-input.sc-duet-input{border-color:#de2362 !important}.has-error.sc-duet-input .duet-input.sc-duet-input+.duet-input-icon.sc-duet-input{color:#de2362 !important}.duet-theme-turva.has-error.sc-duet-input .duet-input.sc-duet-input{border-color:#e02a0d !important}.duet-theme-turva.has-error.sc-duet-input .duet-input.sc-duet-input+.duet-input-icon.sc-duet-input{color:#e02a0d !important}.has-icon.sc-duet-input .duet-input.sc-duet-input{padding-right:48px !important}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a !important;border-color:#747475 !important}.duet-input.sc-duet-input::-ms-clear{display:none}.duet-input.sc-duet-input::-webkit-contacts-auto-fill-button{display:none !important}.duet-input.sc-duet-input::-webkit-input-placeholder{color:#657787;opacity:1 !important;transition:color 300ms ease}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input::-webkit-input-placeholder{color:#747475}.duet-input.sc-duet-input:focus::-webkit-input-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:focus::-webkit-input-placeholder{color:#cfcfd1}.duet-input.sc-duet-input::-moz-placeholder{color:#657787;opacity:1 !important}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input::-moz-placeholder{color:#747475}.duet-input.sc-duet-input:focus::-moz-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:focus::-moz-placeholder{color:#cfcfd1}.duet-input.sc-duet-input:-ms-input-placeholder{color:#657787}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:-ms-input-placeholder{color:#747475}.duet-input.sc-duet-input:focus:-ms-input-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:focus:-ms-input-placeholder{color:#cfcfd1}.duet-input[disabled].sc-duet-input{color:#00294d !important;cursor:text !important;background:#f5f8fa !important;border-color:#f5f8fa !important;box-shadow:none !important;opacity:1 !important;-webkit-text-fill-color:#00294d !important}.duet-theme-turva.sc-duet-input .duet-input[disabled].sc-duet-input{color:#171c3a !important;background:#f5f5f7 !important;border-color:#f5f5f7 !important;-webkit-text-fill-color:#171c3a !important}.duet-input.sc-duet-input:hover:not(:disabled){box-shadow:0 0 0 1px #909599 !important}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:hover:not(:disabled){box-shadow:0 0 0 1px #747475 !important}.has-error.sc-duet-input .duet-input.sc-duet-input:hover:not(:disabled){box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-input .duet-input.sc-duet-input:hover:not(:disabled){box-shadow:0 0 0 1px #e02a0d}.duet-input.sc-duet-input:focus{border-color:#0077b3 !important;outline:0;box-shadow:0 0 0 1px #0077b3 !important;transition:none}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:focus{border-color:#171c3a !important;box-shadow:0 0 0 1px #171c3a !important}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:focus+.duet-input-icon.sc-duet-input{color:#171c3a}.has-error.sc-duet-input .duet-input.sc-duet-input:focus{box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-input .duet-input.sc-duet-input:focus{box-shadow:0 0 0 1px #e02a0d}.duet-input.sc-duet-input:focus+.duet-input-icon.sc-duet-input{color:#0077b3}.duet-input[type=search].sc-duet-input:not(:placeholder-shown):focus+.duet-input-icon.sc-duet-input{display:none}.duet-input.sc-duet-input:not(:focus):not(:hover):invalid{box-shadow:none !important}.duet-input[type=number].sc-duet-input::-webkit-inner-spin-button,.duet-input[type=number].sc-duet-input::-webkit-outer-spin-button,.duet-input[type=time].sc-duet-input::-webkit-inner-spin-button,.duet-input[type=time].sc-duet-input::-webkit-outer-spin-button{display:none;margin:0;-webkit-appearance:none}.duet-input.sc-duet-input::-webkit-search-cancel-button{margin-right:-28px}.duet-input-help.sc-duet-input{display:block;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0.875rem;font-weight:400;line-height:1.25;color:#657787;border-radius:4px}.duet-input-help.sc-duet-input span.sc-duet-input{display:block;margin-top:8px}.duet-theme-turva.sc-duet-input .duet-input-help.sc-duet-input{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#747475}.has-error.sc-duet-input .duet-input-help.sc-duet-input{color:#de2362}.duet-theme-turva.has-error.sc-duet-input .duet-input-help.sc-duet-input{color:#e02a0d}.duet-label-hidden.sc-duet-input duet-label.sc-duet-input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}.duet-input-relative.sc-duet-input{position:relative;width:100%}";
10997
+ const duetInputCss = "*.sc-duet-input,*.sc-duet-input::after,*.sc-duet-input::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-input-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;display:inline-flex;width:100%;min-width:calc(33.333% - 8px);max-width:100%;text-align:left;vertical-align:bottom}.sc-duet-input-h:last-child,.sc-duet-input-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-input-h{width:calc(50% - 16px - 3px)}}.duet-expand.sc-duet-input-h{width:100% !important}.duet-m-0.sc-duet-input-h{margin:0 !important}duet-tooltip.sc-duet-input{position:absolute;top:12px;right:0}@media (min-width: 48em){duet-tooltip.sc-duet-input{position:relative;top:4px;right:auto}}duet-caption.sc-duet-input:not(:last-of-type){margin-bottom:0}.duet-input-placeholder.sc-duet-input{position:absolute;top:-9px;left:9px;z-index:200;display:block;width:auto;max-width:60%;padding:0 0.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:white}.duet-input-icon.sc-duet-input{position:absolute;top:50%;right:16px;z-index:200;width:20px;height:20px;font-size:0;line-height:normal;color:#00294d;pointer-events:none;transform:translateY(-50%)}.duet-theme-turva.sc-duet-input .duet-input-icon.sc-duet-input{color:#171c3a}.duet-input-container.sc-duet-input{position:relative;width:100%;height:100%}.duet-input.sc-duet-input{position:relative;z-index:100;display:block !important;width:100% !important;min-width:8rem;max-width:initial !important;height:auto !important;padding:12px 14px !important;margin:initial !important;margin-bottom:initial !important;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400 !important;font-variant-numeric:tabular-nums;line-height:1.5 !important;color:#00294d !important;cursor:initial !important;background:white !important;background-clip:initial !important;border:1px solid #909599 !important;border-radius:4px !important;box-shadow:initial !important;transition:box-shadow 150ms ease, border 150ms ease !important}.duet-input.is-number.sc-duet-input{padding-right:112px !important}.duet-input.is-date.sc-duet-input{padding-right:64px !important}.has-error.sc-duet-input .duet-input.sc-duet-input{border-color:#de2362 !important}.has-error.sc-duet-input .duet-input.sc-duet-input+.duet-input-icon.sc-duet-input{color:#de2362 !important}.duet-theme-turva.has-error.sc-duet-input .duet-input.sc-duet-input{border-color:#e02a0d !important}.duet-theme-turva.has-error.sc-duet-input .duet-input.sc-duet-input+.duet-input-icon.sc-duet-input{color:#e02a0d !important}.has-icon.sc-duet-input .duet-input.sc-duet-input{padding-right:48px !important}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a !important;border-color:#747475 !important}.duet-input.sc-duet-input::-ms-clear{display:none}.duet-input.sc-duet-input::-webkit-contacts-auto-fill-button{display:none !important}.duet-input.sc-duet-input::-webkit-input-placeholder{color:#657787;opacity:1 !important;transition:color 300ms ease}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input::-webkit-input-placeholder{color:#747475}.duet-input.sc-duet-input:focus::-webkit-input-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:focus::-webkit-input-placeholder{color:#cfcfd1}.duet-input.sc-duet-input::-moz-placeholder{color:#657787;opacity:1 !important}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input::-moz-placeholder{color:#747475}.duet-input.sc-duet-input:focus::-moz-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:focus::-moz-placeholder{color:#cfcfd1}.duet-input.sc-duet-input:-ms-input-placeholder{color:#657787}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:-ms-input-placeholder{color:#747475}.duet-input.sc-duet-input:focus:-ms-input-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:focus:-ms-input-placeholder{color:#cfcfd1}.duet-input[disabled].sc-duet-input{color:#00294d !important;cursor:text !important;background:#f5f8fa !important;border-color:#f5f8fa !important;box-shadow:none !important;opacity:1 !important;-webkit-text-fill-color:#00294d !important}.duet-theme-turva.sc-duet-input .duet-input[disabled].sc-duet-input{color:#171c3a !important;background:#f5f5f7 !important;border-color:#f5f5f7 !important;-webkit-text-fill-color:#171c3a !important}.duet-input.sc-duet-input:hover:not(:disabled){box-shadow:0 0 0 1px #909599 !important}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:hover:not(:disabled){box-shadow:0 0 0 1px #747475 !important}.has-error.sc-duet-input .duet-input.sc-duet-input:hover:not(:disabled){box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-input .duet-input.sc-duet-input:hover:not(:disabled){box-shadow:0 0 0 1px #e02a0d}.duet-input.sc-duet-input:focus{border-color:#0077b3 !important;outline:0;box-shadow:0 0 0 1px #0077b3 !important;transition:none}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:focus{border-color:#171c3a !important;box-shadow:0 0 0 1px #171c3a !important}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:focus+.duet-input-icon.sc-duet-input{color:#171c3a}.has-error.sc-duet-input .duet-input.sc-duet-input:focus{box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-input .duet-input.sc-duet-input:focus{box-shadow:0 0 0 1px #e02a0d}.duet-input.sc-duet-input:focus+.duet-input-icon.sc-duet-input{color:#0077b3}.duet-input[type=search].sc-duet-input:not(:placeholder-shown):focus+.duet-input-icon.sc-duet-input{display:none}.duet-input.sc-duet-input:not(:focus):not(:hover):invalid{box-shadow:none !important}.duet-input[type=number].sc-duet-input::-webkit-inner-spin-button,.duet-input[type=number].sc-duet-input::-webkit-outer-spin-button,.duet-input[type=time].sc-duet-input::-webkit-inner-spin-button,.duet-input[type=time].sc-duet-input::-webkit-outer-spin-button{display:none;margin:0;-webkit-appearance:none}.duet-input.sc-duet-input::-webkit-search-cancel-button{margin-right:-28px}.duet-input-help.sc-duet-input{display:block;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0.875rem;font-weight:400;line-height:1.25;color:#657787;border-radius:4px}.duet-input-help.sc-duet-input span.sc-duet-input{display:block;margin-top:8px}.duet-theme-turva.sc-duet-input .duet-input-help.sc-duet-input{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#747475}.has-error.sc-duet-input .duet-input-help.sc-duet-input{color:#de2362}.duet-theme-turva.has-error.sc-duet-input .duet-input-help.sc-duet-input{color:#e02a0d}.duet-label-hidden.sc-duet-input duet-label.sc-duet-input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}.duet-input-relative.sc-duet-input{position:relative;width:100%}";
10413
10998
 
10414
10999
  const icons = {
10415
11000
  search: formSearch,
@@ -10549,7 +11134,7 @@ class DuetInput {
10549
11134
  // (in webkit based browsers settings value trigger cursor position and will set it to EndOfText)
10550
11135
  restoreCursor();
10551
11136
  }
10552
- this.isCaptionVisible = !!(this.caption || (this.placeholder && this.echoPlaceholder && this.value));
11137
+ this.isCaptionVisible = !!this.caption;
10553
11138
  const emitEvent = () => this.duetChange.emit({
10554
11139
  value: this.value,
10555
11140
  component: "duet-input",
@@ -10568,7 +11153,7 @@ class DuetInput {
10568
11153
  componentWillLoad() {
10569
11154
  inheritGlobalTheme(this);
10570
11155
  this.disallowedPatternChange();
10571
- this.isCaptionVisible = !!(this.caption || (this.placeholder && this.echoPlaceholder && this.value));
11156
+ this.isCaptionVisible = !!this.caption;
10572
11157
  }
10573
11158
  /**
10574
11159
  * Sets focus on the specified `duet-input`. Use this method instead of the global
@@ -10603,12 +11188,12 @@ class DuetInput {
10603
11188
  "duet-input-top-caption-shown": this.isCaptionVisible,
10604
11189
  "has-icon": !!this.icon || (this.type !== "text" && this.type !== "tel" && this.type !== "password"),
10605
11190
  "has-error": !!this.error,
10606
- } }, hAsync("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), this.tooltip && (hAsync("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)), this.caption && (hAsync("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)), this.placeholder && this.echoPlaceholder && this.value && (hAsync("duet-caption", { id: this.topCaptionPlaceholderId, size: "small" }, this.placeholder)), hAsync("div", { class: "duet-input-relative" }, hAsync("input", Object.assign({ ref: input => (this.nativeInput = input), onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, type: this.type, class: {
11191
+ } }, hAsync("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), this.tooltip && (hAsync("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)), this.caption && (hAsync("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)), hAsync("div", { class: "duet-input-relative" }, this.placeholder && this.echoPlaceholder && this.value && (hAsync("duet-caption", { id: this.topCaptionPlaceholderId, class: "duet-input-placeholder", margin: "none", size: "small" }, this.placeholder)), hAsync("input", Object.assign({ ref: input => (this.nativeInput = input), onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, type: this.type, class: {
10607
11192
  "duet-input": true,
10608
11193
  disabled: this.disabled,
10609
11194
  "is-number": this.component === "number",
10610
11195
  "is-date": this.component === "date",
10611
- }, value: this.value, disabled: this.disabled, "aria-invalid": this.error ? "true" : "false", "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", minlength: this.minlength, maxlength: this.maxlength, autocomplete: this.autoComplete, required: this.required, role: this.role, name: this.name, id: identifier }, inputProps)), !this.icon && this.type !== "text" && this.type !== "tel" && this.type !== "password" && (hAsync("div", { class: "duet-input-icon" }, hAsync("duet-icon", { margin: "none", size: "small", icon: icons[this.type].svg, color: "currentColor" }))), this.icon && (hAsync("div", { class: "duet-input-icon" }, hAsync("duet-icon", { margin: "none", size: "small", name: this.icon, color: "currentColor" }))), hAsync("slot", null)), hAsync("span", { class: "duet-input-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && hAsync("span", null, this.error)))));
11196
+ }, value: this.value, disabled: this.disabled, "aria-invalid": this.error ? "true" : "false", "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", minlength: this.minlength, maxlength: this.maxlength, autocomplete: this.autoComplete, required: this.required, role: this.role, name: this.name, id: identifier }, inputProps)), !this.icon && this.type !== "text" && this.type !== "tel" && this.type !== "password" && (hAsync("div", { class: "duet-input-icon" }, hAsync("duet-icon", { margin: "none", size: "small", icon: icons[this.type].svg, color: "currentColor" }))), this.icon && (hAsync("div", { class: "duet-input-icon" }, hAsync("duet-icon", { margin: "none", size: "small", name: this.icon, color: "currentColor" }))), hAsync("slot", null)), hAsync("span", { class: "duet-input-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && hAsync("span", { class: "duet-input-error" }, this.error)))));
10612
11197
  }
10613
11198
  get element() { return getElement(this); }
10614
11199
  static get watchers() { return {
@@ -10660,7 +11245,7 @@ class DuetInput {
10660
11245
  }; }
10661
11246
  }
10662
11247
 
10663
- const duetLabelCss = "*.sc-duet-label,*.sc-duet-label::after,*.sc-duet-label::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-label-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:12px !important;position:relative;z-index:100;display:inline-flex;width:auto;margin-top:8px !important;line-height:1.25;cursor:default}.duet-p-0.sc-duet-label-h{padding:0 !important}.duet-m-0.sc-duet-label-h{margin:0 !important}.duet-m-0.sc-duet-label-h{margin-bottom:0 !important}.duet-small-margin.sc-duet-label-h{margin-top:8px !important;margin-bottom:4px !important}.duet-has-tooltip.sc-duet-label-h{padding-right:48px}@media (min-width: 48em){.duet-has-tooltip.sc-duet-label-h{padding-right:0}}label.sc-duet-label{margin:0;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:600 !important;line-height:1.25;color:#00294d;text-align:left}label.sc-duet-label span.sc-duet-label{font-size:1rem;font-weight:600 !important}.duet-label-small.sc-duet-label-h label.sc-duet-label{font-size:0.875rem}.duet-label-small.sc-duet-label-h label.sc-duet-label span.sc-duet-label{font-size:0.875rem}.duet-theme-turva.sc-duet-label-h label.sc-duet-label{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}";
11248
+ const duetLabelCss = "*.sc-duet-label,*.sc-duet-label::after,*.sc-duet-label::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-label-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:12px !important;position:relative;z-index:100;display:inline-flex;width:auto;margin-top:8px !important;line-height:1.25;cursor:default}.duet-p-0.sc-duet-label-h{padding:0 !important}.duet-m-0.sc-duet-label-h{margin:0 !important}.duet-m-0.sc-duet-label-h{margin-bottom:0 !important}.duet-small-margin.sc-duet-label-h{margin-top:8px !important;margin-bottom:4px !important}.duet-has-tooltip.sc-duet-label-h{padding-right:48px}@media (min-width: 48em){.duet-has-tooltip.sc-duet-label-h{padding-right:0}}label.sc-duet-label{margin:0;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:600 !important;line-height:1.25;color:#00294d;text-align:left;word-break:break-word}label.sc-duet-label span.sc-duet-label{font-size:1rem;font-weight:600 !important;word-break:break-word}.duet-label-small.sc-duet-label-h label.sc-duet-label{font-size:0.875rem}.duet-label-small.sc-duet-label-h label.sc-duet-label span.sc-duet-label{font-size:0.875rem}.duet-theme-turva.sc-duet-label-h label.sc-duet-label{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}";
10664
11249
 
10665
11250
  class DuetLabel {
10666
11251
  constructor(hostRef) {
@@ -10826,8 +11411,7 @@ class DuetLink {
10826
11411
  */
10827
11412
  this.language = getLanguage();
10828
11413
  /**
10829
- * Property to change accessibleLabelExternal defaults on the component.
10830
- * normally you would handle these strings on an application level and override @accessibleLabelExternal when needed
11414
+ * Defaults for accessibleLabelExternal
10831
11415
  * @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"}
10832
11416
  */
10833
11417
  this.accessibleLabelExternalDefaults = DuetStringsExternalDefaults;
@@ -10835,7 +11419,7 @@ class DuetLink {
10835
11419
  * Adds accessible label for tooltip that is shown in external link (url & external have both been set)
10836
11420
  * @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"}
10837
11421
  */
10838
- this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults, this.language);
11422
+ this.accessibleLabelExternal = getLocaleString(this.accessibleLabelExternalDefaults);
10839
11423
  /**
10840
11424
  * Theme of the button.
10841
11425
  */
@@ -10881,7 +11465,7 @@ class DuetLink {
10881
11465
  "$members$": {
10882
11466
  "accessibleLabel": [1, "accessible-label"],
10883
11467
  "language": [1025],
10884
- "accessibleLabelExternalDefaults": [16],
11468
+ "accessibleLabelExternalDefaults": [1, "accessible-label-external-default"],
10885
11469
  "accessibleLabelExternal": [1, "accessible-label-external"],
10886
11470
  "identifier": [1],
10887
11471
  "theme": [1025],
@@ -11203,10 +11787,10 @@ class DuetModal {
11203
11787
  */
11204
11788
  this.language = getLanguage();
11205
11789
  /**
11206
- * Property to change accessibleCloseLabel defaults on the component.
11207
- * normally you would handle these strings on an application level and override @accessibleCloseLabel when needed
11790
+ * Defaults for accessibleCloseLabel
11791
+ * @default {fi: "Sulje ikkuna", sv: "Stäng fönstret", en: "Close the dialog", }
11208
11792
  */
11209
- this.accessibleCloseLabelDefault = {
11793
+ this.accessibleCloseLabelDefaults = {
11210
11794
  fi: "Sulje ikkuna",
11211
11795
  sv: "Stäng fönstret",
11212
11796
  en: "Close the dialog",
@@ -11217,7 +11801,7 @@ class DuetModal {
11217
11801
  * Swedish translation for this property is “Stäng fönstret”.
11218
11802
  * @default {fi: "Sulje ikkuna", sv: "Stäng fönstret", en: "Close the dialog", }
11219
11803
  */
11220
- this.accessibleCloseLabel = getLocaleString(this.accessibleCloseLabelDefault);
11804
+ this.accessibleCloseLabel = getLocaleString(this.accessibleCloseLabelDefaults, this.language);
11221
11805
  /**
11222
11806
  * Size of the modal window.
11223
11807
  */
@@ -11384,7 +11968,7 @@ class DuetModal {
11384
11968
  "$tagName$": "duet-modal",
11385
11969
  "$members$": {
11386
11970
  "language": [1025],
11387
- "accessibleCloseLabelDefault": [16],
11971
+ "accessibleCloseLabelDefaults": [1, "accessible-close-label-default"],
11388
11972
  "accessibleCloseLabel": [1, "accessible-close-label"],
11389
11973
  "size": [1],
11390
11974
  "gutterSize": [1, "gutter-size"],
@@ -11519,8 +12103,8 @@ class DuetNotificationDrawer {
11519
12103
  */
11520
12104
  this.language = getLanguage();
11521
12105
  /**
11522
- * Property to change accessibleLabelNotifications defaults on the component.
11523
- * normally you would handle these strings on an application level and override @accessibleLabelNotifications when needed
12106
+ * Defaults for accessibleLabelNotifications
12107
+ * @default {en: "No notifications", fi: "Ei ilmoituksia", sv: "Inga notifikationer"}
11524
12108
  */
11525
12109
  this.accessibleLabelNotificationsDefaults = {
11526
12110
  en: "No notifications",
@@ -11531,7 +12115,7 @@ class DuetNotificationDrawer {
11531
12115
  * Adds accessible label for tooltip that is shown for notifications
11532
12116
  * @default {en: "No notifications", fi: "Ei ilmoituksia", sv: "Inga notifikationer"}
11533
12117
  */
11534
- this.accessibleLabelNotifications = getLocaleString(this.accessibleLabelNotificationsDefaults, this.language);
12118
+ this.accessibleLabelNotifications = getLocaleString(this.accessibleLabelNotificationsDefaults);
11535
12119
  /**
11536
12120
  * Show a badge that indicates something has changed.
11537
12121
  */
@@ -11634,7 +12218,7 @@ class DuetNotificationDrawer {
11634
12218
  "icon": [1],
11635
12219
  "label": [1],
11636
12220
  "language": [1],
11637
- "accessibleLabelNotificationsDefaults": [16],
12221
+ "accessibleLabelNotificationsDefaults": [1, "accessible-label-notification-default"],
11638
12222
  "accessibleLabelNotifications": [1, "accessible-label-notifications"],
11639
12223
  "badge": [4],
11640
12224
  "theme": [1025],
@@ -11705,37 +12289,52 @@ class DuetNumberInput {
11705
12289
  */
11706
12290
  this.unit = getLocale(this.language).money;
11707
12291
  /**
11708
- * Format of message used to announce current amount when switching between amounts.
11709
- * The string {current} is replaced with the current amount.
12292
+ * Defaults for accessibleLive
11710
12293
  * @default {fi: "{current} euroa valittuna", en: "{current} euros selected", sv: "{current} valda euro"}
11711
12294
  */
11712
- this.accessibleLive = getLocaleString({
12295
+ this.accessibleLiveDefaults = {
11713
12296
  fi: "{current} euroa valittuna",
11714
12297
  en: "{current} euros selected",
11715
12298
  sv: "{current} euro valt",
11716
- }, this.language);
12299
+ };
12300
+ /**
12301
+ * Format of message used to announce current amount when switching between amounts.
12302
+ * The string {current} is replaced with the current amount.
12303
+ * @default {fi: "{current} euroa valittuna", en: "{current} euros selected", sv: "{current} valda euro"}
12304
+ */
12305
+ this.accessibleLive = getLocaleString(this.accessibleLiveDefaults, this.language);
11717
12306
  /**
11718
12307
  * Disables the aria-live messaging used internally in this component. This could be useful when you want to use custom aria-live messages instead.
11719
12308
  */
11720
12309
  this.accessibleLiveEnabled = true;
11721
12310
  /**
11722
- * Accessible label for the add button that is read for screen reader users.
12311
+ * Defaults for accessibleAdd
11723
12312
  * @default {fi: "Lisää summaan", en: "Add to the amount", sv: "Lägg till beloppet"}
11724
12313
  */
11725
- this.accessibleAdd = getLocaleString({
12314
+ this.accessibleAddDefaults = {
11726
12315
  fi: "Lisää summaan",
11727
12316
  en: "Add to the amount",
11728
12317
  sv: "Lägg till beloppet",
11729
- }, this.language);
12318
+ };
11730
12319
  /**
11731
- * Accessible label for the subtract button that is read for screen reader users.
12320
+ * Accessible label for the add button that is read for screen reader users.
12321
+ * @default {fi: "Lisää summaan", en: "Add to the amount", sv: "Lägg till beloppet"}
12322
+ */
12323
+ this.accessibleAdd = getLocaleString(this.accessibleAddDefaults, this.language);
12324
+ /**
12325
+ * Defaults for accessibleSubtract
11732
12326
  * @default {fi: "Vähennä summasta", en: "Subtract from the amount", sv: "Dra från beloppet"}
11733
12327
  */
11734
- this.accessibleSubtract = getLocaleString({
12328
+ this.accessibleSubtractDefaults = {
11735
12329
  fi: "Vähennä summasta",
11736
12330
  en: "Subtract from the amount",
11737
12331
  sv: "Dra från beloppet",
11738
- }, this.language);
12332
+ };
12333
+ /**
12334
+ * Accessible label for the subtract button that is read for screen reader users.
12335
+ * @default {fi: "Vähennä summasta", en: "Subtract from the amount", sv: "Dra från beloppet"}
12336
+ */
12337
+ this.accessibleSubtract = getLocaleString(this.accessibleSubtractDefaults, this.language);
11739
12338
  /**
11740
12339
  * Theme of the input.
11741
12340
  */
@@ -11753,14 +12352,19 @@ class DuetNumberInput {
11753
12352
  */
11754
12353
  this.min = 0;
11755
12354
  /**
11756
- * Label for the number input.
12355
+ * Defaults for Label
11757
12356
  * @default {fi: "Etiketti", en: "Label", sv: "Märka"}
11758
12357
  */
11759
- this.label = getLocaleString({
12358
+ this.labelDefaults = {
11760
12359
  fi: "Nimilappu",
11761
12360
  en: "Label",
11762
12361
  sv: "Etikett",
11763
- }, this.language);
12362
+ };
12363
+ /**
12364
+ * Label for the number input.
12365
+ * @default {fi: "Etiketti", en: "Label", sv: "Märka"}
12366
+ */
12367
+ this.label = getLocaleString(this.labelDefaults, this.language);
11764
12368
  /**
11765
12369
  * Visually hide the label, but still show it to screen readers.
11766
12370
  */
@@ -11998,15 +12602,19 @@ class DuetNumberInput {
11998
12602
  "accessibleControls": [1, "accessible-controls"],
11999
12603
  "accessibleOwns": [1, "accessible-owns"],
12000
12604
  "accessibleDescribedBy": [1, "accessible-described-by"],
12605
+ "accessibleLiveDefaults": [1, "accessible-live-default"],
12001
12606
  "accessibleLive": [1, "accessible-live"],
12002
12607
  "accessibleLiveEnabled": [4, "accessible-live-enabled"],
12608
+ "accessibleAddDefaults": [1, "accessible-add-default"],
12003
12609
  "accessibleAdd": [1, "accessible-add"],
12610
+ "accessibleSubtractDefaults": [1, "accessible-subtract-defaults"],
12004
12611
  "accessibleSubtract": [1, "accessible-subtract"],
12005
12612
  "theme": [1025],
12006
12613
  "margin": [1],
12007
12614
  "expand": [4],
12008
12615
  "identifier": [1],
12009
12616
  "min": [2],
12617
+ "labelDefaults": [1, "label-default"],
12010
12618
  "label": [1],
12011
12619
  "labelHidden": [4, "label-hidden"],
12012
12620
  "max": [2],
@@ -12028,13 +12636,16 @@ class DuetNumberInput {
12028
12636
  }; }
12029
12637
  }
12030
12638
 
12031
- const duetParagraphCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-paragraph,*.sc-duet-paragraph::after,*.sc-duet-paragraph::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-paragraph-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:100%}/*!@.duet-paragraph*/.duet-paragraph.sc-duet-paragraph{margin-bottom:16px !important;display:block;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-style:normal;font-weight:400;font-variant-numeric:tabular-nums;-webkit-hyphens:auto;hyphens:auto;line-height:1.5;color:#00294d}/*!@.duet-paragraph.duet-p-0*/.duet-paragraph.duet-p-0.sc-duet-paragraph{padding:0 !important}/*!@.duet-paragraph.duet-m-0*/.duet-paragraph.duet-m-0.sc-duet-paragraph{margin:0 !important}/*!@.duet-paragraph.duet-theme-turva*/.duet-paragraph.duet-theme-turva.sc-duet-paragraph{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}/*!@.duet-paragraph.duet-paragraph-small*/.duet-paragraph.duet-paragraph-small.sc-duet-paragraph{font-size:0.875rem}/*!@.duet-paragraph.duet-m-0*/.duet-paragraph.duet-m-0.sc-duet-paragraph{margin:0 !important}/*!@.duet-paragraph.intro*/.duet-paragraph.intro.sc-duet-paragraph{font-size:2.7vw;margin-bottom:28px !important;-webkit-hyphens:inherit;hyphens:inherit}@media (max-width: 37.037037037rem){/*!@.duet-paragraph.intro*/.duet-paragraph.intro.sc-duet-paragraph{font-size:1rem}}@media (min-width: 46.2962962963rem){/*!@.duet-paragraph.intro*/.duet-paragraph.intro.sc-duet-paragraph{font-size:1.25rem}}/*!@.duet-paragraph.intro.duet-m-0*/.duet-paragraph.intro.duet-m-0.sc-duet-paragraph{margin:0 !important}/*!@::slotted(a)*/.sc-duet-paragraph-s>a{font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-style:normal;font-weight:400;color:#0077b3;text-decoration:underline;transition:300ms ease}/*!@::slotted(a).duet-theme-turva*/.sc-duet-paragraph-s>a.duet-theme-turva{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#c60c30}/*!@::slotted(a):hover*/.sc-duet-paragraph-s>a:hover{color:#004d80;text-decoration:none}/*!@::slotted(a):hover.duet-theme-turva*/.sc-duet-paragraph-s>a:hover.duet-theme-turva{color:#940925}/*!@::slotted(a):active*/.sc-duet-paragraph-s>a:active{opacity:0.75;transition:none}";
12639
+ const duetParagraphCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-paragraph,*.sc-duet-paragraph::after,*.sc-duet-paragraph::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-paragraph-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:100%}/*!@.duet-paragraph*/.duet-paragraph.sc-duet-paragraph{margin-bottom:16px !important;display:block;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-style:normal;font-weight:400;font-variant-numeric:tabular-nums;-webkit-hyphens:auto;hyphens:auto;line-height:1.5;color:#00294d}/*!@.duet-paragraph.duet-p-0*/.duet-paragraph.duet-p-0.sc-duet-paragraph{padding:0 !important}/*!@.duet-paragraph.duet-m-0*/.duet-paragraph.duet-m-0.sc-duet-paragraph{margin:0 !important}/*!@.duet-paragraph.duet-theme-turva*/.duet-paragraph.duet-theme-turva.sc-duet-paragraph{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}/*!@.duet-paragraph.duet-paragraph-small*/.duet-paragraph.duet-paragraph-small.sc-duet-paragraph{font-size:0.875rem}/*!@.duet-paragraph.duet-paragraph-semi-bold*/.duet-paragraph.duet-paragraph-semi-bold.sc-duet-paragraph{font-weight:600}/*!@.duet-paragraph.duet-paragraph-bold*/.duet-paragraph.duet-paragraph-bold.sc-duet-paragraph{font-weight:700}/*!@.duet-paragraph.duet-m-0*/.duet-paragraph.duet-m-0.sc-duet-paragraph{margin:0 !important}/*!@.duet-paragraph.intro*/.duet-paragraph.intro.sc-duet-paragraph{font-size:2.7vw;margin-bottom:28px !important;-webkit-hyphens:inherit;hyphens:inherit}@media (max-width: 37.037037037rem){/*!@.duet-paragraph.intro*/.duet-paragraph.intro.sc-duet-paragraph{font-size:1rem}}@media (min-width: 46.2962962963rem){/*!@.duet-paragraph.intro*/.duet-paragraph.intro.sc-duet-paragraph{font-size:1.25rem}}/*!@.duet-paragraph.intro.duet-m-0*/.duet-paragraph.intro.duet-m-0.sc-duet-paragraph{margin:0 !important}/*!@::slotted(a)*/.sc-duet-paragraph-s>a{font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-style:normal;font-weight:400;color:#0077b3;text-decoration:underline;transition:300ms ease}/*!@::slotted(a).duet-theme-turva*/.sc-duet-paragraph-s>a.duet-theme-turva{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#c60c30}/*!@::slotted(a):hover*/.sc-duet-paragraph-s>a:hover{color:#004d80;text-decoration:none}/*!@::slotted(a):hover.duet-theme-turva*/.sc-duet-paragraph-s>a:hover.duet-theme-turva{color:#940925}/*!@::slotted(a):active*/.sc-duet-paragraph-s>a:active{opacity:0.75;transition:none}";
12032
12640
 
12641
+ /**
12642
+ * @part duet-paragraph - piercing selector for styling the paragraph
12643
+ */
12033
12644
  class DuetParagraph {
12034
12645
  constructor(hostRef) {
12035
12646
  registerInstance(this, hostRef);
12036
12647
  /**
12037
- * Theme of the card.
12648
+ * Theme of the paragraph.
12038
12649
  */
12039
12650
  this.theme = "";
12040
12651
  /**
@@ -12045,6 +12656,10 @@ class DuetParagraph {
12045
12656
  * Controls the size of the paragraph.
12046
12657
  */
12047
12658
  this.size = "medium";
12659
+ /**
12660
+ * Controls the Font-Weight of the paragraph.
12661
+ */
12662
+ this.weight = undefined;
12048
12663
  /**
12049
12664
  * Style variation of the paragraph.
12050
12665
  */
@@ -12070,26 +12685,107 @@ class DuetParagraph {
12070
12685
  return (hAsync("p", { class: {
12071
12686
  "duet-paragraph": true,
12072
12687
  "duet-paragraph-small": this.size === "small",
12688
+ "duet-paragraph-semi-bold": this.weight === "semi-bold",
12689
+ "duet-paragraph-bold": this.weight === "bold",
12073
12690
  "duet-m-0": this.margin === "none",
12074
12691
  [this.variation]: true,
12075
12692
  "duet-theme-turva": this.theme === "turva",
12076
- }, style: { color } }, hAsync("slot", null)));
12693
+ }, style: { color }, part: "duet-paragraph" }, hAsync("slot", null)));
12077
12694
  }
12078
12695
  get element() { return getElement(this); }
12079
12696
  static get style() { return duetParagraphCss; }
12080
12697
  static get cmpMeta() { return {
12081
- "$flags$": 9,
12082
- "$tagName$": "duet-paragraph",
12698
+ "$flags$": 9,
12699
+ "$tagName$": "duet-paragraph",
12700
+ "$members$": {
12701
+ "theme": [1025],
12702
+ "margin": [1],
12703
+ "size": [1],
12704
+ "weight": [1],
12705
+ "variation": [1],
12706
+ "color": [1]
12707
+ },
12708
+ "$listeners$": undefined,
12709
+ "$lazyBundleId$": "-",
12710
+ "$attrsToReflect$": []
12711
+ }; }
12712
+ }
12713
+
12714
+ const duetProgressCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;width:100%;height:inherit}.duet-progress{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%;min-height:1px;}.duet-progress .progress-bar{position:relative;display:block;width:100%;height:inherit;min-height:1px;background-color:#f3f9fc;border-radius:0;box-shadow:none}.duet-theme-turva .duet-progress .progress-bar{background-color:#fcf3f4}.duet-progress .progress-bar>span{display:block;height:inherit;text-indent:-9999px;background-color:#0077b3;border-radius:0}.duet-theme-turva .duet-progress .progress-bar>span{background-color:#c60c30}.duet-progress progress[value]{display:flex;width:100%;height:inherit;min-height:1px;color:#0077b3;border:0 none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.duet-theme-turva .duet-progress progress[value]{color:#c60c30}.duet-progress progress[value]::-webkit-progress-bar{background-color:#f3f9fc;border-radius:0}.duet-theme-turva .duet-progress progress[value]::-webkit-progress-bar{background-color:#fcf3f4}.duet-progress progress[value]::-webkit-progress-value{background-color:#0077b3;background-size:35px 20px, 100% 100%, 100% 100%;border-radius:0;-webkit-animation:animate-stripes 5s linear infinite;animation:animate-stripes 5s linear infinite}.duet-theme-turva .duet-progress progress[value]::-webkit-progress-value{background-color:#c60c30}.duet-progress progress[value] ::-moz-progress-bar{background-color:#f3f9fc}.duet-theme-turva .duet-progress progress[value] ::-moz-progress-bar{background-color:#fcf3f4}";
12715
+
12716
+ class DuetProgress {
12717
+ constructor(hostRef) {
12718
+ registerInstance(this, hostRef);
12719
+ /**
12720
+ * Own Properties
12721
+ */
12722
+ this.progressId = createID("DuetProgress");
12723
+ this.progressLabelId = createID("DuetProgressLabel");
12724
+ /**
12725
+ * Defaults for accessibleLabel
12726
+ */
12727
+ this.accessibleLabelUploadDefaults = {
12728
+ fi: ["lähetys valmis", "lähetys käynnissä"],
12729
+ sv: ["Uppladdningen är klar", "Uppladdning pågår"],
12730
+ en: ["upload completed", "upload in progress"],
12731
+ };
12732
+ /**
12733
+ * Adds accessible label for upload in progress and upload complete states
12734
+ * @default {fi: ["lähetys valmis", "lähetys käynnissä"],sv: ["Uppladdningen är klar", "Uppladdning pågår"], en: ["completed", "in progress"]}
12735
+ */
12736
+ this.accessibleLabelUpload = getLocaleString(this.accessibleLabelUploadDefaults);
12737
+ /**
12738
+ * Progress of the bar, a value from 0-100
12739
+ */
12740
+ this.progress = 0;
12741
+ /**
12742
+ * Height of progressbar
12743
+ */
12744
+ this.height = "10px";
12745
+ /**
12746
+ * Theme of the input.
12747
+ */
12748
+ this.theme = "";
12749
+ }
12750
+ /**
12751
+ * Component lifecycle events.
12752
+ */
12753
+ componentWillLoad() {
12754
+ inheritGlobalTheme(this);
12755
+ }
12756
+ /**
12757
+ * render() function
12758
+ * Always the last one in the class.
12759
+ */
12760
+ render() {
12761
+ return (hAsync(Host, null, hAsync("div", { "aria-live": this.accessibleLabel ? "polite" : "off", "aria-hidden": this.accessibleLabel ? "false" : "true", "aria-atomic": "true", style: {
12762
+ height: this.height,
12763
+ }, id: this.progressId, class: {
12764
+ "duet-progress": true,
12765
+ "duet-progress-done": this.progress === 100,
12766
+ "duet-progress-start": this.progress === 0,
12767
+ "duet-progress-inprogress": this.progress < 99 && this.progress !== 0,
12768
+ "duet-theme-turva": this.theme === "turva",
12769
+ } }, hAsync("duet-visually-hidden", null, hAsync("label", { htmlFor: this.progressLabelId }, this.progress !== 0 && (hAsync("span", null, this.accessibleLabel, ", ", this.accessibleLabelUpload[this.progress < 99 ? 1 : 0])))), this.caption && (hAsync("div", { class: "duet-progress-caption" }, hAsync("span", null, this.caption))), hAsync("progress", { id: this.progressLabelId, "aria-describedby": this.accessibleDescribedBy, role: "progressbar", value: this.progress, max: "100", "aria-valuemin": "0", "aria-valuemax": "100" }, hAsync("div", { class: "progress-bar" }, hAsync("span", { style: { width: `${this.progress}%;` } }, "Progress: ", this.progress, "%"))))));
12770
+ }
12771
+ get element() { return getElement(this); }
12772
+ static get style() { return duetProgressCss; }
12773
+ static get cmpMeta() { return {
12774
+ "$flags$": 0,
12775
+ "$tagName$": "duet-progress",
12083
12776
  "$members$": {
12084
- "theme": [1025],
12085
- "margin": [1],
12086
- "size": [1],
12087
- "variation": [1],
12088
- "color": [1]
12777
+ "accessibleDescribedBy": [1, "accessible-described-by"],
12778
+ "accessibleLabel": [1, "accessible-label"],
12779
+ "accessibleLabelUploadDefaults": [1, "accessible-label-upload-defaults"],
12780
+ "accessibleLabelUpload": [1, "accessible-label-upload"],
12781
+ "progress": [1538],
12782
+ "caption": [1],
12783
+ "height": [1],
12784
+ "theme": [1025]
12089
12785
  },
12090
12786
  "$listeners$": undefined,
12091
12787
  "$lazyBundleId$": "-",
12092
- "$attrsToReflect$": []
12788
+ "$attrsToReflect$": [["progress", "progress"]]
12093
12789
  }; }
12094
12790
  }
12095
12791
 
@@ -12581,7 +13277,7 @@ class DuetRangeSlider {
12581
13277
  }; }
12582
13278
  }
12583
13279
 
12584
- const duetSelectCss = "@charset \"UTF-8\";*.sc-duet-select,*.sc-duet-select::after,*.sc-duet-select::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-select-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;display:inline-flex;width:100%;max-width:100%;vertical-align:bottom}.sc-duet-select-h:last-child,.sc-duet-select-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-select-h{width:calc(50% - 16px - 3px)}.duet-expand.sc-duet-select-h{width:100% !important}}.duet-m-0.sc-duet-select-h{margin:0 !important}duet-tooltip.sc-duet-select{position:absolute;top:12px;right:0}@media (min-width: 48em){duet-tooltip.sc-duet-select{position:relative;top:4px;right:auto}}.duet-select-container.sc-duet-select{position:relative;width:100%}.duet-select-wrapper.sc-duet-select{position:relative;width:100%;padding:15px 14px !important;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;line-height:1.25}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}.duet-select-wrapper.sc-duet-select::after{content:\"  \"}.duet-select-wrapper.sc-duet-select select.sc-duet-select{position:absolute;top:0;right:0;bottom:0;left:0;z-index:200;width:100%;height:100%;padding:0;margin:0;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;cursor:pointer;border:0;outline:none;opacity:0}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}.duet-select-wrapper.sc-duet-select select.sc-duet-select:hover+.duet-select.sc-duet-select{border-color:#909599;box-shadow:0 0 0 1px #909599}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:hover+.duet-select.sc-duet-select{border-color:#747475;box-shadow:0 0 0 1px #747475}.has-error.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:hover+.duet-select.sc-duet-select{box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:hover+.duet-select.sc-duet-select{box-shadow:0 0 0 1px #e02a0d}.duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select{border-color:#0077b3;outline:0;box-shadow:0 0 0 1px #0077b3;transition:none}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select{border-color:#171c3a;box-shadow:0 0 0 1px #171c3a}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select .duet-select-icon.sc-duet-select{color:#171c3a}.duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select .duet-select-icon.sc-duet-select{color:#0077b3}.has-error.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select{box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select{box-shadow:0 0 0 1px #e02a0d}.duet-select-wrapper.sc-duet-select select[disabled].sc-duet-select{cursor:default !important}.duet-select-wrapper.sc-duet-select select[disabled].sc-duet-select+.duet-select.sc-duet-select{color:#00294d !important;cursor:default !important;background:#f5f8fa !important;border-color:#f5f8fa !important;box-shadow:none !important;opacity:1 !important;-webkit-text-fill-color:#00294d !important}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select select[disabled].sc-duet-select+.duet-select.sc-duet-select{color:#171c3a !important;background:#f5f5f7 !important;border-color:#f5f5f7 !important;-webkit-text-fill-color:#171c3a !important}.duet-select.sc-duet-select{position:absolute;top:0;right:0;bottom:0;left:0;z-index:100;display:block;width:100%;min-width:8rem;padding:12px 14px !important;padding-right:48px !important;overflow:hidden;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:1.5;color:#00294d;text-align:left;text-overflow:ellipsis;white-space:nowrap;background:white;border:1px solid #909599;border-radius:4px;transition:150ms ease}.has-error.sc-duet-select .duet-select.sc-duet-select{border-color:#de2362 !important}.has-error.sc-duet-select .duet-select.sc-duet-select .duet-select-icon.sc-duet-select{color:#de2362 !important}.duet-theme-turva.has-error.sc-duet-select .duet-select.sc-duet-select{border-color:#e02a0d !important}.duet-theme-turva.has-error.sc-duet-select .duet-select.sc-duet-select .duet-select-icon.sc-duet-select{color:#e02a0d !important}.duet-theme-turva.sc-duet-select .duet-select.sc-duet-select{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a;border-color:#747475}.duet-select.sc-duet-select svg.sc-duet-select{position:absolute;top:50%;right:16px;z-index:200;width:20px;height:20px;color:#00294d;pointer-events:none;transform:translateY(-50%)}.duet-theme-turva.sc-duet-select .duet-select.sc-duet-select svg.sc-duet-select{color:#171c3a}.duet-select-help.sc-duet-select{display:block;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0.875rem;font-weight:400;line-height:1.25;color:#657787;border-radius:4px}.duet-select-help.sc-duet-select span.sc-duet-select{display:block;margin-top:8px}.duet-theme-turva.sc-duet-select .duet-select-help.sc-duet-select{color:#747475}.has-error.sc-duet-select .duet-select-help.sc-duet-select{color:#de2362}.duet-theme-turva.has-error.sc-duet-select .duet-select-help.sc-duet-select{color:#e02a0d}.duet-label-hidden.sc-duet-select duet-label.sc-duet-select{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}";
13280
+ const duetSelectCss = "@charset \"UTF-8\";*.sc-duet-select,*.sc-duet-select::after,*.sc-duet-select::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-select-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;display:inline-flex;width:100%;max-width:100%;vertical-align:bottom}.sc-duet-select-h:last-child,.sc-duet-select-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-select-h{width:calc(50% - 16px - 3px)}.duet-expand.sc-duet-select-h{width:100% !important}}.duet-m-0.sc-duet-select-h{margin:0 !important}duet-tooltip.sc-duet-select{position:absolute;top:12px;right:0}@media (min-width: 48em){duet-tooltip.sc-duet-select{position:relative;top:4px;right:auto}}.duet-select-placeholder.sc-duet-select{position:absolute;top:-9px;left:9px;z-index:200;display:block;width:auto;max-width:60%;padding:0 0.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:white}.duet-select-container.sc-duet-select{position:relative;width:100%}.duet-select-wrapper.sc-duet-select{position:relative;width:100%;padding:15px 14px !important;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;line-height:1.25}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}.duet-select-wrapper.sc-duet-select::after{content:\"  \"}.duet-select-wrapper.sc-duet-select select.sc-duet-select{position:absolute;top:0;right:0;bottom:0;left:0;z-index:200;width:100%;height:100%;padding:0;margin:0;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;cursor:pointer;border:0;outline:none;opacity:0}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}.duet-select-wrapper.sc-duet-select select.sc-duet-select:hover+.duet-select.sc-duet-select{border-color:#909599;box-shadow:0 0 0 1px #909599}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:hover+.duet-select.sc-duet-select{border-color:#747475;box-shadow:0 0 0 1px #747475}.has-error.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:hover+.duet-select.sc-duet-select{box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:hover+.duet-select.sc-duet-select{box-shadow:0 0 0 1px #e02a0d}.duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select{border-color:#0077b3;outline:0;box-shadow:0 0 0 1px #0077b3;transition:none}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select{border-color:#171c3a;box-shadow:0 0 0 1px #171c3a}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select .duet-select-icon.sc-duet-select{color:#171c3a}.duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select .duet-select-icon.sc-duet-select{color:#0077b3}.has-error.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select{box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-select .duet-select-wrapper.sc-duet-select select.sc-duet-select:focus+.duet-select.sc-duet-select{box-shadow:0 0 0 1px #e02a0d}.duet-select-wrapper.sc-duet-select select[disabled].sc-duet-select{cursor:default !important}.duet-select-wrapper.sc-duet-select select[disabled].sc-duet-select+.duet-select.sc-duet-select{color:#00294d !important;cursor:default !important;background:#f5f8fa !important;border-color:#f5f8fa !important;box-shadow:none !important;opacity:1 !important;-webkit-text-fill-color:#00294d !important}.duet-theme-turva.sc-duet-select .duet-select-wrapper.sc-duet-select select[disabled].sc-duet-select+.duet-select.sc-duet-select{color:#171c3a !important;background:#f5f5f7 !important;border-color:#f5f5f7 !important;-webkit-text-fill-color:#171c3a !important}.duet-select.sc-duet-select{position:absolute;top:0;right:0;bottom:0;left:0;z-index:100;display:block;width:100%;min-width:8rem;padding:12px 14px !important;padding-right:48px !important;overflow:hidden;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:1.5;color:#00294d;text-align:left;text-overflow:ellipsis;white-space:nowrap;background:white;border:1px solid #909599;border-radius:4px;transition:150ms ease}.has-error.sc-duet-select .duet-select.sc-duet-select{border-color:#de2362 !important}.has-error.sc-duet-select .duet-select.sc-duet-select .duet-select-icon.sc-duet-select{color:#de2362 !important}.duet-theme-turva.has-error.sc-duet-select .duet-select.sc-duet-select{border-color:#e02a0d !important}.duet-theme-turva.has-error.sc-duet-select .duet-select.sc-duet-select .duet-select-icon.sc-duet-select{color:#e02a0d !important}.duet-theme-turva.sc-duet-select .duet-select.sc-duet-select{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a;border-color:#747475}.duet-select.sc-duet-select svg.sc-duet-select{position:absolute;top:50%;right:16px;z-index:200;width:20px;height:20px;color:#00294d;pointer-events:none;transform:translateY(-50%)}.duet-theme-turva.sc-duet-select .duet-select.sc-duet-select svg.sc-duet-select{color:#171c3a}.duet-select-help.sc-duet-select{display:block;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0.875rem;font-weight:400;line-height:1.25;color:#657787;border-radius:4px}.duet-select-help.sc-duet-select span.sc-duet-select{display:block;margin-top:8px}.duet-theme-turva.sc-duet-select .duet-select-help.sc-duet-select{color:#747475}.has-error.sc-duet-select .duet-select-help.sc-duet-select{color:#de2362}.duet-theme-turva.has-error.sc-duet-select .duet-select-help.sc-duet-select{color:#e02a0d}.duet-label-hidden.sc-duet-select duet-label.sc-duet-select{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}";
12585
13281
 
12586
13282
  function isOptionGroup(item) {
12587
13283
  return "options" in item;
@@ -12703,14 +13399,14 @@ class DuetSelect {
12703
13399
  if (this.nativeSelect) {
12704
13400
  this.nativeSelect.value = this.value;
12705
13401
  }
12706
- this.isCaptionVisible = !!(this.caption || (this.placeholder && this.echoPlaceholder && this.value));
13402
+ this.isCaptionVisible = !!this.caption;
12707
13403
  }
12708
13404
  /**
12709
13405
  * Component lifecycle events.
12710
13406
  */
12711
13407
  componentWillLoad() {
12712
13408
  inheritGlobalTheme(this);
12713
- this.isCaptionVisible = !!(this.caption || (this.placeholder && this.echoPlaceholder && this.value));
13409
+ this.isCaptionVisible = !!this.caption;
12714
13410
  this.refresh();
12715
13411
  }
12716
13412
  /**
@@ -12753,7 +13449,7 @@ class DuetSelect {
12753
13449
  "duet-theme-turva": this.theme === "turva",
12754
13450
  "duet-input-top-caption-shown": this.isCaptionVisible,
12755
13451
  "has-error": !!this.error,
12756
- } }, hAsync("duet-label", { theme: this.theme === "turva" ? "turva" : "default", class: { "duet-has-tooltip": !!this.tooltip }, id: this.labelId, for: identifier }, this.label), this.tooltip && (hAsync("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)), this.caption && (hAsync("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)), this.placeholder && this.echoPlaceholder && this.value && (hAsync("duet-caption", { id: this.topCaptionPlaceholderId, size: "small" }, this.placeholder)), hAsync("div", { class: "duet-select-wrapper" }, hAsync("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 }, this.placeholder && (hAsync("option", { disabled: true, selected: true, value: "" }, this.placeholder)), !this.processedItems ? (hAsync("option", null, "Virhe valintoja ladattaessa. P\u00E4ivit\u00E4 sivu ja kokeile uusiksi.")) : (this.processedItems.map(item => {
13452
+ } }, hAsync("duet-label", { theme: this.theme === "turva" ? "turva" : "default", class: { "duet-has-tooltip": !!this.tooltip }, id: this.labelId, for: identifier }, this.label), this.tooltip && (hAsync("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)), this.caption && (hAsync("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)), hAsync("div", { class: "duet-select-wrapper" }, this.placeholder && this.echoPlaceholder && this.value && (hAsync("duet-caption", { id: this.topCaptionPlaceholderId, class: "duet-select-placeholder", size: "small" }, this.placeholder)), hAsync("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 }, this.placeholder && (hAsync("option", { disabled: true, selected: true, value: "" }, this.placeholder)), !this.processedItems ? (hAsync("option", null, "Virhe valintoja ladattaessa. P\u00E4ivit\u00E4 sivu ja kokeile uusiksi.")) : (this.processedItems.map(item => {
12757
13453
  return isOptionGroup(item) ? this.renderOptionGroup(item) : this.renderOption(item);
12758
13454
  }))), hAsync("div", { class: "duet-select", "aria-hidden": "true" }, hAsync("span", { key: this.value }, this.getSelectedItemLabel()), hAsync("svg", { role: "img", class: "duet-select-icon", fill: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, hAsync("path", { d: "m12 18.999c-.4 0-.776-.156-1.059-.438l-10.721-10.72c-.142-.142-.22-.33-.22-.531 0-.2.078-.389.22-.53.142-.142.33-.22.53-.22s.389.078.53.22l10.72 10.719 10.72-10.719c.142-.142.33-.22.53-.22s.389.078.53.22c.142.142.22.33.22.53s-.078.389-.22.53l-10.72 10.72c-.282.283-.659.439-1.06.439z" })))), hAsync("span", { class: "duet-select-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && hAsync("span", null, this.error)))));
12759
13455
  }
@@ -13186,7 +13882,7 @@ class DuetTab {
13186
13882
  }; }
13187
13883
  }
13188
13884
 
13189
- const duetTabGroupCss = "*.sc-duet-tab-group,*.sc-duet-tab-group::after,*.sc-duet-tab-group::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-tab-group-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent;display:block;width:100%}.duet-tab-group-tabs.sc-duet-tab-group{margin-bottom:28px !important;display:block;width:100%;max-width:100%;padding-top:2px;list-style:none}.duet-tab-group-tabs.duet-m-0.sc-duet-tab-group{margin:0 !important}.duet-tab-group-tabs.duet-tab-group-hidden.sc-duet-tab-group{display:none}@media (min-width: 36em){.duet-tab-group-tabs.duet-tab-group-hidden.sc-duet-tab-group{display:block}}.duet-tab-variation-plain.sc-duet-tab-group .duet-tab-group-tabs.sc-duet-tab-group{border-bottom:1px solid #e1e3e6}.duet-theme-turva.duet-tab-variation-plain.sc-duet-tab-group .duet-tab-group-tabs.sc-duet-tab-group{border-bottom-color:#e4e4e6 !important}@media (min-width: 36em){duet-select.sc-duet-tab-group{display:none !important}}.duet-tab-button.sc-duet-tab-group{-webkit-user-select:none;user-select:none;position:relative;z-index:100;display:block;width:100%;padding:20px;margin-top:-2px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:600;line-height:1.1;color:#00294d !important;text-align:left;text-decoration:none;cursor:pointer;background:white;border:2px solid #e1e3e6;border-style:solid;border-radius:0;transition:150ms ease}.duet-tab-button.duet-p-0.sc-duet-tab-group{padding:0 !important}.duet-tab-button.duet-m-0.sc-duet-tab-group{margin:0 !important}.duet-theme-turva.sc-duet-tab-group .duet-tab-button.sc-duet-tab-group{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a !important;border-color:#e4e4e6}.duet-tab-button.duet-p-0.sc-duet-tab-group{padding:0 !important}@media (min-width: 36em){.duet-tab-button.sc-duet-tab-group{display:inline-block;width:auto;margin-left:-2px;border-right:2px solid #e1e3e6;border-radius:0}}.duet-tab-button.sc-duet-tab-group:hover{z-index:200;border-color:#909599}.duet-theme-turva.sc-duet-tab-group .duet-tab-button.sc-duet-tab-group:hover{border-color:#747475 !important}.duet-tab-button.sc-duet-tab-group:active{opacity:0.75;transition:none}.duet-tab-button.selected.sc-duet-tab-group{z-index:201;color:white !important;background:#00294d;border-color:#00294d;outline:0;box-shadow:none !important}.duet-theme-turva.sc-duet-tab-group .duet-tab-button.selected.sc-duet-tab-group{color:white !important;background-color:#444445;border-color:#444445 !important}.duet-tab-button.sc-duet-tab-group:focus{z-index:200;outline:0}.user-is-tabbing.sc-duet-tab-group-h .duet-tab-button.sc-duet-tab-group:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3 !important}.user-is-tabbing.sc-duet-tab-group-h .duet-theme-turva.sc-duet-tab-group .duet-tab-button.sc-duet-tab-group:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a !important}.duet-tab-button.sc-duet-tab-group:first-child{border-top-left-radius:4px;border-top-right-radius:4px}@media (min-width: 36em){.duet-tab-button.sc-duet-tab-group:first-child{border-top-right-radius:0;border-bottom-left-radius:4px}}.duet-tab-button.sc-duet-tab-group:last-child{border-bottom-right-radius:4px;border-bottom-left-radius:4px}@media (min-width: 36em){.duet-tab-button.sc-duet-tab-group:last-child{border-radius:0;border-top-right-radius:4px;border-bottom-right-radius:4px}}.duet-tab-variation-plain.sc-duet-tab-group .duet-tab-button.sc-duet-tab-group{display:inline-block;width:auto;padding-right:0;padding-left:0;border:0;border-radius:0;transition:none}.duet-tab-variation-plain.sc-duet-tab-group .duet-tab-button.sc-duet-tab-group+.duet-tab-button.sc-duet-tab-group{margin-left:36px}.duet-tab-variation-plain.sc-duet-tab-group .duet-tab-button.selected.sc-duet-tab-group{color:#0077b3 !important;background:white;border-bottom:3px solid #0077b3}.duet-theme-turva.duet-tab-variation-plain.sc-duet-tab-group .duet-tab-button.selected.sc-duet-tab-group{color:#c60c30 !important;border-bottom-color:#c60c30 !important}.duet-tab-group-content.sc-duet-tab-group{position:relative;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;line-height:1.5;color:#00294d;text-align:left}.duet-theme-turva.sc-duet-tab-group .duet-tab-group-content.sc-duet-tab-group{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}";
13885
+ const duetTabGroupCss = "*.sc-duet-tab-group,*.sc-duet-tab-group::after,*.sc-duet-tab-group::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-tab-group-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent;display:block;width:100%}.duet-tab-group-tabs.sc-duet-tab-group{margin-bottom:28px !important;display:block;width:100%;max-width:100%;padding-top:2px;list-style:none}.duet-tab-group-tabs.duet-m-0.sc-duet-tab-group{margin:0 !important}.duet-tab-group-tabs.duet-tab-group-hidden.sc-duet-tab-group{display:none}@media (min-width: 36em){.duet-tab-group-tabs.duet-tab-group-hidden.sc-duet-tab-group{display:block}}.duet-tab-variation-plain.sc-duet-tab-group .duet-tab-group-tabs.sc-duet-tab-group{border-bottom:1px solid #e1e3e6}.duet-theme-turva.duet-tab-variation-plain.sc-duet-tab-group .duet-tab-group-tabs.sc-duet-tab-group{border-bottom-color:#e4e4e6 !important}@media (min-width: 36em){duet-select.sc-duet-tab-group{display:none !important}}.duet-tab-button.sc-duet-tab-group{-webkit-user-select:none;user-select:none;position:relative;z-index:100;display:block;width:100%;padding:20px;margin-top:-2px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:600;line-height:1.1;color:#00294d !important;text-align:left;text-decoration:none;cursor:pointer;background:white;border:2px solid #e1e3e6;border-style:solid;border-radius:0;transition:150ms ease}.duet-tab-button.duet-p-0.sc-duet-tab-group{padding:0 !important}.duet-tab-button.duet-m-0.sc-duet-tab-group{margin:0 !important}.duet-theme-turva.sc-duet-tab-group .duet-tab-button.sc-duet-tab-group{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a !important;border-color:#e4e4e6}.duet-tab-button.duet-p-0.sc-duet-tab-group{padding:0 !important}@media (min-width: 36em){.duet-tab-button.sc-duet-tab-group{display:inline-block;width:auto;margin-left:-2px;border-right:2px solid #e1e3e6;border-radius:0}}.duet-tab-button.sc-duet-tab-group:hover{z-index:200;border-color:#909599}.duet-theme-turva.sc-duet-tab-group .duet-tab-button.sc-duet-tab-group:hover{border-color:#747475 !important}.duet-tab-button.sc-duet-tab-group:active{opacity:0.75;transition:none}.duet-tab-button.selected.sc-duet-tab-group{z-index:201;color:white !important;background:#00294d;border-color:#00294d;outline:0;box-shadow:none !important}.duet-theme-turva.sc-duet-tab-group .duet-tab-button.selected.sc-duet-tab-group{color:white !important;background-color:#171c3a;border-color:#171c3a !important}.duet-tab-button.sc-duet-tab-group:focus{z-index:200;outline:0}.user-is-tabbing.sc-duet-tab-group-h .duet-tab-button.sc-duet-tab-group:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3 !important}.user-is-tabbing.sc-duet-tab-group-h .duet-theme-turva.sc-duet-tab-group .duet-tab-button.sc-duet-tab-group:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a !important}.duet-tab-button.sc-duet-tab-group:first-child{border-top-left-radius:4px;border-top-right-radius:4px}@media (min-width: 36em){.duet-tab-button.sc-duet-tab-group:first-child{border-top-right-radius:0;border-bottom-left-radius:4px}}.duet-tab-button.sc-duet-tab-group:last-child{border-bottom-right-radius:4px;border-bottom-left-radius:4px}@media (min-width: 36em){.duet-tab-button.sc-duet-tab-group:last-child{border-radius:0;border-top-right-radius:4px;border-bottom-right-radius:4px}}.duet-tab-variation-plain.sc-duet-tab-group .duet-tab-button.sc-duet-tab-group{display:inline-block;width:auto;padding-right:0;padding-left:0;border:0;border-radius:0;transition:none}.duet-tab-variation-plain.sc-duet-tab-group .duet-tab-button.sc-duet-tab-group+.duet-tab-button.sc-duet-tab-group{margin-left:36px}.duet-tab-variation-plain.sc-duet-tab-group .duet-tab-button.selected.sc-duet-tab-group{color:#0077b3 !important;background:white;border-bottom:3px solid #0077b3}.duet-theme-turva.duet-tab-variation-plain.sc-duet-tab-group .duet-tab-button.selected.sc-duet-tab-group{color:#c60c30 !important;border-bottom-color:#c60c30 !important}.duet-tab-group-content.sc-duet-tab-group{position:relative;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;line-height:1.5;color:#00294d;text-align:left}.duet-theme-turva.sc-duet-tab-group .duet-tab-group-content.sc-duet-tab-group{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}";
13190
13886
 
13191
13887
  class DuetTabGroup {
13192
13888
  constructor(hostRef) {
@@ -13216,14 +13912,19 @@ class DuetTabGroup {
13216
13912
  */
13217
13913
  this.language = getLanguage();
13218
13914
  /**
13219
- * Label for the select element which gets shown on mobile.
13915
+ * Defaults for Label
13220
13916
  * @default {fi: "Valitse", en: "Choose", sv: "Välja"}
13221
13917
  */
13222
- this.label = getLocaleString({
13918
+ this.labelDefaults = {
13223
13919
  fi: "Valitse",
13224
13920
  en: "Choose",
13225
13921
  sv: "Välj",
13226
- }, this.language);
13922
+ };
13923
+ /**
13924
+ * Label for the select element which gets shown on mobile.
13925
+ * @default {fi: "Valitse", en: "Choose", sv: "Välja"}
13926
+ */
13927
+ this.label = getLocaleString(this.labelDefaults, this.language);
13227
13928
  /**
13228
13929
  * Determines whether the label for the select element shown on mobile is visually hidden.
13229
13930
  */
@@ -13365,6 +14066,7 @@ class DuetTabGroup {
13365
14066
  "theme": [1025],
13366
14067
  "variation": [1],
13367
14068
  "language": [1025],
14069
+ "labelDefaults": [1, "label-default"],
13368
14070
  "label": [1],
13369
14071
  "labelHidden": [4, "label-hidden"],
13370
14072
  "margin": [1],
@@ -13508,7 +14210,7 @@ class DuetTable {
13508
14210
  }; }
13509
14211
  }
13510
14212
 
13511
- const duetTextareaCss = "*.sc-duet-textarea,*.sc-duet-textarea::after,*.sc-duet-textarea::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-textarea-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;display:block;width:100%;max-width:100%;text-align:left}.sc-duet-textarea-h:last-child,.sc-duet-textarea-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-textarea-h{width:calc(50% - 16px - 3px)}.duet-expand.sc-duet-textarea-h{width:100% !important}}.duet-m-0.sc-duet-textarea-h{margin:0 !important}duet-tooltip.sc-duet-textarea{position:absolute;top:12px;right:0}@media (min-width: 48em){duet-tooltip.sc-duet-textarea{position:relative;top:4px;right:auto}}.duet-textarea-container.sc-duet-textarea{position:relative;width:100%;height:100%}.duet-textarea-container.sc-duet-textarea .duet-input-top-caption.sc-duet-textarea{display:none}.duet-textarea-container.duet-input-top-caption-shown.sc-duet-textarea .duet-input-top-caption.sc-duet-textarea{display:flex !important}.duet-textarea.sc-duet-textarea{padding:15px !important;position:relative;z-index:100;display:block;width:100%;min-width:8rem;min-height:160px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:1.25;color:#00294d;resize:vertical;background:white;border:1px solid #909599;border-radius:4px;transition:150ms ease}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a;border-color:#747475}.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea{border-color:#de2362 !important}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea{border-color:#e02a0d !important}.duet-textarea.sc-duet-textarea::-webkit-input-placeholder{color:#657787;opacity:1 !important;transition:color 300ms ease}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea::-webkit-input-placeholder{color:#747475}.duet-textarea.sc-duet-textarea:focus::-webkit-input-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus::-webkit-input-placeholder{color:#cfcfd1}.duet-textarea.sc-duet-textarea::-moz-placeholder{color:#657787;opacity:1 !important}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea::-moz-placeholder{color:#747475}.duet-textarea.sc-duet-textarea:focus::-moz-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus::-moz-placeholder{color:#cfcfd1}.duet-textarea.sc-duet-textarea:-ms-input-placeholder{color:#657787}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:-ms-input-placeholder{color:#747475}.duet-textarea.sc-duet-textarea:focus:-ms-input-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus:-ms-input-placeholder{color:#cfcfd1}.duet-textarea[disabled].sc-duet-textarea{color:#657787 !important;cursor:default !important;background:#f5f8fa !important;border-color:#f5f8fa !important}.duet-theme-turva.sc-duet-textarea .duet-textarea[disabled].sc-duet-textarea{color:#747475 !important;background:#f5f5f7 !important;border-color:#f5f5f7 !important}.duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #909599}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #747475}.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #e02a0d}.duet-textarea.sc-duet-textarea:focus{border-color:#0077b3;outline:0;box-shadow:0 0 0 1px #0077b3;transition:none}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus{border-color:#171c3a;box-shadow:0 0 0 1px #171c3a}.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus{box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus{box-shadow:0 0 0 1px #e02a0d}.duet-textarea.sc-duet-textarea:not(:focus):not(:hover):invalid{box-shadow:none}.duet-textarea-help.sc-duet-textarea{font-size:0.875rem;line-height:1.25}.duet-textarea-help.sc-duet-textarea span.sc-duet-textarea{display:block;margin-top:8px}.has-error.sc-duet-textarea .duet-textarea-help.sc-duet-textarea{color:#de2362}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea-help.sc-duet-textarea{color:#e02a0d}.duet-label-hidden.sc-duet-textarea duet-label.sc-duet-textarea{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}.duet-character-count.sc-duet-textarea{display:block;margin:8px 0 0 auto}";
14213
+ const duetTextareaCss = "*.sc-duet-textarea,*.sc-duet-textarea::after,*.sc-duet-textarea::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-textarea-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;display:block;width:100%;max-width:100%;text-align:left}.sc-duet-textarea-h:last-child,.sc-duet-textarea-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-textarea-h{width:calc(50% - 16px - 3px)}.duet-expand.sc-duet-textarea-h{width:100% !important}}.duet-m-0.sc-duet-textarea-h{margin:0 !important}duet-tooltip.sc-duet-textarea{position:absolute;top:12px;right:0}@media (min-width: 48em){duet-tooltip.sc-duet-textarea{position:relative;top:4px;right:auto}}.duet-textarea-container.sc-duet-textarea{position:relative;width:100%;height:100%}.duet-textarea-container.sc-duet-textarea .duet-input-top-caption.sc-duet-textarea{display:none}.duet-textarea-container.duet-input-top-caption-shown.sc-duet-textarea .duet-input-top-caption.sc-duet-textarea{display:flex !important}.duet-textarea-wrapper.sc-duet-textarea{position:relative}.duet-textarea-placeholder.sc-duet-textarea{position:absolute;top:-9px;left:9px;z-index:200;display:block;width:auto;max-width:60%;padding:0 0.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:white}.duet-textarea.sc-duet-textarea{padding:15px !important;position:relative;z-index:100;display:block;width:100%;min-width:8rem;min-height:160px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:1.25;color:#00294d;resize:vertical;background:white;border:1px solid #909599;border-radius:4px;transition:150ms ease}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a;border-color:#747475}.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea{border-color:#de2362 !important}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea{border-color:#e02a0d !important}.duet-textarea.sc-duet-textarea::-webkit-input-placeholder{color:#657787;opacity:1 !important;transition:color 300ms ease}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea::-webkit-input-placeholder{color:#747475}.duet-textarea.sc-duet-textarea:focus::-webkit-input-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus::-webkit-input-placeholder{color:#cfcfd1}.duet-textarea.sc-duet-textarea::-moz-placeholder{color:#657787;opacity:1 !important}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea::-moz-placeholder{color:#747475}.duet-textarea.sc-duet-textarea:focus::-moz-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus::-moz-placeholder{color:#cfcfd1}.duet-textarea.sc-duet-textarea:-ms-input-placeholder{color:#657787}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:-ms-input-placeholder{color:#747475}.duet-textarea.sc-duet-textarea:focus:-ms-input-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus:-ms-input-placeholder{color:#cfcfd1}.duet-textarea[disabled].sc-duet-textarea{color:#657787 !important;cursor:default !important;background:#f5f8fa !important;border-color:#f5f8fa !important}.duet-theme-turva.sc-duet-textarea .duet-textarea[disabled].sc-duet-textarea{color:#747475 !important;background:#f5f5f7 !important;border-color:#f5f5f7 !important}.duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #909599}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #747475}.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:hover:not(:disabled){box-shadow:0 0 0 1px #e02a0d}.duet-textarea.sc-duet-textarea:focus{border-color:#0077b3;outline:0;box-shadow:0 0 0 1px #0077b3;transition:none}.duet-theme-turva.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus{border-color:#171c3a;box-shadow:0 0 0 1px #171c3a}.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus{box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea.sc-duet-textarea:focus{box-shadow:0 0 0 1px #e02a0d}.duet-textarea.sc-duet-textarea:not(:focus):not(:hover):invalid{box-shadow:none}.duet-textarea-help.sc-duet-textarea{font-size:0.875rem;line-height:1.25}.duet-textarea-help.sc-duet-textarea span.sc-duet-textarea{display:block;margin-top:8px}.has-error.sc-duet-textarea .duet-textarea-help.sc-duet-textarea{color:#de2362}.duet-theme-turva.has-error.sc-duet-textarea .duet-textarea-help.sc-duet-textarea{color:#e02a0d}.duet-label-hidden.sc-duet-textarea duet-label.sc-duet-textarea{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}.duet-character-count.sc-duet-textarea{display:block;margin:8px 0 0 auto}";
13512
14214
 
13513
14215
  const CharacterCount = ({ value, maxlength, label, theme }) => {
13514
14216
  if (maxlength == null) {
@@ -13609,7 +14311,7 @@ class DuetTextarea {
13609
14311
  cleanValue(this.nativeInput, this.disallowPatternRegex);
13610
14312
  }
13611
14313
  this.value = this.nativeInput.value;
13612
- this.isCaptionVisible = !!(this.caption || (this.placeholder && this.echoPlaceholder && this.value));
14314
+ this.isCaptionVisible = !!this.caption;
13613
14315
  this.duetInput.emit({
13614
14316
  originalEvent: ev,
13615
14317
  value: this.value,
@@ -13648,7 +14350,7 @@ class DuetTextarea {
13648
14350
  componentWillLoad() {
13649
14351
  inheritGlobalTheme(this);
13650
14352
  this.disallowedPatternChange();
13651
- this.isCaptionVisible = !!(this.caption || (this.placeholder && this.echoPlaceholder && this.value));
14353
+ this.isCaptionVisible = !!this.caption;
13652
14354
  if (this.counter && this.maxlength == null) {
13653
14355
  console.warn("[DUET WARNING]: counter will only take effect if maxlength is set");
13654
14356
  }
@@ -13682,7 +14384,7 @@ class DuetTextarea {
13682
14384
  "duet-label-hidden": this.labelHidden,
13683
14385
  "duet-input-top-caption-shown": this.isCaptionVisible,
13684
14386
  "has-error": !!this.error,
13685
- } }, hAsync("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), this.tooltip && (hAsync("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)), this.caption && (hAsync("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)), this.placeholder && this.echoPlaceholder && this.value && (hAsync("duet-caption", { id: this.topCaptionPlaceholderId, size: "small" }, this.placeholder)), hAsync("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 }), hAsync("duet-grid", { alignment: "stretch" }, hAsync("duet-grid-item", { margin: "none", fill: true }, hAsync("div", { class: "duet-textarea-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && hAsync("span", null, this.error))), hAsync("duet-grid-item", { margin: "none", class: "duet-character-count-caption" }, this.counter && (hAsync(CharacterCount, { theme: this.theme, value: this.value, maxlength: this.maxlength, label: this.counterLabel })))))));
14387
+ } }, hAsync("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), this.tooltip && (hAsync("duet-tooltip", { direction: this.tooltipDirection, accessibleInputLabel: this.label }, this.tooltip)), this.caption && (hAsync("duet-caption", { id: this.topCaptionId, size: "medium" }, this.caption)), hAsync("div", { class: "duet-textarea-wrapper" }, this.placeholder && this.echoPlaceholder && this.value && (hAsync("duet-caption", { id: this.topCaptionPlaceholderId, class: "duet-textarea-placeholder", size: "small" }, this.placeholder)), hAsync("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 })), hAsync("duet-grid", { alignment: "stretch" }, hAsync("duet-grid-item", { margin: "none", fill: true }, hAsync("div", { class: "duet-textarea-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && hAsync("span", null, this.error))), hAsync("duet-grid-item", { margin: "none", class: "duet-character-count-caption" }, this.counter && (hAsync(CharacterCount, { theme: this.theme, value: this.value, maxlength: this.maxlength, label: this.counterLabel })))))));
13686
14388
  }
13687
14389
  get element() { return getElement(this); }
13688
14390
  static get watchers() { return {
@@ -13867,25 +14569,35 @@ class DuetTooltip {
13867
14569
  */
13868
14570
  this.language = getLanguage();
13869
14571
  /**
13870
- * Adds accessible label for the info icon that is only shown for screen
13871
- * readers. This property is always required to create an accessible interface!
14572
+ * Default language strings for the accessibleLabel
13872
14573
  * @default {fi: "Näytä lisätietoja", en: "See more information", sv: "Se mer information"}
13873
14574
  */
13874
- this.accessibleLabel = getLocaleString({
14575
+ this.accessibleLabelDefault = {
13875
14576
  fi: "Näytä lisätietoja",
13876
14577
  en: "Show more information",
13877
14578
  sv: "Visa mer tilläggsuppgifter",
13878
- }, this.language);
14579
+ };
13879
14580
  /**
13880
- * Adds accessible label for the close icon that is only shown for screen
13881
- * readers. This property is always required to create an accessibly interface!
14581
+ * Adds accessible label for the info icon that is only shown for screen
14582
+ * readers. This property is always required to create an accessible interface!
14583
+ * @default {fi: "Näytä lisätietoja", en: "See more information", sv: "Se mer information"}
14584
+ */
14585
+ this.accessibleLabel = getLocaleString(this.accessibleLabelDefault, this.language);
14586
+ /**
14587
+ * Default language strings for the accessibleCloseLabel
13882
14588
  * @default {fi: "Sulje lisätiedot", en: "Close details", sv: "Stäng detaljer"}
13883
14589
  */
13884
- this.accessibleCloseLabel = getLocaleString({
14590
+ this.accessibleCloseLabelDefault = {
13885
14591
  fi: "Sulje lisätiedot",
13886
14592
  en: "Close details",
13887
14593
  sv: "Stäng tilläggsuppgifter",
13888
- }, this.language);
14594
+ };
14595
+ /**
14596
+ * Adds accessible label for the close icon that is only shown for screen
14597
+ * readers. This property is always required to create an accessibly interface!
14598
+ * @default {fi: "Sulje lisätiedot", en: "Close details", sv: "Stäng detaljer"}
14599
+ */
14600
+ this.accessibleCloseLabel = getLocaleString(this.accessibleCloseLabelDefault, this.language);
13889
14601
  /**
13890
14602
  * Label of the tooltip. If used, replaces the accessibleLabel option.
13891
14603
  */
@@ -14058,8 +14770,10 @@ class DuetTooltip {
14058
14770
  "$members$": {
14059
14771
  "theme": [1025],
14060
14772
  "language": [1025],
14773
+ "accessibleLabelDefault": [1, "accessible-label-default"],
14061
14774
  "accessibleLabel": [1, "accessible-label"],
14062
14775
  "accessibleInputLabel": [1, "accessible-input-label"],
14776
+ "accessibleCloseLabelDefault": [1, "accessible-close-label-default"],
14063
14777
  "accessibleCloseLabel": [1, "accessible-close-label"],
14064
14778
  "label": [1],
14065
14779
  "breakpoint": [1],
@@ -14103,25 +14817,35 @@ class DuetTray {
14103
14817
  */
14104
14818
  this.language = getLanguage();
14105
14819
  /**
14106
- * Accessible label that is shown for screen reader users in the expandable
14107
- * close toggle. Not visible for normal users.
14820
+ * Defaults for accessibleCloseLabel
14108
14821
  * @default {fi: "Sulje", en: "Close", sv: "Stänga"}
14109
14822
  */
14110
- this.accessibleCloseLabel = getLocaleString({
14823
+ this.accessibleCloseLabelDefaults = {
14111
14824
  fi: "Sulje",
14112
14825
  en: "Close",
14113
14826
  sv: "Stäng",
14114
- }, this.language);
14827
+ };
14115
14828
  /**
14116
14829
  * Accessible label that is shown for screen reader users in the expandable
14117
- * open toggle. Not visible for normal users.
14830
+ * close toggle. Not visible for normal users.
14831
+ * @default {fi: "Sulje", en: "Close", sv: "Stänga"}
14832
+ */
14833
+ this.accessibleCloseLabel = getLocaleString(this.accessibleCloseLabelDefaults, this.language);
14834
+ /**
14835
+ * Defaults for accessibleOpenLabel
14118
14836
  * @default {fi: "Avaa", en: "Open", sv: "Öppen"}
14119
14837
  */
14120
- this.accessibleOpenLabel = getLocaleString({
14838
+ this.accessibleOpenLabelDefaults = {
14121
14839
  fi: "Avaa",
14122
14840
  en: "Open",
14123
14841
  sv: "Öppna",
14124
- }, this.language);
14842
+ };
14843
+ /**
14844
+ * Accessible label that is shown for screen reader users in the expandable
14845
+ * open toggle. Not visible for normal users.
14846
+ * @default {fi: "Avaa", en: "Open", sv: "Öppen"}
14847
+ */
14848
+ this.accessibleOpenLabel = getLocaleString(this.accessibleOpenLabelDefaults, this.language);
14125
14849
  /**
14126
14850
  * Theme of the info panel.
14127
14851
  */
@@ -14195,7 +14919,9 @@ class DuetTray {
14195
14919
  "$tagName$": "duet-tray",
14196
14920
  "$members$": {
14197
14921
  "language": [1025],
14922
+ "accessibleCloseLabelDefaults": [1, "accessible-close-label-default"],
14198
14923
  "accessibleCloseLabel": [1, "accessible-close-label"],
14924
+ "accessibleOpenLabelDefaults": [1, "accessible-open-label-default"],
14199
14925
  "accessibleOpenLabel": [1, "accessible-open-label"],
14200
14926
  "theme": [1025],
14201
14927
  "active": [516],
@@ -14210,178 +14936,122 @@ class DuetTray {
14210
14936
  }; }
14211
14937
  }
14212
14938
 
14213
- const formatBytes = (bytes, decimals = 2) => {
14214
- if (bytes === 0) {
14215
- return "0 Bytes";
14216
- }
14217
- const k = 1024;
14218
- const dm = decimals < 0 ? 0 : decimals;
14219
- const sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
14220
- const i = Math.floor(Math.log(bytes) / Math.log(k));
14221
- return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + " " + sizes[i];
14222
- };
14223
-
14224
- const DuetUploadFileList = ({ data, onDelete, onCancel, getError }) => {
14225
- if (data.invalid.length === 0 && data.valid.length === 0) {
14226
- return;
14227
- }
14228
- return (hAsync("ol", { class: "duet-upload-filelist" },
14229
- data.valid.length !== 0 && (hAsync("li", null,
14230
- hAsync("duet-visually-hidden", null, "Files"),
14231
- hAsync("ul", null, data.valid.length !== 0 &&
14232
- data.valid.map(e => (hAsync("li", { class: "duet-upload-file" },
14233
- hAsync("div", { class: "duet-upload-file-container" },
14234
- hAsync("div", { class: "duet-upload-file-link" }, e.url ? (hAsync("duet-button", { variation: "plain", icon: "messaging-attachment", url: e.url },
14235
- e.item.name,
14236
- " (",
14237
- formatBytes(e.item.size),
14238
- ")")) : (`${e.item.name} (${formatBytes(e.item.size)})`)),
14239
- hAsync("ul", { class: "duet-upload-file-actions", role: "menubar", "aria-label": "file actions" },
14240
- e.progress < 100 && (hAsync("li", { role: "none" },
14241
- hAsync("duet-button", { role: "menuitem", variation: "plain", icon: "messaging-declined", "icon-only": true, "icon-size": "large", margin: "none", onClick: ev => onCancel(e.item.name, ev) }))),
14242
- e.progress === 100 && (hAsync("li", { role: "none" },
14243
- hAsync("duet-button", { role: "menuitem", variation: "destructive", icon: "action-delete", "icon-only": true, "icon-size": "large", margin: "none", onClick: ev => onDelete(e.item.name, ev) }))))),
14244
- e.progress < 100 && (hAsync("div", { class: "duet-upload-file-progress" },
14245
- hAsync("progress", { value: e.progress, max: "100" },
14246
- hAsync("div", { class: "progress-bar" },
14247
- hAsync("span", { style: { width: `${e.progress}%;` } },
14248
- "Progress: ",
14249
- e.progress,
14250
- "%"))))))))))),
14251
- data.invalid.length !== 0 && (hAsync("li", null,
14252
- hAsync("duet-visually-hidden", null, "Files with Errors"),
14253
- hAsync("ul", null, data.invalid.map(e => {
14254
- return (hAsync("li", { class: "duet-upload-file duet-upload-file-errors" },
14255
- hAsync("div", { class: "duet-upload-file-container" },
14256
- hAsync("div", { class: "duet-upload-file-link duet-upload-file-link-error" },
14257
- hAsync("div", null,
14258
- e.item.name,
14259
- " (",
14260
- formatBytes(e.item.size),
14261
- ")"),
14262
- hAsync("div", { "data-error-type": e.error.type, "data-error-message": e.error.system_message }, getError(e.error.type))),
14263
- hAsync("ul", { class: "duet-upload-file-actions", role: "menubar", "aria-label": "file actions" },
14264
- hAsync("li", { role: "none" },
14265
- hAsync("duet-button", { role: "menuitem", variation: "destructive", icon: "action-delete", "icon-only": true, "icon-size": "large", margin: "none", onClick: ev => onDelete(e.item.name, ev) }))))));
14266
- }))))));
14267
- };
14268
-
14269
- var errorcodes = [
14939
+ var errorCodes = [
14270
14940
  {
14271
14941
  type: "default",
14272
14942
  system_message: "unknown error",
14273
14943
  message: {
14274
- fi: "",
14275
- sv: "",
14276
- en: "An unknown error occured, please try again"
14944
+ fi: "Tapahtui tuntematon virhe, ole hyvä ja yritä uudelleen.",
14945
+ sv: "Ett okänt fel uppstod, försök igen.",
14946
+ en: "An unknown error occured, please try again."
14277
14947
  }
14278
14948
  },
14279
14949
  {
14280
14950
  type: "400",
14281
14951
  system_message: "Bad Request: The server could not understand the request due to invalid syntax.",
14282
14952
  message: {
14283
- fi: "",
14284
- sv: "",
14285
- en: "The server rejected your file"
14953
+ fi: "Tiedostoa ei hyväksytty.",
14954
+ sv: "Servern avvisade din fil.",
14955
+ en: "The server rejected your file."
14286
14956
  }
14287
14957
  },
14288
14958
  {
14289
14959
  type: "401",
14290
- system_message: "Not Authenticated: The client must authenticate itself to get the requested response..",
14960
+ system_message: "Not Authenticated: The client must authenticate itself to get the requested response...",
14291
14961
  message: {
14292
- fi: "",
14293
- sv: "",
14294
- en: "You need to be logged in to upload files"
14962
+ fi: "Vain kirjautunut käyttäjä voi lähettää tiedostoja.",
14963
+ sv: "Du måste vara inloggad för att ladda upp filer.",
14964
+ en: "You need to be logged in to upload files."
14295
14965
  }
14296
14966
  },
14297
14967
  {
14298
14968
  type: "403",
14299
- system_message: "No Access: The client does not have access rights to the content;",
14969
+ system_message: "No Access: The client does not have access rights to the content.",
14300
14970
  message: {
14301
- fi: "",
14302
- sv: "",
14303
- en: "You do not have the correct access rights to upload files"
14971
+ fi: "Ei oikeuksia lähettää tiedostoja.",
14972
+ sv: "Du har inte rätt åtkomsträttigheter för att ladda upp filer.",
14973
+ en: "You do not have the correct access rights to upload files."
14304
14974
  }
14305
14975
  },
14306
14976
  {
14307
14977
  type: "413",
14308
14978
  system_message: "Payload too large",
14309
14979
  message: {
14310
- fi: "",
14311
- sv: "",
14312
- en: "The file was to large for the server to handle"
14980
+ fi: "Tiedosto oli liian vastaanotettavaksi.",
14981
+ sv: "Filen var för stor för servern att hantera.",
14982
+ en: "The file was to large for the server to handle."
14313
14983
  }
14314
14984
  },
14315
14985
  {
14316
14986
  type: "415",
14317
14987
  system_message: "Unsupported media type",
14318
14988
  message: {
14319
- fi: "",
14320
- sv: "",
14321
- en: "The server rejected the file because it had the wrong type"
14989
+ fi: "Tiedoston tyyppi oli väärä.",
14990
+ sv: "Servern avvisade filen eftersom den hade fel typ.",
14991
+ en: "The server rejected the file because it had the wrong type."
14322
14992
  }
14323
14993
  },
14324
14994
  {
14325
14995
  type: "429",
14326
14996
  system_message: "Too many request from same address",
14327
14997
  message: {
14328
- fi: "",
14329
- sv: "",
14330
- en: "The server has received to many request from you, please try again later"
14998
+ fi: "Liian monta yritystä, ole hyvä ja yritä myöhemmin uudelleen.",
14999
+ sv: "Servern har fått många förfrågningar från dig, försök igen senare.",
15000
+ en: "The server has received to many request from you, please try again later."
14331
15001
  }
14332
15002
  },
14333
15003
  {
14334
15004
  type: "500",
14335
15005
  system_message: "Internal Server Error",
14336
15006
  message: {
14337
- fi: "",
14338
- sv: "",
14339
- en: "The server reported an unknown error and the upload failed"
15007
+ fi: "Palvelin ilmoitti tuntemattomasta virheestä ja lataus epäonnistui.",
15008
+ sv: "Servern rapporterade ett okänt fel och uppladdningen misslyckades.",
15009
+ en: "The server reported an unknown error and the upload failed."
14340
15010
  }
14341
15011
  },
14342
15012
  {
14343
15013
  type: "duet-upload-100",
14344
15014
  system_message: "File extension not allowed",
14345
15015
  message: {
14346
- fi: "",
14347
- sv: "",
14348
- en: "You cannot upload files with that extension"
15016
+ fi: "Tiedoston tyyppi ei ole sallittu.",
15017
+ sv: "Du kan inte ladda upp filer av den type.",
15018
+ en: "You cannot upload files with that extension."
14349
15019
  }
14350
15020
  },
14351
15021
  {
14352
15022
  type: "duet-upload-001",
14353
15023
  system_message: "File transfer failed",
14354
15024
  message: {
14355
- fi: "",
14356
- sv: "",
14357
- en: "Your connection to the server was interrupted, try again"
15025
+ fi: "Tiedoston lähetys keskeytyi, ole hyvä ja yritä uudelleen.",
15026
+ sv: "Din anslutning till servern avbröts, försök igen.",
15027
+ en: "Your connection to the server was interrupted, try again."
14358
15028
  }
14359
15029
  },
14360
15030
  {
14361
15031
  type: "duet-upload-101",
14362
15032
  system_message: "File mimetype not allowed",
14363
15033
  message: {
14364
- fi: "",
14365
- sv: "",
14366
- en: "You cannot upload files of that type"
15034
+ fi: "Tiedoston tyyppi ei ole sallittu.",
15035
+ sv: "Du kan inte ladda upp filer av den typ.",
15036
+ en: "You cannot upload files of that type."
14367
15037
  }
14368
15038
  },
14369
15039
  {
14370
15040
  type: "duet-upload-201",
14371
15041
  system_message: "File is too large",
14372
15042
  message: {
14373
- fi: "",
14374
- sv: "",
14375
- en: "The file is larger than permitted"
15043
+ fi: "Tiedosto on liian iso.",
15044
+ sv: "Filen är större än tillåtet.",
15045
+ en: "The file is larger than permitted."
14376
15046
  }
14377
15047
  },
14378
15048
  {
14379
15049
  type: "duet-upload-202",
14380
15050
  system_message: "The combined size of all files is too large",
14381
15051
  message: {
14382
- fi: "",
14383
- sv: "",
14384
- en: "You have reached the maximum combined filesize"
15052
+ fi: "Tiedostojen yhteenlaskettu koko on liian iso.",
15053
+ sv: "Du har nått den maximala kombinerade filstorleken.",
15054
+ en: "You have reached the maximum combined filesize."
14385
15055
  }
14386
15056
  },
14387
15057
  {
@@ -14389,7 +15059,7 @@ var errorcodes = [
14389
15059
  system_message: "The maximum file limit has been reached",
14390
15060
  message: {
14391
15061
  fi: "Liitteiden maksimimäärä saavutettu.",
14392
- sv: "",
15062
+ sv: "Maximalt antal bilagor har uppnåtts.",
14393
15063
  en: "Maximum number of attachments reached."
14394
15064
  }
14395
15065
  }
@@ -14401,16 +15071,81 @@ const getError = (code) => {
14401
15071
  system_message: undefined,
14402
15072
  message: undefined,
14403
15073
  };
14404
- error = errorcodes.filter(errorItem => {
14405
- return errorItem.type === code;
15074
+ error = errorCodes.filter(errorItem => {
15075
+ // the == is intentional we may be comparing numbers to strings - and that is ok here
15076
+ return errorItem.type == code;
14406
15077
  })[0];
14407
15078
  if (!error) {
14408
- error = errorcodes.filter(errorItem => {
15079
+ error = errorCodes.filter(errorItem => {
14409
15080
  return errorItem.type === "default";
14410
15081
  })[0];
14411
15082
  }
14412
15083
  return error;
14413
15084
  };
15085
+ const getI18nError = (errorCode) => {
15086
+ const errorFromJson = getError(errorCode);
15087
+ const i18String = getLocaleString(errorFromJson.message);
15088
+ if (i18String === "" || !i18String) {
15089
+ return errorFromJson.system_message;
15090
+ }
15091
+ else {
15092
+ return i18String;
15093
+ }
15094
+ };
15095
+
15096
+ const ErrorItem = ({ data }) => {
15097
+ const { item, error } = data;
15098
+ const { name } = item;
15099
+ const { type } = error;
15100
+ return (hAsync("span", { class: "duet-upload-item-error", role: "status" },
15101
+ hAsync("duet-paragraph", { class: "duet-upload-item-name", color: "danger", margin: "none", weight: "semi-bold" },
15102
+ hAsync("duet-icon", { margin: "none", size: "xx-small", name: "messaging-attachment" }),
15103
+ " ",
15104
+ name),
15105
+ hAsync("duet-paragraph", { class: "duet-upload-item-error-label", size: "small", margin: "none", color: "danger" }, getI18nError(type))));
15106
+ };
15107
+
15108
+ const ProgressItem = ({ progress, name }) => (hAsync("span", null,
15109
+ hAsync("duet-paragraph", { color: "secondary", margin: "none", size: "small" }, name),
15110
+ hAsync("duet-spacer", { size: "xx-small" }),
15111
+ hAsync("duet-progress", { progress: Math.ceil(progress), "aria-hidden": true })));
15112
+
15113
+ const formatBytes = (bytes, decimals = 2) => {
15114
+ if (bytes === 0) {
15115
+ return "0 Bytes";
15116
+ }
15117
+ const k = 1024;
15118
+ const dm = decimals < 0 ? 0 : decimals;
15119
+ const sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
15120
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
15121
+ return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + " " + sizes[i];
15122
+ };
15123
+
15124
+ const SuccessItem = ({ data, showLinks }) => {
15125
+ const { item, size, uploaded, url, meta } = data;
15126
+ const { name } = item;
15127
+ const ContentName = (hAsync("span", { class: "duet-upload-item-name" },
15128
+ hAsync("duet-icon", { margin: "none", size: "xx-small", name: "messaging-attachment" }),
15129
+ hAsync("duet-spacer", { size: "xx-small", direction: "horizontal" }),
15130
+ name));
15131
+ const SizeText = (hAsync("span", { class: "duet-upload-item-size", style: { fontSize: "14px", fontWeight: "400" } },
15132
+ "(",
15133
+ formatBytes(size),
15134
+ ")"));
15135
+ const FilenameLine = uploaded && url && showLinks ? (hAsync("duet-paragraph", { color: "secondary", margin: "none", weight: "semi-bold" },
15136
+ hAsync("duet-link", { url: url, external: true }, ContentName),
15137
+ hAsync("duet-spacer", { size: "xx-small", direction: "horizontal" }),
15138
+ SizeText)) : (hAsync("duet-paragraph", { color: "secondary", margin: "none", weight: "semi-bold" },
15139
+ ContentName,
15140
+ hAsync("duet-spacer", { size: "xx-small", direction: "horizontal" }),
15141
+ SizeText));
15142
+ const Badges = meta && meta.badges ? (hAsync("span", null,
15143
+ hAsync("duet-spacer", { size: "xx-small" }),
15144
+ meta.badges.map(badgeText => (hAsync("duet-badge", { color: "primary" }, badgeText))))) : undefined;
15145
+ return (hAsync("span", { class: "duet-upload-item-success" },
15146
+ hAsync("div", null, FilenameLine),
15147
+ Badges));
15148
+ };
14414
15149
 
14415
15150
  const validateFileExtension = (name, allowedExtensions) => {
14416
15151
  if (!allowedExtensions) {
@@ -14501,12 +15236,8 @@ const validateTotalAmountIsAboveMax = (filelist, maxFiles) => {
14501
15236
  return false;
14502
15237
  };
14503
15238
 
14504
- const makeXhrRequest = (payload, options, onFailure, onSuccess, onProgress) => {
14505
- const { type, xhr, uri, argument, headers } = Object.assign({
14506
- type: "POST",
14507
- argument: null,
14508
- headers: null,
14509
- }, options);
15239
+ const makeXhrRequest = ({ payload, options, onFailure, onSuccess, onProgress }) => {
15240
+ const { type = "POST", xhr, uri, argument = null, headers = null } = options;
14510
15241
  xhr.open(type, `${uri}${argument || ""}`, true);
14511
15242
  const { data, name } = payload;
14512
15243
  // headers must be added after open
@@ -14533,12 +15264,12 @@ const makeXhrRequest = (payload, options, onFailure, onSuccess, onProgress) => {
14533
15264
  return xhr;
14534
15265
  };
14535
15266
 
14536
- const duetUploadCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-upload,*.sc-duet-upload::after,*.sc-duet-upload::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-upload-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host li*/.sc-duet-upload-h li.sc-duet-upload{list-style:none}/*!@.duet-upload*/.duet-upload.sc-duet-upload{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@.duet-upload li*/.duet-upload.sc-duet-upload li.sc-duet-upload{list-style:none}/*!@.duet-upload-file-errors*/.duet-upload-file-errors.sc-duet-upload{padding:20px 0;color:#de2362}/*!@.duet-upload-filelist*/.duet-upload-filelist.sc-duet-upload{margin-bottom:25px}/*!@.duet-upload-filelist-empty*/.duet-upload-filelist-empty.sc-duet-upload{display:flex;align-items:center;justify-content:center;width:100%;height:75px;margin:0 auto;background-color:#f3f9fc}/*!@.duet-upload-file*/.duet-upload-file.sc-duet-upload{display:flex;flex-flow:column;justify-content:center;min-height:50px;border-bottom:1px solid #e1e3e6}/*!@.duet-upload-file:first-of-type:not(.duet-upload-file-errors)*/.duet-upload-file.sc-duet-upload:first-of-type:not(.duet-upload-file-errors){border-top:1px solid #e1e3e6}/*!@.duet-upload-file-container*/.duet-upload-file-container.sc-duet-upload{display:flex;place-items:center;width:100%}/*!@.duet-upload-file-link*/.duet-upload-file-link.sc-duet-upload{display:flex;flex-grow:2;place-items:center}/*!@.duet-upload-file-link-error*/.duet-upload-file-link-error.sc-duet-upload{flex-direction:column;place-items:flex-start}/*!@.duet-upload-file-link duet-button*/.duet-upload-file-link.sc-duet-upload duet-button.sc-duet-upload{position:relative;top:6px}/*!@.duet-upload-file-actions*/.duet-upload-file-actions.sc-duet-upload{display:flex;transform:scale(0.8)}/*!@.duet-upload-file-progress*//*!@.duet-upload-file-progress .progress-bar*/.duet-upload-file-progress.sc-duet-upload .progress-bar.sc-duet-upload{position:relative;display:block;width:100%;height:15px;background-color:#f3f9fc;border-radius:0;box-shadow:none}/*!@.duet-upload-file-progress .progress-bar > span*/.duet-upload-file-progress.sc-duet-upload .progress-bar.sc-duet-upload>span.sc-duet-upload{display:block;text-indent:-9999px;background-color:#0077b3;border-radius:0}/*!@.duet-upload-file-progress progress[value]*/.duet-upload-file-progress.sc-duet-upload progress[value].sc-duet-upload{display:flex;width:100%;height:15px;color:#0077b3;border:0 none;-webkit-appearance:none;-moz-appearance:none;appearance:none}/*!@.duet-upload-file-progress progress[value]::-webkit-progress-bar*/.duet-upload-file-progress.sc-duet-upload progress[value].sc-duet-upload::-webkit-progress-bar{background-color:#f3f9fc;border-radius:0}/*!@.duet-upload-file-progress progress[value]::-webkit-progress-value*/.duet-upload-file-progress.sc-duet-upload progress[value].sc-duet-upload::-webkit-progress-value{background-color:#0077b3;background-size:35px 20px, 100% 100%, 100% 100%;border-radius:0;-webkit-animation:animate-stripes 5s linear infinite;animation:animate-stripes 5s linear infinite}/*!@.duet-upload-file-progress progress[value] ::-moz-progress-bar*/.duet-upload-file-progress.sc-duet-upload progress[value].sc-duet-upload .sc-duet-upload::-moz-progress-bar{background-color:#f3f9fc}";
15267
+ const duetUploadCss = "/*!@*,\n*::after,\n*::before*/*.sc-duet-upload,*.sc-duet-upload::after,*.sc-duet-upload::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@:host*/.sc-duet-upload-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@::slotted([slot=header])*/.sc-duet-upload-s>[slot=header]{margin-bottom:16px}/*!@::slotted([slot=fileheader])*/.sc-duet-upload-s>[slot=fileheader]{margin:16px 0 0 0}/*!@::slotted([slot=filefooter])*/.sc-duet-upload-s>[slot=filefooter]{margin-top:16px}/*!@.duet-upload*/.duet-upload.sc-duet-upload{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}/*!@.duet-upload-item-size*/.duet-upload-item-size.sc-duet-upload{font-size:0.75rem;font-weight:400}/*!@.duet-upload-filelist*/.duet-upload-filelist.sc-duet-upload{margin-bottom:25px}/*!@.duet-upload-filelist-empty*/.duet-upload-filelist-empty.sc-duet-upload{display:flex;align-items:center;justify-content:center;width:100%;height:75px;margin:0 auto;font-size:1rem;font-weight:400;background-color:#f5f8fa}";
14537
15268
 
14538
15269
  /**
14539
15270
  * @slot header - named slot - to place content after description / caption
14540
- * @slot fileheader - named slot - to place content above filelist (only displayed when filelist contains items)
14541
- * @slot filefooter - named slot - to place content below filelist (only displayed when filelist contains items)
15271
+ * @slot fileheader - named slot - to place content above "filelist" (only displayed when "filelist" contains items)
15272
+ * @slot filefooter - named slot - to place content below "filelist" (only displayed when "filelist" contains items)
14542
15273
  */
14543
15274
  class DuetUpload {
14544
15275
  constructor(hostRef) {
@@ -14558,9 +15289,19 @@ class DuetUpload {
14558
15289
  this.buttonId = createID("DuetButton");
14559
15290
  this.labelId = createID("DuetLabel");
14560
15291
  this.uploadId = createID("DuetUpload");
15292
+ this.editableTableId = createID("DuetEditableTable");
14561
15293
  this.filesInProgress = new Map();
14562
15294
  this.fileMaxReached = false;
14563
15295
  this.bytesMaxReached = false;
15296
+ this.internalStatusMessageLabel = undefined;
15297
+ /**
15298
+ * Properties
15299
+ */
15300
+ this.DefaultGroups = {
15301
+ inprogress: "inprogress",
15302
+ success: "success",
15303
+ failure: "failure",
15304
+ };
14564
15305
  /**
14565
15306
  * State() variables
14566
15307
  */
@@ -14571,8 +15312,115 @@ class DuetUpload {
14571
15312
  */
14572
15313
  this.external = false;
14573
15314
  /**
14574
- * Property to change descriptionDefaults defaults on the component.
14575
- * normally you would handle these strings on an application level and override @label when needed
15315
+ * If set the upload component will not display an upload button, you will have to create one yourself
15316
+ * and call the exposed method startUpload
15317
+ */
15318
+ this.hideButton = false;
15319
+ /**
15320
+ * Default actions added to the internally used duet-editable-table
15321
+ */
15322
+ this.actions = [
15323
+ {
15324
+ icon: "action-delete",
15325
+ color: "color-danger",
15326
+ color_hover: "category-home",
15327
+ id: "delete",
15328
+ map: ["success", "failure"],
15329
+ label: {
15330
+ fi: "Poista tiedosto",
15331
+ en: "Poista tiedosto",
15332
+ sv: "Ta bort filen",
15333
+ },
15334
+ },
15335
+ {
15336
+ icon: "navigation-close",
15337
+ color: "primary",
15338
+ color_hover: "category-home",
15339
+ id: "cancel",
15340
+ map: ["inprogress"],
15341
+ label: {
15342
+ fi: "Keskeytä lähetys",
15343
+ en: "Cancel the upload",
15344
+ sv: "Stop överföringen",
15345
+ },
15346
+ },
15347
+ ];
15348
+ /**
15349
+ * If enabled the editable-table will display links on successfully uploaded items,
15350
+ * this requires the server can respond with link URIs in the correct format
15351
+ * and that the files are accessible to the user
15352
+ */
15353
+ this.showLinks = false;
15354
+ /**
15355
+ * Property to change the aria upload progress text read aloud by screenreaders
15356
+ * @default {
15357
+ * fi: {
15358
+ * inProgress: "Lähetetään {filesUploaded} lähetettävästä {filesTotal} tiedostosta",
15359
+ * inProgressWithErrors:
15360
+ * "Lähetetään {filesInProgress} tiedostoa, lähetetty {filesUploaded} lähetettävästä {filesTotal} tiedostosta, {filesWithErrors} tiedostossa on virheitä",
15361
+ * done: "Kaikki {filesTotal} tiedostoa lähetetty onnistuneesti",
15362
+ * doneWithErrors:
15363
+ * "Lähetys valmis, {filesUploaded} tiedostoa on lähetetty onnistuneesti, {filesWithErrors} tiedostossa oli virheitä",
15364
+ * files: "tiedostot",
15365
+ * file: "tiedosto",
15366
+ * },
15367
+ * sv: {
15368
+ * inProgress: "Adding {filesUploaded} of {filesTotal}",
15369
+ * inProgressWithErrors:
15370
+ * "Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",
15371
+ * done: "Alla {filesTotal} har lagts till",
15372
+ * doneWithErrors: "Handling slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",
15373
+ * files: "filer",
15374
+ * file: "fil",
15375
+ * },
15376
+ * en: {
15377
+ * inProgress: "Adding {filesUploaded} of {filesTotal}",
15378
+ * inProgressWithErrors:
15379
+ * "Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",
15380
+ * done: "All {filesTotal} added successfully",
15381
+ * doneWithErrors: "Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors",
15382
+ * files: "tiedostoa",
15383
+ * file: "tiedosto",
15384
+ * },
15385
+ * }
15386
+ */
15387
+ this.statusLabelDefaults = {
15388
+ fi: {
15389
+ inProgress: "Lähetetään {filesUploaded} lähetettävästä {filesTotal} tiedostosta",
15390
+ inProgressWithErrors: "Lähetetään {filesInProgress} tiedostoa, lähetetty {filesUploaded} lähetettävästä {filesTotal} tiedostosta, {filesWithErrors} tiedostossa on virheitä",
15391
+ done: "Kaikki {filesTotal} tiedostoa lähetetty onnistuneesti",
15392
+ doneWithErrors: "Lähetys valmis, {filesUploaded} tiedostoa on lähetetty onnistuneesti, {filesWithErrors} tiedostossa oli virheitä",
15393
+ files: "tiedostot",
15394
+ file: "tiedosto",
15395
+ },
15396
+ sv: {
15397
+ inProgress: "Adding {filesUploaded} of {filesTotal}",
15398
+ inProgressWithErrors: "Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",
15399
+ done: "Alla {filesTotal} har lagts till",
15400
+ doneWithErrors: "Handling slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",
15401
+ files: "filer",
15402
+ file: "fil",
15403
+ },
15404
+ en: {
15405
+ inProgress: "Adding {filesUploaded} of {filesTotal}",
15406
+ inProgressWithErrors: "Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",
15407
+ done: "All {filesTotal} added successfully",
15408
+ doneWithErrors: "Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors",
15409
+ files: "tiedostoa",
15410
+ file: "tiedosto",
15411
+ },
15412
+ };
15413
+ /**
15414
+ * Strings used for the status aria-label
15415
+ */
15416
+ this.statusMessageLabel = getLocaleString(this.statusLabelDefaults);
15417
+ /**
15418
+ * Property to change button label defaults on the component.
15419
+ * @default {
15420
+ fi: "Lisää liite",
15421
+ sv: "Lägg till en bilaga",
15422
+ en: "Add an attachment",
15423
+ }
14576
15424
  */
14577
15425
  this.buttonLabelDefaults = {
14578
15426
  fi: "Lisää liite",
@@ -14585,7 +15433,7 @@ class DuetUpload {
14585
15433
  */
14586
15434
  this.buttonLabel = getLocaleString(this.buttonLabelDefaults);
14587
15435
  /**
14588
- * accessible Label of button
15436
+ * accessible aria-Label of button
14589
15437
  */
14590
15438
  this.accessibleButtonLabel = undefined;
14591
15439
  /**
@@ -14608,17 +15456,22 @@ class DuetUpload {
14608
15456
  * browser from displaying its own validation errors.
14609
15457
  */
14610
15458
  this.required = false;
15459
+ /**
15460
+ * Visually hides the groups labels in the editable table list used to display the list of files
15461
+ */
15462
+ this.hideGroups = false;
14611
15463
  /**
14612
15464
  * Map of string that contain list of uploaded files.
14613
15465
  */
14614
15466
  this.files = new Map();
14615
15467
  /**
14616
- * Property to read if filelist contains errors or not
15468
+ * Property to read if the internally used editable-table contains errors or not
14617
15469
  */
14618
15470
  this.valid = !this.required;
14619
15471
  /**
14620
15472
  * Property to change labelDefaults defaults on the component.
14621
15473
  * normally you would handle these strings on an application level and override @label when needed
15474
+ * @default { fi: "Lisää liite",sv: "Lägg till en bilaga",en: "Add attachments"}
14622
15475
  */
14623
15476
  this.labelDefaults = {
14624
15477
  fi: "Lisää liite",
@@ -14632,7 +15485,11 @@ class DuetUpload {
14632
15485
  this.label = getLocaleString(this.labelDefaults);
14633
15486
  /**
14634
15487
  * Property to change descriptionDefaults defaults on the component.
14635
- * normally you would handle these strings on an application level and override @label when needed
15488
+ * @default {
15489
+ fi: "Voit liittää {filetypes}-muotoisia tiedostoja sekä yleisimpiä videotiedostoja. Voit lähettää {maxbytes} verran tiedostoja yhdellä kertaa, ja lisätä enintään {maxfiles} liitettä kerrallaan.",
15490
+ sv: "Du kan bifoga filer i flg. formater {filetypes} samt de vanligaste videofilerna. Du kan ladda upp {maxbytes} filer åt gången och lägga till upp till {maxfiles} bilagor åt gången.",
15491
+ en: "You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytes} of files at a time, and add up to {maxfiles} attachments at a time.",
15492
+ }
14636
15493
  */
14637
15494
  this.descriptionDefaults = {
14638
15495
  fi: "Voit liittää {filetypes}-muotoisia tiedostoja sekä yleisimpiä videotiedostoja. Voit lähettää {maxbytes} verran tiedostoja yhdellä kertaa, ja lisätä enintään {maxfiles} liitettä kerrallaan.",
@@ -14641,12 +15498,20 @@ class DuetUpload {
14641
15498
  };
14642
15499
  /**
14643
15500
  * Description for the upload component.
14644
- * @default ...
15501
+ * @default {
15502
+ fi: "Voit liittää {filetypes}-muotoisia tiedostoja sekä yleisimpiä videotiedostoja. Voit lähettää {maxbytes} verran tiedostoja yhdellä kertaa, ja lisätä enintään {maxfiles} liitettä kerrallaan.",
15503
+ sv: "Du kan bifoga filer i flg. formater {filetypes} samt de vanligaste videofilerna. Du kan ladda upp {maxbytes} filer åt gången och lägga till upp till {maxfiles} bilagor åt gången.",
15504
+ en: "You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytes} of files at a time, and add up to {maxfiles} attachments at a time.",
15505
+ }
14645
15506
  */
14646
15507
  this.description = getLocaleString(this.descriptionDefaults);
14647
15508
  /**
14648
15509
  * Defaults for the filelist's empty state.
14649
- * @default { fi: "Lisää liite",sv: "Lägg till en bilaga",en: "Add attachments"}
15510
+ * @default {
15511
+ fi: "Ei vielä lisättyjä tiedostoja.",
15512
+ sv: "Inga filer har lagts till ännu.",
15513
+ en: "No files added yet.",
15514
+ }
14650
15515
  */
14651
15516
  this.fileListEmptyDefaults = {
14652
15517
  fi: "Ei vielä lisättyjä tiedostoja.",
@@ -14662,21 +15527,6 @@ class DuetUpload {
14662
15527
  * Display the input in error state along with an error message.
14663
15528
  */
14664
15529
  this.error = "";
14665
- /**
14666
- * Visually hide the label, but still show it to screen readers.
14667
- */
14668
- this.labelHidden = false;
14669
- /**
14670
- * if set, allows capture of media from user camera / microphone
14671
- * The capture attribute value is a string that specifies which camera to use for capture
14672
- * of image or video data, if the accept attribute indicates that the input should be of
14673
- * one of those types. A value of user indicates that the user-facing camera and/or
14674
- * microphone should be used. A value of environment specifies that the outward-facing
14675
- * camera and/or microphone should be used. If this attribute is missing, the user agent
14676
- * is free to decide on its own what to do. If the requested facing mode isn't available,
14677
- * the user agent may fall back to its preferred default mode.
14678
- */
14679
- this.capture = undefined;
14680
15530
  /**
14681
15531
  * Use maxBytes to specify the maximum size in Bytes of a file that can be uploaded.
14682
15532
  */
@@ -14711,7 +15561,90 @@ class DuetUpload {
14711
15561
  /**
14712
15562
  * Private functions
14713
15563
  */
14714
- this.kick = () => (this.tick = Date.now()); // will trigger re-render
15564
+ this.listenForActionEvents = () => {
15565
+ this.element.addEventListener("duetEditableItemAction", (e) => {
15566
+ const detail = e.detail;
15567
+ const { action, keyName, originalEvent } = detail;
15568
+ switch (action) {
15569
+ case "delete":
15570
+ this.onDelete(keyName, originalEvent);
15571
+ break;
15572
+ case "cancel":
15573
+ this.onCancel(keyName, originalEvent);
15574
+ break;
15575
+ // code block
15576
+ }
15577
+ });
15578
+ };
15579
+ this.verifyValidity = () => {
15580
+ const { invalid, valid } = this.getFilesAsArray();
15581
+ const oldValid = this.valid;
15582
+ this.valid = invalid.length === 0 && valid.length !== 0;
15583
+ if (this.valid !== oldValid) {
15584
+ this.duetState.emit({
15585
+ originalEvent: undefined,
15586
+ data: { valid: this.valid, from: "componentWillRender" },
15587
+ component: "duet-upload",
15588
+ });
15589
+ }
15590
+ };
15591
+ this.getGroupFromItemData = (item) => {
15592
+ if (item.valid && item.progress === 100) {
15593
+ // if the item has a group, move the file to that group instead
15594
+ // of into the standard success group
15595
+ if (item.group) {
15596
+ return item.group;
15597
+ }
15598
+ return this.DefaultGroups.success;
15599
+ }
15600
+ else if (item.progress > 0 && item.progress !== 100) {
15601
+ return this.DefaultGroups.inprogress;
15602
+ }
15603
+ else if (!item.valid) {
15604
+ return this.DefaultGroups.failure;
15605
+ }
15606
+ else if (item.group) {
15607
+ return item.group;
15608
+ }
15609
+ else {
15610
+ return "none";
15611
+ }
15612
+ };
15613
+ this.getItemHTMLFromItemData = (data, group) => {
15614
+ if (group === this.DefaultGroups.success) {
15615
+ return hAsync(SuccessItem, { data: data, showLinks: this.showLinks });
15616
+ }
15617
+ else if (group === this.DefaultGroups.inprogress) {
15618
+ return hAsync(ProgressItem, { progress: data.progress, name: data.item.name });
15619
+ }
15620
+ else if (group === this.DefaultGroups.failure) {
15621
+ return hAsync(ErrorItem, { data: data });
15622
+ }
15623
+ else if (data.group) {
15624
+ return data.html;
15625
+ }
15626
+ else {
15627
+ return "none";
15628
+ }
15629
+ };
15630
+ this.convertToDuetEditableTableItems = () => {
15631
+ // we're always recreating the map - in order to force an update down stream.
15632
+ const itemData = new Map();
15633
+ //walk the files Map and convert to DuetEditableTableItemData
15634
+ this.files.forEach((data, key, _originalMap) => {
15635
+ const group = this.getGroupFromItemData(data);
15636
+ const item = this.getItemHTMLFromItemData(data, group);
15637
+ itemData.set(key, {
15638
+ uid: data.uid,
15639
+ item,
15640
+ group,
15641
+ });
15642
+ });
15643
+ return itemData;
15644
+ };
15645
+ this.kick = debounce(() => {
15646
+ this.tick = Date.now();
15647
+ }, 30); // will trigger re-render
14715
15648
  this.genHashName = () => Date.now().toString(36) + Math.random();
14716
15649
  this.updateValueInMap = (item, key, value, kick = true) => {
14717
15650
  const fileItem = this.files.get(item);
@@ -14722,10 +15655,13 @@ class DuetUpload {
14722
15655
  }
14723
15656
  };
14724
15657
  this.updateProgress = (ev, name) => {
14725
- if (ev.lengthComputable) {
14726
- const percentComplete = (ev.loaded / ev.total) * 100;
15658
+ const updateProgressHelper = percentComplete => {
14727
15659
  this.updateValueInMap(name, "progress", percentComplete);
14728
15660
  this.onProgress(name, percentComplete, ev);
15661
+ };
15662
+ if (ev.lengthComputable) {
15663
+ const percentComplete = (ev.loaded / ev.total) * 100;
15664
+ updateProgressHelper(percentComplete);
14729
15665
  }
14730
15666
  else {
14731
15667
  console.log("cant read progress");
@@ -14762,17 +15698,20 @@ class DuetUpload {
14762
15698
  * We reset the form fields to always be able to re-upload files
14763
15699
  * and because we handle all uploads and states internally in the component (not relying on native form elements)
14764
15700
  */
15701
+ /* TODO: it may be a good idea to just update the list so that this always matches what is in the files map,
15702
+ * TODO: this would remove the capability of Re-uploading, unless we can catch and remove the user file from the form filelist before the upload is canceled by the browser
15703
+ * TODO: but for now we'll just reset the form fields
15704
+ */
14765
15705
  this.nativeInput.value = "";
14766
15706
  };
14767
- this.getI18nError = (errorCode) => {
14768
- const errorFromJson = getError(errorCode);
14769
- const i18String = getLocaleString(errorFromJson.message);
14770
- if (i18String === "" || !i18String) {
14771
- return errorFromJson.system_message;
14772
- }
14773
- else {
14774
- return i18String;
14775
- }
15707
+ this.startUpload = async (ev, metaData = undefined) => {
15708
+ await this.setFocus();
15709
+ this.metaData = metaData;
15710
+ this.nativeInput.click();
15711
+ this.onUpload(ev, metaData);
15712
+ ev.stopPropagation();
15713
+ ev.preventDefault();
15714
+ return;
14776
15715
  };
14777
15716
  /**
14778
15717
  * Eventlisteners for the XHR requests
@@ -14783,6 +15722,7 @@ class DuetUpload {
14783
15722
  };
14784
15723
  this.transferDone = (xhr, name, status) => {
14785
15724
  this.updateValueInMap(name, "status", status, false);
15725
+ this.updateValueInMap(name, "uploaded", true, false);
14786
15726
  try {
14787
15727
  const response = JSON.parse(xhr.response);
14788
15728
  this.updateValueInMap(name, "url", response.url);
@@ -14796,12 +15736,13 @@ class DuetUpload {
14796
15736
  this.transferDoneWithFailure = (xhr, name, status) => {
14797
15737
  try {
14798
15738
  const { error } = JSON.parse(xhr.response);
14799
- this.updateValueInMap(name, "error", { message: error.message, type: error.type });
15739
+ this.updateValueInMap(name, "error", { message: error.message, type: error.type }, false);
14800
15740
  }
14801
15741
  catch (e) {
14802
15742
  console.error("Server did not respond with expected response error:{message: string, type: int}");
14803
- this.updateValueInMap(name, "error", { type: status });
15743
+ this.updateValueInMap(name, "error", { type: status }, false);
14804
15744
  }
15745
+ this.updateValueInMap(name, "valid", false, true);
14805
15746
  };
14806
15747
  this.transferFailed = name => {
14807
15748
  this.updateValueInMap(name, "error", getError("duet-upload-001"));
@@ -14832,15 +15773,15 @@ class DuetUpload {
14832
15773
  this.files.delete(key);
14833
15774
  this.validateTotals();
14834
15775
  this.kick();
14835
- if (!this.external) {
14836
- this.makeXHRDeleteRequest(deletedItem);
14837
- }
14838
- this.resetFormFields();
14839
15776
  this.duetDelete.emit({
14840
15777
  originalEvent: ev,
14841
15778
  data: { deletion: deletedItem },
14842
15779
  component: "duet-upload",
14843
15780
  });
15781
+ if (!this.external) {
15782
+ this.makeXHRDeleteRequest(deletedItem);
15783
+ }
15784
+ this.resetFormFields();
14844
15785
  };
14845
15786
  this.onCancel = (key, ev) => {
14846
15787
  const cancelledItem = this.files.get(key);
@@ -14859,9 +15800,10 @@ class DuetUpload {
14859
15800
  component: "duet-upload",
14860
15801
  });
14861
15802
  };
14862
- this.onUpload = (ev) => {
15803
+ this.onUpload = (ev, metaData) => {
14863
15804
  this.duetUpload.emit({
14864
15805
  originalEvent: ev,
15806
+ metaData,
14865
15807
  component: "duet-upload",
14866
15808
  });
14867
15809
  };
@@ -14893,13 +15835,6 @@ class DuetUpload {
14893
15835
  data: { files: this.files },
14894
15836
  });
14895
15837
  };
14896
- this.startUpload = async (ev) => {
14897
- await this.setFocus();
14898
- this.nativeInput.click();
14899
- this.onUpload(ev);
14900
- ev.stopPropagation();
14901
- ev.preventDefault();
14902
- };
14903
15838
  }
14904
15839
  watchValidHandler(newValue, oldValue) {
14905
15840
  if (newValue !== oldValue) {
@@ -14910,19 +15845,18 @@ class DuetUpload {
14910
15845
  * Component lifecycle events.
14911
15846
  */
14912
15847
  componentWillLoad() {
15848
+ if (typeof this.statusMessageLabel === "string") {
15849
+ this.internalStatusMessageLabel = sanitizeString(this.groups);
15850
+ }
15851
+ else {
15852
+ this.internalStatusMessageLabel = this.statusMessageLabel;
15853
+ }
14913
15854
  inheritGlobalTheme(this);
15855
+ this.listenForActionEvents();
14914
15856
  }
14915
15857
  componentWillRender() {
14916
- const { invalid, valid } = this.getFilesAsArray();
14917
- const oldValid = this.valid;
14918
- this.valid = invalid.length === 0 && valid.length !== 0;
14919
- if (this.valid !== oldValid) {
14920
- this.duetState.emit({
14921
- originalEvent: undefined,
14922
- data: { valid: this.valid, from: "componentWillRender" },
14923
- component: "duet-upload",
14924
- });
14925
- }
15858
+ // listen to the events from the component
15859
+ this.verifyValidity();
14926
15860
  }
14927
15861
  /**
14928
15862
  * XHR request utilities
@@ -14942,22 +15876,34 @@ class DuetUpload {
14942
15876
  xhr.upload.addEventListener("abort", () => {
14943
15877
  this.transferCanceled(name);
14944
15878
  });
14945
- return makeXhrRequest({ data, name }, { type: "POST", uri: this.uri, xhr, argument: null, headers: null }, this.transferDoneWithFailure, this.transferDone, this.trackProgress);
15879
+ return makeXhrRequest({
15880
+ payload: { data, name },
15881
+ options: { type: "POST", uri: this.uri, xhr, argument: null, headers: null },
15882
+ onFailure: this.transferDoneWithFailure,
15883
+ onSuccess: this.transferDone,
15884
+ onProgress: this.trackProgress,
15885
+ });
14946
15886
  }
14947
15887
  makeXHRDeleteRequest(data) {
14948
15888
  const { uid, item } = data;
14949
15889
  const xhr = new XMLHttpRequest();
14950
15890
  // don't present server issues to user on deletes, just remove them from the visible list
14951
- return makeXhrRequest({ data: null, name }, {
14952
- type: "DELETE",
14953
- xhr,
14954
- uri: this.uri,
14955
- arguments: `?key=${uid}&name=${item.name}`,
14956
- headers: {
14957
- "x-fileuid": uid,
14958
- "x-filename": item.name,
15891
+ return makeXhrRequest({
15892
+ payload: { data: null, name },
15893
+ options: {
15894
+ type: "DELETE",
15895
+ xhr,
15896
+ uri: this.uri,
15897
+ arguments: `?key=${uid}&name=${item.name}`,
15898
+ headers: {
15899
+ "x-fileuid": uid,
15900
+ "x-filename": item.name,
15901
+ },
14959
15902
  },
14960
- }, this.transferDoneWithFailure, this.transferDone, this.trackProgress);
15903
+ onFailure: this.transferDoneWithFailure,
15904
+ onSuccess: this.transferDone,
15905
+ onProgress: this.trackProgress,
15906
+ });
14961
15907
  }
14962
15908
  /**
14963
15909
  * Component event handling.
@@ -14967,7 +15913,7 @@ class DuetUpload {
14967
15913
  const selectedFiles = Array.from((_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.files);
14968
15914
  // FileList is a nice array like structure but
14969
15915
  // to ensure uniqueness of files we use a mapping structure and
14970
- // key to the name (makes it easier to delete)
15916
+ // key to the name (makes it easier to delete as well)
14971
15917
  if (selectedFiles) {
14972
15918
  for (const item of selectedFiles) {
14973
15919
  const { valid, errorMessage, errorType, errorSystem } = validateFile(item, {
@@ -14980,6 +15926,8 @@ class DuetUpload {
14980
15926
  uid,
14981
15927
  item: item,
14982
15928
  size: item.size,
15929
+ meta: this.metaData,
15930
+ uploaded: false,
14983
15931
  valid,
14984
15932
  error: {
14985
15933
  type: valid ? undefined : errorType,
@@ -15008,8 +15956,14 @@ class DuetUpload {
15008
15956
  data.append("file", item);
15009
15957
  data.append("uid", uid);
15010
15958
  data.append("name", item.name);
15011
- data.append("metadata", JSON.stringify({ uid, url: this.uri, size: item.size }));
15012
- fileListItem.xhr = await this.makeXHRPostRequest(data);
15959
+ data.append("metadata", JSON.stringify({ uid, url: this.uri, size: item.size, meta: fileListItem.meta }));
15960
+ try {
15961
+ fileListItem.xhr = await this.makeXHRPostRequest(data);
15962
+ }
15963
+ catch (e) {
15964
+ // in case one of the global maxes have been reached, invalidate the file
15965
+ this.updateValueInMap(item.name, "valid", false, false);
15966
+ }
15013
15967
  }
15014
15968
  // kick the stat to force update
15015
15969
  this.kick();
@@ -15017,6 +15971,8 @@ class DuetUpload {
15017
15971
  }
15018
15972
  // reset the form, so that a user may upload a file again (with the same name)
15019
15973
  this.resetFormFields();
15974
+ // reset the internal metaData state
15975
+ this.metaData = undefined;
15020
15976
  this.duetChange.emit({
15021
15977
  originalEvent: ev,
15022
15978
  data: { files: this.files },
@@ -15033,6 +15989,15 @@ class DuetUpload {
15033
15989
  }
15034
15990
  return;
15035
15991
  }
15992
+ /**
15993
+ * Method for invoking the upload sequence
15994
+ */
15995
+ async upload(metaData = undefined) {
15996
+ await this.setFocus();
15997
+ this.metaData = metaData;
15998
+ this.nativeInput.click();
15999
+ return;
16000
+ }
15036
16001
  /**
15037
16002
  * Get list of files, divided in errors and valid sections
15038
16003
  */
@@ -15042,6 +16007,12 @@ class DuetUpload {
15042
16007
  }
15043
16008
  return this.getFilesAsArray();
15044
16009
  }
16010
+ /**
16011
+ * Convenience method for updating the value of a key:value inside an item in the files attribute
16012
+ */
16013
+ async updateValue(item, key, value) {
16014
+ this.updateValueInMap(item, key, value);
16015
+ }
15045
16016
  /**
15046
16017
  * render() function
15047
16018
  * Always the last one in the class.
@@ -15051,13 +16022,13 @@ class DuetUpload {
15051
16022
  let caption = this.description.replace(/{maxfiles}/g, this.maxFiles.toString());
15052
16023
  caption = caption.replace(/{maxbytes}/g, `${Math.floor(this.maxBytes / 1024 / 1024)} MB`);
15053
16024
  caption = caption.replace(/{filetypes}/g, this.allowedExtensions.split(",").join(", "));
15054
- return (hAsync(Host, { class: { "duet-m-0": this.margin === "none" } }, hAsync("duet-fieldset", { label: this.label, caption: caption }, hAsync("slot", { name: "header" }), hAsync("duet-label", { theme: this.theme === "turva" ? "turva" : "default", size: "small", class: {
16025
+ return (hAsync(Host, { class: { "duet-m-0": this.margin === "none" } }, hAsync("duet-fieldset", { label: this.label, caption: caption }, hAsync("slot", { name: "header" }), !this.files.size && (hAsync("duet-label", { theme: this.theme === "turva" ? "turva" : "default", size: "small", class: {
15055
16026
  "duet-upload-filelist-empty": !this.files.size,
15056
16027
  "duet-upload-filelist": true,
15057
16028
  "duet-upload-filelist-filled": this.files.size,
15058
- }, id: this.labelId, for: identifier }, !this.files.size && this.fileListEmpty), !!this.files.size && hAsync("slot", { name: "fileheader" }), hAsync(DuetUploadFileList, { data: this.getFilesAsArray(), onDelete: this.onDelete, onCancel: this.onCancel, getError: this.getI18nError }, hAsync("li", null, "testing something")), !!this.files.size && hAsync("slot", { name: "filefooter" }), hAsync("duet-spacer", { size: "large" }), hAsync("duet-button", { id: this.buttonId, onClick: this.startUpload, "accessible-controls": identifier, disabled: this.fileMaxReached, "accessible-label": this.accessibleButtonLabel, "accessible-owns": identifier, size: "small", variation: "secondary", fixed: true, icon: "action-add-circle" }, this.buttonLabel), hAsync("duet-spacer", { size: "medium" }), (this.fileMaxReached || this.bytesMaxReached) && (hAsync("duet-alert", null, this.fileMaxReached && this.getI18nError("duet-upload-301"), this.bytesMaxReached && this.getI18nError("duet-upload-202"))), hAsync("duet-spacer", { size: "medium" }), hAsync("duet-visually-hidden", null, hAsync("input", { ref: input => {
16029
+ }, id: this.labelId, for: identifier }, this.fileListEmpty)), !!this.files.size && hAsync("slot", { name: "fileheader" }), !!this.files.size && (hAsync("duet-upload-aria-status", { invalid: this.getFilesAsArray().invalid.length, valid: this.getFilesAsArray().valid.length, inprogress: this.filesInProgress.size, total: this.files.size, statusMessageLabel: this.internalStatusMessageLabel })), !!this.files.size && (hAsync("duet-editable-table", { "aria-live": "polite", "aria-relevant": "removals", accessibleRole: "log", id: this.editableTableId, groups: this.groups, actions: this.actions, hideGroups: this.hideGroups, items: this.convertToDuetEditableTableItems() })), !!this.files.size && hAsync("slot", { name: "filefooter" }), hAsync("duet-spacer", { size: "large" }), !this.hideButton && (hAsync("duet-button", { id: this.buttonId, onClick: this.startUpload, "accessible-controls": identifier, disabled: this.fileMaxReached, "accessible-label": this.accessibleButtonLabel, "accessible-owns": identifier, size: "small", variation: "secondary", fixed: true, icon: "action-add-circle" }, this.buttonLabel)), hAsync("duet-spacer", { size: "medium" }), (this.fileMaxReached || this.bytesMaxReached) && (hAsync("duet-alert", null, this.fileMaxReached && getI18nError("duet-upload-301"), this.bytesMaxReached && getI18nError("duet-upload-202"))), hAsync("duet-spacer", { size: "medium" }), hAsync("duet-visually-hidden", null, hAsync("input", { ref: input => {
15059
16030
  this.nativeInput = input;
15060
- }, accept: this.limitSelection ? undefined : `${this.allowedMimetypes},${this.allowedExtensions}`, onBlur: this.onBlur, onFocus: this.onFocus, onChange: e => this.onChange(e), type: "file", class: {
16031
+ }, accept: !this.limitSelection ? undefined : `${this.allowedMimetypes},${this.allowedExtensions}`, onBlur: this.onBlur, onFocus: this.onFocus, onChange: e => this.onChange(e), type: "file", class: {
15061
16032
  "duet-upload": true,
15062
16033
  }, disabled: this.disabled, "aria-hidden": "true", required: this.required, name: this.name, id: this.identifier, multiple: this.multiple, capture: "user" })))));
15063
16034
  }
@@ -15075,9 +16046,14 @@ class DuetUpload {
15075
16046
  "accessibleControls": [1, "accessible-controls"],
15076
16047
  "accessibleOwns": [1, "accessible-owns"],
15077
16048
  "external": [4],
16049
+ "hideButton": [4, "hide-upload-button"],
16050
+ "actions": [1],
15078
16051
  "uri": [1],
16052
+ "showLinks": [4, "show-links"],
15079
16053
  "caption": [1],
15080
- "buttonLabelDefaults": [16],
16054
+ "statusLabelDefaults": [1, "status-label-default"],
16055
+ "statusMessageLabel": [1, "status-message-label"],
16056
+ "buttonLabelDefaults": [1, "button-label-default"],
15081
16057
  "buttonLabel": [1, "button-label"],
15082
16058
  "accessibleButtonLabel": [1, "accessible-button-label"],
15083
16059
  "theme": [1025],
@@ -15085,18 +16061,18 @@ class DuetUpload {
15085
16061
  "identifier": [1],
15086
16062
  "margin": [1],
15087
16063
  "required": [4],
16064
+ "groups": [1],
16065
+ "hideGroups": [4, "hide-table-labels"],
15088
16066
  "files": [1040],
15089
16067
  "valid": [1540],
15090
- "labelDefaults": [16],
16068
+ "labelDefaults": [1, "label-default"],
15091
16069
  "label": [1],
15092
- "descriptionDefaults": [16],
16070
+ "descriptionDefaults": [1, "description-default"],
15093
16071
  "description": [1],
15094
- "fileListEmptyDefaults": [16],
16072
+ "fileListEmptyDefaults": [1, "list-empty-default"],
15095
16073
  "fileListEmpty": [1, "file-list-empty"],
15096
16074
  "error": [1],
15097
- "labelHidden": [4, "label-hidden"],
15098
16075
  "name": [1],
15099
- "capture": [8],
15100
16076
  "maxBytes": [2, "max-bytes"],
15101
16077
  "maxBytesTotal": [2, "max-bytes-total"],
15102
16078
  "maxFiles": [2, "max-files"],
@@ -15107,7 +16083,9 @@ class DuetUpload {
15107
16083
  "value": [1025],
15108
16084
  "tick": [32],
15109
16085
  "setFocus": [64],
15110
- "getFiles": [64]
16086
+ "upload": [64],
16087
+ "getFiles": [64],
16088
+ "updateValue": [64]
15111
16089
  },
15112
16090
  "$listeners$": undefined,
15113
16091
  "$lazyBundleId$": "-",
@@ -15115,6 +16093,112 @@ class DuetUpload {
15115
16093
  }; }
15116
16094
  }
15117
16095
 
16096
+ class DuetUploadAriaStatus {
16097
+ constructor(hostRef) {
16098
+ registerInstance(this, hostRef);
16099
+ /**
16100
+ * State() variables
16101
+ */
16102
+ this.statusMessage = null;
16103
+ /**
16104
+ * Status labels used in the component
16105
+ */
16106
+ this.statusMessageLabel = null;
16107
+ /**
16108
+ * Adds accessible label that is read aloud
16109
+ */
16110
+ this.accessibleAriaLive = "polite";
16111
+ /**
16112
+ * valid file amount
16113
+ */
16114
+ this.valid = undefined;
16115
+ /**
16116
+ * total files
16117
+ */
16118
+ this.total = undefined;
16119
+ /**
16120
+ * invalid file amount
16121
+ */
16122
+ this.invalid = undefined;
16123
+ /**
16124
+ * valid file amount
16125
+ */
16126
+ this.inprogress = undefined;
16127
+ /**
16128
+ * Private functions
16129
+ */
16130
+ this.replacePlaceHolders = (statusString) => {
16131
+ const addFiles = (amount) => {
16132
+ return amount > 1 ? `${amount} ${this.statusMessageLabel.files}` : `${amount} ${this.statusMessageLabel.file}`;
16133
+ };
16134
+ return statusString
16135
+ .replace("{filesUploaded}", addFiles(this.valid))
16136
+ .replace("{filesInProgress}", addFiles(this.inprogress))
16137
+ .replace("{filesTotal}", addFiles(this.total))
16138
+ .replace("{filesWithErrors}", addFiles(this.invalid));
16139
+ };
16140
+ this.getStatusMessage = () => {
16141
+ const { done, inProgress, doneWithErrors, inProgressWithErrors } = this.statusMessageLabel;
16142
+ const hasErrors = this.invalid > 0;
16143
+ const isInProgress = this.inprogress > 0;
16144
+ const isInProgressWithErrors = this.inprogress > 0 && hasErrors;
16145
+ const isDone = this.valid === this.total && !isInProgress && !hasErrors;
16146
+ const isDoneWithErrors = this.valid + this.invalid === this.total && !isInProgress;
16147
+ if (isDone) {
16148
+ this.statusMessage = this.replacePlaceHolders(done);
16149
+ return;
16150
+ }
16151
+ else if (isInProgressWithErrors) {
16152
+ this.statusMessage = this.replacePlaceHolders(inProgressWithErrors);
16153
+ return;
16154
+ }
16155
+ else if (isInProgress) {
16156
+ this.statusMessage = this.replacePlaceHolders(inProgress);
16157
+ return;
16158
+ }
16159
+ else if (isDoneWithErrors) {
16160
+ this.statusMessage = this.replacePlaceHolders(doneWithErrors);
16161
+ return;
16162
+ }
16163
+ return;
16164
+ };
16165
+ }
16166
+ watchHandler(newValue, oldValue) {
16167
+ if (newValue !== oldValue) {
16168
+ this.getStatusMessage();
16169
+ }
16170
+ }
16171
+ /**
16172
+ * render() function
16173
+ * Always the last one in the class.
16174
+ */
16175
+ render() {
16176
+ return (hAsync(Host, { role: "status", "aria-live": "assertive", "aria-atomic": "true", "aria-relevant": "all" }, hAsync("duet-visually-hidden", null, this.statusMessage)));
16177
+ }
16178
+ static get watchers() { return {
16179
+ "valid": ["watchHandler"],
16180
+ "invalid": ["watchHandler"],
16181
+ "inprogress": ["watchHandler"],
16182
+ "total": ["watchHandler"]
16183
+ }; }
16184
+ static get cmpMeta() { return {
16185
+ "$flags$": 9,
16186
+ "$tagName$": "duet-upload-aria-status",
16187
+ "$members$": {
16188
+ "statusMessageLabel": [16],
16189
+ "accessibleAriaLive": [1, "accessible-aria-live"],
16190
+ "valid": [2],
16191
+ "total": [2],
16192
+ "invalid": [2],
16193
+ "inprogress": [2],
16194
+ "statusMessage": [32]
16195
+ },
16196
+ "$listeners$": undefined,
16197
+ "$lazyBundleId$": "-",
16198
+ "$attrsToReflect$": []
16199
+ }; }
16200
+ }
16201
+
15118
16202
  const duetVisuallyHiddenCss = "/*!@:host*/.sc-duet-visually-hidden-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}";
15119
16203
 
15120
16204
  class DuetVisuallyHidden {
@@ -15152,6 +16236,9 @@ registerComponents([
15152
16236
  DuetCookieConsent,
15153
16237
  DuetDatePicker,
15154
16238
  DuetDivider,
16239
+ DuetEditableTable,
16240
+ DuetEditableTableButton,
16241
+ DuetEditableTableItem,
15155
16242
  DuetEmptyState,
15156
16243
  DuetFieldset,
15157
16244
  DuetFooter,
@@ -15173,6 +16260,7 @@ registerComponents([
15173
16260
  DuetNotificationDrawer,
15174
16261
  DuetNumberInput,
15175
16262
  DuetParagraph,
16263
+ DuetProgress,
15176
16264
  DuetRadio,
15177
16265
  DuetRadioGroup,
15178
16266
  DuetRangeSlider,
@@ -15189,6 +16277,7 @@ registerComponents([
15189
16277
  DuetTooltip,
15190
16278
  DuetTray,
15191
16279
  DuetUpload,
16280
+ DuetUploadAriaStatus,
15192
16281
  DuetVisuallyHidden,
15193
16282
  ]);
15194
16283