@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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pf-modal.e2e.js","sourceRoot":"","sources":["pf-modal.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAC;AAEnF,MAAM,OAAO,GAAG,UAAU,CAAC;AAE3B,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;QAE/B,MAAM,aAAa,CAAC,KAAK,CAAC,GAAG,OAAO,SAAS,CAAC,CAAC;QAC/C,MAAM,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;QAE/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-modal';\n\ntest.describe(tagName, () => {\n test('snapshot', async ({ page }) => {\n const componentPage = new PfeDemoPage(page, tagName);\n await componentPage.navigate();\n\n await componentPage.click(`${tagName} button`);\n await page.waitForTimeout(100);\n\n await componentPage.snapshot();\n });\n});\n"]}
@@ -0,0 +1 @@
1
+ import '@patternfly/pfe-tools/test/stub-logger.js';
@@ -0,0 +1,197 @@
1
+ import { expect, nextFrame, html } from '@open-wc/testing';
2
+ import { createFixture } from '@patternfly/pfe-tools/test/create-fixture.js';
3
+ import { setViewport } from '@web/test-runner-commands';
4
+ import { PfModal } from '@patternfly/elements/pf-modal/pf-modal.js';
5
+ import '@patternfly/pfe-tools/test/stub-logger.js';
6
+ // One element, defined here, is used
7
+ // in multiple tests. It's torn down and recreated each time.
8
+ const TEMPLATES = {
9
+ testElement: html `<pf-modal></pf-modal>`,
10
+ smallModal: html `
11
+ <pf-modal variant="small">
12
+ <h2 slot="header">Small modal</h2>
13
+ <p>Lorem ipsum dolor sit amet, <a href="#foo">consectetur adipisicing</a> elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
14
+ </pf-modal>
15
+ `,
16
+ mediumModal: html `
17
+ <pf-modal variant="medium">
18
+ <h2 slot="header">Medium modal</h2>
19
+ <p>Lorem ipsum dolor sit amet, <a href="#foo">consectetur adipisicing</a> elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
20
+ </pf-modal>
21
+ `,
22
+ largeModal: html `
23
+ <pf-modal variant="large">
24
+ <h2 slot="header">Large modal</h2>
25
+ <p>Lorem ipsum dolor sit amet, <a href="#foo">consectetur adipisicing</a> elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
26
+ </pf-modal>
27
+ `,
28
+ };
29
+ describe('<pf-modal>', function () {
30
+ it('imperatively instantiates', function () {
31
+ expect(document.createElement('pf-modal')).to.be.an.instanceof(PfModal);
32
+ });
33
+ it('should upgrade', async function () {
34
+ const el = await createFixture(TEMPLATES.testElement);
35
+ expect(el, 'pf-modal should be an instance of PfModal')
36
+ .to.be.an.instanceOf(customElements.get('pf-modal'))
37
+ .and
38
+ .to.be.an.instanceOf(PfModal);
39
+ });
40
+ // Example test.
41
+ it('should apply attributes correctly', async function () {
42
+ // Use the same markup that's declared at the top of the file.
43
+ const el = await createFixture(html `
44
+ <pf-modal>
45
+ <h2 slot="header">Modal with a header</h2>
46
+ <p>Lorem ipsum dolor sit amet, <a href="#foo">consectetur adipisicing</a> elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
47
+ </pf-modal>
48
+ `);
49
+ const modalWindow = el.shadowRoot.querySelector('#dialog');
50
+ const button = el.shadowRoot.querySelector('[part=close-button]');
51
+ await nextFrame();
52
+ expect(modalWindow.getAttribute('tabindex'), 'dialog tabindex').to.equal('0');
53
+ expect(modalWindow.hasAttribute('hidden'), 'hidden').to.be.true;
54
+ expect(button.getAttribute('aria-label'), 'button aria-label').to.equal('Close dialog');
55
+ });
56
+ it('should open the modal window when the trigger is clicked', async function () {
57
+ const el = await createFixture(html `
58
+ <pf-modal trigger="trigger">
59
+ <h2 slot="header">Modal with a header</h2>
60
+ <p>Lorem ipsum dolor sit amet, <a href="#foo">consectetur adipisicing</a> elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
61
+ </pf-modal>
62
+ <pf-button id="trigger">Open a modal</pf-button>
63
+ `);
64
+ const modalWindow = el.shadowRoot.querySelector('#dialog');
65
+ const trigger = document.getElementById('trigger');
66
+ trigger.click();
67
+ await el.updateComplete;
68
+ expect(modalWindow.hasAttribute('hidden')).to.not.be.true;
69
+ // reset
70
+ el.close();
71
+ await el.updateComplete;
72
+ expect(modalWindow.hasAttribute('hidden')).to.be.true;
73
+ });
74
+ it('should remove the hidden attribute from the host on upgrade', async function () {
75
+ const el = await createFixture(TEMPLATES.testElement);
76
+ await new Promise(r => setTimeout(r, 25));
77
+ // test for the hidden attribute on the host
78
+ expect(el.hasAttribute('hidden')).to.not.be.true;
79
+ });
80
+ describe('on extra large screen', function () {
81
+ beforeEach(async function () {
82
+ await setViewport({ width: 1600, height: 1200 });
83
+ });
84
+ describe('with variant=small attribute', function () {
85
+ it('has small modal width', async function () {
86
+ const el = await createFixture(TEMPLATES.smallModal);
87
+ const modalWindow = el.shadowRoot.querySelector('#dialog');
88
+ expect(getComputedStyle(modalWindow).getPropertyValue('max-width'))
89
+ .to.equal('calc(100% - 32px)');
90
+ });
91
+ });
92
+ describe('with variant=medium attribute', function () {
93
+ it('has medium modal width', async function () {
94
+ const el = await createFixture(TEMPLATES.mediumModal);
95
+ const modalWindow = el.shadowRoot.querySelector('#dialog');
96
+ expect(getComputedStyle(modalWindow).getPropertyValue('max-width'))
97
+ .to.equal('calc(100% - 32px)');
98
+ });
99
+ });
100
+ describe('with variant=large attribute', function () {
101
+ it('has large modal width', async function () {
102
+ const el = await createFixture(TEMPLATES.largeModal);
103
+ const modalWindow = el.shadowRoot.querySelector('#dialog');
104
+ expect(getComputedStyle(modalWindow).getPropertyValue('max-width'))
105
+ .to.equal('calc(100% - 32px)');
106
+ });
107
+ });
108
+ });
109
+ describe('on large screen', function () {
110
+ beforeEach(async function () {
111
+ await setViewport({ width: 1000, height: 800 });
112
+ });
113
+ describe('with variant=small attribute', function () {
114
+ it('has small modal width', async function () {
115
+ const el = await createFixture(TEMPLATES.smallModal);
116
+ const modalWindow = el.shadowRoot.querySelector('#dialog');
117
+ expect(getComputedStyle(modalWindow).getPropertyValue('max-width'))
118
+ .to.equal('calc(100% - 32px)');
119
+ });
120
+ });
121
+ describe('with variant=medium attribute', function () {
122
+ it('has medium modal width', async function () {
123
+ const el = await createFixture(TEMPLATES.mediumModal);
124
+ const modalWindow = el.shadowRoot.querySelector('#dialog');
125
+ expect(getComputedStyle(modalWindow).getPropertyValue('max-width'))
126
+ .to.equal('calc(100% - 32px)');
127
+ });
128
+ });
129
+ describe('with variant=large attribute', function () {
130
+ it('has large modal width', async function () {
131
+ const el = await createFixture(TEMPLATES.largeModal);
132
+ const modalWindow = el.shadowRoot.querySelector('#dialog');
133
+ expect(getComputedStyle(modalWindow).getPropertyValue('max-width'))
134
+ .to.equal('calc(100% - 32px)');
135
+ });
136
+ });
137
+ });
138
+ describe('on medium screen', function () {
139
+ beforeEach(async function () {
140
+ await setViewport({ width: 768, height: 600 });
141
+ });
142
+ describe('with variant=small attribute', function () {
143
+ it('has small modal width', async function () {
144
+ const el = await createFixture(TEMPLATES.smallModal);
145
+ const modalWindow = el.shadowRoot.querySelector('#dialog');
146
+ expect(getComputedStyle(modalWindow).getPropertyValue('max-width'))
147
+ .to.equal('calc(100% - 32px)');
148
+ });
149
+ });
150
+ describe('with variant=medium attribute', function () {
151
+ it('has medium modal width', async function () {
152
+ const el = await createFixture(TEMPLATES.mediumModal);
153
+ const modalWindow = el.shadowRoot.querySelector('#dialog');
154
+ expect(getComputedStyle(modalWindow).getPropertyValue('max-width'))
155
+ .to.equal('calc(100% - 32px)');
156
+ });
157
+ });
158
+ describe('with variant=large attribute', function () {
159
+ it('has large modal width', async function () {
160
+ const el = await createFixture(TEMPLATES.largeModal);
161
+ const modalWindow = el.shadowRoot.querySelector('#dialog');
162
+ expect(getComputedStyle(modalWindow).getPropertyValue('max-width'))
163
+ .to.equal('calc(100% - 32px)');
164
+ });
165
+ });
166
+ });
167
+ describe('on small screen', function () {
168
+ beforeEach(async function () {
169
+ await setViewport({ width: 480, height: 540 });
170
+ });
171
+ describe('with variant=small attribute', function () {
172
+ it('has small modal width', async function () {
173
+ const el = await createFixture(TEMPLATES.smallModal);
174
+ const modalWindow = el.shadowRoot.querySelector('#dialog');
175
+ expect(getComputedStyle(modalWindow).getPropertyValue('max-width'))
176
+ .to.equal('calc(100% - 32px)');
177
+ });
178
+ });
179
+ describe('with variant=medium attribute', function () {
180
+ it('has medium modal width', async function () {
181
+ const el = await createFixture(TEMPLATES.mediumModal);
182
+ const modalWindow = el.shadowRoot.querySelector('#dialog');
183
+ expect(getComputedStyle(modalWindow).getPropertyValue('max-width'))
184
+ .to.equal('calc(100% - 32px)');
185
+ });
186
+ });
187
+ describe('with variant=large attribute', function () {
188
+ it('has large modal width', async function () {
189
+ const el = await createFixture(TEMPLATES.largeModal);
190
+ const modalWindow = el.shadowRoot.querySelector('#dialog');
191
+ expect(getComputedStyle(modalWindow).getPropertyValue('max-width'))
192
+ .to.equal('calc(100% - 32px)');
193
+ });
194
+ });
195
+ });
196
+ });
197
+ //# sourceMappingURL=pf-modal.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pf-modal.spec.js","sourceRoot":"","sources":["pf-modal.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAC;AACpE,OAAO,2CAA2C,CAAC;AAEnD,qCAAqC;AACrC,6DAA6D;AAC7D,MAAM,SAAS,GAAG;IAChB,WAAW,EAAE,IAAI,CAAA,uBAAuB;IAExC,UAAU,EAAE,IAAI,CAAA;;;;;GAKf;IAED,WAAW,EAAE,IAAI,CAAA;;;;;GAKhB;IAED,UAAU,EAAE,IAAI,CAAA;;;;;GAKf;CAEF,CAAC;AAEF,QAAQ,CAAC,YAAY,EAAE;IACrB,EAAE,CAAC,2BAA2B,EAAE;QAC9B,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAC1E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gBAAgB,EAAE,KAAK;QACxB,MAAM,EAAE,GAAG,MAAM,aAAa,CAAU,SAAS,CAAC,WAAW,CAAC,CAAC;QAC/D,MAAM,CAAC,EAAE,EAAE,2CAA2C,CAAC;aAClD,EAAE,CAAC,EA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AM,WAAW,GAAG,EAAE,CAAC,UAAW,CAAC,aAAa,CAAC,SAAS,CAAE,CAAC;gBAC7D,MAAM,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;qBAC9D,EAAE,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;YACrC,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { expect, nextFrame, html } from '@open-wc/testing';\nimport { createFixture } from '@patternfly/pfe-tools/test/create-fixture.js';\nimport { setViewport } from '@web/test-runner-commands';\nimport { PfModal } from '@patternfly/elements/pf-modal/pf-modal.js';\nimport '@patternfly/pfe-tools/test/stub-logger.js';\n\n// One element, defined here, is used\n// in multiple tests. It's torn down and recreated each time.\nconst TEMPLATES = {\n testElement: html`<pf-modal></pf-modal>`,\n\n smallModal: html`\n <pf-modal variant=\"small\">\n <h2 slot=\"header\">Small modal</h2>\n <p>Lorem ipsum dolor sit amet, <a href=\"#foo\">consectetur adipisicing</a> elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>\n </pf-modal>\n `,\n\n mediumModal: html`\n <pf-modal variant=\"medium\">\n <h2 slot=\"header\">Medium modal</h2>\n <p>Lorem ipsum dolor sit amet, <a href=\"#foo\">consectetur adipisicing</a> elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>\n </pf-modal>\n `,\n\n largeModal: html`\n <pf-modal variant=\"large\">\n <h2 slot=\"header\">Large modal</h2>\n <p>Lorem ipsum dolor sit amet, <a href=\"#foo\">consectetur adipisicing</a> elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>\n </pf-modal>\n `,\n\n};\n\ndescribe('<pf-modal>', function() {\n it('imperatively instantiates', function() {\n expect(document.createElement('pf-modal')).to.be.an.instanceof(PfModal);\n });\n\n it('should upgrade', async function() {\n const el = await createFixture<PfModal>(TEMPLATES.testElement);\n expect(el, 'pf-modal should be an instance of PfModal')\n .to.be.an.instanceOf(customElements.get('pf-modal'))\n .and\n .to.be.an.instanceOf(PfModal);\n });\n\n // Example test.\n it('should apply attributes correctly', async function() {\n // Use the same markup that's declared at the top of the file.\n const el = await createFixture<PfModal>(html`\n <pf-modal>\n <h2 slot=\"header\">Modal with a header</h2>\n <p>Lorem ipsum dolor sit amet, <a href=\"#foo\">consectetur adipisicing</a> elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>\n </pf-modal>\n `);\n const modalWindow = el.shadowRoot!.querySelector('#dialog')!;\n const button = el.shadowRoot!.querySelector('[part=close-button]')!;\n\n await nextFrame();\n\n expect(modalWindow.getAttribute('tabindex'), 'dialog tabindex').to.equal('0');\n expect(modalWindow.hasAttribute('hidden'), 'hidden').to.be.true;\n expect(button.getAttribute('aria-label'), 'button aria-label').to.equal('Close dialog');\n });\n\n it('should open the modal window when the trigger is clicked', async function() {\n const el = await createFixture<PfModal>(html`\n <pf-modal trigger=\"trigger\">\n <h2 slot=\"header\">Modal with a header</h2>\n <p>Lorem ipsum dolor sit amet, <a href=\"#foo\">consectetur adipisicing</a> elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>\n </pf-modal>\n <pf-button id=\"trigger\">Open a modal</pf-button>\n `);\n const modalWindow = el.shadowRoot!.querySelector('#dialog')!;\n const trigger = document.getElementById('trigger')!;\n\n trigger.click();\n await el.updateComplete;\n\n expect(modalWindow.hasAttribute('hidden')).to.not.be.true;\n\n // reset\n el.close();\n await el.updateComplete;\n\n expect(modalWindow.hasAttribute('hidden')).to.be.true;\n });\n\n it('should remove the hidden attribute from the host on upgrade', async function() {\n const el = await createFixture<PfModal>(TEMPLATES.testElement);\n\n await new Promise(r => setTimeout(r, 25));\n // test for the hidden attribute on the host\n expect(el.hasAttribute('hidden')).to.not.be.true;\n });\n\n describe('on extra large screen', function() {\n beforeEach(async function() {\n await setViewport({ width: 1600, height: 1200 });\n });\n\n describe('with variant=small attribute', function() {\n it('has small modal width', async function() {\n const el = await createFixture<PfModal>(TEMPLATES.smallModal);\n const modalWindow = el.shadowRoot!.querySelector('#dialog')!;\n expect(getComputedStyle(modalWindow).getPropertyValue('max-width'))\n .to.equal('calc(100% - 32px)');\n });\n });\n\n describe('with variant=medium attribute', function() {\n it('has medium modal width', async function() {\n const el = await createFixture<PfModal>(TEMPLATES.mediumModal);\n const modalWindow = el.shadowRoot!.querySelector('#dialog')!;\n expect(getComputedStyle(modalWindow).getPropertyValue('max-width'))\n .to.equal('calc(100% - 32px)');\n });\n });\n\n describe('with variant=large attribute', function() {\n it('has large modal width', async function() {\n const el = await createFixture<PfModal>(TEMPLATES.largeModal);\n const modalWindow = el.shadowRoot!.querySelector('#dialog')!;\n expect(getComputedStyle(modalWindow).getPropertyValue('max-width'))\n .to.equal('calc(100% - 32px)');\n });\n });\n });\n\n describe('on large screen', function() {\n beforeEach(async function() {\n await setViewport({ width: 1000, height: 800 });\n });\n\n describe('with variant=small attribute', function() {\n it('has small modal width', async function() {\n const el = await createFixture<PfModal>(TEMPLATES.smallModal);\n const modalWindow = el.shadowRoot!.querySelector('#dialog')!;\n expect(getComputedStyle(modalWindow).getPropertyValue('max-width'))\n .to.equal('calc(100% - 32px)');\n });\n });\n\n describe('with variant=medium attribute', function() {\n it('has medium modal width', async function() {\n const el = await createFixture<PfModal>(TEMPLATES.mediumModal);\n const modalWindow = el.shadowRoot!.querySelector('#dialog')!;\n expect(getComputedStyle(modalWindow).getPropertyValue('max-width'))\n .to.equal('calc(100% - 32px)');\n });\n });\n\n describe('with variant=large attribute', function() {\n it('has large modal width', async function() {\n const el = await createFixture<PfModal>(TEMPLATES.largeModal);\n const modalWindow = el.shadowRoot!.querySelector('#dialog')!;\n expect(getComputedStyle(modalWindow).getPropertyValue('max-width'))\n .to.equal('calc(100% - 32px)');\n });\n });\n });\n\n describe('on medium screen', function() {\n beforeEach(async function() {\n await setViewport({ width: 768, height: 600 });\n });\n\n describe('with variant=small attribute', function() {\n it('has small modal width', async function() {\n const el = await createFixture<PfModal>(TEMPLATES.smallModal);\n const modalWindow = el.shadowRoot!.querySelector('#dialog')!;\n expect(getComputedStyle(modalWindow).getPropertyValue('max-width'))\n .to.equal('calc(100% - 32px)');\n });\n });\n\n describe('with variant=medium attribute', function() {\n it('has medium modal width', async function() {\n const el = await createFixture<PfModal>(TEMPLATES.mediumModal);\n const modalWindow = el.shadowRoot!.querySelector('#dialog')!;\n expect(getComputedStyle(modalWindow).getPropertyValue('max-width'))\n .to.equal('calc(100% - 32px)');\n });\n });\n\n describe('with variant=large attribute', function() {\n it('has large modal width', async function() {\n const el = await createFixture<PfModal>(TEMPLATES.largeModal);\n const modalWindow = el.shadowRoot!.querySelector('#dialog')!;\n expect(getComputedStyle(modalWindow).getPropertyValue('max-width'))\n .to.equal('calc(100% - 32px)');\n });\n });\n });\n\n describe('on small screen', function() {\n beforeEach(async function() {\n await setViewport({ width: 480, height: 540 });\n });\n\n describe('with variant=small attribute', function() {\n it('has small modal width', async function() {\n const el = await createFixture<PfModal>(TEMPLATES.smallModal);\n const modalWindow = el.shadowRoot!.querySelector('#dialog')!;\n expect(getComputedStyle(modalWindow).getPropertyValue('max-width'))\n .to.equal('calc(100% - 32px)');\n });\n });\n\n describe('with variant=medium attribute', function() {\n it('has medium modal width', async function() {\n const el = await createFixture<PfModal>(TEMPLATES.mediumModal);\n const modalWindow = el.shadowRoot!.querySelector('#dialog')!;\n expect(getComputedStyle(modalWindow).getPropertyValue('max-width'))\n .to.equal('calc(100% - 32px)');\n });\n });\n\n describe('with variant=large attribute', function() {\n it('has large modal width', async function() {\n const el = await createFixture<PfModal>(TEMPLATES.largeModal);\n const modalWindow = el.shadowRoot!.querySelector('#dialog')!;\n expect(getComputedStyle(modalWindow).getPropertyValue('max-width'))\n .to.equal('calc(100% - 32px)');\n });\n });\n });\n});\n"]}
@@ -14,7 +14,7 @@ export declare class PfPanel extends LitElement {
14
14
  static readonly styles: CSSStyleSheet[];
15
15
  scrollable: boolean;
16
16
  variant?: 'raised' | 'bordered';
17
- render(): import("lit").TemplateResult<1>;
17
+ render(): import("lit-html").TemplateResult<1>;
18
18
  }
19
19
  declare global {
20
20
  interface HTMLElementTagNameMap {
@@ -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-panel';
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-panel.e2e.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pf-panel.e2e.js","sourceRoot":"","sources":["pf-panel.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAC;AAEnF,MAAM,OAAO,GAAG,UAAU,CAAC;AAE3B,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-panel';\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,22 @@
1
+ import { expect, html } from '@open-wc/testing';
2
+ import { createFixture } from '@patternfly/pfe-tools/test/create-fixture.js';
3
+ import { PfPanel } from '@patternfly/elements/pf-panel/pf-panel.js';
4
+ describe('<pf-panel>', function () {
5
+ describe('simply instantiating', function () {
6
+ let element;
7
+ beforeEach(async function () {
8
+ element = await createFixture(html `<pf-panel></pf-panel>`);
9
+ });
10
+ it('imperatively instantiates', function () {
11
+ expect(document.createElement('pf-panel')).to.be.an.instanceof(PfPanel);
12
+ });
13
+ it('should upgrade', function () {
14
+ const klass = customElements.get('pf-panel');
15
+ expect(element)
16
+ .to.be.an.instanceOf(klass)
17
+ .and
18
+ .to.be.an.instanceOf(PfPanel);
19
+ });
20
+ });
21
+ });
22
+ //# sourceMappingURL=pf-panel.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pf-panel.spec.js","sourceRoot":"","sources":["pf-panel.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAC;AAEpE,QAAQ,CAAC,YAAY,EAAE;IACrB,QAAQ,CAAC,sBAAsB,EAAE;QAC/B,IAAI,OAAgB,CAAC;QACrB,UAAU,CAAC,KAAK;YACd,OAAO,GAAG,MAAM,aAAa,CAAW,IAAI,CAAA,uBAAuB,CAAC,CAAC;QACvE,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,2BAA2B,EAAE;YAC9B,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAC1E,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,gBAAgB,EAAE;YACnB,MAAM,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YAC7C,MAAM,CAAC,OAAO,CAAC;iBACV,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;iBAC1B,GAAG;iBACH,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { expect, html } from '@open-wc/testing';\nimport { createFixture } from '@patternfly/pfe-tools/test/create-fixture.js';\nimport { PfPanel } from '@patternfly/elements/pf-panel/pf-panel.js';\n\ndescribe('<pf-panel>', function() {\n describe('simply instantiating', function() {\n let element: PfPanel;\n beforeEach(async function() {\n element = await createFixture <PfPanel>(html`<pf-panel></pf-panel>`);\n });\n\n it('imperatively instantiates', function() {\n expect(document.createElement('pf-panel')).to.be.an.instanceof(PfPanel);\n });\n\n it('should upgrade', function() {\n const klass = customElements.get('pf-panel');\n expect(element)\n .to.be.an.instanceOf(klass)\n .and\n .to.be.an.instanceOf(PfPanel);\n });\n });\n});\n"]}
@@ -19,9 +19,7 @@ export declare class PopoverShownEvent extends ComposedEvent {
19
19
  }
20
20
  /**
21
21
  * A **Popover** displays content in a non-modal dialog and adds contextual information or provides resources via text and links.
22
- *
23
22
  * @summary Toggle the visibility of helpful or contextual information.
24
- *
25
23
  * @slot -
26
24
  * The default slot holds invoking element.
27
25
  * Typically this would be an icon, button, or other small sized element.
@@ -35,7 +33,6 @@ export declare class PopoverShownEvent extends ComposedEvent {
35
33
  * This slot renders the content that will be displayed inside of the body of the popover.
36
34
  * @slot footer
37
35
  * This slot renders the content that will be displayed inside of the footer of the popover.
38
- *
39
36
  * @csspart container - The component wrapper
40
37
  * @csspart content - The content wrapper
41
38
  * @csspart header - The header element; only visible if both an icon annd heading are provided.
@@ -44,7 +41,6 @@ export declare class PopoverShownEvent extends ComposedEvent {
44
41
  * @csspart close-button - The close button
45
42
  * @csspart body - The container for the body content
46
43
  * @csspart footer - The container for the footer content
47
- *
48
44
  * @cssprop {<length>} --pf-c-popover__arrow--Height
49
45
  * Height of the arrow
50
46
  * {@default `1.5625rem`}
@@ -241,7 +237,7 @@ export declare class PfPopover extends LitElement {
241
237
  private _slottedTrigger?;
242
238
  private _arrow;
243
239
  constructor();
244
- render(): import("lit").TemplateResult<1>;
240
+ render(): import("lit-html").TemplateResult<1>;
245
241
  disconnectedCallback(): void;
246
242
  /**
247
243
  * Removes event listeners from the old trigger element and attaches
@@ -39,9 +39,7 @@ export class PopoverShownEvent extends ComposedEvent {
39
39
  }
40
40
  /**
41
41
  * A **Popover** displays content in a non-modal dialog and adds contextual information or provides resources via text and links.
42
- *
43
42
  * @summary Toggle the visibility of helpful or contextual information.
44
- *
45
43
  * @slot -
46
44
  * The default slot holds invoking element.
47
45
  * Typically this would be an icon, button, or other small sized element.
@@ -55,7 +53,6 @@ export class PopoverShownEvent extends ComposedEvent {
55
53
  * This slot renders the content that will be displayed inside of the body of the popover.
56
54
  * @slot footer
57
55
  * This slot renders the content that will be displayed inside of the footer of the popover.
58
- *
59
56
  * @csspart container - The component wrapper
60
57
  * @csspart content - The content wrapper
61
58
  * @csspart header - The header element; only visible if both an icon annd heading are provided.
@@ -64,7 +61,6 @@ export class PopoverShownEvent extends ComposedEvent {
64
61
  * @csspart close-button - The close button
65
62
  * @csspart body - The container for the body content
66
63
  * @csspart footer - The container for the footer content
67
- *
68
64
  * @cssprop {<length>} --pf-c-popover__arrow--Height
69
65
  * Height of the arrow
70
66
  * {@default `1.5625rem`}
@@ -236,7 +232,9 @@ let PfPopover = PfPopover_1 = class PfPopover extends LitElement {
236
232
  const headingSlotWithFallback = html `
237
233
  <slot id="heading" name="heading" part="heading" ?hidden=${!hasHeading}>${headingContent}</slot>
238
234
  `;
239
- const headerIcon = this.icon ?? PfPopover_1.alertIcons.get(this.alertSeverity) ?? '';
235
+ const headerIcon = this.icon
236
+ ?? PfPopover_1.alertIcons.get(this.alertSeverity)
237
+ ?? '';
240
238
  return html `
241
239
  <div id="container"
242
240
  style="${styleMap(styles)}"
@@ -411,7 +409,11 @@ __decorate([
411
409
  property({ type: Boolean, reflect: true, attribute: 'no-flip' })
412
410
  ], PfPopover.prototype, "noFlip", void 0);
413
411
  __decorate([
414
- property({ type: Number, reflect: true, attribute: 'heading-level' })
412
+ property({
413
+ type: Number,
414
+ reflect: true,
415
+ attribute: 'heading-level',
416
+ })
415
417
  ], PfPopover.prototype, "headingLevel", void 0);
416
418
  __decorate([
417
419
  property({ reflect: true, attribute: 'icon-set' })
@@ -426,7 +428,10 @@ __decorate([
426
428
  property({ reflect: true, attribute: 'accessible-close-label' })
427
429
  ], PfPopover.prototype, "accessibleCloseLabel", void 0);
428
430
  __decorate([
429
- deprecation({ alias: 'accessible-close-label', attribute: 'close-label' })
431
+ deprecation({
432
+ alias: 'accessible-close-label',
433
+ attribute: 'close-label',
434
+ })
430
435
  ], PfPopover.prototype, "closeButtonLabel", void 0);
431
436
  __decorate([
432
437
  property({ reflect: true, attribute: 'alert-severity-text' })
@@ -1 +1 @@
1
- {"version":3,"file":"pf-popover.js","sourceRoot":"","sources":["pf-popover.ts"],"names":[],"mappings":";;;AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAuB,MAAM,KAAK,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,6DAA6D,CAAC;AACpG,OAAO,EAAE,cAAc,EAAE,MAAM,qDAAqD,CAAC;AACrF,OAAO,EAAE,KAAK,EAAE,MAAM,0CAA0C,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAElF,OAAO,6CAA6C,CAAC;;;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,gDAAgD,CAAC;AAE7E,MAAM,aAAa,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAU,CAAC;AAM/C,MAAM,OAAO,gBAAiB,SAAQ,aAAa;IACjD;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uDAA+B;AAKpB;IAA3E,WAAW,CAAC,EAAE,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;mDAA2B;AAMvC;IAA9D,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAAC;oDAA4B;AASvF;IAJF,QAAQ,CAAC;QACR,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,IAAI;QACb,SAAS,EAAE,kBAAkB;KAC9B,CAAC;iDAA0B;AAKC;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAAkB;AAEnB;IAA1B,KAAK,CAAC,UAAU,CAAC;2CAAsC;AAC7B;IAA1B,KAAK,CAAC,UAAU,CAAC;kDAA8C;AACvC;IAAxB,KAAK,CAAC,QAAQ,CAAC;yCAAiC;AAoJpC;IAAZ,KAAK;uCAEL;AAKY;IAAZ,KAAK;qCAcL;AAKY;IAAZ,KAAK;qCAQL;AAzTU,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CA0TrB","sourcesContent":["import { LitElement, nothing, html, type PropertyValues } from 'lit';\nimport { customElement } from 'lit/decorators/custom-element.js';\nimport { property } from 'lit/decorators/property.js';\nimport { query } from 'lit/decorators/query.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { FloatingDOMController } from '@patternfly/pfe-core/controllers/floating-dom-controller.js';\nimport { SlotController } from '@patternfly/pfe-core/controllers/slot-controller.js';\nimport { bound } from '@patternfly/pfe-core/decorators/bound.js';\nimport { ComposedEvent, StringListConverter } from '@patternfly/pfe-core/core.js';\nimport type { Placement } from '@patternfly/pfe-core/controllers/floating-dom-controller.js';\nimport '@patternfly/elements/pf-button/pf-button.js';\nimport styles from './pf-popover.css';\nimport { deprecation } from '@patternfly/pfe-core/decorators/deprecation.js';\n\nconst headingLevels = [2, 3, 4, 5, 6] as const;\n\ntype HeadingLevel = (typeof headingLevels)[number];\n\ntype AlertSeverity = 'default' | 'info' | 'warning' | 'success' | 'danger';\n\nexport class PopoverHideEvent extends ComposedEvent {\n constructor() {\n super('hide');\n }\n}\n\nexport class PopoverHiddenEvent extends ComposedEvent {\n constructor() {\n super('hidden');\n }\n}\n\nexport class PopoverShowEvent extends ComposedEvent {\n constructor() {\n super('show');\n }\n}\n\nexport class PopoverShownEvent extends ComposedEvent {\n constructor() {\n super('shown');\n }\n}\n\n/**\n * A **Popover** displays content in a non-modal dialog and adds contextual information or provides resources via text and links.\n *\n * @summary Toggle the visibility of helpful or contextual information.\n *\n * @slot -\n * The default slot holds invoking element.\n * Typically this would be an icon, button, or other small sized element.\n * @slot heading\n * This slot renders the content that will be displayed inside of the header of the popover.\n * Typically this would be a heading element.\n * @slot icon\n * This slot renders the icon that will be displayed inside the header of the popover,\n * before the heading.\n * @slot body\n * This slot renders the content that will be displayed inside of the body of the popover.\n * @slot footer\n * This slot renders the content that will be displayed inside of the footer of the popover.\n *\n * @csspart container - The component wrapper\n * @csspart content - The content wrapper\n * @csspart header - The header element; only visible if both an icon annd heading are provided.\n * @csspart heading - The heading element\n * @csspart icon - The header icon\n * @csspart close-button - The close button\n * @csspart body - The container for the body content\n * @csspart footer - The container for the footer content\n *\n * @cssprop {<length>} --pf-c-popover__arrow--Height\n * Height of the arrow\n * {@default `1.5625rem`}\n * @cssprop {<length>} --pf-c-popover__arrow--Width\n * Width of the arrow\n * {@default `1.5625rem`}\n * @cssprop {<color>} --pf-c-popover__title-text--Color\n * Heading font color\n * {@default `inherit`}\n * @cssprop {<color>} --pf-c-popover__title-icon--Color\n * Heading icon font color\n * {@default `#151515`}\n * @cssprop {<color>} --pf-c-popover__arrow--BackgroundColor\n * Arrow background color\n * {@default `#fff`}\n * @cssprop --pf-c-popover__arrow--BoxShadow\n * Arrow box shadow\n * {@default `0 0.5rem 1rem 0 rgba(3, 3, 3, 0.16), 0 0 0.375rem 0 rgba(3, 3, 3, 0.08)`}\n * @cssprop --pf-c-popover--BoxShadow\n * Popover box shadow\n * {@default `0 0.5rem 1rem 0 rgba(3, 3, 3, 0.16), 0 0 0.375rem 0 rgba(3, 3, 3, 0.08)`}\n * @cssprop {<length>} --pf-c-tooltip__content--PaddingTop\n * Popover top padding\n * {@default `1rem`}\n * @cssprop {<length>} --pf-c-tooltip__content--PaddingRight\n * Popover right padding\n * {@default `1rem`}\n * @cssprop {<length>} --pf-c-tooltip__content--PaddingBottom\n * Popover bottom padding\n * {@default `1rem`}\n * @cssprop {<length>} --pf-c-tooltip__content--PaddingLeft\n * Popover left padding\n * {@default `1rem`}\n * @cssprop {<number>} --pf-c-popover--line-height\n * Popover line height\n * {@default `1.5`}\n * @cssprop {<length>} --pf-c-popover__content--FontSize\n * Popover font-size\n * {@default `0.875rem`}\n * @cssprop {<color>} --pf-c-popover__content--BackgroundColor\n * Popover background color\n * {@default `#fff`}\n * @cssprop {<length>} --pf-c-popover--MaxWidth\n * Popover max-width\n * {@default `20.75rem`}\n * @cssprop {<length>} --pf-c-popover--MinWidth\n * Popover min-width\n * {@default `20.75rem`}\n * @cssprop {<number>} --pf-c-popover--c-button--Right\n * Close button right position\n * {@default `0}\n * @cssprop {<number>} --pf-c-popover--c-button--Top\n * Close button top position\n * {@default `0`}\n * @cssprop {<length>} --pf-c-popover--c-button--sibling--PaddingRight\n * Padding between close button and its immediate sibling\n * {@default `3rem`}\n * @cssprop {<length>} --pf-c-popover__title-icon--MarginRight\n * Heading icon right margin\n * {@default `0.5rem`}\n * @cssprop {<length>} --pf-c-popover__title--FontSize\n * Header font-size\n * {@default `1rem`}\n * @cssprop {<length>} --pf-c-popover__title--MarginBottom\n * Header bottom margin\n * {@default `0.5rem`}\n * @cssprop {<number>} --pf-c-popover__title--LineHeight\n * Header line height\n * {@default `1.5`}\n * @cssprop {<string>} --pf-c-popover__title--FontFamily\n * Header font-family\n * {@default `'RedHatDisplay', 'Overpass', overpass, helvetica, arial, sans-serif`}\n * @cssprop {<length>} --pf-c-popover__footer--MarginTop\n * Footer top margin\n * {@default `1rem`}\n * @cssprop {<color>} --pf-c-popover--m-default__title-text--Color\n * Default alert heading color\n * {@default `#003737`}\n * @cssprop {<color>} --pf-c-popover--m-default__title-icon--Color\n * Default alert icon color\n * {@default `#009596`}\n * @cssprop {<color>} --pf-c-popover--m-info__title-text--Color\n * Default alert heading color\n * {@default `#002952`}\n * @cssprop {<color>} --pf-c-popover--m-info__title-icon--Color\n * Default alert icon color\n * {@default `#2b9af3`}\n * @cssprop {<color>} --pf-c-popover--m-warning__title-text--Color\n * Default alert heading color\n * {@default `#795600`}\n * @cssprop {<color>} --pf-c-popover--m-warning__title-icon--Color\n * Default alert icon color\n * {@default `#f0ab00`}\n * @cssprop {<color>} --pf-c-popover--m-success__title-text--Color\n * Default alert heading color\n * {@default `#1e4f18`}\n * @cssprop {<color>} --pf-c-popover--m-success__title-icon--Color\n * Default alert icon color\n * {@default `#3e8635`}\n * @cssprop {<color>} --pf-c-popover--m-danger__title-text--Color\n * Default alert heading color\n * {@default `#a30000`}\n * @cssprop {<color>} --pf-c-popover--m-danger__title-icon--Color\n * Default alert icon color\n * {@default `#c9190b`}\n */\n@customElement('pf-popover')\nexport class PfPopover extends LitElement {\n static readonly styles = [styles];\n\n private static instances = new Set<PfPopover>();\n\n private static alertIcons = new Map(Object.entries({\n default: 'bell',\n info: 'circle-info',\n success: 'circle-check',\n warning: 'triangle-exclamation',\n danger: 'circle-exclamation',\n } satisfies Record<AlertSeverity, string>) as [AlertSeverity, string][]);\n\n static {\n document.addEventListener('click', function(event) {\n for (const instance of PfPopover.instances) {\n if (!instance.noOutsideClick) {\n instance.#outsideClick(event);\n }\n }\n });\n }\n\n /**\n * Indicates the initial popover position.\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 `top`.\n */\n @property({ reflect: true }) position: Placement = 'top';\n\n /**\n * The content rendered in the popover's heading.\n */\n @property({ reflect: true }) heading?: string;\n\n /**\n * The content rendered in the popover's body.\n */\n @property({ reflect: true }) body?: string;\n\n /**\n * The content rendered in the popover's footer.\n */\n @property({ reflect: true }) footer?: string;\n\n /**\n * The icon placed before the popover's heading.\n */\n @property({ reflect: true }) icon?: string;\n\n /**\n * The accessible label for the popover. This is required if the no heading is set.\n */\n @property({ reflect: true }) label?: string;\n\n /**\n * The distance to set between the popover and its trigger element.\n */\n @property({ type: Number, reflect: true }) distance?: number;\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 /**\n * Disable the flip behavior. The default is `false`.\n */\n @property({ type: Boolean, reflect: true, attribute: 'no-flip' }) noFlip = false;\n\n /**\n * The heading level to use for the popover's header. The default is `h6`.\n */\n @property({ type: Number, reflect: true, attribute: 'heading-level' }) headingLevel?: HeadingLevel;\n\n /**\n * Indicates which icon set to use for the header's icon.\n * The default is `fas` (Font Awesome Free Solid).\n */\n @property({ reflect: true, attribute: 'icon-set' }) iconSet?: string;\n\n /**\n * Hide the close button. The default is `false`.\n */\n @property({ type: Boolean, reflect: true, attribute: 'hide-close' }) hideClose?: boolean;\n\n /**\n * Indicates the severity variant to use for the alert popover.\n * There are five options: `default`, `info`, `warning`, `success`, and `danger`.\n */\n @property({ reflect: true, attribute: 'alert-severity' }) alertSeverity?: AlertSeverity;\n\n /**\n * The accessible label for the popover's close button. The default is `Close popover`.\n */\n @property({ reflect: true, attribute: 'accessible-close-label' }) accessibleCloseLabel?: string;\n\n /**\n * @deprecated do not use the color-palette attribute, which was added by mistake. use context-providing containers (e.g. rh-card) instead\n */\n @deprecation({ alias: 'accessible-close-label', attribute: 'close-label' }) closeButtonLabel?: string;\n\n /**\n * The text announced by the screen reader to indicate the popover's severity.\n * The default is `${alertSeverity} alert:`.\n */\n @property({ reflect: true, attribute: 'alert-severity-text' }) alertSeverityText?: string;\n\n /**\n * Don't hide the popover when clicking ouside of it.\n */\n @property({\n type: Boolean,\n reflect: true,\n attribute: 'no-outside-click',\n }) noOutsideClick?: boolean;\n\n /**\n * The ID of the element to attach the popover to.\n */\n @property({ reflect: true }) trigger?: string;\n\n @query('#popover') private _popover!: HTMLDialogElement;\n @query('#trigger') private _slottedTrigger?: HTMLElement | null;\n @query('#arrow') private _arrow!: HTMLDivElement;\n\n /** True before the show animation begins and after the hide animation ends */\n #hideDialog = true;\n\n #referenceTrigger?: HTMLElement | null = null;\n\n #float = new FloatingDOMController(this, {\n content: () => this._popover,\n arrow: () => this._arrow,\n invoker: () => this.#referenceTrigger || this._slottedTrigger,\n });\n\n #slots = new SlotController(this, null, 'icon', 'heading', 'body', 'footer');\n\n constructor() {\n super();\n this.addEventListener('keydown', this.#onKeydown);\n }\n\n render() {\n const { alignment, anchor, styles } = this.#float;\n const hasFooter = this.#slots.hasSlotted('footer') || !!this.footer;\n const hasHeading = this.#slots.hasSlotted('heading') || !!this.heading;\n const hasIcon = this.#slots.hasSlotted('icon') || !!this.icon || !!this.alertSeverity;\n\n // https://github.com/asyncLiz/minify-html-literals/issues/37\n let headingContent = html`<h6>${this.heading ?? ''}</h6>`;\n switch (this.headingLevel) {\n case 2: headingContent = html`<h2>${this.heading ?? ''}</h2>`; break;\n case 3: headingContent = html`<h3>${this.heading ?? ''}</h3>`; break;\n case 4: headingContent = html`<h4>${this.heading ?? ''}</h4>`; break;\n case 5: headingContent = html`<h5>${this.heading ?? ''}</h5>`; break;\n }\n\n const headingSlotWithFallback = html`\n <slot id=\"heading\" name=\"heading\" part=\"heading\" ?hidden=${!hasHeading}>${headingContent}</slot>\n `;\n\n const headerIcon = this.icon ?? PfPopover.alertIcons.get(this.alertSeverity as AlertSeverity) ?? '';\n\n return html`\n <div id=\"container\"\n style=\"${styleMap(styles)}\"\n class=\"${classMap({ [anchor]: !!anchor, [alignment]: !!alignment })}\">\n <slot id=\"trigger\"\n @slotchange=\"${this.#triggerChanged}\"\n @keydown=\"${this.#onKeydown}\"\n @click=\"${this.toggle}\"></slot>\n <dialog id=\"popover\"\n ?hidden=\"${this.#hideDialog}\"\n aria-labelledby=\"heading\"\n aria-describedby=\"body\"\n aria-label=${ifDefined(this.label)}>\n <div id=\"arrow\"></div>\n <div id=\"content\" part=\"content\">\n <pf-button id=\"close-button\"\n part=\"close-button\"\n plain\n label=\"${this.accessibleCloseLabel ?? this.closeButtonLabel ?? 'Close popover'}\"\n @click=\"${this.hide}\"\n @keydown=\"${this.#onKeydown}\"\n ?hidden=\"${this.hideClose}\">\n <svg fill=\"currentColor\" height=\"1em\" width=\"1em\" viewBox=\"0 0 352 512\">\n <path d=\"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z\"/>\n </svg>\n </pf-button>\n ${!(hasHeading && hasIcon) ? headingSlotWithFallback : html`\n <header part=\"header\">\n <span part=\"icon\">\n <slot name=\"icon\">\n <pf-icon icon=\"${headerIcon}\"\n set=\"${ifDefined(this.iconSet)}\"\n size=\"md\"></pf-icon>\n </slot>\n </span>${!this.alertSeverity ? nothing : html`\n <span class=\"visually-hidden\">${this.alertSeverityText ?? `${this.alertSeverity} alert:`}</span>`}\n ${headingSlotWithFallback}\n </header>`}\n <slot id=\"body\" part=\"body\" name=\"body\">${this.body ?? ''}</slot>\n <footer part=\"footer\" ?hidden=${!hasFooter}>\n <slot name=\"footer\">${this.footer}</slot>\n </footer>\n </div>\n </dialog>\n </div>\n `;\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n PfPopover.instances.delete(this);\n this.#referenceTrigger?.removeEventListener('click', this.toggle);\n this.#referenceTrigger?.removeEventListener('keydown', this.#onKeydown);\n }\n\n #getReferenceTrigger() {\n const root = this.getRootNode() as Document | ShadowRoot;\n return !this.trigger ? null : root.getElementById(this.trigger);\n }\n\n #triggerChanged() {\n const oldReferenceTrigger = this.#referenceTrigger;\n this.#referenceTrigger = this.#getReferenceTrigger();\n if (oldReferenceTrigger !== this.#referenceTrigger) {\n oldReferenceTrigger?.removeEventListener('click', this.toggle);\n oldReferenceTrigger?.removeEventListener('keydown', this.#onKeydown);\n this.#referenceTrigger?.addEventListener('click', this.toggle);\n this.#referenceTrigger?.addEventListener('keydown', this.#onKeydown);\n }\n }\n\n #onKeydown = (event: KeyboardEvent) => {\n switch (event.key) {\n case 'Escape':\n case 'Esc':\n event.preventDefault();\n this.hide();\n return;\n case 'Enter':\n if (event.target === this.#referenceTrigger || event.target === this._slottedTrigger) {\n event.preventDefault();\n this.show();\n }\n return;\n }\n };\n\n #outsideClick(event: MouseEvent) {\n const path = event.composedPath();\n if (!path.includes(this) && !path.includes(this.#referenceTrigger as HTMLElement)) {\n this.hide();\n }\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.#triggerChanged();\n }\n }\n\n /**\n * Toggle the popover\n */\n @bound async toggle() {\n this.#float.open ? this.hide() : this.show();\n }\n\n /**\n * Opens the popover\n */\n @bound async show() {\n this.#hideDialog = false;\n this.requestUpdate();\n this.dispatchEvent(new PopoverShowEvent());\n await this.updateComplete;\n await this.#float.show({\n offset: this.distance ?? 25,\n placement: this.position,\n flip: !this.noFlip,\n fallbackPlacements: this.flipBehavior,\n });\n this._popover?.show();\n this.dispatchEvent(new PopoverShownEvent());\n PfPopover.instances.add(this);\n }\n\n /**\n * Closes the popover\n */\n @bound async hide() {\n this.dispatchEvent(new PopoverHideEvent());\n await this.#float.hide();\n this._popover?.close();\n this.dispatchEvent(new PopoverHiddenEvent());\n PfPopover.instances.delete(this);\n this.#hideDialog = true;\n this.requestUpdate();\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'pf-popover': PfPopover;\n }\n}\n"]}
1
+ {"version":3,"file":"pf-popover.js","sourceRoot":"","sources":["pf-popover.ts"],"names":[],"mappings":";;;AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAuB,MAAM,KAAK,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,6DAA6D,CAAC;AACpG,OAAO,EAAE,cAAc,EAAE,MAAM,qDAAqD,CAAC;AACrF,OAAO,EAAE,KAAK,EAAE,MAAM,0CAA0C,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAElF,OAAO,6CAA6C,CAAC;;;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,gDAAgD,CAAC;AAE7E,MAAM,aAAa,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAU,CAAC;AAM/C,MAAM,OAAO,gBAAiB,SAAQ,aAAa;IACjD;QACE,KAAK,CAAC,MAAM,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AAC;QACX,KAAK,EAAE,wBAAwB;QAC/B,SAAS,EAAE,aAAa;KACzB,CAAC;mDAA2B;AAMkC;IAA9D,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAAC;oDAA4B;AASvF;IAJF,QAAQ,CAAC;QACR,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,IAAI;QACb,SAAS,EAAE,kBAAkB;KAC9B,CAAC;iDAA0B;AAKC;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAAkB;AAEnB;IAA1B,KAAK,CAAC,UAAU,CAAC;2CAAsC;AAC7B;IAA1B,KAAK,CAAC,UAAU,CAAC;kDAA8C;AACvC;IAAxB,KAAK,CAAC,QAAQ,CAAC;yCAAiC;AAsJpC;IAAZ,KAAK;uCAEL;AAKY;IAAZ,KAAK;qCAcL;AAKY;IAAZ,KAAK;qCAQL;AAlUU,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CAmUrB","sourcesContent":["import { LitElement, nothing, html, type PropertyValues } from 'lit';\nimport { customElement } from 'lit/decorators/custom-element.js';\nimport { property } from 'lit/decorators/property.js';\nimport { query } from 'lit/decorators/query.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { FloatingDOMController } from '@patternfly/pfe-core/controllers/floating-dom-controller.js';\nimport { SlotController } from '@patternfly/pfe-core/controllers/slot-controller.js';\nimport { bound } from '@patternfly/pfe-core/decorators/bound.js';\nimport { ComposedEvent, StringListConverter } from '@patternfly/pfe-core/core.js';\nimport type { Placement } from '@patternfly/pfe-core/controllers/floating-dom-controller.js';\nimport '@patternfly/elements/pf-button/pf-button.js';\nimport styles from './pf-popover.css';\nimport { deprecation } from '@patternfly/pfe-core/decorators/deprecation.js';\n\nconst headingLevels = [2, 3, 4, 5, 6] as const;\n\ntype HeadingLevel = (typeof headingLevels)[number];\n\ntype AlertSeverity = 'default' | 'info' | 'warning' | 'success' | 'danger';\n\nexport class PopoverHideEvent extends ComposedEvent {\n constructor() {\n super('hide');\n }\n}\n\nexport class PopoverHiddenEvent extends ComposedEvent {\n constructor() {\n super('hidden');\n }\n}\n\nexport class PopoverShowEvent extends ComposedEvent {\n constructor() {\n super('show');\n }\n}\n\nexport class PopoverShownEvent extends ComposedEvent {\n constructor() {\n super('shown');\n }\n}\n\n/**\n * A **Popover** displays content in a non-modal dialog and adds contextual information or provides resources via text and links.\n * @summary Toggle the visibility of helpful or contextual information.\n * @slot -\n * The default slot holds invoking element.\n * Typically this would be an icon, button, or other small sized element.\n * @slot heading\n * This slot renders the content that will be displayed inside of the header of the popover.\n * Typically this would be a heading element.\n * @slot icon\n * This slot renders the icon that will be displayed inside the header of the popover,\n * before the heading.\n * @slot body\n * This slot renders the content that will be displayed inside of the body of the popover.\n * @slot footer\n * This slot renders the content that will be displayed inside of the footer of the popover.\n * @csspart container - The component wrapper\n * @csspart content - The content wrapper\n * @csspart header - The header element; only visible if both an icon annd heading are provided.\n * @csspart heading - The heading element\n * @csspart icon - The header icon\n * @csspart close-button - The close button\n * @csspart body - The container for the body content\n * @csspart footer - The container for the footer content\n * @cssprop {<length>} --pf-c-popover__arrow--Height\n * Height of the arrow\n * {@default `1.5625rem`}\n * @cssprop {<length>} --pf-c-popover__arrow--Width\n * Width of the arrow\n * {@default `1.5625rem`}\n * @cssprop {<color>} --pf-c-popover__title-text--Color\n * Heading font color\n * {@default `inherit`}\n * @cssprop {<color>} --pf-c-popover__title-icon--Color\n * Heading icon font color\n * {@default `#151515`}\n * @cssprop {<color>} --pf-c-popover__arrow--BackgroundColor\n * Arrow background color\n * {@default `#fff`}\n * @cssprop --pf-c-popover__arrow--BoxShadow\n * Arrow box shadow\n * {@default `0 0.5rem 1rem 0 rgba(3, 3, 3, 0.16), 0 0 0.375rem 0 rgba(3, 3, 3, 0.08)`}\n * @cssprop --pf-c-popover--BoxShadow\n * Popover box shadow\n * {@default `0 0.5rem 1rem 0 rgba(3, 3, 3, 0.16), 0 0 0.375rem 0 rgba(3, 3, 3, 0.08)`}\n * @cssprop {<length>} --pf-c-tooltip__content--PaddingTop\n * Popover top padding\n * {@default `1rem`}\n * @cssprop {<length>} --pf-c-tooltip__content--PaddingRight\n * Popover right padding\n * {@default `1rem`}\n * @cssprop {<length>} --pf-c-tooltip__content--PaddingBottom\n * Popover bottom padding\n * {@default `1rem`}\n * @cssprop {<length>} --pf-c-tooltip__content--PaddingLeft\n * Popover left padding\n * {@default `1rem`}\n * @cssprop {<number>} --pf-c-popover--line-height\n * Popover line height\n * {@default `1.5`}\n * @cssprop {<length>} --pf-c-popover__content--FontSize\n * Popover font-size\n * {@default `0.875rem`}\n * @cssprop {<color>} --pf-c-popover__content--BackgroundColor\n * Popover background color\n * {@default `#fff`}\n * @cssprop {<length>} --pf-c-popover--MaxWidth\n * Popover max-width\n * {@default `20.75rem`}\n * @cssprop {<length>} --pf-c-popover--MinWidth\n * Popover min-width\n * {@default `20.75rem`}\n * @cssprop {<number>} --pf-c-popover--c-button--Right\n * Close button right position\n * {@default `0}\n * @cssprop {<number>} --pf-c-popover--c-button--Top\n * Close button top position\n * {@default `0`}\n * @cssprop {<length>} --pf-c-popover--c-button--sibling--PaddingRight\n * Padding between close button and its immediate sibling\n * {@default `3rem`}\n * @cssprop {<length>} --pf-c-popover__title-icon--MarginRight\n * Heading icon right margin\n * {@default `0.5rem`}\n * @cssprop {<length>} --pf-c-popover__title--FontSize\n * Header font-size\n * {@default `1rem`}\n * @cssprop {<length>} --pf-c-popover__title--MarginBottom\n * Header bottom margin\n * {@default `0.5rem`}\n * @cssprop {<number>} --pf-c-popover__title--LineHeight\n * Header line height\n * {@default `1.5`}\n * @cssprop {<string>} --pf-c-popover__title--FontFamily\n * Header font-family\n * {@default `'RedHatDisplay', 'Overpass', overpass, helvetica, arial, sans-serif`}\n * @cssprop {<length>} --pf-c-popover__footer--MarginTop\n * Footer top margin\n * {@default `1rem`}\n * @cssprop {<color>} --pf-c-popover--m-default__title-text--Color\n * Default alert heading color\n * {@default `#003737`}\n * @cssprop {<color>} --pf-c-popover--m-default__title-icon--Color\n * Default alert icon color\n * {@default `#009596`}\n * @cssprop {<color>} --pf-c-popover--m-info__title-text--Color\n * Default alert heading color\n * {@default `#002952`}\n * @cssprop {<color>} --pf-c-popover--m-info__title-icon--Color\n * Default alert icon color\n * {@default `#2b9af3`}\n * @cssprop {<color>} --pf-c-popover--m-warning__title-text--Color\n * Default alert heading color\n * {@default `#795600`}\n * @cssprop {<color>} --pf-c-popover--m-warning__title-icon--Color\n * Default alert icon color\n * {@default `#f0ab00`}\n * @cssprop {<color>} --pf-c-popover--m-success__title-text--Color\n * Default alert heading color\n * {@default `#1e4f18`}\n * @cssprop {<color>} --pf-c-popover--m-success__title-icon--Color\n * Default alert icon color\n * {@default `#3e8635`}\n * @cssprop {<color>} --pf-c-popover--m-danger__title-text--Color\n * Default alert heading color\n * {@default `#a30000`}\n * @cssprop {<color>} --pf-c-popover--m-danger__title-icon--Color\n * Default alert icon color\n * {@default `#c9190b`}\n */\n@customElement('pf-popover')\nexport class PfPopover extends LitElement {\n static readonly styles = [styles];\n\n private static instances = new Set<PfPopover>();\n\n private static alertIcons = new Map(Object.entries({\n default: 'bell',\n info: 'circle-info',\n success: 'circle-check',\n warning: 'triangle-exclamation',\n danger: 'circle-exclamation',\n } satisfies Record<AlertSeverity, string>) as [AlertSeverity, string][]);\n\n static {\n document.addEventListener('click', function(event) {\n for (const instance of PfPopover.instances) {\n if (!instance.noOutsideClick) {\n instance.#outsideClick(event);\n }\n }\n });\n }\n\n /**\n * Indicates the initial popover position.\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 `top`.\n */\n @property({ reflect: true }) position: Placement = 'top';\n\n /**\n * The content rendered in the popover's heading.\n */\n @property({ reflect: true }) heading?: string;\n\n /**\n * The content rendered in the popover's body.\n */\n @property({ reflect: true }) body?: string;\n\n /**\n * The content rendered in the popover's footer.\n */\n @property({ reflect: true }) footer?: string;\n\n /**\n * The icon placed before the popover's heading.\n */\n @property({ reflect: true }) icon?: string;\n\n /**\n * The accessible label for the popover. This is required if the no heading is set.\n */\n @property({ reflect: true }) label?: string;\n\n /**\n * The distance to set between the popover and its trigger element.\n */\n @property({ type: Number, reflect: true }) distance?: number;\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 /**\n * Disable the flip behavior. The default is `false`.\n */\n @property({ type: Boolean, reflect: true, attribute: 'no-flip' }) noFlip = false;\n\n /**\n * The heading level to use for the popover's header. The default is `h6`.\n */\n @property({\n type: Number,\n reflect: true,\n attribute: 'heading-level',\n }) headingLevel?: HeadingLevel;\n\n /**\n * Indicates which icon set to use for the header's icon.\n * The default is `fas` (Font Awesome Free Solid).\n */\n @property({ reflect: true, attribute: 'icon-set' }) iconSet?: string;\n\n /**\n * Hide the close button. The default is `false`.\n */\n @property({ type: Boolean, reflect: true, attribute: 'hide-close' }) hideClose?: boolean;\n\n /**\n * Indicates the severity variant to use for the alert popover.\n * There are five options: `default`, `info`, `warning`, `success`, and `danger`.\n */\n @property({ reflect: true, attribute: 'alert-severity' }) alertSeverity?: AlertSeverity;\n\n /**\n * The accessible label for the popover's close button. The default is `Close popover`.\n */\n @property({ reflect: true, attribute: 'accessible-close-label' }) accessibleCloseLabel?: string;\n\n /**\n * @deprecated do not use the color-palette attribute, which was added by mistake. use context-providing containers (e.g. rh-card) instead\n */\n @deprecation({\n alias: 'accessible-close-label',\n attribute: 'close-label',\n }) closeButtonLabel?: string;\n\n /**\n * The text announced by the screen reader to indicate the popover's severity.\n * The default is `${alertSeverity} alert:`.\n */\n @property({ reflect: true, attribute: 'alert-severity-text' }) alertSeverityText?: string;\n\n /**\n * Don't hide the popover when clicking ouside of it.\n */\n @property({\n type: Boolean,\n reflect: true,\n attribute: 'no-outside-click',\n }) noOutsideClick?: boolean;\n\n /**\n * The ID of the element to attach the popover to.\n */\n @property({ reflect: true }) trigger?: string;\n\n @query('#popover') private _popover!: HTMLDialogElement;\n @query('#trigger') private _slottedTrigger?: HTMLElement | null;\n @query('#arrow') private _arrow!: HTMLDivElement;\n\n /** True before the show animation begins and after the hide animation ends */\n #hideDialog = true;\n\n #referenceTrigger?: HTMLElement | null = null;\n\n #float = new FloatingDOMController(this, {\n content: () => this._popover,\n arrow: () => this._arrow,\n invoker: () => this.#referenceTrigger || this._slottedTrigger,\n });\n\n #slots = new SlotController(this, null, 'icon', 'heading', 'body', 'footer');\n\n constructor() {\n super();\n this.addEventListener('keydown', this.#onKeydown);\n }\n\n render() {\n const { alignment, anchor, styles } = this.#float;\n const hasFooter = this.#slots.hasSlotted('footer') || !!this.footer;\n const hasHeading = this.#slots.hasSlotted('heading') || !!this.heading;\n const hasIcon = this.#slots.hasSlotted('icon') || !!this.icon || !!this.alertSeverity;\n\n // https://github.com/asyncLiz/minify-html-literals/issues/37\n let headingContent = html`<h6>${this.heading ?? ''}</h6>`;\n switch (this.headingLevel) {\n case 2: headingContent = html`<h2>${this.heading ?? ''}</h2>`; break;\n case 3: headingContent = html`<h3>${this.heading ?? ''}</h3>`; break;\n case 4: headingContent = html`<h4>${this.heading ?? ''}</h4>`; break;\n case 5: headingContent = html`<h5>${this.heading ?? ''}</h5>`; break;\n }\n\n const headingSlotWithFallback = html`\n <slot id=\"heading\" name=\"heading\" part=\"heading\" ?hidden=${!hasHeading}>${headingContent}</slot>\n `;\n\n const headerIcon = this.icon\n ?? PfPopover.alertIcons.get(this.alertSeverity as AlertSeverity)\n ?? '';\n\n return html`\n <div id=\"container\"\n style=\"${styleMap(styles)}\"\n class=\"${classMap({ [anchor]: !!anchor, [alignment]: !!alignment })}\">\n <slot id=\"trigger\"\n @slotchange=\"${this.#triggerChanged}\"\n @keydown=\"${this.#onKeydown}\"\n @click=\"${this.toggle}\"></slot>\n <dialog id=\"popover\"\n ?hidden=\"${this.#hideDialog}\"\n aria-labelledby=\"heading\"\n aria-describedby=\"body\"\n aria-label=${ifDefined(this.label)}>\n <div id=\"arrow\"></div>\n <div id=\"content\" part=\"content\">\n <pf-button id=\"close-button\"\n part=\"close-button\"\n plain\n label=\"${this.accessibleCloseLabel ?? this.closeButtonLabel ?? 'Close popover'}\"\n @click=\"${this.hide}\"\n @keydown=\"${this.#onKeydown}\"\n ?hidden=\"${this.hideClose}\">\n <svg fill=\"currentColor\" height=\"1em\" width=\"1em\" viewBox=\"0 0 352 512\">\n <path d=\"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z\"/>\n </svg>\n </pf-button>\n ${!(hasHeading && hasIcon) ? headingSlotWithFallback : html`\n <header part=\"header\">\n <span part=\"icon\">\n <slot name=\"icon\">\n <pf-icon icon=\"${headerIcon}\"\n set=\"${ifDefined(this.iconSet)}\"\n size=\"md\"></pf-icon>\n </slot>\n </span>${!this.alertSeverity ? nothing : html`\n <span class=\"visually-hidden\">${this.alertSeverityText ?? `${this.alertSeverity} alert:`}</span>`}\n ${headingSlotWithFallback}\n </header>`}\n <slot id=\"body\" part=\"body\" name=\"body\">${this.body ?? ''}</slot>\n <footer part=\"footer\" ?hidden=${!hasFooter}>\n <slot name=\"footer\">${this.footer}</slot>\n </footer>\n </div>\n </dialog>\n </div>\n `;\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n PfPopover.instances.delete(this);\n this.#referenceTrigger?.removeEventListener('click', this.toggle);\n this.#referenceTrigger?.removeEventListener('keydown', this.#onKeydown);\n }\n\n #getReferenceTrigger() {\n const root = this.getRootNode() as Document | ShadowRoot;\n return !this.trigger ? null : root.getElementById(this.trigger);\n }\n\n #triggerChanged() {\n const oldReferenceTrigger = this.#referenceTrigger;\n this.#referenceTrigger = this.#getReferenceTrigger();\n if (oldReferenceTrigger !== this.#referenceTrigger) {\n oldReferenceTrigger?.removeEventListener('click', this.toggle);\n oldReferenceTrigger?.removeEventListener('keydown', this.#onKeydown);\n this.#referenceTrigger?.addEventListener('click', this.toggle);\n this.#referenceTrigger?.addEventListener('keydown', this.#onKeydown);\n }\n }\n\n #onKeydown = (event: KeyboardEvent) => {\n switch (event.key) {\n case 'Escape':\n case 'Esc':\n event.preventDefault();\n this.hide();\n return;\n case 'Enter':\n if (event.target === this.#referenceTrigger || event.target === this._slottedTrigger) {\n event.preventDefault();\n this.show();\n }\n return;\n }\n };\n\n #outsideClick(event: MouseEvent) {\n const path = event.composedPath();\n if (!path.includes(this) && !path.includes(this.#referenceTrigger as HTMLElement)) {\n this.hide();\n }\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.#triggerChanged();\n }\n }\n\n /**\n * Toggle the popover\n */\n @bound async toggle() {\n this.#float.open ? this.hide() : this.show();\n }\n\n /**\n * Opens the popover\n */\n @bound async show() {\n this.#hideDialog = false;\n this.requestUpdate();\n this.dispatchEvent(new PopoverShowEvent());\n await this.updateComplete;\n await this.#float.show({\n offset: this.distance ?? 25,\n placement: this.position,\n flip: !this.noFlip,\n fallbackPlacements: this.flipBehavior,\n });\n this._popover?.show();\n this.dispatchEvent(new PopoverShownEvent());\n PfPopover.instances.add(this);\n }\n\n /**\n * Closes the popover\n */\n @bound async hide() {\n this.dispatchEvent(new PopoverHideEvent());\n await this.#float.hide();\n this._popover?.close();\n this.dispatchEvent(new PopoverHiddenEvent());\n PfPopover.instances.delete(this);\n this.#hideDialog = true;\n this.requestUpdate();\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'pf-popover': PfPopover;\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-popover';
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-popover.e2e.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pf-popover.e2e.js","sourceRoot":"","sources":["pf-popover.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-popover';\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 {};