@duetds/components 6.2.9 → 6.2.11

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 (440) hide show
  1. package/hydrate/index.js +19 -15
  2. package/lib/cjs/duet-action-button.cjs.entry.js +1 -1
  3. package/lib/cjs/duet-alert.cjs.entry.js +1 -1
  4. package/lib/cjs/duet-badge.cjs.entry.js +1 -1
  5. package/lib/cjs/duet-breadcrumb.cjs.entry.js +1 -1
  6. package/lib/cjs/duet-breadcrumbs.cjs.entry.js +1 -1
  7. package/lib/cjs/duet-button_2.cjs.entry.js +1 -1
  8. package/lib/cjs/duet-caption_4.cjs.entry.js +1 -1
  9. package/lib/cjs/duet-card.cjs.entry.js +2 -2
  10. package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
  11. package/lib/cjs/duet-choice_2.cjs.entry.js +2 -2
  12. package/lib/cjs/duet-collapsible.cjs.entry.js +1 -1
  13. package/lib/cjs/duet-combobox.cjs.entry.js +1 -1
  14. package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
  15. package/lib/cjs/duet-date-picker.cjs.entry.js +2 -2
  16. package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
  17. package/lib/cjs/duet-editable-table_3.cjs.entry.js +1 -1
  18. package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
  19. package/lib/cjs/duet-fieldset.cjs.entry.js +1 -1
  20. package/lib/cjs/duet-footer.cjs.entry.js +1 -1
  21. package/lib/cjs/duet-grid_2.cjs.entry.js +1 -1
  22. package/lib/cjs/duet-header_2.cjs.entry.js +1 -1
  23. package/lib/cjs/duet-hero.cjs.entry.js +1 -1
  24. package/lib/cjs/duet-icon.cjs.entry.js +1 -1
  25. package/lib/cjs/duet-input_2.cjs.entry.js +7 -5
  26. package/lib/cjs/duet-layout.cjs.entry.js +1 -1
  27. package/lib/cjs/duet-list_2.cjs.entry.js +1 -1
  28. package/lib/cjs/duet-menu-bar-dropdown-link.cjs.entry.js +1 -1
  29. package/lib/cjs/duet-menu-bar-dropdown.cjs.entry.js +1 -1
  30. package/lib/cjs/duet-menu-bar-link.cjs.entry.js +1 -1
  31. package/lib/cjs/duet-menu-bar.cjs.entry.js +3 -3
  32. package/lib/cjs/duet-modal.cjs.entry.js +2 -2
  33. package/lib/cjs/duet-multiselect.cjs.entry.js +1 -1
  34. package/lib/cjs/duet-nav.cjs.entry.js +2 -2
  35. package/lib/cjs/duet-notification_2.cjs.entry.js +1 -1
  36. package/lib/cjs/duet-number-input.cjs.entry.js +1 -1
  37. package/lib/cjs/duet-pagination_2.cjs.entry.js +1 -1
  38. package/lib/cjs/duet-progress.cjs.entry.js +1 -1
  39. package/lib/cjs/duet-radio_2.cjs.entry.js +1 -1
  40. package/lib/cjs/duet-range-slider.cjs.entry.js +1 -1
  41. package/lib/cjs/duet-scrollable_3.cjs.entry.js +1 -1
  42. package/lib/cjs/duet-section-layout.cjs.entry.js +1 -1
  43. package/lib/cjs/duet-select.cjs.entry.js +1 -1
  44. package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
  45. package/lib/cjs/duet-submenu-bar-dropdown-link.cjs.entry.js +1 -1
  46. package/lib/cjs/duet-submenu-bar-dropdown.cjs.entry.js +1 -1
  47. package/lib/cjs/duet-submenu-bar-link.cjs.entry.js +1 -1
  48. package/lib/cjs/duet-submenu-bar.cjs.entry.js +2 -2
  49. package/lib/cjs/duet-textarea.cjs.entry.js +1 -1
  50. package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
  51. package/lib/cjs/duet-toolbar-dropdown-link.cjs.entry.js +1 -1
  52. package/lib/cjs/duet-toolbar-dropdown.cjs.entry.js +1 -1
  53. package/lib/cjs/duet-toolbar-link.cjs.entry.js +1 -1
  54. package/lib/cjs/duet-toolbar.cjs.entry.js +3 -3
  55. package/lib/cjs/duet-tooltip.cjs.entry.js +7 -5
  56. package/lib/cjs/duet-tray.cjs.entry.js +1 -1
  57. package/lib/cjs/duet-upload-aria-status.cjs.entry.js +1 -1
  58. package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
  59. package/lib/cjs/duet.cjs.js +1 -1
  60. package/lib/cjs/{focus-utils-946dff06.js → focus-utils-9e300a05.js} +1 -1
  61. package/lib/cjs/{index-83ed61d2.js → index-65a47ca8.js} +1 -1
  62. package/lib/cjs/loader.cjs.js +1 -1
  63. package/lib/collection/components/duet-card/duet-card.css +24 -0
  64. package/lib/collection/components/duet-card/duet-card.js +1 -1
  65. package/lib/collection/components/duet-input/duet-input.css +4 -0
  66. package/lib/collection/components/duet-input/duet-input.js +5 -3
  67. package/lib/collection/components/duet-menu-bar/duet-menu-bar.css +14 -10
  68. package/lib/collection/components/duet-menu-bar/duet-menu-bar.js +1 -1
  69. package/lib/collection/components/duet-nav/duet-nav.css +0 -5
  70. package/lib/collection/components/duet-submenu-bar/duet-submenu-bar.css +0 -1
  71. package/lib/collection/components/duet-toolbar/duet-toolbar.css +7 -2
  72. package/lib/collection/components/duet-toolbar/duet-toolbar.js +1 -1
  73. package/lib/collection/components/duet-tooltip/duet-tooltip.css +4 -4
  74. package/lib/collection/components/duet-tooltip/duet-tooltip.js +5 -3
  75. package/lib/dist-custom-elements/duet-action-button.js +1 -1
  76. package/lib/dist-custom-elements/duet-alert.js +1 -1
  77. package/lib/dist-custom-elements/duet-badge.js +1 -1
  78. package/lib/dist-custom-elements/duet-breadcrumb.js +2 -2
  79. package/lib/dist-custom-elements/duet-breadcrumbs.js +2 -2
  80. package/lib/dist-custom-elements/duet-button.js +1 -1
  81. package/lib/dist-custom-elements/duet-caption.js +1 -1
  82. package/lib/dist-custom-elements/duet-card.js +4 -4
  83. package/lib/dist-custom-elements/duet-checkbox.js +1 -1
  84. package/lib/dist-custom-elements/duet-choice-group.js +6 -6
  85. package/lib/dist-custom-elements/duet-choice.js +5 -5
  86. package/lib/dist-custom-elements/duet-collapsible.js +2 -2
  87. package/lib/dist-custom-elements/duet-combobox.js +2 -2
  88. package/lib/dist-custom-elements/duet-cookie-consent.js +6 -6
  89. package/lib/dist-custom-elements/duet-date-picker.js +8 -8
  90. package/lib/dist-custom-elements/duet-divider.js +1 -1
  91. package/lib/dist-custom-elements/duet-editable-table.js +1 -1
  92. package/lib/dist-custom-elements/duet-empty-state.js +1 -1
  93. package/lib/dist-custom-elements/duet-fieldset.js +1 -1
  94. package/lib/dist-custom-elements/duet-footer.js +4 -4
  95. package/lib/dist-custom-elements/duet-grid-item.js +1 -1
  96. package/lib/dist-custom-elements/duet-grid.js +1 -1
  97. package/lib/dist-custom-elements/duet-header.js +8 -8
  98. package/lib/dist-custom-elements/duet-heading.js +1 -1
  99. package/lib/dist-custom-elements/duet-hero.js +9 -9
  100. package/lib/dist-custom-elements/duet-icon.js +1 -1
  101. package/lib/dist-custom-elements/duet-input.js +1 -1
  102. package/lib/dist-custom-elements/duet-label.js +1 -1
  103. package/lib/dist-custom-elements/duet-layout.js +1 -1
  104. package/lib/dist-custom-elements/duet-link.js +1 -1
  105. package/lib/dist-custom-elements/duet-list-item.js +1 -1
  106. package/lib/dist-custom-elements/duet-list.js +1 -1
  107. package/lib/dist-custom-elements/duet-logo.js +1 -1
  108. package/lib/dist-custom-elements/duet-menu-bar-dropdown-link.js +2 -2
  109. package/lib/dist-custom-elements/duet-menu-bar-dropdown.js +2 -2
  110. package/lib/dist-custom-elements/duet-menu-bar-link.js +2 -2
  111. package/lib/dist-custom-elements/duet-menu-bar.js +4 -4
  112. package/lib/dist-custom-elements/duet-modal.js +7 -7
  113. package/lib/dist-custom-elements/duet-multiselect.js +8 -8
  114. package/lib/dist-custom-elements/duet-nav.js +2 -2
  115. package/lib/dist-custom-elements/duet-notification-drawer.js +4 -4
  116. package/lib/dist-custom-elements/duet-notification.js +2 -2
  117. package/lib/dist-custom-elements/duet-number-input.js +7 -7
  118. package/lib/dist-custom-elements/duet-pagination.js +7 -7
  119. package/lib/dist-custom-elements/duet-paragraph.js +1 -1
  120. package/lib/dist-custom-elements/duet-progress.js +1 -1
  121. package/lib/dist-custom-elements/duet-radio-group.js +6 -6
  122. package/lib/dist-custom-elements/duet-radio.js +1 -1
  123. package/lib/dist-custom-elements/duet-range-slider.js +2 -2
  124. package/lib/dist-custom-elements/duet-range-stepper.js +4 -4
  125. package/lib/dist-custom-elements/duet-scrollable.js +1 -1
  126. package/lib/dist-custom-elements/duet-section-layout.js +1 -1
  127. package/lib/dist-custom-elements/duet-select.js +1 -1
  128. package/lib/dist-custom-elements/duet-spacer.js +1 -1
  129. package/lib/dist-custom-elements/duet-spinner.js +1 -1
  130. package/lib/dist-custom-elements/duet-step.js +4 -4
  131. package/lib/dist-custom-elements/duet-stepper.js +2 -2
  132. package/lib/dist-custom-elements/duet-submenu-bar-dropdown-link.js +2 -2
  133. package/lib/dist-custom-elements/duet-submenu-bar-dropdown.js +2 -2
  134. package/lib/dist-custom-elements/duet-submenu-bar-link.js +2 -2
  135. package/lib/dist-custom-elements/duet-submenu-bar.js +2 -2
  136. package/lib/dist-custom-elements/duet-tab-group.js +8 -8
  137. package/lib/dist-custom-elements/duet-tab.js +1 -1
  138. package/lib/dist-custom-elements/duet-table.js +1 -1
  139. package/lib/dist-custom-elements/duet-textarea.js +8 -8
  140. package/lib/dist-custom-elements/duet-toggle.js +2 -2
  141. package/lib/dist-custom-elements/duet-toolbar-dropdown-link.js +2 -2
  142. package/lib/dist-custom-elements/duet-toolbar-dropdown.js +2 -2
  143. package/lib/dist-custom-elements/duet-toolbar-link.js +2 -2
  144. package/lib/dist-custom-elements/duet-toolbar.js +3 -3
  145. package/lib/dist-custom-elements/duet-tooltip.js +1 -1
  146. package/lib/dist-custom-elements/duet-tray.js +3 -3
  147. package/lib/dist-custom-elements/duet-upload-aria-status.js +1 -1
  148. package/lib/dist-custom-elements/duet-upload.js +18 -18
  149. package/lib/dist-custom-elements/duet-visually-hidden.js +1 -1
  150. package/lib/dist-custom-elements/index.js +1 -1
  151. package/lib/dist-custom-elements/{p-15b4c0a2.js → p-0a6cd967.js} +1 -1
  152. package/lib/dist-custom-elements/{p-befd637a.js → p-1cc71fd1.js} +1 -1
  153. package/lib/dist-custom-elements/{p-bb6b7381.js → p-201fa17a.js} +1 -1
  154. package/lib/dist-custom-elements/{p-9601c97f.js → p-20f6b246.js} +2 -2
  155. package/lib/dist-custom-elements/{p-8e56ed25.js → p-29d3be5e.js} +3 -3
  156. package/lib/dist-custom-elements/{p-900bf0f8.js → p-30b7f663.js} +1 -1
  157. package/lib/dist-custom-elements/{p-841f68a3.js → p-3db3f9f4.js} +1 -1
  158. package/lib/dist-custom-elements/{p-f3110a14.js → p-4d7a5987.js} +6 -6
  159. package/lib/dist-custom-elements/{p-8d4a273f.js → p-5dda7a5d.js} +1 -1
  160. package/lib/dist-custom-elements/{p-8bf257ec.js → p-61321af0.js} +1 -1
  161. package/lib/dist-custom-elements/{p-e1055540.js → p-6f6ab590.js} +2 -2
  162. package/lib/dist-custom-elements/{p-e4a7456a.js → p-7a17ddae.js} +3 -3
  163. package/lib/dist-custom-elements/{p-b83dc089.js → p-839269c6.js} +1 -1
  164. package/lib/dist-custom-elements/{p-98cd7708.js → p-83efddec.js} +1 -1
  165. package/lib/dist-custom-elements/{p-ca699888.js → p-8d733f50.js} +1 -1
  166. package/lib/dist-custom-elements/{p-7880df63.js → p-a47e36e6.js} +4 -4
  167. package/lib/dist-custom-elements/{p-13baa01f.js → p-a8ed1569.js} +2 -2
  168. package/lib/dist-custom-elements/{p-25e78278.js → p-abec242f.js} +1 -1
  169. package/lib/dist-custom-elements/{p-4df2d24d.js → p-af2bc5dc.js} +2 -2
  170. package/lib/dist-custom-elements/{p-31a379ec.js → p-b1804185.js} +1 -1
  171. package/lib/dist-custom-elements/{p-09363447.js → p-b8c366b7.js} +1 -1
  172. package/lib/dist-custom-elements/{p-3373bb67.js → p-bb576c58.js} +1 -1
  173. package/lib/dist-custom-elements/{p-474229e5.js → p-d0a9c324.js} +7 -7
  174. package/lib/dist-custom-elements/{p-1fa99b88.js → p-d832f332.js} +1 -1
  175. package/lib/dist-custom-elements/{p-d0686cb1.js → p-d9c9af49.js} +5 -5
  176. package/lib/dist-custom-elements/{p-4f57dcca.js → p-dbe1ff64.js} +12 -10
  177. package/lib/dist-custom-elements/{p-ade1e2f2.js → p-e5db8afc.js} +1 -1
  178. package/lib/dist-custom-elements/{p-9db924ca.js → p-ef10689d.js} +2 -2
  179. package/lib/dist-custom-elements/{p-661b21e0.js → p-f8331a39.js} +1 -1
  180. package/lib/dist-custom-elements/{p-1f69c84e.js → p-fb50673a.js} +9 -7
  181. package/lib/dist-custom-elements/{p-dd9ba6eb.js → p-ff455eb0.js} +1 -1
  182. package/lib/duet/duet.esm.js +1 -1
  183. package/lib/duet/duet.js +1 -1
  184. package/lib/duet/{p-e6e8a61f.system.entry.js → p-061f115a.system.entry.js} +1 -1
  185. package/lib/duet/{p-84399e27.system.entry.js → p-0d3e49f1.system.entry.js} +1 -1
  186. package/lib/duet/{p-97ba6eef.entry.js → p-0d60f277.entry.js} +1 -1
  187. package/lib/duet/{p-9c28794e.entry.js → p-0dc08238.entry.js} +1 -1
  188. package/lib/duet/{p-e71b9227.system.entry.js → p-0f85fb24.system.entry.js} +1 -1
  189. package/lib/duet/{p-741089d2.entry.js → p-12331bec.entry.js} +1 -1
  190. package/lib/duet/{p-7a6a4991.entry.js → p-149293ef.entry.js} +1 -1
  191. package/lib/duet/{p-76b77fd2.system.entry.js → p-16902d92.system.entry.js} +1 -1
  192. package/lib/duet/{p-f56c1c4c.system.entry.js → p-1b230c44.system.entry.js} +1 -1
  193. package/lib/duet/p-1b98c971.system.entry.js +4 -0
  194. package/lib/duet/p-1d80e24a.system.entry.js +4 -0
  195. package/lib/duet/{p-691a8370.entry.js → p-1d91892d.entry.js} +1 -1
  196. package/lib/duet/{p-178bed89.entry.js → p-21864966.entry.js} +1 -1
  197. package/lib/duet/{p-e05c8fa3.system.entry.js → p-246255ec.system.entry.js} +1 -1
  198. package/lib/duet/p-26d73124.entry.js +4 -0
  199. package/lib/duet/p-2a8e5da6.system.entry.js +4 -0
  200. package/lib/duet/p-2be78877.entry.js +4 -0
  201. package/lib/duet/{p-95632843.entry.js → p-2dcb5ca0.entry.js} +1 -1
  202. package/lib/duet/{p-93ad6a6a.entry.js → p-2de3cc10.entry.js} +1 -1
  203. package/lib/duet/p-2de903ee.system.entry.js +4 -0
  204. package/lib/duet/{p-1f8fe427.system.entry.js → p-2dfe2ca3.system.entry.js} +1 -1
  205. package/lib/duet/{p-b6dfb53e.system.entry.js → p-34a52a78.system.entry.js} +1 -1
  206. package/lib/duet/{p-653aa8f3.system.entry.js → p-34f898f7.system.entry.js} +1 -1
  207. package/lib/duet/{p-b8640236.system.entry.js → p-37139fee.system.entry.js} +1 -1
  208. package/lib/duet/{p-585dfeb8.system.entry.js → p-3abf2665.system.entry.js} +1 -1
  209. package/lib/duet/{p-7694b01d.system.entry.js → p-3d885c47.system.entry.js} +1 -1
  210. package/lib/duet/{p-b3e8fc60.entry.js → p-3e66fe1a.entry.js} +1 -1
  211. package/lib/duet/{p-5717cbcb.entry.js → p-3ea5b975.entry.js} +1 -1
  212. package/lib/duet/p-3f055c40.entry.js +4 -0
  213. package/lib/duet/{p-85542a3f.system.entry.js → p-3f2e2f0f.system.entry.js} +1 -1
  214. package/lib/duet/{p-47946137.system.entry.js → p-452f96ac.system.entry.js} +1 -1
  215. package/lib/duet/{p-f51abfad.system.entry.js → p-46acf642.system.entry.js} +1 -1
  216. package/lib/duet/{p-27915fe3.system.entry.js → p-46e4b561.system.entry.js} +2 -2
  217. package/lib/duet/{p-517de6b6.entry.js → p-46e56fed.entry.js} +1 -1
  218. package/lib/duet/{p-b533fbff.entry.js → p-475d1bc7.entry.js} +1 -1
  219. package/lib/duet/{p-402c0332.system.entry.js → p-49250aa9.system.entry.js} +1 -1
  220. package/lib/duet/{p-e26bde5b.entry.js → p-4933732d.entry.js} +1 -1
  221. package/lib/duet/{p-059bf987.entry.js → p-49525d3d.entry.js} +1 -1
  222. package/lib/duet/{p-c27f5d2a.entry.js → p-4aa7c59a.entry.js} +1 -1
  223. package/lib/duet/{p-ca57c4b9.system.entry.js → p-4b22281a.system.entry.js} +1 -1
  224. package/lib/duet/{p-aa8d0ed4.system.js → p-4c05c667.system.js} +1 -1
  225. package/lib/duet/{p-31762342.system.entry.js → p-506e3596.system.entry.js} +1 -1
  226. package/lib/duet/{p-4077587c.system.entry.js → p-5329a6af.system.entry.js} +1 -1
  227. package/lib/duet/{p-54ff8e48.entry.js → p-562ed27c.entry.js} +1 -1
  228. package/lib/duet/{p-df562e8a.system.entry.js → p-5810de18.system.entry.js} +1 -1
  229. package/lib/duet/p-596eb569.entry.js +4 -0
  230. package/lib/duet/{p-135039d5.system.entry.js → p-600e2390.system.entry.js} +1 -1
  231. package/lib/duet/{p-217a4bf1.entry.js → p-61336adf.entry.js} +1 -1
  232. package/lib/duet/{p-9fe61a28.system.entry.js → p-6147b5c1.system.entry.js} +1 -1
  233. package/lib/duet/p-62d431bd.entry.js +4 -0
  234. package/lib/duet/{p-91d0aba6.system.entry.js → p-6632af03.system.entry.js} +1 -1
  235. package/lib/duet/{p-86c748c8.system.js → p-6753acd9.system.js} +1 -1
  236. package/lib/duet/{p-264fcbca.entry.js → p-683d1434.entry.js} +1 -1
  237. package/lib/duet/{p-e6255da2.entry.js → p-690fd6d7.entry.js} +1 -1
  238. package/lib/duet/{p-d48c73f3.entry.js → p-6c159000.entry.js} +1 -1
  239. package/lib/duet/{p-416cea00.entry.js → p-6db01063.entry.js} +1 -1
  240. package/lib/duet/{p-9d79a53a.entry.js → p-7037c77e.entry.js} +1 -1
  241. package/lib/duet/{p-52b360d5.system.entry.js → p-708dcb1a.system.entry.js} +1 -1
  242. package/lib/duet/{p-5df5a09c.entry.js → p-73fdf834.entry.js} +1 -1
  243. package/lib/duet/{p-93f6712a.system.entry.js → p-756faa95.system.entry.js} +1 -1
  244. package/lib/duet/{p-f95f4f5c.entry.js → p-7ac3a6e0.entry.js} +1 -1
  245. package/lib/duet/{p-8ed3d913.entry.js → p-7ba6cae4.entry.js} +1 -1
  246. package/lib/duet/{p-02e87a63.system.entry.js → p-7dae10af.system.entry.js} +1 -1
  247. package/lib/duet/{p-d808d7f5.system.entry.js → p-7e95730a.system.entry.js} +1 -1
  248. package/lib/duet/{p-513cf2cf.system.entry.js → p-7eeaa2cd.system.entry.js} +1 -1
  249. package/lib/duet/p-7f3d9beb.entry.js +4 -0
  250. package/lib/duet/{p-36771e10.entry.js → p-7f648a0c.entry.js} +1 -1
  251. package/lib/duet/{p-39bf32db.entry.js → p-80469fdd.entry.js} +1 -1
  252. package/lib/duet/{p-8fcd7c55.system.entry.js → p-85aa1013.system.entry.js} +1 -1
  253. package/lib/duet/{p-f0049596.system.entry.js → p-8709dc97.system.entry.js} +1 -1
  254. package/lib/duet/p-87e2687c.system.entry.js +4 -0
  255. package/lib/duet/{p-f6f54c02.entry.js → p-87f272ca.entry.js} +1 -1
  256. package/lib/duet/{p-b4ac1daa.system.js → p-8a57aaec.system.js} +1 -1
  257. package/lib/duet/{p-bd2d3aee.system.entry.js → p-8e170437.system.entry.js} +1 -1
  258. package/lib/duet/{p-73802865.system.entry.js → p-91ba2ad0.system.entry.js} +1 -1
  259. package/lib/duet/{p-062dabc1.system.entry.js → p-944f9dc6.system.entry.js} +1 -1
  260. package/lib/duet/{p-28b91901.entry.js → p-95933e43.entry.js} +1 -1
  261. package/lib/duet/{p-e7b15d91.entry.js → p-9752d53b.entry.js} +1 -1
  262. package/lib/duet/{p-688e9ba2.entry.js → p-9760be33.entry.js} +1 -1
  263. package/lib/duet/{p-61e1c0c3.system.entry.js → p-97fa38b3.system.entry.js} +1 -1
  264. package/lib/duet/{p-6109df58.system.entry.js → p-987a29f7.system.entry.js} +1 -1
  265. package/lib/duet/{p-8cc8ecd3.entry.js → p-99b58a7b.entry.js} +1 -1
  266. package/lib/duet/{p-1a076dbf.entry.js → p-9cb8ebf9.entry.js} +1 -1
  267. package/lib/duet/{p-6ab7a493.system.entry.js → p-9ccad140.system.entry.js} +1 -1
  268. package/lib/duet/{p-8483c8e3.system.entry.js → p-9dd980a4.system.entry.js} +1 -1
  269. package/lib/duet/{p-22e492c9.entry.js → p-9e5155db.entry.js} +1 -1
  270. package/lib/duet/{p-08f2bebb.system.entry.js → p-a1ea8dbc.system.entry.js} +1 -1
  271. package/lib/duet/{p-ccad2f2b.entry.js → p-a60eb028.entry.js} +1 -1
  272. package/lib/duet/{p-eba3af93.system.entry.js → p-acd9f501.system.entry.js} +1 -1
  273. package/lib/duet/{p-daf8790a.entry.js → p-adc9d543.entry.js} +1 -1
  274. package/lib/duet/{p-69beb5ea.entry.js → p-af4699ec.entry.js} +1 -1
  275. package/lib/duet/{p-6b39f7a4.system.entry.js → p-b3ee05d3.system.entry.js} +1 -1
  276. package/lib/duet/{p-bc255642.system.entry.js → p-b4de62e6.system.entry.js} +1 -1
  277. package/lib/duet/{p-1730a0ac.system.entry.js → p-b636c691.system.entry.js} +1 -1
  278. package/lib/duet/{p-ed049463.entry.js → p-bbdaa69f.entry.js} +1 -1
  279. package/lib/duet/p-bf276ba0.system.entry.js +4 -0
  280. package/lib/duet/{p-053f8af8.entry.js → p-c166792a.entry.js} +1 -1
  281. package/lib/duet/{p-7b49bdda.system.entry.js → p-c2bec9d7.system.entry.js} +1 -1
  282. package/lib/duet/{p-a8be1b55.entry.js → p-c396c20c.entry.js} +1 -1
  283. package/lib/duet/{p-c29c75e1.system.entry.js → p-cb663d57.system.entry.js} +1 -1
  284. package/lib/duet/p-cbc2318e.entry.js +4 -0
  285. package/lib/duet/{p-d96bb829.system.entry.js → p-cf4c1bf7.system.entry.js} +1 -1
  286. package/lib/duet/{p-6af7738f.system.entry.js → p-d0135695.system.entry.js} +1 -1
  287. package/lib/duet/{p-a369e224.entry.js → p-d315b885.entry.js} +1 -1
  288. package/lib/duet/{p-be0706b5.entry.js → p-d3d9744f.entry.js} +1 -1
  289. package/lib/duet/{p-ba7e3636.js → p-d75c51a6.js} +1 -1
  290. package/lib/duet/{p-b876f3b8.entry.js → p-d8e936ea.entry.js} +1 -1
  291. package/lib/duet/{p-151d1e1b.system.entry.js → p-e0711e9e.system.entry.js} +1 -1
  292. package/lib/duet/{p-b48e6e3b.system.entry.js → p-e165e825.system.entry.js} +1 -1
  293. package/lib/duet/{p-01242800.entry.js → p-e2385ded.entry.js} +1 -1
  294. package/lib/duet/{p-c40edd34.system.entry.js → p-e45b703f.system.entry.js} +1 -1
  295. package/lib/duet/{p-2a0e6c97.entry.js → p-e690ea1b.entry.js} +1 -1
  296. package/lib/duet/{p-33f170b1.entry.js → p-e8ba077f.entry.js} +1 -1
  297. package/lib/duet/{p-0b3072d4.entry.js → p-ef461e76.entry.js} +1 -1
  298. package/lib/duet/{p-697f58fc.entry.js → p-f1a5c03d.entry.js} +1 -1
  299. package/lib/duet/{p-cda9242e.entry.js → p-f52e12f8.entry.js} +1 -1
  300. package/lib/duet/{p-92e486e8.system.entry.js → p-f7dd8f95.system.entry.js} +1 -1
  301. package/lib/duet/{p-fff3aedb.entry.js → p-ff369c3f.entry.js} +1 -1
  302. package/lib/duet/{p-f8dfef02.js → p-ffa71b04.js} +1 -1
  303. package/lib/esm/duet-action-button.entry.js +1 -1
  304. package/lib/esm/duet-alert.entry.js +1 -1
  305. package/lib/esm/duet-badge.entry.js +1 -1
  306. package/lib/esm/duet-breadcrumb.entry.js +1 -1
  307. package/lib/esm/duet-breadcrumbs.entry.js +1 -1
  308. package/lib/esm/duet-button_2.entry.js +1 -1
  309. package/lib/esm/duet-caption_4.entry.js +1 -1
  310. package/lib/esm/duet-card.entry.js +2 -2
  311. package/lib/esm/duet-checkbox.entry.js +1 -1
  312. package/lib/esm/duet-choice_2.entry.js +2 -2
  313. package/lib/esm/duet-collapsible.entry.js +1 -1
  314. package/lib/esm/duet-combobox.entry.js +1 -1
  315. package/lib/esm/duet-cookie-consent.entry.js +1 -1
  316. package/lib/esm/duet-date-picker.entry.js +2 -2
  317. package/lib/esm/duet-divider_2.entry.js +1 -1
  318. package/lib/esm/duet-editable-table_3.entry.js +1 -1
  319. package/lib/esm/duet-empty-state.entry.js +1 -1
  320. package/lib/esm/duet-fieldset.entry.js +1 -1
  321. package/lib/esm/duet-footer.entry.js +1 -1
  322. package/lib/esm/duet-grid_2.entry.js +1 -1
  323. package/lib/esm/duet-header_2.entry.js +1 -1
  324. package/lib/esm/duet-hero.entry.js +1 -1
  325. package/lib/esm/duet-icon.entry.js +1 -1
  326. package/lib/esm/duet-input_2.entry.js +7 -5
  327. package/lib/esm/duet-layout.entry.js +1 -1
  328. package/lib/esm/duet-list_2.entry.js +1 -1
  329. package/lib/esm/duet-menu-bar-dropdown-link.entry.js +1 -1
  330. package/lib/esm/duet-menu-bar-dropdown.entry.js +1 -1
  331. package/lib/esm/duet-menu-bar-link.entry.js +1 -1
  332. package/lib/esm/duet-menu-bar.entry.js +3 -3
  333. package/lib/esm/duet-modal.entry.js +2 -2
  334. package/lib/esm/duet-multiselect.entry.js +1 -1
  335. package/lib/esm/duet-nav.entry.js +2 -2
  336. package/lib/esm/duet-notification_2.entry.js +1 -1
  337. package/lib/esm/duet-number-input.entry.js +1 -1
  338. package/lib/esm/duet-pagination_2.entry.js +1 -1
  339. package/lib/esm/duet-progress.entry.js +1 -1
  340. package/lib/esm/duet-radio_2.entry.js +1 -1
  341. package/lib/esm/duet-range-slider.entry.js +1 -1
  342. package/lib/esm/duet-scrollable_3.entry.js +1 -1
  343. package/lib/esm/duet-section-layout.entry.js +1 -1
  344. package/lib/esm/duet-select.entry.js +1 -1
  345. package/lib/esm/duet-step_2.entry.js +1 -1
  346. package/lib/esm/duet-submenu-bar-dropdown-link.entry.js +1 -1
  347. package/lib/esm/duet-submenu-bar-dropdown.entry.js +1 -1
  348. package/lib/esm/duet-submenu-bar-link.entry.js +1 -1
  349. package/lib/esm/duet-submenu-bar.entry.js +2 -2
  350. package/lib/esm/duet-textarea.entry.js +1 -1
  351. package/lib/esm/duet-toggle.entry.js +1 -1
  352. package/lib/esm/duet-toolbar-dropdown-link.entry.js +1 -1
  353. package/lib/esm/duet-toolbar-dropdown.entry.js +1 -1
  354. package/lib/esm/duet-toolbar-link.entry.js +1 -1
  355. package/lib/esm/duet-toolbar.entry.js +3 -3
  356. package/lib/esm/duet-tooltip.entry.js +7 -5
  357. package/lib/esm/duet-tray.entry.js +1 -1
  358. package/lib/esm/duet-upload-aria-status.entry.js +1 -1
  359. package/lib/esm/duet-visually-hidden.entry.js +1 -1
  360. package/lib/esm/duet.js +1 -1
  361. package/lib/esm/{focus-utils-36fda5f1.js → focus-utils-c81ea33a.js} +1 -1
  362. package/lib/esm/{index-55984aa4.js → index-ab069e8d.js} +1 -1
  363. package/lib/esm/loader.js +1 -1
  364. package/lib/esm-es5/duet-action-button.entry.js +1 -1
  365. package/lib/esm-es5/duet-alert.entry.js +1 -1
  366. package/lib/esm-es5/duet-badge.entry.js +1 -1
  367. package/lib/esm-es5/duet-breadcrumb.entry.js +1 -1
  368. package/lib/esm-es5/duet-breadcrumbs.entry.js +1 -1
  369. package/lib/esm-es5/duet-button_2.entry.js +1 -1
  370. package/lib/esm-es5/duet-caption_4.entry.js +1 -1
  371. package/lib/esm-es5/duet-card.entry.js +1 -1
  372. package/lib/esm-es5/duet-checkbox.entry.js +1 -1
  373. package/lib/esm-es5/duet-choice_2.entry.js +1 -1
  374. package/lib/esm-es5/duet-collapsible.entry.js +2 -2
  375. package/lib/esm-es5/duet-combobox.entry.js +1 -1
  376. package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
  377. package/lib/esm-es5/duet-date-picker.entry.js +1 -1
  378. package/lib/esm-es5/duet-divider_2.entry.js +1 -1
  379. package/lib/esm-es5/duet-editable-table_3.entry.js +1 -1
  380. package/lib/esm-es5/duet-empty-state.entry.js +1 -1
  381. package/lib/esm-es5/duet-fieldset.entry.js +1 -1
  382. package/lib/esm-es5/duet-footer.entry.js +1 -1
  383. package/lib/esm-es5/duet-grid_2.entry.js +2 -2
  384. package/lib/esm-es5/duet-header_2.entry.js +1 -1
  385. package/lib/esm-es5/duet-hero.entry.js +1 -1
  386. package/lib/esm-es5/duet-icon.entry.js +1 -1
  387. package/lib/esm-es5/duet-input_2.entry.js +1 -1
  388. package/lib/esm-es5/duet-layout.entry.js +1 -1
  389. package/lib/esm-es5/duet-list_2.entry.js +1 -1
  390. package/lib/esm-es5/duet-menu-bar-dropdown-link.entry.js +1 -1
  391. package/lib/esm-es5/duet-menu-bar-dropdown.entry.js +1 -1
  392. package/lib/esm-es5/duet-menu-bar-link.entry.js +1 -1
  393. package/lib/esm-es5/duet-menu-bar.entry.js +1 -1
  394. package/lib/esm-es5/duet-modal.entry.js +1 -1
  395. package/lib/esm-es5/duet-multiselect.entry.js +2 -2
  396. package/lib/esm-es5/duet-nav.entry.js +1 -1
  397. package/lib/esm-es5/duet-notification_2.entry.js +1 -1
  398. package/lib/esm-es5/duet-number-input.entry.js +1 -1
  399. package/lib/esm-es5/duet-pagination_2.entry.js +1 -1
  400. package/lib/esm-es5/duet-progress.entry.js +1 -1
  401. package/lib/esm-es5/duet-radio_2.entry.js +1 -1
  402. package/lib/esm-es5/duet-range-slider.entry.js +1 -1
  403. package/lib/esm-es5/duet-scrollable_3.entry.js +1 -1
  404. package/lib/esm-es5/duet-section-layout.entry.js +1 -1
  405. package/lib/esm-es5/duet-select.entry.js +1 -1
  406. package/lib/esm-es5/duet-step_2.entry.js +1 -1
  407. package/lib/esm-es5/duet-submenu-bar-dropdown-link.entry.js +1 -1
  408. package/lib/esm-es5/duet-submenu-bar-dropdown.entry.js +1 -1
  409. package/lib/esm-es5/duet-submenu-bar-link.entry.js +1 -1
  410. package/lib/esm-es5/duet-submenu-bar.entry.js +1 -1
  411. package/lib/esm-es5/duet-textarea.entry.js +1 -1
  412. package/lib/esm-es5/duet-toggle.entry.js +1 -1
  413. package/lib/esm-es5/duet-toolbar-dropdown-link.entry.js +1 -1
  414. package/lib/esm-es5/duet-toolbar-dropdown.entry.js +1 -1
  415. package/lib/esm-es5/duet-toolbar-link.entry.js +1 -1
  416. package/lib/esm-es5/duet-toolbar.entry.js +1 -1
  417. package/lib/esm-es5/duet-tooltip.entry.js +1 -1
  418. package/lib/esm-es5/duet-tray.entry.js +1 -1
  419. package/lib/esm-es5/duet-upload-aria-status.entry.js +1 -1
  420. package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
  421. package/lib/esm-es5/duet.js +1 -1
  422. package/lib/esm-es5/focus-utils-c81ea33a.js +4 -0
  423. package/lib/esm-es5/{index-55984aa4.js → index-ab069e8d.js} +1 -1
  424. package/lib/esm-es5/loader.js +1 -1
  425. package/lib/types/components/duet-card/duet-card.d.ts +1 -1
  426. package/package.json +5 -5
  427. package/lib/duet/p-0d062ab4.entry.js +0 -4
  428. package/lib/duet/p-1468bc0f.entry.js +0 -4
  429. package/lib/duet/p-1b99611a.entry.js +0 -4
  430. package/lib/duet/p-23994283.system.entry.js +0 -4
  431. package/lib/duet/p-64d23c05.system.entry.js +0 -4
  432. package/lib/duet/p-a3e7924c.entry.js +0 -4
  433. package/lib/duet/p-b08626e1.system.entry.js +0 -4
  434. package/lib/duet/p-bac045d3.system.entry.js +0 -4
  435. package/lib/duet/p-bd3895c0.system.entry.js +0 -4
  436. package/lib/duet/p-d2e83bb6.entry.js +0 -4
  437. package/lib/duet/p-d85d143b.entry.js +0 -4
  438. package/lib/duet/p-dab5c531.entry.js +0 -4
  439. package/lib/duet/p-e8ef4987.system.entry.js +0 -4
  440. package/lib/esm-es5/focus-utils-36fda5f1.js +0 -4
@@ -1,4 +1,4 @@
1
1
  var __awaiter=this&&this.__awaiter||function(e,t,i,c){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,a){function n(e){try{r(c.next(e))}catch(t){a(t)}}function s(e){try{r(c["throw"](e))}catch(t){a(t)}}function r(e){e.done?i(e.value):o(e.value).then(n,s)}r((c=c.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},c,o,a,n;return n={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function s(e){return function(t){return r([e,t])}}function r(n){if(c)throw new TypeError("Generator is already executing.");while(i)try{if(c=1,o&&(a=n[0]&2?o["return"]:n[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;if(o=0,a)n=[n[0]&2,a.value];switch(n[0]){case 0:case 1:a=n;break;case 4:i.label++;return{value:n[1],done:false};case 5:i.label++;o=n[1];n=[0];continue;case 7:n=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(n[0]===6||n[0]===2)){i=0;continue}if(n[0]===3&&(!a||n[1]>a[0]&&n[1]<a[3])){i.label=n[1];break}if(n[0]===6&&i.label<a[1]){i.label=a[1];a=n;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(n);break}if(a[2])i.ops.pop();i.trys.pop();continue}n=t.call(e,i)}catch(s){n=[6,s];o=0}finally{c=a=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Built with Duet Design System
4
- */import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-55984aa4.js";import{i as inheritGlobalTheme}from"./themeable-component-cb76be7c.js";import{D as DuetStringsExternalDefaults}from"./common-strings-97e04e4b.js";import{c as createID}from"./create-id-981107da.js";import{F as FocusGuard}from"./focus-utils-36fda5f1.js";import{i as isKeyboardClick,h as isQuestionKey,f as isEscapeKey}from"./keyboard-utils-88ea1007.js";import{g as getLocaleString,a as getLanguage}from"./language-utils-bf701d37.js";import{f as findCheckedOption,w as watchForOptions}from"./watch-options-dd55bce8.js";import"./string-utils-5954f458.js";var messagingInfo={title:"messaging-info",tags:"messaging info information circle",svg:'<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M13.5 17.25A2.252 2.252 0 0 1 11.25 15v-3.75h-.75a.75.75 0 0 1 0-1.5h.75c.827 0 1.5.673 1.5 1.5V15c0 .414.336.75.75.75h.75a.75.75 0 0 1 0 1.5z"/><circle cx="11.625" cy="7.125" r="1.125"/><path d="M12 24C5.383 24 0 18.617 0 12S5.383 0 12 0s12 5.383 12 12-5.383 12-12 12zm0-22.5C6.21 1.5 1.5 6.21 1.5 12S6.21 22.5 12 22.5 22.5 17.79 22.5 12 17.79 1.5 12 1.5z"/></svg>'};var duetChoiceCss='*.sc-duet-choice,*.sc-duet-choice::after,*.sc-duet-choice::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-choice-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;display:inline-flex;flex-direction:column;width:auto;max-width:100%;vertical-align:bottom;-webkit-tap-highlight-color:transparent}.sc-duet-choice-h:last-child,.sc-duet-choice-h:last-of-type{margin-right:0 !important}@media (max-width: 35.9375em){.sc-duet-choice-h{width:100%}}.duet-expand.sc-duet-choice-h{width:100% !important}.duet-m-0.sc-duet-choice-h{margin:0 !important}.duet-fixed.sc-duet-choice-h{width:auto !important}.vertical.sc-duet-choice-h{margin-right:0 !important}.horizontal.sc-duet-choice-h{margin-bottom:0 !important}@media (min-width: 48em){.horizontal-responsive.sc-duet-choice-h{margin-bottom:0 !important;margin-right:16px !important}.horizontal-responsive.sc-duet-choice-h:last-child,.horizontal-responsive.sc-duet-choice-h:last-of-type{margin-right:0 !important}}.sc-duet-choice-h:last-child:not(:only-child){margin-right:0 !important}.duet-choice-card.sc-duet-choice{position:relative;display:block;width:100%;min-width:8rem;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;-webkit-hyphens:auto;hyphens:auto;line-height:1.1;color:#00294d !important;text-align:left;background:white;border-width:2px}.duet-choice-card.duet-p-0.sc-duet-choice{padding:0 !important}.duet-choice-card.duet-m-0.sc-duet-choice{margin:0 !important}.duet-theme-turva.sc-duet-choice .duet-choice-card.sc-duet-choice{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a !important}.duet-choice-card-flextainer.sc-duet-choice{display:flex}.duet-choice-label.sc-duet-choice{-webkit-user-select:none;user-select:none;position:relative;z-index:100;display:flex;gap:1rem;align-items:center;justify-content:flex-start;width:100%;height:100%;min-height:3.875rem;padding:1rem;font-size:1rem;font-weight:600;text-decoration:none;word-break:break-word;cursor:pointer;border:2px solid #e1e3e6;border-radius:4px;transition:background-color 150ms ease}.duet-choice-label.has-before-text.sc-duet-choice .duet-choice-card-icon.sc-duet-choice,.duet-choice-label.has-before-text.sc-duet-choice .duet-choice-card-text.sc-duet-choice{align-self:flex-start;margin-top:0.25rem}.duet-choice-label.sc-duet-choice>div.sc-duet-choice:last-child{flex:1;align-self:flex-start;justify-self:flex-end;margin-top:0.25rem}.has-info.sc-duet-choice .duet-choice-label.sc-duet-choice{border-top-right-radius:0;border-bottom-right-radius:0}.info.sc-duet-choice .duet-choice-label.sc-duet-choice{border-bottom-right-radius:0;border-bottom-left-radius:0}.duet-theme-turva.sc-duet-choice .duet-choice-label.sc-duet-choice{border-color:#e4e4e6}.duet-theme-turva.sc-duet-choice .info.sc-duet-choice .duet-choice-label.sc-duet-choice{border-color:#e4e4e6}.duet-choice-label.sc-duet-choice:not(.no-hover):hover{border-color:#909599}.duet-choice-label.sc-duet-choice:not(.no-hover):hover .duet-checkmark-container.sc-duet-choice{border-color:#909599}.duet-theme-turva.sc-duet-choice .duet-choice-label.sc-duet-choice:not(.no-hover):hover{border-color:#747475}.duet-theme-turva.sc-duet-choice .duet-choice-label.sc-duet-choice:not(.no-hover):hover .duet-checkmark-container.sc-duet-choice{border-color:#747475}.duet-theme-turva.sc-duet-choice .info.sc-duet-choice .duet-choice-label.sc-duet-choice:not(.no-hover):hover{border-color:#747475}.duet-choice-label.sc-duet-choice:active{opacity:0.75;transition:none !important}.checked.sc-duet-choice .duet-choice-label.sc-duet-choice{color:#0077b3 !important;background:#f3f9fc;border-color:#0077b3 !important}.checked.sc-duet-choice .duet-choice-label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#0077b3}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice .duet-choice-label.sc-duet-choice{color:#171c3a !important;background:#f5f5f7;border-color:#171c3a !important}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice .duet-choice-label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#c60c30}.checked.collapsible.sc-duet-choice .duet-choice-label.sc-duet-choice{border-bottom:0 !important;border-bottom-right-radius:0;border-bottom-left-radius:0}input.sc-duet-choice:focus{outline:0}.user-is-tabbing.sc-duet-choice-h input.sc-duet-choice:checked:focus+.duet-choice-label.sc-duet-choice{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3)}.user-is-tabbing.sc-duet-choice-h input.sc-duet-choice:not(:checked):focus+.duet-choice-label.sc-duet-choice{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.user-is-tabbing.duet-theme-turva.sc-duet-choice-h input.sc-duet-choice:checked:focus+.duet-choice-label.sc-duet-choice{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2)}.user-is-tabbing.duet-theme-turva.sc-duet-choice-h input.sc-duet-choice:not(:checked):focus+.duet-choice-label.sc-duet-choice{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice{color:#657787 !important;cursor:default !important;background:#f5f8fa !important;border-color:#e1e3e6 !important}input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice .duet-checkmark.sc-duet-choice{border-color:#657787 !important}.duet-theme-turva.sc-duet-choice input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice{color:#747475 !important;background:#f5f5f7 !important;border-color:#e4e4e6 !important}.duet-theme-turva.sc-duet-choice input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice .duet-checkmark.sc-duet-choice{border-color:#747475 !important}.checked.sc-duet-choice input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice{background:#e1e3e6 !important;border-color:#e1e3e6 !important}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice{background:#e4e4e6 !important;border-color:#e4e4e6 !important}.duet-checkmark-container.sc-duet-choice{position:relative;width:20px;height:20px;margin-left:auto;border:1px solid #909599;border-radius:4px;transition:border 300ms ease}.duet-theme-turva.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#747475}.checked.sc-duet-choice .duet-checkmark-container.sc-duet-choice{background:#0077b3;border-color:#0077b3;transition:none}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice .duet-checkmark-container.sc-duet-choice{background:#171c3a;border-color:#171c3a !important}.duet-checkmark-container.duet-checkmark-radio.sc-duet-choice{border-radius:50%}[disabled].sc-duet-choice+label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#cfd2d4 !important}.duet-theme-turva.sc-duet-choice [disabled].sc-duet-choice+label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#cfcfd1 !important}.checked.sc-duet-choice [disabled].sc-duet-choice+label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{background:#cfd2d4 !important}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice [disabled].sc-duet-choice+label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{background:#cfcfd1 !important}.duet-checkmark.sc-duet-choice{position:absolute;top:10px;left:3px;width:5.3333333333px;height:11.8518518519px;border-top:2px solid white;border-right:2px solid white;opacity:1;transform:scaleX(-1) rotate(135deg) translateZ(0);transform-origin:left top;animation-name:duet-checkmark;animation-duration:600ms;animation-timing-function:ease-out;animation-fill-mode:forwards}@keyframes duet-checkmark{0%{width:0;height:0;opacity:1}20%{width:5.3333333333px;height:0;opacity:1}40%,100%{width:5.3333333333px;height:11.8518518519px;opacity:1}}.duet-choice-card-icon.sc-duet-choice{position:relative}.duet-choice-card-icon.sc-duet-choice duet-icon.sc-duet-choice{display:block}.duet-choice-section-hidden.sc-duet-choice{display:none}.duet-choice-card-info.duet-choice-card-collapsed.sc-duet-choice,.duet-choice-card-collapsed.duet-choice-card-collapsible.sc-duet-choice{position:relative;width:auto;padding:0 !important;background:unset !important;border:0;border-radius:0}.duet-choice-card-info.sc-duet-choice,.duet-choice-card-collapsible.sc-duet-choice{padding:20px !important;position:relative;z-index:200;width:100%;font-weight:400;color:#00294d;border:2px solid #e1e3e6;border-top:0;border-radius:0 0 4px 4px}@media (min-width: 36em){.duet-choice-card-info.sc-duet-choice,.duet-choice-card-collapsible.sc-duet-choice{padding:28px !important}}.duet-theme-turva.sc-duet-choice .duet-choice-card-info.sc-duet-choice,.duet-theme-turva.sc-duet-choice .duet-choice-card-collapsible.sc-duet-choice{color:#171c3a;border-color:#171c3a}.checked.sc-duet-choice .duet-choice-card-info.sc-duet-choice,.checked.sc-duet-choice .duet-choice-card-collapsible.sc-duet-choice{display:block}.duet-choice-card-info-expanded.sc-duet-choice,.duet-choice-card-collapsible-expanded.sc-duet-choice{display:block}.duet-choice-card-collapsible.sc-duet-choice{background:white;border:2px solid #0077b3;border-top:0}.duet-choice-card-collapsible.duet-theme-turva.sc-duet-choice{background:white;border-color:#171c3a}.duet-choice-card-collapsible-disabled.sc-duet-choice{background:#f5f8fa;border-color:#e1e3e6}.duet-choice-card-collapsible-disabled.duet-theme-turva.sc-duet-choice{background:#f5f5f7;border-color:#e4e4e6}.duet-choice-card-info.sc-duet-choice{font-size:0.875rem;line-height:1.5;background:#f5f8fa;transition:150ms ease-out}.duet-choice-card-info.duet-theme-turva.sc-duet-choice{background:#f5f5f7;border-color:#e4e4e6}.duet-choice-info-toggle.sc-duet-choice{display:flex;flex-shrink:0;align-items:flex-start;justify-content:center;width:57.6px;padding-top:1.25rem;cursor:pointer;background:white;border:2px solid #e1e3e6;border-left:0 none;border-top-right-radius:4px;border-bottom-right-radius:4px;-webkit-appearance:none;appearance:none}.duet-choice-info-toggle[aria-expanded=true].sc-duet-choice{background:#f5f8fa;border-bottom-color:transparent;border-bottom-right-radius:0}.duet-choice-info-toggle[disabled].sc-duet-choice{pointer-events:none;background:#f5f8fa !important;border-color:#e1e3e6 !important}.duet-choice-info-toggle[disabled].sc-duet-choice .duet-choice-info-icon.sc-duet-choice{color:#909599 !important}.duet-choice-info-toggle[disabled].duet-theme-turva.sc-duet-choice{background:#f5f5f7 !important;border-color:#e4e4e6 !important}.duet-choice-info-toggle[disabled].duet-theme-turva.sc-duet-choice .duet-choice-info-icon.sc-duet-choice{color:#747475 !important}.duet-choice-info-toggle.sc-duet-choice:focus{outline:none}.user-is-tabbing.sc-duet-choice-h .duet-choice-info-toggle.sc-duet-choice:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-choice-label.sc-duet-choice:not(.no-hover):hover .duet-choice-info-toggle.sc-duet-choice{border-left-color:#909599}.checked.sc-duet-choice .duet-choice-info-toggle.sc-duet-choice{border-left-color:#0077b3 !important}.duet-choice-info-toggle.sc-duet-choice duet-icon.sc-duet-choice{display:block}.duet-choice-info-toggle.sc-duet-choice .duet-choice-info-icon.sc-duet-choice{color:#0077b3}.duet-theme-turva.sc-duet-choice .duet-choice-info-toggle.sc-duet-choice .duet-choice-info-icon.sc-duet-choice{color:#c60c30}.duet-choice-input.sc-duet-choice{position:absolute !important;width:100%;height:100%;opacity:0}';var DuetChoice=function(){function e(e){var t=this;registerInstance(this,e);this.duetChange=createEvent(this,"duetChange",7);this.duetFocus=createEvent(this,"duetFocus",7);this.duetBlur=createEvent(this,"duetBlur",7);this.hasHeader=false;this.choiceId=createID("DuetChoice");this.expandId=createID("DuetChoiceExpand");this.headerId=createID("DuetChoiceHeader");this.infoButtonId=createID("DuetChoiceInfoButton");this.onMouseEnter=function(){t.isHovering=true};this.onMouseLeave=function(){t.isHovering=false};this.onClick=function(e){t.toggleChecked(e)};this.handleKeyDown=function(e){if(isKeyboardClick(e)){t.toggleChecked(e)}if(isQuestionKey(e)&&t.hasInfo){t.toggleInfo()}};this.onChange=function(){t.checked=t.nativeInput.checked||false;t.duetChange.emit({checked:t.checked,value:t.value,component:"duet-choice"})};this.onBlur=function(e){t.duetBlur.emit({originalEvent:e,checked:t.checked,value:t.value,component:"duet-choice"})};this.onFocus=function(e){t.duetFocus.emit({originalEvent:e,checked:t.checked,value:t.value,component:"duet-choice"})};this.toggleChecked=function(e){e.preventDefault();e.stopPropagation();if(t.disabled||t.groupDisabled){return}t.isInfoOpen=false;if(t.type==="radio"&&t.checked){return}t.checked=!t.checked;t.duetChange.emit({originalEvent:e,checked:t.checked,value:t.value,component:"duet-choice"})};this.toggleInfo=function(){t.isInfoOpen=!t.isInfoOpen};this.isHovering=false;this.isInfoOpen=false;this.isBlurred=false;this.theme="";this.label="label";this.accessibleLabelInfoButtonDefaults=DuetStringsExternalDefaults;this.accessibleLabelInfoButton=getLocaleString(this.accessibleLabelInfoButtonDefaults);this.accessibleActiveDescendant=undefined;this.accessibleControls=undefined;this.accessibleOwns=undefined;this.accessibleDescribedBy=undefined;this.accessibleDetails=undefined;this.accessibleLabelledBy=undefined;this.accessibleDescription=undefined;this.caption="";this.value=undefined;this.type="checkbox";this.name=undefined;this.checked=false;this.collapsible=false;this.margin="auto";this.icon="";this.expand=false;this.padding="auto";this.identifier=undefined;this.groupDirection=undefined;this.groupDisabled=undefined;this.groupResponsive=undefined;this.disabled=false;this.required=false;this.infoLabelDefaults={fi:"Lisätietoja",en:"More information about",sv:"Mera information om"};this.infoLabel=getLocaleString(this.infoLabelDefaults,getLanguage())}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.hasInfo=!!this.element.querySelector("[slot='info']");this.hasHeader=!!this.element.querySelector('[slot="header"]');this.hasAdditional=!!this.element.querySelector("[slot='additional']");this.hasLabel=!!this.element.querySelector(":scope > [slot='label']");this.hasBeforeText=!!this.element.querySelector("[slot='before-text']")};e.prototype.handleHostBlur=function(e){if(this.hasInfo&&this.isInfoOpen&&this.isKeyDown){var t=this.element.contains(e===null||e===void 0?void 0:e.relatedTarget)||false;if(!t){this.toggleInfo()}}};e.prototype.handleHostKeyDown=function(){this.isKeyDown=true};e.prototype.handleHostKeyUp=function(e){this.isKeyDown=false;if(isEscapeKey(e)&&this.isInfoOpen){this.toggleInfo()}};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.nativeInput.focus(e);return[2]}))}))};e.prototype.getAriaDescribedby=function(){if(this.accessibleDescribedBy){return this.accessibleDescribedBy}if(this.collapsible||this.hasInfo){if(this.hasHeader){return this.headerId}else{return this.expandId}}return null};e.prototype.getClassNames=function(){if(this.hasInfo&&!this.collapsible){return{"duet-choice-card-info":true,"duet-choice-card-info-expanded":this.isInfoOpen,"duet-choice-card-collapsed":!this.isInfoOpen,"duet-theme-turva":this.theme==="turva"}}if(!this.hasInfo&&this.collapsible){return{"duet-choice-card-collapsible":true,"duet-choice-card-collapsible-expanded":this.checked,"duet-choice-card-collapsed":!this.checked,"duet-choice-card-collapsible-disabled":this.disabled||this.groupDisabled?true:false,"duet-theme-turva":this.theme==="turva"}}return{"duet-choice-default-slot":true}};e.prototype.render=function(){var e=this;var t=this.identifier||this.choiceId;return h(Host,{class:{horizontal:this.groupDirection==="horizontal"&&!this.groupResponsive,"horizontal-responsive":this.groupDirection==="horizontal"&&this.groupResponsive,"duet-m-0":this.margin==="none","duet-expand":this.expand,"duet-theme-turva":this.theme==="turva"}},h("div",{class:{"duet-choice-card-flextainer":true,"duet-theme-turva":this.theme==="turva"}},h("div",{class:{"duet-choice-card":true,"has-icon":!!this.icon,"has-info":this.hasInfo,checked:this.checked,info:this.isInfoOpen,collapsible:this.collapsible,"duet-p-0":this.padding==="none"}},h("input",{class:"duet-choice-input",type:this.type,onFocus:this.onFocus,onBlur:this.onBlur,onChange:this.onChange,disabled:this.disabled||this.groupDisabled,required:this.required,id:t,name:this.name,value:this.value,checked:this.checked,"aria-controls":this.accessibleControls,"aria-activedescendant":this.accessibleActiveDescendant,"aria-labelledby":this.accessibleLabelledBy,"aria-details":this.accessibleDetails,"aria-description":this.accessibleDescription,"aria-owns":this.accessibleOwns,"aria-describedby":this.getAriaDescribedby(),onKeyDown:this.handleKeyDown,ref:function(t){return e.nativeInput=t}}),h("label",{htmlFor:t,class:{"duet-choice-label":true,"no-hover":this.isHovering,"has-before-text":this.hasBeforeText},onClick:this.onClick},this.hasBeforeText&&h("slot",{name:"before-text"}),this.icon&&h("div",{class:"duet-choice-card-icon"},h("duet-icon",{margin:"none",size:"small",name:this.icon,color:"currentColor"})),h("div",{class:"duet-choice-card-text"},h("div",null,this.hasLabel?h("slot",{name:"label"}):this.label),this.caption&&h("div",null,h("duet-spacer",{size:"xx-small"}),h("duet-caption",{margin:"none",selected:this.checked},this.caption)),this.hasAdditional&&h("div",null,h("duet-spacer",{size:"xx-small"}),h("slot",{name:"additional"}))),h("div",null,h("div",{class:{"duet-checkmark-container":true,"duet-checkmark-radio":this.type==="radio"}},this.checked&&h("div",{class:"duet-checkmark"}))))),this.hasInfo&&!this.collapsible&&h("button",{ref:function(t){return e.infoButtonEl=t},id:this.infoButtonId,class:{"duet-choice-info-toggle":true,"duet-theme-turva":this.theme==="turva"},onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onClick:this.toggleInfo,disabled:this.disabled||this.groupDisabled,"aria-expanded":this.isInfoOpen?"true":"false","aria-label":"".concat(this.infoLabel," ").concat(this.label),"aria-controls":this.expandId,"aria-flowto":this.expandId,tabindex:this.type==="radio"&&!this.checked?"-1":"0",type:"button"},h("duet-visually-hidden",{"aria-hidden":!this.isBlurred?"true":"false"},this.accessibleLabelInfoButton),h("div",{class:"duet-choice-info-icon"},h("duet-icon",{icon:messagingInfo.svg,margin:"none",size:"small",color:"currentColor"})))),this.collapsible||this.hasInfo?h("div",{class:this.getClassNames(),id:this.expandId},h("span",{class:{"duet-choice-section-visible":this.collapsible?this.checked:this.isInfoOpen,"duet-choice-section-hidden":this.collapsible?!this.checked:!this.isInfoOpen}},h("span",{id:this.headerId},h("slot",{name:"header"})),this.hasInfo?h("span",null,h("span",{"aria-relevant":"all","aria-atomic":"true","aria-live":this.isInfoOpen?"polite":"off"},h("slot",{name:"info"})),h("slot",null)):h("span",null,h("slot",null))),this.isInfoOpen&&h(FocusGuard,{moveFocusTo:this.infoButtonEl})):null)};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetChoice.style=duetChoiceCss;var duetChoiceGroupCss="*.sc-duet-choice-group,*.sc-duet-choice-group::after,*.sc-duet-choice-group::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-choice-group-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.horizontal.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group{display:block}@media (min-width: 48em){.horizontal.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group{display:flex;margin-bottom:0}}.horizontal.sc-duet-choice-group-h .duet-choice-group.duet-no-stacking.sc-duet-choice-group{display:flex}.duet-choice-group.sc-duet-choice-group{position:relative;width:100%;margin-bottom:-12px}";var duetChoiceSelector=":scope duet-choice:not(:scope duet-choice duet-choice-group duet-choice):not(:scope duet-choice duet-fieldset duet-choice)";var DuetChoiceGroup=function(){function e(e){var t=this;registerInstance(this,e);this.choiceGroupName="duet-choice-group";this.getChoices=function(){return Array.from(t.element.querySelectorAll(duetChoiceSelector))};this.isMyChoice=function(e){return t.getChoices().includes(e)};this.onSelect=function(e){if(e.detail.component!=="duet-choice"){return}var i=e.target;if(i&&t.isMyChoice(i)){t.value=i.value}e.cancelBubble=true};this.direction="vertical";this.margin="auto";this.theme="";this.error="";this.name=undefined;this.label="Label";this.labelHidden=false;this.caption=undefined;this.tooltip=undefined;this.tooltipDirection="auto";this.responsive=false;this.value=undefined;this.disabled=undefined}e.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;var i=this;return __generator(this,(function(c){switch(c.label){case 0:e=this.element;if(!(this.value===undefined))return[3,2];t=findCheckedOption(e,duetChoiceSelector);if(!(t!==undefined))return[3,2];return[4,t.componentOnReady()];case 1:c.sent();if(this.value===undefined){this.value=t.value}c.label=2;case 2:this.mutationO=watchForOptions(e,duetChoiceSelector,(function(e){if(e!==undefined){e.componentOnReady().then((function(){if(i.isMyChoice(e)){i.value=e.value}}))}else{i.updateChoices()}}));this.updateChoices();return[2]}}))}))};e.prototype.disconnectedCallback=function(){if(this.mutationO){this.mutationO.disconnect();this.mutationO=undefined}};e.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};e.prototype.updateChoices=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,c,o,a;return __generator(this,(function(n){e=this.getChoices();t=this.value;i=false;for(c=0,o=e;c<o.length;c++){a=o[c];a.name=this.name;a.groupDisabled=this.disabled;a.groupDirection=this.direction;a.groupResponsive=this.responsive;if(!i&&a.value===t){i=true;a.checked=true}else{a.checked=false}}if(!i){this.value=undefined}return[2]}))}))};e.prototype.render=function(){var e;return h(Host,{onDuetChange:this.onSelect,class:{horizontal:this.direction==="horizontal"}},h("duet-fieldset",{label:this.label,labelHidden:this.labelHidden,caption:this.caption,error:this.error,margin:this.margin,theme:this.theme},this.tooltip&&h("duet-tooltip",{slot:"tooltip",direction:this.tooltipDirection,accessibleInputLabel:this.label},this.tooltip),h("div",{class:(e={},e[this.choiceGroupName]=true,e["duet-no-stacking"]=!this.responsive,e)},h("slot",null))))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{value:["updateChoices"],disabled:["updateChoices"],name:["updateChoices"],direction:["updateChoices"],responsive:["updateChoices"]}},enumerable:false,configurable:true});return e}();DuetChoiceGroup.style=duetChoiceGroupCss;export{DuetChoice as duet_choice,DuetChoiceGroup as duet_choice_group};
4
+ */import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-ab069e8d.js";import{i as inheritGlobalTheme}from"./themeable-component-cb76be7c.js";import{D as DuetStringsExternalDefaults}from"./common-strings-97e04e4b.js";import{c as createID}from"./create-id-981107da.js";import{F as FocusGuard}from"./focus-utils-c81ea33a.js";import{i as isKeyboardClick,h as isQuestionKey,f as isEscapeKey}from"./keyboard-utils-88ea1007.js";import{g as getLocaleString,a as getLanguage}from"./language-utils-bf701d37.js";import{f as findCheckedOption,w as watchForOptions}from"./watch-options-dd55bce8.js";import"./string-utils-5954f458.js";var messagingInfo={title:"messaging-info",tags:"messaging info information circle",svg:'<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M13.5 17.25A2.252 2.252 0 0 1 11.25 15v-3.75h-.75a.75.75 0 0 1 0-1.5h.75c.827 0 1.5.673 1.5 1.5V15c0 .414.336.75.75.75h.75a.75.75 0 0 1 0 1.5z"/><circle cx="11.625" cy="7.125" r="1.125"/><path d="M12 24C5.383 24 0 18.617 0 12S5.383 0 12 0s12 5.383 12 12-5.383 12-12 12zm0-22.5C6.21 1.5 1.5 6.21 1.5 12S6.21 22.5 12 22.5 22.5 17.79 22.5 12 17.79 1.5 12 1.5z"/></svg>'};var duetChoiceCss='*.sc-duet-choice,*.sc-duet-choice::after,*.sc-duet-choice::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-choice-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;display:inline-flex;flex-direction:column;width:auto;max-width:100%;vertical-align:bottom;-webkit-tap-highlight-color:transparent}.sc-duet-choice-h:last-child,.sc-duet-choice-h:last-of-type{margin-right:0 !important}@media (max-width: 35.9375em){.sc-duet-choice-h{width:100%}}.duet-expand.sc-duet-choice-h{width:100% !important}.duet-m-0.sc-duet-choice-h{margin:0 !important}.duet-fixed.sc-duet-choice-h{width:auto !important}.vertical.sc-duet-choice-h{margin-right:0 !important}.horizontal.sc-duet-choice-h{margin-bottom:0 !important}@media (min-width: 48em){.horizontal-responsive.sc-duet-choice-h{margin-bottom:0 !important;margin-right:16px !important}.horizontal-responsive.sc-duet-choice-h:last-child,.horizontal-responsive.sc-duet-choice-h:last-of-type{margin-right:0 !important}}.sc-duet-choice-h:last-child:not(:only-child){margin-right:0 !important}.duet-choice-card.sc-duet-choice{position:relative;display:block;width:100%;min-width:8rem;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;-webkit-hyphens:auto;hyphens:auto;line-height:1.1;color:#00294d !important;text-align:left;background:white;border-width:2px}.duet-choice-card.duet-p-0.sc-duet-choice{padding:0 !important}.duet-choice-card.duet-m-0.sc-duet-choice{margin:0 !important}.duet-theme-turva.sc-duet-choice .duet-choice-card.sc-duet-choice{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a !important}.duet-choice-card-flextainer.sc-duet-choice{display:flex}.duet-choice-label.sc-duet-choice{-webkit-user-select:none;user-select:none;position:relative;z-index:100;display:flex;gap:1rem;align-items:center;justify-content:flex-start;width:100%;height:100%;min-height:3.875rem;padding:1rem;font-size:1rem;font-weight:600;text-decoration:none;word-break:break-word;cursor:pointer;border:2px solid #e1e3e6;border-radius:4px;transition:background-color 150ms ease}.duet-choice-label.has-before-text.sc-duet-choice .duet-choice-card-icon.sc-duet-choice,.duet-choice-label.has-before-text.sc-duet-choice .duet-choice-card-text.sc-duet-choice{align-self:flex-start;margin-top:0.25rem}.duet-choice-label.sc-duet-choice>div.sc-duet-choice:last-child{flex:1;align-self:flex-start;justify-self:flex-end;margin-top:0.25rem}.has-info.sc-duet-choice .duet-choice-label.sc-duet-choice{border-top-right-radius:0;border-bottom-right-radius:0}.info.sc-duet-choice .duet-choice-label.sc-duet-choice{border-bottom-right-radius:0;border-bottom-left-radius:0}.duet-theme-turva.sc-duet-choice .duet-choice-label.sc-duet-choice{border-color:#e4e4e6}.duet-theme-turva.sc-duet-choice .info.sc-duet-choice .duet-choice-label.sc-duet-choice{border-color:#e4e4e6}.duet-choice-label.sc-duet-choice:not(.no-hover):hover{border-color:#909599}.duet-choice-label.sc-duet-choice:not(.no-hover):hover .duet-checkmark-container.sc-duet-choice{border-color:#909599}.duet-theme-turva.sc-duet-choice .duet-choice-label.sc-duet-choice:not(.no-hover):hover{border-color:#747475}.duet-theme-turva.sc-duet-choice .duet-choice-label.sc-duet-choice:not(.no-hover):hover .duet-checkmark-container.sc-duet-choice{border-color:#747475}.duet-theme-turva.sc-duet-choice .info.sc-duet-choice .duet-choice-label.sc-duet-choice:not(.no-hover):hover{border-color:#747475}.duet-choice-label.sc-duet-choice:active{opacity:0.75;transition:none !important}.checked.sc-duet-choice .duet-choice-label.sc-duet-choice{color:#0077b3 !important;background:#f3f9fc;border-color:#0077b3 !important}.checked.sc-duet-choice .duet-choice-label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#0077b3}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice .duet-choice-label.sc-duet-choice{color:#171c3a !important;background:#f5f5f7;border-color:#171c3a !important}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice .duet-choice-label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#c60c30}.checked.collapsible.sc-duet-choice .duet-choice-label.sc-duet-choice{border-bottom:0 !important;border-bottom-right-radius:0;border-bottom-left-radius:0}input.sc-duet-choice:focus{outline:0}.user-is-tabbing.sc-duet-choice-h input.sc-duet-choice:checked:focus+.duet-choice-label.sc-duet-choice{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3)}.user-is-tabbing.sc-duet-choice-h input.sc-duet-choice:not(:checked):focus+.duet-choice-label.sc-duet-choice{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.user-is-tabbing.duet-theme-turva.sc-duet-choice-h input.sc-duet-choice:checked:focus+.duet-choice-label.sc-duet-choice{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2)}.user-is-tabbing.duet-theme-turva.sc-duet-choice-h input.sc-duet-choice:not(:checked):focus+.duet-choice-label.sc-duet-choice{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice{color:#657787 !important;cursor:default !important;background:#f5f8fa !important;border-color:#e1e3e6 !important}input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice .duet-checkmark.sc-duet-choice{border-color:#657787 !important}.duet-theme-turva.sc-duet-choice input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice{color:#747475 !important;background:#f5f5f7 !important;border-color:#e4e4e6 !important}.duet-theme-turva.sc-duet-choice input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice .duet-checkmark.sc-duet-choice{border-color:#747475 !important}.checked.sc-duet-choice input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice{background:#e1e3e6 !important;border-color:#e1e3e6 !important}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice input[disabled].sc-duet-choice+.duet-choice-label.sc-duet-choice{background:#e4e4e6 !important;border-color:#e4e4e6 !important}.duet-checkmark-container.sc-duet-choice{position:relative;width:20px;height:20px;margin-left:auto;border:1px solid #909599;border-radius:4px;transition:border 300ms ease}.duet-theme-turva.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#747475}.checked.sc-duet-choice .duet-checkmark-container.sc-duet-choice{background:#0077b3;border-color:#0077b3;transition:none}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice .duet-checkmark-container.sc-duet-choice{background:#171c3a;border-color:#171c3a !important}.duet-checkmark-container.duet-checkmark-radio.sc-duet-choice{border-radius:50%}[disabled].sc-duet-choice+label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#cfd2d4 !important}.duet-theme-turva.sc-duet-choice [disabled].sc-duet-choice+label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{border-color:#cfcfd1 !important}.checked.sc-duet-choice [disabled].sc-duet-choice+label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{background:#cfd2d4 !important}.duet-theme-turva.sc-duet-choice .checked.sc-duet-choice [disabled].sc-duet-choice+label.sc-duet-choice .duet-checkmark-container.sc-duet-choice{background:#cfcfd1 !important}.duet-checkmark.sc-duet-choice{position:absolute;top:10px;left:3px;width:5.3333333333px;height:11.8518518519px;border-top:2px solid white;border-right:2px solid white;opacity:1;transform:scaleX(-1) rotate(135deg) translateZ(0);transform-origin:left top;animation-name:duet-checkmark;animation-duration:600ms;animation-timing-function:ease-out;animation-fill-mode:forwards}@keyframes duet-checkmark{0%{width:0;height:0;opacity:1}20%{width:5.3333333333px;height:0;opacity:1}40%,100%{width:5.3333333333px;height:11.8518518519px;opacity:1}}.duet-choice-card-icon.sc-duet-choice{position:relative}.duet-choice-card-icon.sc-duet-choice duet-icon.sc-duet-choice{display:block}.duet-choice-section-hidden.sc-duet-choice{display:none}.duet-choice-card-info.duet-choice-card-collapsed.sc-duet-choice,.duet-choice-card-collapsed.duet-choice-card-collapsible.sc-duet-choice{position:relative;width:auto;padding:0 !important;background:unset !important;border:0;border-radius:0}.duet-choice-card-info.sc-duet-choice,.duet-choice-card-collapsible.sc-duet-choice{padding:20px !important;position:relative;z-index:200;width:100%;font-weight:400;color:#00294d;border:2px solid #e1e3e6;border-top:0;border-radius:0 0 4px 4px}@media (min-width: 36em){.duet-choice-card-info.sc-duet-choice,.duet-choice-card-collapsible.sc-duet-choice{padding:28px !important}}.duet-theme-turva.sc-duet-choice .duet-choice-card-info.sc-duet-choice,.duet-theme-turva.sc-duet-choice .duet-choice-card-collapsible.sc-duet-choice{color:#171c3a;border-color:#171c3a}.checked.sc-duet-choice .duet-choice-card-info.sc-duet-choice,.checked.sc-duet-choice .duet-choice-card-collapsible.sc-duet-choice{display:block}.duet-choice-card-info-expanded.sc-duet-choice,.duet-choice-card-collapsible-expanded.sc-duet-choice{display:block}.duet-choice-card-collapsible.sc-duet-choice{background:white;border:2px solid #0077b3;border-top:0}.duet-choice-card-collapsible.duet-theme-turva.sc-duet-choice{background:white;border-color:#171c3a}.duet-choice-card-collapsible-disabled.sc-duet-choice{background:#f5f8fa;border-color:#e1e3e6}.duet-choice-card-collapsible-disabled.duet-theme-turva.sc-duet-choice{background:#f5f5f7;border-color:#e4e4e6}.duet-choice-card-info.sc-duet-choice{font-size:0.875rem;line-height:1.5;background:#f5f8fa;transition:150ms ease-out}.duet-choice-card-info.duet-theme-turva.sc-duet-choice{background:#f5f5f7;border-color:#e4e4e6}.duet-choice-info-toggle.sc-duet-choice{display:flex;flex-shrink:0;align-items:flex-start;justify-content:center;width:57.6px;padding-top:1.25rem;cursor:pointer;background:white;border:2px solid #e1e3e6;border-left:0 none;border-top-right-radius:4px;border-bottom-right-radius:4px;-webkit-appearance:none;appearance:none}.duet-choice-info-toggle[aria-expanded=true].sc-duet-choice{background:#f5f8fa;border-bottom-color:transparent;border-bottom-right-radius:0}.duet-choice-info-toggle[disabled].sc-duet-choice{pointer-events:none;background:#f5f8fa !important;border-color:#e1e3e6 !important}.duet-choice-info-toggle[disabled].sc-duet-choice .duet-choice-info-icon.sc-duet-choice{color:#909599 !important}.duet-choice-info-toggle[disabled].duet-theme-turva.sc-duet-choice{background:#f5f5f7 !important;border-color:#e4e4e6 !important}.duet-choice-info-toggle[disabled].duet-theme-turva.sc-duet-choice .duet-choice-info-icon.sc-duet-choice{color:#747475 !important}.duet-choice-info-toggle.sc-duet-choice:focus{outline:none}.user-is-tabbing.sc-duet-choice-h .duet-choice-info-toggle.sc-duet-choice:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-choice-label.sc-duet-choice:not(.no-hover):hover .duet-choice-info-toggle.sc-duet-choice{border-left-color:#909599}.checked.sc-duet-choice .duet-choice-info-toggle.sc-duet-choice{border-left-color:#0077b3 !important}.duet-choice-info-toggle.sc-duet-choice duet-icon.sc-duet-choice{display:block}.duet-choice-info-toggle.sc-duet-choice .duet-choice-info-icon.sc-duet-choice{color:#0077b3}.duet-theme-turva.sc-duet-choice .duet-choice-info-toggle.sc-duet-choice .duet-choice-info-icon.sc-duet-choice{color:#c60c30}.duet-choice-input.sc-duet-choice{position:absolute !important;width:100%;height:100%;opacity:0}';var DuetChoice=function(){function e(e){var t=this;registerInstance(this,e);this.duetChange=createEvent(this,"duetChange",7);this.duetFocus=createEvent(this,"duetFocus",7);this.duetBlur=createEvent(this,"duetBlur",7);this.hasHeader=false;this.choiceId=createID("DuetChoice");this.expandId=createID("DuetChoiceExpand");this.headerId=createID("DuetChoiceHeader");this.infoButtonId=createID("DuetChoiceInfoButton");this.onMouseEnter=function(){t.isHovering=true};this.onMouseLeave=function(){t.isHovering=false};this.onClick=function(e){t.toggleChecked(e)};this.handleKeyDown=function(e){if(isKeyboardClick(e)){t.toggleChecked(e)}if(isQuestionKey(e)&&t.hasInfo){t.toggleInfo()}};this.onChange=function(){t.checked=t.nativeInput.checked||false;t.duetChange.emit({checked:t.checked,value:t.value,component:"duet-choice"})};this.onBlur=function(e){t.duetBlur.emit({originalEvent:e,checked:t.checked,value:t.value,component:"duet-choice"})};this.onFocus=function(e){t.duetFocus.emit({originalEvent:e,checked:t.checked,value:t.value,component:"duet-choice"})};this.toggleChecked=function(e){e.preventDefault();e.stopPropagation();if(t.disabled||t.groupDisabled){return}t.isInfoOpen=false;if(t.type==="radio"&&t.checked){return}t.checked=!t.checked;t.duetChange.emit({originalEvent:e,checked:t.checked,value:t.value,component:"duet-choice"})};this.toggleInfo=function(){t.isInfoOpen=!t.isInfoOpen};this.isHovering=false;this.isInfoOpen=false;this.isBlurred=false;this.theme="";this.label="label";this.accessibleLabelInfoButtonDefaults=DuetStringsExternalDefaults;this.accessibleLabelInfoButton=getLocaleString(this.accessibleLabelInfoButtonDefaults);this.accessibleActiveDescendant=undefined;this.accessibleControls=undefined;this.accessibleOwns=undefined;this.accessibleDescribedBy=undefined;this.accessibleDetails=undefined;this.accessibleLabelledBy=undefined;this.accessibleDescription=undefined;this.caption="";this.value=undefined;this.type="checkbox";this.name=undefined;this.checked=false;this.collapsible=false;this.margin="auto";this.icon="";this.expand=false;this.padding="auto";this.identifier=undefined;this.groupDirection=undefined;this.groupDisabled=undefined;this.groupResponsive=undefined;this.disabled=false;this.required=false;this.infoLabelDefaults={fi:"Lisätietoja",en:"More information about",sv:"Mera information om"};this.infoLabel=getLocaleString(this.infoLabelDefaults,getLanguage())}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.hasInfo=!!this.element.querySelector("[slot='info']");this.hasHeader=!!this.element.querySelector('[slot="header"]');this.hasAdditional=!!this.element.querySelector("[slot='additional']");this.hasLabel=!!this.element.querySelector(":scope > [slot='label']");this.hasBeforeText=!!this.element.querySelector("[slot='before-text']")};e.prototype.handleHostBlur=function(e){if(this.hasInfo&&this.isInfoOpen&&this.isKeyDown){var t=this.element.contains(e===null||e===void 0?void 0:e.relatedTarget)||false;if(!t){this.toggleInfo()}}};e.prototype.handleHostKeyDown=function(){this.isKeyDown=true};e.prototype.handleHostKeyUp=function(e){this.isKeyDown=false;if(isEscapeKey(e)&&this.isInfoOpen){this.toggleInfo()}};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.nativeInput.focus(e);return[2]}))}))};e.prototype.getAriaDescribedby=function(){if(this.accessibleDescribedBy){return this.accessibleDescribedBy}if(this.collapsible||this.hasInfo){if(this.hasHeader){return this.headerId}else{return this.expandId}}return null};e.prototype.getClassNames=function(){if(this.hasInfo&&!this.collapsible){return{"duet-choice-card-info":true,"duet-choice-card-info-expanded":this.isInfoOpen,"duet-choice-card-collapsed":!this.isInfoOpen,"duet-theme-turva":this.theme==="turva"}}if(!this.hasInfo&&this.collapsible){return{"duet-choice-card-collapsible":true,"duet-choice-card-collapsible-expanded":this.checked,"duet-choice-card-collapsed":!this.checked,"duet-choice-card-collapsible-disabled":this.disabled||this.groupDisabled?true:false,"duet-theme-turva":this.theme==="turva"}}return{"duet-choice-default-slot":true}};e.prototype.render=function(){var e=this;var t=this.identifier||this.choiceId;return h(Host,{class:{horizontal:this.groupDirection==="horizontal"&&!this.groupResponsive,"horizontal-responsive":this.groupDirection==="horizontal"&&this.groupResponsive,"duet-m-0":this.margin==="none","duet-expand":this.expand,"duet-theme-turva":this.theme==="turva"}},h("div",{class:{"duet-choice-card-flextainer":true,"duet-theme-turva":this.theme==="turva"}},h("div",{class:{"duet-choice-card":true,"has-icon":!!this.icon,"has-info":this.hasInfo,checked:this.checked,info:this.isInfoOpen,collapsible:this.collapsible,"duet-p-0":this.padding==="none"}},h("input",{class:"duet-choice-input",type:this.type,onFocus:this.onFocus,onBlur:this.onBlur,onChange:this.onChange,disabled:this.disabled||this.groupDisabled,required:this.required,id:t,name:this.name,value:this.value,checked:this.checked,"aria-controls":this.accessibleControls,"aria-activedescendant":this.accessibleActiveDescendant,"aria-labelledby":this.accessibleLabelledBy,"aria-details":this.accessibleDetails,"aria-description":this.accessibleDescription,"aria-owns":this.accessibleOwns,"aria-describedby":this.getAriaDescribedby(),onKeyDown:this.handleKeyDown,ref:function(t){return e.nativeInput=t}}),h("label",{htmlFor:t,class:{"duet-choice-label":true,"no-hover":this.isHovering,"has-before-text":this.hasBeforeText},onClick:this.onClick},this.hasBeforeText&&h("slot",{name:"before-text"}),this.icon&&h("div",{class:"duet-choice-card-icon"},h("duet-icon",{margin:"none",size:"small",name:this.icon,color:"currentColor"})),h("div",{class:"duet-choice-card-text"},h("div",null,this.hasLabel?h("slot",{name:"label"}):this.label),this.caption&&h("div",null,h("duet-spacer",{size:"xx-small"}),h("duet-caption",{margin:"none",selected:this.checked},this.caption)),this.hasAdditional&&h("div",null,h("duet-spacer",{size:"xx-small"}),h("slot",{name:"additional"}))),h("div",null,h("div",{class:{"duet-checkmark-container":true,"duet-checkmark-radio":this.type==="radio"}},this.checked&&h("div",{class:"duet-checkmark"}))))),this.hasInfo&&!this.collapsible&&h("button",{ref:function(t){return e.infoButtonEl=t},id:this.infoButtonId,class:{"duet-choice-info-toggle":true,"duet-theme-turva":this.theme==="turva"},onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onClick:this.toggleInfo,disabled:this.disabled||this.groupDisabled,"aria-expanded":this.isInfoOpen?"true":"false","aria-label":"".concat(this.infoLabel," ").concat(this.label),"aria-controls":this.expandId,"aria-flowto":this.expandId,tabindex:this.type==="radio"&&!this.checked?"-1":"0",type:"button"},h("duet-visually-hidden",{"aria-hidden":!this.isBlurred?"true":"false"},this.accessibleLabelInfoButton),h("div",{class:"duet-choice-info-icon"},h("duet-icon",{icon:messagingInfo.svg,margin:"none",size:"small",color:"currentColor"})))),this.collapsible||this.hasInfo?h("div",{class:this.getClassNames(),id:this.expandId},h("span",{class:{"duet-choice-section-visible":this.collapsible?this.checked:this.isInfoOpen,"duet-choice-section-hidden":this.collapsible?!this.checked:!this.isInfoOpen}},h("span",{id:this.headerId},h("slot",{name:"header"})),this.hasInfo?h("span",null,h("span",{"aria-relevant":"all","aria-atomic":"true","aria-live":this.isInfoOpen?"polite":"off"},h("slot",{name:"info"})),h("slot",null)):h("span",null,h("slot",null))),this.isInfoOpen&&h(FocusGuard,{moveFocusTo:this.infoButtonEl})):null)};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetChoice.style=duetChoiceCss;var duetChoiceGroupCss="*.sc-duet-choice-group,*.sc-duet-choice-group::after,*.sc-duet-choice-group::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-choice-group-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.horizontal.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group{display:block}@media (min-width: 48em){.horizontal.sc-duet-choice-group-h .duet-choice-group.sc-duet-choice-group{display:flex;margin-bottom:0}}.horizontal.sc-duet-choice-group-h .duet-choice-group.duet-no-stacking.sc-duet-choice-group{display:flex}.duet-choice-group.sc-duet-choice-group{position:relative;width:100%;margin-bottom:-12px}";var duetChoiceSelector=":scope duet-choice:not(:scope duet-choice duet-choice-group duet-choice):not(:scope duet-choice duet-fieldset duet-choice)";var DuetChoiceGroup=function(){function e(e){var t=this;registerInstance(this,e);this.choiceGroupName="duet-choice-group";this.getChoices=function(){return Array.from(t.element.querySelectorAll(duetChoiceSelector))};this.isMyChoice=function(e){return t.getChoices().includes(e)};this.onSelect=function(e){if(e.detail.component!=="duet-choice"){return}var i=e.target;if(i&&t.isMyChoice(i)){t.value=i.value}e.cancelBubble=true};this.direction="vertical";this.margin="auto";this.theme="";this.error="";this.name=undefined;this.label="Label";this.labelHidden=false;this.caption=undefined;this.tooltip=undefined;this.tooltipDirection="auto";this.responsive=false;this.value=undefined;this.disabled=undefined}e.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;var i=this;return __generator(this,(function(c){switch(c.label){case 0:e=this.element;if(!(this.value===undefined))return[3,2];t=findCheckedOption(e,duetChoiceSelector);if(!(t!==undefined))return[3,2];return[4,t.componentOnReady()];case 1:c.sent();if(this.value===undefined){this.value=t.value}c.label=2;case 2:this.mutationO=watchForOptions(e,duetChoiceSelector,(function(e){if(e!==undefined){e.componentOnReady().then((function(){if(i.isMyChoice(e)){i.value=e.value}}))}else{i.updateChoices()}}));this.updateChoices();return[2]}}))}))};e.prototype.disconnectedCallback=function(){if(this.mutationO){this.mutationO.disconnect();this.mutationO=undefined}};e.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};e.prototype.updateChoices=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,c,o,a;return __generator(this,(function(n){e=this.getChoices();t=this.value;i=false;for(c=0,o=e;c<o.length;c++){a=o[c];a.name=this.name;a.groupDisabled=this.disabled;a.groupDirection=this.direction;a.groupResponsive=this.responsive;if(!i&&a.value===t){i=true;a.checked=true}else{a.checked=false}}if(!i){this.value=undefined}return[2]}))}))};e.prototype.render=function(){var e;return h(Host,{onDuetChange:this.onSelect,class:{horizontal:this.direction==="horizontal"}},h("duet-fieldset",{label:this.label,labelHidden:this.labelHidden,caption:this.caption,error:this.error,margin:this.margin,theme:this.theme},this.tooltip&&h("duet-tooltip",{slot:"tooltip",direction:this.tooltipDirection,accessibleInputLabel:this.label},this.tooltip),h("div",{class:(e={},e[this.choiceGroupName]=true,e["duet-no-stacking"]=!this.responsive,e)},h("slot",null))))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{value:["updateChoices"],disabled:["updateChoices"],name:["updateChoices"],direction:["updateChoices"],responsive:["updateChoices"]}},enumerable:false,configurable:true});return e}();DuetChoiceGroup.style=duetChoiceGroupCss;export{DuetChoice as duet_choice,DuetChoiceGroup as duet_choice_group};
@@ -1,4 +1,4 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,o,i){function a(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,l){function n(e){try{r(i.next(e))}catch(t){l(t)}}function s(e){try{r(i["throw"](e))}catch(t){l(t)}}function r(e){e.done?o(e.value):a(e.value).then(n,s)}r((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},i,a,l,n;return n={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function s(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");while(o)try{if(i=1,a&&(l=n[0]&2?a["return"]:n[0]?a["throw"]||((l=a["return"])&&l.call(a),0):a.next)&&!(l=l.call(a,n[1])).done)return l;if(a=0,l)n=[n[0]&2,l.value];switch(n[0]){case 0:case 1:l=n;break;case 4:o.label++;return{value:n[1],done:false};case 5:o.label++;a=n[1];n=[0];continue;case 7:n=o.ops.pop();o.trys.pop();continue;default:if(!(l=o.trys,l=l.length>0&&l[l.length-1])&&(n[0]===6||n[0]===2)){o=0;continue}if(n[0]===3&&(!l||n[1]>l[0]&&n[1]<l[3])){o.label=n[1];break}if(n[0]===6&&o.label<l[1]){o.label=l[1];l=n;break}if(l&&o.label<l[2]){o.label=l[2];o.ops.push(n);break}if(l[2])o.ops.pop();o.trys.pop();continue}n=t.call(e,o)}catch(s){n=[6,s];a=0}finally{i=l=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};
1
+ var __awaiter=this&&this.__awaiter||function(e,t,o,i){function l(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,a){function n(e){try{r(i.next(e))}catch(t){a(t)}}function s(e){try{r(i["throw"](e))}catch(t){a(t)}}function r(e){e.done?o(e.value):l(e.value).then(n,s)}r((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,l,a,n;return n={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function s(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");while(o)try{if(i=1,l&&(a=n[0]&2?l["return"]:n[0]?l["throw"]||((a=l["return"])&&a.call(l),0):l.next)&&!(a=a.call(l,n[1])).done)return a;if(l=0,a)n=[n[0]&2,a.value];switch(n[0]){case 0:case 1:a=n;break;case 4:o.label++;return{value:n[1],done:false};case 5:o.label++;l=n[1];n=[0];continue;case 7:n=o.ops.pop();o.trys.pop();continue;default:if(!(a=o.trys,a=a.length>0&&a[a.length-1])&&(n[0]===6||n[0]===2)){o=0;continue}if(n[0]===3&&(!a||n[1]>a[0]&&n[1]<a[3])){o.label=n[1];break}if(n[0]===6&&o.label<a[1]){o.label=a[1];a=n;break}if(a&&o.label<a[2]){o.label=a[2];o.ops.push(n);break}if(a[2])o.ops.pop();o.trys.pop();continue}n=t.call(e,o)}catch(s){n=[6,s];l=0}finally{i=a=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Built with Duet Design System
4
- */import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-55984aa4.js";import{a as actionArrowDownSmall}from"./action-arrow-down-small-82273dc8.js";import{f as font_size_medium,t as tokens}from"./tokens-0963dc8b.js";import{i as inheritGlobalTheme}from"./themeable-component-cb76be7c.js";import{c as createID}from"./create-id-981107da.js";import{i as isKeyboardClick}from"./keyboard-utils-88ea1007.js";import{s as sanitizeString}from"./string-utils-5954f458.js";var duetCollapsibleCss='*.sc-duet-collapsible,*.sc-duet-collapsible::after,*.sc-duet-collapsible::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-collapsible-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:16px !important;display: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:1rem;font-weight:600;line-height:1.5;color:#00294d}.duet-theme-turva.sc-duet-collapsible-h{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}.duet-m-0.sc-duet-collapsible-h{margin:0 !important}.duet-collapsible-content.sc-duet-collapsible{display:none;padding-left:18px;margin-top:8px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;font-variant-numeric:tabular-nums;-webkit-hyphens:auto;hyphens:auto;line-height:1.5;color:#00294d}@media (max-width: 35.9375em){.duet-collapsible-content.sc-duet-collapsible{font-size:0.875rem}}.duet-collapsible-content.duet-theme-turva.sc-duet-collapsible{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}[open].sc-duet-collapsible-h .duet-collapsible-content.sc-duet-collapsible{display:block}.duet-collapsible-heading.sc-duet-collapsible{-webkit-user-select:none;user-select:none;display:flex;align-items:center;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:600;line-height:1.5;color:#00294d;cursor:pointer;border-radius:4px}.duet-collapsible-heading.duet-collapsible-normal-weight.sc-duet-collapsible{font-weight:400}.duet-collapsible-heading.duet-theme-turva.sc-duet-collapsible{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}.duet-collapsible-heading.sc-duet-collapsible .duet-collapsible-heading-content.sc-duet-collapsible{flex:1}.duet-collapsible-heading.sc-duet-collapsible:focus{outline:0}.user-is-tabbing.sc-duet-collapsible-h .duet-collapsible-heading.sc-duet-collapsible:focus{border-radius:4px;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.user-is-tabbing.duet-theme-turva.sc-duet-collapsible-h .duet-collapsible-heading.sc-duet-collapsible:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-collapsible-heading-icon.sc-duet-collapsible{margin-right:8px !important;display:flex;align-items:center;justify-content:center;color:#00294d;transition:transform 300ms ease}.duet-collapsible-heading-icon.sc-duet-collapsible:last-child,.duet-collapsible-heading-icon.sc-duet-collapsible:last-of-type{margin-right:0 !important}[aria-expanded=true].sc-duet-collapsible .duet-collapsible-heading-icon.sc-duet-collapsible{transform:rotate(180deg)}';var DuetCollapsible=function(){function e(e){var t=this;registerInstance(this,e);this.duetToggle=createEvent(this,"duetToggle",7);this.id=createID("DuetCollapsible");this.handleKeyDown=function(e){if(isKeyboardClick(e)){t.handleClick(e)}};this.getFontSizeFromTokens=function(e){if(e===void 0){e=t.headingSize}if(!e){return font_size_medium}else{var o=/-/g;var i=e.replace(o,"_");return tokens["font_size_".concat(i)]}};this.getEquivalentIconSize=function(e){if(e===void 0){e=t.headingSize}switch(e){case"x-small":return"xx-small";case"small":return"xx-small";case"medium":return"xx-small";case"large":return"x-small";case"x-large":return"small";case"xx-large":return"medium";case"xxx-large":return"x-large";case"xxxx-large":return"xxx-large";default:return"xx-small"}};this.handleClick=function(e){e.preventDefault();t.open=!t.open;t.duetToggle.emit({component:"duet-collapsible",originalEvent:e})};this.theme="";this.heading="";this.headingWeight="semibold";this.headingSize=undefined;this.headingLevel=undefined;this.margin="auto";this.open=false}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.nativeButton){this.element.classList.add("user-is-tabbing");this.nativeButton.focus(e)}return[2]}))}))};e.prototype.render=function(){var e=this;var t=this.headingLevel?sanitizeString(this.headingLevel):"div";return h(Host,{class:{"duet-m-0":this.margin==="none"}},h(t,{class:{"duet-collapsible-heading":true,"duet-theme-turva":this.theme==="turva","duet-collapsible-normal-weight":this.headingWeight==="normal"},style:{"font-size":this.getFontSizeFromTokens()},role:"button",tabindex:"0",ref:function(t){return e.nativeButton=t},"aria-expanded":this.open?"true":"false","aria-controls":this.id,onClick:this.handleClick,onKeyDown:this.handleKeyDown},h("div",{class:"duet-collapsible-heading-icon"},h("duet-icon",{margin:"none",color:this.theme==="turva"?"secondary-turva":"secondary",size:this.getEquivalentIconSize(),icon:actionArrowDownSmall.svg})),h("div",{class:"duet-collapsible-heading-content",part:"duet-collapsible-heading-content"},this.heading)),h("div",{id:this.id,class:{"duet-collapsible-content":true,"duet-theme-turva":this.theme==="turva"},part:"duet-collapsible-content"},h("slot",null)))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetCollapsible.style=duetCollapsibleCss;export{DuetCollapsible as duet_collapsible};
4
+ */import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-ab069e8d.js";import{a as actionArrowDownSmall}from"./action-arrow-down-small-82273dc8.js";import{f as font_size_medium,t as tokens}from"./tokens-0963dc8b.js";import{i as inheritGlobalTheme}from"./themeable-component-cb76be7c.js";import{c as createID}from"./create-id-981107da.js";import{i as isKeyboardClick}from"./keyboard-utils-88ea1007.js";import{s as sanitizeString}from"./string-utils-5954f458.js";var duetCollapsibleCss='*.sc-duet-collapsible,*.sc-duet-collapsible::after,*.sc-duet-collapsible::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-collapsible-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:16px !important;display: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:1rem;font-weight:600;line-height:1.5;color:#00294d}.duet-theme-turva.sc-duet-collapsible-h{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}.duet-m-0.sc-duet-collapsible-h{margin:0 !important}.duet-collapsible-content.sc-duet-collapsible{display:none;padding-left:18px;margin-top:8px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;font-variant-numeric:tabular-nums;-webkit-hyphens:auto;hyphens:auto;line-height:1.5;color:#00294d}@media (max-width: 35.9375em){.duet-collapsible-content.sc-duet-collapsible{font-size:0.875rem}}.duet-collapsible-content.duet-theme-turva.sc-duet-collapsible{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}[open].sc-duet-collapsible-h .duet-collapsible-content.sc-duet-collapsible{display:block}.duet-collapsible-heading.sc-duet-collapsible{-webkit-user-select:none;user-select:none;display:flex;align-items:center;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:600;line-height:1.5;color:#00294d;cursor:pointer;border-radius:4px}.duet-collapsible-heading.duet-collapsible-normal-weight.sc-duet-collapsible{font-weight:400}.duet-collapsible-heading.duet-theme-turva.sc-duet-collapsible{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}.duet-collapsible-heading.sc-duet-collapsible .duet-collapsible-heading-content.sc-duet-collapsible{flex:1}.duet-collapsible-heading.sc-duet-collapsible:focus{outline:0}.user-is-tabbing.sc-duet-collapsible-h .duet-collapsible-heading.sc-duet-collapsible:focus{border-radius:4px;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.user-is-tabbing.duet-theme-turva.sc-duet-collapsible-h .duet-collapsible-heading.sc-duet-collapsible:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-collapsible-heading-icon.sc-duet-collapsible{margin-right:8px !important;display:flex;align-items:center;justify-content:center;color:#00294d;transition:transform 300ms ease}.duet-collapsible-heading-icon.sc-duet-collapsible:last-child,.duet-collapsible-heading-icon.sc-duet-collapsible:last-of-type{margin-right:0 !important}[aria-expanded=true].sc-duet-collapsible .duet-collapsible-heading-icon.sc-duet-collapsible{transform:rotate(180deg)}';var DuetCollapsible=function(){function e(e){var t=this;registerInstance(this,e);this.duetToggle=createEvent(this,"duetToggle",7);this.id=createID("DuetCollapsible");this.handleKeyDown=function(e){if(isKeyboardClick(e)){t.handleClick(e)}};this.getFontSizeFromTokens=function(e){if(e===void 0){e=t.headingSize}if(!e){return font_size_medium}else{var o=/-/g;var i=e.replace(o,"_");return tokens["font_size_".concat(i)]}};this.getEquivalentIconSize=function(e){if(e===void 0){e=t.headingSize}switch(e){case"x-small":return"xx-small";case"small":return"xx-small";case"medium":return"xx-small";case"large":return"x-small";case"x-large":return"small";case"xx-large":return"medium";case"xxx-large":return"x-large";case"xxxx-large":return"xxx-large";default:return"xx-small"}};this.handleClick=function(e){e.preventDefault();t.open=!t.open;t.duetToggle.emit({component:"duet-collapsible",originalEvent:e})};this.theme="";this.heading="";this.headingWeight="semibold";this.headingSize=undefined;this.headingLevel=undefined;this.margin="auto";this.open=false}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.nativeButton){this.element.classList.add("user-is-tabbing");this.nativeButton.focus(e)}return[2]}))}))};e.prototype.render=function(){var e=this;var t=this.headingLevel?sanitizeString(this.headingLevel):"div";return h(Host,{class:{"duet-m-0":this.margin==="none"}},h(t,{class:{"duet-collapsible-heading":true,"duet-theme-turva":this.theme==="turva","duet-collapsible-normal-weight":this.headingWeight==="normal"},style:{"font-size":this.getFontSizeFromTokens()},role:"button",tabindex:"0",ref:function(t){return e.nativeButton=t},"aria-expanded":this.open?"true":"false","aria-controls":this.id,onClick:this.handleClick,onKeyDown:this.handleKeyDown},h("div",{class:"duet-collapsible-heading-icon"},h("duet-icon",{margin:"none",color:this.theme==="turva"?"secondary-turva":"secondary",size:this.getEquivalentIconSize(),icon:actionArrowDownSmall.svg})),h("div",{class:"duet-collapsible-heading-content",part:"duet-collapsible-heading-content"},this.heading)),h("div",{id:this.id,class:{"duet-collapsible-content":true,"duet-theme-turva":this.theme==="turva"},part:"duet-collapsible-content"},h("slot",null)))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetCollapsible.style=duetCollapsibleCss;export{DuetCollapsible as duet_collapsible};
@@ -1,4 +1,4 @@
1
1
  var __awaiter=this&&this.__awaiter||function(t,e,o,i){function s(t){return t instanceof o?t:new o((function(e){e(t)}))}return new(o||(o=Promise))((function(o,c){function n(t){try{r(i.next(t))}catch(e){c(e)}}function u(t){try{r(i["throw"](t))}catch(e){c(e)}}function r(t){t.done?o(t.value):s(t.value).then(n,u)}r((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var o={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},i,s,c,n;return n={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function u(t){return function(e){return r([t,e])}}function r(n){if(i)throw new TypeError("Generator is already executing.");while(o)try{if(i=1,s&&(c=n[0]&2?s["return"]:n[0]?s["throw"]||((c=s["return"])&&c.call(s),0):s.next)&&!(c=c.call(s,n[1])).done)return c;if(s=0,c)n=[n[0]&2,c.value];switch(n[0]){case 0:case 1:c=n;break;case 4:o.label++;return{value:n[1],done:false};case 5:o.label++;s=n[1];n=[0];continue;case 7:n=o.ops.pop();o.trys.pop();continue;default:if(!(c=o.trys,c=c.length>0&&c[c.length-1])&&(n[0]===6||n[0]===2)){o=0;continue}if(n[0]===3&&(!c||n[1]>c[0]&&n[1]<c[3])){o.label=n[1];break}if(n[0]===6&&o.label<c[1]){o.label=c[1];c=n;break}if(c&&o.label<c[2]){o.label=c[2];o.ops.push(n);break}if(c[2])o.ops.pop();o.trys.pop();continue}n=e.call(t,o)}catch(u){n=[6,u];s=0}finally{i=c=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Built with Duet Design System
4
- */import{h,F as Fragment,r as registerInstance,c as createEvent,H as Host,g as getElement}from"./index-55984aa4.js";import{i as inheritGlobalTheme}from"./themeable-component-cb76be7c.js";import{d as debounce}from"./js-utils-fa98b8cd.js";import{n as isEnterKey,f as isEscapeKey,o as isTabKey,b as isArrowUpKey,c as isArrowDownKey}from"./keyboard-utils-88ea1007.js";import{g as getLocaleString,a as getLanguage}from"./language-utils-bf701d37.js";import{p as parsePossibleJSON}from"./string-utils-5954f458.js";var SelectSingle=function(t){var e=t.item,o=t.search,i=o===void 0?"":o,s=t.selected;var c=i!==""?new RegExp("("+i.split(" ").join("|")+")","gi"):undefined;return h(Fragment,null,s&&h("duet-icon",{class:"option-icon",name:"messaging-checked",size:"xx-small",margin:"none"}),c?h("span",{class:"option-container","aria-hidden":"true"},h("span",{innerHTML:e.name.replace(c,'<span class="highlight">$&</span>')})):e.name,e.tags&&h("span",{class:"option-tags"},e.tags.join(", ")))};var DuetComboBoxSelect=function(t){var e=t.item,o=t.active,i=t.total,s=t.selected,c=t.label,n=c===void 0?undefined:c,u=t.clickHandler,r=u===void 0?function(t){t.preventDefault()}:u,b=t.keyHandler,l=b===void 0?function(t){t.preventDefault()}:b,a=t.search;return h("li",{class:{"list-item":true,option:true,active:o,selected:s},id:o?"active_item":"","data-index":e.id,"aria-selected":o?"true":undefined,"aria-current":s?"true":undefined,role:"option","aria-label":n||"".concat(e.name,", (").concat(e.id+1," of ").concat(i,")")},h("a",{tabindex:"-1",onClick:function(t){return r(t)},onKeyUp:function(t){return l(t)},class:"option-link","aria-label":n||"".concat(e.name,", (").concat(e.id+1," of ").concat(i,")"),"aria-hidden":"true"},h(SelectSingle,{item:e,search:a,selected:s})))};var duetComboboxCss='.sc-duet-combobox-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;width:auto;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#00294d}.sc-duet-combobox-h a.sc-duet-combobox{color:#00294d;transition:none}.duet-theme-turva.sc-duet-combobox-h{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}.duet-theme-turva.sc-duet-combobox-h a.sc-duet-combobox{color:#171c3a}.duet-theme-turva.sc-duet-combobox-h .duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.option.sc-duet-combobox .option-tags.sc-duet-combobox{color:#747475}.duet-theme-turva.sc-duet-combobox-h .duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.option.selected.sc-duet-combobox{background:#f4cfd6}.duet-theme-turva.sc-duet-combobox-h .duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.active.sc-duet-combobox,.duet-theme-turva.sc-duet-combobox-h .duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox:focus,.duet-theme-turva.sc-duet-combobox-h .duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox:hover{color:white;background:#c60c30}.duet-theme-turva.sc-duet-combobox-h .duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.active.sc-duet-combobox .option-tags.sc-duet-combobox,.duet-theme-turva.sc-duet-combobox-h .duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox:focus .option-tags.sc-duet-combobox,.duet-theme-turva.sc-duet-combobox-h .duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox:hover .option-tags.sc-duet-combobox{color:white}.duet-theme-turva.sc-duet-combobox-h .duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.active.sc-duet-combobox a.sc-duet-combobox,.duet-theme-turva.sc-duet-combobox-h .duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox:focus a.sc-duet-combobox,.duet-theme-turva.sc-duet-combobox-h .duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox:hover a.sc-duet-combobox{color:white}.duet-combobox-list.sc-duet-combobox{position:absolute;top:calc(100% - 12px);height:0;overflow:hidden;background:white;border-radius:0 4px;box-shadow:0 2px 10px 0 rgba(0, 41, 77, 0.1);opacity:0}.duet-combobox-list.open.sc-duet-combobox{z-index:700;display:block;height:auto;opacity:1}.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox{max-height:200px;padding:0.75rem 0;margin:0;overflow-y:scroll;font-weight:600;list-style:none;cursor:pointer;scroll-behavior:smooth}.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox{padding:4px 0}.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox:not(.selected){padding-left:16px}.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox:not(.selected) .highlight.sc-duet-combobox{text-decoration:underline}.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.option.sc-duet-combobox .option-link.sc-duet-combobox{display:block;width:100%}.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.option.sc-duet-combobox .option-tags.sc-duet-combobox{float:right;padding-right:0.875rem;font-weight:400;color:#909599}.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.option-link.sc-duet-combobox{display:block;width:100%}.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.selected.sc-duet-combobox{padding-left:0;background:#cde5f1}.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.selected.option.sc-duet-combobox .option-icon.sc-duet-combobox{padding:0 8px 0 8px}.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.selected.option.sc-duet-combobox .option-tags.sc-duet-combobox{color:#909599}.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.active.sc-duet-combobox,.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox:focus,.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox:hover{color:white;background:#0077b3}.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.active.sc-duet-combobox .option-tags.sc-duet-combobox,.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox:focus .option-tags.sc-duet-combobox,.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox:hover .option-tags.sc-duet-combobox{color:white}.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.active.sc-duet-combobox a.sc-duet-combobox,.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox:focus a.sc-duet-combobox,.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox:hover a.sc-duet-combobox{color:white}';var DuetCombobox=function(){function t(t){var e=this;registerInstance(this,t);this.duetChange=createEvent(this,"duetChange",3);this.resizeObserver=new ResizeObserver(debounce((function(t){var o,i;if((t===null||t===void 0?void 0:t.length)===1){var s=(i=(o=t[0])===null||o===void 0?void 0:o.target)===null||i===void 0?void 0:i.getBoundingClientRect().width;e.listContainer.style.width="".concat(s+1,"px")}}),100));this.processedItems=null;this.inputWidth=0;this.inputValue="";this.selectionMsg="";this.listOpen=false;this.selectedItems=new Set;this.activeItem=undefined;this.accessibleLabelDefaults={en:{heading:"Select:",item:"{name}, ({current} of {total})",itemFiltered:"{name}, ({current} of {total}, {hiddenItems} filtered)"},fi:{heading:"Valitse:",item:"{name}, ({current}/{total})",itemFiltered:"{name}, ({current}/{total}, {hiddenItems} suodatettu)"},sv:{heading:"Välj:",item:"{name}, ({current} av {total})",itemFiltered:"{name}, ({current} av {total}, {hiddenItems} filtrerade)"}};this.accessibleLabels=getLocaleString(parsePossibleJSON(this.accessibleLabelDefaults),getLanguage());this.theme="";this.force=false;this.items=undefined;this.formatter=function(t){return t&&t.name?t.name:""};this.value=undefined}t.prototype.activeItemHandler=function(t){this.input.accessibleActiveDescendant=this.listOpen&&(t||t===0)?"active_item":""};t.prototype.handleDocumentClick=function(t){var e=this;var o=t.composedPath();var i=o.every((function(t){return t!==e.element}));if(i){this.updateInputText(true);this.listOpen=false}};t.prototype.formatItem=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.formatter(t)]}))}))};t.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};t.prototype.connectedCallback=function(){var t=this;this.items=this.processedItems=parsePossibleJSON(this.items);this.input=this.element.querySelector("duet-input");this.input.addEventListener("duetChange",this.updateInputValue.bind(this));this.input.addEventListener("click",(function(){t.inputValue.length?t.listOpen=true:t.listOpen=false}));this.element.addEventListener("keydown",this.handleInputKeyDownEvent.bind(this));this.input.accessibleAutocomplete="list";this.input.accessibleControls="duet-combobox-list-element"};t.prototype.disconnectedCallback=function(){var t=this;this.input.removeEventListener("duetChange",this.updateInputValue.bind(this));this.input.removeEventListener("click",(function(){return t.inputValue.length?t.listOpen=true:t.listOpen=false}));this.element.removeEventListener("keydown",this.handleInputKeyDownEvent.bind(this));this.listElement.removeEventListener("click",(function(t){t.stopPropagation()}));this.resizeObserver.disconnect()};t.prototype.componentDidLoad=function(){this.resizeObserver.observe(this.input);this.listElement.addEventListener("click",(function(t){t.stopPropagation()}))};t.prototype.onListClick=function(t,e){t.preventDefault();this.updateSelectedItems(e.id);this.listOpen=false;return this.listOpen};t.prototype.shouldListBeFiltered=function(){var t=this;if(this.selectedItems.size&&this.input.value===this.inputValue){var e=this.items.filter((function(e){return t.selectedItems.has(e.id)}));return!(this.formatter(e).toLowerCase()===this.input.value.toLowerCase())}return true};t.prototype.returnFilteredOrNonFiltered=function(){return this.processedItems?this.shouldListBeFiltered()?this.getFilteredItems():this.sortFilteredItems(this.processedItems):[]};t.prototype.updateSelectedItems=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.selectedItems.clear();if(this.selectedItems){if(this.selectedItems.has(t)){this.selectedItems.delete(t)}else{this.selectedItems.add(t)}}return[4,this.updateInputText()];case 1:e.sent();return[2]}}))}))};t.prototype.updateInputText=function(t){if(t===void 0){t=false}return __awaiter(this,void 0,void 0,(function(){var e,o,i;var s=this;return __generator(this,(function(c){switch(c.label){case 0:e=this.selectedItems.size===0?[]:this.items.filter((function(t){return s.selectedItems.has(t.id)}));if(!(this.selectedItems.size===1))return[3,3];this.input.value="";o=this.input;return[4,this.formatItem(e[0])];case 1:o.value=c.sent();this.input.scrollLeft=this.input.scrollWidth;this.activeItem=undefined;i=this;return[4,this.formatItem(e[0])];case 2:i.value=c.sent();this.duetChange.emit({value:e[0].value,item:e[0],component:"duet-combobox"});c.label=3;case 3:if(t&&this.selectedItems.size===0){if(this.force){this.inputValue="";this.input.value=""}this.activeItem=undefined}this.listOpen=false;return[2]}}))}))};t.prototype.updateInputValue=function(t){var e;this.inputValue=t.detail.value;this.listOpen=String(this.inputValue).length>0&&((e=this.getFilteredItems())===null||e===void 0?void 0:e.length)>0};t.prototype.handleInputKeyDownEvent=function(t){this.input.accessibleActiveDescendant=undefined;if(isEnterKey(t)){t.preventDefault();this.selectActiveItem();this.updateInputText(false);this.listOpen=false;return}if(isEscapeKey(t)||isTabKey(t)){this.updateInputText(true);this.listOpen=false;return}var e=this.activeItem;if(isArrowUpKey(t)){t.preventDefault();e=this.activeItem-1}else if(isArrowDownKey(t)){t.preventDefault();e=this.listOpen?this.activeItem+1:this.activeItem;this.listOpen=true}if(isArrowDownKey(t)||isArrowUpKey(t)){var o=this.shouldListBeFiltered()?this.getFilteredItems():this.processedItems;if(e<0||!e){e=0}if(e>=o.length){e=o.length-1}this.input.accessibleActiveDescendant="active_item";this.activeItem=e;this.scrollToActive()}this.announceActive();return};t.prototype.selectActiveItem=function(){if(this.activeItem===undefined){return}var t=this.returnFilteredOrNonFiltered();var e=t[this.activeItem];this.updateSelectedItems(e.id)};t.prototype.announceActive=function(t){if(!t){t=this.returnFilteredOrNonFiltered()}if(this.activeItem===undefined||this.activeItem===-1){return}var e=t[this.activeItem];this.selectionMsg=structuredClone(this.formatLabel(e,t.length,this.items.length))};t.prototype.scrollToActive=function(){var t=this.listElement.querySelector(".active");if(t){t.scrollIntoView({behavior:"smooth",block:"center"})}};t.prototype.formatLabel=function(t,e,o){if(!t||o===undefined){return""}var i=e===o?this.accessibleLabels.item:this.accessibleLabels.itemFiltered;return i.replace("{name}",String(t.name)).replace("{current}",String(this.activeItem+1)).replace("{total}",String(e)).replace("{hiddenItems}",String(o-e))};t.prototype.getFilteredItems=function(){var t=this;var e=this.processedItems.filter((function(e){var o,i,s,c;return((o=String(e.value))===null||o===void 0?void 0:o.toLowerCase().startsWith((i=t.inputValue)===null||i===void 0?void 0:i.toLowerCase()))||((s=String(e.name))===null||s===void 0?void 0:s.toLowerCase().startsWith((c=t.inputValue)===null||c===void 0?void 0:c.toLowerCase()))||t.selectedItems.has(e.id)}));return this.sortFilteredItems(e)};t.prototype.sortFilteredItems=function(t){var e=this;if(t.length>0){t.filter((function(t){return e.selectedItems.has(t.id)})).forEach((function(e){var o=t.indexOf(e);t.splice(o,1);t.unshift(e)}))}return t};t.prototype.render=function(){var t;var e=this;var o=this.returnFilteredOrNonFiltered();return h(Host,{role:"combobox","aria-expanded":this.listOpen?"true":"false","aria-owns":"duet-combobox-list-element","aria-haspopup":"listbox",class:(t={"duet-combobox":true},t["duet-theme-".concat(this.theme)]=true,t)},h("slot",null),h("div",{role:"list",class:{"duet-combobox-list":true,open:this.listOpen},ref:function(t){return e.listContainer=t}},h("ul",{class:{"duet-combobox-listbox-open":this.listOpen,"duet-combobox-listbox":true},role:"listbox",ref:function(t){return e.listElement=t},id:"duet-combobox-list-element"},o.map((function(t,i){return h(DuetComboBoxSelect,{item:t,active:i===e.activeItem,selected:e.selectedItems.has(t.id),search:e.inputValue,total:o.length,clickHandler:function(o){return e.onListClick(o,t)},label:e.formatLabel(t,e.returnFilteredOrNonFiltered().length,e.items.length)})})))))};Object.defineProperty(t.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{activeItem:["activeItemHandler"]}},enumerable:false,configurable:true});return t}();DuetCombobox.style=duetComboboxCss;export{DuetCombobox as duet_combobox};
4
+ */import{h,F as Fragment,r as registerInstance,c as createEvent,H as Host,g as getElement}from"./index-ab069e8d.js";import{i as inheritGlobalTheme}from"./themeable-component-cb76be7c.js";import{d as debounce}from"./js-utils-fa98b8cd.js";import{n as isEnterKey,f as isEscapeKey,o as isTabKey,b as isArrowUpKey,c as isArrowDownKey}from"./keyboard-utils-88ea1007.js";import{g as getLocaleString,a as getLanguage}from"./language-utils-bf701d37.js";import{p as parsePossibleJSON}from"./string-utils-5954f458.js";var SelectSingle=function(t){var e=t.item,o=t.search,i=o===void 0?"":o,s=t.selected;var c=i!==""?new RegExp("("+i.split(" ").join("|")+")","gi"):undefined;return h(Fragment,null,s&&h("duet-icon",{class:"option-icon",name:"messaging-checked",size:"xx-small",margin:"none"}),c?h("span",{class:"option-container","aria-hidden":"true"},h("span",{innerHTML:e.name.replace(c,'<span class="highlight">$&</span>')})):e.name,e.tags&&h("span",{class:"option-tags"},e.tags.join(", ")))};var DuetComboBoxSelect=function(t){var e=t.item,o=t.active,i=t.total,s=t.selected,c=t.label,n=c===void 0?undefined:c,u=t.clickHandler,r=u===void 0?function(t){t.preventDefault()}:u,b=t.keyHandler,l=b===void 0?function(t){t.preventDefault()}:b,a=t.search;return h("li",{class:{"list-item":true,option:true,active:o,selected:s},id:o?"active_item":"","data-index":e.id,"aria-selected":o?"true":undefined,"aria-current":s?"true":undefined,role:"option","aria-label":n||"".concat(e.name,", (").concat(e.id+1," of ").concat(i,")")},h("a",{tabindex:"-1",onClick:function(t){return r(t)},onKeyUp:function(t){return l(t)},class:"option-link","aria-label":n||"".concat(e.name,", (").concat(e.id+1," of ").concat(i,")"),"aria-hidden":"true"},h(SelectSingle,{item:e,search:a,selected:s})))};var duetComboboxCss='.sc-duet-combobox-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;width:auto;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#00294d}.sc-duet-combobox-h a.sc-duet-combobox{color:#00294d;transition:none}.duet-theme-turva.sc-duet-combobox-h{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}.duet-theme-turva.sc-duet-combobox-h a.sc-duet-combobox{color:#171c3a}.duet-theme-turva.sc-duet-combobox-h .duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.option.sc-duet-combobox .option-tags.sc-duet-combobox{color:#747475}.duet-theme-turva.sc-duet-combobox-h .duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.option.selected.sc-duet-combobox{background:#f4cfd6}.duet-theme-turva.sc-duet-combobox-h .duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.active.sc-duet-combobox,.duet-theme-turva.sc-duet-combobox-h .duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox:focus,.duet-theme-turva.sc-duet-combobox-h .duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox:hover{color:white;background:#c60c30}.duet-theme-turva.sc-duet-combobox-h .duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.active.sc-duet-combobox .option-tags.sc-duet-combobox,.duet-theme-turva.sc-duet-combobox-h .duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox:focus .option-tags.sc-duet-combobox,.duet-theme-turva.sc-duet-combobox-h .duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox:hover .option-tags.sc-duet-combobox{color:white}.duet-theme-turva.sc-duet-combobox-h .duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.active.sc-duet-combobox a.sc-duet-combobox,.duet-theme-turva.sc-duet-combobox-h .duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox:focus a.sc-duet-combobox,.duet-theme-turva.sc-duet-combobox-h .duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox:hover a.sc-duet-combobox{color:white}.duet-combobox-list.sc-duet-combobox{position:absolute;top:calc(100% - 12px);height:0;overflow:hidden;background:white;border-radius:0 4px;box-shadow:0 2px 10px 0 rgba(0, 41, 77, 0.1);opacity:0}.duet-combobox-list.open.sc-duet-combobox{z-index:700;display:block;height:auto;opacity:1}.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox{max-height:200px;padding:0.75rem 0;margin:0;overflow-y:scroll;font-weight:600;list-style:none;cursor:pointer;scroll-behavior:smooth}.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox{padding:4px 0}.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox:not(.selected){padding-left:16px}.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox:not(.selected) .highlight.sc-duet-combobox{text-decoration:underline}.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.option.sc-duet-combobox .option-link.sc-duet-combobox{display:block;width:100%}.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.option.sc-duet-combobox .option-tags.sc-duet-combobox{float:right;padding-right:0.875rem;font-weight:400;color:#909599}.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.option-link.sc-duet-combobox{display:block;width:100%}.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.selected.sc-duet-combobox{padding-left:0;background:#cde5f1}.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.selected.option.sc-duet-combobox .option-icon.sc-duet-combobox{padding:0 8px 0 8px}.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.selected.option.sc-duet-combobox .option-tags.sc-duet-combobox{color:#909599}.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.active.sc-duet-combobox,.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox:focus,.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox:hover{color:white;background:#0077b3}.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.active.sc-duet-combobox .option-tags.sc-duet-combobox,.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox:focus .option-tags.sc-duet-combobox,.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox:hover .option-tags.sc-duet-combobox{color:white}.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.active.sc-duet-combobox a.sc-duet-combobox,.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox:focus a.sc-duet-combobox,.duet-combobox-list.sc-duet-combobox .duet-combobox-listbox.sc-duet-combobox .list-item.sc-duet-combobox:hover a.sc-duet-combobox{color:white}';var DuetCombobox=function(){function t(t){var e=this;registerInstance(this,t);this.duetChange=createEvent(this,"duetChange",3);this.resizeObserver=new ResizeObserver(debounce((function(t){var o,i;if((t===null||t===void 0?void 0:t.length)===1){var s=(i=(o=t[0])===null||o===void 0?void 0:o.target)===null||i===void 0?void 0:i.getBoundingClientRect().width;e.listContainer.style.width="".concat(s+1,"px")}}),100));this.processedItems=null;this.inputWidth=0;this.inputValue="";this.selectionMsg="";this.listOpen=false;this.selectedItems=new Set;this.activeItem=undefined;this.accessibleLabelDefaults={en:{heading:"Select:",item:"{name}, ({current} of {total})",itemFiltered:"{name}, ({current} of {total}, {hiddenItems} filtered)"},fi:{heading:"Valitse:",item:"{name}, ({current}/{total})",itemFiltered:"{name}, ({current}/{total}, {hiddenItems} suodatettu)"},sv:{heading:"Välj:",item:"{name}, ({current} av {total})",itemFiltered:"{name}, ({current} av {total}, {hiddenItems} filtrerade)"}};this.accessibleLabels=getLocaleString(parsePossibleJSON(this.accessibleLabelDefaults),getLanguage());this.theme="";this.force=false;this.items=undefined;this.formatter=function(t){return t&&t.name?t.name:""};this.value=undefined}t.prototype.activeItemHandler=function(t){this.input.accessibleActiveDescendant=this.listOpen&&(t||t===0)?"active_item":""};t.prototype.handleDocumentClick=function(t){var e=this;var o=t.composedPath();var i=o.every((function(t){return t!==e.element}));if(i){this.updateInputText(true);this.listOpen=false}};t.prototype.formatItem=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.formatter(t)]}))}))};t.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};t.prototype.connectedCallback=function(){var t=this;this.items=this.processedItems=parsePossibleJSON(this.items);this.input=this.element.querySelector("duet-input");this.input.addEventListener("duetChange",this.updateInputValue.bind(this));this.input.addEventListener("click",(function(){t.inputValue.length?t.listOpen=true:t.listOpen=false}));this.element.addEventListener("keydown",this.handleInputKeyDownEvent.bind(this));this.input.accessibleAutocomplete="list";this.input.accessibleControls="duet-combobox-list-element"};t.prototype.disconnectedCallback=function(){var t=this;this.input.removeEventListener("duetChange",this.updateInputValue.bind(this));this.input.removeEventListener("click",(function(){return t.inputValue.length?t.listOpen=true:t.listOpen=false}));this.element.removeEventListener("keydown",this.handleInputKeyDownEvent.bind(this));this.listElement.removeEventListener("click",(function(t){t.stopPropagation()}));this.resizeObserver.disconnect()};t.prototype.componentDidLoad=function(){this.resizeObserver.observe(this.input);this.listElement.addEventListener("click",(function(t){t.stopPropagation()}))};t.prototype.onListClick=function(t,e){t.preventDefault();this.updateSelectedItems(e.id);this.listOpen=false;return this.listOpen};t.prototype.shouldListBeFiltered=function(){var t=this;if(this.selectedItems.size&&this.input.value===this.inputValue){var e=this.items.filter((function(e){return t.selectedItems.has(e.id)}));return!(this.formatter(e).toLowerCase()===this.input.value.toLowerCase())}return true};t.prototype.returnFilteredOrNonFiltered=function(){return this.processedItems?this.shouldListBeFiltered()?this.getFilteredItems():this.sortFilteredItems(this.processedItems):[]};t.prototype.updateSelectedItems=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.selectedItems.clear();if(this.selectedItems){if(this.selectedItems.has(t)){this.selectedItems.delete(t)}else{this.selectedItems.add(t)}}return[4,this.updateInputText()];case 1:e.sent();return[2]}}))}))};t.prototype.updateInputText=function(t){if(t===void 0){t=false}return __awaiter(this,void 0,void 0,(function(){var e,o,i;var s=this;return __generator(this,(function(c){switch(c.label){case 0:e=this.selectedItems.size===0?[]:this.items.filter((function(t){return s.selectedItems.has(t.id)}));if(!(this.selectedItems.size===1))return[3,3];this.input.value="";o=this.input;return[4,this.formatItem(e[0])];case 1:o.value=c.sent();this.input.scrollLeft=this.input.scrollWidth;this.activeItem=undefined;i=this;return[4,this.formatItem(e[0])];case 2:i.value=c.sent();this.duetChange.emit({value:e[0].value,item:e[0],component:"duet-combobox"});c.label=3;case 3:if(t&&this.selectedItems.size===0){if(this.force){this.inputValue="";this.input.value=""}this.activeItem=undefined}this.listOpen=false;return[2]}}))}))};t.prototype.updateInputValue=function(t){var e;this.inputValue=t.detail.value;this.listOpen=String(this.inputValue).length>0&&((e=this.getFilteredItems())===null||e===void 0?void 0:e.length)>0};t.prototype.handleInputKeyDownEvent=function(t){this.input.accessibleActiveDescendant=undefined;if(isEnterKey(t)){t.preventDefault();this.selectActiveItem();this.updateInputText(false);this.listOpen=false;return}if(isEscapeKey(t)||isTabKey(t)){this.updateInputText(true);this.listOpen=false;return}var e=this.activeItem;if(isArrowUpKey(t)){t.preventDefault();e=this.activeItem-1}else if(isArrowDownKey(t)){t.preventDefault();e=this.listOpen?this.activeItem+1:this.activeItem;this.listOpen=true}if(isArrowDownKey(t)||isArrowUpKey(t)){var o=this.shouldListBeFiltered()?this.getFilteredItems():this.processedItems;if(e<0||!e){e=0}if(e>=o.length){e=o.length-1}this.input.accessibleActiveDescendant="active_item";this.activeItem=e;this.scrollToActive()}this.announceActive();return};t.prototype.selectActiveItem=function(){if(this.activeItem===undefined){return}var t=this.returnFilteredOrNonFiltered();var e=t[this.activeItem];this.updateSelectedItems(e.id)};t.prototype.announceActive=function(t){if(!t){t=this.returnFilteredOrNonFiltered()}if(this.activeItem===undefined||this.activeItem===-1){return}var e=t[this.activeItem];this.selectionMsg=structuredClone(this.formatLabel(e,t.length,this.items.length))};t.prototype.scrollToActive=function(){var t=this.listElement.querySelector(".active");if(t){t.scrollIntoView({behavior:"smooth",block:"center"})}};t.prototype.formatLabel=function(t,e,o){if(!t||o===undefined){return""}var i=e===o?this.accessibleLabels.item:this.accessibleLabels.itemFiltered;return i.replace("{name}",String(t.name)).replace("{current}",String(this.activeItem+1)).replace("{total}",String(e)).replace("{hiddenItems}",String(o-e))};t.prototype.getFilteredItems=function(){var t=this;var e=this.processedItems.filter((function(e){var o,i,s,c;return((o=String(e.value))===null||o===void 0?void 0:o.toLowerCase().startsWith((i=t.inputValue)===null||i===void 0?void 0:i.toLowerCase()))||((s=String(e.name))===null||s===void 0?void 0:s.toLowerCase().startsWith((c=t.inputValue)===null||c===void 0?void 0:c.toLowerCase()))||t.selectedItems.has(e.id)}));return this.sortFilteredItems(e)};t.prototype.sortFilteredItems=function(t){var e=this;if(t.length>0){t.filter((function(t){return e.selectedItems.has(t.id)})).forEach((function(e){var o=t.indexOf(e);t.splice(o,1);t.unshift(e)}))}return t};t.prototype.render=function(){var t;var e=this;var o=this.returnFilteredOrNonFiltered();return h(Host,{role:"combobox","aria-expanded":this.listOpen?"true":"false","aria-owns":"duet-combobox-list-element","aria-haspopup":"listbox",class:(t={"duet-combobox":true},t["duet-theme-".concat(this.theme)]=true,t)},h("slot",null),h("div",{role:"list",class:{"duet-combobox-list":true,open:this.listOpen},ref:function(t){return e.listContainer=t}},h("ul",{class:{"duet-combobox-listbox-open":this.listOpen,"duet-combobox-listbox":true},role:"listbox",ref:function(t){return e.listElement=t},id:"duet-combobox-list-element"},o.map((function(t,i){return h(DuetComboBoxSelect,{item:t,active:i===e.activeItem,selected:e.selectedItems.has(t.id),search:e.inputValue,total:o.length,clickHandler:function(o){return e.onListClick(o,t)},label:e.formatLabel(t,e.returnFilteredOrNonFiltered().length,e.items.length)})})))))};Object.defineProperty(t.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{activeItem:["activeItemHandler"]}},enumerable:false,configurable:true});return t}();DuetCombobox.style=duetComboboxCss;export{DuetCombobox as duet_combobox};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-55984aa4.js";import{i as inheritGlobalTheme}from"./themeable-component-cb76be7c.js";var duetCookieConsentCss='*,*::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;position:fixed;right:0;bottom:0;left:0;z-index:950;display:block;width:100%;box-shadow:0 2px 20px 0 rgba(0, 0, 0, 0.2)}@media (min-width: 48em){:host{right:28px;bottom:28px;left:auto;width:25rem}}: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}.duet-cookie-consent{padding:20px;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;color:white !important;background-color:rgba(0, 21, 39, 0.9)}@supports (-webkit-backdrop-filter: none) or (backdrop-filter: none){.duet-cookie-consent{background:rgba(0, 21, 39, 0.8);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}}.duet-cookie-consent.duet-theme-turva{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";background-color:rgba(12, 14, 29, 0.9)}@supports (-webkit-backdrop-filter: none) or (backdrop-filter: none){.duet-cookie-consent.duet-theme-turva{background:rgba(12, 14, 29, 0.8)}}@media (min-width: 48em){.duet-cookie-consent{padding:20px;border-radius:4px}}.duet-cookie-consent-content{display:flex;align-items:center;max-width:1110px;margin:0 auto}.duet-cookie-consent-content .expand{flex:1}::slotted(a){font-weight:600;color:white !important;text-decoration:underline;white-space:nowrap}::slotted(a[target=_blank]){padding-right:16px;background:url("data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjZmZmIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwLjUgMmExLjUgMS41IDAgMDEuMTQgM0gzLjc1Yy0uMzggMC0uNy4yOC0uNzQuNjVsLS4wMS4xdjE0LjVjMCAuMzguMjguNy42NS43NGwuMS4wMWgxNC41Yy4zOCAwIC43LS4yOC43NC0uNjVsLjAxLS4xdi02Ljg5YTEuNSAxLjUgMCAwMTMgMHY2Ljg5QTMuNzUgMy43NSAwIDAxMTguMjUgMjRIMy43NUEzLjc1IDMuNzUgMCAwMTAgMjAuMjVWNS43NUEzLjc1IDMuNzUgMCAwMTMuNzUgMnptMTItMmMuNzggMCAxLjQyLjYgMS41IDEuMzZWNy41YTEuNSAxLjUgMCAwMS0zIC4xNFY1LjEybC01LjQ0IDUuNDRhMS41IDEuNSAwIDAxLTIuMjItMmwuMS0uMTJMMTguODggM0gxNi41QTEuNSAxLjUgMCAwMTE1IDEuNjRWMS41YzAtLjc4LjYtMS40MiAxLjM2LTEuNWguMTR6Ii8+PC9zdmc+") no-repeat right 50%;background-size:12px 10px}::slotted(a:focus){outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva ::slotted(a:focus){outline:0;box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}';var DuetCookieConsent=function(){function e(e){var t=this;registerInstance(this,e);this.duetCookieConsent=createEvent(this,"duetCookieConsent",7);this.handleClick=function(e){e.preventDefault();t.duetCookieConsent.emit({component:"duet-cookie-consent"})};this.accessibleLabel="Hyväksyn evästeiden käytön";this.theme=""}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};e.prototype.render=function(){return h(Host,{tabindex:"0"},h("div",{class:{"duet-cookie-consent":true,"duet-theme-turva":this.theme==="turva"}},h("div",{class:"duet-cookie-consent-content"},h("div",{class:"expand"},h("slot",null)),h("duet-spacer",{size:"large",direction:"horizontal"}),h("div",null,h("duet-button",{variation:"negative",size:"small",onClick:this.handleClick,margin:"none","aria-label":this.accessibleLabel,theme:this.theme},"OK")))))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetCookieConsent.style=duetCookieConsentCss;export{DuetCookieConsent as duet_cookie_consent};
4
+ import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-ab069e8d.js";import{i as inheritGlobalTheme}from"./themeable-component-cb76be7c.js";var duetCookieConsentCss='*,*::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;position:fixed;right:0;bottom:0;left:0;z-index:950;display:block;width:100%;box-shadow:0 2px 20px 0 rgba(0, 0, 0, 0.2)}@media (min-width: 48em){:host{right:28px;bottom:28px;left:auto;width:25rem}}: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}.duet-cookie-consent{padding:20px;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;color:white !important;background-color:rgba(0, 21, 39, 0.9)}@supports (-webkit-backdrop-filter: none) or (backdrop-filter: none){.duet-cookie-consent{background:rgba(0, 21, 39, 0.8);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}}.duet-cookie-consent.duet-theme-turva{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";background-color:rgba(12, 14, 29, 0.9)}@supports (-webkit-backdrop-filter: none) or (backdrop-filter: none){.duet-cookie-consent.duet-theme-turva{background:rgba(12, 14, 29, 0.8)}}@media (min-width: 48em){.duet-cookie-consent{padding:20px;border-radius:4px}}.duet-cookie-consent-content{display:flex;align-items:center;max-width:1110px;margin:0 auto}.duet-cookie-consent-content .expand{flex:1}::slotted(a){font-weight:600;color:white !important;text-decoration:underline;white-space:nowrap}::slotted(a[target=_blank]){padding-right:16px;background:url("data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjZmZmIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwLjUgMmExLjUgMS41IDAgMDEuMTQgM0gzLjc1Yy0uMzggMC0uNy4yOC0uNzQuNjVsLS4wMS4xdjE0LjVjMCAuMzguMjguNy42NS43NGwuMS4wMWgxNC41Yy4zOCAwIC43LS4yOC43NC0uNjVsLjAxLS4xdi02Ljg5YTEuNSAxLjUgMCAwMTMgMHY2Ljg5QTMuNzUgMy43NSAwIDAxMTguMjUgMjRIMy43NUEzLjc1IDMuNzUgMCAwMTAgMjAuMjVWNS43NUEzLjc1IDMuNzUgMCAwMTMuNzUgMnptMTItMmMuNzggMCAxLjQyLjYgMS41IDEuMzZWNy41YTEuNSAxLjUgMCAwMS0zIC4xNFY1LjEybC01LjQ0IDUuNDRhMS41IDEuNSAwIDAxLTIuMjItMmwuMS0uMTJMMTguODggM0gxNi41QTEuNSAxLjUgMCAwMTE1IDEuNjRWMS41YzAtLjc4LjYtMS40MiAxLjM2LTEuNWguMTR6Ii8+PC9zdmc+") no-repeat right 50%;background-size:12px 10px}::slotted(a:focus){outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva ::slotted(a:focus){outline:0;box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}';var DuetCookieConsent=function(){function e(e){var t=this;registerInstance(this,e);this.duetCookieConsent=createEvent(this,"duetCookieConsent",7);this.handleClick=function(e){e.preventDefault();t.duetCookieConsent.emit({component:"duet-cookie-consent"})};this.accessibleLabel="Hyväksyn evästeiden käytön";this.theme=""}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};e.prototype.render=function(){return h(Host,{tabindex:"0"},h("div",{class:{"duet-cookie-consent":true,"duet-theme-turva":this.theme==="turva"}},h("div",{class:"duet-cookie-consent-content"},h("div",{class:"expand"},h("slot",null)),h("duet-spacer",{size:"large",direction:"horizontal"}),h("div",null,h("duet-button",{variation:"negative",size:"small",onClick:this.handleClick,margin:"none","aria-label":this.accessibleLabel,theme:this.theme},"OK")))))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetCookieConsent.style=duetCookieConsentCss;export{DuetCookieConsent as duet_cookie_consent};
@@ -1,4 +1,4 @@
1
1
  var __awaiter=this&&this.__awaiter||function(e,t,a,i){function n(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,r){function o(e){try{s(i.next(e))}catch(t){r(t)}}function d(e){try{s(i["throw"](e))}catch(t){r(t)}}function s(e){e.done?a(e.value):n(e.value).then(o,d)}s((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var a={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,n,r,o;return o={next:d(0),throw:d(1),return:d(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function d(e){return function(t){return s([e,t])}}function s(o){if(i)throw new TypeError("Generator is already executing.");while(a)try{if(i=1,n&&(r=o[0]&2?n["return"]:o[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;if(n=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:a.label++;return{value:o[1],done:false};case 5:a.label++;n=o[1];o=[0];continue;case 7:o=a.ops.pop();a.trys.pop();continue;default:if(!(r=a.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){a=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(o[0]===6&&a.label<r[1]){a.label=r[1];r=o;break}if(r&&a.label<r[2]){a.label=r[2];a.ops.push(o);break}if(r[2])a.ops.pop();a.trys.pop();continue}o=t.call(e,a)}catch(d){o=[6,d];n=0}finally{i=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Built with Duet Design System
4
- */import{h,r as registerInstance,c as createEvent,H as Host,g as getElement}from"./index-55984aa4.js";import{i as inheritGlobalTheme}from"./themeable-component-cb76be7c.js";import{c as createID}from"./create-id-981107da.js";import{F as FocusGuard}from"./focus-utils-36fda5f1.js";import{a as getLanguage,g as getLocaleString}from"./language-utils-bf701d37.js";import"./string-utils-5954f458.js";var formatOptionsShort={day:"numeric",month:"long"};var formatOptionsLong={day:"numeric",month:"long",year:"numeric"};var i18n={fi:{buttonLabel:"Valitse päivämäärä",prevMonthLabel:"Edellinen kuukausi",nextMonthLabel:"Seuraava kuukausi",monthSelectLabel:"Kuukausi",yearSelectLabel:"Vuosi",closeLabel:"Sulje ikkuna",selected:"Valittu päivämäärä on",keyboardInstruction:"Voit navigoida päivämääriä nuolinäppäimillä",dayLabels:["Maanantai","Tiistai","Keskiviikko","Torstai","Perjantai","Lauantai","Sunnuntai"],monthLabels:["Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kesäkuu","Heinäkuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"],monthLabelsShort:["Tammi","Helmi","Maalis","Huhti","Touko","Kesä","Heinä","Elo","Syys","Loka","Marras","Joulu"],formatterShort:new Intl.DateTimeFormat("fi-FI",formatOptionsShort),formatterLong:new Intl.DateTimeFormat("fi-FI",formatOptionsLong)},en:{buttonLabel:"Choose date",prevMonthLabel:"Previous month",nextMonthLabel:"Next month",monthSelectLabel:"Month",yearSelectLabel:"Year",closeLabel:"Close window",selected:"Selected date is",keyboardInstruction:"You can use arrow keys to navigate dates",dayLabels:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],monthLabels:["January","February","March","April","May","June","July","August","September","October","November","December"],monthLabelsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],formatterShort:new Intl.DateTimeFormat("en-GB",formatOptionsShort),formatterLong:new Intl.DateTimeFormat("en-GB",formatOptionsLong)},sv:{buttonLabel:"Välj datum",prevMonthLabel:"Föregående månad",nextMonthLabel:"Nästa månad",monthSelectLabel:"Månad",yearSelectLabel:"År",closeLabel:"Stäng fönstret",selected:"Valt datum är",keyboardInstruction:"Använd piltangenterna för att navigera i kalender",dayLabels:["Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag","Söndag"],monthLabels:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],monthLabelsShort:["Jan","Feb","Mars","April","Maj","Juni","Juli","Aug","Sep","Okt","Nov","Dec"],formatterShort:new Intl.DateTimeFormat("sv-SE",formatOptionsShort),formatterLong:new Intl.DateTimeFormat("sv-SE",formatOptionsLong)}};var formDate={title:"form-date",tags:"form date calendar date picker",svg:'<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M2.25 24A2.252 2.252 0 0 1 0 21.75V5.25A2.252 2.252 0 0 1 2.25 3H6V.75a.75.75 0 0 1 1.5 0V3h9V.75a.75.75 0 0 1 1.5 0V3h3.75A2.252 2.252 0 0 1 24 5.25v16.5A2.252 2.252 0 0 1 21.75 24zm-.75-2.25c0 .414.336.75.75.75h19.5a.75.75 0 0 0 .75-.75V10.5h-21zM22.5 9V5.25a.75.75 0 0 0-.75-.75H18V6a.75.75 0 0 1-1.5 0V4.5h-9V6A.75.75 0 0 1 6 6V4.5H2.25a.75.75 0 0 0-.75.75V9z"/><circle cx="5.625" cy="13.875" r="1.125"/><circle cx="5.625" cy="19.125" r="1.125"/><circle cx="12" cy="13.875" r="1.125"/><circle cx="12" cy="19.125" r="1.125"/><circle cx="18.375" cy="13.875" r="1.125"/><path d="M18.375 20.25c-.62 0-1.125-.505-1.125-1.125a1.127 1.127 0 0 1 1.171-1.122l.027.003a1.118 1.118 0 0 1 1.052 1.12c0 .619-.505 1.124-1.125 1.124z"/></svg>'};var DatePickerInput=function(e){var t=e.onClick,a=e.placeholder,i=e.name,n=e.inputLabel,r=e.value,o=e.valueAsDate,d=e.formattedValue,s=e.language,u=e.identifier,c=e.theme,l=e.disabled,p=e.error,f=e.role,m=e.required,b=e.tooltip,g=e.tooltipDirection,v=e.labelHidden,y=e.buttonRef,k=e.inputRef,D=e.onInput,x=e.onBlur,w=e.onFocus,S=e.accessibleActiveDescendant,M=e.accessibleControls,I=e.accessibleOwns,F=e.accessibleDescribedBy,O=e.echoPlaceholder,T=e.caption;var L=i18n[s],A=L.buttonLabel,E=L.selected,Y=L.formatterLong;return h("div",{class:{"duet-theme-turva":c==="turva","duet-date-input":true}},h("duet-input",{label:n,value:d,placeholder:a,id:u,disabled:l,theme:c,error:p,role:f,required:m,tooltip:b,tooltipDirection:g,margin:"none",component:"date",labelHidden:v,accessibleAutocomplete:"none",onDuetInput:D,onDuetFocus:w,onDuetBlur:x,autoComplete:"off",disallowPattern:"[^0-9\\.\\-\\/]",expand:true,ref:k,accessibleActiveDescendant:S,accessibleControls:M,accessibleOwns:I,accessibleDescribedBy:F,echoPlaceholder:O,caption:T},h("button",{class:{"duet-date-button":true,"duet-no-label":v},onClick:t,disabled:l,ref:y,type:"button"},h("duet-icon",{icon:formDate.svg,margin:"none",size:"small",color:"currentColor"}),h("duet-visually-hidden",null,A,o&&h("span",null,", ",E," ",Y.format(o))))),h("input",{type:"hidden",name:i,value:r}))};var DATE_FORMAT=/^(\d{1,2})[\.\-\/](\d{1,2})[\.\-\/](\d{4})$/;var ISO_DATE_FORMAT=/^(\d{4})-(\d{2})-(\d{2})$/;var DATE_OUTPUT_FORMAT="dd.mm.yyyy";var DATE_ISO_OUTPUT_FORMAT="YYYY-MM-DD";function createDate(e,t,a){var i=parseInt(a,10);var n=parseInt(t,10);var r=parseInt(e,10);var o=Number.isInteger(r)&&Number.isInteger(n)&&Number.isInteger(i)&&n>0&&n<=12&&i>0&&i<=31&&r>0;if(o){return new Date(r,n-1,i)}}function parseDate(e){if(!e){return}var t=e.match(DATE_FORMAT);if(t){return createDate(t[3],t[2],t[1])}}function parseISODate(e){if(!e){return}var t=e.match(ISO_DATE_FORMAT);if(t){return createDate(t[1],t[2],t[3])}}function formatDate(e,t){if(!e){return""}var a=e.getDate().toString(10);var i=(e.getMonth()+1).toString(10);var n=e.getFullYear().toString(10);if(e.getDate()<10){a="0".concat(a)}if(e.getMonth()<9){i="0".concat(i)}return t.replace(/MM/i,i).replace(/YYYY/i,n).replace(/DD/i,a)}function printDate(e){return formatDate(e,DATE_OUTPUT_FORMAT)}function printISODate(e){return formatDate(e,DATE_ISO_OUTPUT_FORMAT)}function isEqual(e,t){if(e==null||t==null){return false}return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function addDays(e,t){var a=new Date(e);a.setDate(a.getDate()+t);return a}function startOfWeek(e,t){if(t===void 0){t=1}var a=new Date(e);var i=a.getDay();var n=(i<t?7:0)+i-t;a.setDate(a.getDate()-n);return a}function endOfWeek(e,t){if(t===void 0){t=1}var a=new Date(e);var i=a.getDay();var n=(i<t?-7:0)+6-(i-t);a.setDate(a.getDate()+n);return a}function startOfMonth(e){return new Date(e.getFullYear(),e.getMonth(),1)}function endOfMonth(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function setMonth(e,t){var a=new Date(e);a.setMonth(t);return a}function setYear(e,t){var a=new Date(e);a.setFullYear(t);return a}function inRange(e,t,a){return clamp(e,t,a)===e}function clamp(e,t,a){var i=e.getTime();if(t&&t instanceof Date&&i<t.getTime()){return t}if(a&&a instanceof Date&&i>a.getTime()){return a}return e}function getDaysInRange(e,t){var a=[];var i=e;while(!isEqual(i,t)){a.push(i);i=addDays(i,1)}a.push(i);return a}function getViewOfMonth(e,t){if(t===void 0){t=1}var a=startOfWeek(startOfMonth(e),t);var i=endOfWeek(endOfMonth(e),t);return getDaysInRange(a,i)}var DatePickerDay=function(e){var t=e.focusedDay,a=e.today,i=e.day,n=e.language,r=e.onDaySelect,o=e.onKeyboardNavigation,d=e.ref,s=e.inRange,u=e.isSelected;var c=isEqual(i,a);var l=isEqual(i,t);var p=i.getMonth()!==t.getMonth();var f=!s;var m=i18n[n].formatterShort;function b(e){r(e,i)}return h("button",{class:{"duet-date-table-button":true,outside:f,disabled:p,today:c},tabIndex:l?0:-1,onClick:b,onKeyDown:o,"aria-disabled":f||p,"aria-pressed":u?"true":"false",type:"button",ref:d},h("span",{"aria-hidden":"true"},i.getDate()),h("duet-visually-hidden",null,m.format(i)))};function range(e,t){var a=[];for(var i=e;i<=t;i++){a.push(i)}return a}function chunk(e,t){var a=[];for(var i=0;i<e.length;i+=t){a.push(e.slice(i,i+t))}return a}function parseShortcut(e){var t;var a=e.trim().split("+");var i=a.pop();return[((t=a[0])===null||t===void 0?void 0:t.toLowerCase())==="shift",i]}function createShortcuts(e){var t=Object.keys(e).map((function(t){return[parseShortcut(t),e[t]]}));return function e(a){if(!(a instanceof KeyboardEvent)){return}var i=t.find((function(e){var t=e[0],i=t[0],n=t[1];return(n.toUpperCase()===a.key.toUpperCase()||n===a.code)&&i===a.shiftKey}));if(i){i[1](a);a.preventDefault()}}}var DatePickerMonth=function(e){var t=e.selectedDate,a=e.focusedDate,i=e.labelledById,n=e.theme,r=e.language,o=e.min,d=e.max,s=e.onDateSelect,u=e.onKeyboardNavigation,c=e.focusedDayRef,l=e.onFocusEnter,p=e.onFocusExit;var f=i18n[r].dayLabels;var m=new Date;var b=getViewOfMonth(a);function g(e){var t=e.currentTarget;var a=e.relatedTarget;if(a&&!t.contains(a)){p(e)}}return h("table",{class:{"duet-date-table":true,"duet-theme-turva":n==="turva"},"aria-labelledby":i,onFocusin:l,onFocusout:g},h("thead",null,h("tr",null,f.map((function(e){return h("th",{scope:"col"},h("span",{"aria-hidden":"true"},e.substr(0,2)),h("duet-visually-hidden",null,e))})))),h("tbody",null,chunk(b,7).map((function(e){return h("tr",{class:"duet-date-table-row"},e.map((function(e){return h("td",{class:"duet-date-table-cell"},h(DatePickerDay,{day:e,today:m,language:r,focusedDay:a,inRange:inRange(e,o,d),isSelected:isEqual(e,t),onDaySelect:s,onKeyboardNavigation:u,ref:function(t){if(t&&isEqual(e,a)){c(t)}}}))})))}))))};var duetDatePickerCss='*.sc-duet-date-picker,*.sc-duet-date-picker::after,*.sc-duet-date-picker::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-date-picker-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;position:relative;display:inline-flex;width:100%;min-width:calc(33.333% - 8px);max-width:100%;text-align:left;vertical-align:top}.sc-duet-date-picker-h:last-child,.sc-duet-date-picker-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-date-picker-h{width:calc(50% - 16px - 3px)}}.duet-expand.sc-duet-date-picker-h{width:100% !important}.duet-m-0.sc-duet-date-picker-h{margin:0 !important}.duet-date.sc-duet-date-picker{position:relative;width:100%}.duet-date.sc-duet-date-picker button.sc-duet-date-picker,.duet-date-dialog.sc-duet-date-picker button.sc-duet-date-picker{max-width:initial !important;min-height:initial !important;padding:0 !important;margin:0 !important;transition:initial}.duet-date-button.sc-duet-date-picker{-webkit-user-select:none;user-select:none;position:absolute;top:1px;right:1px;z-index:200;display:flex;align-items:center;justify-content:center;width:48px;height:calc(100% - 2px);color:#00294d;cursor:pointer;background:transparent !important;border-left:1px solid #cfd2d4 !important;border-radius:0 4px 4px 0 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker{color:#171c3a;border-color:#cfcfd1}.duet-date-button.sc-duet-date-picker::before{position:absolute;top:0;left:-6px;width:6px;height:100%;content:"";background:linear-gradient(to left, rgba(207, 210, 212, 0.2) 0%, rgba(207, 210, 212, 0.2) 1px, rgba(207, 210, 212, 0.1) 1px, rgba(207, 210, 212, 0) 100%)}.duet-date-button.sc-duet-date-picker:disabled{pointer-events:none;cursor:default;background:#f5f8fa !important;border:0 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:disabled{background:#f5f5f7 !important}.duet-date-button.sc-duet-date-picker:disabled::before{display:none}.duet-date-button.sc-duet-date-picker:disabled duet-icon.sc-duet-date-picker{opacity:0.4}.duet-date-button.sc-duet-date-picker duet-icon.sc-duet-date-picker{transform:translateY(-1px)}.duet-date-button.sc-duet-date-picker:active duet-icon.sc-duet-date-picker{transform:translateY(0)}.duet-date-button.sc-duet-date-picker:focus{color:#0077b3;border-color:transparent;outline:0;box-shadow:0 0 0 2px #0077b3}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:focus{color:#171c3a;box-shadow:0 0 0 2px #171c3a}.duet-date-dialog.sc-duet-date-picker{position:absolute;top:100%;left:0;z-index:900;display:flex;width:100%;visibility:hidden;opacity:0;transition:transform 300ms ease, opacity 300ms ease, visibility 300ms ease;transform:scale(0.96) translateZ(0) translateY(-20px);transform-origin:top right}@media (min-width: 36em){.duet-date-dialog.left.sc-duet-date-picker{right:0;left:auto;width:auto}}@media (max-width: 35.9375em){.duet-date-dialog.sc-duet-date-picker{position:fixed;top:0;right:0;bottom:0;background:rgba(0, 41, 77, 0.75);transition:opacity 400ms ease, visibility 400ms ease;transform:translateZ(0);transform-origin:bottom center}.duet-date-dialog.duet-theme-turva.sc-duet-date-picker{background:rgba(23, 28, 58, 0.75)}}.duet-date-dialog.active.sc-duet-date-picker{visibility:visible;opacity:1;transition-property:transform, opacity;transform:scale(1.0001) translateZ(0) translateY(0)}@media (min-width: 36em){.duet-date-dialog.error.sc-duet-date-picker{top:calc(100% - 28px);margin-top:4px}}.duet-date-dialog-wrapper.sc-duet-date-picker{position:relative;z-index:600;width:100%;min-width:290px;max-width:310px;padding:16px 16px 20px;margin-top:8px;margin-left:auto;background:white;border:1px solid #e1e3e6;border-radius:4px;box-shadow:0 4px 10px 0 rgba(0, 41, 77, 0.15);transform:none}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-wrapper.sc-duet-date-picker{border-color:#e4e4e6}@media (max-width: 35.9375em){.duet-date-dialog-wrapper.sc-duet-date-picker{position:absolute;bottom:0;left:0;z-index:900;max-width:none;min-height:25em;padding:0 8% 20px;margin:0;visibility:hidden;border:0;border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px;opacity:0;transition:transform 400ms ease, opacity 400ms ease, visibility 400ms ease;transform:translateZ(0) translateY(100%)}.active.sc-duet-date-picker .duet-date-dialog-wrapper.sc-duet-date-picker{visibility:visible;opacity:1;transition-property:transform, opacity;transform:translateZ(0) translateY(0)}}.duet-date-table.sc-duet-date-picker{width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.25;color:#00294d;text-align:center;border-spacing:0;border-collapse:collapse}.duet-date-table.duet-theme-turva.sc-duet-date-picker{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}.duet-date-table.sc-duet-date-picker th.sc-duet-date-picker{padding-bottom:8px;font-size:0.75rem;font-weight:600;line-height:1.25;text-decoration:none;text-transform:uppercase;letter-spacing:1px}.duet-date-table.sc-duet-date-picker .duet-date-table-cell.sc-duet-date-picker{text-align:center}.duet-date-table-button.sc-duet-date-picker{position:relative;z-index:100;display:inline-block !important;width:36.9230769231px !important;height:36.9230769231px !important;min-height:initial !important;padding:0 !important;margin:0 !important;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:0.875rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:1.25 !important;color:#00294d !important;text-align:center;vertical-align:initial !important;cursor:pointer;background:transparent !important;border-radius:50% !important;transition:initial !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !important;color:#171c3a !important}.duet-date-table-button.sc-duet-date-picker:hover{background:#e6f2f8 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:hover{background:#f9e6ea !important}.duet-date-table-button.today.sc-duet-date-picker{z-index:200;color:#004d80 !important;background:#f3f9fc !important;box-shadow:0 0 0 1px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.today.sc-duet-date-picker{color:#940925 !important;background:#fcf3f4 !important;box-shadow:0 0 0 1px #c60c30 !important}.duet-date-table-button[aria-pressed=true].sc-duet-date-picker,.duet-date-table-button.sc-duet-date-picker:focus{color:white !important;background:#0077b3 !important;outline:0}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button[aria-pressed=true].sc-duet-date-picker,.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:focus{color:white !important;background:#c60c30 !important}.duet-date-table-button.sc-duet-date-picker:active{z-index:200;color:white !important;background:#0077b3 !important;box-shadow:0 0 5px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:active{color:white !important;background:#c60c30 !important;box-shadow:0 0 5px #c60c30 !important}.duet-date-table-button.sc-duet-date-picker:focus{z-index:200;box-shadow:0 0 5px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:focus{box-shadow:0 0 5px #c60c30 !important}.duet-date-table-button.disabled.sc-duet-date-picker{color:#909599 !important;cursor:default;background:transparent !important;box-shadow:none !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.disabled.sc-duet-date-picker{color:#747475 !important;background:transparent !important;box-shadow:none !important}.duet-date-table-button.outside.sc-duet-date-picker{color:#909599 !important;pointer-events:none;cursor:default;background:#f5f8fa !important;box-shadow:none;opacity:0.75}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.outside.sc-duet-date-picker{color:#747475;background:#f5f5f7;box-shadow:none}.duet-date-dialog-header.sc-duet-date-picker{margin-bottom:16px !important;display:flex;align-items:center;justify-content:space-between;width:100%}.duet-date-dialog-buttons.sc-duet-date-picker{white-space:nowrap}.duet-date-dialog-buttons.sc-duet-date-picker .sc-duet-date-picker::part(button){border:0}.duet-date-dialog-select.sc-duet-date-picker{position:relative;display:inline-flex;margin-top:4px}.duet-date-dialog-select.sc-duet-date-picker .duet-date-dialog-select-label.sc-duet-date-picker{position:relative;z-index:1;display:flex;align-items:center;width:100%;padding:0 8px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1.25rem;font-weight:600;line-height:1.25;color:#00294d;pointer-events:none;border-radius:4px}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-select.sc-duet-date-picker .duet-date-dialog-select-label.sc-duet-date-picker{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}.duet-date-dialog-select.sc-duet-date-picker span.sc-duet-date-picker{margin-right:4px}.duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker{position:absolute;top:0;left:0;z-index:2;width:100%;height:100%;font-size:1rem;cursor:pointer;opacity:0}.duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.sc-duet-date-picker{box-shadow:0 0 0 2px #0077b3}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.sc-duet-date-picker{box-shadow:0 0 0 2px #171c3a}.duet-date-dialog-mobile-header.sc-duet-date-picker{position:relative;display:flex;align-items:center;justify-content:space-between;width:120%;padding:12px 20px;margin-bottom:20px;margin-left:-10%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-bottom:1px solid #cfd2d4}@media (min-width: 36em){.duet-date-dialog-mobile-header.sc-duet-date-picker{position:absolute;top:-8px;right:-8px;width:auto;padding:0;margin:0;overflow:visible;border:0}}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-mobile-header.sc-duet-date-picker{border-color:#cfcfd1}.duet-date-dialog-mobile-header.sc-duet-date-picker duet-label.sc-duet-date-picker{display:inline-block;max-width:84%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 36em){.duet-date-dialog-mobile-header.sc-duet-date-picker duet-label.sc-duet-date-picker{display:none}}.duet-date-picker-close.sc-duet-date-picker{display:flex;align-items:center;justify-content:center;width:24px;height:24px !important;padding:0 !important;color:#00294d !important;cursor:pointer;background:#f5f8fa !important;border-radius:50%;-webkit-appearance:none;appearance:none}@media (min-width: 36em){.duet-date-picker-close.sc-duet-date-picker{opacity:0}}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker{background:#f5f5f7 !important}.duet-date-picker-close.sc-duet-date-picker:hover{background:#f5f8fa !important}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker:hover{background:#f5f5f7 !important}.duet-date-picker-close.sc-duet-date-picker:focus{outline:none;box-shadow:0 0 0 2px #0077b3}@media (min-width: 36em){.duet-date-picker-close.sc-duet-date-picker:focus{opacity:1}}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker:focus{box-shadow:0 0 0 2px #171c3a}';var DuetDatePicker=function(){function e(e){var t=this;registerInstance(this,e);this.duetChange=createEvent(this,"duetChange",7);this.duetBlur=createEvent(this,"duetBlur",7);this.duetFocus=createEvent(this,"duetFocus",7);this.monthSelectId=createID("DuetDatePicker");this.yearSelectId=createID("DuetDatePicker");this.dialogLabelId=createID("DuetDatePicker");this.initialTouchX=null;this.initialTouchY=null;this.focusTarget=null;this.enableActiveFocus=function(){t.focusTarget="day-button"};this.disableActiveFocus=function(){t.focusTarget=null};this.toggleOpen=function(e){e.preventDefault();t.open?t.hide(false):t.show()};this.handleBlur=function(e){e.stopPropagation();t.duetBlur.emit({component:"duet-date-picker"})};this.handleFocus=function(e){e.stopPropagation();t.duetFocus.emit({component:"duet-date-picker"})};this.handleTouchStart=function(e){var a=e.changedTouches[0];t.initialTouchX=a.pageX;t.initialTouchY=a.pageY};this.handleTouchMove=function(e){e.preventDefault()};this.handleTouchEnd=function(e){var a=e.changedTouches[0];var i=a.pageX-t.initialTouchX;var n=a.pageY-t.initialTouchY;var r=70;var o=Math.abs(i)>=r&&Math.abs(n)<=r;var d=Math.abs(n)>=r&&Math.abs(i)<=r&&n>0;if(o){t.addMonths(i<0?1:-1)}else if(d){t.hide();e.preventDefault()}t.initialTouchY=null;t.initialTouchX=null};this.handleNextMonthClick=function(e){e.preventDefault();t.addMonths(1)};this.handlePreviousMonthClick=function(e){e.preventDefault();t.addMonths(-1)};this.handleEscKey=createShortcuts({Escape:function(){return t.hide()},Esc:function(){return t.hide()}});this.handleKeyboardNavigation=createShortcuts({ArrowRight:function(){return t.addDays(1)},Right:function(){return t.addDays(1)},ArrowLeft:function(){return t.addDays(-1)},Left:function(){return t.addDays(-1)},ArrowDown:function(){return t.addDays(7)},Down:function(){return t.addDays(7)},ArrowUp:function(){return t.addDays(-7)},Up:function(){return t.addDays(-7)},Home:function(){return t.startOfWeek()},End:function(){return t.endOfWeek()},PageUp:function(){return t.addMonths(-1)},PageDown:function(){return t.addMonths(1)},"Shift+PageUp":function(){return t.addYears(-1)},"Shift+PageDown":function(){return t.addYears(1)}});this.handleDaySelect=function(e,a){var i=parseISODate(t.min);var n=parseISODate(t.max);t.determineValidity(a);if(inRange(a,i,n)){t.setValue(a);t.hide()}};this.handleMonthSelect=function(e){t.setMonth(parseInt(e.target.value,10))};this.handleYearSelect=function(e){t.setYear(parseInt(e.target.value,10))};this.handleInputChange=function(e){t.inputValue=e.detail.value;var a=parseDate(t.inputValue);t.determineValidity(a);if(a||t.inputValue===""){t.setValue(a)}};this.open=false;this.focusedDay=new Date;this.inputValue="";this.theme="";this.expand=false;this.name="";this.identifier="";this.label="";this.caption=undefined;this.margin="auto";this.language=getLanguage();this.placeholderDefaults={fi:"pp.kk.vvvv",en:"dd.mm.yyyy",sv:"dd.mm.åååå"};this.placeholder=getLocaleString(this.placeholderDefaults,this.language);this.echoPlaceholder=false;this.disabled=false;this.error="";this.labelHidden=false;this.role=undefined;this.accessibleActiveDescendant=undefined;this.accessibleControls=undefined;this.accessibleOwns=undefined;this.accessibleDescribedBy=undefined;this.required=false;this.direction="right";this.tooltip="";this.tooltipDirection="auto";this.value="";this.min="";this.max="";this.incrementYears=10;this.validity=undefined}e.prototype.updateValidity=function(){this.determineValidity(parseISODate(this.value))};e.prototype.updateInternalValue=function(){var e=parseISODate(this.value);var t=parseDate(this.inputValue);if(!e){this.inputValue=""}else if(!isEqual(e,t)){this.inputValue=printDate(e)}};e.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.determineValidity(parseISODate(this.value));this.updateInternalValue()};e.prototype.componentDidUpdate=function(){switch(this.focusTarget){case"toggle-button":this.datePickerButton.focus();this.focusTarget=null;break;case"day-button":this.focusedDayNode.focus();break;case"month-select":this.monthSelectNode.focus();this.focusTarget=null;break}};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.datePickerInput.setFocus(e);return[2]}))}))};e.prototype.show=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.open=true;this.focusTarget="month-select";this.setFocusedDay(parseISODate(this.value)||new Date);return[2]}))}))};e.prototype.hide=function(e){if(e===void 0){e=true}return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.open=false;if(e){this.focusTarget="toggle-button"}return[2]}))}))};e.prototype.addDays=function(e){this.setFocusedDay(addDays(this.focusedDay,e))};e.prototype.addMonths=function(e){this.setMonth(this.focusedDay.getMonth()+e)};e.prototype.addYears=function(e){this.setYear(this.focusedDay.getFullYear()+e)};e.prototype.startOfWeek=function(){this.setFocusedDay(startOfWeek(this.focusedDay))};e.prototype.endOfWeek=function(){this.setFocusedDay(endOfWeek(this.focusedDay))};e.prototype.setMonth=function(e){var t=setMonth(startOfMonth(this.focusedDay),e);var a=endOfMonth(t);var i=setMonth(this.focusedDay,e);this.setFocusedDay(clamp(i,t,a))};e.prototype.setYear=function(e){var t=setYear(startOfMonth(this.focusedDay),e);var a=endOfMonth(t);var i=setYear(this.focusedDay,e);this.setFocusedDay(clamp(i,t,a))};e.prototype.setFocusedDay=function(e){this.focusedDay=clamp(e,parseISODate(this.min),parseISODate(this.max))};e.prototype.determineValidity=function(e){var t,a;var i=(a=(t=this.datePickerInput)===null||t===void 0?void 0:t.value)!==null&&a!==void 0?a:"";var n=i!==""&&e==null;var r=this.required&&e==null;var o=e?!inRange(e,null,parseISODate(this.max)):false;var d=e?!inRange(e,parseISODate(this.min)):false;this.validity={patternMismatch:false,customError:false,stepMismatch:false,tooLong:false,tooShort:false,typeMismatch:false,valueMissing:r,badInput:n,rangeUnderflow:d,rangeOverflow:o,valid:!(r||n||d||o)}};e.prototype.setValue=function(e){var t=printISODate(e);if(t===this.value){return}this.value=t;this.duetChange.emit({component:"duet-date-picker",value:this.value,valueAsDate:e})};e.prototype.handleDocumentClick=function(e){var t=this;if(!this.open){return}var a=e.composedPath().every((function(e){return e!==t.dialogWrapperNode&&e!==t.datePickerButton}));if(a){this.hide(false)}};e.prototype.render=function(){var e=this;var t=parseISODate(this.value);var a=(t||this.focusedDay).getFullYear();var i=this.focusedDay.getMonth();var n=this.focusedDay.getFullYear();var r=i18n[this.language];var o=parseISODate(this.min);var d=parseISODate(this.max);var s=o!=null&&o.getMonth()===i&&o.getFullYear()===n;var u=d!=null&&d.getMonth()===i&&d.getFullYear()===n;var c=a-this.incrementYears;var l=a+this.incrementYears;if(o){c=Math.max(c,o.getFullYear())}if(d){l=Math.min(l,d.getFullYear())}return h(Host,{class:{"duet-expand":this.expand,"duet-m-0":this.margin==="none"}},h("div",{class:"duet-date"},h(DatePickerInput,{value:this.value,valueAsDate:t,formattedValue:this.inputValue,language:this.language,onInput:this.handleInputChange,onBlur:this.handleBlur,onFocus:this.handleFocus,onClick:this.toggleOpen,name:this.name,disabled:this.disabled,error:this.error,role:this.role,required:this.required,theme:this.theme,tooltip:this.tooltip,tooltipDirection:this.tooltipDirection,labelHidden:this.labelHidden,placeholder:this.placeholder,inputLabel:this.label,identifier:this.identifier,buttonRef:function(t){return e.datePickerButton=t},inputRef:function(t){return e.datePickerInput=t},accessibleActiveDescendant:this.accessibleActiveDescendant,accessibleControls:this.accessibleControls,accessibleOwns:this.accessibleOwns,accessibleDescribedBy:this.accessibleDescribedBy,echoPlaceholder:this.echoPlaceholder,caption:this.caption})),h("div",{class:{"duet-theme-turva":this.theme==="turva","duet-date-dialog":true,left:this.direction==="left",error:!!this.error,active:this.open},role:"dialog","aria-modal":"true","aria-hidden":this.open?"false":"true","aria-labelledby":this.dialogLabelId,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},h(FocusGuard,{moveFocusTo:this.focusedDayNode}),h("div",{class:"duet-date-dialog-wrapper",onKeyDown:this.handleEscKey,ref:function(t){return e.dialogWrapperNode=t}},h("duet-visually-hidden",{"aria-live":"polite"},r.keyboardInstruction),h("div",{class:"duet-date-dialog-mobile-header"},h("duet-label",{margin:"none"},this.label),h("button",{class:"duet-date-picker-close",ref:function(t){return e.closeButtonNode=t},onClick:function(){return e.hide()},type:"button"},h("duet-icon",{name:"navigation-close-small",margin:"none",color:"currentColor",size:"xx-small"}),h("duet-visually-hidden",null,r.closeLabel))),h("div",{class:"duet-date-dialog-header"},h("div",{class:"duet-date-dialog-dropdowns"},h("duet-visually-hidden",null,h("h2",{id:this.dialogLabelId,"aria-live":"polite","aria-atomic":"true"},r.monthLabels[i]," ",this.focusedDay.getFullYear())),h("duet-visually-hidden",null,h("label",{htmlFor:this.monthSelectId},r.monthSelectLabel)),h("div",{class:"duet-date-dialog-select"},h("select",{id:this.monthSelectId,class:"duet-date-month-select",ref:function(t){return e.monthSelectNode=t},onChange:this.handleMonthSelect},r.monthLabels.map((function(e,t){return h("option",{key:e,value:t,selected:t===i,disabled:!inRange(new Date(n,t,1),o?startOfMonth(o):null,d?endOfMonth(d):null)},e)}))),h("div",{class:"duet-date-dialog-select-label","aria-hidden":"true"},h("span",null,r.monthLabelsShort[i]),h("duet-icon",{name:"action-arrow-down-small",color:"currentColor",margin:"none",size:"xxx-small"}))),h("duet-visually-hidden",null,h("label",{htmlFor:this.yearSelectId},r.yearSelectLabel)),h("div",{class:"duet-date-dialog-select"},h("select",{id:this.yearSelectId,class:"duet-date-year-select",onChange:this.handleYearSelect},range(c,l).map((function(e){return h("option",{key:e,selected:e===n},e)}))),h("div",{class:"duet-date-dialog-select-label","aria-hidden":"true"},h("span",null,this.focusedDay.getFullYear()),h("duet-icon",{name:"action-arrow-down-small",color:"currentColor",margin:"none",size:"xxx-small"})))),h("div",{class:"duet-date-dialog-buttons"},h("duet-action-button",{class:"duet-date-dialog-prev",onClick:this.handlePreviousMonthClick,disabled:s,"icon-name":"action-arrow-left-small"},r.prevMonthLabel),h("duet-action-button",{class:"duet-date-dialog-next",onClick:this.handleNextMonthClick,disabled:u,"icon-name":"action-arrow-right-small"},r.nextMonthLabel))),h(DatePickerMonth,{selectedDate:t,focusedDate:this.focusedDay,onDateSelect:this.handleDaySelect,onKeyboardNavigation:this.handleKeyboardNavigation,labelledById:this.dialogLabelId,language:this.language,theme:this.theme,min:o,max:d,focusedDayRef:function(t){return e.focusedDayNode=t},onFocusEnter:this.enableActiveFocus,onFocusExit:this.disableActiveFocus})),h(FocusGuard,{moveFocusTo:this.closeButtonNode})))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{min:["updateValidity"],max:["updateValidity"],value:["updateValidity","updateInternalValue"],required:["updateValidity"]}},enumerable:false,configurable:true});return e}();DuetDatePicker.style=duetDatePickerCss;export{DuetDatePicker as duet_date_picker};
4
+ */import{h,r as registerInstance,c as createEvent,H as Host,g as getElement}from"./index-ab069e8d.js";import{i as inheritGlobalTheme}from"./themeable-component-cb76be7c.js";import{c as createID}from"./create-id-981107da.js";import{F as FocusGuard}from"./focus-utils-c81ea33a.js";import{a as getLanguage,g as getLocaleString}from"./language-utils-bf701d37.js";import"./string-utils-5954f458.js";var formatOptionsShort={day:"numeric",month:"long"};var formatOptionsLong={day:"numeric",month:"long",year:"numeric"};var i18n={fi:{buttonLabel:"Valitse päivämäärä",prevMonthLabel:"Edellinen kuukausi",nextMonthLabel:"Seuraava kuukausi",monthSelectLabel:"Kuukausi",yearSelectLabel:"Vuosi",closeLabel:"Sulje ikkuna",selected:"Valittu päivämäärä on",keyboardInstruction:"Voit navigoida päivämääriä nuolinäppäimillä",dayLabels:["Maanantai","Tiistai","Keskiviikko","Torstai","Perjantai","Lauantai","Sunnuntai"],monthLabels:["Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kesäkuu","Heinäkuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"],monthLabelsShort:["Tammi","Helmi","Maalis","Huhti","Touko","Kesä","Heinä","Elo","Syys","Loka","Marras","Joulu"],formatterShort:new Intl.DateTimeFormat("fi-FI",formatOptionsShort),formatterLong:new Intl.DateTimeFormat("fi-FI",formatOptionsLong)},en:{buttonLabel:"Choose date",prevMonthLabel:"Previous month",nextMonthLabel:"Next month",monthSelectLabel:"Month",yearSelectLabel:"Year",closeLabel:"Close window",selected:"Selected date is",keyboardInstruction:"You can use arrow keys to navigate dates",dayLabels:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],monthLabels:["January","February","March","April","May","June","July","August","September","October","November","December"],monthLabelsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],formatterShort:new Intl.DateTimeFormat("en-GB",formatOptionsShort),formatterLong:new Intl.DateTimeFormat("en-GB",formatOptionsLong)},sv:{buttonLabel:"Välj datum",prevMonthLabel:"Föregående månad",nextMonthLabel:"Nästa månad",monthSelectLabel:"Månad",yearSelectLabel:"År",closeLabel:"Stäng fönstret",selected:"Valt datum är",keyboardInstruction:"Använd piltangenterna för att navigera i kalender",dayLabels:["Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag","Söndag"],monthLabels:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],monthLabelsShort:["Jan","Feb","Mars","April","Maj","Juni","Juli","Aug","Sep","Okt","Nov","Dec"],formatterShort:new Intl.DateTimeFormat("sv-SE",formatOptionsShort),formatterLong:new Intl.DateTimeFormat("sv-SE",formatOptionsLong)}};var formDate={title:"form-date",tags:"form date calendar date picker",svg:'<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M2.25 24A2.252 2.252 0 0 1 0 21.75V5.25A2.252 2.252 0 0 1 2.25 3H6V.75a.75.75 0 0 1 1.5 0V3h9V.75a.75.75 0 0 1 1.5 0V3h3.75A2.252 2.252 0 0 1 24 5.25v16.5A2.252 2.252 0 0 1 21.75 24zm-.75-2.25c0 .414.336.75.75.75h19.5a.75.75 0 0 0 .75-.75V10.5h-21zM22.5 9V5.25a.75.75 0 0 0-.75-.75H18V6a.75.75 0 0 1-1.5 0V4.5h-9V6A.75.75 0 0 1 6 6V4.5H2.25a.75.75 0 0 0-.75.75V9z"/><circle cx="5.625" cy="13.875" r="1.125"/><circle cx="5.625" cy="19.125" r="1.125"/><circle cx="12" cy="13.875" r="1.125"/><circle cx="12" cy="19.125" r="1.125"/><circle cx="18.375" cy="13.875" r="1.125"/><path d="M18.375 20.25c-.62 0-1.125-.505-1.125-1.125a1.127 1.127 0 0 1 1.171-1.122l.027.003a1.118 1.118 0 0 1 1.052 1.12c0 .619-.505 1.124-1.125 1.124z"/></svg>'};var DatePickerInput=function(e){var t=e.onClick,a=e.placeholder,i=e.name,n=e.inputLabel,r=e.value,o=e.valueAsDate,d=e.formattedValue,s=e.language,u=e.identifier,c=e.theme,l=e.disabled,p=e.error,f=e.role,m=e.required,b=e.tooltip,g=e.tooltipDirection,v=e.labelHidden,y=e.buttonRef,k=e.inputRef,D=e.onInput,x=e.onBlur,w=e.onFocus,S=e.accessibleActiveDescendant,M=e.accessibleControls,I=e.accessibleOwns,F=e.accessibleDescribedBy,O=e.echoPlaceholder,T=e.caption;var L=i18n[s],A=L.buttonLabel,E=L.selected,Y=L.formatterLong;return h("div",{class:{"duet-theme-turva":c==="turva","duet-date-input":true}},h("duet-input",{label:n,value:d,placeholder:a,id:u,disabled:l,theme:c,error:p,role:f,required:m,tooltip:b,tooltipDirection:g,margin:"none",component:"date",labelHidden:v,accessibleAutocomplete:"none",onDuetInput:D,onDuetFocus:w,onDuetBlur:x,autoComplete:"off",disallowPattern:"[^0-9\\.\\-\\/]",expand:true,ref:k,accessibleActiveDescendant:S,accessibleControls:M,accessibleOwns:I,accessibleDescribedBy:F,echoPlaceholder:O,caption:T},h("button",{class:{"duet-date-button":true,"duet-no-label":v},onClick:t,disabled:l,ref:y,type:"button"},h("duet-icon",{icon:formDate.svg,margin:"none",size:"small",color:"currentColor"}),h("duet-visually-hidden",null,A,o&&h("span",null,", ",E," ",Y.format(o))))),h("input",{type:"hidden",name:i,value:r}))};var DATE_FORMAT=/^(\d{1,2})[\.\-\/](\d{1,2})[\.\-\/](\d{4})$/;var ISO_DATE_FORMAT=/^(\d{4})-(\d{2})-(\d{2})$/;var DATE_OUTPUT_FORMAT="dd.mm.yyyy";var DATE_ISO_OUTPUT_FORMAT="YYYY-MM-DD";function createDate(e,t,a){var i=parseInt(a,10);var n=parseInt(t,10);var r=parseInt(e,10);var o=Number.isInteger(r)&&Number.isInteger(n)&&Number.isInteger(i)&&n>0&&n<=12&&i>0&&i<=31&&r>0;if(o){return new Date(r,n-1,i)}}function parseDate(e){if(!e){return}var t=e.match(DATE_FORMAT);if(t){return createDate(t[3],t[2],t[1])}}function parseISODate(e){if(!e){return}var t=e.match(ISO_DATE_FORMAT);if(t){return createDate(t[1],t[2],t[3])}}function formatDate(e,t){if(!e){return""}var a=e.getDate().toString(10);var i=(e.getMonth()+1).toString(10);var n=e.getFullYear().toString(10);if(e.getDate()<10){a="0".concat(a)}if(e.getMonth()<9){i="0".concat(i)}return t.replace(/MM/i,i).replace(/YYYY/i,n).replace(/DD/i,a)}function printDate(e){return formatDate(e,DATE_OUTPUT_FORMAT)}function printISODate(e){return formatDate(e,DATE_ISO_OUTPUT_FORMAT)}function isEqual(e,t){if(e==null||t==null){return false}return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function addDays(e,t){var a=new Date(e);a.setDate(a.getDate()+t);return a}function startOfWeek(e,t){if(t===void 0){t=1}var a=new Date(e);var i=a.getDay();var n=(i<t?7:0)+i-t;a.setDate(a.getDate()-n);return a}function endOfWeek(e,t){if(t===void 0){t=1}var a=new Date(e);var i=a.getDay();var n=(i<t?-7:0)+6-(i-t);a.setDate(a.getDate()+n);return a}function startOfMonth(e){return new Date(e.getFullYear(),e.getMonth(),1)}function endOfMonth(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function setMonth(e,t){var a=new Date(e);a.setMonth(t);return a}function setYear(e,t){var a=new Date(e);a.setFullYear(t);return a}function inRange(e,t,a){return clamp(e,t,a)===e}function clamp(e,t,a){var i=e.getTime();if(t&&t instanceof Date&&i<t.getTime()){return t}if(a&&a instanceof Date&&i>a.getTime()){return a}return e}function getDaysInRange(e,t){var a=[];var i=e;while(!isEqual(i,t)){a.push(i);i=addDays(i,1)}a.push(i);return a}function getViewOfMonth(e,t){if(t===void 0){t=1}var a=startOfWeek(startOfMonth(e),t);var i=endOfWeek(endOfMonth(e),t);return getDaysInRange(a,i)}var DatePickerDay=function(e){var t=e.focusedDay,a=e.today,i=e.day,n=e.language,r=e.onDaySelect,o=e.onKeyboardNavigation,d=e.ref,s=e.inRange,u=e.isSelected;var c=isEqual(i,a);var l=isEqual(i,t);var p=i.getMonth()!==t.getMonth();var f=!s;var m=i18n[n].formatterShort;function b(e){r(e,i)}return h("button",{class:{"duet-date-table-button":true,outside:f,disabled:p,today:c},tabIndex:l?0:-1,onClick:b,onKeyDown:o,"aria-disabled":f||p,"aria-pressed":u?"true":"false",type:"button",ref:d},h("span",{"aria-hidden":"true"},i.getDate()),h("duet-visually-hidden",null,m.format(i)))};function range(e,t){var a=[];for(var i=e;i<=t;i++){a.push(i)}return a}function chunk(e,t){var a=[];for(var i=0;i<e.length;i+=t){a.push(e.slice(i,i+t))}return a}function parseShortcut(e){var t;var a=e.trim().split("+");var i=a.pop();return[((t=a[0])===null||t===void 0?void 0:t.toLowerCase())==="shift",i]}function createShortcuts(e){var t=Object.keys(e).map((function(t){return[parseShortcut(t),e[t]]}));return function e(a){if(!(a instanceof KeyboardEvent)){return}var i=t.find((function(e){var t=e[0],i=t[0],n=t[1];return(n.toUpperCase()===a.key.toUpperCase()||n===a.code)&&i===a.shiftKey}));if(i){i[1](a);a.preventDefault()}}}var DatePickerMonth=function(e){var t=e.selectedDate,a=e.focusedDate,i=e.labelledById,n=e.theme,r=e.language,o=e.min,d=e.max,s=e.onDateSelect,u=e.onKeyboardNavigation,c=e.focusedDayRef,l=e.onFocusEnter,p=e.onFocusExit;var f=i18n[r].dayLabels;var m=new Date;var b=getViewOfMonth(a);function g(e){var t=e.currentTarget;var a=e.relatedTarget;if(a&&!t.contains(a)){p(e)}}return h("table",{class:{"duet-date-table":true,"duet-theme-turva":n==="turva"},"aria-labelledby":i,onFocusin:l,onFocusout:g},h("thead",null,h("tr",null,f.map((function(e){return h("th",{scope:"col"},h("span",{"aria-hidden":"true"},e.substr(0,2)),h("duet-visually-hidden",null,e))})))),h("tbody",null,chunk(b,7).map((function(e){return h("tr",{class:"duet-date-table-row"},e.map((function(e){return h("td",{class:"duet-date-table-cell"},h(DatePickerDay,{day:e,today:m,language:r,focusedDay:a,inRange:inRange(e,o,d),isSelected:isEqual(e,t),onDaySelect:s,onKeyboardNavigation:u,ref:function(t){if(t&&isEqual(e,a)){c(t)}}}))})))}))))};var duetDatePickerCss='*.sc-duet-date-picker,*.sc-duet-date-picker::after,*.sc-duet-date-picker::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-date-picker-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;position:relative;display:inline-flex;width:100%;min-width:calc(33.333% - 8px);max-width:100%;text-align:left;vertical-align:top}.sc-duet-date-picker-h:last-child,.sc-duet-date-picker-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-date-picker-h{width:calc(50% - 16px - 3px)}}.duet-expand.sc-duet-date-picker-h{width:100% !important}.duet-m-0.sc-duet-date-picker-h{margin:0 !important}.duet-date.sc-duet-date-picker{position:relative;width:100%}.duet-date.sc-duet-date-picker button.sc-duet-date-picker,.duet-date-dialog.sc-duet-date-picker button.sc-duet-date-picker{max-width:initial !important;min-height:initial !important;padding:0 !important;margin:0 !important;transition:initial}.duet-date-button.sc-duet-date-picker{-webkit-user-select:none;user-select:none;position:absolute;top:1px;right:1px;z-index:200;display:flex;align-items:center;justify-content:center;width:48px;height:calc(100% - 2px);color:#00294d;cursor:pointer;background:transparent !important;border-left:1px solid #cfd2d4 !important;border-radius:0 4px 4px 0 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker{color:#171c3a;border-color:#cfcfd1}.duet-date-button.sc-duet-date-picker::before{position:absolute;top:0;left:-6px;width:6px;height:100%;content:"";background:linear-gradient(to left, rgba(207, 210, 212, 0.2) 0%, rgba(207, 210, 212, 0.2) 1px, rgba(207, 210, 212, 0.1) 1px, rgba(207, 210, 212, 0) 100%)}.duet-date-button.sc-duet-date-picker:disabled{pointer-events:none;cursor:default;background:#f5f8fa !important;border:0 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:disabled{background:#f5f5f7 !important}.duet-date-button.sc-duet-date-picker:disabled::before{display:none}.duet-date-button.sc-duet-date-picker:disabled duet-icon.sc-duet-date-picker{opacity:0.4}.duet-date-button.sc-duet-date-picker duet-icon.sc-duet-date-picker{transform:translateY(-1px)}.duet-date-button.sc-duet-date-picker:active duet-icon.sc-duet-date-picker{transform:translateY(0)}.duet-date-button.sc-duet-date-picker:focus{color:#0077b3;border-color:transparent;outline:0;box-shadow:0 0 0 2px #0077b3}.duet-theme-turva.sc-duet-date-picker .duet-date-button.sc-duet-date-picker:focus{color:#171c3a;box-shadow:0 0 0 2px #171c3a}.duet-date-dialog.sc-duet-date-picker{position:absolute;top:100%;left:0;z-index:900;display:flex;width:100%;visibility:hidden;opacity:0;transition:transform 300ms ease, opacity 300ms ease, visibility 300ms ease;transform:scale(0.96) translateZ(0) translateY(-20px);transform-origin:top right}@media (min-width: 36em){.duet-date-dialog.left.sc-duet-date-picker{right:0;left:auto;width:auto}}@media (max-width: 35.9375em){.duet-date-dialog.sc-duet-date-picker{position:fixed;top:0;right:0;bottom:0;background:rgba(0, 41, 77, 0.75);transition:opacity 400ms ease, visibility 400ms ease;transform:translateZ(0);transform-origin:bottom center}.duet-date-dialog.duet-theme-turva.sc-duet-date-picker{background:rgba(23, 28, 58, 0.75)}}.duet-date-dialog.active.sc-duet-date-picker{visibility:visible;opacity:1;transition-property:transform, opacity;transform:scale(1.0001) translateZ(0) translateY(0)}@media (min-width: 36em){.duet-date-dialog.error.sc-duet-date-picker{top:calc(100% - 28px);margin-top:4px}}.duet-date-dialog-wrapper.sc-duet-date-picker{position:relative;z-index:600;width:100%;min-width:290px;max-width:310px;padding:16px 16px 20px;margin-top:8px;margin-left:auto;background:white;border:1px solid #e1e3e6;border-radius:4px;box-shadow:0 4px 10px 0 rgba(0, 41, 77, 0.15);transform:none}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-wrapper.sc-duet-date-picker{border-color:#e4e4e6}@media (max-width: 35.9375em){.duet-date-dialog-wrapper.sc-duet-date-picker{position:absolute;bottom:0;left:0;z-index:900;max-width:none;min-height:25em;padding:0 8% 20px;margin:0;visibility:hidden;border:0;border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px;opacity:0;transition:transform 400ms ease, opacity 400ms ease, visibility 400ms ease;transform:translateZ(0) translateY(100%)}.active.sc-duet-date-picker .duet-date-dialog-wrapper.sc-duet-date-picker{visibility:visible;opacity:1;transition-property:transform, opacity;transform:translateZ(0) translateY(0)}}.duet-date-table.sc-duet-date-picker{width:100%;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.25;color:#00294d;text-align:center;border-spacing:0;border-collapse:collapse}.duet-date-table.duet-theme-turva.sc-duet-date-picker{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}.duet-date-table.sc-duet-date-picker th.sc-duet-date-picker{padding-bottom:8px;font-size:0.75rem;font-weight:600;line-height:1.25;text-decoration:none;text-transform:uppercase;letter-spacing:1px}.duet-date-table.sc-duet-date-picker .duet-date-table-cell.sc-duet-date-picker{text-align:center}.duet-date-table-button.sc-duet-date-picker{position:relative;z-index:100;display:inline-block !important;width:36.9230769231px !important;height:36.9230769231px !important;min-height:initial !important;padding:0 !important;margin:0 !important;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:0.875rem;font-weight:400;font-variant-numeric:tabular-nums;line-height:1.25 !important;color:#00294d !important;text-align:center;vertical-align:initial !important;cursor:pointer;background:transparent !important;border-radius:50% !important;transition:initial !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !important;color:#171c3a !important}.duet-date-table-button.sc-duet-date-picker:hover{background:#e6f2f8 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:hover{background:#f9e6ea !important}.duet-date-table-button.today.sc-duet-date-picker{z-index:200;color:#004d80 !important;background:#f3f9fc !important;box-shadow:0 0 0 1px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.today.sc-duet-date-picker{color:#940925 !important;background:#fcf3f4 !important;box-shadow:0 0 0 1px #c60c30 !important}.duet-date-table-button[aria-pressed=true].sc-duet-date-picker,.duet-date-table-button.sc-duet-date-picker:focus{color:white !important;background:#0077b3 !important;outline:0}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button[aria-pressed=true].sc-duet-date-picker,.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:focus{color:white !important;background:#c60c30 !important}.duet-date-table-button.sc-duet-date-picker:active{z-index:200;color:white !important;background:#0077b3 !important;box-shadow:0 0 5px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:active{color:white !important;background:#c60c30 !important;box-shadow:0 0 5px #c60c30 !important}.duet-date-table-button.sc-duet-date-picker:focus{z-index:200;box-shadow:0 0 5px #0077b3 !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.sc-duet-date-picker:focus{box-shadow:0 0 5px #c60c30 !important}.duet-date-table-button.disabled.sc-duet-date-picker{color:#909599 !important;cursor:default;background:transparent !important;box-shadow:none !important}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.disabled.sc-duet-date-picker{color:#747475 !important;background:transparent !important;box-shadow:none !important}.duet-date-table-button.outside.sc-duet-date-picker{color:#909599 !important;pointer-events:none;cursor:default;background:#f5f8fa !important;box-shadow:none;opacity:0.75}.duet-theme-turva.sc-duet-date-picker .duet-date-table-button.outside.sc-duet-date-picker{color:#747475;background:#f5f5f7;box-shadow:none}.duet-date-dialog-header.sc-duet-date-picker{margin-bottom:16px !important;display:flex;align-items:center;justify-content:space-between;width:100%}.duet-date-dialog-buttons.sc-duet-date-picker{white-space:nowrap}.duet-date-dialog-buttons.sc-duet-date-picker .sc-duet-date-picker::part(button){border:0}.duet-date-dialog-select.sc-duet-date-picker{position:relative;display:inline-flex;margin-top:4px}.duet-date-dialog-select.sc-duet-date-picker .duet-date-dialog-select-label.sc-duet-date-picker{position:relative;z-index:1;display:flex;align-items:center;width:100%;padding:0 8px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1.25rem;font-weight:600;line-height:1.25;color:#00294d;pointer-events:none;border-radius:4px}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-select.sc-duet-date-picker .duet-date-dialog-select-label.sc-duet-date-picker{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}.duet-date-dialog-select.sc-duet-date-picker span.sc-duet-date-picker{margin-right:4px}.duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker{position:absolute;top:0;left:0;z-index:2;width:100%;height:100%;font-size:1rem;cursor:pointer;opacity:0}.duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.sc-duet-date-picker{box-shadow:0 0 0 2px #0077b3}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-select.sc-duet-date-picker select.sc-duet-date-picker:focus+.duet-date-dialog-select-label.sc-duet-date-picker{box-shadow:0 0 0 2px #171c3a}.duet-date-dialog-mobile-header.sc-duet-date-picker{position:relative;display:flex;align-items:center;justify-content:space-between;width:120%;padding:12px 20px;margin-bottom:20px;margin-left:-10%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-bottom:1px solid #cfd2d4}@media (min-width: 36em){.duet-date-dialog-mobile-header.sc-duet-date-picker{position:absolute;top:-8px;right:-8px;width:auto;padding:0;margin:0;overflow:visible;border:0}}.duet-theme-turva.sc-duet-date-picker .duet-date-dialog-mobile-header.sc-duet-date-picker{border-color:#cfcfd1}.duet-date-dialog-mobile-header.sc-duet-date-picker duet-label.sc-duet-date-picker{display:inline-block;max-width:84%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 36em){.duet-date-dialog-mobile-header.sc-duet-date-picker duet-label.sc-duet-date-picker{display:none}}.duet-date-picker-close.sc-duet-date-picker{display:flex;align-items:center;justify-content:center;width:24px;height:24px !important;padding:0 !important;color:#00294d !important;cursor:pointer;background:#f5f8fa !important;border-radius:50%;-webkit-appearance:none;appearance:none}@media (min-width: 36em){.duet-date-picker-close.sc-duet-date-picker{opacity:0}}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker{background:#f5f5f7 !important}.duet-date-picker-close.sc-duet-date-picker:hover{background:#f5f8fa !important}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker:hover{background:#f5f5f7 !important}.duet-date-picker-close.sc-duet-date-picker:focus{outline:none;box-shadow:0 0 0 2px #0077b3}@media (min-width: 36em){.duet-date-picker-close.sc-duet-date-picker:focus{opacity:1}}.duet-theme-turva.sc-duet-date-picker .duet-date-picker-close.sc-duet-date-picker:focus{box-shadow:0 0 0 2px #171c3a}';var DuetDatePicker=function(){function e(e){var t=this;registerInstance(this,e);this.duetChange=createEvent(this,"duetChange",7);this.duetBlur=createEvent(this,"duetBlur",7);this.duetFocus=createEvent(this,"duetFocus",7);this.monthSelectId=createID("DuetDatePicker");this.yearSelectId=createID("DuetDatePicker");this.dialogLabelId=createID("DuetDatePicker");this.initialTouchX=null;this.initialTouchY=null;this.focusTarget=null;this.enableActiveFocus=function(){t.focusTarget="day-button"};this.disableActiveFocus=function(){t.focusTarget=null};this.toggleOpen=function(e){e.preventDefault();t.open?t.hide(false):t.show()};this.handleBlur=function(e){e.stopPropagation();t.duetBlur.emit({component:"duet-date-picker"})};this.handleFocus=function(e){e.stopPropagation();t.duetFocus.emit({component:"duet-date-picker"})};this.handleTouchStart=function(e){var a=e.changedTouches[0];t.initialTouchX=a.pageX;t.initialTouchY=a.pageY};this.handleTouchMove=function(e){e.preventDefault()};this.handleTouchEnd=function(e){var a=e.changedTouches[0];var i=a.pageX-t.initialTouchX;var n=a.pageY-t.initialTouchY;var r=70;var o=Math.abs(i)>=r&&Math.abs(n)<=r;var d=Math.abs(n)>=r&&Math.abs(i)<=r&&n>0;if(o){t.addMonths(i<0?1:-1)}else if(d){t.hide();e.preventDefault()}t.initialTouchY=null;t.initialTouchX=null};this.handleNextMonthClick=function(e){e.preventDefault();t.addMonths(1)};this.handlePreviousMonthClick=function(e){e.preventDefault();t.addMonths(-1)};this.handleEscKey=createShortcuts({Escape:function(){return t.hide()},Esc:function(){return t.hide()}});this.handleKeyboardNavigation=createShortcuts({ArrowRight:function(){return t.addDays(1)},Right:function(){return t.addDays(1)},ArrowLeft:function(){return t.addDays(-1)},Left:function(){return t.addDays(-1)},ArrowDown:function(){return t.addDays(7)},Down:function(){return t.addDays(7)},ArrowUp:function(){return t.addDays(-7)},Up:function(){return t.addDays(-7)},Home:function(){return t.startOfWeek()},End:function(){return t.endOfWeek()},PageUp:function(){return t.addMonths(-1)},PageDown:function(){return t.addMonths(1)},"Shift+PageUp":function(){return t.addYears(-1)},"Shift+PageDown":function(){return t.addYears(1)}});this.handleDaySelect=function(e,a){var i=parseISODate(t.min);var n=parseISODate(t.max);t.determineValidity(a);if(inRange(a,i,n)){t.setValue(a);t.hide()}};this.handleMonthSelect=function(e){t.setMonth(parseInt(e.target.value,10))};this.handleYearSelect=function(e){t.setYear(parseInt(e.target.value,10))};this.handleInputChange=function(e){t.inputValue=e.detail.value;var a=parseDate(t.inputValue);t.determineValidity(a);if(a||t.inputValue===""){t.setValue(a)}};this.open=false;this.focusedDay=new Date;this.inputValue="";this.theme="";this.expand=false;this.name="";this.identifier="";this.label="";this.caption=undefined;this.margin="auto";this.language=getLanguage();this.placeholderDefaults={fi:"pp.kk.vvvv",en:"dd.mm.yyyy",sv:"dd.mm.åååå"};this.placeholder=getLocaleString(this.placeholderDefaults,this.language);this.echoPlaceholder=false;this.disabled=false;this.error="";this.labelHidden=false;this.role=undefined;this.accessibleActiveDescendant=undefined;this.accessibleControls=undefined;this.accessibleOwns=undefined;this.accessibleDescribedBy=undefined;this.required=false;this.direction="right";this.tooltip="";this.tooltipDirection="auto";this.value="";this.min="";this.max="";this.incrementYears=10;this.validity=undefined}e.prototype.updateValidity=function(){this.determineValidity(parseISODate(this.value))};e.prototype.updateInternalValue=function(){var e=parseISODate(this.value);var t=parseDate(this.inputValue);if(!e){this.inputValue=""}else if(!isEqual(e,t)){this.inputValue=printDate(e)}};e.prototype.componentWillLoad=function(){inheritGlobalTheme(this);this.determineValidity(parseISODate(this.value));this.updateInternalValue()};e.prototype.componentDidUpdate=function(){switch(this.focusTarget){case"toggle-button":this.datePickerButton.focus();this.focusTarget=null;break;case"day-button":this.focusedDayNode.focus();break;case"month-select":this.monthSelectNode.focus();this.focusTarget=null;break}};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.datePickerInput.setFocus(e);return[2]}))}))};e.prototype.show=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.open=true;this.focusTarget="month-select";this.setFocusedDay(parseISODate(this.value)||new Date);return[2]}))}))};e.prototype.hide=function(e){if(e===void 0){e=true}return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.open=false;if(e){this.focusTarget="toggle-button"}return[2]}))}))};e.prototype.addDays=function(e){this.setFocusedDay(addDays(this.focusedDay,e))};e.prototype.addMonths=function(e){this.setMonth(this.focusedDay.getMonth()+e)};e.prototype.addYears=function(e){this.setYear(this.focusedDay.getFullYear()+e)};e.prototype.startOfWeek=function(){this.setFocusedDay(startOfWeek(this.focusedDay))};e.prototype.endOfWeek=function(){this.setFocusedDay(endOfWeek(this.focusedDay))};e.prototype.setMonth=function(e){var t=setMonth(startOfMonth(this.focusedDay),e);var a=endOfMonth(t);var i=setMonth(this.focusedDay,e);this.setFocusedDay(clamp(i,t,a))};e.prototype.setYear=function(e){var t=setYear(startOfMonth(this.focusedDay),e);var a=endOfMonth(t);var i=setYear(this.focusedDay,e);this.setFocusedDay(clamp(i,t,a))};e.prototype.setFocusedDay=function(e){this.focusedDay=clamp(e,parseISODate(this.min),parseISODate(this.max))};e.prototype.determineValidity=function(e){var t,a;var i=(a=(t=this.datePickerInput)===null||t===void 0?void 0:t.value)!==null&&a!==void 0?a:"";var n=i!==""&&e==null;var r=this.required&&e==null;var o=e?!inRange(e,null,parseISODate(this.max)):false;var d=e?!inRange(e,parseISODate(this.min)):false;this.validity={patternMismatch:false,customError:false,stepMismatch:false,tooLong:false,tooShort:false,typeMismatch:false,valueMissing:r,badInput:n,rangeUnderflow:d,rangeOverflow:o,valid:!(r||n||d||o)}};e.prototype.setValue=function(e){var t=printISODate(e);if(t===this.value){return}this.value=t;this.duetChange.emit({component:"duet-date-picker",value:this.value,valueAsDate:e})};e.prototype.handleDocumentClick=function(e){var t=this;if(!this.open){return}var a=e.composedPath().every((function(e){return e!==t.dialogWrapperNode&&e!==t.datePickerButton}));if(a){this.hide(false)}};e.prototype.render=function(){var e=this;var t=parseISODate(this.value);var a=(t||this.focusedDay).getFullYear();var i=this.focusedDay.getMonth();var n=this.focusedDay.getFullYear();var r=i18n[this.language];var o=parseISODate(this.min);var d=parseISODate(this.max);var s=o!=null&&o.getMonth()===i&&o.getFullYear()===n;var u=d!=null&&d.getMonth()===i&&d.getFullYear()===n;var c=a-this.incrementYears;var l=a+this.incrementYears;if(o){c=Math.max(c,o.getFullYear())}if(d){l=Math.min(l,d.getFullYear())}return h(Host,{class:{"duet-expand":this.expand,"duet-m-0":this.margin==="none"}},h("div",{class:"duet-date"},h(DatePickerInput,{value:this.value,valueAsDate:t,formattedValue:this.inputValue,language:this.language,onInput:this.handleInputChange,onBlur:this.handleBlur,onFocus:this.handleFocus,onClick:this.toggleOpen,name:this.name,disabled:this.disabled,error:this.error,role:this.role,required:this.required,theme:this.theme,tooltip:this.tooltip,tooltipDirection:this.tooltipDirection,labelHidden:this.labelHidden,placeholder:this.placeholder,inputLabel:this.label,identifier:this.identifier,buttonRef:function(t){return e.datePickerButton=t},inputRef:function(t){return e.datePickerInput=t},accessibleActiveDescendant:this.accessibleActiveDescendant,accessibleControls:this.accessibleControls,accessibleOwns:this.accessibleOwns,accessibleDescribedBy:this.accessibleDescribedBy,echoPlaceholder:this.echoPlaceholder,caption:this.caption})),h("div",{class:{"duet-theme-turva":this.theme==="turva","duet-date-dialog":true,left:this.direction==="left",error:!!this.error,active:this.open},role:"dialog","aria-modal":"true","aria-hidden":this.open?"false":"true","aria-labelledby":this.dialogLabelId,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},h(FocusGuard,{moveFocusTo:this.focusedDayNode}),h("div",{class:"duet-date-dialog-wrapper",onKeyDown:this.handleEscKey,ref:function(t){return e.dialogWrapperNode=t}},h("duet-visually-hidden",{"aria-live":"polite"},r.keyboardInstruction),h("div",{class:"duet-date-dialog-mobile-header"},h("duet-label",{margin:"none"},this.label),h("button",{class:"duet-date-picker-close",ref:function(t){return e.closeButtonNode=t},onClick:function(){return e.hide()},type:"button"},h("duet-icon",{name:"navigation-close-small",margin:"none",color:"currentColor",size:"xx-small"}),h("duet-visually-hidden",null,r.closeLabel))),h("div",{class:"duet-date-dialog-header"},h("div",{class:"duet-date-dialog-dropdowns"},h("duet-visually-hidden",null,h("h2",{id:this.dialogLabelId,"aria-live":"polite","aria-atomic":"true"},r.monthLabels[i]," ",this.focusedDay.getFullYear())),h("duet-visually-hidden",null,h("label",{htmlFor:this.monthSelectId},r.monthSelectLabel)),h("div",{class:"duet-date-dialog-select"},h("select",{id:this.monthSelectId,class:"duet-date-month-select",ref:function(t){return e.monthSelectNode=t},onChange:this.handleMonthSelect},r.monthLabels.map((function(e,t){return h("option",{key:e,value:t,selected:t===i,disabled:!inRange(new Date(n,t,1),o?startOfMonth(o):null,d?endOfMonth(d):null)},e)}))),h("div",{class:"duet-date-dialog-select-label","aria-hidden":"true"},h("span",null,r.monthLabelsShort[i]),h("duet-icon",{name:"action-arrow-down-small",color:"currentColor",margin:"none",size:"xxx-small"}))),h("duet-visually-hidden",null,h("label",{htmlFor:this.yearSelectId},r.yearSelectLabel)),h("div",{class:"duet-date-dialog-select"},h("select",{id:this.yearSelectId,class:"duet-date-year-select",onChange:this.handleYearSelect},range(c,l).map((function(e){return h("option",{key:e,selected:e===n},e)}))),h("div",{class:"duet-date-dialog-select-label","aria-hidden":"true"},h("span",null,this.focusedDay.getFullYear()),h("duet-icon",{name:"action-arrow-down-small",color:"currentColor",margin:"none",size:"xxx-small"})))),h("div",{class:"duet-date-dialog-buttons"},h("duet-action-button",{class:"duet-date-dialog-prev",onClick:this.handlePreviousMonthClick,disabled:s,"icon-name":"action-arrow-left-small"},r.prevMonthLabel),h("duet-action-button",{class:"duet-date-dialog-next",onClick:this.handleNextMonthClick,disabled:u,"icon-name":"action-arrow-right-small"},r.nextMonthLabel))),h(DatePickerMonth,{selectedDate:t,focusedDate:this.focusedDay,onDateSelect:this.handleDaySelect,onKeyboardNavigation:this.handleKeyboardNavigation,labelledById:this.dialogLabelId,language:this.language,theme:this.theme,min:o,max:d,focusedDayRef:function(t){return e.focusedDayNode=t},onFocusEnter:this.enableActiveFocus,onFocusExit:this.disableActiveFocus})),h(FocusGuard,{moveFocusTo:this.closeButtonNode})))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{min:["updateValidity"],max:["updateValidity"],value:["updateValidity","updateInternalValue"],required:["updateValidity"]}},enumerable:false,configurable:true});return e}();DuetDatePicker.style=duetDatePickerCss;export{DuetDatePicker as duet_date_picker};
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- import{r as registerInstance,h,g as getElement,H as Host}from"./index-55984aa4.js";import{i as inheritGlobalTheme}from"./themeable-component-cb76be7c.js";import{g as getColorByName}from"./token-utils-b531747a.js";import"./tokens.module-d3321092.js";var duetDividerCss="*,*::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%}.duet-divider{-webkit-user-select:none;user-select:none;display:block;width:100%;height:1px;margin-top:36px !important;margin-bottom:28px;background:#e1e3e6}.duet-divider.duet-p-0{padding:0 !important}.duet-divider.duet-m-0{margin:0 !important}.duet-divider.duet-m-s{margin-bottom:16px !important;margin-top:0 !important}.duet-divider.duet-theme-turva{background:#e4e4e6}";var DuetDivider=function(){function e(e){registerInstance(this,e);this.theme="";this.margin="auto";this.color=""}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};e.prototype.render=function(){var e=getColorByName(this.color);return h("div",{class:{"duet-m-0":this.margin==="none","duet-m-s":this.margin==="small","duet-divider":true,"duet-theme-turva":this.theme==="turva"},style:{background:e}})};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetDivider.style=duetDividerCss;var duetSpacerCss=":host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:12px;min-width:12px;height:12px}@media (min-width: 36em){:host{width:16px;min-width:16px;height:16px}}:host(.duet-spacer-horizontal){display:inline-block;height:100% !important}:host(.duet-spacer-horizontal.xx-small){width:4px;min-width:4px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xx-small){width:4px;min-width:4px}}:host(.duet-spacer-horizontal.x-small){width:4px;min-width:4px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.x-small){width:8px;min-width:8px}}:host(.duet-spacer-horizontal.small){width:8px;min-width:8px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.small){width:12px;min-width:12px}}:host(.duet-spacer-horizontal.medium){height:100%}:host(.duet-spacer-horizontal.large){width:16px;min-width:16px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.large){width:20px;min-width:20px}}:host(.duet-spacer-horizontal.x-large){width:20px;min-width:20px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.x-large){width:28px;min-width:28px}}:host(.duet-spacer-horizontal.xx-large){width:28px;min-width:28px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xx-large){width:36px;min-width:36px}}:host(.duet-spacer-horizontal.xxx-large){width:36px;min-width:36px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xxx-large){width:48px;min-width:48px}}:host(.duet-spacer-horizontal.xxxx-large){width:48px;min-width:48px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xxxx-large){width:72px;min-width:72px}}:host(.duet-spacer-vertical.xx-small){width:100%;height:4px;min-height:4px}:host(.duet-spacer-vertical.x-small){width:100%;height:4px;min-height:4px}@media (min-width: 36em){:host(.duet-spacer-vertical.x-small){height:8px;min-height:8px}}:host(.duet-spacer-vertical.small){width:100%;height:8px;min-height:8px}@media (min-width: 36em){:host(.duet-spacer-vertical.small){height:12px;min-height:12px}}:host(.duet-spacer-vertical.medium){width:100%}:host(.duet-spacer-vertical.large){width:100%;height:16px;min-height:16px}@media (min-width: 36em){:host(.duet-spacer-vertical.large){height:20px;min-height:20px}}:host(.duet-spacer-vertical.x-large){width:100%;height:20px;min-height:20px}@media (min-width: 36em){:host(.duet-spacer-vertical.x-large){height:28px;min-height:28px}}:host(.duet-spacer-vertical.xx-large){width:100%;height:28px;min-height:28px}@media (min-width: 36em){:host(.duet-spacer-vertical.xx-large){height:36px;min-height:36px}}:host(.duet-spacer-vertical.xxx-large){width:100%;height:36px;min-height:36px}@media (min-width: 36em){:host(.duet-spacer-vertical.xxx-large){height:48px;min-height:48px}}:host(.duet-spacer-vertical.xxxx-large){width:100%;height:48px;min-height:48px}@media (min-width: 36em){:host(.duet-spacer-vertical.xxxx-large){height:72px;min-height:72px}}:host(.duet-spacer-xx-small){display:none}@media (max-width: 22.5em){:host(.duet-spacer-xx-small){display:block}}:host(.duet-spacer-x-small){display:none}@media (max-width: 35.9375em){:host(.duet-spacer-x-small){display:block}}:host(.duet-spacer-small){display:none}@media (min-width: 36em){:host(.duet-spacer-small){display:block}}:host(.duet-spacer-medium){display:none}@media (min-width: 48em){:host(.duet-spacer-medium){display:block}}:host(.duet-spacer-large){display:none}@media (min-width: 62em){:host(.duet-spacer-large){display:block}}:host(.duet-spacer-x-large){display:none}@media (min-width: 64.0625em){:host(.duet-spacer-x-large){display:block}}:host(.duet-spacer-xx-large){display:none}@media (min-width: 76.25em){:host(.duet-spacer-xx-large){display:block}}";var DuetSpacer=function(){function e(e){registerInstance(this,e);this.size="medium";this.direction="vertical";this.breakpoint=""}e.prototype.render=function(){var e;return h(Host,{class:(e={"duet-spacer":true,"duet-spacer-xx-small":this.breakpoint==="xx-small","duet-spacer-x-small":this.breakpoint==="x-small","duet-spacer-small":this.breakpoint==="small","duet-spacer-medium":this.breakpoint==="medium","duet-spacer-large":this.breakpoint==="large","duet-spacer-x-large":this.breakpoint==="x-large","duet-spacer-xx-large":this.breakpoint==="xx-large"},e[this.size]=true,e["duet-spacer-".concat(this.direction)]=true,e)})};return e}();DuetSpacer.style=duetSpacerCss;export{DuetDivider as duet_divider,DuetSpacer as duet_spacer};
4
+ import{r as registerInstance,h,g as getElement,H as Host}from"./index-ab069e8d.js";import{i as inheritGlobalTheme}from"./themeable-component-cb76be7c.js";import{g as getColorByName}from"./token-utils-b531747a.js";import"./tokens.module-d3321092.js";var duetDividerCss="*,*::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%}.duet-divider{-webkit-user-select:none;user-select:none;display:block;width:100%;height:1px;margin-top:36px !important;margin-bottom:28px;background:#e1e3e6}.duet-divider.duet-p-0{padding:0 !important}.duet-divider.duet-m-0{margin:0 !important}.duet-divider.duet-m-s{margin-bottom:16px !important;margin-top:0 !important}.duet-divider.duet-theme-turva{background:#e4e4e6}";var DuetDivider=function(){function e(e){registerInstance(this,e);this.theme="";this.margin="auto";this.color=""}e.prototype.componentWillLoad=function(){inheritGlobalTheme(this)};e.prototype.render=function(){var e=getColorByName(this.color);return h("div",{class:{"duet-m-0":this.margin==="none","duet-m-s":this.margin==="small","duet-divider":true,"duet-theme-turva":this.theme==="turva"},style:{background:e}})};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();DuetDivider.style=duetDividerCss;var duetSpacerCss=":host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:12px;min-width:12px;height:12px}@media (min-width: 36em){:host{width:16px;min-width:16px;height:16px}}:host(.duet-spacer-horizontal){display:inline-block;height:100% !important}:host(.duet-spacer-horizontal.xx-small){width:4px;min-width:4px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xx-small){width:4px;min-width:4px}}:host(.duet-spacer-horizontal.x-small){width:4px;min-width:4px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.x-small){width:8px;min-width:8px}}:host(.duet-spacer-horizontal.small){width:8px;min-width:8px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.small){width:12px;min-width:12px}}:host(.duet-spacer-horizontal.medium){height:100%}:host(.duet-spacer-horizontal.large){width:16px;min-width:16px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.large){width:20px;min-width:20px}}:host(.duet-spacer-horizontal.x-large){width:20px;min-width:20px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.x-large){width:28px;min-width:28px}}:host(.duet-spacer-horizontal.xx-large){width:28px;min-width:28px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xx-large){width:36px;min-width:36px}}:host(.duet-spacer-horizontal.xxx-large){width:36px;min-width:36px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xxx-large){width:48px;min-width:48px}}:host(.duet-spacer-horizontal.xxxx-large){width:48px;min-width:48px;height:100%}@media (min-width: 36em){:host(.duet-spacer-horizontal.xxxx-large){width:72px;min-width:72px}}:host(.duet-spacer-vertical.xx-small){width:100%;height:4px;min-height:4px}:host(.duet-spacer-vertical.x-small){width:100%;height:4px;min-height:4px}@media (min-width: 36em){:host(.duet-spacer-vertical.x-small){height:8px;min-height:8px}}:host(.duet-spacer-vertical.small){width:100%;height:8px;min-height:8px}@media (min-width: 36em){:host(.duet-spacer-vertical.small){height:12px;min-height:12px}}:host(.duet-spacer-vertical.medium){width:100%}:host(.duet-spacer-vertical.large){width:100%;height:16px;min-height:16px}@media (min-width: 36em){:host(.duet-spacer-vertical.large){height:20px;min-height:20px}}:host(.duet-spacer-vertical.x-large){width:100%;height:20px;min-height:20px}@media (min-width: 36em){:host(.duet-spacer-vertical.x-large){height:28px;min-height:28px}}:host(.duet-spacer-vertical.xx-large){width:100%;height:28px;min-height:28px}@media (min-width: 36em){:host(.duet-spacer-vertical.xx-large){height:36px;min-height:36px}}:host(.duet-spacer-vertical.xxx-large){width:100%;height:36px;min-height:36px}@media (min-width: 36em){:host(.duet-spacer-vertical.xxx-large){height:48px;min-height:48px}}:host(.duet-spacer-vertical.xxxx-large){width:100%;height:48px;min-height:48px}@media (min-width: 36em){:host(.duet-spacer-vertical.xxxx-large){height:72px;min-height:72px}}:host(.duet-spacer-xx-small){display:none}@media (max-width: 22.5em){:host(.duet-spacer-xx-small){display:block}}:host(.duet-spacer-x-small){display:none}@media (max-width: 35.9375em){:host(.duet-spacer-x-small){display:block}}:host(.duet-spacer-small){display:none}@media (min-width: 36em){:host(.duet-spacer-small){display:block}}:host(.duet-spacer-medium){display:none}@media (min-width: 48em){:host(.duet-spacer-medium){display:block}}:host(.duet-spacer-large){display:none}@media (min-width: 62em){:host(.duet-spacer-large){display:block}}:host(.duet-spacer-x-large){display:none}@media (min-width: 64.0625em){:host(.duet-spacer-x-large){display:block}}:host(.duet-spacer-xx-large){display:none}@media (min-width: 76.25em){:host(.duet-spacer-xx-large){display:block}}";var DuetSpacer=function(){function e(e){registerInstance(this,e);this.size="medium";this.direction="vertical";this.breakpoint=""}e.prototype.render=function(){var e;return h(Host,{class:(e={"duet-spacer":true,"duet-spacer-xx-small":this.breakpoint==="xx-small","duet-spacer-x-small":this.breakpoint==="x-small","duet-spacer-small":this.breakpoint==="small","duet-spacer-medium":this.breakpoint==="medium","duet-spacer-large":this.breakpoint==="large","duet-spacer-x-large":this.breakpoint==="x-large","duet-spacer-xx-large":this.breakpoint==="xx-large"},e[this.size]=true,e["duet-spacer-".concat(this.direction)]=true,e)})};return e}();DuetSpacer.style=duetSpacerCss;export{DuetDivider as duet_divider,DuetSpacer as duet_spacer};