@duetds/components 6.9.6 → 6.9.7

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 (506) hide show
  1. package/hydrate/index.js +1246 -58
  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-callout.cjs.entry.js +5 -2
  9. package/lib/cjs/duet-caption_4.cjs.entry.js +1 -1
  10. package/lib/cjs/duet-card.cjs.entry.js +1 -1
  11. package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
  12. package/lib/cjs/duet-checkmark.cjs.entry.js +1 -1
  13. package/lib/cjs/duet-choice_2.cjs.entry.js +5 -3
  14. package/lib/cjs/duet-collapsible.cjs.entry.js +1 -1
  15. package/lib/cjs/duet-combobox.cjs.entry.js +1 -1
  16. package/lib/cjs/duet-contact-card.cjs.entry.js +1 -1
  17. package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
  18. package/lib/cjs/duet-date-picker.cjs.entry.js +2 -2
  19. package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
  20. package/lib/cjs/duet-editable-table_3.cjs.entry.js +12 -4
  21. package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
  22. package/lib/cjs/duet-fieldset.cjs.entry.js +1 -1
  23. package/lib/cjs/duet-footer.cjs.entry.js +1 -1
  24. package/lib/cjs/duet-grid_2.cjs.entry.js +1 -1
  25. package/lib/cjs/duet-header_2.cjs.entry.js +1 -1
  26. package/lib/cjs/duet-hero.cjs.entry.js +4 -3
  27. package/lib/cjs/duet-icon.cjs.entry.js +1 -1
  28. package/lib/cjs/duet-input_2.cjs.entry.js +1 -1
  29. package/lib/cjs/duet-layout.cjs.entry.js +1 -1
  30. package/lib/cjs/duet-list_2.cjs.entry.js +1 -1
  31. package/lib/cjs/duet-menu-bar-button.cjs.entry.js +1 -1
  32. package/lib/cjs/duet-menu-bar-dropdown-link.cjs.entry.js +1 -1
  33. package/lib/cjs/duet-menu-bar-dropdown.cjs.entry.js +1 -1
  34. package/lib/cjs/duet-menu-bar-link.cjs.entry.js +1 -1
  35. package/lib/cjs/duet-menu-bar.cjs.entry.js +1 -1
  36. package/lib/cjs/duet-modal.cjs.entry.js +2 -2
  37. package/lib/cjs/duet-multiselect.cjs.entry.js +1 -1
  38. package/lib/cjs/duet-nav.cjs.entry.js +1 -1
  39. package/lib/cjs/duet-notification_2.cjs.entry.js +1 -1
  40. package/lib/cjs/duet-number-input.cjs.entry.js +1 -1
  41. package/lib/cjs/duet-page-heading.cjs.entry.js +1 -1
  42. package/lib/cjs/duet-pagination_2.cjs.entry.js +1 -1
  43. package/lib/cjs/duet-progress.cjs.entry.js +1 -1
  44. package/lib/cjs/duet-radio_2.cjs.entry.js +1 -1
  45. package/lib/cjs/duet-range-slider.cjs.entry.js +1 -1
  46. package/lib/cjs/duet-scrollable_3.cjs.entry.js +1 -1
  47. package/lib/cjs/duet-section-layout.cjs.entry.js +1 -1
  48. package/lib/cjs/duet-select.cjs.entry.js +1 -1
  49. package/lib/cjs/duet-slideout-lang.cjs.entry.js +1 -1
  50. package/lib/cjs/duet-slideout-link.cjs.entry.js +1 -1
  51. package/lib/cjs/duet-slideout-panel-dropdown.cjs.entry.js +1 -1
  52. package/lib/cjs/duet-slideout-panel.cjs.entry.js +2 -2
  53. package/lib/cjs/duet-slideout.cjs.entry.js +2 -2
  54. package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
  55. package/lib/cjs/duet-submenu-bar-dropdown-link.cjs.entry.js +1 -1
  56. package/lib/cjs/duet-submenu-bar-dropdown.cjs.entry.js +1 -1
  57. package/lib/cjs/duet-submenu-bar-link.cjs.entry.js +1 -1
  58. package/lib/cjs/duet-submenu-bar.cjs.entry.js +1 -1
  59. package/lib/cjs/duet-textarea.cjs.entry.js +1 -1
  60. package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
  61. package/lib/cjs/duet-toolbar-dropdown-link.cjs.entry.js +1 -1
  62. package/lib/cjs/duet-toolbar-dropdown.cjs.entry.js +1 -1
  63. package/lib/cjs/duet-toolbar-link.cjs.entry.js +1 -1
  64. package/lib/cjs/duet-toolbar.cjs.entry.js +1 -1
  65. package/lib/cjs/duet-tooltip.cjs.entry.js +1220 -48
  66. package/lib/cjs/duet-tray.cjs.entry.js +1 -1
  67. package/lib/cjs/duet-upload-aria-status.cjs.entry.js +1 -1
  68. package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
  69. package/lib/cjs/duet.cjs.js +2 -2
  70. package/lib/cjs/{focus-utils-de2e491b.js → focus-utils-8852d70c.js} +1 -1
  71. package/lib/cjs/{index-978ec5b0.js → index-8baedc34.js} +1 -1
  72. package/lib/cjs/loader.cjs.js +2 -2
  73. package/lib/collection/components/duet-callout/duet-callout.js +4 -1
  74. package/lib/collection/components/duet-choice/duet-choice.js +3 -1
  75. package/lib/collection/components/duet-hero/duet-hero.css +10 -0
  76. package/lib/collection/components/duet-hero/duet-hero.js +3 -1
  77. package/lib/collection/components/duet-tooltip/duet-tooltip.css +39 -106
  78. package/lib/collection/components/duet-tooltip/duet-tooltip.js +53 -49
  79. package/lib/collection/components/duet-upload/duet-upload.js +3 -3
  80. package/lib/collection/components/duet-upload/upload-item.js +8 -2
  81. package/lib/dist-custom-elements/duet-action-button.js +1 -1
  82. package/lib/dist-custom-elements/duet-alert.js +1 -1
  83. package/lib/dist-custom-elements/duet-badge.js +1 -1
  84. package/lib/dist-custom-elements/duet-breadcrumb.js +2 -2
  85. package/lib/dist-custom-elements/duet-breadcrumbs.js +2 -2
  86. package/lib/dist-custom-elements/duet-button.js +1 -1
  87. package/lib/dist-custom-elements/duet-callout.js +7 -4
  88. package/lib/dist-custom-elements/duet-caption.js +1 -1
  89. package/lib/dist-custom-elements/duet-card.js +3 -3
  90. package/lib/dist-custom-elements/duet-checkbox.js +1 -1
  91. package/lib/dist-custom-elements/duet-checkmark.js +1 -1
  92. package/lib/dist-custom-elements/duet-choice-group.js +6 -6
  93. package/lib/dist-custom-elements/duet-choice.js +8 -6
  94. package/lib/dist-custom-elements/duet-collapsible.js +3 -3
  95. package/lib/dist-custom-elements/duet-combobox.js +2 -2
  96. package/lib/dist-custom-elements/duet-contact-card.js +8 -8
  97. package/lib/dist-custom-elements/duet-cookie-consent.js +6 -6
  98. package/lib/dist-custom-elements/duet-date-picker.js +10 -10
  99. package/lib/dist-custom-elements/duet-divider.js +1 -1
  100. package/lib/dist-custom-elements/duet-editable-table.js +7 -7
  101. package/lib/dist-custom-elements/duet-empty-state.js +1 -1
  102. package/lib/dist-custom-elements/duet-fieldset.js +1 -1
  103. package/lib/dist-custom-elements/duet-footer.js +4 -4
  104. package/lib/dist-custom-elements/duet-grid-item.js +1 -1
  105. package/lib/dist-custom-elements/duet-grid.js +1 -1
  106. package/lib/dist-custom-elements/duet-header.js +9 -9
  107. package/lib/dist-custom-elements/duet-heading.js +1 -1
  108. package/lib/dist-custom-elements/duet-hero.js +12 -11
  109. package/lib/dist-custom-elements/duet-icon.js +1 -1
  110. package/lib/dist-custom-elements/duet-input.js +1 -1
  111. package/lib/dist-custom-elements/duet-label.js +1 -1
  112. package/lib/dist-custom-elements/duet-layout.js +1 -1
  113. package/lib/dist-custom-elements/duet-link.js +1 -1
  114. package/lib/dist-custom-elements/duet-list-item.js +1 -1
  115. package/lib/dist-custom-elements/duet-list.js +1 -1
  116. package/lib/dist-custom-elements/duet-logo.js +1 -1
  117. package/lib/dist-custom-elements/duet-menu-bar-button.js +3 -3
  118. package/lib/dist-custom-elements/duet-menu-bar-dropdown-link.js +2 -2
  119. package/lib/dist-custom-elements/duet-menu-bar-dropdown.js +3 -3
  120. package/lib/dist-custom-elements/duet-menu-bar-link.js +3 -3
  121. package/lib/dist-custom-elements/duet-menu-bar.js +3 -3
  122. package/lib/dist-custom-elements/duet-modal.js +7 -7
  123. package/lib/dist-custom-elements/duet-multiselect.js +8 -8
  124. package/lib/dist-custom-elements/duet-nav.js +1 -1
  125. package/lib/dist-custom-elements/duet-notification-drawer.js +4 -4
  126. package/lib/dist-custom-elements/duet-notification.js +2 -2
  127. package/lib/dist-custom-elements/duet-number-input.js +9 -9
  128. package/lib/dist-custom-elements/duet-page-heading.js +2 -2
  129. package/lib/dist-custom-elements/duet-pagination.js +7 -7
  130. package/lib/dist-custom-elements/duet-paragraph.js +1 -1
  131. package/lib/dist-custom-elements/duet-progress.js +1 -1
  132. package/lib/dist-custom-elements/duet-radio-group.js +6 -6
  133. package/lib/dist-custom-elements/duet-radio.js +1 -1
  134. package/lib/dist-custom-elements/duet-range-slider.js +2 -2
  135. package/lib/dist-custom-elements/duet-range-stepper.js +4 -4
  136. package/lib/dist-custom-elements/duet-scrollable.js +1 -1
  137. package/lib/dist-custom-elements/duet-section-layout.js +1 -1
  138. package/lib/dist-custom-elements/duet-select.js +1 -1
  139. package/lib/dist-custom-elements/duet-slideout-lang.js +2 -2
  140. package/lib/dist-custom-elements/duet-slideout-link.js +2 -2
  141. package/lib/dist-custom-elements/duet-slideout-panel-dropdown.js +2 -2
  142. package/lib/dist-custom-elements/duet-slideout-panel.js +2 -2
  143. package/lib/dist-custom-elements/duet-slideout.js +2 -2
  144. package/lib/dist-custom-elements/duet-spacer.js +1 -1
  145. package/lib/dist-custom-elements/duet-spinner.js +1 -1
  146. package/lib/dist-custom-elements/duet-step.js +4 -4
  147. package/lib/dist-custom-elements/duet-stepper.js +2 -2
  148. package/lib/dist-custom-elements/duet-submenu-bar-dropdown-link.js +2 -2
  149. package/lib/dist-custom-elements/duet-submenu-bar-dropdown.js +3 -3
  150. package/lib/dist-custom-elements/duet-submenu-bar-link.js +3 -3
  151. package/lib/dist-custom-elements/duet-submenu-bar.js +3 -3
  152. package/lib/dist-custom-elements/duet-tab-group.js +9 -9
  153. package/lib/dist-custom-elements/duet-tab.js +1 -1
  154. package/lib/dist-custom-elements/duet-table.js +1 -1
  155. package/lib/dist-custom-elements/duet-textarea.js +8 -8
  156. package/lib/dist-custom-elements/duet-toggle.js +2 -2
  157. package/lib/dist-custom-elements/duet-toolbar-dropdown-link.js +2 -2
  158. package/lib/dist-custom-elements/duet-toolbar-dropdown.js +2 -2
  159. package/lib/dist-custom-elements/duet-toolbar-link.js +2 -2
  160. package/lib/dist-custom-elements/duet-toolbar.js +1 -1
  161. package/lib/dist-custom-elements/duet-tooltip.js +1 -1
  162. package/lib/dist-custom-elements/duet-tray.js +3 -3
  163. package/lib/dist-custom-elements/duet-upload-aria-status.js +1 -1
  164. package/lib/dist-custom-elements/duet-upload.js +28 -20
  165. package/lib/dist-custom-elements/duet-visually-hidden.js +1 -1
  166. package/lib/dist-custom-elements/index.js +1 -1
  167. package/lib/dist-custom-elements/p-1635a5ff.js +1446 -0
  168. package/lib/dist-custom-elements/{p-6f0966d2.js → p-1d207f70.js} +4 -4
  169. package/lib/dist-custom-elements/{p-0a6a8f11.js → p-2a351223.js} +1 -1
  170. package/lib/dist-custom-elements/{p-f9c288b5.js → p-369a9e6b.js} +3 -3
  171. package/lib/dist-custom-elements/{p-9ed66812.js → p-3d6100be.js} +2 -2
  172. package/lib/dist-custom-elements/{p-4d0f9f83.js → p-4d20fcd1.js} +1 -1
  173. package/lib/dist-custom-elements/{p-70ef0e9d.js → p-5119f1dc.js} +5 -5
  174. package/lib/dist-custom-elements/{p-5962ecc8.js → p-5183d2cf.js} +1 -1
  175. package/lib/dist-custom-elements/{p-a2fa664a.js → p-53c27e8e.js} +1 -1
  176. package/lib/dist-custom-elements/{p-087e9427.js → p-62683175.js} +1 -1
  177. package/lib/dist-custom-elements/{p-d8ca2c64.js → p-649043a8.js} +2 -2
  178. package/lib/dist-custom-elements/{p-f5d77e8e.js → p-67365843.js} +1 -1
  179. package/lib/dist-custom-elements/{p-a78d941c.js → p-68be9a91.js} +1 -1
  180. package/lib/dist-custom-elements/{p-c4689e7b.js → p-783a8425.js} +2 -2
  181. package/lib/dist-custom-elements/{p-5c9bf9ba.js → p-7a905f45.js} +3 -3
  182. package/lib/dist-custom-elements/{p-0b141ef0.js → p-7e395433.js} +1 -1
  183. package/lib/dist-custom-elements/{p-57bb44bf.js → p-87df78c6.js} +1 -1
  184. package/lib/dist-custom-elements/{p-c638adb2.js → p-8bad78a6.js} +1 -1
  185. package/lib/dist-custom-elements/{p-4a060f56.js → p-93fab31d.js} +1 -1
  186. package/lib/dist-custom-elements/{p-8160f98e.js → p-99687f8f.js} +6 -6
  187. package/lib/dist-custom-elements/{p-cbc12626.js → p-9d1b018a.js} +1 -1
  188. package/lib/dist-custom-elements/{p-a3ba0ed5.js → p-c243ec01.js} +1 -1
  189. package/lib/{esm/tokens-0963dc8b.js → dist-custom-elements/p-cb9787ec.js} +1 -1
  190. package/lib/dist-custom-elements/{p-f5252ae4.js → p-cbb67f4e.js} +1 -1
  191. package/lib/dist-custom-elements/{p-75f47a29.js → p-d95944c8.js} +1 -1
  192. package/lib/dist-custom-elements/{p-a27921ba.js → p-e080ccaa.js} +1 -1
  193. package/lib/dist-custom-elements/{p-49ef7e25.js → p-e2a3c6fa.js} +2 -2
  194. package/lib/dist-custom-elements/{p-064985f6.js → p-e4e40736.js} +2 -2
  195. package/lib/dist-custom-elements/{p-a1863bda.js → p-efa5255b.js} +1 -1
  196. package/lib/dist-custom-elements/{p-db20025e.js → p-f0e99128.js} +8 -8
  197. package/lib/dist-custom-elements/{p-b5a87909.js → p-f2d8763d.js} +2 -2
  198. package/lib/dist-custom-elements/{p-d54ecc52.js → p-f83c1df9.js} +1 -1
  199. package/lib/duet/duet.esm.js +1 -1
  200. package/lib/duet/duet.js +1 -1
  201. package/lib/duet/p-01d38ac9.entry.js +4 -0
  202. package/lib/duet/{p-7ecff545.system.entry.js → p-029f96ec.system.entry.js} +1 -1
  203. package/lib/duet/{p-0c1051da.entry.js → p-03bd5373.entry.js} +1 -1
  204. package/lib/duet/{p-4c812d78.system.entry.js → p-04da22d7.system.entry.js} +1 -1
  205. package/lib/duet/{p-b154ecd8.system.entry.js → p-07d0ed0a.system.entry.js} +1 -1
  206. package/lib/duet/{p-b8705a85.entry.js → p-08693a37.entry.js} +1 -1
  207. package/lib/duet/{p-11749645.system.entry.js → p-097da893.system.entry.js} +1 -1
  208. package/lib/duet/{p-50ce994c.system.entry.js → p-09d4bac7.system.entry.js} +1 -1
  209. package/lib/duet/{p-9c483f1d.system.entry.js → p-0a03a862.system.entry.js} +1 -1
  210. package/lib/duet/{p-0626d8a9.entry.js → p-0a6ff475.entry.js} +1 -1
  211. package/lib/duet/{p-26f3b159.system.entry.js → p-0b752687.system.entry.js} +1 -1
  212. package/lib/duet/{p-0a317f12.entry.js → p-0cdc880e.entry.js} +1 -1
  213. package/lib/duet/{p-6e5abb84.system.entry.js → p-0e165a4e.system.entry.js} +1 -1
  214. package/lib/duet/{p-da5583ea.entry.js → p-0f80e2fc.entry.js} +1 -1
  215. package/lib/duet/{p-f6e2e71a.system.entry.js → p-0fc1b439.system.entry.js} +1 -1
  216. package/lib/duet/{p-49eef496.system.entry.js → p-1028e393.system.entry.js} +1 -1
  217. package/lib/duet/{p-940f11ad.system.entry.js → p-106abf71.system.entry.js} +1 -1
  218. package/lib/duet/{p-67176e9e.entry.js → p-12afe002.entry.js} +1 -1
  219. package/lib/duet/{p-5707ba42.system.entry.js → p-1396c277.system.entry.js} +1 -1
  220. package/lib/duet/p-151892ff.system.entry.js +4 -0
  221. package/lib/duet/{p-830be23d.system.entry.js → p-1677ce5c.system.entry.js} +1 -1
  222. package/lib/duet/{p-336c0409.system.entry.js → p-1a0b0fe9.system.entry.js} +1 -1
  223. package/lib/duet/{p-44268138.system.js → p-1c0453e0.system.js} +1 -1
  224. package/lib/duet/{p-5da36d9e.entry.js → p-1c0a39db.entry.js} +1 -1
  225. package/lib/duet/{p-ca405201.entry.js → p-2125b071.entry.js} +1 -1
  226. package/lib/duet/{p-a3b22a18.entry.js → p-2879b97d.entry.js} +1 -1
  227. package/lib/duet/{p-7a7ef869.entry.js → p-29b9e99e.entry.js} +1 -1
  228. package/lib/duet/{p-1eece5bf.system.entry.js → p-2bc4d34e.system.entry.js} +1 -1
  229. package/lib/duet/p-2c68ee2d.system.entry.js +4 -0
  230. package/lib/duet/{p-e6d1e0be.system.entry.js → p-2d5be93c.system.entry.js} +1 -1
  231. package/lib/duet/{p-4058cee8.entry.js → p-2d71fa26.entry.js} +1 -1
  232. package/lib/duet/{p-d656d96e.system.entry.js → p-32eecc8d.system.entry.js} +1 -1
  233. package/lib/duet/{p-a03c4dcd.system.entry.js → p-344134e5.system.entry.js} +1 -1
  234. package/lib/duet/{p-c9edd0bb.system.entry.js → p-36bca919.system.entry.js} +1 -1
  235. package/lib/duet/{p-a0876e2e.system.entry.js → p-3b1ff9be.system.entry.js} +1 -1
  236. package/lib/duet/{p-2c31977d.entry.js → p-3c88792b.entry.js} +1 -1
  237. package/lib/duet/{p-13540a69.system.entry.js → p-3d6d2012.system.entry.js} +1 -1
  238. package/lib/duet/{p-728c2f13.entry.js → p-3de9ea90.entry.js} +1 -1
  239. package/lib/duet/{p-482497cd.entry.js → p-3e2c87e6.entry.js} +1 -1
  240. package/lib/duet/{p-50df271c.entry.js → p-3e7b62a4.entry.js} +1 -1
  241. package/lib/duet/{p-653eb7ce.system.entry.js → p-401a454b.system.entry.js} +1 -1
  242. package/lib/duet/{p-aa79548d.system.entry.js → p-41a69e48.system.entry.js} +1 -1
  243. package/lib/duet/{p-3d31b17b.system.entry.js → p-42844e9d.system.entry.js} +1 -1
  244. package/lib/duet/{p-f2f60847.entry.js → p-44f22e6b.entry.js} +1 -1
  245. package/lib/duet/{p-0eb4217a.entry.js → p-458dd158.entry.js} +1 -1
  246. package/lib/duet/{p-c2757db1.entry.js → p-45fe4429.entry.js} +1 -1
  247. package/lib/duet/p-4634f44d.entry.js +4 -0
  248. package/lib/duet/{p-51adf63c.system.entry.js → p-466c4910.system.entry.js} +1 -1
  249. package/lib/duet/{p-475d42a8.system.entry.js → p-48ef2786.system.entry.js} +1 -1
  250. package/lib/duet/{p-bdc400cf.entry.js → p-4a4cbba5.entry.js} +1 -1
  251. package/lib/duet/{p-745645b0.entry.js → p-4c1fb962.entry.js} +1 -1
  252. package/lib/duet/{p-8b148f79.system.entry.js → p-4c7fb05f.system.entry.js} +1 -1
  253. package/lib/duet/{p-636e5f15.entry.js → p-4cb43c38.entry.js} +1 -1
  254. package/lib/duet/p-5074accf.entry.js +4 -0
  255. package/lib/duet/{p-81c05491.system.entry.js → p-5573222d.system.entry.js} +1 -1
  256. package/lib/duet/{p-b672280a.entry.js → p-57a26a2a.entry.js} +1 -1
  257. package/lib/duet/{p-a92d4f59.system.entry.js → p-5c17a74a.system.entry.js} +1 -1
  258. package/lib/duet/{p-c6793076.system.entry.js → p-5d15cd89.system.entry.js} +1 -1
  259. package/lib/duet/{p-d6149423.entry.js → p-5e6542bc.entry.js} +1 -1
  260. package/lib/duet/{p-c42f3a40.system.entry.js → p-5f7a2639.system.entry.js} +1 -1
  261. package/lib/duet/{p-83b776f5.system.entry.js → p-613156e6.system.entry.js} +2 -2
  262. package/lib/duet/{p-da4c713c.system.entry.js → p-62a63d5b.system.entry.js} +1 -1
  263. package/lib/duet/{p-4d0d61a7.entry.js → p-6325ae2d.entry.js} +1 -1
  264. package/lib/duet/p-66fbed51.entry.js +4 -0
  265. package/lib/duet/{p-4ec88753.entry.js → p-675f844b.entry.js} +1 -1
  266. package/lib/duet/{p-e66936a4.system.entry.js → p-68ee9bfa.system.entry.js} +1 -1
  267. package/lib/duet/{p-5b17dfea.system.entry.js → p-6a0f118b.system.entry.js} +1 -1
  268. package/lib/duet/{p-d71ba70b.system.entry.js → p-6ba40ef9.system.entry.js} +1 -1
  269. package/lib/duet/{p-5cfb7c71.entry.js → p-6dc868fd.entry.js} +1 -1
  270. package/lib/duet/{p-ffbb062e.system.entry.js → p-6dcce504.system.entry.js} +1 -1
  271. package/lib/duet/{p-955782ae.entry.js → p-70e49d00.entry.js} +1 -1
  272. package/lib/duet/p-752fb0a0.system.entry.js +4 -0
  273. package/lib/duet/{p-3429690e.entry.js → p-75316086.entry.js} +1 -1
  274. package/lib/duet/p-789a9af4.entry.js +4 -0
  275. package/lib/duet/{p-be4bb297.system.entry.js → p-79dd09a6.system.entry.js} +1 -1
  276. package/lib/duet/{p-825fa6d7.entry.js → p-79eb3572.entry.js} +1 -1
  277. package/lib/duet/{p-1f66cbb6.entry.js → p-7b99f674.entry.js} +1 -1
  278. package/lib/duet/{p-587e1ad0.system.js → p-7bab508c.system.js} +1 -1
  279. package/lib/duet/{p-35664bb6.system.entry.js → p-7cf776fa.system.entry.js} +1 -1
  280. package/lib/duet/{p-46e061d9.entry.js → p-7e3e70df.entry.js} +1 -1
  281. package/lib/duet/{p-02fd20f6.system.entry.js → p-7f94280a.system.entry.js} +1 -1
  282. package/lib/duet/p-7fefe439.entry.js +4 -0
  283. package/lib/duet/{p-49c7c6fb.system.entry.js → p-8349ff2d.system.entry.js} +1 -1
  284. package/lib/duet/{p-fbc7ad71.entry.js → p-853ac360.entry.js} +1 -1
  285. package/lib/duet/{p-9f1699dc.system.entry.js → p-8d5edbbe.system.entry.js} +1 -1
  286. package/lib/duet/{p-c192f269.system.entry.js → p-91be047f.system.entry.js} +1 -1
  287. package/lib/duet/{p-7345aff9.system.entry.js → p-92e94229.system.entry.js} +1 -1
  288. package/lib/duet/{p-0ec6a000.entry.js → p-93a2c807.entry.js} +1 -1
  289. package/lib/duet/{p-ce00f1fd.system.entry.js → p-97528238.system.entry.js} +1 -1
  290. package/lib/duet/{p-0bcdec8b.system.entry.js → p-9791ab1b.system.entry.js} +1 -1
  291. package/lib/duet/{p-d24ebe03.system.entry.js → p-97df072f.system.entry.js} +1 -1
  292. package/lib/duet/{p-b731849c.system.entry.js → p-981f2443.system.entry.js} +1 -1
  293. package/lib/duet/{p-af932bca.system.entry.js → p-98777ba0.system.entry.js} +1 -1
  294. package/lib/duet/{p-e078ba11.entry.js → p-991271a2.entry.js} +1 -1
  295. package/lib/duet/{p-14ab7ebe.system.entry.js → p-9916b7d2.system.entry.js} +1 -1
  296. package/lib/duet/{p-02b08c30.entry.js → p-9c127e8f.entry.js} +1 -1
  297. package/lib/duet/p-9ec19751.entry.js +4 -0
  298. package/lib/duet/p-9f81873c.entry.js +4 -0
  299. package/lib/duet/{p-8ab66620.system.entry.js → p-a042bc85.system.entry.js} +2 -2
  300. package/lib/duet/{p-01dc716d.entry.js → p-a1a8395b.entry.js} +1 -1
  301. package/lib/duet/{p-cafb90c2.entry.js → p-a341e9c3.entry.js} +1 -1
  302. package/lib/duet/{p-a74c2dff.entry.js → p-a653bb02.entry.js} +1 -1
  303. package/lib/duet/{p-474bacf0.entry.js → p-a6aba2d3.entry.js} +1 -1
  304. package/lib/duet/{p-628600fa.entry.js → p-a903a315.entry.js} +1 -1
  305. package/lib/duet/{p-8078b081.system.js → p-a9a7d16c.system.js} +1 -1
  306. package/lib/duet/{p-c03df848.entry.js → p-a9d7b38d.entry.js} +1 -1
  307. package/lib/duet/{p-de62f610.system.entry.js → p-afcfc528.system.entry.js} +1 -1
  308. package/lib/duet/{p-8d98f055.entry.js → p-b4ff5c09.entry.js} +1 -1
  309. package/lib/duet/{p-1522db1d.entry.js → p-b90cdb91.entry.js} +1 -1
  310. package/lib/duet/{p-b651d2d1.entry.js → p-bb97ab92.entry.js} +1 -1
  311. package/lib/duet/{p-c9854b35.system.entry.js → p-bef59086.system.entry.js} +1 -1
  312. package/lib/duet/{p-041b483b.entry.js → p-c39467e4.entry.js} +1 -1
  313. package/lib/duet/{p-e4faf457.entry.js → p-c50233e1.entry.js} +1 -1
  314. package/lib/duet/{p-7000ce85.system.entry.js → p-c504d7cd.system.entry.js} +1 -1
  315. package/lib/duet/{p-f3d588ab.entry.js → p-c56dd6d7.entry.js} +1 -1
  316. package/lib/duet/{p-d9ef6f51.system.entry.js → p-c6a321f1.system.entry.js} +1 -1
  317. package/lib/duet/{p-e65709fc.entry.js → p-c94a423f.entry.js} +1 -1
  318. package/lib/duet/{p-c4d8cad0.js → p-cb9787ec.js} +1 -1
  319. package/lib/duet/{p-cc5a3edc.js → p-cca182be.js} +1 -1
  320. package/lib/duet/{p-cdea33d4.entry.js → p-cff8b0b3.entry.js} +1 -1
  321. package/lib/duet/{p-22c2c6d5.system.entry.js → p-d1b6fd73.system.entry.js} +1 -1
  322. package/lib/duet/p-d3bba23f.entry.js +4 -0
  323. package/lib/duet/{p-23ec6f02.entry.js → p-d4d2569e.entry.js} +1 -1
  324. package/lib/duet/{p-cb9991a5.system.entry.js → p-d6196775.system.entry.js} +1 -1
  325. package/lib/duet/{p-d0857e1f.system.js → p-d7e6a4ed.system.js} +1 -1
  326. package/lib/duet/{p-4b457bad.system.entry.js → p-da04e483.system.entry.js} +1 -1
  327. package/lib/duet/{p-420af35d.system.entry.js → p-dc4b4a04.system.entry.js} +1 -1
  328. package/lib/duet/{p-40b5d6b7.entry.js → p-de82bfee.entry.js} +1 -1
  329. package/lib/duet/{p-9c5001ab.entry.js → p-df7481e8.entry.js} +1 -1
  330. package/lib/duet/{p-9d0b30a0.system.entry.js → p-e057d8c4.system.entry.js} +1 -1
  331. package/lib/duet/{p-d20fb807.entry.js → p-e05c4a5b.entry.js} +1 -1
  332. package/lib/duet/{p-56f913f0.system.entry.js → p-e0848924.system.entry.js} +1 -1
  333. package/lib/duet/{p-332dc9a8.entry.js → p-e5d2b68e.entry.js} +1 -1
  334. package/lib/duet/{p-a57772d2.system.entry.js → p-e65bc05f.system.entry.js} +1 -1
  335. package/lib/duet/{p-1eccf55b.system.entry.js → p-e6f92c08.system.entry.js} +1 -1
  336. package/lib/duet/{p-d82963c2.system.entry.js → p-ed16d00b.system.entry.js} +1 -1
  337. package/lib/duet/p-f5a74f01.js +4 -0
  338. package/lib/duet/p-f5fd8e55.entry.js +4 -0
  339. package/lib/duet/{p-9ebea289.entry.js → p-f691d0b6.entry.js} +1 -1
  340. package/lib/duet/{p-55bdc762.entry.js → p-f7fbc435.entry.js} +1 -1
  341. package/lib/duet/{p-e4f417fe.entry.js → p-f8d91f4b.entry.js} +1 -1
  342. package/lib/esm/duet-action-button.entry.js +1 -1
  343. package/lib/esm/duet-alert.entry.js +1 -1
  344. package/lib/esm/duet-badge.entry.js +1 -1
  345. package/lib/esm/duet-breadcrumb.entry.js +1 -1
  346. package/lib/esm/duet-breadcrumbs.entry.js +1 -1
  347. package/lib/esm/duet-button_2.entry.js +1 -1
  348. package/lib/esm/duet-callout.entry.js +5 -2
  349. package/lib/esm/duet-caption_4.entry.js +1 -1
  350. package/lib/esm/duet-card.entry.js +1 -1
  351. package/lib/esm/duet-checkbox.entry.js +1 -1
  352. package/lib/esm/duet-checkmark.entry.js +1 -1
  353. package/lib/esm/duet-choice_2.entry.js +5 -3
  354. package/lib/esm/duet-collapsible.entry.js +2 -2
  355. package/lib/esm/duet-combobox.entry.js +1 -1
  356. package/lib/esm/duet-contact-card.entry.js +1 -1
  357. package/lib/esm/duet-cookie-consent.entry.js +1 -1
  358. package/lib/esm/duet-date-picker.entry.js +2 -2
  359. package/lib/esm/duet-divider_2.entry.js +1 -1
  360. package/lib/esm/duet-editable-table_3.entry.js +12 -4
  361. package/lib/esm/duet-empty-state.entry.js +1 -1
  362. package/lib/esm/duet-fieldset.entry.js +1 -1
  363. package/lib/esm/duet-footer.entry.js +1 -1
  364. package/lib/esm/duet-grid_2.entry.js +2 -2
  365. package/lib/esm/duet-header_2.entry.js +2 -2
  366. package/lib/esm/duet-hero.entry.js +4 -3
  367. package/lib/esm/duet-icon.entry.js +1 -1
  368. package/lib/esm/duet-input_2.entry.js +1 -1
  369. package/lib/esm/duet-layout.entry.js +1 -1
  370. package/lib/esm/duet-list_2.entry.js +1 -1
  371. package/lib/esm/duet-menu-bar-button.entry.js +2 -2
  372. package/lib/esm/duet-menu-bar-dropdown-link.entry.js +1 -1
  373. package/lib/esm/duet-menu-bar-dropdown.entry.js +2 -2
  374. package/lib/esm/duet-menu-bar-link.entry.js +2 -2
  375. package/lib/esm/duet-menu-bar.entry.js +2 -2
  376. package/lib/esm/duet-modal.entry.js +2 -2
  377. package/lib/esm/duet-multiselect.entry.js +1 -1
  378. package/lib/esm/duet-nav.entry.js +1 -1
  379. package/lib/esm/duet-notification_2.entry.js +1 -1
  380. package/lib/esm/duet-number-input.entry.js +1 -1
  381. package/lib/esm/duet-page-heading.entry.js +1 -1
  382. package/lib/esm/duet-pagination_2.entry.js +1 -1
  383. package/lib/esm/duet-progress.entry.js +1 -1
  384. package/lib/esm/duet-radio_2.entry.js +1 -1
  385. package/lib/esm/duet-range-slider.entry.js +1 -1
  386. package/lib/esm/duet-scrollable_3.entry.js +1 -1
  387. package/lib/esm/duet-section-layout.entry.js +1 -1
  388. package/lib/esm/duet-select.entry.js +1 -1
  389. package/lib/esm/duet-slideout-lang.entry.js +1 -1
  390. package/lib/esm/duet-slideout-link.entry.js +1 -1
  391. package/lib/esm/duet-slideout-panel-dropdown.entry.js +1 -1
  392. package/lib/esm/duet-slideout-panel.entry.js +2 -2
  393. package/lib/esm/duet-slideout.entry.js +2 -2
  394. package/lib/esm/duet-step_2.entry.js +1 -1
  395. package/lib/esm/duet-submenu-bar-dropdown-link.entry.js +1 -1
  396. package/lib/esm/duet-submenu-bar-dropdown.entry.js +2 -2
  397. package/lib/esm/duet-submenu-bar-link.entry.js +2 -2
  398. package/lib/esm/duet-submenu-bar.entry.js +2 -2
  399. package/lib/esm/duet-textarea.entry.js +1 -1
  400. package/lib/esm/duet-toggle.entry.js +1 -1
  401. package/lib/esm/duet-toolbar-dropdown-link.entry.js +1 -1
  402. package/lib/esm/duet-toolbar-dropdown.entry.js +1 -1
  403. package/lib/esm/duet-toolbar-link.entry.js +1 -1
  404. package/lib/esm/duet-toolbar.entry.js +1 -1
  405. package/lib/esm/duet-tooltip.entry.js +1220 -48
  406. package/lib/esm/duet-tray.entry.js +1 -1
  407. package/lib/esm/duet-upload-aria-status.entry.js +1 -1
  408. package/lib/esm/duet-visually-hidden.entry.js +1 -1
  409. package/lib/esm/duet.js +3 -3
  410. package/lib/esm/{focus-utils-b482bcb1.js → focus-utils-1e6af8c1.js} +1 -1
  411. package/lib/esm/{index-5a68b13e.js → index-77de1d56.js} +1 -1
  412. package/lib/esm/loader.js +3 -3
  413. package/lib/{dist-custom-elements/p-c4d8cad0.js → esm/tokens-20d688dc.js} +1 -1
  414. package/lib/esm-es5/duet-action-button.entry.js +1 -1
  415. package/lib/esm-es5/duet-alert.entry.js +1 -1
  416. package/lib/esm-es5/duet-badge.entry.js +1 -1
  417. package/lib/esm-es5/duet-breadcrumb.entry.js +1 -1
  418. package/lib/esm-es5/duet-breadcrumbs.entry.js +1 -1
  419. package/lib/esm-es5/duet-button_2.entry.js +1 -1
  420. package/lib/esm-es5/duet-callout.entry.js +1 -1
  421. package/lib/esm-es5/duet-caption_4.entry.js +1 -1
  422. package/lib/esm-es5/duet-card.entry.js +1 -1
  423. package/lib/esm-es5/duet-checkbox.entry.js +1 -1
  424. package/lib/esm-es5/duet-checkmark.entry.js +1 -1
  425. package/lib/esm-es5/duet-choice_2.entry.js +1 -1
  426. package/lib/esm-es5/duet-collapsible.entry.js +1 -1
  427. package/lib/esm-es5/duet-combobox.entry.js +1 -1
  428. package/lib/esm-es5/duet-contact-card.entry.js +1 -1
  429. package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
  430. package/lib/esm-es5/duet-date-picker.entry.js +1 -1
  431. package/lib/esm-es5/duet-divider_2.entry.js +1 -1
  432. package/lib/esm-es5/duet-editable-table_3.entry.js +1 -1
  433. package/lib/esm-es5/duet-empty-state.entry.js +1 -1
  434. package/lib/esm-es5/duet-fieldset.entry.js +1 -1
  435. package/lib/esm-es5/duet-footer.entry.js +1 -1
  436. package/lib/esm-es5/duet-grid_2.entry.js +1 -1
  437. package/lib/esm-es5/duet-header_2.entry.js +1 -1
  438. package/lib/esm-es5/duet-hero.entry.js +1 -1
  439. package/lib/esm-es5/duet-icon.entry.js +1 -1
  440. package/lib/esm-es5/duet-input_2.entry.js +1 -1
  441. package/lib/esm-es5/duet-layout.entry.js +1 -1
  442. package/lib/esm-es5/duet-list_2.entry.js +1 -1
  443. package/lib/esm-es5/duet-menu-bar-button.entry.js +1 -1
  444. package/lib/esm-es5/duet-menu-bar-dropdown-link.entry.js +1 -1
  445. package/lib/esm-es5/duet-menu-bar-dropdown.entry.js +1 -1
  446. package/lib/esm-es5/duet-menu-bar-link.entry.js +1 -1
  447. package/lib/esm-es5/duet-menu-bar.entry.js +1 -1
  448. package/lib/esm-es5/duet-modal.entry.js +1 -1
  449. package/lib/esm-es5/duet-multiselect.entry.js +1 -1
  450. package/lib/esm-es5/duet-nav.entry.js +1 -1
  451. package/lib/esm-es5/duet-notification_2.entry.js +1 -1
  452. package/lib/esm-es5/duet-number-input.entry.js +1 -1
  453. package/lib/esm-es5/duet-page-heading.entry.js +1 -1
  454. package/lib/esm-es5/duet-pagination_2.entry.js +1 -1
  455. package/lib/esm-es5/duet-progress.entry.js +1 -1
  456. package/lib/esm-es5/duet-radio_2.entry.js +1 -1
  457. package/lib/esm-es5/duet-range-slider.entry.js +1 -1
  458. package/lib/esm-es5/duet-scrollable_3.entry.js +1 -1
  459. package/lib/esm-es5/duet-section-layout.entry.js +1 -1
  460. package/lib/esm-es5/duet-select.entry.js +1 -1
  461. package/lib/esm-es5/duet-slideout-lang.entry.js +1 -1
  462. package/lib/esm-es5/duet-slideout-link.entry.js +1 -1
  463. package/lib/esm-es5/duet-slideout-panel-dropdown.entry.js +1 -1
  464. package/lib/esm-es5/duet-slideout-panel.entry.js +1 -1
  465. package/lib/esm-es5/duet-slideout.entry.js +2 -2
  466. package/lib/esm-es5/duet-step_2.entry.js +1 -1
  467. package/lib/esm-es5/duet-submenu-bar-dropdown-link.entry.js +1 -1
  468. package/lib/esm-es5/duet-submenu-bar-dropdown.entry.js +1 -1
  469. package/lib/esm-es5/duet-submenu-bar-link.entry.js +1 -1
  470. package/lib/esm-es5/duet-submenu-bar.entry.js +1 -1
  471. package/lib/esm-es5/duet-textarea.entry.js +1 -1
  472. package/lib/esm-es5/duet-toggle.entry.js +1 -1
  473. package/lib/esm-es5/duet-toolbar-dropdown-link.entry.js +1 -1
  474. package/lib/esm-es5/duet-toolbar-dropdown.entry.js +1 -1
  475. package/lib/esm-es5/duet-toolbar-link.entry.js +1 -1
  476. package/lib/esm-es5/duet-toolbar.entry.js +1 -1
  477. package/lib/esm-es5/duet-tooltip.entry.js +2 -2
  478. package/lib/esm-es5/duet-tray.entry.js +1 -1
  479. package/lib/esm-es5/duet-upload-aria-status.entry.js +1 -1
  480. package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
  481. package/lib/esm-es5/duet.js +1 -1
  482. package/lib/esm-es5/{focus-utils-b482bcb1.js → focus-utils-1e6af8c1.js} +1 -1
  483. package/lib/esm-es5/{index-5a68b13e.js → index-77de1d56.js} +1 -1
  484. package/lib/esm-es5/loader.js +1 -1
  485. package/lib/esm-es5/{tokens-0963dc8b.js → tokens-20d688dc.js} +1 -1
  486. package/lib/types/components/duet-callout/duet-callout.d.ts +2 -0
  487. package/lib/types/components/duet-hero/duet-hero.d.ts +2 -0
  488. package/lib/types/components/duet-tooltip/duet-tooltip.d.ts +8 -7
  489. package/lib/types/components/duet-upload/duet-upload.d.ts +1 -1
  490. package/lib/types/components.d.ts +2 -2
  491. package/package.json +6 -5
  492. package/lib/dist-custom-elements/p-98c77c8d.js +0 -272
  493. package/lib/duet/p-2b1f8599.system.entry.js +0 -4
  494. package/lib/duet/p-3877d445.entry.js +0 -4
  495. package/lib/duet/p-42e60321.entry.js +0 -4
  496. package/lib/duet/p-4af2f77a.entry.js +0 -4
  497. package/lib/duet/p-60912840.entry.js +0 -4
  498. package/lib/duet/p-624d38a3.system.entry.js +0 -4
  499. package/lib/duet/p-673a6c11.entry.js +0 -4
  500. package/lib/duet/p-793dcfc2.js +0 -4
  501. package/lib/duet/p-95eb41b3.system.entry.js +0 -4
  502. package/lib/duet/p-a7953c81.entry.js +0 -4
  503. package/lib/duet/p-b1ae5c07.entry.js +0 -4
  504. package/lib/duet/p-b89cad4d.entry.js +0 -4
  505. package/lib/duet/p-bf4ceb06.entry.js +0 -4
  506. package/lib/duet/p-d5f65552.entry.js +0 -4
@@ -0,0 +1,1446 @@
1
+ /*!
2
+ * Built with Duet Design System
3
+ */
4
+ import { p as proxyCustomElement, H, h, d as Host } from './p-efa5255b.js';
5
+ import { m as media_query_medium, a as media_query_large } from './p-cb9787ec.js';
6
+ import { i as inheritGlobalTheme } from './p-4ebf1618.js';
7
+ import { c as createID } from './p-c1325e35.js';
8
+ import { g as getLanguage, a as getLocaleString, c as connectLanguageChangeObserver, d as disconnectLanguageChangeObserver } from './p-076452be.js';
9
+ import { d as defineCustomElement$2 } from './p-67365843.js';
10
+ import { d as defineCustomElement$1 } from './p-c243ec01.js';
11
+
12
+ function getAlignment(placement) {
13
+ return placement.split('-')[1];
14
+ }
15
+
16
+ function getLengthFromAxis(axis) {
17
+ return axis === 'y' ? 'height' : 'width';
18
+ }
19
+
20
+ function getSide(placement) {
21
+ return placement.split('-')[0];
22
+ }
23
+
24
+ function getMainAxisFromPlacement(placement) {
25
+ return ['top', 'bottom'].includes(getSide(placement)) ? 'x' : 'y';
26
+ }
27
+
28
+ function computeCoordsFromPlacement(_ref, placement, rtl) {
29
+ let {
30
+ reference,
31
+ floating
32
+ } = _ref;
33
+ const commonX = reference.x + reference.width / 2 - floating.width / 2;
34
+ const commonY = reference.y + reference.height / 2 - floating.height / 2;
35
+ const mainAxis = getMainAxisFromPlacement(placement);
36
+ const length = getLengthFromAxis(mainAxis);
37
+ const commonAlign = reference[length] / 2 - floating[length] / 2;
38
+ const side = getSide(placement);
39
+ const isVertical = mainAxis === 'x';
40
+ let coords;
41
+ switch (side) {
42
+ case 'top':
43
+ coords = {
44
+ x: commonX,
45
+ y: reference.y - floating.height
46
+ };
47
+ break;
48
+ case 'bottom':
49
+ coords = {
50
+ x: commonX,
51
+ y: reference.y + reference.height
52
+ };
53
+ break;
54
+ case 'right':
55
+ coords = {
56
+ x: reference.x + reference.width,
57
+ y: commonY
58
+ };
59
+ break;
60
+ case 'left':
61
+ coords = {
62
+ x: reference.x - floating.width,
63
+ y: commonY
64
+ };
65
+ break;
66
+ default:
67
+ coords = {
68
+ x: reference.x,
69
+ y: reference.y
70
+ };
71
+ }
72
+ switch (getAlignment(placement)) {
73
+ case 'start':
74
+ coords[mainAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
75
+ break;
76
+ case 'end':
77
+ coords[mainAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
78
+ break;
79
+ }
80
+ return coords;
81
+ }
82
+
83
+ /**
84
+ * Computes the `x` and `y` coordinates that will place the floating element
85
+ * next to a reference element when it is given a certain positioning strategy.
86
+ *
87
+ * This export does not have any `platform` interface logic. You will need to
88
+ * write one for the platform you are using Floating UI with.
89
+ */
90
+ const computePosition$1 = async (reference, floating, config) => {
91
+ const {
92
+ placement = 'bottom',
93
+ strategy = 'absolute',
94
+ middleware = [],
95
+ platform
96
+ } = config;
97
+ const validMiddleware = middleware.filter(Boolean);
98
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
99
+ let rects = await platform.getElementRects({
100
+ reference,
101
+ floating,
102
+ strategy
103
+ });
104
+ let {
105
+ x,
106
+ y
107
+ } = computeCoordsFromPlacement(rects, placement, rtl);
108
+ let statefulPlacement = placement;
109
+ let middlewareData = {};
110
+ let resetCount = 0;
111
+ for (let i = 0; i < validMiddleware.length; i++) {
112
+ const {
113
+ name,
114
+ fn
115
+ } = validMiddleware[i];
116
+ const {
117
+ x: nextX,
118
+ y: nextY,
119
+ data,
120
+ reset
121
+ } = await fn({
122
+ x,
123
+ y,
124
+ initialPlacement: placement,
125
+ placement: statefulPlacement,
126
+ strategy,
127
+ middlewareData,
128
+ rects,
129
+ platform,
130
+ elements: {
131
+ reference,
132
+ floating
133
+ }
134
+ });
135
+ x = nextX != null ? nextX : x;
136
+ y = nextY != null ? nextY : y;
137
+ middlewareData = {
138
+ ...middlewareData,
139
+ [name]: {
140
+ ...middlewareData[name],
141
+ ...data
142
+ }
143
+ };
144
+ if (reset && resetCount <= 50) {
145
+ resetCount++;
146
+ if (typeof reset === 'object') {
147
+ if (reset.placement) {
148
+ statefulPlacement = reset.placement;
149
+ }
150
+ if (reset.rects) {
151
+ rects = reset.rects === true ? await platform.getElementRects({
152
+ reference,
153
+ floating,
154
+ strategy
155
+ }) : reset.rects;
156
+ }
157
+ ({
158
+ x,
159
+ y
160
+ } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
161
+ }
162
+ i = -1;
163
+ continue;
164
+ }
165
+ }
166
+ return {
167
+ x,
168
+ y,
169
+ placement: statefulPlacement,
170
+ strategy,
171
+ middlewareData
172
+ };
173
+ };
174
+
175
+ function expandPaddingObject(padding) {
176
+ return {
177
+ top: 0,
178
+ right: 0,
179
+ bottom: 0,
180
+ left: 0,
181
+ ...padding
182
+ };
183
+ }
184
+
185
+ function getSideObjectFromPadding(padding) {
186
+ return typeof padding !== 'number' ? expandPaddingObject(padding) : {
187
+ top: padding,
188
+ right: padding,
189
+ bottom: padding,
190
+ left: padding
191
+ };
192
+ }
193
+
194
+ function rectToClientRect(rect) {
195
+ return {
196
+ ...rect,
197
+ top: rect.y,
198
+ left: rect.x,
199
+ right: rect.x + rect.width,
200
+ bottom: rect.y + rect.height
201
+ };
202
+ }
203
+
204
+ /**
205
+ * Resolves with an object of overflow side offsets that determine how much the
206
+ * element is overflowing a given clipping boundary on each side.
207
+ * - positive = overflowing the boundary by that number of pixels
208
+ * - negative = how many pixels left before it will overflow
209
+ * - 0 = lies flush with the boundary
210
+ * @see https://floating-ui.com/docs/detectOverflow
211
+ */
212
+ async function detectOverflow(state, options) {
213
+ var _await$platform$isEle;
214
+ if (options === void 0) {
215
+ options = {};
216
+ }
217
+ const {
218
+ x,
219
+ y,
220
+ platform,
221
+ rects,
222
+ elements,
223
+ strategy
224
+ } = state;
225
+ const {
226
+ boundary = 'clippingAncestors',
227
+ rootBoundary = 'viewport',
228
+ elementContext = 'floating',
229
+ altBoundary = false,
230
+ padding = 0
231
+ } = options;
232
+ const paddingObject = getSideObjectFromPadding(padding);
233
+ const altContext = elementContext === 'floating' ? 'reference' : 'floating';
234
+ const element = elements[altBoundary ? altContext : elementContext];
235
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
236
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
237
+ boundary,
238
+ rootBoundary,
239
+ strategy
240
+ }));
241
+ const rect = elementContext === 'floating' ? {
242
+ ...rects.floating,
243
+ x,
244
+ y
245
+ } : rects.reference;
246
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
247
+ const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
248
+ x: 1,
249
+ y: 1
250
+ } : {
251
+ x: 1,
252
+ y: 1
253
+ };
254
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
255
+ rect,
256
+ offsetParent,
257
+ strategy
258
+ }) : rect);
259
+ return {
260
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
261
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
262
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
263
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
264
+ };
265
+ }
266
+
267
+ const min$1 = Math.min;
268
+ const max$1 = Math.max;
269
+
270
+ function within(min$1$1, value, max$1$1) {
271
+ return max$1(min$1$1, min$1(value, max$1$1));
272
+ }
273
+
274
+ /**
275
+ * Provides data to position an inner element of the floating element so that it
276
+ * appears centered to the reference element.
277
+ * @see https://floating-ui.com/docs/arrow
278
+ */
279
+ const arrow = options => ({
280
+ name: 'arrow',
281
+ options,
282
+ async fn(state) {
283
+ // Since `element` is required, we don't Partial<> the type.
284
+ const {
285
+ element,
286
+ padding = 0
287
+ } = options || {};
288
+ const {
289
+ x,
290
+ y,
291
+ placement,
292
+ rects,
293
+ platform,
294
+ elements
295
+ } = state;
296
+ if (element == null) {
297
+ return {};
298
+ }
299
+ const paddingObject = getSideObjectFromPadding(padding);
300
+ const coords = {
301
+ x,
302
+ y
303
+ };
304
+ const axis = getMainAxisFromPlacement(placement);
305
+ const length = getLengthFromAxis(axis);
306
+ const arrowDimensions = await platform.getDimensions(element);
307
+ const isYAxis = axis === 'y';
308
+ const minProp = isYAxis ? 'top' : 'left';
309
+ const maxProp = isYAxis ? 'bottom' : 'right';
310
+ const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';
311
+ const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
312
+ const startDiff = coords[axis] - rects.reference[axis];
313
+ const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
314
+ let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
315
+
316
+ // DOM platform can return `window` as the `offsetParent`.
317
+ if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {
318
+ clientSize = elements.floating[clientProp] || rects.floating[length];
319
+ }
320
+ const centerToReference = endDiff / 2 - startDiff / 2;
321
+
322
+ // Make sure the arrow doesn't overflow the floating element if the center
323
+ // point is outside the floating element's bounds.
324
+ const min = paddingObject[minProp];
325
+ const max = clientSize - arrowDimensions[length] - paddingObject[maxProp];
326
+ const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
327
+ const offset = within(min, center, max);
328
+
329
+ // If the reference is small enough that the arrow's padding causes it to
330
+ // to point to nothing for an aligned placement, adjust the offset of the
331
+ // floating element itself. This stops `shift()` from taking action, but can
332
+ // be worked around by calling it again after the `arrow()` if desired.
333
+ const shouldAddOffset = getAlignment(placement) != null && center != offset && rects.reference[length] / 2 - (center < min ? paddingObject[minProp] : paddingObject[maxProp]) - arrowDimensions[length] / 2 < 0;
334
+ const alignmentOffset = shouldAddOffset ? center < min ? min - center : max - center : 0;
335
+ return {
336
+ [axis]: coords[axis] - alignmentOffset,
337
+ data: {
338
+ [axis]: offset,
339
+ centerOffset: center - offset
340
+ }
341
+ };
342
+ }
343
+ });
344
+
345
+ const oppositeSideMap = {
346
+ left: 'right',
347
+ right: 'left',
348
+ bottom: 'top',
349
+ top: 'bottom'
350
+ };
351
+ function getOppositePlacement(placement) {
352
+ return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
353
+ }
354
+
355
+ function getAlignmentSides(placement, rects, rtl) {
356
+ if (rtl === void 0) {
357
+ rtl = false;
358
+ }
359
+ const alignment = getAlignment(placement);
360
+ const mainAxis = getMainAxisFromPlacement(placement);
361
+ const length = getLengthFromAxis(mainAxis);
362
+ let mainAlignmentSide = mainAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
363
+ if (rects.reference[length] > rects.floating[length]) {
364
+ mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
365
+ }
366
+ return {
367
+ main: mainAlignmentSide,
368
+ cross: getOppositePlacement(mainAlignmentSide)
369
+ };
370
+ }
371
+
372
+ const oppositeAlignmentMap = {
373
+ start: 'end',
374
+ end: 'start'
375
+ };
376
+ function getOppositeAlignmentPlacement(placement) {
377
+ return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
378
+ }
379
+
380
+ function getExpandedPlacements(placement) {
381
+ const oppositePlacement = getOppositePlacement(placement);
382
+ return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
383
+ }
384
+
385
+ function getSideList(side, isStart, rtl) {
386
+ const lr = ['left', 'right'];
387
+ const rl = ['right', 'left'];
388
+ const tb = ['top', 'bottom'];
389
+ const bt = ['bottom', 'top'];
390
+ switch (side) {
391
+ case 'top':
392
+ case 'bottom':
393
+ if (rtl) return isStart ? rl : lr;
394
+ return isStart ? lr : rl;
395
+ case 'left':
396
+ case 'right':
397
+ return isStart ? tb : bt;
398
+ default:
399
+ return [];
400
+ }
401
+ }
402
+ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
403
+ const alignment = getAlignment(placement);
404
+ let list = getSideList(getSide(placement), direction === 'start', rtl);
405
+ if (alignment) {
406
+ list = list.map(side => side + "-" + alignment);
407
+ if (flipAlignment) {
408
+ list = list.concat(list.map(getOppositeAlignmentPlacement));
409
+ }
410
+ }
411
+ return list;
412
+ }
413
+
414
+ /**
415
+ * Optimizes the visibility of the floating element by flipping the `placement`
416
+ * in order to keep it in view when the preferred placement(s) will overflow the
417
+ * clipping boundary. Alternative to `autoPlacement`.
418
+ * @see https://floating-ui.com/docs/flip
419
+ */
420
+ const flip = function (options) {
421
+ if (options === void 0) {
422
+ options = {};
423
+ }
424
+ return {
425
+ name: 'flip',
426
+ options,
427
+ async fn(state) {
428
+ var _middlewareData$flip;
429
+ const {
430
+ placement,
431
+ middlewareData,
432
+ rects,
433
+ initialPlacement,
434
+ platform,
435
+ elements
436
+ } = state;
437
+ const {
438
+ mainAxis: checkMainAxis = true,
439
+ crossAxis: checkCrossAxis = true,
440
+ fallbackPlacements: specifiedFallbackPlacements,
441
+ fallbackStrategy = 'bestFit',
442
+ fallbackAxisSideDirection = 'none',
443
+ flipAlignment = true,
444
+ ...detectOverflowOptions
445
+ } = options;
446
+ const side = getSide(placement);
447
+ const isBasePlacement = getSide(initialPlacement) === initialPlacement;
448
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
449
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
450
+ if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') {
451
+ fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
452
+ }
453
+ const placements = [initialPlacement, ...fallbackPlacements];
454
+ const overflow = await detectOverflow(state, detectOverflowOptions);
455
+ const overflows = [];
456
+ let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
457
+ if (checkMainAxis) {
458
+ overflows.push(overflow[side]);
459
+ }
460
+ if (checkCrossAxis) {
461
+ const {
462
+ main,
463
+ cross
464
+ } = getAlignmentSides(placement, rects, rtl);
465
+ overflows.push(overflow[main], overflow[cross]);
466
+ }
467
+ overflowsData = [...overflowsData, {
468
+ placement,
469
+ overflows
470
+ }];
471
+
472
+ // One or more sides is overflowing.
473
+ if (!overflows.every(side => side <= 0)) {
474
+ var _middlewareData$flip2, _overflowsData$filter;
475
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
476
+ const nextPlacement = placements[nextIndex];
477
+ if (nextPlacement) {
478
+ // Try next placement and re-run the lifecycle.
479
+ return {
480
+ data: {
481
+ index: nextIndex,
482
+ overflows: overflowsData
483
+ },
484
+ reset: {
485
+ placement: nextPlacement
486
+ }
487
+ };
488
+ }
489
+
490
+ // First, find the candidates that fit on the mainAxis side of overflow,
491
+ // then find the placement that fits the best on the main crossAxis side.
492
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
493
+
494
+ // Otherwise fallback.
495
+ if (!resetPlacement) {
496
+ switch (fallbackStrategy) {
497
+ case 'bestFit':
498
+ {
499
+ var _overflowsData$map$so;
500
+ const placement = (_overflowsData$map$so = overflowsData.map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];
501
+ if (placement) {
502
+ resetPlacement = placement;
503
+ }
504
+ break;
505
+ }
506
+ case 'initialPlacement':
507
+ resetPlacement = initialPlacement;
508
+ break;
509
+ }
510
+ }
511
+ if (placement !== resetPlacement) {
512
+ return {
513
+ reset: {
514
+ placement: resetPlacement
515
+ }
516
+ };
517
+ }
518
+ }
519
+ return {};
520
+ }
521
+ };
522
+ };
523
+
524
+ function getCrossAxis(axis) {
525
+ return axis === 'x' ? 'y' : 'x';
526
+ }
527
+
528
+ /**
529
+ * Optimizes the visibility of the floating element by shifting it in order to
530
+ * keep it in view when it will overflow the clipping boundary.
531
+ * @see https://floating-ui.com/docs/shift
532
+ */
533
+ const shift = function (options) {
534
+ if (options === void 0) {
535
+ options = {};
536
+ }
537
+ return {
538
+ name: 'shift',
539
+ options,
540
+ async fn(state) {
541
+ const {
542
+ x,
543
+ y,
544
+ placement
545
+ } = state;
546
+ const {
547
+ mainAxis: checkMainAxis = true,
548
+ crossAxis: checkCrossAxis = false,
549
+ limiter = {
550
+ fn: _ref => {
551
+ let {
552
+ x,
553
+ y
554
+ } = _ref;
555
+ return {
556
+ x,
557
+ y
558
+ };
559
+ }
560
+ },
561
+ ...detectOverflowOptions
562
+ } = options;
563
+ const coords = {
564
+ x,
565
+ y
566
+ };
567
+ const overflow = await detectOverflow(state, detectOverflowOptions);
568
+ const mainAxis = getMainAxisFromPlacement(getSide(placement));
569
+ const crossAxis = getCrossAxis(mainAxis);
570
+ let mainAxisCoord = coords[mainAxis];
571
+ let crossAxisCoord = coords[crossAxis];
572
+ if (checkMainAxis) {
573
+ const minSide = mainAxis === 'y' ? 'top' : 'left';
574
+ const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
575
+ const min = mainAxisCoord + overflow[minSide];
576
+ const max = mainAxisCoord - overflow[maxSide];
577
+ mainAxisCoord = within(min, mainAxisCoord, max);
578
+ }
579
+ if (checkCrossAxis) {
580
+ const minSide = crossAxis === 'y' ? 'top' : 'left';
581
+ const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
582
+ const min = crossAxisCoord + overflow[minSide];
583
+ const max = crossAxisCoord - overflow[maxSide];
584
+ crossAxisCoord = within(min, crossAxisCoord, max);
585
+ }
586
+ const limitedCoords = limiter.fn({
587
+ ...state,
588
+ [mainAxis]: mainAxisCoord,
589
+ [crossAxis]: crossAxisCoord
590
+ });
591
+ return {
592
+ ...limitedCoords,
593
+ data: {
594
+ x: limitedCoords.x - x,
595
+ y: limitedCoords.y - y
596
+ }
597
+ };
598
+ }
599
+ };
600
+ };
601
+
602
+ function getWindow(node) {
603
+ var _node$ownerDocument;
604
+ return ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
605
+ }
606
+
607
+ function getComputedStyle$1(element) {
608
+ return getWindow(element).getComputedStyle(element);
609
+ }
610
+
611
+ function isNode(value) {
612
+ return value instanceof getWindow(value).Node;
613
+ }
614
+ function getNodeName(node) {
615
+ return isNode(node) ? (node.nodeName || '').toLowerCase() : '';
616
+ }
617
+
618
+ function isHTMLElement(value) {
619
+ return value instanceof getWindow(value).HTMLElement;
620
+ }
621
+ function isElement(value) {
622
+ return value instanceof getWindow(value).Element;
623
+ }
624
+ function isShadowRoot(node) {
625
+ // Browsers without `ShadowRoot` support.
626
+ if (typeof ShadowRoot === 'undefined') {
627
+ return false;
628
+ }
629
+ const OwnElement = getWindow(node).ShadowRoot;
630
+ return node instanceof OwnElement || node instanceof ShadowRoot;
631
+ }
632
+ function isOverflowElement(element) {
633
+ const {
634
+ overflow,
635
+ overflowX,
636
+ overflowY,
637
+ display
638
+ } = getComputedStyle$1(element);
639
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
640
+ }
641
+ function isTableElement(element) {
642
+ return ['table', 'td', 'th'].includes(getNodeName(element));
643
+ }
644
+ function isContainingBlock(element) {
645
+ const safari = isSafari();
646
+ const css = getComputedStyle$1(element);
647
+
648
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
649
+ return css.transform !== 'none' || css.perspective !== 'none' || !safari && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !safari && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
650
+ }
651
+ function isSafari() {
652
+ if (typeof CSS === 'undefined' || !CSS.supports) return false;
653
+ return CSS.supports('-webkit-backdrop-filter', 'none');
654
+ }
655
+ function isLastTraversableNode(node) {
656
+ return ['html', 'body', '#document'].includes(getNodeName(node));
657
+ }
658
+
659
+ const min = Math.min;
660
+ const max = Math.max;
661
+ const round = Math.round;
662
+
663
+ function getCssDimensions(element) {
664
+ const css = getComputedStyle$1(element);
665
+ // In testing environments, the `width` and `height` properties are empty
666
+ // strings for SVG elements, returning NaN. Fallback to `0` in this case.
667
+ let width = parseFloat(css.width) || 0;
668
+ let height = parseFloat(css.height) || 0;
669
+ const hasOffset = isHTMLElement(element);
670
+ const offsetWidth = hasOffset ? element.offsetWidth : width;
671
+ const offsetHeight = hasOffset ? element.offsetHeight : height;
672
+ const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
673
+ if (shouldFallback) {
674
+ width = offsetWidth;
675
+ height = offsetHeight;
676
+ }
677
+ return {
678
+ width,
679
+ height,
680
+ fallback: shouldFallback
681
+ };
682
+ }
683
+
684
+ function unwrapElement(element) {
685
+ return !isElement(element) ? element.contextElement : element;
686
+ }
687
+
688
+ const FALLBACK_SCALE = {
689
+ x: 1,
690
+ y: 1
691
+ };
692
+ function getScale(element) {
693
+ const domElement = unwrapElement(element);
694
+ if (!isHTMLElement(domElement)) {
695
+ return FALLBACK_SCALE;
696
+ }
697
+ const rect = domElement.getBoundingClientRect();
698
+ const {
699
+ width,
700
+ height,
701
+ fallback
702
+ } = getCssDimensions(domElement);
703
+ let x = (fallback ? round(rect.width) : rect.width) / width;
704
+ let y = (fallback ? round(rect.height) : rect.height) / height;
705
+
706
+ // 0, NaN, or Infinity should always fallback to 1.
707
+
708
+ if (!x || !Number.isFinite(x)) {
709
+ x = 1;
710
+ }
711
+ if (!y || !Number.isFinite(y)) {
712
+ y = 1;
713
+ }
714
+ return {
715
+ x,
716
+ y
717
+ };
718
+ }
719
+
720
+ const noOffsets = {
721
+ x: 0,
722
+ y: 0
723
+ };
724
+ function getVisualOffsets(element, isFixed, floatingOffsetParent) {
725
+ var _win$visualViewport, _win$visualViewport2;
726
+ if (isFixed === void 0) {
727
+ isFixed = true;
728
+ }
729
+ if (!isSafari()) {
730
+ return noOffsets;
731
+ }
732
+ const win = element ? getWindow(element) : window;
733
+ if (!floatingOffsetParent || isFixed && floatingOffsetParent !== win) {
734
+ return noOffsets;
735
+ }
736
+ return {
737
+ x: ((_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) || 0,
738
+ y: ((_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) || 0
739
+ };
740
+ }
741
+
742
+ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
743
+ if (includeScale === void 0) {
744
+ includeScale = false;
745
+ }
746
+ if (isFixedStrategy === void 0) {
747
+ isFixedStrategy = false;
748
+ }
749
+ const clientRect = element.getBoundingClientRect();
750
+ const domElement = unwrapElement(element);
751
+ let scale = FALLBACK_SCALE;
752
+ if (includeScale) {
753
+ if (offsetParent) {
754
+ if (isElement(offsetParent)) {
755
+ scale = getScale(offsetParent);
756
+ }
757
+ } else {
758
+ scale = getScale(element);
759
+ }
760
+ }
761
+ const visualOffsets = getVisualOffsets(domElement, isFixedStrategy, offsetParent);
762
+ let x = (clientRect.left + visualOffsets.x) / scale.x;
763
+ let y = (clientRect.top + visualOffsets.y) / scale.y;
764
+ let width = clientRect.width / scale.x;
765
+ let height = clientRect.height / scale.y;
766
+ if (domElement) {
767
+ const win = getWindow(domElement);
768
+ const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
769
+ let currentIFrame = win.frameElement;
770
+ while (currentIFrame && offsetParent && offsetWin !== win) {
771
+ const iframeScale = getScale(currentIFrame);
772
+ const iframeRect = currentIFrame.getBoundingClientRect();
773
+ const css = getComputedStyle(currentIFrame);
774
+ iframeRect.x += (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
775
+ iframeRect.y += (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
776
+ x *= iframeScale.x;
777
+ y *= iframeScale.y;
778
+ width *= iframeScale.x;
779
+ height *= iframeScale.y;
780
+ x += iframeRect.x;
781
+ y += iframeRect.y;
782
+ currentIFrame = getWindow(currentIFrame).frameElement;
783
+ }
784
+ }
785
+ return rectToClientRect({
786
+ width,
787
+ height,
788
+ x,
789
+ y
790
+ });
791
+ }
792
+
793
+ function getDocumentElement(node) {
794
+ return ((isNode(node) ? node.ownerDocument : node.document) || window.document).documentElement;
795
+ }
796
+
797
+ function getNodeScroll(element) {
798
+ if (isElement(element)) {
799
+ return {
800
+ scrollLeft: element.scrollLeft,
801
+ scrollTop: element.scrollTop
802
+ };
803
+ }
804
+ return {
805
+ scrollLeft: element.pageXOffset,
806
+ scrollTop: element.pageYOffset
807
+ };
808
+ }
809
+
810
+ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
811
+ let {
812
+ rect,
813
+ offsetParent,
814
+ strategy
815
+ } = _ref;
816
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
817
+ const documentElement = getDocumentElement(offsetParent);
818
+ if (offsetParent === documentElement) {
819
+ return rect;
820
+ }
821
+ let scroll = {
822
+ scrollLeft: 0,
823
+ scrollTop: 0
824
+ };
825
+ let scale = {
826
+ x: 1,
827
+ y: 1
828
+ };
829
+ const offsets = {
830
+ x: 0,
831
+ y: 0
832
+ };
833
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
834
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
835
+ scroll = getNodeScroll(offsetParent);
836
+ }
837
+ if (isHTMLElement(offsetParent)) {
838
+ const offsetRect = getBoundingClientRect(offsetParent);
839
+ scale = getScale(offsetParent);
840
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
841
+ offsets.y = offsetRect.y + offsetParent.clientTop;
842
+ }
843
+ }
844
+ return {
845
+ width: rect.width * scale.x,
846
+ height: rect.height * scale.y,
847
+ x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
848
+ y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
849
+ };
850
+ }
851
+
852
+ function getWindowScrollBarX(element) {
853
+ // If <html> has a CSS width greater than the viewport, then this will be
854
+ // incorrect for RTL.
855
+ return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
856
+ }
857
+
858
+ // Gets the entire size of the scrollable document area, even extending outside
859
+ // of the `<html>` and `<body>` rect bounds if horizontally scrollable.
860
+ function getDocumentRect(element) {
861
+ const html = getDocumentElement(element);
862
+ const scroll = getNodeScroll(element);
863
+ const body = element.ownerDocument.body;
864
+ const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
865
+ const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
866
+ let x = -scroll.scrollLeft + getWindowScrollBarX(element);
867
+ const y = -scroll.scrollTop;
868
+ if (getComputedStyle$1(body).direction === 'rtl') {
869
+ x += max(html.clientWidth, body.clientWidth) - width;
870
+ }
871
+ return {
872
+ width,
873
+ height,
874
+ x,
875
+ y
876
+ };
877
+ }
878
+
879
+ function getParentNode(node) {
880
+ if (getNodeName(node) === 'html') {
881
+ return node;
882
+ }
883
+ const result =
884
+ // Step into the shadow DOM of the parent of a slotted node.
885
+ node.assignedSlot ||
886
+ // DOM Element detected.
887
+ node.parentNode ||
888
+ // ShadowRoot detected.
889
+ isShadowRoot(node) && node.host ||
890
+ // Fallback.
891
+ getDocumentElement(node);
892
+ return isShadowRoot(result) ? result.host : result;
893
+ }
894
+
895
+ function getNearestOverflowAncestor(node) {
896
+ const parentNode = getParentNode(node);
897
+ if (isLastTraversableNode(parentNode)) {
898
+ // `getParentNode` will never return a `Document` due to the fallback
899
+ // check, so it's either the <html> or <body> element.
900
+ return parentNode.ownerDocument.body;
901
+ }
902
+ if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
903
+ return parentNode;
904
+ }
905
+ return getNearestOverflowAncestor(parentNode);
906
+ }
907
+
908
+ function getOverflowAncestors(node, list) {
909
+ var _node$ownerDocument;
910
+ if (list === void 0) {
911
+ list = [];
912
+ }
913
+ const scrollableAncestor = getNearestOverflowAncestor(node);
914
+ const isBody = scrollableAncestor === ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.body);
915
+ const win = getWindow(scrollableAncestor);
916
+ if (isBody) {
917
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []);
918
+ }
919
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor));
920
+ }
921
+
922
+ function getViewportRect(element, strategy) {
923
+ const win = getWindow(element);
924
+ const html = getDocumentElement(element);
925
+ const visualViewport = win.visualViewport;
926
+ let width = html.clientWidth;
927
+ let height = html.clientHeight;
928
+ let x = 0;
929
+ let y = 0;
930
+ if (visualViewport) {
931
+ width = visualViewport.width;
932
+ height = visualViewport.height;
933
+ const visualViewportBased = isSafari();
934
+ if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
935
+ x = visualViewport.offsetLeft;
936
+ y = visualViewport.offsetTop;
937
+ }
938
+ }
939
+ return {
940
+ width,
941
+ height,
942
+ x,
943
+ y
944
+ };
945
+ }
946
+
947
+ // Returns the inner client rect, subtracting scrollbars if present.
948
+ function getInnerBoundingClientRect(element, strategy) {
949
+ const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
950
+ const top = clientRect.top + element.clientTop;
951
+ const left = clientRect.left + element.clientLeft;
952
+ const scale = isHTMLElement(element) ? getScale(element) : {
953
+ x: 1,
954
+ y: 1
955
+ };
956
+ const width = element.clientWidth * scale.x;
957
+ const height = element.clientHeight * scale.y;
958
+ const x = left * scale.x;
959
+ const y = top * scale.y;
960
+ return {
961
+ width,
962
+ height,
963
+ x,
964
+ y
965
+ };
966
+ }
967
+ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
968
+ let rect;
969
+ if (clippingAncestor === 'viewport') {
970
+ rect = getViewportRect(element, strategy);
971
+ } else if (clippingAncestor === 'document') {
972
+ rect = getDocumentRect(getDocumentElement(element));
973
+ } else if (isElement(clippingAncestor)) {
974
+ rect = getInnerBoundingClientRect(clippingAncestor, strategy);
975
+ } else {
976
+ const visualOffsets = getVisualOffsets(element);
977
+ rect = {
978
+ ...clippingAncestor,
979
+ x: clippingAncestor.x - visualOffsets.x,
980
+ y: clippingAncestor.y - visualOffsets.y
981
+ };
982
+ }
983
+ return rectToClientRect(rect);
984
+ }
985
+ function hasFixedPositionAncestor(element, stopNode) {
986
+ const parentNode = getParentNode(element);
987
+ if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
988
+ return false;
989
+ }
990
+ return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
991
+ }
992
+
993
+ // A "clipping ancestor" is an `overflow` element with the characteristic of
994
+ // clipping (or hiding) child elements. This returns all clipping ancestors
995
+ // of the given element up the tree.
996
+ function getClippingElementAncestors(element, cache) {
997
+ const cachedResult = cache.get(element);
998
+ if (cachedResult) {
999
+ return cachedResult;
1000
+ }
1001
+ let result = getOverflowAncestors(element).filter(el => isElement(el) && getNodeName(el) !== 'body');
1002
+ let currentContainingBlockComputedStyle = null;
1003
+ const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
1004
+ let currentNode = elementIsFixed ? getParentNode(element) : element;
1005
+
1006
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
1007
+ while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
1008
+ const computedStyle = getComputedStyle$1(currentNode);
1009
+ const currentNodeIsContaining = isContainingBlock(currentNode);
1010
+ if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
1011
+ currentContainingBlockComputedStyle = null;
1012
+ }
1013
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
1014
+ if (shouldDropCurrentNode) {
1015
+ // Drop non-containing blocks.
1016
+ result = result.filter(ancestor => ancestor !== currentNode);
1017
+ } else {
1018
+ // Record last containing block for next iteration.
1019
+ currentContainingBlockComputedStyle = computedStyle;
1020
+ }
1021
+ currentNode = getParentNode(currentNode);
1022
+ }
1023
+ cache.set(element, result);
1024
+ return result;
1025
+ }
1026
+
1027
+ // Gets the maximum area that the element is visible in due to any number of
1028
+ // clipping ancestors.
1029
+ function getClippingRect(_ref) {
1030
+ let {
1031
+ element,
1032
+ boundary,
1033
+ rootBoundary,
1034
+ strategy
1035
+ } = _ref;
1036
+ const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary);
1037
+ const clippingAncestors = [...elementClippingAncestors, rootBoundary];
1038
+ const firstClippingAncestor = clippingAncestors[0];
1039
+ const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
1040
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
1041
+ accRect.top = max(rect.top, accRect.top);
1042
+ accRect.right = min(rect.right, accRect.right);
1043
+ accRect.bottom = min(rect.bottom, accRect.bottom);
1044
+ accRect.left = max(rect.left, accRect.left);
1045
+ return accRect;
1046
+ }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
1047
+ return {
1048
+ width: clippingRect.right - clippingRect.left,
1049
+ height: clippingRect.bottom - clippingRect.top,
1050
+ x: clippingRect.left,
1051
+ y: clippingRect.top
1052
+ };
1053
+ }
1054
+
1055
+ function getDimensions(element) {
1056
+ return getCssDimensions(element);
1057
+ }
1058
+
1059
+ function getTrueOffsetParent(element, polyfill) {
1060
+ if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
1061
+ return null;
1062
+ }
1063
+ if (polyfill) {
1064
+ return polyfill(element);
1065
+ }
1066
+ return element.offsetParent;
1067
+ }
1068
+ function getContainingBlock(element) {
1069
+ let currentNode = getParentNode(element);
1070
+ while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
1071
+ if (isContainingBlock(currentNode)) {
1072
+ return currentNode;
1073
+ } else {
1074
+ currentNode = getParentNode(currentNode);
1075
+ }
1076
+ }
1077
+ return null;
1078
+ }
1079
+
1080
+ // Gets the closest ancestor positioned element. Handles some edge cases,
1081
+ // such as table ancestors and cross browser bugs.
1082
+ function getOffsetParent(element, polyfill) {
1083
+ const window = getWindow(element);
1084
+ if (!isHTMLElement(element)) {
1085
+ return window;
1086
+ }
1087
+ let offsetParent = getTrueOffsetParent(element, polyfill);
1088
+ while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {
1089
+ offsetParent = getTrueOffsetParent(offsetParent, polyfill);
1090
+ }
1091
+ if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
1092
+ return window;
1093
+ }
1094
+ return offsetParent || getContainingBlock(element) || window;
1095
+ }
1096
+
1097
+ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1098
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
1099
+ const documentElement = getDocumentElement(offsetParent);
1100
+ const isFixed = strategy === 'fixed';
1101
+ const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
1102
+ let scroll = {
1103
+ scrollLeft: 0,
1104
+ scrollTop: 0
1105
+ };
1106
+ const offsets = {
1107
+ x: 0,
1108
+ y: 0
1109
+ };
1110
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
1111
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
1112
+ scroll = getNodeScroll(offsetParent);
1113
+ }
1114
+ if (isHTMLElement(offsetParent)) {
1115
+ const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
1116
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
1117
+ offsets.y = offsetRect.y + offsetParent.clientTop;
1118
+ } else if (documentElement) {
1119
+ offsets.x = getWindowScrollBarX(documentElement);
1120
+ }
1121
+ }
1122
+ return {
1123
+ x: rect.left + scroll.scrollLeft - offsets.x,
1124
+ y: rect.top + scroll.scrollTop - offsets.y,
1125
+ width: rect.width,
1126
+ height: rect.height
1127
+ };
1128
+ }
1129
+
1130
+ const platform = {
1131
+ getClippingRect,
1132
+ convertOffsetParentRelativeRectToViewportRelativeRect,
1133
+ isElement,
1134
+ getDimensions,
1135
+ getOffsetParent,
1136
+ getDocumentElement,
1137
+ getScale,
1138
+ async getElementRects(_ref) {
1139
+ let {
1140
+ reference,
1141
+ floating,
1142
+ strategy
1143
+ } = _ref;
1144
+ const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
1145
+ const getDimensionsFn = this.getDimensions;
1146
+ return {
1147
+ reference: getRectRelativeToOffsetParent(reference, await getOffsetParentFn(floating), strategy),
1148
+ floating: {
1149
+ x: 0,
1150
+ y: 0,
1151
+ ...(await getDimensionsFn(floating))
1152
+ }
1153
+ };
1154
+ },
1155
+ getClientRects: element => Array.from(element.getClientRects()),
1156
+ isRTL: element => getComputedStyle$1(element).direction === 'rtl'
1157
+ };
1158
+
1159
+ /**
1160
+ * Computes the `x` and `y` coordinates that will place the floating element
1161
+ * next to a reference element when it is given a certain CSS positioning
1162
+ * strategy.
1163
+ */
1164
+ const computePosition = (reference, floating, options) => {
1165
+ // This caches the expensive `getClippingElementAncestors` function so that
1166
+ // multiple lifecycle resets re-use the same result. It only lives for a
1167
+ // single call. If other functions become expensive, we can add them as well.
1168
+ const cache = new Map();
1169
+ const mergedOptions = {
1170
+ platform,
1171
+ ...options
1172
+ };
1173
+ const platformWithCache = {
1174
+ ...mergedOptions.platform,
1175
+ _c: cache
1176
+ };
1177
+ return computePosition$1(reference, floating, {
1178
+ ...mergedOptions,
1179
+ platform: platformWithCache
1180
+ });
1181
+ };
1182
+
1183
+ const duetTooltipCss = "*,*::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:relative;z-index:200;display:inline-flex;width:auto;margin-top:-16px !important;margin-left:-3px !important;-webkit-tap-highlight-color:transparent}.duet-tooltip{position:absolute;z-index:950;display:none;width:282px;min-height:48px;max-height:340px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0.875rem;font-weight:400;line-height:1.25;color:rgb(0, 41, 77);visibility:hidden;background:rgb(255, 255, 255);border:1px solid rgb(225, 227, 230);border-radius:4px;box-shadow:0 2px 10px 0 rgba(0, 41, 77, 0.07);opacity:0;transition:300ms ease;transform-origin:100% 100%}.duet-tooltip.duet-theme-turva{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:rgb(23, 28, 58);border-color:rgb(228, 228, 230);box-shadow:0 2px 10px 0 rgba(117, 117, 117, 0.13)}.duet-tooltip .arrow{position:absolute;width:22px;height:22px;pointer-events:none}.duet-tooltip .arrow.bottom,.duet-tooltip .arrow.bottom-start,.duet-tooltip .arrow.bottom-end{top:-21px}.duet-tooltip .arrow-container{position:relative;width:100%;height:100%;pointer-events:none}.duet-tooltip .arrow-container::after{position:absolute;z-index:200;width:0;height:0;pointer-events:none;content:\"\"}.duet-tooltip .arrow-container::before{position:absolute;z-index:100;width:0;height:0;pointer-events:none;content:\"\"}.duet-tooltip .arrow-container.top::after,.duet-tooltip .arrow-container.top-start::after,.duet-tooltip .arrow-container.top-end::after{bottom:2px;left:2px;border:10px solid transparent;border-top:10px solid rgb(255, 255, 255)}.duet-tooltip .arrow-container.top::before,.duet-tooltip .arrow-container.top-start::before,.duet-tooltip .arrow-container.top-end::before{bottom:-1px;left:1px;border:11px solid transparent;border-top:11px solid rgb(225, 227, 230)}.duet-theme-turva .duet-tooltip .arrow-container.top::before,.duet-theme-turva .duet-tooltip .arrow-container.top-start::before,.duet-theme-turva .duet-tooltip .arrow-container.top-end::before{border-top:11px solid rgb(228, 228, 230)}.duet-tooltip .arrow-container.bottom::after,.duet-tooltip .arrow-container.bottom-start::after,.duet-tooltip .arrow-container.bottom-end::after{bottom:1px;left:2px;border:10px solid transparent;border-bottom:10px solid rgb(255, 255, 255)}.duet-tooltip .arrow-container.bottom::before,.duet-tooltip .arrow-container.bottom-start::before,.duet-tooltip .arrow-container.bottom-end::before{bottom:1px;left:1px;border:11px solid transparent;border-bottom:11px solid rgb(225, 227, 230)}.duet-theme-turva .duet-tooltip .arrow-container.bottom::before,.duet-theme-turva .duet-tooltip .arrow-container.bottom-start::before,.duet-theme-turva .duet-tooltip .arrow-container.bottom-end::before{border-top:11px solid rgb(228, 228, 230)}.duet-tooltip.duet-tooltip-has-label{right:auto !important;left:0;width:282px !important;transform-origin:0 0 !important}.duet-tooltip.duet-tooltip-active{visibility:visible;opacity:1;transition-property:transform, opacity}.duet-tooltip-button{z-index:100;display:inline-block;align-items:center;justify-content:center;min-width:48px;height:48px;padding:0 !important;margin-right:-12px;line-height:normal !important;color:rgb(0, 119, 179);white-space:nowrap;cursor:pointer;background:transparent !important;border-radius:4px}.duet-tooltip-button.duet-theme-turva{color:rgb(198, 12, 48)}.duet-tooltip-button:hover{color:rgb(0, 77, 128)}.duet-tooltip-button:hover.duet-theme-turva{color:rgb(148, 9, 37)}.duet-tooltip-button:focus{background:transparent !important;outline:0}:host(.user-is-tabbing) .duet-tooltip-button:focus{background:transparent !important;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px rgb(0, 119, 179) !important}:host(.user-is-tabbing) .duet-tooltip-button.duet-theme-turva:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px rgb(23, 28, 58) !important}.duet-tooltip-button svg{width:20px;height:20px;pointer-events:none}.duet-tooltip-button-has-label{margin-right:0}.duet-tooltip-scrollable{padding:20px !important;width:100%;max-height:250px;padding-right:25px !important;overflow-y:auto;-webkit-hyphens:auto;hyphens:auto;border-radius:4px;-webkit-overflow-scrolling:touch}.duet-tooltip-scrollable:focus{outline:none}:host(.user-is-tabbing) .duet-tooltip-scrollable:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px rgb(0, 119, 179)}:host(.user-is-tabbing) .duet-theme-turva .duet-tooltip-scrollable:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px rgb(23, 28, 58)}.duet-tooltip-scrollable::-webkit-scrollbar{width:4px}.duet-tooltip-scrollable::-webkit-scrollbar-track{border-radius:4px}.duet-tooltip-scrollable::-webkit-scrollbar-thumb{background:rgb(225, 227, 230);border-radius:4px}.duet-theme-turva .duet-tooltip-scrollable::-webkit-scrollbar-thumb{background:rgb(228, 228, 230)}.duet-tooltip-label{position:relative;z-index:100;display:inline-block;max-width:calc(100% - 30px);margin-left:12px !important;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:600;line-height:1.25;text-align:left;white-space:normal;vertical-align:top}.duet-theme-turva .duet-tooltip-label{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}.duet-tooltip-close{position:absolute;top:8px;right:8px;display:flex;align-items:center;justify-content:center;width:17px;height:17px;min-height:0 !important;padding:0 !important;margin:0 !important;line-height:normal;color:rgb(0, 41, 77);cursor:pointer;background:rgb(245, 248, 250);border-radius:50%;-webkit-appearance:none;appearance:none}.duet-tooltip-close:focus{outline:none;box-shadow:0 0 0 2px rgb(0, 119, 179)}.duet-theme-turva .duet-tooltip-close:focus{color:rgb(23, 28, 58);box-shadow:0 0 0 2px rgb(23, 28, 58)}";
1184
+
1185
+ const DuetTooltip = /*@__PURE__*/ proxyCustomElement(class extends H {
1186
+ constructor() {
1187
+ super();
1188
+ this.__registerHost();
1189
+ this.__attachShadow();
1190
+ /**
1191
+ * Own Properties.
1192
+ */
1193
+ this.mql = [
1194
+ window.matchMedia(media_query_medium.replace(/'/g, "")),
1195
+ window.matchMedia(media_query_large.replace(/'/g, "")),
1196
+ ];
1197
+ this.tooltipId = createID("DuetTooltip");
1198
+ /**
1199
+ * Local methods
1200
+ */
1201
+ this.openTooltip = () => {
1202
+ this.focusTarget = "tooltip";
1203
+ this.active = true;
1204
+ };
1205
+ this.closeTooltip = (moveFocusToButton = false) => {
1206
+ if (moveFocusToButton) {
1207
+ this.focusTarget = "trigger";
1208
+ }
1209
+ this.active = false;
1210
+ };
1211
+ this.toggleOpen = () => {
1212
+ this.active ? this.closeTooltip() : this.openTooltip();
1213
+ };
1214
+ this.handleFocusOut = (e) => {
1215
+ if (!this.active) {
1216
+ return;
1217
+ }
1218
+ const relatedTarget = e.relatedTarget;
1219
+ if (
1220
+ // if we don't know where focus went
1221
+ relatedTarget == null ||
1222
+ // if focus is within the tooltip itself
1223
+ this.element.shadowRoot.contains(relatedTarget) ||
1224
+ // if focus is within the tooltip light DOM
1225
+ this.element.contains(relatedTarget)) {
1226
+ // then we can skip closing
1227
+ return;
1228
+ }
1229
+ this.closeTooltip();
1230
+ };
1231
+ this.handleKeyDown = (e) => {
1232
+ const isEscapeKey = e.keyCode === 27;
1233
+ const isTabbingOut = e.target === this.scrollableEl && e.shiftKey && e.keyCode === 9;
1234
+ if (isEscapeKey || isTabbingOut) {
1235
+ this.closeTooltip(true);
1236
+ }
1237
+ };
1238
+ this.handleCloseClick = () => {
1239
+ this.closeTooltip(true);
1240
+ };
1241
+ this.updatePlacement = async () => {
1242
+ var _a, _b;
1243
+ let preferRight = true;
1244
+ if (this.breakpoint === "large" && !this.mql[1].matches) {
1245
+ preferRight = false;
1246
+ }
1247
+ else if (this.breakpoint === "medium" && !this.mql[0].matches) {
1248
+ preferRight = false;
1249
+ }
1250
+ let placement = preferRight ? "top-start" : "top-end";
1251
+ if (this.direction === "left") {
1252
+ placement = "top-end";
1253
+ }
1254
+ else if (this.direction === "right") {
1255
+ placement = "top-start";
1256
+ }
1257
+ const position = await computePosition(this.buttonEl, this.tooltipEl, {
1258
+ placement,
1259
+ middleware: [flip(), shift({ padding: 5 }), arrow({ element: this.arrowEl })],
1260
+ });
1261
+ this.tooltipY = position.y;
1262
+ this.tooltipX = position.x;
1263
+ this.placement = position.placement;
1264
+ this.arrowY = (_a = position.middlewareData.arrow) === null || _a === void 0 ? void 0 : _a.y;
1265
+ this.arrowX = (_b = position.middlewareData.arrow) === null || _b === void 0 ? void 0 : _b.x;
1266
+ };
1267
+ this.placement = "bottom";
1268
+ this.tooltipY = undefined;
1269
+ this.tooltipX = undefined;
1270
+ this.arrowX = undefined;
1271
+ this.arrowY = undefined;
1272
+ this.theme = "";
1273
+ this.language = getLanguage();
1274
+ this.accessibleLabelDefault = {
1275
+ fi: "Näytä lisätietoja",
1276
+ en: "Show more information",
1277
+ sv: "Visa mer tilläggsuppgifter",
1278
+ };
1279
+ this.accessibleLabel = getLocaleString(this.accessibleLabelDefault, this.language);
1280
+ this.accessibleInputLabel = undefined;
1281
+ this.accessibleCloseLabelDefault = {
1282
+ fi: "Sulje lisätiedot",
1283
+ en: "Close details",
1284
+ sv: "Stäng tilläggsuppgifter",
1285
+ };
1286
+ this.accessibleCloseLabel = getLocaleString(this.accessibleCloseLabelDefault, this.language);
1287
+ this.label = "";
1288
+ this.breakpoint = "medium";
1289
+ this.direction = "auto";
1290
+ this.positionVertical = "0";
1291
+ this.positionHorizontal = "0";
1292
+ this.active = false;
1293
+ }
1294
+ watchLanguageStateHandler(newValue, oldValue) {
1295
+ if (newValue !== oldValue && this.accessibleLabel === this.accessibleLabelDefault[oldValue]) {
1296
+ this.accessibleLabel = getLocaleString(this.accessibleLabelDefault, newValue);
1297
+ }
1298
+ if (newValue !== oldValue && this.accessibleCloseLabel === this.accessibleCloseLabelDefault[oldValue]) {
1299
+ this.accessibleCloseLabel = getLocaleString(this.accessibleCloseLabelDefault, newValue);
1300
+ }
1301
+ }
1302
+ /**
1303
+ * Component lifecycle events.
1304
+ */
1305
+ componentWillLoad() {
1306
+ inheritGlobalTheme(this);
1307
+ }
1308
+ componentDidLoad() {
1309
+ this.updatePlacement();
1310
+ }
1311
+ componentDidUpdate() {
1312
+ switch (this.focusTarget) {
1313
+ case "tooltip":
1314
+ this.scrollableEl.focus({ preventScroll: true });
1315
+ break;
1316
+ case "trigger":
1317
+ this.buttonEl.focus({ preventScroll: true });
1318
+ break;
1319
+ }
1320
+ this.focusTarget = null;
1321
+ }
1322
+ connectedCallback() {
1323
+ connectLanguageChangeObserver(this);
1324
+ }
1325
+ disconnectedCallback() {
1326
+ disconnectLanguageChangeObserver(this);
1327
+ }
1328
+ /**
1329
+ * Component event handling.
1330
+ */
1331
+ onScroll() {
1332
+ clearTimeout(this.scrollTimer);
1333
+ this.scrollTimer = setTimeout(() => {
1334
+ if (this.active) {
1335
+ this.updatePlacement();
1336
+ }
1337
+ }, 100);
1338
+ }
1339
+ handleWindowResize() {
1340
+ clearTimeout(this.resizeTimer);
1341
+ this.resizeTimer = setTimeout(() => {
1342
+ this.updatePlacement();
1343
+ }, 100);
1344
+ }
1345
+ handleDocumentClick(e) {
1346
+ if (!this.active) {
1347
+ return;
1348
+ }
1349
+ const path = e.composedPath();
1350
+ const isClickOutside = path.every(el => el !== this.element);
1351
+ if (isClickOutside) {
1352
+ this.closeTooltip();
1353
+ }
1354
+ }
1355
+ async handleActiveChange(newActiveValue) {
1356
+ if (newActiveValue) {
1357
+ this.updatePlacement();
1358
+ }
1359
+ else {
1360
+ setTimeout(() => this.updatePlacement(), 300);
1361
+ }
1362
+ }
1363
+ /**
1364
+ * render() function.
1365
+ * Always the last one in the class.
1366
+ */
1367
+ render() {
1368
+ const tooltipStyles = {
1369
+ transform: `translateY(${this.positionVertical}) translateX(${this.positionHorizontal})`,
1370
+ // This is needed to that the active tooltip stacks on
1371
+ // top of other tooltips and the header.
1372
+ zIndex: this.active ? "201" : "",
1373
+ };
1374
+ const positionStyles = {
1375
+ top: `${this.tooltipY}px`,
1376
+ left: `${this.tooltipX}px`,
1377
+ display: "block",
1378
+ };
1379
+ const arrowStyles = {
1380
+ top: this.arrowY ? `${this.arrowY}px` : undefined,
1381
+ left: this.arrowX ? `${this.arrowX}px` : undefined,
1382
+ };
1383
+ return (h(Host, { style: tooltipStyles }, h("button", { ref: element => (this.buttonEl = element), "aria-controls": this.tooltipId, "aria-expanded": this.active ? "true" : "false", onClick: this.toggleOpen, type: "button", class: {
1384
+ "duet-tooltip-button": true,
1385
+ "duet-tooltip-button-has-label": !!this.label,
1386
+ "duet-theme-turva": this.theme === "turva",
1387
+ } }, h("svg", { "aria-hidden": "true", role: "img", fill: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "m13.5 17.25c-1.241 0-2.25-1.009-2.25-2.25v-3.75h-.75c-.414 0-.75-.336-.75-.75s.336-.75.75-.75h.75c.827 0 1.5.673 1.5 1.5v3.75c0 .414.336.75.75.75h.75c.414 0 .75.336.75.75s-.336.75-.75.75z" }), h("circle", { cx: "11.625", cy: "7.125", r: "1.125" }), h("path", { d: "m12 24c-6.617 0-12-5.383-12-12s5.383-12 12-12 12 5.383 12 12-5.383 12-12 12zm0-22.5c-5.79 0-10.5 4.71-10.5 10.5s4.71 10.5 10.5 10.5 10.5-4.71 10.5-10.5-4.71-10.5-10.5-10.5z" })), this.label ? (h("span", { class: "duet-tooltip-label" }, this.label)) : (h("duet-visually-hidden", null, this.accessibleInputLabel
1388
+ ? `${this.accessibleInputLabel}, ${this.accessibleLabel}`
1389
+ : this.accessibleLabel))), h("div", { ref: element => (this.tooltipEl = element), style: positionStyles, class: {
1390
+ "duet-tooltip": true,
1391
+ "duet-theme-turva": this.theme === "turva",
1392
+ "duet-tooltip-has-label": !!this.label,
1393
+ "duet-tooltip-active": this.active === true,
1394
+ }, onClick: e => e.stopPropagation(), onKeyDown: this.handleKeyDown, onFocusout: this.handleFocusOut }, h("div", { ref: element => (this.scrollableEl = element), class: "duet-tooltip-scrollable", tabindex: "0", id: this.tooltipId }, h("slot", null)), h("div", { ref: element => (this.arrowEl = element), class: { arrow: true, [this.placement]: true }, style: arrowStyles }, h("div", { class: { "arrow-container": true, [this.placement]: true } })), h("button", { type: "button", class: "duet-tooltip-close", onClick: this.handleCloseClick }, h("duet-icon", { name: "navigation-close-small", margin: "none", color: "currentColor", size: "xxx-small" }), h("duet-visually-hidden", null, this.accessibleCloseLabel)))));
1395
+ }
1396
+ get element() { return this; }
1397
+ static get watchers() { return {
1398
+ "language": ["watchLanguageStateHandler"],
1399
+ "active": ["handleActiveChange"]
1400
+ }; }
1401
+ static get style() { return duetTooltipCss; }
1402
+ }, [1, "duet-tooltip", {
1403
+ "theme": [1025],
1404
+ "language": [1025],
1405
+ "accessibleLabelDefault": [1, "accessible-label-default"],
1406
+ "accessibleLabel": [1025, "accessible-label"],
1407
+ "accessibleInputLabel": [1, "accessible-input-label"],
1408
+ "accessibleCloseLabelDefault": [1, "accessible-close-label-default"],
1409
+ "accessibleCloseLabel": [1025, "accessible-close-label"],
1410
+ "label": [1],
1411
+ "breakpoint": [1],
1412
+ "direction": [1],
1413
+ "positionVertical": [513, "position-vertical"],
1414
+ "positionHorizontal": [513, "position-horizontal"],
1415
+ "active": [1540],
1416
+ "placement": [32],
1417
+ "tooltipY": [32],
1418
+ "tooltipX": [32],
1419
+ "arrowX": [32],
1420
+ "arrowY": [32]
1421
+ }, [[9, "scroll", "onScroll"], [9, "resize", "handleWindowResize"], [4, "click", "handleDocumentClick"]]]);
1422
+ function defineCustomElement() {
1423
+ if (typeof customElements === "undefined") {
1424
+ return;
1425
+ }
1426
+ const components = ["duet-tooltip", "duet-icon", "duet-visually-hidden"];
1427
+ components.forEach(tagName => { switch (tagName) {
1428
+ case "duet-tooltip":
1429
+ if (!customElements.get(tagName)) {
1430
+ customElements.define(tagName, DuetTooltip);
1431
+ }
1432
+ break;
1433
+ case "duet-icon":
1434
+ if (!customElements.get(tagName)) {
1435
+ defineCustomElement$2();
1436
+ }
1437
+ break;
1438
+ case "duet-visually-hidden":
1439
+ if (!customElements.get(tagName)) {
1440
+ defineCustomElement$1();
1441
+ }
1442
+ break;
1443
+ } });
1444
+ }
1445
+
1446
+ export { DuetTooltip as D, defineCustomElement as d };