@ukic/web-components 2.1.0-beta.12 → 2.1.0-beta.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (384) hide show
  1. package/dist/cjs/core.cjs.js +2 -2
  2. package/dist/cjs/ic-alert.cjs.entry.js +1 -1
  3. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  4. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
  5. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  6. package/dist/cjs/ic-button_3.cjs.entry.js +16 -5
  7. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  8. package/dist/cjs/ic-card.cjs.entry.js +2 -2
  9. package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
  10. package/dist/cjs/ic-checkbox-group.cjs.entry.js +14 -16
  11. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  12. package/dist/cjs/ic-checkbox.cjs.entry.js +9 -3
  13. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  14. package/dist/cjs/ic-chip.cjs.entry.js +1 -1
  15. package/dist/cjs/ic-classification-banner.cjs.entry.js +1 -1
  16. package/dist/cjs/ic-data-entity.cjs.entry.js +1 -1
  17. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  18. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  19. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  20. package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
  21. package/dist/cjs/ic-footer.cjs.entry.js +4 -2
  22. package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
  23. package/dist/cjs/ic-hero.cjs.entry.js +1 -1
  24. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
  25. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +145 -64
  26. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  27. package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
  28. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  29. package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
  30. package/dist/cjs/ic-menu-item.cjs.entry.js +2 -2
  31. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
  32. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  33. package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
  34. package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
  35. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  36. package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
  37. package/dist/cjs/ic-pagination-item.cjs.entry.js +51 -0
  38. package/dist/cjs/ic-pagination-item.cjs.entry.js.map +1 -0
  39. package/dist/cjs/ic-pagination.cjs.entry.js +206 -0
  40. package/dist/cjs/ic-pagination.cjs.entry.js.map +1 -0
  41. package/dist/cjs/ic-popover-menu.cjs.entry.js +1 -1
  42. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  43. package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
  44. package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
  45. package/dist/cjs/ic-search-bar.cjs.entry.js +79 -12
  46. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  47. package/dist/cjs/ic-section-container.cjs.entry.js +1 -1
  48. package/dist/cjs/ic-select.cjs.entry.js +152 -44
  49. package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
  50. package/dist/cjs/ic-side-navigation.cjs.entry.js +11 -3
  51. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  52. package/dist/cjs/ic-skeleton.cjs.entry.js +1 -1
  53. package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
  54. package/dist/cjs/ic-step.cjs.entry.js +1 -1
  55. package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
  56. package/dist/cjs/ic-switch.cjs.entry.js +1 -1
  57. package/dist/cjs/ic-tab-context.cjs.entry.js +1 -1
  58. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  59. package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
  60. package/dist/cjs/ic-tab.cjs.entry.js +1 -1
  61. package/dist/cjs/ic-text-field.cjs.entry.js +18 -7
  62. package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
  63. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  64. package/dist/cjs/ic-toast-region.cjs.entry.js +1 -1
  65. package/dist/cjs/ic-toast.cjs.entry.js +1 -1
  66. package/dist/cjs/ic-top-navigation.cjs.entry.js +3 -5
  67. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  68. package/dist/cjs/ic-typography.cjs.entry.js +1 -1
  69. package/dist/cjs/{index-f79a4e53.js → index-a62312a7.js} +11 -1
  70. package/dist/cjs/index-a62312a7.js.map +1 -0
  71. package/dist/cjs/loader.cjs.js +2 -2
  72. package/dist/cjs/types-3eb02246.js.map +1 -1
  73. package/dist/collection/assets/pagination-first-last.svg +3 -0
  74. package/dist/collection/assets/pagination-next-previous.svg +3 -0
  75. package/dist/collection/collection-manifest.json +2 -0
  76. package/dist/collection/components/ic-button/ic-button.css +11 -1
  77. package/dist/collection/components/ic-card/ic-card.css +3 -0
  78. package/dist/collection/components/ic-checkbox/ic-checkbox.css +4 -1
  79. package/dist/collection/components/ic-checkbox/ic-checkbox.js +8 -1
  80. package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
  81. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +14 -20
  82. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
  83. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.types.js.map +1 -1
  84. package/dist/collection/components/ic-footer/ic-footer.js +4 -2
  85. package/dist/collection/components/ic-footer/ic-footer.js.map +1 -1
  86. package/dist/collection/components/ic-menu/ic-menu.css +30 -1
  87. package/dist/collection/components/ic-menu/ic-menu.js +188 -63
  88. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  89. package/dist/collection/components/ic-menu-item/ic-menu-item.css +1 -6
  90. package/dist/collection/components/ic-pagination/ic-pagination.css +486 -0
  91. package/dist/collection/components/ic-pagination/ic-pagination.js +435 -0
  92. package/dist/collection/components/ic-pagination/ic-pagination.js.map +1 -0
  93. package/dist/collection/components/ic-pagination/ic-pagination.test.a11y.js +11 -0
  94. package/dist/collection/components/ic-pagination/ic-pagination.test.a11y.js.map +1 -0
  95. package/dist/collection/components/ic-pagination/ic-pagination.types.js +2 -0
  96. package/dist/collection/components/ic-pagination/ic-pagination.types.js.map +1 -0
  97. package/dist/collection/components/ic-pagination-item/ic-pagination-item.css +581 -0
  98. package/dist/collection/components/ic-pagination-item/ic-pagination-item.js +225 -0
  99. package/dist/collection/components/ic-pagination-item/ic-pagination-item.js.map +1 -0
  100. package/dist/collection/components/ic-pagination-item/ic-pagination-item.types.js +2 -0
  101. package/dist/collection/components/ic-pagination-item/ic-pagination-item.types.js.map +1 -0
  102. package/dist/collection/components/ic-popover-menu/ic-popover-menu.css +2 -1
  103. package/dist/collection/components/ic-search-bar/ic-search-bar.css +0 -4
  104. package/dist/collection/components/ic-search-bar/ic-search-bar.js +172 -11
  105. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  106. package/dist/collection/components/ic-select/ic-select.js +247 -44
  107. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  108. package/dist/collection/components/ic-side-navigation/ic-side-navigation.css +36 -16
  109. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +9 -1
  110. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
  111. package/dist/collection/components/ic-text-field/ic-text-field.js +66 -12
  112. package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
  113. package/dist/collection/components/ic-tooltip/ic-tooltip.js +53 -4
  114. package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
  115. package/dist/collection/components/ic-top-navigation/ic-top-navigation.css +9 -0
  116. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +1 -3
  117. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
  118. package/dist/collection/utils/types.js.map +1 -1
  119. package/dist/components/ic-button2.js +1 -1
  120. package/dist/components/ic-button2.js.map +1 -1
  121. package/dist/components/ic-card.js +1 -1
  122. package/dist/components/ic-card.js.map +1 -1
  123. package/dist/components/ic-checkbox-group.js +14 -17
  124. package/dist/components/ic-checkbox-group.js.map +1 -1
  125. package/dist/components/ic-checkbox.js +8 -2
  126. package/dist/components/ic-checkbox.js.map +1 -1
  127. package/dist/components/ic-footer.js +4 -2
  128. package/dist/components/ic-footer.js.map +1 -1
  129. package/dist/components/ic-menu-item2.js +1 -1
  130. package/dist/components/ic-menu-item2.js.map +1 -1
  131. package/dist/components/ic-menu2.js +164 -66
  132. package/dist/components/ic-menu2.js.map +1 -1
  133. package/dist/components/ic-pagination-item.d.ts +11 -0
  134. package/dist/components/ic-pagination-item.js +8 -0
  135. package/dist/components/ic-pagination-item.js.map +1 -0
  136. package/dist/components/ic-pagination-item2.js +77 -0
  137. package/dist/components/ic-pagination-item2.js.map +1 -0
  138. package/dist/components/ic-pagination.d.ts +11 -0
  139. package/dist/components/ic-pagination.js +266 -0
  140. package/dist/components/ic-pagination.js.map +1 -0
  141. package/dist/components/ic-popover-menu.js +1 -2
  142. package/dist/components/ic-popover-menu.js.map +1 -1
  143. package/dist/components/ic-search-bar.js +82 -12
  144. package/dist/components/ic-search-bar.js.map +1 -1
  145. package/dist/components/ic-select.js +157 -43
  146. package/dist/components/ic-select.js.map +1 -1
  147. package/dist/components/ic-side-navigation.js +10 -2
  148. package/dist/components/ic-side-navigation.js.map +1 -1
  149. package/dist/components/ic-text-field2.js +20 -8
  150. package/dist/components/ic-text-field2.js.map +1 -1
  151. package/dist/components/ic-tooltip2.js +1817 -8
  152. package/dist/components/ic-tooltip2.js.map +1 -1
  153. package/dist/components/ic-top-navigation.js +2 -4
  154. package/dist/components/ic-top-navigation.js.map +1 -1
  155. package/dist/components/index.d.ts +2 -0
  156. package/dist/components/index.js +2 -0
  157. package/dist/components/index.js.map +1 -1
  158. package/dist/components/types.js.map +1 -1
  159. package/dist/core/core.esm.js +1 -1
  160. package/dist/core/core.esm.js.map +1 -1
  161. package/dist/core/{p-0f0dfa16.entry.js → p-002a63e9.entry.js} +2 -2
  162. package/dist/core/{p-759c80a3.entry.js → p-0575a77f.entry.js} +2 -2
  163. package/dist/core/{p-3453aa9c.entry.js → p-0a41c3cb.entry.js} +2 -2
  164. package/dist/core/{p-b7fc1f35.entry.js → p-100dbcec.entry.js} +2 -2
  165. package/dist/core/{p-1bd4d07e.entry.js → p-14835d6f.entry.js} +2 -2
  166. package/dist/core/{p-28b2158b.entry.js → p-1eb0992b.entry.js} +2 -2
  167. package/dist/core/{p-62b3516e.entry.js → p-223a214f.entry.js} +2 -2
  168. package/dist/core/{p-dd71a986.entry.js → p-276f7ecb.entry.js} +2 -2
  169. package/dist/core/{p-3d84a743.entry.js → p-28bc3bf0.entry.js} +2 -2
  170. package/dist/core/p-2e949135.entry.js +2 -0
  171. package/dist/core/p-2e949135.entry.js.map +1 -0
  172. package/dist/core/{p-8ffa00c9.entry.js → p-312c10b0.entry.js} +2 -2
  173. package/dist/core/p-3845b769.entry.js +2 -0
  174. package/dist/core/p-3845b769.entry.js.map +1 -0
  175. package/dist/core/{p-cc62d065.entry.js → p-3a67718c.entry.js} +2 -2
  176. package/dist/core/p-3c23f963.entry.js +2 -0
  177. package/dist/core/p-3c23f963.entry.js.map +1 -0
  178. package/dist/core/{p-74a768bc.entry.js → p-3dc2ff7b.entry.js} +2 -2
  179. package/dist/core/p-3e5eb873.entry.js +2 -0
  180. package/dist/core/p-3e5eb873.entry.js.map +1 -0
  181. package/dist/core/{p-58ff516f.entry.js → p-3fb307e6.entry.js} +2 -2
  182. package/dist/core/{p-d2508752.entry.js → p-454b1ecd.entry.js} +2 -2
  183. package/dist/core/p-4595f48f.entry.js +2 -0
  184. package/dist/core/p-4595f48f.entry.js.map +1 -0
  185. package/dist/core/{p-7e309c50.entry.js → p-47b0ed42.entry.js} +2 -2
  186. package/dist/core/{p-68c84039.entry.js → p-4b87445b.entry.js} +2 -2
  187. package/dist/core/p-4c8fcfe6.entry.js +2 -0
  188. package/dist/core/p-4c8fcfe6.entry.js.map +1 -0
  189. package/dist/core/p-52fd3533.entry.js +2 -0
  190. package/dist/core/p-52fd3533.entry.js.map +1 -0
  191. package/dist/core/{p-0a463a65.entry.js → p-546b620e.entry.js} +2 -2
  192. package/dist/core/p-56fe91ad.entry.js +2 -0
  193. package/dist/core/p-56fe91ad.entry.js.map +1 -0
  194. package/dist/core/{p-5450cebf.js → p-589f6dd3.js} +3 -3
  195. package/dist/core/p-589f6dd3.js.map +1 -0
  196. package/dist/core/{p-dc4ba6a0.entry.js → p-5d077cf7.entry.js} +2 -2
  197. package/dist/core/{p-8c9cc4d5.entry.js → p-6a77992e.entry.js} +2 -2
  198. package/dist/core/{p-d27dbb63.entry.js → p-6b39f8b4.entry.js} +2 -2
  199. package/dist/core/p-6f57b13c.js.map +1 -1
  200. package/dist/core/p-80eff050.entry.js +2 -0
  201. package/dist/core/p-80eff050.entry.js.map +1 -0
  202. package/dist/core/{p-9e578e82.entry.js → p-8780890e.entry.js} +2 -2
  203. package/dist/core/{p-ff15c756.entry.js → p-895bda21.entry.js} +2 -2
  204. package/dist/core/{p-08535d97.entry.js → p-92c4fa7f.entry.js} +2 -2
  205. package/dist/core/{p-41459307.entry.js → p-9413d639.entry.js} +2 -2
  206. package/dist/core/{p-e17eea34.entry.js → p-a0f4e641.entry.js} +2 -2
  207. package/dist/core/{p-4d8392fe.entry.js → p-a33a04b2.entry.js} +2 -2
  208. package/dist/core/{p-65b94ddb.entry.js → p-a5bee11f.entry.js} +2 -2
  209. package/dist/core/p-a7fdb9a8.entry.js +2 -0
  210. package/dist/core/p-a7fdb9a8.entry.js.map +1 -0
  211. package/dist/core/{p-eeefddb5.entry.js → p-b61e76e2.entry.js} +2 -2
  212. package/dist/core/p-b61e76e2.entry.js.map +1 -0
  213. package/dist/core/p-c0813424.entry.js +2 -0
  214. package/dist/core/p-c0813424.entry.js.map +1 -0
  215. package/dist/core/{p-b5b03f86.entry.js → p-cb437317.entry.js} +2 -2
  216. package/dist/core/p-d5d9923a.entry.js +2 -0
  217. package/dist/core/p-d5d9923a.entry.js.map +1 -0
  218. package/dist/core/{p-6c9ce0ec.entry.js → p-dc0b9e80.entry.js} +2 -2
  219. package/dist/core/{p-1e0174dc.entry.js → p-de45134c.entry.js} +2 -2
  220. package/dist/core/{p-9daae2ae.entry.js → p-de891d3d.entry.js} +2 -2
  221. package/dist/core/p-e0f24ccd.entry.js +2 -0
  222. package/dist/core/p-e0f24ccd.entry.js.map +1 -0
  223. package/dist/core/{p-741b4ea3.entry.js → p-e384aaee.entry.js} +2 -2
  224. package/dist/core/{p-977af213.entry.js → p-e41e701a.entry.js} +2 -2
  225. package/dist/core/{p-deada16f.entry.js → p-e839e5dc.entry.js} +2 -2
  226. package/dist/core/{p-186ecccd.entry.js → p-ea526b54.entry.js} +2 -2
  227. package/dist/core/{p-eb7599cc.entry.js → p-ec8b228c.entry.js} +2 -2
  228. package/dist/core/{p-eb7599cc.entry.js.map → p-ec8b228c.entry.js.map} +1 -1
  229. package/dist/core/{p-4269584a.entry.js → p-f3e10149.entry.js} +2 -2
  230. package/dist/core/{p-ad2477d8.entry.js → p-fc7dce3d.entry.js} +2 -2
  231. package/dist/esm/core.js +2 -2
  232. package/dist/esm/ic-alert.entry.js +1 -1
  233. package/dist/esm/ic-back-to-top.entry.js +1 -1
  234. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  235. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  236. package/dist/esm/ic-button_3.entry.js +16 -5
  237. package/dist/esm/ic-button_3.entry.js.map +1 -1
  238. package/dist/esm/ic-card.entry.js +2 -2
  239. package/dist/esm/ic-card.entry.js.map +1 -1
  240. package/dist/esm/ic-checkbox-group.entry.js +14 -16
  241. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  242. package/dist/esm/ic-checkbox.entry.js +9 -3
  243. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  244. package/dist/esm/ic-chip.entry.js +1 -1
  245. package/dist/esm/ic-classification-banner.entry.js +1 -1
  246. package/dist/esm/ic-data-entity.entry.js +1 -1
  247. package/dist/esm/ic-data-row.entry.js +1 -1
  248. package/dist/esm/ic-divider.entry.js +1 -1
  249. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  250. package/dist/esm/ic-footer-link.entry.js +1 -1
  251. package/dist/esm/ic-footer.entry.js +5 -3
  252. package/dist/esm/ic-footer.entry.js.map +1 -1
  253. package/dist/esm/ic-hero.entry.js +1 -1
  254. package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
  255. package/dist/esm/ic-input-component-container_3.entry.js +145 -64
  256. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  257. package/dist/esm/ic-input-label_2.entry.js +1 -1
  258. package/dist/esm/ic-link.entry.js +1 -1
  259. package/dist/esm/ic-menu-group.entry.js +1 -1
  260. package/dist/esm/ic-menu-item.entry.js +2 -2
  261. package/dist/esm/ic-menu-item.entry.js.map +1 -1
  262. package/dist/esm/ic-navigation-button.entry.js +1 -1
  263. package/dist/esm/ic-navigation-group.entry.js +1 -1
  264. package/dist/esm/ic-navigation-item.entry.js +1 -1
  265. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  266. package/dist/esm/ic-page-header.entry.js +1 -1
  267. package/dist/esm/ic-pagination-item.entry.js +47 -0
  268. package/dist/esm/ic-pagination-item.entry.js.map +1 -0
  269. package/dist/esm/ic-pagination.entry.js +202 -0
  270. package/dist/esm/ic-pagination.entry.js.map +1 -0
  271. package/dist/esm/ic-popover-menu.entry.js +1 -1
  272. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  273. package/dist/esm/ic-radio-group.entry.js +1 -1
  274. package/dist/esm/ic-radio-option.entry.js +1 -1
  275. package/dist/esm/ic-search-bar.entry.js +79 -12
  276. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  277. package/dist/esm/ic-section-container.entry.js +1 -1
  278. package/dist/esm/ic-select.entry.js +152 -44
  279. package/dist/esm/ic-select.entry.js.map +1 -1
  280. package/dist/esm/ic-side-navigation.entry.js +11 -3
  281. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  282. package/dist/esm/ic-skeleton.entry.js +1 -1
  283. package/dist/esm/ic-status-tag.entry.js +1 -1
  284. package/dist/esm/ic-step.entry.js +1 -1
  285. package/dist/esm/ic-stepper.entry.js +1 -1
  286. package/dist/esm/ic-switch.entry.js +1 -1
  287. package/dist/esm/ic-tab-context.entry.js +1 -1
  288. package/dist/esm/ic-tab-group.entry.js +1 -1
  289. package/dist/esm/ic-tab-panel.entry.js +1 -1
  290. package/dist/esm/ic-tab.entry.js +1 -1
  291. package/dist/esm/ic-text-field.entry.js +18 -7
  292. package/dist/esm/ic-text-field.entry.js.map +1 -1
  293. package/dist/esm/ic-theme.entry.js +1 -1
  294. package/dist/esm/ic-toast-region.entry.js +1 -1
  295. package/dist/esm/ic-toast.entry.js +1 -1
  296. package/dist/esm/ic-top-navigation.entry.js +3 -5
  297. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  298. package/dist/esm/ic-typography.entry.js +1 -1
  299. package/dist/esm/{index-90721b3c.js → index-3b144b17.js} +11 -2
  300. package/dist/esm/index-3b144b17.js.map +1 -0
  301. package/dist/esm/loader.js +2 -2
  302. package/dist/esm/types-dd515332.js.map +1 -1
  303. package/dist/types/components/ic-checkbox-group/ic-checkbox-group.d.ts +1 -3
  304. package/dist/types/components/ic-checkbox-group/ic-checkbox-group.types.d.ts +5 -0
  305. package/dist/types/components/ic-menu/ic-menu.d.ts +26 -7
  306. package/dist/types/components/ic-pagination/ic-pagination.d.ts +74 -0
  307. package/dist/types/components/ic-pagination/ic-pagination.test.a11y.d.ts +1 -0
  308. package/dist/types/components/ic-pagination/ic-pagination.types.d.ts +4 -0
  309. package/dist/types/components/ic-pagination-item/ic-pagination-item.d.ts +46 -0
  310. package/dist/types/components/ic-pagination-item/ic-pagination-item.types.d.ts +1 -0
  311. package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +30 -1
  312. package/dist/types/components/ic-select/ic-select.d.ts +31 -1
  313. package/dist/types/components/ic-side-navigation/ic-side-navigation.d.ts +2 -1
  314. package/dist/types/components/ic-text-field/ic-text-field.d.ts +11 -2
  315. package/dist/types/components/ic-tooltip/ic-tooltip.d.ts +7 -0
  316. package/dist/types/components.d.ts +282 -19
  317. package/dist/types/utils/types.d.ts +3 -0
  318. package/hydrate/index.js +746 -160
  319. package/package.json +3 -3
  320. package/dist/cjs/index-f79a4e53.js.map +0 -1
  321. package/dist/components/popper.js +0 -1801
  322. package/dist/components/popper.js.map +0 -1
  323. package/dist/core/p-0d4ccf6a.entry.js +0 -2
  324. package/dist/core/p-0d4ccf6a.entry.js.map +0 -1
  325. package/dist/core/p-5450cebf.js.map +0 -1
  326. package/dist/core/p-6e1f5022.entry.js +0 -2
  327. package/dist/core/p-6e1f5022.entry.js.map +0 -1
  328. package/dist/core/p-7c2b09c8.entry.js +0 -2
  329. package/dist/core/p-7c2b09c8.entry.js.map +0 -1
  330. package/dist/core/p-8959dd7d.entry.js +0 -2
  331. package/dist/core/p-8959dd7d.entry.js.map +0 -1
  332. package/dist/core/p-90d6dbd6.entry.js +0 -2
  333. package/dist/core/p-90d6dbd6.entry.js.map +0 -1
  334. package/dist/core/p-a8e969ea.entry.js +0 -2
  335. package/dist/core/p-a8e969ea.entry.js.map +0 -1
  336. package/dist/core/p-bb505d2a.entry.js +0 -2
  337. package/dist/core/p-bb505d2a.entry.js.map +0 -1
  338. package/dist/core/p-ce96a494.entry.js +0 -2
  339. package/dist/core/p-ce96a494.entry.js.map +0 -1
  340. package/dist/core/p-e4390415.entry.js +0 -2
  341. package/dist/core/p-e4390415.entry.js.map +0 -1
  342. package/dist/core/p-eeefddb5.entry.js.map +0 -1
  343. package/dist/core/p-f0244b5a.entry.js +0 -2
  344. package/dist/core/p-f0244b5a.entry.js.map +0 -1
  345. package/dist/core/p-f777679c.entry.js +0 -2
  346. package/dist/core/p-f777679c.entry.js.map +0 -1
  347. package/dist/esm/index-90721b3c.js.map +0 -1
  348. /package/dist/core/{p-0f0dfa16.entry.js.map → p-002a63e9.entry.js.map} +0 -0
  349. /package/dist/core/{p-759c80a3.entry.js.map → p-0575a77f.entry.js.map} +0 -0
  350. /package/dist/core/{p-3453aa9c.entry.js.map → p-0a41c3cb.entry.js.map} +0 -0
  351. /package/dist/core/{p-b7fc1f35.entry.js.map → p-100dbcec.entry.js.map} +0 -0
  352. /package/dist/core/{p-1bd4d07e.entry.js.map → p-14835d6f.entry.js.map} +0 -0
  353. /package/dist/core/{p-28b2158b.entry.js.map → p-1eb0992b.entry.js.map} +0 -0
  354. /package/dist/core/{p-62b3516e.entry.js.map → p-223a214f.entry.js.map} +0 -0
  355. /package/dist/core/{p-dd71a986.entry.js.map → p-276f7ecb.entry.js.map} +0 -0
  356. /package/dist/core/{p-3d84a743.entry.js.map → p-28bc3bf0.entry.js.map} +0 -0
  357. /package/dist/core/{p-8ffa00c9.entry.js.map → p-312c10b0.entry.js.map} +0 -0
  358. /package/dist/core/{p-cc62d065.entry.js.map → p-3a67718c.entry.js.map} +0 -0
  359. /package/dist/core/{p-74a768bc.entry.js.map → p-3dc2ff7b.entry.js.map} +0 -0
  360. /package/dist/core/{p-58ff516f.entry.js.map → p-3fb307e6.entry.js.map} +0 -0
  361. /package/dist/core/{p-d2508752.entry.js.map → p-454b1ecd.entry.js.map} +0 -0
  362. /package/dist/core/{p-7e309c50.entry.js.map → p-47b0ed42.entry.js.map} +0 -0
  363. /package/dist/core/{p-68c84039.entry.js.map → p-4b87445b.entry.js.map} +0 -0
  364. /package/dist/core/{p-0a463a65.entry.js.map → p-546b620e.entry.js.map} +0 -0
  365. /package/dist/core/{p-dc4ba6a0.entry.js.map → p-5d077cf7.entry.js.map} +0 -0
  366. /package/dist/core/{p-8c9cc4d5.entry.js.map → p-6a77992e.entry.js.map} +0 -0
  367. /package/dist/core/{p-d27dbb63.entry.js.map → p-6b39f8b4.entry.js.map} +0 -0
  368. /package/dist/core/{p-9e578e82.entry.js.map → p-8780890e.entry.js.map} +0 -0
  369. /package/dist/core/{p-ff15c756.entry.js.map → p-895bda21.entry.js.map} +0 -0
  370. /package/dist/core/{p-08535d97.entry.js.map → p-92c4fa7f.entry.js.map} +0 -0
  371. /package/dist/core/{p-41459307.entry.js.map → p-9413d639.entry.js.map} +0 -0
  372. /package/dist/core/{p-e17eea34.entry.js.map → p-a0f4e641.entry.js.map} +0 -0
  373. /package/dist/core/{p-4d8392fe.entry.js.map → p-a33a04b2.entry.js.map} +0 -0
  374. /package/dist/core/{p-65b94ddb.entry.js.map → p-a5bee11f.entry.js.map} +0 -0
  375. /package/dist/core/{p-b5b03f86.entry.js.map → p-cb437317.entry.js.map} +0 -0
  376. /package/dist/core/{p-6c9ce0ec.entry.js.map → p-dc0b9e80.entry.js.map} +0 -0
  377. /package/dist/core/{p-1e0174dc.entry.js.map → p-de45134c.entry.js.map} +0 -0
  378. /package/dist/core/{p-9daae2ae.entry.js.map → p-de891d3d.entry.js.map} +0 -0
  379. /package/dist/core/{p-741b4ea3.entry.js.map → p-e384aaee.entry.js.map} +0 -0
  380. /package/dist/core/{p-977af213.entry.js.map → p-e41e701a.entry.js.map} +0 -0
  381. /package/dist/core/{p-deada16f.entry.js.map → p-e839e5dc.entry.js.map} +0 -0
  382. /package/dist/core/{p-186ecccd.entry.js.map → p-ea526b54.entry.js.map} +0 -0
  383. /package/dist/core/{p-4269584a.entry.js.map → p-f3e10149.entry.js.map} +0 -0
  384. /package/dist/core/{p-ad2477d8.entry.js.map → p-fc7dce3d.entry.js.map} +0 -0
@@ -1,11 +1,1808 @@
1
- import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
1
+ import { proxyCustomElement, HTMLElement as HTMLElement$1, h, Host } from '@stencil/core/internal/client';
2
2
  import { a as onComponentRequiredPropUndefined } from './helpers.js';
3
3
  import { d as defineCustomElement$1 } from './ic-typography2.js';
4
- import { c as createPopper } from './popper.js';
4
+
5
+ var top = 'top';
6
+ var bottom = 'bottom';
7
+ var right = 'right';
8
+ var left = 'left';
9
+ var auto = 'auto';
10
+ var basePlacements = [top, bottom, right, left];
11
+ var start = 'start';
12
+ var end = 'end';
13
+ var clippingParents = 'clippingParents';
14
+ var viewport = 'viewport';
15
+ var popper = 'popper';
16
+ var reference = 'reference';
17
+ var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {
18
+ return acc.concat([placement + "-" + start, placement + "-" + end]);
19
+ }, []);
20
+ var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {
21
+ return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
22
+ }, []); // modifiers that need to read the DOM
23
+
24
+ var beforeRead = 'beforeRead';
25
+ var read = 'read';
26
+ var afterRead = 'afterRead'; // pure-logic modifiers
27
+
28
+ var beforeMain = 'beforeMain';
29
+ var main = 'main';
30
+ var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)
31
+
32
+ var beforeWrite = 'beforeWrite';
33
+ var write = 'write';
34
+ var afterWrite = 'afterWrite';
35
+ var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
36
+
37
+ function getNodeName(element) {
38
+ return element ? (element.nodeName || '').toLowerCase() : null;
39
+ }
40
+
41
+ function getWindow(node) {
42
+ if (node == null) {
43
+ return window;
44
+ }
45
+
46
+ if (node.toString() !== '[object Window]') {
47
+ var ownerDocument = node.ownerDocument;
48
+ return ownerDocument ? ownerDocument.defaultView || window : window;
49
+ }
50
+
51
+ return node;
52
+ }
53
+
54
+ function isElement(node) {
55
+ var OwnElement = getWindow(node).Element;
56
+ return node instanceof OwnElement || node instanceof Element;
57
+ }
58
+
59
+ function isHTMLElement(node) {
60
+ var OwnElement = getWindow(node).HTMLElement;
61
+ return node instanceof OwnElement || node instanceof HTMLElement;
62
+ }
63
+
64
+ function isShadowRoot(node) {
65
+ // IE 11 has no ShadowRoot
66
+ if (typeof ShadowRoot === 'undefined') {
67
+ return false;
68
+ }
69
+
70
+ var OwnElement = getWindow(node).ShadowRoot;
71
+ return node instanceof OwnElement || node instanceof ShadowRoot;
72
+ }
73
+
74
+ // and applies them to the HTMLElements such as popper and arrow
75
+
76
+ function applyStyles(_ref) {
77
+ var state = _ref.state;
78
+ Object.keys(state.elements).forEach(function (name) {
79
+ var style = state.styles[name] || {};
80
+ var attributes = state.attributes[name] || {};
81
+ var element = state.elements[name]; // arrow is optional + virtual elements
82
+
83
+ if (!isHTMLElement(element) || !getNodeName(element)) {
84
+ return;
85
+ } // Flow doesn't support to extend this property, but it's the most
86
+ // effective way to apply styles to an HTMLElement
87
+ // $FlowFixMe[cannot-write]
88
+
89
+
90
+ Object.assign(element.style, style);
91
+ Object.keys(attributes).forEach(function (name) {
92
+ var value = attributes[name];
93
+
94
+ if (value === false) {
95
+ element.removeAttribute(name);
96
+ } else {
97
+ element.setAttribute(name, value === true ? '' : value);
98
+ }
99
+ });
100
+ });
101
+ }
102
+
103
+ function effect$2(_ref2) {
104
+ var state = _ref2.state;
105
+ var initialStyles = {
106
+ popper: {
107
+ position: state.options.strategy,
108
+ left: '0',
109
+ top: '0',
110
+ margin: '0'
111
+ },
112
+ arrow: {
113
+ position: 'absolute'
114
+ },
115
+ reference: {}
116
+ };
117
+ Object.assign(state.elements.popper.style, initialStyles.popper);
118
+ state.styles = initialStyles;
119
+
120
+ if (state.elements.arrow) {
121
+ Object.assign(state.elements.arrow.style, initialStyles.arrow);
122
+ }
123
+
124
+ return function () {
125
+ Object.keys(state.elements).forEach(function (name) {
126
+ var element = state.elements[name];
127
+ var attributes = state.attributes[name] || {};
128
+ var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them
129
+
130
+ var style = styleProperties.reduce(function (style, property) {
131
+ style[property] = '';
132
+ return style;
133
+ }, {}); // arrow is optional + virtual elements
134
+
135
+ if (!isHTMLElement(element) || !getNodeName(element)) {
136
+ return;
137
+ }
138
+
139
+ Object.assign(element.style, style);
140
+ Object.keys(attributes).forEach(function (attribute) {
141
+ element.removeAttribute(attribute);
142
+ });
143
+ });
144
+ };
145
+ } // eslint-disable-next-line import/no-unused-modules
146
+
147
+
148
+ const applyStyles$1 = {
149
+ name: 'applyStyles',
150
+ enabled: true,
151
+ phase: 'write',
152
+ fn: applyStyles,
153
+ effect: effect$2,
154
+ requires: ['computeStyles']
155
+ };
156
+
157
+ function getBasePlacement(placement) {
158
+ return placement.split('-')[0];
159
+ }
160
+
161
+ var max = Math.max;
162
+ var min = Math.min;
163
+ var round = Math.round;
164
+
165
+ function getUAString() {
166
+ var uaData = navigator.userAgentData;
167
+
168
+ if (uaData != null && uaData.brands) {
169
+ return uaData.brands.map(function (item) {
170
+ return item.brand + "/" + item.version;
171
+ }).join(' ');
172
+ }
173
+
174
+ return navigator.userAgent;
175
+ }
176
+
177
+ function isLayoutViewport() {
178
+ return !/^((?!chrome|android).)*safari/i.test(getUAString());
179
+ }
180
+
181
+ function getBoundingClientRect(element, includeScale, isFixedStrategy) {
182
+ if (includeScale === void 0) {
183
+ includeScale = false;
184
+ }
185
+
186
+ if (isFixedStrategy === void 0) {
187
+ isFixedStrategy = false;
188
+ }
189
+
190
+ var clientRect = element.getBoundingClientRect();
191
+ var scaleX = 1;
192
+ var scaleY = 1;
193
+
194
+ if (includeScale && isHTMLElement(element)) {
195
+ scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
196
+ scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
197
+ }
198
+
199
+ var _ref = isElement(element) ? getWindow(element) : window,
200
+ visualViewport = _ref.visualViewport;
201
+
202
+ var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
203
+ var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
204
+ var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;
205
+ var width = clientRect.width / scaleX;
206
+ var height = clientRect.height / scaleY;
207
+ return {
208
+ width: width,
209
+ height: height,
210
+ top: y,
211
+ right: x + width,
212
+ bottom: y + height,
213
+ left: x,
214
+ x: x,
215
+ y: y
216
+ };
217
+ }
218
+
219
+ // means it doesn't take into account transforms.
220
+
221
+ function getLayoutRect(element) {
222
+ var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.
223
+ // Fixes https://github.com/popperjs/popper-core/issues/1223
224
+
225
+ var width = element.offsetWidth;
226
+ var height = element.offsetHeight;
227
+
228
+ if (Math.abs(clientRect.width - width) <= 1) {
229
+ width = clientRect.width;
230
+ }
231
+
232
+ if (Math.abs(clientRect.height - height) <= 1) {
233
+ height = clientRect.height;
234
+ }
235
+
236
+ return {
237
+ x: element.offsetLeft,
238
+ y: element.offsetTop,
239
+ width: width,
240
+ height: height
241
+ };
242
+ }
243
+
244
+ function contains(parent, child) {
245
+ var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method
246
+
247
+ if (parent.contains(child)) {
248
+ return true;
249
+ } // then fallback to custom implementation with Shadow DOM support
250
+ else if (rootNode && isShadowRoot(rootNode)) {
251
+ var next = child;
252
+
253
+ do {
254
+ if (next && parent.isSameNode(next)) {
255
+ return true;
256
+ } // $FlowFixMe[prop-missing]: need a better way to handle this...
257
+
258
+
259
+ next = next.parentNode || next.host;
260
+ } while (next);
261
+ } // Give up, the result is false
262
+
263
+
264
+ return false;
265
+ }
266
+
267
+ function getComputedStyle(element) {
268
+ return getWindow(element).getComputedStyle(element);
269
+ }
270
+
271
+ function isTableElement(element) {
272
+ return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;
273
+ }
274
+
275
+ function getDocumentElement(element) {
276
+ // $FlowFixMe[incompatible-return]: assume body is always available
277
+ return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]
278
+ element.document) || window.document).documentElement;
279
+ }
280
+
281
+ function getParentNode(element) {
282
+ if (getNodeName(element) === 'html') {
283
+ return element;
284
+ }
285
+
286
+ return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle
287
+ // $FlowFixMe[incompatible-return]
288
+ // $FlowFixMe[prop-missing]
289
+ element.assignedSlot || // step into the shadow DOM of the parent of a slotted node
290
+ element.parentNode || ( // DOM Element detected
291
+ isShadowRoot(element) ? element.host : null) || // ShadowRoot detected
292
+ // $FlowFixMe[incompatible-call]: HTMLElement is a Node
293
+ getDocumentElement(element) // fallback
294
+
295
+ );
296
+ }
297
+
298
+ function getTrueOffsetParent(element) {
299
+ if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837
300
+ getComputedStyle(element).position === 'fixed') {
301
+ return null;
302
+ }
303
+
304
+ return element.offsetParent;
305
+ } // `.offsetParent` reports `null` for fixed elements, while absolute elements
306
+ // return the containing block
307
+
308
+
309
+ function getContainingBlock(element) {
310
+ var isFirefox = /firefox/i.test(getUAString());
311
+ var isIE = /Trident/i.test(getUAString());
312
+
313
+ if (isIE && isHTMLElement(element)) {
314
+ // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
315
+ var elementCss = getComputedStyle(element);
316
+
317
+ if (elementCss.position === 'fixed') {
318
+ return null;
319
+ }
320
+ }
321
+
322
+ var currentNode = getParentNode(element);
323
+
324
+ if (isShadowRoot(currentNode)) {
325
+ currentNode = currentNode.host;
326
+ }
327
+
328
+ while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
329
+ var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that
330
+ // create a containing block.
331
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
332
+
333
+ if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {
334
+ return currentNode;
335
+ } else {
336
+ currentNode = currentNode.parentNode;
337
+ }
338
+ }
339
+
340
+ return null;
341
+ } // Gets the closest ancestor positioned element. Handles some edge cases,
342
+ // such as table ancestors and cross browser bugs.
343
+
344
+
345
+ function getOffsetParent(element) {
346
+ var window = getWindow(element);
347
+ var offsetParent = getTrueOffsetParent(element);
348
+
349
+ while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {
350
+ offsetParent = getTrueOffsetParent(offsetParent);
351
+ }
352
+
353
+ if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {
354
+ return window;
355
+ }
356
+
357
+ return offsetParent || getContainingBlock(element) || window;
358
+ }
359
+
360
+ function getMainAxisFromPlacement(placement) {
361
+ return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
362
+ }
363
+
364
+ function within(min$1, value, max$1) {
365
+ return max(min$1, min(value, max$1));
366
+ }
367
+ function withinMaxClamp(min, value, max) {
368
+ var v = within(min, value, max);
369
+ return v > max ? max : v;
370
+ }
371
+
372
+ function getFreshSideObject() {
373
+ return {
374
+ top: 0,
375
+ right: 0,
376
+ bottom: 0,
377
+ left: 0
378
+ };
379
+ }
380
+
381
+ function mergePaddingObject(paddingObject) {
382
+ return Object.assign({}, getFreshSideObject(), paddingObject);
383
+ }
384
+
385
+ function expandToHashMap(value, keys) {
386
+ return keys.reduce(function (hashMap, key) {
387
+ hashMap[key] = value;
388
+ return hashMap;
389
+ }, {});
390
+ }
391
+
392
+ var toPaddingObject = function toPaddingObject(padding, state) {
393
+ padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {
394
+ placement: state.placement
395
+ })) : padding;
396
+ return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
397
+ };
398
+
399
+ function arrow(_ref) {
400
+ var _state$modifiersData$;
401
+
402
+ var state = _ref.state,
403
+ name = _ref.name,
404
+ options = _ref.options;
405
+ var arrowElement = state.elements.arrow;
406
+ var popperOffsets = state.modifiersData.popperOffsets;
407
+ var basePlacement = getBasePlacement(state.placement);
408
+ var axis = getMainAxisFromPlacement(basePlacement);
409
+ var isVertical = [left, right].indexOf(basePlacement) >= 0;
410
+ var len = isVertical ? 'height' : 'width';
411
+
412
+ if (!arrowElement || !popperOffsets) {
413
+ return;
414
+ }
415
+
416
+ var paddingObject = toPaddingObject(options.padding, state);
417
+ var arrowRect = getLayoutRect(arrowElement);
418
+ var minProp = axis === 'y' ? top : left;
419
+ var maxProp = axis === 'y' ? bottom : right;
420
+ var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];
421
+ var startDiff = popperOffsets[axis] - state.rects.reference[axis];
422
+ var arrowOffsetParent = getOffsetParent(arrowElement);
423
+ var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
424
+ var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is
425
+ // outside of the popper bounds
426
+
427
+ var min = paddingObject[minProp];
428
+ var max = clientSize - arrowRect[len] - paddingObject[maxProp];
429
+ var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;
430
+ var offset = within(min, center, max); // Prevents breaking syntax highlighting...
431
+
432
+ var axisProp = axis;
433
+ state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);
434
+ }
435
+
436
+ function effect$1(_ref2) {
437
+ var state = _ref2.state,
438
+ options = _ref2.options;
439
+ var _options$element = options.element,
440
+ arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;
441
+
442
+ if (arrowElement == null) {
443
+ return;
444
+ } // CSS selector
445
+
446
+
447
+ if (typeof arrowElement === 'string') {
448
+ arrowElement = state.elements.popper.querySelector(arrowElement);
449
+
450
+ if (!arrowElement) {
451
+ return;
452
+ }
453
+ }
454
+
455
+ if (!contains(state.elements.popper, arrowElement)) {
456
+
457
+ return;
458
+ }
459
+
460
+ state.elements.arrow = arrowElement;
461
+ } // eslint-disable-next-line import/no-unused-modules
462
+
463
+
464
+ const arrow$1 = {
465
+ name: 'arrow',
466
+ enabled: true,
467
+ phase: 'main',
468
+ fn: arrow,
469
+ effect: effect$1,
470
+ requires: ['popperOffsets'],
471
+ requiresIfExists: ['preventOverflow']
472
+ };
473
+
474
+ function getVariation(placement) {
475
+ return placement.split('-')[1];
476
+ }
477
+
478
+ var unsetSides = {
479
+ top: 'auto',
480
+ right: 'auto',
481
+ bottom: 'auto',
482
+ left: 'auto'
483
+ }; // Round the offsets to the nearest suitable subpixel based on the DPR.
484
+ // Zooming can change the DPR, but it seems to report a value that will
485
+ // cleanly divide the values into the appropriate subpixels.
486
+
487
+ function roundOffsetsByDPR(_ref) {
488
+ var x = _ref.x,
489
+ y = _ref.y;
490
+ var win = window;
491
+ var dpr = win.devicePixelRatio || 1;
492
+ return {
493
+ x: round(x * dpr) / dpr || 0,
494
+ y: round(y * dpr) / dpr || 0
495
+ };
496
+ }
497
+
498
+ function mapToStyles(_ref2) {
499
+ var _Object$assign2;
500
+
501
+ var popper = _ref2.popper,
502
+ popperRect = _ref2.popperRect,
503
+ placement = _ref2.placement,
504
+ variation = _ref2.variation,
505
+ offsets = _ref2.offsets,
506
+ position = _ref2.position,
507
+ gpuAcceleration = _ref2.gpuAcceleration,
508
+ adaptive = _ref2.adaptive,
509
+ roundOffsets = _ref2.roundOffsets,
510
+ isFixed = _ref2.isFixed;
511
+ var _offsets$x = offsets.x,
512
+ x = _offsets$x === void 0 ? 0 : _offsets$x,
513
+ _offsets$y = offsets.y,
514
+ y = _offsets$y === void 0 ? 0 : _offsets$y;
515
+
516
+ var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({
517
+ x: x,
518
+ y: y
519
+ }) : {
520
+ x: x,
521
+ y: y
522
+ };
523
+
524
+ x = _ref3.x;
525
+ y = _ref3.y;
526
+ var hasX = offsets.hasOwnProperty('x');
527
+ var hasY = offsets.hasOwnProperty('y');
528
+ var sideX = left;
529
+ var sideY = top;
530
+ var win = window;
531
+
532
+ if (adaptive) {
533
+ var offsetParent = getOffsetParent(popper);
534
+ var heightProp = 'clientHeight';
535
+ var widthProp = 'clientWidth';
536
+
537
+ if (offsetParent === getWindow(popper)) {
538
+ offsetParent = getDocumentElement(popper);
539
+
540
+ if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {
541
+ heightProp = 'scrollHeight';
542
+ widthProp = 'scrollWidth';
543
+ }
544
+ } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it
545
+
546
+
547
+ offsetParent = offsetParent;
548
+
549
+ if (placement === top || (placement === left || placement === right) && variation === end) {
550
+ sideY = bottom;
551
+ var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
552
+ offsetParent[heightProp];
553
+ y -= offsetY - popperRect.height;
554
+ y *= gpuAcceleration ? 1 : -1;
555
+ }
556
+
557
+ if (placement === left || (placement === top || placement === bottom) && variation === end) {
558
+ sideX = right;
559
+ var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
560
+ offsetParent[widthProp];
561
+ x -= offsetX - popperRect.width;
562
+ x *= gpuAcceleration ? 1 : -1;
563
+ }
564
+ }
565
+
566
+ var commonStyles = Object.assign({
567
+ position: position
568
+ }, adaptive && unsetSides);
569
+
570
+ var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
571
+ x: x,
572
+ y: y
573
+ }) : {
574
+ x: x,
575
+ y: y
576
+ };
577
+
578
+ x = _ref4.x;
579
+ y = _ref4.y;
580
+
581
+ if (gpuAcceleration) {
582
+ var _Object$assign;
583
+
584
+ return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
585
+ }
586
+
587
+ return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
588
+ }
589
+
590
+ function computeStyles(_ref5) {
591
+ var state = _ref5.state,
592
+ options = _ref5.options;
593
+ var _options$gpuAccelerat = options.gpuAcceleration,
594
+ gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
595
+ _options$adaptive = options.adaptive,
596
+ adaptive = _options$adaptive === void 0 ? true : _options$adaptive,
597
+ _options$roundOffsets = options.roundOffsets,
598
+ roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
599
+
600
+ var commonStyles = {
601
+ placement: getBasePlacement(state.placement),
602
+ variation: getVariation(state.placement),
603
+ popper: state.elements.popper,
604
+ popperRect: state.rects.popper,
605
+ gpuAcceleration: gpuAcceleration,
606
+ isFixed: state.options.strategy === 'fixed'
607
+ };
608
+
609
+ if (state.modifiersData.popperOffsets != null) {
610
+ state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {
611
+ offsets: state.modifiersData.popperOffsets,
612
+ position: state.options.strategy,
613
+ adaptive: adaptive,
614
+ roundOffsets: roundOffsets
615
+ })));
616
+ }
617
+
618
+ if (state.modifiersData.arrow != null) {
619
+ state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {
620
+ offsets: state.modifiersData.arrow,
621
+ position: 'absolute',
622
+ adaptive: false,
623
+ roundOffsets: roundOffsets
624
+ })));
625
+ }
626
+
627
+ state.attributes.popper = Object.assign({}, state.attributes.popper, {
628
+ 'data-popper-placement': state.placement
629
+ });
630
+ } // eslint-disable-next-line import/no-unused-modules
631
+
632
+
633
+ const computeStyles$1 = {
634
+ name: 'computeStyles',
635
+ enabled: true,
636
+ phase: 'beforeWrite',
637
+ fn: computeStyles,
638
+ data: {}
639
+ };
640
+
641
+ var passive = {
642
+ passive: true
643
+ };
644
+
645
+ function effect(_ref) {
646
+ var state = _ref.state,
647
+ instance = _ref.instance,
648
+ options = _ref.options;
649
+ var _options$scroll = options.scroll,
650
+ scroll = _options$scroll === void 0 ? true : _options$scroll,
651
+ _options$resize = options.resize,
652
+ resize = _options$resize === void 0 ? true : _options$resize;
653
+ var window = getWindow(state.elements.popper);
654
+ var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);
655
+
656
+ if (scroll) {
657
+ scrollParents.forEach(function (scrollParent) {
658
+ scrollParent.addEventListener('scroll', instance.update, passive);
659
+ });
660
+ }
661
+
662
+ if (resize) {
663
+ window.addEventListener('resize', instance.update, passive);
664
+ }
665
+
666
+ return function () {
667
+ if (scroll) {
668
+ scrollParents.forEach(function (scrollParent) {
669
+ scrollParent.removeEventListener('scroll', instance.update, passive);
670
+ });
671
+ }
672
+
673
+ if (resize) {
674
+ window.removeEventListener('resize', instance.update, passive);
675
+ }
676
+ };
677
+ } // eslint-disable-next-line import/no-unused-modules
678
+
679
+
680
+ const eventListeners = {
681
+ name: 'eventListeners',
682
+ enabled: true,
683
+ phase: 'write',
684
+ fn: function fn() {},
685
+ effect: effect,
686
+ data: {}
687
+ };
688
+
689
+ var hash$1 = {
690
+ left: 'right',
691
+ right: 'left',
692
+ bottom: 'top',
693
+ top: 'bottom'
694
+ };
695
+ function getOppositePlacement(placement) {
696
+ return placement.replace(/left|right|bottom|top/g, function (matched) {
697
+ return hash$1[matched];
698
+ });
699
+ }
700
+
701
+ var hash = {
702
+ start: 'end',
703
+ end: 'start'
704
+ };
705
+ function getOppositeVariationPlacement(placement) {
706
+ return placement.replace(/start|end/g, function (matched) {
707
+ return hash[matched];
708
+ });
709
+ }
710
+
711
+ function getWindowScroll(node) {
712
+ var win = getWindow(node);
713
+ var scrollLeft = win.pageXOffset;
714
+ var scrollTop = win.pageYOffset;
715
+ return {
716
+ scrollLeft: scrollLeft,
717
+ scrollTop: scrollTop
718
+ };
719
+ }
720
+
721
+ function getWindowScrollBarX(element) {
722
+ // If <html> has a CSS width greater than the viewport, then this will be
723
+ // incorrect for RTL.
724
+ // Popper 1 is broken in this case and never had a bug report so let's assume
725
+ // it's not an issue. I don't think anyone ever specifies width on <html>
726
+ // anyway.
727
+ // Browsers where the left scrollbar doesn't cause an issue report `0` for
728
+ // this (e.g. Edge 2019, IE11, Safari)
729
+ return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
730
+ }
731
+
732
+ function getViewportRect(element, strategy) {
733
+ var win = getWindow(element);
734
+ var html = getDocumentElement(element);
735
+ var visualViewport = win.visualViewport;
736
+ var width = html.clientWidth;
737
+ var height = html.clientHeight;
738
+ var x = 0;
739
+ var y = 0;
740
+
741
+ if (visualViewport) {
742
+ width = visualViewport.width;
743
+ height = visualViewport.height;
744
+ var layoutViewport = isLayoutViewport();
745
+
746
+ if (layoutViewport || !layoutViewport && strategy === 'fixed') {
747
+ x = visualViewport.offsetLeft;
748
+ y = visualViewport.offsetTop;
749
+ }
750
+ }
751
+
752
+ return {
753
+ width: width,
754
+ height: height,
755
+ x: x + getWindowScrollBarX(element),
756
+ y: y
757
+ };
758
+ }
759
+
760
+ // of the `<html>` and `<body>` rect bounds if horizontally scrollable
761
+
762
+ function getDocumentRect(element) {
763
+ var _element$ownerDocumen;
764
+
765
+ var html = getDocumentElement(element);
766
+ var winScroll = getWindowScroll(element);
767
+ var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
768
+ var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
769
+ var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
770
+ var x = -winScroll.scrollLeft + getWindowScrollBarX(element);
771
+ var y = -winScroll.scrollTop;
772
+
773
+ if (getComputedStyle(body || html).direction === 'rtl') {
774
+ x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
775
+ }
776
+
777
+ return {
778
+ width: width,
779
+ height: height,
780
+ x: x,
781
+ y: y
782
+ };
783
+ }
784
+
785
+ function isScrollParent(element) {
786
+ // Firefox wants us to check `-x` and `-y` variations as well
787
+ var _getComputedStyle = getComputedStyle(element),
788
+ overflow = _getComputedStyle.overflow,
789
+ overflowX = _getComputedStyle.overflowX,
790
+ overflowY = _getComputedStyle.overflowY;
791
+
792
+ return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
793
+ }
794
+
795
+ function getScrollParent(node) {
796
+ if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {
797
+ // $FlowFixMe[incompatible-return]: assume body is always available
798
+ return node.ownerDocument.body;
799
+ }
800
+
801
+ if (isHTMLElement(node) && isScrollParent(node)) {
802
+ return node;
803
+ }
804
+
805
+ return getScrollParent(getParentNode(node));
806
+ }
807
+
808
+ /*
809
+ given a DOM element, return the list of all scroll parents, up the list of ancesors
810
+ until we get to the top window object. This list is what we attach scroll listeners
811
+ to, because if any of these parent elements scroll, we'll need to re-calculate the
812
+ reference element's position.
813
+ */
814
+
815
+ function listScrollParents(element, list) {
816
+ var _element$ownerDocumen;
817
+
818
+ if (list === void 0) {
819
+ list = [];
820
+ }
821
+
822
+ var scrollParent = getScrollParent(element);
823
+ var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);
824
+ var win = getWindow(scrollParent);
825
+ var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;
826
+ var updatedList = list.concat(target);
827
+ return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
828
+ updatedList.concat(listScrollParents(getParentNode(target)));
829
+ }
830
+
831
+ function rectToClientRect(rect) {
832
+ return Object.assign({}, rect, {
833
+ left: rect.x,
834
+ top: rect.y,
835
+ right: rect.x + rect.width,
836
+ bottom: rect.y + rect.height
837
+ });
838
+ }
839
+
840
+ function getInnerBoundingClientRect(element, strategy) {
841
+ var rect = getBoundingClientRect(element, false, strategy === 'fixed');
842
+ rect.top = rect.top + element.clientTop;
843
+ rect.left = rect.left + element.clientLeft;
844
+ rect.bottom = rect.top + element.clientHeight;
845
+ rect.right = rect.left + element.clientWidth;
846
+ rect.width = element.clientWidth;
847
+ rect.height = element.clientHeight;
848
+ rect.x = rect.left;
849
+ rect.y = rect.top;
850
+ return rect;
851
+ }
852
+
853
+ function getClientRectFromMixedType(element, clippingParent, strategy) {
854
+ return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
855
+ } // A "clipping parent" is an overflowable container with the characteristic of
856
+ // clipping (or hiding) overflowing elements with a position different from
857
+ // `initial`
858
+
859
+
860
+ function getClippingParents(element) {
861
+ var clippingParents = listScrollParents(getParentNode(element));
862
+ var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;
863
+ var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
864
+
865
+ if (!isElement(clipperElement)) {
866
+ return [];
867
+ } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414
868
+
869
+
870
+ return clippingParents.filter(function (clippingParent) {
871
+ return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
872
+ });
873
+ } // Gets the maximum area that the element is visible in due to any number of
874
+ // clipping parents
875
+
876
+
877
+ function getClippingRect(element, boundary, rootBoundary, strategy) {
878
+ var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);
879
+ var clippingParents = [].concat(mainClippingParents, [rootBoundary]);
880
+ var firstClippingParent = clippingParents[0];
881
+ var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {
882
+ var rect = getClientRectFromMixedType(element, clippingParent, strategy);
883
+ accRect.top = max(rect.top, accRect.top);
884
+ accRect.right = min(rect.right, accRect.right);
885
+ accRect.bottom = min(rect.bottom, accRect.bottom);
886
+ accRect.left = max(rect.left, accRect.left);
887
+ return accRect;
888
+ }, getClientRectFromMixedType(element, firstClippingParent, strategy));
889
+ clippingRect.width = clippingRect.right - clippingRect.left;
890
+ clippingRect.height = clippingRect.bottom - clippingRect.top;
891
+ clippingRect.x = clippingRect.left;
892
+ clippingRect.y = clippingRect.top;
893
+ return clippingRect;
894
+ }
895
+
896
+ function computeOffsets(_ref) {
897
+ var reference = _ref.reference,
898
+ element = _ref.element,
899
+ placement = _ref.placement;
900
+ var basePlacement = placement ? getBasePlacement(placement) : null;
901
+ var variation = placement ? getVariation(placement) : null;
902
+ var commonX = reference.x + reference.width / 2 - element.width / 2;
903
+ var commonY = reference.y + reference.height / 2 - element.height / 2;
904
+ var offsets;
905
+
906
+ switch (basePlacement) {
907
+ case top:
908
+ offsets = {
909
+ x: commonX,
910
+ y: reference.y - element.height
911
+ };
912
+ break;
913
+
914
+ case bottom:
915
+ offsets = {
916
+ x: commonX,
917
+ y: reference.y + reference.height
918
+ };
919
+ break;
920
+
921
+ case right:
922
+ offsets = {
923
+ x: reference.x + reference.width,
924
+ y: commonY
925
+ };
926
+ break;
927
+
928
+ case left:
929
+ offsets = {
930
+ x: reference.x - element.width,
931
+ y: commonY
932
+ };
933
+ break;
934
+
935
+ default:
936
+ offsets = {
937
+ x: reference.x,
938
+ y: reference.y
939
+ };
940
+ }
941
+
942
+ var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;
943
+
944
+ if (mainAxis != null) {
945
+ var len = mainAxis === 'y' ? 'height' : 'width';
946
+
947
+ switch (variation) {
948
+ case start:
949
+ offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);
950
+ break;
951
+
952
+ case end:
953
+ offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);
954
+ break;
955
+ }
956
+ }
957
+
958
+ return offsets;
959
+ }
960
+
961
+ function detectOverflow(state, options) {
962
+ if (options === void 0) {
963
+ options = {};
964
+ }
965
+
966
+ var _options = options,
967
+ _options$placement = _options.placement,
968
+ placement = _options$placement === void 0 ? state.placement : _options$placement,
969
+ _options$strategy = _options.strategy,
970
+ strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,
971
+ _options$boundary = _options.boundary,
972
+ boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,
973
+ _options$rootBoundary = _options.rootBoundary,
974
+ rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,
975
+ _options$elementConte = _options.elementContext,
976
+ elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,
977
+ _options$altBoundary = _options.altBoundary,
978
+ altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,
979
+ _options$padding = _options.padding,
980
+ padding = _options$padding === void 0 ? 0 : _options$padding;
981
+ var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
982
+ var altContext = elementContext === popper ? reference : popper;
983
+ var popperRect = state.rects.popper;
984
+ var element = state.elements[altBoundary ? altContext : elementContext];
985
+ var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);
986
+ var referenceClientRect = getBoundingClientRect(state.elements.reference);
987
+ var popperOffsets = computeOffsets({
988
+ reference: referenceClientRect,
989
+ element: popperRect,
990
+ strategy: 'absolute',
991
+ placement: placement
992
+ });
993
+ var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));
994
+ var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect
995
+ // 0 or negative = within the clipping rect
996
+
997
+ var overflowOffsets = {
998
+ top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
999
+ bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
1000
+ left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
1001
+ right: elementClientRect.right - clippingClientRect.right + paddingObject.right
1002
+ };
1003
+ var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element
1004
+
1005
+ if (elementContext === popper && offsetData) {
1006
+ var offset = offsetData[placement];
1007
+ Object.keys(overflowOffsets).forEach(function (key) {
1008
+ var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;
1009
+ var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';
1010
+ overflowOffsets[key] += offset[axis] * multiply;
1011
+ });
1012
+ }
1013
+
1014
+ return overflowOffsets;
1015
+ }
1016
+
1017
+ function computeAutoPlacement(state, options) {
1018
+ if (options === void 0) {
1019
+ options = {};
1020
+ }
1021
+
1022
+ var _options = options,
1023
+ placement = _options.placement,
1024
+ boundary = _options.boundary,
1025
+ rootBoundary = _options.rootBoundary,
1026
+ padding = _options.padding,
1027
+ flipVariations = _options.flipVariations,
1028
+ _options$allowedAutoP = _options.allowedAutoPlacements,
1029
+ allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP;
1030
+ var variation = getVariation(placement);
1031
+ var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {
1032
+ return getVariation(placement) === variation;
1033
+ }) : basePlacements;
1034
+ var allowedPlacements = placements$1.filter(function (placement) {
1035
+ return allowedAutoPlacements.indexOf(placement) >= 0;
1036
+ });
1037
+
1038
+ if (allowedPlacements.length === 0) {
1039
+ allowedPlacements = placements$1;
1040
+ } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...
1041
+
1042
+
1043
+ var overflows = allowedPlacements.reduce(function (acc, placement) {
1044
+ acc[placement] = detectOverflow(state, {
1045
+ placement: placement,
1046
+ boundary: boundary,
1047
+ rootBoundary: rootBoundary,
1048
+ padding: padding
1049
+ })[getBasePlacement(placement)];
1050
+ return acc;
1051
+ }, {});
1052
+ return Object.keys(overflows).sort(function (a, b) {
1053
+ return overflows[a] - overflows[b];
1054
+ });
1055
+ }
1056
+
1057
+ function getExpandedFallbackPlacements(placement) {
1058
+ if (getBasePlacement(placement) === auto) {
1059
+ return [];
1060
+ }
1061
+
1062
+ var oppositePlacement = getOppositePlacement(placement);
1063
+ return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];
1064
+ }
1065
+
1066
+ function flip(_ref) {
1067
+ var state = _ref.state,
1068
+ options = _ref.options,
1069
+ name = _ref.name;
1070
+
1071
+ if (state.modifiersData[name]._skip) {
1072
+ return;
1073
+ }
1074
+
1075
+ var _options$mainAxis = options.mainAxis,
1076
+ checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
1077
+ _options$altAxis = options.altAxis,
1078
+ checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,
1079
+ specifiedFallbackPlacements = options.fallbackPlacements,
1080
+ padding = options.padding,
1081
+ boundary = options.boundary,
1082
+ rootBoundary = options.rootBoundary,
1083
+ altBoundary = options.altBoundary,
1084
+ _options$flipVariatio = options.flipVariations,
1085
+ flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,
1086
+ allowedAutoPlacements = options.allowedAutoPlacements;
1087
+ var preferredPlacement = state.options.placement;
1088
+ var basePlacement = getBasePlacement(preferredPlacement);
1089
+ var isBasePlacement = basePlacement === preferredPlacement;
1090
+ var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));
1091
+ var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {
1092
+ return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {
1093
+ placement: placement,
1094
+ boundary: boundary,
1095
+ rootBoundary: rootBoundary,
1096
+ padding: padding,
1097
+ flipVariations: flipVariations,
1098
+ allowedAutoPlacements: allowedAutoPlacements
1099
+ }) : placement);
1100
+ }, []);
1101
+ var referenceRect = state.rects.reference;
1102
+ var popperRect = state.rects.popper;
1103
+ var checksMap = new Map();
1104
+ var makeFallbackChecks = true;
1105
+ var firstFittingPlacement = placements[0];
1106
+
1107
+ for (var i = 0; i < placements.length; i++) {
1108
+ var placement = placements[i];
1109
+
1110
+ var _basePlacement = getBasePlacement(placement);
1111
+
1112
+ var isStartVariation = getVariation(placement) === start;
1113
+ var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;
1114
+ var len = isVertical ? 'width' : 'height';
1115
+ var overflow = detectOverflow(state, {
1116
+ placement: placement,
1117
+ boundary: boundary,
1118
+ rootBoundary: rootBoundary,
1119
+ altBoundary: altBoundary,
1120
+ padding: padding
1121
+ });
1122
+ var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;
1123
+
1124
+ if (referenceRect[len] > popperRect[len]) {
1125
+ mainVariationSide = getOppositePlacement(mainVariationSide);
1126
+ }
1127
+
1128
+ var altVariationSide = getOppositePlacement(mainVariationSide);
1129
+ var checks = [];
1130
+
1131
+ if (checkMainAxis) {
1132
+ checks.push(overflow[_basePlacement] <= 0);
1133
+ }
1134
+
1135
+ if (checkAltAxis) {
1136
+ checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);
1137
+ }
1138
+
1139
+ if (checks.every(function (check) {
1140
+ return check;
1141
+ })) {
1142
+ firstFittingPlacement = placement;
1143
+ makeFallbackChecks = false;
1144
+ break;
1145
+ }
1146
+
1147
+ checksMap.set(placement, checks);
1148
+ }
1149
+
1150
+ if (makeFallbackChecks) {
1151
+ // `2` may be desired in some cases – research later
1152
+ var numberOfChecks = flipVariations ? 3 : 1;
1153
+
1154
+ var _loop = function _loop(_i) {
1155
+ var fittingPlacement = placements.find(function (placement) {
1156
+ var checks = checksMap.get(placement);
1157
+
1158
+ if (checks) {
1159
+ return checks.slice(0, _i).every(function (check) {
1160
+ return check;
1161
+ });
1162
+ }
1163
+ });
1164
+
1165
+ if (fittingPlacement) {
1166
+ firstFittingPlacement = fittingPlacement;
1167
+ return "break";
1168
+ }
1169
+ };
1170
+
1171
+ for (var _i = numberOfChecks; _i > 0; _i--) {
1172
+ var _ret = _loop(_i);
1173
+
1174
+ if (_ret === "break") break;
1175
+ }
1176
+ }
1177
+
1178
+ if (state.placement !== firstFittingPlacement) {
1179
+ state.modifiersData[name]._skip = true;
1180
+ state.placement = firstFittingPlacement;
1181
+ state.reset = true;
1182
+ }
1183
+ } // eslint-disable-next-line import/no-unused-modules
1184
+
1185
+
1186
+ const flip$1 = {
1187
+ name: 'flip',
1188
+ enabled: true,
1189
+ phase: 'main',
1190
+ fn: flip,
1191
+ requiresIfExists: ['offset'],
1192
+ data: {
1193
+ _skip: false
1194
+ }
1195
+ };
1196
+
1197
+ function getSideOffsets(overflow, rect, preventedOffsets) {
1198
+ if (preventedOffsets === void 0) {
1199
+ preventedOffsets = {
1200
+ x: 0,
1201
+ y: 0
1202
+ };
1203
+ }
1204
+
1205
+ return {
1206
+ top: overflow.top - rect.height - preventedOffsets.y,
1207
+ right: overflow.right - rect.width + preventedOffsets.x,
1208
+ bottom: overflow.bottom - rect.height + preventedOffsets.y,
1209
+ left: overflow.left - rect.width - preventedOffsets.x
1210
+ };
1211
+ }
1212
+
1213
+ function isAnySideFullyClipped(overflow) {
1214
+ return [top, right, bottom, left].some(function (side) {
1215
+ return overflow[side] >= 0;
1216
+ });
1217
+ }
1218
+
1219
+ function hide(_ref) {
1220
+ var state = _ref.state,
1221
+ name = _ref.name;
1222
+ var referenceRect = state.rects.reference;
1223
+ var popperRect = state.rects.popper;
1224
+ var preventedOffsets = state.modifiersData.preventOverflow;
1225
+ var referenceOverflow = detectOverflow(state, {
1226
+ elementContext: 'reference'
1227
+ });
1228
+ var popperAltOverflow = detectOverflow(state, {
1229
+ altBoundary: true
1230
+ });
1231
+ var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);
1232
+ var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);
1233
+ var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);
1234
+ var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);
1235
+ state.modifiersData[name] = {
1236
+ referenceClippingOffsets: referenceClippingOffsets,
1237
+ popperEscapeOffsets: popperEscapeOffsets,
1238
+ isReferenceHidden: isReferenceHidden,
1239
+ hasPopperEscaped: hasPopperEscaped
1240
+ };
1241
+ state.attributes.popper = Object.assign({}, state.attributes.popper, {
1242
+ 'data-popper-reference-hidden': isReferenceHidden,
1243
+ 'data-popper-escaped': hasPopperEscaped
1244
+ });
1245
+ } // eslint-disable-next-line import/no-unused-modules
1246
+
1247
+
1248
+ const hide$1 = {
1249
+ name: 'hide',
1250
+ enabled: true,
1251
+ phase: 'main',
1252
+ requiresIfExists: ['preventOverflow'],
1253
+ fn: hide
1254
+ };
1255
+
1256
+ function distanceAndSkiddingToXY(placement, rects, offset) {
1257
+ var basePlacement = getBasePlacement(placement);
1258
+ var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;
1259
+
1260
+ var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {
1261
+ placement: placement
1262
+ })) : offset,
1263
+ skidding = _ref[0],
1264
+ distance = _ref[1];
1265
+
1266
+ skidding = skidding || 0;
1267
+ distance = (distance || 0) * invertDistance;
1268
+ return [left, right].indexOf(basePlacement) >= 0 ? {
1269
+ x: distance,
1270
+ y: skidding
1271
+ } : {
1272
+ x: skidding,
1273
+ y: distance
1274
+ };
1275
+ }
1276
+
1277
+ function offset(_ref2) {
1278
+ var state = _ref2.state,
1279
+ options = _ref2.options,
1280
+ name = _ref2.name;
1281
+ var _options$offset = options.offset,
1282
+ offset = _options$offset === void 0 ? [0, 0] : _options$offset;
1283
+ var data = placements.reduce(function (acc, placement) {
1284
+ acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);
1285
+ return acc;
1286
+ }, {});
1287
+ var _data$state$placement = data[state.placement],
1288
+ x = _data$state$placement.x,
1289
+ y = _data$state$placement.y;
1290
+
1291
+ if (state.modifiersData.popperOffsets != null) {
1292
+ state.modifiersData.popperOffsets.x += x;
1293
+ state.modifiersData.popperOffsets.y += y;
1294
+ }
1295
+
1296
+ state.modifiersData[name] = data;
1297
+ } // eslint-disable-next-line import/no-unused-modules
1298
+
1299
+
1300
+ const offset$1 = {
1301
+ name: 'offset',
1302
+ enabled: true,
1303
+ phase: 'main',
1304
+ requires: ['popperOffsets'],
1305
+ fn: offset
1306
+ };
1307
+
1308
+ function popperOffsets(_ref) {
1309
+ var state = _ref.state,
1310
+ name = _ref.name;
1311
+ // Offsets are the actual position the popper needs to have to be
1312
+ // properly positioned near its reference element
1313
+ // This is the most basic placement, and will be adjusted by
1314
+ // the modifiers in the next step
1315
+ state.modifiersData[name] = computeOffsets({
1316
+ reference: state.rects.reference,
1317
+ element: state.rects.popper,
1318
+ strategy: 'absolute',
1319
+ placement: state.placement
1320
+ });
1321
+ } // eslint-disable-next-line import/no-unused-modules
1322
+
1323
+
1324
+ const popperOffsets$1 = {
1325
+ name: 'popperOffsets',
1326
+ enabled: true,
1327
+ phase: 'read',
1328
+ fn: popperOffsets,
1329
+ data: {}
1330
+ };
1331
+
1332
+ function getAltAxis(axis) {
1333
+ return axis === 'x' ? 'y' : 'x';
1334
+ }
1335
+
1336
+ function preventOverflow(_ref) {
1337
+ var state = _ref.state,
1338
+ options = _ref.options,
1339
+ name = _ref.name;
1340
+ var _options$mainAxis = options.mainAxis,
1341
+ checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
1342
+ _options$altAxis = options.altAxis,
1343
+ checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,
1344
+ boundary = options.boundary,
1345
+ rootBoundary = options.rootBoundary,
1346
+ altBoundary = options.altBoundary,
1347
+ padding = options.padding,
1348
+ _options$tether = options.tether,
1349
+ tether = _options$tether === void 0 ? true : _options$tether,
1350
+ _options$tetherOffset = options.tetherOffset,
1351
+ tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;
1352
+ var overflow = detectOverflow(state, {
1353
+ boundary: boundary,
1354
+ rootBoundary: rootBoundary,
1355
+ padding: padding,
1356
+ altBoundary: altBoundary
1357
+ });
1358
+ var basePlacement = getBasePlacement(state.placement);
1359
+ var variation = getVariation(state.placement);
1360
+ var isBasePlacement = !variation;
1361
+ var mainAxis = getMainAxisFromPlacement(basePlacement);
1362
+ var altAxis = getAltAxis(mainAxis);
1363
+ var popperOffsets = state.modifiersData.popperOffsets;
1364
+ var referenceRect = state.rects.reference;
1365
+ var popperRect = state.rects.popper;
1366
+ var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
1367
+ placement: state.placement
1368
+ })) : tetherOffset;
1369
+ var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {
1370
+ mainAxis: tetherOffsetValue,
1371
+ altAxis: tetherOffsetValue
1372
+ } : Object.assign({
1373
+ mainAxis: 0,
1374
+ altAxis: 0
1375
+ }, tetherOffsetValue);
1376
+ var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
1377
+ var data = {
1378
+ x: 0,
1379
+ y: 0
1380
+ };
1381
+
1382
+ if (!popperOffsets) {
1383
+ return;
1384
+ }
1385
+
1386
+ if (checkMainAxis) {
1387
+ var _offsetModifierState$;
1388
+
1389
+ var mainSide = mainAxis === 'y' ? top : left;
1390
+ var altSide = mainAxis === 'y' ? bottom : right;
1391
+ var len = mainAxis === 'y' ? 'height' : 'width';
1392
+ var offset = popperOffsets[mainAxis];
1393
+ var min$1 = offset + overflow[mainSide];
1394
+ var max$1 = offset - overflow[altSide];
1395
+ var additive = tether ? -popperRect[len] / 2 : 0;
1396
+ var minLen = variation === start ? referenceRect[len] : popperRect[len];
1397
+ var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
1398
+ // outside the reference bounds
1399
+
1400
+ var arrowElement = state.elements.arrow;
1401
+ var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {
1402
+ width: 0,
1403
+ height: 0
1404
+ };
1405
+ var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();
1406
+ var arrowPaddingMin = arrowPaddingObject[mainSide];
1407
+ var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want
1408
+ // to include its full size in the calculation. If the reference is small
1409
+ // and near the edge of a boundary, the popper can overflow even if the
1410
+ // reference is not overflowing as well (e.g. virtual elements with no
1411
+ // width or height)
1412
+
1413
+ var arrowLen = within(0, referenceRect[len], arrowRect[len]);
1414
+ var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
1415
+ var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
1416
+ var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
1417
+ var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
1418
+ var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
1419
+ var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
1420
+ var tetherMax = offset + maxOffset - offsetModifierValue;
1421
+ var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
1422
+ popperOffsets[mainAxis] = preventedOffset;
1423
+ data[mainAxis] = preventedOffset - offset;
1424
+ }
1425
+
1426
+ if (checkAltAxis) {
1427
+ var _offsetModifierState$2;
1428
+
1429
+ var _mainSide = mainAxis === 'x' ? top : left;
1430
+
1431
+ var _altSide = mainAxis === 'x' ? bottom : right;
1432
+
1433
+ var _offset = popperOffsets[altAxis];
1434
+
1435
+ var _len = altAxis === 'y' ? 'height' : 'width';
1436
+
1437
+ var _min = _offset + overflow[_mainSide];
1438
+
1439
+ var _max = _offset - overflow[_altSide];
1440
+
1441
+ var isOriginSide = [top, left].indexOf(basePlacement) !== -1;
1442
+
1443
+ var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
1444
+
1445
+ var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
1446
+
1447
+ var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
1448
+
1449
+ var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
1450
+
1451
+ popperOffsets[altAxis] = _preventedOffset;
1452
+ data[altAxis] = _preventedOffset - _offset;
1453
+ }
1454
+
1455
+ state.modifiersData[name] = data;
1456
+ } // eslint-disable-next-line import/no-unused-modules
1457
+
1458
+
1459
+ const preventOverflow$1 = {
1460
+ name: 'preventOverflow',
1461
+ enabled: true,
1462
+ phase: 'main',
1463
+ fn: preventOverflow,
1464
+ requiresIfExists: ['offset']
1465
+ };
1466
+
1467
+ function getHTMLElementScroll(element) {
1468
+ return {
1469
+ scrollLeft: element.scrollLeft,
1470
+ scrollTop: element.scrollTop
1471
+ };
1472
+ }
1473
+
1474
+ function getNodeScroll(node) {
1475
+ if (node === getWindow(node) || !isHTMLElement(node)) {
1476
+ return getWindowScroll(node);
1477
+ } else {
1478
+ return getHTMLElementScroll(node);
1479
+ }
1480
+ }
1481
+
1482
+ function isElementScaled(element) {
1483
+ var rect = element.getBoundingClientRect();
1484
+ var scaleX = round(rect.width) / element.offsetWidth || 1;
1485
+ var scaleY = round(rect.height) / element.offsetHeight || 1;
1486
+ return scaleX !== 1 || scaleY !== 1;
1487
+ } // Returns the composite rect of an element relative to its offsetParent.
1488
+ // Composite means it takes into account transforms as well as layout.
1489
+
1490
+
1491
+ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
1492
+ if (isFixed === void 0) {
1493
+ isFixed = false;
1494
+ }
1495
+
1496
+ var isOffsetParentAnElement = isHTMLElement(offsetParent);
1497
+ var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
1498
+ var documentElement = getDocumentElement(offsetParent);
1499
+ var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);
1500
+ var scroll = {
1501
+ scrollLeft: 0,
1502
+ scrollTop: 0
1503
+ };
1504
+ var offsets = {
1505
+ x: 0,
1506
+ y: 0
1507
+ };
1508
+
1509
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
1510
+ if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078
1511
+ isScrollParent(documentElement)) {
1512
+ scroll = getNodeScroll(offsetParent);
1513
+ }
1514
+
1515
+ if (isHTMLElement(offsetParent)) {
1516
+ offsets = getBoundingClientRect(offsetParent, true);
1517
+ offsets.x += offsetParent.clientLeft;
1518
+ offsets.y += offsetParent.clientTop;
1519
+ } else if (documentElement) {
1520
+ offsets.x = getWindowScrollBarX(documentElement);
1521
+ }
1522
+ }
1523
+
1524
+ return {
1525
+ x: rect.left + scroll.scrollLeft - offsets.x,
1526
+ y: rect.top + scroll.scrollTop - offsets.y,
1527
+ width: rect.width,
1528
+ height: rect.height
1529
+ };
1530
+ }
1531
+
1532
+ function order(modifiers) {
1533
+ var map = new Map();
1534
+ var visited = new Set();
1535
+ var result = [];
1536
+ modifiers.forEach(function (modifier) {
1537
+ map.set(modifier.name, modifier);
1538
+ }); // On visiting object, check for its dependencies and visit them recursively
1539
+
1540
+ function sort(modifier) {
1541
+ visited.add(modifier.name);
1542
+ var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
1543
+ requires.forEach(function (dep) {
1544
+ if (!visited.has(dep)) {
1545
+ var depModifier = map.get(dep);
1546
+
1547
+ if (depModifier) {
1548
+ sort(depModifier);
1549
+ }
1550
+ }
1551
+ });
1552
+ result.push(modifier);
1553
+ }
1554
+
1555
+ modifiers.forEach(function (modifier) {
1556
+ if (!visited.has(modifier.name)) {
1557
+ // check for visited object
1558
+ sort(modifier);
1559
+ }
1560
+ });
1561
+ return result;
1562
+ }
1563
+
1564
+ function orderModifiers(modifiers) {
1565
+ // order based on dependencies
1566
+ var orderedModifiers = order(modifiers); // order based on phase
1567
+
1568
+ return modifierPhases.reduce(function (acc, phase) {
1569
+ return acc.concat(orderedModifiers.filter(function (modifier) {
1570
+ return modifier.phase === phase;
1571
+ }));
1572
+ }, []);
1573
+ }
1574
+
1575
+ function debounce(fn) {
1576
+ var pending;
1577
+ return function () {
1578
+ if (!pending) {
1579
+ pending = new Promise(function (resolve) {
1580
+ Promise.resolve().then(function () {
1581
+ pending = undefined;
1582
+ resolve(fn());
1583
+ });
1584
+ });
1585
+ }
1586
+
1587
+ return pending;
1588
+ };
1589
+ }
1590
+
1591
+ function mergeByName(modifiers) {
1592
+ var merged = modifiers.reduce(function (merged, current) {
1593
+ var existing = merged[current.name];
1594
+ merged[current.name] = existing ? Object.assign({}, existing, current, {
1595
+ options: Object.assign({}, existing.options, current.options),
1596
+ data: Object.assign({}, existing.data, current.data)
1597
+ }) : current;
1598
+ return merged;
1599
+ }, {}); // IE11 does not support Object.values
1600
+
1601
+ return Object.keys(merged).map(function (key) {
1602
+ return merged[key];
1603
+ });
1604
+ }
1605
+
1606
+ var DEFAULT_OPTIONS = {
1607
+ placement: 'bottom',
1608
+ modifiers: [],
1609
+ strategy: 'absolute'
1610
+ };
1611
+
1612
+ function areValidElements() {
1613
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1614
+ args[_key] = arguments[_key];
1615
+ }
1616
+
1617
+ return !args.some(function (element) {
1618
+ return !(element && typeof element.getBoundingClientRect === 'function');
1619
+ });
1620
+ }
1621
+
1622
+ function popperGenerator(generatorOptions) {
1623
+ if (generatorOptions === void 0) {
1624
+ generatorOptions = {};
1625
+ }
1626
+
1627
+ var _generatorOptions = generatorOptions,
1628
+ _generatorOptions$def = _generatorOptions.defaultModifiers,
1629
+ defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,
1630
+ _generatorOptions$def2 = _generatorOptions.defaultOptions,
1631
+ defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
1632
+ return function createPopper(reference, popper, options) {
1633
+ if (options === void 0) {
1634
+ options = defaultOptions;
1635
+ }
1636
+
1637
+ var state = {
1638
+ placement: 'bottom',
1639
+ orderedModifiers: [],
1640
+ options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),
1641
+ modifiersData: {},
1642
+ elements: {
1643
+ reference: reference,
1644
+ popper: popper
1645
+ },
1646
+ attributes: {},
1647
+ styles: {}
1648
+ };
1649
+ var effectCleanupFns = [];
1650
+ var isDestroyed = false;
1651
+ var instance = {
1652
+ state: state,
1653
+ setOptions: function setOptions(setOptionsAction) {
1654
+ var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;
1655
+ cleanupModifierEffects();
1656
+ state.options = Object.assign({}, defaultOptions, state.options, options);
1657
+ state.scrollParents = {
1658
+ reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
1659
+ popper: listScrollParents(popper)
1660
+ }; // Orders the modifiers based on their dependencies and `phase`
1661
+ // properties
1662
+
1663
+ var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers
1664
+
1665
+ state.orderedModifiers = orderedModifiers.filter(function (m) {
1666
+ return m.enabled;
1667
+ }); // Validate the provided modifiers so that the consumer will get warned
1668
+
1669
+ runModifierEffects();
1670
+ return instance.update();
1671
+ },
1672
+ // Sync update – it will always be executed, even if not necessary. This
1673
+ // is useful for low frequency updates where sync behavior simplifies the
1674
+ // logic.
1675
+ // For high frequency updates (e.g. `resize` and `scroll` events), always
1676
+ // prefer the async Popper#update method
1677
+ forceUpdate: function forceUpdate() {
1678
+ if (isDestroyed) {
1679
+ return;
1680
+ }
1681
+
1682
+ var _state$elements = state.elements,
1683
+ reference = _state$elements.reference,
1684
+ popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements
1685
+ // anymore
1686
+
1687
+ if (!areValidElements(reference, popper)) {
1688
+
1689
+ return;
1690
+ } // Store the reference and popper rects to be read by modifiers
1691
+
1692
+
1693
+ state.rects = {
1694
+ reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),
1695
+ popper: getLayoutRect(popper)
1696
+ }; // Modifiers have the ability to reset the current update cycle. The
1697
+ // most common use case for this is the `flip` modifier changing the
1698
+ // placement, which then needs to re-run all the modifiers, because the
1699
+ // logic was previously ran for the previous placement and is therefore
1700
+ // stale/incorrect
1701
+
1702
+ state.reset = false;
1703
+ state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier
1704
+ // is filled with the initial data specified by the modifier. This means
1705
+ // it doesn't persist and is fresh on each update.
1706
+ // To ensure persistent data, use `${name}#persistent`
1707
+
1708
+ state.orderedModifiers.forEach(function (modifier) {
1709
+ return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
1710
+ });
1711
+
1712
+ for (var index = 0; index < state.orderedModifiers.length; index++) {
1713
+
1714
+ if (state.reset === true) {
1715
+ state.reset = false;
1716
+ index = -1;
1717
+ continue;
1718
+ }
1719
+
1720
+ var _state$orderedModifie = state.orderedModifiers[index],
1721
+ fn = _state$orderedModifie.fn,
1722
+ _state$orderedModifie2 = _state$orderedModifie.options,
1723
+ _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,
1724
+ name = _state$orderedModifie.name;
1725
+
1726
+ if (typeof fn === 'function') {
1727
+ state = fn({
1728
+ state: state,
1729
+ options: _options,
1730
+ name: name,
1731
+ instance: instance
1732
+ }) || state;
1733
+ }
1734
+ }
1735
+ },
1736
+ // Async and optimistically optimized update – it will not be executed if
1737
+ // not necessary (debounced to run at most once-per-tick)
1738
+ update: debounce(function () {
1739
+ return new Promise(function (resolve) {
1740
+ instance.forceUpdate();
1741
+ resolve(state);
1742
+ });
1743
+ }),
1744
+ destroy: function destroy() {
1745
+ cleanupModifierEffects();
1746
+ isDestroyed = true;
1747
+ }
1748
+ };
1749
+
1750
+ if (!areValidElements(reference, popper)) {
1751
+
1752
+ return instance;
1753
+ }
1754
+
1755
+ instance.setOptions(options).then(function (state) {
1756
+ if (!isDestroyed && options.onFirstUpdate) {
1757
+ options.onFirstUpdate(state);
1758
+ }
1759
+ }); // Modifiers have the ability to execute arbitrary code before the first
1760
+ // update cycle runs. They will be executed in the same order as the update
1761
+ // cycle. This is useful when a modifier adds some persistent data that
1762
+ // other modifiers need to use, but the modifier is run after the dependent
1763
+ // one.
1764
+
1765
+ function runModifierEffects() {
1766
+ state.orderedModifiers.forEach(function (_ref3) {
1767
+ var name = _ref3.name,
1768
+ _ref3$options = _ref3.options,
1769
+ options = _ref3$options === void 0 ? {} : _ref3$options,
1770
+ effect = _ref3.effect;
1771
+
1772
+ if (typeof effect === 'function') {
1773
+ var cleanupFn = effect({
1774
+ state: state,
1775
+ name: name,
1776
+ instance: instance,
1777
+ options: options
1778
+ });
1779
+
1780
+ var noopFn = function noopFn() {};
1781
+
1782
+ effectCleanupFns.push(cleanupFn || noopFn);
1783
+ }
1784
+ });
1785
+ }
1786
+
1787
+ function cleanupModifierEffects() {
1788
+ effectCleanupFns.forEach(function (fn) {
1789
+ return fn();
1790
+ });
1791
+ effectCleanupFns = [];
1792
+ }
1793
+
1794
+ return instance;
1795
+ };
1796
+ }
1797
+
1798
+ var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1];
1799
+ var createPopper = /*#__PURE__*/popperGenerator({
1800
+ defaultModifiers: defaultModifiers
1801
+ }); // eslint-disable-next-line import/no-unused-modules
5
1802
 
6
1803
  const icTooltipCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host(.ic-tooltip) .ic-tooltip-container{background-color:var(--ic-architectural-800);color:#ffff;text-align:center;padding:var(--ic-space-xxxs) 0.625rem;border-radius:var(--ic-border-radius);position:absolute;max-width:20rem;display:none;z-index:var(--ic-z-index-tooltip);box-shadow:var(--ic-elevation-overlay)}:host(.tooltip-navigation-item:not(.tooltip-navigation-item-side-nav-collapsed)) .ic-tooltip-container,:host(.tooltip-disabled) .ic-tooltip-container{display:none !important}:host(.tooltip-long-label-navigation-item-side-nav-expanded) .ic-tooltip-container[data-show]{display:block !important}:host(.ic-tooltip) .ic-tooltip-arrow,:host(.ic-tooltip) .ic-tooltip-arrow::before{position:absolute;background:inherit;width:var(--ic-space-md);height:var(--ic-space-md)}:host(.ic-tooltip) .ic-tooltip-arrow{visibility:hidden}:host(.ic-tooltip) .ic-tooltip-arrow::before{visibility:visible;content:\"\"}:host(.ic-tooltip) .ic-tooltip-container[data-show]{display:block}:host(.ic-tooltip) .ic-tooltip-container[data-popper-placement^=\"top\"]>.ic-tooltip-arrow{bottom:calc(-1 * var(--ic-space-md))}:host(.ic-tooltip) .ic-tooltip-container[data-popper-placement^=\"top\"]>.ic-tooltip-arrow::before{border-radius:0 0 var(--ic-border-radius) var(--ic-border-radius);left:0;height:var(--ic-space-xxs)}:host(.ic-tooltip) .ic-tooltip-container[data-popper-placement^=\"bottom\"]>.ic-tooltip-arrow{top:calc(-1 * var(--ic-space-xxs))}:host(.ic-tooltip) .ic-tooltip-container[data-popper-placement^=\"bottom\"]>.ic-tooltip-arrow::before{border-radius:var(--ic-border-radius) var(--ic-border-radius) 0 0;left:0;height:var(--ic-space-xxs)}:host(.ic-tooltip) .ic-tooltip-container[data-popper-placement^=\"left\"]>.ic-tooltip-arrow{right:var(--ic-space-xxxs)}:host(.ic-tooltip) .ic-tooltip-container[data-popper-placement^=\"left\"]>.ic-tooltip-arrow::before{border-radius:0 var(--ic-border-radius) var(--ic-border-radius) 0}:host(.ic-tooltip) .ic-tooltip-container[data-popper-placement^=\"right\"]>.ic-tooltip-arrow{left:-0.875rem}:host(.ic-tooltip) .ic-tooltip-container[data-popper-placement^=\"right\"]>.ic-tooltip-arrow::before{border-radius:var(--ic-border-radius) 0 0 var(--ic-border-radius)}@media (forced-colors: active){:host(.ic-tooltip) .ic-tooltip-container{border:var(--ic-hc-border)}}";
7
1804
 
8
- const Tooltip = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
1805
+ const Tooltip = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
9
1806
  constructor() {
10
1807
  super();
11
1808
  this.__registerHost();
@@ -16,6 +1813,7 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
16
1813
  : ["mouseenter", "focusin"];
17
1814
  this.instantHideEvents = ["focusout"];
18
1815
  this.delayedHideEvents = ["mouseleave"];
1816
+ this.persistTooltip = false;
19
1817
  this.show = (popper) => {
20
1818
  this.toolTip.setAttribute("data-show", "");
21
1819
  popper.setOptions((options) => (Object.assign(Object.assign({}, options), { modifiers: [
@@ -30,10 +1828,11 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
30
1828
  ...options.modifiers,
31
1829
  { name: "eventListeners", enabled: false },
32
1830
  ] })));
1831
+ this.persistTooltip = false;
33
1832
  };
34
1833
  this.checkCloseTooltip = (popper) => {
35
1834
  setTimeout(() => {
36
- if (!this.mouseOverTool) {
1835
+ if (!this.mouseOverTool && !this.persistTooltip) {
37
1836
  this.hide(popper);
38
1837
  }
39
1838
  }, 100);
@@ -46,7 +1845,7 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
46
1845
  this.checkCloseTooltip(popper);
47
1846
  };
48
1847
  this.handleKeyDown = (key) => {
49
- if (key === "Escape") {
1848
+ if (key === "Escape" && !this.persistTooltip) {
50
1849
  this.hide(this.popperInstance);
51
1850
  }
52
1851
  };
@@ -59,7 +1858,7 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
59
1858
  }
60
1859
  });
61
1860
  this.instantHideEvents.forEach((event) => {
62
- this.el[method](event, () => this.hide(this.popperInstance));
1861
+ this.el[method](event, () => !this.persistTooltip && this.hide(this.popperInstance));
63
1862
  });
64
1863
  this.delayedHideEvents.forEach((event) => {
65
1864
  this.el[method](event, () => this.checkCloseTooltip(this.popperInstance));
@@ -88,6 +1887,15 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
88
1887
  describedBySpan.innerText = newValue;
89
1888
  }
90
1889
  }
1890
+ /**
1891
+ * Method to programmatically show/hide the tooltip without needing to interact with an anchor element
1892
+ * @param show Whether to show or hide the tooltip
1893
+ * @param persistTooltip Whether the tooltip should stay on the screen when actions are performed that would previously dismiss the tooltip, such as on hover
1894
+ */
1895
+ async displayTooltip(show, persistTooltip) {
1896
+ this.persistTooltip = persistTooltip;
1897
+ show ? this.show(this.popperInstance) : this.hide(this.popperInstance);
1898
+ }
91
1899
  componentDidLoad() {
92
1900
  this.popperInstance = createPopper(this.el, this.toolTip, {
93
1901
  placement: this.placement,
@@ -133,7 +1941,8 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
133
1941
  "target": [513],
134
1942
  "placement": [1],
135
1943
  "label": [1],
136
- "disableHover": [4, "disable-hover"]
1944
+ "disableHover": [4, "disable-hover"],
1945
+ "displayTooltip": [64]
137
1946
  }]);
138
1947
  function defineCustomElement() {
139
1948
  if (typeof customElements === "undefined") {
@@ -154,6 +1963,6 @@ function defineCustomElement() {
154
1963
  } });
155
1964
  }
156
1965
 
157
- export { Tooltip as T, defineCustomElement as d };
1966
+ export { Tooltip as T, createPopper as c, defineCustomElement as d };
158
1967
 
159
1968
  //# sourceMappingURL=ic-tooltip2.js.map