@siemens/ix 1.3.0 → 1.4.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (536) hide show
  1. package/dist/cjs/alignment-51e20690.js +13 -0
  2. package/dist/cjs/{animation-dfe01edc.js → animation-d5cc0bec.js} +1 -1
  3. package/dist/cjs/{base-button-6ef79cb6.js → base-button-497db257.js} +1 -1
  4. package/dist/cjs/context-a0900b95.js +75 -0
  5. package/dist/cjs/{default-tree-item-4597cd84.js → default-tree-item-89cd1f3f.js} +1 -1
  6. package/dist/cjs/{flip-tile-state-c95639e5.js → flip-tile-state-b5ff5ea0.js} +1 -1
  7. package/dist/cjs/{alignment-24ae2e63.js → floating-ui.dom.esm-9a5d67b2.js} +393 -402
  8. package/dist/cjs/{index-17eb8998.js → index-f4b8e6ee.js} +74 -1
  9. package/dist/cjs/index.cjs.js +13 -13
  10. package/dist/cjs/ix-animated-tab_2.cjs.entry.js +3 -3
  11. package/dist/cjs/ix-application-header.cjs.entry.js +26 -3
  12. package/dist/cjs/ix-basic-navigation.cjs.entry.js +17 -3
  13. package/dist/cjs/ix-blind.cjs.entry.js +2 -2
  14. package/dist/cjs/ix-breadcrumb_2.cjs.entry.js +2 -2
  15. package/dist/cjs/ix-burger-menu.cjs.entry.js +22 -0
  16. package/dist/cjs/ix-button.cjs.entry.js +4 -4
  17. package/dist/cjs/ix-category-filter.cjs.entry.js +86 -117
  18. package/dist/cjs/ix-chip.cjs.entry.js +1 -1
  19. package/dist/cjs/ix-counter-pill.cjs.entry.js +1 -1
  20. package/dist/cjs/ix-date-picker_2.cjs.entry.js +4 -4
  21. package/dist/cjs/ix-date-time-card.cjs.entry.js +1 -1
  22. package/dist/cjs/ix-datetime-picker.cjs.entry.js +1 -1
  23. package/dist/cjs/ix-divider.cjs.entry.js +19 -0
  24. package/dist/cjs/ix-drawer.cjs.entry.js +1 -1
  25. package/dist/cjs/ix-dropdown-button.cjs.entry.js +6 -4
  26. package/dist/cjs/ix-dropdown-quick-actions.cjs.entry.js +19 -0
  27. package/dist/cjs/ix-dropdown_2.cjs.entry.js +78 -17
  28. package/dist/cjs/ix-event-list_2.cjs.entry.js +4 -4
  29. package/dist/cjs/ix-expanding-search.cjs.entry.js +1 -1
  30. package/dist/cjs/ix-filter-chip.cjs.entry.js +1 -1
  31. package/dist/cjs/ix-flip-tile_2.cjs.entry.js +2 -2
  32. package/dist/cjs/ix-group-context-menu.cjs.entry.js +1 -4
  33. package/dist/cjs/ix-group_3.cjs.entry.js +1 -1
  34. package/dist/cjs/ix-icon-button.cjs.entry.js +2 -2
  35. package/dist/cjs/ix-icon.cjs.entry.js +1 -1
  36. package/dist/cjs/ix-input-group.cjs.entry.js +1 -1
  37. package/dist/cjs/ix-kpi.cjs.entry.js +1 -1
  38. package/dist/cjs/ix-map-navigation_2.cjs.entry.js +2 -2
  39. package/dist/cjs/ix-menu_9.cjs.entry.js +50 -19
  40. package/dist/cjs/ix-message-bar.cjs.entry.js +1 -1
  41. package/dist/cjs/ix-modal-example.cjs.entry.js +2 -2
  42. package/dist/cjs/ix-modal_2.cjs.entry.js +4 -4
  43. package/dist/cjs/ix-pill.cjs.entry.js +1 -1
  44. package/dist/cjs/ix-select_2.cjs.entry.js +1 -1
  45. package/dist/cjs/ix-spinner.cjs.entry.js +1 -1
  46. package/dist/cjs/ix-split-button_2.cjs.entry.js +7 -5
  47. package/dist/cjs/ix-tab-item.cjs.entry.js +2 -2
  48. package/dist/cjs/ix-tabs.cjs.entry.js +12 -5
  49. package/dist/cjs/ix-tile.cjs.entry.js +1 -1
  50. package/dist/cjs/ix-toast_2.cjs.entry.js +10 -6
  51. package/dist/cjs/ix-toggle.cjs.entry.js +2 -2
  52. package/dist/cjs/ix-tooltip.cjs.entry.js +127 -0
  53. package/dist/cjs/ix-tree_2.cjs.entry.js +3 -4
  54. package/dist/cjs/ix-typography.cjs.entry.js +38 -0
  55. package/dist/cjs/ix-upload.cjs.entry.js +2 -2
  56. package/dist/cjs/ix-validation-tooltip.cjs.entry.js +10 -9
  57. package/dist/cjs/ix-workflow-step_2.cjs.entry.js +1 -1
  58. package/dist/cjs/loader.cjs.js +2 -2
  59. package/dist/cjs/{logical-filter-operator-467e2faf.js → logical-filter-operator-0faf70b8.js} +2 -2
  60. package/dist/cjs/{modal-dda2f6be.js → modal-a93045dd.js} +4 -4
  61. package/dist/cjs/{modal-utils-9ee0acda.js → modal-utils-b645989b.js} +1 -1
  62. package/dist/cjs/{mutation-observer-29bedada.js → mutation-observer-eaaa5399.js} +1 -1
  63. package/dist/cjs/my-component.cjs.entry.js +2 -2
  64. package/dist/cjs/{rwd.util-2326824e.js → rwd.util-9480f0b5.js} +1 -1
  65. package/dist/cjs/service-18dc5907.js +73 -0
  66. package/dist/cjs/siemens-ix.cjs.js +2 -2
  67. package/dist/cjs/{theme-switcher-f91c8d8d.js → theme-switcher-67669a35.js} +1 -1
  68. package/dist/cjs/{typed-event-5030cc6a.js → typed-event-f0f051da.js} +1 -1
  69. package/dist/cjs/{upload-file-state-923b2c65.js → upload-file-state-a79acf2b.js} +1 -1
  70. package/dist/collection/collection-manifest.json +5 -0
  71. package/dist/collection/components/animated-tab/animated-tab.css +1 -1
  72. package/dist/collection/components/animated-tab/animated-tab.js +1 -1
  73. package/dist/collection/components/animated-tabs/animated-tabs.css +4 -4
  74. package/dist/collection/components/animated-tabs/animated-tabs.js +1 -1
  75. package/dist/collection/components/application-header/application-header.css +11 -2
  76. package/dist/collection/components/application-header/application-header.js +31 -2
  77. package/dist/collection/components/basic-navigation/basic-navigation.css +6 -1
  78. package/dist/collection/components/basic-navigation/basic-navigation.js +21 -3
  79. package/dist/collection/components/blind/blind.css +5 -6
  80. package/dist/collection/components/blind/blind.js +1 -1
  81. package/dist/collection/components/breadcrumb/breadcrumb.css +4 -4
  82. package/dist/collection/components/breadcrumb/breadcrumb.js +1 -1
  83. package/dist/collection/components/breadcrumb-item/breadcrumb-item.css +1 -1
  84. package/dist/collection/components/breadcrumb-item/breadcrumb-item.js +1 -1
  85. package/dist/collection/components/button/base-button.js +1 -1
  86. package/dist/collection/components/{utils → button}/button-variants.js +0 -0
  87. package/dist/collection/components/button/button.css +7 -2
  88. package/dist/collection/components/button/button.js +3 -3
  89. package/dist/collection/components/category-filter/category-filter.css +37 -50
  90. package/dist/collection/components/category-filter/category-filter.js +86 -132
  91. package/dist/collection/components/category-filter/filter-state.js +1 -1
  92. package/dist/collection/components/category-filter/input-state.js +1 -1
  93. package/dist/collection/components/category-filter/logical-filter-operator.js +1 -1
  94. package/dist/collection/components/chip/chip.css +4 -4
  95. package/dist/collection/components/chip/chip.js +1 -1
  96. package/dist/collection/components/counter-pill/counter-pill.css +7 -7
  97. package/dist/collection/components/counter-pill/counter-pill.js +1 -1
  98. package/dist/collection/components/date-picker/date-picker.css +2 -2
  99. package/dist/collection/components/date-picker/date-picker.js +4 -4
  100. package/dist/collection/components/date-time-card/date-time-card.css +2 -2
  101. package/dist/collection/components/date-time-card/date-time-card.js +1 -1
  102. package/dist/collection/components/datetime-picker/datetime-picker.css +2 -2
  103. package/dist/collection/components/datetime-picker/datetime-picker.js +1 -1
  104. package/dist/collection/components/divider/divider.css +16 -0
  105. package/dist/collection/components/divider/divider.js +29 -0
  106. package/dist/collection/components/drawer/drawer.css +3 -3
  107. package/dist/collection/components/drawer/drawer.js +1 -1
  108. package/dist/collection/components/dropdown/dropdown-trigger-event.js +1 -0
  109. package/dist/collection/components/dropdown/dropdown.css +6 -6
  110. package/dist/collection/components/dropdown/dropdown.js +96 -10
  111. package/dist/collection/components/dropdown-button/dropdown-button.css +15 -7
  112. package/dist/collection/components/dropdown-button/dropdown-button.js +6 -4
  113. package/dist/collection/components/dropdown-item/dropdown-item.css +13 -4
  114. package/dist/collection/components/dropdown-item/dropdown-item.js +1 -1
  115. package/dist/collection/components/dropdown-quick-actions/dropdown-quick-actions.css +36 -0
  116. package/dist/collection/components/dropdown-quick-actions/dropdown-quick-actions.js +29 -0
  117. package/dist/collection/components/event-list/event-list.css +1 -1
  118. package/dist/collection/components/event-list/event-list.js +1 -1
  119. package/dist/collection/components/event-list-item/event-list-item.css +8 -4
  120. package/dist/collection/components/event-list-item/event-list-item.js +1 -1
  121. package/dist/collection/components/expanding-search/expanding-search.css +4 -4
  122. package/dist/collection/components/expanding-search/expanding-search.js +1 -1
  123. package/dist/collection/components/filter-chip/filter-chip.css +4 -4
  124. package/dist/collection/components/filter-chip/filter-chip.js +1 -1
  125. package/dist/collection/components/flip-tile/flip-tile-state.js +1 -1
  126. package/dist/collection/components/flip-tile/flip-tile.css +4 -4
  127. package/dist/collection/components/flip-tile/flip-tile.js +1 -1
  128. package/dist/collection/components/flip-tile-content/flip-tile-content.css +1 -1
  129. package/dist/collection/components/flip-tile-content/flip-tile-content.js +1 -1
  130. package/dist/collection/components/group/group-context-menu.css +1 -1
  131. package/dist/collection/components/group/group-context-menu.js +1 -4
  132. package/dist/collection/components/group/group.css +5 -5
  133. package/dist/collection/components/group/group.js +1 -1
  134. package/dist/collection/components/group-dropdown-item/group-dropdown-item.css +1 -1
  135. package/dist/collection/components/group-dropdown-item/group-dropdown-item.js +1 -1
  136. package/dist/collection/components/group-item/group-item.css +5 -5
  137. package/dist/collection/components/group-item/group-item.js +1 -1
  138. package/dist/collection/components/icon/icon.css +2 -2
  139. package/dist/collection/components/icon/icon.js +1 -1
  140. package/dist/collection/components/icon-button/icon-button.css +1 -1
  141. package/dist/collection/components/icon-button/icon-button.js +1 -1
  142. package/dist/collection/components/input-group/input-group.css +1 -1
  143. package/dist/collection/components/input-group/input-group.js +1 -1
  144. package/dist/collection/components/kpi/kpi.css +5 -5
  145. package/dist/collection/components/kpi/kpi.js +1 -1
  146. package/dist/collection/components/map-navigation/map-navigation.css +6 -5
  147. package/dist/collection/components/map-navigation/map-navigation.js +1 -1
  148. package/dist/collection/components/map-navigation-overlay/map-navigation-overlay.css +5 -5
  149. package/dist/collection/components/map-navigation-overlay/map-navigation-overlay.js +1 -1
  150. package/dist/collection/components/menu/burger-menu.css +85 -0
  151. package/dist/collection/components/menu/burger-menu.js +64 -0
  152. package/dist/collection/components/menu/menu.css +20 -37
  153. package/dist/collection/components/menu/menu.js +27 -11
  154. package/dist/collection/components/menu-about/menu-about.css +4 -4
  155. package/dist/collection/components/menu-about/menu-about.js +1 -1
  156. package/dist/collection/components/menu-about-item/menu-about-item.css +1 -1
  157. package/dist/collection/components/menu-about-item/menu-about-item.js +1 -1
  158. package/dist/collection/components/menu-about-news/menu-about-news.css +13 -17
  159. package/dist/collection/components/menu-about-news/menu-about-news.js +2 -2
  160. package/dist/collection/components/menu-avatar/menu-avatar.css +17 -5
  161. package/dist/collection/components/menu-avatar/menu-avatar.js +52 -3
  162. package/dist/collection/components/menu-avatar-item/menu-avatar-item.css +1 -1
  163. package/dist/collection/components/menu-avatar-item/menu-avatar-item.js +1 -1
  164. package/dist/collection/components/menu-item/menu-item.css +27 -27
  165. package/dist/collection/components/menu-item/menu-item.js +2 -1
  166. package/dist/collection/components/menu-settings/menu-settings.css +4 -4
  167. package/dist/collection/components/menu-settings/menu-settings.js +1 -1
  168. package/dist/collection/components/menu-settings-item/menu-settings-item.css +1 -1
  169. package/dist/collection/components/menu-settings-item/menu-settings-item.js +1 -1
  170. package/dist/collection/components/message-bar/message-bar.css +3 -3
  171. package/dist/collection/components/message-bar/message-bar.js +1 -1
  172. package/dist/collection/components/modal/modal-utils.js +1 -1
  173. package/dist/collection/components/modal/modal.css +2 -2
  174. package/dist/collection/components/modal/modal.js +1 -1
  175. package/dist/collection/components/modal-container/modal-container.css +1 -1
  176. package/dist/collection/components/modal-container/modal-container.js +1 -1
  177. package/dist/collection/components/my-component/example-modal.js +1 -1
  178. package/dist/collection/components/my-component/my-component.css +3 -3
  179. package/dist/collection/components/my-component/my-component.js +1 -1
  180. package/dist/collection/components/pill/pill.css +4 -4
  181. package/dist/collection/components/pill/pill.js +1 -1
  182. package/dist/collection/components/select/select.css +5 -5
  183. package/dist/collection/components/select/select.js +1 -1
  184. package/dist/collection/components/select-item/select-item.css +1 -1
  185. package/dist/collection/components/select-item/select-item.js +1 -1
  186. package/dist/collection/components/spinner/spinner.css +1 -1
  187. package/dist/collection/components/spinner/spinner.js +1 -1
  188. package/dist/collection/components/split-button/split-button.css +20 -2
  189. package/dist/collection/components/split-button/split-button.js +6 -4
  190. package/dist/collection/components/split-button-item/split-button-item.css +1 -1
  191. package/dist/collection/components/split-button-item/split-button-item.js +1 -1
  192. package/dist/collection/components/tab-item/tab-item.css +5 -7
  193. package/dist/collection/components/tab-item/tab-item.js +1 -1
  194. package/dist/collection/components/tabs/tabs.css +4 -3
  195. package/dist/collection/components/tabs/tabs.js +13 -4
  196. package/dist/collection/components/tile/tile.css +3 -3
  197. package/dist/collection/components/tile/tile.js +1 -1
  198. package/dist/collection/components/time-picker/time-picker.css +2 -2
  199. package/dist/collection/components/time-picker/time-picker.js +1 -1
  200. package/dist/collection/components/toast/toast-container.js +1 -1
  201. package/dist/collection/components/toast/toast-utils.js +1 -1
  202. package/dist/collection/components/toast/toast.css +4 -4
  203. package/dist/collection/components/toast/toast.js +9 -5
  204. package/dist/collection/components/toggle/toggle.css +5 -4
  205. package/dist/collection/components/toggle/toggle.js +1 -1
  206. package/dist/collection/components/tooltip/tooltip.css +43 -0
  207. package/dist/collection/components/tooltip/tooltip.js +203 -0
  208. package/dist/collection/components/tree/tree.css +1 -1
  209. package/dist/collection/components/tree/tree.js +1 -1
  210. package/dist/collection/components/tree-item/default-tree-item.js +1 -1
  211. package/dist/collection/components/tree-item/tree-item.css +5 -5
  212. package/dist/collection/components/tree-item/tree-item.js +2 -3
  213. package/dist/collection/components/typography/types.js +14 -0
  214. package/dist/collection/components/typography/typography.css +146 -0
  215. package/dist/collection/components/typography/typography.js +63 -0
  216. package/dist/collection/components/upload/upload-file-state.js +1 -1
  217. package/dist/collection/components/upload/upload.css +3 -3
  218. package/dist/collection/components/upload/upload.js +1 -1
  219. package/dist/collection/components/utils/animation.js +1 -1
  220. package/dist/collection/components/utils/menu-service/menu-service.js +53 -0
  221. package/dist/collection/components/utils/mutation-observer.js +1 -1
  222. package/dist/collection/components/utils/rwd.util.js +1 -1
  223. package/dist/collection/components/utils/screen/context.js +29 -0
  224. package/{scss/theme/_define-theme-variable.scss → dist/collection/components/utils/screen/index.js} +2 -5
  225. package/dist/collection/components/utils/screen/mode.js +36 -0
  226. package/dist/collection/components/utils/screen/service.js +45 -0
  227. package/dist/collection/components/utils/typed-event.js +1 -1
  228. package/dist/collection/components/validation-tooltip/validation-tooltip.css +4 -4
  229. package/dist/collection/components/validation-tooltip/validation-tooltip.js +1 -1
  230. package/dist/collection/components/workflow-step/workflow-step.css +2 -2
  231. package/dist/collection/components/workflow-step/workflow-step.js +1 -1
  232. package/dist/collection/components/workflow-steps/workflow-steps.css +2 -2
  233. package/dist/collection/components/workflow-steps/workflow-steps.js +1 -1
  234. package/dist/collection/env.js +1 -1
  235. package/dist/collection/exports.js +2 -1
  236. package/dist/collection/index.js +1 -1
  237. package/dist/collection/tests/utils/test/index.js +9 -0
  238. package/dist/collection/tests/utils/test/matchMedia.mock.js +22 -0
  239. package/dist/collection/tests/utils/test/page.js +29 -0
  240. package/dist/collection/utils/test/index.js +1 -1
  241. package/dist/collection/utils/test/matchMedia.mock.js +22 -0
  242. package/dist/collection/utils/test/page.js +2 -2
  243. package/dist/components/alignment.js +1 -1353
  244. package/dist/components/animation.js +1 -1
  245. package/dist/components/application-header.js +33 -4
  246. package/dist/components/base-button.js +1 -1
  247. package/dist/components/burger-menu.js +35 -0
  248. package/dist/components/button.js +2 -2
  249. package/dist/components/date-picker.js +3 -3
  250. package/dist/components/dropdown-item.js +1 -1
  251. package/dist/components/dropdown.js +71 -9
  252. package/dist/components/floating-ui.dom.esm.js +1355 -0
  253. package/dist/components/group-context-menu.js +0 -3
  254. package/dist/components/index.d.ts +5 -0
  255. package/dist/components/index.js +7 -2
  256. package/dist/components/ix-basic-navigation.js +25 -5
  257. package/dist/components/ix-blind.js +1 -1
  258. package/dist/components/ix-burger-menu.d.ts +11 -0
  259. package/dist/components/ix-burger-menu.js +6 -0
  260. package/dist/components/ix-category-filter.js +96 -125
  261. package/dist/components/ix-divider.d.ts +11 -0
  262. package/dist/components/ix-divider.js +33 -0
  263. package/dist/components/ix-dropdown-button.js +5 -3
  264. package/dist/components/ix-dropdown-quick-actions.d.ts +11 -0
  265. package/dist/components/ix-dropdown-quick-actions.js +33 -0
  266. package/dist/components/ix-event-list-item.js +1 -1
  267. package/dist/components/ix-flip-tile.js +1 -1
  268. package/dist/components/ix-map-navigation.js +9 -3
  269. package/dist/components/ix-menu-about-news.js +2 -2
  270. package/dist/components/ix-menu-avatar.js +21 -2
  271. package/dist/components/ix-menu.js +31 -11
  272. package/dist/components/ix-modal-example.js +1 -1
  273. package/dist/components/ix-split-button.js +5 -3
  274. package/dist/components/ix-toggle.js +1 -1
  275. package/dist/components/ix-tooltip.d.ts +11 -0
  276. package/dist/components/ix-tooltip.js +152 -0
  277. package/dist/components/ix-tree.js +1 -1
  278. package/dist/components/ix-typography.d.ts +11 -0
  279. package/dist/components/ix-typography.js +6 -0
  280. package/dist/components/ix-upload.js +1 -1
  281. package/dist/components/ix-validation-tooltip.js +2 -1
  282. package/dist/components/menu-item.js +2 -2
  283. package/dist/components/modal-container.js +1 -1
  284. package/dist/components/mutation-observer.js +1 -1
  285. package/dist/components/my-component.js +1 -1
  286. package/dist/components/rwd.util.js +1 -1
  287. package/dist/components/service.js +139 -0
  288. package/dist/components/tab-item.js +1 -1
  289. package/dist/components/tabs.js +13 -4
  290. package/dist/components/toast.js +8 -4
  291. package/dist/components/tree-item.js +1 -2
  292. package/dist/components/typed-event.js +1 -1
  293. package/dist/components/typography.js +51 -0
  294. package/dist/esm/alignment-6490c552.js +11 -0
  295. package/dist/esm/{animation-b667a4c4.js → animation-268dce50.js} +1 -1
  296. package/dist/esm/{base-button-0b6635df.js → base-button-5bfeb71c.js} +1 -1
  297. package/dist/esm/context-f6a2b727.js +71 -0
  298. package/dist/esm/{default-tree-item-638c435a.js → default-tree-item-91ff2c08.js} +1 -1
  299. package/dist/esm/{flip-tile-state-28a1f8ce.js → flip-tile-state-051bb2fd.js} +1 -1
  300. package/dist/esm/{alignment-f63c1b89.js → floating-ui.dom.esm-e13c649f.js} +394 -402
  301. package/dist/esm/{index-6f4f3582.js → index-6b660a23.js} +74 -1
  302. package/dist/esm/index.js +13 -13
  303. package/dist/esm/ix-animated-tab_2.entry.js +3 -3
  304. package/dist/esm/ix-application-header.entry.js +26 -3
  305. package/dist/esm/ix-basic-navigation.entry.js +17 -3
  306. package/dist/esm/ix-blind.entry.js +2 -2
  307. package/dist/esm/ix-breadcrumb_2.entry.js +2 -2
  308. package/dist/esm/ix-burger-menu.entry.js +18 -0
  309. package/dist/esm/ix-button.entry.js +4 -4
  310. package/dist/esm/ix-category-filter.entry.js +86 -117
  311. package/dist/esm/ix-chip.entry.js +1 -1
  312. package/dist/esm/ix-counter-pill.entry.js +1 -1
  313. package/dist/esm/ix-date-picker_2.entry.js +4 -4
  314. package/dist/esm/ix-date-time-card.entry.js +1 -1
  315. package/dist/esm/ix-datetime-picker.entry.js +1 -1
  316. package/dist/esm/ix-divider.entry.js +15 -0
  317. package/dist/esm/ix-drawer.entry.js +1 -1
  318. package/dist/esm/ix-dropdown-button.entry.js +6 -4
  319. package/dist/esm/ix-dropdown-quick-actions.entry.js +15 -0
  320. package/dist/esm/ix-dropdown_2.entry.js +72 -11
  321. package/dist/esm/ix-event-list_2.entry.js +4 -4
  322. package/dist/esm/ix-expanding-search.entry.js +1 -1
  323. package/dist/esm/ix-filter-chip.entry.js +1 -1
  324. package/dist/esm/ix-flip-tile_2.entry.js +2 -2
  325. package/dist/esm/ix-group-context-menu.entry.js +1 -4
  326. package/dist/esm/ix-group_3.entry.js +1 -1
  327. package/dist/esm/ix-icon-button.entry.js +2 -2
  328. package/dist/esm/ix-icon.entry.js +1 -1
  329. package/dist/esm/ix-input-group.entry.js +1 -1
  330. package/dist/esm/ix-kpi.entry.js +1 -1
  331. package/dist/esm/ix-map-navigation_2.entry.js +2 -2
  332. package/dist/esm/ix-menu_9.entry.js +50 -19
  333. package/dist/esm/ix-message-bar.entry.js +1 -1
  334. package/dist/esm/ix-modal-example.entry.js +2 -2
  335. package/dist/esm/ix-modal_2.entry.js +4 -4
  336. package/dist/esm/ix-pill.entry.js +1 -1
  337. package/dist/esm/ix-select_2.entry.js +1 -1
  338. package/dist/esm/ix-spinner.entry.js +1 -1
  339. package/dist/esm/ix-split-button_2.entry.js +7 -5
  340. package/dist/esm/ix-tab-item.entry.js +2 -2
  341. package/dist/esm/ix-tabs.entry.js +12 -5
  342. package/dist/esm/ix-tile.entry.js +1 -1
  343. package/dist/esm/ix-toast_2.entry.js +10 -6
  344. package/dist/esm/ix-toggle.entry.js +2 -2
  345. package/dist/esm/ix-tooltip.entry.js +123 -0
  346. package/dist/esm/ix-tree_2.entry.js +3 -4
  347. package/dist/esm/ix-typography.entry.js +34 -0
  348. package/dist/esm/ix-upload.entry.js +2 -2
  349. package/dist/esm/ix-validation-tooltip.entry.js +3 -2
  350. package/dist/esm/ix-workflow-step_2.entry.js +1 -1
  351. package/dist/esm/loader.js +2 -2
  352. package/dist/esm/{logical-filter-operator-1bf83315.js → logical-filter-operator-15696001.js} +2 -2
  353. package/dist/esm/{modal-df0a62f2.js → modal-64e18970.js} +4 -4
  354. package/dist/esm/{modal-utils-df50b35a.js → modal-utils-aecbcba5.js} +1 -1
  355. package/dist/esm/{mutation-observer-379959bb.js → mutation-observer-7d01bbea.js} +1 -1
  356. package/dist/esm/my-component.entry.js +2 -2
  357. package/dist/esm/{rwd.util-4a61a4b8.js → rwd.util-cfc2ea72.js} +1 -1
  358. package/dist/esm/service-fc436c5b.js +71 -0
  359. package/dist/esm/siemens-ix.js +2 -2
  360. package/dist/esm/{theme-switcher-9ecc9b69.js → theme-switcher-4b9e5cc2.js} +1 -1
  361. package/dist/esm/{typed-event-ab58c27e.js → typed-event-a230184a.js} +1 -1
  362. package/dist/esm/{upload-file-state-631bb8a2.js → upload-file-state-532a36d3.js} +1 -1
  363. package/dist/siemens-ix/index.esm.js +1 -1
  364. package/dist/siemens-ix/p-06d5ab35.entry.js +1 -0
  365. package/dist/siemens-ix/{p-da2cae32.js → p-076c29d1.js} +0 -0
  366. package/dist/siemens-ix/{p-4b170382.entry.js → p-082bbe13.entry.js} +1 -1
  367. package/dist/siemens-ix/{p-418e2d14.entry.js → p-098e22c3.entry.js} +1 -1
  368. package/dist/siemens-ix/{p-43616759.entry.js → p-0bc4408b.entry.js} +1 -1
  369. package/dist/siemens-ix/p-0bd6554e.entry.js +1 -0
  370. package/dist/siemens-ix/{p-218de283.entry.js → p-0bf4a256.entry.js} +1 -1
  371. package/dist/siemens-ix/{p-7f842cdc.entry.js → p-0d619f3e.entry.js} +1 -1
  372. package/dist/siemens-ix/{p-3663f989.entry.js → p-122cf38d.entry.js} +1 -1
  373. package/dist/siemens-ix/p-1572aab3.js +1 -0
  374. package/dist/siemens-ix/{p-1d30454e.js → p-15bebd8a.js} +0 -0
  375. package/dist/siemens-ix/{p-8a7141a6.entry.js → p-165c6a82.entry.js} +1 -1
  376. package/dist/siemens-ix/{p-e7621b0a.entry.js → p-1d48ce36.entry.js} +1 -1
  377. package/dist/siemens-ix/{p-cc0f6f6b.entry.js → p-20c88582.entry.js} +1 -1
  378. package/dist/siemens-ix/{p-c8cc3bb3.js → p-21aa3602.js} +0 -0
  379. package/dist/siemens-ix/{p-0a12b3df.js → p-2b33ead4.js} +0 -0
  380. package/dist/siemens-ix/{p-d0bb8225.entry.js → p-2e55e255.entry.js} +1 -1
  381. package/dist/siemens-ix/{p-e2925222.entry.js → p-3624a41c.entry.js} +1 -1
  382. package/dist/siemens-ix/{p-bdd294d2.js → p-3b97bb69.js} +0 -0
  383. package/dist/siemens-ix/{p-ea333007.entry.js → p-3cc4df65.entry.js} +1 -1
  384. package/dist/siemens-ix/{p-4fcb5f2b.entry.js → p-404e81d2.entry.js} +1 -1
  385. package/dist/siemens-ix/p-4251a6dd.entry.js +1 -0
  386. package/dist/siemens-ix/p-4b2265fd.entry.js +1 -0
  387. package/dist/siemens-ix/p-529d7530.js +1 -0
  388. package/dist/siemens-ix/{p-eb150313.entry.js → p-560cfce8.entry.js} +1 -1
  389. package/dist/siemens-ix/{p-1c82637e.js → p-56ed024b.js} +0 -0
  390. package/dist/siemens-ix/{p-18d02e6f.entry.js → p-5890faf9.entry.js} +1 -1
  391. package/dist/siemens-ix/{p-b12006c6.js → p-5b39e04e.js} +0 -0
  392. package/dist/siemens-ix/p-5b47360e.entry.js +1 -0
  393. package/dist/siemens-ix/{p-a88618e3.entry.js → p-5ca7b937.entry.js} +1 -1
  394. package/dist/siemens-ix/p-5feec7a4.entry.js +1 -0
  395. package/dist/siemens-ix/p-63776469.entry.js +1 -0
  396. package/dist/siemens-ix/p-66074788.js +2 -0
  397. package/dist/siemens-ix/{p-a5fa7ae5.entry.js → p-6637ae65.entry.js} +1 -1
  398. package/dist/siemens-ix/{p-33283dbf.entry.js → p-67cf5cd4.entry.js} +1 -1
  399. package/dist/siemens-ix/{p-c3e90c06.entry.js → p-6be65050.entry.js} +1 -1
  400. package/dist/siemens-ix/p-6e5543fe.entry.js +1 -0
  401. package/dist/siemens-ix/p-70be8cb8.entry.js +1 -0
  402. package/dist/siemens-ix/p-71c91a11.entry.js +1 -0
  403. package/dist/siemens-ix/{p-b3d00feb.entry.js → p-72cc8632.entry.js} +1 -1
  404. package/dist/siemens-ix/{p-dec6114f.js → p-75abd144.js} +1 -1
  405. package/dist/siemens-ix/p-9269d0e8.entry.js +1 -0
  406. package/dist/siemens-ix/p-94b440bc.entry.js +1 -0
  407. package/dist/siemens-ix/{p-592f1ed3.entry.js → p-9c8c835c.entry.js} +1 -1
  408. package/dist/siemens-ix/{p-8b4e4718.entry.js → p-9eb8347c.entry.js} +1 -1
  409. package/dist/siemens-ix/{p-4944ad0b.js → p-9ee41861.js} +0 -0
  410. package/dist/siemens-ix/p-9fa6a59b.entry.js +1 -0
  411. package/dist/siemens-ix/p-ac1d6617.entry.js +1 -0
  412. package/dist/siemens-ix/{p-6fe3bb9c.entry.js → p-ae35c07f.entry.js} +1 -1
  413. package/dist/siemens-ix/{p-f6e713f3.js → p-affb60fb.js} +1 -1
  414. package/dist/siemens-ix/{p-96e46f99.js → p-b14308ed.js} +0 -0
  415. package/dist/siemens-ix/p-b5599b0b.entry.js +1 -0
  416. package/dist/siemens-ix/{p-eed28e55.entry.js → p-b85458fb.entry.js} +1 -1
  417. package/dist/siemens-ix/{p-fbe40498.js → p-c0454c9a.js} +0 -0
  418. package/dist/siemens-ix/p-c2b50878.entry.js +1 -0
  419. package/dist/siemens-ix/{p-9b5290d4.entry.js → p-c4568016.entry.js} +1 -1
  420. package/dist/siemens-ix/p-cb4269bf.js +1 -0
  421. package/dist/siemens-ix/{p-f7be9635.entry.js → p-d1a16c62.entry.js} +1 -1
  422. package/dist/siemens-ix/p-d7618223.entry.js +1 -0
  423. package/dist/siemens-ix/p-e48e659d.entry.js +1 -0
  424. package/dist/siemens-ix/p-e4bda8e7.entry.js +1 -0
  425. package/dist/siemens-ix/p-e5fd4b34.entry.js +1 -0
  426. package/dist/siemens-ix/{p-72f851ae.entry.js → p-f3cde62f.entry.js} +1 -1
  427. package/dist/siemens-ix/p-f7b5b66f.js +1 -0
  428. package/dist/siemens-ix/{p-150d7a02.entry.js → p-fa262af7.entry.js} +1 -1
  429. package/dist/siemens-ix/p-feefa8c7.entry.js +1 -0
  430. package/dist/siemens-ix/siemens-ix.css +2080 -1824
  431. package/dist/siemens-ix/siemens-ix.esm.js +1 -1
  432. package/dist/types/components/application-header/application-header.d.ts +8 -0
  433. package/dist/types/components/basic-navigation/basic-navigation.d.ts +6 -1
  434. package/dist/types/components/{utils → button}/button-variants.d.ts +0 -0
  435. package/dist/types/components/button/button.d.ts +1 -1
  436. package/dist/types/components/category-filter/category-filter.d.ts +10 -15
  437. package/dist/types/components/divider/divider.d.ts +6 -0
  438. package/dist/types/components/dropdown/dropdown-trigger-event.d.ts +4 -0
  439. package/dist/types/components/dropdown/dropdown.d.ts +11 -1
  440. package/dist/types/components/dropdown-button/dropdown-button.d.ts +1 -1
  441. package/dist/types/components/dropdown-quick-actions/dropdown-quick-actions.d.ts +6 -0
  442. package/dist/types/components/group/group-context-menu.d.ts +0 -2
  443. package/dist/types/components/menu/burger-menu.d.ts +10 -0
  444. package/dist/types/components/menu/menu.d.ts +3 -1
  445. package/dist/types/components/menu-avatar/menu-avatar.d.ts +12 -0
  446. package/dist/types/components/split-button/split-button.d.ts +1 -1
  447. package/dist/types/components/tabs/tabs.d.ts +3 -0
  448. package/dist/types/components/tooltip/tooltip.d.ts +39 -0
  449. package/dist/types/components/typography/types.d.ts +2 -0
  450. package/dist/types/components/typography/typography.d.ts +11 -0
  451. package/dist/types/components/utils/menu-service/menu-service.d.ts +13 -0
  452. package/dist/types/components/utils/screen/context.d.ts +4 -0
  453. package/dist/types/components/utils/screen/index.d.ts +1 -0
  454. package/dist/types/components/utils/screen/mode.d.ts +10 -0
  455. package/dist/types/components/utils/screen/service.d.ts +10 -0
  456. package/dist/types/components.d.ts +144 -7
  457. package/dist/types/exports.d.ts +1 -0
  458. package/dist/types/index.d.ts +2 -1
  459. package/dist/types/tests/utils/test/index.d.ts +1 -0
  460. package/dist/types/tests/utils/test/page.d.ts +3 -0
  461. package/package.json +2 -2
  462. package/scss/_common-variables.scss +1 -1
  463. package/scss/_fonts.scss +1 -1
  464. package/scss/_z-index.scss +1 -1
  465. package/scss/components/_button-group.scss +1 -1
  466. package/scss/components/_buttons.scss +2 -2
  467. package/scss/components/_checkboxes.scss +7 -7
  468. package/scss/components/_dropdown.scss +1 -1
  469. package/scss/components/_forms.scss +13 -11
  470. package/scss/components/_input-group.scss +1 -1
  471. package/scss/components/_links.scss +1 -1
  472. package/scss/components/_modal.scss +1 -1
  473. package/scss/components/_radiobuttons.scss +3 -3
  474. package/scss/components/_shadows.scss +13 -25
  475. package/scss/components/_table.scss +1 -1
  476. package/scss/ix.scss +2 -3
  477. package/scss/mixins/_animations.scss +1 -1
  478. package/scss/mixins/_fonts.scss +1 -1
  479. package/scss/mixins/_hover.scss +1 -1
  480. package/scss/mixins/_shadows.scss +1 -1
  481. package/scss/mixins/_text-truncation.scss +1 -1
  482. package/scss/theme/classic-dark/_border.scss +35 -0
  483. package/scss/theme/classic-dark/_borderRadius.scss +24 -0
  484. package/scss/theme/classic-dark/_borderWidth.scss +18 -0
  485. package/scss/theme/classic-dark/_boxShadow.scss +19 -0
  486. package/scss/theme/classic-dark/_color.scss +860 -0
  487. package/scss/theme/classic-dark/_fontFamilies.scss +8 -0
  488. package/scss/theme/classic-dark/_fontSizes.scss +13 -0
  489. package/scss/theme/classic-dark/_fontWeights.scss +9 -0
  490. package/scss/theme/classic-dark/_index.scss +16 -0
  491. package/scss/theme/classic-dark/_lineHeights.scss +18 -0
  492. package/scss/theme/classic-dark/_other.scss +16 -0
  493. package/scss/theme/classic-dark/_sizing.scss +16 -0
  494. package/scss/theme/classic-dark/_spacing.scss +9 -0
  495. package/scss/theme/classic-dark/_typography.scss +23 -0
  496. package/scss/theme/classic-light/_border.scss +35 -0
  497. package/scss/theme/classic-light/_borderRadius.scss +24 -0
  498. package/scss/theme/classic-light/_borderWidth.scss +18 -0
  499. package/scss/theme/classic-light/_boxShadow.scss +19 -0
  500. package/scss/theme/classic-light/_color.scss +860 -0
  501. package/scss/theme/classic-light/_fontFamilies.scss +8 -0
  502. package/scss/theme/classic-light/_fontSizes.scss +13 -0
  503. package/scss/theme/classic-light/_fontWeights.scss +9 -0
  504. package/scss/theme/classic-light/_index.scss +16 -0
  505. package/scss/theme/classic-light/_lineHeights.scss +18 -0
  506. package/scss/theme/classic-light/_other.scss +16 -0
  507. package/scss/theme/classic-light/_sizing.scss +16 -0
  508. package/scss/theme/classic-light/_spacing.scss +9 -0
  509. package/scss/theme/classic-light/_typography.scss +23 -0
  510. package/dist/siemens-ix/p-03d38416.entry.js +0 -1
  511. package/dist/siemens-ix/p-05c16b94.js +0 -2
  512. package/dist/siemens-ix/p-0e357d27.entry.js +0 -1
  513. package/dist/siemens-ix/p-23d79e3d.entry.js +0 -1
  514. package/dist/siemens-ix/p-2bc72119.entry.js +0 -1
  515. package/dist/siemens-ix/p-2bd88760.entry.js +0 -1
  516. package/dist/siemens-ix/p-2c5abec1.js +0 -1
  517. package/dist/siemens-ix/p-2e24ae23.entry.js +0 -1
  518. package/dist/siemens-ix/p-5631ae88.entry.js +0 -1
  519. package/dist/siemens-ix/p-5bbe9943.entry.js +0 -1
  520. package/dist/siemens-ix/p-65e61684.entry.js +0 -1
  521. package/dist/siemens-ix/p-67eb9d59.entry.js +0 -1
  522. package/dist/siemens-ix/p-a6f4cfc6.entry.js +0 -1
  523. package/dist/siemens-ix/p-ab7949ff.entry.js +0 -1
  524. package/dist/siemens-ix/p-b242bd39.entry.js +0 -1
  525. package/dist/siemens-ix/p-c993560f.entry.js +0 -1
  526. package/dist/siemens-ix/p-d20119c1.entry.js +0 -1
  527. package/dist/siemens-ix/p-fecf0ade.entry.js +0 -1
  528. package/scss/theme/_define-theme-colors.scss +0 -22
  529. package/scss/theme/_define-theme.scss +0 -36
  530. package/scss/theme/_static-colors.scss +0 -19
  531. package/scss/theme/classic-dark/_sizes.scss +0 -66
  532. package/scss/theme/classic-dark/_variables.scss +0 -827
  533. package/scss/theme/classic-dark/index.scss +0 -15
  534. package/scss/theme/classic-light/_sizes.scss +0 -66
  535. package/scss/theme/classic-light/_variables.scss +0 -829
  536. package/scss/theme/classic-light/index.scss +0 -15
@@ -0,0 +1,1355 @@
1
+ function getAlignment(placement) {
2
+ return placement.split('-')[1];
3
+ }
4
+
5
+ function getLengthFromAxis(axis) {
6
+ return axis === 'y' ? 'height' : 'width';
7
+ }
8
+
9
+ function getSide(placement) {
10
+ return placement.split('-')[0];
11
+ }
12
+
13
+ function getMainAxisFromPlacement(placement) {
14
+ return ['top', 'bottom'].includes(getSide(placement)) ? 'x' : 'y';
15
+ }
16
+
17
+ function computeCoordsFromPlacement(_ref, placement, rtl) {
18
+ let {
19
+ reference,
20
+ floating
21
+ } = _ref;
22
+ const commonX = reference.x + reference.width / 2 - floating.width / 2;
23
+ const commonY = reference.y + reference.height / 2 - floating.height / 2;
24
+ const mainAxis = getMainAxisFromPlacement(placement);
25
+ const length = getLengthFromAxis(mainAxis);
26
+ const commonAlign = reference[length] / 2 - floating[length] / 2;
27
+ const side = getSide(placement);
28
+ const isVertical = mainAxis === 'x';
29
+ let coords;
30
+ switch (side) {
31
+ case 'top':
32
+ coords = {
33
+ x: commonX,
34
+ y: reference.y - floating.height
35
+ };
36
+ break;
37
+ case 'bottom':
38
+ coords = {
39
+ x: commonX,
40
+ y: reference.y + reference.height
41
+ };
42
+ break;
43
+ case 'right':
44
+ coords = {
45
+ x: reference.x + reference.width,
46
+ y: commonY
47
+ };
48
+ break;
49
+ case 'left':
50
+ coords = {
51
+ x: reference.x - floating.width,
52
+ y: commonY
53
+ };
54
+ break;
55
+ default:
56
+ coords = {
57
+ x: reference.x,
58
+ y: reference.y
59
+ };
60
+ }
61
+ switch (getAlignment(placement)) {
62
+ case 'start':
63
+ coords[mainAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
64
+ break;
65
+ case 'end':
66
+ coords[mainAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
67
+ break;
68
+ }
69
+ return coords;
70
+ }
71
+
72
+ /**
73
+ * Computes the `x` and `y` coordinates that will place the floating element
74
+ * next to a reference element when it is given a certain positioning strategy.
75
+ *
76
+ * This export does not have any `platform` interface logic. You will need to
77
+ * write one for the platform you are using Floating UI with.
78
+ */
79
+ const computePosition$1 = async (reference, floating, config) => {
80
+ const {
81
+ placement = 'bottom',
82
+ strategy = 'absolute',
83
+ middleware = [],
84
+ platform
85
+ } = config;
86
+ const validMiddleware = middleware.filter(Boolean);
87
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
88
+ let rects = await platform.getElementRects({
89
+ reference,
90
+ floating,
91
+ strategy
92
+ });
93
+ let {
94
+ x,
95
+ y
96
+ } = computeCoordsFromPlacement(rects, placement, rtl);
97
+ let statefulPlacement = placement;
98
+ let middlewareData = {};
99
+ let resetCount = 0;
100
+ for (let i = 0; i < validMiddleware.length; i++) {
101
+ const {
102
+ name,
103
+ fn
104
+ } = validMiddleware[i];
105
+ const {
106
+ x: nextX,
107
+ y: nextY,
108
+ data,
109
+ reset
110
+ } = await fn({
111
+ x,
112
+ y,
113
+ initialPlacement: placement,
114
+ placement: statefulPlacement,
115
+ strategy,
116
+ middlewareData,
117
+ rects,
118
+ platform,
119
+ elements: {
120
+ reference,
121
+ floating
122
+ }
123
+ });
124
+ x = nextX != null ? nextX : x;
125
+ y = nextY != null ? nextY : y;
126
+ middlewareData = {
127
+ ...middlewareData,
128
+ [name]: {
129
+ ...middlewareData[name],
130
+ ...data
131
+ }
132
+ };
133
+ if (reset && resetCount <= 50) {
134
+ resetCount++;
135
+ if (typeof reset === 'object') {
136
+ if (reset.placement) {
137
+ statefulPlacement = reset.placement;
138
+ }
139
+ if (reset.rects) {
140
+ rects = reset.rects === true ? await platform.getElementRects({
141
+ reference,
142
+ floating,
143
+ strategy
144
+ }) : reset.rects;
145
+ }
146
+ ({
147
+ x,
148
+ y
149
+ } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
150
+ }
151
+ i = -1;
152
+ continue;
153
+ }
154
+ }
155
+ return {
156
+ x,
157
+ y,
158
+ placement: statefulPlacement,
159
+ strategy,
160
+ middlewareData
161
+ };
162
+ };
163
+
164
+ function expandPaddingObject(padding) {
165
+ return {
166
+ top: 0,
167
+ right: 0,
168
+ bottom: 0,
169
+ left: 0,
170
+ ...padding
171
+ };
172
+ }
173
+
174
+ function getSideObjectFromPadding(padding) {
175
+ return typeof padding !== 'number' ? expandPaddingObject(padding) : {
176
+ top: padding,
177
+ right: padding,
178
+ bottom: padding,
179
+ left: padding
180
+ };
181
+ }
182
+
183
+ function rectToClientRect(rect) {
184
+ return {
185
+ ...rect,
186
+ top: rect.y,
187
+ left: rect.x,
188
+ right: rect.x + rect.width,
189
+ bottom: rect.y + rect.height
190
+ };
191
+ }
192
+
193
+ /**
194
+ * Resolves with an object of overflow side offsets that determine how much the
195
+ * element is overflowing a given clipping boundary.
196
+ * - positive = overflowing the boundary by that number of pixels
197
+ * - negative = how many pixels left before it will overflow
198
+ * - 0 = lies flush with the boundary
199
+ * @see https://floating-ui.com/docs/detectOverflow
200
+ */
201
+ async function detectOverflow(middlewareArguments, options) {
202
+ var _await$platform$isEle;
203
+ if (options === void 0) {
204
+ options = {};
205
+ }
206
+ const {
207
+ x,
208
+ y,
209
+ platform,
210
+ rects,
211
+ elements,
212
+ strategy
213
+ } = middlewareArguments;
214
+ const {
215
+ boundary = 'clippingAncestors',
216
+ rootBoundary = 'viewport',
217
+ elementContext = 'floating',
218
+ altBoundary = false,
219
+ padding = 0
220
+ } = options;
221
+ const paddingObject = getSideObjectFromPadding(padding);
222
+ const altContext = elementContext === 'floating' ? 'reference' : 'floating';
223
+ const element = elements[altBoundary ? altContext : elementContext];
224
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
225
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
226
+ boundary,
227
+ rootBoundary,
228
+ strategy
229
+ }));
230
+ const rect = elementContext === 'floating' ? {
231
+ ...rects.floating,
232
+ x,
233
+ y
234
+ } : rects.reference;
235
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
236
+ const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
237
+ x: 1,
238
+ y: 1
239
+ } : {
240
+ x: 1,
241
+ y: 1
242
+ };
243
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
244
+ rect,
245
+ offsetParent,
246
+ strategy
247
+ }) : rect);
248
+ return {
249
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
250
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
251
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
252
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
253
+ };
254
+ }
255
+
256
+ const min$1 = Math.min;
257
+ const max$1 = Math.max;
258
+
259
+ function within(min$1$1, value, max$1$1) {
260
+ return max$1(min$1$1, min$1(value, max$1$1));
261
+ }
262
+
263
+ /**
264
+ * Positions an inner element of the floating element such that it is centered
265
+ * to the reference element.
266
+ * @see https://floating-ui.com/docs/arrow
267
+ */
268
+ const arrow = options => ({
269
+ name: 'arrow',
270
+ options,
271
+ async fn(middlewareArguments) {
272
+ // Since `element` is required, we don't Partial<> the type.
273
+ const {
274
+ element,
275
+ padding = 0
276
+ } = options || {};
277
+ const {
278
+ x,
279
+ y,
280
+ placement,
281
+ rects,
282
+ platform
283
+ } = middlewareArguments;
284
+ if (element == null) {
285
+ return {};
286
+ }
287
+ const paddingObject = getSideObjectFromPadding(padding);
288
+ const coords = {
289
+ x,
290
+ y
291
+ };
292
+ const axis = getMainAxisFromPlacement(placement);
293
+ const length = getLengthFromAxis(axis);
294
+ const arrowDimensions = await platform.getDimensions(element);
295
+ const minProp = axis === 'y' ? 'top' : 'left';
296
+ const maxProp = axis === 'y' ? 'bottom' : 'right';
297
+ const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
298
+ const startDiff = coords[axis] - rects.reference[axis];
299
+ const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
300
+ let clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
301
+ if (clientSize === 0) {
302
+ clientSize = rects.floating[length];
303
+ }
304
+ const centerToReference = endDiff / 2 - startDiff / 2;
305
+
306
+ // Make sure the arrow doesn't overflow the floating element if the center
307
+ // point is outside the floating element's bounds.
308
+ const min = paddingObject[minProp];
309
+ const max = clientSize - arrowDimensions[length] - paddingObject[maxProp];
310
+ const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
311
+ const offset = within(min, center, max);
312
+
313
+ // If the reference is small enough that the arrow's padding causes it to
314
+ // to point to nothing for an aligned placement, adjust the offset of the
315
+ // floating element itself. This stops `shift()` from taking action, but can
316
+ // be worked around by calling it again after the `arrow()` if desired.
317
+ const shouldAddOffset = getAlignment(placement) != null && center != offset && rects.reference[length] / 2 - (center < min ? paddingObject[minProp] : paddingObject[maxProp]) - arrowDimensions[length] / 2 < 0;
318
+ const alignmentOffset = shouldAddOffset ? center < min ? min - center : max - center : 0;
319
+ return {
320
+ [axis]: coords[axis] - alignmentOffset,
321
+ data: {
322
+ [axis]: offset,
323
+ centerOffset: center - offset
324
+ }
325
+ };
326
+ }
327
+ });
328
+
329
+ const sides = ['top', 'right', 'bottom', 'left'];
330
+ const allPlacements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-start", side + "-end"), []);
331
+
332
+ const oppositeSideMap = {
333
+ left: 'right',
334
+ right: 'left',
335
+ bottom: 'top',
336
+ top: 'bottom'
337
+ };
338
+ function getOppositePlacement(placement) {
339
+ return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
340
+ }
341
+
342
+ function getAlignmentSides(placement, rects, rtl) {
343
+ if (rtl === void 0) {
344
+ rtl = false;
345
+ }
346
+ const alignment = getAlignment(placement);
347
+ const mainAxis = getMainAxisFromPlacement(placement);
348
+ const length = getLengthFromAxis(mainAxis);
349
+ let mainAlignmentSide = mainAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
350
+ if (rects.reference[length] > rects.floating[length]) {
351
+ mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
352
+ }
353
+ return {
354
+ main: mainAlignmentSide,
355
+ cross: getOppositePlacement(mainAlignmentSide)
356
+ };
357
+ }
358
+
359
+ const oppositeAlignmentMap = {
360
+ start: 'end',
361
+ end: 'start'
362
+ };
363
+ function getOppositeAlignmentPlacement(placement) {
364
+ return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
365
+ }
366
+
367
+ function getPlacementList(alignment, autoAlignment, allowedPlacements) {
368
+ const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);
369
+ return allowedPlacementsSortedByAlignment.filter(placement => {
370
+ if (alignment) {
371
+ return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);
372
+ }
373
+ return true;
374
+ });
375
+ }
376
+ /**
377
+ * Automatically chooses the `placement` which has the most space available.
378
+ * @see https://floating-ui.com/docs/autoPlacement
379
+ */
380
+ const autoPlacement = function (options) {
381
+ if (options === void 0) {
382
+ options = {};
383
+ }
384
+ return {
385
+ name: 'autoPlacement',
386
+ options,
387
+ async fn(middlewareArguments) {
388
+ var _middlewareData$autoP, _middlewareData$autoP2, _placementsSortedByLe;
389
+ const {
390
+ rects,
391
+ middlewareData,
392
+ placement,
393
+ platform,
394
+ elements
395
+ } = middlewareArguments;
396
+ const {
397
+ alignment,
398
+ allowedPlacements = allPlacements,
399
+ autoAlignment = true,
400
+ ...detectOverflowOptions
401
+ } = options;
402
+ const placements = alignment !== undefined || allowedPlacements === allPlacements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
403
+ const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);
404
+ const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
405
+ const currentPlacement = placements[currentIndex];
406
+ if (currentPlacement == null) {
407
+ return {};
408
+ }
409
+ const {
410
+ main,
411
+ cross
412
+ } = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
413
+
414
+ // Make `computeCoords` start from the right place.
415
+ if (placement !== currentPlacement) {
416
+ return {
417
+ reset: {
418
+ placement: placements[0]
419
+ }
420
+ };
421
+ }
422
+ const currentOverflows = [overflow[getSide(currentPlacement)], overflow[main], overflow[cross]];
423
+ const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {
424
+ placement: currentPlacement,
425
+ overflows: currentOverflows
426
+ }];
427
+ const nextPlacement = placements[currentIndex + 1];
428
+
429
+ // There are more placements to check.
430
+ if (nextPlacement) {
431
+ return {
432
+ data: {
433
+ index: currentIndex + 1,
434
+ overflows: allOverflows
435
+ },
436
+ reset: {
437
+ placement: nextPlacement
438
+ }
439
+ };
440
+ }
441
+ const placementsSortedByLeastOverflow = allOverflows.slice().sort((a, b) => a.overflows[0] - b.overflows[0]);
442
+ const placementThatFitsOnAllSides = (_placementsSortedByLe = placementsSortedByLeastOverflow.find(_ref => {
443
+ let {
444
+ overflows
445
+ } = _ref;
446
+ return overflows.every(overflow => overflow <= 0);
447
+ })) == null ? void 0 : _placementsSortedByLe.placement;
448
+ const resetPlacement = placementThatFitsOnAllSides || placementsSortedByLeastOverflow[0].placement;
449
+ if (resetPlacement !== placement) {
450
+ return {
451
+ data: {
452
+ index: currentIndex + 1,
453
+ overflows: allOverflows
454
+ },
455
+ reset: {
456
+ placement: resetPlacement
457
+ }
458
+ };
459
+ }
460
+ return {};
461
+ }
462
+ };
463
+ };
464
+
465
+ /**
466
+ * Provides improved positioning for inline reference elements that can span
467
+ * over multiple lines, such as hyperlinks or range selections.
468
+ * @see https://floating-ui.com/docs/inline
469
+ */
470
+ const inline = function (options) {
471
+ if (options === void 0) {
472
+ options = {};
473
+ }
474
+ return {
475
+ name: 'inline',
476
+ options,
477
+ async fn(middlewareArguments) {
478
+ const {
479
+ placement,
480
+ elements,
481
+ rects,
482
+ platform,
483
+ strategy
484
+ } = middlewareArguments;
485
+ // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a
486
+ // ClientRect's bounds, despite the event listener being triggered. A
487
+ // padding of 2 seems to handle this issue.
488
+ const {
489
+ padding = 2,
490
+ x,
491
+ y
492
+ } = options;
493
+ const fallback = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
494
+ rect: rects.reference,
495
+ offsetParent: await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating)),
496
+ strategy
497
+ }) : rects.reference);
498
+ const clientRects = (await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || [];
499
+ const paddingObject = getSideObjectFromPadding(padding);
500
+ function getBoundingClientRect() {
501
+ // There are two rects and they are disjoined.
502
+ if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {
503
+ // Find the first rect in which the point is fully inside.
504
+ return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;
505
+ }
506
+
507
+ // There are 2 or more connected rects.
508
+ if (clientRects.length >= 2) {
509
+ if (getMainAxisFromPlacement(placement) === 'x') {
510
+ const firstRect = clientRects[0];
511
+ const lastRect = clientRects[clientRects.length - 1];
512
+ const isTop = getSide(placement) === 'top';
513
+ const top = firstRect.top;
514
+ const bottom = lastRect.bottom;
515
+ const left = isTop ? firstRect.left : lastRect.left;
516
+ const right = isTop ? firstRect.right : lastRect.right;
517
+ const width = right - left;
518
+ const height = bottom - top;
519
+ return {
520
+ top,
521
+ bottom,
522
+ left,
523
+ right,
524
+ width,
525
+ height,
526
+ x: left,
527
+ y: top
528
+ };
529
+ }
530
+ const isLeftSide = getSide(placement) === 'left';
531
+ const maxRight = max$1(...clientRects.map(rect => rect.right));
532
+ const minLeft = min$1(...clientRects.map(rect => rect.left));
533
+ const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);
534
+ const top = measureRects[0].top;
535
+ const bottom = measureRects[measureRects.length - 1].bottom;
536
+ const left = minLeft;
537
+ const right = maxRight;
538
+ const width = right - left;
539
+ const height = bottom - top;
540
+ return {
541
+ top,
542
+ bottom,
543
+ left,
544
+ right,
545
+ width,
546
+ height,
547
+ x: left,
548
+ y: top
549
+ };
550
+ }
551
+ return fallback;
552
+ }
553
+ const resetRects = await platform.getElementRects({
554
+ reference: {
555
+ getBoundingClientRect
556
+ },
557
+ floating: elements.floating,
558
+ strategy
559
+ });
560
+ if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {
561
+ return {
562
+ reset: {
563
+ rects: resetRects
564
+ }
565
+ };
566
+ }
567
+ return {};
568
+ }
569
+ };
570
+ };
571
+
572
+ async function convertValueToCoords(middlewareArguments, value) {
573
+ const {
574
+ placement,
575
+ platform,
576
+ elements
577
+ } = middlewareArguments;
578
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
579
+ const side = getSide(placement);
580
+ const alignment = getAlignment(placement);
581
+ const isVertical = getMainAxisFromPlacement(placement) === 'x';
582
+ const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
583
+ const crossAxisMulti = rtl && isVertical ? -1 : 1;
584
+ const rawValue = typeof value === 'function' ? value(middlewareArguments) : value;
585
+
586
+ // eslint-disable-next-line prefer-const
587
+ let {
588
+ mainAxis,
589
+ crossAxis,
590
+ alignmentAxis
591
+ } = typeof rawValue === 'number' ? {
592
+ mainAxis: rawValue,
593
+ crossAxis: 0,
594
+ alignmentAxis: null
595
+ } : {
596
+ mainAxis: 0,
597
+ crossAxis: 0,
598
+ alignmentAxis: null,
599
+ ...rawValue
600
+ };
601
+ if (alignment && typeof alignmentAxis === 'number') {
602
+ crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
603
+ }
604
+ return isVertical ? {
605
+ x: crossAxis * crossAxisMulti,
606
+ y: mainAxis * mainAxisMulti
607
+ } : {
608
+ x: mainAxis * mainAxisMulti,
609
+ y: crossAxis * crossAxisMulti
610
+ };
611
+ }
612
+
613
+ /**
614
+ * Displaces the floating element from its reference element.
615
+ * @see https://floating-ui.com/docs/offset
616
+ */
617
+ const offset = function (value) {
618
+ if (value === void 0) {
619
+ value = 0;
620
+ }
621
+ return {
622
+ name: 'offset',
623
+ options: value,
624
+ async fn(middlewareArguments) {
625
+ const {
626
+ x,
627
+ y
628
+ } = middlewareArguments;
629
+ const diffCoords = await convertValueToCoords(middlewareArguments, value);
630
+ return {
631
+ x: x + diffCoords.x,
632
+ y: y + diffCoords.y,
633
+ data: diffCoords
634
+ };
635
+ }
636
+ };
637
+ };
638
+
639
+ function getCrossAxis(axis) {
640
+ return axis === 'x' ? 'y' : 'x';
641
+ }
642
+
643
+ /**
644
+ * Shifts the floating element in order to keep it in view when it will overflow
645
+ * a clipping boundary.
646
+ * @see https://floating-ui.com/docs/shift
647
+ */
648
+ const shift = function (options) {
649
+ if (options === void 0) {
650
+ options = {};
651
+ }
652
+ return {
653
+ name: 'shift',
654
+ options,
655
+ async fn(middlewareArguments) {
656
+ const {
657
+ x,
658
+ y,
659
+ placement
660
+ } = middlewareArguments;
661
+ const {
662
+ mainAxis: checkMainAxis = true,
663
+ crossAxis: checkCrossAxis = false,
664
+ limiter = {
665
+ fn: _ref => {
666
+ let {
667
+ x,
668
+ y
669
+ } = _ref;
670
+ return {
671
+ x,
672
+ y
673
+ };
674
+ }
675
+ },
676
+ ...detectOverflowOptions
677
+ } = options;
678
+ const coords = {
679
+ x,
680
+ y
681
+ };
682
+ const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);
683
+ const mainAxis = getMainAxisFromPlacement(getSide(placement));
684
+ const crossAxis = getCrossAxis(mainAxis);
685
+ let mainAxisCoord = coords[mainAxis];
686
+ let crossAxisCoord = coords[crossAxis];
687
+ if (checkMainAxis) {
688
+ const minSide = mainAxis === 'y' ? 'top' : 'left';
689
+ const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
690
+ const min = mainAxisCoord + overflow[minSide];
691
+ const max = mainAxisCoord - overflow[maxSide];
692
+ mainAxisCoord = within(min, mainAxisCoord, max);
693
+ }
694
+ if (checkCrossAxis) {
695
+ const minSide = crossAxis === 'y' ? 'top' : 'left';
696
+ const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
697
+ const min = crossAxisCoord + overflow[minSide];
698
+ const max = crossAxisCoord - overflow[maxSide];
699
+ crossAxisCoord = within(min, crossAxisCoord, max);
700
+ }
701
+ const limitedCoords = limiter.fn({
702
+ ...middlewareArguments,
703
+ [mainAxis]: mainAxisCoord,
704
+ [crossAxis]: crossAxisCoord
705
+ });
706
+ return {
707
+ ...limitedCoords,
708
+ data: {
709
+ x: limitedCoords.x - x,
710
+ y: limitedCoords.y - y
711
+ }
712
+ };
713
+ }
714
+ };
715
+ };
716
+
717
+ function getWindow(node) {
718
+ var _node$ownerDocument;
719
+ return ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
720
+ }
721
+
722
+ function getComputedStyle$1(element) {
723
+ return getWindow(element).getComputedStyle(element);
724
+ }
725
+
726
+ function getNodeName(node) {
727
+ return isNode(node) ? (node.nodeName || '').toLowerCase() : '';
728
+ }
729
+
730
+ let uaString;
731
+ function getUAString() {
732
+ if (uaString) {
733
+ return uaString;
734
+ }
735
+ const uaData = navigator.userAgentData;
736
+ if (uaData && Array.isArray(uaData.brands)) {
737
+ uaString = uaData.brands.map(item => item.brand + "/" + item.version).join(' ');
738
+ return uaString;
739
+ }
740
+ return navigator.userAgent;
741
+ }
742
+
743
+ function isHTMLElement(value) {
744
+ return value instanceof getWindow(value).HTMLElement;
745
+ }
746
+ function isElement(value) {
747
+ return value instanceof getWindow(value).Element;
748
+ }
749
+ function isNode(value) {
750
+ return value instanceof getWindow(value).Node;
751
+ }
752
+ function isShadowRoot(node) {
753
+ // Browsers without `ShadowRoot` support
754
+ if (typeof ShadowRoot === 'undefined') {
755
+ return false;
756
+ }
757
+ const OwnElement = getWindow(node).ShadowRoot;
758
+ return node instanceof OwnElement || node instanceof ShadowRoot;
759
+ }
760
+ function isOverflowElement(element) {
761
+ const {
762
+ overflow,
763
+ overflowX,
764
+ overflowY,
765
+ display
766
+ } = getComputedStyle$1(element);
767
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
768
+ }
769
+ function isTableElement(element) {
770
+ return ['table', 'td', 'th'].includes(getNodeName(element));
771
+ }
772
+ function isContainingBlock(element) {
773
+ // TODO: Try and use feature detection here instead
774
+ const isFirefox = /firefox/i.test(getUAString());
775
+ const css = getComputedStyle$1(element);
776
+ const backdropFilter = css.backdropFilter || css.WebkitBackdropFilter;
777
+
778
+ // This is non-exhaustive but covers the most common CSS properties that
779
+ // create a containing block.
780
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
781
+ return css.transform !== 'none' || css.perspective !== 'none' || (backdropFilter ? backdropFilter !== 'none' : false) || isFirefox && css.willChange === 'filter' || isFirefox && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective'].some(value => css.willChange.includes(value)) || ['paint', 'layout', 'strict', 'content'].some(
782
+ // TS 4.1 compat
783
+ value => {
784
+ const contain = css.contain;
785
+ return contain != null ? contain.includes(value) : false;
786
+ });
787
+ }
788
+ function isLayoutViewport() {
789
+ // Not Safari
790
+ return !/^((?!chrome|android).)*safari/i.test(getUAString());
791
+ // Feature detection for this fails in various ways
792
+ // • Always-visible scrollbar or not
793
+ // • Width of <html>, etc.
794
+ // const vV = win.visualViewport;
795
+ // return vV ? Math.abs(win.innerWidth / vV.scale - vV.width) < 0.5 : true;
796
+ }
797
+
798
+ function isLastTraversableNode(node) {
799
+ return ['html', 'body', '#document'].includes(getNodeName(node));
800
+ }
801
+
802
+ const min = Math.min;
803
+ const max = Math.max;
804
+ const round = Math.round;
805
+
806
+ function getCssDimensions(element) {
807
+ const css = getComputedStyle$1(element);
808
+ let width = parseFloat(css.width);
809
+ let height = parseFloat(css.height);
810
+ const offsetWidth = element.offsetWidth;
811
+ const offsetHeight = element.offsetHeight;
812
+ const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
813
+ if (shouldFallback) {
814
+ width = offsetWidth;
815
+ height = offsetHeight;
816
+ }
817
+ return {
818
+ width,
819
+ height,
820
+ fallback: shouldFallback
821
+ };
822
+ }
823
+
824
+ function unwrapElement(element) {
825
+ return !isElement(element) ? element.contextElement : element;
826
+ }
827
+
828
+ const FALLBACK_SCALE = {
829
+ x: 1,
830
+ y: 1
831
+ };
832
+ function getScale(element) {
833
+ const domElement = unwrapElement(element);
834
+ if (!isHTMLElement(domElement)) {
835
+ return FALLBACK_SCALE;
836
+ }
837
+ const rect = domElement.getBoundingClientRect();
838
+ const {
839
+ width,
840
+ height,
841
+ fallback
842
+ } = getCssDimensions(domElement);
843
+ let x = (fallback ? round(rect.width) : rect.width) / width;
844
+ let y = (fallback ? round(rect.height) : rect.height) / height;
845
+
846
+ // 0, NaN, or Infinity should always fallback to 1.
847
+
848
+ if (!x || !Number.isFinite(x)) {
849
+ x = 1;
850
+ }
851
+ if (!y || !Number.isFinite(y)) {
852
+ y = 1;
853
+ }
854
+ return {
855
+ x,
856
+ y
857
+ };
858
+ }
859
+
860
+ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
861
+ var _win$visualViewport, _win$visualViewport2;
862
+ if (includeScale === void 0) {
863
+ includeScale = false;
864
+ }
865
+ if (isFixedStrategy === void 0) {
866
+ isFixedStrategy = false;
867
+ }
868
+ const clientRect = element.getBoundingClientRect();
869
+ const domElement = unwrapElement(element);
870
+ let scale = FALLBACK_SCALE;
871
+ if (includeScale) {
872
+ if (offsetParent) {
873
+ if (isElement(offsetParent)) {
874
+ scale = getScale(offsetParent);
875
+ }
876
+ } else {
877
+ scale = getScale(element);
878
+ }
879
+ }
880
+ const win = domElement ? getWindow(domElement) : window;
881
+ const addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
882
+ let x = (clientRect.left + (addVisualOffsets ? ((_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) || 0 : 0)) / scale.x;
883
+ let y = (clientRect.top + (addVisualOffsets ? ((_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) || 0 : 0)) / scale.y;
884
+ let width = clientRect.width / scale.x;
885
+ let height = clientRect.height / scale.y;
886
+ if (domElement) {
887
+ const win = getWindow(domElement);
888
+ const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
889
+ let currentIFrame = win.frameElement;
890
+ while (currentIFrame && offsetParent && offsetWin !== win) {
891
+ const iframeScale = getScale(currentIFrame);
892
+ const iframeRect = currentIFrame.getBoundingClientRect();
893
+ const css = getComputedStyle(currentIFrame);
894
+ iframeRect.x += (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
895
+ iframeRect.y += (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
896
+ x *= iframeScale.x;
897
+ y *= iframeScale.y;
898
+ width *= iframeScale.x;
899
+ height *= iframeScale.y;
900
+ x += iframeRect.x;
901
+ y += iframeRect.y;
902
+ currentIFrame = getWindow(currentIFrame).frameElement;
903
+ }
904
+ }
905
+ return {
906
+ width,
907
+ height,
908
+ top: y,
909
+ right: x + width,
910
+ bottom: y + height,
911
+ left: x,
912
+ x,
913
+ y
914
+ };
915
+ }
916
+
917
+ function getDocumentElement(node) {
918
+ return ((isNode(node) ? node.ownerDocument : node.document) || window.document).documentElement;
919
+ }
920
+
921
+ function getNodeScroll(element) {
922
+ if (isElement(element)) {
923
+ return {
924
+ scrollLeft: element.scrollLeft,
925
+ scrollTop: element.scrollTop
926
+ };
927
+ }
928
+ return {
929
+ scrollLeft: element.pageXOffset,
930
+ scrollTop: element.pageYOffset
931
+ };
932
+ }
933
+
934
+ function getWindowScrollBarX(element) {
935
+ // If <html> has a CSS width greater than the viewport, then this will be
936
+ // incorrect for RTL.
937
+ return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
938
+ }
939
+
940
+ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
941
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
942
+ const documentElement = getDocumentElement(offsetParent);
943
+ const rect = getBoundingClientRect(element, true, strategy === 'fixed', offsetParent);
944
+ let scroll = {
945
+ scrollLeft: 0,
946
+ scrollTop: 0
947
+ };
948
+ const offsets = {
949
+ x: 0,
950
+ y: 0
951
+ };
952
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
953
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
954
+ scroll = getNodeScroll(offsetParent);
955
+ }
956
+ if (isHTMLElement(offsetParent)) {
957
+ const offsetRect = getBoundingClientRect(offsetParent, true);
958
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
959
+ offsets.y = offsetRect.y + offsetParent.clientTop;
960
+ } else if (documentElement) {
961
+ offsets.x = getWindowScrollBarX(documentElement);
962
+ }
963
+ }
964
+ return {
965
+ x: rect.left + scroll.scrollLeft - offsets.x,
966
+ y: rect.top + scroll.scrollTop - offsets.y,
967
+ width: rect.width,
968
+ height: rect.height
969
+ };
970
+ }
971
+
972
+ function getParentNode(node) {
973
+ if (getNodeName(node) === 'html') {
974
+ return node;
975
+ }
976
+ const result =
977
+ // Step into the shadow DOM of the parent of a slotted node
978
+ node.assignedSlot ||
979
+ // DOM Element detected
980
+ node.parentNode || (
981
+ // ShadowRoot detected
982
+ isShadowRoot(node) ? node.host : null) ||
983
+ // Fallback
984
+ getDocumentElement(node);
985
+ return isShadowRoot(result) ? result.host : result;
986
+ }
987
+
988
+ function getTrueOffsetParent(element) {
989
+ if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
990
+ return null;
991
+ }
992
+ return element.offsetParent;
993
+ }
994
+ function getContainingBlock(element) {
995
+ let currentNode = getParentNode(element);
996
+ while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
997
+ if (isContainingBlock(currentNode)) {
998
+ return currentNode;
999
+ } else {
1000
+ currentNode = getParentNode(currentNode);
1001
+ }
1002
+ }
1003
+ return null;
1004
+ }
1005
+
1006
+ // Gets the closest ancestor positioned element. Handles some edge cases,
1007
+ // such as table ancestors and cross browser bugs.
1008
+ function getOffsetParent(element) {
1009
+ const window = getWindow(element);
1010
+ let offsetParent = getTrueOffsetParent(element);
1011
+ while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {
1012
+ offsetParent = getTrueOffsetParent(offsetParent);
1013
+ }
1014
+ if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
1015
+ return window;
1016
+ }
1017
+ return offsetParent || getContainingBlock(element) || window;
1018
+ }
1019
+
1020
+ function getDimensions(element) {
1021
+ return getCssDimensions(element);
1022
+ }
1023
+
1024
+ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
1025
+ let {
1026
+ rect,
1027
+ offsetParent,
1028
+ strategy
1029
+ } = _ref;
1030
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
1031
+ const documentElement = getDocumentElement(offsetParent);
1032
+ if (offsetParent === documentElement) {
1033
+ return rect;
1034
+ }
1035
+ let scroll = {
1036
+ scrollLeft: 0,
1037
+ scrollTop: 0
1038
+ };
1039
+ let scale = {
1040
+ x: 1,
1041
+ y: 1
1042
+ };
1043
+ const offsets = {
1044
+ x: 0,
1045
+ y: 0
1046
+ };
1047
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
1048
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
1049
+ scroll = getNodeScroll(offsetParent);
1050
+ }
1051
+ if (isHTMLElement(offsetParent)) {
1052
+ const offsetRect = getBoundingClientRect(offsetParent);
1053
+ scale = getScale(offsetParent);
1054
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
1055
+ offsets.y = offsetRect.y + offsetParent.clientTop;
1056
+ }
1057
+ // This doesn't appear to need to be negated.
1058
+ // else if (documentElement) {
1059
+ // offsets.x = getWindowScrollBarX(documentElement);
1060
+ // }
1061
+ }
1062
+
1063
+ return {
1064
+ width: rect.width * scale.x,
1065
+ height: rect.height * scale.y,
1066
+ x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
1067
+ y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
1068
+ };
1069
+ }
1070
+
1071
+ function getViewportRect(element, strategy) {
1072
+ const win = getWindow(element);
1073
+ const html = getDocumentElement(element);
1074
+ const visualViewport = win.visualViewport;
1075
+ let width = html.clientWidth;
1076
+ let height = html.clientHeight;
1077
+ let x = 0;
1078
+ let y = 0;
1079
+ if (visualViewport) {
1080
+ width = visualViewport.width;
1081
+ height = visualViewport.height;
1082
+ const layoutViewport = isLayoutViewport();
1083
+ if (layoutViewport || !layoutViewport && strategy === 'fixed') {
1084
+ x = visualViewport.offsetLeft;
1085
+ y = visualViewport.offsetTop;
1086
+ }
1087
+ }
1088
+ return {
1089
+ width,
1090
+ height,
1091
+ x,
1092
+ y
1093
+ };
1094
+ }
1095
+
1096
+ // Gets the entire size of the scrollable document area, even extending outside
1097
+ // of the `<html>` and `<body>` rect bounds if horizontally scrollable
1098
+ function getDocumentRect(element) {
1099
+ var _element$ownerDocumen;
1100
+ const html = getDocumentElement(element);
1101
+ const scroll = getNodeScroll(element);
1102
+ const body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
1103
+ const width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
1104
+ const height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
1105
+ let x = -scroll.scrollLeft + getWindowScrollBarX(element);
1106
+ const y = -scroll.scrollTop;
1107
+ if (getComputedStyle$1(body || html).direction === 'rtl') {
1108
+ x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
1109
+ }
1110
+ return {
1111
+ width,
1112
+ height,
1113
+ x,
1114
+ y
1115
+ };
1116
+ }
1117
+
1118
+ function getNearestOverflowAncestor(node) {
1119
+ const parentNode = getParentNode(node);
1120
+ if (isLastTraversableNode(parentNode)) {
1121
+ // @ts-ignore assume body is always available
1122
+ return node.ownerDocument.body;
1123
+ }
1124
+ if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
1125
+ return parentNode;
1126
+ }
1127
+ return getNearestOverflowAncestor(parentNode);
1128
+ }
1129
+
1130
+ function getOverflowAncestors(node, list) {
1131
+ var _node$ownerDocument;
1132
+ if (list === void 0) {
1133
+ list = [];
1134
+ }
1135
+ const scrollableAncestor = getNearestOverflowAncestor(node);
1136
+ const isBody = scrollableAncestor === ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.body);
1137
+ const win = getWindow(scrollableAncestor);
1138
+ if (isBody) {
1139
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []);
1140
+ }
1141
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor));
1142
+ }
1143
+
1144
+ // Returns the inner client rect, subtracting scrollbars if present
1145
+ function getInnerBoundingClientRect(element, strategy) {
1146
+ const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
1147
+ const top = clientRect.top + element.clientTop;
1148
+ const left = clientRect.left + element.clientLeft;
1149
+ const scale = isHTMLElement(element) ? getScale(element) : {
1150
+ x: 1,
1151
+ y: 1
1152
+ };
1153
+ const width = element.clientWidth * scale.x;
1154
+ const height = element.clientHeight * scale.y;
1155
+ const x = left * scale.x;
1156
+ const y = top * scale.y;
1157
+ return {
1158
+ top: y,
1159
+ left: x,
1160
+ right: x + width,
1161
+ bottom: y + height,
1162
+ x,
1163
+ y,
1164
+ width,
1165
+ height
1166
+ };
1167
+ }
1168
+ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
1169
+ if (clippingAncestor === 'viewport') {
1170
+ return rectToClientRect(getViewportRect(element, strategy));
1171
+ }
1172
+ if (isElement(clippingAncestor)) {
1173
+ return getInnerBoundingClientRect(clippingAncestor, strategy);
1174
+ }
1175
+ return rectToClientRect(getDocumentRect(getDocumentElement(element)));
1176
+ }
1177
+
1178
+ // A "clipping ancestor" is an `overflow` element with the characteristic of
1179
+ // clipping (or hiding) child elements. This returns all clipping ancestors
1180
+ // of the given element up the tree.
1181
+ function getClippingElementAncestors(element, cache) {
1182
+ const cachedResult = cache.get(element);
1183
+ if (cachedResult) {
1184
+ return cachedResult;
1185
+ }
1186
+ let result = getOverflowAncestors(element).filter(el => isElement(el) && getNodeName(el) !== 'body');
1187
+ let currentContainingBlockComputedStyle = null;
1188
+ const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
1189
+ let currentNode = elementIsFixed ? getParentNode(element) : element;
1190
+
1191
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
1192
+ while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
1193
+ const computedStyle = getComputedStyle$1(currentNode);
1194
+ const containingBlock = isContainingBlock(currentNode);
1195
+ const shouldDropCurrentNode = elementIsFixed ? !containingBlock && !currentContainingBlockComputedStyle : !containingBlock && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position);
1196
+ if (shouldDropCurrentNode) {
1197
+ // Drop non-containing blocks
1198
+ result = result.filter(ancestor => ancestor !== currentNode);
1199
+ } else {
1200
+ // Record last containing block for next iteration
1201
+ currentContainingBlockComputedStyle = computedStyle;
1202
+ }
1203
+ currentNode = getParentNode(currentNode);
1204
+ }
1205
+ cache.set(element, result);
1206
+ return result;
1207
+ }
1208
+
1209
+ // Gets the maximum area that the element is visible in due to any number of
1210
+ // clipping ancestors
1211
+ function getClippingRect(_ref) {
1212
+ let {
1213
+ element,
1214
+ boundary,
1215
+ rootBoundary,
1216
+ strategy
1217
+ } = _ref;
1218
+ const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary);
1219
+ const clippingAncestors = [...elementClippingAncestors, rootBoundary];
1220
+ const firstClippingAncestor = clippingAncestors[0];
1221
+ const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
1222
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
1223
+ accRect.top = max(rect.top, accRect.top);
1224
+ accRect.right = min(rect.right, accRect.right);
1225
+ accRect.bottom = min(rect.bottom, accRect.bottom);
1226
+ accRect.left = max(rect.left, accRect.left);
1227
+ return accRect;
1228
+ }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
1229
+ return {
1230
+ width: clippingRect.right - clippingRect.left,
1231
+ height: clippingRect.bottom - clippingRect.top,
1232
+ x: clippingRect.left,
1233
+ y: clippingRect.top
1234
+ };
1235
+ }
1236
+
1237
+ const platform = {
1238
+ getClippingRect,
1239
+ convertOffsetParentRelativeRectToViewportRelativeRect,
1240
+ isElement,
1241
+ getDimensions,
1242
+ getOffsetParent,
1243
+ getDocumentElement,
1244
+ getScale,
1245
+ async getElementRects(_ref) {
1246
+ let {
1247
+ reference,
1248
+ floating,
1249
+ strategy
1250
+ } = _ref;
1251
+ const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
1252
+ const getDimensionsFn = this.getDimensions;
1253
+ return {
1254
+ reference: getRectRelativeToOffsetParent(reference, await getOffsetParentFn(floating), strategy),
1255
+ floating: {
1256
+ x: 0,
1257
+ y: 0,
1258
+ ...(await getDimensionsFn(floating))
1259
+ }
1260
+ };
1261
+ },
1262
+ getClientRects: element => Array.from(element.getClientRects()),
1263
+ isRTL: element => getComputedStyle$1(element).direction === 'rtl'
1264
+ };
1265
+
1266
+ /**
1267
+ * Automatically updates the position of the floating element when necessary.
1268
+ * @see https://floating-ui.com/docs/autoUpdate
1269
+ */
1270
+ function autoUpdate(reference, floating, update, options) {
1271
+ if (options === void 0) {
1272
+ options = {};
1273
+ }
1274
+ const {
1275
+ ancestorScroll: _ancestorScroll = true,
1276
+ ancestorResize = true,
1277
+ elementResize = true,
1278
+ animationFrame = false
1279
+ } = options;
1280
+ const ancestorScroll = _ancestorScroll && !animationFrame;
1281
+ const ancestors = ancestorScroll || ancestorResize ? [...(isElement(reference) ? getOverflowAncestors(reference) : reference.contextElement ? getOverflowAncestors(reference.contextElement) : []), ...getOverflowAncestors(floating)] : [];
1282
+ ancestors.forEach(ancestor => {
1283
+ ancestorScroll && ancestor.addEventListener('scroll', update, {
1284
+ passive: true
1285
+ });
1286
+ ancestorResize && ancestor.addEventListener('resize', update);
1287
+ });
1288
+ let observer = null;
1289
+ if (elementResize) {
1290
+ let initialUpdate = true;
1291
+ observer = new ResizeObserver(() => {
1292
+ if (!initialUpdate) {
1293
+ update();
1294
+ }
1295
+ initialUpdate = false;
1296
+ });
1297
+ isElement(reference) && !animationFrame && observer.observe(reference);
1298
+ if (!isElement(reference) && reference.contextElement && !animationFrame) {
1299
+ observer.observe(reference.contextElement);
1300
+ }
1301
+ observer.observe(floating);
1302
+ }
1303
+ let frameId;
1304
+ let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
1305
+ if (animationFrame) {
1306
+ frameLoop();
1307
+ }
1308
+ function frameLoop() {
1309
+ const nextRefRect = getBoundingClientRect(reference);
1310
+ if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
1311
+ update();
1312
+ }
1313
+ prevRefRect = nextRefRect;
1314
+ frameId = requestAnimationFrame(frameLoop);
1315
+ }
1316
+ update();
1317
+ return () => {
1318
+ var _observer;
1319
+ ancestors.forEach(ancestor => {
1320
+ ancestorScroll && ancestor.removeEventListener('scroll', update);
1321
+ ancestorResize && ancestor.removeEventListener('resize', update);
1322
+ });
1323
+ (_observer = observer) == null ? void 0 : _observer.disconnect();
1324
+ observer = null;
1325
+ if (animationFrame) {
1326
+ cancelAnimationFrame(frameId);
1327
+ }
1328
+ };
1329
+ }
1330
+
1331
+ /**
1332
+ * Computes the `x` and `y` coordinates that will place the floating element
1333
+ * next to a reference element when it is given a certain CSS positioning
1334
+ * strategy.
1335
+ */
1336
+ const computePosition = (reference, floating, options) => {
1337
+ // This caches the expensive `getClippingElementAncestors` function so that
1338
+ // multiple lifecycle resets re-use the same result. It only lives for a
1339
+ // single call. If other functions become expensive, we can add them as well.
1340
+ const cache = new Map();
1341
+ const mergedOptions = {
1342
+ platform,
1343
+ ...options
1344
+ };
1345
+ const platformWithCache = {
1346
+ ...mergedOptions.platform,
1347
+ _c: cache
1348
+ };
1349
+ return computePosition$1(reference, floating, {
1350
+ ...mergedOptions,
1351
+ platform: platformWithCache
1352
+ });
1353
+ };
1354
+
1355
+ export { autoUpdate as a, arrow as b, computePosition as c, autoPlacement as d, inline as i, offset as o, shift as s };