@aquera/nile-elements 0.1.46-beta-2.1 → 0.1.46-beta-2.3

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 (667) hide show
  1. package/README.md +29 -11
  2. package/demo/filenames.txt +1 -1
  3. package/demo/index.html +84 -11
  4. package/dist/{fixture-948ae33c.cjs.js → fixture-161dee0b.cjs.js} +3 -3
  5. package/dist/fixture-161dee0b.cjs.js.map +1 -0
  6. package/dist/{fixture-76051ef1.esm.js → fixture-372df3b0.esm.js} +1 -1
  7. package/dist/index.cjs.js +1 -1
  8. package/dist/index.esm.js +1 -1
  9. package/dist/nile-accordion/nile-accordian.test.cjs.js +1 -1
  10. package/dist/nile-accordion/nile-accordian.test.esm.js +1 -1
  11. package/dist/nile-auto-complete/index.cjs.js +1 -1
  12. package/dist/nile-auto-complete/index.esm.js +1 -1
  13. package/dist/nile-auto-complete/nile-auto-complete.cjs.js +1 -17
  14. package/dist/nile-auto-complete/nile-auto-complete.cjs.js.map +1 -1
  15. package/dist/nile-auto-complete/nile-auto-complete.esm.js +8 -29
  16. package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js +1 -1
  17. package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js.map +1 -1
  18. package/dist/nile-auto-complete/nile-auto-complete.test.esm.js +1 -1
  19. package/dist/nile-avatar/nile-avatar.test.cjs.js +1 -1
  20. package/dist/nile-avatar/nile-avatar.test.cjs.js.map +1 -1
  21. package/dist/nile-avatar/nile-avatar.test.esm.js +1 -1
  22. package/dist/nile-badge/index.cjs.js +1 -1
  23. package/dist/nile-badge/index.esm.js +1 -1
  24. package/dist/nile-badge/nile-badge.cjs.js +1 -1
  25. package/dist/nile-badge/nile-badge.cjs.js.map +1 -1
  26. package/dist/nile-badge/nile-badge.esm.js +1 -1
  27. package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
  28. package/dist/nile-badge/nile-badge.test.cjs.js.map +1 -1
  29. package/dist/nile-badge/nile-badge.test.esm.js +1 -1
  30. package/dist/nile-button/index.cjs.js +1 -1
  31. package/dist/nile-button/index.esm.js +1 -1
  32. package/dist/nile-button/nile-button.cjs.js +1 -1
  33. package/dist/nile-button/nile-button.cjs.js.map +1 -1
  34. package/dist/nile-button/nile-button.esm.js +1 -1
  35. package/dist/nile-button/nile-button.test.cjs.js +1 -1
  36. package/dist/nile-button/nile-button.test.cjs.js.map +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/nile-calendar.test.cjs.js +1 -1
  41. package/dist/nile-calendar/nile-calendar.test.cjs.js.map +1 -1
  42. package/dist/nile-calendar/nile-calendar.test.esm.js +1 -1
  43. package/dist/nile-card/nile-card.test.cjs.js +1 -1
  44. package/dist/nile-card/nile-card.test.esm.js +1 -1
  45. package/dist/nile-checkbox/nile-checkbox.test.cjs.js +1 -1
  46. package/dist/nile-checkbox/nile-checkbox.test.esm.js +1 -1
  47. package/dist/nile-chip/nile-chip.cjs.js +1 -1
  48. package/dist/nile-chip/nile-chip.cjs.js.map +1 -1
  49. package/dist/nile-chip/nile-chip.esm.js +8 -17
  50. package/dist/nile-chip/nile-chip.test.cjs.js +1 -1
  51. package/dist/nile-chip/nile-chip.test.cjs.js.map +1 -1
  52. package/dist/nile-chip/nile-chip.test.esm.js +1 -1
  53. package/dist/nile-dialog/index.cjs.js +1 -1
  54. package/dist/nile-dialog/index.esm.js +1 -1
  55. package/dist/nile-dialog/nile-dialog.cjs.js +1 -1
  56. package/dist/nile-dialog/nile-dialog.cjs.js.map +1 -1
  57. package/dist/nile-dialog/nile-dialog.esm.js +1 -1
  58. package/dist/nile-dialog/nile-dialog.test.cjs.js +1 -1
  59. package/dist/nile-dialog/nile-dialog.test.cjs.js.map +1 -1
  60. package/dist/nile-dialog/nile-dialog.test.esm.js +1 -1
  61. package/dist/nile-drawer/index.cjs.js +1 -1
  62. package/dist/nile-drawer/index.esm.js +1 -1
  63. package/dist/nile-drawer/nile-drawer.cjs.js +1 -1
  64. package/dist/nile-drawer/nile-drawer.cjs.js.map +1 -1
  65. package/dist/nile-drawer/nile-drawer.esm.js +1 -1
  66. package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
  67. package/dist/nile-drawer/nile-drawer.test.cjs.js.map +1 -1
  68. package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
  69. package/dist/nile-dropdown/nile-dropdown.test.cjs.js +1 -1
  70. package/dist/nile-dropdown/nile-dropdown.test.esm.js +1 -1
  71. package/dist/nile-empty-state/nile-empty-state.test.cjs.js +1 -1
  72. package/dist/nile-empty-state/nile-empty-state.test.esm.js +1 -1
  73. package/dist/nile-error-message/nile-error-message.test.cjs.js +1 -1
  74. package/dist/nile-error-message/nile-error-message.test.esm.js +1 -1
  75. package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js +1 -1
  76. package/dist/nile-filter-chip/nile-filter-chip.test.esm.js +1 -1
  77. package/dist/nile-form-group/nile-form-group.test.cjs.js +1 -1
  78. package/dist/nile-form-group/nile-form-group.test.esm.js +1 -1
  79. package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js +1 -1
  80. package/dist/nile-form-help-text/nile-form-help-text.test.esm.js +1 -1
  81. package/dist/nile-hero/nile-hero.test.cjs.js +1 -1
  82. package/dist/nile-hero/nile-hero.test.esm.js +1 -1
  83. package/dist/nile-icon/icons/svg/accessreview.cjs.js +1 -1
  84. package/dist/nile-icon/icons/svg/accessreview.cjs.js.map +1 -1
  85. package/dist/nile-icon/icons/svg/accessreview.esm.js +1 -1
  86. package/dist/nile-icon/icons/svg/index.cjs.js +1 -1
  87. package/dist/nile-icon/icons/svg/index.esm.js +1 -1
  88. package/dist/nile-icon/icons/svg/info.cjs.js +1 -1
  89. package/dist/nile-icon/icons/svg/info.cjs.js.map +1 -1
  90. package/dist/nile-icon/icons/svg/info.esm.js +1 -1
  91. package/dist/nile-icon/icons/svg/savings.cjs.js +2 -0
  92. package/dist/nile-icon/icons/svg/savings.cjs.js.map +1 -0
  93. package/dist/nile-icon/icons/svg/savings.esm.js +1 -0
  94. package/dist/nile-icon/index.cjs.js +1 -1
  95. package/dist/nile-icon/index.cjs.js.map +1 -1
  96. package/dist/nile-icon/index.esm.js +1 -1
  97. package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
  98. package/dist/nile-icon/nile-icon.test.cjs.js.map +1 -1
  99. package/dist/nile-icon/nile-icon.test.esm.js +1 -1
  100. package/dist/nile-icon-button/index.cjs.js +1 -1
  101. package/dist/nile-icon-button/index.esm.js +1 -1
  102. package/dist/nile-icon-button/nile-icon-button.cjs.js +1 -1
  103. package/dist/nile-icon-button/nile-icon-button.cjs.js.map +1 -1
  104. package/dist/nile-icon-button/nile-icon-button.esm.js +1 -1
  105. package/dist/nile-input/index.cjs.js +1 -1
  106. package/dist/nile-input/index.esm.js +1 -1
  107. package/dist/nile-input/nile-input.cjs.js +1 -1
  108. package/dist/nile-input/nile-input.cjs.js.map +1 -1
  109. package/dist/nile-input/nile-input.esm.js +1 -1
  110. package/dist/nile-input/nile-input.test.cjs.js +1 -1
  111. package/dist/nile-input/nile-input.test.cjs.js.map +1 -1
  112. package/dist/nile-input/nile-input.test.esm.js +1 -1
  113. package/dist/nile-link/nile-link.test.cjs.js +1 -1
  114. package/dist/nile-link/nile-link.test.esm.js +1 -1
  115. package/dist/nile-loader/nile-loader.test.cjs.js +1 -1
  116. package/dist/nile-loader/nile-loader.test.esm.js +1 -1
  117. package/dist/nile-menu/nile-menu.css.cjs.js +1 -1
  118. package/dist/nile-menu/nile-menu.css.cjs.js.map +1 -1
  119. package/dist/nile-menu/nile-menu.css.esm.js +3 -3
  120. package/dist/nile-menu-item/index.cjs.js +1 -1
  121. package/dist/nile-menu-item/index.esm.js +1 -1
  122. package/dist/nile-menu-item/nile-menu-item.cjs.js +1 -1
  123. package/dist/nile-menu-item/nile-menu-item.cjs.js.map +1 -1
  124. package/dist/nile-menu-item/nile-menu-item.esm.js +1 -1
  125. package/dist/nile-option/index.cjs.js +1 -1
  126. package/dist/nile-option/index.esm.js +1 -1
  127. package/dist/nile-option/nile-option.cjs.js +1 -1
  128. package/dist/nile-option/nile-option.cjs.js.map +1 -1
  129. package/dist/nile-option/nile-option.css.cjs.js +1 -1
  130. package/dist/nile-option/nile-option.css.cjs.js.map +1 -1
  131. package/dist/nile-option/nile-option.css.esm.js +1 -1
  132. package/dist/nile-option/nile-option.esm.js +2 -2
  133. package/dist/nile-pagination/index.cjs.js +2 -0
  134. package/dist/nile-pagination/index.esm.js +1 -0
  135. package/dist/nile-pagination/nile-pagination-utils.cjs.js +2 -0
  136. package/dist/nile-pagination/nile-pagination-utils.cjs.js.map +1 -0
  137. package/dist/nile-pagination/nile-pagination-utils.esm.js +1 -0
  138. package/dist/nile-pagination/nile-pagination.cjs.js +2 -0
  139. package/dist/nile-pagination/nile-pagination.cjs.js.map +1 -0
  140. package/dist/nile-pagination/nile-pagination.css.cjs.js +2 -0
  141. package/dist/nile-pagination/nile-pagination.css.cjs.js.map +1 -0
  142. package/dist/nile-pagination/nile-pagination.css.esm.js +125 -0
  143. package/dist/nile-pagination/nile-pagination.esm.js +89 -0
  144. package/dist/nile-popover/index.cjs.js +1 -1
  145. package/dist/nile-popover/index.esm.js +1 -1
  146. package/dist/nile-popover/nile-popover.cjs.js +11 -3
  147. package/dist/nile-popover/nile-popover.cjs.js.map +1 -1
  148. package/dist/nile-popover/nile-popover.esm.js +13 -7
  149. package/dist/nile-popover/nile-popover.test.cjs.js +1 -1
  150. package/dist/nile-popover/nile-popover.test.cjs.js.map +1 -1
  151. package/dist/nile-popover/nile-popover.test.esm.js +3 -3
  152. package/dist/nile-popup/nile-popup.cjs.js +1 -1
  153. package/dist/nile-popup/nile-popup.cjs.js.map +1 -1
  154. package/dist/nile-popup/nile-popup.esm.js +1 -1
  155. package/dist/nile-popup/nile-popup.test.cjs.js +1 -1
  156. package/dist/nile-popup/nile-popup.test.esm.js +1 -1
  157. package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js +1 -1
  158. package/dist/nile-progress-bar/nile-progress-bar.test.esm.js +1 -1
  159. package/dist/nile-radio/nile-radio.test.cjs.js +1 -1
  160. package/dist/nile-radio/nile-radio.test.esm.js +1 -1
  161. package/dist/nile-radio-group/nile-radio-group.test.cjs.js +1 -1
  162. package/dist/nile-radio-group/nile-radio-group.test.esm.js +1 -1
  163. package/dist/nile-select/index.cjs.js +1 -1
  164. package/dist/nile-select/index.esm.js +1 -1
  165. package/dist/nile-select/nile-select.cjs.js +1 -1
  166. package/dist/nile-select/nile-select.cjs.js.map +1 -1
  167. package/dist/nile-select/nile-select.esm.js +9 -9
  168. package/dist/nile-select/nile-select.test.cjs.js +1 -1
  169. package/dist/nile-select/nile-select.test.cjs.js.map +1 -1
  170. package/dist/nile-select/nile-select.test.esm.js +2 -2
  171. package/dist/nile-select/virtual-scroll-helper.cjs.js +2 -0
  172. package/dist/nile-select/virtual-scroll-helper.cjs.js.map +1 -0
  173. package/dist/nile-select/virtual-scroll-helper.esm.js +54 -0
  174. package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +1 -1
  175. package/dist/nile-slide-toggle/nile-slide-toggle.test.esm.js +1 -1
  176. package/dist/nile-tab/index.cjs.js +1 -1
  177. package/dist/nile-tab/index.esm.js +1 -1
  178. package/dist/nile-tab/nile-tab.cjs.js +1 -1
  179. package/dist/nile-tab/nile-tab.cjs.js.map +1 -1
  180. package/dist/nile-tab/nile-tab.esm.js +2 -2
  181. package/dist/nile-tab-group/index.cjs.js +1 -1
  182. package/dist/nile-tab-group/index.esm.js +1 -1
  183. package/dist/nile-tab-group/nile-tab-group.cjs.js +1 -1
  184. package/dist/nile-tab-group/nile-tab-group.cjs.js.map +1 -1
  185. package/dist/nile-tab-group/nile-tab-group.esm.js +1 -1
  186. package/dist/nile-tab-group/nile-tab-group.test.cjs.js +1 -1
  187. package/dist/nile-tab-group/nile-tab-group.test.cjs.js.map +1 -1
  188. package/dist/nile-tab-group/nile-tab-group.test.esm.js +1 -1
  189. package/dist/nile-tag/index.cjs.js +1 -1
  190. package/dist/nile-tag/index.esm.js +1 -1
  191. package/dist/nile-tag/nile-tag.cjs.js +1 -1
  192. package/dist/nile-tag/nile-tag.cjs.js.map +1 -1
  193. package/dist/nile-tag/nile-tag.esm.js +1 -1
  194. package/dist/nile-textarea/nile-textarea.test.cjs.js +1 -1
  195. package/dist/nile-textarea/nile-textarea.test.esm.js +1 -1
  196. package/dist/nile-toast/index.cjs.js +1 -1
  197. package/dist/nile-toast/index.esm.js +1 -1
  198. package/dist/nile-toast/nile-toast.cjs.js +1 -1
  199. package/dist/nile-toast/nile-toast.cjs.js.map +1 -1
  200. package/dist/nile-toast/nile-toast.esm.js +1 -1
  201. package/dist/nile-tree/index.cjs.js +1 -1
  202. package/dist/nile-tree/index.esm.js +1 -1
  203. package/dist/nile-tree/nile-tree.cjs.js +1 -1
  204. package/dist/nile-tree/nile-tree.cjs.js.map +1 -1
  205. package/dist/nile-tree/nile-tree.esm.js +1 -1
  206. package/dist/nile-tree-item/index.cjs.js +1 -1
  207. package/dist/nile-tree-item/index.esm.js +1 -1
  208. package/dist/nile-tree-item/nile-tree-item.cjs.js +1 -1
  209. package/dist/nile-tree-item/nile-tree-item.cjs.js.map +1 -1
  210. package/dist/nile-tree-item/nile-tree-item.esm.js +1 -1
  211. package/dist/nile-virtual-select/index.cjs.js +2 -0
  212. package/dist/nile-virtual-select/index.esm.js +1 -0
  213. package/dist/nile-virtual-select/nile-virtual-select.cjs.js +2 -0
  214. package/dist/nile-virtual-select/nile-virtual-select.cjs.js.map +1 -0
  215. package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js +2 -0
  216. package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js.map +1 -0
  217. package/dist/nile-virtual-select/nile-virtual-select.css.esm.js +468 -0
  218. package/dist/nile-virtual-select/nile-virtual-select.esm.js +202 -0
  219. package/dist/nile-virtual-select/nile-virtual-select.test.cjs.js +2 -0
  220. package/dist/nile-virtual-select/nile-virtual-select.test.cjs.js.map +1 -0
  221. package/dist/nile-virtual-select/nile-virtual-select.test.esm.js +49 -0
  222. package/dist/nile-virtual-select/renderer.cjs.js +2 -0
  223. package/dist/nile-virtual-select/renderer.cjs.js.map +1 -0
  224. package/dist/nile-virtual-select/renderer.esm.js +16 -0
  225. package/dist/nile-virtual-select/search-manager.cjs.js +2 -0
  226. package/dist/nile-virtual-select/search-manager.cjs.js.map +1 -0
  227. package/dist/nile-virtual-select/search-manager.esm.js +1 -0
  228. package/dist/nile-virtual-select/selection-manager.cjs.js +2 -0
  229. package/dist/nile-virtual-select/selection-manager.cjs.js.map +1 -0
  230. package/dist/nile-virtual-select/selection-manager.esm.js +1 -0
  231. package/dist/{nile-file-upload/types/file-upload.type.cjs.js → nile-virtual-select/types.cjs.js} +1 -1
  232. package/dist/nile-virtual-select/types.cjs.js.map +1 -0
  233. package/dist/src/index.d.ts +2 -2
  234. package/dist/src/index.js +2 -2
  235. package/dist/src/index.js.map +1 -1
  236. package/dist/src/nile-chip/nile-chip.js +0 -9
  237. package/dist/src/nile-chip/nile-chip.js.map +1 -1
  238. package/dist/src/nile-icon/icons/svg/accessreview.d.ts +1 -1
  239. package/dist/src/nile-icon/icons/svg/accessreview.js +1 -1
  240. package/dist/src/nile-icon/icons/svg/accessreview.js.map +1 -1
  241. package/dist/src/nile-icon/icons/svg/index.d.ts +1 -0
  242. package/dist/src/nile-icon/icons/svg/index.js +1 -0
  243. package/dist/src/nile-icon/icons/svg/index.js.map +1 -1
  244. package/dist/src/nile-icon/icons/svg/info.d.ts +1 -1
  245. package/dist/src/nile-icon/icons/svg/info.js +1 -1
  246. package/dist/src/nile-icon/icons/svg/info.js.map +1 -1
  247. package/dist/src/nile-menu/nile-menu.css.js +1 -1
  248. package/dist/src/nile-menu/nile-menu.css.js.map +1 -1
  249. package/dist/src/nile-option/nile-option.css.js +1 -1
  250. package/dist/src/nile-option/nile-option.css.js.map +1 -1
  251. package/dist/src/nile-option/nile-option.d.ts +5 -1
  252. package/dist/src/nile-option/nile-option.js +21 -6
  253. package/dist/src/nile-option/nile-option.js.map +1 -1
  254. package/dist/src/nile-pagination/nile-pagination.css.js +24 -30
  255. package/dist/src/nile-pagination/nile-pagination.css.js.map +1 -1
  256. package/dist/src/nile-pagination/nile-pagination.js +3 -5
  257. package/dist/src/nile-pagination/nile-pagination.js.map +1 -1
  258. package/dist/src/nile-popup/nile-popup.js +20 -1
  259. package/dist/src/nile-popup/nile-popup.js.map +1 -1
  260. package/dist/src/nile-select/nile-select.d.ts +14 -4
  261. package/dist/src/nile-select/nile-select.js +118 -4
  262. package/dist/src/nile-select/nile-select.js.map +1 -1
  263. package/dist/src/nile-select/virtual-scroll-helper.d.ts +40 -0
  264. package/dist/src/nile-select/virtual-scroll-helper.js +196 -0
  265. package/dist/src/nile-select/virtual-scroll-helper.js.map +1 -0
  266. package/dist/src/nile-tab/nile-tab.js +1 -1
  267. package/dist/src/nile-tab/nile-tab.js.map +1 -1
  268. package/dist/src/nile-virtual-select/index.d.ts +1 -0
  269. package/dist/src/nile-virtual-select/index.js +2 -0
  270. package/dist/src/nile-virtual-select/index.js.map +1 -0
  271. package/dist/src/nile-virtual-select/nile-virtual-select.css.d.ts +12 -0
  272. package/dist/src/nile-virtual-select/nile-virtual-select.css.js +480 -0
  273. package/dist/src/nile-virtual-select/nile-virtual-select.css.js.map +1 -0
  274. package/dist/src/nile-virtual-select/nile-virtual-select.d.ts +242 -0
  275. package/dist/src/nile-virtual-select/nile-virtual-select.js +1091 -0
  276. package/dist/src/nile-virtual-select/nile-virtual-select.js.map +1 -0
  277. package/dist/src/{nile-file-upload/nile-file-upload.test.d.ts → nile-virtual-select/nile-virtual-select.test.d.ts} +2 -2
  278. package/dist/src/nile-virtual-select/nile-virtual-select.test.js +317 -0
  279. package/dist/src/nile-virtual-select/nile-virtual-select.test.js.map +1 -0
  280. package/dist/src/nile-virtual-select/renderer.d.ts +11 -0
  281. package/dist/src/nile-virtual-select/renderer.js +45 -0
  282. package/dist/src/nile-virtual-select/renderer.js.map +1 -0
  283. package/dist/src/nile-virtual-select/search-manager.d.ts +12 -0
  284. package/dist/src/nile-virtual-select/search-manager.js +39 -0
  285. package/dist/src/nile-virtual-select/search-manager.js.map +1 -0
  286. package/dist/src/nile-virtual-select/selection-manager.d.ts +12 -0
  287. package/dist/src/nile-virtual-select/selection-manager.js +49 -0
  288. package/dist/src/nile-virtual-select/selection-manager.js.map +1 -0
  289. package/dist/src/nile-virtual-select/types.d.ts +45 -0
  290. package/dist/src/{nile-file-preview/nile-file-preview.test.d.ts → nile-virtual-select/types.js} +3 -2
  291. package/dist/src/nile-virtual-select/types.js.map +1 -0
  292. package/dist/tsconfig.tsbuildinfo +1 -1
  293. package/dist/virtualize-a4a40d96.esm.js +22 -0
  294. package/dist/virtualize-b6a2fbe0.cjs.js +18 -0
  295. package/dist/virtualize-b6a2fbe0.cjs.js.map +1 -0
  296. package/package.json +4 -2
  297. package/src/index.ts +4 -3
  298. package/src/nile-chip/nile-chip.ts +0 -9
  299. package/src/nile-icon/icons/svg/accessreview.ts +1 -1
  300. package/src/nile-icon/icons/svg/index.ts +1 -0
  301. package/src/nile-icon/icons/svg/info.ts +1 -1
  302. package/src/nile-icon/icons/svg/savings.ts +5 -0
  303. package/src/nile-menu/nile-menu.css.ts +1 -1
  304. package/src/nile-option/nile-option.css.ts +1 -1
  305. package/src/nile-option/nile-option.ts +17 -3
  306. package/src/nile-pagination/index.ts +1 -0
  307. package/src/nile-pagination/nile-pagination-utils.ts +63 -0
  308. package/src/nile-pagination/nile-pagination.css.ts +139 -0
  309. package/src/nile-pagination/nile-pagination.ts +219 -0
  310. package/src/nile-popup/nile-popup.ts +20 -3
  311. package/src/nile-select/nile-select.ts +133 -4
  312. package/src/nile-select/virtual-scroll-helper.ts +228 -0
  313. package/src/nile-tab/nile-tab.ts +1 -1
  314. package/src/nile-virtual-select/index.ts +1 -0
  315. package/src/nile-virtual-select/nile-virtual-select.css.ts +482 -0
  316. package/src/nile-virtual-select/nile-virtual-select.test.ts +390 -0
  317. package/src/nile-virtual-select/nile-virtual-select.ts +1161 -0
  318. package/src/nile-virtual-select/renderer.ts +62 -0
  319. package/src/nile-virtual-select/search-manager.ts +48 -0
  320. package/src/nile-virtual-select/selection-manager.ts +56 -0
  321. package/src/nile-virtual-select/types.ts +48 -0
  322. package/vscode-html-custom-data.json +268 -145
  323. package/dist/fixture-948ae33c.cjs.js.map +0 -1
  324. package/dist/lit-html-39a6718c.esm.js +0 -6
  325. package/dist/lit-html-9b3af046.cjs.js +0 -6
  326. package/dist/lit-html-9b3af046.cjs.js.map +0 -1
  327. package/dist/nile-file-preview/index.cjs.js +0 -2
  328. package/dist/nile-file-preview/index.esm.js +0 -1
  329. package/dist/nile-file-preview/nile-file-preview.cjs.js +0 -2
  330. package/dist/nile-file-preview/nile-file-preview.cjs.js.map +0 -1
  331. package/dist/nile-file-preview/nile-file-preview.css.cjs.js +0 -2
  332. package/dist/nile-file-preview/nile-file-preview.css.cjs.js.map +0 -1
  333. package/dist/nile-file-preview/nile-file-preview.css.esm.js +0 -512
  334. package/dist/nile-file-preview/nile-file-preview.esm.js +0 -3
  335. package/dist/nile-file-preview/nile-file-preview.template.cjs.js +0 -2
  336. package/dist/nile-file-preview/nile-file-preview.template.cjs.js.map +0 -1
  337. package/dist/nile-file-preview/nile-file-preview.template.esm.js +0 -173
  338. package/dist/nile-file-preview/nile-file-preview.test.cjs.js +0 -2
  339. package/dist/nile-file-preview/nile-file-preview.test.cjs.js.map +0 -1
  340. package/dist/nile-file-preview/nile-file-preview.test.esm.js +0 -1
  341. package/dist/nile-file-preview/types/index.cjs.js +0 -2
  342. package/dist/nile-file-preview/types/index.esm.js +0 -1
  343. package/dist/nile-file-preview/types/nile-file-preview.enums.cjs.js +0 -2
  344. package/dist/nile-file-preview/types/nile-file-preview.enums.cjs.js.map +0 -1
  345. package/dist/nile-file-preview/types/nile-file-preview.enums.esm.js +0 -1
  346. package/dist/nile-file-preview/types/nile-file-preview.interface.cjs.js +0 -2
  347. package/dist/nile-file-preview/types/nile-file-preview.interface.cjs.js.map +0 -1
  348. package/dist/nile-file-preview/utils/index.cjs.js +0 -2
  349. package/dist/nile-file-preview/utils/index.cjs.js.map +0 -1
  350. package/dist/nile-file-preview/utils/index.esm.js +0 -1
  351. package/dist/nile-file-preview/utils/nile-file-preview.util.cjs.js +0 -2
  352. package/dist/nile-file-preview/utils/nile-file-preview.util.cjs.js.map +0 -1
  353. package/dist/nile-file-preview/utils/nile-file-preview.util.esm.js +0 -1
  354. package/dist/nile-file-upload/index.cjs.js +0 -2
  355. package/dist/nile-file-upload/index.cjs.js.map +0 -1
  356. package/dist/nile-file-upload/index.esm.js +0 -1
  357. package/dist/nile-file-upload/nile-file-upload.cjs.js +0 -2
  358. package/dist/nile-file-upload/nile-file-upload.cjs.js.map +0 -1
  359. package/dist/nile-file-upload/nile-file-upload.css.cjs.js +0 -2
  360. package/dist/nile-file-upload/nile-file-upload.css.cjs.js.map +0 -1
  361. package/dist/nile-file-upload/nile-file-upload.css.esm.js +0 -538
  362. package/dist/nile-file-upload/nile-file-upload.esm.js +0 -3
  363. package/dist/nile-file-upload/nile-file-upload.template.cjs.js +0 -10
  364. package/dist/nile-file-upload/nile-file-upload.template.cjs.js.map +0 -1
  365. package/dist/nile-file-upload/nile-file-upload.template.esm.js +0 -111
  366. package/dist/nile-file-upload/nile-file-upload.test.cjs.js +0 -2
  367. package/dist/nile-file-upload/nile-file-upload.test.cjs.js.map +0 -1
  368. package/dist/nile-file-upload/nile-file-upload.test.esm.js +0 -1
  369. package/dist/nile-file-upload/types/file-upload.enums.cjs.js +0 -2
  370. package/dist/nile-file-upload/types/file-upload.enums.cjs.js.map +0 -1
  371. package/dist/nile-file-upload/types/file-upload.enums.esm.js +0 -1
  372. package/dist/nile-file-upload/types/file-upload.type.cjs.js.map +0 -1
  373. package/dist/nile-file-upload/types/file-upload.type.esm.js +0 -1
  374. package/dist/nile-file-upload/types/index.cjs.js +0 -2
  375. package/dist/nile-file-upload/types/index.cjs.js.map +0 -1
  376. package/dist/nile-file-upload/types/index.esm.js +0 -1
  377. package/dist/nile-file-upload/utils/drag-drop.util.cjs.js +0 -2
  378. package/dist/nile-file-upload/utils/drag-drop.util.cjs.js.map +0 -1
  379. package/dist/nile-file-upload/utils/drag-drop.util.esm.js +0 -1
  380. package/dist/nile-file-upload/utils/file-validation.util.cjs.js +0 -3
  381. package/dist/nile-file-upload/utils/file-validation.util.cjs.js.map +0 -1
  382. package/dist/nile-file-upload/utils/file-validation.util.esm.js +0 -1
  383. package/dist/src/nile-file-preview/index.d.ts +0 -1
  384. package/dist/src/nile-file-preview/index.js +0 -2
  385. package/dist/src/nile-file-preview/index.js.map +0 -1
  386. package/dist/src/nile-file-preview/nile-file-preview.css.d.ts +0 -12
  387. package/dist/src/nile-file-preview/nile-file-preview.css.js +0 -524
  388. package/dist/src/nile-file-preview/nile-file-preview.css.js.map +0 -1
  389. package/dist/src/nile-file-preview/nile-file-preview.d.ts +0 -50
  390. package/dist/src/nile-file-preview/nile-file-preview.js +0 -170
  391. package/dist/src/nile-file-preview/nile-file-preview.js.map +0 -1
  392. package/dist/src/nile-file-preview/nile-file-preview.template.d.ts +0 -13
  393. package/dist/src/nile-file-preview/nile-file-preview.template.js +0 -204
  394. package/dist/src/nile-file-preview/nile-file-preview.template.js.map +0 -1
  395. package/dist/src/nile-file-preview/nile-file-preview.test.js +0 -30
  396. package/dist/src/nile-file-preview/nile-file-preview.test.js.map +0 -1
  397. package/dist/src/nile-file-preview/types/index.d.ts +0 -2
  398. package/dist/src/nile-file-preview/types/index.js +0 -3
  399. package/dist/src/nile-file-preview/types/index.js.map +0 -1
  400. package/dist/src/nile-file-preview/types/nile-file-preview.enums.d.ts +0 -27
  401. package/dist/src/nile-file-preview/types/nile-file-preview.enums.js +0 -32
  402. package/dist/src/nile-file-preview/types/nile-file-preview.enums.js.map +0 -1
  403. package/dist/src/nile-file-preview/types/nile-file-preview.interface.d.ts +0 -4
  404. package/dist/src/nile-file-preview/types/nile-file-preview.interface.js +0 -2
  405. package/dist/src/nile-file-preview/types/nile-file-preview.interface.js.map +0 -1
  406. package/dist/src/nile-file-preview/utils/index.d.ts +0 -1
  407. package/dist/src/nile-file-preview/utils/index.js +0 -2
  408. package/dist/src/nile-file-preview/utils/index.js.map +0 -1
  409. package/dist/src/nile-file-preview/utils/nile-file-preview.util.d.ts +0 -4
  410. package/dist/src/nile-file-preview/utils/nile-file-preview.util.js +0 -38
  411. package/dist/src/nile-file-preview/utils/nile-file-preview.util.js.map +0 -1
  412. package/dist/src/nile-file-upload/index.d.ts +0 -1
  413. package/dist/src/nile-file-upload/index.js +0 -2
  414. package/dist/src/nile-file-upload/index.js.map +0 -1
  415. package/dist/src/nile-file-upload/nile-file-upload.css.d.ts +0 -12
  416. package/dist/src/nile-file-upload/nile-file-upload.css.js +0 -550
  417. package/dist/src/nile-file-upload/nile-file-upload.css.js.map +0 -1
  418. package/dist/src/nile-file-upload/nile-file-upload.d.ts +0 -49
  419. package/dist/src/nile-file-upload/nile-file-upload.js +0 -163
  420. package/dist/src/nile-file-upload/nile-file-upload.js.map +0 -1
  421. package/dist/src/nile-file-upload/nile-file-upload.template.d.ts +0 -10
  422. package/dist/src/nile-file-upload/nile-file-upload.template.js +0 -117
  423. package/dist/src/nile-file-upload/nile-file-upload.template.js.map +0 -1
  424. package/dist/src/nile-file-upload/nile-file-upload.test.js +0 -30
  425. package/dist/src/nile-file-upload/nile-file-upload.test.js.map +0 -1
  426. package/dist/src/nile-file-upload/types/file-upload.enums.d.ts +0 -36
  427. package/dist/src/nile-file-upload/types/file-upload.enums.js +0 -43
  428. package/dist/src/nile-file-upload/types/file-upload.enums.js.map +0 -1
  429. package/dist/src/nile-file-upload/types/file-upload.type.d.ts +0 -4
  430. package/dist/src/nile-file-upload/types/file-upload.type.js +0 -2
  431. package/dist/src/nile-file-upload/types/file-upload.type.js.map +0 -1
  432. package/dist/src/nile-file-upload/types/index.d.ts +0 -2
  433. package/dist/src/nile-file-upload/types/index.js +0 -3
  434. package/dist/src/nile-file-upload/types/index.js.map +0 -1
  435. package/dist/src/nile-file-upload/utils/drag-drop.util.d.ts +0 -21
  436. package/dist/src/nile-file-upload/utils/drag-drop.util.js +0 -79
  437. package/dist/src/nile-file-upload/utils/drag-drop.util.js.map +0 -1
  438. package/dist/src/nile-file-upload/utils/file-validation.util.d.ts +0 -13
  439. package/dist/src/nile-file-upload/utils/file-validation.util.js +0 -153
  440. package/dist/src/nile-file-upload/utils/file-validation.util.js.map +0 -1
  441. package/dist/src/nile-icon/icons/svg/ng-activity.d.ts +0 -5
  442. package/dist/src/nile-icon/icons/svg/ng-activity.js +0 -5
  443. package/dist/src/nile-icon/icons/svg/ng-activity.js.map +0 -1
  444. package/dist/src/nile-icon/icons/svg/ng-align-center.d.ts +0 -5
  445. package/dist/src/nile-icon/icons/svg/ng-align-center.js +0 -5
  446. package/dist/src/nile-icon/icons/svg/ng-align-center.js.map +0 -1
  447. package/dist/src/nile-icon/icons/svg/ng-annotation-x.d.ts +0 -5
  448. package/dist/src/nile-icon/icons/svg/ng-annotation-x.js +0 -5
  449. package/dist/src/nile-icon/icons/svg/ng-annotation-x.js.map +0 -1
  450. package/dist/src/nile-icon/icons/svg/ng-arrow-down.d.ts +0 -5
  451. package/dist/src/nile-icon/icons/svg/ng-arrow-down.js +0 -5
  452. package/dist/src/nile-icon/icons/svg/ng-arrow-down.js.map +0 -1
  453. package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-down.d.ts +0 -5
  454. package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-down.js +0 -5
  455. package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-down.js.map +0 -1
  456. package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-left.d.ts +0 -5
  457. package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-left.js +0 -5
  458. package/dist/src/nile-icon/icons/svg/ng-arrow-narrow-left.js.map +0 -1
  459. package/dist/src/nile-icon/icons/svg/ng-arrow-up.d.ts +0 -5
  460. package/dist/src/nile-icon/icons/svg/ng-arrow-up.js +0 -5
  461. package/dist/src/nile-icon/icons/svg/ng-arrow-up.js.map +0 -1
  462. package/dist/src/nile-icon/icons/svg/ng-bar-chart-12.d.ts +0 -5
  463. package/dist/src/nile-icon/icons/svg/ng-bar-chart-12.js +0 -5
  464. package/dist/src/nile-icon/icons/svg/ng-bar-chart-12.js.map +0 -1
  465. package/dist/src/nile-icon/icons/svg/ng-bell-01.d.ts +0 -5
  466. package/dist/src/nile-icon/icons/svg/ng-bell-01.js +0 -5
  467. package/dist/src/nile-icon/icons/svg/ng-bell-01.js.map +0 -1
  468. package/dist/src/nile-icon/icons/svg/ng-bell-ringing-04.d.ts +0 -5
  469. package/dist/src/nile-icon/icons/svg/ng-bell-ringing-04.js +0 -5
  470. package/dist/src/nile-icon/icons/svg/ng-bell-ringing-04.js.map +0 -1
  471. package/dist/src/nile-icon/icons/svg/ng-bold-01.d.ts +0 -5
  472. package/dist/src/nile-icon/icons/svg/ng-bold-01.js +0 -5
  473. package/dist/src/nile-icon/icons/svg/ng-bold-01.js.map +0 -1
  474. package/dist/src/nile-icon/icons/svg/ng-calendar-plus-02.d.ts +0 -5
  475. package/dist/src/nile-icon/icons/svg/ng-calendar-plus-02.js +0 -5
  476. package/dist/src/nile-icon/icons/svg/ng-calendar-plus-02.js.map +0 -1
  477. package/dist/src/nile-icon/icons/svg/ng-calendar.d.ts +0 -5
  478. package/dist/src/nile-icon/icons/svg/ng-calendar.js +0 -5
  479. package/dist/src/nile-icon/icons/svg/ng-calendar.js.map +0 -1
  480. package/dist/src/nile-icon/icons/svg/ng-check-circle.d.ts +0 -5
  481. package/dist/src/nile-icon/icons/svg/ng-check-circle.js +0 -5
  482. package/dist/src/nile-icon/icons/svg/ng-check-circle.js.map +0 -1
  483. package/dist/src/nile-icon/icons/svg/ng-check-square-broken.d.ts +0 -5
  484. package/dist/src/nile-icon/icons/svg/ng-check-square-broken.js +0 -5
  485. package/dist/src/nile-icon/icons/svg/ng-check-square-broken.js.map +0 -1
  486. package/dist/src/nile-icon/icons/svg/ng-chevron-down.d.ts +0 -5
  487. package/dist/src/nile-icon/icons/svg/ng-chevron-down.js +0 -5
  488. package/dist/src/nile-icon/icons/svg/ng-chevron-down.js.map +0 -1
  489. package/dist/src/nile-icon/icons/svg/ng-chevron-left.d.ts +0 -5
  490. package/dist/src/nile-icon/icons/svg/ng-chevron-left.js +0 -5
  491. package/dist/src/nile-icon/icons/svg/ng-chevron-left.js.map +0 -1
  492. package/dist/src/nile-icon/icons/svg/ng-chevron-right.d.ts +0 -5
  493. package/dist/src/nile-icon/icons/svg/ng-chevron-right.js +0 -5
  494. package/dist/src/nile-icon/icons/svg/ng-chevron-right.js.map +0 -1
  495. package/dist/src/nile-icon/icons/svg/ng-chevron-selector-vertical.d.ts +0 -5
  496. package/dist/src/nile-icon/icons/svg/ng-chevron-selector-vertical.js +0 -5
  497. package/dist/src/nile-icon/icons/svg/ng-chevron-selector-vertical.js.map +0 -1
  498. package/dist/src/nile-icon/icons/svg/ng-chevron-up-double.d.ts +0 -5
  499. package/dist/src/nile-icon/icons/svg/ng-chevron-up-double.js +0 -5
  500. package/dist/src/nile-icon/icons/svg/ng-chevron-up-double.js.map +0 -1
  501. package/dist/src/nile-icon/icons/svg/ng-chevron-up.d.ts +0 -5
  502. package/dist/src/nile-icon/icons/svg/ng-chevron-up.js +0 -5
  503. package/dist/src/nile-icon/icons/svg/ng-chevron-up.js.map +0 -1
  504. package/dist/src/nile-icon/icons/svg/ng-copy-03.d.ts +0 -5
  505. package/dist/src/nile-icon/icons/svg/ng-copy-03.js +0 -5
  506. package/dist/src/nile-icon/icons/svg/ng-copy-03.js.map +0 -1
  507. package/dist/src/nile-icon/icons/svg/ng-dots-grid.d.ts +0 -5
  508. package/dist/src/nile-icon/icons/svg/ng-dots-grid.js +0 -5
  509. package/dist/src/nile-icon/icons/svg/ng-dots-grid.js.map +0 -1
  510. package/dist/src/nile-icon/icons/svg/ng-dots-vertical.d.ts +0 -5
  511. package/dist/src/nile-icon/icons/svg/ng-dots-vertical.js +0 -5
  512. package/dist/src/nile-icon/icons/svg/ng-dots-vertical.js.map +0 -1
  513. package/dist/src/nile-icon/icons/svg/ng-download-01.d.ts +0 -5
  514. package/dist/src/nile-icon/icons/svg/ng-download-01.js +0 -5
  515. package/dist/src/nile-icon/icons/svg/ng-download-01.js.map +0 -1
  516. package/dist/src/nile-icon/icons/svg/ng-dropdown.d.ts +0 -5
  517. package/dist/src/nile-icon/icons/svg/ng-dropdown.js +0 -5
  518. package/dist/src/nile-icon/icons/svg/ng-dropdown.js.map +0 -1
  519. package/dist/src/nile-icon/icons/svg/ng-edit-02.d.ts +0 -5
  520. package/dist/src/nile-icon/icons/svg/ng-edit-02.js +0 -5
  521. package/dist/src/nile-icon/icons/svg/ng-edit-02.js.map +0 -1
  522. package/dist/src/nile-icon/icons/svg/ng-edit-05.d.ts +0 -5
  523. package/dist/src/nile-icon/icons/svg/ng-edit-05.js +0 -5
  524. package/dist/src/nile-icon/icons/svg/ng-edit-05.js.map +0 -1
  525. package/dist/src/nile-icon/icons/svg/ng-expand-06.d.ts +0 -5
  526. package/dist/src/nile-icon/icons/svg/ng-expand-06.js +0 -5
  527. package/dist/src/nile-icon/icons/svg/ng-expand-06.js.map +0 -1
  528. package/dist/src/nile-icon/icons/svg/ng-file-02.d.ts +0 -5
  529. package/dist/src/nile-icon/icons/svg/ng-file-02.js +0 -5
  530. package/dist/src/nile-icon/icons/svg/ng-file-02.js.map +0 -1
  531. package/dist/src/nile-icon/icons/svg/ng-file-check-02.d.ts +0 -5
  532. package/dist/src/nile-icon/icons/svg/ng-file-check-02.js +0 -5
  533. package/dist/src/nile-icon/icons/svg/ng-file-check-02.js.map +0 -1
  534. package/dist/src/nile-icon/icons/svg/ng-file-question-03.d.ts +0 -5
  535. package/dist/src/nile-icon/icons/svg/ng-file-question-03.js +0 -5
  536. package/dist/src/nile-icon/icons/svg/ng-file-question-03.js.map +0 -1
  537. package/dist/src/nile-icon/icons/svg/ng-filter-lines.d.ts +0 -5
  538. package/dist/src/nile-icon/icons/svg/ng-filter-lines.js +0 -5
  539. package/dist/src/nile-icon/icons/svg/ng-filter-lines.js.map +0 -1
  540. package/dist/src/nile-icon/icons/svg/ng-grid-01.d.ts +0 -5
  541. package/dist/src/nile-icon/icons/svg/ng-grid-01.js +0 -5
  542. package/dist/src/nile-icon/icons/svg/ng-grid-01.js.map +0 -1
  543. package/dist/src/nile-icon/icons/svg/ng-help-circle.d.ts +0 -5
  544. package/dist/src/nile-icon/icons/svg/ng-help-circle.js +0 -5
  545. package/dist/src/nile-icon/icons/svg/ng-help-circle.js.map +0 -1
  546. package/dist/src/nile-icon/icons/svg/ng-image-user-left.d.ts +0 -5
  547. package/dist/src/nile-icon/icons/svg/ng-image-user-left.js +0 -5
  548. package/dist/src/nile-icon/icons/svg/ng-image-user-left.js.map +0 -1
  549. package/dist/src/nile-icon/icons/svg/ng-info-circle.d.ts +0 -5
  550. package/dist/src/nile-icon/icons/svg/ng-info-circle.js +0 -5
  551. package/dist/src/nile-icon/icons/svg/ng-info-circle.js.map +0 -1
  552. package/dist/src/nile-icon/icons/svg/ng-italic-01.d.ts +0 -5
  553. package/dist/src/nile-icon/icons/svg/ng-italic-01.js +0 -5
  554. package/dist/src/nile-icon/icons/svg/ng-italic-01.js.map +0 -1
  555. package/dist/src/nile-icon/icons/svg/ng-list.d.ts +0 -5
  556. package/dist/src/nile-icon/icons/svg/ng-list.js +0 -5
  557. package/dist/src/nile-icon/icons/svg/ng-list.js.map +0 -1
  558. package/dist/src/nile-icon/icons/svg/ng-log-out-01.d.ts +0 -5
  559. package/dist/src/nile-icon/icons/svg/ng-log-out-01.js +0 -5
  560. package/dist/src/nile-icon/icons/svg/ng-log-out-01.js.map +0 -1
  561. package/dist/src/nile-icon/icons/svg/ng-mail-01.d.ts +0 -5
  562. package/dist/src/nile-icon/icons/svg/ng-mail-01.js +0 -5
  563. package/dist/src/nile-icon/icons/svg/ng-mail-01.js.map +0 -1
  564. package/dist/src/nile-icon/icons/svg/ng-mail-04.d.ts +0 -5
  565. package/dist/src/nile-icon/icons/svg/ng-mail-04.js +0 -5
  566. package/dist/src/nile-icon/icons/svg/ng-mail-04.js.map +0 -1
  567. package/dist/src/nile-icon/icons/svg/ng-menu-05.d.ts +0 -5
  568. package/dist/src/nile-icon/icons/svg/ng-menu-05.js +0 -5
  569. package/dist/src/nile-icon/icons/svg/ng-menu-05.js.map +0 -1
  570. package/dist/src/nile-icon/icons/svg/ng-message-text-square-01.d.ts +0 -5
  571. package/dist/src/nile-icon/icons/svg/ng-message-text-square-01.js +0 -5
  572. package/dist/src/nile-icon/icons/svg/ng-message-text-square-01.js.map +0 -1
  573. package/dist/src/nile-icon/icons/svg/ng-minimize-02.d.ts +0 -5
  574. package/dist/src/nile-icon/icons/svg/ng-minimize-02.js +0 -5
  575. package/dist/src/nile-icon/icons/svg/ng-minimize-02.js.map +0 -1
  576. package/dist/src/nile-icon/icons/svg/ng-plus.d.ts +0 -5
  577. package/dist/src/nile-icon/icons/svg/ng-plus.js +0 -5
  578. package/dist/src/nile-icon/icons/svg/ng-plus.js.map +0 -1
  579. package/dist/src/nile-icon/icons/svg/ng-refresh-cw-02.d.ts +0 -5
  580. package/dist/src/nile-icon/icons/svg/ng-refresh-cw-02.js +0 -5
  581. package/dist/src/nile-icon/icons/svg/ng-refresh-cw-02.js.map +0 -1
  582. package/dist/src/nile-icon/icons/svg/ng-rocket-02.d.ts +0 -5
  583. package/dist/src/nile-icon/icons/svg/ng-rocket-02.js +0 -5
  584. package/dist/src/nile-icon/icons/svg/ng-rocket-02.js.map +0 -1
  585. package/dist/src/nile-icon/icons/svg/ng-search-lg.d.ts +0 -5
  586. package/dist/src/nile-icon/icons/svg/ng-search-lg.js +0 -5
  587. package/dist/src/nile-icon/icons/svg/ng-search-lg.js.map +0 -1
  588. package/dist/src/nile-icon/icons/svg/ng-send-01.d.ts +0 -5
  589. package/dist/src/nile-icon/icons/svg/ng-send-01.js +0 -5
  590. package/dist/src/nile-icon/icons/svg/ng-send-01.js.map +0 -1
  591. package/dist/src/nile-icon/icons/svg/ng-settings-01.d.ts +0 -5
  592. package/dist/src/nile-icon/icons/svg/ng-settings-01.js +0 -5
  593. package/dist/src/nile-icon/icons/svg/ng-settings-01.js.map +0 -1
  594. package/dist/src/nile-icon/icons/svg/ng-share-04.d.ts +0 -5
  595. package/dist/src/nile-icon/icons/svg/ng-share-04.js +0 -5
  596. package/dist/src/nile-icon/icons/svg/ng-share-04.js.map +0 -1
  597. package/dist/src/nile-icon/icons/svg/ng-share-06.d.ts +0 -5
  598. package/dist/src/nile-icon/icons/svg/ng-share-06.js +0 -5
  599. package/dist/src/nile-icon/icons/svg/ng-share-06.js.map +0 -1
  600. package/dist/src/nile-icon/icons/svg/ng-stars-02.d.ts +0 -5
  601. package/dist/src/nile-icon/icons/svg/ng-stars-02.js +0 -5
  602. package/dist/src/nile-icon/icons/svg/ng-stars-02.js.map +0 -1
  603. package/dist/src/nile-icon/icons/svg/ng-trash-01.d.ts +0 -5
  604. package/dist/src/nile-icon/icons/svg/ng-trash-01.js +0 -5
  605. package/dist/src/nile-icon/icons/svg/ng-trash-01.js.map +0 -1
  606. package/dist/src/nile-icon/icons/svg/ng-trash-03.d.ts +0 -5
  607. package/dist/src/nile-icon/icons/svg/ng-trash-03.js +0 -5
  608. package/dist/src/nile-icon/icons/svg/ng-trash-03.js.map +0 -1
  609. package/dist/src/nile-icon/icons/svg/ng-trend-up-01.d.ts +0 -5
  610. package/dist/src/nile-icon/icons/svg/ng-trend-up-01.js +0 -5
  611. package/dist/src/nile-icon/icons/svg/ng-trend-up-01.js.map +0 -1
  612. package/dist/src/nile-icon/icons/svg/ng-underline-01.d.ts +0 -5
  613. package/dist/src/nile-icon/icons/svg/ng-underline-01.js +0 -5
  614. package/dist/src/nile-icon/icons/svg/ng-underline-01.js.map +0 -1
  615. package/dist/src/nile-icon/icons/svg/ng-upload-01.d.ts +0 -5
  616. package/dist/src/nile-icon/icons/svg/ng-upload-01.js +0 -5
  617. package/dist/src/nile-icon/icons/svg/ng-upload-01.js.map +0 -1
  618. package/dist/src/nile-icon/icons/svg/ng-upload-cloud-02.d.ts +0 -5
  619. package/dist/src/nile-icon/icons/svg/ng-upload-cloud-02.js +0 -5
  620. package/dist/src/nile-icon/icons/svg/ng-upload-cloud-02.js.map +0 -1
  621. package/dist/src/nile-icon/icons/svg/ng-user-01.d.ts +0 -5
  622. package/dist/src/nile-icon/icons/svg/ng-user-01.js +0 -5
  623. package/dist/src/nile-icon/icons/svg/ng-user-01.js.map +0 -1
  624. package/dist/src/nile-icon/icons/svg/ng-user-check-02-1.d.ts +0 -5
  625. package/dist/src/nile-icon/icons/svg/ng-user-check-02-1.js +0 -5
  626. package/dist/src/nile-icon/icons/svg/ng-user-check-02-1.js.map +0 -1
  627. package/dist/src/nile-icon/icons/svg/ng-user-check-02.d.ts +0 -5
  628. package/dist/src/nile-icon/icons/svg/ng-user-check-02.js +0 -5
  629. package/dist/src/nile-icon/icons/svg/ng-user-check-02.js.map +0 -1
  630. package/dist/src/nile-icon/icons/svg/ng-user-plus-02.d.ts +0 -5
  631. package/dist/src/nile-icon/icons/svg/ng-user-plus-02.js +0 -5
  632. package/dist/src/nile-icon/icons/svg/ng-user-plus-02.js.map +0 -1
  633. package/dist/src/nile-icon/icons/svg/ng-user-right-01.d.ts +0 -5
  634. package/dist/src/nile-icon/icons/svg/ng-user-right-01.js +0 -5
  635. package/dist/src/nile-icon/icons/svg/ng-user-right-01.js.map +0 -1
  636. package/dist/src/nile-icon/icons/svg/ng-users-01.d.ts +0 -5
  637. package/dist/src/nile-icon/icons/svg/ng-users-01.js +0 -5
  638. package/dist/src/nile-icon/icons/svg/ng-users-01.js.map +0 -1
  639. package/dist/src/nile-icon/icons/svg/ng-x-close.d.ts +0 -5
  640. package/dist/src/nile-icon/icons/svg/ng-x-close.js +0 -5
  641. package/dist/src/nile-icon/icons/svg/ng-x-close.js.map +0 -1
  642. package/dist/src/nile-icon/icons/svg/ng-x-square.d.ts +0 -5
  643. package/dist/src/nile-icon/icons/svg/ng-x-square.js +0 -5
  644. package/dist/src/nile-icon/icons/svg/ng-x-square.js.map +0 -1
  645. package/src/nile-file-preview/index.ts +0 -1
  646. package/src/nile-file-preview/nile-file-preview.css.ts +0 -526
  647. package/src/nile-file-preview/nile-file-preview.template.ts +0 -242
  648. package/src/nile-file-preview/nile-file-preview.test.ts +0 -38
  649. package/src/nile-file-preview/nile-file-preview.ts +0 -170
  650. package/src/nile-file-preview/types/index.ts +0 -2
  651. package/src/nile-file-preview/types/nile-file-preview.enums.ts +0 -30
  652. package/src/nile-file-preview/types/nile-file-preview.interface.ts +0 -4
  653. package/src/nile-file-preview/utils/index.ts +0 -1
  654. package/src/nile-file-preview/utils/nile-file-preview.util.ts +0 -47
  655. package/src/nile-file-upload/index.ts +0 -1
  656. package/src/nile-file-upload/nile-file-upload.css.ts +0 -552
  657. package/src/nile-file-upload/nile-file-upload.template.ts +0 -170
  658. package/src/nile-file-upload/nile-file-upload.test.ts +0 -38
  659. package/src/nile-file-upload/nile-file-upload.ts +0 -147
  660. package/src/nile-file-upload/types/file-upload.enums.ts +0 -40
  661. package/src/nile-file-upload/types/file-upload.type.ts +0 -5
  662. package/src/nile-file-upload/types/index.ts +0 -2
  663. package/src/nile-file-upload/utils/drag-drop.util.ts +0 -102
  664. package/src/nile-file-upload/utils/file-validation.util.ts +0 -205
  665. /package/dist/{nile-file-preview → nile-pagination}/index.cjs.js.map +0 -0
  666. /package/dist/{nile-file-preview/types → nile-virtual-select}/index.cjs.js.map +0 -0
  667. /package/dist/{nile-file-preview/types/nile-file-preview.interface.esm.js → nile-virtual-select/types.esm.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"nile-option.css.js","sourceRoot":"","sources":["../../../src/nile-option/nile-option.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8FxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/**\n * Option_2 CSS\n */\nexport const styles = css`\n :host {\n display: block;\n user-select: none;\n }\n\n :host(:focus) {\n outline: none;\n }\n\n .option {\n position: relative;\n display: flex;\n align-items: center;\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.8;\n letter-spacing: normal;\n color: hsl(240 5.3% 26.1%);\n padding: 6px 0;\n transition: 150ms fill;\n cursor: pointer;\n }\n\n .option--single-select {\n padding: 9px 12px;\n }\n\n .option--hover:not(.option--current):not(.option--disabled) {\n background-color: rgba(0, 94, 166, 0.1);\n color: hsl(0, 0%, 0%);\n }\n\n .option--current,\n .option--current.option--disabled {\n background-color: rgba(0, 94, 166, 0.1);\n color: var(--nile-colors-primary-600);\n opacity: 1;\n }\n\n .option--disabled {\n outline: none;\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .option__label {\n flex: 1 1 auto;\n display: inline-block;\n line-height: 1.4;\n word-break: break-all;\n }\n\n .option .option__check {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n visibility: hidden;\n padding-inline-end: 0.25rem;\n }\n\n .option--selected .option__check {\n visibility: visible;\n }\n\n .option__prefix,\n .option__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n }\n\n .option__prefix::slotted(*) {\n margin-inline-end: 0.5rem;\n }\n\n .option__suffix::slotted(*) {\n margin-inline-start: 0.5rem;\n }\n\n .option--checkbox{\n pointer-events: none;\n margin-left: 12px;\n margin-right: 12px;\n width:auto;\n }\n\n @media (forced-colors: active) {\n :host(:hover:not([aria-disabled='true'])) .option {\n outline: dashed 1px SelectedItem;\n outline-offset: -1px;\n }\n }\n`;\n\nexport default [styles];\n"]}
1
+ {"version":3,"file":"nile-option.css.js","sourceRoot":"","sources":["../../../src/nile-option/nile-option.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8FxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/**\n * Option_2 CSS\n */\nexport const styles = css`\n :host {\n display: block;\n user-select: none;\n }\n\n :host(:focus) {\n outline: none;\n }\n\n .option {\n position: relative;\n display: flex;\n align-items: center;\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.8;\n letter-spacing: normal;\n color: hsl(240 5.3% 26.1%);\n padding: 6px 0;\n transition: 150ms fill;\n cursor: pointer;\n }\n\n .option--single-select {\n padding: 8px 12px;\n }\n\n .option--hover:not(.option--current):not(.option--disabled) {\n background-color: rgba(0, 94, 166, 0.1);\n color: hsl(0, 0%, 0%);\n }\n\n .option--current,\n .option--current.option--disabled {\n background-color: rgba(0, 94, 166, 0.1);\n color: var(--nile-colors-primary-600);\n opacity: 1;\n }\n\n .option--disabled {\n outline: none;\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .option__label {\n flex: 1 1 auto;\n display: inline-block;\n line-height: 1.4;\n word-break: break-all;\n }\n\n .option .option__check {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n visibility: hidden;\n padding-inline-end: 0.25rem;\n }\n\n .option--selected .option__check {\n visibility: visible;\n }\n\n .option__prefix,\n .option__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n }\n\n .option__prefix::slotted(*) {\n margin-inline-end: 0.5rem;\n }\n\n .option__suffix::slotted(*) {\n margin-inline-start: 0.5rem;\n }\n\n .option--checkbox{\n pointer-events: none;\n margin-left: 12px;\n margin-right: 12px;\n width:auto;\n }\n\n @media (forced-colors: active) {\n :host(:hover:not([aria-disabled='true'])) .option {\n outline: dashed 1px SelectedItem;\n outline-offset: -1px;\n }\n }\n`;\n\nexport default [styles];\n"]}
@@ -36,7 +36,6 @@ export declare class NileOption extends NileElement {
36
36
  private cachedTextLabel;
37
37
  defaultSlot: HTMLSlotElement;
38
38
  current: boolean;
39
- selected: boolean;
40
39
  hasHover: boolean;
41
40
  hidden: boolean;
42
41
  isMultipleSelect: boolean;
@@ -48,12 +47,17 @@ export declare class NileOption extends NileElement {
48
47
  value: string;
49
48
  /** Draws the option in a disabled state, preventing selection. */
50
49
  disabled: boolean;
50
+ /** Forces the option to display in multiple select mode with checkboxes. */
51
+ multiple: boolean;
52
+ /** Indicates whether the option is selected. */
53
+ selected: boolean;
51
54
  connectedCallback(): void;
52
55
  private handleDefaultSlotChange;
53
56
  private handleMouseEnter;
54
57
  private handleMouseLeave;
55
58
  handleDisabledChange(): void;
56
59
  handleSelectedChange(): void;
60
+ handleMultipleChange(): void;
57
61
  handleValueChange(): void;
58
62
  /** Returns a plain text label based on the option's content. */
59
63
  getTextLabel(): string;
@@ -39,7 +39,6 @@ let NileOption = class NileOption extends NileElement {
39
39
  constructor() {
40
40
  super(...arguments);
41
41
  this.current = false; // the user has keyed into the option, but hasn't selected it yet (shows a highlight)
42
- this.selected = false; // the option is selected and has aria-selected="true"
43
42
  this.hasHover = false; // we need this because Safari doesn't honor :hover styles while dragging
44
43
  this.hidden = false; // the option is hidden
45
44
  this.isMultipleSelect = false;
@@ -51,13 +50,17 @@ let NileOption = class NileOption extends NileElement {
51
50
  this.value = '';
52
51
  /** Draws the option in a disabled state, preventing selection. */
53
52
  this.disabled = false;
53
+ /** Forces the option to display in multiple select mode with checkboxes. */
54
+ this.multiple = false;
55
+ /** Indicates whether the option is selected. */
56
+ this.selected = false;
54
57
  }
55
58
  connectedCallback() {
56
59
  super.connectedCallback();
57
60
  this.setAttribute('role', 'option');
58
61
  this.setAttribute('aria-selected', 'false');
59
- // Find the closest parent 'nile-select' element
60
- const parentSelect = this.closest('nile-select');
62
+ // Find the closest parent 'nile-select' or 'nile-virtual-select' element
63
+ const parentSelect = this.closest('nile-select') || this.closest('nile-virtual-select');
61
64
  // Check if the parent has the 'multiple' attribute
62
65
  if (parentSelect && parentSelect.hasAttribute('multiple')) {
63
66
  let multipleValue = parentSelect.getAttribute('multiple');
@@ -68,6 +71,9 @@ let NileOption = class NileOption extends NileElement {
68
71
  this.isMultipleSelect = Boolean(multipleValue);
69
72
  }
70
73
  }
74
+ if (this.multiple) {
75
+ this.isMultipleSelect = true;
76
+ }
71
77
  }
72
78
  handleDefaultSlotChange() {
73
79
  const textLabel = this.getTextLabel();
@@ -94,6 +100,9 @@ let NileOption = class NileOption extends NileElement {
94
100
  handleSelectedChange() {
95
101
  this.setAttribute('aria-selected', this.selected ? 'true' : 'false');
96
102
  }
103
+ handleMultipleChange() {
104
+ this.isMultipleSelect = this.multiple;
105
+ }
97
106
  handleValueChange() {
98
107
  // Ensure the value is a string. This ensures the next line doesn't error and allows framework users to pass numbers
99
108
  // instead of requiring them to cast the value to a string.
@@ -157,9 +166,6 @@ __decorate([
157
166
  __decorate([
158
167
  state()
159
168
  ], NileOption.prototype, "current", void 0);
160
- __decorate([
161
- state()
162
- ], NileOption.prototype, "selected", void 0);
163
169
  __decorate([
164
170
  state()
165
171
  ], NileOption.prototype, "hasHover", void 0);
@@ -175,12 +181,21 @@ __decorate([
175
181
  __decorate([
176
182
  property({ type: Boolean, reflect: true })
177
183
  ], NileOption.prototype, "disabled", void 0);
184
+ __decorate([
185
+ property({ type: Boolean, reflect: true })
186
+ ], NileOption.prototype, "multiple", void 0);
187
+ __decorate([
188
+ property({ type: Boolean, reflect: true })
189
+ ], NileOption.prototype, "selected", void 0);
178
190
  __decorate([
179
191
  watch('disabled')
180
192
  ], NileOption.prototype, "handleDisabledChange", null);
181
193
  __decorate([
182
194
  watch('selected')
183
195
  ], NileOption.prototype, "handleSelectedChange", null);
196
+ __decorate([
197
+ watch('multiple')
198
+ ], NileOption.prototype, "handleMultipleChange", null);
184
199
  __decorate([
185
200
  watch('value')
186
201
  ], NileOption.prototype, "handleValueChange", null);
@@ -1 +1 @@
1
- {"version":3,"file":"nile-option.js","sourceRoot":"","sources":["../../../src/nile-option/nile-option.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,kBAAkB,CAAC;AAE1B;;;;;GAKG;AAEH;;;;;;;;;;;;;;;GAeG;AAGI,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,WAAW;IAApC;;QAOI,YAAO,GAAG,KAAK,CAAC,CAAC,qFAAqF;QACtG,aAAQ,GAAG,KAAK,CAAC,CAAC,sDAAsD;QACxE,aAAQ,GAAG,KAAK,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in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement, CSSResultArray, TemplateResult } from 'lit';\nimport { styles } from './nile-option.css';\nimport '../nile-icon';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { html } from 'lit';\nimport { watch } from '../internal/watch';\nimport type { CSSResultGroup } from 'lit';\nimport NileElement from '../internal/nile-element';\nimport '../nile-checkbox';\n\n/**\n * Nile icon component.\n *\n * @tag nile-option\n *\n */\n\n/**\n * @summary Options define the selectable items within various form controls such as [select](/components/select).\n * @status stable\n *\n * @dependency nile-icon\n *\n * @slot - The option's label.\n * @slot prefix - Used to prepend an icon or similar element to the menu item.\n * @slot suffix - Used to append an icon or similar element to the menu item.\n *\n * @csspart checked-icon - The checked icon, an `<nile-icon>` element.\n * @csspart base - The component's base wrapper.\n * @csspart label - The option's label.\n * @csspart prefix - The container that wraps the prefix.\n * @csspart suffix - The container that wraps the suffix.\n */\n\n@customElement('nile-option')\nexport class NileOption extends NileElement {\n static styles: CSSResultGroup = styles;\n\n private cachedTextLabel: string;\n\n @query('.option__label') defaultSlot: HTMLSlotElement;\n\n @state() current = false; // the user has keyed into the option, but hasn't selected it yet (shows a highlight)\n @state() selected = false; // the option is selected and has aria-selected=\"true\"\n @state() hasHover = false; // we need this because Safari doesn't honor :hover styles while dragging\n @state() hidden = false; // the option is hidden\n @state() isMultipleSelect = false;\n\n /**\n * The option's value. When selected, the containing form control will receive this value. The value must be unique\n * from other options in the same group. Values may not contain spaces, as spaces are used as delimiters when listing\n * multiple values.\n */\n @property({ reflect: true }) value = '';\n\n /** Draws the option in a disabled state, preventing selection. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.setAttribute('role', 'option');\n this.setAttribute('aria-selected', 'false');\n\n // Find the closest parent 'nile-select' element\n const parentSelect = this.closest('nile-select');\n\n // Check if the parent has the 'multiple' attribute\n if (parentSelect && parentSelect.hasAttribute('multiple')) {\n let multipleValue = parentSelect.getAttribute('multiple');\n if (multipleValue !== 'false') {\n if(multipleValue === ''){\n multipleValue = 'true';\n }\n this.isMultipleSelect = Boolean(multipleValue);\n }\n }\n }\n\n private handleDefaultSlotChange() {\n const textLabel = this.getTextLabel();\n\n // Ignore the first time the label is set\n if (typeof this.cachedTextLabel === 'undefined') {\n this.cachedTextLabel = textLabel;\n return;\n }\n\n // When the label changes, emit a slotchange event so parent controls see it\n if (textLabel !== this.cachedTextLabel) {\n this.cachedTextLabel = textLabel;\n this.emit('slotchange');\n }\n }\n\n private handleMouseEnter() {\n this.hasHover = true;\n }\n\n private handleMouseLeave() {\n this.hasHover = false;\n }\n\n @watch('disabled')\n handleDisabledChange() {\n this.setAttribute('aria-disabled', this.disabled ? 'true' : 'false');\n }\n\n @watch('selected')\n handleSelectedChange() {\n this.setAttribute('aria-selected', this.selected ? 'true' : 'false');\n }\n\n @watch('value')\n handleValueChange() {\n // Ensure the value is a string. This ensures the next line doesn't error and allows framework users to pass numbers\n // instead of requiring them to cast the value to a string.\n if (typeof this.value !== 'string') {\n this.value = String(this.value);\n }\n\n // if (this.value.includes(' ')) {\n // console.error(\n // `Option values cannot include a space. All spaces have been replaced with underscores.`,\n // this\n // );\n // this.value = this.value.replace(/ /g, '_');\n // }\n }\n\n /** Returns a plain text label based on the option's content. */\n getTextLabel() {\n // Search for a label element inside the component\n const labelElement = this.querySelector('label');\n\n // If a label element is found, return its text content\n if (labelElement) {\n return labelElement.textContent?.trim() ?? '';\n }\n\n // If no label element is found, return the existing behavior\n return (this.textContent ?? '').trim();\n }\n\n render() {\n return html`\n ${!this.hidden\n ? html` <div\n part=\"base\"\n class=${classMap({\n option: true,\n 'option--single-select': !this.isMultipleSelect,\n 'option--current': this.selected && !this.isMultipleSelect,\n 'option--disabled': this.disabled,\n 'option--selected': this.selected && !this.isMultipleSelect,\n 'option--hover': this.hasHover,\n })}\n @mouseenter=${this.handleMouseEnter}\n @mouseleave=${this.handleMouseLeave}\n >\n\n ${this.isMultipleSelect ? html`<nile-checkbox class=\"option--checkbox\" .checked=${this.selected}></nile-checkbox>` : ''}\n\n <slot part=\"prefix\" name=\"prefix\" class=\"option__prefix\"></slot>\n <slot\n part=\"label\"\n class=\"option__label\"\n @slotchange=${this.handleDefaultSlotChange}\n ></slot>\n <slot part=\"suffix\" name=\"suffix\" class=\"option__suffix\"></slot>\n </div>`\n : ''}\n `;\n }\n}\n\nexport default NileOption;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-option': NileOption;\n }\n}\n"]}
1
+ {"version":3,"file":"nile-option.js","sourceRoot":"","sources":["../../../src/nile-option/nile-option.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,kBAAkB,CAAC;AAE1B;;;;;GAKG;AAEH;;;;;;;;;;;;;;;GAeG;AAGI,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,WAAW;IAApC;;QAOI,YAAO,GAAG,KAAK,CAAC,CAAC,qFAAqF;QACtG,aAAQ,GAAG,KAAK,CAAC,CAAC,yEAAyE;QAC3F,WAAM,GAAG,KAAK,CAAC,CAAC,uBAAuB;QACvC,qBAAgB,GAAG,KAAK,CAAC;QAElC;;;;WAIG;QAC0B,UAAK,GAAG,EAAE,CAAC;QAExC,kEAAkE;QACtB,aAAQ,GAAG,KAAK,CAAC;QAE7D,4EAA4E;QAChC,aAAQ,GAAG,KAAK,CAAC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sDAGjB;AAGD;IADC,KAAK,CAAC,UAAU,CAAC;sDAGjB;AAGD;IADC,KAAK,CAAC,UAAU,CAAC;sDAGjB;AAGD;IADC,KAAK,CAAC,OAAO,CAAC;mDAed;AA1GU,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CAwJtB;;AAED,eAAe,UAAU,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement, CSSResultArray, TemplateResult } from 'lit';\nimport { styles } from './nile-option.css';\nimport '../nile-icon';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { html } from 'lit';\nimport { watch } from '../internal/watch';\nimport type { CSSResultGroup } from 'lit';\nimport NileElement from '../internal/nile-element';\nimport '../nile-checkbox';\n\n/**\n * Nile icon component.\n *\n * @tag nile-option\n *\n */\n\n/**\n * @summary Options define the selectable items within various form controls such as [select](/components/select).\n * @status stable\n *\n * @dependency nile-icon\n *\n * @slot - The option's label.\n * @slot prefix - Used to prepend an icon or similar element to the menu item.\n * @slot suffix - Used to append an icon or similar element to the menu item.\n *\n * @csspart checked-icon - The checked icon, an `<nile-icon>` element.\n * @csspart base - The component's base wrapper.\n * @csspart label - The option's label.\n * @csspart prefix - The container that wraps the prefix.\n * @csspart suffix - The container that wraps the suffix.\n */\n\n@customElement('nile-option')\nexport class NileOption extends NileElement {\n static styles: CSSResultGroup = styles;\n\n private cachedTextLabel: string;\n\n @query('.option__label') defaultSlot: HTMLSlotElement;\n\n @state() current = false; // the user has keyed into the option, but hasn't selected it yet (shows a highlight)\n @state() hasHover = false; // we need this because Safari doesn't honor :hover styles while dragging\n @state() hidden = false; // the option is hidden\n @state() isMultipleSelect = false;\n\n /**\n * The option's value. When selected, the containing form control will receive this value. The value must be unique\n * from other options in the same group. Values may not contain spaces, as spaces are used as delimiters when listing\n * multiple values.\n */\n @property({ reflect: true }) value = '';\n\n /** Draws the option in a disabled state, preventing selection. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Forces the option to display in multiple select mode with checkboxes. */\n @property({ type: Boolean, reflect: true }) multiple = false;\n\n /** Indicates whether the option is selected. */\n @property({ type: Boolean, reflect: true }) selected = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.setAttribute('role', 'option');\n this.setAttribute('aria-selected', 'false');\n\n // Find the closest parent 'nile-select' or 'nile-virtual-select' element\n const parentSelect = this.closest('nile-select') || this.closest('nile-virtual-select');\n\n // Check if the parent has the 'multiple' attribute\n if (parentSelect && parentSelect.hasAttribute('multiple')) {\n let multipleValue = parentSelect.getAttribute('multiple');\n if (multipleValue !== 'false') {\n if(multipleValue === ''){\n multipleValue = 'true';\n }\n this.isMultipleSelect = Boolean(multipleValue);\n }\n }\n\n if (this.multiple) {\n this.isMultipleSelect = true;\n }\n }\n\n private handleDefaultSlotChange() {\n const textLabel = this.getTextLabel();\n\n // Ignore the first time the label is set\n if (typeof this.cachedTextLabel === 'undefined') {\n this.cachedTextLabel = textLabel;\n return;\n }\n\n // When the label changes, emit a slotchange event so parent controls see it\n if (textLabel !== this.cachedTextLabel) {\n this.cachedTextLabel = textLabel;\n this.emit('slotchange');\n }\n }\n\n private handleMouseEnter() {\n this.hasHover = true;\n }\n\n private handleMouseLeave() {\n this.hasHover = false;\n }\n\n @watch('disabled')\n handleDisabledChange() {\n this.setAttribute('aria-disabled', this.disabled ? 'true' : 'false');\n }\n\n @watch('selected')\n handleSelectedChange() {\n this.setAttribute('aria-selected', this.selected ? 'true' : 'false');\n }\n\n @watch('multiple')\n handleMultipleChange() {\n this.isMultipleSelect = this.multiple;\n }\n\n @watch('value')\n handleValueChange() {\n // Ensure the value is a string. This ensures the next line doesn't error and allows framework users to pass numbers\n // instead of requiring them to cast the value to a string.\n if (typeof this.value !== 'string') {\n this.value = String(this.value);\n }\n\n // if (this.value.includes(' ')) {\n // console.error(\n // `Option values cannot include a space. All spaces have been replaced with underscores.`,\n // this\n // );\n // this.value = this.value.replace(/ /g, '_');\n // }\n }\n\n /** Returns a plain text label based on the option's content. */\n getTextLabel() {\n // Search for a label element inside the component\n const labelElement = this.querySelector('label');\n\n // If a label element is found, return its text content\n if (labelElement) {\n return labelElement.textContent?.trim() ?? '';\n }\n\n // If no label element is found, return the existing behavior\n return (this.textContent ?? '').trim();\n }\n\n render() {\n return html`\n ${!this.hidden\n ? html` <div\n part=\"base\"\n class=${classMap({\n option: true,\n 'option--single-select': !this.isMultipleSelect,\n 'option--current': this.selected && !this.isMultipleSelect,\n 'option--disabled': this.disabled,\n 'option--selected': this.selected && !this.isMultipleSelect,\n 'option--hover': this.hasHover,\n })}\n @mouseenter=${this.handleMouseEnter}\n @mouseleave=${this.handleMouseLeave}\n >\n\n ${this.isMultipleSelect ? html`<nile-checkbox class=\"option--checkbox\" .checked=${this.selected}></nile-checkbox>` : ''}\n\n <slot part=\"prefix\" name=\"prefix\" class=\"option__prefix\"></slot>\n <slot\n part=\"label\"\n class=\"option__label\"\n @slotchange=${this.handleDefaultSlotChange}\n ></slot>\n <slot part=\"suffix\" name=\"suffix\" class=\"option__suffix\"></slot>\n </div>`\n : ''}\n `;\n }\n}\n\nexport default NileOption;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-option': NileOption;\n }\n}\n"]}
@@ -16,38 +16,38 @@ export const styles = css `
16
16
  display: flex;
17
17
  align-items: center;
18
18
  justify-content: space-between;
19
- padding: var(--nile-spacing-spacing-md, var(--ng-spacing-md)) var(--nile-spacing-spacing-lg, var(--ng-spacing-lg));
19
+ padding: var(--nile-spacing-spacing-md) var(--nile-spacing-spacing-lg);
20
20
  }
21
21
 
22
22
  .pagination-wrapper.v2 {
23
23
  justify-content: flex-start;
24
- gap: var(--nile-spacing-spacing-lg, var(--ng-spacing-lg));
24
+ gap: var(--nile-spacing-spacing-lg);
25
25
  }
26
26
 
27
27
  .pagination-wrapper.v2 .pager-container {
28
28
  flex-direction: row;
29
29
  align-items: center;
30
- gap: var(--nile-spacing-spacing-md, var(--ng-spacing-md));
31
- margin-right: var(--nile-spacing-spacing-xl, var(--ng-spacing-xl));
30
+ gap: var(--nile-spacing-spacing-md);
31
+ margin-right: var(--nile-spacing-spacing-xl);
32
32
  }
33
33
 
34
34
  .pagination-wrapper.v2 .range-text {
35
- margin-right: var(--nile-spacing-spacing-md, var(--ng-spacing-md));
36
- font-size: var(--nile-font-size-small, var(--ng-font-size-text-sm));
37
- color: var(--nile-colors-dark-900, var(--ng-colors-text-tertiary-600));
35
+ margin-right: var(--nile-spacing-spacing-md);
36
+ font-size: var(--nile-font-size-small);
37
+ color: var(--nile-colors-dark-900);
38
38
  font-feature-settings: 'liga' off, 'clig' off;
39
- font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));
39
+ font-weight: var(--nile-font-weight-regular);
40
40
  }
41
41
 
42
42
  .pager-container {
43
43
  display: flex;
44
44
  align-items: center;
45
- gap: var(--nile-spacing-spacing-3xl, var( --ng-spacing-3xl));
45
+ gap: var(--nile-spacing-spacing-3xl);
46
46
  }
47
47
 
48
48
  .range-text {
49
- font-size: var(--nile-font-size-small, var(--ng-font-size-text-sm));
50
- color: var(--nile-colors-dark-900, var(--ng-colors-text-tertiary-600));
49
+ font-size: var(--nile-font-size-small);
50
+ color: var(--nile-colors-dark-900);
51
51
  white-space: nowrap;
52
52
  }
53
53
 
@@ -59,13 +59,13 @@ export const styles = css `
59
59
  ul.pagination {
60
60
  display: flex;
61
61
  list-style: none;
62
- padding: var(--nile-spacing-spacing-none, var(--ng-spacing-none));
63
- margin: var(--nile-spacing-spacing-none, var(--ng-spacing-none));
64
- gap: var(--nile-radius-radius-xxs, var(--ng-spacing-xs));
62
+ padding: var(--nile-spacing-spacing-none);
63
+ margin: var(--nile-spacing-spacing-none);
64
+ gap: var(--nile-radius-radius-xxs);
65
65
  }
66
66
 
67
67
  ul.pagination li {
68
- margin: var(--nile-spacing-spacing-none, var(--ng-spacing-none));
68
+ margin: var(--nile-spacing-spacing-none);
69
69
  }
70
70
 
71
71
  .ellipsis-scroll-wrapper {
@@ -76,7 +76,7 @@ export const styles = css `
76
76
 
77
77
  .ellipsis-dropdown nile-menu {
78
78
  overflow-y: auto;
79
- padding: var(--nile-spacing-spacing-lg, var(--ng-spacing-lg)) var(--nile-spacing-spacing-none, var(--ng-spacing-none));
79
+ padding: var(--nile-spacing-spacing-lg) var(--nile-spacing-spacing-none);
80
80
  box-shadow: 0px 4px 8px 0px rgba(119, 125, 130, 0.15);
81
81
  }
82
82
 
@@ -88,45 +88,39 @@ export const styles = css `
88
88
  }
89
89
 
90
90
  ul.pagination li:first-child {
91
- margin-right: var(--nile-spacing-spacing-xs, var(--ng-spacing-xs));
91
+ margin-right: var(--nile-spacing-spacing-xs);
92
92
  }
93
93
  ul.pagination li:last-child {
94
- margin-left: var(--nile-spacing-spacing-md, var(--ng-spacing-md));
94
+ margin-left: var(--nile-spacing-spacing-md);
95
95
  }
96
96
 
97
97
  .page-size-label {
98
- font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));
99
- color: var(--nile-colors-dark-500, var(--ng-colors-text-tertiary-600));
100
- margin-left: var(--nile-spacing-spacing-md, var(--ng-spacing-md));
98
+ font-size: var(--nile-type-scale-3);
99
+ color: var(--nile-colors-dark-500);
100
+ margin-left: var(--nile-spacing-spacing-md);
101
101
  font-feature-settings: 'liga' off, 'clig' off;
102
- font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));
102
+ font-weight: var(--nile-font-weight-regular);
103
103
  }
104
104
 
105
105
  nile-button::part(base) {
106
106
  min-width: 32px;
107
-
108
107
  height: 32px;
109
108
  padding: 0px 6px;
110
-
109
+ box-shadow: none;
111
110
  }
112
111
 
113
112
  nile-button::part(base):active {
114
113
  min-width: 32px;
115
114
  height: 32px;
116
115
  padding: 0px 6px;
117
- box-shadow: var(--nile-box-shadow-none);
116
+ box-shadow: none;
118
117
  border:none;
119
118
  }
120
119
 
121
120
  nile-button.down::part(base){
122
121
  min-width: 62px;
123
- border: 1px solid var(--nile-colors-neutral-500, var(--ng-colors-border-primary));
124
- }
125
122
 
126
- nile-button.arrow::part(base){
127
- border: 1px solid var(--nile-colors-neutral-500, var(--ng-colors-border-primary));
128
123
  }
129
-
130
124
  .page-size-dropdown .chevron {
131
125
  transition: transform 0.2s;
132
126
  }
@@ -1 +1 @@
1
- {"version":3,"file":"nile-pagination.css.js","sourceRoot":"","sources":["../../../src/nile-pagination/nile-pagination.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkIxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/**\n * Pagination CSS\n */\nexport const styles = css`\n :host {\n }\n\n .pagination-wrapper {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--nile-spacing-spacing-md, var(--ng-spacing-md)) var(--nile-spacing-spacing-lg, var(--ng-spacing-lg));\n }\n\n .pagination-wrapper.v2 {\n justify-content: flex-start;\n gap: var(--nile-spacing-spacing-lg, var(--ng-spacing-lg));\n }\n\n .pagination-wrapper.v2 .pager-container {\n flex-direction: row;\n align-items: center;\n gap: var(--nile-spacing-spacing-md, var(--ng-spacing-md));\n margin-right: var(--nile-spacing-spacing-xl, var(--ng-spacing-xl));\n }\n\n .pagination-wrapper.v2 .range-text {\n margin-right: var(--nile-spacing-spacing-md, var(--ng-spacing-md));\n font-size: var(--nile-font-size-small, var(--ng-font-size-text-sm));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-tertiary-600));\n font-feature-settings: 'liga' off, 'clig' off;\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));\n }\n\n .pager-container {\n display: flex;\n align-items: center;\n gap: var(--nile-spacing-spacing-3xl, var( --ng-spacing-3xl));\n }\n\n .range-text {\n font-size: var(--nile-font-size-small, var(--ng-font-size-text-sm));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-tertiary-600));\n white-space: nowrap;\n }\n\n .page-size-select {\n display: inline-flex;\n align-items: center;\n }\n\n ul.pagination {\n display: flex;\n list-style: none;\n padding: var(--nile-spacing-spacing-none, var(--ng-spacing-none));\n margin: var(--nile-spacing-spacing-none, var(--ng-spacing-none));\n gap: var(--nile-radius-radius-xxs, var(--ng-spacing-xs));\n }\n\n ul.pagination li {\n margin: var(--nile-spacing-spacing-none, var(--ng-spacing-none));\n }\n\n .ellipsis-scroll-wrapper {\n max-height: 194px;\n overflow-y: auto;\n width: 66px;\n }\n\n .ellipsis-dropdown nile-menu {\n overflow-y: auto;\n padding: var(--nile-spacing-spacing-lg, var(--ng-spacing-lg)) var(--nile-spacing-spacing-none, var(--ng-spacing-none));\n box-shadow: 0px 4px 8px 0px rgba(119, 125, 130, 0.15);\n }\n\n \n\n .page-size-menu {\n max-height: 144px;\n overflow-y: auto;\n }\n\n ul.pagination li:first-child {\n margin-right: var(--nile-spacing-spacing-xs, var(--ng-spacing-xs));\n }\n ul.pagination li:last-child {\n margin-left: var(--nile-spacing-spacing-md, var(--ng-spacing-md));\n }\n\n .page-size-label {\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n color: var(--nile-colors-dark-500, var(--ng-colors-text-tertiary-600));\n margin-left: var(--nile-spacing-spacing-md, var(--ng-spacing-md));\n font-feature-settings: 'liga' off, 'clig' off;\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));\n }\n\n nile-button::part(base) {\n min-width: 32px;\n \n height: 32px;\n padding: 0px 6px;\n \n}\n\n nile-button::part(base):active {\n min-width: 32px;\n height: 32px;\n padding: 0px 6px;\n box-shadow: var(--nile-box-shadow-none);\n border:none;\n}\n \n nile-button.down::part(base){\n min-width: 62px;\n border: 1px solid var(--nile-colors-neutral-500, var(--ng-colors-border-primary));\n }\n\n nile-button.arrow::part(base){\n border: 1px solid var(--nile-colors-neutral-500, var(--ng-colors-border-primary));\n }\n\n.page-size-dropdown .chevron {\n transition: transform 0.2s;\n}\n.page-size-dropdown .open .chevron {\n transform: rotate(180deg);\n}\n\n\n\n\n\n`;\n\nexport default [styles];\n"]}
1
+ {"version":3,"file":"nile-pagination.css.js","sourceRoot":"","sources":["../../../src/nile-pagination/nile-pagination.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4HxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/**\n * Pagination CSS\n */\nexport const styles = css`\n :host {\n }\n\n .pagination-wrapper {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--nile-spacing-spacing-md) var(--nile-spacing-spacing-lg);\n }\n\n .pagination-wrapper.v2 {\n justify-content: flex-start;\n gap: var(--nile-spacing-spacing-lg);\n }\n\n .pagination-wrapper.v2 .pager-container {\n flex-direction: row;\n align-items: center;\n gap: var(--nile-spacing-spacing-md);\n margin-right: var(--nile-spacing-spacing-xl);\n }\n\n .pagination-wrapper.v2 .range-text {\n margin-right: var(--nile-spacing-spacing-md);\n font-size: var(--nile-font-size-small);\n color: var(--nile-colors-dark-900);\n font-feature-settings: 'liga' off, 'clig' off;\n font-weight: var(--nile-font-weight-regular);\n }\n\n .pager-container {\n display: flex;\n align-items: center;\n gap: var(--nile-spacing-spacing-3xl);\n }\n\n .range-text {\n font-size: var(--nile-font-size-small);\n color: var(--nile-colors-dark-900);\n white-space: nowrap;\n }\n\n .page-size-select {\n display: inline-flex;\n align-items: center;\n }\n\n ul.pagination {\n display: flex;\n list-style: none;\n padding: var(--nile-spacing-spacing-none);\n margin: var(--nile-spacing-spacing-none);\n gap: var(--nile-radius-radius-xxs);\n }\n\n ul.pagination li {\n margin: var(--nile-spacing-spacing-none);\n }\n\n .ellipsis-scroll-wrapper {\n max-height: 194px;\n overflow-y: auto;\n width: 66px;\n }\n\n .ellipsis-dropdown nile-menu {\n overflow-y: auto;\n padding: var(--nile-spacing-spacing-lg) var(--nile-spacing-spacing-none);\n box-shadow: 0px 4px 8px 0px rgba(119, 125, 130, 0.15);\n }\n\n \n\n .page-size-menu {\n max-height: 144px;\n overflow-y: auto;\n }\n\n ul.pagination li:first-child {\n margin-right: var(--nile-spacing-spacing-xs);\n }\n ul.pagination li:last-child {\n margin-left: var(--nile-spacing-spacing-md);\n }\n\n .page-size-label {\n font-size: var(--nile-type-scale-3);\n color: var(--nile-colors-dark-500);\n margin-left: var(--nile-spacing-spacing-md);\n font-feature-settings: 'liga' off, 'clig' off;\n font-weight: var(--nile-font-weight-regular);\n }\n\n nile-button::part(base) {\n min-width: 32px;\n height: 32px;\n padding: 0px 6px;\n box-shadow: none;\n}\n\n nile-button::part(base):active {\n min-width: 32px;\n height: 32px;\n padding: 0px 6px;\n box-shadow: none;\n border:none;\n}\n \n nile-button.down::part(base){\n min-width: 62px;\n\n }\n.page-size-dropdown .chevron {\n transition: transform 0.2s;\n}\n.page-size-dropdown .open .chevron {\n transform: rotate(180deg);\n}\n\n\n\n\n\n`;\n\nexport default [styles];\n"]}
@@ -67,7 +67,7 @@ let NilePagination = class NilePagination extends NileElement {
67
67
  ?disabled=${this.disabled}
68
68
  >
69
69
  ${this.pageSize}
70
- <nile-icon name="chevrondown" size="14" color="var(--nile-colors-dark-500,var(--ng-colors-fg-quaternary-400))" class="chevron"></nile-icon>
70
+ <nile-icon name="chevrondown" size="14" color="var(--nile-colors-dark-500)" class="chevron"></nile-icon>
71
71
  </nile-button>
72
72
  <nile-menu class="page-size-menu">
73
73
  ${this.pageSizeOptions.map(size => html `
@@ -87,12 +87,11 @@ let NilePagination = class NilePagination extends NileElement {
87
87
  return html `
88
88
  <li>
89
89
  <nile-button
90
- class="arrow"
91
90
  variant="tertiary"
92
91
  ?disabled=${this.currentPage === 1 || this.disabled}
93
92
  @click=${() => this.goToPage(this.currentPage - 1)}
94
93
  >
95
- <nile-icon name="arrowleft" color="var(--nile-colors-dark-500, var(--ng-colors-fg-quaternary-400))" size="14"></nile-icon>
94
+ <nile-icon name="arrowleft" size="14"></nile-icon>
96
95
  </nile-button>
97
96
  </li>
98
97
  `;
@@ -102,11 +101,10 @@ let NilePagination = class NilePagination extends NileElement {
102
101
  <li>
103
102
  <nile-button
104
103
  variant="tertiary"
105
- class="arrow"
106
104
  ?disabled=${this.currentPage === this.totalPages || this.disabled}
107
105
  @click=${() => this.goToPage(this.currentPage + 1)}
108
106
  >
109
- <nile-icon name="arrowright" color="var(--nile-colors-dark-500, var(--ng-colors-fg-quaternary-400))" size="14"></nile-icon>
107
+ <nile-icon name="arrowright" size="14"></nile-icon>
110
108
  </nile-button>
111
109
  </li>
112
110
  `;
@@ -1 +1 @@
1
- {"version":3,"file":"nile-pagination.js","sourceRoot":"","sources":["../../../src/nile-pagination/nile-pagination.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,OAAO,EAAc,IAAI,EAAkC,MAAM,KAAK,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE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B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gDAAkB;AACjB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;iDAAkB;AAE7B;IAAhB,KAAK,EAAE;qDAA+B;AACD;IAArC,KAAK,CAAC,qBAAqB,CAAC;yDAAyC;AA7B3D,cAAc;IAD1B,aAAa,CAAC,iBAAiB,CAAC;GACpB,cAAc,CAoM1B","sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { LitElement, html, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { styles } from './nile-pagination.css';\nimport NileElement from '../internal/nile-element';\nimport {\n calculateTotalPages,\n getPaginationItems,\n getHiddenPages,\n getRangeText,\n} from './nile-pagination-utils';\n\n@customElement('nile-pagination')\nexport class NilePagination extends NileElement {\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n \n @property({attribute: 'totalitems',reflect: true, converter: { fromAttribute: (v: string) => {const n = Number(v);\n return Number.isFinite(n) && n >= 0 ? Math.floor(n) : 0; }}})totalItems: number = 0;\n\n @property({ attribute: 'currentpage',reflect: true,converter: { fromAttribute: (v: string) => { const n = Number(v);\n return Number.isFinite(n) && n >= 1 ? Math.floor(n) : 1;}}}) currentPage : number = 1;\n\n\n @property({attribute: 'pagesize',reflect: true, converter: { fromAttribute: (v: string) => {\n const n = Number(v);\n return Number.isFinite(n) && n >= 1 ? Math.floor(n) : 50;}}}) pageSize: number = 50;\n\n\n @property({ attribute: 'pagesizeoptions', reflect: false,converter: { fromAttribute: (v: string) => { try { const arr = JSON.parse(v);\n if (Array.isArray(arr) && arr.every(x => typeof x === 'number')) {\n return arr as number[];\n }\n } catch {}return [10, 25, 50, 100];}}}) pageSizeOptions: number[] = [10, 25, 50, 100];\n\n @property({ type: String }) variant: 'fluid' | 'compact' = 'fluid';\n @property({ type: Boolean }) disabled = false;\n @property({ type: Boolean }) showTitle = true;\n\n @state() private _pageSizeOpen = false;\n @query('.page-size-dropdown') private _pageSizeDropdown!: HTMLElement;\n\n firstUpdated() {\n this._pageSizeDropdown.addEventListener('nile-show', () => {\n this._pageSizeOpen = true;\n });\n this._pageSizeDropdown.addEventListener('nile-after-hide', () => {\n this._pageSizeOpen = false;\n });\n }\n \n private get totalPages(): number {\n return Math.max(1, calculateTotalPages(this.totalItems, this.pageSize));\n }\n\n private goToPage(page: number) {\n if (this.disabled) return;\n this.currentPage = page; \n this.emit('nile-change', { page: this.currentPage, pageSize: this.pageSize });\n }\n\n private onPageSizeSelect(size: number) {\n if (this.disabled || this.pageSize === size) return;\n this.pageSize = size;\n this.currentPage = 1;\n this.emit('nile-change', { page: 1, pageSize: size });\n }\n\n private renderRangeText(): TemplateResult {\n if (this.totalItems === 0) {\n return html`<div class=\"range-text\">Showing 0 of 0</div>`;\n }\n return html`<div class=\"range-text\">\n ${getRangeText(this.totalItems, this.pageSize, this.currentPage)}\n </div>`;\n }\n\n private renderPageSizeSelect(): TemplateResult | null {\n if (this.variant !== 'fluid') return null;\n return html`\n <div class=\"page-size-select\">\n <nile-dropdown class=\"page-size-dropdown\" ?disabled=${this.disabled}>\n <nile-button slot=\"trigger\" variant=\"tertiary\" class=\"down ${this._pageSizeOpen ? 'open' : ''}\"\n ?disabled=${this.disabled}\n >\n ${this.pageSize}\n <nile-icon name=\"chevrondown\" size=\"14\" color=\"var(--nile-colors-dark-500,var(--ng-colors-fg-quaternary-400))\" class=\"chevron\"></nile-icon>\n </nile-button>\n <nile-menu class=\"page-size-menu\">\n ${this.pageSizeOptions.map(\n size => html`\n <nile-menu-item\n ?disabled=${this.disabled}\n @click=${() => this.onPageSizeSelect(size)}\n >\n ${size}\n </nile-menu-item>`\n )}\n </nile-menu>\n </nile-dropdown>\n <span class=\"page-size-label\">Items per page</span>\n </div>\n `;\n }\n\n private renderPrevButton(): TemplateResult {\n return html`\n <li>\n <nile-button\n class=\"arrow\"\n variant=\"tertiary\"\n ?disabled=${this.currentPage === 1 || this.disabled}\n @click=${() => this.goToPage(this.currentPage - 1)}\n >\n <nile-icon name=\"arrowleft\" color=\"var(--nile-colors-dark-500, var(--ng-colors-fg-quaternary-400))\" size=\"14\"></nile-icon>\n </nile-button>\n </li>\n `;\n }\n\n private renderNextButton(): TemplateResult {\n return html`\n <li>\n <nile-button\n variant=\"tertiary\"\n class=\"arrow\" \n ?disabled=${this.currentPage === this.totalPages || this.disabled}\n @click=${() => this.goToPage(this.currentPage + 1)}\n >\n <nile-icon name=\"arrowright\" color=\"var(--nile-colors-dark-500, var(--ng-colors-fg-quaternary-400))\" size=\"14\"></nile-icon>\n </nile-button>\n </li>\n `;\n }\n\n private renderPageItem(\n item: number | string,\n idx: number,\n items: (number | string)[]\n ): TemplateResult {\n if (item === '…') {\n return html`\n <li>\n <nile-dropdown class=\"ellipsis-dropdown\" ?disabled=${this.disabled}>\n <nile-button slot=\"trigger\" variant=\"ghost\" ?disabled=${this.disabled}>\n …\n </nile-button>\n <nile-menu>\n <div class=\"ellipsis-scroll-wrapper\">\n ${getHiddenPages(\n this.totalPages,\n items,\n this.currentPage,\n idx < items.indexOf(this.currentPage) ? 'left' : 'right'\n ).map(\n page => html`\n <nile-menu-item\n ?disabled=${this.disabled}\n @click=${() => this.goToPage(page)}\n >\n ${page}\n </nile-menu-item>`\n )}\n </div>\n </nile-menu>\n </nile-dropdown>\n </li>\n `;\n }\n\n return html`\n <li>\n <nile-button\n variant=${item === this.currentPage ? 'primary' : 'ghost'}\n ?disabled=${this.disabled}\n @click=${() => this.goToPage(item as number)}\n >\n ${item}\n </nile-button>\n </li>\n `;\n }\n\n private renderPageList(): TemplateResult {\n const items = getPaginationItems(this.totalPages, this.currentPage);\n return html`\n <nav aria-label=\"Pagination\">\n <ul class=\"pagination\">\n ${this.renderPrevButton()}\n ${items.map((item, idx) => this.renderPageItem(item, idx, items))}\n ${this.renderNextButton()}\n </ul>\n </nav>\n `;\n }\n\n public render(): TemplateResult {\n return html`\n <div class=\"pagination-wrapper ${this.variant}\">\n <div class=\"pager-container\">\n ${this.showTitle ? this.renderRangeText() : null}\n ${this.renderPageSizeSelect()}\n </div>\n ${this.renderPageList()}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-pagination': NilePagination;\n }\n}\n"]}
1
+ {"version":3,"file":"nile-pagination.js","sourceRoot":"","sources":["../../../src/nile-pagination/nile-pagination.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,OAAO,EAAc,IAAI,EAAkC,MAAM,KAAK,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACd,YAAY,GACb,MAAM,yBAAyB,CAAC;AAG1B,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,WAAW;IAAxC;;QAO8D,eAAU,GAAW,CAAC,CAAC;QAGvB,gBAAW,GAAY,CAAC,CAAC;QAKxB,aAAQ,GAAW,EAAE,CAAC;QAO5C,oBAAe,GAAa,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;QAEhE,YAAO,GAAwB,OAAO,CAAC;QACtC,aAAQ,GAAG,KAAK,CAAC;QACjB,cAAS,GAAG,IAAI,CAAC;QAE7B,kBAAa,GAAG,KAAK,CAAC;IAsKzC,CAAC;IAjMQ,MAAM,KAAK,MAAM;QACtB,OAAO,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IA4BD,YAAY;QACV,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,WAAW,EAAE,GAAG,EAAE;YACxD,IAAI,CAAC,aAAa,GAAG,IAAI,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AC,CAAC;oBAC9H,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,EAAE,CAAC;wBAChE,OAAO,GAAe,CAAC;oBACzB,CAAC;gBACH,CAAC;gBAAC,MAAM,CAAC,CAAA,CAAC;gBAAA,OAAO,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;YAAA,CAAC,EAAC,EAAC,CAAC;uDAA+C;AAEhE;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAwC;AACtC;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gDAAkB;AACjB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;iDAAkB;AAE7B;IAAhB,KAAK,EAAE;qDAA+B;AACD;IAArC,KAAK,CAAC,qBAAqB,CAAC;yDAAyC;AA7B3D,cAAc;IAD1B,aAAa,CAAC,iBAAiB,CAAC;GACpB,cAAc,CAkM1B","sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { LitElement, html, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { styles } from './nile-pagination.css';\nimport NileElement from '../internal/nile-element';\nimport {\n calculateTotalPages,\n getPaginationItems,\n getHiddenPages,\n getRangeText,\n} from './nile-pagination-utils';\n\n@customElement('nile-pagination')\nexport class NilePagination extends NileElement {\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n \n @property({attribute: 'totalitems',reflect: true, converter: { fromAttribute: (v: string) => {const n = Number(v);\n return Number.isFinite(n) && n >= 0 ? Math.floor(n) : 0; }}})totalItems: number = 0;\n\n @property({ attribute: 'currentpage',reflect: true,converter: { fromAttribute: (v: string) => { const n = Number(v);\n return Number.isFinite(n) && n >= 1 ? Math.floor(n) : 1;}}}) currentPage : number = 1;\n\n\n @property({attribute: 'pagesize',reflect: true, converter: { fromAttribute: (v: string) => {\n const n = Number(v);\n return Number.isFinite(n) && n >= 1 ? Math.floor(n) : 50;}}}) pageSize: number = 50;\n\n\n @property({ attribute: 'pagesizeoptions', reflect: false,converter: { fromAttribute: (v: string) => { try { const arr = JSON.parse(v);\n if (Array.isArray(arr) && arr.every(x => typeof x === 'number')) {\n return arr as number[];\n }\n } catch {}return [10, 25, 50, 100];}}}) pageSizeOptions: number[] = [10, 25, 50, 100];\n\n @property({ type: String }) variant: 'fluid' | 'compact' = 'fluid';\n @property({ type: Boolean }) disabled = false;\n @property({ type: Boolean }) showTitle = true;\n\n @state() private _pageSizeOpen = false;\n @query('.page-size-dropdown') private _pageSizeDropdown!: HTMLElement;\n\n firstUpdated() {\n this._pageSizeDropdown.addEventListener('nile-show', () => {\n this._pageSizeOpen = true;\n });\n this._pageSizeDropdown.addEventListener('nile-after-hide', () => {\n this._pageSizeOpen = false;\n });\n }\n \n private get totalPages(): number {\n return Math.max(1, calculateTotalPages(this.totalItems, this.pageSize));\n }\n\n private goToPage(page: number) {\n if (this.disabled) return;\n this.currentPage = page; \n this.emit('nile-change', { page: this.currentPage, pageSize: this.pageSize });\n }\n\n private onPageSizeSelect(size: number) {\n if (this.disabled || this.pageSize === size) return;\n this.pageSize = size;\n this.currentPage = 1;\n this.emit('nile-change', { page: 1, pageSize: size });\n }\n\n private renderRangeText(): TemplateResult {\n if (this.totalItems === 0) {\n return html`<div class=\"range-text\">Showing 0 of 0</div>`;\n }\n return html`<div class=\"range-text\">\n ${getRangeText(this.totalItems, this.pageSize, this.currentPage)}\n </div>`;\n }\n\n private renderPageSizeSelect(): TemplateResult | null {\n if (this.variant !== 'fluid') return null;\n return html`\n <div class=\"page-size-select\">\n <nile-dropdown class=\"page-size-dropdown\" ?disabled=${this.disabled}>\n <nile-button slot=\"trigger\" variant=\"tertiary\" class=\"down ${this._pageSizeOpen ? 'open' : ''}\"\n ?disabled=${this.disabled}\n >\n ${this.pageSize}\n <nile-icon name=\"chevrondown\" size=\"14\" color=\"var(--nile-colors-dark-500)\" class=\"chevron\"></nile-icon>\n </nile-button>\n <nile-menu class=\"page-size-menu\">\n ${this.pageSizeOptions.map(\n size => html`\n <nile-menu-item\n ?disabled=${this.disabled}\n @click=${() => this.onPageSizeSelect(size)}\n >\n ${size}\n </nile-menu-item>`\n )}\n </nile-menu>\n </nile-dropdown>\n <span class=\"page-size-label\">Items per page</span>\n </div>\n `;\n }\n\n private renderPrevButton(): TemplateResult {\n return html`\n <li>\n <nile-button\n variant=\"tertiary\"\n ?disabled=${this.currentPage === 1 || this.disabled}\n @click=${() => this.goToPage(this.currentPage - 1)}\n >\n <nile-icon name=\"arrowleft\" size=\"14\"></nile-icon>\n </nile-button>\n </li>\n `;\n }\n\n private renderNextButton(): TemplateResult {\n return html`\n <li>\n <nile-button\n variant=\"tertiary\"\n ?disabled=${this.currentPage === this.totalPages || this.disabled}\n @click=${() => this.goToPage(this.currentPage + 1)}\n >\n <nile-icon name=\"arrowright\" size=\"14\"></nile-icon>\n </nile-button>\n </li>\n `;\n }\n\n private renderPageItem(\n item: number | string,\n idx: number,\n items: (number | string)[]\n ): TemplateResult {\n if (item === '…') {\n return html`\n <li>\n <nile-dropdown class=\"ellipsis-dropdown\" ?disabled=${this.disabled}>\n <nile-button slot=\"trigger\" variant=\"ghost\" ?disabled=${this.disabled}>\n …\n </nile-button>\n <nile-menu>\n <div class=\"ellipsis-scroll-wrapper\">\n ${getHiddenPages(\n this.totalPages,\n items,\n this.currentPage,\n idx < items.indexOf(this.currentPage) ? 'left' : 'right'\n ).map(\n page => html`\n <nile-menu-item\n ?disabled=${this.disabled}\n @click=${() => this.goToPage(page)}\n >\n ${page}\n </nile-menu-item>`\n )}\n </div>\n </nile-menu>\n </nile-dropdown>\n </li>\n `;\n }\n\n return html`\n <li>\n <nile-button\n variant=${item === this.currentPage ? 'primary' : 'ghost'}\n ?disabled=${this.disabled}\n @click=${() => this.goToPage(item as number)}\n >\n ${item}\n </nile-button>\n </li>\n `;\n }\n\n private renderPageList(): TemplateResult {\n const items = getPaginationItems(this.totalPages, this.currentPage);\n return html`\n <nav aria-label=\"Pagination\">\n <ul class=\"pagination\">\n ${this.renderPrevButton()}\n ${items.map((item, idx) => this.renderPageItem(item, idx, items))}\n ${this.renderNextButton()}\n </ul>\n </nav>\n `;\n }\n\n public render(): TemplateResult {\n return html`\n <div class=\"pagination-wrapper ${this.variant}\">\n <div class=\"pager-container\">\n ${this.showTitle ? this.renderRangeText() : null}\n ${this.renderPageSizeSelect()}\n </div>\n ${this.renderPageList()}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-pagination': NilePagination;\n }\n}\n"]}
@@ -133,8 +133,27 @@ let NilePopup = class NilePopup extends NileElement {
133
133
  if (this.anchorEl instanceof HTMLSlotElement) {
134
134
  this.anchorEl = this.anchorEl.assignedElements({ flatten: true })[0];
135
135
  }
136
+ /**
137
+ * NOTE TO DEVELOPERS:
138
+ * The anchor element is essential for nile-popup to function correctly.
139
+ * This error was thrown when an anchor (slot="anchor") or anchor reference was not found.
140
+ *
141
+ * In many places, developers are using *ngIf or similar conditional rendering directly on the anchor slot
142
+ * inside <nile-tooltip>, which removes the anchor from the DOM.
143
+ * As a result, the tooltip remains but cannot be anchored — leading to this error.
144
+ *
145
+ * Suggested Fixes:
146
+ * - Move *ngIf to a wrapper above <nile-tooltip>
147
+ * - OR use the 'disabled' property of nile-tooltip to prevent it from activating without anchor
148
+ *
149
+ * For now, this error is commented out to avoid runtime crashes.
150
+ * Proper usage patterns should be followed instead.
151
+ */
136
152
  if (!this.anchorEl) {
137
- throw new Error('Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.');
153
+ // throw new Error(
154
+ // 'Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.'
155
+ // );
156
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E,IAAI,EAAE,MAAM,EAAE,CAAC;gDAAoC;AAGP;IAAvD,QAAQ,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAkB;AAGnC;IAArC,QAAQ,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;2CAA8C;AAGvE;IAAX,QAAQ,EAAE;uCAAmC;AAOlB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDAAuC;AAGN;IAA3D,QAAQ,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAqB;AA/IrE,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CAyarB;;AAED,eAAe,SAAS,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, CSSResultArray, TemplateResult} from 'lit';\nimport { arrow, autoUpdate, computePosition, flip, offset, platform, shift, size } from '@floating-ui/dom';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { html } from 'lit';\nimport { offsetParent } from 'composed-offset-position';\nimport NileElement from '../internal/nile-element';\nimport {styles} from './nile-popup.css';\nimport type { CSSResultGroup } from 'lit';\n\n/**\n * Nile icon component.\n *\n * @tag nile-popup\n *\n */\n@customElement('nile-popup')\nexport class NilePopup extends NileElement {\n static styles: CSSResultGroup = styles;\n\n private anchorEl: Element | null;\n private cleanup: ReturnType<typeof autoUpdate> | undefined;\n\n /** A reference to the internal popup container. Useful for animating and styling the popup with JavaScript. */\n @query('.popup') popup: HTMLElement;\n @query('.popup__arrow') private arrowEl: HTMLElement;\n\n /**\n * The element the popup will be anchored to. If the anchor lives outside of the popup, you can provide its `id` or a\n * reference to it here. If the anchor lives inside the popup, use the `anchor` slot instead.\n */\n @property() anchor: Element | string;\n\n /**\n * Activates the positioning logic and shows the popup. When this attribute is removed, the positioning logic is torn\n * down and the popup will be hidden.\n */\n @property({ type: Boolean, reflect: true }) active = false;\n\n /**\n * The preferred placement of the popup. Note that the actual placement will vary as configured to keep the\n * panel inside of the viewport.\n */\n @property({ reflect: true }) placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'left'\n | 'left-start'\n | 'left-end' = 'top';\n\n /**\n * Determines how the popup is positioned. The `absolute` strategy works well in most cases, but if overflow is\n * clipped, using a `fixed` position strategy can often workaround it.\n */\n @property({ reflect: true }) strategy: 'absolute' | 'fixed' = 'absolute';\n\n /** The distance in pixels from which to offset the panel away from its anchor. */\n @property({ type: Number }) distance = 0;\n\n /** The distance in pixels from which to offset the panel along its anchor. */\n @property({ type: Number }) skidding = 0;\n\n /**\n * Attaches an arrow to the popup. The arrow's size and color can be customized using the `--arrow-size` and\n * `--arrow-color` custom properties. For additional customizations, you can also target the arrow using\n * `::part(arrow)` in your stylesheet.\n */\n @property({ type: Boolean }) arrow = false;\n\n /**\n * The placement of the arrow. The default is `anchor`, which will align the arrow as close to the center of the\n * anchor as possible, considering available space and `arrow-padding`. A value of `start`, `end`, or `center` will\n * align the arrow to the start, end, or center of the popover instead.\n */\n @property({ attribute: 'arrow-placement' }) arrowPlacement: 'start' | 'end' | 'center' | 'anchor' = 'anchor';\n\n /**\n * The amount of padding between the arrow and the edges of the popup. If the popup has a border-radius, for example,\n * this will prevent it from overflowing the corners.\n */\n @property({ attribute: 'arrow-padding', type: Number }) arrowPadding = 10;\n\n /**\n * When set, placement of the popup will flip to the opposite site to keep it in view. You can use\n * `flipFallbackPlacements` to further configure how the fallback placement is determined.\n */\n @property({ type: Boolean }) flip = false;\n\n /**\n * If the preferred placement doesn't fit, popup will be tested in these fallback placements until one fits. Must be a\n * string of any number of placements separated by a space, e.g. \"top bottom left\". If no placement fits, the flip\n * fallback strategy will be used instead.\n * */\n @property({\n attribute: 'flip-fallback-placements',\n converter: {\n fromAttribute: (value: string) => {\n return value\n .split(' ')\n .map(p => p.trim())\n .filter(p => p !== '');\n },\n toAttribute: (value: []) => {\n return value.join(' ');\n }\n }\n })\n flipFallbackPlacements = '';\n\n /**\n * When neither the preferred placement nor the fallback placements fit, this value will be used to determine whether\n * the popup should be positioned using the best available fit based on available space or as it was initially\n * preferred.\n */\n @property({ attribute: 'flip-fallback-strategy' }) flipFallbackStrategy: 'best-fit' | 'initial' = 'best-fit';\n\n /**\n * The flip boundary describes clipping element(s) that overflow will be checked relative to when flipping. By\n * default, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\n * change the boundary by passing a reference to one or more elements to this property.\n */\n @property({ type: Object }) flipBoundary: Element | Element[];\n\n /** The amount of padding, in pixels, to exceed before the flip behavior will occur. */\n @property({ attribute: 'flip-padding', type: Number }) flipPadding = 0;\n\n /** Moves the popup along the axis to keep it in view when clipped. */\n @property({ type: Boolean }) shift = false;\n\n /**\n * The shift boundary describes clipping element(s) that overflow will be checked relative to when shifting. By\n * default, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\n * change the boundary by passing a reference to one or more elements to this property.\n */\n @property({ type: Object }) shiftBoundary: Element | Element[];\n\n /** The amount of padding, in pixels, to exceed before the shift behavior will occur. */\n @property({ attribute: 'shift-padding', type: Number }) shiftPadding = 0;\n\n /** When set, this will cause the popup to automatically resize itself to prevent it from overflowing. */\n @property({ attribute: 'auto-size' }) autoSize: 'horizontal' | 'vertical' | 'both';\n\n /** Syncs the popup's width or height to that of the anchor element. */\n @property() sync: 'width' | 'height' | 'both';\n\n /**\n * The auto-size boundary describes clipping element(s) that overflow will be checked relative to when resizing. By\n * default, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\n * change the boundary by passing a reference to one or more elements to this property.\n */\n @property({ type: Object }) autoSizeBoundary: Element | Element[];\n\n /** The amount of padding, in pixels, to exceed before the auto-size behavior will occur. */\n @property({ attribute: 'auto-size-padding', type: Number }) autoSizePadding = 0;\n\n async connectedCallback() {\n super.connectedCallback();\n\n // Start the positioner after the first update\n await this.updateComplete;\n this.start();\n }\n\n disconnectedCallback() {\n this.stop();\n }\n\n async updated(changedProps: Map<string, unknown>) {\n super.updated(changedProps);\n\n // Start or stop the positioner when active changes\n if (changedProps.has('active')) {\n if (this.active) {\n this.start();\n } else {\n this.stop();\n }\n }\n\n // Update the anchor when anchor changes\n if (changedProps.has('anchor')) {\n this.handleAnchorChange();\n }\n\n // All other properties will trigger a reposition when active\n if (this.active) {\n await this.updateComplete;\n this.reposition();\n }\n }\n\n private async handleAnchorChange() {\n await this.stop();\n\n if (this.anchor && typeof this.anchor === 'string') {\n // Locate the anchor by id\n const root = this.getRootNode() as Document | ShadowRoot;\n this.anchorEl = root.getElementById(this.anchor);\n } else if (this.anchor instanceof Element) {\n // Use the anchor's reference\n this.anchorEl = this.anchor;\n } else {\n // Look for a slotted anchor\n this.anchorEl = this.querySelector<HTMLElement>('[slot=\"anchor\"]');\n }\n\n // If the anchor is a <slot>, we'll use the first assigned element as the target since slots use `display: contents`\n // and positioning can't be calculated on them\n if (this.anchorEl instanceof HTMLSlotElement) {\n this.anchorEl = this.anchorEl.assignedElements({ flatten: true })[0] as HTMLElement;\n }\n\n if (!this.anchorEl) {\n throw new Error(\n 'Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.'\n );\n }\n\n this.start();\n }\n\n private start() {\n // We can't start the positioner without an anchor\n if (!this.anchorEl) {\n return;\n }\n\n this.cleanup = autoUpdate(this.anchorEl, this.popup, () => {\n this.reposition();\n });\n }\n\n private async stop(): Promise<void> {\n return new Promise(resolve => {\n if (this.cleanup) {\n this.cleanup();\n this.cleanup = undefined;\n this.removeAttribute('data-current-placement');\n this.style.removeProperty('--auto-size-available-width');\n this.style.removeProperty('--auto-size-available-height');\n requestAnimationFrame(() => resolve());\n } else {\n resolve();\n }\n });\n }\n\n /** Forces the popup to recalculate and reposition itself. */\n reposition() {\n // Nothing to do if the popup is inactive or the anchor doesn't exist\n if (!this.active || !this.anchorEl) {\n return;\n }\n\n //\n // NOTE: Floating UI middlewares are order dependent: https://floating-ui.com/docs/middleware\n //\n const middleware = [\n // The offset middleware goes first\n offset({ mainAxis: this.distance, crossAxis: this.skidding })\n ];\n\n // First we sync width/height\n if (this.sync) {\n middleware.push(\n size({\n apply: ({ rects }) => {\n const syncWidth = this.sync === 'width' || this.sync === 'both';\n const syncHeight = this.sync === 'height' || this.sync === 'both';\n this.popup.style.width = syncWidth ? `${rects.reference.width}px` : '';\n this.popup.style.height = syncHeight ? `${rects.reference.height}px` : '';\n }\n })\n );\n } else {\n // Cleanup styles if we're not matching width/height\n this.popup.style.width = '';\n this.popup.style.height = '';\n }\n\n // Then we flip\n if (this.flip) {\n middleware.push(\n flip({\n boundary: this.flipBoundary,\n // @ts-expect-error - We're converting a string attribute to an array here\n fallbackPlacements: this.flipFallbackPlacements,\n fallbackStrategy: this.flipFallbackStrategy === 'best-fit' ? 'bestFit' : 'initialPlacement',\n padding: this.flipPadding\n })\n );\n }\n\n // Then we shift\n if (this.shift) {\n middleware.push(\n shift({\n boundary: this.shiftBoundary,\n padding: this.shiftPadding\n })\n );\n }\n\n // Now we adjust the size as needed\n if (this.autoSize) {\n middleware.push(\n size({\n boundary: this.autoSizeBoundary,\n padding: this.autoSizePadding,\n apply: ({ availableWidth, availableHeight }) => {\n if (this.autoSize === 'vertical' || this.autoSize === 'both') {\n this.style.setProperty('--auto-size-available-height', `${availableHeight}px`);\n } else {\n this.style.removeProperty('--auto-size-available-height');\n }\n\n if (this.autoSize === 'horizontal' || this.autoSize === 'both') {\n this.style.setProperty('--auto-size-available-width', `${availableWidth}px`);\n } else {\n this.style.removeProperty('--auto-size-available-width');\n }\n }\n })\n );\n } else {\n // Cleanup styles if we're no longer using auto-size\n this.style.removeProperty('--auto-size-available-width');\n this.style.removeProperty('--auto-size-available-height');\n }\n\n // Finally, we add an arrow\n if (this.arrow) {\n middleware.push(\n arrow({\n element: this.arrowEl,\n padding: this.arrowPadding\n })\n );\n }\n\n //\n // Use custom positioning logic if the strategy is absolute. Otherwise, fall back to the default logic.\n //\n //\n const getOffsetParent =\n this.strategy === 'absolute'\n ? (element: Element) => platform.getOffsetParent(element, offsetParent)\n : platform.getOffsetParent;\n\n computePosition(this.anchorEl, this.popup, {\n placement: this.placement,\n middleware,\n strategy: this.strategy,\n platform: {\n ...platform,\n getOffsetParent\n }\n }).then(({ x, y, middlewareData, placement }) => {\n //\n // Even though we have our own localization utility, it uses different heuristics to determine RTL. Because of\n // that, we'll use the same approach that Floating UI uses.\n //\n // Source: https://github.com/floating-ui/floating-ui/blob/cb3b6ab07f95275730d3e6e46c702f8d4908b55c/packages/dom/src/utils/getDocumentRect.ts#L31\n //\n const isRtl = getComputedStyle(this).direction === 'rtl';\n const staticSide = { top: 'bottom', right: 'left', bottom: 'top', left: 'right' }[placement.split('-')[0]]!;\n\n this.setAttribute('data-current-placement', placement);\n\n Object.assign(this.popup.style, {\n left: `${x}px`,\n top: `${y}px`\n });\n\n if (this.arrow) {\n const arrowX = middlewareData.arrow!.x;\n const arrowY = middlewareData.arrow!.y;\n let top = '';\n let right = '';\n let bottom = '';\n let left = '';\n\n if (this.arrowPlacement === 'start') {\n // Start\n const value = typeof arrowX === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n top = typeof arrowY === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n right = isRtl ? value : '';\n left = isRtl ? '' : value;\n } else if (this.arrowPlacement === 'end') {\n // End\n const value = typeof arrowX === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n right = isRtl ? '' : value;\n left = isRtl ? value : '';\n bottom = typeof arrowY === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n } else if (this.arrowPlacement === 'center') {\n // Center\n left = typeof arrowX === 'number' ? `calc(50% - var(--arrow-size-diagonal))` : '';\n top = typeof arrowY === 'number' ? `calc(50% - var(--arrow-size-diagonal))` : '';\n } else {\n // Anchor (default)\n left = typeof arrowX === 'number' ? `${arrowX}px` : '';\n top = typeof arrowY === 'number' ? `${arrowY}px` : '';\n }\n\n Object.assign(this.arrowEl.style, {\n top,\n right,\n bottom,\n left,\n [staticSide]: 'calc(var(--arrow-size-diagonal) * -1)'\n });\n }\n });\n\n this.emit('reposition');\n }\n\n render() {\n return html`\n <slot name=\"anchor\" @slotchange=${this.handleAnchorChange}></slot>\n\n <div\n part=\"popup\"\n class=${classMap({\n popup: true,\n 'popup--active': this.active,\n 'popup--fixed': this.strategy === 'fixed',\n 'popup--has-arrow': this.arrow\n })}\n >\n <slot></slot>\n ${this.arrow ? html`<div part=\"arrow\" class=\"popup__arrow\" role=\"presentation\"></div>` : ''}\n </div>\n `;\n }\n}\n\nexport default NilePopup;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-popup': NilePopup;\n }\n}\n"]}
1
+ {"version":3,"file":"nile-popup.js","sourceRoot":"","sources":["../../../src/nile-popup/nile-popup.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAGH,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC3G,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAC,MAAM,EAAC,MAAM,kBAAkB,CAAC;AAGxC;;;;;GAKG;AAEI,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,WAAW;IAA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AC,CAAC,IAAI,EAAE,CAAC;qBAClB,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;YAC3B,CAAC;YACD,WAAW,EAAE,CAAC,KAAS,EAAE,EAAE;gBACzB,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACzB,CAAC;SACF;KACF,CAAC;yDAC0B;AAOuB;IAAlD,QAAQ,CAAC,EAAE,SAAS,EAAE,wBAAwB,EAAE,CAAC;uDAA2D;AAOjF;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAmC;AAGP;IAAtD,QAAQ,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CAAiB;AAG1C;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCAAe;AAOf;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDAAoC;AAGP;IAAvD,QAAQ,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAkB;AAGnC;IAArC,QAAQ,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;2CAA8C;AAGvE;IAAX,QAAQ,EAAE;uCAAmC;AAOlB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDAAuC;AAGN;IAA3D,QAAQ,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAqB;AA/IrE,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CA0brB;;AAED,eAAe,SAAS,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, CSSResultArray, TemplateResult} from 'lit';\nimport { arrow, autoUpdate, computePosition, flip, offset, platform, shift, size } from '@floating-ui/dom';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { html } from 'lit';\nimport { offsetParent } from 'composed-offset-position';\nimport NileElement from '../internal/nile-element';\nimport {styles} from './nile-popup.css';\nimport type { CSSResultGroup } from 'lit';\n\n/**\n * Nile icon component.\n *\n * @tag nile-popup\n *\n */\n@customElement('nile-popup')\nexport class NilePopup extends NileElement {\n static styles: CSSResultGroup = styles;\n\n private anchorEl: Element | null;\n private cleanup: ReturnType<typeof autoUpdate> | undefined;\n\n /** A reference to the internal popup container. Useful for animating and styling the popup with JavaScript. */\n @query('.popup') popup: HTMLElement;\n @query('.popup__arrow') private arrowEl: HTMLElement;\n\n /**\n * The element the popup will be anchored to. If the anchor lives outside of the popup, you can provide its `id` or a\n * reference to it here. If the anchor lives inside the popup, use the `anchor` slot instead.\n */\n @property() anchor: Element | string;\n\n /**\n * Activates the positioning logic and shows the popup. When this attribute is removed, the positioning logic is torn\n * down and the popup will be hidden.\n */\n @property({ type: Boolean, reflect: true }) active = false;\n\n /**\n * The preferred placement of the popup. Note that the actual placement will vary as configured to keep the\n * panel inside of the viewport.\n */\n @property({ reflect: true }) placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'left'\n | 'left-start'\n | 'left-end' = 'top';\n\n /**\n * Determines how the popup is positioned. The `absolute` strategy works well in most cases, but if overflow is\n * clipped, using a `fixed` position strategy can often workaround it.\n */\n @property({ reflect: true }) strategy: 'absolute' | 'fixed' = 'absolute';\n\n /** The distance in pixels from which to offset the panel away from its anchor. */\n @property({ type: Number }) distance = 0;\n\n /** The distance in pixels from which to offset the panel along its anchor. */\n @property({ type: Number }) skidding = 0;\n\n /**\n * Attaches an arrow to the popup. The arrow's size and color can be customized using the `--arrow-size` and\n * `--arrow-color` custom properties. For additional customizations, you can also target the arrow using\n * `::part(arrow)` in your stylesheet.\n */\n @property({ type: Boolean }) arrow = false;\n\n /**\n * The placement of the arrow. The default is `anchor`, which will align the arrow as close to the center of the\n * anchor as possible, considering available space and `arrow-padding`. A value of `start`, `end`, or `center` will\n * align the arrow to the start, end, or center of the popover instead.\n */\n @property({ attribute: 'arrow-placement' }) arrowPlacement: 'start' | 'end' | 'center' | 'anchor' = 'anchor';\n\n /**\n * The amount of padding between the arrow and the edges of the popup. If the popup has a border-radius, for example,\n * this will prevent it from overflowing the corners.\n */\n @property({ attribute: 'arrow-padding', type: Number }) arrowPadding = 10;\n\n /**\n * When set, placement of the popup will flip to the opposite site to keep it in view. You can use\n * `flipFallbackPlacements` to further configure how the fallback placement is determined.\n */\n @property({ type: Boolean }) flip = false;\n\n /**\n * If the preferred placement doesn't fit, popup will be tested in these fallback placements until one fits. Must be a\n * string of any number of placements separated by a space, e.g. \"top bottom left\". If no placement fits, the flip\n * fallback strategy will be used instead.\n * */\n @property({\n attribute: 'flip-fallback-placements',\n converter: {\n fromAttribute: (value: string) => {\n return value\n .split(' ')\n .map(p => p.trim())\n .filter(p => p !== '');\n },\n toAttribute: (value: []) => {\n return value.join(' ');\n }\n }\n })\n flipFallbackPlacements = '';\n\n /**\n * When neither the preferred placement nor the fallback placements fit, this value will be used to determine whether\n * the popup should be positioned using the best available fit based on available space or as it was initially\n * preferred.\n */\n @property({ attribute: 'flip-fallback-strategy' }) flipFallbackStrategy: 'best-fit' | 'initial' = 'best-fit';\n\n /**\n * The flip boundary describes clipping element(s) that overflow will be checked relative to when flipping. By\n * default, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\n * change the boundary by passing a reference to one or more elements to this property.\n */\n @property({ type: Object }) flipBoundary: Element | Element[];\n\n /** The amount of padding, in pixels, to exceed before the flip behavior will occur. */\n @property({ attribute: 'flip-padding', type: Number }) flipPadding = 0;\n\n /** Moves the popup along the axis to keep it in view when clipped. */\n @property({ type: Boolean }) shift = false;\n\n /**\n * The shift boundary describes clipping element(s) that overflow will be checked relative to when shifting. By\n * default, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\n * change the boundary by passing a reference to one or more elements to this property.\n */\n @property({ type: Object }) shiftBoundary: Element | Element[];\n\n /** The amount of padding, in pixels, to exceed before the shift behavior will occur. */\n @property({ attribute: 'shift-padding', type: Number }) shiftPadding = 0;\n\n /** When set, this will cause the popup to automatically resize itself to prevent it from overflowing. */\n @property({ attribute: 'auto-size' }) autoSize: 'horizontal' | 'vertical' | 'both';\n\n /** Syncs the popup's width or height to that of the anchor element. */\n @property() sync: 'width' | 'height' | 'both';\n\n /**\n * The auto-size boundary describes clipping element(s) that overflow will be checked relative to when resizing. By\n * default, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\n * change the boundary by passing a reference to one or more elements to this property.\n */\n @property({ type: Object }) autoSizeBoundary: Element | Element[];\n\n /** The amount of padding, in pixels, to exceed before the auto-size behavior will occur. */\n @property({ attribute: 'auto-size-padding', type: Number }) autoSizePadding = 0;\n\n async connectedCallback() {\n super.connectedCallback();\n\n // Start the positioner after the first update\n await this.updateComplete;\n this.start();\n }\n\n disconnectedCallback() {\n this.stop();\n }\n\n async updated(changedProps: Map<string, unknown>) {\n super.updated(changedProps);\n\n // Start or stop the positioner when active changes\n if (changedProps.has('active')) {\n if (this.active) {\n this.start();\n } else {\n this.stop();\n }\n }\n\n // Update the anchor when anchor changes\n if (changedProps.has('anchor')) {\n this.handleAnchorChange();\n }\n\n // All other properties will trigger a reposition when active\n if (this.active) {\n await this.updateComplete;\n this.reposition();\n }\n }\n\n private async handleAnchorChange() {\n await this.stop();\n\n if (this.anchor && typeof this.anchor === 'string') {\n // Locate the anchor by id\n const root = this.getRootNode() as Document | ShadowRoot;\n this.anchorEl = root.getElementById(this.anchor);\n } else if (this.anchor instanceof Element) {\n // Use the anchor's reference\n this.anchorEl = this.anchor;\n } else {\n // Look for a slotted anchor\n this.anchorEl = this.querySelector<HTMLElement>('[slot=\"anchor\"]');\n }\n\n // If the anchor is a <slot>, we'll use the first assigned element as the target since slots use `display: contents`\n // and positioning can't be calculated on them\n if (this.anchorEl instanceof HTMLSlotElement) {\n this.anchorEl = this.anchorEl.assignedElements({ flatten: true })[0] as HTMLElement;\n }\n\n /**\n * NOTE TO DEVELOPERS:\n * The anchor element is essential for nile-popup to function correctly.\n * This error was thrown when an anchor (slot=\"anchor\") or anchor reference was not found.\n *\n * In many places, developers are using *ngIf or similar conditional rendering directly on the anchor slot\n * inside <nile-tooltip>, which removes the anchor from the DOM.\n * As a result, the tooltip remains but cannot be anchored — leading to this error.\n *\n * Suggested Fixes:\n * - Move *ngIf to a wrapper above <nile-tooltip>\n * - OR use the 'disabled' property of nile-tooltip to prevent it from activating without anchor\n *\n * For now, this error is commented out to avoid runtime crashes.\n * Proper usage patterns should be followed instead.\n */\n if (!this.anchorEl) {\n // throw new Error(\n // 'Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.'\n // );\n return;\n }\n\n this.start();\n }\n\n private start() {\n // We can't start the positioner without an anchor\n if (!this.anchorEl) {\n return;\n }\n\n this.cleanup = autoUpdate(this.anchorEl, this.popup, () => {\n this.reposition();\n });\n }\n\n private async stop(): Promise<void> {\n return new Promise(resolve => {\n if (this.cleanup) {\n this.cleanup();\n this.cleanup = undefined;\n this.removeAttribute('data-current-placement');\n this.style.removeProperty('--auto-size-available-width');\n this.style.removeProperty('--auto-size-available-height');\n requestAnimationFrame(() => resolve());\n } else {\n resolve();\n }\n });\n }\n\n /** Forces the popup to recalculate and reposition itself. */\n reposition() {\n // Nothing to do if the popup is inactive or the anchor doesn't exist\n if (!this.active || !this.anchorEl) {\n return;\n }\n\n //\n // NOTE: Floating UI middlewares are order dependent: https://floating-ui.com/docs/middleware\n //\n const middleware = [\n // The offset middleware goes first\n offset({ mainAxis: this.distance, crossAxis: this.skidding })\n ];\n\n // First we sync width/height\n if (this.sync) {\n middleware.push(\n size({\n apply: ({ rects }) => {\n const syncWidth = this.sync === 'width' || this.sync === 'both';\n const syncHeight = this.sync === 'height' || this.sync === 'both';\n this.popup.style.width = syncWidth ? `${rects.reference.width}px` : '';\n this.popup.style.height = syncHeight ? `${rects.reference.height}px` : '';\n }\n })\n );\n } else {\n // Cleanup styles if we're not matching width/height\n this.popup.style.width = '';\n this.popup.style.height = '';\n }\n\n // Then we flip\n if (this.flip) {\n middleware.push(\n flip({\n boundary: this.flipBoundary,\n // @ts-expect-error - We're converting a string attribute to an array here\n fallbackPlacements: this.flipFallbackPlacements,\n fallbackStrategy: this.flipFallbackStrategy === 'best-fit' ? 'bestFit' : 'initialPlacement',\n padding: this.flipPadding\n })\n );\n }\n\n // Then we shift\n if (this.shift) {\n middleware.push(\n shift({\n boundary: this.shiftBoundary,\n padding: this.shiftPadding\n })\n );\n }\n\n // Now we adjust the size as needed\n if (this.autoSize) {\n middleware.push(\n size({\n boundary: this.autoSizeBoundary,\n padding: this.autoSizePadding,\n apply: ({ availableWidth, availableHeight }) => {\n if (this.autoSize === 'vertical' || this.autoSize === 'both') {\n this.style.setProperty('--auto-size-available-height', `${availableHeight}px`);\n } else {\n this.style.removeProperty('--auto-size-available-height');\n }\n\n if (this.autoSize === 'horizontal' || this.autoSize === 'both') {\n this.style.setProperty('--auto-size-available-width', `${availableWidth}px`);\n } else {\n this.style.removeProperty('--auto-size-available-width');\n }\n }\n })\n );\n } else {\n // Cleanup styles if we're no longer using auto-size\n this.style.removeProperty('--auto-size-available-width');\n this.style.removeProperty('--auto-size-available-height');\n }\n\n // Finally, we add an arrow\n if (this.arrow) {\n middleware.push(\n arrow({\n element: this.arrowEl,\n padding: this.arrowPadding\n })\n );\n }\n\n //\n // Use custom positioning logic if the strategy is absolute. Otherwise, fall back to the default logic.\n //\n //\n const getOffsetParent =\n this.strategy === 'absolute'\n ? (element: Element) => platform.getOffsetParent(element, offsetParent)\n : platform.getOffsetParent;\n\n computePosition(this.anchorEl, this.popup, {\n placement: this.placement,\n middleware,\n strategy: this.strategy,\n platform: {\n ...platform,\n getOffsetParent\n }\n }).then(({ x, y, middlewareData, placement }) => {\n //\n // Even though we have our own localization utility, it uses different heuristics to determine RTL. Because of\n // that, we'll use the same approach that Floating UI uses.\n //\n // Source: https://github.com/floating-ui/floating-ui/blob/cb3b6ab07f95275730d3e6e46c702f8d4908b55c/packages/dom/src/utils/getDocumentRect.ts#L31\n //\n const isRtl = getComputedStyle(this).direction === 'rtl';\n const staticSide = { top: 'bottom', right: 'left', bottom: 'top', left: 'right' }[placement.split('-')[0]]!;\n\n this.setAttribute('data-current-placement', placement);\n\n Object.assign(this.popup.style, {\n left: `${x}px`,\n top: `${y}px`\n });\n\n if (this.arrow) {\n const arrowX = middlewareData.arrow!.x;\n const arrowY = middlewareData.arrow!.y;\n let top = '';\n let right = '';\n let bottom = '';\n let left = '';\n\n if (this.arrowPlacement === 'start') {\n // Start\n const value = typeof arrowX === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n top = typeof arrowY === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n right = isRtl ? value : '';\n left = isRtl ? '' : value;\n } else if (this.arrowPlacement === 'end') {\n // End\n const value = typeof arrowX === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n right = isRtl ? '' : value;\n left = isRtl ? value : '';\n bottom = typeof arrowY === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n } else if (this.arrowPlacement === 'center') {\n // Center\n left = typeof arrowX === 'number' ? `calc(50% - var(--arrow-size-diagonal))` : '';\n top = typeof arrowY === 'number' ? `calc(50% - var(--arrow-size-diagonal))` : '';\n } else {\n // Anchor (default)\n left = typeof arrowX === 'number' ? `${arrowX}px` : '';\n top = typeof arrowY === 'number' ? `${arrowY}px` : '';\n }\n\n Object.assign(this.arrowEl.style, {\n top,\n right,\n bottom,\n left,\n [staticSide]: 'calc(var(--arrow-size-diagonal) * -1)'\n });\n }\n });\n\n this.emit('reposition');\n }\n\n render() {\n return html`\n <slot name=\"anchor\" @slotchange=${this.handleAnchorChange}></slot>\n\n <div\n part=\"popup\"\n class=${classMap({\n popup: true,\n 'popup--active': this.active,\n 'popup--fixed': this.strategy === 'fixed',\n 'popup--has-arrow': this.arrow\n })}\n >\n <slot></slot>\n ${this.arrow ? html`<div part=\"arrow\" class=\"popup__arrow\" role=\"presentation\"></div>` : ''}\n </div>\n `;\n }\n}\n\nexport default NilePopup;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-popup': NilePopup;\n }\n}\n"]}