@duetds/components 4.33.1 → 4.34.2

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 (303) hide show
  1. package/hydrate/index.js +438 -191
  2. package/lib/cjs/{dom-c850c8d7.js → dom-52a4f07a.js} +1 -1
  3. package/lib/cjs/duet-alert.cjs.entry.js +1 -1
  4. package/lib/cjs/duet-badge.cjs.entry.js +1 -1
  5. package/lib/cjs/duet-button_2.cjs.entry.js +2 -2
  6. package/lib/cjs/duet-caption_4.cjs.entry.js +3 -3
  7. package/lib/cjs/duet-card.cjs.entry.js +2 -2
  8. package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
  9. package/lib/cjs/duet-choice_2.cjs.entry.js +2 -2
  10. package/lib/cjs/duet-collapsible.cjs.entry.js +5 -453
  11. package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
  12. package/lib/cjs/duet-date-picker.cjs.entry.js +2 -2
  13. package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
  14. package/lib/cjs/duet-editable-table-button.cjs.entry.js +14 -7
  15. package/lib/cjs/duet-editable-table_4.cjs.entry.js +86 -11
  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 +2 -2
  19. package/lib/cjs/duet-grid_2.cjs.entry.js +26 -3
  20. package/lib/cjs/duet-header_2.cjs.entry.js +220 -47
  21. package/lib/cjs/duet-hero.cjs.entry.js +1 -1
  22. package/lib/cjs/duet-icon.cjs.entry.js +13 -21
  23. package/lib/cjs/duet-input_2.cjs.entry.js +3 -4
  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 +2 -2
  27. package/lib/cjs/duet-notification_2.cjs.entry.js +2 -2
  28. package/lib/cjs/duet-number-input.cjs.entry.js +1 -1
  29. package/lib/cjs/duet-progress.cjs.entry.js +1 -1
  30. package/lib/cjs/duet-radio_2.cjs.entry.js +1 -1
  31. package/lib/cjs/duet-range-slider.cjs.entry.js +1 -1
  32. package/lib/cjs/duet-select.cjs.entry.js +1 -1
  33. package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
  34. package/lib/cjs/duet-tab_2.cjs.entry.js +1 -1
  35. package/lib/cjs/duet-textarea.cjs.entry.js +1 -1
  36. package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
  37. package/lib/cjs/duet-tooltip.cjs.entry.js +1 -1
  38. package/lib/cjs/duet-tray.cjs.entry.js +1 -1
  39. package/lib/cjs/duet-upload-aria-status.cjs.entry.js +1 -1
  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-b609a7a5.js → focus-utils-b57facfe.js} +1 -1
  43. package/lib/cjs/form-search-d61b2843.js +8 -0
  44. package/lib/cjs/{index-9a57d969.js → index-e2021bf7.js} +2 -9
  45. package/lib/cjs/loader.cjs.js +3 -3
  46. package/lib/cjs/{shadow-css-e3edeed1.js → shadow-css-e1b62a99.js} +1 -1
  47. package/lib/cjs/token-utils-05bd23b4.js +77 -0
  48. package/lib/cjs/tokens-8596cece.js +459 -0
  49. package/lib/collection/collection-manifest.json +2 -2
  50. package/lib/collection/components/duet-collapsible/duet-collapsible.js +4 -1
  51. package/lib/collection/components/duet-editable-table/duet-editable-table-button.js +13 -6
  52. package/lib/collection/components/duet-editable-table/duet-editable-table-item.js +25 -3
  53. package/lib/collection/components/duet-editable-table/duet-editable-table-tabledata.js +3 -3
  54. package/lib/collection/components/duet-editable-table/duet-editable-table.js +58 -2
  55. package/lib/collection/components/duet-footer/duet-footer.css +2 -0
  56. package/lib/collection/components/duet-grid/duet-grid.js +25 -2
  57. package/lib/collection/components/duet-header/duet-header-dropdown.js +27 -0
  58. package/lib/collection/components/duet-header/duet-header-hamburger.js +9 -0
  59. package/lib/collection/components/duet-header/duet-header-icon.js +9 -0
  60. package/lib/collection/components/duet-header/duet-header.css +272 -39
  61. package/lib/collection/components/duet-header/duet-header.js +316 -122
  62. package/lib/collection/components/duet-icon/duet-icon.js +11 -5
  63. package/lib/collection/components/duet-icon/icon-utils.js +5 -15
  64. package/lib/collection/components/duet-link/duet-link.js +4 -1
  65. package/lib/collection/components/duet-list-item/duet-list-item.css +1 -1
  66. package/lib/collection/components/duet-notification-drawer/duet-notification-drawer.css +4 -3
  67. package/lib/collection/components/duet-table/duet-table.css +42 -17
  68. package/lib/collection/components/duet-table/duet-table.js +2 -2
  69. package/lib/collection/components/duet-upload/duet-upload.js +26 -4
  70. package/lib/collection/utils/template-utils.js +33 -0
  71. package/lib/collection/utils/token-utils.js +67 -14
  72. package/lib/custom-elements-bundle/index.js +422 -114
  73. package/lib/duet/duet.esm.js +1 -1
  74. package/lib/duet/duet.js +1 -1
  75. package/lib/duet/{p-bf9f6d80.system.entry.js → p-00bf3bbb.system.entry.js} +1 -1
  76. package/lib/duet/{p-75edcaed.entry.js → p-08d1abc7.entry.js} +1 -1
  77. package/lib/duet/{p-2297d13f.system.entry.js → p-0dc01111.system.entry.js} +1 -1
  78. package/lib/duet/{p-19d7d9d5.system.entry.js → p-0e742087.system.entry.js} +1 -1
  79. package/lib/duet/p-12941c46.system.entry.js +4 -0
  80. package/lib/duet/{p-b314348c.system.js → p-13bc14a6.system.js} +2 -2
  81. package/lib/duet/{p-cf319832.system.entry.js → p-13d5fe80.system.entry.js} +1 -1
  82. package/lib/duet/{p-35a3794e.js → p-183726f7.js} +0 -0
  83. package/lib/duet/{p-323643af.system.entry.js → p-1fff32a9.system.entry.js} +1 -1
  84. package/lib/duet/{p-b5c7d304.system.entry.js → p-2524481a.system.entry.js} +1 -1
  85. package/lib/duet/{p-6a5ab3eb.entry.js → p-2862054c.entry.js} +1 -1
  86. package/lib/duet/{p-e1dc86b5.system.js → p-30d13a27.system.js} +1 -1
  87. package/lib/duet/p-354bf924.entry.js +4 -0
  88. package/lib/duet/{p-df6f39a3.entry.js → p-3998eed6.entry.js} +1 -1
  89. package/lib/duet/{p-079795e5.entry.js → p-3e0a774d.entry.js} +1 -1
  90. package/lib/duet/{p-fd613733.entry.js → p-3e273d8d.entry.js} +1 -1
  91. package/lib/duet/{p-2fdcff82.entry.js → p-3e47c910.entry.js} +1 -1
  92. package/lib/duet/{p-de5ec54e.system.entry.js → p-45a6838d.system.entry.js} +1 -1
  93. package/lib/duet/p-4836f66d.entry.js +4 -0
  94. package/lib/duet/{p-af49d4f9.entry.js → p-488addbc.entry.js} +1 -1
  95. package/lib/duet/{p-ba18b56e.entry.js → p-4a742d83.entry.js} +1 -1
  96. package/lib/duet/{p-37cda933.entry.js → p-4d5531be.entry.js} +1 -1
  97. package/lib/duet/{p-00210a63.entry.js → p-4db07868.entry.js} +1 -1
  98. package/lib/duet/p-50b4fb2c.js +4 -0
  99. package/lib/duet/{p-987edcd0.js → p-52621211.js} +0 -0
  100. package/lib/duet/p-582f9135.system.entry.js +4 -0
  101. package/lib/duet/{p-85e52be8.entry.js → p-58d7f2d1.entry.js} +1 -1
  102. package/lib/duet/{p-b25edbbe.entry.js → p-5a5e7977.entry.js} +1 -1
  103. package/lib/duet/{p-85ad012a.system.entry.js → p-5c67bb73.system.entry.js} +1 -1
  104. package/lib/duet/{p-3013c9bb.system.entry.js → p-5e03b63f.system.entry.js} +1 -1
  105. package/lib/duet/{p-e8123a53.entry.js → p-5f2fb5db.entry.js} +1 -1
  106. package/lib/duet/{p-f5a55b3c.entry.js → p-5f813e15.entry.js} +1 -1
  107. package/lib/duet/p-5f866721.entry.js +4 -0
  108. package/lib/duet/p-60aa83c0.js +4 -0
  109. package/lib/duet/{p-bf4596bd.system.entry.js → p-62de4645.system.entry.js} +1 -1
  110. package/lib/duet/{p-360086f8.entry.js → p-66c35cd2.entry.js} +1 -1
  111. package/lib/duet/{p-cbdb9e98.system.entry.js → p-69133107.system.entry.js} +1 -1
  112. package/lib/duet/p-6a8b3cf0.system.entry.js +4 -0
  113. package/lib/duet/{p-c18a599e.system.js → p-6e4fd6ba.system.js} +0 -0
  114. package/lib/duet/{p-e2596ea0.entry.js → p-72ad7798.entry.js} +1 -1
  115. package/lib/duet/{p-32b7397d.entry.js → p-746b3bee.entry.js} +1 -1
  116. package/lib/duet/p-75261615.system.entry.js +4 -0
  117. package/lib/duet/{p-8aaf3383.entry.js → p-760d2226.entry.js} +1 -1
  118. package/lib/duet/{p-7530be48.system.entry.js → p-7a0a375e.system.entry.js} +1 -1
  119. package/lib/duet/p-8143f3de.js +4 -0
  120. package/lib/duet/p-8b01f978.system.entry.js +4 -0
  121. package/lib/duet/{p-6e4b1c0d.entry.js → p-8d42cb7c.entry.js} +1 -1
  122. package/lib/duet/p-8e16057d.system.entry.js +4 -0
  123. package/lib/duet/p-8f477bd6.system.js +4 -0
  124. package/lib/duet/p-90e7e876.entry.js +4 -0
  125. package/lib/duet/{p-09013a48.system.entry.js → p-939bf739.system.entry.js} +1 -1
  126. package/lib/duet/{p-0205162d.entry.js → p-9793f3d8.entry.js} +1 -1
  127. package/lib/duet/p-9849a4ab.system.entry.js +4 -0
  128. package/lib/duet/{p-5cfc53f9.entry.js → p-9d487a0d.entry.js} +1 -1
  129. package/lib/duet/p-a16a58c1.system.js +4 -0
  130. package/lib/duet/p-a52d436c.entry.js +4 -0
  131. package/lib/duet/{p-e48f3a32.system.entry.js → p-a58f0665.system.entry.js} +1 -1
  132. package/lib/duet/{p-9e79e033.entry.js → p-a900d55b.entry.js} +1 -1
  133. package/lib/duet/p-ae46a7d2.system.entry.js +4 -0
  134. package/lib/duet/{p-6f36f647.system.entry.js → p-ae8401c9.system.entry.js} +1 -1
  135. package/lib/duet/{p-e60ee8b0.entry.js → p-b70f164d.entry.js} +1 -1
  136. package/lib/duet/{p-3ba62cf1.system.entry.js → p-b8dde0c8.system.entry.js} +1 -1
  137. package/lib/duet/{p-e5031543.entry.js → p-baef2241.entry.js} +1 -1
  138. package/lib/duet/{p-ef7251bf.entry.js → p-c50bbff5.entry.js} +1 -1
  139. package/lib/duet/{p-3fd9190b.system.entry.js → p-c67a63cc.system.entry.js} +1 -1
  140. package/lib/duet/p-c6ba80c6.entry.js +4 -0
  141. package/lib/duet/{p-e7b90769.system.entry.js → p-c92b1af1.system.entry.js} +1 -1
  142. package/lib/duet/{p-71a77368.system.entry.js → p-cdaa629d.system.entry.js} +1 -1
  143. package/lib/duet/{p-c1a1ea1b.js → p-ce566b2b.js} +1 -1
  144. package/lib/duet/p-d004da5f.js +4 -0
  145. package/lib/duet/{p-e70088d5.entry.js → p-d1adeb76.entry.js} +1 -1
  146. package/lib/duet/{p-5decc259.system.entry.js → p-d3b5d2ef.system.entry.js} +1 -1
  147. package/lib/duet/{p-a2a00146.system.entry.js → p-db87c4b1.system.entry.js} +1 -1
  148. package/lib/duet/{p-9f35d682.entry.js → p-ddbdac54.entry.js} +1 -1
  149. package/lib/duet/{p-e370c18b.entry.js → p-de23ae41.entry.js} +1 -1
  150. package/lib/duet/{p-f0cfe033.system.entry.js → p-e0038277.system.entry.js} +1 -1
  151. package/lib/duet/p-e1c6f74b.entry.js +4 -0
  152. package/lib/duet/{p-1cbc6269.entry.js → p-e242bf98.entry.js} +1 -1
  153. package/lib/duet/{p-51955fc0.system.js → p-e3973f41.system.js} +1 -1
  154. package/lib/duet/{p-0d22396e.system.js → p-e5c1751e.system.js} +0 -0
  155. package/lib/duet/p-ec5d0cda.entry.js +4 -0
  156. package/lib/duet/{p-43847557.entry.js → p-ee74ff67.entry.js} +1 -1
  157. package/lib/duet/{p-6a4d85ed.system.entry.js → p-eed6f9cc.system.entry.js} +1 -1
  158. package/lib/duet/{p-7a8597c2.system.entry.js → p-f01494f9.system.entry.js} +1 -1
  159. package/lib/duet/{p-b4111e88.system.entry.js → p-f2c402a9.system.entry.js} +1 -1
  160. package/lib/duet/{p-4b6e8558.system.entry.js → p-f3c258d8.system.entry.js} +1 -1
  161. package/lib/duet/{p-2a822e91.system.entry.js → p-f6e1fb0f.system.entry.js} +1 -1
  162. package/lib/duet/{p-020a2c42.system.entry.js → p-f7f4f98a.system.entry.js} +1 -1
  163. package/lib/duet/{p-dd76db9b.system.entry.js → p-f9a096a9.system.entry.js} +1 -1
  164. package/lib/duet/p-fa99eaa4.system.js +4 -0
  165. package/lib/duet/{p-6024e484.system.entry.js → p-ffd449ef.system.entry.js} +1 -1
  166. package/lib/esm/{dom-58cd15f6.js → dom-5d060ace.js} +1 -1
  167. package/lib/esm/duet-alert.entry.js +1 -1
  168. package/lib/esm/duet-badge.entry.js +1 -1
  169. package/lib/esm/duet-button_2.entry.js +2 -2
  170. package/lib/esm/duet-caption_4.entry.js +3 -3
  171. package/lib/esm/duet-card.entry.js +2 -2
  172. package/lib/esm/duet-checkbox.entry.js +1 -1
  173. package/lib/esm/duet-choice_2.entry.js +2 -2
  174. package/lib/esm/duet-collapsible.entry.js +4 -452
  175. package/lib/esm/duet-cookie-consent.entry.js +1 -1
  176. package/lib/esm/duet-date-picker.entry.js +2 -2
  177. package/lib/esm/duet-divider_2.entry.js +1 -1
  178. package/lib/esm/duet-editable-table-button.entry.js +14 -7
  179. package/lib/esm/duet-editable-table_4.entry.js +86 -11
  180. package/lib/esm/duet-empty-state.entry.js +1 -1
  181. package/lib/esm/duet-fieldset.entry.js +1 -1
  182. package/lib/esm/duet-footer.entry.js +2 -2
  183. package/lib/esm/duet-grid_2.entry.js +26 -3
  184. package/lib/esm/duet-header_2.entry.js +220 -47
  185. package/lib/esm/duet-hero.entry.js +1 -1
  186. package/lib/esm/duet-icon.entry.js +13 -21
  187. package/lib/esm/duet-input_2.entry.js +2 -3
  188. package/lib/esm/duet-layout.entry.js +1 -1
  189. package/lib/esm/duet-list_2.entry.js +2 -2
  190. package/lib/esm/duet-modal.entry.js +2 -2
  191. package/lib/esm/duet-notification_2.entry.js +2 -2
  192. package/lib/esm/duet-number-input.entry.js +1 -1
  193. package/lib/esm/duet-progress.entry.js +1 -1
  194. package/lib/esm/duet-radio_2.entry.js +1 -1
  195. package/lib/esm/duet-range-slider.entry.js +1 -1
  196. package/lib/esm/duet-select.entry.js +1 -1
  197. package/lib/esm/duet-step_2.entry.js +1 -1
  198. package/lib/esm/duet-tab_2.entry.js +1 -1
  199. package/lib/esm/duet-textarea.entry.js +1 -1
  200. package/lib/esm/duet-toggle.entry.js +1 -1
  201. package/lib/esm/duet-tooltip.entry.js +1 -1
  202. package/lib/esm/duet-tray.entry.js +1 -1
  203. package/lib/esm/duet-upload-aria-status.entry.js +1 -1
  204. package/lib/esm/duet-visually-hidden.entry.js +1 -1
  205. package/lib/esm/duet.js +4 -4
  206. package/lib/esm/{focus-utils-aeb6ca93.js → focus-utils-fc14cf36.js} +1 -1
  207. package/lib/esm/form-search-ea8e19ae.js +6 -0
  208. package/lib/esm/{index-e8c7d36f.js → index-9ef5d3bc.js} +3 -9
  209. package/lib/esm/loader.js +3 -3
  210. package/lib/esm/{shadow-css-7c726abb.js → shadow-css-13d024f4.js} +1 -1
  211. package/lib/esm/token-utils-75f78ca4.js +75 -0
  212. package/lib/esm/tokens-e110dc89.js +453 -0
  213. package/lib/esm-es5/{dom-58cd15f6.js → dom-5d060ace.js} +0 -0
  214. package/lib/esm-es5/duet-alert.entry.js +1 -1
  215. package/lib/esm-es5/duet-badge.entry.js +1 -1
  216. package/lib/esm-es5/duet-button_2.entry.js +1 -1
  217. package/lib/esm-es5/duet-caption_4.entry.js +1 -1
  218. package/lib/esm-es5/duet-card.entry.js +1 -1
  219. package/lib/esm-es5/duet-checkbox.entry.js +1 -1
  220. package/lib/esm-es5/duet-choice_2.entry.js +2 -2
  221. package/lib/esm-es5/duet-collapsible.entry.js +2 -2
  222. package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
  223. package/lib/esm-es5/duet-date-picker.entry.js +1 -1
  224. package/lib/esm-es5/duet-divider_2.entry.js +1 -1
  225. package/lib/esm-es5/duet-editable-table-button.entry.js +1 -1
  226. package/lib/esm-es5/duet-editable-table_4.entry.js +2 -2
  227. package/lib/esm-es5/duet-empty-state.entry.js +1 -1
  228. package/lib/esm-es5/duet-fieldset.entry.js +1 -1
  229. package/lib/esm-es5/duet-footer.entry.js +1 -1
  230. package/lib/esm-es5/duet-grid_2.entry.js +2 -2
  231. package/lib/esm-es5/duet-header_2.entry.js +2 -2
  232. package/lib/esm-es5/duet-hero.entry.js +1 -1
  233. package/lib/esm-es5/duet-icon.entry.js +2 -2
  234. package/lib/esm-es5/duet-input_2.entry.js +1 -1
  235. package/lib/esm-es5/duet-layout.entry.js +1 -1
  236. package/lib/esm-es5/duet-list_2.entry.js +1 -1
  237. package/lib/esm-es5/duet-modal.entry.js +1 -1
  238. package/lib/esm-es5/duet-notification_2.entry.js +1 -1
  239. package/lib/esm-es5/duet-number-input.entry.js +1 -1
  240. package/lib/esm-es5/duet-progress.entry.js +1 -1
  241. package/lib/esm-es5/duet-radio_2.entry.js +1 -1
  242. package/lib/esm-es5/duet-range-slider.entry.js +1 -1
  243. package/lib/esm-es5/duet-select.entry.js +1 -1
  244. package/lib/esm-es5/duet-step_2.entry.js +1 -1
  245. package/lib/esm-es5/duet-tab_2.entry.js +1 -1
  246. package/lib/esm-es5/duet-textarea.entry.js +1 -1
  247. package/lib/esm-es5/duet-toggle.entry.js +1 -1
  248. package/lib/esm-es5/duet-tooltip.entry.js +1 -1
  249. package/lib/esm-es5/duet-tray.entry.js +1 -1
  250. package/lib/esm-es5/duet-upload-aria-status.entry.js +1 -1
  251. package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
  252. package/lib/esm-es5/duet.js +1 -1
  253. package/lib/esm-es5/{focus-utils-aeb6ca93.js → focus-utils-fc14cf36.js} +1 -1
  254. package/lib/esm-es5/form-search-ea8e19ae.js +4 -0
  255. package/lib/esm-es5/{index-e8c7d36f.js → index-9ef5d3bc.js} +2 -2
  256. package/lib/esm-es5/loader.js +1 -1
  257. package/lib/esm-es5/{shadow-css-7c726abb.js → shadow-css-13d024f4.js} +0 -0
  258. package/lib/esm-es5/token-utils-75f78ca4.js +4 -0
  259. package/lib/esm-es5/tokens-e110dc89.js +4 -0
  260. package/lib/html.html-data.json +29 -10
  261. package/lib/types/common-types.d.ts +0 -1
  262. package/lib/types/components/duet-collapsible/duet-collapsible.d.ts +3 -0
  263. package/lib/types/components/duet-editable-table/duet-editable-table-button.d.ts +1 -0
  264. package/lib/types/components/duet-editable-table/duet-editable-table-item.d.ts +5 -1
  265. package/lib/types/components/duet-editable-table/duet-editable-table-tabledata.d.ts +1 -0
  266. package/lib/types/components/duet-editable-table/duet-editable-table.d.ts +10 -0
  267. package/lib/types/components/duet-grid/duet-grid.d.ts +1 -0
  268. package/lib/types/components/duet-header/duet-header-dropdown.d.ts +16 -0
  269. package/lib/types/components/duet-header/duet-header-hamburger.d.ts +2 -0
  270. package/lib/types/components/duet-header/duet-header-icon.d.ts +8 -0
  271. package/lib/types/components/duet-header/duet-header.d.ts +41 -4
  272. package/lib/types/components/duet-icon/duet-icon.d.ts +1 -1
  273. package/lib/types/components/duet-icon/icon-utils.d.ts +1 -1
  274. package/lib/types/components/duet-link/duet-link.d.ts +3 -0
  275. package/lib/types/components/duet-table/duet-table.d.ts +1 -1
  276. package/lib/types/components/duet-upload/duet-upload.d.ts +4 -0
  277. package/lib/types/components.d.ts +46 -10
  278. package/lib/types/stencil-public-runtime.d.ts +6 -4
  279. package/lib/types/utils/template-utils.d.ts +13 -0
  280. package/lib/types/utils/token-utils.d.ts +8 -2
  281. package/package.json +13 -14
  282. package/lib/cjs/token-utils-63a9c8dc.js +0 -30
  283. package/lib/duet/p-0a89315d.entry.js +0 -4
  284. package/lib/duet/p-0e90f075.system.entry.js +0 -4
  285. package/lib/duet/p-3212a556.entry.js +0 -4
  286. package/lib/duet/p-3c1971d8.js +0 -4
  287. package/lib/duet/p-4c5eedf8.entry.js +0 -4
  288. package/lib/duet/p-4c827f0d.entry.js +0 -4
  289. package/lib/duet/p-5e0071d6.js +0 -4
  290. package/lib/duet/p-5e77432e.system.entry.js +0 -4
  291. package/lib/duet/p-68008644.entry.js +0 -4
  292. package/lib/duet/p-69385972.system.entry.js +0 -4
  293. package/lib/duet/p-6e363557.system.js +0 -4
  294. package/lib/duet/p-6fa6c4fb.system.entry.js +0 -4
  295. package/lib/duet/p-73f9db25.system.entry.js +0 -4
  296. package/lib/duet/p-74f4a0d8.system.entry.js +0 -4
  297. package/lib/duet/p-a545398c.entry.js +0 -4
  298. package/lib/duet/p-b6e9860a.entry.js +0 -4
  299. package/lib/duet/p-c742856b.system.entry.js +0 -4
  300. package/lib/duet/p-d67fff56.entry.js +0 -4
  301. package/lib/duet/p-f2a087a8.system.entry.js +0 -4
  302. package/lib/esm/token-utils-590d9413.js +0 -28
  303. package/lib/esm-es5/token-utils-590d9413.js +0 -4
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-e8c7d36f.js';
4
+ import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-9ef5d3bc.js';
5
5
  import { s as sanitizeString, g as getLocaleString } from './language-utils-344d894c.js';
6
6
  import { i as inheritGlobalTheme } from './themeable-component-572685dd.js';
7
7
  import { m as mediaQueryMedium, h as mediaQueryLarge, i as mediaQueryXLarge, j as mediaQueryXxLarge, k as mediaQueryXxxLarge, l as mediaQuerySmall, n as sizeNavigation, s as sizeHeader } from './tokens.module-49cbf963.js';
@@ -18,11 +18,43 @@ const debounce = (func, timeout = 50) => {
18
18
  };
19
19
  };
20
20
 
21
+ /**
22
+ * Produces a function which uses template strings to do simple interpolation from objects.
23
+ *
24
+ * Usage:
25
+ * var makeMeKing = generateTemplateFn('${name} is now the king of ${country}!');
26
+ *
27
+ * console.log(makeMeKing({ name: 'Bryan', country: 'Scotland'}));
28
+ * // Logs 'Bryan is now the king of Scotland!'
29
+ */
30
+ const generateTemplateFn = (function () {
31
+ const cache = {};
32
+ function generateTemplate(template) {
33
+ if (typeof template !== "string") {
34
+ template = template.outerHTML;
35
+ }
36
+ let fn = cache[template];
37
+ if (!fn) {
38
+ // Replace ${expressions} (etc) with ${map.expressions}.
39
+ const sanitized = template
40
+ .replace(/\$\{([\s]*[^;\s\{]+[\s]*)\}/g, function (_, match) {
41
+ return `\$\{map.${match.trim()}\}`;
42
+ })
43
+ // Afterwards, replace anything that's not ${map.expressions}' (etc) with a blank string.
44
+ .replace(/(\$\{(?!map\.)[^}]+\})/g, "");
45
+ fn = Function("map", `return \`${sanitized}\``);
46
+ }
47
+ return fn;
48
+ }
49
+ return generateTemplate;
50
+ })();
51
+
21
52
  const duetEditableTableCss = "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{padding:0 !important;font-size:0;border-bottom:0}";
22
53
 
23
54
  let DuetEditableTable = class {
24
55
  constructor(hostRef) {
25
56
  registerInstance(this, hostRef);
57
+ this.template = undefined;
26
58
  /**
27
59
  * State() variables
28
60
  * @internal
@@ -32,6 +64,10 @@ let DuetEditableTable = class {
32
64
  * Map of items that contain list of things.
33
65
  */
34
66
  this.items = new Map();
67
+ /**
68
+ * Key used to set vertical alignment of action buttons
69
+ */
70
+ this.alignment = "middle";
35
71
  /**
36
72
  * Array of internationalized defaults for the default groups labels.
37
73
  */
@@ -80,12 +116,40 @@ let DuetEditableTable = class {
80
116
  * Exposes the aria role for optimizing accessibility.
81
117
  */
82
118
  this.accessibleRole = undefined;
119
+ /**
120
+ * Theme of the table.
121
+ */
122
+ this.theme = "";
83
123
  /**
84
124
  * Private methods.
85
125
  */
86
126
  this.kick = debounce(() => {
87
127
  this.tick = Date.now();
88
128
  }, 100); // will trigger re-render
129
+ /**
130
+ * If a user defines a template section within editable table, try to read an use it.
131
+ */
132
+ this.getTemplate = () => {
133
+ const templateDom = this.element.getElementsByTagName("template");
134
+ if (templateDom === null || templateDom === void 0 ? void 0 : templateDom.length) {
135
+ const templateString = templateDom[0].content.firstElementChild.outerHTML;
136
+ return generateTemplateFn(templateString);
137
+ }
138
+ else {
139
+ return false;
140
+ }
141
+ };
142
+ this.getItemData = (data) => {
143
+ const { item, group, uid } = data;
144
+ if (this.template) {
145
+ return {
146
+ group,
147
+ uid,
148
+ item: this.template(item),
149
+ };
150
+ }
151
+ return { item, group, uid };
152
+ };
89
153
  this.filterMap = needle => {
90
154
  if (needle === "all") {
91
155
  return Array.from(this.items);
@@ -97,6 +161,9 @@ let DuetEditableTable = class {
97
161
  * Component lifecycle events.
98
162
  */
99
163
  componentWillLoad() {
164
+ // look for a <template> region in the duet-editable-table
165
+ this.template = this.getTemplate();
166
+ // take care of the case where groups and actions are defined as html properties instead of javascript objects
100
167
  if (typeof this.groups === "string") {
101
168
  this.internalGroupArray = sanitizeString(this.groups);
102
169
  }
@@ -135,7 +202,7 @@ let DuetEditableTable = class {
135
202
  ? getLocaleString(group.actionLabel)
136
203
  : getLocaleString(this.actionLabelDefaults))))), h("tbody", null, currentGroup.map(dataAsArray => {
137
204
  const [key, value] = dataAsArray;
138
- return (h("duet-editable-table-item", { keyName: key, data: Object.assign({}, value), groupId: group.id, part: group.id, actions: this.internalActionsArray }));
205
+ return (h("duet-editable-table-item", { theme: this.theme, keyName: key, data: this.getItemData(value), groupId: group.id, part: group.id, alignment: this.alignment, actions: this.internalActionsArray }));
139
206
  })))));
140
207
  })));
141
208
  }
@@ -144,12 +211,12 @@ let DuetEditableTable = class {
144
211
  DuetEditableTable.style = duetEditableTableCss;
145
212
 
146
213
  //simple functional component that renders the data in the table
147
- const TableData = ({ data, groupId }, _children) => {
214
+ const TableData = ({ data, groupId, alignment }, _children) => {
148
215
  if (typeof data === "string") {
149
- return h("td", { innerHTML: data, class: "duet-editable-table-content", part: `${groupId}content` });
216
+ return (h("td", { innerHTML: data, class: "duet-editable-table-content", part: `${groupId}content`, style: { verticalAlign: alignment } }));
150
217
  }
151
218
  else {
152
- return (h("td", { class: "duet-editable-table-content", part: `${groupId}content` }, data));
219
+ return (h("td", { class: "duet-editable-table-content", part: `${groupId}content`, style: { verticalAlign: alignment } }, data));
153
220
  }
154
221
  };
155
222
 
@@ -173,6 +240,10 @@ let DuetEditableTableItem = class {
173
240
  * @internal
174
241
  */
175
242
  this.groupId = "";
243
+ /**
244
+ * Key used to set vertical alignment of action buttons
245
+ */
246
+ this.alignment = "middle";
176
247
  /**
177
248
  * Key used to identify item, when running actions
178
249
  */
@@ -201,7 +272,7 @@ let DuetEditableTableItem = class {
201
272
  * Always the last one in the class.
202
273
  */
203
274
  render() {
204
- return (h(Host, { role: "row" }, h(TableData, { data: this.data.item, groupId: this.groupId }), h("td", { class: "duet-editable-table-actions" }, h("div", { class: "duet-editable-table-actions-items", part: `${this.groupId}actions` }, this.actions.map(result => {
275
+ return (h(Host, { role: "row" }, h(TableData, { data: this.data.item, alignment: this.alignment, groupId: this.groupId }), h("td", { class: "duet-editable-table-actions", style: { verticalAlign: this.alignment } }, h("div", { class: "duet-editable-table-actions-items", part: `${this.groupId}actions` }, this.actions.map(result => {
205
276
  const { map = undefined } = result;
206
277
  // if map has been specified, only show the current action if groupID matches the map array
207
278
  if (map && !map.includes(this.groupId)) {
@@ -217,7 +288,7 @@ let DuetEditableTableItem = class {
217
288
  };
218
289
  DuetEditableTableItem.style = duetEditableTableItemCss;
219
290
 
220
- const duetTableCss = "duet-table{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:block;font-variant-numeric:tabular-nums}duet-table table,duet-table thead,duet-table tbody,duet-table tfoot,duet-table th,duet-table td,duet-table tr{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}duet-table.duet-m-0{margin:0 !important}duet-table table{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;text-align:left;border-spacing:0;border-collapse:separate}duet-table.duet-theme-turva table{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}duet-table td{-webkit-hyphens:auto;hyphens:auto;color:#00294d}duet-table.duet-theme-turva td{color:#171c3a}duet-table th{font-weight:600;line-height:1.25;color:#657787;text-align:left}duet-table.duet-theme-turva th{color:#747475}duet-table tbody th{font-weight:600;color:#00294d}duet-table.duet-theme-turva tbody th{color:#171c3a}.duet-table-flattened table,.duet-table-flattened thead,.duet-table-flattened tbody,.duet-table-flattened tfoot,.duet-table-flattened th,.duet-table-flattened td,.duet-table-flattened tr{display:block}.duet-table-flattened thead tr{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-table-flattened td{line-height:1.25}.duet-table-flattened td:not(:last-child){margin-bottom:16px !important}.duet-table-flattened tbody td,.duet-table-flattened tbody th,.duet-table-flattened tfoot td{padding:0 !important;text-align:left !important}.duet-table-flattened tbody th{font-weight:600;line-height:1.25;color:#657787;text-align:left}.duet-table-flattened td[data-heading]::before{margin-bottom:4px !important;display:block;font-size:1rem;font-weight:600;color:#00294d;content:attr(data-heading)}.duet-table-flattened.duet-theme-turva td[data-heading]::before{color:#171c3a}.duet-table-sticky thead th{position:sticky;top:0;background:white}.duet-table-striped td,.duet-table-striped th{padding:20px !important}@media (max-width: 35.9375em){.duet-table-striped td,.duet-table-striped th{padding:20px 12px !important}}.duet-table-striped tbody th{background:white}.duet-table-striped.duet-table-sticky thead th{border-bottom:1px solid #e1e3e6}.duet-table-striped.duet-table-sticky.duet-theme-turva thead th{border-bottom-color:#e4e4e6}.duet-table-striped tbody:not(:first-of-type) th{padding-top:40px !important}.duet-table-striped tbody:only-of-type tr:nth-of-type(odd){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:only-of-type tr:nth-of-type(odd){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tfoot td{border-top:1px solid #e1e3e6}.duet-table-striped.duet-theme-turva tfoot td{border-top-color:#e4e4e6}.duet-table-striped.duet-table-flattened tbody:not(:first-of-type) th{padding-top:20px !important}.duet-table-striped.duet-table-flattened tr{padding:20px !important}.duet-table-striped.duet-table-flattened tfoot td{border-top:0}.duet-table-striped.duet-table-flattened tfoot tr{border-top:1px solid #e1e3e6}.duet-table-striped.duet-table-flattened.duet-theme-turva tfoot tr{border-top-color:#e4e4e6}.duet-table-minimal th,.duet-table-plain th{padding:16px !important;border-bottom:1px solid #657787}.duet-table-minimal th:first-child,.duet-table-plain th:first-child{padding-left:0 !important}.duet-table-minimal th:last-child,.duet-table-plain th:last-child{padding-right:0 !important}.duet-theme-turva.duet-table-minimal th,.duet-theme-turva.duet-table-plain th{border-bottom-color:#444445}.duet-table-minimal tbody th,.duet-table-plain tbody th{padding-top:40px !important;border-bottom-color:#e1e3e6}.duet-theme-turva.duet-table-minimal tbody th,.duet-theme-turva.duet-table-plain tbody th{border-bottom-color:#e4e4e6}.duet-table-minimal td,.duet-table-plain td{padding:16px !important}.duet-table-minimal td:first-child,.duet-table-plain td:first-child{padding-left:0 !important}.duet-table-minimal td:last-child,.duet-table-plain td:last-child{padding-right:0 !important}.duet-table-minimal tbody td,.duet-table-plain tbody td{border-bottom:1px solid #e1e3e6}.duet-theme-turva.duet-table-minimal tbody td,.duet-theme-turva.duet-table-plain tbody td{border-bottom-color:#e4e4e6}.duet-table-flattened.duet-table-minimal tbody:first-of-type th,.duet-table-flattened.duet-table-plain tbody:first-of-type th{padding-top:0 !important}.duet-table-flattened.duet-table-minimal td,.duet-table-flattened.duet-table-plain td,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{border-bottom:0}.duet-table-flattened.duet-table-minimal tr,.duet-table-flattened.duet-table-plain tr{padding:20px 0 !important}.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{padding-top:20px !important}.duet-table-flattened.duet-table-minimal tfoot td,.duet-table-flattened.duet-table-plain tfoot td{margin-bottom:4px !important}.duet-table-flattened.duet-table-minimal tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-plain tbody:not(:only-of-type) tr:first-child{border-bottom:0}.duet-table-plain.duet-table-flattened tbody tr{border-bottom:1px solid #e1e3e6}.duet-table-plain.duet-table-flattened.duet-theme-turva tbody tr{border-bottom-color:#e4e4e6}.duet-table-minimal tbody tr,.duet-table-minimal tbody tr td{vertical-align:top;border-bottom:0 none}.duet-table-minimal tbody tr:last-of-type,.duet-table-minimal tbody tr:last-of-type td{border-bottom:1px solid #e1e3e6}.duet-table-minimal.duet-table-flattened tbody tr,.duet-table-minimal.duet-table-flattened tbody tr td{border-bottom:0 none}.duet-table-minimal.duet-table-flattened tbody tr td[data-heading]::before{display:none}.duet-table-minimal.duet-table-flattened tfoot{border-top:1px solid #e1e3e6}.duet-table-minimal.duet-table-flattened.duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-scrollable{position:relative;width:100%;overflow-x:auto;background:linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0)), linear-gradient(-90deg, #fff 0%, rgba(255, 255, 255, 0)) 100% 0, radial-gradient(farthest-side at 0% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)) 100% 0%;background-repeat:no-repeat;background-attachment:local, local, scroll, scroll;background-size:100px 100%, 100px 100%, 12px 100%, 12px 100%}.duet-table-selected-column{background:rgba(0, 119, 179, 0.08)}.duet-theme-turva .duet-table-selected-column{background:rgba(68, 68, 69, 0.08)}";
291
+ const duetTableCss = "duet-table{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:block;font-variant-numeric:tabular-nums}duet-table table,duet-table thead,duet-table tbody,duet-table tfoot,duet-table th,duet-table td,duet-table tr{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}duet-table.duet-m-0{margin:0 !important}duet-table table{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;text-align:left;border-spacing:0;border-collapse:separate}duet-table.duet-theme-turva table{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}duet-table td{-webkit-hyphens:auto;hyphens:auto;color:#00294d}duet-table.duet-theme-turva td{color:#171c3a}duet-table th{font-weight:600;line-height:1.25;color:#657787;text-align:left}duet-table.duet-theme-turva th{color:#747475}duet-table tbody th{font-weight:600;color:#00294d}duet-table.duet-theme-turva tbody th{color:#171c3a}.duet-table-flattened table,.duet-table-flattened thead,.duet-table-flattened tbody,.duet-table-flattened tfoot,.duet-table-flattened th,.duet-table-flattened td,.duet-table-flattened tr{display:block}.duet-table-flattened thead tr{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-table-flattened td{line-height:1.25}.duet-table-flattened td:not(:last-child){margin-bottom:16px !important}.duet-table-flattened tbody td,.duet-table-flattened tbody th,.duet-table-flattened tfoot td{padding:0 !important;text-align:left !important}.duet-table-flattened tbody th{font-weight:600;line-height:1.25;color:#657787;text-align:left}.duet-table-flattened td[data-heading]::before{margin-bottom:4px !important;display:block;font-size:1rem;font-weight:600;color:#00294d;content:attr(data-heading)}.duet-table-flattened.duet-theme-turva td[data-heading]::before{color:#171c3a}.duet-table-sticky thead th{position:sticky;top:0;background:white}.duet-table-striped td,.duet-table-striped th{padding:20px !important}@media (max-width: 35.9375em){.duet-table-striped td,.duet-table-striped th{padding:20px 12px !important}}.duet-table-striped tbody th{background:white}.duet-table-striped.duet-table-sticky thead th{border-bottom:1px solid #e1e3e6}.duet-table-striped.duet-table-sticky.duet-theme-turva thead th{border-bottom-color:#e4e4e6}.duet-table-striped tbody:not(:first-of-type) th{padding-top:40px !important}.duet-table-striped tbody:only-of-type tr:nth-of-type(odd){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:only-of-type tr:nth-of-type(odd){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tfoot td{border-top:1px solid #e1e3e6}.duet-table-striped.duet-theme-turva tfoot td{border-top-color:#e4e4e6}.duet-table-striped.duet-table-flattened tbody:not(:first-of-type) th{padding-top:20px !important}.duet-table-striped.duet-table-flattened tr{padding:20px !important}.duet-table-striped.duet-table-flattened tfoot td{border-top:0}.duet-table-striped.duet-table-flattened tfoot tr{border-top:1px solid #e1e3e6}.duet-table-striped.duet-table-flattened.duet-theme-turva tfoot tr{border-top-color:#e4e4e6}.duet-table-fixed th,.duet-table-minimal th,.duet-table-plain th{padding:16px !important;border-bottom:1px solid #657787}.duet-table-fixed th:first-child,.duet-table-minimal th:first-child,.duet-table-plain th:first-child{padding-left:0 !important}.duet-table-fixed th:last-child,.duet-table-minimal th:last-child,.duet-table-plain th:last-child{padding-right:0 !important}.duet-theme-turva.duet-table-fixed th,.duet-theme-turva.duet-table-minimal th,.duet-theme-turva.duet-table-plain th{border-bottom-color:#444445}.duet-table-fixed tbody th,.duet-table-minimal tbody th,.duet-table-plain tbody th{padding-top:40px !important;border-bottom-color:#e1e3e6}.duet-theme-turva.duet-table-fixed tbody th,.duet-theme-turva.duet-table-minimal tbody th,.duet-theme-turva.duet-table-plain tbody th{border-bottom-color:#e4e4e6}.duet-table-fixed td,.duet-table-minimal td,.duet-table-plain td{padding:16px !important}.duet-table-fixed td:first-child,.duet-table-minimal td:first-child,.duet-table-plain td:first-child{padding-left:0 !important}.duet-table-fixed td:last-child,.duet-table-minimal td:last-child,.duet-table-plain td:last-child{padding-right:0 !important}.duet-table-fixed tbody td,.duet-table-minimal tbody td,.duet-table-plain tbody td{border-bottom:1px solid #e1e3e6}.duet-theme-turva.duet-table-fixed tbody td,.duet-theme-turva.duet-table-minimal tbody td,.duet-theme-turva.duet-table-plain tbody td{border-bottom-color:#e4e4e6}.duet-table-flattened.duet-table-fixed tbody:first-of-type th,.duet-table-flattened.duet-table-minimal tbody:first-of-type th,.duet-table-flattened.duet-table-plain tbody:first-of-type th{padding-top:0 !important}.duet-table-flattened.duet-table-fixed td,.duet-table-flattened.duet-table-minimal td,.duet-table-flattened.duet-table-plain td,.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{border-bottom:0}.duet-table-flattened.duet-table-fixed tr,.duet-table-flattened.duet-table-minimal tr,.duet-table-flattened.duet-table-plain tr{padding:20px 0 !important}.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{padding-top:20px !important}.duet-table-flattened.duet-table-fixed tfoot td,.duet-table-flattened.duet-table-minimal tfoot td,.duet-table-flattened.duet-table-plain tfoot td{margin-bottom:4px !important}.duet-table-flattened.duet-table-fixed tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-minimal tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-plain tbody:not(:only-of-type) tr:first-child{border-bottom:0}.duet-table-plain.duet-table-flattened tbody tr{border-bottom:1px solid #e1e3e6}.duet-table-plain.duet-table-flattened.duet-theme-turva tbody tr{border-bottom-color:#e4e4e6}.duet-table-minimal tbody tr,.duet-table-minimal tbody tr td{vertical-align:top;border-bottom:0 none}.duet-table-minimal tbody tr:last-of-type,.duet-table-minimal tbody tr:last-of-type td{border-bottom:1px solid #e1e3e6}.duet-table-minimal.duet-table-flattened tbody tr,.duet-table-minimal.duet-table-flattened tbody tr td{border-bottom:0 none}.duet-table-minimal.duet-table-flattened tbody tr td[data-heading]::before{display:none}.duet-table-minimal.duet-table-flattened tfoot{border-top:1px solid #e1e3e6}.duet-table-minimal.duet-table-flattened.duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-fixed table{table-layout:fixed}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td,.duet-table-fixed tbody tr td:first-child{padding:4px !important;vertical-align:text-bottom;border-bottom:0 none}.duet-table-fixed thead{display:none}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td{border-bottom:0 none}.duet-table-fixed:not(.duet-table-flattened) tfoot{border-top:1px solid #e1e3e6}.duet-table-fixed:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-scrollable{position:relative;width:100%;overflow-x:auto;background:linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0)), linear-gradient(-90deg, #fff 0%, rgba(255, 255, 255, 0)) 100% 0, radial-gradient(farthest-side at 0% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)) 100% 0%;background-repeat:no-repeat;background-attachment:local, local, scroll, scroll;background-size:100px 100%, 100px 100%, 12px 100%, 12px 100%}.duet-table-selected-column{background:rgba(0, 119, 179, 0.08)}.duet-theme-turva .duet-table-selected-column{background:rgba(68, 68, 69, 0.08)}";
221
292
 
222
293
  // remove wrapping speech marks.
223
294
  // media query tokens are wrapped in speech marks,
@@ -277,7 +348,7 @@ let DuetTable = class {
277
348
  }
278
349
  connectedCallback() {
279
350
  this.mq = matchMedia(breakpointToToken[this.breakpoint]);
280
- this.mq.addListener(this.handleMediaQueryChange);
351
+ this.mq.addEventListener("change", this.handleMediaQueryChange);
281
352
  this.handleMediaQueryChange(this.mq);
282
353
  this.observer = new MutationObserver(() => this.copyHeadingsToCells());
283
354
  this.observer.observe(this.element, {
@@ -719,7 +790,7 @@ let DuetUpload = class {
719
790
  {
720
791
  icon: "action-delete",
721
792
  color: "color-danger",
722
- color_hover: "category-home",
793
+ color_hover: "primary-dark",
723
794
  id: "delete",
724
795
  map: ["success", "failure"],
725
796
  label: {
@@ -731,7 +802,7 @@ let DuetUpload = class {
731
802
  {
732
803
  icon: "navigation-close",
733
804
  color: "primary",
734
- color_hover: "category-home",
805
+ color_hover: "primary-dark",
735
806
  id: "cancel",
736
807
  map: ["inprogress"],
737
808
  label: {
@@ -852,6 +923,10 @@ let DuetUpload = class {
852
923
  * browser from displaying its own validation errors.
853
924
  */
854
925
  this.required = false;
926
+ /**
927
+ * Key used to set vertical alignment of action buttons
928
+ */
929
+ this.alignment = "middle";
855
930
  /**
856
931
  * Visually hides the groups labels in the editable table list used to display the list of files
857
932
  */
@@ -1422,7 +1497,7 @@ let DuetUpload = class {
1422
1497
  "duet-upload-filelist-empty": !this.files.size,
1423
1498
  "duet-upload-filelist": true,
1424
1499
  "duet-upload-filelist-filled": this.files.size,
1425
- }, id: this.labelId, for: identifier }, this.fileListEmpty)), !!this.files.size && h("slot", { name: "fileheader" }), !!this.files.size && (h("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 && (h("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 && h("slot", { name: "filefooter" }), h("duet-spacer", { size: "large" }), !this.hideButton && (h("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)), h("duet-spacer", { size: "medium" }), (this.fileMaxReached || this.bytesMaxReached) && (h("duet-alert", null, this.fileMaxReached && getI18nError("duet-upload-301"), this.bytesMaxReached && getI18nError("duet-upload-202"))), h("duet-spacer", { size: "medium" }), h("duet-visually-hidden", null, h("input", { ref: input => {
1500
+ }, id: this.labelId, for: identifier }, this.fileListEmpty)), !!this.files.size && h("slot", { name: "fileheader" }), !!this.files.size && (h("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 && (h("duet-editable-table", { "aria-live": "polite", "aria-relevant": "removals", accessibleRole: "log", id: this.editableTableId, groups: this.groups, actions: this.actions, hideGroups: this.hideGroups, alignment: this.alignment, items: this.convertToDuetEditableTableItems() })), !!this.files.size && h("slot", { name: "filefooter" }), h("duet-spacer", { size: "large" }), !this.hideButton && (h("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)), h("duet-spacer", { size: "medium" }), (this.fileMaxReached || this.bytesMaxReached) && (h("duet-alert", null, this.fileMaxReached && getI18nError("duet-upload-301"), this.bytesMaxReached && getI18nError("duet-upload-202"))), h("duet-spacer", { size: "medium" }), h("duet-visually-hidden", null, h("input", { ref: input => {
1426
1501
  this.nativeInput = input;
1427
1502
  }, accept: !this.limitSelection ? undefined : `${this.allowedMimetypes},${this.allowedExtensions}`, onBlur: this.onBlur, onFocus: this.onFocus, onChange: e => this.onChange(e), type: "file", class: {
1428
1503
  "duet-upload": true,
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- import { r as registerInstance, h, H as Host } from './index-e8c7d36f.js';
4
+ import { r as registerInstance, h, H as Host } from './index-9ef5d3bc.js';
5
5
  import { i as inheritGlobalTheme } from './themeable-component-572685dd.js';
6
6
 
7
7
  const duetEmptyStateCss = "*,*::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;display:block;width:100%;height:100%}.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{color:#171c3a;background:#f5f5f7}";
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- import { r as registerInstance, h, H as Host, g as getElement } from './index-e8c7d36f.js';
4
+ import { r as registerInstance, h, H as Host, g as getElement } from './index-9ef5d3bc.js';
5
5
  import { c as createID } from './create-id-981107da.js';
6
6
  import { i as inheritGlobalTheme } from './themeable-component-572685dd.js';
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- import { r as registerInstance, c as createEvent$1, h, F as Fragment, g as getElement } from './index-e8c7d36f.js';
4
+ import { r as registerInstance, c as createEvent$1, h, F as Fragment, g as getElement } from './index-9ef5d3bc.js';
5
5
  import { a as actionNewWindowSmall } from './action-new-window-small-1945be91.js';
6
6
  import { D as DuetStringsExternalDefaults } from './common-strings-97e04e4b.js';
7
7
  import { a as getLanguage, g as getLocaleString } from './language-utils-344d894c.js';
@@ -12,7 +12,7 @@ var actionArrowRight={"title":"action-arrow-right","tags":"action arrow right ca
12
12
 
13
13
  var actionNewWindow={"title":"action-new-window","tags":"arrow open new window tab external link square box rectangle action","svg":"<svg fill=\"currentColor\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\"><path d=\"M10.25 2a.75.75 0 1 1 0 1.5h-6.5A2.252 2.252 0 0 0 1.5 5.75v14.5a2.252 2.252 0 0 0 2.25 2.25h14.5a2.252 2.252 0 0 0 2.25-2.25v-6.5a.75.75 0 0 1 1.5 0v6.5A3.754 3.754 0 0 1 18.25 24H3.75A3.754 3.754 0 0 1 0 20.25V5.75A3.754 3.754 0 0 1 3.75 2zm12.985-2c.1 0 .198.02.29.058l.025.011a.726.726 0 0 1 .15.091l.066.059a.755.755 0 0 1 .109.138l.051.1c.04.092.06.192.06.293l-.001 6.363c0 .2-.078.389-.22.53a.743.743 0 0 1-.53.22.743.743 0 0 1-.53-.22.743.743 0 0 1-.22-.53V2.559L15.28 9.764a.75.75 0 0 1-1.06-1.06l7.204-7.205h-4.553a.744.744 0 0 1-.75-.75c0-.2.078-.388.22-.53A.743.743 0 0 1 16.87 0z\"/></svg>"};
14
14
 
15
- const duetFooterCss = "*,*::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;display:block;flex-shrink:0;width:100%}.duet-footer{display:block;width:100%;padding-top:20px;padding-bottom:16px;margin-top:48px;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:white;text-align:left;background:#00294d}.duet-footer.duet-p-0{padding:0 !important}.duet-footer.duet-m-0{margin:0 !important}@media (min-width: 36em){.duet-footer{padding-top:36px}}@media (min-width: 62em){.duet-footer{padding-top:48px;padding-bottom:36px}}.duet-footer.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\";background:#c60c30}.duet-footer a{color:white;text-decoration:none}@media (min-width: 62em){.duet-footer a{border-radius:4px}}.duet-footer a:focus{outline:0}:host(.user-is-tabbing) .duet-footer a:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing) .duet-theme-turva a:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-footer-wrapper{position:relative;margin:0 auto}@media (min-width: 62em){.duet-footer-wrapper{padding:0 72px 0 48px}}@media (min-width: 76.25em){.duet-footer-wrapper{max-width:1110px;padding:0 20px 0 0}}.duet-footer-top{width:100%}@media (min-width: 62em){.duet-footer-top{display:flex;flex-direction:row;align-items:center;justify-content:space-between}}duet-logo{margin-left:16px !important}@media (min-width: 36em){duet-logo{margin-left:28px !important}}@media (min-width: 62em){duet-logo{margin-left:0 !important}}.duet-footer-link{padding:16px !important;display:flex;flex-direction:row;align-items:center;width:100%;font-weight:600;border-bottom:1px solid rgba(255, 255, 255, 0.2);transition:background-color 300ms ease}@media (min-width: 36em){.duet-footer-link{padding-right:20px !important;padding-left:28px !important}}@media (min-width: 62em){.duet-footer-link{width:auto;min-width:0;padding-right:0 !important;padding-left:0 !important;border:0}}.duet-footer-link:first-of-type{margin-top:20px;border-top:1px solid rgba(255, 255, 255, 0.2)}@media (min-width: 62em){.duet-footer-link:first-of-type{margin:0;border:0}}.duet-footer-link span{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.duet-footer-link:hover{background:rgba(0, 0, 0, 0.1)}@media (min-width: 62em){.duet-footer-link:hover{background:transparent}}.duet-footer-icon{display:flex;align-items:center;justify-content:center;padding:12px;margin-right:16px;background:#0077b3;border-radius:50%;transition:300ms ease}.duet-theme-turva .duet-footer-icon{background:transparent;box-shadow:0 0 0 1px white}a:hover .duet-footer-icon{background:#006ba1}.duet-theme-turva a:hover .duet-footer-icon{background:transparent}.duet-footer-arrow{display:flex;align-items:center;justify-content:center;width:20px;min-width:20px;max-width:20px;height:20px;max-height:20px;margin-left:auto;color:white;transition:transform 300ms ease}@media (min-width: 62em){.duet-footer-arrow{width:10px;min-width:10px;margin-top:3px;margin-left:8px}}@media (min-width: 62em){.duet-footer-arrow{margin-right:0}}a:hover .duet-footer-arrow{transform:translateX(4px)}.duet-footer-arrow duet-icon{width:20px;height:20px}@media (min-width: 62em){.duet-footer-arrow duet-icon{width:10px;height:10px}}.duet-footer-menu{padding:20px !important;font-size:0.875rem}@media (min-width: 36em){.duet-footer-menu{padding:28px !important}}@media (min-width: 62em){.duet-footer-menu{padding-left:8px !important}}.duet-footer-menu a{text-decoration:none}.duet-footer-menu a:hover,.duet-footer-menu a:focus{text-decoration:underline}.duet-footer-menu a:hover .duet-footer-divider,.duet-footer-menu a:focus .duet-footer-divider{text-decoration:none}.duet-footer-menu .duet-footer-divider{display:inline-block;margin:0 8px}.duet-footer-menu a:last-of-type .duet-footer-divider{display:none}.duet-footer-copyright{color:white}.duet-footer-simple{padding:0;margin:0;margin-top:16px;color:#00294d;background:transparent !important;border-top:1px solid #e1e3e6}.duet-footer-simple .duet-footer-wrapper{max-width:100%;padding:0 20px;margin:0}@media (min-width: 62em){.duet-footer-simple .duet-footer-wrapper{padding:0 36px}}@media (min-width: 106.25em){.duet-footer-simple .duet-footer-wrapper{padding:0 48px}}.duet-footer-simple .duet-footer-copyright,.duet-footer-simple .duet-footer-menu a{color:#00294d}.duet-footer-simple .duet-footer-menu{padding:20px 0 !important}.duet-footer-simple.duet-theme-turva{color:#171c3a;border-color:#e4e4e6}.duet-footer-simple.duet-theme-turva .duet-footer-copyright,.duet-footer-simple.duet-theme-turva .duet-footer-menu a{color:#171c3a}.duet-footer-external{display:inline-block;margin-left:4px;color:#0077b3}.duet-theme-turva .duet-footer-external{color:white}.duet-footer-simple.duet-theme-turva .duet-footer-external{color:#c60c30}";
15
+ const duetFooterCss = "*,*::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;display:block;flex-shrink:0;width:100%}.duet-footer{display:block;width:100%;padding-top:20px;padding-bottom:16px;margin-top:48px;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:white;text-align:left;background:#00294d}.duet-footer.duet-p-0{padding:0 !important}.duet-footer.duet-m-0{margin:0 !important}@media (min-width: 36em){.duet-footer{padding-top:36px}}@media (min-width: 62em){.duet-footer{padding-top:48px;padding-bottom:36px}}.duet-footer.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\";background:#c60c30}.duet-footer a{color:white;text-decoration:none}@media (min-width: 62em){.duet-footer a{border-radius:4px}}.duet-footer a:focus{outline:0}:host(.user-is-tabbing) .duet-footer a:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing) .duet-theme-turva a:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-footer-wrapper{position:relative;margin:0 auto}@media (min-width: 62em){.duet-footer-wrapper{padding:0 72px 0 48px}}@media (min-width: 76.25em){.duet-footer-wrapper{max-width:1110px;padding:0 20px 0 0}}.duet-footer-top{width:100%}@media (min-width: 62em){.duet-footer-top{display:flex;flex-direction:row;align-items:center;justify-content:space-between}}duet-logo{margin-left:16px !important}@media (min-width: 36em){duet-logo{margin-left:28px !important}}@media (min-width: 62em){duet-logo{margin-left:0 !important}}.duet-footer-link{padding:16px !important;display:flex;flex-direction:row;align-items:center;width:100%;font-weight:600;border-bottom:1px solid rgba(255, 255, 255, 0.2);transition:background-color 300ms ease}@media (min-width: 36em){.duet-footer-link{padding-right:20px !important;padding-left:28px !important}}@media (min-width: 62em){.duet-footer-link{width:auto;min-width:0;padding-right:0 !important;padding-left:0 !important;border:0}}.duet-footer-link:first-of-type{margin-top:20px;border-top:1px solid rgba(255, 255, 255, 0.2)}@media (min-width: 62em){.duet-footer-link:first-of-type{margin:0;border:0}}.duet-footer-link span{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.duet-footer-link:hover{background:rgba(0, 0, 0, 0.1)}@media (min-width: 62em){.duet-footer-link:hover{background:transparent}}.duet-footer-icon{display:flex;align-items:center;justify-content:center;padding:12px;margin-right:16px;background:#0077b3;border-radius:50%;transition:300ms ease}.duet-theme-turva .duet-footer-icon{background:transparent;box-shadow:0 0 0 1px white}a:hover .duet-footer-icon{background:#006ba1}.duet-theme-turva a:hover .duet-footer-icon{background:transparent}.duet-footer-arrow{display:flex;align-items:center;justify-content:center;width:20px;min-width:20px;max-width:20px;height:20px;max-height:20px;margin-left:auto;color:white;transition:transform 300ms ease}@media (min-width: 62em){.duet-footer-arrow{width:10px;min-width:10px;margin-top:3px;margin-left:8px}}@media (min-width: 62em){.duet-footer-arrow{margin-right:0}}a:hover .duet-footer-arrow{transform:translateX(4px)}.duet-footer-arrow duet-icon{width:20px;height:20px}@media (min-width: 62em){.duet-footer-arrow duet-icon{width:10px;height:10px}}.duet-footer-menu{padding:20px !important;font-size:0.875rem}@media (min-width: 36em){.duet-footer-menu{padding:28px !important}}@media (min-width: 62em){.duet-footer-menu{padding-left:8px !important}}.duet-footer-menu a{display:inline-block;text-decoration:none;word-break:break-all}.duet-footer-menu a:hover,.duet-footer-menu a:focus{text-decoration:underline}.duet-footer-menu a:hover .duet-footer-divider,.duet-footer-menu a:focus .duet-footer-divider{text-decoration:none}.duet-footer-menu .duet-footer-divider{display:inline-block;margin:0 8px}.duet-footer-menu a:last-of-type .duet-footer-divider{display:none}.duet-footer-copyright{color:white}.duet-footer-simple{padding:0;margin:0;margin-top:16px;color:#00294d;background:transparent !important;border-top:1px solid #e1e3e6}.duet-footer-simple .duet-footer-wrapper{max-width:100%;padding:0 20px;margin:0}@media (min-width: 62em){.duet-footer-simple .duet-footer-wrapper{padding:0 36px}}@media (min-width: 106.25em){.duet-footer-simple .duet-footer-wrapper{padding:0 48px}}.duet-footer-simple .duet-footer-copyright,.duet-footer-simple .duet-footer-menu a{color:#00294d}.duet-footer-simple .duet-footer-menu{padding:20px 0 !important}.duet-footer-simple.duet-theme-turva{color:#171c3a;border-color:#e4e4e6}.duet-footer-simple.duet-theme-turva .duet-footer-copyright,.duet-footer-simple.duet-theme-turva .duet-footer-menu a{color:#171c3a}.duet-footer-external{display:inline-block;margin-left:4px;color:#0077b3}.duet-theme-turva .duet-footer-external{color:white}.duet-footer-simple.duet-theme-turva .duet-footer-external{color:#c60c30}";
16
16
 
17
17
  const i18n = {
18
18
  fi: { lahi: "© LähiTapiola", turva: "© Turva" },
@@ -1,7 +1,8 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- import { r as registerInstance, h, g as getElement, H as Host } from './index-e8c7d36f.js';
4
+ import { r as registerInstance, h, g as getElement, H as Host } from './index-9ef5d3bc.js';
5
+ import { m as media_query_large, a as media_query_medium, b as media_query_small } from './tokens-e110dc89.js';
5
6
  import { w as watchForOptions, a as watchForElement } from './watch-options-dd55bce8.js';
6
7
  import { i as inheritGlobalTheme } from './themeable-component-572685dd.js';
7
8
 
@@ -13,6 +14,11 @@ function isGridItem(element) {
13
14
  let DuetGrid = class {
14
15
  constructor(hostRef) {
15
16
  registerInstance(this, hostRef);
17
+ this.mql = [
18
+ window.matchMedia(media_query_large.replace(/'/g, "")),
19
+ window.matchMedia(media_query_medium.replace(/'/g, "")),
20
+ window.matchMedia(media_query_small.replace(/'/g, "")),
21
+ ];
16
22
  this.distributeFormElement = false;
17
23
  /**
18
24
  * Enable or disable the automatic responsive behaviour of the grid component.
@@ -67,10 +73,18 @@ let DuetGrid = class {
67
73
  this.mutationO = watchForOptions(el, "duet-grid-item", () => {
68
74
  this.updateGridItems();
69
75
  });
76
+ // the next two functions are used to watch for changes in the grid items, and are process intensive - so only run when needed
70
77
  if (this.distributeFormElement) {
71
78
  this.mutation1 = watchForElement(el, "duet-input", () => {
72
79
  this.updateGridItemsWithInputFields();
73
80
  });
81
+ // listen for potential mediaquery changes and reset layout
82
+ for (let i = 0; i < this.mql.length; i++) {
83
+ // addEventListener is not available in Stencil hydrate
84
+ if (this.mql[i].addEventListener) {
85
+ this.mql[i].addEventListener("change", this.updateGridItemsWithInputFields.bind(this));
86
+ }
87
+ }
74
88
  }
75
89
  this.updateGridItems();
76
90
  }
@@ -83,6 +97,13 @@ let DuetGrid = class {
83
97
  this.mutation1.disconnect();
84
98
  this.mutation1 = undefined;
85
99
  }
100
+ // listen for potential mediaquery changes and reset layout
101
+ for (let i = 0; i < this.mql.length; i++) {
102
+ // addEventListener is not available in Stencil hydrate
103
+ if (this.mql[i].removeEventListener) {
104
+ this.mql[i].removeEventListener("change", this.updateGridItemsWithInputFields.bind(this));
105
+ }
106
+ }
86
107
  }
87
108
  /**
88
109
  * Local methods
@@ -96,6 +117,8 @@ let DuetGrid = class {
96
117
  }
97
118
  async updateGridItemsWithInputFields() {
98
119
  const items = Array.from(this.element.children).filter(isGridItem);
120
+ // if layout changes to columns instead of row, remove all padding
121
+ const hasColumnLayout = window ? window.getComputedStyle(this.element).flexDirection === "column" : false;
99
122
  let maxHeight = 0;
100
123
  const sizes = [];
101
124
  items.forEach(item => {
@@ -107,10 +130,10 @@ let DuetGrid = class {
107
130
  items.forEach(item => {
108
131
  const inputErrorDom = item.querySelector("span.duet-input-error");
109
132
  const height = inputErrorDom ? this.outerHeight(inputErrorDom) : 0;
110
- if (height < maxHeight) {
133
+ if (height < maxHeight && !hasColumnLayout) {
111
134
  item.setAttribute("style", `padding-bottom: ${maxHeight - height}px;`);
112
135
  }
113
- else if (height === maxHeight) {
136
+ else if (height === maxHeight || hasColumnLayout) {
114
137
  item.setAttribute("style", `padding-bottom: 0px;`);
115
138
  }
116
139
  });