@duetds/components 4.30.0 → 4.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (424) hide show
  1. package/hydrate/index.js +1481 -434
  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 +56 -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_3.cjs.entry.js +232 -0
  15. package/lib/cjs/{duet-table.cjs.entry.js → duet-editable-table_3.cjs.entry.js} +206 -2
  16. package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
  17. package/lib/cjs/duet-footer.cjs.entry.js +4 -4
  18. package/lib/cjs/duet-grid_2.cjs.entry.js +52 -4
  19. package/lib/cjs/duet-header_2.cjs.entry.js +26 -10
  20. package/lib/cjs/duet-hero.cjs.entry.js +6 -6
  21. package/lib/cjs/duet-icon.cjs.entry.js +6 -14
  22. package/lib/cjs/duet-input_2.cjs.entry.js +7 -7
  23. package/lib/cjs/duet-layout.cjs.entry.js +1 -1
  24. package/lib/cjs/duet-list_2.cjs.entry.js +2 -2
  25. package/lib/cjs/duet-modal.cjs.entry.js +8 -7
  26. package/lib/cjs/duet-notification_2.cjs.entry.js +6 -5
  27. package/lib/cjs/duet-number-input.cjs.entry.js +36 -15
  28. package/lib/cjs/duet-progress.cjs.entry.js +75 -0
  29. package/lib/cjs/duet-radio_2.cjs.entry.js +2 -2
  30. package/lib/cjs/duet-range-slider.cjs.entry.js +2 -2
  31. package/lib/cjs/duet-select.cjs.entry.js +6 -6
  32. package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
  33. package/lib/cjs/duet-tab_2.cjs.entry.js +12 -6
  34. package/lib/cjs/duet-textarea.cjs.entry.js +5 -5
  35. package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
  36. package/lib/cjs/duet-tooltip.cjs.entry.js +21 -10
  37. package/lib/cjs/duet-tray.cjs.entry.js +21 -10
  38. package/lib/cjs/duet-upload.cjs.entry.js +403 -180
  39. package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
  40. package/lib/cjs/duet.cjs.js +4 -4
  41. package/lib/cjs/{focus-utils-7605778f.js → focus-utils-a7a1fb8b.js} +1 -1
  42. package/lib/cjs/{index-0c949193.js → index-b724d698.js} +88 -77
  43. package/lib/cjs/js-utils-33a9dbe3.js +16 -0
  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 +15 -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 +123 -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 +5 -8
  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-aria-status.js +217 -0
  104. package/lib/collection/components/duet-upload/duet-upload-editable-item-error.js +16 -0
  105. package/lib/collection/components/duet-upload/duet-upload-editable-item-inprogres.js +8 -0
  106. package/lib/collection/components/duet-upload/duet-upload-editable-item-success.js +30 -0
  107. package/lib/collection/components/duet-upload/duet-upload.css +17 -86
  108. package/lib/collection/components/duet-upload/duet-upload.js +551 -153
  109. package/lib/collection/components/duet-upload/errorcodes.utils.js +16 -4
  110. package/lib/collection/components/duet-upload/xhr.helpers.js +2 -6
  111. package/lib/collection/utils/fixture-utils.js +7 -5
  112. package/lib/collection/utils/js-utils.js +12 -0
  113. package/lib/collection/utils/language-utils.js +26 -9
  114. package/lib/collection/utils/string-utils.js +6 -0
  115. package/lib/collection/utils/watch-options.js +35 -6
  116. package/lib/custom-elements-bundle/index.d.ts +30 -0
  117. package/lib/custom-elements-bundle/index.js +1603 -721
  118. package/lib/duet/duet.esm.js +1 -1
  119. package/lib/duet/duet.js +1 -1
  120. package/lib/duet/{p-4a7911fd.entry.js → p-00735436.entry.js} +1 -1
  121. package/lib/duet/p-060d79be.entry.js +4 -0
  122. package/lib/duet/p-0d22396e.system.js +16 -0
  123. package/lib/duet/p-10deead0.system.js +4 -0
  124. package/lib/duet/p-1208c84f.entry.js +4 -0
  125. package/lib/duet/p-12721178.js +4 -0
  126. package/lib/duet/p-155ef581.system.entry.js +4 -0
  127. package/lib/duet/p-16c48c5d.entry.js +4 -0
  128. package/lib/duet/p-1797df7b.system.entry.js +4 -0
  129. package/lib/duet/p-1a08fc22.system.entry.js +4 -0
  130. package/lib/duet/{p-d1817efe.system.entry.js → p-237e47b4.system.entry.js} +1 -1
  131. package/lib/duet/p-2443bdca.system.entry.js +4 -0
  132. package/lib/duet/p-263bc9cd.system.entry.js +4 -0
  133. package/lib/duet/p-2764f081.js +4 -0
  134. package/lib/duet/p-27d80cef.system.entry.js +4 -0
  135. package/lib/duet/p-28e02c08.entry.js +4 -0
  136. package/lib/duet/{p-f81d8534.entry.js → p-2bb1460c.entry.js} +1 -1
  137. package/lib/duet/p-33c58756.entry.js +4 -0
  138. package/lib/duet/{p-bd9a7d8f.js → p-35a3794e.js} +0 -0
  139. package/lib/duet/{p-bbc229d8.system.entry.js → p-374fb7e6.system.entry.js} +1 -1
  140. package/lib/duet/p-387823af.system.entry.js +4 -0
  141. package/lib/duet/p-3af5d66f.entry.js +4 -0
  142. package/lib/duet/{p-322d1c38.js → p-3c1971d8.js} +1 -1
  143. package/lib/duet/{p-7e108b7e.entry.js → p-4607af59.entry.js} +1 -1
  144. package/lib/duet/p-48d1eb1f.system.entry.js +4 -0
  145. package/lib/duet/p-4a87e9ab.system.entry.js +4 -0
  146. package/lib/duet/{p-031c2cd8.system.entry.js → p-4b6ebe40.system.entry.js} +1 -1
  147. package/lib/duet/p-4e28da18.system.entry.js +4 -0
  148. package/lib/duet/p-548d484e.js +4 -0
  149. package/lib/duet/p-5826523b.entry.js +4 -0
  150. package/lib/duet/{p-ce1374a4.system.entry.js → p-58750bae.system.entry.js} +1 -1
  151. package/lib/duet/p-597d99c7.entry.js +4 -0
  152. package/lib/duet/p-5ea0cd19.entry.js +4 -0
  153. package/lib/duet/p-63d5bf73.system.entry.js +4 -0
  154. package/lib/duet/p-67d9a9a9.system.entry.js +4 -0
  155. package/lib/duet/p-6a19b5ec.entry.js +4 -0
  156. package/lib/duet/p-6cc3be76.system.entry.js +4 -0
  157. package/lib/duet/p-6e363557.system.js +4 -0
  158. package/lib/duet/p-6e6e76db.system.entry.js +4 -0
  159. package/lib/duet/p-70fafc98.system.js +4 -0
  160. package/lib/duet/p-7368b14e.system.entry.js +4 -0
  161. package/lib/duet/p-751542a0.system.entry.js +4 -0
  162. package/lib/duet/p-794659ac.entry.js +4 -0
  163. package/lib/duet/p-7e8d5bb9.system.entry.js +4 -0
  164. package/lib/duet/p-7fee0d23.system.entry.js +4 -0
  165. package/lib/duet/p-81867417.system.js +4 -0
  166. package/lib/duet/p-86daec1c.entry.js +4 -0
  167. package/lib/duet/{p-4265de16.system.entry.js → p-8b5ca0e7.system.entry.js} +1 -1
  168. package/lib/duet/{p-66dde4d2.entry.js → p-8cb7416d.entry.js} +1 -1
  169. package/lib/duet/p-8f826843.system.entry.js +4 -0
  170. package/lib/duet/p-94169303.entry.js +4 -0
  171. package/lib/duet/{p-36007600.entry.js → p-9481e312.entry.js} +1 -1
  172. package/lib/duet/{p-f82709ba.entry.js → p-984576c9.entry.js} +1 -1
  173. package/lib/duet/p-986779fb.js +4 -0
  174. package/lib/duet/p-987edcd0.js +15 -0
  175. package/lib/duet/{p-35e45c19.system.js → p-9a945278.system.js} +1 -1
  176. package/lib/duet/p-9d73343a.entry.js +4 -0
  177. package/lib/duet/{p-e26116e0.system.entry.js → p-9dca5c22.system.entry.js} +1 -1
  178. package/lib/duet/p-a207b008.entry.js +4 -0
  179. package/lib/duet/p-a5b9c192.system.entry.js +4 -0
  180. package/lib/duet/p-a6a84ec6.entry.js +4 -0
  181. package/lib/duet/{p-2d2c45f9.entry.js → p-a890da72.entry.js} +1 -1
  182. package/lib/duet/p-a9859a82.entry.js +4 -0
  183. package/lib/duet/p-aba68b7b.entry.js +4 -0
  184. package/lib/duet/p-acc57c77.entry.js +4 -0
  185. package/lib/duet/{p-2826f987.js → p-ad07f399.js} +1 -1
  186. package/lib/duet/p-aee24388.system.entry.js +4 -0
  187. package/lib/duet/p-aef1b720.system.entry.js +4 -0
  188. package/lib/duet/{p-62806bb6.system.entry.js → p-af41d894.system.entry.js} +1 -1
  189. package/lib/duet/p-b25d3769.js +4 -0
  190. package/lib/duet/{p-dee41056.system.entry.js → p-b32224fe.system.entry.js} +1 -1
  191. package/lib/duet/p-b3744481.entry.js +4 -0
  192. package/lib/duet/{p-de2be65b.system.js → p-b42d81c3.system.js} +1 -1
  193. package/lib/duet/{p-27d538f7.system.entry.js → p-b4e87f02.system.entry.js} +1 -1
  194. package/lib/duet/{p-f71f12ed.entry.js → p-bf93a991.entry.js} +1 -1
  195. package/lib/duet/{p-fd98468a.system.js → p-c18a599e.system.js} +0 -0
  196. package/lib/duet/p-c2e77278.entry.js +4 -0
  197. package/lib/duet/p-c34329f3.entry.js +4 -0
  198. package/lib/duet/{p-59a07cf9.entry.js → p-c36b4da0.entry.js} +1 -1
  199. package/lib/duet/{p-a321a98c.entry.js → p-cdd70b93.entry.js} +1 -1
  200. package/lib/duet/p-d1c19f04.system.entry.js +4 -0
  201. package/lib/duet/{p-f71e337e.system.entry.js → p-d3a3c3c7.system.entry.js} +1 -1
  202. package/lib/duet/{p-345ea4f2.system.entry.js → p-d4118b6e.system.entry.js} +1 -1
  203. package/lib/duet/{p-3dc9d15d.system.entry.js → p-d744d188.system.entry.js} +1 -1
  204. package/lib/duet/p-ddb6344c.system.js +4 -0
  205. package/lib/duet/p-de07c7d7.entry.js +4 -0
  206. package/lib/duet/p-dfe79666.system.entry.js +4 -0
  207. package/lib/duet/p-e12f2b8b.system.js +4 -0
  208. package/lib/duet/p-e2a44156.js +4 -0
  209. package/lib/duet/p-e76b722f.entry.js +4 -0
  210. package/lib/duet/p-e964d062.entry.js +4 -0
  211. package/lib/duet/p-eb55ccd2.system.js +4 -0
  212. package/lib/duet/p-f0a4b68d.system.entry.js +4 -0
  213. package/lib/duet/p-f364eb96.entry.js +4 -0
  214. package/lib/duet/{p-a88df408.entry.js → p-f8ce39fb.entry.js} +1 -1
  215. package/lib/esm/{dom-21034390.js → dom-58cd15f6.js} +1 -1
  216. package/lib/esm/duet-alert.entry.js +4 -2
  217. package/lib/esm/duet-badge.entry.js +2 -2
  218. package/lib/esm/duet-button_2.entry.js +6 -5
  219. package/lib/esm/duet-caption_4.entry.js +21 -15
  220. package/lib/esm/duet-card.entry.js +6 -6
  221. package/lib/esm/duet-checkbox.entry.js +2 -2
  222. package/lib/esm/duet-choice_2.entry.js +57 -26
  223. package/lib/esm/duet-collapsible.entry.js +5 -2
  224. package/lib/esm/duet-cookie-consent.entry.js +1 -1
  225. package/lib/esm/duet-date-picker.entry.js +23 -13
  226. package/lib/esm/duet-divider_2.entry.js +1 -1
  227. package/lib/esm/duet-editable-table-button_3.entry.js +226 -0
  228. package/lib/esm/{duet-table.entry.js → duet-editable-table_3.entry.js} +205 -3
  229. package/lib/esm/duet-empty-state.entry.js +1 -1
  230. package/lib/esm/duet-footer.entry.js +4 -4
  231. package/lib/esm/duet-grid_2.entry.js +52 -4
  232. package/lib/esm/duet-header_2.entry.js +26 -10
  233. package/lib/esm/duet-hero.entry.js +6 -6
  234. package/lib/esm/duet-icon.entry.js +6 -14
  235. package/lib/esm/duet-input_2.entry.js +7 -7
  236. package/lib/esm/duet-layout.entry.js +1 -1
  237. package/lib/esm/duet-list_2.entry.js +2 -2
  238. package/lib/esm/duet-modal.entry.js +8 -7
  239. package/lib/esm/duet-notification_2.entry.js +6 -5
  240. package/lib/esm/duet-number-input.entry.js +36 -15
  241. package/lib/esm/duet-progress.entry.js +71 -0
  242. package/lib/esm/duet-radio_2.entry.js +2 -2
  243. package/lib/esm/duet-range-slider.entry.js +2 -2
  244. package/lib/esm/duet-select.entry.js +6 -6
  245. package/lib/esm/duet-step_2.entry.js +1 -1
  246. package/lib/esm/duet-tab_2.entry.js +12 -6
  247. package/lib/esm/duet-textarea.entry.js +5 -5
  248. package/lib/esm/duet-toggle.entry.js +1 -1
  249. package/lib/esm/duet-tooltip.entry.js +21 -10
  250. package/lib/esm/duet-tray.entry.js +21 -10
  251. package/lib/esm/duet-upload.entry.js +403 -180
  252. package/lib/esm/duet-visually-hidden.entry.js +1 -1
  253. package/lib/esm/duet.js +4 -4
  254. package/lib/esm/{focus-utils-0b12f0df.js → focus-utils-1fe0dcd0.js} +1 -1
  255. package/lib/esm/{index-f70ddc7f.js → index-84d97bd1.js} +88 -78
  256. package/lib/esm/js-utils-b69f17df.js +14 -0
  257. package/lib/esm/{language-utils-ab9c3afc.js → language-utils-344d894c.js} +28 -10
  258. package/lib/esm/loader.js +3 -3
  259. package/lib/esm/{shadow-css-31e2d504.js → shadow-css-7c726abb.js} +9 -10
  260. package/lib/esm/{string-utils-69cf0d09.js → string-utils-2f1793b8.js} +7 -1
  261. package/lib/esm/{token-utils-5a35377f.js → token-utils-590d9413.js} +1 -1
  262. package/lib/esm/{tokens.module-edb66c04.js → tokens.module-49cbf963.js} +3 -1
  263. package/lib/esm/watch-options-dd55bce8.js +57 -0
  264. package/lib/esm-es5/{dom-21034390.js → dom-58cd15f6.js} +0 -0
  265. package/lib/esm-es5/duet-alert.entry.js +1 -1
  266. package/lib/esm-es5/duet-badge.entry.js +1 -1
  267. package/lib/esm-es5/duet-button_2.entry.js +1 -1
  268. package/lib/esm-es5/duet-caption_4.entry.js +2 -2
  269. package/lib/esm-es5/duet-card.entry.js +1 -1
  270. package/lib/esm-es5/duet-checkbox.entry.js +1 -1
  271. package/lib/esm-es5/duet-choice_2.entry.js +2 -2
  272. package/lib/esm-es5/duet-collapsible.entry.js +1 -1
  273. package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
  274. package/lib/esm-es5/duet-date-picker.entry.js +1 -1
  275. package/lib/esm-es5/duet-divider_2.entry.js +1 -1
  276. package/lib/esm-es5/duet-editable-table-button_3.entry.js +4 -0
  277. package/lib/esm-es5/duet-editable-table_3.entry.js +4 -0
  278. package/lib/esm-es5/duet-empty-state.entry.js +1 -1
  279. package/lib/esm-es5/duet-footer.entry.js +1 -1
  280. package/lib/esm-es5/duet-grid_2.entry.js +2 -2
  281. package/lib/esm-es5/duet-header_2.entry.js +1 -1
  282. package/lib/esm-es5/duet-hero.entry.js +1 -1
  283. package/lib/esm-es5/duet-icon.entry.js +2 -2
  284. package/lib/esm-es5/duet-input_2.entry.js +1 -1
  285. package/lib/esm-es5/duet-layout.entry.js +1 -1
  286. package/lib/esm-es5/duet-list_2.entry.js +1 -1
  287. package/lib/esm-es5/duet-modal.entry.js +1 -1
  288. package/lib/esm-es5/duet-notification_2.entry.js +1 -1
  289. package/lib/esm-es5/duet-number-input.entry.js +2 -2
  290. package/lib/esm-es5/duet-progress.entry.js +4 -0
  291. package/lib/esm-es5/duet-radio_2.entry.js +1 -1
  292. package/lib/esm-es5/duet-range-slider.entry.js +1 -1
  293. package/lib/esm-es5/duet-select.entry.js +1 -1
  294. package/lib/esm-es5/duet-step_2.entry.js +1 -1
  295. package/lib/esm-es5/duet-tab_2.entry.js +2 -2
  296. package/lib/esm-es5/duet-textarea.entry.js +1 -1
  297. package/lib/esm-es5/duet-toggle.entry.js +1 -1
  298. package/lib/esm-es5/duet-tooltip.entry.js +1 -1
  299. package/lib/esm-es5/duet-tray.entry.js +1 -1
  300. package/lib/esm-es5/duet-upload.entry.js +2 -2
  301. package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
  302. package/lib/esm-es5/duet.js +1 -1
  303. package/lib/esm-es5/{focus-utils-0b12f0df.js → focus-utils-1fe0dcd0.js} +1 -1
  304. package/lib/esm-es5/index-84d97bd1.js +4 -0
  305. package/lib/esm-es5/js-utils-b69f17df.js +4 -0
  306. package/lib/esm-es5/language-utils-344d894c.js +4 -0
  307. package/lib/esm-es5/loader.js +1 -1
  308. package/lib/esm-es5/shadow-css-7c726abb.js +15 -0
  309. package/lib/esm-es5/{string-utils-69cf0d09.js → string-utils-2f1793b8.js} +1 -1
  310. package/lib/esm-es5/{token-utils-5a35377f.js → token-utils-590d9413.js} +1 -1
  311. package/lib/esm-es5/tokens.module-49cbf963.js +4 -0
  312. package/lib/esm-es5/watch-options-dd55bce8.js +4 -0
  313. package/lib/types/components/duet-alert/duet-alert.d.ts +2 -1
  314. package/lib/types/components/duet-button/duet-button.d.ts +1 -1
  315. package/lib/types/components/duet-choice/duet-choice.d.ts +24 -5
  316. package/lib/types/components/duet-date-picker/duet-date-picker.d.ts +15 -9
  317. package/lib/types/components/duet-editable-table/duet-editable-table-button.d.ts +72 -0
  318. package/lib/types/components/duet-editable-table/duet-editable-table-item.d.ts +72 -0
  319. package/lib/types/components/duet-editable-table/duet-editable-table-tabledata.d.ts +7 -0
  320. package/lib/types/components/duet-editable-table/duet-editable-table.d.ts +84 -0
  321. package/lib/types/components/duet-footer/duet-footer.d.ts +1 -1
  322. package/lib/types/components/duet-grid/duet-grid.d.ts +16 -2
  323. package/lib/types/components/duet-header/duet-header.d.ts +21 -5
  324. package/lib/types/components/duet-heading/duet-heading.d.ts +2 -2
  325. package/lib/types/components/duet-hero/duet-hero.d.ts +3 -3
  326. package/lib/types/components/duet-icon/duet-icon.d.ts +1 -1
  327. package/lib/types/components/duet-link/duet-link.d.ts +2 -3
  328. package/lib/types/components/duet-modal/duet-modal.d.ts +3 -3
  329. package/lib/types/components/duet-notification-drawer/duet-notification-drawer.d.ts +3 -3
  330. package/lib/types/components/duet-number-input/duet-number-input.d.ts +21 -0
  331. package/lib/types/components/duet-paragraph/duet-paragraph.d.ts +9 -1
  332. package/lib/types/components/duet-progress/duet-progress.d.ts +64 -0
  333. package/lib/types/components/duet-tab-group/duet-tab-group.d.ts +6 -0
  334. package/lib/types/components/duet-tooltip/duet-tooltip.d.ts +11 -0
  335. package/lib/types/components/duet-tray/duet-tray.d.ts +11 -0
  336. package/lib/types/components/duet-upload/duet-upload-aria-status.d.ts +49 -0
  337. package/lib/types/components/duet-upload/duet-upload-editable-item-error.d.ts +7 -0
  338. package/lib/types/components/duet-upload/duet-upload-editable-item-inprogres.d.ts +7 -0
  339. package/lib/types/components/duet-upload/duet-upload-editable-item-success.d.ts +8 -0
  340. package/lib/types/components/duet-upload/duet-upload.d.ts +94 -25
  341. package/lib/types/components/duet-upload/errorcodes.utils.d.ts +1 -0
  342. package/lib/types/components/duet-upload/xhr.helpers.d.ts +7 -1
  343. package/lib/types/components.d.ts +611 -79
  344. package/lib/types/utils/js-utils.d.ts +1 -0
  345. package/lib/types/utils/language-utils.d.ts +8 -3
  346. package/lib/types/utils/string-utils.d.ts +1 -0
  347. package/lib/types/utils/watch-options.d.ts +2 -0
  348. package/package.json +19 -15
  349. package/hydrate/package.json +0 -6
  350. package/lib/cjs/duet-fieldset.cjs.entry.js +0 -62
  351. package/lib/collection/components/duet-upload/duet-upload-file-list.js +0 -49
  352. package/lib/duet/p-0733c303.system.entry.js +0 -4
  353. package/lib/duet/p-095060cc.js +0 -4
  354. package/lib/duet/p-156864a1.system.entry.js +0 -4
  355. package/lib/duet/p-15c15c6a.js +0 -15
  356. package/lib/duet/p-1911dfe7.system.entry.js +0 -4
  357. package/lib/duet/p-1c41525a.entry.js +0 -4
  358. package/lib/duet/p-1cfe38b1.system.entry.js +0 -4
  359. package/lib/duet/p-2834a302.entry.js +0 -4
  360. package/lib/duet/p-28a3d38f.system.entry.js +0 -4
  361. package/lib/duet/p-2a1a9f9f.entry.js +0 -4
  362. package/lib/duet/p-2a4d7c5b.system.entry.js +0 -4
  363. package/lib/duet/p-3eb36e3d.entry.js +0 -4
  364. package/lib/duet/p-4095dba5.entry.js +0 -4
  365. package/lib/duet/p-418b2ce7.system.js +0 -4
  366. package/lib/duet/p-4289b543.entry.js +0 -4
  367. package/lib/duet/p-43e39d98.system.js +0 -4
  368. package/lib/duet/p-46a3ae43.system.js +0 -4
  369. package/lib/duet/p-4a38cf9d.entry.js +0 -4
  370. package/lib/duet/p-4be8e814.entry.js +0 -4
  371. package/lib/duet/p-4dcea8fb.system.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-89db3b94.entry.js +0 -4
  385. package/lib/duet/p-8cfce39e.system.entry.js +0 -4
  386. package/lib/duet/p-8ffe1461.system.entry.js +0 -4
  387. package/lib/duet/p-9381c2d4.entry.js +0 -4
  388. package/lib/duet/p-9a450c9a.entry.js +0 -4
  389. package/lib/duet/p-9a89ec39.js +0 -4
  390. package/lib/duet/p-9bbfe606.system.entry.js +0 -4
  391. package/lib/duet/p-a6096b05.system.entry.js +0 -4
  392. package/lib/duet/p-a89d5d7c.entry.js +0 -4
  393. package/lib/duet/p-b07055fd.system.entry.js +0 -4
  394. package/lib/duet/p-b4374f0e.entry.js +0 -4
  395. package/lib/duet/p-b456d684.system.entry.js +0 -4
  396. package/lib/duet/p-bd18c93f.js +0 -4
  397. package/lib/duet/p-bddb1c15.system.entry.js +0 -4
  398. package/lib/duet/p-c0b95b58.entry.js +0 -4
  399. package/lib/duet/p-c3688975.entry.js +0 -4
  400. package/lib/duet/p-c4d183e6.entry.js +0 -4
  401. package/lib/duet/p-c9303f9a.entry.js +0 -4
  402. package/lib/duet/p-cd4e8ccf.js +0 -4
  403. package/lib/duet/p-ceb75b35.system.entry.js +0 -4
  404. package/lib/duet/p-cf243bcb.system.entry.js +0 -4
  405. package/lib/duet/p-d37c8a05.system.js +0 -4
  406. package/lib/duet/p-d989af11.entry.js +0 -4
  407. package/lib/duet/p-e58ca7af.system.js +0 -16
  408. package/lib/duet/p-e6128d82.system.entry.js +0 -4
  409. package/lib/duet/p-e86cdc17.entry.js +0 -4
  410. package/lib/duet/p-eadb29c7.entry.js +0 -4
  411. package/lib/duet/p-f30b14d6.system.entry.js +0 -4
  412. package/lib/duet/p-f79f8da1.entry.js +0 -4
  413. package/lib/duet/p-fc397e03.system.entry.js +0 -4
  414. package/lib/esm/duet-fieldset.entry.js +0 -58
  415. package/lib/esm/watch-options-de55ea78.js +0 -35
  416. package/lib/esm-es5/duet-fieldset.entry.js +0 -4
  417. package/lib/esm-es5/duet-table.entry.js +0 -4
  418. package/lib/esm-es5/index-f70ddc7f.js +0 -4
  419. package/lib/esm-es5/language-utils-ab9c3afc.js +0 -4
  420. package/lib/esm-es5/shadow-css-31e2d504.js +0 -15
  421. package/lib/esm-es5/tokens.module-edb66c04.js +0 -4
  422. package/lib/esm-es5/watch-options-de55ea78.js +0 -4
  423. package/lib/html.html-data.json +0 -4556
  424. package/lib/types/components/duet-upload/duet-upload-file-list.d.ts +0 -9
@@ -5,19 +5,23 @@ import infoIcon from "@duetds/icons/lib/assets/messaging-info";
5
5
  import { Component, Element, Event, h, Host, Listen, Method, Prop, State } from "@stencil/core";
6
6
  import { DuetStringsExternalDefaults } from "../../common-strings";
7
7
  import { createID } from "../../utils/create-id";
8
- import { isKeyboardClick, isQuestionKey } from "../../utils/keyboard-utils";
9
- import { getLocaleString } from "../../utils/language-utils";
8
+ import { FocusGuard } from "../../utils/focus-utils";
9
+ import { isEscapeKey, isKeyboardClick, isQuestionKey } from "../../utils/keyboard-utils";
10
+ import { getLanguage, getLocaleString } from "../../utils/language-utils";
10
11
  import { inheritGlobalTheme } from "../../utils/themeable-component";
11
12
  /**
12
13
  * @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.
13
14
  * @slot info - Info content. Anything inserted into this slot is displayed in a collapsible info box.
15
+ * @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
14
16
  * @slot additional - Additional content. Anything inserted into this slot is displayed as additional content under the label and caption
15
17
  */
16
18
  export class DuetChoice {
17
19
  constructor() {
20
+ this.hasHeader = false;
18
21
  this.choiceId = createID("DuetChoice");
19
- this.collapsibleId = createID("DuetChoiceCollapsible");
20
- this.infoId = createID("DuetInfo");
22
+ this.expandId = createID("DuetChoiceExpand");
23
+ this.headerId = createID("DuetChoiceHeader");
24
+ this.infoButtonId = createID("DuetChoiceInfoButton");
21
25
  /**
22
26
  * State() variables
23
27
  * Inlined decorator, alphabetical order.
@@ -95,6 +99,24 @@ export class DuetChoice {
95
99
  * browser from displaying its own validation errors.
96
100
  */
97
101
  this.required = false;
102
+ /**
103
+ * Placeholder defaults
104
+ * @default { fi: "pp.kk.vvvv", en: "dd.mm.yyyy", sv: "dd.mm.åååå" }
105
+ */
106
+ this.infoLabelDefaults = {
107
+ fi: "Lisätietoja",
108
+ en: "More information about",
109
+ sv: "Mera information om",
110
+ };
111
+ /**
112
+ * Hint text to display before the user types into the date picker input.
113
+ * @default {
114
+ * fi: "Lisätietoja",
115
+ * en: "More information about",
116
+ * sv: "Mera information om",
117
+ * }
118
+ */
119
+ this.infoLabel = getLocaleString(this.infoLabelDefaults, getLanguage());
98
120
  this.onMouseEnter = () => {
99
121
  this.isHovering = true;
100
122
  };
@@ -102,7 +124,6 @@ export class DuetChoice {
102
124
  this.isHovering = false;
103
125
  };
104
126
  this.onClick = (ev) => {
105
- this.setFocus();
106
127
  this.toggleChecked(ev);
107
128
  };
108
129
  this.handleKeyDown = (ev) => {
@@ -110,7 +131,7 @@ export class DuetChoice {
110
131
  this.toggleChecked(ev);
111
132
  }
112
133
  if (isQuestionKey(ev) && this.hasInfo) {
113
- this.toggleInfo(ev);
134
+ this.toggleInfo();
114
135
  }
115
136
  };
116
137
  this.onChange = () => {
@@ -144,8 +165,6 @@ export class DuetChoice {
144
165
  if (this.disabled || this.groupDisabled) {
145
166
  return;
146
167
  }
147
- ev.stopPropagation();
148
- ev.preventDefault();
149
168
  this.isInfoOpen = false;
150
169
  // if it's a radio button and it's already checked
151
170
  // we shouldn't fire an event, so exit early
@@ -159,10 +178,10 @@ export class DuetChoice {
159
178
  value: this.value,
160
179
  component: "duet-choice",
161
180
  });
162
- };
163
- this.toggleInfo = ev => {
164
- ev.stopPropagation();
165
181
  ev.preventDefault();
182
+ ev.stopPropagation();
183
+ };
184
+ this.toggleInfo = () => {
166
185
  this.isInfoOpen = !this.isInfoOpen;
167
186
  };
168
187
  }
@@ -172,6 +191,7 @@ export class DuetChoice {
172
191
  componentWillLoad() {
173
192
  inheritGlobalTheme(this);
174
193
  this.hasInfo = !!this.element.querySelector("[slot='info']");
194
+ this.hasHeader = !!this.element.querySelector('[slot="header"]');
175
195
  this.hasAdditional = !!this.element.querySelector("[slot='additional']");
176
196
  }
177
197
  /**
@@ -185,15 +205,18 @@ export class DuetChoice {
185
205
  // @ts-ignore
186
206
  const isTargetContainedInHost = this.element.contains(ev === null || ev === void 0 ? void 0 : ev.relatedTarget) || false;
187
207
  if (!isTargetContainedInHost) {
188
- this.toggleInfo(ev);
208
+ this.toggleInfo();
189
209
  }
190
210
  }
191
211
  }
192
212
  handleHostKeyDown() {
193
213
  this.isKeyDown = true;
194
214
  }
195
- handleHostKeyUp() {
215
+ handleHostKeyUp(ev) {
196
216
  this.isKeyDown = false;
217
+ if (isEscapeKey(ev) && this.isInfoOpen) {
218
+ this.toggleInfo();
219
+ }
197
220
  }
198
221
  /**
199
222
  * Sets focus on the specified `duet-choice`. Use this method instead of the global
@@ -206,11 +229,13 @@ export class DuetChoice {
206
229
  if (this.accessibleDescribedBy) {
207
230
  return this.accessibleDescribedBy;
208
231
  }
209
- if (this.collapsible) {
210
- return this.collapsibleId;
211
- }
212
- else if (this.hasInfo) {
213
- return this.infoId;
232
+ if (this.collapsible || this.hasInfo) {
233
+ if (this.hasHeader) {
234
+ return this.headerId;
235
+ }
236
+ else {
237
+ return this.expandId;
238
+ }
214
239
  }
215
240
  return null;
216
241
  }
@@ -219,6 +244,7 @@ export class DuetChoice {
219
244
  return {
220
245
  "duet-choice-card-info": true,
221
246
  "duet-choice-card-info-expanded": this.isInfoOpen,
247
+ "duet-choice-card-collapsed": !this.isInfoOpen,
222
248
  "duet-theme-turva": this.theme === "turva",
223
249
  };
224
250
  }
@@ -226,6 +252,7 @@ export class DuetChoice {
226
252
  return {
227
253
  "duet-choice-card-collapsible": true,
228
254
  "duet-choice-card-collapsible-expanded": this.checked,
255
+ "duet-choice-card-collapsed": !this.checked,
229
256
  "duet-choice-card-collapsible-disabled": this.disabled || this.groupDisabled ? true : false,
230
257
  "duet-theme-turva": this.theme === "turva",
231
258
  };
@@ -240,6 +267,7 @@ export class DuetChoice {
240
267
  */
241
268
  render() {
242
269
  const identifier = this.identifier || this.choiceId;
270
+ console.log(this.element);
243
271
  return (h(Host, { class: {
244
272
  horizontal: this.groupDirection === "horizontal" && !this.groupResponsive,
245
273
  "horizontal-responsive": this.groupDirection === "horizontal" && this.groupResponsive,
@@ -260,7 +288,7 @@ export class DuetChoice {
260
288
  collapsible: this.collapsible,
261
289
  "duet-p-0": this.padding === "none",
262
290
  } },
263
- h("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) }),
291
+ h("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) }),
264
292
  h("label", { htmlFor: identifier, class: { "duet-choice-label": true, "no-hover": this.isHovering }, onClick: this.onClick },
265
293
  this.icon && (h("div", { class: "duet-choice-card-icon" },
266
294
  h("duet-icon", { margin: "none", size: "small", name: this.icon, color: "currentColor" }))),
@@ -272,16 +300,26 @@ export class DuetChoice {
272
300
  h("duet-spacer", { size: "xx-small" }),
273
301
  h("slot", { name: "additional" }))),
274
302
  h("div", { class: { "duet-checkmark-container": true, "duet-checkmark-radio": this.type === "radio" } }, this.checked && h("div", { class: "duet-checkmark" })))),
275
- this.hasInfo && !this.collapsible && (h("button", { class: {
303
+ this.hasInfo && !this.collapsible && (h("button", { ref: button => (this.infoButtonEl = button), id: this.infoButtonId, class: {
276
304
  "duet-choice-info-toggle": true,
277
305
  "duet-theme-turva": this.theme === "turva",
278
- }, 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" },
306
+ }, 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" },
279
307
  h("duet-visually-hidden", { "aria-hidden": !this.isBlurred ? "true" : "false" }, this.accessibleLabelInfoButton),
280
308
  h("div", { class: "duet-choice-info-icon" },
281
309
  h("duet-icon", { icon: infoIcon.svg, margin: "none", size: "small", color: "currentColor" }))))),
282
- h("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 : "" },
283
- this.hasInfo && !this.collapsible && h("slot", { name: "info" }),
284
- !this.hasInfo && h("slot", null))));
310
+ this.collapsible || this.hasInfo ? (h("div", { class: this.getClassNames(), id: this.expandId },
311
+ h("span", { class: {
312
+ "duet-choice-section-visible": this.collapsible ? this.checked : this.isInfoOpen,
313
+ "duet-choice-section-hidden": this.collapsible ? !this.checked : !this.isInfoOpen,
314
+ } },
315
+ h("span", { id: this.headerId },
316
+ h("slot", { name: "header" })),
317
+ this.hasInfo ? (h("span", null,
318
+ h("span", { "aria-relevant": "all", "aria-atomic": "true", "aria-live": this.isInfoOpen ? "polite" : "off" },
319
+ h("slot", { name: "info" })),
320
+ h("slot", null))) : (h("span", null,
321
+ h("slot", null)))),
322
+ this.isInfoOpen && h(FocusGuard, { moveFocusTo: this.infoButtonEl }))) : null));
285
323
  }
286
324
  static get is() { return "duet-choice"; }
287
325
  static get encapsulation() { return "scoped"; }
@@ -334,11 +372,11 @@ export class DuetChoice {
334
372
  "defaultValue": "\"label\""
335
373
  },
336
374
  "accessibleLabelInfoButtonDefaults": {
337
- "type": "unknown",
375
+ "type": "string",
338
376
  "mutable": false,
339
377
  "complexType": {
340
- "original": "DuetLangObject",
341
- "resolved": "DuetLangObject",
378
+ "original": "DuetLangObject | string",
379
+ "resolved": "DuetLangObject | string",
342
380
  "references": {
343
381
  "DuetLangObject": {
344
382
  "location": "import",
@@ -352,6 +390,8 @@ export class DuetChoice {
352
390
  "tags": [],
353
391
  "text": "Property to change accessibleLabelInfoButton defaults on the component.\nnormally you would handle these strings on an application level and override @accessibleLabelInfoButton when needed"
354
392
  },
393
+ "attribute": "accessible-label-info-default",
394
+ "reflect": false,
355
395
  "defaultValue": "DuetStringsExternalDefaults"
356
396
  },
357
397
  "accessibleLabelInfoButton": {
@@ -366,8 +406,8 @@ export class DuetChoice {
366
406
  "optional": false,
367
407
  "docs": {
368
408
  "tags": [{
369
- "text": "{fi: \"Avautuu uuteen ikkunaan\",sv: \"\u00D6ppnas i nytt f\u00F6nster\",en: \"Opens in a new window\"}",
370
- "name": "default"
409
+ "name": "default",
410
+ "text": "{fi: \"Avautuu uuteen ikkunaan\",sv: \"\u00D6ppnas i nytt f\u00F6nster\",en: \"Opens in a new window\"}"
371
411
  }],
372
412
  "text": "Accessible label that is read for screen reader users in the info toggle trigger button.\nNot visible for normal users."
373
413
  },
@@ -438,7 +478,7 @@ export class DuetChoice {
438
478
  "optional": false,
439
479
  "docs": {
440
480
  "tags": [],
441
- "text": "Indicates the id of a component that describes the choice."
481
+ "text": "Indicates the id of a component that describes the choice.\nif this is set to an empty string it will prevent screenreaders from flowing to a collapsible content\nand can be used as an escape hatch if that behaviour is undesired."
442
482
  },
443
483
  "attribute": "accessible-described-by",
444
484
  "reflect": false
@@ -669,8 +709,8 @@ export class DuetChoice {
669
709
  "optional": false,
670
710
  "docs": {
671
711
  "tags": [{
672
- "text": "Determines whether the control is displayed horizontally or vertically within\na group.",
673
- "name": "internal"
712
+ "name": "internal",
713
+ "text": "Determines whether the control is displayed horizontally or vertically within\na group."
674
714
  }],
675
715
  "text": ""
676
716
  },
@@ -689,8 +729,8 @@ export class DuetChoice {
689
729
  "optional": false,
690
730
  "docs": {
691
731
  "tags": [{
692
- "text": "Determines, whether the control is disabled from the parent group.",
693
- "name": "internal"
732
+ "name": "internal",
733
+ "text": "Determines, whether the control is disabled from the parent group."
694
734
  }],
695
735
  "text": ""
696
736
  },
@@ -709,8 +749,8 @@ export class DuetChoice {
709
749
  "optional": false,
710
750
  "docs": {
711
751
  "tags": [{
712
- "text": "Determines whether the group has responsive behavior",
713
- "name": "internal"
752
+ "name": "internal",
753
+ "text": "Determines whether the group has responsive behavior"
714
754
  }],
715
755
  "text": ""
716
756
  },
@@ -752,6 +792,53 @@ export class DuetChoice {
752
792
  "attribute": "required",
753
793
  "reflect": false,
754
794
  "defaultValue": "false"
795
+ },
796
+ "infoLabelDefaults": {
797
+ "type": "string",
798
+ "mutable": false,
799
+ "complexType": {
800
+ "original": "DuetLangObject | string",
801
+ "resolved": "DuetLangObject | string",
802
+ "references": {
803
+ "DuetLangObject": {
804
+ "location": "import",
805
+ "path": "../../utils/language-utils"
806
+ }
807
+ }
808
+ },
809
+ "required": false,
810
+ "optional": false,
811
+ "docs": {
812
+ "tags": [{
813
+ "name": "default",
814
+ "text": "{ fi: \"pp.kk.vvvv\", en: \"dd.mm.yyyy\", sv: \"dd.mm.\u00E5\u00E5\u00E5\u00E5\" }"
815
+ }],
816
+ "text": "Placeholder defaults"
817
+ },
818
+ "attribute": "accessible-label-info-default",
819
+ "reflect": false,
820
+ "defaultValue": "{\n fi: \"Lis\u00E4tietoja\",\n en: \"More information about\",\n sv: \"Mera information om\",\n }"
821
+ },
822
+ "infoLabel": {
823
+ "type": "string",
824
+ "mutable": false,
825
+ "complexType": {
826
+ "original": "string",
827
+ "resolved": "string",
828
+ "references": {}
829
+ },
830
+ "required": false,
831
+ "optional": false,
832
+ "docs": {
833
+ "tags": [{
834
+ "name": "default",
835
+ "text": "{\nfi: \"Lis\u00E4tietoja\",\nen: \"More information about\",\nsv: \"Mera information om\",\n}"
836
+ }],
837
+ "text": "Hint text to display before the user types into the date picker input."
838
+ },
839
+ "attribute": "info-label",
840
+ "reflect": false,
841
+ "defaultValue": "getLocaleString(this.infoLabelDefaults, getLanguage())"
755
842
  }
756
843
  }; }
757
844
  static get states() { return {
@@ -30,6 +30,7 @@
30
30
  @media (min-width: 48em) {
31
31
  :host(.horizontal) .duet-choice-group {
32
32
  display: flex;
33
+ margin-bottom: 0;
33
34
  }
34
35
  }
35
36
 
@@ -33,11 +33,11 @@ export class DuetChoiceGroup {
33
33
  /**
34
34
  * Additional caption to show inside the label of the choice group.
35
35
  */
36
- this.caption = "";
36
+ this.caption = undefined;
37
37
  /**
38
38
  * Tooltip to display next to the label of the choice group.
39
39
  */
40
- this.tooltip = "";
40
+ this.tooltip = undefined;
41
41
  /**
42
42
  * With direction setting you can force the tooltip to always open towards left
43
43
  * or right instead of automatically determining the direction.
@@ -309,7 +309,7 @@ export class DuetChoiceGroup {
309
309
  },
310
310
  "attribute": "caption",
311
311
  "reflect": false,
312
- "defaultValue": "\"\""
312
+ "defaultValue": "undefined"
313
313
  },
314
314
  "tooltip": {
315
315
  "type": "string",
@@ -327,7 +327,7 @@ export class DuetChoiceGroup {
327
327
  },
328
328
  "attribute": "tooltip",
329
329
  "reflect": false,
330
- "defaultValue": "\"\""
330
+ "defaultValue": "undefined"
331
331
  },
332
332
  "tooltipDirection": {
333
333
  "type": "string",
@@ -28,7 +28,7 @@
28
28
  min-width: calc(33.333% - 8px);
29
29
  max-width: 100%;
30
30
  text-align: left;
31
- vertical-align: bottom;
31
+ vertical-align: top;
32
32
  }
33
33
  :host:last-child, :host:last-of-type {
34
34
  margin-right: 0 !important;
@@ -46,11 +46,27 @@ export class DuetDatePicker {
46
46
  * Controls the margin of the component.
47
47
  */
48
48
  this.margin = "auto";
49
+ /**
50
+ * The currently active language. This setting changes the month/year/day.
51
+ * names and button labels as well as all screen reader labels.
52
+ * @deprecated this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing.
53
+ * @default "fi"
54
+ */
55
+ this.language = getLanguage();
56
+ /**
57
+ * Placeholder defaults.
58
+ * @default { fi: "pp.kk.vvvv", en: "dd.mm.yyyy", sv: "dd.mm.åååå" }
59
+ */
60
+ this.placeholderDefaults = {
61
+ fi: "pp.kk.vvvv",
62
+ en: "dd.mm.yyyy",
63
+ sv: "dd.mm.åååå",
64
+ };
49
65
  /**
50
66
  * Hint text to display before the user types into the date picker input.
51
67
  * @default { fi: "pp.kk.vvvv", en: "dd.mm.yyyy", sv: "dd.mm.åååå" }
52
68
  */
53
- this.placeholder = getLocaleString({ fi: "pp.kk.vvvv", en: "dd.mm.yyyy", sv: "dd.mm.åååå" });
69
+ this.placeholder = getLocaleString(this.placeholderDefaults, this.language);
54
70
  /**
55
71
  * If form input field has a placeholder text, and user types anything (causing the text to dissapear),
56
72
  * 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)
@@ -61,13 +77,6 @@ export class DuetDatePicker {
61
77
  * interact with the input, and conveys its inactive state to assistive technologies.
62
78
  */
63
79
  this.disabled = false;
64
- /**
65
- * The currently active language. This setting changes the month/year/day
66
- * names and button labels as well as all screen reader labels.
67
- * @deprecated this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing
68
- * @default "fi"
69
- */
70
- this.language = getLanguage();
71
80
  /**
72
81
  * Display the date picker input in error state along with an error message.
73
82
  */
@@ -108,7 +117,7 @@ export class DuetDatePicker {
108
117
  */
109
118
  this.min = "";
110
119
  /**
111
- * Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD
120
+ * Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.
112
121
  * This setting can be used alone or together with the min property.
113
122
  */
114
123
  this.max = "";
@@ -550,7 +559,7 @@ export class DuetDatePicker {
550
559
  "optional": false,
551
560
  "docs": {
552
561
  "tags": [],
553
- "text": "Caption (underneath label) that can be set as a way of adding extra information"
562
+ "text": "Caption (underneath label) that can be set as a way of adding extra information."
554
563
  },
555
564
  "attribute": "caption",
556
565
  "reflect": false
@@ -578,6 +587,61 @@ export class DuetDatePicker {
578
587
  "reflect": false,
579
588
  "defaultValue": "\"auto\""
580
589
  },
590
+ "language": {
591
+ "type": "string",
592
+ "mutable": false,
593
+ "complexType": {
594
+ "original": "DuetLanguage",
595
+ "resolved": "\"en\" | \"fi\" | \"sv\"",
596
+ "references": {
597
+ "DuetLanguage": {
598
+ "location": "import",
599
+ "path": "../../common-types"
600
+ }
601
+ }
602
+ },
603
+ "required": false,
604
+ "optional": false,
605
+ "docs": {
606
+ "tags": [{
607
+ "name": "deprecated",
608
+ "text": "this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing."
609
+ }, {
610
+ "name": "default",
611
+ "text": "\"fi\""
612
+ }],
613
+ "text": "The currently active language. This setting changes the month/year/day.\nnames and button labels as well as all screen reader labels."
614
+ },
615
+ "attribute": "language",
616
+ "reflect": false,
617
+ "defaultValue": "getLanguage()"
618
+ },
619
+ "placeholderDefaults": {
620
+ "type": "string",
621
+ "mutable": false,
622
+ "complexType": {
623
+ "original": "DuetLangObject | string",
624
+ "resolved": "DuetLangObject | string",
625
+ "references": {
626
+ "DuetLangObject": {
627
+ "location": "import",
628
+ "path": "../../utils/language-utils"
629
+ }
630
+ }
631
+ },
632
+ "required": false,
633
+ "optional": false,
634
+ "docs": {
635
+ "tags": [{
636
+ "name": "default",
637
+ "text": "{ fi: \"pp.kk.vvvv\", en: \"dd.mm.yyyy\", sv: \"dd.mm.\u00E5\u00E5\u00E5\u00E5\" }"
638
+ }],
639
+ "text": "Placeholder defaults."
640
+ },
641
+ "attribute": "placeholder-default",
642
+ "reflect": false,
643
+ "defaultValue": "{\n fi: \"pp.kk.vvvv\",\n en: \"dd.mm.yyyy\",\n sv: \"dd.mm.\u00E5\u00E5\u00E5\u00E5\",\n }"
644
+ },
581
645
  "placeholder": {
582
646
  "type": "string",
583
647
  "mutable": false,
@@ -590,14 +654,14 @@ export class DuetDatePicker {
590
654
  "optional": false,
591
655
  "docs": {
592
656
  "tags": [{
593
- "text": "{ fi: \"pp.kk.vvvv\", en: \"dd.mm.yyyy\", sv: \"dd.mm.\u00E5\u00E5\u00E5\u00E5\" }",
594
- "name": "default"
657
+ "name": "default",
658
+ "text": "{ fi: \"pp.kk.vvvv\", en: \"dd.mm.yyyy\", sv: \"dd.mm.\u00E5\u00E5\u00E5\u00E5\" }"
595
659
  }],
596
660
  "text": "Hint text to display before the user types into the date picker input."
597
661
  },
598
662
  "attribute": "placeholder",
599
663
  "reflect": false,
600
- "defaultValue": "getLocaleString({ fi: \"pp.kk.vvvv\", en: \"dd.mm.yyyy\", sv: \"dd.mm.\u00E5\u00E5\u00E5\u00E5\" })"
664
+ "defaultValue": "getLocaleString(this.placeholderDefaults, this.language)"
601
665
  },
602
666
  "echoPlaceholder": {
603
667
  "type": "boolean",
@@ -635,35 +699,6 @@ export class DuetDatePicker {
635
699
  "reflect": true,
636
700
  "defaultValue": "false"
637
701
  },
638
- "language": {
639
- "type": "string",
640
- "mutable": false,
641
- "complexType": {
642
- "original": "DuetLanguage",
643
- "resolved": "\"en\" | \"fi\" | \"sv\"",
644
- "references": {
645
- "DuetLanguage": {
646
- "location": "import",
647
- "path": "../../common-types"
648
- }
649
- }
650
- },
651
- "required": false,
652
- "optional": false,
653
- "docs": {
654
- "tags": [{
655
- "text": "this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing",
656
- "name": "deprecated"
657
- }, {
658
- "text": "\"fi\"",
659
- "name": "default"
660
- }],
661
- "text": "The currently active language. This setting changes the month/year/day\nnames and button labels as well as all screen reader labels."
662
- },
663
- "attribute": "language",
664
- "reflect": false,
665
- "defaultValue": "getLanguage()"
666
- },
667
702
  "error": {
668
703
  "type": "string",
669
704
  "mutable": false,
@@ -914,7 +949,7 @@ export class DuetDatePicker {
914
949
  "optional": false,
915
950
  "docs": {
916
951
  "tags": [],
917
- "text": "Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD\nThis setting can be used alone or together with the min property."
952
+ "text": "Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the min property."
918
953
  },
919
954
  "attribute": "max",
920
955
  "reflect": false,
@@ -0,0 +1,32 @@
1
+ *,
2
+ *::after,
3
+ *::before {
4
+ box-sizing: border-box;
5
+ padding: 0;
6
+ margin: 0;
7
+ background: transparent;
8
+ border: 0;
9
+ -moz-appearance: none;
10
+ -webkit-appearance: none;
11
+ appearance: none;
12
+ }
13
+
14
+ :host button {
15
+ display: flex;
16
+ align-content: space-between;
17
+ justify-content: center;
18
+ min-width: 32px;
19
+ max-width: 32px;
20
+ height: 100%;
21
+ min-height: 32px;
22
+ max-height: 32px;
23
+ padding: 0;
24
+ margin: 0;
25
+ cursor: pointer !important;
26
+ background-color: transparent;
27
+ border: 1px solid;
28
+ border-radius: 50%;
29
+ }
30
+ :host button duet-icon {
31
+ align-self: center;
32
+ }