@patternfly/elements 3.0.0 → 3.0.2

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 (365) hide show
  1. package/custom-elements.json +490 -484
  2. package/package.json +1 -1
  3. package/pf-accordion/BaseAccordion.js +2 -1
  4. package/pf-accordion/BaseAccordion.js.map +1 -1
  5. package/pf-accordion/BaseAccordionHeader.js +4 -1
  6. package/pf-accordion/BaseAccordionHeader.js.map +1 -1
  7. package/pf-accordion/BaseAccordionPanel.d.ts +1 -1
  8. package/pf-accordion/pf-accordion-header.d.ts +1 -1
  9. package/pf-accordion/pf-accordion.d.ts +0 -5
  10. package/pf-accordion/pf-accordion.js +0 -5
  11. package/pf-accordion/pf-accordion.js.map +1 -1
  12. package/pf-accordion/test/pf-accordion.e2e.d.ts +1 -0
  13. package/pf-accordion/test/pf-accordion.e2e.js +11 -0
  14. package/pf-accordion/test/pf-accordion.e2e.js.map +1 -0
  15. package/pf-accordion/test/pf-accordion.spec.d.ts +1 -0
  16. package/pf-accordion/test/pf-accordion.spec.js +1222 -0
  17. package/pf-accordion/test/pf-accordion.spec.js.map +1 -0
  18. package/pf-avatar/BaseAvatar.d.ts +1 -1
  19. package/pf-avatar/test/pf-avatar.e2e.d.ts +1 -0
  20. package/pf-avatar/test/pf-avatar.e2e.js +11 -0
  21. package/pf-avatar/test/pf-avatar.e2e.js.map +1 -0
  22. package/pf-avatar/test/pf-avatar.spec.d.ts +1 -0
  23. package/pf-avatar/test/pf-avatar.spec.js +45 -0
  24. package/pf-avatar/test/pf-avatar.spec.js.map +1 -0
  25. package/pf-back-to-top/demo/demo.css +25 -0
  26. package/pf-back-to-top/pf-back-to-top.d.ts +1 -1
  27. package/pf-back-to-top/test/pf-back-to-top.e2e.d.ts +1 -0
  28. package/pf-back-to-top/test/pf-back-to-top.e2e.js +11 -0
  29. package/pf-back-to-top/test/pf-back-to-top.e2e.js.map +1 -0
  30. package/pf-back-to-top/test/pf-back-to-top.spec.d.ts +1 -0
  31. package/pf-back-to-top/test/pf-back-to-top.spec.js +267 -0
  32. package/pf-back-to-top/test/pf-back-to-top.spec.js.map +1 -0
  33. package/pf-background-image/pf-background-image.d.ts +1 -4
  34. package/pf-background-image/pf-background-image.js +1 -4
  35. package/pf-background-image/pf-background-image.js.map +1 -1
  36. package/pf-background-image/test/pf-background-image.e2e.d.ts +1 -0
  37. package/pf-background-image/test/pf-background-image.e2e.js +11 -0
  38. package/pf-background-image/test/pf-background-image.e2e.js.map +1 -0
  39. package/pf-background-image/test/pf-background-image.spec.d.ts +1 -0
  40. package/pf-background-image/test/pf-background-image.spec.js +89 -0
  41. package/pf-background-image/test/pf-background-image.spec.js.map +1 -0
  42. package/pf-badge/BaseBadge.d.ts +1 -1
  43. package/pf-badge/test/pf-badge.e2e.d.ts +1 -0
  44. package/pf-badge/test/pf-badge.e2e.js +11 -0
  45. package/pf-badge/test/pf-badge.e2e.js.map +1 -0
  46. package/pf-badge/test/pf-badge.spec.d.ts +1 -0
  47. package/pf-badge/test/pf-badge.spec.js +52 -0
  48. package/pf-badge/test/pf-badge.spec.js.map +1 -0
  49. package/pf-banner/pf-banner.d.ts +1 -10
  50. package/pf-banner/pf-banner.js +0 -9
  51. package/pf-banner/pf-banner.js.map +1 -1
  52. package/pf-banner/test/pf-banner.e2e.d.ts +1 -0
  53. package/pf-banner/test/pf-banner.e2e.js +11 -0
  54. package/pf-banner/test/pf-banner.e2e.js.map +1 -0
  55. package/pf-banner/test/pf-banner.spec.d.ts +1 -0
  56. package/pf-banner/test/pf-banner.spec.js +81 -0
  57. package/pf-banner/test/pf-banner.spec.js.map +1 -0
  58. package/pf-button/BaseButton.d.ts +7 -2
  59. package/pf-button/BaseButton.js +4 -1
  60. package/pf-button/BaseButton.js.map +1 -1
  61. package/pf-button/pf-button.d.ts +1 -17
  62. package/pf-button/pf-button.js +10 -18
  63. package/pf-button/pf-button.js.map +1 -1
  64. package/pf-button/test/pf-button.e2e.d.ts +1 -0
  65. package/pf-button/test/pf-button.e2e.js +11 -0
  66. package/pf-button/test/pf-button.e2e.js.map +1 -0
  67. package/pf-button/test/pf-button.spec.d.ts +1 -0
  68. package/pf-button/test/pf-button.spec.js +124 -0
  69. package/pf-button/test/pf-button.spec.js.map +1 -0
  70. package/pf-card/BaseCard.d.ts +1 -1
  71. package/pf-card/test/pf-card.e2e.d.ts +1 -0
  72. package/pf-card/test/pf-card.e2e.js +11 -0
  73. package/pf-card/test/pf-card.e2e.js.map +1 -0
  74. package/pf-card/test/pf-card.spec.d.ts +1 -0
  75. package/pf-card/test/pf-card.spec.js +160 -0
  76. package/pf-card/test/pf-card.spec.js.map +1 -0
  77. package/pf-chip/pf-chip-group.d.ts +8 -5
  78. package/pf-chip/pf-chip-group.js +10 -10
  79. package/pf-chip/pf-chip-group.js.map +1 -1
  80. package/pf-chip/pf-chip.d.ts +8 -5
  81. package/pf-chip/pf-chip.js +4 -4
  82. package/pf-chip/pf-chip.js.map +1 -1
  83. package/pf-chip/test/pf-chip-group.spec.d.ts +1 -0
  84. package/pf-chip/test/pf-chip-group.spec.js +189 -0
  85. package/pf-chip/test/pf-chip-group.spec.js.map +1 -0
  86. package/pf-chip/test/pf-chip.e2e.d.ts +1 -0
  87. package/pf-chip/test/pf-chip.e2e.js +11 -0
  88. package/pf-chip/test/pf-chip.e2e.js.map +1 -0
  89. package/pf-chip/test/pf-chip.spec.d.ts +1 -0
  90. package/pf-chip/test/pf-chip.spec.js +116 -0
  91. package/pf-chip/test/pf-chip.spec.js.map +1 -0
  92. package/pf-clipboard-copy/pf-clipboard-copy.css +4 -0
  93. package/pf-clipboard-copy/pf-clipboard-copy.d.ts +8 -3
  94. package/pf-clipboard-copy/pf-clipboard-copy.js +6 -4
  95. package/pf-clipboard-copy/pf-clipboard-copy.js.map +1 -1
  96. package/pf-clipboard-copy/test/pf-clipboard-copy.e2e.d.ts +1 -0
  97. package/pf-clipboard-copy/test/pf-clipboard-copy.e2e.js +11 -0
  98. package/pf-clipboard-copy/test/pf-clipboard-copy.e2e.js.map +1 -0
  99. package/pf-clipboard-copy/test/pf-clipboard-copy.spec.d.ts +1 -0
  100. package/pf-clipboard-copy/test/pf-clipboard-copy.spec.js +103 -0
  101. package/pf-clipboard-copy/test/pf-clipboard-copy.spec.js.map +1 -0
  102. package/pf-code-block/BaseCodeBlock.js +2 -2
  103. package/pf-code-block/BaseCodeBlock.js.map +1 -1
  104. package/pf-code-block/pf-code-block.d.ts +1 -1
  105. package/pf-code-block/test/pf-code-block.e2e.d.ts +1 -0
  106. package/pf-code-block/test/pf-code-block.e2e.js +11 -0
  107. package/pf-code-block/test/pf-code-block.e2e.js.map +1 -0
  108. package/pf-code-block/test/pf-code-block.spec.d.ts +1 -0
  109. package/pf-code-block/test/pf-code-block.spec.js +89 -0
  110. package/pf-code-block/test/pf-code-block.spec.js.map +1 -0
  111. package/pf-dropdown/pf-dropdown-group.d.ts +1 -1
  112. package/pf-dropdown/pf-dropdown-group.js +4 -1
  113. package/pf-dropdown/pf-dropdown-group.js.map +1 -1
  114. package/pf-dropdown/pf-dropdown-item.d.ts +1 -2
  115. package/pf-dropdown/pf-dropdown-item.js +4 -2
  116. package/pf-dropdown/pf-dropdown-item.js.map +1 -1
  117. package/pf-dropdown/pf-dropdown-menu.d.ts +1 -2
  118. package/pf-dropdown/pf-dropdown-menu.js +8 -6
  119. package/pf-dropdown/pf-dropdown-menu.js.map +1 -1
  120. package/pf-dropdown/pf-dropdown.d.ts +8 -6
  121. package/pf-dropdown/pf-dropdown.js +11 -11
  122. package/pf-dropdown/pf-dropdown.js.map +1 -1
  123. package/pf-dropdown/test/pf-dropdown.e2e.d.ts +1 -0
  124. package/pf-dropdown/test/pf-dropdown.e2e.js +11 -0
  125. package/pf-dropdown/test/pf-dropdown.e2e.js.map +1 -0
  126. package/pf-dropdown/test/pf-dropdown.spec.d.ts +1 -0
  127. package/pf-dropdown/test/pf-dropdown.spec.js +129 -0
  128. package/pf-dropdown/test/pf-dropdown.spec.js.map +1 -0
  129. package/pf-icon/BaseIcon.d.ts +1 -2
  130. package/pf-icon/BaseIcon.js +3 -4
  131. package/pf-icon/BaseIcon.js.map +1 -1
  132. package/pf-icon/demo/icons/rh/boba-tea.js +5 -0
  133. package/pf-icon/demo/icons/rh/lifecycle.js +3 -0
  134. package/pf-icon/test/pf-icon.e2e.d.ts +1 -0
  135. package/pf-icon/test/pf-icon.e2e.js +11 -0
  136. package/pf-icon/test/pf-icon.e2e.js.map +1 -0
  137. package/pf-icon/test/pf-icon.spec.d.ts +1 -0
  138. package/pf-icon/test/pf-icon.spec.js +130 -0
  139. package/pf-icon/test/pf-icon.spec.js.map +1 -0
  140. package/pf-icon/test/rh-icon-aed.js +2 -0
  141. package/pf-icon/test/rh-icon-api.js +2 -0
  142. package/pf-icon/test/rh-icon-atom.js +2 -0
  143. package/pf-icon/test/rh-icon-bike.js +2 -0
  144. package/pf-jump-links/pf-jump-links-item.d.ts +8 -2
  145. package/pf-jump-links/pf-jump-links-item.js +4 -1
  146. package/pf-jump-links/pf-jump-links-item.js.map +1 -1
  147. package/pf-jump-links/pf-jump-links-list.d.ts +1 -1
  148. package/pf-jump-links/pf-jump-links.d.ts +1 -7
  149. package/pf-jump-links/pf-jump-links.js +1 -7
  150. package/pf-jump-links/pf-jump-links.js.map +1 -1
  151. package/pf-jump-links/test/pf-jump-links.e2e.d.ts +1 -0
  152. package/pf-jump-links/test/pf-jump-links.e2e.js +11 -0
  153. package/pf-jump-links/test/pf-jump-links.e2e.js.map +1 -0
  154. package/pf-jump-links/test/pf-jump-links.spec.d.ts +1 -0
  155. package/pf-jump-links/test/pf-jump-links.spec.js +85 -0
  156. package/pf-jump-links/test/pf-jump-links.spec.js.map +1 -0
  157. package/pf-label/BaseLabel.d.ts +1 -1
  158. package/pf-label/pf-label.d.ts +10 -24
  159. package/pf-label/pf-label.js +4 -21
  160. package/pf-label/pf-label.js.map +1 -1
  161. package/pf-label/test/pf-label.e2e.d.ts +1 -0
  162. package/pf-label/test/pf-label.e2e.js +11 -0
  163. package/pf-label/test/pf-label.e2e.js.map +1 -0
  164. package/pf-label/test/pf-label.spec.d.ts +1 -0
  165. package/pf-label/test/pf-label.spec.js +111 -0
  166. package/pf-label/test/pf-label.spec.js.map +1 -0
  167. package/pf-modal/pf-modal.d.ts +1 -6
  168. package/pf-modal/pf-modal.js +6 -8
  169. package/pf-modal/pf-modal.js.map +1 -1
  170. package/pf-modal/test/pf-modal.e2e.d.ts +1 -0
  171. package/pf-modal/test/pf-modal.e2e.js +13 -0
  172. package/pf-modal/test/pf-modal.e2e.js.map +1 -0
  173. package/pf-modal/test/pf-modal.spec.d.ts +1 -0
  174. package/pf-modal/test/pf-modal.spec.js +197 -0
  175. package/pf-modal/test/pf-modal.spec.js.map +1 -0
  176. package/pf-panel/pf-panel.d.ts +1 -1
  177. package/pf-panel/test/pf-panel.e2e.d.ts +1 -0
  178. package/pf-panel/test/pf-panel.e2e.js +11 -0
  179. package/pf-panel/test/pf-panel.e2e.js.map +1 -0
  180. package/pf-panel/test/pf-panel.spec.d.ts +1 -0
  181. package/pf-panel/test/pf-panel.spec.js +22 -0
  182. package/pf-panel/test/pf-panel.spec.js.map +1 -0
  183. package/pf-popover/pf-popover.d.ts +1 -5
  184. package/pf-popover/pf-popover.js +12 -7
  185. package/pf-popover/pf-popover.js.map +1 -1
  186. package/pf-popover/test/pf-popover.e2e.d.ts +1 -0
  187. package/pf-popover/test/pf-popover.e2e.js +11 -0
  188. package/pf-popover/test/pf-popover.e2e.js.map +1 -0
  189. package/pf-popover/test/pf-popover.spec.d.ts +1 -0
  190. package/pf-popover/test/pf-popover.spec.js +233 -0
  191. package/pf-popover/test/pf-popover.spec.js.map +1 -0
  192. package/pf-progress/demo/kitchen-sink.css +4 -0
  193. package/pf-progress/pf-progress.d.ts +1 -22
  194. package/pf-progress/pf-progress.js +1 -22
  195. package/pf-progress/pf-progress.js.map +1 -1
  196. package/pf-progress/test/pf-progress.e2e.d.ts +1 -0
  197. package/pf-progress/test/pf-progress.e2e.js +11 -0
  198. package/pf-progress/test/pf-progress.e2e.js.map +1 -0
  199. package/pf-progress/test/pf-progress.spec.d.ts +1 -0
  200. package/pf-progress/test/pf-progress.spec.js +45 -0
  201. package/pf-progress/test/pf-progress.spec.js.map +1 -0
  202. package/pf-progress-stepper/pf-progress-step.d.ts +1 -1
  203. package/pf-progress-stepper/pf-progress-stepper.d.ts +1 -1
  204. package/pf-progress-stepper/test/pf-progress-stepper.e2e.d.ts +1 -0
  205. package/pf-progress-stepper/test/pf-progress-stepper.e2e.js +11 -0
  206. package/pf-progress-stepper/test/pf-progress-stepper.e2e.js.map +1 -0
  207. package/pf-progress-stepper/test/pf-progress-stepper.spec.d.ts +1 -0
  208. package/pf-progress-stepper/test/pf-progress-stepper.spec.js +18 -0
  209. package/pf-progress-stepper/test/pf-progress-stepper.spec.js.map +1 -0
  210. package/pf-select/pf-option-group.d.ts +1 -1
  211. package/pf-select/pf-option-group.js +2 -0
  212. package/pf-select/pf-option-group.js.map +1 -1
  213. package/pf-select/pf-option.d.ts +1 -2
  214. package/pf-select/pf-option.js +3 -4
  215. package/pf-select/pf-option.js.map +1 -1
  216. package/pf-select/pf-select.d.ts +8 -3
  217. package/pf-select/pf-select.js +51 -21
  218. package/pf-select/pf-select.js.map +1 -1
  219. package/pf-select/test/pf-select.e2e.d.ts +1 -0
  220. package/pf-select/test/pf-select.e2e.js +11 -0
  221. package/pf-select/test/pf-select.e2e.js.map +1 -0
  222. package/pf-select/test/pf-select.spec.d.ts +1 -0
  223. package/pf-select/test/pf-select.spec.js +866 -0
  224. package/pf-select/test/pf-select.spec.js.map +1 -0
  225. package/pf-spinner/BaseSpinner.d.ts +1 -2
  226. package/pf-spinner/BaseSpinner.js +2 -4
  227. package/pf-spinner/BaseSpinner.js.map +1 -1
  228. package/pf-spinner/pf-spinner.d.ts +2 -2
  229. package/pf-spinner/pf-spinner.js +8 -1
  230. package/pf-spinner/pf-spinner.js.map +1 -1
  231. package/pf-spinner/test/pf-spinner.e2e.d.ts +1 -0
  232. package/pf-spinner/test/pf-spinner.e2e.js +11 -0
  233. package/pf-spinner/test/pf-spinner.e2e.js.map +1 -0
  234. package/pf-spinner/test/pf-spinner.spec.d.ts +1 -0
  235. package/pf-spinner/test/pf-spinner.spec.js +64 -0
  236. package/pf-spinner/test/pf-spinner.spec.js.map +1 -0
  237. package/pf-switch/BaseSwitch.d.ts +1 -1
  238. package/pf-switch/BaseSwitch.js +3 -3
  239. package/pf-switch/BaseSwitch.js.map +1 -1
  240. package/pf-switch/test/pf-switch.e2e.d.ts +1 -0
  241. package/pf-switch/test/pf-switch.e2e.js +11 -0
  242. package/pf-switch/test/pf-switch.e2e.js.map +1 -0
  243. package/pf-switch/test/pf-switch.spec.d.ts +1 -0
  244. package/pf-switch/test/pf-switch.spec.js +191 -0
  245. package/pf-switch/test/pf-switch.spec.js.map +1 -0
  246. package/pf-table/pf-caption.d.ts +1 -1
  247. package/pf-table/pf-table.d.ts +1 -3
  248. package/pf-table/pf-table.js +2 -4
  249. package/pf-table/pf-table.js.map +1 -1
  250. package/pf-table/pf-tbody.d.ts +1 -1
  251. package/pf-table/pf-td.d.ts +1 -1
  252. package/pf-table/pf-th.d.ts +1 -1
  253. package/pf-table/pf-th.js +3 -3
  254. package/pf-table/pf-th.js.map +1 -1
  255. package/pf-table/pf-thead.d.ts +1 -1
  256. package/pf-table/pf-tr.d.ts +1 -1
  257. package/pf-table/pf-tr.js +4 -4
  258. package/pf-table/pf-tr.js.map +1 -1
  259. package/pf-table/test/pf-table.e2e.d.ts +1 -0
  260. package/pf-table/test/pf-table.e2e.js +11 -0
  261. package/pf-table/test/pf-table.e2e.js.map +1 -0
  262. package/pf-table/test/pf-table.spec.d.ts +1 -0
  263. package/pf-table/test/pf-table.spec.js +17 -0
  264. package/pf-table/test/pf-table.spec.js.map +1 -0
  265. package/pf-tabs/BaseTab.d.ts +2 -2
  266. package/pf-tabs/BaseTab.js +4 -1
  267. package/pf-tabs/BaseTab.js.map +1 -1
  268. package/pf-tabs/BaseTabPanel.d.ts +1 -1
  269. package/pf-tabs/BaseTabs.d.ts +1 -3
  270. package/pf-tabs/BaseTabs.js +11 -12
  271. package/pf-tabs/BaseTabs.js.map +1 -1
  272. package/pf-tabs/pf-tab-panel.d.ts +1 -1
  273. package/pf-tabs/pf-tab.d.ts +1 -17
  274. package/pf-tabs/pf-tab.js +0 -16
  275. package/pf-tabs/pf-tab.js.map +1 -1
  276. package/pf-tabs/pf-tabs.d.ts +1 -12
  277. package/pf-tabs/pf-tabs.js +2 -13
  278. package/pf-tabs/pf-tabs.js.map +1 -1
  279. package/pf-tabs/test/pf-tabs.e2e.d.ts +1 -0
  280. package/pf-tabs/test/pf-tabs.e2e.js +13 -0
  281. package/pf-tabs/test/pf-tabs.e2e.js.map +1 -0
  282. package/pf-tabs/test/pf-tabs.spec.d.ts +1 -0
  283. package/pf-tabs/test/pf-tabs.spec.js +285 -0
  284. package/pf-tabs/test/pf-tabs.spec.js.map +1 -0
  285. package/pf-text-area/pf-text-area.d.ts +1 -2
  286. package/pf-text-area/pf-text-area.js +5 -5
  287. package/pf-text-area/pf-text-area.js.map +1 -1
  288. package/pf-text-area/test/pf-text-area.e2e.d.ts +1 -0
  289. package/pf-text-area/test/pf-text-area.e2e.js +11 -0
  290. package/pf-text-area/test/pf-text-area.e2e.js.map +1 -0
  291. package/pf-text-area/test/pf-text-area.spec.d.ts +1 -0
  292. package/pf-text-area/test/pf-text-area.spec.js +89 -0
  293. package/pf-text-area/test/pf-text-area.spec.js.map +1 -0
  294. package/pf-text-input/demo/demo.css +6 -0
  295. package/pf-text-input/pf-text-input.d.ts +8 -3
  296. package/pf-text-input/pf-text-input.js +4 -2
  297. package/pf-text-input/pf-text-input.js.map +1 -1
  298. package/pf-text-input/test/pf-text-input.e2e.d.ts +1 -0
  299. package/pf-text-input/test/pf-text-input.e2e.js +11 -0
  300. package/pf-text-input/test/pf-text-input.e2e.js.map +1 -0
  301. package/pf-text-input/test/pf-text-input.spec.d.ts +1 -0
  302. package/pf-text-input/test/pf-text-input.spec.js +20 -0
  303. package/pf-text-input/test/pf-text-input.spec.js.map +1 -0
  304. package/pf-tile/BaseTile.d.ts +1 -1
  305. package/pf-tile/pf-tile.d.ts +0 -12
  306. package/pf-tile/pf-tile.js +0 -12
  307. package/pf-tile/pf-tile.js.map +1 -1
  308. package/pf-tile/test/pf-tile.e2e.d.ts +1 -0
  309. package/pf-tile/test/pf-tile.e2e.js +11 -0
  310. package/pf-tile/test/pf-tile.e2e.js.map +1 -0
  311. package/pf-tile/test/pf-tile.spec.d.ts +1 -0
  312. package/pf-tile/test/pf-tile.spec.js +54 -0
  313. package/pf-tile/test/pf-tile.spec.js.map +1 -0
  314. package/pf-timestamp/pf-timestamp.d.ts +1 -1
  315. package/pf-timestamp/pf-timestamp.js +5 -1
  316. package/pf-timestamp/pf-timestamp.js.map +1 -1
  317. package/pf-timestamp/test/pf-timestamp.e2e.d.ts +1 -0
  318. package/pf-timestamp/test/pf-timestamp.e2e.js +12 -0
  319. package/pf-timestamp/test/pf-timestamp.e2e.js.map +1 -0
  320. package/pf-timestamp/test/pf-timestamp.spec.d.ts +1 -0
  321. package/pf-timestamp/test/pf-timestamp.spec.js +156 -0
  322. package/pf-timestamp/test/pf-timestamp.spec.js.map +1 -0
  323. package/pf-tooltip/BaseTooltip.d.ts +1 -1
  324. package/pf-tooltip/pf-tooltip.d.ts +1 -4
  325. package/pf-tooltip/pf-tooltip.js +6 -7
  326. package/pf-tooltip/pf-tooltip.js.map +1 -1
  327. package/pf-tooltip/test/pf-tooltip.e2e.d.ts +1 -0
  328. package/pf-tooltip/test/pf-tooltip.e2e.js +11 -0
  329. package/pf-tooltip/test/pf-tooltip.e2e.js.map +1 -0
  330. package/pf-tooltip/test/pf-tooltip.spec.d.ts +1 -0
  331. package/pf-tooltip/test/pf-tooltip.spec.js +53 -0
  332. package/pf-tooltip/test/pf-tooltip.spec.js.map +1 -0
  333. package/pfe.min.js +273 -266
  334. package/pfe.min.js.map +3 -3
  335. package/pf-accordion/README.md +0 -44
  336. package/pf-avatar/README.md +0 -31
  337. package/pf-back-to-top/README.md +0 -32
  338. package/pf-background-image/README.md +0 -37
  339. package/pf-badge/README.md +0 -57
  340. package/pf-banner/README.md +0 -60
  341. package/pf-button/README.md +0 -61
  342. package/pf-card/README.md +0 -34
  343. package/pf-chip/README.md +0 -20
  344. package/pf-clipboard-copy/README.md +0 -8
  345. package/pf-code-block/README.md +0 -77
  346. package/pf-dropdown/README.md +0 -46
  347. package/pf-icon/README.md +0 -86
  348. package/pf-icon/icons/fab/readme.svg +0 -1
  349. package/pf-jump-links/README.md +0 -27
  350. package/pf-label/README.md +0 -61
  351. package/pf-modal/README.md +0 -63
  352. package/pf-panel/README.md +0 -10
  353. package/pf-popover/README.md +0 -48
  354. package/pf-progress/README.md +0 -33
  355. package/pf-progress-stepper/README.md +0 -41
  356. package/pf-select/README.md +0 -21
  357. package/pf-spinner/README.md +0 -46
  358. package/pf-switch/README.md +0 -91
  359. package/pf-table/README.md +0 -43
  360. package/pf-tabs/README.md +0 -40
  361. package/pf-text-area/README.md +0 -11
  362. package/pf-text-input/README.md +0 -9
  363. package/pf-tile/README.md +0 -12
  364. package/pf-timestamp/README.md +0 -64
  365. package/pf-tooltip/README.md +0 -64
@@ -1 +1 @@
1
- {"version":3,"file":"pf-tooltip.js","sourceRoot":"","sources":["pf-tooltip.ts"],"names":[],"mappings":";;AACA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,OAAO,EACL,qBAAqB,GAEtB,MAAM,6DAA6D,CAAC;AAErE,OAAO,EAAE,KAAK,EAA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;aAAM,CAAC;YACN,mBAAmB,EAAE,mBAAmB,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YACzD,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QACxC,CAAC;IACH,CAAC;IACD,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;QAC7B,IAAI,uBAAA,IAAI,mCAAkB,EAAE,CAAC;YAC3B,IAAI,CAAC,mBAAmB,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YACzC,uBAAA,IAAI,mCAAkB,CAAC,gBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1D,CAAC;aAAM,CAAC;YACN,mBAAmB,EAAE,mBAAmB,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YACzD,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QACxC,CAAC;IACH,CAAC;AACH,CAAC;AA1He,gBAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAGtB;IAAX,QAAQ,EAAE;2CAA6B;AAG5B;IAAX,QAAQ,EAAE;0CAAkB;AAGsB;IAAlD,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;yCAAgB;AAEtD;IAAX,QAAQ,EAAE;0CAA4B;AAWpC;IAHF,QAAQ,CAAC;QACR,SAAS,EAAE,eAAe;QAC1B,SAAS,EAAE,mBAAmB;KAC/B,CAAC;+CAA4B;AAsGjB;IAAZ,KAAK;qCAYL;AAEY;IAAZ,KAAK;qCAEL;AA7IU,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CA8IrB","sourcesContent":["import type { PropertyValues } from 'lit';\nimport { LitElement, html } from 'lit';\nimport { customElement } from 'lit/decorators/custom-element.js';\nimport { property } from 'lit/decorators/property.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { classMap } from 'lit/directives/class-map.js';\n\nimport {\n FloatingDOMController,\n type Placement,\n} from '@patternfly/pfe-core/controllers/floating-dom-controller.js';\n\nimport { bound } from '@patternfly/pfe-core/decorators/bound.js';\n\nimport { StringListConverter } from '@patternfly/pfe-core';\n\n\nimport styles from './pf-tooltip.css';\n\nconst EnterEvents = ['focusin', 'tap', 'click', 'mouseenter'];\nconst ExitEvents = ['focusout', 'blur', 'mouseleave'];\n\n/**\n * A **tooltip** is in-app messaging used to identify elements on a page with short,\n * clarifying text.\n *\n * @summary Toggle the visibility of helpful or contextual information.\n *\n * @slot\n * This slot wraps around the element that should be used to invoke the tooltip content to display.\n * Typically this would be an icon, button, or other small sized element.\n * @slot content\n * This slot renders the content that will be displayed inside of the tooltip.\n * Typically this would include a string of text without any additional elements.\n * This element is wrapped with a div inside of the component to give it the stylings and background colors.\n *\n * @cssprop {<color>} --pf-c-tooltip__content--BackgroundColor\n * Sets the background color for the tooltip content.\n * {@default `#1b1d21`}\n * @cssprop {<color>} --pf-c-tooltip__content--Color\n * Sets the font color for the tooltip content.\n * {@default `#e0e0e0`}\n * @cssprop {<number>} --pf-c-tooltip--line-height\n * Sets the font color for the tooltip content.\n * {@default `1.5`}\n * @cssprop {<length>} --pf-c-tooltip--MaxWidth\n * Maximum width for the tooltip.\n * {@default `18.75rem`}\n * @cssprop --pf-c-tooltip--BoxShadow\n * Box shadow for the tooltip.\n * {@default `0 0.25rem 0.5rem 0rem rgba(3, 3, 3, 0.12), 0 0 0.25rem 0 rgba(3, 3, 3, 0.06)`}\n * @cssprop {<length>} --pf-c-tooltip__content--PaddingTop\n * Top padding for the tooltip.\n * {@default `0.5rem`}\n * @cssprop {<length>} --pf-c-tooltip__content--PaddingRight\n * Right padding for the tooltip.\n * {@default `0.5rem`}\n * @cssprop {<length>} --pf-c-tooltip__content--PaddingBottom\n * Bottom padding for the tooltip.\n * {@default `0.5rem`}\n * @cssprop {<length>} --pf-c-tooltip__content--PaddingLeft\n * Left Padding for the tooltip.\n * {@default `0.5rem`}\n * @cssprop --pf-c-tooltip__content--FontSize\n * Font size for the tooltip content.\n * {@default `0.875rem`}\n * @cssprop {<length>} --pf-c-tooltip__arrow--Width\n * Tooltip arrow width.\n * {@default `0.5rem`}\n * @cssprop {<length>} --pf-c-tooltip__arrow--Height\n * Tooltip arrow height.\n * {@default `0.5rem`}\n * @cssprop --pf-c-tooltip__arrow--m-top--TranslateX\n * Positions the tooltip arrow along the x axis for `top` positioned arrows.\n * {@default `-50%`}\n * @cssprop --pf-c-tooltip__arrow--m-top--TranslateY\n * Positions the tooltip arrow along the y axis for `top` positioned arrows.\n * {@default `50%`}\n * @cssprop --pf-c-tooltip__arrow--m-top--Rotate\n * Rotates the tooltip arrow based on degrees of movement for `top` positioned arrows.\n * {@default `45deg`}\n * @cssprop --pf-c-tooltip__arrow--m-right--TranslateX\n * Positions the tooltip arrow along the x axis for `right` positioned arrows.\n * {@default `-50%`}\n * @cssprop --pf-c-tooltip__arrow--m-right--TranslateY\n * Positions the tooltip arrow along the y axis for `right` positioned arrows.\n * {@default `-50%`}\n * @cssprop --pf-c-tooltip__arrow--m-right--Rotate\n * Rotates the tooltip arrow based on degrees of movement for `right` positioned arrows.\n * {@default `45deg`}\n * @cssprop --pf-c-tooltip__arrow--m-bottom--TranslateX\n * Positions the tooltip arrow along the x axis for `bottom` positioned arrows.\n * {@default `-50%`}\n * @cssprop --pf-c-tooltip__arrow--m-bottom--TranslateY\n * Positions the tooltip arrow along the y axis for `bottom` positioned arrows.\n * {@default `-50%`}\n * @cssprop --pf-c-tooltip__arrow--m-bottom--Rotate\n * Rotates the tooltip arrow based on degrees of movement for `bottom` positioned arrows.\n * {@default `45deg`}\n * @cssprop --pf-c-tooltip__arrow--m-left--TranslateX\n * Positions the tooltip arrow along the x axis for `left` positioned arrows.\n * {@default `50%`}\n * @cssprop --pf-c-tooltip__arrow--m-left--TranslateY\n * Positions the tooltip arrow along the y axis for `left` positioned arrows.\n * {@default `-50%`}\n * @cssprop --pf-c-tooltip__arrow--m-left--Rotate\n * Rotates the tooltip arrow based on degrees of movement for `left` positioned arrows.\n * {@default `45deg`}\n */\n@customElement('pf-tooltip')\nexport class PfTooltip extends LitElement {\n static readonly styles = [styles];\n\n /** The position of the tooltip, relative to the invoking content */\n @property() position: Placement = 'top';\n\n /** Tooltip content. Overridden by the content slot */\n @property() content?: string;\n\n /** If false, prevents the tooltip from trying to remain in view by flipping itself when necessary */\n @property({ type: Boolean, attribute: 'no-flip' }) noFlip = false;\n\n @property() trigger?: string | Element;\n\n /**\n * The flip order when flip is enabled and the initial position is not possible.\n * There are 12 options: `top`, `bottom`, `left`, `right`, `top-start`, `top-end`,\n * `bottom-start`, `bottom-end`, `left-start`, `left-end`,`right-start`, `right-end`.\n * The default is [oppositePlacement], where only the opposite placement is tried.\n */\n @property({\n attribute: 'flip-behavior',\n converter: StringListConverter,\n }) flipBehavior?: Placement[];\n\n get #invoker(): HTMLSlotElement | null {\n return this.shadowRoot?.querySelector('#invoker') ?? null;\n }\n\n get #content(): HTMLElement | null {\n return this.shadowRoot?.querySelector('#tooltip') ?? null;\n }\n\n #referenceTrigger?: HTMLElement | null;\n\n #float = new FloatingDOMController(this, {\n content: (): HTMLElement | null | undefined => this.#content,\n invoker: (): HTMLElement | null | undefined => {\n if (this.#referenceTrigger) {\n return this.#referenceTrigger;\n } else if (this.#invoker instanceof HTMLSlotElement && this.#invoker.assignedElements().length > 0) {\n return this.#invoker.assignedElements().at(0) as HTMLElement;\n } else {\n return this.#invoker;\n }\n },\n });\n\n override connectedCallback() {\n super.connectedCallback();\n this.#invokerChanged();\n this.#updateTrigger();\n }\n\n /**\n * Removes event listeners from the old trigger element and attaches\n * them to the new trigger element.\n */\n override willUpdate(changed: PropertyValues<this>) {\n if (changed.has('trigger')) {\n this.#updateTrigger();\n }\n }\n\n override render() {\n const { alignment, anchor, open, styles } = this.#float;\n\n const blockInvoker =\n this.#invoker?.assignedElements().length === 0 &&\n this.#invoker?.assignedNodes().length > 0;\n const display = blockInvoker ? 'block' : 'contents';\n\n return html`\n <div id=\"container\"\n style=\"${styleMap(styles)}\"\n class=\"${classMap({ open,\n [anchor]: !!anchor,\n [alignment]: !!alignment })}\">\n <div role=\"tooltip\"\n style=\"${styleMap({ display })}\"\n aria-labelledby=\"tooltip\">\n <slot id=\"invoker\" @slotchange=\"${this.#invokerChanged}\"></slot>\n </div>\n <div aria-hidden=\"${String(!open) as 'true' | 'false'}\">\n <slot id=\"tooltip\" name=\"content\">${this.content}</slot>\n </div>\n </div>\n `;\n }\n\n /** the invoker slot should render at block level if it only has text nodes */\n #invokerChanged() {\n this.requestUpdate();\n }\n\n #getReferenceTrigger() {\n return (this.getRootNode() as Document | ShadowRoot).getElementById(this.trigger?.normalize() ?? '');\n }\n\n #updateTrigger() {\n const oldReferenceTrigger = this.#referenceTrigger;\n this.#referenceTrigger =\n this.trigger instanceof HTMLElement ? this.trigger\n : typeof this.trigger === 'string' ? this.#getReferenceTrigger()\n : null;\n for (const evt of EnterEvents) {\n if (this.#referenceTrigger) {\n this.removeEventListener(evt, this.show);\n this.#referenceTrigger.addEventListener(evt, this.show);\n } else {\n oldReferenceTrigger?.removeEventListener(evt, this.show);\n this.addEventListener(evt, this.show);\n }\n }\n for (const evt of ExitEvents) {\n if (this.#referenceTrigger) {\n this.removeEventListener(evt, this.hide);\n this.#referenceTrigger.addEventListener(evt, this.hide);\n } else {\n oldReferenceTrigger?.removeEventListener(evt, this.hide);\n this.addEventListener(evt, this.hide);\n }\n }\n }\n\n @bound async show() {\n await this.updateComplete;\n const placement = this.position;\n const offset =\n !placement?.match(/top|bottom/) ? 15\n : { mainAxis: 15, alignmentAxis: -4 };\n await this.#float.show({\n offset,\n placement,\n flip: !this.noFlip,\n fallbackPlacements: this.flipBehavior,\n });\n }\n\n @bound async hide() {\n await this.#float.hide();\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'pf-tooltip': PfTooltip;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C,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;yCAAgB;AAEtD;IAAX,QAAQ,EAAE;0CAA4B;AAWpC;IAHF,QAAQ,CAAC;QACR,SAAS,EAAE,eAAe;QAC1B,SAAS,EAAE,mBAAmB;KAC/B,CAAC;+CAA4B;AAwGjB;IAAZ,KAAK;qCAYL;AAEY;IAAZ,KAAK;qCAEL;AA/IU,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CAgJrB","sourcesContent":["import type { PropertyValues } from 'lit';\nimport { LitElement, html } from 'lit';\nimport { customElement } from 'lit/decorators/custom-element.js';\nimport { property } from 'lit/decorators/property.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { classMap } from 'lit/directives/class-map.js';\n\nimport {\n FloatingDOMController,\n type Placement,\n} from '@patternfly/pfe-core/controllers/floating-dom-controller.js';\n\nimport { bound } from '@patternfly/pfe-core/decorators/bound.js';\n\nimport { StringListConverter } from '@patternfly/pfe-core';\n\n\nimport styles from './pf-tooltip.css';\n\nconst EnterEvents = ['focusin', 'tap', 'click', 'mouseenter'];\nconst ExitEvents = ['focusout', 'blur', 'mouseleave'];\n\n/**\n * A **tooltip** is in-app messaging used to identify elements on a page with short,\n * clarifying text.\n * @summary Toggle the visibility of helpful or contextual information.\n * @slot\n * This slot wraps around the element that should be used to invoke the tooltip content to display.\n * Typically this would be an icon, button, or other small sized element.\n * @slot content\n * This slot renders the content that will be displayed inside of the tooltip.\n * Typically this would include a string of text without any additional elements.\n * This element is wrapped with a div inside of the component to give it the stylings and background colors.\n * @cssprop {<color>} --pf-c-tooltip__content--BackgroundColor\n * Sets the background color for the tooltip content.\n * {@default `#1b1d21`}\n * @cssprop {<color>} --pf-c-tooltip__content--Color\n * Sets the font color for the tooltip content.\n * {@default `#e0e0e0`}\n * @cssprop {<number>} --pf-c-tooltip--line-height\n * Sets the font color for the tooltip content.\n * {@default `1.5`}\n * @cssprop {<length>} --pf-c-tooltip--MaxWidth\n * Maximum width for the tooltip.\n * {@default `18.75rem`}\n * @cssprop --pf-c-tooltip--BoxShadow\n * Box shadow for the tooltip.\n * {@default `0 0.25rem 0.5rem 0rem rgba(3, 3, 3, 0.12), 0 0 0.25rem 0 rgba(3, 3, 3, 0.06)`}\n * @cssprop {<length>} --pf-c-tooltip__content--PaddingTop\n * Top padding for the tooltip.\n * {@default `0.5rem`}\n * @cssprop {<length>} --pf-c-tooltip__content--PaddingRight\n * Right padding for the tooltip.\n * {@default `0.5rem`}\n * @cssprop {<length>} --pf-c-tooltip__content--PaddingBottom\n * Bottom padding for the tooltip.\n * {@default `0.5rem`}\n * @cssprop {<length>} --pf-c-tooltip__content--PaddingLeft\n * Left Padding for the tooltip.\n * {@default `0.5rem`}\n * @cssprop --pf-c-tooltip__content--FontSize\n * Font size for the tooltip content.\n * {@default `0.875rem`}\n * @cssprop {<length>} --pf-c-tooltip__arrow--Width\n * Tooltip arrow width.\n * {@default `0.5rem`}\n * @cssprop {<length>} --pf-c-tooltip__arrow--Height\n * Tooltip arrow height.\n * {@default `0.5rem`}\n * @cssprop --pf-c-tooltip__arrow--m-top--TranslateX\n * Positions the tooltip arrow along the x axis for `top` positioned arrows.\n * {@default `-50%`}\n * @cssprop --pf-c-tooltip__arrow--m-top--TranslateY\n * Positions the tooltip arrow along the y axis for `top` positioned arrows.\n * {@default `50%`}\n * @cssprop --pf-c-tooltip__arrow--m-top--Rotate\n * Rotates the tooltip arrow based on degrees of movement for `top` positioned arrows.\n * {@default `45deg`}\n * @cssprop --pf-c-tooltip__arrow--m-right--TranslateX\n * Positions the tooltip arrow along the x axis for `right` positioned arrows.\n * {@default `-50%`}\n * @cssprop --pf-c-tooltip__arrow--m-right--TranslateY\n * Positions the tooltip arrow along the y axis for `right` positioned arrows.\n * {@default `-50%`}\n * @cssprop --pf-c-tooltip__arrow--m-right--Rotate\n * Rotates the tooltip arrow based on degrees of movement for `right` positioned arrows.\n * {@default `45deg`}\n * @cssprop --pf-c-tooltip__arrow--m-bottom--TranslateX\n * Positions the tooltip arrow along the x axis for `bottom` positioned arrows.\n * {@default `-50%`}\n * @cssprop --pf-c-tooltip__arrow--m-bottom--TranslateY\n * Positions the tooltip arrow along the y axis for `bottom` positioned arrows.\n * {@default `-50%`}\n * @cssprop --pf-c-tooltip__arrow--m-bottom--Rotate\n * Rotates the tooltip arrow based on degrees of movement for `bottom` positioned arrows.\n * {@default `45deg`}\n * @cssprop --pf-c-tooltip__arrow--m-left--TranslateX\n * Positions the tooltip arrow along the x axis for `left` positioned arrows.\n * {@default `50%`}\n * @cssprop --pf-c-tooltip__arrow--m-left--TranslateY\n * Positions the tooltip arrow along the y axis for `left` positioned arrows.\n * {@default `-50%`}\n * @cssprop --pf-c-tooltip__arrow--m-left--Rotate\n * Rotates the tooltip arrow based on degrees of movement for `left` positioned arrows.\n * {@default `45deg`}\n */\n@customElement('pf-tooltip')\nexport class PfTooltip extends LitElement {\n static readonly styles = [styles];\n\n /** The position of the tooltip, relative to the invoking content */\n @property() position: Placement = 'top';\n\n /** Tooltip content. Overridden by the content slot */\n @property() content?: string;\n\n /** If false, prevents the tooltip from trying to remain in view by flipping itself when necessary */\n @property({ type: Boolean, attribute: 'no-flip' }) noFlip = false;\n\n @property() trigger?: string | Element;\n\n /**\n * The flip order when flip is enabled and the initial position is not possible.\n * There are 12 options: `top`, `bottom`, `left`, `right`, `top-start`, `top-end`,\n * `bottom-start`, `bottom-end`, `left-start`, `left-end`,`right-start`, `right-end`.\n * The default is [oppositePlacement], where only the opposite placement is tried.\n */\n @property({\n attribute: 'flip-behavior',\n converter: StringListConverter,\n }) flipBehavior?: Placement[];\n\n get #invoker(): HTMLSlotElement | null {\n return this.shadowRoot?.querySelector('#invoker') ?? null;\n }\n\n get #content(): HTMLElement | null {\n return this.shadowRoot?.querySelector('#tooltip') ?? null;\n }\n\n #referenceTrigger?: HTMLElement | null;\n\n #float = new FloatingDOMController(this, {\n content: (): HTMLElement | null | undefined => this.#content,\n invoker: (): HTMLElement | null | undefined => {\n if (this.#referenceTrigger) {\n return this.#referenceTrigger;\n } else if (this.#invoker instanceof HTMLSlotElement\n && this.#invoker.assignedElements().length > 0) {\n return this.#invoker.assignedElements().at(0) as HTMLElement;\n } else {\n return this.#invoker;\n }\n },\n });\n\n override connectedCallback() {\n super.connectedCallback();\n this.#invokerChanged();\n this.#updateTrigger();\n }\n\n /**\n * Removes event listeners from the old trigger element and attaches\n * them to the new trigger element.\n */\n override willUpdate(changed: PropertyValues<this>) {\n if (changed.has('trigger')) {\n this.#updateTrigger();\n }\n }\n\n override render() {\n const { alignment, anchor, open, styles } = this.#float;\n\n const blockInvoker =\n this.#invoker?.assignedElements().length === 0\n && this.#invoker?.assignedNodes().length > 0;\n const display = blockInvoker ? 'block' : 'contents';\n\n return html`\n <div id=\"container\"\n style=\"${styleMap(styles)}\"\n class=\"${classMap({ open,\n [anchor]: !!anchor,\n [alignment]: !!alignment })}\">\n <div role=\"tooltip\"\n style=\"${styleMap({ display })}\"\n aria-labelledby=\"tooltip\">\n <slot id=\"invoker\" @slotchange=\"${this.#invokerChanged}\"></slot>\n </div>\n <div aria-hidden=\"${String(!open) as 'true' | 'false'}\">\n <slot id=\"tooltip\" name=\"content\">${this.content}</slot>\n </div>\n </div>\n `;\n }\n\n /** the invoker slot should render at block level if it only has text nodes */\n #invokerChanged() {\n this.requestUpdate();\n }\n\n #getReferenceTrigger() {\n return (this.getRootNode() as Document | ShadowRoot)\n .getElementById(this.trigger?.normalize() ?? '');\n }\n\n #updateTrigger() {\n const oldReferenceTrigger = this.#referenceTrigger;\n this.#referenceTrigger =\n this.trigger instanceof HTMLElement ? this.trigger\n : typeof this.trigger === 'string' ? this.#getReferenceTrigger()\n : null;\n for (const evt of EnterEvents) {\n if (this.#referenceTrigger) {\n this.removeEventListener(evt, this.show);\n this.#referenceTrigger.addEventListener(evt, this.show);\n } else {\n oldReferenceTrigger?.removeEventListener(evt, this.show);\n this.addEventListener(evt, this.show);\n }\n }\n for (const evt of ExitEvents) {\n if (this.#referenceTrigger) {\n this.removeEventListener(evt, this.hide);\n this.#referenceTrigger.addEventListener(evt, this.hide);\n } else {\n oldReferenceTrigger?.removeEventListener(evt, this.hide);\n this.addEventListener(evt, this.hide);\n }\n }\n }\n\n @bound async show() {\n await this.updateComplete;\n const placement = this.position;\n const offset =\n !placement?.match(/top|bottom/) ? 15\n : { mainAxis: 15, alignmentAxis: -4 };\n await this.#float.show({\n offset,\n placement,\n flip: !this.noFlip,\n fallbackPlacements: this.flipBehavior,\n });\n }\n\n @bound async hide() {\n await this.#float.hide();\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'pf-tooltip': PfTooltip;\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import { test } from '@playwright/test';
2
+ import { PfeDemoPage } from '@patternfly/pfe-tools/test/playwright/PfeDemoPage.js';
3
+ const tagName = 'pf-tooltip';
4
+ test.describe(tagName, () => {
5
+ test('snapshot', async ({ page }) => {
6
+ const componentPage = new PfeDemoPage(page, tagName);
7
+ await componentPage.navigate();
8
+ await componentPage.snapshot();
9
+ });
10
+ });
11
+ //# sourceMappingURL=pf-tooltip.e2e.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pf-tooltip.e2e.js","sourceRoot":"","sources":["pf-tooltip.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAC;AAEnF,MAAM,OAAO,GAAG,YAAY,CAAC;AAE7B,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE;IAC1B,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;QAClC,MAAM,aAAa,GAAG,IAAI,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACrD,MAAM,aAAa,CAAC,QAAQ,EAAE,CAAC;QAC/B,MAAM,aAAa,CAAC,QAAQ,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { test } from '@playwright/test';\nimport { PfeDemoPage } from '@patternfly/pfe-tools/test/playwright/PfeDemoPage.js';\n\nconst tagName = 'pf-tooltip';\n\ntest.describe(tagName, () => {\n test('snapshot', async ({ page }) => {\n const componentPage = new PfeDemoPage(page, tagName);\n await componentPage.navigate();\n await componentPage.snapshot();\n });\n});\n"]}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,53 @@
1
+ import { expect, html, fixture } from '@open-wc/testing';
2
+ import { PfTooltip } from '../pf-tooltip.js';
3
+ import { setViewport, sendMouse } from '@web/test-runner-commands';
4
+ import { a11ySnapshot } from '@patternfly/pfe-tools/test/a11y-snapshot.js';
5
+ describe('<pf-tooltip>', function () {
6
+ let element;
7
+ let snapshot;
8
+ beforeEach(async function () {
9
+ await setViewport({ width: 1000, height: 1000 });
10
+ });
11
+ it('imperatively instantiates', function () {
12
+ expect(document.createElement('pf-tooltip')).to.be.an.instanceof(PfTooltip);
13
+ });
14
+ it('should upgrade', async function () {
15
+ element = await fixture(html `<pf-tooltip></pf-tooltip>`);
16
+ const klass = customElements.get('pf-tooltip');
17
+ expect(element)
18
+ .to.be.an.instanceOf(klass)
19
+ .and
20
+ .to.be.an.instanceOf(PfTooltip);
21
+ });
22
+ describe('typical usage', function () {
23
+ beforeEach(async function () {
24
+ element = await fixture(html `
25
+ <pf-tooltip content="Content">Tooltip</pf-tooltip>
26
+ `);
27
+ snapshot = await a11ySnapshot();
28
+ });
29
+ it('should be accessible', async function () {
30
+ await expect(element).shadowDom.to.be.accessible();
31
+ });
32
+ it('should hide tooltip content from assistive technology', async function () {
33
+ expect(snapshot.children).to.deep.equal([
34
+ { name: 'Tooltip', role: 'text' },
35
+ ]);
36
+ });
37
+ describe('hovering the element', function () {
38
+ beforeEach(async function () {
39
+ const { x, y } = element.getBoundingClientRect();
40
+ await sendMouse({ position: [x + 5, y + 5], type: 'move' });
41
+ await element.updateComplete;
42
+ snapshot = await a11ySnapshot();
43
+ });
44
+ it('should show tooltip content to assistive technology', async function () {
45
+ expect(snapshot.children).to.deep.equal([
46
+ { name: 'Tooltip', role: 'text' },
47
+ { name: 'Content', role: 'text' },
48
+ ]);
49
+ });
50
+ });
51
+ });
52
+ });
53
+ //# sourceMappingURL=pf-tooltip.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pf-tooltip.spec.js","sourceRoot":"","sources":["pf-tooltip.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAGzD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAE3E,QAAQ,CAAC,cAAc,EAAE;IACvB,IAAI,OAAkB,CAAC;IACvB,IAAI,QAA0B,CAAC;IAE/B,UAAU,CAAC,KAAK;QACd,MAAM,WAAW,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IACnD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2BAA2B,EAAE;QAC9B,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IAC9E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gBAAgB,EAAE,KAAK;QACxB,OAAO,GAAG,MAAM,OAAO,CAAY,IAAI,CAAA,2BAA2B,CAAC,CAAC;QACpE,MAAM,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAC/C,MAAM,CAAC,OAAO,CAAC;aACV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CAAC,IAAI,CAAC,KAAK,CAAC;oBACtC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE;oBACjC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE;iBAClC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { expect, html, fixture } from '@open-wc/testing';\nimport type { A11yTreeSnapshot } from '@patternfly/pfe-tools/test/a11y-snapshot.js';\n\nimport { PfTooltip } from '../pf-tooltip.js';\nimport { setViewport, sendMouse } from '@web/test-runner-commands';\nimport { a11ySnapshot } from '@patternfly/pfe-tools/test/a11y-snapshot.js';\n\ndescribe('<pf-tooltip>', function() {\n let element: PfTooltip;\n let snapshot: A11yTreeSnapshot;\n\n beforeEach(async function() {\n await setViewport({ width: 1000, height: 1000 });\n });\n\n it('imperatively instantiates', function() {\n expect(document.createElement('pf-tooltip')).to.be.an.instanceof(PfTooltip);\n });\n\n it('should upgrade', async function() {\n element = await fixture<PfTooltip>(html`<pf-tooltip></pf-tooltip>`);\n const klass = customElements.get('pf-tooltip');\n expect(element)\n .to.be.an.instanceOf(klass)\n .and\n .to.be.an.instanceOf(PfTooltip);\n });\n\n describe('typical usage', function() {\n beforeEach(async function() {\n element = await fixture<PfTooltip>(html`\n <pf-tooltip content=\"Content\">Tooltip</pf-tooltip>\n `);\n snapshot = await a11ySnapshot();\n });\n\n it('should be accessible', async function() {\n await expect(element).shadowDom.to.be.accessible();\n });\n\n it('should hide tooltip content from assistive technology', async function() {\n expect(snapshot.children).to.deep.equal([\n { name: 'Tooltip', role: 'text' },\n ]);\n });\n\n describe('hovering the element', function() {\n beforeEach(async function() {\n const { x, y } = element.getBoundingClientRect();\n await sendMouse({ position: [x + 5, y + 5], type: 'move' });\n await element.updateComplete;\n snapshot = await a11ySnapshot();\n });\n it('should show tooltip content to assistive technology', async function() {\n expect(snapshot.children).to.deep.equal([\n { name: 'Tooltip', role: 'text' },\n { name: 'Content', role: 'text' },\n ]);\n });\n });\n });\n});\n"]}