@aquera/nile-elements 0.1.36-beta-1.2 → 0.1.36-beta-1.4

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 (234) hide show
  1. package/README.md +12 -72
  2. package/demo/index.css +4 -7
  3. package/demo/index.html +38 -20
  4. package/demo/variables.css +0 -13
  5. package/demo/variables_v2.css +0 -13
  6. package/dist/fixture-178ed8d2.esm.js +569 -0
  7. package/dist/{fixture-d5b55278.cjs.js → fixture-bb486165.cjs.js} +2 -2
  8. package/dist/{fixture-d5b55278.cjs.js.map → fixture-bb486165.cjs.js.map} +1 -1
  9. package/dist/{fixture-df8b52d7.esm.js → fixture-c4e75e04.esm.js} +1 -1
  10. package/dist/fixture-d7bf42eb.cjs.js +395 -0
  11. package/dist/fixture-d7bf42eb.cjs.js.map +1 -0
  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/nile-accordion/nile-accordian.test.cjs.js +1 -1
  18. package/dist/nile-accordion/nile-accordian.test.esm.js +1 -1
  19. package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js +1 -1
  20. package/dist/nile-auto-complete/nile-auto-complete.test.esm.js +1 -1
  21. package/dist/nile-avatar/nile-avatar.test.cjs.js +1 -1
  22. package/dist/nile-avatar/nile-avatar.test.esm.js +1 -1
  23. package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
  24. package/dist/nile-badge/nile-badge.test.esm.js +1 -1
  25. package/dist/nile-button/nile-button.test.cjs.js +1 -1
  26. package/dist/nile-button/nile-button.test.esm.js +1 -1
  27. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js +1 -1
  28. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.esm.js +1 -1
  29. package/dist/nile-calendar/nile-calendar.test.cjs.js +1 -1
  30. package/dist/nile-calendar/nile-calendar.test.esm.js +1 -1
  31. package/dist/nile-card/nile-card.test.cjs.js +1 -1
  32. package/dist/nile-card/nile-card.test.esm.js +1 -1
  33. package/dist/nile-checkbox/nile-checkbox.test.cjs.js +1 -1
  34. package/dist/nile-checkbox/nile-checkbox.test.esm.js +1 -1
  35. package/dist/nile-chip/nile-chip.cjs.js +1 -1
  36. package/dist/nile-chip/nile-chip.cjs.js.map +1 -1
  37. package/dist/nile-chip/nile-chip.esm.js +8 -17
  38. package/dist/nile-chip/nile-chip.test.cjs.js +1 -1
  39. package/dist/nile-chip/nile-chip.test.esm.js +1 -1
  40. package/dist/nile-dialog/nile-dialog.test.cjs.js +1 -1
  41. package/dist/nile-dialog/nile-dialog.test.esm.js +1 -1
  42. package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
  43. package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
  44. package/dist/nile-dropdown/nile-dropdown.test.cjs.js +1 -1
  45. package/dist/nile-dropdown/nile-dropdown.test.esm.js +1 -1
  46. package/dist/nile-empty-state/nile-empty-state.test.cjs.js +1 -1
  47. package/dist/nile-empty-state/nile-empty-state.test.esm.js +1 -1
  48. package/dist/nile-error-message/nile-error-message.cjs.js +1 -1
  49. package/dist/nile-error-message/nile-error-message.cjs.js.map +1 -1
  50. package/dist/nile-error-message/nile-error-message.css.cjs.js +1 -1
  51. package/dist/nile-error-message/nile-error-message.css.cjs.js.map +1 -1
  52. package/dist/nile-error-message/nile-error-message.css.esm.js +4 -6
  53. package/dist/nile-error-message/nile-error-message.esm.js +4 -4
  54. package/dist/nile-error-message/nile-error-message.test.cjs.js +1 -1
  55. package/dist/nile-error-message/nile-error-message.test.esm.js +1 -1
  56. package/dist/nile-error-notification/nile-error-notification.css.cjs.js +1 -1
  57. package/dist/nile-error-notification/nile-error-notification.css.cjs.js.map +1 -1
  58. package/dist/nile-error-notification/nile-error-notification.css.esm.js +1 -1
  59. package/dist/nile-filter-chip/nile-filter-chip.cjs.js +1 -1
  60. package/dist/nile-filter-chip/nile-filter-chip.cjs.js.map +1 -1
  61. package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js +1 -1
  62. package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js.map +1 -1
  63. package/dist/nile-filter-chip/nile-filter-chip.css.esm.js +17 -40
  64. package/dist/nile-filter-chip/nile-filter-chip.esm.js +8 -17
  65. package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js +1 -1
  66. package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js.map +1 -1
  67. package/dist/nile-filter-chip/nile-filter-chip.test.esm.js +12 -12
  68. package/dist/nile-form-group/nile-form-group.test.cjs.js +1 -1
  69. package/dist/nile-form-group/nile-form-group.test.esm.js +1 -1
  70. package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js +1 -1
  71. package/dist/nile-form-help-text/nile-form-help-text.test.esm.js +1 -1
  72. package/dist/nile-hero/nile-hero.test.cjs.js +1 -1
  73. package/dist/nile-hero/nile-hero.test.esm.js +1 -1
  74. package/dist/nile-icon/icons/svg/accessreview.cjs.js +1 -1
  75. package/dist/nile-icon/icons/svg/accessreview.cjs.js.map +1 -1
  76. package/dist/nile-icon/icons/svg/accessreview.esm.js +1 -1
  77. package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
  78. package/dist/nile-icon/nile-icon.test.esm.js +1 -1
  79. package/dist/nile-input/nile-input.test.cjs.js +1 -1
  80. package/dist/nile-input/nile-input.test.esm.js +1 -1
  81. package/dist/nile-link/nile-link.test.cjs.js +1 -1
  82. package/dist/nile-link/nile-link.test.esm.js +1 -1
  83. package/dist/nile-loader/nile-loader.test.cjs.js +1 -1
  84. package/dist/nile-loader/nile-loader.test.esm.js +1 -1
  85. package/dist/nile-popover/nile-popover.test.cjs.js +1 -1
  86. package/dist/nile-popover/nile-popover.test.esm.js +1 -1
  87. package/dist/nile-popup/nile-popup.test.cjs.js +1 -1
  88. package/dist/nile-popup/nile-popup.test.esm.js +1 -1
  89. package/dist/nile-progress-bar/nile-progress-bar.css.cjs.js +1 -1
  90. package/dist/nile-progress-bar/nile-progress-bar.css.cjs.js.map +1 -1
  91. package/dist/nile-progress-bar/nile-progress-bar.css.esm.js +0 -1
  92. package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js +1 -1
  93. package/dist/nile-progress-bar/nile-progress-bar.test.esm.js +1 -1
  94. package/dist/nile-radio/nile-radio.test.cjs.js +1 -1
  95. package/dist/nile-radio/nile-radio.test.esm.js +1 -1
  96. package/dist/nile-radio-group/nile-radio-group.test.cjs.js +1 -1
  97. package/dist/nile-radio-group/nile-radio-group.test.esm.js +1 -1
  98. package/dist/nile-select/nile-select.cjs.js +1 -1
  99. package/dist/nile-select/nile-select.cjs.js.map +1 -1
  100. package/dist/nile-select/nile-select.esm.js +1 -1
  101. package/dist/nile-select/nile-select.test.cjs.js +1 -1
  102. package/dist/nile-select/nile-select.test.esm.js +1 -1
  103. package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +1 -1
  104. package/dist/nile-slide-toggle/nile-slide-toggle.test.esm.js +1 -1
  105. package/dist/nile-tab-group/nile-tab-group.test.cjs.js +1 -1
  106. package/dist/nile-tab-group/nile-tab-group.test.esm.js +1 -1
  107. package/dist/nile-table/nile-table.cjs.js.map +1 -1
  108. package/dist/nile-textarea/nile-textarea.test.cjs.js +1 -1
  109. package/dist/nile-textarea/nile-textarea.test.esm.js +1 -1
  110. package/dist/nile-tooltip/index.cjs.js +1 -1
  111. package/dist/nile-tooltip/index.esm.js +1 -1
  112. package/dist/nile-tooltip/nile-tooltip.cjs.js +1 -1
  113. package/dist/nile-tooltip/nile-tooltip.cjs.js.map +1 -1
  114. package/dist/nile-tooltip/nile-tooltip.css.cjs.js +1 -1
  115. package/dist/nile-tooltip/nile-tooltip.css.cjs.js.map +1 -1
  116. package/dist/nile-tooltip/nile-tooltip.css.esm.js +45 -78
  117. package/dist/nile-tooltip/nile-tooltip.esm.js +28 -23
  118. package/dist/nile-tooltip/nile-tooltip.test.cjs.js +1 -1
  119. package/dist/nile-tooltip/nile-tooltip.test.esm.js +1 -1
  120. package/dist/src/index.d.ts +0 -1
  121. package/dist/src/index.js +0 -1
  122. package/dist/src/index.js.map +1 -1
  123. package/dist/src/nile-chip/nile-chip.js +0 -9
  124. package/dist/src/nile-chip/nile-chip.js.map +1 -1
  125. package/dist/src/nile-error-message/nile-error-message.css.js +4 -6
  126. package/dist/src/nile-error-message/nile-error-message.css.js.map +1 -1
  127. package/dist/src/nile-error-message/nile-error-message.d.ts +0 -4
  128. package/dist/src/nile-error-message/nile-error-message.js +0 -20
  129. package/dist/src/nile-error-message/nile-error-message.js.map +1 -1
  130. package/dist/src/nile-error-notification/nile-error-notification.css.js +1 -1
  131. package/dist/src/nile-error-notification/nile-error-notification.css.js.map +1 -1
  132. package/dist/src/nile-filter-chip/nile-filter-chip.css.js +17 -40
  133. package/dist/src/nile-filter-chip/nile-filter-chip.css.js.map +1 -1
  134. package/dist/src/nile-filter-chip/nile-filter-chip.d.ts +2 -3
  135. package/dist/src/nile-filter-chip/nile-filter-chip.js +10 -23
  136. package/dist/src/nile-filter-chip/nile-filter-chip.js.map +1 -1
  137. package/dist/src/nile-filter-chip/nile-filter-chip.test.js +7 -7
  138. package/dist/src/nile-filter-chip/nile-filter-chip.test.js.map +1 -1
  139. package/dist/src/nile-icon/icons/svg/accessreview.d.ts +1 -1
  140. package/dist/src/nile-icon/icons/svg/accessreview.js +1 -1
  141. package/dist/src/nile-icon/icons/svg/accessreview.js.map +1 -1
  142. package/dist/src/nile-new-error/index.d.ts +1 -0
  143. package/dist/src/nile-new-error/index.js +2 -0
  144. package/dist/src/nile-new-error/index.js.map +1 -0
  145. package/dist/src/nile-new-error/nile-new-error.css.d.ts +12 -0
  146. package/dist/src/nile-new-error/nile-new-error.css.js +38 -0
  147. package/dist/src/nile-new-error/nile-new-error.css.js.map +1 -0
  148. package/dist/src/nile-new-error/nile-new-error.d.ts +36 -0
  149. package/dist/src/nile-new-error/nile-new-error.js +74 -0
  150. package/dist/src/nile-new-error/nile-new-error.js.map +1 -0
  151. package/dist/src/nile-progress-bar/nile-progress-bar.css.js +0 -1
  152. package/dist/src/nile-progress-bar/nile-progress-bar.css.js.map +1 -1
  153. package/dist/src/nile-select/nile-select.js +1 -1
  154. package/dist/src/nile-select/nile-select.js.map +1 -1
  155. package/dist/src/nile-table/nile-table.js.map +1 -1
  156. package/dist/src/nile-tooltip/nile-tooltip.css.js +43 -76
  157. package/dist/src/nile-tooltip/nile-tooltip.css.js.map +1 -1
  158. package/dist/src/nile-tooltip/nile-tooltip.d.ts +46 -24
  159. package/dist/src/nile-tooltip/nile-tooltip.js +232 -235
  160. package/dist/src/nile-tooltip/nile-tooltip.js.map +1 -1
  161. package/dist/src/nile-virtual-list/index.d.ts +1 -0
  162. package/dist/src/nile-virtual-list/index.js +2 -0
  163. package/dist/src/nile-virtual-list/index.js.map +1 -0
  164. package/dist/src/nile-virtual-list/nile-virtual-list.css.d.ts +12 -0
  165. package/dist/src/nile-virtual-list/nile-virtual-list.css.js +25 -0
  166. package/dist/src/nile-virtual-list/nile-virtual-list.css.js.map +1 -0
  167. package/dist/src/nile-virtual-list/nile-virtual-list.d.ts +28 -0
  168. package/dist/src/nile-virtual-list/nile-virtual-list.js +69 -0
  169. package/dist/src/nile-virtual-list/nile-virtual-list.js.map +1 -0
  170. package/dist/src/nile-virtual-scroll/index.d.ts +1 -0
  171. package/dist/src/nile-virtual-scroll/index.js +2 -0
  172. package/dist/src/nile-virtual-scroll/index.js.map +1 -0
  173. package/dist/src/nile-virtual-scroll/nile-virtual-scroll.css.d.ts +12 -0
  174. package/dist/src/nile-virtual-scroll/nile-virtual-scroll.css.js +17 -0
  175. package/dist/src/nile-virtual-scroll/nile-virtual-scroll.css.js.map +1 -0
  176. package/dist/src/nile-virtual-scroll/nile-virtual-scroll.d.ts +54 -0
  177. package/dist/src/nile-virtual-scroll/nile-virtual-scroll.js +196 -0
  178. package/dist/src/nile-virtual-scroll/nile-virtual-scroll.js.map +1 -0
  179. package/dist/src/nile-virtual-scroll/nile-virtual-scroll.utils.d.ts +23 -0
  180. package/dist/src/nile-virtual-scroll/nile-virtual-scroll.utils.js +48 -0
  181. package/dist/src/nile-virtual-scroll/nile-virtual-scroll.utils.js.map +1 -0
  182. package/dist/src/nile-virtual-select/event-handlers.d.ts +19 -0
  183. package/dist/src/nile-virtual-select/event-handlers.js +153 -0
  184. package/dist/src/nile-virtual-select/event-handlers.js.map +1 -0
  185. package/dist/src/nile-virtual-select/index.d.ts +1 -0
  186. package/dist/src/nile-virtual-select/index.js +2 -0
  187. package/dist/src/nile-virtual-select/index.js.map +1 -0
  188. package/dist/src/nile-virtual-select/models.d.ts +33 -0
  189. package/dist/src/nile-virtual-select/models.js +5 -0
  190. package/dist/src/nile-virtual-select/models.js.map +1 -0
  191. package/dist/src/nile-virtual-select/nile-virtual-select.css.d.ts +12 -0
  192. package/dist/src/nile-virtual-select/nile-virtual-select.css.js +463 -0
  193. package/dist/src/nile-virtual-select/nile-virtual-select.css.js.map +1 -0
  194. package/dist/src/nile-virtual-select/nile-virtual-select.d.ts +239 -0
  195. package/dist/src/nile-virtual-select/nile-virtual-select.js +1287 -0
  196. package/dist/src/nile-virtual-select/nile-virtual-select.js.map +1 -0
  197. package/dist/src/nile-virtual-select/nile-virtual-select.test.js +2 -0
  198. package/dist/src/nile-virtual-select/nile-virtual-select.test.js.map +1 -0
  199. package/dist/src/nile-virtual-select/nile-virtual-select.utils.d.ts +0 -0
  200. package/dist/src/nile-virtual-select/nile-virtual-select.utils.js +2 -0
  201. package/dist/src/nile-virtual-select/nile-virtual-select.utils.js.map +1 -0
  202. package/dist/src/nile-virtual-select/option-utils.d.ts +15 -0
  203. package/dist/src/nile-virtual-select/option-utils.js +59 -0
  204. package/dist/src/nile-virtual-select/option-utils.js.map +1 -0
  205. package/dist/tsconfig.tsbuildinfo +1 -1
  206. package/package.json +2 -2
  207. package/plop-templates/lit/index.ts.hbs +1 -1
  208. package/plop-templates/lit/lit.css.ts.hbs +1 -1
  209. package/plop-templates/lit/lit.ts.hbs +3 -7
  210. package/plopfile.js +1 -32
  211. package/src/index.ts +1 -2
  212. package/src/nile-chip/nile-chip.ts +0 -9
  213. package/src/nile-error-message/nile-error-message.css.ts +4 -6
  214. package/src/nile-error-message/nile-error-message.ts +0 -18
  215. package/src/nile-error-notification/nile-error-notification.css.ts +1 -1
  216. package/src/nile-icon/icons/svg/accessreview.ts +1 -1
  217. package/src/nile-progress-bar/nile-progress-bar.css.ts +0 -1
  218. package/src/nile-select/nile-select.ts +1 -1
  219. package/src/nile-table/nile-table.ts +2 -2
  220. package/src/nile-tooltip/nile-tooltip.css.ts +44 -77
  221. package/src/nile-tooltip/nile-tooltip.ts +230 -268
  222. package/vscode-html-custom-data.json +95 -144
  223. package/plop-templates/lit/lit.template.ts.hbs +0 -3
  224. package/plop-templates/lit/lit.test.ts.hbs +0 -38
  225. package/plop-templates/lit/sub-components/index.ts.hbs +0 -4
  226. package/plop-templates/lit/types/type.ts.hbs +0 -3
  227. package/plop-templates/lit/utils/lit.utils.ts.hbs +0 -4
  228. package/src/nile-filter-chip/index.ts +0 -1
  229. package/src/nile-filter-chip/nile-filter-chip.css.ts +0 -138
  230. package/src/nile-filter-chip/nile-filter-chip.test.ts +0 -92
  231. package/src/nile-filter-chip/nile-filter-chip.ts +0 -136
  232. package/src/nile-tooltip/nile-tooltip-utils.ts +0 -271
  233. package/src/nile-tooltip/nile-tooltip.test.ts +0 -168
  234. /package/{plop-templates/lit/types/index.ts.hbs → dist/src/nile-virtual-select/nile-virtual-select.test.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"nile-tooltip.css.js","sourceRoot":"","sources":["../../../src/nile-tooltip/nile-tooltip.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwFxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/**\n * Tooltip CSS\n */\nexport const styles = css`\n\n\n:host {\n position: relative;\n display: inline-block;\n }\n .tooltip {\n position: fixed;\n z-index: 1000;\n background-color: var(--nile-tooltip-color-background, #333);\n color: var(--nile-colors-white-base, #fff);\n padding: 6px 10px;\n border-radius: 4px;\n font-size: var(--nile-tooltip-font-size-sm, 14px);\n line-height: var(--nile-tooltip-line-height-sm, 1.5);\n opacity: 0;\n transition: opacity 0.2s, transform 0.2s;\n pointer-events: none;\n white-space: normal;\n visibility: hidden;\n overflow: visible;\n \n }\n :host([open]) .tooltip {\n opacity: 1;\n visibility: visible;\n pointer-events: auto;\n }\n .tooltip-content {\n overflow: auto;\n max-width: 250px;\n max-height: 116px;\n }\n .tooltip-caret {\n position: absolute;\n width: calc(2 * var(--caret-size, 6px));\n height: calc(2 * var(--caret-size, 6px));\n background-color: inherit;\n transform: rotate(45deg);\n z-index: -1;\n }\n .trigger-container {\n display: inline-block;\n }\n \n \n:host([open]) .tooltip {\n visibility: visible;\n pointer-events: auto;\n animation: fadeIn 150ms forwards;\n}\n\n \n.tooltip.hide {\n animation: fadeOut 100ms forwards;\n}\n\n \n@keyframes fadeIn {\n from {\n opacity: 0;\n transform: translateY(5px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n \n@keyframes fadeOut {\n from {\n opacity: 1;\n transform: translateY(0);\n }\n to {\n opacity: 0;\n transform: translateY(5px);\n }\n}\n\n\n\n\n\n\n \n`;\n\nexport default [styles];"]}
1
+ {"version":3,"file":"nile-tooltip.css.js","sourceRoot":"","sources":["../../../src/nile-tooltip/nile-tooltip.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuDxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/**\n * Tooltip CSS\n */\nexport const styles = css`\n :host {\n --max-width: 20rem;\n --hide-delay: 0ms;\n --show-delay: 150ms;\n\n display: contents;\n }\n\n .tooltip {\n --arrow-size: 6px;\n --arrow-color: var(--nile-tooltip-color-background);\n }\n\n .tooltip::part(popup) {\n pointer-events: none;\n z-index: 1000;\n }\n\n .tooltip[placement^='top']::part(popup) {\n transform-origin: bottom;\n }\n\n .tooltip[placement^='bottom']::part(popup) {\n transform-origin: top;\n }\n\n .tooltip[placement^='left']::part(popup) {\n transform-origin: right;\n }\n\n .tooltip[placement^='right']::part(popup) {\n transform-origin: left;\n }\n\n .tooltip__body {\n display: block;\n width: max-content;\n max-width: var(--max-width);\n border-radius: 4px;\n background-color: var(--nile-tooltip-color-background);\n font-size: var(--nile-tooltip-font-size-sm);\n font-weight: var(--nile-tooltip-font-weight-sm);\n line-height: var(--nile-tooltip-line-height-sm);\n padding: var(--nile-tooltip-padding-y) var(--nile-tooltip-padding-x);\n color: var(--nile-colors-white-base);\n pointer-events: none;\n word-break: break-word;\n }\n\n .tooltip__body--large {\n font-size: var(--nile-tooltip-font-size-lg);\n line-height: var(--nile-tooltip-line-height-lg);\n font-weight: var(--nile-tooltip-font-weight-lg);\n }\n`;\n\nexport default [styles];\n"]}
@@ -4,53 +4,75 @@
4
4
  * This source code is licensed under the BSD-3-Clause license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- import { CSSResultArray } from 'lit';
7
+ import { CSSResultArray, TemplateResult } from 'lit';
8
+ import '../nile-popup/nile-popup';
8
9
  import NileElement from '../internal/nile-element';
10
+ import type NilePopup from '../nile-popup/nile-popup';
9
11
  /**
10
- * Nile tooltip component.
12
+ * Nile icon component.
11
13
  *
12
14
  * @tag nile-tooltip
13
15
  *
14
16
  */
15
17
  export declare class NileTooltip extends NileElement {
18
+ /**
19
+ * The styles for Tooltip
20
+ * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
21
+ */
22
+ static get styles(): CSSResultArray;
23
+ private hoverTimeout;
24
+ defaultSlot: HTMLSlotElement;
25
+ body: HTMLElement;
26
+ popup: NilePopup;
27
+ /** The tooltip's content. If you need to display HTML, use the `content` slot instead. */
16
28
  content: string;
29
+ /** Size Property to decide the tool tip size */
30
+ size: 'small' | 'large';
31
+ /**
32
+ * The preferred placement of the tooltip. Note that the actual placement may vary as needed to keep the tooltip
33
+ * inside of the viewport.
34
+ */
17
35
  placement: 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
36
+ /** Disables the tooltip so it won't show when triggered. */
18
37
  disabled: boolean;
38
+ /** The distance in pixels from which to offset the tooltip away from its target. */
39
+ distance: number;
40
+ /** Indicates whether or not the tooltip is open. You can use this in lieu of the show/hide methods. */
19
41
  open: boolean;
42
+ /** The distance in pixels from which to offset the tooltip along its target. */
43
+ skidding: number;
20
44
  /**
21
45
  * Controls how the tooltip is activated. Possible options include `click`, `hover`, `focus`, and `manual`. Multiple
22
46
  * options can be passed by separating them with a space. When manual is used, the tooltip must be activated
23
47
  * programmatically.
24
48
  */
25
49
  trigger: string;
26
- distance: number;
27
- private readonly SHIFT_OFFSET;
28
- /** The distance in pixels from which to offset the tooltip along its target. */
29
- skidding: number;
50
+ /**
51
+ * Enable this option to prevent the tooltip from being clipped when the component is placed inside a container with
52
+ * `overflow: auto|hidden|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all,
53
+ * scenarios.
54
+ */
30
55
  hoist: boolean;
31
- tooltip: HTMLElement;
32
- triggerContainer: HTMLElement;
33
- caret: HTMLElement;
34
- tooltipSlot: HTMLSlotElement;
35
- private hasTooltipSlot;
36
- private hoverTimeout;
37
- private caretSize;
38
- private originalPlacement;
39
- static get styles(): CSSResultArray;
40
56
  connectedCallback(): void;
41
- updated(changedProps: Map<string, unknown>): void;
57
+ firstUpdated(): void;
42
58
  disconnectedCallback(): void;
43
- private handleTooltipSlotChange;
44
- private updateTooltipPosition;
45
- private showTooltip;
46
- private hideTooltip;
47
- private handleMouseOver;
48
- private handleMouseOut;
59
+ private handleBlur;
49
60
  private handleClick;
50
61
  private handleFocus;
51
- private handleBlur;
52
- render(): import("lit-html").TemplateResult<1>;
62
+ private handleKeyDown;
63
+ private handleMouseOver;
64
+ private handleMouseOut;
65
+ private hasTrigger;
66
+ handleOpenChange(): Promise<void>;
67
+ handleOptionsChange(): Promise<void>;
68
+ handleDisabledChange(): void;
69
+ /** Shows the tooltip. */
70
+ show(): Promise<void>;
71
+ /** Hides the tooltip */
72
+ hide(): Promise<void>;
73
+ render(): TemplateResult<1>;
53
74
  }
75
+ export default NileTooltip;
54
76
  declare global {
55
77
  interface HTMLElementTagNameMap {
56
78
  'nile-tooltip': NileTooltip;
@@ -1,17 +1,23 @@
1
- import { __decorate } from "tslib";
2
1
  /**
3
2
  * Copyright Aquera Inc 2023
4
3
  *
5
4
  * This source code is licensed under the BSD-3-Clause license found in the
6
5
  * LICENSE file in the root directory of this source tree.
7
6
  */
8
- import { html } from 'lit';
9
- import { customElement, property, query } from 'lit/decorators.js';
7
+ import { __decorate } from "tslib";
10
8
  import { styles } from './nile-tooltip.css';
9
+ import '../nile-popup/nile-popup';
10
+ import { animateTo, parseDuration, stopAnimations } from '../internal/animate';
11
+ import { classMap } from 'lit/directives/class-map.js';
12
+ import { customElement, property, query } from 'lit/decorators.js';
13
+ import { getAnimation, setDefaultAnimation, } from '../utilities/animation-registry';
14
+ import { html } from 'lit';
15
+ // import { LocalizeController } from '../utilities/localize';
16
+ import { waitForEvent } from '../internal/event';
17
+ import { watch } from '../internal/watch';
11
18
  import NileElement from '../internal/nile-element';
12
- import { isInViewport, getValidTooltipPosition, getCaretPosition } from './nile-tooltip-utils';
13
19
  /**
14
- * Nile tooltip component.
20
+ * Nile icon component.
15
21
  *
16
22
  * @tag nile-tooltip
17
23
  *
@@ -19,288 +25,279 @@ import { isInViewport, getValidTooltipPosition, getCaretPosition } from './nile-
19
25
  let NileTooltip = class NileTooltip extends NileElement {
20
26
  constructor() {
21
27
  super(...arguments);
28
+ /** The tooltip's content. If you need to display HTML, use the `content` slot instead. */
22
29
  this.content = '';
30
+ /** Size Property to decide the tool tip size */
31
+ this.size = 'small';
32
+ /**
33
+ * The preferred placement of the tooltip. Note that the actual placement may vary as needed to keep the tooltip
34
+ * inside of the viewport.
35
+ */
23
36
  this.placement = 'top';
37
+ /** Disables the tooltip so it won't show when triggered. */
24
38
  this.disabled = false;
39
+ /** The distance in pixels from which to offset the tooltip away from its target. */
40
+ this.distance = 8;
41
+ /** Indicates whether or not the tooltip is open. You can use this in lieu of the show/hide methods. */
25
42
  this.open = false;
43
+ /** The distance in pixels from which to offset the tooltip along its target. */
44
+ this.skidding = 0;
26
45
  /**
27
46
  * Controls how the tooltip is activated. Possible options include `click`, `hover`, `focus`, and `manual`. Multiple
28
47
  * options can be passed by separating them with a space. When manual is used, the tooltip must be activated
29
48
  * programmatically.
30
49
  */
31
50
  this.trigger = 'hover focus';
32
- this.distance = 8;
33
- this.SHIFT_OFFSET = 16;
34
- /** The distance in pixels from which to offset the tooltip along its target. */
35
- this.skidding = 0;
51
+ /**
52
+ * Enable this option to prevent the tooltip from being clipped when the component is placed inside a container with
53
+ * `overflow: auto|hidden|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all,
54
+ * scenarios.
55
+ */
36
56
  this.hoist = false;
37
- this.hasTooltipSlot = false;
38
- this.hoverTimeout = 0;
39
- this.caretSize = 6;
40
- this.originalPlacement = this.placement;
41
- this.updateTooltipPosition = () => {
42
- if (!isInViewport(this.triggerContainer)) {
43
- this.open = false;
44
- return;
45
- }
46
- const triggerRect = this.triggerContainer.getBoundingClientRect();
47
- const tooltipRect = this.tooltip.getBoundingClientRect();
48
- const viewportWidth = window.innerWidth;
49
- const viewportHeight = window.innerHeight;
50
- let { top, left, placement } = getValidTooltipPosition(triggerRect, tooltipRect, this.originalPlacement, this.distance, this.skidding, this.caretSize, viewportWidth, viewportHeight);
51
- // FallBack Positions
52
- // Bottom
53
- if (this.originalPlacement.startsWith('bottom')) {
54
- const availableSpaceBelow = viewportHeight - triggerRect.bottom;
55
- if (availableSpaceBelow < tooltipRect.height + this.distance) {
56
- let newPlacement = 'top';
57
- if (this.originalPlacement === 'bottom-start') {
58
- newPlacement = 'top';
59
- }
60
- else if (this.originalPlacement === 'bottom-end') {
61
- newPlacement = 'top';
62
- }
63
- const newPosition = getValidTooltipPosition(triggerRect, tooltipRect, newPlacement, this.distance, this.skidding, this.caretSize, viewportWidth, viewportHeight);
64
- top = newPosition.top;
65
- left = newPosition.left;
66
- placement = newPosition.placement;
67
- }
68
- }
69
- // Top
70
- if (this.originalPlacement.startsWith('top')) {
71
- const availableSpaceAbove = triggerRect.top;
72
- const availableSpaceBelow = viewportHeight - triggerRect.bottom;
73
- if (availableSpaceAbove < tooltipRect.height + this.distance && availableSpaceBelow >= tooltipRect.height + this.distance) {
74
- let newPlacement = 'bottom';
75
- if (this.originalPlacement === 'top-start') {
76
- newPlacement = 'bottom-start';
77
- }
78
- else if (this.originalPlacement === 'top-end') {
79
- newPlacement = 'bottom-end';
80
- }
81
- const newPosition = getValidTooltipPosition(triggerRect, tooltipRect, newPlacement, this.distance, this.skidding, this.caretSize, viewportWidth, viewportHeight);
82
- top = newPosition.top;
83
- left = newPosition.left;
84
- placement = newPosition.placement;
85
- }
86
- }
87
- // Left
88
- if (this.originalPlacement.startsWith('left')) {
89
- const availableSpaceLeft = triggerRect.left;
90
- const availableSpaceRight = viewportWidth - triggerRect.right;
91
- if (availableSpaceLeft < tooltipRect.width + this.distance && availableSpaceRight >= tooltipRect.width + this.distance) {
92
- let newPlacement = 'right';
93
- if (this.originalPlacement === 'left-start') {
94
- newPlacement = 'right-start';
95
- }
96
- else if (this.originalPlacement === 'left-end') {
97
- newPlacement = 'right-end';
98
- }
99
- const newPosition = getValidTooltipPosition(triggerRect, tooltipRect, newPlacement, this.distance, this.skidding, this.caretSize, viewportWidth, viewportHeight);
100
- top = newPosition.top;
101
- left = newPosition.left;
102
- placement = newPosition.placement;
103
- }
104
- }
105
- // Right
106
- if (this.originalPlacement.startsWith('right')) {
107
- const availableSpaceRight = viewportWidth - triggerRect.right;
108
- const availableSpaceLeft = triggerRect.left;
109
- if (availableSpaceRight < tooltipRect.width + this.distance && availableSpaceLeft >= tooltipRect.width + this.distance) {
110
- let newPlacement = 'left';
111
- if (this.originalPlacement === 'right-start') {
112
- newPlacement = 'left-start';
113
- }
114
- else if (this.originalPlacement === 'right-end') {
115
- newPlacement = 'left-end';
116
- }
117
- const newPosition = getValidTooltipPosition(triggerRect, tooltipRect, newPlacement, this.distance, this.skidding, this.caretSize, viewportWidth, viewportHeight);
118
- top = newPosition.top;
119
- left = newPosition.left;
120
- placement = newPosition.placement;
121
- }
122
- }
123
- this.setAttribute('placement', placement);
124
- this.tooltip.style.top = `${top}px`;
125
- this.tooltip.style.left = `${left}px`;
126
- const { caretLeft, caretTop } = getCaretPosition({
127
- placement,
128
- tooltipRect,
129
- triggerRect,
130
- caretSize: this.caretSize,
131
- left,
132
- top
133
- });
134
- this.caret.style.left = `${caretLeft}px`;
135
- this.caret.style.top = `${caretTop}px`;
136
- };
137
- this.showTooltip = () => {
138
- const trimmedContent = this.content.trim();
139
- if (!trimmedContent && !this.hasTooltipSlot) {
140
- return;
141
- }
142
- if (!this.disabled && isInViewport(this.triggerContainer)) {
143
- this.emit('nile-show');
144
- this.open = true;
145
- this.updateComplete.then(() => {
146
- requestAnimationFrame(() => {
147
- this.updateTooltipPosition();
148
- this.emit('nile-after-show');
149
- });
150
- });
151
- }
152
- else {
153
- this.open = false;
154
- }
155
- };
156
- this.hideTooltip = () => {
157
- this.emit('nile-hide');
158
- this.open = false;
159
- setTimeout(() => {
160
- this.emit('nile-after-hide');
161
- }, 200);
162
- };
163
- this.handleMouseOver = () => {
164
- if (this.trigger.includes('hover')) {
165
- clearTimeout(this.hoverTimeout);
166
- this.hoverTimeout = window.setTimeout(() => this.showTooltip(), 300);
167
- }
168
- };
169
- this.handleMouseOut = () => {
170
- if (this.trigger.includes('hover')) {
171
- clearTimeout(this.hoverTimeout);
172
- this.hoverTimeout = window.setTimeout(() => this.hideTooltip(), 150);
173
- }
174
- };
175
- this.handleClick = () => {
176
- if (this.trigger.includes('click')) {
177
- if (!this.open && isInViewport(this.triggerContainer)) {
178
- this.showTooltip();
179
- }
180
- else {
181
- this.hideTooltip();
182
- }
183
- }
184
- };
185
- this.handleFocus = () => {
186
- if (this.trigger.includes('focus')) {
187
- this.showTooltip();
188
- }
189
- };
190
- this.handleBlur = () => {
191
- if (this.trigger.includes('focus')) {
192
- this.hideTooltip();
193
- }
194
- };
195
57
  }
58
+ /**
59
+ * The styles for Tooltip
60
+ * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
61
+ */
196
62
  static get styles() {
197
63
  return [styles];
198
64
  }
199
65
  connectedCallback() {
200
66
  super.connectedCallback();
201
- this.originalPlacement = this.placement;
202
- window.addEventListener('resize', this.updateTooltipPosition);
203
- window.addEventListener('scroll', this.updateTooltipPosition, true);
67
+ this.handleBlur = this.handleBlur.bind(this);
68
+ this.handleClick = this.handleClick.bind(this);
69
+ this.handleFocus = this.handleFocus.bind(this);
70
+ this.handleKeyDown = this.handleKeyDown.bind(this);
71
+ this.handleMouseOver = this.handleMouseOver.bind(this);
72
+ this.handleMouseOut = this.handleMouseOut.bind(this);
73
+ this.updateComplete.then(() => {
74
+ this.addEventListener('blur', this.handleBlur, true);
75
+ this.addEventListener('focus', this.handleFocus, true);
76
+ this.addEventListener('click', this.handleClick);
77
+ this.addEventListener('keydown', this.handleKeyDown);
78
+ this.addEventListener('mouseover', this.handleMouseOver);
79
+ this.addEventListener('mouseout', this.handleMouseOut);
80
+ });
204
81
  }
205
- updated(changedProps) {
206
- super.updated?.(changedProps);
207
- const validPlacements = [
208
- 'top', 'top-start', 'top-end',
209
- 'right', 'right-start', 'right-end',
210
- 'bottom', 'bottom-start', 'bottom-end',
211
- 'left', 'left-start', 'left-end'
212
- ];
213
- if (!validPlacements.includes(this.placement)) {
214
- console.warn(`[nile-tooltip] Invalid placement "${this.placement}", defaulting to "bottom".`);
215
- this.placement = 'top';
82
+ firstUpdated() {
83
+ this.body.hidden = !this.open;
84
+ // If the tooltip is visible on init, update its position
85
+ if (this.open) {
86
+ this.popup.active = true;
87
+ this.popup.reposition();
216
88
  }
217
- if (!validPlacements.includes(this.originalPlacement)) {
218
- this.originalPlacement = 'top';
89
+ }
90
+ disconnectedCallback() {
91
+ super.disconnectedCallback();
92
+ this.removeEventListener('blur', this.handleBlur, true);
93
+ this.removeEventListener('focus', this.handleFocus, true);
94
+ this.removeEventListener('click', this.handleClick);
95
+ this.removeEventListener('keydown', this.handleKeyDown);
96
+ this.removeEventListener('mouseover', this.handleMouseOver);
97
+ this.removeEventListener('mouseout', this.handleMouseOut);
98
+ }
99
+ handleBlur() {
100
+ if (this.hasTrigger('focus')) {
101
+ this.hide();
219
102
  }
220
- if (changedProps.has('open') && this.open) {
221
- this.updateComplete.then(() => {
222
- requestAnimationFrame(() => {
223
- this.updateTooltipPosition();
224
- });
103
+ }
104
+ handleClick() {
105
+ if (this.hasTrigger('click')) {
106
+ if (this.open) {
107
+ this.hide();
108
+ }
109
+ else {
110
+ this.show();
111
+ }
112
+ }
113
+ }
114
+ handleFocus() {
115
+ if (this.hasTrigger('focus')) {
116
+ this.show();
117
+ }
118
+ }
119
+ handleKeyDown(event) {
120
+ // Pressing escape when the target element has focus should dismiss the tooltip
121
+ if (this.open && event.key === 'Escape') {
122
+ event.stopPropagation();
123
+ this.hide();
124
+ }
125
+ }
126
+ handleMouseOver() {
127
+ if (this.hasTrigger('hover')) {
128
+ const delay = parseDuration(getComputedStyle(this).getPropertyValue('--show-delay'));
129
+ clearTimeout(this.hoverTimeout);
130
+ this.hoverTimeout = window.setTimeout(() => this.show(), delay);
131
+ }
132
+ }
133
+ handleMouseOut() {
134
+ if (this.hasTrigger('hover')) {
135
+ const delay = parseDuration(getComputedStyle(this).getPropertyValue('--hide-delay'));
136
+ clearTimeout(this.hoverTimeout);
137
+ this.hoverTimeout = window.setTimeout(() => this.hide(), delay);
138
+ }
139
+ }
140
+ hasTrigger(triggerType) {
141
+ const triggers = this.trigger.split(' ');
142
+ return triggers.includes(triggerType);
143
+ }
144
+ async handleOpenChange() {
145
+ if (this.open) {
146
+ if (this.disabled) {
147
+ return;
148
+ }
149
+ // Show
150
+ this.emit('nile-show');
151
+ await stopAnimations(this.body);
152
+ this.body.hidden = false;
153
+ this.popup.active = true;
154
+ const { keyframes, options } = getAnimation(this, 'tooltip.show', {
155
+ dir: '',
225
156
  });
157
+ await animateTo(this.popup.popup, keyframes, options);
158
+ this.emit('nile-after-show');
159
+ }
160
+ else {
161
+ // Hide
162
+ this.emit('nile-hide');
163
+ await stopAnimations(this.body);
164
+ const { keyframes, options } = getAnimation(this, 'tooltip.hide', {
165
+ dir: '',
166
+ });
167
+ await animateTo(this.popup.popup, keyframes, options);
168
+ this.popup.active = false;
169
+ this.body.hidden = true;
170
+ this.emit('nile-after-hide');
226
171
  }
227
172
  }
228
- disconnectedCallback() {
229
- super.disconnectedCallback();
230
- window.removeEventListener('resize', this.updateTooltipPosition);
231
- window.removeEventListener('scroll', this.updateTooltipPosition, true);
173
+ async handleOptionsChange() {
174
+ if (this.hasUpdated) {
175
+ await this.updateComplete;
176
+ this.popup.reposition();
177
+ }
232
178
  }
233
- handleTooltipSlotChange() {
234
- const nodes = this.tooltipSlot.assignedNodes({ flatten: true });
235
- this.hasTooltipSlot = nodes.length > 0;
236
- this.requestUpdate();
179
+ handleDisabledChange() {
180
+ if (this.disabled && this.open) {
181
+ this.hide();
182
+ }
183
+ }
184
+ /** Shows the tooltip. */
185
+ async show() {
186
+ if (this.open || !this.content?.trim().length) {
187
+ return undefined;
188
+ }
189
+ this.open = true;
190
+ return waitForEvent(this, 'nile-after-show');
191
+ }
192
+ /** Hides the tooltip */
193
+ async hide() {
194
+ if (!this.open) {
195
+ return undefined;
196
+ }
197
+ this.open = false;
198
+ return waitForEvent(this, 'nile-after-hide');
237
199
  }
238
200
  render() {
239
201
  return html `
240
- <div
241
- class="tooltip"
242
- id="tooltip"
202
+ <nile-popup
203
+ part="base"
204
+ exportparts="
205
+ popup:base__popup,
206
+ arrow:base__arrow
207
+ "
208
+ class=${classMap({
209
+ tooltip: true,
210
+ 'tooltip--open': this.open,
211
+ })}
212
+ placement=${this.placement}
213
+ distance=${this.distance}
214
+ skidding=${this.skidding}
215
+ strategy=${this.hoist ? 'fixed' : 'absolute'}
216
+ flip
217
+ shift
218
+ arrow
243
219
  >
244
- <div class="tooltip-content" part="content">
245
- <slot name="content" @slotchange=${this.handleTooltipSlotChange}></slot>
246
- ${!this.hasTooltipSlot ? html `${this.content}` : null}
247
- </div>
248
- <div class="tooltip-caret" style="--caret-size: ${this.caretSize}px;"></div>
249
- </div>
220
+ <slot slot="anchor" aria-describedby="tooltip"></slot>
250
221
 
251
- <div
252
- class="trigger-container"
253
- tabindex="0"
254
- @mouseover=${this.handleMouseOver}
255
- @mouseout=${this.handleMouseOut}
256
- @click=${this.handleClick}
257
- @focusin=${this.handleFocus}
258
- @focusout=${this.handleBlur}
259
- aria-describedby="tooltip"
260
- >
261
- <slot></slot>
262
- </div>
222
+ <slot
223
+ name="content"
224
+ part="body"
225
+ id="tooltip"
226
+ class=${classMap({
227
+ tooltip__body: true,
228
+ 'tooltip__body--large': this.size === 'large',
229
+ })}
230
+ role="tooltip"
231
+ aria-live=${this.open ? 'polite' : 'off'}
232
+ >
233
+ ${this.content}
234
+ </slot>
235
+ </nile-popup>
263
236
  `;
264
237
  }
265
238
  };
266
239
  __decorate([
267
- property({ type: String })
240
+ query('slot:not([name])')
241
+ ], NileTooltip.prototype, "defaultSlot", void 0);
242
+ __decorate([
243
+ query('.tooltip__body')
244
+ ], NileTooltip.prototype, "body", void 0);
245
+ __decorate([
246
+ query('nile-popup')
247
+ ], NileTooltip.prototype, "popup", void 0);
248
+ __decorate([
249
+ property({ type: String, reflect: true })
268
250
  ], NileTooltip.prototype, "content", void 0);
269
251
  __decorate([
270
- property({ type: String })
252
+ property({ reflect: true })
253
+ ], NileTooltip.prototype, "size", void 0);
254
+ __decorate([
255
+ property()
271
256
  ], NileTooltip.prototype, "placement", void 0);
272
257
  __decorate([
273
258
  property({ type: Boolean, reflect: true })
274
259
  ], NileTooltip.prototype, "disabled", void 0);
275
- __decorate([
276
- property({ type: Boolean, reflect: true })
277
- ], NileTooltip.prototype, "open", void 0);
278
- __decorate([
279
- property()
280
- ], NileTooltip.prototype, "trigger", void 0);
281
260
  __decorate([
282
261
  property({ type: Number })
283
262
  ], NileTooltip.prototype, "distance", void 0);
263
+ __decorate([
264
+ property({ type: Boolean, reflect: true })
265
+ ], NileTooltip.prototype, "open", void 0);
284
266
  __decorate([
285
267
  property({ type: Number })
286
268
  ], NileTooltip.prototype, "skidding", void 0);
287
269
  __decorate([
288
- property({ type: Boolean, reflect: true })
289
- ], NileTooltip.prototype, "hoist", void 0);
270
+ property()
271
+ ], NileTooltip.prototype, "trigger", void 0);
290
272
  __decorate([
291
- query('.tooltip')
292
- ], NileTooltip.prototype, "tooltip", void 0);
273
+ property({ type: Boolean })
274
+ ], NileTooltip.prototype, "hoist", void 0);
293
275
  __decorate([
294
- query('.trigger-container')
295
- ], NileTooltip.prototype, "triggerContainer", void 0);
276
+ watch('open', { waitUntilFirstUpdate: true })
277
+ ], NileTooltip.prototype, "handleOpenChange", null);
296
278
  __decorate([
297
- query('.tooltip-caret')
298
- ], NileTooltip.prototype, "caret", void 0);
279
+ watch(['content', 'distance', 'hoist', 'placement', 'skidding'])
280
+ ], NileTooltip.prototype, "handleOptionsChange", null);
299
281
  __decorate([
300
- query('slot[name="content"]')
301
- ], NileTooltip.prototype, "tooltipSlot", void 0);
282
+ watch('disabled')
283
+ ], NileTooltip.prototype, "handleDisabledChange", null);
302
284
  NileTooltip = __decorate([
303
285
  customElement('nile-tooltip')
304
286
  ], NileTooltip);
305
287
  export { NileTooltip };
288
+ setDefaultAnimation('tooltip.show', {
289
+ keyframes: [
290
+ { opacity: 0, scale: 0.8 },
291
+ { opacity: 1, scale: 1 },
292
+ ],
293
+ options: { duration: 150, easing: 'ease' },
294
+ });
295
+ setDefaultAnimation('tooltip.hide', {
296
+ keyframes: [
297
+ { opacity: 1, scale: 1 },
298
+ { opacity: 0, scale: 0.8 },
299
+ ],
300
+ options: { duration: 150, easing: 'ease' },
301
+ });
302
+ export default NileTooltip;
306
303
  //# sourceMappingURL=nile-tooltip.js.map