@aquera/nile-elements 0.1.35-beta-2.0 → 0.1.36-beta-1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (332) hide show
  1. package/README.md +15 -65
  2. package/demo/index.css +4 -7
  3. package/demo/index.html +36 -20
  4. package/demo/variables.css +0 -13
  5. package/demo/variables_v2.css +0 -13
  6. package/dist/fixture-2b5b3aba.esm.js +569 -0
  7. package/dist/{fixture-df8b52d7.esm.js → fixture-76051ef1.esm.js} +1 -1
  8. package/dist/fixture-7bfb866e.cjs.js +395 -0
  9. package/dist/fixture-7bfb866e.cjs.js.map +1 -0
  10. package/dist/{fixture-d5b55278.cjs.js → fixture-948ae33c.cjs.js} +2 -2
  11. package/dist/{fixture-d5b55278.cjs.js.map → fixture-948ae33c.cjs.js.map} +1 -1
  12. package/dist/index.cjs.js +1 -1
  13. package/dist/index.esm.js +1 -1
  14. package/dist/internal/animate.cjs.js +1 -1
  15. package/dist/internal/animate.cjs.js.map +1 -1
  16. package/dist/internal/animate.esm.js +1 -1
  17. package/dist/lit-html-39a6718c.esm.js +6 -0
  18. package/dist/lit-html-9b3af046.cjs.js +6 -0
  19. package/dist/lit-html-9b3af046.cjs.js.map +1 -0
  20. package/dist/nile-accordion/nile-accordian.test.cjs.js +1 -1
  21. package/dist/nile-accordion/nile-accordian.test.esm.js +1 -1
  22. package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js +1 -1
  23. package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js.map +1 -1
  24. package/dist/nile-auto-complete/nile-auto-complete.test.esm.js +1 -1
  25. package/dist/nile-avatar/nile-avatar.test.cjs.js +1 -1
  26. package/dist/nile-avatar/nile-avatar.test.esm.js +1 -1
  27. package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
  28. package/dist/nile-badge/nile-badge.test.esm.js +1 -1
  29. package/dist/nile-button/nile-button.test.cjs.js +1 -1
  30. package/dist/nile-button/nile-button.test.esm.js +1 -1
  31. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js +1 -1
  32. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.esm.js +1 -1
  33. package/dist/nile-calendar/nile-calendar.test.cjs.js +1 -1
  34. package/dist/nile-calendar/nile-calendar.test.esm.js +1 -1
  35. package/dist/nile-card/nile-card.test.cjs.js +1 -1
  36. package/dist/nile-card/nile-card.test.esm.js +1 -1
  37. package/dist/nile-checkbox/nile-checkbox.test.cjs.js +1 -1
  38. package/dist/nile-checkbox/nile-checkbox.test.esm.js +1 -1
  39. package/dist/nile-chip/nile-chip.test.cjs.js +1 -1
  40. package/dist/nile-chip/nile-chip.test.esm.js +1 -1
  41. package/dist/nile-dialog/nile-dialog.test.cjs.js +1 -1
  42. package/dist/nile-dialog/nile-dialog.test.esm.js +1 -1
  43. package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
  44. package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
  45. package/dist/nile-dropdown/nile-dropdown.test.cjs.js +1 -1
  46. package/dist/nile-dropdown/nile-dropdown.test.esm.js +1 -1
  47. package/dist/nile-empty-state/nile-empty-state.test.cjs.js +1 -1
  48. package/dist/nile-empty-state/nile-empty-state.test.esm.js +1 -1
  49. package/dist/nile-error-message/nile-error-message.cjs.js +1 -1
  50. package/dist/nile-error-message/nile-error-message.cjs.js.map +1 -1
  51. package/dist/nile-error-message/nile-error-message.css.cjs.js +1 -1
  52. package/dist/nile-error-message/nile-error-message.css.cjs.js.map +1 -1
  53. package/dist/nile-error-message/nile-error-message.css.esm.js +4 -6
  54. package/dist/nile-error-message/nile-error-message.esm.js +4 -4
  55. package/dist/nile-error-message/nile-error-message.test.cjs.js +1 -1
  56. package/dist/nile-error-message/nile-error-message.test.esm.js +1 -1
  57. package/dist/nile-error-notification/nile-error-notification.css.cjs.js +1 -1
  58. package/dist/nile-error-notification/nile-error-notification.css.cjs.js.map +1 -1
  59. package/dist/nile-error-notification/nile-error-notification.css.esm.js +1 -1
  60. package/dist/nile-file-preview/index.cjs.js +2 -0
  61. package/dist/nile-file-preview/index.esm.js +1 -0
  62. package/dist/nile-file-preview/nile-file-preview.cjs.js +2 -0
  63. package/dist/nile-file-preview/nile-file-preview.cjs.js.map +1 -0
  64. package/dist/nile-file-preview/nile-file-preview.css.cjs.js +2 -0
  65. package/dist/nile-file-preview/nile-file-preview.css.cjs.js.map +1 -0
  66. package/dist/nile-file-preview/nile-file-preview.css.esm.js +521 -0
  67. package/dist/nile-file-preview/nile-file-preview.esm.js +3 -0
  68. package/dist/nile-file-preview/nile-file-preview.template.cjs.js +2 -0
  69. package/dist/nile-file-preview/nile-file-preview.template.cjs.js.map +1 -0
  70. package/dist/nile-file-preview/nile-file-preview.template.esm.js +117 -0
  71. package/dist/nile-file-preview/nile-file-preview.test.cjs.js +2 -0
  72. package/dist/nile-file-preview/nile-file-preview.test.cjs.js.map +1 -0
  73. package/dist/nile-file-preview/nile-file-preview.test.esm.js +1 -0
  74. package/dist/nile-file-preview/types/file-preview.enums.cjs.js +2 -0
  75. package/dist/nile-file-preview/types/file-preview.enums.cjs.js.map +1 -0
  76. package/dist/nile-file-preview/types/file-preview.enums.esm.js +1 -0
  77. package/dist/nile-file-preview/types/file-preview.interface.cjs.js +2 -0
  78. package/dist/nile-file-preview/types/file-preview.interface.cjs.js.map +1 -0
  79. package/dist/nile-file-preview/types/file-preview.interface.esm.js +1 -0
  80. package/dist/nile-file-preview/types/index.cjs.js +2 -0
  81. package/dist/nile-file-preview/types/index.cjs.js.map +1 -0
  82. package/dist/nile-file-preview/types/index.esm.js +1 -0
  83. package/dist/nile-file-preview/utils/file-preview.util.cjs.js +2 -0
  84. package/dist/nile-file-preview/utils/file-preview.util.cjs.js.map +1 -0
  85. package/dist/nile-file-preview/utils/file-preview.util.esm.js +1 -0
  86. package/dist/nile-file-preview/utils/index.cjs.js +2 -0
  87. package/dist/nile-file-preview/utils/index.cjs.js.map +1 -0
  88. package/dist/nile-file-preview/utils/index.esm.js +1 -0
  89. package/dist/nile-file-upload/index.cjs.js +2 -0
  90. package/dist/nile-file-upload/index.cjs.js.map +1 -0
  91. package/dist/nile-file-upload/index.esm.js +1 -0
  92. package/dist/nile-file-upload/nile-file-upload.cjs.js +2 -0
  93. package/dist/nile-file-upload/nile-file-upload.cjs.js.map +1 -0
  94. package/dist/nile-file-upload/nile-file-upload.css.cjs.js +2 -0
  95. package/dist/nile-file-upload/nile-file-upload.css.cjs.js.map +1 -0
  96. package/dist/nile-file-upload/nile-file-upload.css.esm.js +535 -0
  97. package/dist/nile-file-upload/nile-file-upload.esm.js +3 -0
  98. package/dist/nile-file-upload/nile-file-upload.template.cjs.js +10 -0
  99. package/dist/nile-file-upload/nile-file-upload.template.cjs.js.map +1 -0
  100. package/dist/nile-file-upload/nile-file-upload.template.esm.js +155 -0
  101. package/dist/nile-file-upload/nile-file-upload.test.cjs.js +2 -0
  102. package/dist/nile-file-upload/nile-file-upload.test.cjs.js.map +1 -0
  103. package/dist/nile-file-upload/nile-file-upload.test.esm.js +1 -0
  104. package/dist/nile-file-upload/types/file-upload.enums.cjs.js +2 -0
  105. package/dist/nile-file-upload/types/file-upload.enums.cjs.js.map +1 -0
  106. package/dist/nile-file-upload/types/file-upload.enums.esm.js +1 -0
  107. package/dist/nile-file-upload/types/file-upload.type.cjs.js +2 -0
  108. package/dist/nile-file-upload/types/file-upload.type.cjs.js.map +1 -0
  109. package/dist/nile-file-upload/types/file-upload.type.esm.js +1 -0
  110. package/dist/nile-file-upload/types/index.cjs.js +2 -0
  111. package/dist/nile-file-upload/types/index.cjs.js.map +1 -0
  112. package/dist/nile-file-upload/types/index.esm.js +1 -0
  113. package/dist/nile-file-upload/utils/drag-drop.util.cjs.js +2 -0
  114. package/dist/nile-file-upload/utils/drag-drop.util.cjs.js.map +1 -0
  115. package/dist/nile-file-upload/utils/drag-drop.util.esm.js +1 -0
  116. package/dist/nile-file-upload/utils/file-validation.util.cjs.js +2 -0
  117. package/dist/nile-file-upload/utils/file-validation.util.cjs.js.map +1 -0
  118. package/dist/nile-file-upload/utils/file-validation.util.esm.js +1 -0
  119. package/dist/nile-form-group/nile-form-group.test.cjs.js +1 -1
  120. package/dist/nile-form-group/nile-form-group.test.esm.js +1 -1
  121. package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js +1 -1
  122. package/dist/nile-form-help-text/nile-form-help-text.test.esm.js +1 -1
  123. package/dist/nile-hero/nile-hero.test.cjs.js +1 -1
  124. package/dist/nile-hero/nile-hero.test.esm.js +1 -1
  125. package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
  126. package/dist/nile-icon/nile-icon.test.esm.js +1 -1
  127. package/dist/nile-input/nile-input.test.cjs.js +1 -1
  128. package/dist/nile-input/nile-input.test.esm.js +1 -1
  129. package/dist/nile-link/nile-link.test.cjs.js +1 -1
  130. package/dist/nile-link/nile-link.test.esm.js +1 -1
  131. package/dist/nile-loader/nile-loader.test.cjs.js +1 -1
  132. package/dist/nile-loader/nile-loader.test.esm.js +1 -1
  133. package/dist/nile-popover/index.cjs.js +1 -1
  134. package/dist/nile-popover/index.esm.js +1 -1
  135. package/dist/nile-popover/nile-popover.cjs.js +3 -11
  136. package/dist/nile-popover/nile-popover.cjs.js.map +1 -1
  137. package/dist/nile-popover/nile-popover.esm.js +7 -13
  138. package/dist/nile-popover/nile-popover.test.cjs.js +1 -1
  139. package/dist/nile-popover/nile-popover.test.cjs.js.map +1 -1
  140. package/dist/nile-popover/nile-popover.test.esm.js +3 -3
  141. package/dist/nile-popup/nile-popup.test.cjs.js +1 -1
  142. package/dist/nile-popup/nile-popup.test.esm.js +1 -1
  143. package/dist/nile-progress-bar/nile-progress-bar.css.cjs.js +1 -1
  144. package/dist/nile-progress-bar/nile-progress-bar.css.cjs.js.map +1 -1
  145. package/dist/nile-progress-bar/nile-progress-bar.css.esm.js +0 -1
  146. package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js +1 -1
  147. package/dist/nile-progress-bar/nile-progress-bar.test.esm.js +1 -1
  148. package/dist/nile-radio/nile-radio.test.cjs.js +1 -1
  149. package/dist/nile-radio/nile-radio.test.esm.js +1 -1
  150. package/dist/nile-radio-group/nile-radio-group.test.cjs.js +1 -1
  151. package/dist/nile-radio-group/nile-radio-group.test.esm.js +1 -1
  152. package/dist/nile-select/nile-select.cjs.js +1 -1
  153. package/dist/nile-select/nile-select.cjs.js.map +1 -1
  154. package/dist/nile-select/nile-select.esm.js +1 -1
  155. package/dist/nile-select/nile-select.test.cjs.js +1 -1
  156. package/dist/nile-select/nile-select.test.esm.js +1 -1
  157. package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +1 -1
  158. package/dist/nile-slide-toggle/nile-slide-toggle.test.esm.js +1 -1
  159. package/dist/nile-tab-group/nile-tab-group.test.cjs.js +1 -1
  160. package/dist/nile-tab-group/nile-tab-group.test.esm.js +1 -1
  161. package/dist/nile-table/nile-table.cjs.js.map +1 -1
  162. package/dist/nile-textarea/nile-textarea.test.cjs.js +1 -1
  163. package/dist/nile-textarea/nile-textarea.test.esm.js +1 -1
  164. package/dist/nile-tooltip/index.cjs.js +1 -1
  165. package/dist/nile-tooltip/index.esm.js +1 -1
  166. package/dist/nile-tooltip/nile-tooltip.cjs.js +1 -1
  167. package/dist/nile-tooltip/nile-tooltip.cjs.js.map +1 -1
  168. package/dist/nile-tooltip/nile-tooltip.css.cjs.js +1 -1
  169. package/dist/nile-tooltip/nile-tooltip.css.cjs.js.map +1 -1
  170. package/dist/nile-tooltip/nile-tooltip.css.esm.js +45 -78
  171. package/dist/nile-tooltip/nile-tooltip.esm.js +28 -23
  172. package/dist/src/index.d.ts +2 -1
  173. package/dist/src/index.js +2 -1
  174. package/dist/src/index.js.map +1 -1
  175. package/dist/src/nile-error-message/nile-error-message.css.js +4 -6
  176. package/dist/src/nile-error-message/nile-error-message.css.js.map +1 -1
  177. package/dist/src/nile-error-message/nile-error-message.d.ts +0 -4
  178. package/dist/src/nile-error-message/nile-error-message.js +0 -20
  179. package/dist/src/nile-error-message/nile-error-message.js.map +1 -1
  180. package/dist/src/nile-error-notification/nile-error-notification.css.js +1 -1
  181. package/dist/src/nile-error-notification/nile-error-notification.css.js.map +1 -1
  182. package/dist/src/nile-file-preview/index.d.ts +1 -0
  183. package/dist/src/nile-file-preview/index.js +2 -0
  184. package/dist/src/nile-file-preview/index.js.map +1 -0
  185. package/dist/src/{nile-filter-chip/nile-filter-chip.css.d.ts → nile-file-preview/nile-file-preview.css.d.ts} +1 -1
  186. package/dist/src/nile-file-preview/nile-file-preview.css.js +533 -0
  187. package/dist/src/nile-file-preview/nile-file-preview.css.js.map +1 -0
  188. package/dist/src/nile-file-preview/nile-file-preview.d.ts +48 -0
  189. package/dist/src/nile-file-preview/nile-file-preview.js +149 -0
  190. package/dist/src/nile-file-preview/nile-file-preview.js.map +1 -0
  191. package/dist/src/nile-file-preview/nile-file-preview.template.d.ts +11 -0
  192. package/dist/src/nile-file-preview/nile-file-preview.template.js +144 -0
  193. package/dist/src/nile-file-preview/nile-file-preview.template.js.map +1 -0
  194. package/dist/src/nile-file-preview/nile-file-preview.test.d.ts +7 -0
  195. package/dist/src/nile-file-preview/nile-file-preview.test.js +30 -0
  196. package/dist/src/nile-file-preview/nile-file-preview.test.js.map +1 -0
  197. package/dist/src/nile-file-preview/types/file-preview.enums.d.ts +23 -0
  198. package/dist/src/nile-file-preview/types/file-preview.enums.js +28 -0
  199. package/dist/src/nile-file-preview/types/file-preview.enums.js.map +1 -0
  200. package/dist/src/nile-file-preview/types/file-preview.interface.d.ts +4 -0
  201. package/dist/src/nile-file-preview/types/file-preview.interface.js +2 -0
  202. package/dist/src/nile-file-preview/types/file-preview.interface.js.map +1 -0
  203. package/dist/src/nile-file-preview/types/index.d.ts +2 -0
  204. package/dist/src/nile-file-preview/types/index.js +3 -0
  205. package/dist/src/nile-file-preview/types/index.js.map +1 -0
  206. package/dist/src/nile-file-preview/utils/file-preview.util.d.ts +3 -0
  207. package/dist/src/nile-file-preview/utils/file-preview.util.js +29 -0
  208. package/dist/src/nile-file-preview/utils/file-preview.util.js.map +1 -0
  209. package/dist/src/nile-file-preview/utils/index.d.ts +1 -0
  210. package/dist/src/nile-file-preview/utils/index.js +2 -0
  211. package/dist/src/nile-file-preview/utils/index.js.map +1 -0
  212. package/dist/src/nile-file-upload/index.d.ts +1 -0
  213. package/dist/src/nile-file-upload/index.js +2 -0
  214. package/dist/src/{nile-filter-chip → nile-file-upload}/index.js.map +1 -1
  215. package/dist/src/nile-file-upload/nile-file-upload.css.d.ts +12 -0
  216. package/dist/src/nile-file-upload/nile-file-upload.css.js +547 -0
  217. package/dist/src/nile-file-upload/nile-file-upload.css.js.map +1 -0
  218. package/dist/src/nile-file-upload/nile-file-upload.d.ts +45 -0
  219. package/dist/src/nile-file-upload/nile-file-upload.js +148 -0
  220. package/dist/src/nile-file-upload/nile-file-upload.js.map +1 -0
  221. package/dist/src/nile-file-upload/nile-file-upload.template.d.ts +11 -0
  222. package/dist/src/nile-file-upload/nile-file-upload.template.js +163 -0
  223. package/dist/src/nile-file-upload/nile-file-upload.template.js.map +1 -0
  224. package/dist/src/nile-file-upload/nile-file-upload.test.d.ts +7 -0
  225. package/dist/src/nile-file-upload/nile-file-upload.test.js +30 -0
  226. package/dist/src/nile-file-upload/nile-file-upload.test.js.map +1 -0
  227. package/dist/src/nile-file-upload/types/file-upload.enums.d.ts +28 -0
  228. package/dist/src/nile-file-upload/types/file-upload.enums.js +35 -0
  229. package/dist/src/nile-file-upload/types/file-upload.enums.js.map +1 -0
  230. package/dist/src/nile-file-upload/types/file-upload.type.d.ts +4 -0
  231. package/dist/src/nile-file-upload/types/file-upload.type.js +2 -0
  232. package/dist/src/nile-file-upload/types/file-upload.type.js.map +1 -0
  233. package/dist/src/nile-file-upload/types/index.d.ts +2 -0
  234. package/dist/src/nile-file-upload/types/index.js +3 -0
  235. package/dist/src/nile-file-upload/types/index.js.map +1 -0
  236. package/dist/src/nile-file-upload/utils/drag-drop.util.d.ts +19 -0
  237. package/dist/src/nile-file-upload/utils/drag-drop.util.js +77 -0
  238. package/dist/src/nile-file-upload/utils/drag-drop.util.js.map +1 -0
  239. package/dist/src/nile-file-upload/utils/file-validation.util.d.ts +9 -0
  240. package/dist/src/nile-file-upload/utils/file-validation.util.js +58 -0
  241. package/dist/src/nile-file-upload/utils/file-validation.util.js.map +1 -0
  242. package/dist/src/nile-progress-bar/nile-progress-bar.css.js +0 -1
  243. package/dist/src/nile-progress-bar/nile-progress-bar.css.js.map +1 -1
  244. package/dist/src/nile-select/nile-select.js +1 -1
  245. package/dist/src/nile-select/nile-select.js.map +1 -1
  246. package/dist/src/nile-table/nile-table.js.map +1 -1
  247. package/dist/src/nile-tooltip/nile-tooltip.css.js +43 -76
  248. package/dist/src/nile-tooltip/nile-tooltip.css.js.map +1 -1
  249. package/dist/src/nile-tooltip/nile-tooltip.d.ts +46 -24
  250. package/dist/src/nile-tooltip/nile-tooltip.js +232 -235
  251. package/dist/src/nile-tooltip/nile-tooltip.js.map +1 -1
  252. package/dist/tsconfig.tsbuildinfo +1 -1
  253. package/package.json +2 -2
  254. package/plop-templates/lit/index.ts.hbs +1 -1
  255. package/plop-templates/lit/lit.css.ts.hbs +1 -1
  256. package/plop-templates/lit/lit.ts.hbs +3 -7
  257. package/plopfile.js +1 -32
  258. package/src/index.ts +2 -1
  259. package/src/nile-error-message/nile-error-message.css.ts +4 -6
  260. package/src/nile-error-message/nile-error-message.ts +0 -18
  261. package/src/nile-error-notification/nile-error-notification.css.ts +1 -1
  262. package/src/nile-file-preview/index.ts +1 -0
  263. package/src/nile-file-preview/nile-file-preview.css.ts +535 -0
  264. package/src/nile-file-preview/nile-file-preview.template.ts +174 -0
  265. package/{plop-templates/lit/lit.test.ts.hbs → src/nile-file-preview/nile-file-preview.test.ts} +5 -5
  266. package/src/nile-file-preview/nile-file-preview.ts +146 -0
  267. package/src/nile-file-preview/types/file-preview.enums.ts +26 -0
  268. package/src/nile-file-preview/types/file-preview.interface.ts +4 -0
  269. package/src/nile-file-preview/types/index.ts +2 -0
  270. package/src/nile-file-preview/utils/file-preview.util.ts +34 -0
  271. package/src/nile-file-preview/utils/index.ts +1 -0
  272. package/src/nile-file-upload/index.ts +1 -0
  273. package/src/nile-file-upload/nile-file-upload.css.ts +549 -0
  274. package/src/nile-file-upload/nile-file-upload.template.ts +194 -0
  275. package/src/nile-file-upload/nile-file-upload.test.ts +38 -0
  276. package/src/nile-file-upload/nile-file-upload.ts +138 -0
  277. package/src/nile-file-upload/types/file-upload.enums.ts +32 -0
  278. package/src/nile-file-upload/types/file-upload.type.ts +5 -0
  279. package/src/nile-file-upload/types/index.ts +2 -0
  280. package/src/nile-file-upload/utils/drag-drop.util.ts +95 -0
  281. package/src/nile-file-upload/utils/file-validation.util.ts +80 -0
  282. package/src/nile-progress-bar/nile-progress-bar.css.ts +0 -1
  283. package/src/nile-select/nile-select.ts +1 -1
  284. package/src/nile-table/nile-table.ts +2 -2
  285. package/src/nile-tooltip/nile-tooltip.css.ts +44 -77
  286. package/src/nile-tooltip/nile-tooltip.ts +230 -268
  287. package/vscode-html-custom-data.json +203 -118
  288. package/dist/nile-filter-chip/index.cjs.js +0 -2
  289. package/dist/nile-filter-chip/index.esm.js +0 -1
  290. package/dist/nile-filter-chip/nile-filter-chip.cjs.js +0 -2
  291. package/dist/nile-filter-chip/nile-filter-chip.cjs.js.map +0 -1
  292. package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js +0 -2
  293. package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js.map +0 -1
  294. package/dist/nile-filter-chip/nile-filter-chip.css.esm.js +0 -121
  295. package/dist/nile-filter-chip/nile-filter-chip.esm.js +0 -43
  296. package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js +0 -2
  297. package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js.map +0 -1
  298. package/dist/nile-filter-chip/nile-filter-chip.test.esm.js +0 -20
  299. package/dist/nile-tooltip/nile-tooltip-utils.cjs.js +0 -2
  300. package/dist/nile-tooltip/nile-tooltip-utils.cjs.js.map +0 -1
  301. package/dist/nile-tooltip/nile-tooltip-utils.esm.js +0 -1
  302. package/dist/nile-tooltip/nile-tooltip.test.cjs.js +0 -2
  303. package/dist/nile-tooltip/nile-tooltip.test.cjs.js.map +0 -1
  304. package/dist/nile-tooltip/nile-tooltip.test.esm.js +0 -47
  305. package/dist/src/nile-filter-chip/index.d.ts +0 -1
  306. package/dist/src/nile-filter-chip/index.js +0 -2
  307. package/dist/src/nile-filter-chip/nile-filter-chip.css.js +0 -133
  308. package/dist/src/nile-filter-chip/nile-filter-chip.css.js.map +0 -1
  309. package/dist/src/nile-filter-chip/nile-filter-chip.d.ts +0 -36
  310. package/dist/src/nile-filter-chip/nile-filter-chip.js +0 -141
  311. package/dist/src/nile-filter-chip/nile-filter-chip.js.map +0 -1
  312. package/dist/src/nile-filter-chip/nile-filter-chip.test.d.ts +0 -1
  313. package/dist/src/nile-filter-chip/nile-filter-chip.test.js +0 -80
  314. package/dist/src/nile-filter-chip/nile-filter-chip.test.js.map +0 -1
  315. package/dist/src/nile-tooltip/nile-tooltip-utils.d.ts +0 -18
  316. package/dist/src/nile-tooltip/nile-tooltip-utils.js +0 -216
  317. package/dist/src/nile-tooltip/nile-tooltip-utils.js.map +0 -1
  318. package/dist/src/nile-tooltip/nile-tooltip.test.d.ts +0 -1
  319. package/dist/src/nile-tooltip/nile-tooltip.test.js +0 -148
  320. package/dist/src/nile-tooltip/nile-tooltip.test.js.map +0 -1
  321. package/plop-templates/lit/lit.template.ts.hbs +0 -3
  322. package/plop-templates/lit/sub-components/index.ts.hbs +0 -4
  323. package/plop-templates/lit/types/index.ts.hbs +0 -0
  324. package/plop-templates/lit/types/type.ts.hbs +0 -3
  325. package/plop-templates/lit/utils/lit.utils.ts.hbs +0 -4
  326. package/src/nile-filter-chip/index.ts +0 -1
  327. package/src/nile-filter-chip/nile-filter-chip.css.ts +0 -138
  328. package/src/nile-filter-chip/nile-filter-chip.test.ts +0 -92
  329. package/src/nile-filter-chip/nile-filter-chip.ts +0 -136
  330. package/src/nile-tooltip/nile-tooltip-utils.ts +0 -271
  331. package/src/nile-tooltip/nile-tooltip.test.ts +0 -168
  332. /package/dist/{nile-filter-chip → nile-file-preview}/index.cjs.js.map +0 -0
@@ -1,2 +0,0 @@
1
- System.register(["./nile-filter-chip.cjs.js","tslib","lit","lit/decorators.js","../internal/nile-element.cjs.js","./nile-filter-chip.css.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileFilterChipCjsJs){_export("NileFilterChip",_nileFilterChipCjsJs.N);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_internalNileElementCjsJs){},function(_nileFilterChipCssCjsJs){}],execute:function execute(){}};});
2
- //# sourceMappingURL=index.cjs.js.map
@@ -1 +0,0 @@
1
- export{N as NileFilterChip}from"./nile-filter-chip.esm.js";import"tslib";import"lit";import"lit/decorators.js";import"../internal/nile-element.esm.js";import"./nile-filter-chip.css.esm.js";
@@ -1,2 +0,0 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","../internal/nile-element.cjs.js","./nile-filter-chip.css.cjs.js"],function(_export,_context){"use strict";var t,e,s,i,l,n,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_o,a;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){e=_lit.html;},function(_litDecoratorsJs){s=_litDecoratorsJs.property;i=_litDecoratorsJs.customElement;},function(_internalNileElementCjsJs){l=_internalNileElementCjsJs.N;},function(_nileFilterChipCssCjsJs){n=_nileFilterChipCssCjsJs.s;}],execute:function execute(){_export("N",a=_o=/*#__PURE__*/function(_l){function o(){var _this;_classCallCheck(this,o);_this=_callSuper(this,o,arguments),_this.label="",_this.text="",_this.viewMoreCount=0,_this.editable=!1,_this.closable=!1,_this.icon="",_this.removeIcon="",_this.active=!1;return _this;}_inherits(o,_l);return _createClass(o,[{key:"connectedCallback",value:function connectedCallback(){_superPropGet(o,"connectedCallback",this,3)([]),this.registerChip();}},{key:"disconnectedCallback",value:function disconnectedCallback(){_superPropGet(o,"disconnectedCallback",this,3)([]),this.unregisterChip();}},{key:"registerChip",value:function registerChip(){_o.activeChips.push(this);}},{key:"unregisterChip",value:function unregisterChip(){var _this2=this;_o.activeChips=_o.activeChips.filter(function(t){return t!==_this2;});}},{key:"handleClose",value:function handleClose(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("nile-close",{detail:{text:this.text,viewMoreCount:this.viewMoreCount}})),this.remove();}},{key:"handleClick",value:function handleClick(){this.dispatchEvent(new CustomEvent("nile-click",{detail:{text:this.text,viewMoreCount:this.viewMoreCount}}));}},{key:"getLabelSlot",value:function getLabelSlot(){return e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <span class=\"label-wrapper\">\n <slot name=\"label\">\n <span class=\"label\">",":</span>\n </slot>\n </span>\n\n "])),this.label);}},{key:"getValueSlot",value:function getValueSlot(){return e(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <span class=\"value-wrapper\">\n <slot name=\"value\">\n <span class=\"value\">","</span>\n </slot>\n </span>\n\n "])),this.text);}},{key:"getviewMoreCountSlot",value:function getviewMoreCountSlot(){return e(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <slot name=\"suffix\">\n ","\n </slot>\n "])),this.viewMoreCount?e(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <span class=\"badge-wrapper\">\n <nile-badge variant=\"primary\" pilltype=\"pill-color\">\n +","\n </nile-badge>\n </span>\n\n "])),this.viewMoreCount):e(_templateObject5||(_templateObject5=_taggedTemplateLiteral([""]))));}},{key:"getCloseIconSlot",value:function getCloseIconSlot(){return e(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n ","\n "])),this.closable?e(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <span class=\"close-icon\" @click=\"","\">\n <nile-icon name=\"","\" size=\"12\"></nile-icon>\n </span>\n "])),this.handleClose,this.removeIcon||"close"):e(_templateObject8||(_templateObject8=_taggedTemplateLiteral([""]))));}},{key:"render",value:function render(){return e(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["\n <div class=\"chip\" @click=\"","\">\n <slot name=\"icon\">\n ","\n </slot>\n ","\n <slot name=\"content\"></slot>\n ","\n ","\n ","\n </div>\n "])),this.handleClick,this.icon?e(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["<span class=\"icon\">","</span>"])),this.icon):e(_templateObject11||(_templateObject11=_taggedTemplateLiteral([""]))),this.getLabelSlot(),this.getValueSlot(),this.getviewMoreCountSlot(),this.getCloseIconSlot());}}],[{key:"styles",get:function get(){return[n];}}]);}(l));a.activeChips=[],t([s({type:String})],a.prototype,"label",void 0),t([s({type:String})],a.prototype,"text",void 0),t([s({type:Number})],a.prototype,"viewMoreCount",void 0),t([s({type:Boolean})],a.prototype,"editable",void 0),t([s({type:Boolean})],a.prototype,"closable",void 0),t([s({type:String})],a.prototype,"icon",void 0),t([s({type:String})],a.prototype,"removeIcon",void 0),t([s({type:Boolean,reflect:!0})],a.prototype,"active",void 0),_export("N",a=_o=t([i("nile-filter-chip")],a));}};});
2
- //# sourceMappingURL=nile-filter-chip.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"nile-filter-chip.cjs.js","sources":["../../../src/nile-filter-chip/nile-filter-chip.ts"],"sourcesContent":["import { LitElement, html, css, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport NileElement from '../internal/nile-element';\nimport { styles } from './nile-filter-chip.css';\n\n/**\n * Nile filter-chip component.\n *\n * @tag nile-filter-chip\n */\n@customElement('nile-filter-chip')\nexport class NileFilterChip extends NileElement {\n @property({ type: String }) label = '';\n @property({ type: String }) text = '';\n @property({ type: Number }) viewMoreCount: number = 0;\n @property({ type: Boolean }) editable = false;\n @property({ type: Boolean }) closable = false;\n @property({ type: String }) icon = '';\n @property({ type: String }) removeIcon = '';\n @property({ type: Boolean, reflect: true }) active = false;\n\n\n private static activeChips: NileFilterChip[] = [];\n\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.registerChip();\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.unregisterChip();\n }\n\n private registerChip() {\n NileFilterChip.activeChips.push(this);\n }\n\n private unregisterChip() {\n NileFilterChip.activeChips = NileFilterChip.activeChips.filter(\n (chip) => chip !== this\n );\n }\n\n private handleClose(event: Event) {\n event.stopPropagation();\n this.dispatchEvent(\n new CustomEvent('nile-close', { detail: { text: this.text, viewMoreCount: this.viewMoreCount } })\n );\n this.remove();\n }\n\n private handleClick() {\n this.dispatchEvent(\n new CustomEvent('nile-click', { detail: { text: this.text, viewMoreCount: this.viewMoreCount } })\n );\n }\n\n private getLabelSlot(): TemplateResult {\n return html`\n <span class=\"label-wrapper\">\n <slot name=\"label\">\n <span class=\"label\">${this.label}:</span>\n </slot>\n </span>\n\n `;\n }\n\n private getValueSlot(): TemplateResult {\n return html`\n <span class=\"value-wrapper\">\n <slot name=\"value\">\n <span class=\"value\">${this.text}</span>\n </slot>\n </span>\n\n `;\n }\n\n private getviewMoreCountSlot(): TemplateResult {\n return html`\n <slot name=\"suffix\">\n ${this.viewMoreCount\n ? html`\n <span class=\"badge-wrapper\">\n <nile-badge variant=\"primary\" pilltype=\"pill-color\">\n +${this.viewMoreCount}\n </nile-badge>\n </span>\n\n `\n : html``}\n </slot>\n `;\n }\n\n private getCloseIconSlot(): TemplateResult {\n return html`\n ${this.closable\n ? html`\n <span class=\"close-icon\" @click=\"${this.handleClose}\">\n <nile-icon name=\"${this.removeIcon || 'close'}\" size=\"12\"></nile-icon>\n </span>\n `\n : html``}\n `;\n }\n\n public render(): TemplateResult {\n return html`\n <div class=\"chip\" @click=\"${this.handleClick}\">\n <slot name=\"icon\">\n ${this.icon ? html`<span class=\"icon\">${this.icon}</span>` : html``}\n </slot>\n ${this.getLabelSlot()}\n <slot name=\"content\"></slot>\n ${this.getValueSlot()}\n ${this.getviewMoreCountSlot()}\n ${this.getCloseIconSlot()}\n </div>\n `;\n }\n}\n\nexport default NileFilterChip;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-filter-chip': NileFilterChip;\n }\n}\n"],"names":["NileFilterChip","NileFilterChip_1","_l","o","this","label","text","viewMoreCount","editable","closable","icon","removeIcon","active","_this","_inherits","_createClass","key","value","connectedCallback","super","registerChip","disconnectedCallback","unregisterChip","activeChips","push","filter","chip","handleClose","event","stopPropagation","dispatchEvent","CustomEvent","detail","remove","handleClick","getLabelSlot","html","_templateObject","_taggedTemplateLiteral","getValueSlot","_templateObject2","getviewMoreCountSlot","_templateObject3","_templateObject4","_templateObject5","getCloseIconSlot","_templateObject6","_templateObject7","_templateObject8","render","_templateObject9","_templateObject10","_templateObject11","get","styles","NileElement","__decorate","property","type","String","prototype","Number","Boolean","reflect","customElement"],"mappings":"o0HAWaA,CAAAA,CAAcC,EAApB,uBAAAC,EAAA,EAAA,SAAAC,EAAA,q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A,CAAAA,CAAAA,CAAAA,CAAAA,CAAA4D,UAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CACzBJ,EAAA,CAA5BC,CAAAA,CAAS,CAAEC,IAAMI,CAAAA,OAAAA,CAAAA,CAAAA,CAAAA,CAA4B9D,EAAA4D,SAAA,CAAA,UAAA,CAAA,IAAA,IACjBJ,CAAA,CAAA,CAA5BC,EAAS,CAAEC,IAAAA,CAAMI,WAA4B9D,CAAA4D,CAAAA,SAAAA,CAAA,eAAA,EAClBJ,CAAAA,CAAAA,CAAAA,CAAA,CAA3BC,CAAS,CAAA,CAAEC,KAAMC,MAAoB3D,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA4D,UAAA,MAAA,CAAA,IAAA,EAAA,CAAA,CACVJ,EAAA,CAA3BC,CAAAA,CAAS,CAAEC,IAAMC,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAA0B3D,EAAA4D,SAAA,CAAA,YAAA,CAAA,IAAA,IACAJ,CAAA,CAAA,CAA3CC,EAAS,CAAEC,IAAAA,CAAMI,QAASC,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAuB/D,EAAA4D,SAAA,CAAA,QAAA,CAAA,IAAA,gBARhD5D,CAAcC,CAAAA,EAAAA,CAAAuD,EAAA,CAD1BQ,CAAAA,CAAc,qBACFhE"}
@@ -1,2 +0,0 @@
1
- System.register(["lit"],function(_export,_context){"use strict";var e,_templateObject,i;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){e=_lit.css;}],execute:function execute(){_export("s",i=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n\n\n .filter-chips {\n display: flex;\n align-items: center;\n }\n\n\n .chip {\n display: inline-flex;\n align-items: center;\n height: 30px;\n padding: 8px;\n border: 1px solid var(--nile-filter-chip-chip-border-color-stroke);\n border-radius: 4px;\n font-size: 14px;\n background-color: var(--nile-filter-chip-background-default);\n color: var(--nile-filter-chip-text-default);\n transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;\n cursor: pointer;\n box-sizing: border-box;\n }\n\n .chip:hover {\n background-color: var(--nile-filter-chip-hover-background);\n }\n .chip:active {\n background-color: var(--nile-filter-chip-active-background);\n border-color: var(--nile-filter-chip-active-border-color-stroke);\n}\n:host([active]) .chip {\n background-color: var(--nile-filter-chip-active-background);\n border-color: var(--nile-filter-chip-active-border-color-stroke);\n}\n\n\n .icon {\n color: var(--nile-filter-chip-icon-color-default);\n display: flex;\n align-items: center;\n justify-content: center;\n vertical-align: middle;\n position: relative;\n top: 12px;\n }\n\n .label {\n font-weight: 500;\n color: var(--nile-filter-chip-label-color-default);\n }\n\n nile-badge::part(base) {\n width: auto;\n height: 14px;\n border-radius: 100px;\n padding: 6px;\n gap: 10px;\n font-size: 8px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n line-height: 1;\n }\n\n .chip-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n }\n\n .clear-all-container {\n margin-left: 18px;\n white-space: nowrap;\n cursor: pointer;\n }\n\n\n .value {\n color: var(--nile-filter-chip-values-color-default);\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 140px;\n vertical-align: bottom;\n}\n\n\n .close-icon {\n color: var(--nile-filter-chip-close-icon-color-default);\n cursor: pointer;\n display: flex;\n align-items: center;\n border-radius: 50%;\n transition: background-color 0.2s;\n }\n\n .close-icon:hover {\n background-color: var(--nile-filter-chip-close-icon-hover-background);\n color: var(--nile-filter-chip-close-icon-hover-color);\n }\n\n.label-wrapper {\n margin-right: 4px;\n}\n\n::slotted([slot=\"icon\"]) {\n margin-right: 6px;\n}\n\n.value-wrapper {\n margin-right: 4px; \n}\n\n.badge-wrapper {\n margin-right: 12px; \n}\n\n"]))));}};});
2
- //# sourceMappingURL=nile-filter-chip.css.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"nile-filter-chip.css.cjs.js","sources":["../../../src/nile-filter-chip/nile-filter-chip.css.ts"],"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 * FilterChip CSS\n */\n\nexport const styles = css`\n\n\n .filter-chips {\n display: flex;\n align-items: center;\n }\n\n\n .chip {\n display: inline-flex;\n align-items: center;\n height: 30px;\n padding: 8px;\n border: 1px solid var(--nile-filter-chip-chip-border-color-stroke);\n border-radius: 4px;\n font-size: 14px;\n background-color: var(--nile-filter-chip-background-default);\n color: var(--nile-filter-chip-text-default);\n transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;\n cursor: pointer;\n box-sizing: border-box;\n }\n\n .chip:hover {\n background-color: var(--nile-filter-chip-hover-background);\n }\n .chip:active {\n background-color: var(--nile-filter-chip-active-background);\n border-color: var(--nile-filter-chip-active-border-color-stroke);\n}\n:host([active]) .chip {\n background-color: var(--nile-filter-chip-active-background);\n border-color: var(--nile-filter-chip-active-border-color-stroke);\n}\n\n\n .icon {\n color: var(--nile-filter-chip-icon-color-default);\n display: flex;\n align-items: center;\n justify-content: center;\n vertical-align: middle;\n position: relative;\n top: 12px;\n }\n\n .label {\n font-weight: 500;\n color: var(--nile-filter-chip-label-color-default);\n }\n\n nile-badge::part(base) {\n width: auto;\n height: 14px;\n border-radius: 100px;\n padding: 6px;\n gap: 10px;\n font-size: 8px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n line-height: 1;\n }\n\n .chip-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n }\n\n .clear-all-container {\n margin-left: 18px;\n white-space: nowrap;\n cursor: pointer;\n }\n\n\n .value {\n color: var(--nile-filter-chip-values-color-default);\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 140px;\n vertical-align: bottom;\n}\n\n\n .close-icon {\n color: var(--nile-filter-chip-close-icon-color-default);\n cursor: pointer;\n display: flex;\n align-items: center;\n border-radius: 50%;\n transition: background-color 0.2s;\n }\n\n .close-icon:hover {\n background-color: var(--nile-filter-chip-close-icon-hover-background);\n color: var(--nile-filter-chip-close-icon-hover-color);\n }\n\n.label-wrapper {\n margin-right: 4px;\n}\n\n::slotted([slot=\"icon\"]) {\n margin-right: 6px;\n}\n\n.value-wrapper {\n margin-right: 4px; \n}\n\n.badge-wrapper {\n margin-right: 12px; \n}\n\n`;\n\nexport default [styles];\n\n "],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTAaaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
@@ -1,121 +0,0 @@
1
- import{css as e}from"lit";const i=e`
2
-
3
-
4
- .filter-chips {
5
- display: flex;
6
- align-items: center;
7
- }
8
-
9
-
10
- .chip {
11
- display: inline-flex;
12
- align-items: center;
13
- height: 30px;
14
- padding: 8px;
15
- border: 1px solid var(--nile-filter-chip-chip-border-color-stroke);
16
- border-radius: 4px;
17
- font-size: 14px;
18
- background-color: var(--nile-filter-chip-background-default);
19
- color: var(--nile-filter-chip-text-default);
20
- transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
21
- cursor: pointer;
22
- box-sizing: border-box;
23
- }
24
-
25
- .chip:hover {
26
- background-color: var(--nile-filter-chip-hover-background);
27
- }
28
- .chip:active {
29
- background-color: var(--nile-filter-chip-active-background);
30
- border-color: var(--nile-filter-chip-active-border-color-stroke);
31
- }
32
- :host([active]) .chip {
33
- background-color: var(--nile-filter-chip-active-background);
34
- border-color: var(--nile-filter-chip-active-border-color-stroke);
35
- }
36
-
37
-
38
- .icon {
39
- color: var(--nile-filter-chip-icon-color-default);
40
- display: flex;
41
- align-items: center;
42
- justify-content: center;
43
- vertical-align: middle;
44
- position: relative;
45
- top: 12px;
46
- }
47
-
48
- .label {
49
- font-weight: 500;
50
- color: var(--nile-filter-chip-label-color-default);
51
- }
52
-
53
- nile-badge::part(base) {
54
- width: auto;
55
- height: 14px;
56
- border-radius: 100px;
57
- padding: 6px;
58
- gap: 10px;
59
- font-size: 8px;
60
- display: inline-flex;
61
- align-items: center;
62
- justify-content: center;
63
- line-height: 1;
64
- }
65
-
66
- .chip-container {
67
- display: flex;
68
- justify-content: space-between;
69
- align-items: center;
70
- width: 100%;
71
- }
72
-
73
- .clear-all-container {
74
- margin-left: 18px;
75
- white-space: nowrap;
76
- cursor: pointer;
77
- }
78
-
79
-
80
- .value {
81
- color: var(--nile-filter-chip-values-color-default);
82
- display: inline-block;
83
- overflow: hidden;
84
- text-overflow: ellipsis;
85
- white-space: nowrap;
86
- max-width: 140px;
87
- vertical-align: bottom;
88
- }
89
-
90
-
91
- .close-icon {
92
- color: var(--nile-filter-chip-close-icon-color-default);
93
- cursor: pointer;
94
- display: flex;
95
- align-items: center;
96
- border-radius: 50%;
97
- transition: background-color 0.2s;
98
- }
99
-
100
- .close-icon:hover {
101
- background-color: var(--nile-filter-chip-close-icon-hover-background);
102
- color: var(--nile-filter-chip-close-icon-hover-color);
103
- }
104
-
105
- .label-wrapper {
106
- margin-right: 4px;
107
- }
108
-
109
- ::slotted([slot="icon"]) {
110
- margin-right: 6px;
111
- }
112
-
113
- .value-wrapper {
114
- margin-right: 4px;
115
- }
116
-
117
- .badge-wrapper {
118
- margin-right: 12px;
119
- }
120
-
121
- `;export{i as s};
@@ -1,43 +0,0 @@
1
- import{__decorate as t}from"tslib";import{html as e}from"lit";import{property as s,customElement as i}from"lit/decorators.js";import{N as l}from"../internal/nile-element.esm.js";import{s as n}from"./nile-filter-chip.css.esm.js";var o;let a=o=class extends l{constructor(){super(...arguments),this.label="",this.text="",this.viewMoreCount=0,this.editable=!1,this.closable=!1,this.icon="",this.removeIcon="",this.active=!1}static get styles(){return[n]}connectedCallback(){super.connectedCallback(),this.registerChip()}disconnectedCallback(){super.disconnectedCallback(),this.unregisterChip()}registerChip(){o.activeChips.push(this)}unregisterChip(){o.activeChips=o.activeChips.filter((t=>t!==this))}handleClose(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("nile-close",{detail:{text:this.text,viewMoreCount:this.viewMoreCount}})),this.remove()}handleClick(){this.dispatchEvent(new CustomEvent("nile-click",{detail:{text:this.text,viewMoreCount:this.viewMoreCount}}))}getLabelSlot(){return e`
2
- <span class="label-wrapper">
3
- <slot name="label">
4
- <span class="label">${this.label}:</span>
5
- </slot>
6
- </span>
7
-
8
- `}getValueSlot(){return e`
9
- <span class="value-wrapper">
10
- <slot name="value">
11
- <span class="value">${this.text}</span>
12
- </slot>
13
- </span>
14
-
15
- `}getviewMoreCountSlot(){return e`
16
- <slot name="suffix">
17
- ${this.viewMoreCount?e`
18
- <span class="badge-wrapper">
19
- <nile-badge variant="primary" pilltype="pill-color">
20
- +${this.viewMoreCount}
21
- </nile-badge>
22
- </span>
23
-
24
- `:e``}
25
- </slot>
26
- `}getCloseIconSlot(){return e`
27
- ${this.closable?e`
28
- <span class="close-icon" @click="${this.handleClose}">
29
- <nile-icon name="${this.removeIcon||"close"}" size="12"></nile-icon>
30
- </span>
31
- `:e``}
32
- `}render(){return e`
33
- <div class="chip" @click="${this.handleClick}">
34
- <slot name="icon">
35
- ${this.icon?e`<span class="icon">${this.icon}</span>`:e``}
36
- </slot>
37
- ${this.getLabelSlot()}
38
- <slot name="content"></slot>
39
- ${this.getValueSlot()}
40
- ${this.getviewMoreCountSlot()}
41
- ${this.getCloseIconSlot()}
42
- </div>
43
- `}};a.activeChips=[],t([s({type:String})],a.prototype,"label",void 0),t([s({type:String})],a.prototype,"text",void 0),t([s({type:Number})],a.prototype,"viewMoreCount",void 0),t([s({type:Boolean})],a.prototype,"editable",void 0),t([s({type:Boolean})],a.prototype,"closable",void 0),t([s({type:String})],a.prototype,"icon",void 0),t([s({type:String})],a.prototype,"removeIcon",void 0),t([s({type:Boolean,reflect:!0})],a.prototype,"active",void 0),a=o=t([i("nile-filter-chip")],a);export{a as N};
@@ -1,2 +0,0 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["../fixture-d5b55278.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-filter-chip.cjs.js","tslib","lit/decorators.js","../internal/nile-element.cjs.js","./nile-filter-chip.css.cjs.js"],function(_export,_context){"use strict";var e,i,t,l,n,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8;function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}return{setters:[function(_fixture001CjsJs){e=_fixture001CjsJs.f;i=_fixture001CjsJs.a;t=_fixture001CjsJs.o;},function(_litStaticHtmlJs){l=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileFilterChipCjsJs){n=_nileFilterChipCjsJs.N;},function(_tslib){},function(_litDecoratorsJs){},function(_internalNileElementCjsJs){},function(_nileFilterChipCssCjsJs){}],execute:function execute(){describe("<nile-filter-chip>",function(){afterEach(function(){n.activeChips=[];}),it("registers and unregisters itself in activeChips",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var t;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return e(l(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <nile-filter-chip label=\"L\" text=\"T\"></nile-filter-chip>\n "]))));case 2:t=_context2.sent;i(n.activeChips).to.include(t);t.remove();_context2.next=7;return t.updateComplete;case 7:i(n.activeChips).to.not.include(t);case 8:case"end":return _context2.stop();}},_callee);}))),it("renders fallback label and text",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var t,n,a;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return e(l(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-filter-chip label=\"MyLabel\" text=\"MyText\"></nile-filter-chip>\n "]))));case 2:t=_context3.sent;n=t.shadowRoot.querySelector(".label");a=t.shadowRoot.querySelector(".value");i(n.textContent).to.equal("MyLabel:"),i(a.textContent.trim()).to.equal("MyText");case 6:case"end":return _context3.stop();}},_callee2);}))),it("renders slotted label and value over fallback",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var t,n,a;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return e(l(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-filter-chip>\n <span slot=\"label\">SLOT-LBL</span>\n <span slot=\"value\">SLOT-VAL</span>\n </nile-filter-chip>\n "]))));case 2:t=_context4.sent;n=t.querySelector('[slot="label"]');a=t.querySelector('[slot="value"]');i(n.textContent).to.equal("SLOT-LBL"),i(a.textContent).to.equal("SLOT-VAL");case 6:case"end":return _context4.stop();}},_callee3);}))),it("renders an icon when the `icon` property is set",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var t;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return e(l(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-filter-chip icon=\"\u2605\" label=\"L\" text=\"T\"></nile-filter-chip>\n "]))));case 2:t=_context5.sent.shadowRoot.querySelector(".icon");i(t).to.exist,i(t.textContent).to.equal("★");case 4:case"end":return _context5.stop();}},_callee4);}))),it("does not render a badge when viewMoreCount is zero",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var t;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return e(l(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-filter-chip viewMoreCount=\"0\" label=\"L\" text=\"T\"></nile-filter-chip>\n "]))));case 2:t=_context6.sent;i(t.shadowRoot.querySelector("nile-badge")).to.be["null"];case 4:case"end":return _context6.stop();}},_callee5);}))),it("renders a +badge when viewMoreCount > 0",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var t;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return e(l(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <nile-filter-chip viewMoreCount=\"5\" label=\"L\" text=\"T\"></nile-filter-chip>\n "]))));case 2:t=_context7.sent.shadowRoot.querySelector("nile-badge");i(t).to.exist,i(t.textContent).to.contain("+5");case 4:case"end":return _context7.stop();}},_callee6);}))),it("dispatches `nile-click` on chip click",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var n,a,s;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return e(l(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <nile-filter-chip label=\"L\" text=\"T\"></nile-filter-chip>\n "]))));case 2:n=_context8.sent;a=n.shadowRoot.querySelector(".chip");setTimeout(function(){return a.click();});_context8.next=7;return t(n,"nile-click");case 7:s=_context8.sent;i(s.detail).to.deep.equal({text:"T",viewMoreCount:0});case 9:case"end":return _context8.stop();}},_callee7);}))),it("dispatches `nile-close` on close icon click and removes itself",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var n,a,s;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return e(l(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n <nile-filter-chip closable viewMoreCount=\"2\" text=\"TT\"></nile-filter-chip>\n "]))));case 2:n=_context9.sent;a=n.shadowRoot.querySelector(".close-icon");setTimeout(function(){return a.click();});_context9.next=7;return t(n,"nile-close");case 7:s=_context9.sent;i(s.detail).to.deep.equal({text:"TT",viewMoreCount:2}),i(document.body.contains(n)).to.be["false"];case 9:case"end":return _context9.stop();}},_callee8);})));});}};});
2
- //# sourceMappingURL=nile-filter-chip.test.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"nile-filter-chip.test.cjs.js","sources":["../../../src/nile-filter-chip/nile-filter-chip.test.ts"],"sourcesContent":["import { fixture, expect, html, oneEvent } from '@open-wc/testing';\nimport './nile-filter-chip';\nimport { NileFilterChip } from './nile-filter-chip';\n\ndescribe('<nile-filter-chip>', () => {\n afterEach(() => {\n (NileFilterChip as any).activeChips = [];\n });\n\n it('registers and unregisters itself in activeChips', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip label=\"L\" text=\"T\"></nile-filter-chip>\n `);\n expect((NileFilterChip as any).activeChips).to.include(el);\n el.remove();\n await el.updateComplete;\n expect((NileFilterChip as any).activeChips).to.not.include(el);\n });\n\n it('renders fallback label and text', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip label=\"MyLabel\" text=\"MyText\"></nile-filter-chip>\n `);\n const label = el.shadowRoot!.querySelector('.label')! as HTMLElement;\n const value = el.shadowRoot!.querySelector('.value')! as HTMLElement;\n expect(label.textContent).to.equal('MyLabel:');\n expect(value.textContent!.trim()).to.equal('MyText');\n });\n\n it('renders slotted label and value over fallback', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip>\n <span slot=\"label\">SLOT-LBL</span>\n <span slot=\"value\">SLOT-VAL</span>\n </nile-filter-chip>\n `);\n const slottedLabel = el.querySelector('[slot=\"label\"]')! as HTMLElement;\n const slottedValue = el.querySelector('[slot=\"value\"]')! as HTMLElement;\n expect(slottedLabel.textContent).to.equal('SLOT-LBL');\n expect(slottedValue.textContent).to.equal('SLOT-VAL');\n });\n\n it('renders an icon when the `icon` property is set', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip icon=\"★\" label=\"L\" text=\"T\"></nile-filter-chip>\n `);\n const iconSpan = el.shadowRoot!.querySelector('.icon')! as HTMLElement;\n expect(iconSpan).to.exist;\n expect(iconSpan.textContent).to.equal('★');\n });\n\n it('does not render a badge when viewMoreCount is zero', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip viewMoreCount=\"0\" label=\"L\" text=\"T\"></nile-filter-chip>\n `);\n expect(el.shadowRoot!.querySelector('nile-badge')).to.be.null;\n });\n\n it('renders a +badge when viewMoreCount > 0', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip viewMoreCount=\"5\" label=\"L\" text=\"T\"></nile-filter-chip>\n `);\n const badge = el.shadowRoot!.querySelector('nile-badge')! as HTMLElement;\n expect(badge).to.exist;\n expect(badge.textContent).to.contain('+5');\n });\n\n\n\n it('dispatches `nile-click` on chip click', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip label=\"L\" text=\"T\"></nile-filter-chip>\n `);\n const chip = el.shadowRoot!.querySelector('.chip')! as HTMLElement;\n setTimeout(() => chip.click());\n const ev = await oneEvent(el, 'nile-click');\n expect(ev.detail).to.deep.equal({ text: 'T', viewMoreCount: 0 });\n });\n\n it('dispatches `nile-close` on close icon click and removes itself', async () => {\n const el = await fixture<NileFilterChip>(html`\n <nile-filter-chip closable viewMoreCount=\"2\" text=\"TT\"></nile-filter-chip>\n `);\n const closeIcon = el.shadowRoot!.querySelector('.close-icon')! as HTMLElement;\n setTimeout(() => closeIcon.click());\n const ev = await oneEvent(el, 'nile-close');\n expect(ev.detail).to.deep.equal({ text: 'TT', viewMoreCount: 2 });\n expect(document.body.contains(el)).to.be.false;\n });\n\n \n});\n"],"names":["describe","afterEach","NileFilterChip","activeChips","it","async","fixture","html","_templateObject","_taggedTemplateLiteral","el","expect","to","include","remove","updateComplete","not","_context2","stop","_callee","_templateObject2","label","shadowRoot","querySelector","value","textContent","equal","trim","_context3","_callee2","_templateObject3","slottedLabel","slottedValue","_context4","_callee3","_asyncToGenerator","_regeneratorRuntime","mark","_templateObject4","iconSpan","exist","_context5","_callee4","_templateObject5","be","null","_context6","_callee5","_templateObject6","badge","contain","_context7","_callee6","_templateObject7","chip","setTimeout","click","_context8","next","oneEvent","ev","detail","deep","text","viewMoreCount","_callee7","_templateObject8","closeIcon","_context9","document","body","contains","_callee8"],"mappings":"s0SAIAA,QAAS,CAAA,oBAAA,CAAsB,UAC7BC,CAAAA,SAAAA,CAAU,UACPC,CAAAA,CAAAA,CAAuBC,WAAc,CAAA,EAAE,EAG1CC,CAAAA,CAAAA,EAAAA,CAAG,iDAAmDC,cAAAA,iBAAAA,cAAAA,mBAAAA,GAAAA,IAAAA,CAAAA,SAAAA,QAAAA,MAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,SAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SAAAA,SAAAA,CAAAA,IAAAA,SACnCC,CAAAA,EAAwBC,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,2FAAvCC,CAAAA,CAAAA,SAAAA,CAAAA,IAAAA,CAGNC,CAAQT,CAAAA,CAAAA,CAAuBC,aAAaS,EAAGC,CAAAA,OAAAA,CAAQH,GACvDA,CAAGI,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SACGJ,CAAAA,CAAGK,CAAAA,cAAAA,QACTJ,CAAQT,CAAAA,CAAAA,CAAuBC,aAAaS,EAAGI,CAAAA,GAAAA,CAAIH,OAAQH,CAAAA,CAAAA,CAAG,yBAAAO,SAAA,CAAAC,IAAA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,IAAA,SAAiBC,CAAAA,CAAAA,CAASjD,CAAI,CAAA,YAAA,CAAA,QAAxBkD,CAAWD,CAAAA,SAAAA,CAAAA,IAAAA,CACjBhD,EAAOiD,CAAGC,CAAAA,MAAAA,CAAAA,CAAQjD,EAAGkD,CAAAA,IAAAA,CAAKpC,KAAM,CAAA,CAAEqC,IAAM,CAAA,IAAA,CAAMC,cAAe,CAC7DrD,CAAAA,CAAAA,CAAAA,CAAAA,CAAO0D,QAASC,CAAAA,IAAAA,CAAKC,QAAS7D,CAAAA,CAAAA,CAAAA,CAAAA,CAAKE,EAAGgC,CAAAA,EAAAA,SAAQ,yBAAAwB,SAAA,CAAAlD,IAAA,MAAAsD,QAAA,GAC9C,EAAA,CAAA,EAAA,CAAA,CAAA"}
@@ -1,20 +0,0 @@
1
- import{f as e,a as i,o as t}from"../fixture-df8b52d7.esm.js";import{html as l}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import{N as n}from"./nile-filter-chip.esm.js";import"tslib";import"lit/decorators.js";import"../internal/nile-element.esm.js";import"./nile-filter-chip.css.esm.js";describe("<nile-filter-chip>",(()=>{afterEach((()=>{n.activeChips=[]})),it("registers and unregisters itself in activeChips",(async()=>{const t=await e(l`
2
- <nile-filter-chip label="L" text="T"></nile-filter-chip>
3
- `);i(n.activeChips).to.include(t),t.remove(),await t.updateComplete,i(n.activeChips).to.not.include(t)})),it("renders fallback label and text",(async()=>{const t=await e(l`
4
- <nile-filter-chip label="MyLabel" text="MyText"></nile-filter-chip>
5
- `),n=t.shadowRoot.querySelector(".label"),a=t.shadowRoot.querySelector(".value");i(n.textContent).to.equal("MyLabel:"),i(a.textContent.trim()).to.equal("MyText")})),it("renders slotted label and value over fallback",(async()=>{const t=await e(l`
6
- <nile-filter-chip>
7
- <span slot="label">SLOT-LBL</span>
8
- <span slot="value">SLOT-VAL</span>
9
- </nile-filter-chip>
10
- `),n=t.querySelector('[slot="label"]'),a=t.querySelector('[slot="value"]');i(n.textContent).to.equal("SLOT-LBL"),i(a.textContent).to.equal("SLOT-VAL")})),it("renders an icon when the `icon` property is set",(async()=>{const t=(await e(l`
11
- <nile-filter-chip icon="★" label="L" text="T"></nile-filter-chip>
12
- `)).shadowRoot.querySelector(".icon");i(t).to.exist,i(t.textContent).to.equal("★")})),it("does not render a badge when viewMoreCount is zero",(async()=>{const t=await e(l`
13
- <nile-filter-chip viewMoreCount="0" label="L" text="T"></nile-filter-chip>
14
- `);i(t.shadowRoot.querySelector("nile-badge")).to.be.null})),it("renders a +badge when viewMoreCount > 0",(async()=>{const t=(await e(l`
15
- <nile-filter-chip viewMoreCount="5" label="L" text="T"></nile-filter-chip>
16
- `)).shadowRoot.querySelector("nile-badge");i(t).to.exist,i(t.textContent).to.contain("+5")})),it("dispatches `nile-click` on chip click",(async()=>{const n=await e(l`
17
- <nile-filter-chip label="L" text="T"></nile-filter-chip>
18
- `),a=n.shadowRoot.querySelector(".chip");setTimeout((()=>a.click()));const s=await t(n,"nile-click");i(s.detail).to.deep.equal({text:"T",viewMoreCount:0})})),it("dispatches `nile-close` on close icon click and removes itself",(async()=>{const n=await e(l`
19
- <nile-filter-chip closable viewMoreCount="2" text="TT"></nile-filter-chip>
20
- `),a=n.shadowRoot.querySelector(".close-icon");setTimeout((()=>a.click()));const s=await t(n,"nile-close");i(s.detail).to.deep.equal({text:"TT",viewMoreCount:2}),i(document.body.contains(n)).to.be.false}))}));
@@ -1,2 +0,0 @@
1
- System.register([],function(_export,_context){"use strict";function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t["return"]&&(u=t["return"](),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function t(t){var e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth);}function e(t,e,a,o,r,s,c,n){t.left,t.width;var i=function i(a){var s=0,c=0;switch(a){case"top":default:s=t.top-e.height-o,c=t.left+(t.width-e.width)/2+r;break;case"top-start":{s=t.top-e.height-o;var _a=t.left+t.width/2-e.width/2+r;c=Math.max(t.left+r,_a);break;}case"top-end":{s=t.top-e.height-o;var _a2=t.left+t.width/2-e.width/2+r,_n=t.right-e.width+r;c=Math.min(_a2,_n);break;}case"bottom":s=t.bottom+o,c=t.left+(t.width-e.width)/2+r;break;case"bottom-start":{s=t.bottom+o;var _a3=t.left+t.width/2-e.width/2+r;c=Math.max(t.left+r,_a3);break;}case"bottom-end":{s=t.bottom+o;var _a4=t.left+t.width/2-e.width/2+r,_n2=t.right-e.width+r;c=Math.min(_a4,_n2);break;}case"left":s=t.top+(t.height-e.height)/2+r,c=t.left-e.width-o;break;case"left-start":s=t.top+t.height/2-e.height/2,c=t.left-e.width-o,s<t.top&&(s=t.top);break;case"left-end":s=t.top+t.height/2-e.height/2,c=t.left-e.width-o,s+e.height>t.bottom&&(s=t.bottom-e.height);break;case"right":s=t.top+(t.height-e.height)/2+r,c=t.right+o;break;case"right-start":s=t.top+t.height/2-e.height/2,c=t.right+o,s<t.top&&(s=t.top);break;case"right-end":s=t.top+t.height/2-e.height/2,c=t.right+o,s+e.height>t.bottom&&(s=t.bottom-e.height);break;}return{top:s,left:c};},h=function h(t,a){return t>=0&&a>=0&&t+e.height<=n&&a+e.width<=c;};var b=a,l=i(b);if(!h(l.top,l.left)){["top","top-start","top-end"].includes(a)?b="bottom":["bottom","bottom-start","bottom-end"].includes(a)?b="top":["right","right-start","right-end"].includes(a)?b="left":["left","left-start","left-end"].includes(a)&&(b="right"),l=i(b);var _t=i("left"),_e=i("bottom"),_o=i("top");if(h(_t.top,_t.left)||h(_e.top,_e.left)||h(_o.top,_o.left)){var _t2=i("right");h(_t2.top,_t2.left)||h(_e.top,_e.left)||h(_o.top,_o.left)||(b="left",l=i(b));}else b="right",l=i(b);}return l.left<0?l.left=5:l.left+e.width>c&&(l.left=c-e.width-5),l.top<0?l.top=5:l.top+e.height>n&&(l.top=n-e.height-5),_objectSpread(_objectSpread({},l),{},{placement:b});}function a(_ref){var t=_ref.placement,e=_ref.tooltipRect,a=_ref.triggerRect,o=_ref.caretSize,r=_ref.left,s=_ref.top;var c=a.left+a.width/2,n=a.top+a.height/2,_t$split=t.split("-"),_t$split2=_slicedToArray(_t$split,2),i=_t$split2[0],h=_t$split2[1];var b=0,l=0;switch(i){case"top":l=e.height-o,b=c-r-o,"top-end"===t||"start"===h?b=c-r-o:"end"===h&&(b=e.width-2*o+8),b=Math.max(o,Math.min(b,e.width-2*o));break;case"bottom":l=-o,b=c-r-o;break;case"left":if(b=e.width-o,"start"===h){var _t3=n-s-o,_e2=a.top-s;l=Math.max(_t3,_e2);}else if("end"===h){var _t4=n-s-o,_e3=a.bottom-s-2*o;l=Math.min(_t4,_e3);}else l=n-s-o;l=Math.max(o,Math.min(l,e.height-2*o));break;case"right":if(b=-o,"start"===h){var _t5=n-s-o,_e4=a.top-s;l=Math.max(_t5,_e4);}else if("end"===h){var _t6=n-s-o,_e5=a.bottom-s-2*o;l=Math.min(_t6,_e5);}else l=n-s-o;l=Math.max(o,Math.min(l,e.height-2*o));break;default:b=e.width/2-o,l=e.height/2-o;}return{caretLeft:b,caretTop:l};}_export({a:a,g:e,i:t});return{setters:[],execute:function execute(){}};});
2
- //# sourceMappingURL=nile-tooltip-utils.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"nile-tooltip-utils.cjs.js","sources":["../../../src/nile-tooltip/nile-tooltip-utils.ts"],"sourcesContent":["export function isInViewport(element: HTMLElement): boolean {\n const rect = element.getBoundingClientRect();\n return (\n rect.top >= 0 &&\n rect.left >= 0 &&\n rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\n rect.right <= (window.innerWidth || document.documentElement.clientWidth)\n );\n}\n\n\nexport function getValidTooltipPosition(\n triggerRect: DOMRect,\n tooltipRect: DOMRect,\n originalPlacement: string,\n distance: number,\n skidding: number,\n caretSize: number,\n viewportWidth: number,\n viewportHeight: number\n): { top: number; left: number; placement: string } {\n const triggerCenterX = triggerRect.left + triggerRect.width / 2;\n\n const getCandidatePosition = (placement: string) => {\n let top = 0;\n let left = 0;\n\n switch (placement) {\n case 'top':\n top = triggerRect.top - tooltipRect.height - distance;\n left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2 + skidding;\n break;\n case 'top-start': {\n top = triggerRect.top - tooltipRect.height - distance;\n const centeredLeft = triggerRect.left + (triggerRect.width / 2) - (tooltipRect.width / 2) + skidding;\n left = Math.max(triggerRect.left + skidding, centeredLeft);\n break;\n }\n case 'top-end': {\n top = triggerRect.top - tooltipRect.height - distance;\n const centeredLeft = triggerRect.left + (triggerRect.width / 2) - (tooltipRect.width / 2) + skidding;\n const maxLeft = triggerRect.right - tooltipRect.width + skidding;\n left = Math.min(centeredLeft, maxLeft);\n break;\n }\n\n case 'bottom':\n top = triggerRect.bottom + distance;\n left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2 + skidding;\n break;\n case 'bottom-start': {\n top = triggerRect.bottom + distance;\n const centeredLeft = triggerRect.left + (triggerRect.width / 2) - (tooltipRect.width / 2) + skidding;\n left = Math.max(triggerRect.left + skidding, centeredLeft);\n\n break;\n }\n\n case 'bottom-end': {\n top = triggerRect.bottom + distance;\n const centeredLeft = triggerRect.left + (triggerRect.width / 2) - (tooltipRect.width / 2) + skidding;\n const maxLeft = triggerRect.right - tooltipRect.width + skidding;\n left = Math.min(centeredLeft, maxLeft);\n break;\n }\n\n case 'left':\n top = triggerRect.top + (triggerRect.height - tooltipRect.height) / 2 + skidding;\n left = triggerRect.left - tooltipRect.width - distance;\n break;\n case 'left-start': {\n const triggerCenterY = triggerRect.top + triggerRect.height / 2;\n top = triggerCenterY - tooltipRect.height / 2;\n left = triggerRect.left - tooltipRect.width - distance;\n if (top < triggerRect.top) {\n top = triggerRect.top;\n }\n break;\n }\n\n case 'left-end': {\n const triggerCenterY = triggerRect.top + triggerRect.height / 2;\n top = triggerCenterY - tooltipRect.height / 2;\n left = triggerRect.left - tooltipRect.width - distance;\n if (top + tooltipRect.height > triggerRect.bottom) {\n top = triggerRect.bottom - tooltipRect.height;\n }\n\n break;\n }\n\n case 'right':\n top = triggerRect.top + (triggerRect.height - tooltipRect.height) / 2 + skidding;\n left = triggerRect.right + distance;\n break;\n case 'right-start': {\n const triggerCenterY = triggerRect.top + triggerRect.height / 2;\n top = triggerCenterY - tooltipRect.height / 2;\n left = triggerRect.right + distance;\n if (top < triggerRect.top) {\n top = triggerRect.top;\n }\n\n break;\n }\n\n case 'right-end': {\n const triggerCenterY = triggerRect.top + triggerRect.height / 2;\n top = triggerCenterY - tooltipRect.height / 2;\n left = triggerRect.right + distance;\n if (top + tooltipRect.height > triggerRect.bottom) {\n top = triggerRect.bottom - tooltipRect.height;\n }\n\n break;\n }\n\n default:\n top = triggerRect.top - tooltipRect.height - distance;\n left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2 + skidding;\n }\n\n return { top, left };\n };\n\n const candidateFits = (top: number, left: number) =>\n top >= 0 &&\n left >= 0 &&\n top + tooltipRect.height <= viewportHeight &&\n left + tooltipRect.width <= viewportWidth;\n\n let placement = originalPlacement;\n let candidate = getCandidatePosition(placement);\n\n if (!candidateFits(candidate.top, candidate.left)) {\n if (['top', 'top-start', 'top-end'].includes(originalPlacement)) {\n placement = 'bottom';\n } else if (['bottom', 'bottom-start', 'bottom-end'].includes(originalPlacement)) {\n placement = 'top';\n } else if (['right', 'right-start', 'right-end'].includes(originalPlacement)) {\n placement = 'left';\n } else if (['left', 'left-start', 'left-end'].includes(originalPlacement)) {\n placement = 'right';\n }\n candidate = getCandidatePosition(placement);\n const leftCandidate = getCandidatePosition('left');\n const bottomCandidate = getCandidatePosition('bottom');\n const topCandidate = getCandidatePosition('top');\n if (\n !candidateFits(leftCandidate.top, leftCandidate.left) &&\n !candidateFits(bottomCandidate.top, bottomCandidate.left) &&\n !candidateFits(topCandidate.top, topCandidate.left)\n ) {\n placement = 'right';\n candidate = getCandidatePosition(placement);\n }\n else {\n const rightCandidate = getCandidatePosition('right');\n if (\n !candidateFits(rightCandidate.top, rightCandidate.left) &&\n !candidateFits(bottomCandidate.top, bottomCandidate.left) &&\n !candidateFits(topCandidate.top, topCandidate.left)\n ) {\n placement = 'left';\n candidate = getCandidatePosition(placement);\n }\n }\n }\n\n if (candidate.left < 0) {\n candidate.left = 5;\n } else if (candidate.left + tooltipRect.width > viewportWidth) {\n candidate.left = viewportWidth - tooltipRect.width - 5;\n }\n\n if (candidate.top < 0) {\n candidate.top = 5;\n } else if (candidate.top + tooltipRect.height > viewportHeight) {\n candidate.top = viewportHeight - tooltipRect.height - 5;\n }\n\n return { ...candidate, placement };\n}\n\n\n\nexport interface CaretPositionInput {\n placement: string;\n tooltipRect: DOMRect;\n triggerRect: DOMRect;\n caretSize: number;\n left: number;\n top: number;\n}\n\nexport function getCaretPosition({\n placement,\n tooltipRect,\n triggerRect,\n caretSize,\n left,\n top\n}: CaretPositionInput): { caretLeft: number; caretTop: number } {\n const triggerCenterX = triggerRect.left + triggerRect.width / 2;\n const triggerCenterY = triggerRect.top + triggerRect.height / 2;\n\n const [primaryPlacement, secondaryPlacement] = placement.split('-');\n\n let caretLeft = 0;\n let caretTop = 0;\n\n switch (primaryPlacement) {\n case 'top':\n caretTop = tooltipRect.height - caretSize;\n caretLeft = triggerCenterX - left - caretSize;\n if (placement === 'top-end') {\n caretLeft = triggerCenterX - left - caretSize;\n } else if (secondaryPlacement === 'start') {\n caretLeft = triggerCenterX - left - caretSize;\n } else if (secondaryPlacement === 'end') {\n caretLeft = tooltipRect.width - 2 * caretSize + 8;\n }\n caretLeft = Math.max(caretSize, Math.min(caretLeft, tooltipRect.width - 2 * caretSize));\n break;\n\n case 'bottom':\n caretTop = -caretSize;\n caretLeft = triggerCenterX - left - caretSize;\n break;\n\n case 'left':\n caretLeft = tooltipRect.width - caretSize;\n if (secondaryPlacement === 'start') {\n const computedCaretTop = triggerCenterY - top - caretSize;\n const minCaretTop = triggerRect.top - top;\n caretTop = Math.max(computedCaretTop, minCaretTop);\n } else if (secondaryPlacement === 'end') {\n const computedCaretTop = triggerCenterY - top - caretSize;\n const maxCaretTop = triggerRect.bottom - top - 2 * caretSize;\n caretTop = Math.min(computedCaretTop, maxCaretTop);\n } else {\n caretTop = triggerCenterY - top - caretSize;\n }\n caretTop = Math.max(caretSize, Math.min(caretTop, tooltipRect.height - 2 * caretSize));\n break;\n\n\n case 'right':\n caretLeft = -caretSize;\n if (secondaryPlacement === 'start') {\n const computedCaretTop = triggerCenterY - top - caretSize;\n const minCaretTop = triggerRect.top - top;\n caretTop = Math.max(computedCaretTop, minCaretTop);\n } else if (secondaryPlacement === 'end') {\n const computedCaretTop = triggerCenterY - top - caretSize;\n const maxCaretTop = triggerRect.bottom - top - 2 * caretSize;\n caretTop = Math.min(computedCaretTop, maxCaretTop);\n } else {\n caretTop = triggerCenterY - top - caretSize;\n }\n caretTop = Math.max(caretSize, Math.min(caretTop, tooltipRect.height - 2 * caretSize));\n break;\n\n\n default:\n caretLeft = tooltipRect.width / 2 - caretSize;\n caretTop = tooltipRect.height / 2 - caretSize;\n }\n\n return { caretLeft, caretTop };\n}\n"],"names":["isInViewport","element","rect","getBoundingClientRect","top","left","bottom","window","innerHeight","document","documentElement","clientHeight","right","innerWidth","clientWidth","getValidTooltipPosition","triggerRect","tooltipRect","originalPlacement","distance","skidding","caretSize","viewportWidth","viewportHeight","width","getCandidatePosition","placement","height","centeredLeft","Math","max","maxLeft","min","candidateFits","h","candidate","includes","leftCandidate","bottomCandidate","topCandidate","rightCandidate","_objectSpread","getCaretPosition","triggerCenterX","triggerCenterY","primaryPlacement","split","secondaryPlacement","caretLeft","caretTop","computedCaretTop","minCaretTop","maxCaretTop","l","_export","a"],"mappings":"srFAAM,QAAUA,CAAAA,EAAaC,CAC3B,CAAA,CAAA,GAAMC,CAAAA,EAAOD,CAAQE,CAAAA,qBAAAA,CAAAA,CAAAA,CACrB,MACED,CAAAA,CAAKE,CAAAA,GAAAA,EAAO,CACZF,EAAAA,CAAAA,CAAKG,MAAQ,CACbH,EAAAA,CAAAA,CAAKI,SAAWC,MAAOC,CAAAA,WAAAA,EAAeC,SAASC,eAAgBC,CAAAA,YAAAA,CAAAA,EAC/DT,CAAKU,CAAAA,KAAAA,GAAUL,OAAOM,UAAcJ,EAAAA,QAAAA,CAASC,gBAAgBI,WAEjE,CAAA,UAGgBC,CAAAA,CACdC,CAAAA,CAAAA,CACAC,EACAC,CACAC,CAAAA,CAAAA,CACAC,EACAC,CACAC,CAAAA,CAAAA,CACAC,GAEuBP,CAAYX,CAAAA,IAAAA,CAAOW,EAAYQ,KAEtD,CAAA,GAAMC,CAAAA,CAAwBC,CAAAA,QAAxBD,CAAAA,CAAwBC,CAAAA,CAAAA,CAAAA,CAC5B,GAAItB,CAAAA,CAAM,CAAA,CAAA,CACNC,EAAO,CAEX,CAAA,OAAQqB,GACN,IAAK,KAAA,CAyFL,QACEtB,CAAMY,CAAAA,CAAAA,CAAYZ,IAAMa,CAAYU,CAAAA,MAAAA,CAASR,EAC7Cd,CAAOW,CAAAA,CAAAA,CAAYX,MAAQW,CAAYQ,CAAAA,KAAAA,CAAQP,CAAYO,CAAAA,KAAAA,EAAS,EAAIJ,CAvF1E,CAAA,MAAA,IAAK,YAAa,CAChBhB,CAAAA,CAAMY,EAAYZ,GAAMa,CAAAA,CAAAA,CAAYU,OAASR,CAC7C,CAAA,GAAMS,CAAA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IAAMA,CACtC6C,CAAAA,CAAAA,CAAWpB,KAAKC,GAAIoB,CAAAA,GAAAA,CAAkBC,IACvC,EAAM,IAAA,IAA2B,QAAvBJ,CAA8B,CAAA,CACvC,GAAMG,CAAAA,GAAmBN,CAAAA,CAAAA,CAAiBxC,EAAMiB,CAC1C+B,CAAAA,GAAAA,CAAcpC,CAAYV,CAAAA,MAAAA,CAASF,EAAM,CAAIiB,CAAAA,CAAAA,CACnD4B,EAAWpB,IAAKG,CAAAA,GAAAA,CAAIkB,IAAkBE,GACvC,CAAA,EAAA,IACCH,CAAAA,EAAWL,CAAiBxC,CAAAA,CAAAA,CAAMiB,EAEpC4B,CAAWpB,CAAAA,IAAAA,CAAKC,IAAIT,CAAWQ,CAAAA,IAAAA,CAAKG,IAAIiB,CAAUhC,CAAAA,CAAAA,CAAYU,MAAS,CAAA,CAAA,CAAIN,IAC3E,MAGF,QACE2B,EAAY/B,CAAYO,CAAAA,KAAAA,CAAQ,EAAIH,CACpC4B,CAAAA,CAAAA,CAAWhC,EAAYU,MAAS,CAAA,CAAA,CAAIN,GAGxC,MAAO,CAAE2B,YAAWC,QACtB,CAAAI,CAAA,CAAA,EAAAC,OAAA,EAAAC,CAAA"}
@@ -1 +0,0 @@
1
- function t(t){const e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)}function e(t,e,a,o,r,s,c,n){t.left,t.width;const i=a=>{let s=0,c=0;switch(a){case"top":default:s=t.top-e.height-o,c=t.left+(t.width-e.width)/2+r;break;case"top-start":{s=t.top-e.height-o;const a=t.left+t.width/2-e.width/2+r;c=Math.max(t.left+r,a);break}case"top-end":{s=t.top-e.height-o;const a=t.left+t.width/2-e.width/2+r,n=t.right-e.width+r;c=Math.min(a,n);break}case"bottom":s=t.bottom+o,c=t.left+(t.width-e.width)/2+r;break;case"bottom-start":{s=t.bottom+o;const a=t.left+t.width/2-e.width/2+r;c=Math.max(t.left+r,a);break}case"bottom-end":{s=t.bottom+o;const a=t.left+t.width/2-e.width/2+r,n=t.right-e.width+r;c=Math.min(a,n);break}case"left":s=t.top+(t.height-e.height)/2+r,c=t.left-e.width-o;break;case"left-start":s=t.top+t.height/2-e.height/2,c=t.left-e.width-o,s<t.top&&(s=t.top);break;case"left-end":s=t.top+t.height/2-e.height/2,c=t.left-e.width-o,s+e.height>t.bottom&&(s=t.bottom-e.height);break;case"right":s=t.top+(t.height-e.height)/2+r,c=t.right+o;break;case"right-start":s=t.top+t.height/2-e.height/2,c=t.right+o,s<t.top&&(s=t.top);break;case"right-end":s=t.top+t.height/2-e.height/2,c=t.right+o,s+e.height>t.bottom&&(s=t.bottom-e.height);break}return{top:s,left:c}},h=(t,a)=>t>=0&&a>=0&&t+e.height<=n&&a+e.width<=c;let b=a,l=i(b);if(!h(l.top,l.left)){["top","top-start","top-end"].includes(a)?b="bottom":["bottom","bottom-start","bottom-end"].includes(a)?b="top":["right","right-start","right-end"].includes(a)?b="left":["left","left-start","left-end"].includes(a)&&(b="right"),l=i(b);const t=i("left"),e=i("bottom"),o=i("top");if(h(t.top,t.left)||h(e.top,e.left)||h(o.top,o.left)){const t=i("right");h(t.top,t.left)||h(e.top,e.left)||h(o.top,o.left)||(b="left",l=i(b))}else b="right",l=i(b)}return l.left<0?l.left=5:l.left+e.width>c&&(l.left=c-e.width-5),l.top<0?l.top=5:l.top+e.height>n&&(l.top=n-e.height-5),{...l,placement:b}}function a({placement:t,tooltipRect:e,triggerRect:a,caretSize:o,left:r,top:s}){const c=a.left+a.width/2,n=a.top+a.height/2,[i,h]=t.split("-");let b=0,l=0;switch(i){case"top":l=e.height-o,b=c-r-o,"top-end"===t||"start"===h?b=c-r-o:"end"===h&&(b=e.width-2*o+8),b=Math.max(o,Math.min(b,e.width-2*o));break;case"bottom":l=-o,b=c-r-o;break;case"left":if(b=e.width-o,"start"===h){const t=n-s-o,e=a.top-s;l=Math.max(t,e)}else if("end"===h){const t=n-s-o,e=a.bottom-s-2*o;l=Math.min(t,e)}else l=n-s-o;l=Math.max(o,Math.min(l,e.height-2*o));break;case"right":if(b=-o,"start"===h){const t=n-s-o,e=a.top-s;l=Math.max(t,e)}else if("end"===h){const t=n-s-o,e=a.bottom-s-2*o;l=Math.min(t,e)}else l=n-s-o;l=Math.max(o,Math.min(l,e.height-2*o));break;default:b=e.width/2-o,l=e.height/2-o}return{caretLeft:b,caretTop:l}}export{a,e as g,t as i};
@@ -1,2 +0,0 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["../fixture-d5b55278.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-tooltip.cjs.js","tslib","lit/decorators.js","./nile-tooltip.css.cjs.js","../internal/nile-element.cjs.js","./nile-tooltip-utils.cjs.js"],function(_export,_context){"use strict";var t,o,i,e,n,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_templateObject12,_templateObject13;function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}return{setters:[function(_fixture001CjsJs){t=_fixture001CjsJs.f;o=_fixture001CjsJs.h;i=_fixture001CjsJs.w;e=_fixture001CjsJs.o;},function(_litStaticHtmlJs){n=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileTooltipCjsJs){},function(_tslib){},function(_litDecoratorsJs){},function(_nileTooltipCssCjsJs){},function(_internalNileElementCjsJs){},function(_nileTooltipUtilsCjsJs){}],execute:function execute(){describe("NileTooltip",function(){it("renders with default properties",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var i;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return t(n(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-tooltip content=\"Hello\"><button>Hover me</button></nile-tooltip>"]))));case 2:i=_context2.sent;o.equal(i.content,"Hello"),o.equal(i.placement,"top"),o.equal(i.disabled,!1),o.equal(i.open,!1);case 4:case"end":return _context2.stop();}},_callee);}))),it("renders text content when no slot is used",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var i;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return t(n(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-tooltip content=\"Fallback\"><button>Trigger</button></nile-tooltip>"]))));case 2:i=_context3.sent.shadowRoot.querySelector(".tooltip-content");o.include(i.textContent,"Fallback");case 4:case"end":return _context3.stop();}},_callee2);}))),it("uses slotted content when provided",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _i$0$textContent;var i;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return t(n(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-tooltip>\n <div slot=\"content\">Slot Content</div>\n <button>Trigger</button>\n </nile-tooltip>\n "]))));case 2:i=_context4.sent.shadowRoot.querySelector('slot[name="content"]').assignedNodes({flatten:!0});o.isAbove(i.length,0),o.include((_i$0$textContent=i[0].textContent)!==null&&_i$0$textContent!==void 0?_i$0$textContent:"","Slot Content");case 4:case"end":return _context4.stop();}},_callee3);}))),it('shows tooltip on hover when trigger includes "hover"',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var e;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return t(n(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-tooltip content=\"Tooltip\" trigger=\"hover\">\n <button>Hover me</button>\n </nile-tooltip>\n "]))));case 2:e=_context5.sent;e.shadowRoot.querySelector(".trigger-container").dispatchEvent(new Event("mouseover",{bubbles:!0}));_context5.next=6;return i(function(){return!0===e.open;});case 6:o.isTrue(e.open);case 7:case"end":return _context5.stop();}},_callee4);}))),it('hides tooltip on mouseout when trigger includes "hover"',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var o,e;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return t(n(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-tooltip content=\"Tooltip\" trigger=\"hover\">\n <button>Hover me</button>\n </nile-tooltip>\n "]))));case 2:o=_context6.sent;e=o.shadowRoot.querySelector(".trigger-container");e.dispatchEvent(new Event("mouseover",{bubbles:!0}));_context6.next=7;return i(function(){return!0===o.open;});case 7:e.dispatchEvent(new Event("mouseout",{bubbles:!0}));_context6.next=10;return i(function(){return!1===o.open;});case 10:case"end":return _context6.stop();}},_callee5);}))),it('toggles tooltip on click when trigger includes "click"',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var o,e;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return t(n(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <nile-tooltip content=\"Click me\" trigger=\"click\">\n <button>Click</button>\n </nile-tooltip>\n "]))));case 2:o=_context7.sent;e=o.shadowRoot.querySelector(".trigger-container");e.click();_context7.next=7;return i(function(){return!0===o.open;});case 7:e.click();_context7.next=10;return i(function(){return!1===o.open;});case 10:case"end":return _context7.stop();}},_callee6);}))),it('shows and hides tooltip on focus/blur when trigger includes "focus"',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var o,e;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return t(n(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <nile-tooltip content=\"Focus\" trigger=\"focus\">\n <button>Focus</button>\n </nile-tooltip>\n "]))));case 2:o=_context8.sent;e=o.shadowRoot.querySelector(".trigger-container");e.dispatchEvent(new Event("focusin"));_context8.next=7;return i(function(){return!0===o.open;});case 7:e.dispatchEvent(new Event("focusout"));_context8.next=10;return i(function(){return!1===o.open;});case 10:case"end":return _context8.stop();}},_callee7);}))),it("does not show tooltip when disabled",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var i;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return t(n(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n <nile-tooltip content=\"Disabled\" disabled trigger=\"hover\">\n <button>Hover me</button>\n </nile-tooltip>\n "]))));case 2:i=_context9.sent;i.shadowRoot.querySelector(".trigger-container").dispatchEvent(new Event("mouseover"));_context9.next=6;return new Promise(function(t){return setTimeout(t,200);});case 6:o.isFalse(i.open);case 7:case"end":return _context9.stop();}},_callee8);}))),it("emits nile-show and nile-after-show events",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(){var i,l,s,a;return _regeneratorRuntime().wrap(function _callee9$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:_context10.next=2;return t(n(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["\n <nile-tooltip content=\"Event test\" trigger=\"click\">\n <button>Click</button>\n </nile-tooltip>\n "]))));case 2:i=_context10.sent;l=i.shadowRoot.querySelector(".trigger-container");setTimeout(function(){return l.click();});_context10.next=7;return e(i,"nile-show");case 7:s=_context10.sent;o.ok(s);_context10.next=11;return e(i,"nile-after-show");case 11:a=_context10.sent;o.ok(a);case 13:case"end":return _context10.stop();}},_callee9);}))),it("emits nile-hide and nile-after-hide events",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(){var l,s,a,c;return _regeneratorRuntime().wrap(function _callee10$(_context11){while(1)switch(_context11.prev=_context11.next){case 0:_context11.next=2;return t(n(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["\n <nile-tooltip content=\"Event test\" trigger=\"click\">\n <button>Click</button>\n </nile-tooltip>\n "]))));case 2:l=_context11.sent;s=l.shadowRoot.querySelector(".trigger-container");s.click();_context11.next=7;return i(function(){return!0===l.open;});case 7:setTimeout(function(){return s.click();});_context11.next=10;return e(l,"nile-hide");case 10:a=_context11.sent;o.ok(a);_context11.next=14;return e(l,"nile-after-hide");case 14:c=_context11.sent;o.ok(c);case 16:case"end":return _context11.stop();}},_callee10);}))),it('defaults to "bottom" placement when given invalid value',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(){var i;return _regeneratorRuntime().wrap(function _callee11$(_context12){while(1)switch(_context12.prev=_context12.next){case 0:_context12.next=2;return t(n(_templateObject11||(_templateObject11=_taggedTemplateLiteral(["\n <nile-tooltip content=\"Fallback\" placement="," >\n <button>Trigger</button>\n </nile-tooltip>\n "])),"invalid"));case 2:i=_context12.sent;_context12.next=5;return i.updateComplete;case 5:o.equal(i.placement,"top");case 6:case"end":return _context12.stop();}},_callee11);}))),it("updates hasTooltipSlot on slot change",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(){var i,e,l;return _regeneratorRuntime().wrap(function _callee12$(_context13){while(1)switch(_context13.prev=_context13.next){case 0:_context13.next=2;return t(n(_templateObject12||(_templateObject12=_taggedTemplateLiteral(["\n <nile-tooltip>\n <div slot=\"content\">Initial slot</div>\n <button>Trigger</button>\n </nile-tooltip>\n "]))));case 2:i=_context13.sent;e=i.shadowRoot.querySelector('slot[name="content"]');l=document.createElement("div");l.slot="content";l.textContent="Updated slot";i.appendChild(l);e.dispatchEvent(new Event("slotchange"));_context13.next=11;return i.updateComplete;case 11:o.isTrue(i.hasTooltipSlot);case 12:case"end":return _context13.stop();}},_callee12);}))),it("respects hoist attribute",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee13(){var i;return _regeneratorRuntime().wrap(function _callee13$(_context14){while(1)switch(_context14.prev=_context14.next){case 0:_context14.next=2;return t(n(_templateObject13||(_templateObject13=_taggedTemplateLiteral(["\n <nile-tooltip hoist content=\"Hoisted\">\n <button>Hoist</button>\n </nile-tooltip>\n "]))));case 2:i=_context14.sent;o.isTrue(i.hoist);case 4:case"end":return _context14.stop();}},_callee13);})));});}};});
2
- //# sourceMappingURL=nile-tooltip.test.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"nile-tooltip.test.cjs.js","sources":["../../../src/nile-tooltip/nile-tooltip.test.ts"],"sourcesContent":["import { fixture, html, assert, oneEvent, waitUntil } from '@open-wc/testing';\nimport './nile-tooltip';\nimport { NileTooltip } from './nile-tooltip';\n\ndescribe('NileTooltip', () => {\n\n it('renders with default properties', async () => {\n const el = await fixture<NileTooltip>(html`<nile-tooltip content=\"Hello\"><button>Hover me</button></nile-tooltip>`);\n assert.equal(el.content, 'Hello');\n assert.equal(el.placement, 'top');\n assert.equal(el.disabled, false);\n assert.equal(el.open, false);\n });\n\n it('renders text content when no slot is used', async () => {\n const el = await fixture<NileTooltip>(html`<nile-tooltip content=\"Fallback\"><button>Trigger</button></nile-tooltip>`);\n const content = el.shadowRoot!.querySelector('.tooltip-content')!;\n assert.include(content.textContent!, 'Fallback');\n });\n\n it('uses slotted content when provided', async () => {\n const el = await fixture<NileTooltip>(html`\n <nile-tooltip>\n <div slot=\"content\">Slot Content</div>\n <button>Trigger</button>\n </nile-tooltip>\n `);\n\n const slot = el.shadowRoot!.querySelector('slot[name=\"content\"]') as HTMLSlotElement;\n const assigned = slot.assignedNodes({ flatten: true });\n assert.isAbove(assigned.length, 0);\n assert.include(assigned[0].textContent ?? '', 'Slot Content');\n });\n\n it('shows tooltip on hover when trigger includes \"hover\"', async () => {\n const el = await fixture<NileTooltip>(html`\n <nile-tooltip content=\"Tooltip\" trigger=\"hover\">\n <button>Hover me</button>\n </nile-tooltip>\n `);\n const trigger = el.shadowRoot!.querySelector('.trigger-container')!;\n trigger.dispatchEvent(new Event('mouseover', { bubbles: true }));\n await waitUntil(() => el.open === true);\n assert.isTrue(el.open);\n });\n\n it('hides tooltip on mouseout when trigger includes \"hover\"', async () => {\n const el = await fixture<NileTooltip>(html`\n <nile-tooltip content=\"Tooltip\" trigger=\"hover\">\n <button>Hover me</button>\n </nile-tooltip>\n `);\n const trigger = el.shadowRoot!.querySelector('.trigger-container')!;\n trigger.dispatchEvent(new Event('mouseover', { bubbles: true }));\n await waitUntil(() => el.open === true);\n trigger.dispatchEvent(new Event('mouseout', { bubbles: true }));\n await waitUntil(() => el.open === false);\n });\n\n it('toggles tooltip on click when trigger includes \"click\"', async () => {\n const el = await fixture<NileTooltip>(html`\n <nile-tooltip content=\"Click me\" trigger=\"click\">\n <button>Click</button>\n </nile-tooltip>\n `);\n const trigger = el.shadowRoot!.querySelector('.trigger-container') as HTMLElement;\n trigger.click();\n await waitUntil(() => el.open === true);\n trigger.click();\n await waitUntil(() => el.open === false);\n });\n\n it('shows and hides tooltip on focus/blur when trigger includes \"focus\"', async () => {\n const el = await fixture<NileTooltip>(html`\n <nile-tooltip content=\"Focus\" trigger=\"focus\">\n <button>Focus</button>\n </nile-tooltip>\n `);\n const trigger = el.shadowRoot!.querySelector('.trigger-container')!;\n trigger.dispatchEvent(new Event('focusin'));\n await waitUntil(() => el.open === true);\n trigger.dispatchEvent(new Event('focusout'));\n await waitUntil(() => el.open === false);\n });\n\n it('does not show tooltip when disabled', async () => {\n const el = await fixture<NileTooltip>(html`\n <nile-tooltip content=\"Disabled\" disabled trigger=\"hover\">\n <button>Hover me</button>\n </nile-tooltip>\n `);\n const trigger = el.shadowRoot!.querySelector('.trigger-container')!;\n trigger.dispatchEvent(new Event('mouseover'));\n await new Promise(resolve => setTimeout(resolve, 200));\n assert.isFalse(el.open);\n });\n\n\n it('emits nile-show and nile-after-show events', async () => {\n const el = await fixture<NileTooltip>(html`\n <nile-tooltip content=\"Event test\" trigger=\"click\">\n <button>Click</button>\n </nile-tooltip>\n `);\n const trigger = el.shadowRoot!.querySelector('.trigger-container') as HTMLElement;\n setTimeout(() => trigger.click());\n const showEvent = await oneEvent(el, 'nile-show');\n assert.ok(showEvent);\n const afterShow = await oneEvent(el, 'nile-after-show');\n assert.ok(afterShow);\n });\n\n it('emits nile-hide and nile-after-hide events', async () => {\n const el = await fixture<NileTooltip>(html`\n <nile-tooltip content=\"Event test\" trigger=\"click\">\n <button>Click</button>\n </nile-tooltip>\n `);\n const trigger = el.shadowRoot!.querySelector('.trigger-container') as HTMLElement;\n trigger.click();\n await waitUntil(() => el.open === true);\n setTimeout(() => trigger.click());\n const hideEvent = await oneEvent(el, 'nile-hide');\n assert.ok(hideEvent);\n const afterHide = await oneEvent(el, 'nile-after-hide');\n assert.ok(afterHide);\n });\n\n it('defaults to \"bottom\" placement when given invalid value', async () => {\n const el = await fixture<NileTooltip>(html`\n <nile-tooltip content=\"Fallback\" placement=${'invalid' as unknown as NileTooltip['placement']} >\n <button>Trigger</button>\n </nile-tooltip>\n `);\n await el.updateComplete;\n assert.equal(el.placement, 'top');\n });\n\n\n it('updates hasTooltipSlot on slot change', async () => {\n const el = await fixture<NileTooltip>(html`\n <nile-tooltip>\n <div slot=\"content\">Initial slot</div>\n <button>Trigger</button>\n </nile-tooltip>\n `);\n\n const slot = el.shadowRoot!.querySelector('slot[name=\"content\"]') as HTMLSlotElement;\n const newSlotNode = document.createElement('div');\n newSlotNode.slot = 'content';\n newSlotNode.textContent = 'Updated slot';\n el.appendChild(newSlotNode);\n\n slot.dispatchEvent(new Event('slotchange'));\n await el.updateComplete;\n\n assert.isTrue((el as any).hasTooltipSlot);\n });\n\n it('respects hoist attribute', async () => {\n const el = await fixture<NileTooltip>(html`\n <nile-tooltip hoist content=\"Hoisted\">\n <button>Hoist</button>\n </nile-tooltip>\n `);\n assert.isTrue(el.hoist);\n });\n});\n"],"names":["describe","it","async","fixture","html","_templateObject","_taggedTemplateLiteral","el","assert","equal","content","placement","disabled","open","_context2","stop","_callee","_templateObject2","shadowRoot","querySelector","include","textContent","_context3","_callee2","_templateObject3","assigned","assignedNodes","flatten","isAbove","length","_i$0$textContent","_context4","_callee3","_asyncToGenerator","_regeneratorRuntime","mark","_templateObject4","dispatchEvent","Event","bubbles","waitUntil","isTrue","_context5","_callee4","_templateObject5","trigger","_context6","next","_callee5","_templateObject6","click","_context7","_callee6","_templateObject7","_context8","_callee7","_templateObject8","_context9","Promise","resolve","setTimeout","isFalse","_callee8","_templateObject9","_context10","oneEvent","showEvent","ok","afterShow","_callee9","_templateObject10","_context11","hideEvent","afterHide","_callee10","_templateObject11","updateComplete","_context12","_callee11","_templateObject12","slot","newSlotNode","document","createElement","appendChild","_context13","hasTooltipSlot","_callee12","_templateObject13","hoist","_context14","_callee13"],"mappings":"88SAIAA,QAAS,CAAA,aAAA,CAAe,UAEtBC,CAAAA,EAAAA,CAAG,iCAAmCC,cAAAA,iBAAAA,cAAAA,mBAAAA,GAAAA,IAAAA,CAAAA,SAAAA,QAAAA,MAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,SAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SAAAA,SAAAA,CAAAA,IAAAA,SACnBC,CAAAA,CAAAA,CAAqBC,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,gFAAA,CAAA,QAApCC,CAAWJ,CAAAA,SAAAA,CAAAA,IAAAA,CACjBK,EAAOC,KAAMF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AC,UAAA,CAAA3E,IAAA,MAAA4E,SAAA,GACvB,EAAA,CAAA,EAAA,CAAA,CAAA"}
@@ -1,47 +0,0 @@
1
- import{f as t,h as o,w as e,o as i}from"../fixture-df8b52d7.esm.js";import{html as n}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import"./nile-tooltip.esm.js";import"tslib";import"lit/decorators.js";import"./nile-tooltip.css.esm.js";import"../internal/nile-element.esm.js";import"./nile-tooltip-utils.esm.js";describe("NileTooltip",(()=>{it("renders with default properties",(async()=>{const e=await t(n`<nile-tooltip content="Hello"><button>Hover me</button></nile-tooltip>`);o.equal(e.content,"Hello"),o.equal(e.placement,"top"),o.equal(e.disabled,!1),o.equal(e.open,!1)})),it("renders text content when no slot is used",(async()=>{const e=(await t(n`<nile-tooltip content="Fallback"><button>Trigger</button></nile-tooltip>`)).shadowRoot.querySelector(".tooltip-content");o.include(e.textContent,"Fallback")})),it("uses slotted content when provided",(async()=>{const e=(await t(n`
2
- <nile-tooltip>
3
- <div slot="content">Slot Content</div>
4
- <button>Trigger</button>
5
- </nile-tooltip>
6
- `)).shadowRoot.querySelector('slot[name="content"]').assignedNodes({flatten:!0});o.isAbove(e.length,0),o.include(e[0].textContent??"","Slot Content")})),it('shows tooltip on hover when trigger includes "hover"',(async()=>{const i=await t(n`
7
- <nile-tooltip content="Tooltip" trigger="hover">
8
- <button>Hover me</button>
9
- </nile-tooltip>
10
- `);i.shadowRoot.querySelector(".trigger-container").dispatchEvent(new Event("mouseover",{bubbles:!0})),await e((()=>!0===i.open)),o.isTrue(i.open)})),it('hides tooltip on mouseout when trigger includes "hover"',(async()=>{const o=await t(n`
11
- <nile-tooltip content="Tooltip" trigger="hover">
12
- <button>Hover me</button>
13
- </nile-tooltip>
14
- `),i=o.shadowRoot.querySelector(".trigger-container");i.dispatchEvent(new Event("mouseover",{bubbles:!0})),await e((()=>!0===o.open)),i.dispatchEvent(new Event("mouseout",{bubbles:!0})),await e((()=>!1===o.open))})),it('toggles tooltip on click when trigger includes "click"',(async()=>{const o=await t(n`
15
- <nile-tooltip content="Click me" trigger="click">
16
- <button>Click</button>
17
- </nile-tooltip>
18
- `),i=o.shadowRoot.querySelector(".trigger-container");i.click(),await e((()=>!0===o.open)),i.click(),await e((()=>!1===o.open))})),it('shows and hides tooltip on focus/blur when trigger includes "focus"',(async()=>{const o=await t(n`
19
- <nile-tooltip content="Focus" trigger="focus">
20
- <button>Focus</button>
21
- </nile-tooltip>
22
- `),i=o.shadowRoot.querySelector(".trigger-container");i.dispatchEvent(new Event("focusin")),await e((()=>!0===o.open)),i.dispatchEvent(new Event("focusout")),await e((()=>!1===o.open))})),it("does not show tooltip when disabled",(async()=>{const e=await t(n`
23
- <nile-tooltip content="Disabled" disabled trigger="hover">
24
- <button>Hover me</button>
25
- </nile-tooltip>
26
- `);e.shadowRoot.querySelector(".trigger-container").dispatchEvent(new Event("mouseover")),await new Promise((t=>setTimeout(t,200))),o.isFalse(e.open)})),it("emits nile-show and nile-after-show events",(async()=>{const e=await t(n`
27
- <nile-tooltip content="Event test" trigger="click">
28
- <button>Click</button>
29
- </nile-tooltip>
30
- `),l=e.shadowRoot.querySelector(".trigger-container");setTimeout((()=>l.click()));const s=await i(e,"nile-show");o.ok(s);const a=await i(e,"nile-after-show");o.ok(a)})),it("emits nile-hide and nile-after-hide events",(async()=>{const l=await t(n`
31
- <nile-tooltip content="Event test" trigger="click">
32
- <button>Click</button>
33
- </nile-tooltip>
34
- `),s=l.shadowRoot.querySelector(".trigger-container");s.click(),await e((()=>!0===l.open)),setTimeout((()=>s.click()));const a=await i(l,"nile-hide");o.ok(a);const r=await i(l,"nile-after-hide");o.ok(r)})),it('defaults to "bottom" placement when given invalid value',(async()=>{const e=await t(n`
35
- <nile-tooltip content="Fallback" placement=${"invalid"} >
36
- <button>Trigger</button>
37
- </nile-tooltip>
38
- `);await e.updateComplete,o.equal(e.placement,"top")})),it("updates hasTooltipSlot on slot change",(async()=>{const e=await t(n`
39
- <nile-tooltip>
40
- <div slot="content">Initial slot</div>
41
- <button>Trigger</button>
42
- </nile-tooltip>
43
- `),i=e.shadowRoot.querySelector('slot[name="content"]'),l=document.createElement("div");l.slot="content",l.textContent="Updated slot",e.appendChild(l),i.dispatchEvent(new Event("slotchange")),await e.updateComplete,o.isTrue(e.hasTooltipSlot)})),it("respects hoist attribute",(async()=>{const e=await t(n`
44
- <nile-tooltip hoist content="Hoisted">
45
- <button>Hoist</button>
46
- </nile-tooltip>
47
- `);o.isTrue(e.hoist)}))}));
@@ -1 +0,0 @@
1
- export { NileFilterChip } from './nile-filter-chip';
@@ -1,2 +0,0 @@
1
- export { NileFilterChip } from './nile-filter-chip';
2
- //# sourceMappingURL=index.js.map