@getflip/swirl-components 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (407) hide show
  1. package/dist/cjs/flip-action-list-item.cjs.entry.js +1 -1
  2. package/dist/cjs/flip-action-list-section.cjs.entry.js +1 -1
  3. package/dist/cjs/flip-action-list.cjs.entry.js +1 -1
  4. package/dist/cjs/flip-avatar-group.cjs.entry.js +2 -2
  5. package/dist/cjs/flip-avatar.cjs.entry.js +1 -1
  6. package/dist/cjs/flip-badge.cjs.entry.js +2 -2
  7. package/dist/cjs/flip-banner.cjs.entry.js +1 -1
  8. package/dist/cjs/flip-button-group.cjs.entry.js +24 -0
  9. package/dist/{esm/flip-button_2.entry.js → cjs/flip-button.cjs.entry.js} +10 -23
  10. package/dist/cjs/flip-checkbox.cjs.entry.js +3 -2
  11. package/dist/cjs/flip-chip.cjs.entry.js +1 -1
  12. package/dist/cjs/flip-description-list-item.cjs.entry.js +1 -1
  13. package/dist/cjs/flip-description-list.cjs.entry.js +1 -1
  14. package/dist/cjs/flip-dialog.cjs.entry.js +1 -1
  15. package/dist/cjs/flip-file-uploader.cjs.entry.js +49 -0
  16. package/dist/cjs/flip-icon-add-photo.cjs.entry.js +1 -1
  17. package/dist/cjs/flip-icon-add.cjs.entry.js +1 -1
  18. package/dist/cjs/flip-icon-admin-panel-settings.cjs.entry.js +1 -1
  19. package/dist/cjs/flip-icon-arrow-back.cjs.entry.js +1 -1
  20. package/dist/cjs/flip-icon-arrow-forward.cjs.entry.js +1 -1
  21. package/dist/cjs/flip-icon-arrow-right-small.cjs.entry.js +1 -1
  22. package/dist/cjs/flip-icon-attachment.cjs.entry.js +1 -1
  23. package/dist/cjs/flip-icon-cancel_2.cjs.entry.js +1 -1
  24. package/dist/cjs/flip-icon-chat-bubble.cjs.entry.js +1 -1
  25. package/dist/cjs/flip-icon-check-circle.cjs.entry.js +1 -1
  26. package/dist/cjs/flip-icon-check-small.cjs.entry.js +1 -1
  27. package/dist/cjs/flip-icon-check-strong.cjs.entry.js +1 -1
  28. package/dist/cjs/flip-icon-check.cjs.entry.js +1 -1
  29. package/dist/cjs/flip-icon-chevron-left.cjs.entry.js +1 -1
  30. package/dist/cjs/flip-icon-chevron-right.cjs.entry.js +1 -1
  31. package/dist/cjs/flip-icon-close-small.cjs.entry.js +1 -1
  32. package/dist/cjs/flip-icon-close.cjs.entry.js +1 -1
  33. package/dist/cjs/flip-icon-cloud-upload.cjs.entry.js +20 -0
  34. package/dist/cjs/flip-icon-comment.cjs.entry.js +1 -1
  35. package/dist/cjs/flip-icon-copy.cjs.entry.js +1 -1
  36. package/dist/cjs/flip-icon-date-range.cjs.entry.js +1 -1
  37. package/dist/cjs/flip-icon-delete.cjs.entry.js +1 -1
  38. package/dist/cjs/flip-icon-description.cjs.entry.js +1 -1
  39. package/dist/cjs/flip-icon-download.cjs.entry.js +1 -1
  40. package/dist/cjs/flip-icon-edit.cjs.entry.js +1 -1
  41. package/dist/cjs/flip-icon-emoji-mood.cjs.entry.js +1 -1
  42. package/dist/cjs/flip-icon-emoji-satisfied.cjs.entry.js +1 -1
  43. package/dist/cjs/flip-icon-error.cjs.entry.js +1 -1
  44. package/dist/cjs/flip-icon-expand-less.cjs.entry.js +1 -1
  45. package/dist/cjs/flip-icon-expand-more.cjs.entry.js +1 -1
  46. package/dist/cjs/flip-icon-file.cjs.entry.js +1 -1
  47. package/dist/cjs/flip-icon-folder-shared.cjs.entry.js +1 -1
  48. package/dist/cjs/flip-icon-group-assign.cjs.entry.js +1 -1
  49. package/dist/cjs/flip-icon-groups-custom.cjs.entry.js +1 -1
  50. package/dist/cjs/flip-icon-groups.cjs.entry.js +1 -1
  51. package/dist/cjs/flip-icon-image.cjs.entry.js +1 -1
  52. package/dist/cjs/flip-icon-info.cjs.entry.js +1 -1
  53. package/dist/cjs/flip-icon-inventory.cjs.entry.js +1 -1
  54. package/dist/cjs/flip-icon-like.cjs.entry.js +1 -1
  55. package/dist/cjs/flip-icon-link.cjs.entry.js +1 -1
  56. package/dist/cjs/flip-icon-lock.cjs.entry.js +1 -1
  57. package/dist/cjs/flip-icon-logout.cjs.entry.js +1 -1
  58. package/dist/cjs/flip-icon-mail.cjs.entry.js +1 -1
  59. package/dist/cjs/flip-icon-manage-accounts.cjs.entry.js +1 -1
  60. package/dist/cjs/flip-icon-mention.cjs.entry.js +1 -1
  61. package/dist/cjs/flip-icon-message.cjs.entry.js +1 -1
  62. package/dist/cjs/flip-icon-more-horizontal.cjs.entry.js +1 -1
  63. package/dist/cjs/flip-icon-more-vertikal.cjs.entry.js +1 -1
  64. package/dist/cjs/flip-icon-notifications-active.cjs.entry.js +1 -1
  65. package/dist/cjs/flip-icon-notifications-off.cjs.entry.js +1 -1
  66. package/dist/cjs/flip-icon-notifications.cjs.entry.js +1 -1
  67. package/dist/cjs/flip-icon-people-alt.cjs.entry.js +1 -1
  68. package/dist/cjs/flip-icon-person-off.cjs.entry.js +1 -1
  69. package/dist/cjs/flip-icon-person.cjs.entry.js +1 -1
  70. package/dist/cjs/flip-icon-phone.cjs.entry.js +1 -1
  71. package/dist/cjs/flip-icon-poll.cjs.entry.js +1 -1
  72. package/dist/cjs/flip-icon-recieved.cjs.entry.js +1 -1
  73. package/dist/cjs/flip-icon-search-strong.cjs.entry.js +1 -1
  74. package/dist/cjs/flip-icon-send.cjs.entry.js +1 -1
  75. package/dist/cjs/flip-icon-settings.cjs.entry.js +1 -1
  76. package/dist/cjs/flip-icon-time-filled.cjs.entry.js +1 -1
  77. package/dist/cjs/flip-icon-time-outlined.cjs.entry.js +1 -1
  78. package/dist/cjs/flip-icon-today.cjs.entry.js +1 -1
  79. package/dist/cjs/flip-icon-user-assign.cjs.entry.js +1 -1
  80. package/dist/cjs/flip-icon-video-camera.cjs.entry.js +1 -1
  81. package/dist/cjs/flip-icon-visibility-off.cjs.entry.js +1 -1
  82. package/dist/cjs/flip-icon-visibility.cjs.entry.js +1 -1
  83. package/dist/cjs/flip-icon-warning.cjs.entry.js +1 -1
  84. package/dist/cjs/{flip-spinner.cjs.entry.js → flip-inline-error_2.cjs.entry.js} +17 -1
  85. package/dist/cjs/flip-link.cjs.entry.js +1 -1
  86. package/dist/cjs/flip-popover.cjs.entry.js +6 -1155
  87. package/dist/cjs/flip-radio-group.cjs.entry.js +1 -1
  88. package/dist/cjs/flip-radio.cjs.entry.js +1 -1
  89. package/dist/cjs/flip-resource-list-file-item.cjs.entry.js +30 -0
  90. package/dist/cjs/flip-resource-list-item.cjs.entry.js +73 -0
  91. package/dist/cjs/flip-resource-list.cjs.entry.js +67 -0
  92. package/dist/cjs/flip-search.cjs.entry.js +1 -1
  93. package/dist/cjs/flip-stack.cjs.entry.js +1 -1
  94. package/dist/cjs/flip-switch.cjs.entry.js +1 -1
  95. package/dist/cjs/flip-tab.cjs.entry.js +21 -0
  96. package/dist/cjs/flip-tabs.cjs.entry.js +124 -0
  97. package/dist/cjs/flip-tag.cjs.entry.js +1 -1
  98. package/dist/cjs/flip-theme-provider.cjs.entry.js +1 -1
  99. package/dist/cjs/flip-thumbnail.cjs.entry.js +1 -1
  100. package/dist/cjs/flip-toast-provider.cjs.entry.js +1 -1
  101. package/dist/cjs/flip-toast.cjs.entry.js +1 -1
  102. package/dist/cjs/flip-tooltip.cjs.entry.js +22 -14
  103. package/dist/cjs/flip-visually-hidden.cjs.entry.js +1 -1
  104. package/dist/cjs/floating-ui.dom.esm-75453e4e.js +1228 -0
  105. package/dist/cjs/{index-37fbfe64.js → index-bd89db61.js} +3 -0
  106. package/dist/cjs/loader.cjs.js +2 -2
  107. package/dist/cjs/swirl-components.cjs.js +2 -2
  108. package/dist/collection/collection-manifest.json +7 -0
  109. package/dist/collection/components/flip-avatar-group/flip-avatar-group.css +2 -2
  110. package/dist/collection/components/flip-badge/flip-badge.css +1 -1
  111. package/dist/collection/components/flip-button/flip-button.js +18 -1
  112. package/dist/collection/components/flip-checkbox/flip-checkbox.js +3 -2
  113. package/dist/collection/components/flip-file-uploader/flip-file-uploader.css +86 -0
  114. package/dist/collection/components/flip-file-uploader/flip-file-uploader.js +285 -0
  115. package/dist/collection/components/flip-file-uploader/flip-file-uploader.stories.js +23 -0
  116. package/dist/collection/components/flip-icon/icons/flip-icon-cloud-upload.js +49 -0
  117. package/dist/collection/components/flip-inline-error/flip-inline-error.css +1 -1
  118. package/dist/collection/components/flip-popover/flip-popover.js +1 -1
  119. package/dist/collection/components/flip-resource-list/flip-resource-list.css +8 -0
  120. package/dist/collection/components/flip-resource-list/flip-resource-list.js +85 -0
  121. package/dist/collection/components/flip-resource-list/flip-resource-list.stories.js +36 -0
  122. package/dist/collection/components/flip-resource-list-file-item/flip-resource-list-file-item.css +89 -0
  123. package/dist/collection/components/flip-resource-list-file-item/flip-resource-list-file-item.js +180 -0
  124. package/dist/collection/components/flip-resource-list-file-item/flip-resource-list-file-item.stories.js +35 -0
  125. package/dist/collection/components/flip-resource-list-item/flip-resource-list-item.css +195 -0
  126. package/dist/collection/components/flip-resource-list-item/flip-resource-list-item.js +303 -0
  127. package/dist/collection/components/flip-resource-list-item/flip-resource-list-item.stories.js +64 -0
  128. package/dist/collection/components/flip-tab/flip-tab.css +18 -0
  129. package/dist/collection/components/flip-tab/flip-tab.js +71 -0
  130. package/dist/collection/components/flip-tab/flip-tab.stories.js +22 -0
  131. package/dist/collection/components/flip-tabs/flip-tabs.css +94 -0
  132. package/dist/collection/components/flip-tabs/flip-tabs.js +220 -0
  133. package/dist/collection/components/flip-tabs/flip-tabs.stories.js +25 -0
  134. package/dist/collection/components/flip-tooltip/flip-tooltip.css +20 -0
  135. package/dist/collection/components/flip-tooltip/flip-tooltip.js +20 -10
  136. package/dist/components/flip-avatar-group.js +1 -1
  137. package/dist/components/flip-badge.js +1 -1
  138. package/dist/components/flip-button2.js +2 -1
  139. package/dist/components/flip-checkbox.js +2 -1
  140. package/dist/components/flip-file-uploader.d.ts +11 -0
  141. package/dist/components/flip-file-uploader.js +88 -0
  142. package/dist/components/flip-icon-cloud-upload.d.ts +11 -0
  143. package/dist/components/flip-icon-cloud-upload.js +6 -0
  144. package/dist/components/flip-icon-cloud-upload2.js +34 -0
  145. package/dist/components/flip-inline-error.js +1 -42
  146. package/dist/components/flip-inline-error2.js +44 -0
  147. package/dist/components/flip-popover.js +2 -1151
  148. package/dist/components/flip-resource-list-file-item.d.ts +11 -0
  149. package/dist/components/flip-resource-list-file-item.js +83 -0
  150. package/dist/components/flip-resource-list-item.d.ts +11 -0
  151. package/dist/components/flip-resource-list-item.js +113 -0
  152. package/dist/components/flip-resource-list.d.ts +11 -0
  153. package/dist/components/flip-resource-list.js +90 -0
  154. package/dist/components/flip-spinner.js +1 -41
  155. package/dist/{esm/flip-spinner.entry.js → components/flip-spinner2.js} +33 -8
  156. package/dist/components/flip-tab.d.ts +11 -0
  157. package/dist/components/flip-tab.js +40 -0
  158. package/dist/components/flip-tabs.d.ts +11 -0
  159. package/dist/components/flip-tabs.js +144 -0
  160. package/dist/components/flip-tooltip.js +21 -13
  161. package/dist/components/floating-ui.dom.esm.js +1222 -0
  162. package/dist/components/index.d.ts +7 -0
  163. package/dist/components/index.js +7 -0
  164. package/dist/esm/flip-action-list-item.entry.js +1 -1
  165. package/dist/esm/flip-action-list-section.entry.js +1 -1
  166. package/dist/esm/flip-action-list.entry.js +1 -1
  167. package/dist/esm/flip-avatar-group.entry.js +2 -2
  168. package/dist/esm/flip-avatar.entry.js +1 -1
  169. package/dist/esm/flip-badge.entry.js +2 -2
  170. package/dist/esm/flip-banner.entry.js +1 -1
  171. package/dist/esm/flip-button-group.entry.js +20 -0
  172. package/dist/{cjs/flip-button_2.cjs.entry.js → esm/flip-button.entry.js} +6 -28
  173. package/dist/esm/flip-checkbox.entry.js +3 -2
  174. package/dist/esm/flip-chip.entry.js +1 -1
  175. package/dist/esm/flip-description-list-item.entry.js +1 -1
  176. package/dist/esm/flip-description-list.entry.js +1 -1
  177. package/dist/esm/flip-dialog.entry.js +1 -1
  178. package/dist/esm/flip-file-uploader.entry.js +45 -0
  179. package/dist/esm/flip-icon-add-photo.entry.js +1 -1
  180. package/dist/esm/flip-icon-add.entry.js +1 -1
  181. package/dist/esm/flip-icon-admin-panel-settings.entry.js +1 -1
  182. package/dist/esm/flip-icon-arrow-back.entry.js +1 -1
  183. package/dist/esm/flip-icon-arrow-forward.entry.js +1 -1
  184. package/dist/esm/flip-icon-arrow-right-small.entry.js +1 -1
  185. package/dist/esm/flip-icon-attachment.entry.js +1 -1
  186. package/dist/esm/flip-icon-cancel_2.entry.js +1 -1
  187. package/dist/esm/flip-icon-chat-bubble.entry.js +1 -1
  188. package/dist/esm/flip-icon-check-circle.entry.js +1 -1
  189. package/dist/esm/flip-icon-check-small.entry.js +1 -1
  190. package/dist/esm/flip-icon-check-strong.entry.js +1 -1
  191. package/dist/esm/flip-icon-check.entry.js +1 -1
  192. package/dist/esm/flip-icon-chevron-left.entry.js +1 -1
  193. package/dist/esm/flip-icon-chevron-right.entry.js +1 -1
  194. package/dist/esm/flip-icon-close-small.entry.js +1 -1
  195. package/dist/esm/flip-icon-close.entry.js +1 -1
  196. package/dist/esm/flip-icon-cloud-upload.entry.js +16 -0
  197. package/dist/esm/flip-icon-comment.entry.js +1 -1
  198. package/dist/esm/flip-icon-copy.entry.js +1 -1
  199. package/dist/esm/flip-icon-date-range.entry.js +1 -1
  200. package/dist/esm/flip-icon-delete.entry.js +1 -1
  201. package/dist/esm/flip-icon-description.entry.js +1 -1
  202. package/dist/esm/flip-icon-download.entry.js +1 -1
  203. package/dist/esm/flip-icon-edit.entry.js +1 -1
  204. package/dist/esm/flip-icon-emoji-mood.entry.js +1 -1
  205. package/dist/esm/flip-icon-emoji-satisfied.entry.js +1 -1
  206. package/dist/esm/flip-icon-error.entry.js +1 -1
  207. package/dist/esm/flip-icon-expand-less.entry.js +1 -1
  208. package/dist/esm/flip-icon-expand-more.entry.js +1 -1
  209. package/dist/esm/flip-icon-file.entry.js +1 -1
  210. package/dist/esm/flip-icon-folder-shared.entry.js +1 -1
  211. package/dist/esm/flip-icon-group-assign.entry.js +1 -1
  212. package/dist/esm/flip-icon-groups-custom.entry.js +1 -1
  213. package/dist/esm/flip-icon-groups.entry.js +1 -1
  214. package/dist/esm/flip-icon-image.entry.js +1 -1
  215. package/dist/esm/flip-icon-info.entry.js +1 -1
  216. package/dist/esm/flip-icon-inventory.entry.js +1 -1
  217. package/dist/esm/flip-icon-like.entry.js +1 -1
  218. package/dist/esm/flip-icon-link.entry.js +1 -1
  219. package/dist/esm/flip-icon-lock.entry.js +1 -1
  220. package/dist/esm/flip-icon-logout.entry.js +1 -1
  221. package/dist/esm/flip-icon-mail.entry.js +1 -1
  222. package/dist/esm/flip-icon-manage-accounts.entry.js +1 -1
  223. package/dist/esm/flip-icon-mention.entry.js +1 -1
  224. package/dist/esm/flip-icon-message.entry.js +1 -1
  225. package/dist/esm/flip-icon-more-horizontal.entry.js +1 -1
  226. package/dist/esm/flip-icon-more-vertikal.entry.js +1 -1
  227. package/dist/esm/flip-icon-notifications-active.entry.js +1 -1
  228. package/dist/esm/flip-icon-notifications-off.entry.js +1 -1
  229. package/dist/esm/flip-icon-notifications.entry.js +1 -1
  230. package/dist/esm/flip-icon-people-alt.entry.js +1 -1
  231. package/dist/esm/flip-icon-person-off.entry.js +1 -1
  232. package/dist/esm/flip-icon-person.entry.js +1 -1
  233. package/dist/esm/flip-icon-phone.entry.js +1 -1
  234. package/dist/esm/flip-icon-poll.entry.js +1 -1
  235. package/dist/esm/flip-icon-recieved.entry.js +1 -1
  236. package/dist/esm/flip-icon-search-strong.entry.js +1 -1
  237. package/dist/esm/flip-icon-send.entry.js +1 -1
  238. package/dist/esm/flip-icon-settings.entry.js +1 -1
  239. package/dist/esm/flip-icon-time-filled.entry.js +1 -1
  240. package/dist/esm/flip-icon-time-outlined.entry.js +1 -1
  241. package/dist/esm/flip-icon-today.entry.js +1 -1
  242. package/dist/esm/flip-icon-user-assign.entry.js +1 -1
  243. package/dist/esm/flip-icon-video-camera.entry.js +1 -1
  244. package/dist/esm/flip-icon-visibility-off.entry.js +1 -1
  245. package/dist/esm/flip-icon-visibility.entry.js +1 -1
  246. package/dist/esm/flip-icon-warning.entry.js +1 -1
  247. package/dist/esm/flip-inline-error_2.entry.js +33 -0
  248. package/dist/esm/flip-link.entry.js +1 -1
  249. package/dist/esm/flip-popover.entry.js +3 -1152
  250. package/dist/esm/flip-radio-group.entry.js +1 -1
  251. package/dist/esm/flip-radio.entry.js +1 -1
  252. package/dist/esm/flip-resource-list-file-item.entry.js +26 -0
  253. package/dist/esm/flip-resource-list-item.entry.js +69 -0
  254. package/dist/esm/flip-resource-list.entry.js +63 -0
  255. package/dist/esm/flip-search.entry.js +1 -1
  256. package/dist/esm/flip-stack.entry.js +1 -1
  257. package/dist/esm/flip-switch.entry.js +1 -1
  258. package/dist/esm/flip-tab.entry.js +17 -0
  259. package/dist/esm/flip-tabs.entry.js +120 -0
  260. package/dist/esm/flip-tag.entry.js +1 -1
  261. package/dist/esm/flip-theme-provider.entry.js +1 -1
  262. package/dist/esm/flip-thumbnail.entry.js +1 -1
  263. package/dist/esm/flip-toast-provider.entry.js +1 -1
  264. package/dist/esm/flip-toast.entry.js +1 -1
  265. package/dist/esm/flip-tooltip.entry.js +22 -14
  266. package/dist/esm/flip-visually-hidden.entry.js +1 -1
  267. package/dist/esm/floating-ui.dom.esm-1a4e8b8a.js +1222 -0
  268. package/dist/esm/{index-36517fab.js → index-64709274.js} +3 -0
  269. package/dist/esm/loader.js +2 -2
  270. package/dist/esm/swirl-components.js +2 -2
  271. package/dist/swirl-components/{p-adbcf0ae.entry.js → p-0b197bc2.entry.js} +1 -1
  272. package/dist/swirl-components/{p-4f3d8490.entry.js → p-0bd72823.entry.js} +1 -1
  273. package/dist/swirl-components/{p-e1554c48.entry.js → p-0f72be83.entry.js} +1 -1
  274. package/dist/swirl-components/p-0fd19b1e.entry.js +1 -0
  275. package/dist/swirl-components/{p-432dd5f1.entry.js → p-118f9dbc.entry.js} +1 -1
  276. package/dist/swirl-components/p-14404622.entry.js +1 -0
  277. package/dist/swirl-components/p-14a71662.entry.js +1 -0
  278. package/dist/swirl-components/{p-5a13d6fe.entry.js → p-150885c6.entry.js} +1 -1
  279. package/dist/swirl-components/p-1b14d1f8.entry.js +1 -0
  280. package/dist/swirl-components/{p-b64b6dc5.entry.js → p-294bc0f5.entry.js} +1 -1
  281. package/dist/swirl-components/{p-b4540264.entry.js → p-29f4348a.entry.js} +1 -1
  282. package/dist/swirl-components/{p-7a6b480c.entry.js → p-2b183dbd.entry.js} +1 -1
  283. package/dist/swirl-components/p-2e39e57a.entry.js +1 -0
  284. package/dist/swirl-components/{p-63e5b5d9.entry.js → p-2fada438.entry.js} +1 -1
  285. package/dist/swirl-components/{p-ff0868ae.entry.js → p-2fc324d2.entry.js} +1 -1
  286. package/dist/swirl-components/{p-f6e77552.entry.js → p-3115dcce.entry.js} +1 -1
  287. package/dist/swirl-components/{p-a1946e3b.entry.js → p-314da0b6.entry.js} +1 -1
  288. package/dist/swirl-components/p-3203d26c.entry.js +1 -0
  289. package/dist/swirl-components/{p-ad434623.entry.js → p-33eeffa4.entry.js} +1 -1
  290. package/dist/swirl-components/{p-1419666f.entry.js → p-340a8594.entry.js} +1 -1
  291. package/dist/swirl-components/p-3a78c66a.entry.js +1 -0
  292. package/dist/swirl-components/{p-6b840e3d.entry.js → p-3fd6dfcc.entry.js} +1 -1
  293. package/dist/swirl-components/{p-e384bd2c.entry.js → p-41b352e3.entry.js} +1 -1
  294. package/dist/swirl-components/{p-3234f836.entry.js → p-428b8a65.entry.js} +1 -1
  295. package/dist/swirl-components/{p-cfef8bdb.entry.js → p-45a0619d.entry.js} +1 -1
  296. package/dist/swirl-components/{p-d1c899ad.entry.js → p-46db6bb6.entry.js} +1 -1
  297. package/dist/swirl-components/{p-1429e47a.entry.js → p-482528d9.entry.js} +1 -1
  298. package/dist/swirl-components/{p-213191cb.entry.js → p-4c846d53.entry.js} +1 -1
  299. package/dist/swirl-components/{p-1a9f0bc1.entry.js → p-4cd180da.entry.js} +1 -1
  300. package/dist/swirl-components/{p-17073db0.entry.js → p-4d5bc933.entry.js} +1 -1
  301. package/dist/swirl-components/{p-e0513b73.entry.js → p-4eda9d6d.entry.js} +1 -1
  302. package/dist/swirl-components/{p-102db76d.entry.js → p-4f209111.entry.js} +1 -1
  303. package/dist/swirl-components/{p-e65d2d81.entry.js → p-562db126.entry.js} +1 -1
  304. package/dist/swirl-components/p-5757b517.entry.js +1 -0
  305. package/dist/swirl-components/{p-94d933b3.entry.js → p-589d6d22.entry.js} +1 -1
  306. package/dist/swirl-components/{p-c5200740.entry.js → p-5cc28450.entry.js} +1 -1
  307. package/dist/swirl-components/{p-b16d4978.entry.js → p-6384f8ba.entry.js} +1 -1
  308. package/dist/swirl-components/{p-545caf4a.entry.js → p-638b96a3.entry.js} +1 -1
  309. package/dist/swirl-components/{p-468d0e9b.entry.js → p-639fe827.entry.js} +1 -1
  310. package/dist/swirl-components/{p-0d619d62.entry.js → p-65231ba1.entry.js} +1 -1
  311. package/dist/swirl-components/{p-5d27a69e.entry.js → p-6966c97a.entry.js} +1 -1
  312. package/dist/swirl-components/{p-1609dbf3.entry.js → p-69b15b39.entry.js} +1 -1
  313. package/dist/swirl-components/p-6ab4b7cf.entry.js +1 -0
  314. package/dist/swirl-components/{p-56bdede5.entry.js → p-6c2b7a96.entry.js} +1 -1
  315. package/dist/swirl-components/{p-cc50d7a7.entry.js → p-70c5764b.entry.js} +1 -1
  316. package/dist/swirl-components/{p-70b255b3.entry.js → p-7272b763.entry.js} +1 -1
  317. package/dist/swirl-components/{p-f45709c0.entry.js → p-73ee554b.entry.js} +1 -1
  318. package/dist/swirl-components/p-7548473c.js +2 -0
  319. package/dist/swirl-components/{p-a71261bc.entry.js → p-75cf42d4.entry.js} +1 -1
  320. package/dist/swirl-components/{p-9c12d1eb.entry.js → p-7740f11b.entry.js} +1 -1
  321. package/dist/swirl-components/{p-fb19d8b9.entry.js → p-77cf9f30.entry.js} +1 -1
  322. package/dist/swirl-components/{p-0fa4c4cf.entry.js → p-84197db5.entry.js} +1 -1
  323. package/dist/swirl-components/p-88d8a3a9.entry.js +1 -0
  324. package/dist/swirl-components/{p-54b9e1b5.entry.js → p-8949fe7a.entry.js} +1 -1
  325. package/dist/swirl-components/{p-47a9a9cb.entry.js → p-8f1f9e78.entry.js} +1 -1
  326. package/dist/swirl-components/p-8fa700a5.entry.js +1 -0
  327. package/dist/swirl-components/{p-db229451.entry.js → p-926857f1.entry.js} +1 -1
  328. package/dist/swirl-components/{p-b624ff23.entry.js → p-97257780.entry.js} +1 -1
  329. package/dist/swirl-components/{p-0fa6b98f.entry.js → p-9b154fa3.entry.js} +1 -1
  330. package/dist/swirl-components/{p-453db2cf.entry.js → p-9c9da0a4.entry.js} +1 -1
  331. package/dist/swirl-components/{p-f8273972.entry.js → p-a133fb9d.entry.js} +1 -1
  332. package/dist/swirl-components/{p-9d07fb5a.entry.js → p-a362f0f9.entry.js} +1 -1
  333. package/dist/swirl-components/p-a6054ed9.entry.js +1 -0
  334. package/dist/swirl-components/p-a81417d9.entry.js +1 -0
  335. package/dist/swirl-components/{p-a6fb93df.entry.js → p-a8f3668a.entry.js} +1 -1
  336. package/dist/swirl-components/{p-1c8b77fe.entry.js → p-a94f114d.entry.js} +1 -1
  337. package/dist/swirl-components/{p-6a6de48d.entry.js → p-a98d70ca.entry.js} +1 -1
  338. package/dist/swirl-components/{p-126ead5f.entry.js → p-aaad68e8.entry.js} +1 -1
  339. package/dist/swirl-components/{p-a605b3d1.entry.js → p-b117edfa.entry.js} +1 -1
  340. package/dist/swirl-components/{p-01857435.entry.js → p-b3a71d9f.entry.js} +1 -1
  341. package/dist/swirl-components/{p-ae504b3e.entry.js → p-b6790219.entry.js} +1 -1
  342. package/dist/swirl-components/{p-24d112d7.entry.js → p-bb2d617e.entry.js} +1 -1
  343. package/dist/swirl-components/{p-0a9f3ada.entry.js → p-be40f14f.entry.js} +1 -1
  344. package/dist/swirl-components/{p-1bd3e7c0.entry.js → p-c3b49fae.entry.js} +1 -1
  345. package/dist/swirl-components/{p-f1774da0.entry.js → p-c69ba478.entry.js} +1 -1
  346. package/dist/swirl-components/{p-1c2e8e09.entry.js → p-c6d26cc3.entry.js} +1 -1
  347. package/dist/swirl-components/{p-fa7cc450.entry.js → p-c7427e54.entry.js} +1 -1
  348. package/dist/swirl-components/{p-cf8be27a.entry.js → p-c76f568b.entry.js} +1 -1
  349. package/dist/swirl-components/{p-a203be4a.entry.js → p-c8ef7c7b.entry.js} +1 -1
  350. package/dist/swirl-components/{p-6b957569.entry.js → p-c9281fc5.entry.js} +1 -1
  351. package/dist/swirl-components/p-cb622b3f.entry.js +1 -0
  352. package/dist/swirl-components/{p-0de885c6.entry.js → p-d34657bb.entry.js} +1 -1
  353. package/dist/swirl-components/{p-db902aec.entry.js → p-d353d8a6.entry.js} +1 -1
  354. package/dist/swirl-components/{p-55aaf1d3.entry.js → p-d437a017.entry.js} +1 -1
  355. package/dist/swirl-components/{p-67deba9e.entry.js → p-daf021ff.entry.js} +1 -1
  356. package/dist/swirl-components/p-db407fe2.entry.js +1 -0
  357. package/dist/swirl-components/{p-30011711.entry.js → p-df779bfc.entry.js} +1 -1
  358. package/dist/swirl-components/{p-95bd2274.entry.js → p-e04eac13.entry.js} +1 -1
  359. package/dist/swirl-components/{p-e89c7891.entry.js → p-e3c228f6.entry.js} +1 -1
  360. package/dist/swirl-components/{p-32a5e2a7.entry.js → p-e4a8a549.entry.js} +1 -1
  361. package/dist/swirl-components/p-e8bb09e8.js +1 -0
  362. package/dist/swirl-components/{p-e4df2658.entry.js → p-e8f32c6d.entry.js} +1 -1
  363. package/dist/swirl-components/{p-37d96123.entry.js → p-ec59a844.entry.js} +1 -1
  364. package/dist/swirl-components/{p-1126e372.entry.js → p-ece8d0a9.entry.js} +1 -1
  365. package/dist/swirl-components/{p-6a9a0e08.entry.js → p-f2bd932c.entry.js} +1 -1
  366. package/dist/swirl-components/{p-46f638cf.entry.js → p-f5bd49b1.entry.js} +1 -1
  367. package/dist/swirl-components/{p-b5cd4041.entry.js → p-f6a1e319.entry.js} +1 -1
  368. package/dist/swirl-components/{p-d41e3a37.entry.js → p-f8eaba53.entry.js} +1 -1
  369. package/dist/swirl-components/{p-437842a2.entry.js → p-f9719283.entry.js} +1 -1
  370. package/dist/swirl-components/{p-f59098f7.entry.js → p-f9a4a60c.entry.js} +1 -1
  371. package/dist/swirl-components/{p-8bf1ad8a.entry.js → p-f9e967e7.entry.js} +1 -1
  372. package/dist/swirl-components/{p-828cc4a3.entry.js → p-fa626f0f.entry.js} +1 -1
  373. package/dist/swirl-components/{p-8423a1b5.entry.js → p-fca2a909.entry.js} +1 -1
  374. package/dist/swirl-components/{p-c35a6610.entry.js → p-fcd09fdc.entry.js} +1 -1
  375. package/dist/swirl-components/{p-67aaf094.entry.js → p-ff23c876.entry.js} +1 -1
  376. package/dist/swirl-components/swirl-components.css +2 -2
  377. package/dist/swirl-components/swirl-components.esm.js +1 -1
  378. package/dist/types/components/flip-button/flip-button.d.ts +1 -0
  379. package/dist/types/components/flip-file-uploader/flip-file-uploader.d.ts +24 -0
  380. package/dist/types/components/flip-file-uploader/flip-file-uploader.stories.d.ts +13 -0
  381. package/dist/types/components/flip-icon/icons/flip-icon-cloud-upload.d.ts +5 -0
  382. package/dist/types/components/flip-resource-list/flip-resource-list.d.ts +13 -0
  383. package/dist/types/components/flip-resource-list/flip-resource-list.stories.d.ts +13 -0
  384. package/dist/types/components/flip-resource-list-file-item/flip-resource-list-file-item.d.ts +12 -0
  385. package/dist/types/components/flip-resource-list-file-item/flip-resource-list-file-item.stories.d.ts +23 -0
  386. package/dist/types/components/flip-resource-list-item/flip-resource-list-item.d.ts +23 -0
  387. package/dist/types/components/flip-resource-list-item/flip-resource-list-item.stories.d.ts +16 -0
  388. package/dist/types/components/flip-tab/flip-tab.d.ts +6 -0
  389. package/dist/types/components/flip-tab/flip-tab.stories.d.ts +13 -0
  390. package/dist/types/components/flip-tabs/flip-tabs.d.ts +27 -0
  391. package/dist/types/components/flip-tabs/flip-tabs.stories.d.ts +13 -0
  392. package/dist/types/components/flip-tooltip/flip-tooltip.d.ts +2 -2
  393. package/dist/types/components.d.ts +196 -0
  394. package/dist/types/utils.d.ts +9 -0
  395. package/package.json +3 -4
  396. package/vscode-data.json +215 -0
  397. package/dist/cjs/flip-inline-error.cjs.entry.js +0 -23
  398. package/dist/esm/flip-inline-error.entry.js +0 -19
  399. package/dist/swirl-components/p-1853aaf0.entry.js +0 -1
  400. package/dist/swirl-components/p-18965b40.entry.js +0 -1
  401. package/dist/swirl-components/p-18a51976.entry.js +0 -1
  402. package/dist/swirl-components/p-3d59d365.entry.js +0 -1
  403. package/dist/swirl-components/p-9b4a9856.entry.js +0 -1
  404. package/dist/swirl-components/p-aada2b77.entry.js +0 -1
  405. package/dist/swirl-components/p-cac72e30.entry.js +0 -1
  406. package/dist/swirl-components/p-d3999b94.entry.js +0 -2
  407. package/dist/swirl-components/p-e12fbb2d.js +0 -2
@@ -1,1157 +1,8 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+ import { a as autoUpdate, c as computePosition, s as shift, f as flip } from './floating-ui.dom.esm.js';
2
3
  import { c as classnames } from './index2.js';
3
4
  import { q as querySelectorAllDeep } from './utils.js';
4
5
 
5
- function getSide(placement) {
6
- return placement.split('-')[0];
7
- }
8
-
9
- function getAlignment(placement) {
10
- return placement.split('-')[1];
11
- }
12
-
13
- function getMainAxisFromPlacement(placement) {
14
- return ['top', 'bottom'].includes(getSide(placement)) ? 'x' : 'y';
15
- }
16
-
17
- function getLengthFromAxis(axis) {
18
- return axis === 'y' ? 'height' : 'width';
19
- }
20
-
21
- function computeCoordsFromPlacement(_ref, placement, rtl) {
22
- let {
23
- reference,
24
- floating
25
- } = _ref;
26
- const commonX = reference.x + reference.width / 2 - floating.width / 2;
27
- const commonY = reference.y + reference.height / 2 - floating.height / 2;
28
- const mainAxis = getMainAxisFromPlacement(placement);
29
- const length = getLengthFromAxis(mainAxis);
30
- const commonAlign = reference[length] / 2 - floating[length] / 2;
31
- const side = getSide(placement);
32
- const isVertical = mainAxis === 'x';
33
- let coords;
34
-
35
- switch (side) {
36
- case 'top':
37
- coords = {
38
- x: commonX,
39
- y: reference.y - floating.height
40
- };
41
- break;
42
-
43
- case 'bottom':
44
- coords = {
45
- x: commonX,
46
- y: reference.y + reference.height
47
- };
48
- break;
49
-
50
- case 'right':
51
- coords = {
52
- x: reference.x + reference.width,
53
- y: commonY
54
- };
55
- break;
56
-
57
- case 'left':
58
- coords = {
59
- x: reference.x - floating.width,
60
- y: commonY
61
- };
62
- break;
63
-
64
- default:
65
- coords = {
66
- x: reference.x,
67
- y: reference.y
68
- };
69
- }
70
-
71
- switch (getAlignment(placement)) {
72
- case 'start':
73
- coords[mainAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
74
- break;
75
-
76
- case 'end':
77
- coords[mainAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
78
- break;
79
- }
80
-
81
- return coords;
82
- }
83
-
84
- /**
85
- * Computes the `x` and `y` coordinates that will place the floating element
86
- * next to a reference element when it is given a certain positioning strategy.
87
- *
88
- * This export does not have any `platform` interface logic. You will need to
89
- * write one for the platform you are using Floating UI with.
90
- */
91
-
92
- const computePosition$1 = async (reference, floating, config) => {
93
- const {
94
- placement = 'bottom',
95
- strategy = 'absolute',
96
- middleware = [],
97
- platform
98
- } = config;
99
- const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
100
-
101
- let rects = await platform.getElementRects({
102
- reference,
103
- floating,
104
- strategy
105
- });
106
- let {
107
- x,
108
- y
109
- } = computeCoordsFromPlacement(rects, placement, rtl);
110
- let statefulPlacement = placement;
111
- let middlewareData = {};
112
- let resetCount = 0;
113
-
114
- for (let i = 0; i < middleware.length; i++) {
115
- const {
116
- name,
117
- fn
118
- } = middleware[i];
119
- const {
120
- x: nextX,
121
- y: nextY,
122
- data,
123
- reset
124
- } = await fn({
125
- x,
126
- y,
127
- initialPlacement: placement,
128
- placement: statefulPlacement,
129
- strategy,
130
- middlewareData,
131
- rects,
132
- platform,
133
- elements: {
134
- reference,
135
- floating
136
- }
137
- });
138
- x = nextX != null ? nextX : x;
139
- y = nextY != null ? nextY : y;
140
- middlewareData = { ...middlewareData,
141
- [name]: { ...middlewareData[name],
142
- ...data
143
- }
144
- };
145
-
146
- if (reset && resetCount <= 50) {
147
- resetCount++;
148
-
149
- if (typeof reset === 'object') {
150
- if (reset.placement) {
151
- statefulPlacement = reset.placement;
152
- }
153
-
154
- if (reset.rects) {
155
- rects = reset.rects === true ? await platform.getElementRects({
156
- reference,
157
- floating,
158
- strategy
159
- }) : reset.rects;
160
- }
161
-
162
- ({
163
- x,
164
- y
165
- } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
166
- }
167
-
168
- i = -1;
169
- continue;
170
- }
171
- }
172
-
173
- return {
174
- x,
175
- y,
176
- placement: statefulPlacement,
177
- strategy,
178
- middlewareData
179
- };
180
- };
181
-
182
- function expandPaddingObject(padding) {
183
- return {
184
- top: 0,
185
- right: 0,
186
- bottom: 0,
187
- left: 0,
188
- ...padding
189
- };
190
- }
191
-
192
- function getSideObjectFromPadding(padding) {
193
- return typeof padding !== 'number' ? expandPaddingObject(padding) : {
194
- top: padding,
195
- right: padding,
196
- bottom: padding,
197
- left: padding
198
- };
199
- }
200
-
201
- function rectToClientRect(rect) {
202
- return { ...rect,
203
- top: rect.y,
204
- left: rect.x,
205
- right: rect.x + rect.width,
206
- bottom: rect.y + rect.height
207
- };
208
- }
209
-
210
- /**
211
- * Resolves with an object of overflow side offsets that determine how much the
212
- * element is overflowing a given clipping boundary.
213
- * - positive = overflowing the boundary by that number of pixels
214
- * - negative = how many pixels left before it will overflow
215
- * - 0 = lies flush with the boundary
216
- * @see https://floating-ui.com/docs/detectOverflow
217
- */
218
- async function detectOverflow(middlewareArguments, options) {
219
- var _await$platform$isEle;
220
-
221
- if (options === void 0) {
222
- options = {};
223
- }
224
-
225
- const {
226
- x,
227
- y,
228
- platform,
229
- rects,
230
- elements,
231
- strategy
232
- } = middlewareArguments;
233
- const {
234
- boundary = 'clippingAncestors',
235
- rootBoundary = 'viewport',
236
- elementContext = 'floating',
237
- altBoundary = false,
238
- padding = 0
239
- } = options;
240
- const paddingObject = getSideObjectFromPadding(padding);
241
- const altContext = elementContext === 'floating' ? 'reference' : 'floating';
242
- const element = elements[altBoundary ? altContext : elementContext];
243
- const clippingClientRect = rectToClientRect(await platform.getClippingRect({
244
- 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))),
245
- boundary,
246
- rootBoundary,
247
- strategy
248
- }));
249
- const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
250
- rect: elementContext === 'floating' ? { ...rects.floating,
251
- x,
252
- y
253
- } : rects.reference,
254
- offsetParent: await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating)),
255
- strategy
256
- }) : rects[elementContext]);
257
- return {
258
- top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
259
- bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
260
- left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
261
- right: elementClientRect.right - clippingClientRect.right + paddingObject.right
262
- };
263
- }
264
-
265
- const min$1 = Math.min;
266
- const max$1 = Math.max;
267
-
268
- function within(min$1$1, value, max$1$1) {
269
- return max$1(min$1$1, min$1(value, max$1$1));
270
- }
271
-
272
- const hash$1 = {
273
- left: 'right',
274
- right: 'left',
275
- bottom: 'top',
276
- top: 'bottom'
277
- };
278
- function getOppositePlacement(placement) {
279
- return placement.replace(/left|right|bottom|top/g, matched => hash$1[matched]);
280
- }
281
-
282
- function getAlignmentSides(placement, rects, rtl) {
283
- if (rtl === void 0) {
284
- rtl = false;
285
- }
286
-
287
- const alignment = getAlignment(placement);
288
- const mainAxis = getMainAxisFromPlacement(placement);
289
- const length = getLengthFromAxis(mainAxis);
290
- let mainAlignmentSide = mainAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
291
-
292
- if (rects.reference[length] > rects.floating[length]) {
293
- mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
294
- }
295
-
296
- return {
297
- main: mainAlignmentSide,
298
- cross: getOppositePlacement(mainAlignmentSide)
299
- };
300
- }
301
-
302
- const hash = {
303
- start: 'end',
304
- end: 'start'
305
- };
306
- function getOppositeAlignmentPlacement(placement) {
307
- return placement.replace(/start|end/g, matched => hash[matched]);
308
- }
309
-
310
- function getExpandedPlacements(placement) {
311
- const oppositePlacement = getOppositePlacement(placement);
312
- return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
313
- }
314
-
315
- /**
316
- * Changes the placement of the floating element to one that will fit if the
317
- * initially specified `placement` does not.
318
- * @see https://floating-ui.com/docs/flip
319
- */
320
- const flip = function (options) {
321
- if (options === void 0) {
322
- options = {};
323
- }
324
-
325
- return {
326
- name: 'flip',
327
- options,
328
-
329
- async fn(middlewareArguments) {
330
- var _middlewareData$flip;
331
-
332
- const {
333
- placement,
334
- middlewareData,
335
- rects,
336
- initialPlacement,
337
- platform,
338
- elements
339
- } = middlewareArguments;
340
- const {
341
- mainAxis: checkMainAxis = true,
342
- crossAxis: checkCrossAxis = true,
343
- fallbackPlacements: specifiedFallbackPlacements,
344
- fallbackStrategy = 'bestFit',
345
- flipAlignment = true,
346
- ...detectOverflowOptions
347
- } = options;
348
- const side = getSide(placement);
349
- const isBasePlacement = side === initialPlacement;
350
- const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
351
- const placements = [initialPlacement, ...fallbackPlacements];
352
- const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);
353
- const overflows = [];
354
- let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
355
-
356
- if (checkMainAxis) {
357
- overflows.push(overflow[side]);
358
- }
359
-
360
- if (checkCrossAxis) {
361
- const {
362
- main,
363
- cross
364
- } = getAlignmentSides(placement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
365
- overflows.push(overflow[main], overflow[cross]);
366
- }
367
-
368
- overflowsData = [...overflowsData, {
369
- placement,
370
- overflows
371
- }]; // One or more sides is overflowing
372
-
373
- if (!overflows.every(side => side <= 0)) {
374
- var _middlewareData$flip$, _middlewareData$flip2;
375
-
376
- const nextIndex = ((_middlewareData$flip$ = (_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) != null ? _middlewareData$flip$ : 0) + 1;
377
- const nextPlacement = placements[nextIndex];
378
-
379
- if (nextPlacement) {
380
- // Try next placement and re-run the lifecycle
381
- return {
382
- data: {
383
- index: nextIndex,
384
- overflows: overflowsData
385
- },
386
- reset: {
387
- placement: nextPlacement
388
- }
389
- };
390
- }
391
-
392
- let resetPlacement = 'bottom';
393
-
394
- switch (fallbackStrategy) {
395
- case 'bestFit':
396
- {
397
- var _overflowsData$map$so;
398
-
399
- const placement = (_overflowsData$map$so = overflowsData.map(d => [d, 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].placement;
400
-
401
- if (placement) {
402
- resetPlacement = placement;
403
- }
404
-
405
- break;
406
- }
407
-
408
- case 'initialPlacement':
409
- resetPlacement = initialPlacement;
410
- break;
411
- }
412
-
413
- if (placement !== resetPlacement) {
414
- return {
415
- reset: {
416
- placement: resetPlacement
417
- }
418
- };
419
- }
420
- }
421
-
422
- return {};
423
- }
424
-
425
- };
426
- };
427
-
428
- function getCrossAxis(axis) {
429
- return axis === 'x' ? 'y' : 'x';
430
- }
431
-
432
- /**
433
- * Shifts the floating element in order to keep it in view when it will overflow
434
- * a clipping boundary.
435
- * @see https://floating-ui.com/docs/shift
436
- */
437
- const shift = function (options) {
438
- if (options === void 0) {
439
- options = {};
440
- }
441
-
442
- return {
443
- name: 'shift',
444
- options,
445
-
446
- async fn(middlewareArguments) {
447
- const {
448
- x,
449
- y,
450
- placement
451
- } = middlewareArguments;
452
- const {
453
- mainAxis: checkMainAxis = true,
454
- crossAxis: checkCrossAxis = false,
455
- limiter = {
456
- fn: _ref => {
457
- let {
458
- x,
459
- y
460
- } = _ref;
461
- return {
462
- x,
463
- y
464
- };
465
- }
466
- },
467
- ...detectOverflowOptions
468
- } = options;
469
- const coords = {
470
- x,
471
- y
472
- };
473
- const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);
474
- const mainAxis = getMainAxisFromPlacement(getSide(placement));
475
- const crossAxis = getCrossAxis(mainAxis);
476
- let mainAxisCoord = coords[mainAxis];
477
- let crossAxisCoord = coords[crossAxis];
478
-
479
- if (checkMainAxis) {
480
- const minSide = mainAxis === 'y' ? 'top' : 'left';
481
- const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
482
- const min = mainAxisCoord + overflow[minSide];
483
- const max = mainAxisCoord - overflow[maxSide];
484
- mainAxisCoord = within(min, mainAxisCoord, max);
485
- }
486
-
487
- if (checkCrossAxis) {
488
- const minSide = crossAxis === 'y' ? 'top' : 'left';
489
- const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
490
- const min = crossAxisCoord + overflow[minSide];
491
- const max = crossAxisCoord - overflow[maxSide];
492
- crossAxisCoord = within(min, crossAxisCoord, max);
493
- }
494
-
495
- const limitedCoords = limiter.fn({ ...middlewareArguments,
496
- [mainAxis]: mainAxisCoord,
497
- [crossAxis]: crossAxisCoord
498
- });
499
- return { ...limitedCoords,
500
- data: {
501
- x: limitedCoords.x - x,
502
- y: limitedCoords.y - y
503
- }
504
- };
505
- }
506
-
507
- };
508
- };
509
-
510
- function isWindow(value) {
511
- return value && value.document && value.location && value.alert && value.setInterval;
512
- }
513
- function getWindow(node) {
514
- if (node == null) {
515
- return window;
516
- }
517
-
518
- if (!isWindow(node)) {
519
- const ownerDocument = node.ownerDocument;
520
- return ownerDocument ? ownerDocument.defaultView || window : window;
521
- }
522
-
523
- return node;
524
- }
525
-
526
- function getComputedStyle(element) {
527
- return getWindow(element).getComputedStyle(element);
528
- }
529
-
530
- function getNodeName(node) {
531
- return isWindow(node) ? '' : node ? (node.nodeName || '').toLowerCase() : '';
532
- }
533
-
534
- function getUAString() {
535
- const uaData = navigator.userAgentData;
536
-
537
- if (uaData != null && uaData.brands) {
538
- return uaData.brands.map(item => item.brand + "/" + item.version).join(' ');
539
- }
540
-
541
- return navigator.userAgent;
542
- }
543
-
544
- function isHTMLElement(value) {
545
- return value instanceof getWindow(value).HTMLElement;
546
- }
547
- function isElement(value) {
548
- return value instanceof getWindow(value).Element;
549
- }
550
- function isNode(value) {
551
- return value instanceof getWindow(value).Node;
552
- }
553
- function isShadowRoot(node) {
554
- // Browsers without `ShadowRoot` support
555
- if (typeof ShadowRoot === 'undefined') {
556
- return false;
557
- }
558
-
559
- const OwnElement = getWindow(node).ShadowRoot;
560
- return node instanceof OwnElement || node instanceof ShadowRoot;
561
- }
562
- function isOverflowElement(element) {
563
- // Firefox wants us to check `-x` and `-y` variations as well
564
- const {
565
- overflow,
566
- overflowX,
567
- overflowY
568
- } = getComputedStyle(element);
569
- return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
570
- }
571
- function isTableElement(element) {
572
- return ['table', 'td', 'th'].includes(getNodeName(element));
573
- }
574
- function isContainingBlock(element) {
575
- // TODO: Try and use feature detection here instead
576
- const isFirefox = /firefox/i.test(getUAString());
577
- const css = getComputedStyle(element); // This is non-exhaustive but covers the most common CSS properties that
578
- // create a containing block.
579
- // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
580
-
581
- return css.transform !== 'none' || css.perspective !== 'none' || // @ts-ignore (TS 4.1 compat)
582
- css.contain === 'paint' || ['transform', 'perspective'].includes(css.willChange) || isFirefox && css.willChange === 'filter' || isFirefox && (css.filter ? css.filter !== 'none' : false);
583
- }
584
- function isLayoutViewport() {
585
- // Not Safari
586
- return !/^((?!chrome|android).)*safari/i.test(getUAString()); // Feature detection for this fails in various ways
587
- // • Always-visible scrollbar or not
588
- // • Width of <html>, etc.
589
- // const vV = win.visualViewport;
590
- // return vV ? Math.abs(win.innerWidth / vV.scale - vV.width) < 0.5 : true;
591
- }
592
-
593
- const min = Math.min;
594
- const max = Math.max;
595
- const round = Math.round;
596
-
597
- function getBoundingClientRect(element, includeScale, isFixedStrategy) {
598
- var _win$visualViewport$o, _win$visualViewport, _win$visualViewport$o2, _win$visualViewport2;
599
-
600
- if (includeScale === void 0) {
601
- includeScale = false;
602
- }
603
-
604
- if (isFixedStrategy === void 0) {
605
- isFixedStrategy = false;
606
- }
607
-
608
- const clientRect = element.getBoundingClientRect();
609
- let scaleX = 1;
610
- let scaleY = 1;
611
-
612
- if (includeScale && isHTMLElement(element)) {
613
- scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
614
- scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
615
- }
616
-
617
- const win = isElement(element) ? getWindow(element) : window;
618
- const addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
619
- const x = (clientRect.left + (addVisualOffsets ? (_win$visualViewport$o = (_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) != null ? _win$visualViewport$o : 0 : 0)) / scaleX;
620
- const y = (clientRect.top + (addVisualOffsets ? (_win$visualViewport$o2 = (_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) != null ? _win$visualViewport$o2 : 0 : 0)) / scaleY;
621
- const width = clientRect.width / scaleX;
622
- const height = clientRect.height / scaleY;
623
- return {
624
- width,
625
- height,
626
- top: y,
627
- right: x + width,
628
- bottom: y + height,
629
- left: x,
630
- x,
631
- y
632
- };
633
- }
634
-
635
- function getDocumentElement(node) {
636
- return ((isNode(node) ? node.ownerDocument : node.document) || window.document).documentElement;
637
- }
638
-
639
- function getNodeScroll(element) {
640
- if (isElement(element)) {
641
- return {
642
- scrollLeft: element.scrollLeft,
643
- scrollTop: element.scrollTop
644
- };
645
- }
646
-
647
- return {
648
- scrollLeft: element.pageXOffset,
649
- scrollTop: element.pageYOffset
650
- };
651
- }
652
-
653
- function getWindowScrollBarX(element) {
654
- // If <html> has a CSS width greater than the viewport, then this will be
655
- // incorrect for RTL.
656
- return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
657
- }
658
-
659
- function isScaled(element) {
660
- const rect = getBoundingClientRect(element);
661
- return round(rect.width) !== element.offsetWidth || round(rect.height) !== element.offsetHeight;
662
- }
663
-
664
- function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
665
- const isOffsetParentAnElement = isHTMLElement(offsetParent);
666
- const documentElement = getDocumentElement(offsetParent);
667
- const rect = getBoundingClientRect(element, // @ts-ignore - checked above (TS 4.1 compat)
668
- isOffsetParentAnElement && isScaled(offsetParent), strategy === 'fixed');
669
- let scroll = {
670
- scrollLeft: 0,
671
- scrollTop: 0
672
- };
673
- const offsets = {
674
- x: 0,
675
- y: 0
676
- };
677
-
678
- if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
679
- if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
680
- scroll = getNodeScroll(offsetParent);
681
- }
682
-
683
- if (isHTMLElement(offsetParent)) {
684
- const offsetRect = getBoundingClientRect(offsetParent, true);
685
- offsets.x = offsetRect.x + offsetParent.clientLeft;
686
- offsets.y = offsetRect.y + offsetParent.clientTop;
687
- } else if (documentElement) {
688
- offsets.x = getWindowScrollBarX(documentElement);
689
- }
690
- }
691
-
692
- return {
693
- x: rect.left + scroll.scrollLeft - offsets.x,
694
- y: rect.top + scroll.scrollTop - offsets.y,
695
- width: rect.width,
696
- height: rect.height
697
- };
698
- }
699
-
700
- function getParentNode(node) {
701
- if (getNodeName(node) === 'html') {
702
- return node;
703
- }
704
-
705
- return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle
706
- // @ts-ignore
707
- node.assignedSlot || // step into the shadow DOM of the parent of a slotted node
708
- node.parentNode || ( // DOM Element detected
709
- isShadowRoot(node) ? node.host : null) || // ShadowRoot detected
710
- getDocumentElement(node) // fallback
711
-
712
- );
713
- }
714
-
715
- function getTrueOffsetParent(element) {
716
- if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {
717
- return null;
718
- }
719
-
720
- return composedOffsetParent(element);
721
- }
722
- /**
723
- * Polyfills the old offsetParent behavior from before the spec was changed:
724
- * https://github.com/w3c/csswg-drafts/issues/159
725
- */
726
-
727
-
728
- function composedOffsetParent(element) {
729
- let {
730
- offsetParent
731
- } = element;
732
- let ancestor = element;
733
- let foundInsideSlot = false;
734
-
735
- while (ancestor && ancestor !== offsetParent) {
736
- const {
737
- assignedSlot
738
- } = ancestor;
739
-
740
- if (assignedSlot) {
741
- let newOffsetParent = assignedSlot.offsetParent;
742
-
743
- if (getComputedStyle(assignedSlot).display === 'contents') {
744
- const hadStyleAttribute = assignedSlot.hasAttribute('style');
745
- const oldDisplay = assignedSlot.style.display;
746
- assignedSlot.style.display = getComputedStyle(ancestor).display;
747
- newOffsetParent = assignedSlot.offsetParent;
748
- assignedSlot.style.display = oldDisplay;
749
-
750
- if (!hadStyleAttribute) {
751
- assignedSlot.removeAttribute('style');
752
- }
753
- }
754
-
755
- ancestor = assignedSlot;
756
-
757
- if (offsetParent !== newOffsetParent) {
758
- offsetParent = newOffsetParent;
759
- foundInsideSlot = true;
760
- }
761
- } else if (isShadowRoot(ancestor) && ancestor.host && foundInsideSlot) {
762
- break;
763
- }
764
-
765
- ancestor = isShadowRoot(ancestor) && ancestor.host || ancestor.parentNode;
766
- }
767
-
768
- return offsetParent;
769
- }
770
-
771
- function getContainingBlock(element) {
772
- let currentNode = getParentNode(element);
773
-
774
- if (isShadowRoot(currentNode)) {
775
- currentNode = currentNode.host;
776
- }
777
-
778
- while (isHTMLElement(currentNode) && !['html', 'body'].includes(getNodeName(currentNode))) {
779
- if (isContainingBlock(currentNode)) {
780
- return currentNode;
781
- } else {
782
- const parent = currentNode.parentNode;
783
- currentNode = isShadowRoot(parent) ? parent.host : parent;
784
- }
785
- }
786
-
787
- return null;
788
- } // Gets the closest ancestor positioned element. Handles some edge cases,
789
- // such as table ancestors and cross browser bugs.
790
-
791
-
792
- function getOffsetParent(element) {
793
- const window = getWindow(element);
794
- let offsetParent = getTrueOffsetParent(element);
795
-
796
- while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {
797
- offsetParent = getTrueOffsetParent(offsetParent);
798
- }
799
-
800
- if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
801
- return window;
802
- }
803
-
804
- return offsetParent || getContainingBlock(element) || window;
805
- }
806
-
807
- function getDimensions(element) {
808
- if (isHTMLElement(element)) {
809
- return {
810
- width: element.offsetWidth,
811
- height: element.offsetHeight
812
- };
813
- }
814
-
815
- const rect = getBoundingClientRect(element);
816
- return {
817
- width: rect.width,
818
- height: rect.height
819
- };
820
- }
821
-
822
- function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
823
- let {
824
- rect,
825
- offsetParent,
826
- strategy
827
- } = _ref;
828
- const isOffsetParentAnElement = isHTMLElement(offsetParent);
829
- const documentElement = getDocumentElement(offsetParent);
830
-
831
- if (offsetParent === documentElement) {
832
- return rect;
833
- }
834
-
835
- let scroll = {
836
- scrollLeft: 0,
837
- scrollTop: 0
838
- };
839
- const offsets = {
840
- x: 0,
841
- y: 0
842
- };
843
-
844
- if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
845
- if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
846
- scroll = getNodeScroll(offsetParent);
847
- }
848
-
849
- if (isHTMLElement(offsetParent)) {
850
- const offsetRect = getBoundingClientRect(offsetParent, true);
851
- offsets.x = offsetRect.x + offsetParent.clientLeft;
852
- offsets.y = offsetRect.y + offsetParent.clientTop;
853
- } // This doesn't appear to be need to be negated.
854
- // else if (documentElement) {
855
- // offsets.x = getWindowScrollBarX(documentElement);
856
- // }
857
-
858
- }
859
-
860
- return { ...rect,
861
- x: rect.x - scroll.scrollLeft + offsets.x,
862
- y: rect.y - scroll.scrollTop + offsets.y
863
- };
864
- }
865
-
866
- function getViewportRect(element, strategy) {
867
- const win = getWindow(element);
868
- const html = getDocumentElement(element);
869
- const visualViewport = win.visualViewport;
870
- let width = html.clientWidth;
871
- let height = html.clientHeight;
872
- let x = 0;
873
- let y = 0;
874
-
875
- if (visualViewport) {
876
- width = visualViewport.width;
877
- height = visualViewport.height;
878
- const layoutViewport = isLayoutViewport();
879
-
880
- if (layoutViewport || !layoutViewport && strategy === 'fixed') {
881
- x = visualViewport.offsetLeft;
882
- y = visualViewport.offsetTop;
883
- }
884
- }
885
-
886
- return {
887
- width,
888
- height,
889
- x,
890
- y
891
- };
892
- }
893
-
894
- // of the `<html>` and `<body>` rect bounds if horizontally scrollable
895
-
896
- function getDocumentRect(element) {
897
- var _element$ownerDocumen;
898
-
899
- const html = getDocumentElement(element);
900
- const scroll = getNodeScroll(element);
901
- const body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
902
- const width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
903
- const height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
904
- let x = -scroll.scrollLeft + getWindowScrollBarX(element);
905
- const y = -scroll.scrollTop;
906
-
907
- if (getComputedStyle(body || html).direction === 'rtl') {
908
- x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
909
- }
910
-
911
- return {
912
- width,
913
- height,
914
- x,
915
- y
916
- };
917
- }
918
-
919
- function getNearestOverflowAncestor(node) {
920
- const parentNode = getParentNode(node);
921
-
922
- if (['html', 'body', '#document'].includes(getNodeName(parentNode))) {
923
- // @ts-ignore assume body is always available
924
- return node.ownerDocument.body;
925
- }
926
-
927
- if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
928
- return parentNode;
929
- }
930
-
931
- return getNearestOverflowAncestor(parentNode);
932
- }
933
-
934
- function getOverflowAncestors(node, list) {
935
- var _node$ownerDocument;
936
-
937
- if (list === void 0) {
938
- list = [];
939
- }
940
-
941
- const scrollableAncestor = getNearestOverflowAncestor(node);
942
- const isBody = scrollableAncestor === ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.body);
943
- const win = getWindow(scrollableAncestor);
944
- const target = isBody ? [win].concat(win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []) : scrollableAncestor;
945
- const updatedList = list.concat(target);
946
- return isBody ? updatedList : // @ts-ignore: isBody tells us target will be an HTMLElement here
947
- updatedList.concat(getOverflowAncestors(target));
948
- }
949
-
950
- function contains(parent, child) {
951
- const rootNode = child.getRootNode == null ? void 0 : child.getRootNode(); // First, attempt with faster native method
952
-
953
- if (parent.contains(child)) {
954
- return true;
955
- } // then fallback to custom implementation with Shadow DOM support
956
- else if (rootNode && isShadowRoot(rootNode)) {
957
- let next = child;
958
-
959
- do {
960
- // use `===` replace node.isSameNode()
961
- if (next && parent === next) {
962
- return true;
963
- } // @ts-ignore: need a better way to handle this...
964
-
965
-
966
- next = next.parentNode || next.host;
967
- } while (next);
968
- }
969
-
970
- return false;
971
- }
972
-
973
- function getInnerBoundingClientRect(element, strategy) {
974
- const clientRect = getBoundingClientRect(element, false, strategy === 'fixed');
975
- const top = clientRect.top + element.clientTop;
976
- const left = clientRect.left + element.clientLeft;
977
- return {
978
- top,
979
- left,
980
- x: left,
981
- y: top,
982
- right: left + element.clientWidth,
983
- bottom: top + element.clientHeight,
984
- width: element.clientWidth,
985
- height: element.clientHeight
986
- };
987
- }
988
-
989
- function getClientRectFromClippingAncestor(element, clippingParent, strategy) {
990
- if (clippingParent === 'viewport') {
991
- return rectToClientRect(getViewportRect(element, strategy));
992
- }
993
-
994
- if (isElement(clippingParent)) {
995
- return getInnerBoundingClientRect(clippingParent, strategy);
996
- }
997
-
998
- return rectToClientRect(getDocumentRect(getDocumentElement(element)));
999
- } // A "clipping ancestor" is an overflowable container with the characteristic of
1000
- // clipping (or hiding) overflowing elements with a position different from
1001
- // `initial`
1002
-
1003
-
1004
- function getClippingAncestors(element) {
1005
- const clippingAncestors = getOverflowAncestors(element);
1006
- const canEscapeClipping = ['absolute', 'fixed'].includes(getComputedStyle(element).position);
1007
- const clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
1008
-
1009
- if (!isElement(clipperElement)) {
1010
- return [];
1011
- } // @ts-ignore isElement check ensures we return Array<Element>
1012
-
1013
-
1014
- return clippingAncestors.filter(clippingAncestors => isElement(clippingAncestors) && contains(clippingAncestors, clipperElement) && getNodeName(clippingAncestors) !== 'body');
1015
- } // Gets the maximum area that the element is visible in due to any number of
1016
- // clipping ancestors
1017
-
1018
-
1019
- function getClippingRect(_ref) {
1020
- let {
1021
- element,
1022
- boundary,
1023
- rootBoundary,
1024
- strategy
1025
- } = _ref;
1026
- const mainClippingAncestors = boundary === 'clippingAncestors' ? getClippingAncestors(element) : [].concat(boundary);
1027
- const clippingAncestors = [...mainClippingAncestors, rootBoundary];
1028
- const firstClippingAncestor = clippingAncestors[0];
1029
- const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
1030
- const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
1031
- accRect.top = max(rect.top, accRect.top);
1032
- accRect.right = min(rect.right, accRect.right);
1033
- accRect.bottom = min(rect.bottom, accRect.bottom);
1034
- accRect.left = max(rect.left, accRect.left);
1035
- return accRect;
1036
- }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
1037
- return {
1038
- width: clippingRect.right - clippingRect.left,
1039
- height: clippingRect.bottom - clippingRect.top,
1040
- x: clippingRect.left,
1041
- y: clippingRect.top
1042
- };
1043
- }
1044
-
1045
- const platform = {
1046
- getClippingRect,
1047
- convertOffsetParentRelativeRectToViewportRelativeRect,
1048
- isElement,
1049
- getDimensions,
1050
- getOffsetParent,
1051
- getDocumentElement,
1052
- getElementRects: _ref => {
1053
- let {
1054
- reference,
1055
- floating,
1056
- strategy
1057
- } = _ref;
1058
- return {
1059
- reference: getRectRelativeToOffsetParent(reference, getOffsetParent(floating), strategy),
1060
- floating: { ...getDimensions(floating),
1061
- x: 0,
1062
- y: 0
1063
- }
1064
- };
1065
- },
1066
- getClientRects: element => Array.from(element.getClientRects()),
1067
- isRTL: element => getComputedStyle(element).direction === 'rtl'
1068
- };
1069
-
1070
- /**
1071
- * Automatically updates the position of the floating element when necessary.
1072
- * @see https://floating-ui.com/docs/autoUpdate
1073
- */
1074
- function autoUpdate(reference, floating, update, options) {
1075
- if (options === void 0) {
1076
- options = {};
1077
- }
1078
-
1079
- const {
1080
- ancestorScroll: _ancestorScroll = true,
1081
- ancestorResize: _ancestorResize = true,
1082
- elementResize = true,
1083
- animationFrame = false
1084
- } = options;
1085
- const ancestorScroll = _ancestorScroll && !animationFrame;
1086
- const ancestorResize = _ancestorResize && !animationFrame;
1087
- const ancestors = ancestorScroll || ancestorResize ? [...(isElement(reference) ? getOverflowAncestors(reference) : []), ...getOverflowAncestors(floating)] : [];
1088
- ancestors.forEach(ancestor => {
1089
- ancestorScroll && ancestor.addEventListener('scroll', update, {
1090
- passive: true
1091
- });
1092
- ancestorResize && ancestor.addEventListener('resize', update);
1093
- });
1094
- let observer = null;
1095
-
1096
- if (elementResize) {
1097
- let initialUpdate = true;
1098
- observer = new ResizeObserver(() => {
1099
- if (!initialUpdate) {
1100
- update();
1101
- }
1102
-
1103
- initialUpdate = false;
1104
- });
1105
- isElement(reference) && !animationFrame && observer.observe(reference);
1106
- observer.observe(floating);
1107
- }
1108
-
1109
- let frameId;
1110
- let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
1111
-
1112
- if (animationFrame) {
1113
- frameLoop();
1114
- }
1115
-
1116
- function frameLoop() {
1117
- const nextRefRect = getBoundingClientRect(reference);
1118
-
1119
- if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
1120
- update();
1121
- }
1122
-
1123
- prevRefRect = nextRefRect;
1124
- frameId = requestAnimationFrame(frameLoop);
1125
- }
1126
-
1127
- update();
1128
- return () => {
1129
- var _observer;
1130
-
1131
- ancestors.forEach(ancestor => {
1132
- ancestorScroll && ancestor.removeEventListener('scroll', update);
1133
- ancestorResize && ancestor.removeEventListener('resize', update);
1134
- });
1135
- (_observer = observer) == null ? void 0 : _observer.disconnect();
1136
- observer = null;
1137
-
1138
- if (animationFrame) {
1139
- cancelAnimationFrame(frameId);
1140
- }
1141
- };
1142
- }
1143
-
1144
- /**
1145
- * Computes the `x` and `y` coordinates that will place the floating element
1146
- * next to a reference element when it is given a certain CSS positioning
1147
- * strategy.
1148
- */
1149
-
1150
- const computePosition = (reference, floating, options) => computePosition$1(reference, floating, {
1151
- platform,
1152
- ...options
1153
- });
1154
-
1155
6
  function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
1156
7
 
1157
8
  // Older browsers don't support event options, feature detect it.
@@ -1507,7 +358,7 @@ const FlipPopover$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
1507
358
  }
1508
359
  connectTrigger() {
1509
360
  var _a;
1510
- const triggerComponent = document.querySelector(`#${this.trigger}`);
361
+ const triggerComponent = querySelectorAllDeep(document.body, `#${this.trigger}`)[0];
1511
362
  this.triggerEl = ((triggerComponent === null || triggerComponent === void 0 ? void 0 : triggerComponent.children[0]) ||
1512
363
  ((_a = triggerComponent === null || triggerComponent === void 0 ? void 0 : triggerComponent.shadowRoot) === null || _a === void 0 ? void 0 : _a.children[0]) ||
1513
364
  triggerComponent);