@getflip/swirl-components 0.1.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 (832) hide show
  1. package/LICENSE.md +25 -0
  2. package/README.md +8 -0
  3. package/dist/cjs/flip-action-list-item.cjs.entry.js +24 -0
  4. package/dist/cjs/flip-action-list-section.cjs.entry.js +19 -0
  5. package/dist/cjs/flip-action-list.cjs.entry.js +52 -0
  6. package/dist/cjs/flip-avatar-group.cjs.entry.js +24 -0
  7. package/dist/cjs/flip-avatar.cjs.entry.js +78 -0
  8. package/dist/cjs/flip-badge.cjs.entry.js +26 -0
  9. package/dist/cjs/flip-banner.cjs.entry.js +47 -0
  10. package/dist/cjs/flip-button_2.cjs.entry.js +59 -0
  11. package/dist/cjs/flip-checkbox.cjs.entry.js +44 -0
  12. package/dist/cjs/flip-chip.cjs.entry.js +50 -0
  13. package/dist/cjs/flip-description-list-item.cjs.entry.js +19 -0
  14. package/dist/cjs/flip-description-list.cjs.entry.js +19 -0
  15. package/dist/cjs/flip-dialog.cjs.entry.js +476 -0
  16. package/dist/cjs/flip-icon-add-photo.cjs.entry.js +20 -0
  17. package/dist/cjs/flip-icon-add.cjs.entry.js +20 -0
  18. package/dist/cjs/flip-icon-admin-panel-settings.cjs.entry.js +20 -0
  19. package/dist/cjs/flip-icon-arrow-back.cjs.entry.js +20 -0
  20. package/dist/cjs/flip-icon-arrow-forward.cjs.entry.js +20 -0
  21. package/dist/cjs/flip-icon-arrow-right-small.cjs.entry.js +20 -0
  22. package/dist/cjs/flip-icon-attachment.cjs.entry.js +20 -0
  23. package/dist/cjs/flip-icon-cancel_2.cjs.entry.js +34 -0
  24. package/dist/cjs/flip-icon-chat-bubble.cjs.entry.js +20 -0
  25. package/dist/cjs/flip-icon-check-circle.cjs.entry.js +20 -0
  26. package/dist/cjs/flip-icon-check-small.cjs.entry.js +20 -0
  27. package/dist/cjs/flip-icon-check-strong.cjs.entry.js +20 -0
  28. package/dist/cjs/flip-icon-check.cjs.entry.js +20 -0
  29. package/dist/cjs/flip-icon-chevron-left.cjs.entry.js +20 -0
  30. package/dist/cjs/flip-icon-chevron-right.cjs.entry.js +20 -0
  31. package/dist/cjs/flip-icon-close-small.cjs.entry.js +20 -0
  32. package/dist/cjs/flip-icon-close.cjs.entry.js +20 -0
  33. package/dist/cjs/flip-icon-comment.cjs.entry.js +20 -0
  34. package/dist/cjs/flip-icon-copy.cjs.entry.js +20 -0
  35. package/dist/cjs/flip-icon-date-range.cjs.entry.js +20 -0
  36. package/dist/cjs/flip-icon-delete.cjs.entry.js +20 -0
  37. package/dist/cjs/flip-icon-description.cjs.entry.js +20 -0
  38. package/dist/cjs/flip-icon-download.cjs.entry.js +20 -0
  39. package/dist/cjs/flip-icon-edit.cjs.entry.js +20 -0
  40. package/dist/cjs/flip-icon-emoji-mood.cjs.entry.js +20 -0
  41. package/dist/cjs/flip-icon-emoji-satisfied.cjs.entry.js +20 -0
  42. package/dist/cjs/flip-icon-error.cjs.entry.js +20 -0
  43. package/dist/cjs/flip-icon-expand-less.cjs.entry.js +20 -0
  44. package/dist/cjs/flip-icon-expand-more.cjs.entry.js +20 -0
  45. package/dist/cjs/flip-icon-file.cjs.entry.js +20 -0
  46. package/dist/cjs/flip-icon-folder-shared.cjs.entry.js +20 -0
  47. package/dist/cjs/flip-icon-group-assign.cjs.entry.js +20 -0
  48. package/dist/cjs/flip-icon-groups-custom.cjs.entry.js +20 -0
  49. package/dist/cjs/flip-icon-groups.cjs.entry.js +20 -0
  50. package/dist/cjs/flip-icon-image.cjs.entry.js +20 -0
  51. package/dist/cjs/flip-icon-info.cjs.entry.js +20 -0
  52. package/dist/cjs/flip-icon-inventory.cjs.entry.js +20 -0
  53. package/dist/cjs/flip-icon-like.cjs.entry.js +20 -0
  54. package/dist/cjs/flip-icon-link.cjs.entry.js +20 -0
  55. package/dist/cjs/flip-icon-lock.cjs.entry.js +20 -0
  56. package/dist/cjs/flip-icon-logout.cjs.entry.js +20 -0
  57. package/dist/cjs/flip-icon-mail.cjs.entry.js +20 -0
  58. package/dist/cjs/flip-icon-manage-accounts.cjs.entry.js +20 -0
  59. package/dist/cjs/flip-icon-mention.cjs.entry.js +20 -0
  60. package/dist/cjs/flip-icon-message.cjs.entry.js +20 -0
  61. package/dist/cjs/flip-icon-more-horizontal.cjs.entry.js +20 -0
  62. package/dist/cjs/flip-icon-more-vertikal.cjs.entry.js +20 -0
  63. package/dist/cjs/flip-icon-notifications-active.cjs.entry.js +20 -0
  64. package/dist/cjs/flip-icon-notifications-off.cjs.entry.js +20 -0
  65. package/dist/cjs/flip-icon-notifications.cjs.entry.js +20 -0
  66. package/dist/cjs/flip-icon-people-alt.cjs.entry.js +20 -0
  67. package/dist/cjs/flip-icon-person-off.cjs.entry.js +20 -0
  68. package/dist/cjs/flip-icon-person.cjs.entry.js +20 -0
  69. package/dist/cjs/flip-icon-phone.cjs.entry.js +20 -0
  70. package/dist/cjs/flip-icon-poll.cjs.entry.js +20 -0
  71. package/dist/cjs/flip-icon-recieved.cjs.entry.js +20 -0
  72. package/dist/cjs/flip-icon-search-strong.cjs.entry.js +20 -0
  73. package/dist/cjs/flip-icon-send.cjs.entry.js +20 -0
  74. package/dist/cjs/flip-icon-settings.cjs.entry.js +20 -0
  75. package/dist/cjs/flip-icon-time-filled.cjs.entry.js +20 -0
  76. package/dist/cjs/flip-icon-time-outlined.cjs.entry.js +20 -0
  77. package/dist/cjs/flip-icon-today.cjs.entry.js +20 -0
  78. package/dist/cjs/flip-icon-user-assign.cjs.entry.js +20 -0
  79. package/dist/cjs/flip-icon-video-camera.cjs.entry.js +20 -0
  80. package/dist/cjs/flip-icon-visibility-off.cjs.entry.js +20 -0
  81. package/dist/cjs/flip-icon-visibility.cjs.entry.js +20 -0
  82. package/dist/cjs/flip-icon-warning.cjs.entry.js +20 -0
  83. package/dist/cjs/flip-inline-error.cjs.entry.js +23 -0
  84. package/dist/cjs/flip-link.cjs.entry.js +19 -0
  85. package/dist/cjs/flip-popover.cjs.entry.js +1558 -0
  86. package/dist/cjs/flip-radio-group.cjs.entry.js +51 -0
  87. package/dist/cjs/flip-radio.cjs.entry.js +37 -0
  88. package/dist/cjs/flip-search.cjs.entry.js +47 -0
  89. package/dist/cjs/flip-spinner.cjs.entry.js +22 -0
  90. package/dist/cjs/flip-stack.cjs.entry.js +28 -0
  91. package/dist/cjs/flip-switch.cjs.entry.js +92 -0
  92. package/dist/cjs/flip-tag.cjs.entry.js +28 -0
  93. package/dist/cjs/flip-theme-provider.cjs.entry.js +367 -0
  94. package/dist/cjs/flip-thumbnail.cjs.entry.js +23 -0
  95. package/dist/cjs/flip-toast-provider.cjs.entry.js +54 -0
  96. package/dist/cjs/flip-toast.cjs.entry.js +52 -0
  97. package/dist/cjs/flip-tooltip.cjs.entry.js +122 -0
  98. package/dist/cjs/flip-visually-hidden.cjs.entry.js +19 -0
  99. package/dist/cjs/index-37fbfe64.js +1803 -0
  100. package/dist/cjs/index-b9715722.js +72 -0
  101. package/dist/cjs/index.cjs.js +2 -0
  102. package/dist/cjs/loader.cjs.js +21 -0
  103. package/dist/cjs/swirl-components.cjs.js +19 -0
  104. package/dist/cjs/utils-a6e2e7da.js +28 -0
  105. package/dist/collection/collection-manifest.json +109 -0
  106. package/dist/collection/components/flip-action-list/flip-action-list.css +11 -0
  107. package/dist/collection/components/flip-action-list/flip-action-list.js +54 -0
  108. package/dist/collection/components/flip-action-list/flip-action-list.stories.js +22 -0
  109. package/dist/collection/components/flip-action-list-item/flip-action-list-item.css +97 -0
  110. package/dist/collection/components/flip-action-list-item/flip-action-list-item.js +158 -0
  111. package/dist/collection/components/flip-action-list-item/flip-action-list-item.stories.js +30 -0
  112. package/dist/collection/components/flip-action-list-section/flip-action-list-section.css +22 -0
  113. package/dist/collection/components/flip-action-list-section/flip-action-list-section.js +40 -0
  114. package/dist/collection/components/flip-action-list-section/flip-action-list-section.stories.js +27 -0
  115. package/dist/collection/components/flip-avatar/flip-avatar.css +210 -0
  116. package/dist/collection/components/flip-avatar/flip-avatar.js +278 -0
  117. package/dist/collection/components/flip-avatar/flip-avatar.stories.js +40 -0
  118. package/dist/collection/components/flip-avatar-group/flip-avatar-group.css +46 -0
  119. package/dist/collection/components/flip-avatar-group/flip-avatar-group.js +44 -0
  120. package/dist/collection/components/flip-avatar-group/flip-avatar-group.stories.js +33 -0
  121. package/dist/collection/components/flip-badge/flip-badge.css +121 -0
  122. package/dist/collection/components/flip-badge/flip-badge.js +128 -0
  123. package/dist/collection/components/flip-badge/flip-badge.stories.js +31 -0
  124. package/dist/collection/components/flip-banner/flip-banner.css +146 -0
  125. package/dist/collection/components/flip-banner/flip-banner.js +222 -0
  126. package/dist/collection/components/flip-banner/flip-banner.stories.js +22 -0
  127. package/dist/collection/components/flip-button/flip-button.css +287 -0
  128. package/dist/collection/components/flip-button/flip-button.js +301 -0
  129. package/dist/collection/components/flip-button/flip-button.stories.js +31 -0
  130. package/dist/collection/components/flip-button-group/flip-button-group.css +7 -0
  131. package/dist/collection/components/flip-button-group/flip-button-group.js +81 -0
  132. package/dist/collection/components/flip-button-group/flip-button-group.stories.js +21 -0
  133. package/dist/collection/components/flip-checkbox/flip-checkbox.css +133 -0
  134. package/dist/collection/components/flip-checkbox/flip-checkbox.js +211 -0
  135. package/dist/collection/components/flip-checkbox/flip-checkbox.stories.js +29 -0
  136. package/dist/collection/components/flip-chip/flip-chip.css +89 -0
  137. package/dist/collection/components/flip-chip/flip-chip.js +144 -0
  138. package/dist/collection/components/flip-chip/flip-chip.stories.js +37 -0
  139. package/dist/collection/components/flip-description-list/flip-description-list.css +24 -0
  140. package/dist/collection/components/flip-description-list/flip-description-list.js +19 -0
  141. package/dist/collection/components/flip-description-list/flip-description-list.stories.js +30 -0
  142. package/dist/collection/components/flip-description-list-item/flip-description-list-item.css +65 -0
  143. package/dist/collection/components/flip-description-list-item/flip-description-list-item.js +40 -0
  144. package/dist/collection/components/flip-description-list-item/flip-description-list-item.stories.js +20 -0
  145. package/dist/collection/components/flip-dialog/flip-dialog.css +158 -0
  146. package/dist/collection/components/flip-dialog/flip-dialog.js +248 -0
  147. package/dist/collection/components/flip-dialog/flip-dialog.stories.js +40 -0
  148. package/dist/collection/components/flip-icon/flip-icon.css +3 -0
  149. package/dist/collection/components/flip-icon/flip-icon.stories.js +42 -0
  150. package/dist/collection/components/flip-icon/flip-icon.types.js +1 -0
  151. package/dist/collection/components/flip-icon/icons/flip-icon-add-photo.js +49 -0
  152. package/dist/collection/components/flip-icon/icons/flip-icon-add.js +49 -0
  153. package/dist/collection/components/flip-icon/icons/flip-icon-admin-panel-settings.js +52 -0
  154. package/dist/collection/components/flip-icon/icons/flip-icon-arrow-back.js +49 -0
  155. package/dist/collection/components/flip-icon/icons/flip-icon-arrow-forward.js +49 -0
  156. package/dist/collection/components/flip-icon/icons/flip-icon-arrow-right-small.js +49 -0
  157. package/dist/collection/components/flip-icon/icons/flip-icon-attachment.js +49 -0
  158. package/dist/collection/components/flip-icon/icons/flip-icon-cancel.js +49 -0
  159. package/dist/collection/components/flip-icon/icons/flip-icon-chat-bubble.js +49 -0
  160. package/dist/collection/components/flip-icon/icons/flip-icon-check-circle.js +49 -0
  161. package/dist/collection/components/flip-icon/icons/flip-icon-check-small.js +49 -0
  162. package/dist/collection/components/flip-icon/icons/flip-icon-check-strong.js +49 -0
  163. package/dist/collection/components/flip-icon/icons/flip-icon-check.js +49 -0
  164. package/dist/collection/components/flip-icon/icons/flip-icon-chevron-left.js +49 -0
  165. package/dist/collection/components/flip-icon/icons/flip-icon-chevron-right.js +49 -0
  166. package/dist/collection/components/flip-icon/icons/flip-icon-close-small.js +49 -0
  167. package/dist/collection/components/flip-icon/icons/flip-icon-close.js +49 -0
  168. package/dist/collection/components/flip-icon/icons/flip-icon-comment.js +52 -0
  169. package/dist/collection/components/flip-icon/icons/flip-icon-copy.js +49 -0
  170. package/dist/collection/components/flip-icon/icons/flip-icon-date-range.js +49 -0
  171. package/dist/collection/components/flip-icon/icons/flip-icon-delete.js +52 -0
  172. package/dist/collection/components/flip-icon/icons/flip-icon-description.js +49 -0
  173. package/dist/collection/components/flip-icon/icons/flip-icon-download.js +49 -0
  174. package/dist/collection/components/flip-icon/icons/flip-icon-edit.js +49 -0
  175. package/dist/collection/components/flip-icon/icons/flip-icon-emoji-mood.js +49 -0
  176. package/dist/collection/components/flip-icon/icons/flip-icon-emoji-satisfied.js +49 -0
  177. package/dist/collection/components/flip-icon/icons/flip-icon-error.js +49 -0
  178. package/dist/collection/components/flip-icon/icons/flip-icon-expand-less.js +49 -0
  179. package/dist/collection/components/flip-icon/icons/flip-icon-expand-more.js +49 -0
  180. package/dist/collection/components/flip-icon/icons/flip-icon-file.js +49 -0
  181. package/dist/collection/components/flip-icon/icons/flip-icon-folder-shared.js +49 -0
  182. package/dist/collection/components/flip-icon/icons/flip-icon-group-assign.js +49 -0
  183. package/dist/collection/components/flip-icon/icons/flip-icon-groups-custom.js +64 -0
  184. package/dist/collection/components/flip-icon/icons/flip-icon-groups.js +49 -0
  185. package/dist/collection/components/flip-icon/icons/flip-icon-image.js +49 -0
  186. package/dist/collection/components/flip-icon/icons/flip-icon-info.js +49 -0
  187. package/dist/collection/components/flip-icon/icons/flip-icon-inventory.js +49 -0
  188. package/dist/collection/components/flip-icon/icons/flip-icon-like.js +52 -0
  189. package/dist/collection/components/flip-icon/icons/flip-icon-link.js +49 -0
  190. package/dist/collection/components/flip-icon/icons/flip-icon-lock.js +49 -0
  191. package/dist/collection/components/flip-icon/icons/flip-icon-logout.js +49 -0
  192. package/dist/collection/components/flip-icon/icons/flip-icon-mail.js +49 -0
  193. package/dist/collection/components/flip-icon/icons/flip-icon-manage-accounts.js +55 -0
  194. package/dist/collection/components/flip-icon/icons/flip-icon-mention.js +49 -0
  195. package/dist/collection/components/flip-icon/icons/flip-icon-message.js +49 -0
  196. package/dist/collection/components/flip-icon/icons/flip-icon-more-horizontal.js +49 -0
  197. package/dist/collection/components/flip-icon/icons/flip-icon-more-vertikal.js +49 -0
  198. package/dist/collection/components/flip-icon/icons/flip-icon-notifications-active.js +49 -0
  199. package/dist/collection/components/flip-icon/icons/flip-icon-notifications-off.js +49 -0
  200. package/dist/collection/components/flip-icon/icons/flip-icon-notifications.js +49 -0
  201. package/dist/collection/components/flip-icon/icons/flip-icon-people-alt.js +58 -0
  202. package/dist/collection/components/flip-icon/icons/flip-icon-person-off.js +49 -0
  203. package/dist/collection/components/flip-icon/icons/flip-icon-person.js +49 -0
  204. package/dist/collection/components/flip-icon/icons/flip-icon-phone.js +49 -0
  205. package/dist/collection/components/flip-icon/icons/flip-icon-poll.js +49 -0
  206. package/dist/collection/components/flip-icon/icons/flip-icon-recieved.js +52 -0
  207. package/dist/collection/components/flip-icon/icons/flip-icon-search-strong.js +49 -0
  208. package/dist/collection/components/flip-icon/icons/flip-icon-search.js +49 -0
  209. package/dist/collection/components/flip-icon/icons/flip-icon-send.js +49 -0
  210. package/dist/collection/components/flip-icon/icons/flip-icon-settings.js +49 -0
  211. package/dist/collection/components/flip-icon/icons/flip-icon-time-filled.js +49 -0
  212. package/dist/collection/components/flip-icon/icons/flip-icon-time-outlined.js +49 -0
  213. package/dist/collection/components/flip-icon/icons/flip-icon-today.js +49 -0
  214. package/dist/collection/components/flip-icon/icons/flip-icon-user-assign.js +49 -0
  215. package/dist/collection/components/flip-icon/icons/flip-icon-video-camera.js +49 -0
  216. package/dist/collection/components/flip-icon/icons/flip-icon-visibility-off.js +49 -0
  217. package/dist/collection/components/flip-icon/icons/flip-icon-visibility.js +49 -0
  218. package/dist/collection/components/flip-icon/icons/flip-icon-warning.js +49 -0
  219. package/dist/collection/components/flip-inline-error/flip-inline-error.css +35 -0
  220. package/dist/collection/components/flip-inline-error/flip-inline-error.js +65 -0
  221. package/dist/collection/components/flip-inline-error/flip-inline-error.stories.js +19 -0
  222. package/dist/collection/components/flip-link/flip-link.css +21 -0
  223. package/dist/collection/components/flip-link/flip-link.js +72 -0
  224. package/dist/collection/components/flip-link/flip-link.stories.js +20 -0
  225. package/dist/collection/components/flip-popover/flip-popover.css +267 -0
  226. package/dist/collection/components/flip-popover/flip-popover.js +229 -0
  227. package/dist/collection/components/flip-popover/flip-popover.stories.js +63 -0
  228. package/dist/collection/components/flip-radio/flip-radio.css +120 -0
  229. package/dist/collection/components/flip-radio/flip-radio.js +201 -0
  230. package/dist/collection/components/flip-radio/flip-radio.stories.js +24 -0
  231. package/dist/collection/components/flip-radio-group/flip-radio-group.css +13 -0
  232. package/dist/collection/components/flip-radio-group/flip-radio-group.js +82 -0
  233. package/dist/collection/components/flip-radio-group/flip-radio-group.stories.js +25 -0
  234. package/dist/collection/components/flip-search/flip-search.css +96 -0
  235. package/dist/collection/components/flip-search/flip-search.js +247 -0
  236. package/dist/collection/components/flip-search/flip-search.stories.js +19 -0
  237. package/dist/collection/components/flip-spinner/flip-spinner.css +90 -0
  238. package/dist/collection/components/flip-spinner/flip-spinner.js +66 -0
  239. package/dist/collection/components/flip-spinner/flip-spinner.stories.js +19 -0
  240. package/dist/collection/components/flip-stack/flip-stack.css +82 -0
  241. package/dist/collection/components/flip-stack/flip-stack.js +153 -0
  242. package/dist/collection/components/flip-stack/flip-stack.stories.js +26 -0
  243. package/dist/collection/components/flip-switch/flip-switch.css +100 -0
  244. package/dist/collection/components/flip-switch/flip-switch.js +245 -0
  245. package/dist/collection/components/flip-switch/flip-switch.stories.js +22 -0
  246. package/dist/collection/components/flip-tag/flip-tag.css +70 -0
  247. package/dist/collection/components/flip-tag/flip-tag.js +124 -0
  248. package/dist/collection/components/flip-tag/flip-tag.stories.js +20 -0
  249. package/dist/collection/components/flip-theme-provider/flip-theme-provider.css +3 -0
  250. package/dist/collection/components/flip-theme-provider/flip-theme-provider.js +253 -0
  251. package/dist/collection/components/flip-theme-provider/flip-theme-provider.stories.js +80 -0
  252. package/dist/collection/components/flip-thumbnail/flip-thumbnail.css +61 -0
  253. package/dist/collection/components/flip-thumbnail/flip-thumbnail.js +102 -0
  254. package/dist/collection/components/flip-thumbnail/flip-thumbnail.stories.js +20 -0
  255. package/dist/collection/components/flip-toast/flip-toast.css +64 -0
  256. package/dist/collection/components/flip-toast/flip-toast.js +198 -0
  257. package/dist/collection/components/flip-toast/flip-toast.stories.js +30 -0
  258. package/dist/collection/components/flip-toast-provider/flip-toast-provider.js +157 -0
  259. package/dist/collection/components/flip-toast-provider/flip-toast-provider.stories.js +58 -0
  260. package/dist/collection/components/flip-tooltip/flip-tooltip.css +42 -0
  261. package/dist/collection/components/flip-tooltip/flip-tooltip.js +212 -0
  262. package/dist/collection/components/flip-tooltip/flip-tooltip.stories.js +33 -0
  263. package/dist/collection/components/flip-visually-hidden/flip-visually-hidden.css +13 -0
  264. package/dist/collection/components/flip-visually-hidden/flip-visually-hidden.js +15 -0
  265. package/dist/collection/components/flip-visually-hidden/flip-visually-hidden.stories.js +17 -0
  266. package/dist/collection/index.js +1 -0
  267. package/dist/collection/utils.js +39 -0
  268. package/dist/components/flip-action-list-item.d.ts +11 -0
  269. package/dist/components/flip-action-list-item.js +47 -0
  270. package/dist/components/flip-action-list-section.d.ts +11 -0
  271. package/dist/components/flip-action-list-section.js +36 -0
  272. package/dist/components/flip-action-list.d.ts +11 -0
  273. package/dist/components/flip-action-list.js +67 -0
  274. package/dist/components/flip-avatar-group.d.ts +11 -0
  275. package/dist/components/flip-avatar-group.js +41 -0
  276. package/dist/components/flip-avatar.d.ts +11 -0
  277. package/dist/components/flip-avatar.js +111 -0
  278. package/dist/components/flip-badge.d.ts +11 -0
  279. package/dist/components/flip-badge.js +47 -0
  280. package/dist/components/flip-banner.d.ts +11 -0
  281. package/dist/components/flip-banner.js +76 -0
  282. package/dist/components/flip-button-group.d.ts +11 -0
  283. package/dist/components/flip-button-group.js +6 -0
  284. package/dist/components/flip-button-group2.js +46 -0
  285. package/dist/components/flip-button.d.ts +11 -0
  286. package/dist/components/flip-button.js +6 -0
  287. package/dist/components/flip-button2.js +67 -0
  288. package/dist/components/flip-checkbox.d.ts +11 -0
  289. package/dist/components/flip-checkbox.js +79 -0
  290. package/dist/components/flip-chip.d.ts +11 -0
  291. package/dist/components/flip-chip.js +71 -0
  292. package/dist/components/flip-description-list-item.d.ts +11 -0
  293. package/dist/components/flip-description-list-item.js +36 -0
  294. package/dist/components/flip-description-list.d.ts +11 -0
  295. package/dist/components/flip-description-list.js +34 -0
  296. package/dist/components/flip-dialog.d.ts +11 -0
  297. package/dist/components/flip-dialog.js +518 -0
  298. package/dist/components/flip-icon-add-photo.d.ts +11 -0
  299. package/dist/components/flip-icon-add-photo.js +37 -0
  300. package/dist/components/flip-icon-add.d.ts +11 -0
  301. package/dist/components/flip-icon-add.js +37 -0
  302. package/dist/components/flip-icon-admin-panel-settings.d.ts +11 -0
  303. package/dist/components/flip-icon-admin-panel-settings.js +37 -0
  304. package/dist/components/flip-icon-arrow-back.d.ts +11 -0
  305. package/dist/components/flip-icon-arrow-back.js +37 -0
  306. package/dist/components/flip-icon-arrow-forward.d.ts +11 -0
  307. package/dist/components/flip-icon-arrow-forward.js +37 -0
  308. package/dist/components/flip-icon-arrow-right-small.d.ts +11 -0
  309. package/dist/components/flip-icon-arrow-right-small.js +37 -0
  310. package/dist/components/flip-icon-attachment.d.ts +11 -0
  311. package/dist/components/flip-icon-attachment.js +37 -0
  312. package/dist/components/flip-icon-cancel.d.ts +11 -0
  313. package/dist/components/flip-icon-cancel.js +6 -0
  314. package/dist/components/flip-icon-cancel2.js +34 -0
  315. package/dist/components/flip-icon-chat-bubble.d.ts +11 -0
  316. package/dist/components/flip-icon-chat-bubble.js +37 -0
  317. package/dist/components/flip-icon-check-circle.d.ts +11 -0
  318. package/dist/components/flip-icon-check-circle.js +37 -0
  319. package/dist/components/flip-icon-check-small.d.ts +11 -0
  320. package/dist/components/flip-icon-check-small.js +37 -0
  321. package/dist/components/flip-icon-check-strong.d.ts +11 -0
  322. package/dist/components/flip-icon-check-strong.js +6 -0
  323. package/dist/components/flip-icon-check-strong2.js +34 -0
  324. package/dist/components/flip-icon-check.d.ts +11 -0
  325. package/dist/components/flip-icon-check.js +37 -0
  326. package/dist/components/flip-icon-chevron-left.d.ts +11 -0
  327. package/dist/components/flip-icon-chevron-left.js +37 -0
  328. package/dist/components/flip-icon-chevron-right.d.ts +11 -0
  329. package/dist/components/flip-icon-chevron-right.js +37 -0
  330. package/dist/components/flip-icon-close-small.d.ts +11 -0
  331. package/dist/components/flip-icon-close-small.js +37 -0
  332. package/dist/components/flip-icon-close.d.ts +11 -0
  333. package/dist/components/flip-icon-close.js +6 -0
  334. package/dist/components/flip-icon-close2.js +34 -0
  335. package/dist/components/flip-icon-comment.d.ts +11 -0
  336. package/dist/components/flip-icon-comment.js +37 -0
  337. package/dist/components/flip-icon-copy.d.ts +11 -0
  338. package/dist/components/flip-icon-copy.js +37 -0
  339. package/dist/components/flip-icon-date-range.d.ts +11 -0
  340. package/dist/components/flip-icon-date-range.js +37 -0
  341. package/dist/components/flip-icon-delete.d.ts +11 -0
  342. package/dist/components/flip-icon-delete.js +37 -0
  343. package/dist/components/flip-icon-description.d.ts +11 -0
  344. package/dist/components/flip-icon-description.js +37 -0
  345. package/dist/components/flip-icon-download.d.ts +11 -0
  346. package/dist/components/flip-icon-download.js +37 -0
  347. package/dist/components/flip-icon-edit.d.ts +11 -0
  348. package/dist/components/flip-icon-edit.js +37 -0
  349. package/dist/components/flip-icon-emoji-mood.d.ts +11 -0
  350. package/dist/components/flip-icon-emoji-mood.js +37 -0
  351. package/dist/components/flip-icon-emoji-satisfied.d.ts +11 -0
  352. package/dist/components/flip-icon-emoji-satisfied.js +37 -0
  353. package/dist/components/flip-icon-error.d.ts +11 -0
  354. package/dist/components/flip-icon-error.js +6 -0
  355. package/dist/components/flip-icon-error2.js +34 -0
  356. package/dist/components/flip-icon-expand-less.d.ts +11 -0
  357. package/dist/components/flip-icon-expand-less.js +37 -0
  358. package/dist/components/flip-icon-expand-more.d.ts +11 -0
  359. package/dist/components/flip-icon-expand-more.js +37 -0
  360. package/dist/components/flip-icon-file.d.ts +11 -0
  361. package/dist/components/flip-icon-file.js +37 -0
  362. package/dist/components/flip-icon-folder-shared.d.ts +11 -0
  363. package/dist/components/flip-icon-folder-shared.js +37 -0
  364. package/dist/components/flip-icon-group-assign.d.ts +11 -0
  365. package/dist/components/flip-icon-group-assign.js +37 -0
  366. package/dist/components/flip-icon-groups-custom.d.ts +11 -0
  367. package/dist/components/flip-icon-groups-custom.js +37 -0
  368. package/dist/components/flip-icon-groups.d.ts +11 -0
  369. package/dist/components/flip-icon-groups.js +37 -0
  370. package/dist/components/flip-icon-image.d.ts +11 -0
  371. package/dist/components/flip-icon-image.js +37 -0
  372. package/dist/components/flip-icon-info.d.ts +11 -0
  373. package/dist/components/flip-icon-info.js +37 -0
  374. package/dist/components/flip-icon-inventory.d.ts +11 -0
  375. package/dist/components/flip-icon-inventory.js +37 -0
  376. package/dist/components/flip-icon-like.d.ts +11 -0
  377. package/dist/components/flip-icon-like.js +37 -0
  378. package/dist/components/flip-icon-link.d.ts +11 -0
  379. package/dist/components/flip-icon-link.js +37 -0
  380. package/dist/components/flip-icon-lock.d.ts +11 -0
  381. package/dist/components/flip-icon-lock.js +37 -0
  382. package/dist/components/flip-icon-logout.d.ts +11 -0
  383. package/dist/components/flip-icon-logout.js +37 -0
  384. package/dist/components/flip-icon-mail.d.ts +11 -0
  385. package/dist/components/flip-icon-mail.js +37 -0
  386. package/dist/components/flip-icon-manage-accounts.d.ts +11 -0
  387. package/dist/components/flip-icon-manage-accounts.js +37 -0
  388. package/dist/components/flip-icon-mention.d.ts +11 -0
  389. package/dist/components/flip-icon-mention.js +37 -0
  390. package/dist/components/flip-icon-message.d.ts +11 -0
  391. package/dist/components/flip-icon-message.js +37 -0
  392. package/dist/components/flip-icon-more-horizontal.d.ts +11 -0
  393. package/dist/components/flip-icon-more-horizontal.js +37 -0
  394. package/dist/components/flip-icon-more-vertikal.d.ts +11 -0
  395. package/dist/components/flip-icon-more-vertikal.js +37 -0
  396. package/dist/components/flip-icon-notifications-active.d.ts +11 -0
  397. package/dist/components/flip-icon-notifications-active.js +37 -0
  398. package/dist/components/flip-icon-notifications-off.d.ts +11 -0
  399. package/dist/components/flip-icon-notifications-off.js +37 -0
  400. package/dist/components/flip-icon-notifications.d.ts +11 -0
  401. package/dist/components/flip-icon-notifications.js +37 -0
  402. package/dist/components/flip-icon-people-alt.d.ts +11 -0
  403. package/dist/components/flip-icon-people-alt.js +37 -0
  404. package/dist/components/flip-icon-person-off.d.ts +11 -0
  405. package/dist/components/flip-icon-person-off.js +37 -0
  406. package/dist/components/flip-icon-person.d.ts +11 -0
  407. package/dist/components/flip-icon-person.js +6 -0
  408. package/dist/components/flip-icon-person2.js +34 -0
  409. package/dist/components/flip-icon-phone.d.ts +11 -0
  410. package/dist/components/flip-icon-phone.js +37 -0
  411. package/dist/components/flip-icon-poll.d.ts +11 -0
  412. package/dist/components/flip-icon-poll.js +37 -0
  413. package/dist/components/flip-icon-recieved.d.ts +11 -0
  414. package/dist/components/flip-icon-recieved.js +37 -0
  415. package/dist/components/flip-icon-search-strong.d.ts +11 -0
  416. package/dist/components/flip-icon-search-strong.js +37 -0
  417. package/dist/components/flip-icon-search.d.ts +11 -0
  418. package/dist/components/flip-icon-search.js +6 -0
  419. package/dist/components/flip-icon-search2.js +34 -0
  420. package/dist/components/flip-icon-send.d.ts +11 -0
  421. package/dist/components/flip-icon-send.js +37 -0
  422. package/dist/components/flip-icon-settings.d.ts +11 -0
  423. package/dist/components/flip-icon-settings.js +37 -0
  424. package/dist/components/flip-icon-time-filled.d.ts +11 -0
  425. package/dist/components/flip-icon-time-filled.js +37 -0
  426. package/dist/components/flip-icon-time-outlined.d.ts +11 -0
  427. package/dist/components/flip-icon-time-outlined.js +37 -0
  428. package/dist/components/flip-icon-today.d.ts +11 -0
  429. package/dist/components/flip-icon-today.js +37 -0
  430. package/dist/components/flip-icon-user-assign.d.ts +11 -0
  431. package/dist/components/flip-icon-user-assign.js +37 -0
  432. package/dist/components/flip-icon-video-camera.d.ts +11 -0
  433. package/dist/components/flip-icon-video-camera.js +37 -0
  434. package/dist/components/flip-icon-visibility-off.d.ts +11 -0
  435. package/dist/components/flip-icon-visibility-off.js +37 -0
  436. package/dist/components/flip-icon-visibility.d.ts +11 -0
  437. package/dist/components/flip-icon-visibility.js +37 -0
  438. package/dist/components/flip-icon-warning.d.ts +11 -0
  439. package/dist/components/flip-icon-warning.js +37 -0
  440. package/dist/components/flip-inline-error.d.ts +11 -0
  441. package/dist/components/flip-inline-error.js +47 -0
  442. package/dist/components/flip-link.d.ts +11 -0
  443. package/dist/components/flip-link.js +38 -0
  444. package/dist/components/flip-popover.d.ts +11 -0
  445. package/dist/components/flip-popover.js +1580 -0
  446. package/dist/components/flip-radio-group.d.ts +11 -0
  447. package/dist/components/flip-radio-group.js +67 -0
  448. package/dist/components/flip-radio.d.ts +11 -0
  449. package/dist/components/flip-radio.js +66 -0
  450. package/dist/components/flip-search.d.ts +11 -0
  451. package/dist/components/flip-search.js +82 -0
  452. package/dist/components/flip-spinner.d.ts +11 -0
  453. package/dist/components/flip-spinner.js +46 -0
  454. package/dist/components/flip-stack.d.ts +11 -0
  455. package/dist/components/flip-stack.js +6 -0
  456. package/dist/components/flip-stack2.js +47 -0
  457. package/dist/components/flip-switch.d.ts +11 -0
  458. package/dist/components/flip-switch.js +120 -0
  459. package/dist/components/flip-tag.d.ts +11 -0
  460. package/dist/components/flip-tag.js +54 -0
  461. package/dist/components/flip-theme-provider.d.ts +11 -0
  462. package/dist/components/flip-theme-provider.js +387 -0
  463. package/dist/components/flip-thumbnail.d.ts +11 -0
  464. package/dist/components/flip-thumbnail.js +43 -0
  465. package/dist/components/flip-toast-provider.d.ts +11 -0
  466. package/dist/components/flip-toast-provider.js +93 -0
  467. package/dist/components/flip-toast.d.ts +11 -0
  468. package/dist/components/flip-toast.js +6 -0
  469. package/dist/components/flip-toast2.js +78 -0
  470. package/dist/components/flip-tooltip.d.ts +11 -0
  471. package/dist/components/flip-tooltip.js +143 -0
  472. package/dist/components/flip-visually-hidden.d.ts +11 -0
  473. package/dist/components/flip-visually-hidden.js +6 -0
  474. package/dist/components/flip-visually-hidden2.js +31 -0
  475. package/dist/components/index.d.ts +119 -0
  476. package/dist/components/index.js +99 -0
  477. package/dist/components/index2.js +70 -0
  478. package/dist/components/utils.js +26 -0
  479. package/dist/esm/flip-action-list-item.entry.js +20 -0
  480. package/dist/esm/flip-action-list-section.entry.js +15 -0
  481. package/dist/esm/flip-action-list.entry.js +48 -0
  482. package/dist/esm/flip-avatar-group.entry.js +20 -0
  483. package/dist/esm/flip-avatar.entry.js +74 -0
  484. package/dist/esm/flip-badge.entry.js +22 -0
  485. package/dist/esm/flip-banner.entry.js +43 -0
  486. package/dist/esm/flip-button_2.entry.js +54 -0
  487. package/dist/esm/flip-checkbox.entry.js +40 -0
  488. package/dist/esm/flip-chip.entry.js +46 -0
  489. package/dist/esm/flip-description-list-item.entry.js +15 -0
  490. package/dist/esm/flip-description-list.entry.js +15 -0
  491. package/dist/esm/flip-dialog.entry.js +472 -0
  492. package/dist/esm/flip-icon-add-photo.entry.js +16 -0
  493. package/dist/esm/flip-icon-add.entry.js +16 -0
  494. package/dist/esm/flip-icon-admin-panel-settings.entry.js +16 -0
  495. package/dist/esm/flip-icon-arrow-back.entry.js +16 -0
  496. package/dist/esm/flip-icon-arrow-forward.entry.js +16 -0
  497. package/dist/esm/flip-icon-arrow-right-small.entry.js +16 -0
  498. package/dist/esm/flip-icon-attachment.entry.js +16 -0
  499. package/dist/esm/flip-icon-cancel_2.entry.js +29 -0
  500. package/dist/esm/flip-icon-chat-bubble.entry.js +16 -0
  501. package/dist/esm/flip-icon-check-circle.entry.js +16 -0
  502. package/dist/esm/flip-icon-check-small.entry.js +16 -0
  503. package/dist/esm/flip-icon-check-strong.entry.js +16 -0
  504. package/dist/esm/flip-icon-check.entry.js +16 -0
  505. package/dist/esm/flip-icon-chevron-left.entry.js +16 -0
  506. package/dist/esm/flip-icon-chevron-right.entry.js +16 -0
  507. package/dist/esm/flip-icon-close-small.entry.js +16 -0
  508. package/dist/esm/flip-icon-close.entry.js +16 -0
  509. package/dist/esm/flip-icon-comment.entry.js +16 -0
  510. package/dist/esm/flip-icon-copy.entry.js +16 -0
  511. package/dist/esm/flip-icon-date-range.entry.js +16 -0
  512. package/dist/esm/flip-icon-delete.entry.js +16 -0
  513. package/dist/esm/flip-icon-description.entry.js +16 -0
  514. package/dist/esm/flip-icon-download.entry.js +16 -0
  515. package/dist/esm/flip-icon-edit.entry.js +16 -0
  516. package/dist/esm/flip-icon-emoji-mood.entry.js +16 -0
  517. package/dist/esm/flip-icon-emoji-satisfied.entry.js +16 -0
  518. package/dist/esm/flip-icon-error.entry.js +16 -0
  519. package/dist/esm/flip-icon-expand-less.entry.js +16 -0
  520. package/dist/esm/flip-icon-expand-more.entry.js +16 -0
  521. package/dist/esm/flip-icon-file.entry.js +16 -0
  522. package/dist/esm/flip-icon-folder-shared.entry.js +16 -0
  523. package/dist/esm/flip-icon-group-assign.entry.js +16 -0
  524. package/dist/esm/flip-icon-groups-custom.entry.js +16 -0
  525. package/dist/esm/flip-icon-groups.entry.js +16 -0
  526. package/dist/esm/flip-icon-image.entry.js +16 -0
  527. package/dist/esm/flip-icon-info.entry.js +16 -0
  528. package/dist/esm/flip-icon-inventory.entry.js +16 -0
  529. package/dist/esm/flip-icon-like.entry.js +16 -0
  530. package/dist/esm/flip-icon-link.entry.js +16 -0
  531. package/dist/esm/flip-icon-lock.entry.js +16 -0
  532. package/dist/esm/flip-icon-logout.entry.js +16 -0
  533. package/dist/esm/flip-icon-mail.entry.js +16 -0
  534. package/dist/esm/flip-icon-manage-accounts.entry.js +16 -0
  535. package/dist/esm/flip-icon-mention.entry.js +16 -0
  536. package/dist/esm/flip-icon-message.entry.js +16 -0
  537. package/dist/esm/flip-icon-more-horizontal.entry.js +16 -0
  538. package/dist/esm/flip-icon-more-vertikal.entry.js +16 -0
  539. package/dist/esm/flip-icon-notifications-active.entry.js +16 -0
  540. package/dist/esm/flip-icon-notifications-off.entry.js +16 -0
  541. package/dist/esm/flip-icon-notifications.entry.js +16 -0
  542. package/dist/esm/flip-icon-people-alt.entry.js +16 -0
  543. package/dist/esm/flip-icon-person-off.entry.js +16 -0
  544. package/dist/esm/flip-icon-person.entry.js +16 -0
  545. package/dist/esm/flip-icon-phone.entry.js +16 -0
  546. package/dist/esm/flip-icon-poll.entry.js +16 -0
  547. package/dist/esm/flip-icon-recieved.entry.js +16 -0
  548. package/dist/esm/flip-icon-search-strong.entry.js +16 -0
  549. package/dist/esm/flip-icon-send.entry.js +16 -0
  550. package/dist/esm/flip-icon-settings.entry.js +16 -0
  551. package/dist/esm/flip-icon-time-filled.entry.js +16 -0
  552. package/dist/esm/flip-icon-time-outlined.entry.js +16 -0
  553. package/dist/esm/flip-icon-today.entry.js +16 -0
  554. package/dist/esm/flip-icon-user-assign.entry.js +16 -0
  555. package/dist/esm/flip-icon-video-camera.entry.js +16 -0
  556. package/dist/esm/flip-icon-visibility-off.entry.js +16 -0
  557. package/dist/esm/flip-icon-visibility.entry.js +16 -0
  558. package/dist/esm/flip-icon-warning.entry.js +16 -0
  559. package/dist/esm/flip-inline-error.entry.js +19 -0
  560. package/dist/esm/flip-link.entry.js +15 -0
  561. package/dist/esm/flip-popover.entry.js +1554 -0
  562. package/dist/esm/flip-radio-group.entry.js +47 -0
  563. package/dist/esm/flip-radio.entry.js +33 -0
  564. package/dist/esm/flip-search.entry.js +43 -0
  565. package/dist/esm/flip-spinner.entry.js +18 -0
  566. package/dist/esm/flip-stack.entry.js +24 -0
  567. package/dist/esm/flip-switch.entry.js +88 -0
  568. package/dist/esm/flip-tag.entry.js +24 -0
  569. package/dist/esm/flip-theme-provider.entry.js +363 -0
  570. package/dist/esm/flip-thumbnail.entry.js +19 -0
  571. package/dist/esm/flip-toast-provider.entry.js +50 -0
  572. package/dist/esm/flip-toast.entry.js +48 -0
  573. package/dist/esm/flip-tooltip.entry.js +118 -0
  574. package/dist/esm/flip-visually-hidden.entry.js +15 -0
  575. package/dist/esm/index-36517fab.js +1774 -0
  576. package/dist/esm/index-3c78bcaf.js +70 -0
  577. package/dist/esm/index.js +1 -0
  578. package/dist/esm/loader.js +17 -0
  579. package/dist/esm/polyfills/core-js.js +11 -0
  580. package/dist/esm/polyfills/css-shim.js +1 -0
  581. package/dist/esm/polyfills/dom.js +79 -0
  582. package/dist/esm/polyfills/es5-html-element.js +1 -0
  583. package/dist/esm/polyfills/index.js +34 -0
  584. package/dist/esm/polyfills/system.js +6 -0
  585. package/dist/esm/swirl-components.js +17 -0
  586. package/dist/esm/utils-03e3261c.js +26 -0
  587. package/dist/index.cjs.js +1 -0
  588. package/dist/index.js +1 -0
  589. package/dist/swirl-components/index.esm.js +0 -0
  590. package/dist/swirl-components/p-01857435.entry.js +1 -0
  591. package/dist/swirl-components/p-0a9f3ada.entry.js +1 -0
  592. package/dist/swirl-components/p-0d619d62.entry.js +1 -0
  593. package/dist/swirl-components/p-0de885c6.entry.js +1 -0
  594. package/dist/swirl-components/p-0fa4c4cf.entry.js +1 -0
  595. package/dist/swirl-components/p-0fa6b98f.entry.js +1 -0
  596. package/dist/swirl-components/p-102db76d.entry.js +1 -0
  597. package/dist/swirl-components/p-1126e372.entry.js +1 -0
  598. package/dist/swirl-components/p-126ead5f.entry.js +1 -0
  599. package/dist/swirl-components/p-1419666f.entry.js +1 -0
  600. package/dist/swirl-components/p-1429e47a.entry.js +1 -0
  601. package/dist/swirl-components/p-1609dbf3.entry.js +1 -0
  602. package/dist/swirl-components/p-17073db0.entry.js +1 -0
  603. package/dist/swirl-components/p-1853aaf0.entry.js +1 -0
  604. package/dist/swirl-components/p-18965b40.entry.js +1 -0
  605. package/dist/swirl-components/p-18a51976.entry.js +1 -0
  606. package/dist/swirl-components/p-1a9f0bc1.entry.js +1 -0
  607. package/dist/swirl-components/p-1bd3e7c0.entry.js +1 -0
  608. package/dist/swirl-components/p-1c2e8e09.entry.js +1 -0
  609. package/dist/swirl-components/p-1c8b77fe.entry.js +1 -0
  610. package/dist/swirl-components/p-213191cb.entry.js +1 -0
  611. package/dist/swirl-components/p-24d112d7.entry.js +1 -0
  612. package/dist/swirl-components/p-30011711.entry.js +1 -0
  613. package/dist/swirl-components/p-30048d87.js +1 -0
  614. package/dist/swirl-components/p-3234f836.entry.js +1 -0
  615. package/dist/swirl-components/p-32a5e2a7.entry.js +1 -0
  616. package/dist/swirl-components/p-37cfdd8f.js +7 -0
  617. package/dist/swirl-components/p-37d96123.entry.js +1 -0
  618. package/dist/swirl-components/p-3d59d365.entry.js +1 -0
  619. package/dist/swirl-components/p-432dd5f1.entry.js +1 -0
  620. package/dist/swirl-components/p-437842a2.entry.js +1 -0
  621. package/dist/swirl-components/p-453db2cf.entry.js +1 -0
  622. package/dist/swirl-components/p-468d0e9b.entry.js +1 -0
  623. package/dist/swirl-components/p-46f638cf.entry.js +1 -0
  624. package/dist/swirl-components/p-47a9a9cb.entry.js +1 -0
  625. package/dist/swirl-components/p-4f3d8490.entry.js +1 -0
  626. package/dist/swirl-components/p-545caf4a.entry.js +1 -0
  627. package/dist/swirl-components/p-54b9e1b5.entry.js +1 -0
  628. package/dist/swirl-components/p-55aaf1d3.entry.js +1 -0
  629. package/dist/swirl-components/p-56bdede5.entry.js +1 -0
  630. package/dist/swirl-components/p-5a13d6fe.entry.js +1 -0
  631. package/dist/swirl-components/p-5d27a69e.entry.js +1 -0
  632. package/dist/swirl-components/p-63e5b5d9.entry.js +1 -0
  633. package/dist/swirl-components/p-67aaf094.entry.js +1 -0
  634. package/dist/swirl-components/p-67deba9e.entry.js +1 -0
  635. package/dist/swirl-components/p-6a6de48d.entry.js +1 -0
  636. package/dist/swirl-components/p-6a9a0e08.entry.js +1 -0
  637. package/dist/swirl-components/p-6b840e3d.entry.js +1 -0
  638. package/dist/swirl-components/p-6b957569.entry.js +1 -0
  639. package/dist/swirl-components/p-70b255b3.entry.js +1 -0
  640. package/dist/swirl-components/p-7a6b480c.entry.js +1 -0
  641. package/dist/swirl-components/p-828cc4a3.entry.js +1 -0
  642. package/dist/swirl-components/p-8423a1b5.entry.js +1 -0
  643. package/dist/swirl-components/p-8bf1ad8a.entry.js +1 -0
  644. package/dist/swirl-components/p-94d933b3.entry.js +1 -0
  645. package/dist/swirl-components/p-95bd2274.entry.js +1 -0
  646. package/dist/swirl-components/p-9b4a9856.entry.js +1 -0
  647. package/dist/swirl-components/p-9c12d1eb.entry.js +1 -0
  648. package/dist/swirl-components/p-9d07fb5a.entry.js +1 -0
  649. package/dist/swirl-components/p-a1946e3b.entry.js +1 -0
  650. package/dist/swirl-components/p-a203be4a.entry.js +1 -0
  651. package/dist/swirl-components/p-a605b3d1.entry.js +1 -0
  652. package/dist/swirl-components/p-a6fb93df.entry.js +1 -0
  653. package/dist/swirl-components/p-a71261bc.entry.js +1 -0
  654. package/dist/swirl-components/p-aada2b77.entry.js +1 -0
  655. package/dist/swirl-components/p-ad434623.entry.js +1 -0
  656. package/dist/swirl-components/p-adbcf0ae.entry.js +1 -0
  657. package/dist/swirl-components/p-ae504b3e.entry.js +1 -0
  658. package/dist/swirl-components/p-b16d4978.entry.js +1 -0
  659. package/dist/swirl-components/p-b4540264.entry.js +1 -0
  660. package/dist/swirl-components/p-b5cd4041.entry.js +1 -0
  661. package/dist/swirl-components/p-b624ff23.entry.js +1 -0
  662. package/dist/swirl-components/p-b64b6dc5.entry.js +1 -0
  663. package/dist/swirl-components/p-c35a6610.entry.js +1 -0
  664. package/dist/swirl-components/p-c5200740.entry.js +1 -0
  665. package/dist/swirl-components/p-cac72e30.entry.js +1 -0
  666. package/dist/swirl-components/p-cc50d7a7.entry.js +1 -0
  667. package/dist/swirl-components/p-cf8be27a.entry.js +1 -0
  668. package/dist/swirl-components/p-cfef8bdb.entry.js +1 -0
  669. package/dist/swirl-components/p-d1c899ad.entry.js +1 -0
  670. package/dist/swirl-components/p-d3999b94.entry.js +2 -0
  671. package/dist/swirl-components/p-d41e3a37.entry.js +1 -0
  672. package/dist/swirl-components/p-db229451.entry.js +1 -0
  673. package/dist/swirl-components/p-db902aec.entry.js +1 -0
  674. package/dist/swirl-components/p-e0513b73.entry.js +1 -0
  675. package/dist/swirl-components/p-e12fbb2d.js +2 -0
  676. package/dist/swirl-components/p-e1554c48.entry.js +1 -0
  677. package/dist/swirl-components/p-e384bd2c.entry.js +1 -0
  678. package/dist/swirl-components/p-e4df2658.entry.js +1 -0
  679. package/dist/swirl-components/p-e65d2d81.entry.js +1 -0
  680. package/dist/swirl-components/p-e89c7891.entry.js +1 -0
  681. package/dist/swirl-components/p-f1774da0.entry.js +1 -0
  682. package/dist/swirl-components/p-f45709c0.entry.js +1 -0
  683. package/dist/swirl-components/p-f59098f7.entry.js +1 -0
  684. package/dist/swirl-components/p-f6e77552.entry.js +1 -0
  685. package/dist/swirl-components/p-f8273972.entry.js +1 -0
  686. package/dist/swirl-components/p-fa7cc450.entry.js +1 -0
  687. package/dist/swirl-components/p-fb19d8b9.entry.js +1 -0
  688. package/dist/swirl-components/p-ff0868ae.entry.js +1 -0
  689. package/dist/swirl-components/swirl-components.css +2 -0
  690. package/dist/swirl-components/swirl-components.esm.js +1 -0
  691. package/dist/types/components/flip-action-list/flip-action-list.d.ts +13 -0
  692. package/dist/types/components/flip-action-list/flip-action-list.stories.d.ts +13 -0
  693. package/dist/types/components/flip-action-list-item/flip-action-list-item.d.ts +12 -0
  694. package/dist/types/components/flip-action-list-item/flip-action-list-item.stories.d.ts +14 -0
  695. package/dist/types/components/flip-action-list-section/flip-action-list-section.d.ts +7 -0
  696. package/dist/types/components/flip-action-list-section/flip-action-list-section.stories.d.ts +13 -0
  697. package/dist/types/components/flip-avatar/flip-avatar.d.ts +23 -0
  698. package/dist/types/components/flip-avatar/flip-avatar.stories.d.ts +32 -0
  699. package/dist/types/components/flip-avatar-group/flip-avatar-group.d.ts +7 -0
  700. package/dist/types/components/flip-avatar-group/flip-avatar-group.stories.d.ts +23 -0
  701. package/dist/types/components/flip-badge/flip-badge.d.ts +11 -0
  702. package/dist/types/components/flip-badge/flip-badge.stories.d.ts +23 -0
  703. package/dist/types/components/flip-banner/flip-banner.d.ts +18 -0
  704. package/dist/types/components/flip-banner/flip-banner.stories.d.ts +13 -0
  705. package/dist/types/components/flip-button/flip-button.d.ts +24 -0
  706. package/dist/types/components/flip-button/flip-button.stories.d.ts +23 -0
  707. package/dist/types/components/flip-button-group/flip-button-group.d.ts +8 -0
  708. package/dist/types/components/flip-button-group/flip-button-group.stories.d.ts +13 -0
  709. package/dist/types/components/flip-checkbox/flip-checkbox.d.ts +15 -0
  710. package/dist/types/components/flip-checkbox/flip-checkbox.stories.d.ts +19 -0
  711. package/dist/types/components/flip-chip/flip-chip.d.ts +14 -0
  712. package/dist/types/components/flip-chip/flip-chip.stories.d.ts +31 -0
  713. package/dist/types/components/flip-description-list/flip-description-list.d.ts +6 -0
  714. package/dist/types/components/flip-description-list/flip-description-list.stories.d.ts +13 -0
  715. package/dist/types/components/flip-description-list-item/flip-description-list-item.d.ts +7 -0
  716. package/dist/types/components/flip-description-list-item/flip-description-list-item.stories.d.ts +13 -0
  717. package/dist/types/components/flip-dialog/flip-dialog.d.ts +33 -0
  718. package/dist/types/components/flip-dialog/flip-dialog.stories.d.ts +16 -0
  719. package/dist/types/components/flip-icon/flip-icon.stories.d.ts +16 -0
  720. package/dist/types/components/flip-icon/flip-icon.types.d.ts +1 -0
  721. package/dist/types/components/flip-icon/icons/flip-icon-add-photo.d.ts +5 -0
  722. package/dist/types/components/flip-icon/icons/flip-icon-add.d.ts +5 -0
  723. package/dist/types/components/flip-icon/icons/flip-icon-admin-panel-settings.d.ts +5 -0
  724. package/dist/types/components/flip-icon/icons/flip-icon-arrow-back.d.ts +5 -0
  725. package/dist/types/components/flip-icon/icons/flip-icon-arrow-forward.d.ts +5 -0
  726. package/dist/types/components/flip-icon/icons/flip-icon-arrow-right-small.d.ts +5 -0
  727. package/dist/types/components/flip-icon/icons/flip-icon-attachment.d.ts +5 -0
  728. package/dist/types/components/flip-icon/icons/flip-icon-cancel.d.ts +5 -0
  729. package/dist/types/components/flip-icon/icons/flip-icon-chat-bubble.d.ts +5 -0
  730. package/dist/types/components/flip-icon/icons/flip-icon-check-circle.d.ts +5 -0
  731. package/dist/types/components/flip-icon/icons/flip-icon-check-small.d.ts +5 -0
  732. package/dist/types/components/flip-icon/icons/flip-icon-check-strong.d.ts +5 -0
  733. package/dist/types/components/flip-icon/icons/flip-icon-check.d.ts +5 -0
  734. package/dist/types/components/flip-icon/icons/flip-icon-chevron-left.d.ts +5 -0
  735. package/dist/types/components/flip-icon/icons/flip-icon-chevron-right.d.ts +5 -0
  736. package/dist/types/components/flip-icon/icons/flip-icon-close-small.d.ts +5 -0
  737. package/dist/types/components/flip-icon/icons/flip-icon-close.d.ts +5 -0
  738. package/dist/types/components/flip-icon/icons/flip-icon-comment.d.ts +5 -0
  739. package/dist/types/components/flip-icon/icons/flip-icon-copy.d.ts +5 -0
  740. package/dist/types/components/flip-icon/icons/flip-icon-date-range.d.ts +5 -0
  741. package/dist/types/components/flip-icon/icons/flip-icon-delete.d.ts +5 -0
  742. package/dist/types/components/flip-icon/icons/flip-icon-description.d.ts +5 -0
  743. package/dist/types/components/flip-icon/icons/flip-icon-download.d.ts +5 -0
  744. package/dist/types/components/flip-icon/icons/flip-icon-edit.d.ts +5 -0
  745. package/dist/types/components/flip-icon/icons/flip-icon-emoji-mood.d.ts +5 -0
  746. package/dist/types/components/flip-icon/icons/flip-icon-emoji-satisfied.d.ts +5 -0
  747. package/dist/types/components/flip-icon/icons/flip-icon-error.d.ts +5 -0
  748. package/dist/types/components/flip-icon/icons/flip-icon-expand-less.d.ts +5 -0
  749. package/dist/types/components/flip-icon/icons/flip-icon-expand-more.d.ts +5 -0
  750. package/dist/types/components/flip-icon/icons/flip-icon-file.d.ts +5 -0
  751. package/dist/types/components/flip-icon/icons/flip-icon-folder-shared.d.ts +5 -0
  752. package/dist/types/components/flip-icon/icons/flip-icon-group-assign.d.ts +5 -0
  753. package/dist/types/components/flip-icon/icons/flip-icon-groups-custom.d.ts +5 -0
  754. package/dist/types/components/flip-icon/icons/flip-icon-groups.d.ts +5 -0
  755. package/dist/types/components/flip-icon/icons/flip-icon-image.d.ts +5 -0
  756. package/dist/types/components/flip-icon/icons/flip-icon-info.d.ts +5 -0
  757. package/dist/types/components/flip-icon/icons/flip-icon-inventory.d.ts +5 -0
  758. package/dist/types/components/flip-icon/icons/flip-icon-like.d.ts +5 -0
  759. package/dist/types/components/flip-icon/icons/flip-icon-link.d.ts +5 -0
  760. package/dist/types/components/flip-icon/icons/flip-icon-lock.d.ts +5 -0
  761. package/dist/types/components/flip-icon/icons/flip-icon-logout.d.ts +5 -0
  762. package/dist/types/components/flip-icon/icons/flip-icon-mail.d.ts +5 -0
  763. package/dist/types/components/flip-icon/icons/flip-icon-manage-accounts.d.ts +5 -0
  764. package/dist/types/components/flip-icon/icons/flip-icon-mention.d.ts +5 -0
  765. package/dist/types/components/flip-icon/icons/flip-icon-message.d.ts +5 -0
  766. package/dist/types/components/flip-icon/icons/flip-icon-more-horizontal.d.ts +5 -0
  767. package/dist/types/components/flip-icon/icons/flip-icon-more-vertikal.d.ts +5 -0
  768. package/dist/types/components/flip-icon/icons/flip-icon-notifications-active.d.ts +5 -0
  769. package/dist/types/components/flip-icon/icons/flip-icon-notifications-off.d.ts +5 -0
  770. package/dist/types/components/flip-icon/icons/flip-icon-notifications.d.ts +5 -0
  771. package/dist/types/components/flip-icon/icons/flip-icon-people-alt.d.ts +5 -0
  772. package/dist/types/components/flip-icon/icons/flip-icon-person-off.d.ts +5 -0
  773. package/dist/types/components/flip-icon/icons/flip-icon-person.d.ts +5 -0
  774. package/dist/types/components/flip-icon/icons/flip-icon-phone.d.ts +5 -0
  775. package/dist/types/components/flip-icon/icons/flip-icon-poll.d.ts +5 -0
  776. package/dist/types/components/flip-icon/icons/flip-icon-recieved.d.ts +5 -0
  777. package/dist/types/components/flip-icon/icons/flip-icon-search-strong.d.ts +5 -0
  778. package/dist/types/components/flip-icon/icons/flip-icon-search.d.ts +5 -0
  779. package/dist/types/components/flip-icon/icons/flip-icon-send.d.ts +5 -0
  780. package/dist/types/components/flip-icon/icons/flip-icon-settings.d.ts +5 -0
  781. package/dist/types/components/flip-icon/icons/flip-icon-time-filled.d.ts +5 -0
  782. package/dist/types/components/flip-icon/icons/flip-icon-time-outlined.d.ts +5 -0
  783. package/dist/types/components/flip-icon/icons/flip-icon-today.d.ts +5 -0
  784. package/dist/types/components/flip-icon/icons/flip-icon-user-assign.d.ts +5 -0
  785. package/dist/types/components/flip-icon/icons/flip-icon-video-camera.d.ts +5 -0
  786. package/dist/types/components/flip-icon/icons/flip-icon-visibility-off.d.ts +5 -0
  787. package/dist/types/components/flip-icon/icons/flip-icon-visibility.d.ts +5 -0
  788. package/dist/types/components/flip-icon/icons/flip-icon-warning.d.ts +5 -0
  789. package/dist/types/components/flip-inline-error/flip-inline-error.d.ts +6 -0
  790. package/dist/types/components/flip-inline-error/flip-inline-error.stories.d.ts +13 -0
  791. package/dist/types/components/flip-link/flip-link.d.ts +7 -0
  792. package/dist/types/components/flip-link/flip-link.stories.d.ts +13 -0
  793. package/dist/types/components/flip-popover/flip-popover.d.ts +33 -0
  794. package/dist/types/components/flip-popover/flip-popover.stories.d.ts +21 -0
  795. package/dist/types/components/flip-radio/flip-radio.d.ts +15 -0
  796. package/dist/types/components/flip-radio/flip-radio.stories.d.ts +13 -0
  797. package/dist/types/components/flip-radio-group/flip-radio-group.d.ts +11 -0
  798. package/dist/types/components/flip-radio-group/flip-radio-group.stories.d.ts +13 -0
  799. package/dist/types/components/flip-search/flip-search.d.ts +21 -0
  800. package/dist/types/components/flip-search/flip-search.stories.d.ts +13 -0
  801. package/dist/types/components/flip-spinner/flip-spinner.d.ts +6 -0
  802. package/dist/types/components/flip-spinner/flip-spinner.stories.d.ts +13 -0
  803. package/dist/types/components/flip-stack/flip-stack.d.ts +13 -0
  804. package/dist/types/components/flip-stack/flip-stack.stories.d.ts +13 -0
  805. package/dist/types/components/flip-switch/flip-switch.d.ts +23 -0
  806. package/dist/types/components/flip-switch/flip-switch.stories.d.ts +13 -0
  807. package/dist/types/components/flip-tag/flip-tag.d.ts +11 -0
  808. package/dist/types/components/flip-tag/flip-tag.stories.d.ts +13 -0
  809. package/dist/types/components/flip-theme-provider/flip-theme-provider.d.ts +51 -0
  810. package/dist/types/components/flip-theme-provider/flip-theme-provider.stories.d.ts +17 -0
  811. package/dist/types/components/flip-thumbnail/flip-thumbnail.d.ts +9 -0
  812. package/dist/types/components/flip-thumbnail/flip-thumbnail.stories.d.ts +13 -0
  813. package/dist/types/components/flip-toast/flip-toast.d.ts +19 -0
  814. package/dist/types/components/flip-toast/flip-toast.stories.d.ts +23 -0
  815. package/dist/types/components/flip-toast-provider/flip-toast-provider.d.ts +43 -0
  816. package/dist/types/components/flip-toast-provider/flip-toast-provider.stories.d.ts +16 -0
  817. package/dist/types/components/flip-tooltip/flip-tooltip.d.ts +28 -0
  818. package/dist/types/components/flip-tooltip/flip-tooltip.stories.d.ts +14 -0
  819. package/dist/types/components/flip-visually-hidden/flip-visually-hidden.d.ts +3 -0
  820. package/dist/types/components/flip-visually-hidden/flip-visually-hidden.stories.d.ts +13 -0
  821. package/dist/types/components.d.ts +1809 -0
  822. package/dist/types/index.d.ts +1 -0
  823. package/dist/types/stencil-public-runtime.d.ts +1565 -0
  824. package/dist/types/utils.d.ts +4 -0
  825. package/loader/cdn.js +3 -0
  826. package/loader/index.cjs.js +3 -0
  827. package/loader/index.d.ts +12 -0
  828. package/loader/index.es2017.js +3 -0
  829. package/loader/index.js +4 -0
  830. package/loader/package.json +10 -0
  831. package/package.json +82 -0
  832. package/vscode-data.json +2041 -0
@@ -0,0 +1,1558 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-37fbfe64.js');
6
+ const index$1 = require('./index-b9715722.js');
7
+ const utils = require('./utils-a6e2e7da.js');
8
+
9
+ function getSide(placement) {
10
+ return placement.split('-')[0];
11
+ }
12
+
13
+ function getAlignment(placement) {
14
+ return placement.split('-')[1];
15
+ }
16
+
17
+ function getMainAxisFromPlacement(placement) {
18
+ return ['top', 'bottom'].includes(getSide(placement)) ? 'x' : 'y';
19
+ }
20
+
21
+ function getLengthFromAxis(axis) {
22
+ return axis === 'y' ? 'height' : 'width';
23
+ }
24
+
25
+ function computeCoordsFromPlacement(_ref, placement, rtl) {
26
+ let {
27
+ reference,
28
+ floating
29
+ } = _ref;
30
+ const commonX = reference.x + reference.width / 2 - floating.width / 2;
31
+ const commonY = reference.y + reference.height / 2 - floating.height / 2;
32
+ const mainAxis = getMainAxisFromPlacement(placement);
33
+ const length = getLengthFromAxis(mainAxis);
34
+ const commonAlign = reference[length] / 2 - floating[length] / 2;
35
+ const side = getSide(placement);
36
+ const isVertical = mainAxis === 'x';
37
+ let coords;
38
+
39
+ switch (side) {
40
+ case 'top':
41
+ coords = {
42
+ x: commonX,
43
+ y: reference.y - floating.height
44
+ };
45
+ break;
46
+
47
+ case 'bottom':
48
+ coords = {
49
+ x: commonX,
50
+ y: reference.y + reference.height
51
+ };
52
+ break;
53
+
54
+ case 'right':
55
+ coords = {
56
+ x: reference.x + reference.width,
57
+ y: commonY
58
+ };
59
+ break;
60
+
61
+ case 'left':
62
+ coords = {
63
+ x: reference.x - floating.width,
64
+ y: commonY
65
+ };
66
+ break;
67
+
68
+ default:
69
+ coords = {
70
+ x: reference.x,
71
+ y: reference.y
72
+ };
73
+ }
74
+
75
+ switch (getAlignment(placement)) {
76
+ case 'start':
77
+ coords[mainAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
78
+ break;
79
+
80
+ case 'end':
81
+ coords[mainAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
82
+ break;
83
+ }
84
+
85
+ return coords;
86
+ }
87
+
88
+ /**
89
+ * Computes the `x` and `y` coordinates that will place the floating element
90
+ * next to a reference element when it is given a certain positioning strategy.
91
+ *
92
+ * This export does not have any `platform` interface logic. You will need to
93
+ * write one for the platform you are using Floating UI with.
94
+ */
95
+
96
+ const computePosition$1 = async (reference, floating, config) => {
97
+ const {
98
+ placement = 'bottom',
99
+ strategy = 'absolute',
100
+ middleware = [],
101
+ platform
102
+ } = config;
103
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
104
+
105
+ let rects = await platform.getElementRects({
106
+ reference,
107
+ floating,
108
+ strategy
109
+ });
110
+ let {
111
+ x,
112
+ y
113
+ } = computeCoordsFromPlacement(rects, placement, rtl);
114
+ let statefulPlacement = placement;
115
+ let middlewareData = {};
116
+ let resetCount = 0;
117
+
118
+ for (let i = 0; i < middleware.length; i++) {
119
+ const {
120
+ name,
121
+ fn
122
+ } = middleware[i];
123
+ const {
124
+ x: nextX,
125
+ y: nextY,
126
+ data,
127
+ reset
128
+ } = await fn({
129
+ x,
130
+ y,
131
+ initialPlacement: placement,
132
+ placement: statefulPlacement,
133
+ strategy,
134
+ middlewareData,
135
+ rects,
136
+ platform,
137
+ elements: {
138
+ reference,
139
+ floating
140
+ }
141
+ });
142
+ x = nextX != null ? nextX : x;
143
+ y = nextY != null ? nextY : y;
144
+ middlewareData = { ...middlewareData,
145
+ [name]: { ...middlewareData[name],
146
+ ...data
147
+ }
148
+ };
149
+
150
+ if (reset && resetCount <= 50) {
151
+ resetCount++;
152
+
153
+ if (typeof reset === 'object') {
154
+ if (reset.placement) {
155
+ statefulPlacement = reset.placement;
156
+ }
157
+
158
+ if (reset.rects) {
159
+ rects = reset.rects === true ? await platform.getElementRects({
160
+ reference,
161
+ floating,
162
+ strategy
163
+ }) : reset.rects;
164
+ }
165
+
166
+ ({
167
+ x,
168
+ y
169
+ } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
170
+ }
171
+
172
+ i = -1;
173
+ continue;
174
+ }
175
+ }
176
+
177
+ return {
178
+ x,
179
+ y,
180
+ placement: statefulPlacement,
181
+ strategy,
182
+ middlewareData
183
+ };
184
+ };
185
+
186
+ function expandPaddingObject(padding) {
187
+ return {
188
+ top: 0,
189
+ right: 0,
190
+ bottom: 0,
191
+ left: 0,
192
+ ...padding
193
+ };
194
+ }
195
+
196
+ function getSideObjectFromPadding(padding) {
197
+ return typeof padding !== 'number' ? expandPaddingObject(padding) : {
198
+ top: padding,
199
+ right: padding,
200
+ bottom: padding,
201
+ left: padding
202
+ };
203
+ }
204
+
205
+ function rectToClientRect(rect) {
206
+ return { ...rect,
207
+ top: rect.y,
208
+ left: rect.x,
209
+ right: rect.x + rect.width,
210
+ bottom: rect.y + rect.height
211
+ };
212
+ }
213
+
214
+ /**
215
+ * Resolves with an object of overflow side offsets that determine how much the
216
+ * element is overflowing a given clipping boundary.
217
+ * - positive = overflowing the boundary by that number of pixels
218
+ * - negative = how many pixels left before it will overflow
219
+ * - 0 = lies flush with the boundary
220
+ * @see https://floating-ui.com/docs/detectOverflow
221
+ */
222
+ async function detectOverflow(middlewareArguments, options) {
223
+ var _await$platform$isEle;
224
+
225
+ if (options === void 0) {
226
+ options = {};
227
+ }
228
+
229
+ const {
230
+ x,
231
+ y,
232
+ platform,
233
+ rects,
234
+ elements,
235
+ strategy
236
+ } = middlewareArguments;
237
+ const {
238
+ boundary = 'clippingAncestors',
239
+ rootBoundary = 'viewport',
240
+ elementContext = 'floating',
241
+ altBoundary = false,
242
+ padding = 0
243
+ } = options;
244
+ const paddingObject = getSideObjectFromPadding(padding);
245
+ const altContext = elementContext === 'floating' ? 'reference' : 'floating';
246
+ const element = elements[altBoundary ? altContext : elementContext];
247
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
248
+ 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))),
249
+ boundary,
250
+ rootBoundary,
251
+ strategy
252
+ }));
253
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
254
+ rect: elementContext === 'floating' ? { ...rects.floating,
255
+ x,
256
+ y
257
+ } : rects.reference,
258
+ offsetParent: await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating)),
259
+ strategy
260
+ }) : rects[elementContext]);
261
+ return {
262
+ top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
263
+ bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
264
+ left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
265
+ right: elementClientRect.right - clippingClientRect.right + paddingObject.right
266
+ };
267
+ }
268
+
269
+ const min$1 = Math.min;
270
+ const max$1 = Math.max;
271
+
272
+ function within(min$1$1, value, max$1$1) {
273
+ return max$1(min$1$1, min$1(value, max$1$1));
274
+ }
275
+
276
+ const hash$1 = {
277
+ left: 'right',
278
+ right: 'left',
279
+ bottom: 'top',
280
+ top: 'bottom'
281
+ };
282
+ function getOppositePlacement(placement) {
283
+ return placement.replace(/left|right|bottom|top/g, matched => hash$1[matched]);
284
+ }
285
+
286
+ function getAlignmentSides(placement, rects, rtl) {
287
+ if (rtl === void 0) {
288
+ rtl = false;
289
+ }
290
+
291
+ const alignment = getAlignment(placement);
292
+ const mainAxis = getMainAxisFromPlacement(placement);
293
+ const length = getLengthFromAxis(mainAxis);
294
+ let mainAlignmentSide = mainAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
295
+
296
+ if (rects.reference[length] > rects.floating[length]) {
297
+ mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
298
+ }
299
+
300
+ return {
301
+ main: mainAlignmentSide,
302
+ cross: getOppositePlacement(mainAlignmentSide)
303
+ };
304
+ }
305
+
306
+ const hash = {
307
+ start: 'end',
308
+ end: 'start'
309
+ };
310
+ function getOppositeAlignmentPlacement(placement) {
311
+ return placement.replace(/start|end/g, matched => hash[matched]);
312
+ }
313
+
314
+ function getExpandedPlacements(placement) {
315
+ const oppositePlacement = getOppositePlacement(placement);
316
+ return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
317
+ }
318
+
319
+ /**
320
+ * Changes the placement of the floating element to one that will fit if the
321
+ * initially specified `placement` does not.
322
+ * @see https://floating-ui.com/docs/flip
323
+ */
324
+ const flip = function (options) {
325
+ if (options === void 0) {
326
+ options = {};
327
+ }
328
+
329
+ return {
330
+ name: 'flip',
331
+ options,
332
+
333
+ async fn(middlewareArguments) {
334
+ var _middlewareData$flip;
335
+
336
+ const {
337
+ placement,
338
+ middlewareData,
339
+ rects,
340
+ initialPlacement,
341
+ platform,
342
+ elements
343
+ } = middlewareArguments;
344
+ const {
345
+ mainAxis: checkMainAxis = true,
346
+ crossAxis: checkCrossAxis = true,
347
+ fallbackPlacements: specifiedFallbackPlacements,
348
+ fallbackStrategy = 'bestFit',
349
+ flipAlignment = true,
350
+ ...detectOverflowOptions
351
+ } = options;
352
+ const side = getSide(placement);
353
+ const isBasePlacement = side === initialPlacement;
354
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
355
+ const placements = [initialPlacement, ...fallbackPlacements];
356
+ const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);
357
+ const overflows = [];
358
+ let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
359
+
360
+ if (checkMainAxis) {
361
+ overflows.push(overflow[side]);
362
+ }
363
+
364
+ if (checkCrossAxis) {
365
+ const {
366
+ main,
367
+ cross
368
+ } = getAlignmentSides(placement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
369
+ overflows.push(overflow[main], overflow[cross]);
370
+ }
371
+
372
+ overflowsData = [...overflowsData, {
373
+ placement,
374
+ overflows
375
+ }]; // One or more sides is overflowing
376
+
377
+ if (!overflows.every(side => side <= 0)) {
378
+ var _middlewareData$flip$, _middlewareData$flip2;
379
+
380
+ const nextIndex = ((_middlewareData$flip$ = (_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) != null ? _middlewareData$flip$ : 0) + 1;
381
+ const nextPlacement = placements[nextIndex];
382
+
383
+ if (nextPlacement) {
384
+ // Try next placement and re-run the lifecycle
385
+ return {
386
+ data: {
387
+ index: nextIndex,
388
+ overflows: overflowsData
389
+ },
390
+ reset: {
391
+ placement: nextPlacement
392
+ }
393
+ };
394
+ }
395
+
396
+ let resetPlacement = 'bottom';
397
+
398
+ switch (fallbackStrategy) {
399
+ case 'bestFit':
400
+ {
401
+ var _overflowsData$map$so;
402
+
403
+ 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;
404
+
405
+ if (placement) {
406
+ resetPlacement = placement;
407
+ }
408
+
409
+ break;
410
+ }
411
+
412
+ case 'initialPlacement':
413
+ resetPlacement = initialPlacement;
414
+ break;
415
+ }
416
+
417
+ if (placement !== resetPlacement) {
418
+ return {
419
+ reset: {
420
+ placement: resetPlacement
421
+ }
422
+ };
423
+ }
424
+ }
425
+
426
+ return {};
427
+ }
428
+
429
+ };
430
+ };
431
+
432
+ function getCrossAxis(axis) {
433
+ return axis === 'x' ? 'y' : 'x';
434
+ }
435
+
436
+ /**
437
+ * Shifts the floating element in order to keep it in view when it will overflow
438
+ * a clipping boundary.
439
+ * @see https://floating-ui.com/docs/shift
440
+ */
441
+ const shift = function (options) {
442
+ if (options === void 0) {
443
+ options = {};
444
+ }
445
+
446
+ return {
447
+ name: 'shift',
448
+ options,
449
+
450
+ async fn(middlewareArguments) {
451
+ const {
452
+ x,
453
+ y,
454
+ placement
455
+ } = middlewareArguments;
456
+ const {
457
+ mainAxis: checkMainAxis = true,
458
+ crossAxis: checkCrossAxis = false,
459
+ limiter = {
460
+ fn: _ref => {
461
+ let {
462
+ x,
463
+ y
464
+ } = _ref;
465
+ return {
466
+ x,
467
+ y
468
+ };
469
+ }
470
+ },
471
+ ...detectOverflowOptions
472
+ } = options;
473
+ const coords = {
474
+ x,
475
+ y
476
+ };
477
+ const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);
478
+ const mainAxis = getMainAxisFromPlacement(getSide(placement));
479
+ const crossAxis = getCrossAxis(mainAxis);
480
+ let mainAxisCoord = coords[mainAxis];
481
+ let crossAxisCoord = coords[crossAxis];
482
+
483
+ if (checkMainAxis) {
484
+ const minSide = mainAxis === 'y' ? 'top' : 'left';
485
+ const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
486
+ const min = mainAxisCoord + overflow[minSide];
487
+ const max = mainAxisCoord - overflow[maxSide];
488
+ mainAxisCoord = within(min, mainAxisCoord, max);
489
+ }
490
+
491
+ if (checkCrossAxis) {
492
+ const minSide = crossAxis === 'y' ? 'top' : 'left';
493
+ const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
494
+ const min = crossAxisCoord + overflow[minSide];
495
+ const max = crossAxisCoord - overflow[maxSide];
496
+ crossAxisCoord = within(min, crossAxisCoord, max);
497
+ }
498
+
499
+ const limitedCoords = limiter.fn({ ...middlewareArguments,
500
+ [mainAxis]: mainAxisCoord,
501
+ [crossAxis]: crossAxisCoord
502
+ });
503
+ return { ...limitedCoords,
504
+ data: {
505
+ x: limitedCoords.x - x,
506
+ y: limitedCoords.y - y
507
+ }
508
+ };
509
+ }
510
+
511
+ };
512
+ };
513
+
514
+ function isWindow(value) {
515
+ return value && value.document && value.location && value.alert && value.setInterval;
516
+ }
517
+ function getWindow(node) {
518
+ if (node == null) {
519
+ return window;
520
+ }
521
+
522
+ if (!isWindow(node)) {
523
+ const ownerDocument = node.ownerDocument;
524
+ return ownerDocument ? ownerDocument.defaultView || window : window;
525
+ }
526
+
527
+ return node;
528
+ }
529
+
530
+ function getComputedStyle(element) {
531
+ return getWindow(element).getComputedStyle(element);
532
+ }
533
+
534
+ function getNodeName(node) {
535
+ return isWindow(node) ? '' : node ? (node.nodeName || '').toLowerCase() : '';
536
+ }
537
+
538
+ function getUAString() {
539
+ const uaData = navigator.userAgentData;
540
+
541
+ if (uaData != null && uaData.brands) {
542
+ return uaData.brands.map(item => item.brand + "/" + item.version).join(' ');
543
+ }
544
+
545
+ return navigator.userAgent;
546
+ }
547
+
548
+ function isHTMLElement(value) {
549
+ return value instanceof getWindow(value).HTMLElement;
550
+ }
551
+ function isElement(value) {
552
+ return value instanceof getWindow(value).Element;
553
+ }
554
+ function isNode(value) {
555
+ return value instanceof getWindow(value).Node;
556
+ }
557
+ function isShadowRoot(node) {
558
+ // Browsers without `ShadowRoot` support
559
+ if (typeof ShadowRoot === 'undefined') {
560
+ return false;
561
+ }
562
+
563
+ const OwnElement = getWindow(node).ShadowRoot;
564
+ return node instanceof OwnElement || node instanceof ShadowRoot;
565
+ }
566
+ function isOverflowElement(element) {
567
+ // Firefox wants us to check `-x` and `-y` variations as well
568
+ const {
569
+ overflow,
570
+ overflowX,
571
+ overflowY
572
+ } = getComputedStyle(element);
573
+ return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
574
+ }
575
+ function isTableElement(element) {
576
+ return ['table', 'td', 'th'].includes(getNodeName(element));
577
+ }
578
+ function isContainingBlock(element) {
579
+ // TODO: Try and use feature detection here instead
580
+ const isFirefox = /firefox/i.test(getUAString());
581
+ const css = getComputedStyle(element); // This is non-exhaustive but covers the most common CSS properties that
582
+ // create a containing block.
583
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
584
+
585
+ return css.transform !== 'none' || css.perspective !== 'none' || // @ts-ignore (TS 4.1 compat)
586
+ css.contain === 'paint' || ['transform', 'perspective'].includes(css.willChange) || isFirefox && css.willChange === 'filter' || isFirefox && (css.filter ? css.filter !== 'none' : false);
587
+ }
588
+ function isLayoutViewport() {
589
+ // Not Safari
590
+ return !/^((?!chrome|android).)*safari/i.test(getUAString()); // Feature detection for this fails in various ways
591
+ // • Always-visible scrollbar or not
592
+ // • Width of <html>, etc.
593
+ // const vV = win.visualViewport;
594
+ // return vV ? Math.abs(win.innerWidth / vV.scale - vV.width) < 0.5 : true;
595
+ }
596
+
597
+ const min = Math.min;
598
+ const max = Math.max;
599
+ const round = Math.round;
600
+
601
+ function getBoundingClientRect(element, includeScale, isFixedStrategy) {
602
+ var _win$visualViewport$o, _win$visualViewport, _win$visualViewport$o2, _win$visualViewport2;
603
+
604
+ if (includeScale === void 0) {
605
+ includeScale = false;
606
+ }
607
+
608
+ if (isFixedStrategy === void 0) {
609
+ isFixedStrategy = false;
610
+ }
611
+
612
+ const clientRect = element.getBoundingClientRect();
613
+ let scaleX = 1;
614
+ let scaleY = 1;
615
+
616
+ if (includeScale && isHTMLElement(element)) {
617
+ scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
618
+ scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
619
+ }
620
+
621
+ const win = isElement(element) ? getWindow(element) : window;
622
+ const addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
623
+ 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;
624
+ 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;
625
+ const width = clientRect.width / scaleX;
626
+ const height = clientRect.height / scaleY;
627
+ return {
628
+ width,
629
+ height,
630
+ top: y,
631
+ right: x + width,
632
+ bottom: y + height,
633
+ left: x,
634
+ x,
635
+ y
636
+ };
637
+ }
638
+
639
+ function getDocumentElement(node) {
640
+ return ((isNode(node) ? node.ownerDocument : node.document) || window.document).documentElement;
641
+ }
642
+
643
+ function getNodeScroll(element) {
644
+ if (isElement(element)) {
645
+ return {
646
+ scrollLeft: element.scrollLeft,
647
+ scrollTop: element.scrollTop
648
+ };
649
+ }
650
+
651
+ return {
652
+ scrollLeft: element.pageXOffset,
653
+ scrollTop: element.pageYOffset
654
+ };
655
+ }
656
+
657
+ function getWindowScrollBarX(element) {
658
+ // If <html> has a CSS width greater than the viewport, then this will be
659
+ // incorrect for RTL.
660
+ return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
661
+ }
662
+
663
+ function isScaled(element) {
664
+ const rect = getBoundingClientRect(element);
665
+ return round(rect.width) !== element.offsetWidth || round(rect.height) !== element.offsetHeight;
666
+ }
667
+
668
+ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
669
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
670
+ const documentElement = getDocumentElement(offsetParent);
671
+ const rect = getBoundingClientRect(element, // @ts-ignore - checked above (TS 4.1 compat)
672
+ isOffsetParentAnElement && isScaled(offsetParent), strategy === 'fixed');
673
+ let scroll = {
674
+ scrollLeft: 0,
675
+ scrollTop: 0
676
+ };
677
+ const offsets = {
678
+ x: 0,
679
+ y: 0
680
+ };
681
+
682
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
683
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
684
+ scroll = getNodeScroll(offsetParent);
685
+ }
686
+
687
+ if (isHTMLElement(offsetParent)) {
688
+ const offsetRect = getBoundingClientRect(offsetParent, true);
689
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
690
+ offsets.y = offsetRect.y + offsetParent.clientTop;
691
+ } else if (documentElement) {
692
+ offsets.x = getWindowScrollBarX(documentElement);
693
+ }
694
+ }
695
+
696
+ return {
697
+ x: rect.left + scroll.scrollLeft - offsets.x,
698
+ y: rect.top + scroll.scrollTop - offsets.y,
699
+ width: rect.width,
700
+ height: rect.height
701
+ };
702
+ }
703
+
704
+ function getParentNode(node) {
705
+ if (getNodeName(node) === 'html') {
706
+ return node;
707
+ }
708
+
709
+ return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle
710
+ // @ts-ignore
711
+ node.assignedSlot || // step into the shadow DOM of the parent of a slotted node
712
+ node.parentNode || ( // DOM Element detected
713
+ isShadowRoot(node) ? node.host : null) || // ShadowRoot detected
714
+ getDocumentElement(node) // fallback
715
+
716
+ );
717
+ }
718
+
719
+ function getTrueOffsetParent(element) {
720
+ if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {
721
+ return null;
722
+ }
723
+
724
+ return composedOffsetParent(element);
725
+ }
726
+ /**
727
+ * Polyfills the old offsetParent behavior from before the spec was changed:
728
+ * https://github.com/w3c/csswg-drafts/issues/159
729
+ */
730
+
731
+
732
+ function composedOffsetParent(element) {
733
+ let {
734
+ offsetParent
735
+ } = element;
736
+ let ancestor = element;
737
+ let foundInsideSlot = false;
738
+
739
+ while (ancestor && ancestor !== offsetParent) {
740
+ const {
741
+ assignedSlot
742
+ } = ancestor;
743
+
744
+ if (assignedSlot) {
745
+ let newOffsetParent = assignedSlot.offsetParent;
746
+
747
+ if (getComputedStyle(assignedSlot).display === 'contents') {
748
+ const hadStyleAttribute = assignedSlot.hasAttribute('style');
749
+ const oldDisplay = assignedSlot.style.display;
750
+ assignedSlot.style.display = getComputedStyle(ancestor).display;
751
+ newOffsetParent = assignedSlot.offsetParent;
752
+ assignedSlot.style.display = oldDisplay;
753
+
754
+ if (!hadStyleAttribute) {
755
+ assignedSlot.removeAttribute('style');
756
+ }
757
+ }
758
+
759
+ ancestor = assignedSlot;
760
+
761
+ if (offsetParent !== newOffsetParent) {
762
+ offsetParent = newOffsetParent;
763
+ foundInsideSlot = true;
764
+ }
765
+ } else if (isShadowRoot(ancestor) && ancestor.host && foundInsideSlot) {
766
+ break;
767
+ }
768
+
769
+ ancestor = isShadowRoot(ancestor) && ancestor.host || ancestor.parentNode;
770
+ }
771
+
772
+ return offsetParent;
773
+ }
774
+
775
+ function getContainingBlock(element) {
776
+ let currentNode = getParentNode(element);
777
+
778
+ if (isShadowRoot(currentNode)) {
779
+ currentNode = currentNode.host;
780
+ }
781
+
782
+ while (isHTMLElement(currentNode) && !['html', 'body'].includes(getNodeName(currentNode))) {
783
+ if (isContainingBlock(currentNode)) {
784
+ return currentNode;
785
+ } else {
786
+ const parent = currentNode.parentNode;
787
+ currentNode = isShadowRoot(parent) ? parent.host : parent;
788
+ }
789
+ }
790
+
791
+ return null;
792
+ } // Gets the closest ancestor positioned element. Handles some edge cases,
793
+ // such as table ancestors and cross browser bugs.
794
+
795
+
796
+ function getOffsetParent(element) {
797
+ const window = getWindow(element);
798
+ let offsetParent = getTrueOffsetParent(element);
799
+
800
+ while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {
801
+ offsetParent = getTrueOffsetParent(offsetParent);
802
+ }
803
+
804
+ if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
805
+ return window;
806
+ }
807
+
808
+ return offsetParent || getContainingBlock(element) || window;
809
+ }
810
+
811
+ function getDimensions(element) {
812
+ if (isHTMLElement(element)) {
813
+ return {
814
+ width: element.offsetWidth,
815
+ height: element.offsetHeight
816
+ };
817
+ }
818
+
819
+ const rect = getBoundingClientRect(element);
820
+ return {
821
+ width: rect.width,
822
+ height: rect.height
823
+ };
824
+ }
825
+
826
+ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
827
+ let {
828
+ rect,
829
+ offsetParent,
830
+ strategy
831
+ } = _ref;
832
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
833
+ const documentElement = getDocumentElement(offsetParent);
834
+
835
+ if (offsetParent === documentElement) {
836
+ return rect;
837
+ }
838
+
839
+ let scroll = {
840
+ scrollLeft: 0,
841
+ scrollTop: 0
842
+ };
843
+ const offsets = {
844
+ x: 0,
845
+ y: 0
846
+ };
847
+
848
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
849
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
850
+ scroll = getNodeScroll(offsetParent);
851
+ }
852
+
853
+ if (isHTMLElement(offsetParent)) {
854
+ const offsetRect = getBoundingClientRect(offsetParent, true);
855
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
856
+ offsets.y = offsetRect.y + offsetParent.clientTop;
857
+ } // This doesn't appear to be need to be negated.
858
+ // else if (documentElement) {
859
+ // offsets.x = getWindowScrollBarX(documentElement);
860
+ // }
861
+
862
+ }
863
+
864
+ return { ...rect,
865
+ x: rect.x - scroll.scrollLeft + offsets.x,
866
+ y: rect.y - scroll.scrollTop + offsets.y
867
+ };
868
+ }
869
+
870
+ function getViewportRect(element, strategy) {
871
+ const win = getWindow(element);
872
+ const html = getDocumentElement(element);
873
+ const visualViewport = win.visualViewport;
874
+ let width = html.clientWidth;
875
+ let height = html.clientHeight;
876
+ let x = 0;
877
+ let y = 0;
878
+
879
+ if (visualViewport) {
880
+ width = visualViewport.width;
881
+ height = visualViewport.height;
882
+ const layoutViewport = isLayoutViewport();
883
+
884
+ if (layoutViewport || !layoutViewport && strategy === 'fixed') {
885
+ x = visualViewport.offsetLeft;
886
+ y = visualViewport.offsetTop;
887
+ }
888
+ }
889
+
890
+ return {
891
+ width,
892
+ height,
893
+ x,
894
+ y
895
+ };
896
+ }
897
+
898
+ // of the `<html>` and `<body>` rect bounds if horizontally scrollable
899
+
900
+ function getDocumentRect(element) {
901
+ var _element$ownerDocumen;
902
+
903
+ const html = getDocumentElement(element);
904
+ const scroll = getNodeScroll(element);
905
+ const body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
906
+ const width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
907
+ const height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
908
+ let x = -scroll.scrollLeft + getWindowScrollBarX(element);
909
+ const y = -scroll.scrollTop;
910
+
911
+ if (getComputedStyle(body || html).direction === 'rtl') {
912
+ x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
913
+ }
914
+
915
+ return {
916
+ width,
917
+ height,
918
+ x,
919
+ y
920
+ };
921
+ }
922
+
923
+ function getNearestOverflowAncestor(node) {
924
+ const parentNode = getParentNode(node);
925
+
926
+ if (['html', 'body', '#document'].includes(getNodeName(parentNode))) {
927
+ // @ts-ignore assume body is always available
928
+ return node.ownerDocument.body;
929
+ }
930
+
931
+ if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
932
+ return parentNode;
933
+ }
934
+
935
+ return getNearestOverflowAncestor(parentNode);
936
+ }
937
+
938
+ function getOverflowAncestors(node, list) {
939
+ var _node$ownerDocument;
940
+
941
+ if (list === void 0) {
942
+ list = [];
943
+ }
944
+
945
+ const scrollableAncestor = getNearestOverflowAncestor(node);
946
+ const isBody = scrollableAncestor === ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.body);
947
+ const win = getWindow(scrollableAncestor);
948
+ const target = isBody ? [win].concat(win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []) : scrollableAncestor;
949
+ const updatedList = list.concat(target);
950
+ return isBody ? updatedList : // @ts-ignore: isBody tells us target will be an HTMLElement here
951
+ updatedList.concat(getOverflowAncestors(target));
952
+ }
953
+
954
+ function contains(parent, child) {
955
+ const rootNode = child.getRootNode == null ? void 0 : child.getRootNode(); // First, attempt with faster native method
956
+
957
+ if (parent.contains(child)) {
958
+ return true;
959
+ } // then fallback to custom implementation with Shadow DOM support
960
+ else if (rootNode && isShadowRoot(rootNode)) {
961
+ let next = child;
962
+
963
+ do {
964
+ // use `===` replace node.isSameNode()
965
+ if (next && parent === next) {
966
+ return true;
967
+ } // @ts-ignore: need a better way to handle this...
968
+
969
+
970
+ next = next.parentNode || next.host;
971
+ } while (next);
972
+ }
973
+
974
+ return false;
975
+ }
976
+
977
+ function getInnerBoundingClientRect(element, strategy) {
978
+ const clientRect = getBoundingClientRect(element, false, strategy === 'fixed');
979
+ const top = clientRect.top + element.clientTop;
980
+ const left = clientRect.left + element.clientLeft;
981
+ return {
982
+ top,
983
+ left,
984
+ x: left,
985
+ y: top,
986
+ right: left + element.clientWidth,
987
+ bottom: top + element.clientHeight,
988
+ width: element.clientWidth,
989
+ height: element.clientHeight
990
+ };
991
+ }
992
+
993
+ function getClientRectFromClippingAncestor(element, clippingParent, strategy) {
994
+ if (clippingParent === 'viewport') {
995
+ return rectToClientRect(getViewportRect(element, strategy));
996
+ }
997
+
998
+ if (isElement(clippingParent)) {
999
+ return getInnerBoundingClientRect(clippingParent, strategy);
1000
+ }
1001
+
1002
+ return rectToClientRect(getDocumentRect(getDocumentElement(element)));
1003
+ } // A "clipping ancestor" is an overflowable container with the characteristic of
1004
+ // clipping (or hiding) overflowing elements with a position different from
1005
+ // `initial`
1006
+
1007
+
1008
+ function getClippingAncestors(element) {
1009
+ const clippingAncestors = getOverflowAncestors(element);
1010
+ const canEscapeClipping = ['absolute', 'fixed'].includes(getComputedStyle(element).position);
1011
+ const clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
1012
+
1013
+ if (!isElement(clipperElement)) {
1014
+ return [];
1015
+ } // @ts-ignore isElement check ensures we return Array<Element>
1016
+
1017
+
1018
+ return clippingAncestors.filter(clippingAncestors => isElement(clippingAncestors) && contains(clippingAncestors, clipperElement) && getNodeName(clippingAncestors) !== 'body');
1019
+ } // Gets the maximum area that the element is visible in due to any number of
1020
+ // clipping ancestors
1021
+
1022
+
1023
+ function getClippingRect(_ref) {
1024
+ let {
1025
+ element,
1026
+ boundary,
1027
+ rootBoundary,
1028
+ strategy
1029
+ } = _ref;
1030
+ const mainClippingAncestors = boundary === 'clippingAncestors' ? getClippingAncestors(element) : [].concat(boundary);
1031
+ const clippingAncestors = [...mainClippingAncestors, rootBoundary];
1032
+ const firstClippingAncestor = clippingAncestors[0];
1033
+ const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
1034
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
1035
+ accRect.top = max(rect.top, accRect.top);
1036
+ accRect.right = min(rect.right, accRect.right);
1037
+ accRect.bottom = min(rect.bottom, accRect.bottom);
1038
+ accRect.left = max(rect.left, accRect.left);
1039
+ return accRect;
1040
+ }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
1041
+ return {
1042
+ width: clippingRect.right - clippingRect.left,
1043
+ height: clippingRect.bottom - clippingRect.top,
1044
+ x: clippingRect.left,
1045
+ y: clippingRect.top
1046
+ };
1047
+ }
1048
+
1049
+ const platform = {
1050
+ getClippingRect,
1051
+ convertOffsetParentRelativeRectToViewportRelativeRect,
1052
+ isElement,
1053
+ getDimensions,
1054
+ getOffsetParent,
1055
+ getDocumentElement,
1056
+ getElementRects: _ref => {
1057
+ let {
1058
+ reference,
1059
+ floating,
1060
+ strategy
1061
+ } = _ref;
1062
+ return {
1063
+ reference: getRectRelativeToOffsetParent(reference, getOffsetParent(floating), strategy),
1064
+ floating: { ...getDimensions(floating),
1065
+ x: 0,
1066
+ y: 0
1067
+ }
1068
+ };
1069
+ },
1070
+ getClientRects: element => Array.from(element.getClientRects()),
1071
+ isRTL: element => getComputedStyle(element).direction === 'rtl'
1072
+ };
1073
+
1074
+ /**
1075
+ * Automatically updates the position of the floating element when necessary.
1076
+ * @see https://floating-ui.com/docs/autoUpdate
1077
+ */
1078
+ function autoUpdate(reference, floating, update, options) {
1079
+ if (options === void 0) {
1080
+ options = {};
1081
+ }
1082
+
1083
+ const {
1084
+ ancestorScroll: _ancestorScroll = true,
1085
+ ancestorResize: _ancestorResize = true,
1086
+ elementResize = true,
1087
+ animationFrame = false
1088
+ } = options;
1089
+ const ancestorScroll = _ancestorScroll && !animationFrame;
1090
+ const ancestorResize = _ancestorResize && !animationFrame;
1091
+ const ancestors = ancestorScroll || ancestorResize ? [...(isElement(reference) ? getOverflowAncestors(reference) : []), ...getOverflowAncestors(floating)] : [];
1092
+ ancestors.forEach(ancestor => {
1093
+ ancestorScroll && ancestor.addEventListener('scroll', update, {
1094
+ passive: true
1095
+ });
1096
+ ancestorResize && ancestor.addEventListener('resize', update);
1097
+ });
1098
+ let observer = null;
1099
+
1100
+ if (elementResize) {
1101
+ let initialUpdate = true;
1102
+ observer = new ResizeObserver(() => {
1103
+ if (!initialUpdate) {
1104
+ update();
1105
+ }
1106
+
1107
+ initialUpdate = false;
1108
+ });
1109
+ isElement(reference) && !animationFrame && observer.observe(reference);
1110
+ observer.observe(floating);
1111
+ }
1112
+
1113
+ let frameId;
1114
+ let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
1115
+
1116
+ if (animationFrame) {
1117
+ frameLoop();
1118
+ }
1119
+
1120
+ function frameLoop() {
1121
+ const nextRefRect = getBoundingClientRect(reference);
1122
+
1123
+ if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
1124
+ update();
1125
+ }
1126
+
1127
+ prevRefRect = nextRefRect;
1128
+ frameId = requestAnimationFrame(frameLoop);
1129
+ }
1130
+
1131
+ update();
1132
+ return () => {
1133
+ var _observer;
1134
+
1135
+ ancestors.forEach(ancestor => {
1136
+ ancestorScroll && ancestor.removeEventListener('scroll', update);
1137
+ ancestorResize && ancestor.removeEventListener('resize', update);
1138
+ });
1139
+ (_observer = observer) == null ? void 0 : _observer.disconnect();
1140
+ observer = null;
1141
+
1142
+ if (animationFrame) {
1143
+ cancelAnimationFrame(frameId);
1144
+ }
1145
+ };
1146
+ }
1147
+
1148
+ /**
1149
+ * Computes the `x` and `y` coordinates that will place the floating element
1150
+ * next to a reference element when it is given a certain CSS positioning
1151
+ * strategy.
1152
+ */
1153
+
1154
+ const computePosition = (reference, floating, options) => computePosition$1(reference, floating, {
1155
+ platform,
1156
+ ...options
1157
+ });
1158
+
1159
+ 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); } }
1160
+
1161
+ // Older browsers don't support event options, feature detect it.
1162
+
1163
+ // Adopted and modified solution from Bohdan Didukh (2017)
1164
+ // https://stackoverflow.com/questions/41594997/ios-10-safari-prevent-scrolling-behind-a-fixed-overlay-and-maintain-scroll-posi
1165
+
1166
+ var hasPassiveEvents = false;
1167
+ if (typeof window !== 'undefined') {
1168
+ var passiveTestOptions = {
1169
+ get passive() {
1170
+ hasPassiveEvents = true;
1171
+ return undefined;
1172
+ }
1173
+ };
1174
+ window.addEventListener('testPassive', null, passiveTestOptions);
1175
+ window.removeEventListener('testPassive', null, passiveTestOptions);
1176
+ }
1177
+
1178
+ var isIosDevice = typeof window !== 'undefined' && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === 'MacIntel' && window.navigator.maxTouchPoints > 1);
1179
+
1180
+
1181
+ var locks = [];
1182
+ var documentListenerAdded = false;
1183
+ var initialClientY = -1;
1184
+ var previousBodyOverflowSetting = void 0;
1185
+ var previousBodyPosition = void 0;
1186
+ var previousBodyPaddingRight = void 0;
1187
+
1188
+ // returns true if `el` should be allowed to receive touchmove events.
1189
+ var allowTouchMove = function allowTouchMove(el) {
1190
+ return locks.some(function (lock) {
1191
+ if (lock.options.allowTouchMove && lock.options.allowTouchMove(el)) {
1192
+ return true;
1193
+ }
1194
+
1195
+ return false;
1196
+ });
1197
+ };
1198
+
1199
+ var preventDefault = function preventDefault(rawEvent) {
1200
+ var e = rawEvent || window.event;
1201
+
1202
+ // For the case whereby consumers adds a touchmove event listener to document.
1203
+ // Recall that we do document.addEventListener('touchmove', preventDefault, { passive: false })
1204
+ // in disableBodyScroll - so if we provide this opportunity to allowTouchMove, then
1205
+ // the touchmove event on document will break.
1206
+ if (allowTouchMove(e.target)) {
1207
+ return true;
1208
+ }
1209
+
1210
+ // Do not prevent if the event has more than one touch (usually meaning this is a multi touch gesture like pinch to zoom).
1211
+ if (e.touches.length > 1) return true;
1212
+
1213
+ if (e.preventDefault) e.preventDefault();
1214
+
1215
+ return false;
1216
+ };
1217
+
1218
+ var setOverflowHidden = function setOverflowHidden(options) {
1219
+ // If previousBodyPaddingRight is already set, don't set it again.
1220
+ if (previousBodyPaddingRight === undefined) {
1221
+ var _reserveScrollBarGap = !!options && options.reserveScrollBarGap === true;
1222
+ var scrollBarGap = window.innerWidth - document.documentElement.clientWidth;
1223
+
1224
+ if (_reserveScrollBarGap && scrollBarGap > 0) {
1225
+ var computedBodyPaddingRight = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right'), 10);
1226
+ previousBodyPaddingRight = document.body.style.paddingRight;
1227
+ document.body.style.paddingRight = computedBodyPaddingRight + scrollBarGap + 'px';
1228
+ }
1229
+ }
1230
+
1231
+ // If previousBodyOverflowSetting is already set, don't set it again.
1232
+ if (previousBodyOverflowSetting === undefined) {
1233
+ previousBodyOverflowSetting = document.body.style.overflow;
1234
+ document.body.style.overflow = 'hidden';
1235
+ }
1236
+ };
1237
+
1238
+ var restoreOverflowSetting = function restoreOverflowSetting() {
1239
+ if (previousBodyPaddingRight !== undefined) {
1240
+ document.body.style.paddingRight = previousBodyPaddingRight;
1241
+
1242
+ // Restore previousBodyPaddingRight to undefined so setOverflowHidden knows it
1243
+ // can be set again.
1244
+ previousBodyPaddingRight = undefined;
1245
+ }
1246
+
1247
+ if (previousBodyOverflowSetting !== undefined) {
1248
+ document.body.style.overflow = previousBodyOverflowSetting;
1249
+
1250
+ // Restore previousBodyOverflowSetting to undefined
1251
+ // so setOverflowHidden knows it can be set again.
1252
+ previousBodyOverflowSetting = undefined;
1253
+ }
1254
+ };
1255
+
1256
+ var setPositionFixed = function setPositionFixed() {
1257
+ return window.requestAnimationFrame(function () {
1258
+ // If previousBodyPosition is already set, don't set it again.
1259
+ if (previousBodyPosition === undefined) {
1260
+ previousBodyPosition = {
1261
+ position: document.body.style.position,
1262
+ top: document.body.style.top,
1263
+ left: document.body.style.left
1264
+ };
1265
+
1266
+ // Update the dom inside an animation frame
1267
+ var _window = window,
1268
+ scrollY = _window.scrollY,
1269
+ scrollX = _window.scrollX,
1270
+ innerHeight = _window.innerHeight;
1271
+
1272
+ document.body.style.position = 'fixed';
1273
+ document.body.style.top = -scrollY;
1274
+ document.body.style.left = -scrollX;
1275
+
1276
+ setTimeout(function () {
1277
+ return window.requestAnimationFrame(function () {
1278
+ // Attempt to check if the bottom bar appeared due to the position change
1279
+ var bottomBarHeight = innerHeight - window.innerHeight;
1280
+ if (bottomBarHeight && scrollY >= innerHeight) {
1281
+ // Move the content further up so that the bottom bar doesn't hide it
1282
+ document.body.style.top = -(scrollY + bottomBarHeight);
1283
+ }
1284
+ });
1285
+ }, 300);
1286
+ }
1287
+ });
1288
+ };
1289
+
1290
+ var restorePositionSetting = function restorePositionSetting() {
1291
+ if (previousBodyPosition !== undefined) {
1292
+ // Convert the position from "px" to Int
1293
+ var y = -parseInt(document.body.style.top, 10);
1294
+ var x = -parseInt(document.body.style.left, 10);
1295
+
1296
+ // Restore styles
1297
+ document.body.style.position = previousBodyPosition.position;
1298
+ document.body.style.top = previousBodyPosition.top;
1299
+ document.body.style.left = previousBodyPosition.left;
1300
+
1301
+ // Restore scroll
1302
+ window.scrollTo(x, y);
1303
+
1304
+ previousBodyPosition = undefined;
1305
+ }
1306
+ };
1307
+
1308
+ // https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight#Problems_and_solutions
1309
+ var isTargetElementTotallyScrolled = function isTargetElementTotallyScrolled(targetElement) {
1310
+ return targetElement ? targetElement.scrollHeight - targetElement.scrollTop <= targetElement.clientHeight : false;
1311
+ };
1312
+
1313
+ var handleScroll = function handleScroll(event, targetElement) {
1314
+ var clientY = event.targetTouches[0].clientY - initialClientY;
1315
+
1316
+ if (allowTouchMove(event.target)) {
1317
+ return false;
1318
+ }
1319
+
1320
+ if (targetElement && targetElement.scrollTop === 0 && clientY > 0) {
1321
+ // element is at the top of its scroll.
1322
+ return preventDefault(event);
1323
+ }
1324
+
1325
+ if (isTargetElementTotallyScrolled(targetElement) && clientY < 0) {
1326
+ // element is at the bottom of its scroll.
1327
+ return preventDefault(event);
1328
+ }
1329
+
1330
+ event.stopPropagation();
1331
+ return true;
1332
+ };
1333
+
1334
+ var disableBodyScroll = function disableBodyScroll(targetElement, options) {
1335
+ // targetElement must be provided
1336
+ if (!targetElement) {
1337
+ // eslint-disable-next-line no-console
1338
+ console.error('disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.');
1339
+ return;
1340
+ }
1341
+
1342
+ // disableBodyScroll must not have been called on this targetElement before
1343
+ if (locks.some(function (lock) {
1344
+ return lock.targetElement === targetElement;
1345
+ })) {
1346
+ return;
1347
+ }
1348
+
1349
+ var lock = {
1350
+ targetElement: targetElement,
1351
+ options: options || {}
1352
+ };
1353
+
1354
+ locks = [].concat(_toConsumableArray(locks), [lock]);
1355
+
1356
+ if (isIosDevice) {
1357
+ setPositionFixed();
1358
+ } else {
1359
+ setOverflowHidden(options);
1360
+ }
1361
+
1362
+ if (isIosDevice) {
1363
+ targetElement.ontouchstart = function (event) {
1364
+ if (event.targetTouches.length === 1) {
1365
+ // detect single touch.
1366
+ initialClientY = event.targetTouches[0].clientY;
1367
+ }
1368
+ };
1369
+ targetElement.ontouchmove = function (event) {
1370
+ if (event.targetTouches.length === 1) {
1371
+ // detect single touch.
1372
+ handleScroll(event, targetElement);
1373
+ }
1374
+ };
1375
+
1376
+ if (!documentListenerAdded) {
1377
+ document.addEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);
1378
+ documentListenerAdded = true;
1379
+ }
1380
+ }
1381
+ };
1382
+
1383
+ var enableBodyScroll = function enableBodyScroll(targetElement) {
1384
+ if (!targetElement) {
1385
+ // eslint-disable-next-line no-console
1386
+ console.error('enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.');
1387
+ return;
1388
+ }
1389
+
1390
+ locks = locks.filter(function (lock) {
1391
+ return lock.targetElement !== targetElement;
1392
+ });
1393
+
1394
+ if (isIosDevice) {
1395
+ targetElement.ontouchstart = null;
1396
+ targetElement.ontouchmove = null;
1397
+
1398
+ if (documentListenerAdded && locks.length === 0) {
1399
+ document.removeEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);
1400
+ documentListenerAdded = false;
1401
+ }
1402
+ }
1403
+
1404
+ if (isIosDevice) {
1405
+ restorePositionSetting();
1406
+ } else {
1407
+ restoreOverflowSetting();
1408
+ }
1409
+ };
1410
+
1411
+ const flipPopoverCss = ":host{position:relative;z-index:var(--s-z-40);display:inline-flex}:host *{box-sizing:border-box}.popover--active:not(.popover--closing) .popover__backdrop{-webkit-animation:0.15s popover-fade-in;animation:0.15s popover-fade-in}@media (prefers-reduced-motion){.popover--active:not(.popover--closing) .popover__backdrop{-webkit-animation:none;animation:none}}.popover--active:not(.popover--closing) .popover__content{-webkit-animation:0.15s popover-slide-in;animation:0.15s popover-slide-in}@media (min-width: 768px){.popover--active:not(.popover--closing) .popover__content{transform-origin:top left;-webkit-animation:0.15s popover-fade-scale-in;animation:0.15s popover-fade-scale-in}}@media (prefers-reduced-motion){.popover--active:not(.popover--closing) .popover__content{-webkit-animation:none;animation:none}}.popover--closing .popover__backdrop{-webkit-animation:0.15s popover-fade-out;animation:0.15s popover-fade-out;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@media (prefers-reduced-motion){.popover--closing .popover__backdrop{-webkit-animation:none;animation:none}}.popover--closing .popover__content{-webkit-animation:0.15s popover-slide-out;animation:0.15s popover-slide-out;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@media (min-width: 768px){.popover--closing .popover__content{-webkit-animation:0.15s popover-fade-out;animation:0.15s popover-fade-out}}@media (prefers-reduced-motion){.popover--closing .popover__content{-webkit-animation:none;animation:none}}.popover--inactive .popover__content{display:none}.popover__backdrop{position:fixed;z-index:0;background-color:rgba(0, 0, 0, 0.2);-webkit-animation:0.15s popover-backdrop-fade-in;animation:0.15s popover-backdrop-fade-in;inset:0}@media (prefers-reduced-motion){.popover__backdrop{-webkit-animation:none;animation:none}}@media (min-width: 768px){.popover__backdrop{display:none}}.popover__content{position:fixed;z-index:2;right:0;bottom:0;left:0;overflow:hidden;border-top-left-radius:var(--s-border-radius-xl);border-top-right-radius:var(--s-border-radius-xl);background-color:var(--s-surface-overlay-default)}@media (min-width: 768px){.popover__content{right:unset;bottom:unset;left:unset;max-width:22.5rem;border-radius:var(--s-border-radius-xl);-webkit-animation:none;animation:none;box-shadow:0.125rem 0.25rem 2.5rem rgba(0, 0, 0, 0.14)}}.popover__scroll-container{overflow-x:hidden;overflow-y:auto;width:100%;max-height:90vh;padding-top:var(--s-space-24);padding-bottom:var(--s-space-24);overscroll-behavior:contain}@media (min-width: 768px){.popover__scroll-container{max-height:19rem;padding-top:var(--s-space-8);padding-bottom:var(--s-space-8)}}.popover__handle{position:absolute;top:var(--s-space-8);left:50%;width:2.5rem;height:0.375rem;border-radius:0.1875rem;background-color:var(--s-border-default);transform:translatex(-50%)}@media (min-width: 768px){.popover__handle{display:none}}@-webkit-keyframes popover-slide-in{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes popover-slide-in{from{transform:translateY(100%)}to{transform:translateY(0)}}@-webkit-keyframes popover-slide-out{from{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes popover-slide-out{from{transform:translateY(0)}to{transform:translateY(100%)}}@-webkit-keyframes popover-fade-in{from{opacity:0}to{opacity:1}}@keyframes popover-fade-in{from{opacity:0}to{opacity:1}}@-webkit-keyframes popover-fade-out{from{opacity:1}to{opacity:0}}@keyframes popover-fade-out{from{opacity:1}to{opacity:0}}@-webkit-keyframes popover-fade-scale-in{from{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}@keyframes popover-fade-scale-in{from{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}";
1412
+
1413
+ const FlipPopover = class {
1414
+ constructor(hostRef) {
1415
+ index.registerInstance(this, hostRef);
1416
+ this.active = false;
1417
+ this.closing = false;
1418
+ this.close = () => {
1419
+ var _a;
1420
+ if (this.closing) {
1421
+ return;
1422
+ }
1423
+ if (this.disableAutoUpdate) {
1424
+ this.disableAutoUpdate();
1425
+ }
1426
+ this.closing = true;
1427
+ setTimeout(() => {
1428
+ this.active = false;
1429
+ this.closing = false;
1430
+ this.updateTriggerAttributes();
1431
+ }, 150);
1432
+ this.unlockBodyScroll();
1433
+ (_a = this.triggerEl) === null || _a === void 0 ? void 0 : _a.focus();
1434
+ };
1435
+ this.open = () => {
1436
+ this.active = true;
1437
+ this.updateChildMenuItems();
1438
+ this.updateTriggerAttributes();
1439
+ requestAnimationFrame(async () => {
1440
+ await this.reposition();
1441
+ if (this.childMenuItems.length > 0) {
1442
+ this.childMenuItems[0].focus();
1443
+ }
1444
+ else {
1445
+ this.contentContainer.focus();
1446
+ }
1447
+ if (this.disableAutoUpdate) {
1448
+ this.disableAutoUpdate();
1449
+ }
1450
+ this.disableAutoUpdate = autoUpdate(this.triggerEl, this.contentContainer, this.reposition);
1451
+ this.scrollContainer.scrollTop = 0;
1452
+ this.lockBodyScroll();
1453
+ });
1454
+ };
1455
+ this.toggle = () => {
1456
+ if (this.active) {
1457
+ this.close();
1458
+ }
1459
+ else {
1460
+ this.open();
1461
+ }
1462
+ };
1463
+ this.onKeydown = (event) => {
1464
+ if (event.code === "Escape" && this.active) {
1465
+ this.close();
1466
+ }
1467
+ };
1468
+ this.onContentClick = () => {
1469
+ if (!this.active) {
1470
+ return;
1471
+ }
1472
+ this.close();
1473
+ };
1474
+ this.reposition = async () => {
1475
+ const mobile = !window.matchMedia("(min-width: 768px)").matches;
1476
+ if (!Boolean(this.triggerEl) || !Boolean(this.contentContainer)) {
1477
+ return;
1478
+ }
1479
+ if (mobile) {
1480
+ this.position = undefined;
1481
+ return;
1482
+ }
1483
+ this.position = await computePosition(this.triggerEl, this.contentContainer, {
1484
+ middleware: [shift(), flip()],
1485
+ placement: "bottom-start",
1486
+ strategy: "fixed",
1487
+ });
1488
+ };
1489
+ }
1490
+ componentDidLoad() {
1491
+ this.connectTrigger();
1492
+ this.updateChildMenuItems();
1493
+ this.updateTriggerAttributes();
1494
+ }
1495
+ disconnectedCallback() {
1496
+ enableBodyScroll(this.scrollContainer);
1497
+ }
1498
+ onWindowFocusout(event) {
1499
+ if (!this.active) {
1500
+ return;
1501
+ }
1502
+ const target = event.relatedTarget;
1503
+ const popoverLostFocus = target === null ||
1504
+ (!this.el.contains(target) &&
1505
+ !this.childMenuItems.some((item) => { var _a; return (_a = target.shadowRoot) === null || _a === void 0 ? void 0 : _a.contains(item); }));
1506
+ if (popoverLostFocus) {
1507
+ this.close();
1508
+ }
1509
+ }
1510
+ connectTrigger() {
1511
+ var _a;
1512
+ const triggerComponent = document.querySelector(`#${this.trigger}`);
1513
+ this.triggerEl = ((triggerComponent === null || triggerComponent === void 0 ? void 0 : triggerComponent.children[0]) ||
1514
+ ((_a = triggerComponent === null || triggerComponent === void 0 ? void 0 : triggerComponent.shadowRoot) === null || _a === void 0 ? void 0 : _a.children[0]) ||
1515
+ triggerComponent);
1516
+ if (!Boolean(this.triggerEl)) {
1517
+ return;
1518
+ }
1519
+ this.triggerEl.addEventListener("click", this.toggle);
1520
+ }
1521
+ updateTriggerAttributes() {
1522
+ if (!Boolean(this.triggerEl)) {
1523
+ return;
1524
+ }
1525
+ this.triggerEl.setAttribute("aria-controls", this.popoverId);
1526
+ this.triggerEl.setAttribute("aria-expanded", String(this.active));
1527
+ this.triggerEl.setAttribute("aria-haspopup", "dialog");
1528
+ }
1529
+ updateChildMenuItems() {
1530
+ this.childMenuItems = utils.querySelectorAllDeep(this.el, '[role="menuitem"]');
1531
+ }
1532
+ lockBodyScroll() {
1533
+ const mobile = !window.matchMedia("(min-width: 768px)").matches;
1534
+ if (!mobile) {
1535
+ return;
1536
+ }
1537
+ disableBodyScroll(this.scrollContainer);
1538
+ }
1539
+ unlockBodyScroll() {
1540
+ enableBodyScroll(this.scrollContainer);
1541
+ }
1542
+ render() {
1543
+ var _a, _b;
1544
+ const className = index$1.classnames("popover", {
1545
+ "popover--closing": this.closing,
1546
+ "popover--active": this.active,
1547
+ "popover--inactive": !this.active,
1548
+ });
1549
+ return (index.h(index.Host, { id: this.popoverId }, index.h("div", { class: className, onKeyDown: this.onKeydown }, index.h("div", { "aria-hidden": !this.active ? "true" : "false", "aria-label": this.label, class: "popover__content", onClick: this.onContentClick, role: "dialog", tabindex: "-1", ref: (el) => (this.contentContainer = el), style: {
1550
+ top: Boolean(this.position) ? `${(_a = this.position) === null || _a === void 0 ? void 0 : _a.y}px` : "",
1551
+ left: Boolean(this.position) ? `${(_b = this.position) === null || _b === void 0 ? void 0 : _b.x}px` : "",
1552
+ } }, index.h("span", { class: "popover__handle" }), index.h("div", { class: "popover__scroll-container", ref: (el) => (this.scrollContainer = el) }, index.h("slot", null))), this.active && (index.h("div", { class: "popover__backdrop", onClick: this.close })))));
1553
+ }
1554
+ get el() { return index.getElement(this); }
1555
+ };
1556
+ FlipPopover.style = flipPopoverCss;
1557
+
1558
+ exports.flip_popover = FlipPopover;