@duetds/components 10.0.0-alpha.24 → 10.0.0-alpha.26

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 (429) hide show
  1. package/hydrate/index.js +488 -287
  2. package/hydrate/index.mjs +488 -287
  3. package/lib/cjs/{a11y-utils-CZnG1VYN.js → a11y-utils-CnLnSK4z.js} +1 -1
  4. package/lib/cjs/{app-globals-B36JTAfq.js → app-globals-B3iie8Hv.js} +1 -1
  5. package/lib/cjs/{common-strings-DQ3xONmA.js → common-strings-CSqtNIxt.js} +23 -0
  6. package/lib/cjs/duet-action-button.cjs.entry.js +4 -4
  7. package/lib/cjs/duet-alert.cjs.entry.js +24 -33
  8. package/lib/cjs/duet-badge.cjs.entry.js +16 -4
  9. package/lib/cjs/duet-banner.cjs.entry.js +7 -7
  10. package/lib/cjs/duet-breadcrumb.cjs.entry.js +7 -7
  11. package/lib/cjs/duet-breadcrumbs.cjs.entry.js +6 -6
  12. package/lib/cjs/duet-button_2.cjs.entry.js +13 -13
  13. package/lib/cjs/duet-callout.cjs.entry.js +5 -5
  14. package/lib/cjs/duet-caption_4.cjs.entry.js +15 -14
  15. package/lib/cjs/duet-card.cjs.entry.js +14 -8
  16. package/lib/cjs/duet-checkbox.cjs.entry.js +2 -2
  17. package/lib/cjs/duet-checkmark.cjs.entry.js +4 -4
  18. package/lib/cjs/duet-chip.cjs.entry.js +3 -3
  19. package/lib/cjs/duet-choice_2.cjs.entry.js +35 -28
  20. package/lib/cjs/duet-collapsible.cjs.entry.js +3 -3
  21. package/lib/cjs/duet-combobox.cjs.entry.js +4 -4
  22. package/lib/cjs/duet-contact-card.cjs.entry.js +5 -5
  23. package/lib/cjs/duet-cookie-consent.cjs.entry.js +2 -2
  24. package/lib/cjs/duet-date-picker.cjs.entry.js +19 -9
  25. package/lib/cjs/duet-divider_2.cjs.entry.js +4 -4
  26. package/lib/cjs/duet-editable-table_3.cjs.entry.js +9 -9
  27. package/lib/cjs/duet-empty-state.cjs.entry.js +2 -2
  28. package/lib/cjs/duet-fieldset.cjs.entry.js +6 -6
  29. package/lib/cjs/duet-file-chooser.cjs.entry.js +2 -2
  30. package/lib/cjs/duet-footer.cjs.entry.js +5 -5
  31. package/lib/cjs/duet-grid_2.cjs.entry.js +4 -4
  32. package/lib/cjs/duet-header_2.cjs.entry.js +7 -6
  33. package/lib/cjs/duet-hero.cjs.entry.js +6 -6
  34. package/lib/cjs/duet-icon.cjs.entry.js +6 -6
  35. package/lib/cjs/duet-input_2.cjs.entry.js +7 -7
  36. package/lib/cjs/duet-layout.cjs.entry.js +2 -2
  37. package/lib/cjs/duet-list_2.cjs.entry.js +4 -4
  38. package/lib/cjs/duet-menu-bar-button.cjs.entry.js +4 -4
  39. package/lib/cjs/duet-menu-bar-dropdown-link.cjs.entry.js +4 -4
  40. package/lib/cjs/duet-menu-bar-dropdown.cjs.entry.js +6 -6
  41. package/lib/cjs/duet-menu-bar-item.cjs.entry.js +8 -8
  42. package/lib/cjs/duet-menu-bar-link.cjs.entry.js +4 -4
  43. package/lib/cjs/duet-menu-bar.cjs.entry.js +3 -3
  44. package/lib/cjs/duet-modal.cjs.entry.js +38 -21
  45. package/lib/cjs/duet-multiselect.cjs.entry.js +5 -5
  46. package/lib/cjs/duet-nav.cjs.entry.js +3 -3
  47. package/lib/cjs/duet-notification_2.cjs.entry.js +5 -5
  48. package/lib/cjs/duet-number-input.cjs.entry.js +14 -9
  49. package/lib/cjs/duet-overlay.cjs.entry.js +2 -2
  50. package/lib/cjs/duet-page-heading.cjs.entry.js +4 -4
  51. package/lib/cjs/duet-pagination_2.cjs.entry.js +6 -6
  52. package/lib/cjs/duet-panel.cjs.entry.js +53 -0
  53. package/lib/cjs/duet-phone-input.cjs.entry.js +4 -4
  54. package/lib/cjs/duet-popup-menu_2.cjs.entry.js +6 -6
  55. package/lib/cjs/duet-progress.cjs.entry.js +3 -3
  56. package/lib/cjs/duet-promo-card.cjs.entry.js +6 -6
  57. package/lib/cjs/duet-radio_2.cjs.entry.js +7 -7
  58. package/lib/cjs/duet-range-slider.cjs.entry.js +6 -6
  59. package/lib/cjs/duet-scrollable_3.cjs.entry.js +26 -23
  60. package/lib/cjs/duet-section-layout.cjs.entry.js +4 -4
  61. package/lib/cjs/duet-select.cjs.entry.js +9 -9
  62. package/lib/cjs/duet-shaped-image.cjs.entry.js +4 -4
  63. package/lib/cjs/duet-share-chart-item.cjs.entry.js +2 -2
  64. package/lib/cjs/duet-share-chart.cjs.entry.js +9 -7
  65. package/lib/cjs/duet-show-more.cjs.entry.js +5 -5
  66. package/lib/cjs/duet-slideout-lang.cjs.entry.js +4 -4
  67. package/lib/cjs/duet-slideout-link.cjs.entry.js +8 -8
  68. package/lib/cjs/duet-slideout-panel-dropdown.cjs.entry.js +6 -6
  69. package/lib/cjs/duet-slideout-panel.cjs.entry.js +12 -12
  70. package/lib/cjs/duet-slideout.cjs.entry.js +10 -10
  71. package/lib/cjs/duet-status-icon.cjs.entry.js +3 -3
  72. package/lib/cjs/duet-step_2.cjs.entry.js +7 -7
  73. package/lib/cjs/duet-submenu-bar-dropdown-link.cjs.entry.js +4 -4
  74. package/lib/cjs/duet-submenu-bar-dropdown.cjs.entry.js +6 -6
  75. package/lib/cjs/duet-submenu-bar-item.cjs.entry.js +7 -7
  76. package/lib/cjs/duet-submenu-bar-link.cjs.entry.js +3 -3
  77. package/lib/cjs/duet-submenu-bar.cjs.entry.js +7 -7
  78. package/lib/cjs/duet-textarea.cjs.entry.js +8 -8
  79. package/lib/cjs/duet-toggle.cjs.entry.js +6 -6
  80. package/lib/cjs/duet-toolbar-dropdown-link.cjs.entry.js +4 -4
  81. package/lib/cjs/duet-toolbar-dropdown.cjs.entry.js +6 -6
  82. package/lib/cjs/duet-toolbar-item.cjs.entry.js +9 -9
  83. package/lib/cjs/duet-toolbar-link.cjs.entry.js +4 -4
  84. package/lib/cjs/duet-toolbar.cjs.entry.js +4 -4
  85. package/lib/cjs/duet-tooltip-button_2.cjs.entry.js +8 -8
  86. package/lib/cjs/duet-tooltip.cjs.entry.js +4 -4
  87. package/lib/cjs/duet-tray.cjs.entry.js +5 -5
  88. package/lib/cjs/duet-upload-aria-status.cjs.entry.js +2 -2
  89. package/lib/cjs/duet-upload-item.cjs.entry.js +6 -6
  90. package/lib/cjs/duet-visually-hidden.cjs.entry.js +2 -2
  91. package/lib/cjs/duet.cjs.js +3 -3
  92. package/lib/cjs/{errorcodes.utils-C58jiu8o.js → errorcodes.utils-BgHe-1YU.js} +1 -1
  93. package/lib/cjs/{focus-utils-tY80LFI3.js → focus-utils-CT74z9Qb.js} +1 -1
  94. package/lib/cjs/{index-C1crwqC7.js → index-C6D9Bly8.js} +5 -1
  95. package/lib/cjs/{label-ClSVuKQ_.js → label-tyZX3oPG.js} +1 -1
  96. package/lib/cjs/{language-utils-BtiS-RGS.js → language-utils-DcgSN-KH.js} +1 -1
  97. package/lib/cjs/loader.cjs.js +3 -3
  98. package/lib/cjs/{slot-utils-DZVD8m30.js → slot-utils-ByPWwvPp.js} +1 -1
  99. package/lib/cjs/{themeable-component-6YQpZOSC.js → themeable-component-Doq36ycm.js} +1 -1
  100. package/lib/cjs/{token-utils-CHLLcMzU.js → token-utils-DsVwGXGM.js} +75 -7
  101. package/lib/collection/collection-manifest.json +1 -0
  102. package/lib/collection/common-strings.js +22 -0
  103. package/lib/collection/components/duet-alert/duet-alert.js +21 -30
  104. package/lib/collection/components/duet-badge/duet-badge.js +13 -2
  105. package/lib/collection/components/duet-banner/duet-banner.css +1 -0
  106. package/lib/collection/components/duet-banner/duet-banner.js +3 -3
  107. package/lib/collection/components/duet-breadcrumbs/duet-breadcrumb.js +4 -4
  108. package/lib/collection/components/duet-breadcrumbs/duet-breadcrumbs.js +2 -2
  109. package/lib/collection/components/duet-button/duet-button.css +14 -5
  110. package/lib/collection/components/duet-button/duet-button.js +5 -5
  111. package/lib/collection/components/duet-callout/duet-callout.js +2 -2
  112. package/lib/collection/components/duet-card/duet-card.js +36 -4
  113. package/lib/collection/components/duet-choice/duet-checkmark.js +2 -2
  114. package/lib/collection/components/duet-choice/duet-choice.js +6 -27
  115. package/lib/collection/components/duet-choice-group/duet-choice-group.js +24 -15
  116. package/lib/collection/components/duet-contact-card/duet-contact-card.js +2 -2
  117. package/lib/collection/components/duet-date-picker/date-picker-day.js +6 -1
  118. package/lib/collection/components/duet-date-picker/date-utils.js +6 -1
  119. package/lib/collection/components/duet-date-picker/duet-date-picker.css +2 -2
  120. package/lib/collection/components/duet-fieldset/duet-fieldset.js +3 -3
  121. package/lib/collection/components/duet-grid-item/duet-grid-item.js +2 -2
  122. package/lib/collection/components/duet-header/duet-header.js +3 -2
  123. package/lib/collection/components/duet-heading/duet-heading.css +1 -0
  124. package/lib/collection/components/duet-hero/duet-hero.css +95 -0
  125. package/lib/collection/components/duet-icon/duet-icon.js +3 -3
  126. package/lib/collection/components/duet-label/duet-label.js +1 -1
  127. package/lib/collection/components/duet-link/duet-link.js +5 -4
  128. package/lib/collection/components/duet-list-item/duet-list-item.js +2 -2
  129. package/lib/collection/components/duet-menu-bar-button/duet-menu-bar-button.js +2 -2
  130. package/lib/collection/components/duet-menu-bar-dropdown/duet-menu-bar-dropdown.js +4 -4
  131. package/lib/collection/components/duet-menu-bar-dropdown-link/duet-menu-bar-dropdown-link.js +2 -2
  132. package/lib/collection/components/duet-menu-bar-item/duet-menu-bar-item.js +2 -2
  133. package/lib/collection/components/duet-menu-bar-link/duet-menu-bar-link.js +2 -2
  134. package/lib/collection/components/duet-modal/duet-modal.js +96 -15
  135. package/lib/collection/components/duet-nav/duet-nav.js +1 -1
  136. package/lib/collection/components/duet-notification/duet-notification.js +2 -2
  137. package/lib/collection/components/duet-number-input/duet-number-input.js +11 -6
  138. package/lib/collection/components/duet-page-heading/duet-page-heading.js +2 -2
  139. package/lib/collection/components/duet-panel/duet-panel.css +98 -0
  140. package/lib/collection/components/duet-panel/duet-panel.js +234 -0
  141. package/lib/collection/components/duet-paragraph/duet-paragraph.js +2 -2
  142. package/lib/collection/components/duet-popup-menu-item/duet-popup-menu-item.js +2 -2
  143. package/lib/collection/components/duet-promo-card/duet-promo-card.js +3 -3
  144. package/lib/collection/components/duet-radio/duet-radio.js +3 -3
  145. package/lib/collection/components/duet-radio-group/duet-radio-group.js +1 -1
  146. package/lib/collection/components/duet-range-slider/duet-range-slider.js +2 -2
  147. package/lib/collection/components/duet-range-stepper/duet-range-stepper.js +2 -2
  148. package/lib/collection/components/duet-scrollable/duet-scrollable.js +6 -6
  149. package/lib/collection/components/duet-section-layout/duet-section-layout.js +3 -3
  150. package/lib/collection/components/duet-select/duet-select.js +5 -5
  151. package/lib/collection/components/duet-shaped-image/duet-shaped-image.js +2 -2
  152. package/lib/collection/components/duet-share-chart/duet-share-chart.js +4 -2
  153. package/lib/collection/components/duet-share-chart-item/duet-share-chart-item.js +1 -1
  154. package/lib/collection/components/duet-show-more/duet-show-more.js +2 -2
  155. package/lib/collection/components/duet-slideout/duet-slideout.js +4 -4
  156. package/lib/collection/components/duet-slideout-lang/duet-slideout-lang.js +1 -1
  157. package/lib/collection/components/duet-slideout-link/duet-slideout-link.js +2 -2
  158. package/lib/collection/components/duet-slideout-panel/duet-slideout-panel.js +6 -6
  159. package/lib/collection/components/duet-slideout-panel-dropdown/duet-slideout-panel-dropdown.js +4 -4
  160. package/lib/collection/components/duet-spacer/duet-spacer.js +1 -1
  161. package/lib/collection/components/duet-spinner/duet-spinner.js +2 -2
  162. package/lib/collection/components/duet-status-icon/duet-status-icon.js +2 -2
  163. package/lib/collection/components/duet-step/duet-step.js +2 -2
  164. package/lib/collection/components/duet-stepper/duet-stepper.js +1 -1
  165. package/lib/collection/components/duet-submenu-bar/duet-submenu-bar.js +5 -5
  166. package/lib/collection/components/duet-submenu-bar-dropdown/duet-submenu-bar-dropdown.js +4 -4
  167. package/lib/collection/components/duet-submenu-bar-dropdown-link/duet-submenu-bar-dropdown-link.js +2 -2
  168. package/lib/collection/components/duet-submenu-bar-item/duet-submenu-bar-item.js +1 -1
  169. package/lib/collection/components/duet-submenu-bar-link/duet-submenu-bar-link.js +1 -1
  170. package/lib/collection/components/duet-tab/duet-tab.js +2 -2
  171. package/lib/collection/components/duet-tab-group/duet-tab-group.js +14 -11
  172. package/lib/collection/components/duet-table/duet-table.js +2 -2
  173. package/lib/collection/components/duet-textarea/duet-textarea.js +3 -3
  174. package/lib/collection/components/duet-toggle/duet-toggle.js +2 -2
  175. package/lib/collection/components/duet-toolbar/duet-toolbar.js +2 -2
  176. package/lib/collection/components/duet-toolbar-dropdown/duet-toolbar-dropdown.js +4 -4
  177. package/lib/collection/components/duet-toolbar-dropdown-link/duet-toolbar-dropdown-link.js +2 -2
  178. package/lib/collection/components/duet-toolbar-item/duet-toolbar-item.js +3 -3
  179. package/lib/collection/components/duet-toolbar-link/duet-toolbar-link.js +2 -2
  180. package/lib/collection/components/duet-tooltip/duet-tooltip-button.js +3 -3
  181. package/lib/collection/components/duet-tooltip/duet-tooltip-popup.js +2 -2
  182. package/lib/collection/components/duet-tray/duet-tray.js +2 -2
  183. package/lib/collection/components/duet-upload/duet-upload.js +2 -2
  184. package/lib/collection/components/duet-upload-aria-status/duet-upload-aria-status.js +1 -1
  185. package/lib/collection/components/duet-upload-item/duet-upload-item.js +2 -2
  186. package/lib/collection/components/duet-visually-hidden/duet-visually-hidden.js +1 -1
  187. package/lib/collection/utils/token-utils.js +59 -7
  188. package/lib/collection/utils/turva2-color-tokens.js +42 -0
  189. package/lib/duet/duet.esm.js +1 -1
  190. package/lib/duet/{p-8a852600.entry.js → p-02ba799f.entry.js} +1 -1
  191. package/lib/duet/{p-5018b536.entry.js → p-066f855b.entry.js} +1 -1
  192. package/lib/duet/p-0864a12e.entry.js +4 -0
  193. package/lib/duet/{p-9ef5fe85.entry.js → p-0964b56d.entry.js} +1 -1
  194. package/lib/duet/{p-034efb8b.entry.js → p-0e15fd30.entry.js} +1 -1
  195. package/lib/duet/p-0fccda7b.entry.js +4 -0
  196. package/lib/duet/{p-156d2362.entry.js → p-117970c7.entry.js} +1 -1
  197. package/lib/duet/{p-3cee5337.entry.js → p-148b6203.entry.js} +1 -1
  198. package/lib/duet/p-15859eb3.entry.js +4 -0
  199. package/lib/duet/{p-ca626317.entry.js → p-15a7a9be.entry.js} +1 -1
  200. package/lib/duet/{p-db110424.entry.js → p-16f691fd.entry.js} +1 -1
  201. package/lib/duet/p-1ec554c6.entry.js +4 -0
  202. package/lib/duet/{p-ff564afe.entry.js → p-1f9c5d58.entry.js} +1 -1
  203. package/lib/duet/{p-5f18c78a.entry.js → p-22641f21.entry.js} +1 -1
  204. package/lib/duet/{p-f4a44d9d.entry.js → p-23475050.entry.js} +1 -1
  205. package/lib/duet/{p-f234f837.entry.js → p-288da581.entry.js} +1 -1
  206. package/lib/duet/{p-2bc683b8.entry.js → p-2a563d22.entry.js} +1 -1
  207. package/lib/duet/{p-32ac2068.entry.js → p-2d62148e.entry.js} +1 -1
  208. package/lib/duet/{p-f6c347b4.entry.js → p-2f150cd4.entry.js} +1 -1
  209. package/lib/duet/{p-c28dc621.entry.js → p-34706bbb.entry.js} +1 -1
  210. package/lib/duet/{p-b0484b68.entry.js → p-433a9f98.entry.js} +1 -1
  211. package/lib/duet/{p-7c19dac5.entry.js → p-44deeddc.entry.js} +1 -1
  212. package/lib/duet/{p-bb468aae.entry.js → p-4a325ef1.entry.js} +1 -1
  213. package/lib/duet/p-4c118ad6.entry.js +4 -0
  214. package/lib/duet/{p-da1914c5.entry.js → p-4c37165a.entry.js} +1 -1
  215. package/lib/duet/p-4cd019a5.entry.js +4 -0
  216. package/lib/duet/{p-be397530.entry.js → p-4da25e3d.entry.js} +1 -1
  217. package/lib/duet/{p-3d8dc9a3.entry.js → p-4da439ae.entry.js} +1 -1
  218. package/lib/duet/{p-b4e2e77d.entry.js → p-4fc62376.entry.js} +1 -1
  219. package/lib/duet/p-534180fa.entry.js +4 -0
  220. package/lib/duet/p-57165bf0.entry.js +4 -0
  221. package/lib/duet/{p-908b3a74.entry.js → p-5a6fd350.entry.js} +1 -1
  222. package/lib/duet/p-5bfa5e5d.entry.js +4 -0
  223. package/lib/duet/{p-bf586daf.entry.js → p-5fdfb13d.entry.js} +1 -1
  224. package/lib/duet/{p-7dceae70.entry.js → p-62df87ea.entry.js} +1 -1
  225. package/lib/duet/{p-a2a94d9a.entry.js → p-66cb6021.entry.js} +1 -1
  226. package/lib/duet/{p-416cbbf6.entry.js → p-6b2697ad.entry.js} +1 -1
  227. package/lib/duet/{p-b463cb8b.entry.js → p-6dca8f77.entry.js} +1 -1
  228. package/lib/duet/p-6fa7de01.entry.js +4 -0
  229. package/lib/duet/{p-abec4876.entry.js → p-6fdb09d1.entry.js} +1 -1
  230. package/lib/duet/{p-815c955b.entry.js → p-78a9b684.entry.js} +1 -1
  231. package/lib/duet/p-7b849d35.entry.js +4 -0
  232. package/lib/duet/p-7c1e8291.entry.js +4 -0
  233. package/lib/duet/{p-f4a0f95a.entry.js → p-7f0aa937.entry.js} +1 -1
  234. package/lib/duet/{p-038b8ea1.entry.js → p-804b326c.entry.js} +1 -1
  235. package/lib/duet/{p-db50a06b.entry.js → p-806121b1.entry.js} +1 -1
  236. package/lib/duet/p-8194b05d.entry.js +4 -0
  237. package/lib/duet/{p-58bd2e53.entry.js → p-829482da.entry.js} +1 -1
  238. package/lib/duet/{p-4427fd7d.entry.js → p-84777c03.entry.js} +1 -1
  239. package/lib/duet/{p-72ad01cb.entry.js → p-8625d3ce.entry.js} +1 -1
  240. package/lib/duet/{p-662331c7.entry.js → p-88216acf.entry.js} +1 -1
  241. package/lib/duet/p-92b13088.entry.js +4 -0
  242. package/lib/duet/{p-caf145ea.entry.js → p-9440a479.entry.js} +1 -1
  243. package/lib/duet/{p-6104db31.entry.js → p-98aa7ac5.entry.js} +1 -1
  244. package/lib/duet/{p-88422e6a.entry.js → p-9a7382a4.entry.js} +1 -1
  245. package/lib/duet/p-9c838ec0.entry.js +4 -0
  246. package/lib/duet/p-B5RO_CRT.js +4 -0
  247. package/lib/duet/{p-CsVaeVlH.js → p-BPFqbaxm.js} +1 -1
  248. package/lib/duet/p-BWvtXbhA.js +4 -0
  249. package/lib/duet/{p-DglOA-oE.js → p-BkHWWyft.js} +1 -1
  250. package/lib/duet/{p-uJz71_4x.js → p-C-YpEPL-.js} +1 -1
  251. package/lib/duet/p-C2xFZ1pZ.js +4 -0
  252. package/lib/duet/{p-wJIv584C.js → p-CwVyzidG.js} +1 -1
  253. package/lib/duet/p-D5MfS1RP.js +4 -0
  254. package/lib/duet/p-DixsuovU.js +4 -0
  255. package/lib/duet/p-DoTAjqzf.js +4 -0
  256. package/lib/duet/p-Dr2j33H2.js +4 -0
  257. package/lib/duet/{p-D5_4M8f7.js → p-Z0D6Gy9e.js} +1 -1
  258. package/lib/duet/{p-688ea42b.entry.js → p-a64da31d.entry.js} +1 -1
  259. package/lib/duet/{p-b8c10f92.entry.js → p-a704d617.entry.js} +1 -1
  260. package/lib/duet/{p-2ba227ae.entry.js → p-a745298d.entry.js} +1 -1
  261. package/lib/duet/{p-1d5bdc66.entry.js → p-ad08429f.entry.js} +1 -1
  262. package/lib/duet/p-ad3d8ac8.entry.js +4 -0
  263. package/lib/duet/{p-6cafd585.entry.js → p-b1f362dc.entry.js} +1 -1
  264. package/lib/duet/p-b9acaca1.entry.js +4 -0
  265. package/lib/duet/{p-66861503.entry.js → p-babe244b.entry.js} +1 -1
  266. package/lib/duet/{p-42539282.entry.js → p-c35c9198.entry.js} +1 -1
  267. package/lib/duet/{p-f4be7b00.entry.js → p-c62aeb2e.entry.js} +1 -1
  268. package/lib/duet/p-c8a66d4b.entry.js +4 -0
  269. package/lib/duet/p-cfd5c934.entry.js +4 -0
  270. package/lib/duet/{p-933da99a.entry.js → p-d05bbd77.entry.js} +1 -1
  271. package/lib/duet/{p-d8b7a8da.entry.js → p-d079278e.entry.js} +1 -1
  272. package/lib/duet/p-d110954d.entry.js +4 -0
  273. package/lib/duet/p-d71a366e.entry.js +4 -0
  274. package/lib/duet/{p-218b0dc3.entry.js → p-d92c5cfa.entry.js} +1 -1
  275. package/lib/duet/p-dbab30ea.entry.js +4 -0
  276. package/lib/duet/p-dd8216e7.entry.js +4 -0
  277. package/lib/duet/{p-545e9dd3.entry.js → p-e18a1599.entry.js} +1 -1
  278. package/lib/duet/p-e76051c3.entry.js +4 -0
  279. package/lib/duet/{p-1c2d8dfc.entry.js → p-e9886226.entry.js} +1 -1
  280. package/lib/duet/{p-3aeaed85.entry.js → p-e9becc58.entry.js} +1 -1
  281. package/lib/duet/{p-74d7480d.entry.js → p-ec72f3a2.entry.js} +1 -1
  282. package/lib/duet/{p-7bc24df3.entry.js → p-ecb4e99d.entry.js} +1 -1
  283. package/lib/duet/p-f2ae56b2.entry.js +4 -0
  284. package/lib/duet/{p-0e288f30.entry.js → p-f51c072f.entry.js} +1 -1
  285. package/lib/duet/{p-f237085e.entry.js → p-f82079f2.entry.js} +1 -1
  286. package/lib/duet/{p-9b757818.entry.js → p-f82a2ab7.entry.js} +1 -1
  287. package/lib/esm/{a11y-utils-ehCV15cK.js → a11y-utils-C6cn5C3e.js} +1 -1
  288. package/lib/esm/{app-globals-BWEEyeBa.js → app-globals-CcxHDwb4.js} +1 -1
  289. package/lib/esm/{common-strings-MxsWrBCY.js → common-strings-BWvtXbhA.js} +23 -1
  290. package/lib/esm/duet-action-button.entry.js +5 -5
  291. package/lib/esm/duet-alert.entry.js +24 -33
  292. package/lib/esm/duet-badge.entry.js +16 -4
  293. package/lib/esm/duet-banner.entry.js +8 -8
  294. package/lib/esm/duet-breadcrumb.entry.js +7 -7
  295. package/lib/esm/duet-breadcrumbs.entry.js +7 -7
  296. package/lib/esm/duet-button_2.entry.js +14 -14
  297. package/lib/esm/duet-callout.entry.js +5 -5
  298. package/lib/esm/duet-caption_4.entry.js +16 -15
  299. package/lib/esm/duet-card.entry.js +15 -9
  300. package/lib/esm/duet-checkbox.entry.js +2 -2
  301. package/lib/esm/duet-checkmark.entry.js +4 -4
  302. package/lib/esm/duet-chip.entry.js +3 -3
  303. package/lib/esm/duet-choice_2.entry.js +35 -28
  304. package/lib/esm/duet-collapsible.entry.js +3 -3
  305. package/lib/esm/duet-combobox.entry.js +4 -4
  306. package/lib/esm/duet-contact-card.entry.js +5 -5
  307. package/lib/esm/duet-cookie-consent.entry.js +2 -2
  308. package/lib/esm/duet-date-picker.entry.js +19 -9
  309. package/lib/esm/duet-divider_2.entry.js +5 -5
  310. package/lib/esm/duet-editable-table_3.entry.js +10 -10
  311. package/lib/esm/duet-empty-state.entry.js +2 -2
  312. package/lib/esm/duet-fieldset.entry.js +6 -6
  313. package/lib/esm/duet-file-chooser.entry.js +2 -2
  314. package/lib/esm/duet-footer.entry.js +5 -5
  315. package/lib/esm/duet-grid_2.entry.js +4 -4
  316. package/lib/esm/duet-header_2.entry.js +8 -7
  317. package/lib/esm/duet-hero.entry.js +6 -6
  318. package/lib/esm/duet-icon.entry.js +7 -7
  319. package/lib/esm/duet-input_2.entry.js +8 -8
  320. package/lib/esm/duet-layout.entry.js +2 -2
  321. package/lib/esm/duet-list_2.entry.js +4 -4
  322. package/lib/esm/duet-menu-bar-button.entry.js +4 -4
  323. package/lib/esm/duet-menu-bar-dropdown-link.entry.js +4 -4
  324. package/lib/esm/duet-menu-bar-dropdown.entry.js +6 -6
  325. package/lib/esm/duet-menu-bar-item.entry.js +8 -8
  326. package/lib/esm/duet-menu-bar-link.entry.js +4 -4
  327. package/lib/esm/duet-menu-bar.entry.js +3 -3
  328. package/lib/esm/duet-modal.entry.js +38 -21
  329. package/lib/esm/duet-multiselect.entry.js +5 -5
  330. package/lib/esm/duet-nav.entry.js +3 -3
  331. package/lib/esm/duet-notification_2.entry.js +5 -5
  332. package/lib/esm/duet-number-input.entry.js +14 -9
  333. package/lib/esm/duet-overlay.entry.js +2 -2
  334. package/lib/esm/duet-page-heading.entry.js +4 -4
  335. package/lib/esm/duet-pagination_2.entry.js +7 -7
  336. package/lib/esm/duet-panel.entry.js +51 -0
  337. package/lib/esm/duet-phone-input.entry.js +4 -4
  338. package/lib/esm/duet-popup-menu_2.entry.js +7 -7
  339. package/lib/esm/duet-progress.entry.js +3 -3
  340. package/lib/esm/duet-promo-card.entry.js +7 -7
  341. package/lib/esm/duet-radio_2.entry.js +7 -7
  342. package/lib/esm/duet-range-slider.entry.js +7 -7
  343. package/lib/esm/duet-scrollable_3.entry.js +27 -24
  344. package/lib/esm/duet-section-layout.entry.js +4 -4
  345. package/lib/esm/duet-select.entry.js +9 -9
  346. package/lib/esm/duet-shaped-image.entry.js +4 -4
  347. package/lib/esm/duet-share-chart-item.entry.js +2 -2
  348. package/lib/esm/duet-share-chart.entry.js +10 -8
  349. package/lib/esm/duet-show-more.entry.js +5 -5
  350. package/lib/esm/duet-slideout-lang.entry.js +4 -4
  351. package/lib/esm/duet-slideout-link.entry.js +8 -8
  352. package/lib/esm/duet-slideout-panel-dropdown.entry.js +6 -6
  353. package/lib/esm/duet-slideout-panel.entry.js +13 -13
  354. package/lib/esm/duet-slideout.entry.js +11 -11
  355. package/lib/esm/duet-status-icon.entry.js +3 -3
  356. package/lib/esm/duet-step_2.entry.js +7 -7
  357. package/lib/esm/duet-submenu-bar-dropdown-link.entry.js +4 -4
  358. package/lib/esm/duet-submenu-bar-dropdown.entry.js +6 -6
  359. package/lib/esm/duet-submenu-bar-item.entry.js +7 -7
  360. package/lib/esm/duet-submenu-bar-link.entry.js +3 -3
  361. package/lib/esm/duet-submenu-bar.entry.js +7 -7
  362. package/lib/esm/duet-textarea.entry.js +8 -8
  363. package/lib/esm/duet-toggle.entry.js +6 -6
  364. package/lib/esm/duet-toolbar-dropdown-link.entry.js +4 -4
  365. package/lib/esm/duet-toolbar-dropdown.entry.js +6 -6
  366. package/lib/esm/duet-toolbar-item.entry.js +9 -9
  367. package/lib/esm/duet-toolbar-link.entry.js +4 -4
  368. package/lib/esm/duet-toolbar.entry.js +4 -4
  369. package/lib/esm/duet-tooltip-button_2.entry.js +8 -8
  370. package/lib/esm/duet-tooltip.entry.js +4 -4
  371. package/lib/esm/duet-tray.entry.js +6 -6
  372. package/lib/esm/duet-upload-aria-status.entry.js +2 -2
  373. package/lib/esm/duet-upload-item.entry.js +6 -6
  374. package/lib/esm/duet-visually-hidden.entry.js +2 -2
  375. package/lib/esm/duet.js +4 -4
  376. package/lib/esm/{errorcodes.utils-DM0J2eP4.js → errorcodes.utils-CEyBUBSM.js} +1 -1
  377. package/lib/esm/{focus-utils-BSQKWOQJ.js → focus-utils-BhO5oz9w.js} +1 -1
  378. package/lib/esm/{index-CsVaeVlH.js → index-BPFqbaxm.js} +5 -1
  379. package/lib/esm/{label-J3UGBylH.js → label-BGqhM4kx.js} +1 -1
  380. package/lib/esm/{language-utils-B79DRNQM.js → language-utils-CNMTW_pZ.js} +1 -1
  381. package/lib/esm/loader.js +4 -4
  382. package/lib/esm/{slot-utils-DYWEum3Y.js → slot-utils-BABbKvvc.js} +1 -1
  383. package/lib/esm/{themeable-component-CcmXnsoX.js → themeable-component-Csv1RXxf.js} +1 -1
  384. package/lib/esm/{token-utils-orOLyKQw.js → token-utils-BGFYWQ6j.js} +76 -9
  385. package/lib/esm/{tokens.module-D5_4M8f7.js → tokens.module-Z0D6Gy9e.js} +1 -1
  386. package/lib/types/common-strings.d.ts +2 -0
  387. package/lib/types/components/duet-alert/duet-alert.d.ts +5 -2
  388. package/lib/types/components/duet-badge/duet-badge.d.ts +1 -0
  389. package/lib/types/components/duet-card/duet-card.d.ts +6 -0
  390. package/lib/types/components/duet-choice/duet-choice.d.ts +0 -4
  391. package/lib/types/components/duet-choice-group/duet-choice-group.d.ts +2 -2
  392. package/lib/types/components/duet-modal/duet-modal.d.ts +17 -1
  393. package/lib/types/components/duet-number-input/duet-number-input.d.ts +3 -1
  394. package/lib/types/components/duet-panel/duet-panel.d.ts +47 -0
  395. package/lib/types/components.d.ts +123 -11
  396. package/lib/types/utils/token-utils.d.ts +4 -0
  397. package/lib/types/utils/turva2-color-tokens.d.ts +39 -0
  398. package/package.json +3 -3
  399. package/lib/duet/p-08f98123.entry.js +0 -4
  400. package/lib/duet/p-0b358066.entry.js +0 -4
  401. package/lib/duet/p-11a4fb44.entry.js +0 -4
  402. package/lib/duet/p-24d04bd7.entry.js +0 -4
  403. package/lib/duet/p-3897c6bf.entry.js +0 -4
  404. package/lib/duet/p-3baa3eaa.entry.js +0 -4
  405. package/lib/duet/p-3d904355.entry.js +0 -4
  406. package/lib/duet/p-3e42346e.entry.js +0 -4
  407. package/lib/duet/p-41ef0467.entry.js +0 -4
  408. package/lib/duet/p-5816e147.entry.js +0 -4
  409. package/lib/duet/p-5c2e03bf.entry.js +0 -4
  410. package/lib/duet/p-64731e35.entry.js +0 -4
  411. package/lib/duet/p-6f635395.entry.js +0 -4
  412. package/lib/duet/p-70757ffa.entry.js +0 -4
  413. package/lib/duet/p-86669a06.entry.js +0 -4
  414. package/lib/duet/p-90efef7f.entry.js +0 -4
  415. package/lib/duet/p-C4JF-vDv.js +0 -4
  416. package/lib/duet/p-DpD8uhf3.js +0 -4
  417. package/lib/duet/p-DyjhCDQL.js +0 -4
  418. package/lib/duet/p-MxsWrBCY.js +0 -4
  419. package/lib/duet/p-R41sfCqP.js +0 -4
  420. package/lib/duet/p-SyNakUqS.js +0 -4
  421. package/lib/duet/p-a6173e93.entry.js +0 -4
  422. package/lib/duet/p-aad8dac7.entry.js +0 -4
  423. package/lib/duet/p-abda9682.entry.js +0 -4
  424. package/lib/duet/p-bae186c7.entry.js +0 -4
  425. package/lib/duet/p-d4a03e18.entry.js +0 -4
  426. package/lib/duet/p-e99bccef.entry.js +0 -4
  427. package/lib/duet/p-ee3ca3a8.entry.js +0 -4
  428. package/lib/duet/p-ef3083e7.entry.js +0 -4
  429. package/lib/duet/p-ymqr0QD0.js +0 -4
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from "../../stencil-public-runtime";
2
- import { A11yComponent, ThemeableComponent } from "../../common";
2
+ import { A11yComponent, FocusableComponent, ThemeableComponent } from "../../common";
3
3
  import { DuetColor, DuetHeadingLevel, DuetIconName, DuetLanguage, DuetTheme, DuetVisualHeadingLevel } from "../../common-types";
4
4
  export type DuetModalSize = "small" | "medium" | "large";
5
5
  export type DuetModalVariation = "default" | "slide-up" | "loader";
@@ -132,6 +132,18 @@ export declare class DuetModal implements ThemeableComponent, A11yComponent {
132
132
  * Use this property when you want the modal to close when clicked outside of modal.
133
133
  */
134
134
  closeOnBlur: boolean;
135
+ /**
136
+ * Where to move focus when the modal is closed, either set the element dirctly with JS or give the id of the
137
+ * element as a string. Use empty string to disable focus moving on close - do this if after closing there is
138
+ * another element that automatically gets the focus or you handle focusing manually.
139
+ */
140
+ focusElementOnClose: FocusableComponent | HTMLElement | string;
141
+ /**
142
+ * Makes either the entire modal ("all"), headign and body content ("heading"), or just its body content ("body")
143
+ * an aria-live region, so that changes are announced by the screen readers. Do not use with loader variation,
144
+ * as it handles aria-live separately.
145
+ */
146
+ accessibleAnnounceChanges: "all" | "heading" | "body";
135
147
  /**
136
148
  * Emitted when the modal is opened.
137
149
  */
@@ -170,6 +182,10 @@ export declare class DuetModal implements ThemeableComponent, A11yComponent {
170
182
  * that triggered the modal (if we’re still in the same view).
171
183
  */
172
184
  hide(): Promise<void>;
185
+ /**
186
+ * Set focus on the close button of the modal.
187
+ */
188
+ focusCloseButton(): Promise<void>;
173
189
  /**
174
190
  * Scolls the top of the modal's content into view
175
191
  *
@@ -78,7 +78,8 @@ export declare class DuetNumberInput implements ThemeableComponent, DuetNumericI
78
78
  */
79
79
  accessibleLiveDefaults: DuetLangObject | string;
80
80
  /**
81
- * Format of message used to announce current amount when switching between amounts.
81
+ * Format of message used to announce current amount when switching between amounts. Note that the default has "euros"
82
+ * so if you use another unit is is essential you set this attribute to reflect that unit.
82
83
  * The string {current} is replaced with the current amount.
83
84
  * @default {fi: "{current} euroa valittuna", en: "{current} euros selected", sv: "{current} valda euro"}
84
85
  */
@@ -235,6 +236,7 @@ export declare class DuetNumberInput implements ThemeableComponent, DuetNumericI
235
236
  private setValue;
236
237
  private add;
237
238
  private subtract;
239
+ private getUnitString;
238
240
  private formatAnnouncement;
239
241
  /**
240
242
  * render() function
@@ -0,0 +1,47 @@
1
+ import { DuetMargin, DuetTheme } from "../../common-types";
2
+ import { ThemeableComponent } from "../../common/themeable-component";
3
+ type DuetPanelPalette = "default" | "accent";
4
+ type DuetPanelPaletteVariation = "primary" | "secondary";
5
+ export type DuetPanelVariation = "" | `${DuetPanelPalette}` | `${DuetPanelPaletteVariation}` | `${DuetPanelPalette}-${DuetPanelPaletteVariation}` | `${DuetPanelPaletteVariation}-${DuetPanelPalette}`;
6
+ export declare class DuetPanel implements ThemeableComponent {
7
+ element: HTMLElement;
8
+ /**
9
+ * Theme of the panel.
10
+ */
11
+ theme: DuetTheme;
12
+ /**
13
+ * Controls the padding of the component. Padding is automatically responsive.
14
+ */
15
+ padding: "small" | "medium" | "large";
16
+ /**
17
+ * The color variation of the panel. Combination of palette ("default", "accent") and palette variation ("primary",
18
+ * "secondary"). You can ommit "default" and "primary" - they are the defaults.
19
+ */
20
+ variation: DuetPanelVariation;
21
+ /**
22
+ * Controls the margin of the component.
23
+ */
24
+ margin: DuetMargin;
25
+ /**
26
+ * Set this attribute to draw a border around the panel.
27
+ */
28
+ border: boolean;
29
+ /**
30
+ * Adds accessible label for the panel that is only shown for screen readers.
31
+ */
32
+ accessibleLabel: string;
33
+ /**
34
+ * Indicates the id of a component that labels the panel.
35
+ */
36
+ accessibleLabelledBy: string;
37
+ /**
38
+ * Indicates the id of a component that describes the panel.
39
+ */
40
+ accessibleDescribedBy: string;
41
+ /**
42
+ * Component lifecycle events.
43
+ */
44
+ componentWillLoad(): void;
45
+ render(): any;
46
+ }
47
+ export {};
@@ -38,15 +38,16 @@ import { DuetListLabelWidth, DuetListMobileAlignment, DuetListVariation } from "
38
38
  import { DuetLogoSize } from "./components/duet-logo/duet-logo";
39
39
  import { DuetMenuBarChangeEvent } from "./components/duet-menu-bar/duet-menu-bar";
40
40
  import { DuetModalCloseEvent, DuetModalSize, DuetModalVariation } from "./components/duet-modal/duet-modal";
41
+ import { FocusableComponent, OpenerComponent } from "./common";
41
42
  import { DuetMultiselectEvent, DuetMultiselectItem, DuetMultiselectItemGroup } from "./components/duet-multiselect/duet-multiselect";
42
43
  import { DuetNotificationDrawerDirection } from "./components/duet-notification-drawer/duet-notification-drawer";
43
44
  import { DuetNumberInputEvent } from "./components/duet-number-input/duet-number-input";
44
45
  import { OverlayDisplayDevice } from "./components/duet-overlay/duet-overlay";
45
46
  import { DuetPaginationPageEvent, DuetPaginationVariation } from "./components/duet-pagination/duet-pagination";
47
+ import { DuetPanelVariation } from "./components/duet-panel/duet-panel";
46
48
  import { DuetParagraphSize, DuetParagraphVariation, DuetParagraphWeight } from "./components/duet-paragraph/duet-paragraph";
47
49
  import { Country } from "./data/countries";
48
50
  import { DuetPhoneInputEvent } from "./components/duet-phone-input/duet-phone-input";
49
- import { FocusableComponent, OpenerComponent } from "./common";
50
51
  import { DuetPopupMenuEvent } from "./components/duet-popup-menu/duet-popup-menu";
51
52
  import { DuetPopupMenuItemEvent } from "./components/duet-popup-menu-item/duet-popup-menu-item";
52
53
  import { DuetRadioEvent } from "./components/duet-radio/duet-radio";
@@ -103,15 +104,16 @@ export { DuetListLabelWidth, DuetListMobileAlignment, DuetListVariation } from "
103
104
  export { DuetLogoSize } from "./components/duet-logo/duet-logo";
104
105
  export { DuetMenuBarChangeEvent } from "./components/duet-menu-bar/duet-menu-bar";
105
106
  export { DuetModalCloseEvent, DuetModalSize, DuetModalVariation } from "./components/duet-modal/duet-modal";
107
+ export { FocusableComponent, OpenerComponent } from "./common";
106
108
  export { DuetMultiselectEvent, DuetMultiselectItem, DuetMultiselectItemGroup } from "./components/duet-multiselect/duet-multiselect";
107
109
  export { DuetNotificationDrawerDirection } from "./components/duet-notification-drawer/duet-notification-drawer";
108
110
  export { DuetNumberInputEvent } from "./components/duet-number-input/duet-number-input";
109
111
  export { OverlayDisplayDevice } from "./components/duet-overlay/duet-overlay";
110
112
  export { DuetPaginationPageEvent, DuetPaginationVariation } from "./components/duet-pagination/duet-pagination";
113
+ export { DuetPanelVariation } from "./components/duet-panel/duet-panel";
111
114
  export { DuetParagraphSize, DuetParagraphVariation, DuetParagraphWeight } from "./components/duet-paragraph/duet-paragraph";
112
115
  export { Country } from "./data/countries";
113
116
  export { DuetPhoneInputEvent } from "./components/duet-phone-input/duet-phone-input";
114
- export { FocusableComponent, OpenerComponent } from "./common";
115
117
  export { DuetPopupMenuEvent } from "./components/duet-popup-menu/duet-popup-menu";
116
118
  export { DuetPopupMenuItemEvent } from "./components/duet-popup-menu-item/duet-popup-menu-item";
117
119
  export { DuetRadioEvent } from "./components/duet-radio/duet-radio";
@@ -308,7 +310,7 @@ export namespace Components {
308
310
  */
309
311
  "theme": DuetTheme;
310
312
  /**
311
- * Style variation of the alert.
313
+ * Status variation of the alert. "danger" and "warning" will render the alert with role "alert" (unless announcements has been set to false). Other variations will have role "status". Use "danger" only when something serious has happened or the user must take immediate action. Use "warning" for unexpected situations that are potentially harmful, but don't require immediate action.
312
314
  * @default "default"
313
315
  */
314
316
  "variation": DuetStatus;
@@ -697,6 +699,11 @@ export namespace Components {
697
699
  * Icon to display on the left side of heading. Example: "form-location"
698
700
  */
699
701
  "icon": DuetIconName;
702
+ /**
703
+ * Custom color to be used for the icon, as a design token entered in camelCase or kebab-case. Example: "color-primary". This property can also be set to "currentColor".
704
+ * @default "currentColor"
705
+ */
706
+ "iconColor": DuetColor;
700
707
  /**
701
708
  * Image to display in the card. The image aspect ratio can be anything as images are resized to fit 100% width of the card. Example: "https://cdn.duetds.com/api/assets/illustrations/placeholder-image.jpg"
702
709
  */
@@ -2951,6 +2958,10 @@ export namespace Components {
2951
2958
  "theme": DuetTheme;
2952
2959
  }
2953
2960
  interface DuetModal {
2961
+ /**
2962
+ * Makes either the entire modal ("all"), headign and body content ("heading"), or just its body content ("body") an aria-live region, so that changes are announced by the screen readers. Do not use with loader variation, as it handles aria-live separately.
2963
+ */
2964
+ "accessibleAnnounceChanges": "all" | "heading" | "body";
2954
2965
  /**
2955
2966
  * Adds accessible label for the close icon that is only shown for screen readers. This property is always required to create an accessibly interface! Swedish translation for this property is “Stäng fönstret”.
2956
2967
  * @default {fi: "Sulje ikkuna", sv: "Stäng fönstret", en: "Close the dialog", }
@@ -3004,6 +3015,14 @@ export namespace Components {
3004
3015
  * @default ""
3005
3016
  */
3006
3017
  "color": DuetColor;
3018
+ /**
3019
+ * Set focus on the close button of the modal.
3020
+ */
3021
+ "focusCloseButton": () => Promise<void>;
3022
+ /**
3023
+ * Where to move focus when the modal is closed, either set the element dirctly with JS or give the id of the element as a string. Use empty string to disable focus moving on close - do this if after closing there is another element that automatically gets the focus or you handle focusing manually.
3024
+ */
3025
+ "focusElementOnClose": FocusableComponent | HTMLElement | string;
3007
3026
  /**
3008
3027
  * Size of the modal window's padding.
3009
3028
  * @default "medium"
@@ -3319,7 +3338,7 @@ export namespace Components {
3319
3338
  */
3320
3339
  "accessibleLabelledBy": string;
3321
3340
  /**
3322
- * Format of message used to announce current amount when switching between amounts. The string {current} is replaced with the current amount.
3341
+ * Format of message used to announce current amount when switching between amounts. Note that the default has "euros" so if you use another unit is is essential you set this attribute to reflect that unit. The string {current} is replaced with the current amount.
3323
3342
  * @default {fi: "{current} euroa valittuna", en: "{current} euros selected", sv: "{current} valda euro"}
3324
3343
  */
3325
3344
  "accessibleLive": string;
@@ -3606,6 +3625,44 @@ export namespace Components {
3606
3625
  */
3607
3626
  "visibleItems": number;
3608
3627
  }
3628
+ interface DuetPanel {
3629
+ /**
3630
+ * Indicates the id of a component that describes the panel.
3631
+ */
3632
+ "accessibleDescribedBy": string;
3633
+ /**
3634
+ * Adds accessible label for the panel that is only shown for screen readers.
3635
+ */
3636
+ "accessibleLabel": string;
3637
+ /**
3638
+ * Indicates the id of a component that labels the panel.
3639
+ */
3640
+ "accessibleLabelledBy": string;
3641
+ /**
3642
+ * Set this attribute to draw a border around the panel.
3643
+ */
3644
+ "border": boolean;
3645
+ /**
3646
+ * Controls the margin of the component.
3647
+ * @default "auto"
3648
+ */
3649
+ "margin": DuetMargin;
3650
+ /**
3651
+ * Controls the padding of the component. Padding is automatically responsive.
3652
+ * @default "medium"
3653
+ */
3654
+ "padding": "small" | "medium" | "large";
3655
+ /**
3656
+ * Theme of the panel.
3657
+ * @default ""
3658
+ */
3659
+ "theme": DuetTheme;
3660
+ /**
3661
+ * The color variation of the panel. Combination of palette ("default", "accent") and palette variation ("primary", "secondary"). You can ommit "default" and "primary" - they are the defaults.
3662
+ * @default ""
3663
+ */
3664
+ "variation": DuetPanelVariation;
3665
+ }
3609
3666
  interface DuetParagraph {
3610
3667
  /**
3611
3668
  * Custom color to be used for text, as a design token entered in camelCase or kebab-case. Example: "color-primary".
@@ -6568,7 +6625,6 @@ declare global {
6568
6625
  };
6569
6626
  interface HTMLDuetChoiceElementEventMap {
6570
6627
  "duetChoiceReady": CustomEvent;
6571
- "duetChoiceRemove": CustomEvent;
6572
6628
  "duetChange": DuetChoiceEvent;
6573
6629
  "duetFocus": DuetChoiceEvent;
6574
6630
  "duetBlur": DuetChoiceEvent;
@@ -7025,6 +7081,12 @@ declare global {
7025
7081
  prototype: HTMLDuetPaginationElement;
7026
7082
  new (): HTMLDuetPaginationElement;
7027
7083
  };
7084
+ interface HTMLDuetPanelElement extends Components.DuetPanel, HTMLStencilElement {
7085
+ }
7086
+ var HTMLDuetPanelElement: {
7087
+ prototype: HTMLDuetPanelElement;
7088
+ new (): HTMLDuetPanelElement;
7089
+ };
7028
7090
  interface HTMLDuetParagraphElement extends Components.DuetParagraph, HTMLStencilElement {
7029
7091
  }
7030
7092
  var HTMLDuetParagraphElement: {
@@ -7580,6 +7642,7 @@ declare global {
7580
7642
  "duet-overlay": HTMLDuetOverlayElement;
7581
7643
  "duet-page-heading": HTMLDuetPageHeadingElement;
7582
7644
  "duet-pagination": HTMLDuetPaginationElement;
7645
+ "duet-panel": HTMLDuetPanelElement;
7583
7646
  "duet-paragraph": HTMLDuetParagraphElement;
7584
7647
  "duet-phone-input": HTMLDuetPhoneInputElement;
7585
7648
  "duet-popup-menu": HTMLDuetPopupMenuElement;
@@ -7801,7 +7864,7 @@ declare namespace LocalJSX {
7801
7864
  */
7802
7865
  "theme"?: DuetTheme;
7803
7866
  /**
7804
- * Style variation of the alert.
7867
+ * Status variation of the alert. "danger" and "warning" will render the alert with role "alert" (unless announcements has been set to false). Other variations will have role "status". Use "danger" only when something serious has happened or the user must take immediate action. Use "warning" for unexpected situations that are potentially harmful, but don't require immediate action.
7805
7868
  * @default "default"
7806
7869
  */
7807
7870
  "variation"?: DuetStatus;
@@ -8194,6 +8257,11 @@ declare namespace LocalJSX {
8194
8257
  * Icon to display on the left side of heading. Example: "form-location"
8195
8258
  */
8196
8259
  "icon"?: DuetIconName;
8260
+ /**
8261
+ * Custom color to be used for the icon, as a design token entered in camelCase or kebab-case. Example: "color-primary". This property can also be set to "currentColor".
8262
+ * @default "currentColor"
8263
+ */
8264
+ "iconColor"?: DuetColor;
8197
8265
  /**
8198
8266
  * Image to display in the card. The image aspect ratio can be anything as images are resized to fit 100% width of the card. Example: "https://cdn.duetds.com/api/assets/illustrations/placeholder-image.jpg"
8199
8267
  */
@@ -8589,10 +8657,6 @@ declare namespace LocalJSX {
8589
8657
  * Emitted when the component is available in the DOM.
8590
8658
  */
8591
8659
  "onDuetChoiceReady"?: (event: DuetChoiceCustomEvent<CustomEvent>) => void;
8592
- /**
8593
- * Emitted when the component is removed from the DOM.
8594
- */
8595
- "onDuetChoiceRemove"?: (event: DuetChoiceCustomEvent<CustomEvent>) => void;
8596
8660
  /**
8597
8661
  * Emitted when the checkbox has focus.
8598
8662
  */
@@ -10489,6 +10553,10 @@ declare namespace LocalJSX {
10489
10553
  "theme"?: DuetTheme;
10490
10554
  }
10491
10555
  interface DuetModal {
10556
+ /**
10557
+ * Makes either the entire modal ("all"), headign and body content ("heading"), or just its body content ("body") an aria-live region, so that changes are announced by the screen readers. Do not use with loader variation, as it handles aria-live separately.
10558
+ */
10559
+ "accessibleAnnounceChanges"?: "all" | "heading" | "body";
10492
10560
  /**
10493
10561
  * Adds accessible label for the close icon that is only shown for screen readers. This property is always required to create an accessibly interface! Swedish translation for this property is “Stäng fönstret”.
10494
10562
  * @default {fi: "Sulje ikkuna", sv: "Stäng fönstret", en: "Close the dialog", }
@@ -10536,6 +10604,10 @@ declare namespace LocalJSX {
10536
10604
  * @default ""
10537
10605
  */
10538
10606
  "color"?: DuetColor;
10607
+ /**
10608
+ * Where to move focus when the modal is closed, either set the element dirctly with JS or give the id of the element as a string. Use empty string to disable focus moving on close - do this if after closing there is another element that automatically gets the focus or you handle focusing manually.
10609
+ */
10610
+ "focusElementOnClose"?: FocusableComponent | HTMLElement | string;
10539
10611
  /**
10540
10612
  * Size of the modal window's padding.
10541
10613
  * @default "medium"
@@ -10839,7 +10911,7 @@ declare namespace LocalJSX {
10839
10911
  */
10840
10912
  "accessibleLabelledBy"?: string;
10841
10913
  /**
10842
- * Format of message used to announce current amount when switching between amounts. The string {current} is replaced with the current amount.
10914
+ * Format of message used to announce current amount when switching between amounts. Note that the default has "euros" so if you use another unit is is essential you set this attribute to reflect that unit. The string {current} is replaced with the current amount.
10843
10915
  * @default {fi: "{current} euroa valittuna", en: "{current} euros selected", sv: "{current} valda euro"}
10844
10916
  */
10845
10917
  "accessibleLive"?: string;
@@ -11138,6 +11210,44 @@ declare namespace LocalJSX {
11138
11210
  */
11139
11211
  "visibleItems"?: number;
11140
11212
  }
11213
+ interface DuetPanel {
11214
+ /**
11215
+ * Indicates the id of a component that describes the panel.
11216
+ */
11217
+ "accessibleDescribedBy"?: string;
11218
+ /**
11219
+ * Adds accessible label for the panel that is only shown for screen readers.
11220
+ */
11221
+ "accessibleLabel"?: string;
11222
+ /**
11223
+ * Indicates the id of a component that labels the panel.
11224
+ */
11225
+ "accessibleLabelledBy"?: string;
11226
+ /**
11227
+ * Set this attribute to draw a border around the panel.
11228
+ */
11229
+ "border"?: boolean;
11230
+ /**
11231
+ * Controls the margin of the component.
11232
+ * @default "auto"
11233
+ */
11234
+ "margin"?: DuetMargin;
11235
+ /**
11236
+ * Controls the padding of the component. Padding is automatically responsive.
11237
+ * @default "medium"
11238
+ */
11239
+ "padding"?: "small" | "medium" | "large";
11240
+ /**
11241
+ * Theme of the panel.
11242
+ * @default ""
11243
+ */
11244
+ "theme"?: DuetTheme;
11245
+ /**
11246
+ * The color variation of the panel. Combination of palette ("default", "accent") and palette variation ("primary", "secondary"). You can ommit "default" and "primary" - they are the defaults.
11247
+ * @default ""
11248
+ */
11249
+ "variation"?: DuetPanelVariation;
11250
+ }
11141
11251
  interface DuetParagraph {
11142
11252
  /**
11143
11253
  * Custom color to be used for text, as a design token entered in camelCase or kebab-case. Example: "color-primary".
@@ -13823,6 +13933,7 @@ declare namespace LocalJSX {
13823
13933
  "duet-overlay": DuetOverlay;
13824
13934
  "duet-page-heading": DuetPageHeading;
13825
13935
  "duet-pagination": DuetPagination;
13936
+ "duet-panel": DuetPanel;
13826
13937
  "duet-paragraph": DuetParagraph;
13827
13938
  "duet-phone-input": DuetPhoneInput;
13828
13939
  "duet-popup-menu": DuetPopupMenu;
@@ -13933,6 +14044,7 @@ declare module "@stencil/core" {
13933
14044
  "duet-overlay": LocalJSX.DuetOverlay & JSXBase.HTMLAttributes<HTMLDuetOverlayElement>;
13934
14045
  "duet-page-heading": LocalJSX.DuetPageHeading & JSXBase.HTMLAttributes<HTMLDuetPageHeadingElement>;
13935
14046
  "duet-pagination": LocalJSX.DuetPagination & JSXBase.HTMLAttributes<HTMLDuetPaginationElement>;
14047
+ "duet-panel": LocalJSX.DuetPanel & JSXBase.HTMLAttributes<HTMLDuetPanelElement>;
13936
14048
  "duet-paragraph": LocalJSX.DuetParagraph & JSXBase.HTMLAttributes<HTMLDuetParagraphElement>;
13937
14049
  "duet-phone-input": LocalJSX.DuetPhoneInput & JSXBase.HTMLAttributes<HTMLDuetPhoneInputElement>;
13938
14050
  "duet-popup-menu": LocalJSX.DuetPopupMenu & JSXBase.HTMLAttributes<HTMLDuetPopupMenuElement>;
@@ -5,6 +5,10 @@ export declare function capitalize(str?: string): string;
5
5
  export declare function camelize(str?: string): string;
6
6
  export declare function getTheme(theme?: DuetTheme): DuetTheme;
7
7
  export declare function capitalizeFirstLetter(string: any): any;
8
+ /**
9
+ * Add "-turva" to color names (or "Turva" to camelCase color names)
10
+ */
11
+ export declare function postfixTheme(name: string, theme: DuetTheme): string;
8
12
  export declare function getColorByName(name: string, theme?: DuetTheme): string | undefined;
9
13
  export declare function convertToColorName(name?: string, theme?: DuetTheme): string;
10
14
  export declare function getFontSizeByName(name: string): string | undefined;
@@ -0,0 +1,39 @@
1
+ declare const turva2ColorTokens: {
2
+ "color-turva2-red-00": string;
3
+ "color-turva2-red-50": string;
4
+ "color-turva2-red-100": string;
5
+ "color-turva2-red-200": string;
6
+ "color-turva2-red-300": string;
7
+ "color-turva2-red-400": string;
8
+ "color-turva2-red-500": string;
9
+ "color-turva2-red-600": string;
10
+ "color-turva2-red-700": string;
11
+ "color-turva2-red-800": string;
12
+ "color-turva2-red-900": string;
13
+ "color-turva2-red-1000": string;
14
+ "color-turva2-gray-00": string;
15
+ "color-turva2-gray-50": string;
16
+ "color-turva2-gray-100": string;
17
+ "color-turva2-gray-200": string;
18
+ "color-turva2-gray-300": string;
19
+ "color-turva2-gray-400": string;
20
+ "color-turva2-gray-500": string;
21
+ "color-turva2-gray-600": string;
22
+ "color-turva2-gray-700": string;
23
+ "color-turva2-gray-800": string;
24
+ "color-turva2-gray-900": string;
25
+ "color-turva2-gray-1000": string;
26
+ "color-turva-nude-00": string;
27
+ "color-turva-nude-50": string;
28
+ "color-turva-nude-100": string;
29
+ "color-turva-nude-200": string;
30
+ "color-turva-nude-300": string;
31
+ "color-turva-nude-400": string;
32
+ "color-turva-nude-500": string;
33
+ "color-turva-nude-600": string;
34
+ "color-turva-nude-700": string;
35
+ "color-turva-nude-800": string;
36
+ "color-turva-nude-900": string;
37
+ "color-turva-nude-1000": string;
38
+ };
39
+ export default turva2ColorTokens;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duetds/components",
3
- "version": "10.0.0-alpha.24",
3
+ "version": "10.0.0-alpha.26",
4
4
  "description": "This package includes Duet Design System Web Components and related utilities.",
5
5
  "bugs": {
6
6
  "email": "duetdesignsystem@lahitapiola.fi"
@@ -62,8 +62,8 @@
62
62
  },
63
63
  "devDependencies": {
64
64
  "@duetds/fonts": "3.0.51",
65
- "@duetds/icons": "4.2.3",
66
- "@duetds/tokens": "4.0.104",
65
+ "@duetds/icons": "4.2.5",
66
+ "@duetds/tokens": "4.0.106",
67
67
  "@percy/cli": "1.30.1",
68
68
  "@rollup/plugin-replace": "5.0.2",
69
69
  "@stencil/core": "4.36.3",
@@ -1,4 +0,0 @@
1
- /*!
2
- * Built with Duet Design System
3
- */
4
- import{r as e,c as t,h as a,H as i,g as s}from"./p-CsVaeVlH.js";import{i as r}from"./p-uJz71_4x.js";import{c as o}from"./p-Cfr_DJqU.js";import{s as n,u as d}from"./p-Db8rvjPI.js";import{g as l,c,d as u}from"./p-DglOA-oE.js";import{h as p}from"./p-SyNakUqS.js";import"./p-C6E9F6QT.js";const h=class{constructor(a){e(this,a),this.duetDismiss=t(this,"duetDismiss",7),this.duetCloseComplete=t(this,"duetCloseComplete",7),this.descriptiveId=o("DuetAlert"),this.hasShowMoreSlot=!1,this.labels={default:{fi:"Huomioithan",en:"Please note",sv:"Observera"},success:{fi:"Onnistunut toiminto",en:"Action completed successfully",sv:"Lyckad åtgärd"},danger:{fi:"Tärkeä varoitus",en:"Important warning",sv:"Viktig varning"},warning:{fi:"Varoitus",en:"Warning",sv:"Varning"}},this.theme="",this.isDismissed=!1,this.isExpanded=!1,this.accessibleLabelDefaults={fi:"Painike viestin sulkemiseen",sv:"Knapp för att stänga meddelandet",en:"Button to close the message"},this.accessibleLabel=l(this.accessibleLabelDefaults),this.announcements=!0,this.icon="",this.margin="auto",this.padding="auto",this.variation="default",this.position="content",this.dismissible=!1,this.focusable=!1,this.expandingTitle="",this.handleDismiss=e=>{this.handleHide(),this.duetDismiss.emit({component:"duet-alert",originalEvent:e})},this.handleShow=()=>{this.isDismissed=!1},this.handleHide=()=>{this.isDismissed=!0,this.element.addEventListener("transitionend",(()=>this.duetCloseComplete.emit()),{once:!0})},this.handleExpandToggle=()=>{this.isExpanded=!this.isExpanded}}componentWillLoad(){r(this),this.hasShowMoreSlot=p(this.element,"show-more")}componentDidLoad(){this.autoDismiss&&(this.timeoutID=setTimeout((()=>this.handleDismiss()),this.autoDismiss))}connectedCallback(){c(this,{prop:"accessibleLabel",defaults:"accessibleLabelDefaults"}),n(this)}disconnectedCallback(){this.timeoutID&&clearTimeout(this.timeoutID),u(this),d(this)}async show(){this.handleShow()}async hide(){this.handleHide()}async setFocus(e){this.alertContainer.focus(e)}render(){const e=["default","success","danger","warning"].includes(this.variation)?this.variation:"default",t=l(this.labels[e]);return a(i,{key:"5584475286356ac3d444c97e9429aaddc5e6153e",class:{"duet-theme-turva":"turva"===this.theme,"duet-alert-is-dismissed":this.isDismissed},role:this.announcements?"alert":void 0},a("div",{key:"7a3ef0cee9f7e304eac829dfbfd834f1123867fd",class:{"duet-alert-wrapper":!0,"duet-p-0":"none"===this.padding,"duet-m-0":"none"===this.margin,[e]:!0,[this.position]:!0,"duet-theme-turva":"turva"===this.theme}},a("div",{key:"27797a4ea2296ac70ac133f3ec1a4fedaa07b78d",class:{"duet-alert":!0,"duet-alert-expandable":!!this.expandingTitle,"duet-alert-expanded":this.isExpanded,"duet-alert-has-icon":!!this.icon||"below-nav"===this.position,"duet-alert-has-show-more":this.hasShowMoreSlot,"duet-alert-is-dismissible":this.dismissible,"duet-p-0":"none"===this.padding,"duet-m-0":"none"===this.margin,[e]:!0,"duet-theme-turva":"turva"===this.theme}},a("div",{key:"3030a95fb19791465f75a74a6803a1bbd0f9b5dd",class:"duet-alert-container",ref:e=>{this.alertContainer=e},tabindex:this.focusable?"0":void 0},"below-nav"!==this.position&&a("div",{key:"e990ae6cf89ef89c0c3445af06402f8202583796",class:"duet-alert-icon"},this.icon&&a("duet-icon",{key:"f4b0bd5ca292239cb7a98379b10dd965d4173509",size:"auto",name:this.icon,color:"currentColor"})||a("duet-status-icon",{key:"ad9b6952c1af47501fe6bf7298d69a66bb1223b9",strong:!0,variation:e,margin:"none",size:"auto"})),"below-nav"===this.position&&a("div",{key:"479a41fafb16793a51eb71e8e892088b6ede41ef",class:"duet-alert-icon below-nav"},a("duet-status-icon",{key:"249c1b1f9a763ce5725982a2c0a00597698bccc7",strong:!0,variation:e,margin:"none",size:"auto"})),a("div",{key:"577fa13d2a0682a3fe079a4a098e11bb99fc8dc9",class:"duet-alert-content",id:this.descriptiveId},this.expandingTitle&&a("button",{key:"4fb68ee1545889ee3c0090bcbc3cd7e952e4d6c9","aria-expanded":this.isExpanded.toString(),"aria-controls":`${this.descriptiveId}-content`,class:"duet-alert-expander",onClick:this.handleExpandToggle},a("span",{key:"9ab35209919d1fe4aa6f3db6c16e593828985434",class:"expanding-title"},this.expandingTitle),a("duet-icon",{key:"d387939b25c676cd7c17ec6962da00383935ade3",name:"action-arrow-down",color:"default"===e?"lt-blue-800":`${e}-800`,margin:"none",size:"x-small"})),(!this.expandingTitle||this.isExpanded)&&a("div",{key:"989a79e16a74690dc7c78da3cc40ef4d02ecb513",id:`${this.descriptiveId}-content`},a("duet-visually-hidden",{key:"4792b5aa92cefc69907c6325a3c89bd5d9476ae3"},t),a("slot",{key:"662c5673bd1118e9effdd083eba7b13ea349ac39"})))),this.hasShowMoreSlot&&a("duet-show-more",{key:"7b7b917b785c74924ef13550a9866ab4d724f9ce",margin:"none",class:"duet-alert-show-more"},a("slot",{key:"6370fcc4b7e689d1997c7e224e6f71ca27772689",name:"show-more"})),this.dismissible&&!this.expandingTitle&&a("div",{key:"70e609bdf62b90448894c3f107c435d9b9b9f7ca",class:"duet-alert-dismiss"},a("duet-button",{key:"1b230dc424387b18799431608c1aab1e63e7035f",variation:"plain",accessibleLabel:this.accessibleLabel,accessibleDescribedBy:this.descriptiveId,iconSize:"medium",icon:"navigation-close",iconOnly:!0,margin:"none",color:"default"===e?"lt-blue-800":`${e}-800`,theme:this.theme,onClick:this.handleDismiss,fixed:!0})))))}get element(){return s(this)}};h.style='*,*::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%;max-height:999px;transition:opacity 300ms ease, visibility 300ms ease, transform 300ms ease, max-height 300ms ease}:host(:focus){outline:0}:host(.user-is-tabbing:focus){border-radius:4px;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing.duet-theme-turva:focus){box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}:host(.duet-alert-is-dismissed){max-height:0;overflow:hidden;visibility:hidden !important;opacity:0;transform:scale(0.98)}:host(.duet-alert-is-dismissed) .duet-alert{margin:0 !important}.duet-alert-wrapper{margin-bottom:16px !important;position:relative;width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.25;color:rgb(8, 42, 77);background:rgb(228, 241, 247);border:1px solid rgb(172, 210, 229);border-radius:12px;transition:margin 100ms 300ms ease}.duet-alert-wrapper.duet-p-0{padding:0 !important}.duet-alert-wrapper.duet-m-0{margin:0 !important}.duet-alert-wrapper.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"}.duet-alert-wrapper.warning{color:rgb(38, 26, 4);background:rgb(255, 247, 221);border:1px solid rgb(255, 217, 120)}.duet-alert-wrapper.danger{color:rgb(89, 0, 45);background:rgb(255, 225, 231);border:1px solid rgb(252, 136, 162)}.duet-alert-wrapper.success{color:rgb(4, 38, 33);background:rgb(231, 248, 239);border:1px solid rgb(163, 229, 202)}.duet-alert-wrapper.below-nav{margin-bottom:0 !important;border:0;border-bottom:1px solid rgb(212, 223, 229);border-radius:0}.duet-alert-wrapper .duet-alert{position:relative;width:100%;max-width:1384px;padding:16px;margin:0 auto}.duet-alert-wrapper .duet-alert.duet-alert-is-dismissible{padding:16px 72px 16px 16px;text-align:left}.duet-alert-wrapper .duet-alert.duet-alert-is-dismissible .duet-alert-container{text-align:left}.duet-alert-wrapper .duet-alert.duet-alert-has-show-more{padding-bottom:0}.duet-alert-wrapper .duet-alert.duet-alert-has-icon .duet-alert-show-more{margin-left:36px}.duet-alert-wrapper .duet-alert.duet-alert-expandable{padding-right:20px}.duet-alert-dismiss{position:absolute;top:3px;right:3px}.duet-alert-dismiss duet-button:hover{background-color:rgb(198, 225, 238);border-radius:8px}.warning .duet-alert-dismiss duet-button:hover{background-color:rgb(255, 232, 160)}.danger .duet-alert-dismiss duet-button:hover{background-color:rgb(255, 173, 190)}.success .duet-alert-dismiss duet-button:hover{background-color:rgb(191, 239, 218)}.duet-alert-container{display:inline-flex;align-items:flex-start;width:100%;margin:0 auto !important}.duet-alert-container .duet-alert-content{flex-grow:1;line-height:1.5}.duet-alert-has-icon .duet-alert-container{margin-top:2px !important}.duet-alert-container:focus{outline:none}.duet-alert-icon{position:relative;top:2px;display:inline-block;width:20px;min-width:20px;height:20px;margin:0 16px 0 0 !important}.duet-alert-icon duet-icon{width:20px;height:20px}.duet-alert-expander{display:flex;gap:16px;align-items:flex-start;justify-content:space-between;width:calc(100% + 32px + 40px);padding:16px;padding-right:20px;padding-left:52px;margin:-16px;margin-left:-52px;font-family:inherit;color:inherit;cursor:pointer;background-color:inherit}.duet-alert-expanded .duet-alert-expander{margin-bottom:-4px}.duet-alert-expander .expanding-title{flex-grow:1;font-size:1rem;line-height:1.5;text-align:left}.duet-alert-expander duet-icon{position:relative;top:4px;transition:rotate 300ms ease}.duet-alert-expanded .duet-alert-expander duet-icon{rotate:180deg}.duet-alert-expander:hover{filter:brightness(85%)}';export{h as duet_alert}
@@ -1,4 +0,0 @@
1
- /*!
2
- * Built with Duet Design System
3
- */
4
- import{r as e,h as a,H as o,g as t}from"./p-CsVaeVlH.js";import{i as r}from"./p-uJz71_4x.js";import{h as i,c as d}from"./p-SyNakUqS.js";import{g as n}from"./p-DyjhCDQL.js";import"./p-D5_4M8f7.js";const s=class{constructor(a){e(this,a),this.theme="",this.margin="auto",this.backgroundColor="",this.textColor="secondary",this.image="",this.headingLevel="h3"}componentWillLoad(){r(this),this.hasPreHeadingSlot=i(this.element,"pre-heading"),this.hasHeadingSlot=i(this.element,"heading"),this.hasDescriptionSlot=i(this.element,"description"),this.hasActionSlot=i(this.element,"action"),d(this.element,"heading","span"),d(this.element,"description","span")}async setFocus(e){this.url&&this.aOrDivElement&&this.aOrDivElement.focus(e)}render(){const e=n(this.backgroundColor,this.theme);return a(o,{key:"af448d11e161105c397211ff014c9383079b42f1",class:{"duet-m-0":"none"===this.margin}},a("aside",{key:"79f3ca4d55f67be99f4f7cd6e0a1ef28d64da3ba",class:{"duet-promo-card":!0,"duet-theme-turva":"turva"===this.theme,"no-bg-color":!this.backgroundColor,"duet-promo-card-link":!!this.url},style:{backgroundColor:e||"none"}},a(this.url?"a":"div",{key:"6a09c556defa485766025260e084d876fcc072a3",href:this.url,class:"content-wrapper",ref:e=>this.aOrDivElement=e},a("img",{key:"9832d77d4f39e634879c2da087a81552a20aaf13",class:"image",src:this.image,alt:"",role:"presentation"}),a("div",{key:"fe2cec5d0c889557be33ac5d663a2990d56ee57c",class:"content"},this.hasPreHeadingSlot&&a("div",{key:"b105405d3236a416549ee74834214461426a5e93",class:"pre-heading"},a("slot",{key:"50359bf5424f78947cfa9bd1c25f42344822b8f1",name:"pre-heading"})),this.hasHeadingSlot&&a("div",{key:"8af70521d1e603b5fe0c44029fbfb99a8a8e89c6",class:"heading"},a("duet-heading",{key:"85e93d6d7b2e7586763646669087933692ebb4d9",theme:this.theme,level:this.headingLevel,"visual-level":"h3",margin:"none",color:this.textColor},a("span",{key:"6c606a3c8cd388df51390dd9221dd70e59705532"},a("slot",{key:"838966e5712aa10bd977fc15bd1dfe627617b5db",name:"heading"})))),this.hasDescriptionSlot&&a("div",{key:"42e9d0d08afea654e4152b83d81096313bb98c55",class:"description"},a("duet-paragraph",{key:"28008c2195cd3bad659aac6d84b5f10122c74d2d",theme:this.theme,margin:"none",color:this.textColor},a("span",{key:"52d7a34460dc56568447d7277a53391040a17134"},a("slot",{key:"baa534ae9994e67a375871a29474d3aaef8845fc",name:"description"})))),this.hasActionSlot&&a("div",{key:"46096bcff1087436a10c6e604015785d804de8ae",class:"action"},a("slot",{key:"1202289167a18bac49309d93f03e00737eebf9ff",name:"action"}))))))}get element(){return t(this)}};s.style='*,*::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;margin-right:4px !important;margin-bottom:2px !important;display:block;width:auto}:host:last-child,:host:last-of-type{margin-right:0 !important}:host(.duet-m-0){margin:0 !important}.duet-promo-card{display:flex;flex-direction:column;width:100%;height:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-style:normal;color:rgb(8, 42, 77);text-align:left;border-radius:20px}.duet-promo-card.duet-p-0{padding:0 !important}.duet-promo-card.duet-m-0{margin:0 !important}.duet-promo-card .content-wrapper{display:flex;flex-direction:column;height:100%;color:inherit;text-decoration:none}.duet-promo-card .content-wrapper:focus{border-radius:20px;outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-promo-card .image{position:relative;width:100%;overflow:hidden;border-top-left-radius:20px;border-top-right-radius:20px;object-fit:cover}.duet-promo-card .content{display:flex;flex-direction:column;flex-grow:1;gap:8px;padding:20px}@media (min-width: 36em){.duet-promo-card .content{padding:28px}}.duet-promo-card .action{display:flex;flex-grow:1;align-items:flex-end;padding-top:16px}.duet-promo-card.no-bg-color .content{padding:20px 0 0}.duet-promo-card.no-bg-color .image{border-radius:16px}.duet-promo-card.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"}.duet-promo-card.duet-theme-turva .content-wrapper:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-promo-card-link{transition:box-shadow 300ms ease}.duet-promo-card-link:hover{box-shadow:0 2px 6px 0 rgba(0, 41, 77, 0.07), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07), 0 2px 10px 0 rgba(0, 41, 77, 0.1)}.duet-promo-card-link:hover.duet-theme-turva{box-shadow:0 2px 6px 0 rgba(117, 117, 117, 0.13), 0 -1px 0 0 rgba(0, 0, 0, 0.09), -1px 0 0 0 rgba(0, 0, 0, 0.07), 1px 0 0 0 rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.07), 0 2px 10px 0 rgba(117, 117, 117, 0.15)}';export{s as duet_promo_card}
@@ -1,4 +0,0 @@
1
- /*!
2
- * Built with Duet Design System
3
- */
4
- import{r as e,c as t,h as a,g as d}from"./p-CsVaeVlH.js";import{d as i,e as o}from"./p-B1B-PPrh.js";import{i as s}from"./p-uJz71_4x.js";import{a as l}from"./p-MxsWrBCY.js";import{f as r}from"./p-C4JF-vDv.js";import{a as n}from"./p-Db8rvjPI.js";import{a as m,g as u,c as h,d as p}from"./p-DglOA-oE.js";import{h as c}from"./p-SyNakUqS.js";import{T as g}from"./p-CooAqTCj.js";import"./p-C6E9F6QT.js";const b=class{constructor(a){var d,i;e(this,a),this.duetOpen=t(this,"duetOpen",7),this.duetClose=t(this,"duetClose",7),this.duetCloseComplete=t(this,"duetCloseComplete",7),this.duetBeforeClose=t(this,"duetBeforeClose",7),this.hasStickyHeader=!1,this.isAndroidDevice=(null===(i=null===(d=null===navigator||void 0===navigator?void 0:navigator.userAgent)||void 0===d?void 0:d.toLowerCase())||void 0===i?void 0:i.indexOf("android"))>-1||null,this.isSafariBrowser=/^((?!chrome|android).)*safari/i.test(null===navigator||void 0===navigator?void 0:navigator.userAgent),this.accessibleLoaderAnnouncementDefaults=l,this.accessibleCloseLabelDefaults={fi:"Sulje ikkuna",sv:"Stäng fönstret",en:"Close the dialog"},this.handleAndroidResizeEvents=()=>{"INPUT"==document.activeElement.tagName&&window.setTimeout((function(){var e;try{null===(e=null===document||void 0===document?void 0:document.activeElement)||void 0===e||e.scrollIntoViewIfNeeded(!0)}catch(e){}}),100)},this.open=!1,this.language=m(),this.accessibleCloseLabel=u(this.accessibleCloseLabelDefaults,this.language),this.accessibleLoaderAnnouncement=u(this.accessibleLoaderAnnouncementDefaults,this.language),this.size="medium",this.accessibleDetails=void 0,this.accessibleDescription=void 0,this.variation="default",this.gutterSize="medium",this.theme="",this.heading="",this.headingLevel="h3",this.icon="",this.color="",this.active=!1,this.closeOnBlur=!1}openChanged(){this.open?(this.modalEl&&this.modalEl.scrollTop&&(this.modalEl.scrollTop=0),this.focusedElBeforeOpen=document.activeElement,i("slide-up"===this.variation?this.modalContentEl:this.modalEl,{reserveScrollBarGap:!0}),this.teleport.makeSiblingsInert(),this.slotContainerEl.querySelectorAll(".duet-loader-message").forEach((e=>e.remove())),setTimeout((()=>{"loader"===this.variation?this.addMessage(this.accessibleLoaderAnnouncement,!1):this.isAndroidDevice?this.modalEl.focus():this.buttonEl.setFocus()}),600),setTimeout((()=>{this.modalEl.classList.add("duet-disable-transitions")}),800),this.isAndroidDevice&&window.addEventListener("resize",this.handleAndroidResizeEvents),this.duetOpen.emit()):(this.modalEl.classList.remove("duet-disable-transitions"),this.modalEl.addEventListener("transitionend",(()=>this.duetCloseComplete.emit()),{once:!0}),o("slide-up"===this.variation?this.modalContentEl:this.modalEl),this.duetClose.emit(),this.teleport.removeInertFromSiblings(),setTimeout((()=>{r(this.focusedElBeforeOpen)}),600),this.isAndroidDevice&&window.removeEventListener("resize",this.handleAndroidResizeEvents))}activeChanged(){this.open=this.active}componentWillLoad(){this.hasStickyHeader=c(this.element,"sticky-header"),s(this)}componentDidLoad(){this.active&&(this.open=!0,this.modalEl.classList.add("duet-disable-transitions"))}connectedCallback(){this.teleport||(this.teleport=new g(this.element)),this.teleport.isActive?(this.teleport.observeDeletion(),h(this,[{prop:"accessibleCloseLabel",defaults:"accessibleCloseLabelDefaults"},{prop:"accessibleLoaderAnnouncement",defaults:"accessibleLoaderAnnouncementDefaults"}])):this.teleport.activate()}disconnectedCallback(){p(this),this.modalEl&&o(this.modalEl)}handleKeyUp(e){this.open&&n(e)&&this.closeModal(e)}async show(){this.open=!0}async hide(){this.open=!1}async scrollToTop(e=!0){var t;const a=e?"smooth":"auto";if("slide-up"===this.variation){const e=(null===(t=this.modalEl.querySelector(".duet-modal-sticky-header"))||void 0===t?void 0:t.clientHeight)||0,d=this.modalEl.querySelector(".duet-modal-body").computedStyleMap().get("padding-top");this.slotContainerEl.style.scrollMarginTop=`${e+d.value}px`,this.slotContainerEl.scrollIntoView({behavior:a})}else this.modalEl.querySelector(".duet-modal-body").scrollIntoView({behavior:a})}async addMessage(e,t=!0){const a=document.createElement(t?"duet-paragraph":"duet-visually-hidden");a.textContent=e,a.classList.add("duet-loader-message"),t&&setTimeout((()=>{this.slotContainerEl.querySelectorAll(".duet-loader-message").forEach((e=>e.classList.remove("show"))),a.classList.add("show")}),10),this.slotContainerEl.appendChild(a)}closeModal(e){this.duetBeforeClose.emit({originalEvent:e,component:"duet-modal"}),e.defaultPrevented||setTimeout((()=>{this.hide()}),1)}render(){var e,t;let d="primary",i="secondary";const o=a("div",{key:"16ecdebdff260207b978a3c14686bb27f99369bc",class:"duet-modal-close"},a("duet-button",{key:"832185b0eb84406145281ec31a310cba640f42db",ref:e=>this.buttonEl=e,variation:"plain",accessibleLabel:this.accessibleCloseLabel,color:i,iconSize:"large",icon:"navigation-close",iconOnly:!0,margin:"none",theme:this.theme,onClick:e=>this.closeModal(e),fixed:!0}));return"turva"===this.theme&&(d="primary-turva",i="secondary-turva"),a("div",{key:"ff98af4d04d36b5967954bae9fad52d8a3c92af1",ref:e=>this.modalEl=e,"aria-label":null!==(e=this.accessibleLabel)&&void 0!==e?e:this.heading,"aria-details":this.accessibleDetails,"aria-description":this.accessibleDescription,"aria-describedby":this.accessibleDescribedBy,role:"loader"===this.variation?"alert":"dialog","aria-modal":!this.isSafariBrowser,tabindex:"-1",class:{"duet-modal-container":!0,"duet-theme-turva":"turva"===this.theme,"duet-modal-active":this.open,"duet-modal-slide-up":"slide-up"===this.variation,"duet-modal-has-sticky-header":this.hasStickyHeader}},a("duet-overlay",{key:"f5b45235e96cfe9afc7e698f58758f3889c3fd18","z-index":"-1",visible:this.open,variation:"loader"===this.variation?"white":"default"}),a("div",{key:"8e01ae356b01d920b2dc99fb9012d0b36e1160c2",ref:e=>this.modalInnerEl=e,class:{"duet-modal-inner":!0,[this.size]:!0,"duet-modal-slide-up":"slide-up"===this.variation},onClick:e=>{this.closeOnBlur&&(e.target||e.srcElement)===this.modalInnerEl&&this.closeModal(e)}},a("div",{key:"4b67fe5599c29429e2e43d2fa3ec1e4bb2362f5a",ref:e=>this.modalContentEl=e,class:{"duet-modal":!0,"duet-modal-has-sticky-header":this.hasStickyHeader,[this.size]:!0,[this.variation]:!0}},"none"!==this.gutterSize&&!this.hasStickyHeader&&a("duet-spacer",{key:"1fc3a1a23142493d5a384fcd1dfbc5e0cb471de4"}),this.hasStickyHeader?a("div",{class:"duet-modal-sticky-header"},o,a("slot",{name:"sticky-header"})):o,a("div",{key:"2f216eb1c8db56490a684203edfdb93bcfd736c7",class:{"duet-modal-body":!0,"duet-modal-gutter-none":"none"===this.gutterSize,"duet-modal-gutter-small":"small"===this.gutterSize,"duet-modal-gutter-medium":"medium"===this.gutterSize,"duet-modal-gutter-large":"large"===this.gutterSize}},a("div",{key:"e727afc6bd9c81124f632929b840cc0beaac6537",class:"duet-modal-header"},a("span",{key:"8a55cf9f79f46df6f7d15961f7d1300cc42fe345",class:"duet-modal-inner-slot-top"},a("slot",{key:"c79cbee03e0bce0b44b4d816b5c4d02b05605a10",name:"top"})),this.icon&&a("duet-icon",{key:"278d6e8d84de7394267291e0fb294c577e7be718",name:this.icon,size:"xx-large",color:this.color||d}),this.heading&&a("duet-heading",{key:"fad28910b603089cfd9f3bf4fb1e9dc4df6a4d6a","visual-level":null!==(t=this.headingVisualLevel)&&void 0!==t?t:this.headingLevel,level:this.headingLevel,theme:this.theme},this.heading)),"loader"===this.variation&&a("div",{key:"67d1778db551a40565263f39968e8a7f3e3d148d",class:"duet-modal-spinner"},a("duet-spinner",{key:"71fddb78ad12e0ce90c14a725ac017431bf8864a",size:"large",color:"primary"})),a("div",{key:"e0a601e11fa6761658d6f74af02a509b835e6f37",class:"duet-modal-inner-slot-default",ref:e=>this.slotContainerEl=e,"aria-live":"loader"===this.variation?"assertive":"off"},a("slot",{key:"a0ef6dab10ebc813443950cbb369303fd2b305a4"}))))))}get element(){return d(this)}static get watchers(){return{open:["openChanged"],active:["activeChanged"]}}};b.style='*,*::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}.duet-modal-container{position:fixed;top:0;right:0;bottom:0;left:0;z-index:900;max-height:100vh;overflow-y:auto;visibility:hidden;opacity:0;transition:300ms ease;transition-delay:200ms}.duet-modal-container.duet-modal-active{visibility:visible;opacity:1;transition:300ms ease;transition-delay:0s}.duet-modal-container.duet-disable-transitions{transition:none}.duet-modal-container.duet-modal-slide-up{overflow:hidden}::slotted(img){width:100%}.duet-modal-inner{display:flex;align-items:center;width:100%;min-height:100%;padding:20px 16px}@media (min-width: 36em){.duet-modal-inner{padding:48px 16px}}.duet-modal-inner.duet-modal-slide-up{align-items:stretch;justify-content:center;height:100%;padding-top:48px;padding-bottom:0;overflow:hidden}.duet-modal-inner.duet-modal-slide-up::after{position:absolute;bottom:0;z-index:300;display:block;width:100%;max-width:686px;height:48px;margin:auto;pointer-events:none;content:"";background:linear-gradient(rgba(255, 255, 255, 0), rgb(255, 255, 255))}.duet-modal-inner.duet-modal-slide-up::after.small{max-width:545px}.duet-modal-inner.duet-modal-slide-up::after.large{max-width:100%}@media (min-width: 36em){.duet-modal-inner.duet-modal-slide-up::after.large{max-width:1110px}}@media (max-width: 35.9375em){.duet-modal-inner.large{padding-right:0;padding-left:0}.duet-modal-inner.duet-modal-slide-up{padding:0;padding-top:28px}}.duet-modal{position:relative;width:100%;max-width:686px;margin:auto;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-weight:400;font-variant-numeric:tabular-nums;line-height:1.5;color:rgb(8, 42, 77);background:rgb(255, 255, 255);border-radius:16px;opacity:0;transition:300ms ease;transition-delay:0ms;transform:scale(0.96)}.duet-theme-turva .duet-modal{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}.duet-modal-active .duet-modal{opacity:1;transition:300ms ease;transition-delay:200ms;transform:none}.duet-modal-active .duet-modal.slide-up{top:0;transition:top 600ms ease}.duet-modal.loader{text-align:center;background:transparent}.duet-modal.loader .duet-modal-close{display:none}.duet-modal.loader .duet-modal-spinner{position:relative;height:120px}.duet-modal.loader .duet-modal-inner-slot-default{position:relative;backdrop-filter:blur(10px)}.duet-modal.loader duet-paragraph.duet-loader-message{position:absolute;opacity:0;transition:all 300ms ease;transform:scaleY(0);transform-origin:top}.duet-modal.loader duet-paragraph.duet-loader-message.show{opacity:1;transform:scaleY(1);transform-origin:bottom}.duet-modal.loader duet-paragraph.duet-loader-message.show::part(duet-paragraph){backdrop-filter:blur(10px)}.duet-disable-transitions .duet-modal{transition:none}.duet-modal.small{max-width:545px}.duet-modal.large{max-width:100%}@media (min-width: 36em){.duet-modal.large{max-width:1110px}}.duet-modal.slide-up{top:100vh;margin:0;overflow:auto;border-radius:16px 16px 0 0;opacity:1;transition:top 600ms ease}.duet-modal.duet-modal-has-sticky-header{height:100%;overflow:auto}.duet-modal:focus{outline:0}.duet-modal-body,.duet-modal-sticky-header{width:100%;padding:36px 28px}.duet-modal-body.duet-modal-gutter-none,.duet-modal-sticky-header.duet-modal-gutter-none{padding:0 !important}.duet-modal-body.duet-modal-gutter-small,.duet-modal-sticky-header.duet-modal-gutter-small{padding:36px 20px}.duet-modal-body.duet-modal-gutter-large,.duet-modal-sticky-header.duet-modal-gutter-large{padding:48px 36px}@media (max-width: 22.5em){.duet-modal-body,.duet-modal-sticky-header{padding:36px 20px}.duet-modal-body.duet-modal-gutter-large,.duet-modal-sticky-header.duet-modal-gutter-large{padding:48px 28px}}@media (max-width: 35.9375em){.duet-modal-body,.duet-modal-sticky-header{padding:36px 20px}.duet-modal-body.duet-modal-gutter-large,.duet-modal-sticky-header.duet-modal-gutter-large{padding:48px 36px}}@media (min-width: 36em){.duet-modal-body,.duet-modal-sticky-header{padding:36px}.duet-modal-body.duet-modal-gutter-large,.duet-modal-sticky-header.duet-modal-gutter-large{padding:28px 72px}}@media (min-width: 48em){.duet-modal-body,.duet-modal-sticky-header{padding:36px 72px}.duet-modal-body.duet-modal-gutter-large,.duet-modal-sticky-header.duet-modal-gutter-large{padding:36px 72px}}@media (min-width: 76.25em){.duet-modal-body,.duet-modal-sticky-header{padding:36px 48px 48px}.duet-modal-body.duet-modal-gutter-large,.duet-modal-sticky-header.duet-modal-gutter-large{padding:48px 94px}.small .duet-modal-body,.small .duet-modal-sticky-header{padding:36px 48px}}.duet-modal-header{text-align:center}.duet-modal-sticky-header{position:sticky;top:0;z-index:300;display:block;padding-bottom:12px;text-align:left;background:rgb(240, 247, 250);border-bottom:1px solid rgb(212, 223, 229);border-radius:16px 16px 0 0}.duet-theme-turva .duet-modal-sticky-header{background:rgb(245, 247, 250);border-bottom:1px solid rgb(222, 224, 228)}.duet-modal-close{position:absolute;top:8px;right:8px}.duet-modal-heading{width:100%;padding-right:60px;overflow:hidden;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1.25rem;font-style:normal;font-weight:600;font-variant-numeric:tabular-nums;line-height:1.25;color:rgb(8, 42, 77);text-decoration:none;text-overflow:ellipsis;letter-spacing:-0.01rem;white-space:nowrap}.duet-modal-heading.duet-p-0{padding:0 !important}.duet-modal-heading.duet-m-0{margin:0 !important}:host(.duet-theme-turva2) .duet-theme-turva .duet-modal{color:#172a3b}:host(.duet-theme-turva2) .duet-theme-turva .duet-modal-sticky-header{background:#fdf7f2;border-bottom:1px solid #d4dde2}';export{b as duet_modal}
@@ -1,4 +0,0 @@
1
- /*!
2
- * Built with Duet Design System
3
- */
4
- import{r as e,c as t,h as o,H as i,g as a}from"./p-CsVaeVlH.js";import{D as r}from"./p-DpD8uhf3.js";import{i as s}from"./p-uJz71_4x.js";import{c as l}from"./p-Cfr_DJqU.js";import{c as n,p as d}from"./p-SyNakUqS.js";import{p as c}from"./p-C6E9F6QT.js";function p(e){return"options"in e}function h(e,t){for(var o=0;o<e.length;o++){let i=e[o];if(p(i)&&(i=h(i.options,t)),i&&i.value===t)return i}}const u=class{constructor(o){e(this,o),this.duetChange=t(this,"duetChange",3),this.duetFocus=t(this,"duetFocus",7),this.duetBlur=t(this,"duetBlur",7),this.selectId=l("DuetSelect"),this.errorId=l("DuetError"),this.labelId=l("DuetLabel"),this.topCaptionId=l("DuetCaptionTop"),this.topCaptionPlaceholderId=l("DuetCaptionPlaceholderTop"),this.proxyId=l("DuetSelect"),this.processedItems=null,this.variation="default",this.margin="auto",this.error="",this.accessibleLiveError="polite",this.expand=!1,this.theme="",this.labelHidden=!1,this.placeholder="",this.echoPlaceholder=!1,this.disabled=!1,this.required=!1,this.label="label",this.tooltip="",this.tooltipDirection="auto",this.onClick=e=>{e.stopPropagation()},this.onChange=()=>{this.value=this.nativeSelect.value,this.duetChange.emit({value:this.value,component:"duet-select"})},this.onBlur=e=>{this.duetBlur.emit({originalEvent:e,value:this.value,component:"duet-select"})},this.onFocus=e=>{this.duetFocus.emit({originalEvent:e,value:this.value,component:"duet-select"})},this.getDescribedBy=()=>{const e=[];return this.isCaptionVisible&&this.topCaptionId&&e.push(this.topCaptionId),this.accessibleDescribedBy&&e.push(this.accessibleDescribedBy),this.error&&e.push(this.errorId),e.length>0?e.join(" "):null}}valueChanged(){this.nativeSelect&&(this.nativeSelect.value=this.value),this.isCaptionVisible=!!this.caption}componentWillLoad(){s(this),this.isCaptionVisible=!!this.caption,n(this.element,"tooltip","duet-tooltip",1,!0),this.refresh()}componentDidRender(){d(this.element,this.proxyId,this.name,this.value,this.required,void 0)}async setFocus(e){this.nativeSelect&&this.nativeSelect.focus(e)}async refresh(){this.processedItems=c(this.items)}getSelectedItemLabel(){let e;return this.processedItems&&(e=h(this.processedItems,this.value)),e?e.label:this.placeholder||""}renderOption(e){return o("option",{"aria-label":e.ariaLabel,value:e.value,key:e.value,selected:this.value===e.value,disabled:e.disabled},e.label)}renderOptionGroup(e){return o("optgroup",{key:e.label,label:e.label,disabled:e.disabled},e.options.map((e=>this.renderOption(e))))}render(){const e=this.identifier||this.selectId;return o(i,{key:"9d54c9dfad694be3d7e6399d5afc1b1432c1f5dc",onClick:this.onClick,class:{"duet-m-0":"none"===this.margin,"duet-expand":this.expand,[`duet-select-variation-${this.variation}`]:!0}},o("div",{key:"cacd80da0eaeaef2fd6f0e08caec3a39cd273294",class:{"duet-select-container":!0,"duet-label-hidden":this.labelHidden,"duet-theme-turva":"turva"===this.theme,[`duet-select-variation-${this.variation}`]:!0,"duet-input-top-caption-shown":this.isCaptionVisible,"has-error":!!this.error}},o(r,{key:"be880bfbaabc9d88b6b31b921af37f6706f32cd8",theme:"turva"===this.theme?"turva":"default",class:{"duet-has-tooltip":!!this.tooltip},color:this.labelColor,weight:this.labelWeight,id:this.labelId,for:e},this.label),this.tooltip&&o("duet-tooltip",{key:"3100b161cfd533403f8a67c305a03e2dc8ea00c5",direction:this.tooltipDirection,accessibleInputLabel:this.label},this.tooltip),o("slot",{key:"52ab80f0f605fa9711d84f0f26d4325dad7c64cf",name:"tooltip"}),this.caption&&o("duet-caption",{key:"4931ec0414f6cd9716904f1c00d00b02d1550813",id:this.topCaptionId,size:"medium"},this.caption),o("div",{key:"fb713046983da9a542a6aa1c3ad6080c3522a820",class:"duet-select-wrapper"},this.placeholder&&this.echoPlaceholder&&this.value&&o("duet-caption",{key:"a2b3614b6e03359cecd0167f980c5b48de7cc7b0",id:this.topCaptionPlaceholderId,class:"duet-select-placeholder",size:"small"},this.placeholder),o("slot",{key:"50070cedd7b6049e93093cca483a47183c77bae5"}),o("select",{key:"4f53bcd8e5f889ddac92f9815364e1b25521da46",ref:e=>this.nativeSelect=e,disabled:this.disabled,name:this.name,id:e,role:this.role,"aria-labelledby":this.labelId,"aria-describedby":this.getDescribedBy(),"aria-controls":this.accessibleControls,"aria-activedescendant":this.accessibleActiveDescendant,"aria-owns":this.accessibleOwns,onFocus:this.onFocus,onBlur:this.onBlur,onChange:this.onChange,required:this.required},this.placeholder&&o("option",{key:"999f6c43aec61a8c2df743c70444555ae2304e2d",disabled:!0,selected:!0,value:""},this.placeholder),this.processedItems?this.processedItems.map((e=>p(e)?this.renderOptionGroup(e):this.renderOption(e))):o("option",null,"Virhe valintoja ladattaessa. Päivitä sivu ja kokeile uusiksi.")),o("div",{key:"78450970b7a3b2f57640bd8b7eec994076ca1a4c",class:{"duet-select":!0,[`duet-select-variation-${this.variation}`]:!0},"aria-hidden":"true"},o("span",{key:this.value,class:"duet-select-selected-value"},this.getSelectedItemLabel()),"default"===this.variation&&o("svg",{key:"8e2392a51be92391a7dd207ebe0ec2325a8cb194",role:"img",class:"duet-select-icon",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},o("path",{key:"43c899cb0891bf42e3ebb7cebbb6000690d0d93e",d:"m12 18.999c-.4 0-.776-.156-1.059-.438l-10.721-10.72c-.142-.142-.22-.33-.22-.531 0-.2.078-.389.22-.53.142-.142.33-.22.53-.22s.389.078.53.22l10.72 10.719 10.72-10.719c.142-.142.33-.22.53-.22s.389.078.53.22c.142.142.22.33.22.53s-.078.389-.22.53l-10.72 10.72c-.282.283-.659.439-1.06.439z"}))||o("duet-icon",{key:"da2b9d8166a8b626b546ee41ac6e10e1473c75b5",theme:this.theme,name:"action-arrow-down-small",color:"currentColor",margin:"none",size:"compact"===this.variation?"xxx-small":"xx-small"})),o("span",{key:"01000fd324d80c490a48f74c1ff2abf87db9f179",class:"duet-keep-container-height",role:"presention","aria-hidden":"true"},"_")),o("span",{key:"199a372ef44043d9d44121109013dca701942bdd",class:"duet-select-help",id:this.errorId,"aria-live":this.accessibleLiveError,"aria-atomic":"true","aria-relevant":"additions removals"},this.error&&o("span",{key:"2d14eea7bc7db58eacc761e52eb098d52f8cfdef"},this.error))))}get element(){return a(this)}static get watchers(){return{value:["valueChanged"],items:["refresh"]}}};u.style='.duet-internal-label{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:12px !important;position:relative;z-index:100;display:inline-flex;width:auto;margin-top:8px !important;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:600 !important;line-height:1.25;line-height:1.25;color:rgb(8, 42, 77);text-align:left;word-break:break-word;cursor:default}.duet-internal-label.duet-p-0{padding:0 !important}.duet-internal-label.duet-m-0{margin:0 !important}.duet-internal-label span{font-size:1rem;font-weight:600 !important;word-break:break-word}.duet-internal-label.duet-m-0{margin-bottom:0 !important}.duet-internal-label.duet-small-margin{margin-top:8px !important;margin-bottom:4px !important}.duet-internal-label.duet-has-tooltip{padding-right:48px}@media (min-width: 48em){.duet-internal-label.duet-has-tooltip{padding-right:0}}.duet-internal-label.duet-internal-label-small{font-size:0.875rem}.duet-internal-label.duet-internal-label-small span{font-size:0.875rem}.duet-internal-label.duet-weight-normal{font-weight:400 !important}.duet-internal-label.duet-weight-normal span{font-weight:400 !important}.duet-internal-label.duet-theme-turva{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58)}*,*::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:inline-flex;width:100%;max-width:100%;vertical-align:bottom}@media (min-width: 36em){:host{width:calc(50% - 16px - 3px)}:host.duet-expand{width:100% !important}}:host(:not(.duet-m-0)){margin-right:16px !important;margin-bottom:12px !important}:host(:not(.duet-m-0)):last-child,:host(:not(.duet-m-0)):last-of-type{margin-right:0 !important}@media (min-width: 36em){:host(.duet-expand){width:100% !important}}:host(.duet-select-variation-tiny),:host(.duet-select-variation-compact){position:relative;top:-2px;width:72px;margin:0;vertical-align:baseline}:host(.duet-select-variation-compact){width:auto}duet-tooltip,::slotted(duet-tooltip){position:absolute;top:12px;right:0}@media (min-width: 48em){duet-tooltip,::slotted(duet-tooltip){position:relative;top:4px;right:auto}}.duet-select-placeholder{position:absolute;top:-9px;left:9px;z-index:200;display:block;width:auto;max-width:60%;padding:0 0.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:rgb(255, 255, 255)}.duet-select-container{position:relative;width:100%}.duet-select-container.duet-select-variation-tiny{width:72px}.duet-select-wrapper{position:relative;width:100%;padding:15px 14px !important;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.25}.duet-theme-turva .duet-select-wrapper{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}.duet-select-variation-tiny .duet-select-wrapper{width:81px;padding:0 !important}.duet-select-variation-compact .duet-select-wrapper{padding:0 !important;line-height:1}.duet-select-wrapper select{position:absolute;top:0;right:0;bottom:0;left:0;z-index:200;width:100%;height:100%;padding:0;margin:0;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;cursor:pointer;border:0;outline:none;opacity:0}.duet-theme-turva .duet-select-wrapper select{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}.duet-select-wrapper select:hover+.duet-select{border-color:rgb(127, 150, 165);box-shadow:0 0 0 1px #909599}.duet-theme-turva .duet-select-wrapper select:hover+.duet-select{border-color:rgb(143, 147, 158);box-shadow:0 0 0 1px #747475}.has-error .duet-select-wrapper select:hover+.duet-select{box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error .duet-select-wrapper select:hover+.duet-select{box-shadow:0 0 0 1px #e55039}.duet-select-wrapper select:focus+.duet-select{border-color:rgb(0, 119, 179);outline:0;box-shadow:0 0 0 1px #0077b3 !important;transition:none}.duet-theme-turva .duet-select-wrapper select:focus+.duet-select{border-color:rgb(23, 28, 58);box-shadow:0 0 0 1px #171c3a !important}.duet-theme-turva .duet-select-wrapper select:focus+.duet-select .duet-select-icon{color:rgb(23, 28, 58)}.duet-select-wrapper select:focus+.duet-select .duet-select-icon{color:rgb(0, 119, 179)}.has-error .duet-select-wrapper select:focus+.duet-select{box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error .duet-select-wrapper select:focus+.duet-select{box-shadow:0 0 0 1px #e55039}.duet-select-wrapper select[disabled]{cursor:default !important}.duet-select-wrapper select[disabled]+.duet-select{color:rgb(8, 42, 77) !important;cursor:default !important;background:rgb(245, 248, 250) !important;border-color:rgb(245, 248, 250) !important;box-shadow:none !important;opacity:1 !important;-webkit-text-fill-color:rgb(8, 42, 77) !important}.duet-theme-turva .duet-select-wrapper select[disabled]+.duet-select{color:rgb(23, 28, 58) !important;background:rgb(245, 247, 250) !important;border-color:rgb(245, 247, 250) !important;-webkit-text-fill-color:rgb(23, 28, 58) !important}.duet-select-wrapper span.duet-keep-container-height{opacity:0}.duet-select-variation-compact .duet-select-wrapper span.duet-keep-container-height{display:none}.duet-select{position:absolute;top:0;right:0;bottom:0;left:0;z-index:100;display:block;width:100%;min-width:8rem;padding:12px 14px !important;padding-right:48px !important;overflow:hidden;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:1.5;color:rgb(8, 42, 77);text-align:left;text-overflow:ellipsis;white-space:nowrap;background:rgb(255, 255, 255);border:1px solid rgb(127, 150, 165);border-radius:4px;transition:150ms ease}.has-error .duet-select{border-color:rgb(214, 28, 82) !important}.has-error .duet-select .duet-select-icon{color:rgb(214, 28, 82) !important}.duet-theme-turva.has-error .duet-select{border-color:rgb(214, 28, 82) !important}.duet-theme-turva.has-error .duet-select .duet-select-icon{color:rgb(214, 28, 82) !important}.duet-theme-turva .duet-select{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(23, 28, 58);border-color:rgb(143, 147, 158)}.duet-select svg{position:absolute;top:50%;right:16px;z-index:200;width:20px;height:20px;color:rgb(8, 42, 77);pointer-events:none;transform:translateY(-50%)}.duet-theme-turva .duet-select svg{color:rgb(23, 28, 58)}.duet-select-variation-tiny .duet-select,.duet-select-variation-compact .duet-select{width:72px;min-width:inherit;padding:0 !important;margin-bottom:-4px;overflow:visible;font-weight:600;text-align:center}.duet-select-variation-tiny .duet-select duet-icon,.duet-select-variation-compact .duet-select duet-icon{padding-left:10px}.duet-select-variation-compact .duet-select{position:relative;width:fit-content;padding:7px 16px !important;font-size:0.875rem;line-height:1.1;text-align:right;border-radius:8px}.duet-select-help{display:block;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:0.875rem;font-weight:400;line-height:1.25;color:rgb(98, 121, 138);border-radius:4px}.duet-select-help span{display:block;margin-top:8px}.duet-theme-turva .duet-select-help{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:rgb(143, 147, 158)}.has-error .duet-select-help{color:rgb(214, 28, 82)}.duet-theme-turva.has-error .duet-select-help{color:rgb(214, 28, 82)}.duet-label-hidden .duet-internal-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}:host(.duet-theme-turva2) .duet-theme-turva .duet-select-wrapper select:hover+.duet-select{border-color:#7891a4}:host(.duet-theme-turva2) .duet-theme-turva .duet-select-wrapper select:focus+.duet-select{border-color:#172a3b}:host(.duet-theme-turva2) .duet-theme-turva .duet-select-wrapper select:focus+.duet-select .duet-select-icon{color:#172a3b}:host(.duet-theme-turva2) .duet-theme-turva .duet-select-wrapper select[disabled]+.duet-select{color:#172a3b !important;background:#f5f6f7 !important;border-color:#f5f6f7 !important;-webkit-text-fill-color:#172a3b !important}:host(.duet-theme-turva2) .duet-theme-turva .duet-select{color:#172a3b;border-color:#7891a4}:host(.duet-theme-turva2) .duet-theme-turva .duet-select svg{color:#172a3b}';export{u as duet_select}