@aquera/nile-elements 1.3.1-beta-1.0 → 1.3.1-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 (535) hide show
  1. package/README.md +6 -0
  2. package/demo/index.css +1 -4
  3. package/demo/index.html +15 -38
  4. package/demo/nxtgen.css +6 -0
  5. package/demo/variables.css +6 -2
  6. package/dist/{fixture-d1470b58.cjs.js → fixture-54600b35.cjs.js} +2 -2
  7. package/dist/{fixture-d1470b58.cjs.js.map → fixture-54600b35.cjs.js.map} +1 -1
  8. package/dist/{fixture-1c49c014.cjs.js → fixture-5b79f853.cjs.js} +2 -2
  9. package/dist/{fixture-dff65c89.cjs.js.map → fixture-5b79f853.cjs.js.map} +1 -1
  10. package/dist/{fixture-dff65c89.cjs.js → fixture-73855806.cjs.js} +2 -2
  11. package/dist/{fixture-1c49c014.cjs.js.map → fixture-73855806.cjs.js.map} +1 -1
  12. package/dist/fixture-90b199c4.esm.js +569 -0
  13. package/dist/{fixture-985bba12.esm.js → fixture-9871e8a9.esm.js} +1 -1
  14. package/dist/fixture-c1d78368.cjs.js +395 -0
  15. package/dist/fixture-c1d78368.cjs.js.map +1 -0
  16. package/dist/fixture-cf7bfcf5.esm.js +569 -0
  17. package/dist/fixture-dbd66009.cjs.js +395 -0
  18. package/dist/fixture-dbd66009.cjs.js.map +1 -0
  19. package/dist/index.cjs.js +1 -1
  20. package/dist/index.esm.js +1 -1
  21. package/dist/index.js +981 -628
  22. package/dist/nile-accordion/nile-accordian.test.cjs.js +1 -1
  23. package/dist/nile-accordion/nile-accordian.test.esm.js +1 -1
  24. package/dist/nile-auto-complete/index.cjs.js +1 -1
  25. package/dist/nile-auto-complete/index.esm.js +1 -1
  26. package/dist/nile-auto-complete/nile-auto-complete.cjs.js +1 -1
  27. package/dist/nile-auto-complete/nile-auto-complete.cjs.js.map +1 -1
  28. package/dist/nile-auto-complete/nile-auto-complete.esm.js +2 -2
  29. package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js +1 -1
  30. package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js.map +1 -1
  31. package/dist/nile-auto-complete/nile-auto-complete.test.esm.js +1 -1
  32. package/dist/nile-avatar/nile-avatar.test.cjs.js +1 -1
  33. package/dist/nile-avatar/nile-avatar.test.esm.js +1 -1
  34. package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
  35. package/dist/nile-badge/nile-badge.test.esm.js +1 -1
  36. package/dist/nile-button/nile-button.test.cjs.js +1 -1
  37. package/dist/nile-button/nile-button.test.esm.js +1 -1
  38. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js +1 -1
  39. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.esm.js +1 -1
  40. package/dist/nile-calendar/index.cjs.js +1 -1
  41. package/dist/nile-calendar/index.esm.js +1 -1
  42. package/dist/nile-calendar/nile-calendar.cjs.js +1 -1
  43. package/dist/nile-calendar/nile-calendar.cjs.js.map +1 -1
  44. package/dist/nile-calendar/nile-calendar.css.cjs.js +1 -1
  45. package/dist/nile-calendar/nile-calendar.css.cjs.js.map +1 -1
  46. package/dist/nile-calendar/nile-calendar.css.esm.js +387 -110
  47. package/dist/nile-calendar/nile-calendar.enum.cjs.js +2 -0
  48. package/dist/nile-calendar/nile-calendar.enum.cjs.js.map +1 -0
  49. package/dist/nile-calendar/nile-calendar.enum.esm.js +1 -0
  50. package/dist/nile-calendar/nile-calendar.esm.js +216 -108
  51. package/dist/nile-calendar/nile-calendar.test.cjs.js +1 -1
  52. package/dist/nile-calendar/nile-calendar.test.cjs.js.map +1 -1
  53. package/dist/nile-calendar/nile-calendar.test.esm.js +1 -1
  54. package/dist/nile-card/nile-card.test.cjs.js +1 -1
  55. package/dist/nile-card/nile-card.test.esm.js +1 -1
  56. package/dist/nile-checkbox/nile-checkbox.test.cjs.js +1 -1
  57. package/dist/nile-checkbox/nile-checkbox.test.esm.js +1 -1
  58. package/dist/nile-chip/index.cjs.js +1 -1
  59. package/dist/nile-chip/index.esm.js +1 -1
  60. package/dist/nile-chip/nile-chip.cjs.js +1 -1
  61. package/dist/nile-chip/nile-chip.cjs.js.map +1 -1
  62. package/dist/nile-chip/nile-chip.esm.js +2 -2
  63. package/dist/nile-chip/nile-chip.test.cjs.js +1 -1
  64. package/dist/nile-chip/nile-chip.test.cjs.js.map +1 -1
  65. package/dist/nile-chip/nile-chip.test.esm.js +1 -1
  66. package/dist/nile-code-editor/backup_nile-code-editor copy.cjs.js +2 -0
  67. package/dist/nile-code-editor/backup_nile-code-editor copy.cjs.js.map +1 -0
  68. package/dist/nile-code-editor/backup_nile-code-editor copy.esm.js +1 -0
  69. package/dist/nile-dialog/nile-dialog.test.cjs.js +1 -1
  70. package/dist/nile-dialog/nile-dialog.test.esm.js +1 -1
  71. package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
  72. package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
  73. package/dist/nile-dropdown/index.cjs.js +1 -1
  74. package/dist/nile-dropdown/index.esm.js +1 -1
  75. package/dist/nile-dropdown/nile-dropdown.cjs.js +1 -1
  76. package/dist/nile-dropdown/nile-dropdown.cjs.js.map +1 -1
  77. package/dist/nile-dropdown/nile-dropdown.esm.js +2 -2
  78. package/dist/nile-dropdown/nile-dropdown.test.cjs.js +1 -1
  79. package/dist/nile-dropdown/nile-dropdown.test.cjs.js.map +1 -1
  80. package/dist/nile-dropdown/nile-dropdown.test.esm.js +6 -6
  81. package/dist/nile-dropdown/portal-manager.cjs.js +1 -1
  82. package/dist/nile-dropdown/portal-manager.cjs.js.map +1 -1
  83. package/dist/nile-dropdown/portal-manager.esm.js +1 -1
  84. package/dist/nile-dropdown/portal-utils.cjs.js +1 -1
  85. package/dist/nile-dropdown/portal-utils.cjs.js.map +1 -1
  86. package/dist/nile-dropdown/portal-utils.esm.js +1 -1
  87. package/dist/nile-empty-state/nile-empty-state.test.cjs.js +1 -1
  88. package/dist/nile-empty-state/nile-empty-state.test.esm.js +1 -1
  89. package/dist/nile-error-message/nile-error-message.test.cjs.js +1 -1
  90. package/dist/nile-error-message/nile-error-message.test.esm.js +1 -1
  91. package/dist/nile-file-preview/nile-file-preview.test.cjs.js +1 -1
  92. package/dist/nile-file-preview/nile-file-preview.test.esm.js +1 -1
  93. package/dist/nile-file-upload/nile-file-upload.test.cjs.js +1 -1
  94. package/dist/nile-file-upload/nile-file-upload.test.esm.js +1 -1
  95. package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js +1 -1
  96. package/dist/nile-filter-chip/nile-filter-chip.test.esm.js +1 -1
  97. package/dist/nile-form-group/nile-form-group.test.cjs.js +1 -1
  98. package/dist/nile-form-group/nile-form-group.test.esm.js +1 -1
  99. package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js +1 -1
  100. package/dist/nile-form-help-text/nile-form-help-text.test.esm.js +1 -1
  101. package/dist/nile-hero/nile-hero.test.cjs.js +1 -1
  102. package/dist/nile-hero/nile-hero.test.esm.js +1 -1
  103. package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
  104. package/dist/nile-icon/nile-icon.test.esm.js +1 -1
  105. package/dist/nile-inline-edit/index.cjs.js +1 -1
  106. package/dist/nile-inline-edit/index.esm.js +1 -1
  107. package/dist/nile-inline-edit/nile-inline-edit-utils.cjs.js +2 -0
  108. package/dist/nile-inline-edit/nile-inline-edit-utils.cjs.js.map +1 -0
  109. package/dist/nile-inline-edit/nile-inline-edit-utils.esm.js +1 -0
  110. package/dist/nile-inline-edit/nile-inline-edit.cjs.js +1 -1
  111. package/dist/nile-inline-edit/nile-inline-edit.cjs.js.map +1 -1
  112. package/dist/nile-inline-edit/nile-inline-edit.esm.js +4 -4
  113. package/dist/nile-inline-sidebar/nile-inline-sidebar.cjs.js +1 -1
  114. package/dist/nile-inline-sidebar/nile-inline-sidebar.cjs.js.map +1 -1
  115. package/dist/nile-inline-sidebar/nile-inline-sidebar.css.cjs.js +1 -1
  116. package/dist/nile-inline-sidebar/nile-inline-sidebar.css.cjs.js.map +1 -1
  117. package/dist/nile-inline-sidebar/nile-inline-sidebar.css.esm.js +2 -10
  118. package/dist/nile-inline-sidebar/nile-inline-sidebar.esm.js +6 -10
  119. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.cjs.js +1 -1
  120. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.cjs.js.map +1 -1
  121. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.css.cjs.js +1 -1
  122. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.css.cjs.js.map +1 -1
  123. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.css.esm.js +2 -8
  124. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.esm.js +2 -2
  125. package/dist/nile-input/nile-input.test.cjs.js +1 -1
  126. package/dist/nile-input/nile-input.test.esm.js +1 -1
  127. package/dist/nile-link/nile-link.css.cjs.js +1 -1
  128. package/dist/nile-link/nile-link.css.cjs.js.map +1 -1
  129. package/dist/nile-link/nile-link.css.esm.js +3 -3
  130. package/dist/nile-link/nile-link.test.cjs.js +1 -1
  131. package/dist/nile-link/nile-link.test.esm.js +1 -1
  132. package/dist/nile-lite-tooltip/index.cjs.js +1 -1
  133. package/dist/nile-lite-tooltip/index.esm.js +1 -1
  134. package/dist/nile-lite-tooltip/nile-lite-tooltip.cjs.js +1 -1
  135. package/dist/nile-lite-tooltip/nile-lite-tooltip.cjs.js.map +1 -1
  136. package/dist/nile-lite-tooltip/nile-lite-tooltip.esm.js +1 -1
  137. package/dist/nile-loader/nile-loader.test.cjs.js +1 -1
  138. package/dist/nile-loader/nile-loader.test.esm.js +1 -1
  139. package/dist/nile-popover/index.cjs.js +1 -1
  140. package/dist/nile-popover/index.esm.js +1 -1
  141. package/dist/nile-popover/nile-popover.cjs.js +3 -3
  142. package/dist/nile-popover/nile-popover.cjs.js.map +1 -1
  143. package/dist/nile-popover/nile-popover.esm.js +4 -4
  144. package/dist/nile-popover/nile-popover.test.cjs.js +1 -1
  145. package/dist/nile-popover/nile-popover.test.cjs.js.map +1 -1
  146. package/dist/nile-popover/nile-popover.test.esm.js +4 -4
  147. package/dist/nile-popup/nile-popup.test.cjs.js +1 -1
  148. package/dist/nile-popup/nile-popup.test.esm.js +1 -1
  149. package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js +1 -1
  150. package/dist/nile-progress-bar/nile-progress-bar.test.esm.js +1 -1
  151. package/dist/nile-radio/nile-radio.test.cjs.js +1 -1
  152. package/dist/nile-radio/nile-radio.test.esm.js +1 -1
  153. package/dist/nile-radio-group/nile-radio-group.test.cjs.js +1 -1
  154. package/dist/nile-radio-group/nile-radio-group.test.esm.js +1 -1
  155. package/dist/nile-select/index.cjs.js +1 -1
  156. package/dist/nile-select/index.esm.js +1 -1
  157. package/dist/nile-select/nile-select.cjs.js +1 -1
  158. package/dist/nile-select/nile-select.cjs.js.map +1 -1
  159. package/dist/nile-select/nile-select.esm.js +2 -2
  160. package/dist/nile-select/nile-select.test.cjs.js +1 -1
  161. package/dist/nile-select/nile-select.test.cjs.js.map +1 -1
  162. package/dist/nile-select/nile-select.test.esm.js +1 -1
  163. package/dist/nile-select/virtual-scroll-helper.cjs.js +1 -1
  164. package/dist/nile-select/virtual-scroll-helper.cjs.js.map +1 -1
  165. package/dist/nile-select/virtual-scroll-helper.esm.js +0 -2
  166. package/dist/nile-side-bar/nile-side-bar.cjs.js +1 -1
  167. package/dist/nile-side-bar/nile-side-bar.cjs.js.map +1 -1
  168. package/dist/nile-side-bar/nile-side-bar.css.cjs.js +1 -1
  169. package/dist/nile-side-bar/nile-side-bar.css.cjs.js.map +1 -1
  170. package/dist/nile-side-bar/nile-side-bar.css.esm.js +29 -24
  171. package/dist/nile-side-bar/nile-side-bar.esm.js +1 -7
  172. package/dist/nile-side-bar-expand/nile-side-bar-expand.cjs.js +1 -1
  173. package/dist/nile-side-bar-expand/nile-side-bar-expand.cjs.js.map +1 -1
  174. package/dist/nile-side-bar-expand/nile-side-bar-expand.css.cjs.js +1 -1
  175. package/dist/nile-side-bar-expand/nile-side-bar-expand.css.cjs.js.map +1 -1
  176. package/dist/nile-side-bar-expand/nile-side-bar-expand.css.esm.js +5 -3
  177. package/dist/nile-side-bar-expand/nile-side-bar-expand.esm.js +8 -8
  178. package/dist/nile-side-bar-footer/nile-side-bar-footer.css.cjs.js +1 -1
  179. package/dist/nile-side-bar-footer/nile-side-bar-footer.css.cjs.js.map +1 -1
  180. package/dist/nile-side-bar-footer/nile-side-bar-footer.css.esm.js +3 -5
  181. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.cjs.js +1 -1
  182. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.cjs.js.map +1 -1
  183. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.cjs.js +1 -1
  184. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.cjs.js.map +1 -1
  185. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.esm.js +5 -17
  186. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.esm.js +3 -3
  187. package/dist/nile-side-bar-group/nile-side-bar-group.css.cjs.js +1 -1
  188. package/dist/nile-side-bar-group/nile-side-bar-group.css.cjs.js.map +1 -1
  189. package/dist/nile-side-bar-group/nile-side-bar-group.css.esm.js +7 -4
  190. package/dist/nile-side-bar-group-item/nile-side-bar-group-item.css.cjs.js +1 -1
  191. package/dist/nile-side-bar-group-item/nile-side-bar-group-item.css.cjs.js.map +1 -1
  192. package/dist/nile-side-bar-group-item/nile-side-bar-group-item.css.esm.js +56 -58
  193. package/dist/nile-sidebar/index.cjs.js +2 -0
  194. package/dist/nile-sidebar/index.cjs.js.map +1 -0
  195. package/dist/nile-sidebar/index.esm.js +75 -0
  196. package/dist/nile-sidebar-menu/index.cjs.js +2 -0
  197. package/dist/nile-sidebar-menu/index.cjs.js.map +1 -0
  198. package/dist/nile-sidebar-menu/index.esm.js +1 -0
  199. package/dist/nile-sidebar-menu/nile-sidebar-menu.cjs.js +2 -0
  200. package/dist/nile-sidebar-menu/nile-sidebar-menu.cjs.js.map +1 -0
  201. package/dist/nile-sidebar-menu/nile-sidebar-menu.css.cjs.js +2 -0
  202. package/dist/nile-sidebar-menu/nile-sidebar-menu.css.cjs.js.map +1 -0
  203. package/dist/nile-sidebar-menu/nile-sidebar-menu.css.esm.js +38 -0
  204. package/dist/nile-sidebar-menu/nile-sidebar-menu.esm.js +10 -0
  205. package/dist/nile-sidebar-menu-items/index.cjs.js +2 -0
  206. package/dist/nile-sidebar-menu-items/index.cjs.js.map +1 -0
  207. package/dist/nile-sidebar-menu-items/index.esm.js +1 -0
  208. package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.cjs.js +2 -0
  209. package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.cjs.js.map +1 -0
  210. package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.css.cjs.js +2 -0
  211. package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.css.cjs.js.map +1 -0
  212. package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.css.esm.js +36 -0
  213. package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.esm.js +15 -0
  214. package/dist/nile-sidebar-wrapper/index.cjs.js +2 -0
  215. package/dist/nile-sidebar-wrapper/index.cjs.js.map +1 -0
  216. package/dist/nile-sidebar-wrapper/index.esm.js +1 -0
  217. package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.cjs.js +2 -0
  218. package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.cjs.js.map +1 -0
  219. package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.css.cjs.js +2 -0
  220. package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.css.cjs.js.map +1 -0
  221. package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.css.esm.js +105 -0
  222. package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.esm.js +16 -0
  223. package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +1 -1
  224. package/dist/nile-slide-toggle/nile-slide-toggle.test.esm.js +1 -1
  225. package/dist/nile-tab-group/nile-tab-group.test.cjs.js +1 -1
  226. package/dist/nile-tab-group/nile-tab-group.test.esm.js +1 -1
  227. package/dist/nile-textarea/nile-textarea.test.cjs.js +1 -1
  228. package/dist/nile-textarea/nile-textarea.test.esm.js +1 -1
  229. package/dist/nile-tooltip/index.cjs.js +1 -1
  230. package/dist/nile-tooltip/index.esm.js +1 -1
  231. package/dist/nile-tooltip/nile-tooltip.cjs.js +1 -1
  232. package/dist/nile-tooltip/nile-tooltip.cjs.js.map +1 -1
  233. package/dist/nile-tooltip/nile-tooltip.esm.js +2 -2
  234. package/dist/nile-virtual-select/group-manager.cjs.js +2 -0
  235. package/dist/nile-virtual-select/group-manager.cjs.js.map +1 -0
  236. package/dist/nile-virtual-select/group-manager.esm.js +1 -0
  237. package/dist/nile-virtual-select/index.cjs.js +1 -1
  238. package/dist/nile-virtual-select/index.esm.js +1 -1
  239. package/dist/nile-virtual-select/nile-virtual-select.cjs.js +2 -2
  240. package/dist/nile-virtual-select/nile-virtual-select.cjs.js.map +1 -1
  241. package/dist/nile-virtual-select/nile-virtual-select.esm.js +13 -13
  242. package/dist/nile-virtual-select/nile-virtual-select.test.cjs.js +1 -1
  243. package/dist/nile-virtual-select/nile-virtual-select.test.esm.js +1 -1
  244. package/dist/nile-virtual-select/temp_nile-virtual-select copy.cjs.js +2 -0
  245. package/dist/nile-virtual-select/temp_nile-virtual-select copy.cjs.js.map +1 -0
  246. package/dist/nile-virtual-select/temp_nile-virtual-select copy.esm.js +231 -0
  247. package/dist/scopedElementsWrapper-4c29be11.esm.js +7 -0
  248. package/dist/scopedElementsWrapper-a112fc73.cjs.js +6 -0
  249. package/dist/scopedElementsWrapper-a112fc73.cjs.js.map +1 -0
  250. package/dist/src/internal/portal-manager.d.ts +53 -0
  251. package/dist/src/internal/portal-manager.js +196 -0
  252. package/dist/src/internal/portal-manager.js.map +1 -0
  253. package/dist/src/internal/portal.d.ts +60 -0
  254. package/dist/src/internal/portal.js +199 -0
  255. package/dist/src/internal/portal.js.map +1 -0
  256. package/dist/src/internal/resizable-helper.d.ts +59 -0
  257. package/dist/src/internal/resizable-helper.js +115 -0
  258. package/dist/src/internal/resizable-helper.js.map +1 -0
  259. package/dist/src/internal/resizable-styles.d.ts +16 -0
  260. package/dist/src/internal/resizable-styles.js +144 -0
  261. package/dist/src/internal/resizable-styles.js.map +1 -0
  262. package/dist/src/internal/virtualizer-error-handler.d.ts +30 -0
  263. package/dist/src/internal/virtualizer-error-handler.js +82 -0
  264. package/dist/src/internal/virtualizer-error-handler.js.map +1 -0
  265. package/dist/src/lib/index.d.ts +7 -0
  266. package/dist/src/lib/index.js +8 -0
  267. package/dist/src/lib/index.js.map +1 -0
  268. package/dist/src/lib/virtualize.d.ts +32 -0
  269. package/dist/src/lib/virtualize.js +105 -0
  270. package/dist/src/lib/virtualize.js.map +1 -0
  271. package/dist/src/lib/virtualize.test.d.ts +7 -0
  272. package/dist/src/lib/virtualize.test.js +57 -0
  273. package/dist/src/lib/virtualize.test.js.map +1 -0
  274. package/dist/src/nile-auto-complete/nile-auto-complete.d.ts +4 -0
  275. package/dist/src/nile-auto-complete/nile-auto-complete.js +39 -0
  276. package/dist/src/nile-auto-complete/nile-auto-complete.js.map +1 -1
  277. package/dist/src/nile-badge/__snapshots__/nile-badge.test.snap.js +17 -0
  278. package/dist/src/nile-calendar/__snapshots__/nile-calendar.test.snap.js +310 -0
  279. package/dist/src/nile-calendar/nile-calendar.css.js +385 -108
  280. package/dist/src/nile-calendar/nile-calendar.css.js.map +1 -1
  281. package/dist/src/nile-calendar/nile-calendar.d.ts +17 -1
  282. package/dist/src/nile-calendar/nile-calendar.js +345 -108
  283. package/dist/src/nile-calendar/nile-calendar.js.map +1 -1
  284. package/dist/src/nile-card/__snapshots__/nile-card.test.snap.js +34 -0
  285. package/dist/src/nile-checkbox/__snapshots__/nile-checkbox.test.snap.js +31 -0
  286. package/dist/src/nile-chip/nile-chip.d.ts +4 -0
  287. package/dist/src/nile-chip/nile-chip.js +46 -0
  288. package/dist/src/nile-chip/nile-chip.js.map +1 -1
  289. package/dist/src/nile-code-editor/Old_theme copy.d.ts +191 -0
  290. package/dist/src/nile-code-editor/Old_theme copy.js +193 -0
  291. package/dist/src/nile-code-editor/Old_theme copy.js.map +1 -0
  292. package/dist/src/nile-code-editor/backup_nile-code-editor copy.d.ts +0 -0
  293. package/dist/src/nile-code-editor/backup_nile-code-editor copy.js +675 -0
  294. package/dist/src/nile-code-editor/backup_nile-code-editor copy.js.map +1 -0
  295. package/dist/src/nile-code-editor/theme copy.d.ts +191 -0
  296. package/dist/src/nile-code-editor/theme copy.js +193 -0
  297. package/dist/src/nile-code-editor/theme copy.js.map +1 -0
  298. package/dist/src/nile-dropdown/nile-dropdown.d.ts +4 -1
  299. package/dist/src/nile-dropdown/nile-dropdown.js +37 -1
  300. package/dist/src/nile-dropdown/nile-dropdown.js.map +1 -1
  301. package/dist/src/nile-dropdown/portal-manager.js +2 -0
  302. package/dist/src/nile-dropdown/portal-manager.js.map +1 -1
  303. package/dist/src/nile-dropdown/portal-utils.d.ts +1 -0
  304. package/dist/src/nile-dropdown/portal-utils.js +24 -0
  305. package/dist/src/nile-dropdown/portal-utils.js.map +1 -1
  306. package/dist/src/nile-floating-panel/anchor-manager.d.ts +26 -0
  307. package/dist/src/nile-floating-panel/anchor-manager.js +49 -0
  308. package/dist/src/nile-floating-panel/anchor-manager.js.map +1 -0
  309. package/dist/src/nile-floating-panel/content-manager.d.ts +23 -0
  310. package/dist/src/nile-floating-panel/content-manager.js +67 -0
  311. package/dist/src/nile-floating-panel/content-manager.js.map +1 -0
  312. package/dist/src/nile-floating-panel/event-manager.d.ts +38 -0
  313. package/dist/src/nile-floating-panel/event-manager.js +81 -0
  314. package/dist/src/nile-floating-panel/event-manager.js.map +1 -0
  315. package/dist/src/nile-floating-panel/index.d.ts +1 -0
  316. package/dist/src/nile-floating-panel/index.js +2 -0
  317. package/dist/src/nile-floating-panel/index.js.map +1 -0
  318. package/dist/src/nile-floating-panel/nile-floating-panel.css.d.ts +17 -0
  319. package/dist/src/nile-floating-panel/nile-floating-panel.css.js +51 -0
  320. package/dist/src/nile-floating-panel/nile-floating-panel.css.js.map +1 -0
  321. package/dist/src/nile-floating-panel/nile-floating-panel.d.ts +67 -0
  322. package/dist/src/nile-floating-panel/nile-floating-panel.js +203 -0
  323. package/dist/src/nile-floating-panel/nile-floating-panel.js.map +1 -0
  324. package/dist/src/nile-floating-panel/position-manager.d.ts +47 -0
  325. package/dist/src/nile-floating-panel/position-manager.js +94 -0
  326. package/dist/src/nile-floating-panel/position-manager.js.map +1 -0
  327. package/dist/src/nile-floating-panel/style-manager.d.ts +31 -0
  328. package/dist/src/nile-floating-panel/style-manager.js +74 -0
  329. package/dist/src/nile-floating-panel/style-manager.js.map +1 -0
  330. package/dist/src/nile-floating-panel/types.d.ts +29 -0
  331. package/dist/src/nile-floating-panel/types.js +8 -0
  332. package/dist/src/nile-floating-panel/types.js.map +1 -0
  333. package/dist/src/nile-grid/data-processor.d.ts +37 -0
  334. package/dist/src/nile-grid/data-processor.js +122 -0
  335. package/dist/src/nile-grid/data-processor.js.map +1 -0
  336. package/dist/src/nile-grid/event-handlers.d.ts +35 -0
  337. package/dist/src/nile-grid/event-handlers.js +158 -0
  338. package/dist/src/nile-grid/event-handlers.js.map +1 -0
  339. package/dist/src/nile-grid/renderer.d.ts +8 -0
  340. package/dist/src/nile-grid/renderer.js +78 -0
  341. package/dist/src/nile-grid/renderer.js.map +1 -0
  342. package/dist/src/nile-grid/resize-handler.d.ts +4 -0
  343. package/dist/src/nile-grid/resize-handler.js +36 -0
  344. package/dist/src/nile-grid/resize-handler.js.map +1 -0
  345. package/dist/src/nile-grid/types.d.ts +32 -0
  346. package/dist/src/nile-grid/types.js +2 -0
  347. package/dist/src/nile-grid/types.js.map +1 -0
  348. package/dist/src/nile-grid/utils.d.ts +4 -0
  349. package/dist/src/nile-grid/utils.js +32 -0
  350. package/dist/src/nile-grid/utils.js.map +1 -0
  351. package/dist/src/nile-hero/__snapshots__/nile-hero.test.snap.js +47 -0
  352. package/dist/src/nile-icon/__snapshots__/nile-icon.test.snap.js +16 -0
  353. package/dist/src/nile-inline-edit/nile-inline-edit.d.ts +10 -0
  354. package/dist/src/nile-inline-edit/nile-inline-edit.js +52 -1
  355. package/dist/src/nile-inline-edit/nile-inline-edit.js.map +1 -1
  356. package/dist/src/nile-inline-sidebar/nile-inline-sidebar.css.js +2 -10
  357. package/dist/src/nile-inline-sidebar/nile-inline-sidebar.css.js.map +1 -1
  358. package/dist/src/nile-inline-sidebar/nile-inline-sidebar.js +3 -11
  359. package/dist/src/nile-inline-sidebar/nile-inline-sidebar.js.map +1 -1
  360. package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.js +0 -6
  361. package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.js.map +1 -1
  362. package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.d.ts +0 -1
  363. package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.js +0 -4
  364. package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.js.map +1 -1
  365. package/dist/src/nile-input/__snapshots__/nile-input.test.snap.js +75 -0
  366. package/dist/src/nile-link/nile-link.css.js +3 -3
  367. package/dist/src/nile-link/nile-link.css.js.map +1 -1
  368. package/dist/src/nile-lite-tooltip/nile-lite-tooltip.d.ts +5 -1
  369. package/dist/src/nile-lite-tooltip/nile-lite-tooltip.js +43 -0
  370. package/dist/src/nile-lite-tooltip/nile-lite-tooltip.js.map +1 -1
  371. package/dist/src/nile-menu/portal-manager.d.ts +39 -0
  372. package/dist/src/nile-menu/portal-manager.js +340 -0
  373. package/dist/src/nile-menu/portal-manager.js.map +1 -0
  374. package/dist/src/nile-menu/portal-utils.d.ts +21 -0
  375. package/dist/src/nile-menu/portal-utils.js +128 -0
  376. package/dist/src/nile-menu/portal-utils.js.map +1 -0
  377. package/dist/src/nile-popover/__snapshots__/nile-popover.test.snap.js +22 -0
  378. package/dist/src/nile-popover/nile-popover.d.ts +4 -0
  379. package/dist/src/nile-popover/nile-popover.js +39 -0
  380. package/dist/src/nile-popover/nile-popover.js.map +1 -1
  381. package/dist/src/nile-popover/popover-portal-handler.d.ts +21 -0
  382. package/dist/src/nile-popover/popover-portal-handler.js +106 -0
  383. package/dist/src/nile-popover/popover-portal-handler.js.map +1 -0
  384. package/dist/src/nile-portal-wrapper/index.d.ts +1 -0
  385. package/dist/src/nile-portal-wrapper/index.js +2 -0
  386. package/dist/src/nile-portal-wrapper/index.js.map +1 -0
  387. package/dist/src/nile-portal-wrapper/nile-portal-wrapper.d.ts +47 -0
  388. package/dist/src/nile-portal-wrapper/nile-portal-wrapper.js +451 -0
  389. package/dist/src/nile-portal-wrapper/nile-portal-wrapper.js.map +1 -0
  390. package/dist/src/nile-select/body-append-manager.d.ts +90 -0
  391. package/dist/src/nile-select/body-append-manager.js +298 -0
  392. package/dist/src/nile-select/body-append-manager.js.map +1 -0
  393. package/dist/src/nile-select/nile-select.d.ts +1 -5
  394. package/dist/src/nile-select/nile-select.js +28 -67
  395. package/dist/src/nile-select/nile-select.js.map +1 -1
  396. package/dist/src/nile-select/virtual-scroll-helper.js +0 -2
  397. package/dist/src/nile-select/virtual-scroll-helper.js.map +1 -1
  398. package/dist/src/nile-side-bar/nile-side-bar.css.js +27 -22
  399. package/dist/src/nile-side-bar/nile-side-bar.css.js.map +1 -1
  400. package/dist/src/nile-side-bar/nile-side-bar.js +1 -7
  401. package/dist/src/nile-side-bar/nile-side-bar.js.map +1 -1
  402. package/dist/src/nile-side-bar-expand/nile-side-bar-expand.css.js +5 -3
  403. package/dist/src/nile-side-bar-expand/nile-side-bar-expand.css.js.map +1 -1
  404. package/dist/src/nile-side-bar-expand/nile-side-bar-expand.d.ts +0 -2
  405. package/dist/src/nile-side-bar-expand/nile-side-bar-expand.js +4 -12
  406. package/dist/src/nile-side-bar-expand/nile-side-bar-expand.js.map +1 -1
  407. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.css.js +1 -3
  408. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.css.js.map +1 -1
  409. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.js +3 -15
  410. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.js.map +1 -1
  411. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.d.ts +0 -1
  412. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.js +1 -8
  413. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.js.map +1 -1
  414. package/dist/src/nile-side-bar-group/nile-side-bar-group.css.js +5 -2
  415. package/dist/src/nile-side-bar-group/nile-side-bar-group.css.js.map +1 -1
  416. package/dist/src/nile-side-bar-group-item/nile-side-bar-group-item.css.js +46 -48
  417. package/dist/src/nile-side-bar-group-item/nile-side-bar-group-item.css.js.map +1 -1
  418. package/dist/src/nile-table-body/virtual-scroll-helper.d.ts +9 -0
  419. package/dist/src/nile-table-body/virtual-scroll-helper.js +24 -0
  420. package/dist/src/nile-table-body/virtual-scroll-helper.js.map +1 -0
  421. package/dist/src/nile-tooltip/nile-tooltip.d.ts +3 -0
  422. package/dist/src/nile-tooltip/nile-tooltip.js +36 -0
  423. package/dist/src/nile-tooltip/nile-tooltip.js.map +1 -1
  424. package/dist/src/nile-virtual-select/body-append-helper.d.ts +16 -0
  425. package/dist/src/nile-virtual-select/body-append-helper.js +95 -0
  426. package/dist/src/nile-virtual-select/body-append-helper.js.map +1 -0
  427. package/dist/src/nile-virtual-select/group-manager.d.ts +32 -0
  428. package/dist/src/nile-virtual-select/group-manager.js +134 -0
  429. package/dist/src/nile-virtual-select/group-manager.js.map +1 -0
  430. package/dist/src/nile-virtual-select/nile-virtual-select.d.ts +2 -5
  431. package/dist/src/nile-virtual-select/nile-virtual-select.js +28 -66
  432. package/dist/src/nile-virtual-select/nile-virtual-select.js.map +1 -1
  433. package/dist/src/nile-virtual-select/portal-utils.d.ts +65 -0
  434. package/dist/src/nile-virtual-select/portal-utils.js +376 -0
  435. package/dist/src/nile-virtual-select/portal-utils.js.map +1 -0
  436. package/dist/src/nile-virtual-select/temp_nile-virtual-select copy.d.ts +273 -0
  437. package/dist/src/nile-virtual-select/temp_nile-virtual-select copy.js +1305 -0
  438. package/dist/src/nile-virtual-select/temp_nile-virtual-select copy.js.map +1 -0
  439. package/dist/src/nile-virtual-select/virtualizer-error-handler.d.ts +21 -0
  440. package/dist/src/nile-virtual-select/virtualizer-error-handler.js +56 -0
  441. package/dist/src/nile-virtual-select/virtualizer-error-handler.js.map +1 -0
  442. package/dist/src/nile-virtual-select-disabled/index.d.ts +1 -0
  443. package/dist/src/nile-virtual-select-disabled/index.js +2 -0
  444. package/dist/src/nile-virtual-select-disabled/index.js.map +1 -0
  445. package/dist/src/nile-virtual-select-disabled/nile-virtual-select.css.d.ts +12 -0
  446. package/dist/src/nile-virtual-select-disabled/nile-virtual-select.css.js +538 -0
  447. package/dist/src/nile-virtual-select-disabled/nile-virtual-select.css.js.map +1 -0
  448. package/dist/src/nile-virtual-select-disabled/nile-virtual-select.d.ts +299 -0
  449. package/dist/src/nile-virtual-select-disabled/nile-virtual-select.js +1441 -0
  450. package/dist/src/nile-virtual-select-disabled/nile-virtual-select.js.map +1 -0
  451. package/dist/src/nile-virtual-select-disabled/nile-virtual-select.test.d.ts +7 -0
  452. package/dist/src/nile-virtual-select-disabled/nile-virtual-select.test.js +631 -0
  453. package/dist/src/nile-virtual-select-disabled/nile-virtual-select.test.js.map +1 -0
  454. package/dist/src/nile-virtual-select-disabled/portal-manager.d.ts +45 -0
  455. package/dist/src/nile-virtual-select-disabled/portal-manager.js +333 -0
  456. package/dist/src/nile-virtual-select-disabled/portal-manager.js.map +1 -0
  457. package/dist/src/nile-virtual-select-disabled/renderer.d.ts +16 -0
  458. package/dist/src/nile-virtual-select-disabled/renderer.js +79 -0
  459. package/dist/src/nile-virtual-select-disabled/renderer.js.map +1 -0
  460. package/dist/src/nile-virtual-select-disabled/search-manager.d.ts +12 -0
  461. package/dist/src/nile-virtual-select-disabled/search-manager.js +40 -0
  462. package/dist/src/nile-virtual-select-disabled/search-manager.js.map +1 -0
  463. package/dist/src/nile-virtual-select-disabled/selection-manager.d.ts +12 -0
  464. package/dist/src/nile-virtual-select-disabled/selection-manager.js +64 -0
  465. package/dist/src/nile-virtual-select-disabled/selection-manager.js.map +1 -0
  466. package/dist/src/nile-virtual-select-disabled/types.d.ts +50 -0
  467. package/dist/src/nile-virtual-select-disabled/types.js +8 -0
  468. package/dist/src/nile-virtual-select-disabled/types.js.map +1 -0
  469. package/dist/src/nile-virtual-table-body/index.d.ts +2 -0
  470. package/dist/src/nile-virtual-table-body/index.js +3 -0
  471. package/dist/src/nile-virtual-table-body/index.js.map +1 -0
  472. package/dist/src/nile-virtual-table-body/nile-virtual-table-body.css.d.ts +1 -0
  473. package/dist/src/nile-virtual-table-body/nile-virtual-table-body.css.js +44 -0
  474. package/dist/src/nile-virtual-table-body/nile-virtual-table-body.css.js.map +1 -0
  475. package/dist/src/nile-virtual-table-body/nile-virtual-table-body.d.ts +50 -0
  476. package/dist/src/nile-virtual-table-body/nile-virtual-table-body.js +135 -0
  477. package/dist/src/nile-virtual-table-body/nile-virtual-table-body.js.map +1 -0
  478. package/dist/src/nile-virtual-table-body/renderer.d.ts +16 -0
  479. package/dist/src/nile-virtual-table-body/renderer.js +49 -0
  480. package/dist/src/nile-virtual-table-body/renderer.js.map +1 -0
  481. package/dist/src/utilities/stepper-utils.d.ts +71 -0
  482. package/dist/src/utilities/stepper-utils.js +108 -0
  483. package/dist/src/utilities/stepper-utils.js.map +1 -0
  484. package/dist/src/version.js +2 -2
  485. package/dist/src/version.js.map +1 -1
  486. package/dist/tsconfig.tsbuildinfo +1 -1
  487. package/package.json +2 -2
  488. package/src/nile-auto-complete/nile-auto-complete.ts +41 -0
  489. package/src/nile-calendar/nile-calendar.css.ts +385 -108
  490. package/src/nile-calendar/nile-calendar.enum.ts +5 -0
  491. package/src/nile-calendar/nile-calendar.ts +374 -119
  492. package/src/nile-chip/nile-chip.ts +48 -0
  493. package/src/nile-dropdown/nile-dropdown.ts +39 -1
  494. package/src/nile-dropdown/portal-manager.ts +2 -0
  495. package/src/nile-dropdown/portal-utils.ts +26 -0
  496. package/src/nile-inline-edit/nile-inline-edit-utils.ts +94 -0
  497. package/src/nile-inline-edit/nile-inline-edit.ts +59 -1
  498. package/src/nile-inline-sidebar/nile-inline-sidebar.css.ts +2 -10
  499. package/src/nile-inline-sidebar/nile-inline-sidebar.ts +5 -17
  500. package/src/nile-inline-sidebar-item/nile-inline-sidebar-item.css.ts +0 -6
  501. package/src/nile-inline-sidebar-item/nile-inline-sidebar-item.ts +0 -1
  502. package/src/nile-link/nile-link.css.ts +3 -3
  503. package/src/nile-lite-tooltip/nile-lite-tooltip.ts +47 -1
  504. package/src/nile-popover/nile-popover.ts +43 -0
  505. package/src/nile-select/nile-select.ts +31 -87
  506. package/src/nile-select/virtual-scroll-helper.ts +0 -2
  507. package/src/nile-side-bar/nile-side-bar.css.ts +27 -22
  508. package/src/nile-side-bar/nile-side-bar.ts +1 -8
  509. package/src/nile-side-bar-expand/nile-side-bar-expand.css.ts +5 -3
  510. package/src/nile-side-bar-expand/nile-side-bar-expand.ts +4 -6
  511. package/src/nile-side-bar-footer/nile-side-bar-footer.css.ts +1 -3
  512. package/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.ts +3 -15
  513. package/src/nile-side-bar-footer-item/nile-side-bar-footer-item.ts +1 -9
  514. package/src/nile-side-bar-group/nile-side-bar-group.css.ts +5 -2
  515. package/src/nile-side-bar-group-item/nile-side-bar-group-item.css.ts +47 -49
  516. package/src/nile-tooltip/nile-tooltip.ts +37 -0
  517. package/src/nile-virtual-select/nile-virtual-select.ts +31 -87
  518. package/src/utilities/visibility-manager.ts +104 -0
  519. package/vscode-html-custom-data.json +124 -50
  520. package/dist/assets/nile-elements-4b5c262d.css +0 -1
  521. package/dist/nile-light-tooltip/index.esm.js +0 -1
  522. package/dist/nile-light-tooltip/nile-light-tooltip.css.esm.js +0 -6
  523. package/dist/nile-light-tooltip/nile-light-tooltip.esm.js +0 -1
  524. package/dist/src/nile-light-tooltip/index.d.ts +0 -1
  525. package/dist/src/nile-light-tooltip/index.js +0 -2
  526. package/dist/src/nile-light-tooltip/index.js.map +0 -1
  527. package/dist/src/nile-light-tooltip/nile-light-tooltip.css.d.ts +0 -12
  528. package/dist/src/nile-light-tooltip/nile-light-tooltip.css.js +0 -18
  529. package/dist/src/nile-light-tooltip/nile-light-tooltip.css.js.map +0 -1
  530. package/dist/src/nile-light-tooltip/nile-light-tooltip.d.ts +0 -40
  531. package/dist/src/nile-light-tooltip/nile-light-tooltip.js +0 -101
  532. package/dist/src/nile-light-tooltip/nile-light-tooltip.js.map +0 -1
  533. package/dist/src/nile-menu/virtual-menu-search-manager.d.ts +0 -11
  534. package/dist/src/nile-menu/virtual-menu-search-manager.js +0 -43
  535. package/dist/src/nile-menu/virtual-menu-search-manager.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import{__decorate as t}from"tslib";import{html as i}from"lit";import{query as s,property as e,customElement as o}from"lit/decorators.js";import{s as n}from"./nile-dropdown.css.esm.js";import{s as h,a}from"../internal/animate.esm.js";import{classMap as r}from"lit/directives/class-map.js";import{s as l,g as d}from"../utilities/animation-registry.esm.js";import{g as p}from"../internal/tabbable.esm.js";import{w as c}from"../internal/event.esm.js";import{w as m}from"../internal/watch.esm.js";import{N as u}from"../internal/nile-element.esm.js";import"../nile-popup/nile-popup.esm.js";import{D as w}from"./portal-manager.esm.js";import"../floating-ui.dom-cc9126da.esm.js";import"../nile-popup/nile-popup.css.esm.js";import"./portal-utils.esm.js";let f=class extends u{constructor(){super(...arguments),this.open=!1,this.placement="bottom-start",this.disabled=!1,this.stayOpenOnSelect=!1,this.distance=0,this.noOpenOnClick=!1,this.skidding=0,this.hoist=!1,this.portal=!1,this.portalManager=null}connectedCallback(){super.connectedCallback(),this.handlePanelSelect=this.handlePanelSelect.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.containingElement||(this.containingElement=this),this.emit("nile-init"),requestAnimationFrame((()=>{this.portal&&!this.portalManager&&(this.portalManager=new w(this))}))}firstUpdated(){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide(),this.emit("nile-destroy"),this.portalManager&&(this.portalManager.cleanupPortalAppend(),this.portalManager=null)}focusOnTrigger(){const t=this.trigger.assignedElements({flatten:!0})[0];"function"==typeof t?.focus&&t.focus()}getMenu(){return this.panel.assignedElements({flatten:!0}).find((t=>"nile-menu"===t.tagName.toLowerCase()))}handleKeyDown(t){this.open&&"Escape"===t.key&&(t.stopPropagation(),this.hide(),this.focusOnTrigger())}handleDocumentKeyDown(t){if("Escape"===t.key&&this.open)return t.stopPropagation(),this.focusOnTrigger(),void this.hide();if("Tab"===t.key){if(this.open&&"nile-menu-item"===document.activeElement?.tagName.toLowerCase())return t.preventDefault(),this.hide(),void this.focusOnTrigger();setTimeout((()=>{const t=this.containingElement?.getRootNode()instanceof ShadowRoot?document.activeElement?.shadowRoot?.activeElement:document.activeElement,i=this.containingElement&&t?.closest(this.containingElement.tagName.toLowerCase())===this.containingElement,s=this.portal&&this.portalManager?.portalContainerElement&&(t===this.portalManager.portalContainerElement||t?.closest(".nile-dropdown-portal-append")===this.portalManager.portalContainerElement);i||s||this.hide()}))}}handleDocumentMouseDown(t){const i=t.composedPath(),s=this.containingElement&&i.includes(this.containingElement),e=this.portal&&this.portalManager?.portalContainerElement&&i.includes(this.portalManager.portalContainerElement);s||e||this.hide()}handlePanelSelect(t){const i=t.target;this.stayOpenOnSelect||"nile-menu"!==i.tagName.toLowerCase()||(this.hide(),this.focusOnTrigger())}handleTriggerClick(){this.noOpenOnClick||(this.open?this.hide():(this.show(),this.focusOnTrigger()))}handleTriggerKeyDown(t){const i=this.getMenu();if(i){const s=i.getAllItems(),e=s[0],o=s[s.length-1];["ArrowDown","ArrowUp","Home","End"].includes(t.key)&&(t.preventDefault(),this.open||this.show(),s.length>0&&this.updateComplete.then((()=>{"ArrowDown"!==t.key&&"Home"!==t.key||(i.setCurrentItem(e),e.focus()),"ArrowUp"!==t.key&&"End"!==t.key||(i.setCurrentItem(o),o.focus())})))}}handleTriggerKeyUp(t){" "===t.key&&t.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}updateAccessibleTrigger(){const t=this.trigger.assignedElements({flatten:!0}).find((t=>p(t).start));let i;if(t){switch(t.tagName.toLowerCase()){case"nile-button":case"nile-icon-button":i=t.button;break;default:i=t}i.setAttribute("aria-haspopup","true"),i.setAttribute("aria-expanded",this.open?"true":"false")}}async show(){if(!this.open)return this.open=!0,c(this,"nile-after-show")}async hide(){if(this.open)return this.open=!1,c(this,"nile-after-hide")}reposition(){this.popup.reposition()}addOpenListeners(){this.panel.addEventListener("nile-select",this.handlePanelSelect),this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){this.panel&&(this.panel.removeEventListener("nile-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}updated(t){super.updated(t),t.has("portal")&&(this.portal&&!this.portalManager?(this.portalManager=new w(this),this.open&&this.portalManager.setupPortalAppend()):!this.portal&&this.portalManager&&(this.portalManager.cleanupPortalAppend(),this.portalManager=null))}async handleOpenChange(){if(this.disabled)this.open=!1;else if(this.updateAccessibleTrigger(),this.open){if(this.emit("nile-show"),this.addOpenListeners(),this.portal&&this.portalManager?this.portalManager.setupPortalAppend():this.portal&&!this.portalManager&&(this.portalManager=new w(this),this.portalManager.setupPortalAppend()),await h(this),!this.portal){this.panel.hidden=!1,this.popup.active=!0;const{keyframes:t,options:i}=d(this,"dropdown.show",{dir:""});await a(this.popup.popup,t,i)}this.emit("nile-after-show")}else{if(this.emit("nile-hide"),this.removeOpenListeners(),this.portal&&this.portalManager&&this.portalManager.cleanupPortalAppend(),await h(this),!this.portal){const{keyframes:t,options:i}=d(this,"dropdown.hide",{dir:""});await a(this.popup.popup,t,i),this.panel.hidden=!0,this.popup.active=!1}this.emit("nile-after-hide")}}render(){return i`
1
+ import{__decorate as t}from"tslib";import{html as i}from"lit";import{query as s,property as e,customElement as o}from"lit/decorators.js";import{s as n}from"./nile-dropdown.css.esm.js";import{s as h,a}from"../internal/animate.esm.js";import{classMap as r}from"lit/directives/class-map.js";import{s as l,g as d}from"../utilities/animation-registry.esm.js";import{g as p}from"../internal/tabbable.esm.js";import{w as c}from"../internal/event.esm.js";import{w as m}from"../internal/watch.esm.js";import{N as u}from"../internal/nile-element.esm.js";import"../nile-popup/nile-popup.esm.js";import{D as f}from"./portal-manager.esm.js";import{V as w}from"../utilities/visibility-manager.esm.js";import"../floating-ui.dom-cc9126da.esm.js";import"../nile-popup/nile-popup.css.esm.js";import"./portal-utils.esm.js";let y=class extends u{constructor(){super(...arguments),this.open=!1,this.placement="bottom-start",this.disabled=!1,this.stayOpenOnSelect=!1,this.distance=0,this.noOpenOnClick=!1,this.skidding=0,this.hoist=!1,this.portal=!1,this.enableVisibilityEffect=!1,this.enableTabClose=!1,this.portalManager=null}connectedCallback(){super.connectedCallback(),this.handlePanelSelect=this.handlePanelSelect.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.containingElement||(this.containingElement=this),this.emit("nile-init"),requestAnimationFrame((()=>{this.portal&&!this.portalManager&&(this.portalManager=new f(this))}))}async firstUpdated(t){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0),await this.updateComplete;const i=this.trigger.assignedElements({flatten:!0})[0];this.visibilityManager=new w({host:this,target:i||null,enableVisibilityEffect:this.enableVisibilityEffect,enableTabClose:this.enableTabClose,isOpen:()=>this.open,onAnchorOutOfView:()=>{this.hide(),this.emit("nile-visibility-change",{visible:!1,reason:"anchor-out-of-view"})},onDocumentHidden:()=>{this.hide(),this.emit("nile-visibility-change",{visible:!1,reason:"document-hidden"})},emit:(t,i)=>this.emit(`nile-${t}`,i)})}disconnectedCallback(){super.disconnectedCallback(),this.visibilityManager?.cleanup(),this.removeOpenListeners(),this.hide(),this.emit("nile-destroy"),this.portalManager&&(this.portalManager.cleanupPortalAppend(),this.portalManager=null)}focusOnTrigger(){const t=this.trigger.assignedElements({flatten:!0})[0];"function"==typeof t?.focus&&t.focus()}getMenu(){return this.panel.assignedElements({flatten:!0}).find((t=>"nile-menu"===t.tagName.toLowerCase()))}handleKeyDown(t){this.open&&"Escape"===t.key&&(t.stopPropagation(),this.hide(),this.focusOnTrigger())}handleDocumentKeyDown(t){if("Escape"===t.key&&this.open)return t.stopPropagation(),this.focusOnTrigger(),void this.hide();if("Tab"===t.key){if(this.open&&"nile-menu-item"===document.activeElement?.tagName.toLowerCase())return t.preventDefault(),this.hide(),void this.focusOnTrigger();setTimeout((()=>{const t=this.containingElement?.getRootNode()instanceof ShadowRoot?document.activeElement?.shadowRoot?.activeElement:document.activeElement,i=this.containingElement&&t?.closest(this.containingElement.tagName.toLowerCase())===this.containingElement,s=this.portal&&this.portalManager?.portalContainerElement&&(t===this.portalManager.portalContainerElement||t?.closest(".nile-dropdown-portal-append")===this.portalManager.portalContainerElement);i||s||this.hide()}))}}handleDocumentMouseDown(t){const i=t.composedPath(),s=this.containingElement&&i.includes(this.containingElement),e=this.portal&&this.portalManager?.portalContainerElement&&i.includes(this.portalManager.portalContainerElement);s||e||this.hide()}handlePanelSelect(t){const i=t.target;this.stayOpenOnSelect||"nile-menu"!==i.tagName.toLowerCase()||(this.hide(),this.focusOnTrigger())}handleTriggerClick(){this.noOpenOnClick||(this.open?this.hide():(this.show(),this.focusOnTrigger()))}handleTriggerKeyDown(t){const i=this.getMenu();if(i){const s=i.getAllItems(),e=s[0],o=s[s.length-1];["ArrowDown","ArrowUp","Home","End"].includes(t.key)&&(t.preventDefault(),this.open||this.show(),s.length>0&&this.updateComplete.then((()=>{"ArrowDown"!==t.key&&"Home"!==t.key||(i.setCurrentItem(e),e.focus()),"ArrowUp"!==t.key&&"End"!==t.key||(i.setCurrentItem(o),o.focus())})))}}handleTriggerKeyUp(t){" "===t.key&&t.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}updateAccessibleTrigger(){const t=this.trigger.assignedElements({flatten:!0}).find((t=>p(t).start));let i;if(t){switch(t.tagName.toLowerCase()){case"nile-button":case"nile-icon-button":i=t.button;break;default:i=t}i.setAttribute("aria-haspopup","true"),i.setAttribute("aria-expanded",this.open?"true":"false")}}async show(){if(!this.open)return this.open=!0,c(this,"nile-after-show")}async hide(){if(this.open)return this.open=!1,c(this,"nile-after-hide")}reposition(){this.popup.reposition()}addOpenListeners(){this.panel.addEventListener("nile-select",this.handlePanelSelect),this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){this.panel&&(this.panel.removeEventListener("nile-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}updated(t){super.updated(t),t.has("portal")&&(this.portal&&!this.portalManager?(this.portalManager=new f(this),this.open&&this.portalManager.setupPortalAppend()):!this.portal&&this.portalManager&&(this.portalManager.cleanupPortalAppend(),this.portalManager=null))}async handleOpenChange(){if(this.visibilityManager?.setup(),this.disabled)this.open=!1;else if(this.updateAccessibleTrigger(),this.open){if(this.emit("nile-show"),this.addOpenListeners(),this.portal&&this.portalManager?this.portalManager.setupPortalAppend():this.portal&&!this.portalManager&&(this.portalManager=new f(this),this.portalManager.setupPortalAppend()),await h(this),!this.portal){this.panel.hidden=!1,this.popup.active=!0;const{keyframes:t,options:i}=d(this,"dropdown.show",{dir:""});await a(this.popup.popup,t,i)}this.emit("nile-after-show")}else{if(this.emit("nile-hide"),this.removeOpenListeners(),this.visibilityManager?.cleanup(),this.portal&&this.portalManager&&this.portalManager.cleanupPortalAppend(),await h(this),!this.portal){const{keyframes:t,options:i}=d(this,"dropdown.hide",{dir:""});await a(this.popup.popup,t,i),this.panel.hidden=!0,this.popup.active=!1}this.emit("nile-after-hide")}}render(){return i`
2
2
  <nile-popup
3
3
  part="base"
4
4
  id="dropdown"
@@ -32,4 +32,4 @@ import{__decorate as t}from"tslib";import{html as i}from"lit";import{query as s,
32
32
  style=${this.portal&&this.portalManager?"display: none;":""}
33
33
  ></slot>
34
34
  </nile-popup>
35
- `}};f.styles=n,t([s(".dropdown")],f.prototype,"popup",void 0),t([s(".dropdown__trigger")],f.prototype,"trigger",void 0),t([s(".dropdown__panel")],f.prototype,"panel",void 0),t([e({type:Boolean,reflect:!0})],f.prototype,"open",void 0),t([e({reflect:!0})],f.prototype,"placement",void 0),t([e({type:Boolean,reflect:!0})],f.prototype,"disabled",void 0),t([e({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],f.prototype,"stayOpenOnSelect",void 0),t([e({attribute:!1})],f.prototype,"containingElement",void 0),t([e({type:Number})],f.prototype,"distance",void 0),t([e({type:Boolean})],f.prototype,"noOpenOnClick",void 0),t([e({type:Number})],f.prototype,"skidding",void 0),t([e()],f.prototype,"sync",void 0),t([e({type:Boolean})],f.prototype,"hoist",void 0),t([e({type:Boolean,reflect:!0})],f.prototype,"portal",void 0),t([m("open",{waitUntilFirstUpdate:!0})],f.prototype,"handleOpenChange",null),f=t([o("nile-dropdown")],f),l("dropdown.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),l("dropdown.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});export{f as N};
35
+ `}};y.styles=n,t([s(".dropdown")],y.prototype,"popup",void 0),t([s(".dropdown__trigger")],y.prototype,"trigger",void 0),t([s(".dropdown__panel")],y.prototype,"panel",void 0),t([e({type:Boolean,reflect:!0})],y.prototype,"open",void 0),t([e({reflect:!0})],y.prototype,"placement",void 0),t([e({type:Boolean,reflect:!0})],y.prototype,"disabled",void 0),t([e({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],y.prototype,"stayOpenOnSelect",void 0),t([e({attribute:!1})],y.prototype,"containingElement",void 0),t([e({type:Number})],y.prototype,"distance",void 0),t([e({type:Boolean})],y.prototype,"noOpenOnClick",void 0),t([e({type:Number})],y.prototype,"skidding",void 0),t([e()],y.prototype,"sync",void 0),t([e({type:Boolean})],y.prototype,"hoist",void 0),t([e({type:Boolean,reflect:!0})],y.prototype,"portal",void 0),t([e({type:Boolean,reflect:!0})],y.prototype,"enableVisibilityEffect",void 0),t([e({type:Boolean,reflect:!0})],y.prototype,"enableTabClose",void 0),t([m("open",{waitUntilFirstUpdate:!0})],y.prototype,"handleOpenChange",null),y=t([o("nile-dropdown")],y),l("dropdown.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),l("dropdown.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});export{y as N};
@@ -1,2 +1,2 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["../fixture-1c49c014.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-dropdown.cjs.js","tslib","lit/decorators.js","./nile-dropdown.css.cjs.js","../internal/animate.cjs.js","lit/directives/class-map.js","../utilities/animation-registry.cjs.js","../internal/tabbable.cjs.js","../internal/event.cjs.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","../nile-popup/nile-popup.cjs.js","../floating-ui.dom-007bbe96.cjs.js","../nile-popup/nile-popup.css.cjs.js","./portal-manager.cjs.js","./portal-utils.cjs.js"],function(_export,_context){"use strict";var n,o,t,e,i,s,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_templateObject12,_templateObject13,_templateObject14,_templateObject15;function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}return{setters:[function(_fixture005CjsJs){n=_fixture005CjsJs.f;o=_fixture005CjsJs.a;t=_fixture005CjsJs.e;e=_fixture005CjsJs.o;},function(_litStaticHtmlJs){i=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileDropdownCjsJs){s=_nileDropdownCjsJs.N;},function(_tslib){},function(_litDecoratorsJs){},function(_nileDropdownCssCjsJs){},function(_internalAnimateCjsJs){},function(_litDirectivesClassMapJs){},function(_utilitiesAnimationRegistryCjsJs){},function(_internalTabbableCjsJs){},function(_internalEventCjsJs){},function(_internalWatchCjsJs){},function(_internalNileElementCjsJs){},function(_nilePopupNilePopupCjsJs){},function(_floatingUiDom001CjsJs){},function(_nilePopupNilePopupCssCjsJs){},function(_portalManagerCjsJs){},function(_portalUtilsCjsJs){}],execute:function execute(){describe("NileDropdown",function(){it("should render correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var t;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return n(i(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-dropdown></nile-dropdown>"]))));case 2:t=_context2.sent;o(t).to.be.instanceOf(s),o(t.shadowRoot).not.to.be["null"];case 4:case"end":return _context2.stop();}},_callee);}))),it("should be closed by default",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var _t$shadowRoot;var t,e;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return n(i(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-dropdown></nile-dropdown>"]))));case 2:t=_context3.sent;o(t.open).to.be["false"];e=(_t$shadowRoot=t.shadowRoot)===null||_t$shadowRoot===void 0?void 0:_t$shadowRoot.querySelector(".dropdown__panel");o(e===null||e===void 0?void 0:e.getAttribute("aria-hidden")).to.equal("true");case 6:case"end":return _context3.stop();}},_callee2);}))),it('should open the dropdown when "open" property is set to true',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _e$shadowRoot;var e,s;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return n(i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-dropdown></nile-dropdown>"]))));case 2:e=_context4.sent;e.open=!0;_context4.next=6;return t(e);case 6:s=(_e$shadowRoot=e.shadowRoot)===null||_e$shadowRoot===void 0?void 0:_e$shadowRoot.querySelector(".dropdown__panel");o(e.open).to.be["true"],o(s===null||s===void 0?void 0:s.getAttribute("aria-hidden")).to.equal("false");case 8:case"end":return _context4.stop();}},_callee3);}))),it('should close the dropdown when "open" property is set to false',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _e$shadowRoot2;var e,s;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return n(i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-dropdown open></nile-dropdown>"]))));case 2:e=_context5.sent;e.open=!1;_context5.next=6;return t(e);case 6:s=(_e$shadowRoot2=e.shadowRoot)===null||_e$shadowRoot2===void 0?void 0:_e$shadowRoot2.querySelector(".dropdown__panel");o(e.open).to.be["false"],o(s===null||s===void 0?void 0:s.getAttribute("aria-hidden")).to.equal("true");case 8:case"end":return _context5.stop();}},_callee4);}))),it('should emit "nile-show" and "nile-after-show" when opening the dropdown',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var t,s,a;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return n(i(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-dropdown></nile-dropdown>"]))));case 2:t=_context6.sent;s=e(t,"nile-show");a=e(t,"nile-after-show");t.open=!0;_context6.next=8;return s;case 8:_context6.next=10;return a;case 10:o(t.open).to.be["true"];case 11:case"end":return _context6.stop();}},_callee5);}))),it('should emit "nile-hide" and "nile-after-hide" when closing the dropdown',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var t,s,a;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return n(i(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["<nile-dropdown open></nile-dropdown>"]))));case 2:t=_context7.sent;s=e(t,"nile-hide");a=e(t,"nile-after-hide");t.open=!1;_context7.next=8;return s;case 8:_context7.next=10;return a;case 10:o(t.open).to.be["false"];case 11:case"end":return _context7.stop();}},_callee6);}))),it('should not open the dropdown if "disabled" is true',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var _e$shadowRoot3;var e,s;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return n(i(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-dropdown disabled></nile-dropdown>"]))));case 2:e=_context8.sent;e.open=!0;_context8.next=6;return t(e);case 6:s=(_e$shadowRoot3=e.shadowRoot)===null||_e$shadowRoot3===void 0?void 0:_e$shadowRoot3.querySelector(".dropdown__panel");o(e.open).to.be["false"],o(s===null||s===void 0?void 0:s.getAttribute("aria-hidden")).to.equal("true");case 8:case"end":return _context8.stop();}},_callee7);}))),it("should toggle the dropdown when clicking the trigger",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var e,s;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return n(i(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n <nile-dropdown>\n <button slot=\"trigger\">Toggle</button>\n </nile-dropdown>\n "]))));case 2:e=_context9.sent;s=e.querySelector("button");s!==null&&s!==void 0&&s.click();_context9.next=7;return t(e);case 7:o(e.open).to.be["true"];s!==null&&s!==void 0&&s.click();_context9.next=11;return t(e);case 11:o(e.open).to.be["false"];case 12:case"end":return _context9.stop();}},_callee8);}))),it('should close the dropdown when "Escape" is pressed',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(){var e,s;return _regeneratorRuntime().wrap(function _callee9$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:_context10.next=2;return n(i(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["\n <nile-dropdown open>\n <button slot=\"trigger\">Toggle</button>\n </nile-dropdown>\n "]))));case 2:e=_context10.sent;s=new KeyboardEvent("keydown",{key:"Escape"});document.dispatchEvent(s);_context10.next=7;return t(e);case 7:o(e.open).to.be["false"];case 8:case"end":return _context10.stop();}},_callee9);}))),it('should keep the dropdown open when "stayOpenOnSelect" is true',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(){var e,s,a;return _regeneratorRuntime().wrap(function _callee10$(_context11){while(1)switch(_context11.prev=_context11.next){case 0:_context11.next=2;return n(i(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["\n <nile-dropdown stay-open-on-select>\n <button slot=\"trigger\">Toggle</button>\n <nile-menu>\n <nile-menu-item>Item 1</nile-menu-item>\n <nile-menu-item>Item 2</nile-menu-item>\n </nile-menu>\n </nile-dropdown>\n "]))));case 2:e=_context11.sent;s=e.querySelector("button");s!==null&&s!==void 0&&s.click();_context11.next=7;return t(e);case 7:a=e.querySelector("nile-menu-item");a!==null&&a!==void 0&&a.click();_context11.next=11;return t(e);case 11:o(e.open).to.be["true"];case 12:case"end":return _context11.stop();}},_callee10);}))),it('should apply the correct placement class when setting "placement"',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(){var _e$shadowRoot4;var e,s;return _regeneratorRuntime().wrap(function _callee11$(_context12){while(1)switch(_context12.prev=_context12.next){case 0:_context12.next=2;return n(i(_templateObject11||(_templateObject11=_taggedTemplateLiteral(["<nile-dropdown placement=\"top\"></nile-dropdown>"]))));case 2:e=_context12.sent;e.open=!0;_context12.next=6;return t(e);case 6:s=(_e$shadowRoot4=e.shadowRoot)===null||_e$shadowRoot4===void 0?void 0:_e$shadowRoot4.querySelector("nile-popup");o(s===null||s===void 0?void 0:s.getAttribute("placement")).to.equal("top");case 8:case"end":return _context12.stop();}},_callee11);}))),it('should reposition the dropdown when calling "reposition()"',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(){var e;return _regeneratorRuntime().wrap(function _callee12$(_context13){while(1)switch(_context13.prev=_context13.next){case 0:_context13.next=2;return n(i(_templateObject12||(_templateObject12=_taggedTemplateLiteral(["\n <nile-dropdown open>\n <button slot=\"trigger\">Toggle</button>\n <nile-menu>\n <nile-menu-item>Item 1</nile-menu-item>\n </nile-menu>\n </nile-dropdown>\n "]))));case 2:e=_context13.sent;e.reposition();_context13.next=6;return t(e);case 6:o(e).to.be.ok;case 7:case"end":return _context13.stop();}},_callee12);}))),it('should not open the dropdown if "noOpenOnClick" is true',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee13(){var e,s;return _regeneratorRuntime().wrap(function _callee13$(_context14){while(1)switch(_context14.prev=_context14.next){case 0:_context14.next=2;return n(i(_templateObject13||(_templateObject13=_taggedTemplateLiteral(["\n <nile-dropdown noOpenOnClick>\n <button slot=\"trigger\">Toggle</button>\n </nile-dropdown>\n "]))));case 2:e=_context14.sent;s=e.querySelector("button");s!==null&&s!==void 0&&s.click();_context14.next=7;return t(e);case 7:o(e.open).to.be["false"];case 8:case"end":return _context14.stop();}},_callee13);}))),it('should hoist the dropdown when "hoist" is true',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee14(){var _e$shadowRoot5;var e,s;return _regeneratorRuntime().wrap(function _callee14$(_context15){while(1)switch(_context15.prev=_context15.next){case 0:_context15.next=2;return n(i(_templateObject14||(_templateObject14=_taggedTemplateLiteral(["<nile-dropdown hoist></nile-dropdown>"]))));case 2:e=_context15.sent;e.open=!0;_context15.next=6;return t(e);case 6:s=(_e$shadowRoot5=e.shadowRoot)===null||_e$shadowRoot5===void 0?void 0:_e$shadowRoot5.querySelector("nile-popup");o(s===null||s===void 0?void 0:s.getAttribute("strategy")).to.equal("fixed");case 8:case"end":return _context15.stop();}},_callee14);}))),it("should apply animations when opening and closing",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee15(){var t,s,a;return _regeneratorRuntime().wrap(function _callee15$(_context16){while(1)switch(_context16.prev=_context16.next){case 0:_context16.next=2;return n(i(_templateObject15||(_templateObject15=_taggedTemplateLiteral(["<nile-dropdown></nile-dropdown>"]))));case 2:t=_context16.sent;s=e(t,"nile-after-show");t.open=!0;_context16.next=7;return s;case 7:a=e(t,"nile-after-hide");t.open=!1;_context16.next=11;return a;case 11:o(t.open).to.be["false"];case 12:case"end":return _context16.stop();}},_callee15);})));});}};});
1
+ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["../fixture-54600b35.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-dropdown.cjs.js","tslib","lit/decorators.js","./nile-dropdown.css.cjs.js","../internal/animate.cjs.js","lit/directives/class-map.js","../utilities/animation-registry.cjs.js","../internal/tabbable.cjs.js","../internal/event.cjs.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","../nile-popup/nile-popup.cjs.js","../floating-ui.dom-007bbe96.cjs.js","../nile-popup/nile-popup.css.cjs.js","./portal-manager.cjs.js","./portal-utils.cjs.js","../utilities/visibility-manager.cjs.js"],function(_export,_context){"use strict";var n,o,t,e,i,s,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_templateObject12,_templateObject13,_templateObject14,_templateObject15;function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}return{setters:[function(_fixture005CjsJs){n=_fixture005CjsJs.f;o=_fixture005CjsJs.a;t=_fixture005CjsJs.e;e=_fixture005CjsJs.o;},function(_litStaticHtmlJs){i=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileDropdownCjsJs){s=_nileDropdownCjsJs.N;},function(_tslib){},function(_litDecoratorsJs){},function(_nileDropdownCssCjsJs){},function(_internalAnimateCjsJs){},function(_litDirectivesClassMapJs){},function(_utilitiesAnimationRegistryCjsJs){},function(_internalTabbableCjsJs){},function(_internalEventCjsJs){},function(_internalWatchCjsJs){},function(_internalNileElementCjsJs){},function(_nilePopupNilePopupCjsJs){},function(_floatingUiDom001CjsJs){},function(_nilePopupNilePopupCssCjsJs){},function(_portalManagerCjsJs){},function(_portalUtilsCjsJs){},function(_utilitiesVisibilityManagerCjsJs){}],execute:function execute(){describe("NileDropdown",function(){it("should render correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var t;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return n(i(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-dropdown></nile-dropdown>"]))));case 2:t=_context2.sent;o(t).to.be.instanceOf(s),o(t.shadowRoot).not.to.be["null"];case 4:case"end":return _context2.stop();}},_callee);}))),it("should be closed by default",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var _t$shadowRoot;var t,e;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return n(i(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-dropdown></nile-dropdown>"]))));case 2:t=_context3.sent;o(t.open).to.be["false"];e=(_t$shadowRoot=t.shadowRoot)===null||_t$shadowRoot===void 0?void 0:_t$shadowRoot.querySelector(".dropdown__panel");o(e===null||e===void 0?void 0:e.getAttribute("aria-hidden")).to.equal("true");case 6:case"end":return _context3.stop();}},_callee2);}))),it('should open the dropdown when "open" property is set to true',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _e$shadowRoot;var e,s;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return n(i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-dropdown></nile-dropdown>"]))));case 2:e=_context4.sent;e.open=!0;_context4.next=6;return t(e);case 6:s=(_e$shadowRoot=e.shadowRoot)===null||_e$shadowRoot===void 0?void 0:_e$shadowRoot.querySelector(".dropdown__panel");o(e.open).to.be["true"],o(s===null||s===void 0?void 0:s.getAttribute("aria-hidden")).to.equal("false");case 8:case"end":return _context4.stop();}},_callee3);}))),it('should close the dropdown when "open" property is set to false',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _e$shadowRoot2;var e,s;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return n(i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-dropdown open></nile-dropdown>"]))));case 2:e=_context5.sent;e.open=!1;_context5.next=6;return t(e);case 6:s=(_e$shadowRoot2=e.shadowRoot)===null||_e$shadowRoot2===void 0?void 0:_e$shadowRoot2.querySelector(".dropdown__panel");o(e.open).to.be["false"],o(s===null||s===void 0?void 0:s.getAttribute("aria-hidden")).to.equal("true");case 8:case"end":return _context5.stop();}},_callee4);}))),it('should emit "nile-show" and "nile-after-show" when opening the dropdown',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var t,s,a;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return n(i(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-dropdown></nile-dropdown>"]))));case 2:t=_context6.sent;s=e(t,"nile-show");a=e(t,"nile-after-show");t.open=!0;_context6.next=8;return s;case 8:_context6.next=10;return a;case 10:o(t.open).to.be["true"];case 11:case"end":return _context6.stop();}},_callee5);}))),it('should emit "nile-hide" and "nile-after-hide" when closing the dropdown',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var t,s,a;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return n(i(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["<nile-dropdown open></nile-dropdown>"]))));case 2:t=_context7.sent;s=e(t,"nile-hide");a=e(t,"nile-after-hide");t.open=!1;_context7.next=8;return s;case 8:_context7.next=10;return a;case 10:o(t.open).to.be["false"];case 11:case"end":return _context7.stop();}},_callee6);}))),it('should not open the dropdown if "disabled" is true',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var _e$shadowRoot3;var e,s;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return n(i(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-dropdown disabled></nile-dropdown>"]))));case 2:e=_context8.sent;e.open=!0;_context8.next=6;return t(e);case 6:s=(_e$shadowRoot3=e.shadowRoot)===null||_e$shadowRoot3===void 0?void 0:_e$shadowRoot3.querySelector(".dropdown__panel");o(e.open).to.be["false"],o(s===null||s===void 0?void 0:s.getAttribute("aria-hidden")).to.equal("true");case 8:case"end":return _context8.stop();}},_callee7);}))),it("should toggle the dropdown when clicking the trigger",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var e,s;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return n(i(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n <nile-dropdown>\n <button slot=\"trigger\">Toggle</button>\n </nile-dropdown>\n "]))));case 2:e=_context9.sent;s=e.querySelector("button");s!==null&&s!==void 0&&s.click();_context9.next=7;return t(e);case 7:o(e.open).to.be["true"];s!==null&&s!==void 0&&s.click();_context9.next=11;return t(e);case 11:o(e.open).to.be["false"];case 12:case"end":return _context9.stop();}},_callee8);}))),it('should close the dropdown when "Escape" is pressed',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(){var e,s;return _regeneratorRuntime().wrap(function _callee9$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:_context10.next=2;return n(i(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["\n <nile-dropdown open>\n <button slot=\"trigger\">Toggle</button>\n </nile-dropdown>\n "]))));case 2:e=_context10.sent;s=new KeyboardEvent("keydown",{key:"Escape"});document.dispatchEvent(s);_context10.next=7;return t(e);case 7:o(e.open).to.be["false"];case 8:case"end":return _context10.stop();}},_callee9);}))),it('should keep the dropdown open when "stayOpenOnSelect" is true',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(){var e,s,a;return _regeneratorRuntime().wrap(function _callee10$(_context11){while(1)switch(_context11.prev=_context11.next){case 0:_context11.next=2;return n(i(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["\n <nile-dropdown stay-open-on-select>\n <button slot=\"trigger\">Toggle</button>\n <nile-menu>\n <nile-menu-item>Item 1</nile-menu-item>\n <nile-menu-item>Item 2</nile-menu-item>\n </nile-menu>\n </nile-dropdown>\n "]))));case 2:e=_context11.sent;s=e.querySelector("button");s!==null&&s!==void 0&&s.click();_context11.next=7;return t(e);case 7:a=e.querySelector("nile-menu-item");a!==null&&a!==void 0&&a.click();_context11.next=11;return t(e);case 11:o(e.open).to.be["true"];case 12:case"end":return _context11.stop();}},_callee10);}))),it('should apply the correct placement class when setting "placement"',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(){var _e$shadowRoot4;var e,s;return _regeneratorRuntime().wrap(function _callee11$(_context12){while(1)switch(_context12.prev=_context12.next){case 0:_context12.next=2;return n(i(_templateObject11||(_templateObject11=_taggedTemplateLiteral(["<nile-dropdown placement=\"top\"></nile-dropdown>"]))));case 2:e=_context12.sent;e.open=!0;_context12.next=6;return t(e);case 6:s=(_e$shadowRoot4=e.shadowRoot)===null||_e$shadowRoot4===void 0?void 0:_e$shadowRoot4.querySelector("nile-popup");o(s===null||s===void 0?void 0:s.getAttribute("placement")).to.equal("top");case 8:case"end":return _context12.stop();}},_callee11);}))),it('should reposition the dropdown when calling "reposition()"',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(){var e;return _regeneratorRuntime().wrap(function _callee12$(_context13){while(1)switch(_context13.prev=_context13.next){case 0:_context13.next=2;return n(i(_templateObject12||(_templateObject12=_taggedTemplateLiteral(["\n <nile-dropdown open>\n <button slot=\"trigger\">Toggle</button>\n <nile-menu>\n <nile-menu-item>Item 1</nile-menu-item>\n </nile-menu>\n </nile-dropdown>\n "]))));case 2:e=_context13.sent;e.reposition();_context13.next=6;return t(e);case 6:o(e).to.be.ok;case 7:case"end":return _context13.stop();}},_callee12);}))),it('should not open the dropdown if "noOpenOnClick" is true',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee13(){var e,s;return _regeneratorRuntime().wrap(function _callee13$(_context14){while(1)switch(_context14.prev=_context14.next){case 0:_context14.next=2;return n(i(_templateObject13||(_templateObject13=_taggedTemplateLiteral(["\n <nile-dropdown noOpenOnClick>\n <button slot=\"trigger\">Toggle</button>\n </nile-dropdown>\n "]))));case 2:e=_context14.sent;s=e.querySelector("button");s!==null&&s!==void 0&&s.click();_context14.next=7;return t(e);case 7:o(e.open).to.be["false"];case 8:case"end":return _context14.stop();}},_callee13);}))),it('should hoist the dropdown when "hoist" is true',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee14(){var _e$shadowRoot5;var e,s;return _regeneratorRuntime().wrap(function _callee14$(_context15){while(1)switch(_context15.prev=_context15.next){case 0:_context15.next=2;return n(i(_templateObject14||(_templateObject14=_taggedTemplateLiteral(["<nile-dropdown hoist></nile-dropdown>"]))));case 2:e=_context15.sent;e.open=!0;_context15.next=6;return t(e);case 6:s=(_e$shadowRoot5=e.shadowRoot)===null||_e$shadowRoot5===void 0?void 0:_e$shadowRoot5.querySelector("nile-popup");o(s===null||s===void 0?void 0:s.getAttribute("strategy")).to.equal("fixed");case 8:case"end":return _context15.stop();}},_callee14);}))),it("should apply animations when opening and closing",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee15(){var t,s,a;return _regeneratorRuntime().wrap(function _callee15$(_context16){while(1)switch(_context16.prev=_context16.next){case 0:_context16.next=2;return n(i(_templateObject15||(_templateObject15=_taggedTemplateLiteral(["<nile-dropdown></nile-dropdown>"]))));case 2:t=_context16.sent;s=e(t,"nile-after-show");t.open=!0;_context16.next=7;return s;case 7:a=e(t,"nile-after-hide");t.open=!1;_context16.next=11;return a;case 11:o(t.open).to.be["false"];case 12:case"end":return _context16.stop();}},_callee15);})));});}};});
2
2
  //# sourceMappingURL=nile-dropdown.test.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-dropdown.test.cjs.js","sources":["../../../src/nile-dropdown/nile-dropdown.test.ts"],"sourcesContent":["import { fixture, html, expect, oneEvent, elementUpdated } from '@open-wc/testing';\nimport './nile-dropdown';\nimport { NileDropdown } from './nile-dropdown';\nconst wait=(ms:number=50000)=>new Promise(resolve => setTimeout(resolve, ms))\n\ndescribe('NileDropdown', () => {\n\tit('should render correctly', async () => {\n const el = await fixture<NileDropdown>(html`<nile-dropdown></nile-dropdown>`);\n expect(el).to.be.instanceOf(NileDropdown);\n expect(el.shadowRoot).not.to.be.null;\n });\n\n it('should be closed by default', async () => {\n const el = await fixture<NileDropdown>(html`<nile-dropdown></nile-dropdown>`);\n expect(el.open).to.be.false;\n\n const panel = el.shadowRoot?.querySelector('.dropdown__panel');\n expect(panel?.getAttribute('aria-hidden')).to.equal('true');\n });\n\n it('should open the dropdown when \"open\" property is set to true', async () => {\n const el = await fixture<NileDropdown>(html`<nile-dropdown></nile-dropdown>`);\n el.open = true;\n await elementUpdated(el);\n\n const panel = el.shadowRoot?.querySelector('.dropdown__panel');\n expect(el.open).to.be.true;\n expect(panel?.getAttribute('aria-hidden')).to.equal('false');\n });\n\n it('should close the dropdown when \"open\" property is set to false', async () => {\n const el = await fixture<NileDropdown>(html`<nile-dropdown open></nile-dropdown>`);\n el.open = false;\n await elementUpdated(el);\n\n const panel = el.shadowRoot?.querySelector('.dropdown__panel');\n expect(el.open).to.be.false;\n expect(panel?.getAttribute('aria-hidden')).to.equal('true');\n });\n\n it('should emit \"nile-show\" and \"nile-after-show\" when opening the dropdown', async () => {\n const el = await fixture<NileDropdown>(html`<nile-dropdown></nile-dropdown>`);\n\n const showPromise = oneEvent(el, 'nile-show');\n const afterShowPromise = oneEvent(el, 'nile-after-show');\n\n el.open = true;\n await showPromise;\n await afterShowPromise;\n\n expect(el.open).to.be.true;\n });\n\n it('should emit \"nile-hide\" and \"nile-after-hide\" when closing the dropdown', async () => {\n const el = await fixture<NileDropdown>(html`<nile-dropdown open></nile-dropdown>`);\n\n const hidePromise = oneEvent(el, 'nile-hide');\n const afterHidePromise = oneEvent(el, 'nile-after-hide');\n\n el.open = false;\n await hidePromise;\n await afterHidePromise;\n\n expect(el.open).to.be.false;\n });\n\n it('should not open the dropdown if \"disabled\" is true', async () => {\n const el = await fixture<NileDropdown>(html`<nile-dropdown disabled></nile-dropdown>`);\n el.open = true;\n await elementUpdated(el);\n\n const panel = el.shadowRoot?.querySelector('.dropdown__panel');\n expect(el.open).to.be.false;\n expect(panel?.getAttribute('aria-hidden')).to.equal('true');\n });\n\n it('should toggle the dropdown when clicking the trigger', async () => {\n const el = await fixture<NileDropdown>(html`\n <nile-dropdown>\n <button slot=\"trigger\">Toggle</button>\n </nile-dropdown>\n `);\n\n const trigger = el.querySelector('button');\n trigger?.click();\n await elementUpdated(el);\n\n expect(el.open).to.be.true;\n\n trigger?.click();\n await elementUpdated(el);\n\n expect(el.open).to.be.false;\n });\n\n it('should close the dropdown when \"Escape\" is pressed', async () => {\n const el = await fixture<NileDropdown>(html`\n <nile-dropdown open>\n <button slot=\"trigger\">Toggle</button>\n </nile-dropdown>\n `);\n\n const event = new KeyboardEvent('keydown', { key: 'Escape' });\n document.dispatchEvent(event);\n await elementUpdated(el);\n\n expect(el.open).to.be.false;\n });\n\n it('should keep the dropdown open when \"stayOpenOnSelect\" is true', async () => {\n const el = await fixture<NileDropdown>(html`\n <nile-dropdown stay-open-on-select>\n <button slot=\"trigger\">Toggle</button>\n <nile-menu>\n <nile-menu-item>Item 1</nile-menu-item>\n <nile-menu-item>Item 2</nile-menu-item>\n </nile-menu>\n </nile-dropdown>\n `);\n\n const trigger = el.querySelector('button');\n trigger?.click();\n await elementUpdated(el);\n\n const menuItem = el.querySelector('nile-menu-item');\n menuItem?.click();\n await elementUpdated(el);\n\n expect(el.open).to.be.true; // Should stay open after selecting\n });\n\n it('should apply the correct placement class when setting \"placement\"', async () => {\n const el = await fixture<NileDropdown>(html`<nile-dropdown placement=\"top\"></nile-dropdown>`);\n el.open = true;\n await elementUpdated(el);\n\n const popup = el.shadowRoot?.querySelector('nile-popup');\n expect(popup?.getAttribute('placement')).to.equal('top');\n });\n\n it('should reposition the dropdown when calling \"reposition()\"', async () => {\n const el = await fixture<NileDropdown>(html`\n <nile-dropdown open>\n <button slot=\"trigger\">Toggle</button>\n <nile-menu>\n <nile-menu-item>Item 1</nile-menu-item>\n </nile-menu>\n </nile-dropdown>\n `);\n\n el.reposition();\n await elementUpdated(el);\n\n // No direct DOM check needed, the call to reposition should not throw any errors\n expect(el).to.be.ok;\n });\n\n it('should not open the dropdown if \"noOpenOnClick\" is true', async () => {\n const el = await fixture<NileDropdown>(html`\n <nile-dropdown noOpenOnClick>\n <button slot=\"trigger\">Toggle</button>\n </nile-dropdown>\n `);\n\n const trigger = el.querySelector('button');\n trigger?.click();\n await elementUpdated(el);\n\n expect(el.open).to.be.false;\n });\n\n it('should hoist the dropdown when \"hoist\" is true', async () => {\n const el = await fixture<NileDropdown>(html`<nile-dropdown hoist></nile-dropdown>`);\n el.open = true;\n await elementUpdated(el);\n\n const popup = el.shadowRoot?.querySelector('nile-popup');\n expect(popup?.getAttribute('strategy')).to.equal('fixed');\n });\n\n it('should apply animations when opening and closing', async () => {\n const el = await fixture<NileDropdown>(html`<nile-dropdown></nile-dropdown>`);\n\n const showPromise = oneEvent(el, 'nile-after-show');\n el.open = true;\n await showPromise;\n\n const hidePromise = oneEvent(el, 'nile-after-hide');\n el.open = false;\n await hidePromise;\n\n expect(el.open).to.be.false;\n });\n});\n"],"names":["describe","it","async","fixture","html","_templateObject","_taggedTemplateLiteral","expect","el","to","be","instanceOf","NileDropdown","shadowRoot","not","null","_context2","stop","_callee","_templateObject2","open","false","panel","querySelector","getAttribute","equal","_context3","_callee2","_templateObject3","elementUpdated","_context4","_callee3","_templateObject4","_context5","_callee4","_asyncToGenerator","_regeneratorRuntime","mark","_templateObject5","showPromise","oneEvent","afterShowPromise","_context6","next","true","_callee5","_templateObject6","hidePromise","afterHidePromise","_context7","_callee6","_templateObject7","_context8","_callee7","_templateObject8","trigger","click","_context9","_callee8","_templateObject9","event","KeyboardEvent","key","document","dispatchEvent","_context10","_callee9","_templateObject10","menuItem","_context11","_callee10","_templateObject11","popup","_context12","_callee11","_templateObject12","reposition","ok","_context13","_callee12","_templateObject13","_context14","_callee13","_templateObject14","_context15","_callee14","_templateObject15","_context16","_callee15"],"mappings":"0qUAKAA,QAAAA,CAAS,eAAgB,UACxBC,CAAAA,EAAAA,CAAG,yBAA2BC,cAAAA,iBAAAA,cAAAA,mBAAAA,GAAAA,IAAAA,CAAAA,SAAAA,QAAAA,MAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,SAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SAAAA,SAAAA,CAAAA,IAAAA,SACVC,CAAAA,CAAsBC,CAAAA,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,uCAC3CC,CAAAA,QADMC,CAAAA,CAAAA,SAAAA,CAAAA,IAAAA,CACND,CAAAA,CAAOC,CAAIC,CAAAA,CAAAA,EAAAA,CAAGC,EAAGC,CAAAA,UAAAA,CAAWC,CAC5BL,CAAAA,CAAAA,CAAAA,CAAOC,CAAGK,CAAAA,UAA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CAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,WAAAA,UAAAA,iBAAAA,UAAAA,CAAAA,IAAAA,CAAAA,UAAAA,CAAAA,IAAAA,SAAAA,UAAAA,CAAAA,IAAAA,SACpCC,CAAAA,CAAAA,CAAsBC,CAAI,CAAAkF,iBAAA,GAAAA,iBAAA,CAAAhF,sBAAA,uCAErCiC,CAAAA,QAFA/B,CAAWL,CAAAA,UAAAA,CAAAA,IAAAA,CAEXoC,CAAAA,CAAcC,CAAShC,CAAAA,CAAAA,CAAI,mBACjCA,CAAGY,CAAAA,IAAAA,CAAAA,CAAO,CACJmB,CAAAA,UAAAA,CAAAA,IAAAA,SAAAA,CAAAA,CAAAA,QAEAQ,CAAAA,CAAcP,CAAShC,CAAAA,CAAAA,CAAI,mBACjCA,CAAGY,CAAAA,IAAAA,CAAAA,CAAO,CACJ2B,CAAAA,UAAAA,CAAAA,IAAAA,UAAAA,CAAAA,CAAAA,SAENxC,EAAOC,CAAGY,CAAAA,IAAAA,CAAAA,CAAMX,EAAGC,CAAAA,EAAAA,SAAQ,0BAAA6E,UAAA,CAAAtE,IAAA,MAAAuE,SAAA,GAC3B,EAAA,CAAA,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"nile-dropdown.test.cjs.js","sources":["../../../src/nile-dropdown/nile-dropdown.test.ts"],"sourcesContent":["import { fixture, html, expect, oneEvent, elementUpdated } from '@open-wc/testing';\nimport './nile-dropdown';\nimport { NileDropdown } from './nile-dropdown';\nconst wait=(ms:number=50000)=>new Promise(resolve => setTimeout(resolve, ms))\n\ndescribe('NileDropdown', () => {\n\tit('should render correctly', async () => {\n const el = await fixture<NileDropdown>(html`<nile-dropdown></nile-dropdown>`);\n expect(el).to.be.instanceOf(NileDropdown);\n expect(el.shadowRoot).not.to.be.null;\n });\n\n it('should be closed by default', async () => {\n const el = await fixture<NileDropdown>(html`<nile-dropdown></nile-dropdown>`);\n expect(el.open).to.be.false;\n\n const panel = el.shadowRoot?.querySelector('.dropdown__panel');\n expect(panel?.getAttribute('aria-hidden')).to.equal('true');\n });\n\n it('should open the dropdown when \"open\" property is set to true', async () => {\n const el = await fixture<NileDropdown>(html`<nile-dropdown></nile-dropdown>`);\n el.open = true;\n await elementUpdated(el);\n\n const panel = el.shadowRoot?.querySelector('.dropdown__panel');\n expect(el.open).to.be.true;\n expect(panel?.getAttribute('aria-hidden')).to.equal('false');\n });\n\n it('should close the dropdown when \"open\" property is set to false', async () => {\n const el = await fixture<NileDropdown>(html`<nile-dropdown open></nile-dropdown>`);\n el.open = false;\n await elementUpdated(el);\n\n const panel = el.shadowRoot?.querySelector('.dropdown__panel');\n expect(el.open).to.be.false;\n expect(panel?.getAttribute('aria-hidden')).to.equal('true');\n });\n\n it('should emit \"nile-show\" and \"nile-after-show\" when opening the dropdown', async () => {\n const el = await fixture<NileDropdown>(html`<nile-dropdown></nile-dropdown>`);\n\n const showPromise = oneEvent(el, 'nile-show');\n const afterShowPromise = oneEvent(el, 'nile-after-show');\n\n el.open = true;\n await showPromise;\n await afterShowPromise;\n\n expect(el.open).to.be.true;\n });\n\n it('should emit \"nile-hide\" and \"nile-after-hide\" when closing the dropdown', async () => {\n const el = await fixture<NileDropdown>(html`<nile-dropdown open></nile-dropdown>`);\n\n const hidePromise = oneEvent(el, 'nile-hide');\n const afterHidePromise = oneEvent(el, 'nile-after-hide');\n\n el.open = false;\n await hidePromise;\n await afterHidePromise;\n\n expect(el.open).to.be.false;\n });\n\n it('should not open the dropdown if \"disabled\" is true', async () => {\n const el = await fixture<NileDropdown>(html`<nile-dropdown disabled></nile-dropdown>`);\n el.open = true;\n await elementUpdated(el);\n\n const panel = el.shadowRoot?.querySelector('.dropdown__panel');\n expect(el.open).to.be.false;\n expect(panel?.getAttribute('aria-hidden')).to.equal('true');\n });\n\n it('should toggle the dropdown when clicking the trigger', async () => {\n const el = await fixture<NileDropdown>(html`\n <nile-dropdown>\n <button slot=\"trigger\">Toggle</button>\n </nile-dropdown>\n `);\n\n const trigger = el.querySelector('button');\n trigger?.click();\n await elementUpdated(el);\n\n expect(el.open).to.be.true;\n\n trigger?.click();\n await elementUpdated(el);\n\n expect(el.open).to.be.false;\n });\n\n it('should close the dropdown when \"Escape\" is pressed', async () => {\n const el = await fixture<NileDropdown>(html`\n <nile-dropdown open>\n <button slot=\"trigger\">Toggle</button>\n </nile-dropdown>\n `);\n\n const event = new KeyboardEvent('keydown', { key: 'Escape' });\n document.dispatchEvent(event);\n await elementUpdated(el);\n\n expect(el.open).to.be.false;\n });\n\n it('should keep the dropdown open when \"stayOpenOnSelect\" is true', async () => {\n const el = await fixture<NileDropdown>(html`\n <nile-dropdown stay-open-on-select>\n <button slot=\"trigger\">Toggle</button>\n <nile-menu>\n <nile-menu-item>Item 1</nile-menu-item>\n <nile-menu-item>Item 2</nile-menu-item>\n </nile-menu>\n </nile-dropdown>\n `);\n\n const trigger = el.querySelector('button');\n trigger?.click();\n await elementUpdated(el);\n\n const menuItem = el.querySelector('nile-menu-item');\n menuItem?.click();\n await elementUpdated(el);\n\n expect(el.open).to.be.true; // Should stay open after selecting\n });\n\n it('should apply the correct placement class when setting \"placement\"', async () => {\n const el = await fixture<NileDropdown>(html`<nile-dropdown placement=\"top\"></nile-dropdown>`);\n el.open = true;\n await elementUpdated(el);\n\n const popup = el.shadowRoot?.querySelector('nile-popup');\n expect(popup?.getAttribute('placement')).to.equal('top');\n });\n\n it('should reposition the dropdown when calling \"reposition()\"', async () => {\n const el = await fixture<NileDropdown>(html`\n <nile-dropdown open>\n <button slot=\"trigger\">Toggle</button>\n <nile-menu>\n <nile-menu-item>Item 1</nile-menu-item>\n </nile-menu>\n </nile-dropdown>\n `);\n\n el.reposition();\n await elementUpdated(el);\n\n // No direct DOM check needed, the call to reposition should not throw any errors\n expect(el).to.be.ok;\n });\n\n it('should not open the dropdown if \"noOpenOnClick\" is true', async () => {\n const el = await fixture<NileDropdown>(html`\n <nile-dropdown noOpenOnClick>\n <button slot=\"trigger\">Toggle</button>\n </nile-dropdown>\n `);\n\n const trigger = el.querySelector('button');\n trigger?.click();\n await elementUpdated(el);\n\n expect(el.open).to.be.false;\n });\n\n it('should hoist the dropdown when \"hoist\" is true', async () => {\n const el = await fixture<NileDropdown>(html`<nile-dropdown hoist></nile-dropdown>`);\n el.open = true;\n await elementUpdated(el);\n\n const popup = el.shadowRoot?.querySelector('nile-popup');\n expect(popup?.getAttribute('strategy')).to.equal('fixed');\n });\n\n it('should apply animations when opening and closing', async () => {\n const el = await fixture<NileDropdown>(html`<nile-dropdown></nile-dropdown>`);\n\n const showPromise = oneEvent(el, 'nile-after-show');\n el.open = true;\n await showPromise;\n\n const hidePromise = oneEvent(el, 'nile-after-hide');\n el.open = false;\n await hidePromise;\n\n expect(el.open).to.be.false;\n });\n});\n"],"names":["describe","it","_asyncToGenerator","_regeneratorRuntime","mark","async","fixture","html","_templateObject","_taggedTemplateLiteral","el","expect","to","be","instanceOf","NileDropdown","shadowRoot","not","_context2","stop","_callee","_templateObject2","open","panel","querySelector","getAttribute","equal","_context3","_callee2","_templateObject3","elementUpdated","_context4","_callee3","_templateObject4","false","_context5","_callee4","_templateObject5","showPromise","oneEvent","afterShowPromise","_context6","next","true","_callee5","_templateObject6","hidePromise","afterHidePromise","_context7","_callee6","_templateObject7","_context8","_callee7","_templateObject8","trigger","click","_context9","_callee8","_templateObject9","event","KeyboardEvent","key","document","dispatchEvent","_context10","_callee9","_templateObject10","menuItem","_context11","_callee10","_templateObject11","popup","_context12","_callee11","_templateObject12","reposition","ok","_context13","_callee12","_templateObject13","_context14","_callee13","_templateObject14","_context15","_callee14","_templateObject15","_context16","_callee15"],"mappings":"gwUAKAA,SAAS,cAAgB,CAAA,UAAA,CACxBC,EAAG,CAAA,yBAAA,cAAAC,iBAAA,cAAAC,mBAAA,GAAAC,IAAA,CAA2BC,SAAAA,QAAAA,MAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,SAAAA,SAAAA,iBAAAA,SAAAA,CAAA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it/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import{N as s}from"./nile-dropdown.esm.js";import"tslib";import"lit/decorators.js";import"./nile-dropdown.css.esm.js";import"../internal/animate.esm.js";import"lit/directives/class-map.js";import"../utilities/animation-registry.esm.js";import"../internal/tabbable.esm.js";import"../internal/event.esm.js";import"../internal/watch.esm.js";import"../internal/nile-element.esm.js";import"../nile-popup/nile-popup.esm.js";import"../floating-ui.dom-cc9126da.esm.js";import"../nile-popup/nile-popup.css.esm.js";import"./portal-manager.esm.js";import"./portal-utils.esm.js";describe("NileDropdown",(()=>{it("should render correctly",(async()=>{const o=await n(i`<nile-dropdown></nile-dropdown>`);e(o).to.be.instanceOf(s),e(o.shadowRoot).not.to.be.null})),it("should be closed by default",(async()=>{const o=await n(i`<nile-dropdown></nile-dropdown>`);e(o.open).to.be.false;const t=o.shadowRoot?.querySelector(".dropdown__panel");e(t?.getAttribute("aria-hidden")).to.equal("true")})),it('should open the dropdown when "open" property is set to true',(async()=>{const t=await n(i`<nile-dropdown></nile-dropdown>`);t.open=!0,await o(t);const s=t.shadowRoot?.querySelector(".dropdown__panel");e(t.open).to.be.true,e(s?.getAttribute("aria-hidden")).to.equal("false")})),it('should close the dropdown when "open" property is set to false',(async()=>{const t=await n(i`<nile-dropdown open></nile-dropdown>`);t.open=!1,await o(t);const s=t.shadowRoot?.querySelector(".dropdown__panel");e(t.open).to.be.false,e(s?.getAttribute("aria-hidden")).to.equal("true")})),it('should emit "nile-show" and "nile-after-show" when opening the dropdown',(async()=>{const o=await n(i`<nile-dropdown></nile-dropdown>`),s=t(o,"nile-show"),a=t(o,"nile-after-show");o.open=!0,await s,await a,e(o.open).to.be.true})),it('should emit "nile-hide" and "nile-after-hide" when closing the dropdown',(async()=>{const o=await n(i`<nile-dropdown open></nile-dropdown>`),s=t(o,"nile-hide"),a=t(o,"nile-after-hide");o.open=!1,await s,await a,e(o.open).to.be.false})),it('should not open the dropdown if "disabled" is true',(async()=>{const t=await n(i`<nile-dropdown disabled></nile-dropdown>`);t.open=!0,await o(t);const s=t.shadowRoot?.querySelector(".dropdown__panel");e(t.open).to.be.false,e(s?.getAttribute("aria-hidden")).to.equal("true")})),it("should toggle the dropdown when clicking the trigger",(async()=>{const t=await n(i`
1
+ import{f as e,a as n,e as o,o as t}from"../fixture-9871e8a9.esm.js";import{html as i}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import{N as s}from"./nile-dropdown.esm.js";import"tslib";import"lit/decorators.js";import"./nile-dropdown.css.esm.js";import"../internal/animate.esm.js";import"lit/directives/class-map.js";import"../utilities/animation-registry.esm.js";import"../internal/tabbable.esm.js";import"../internal/event.esm.js";import"../internal/watch.esm.js";import"../internal/nile-element.esm.js";import"../nile-popup/nile-popup.esm.js";import"../floating-ui.dom-cc9126da.esm.js";import"../nile-popup/nile-popup.css.esm.js";import"./portal-manager.esm.js";import"./portal-utils.esm.js";import"../utilities/visibility-manager.esm.js";describe("NileDropdown",(()=>{it("should render correctly",(async()=>{const o=await e(i`<nile-dropdown></nile-dropdown>`);n(o).to.be.instanceOf(s),n(o.shadowRoot).not.to.be.null})),it("should be closed by default",(async()=>{const o=await e(i`<nile-dropdown></nile-dropdown>`);n(o.open).to.be.false;const t=o.shadowRoot?.querySelector(".dropdown__panel");n(t?.getAttribute("aria-hidden")).to.equal("true")})),it('should open the dropdown when "open" property is set to true',(async()=>{const t=await e(i`<nile-dropdown></nile-dropdown>`);t.open=!0,await o(t);const s=t.shadowRoot?.querySelector(".dropdown__panel");n(t.open).to.be.true,n(s?.getAttribute("aria-hidden")).to.equal("false")})),it('should close the dropdown when "open" property is set to false',(async()=>{const t=await e(i`<nile-dropdown open></nile-dropdown>`);t.open=!1,await o(t);const s=t.shadowRoot?.querySelector(".dropdown__panel");n(t.open).to.be.false,n(s?.getAttribute("aria-hidden")).to.equal("true")})),it('should emit "nile-show" and "nile-after-show" when opening the dropdown',(async()=>{const o=await e(i`<nile-dropdown></nile-dropdown>`),s=t(o,"nile-show"),a=t(o,"nile-after-show");o.open=!0,await s,await a,n(o.open).to.be.true})),it('should emit "nile-hide" and "nile-after-hide" when closing the dropdown',(async()=>{const o=await e(i`<nile-dropdown open></nile-dropdown>`),s=t(o,"nile-hide"),a=t(o,"nile-after-hide");o.open=!1,await s,await a,n(o.open).to.be.false})),it('should not open the dropdown if "disabled" is true',(async()=>{const t=await e(i`<nile-dropdown disabled></nile-dropdown>`);t.open=!0,await o(t);const s=t.shadowRoot?.querySelector(".dropdown__panel");n(t.open).to.be.false,n(s?.getAttribute("aria-hidden")).to.equal("true")})),it("should toggle the dropdown when clicking the trigger",(async()=>{const t=await e(i`
2
2
  <nile-dropdown>
3
3
  <button slot="trigger">Toggle</button>
4
4
  </nile-dropdown>
5
- `),s=t.querySelector("button");s?.click(),await o(t),e(t.open).to.be.true,s?.click(),await o(t),e(t.open).to.be.false})),it('should close the dropdown when "Escape" is pressed',(async()=>{const t=await n(i`
5
+ `),s=t.querySelector("button");s?.click(),await o(t),n(t.open).to.be.true,s?.click(),await o(t),n(t.open).to.be.false})),it('should close the dropdown when "Escape" is pressed',(async()=>{const t=await e(i`
6
6
  <nile-dropdown open>
7
7
  <button slot="trigger">Toggle</button>
8
8
  </nile-dropdown>
9
- `),s=new KeyboardEvent("keydown",{key:"Escape"});document.dispatchEvent(s),await o(t),e(t.open).to.be.false})),it('should keep the dropdown open when "stayOpenOnSelect" is true',(async()=>{const t=await n(i`
9
+ `),s=new KeyboardEvent("keydown",{key:"Escape"});document.dispatchEvent(s),await o(t),n(t.open).to.be.false})),it('should keep the dropdown open when "stayOpenOnSelect" is true',(async()=>{const t=await e(i`
10
10
  <nile-dropdown stay-open-on-select>
11
11
  <button slot="trigger">Toggle</button>
12
12
  <nile-menu>
@@ -14,15 +14,15 @@ import{f as n,a as e,e as o,o as t}from"../fixture-985bba12.esm.js";import{html
14
14
  <nile-menu-item>Item 2</nile-menu-item>
15
15
  </nile-menu>
16
16
  </nile-dropdown>
17
- `),s=t.querySelector("button");s?.click(),await o(t);const a=t.querySelector("nile-menu-item");a?.click(),await o(t),e(t.open).to.be.true})),it('should apply the correct placement class when setting "placement"',(async()=>{const t=await n(i`<nile-dropdown placement="top"></nile-dropdown>`);t.open=!0,await o(t);const s=t.shadowRoot?.querySelector("nile-popup");e(s?.getAttribute("placement")).to.equal("top")})),it('should reposition the dropdown when calling "reposition()"',(async()=>{const t=await n(i`
17
+ `),s=t.querySelector("button");s?.click(),await o(t);const a=t.querySelector("nile-menu-item");a?.click(),await o(t),n(t.open).to.be.true})),it('should apply the correct placement class when setting "placement"',(async()=>{const t=await e(i`<nile-dropdown placement="top"></nile-dropdown>`);t.open=!0,await o(t);const s=t.shadowRoot?.querySelector("nile-popup");n(s?.getAttribute("placement")).to.equal("top")})),it('should reposition the dropdown when calling "reposition()"',(async()=>{const t=await e(i`
18
18
  <nile-dropdown open>
19
19
  <button slot="trigger">Toggle</button>
20
20
  <nile-menu>
21
21
  <nile-menu-item>Item 1</nile-menu-item>
22
22
  </nile-menu>
23
23
  </nile-dropdown>
24
- `);t.reposition(),await o(t),e(t).to.be.ok})),it('should not open the dropdown if "noOpenOnClick" is true',(async()=>{const t=await n(i`
24
+ `);t.reposition(),await o(t),n(t).to.be.ok})),it('should not open the dropdown if "noOpenOnClick" is true',(async()=>{const t=await e(i`
25
25
  <nile-dropdown noOpenOnClick>
26
26
  <button slot="trigger">Toggle</button>
27
27
  </nile-dropdown>
28
- `),s=t.querySelector("button");s?.click(),await o(t),e(t.open).to.be.false})),it('should hoist the dropdown when "hoist" is true',(async()=>{const t=await n(i`<nile-dropdown hoist></nile-dropdown>`);t.open=!0,await o(t);const s=t.shadowRoot?.querySelector("nile-popup");e(s?.getAttribute("strategy")).to.equal("fixed")})),it("should apply animations when opening and closing",(async()=>{const o=await n(i`<nile-dropdown></nile-dropdown>`),s=t(o,"nile-after-show");o.open=!0,await s;const a=t(o,"nile-after-hide");o.open=!1,await a,e(o.open).to.be.false}))}));
28
+ `),s=t.querySelector("button");s?.click(),await o(t),n(t.open).to.be.false})),it('should hoist the dropdown when "hoist" is true',(async()=>{const t=await e(i`<nile-dropdown hoist></nile-dropdown>`);t.open=!0,await o(t);const s=t.shadowRoot?.querySelector("nile-popup");n(s?.getAttribute("strategy")).to.equal("fixed")})),it("should apply animations when opening and closing",(async()=>{const o=await e(i`<nile-dropdown></nile-dropdown>`),s=t(o,"nile-after-show");o.open=!0,await s;const a=t(o,"nile-after-hide");o.open=!1,await a,n(o.open).to.be.false}))}));
@@ -1,2 +1,2 @@
1
- System.register(["../floating-ui.dom-007bbe96.cjs.js","./portal-utils.cjs.js"],function(_export,_context){"use strict";var t,i,s,o,e,h,a,n,l,r,p;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}return{setters:[function(_floatingUiDom001CjsJs){t=_floatingUiDom001CjsJs.c;i=_floatingUiDom001CjsJs.o;s=_floatingUiDom001CjsJs.s;o=_floatingUiDom001CjsJs.f;e=_floatingUiDom001CjsJs.a;h=_floatingUiDom001CjsJs.p;a=_floatingUiDom001CjsJs.b;},function(_portalUtilsCjsJs){n=_portalUtilsCjsJs.P;l=_portalUtilsCjsJs.a;r=_portalUtilsCjsJs.b;}],execute:function execute(){_export("D",p=/*#__PURE__*/function(){function p(t){_classCallCheck(this,p);this.portalContainer=null,this.measuredPanelHeight=null,this.clonedPanel=null,this.cleanupAutoUpdate=null,this.currentPlacement="bottom-start",this.currentMiddlewareData=null,this.boundHandleWindowResize=null,this.component=t;}return _createClass(p,[{key:"createPortalAppendContainer",value:function createPortalAppendContainer(){var t=document.createElement("div");return t.style.position="absolute",t.style.zIndex="9999",t.style.pointerEvents="none",t.style.width="auto",t.style.maxWidth="none",t.style.minWidth="auto",t.className="nile-dropdown-portal-append",t;}},{key:"positionPortalAppend",value:function positionPortalAppend(){this.portalContainer&&this.component.open&&(this.measurePanelHeight(),this.computeFloatingUIPosition());}},{key:"measurePanelHeight",value:function measurePanelHeight(){!this.measuredPanelHeight&&this.portalContainer&&(this.portalContainer.style.position="absolute",this.portalContainer.style.visibility="hidden",this.portalContainer.style.top="0px",this.portalContainer.style.left="0px",this.portalContainer.offsetHeight,this.measuredPanelHeight=this.portalContainer.offsetHeight,this.portalContainer.style.visibility="");}},{key:"computeFloatingUIPosition",value:function(){var _computeFloatingUIPosition=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var _this$component$shado,_this$component$query;var t,i,_yield$this$calculate,_s,_o,_e,_h;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:if(this.portalContainer){_context2.next=2;break;}return _context2.abrupt("return");case 2:t=((_this$component$shado=this.component.shadowRoot)===null||_this$component$shado===void 0||(_this$component$shado=_this$component$shado.querySelector('[slot="anchor"]'))===null||_this$component$shado===void 0?void 0:_this$component$shado.assignedElements({flatten:!0})[0])||((_this$component$query=this.component.querySelector('[slot="trigger"]'))===null||_this$component$query===void 0?void 0:_this$component$query.assignedElements({flatten:!0})[0])||this.component,i=this.portalContainer;_context2.prev=3;_context2.next=6;return this.calculateFloatingUIPosition(t,i);case 6:_yield$this$calculate=_context2.sent;_s=_yield$this$calculate.x;_o=_yield$this$calculate.y;_e=_yield$this$calculate.placement;_h=_yield$this$calculate.middlewareData;this.applyFloatingUIPosition(i,t,_s,_o,_e,_h);_context2.next=17;break;case 14:_context2.prev=14;_context2.t0=_context2["catch"](3);console.warn("Floating UI positioning failed, falling back to simple positioning:",_context2.t0),this.fallbackPositioning();case 17:case"end":return _context2.stop();}},_callee,this,[[3,14]]);}));function computeFloatingUIPosition(){return _computeFloatingUIPosition.apply(this,arguments);}return computeFloatingUIPosition;}()},{key:"calculateFloatingUIPosition",value:function(){var _calculateFloatingUIPosition=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(i,s){var o,e,h;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:o=n.findBoundaryElements(i),e=this.getInitialPlacement(),h=this.createFloatingUIMiddleware(o);_context3.next=3;return t(i,s,{placement:e,strategy:"fixed",middleware:h,platform:this.createCustomPlatform()});case 3:return _context3.abrupt("return",_context3.sent);case 4:case"end":return _context3.stop();}},_callee2,this);}));function calculateFloatingUIPosition(_x,_x2){return _calculateFloatingUIPosition.apply(this,arguments);}return calculateFloatingUIPosition;}()},{key:"getInitialPlacement",value:function getInitialPlacement(){return this.component.placement||"bottom-start";}},{key:"createFloatingUIMiddleware",value:function createFloatingUIMiddleware(t){var h=[i(this.component.distance||0)];return this.component.sync&&h.push(s({apply:this.handleSizeMiddleware.bind(this),padding:10,boundary:t})),h.push(o({fallbackPlacements:this.getFallbackPlacements(),fallbackStrategy:"bestFit",padding:10,boundary:t})),h.push(e({padding:10,crossAxis:!0,boundary:t})),h;}},{key:"handleSizeMiddleware",value:function handleSizeMiddleware(_ref){var t=_ref.availableWidth,i=_ref.availableHeight,s=_ref.elements,o=_ref.rects;var e=n.calculateOptimalHeight(o.reference,window.innerHeight,this.currentPlacement);"width"!==this.component.sync&&"both"!==this.component.sync||(s.floating.style.width="".concat(o.reference.width,"px")),"height"!==this.component.sync&&"both"!==this.component.sync||(s.floating.style.height="".concat(o.reference.height,"px")),s.floating.style.maxHeight="".concat(e,"px"),s.floating.style.setProperty("--auto-size-available-width","".concat(t,"px")),s.floating.style.setProperty("--auto-size-available-height","".concat(e,"px"));}},{key:"getFallbackPlacements",value:function getFallbackPlacements(){var t=this.component.placement||"bottom-start",i=[];return t.startsWith("top")?i.push("bottom-start","bottom","bottom-end","top","top-end","right-start","left-start"):t.startsWith("bottom")?i.push("top-start","top","top-end","bottom","bottom-end","right-start","left-start"):t.startsWith("left")?i.push("right-start","right","right-end","left","left-end","top-start","bottom-start"):t.startsWith("right")&&i.push("left-start","left","left-end","right","right-end","top-start","bottom-start"),i;}},{key:"createCustomPlatform",value:function createCustomPlatform(){return h;}},{key:"applyFloatingUIPosition",value:function applyFloatingUIPosition(t,i,s,o,e,h){var a=i.getBoundingClientRect();Object.assign(t.style,{left:"".concat(s,"px"),top:"".concat(o,"px"),position:"fixed",pointerEvents:"auto",width:"auto",minWidth:"auto"}),"width"!==this.component.sync&&"both"!==this.component.sync||(t.style.width="".concat(a.width,"px")),this.currentPlacement=e,this.currentMiddlewareData=h,n.applyCollisionData(t,h,e);var l=e.split("-")[0];t.className="nile-dropdown-portal-append dropdown--open dropdown__panel--".concat(l);}},{key:"fallbackPositioning",value:function fallbackPositioning(){var _this$component$shado2,_this$component$query2;if(!this.portalContainer)return;var t=(((_this$component$shado2=this.component.shadowRoot)===null||_this$component$shado2===void 0||(_this$component$shado2=_this$component$shado2.querySelector('[slot="anchor"]'))===null||_this$component$shado2===void 0?void 0:_this$component$shado2.assignedElements({flatten:!0})[0])||((_this$component$query2=this.component.querySelector('[slot="trigger"]'))===null||_this$component$query2===void 0?void 0:_this$component$query2.assignedElements({flatten:!0})[0])||this.component).getBoundingClientRect(),i=window.innerHeight,s=window.innerWidth,o=i-t.bottom,e=t.top,h=s-t.right,a=t.left;var n,l,r,_p=t.left;var d=this.component.placement||"bottom-start";d.startsWith("bottom")?(r=Math.max(o-20,100),n=t.bottom+(this.component.distance||0),l="bottom"):d.startsWith("top")?(r=Math.max(e-20,100),n=Math.max(t.top-r-(this.component.distance||0),10),l="top"):d.startsWith("right")?(r=Math.max(Math.min(h,o,e)-20,100),n=t.top,_p=t.right+(this.component.distance||0),l="right"):(r=Math.max(Math.min(a,o,e)-20,100),n=t.top,_p=Math.max(t.left-200-(this.component.distance||0),10),l="left"),this.portalContainer.style.left="".concat(_p,"px"),this.portalContainer.style.top="".concat(n,"px"),this.portalContainer.style.maxHeight="".concat(r,"px"),this.portalContainer.style.pointerEvents="auto",this.portalContainer.style.width="auto",this.portalContainer.style.minWidth="auto","width"!==this.component.sync&&"both"!==this.component.sync||(this.portalContainer.style.width="".concat(t.width,"px")),this.portalContainer.className="nile-dropdown-portal-append dropdown__panel--".concat(l),this.calculateAndSetAutoSizeProperties(t,n,l);}},{key:"calculateAndSetAutoSizeProperties",value:function calculateAndSetAutoSizeProperties(t,i,s){if(!this.portalContainer)return;var o=window.innerHeight,e=window.innerWidth;var h,a=e-t.left-10;"top"===s?h=t.top-10:"bottom"===s?h=o-t.bottom-10:"left"===s?(h=Math.min(o-t.top,t.bottom),a=t.left-10):(h=Math.min(o-t.top,t.bottom),a=e-t.right-10),this.portalContainer.style.setProperty("--auto-size-available-height","".concat(Math.max(h,100),"px")),this.portalContainer.style.setProperty("--auto-size-available-width","".concat(Math.max(a,200),"px"));}},{key:"updatePortalAppendPosition",value:function updatePortalAppendPosition(){this.component.portal&&this.portalContainer&&this.positionPortalAppend();}},{key:"handleWindowResize",value:function handleWindowResize(){this.component.portal&&this.portalContainer&&this.positionPortalAppend();}},{key:"setupAutoUpdatePositioning",value:function setupAutoUpdatePositioning(){var _this$component$shado3,_this$component$query3,_this=this;if(!this.portalContainer||!this.component)return;this.cleanupAutoUpdatePositioning();var t=((_this$component$shado3=this.component.shadowRoot)===null||_this$component$shado3===void 0||(_this$component$shado3=_this$component$shado3.querySelector('[slot="anchor"]'))===null||_this$component$shado3===void 0?void 0:_this$component$shado3.assignedElements({flatten:!0})[0])||((_this$component$query3=this.component.querySelector('[slot="trigger"]'))===null||_this$component$query3===void 0?void 0:_this$component$query3.assignedElements({flatten:!0})[0])||this.component;this.cleanupAutoUpdate=a(t,this.portalContainer,function(){_this.computeFloatingUIPosition();},{ancestorScroll:!0,ancestorResize:!0,elementResize:!0,layoutShift:!0,animationFrame:!0});}},{key:"cleanupAutoUpdatePositioning",value:function cleanupAutoUpdatePositioning(){this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null);}},{key:"injectStylesToDocument",value:function injectStylesToDocument(){if(!this.portalContainer)return;var t=n.generateStyleId();if(document.getElementById(t))return;var i=this.component.constructor.styles;if(!i)return;var s=document.createElement("style");s.id=t,s.textContent=n.extractStylesAsCSS(i),document.head.appendChild(s),this.portalContainer.t=t;}},{key:"adoptStylesToPortalAppend",value:function adoptStylesToPortalAppend(){this.portalContainer&&this.injectStylesToDocument();}},{key:"setupPortalAppend",value:function setupPortalAppend(){var _this2=this;this.component.portal&&this.component.updateComplete.then(function(){setTimeout(function(){_this2.component.open&&(_this2.clonedPanel=_this2.createPortalPanel(),_this2.portalContainer=_this2.createPortalAppendContainer(),_this2.portalContainer.appendChild(_this2.clonedPanel),document.body.appendChild(_this2.portalContainer),_this2.adoptStylesToPortalAppend(),_this2.clonedPanel.style.display="",_this2.positionPortalAppend(),_this2.setupPortalEventListeners(),_this2.setupAutoUpdatePositioning(),_this2.boundHandleWindowResize=_this2.handleWindowResize.bind(_this2),window.addEventListener("resize",_this2.boundHandleWindowResize));},10);});}},{key:"createPortalPanel",value:function createPortalPanel(){return l.createPortalPanel(this.component);}},{key:"setupPortalEventListeners",value:function setupPortalEventListeners(){r.setupPortalEventListeners(this.clonedPanel,this.component);}},{key:"cleanupPortalAppend",value:function cleanupPortalAppend(){if(this.cleanupAutoUpdatePositioning(),this.portalContainer&&this.portalContainer.parentNode){var _t=this.portalContainer.t;if(_t){var _i=document.getElementById(_t);_i&&_i.remove();}this.portalContainer.parentNode.removeChild(this.portalContainer);}this.boundHandleWindowResize&&(window.removeEventListener("resize",this.boundHandleWindowResize),this.boundHandleWindowResize=null),this.portalContainer=null,this.clonedPanel=null,this.measuredPanelHeight=null,this.currentPlacement="bottom-start",this.currentMiddlewareData=null;}},{key:"portalContainerElement",get:function get(){return this.portalContainer;}},{key:"resetMeasuredHeight",value:function resetMeasuredHeight(){this.measuredPanelHeight=null;}},{key:"forceReposition",value:function forceReposition(){this.portalContainer&&this.computeFloatingUIPosition();}},{key:"getCurrentPlacement",value:function getCurrentPlacement(){return this.currentPlacement;}},{key:"getCurrentMiddlewareData",value:function getCurrentMiddlewareData(){return this.currentMiddlewareData;}},{key:"isUsingFloatingUI",value:function isUsingFloatingUI(){return null!==this.cleanupAutoUpdate;}},{key:"isPositioningOptimal",value:function isPositioningOptimal(){var _this$component$shado4,_this$component$query4;if(!this.portalContainer||!this.currentMiddlewareData)return!0;var t=(((_this$component$shado4=this.component.shadowRoot)===null||_this$component$shado4===void 0||(_this$component$shado4=_this$component$shado4.querySelector('[slot="anchor"]'))===null||_this$component$shado4===void 0?void 0:_this$component$shado4.assignedElements({flatten:!0})[0])||((_this$component$query4=this.component.querySelector('[slot="trigger"]'))===null||_this$component$query4===void 0?void 0:_this$component$query4.assignedElements({flatten:!0})[0])||this.component).getBoundingClientRect(),i=window.innerHeight-t.bottom,s=t.top,o=this.currentPlacement.startsWith("top"),e=this.currentPlacement.startsWith("bottom");return!(o&&i>s)&&!(e&&s>i);}},{key:"updatePortalPanel",value:function updatePortalPanel(){this.portalContainer&&this.clonedPanel&&(l.updatePortalPanel(this.clonedPanel,this.component),this.forceReposition());}}]);}());}};});
1
+ System.register(["../floating-ui.dom-007bbe96.cjs.js","./portal-utils.cjs.js"],function(_export,_context){"use strict";var t,i,s,o,e,h,a,n,l,r,p;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}return{setters:[function(_floatingUiDom001CjsJs){t=_floatingUiDom001CjsJs.c;i=_floatingUiDom001CjsJs.o;s=_floatingUiDom001CjsJs.s;o=_floatingUiDom001CjsJs.f;e=_floatingUiDom001CjsJs.a;h=_floatingUiDom001CjsJs.p;a=_floatingUiDom001CjsJs.b;},function(_portalUtilsCjsJs){n=_portalUtilsCjsJs.P;l=_portalUtilsCjsJs.a;r=_portalUtilsCjsJs.b;}],execute:function execute(){_export("D",p=/*#__PURE__*/function(){function p(t){_classCallCheck(this,p);this.portalContainer=null,this.measuredPanelHeight=null,this.clonedPanel=null,this.cleanupAutoUpdate=null,this.currentPlacement="bottom-start",this.currentMiddlewareData=null,this.boundHandleWindowResize=null,this.component=t;}return _createClass(p,[{key:"createPortalAppendContainer",value:function createPortalAppendContainer(){var t=document.createElement("div");return t.style.position="absolute",t.style.zIndex="9999",t.style.pointerEvents="none",t.style.width="auto",t.style.maxWidth="none",t.style.minWidth="auto",t.className="nile-dropdown-portal-append",t;}},{key:"positionPortalAppend",value:function positionPortalAppend(){this.portalContainer&&this.component.open&&(this.measurePanelHeight(),this.computeFloatingUIPosition());}},{key:"measurePanelHeight",value:function measurePanelHeight(){!this.measuredPanelHeight&&this.portalContainer&&(this.portalContainer.style.position="absolute",this.portalContainer.style.visibility="hidden",this.portalContainer.style.top="0px",this.portalContainer.style.left="0px",this.portalContainer.offsetHeight,this.measuredPanelHeight=this.portalContainer.offsetHeight,this.portalContainer.style.visibility="");}},{key:"computeFloatingUIPosition",value:function(){var _computeFloatingUIPosition=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var _this$component$shado,_this$component$query;var t,i,_yield$this$calculate,_s,_o,_e,_h;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:if(this.portalContainer){_context2.next=2;break;}return _context2.abrupt("return");case 2:t=((_this$component$shado=this.component.shadowRoot)===null||_this$component$shado===void 0||(_this$component$shado=_this$component$shado.querySelector('[slot="anchor"]'))===null||_this$component$shado===void 0?void 0:_this$component$shado.assignedElements({flatten:!0})[0])||((_this$component$query=this.component.querySelector('[slot="trigger"]'))===null||_this$component$query===void 0?void 0:_this$component$query.assignedElements({flatten:!0})[0])||this.component,i=this.portalContainer;_context2.prev=3;_context2.next=6;return this.calculateFloatingUIPosition(t,i);case 6:_yield$this$calculate=_context2.sent;_s=_yield$this$calculate.x;_o=_yield$this$calculate.y;_e=_yield$this$calculate.placement;_h=_yield$this$calculate.middlewareData;this.applyFloatingUIPosition(i,t,_s,_o,_e,_h);_context2.next=17;break;case 14:_context2.prev=14;_context2.t0=_context2["catch"](3);console.warn("Floating UI positioning failed, falling back to simple positioning:",_context2.t0),this.fallbackPositioning();case 17:case"end":return _context2.stop();}},_callee,this,[[3,14]]);}));function computeFloatingUIPosition(){return _computeFloatingUIPosition.apply(this,arguments);}return computeFloatingUIPosition;}()},{key:"calculateFloatingUIPosition",value:function(){var _calculateFloatingUIPosition=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(i,s){var o,e,h;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:o=n.findBoundaryElements(i),e=this.getInitialPlacement(),h=this.createFloatingUIMiddleware(o);_context3.next=3;return t(i,s,{placement:e,strategy:"fixed",middleware:h,platform:this.createCustomPlatform()});case 3:return _context3.abrupt("return",_context3.sent);case 4:case"end":return _context3.stop();}},_callee2,this);}));function calculateFloatingUIPosition(_x,_x2){return _calculateFloatingUIPosition.apply(this,arguments);}return calculateFloatingUIPosition;}()},{key:"getInitialPlacement",value:function getInitialPlacement(){return this.component.placement||"bottom-start";}},{key:"createFloatingUIMiddleware",value:function createFloatingUIMiddleware(t){var h=[i(this.component.distance||0)];return this.component.sync&&h.push(s({apply:this.handleSizeMiddleware.bind(this),padding:10,boundary:t})),h.push(o({fallbackPlacements:this.getFallbackPlacements(),fallbackStrategy:"bestFit",padding:10,boundary:t})),h.push(e({padding:10,crossAxis:!0,boundary:t})),h;}},{key:"handleSizeMiddleware",value:function handleSizeMiddleware(_ref){var t=_ref.availableWidth,i=_ref.availableHeight,s=_ref.elements,o=_ref.rects;var e=n.calculateOptimalHeight(o.reference,window.innerHeight,this.currentPlacement);"width"!==this.component.sync&&"both"!==this.component.sync||(s.floating.style.width="".concat(o.reference.width,"px")),"height"!==this.component.sync&&"both"!==this.component.sync||(s.floating.style.height="".concat(o.reference.height,"px")),s.floating.style.maxHeight="".concat(e,"px"),s.floating.style.setProperty("--auto-size-available-width","".concat(t,"px")),s.floating.style.setProperty("--auto-size-available-height","".concat(e,"px"));}},{key:"getFallbackPlacements",value:function getFallbackPlacements(){var t=this.component.placement||"bottom-start",i=[];return t.startsWith("top")?i.push("bottom-start","bottom","bottom-end","top","top-end","right-start","left-start"):t.startsWith("bottom")?i.push("top-start","top","top-end","bottom","bottom-end","right-start","left-start"):t.startsWith("left")?i.push("right-start","right","right-end","left","left-end","top-start","bottom-start"):t.startsWith("right")&&i.push("left-start","left","left-end","right","right-end","top-start","bottom-start"),i;}},{key:"createCustomPlatform",value:function createCustomPlatform(){return h;}},{key:"applyFloatingUIPosition",value:function applyFloatingUIPosition(t,i,s,o,e,h){var a=i.getBoundingClientRect();Object.assign(t.style,{left:"".concat(s,"px"),top:"".concat(o,"px"),position:"fixed",pointerEvents:"auto",width:"auto",minWidth:"auto"}),"width"!==this.component.sync&&"both"!==this.component.sync||(t.style.width="".concat(a.width,"px")),this.currentPlacement=e,this.currentMiddlewareData=h,n.applyCollisionData(t,h,e);var l=e.split("-")[0];t.className="nile-dropdown-portal-append dropdown--open dropdown__panel--".concat(l);}},{key:"fallbackPositioning",value:function fallbackPositioning(){var _this$component$shado2,_this$component$query2;if(!this.portalContainer)return;var t=(((_this$component$shado2=this.component.shadowRoot)===null||_this$component$shado2===void 0||(_this$component$shado2=_this$component$shado2.querySelector('[slot="anchor"]'))===null||_this$component$shado2===void 0?void 0:_this$component$shado2.assignedElements({flatten:!0})[0])||((_this$component$query2=this.component.querySelector('[slot="trigger"]'))===null||_this$component$query2===void 0?void 0:_this$component$query2.assignedElements({flatten:!0})[0])||this.component).getBoundingClientRect(),i=window.innerHeight,s=window.innerWidth,o=i-t.bottom,e=t.top,h=s-t.right,a=t.left;var n,l,r,_p=t.left;var d=this.component.placement||"bottom-start";d.startsWith("bottom")?(r=Math.max(o-20,100),n=t.bottom+(this.component.distance||0),l="bottom"):d.startsWith("top")?(r=Math.max(e-20,100),n=Math.max(t.top-r-(this.component.distance||0),10),l="top"):d.startsWith("right")?(r=Math.max(Math.min(h,o,e)-20,100),n=t.top,_p=t.right+(this.component.distance||0),l="right"):(r=Math.max(Math.min(a,o,e)-20,100),n=t.top,_p=Math.max(t.left-200-(this.component.distance||0),10),l="left"),this.portalContainer.style.left="".concat(_p,"px"),this.portalContainer.style.top="".concat(n,"px"),this.portalContainer.style.maxHeight="".concat(r,"px"),this.portalContainer.style.pointerEvents="auto",this.portalContainer.style.width="auto",this.portalContainer.style.minWidth="auto","width"!==this.component.sync&&"both"!==this.component.sync||(this.portalContainer.style.width="".concat(t.width,"px")),this.portalContainer.className="nile-dropdown-portal-append dropdown__panel--".concat(l),this.calculateAndSetAutoSizeProperties(t,n,l);}},{key:"calculateAndSetAutoSizeProperties",value:function calculateAndSetAutoSizeProperties(t,i,s){if(!this.portalContainer)return;var o=window.innerHeight,e=window.innerWidth;var h,a=e-t.left-10;"top"===s?h=t.top-10:"bottom"===s?h=o-t.bottom-10:"left"===s?(h=Math.min(o-t.top,t.bottom),a=t.left-10):(h=Math.min(o-t.top,t.bottom),a=e-t.right-10),this.portalContainer.style.setProperty("--auto-size-available-height","".concat(Math.max(h,100),"px")),this.portalContainer.style.setProperty("--auto-size-available-width","".concat(Math.max(a,200),"px"));}},{key:"updatePortalAppendPosition",value:function updatePortalAppendPosition(){this.component.portal&&this.portalContainer&&this.positionPortalAppend();}},{key:"handleWindowResize",value:function handleWindowResize(){this.component.portal&&this.portalContainer&&this.positionPortalAppend();}},{key:"setupAutoUpdatePositioning",value:function setupAutoUpdatePositioning(){var _this$component$shado3,_this$component$query3,_this=this;if(!this.portalContainer||!this.component)return;this.cleanupAutoUpdatePositioning();var t=((_this$component$shado3=this.component.shadowRoot)===null||_this$component$shado3===void 0||(_this$component$shado3=_this$component$shado3.querySelector('[slot="anchor"]'))===null||_this$component$shado3===void 0?void 0:_this$component$shado3.assignedElements({flatten:!0})[0])||((_this$component$query3=this.component.querySelector('[slot="trigger"]'))===null||_this$component$query3===void 0?void 0:_this$component$query3.assignedElements({flatten:!0})[0])||this.component;this.cleanupAutoUpdate=a(t,this.portalContainer,function(){_this.computeFloatingUIPosition();},{ancestorScroll:!0,ancestorResize:!0,elementResize:!0,layoutShift:!0,animationFrame:!0});}},{key:"cleanupAutoUpdatePositioning",value:function cleanupAutoUpdatePositioning(){this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null);}},{key:"injectStylesToDocument",value:function injectStylesToDocument(){if(!this.portalContainer)return;var t=n.generateStyleId();if(document.getElementById(t))return;var i=this.component.constructor.styles;if(!i)return;var s=document.createElement("style");s.id=t,s.textContent=n.extractStylesAsCSS(i),document.head.appendChild(s),this.portalContainer.t=t;}},{key:"adoptStylesToPortalAppend",value:function adoptStylesToPortalAppend(){this.portalContainer&&this.injectStylesToDocument();}},{key:"setupPortalAppend",value:function setupPortalAppend(){var _this2=this;this.component.portal&&this.component.updateComplete.then(function(){setTimeout(function(){_this2.component.open&&(_this2.clonedPanel=_this2.createPortalPanel(),_this2.portalContainer=_this2.createPortalAppendContainer(),_this2.portalContainer.appendChild(_this2.clonedPanel),document.body.appendChild(_this2.portalContainer),_this2.adoptStylesToPortalAppend(),_this2.clonedPanel.style.display="",_this2.positionPortalAppend(),_this2.setupPortalEventListeners(),_this2.setupAutoUpdatePositioning(),_this2.boundHandleWindowResize=_this2.handleWindowResize.bind(_this2),window.addEventListener("resize",_this2.boundHandleWindowResize));},10);});}},{key:"createPortalPanel",value:function createPortalPanel(){return l.createPortalPanel(this.component);}},{key:"setupPortalEventListeners",value:function setupPortalEventListeners(){r.setupPortalEventListeners(this.clonedPanel,this.component);}},{key:"cleanupPortalAppend",value:function cleanupPortalAppend(){if(this.cleanupAutoUpdatePositioning(),this.portalContainer&&this.portalContainer.parentNode){var _t=this.portalContainer.t;if(_t){var _i=document.getElementById(_t);_i&&_i.remove();}this.portalContainer.parentNode.removeChild(this.portalContainer);}this.boundHandleWindowResize&&(window.removeEventListener("resize",this.boundHandleWindowResize),this.boundHandleWindowResize=null),this.portalContainer=null,this.clonedPanel=null,this.measuredPanelHeight=null,this.currentPlacement="bottom-start",this.currentMiddlewareData=null;}},{key:"portalContainerElement",get:function get(){return this.portalContainer;}},{key:"resetMeasuredHeight",value:function resetMeasuredHeight(){this.measuredPanelHeight=null;}},{key:"forceReposition",value:function forceReposition(){this.portalContainer&&this.computeFloatingUIPosition();}},{key:"getCurrentPlacement",value:function getCurrentPlacement(){return this.currentPlacement;}},{key:"getCurrentMiddlewareData",value:function getCurrentMiddlewareData(){return this.currentMiddlewareData;}},{key:"isUsingFloatingUI",value:function isUsingFloatingUI(){return null!==this.cleanupAutoUpdate;}},{key:"isPositioningOptimal",value:function isPositioningOptimal(){var _this$component$shado4,_this$component$query4;if(!this.portalContainer||!this.currentMiddlewareData)return!0;var t=(((_this$component$shado4=this.component.shadowRoot)===null||_this$component$shado4===void 0||(_this$component$shado4=_this$component$shado4.querySelector('[slot="anchor"]'))===null||_this$component$shado4===void 0?void 0:_this$component$shado4.assignedElements({flatten:!0})[0])||((_this$component$query4=this.component.querySelector('[slot="trigger"]'))===null||_this$component$query4===void 0?void 0:_this$component$query4.assignedElements({flatten:!0})[0])||this.component).getBoundingClientRect(),i=window.innerHeight-t.bottom,s=t.top,o=this.currentPlacement.startsWith("top"),e=this.currentPlacement.startsWith("bottom");return!(o&&i>s)&&!(e&&s>i);}},{key:"updatePortalPanel",value:function updatePortalPanel(){this.portalContainer&&this.clonedPanel&&(l.updatePortalPanel(this.clonedPanel,this.component),this.setupPortalEventListeners(),this.forceReposition());}}]);}());}};});
2
2
  //# sourceMappingURL=portal-manager.cjs.js.map