primevue 3.20.0 → 3.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (593) hide show
  1. package/README.md +3 -15
  2. package/accordion/accordion.cjs.js +1 -1
  3. package/accordion/accordion.cjs.min.js +1 -1
  4. package/accordion/accordion.esm.js +1 -1
  5. package/accordion/accordion.esm.min.js +1 -1
  6. package/accordion/accordion.js +1 -1
  7. package/accordion/accordion.min.js +1 -1
  8. package/autocomplete/AutoComplete.d.ts +9 -1
  9. package/autocomplete/AutoComplete.vue +41 -22
  10. package/autocomplete/autocomplete.cjs.js +53 -25
  11. package/autocomplete/autocomplete.cjs.min.js +1 -1
  12. package/autocomplete/autocomplete.esm.js +53 -25
  13. package/autocomplete/autocomplete.esm.min.js +1 -1
  14. package/autocomplete/autocomplete.js +53 -25
  15. package/autocomplete/autocomplete.min.js +1 -1
  16. package/avatar/avatar.cjs.js +1 -1
  17. package/avatar/avatar.cjs.min.js +1 -1
  18. package/avatar/avatar.esm.js +1 -1
  19. package/avatar/avatar.esm.min.js +1 -1
  20. package/avatar/avatar.js +1 -1
  21. package/avatar/avatar.min.js +1 -1
  22. package/avatargroup/avatargroup.cjs.js +1 -1
  23. package/avatargroup/avatargroup.cjs.min.js +1 -1
  24. package/avatargroup/avatargroup.esm.js +1 -1
  25. package/avatargroup/avatargroup.esm.min.js +1 -1
  26. package/avatargroup/avatargroup.js +1 -1
  27. package/avatargroup/avatargroup.min.js +1 -1
  28. package/badgedirective/badgedirective.cjs.js +1 -1
  29. package/badgedirective/badgedirective.cjs.min.js +1 -1
  30. package/badgedirective/badgedirective.esm.js +1 -1
  31. package/badgedirective/badgedirective.esm.min.js +1 -1
  32. package/badgedirective/badgedirective.js +1 -1
  33. package/badgedirective/badgedirective.min.js +1 -1
  34. package/breadcrumb/Breadcrumb.vue +1 -1
  35. package/breadcrumb/breadcrumb.cjs.js +2 -3
  36. package/breadcrumb/breadcrumb.cjs.min.js +1 -1
  37. package/breadcrumb/breadcrumb.esm.js +2 -3
  38. package/breadcrumb/breadcrumb.esm.min.js +1 -1
  39. package/breadcrumb/breadcrumb.js +2 -3
  40. package/breadcrumb/breadcrumb.min.js +1 -1
  41. package/calendar/Calendar.d.ts +1 -1
  42. package/calendar/Calendar.vue +3 -2
  43. package/calendar/calendar.cjs.js +4 -3
  44. package/calendar/calendar.cjs.min.js +1 -1
  45. package/calendar/calendar.esm.js +4 -3
  46. package/calendar/calendar.esm.min.js +1 -1
  47. package/calendar/calendar.js +4 -3
  48. package/calendar/calendar.min.js +1 -1
  49. package/carousel/Carousel.d.ts +9 -1
  50. package/carousel/Carousel.vue +144 -19
  51. package/carousel/carousel.cjs.js +159 -45
  52. package/carousel/carousel.cjs.min.js +1 -1
  53. package/carousel/carousel.esm.js +160 -46
  54. package/carousel/carousel.esm.min.js +1 -1
  55. package/carousel/carousel.js +160 -46
  56. package/carousel/carousel.min.js +1 -1
  57. package/cascadeselect/CascadeSelect.vue +9 -4
  58. package/cascadeselect/cascadeselect.cjs.js +9 -4
  59. package/cascadeselect/cascadeselect.cjs.min.js +1 -1
  60. package/cascadeselect/cascadeselect.esm.js +9 -4
  61. package/cascadeselect/cascadeselect.esm.min.js +1 -1
  62. package/cascadeselect/cascadeselect.js +9 -4
  63. package/cascadeselect/cascadeselect.min.js +1 -1
  64. package/chart/Chart.d.ts +5 -0
  65. package/chart/Chart.vue +5 -1
  66. package/chart/chart.cjs.js +6 -2
  67. package/chart/chart.cjs.min.js +1 -1
  68. package/chart/chart.esm.js +7 -3
  69. package/chart/chart.esm.min.js +1 -1
  70. package/chart/chart.js +6 -2
  71. package/chart/chart.min.js +1 -1
  72. package/checkbox/Checkbox.vue +1 -3
  73. package/checkbox/checkbox.cjs.js +3 -4
  74. package/checkbox/checkbox.cjs.min.js +1 -1
  75. package/checkbox/checkbox.esm.js +4 -5
  76. package/checkbox/checkbox.esm.min.js +1 -1
  77. package/checkbox/checkbox.js +3 -4
  78. package/checkbox/checkbox.min.js +1 -1
  79. package/chip/chip.cjs.js +1 -1
  80. package/chip/chip.cjs.min.js +1 -1
  81. package/chip/chip.esm.js +1 -1
  82. package/chip/chip.esm.min.js +1 -1
  83. package/chip/chip.js +1 -1
  84. package/chip/chip.min.js +1 -1
  85. package/chips/chips.cjs.js +1 -1
  86. package/chips/chips.cjs.min.js +1 -1
  87. package/chips/chips.esm.js +1 -1
  88. package/chips/chips.esm.min.js +1 -1
  89. package/chips/chips.js +1 -1
  90. package/chips/chips.min.js +1 -1
  91. package/colorpicker/ColorPicker.vue +5 -7
  92. package/colorpicker/colorpicker.cjs.js +5 -7
  93. package/colorpicker/colorpicker.cjs.min.js +1 -1
  94. package/colorpicker/colorpicker.esm.js +5 -7
  95. package/colorpicker/colorpicker.esm.min.js +1 -1
  96. package/colorpicker/colorpicker.js +6 -8
  97. package/colorpicker/colorpicker.min.js +1 -1
  98. package/config/PrimeVue.d.ts +37 -0
  99. package/config/config.cjs.js +38 -1
  100. package/config/config.cjs.min.js +1 -1
  101. package/config/config.esm.js +38 -1
  102. package/config/config.esm.min.js +1 -1
  103. package/config/config.js +38 -1
  104. package/config/config.min.js +1 -1
  105. package/confirmationservice/ConfirmationService.d.ts +1 -1
  106. package/confirmdialog/ConfirmDialog.vue +1 -1
  107. package/confirmdialog/confirmdialog.cjs.js +6 -3
  108. package/confirmdialog/confirmdialog.cjs.min.js +1 -1
  109. package/confirmdialog/confirmdialog.esm.js +7 -4
  110. package/confirmdialog/confirmdialog.esm.min.js +1 -1
  111. package/confirmdialog/confirmdialog.js +6 -3
  112. package/confirmdialog/confirmdialog.min.js +1 -1
  113. package/confirmpopup/ConfirmPopup.vue +11 -10
  114. package/confirmpopup/confirmpopup.cjs.js +15 -13
  115. package/confirmpopup/confirmpopup.cjs.min.js +1 -1
  116. package/confirmpopup/confirmpopup.esm.js +15 -13
  117. package/confirmpopup/confirmpopup.esm.min.js +1 -1
  118. package/confirmpopup/confirmpopup.js +15 -13
  119. package/confirmpopup/confirmpopup.min.js +1 -1
  120. package/contextmenu/ContextMenuSub.vue +3 -5
  121. package/contextmenu/contextmenu.cjs.js +4 -6
  122. package/contextmenu/contextmenu.cjs.min.js +1 -1
  123. package/contextmenu/contextmenu.esm.js +4 -6
  124. package/contextmenu/contextmenu.esm.min.js +1 -1
  125. package/contextmenu/contextmenu.js +4 -6
  126. package/contextmenu/contextmenu.min.js +1 -1
  127. package/core/core.js +537 -261
  128. package/core/core.min.js +13 -13
  129. package/datatable/BodyCell.vue +39 -14
  130. package/datatable/ColumnFilter.vue +67 -41
  131. package/datatable/DataTable.d.ts +11 -3
  132. package/datatable/DataTable.vue +162 -25
  133. package/datatable/HeaderCell.vue +12 -6
  134. package/datatable/HeaderCheckbox.vue +17 -14
  135. package/datatable/RowCheckbox.vue +28 -13
  136. package/datatable/RowRadioButton.vue +11 -3
  137. package/datatable/TableBody.vue +25 -7
  138. package/datatable/TableFooter.vue +1 -1
  139. package/datatable/TableHeader.vue +9 -3
  140. package/datatable/TableLoadingBody.vue +1 -1
  141. package/datatable/datatable.cjs.js +540 -269
  142. package/datatable/datatable.cjs.min.js +1 -1
  143. package/datatable/datatable.esm.js +539 -269
  144. package/datatable/datatable.esm.min.js +1 -1
  145. package/datatable/datatable.js +539 -269
  146. package/datatable/datatable.min.js +1 -1
  147. package/dataviewlayoutoptions/DataViewLayoutOptions.vue +23 -3
  148. package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.js +40 -11
  149. package/dataviewlayoutoptions/dataviewlayoutoptions.cjs.min.js +1 -1
  150. package/dataviewlayoutoptions/dataviewlayoutoptions.esm.js +40 -11
  151. package/dataviewlayoutoptions/dataviewlayoutoptions.esm.min.js +1 -1
  152. package/dataviewlayoutoptions/dataviewlayoutoptions.js +40 -11
  153. package/dataviewlayoutoptions/dataviewlayoutoptions.min.js +1 -1
  154. package/dialog/Dialog.vue +12 -7
  155. package/dialog/dialog.cjs.js +15 -10
  156. package/dialog/dialog.cjs.min.js +1 -1
  157. package/dialog/dialog.esm.js +15 -10
  158. package/dialog/dialog.esm.min.js +1 -1
  159. package/dialog/dialog.js +15 -10
  160. package/dialog/dialog.min.js +1 -1
  161. package/divider/divider.cjs.js +1 -1
  162. package/divider/divider.cjs.min.js +1 -1
  163. package/divider/divider.esm.js +1 -1
  164. package/divider/divider.esm.min.js +1 -1
  165. package/divider/divider.js +1 -1
  166. package/divider/divider.min.js +1 -1
  167. package/dock/dock.cjs.js +1 -1
  168. package/dock/dock.cjs.min.js +1 -1
  169. package/dock/dock.esm.js +1 -1
  170. package/dock/dock.esm.min.js +1 -1
  171. package/dock/dock.js +1 -1
  172. package/dock/dock.min.js +1 -1
  173. package/dropdown/Dropdown.vue +24 -16
  174. package/dropdown/dropdown.cjs.js +25 -17
  175. package/dropdown/dropdown.cjs.min.js +1 -1
  176. package/dropdown/dropdown.esm.js +25 -17
  177. package/dropdown/dropdown.esm.min.js +1 -1
  178. package/dropdown/dropdown.js +25 -17
  179. package/dropdown/dropdown.min.js +1 -1
  180. package/editor/Editor.vue +7 -1
  181. package/editor/editor.cjs.js +35 -6
  182. package/editor/editor.cjs.min.js +1 -1
  183. package/editor/editor.esm.js +35 -6
  184. package/editor/editor.esm.min.js +1 -1
  185. package/editor/editor.js +35 -6
  186. package/editor/editor.min.js +1 -1
  187. package/fieldset/Fieldset.vue +1 -1
  188. package/fieldset/fieldset.cjs.js +2 -2
  189. package/fieldset/fieldset.cjs.min.js +1 -1
  190. package/fieldset/fieldset.esm.js +2 -2
  191. package/fieldset/fieldset.esm.min.js +1 -1
  192. package/fieldset/fieldset.js +3 -3
  193. package/fieldset/fieldset.min.js +1 -1
  194. package/fileupload/FileUpload.d.ts +51 -1
  195. package/fileupload/FileUpload.vue +2 -2
  196. package/fileupload/fileupload.cjs.js +3 -3
  197. package/fileupload/fileupload.cjs.min.js +1 -1
  198. package/fileupload/fileupload.esm.js +3 -3
  199. package/fileupload/fileupload.esm.min.js +1 -1
  200. package/fileupload/fileupload.js +3 -3
  201. package/fileupload/fileupload.min.js +1 -1
  202. package/focustrap/focustrap.cjs.js +86 -64
  203. package/focustrap/focustrap.cjs.min.js +1 -1
  204. package/focustrap/focustrap.esm.js +85 -63
  205. package/focustrap/focustrap.esm.min.js +1 -1
  206. package/focustrap/focustrap.js +86 -64
  207. package/focustrap/focustrap.min.js +1 -1
  208. package/galleria/Galleria.d.ts +15 -3
  209. package/galleria/Galleria.vue +36 -6
  210. package/galleria/GalleriaContent.vue +11 -7
  211. package/galleria/GalleriaItem.vue +36 -6
  212. package/galleria/GalleriaThumbnails.vue +108 -4
  213. package/galleria/galleria.cjs.js +259 -123
  214. package/galleria/galleria.cjs.min.js +1 -1
  215. package/galleria/galleria.esm.js +258 -123
  216. package/galleria/galleria.esm.min.js +1 -1
  217. package/galleria/galleria.js +259 -124
  218. package/galleria/galleria.min.js +1 -1
  219. package/image/Image.vue +71 -13
  220. package/image/image.cjs.js +113 -40
  221. package/image/image.cjs.min.js +1 -1
  222. package/image/image.esm.js +113 -41
  223. package/image/image.esm.min.js +1 -1
  224. package/image/image.js +113 -41
  225. package/image/image.min.js +1 -1
  226. package/inlinemessage/inlinemessage.cjs.js +1 -1
  227. package/inlinemessage/inlinemessage.cjs.min.js +1 -1
  228. package/inlinemessage/inlinemessage.esm.js +1 -1
  229. package/inlinemessage/inlinemessage.esm.min.js +1 -1
  230. package/inlinemessage/inlinemessage.js +1 -1
  231. package/inlinemessage/inlinemessage.min.js +1 -1
  232. package/inplace/inplace.cjs.js +1 -1
  233. package/inplace/inplace.cjs.min.js +1 -1
  234. package/inplace/inplace.esm.js +1 -1
  235. package/inplace/inplace.esm.min.js +1 -1
  236. package/inplace/inplace.js +1 -1
  237. package/inplace/inplace.min.js +1 -1
  238. package/inputnumber/InputNumber.vue +11 -20
  239. package/inputnumber/inputnumber.cjs.js +12 -21
  240. package/inputnumber/inputnumber.cjs.min.js +1 -1
  241. package/inputnumber/inputnumber.esm.js +12 -21
  242. package/inputnumber/inputnumber.esm.min.js +1 -1
  243. package/inputnumber/inputnumber.js +12 -21
  244. package/inputnumber/inputnumber.min.js +1 -1
  245. package/knob/knob.cjs.js +1 -1
  246. package/knob/knob.cjs.min.js +1 -1
  247. package/knob/knob.esm.js +1 -1
  248. package/knob/knob.esm.min.js +1 -1
  249. package/knob/knob.js +1 -1
  250. package/knob/knob.min.js +1 -1
  251. package/listbox/Listbox.vue +12 -8
  252. package/listbox/listbox.cjs.js +13 -9
  253. package/listbox/listbox.cjs.min.js +1 -1
  254. package/listbox/listbox.esm.js +13 -9
  255. package/listbox/listbox.esm.min.js +1 -1
  256. package/listbox/listbox.js +14 -10
  257. package/listbox/listbox.min.js +1 -1
  258. package/megamenu/MegaMenu.vue +10 -1
  259. package/megamenu/MegaMenuSub.vue +3 -5
  260. package/megamenu/megamenu.cjs.js +14 -7
  261. package/megamenu/megamenu.cjs.min.js +1 -1
  262. package/megamenu/megamenu.esm.js +14 -7
  263. package/megamenu/megamenu.esm.min.js +1 -1
  264. package/megamenu/megamenu.js +14 -7
  265. package/megamenu/megamenu.min.js +1 -1
  266. package/menu/Menu.vue +8 -2
  267. package/menu/menu.cjs.js +9 -3
  268. package/menu/menu.cjs.min.js +1 -1
  269. package/menu/menu.esm.js +9 -3
  270. package/menu/menu.esm.min.js +1 -1
  271. package/menu/menu.js +9 -3
  272. package/menu/menu.min.js +1 -1
  273. package/menubar/Menubar.vue +7 -2
  274. package/menubar/MenubarSub.vue +3 -5
  275. package/menubar/menubar.cjs.js +11 -8
  276. package/menubar/menubar.cjs.min.js +1 -1
  277. package/menubar/menubar.esm.js +11 -8
  278. package/menubar/menubar.esm.min.js +1 -1
  279. package/menubar/menubar.js +11 -8
  280. package/menubar/menubar.min.js +1 -1
  281. package/message/Message.d.ts +5 -1
  282. package/message/Message.vue +15 -5
  283. package/message/message.cjs.js +24 -10
  284. package/message/message.cjs.min.js +1 -1
  285. package/message/message.esm.js +25 -11
  286. package/message/message.esm.min.js +1 -1
  287. package/message/message.js +24 -10
  288. package/message/message.min.js +1 -1
  289. package/multiselect/MultiSelect.vue +53 -36
  290. package/multiselect/multiselect.cjs.js +54 -37
  291. package/multiselect/multiselect.cjs.min.js +1 -1
  292. package/multiselect/multiselect.esm.js +55 -38
  293. package/multiselect/multiselect.esm.min.js +1 -1
  294. package/multiselect/multiselect.js +54 -37
  295. package/multiselect/multiselect.min.js +1 -1
  296. package/orderlist/OrderList.d.ts +33 -1
  297. package/orderlist/OrderList.vue +265 -63
  298. package/orderlist/orderlist.cjs.js +280 -70
  299. package/orderlist/orderlist.cjs.min.js +1 -1
  300. package/orderlist/orderlist.esm.js +281 -71
  301. package/orderlist/orderlist.esm.min.js +1 -1
  302. package/orderlist/orderlist.js +281 -71
  303. package/orderlist/orderlist.min.js +1 -1
  304. package/organizationchart/OrganizationChartNode.vue +7 -1
  305. package/organizationchart/organizationchart.cjs.js +8 -2
  306. package/organizationchart/organizationchart.cjs.min.js +1 -1
  307. package/organizationchart/organizationchart.esm.js +9 -3
  308. package/organizationchart/organizationchart.esm.min.js +1 -1
  309. package/organizationchart/organizationchart.js +8 -2
  310. package/organizationchart/organizationchart.min.js +1 -1
  311. package/overlaypanel/overlaypanel.cjs.js +1 -1
  312. package/overlaypanel/overlaypanel.cjs.min.js +1 -1
  313. package/overlaypanel/overlaypanel.esm.js +1 -1
  314. package/overlaypanel/overlaypanel.esm.min.js +1 -1
  315. package/overlaypanel/overlaypanel.js +1 -1
  316. package/overlaypanel/overlaypanel.min.js +1 -1
  317. package/package.json +2 -2
  318. package/paginator/CurrentPageReport.vue +0 -1
  319. package/paginator/JumpToPageDropdown.vue +0 -1
  320. package/paginator/JumpToPageInput.vue +19 -4
  321. package/paginator/PageLinks.vue +16 -1
  322. package/paginator/Paginator.vue +24 -11
  323. package/paginator/RowsPerPageDropdown.vue +0 -1
  324. package/paginator/paginator.cjs.js +51 -20
  325. package/paginator/paginator.cjs.min.js +1 -1
  326. package/paginator/paginator.esm.js +51 -20
  327. package/paginator/paginator.esm.min.js +1 -1
  328. package/paginator/paginator.js +51 -20
  329. package/paginator/paginator.min.js +1 -1
  330. package/panel/Panel.vue +2 -2
  331. package/panel/panel.cjs.js +3 -3
  332. package/panel/panel.cjs.min.js +1 -1
  333. package/panel/panel.esm.js +3 -3
  334. package/panel/panel.esm.min.js +1 -1
  335. package/panel/panel.js +4 -4
  336. package/panel/panel.min.js +1 -1
  337. package/panelmenu/PanelMenu.vue +4 -4
  338. package/panelmenu/PanelMenuList.vue +57 -0
  339. package/panelmenu/PanelMenuSub.vue +3 -5
  340. package/panelmenu/panelmenu.cjs.js +78 -10
  341. package/panelmenu/panelmenu.cjs.min.js +1 -1
  342. package/panelmenu/panelmenu.esm.js +78 -10
  343. package/panelmenu/panelmenu.esm.min.js +1 -1
  344. package/panelmenu/panelmenu.js +78 -10
  345. package/panelmenu/panelmenu.min.js +1 -1
  346. package/password/Password.vue +5 -0
  347. package/password/password.cjs.js +1 -1
  348. package/password/password.cjs.min.js +1 -1
  349. package/password/password.esm.js +1 -1
  350. package/password/password.esm.min.js +1 -1
  351. package/password/password.js +1 -1
  352. package/password/password.min.js +1 -1
  353. package/picklist/PickList.d.ts +45 -1
  354. package/picklist/PickList.vue +305 -58
  355. package/picklist/picklist.cjs.js +350 -89
  356. package/picklist/picklist.cjs.min.js +1 -1
  357. package/picklist/picklist.esm.js +351 -90
  358. package/picklist/picklist.esm.min.js +1 -1
  359. package/picklist/picklist.js +351 -90
  360. package/picklist/picklist.min.js +1 -1
  361. package/progressbar/progressbar.cjs.js +1 -1
  362. package/progressbar/progressbar.cjs.min.js +1 -1
  363. package/progressbar/progressbar.esm.js +1 -1
  364. package/progressbar/progressbar.esm.min.js +1 -1
  365. package/progressbar/progressbar.js +1 -1
  366. package/progressbar/progressbar.min.js +1 -1
  367. package/progressspinner/ProgressSpinner.vue +0 -47
  368. package/progressspinner/progressspinner.cjs.js +1 -1
  369. package/progressspinner/progressspinner.cjs.min.js +1 -1
  370. package/progressspinner/progressspinner.esm.js +1 -1
  371. package/progressspinner/progressspinner.esm.min.js +1 -1
  372. package/progressspinner/progressspinner.js +1 -1
  373. package/progressspinner/progressspinner.min.js +1 -1
  374. package/rating/Rating.d.ts +1 -0
  375. package/rating/rating.cjs.js +1 -1
  376. package/rating/rating.cjs.min.js +1 -1
  377. package/rating/rating.esm.js +1 -1
  378. package/rating/rating.esm.min.js +1 -1
  379. package/rating/rating.js +1 -1
  380. package/rating/rating.min.js +1 -1
  381. package/resources/primevue.css +2 -6
  382. package/resources/primevue.min.css +1 -1
  383. package/resources/themes/arya-blue/theme.css +77 -14
  384. package/resources/themes/arya-green/theme.css +77 -14
  385. package/resources/themes/arya-orange/theme.css +77 -14
  386. package/resources/themes/arya-purple/theme.css +77 -14
  387. package/resources/themes/bootstrap4-dark-blue/theme.css +77 -14
  388. package/resources/themes/bootstrap4-dark-purple/theme.css +77 -14
  389. package/resources/themes/bootstrap4-light-blue/theme.css +77 -14
  390. package/resources/themes/bootstrap4-light-purple/theme.css +77 -14
  391. package/resources/themes/fluent-light/theme.css +77 -14
  392. package/resources/themes/lara-dark-blue/theme.css +81 -14
  393. package/resources/themes/lara-dark-indigo/theme.css +81 -14
  394. package/resources/themes/lara-dark-purple/theme.css +81 -14
  395. package/resources/themes/lara-dark-teal/theme.css +81 -14
  396. package/resources/themes/lara-light-blue/theme.css +81 -14
  397. package/resources/themes/lara-light-indigo/theme.css +81 -14
  398. package/resources/themes/lara-light-purple/theme.css +81 -14
  399. package/resources/themes/lara-light-teal/theme.css +81 -14
  400. package/resources/themes/luna-amber/theme.css +77 -14
  401. package/resources/themes/luna-blue/theme.css +77 -14
  402. package/resources/themes/luna-green/theme.css +77 -14
  403. package/resources/themes/luna-pink/theme.css +77 -14
  404. package/resources/themes/md-dark-deeppurple/theme.css +101 -20
  405. package/resources/themes/md-dark-indigo/theme.css +101 -20
  406. package/resources/themes/md-light-deeppurple/theme.css +101 -20
  407. package/resources/themes/md-light-indigo/theme.css +101 -20
  408. package/resources/themes/mdc-dark-deeppurple/theme.css +101 -20
  409. package/resources/themes/mdc-dark-indigo/theme.css +101 -20
  410. package/resources/themes/mdc-light-deeppurple/theme.css +101 -20
  411. package/resources/themes/mdc-light-indigo/theme.css +101 -20
  412. package/resources/themes/nova/theme.css +77 -14
  413. package/resources/themes/nova-accent/theme.css +77 -14
  414. package/resources/themes/nova-alt/theme.css +77 -14
  415. package/resources/themes/nova-vue/theme.css +77 -14
  416. package/resources/themes/rhea/theme.css +77 -14
  417. package/resources/themes/saga-blue/theme.css +77 -14
  418. package/resources/themes/saga-green/theme.css +77 -14
  419. package/resources/themes/saga-orange/theme.css +77 -14
  420. package/resources/themes/saga-purple/theme.css +77 -14
  421. package/resources/themes/tailwind-light/theme.css +81 -14
  422. package/resources/themes/vela-blue/theme.css +77 -14
  423. package/resources/themes/vela-green/theme.css +77 -14
  424. package/resources/themes/vela-orange/theme.css +77 -14
  425. package/resources/themes/vela-purple/theme.css +77 -14
  426. package/scrollpanel/scrollpanel.cjs.js +1 -1
  427. package/scrollpanel/scrollpanel.cjs.min.js +1 -1
  428. package/scrollpanel/scrollpanel.esm.js +1 -1
  429. package/scrollpanel/scrollpanel.esm.min.js +1 -1
  430. package/scrollpanel/scrollpanel.js +1 -1
  431. package/scrollpanel/scrollpanel.min.js +1 -1
  432. package/scrolltop/scrolltop.cjs.js +1 -1
  433. package/scrolltop/scrolltop.cjs.min.js +1 -1
  434. package/scrolltop/scrolltop.esm.js +1 -1
  435. package/scrolltop/scrolltop.esm.min.js +1 -1
  436. package/scrolltop/scrolltop.js +1 -1
  437. package/scrolltop/scrolltop.min.js +1 -1
  438. package/selectbutton/SelectButton.vue +1 -1
  439. package/selectbutton/selectbutton.cjs.js +1 -1
  440. package/selectbutton/selectbutton.cjs.min.js +1 -1
  441. package/selectbutton/selectbutton.esm.js +1 -1
  442. package/selectbutton/selectbutton.esm.min.js +1 -1
  443. package/selectbutton/selectbutton.js +2 -2
  444. package/selectbutton/selectbutton.min.js +1 -1
  445. package/sidebar/Sidebar.d.ts +4 -0
  446. package/sidebar/Sidebar.vue +210 -142
  447. package/sidebar/sidebar.cjs.js +146 -121
  448. package/sidebar/sidebar.cjs.min.js +1 -1
  449. package/sidebar/sidebar.esm.js +147 -122
  450. package/sidebar/sidebar.esm.min.js +1 -1
  451. package/sidebar/sidebar.js +146 -121
  452. package/sidebar/sidebar.min.js +1 -1
  453. package/skeleton/skeleton.cjs.js +1 -1
  454. package/skeleton/skeleton.cjs.min.js +1 -1
  455. package/skeleton/skeleton.esm.js +1 -1
  456. package/skeleton/skeleton.esm.min.js +1 -1
  457. package/skeleton/skeleton.js +1 -1
  458. package/skeleton/skeleton.min.js +1 -1
  459. package/slider/slider.cjs.js +1 -1
  460. package/slider/slider.cjs.min.js +1 -1
  461. package/slider/slider.esm.js +1 -1
  462. package/slider/slider.esm.min.js +1 -1
  463. package/slider/slider.js +1 -1
  464. package/slider/slider.min.js +1 -1
  465. package/speeddial/SpeedDial.d.ts +19 -1
  466. package/speeddial/SpeedDial.vue +254 -7
  467. package/speeddial/speeddial.cjs.js +255 -14
  468. package/speeddial/speeddial.cjs.min.js +1 -1
  469. package/speeddial/speeddial.esm.js +256 -15
  470. package/speeddial/speeddial.esm.min.js +1 -1
  471. package/speeddial/speeddial.js +255 -14
  472. package/speeddial/speeddial.min.js +1 -1
  473. package/splitbutton/SplitButton.d.ts +20 -4
  474. package/splitbutton/SplitButton.vue +56 -8
  475. package/splitbutton/splitbutton.cjs.js +57 -17
  476. package/splitbutton/splitbutton.cjs.min.js +1 -1
  477. package/splitbutton/splitbutton.esm.js +57 -17
  478. package/splitbutton/splitbutton.esm.min.js +1 -1
  479. package/splitbutton/splitbutton.js +57 -17
  480. package/splitbutton/splitbutton.min.js +1 -1
  481. package/splitter/Splitter.vue +1 -1
  482. package/splitter/splitter.cjs.js +1 -1
  483. package/splitter/splitter.cjs.min.js +1 -1
  484. package/splitter/splitter.esm.js +1 -1
  485. package/splitter/splitter.esm.min.js +1 -1
  486. package/splitter/splitter.js +1 -1
  487. package/splitter/splitter.min.js +1 -1
  488. package/steps/steps.cjs.js +1 -1
  489. package/steps/steps.cjs.min.js +1 -1
  490. package/steps/steps.esm.js +1 -1
  491. package/steps/steps.esm.min.js +1 -1
  492. package/steps/steps.js +1 -1
  493. package/steps/steps.min.js +1 -1
  494. package/tabmenu/TabMenu.vue +4 -16
  495. package/tabmenu/tabmenu.cjs.js +19 -16
  496. package/tabmenu/tabmenu.cjs.min.js +1 -1
  497. package/tabmenu/tabmenu.esm.js +19 -16
  498. package/tabmenu/tabmenu.esm.min.js +1 -1
  499. package/tabmenu/tabmenu.js +19 -16
  500. package/tabmenu/tabmenu.min.js +1 -1
  501. package/tabview/TabView.vue +2 -2
  502. package/tabview/tabview.cjs.js +3 -3
  503. package/tabview/tabview.cjs.min.js +1 -1
  504. package/tabview/tabview.esm.js +3 -3
  505. package/tabview/tabview.esm.min.js +1 -1
  506. package/tabview/tabview.js +3 -3
  507. package/tabview/tabview.min.js +1 -1
  508. package/tag/tag.cjs.js +1 -1
  509. package/tag/tag.cjs.min.js +1 -1
  510. package/tag/tag.esm.js +1 -1
  511. package/tag/tag.esm.min.js +1 -1
  512. package/tag/tag.js +1 -1
  513. package/tag/tag.min.js +1 -1
  514. package/terminal/terminal.cjs.js +1 -1
  515. package/terminal/terminal.cjs.min.js +1 -1
  516. package/terminal/terminal.esm.js +1 -1
  517. package/terminal/terminal.esm.min.js +1 -1
  518. package/terminal/terminal.js +1 -1
  519. package/terminal/terminal.min.js +1 -1
  520. package/tieredmenu/TieredMenu.vue +13 -3
  521. package/tieredmenu/TieredMenuSub.vue +3 -5
  522. package/tieredmenu/tieredmenu.cjs.js +17 -9
  523. package/tieredmenu/tieredmenu.cjs.min.js +1 -1
  524. package/tieredmenu/tieredmenu.esm.js +17 -9
  525. package/tieredmenu/tieredmenu.esm.min.js +1 -1
  526. package/tieredmenu/tieredmenu.js +17 -9
  527. package/tieredmenu/tieredmenu.min.js +1 -1
  528. package/timeline/timeline.cjs.js +1 -1
  529. package/timeline/timeline.cjs.min.js +1 -1
  530. package/timeline/timeline.esm.js +1 -1
  531. package/timeline/timeline.esm.min.js +1 -1
  532. package/timeline/timeline.js +1 -1
  533. package/timeline/timeline.min.js +1 -1
  534. package/toast/Toast.d.ts +5 -1
  535. package/toast/Toast.vue +5 -0
  536. package/toast/ToastMessage.vue +36 -8
  537. package/toast/toast.cjs.js +49 -13
  538. package/toast/toast.cjs.min.js +1 -1
  539. package/toast/toast.esm.js +50 -14
  540. package/toast/toast.esm.min.js +1 -1
  541. package/toast/toast.js +49 -13
  542. package/toast/toast.min.js +1 -1
  543. package/toolbar/Toolbar.d.ts +6 -0
  544. package/toolbar/Toolbar.vue +12 -2
  545. package/toolbar/toolbar.cjs.js +7 -3
  546. package/toolbar/toolbar.cjs.min.js +1 -1
  547. package/toolbar/toolbar.esm.js +7 -3
  548. package/toolbar/toolbar.esm.min.js +1 -1
  549. package/toolbar/toolbar.js +7 -3
  550. package/toolbar/toolbar.min.js +1 -1
  551. package/tree/Tree.d.ts +8 -0
  552. package/tree/Tree.vue +10 -2
  553. package/tree/TreeNode.vue +174 -37
  554. package/tree/tree.cjs.js +193 -59
  555. package/tree/tree.cjs.min.js +1 -1
  556. package/tree/tree.esm.js +193 -59
  557. package/tree/tree.esm.min.js +1 -1
  558. package/tree/tree.js +193 -59
  559. package/tree/tree.min.js +1 -1
  560. package/treeselect/TreeSelect.vue +40 -26
  561. package/treeselect/treeselect.cjs.js +46 -30
  562. package/treeselect/treeselect.cjs.min.js +1 -1
  563. package/treeselect/treeselect.esm.js +44 -28
  564. package/treeselect/treeselect.esm.min.js +1 -1
  565. package/treeselect/treeselect.js +45 -29
  566. package/treeselect/treeselect.min.js +1 -1
  567. package/treetable/BodyCell.vue +4 -4
  568. package/treetable/HeaderCell.vue +4 -2
  569. package/treetable/TreeTable.d.ts +4 -0
  570. package/treetable/TreeTable.vue +43 -17
  571. package/treetable/TreeTableRow.vue +200 -59
  572. package/treetable/treetable.cjs.js +798 -621
  573. package/treetable/treetable.cjs.min.js +1 -1
  574. package/treetable/treetable.esm.js +795 -618
  575. package/treetable/treetable.esm.min.js +1 -1
  576. package/treetable/treetable.js +795 -618
  577. package/treetable/treetable.min.js +1 -1
  578. package/utils/utils.cjs.js +67 -47
  579. package/utils/utils.cjs.min.js +1 -1
  580. package/utils/utils.esm.js +67 -47
  581. package/utils/utils.esm.min.js +1 -1
  582. package/utils/utils.js +67 -47
  583. package/utils/utils.min.js +1 -1
  584. package/vetur-attributes.json +35 -283
  585. package/vetur-tags.json +26 -89
  586. package/virtualscroller/virtualscroller.cjs.js +1 -1
  587. package/virtualscroller/virtualscroller.cjs.min.js +1 -1
  588. package/virtualscroller/virtualscroller.esm.js +1 -1
  589. package/virtualscroller/virtualscroller.esm.min.js +1 -1
  590. package/virtualscroller/virtualscroller.js +1 -1
  591. package/virtualscroller/virtualscroller.min.js +1 -1
  592. package/web-types.json +94 -998
  593. package/galleria/GalleriaItemSlot.vue +0 -53
@@ -103,7 +103,7 @@ function styleInject(css, ref) {
103
103
  }
104
104
  }
105
105
 
106
- var css_248z = "\n.p-timeline {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-flex: 1;\n -ms-flex-positive: 1;\n flex-grow: 1;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-timeline-left .p-timeline-event-opposite {\n text-align: right;\n}\n.p-timeline-left .p-timeline-event-content {\n text-align: left;\n}\n.p-timeline-right .p-timeline-event {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: reverse;\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n.p-timeline-right .p-timeline-event-opposite {\n text-align: left;\n}\n.p-timeline-right .p-timeline-event-content {\n text-align: right;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: reverse;\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-opposite {\n text-align: right;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-content {\n text-align: left;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-opposite {\n text-align: left;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-content {\n text-align: right;\n}\n.p-timeline-event {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n position: relative;\n min-height: 70px;\n}\n.p-timeline-event:last-child {\n min-height: 0;\n}\n.p-timeline-event-opposite {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n padding: 0 1rem;\n}\n.p-timeline-event-content {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n padding: 0 1rem;\n}\n.p-timeline-event-separator {\n -webkit-box-flex: 0;\n -ms-flex: 0;\n flex: 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-timeline-event-marker {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-item-align: baseline;\n align-self: baseline;\n}\n.p-timeline-event-connector {\n -webkit-box-flex: 1;\n -ms-flex-positive: 1;\n flex-grow: 1;\n}\n.p-timeline-horizontal {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.p-timeline-horizontal .p-timeline-event {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n}\n.p-timeline-horizontal .p-timeline-event:last-child {\n -webkit-box-flex: 0;\n -ms-flex: 0;\n flex: 0;\n}\n.p-timeline-horizontal .p-timeline-event-separator {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.p-timeline-horizontal .p-timeline-event-connector {\n width: 100%;\n}\n.p-timeline-bottom .p-timeline-event {\n -webkit-box-orient: vertical;\n -webkit-box-direction: reverse;\n -ms-flex-direction: column-reverse;\n flex-direction: column-reverse;\n}\n.p-timeline-horizontal.p-timeline-alternate .p-timeline-event:nth-child(even) {\n -webkit-box-orient: vertical;\n -webkit-box-direction: reverse;\n -ms-flex-direction: column-reverse;\n flex-direction: column-reverse;\n}\n";
106
+ var css_248z = "\n.p-timeline {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n}\n.p-timeline-left .p-timeline-event-opposite {\n text-align: right;\n}\n.p-timeline-left .p-timeline-event-content {\n text-align: left;\n}\n.p-timeline-right .p-timeline-event {\n flex-direction: row-reverse;\n}\n.p-timeline-right .p-timeline-event-opposite {\n text-align: left;\n}\n.p-timeline-right .p-timeline-event-content {\n text-align: right;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) {\n flex-direction: row-reverse;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-opposite {\n text-align: right;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-content {\n text-align: left;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-opposite {\n text-align: left;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-content {\n text-align: right;\n}\n.p-timeline-event {\n display: flex;\n position: relative;\n min-height: 70px;\n}\n.p-timeline-event:last-child {\n min-height: 0;\n}\n.p-timeline-event-opposite {\n flex: 1;\n padding: 0 1rem;\n}\n.p-timeline-event-content {\n flex: 1;\n padding: 0 1rem;\n}\n.p-timeline-event-separator {\n flex: 0;\n display: flex;\n align-items: center;\n flex-direction: column;\n}\n.p-timeline-event-marker {\n display: flex;\n align-self: baseline;\n}\n.p-timeline-event-connector {\n flex-grow: 1;\n}\n.p-timeline-horizontal {\n flex-direction: row;\n}\n.p-timeline-horizontal .p-timeline-event {\n flex-direction: column;\n flex: 1;\n}\n.p-timeline-horizontal .p-timeline-event:last-child {\n flex: 0;\n}\n.p-timeline-horizontal .p-timeline-event-separator {\n flex-direction: row;\n}\n.p-timeline-horizontal .p-timeline-event-connector {\n width: 100%;\n}\n.p-timeline-bottom .p-timeline-event {\n flex-direction: column-reverse;\n}\n.p-timeline-horizontal.p-timeline-alternate .p-timeline-event:nth-child(even) {\n flex-direction: column-reverse;\n}\n";
107
107
  styleInject(css_248z);
108
108
 
109
109
  script.render = render;
@@ -1 +1 @@
1
- import{ObjectUtils as e}from"primevue/utils";import{openBlock as n,createElementBlock as i,normalizeClass as t,Fragment as l,renderList as o,createElementVNode as r,renderSlot as m,createCommentVNode as a}from"vue";var s={name:"Timeline",props:{value:null,align:{mode:String,default:"left"},layout:{mode:String,default:"vertical"},dataKey:null},methods:{getKey(n,i){return this.dataKey?e.resolveFieldData(n,this.dataKey):i}},computed:{containerClass(){return["p-timeline p-component","p-timeline-"+this.align,"p-timeline-"+this.layout]}}};const p={class:"p-timeline-event-opposite"},x={class:"p-timeline-event-separator"},c=r("div",{class:"p-timeline-event-marker"},null,-1),d=r("div",{class:"p-timeline-event-connector"},null,-1),v={class:"p-timeline-event-content"};!function(e,n){void 0===n&&(n={});var i=n.insertAt;if(e&&"undefined"!=typeof document){var t=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===i&&t.firstChild?t.insertBefore(l,t.firstChild):t.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-timeline {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-flex: 1;\n -ms-flex-positive: 1;\n flex-grow: 1;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-timeline-left .p-timeline-event-opposite {\n text-align: right;\n}\n.p-timeline-left .p-timeline-event-content {\n text-align: left;\n}\n.p-timeline-right .p-timeline-event {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: reverse;\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n.p-timeline-right .p-timeline-event-opposite {\n text-align: left;\n}\n.p-timeline-right .p-timeline-event-content {\n text-align: right;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: reverse;\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-opposite {\n text-align: right;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-content {\n text-align: left;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-opposite {\n text-align: left;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-content {\n text-align: right;\n}\n.p-timeline-event {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n position: relative;\n min-height: 70px;\n}\n.p-timeline-event:last-child {\n min-height: 0;\n}\n.p-timeline-event-opposite {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n padding: 0 1rem;\n}\n.p-timeline-event-content {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n padding: 0 1rem;\n}\n.p-timeline-event-separator {\n -webkit-box-flex: 0;\n -ms-flex: 0;\n flex: 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-timeline-event-marker {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-item-align: baseline;\n align-self: baseline;\n}\n.p-timeline-event-connector {\n -webkit-box-flex: 1;\n -ms-flex-positive: 1;\n flex-grow: 1;\n}\n.p-timeline-horizontal {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.p-timeline-horizontal .p-timeline-event {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n}\n.p-timeline-horizontal .p-timeline-event:last-child {\n -webkit-box-flex: 0;\n -ms-flex: 0;\n flex: 0;\n}\n.p-timeline-horizontal .p-timeline-event-separator {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.p-timeline-horizontal .p-timeline-event-connector {\n width: 100%;\n}\n.p-timeline-bottom .p-timeline-event {\n -webkit-box-orient: vertical;\n -webkit-box-direction: reverse;\n -ms-flex-direction: column-reverse;\n flex-direction: column-reverse;\n}\n.p-timeline-horizontal.p-timeline-alternate .p-timeline-event:nth-child(even) {\n -webkit-box-orient: vertical;\n -webkit-box-direction: reverse;\n -ms-flex-direction: column-reverse;\n flex-direction: column-reverse;\n}\n"),s.render=function(e,s,f,b,h,w){return n(),i("div",{class:t(w.containerClass)},[(n(!0),i(l,null,o(f.value,((t,l)=>(n(),i("div",{key:w.getKey(t,l),class:"p-timeline-event"},[r("div",p,[m(e.$slots,"opposite",{item:t,index:l})]),r("div",x,[m(e.$slots,"marker",{item:t,index:l},(()=>[c])),l!==f.value.length-1?m(e.$slots,"connector",{key:0,item:t,index:l},(()=>[d])):a("",!0)]),r("div",v,[m(e.$slots,"content",{item:t,index:l})])])))),128))],2)};export{s as default};
1
+ import{ObjectUtils as e}from"primevue/utils";import{openBlock as n,createElementBlock as t,normalizeClass as i,Fragment as l,renderList as o,createElementVNode as p,renderSlot as m,createCommentVNode as r}from"vue";var a={name:"Timeline",props:{value:null,align:{mode:String,default:"left"},layout:{mode:String,default:"vertical"},dataKey:null},methods:{getKey(n,t){return this.dataKey?e.resolveFieldData(n,this.dataKey):t}},computed:{containerClass(){return["p-timeline p-component","p-timeline-"+this.align,"p-timeline-"+this.layout]}}};const s={class:"p-timeline-event-opposite"},d={class:"p-timeline-event-separator"},c=p("div",{class:"p-timeline-event-marker"},null,-1),v=p("div",{class:"p-timeline-event-connector"},null,-1),h={class:"p-timeline-event-content"};!function(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===t&&i.firstChild?i.insertBefore(l,i.firstChild):i.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-timeline {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n}\n.p-timeline-left .p-timeline-event-opposite {\n text-align: right;\n}\n.p-timeline-left .p-timeline-event-content {\n text-align: left;\n}\n.p-timeline-right .p-timeline-event {\n flex-direction: row-reverse;\n}\n.p-timeline-right .p-timeline-event-opposite {\n text-align: left;\n}\n.p-timeline-right .p-timeline-event-content {\n text-align: right;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) {\n flex-direction: row-reverse;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-opposite {\n text-align: right;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-content {\n text-align: left;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-opposite {\n text-align: left;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-content {\n text-align: right;\n}\n.p-timeline-event {\n display: flex;\n position: relative;\n min-height: 70px;\n}\n.p-timeline-event:last-child {\n min-height: 0;\n}\n.p-timeline-event-opposite {\n flex: 1;\n padding: 0 1rem;\n}\n.p-timeline-event-content {\n flex: 1;\n padding: 0 1rem;\n}\n.p-timeline-event-separator {\n flex: 0;\n display: flex;\n align-items: center;\n flex-direction: column;\n}\n.p-timeline-event-marker {\n display: flex;\n align-self: baseline;\n}\n.p-timeline-event-connector {\n flex-grow: 1;\n}\n.p-timeline-horizontal {\n flex-direction: row;\n}\n.p-timeline-horizontal .p-timeline-event {\n flex-direction: column;\n flex: 1;\n}\n.p-timeline-horizontal .p-timeline-event:last-child {\n flex: 0;\n}\n.p-timeline-horizontal .p-timeline-event-separator {\n flex-direction: row;\n}\n.p-timeline-horizontal .p-timeline-event-connector {\n width: 100%;\n}\n.p-timeline-bottom .p-timeline-event {\n flex-direction: column-reverse;\n}\n.p-timeline-horizontal.p-timeline-alternate .p-timeline-event:nth-child(even) {\n flex-direction: column-reverse;\n}\n"),a.render=function(e,a,f,x,u,g){return n(),t("div",{class:i(g.containerClass)},[(n(!0),t(l,null,o(f.value,((i,l)=>(n(),t("div",{key:g.getKey(i,l),class:"p-timeline-event"},[p("div",s,[m(e.$slots,"opposite",{item:i,index:l})]),p("div",d,[m(e.$slots,"marker",{item:i,index:l},(()=>[c])),l!==f.value.length-1?m(e.$slots,"connector",{key:0,item:i,index:l},(()=>[v])):r("",!0)]),p("div",h,[m(e.$slots,"content",{item:i,index:l})])])))),128))],2)};export{a as default};
@@ -104,7 +104,7 @@ this.primevue.timeline = (function (utils, vue) {
104
104
  }
105
105
  }
106
106
 
107
- var css_248z = "\n.p-timeline {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-flex: 1;\n -ms-flex-positive: 1;\n flex-grow: 1;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-timeline-left .p-timeline-event-opposite {\n text-align: right;\n}\n.p-timeline-left .p-timeline-event-content {\n text-align: left;\n}\n.p-timeline-right .p-timeline-event {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: reverse;\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n.p-timeline-right .p-timeline-event-opposite {\n text-align: left;\n}\n.p-timeline-right .p-timeline-event-content {\n text-align: right;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: reverse;\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-opposite {\n text-align: right;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-content {\n text-align: left;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-opposite {\n text-align: left;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-content {\n text-align: right;\n}\n.p-timeline-event {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n position: relative;\n min-height: 70px;\n}\n.p-timeline-event:last-child {\n min-height: 0;\n}\n.p-timeline-event-opposite {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n padding: 0 1rem;\n}\n.p-timeline-event-content {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n padding: 0 1rem;\n}\n.p-timeline-event-separator {\n -webkit-box-flex: 0;\n -ms-flex: 0;\n flex: 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-timeline-event-marker {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-item-align: baseline;\n align-self: baseline;\n}\n.p-timeline-event-connector {\n -webkit-box-flex: 1;\n -ms-flex-positive: 1;\n flex-grow: 1;\n}\n.p-timeline-horizontal {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.p-timeline-horizontal .p-timeline-event {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n}\n.p-timeline-horizontal .p-timeline-event:last-child {\n -webkit-box-flex: 0;\n -ms-flex: 0;\n flex: 0;\n}\n.p-timeline-horizontal .p-timeline-event-separator {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.p-timeline-horizontal .p-timeline-event-connector {\n width: 100%;\n}\n.p-timeline-bottom .p-timeline-event {\n -webkit-box-orient: vertical;\n -webkit-box-direction: reverse;\n -ms-flex-direction: column-reverse;\n flex-direction: column-reverse;\n}\n.p-timeline-horizontal.p-timeline-alternate .p-timeline-event:nth-child(even) {\n -webkit-box-orient: vertical;\n -webkit-box-direction: reverse;\n -ms-flex-direction: column-reverse;\n flex-direction: column-reverse;\n}\n";
107
+ var css_248z = "\n.p-timeline {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n}\n.p-timeline-left .p-timeline-event-opposite {\n text-align: right;\n}\n.p-timeline-left .p-timeline-event-content {\n text-align: left;\n}\n.p-timeline-right .p-timeline-event {\n flex-direction: row-reverse;\n}\n.p-timeline-right .p-timeline-event-opposite {\n text-align: left;\n}\n.p-timeline-right .p-timeline-event-content {\n text-align: right;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) {\n flex-direction: row-reverse;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-opposite {\n text-align: right;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-content {\n text-align: left;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-opposite {\n text-align: left;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-content {\n text-align: right;\n}\n.p-timeline-event {\n display: flex;\n position: relative;\n min-height: 70px;\n}\n.p-timeline-event:last-child {\n min-height: 0;\n}\n.p-timeline-event-opposite {\n flex: 1;\n padding: 0 1rem;\n}\n.p-timeline-event-content {\n flex: 1;\n padding: 0 1rem;\n}\n.p-timeline-event-separator {\n flex: 0;\n display: flex;\n align-items: center;\n flex-direction: column;\n}\n.p-timeline-event-marker {\n display: flex;\n align-self: baseline;\n}\n.p-timeline-event-connector {\n flex-grow: 1;\n}\n.p-timeline-horizontal {\n flex-direction: row;\n}\n.p-timeline-horizontal .p-timeline-event {\n flex-direction: column;\n flex: 1;\n}\n.p-timeline-horizontal .p-timeline-event:last-child {\n flex: 0;\n}\n.p-timeline-horizontal .p-timeline-event-separator {\n flex-direction: row;\n}\n.p-timeline-horizontal .p-timeline-event-connector {\n width: 100%;\n}\n.p-timeline-bottom .p-timeline-event {\n flex-direction: column-reverse;\n}\n.p-timeline-horizontal.p-timeline-alternate .p-timeline-event:nth-child(even) {\n flex-direction: column-reverse;\n}\n";
108
108
  styleInject(css_248z);
109
109
 
110
110
  script.render = render;
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.timeline=function(e,n){"use strict";var t={name:"Timeline",props:{value:null,align:{mode:String,default:"left"},layout:{mode:String,default:"vertical"},dataKey:null},methods:{getKey(n,t){return this.dataKey?e.ObjectUtils.resolveFieldData(n,this.dataKey):t}},computed:{containerClass(){return["p-timeline p-component","p-timeline-"+this.align,"p-timeline-"+this.layout]}}};const i={class:"p-timeline-event-opposite"},l={class:"p-timeline-event-separator"},o=n.createElementVNode("div",{class:"p-timeline-event-marker"},null,-1),r=n.createElementVNode("div",{class:"p-timeline-event-connector"},null,-1),m={class:"p-timeline-event-content"};return function(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===t&&i.firstChild?i.insertBefore(l,i.firstChild):i.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-timeline {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-flex: 1;\n -ms-flex-positive: 1;\n flex-grow: 1;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-timeline-left .p-timeline-event-opposite {\n text-align: right;\n}\n.p-timeline-left .p-timeline-event-content {\n text-align: left;\n}\n.p-timeline-right .p-timeline-event {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: reverse;\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n.p-timeline-right .p-timeline-event-opposite {\n text-align: left;\n}\n.p-timeline-right .p-timeline-event-content {\n text-align: right;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: reverse;\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-opposite {\n text-align: right;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-content {\n text-align: left;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-opposite {\n text-align: left;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-content {\n text-align: right;\n}\n.p-timeline-event {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n position: relative;\n min-height: 70px;\n}\n.p-timeline-event:last-child {\n min-height: 0;\n}\n.p-timeline-event-opposite {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n padding: 0 1rem;\n}\n.p-timeline-event-content {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n padding: 0 1rem;\n}\n.p-timeline-event-separator {\n -webkit-box-flex: 0;\n -ms-flex: 0;\n flex: 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.p-timeline-event-marker {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-item-align: baseline;\n align-self: baseline;\n}\n.p-timeline-event-connector {\n -webkit-box-flex: 1;\n -ms-flex-positive: 1;\n flex-grow: 1;\n}\n.p-timeline-horizontal {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.p-timeline-horizontal .p-timeline-event {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n}\n.p-timeline-horizontal .p-timeline-event:last-child {\n -webkit-box-flex: 0;\n -ms-flex: 0;\n flex: 0;\n}\n.p-timeline-horizontal .p-timeline-event-separator {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.p-timeline-horizontal .p-timeline-event-connector {\n width: 100%;\n}\n.p-timeline-bottom .p-timeline-event {\n -webkit-box-orient: vertical;\n -webkit-box-direction: reverse;\n -ms-flex-direction: column-reverse;\n flex-direction: column-reverse;\n}\n.p-timeline-horizontal.p-timeline-alternate .p-timeline-event:nth-child(even) {\n -webkit-box-orient: vertical;\n -webkit-box-direction: reverse;\n -ms-flex-direction: column-reverse;\n flex-direction: column-reverse;\n}\n"),t.render=function(e,t,a,s,c,p){return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(p.containerClass)},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.value,((t,s)=>(n.openBlock(),n.createElementBlock("div",{key:p.getKey(t,s),class:"p-timeline-event"},[n.createElementVNode("div",i,[n.renderSlot(e.$slots,"opposite",{item:t,index:s})]),n.createElementVNode("div",l,[n.renderSlot(e.$slots,"marker",{item:t,index:s},(()=>[o])),s!==a.value.length-1?n.renderSlot(e.$slots,"connector",{key:0,item:t,index:s},(()=>[r])):n.createCommentVNode("",!0)]),n.createElementVNode("div",m,[n.renderSlot(e.$slots,"content",{item:t,index:s})])])))),128))],2)},t}(primevue.utils,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.timeline=function(e,n){"use strict";var t={name:"Timeline",props:{value:null,align:{mode:String,default:"left"},layout:{mode:String,default:"vertical"},dataKey:null},methods:{getKey(n,t){return this.dataKey?e.ObjectUtils.resolveFieldData(n,this.dataKey):t}},computed:{containerClass(){return["p-timeline p-component","p-timeline-"+this.align,"p-timeline-"+this.layout]}}};const i={class:"p-timeline-event-opposite"},l={class:"p-timeline-event-separator"},o=n.createElementVNode("div",{class:"p-timeline-event-marker"},null,-1),r=n.createElementVNode("div",{class:"p-timeline-event-connector"},null,-1),m={class:"p-timeline-event-content"};return function(e,n){void 0===n&&(n={});var t=n.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===t&&i.firstChild?i.insertBefore(l,i.firstChild):i.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("\n.p-timeline {\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n}\n.p-timeline-left .p-timeline-event-opposite {\n text-align: right;\n}\n.p-timeline-left .p-timeline-event-content {\n text-align: left;\n}\n.p-timeline-right .p-timeline-event {\n flex-direction: row-reverse;\n}\n.p-timeline-right .p-timeline-event-opposite {\n text-align: left;\n}\n.p-timeline-right .p-timeline-event-content {\n text-align: right;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) {\n flex-direction: row-reverse;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-opposite {\n text-align: right;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(odd) .p-timeline-event-content {\n text-align: left;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-opposite {\n text-align: left;\n}\n.p-timeline-vertical.p-timeline-alternate .p-timeline-event:nth-child(even) .p-timeline-event-content {\n text-align: right;\n}\n.p-timeline-event {\n display: flex;\n position: relative;\n min-height: 70px;\n}\n.p-timeline-event:last-child {\n min-height: 0;\n}\n.p-timeline-event-opposite {\n flex: 1;\n padding: 0 1rem;\n}\n.p-timeline-event-content {\n flex: 1;\n padding: 0 1rem;\n}\n.p-timeline-event-separator {\n flex: 0;\n display: flex;\n align-items: center;\n flex-direction: column;\n}\n.p-timeline-event-marker {\n display: flex;\n align-self: baseline;\n}\n.p-timeline-event-connector {\n flex-grow: 1;\n}\n.p-timeline-horizontal {\n flex-direction: row;\n}\n.p-timeline-horizontal .p-timeline-event {\n flex-direction: column;\n flex: 1;\n}\n.p-timeline-horizontal .p-timeline-event:last-child {\n flex: 0;\n}\n.p-timeline-horizontal .p-timeline-event-separator {\n flex-direction: row;\n}\n.p-timeline-horizontal .p-timeline-event-connector {\n width: 100%;\n}\n.p-timeline-bottom .p-timeline-event {\n flex-direction: column-reverse;\n}\n.p-timeline-horizontal.p-timeline-alternate .p-timeline-event:nth-child(even) {\n flex-direction: column-reverse;\n}\n"),t.render=function(e,t,a,p,c,d){return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(d.containerClass)},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.value,((t,p)=>(n.openBlock(),n.createElementBlock("div",{key:d.getKey(t,p),class:"p-timeline-event"},[n.createElementVNode("div",i,[n.renderSlot(e.$slots,"opposite",{item:t,index:p})]),n.createElementVNode("div",l,[n.renderSlot(e.$slots,"marker",{item:t,index:p},(()=>[o])),p!==a.value.length-1?n.renderSlot(e.$slots,"connector",{key:0,item:t,index:p},(()=>[r])):n.createCommentVNode("",!0)]),n.createElementVNode("div",m,[n.renderSlot(e.$slots,"content",{item:t,index:p})])])))),128))],2)},t}(primevue.utils,Vue);
package/toast/Toast.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { VNode } from 'vue';
1
+ import { ButtonHTMLAttributes, VNode } from 'vue';
2
2
  import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
3
3
 
4
4
  type ToastPositionType = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'center' | undefined;
@@ -107,6 +107,10 @@ export interface ToastProps {
107
107
  * Default value is 'pi pi-check'.
108
108
  */
109
109
  successIcon?: string | undefined;
110
+ /**
111
+ * Uses to pass all properties of the HTMLButtonElement to the close button.
112
+ */
113
+ closeButtonProps?: ButtonHTMLAttributes | undefined;
110
114
  }
111
115
 
112
116
  export interface ToastSlots {
package/toast/Toast.vue CHANGED
@@ -12,6 +12,7 @@
12
12
  :warnIcon="warnIcon"
13
13
  :errorIcon="errorIcon"
14
14
  :successIcon="successIcon"
15
+ :closeButtonProps="closeButtonProps"
15
16
  @close="remove($event)"
16
17
  />
17
18
  </transition-group>
@@ -70,6 +71,10 @@ export default {
70
71
  successIcon: {
71
72
  type: String,
72
73
  default: 'pi pi-check'
74
+ },
75
+ closeButtonProps: {
76
+ type: null,
77
+ default: null
73
78
  }
74
79
  },
75
80
  data() {
@@ -10,7 +10,7 @@
10
10
  </template>
11
11
  <component v-else :is="template" :message="message"></component>
12
12
  <div v-if="message.closable !== false">
13
- <button v-ripple class="p-toast-icon-close p-link" @click="onCloseClick" type="button">
13
+ <button v-ripple class="p-toast-icon-close p-link" type="button" :aria-label="closeAriaLabel" @click="onCloseClick" autofocus v-bind="closeButtonProps">
14
14
  <span :class="['p-toast-icon-close-icon', closeIcon]" />
15
15
  </button>
16
16
  </div>
@@ -25,13 +25,38 @@ export default {
25
25
  name: 'ToastMessage',
26
26
  emits: ['close'],
27
27
  props: {
28
- message: null,
29
- template: null,
30
- closeIcon: null,
31
- infoIcon: null,
32
- warnIcon: null,
33
- errorIcon: null,
34
- successIcon: null
28
+ message: {
29
+ type: null,
30
+ default: null
31
+ },
32
+ template: {
33
+ type: null,
34
+ default: null
35
+ },
36
+ closeIcon: {
37
+ type: String,
38
+ default: null
39
+ },
40
+ infoIcon: {
41
+ type: String,
42
+ default: null
43
+ },
44
+ warnIcon: {
45
+ type: String,
46
+ default: null
47
+ },
48
+ errorIcon: {
49
+ type: String,
50
+ default: null
51
+ },
52
+ successIcon: {
53
+ type: String,
54
+ default: null
55
+ },
56
+ closeButtonProps: {
57
+ type: null,
58
+ default: null
59
+ }
35
60
  },
36
61
  closeTimeout: null,
37
62
  mounted() {
@@ -82,6 +107,9 @@ export default {
82
107
  [this.successIcon]: this.message.severity === 'success'
83
108
  }
84
109
  ];
110
+ },
111
+ closeAriaLabel() {
112
+ return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : undefined;
85
113
  }
86
114
  },
87
115
  directives: {
@@ -16,13 +16,38 @@ var script$1 = {
16
16
  name: 'ToastMessage',
17
17
  emits: ['close'],
18
18
  props: {
19
- message: null,
20
- template: null,
21
- closeIcon: null,
22
- infoIcon: null,
23
- warnIcon: null,
24
- errorIcon: null,
25
- successIcon: null
19
+ message: {
20
+ type: null,
21
+ default: null
22
+ },
23
+ template: {
24
+ type: null,
25
+ default: null
26
+ },
27
+ closeIcon: {
28
+ type: String,
29
+ default: null
30
+ },
31
+ infoIcon: {
32
+ type: String,
33
+ default: null
34
+ },
35
+ warnIcon: {
36
+ type: String,
37
+ default: null
38
+ },
39
+ errorIcon: {
40
+ type: String,
41
+ default: null
42
+ },
43
+ successIcon: {
44
+ type: String,
45
+ default: null
46
+ },
47
+ closeButtonProps: {
48
+ type: null,
49
+ default: null
50
+ }
26
51
  },
27
52
  closeTimeout: null,
28
53
  mounted() {
@@ -73,6 +98,9 @@ var script$1 = {
73
98
  [this.successIcon]: this.message.severity === 'success'
74
99
  }
75
100
  ];
101
+ },
102
+ closeAriaLabel() {
103
+ return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : undefined;
76
104
  }
77
105
  },
78
106
  directives: {
@@ -84,6 +112,7 @@ const _hoisted_1 = { class: "p-toast-message-text" };
84
112
  const _hoisted_2 = { class: "p-toast-summary" };
85
113
  const _hoisted_3 = { class: "p-toast-detail" };
86
114
  const _hoisted_4 = { key: 2 };
115
+ const _hoisted_5 = ["aria-label"];
87
116
 
88
117
  function render$1(_ctx, _cache, $props, $setup, $data, $options) {
89
118
  const _directive_ripple = vue.resolveDirective("ripple");
@@ -113,15 +142,17 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
113
142
  }, null, 8, ["message"])),
114
143
  ($props.message.closable !== false)
115
144
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
116
- vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", {
145
+ vue.withDirectives((vue.openBlock(), vue.createElementBlock("button", vue.mergeProps({
117
146
  class: "p-toast-icon-close p-link",
147
+ type: "button",
148
+ "aria-label": $options.closeAriaLabel,
118
149
  onClick: _cache[0] || (_cache[0] = (...args) => ($options.onCloseClick && $options.onCloseClick(...args))),
119
- type: "button"
120
- }, [
150
+ autofocus: ""
151
+ }, $props.closeButtonProps), [
121
152
  vue.createElementVNode("span", {
122
153
  class: vue.normalizeClass(['p-toast-icon-close-icon', $props.closeIcon])
123
154
  }, null, 2)
124
- ])), [
155
+ ], 16, _hoisted_5)), [
125
156
  [_directive_ripple]
126
157
  ])
127
158
  ]))
@@ -177,6 +208,10 @@ var script = {
177
208
  successIcon: {
178
209
  type: String,
179
210
  default: 'pi pi-check'
211
+ },
212
+ closeButtonProps: {
213
+ type: null,
214
+ default: null
180
215
  }
181
216
  },
182
217
  data() {
@@ -333,8 +368,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
333
368
  warnIcon: $props.warnIcon,
334
369
  errorIcon: $props.errorIcon,
335
370
  successIcon: $props.successIcon,
371
+ closeButtonProps: $props.closeButtonProps,
336
372
  onClose: _cache[0] || (_cache[0] = $event => ($options.remove($event)))
337
- }, null, 8, ["message", "template", "closeIcon", "infoIcon", "warnIcon", "errorIcon", "successIcon"]))
373
+ }, null, 8, ["message", "template", "closeIcon", "infoIcon", "warnIcon", "errorIcon", "successIcon", "closeButtonProps"]))
338
374
  }), 128))
339
375
  ]),
340
376
  _: 1
@@ -372,7 +408,7 @@ function styleInject(css, ref) {
372
408
  }
373
409
  }
374
410
 
375
- var css_248z = "\n.p-toast {\n position: fixed;\n width: 25rem;\n}\n.p-toast-message-content {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n.p-toast-message-text {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-toast-top-right {\n top: 20px;\n right: 20px;\n}\n.p-toast-top-left {\n top: 20px;\n left: 20px;\n}\n.p-toast-bottom-left {\n bottom: 20px;\n left: 20px;\n}\n.p-toast-bottom-right {\n bottom: 20px;\n right: 20px;\n}\n.p-toast-top-center {\n top: 20px;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n.p-toast-bottom-center {\n bottom: 20px;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n.p-toast-center {\n left: 50%;\n top: 50%;\n min-width: 20vw;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.p-toast-icon-close {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n.p-toast-icon-close.p-link {\n cursor: pointer;\n}\n\n/* Animations */\n.p-toast-message-enter-from {\n opacity: 0;\n -webkit-transform: translateY(50%);\n transform: translateY(50%);\n}\n.p-toast-message-leave-from {\n max-height: 1000px;\n}\n.p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n}\n.p-toast-message-enter-active {\n -webkit-transition: transform 0.3s, opacity 0.3s;\n -webkit-transition: opacity 0.3s, -webkit-transform 0.3s;\n transition: opacity 0.3s, -webkit-transform 0.3s;\n transition: transform 0.3s, opacity 0.3s;\n transition: transform 0.3s, opacity 0.3s, -webkit-transform 0.3s;\n}\n.p-toast-message-leave-active {\n -webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n}\n";
411
+ var css_248z = "\n.p-toast {\n position: fixed;\n width: 25rem;\n}\n.p-toast-message-content {\n display: flex;\n align-items: flex-start;\n}\n.p-toast-message-text {\n flex: 1 1 auto;\n}\n.p-toast-top-right {\n top: 20px;\n right: 20px;\n}\n.p-toast-top-left {\n top: 20px;\n left: 20px;\n}\n.p-toast-bottom-left {\n bottom: 20px;\n left: 20px;\n}\n.p-toast-bottom-right {\n bottom: 20px;\n right: 20px;\n}\n.p-toast-top-center {\n top: 20px;\n left: 50%;\n transform: translateX(-50%);\n}\n.p-toast-bottom-center {\n bottom: 20px;\n left: 50%;\n transform: translateX(-50%);\n}\n.p-toast-center {\n left: 50%;\n top: 50%;\n min-width: 20vw;\n transform: translate(-50%, -50%);\n}\n.p-toast-icon-close {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n.p-toast-icon-close.p-link {\n cursor: pointer;\n}\n\n/* Animations */\n.p-toast-message-enter-from {\n opacity: 0;\n -webkit-transform: translateY(50%);\n -ms-transform: translateY(50%);\n transform: translateY(50%);\n}\n.p-toast-message-leave-from {\n max-height: 1000px;\n}\n.p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n}\n.p-toast-message-enter-active {\n -webkit-transition: transform 0.3s, opacity 0.3s;\n transition: transform 0.3s, opacity 0.3s;\n}\n.p-toast-message-leave-active {\n -webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n}\n";
376
412
  styleInject(css_248z);
377
413
 
378
414
  script.render = render;
@@ -1 +1 @@
1
- "use strict";var e=require("primevue/portal"),t=require("primevue/toasteventbus"),s=require("primevue/utils"),n=require("primevue/ripple"),o=require("vue");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=a(e),r=a(t),l={name:"ToastMessage",emits:["close"],props:{message:null,template:null,closeIcon:null,infoIcon:null,warnIcon:null,errorIcon:null,successIcon:null},closeTimeout:null,mounted(){this.message.life&&(this.closeTimeout=setTimeout((()=>{this.close()}),this.message.life))},beforeUnmount(){this.clearCloseTimeout()},methods:{close(){this.$emit("close",this.message)},onCloseClick(){this.clearCloseTimeout(),this.close()},clearCloseTimeout(){this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)}},computed:{containerClass(){return["p-toast-message",this.message.styleClass,{"p-toast-message-info":"info"===this.message.severity,"p-toast-message-warn":"warn"===this.message.severity,"p-toast-message-error":"error"===this.message.severity,"p-toast-message-success":"success"===this.message.severity}]},iconClass(){return["p-toast-message-icon",{[this.infoIcon]:"info"===this.message.severity,[this.warnIcon]:"warn"===this.message.severity,[this.errorIcon]:"error"===this.message.severity,[this.successIcon]:"success"===this.message.severity}]}},directives:{ripple:a(n).default}};const c={class:"p-toast-message-text"},m={class:"p-toast-summary"},p={class:"p-toast-detail"},u={key:2};l.render=function(e,t,s,n,a,i){const r=o.resolveDirective("ripple");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(i.containerClass),role:"alert","aria-live":"assertive","aria-atomic":"true"},[o.createElementVNode("div",{class:o.normalizeClass(["p-toast-message-content",s.message.contentStyleClass])},[s.template?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(s.template),{key:1,message:s.message},null,8,["message"])):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("span",{class:o.normalizeClass(i.iconClass)},null,2),o.createElementVNode("div",c,[o.createElementVNode("span",m,o.toDisplayString(s.message.summary),1),o.createElementVNode("div",p,o.toDisplayString(s.message.detail),1)])],64)),!1!==s.message.closable?(o.openBlock(),o.createElementBlock("div",u,[o.withDirectives((o.openBlock(),o.createElementBlock("button",{class:"p-toast-icon-close p-link",onClick:t[0]||(t[0]=(...e)=>i.onCloseClick&&i.onCloseClick(...e)),type:"button"},[o.createElementVNode("span",{class:o.normalizeClass(["p-toast-icon-close-icon",s.closeIcon])},null,2)])),[[r]])])):o.createCommentVNode("",!0)],2)],2)};var d=0,h={name:"Toast",inheritAttrs:!1,props:{group:{type:String,default:null},position:{type:String,default:"top-right"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},breakpoints:{type:Object,default:null},closeIcon:{type:String,default:"pi pi-times"},infoIcon:{type:String,default:"pi pi-info-circle"},warnIcon:{type:String,default:"pi pi-exclamation-triangle"},errorIcon:{type:String,default:"pi pi-times"},successIcon:{type:String,default:"pi pi-check"}},data:()=>({messages:[]}),styleElement:null,mounted(){r.default.on("add",this.onAdd),r.default.on("remove-group",this.onRemoveGroup),r.default.on("remove-all-groups",this.onRemoveAllGroups),this.breakpoints&&this.createStyle()},beforeUnmount(){this.destroyStyle(),this.$refs.container&&this.autoZIndex&&s.ZIndexUtils.clear(this.$refs.container),r.default.off("add",this.onAdd),r.default.off("remove-group",this.onRemoveGroup),r.default.off("remove-all-groups",this.onRemoveAllGroups)},methods:{add(e){null==e.id&&(e.id=d++),this.messages=[...this.messages,e]},remove(e){let t=-1;for(let s=0;s<this.messages.length;s++)if(this.messages[s]===e){t=s;break}this.messages.splice(t,1)},onAdd(e){this.group==e.group&&this.add(e)},onRemoveGroup(e){this.group===e&&(this.messages=[])},onRemoveAllGroups(){this.messages=[]},onEnter(){this.$refs.container.setAttribute(this.attributeSelector,""),this.autoZIndex&&s.ZIndexUtils.set("modal",this.$refs.container,this.baseZIndex||this.$primevue.config.zIndex.modal)},onLeave(){this.$refs.container&&this.autoZIndex&&s.ObjectUtils.isEmpty(this.messages)&&setTimeout((()=>{s.ZIndexUtils.clear(this.$refs.container)}),200)},createStyle(){if(!this.styleElement){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e="";for(let t in this.breakpoints){let s="";for(let e in this.breakpoints[t])s+=e+":"+this.breakpoints[t][e]+"!important;";e+=`\n @media screen and (max-width: ${t}) {\n .p-toast[${this.attributeSelector}] {\n ${s}\n }\n }\n `}this.styleElement.innerHTML=e}},destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{containerClass(){return["p-toast p-component p-toast-"+this.position,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},attributeSelector:()=>s.UniqueComponentId()},components:{ToastMessage:l,Portal:i.default}};!function(e,t){void 0===t&&(t={});var s=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===s&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-toast {\n position: fixed;\n width: 25rem;\n}\n.p-toast-message-content {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n.p-toast-message-text {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-toast-top-right {\n top: 20px;\n right: 20px;\n}\n.p-toast-top-left {\n top: 20px;\n left: 20px;\n}\n.p-toast-bottom-left {\n bottom: 20px;\n left: 20px;\n}\n.p-toast-bottom-right {\n bottom: 20px;\n right: 20px;\n}\n.p-toast-top-center {\n top: 20px;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n.p-toast-bottom-center {\n bottom: 20px;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n.p-toast-center {\n left: 50%;\n top: 50%;\n min-width: 20vw;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.p-toast-icon-close {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n.p-toast-icon-close.p-link {\n cursor: pointer;\n}\n\n/* Animations */\n.p-toast-message-enter-from {\n opacity: 0;\n -webkit-transform: translateY(50%);\n transform: translateY(50%);\n}\n.p-toast-message-leave-from {\n max-height: 1000px;\n}\n.p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n}\n.p-toast-message-enter-active {\n -webkit-transition: transform 0.3s, opacity 0.3s;\n -webkit-transition: opacity 0.3s, -webkit-transform 0.3s;\n transition: opacity 0.3s, -webkit-transform 0.3s;\n transition: transform 0.3s, opacity 0.3s;\n transition: transform 0.3s, opacity 0.3s, -webkit-transform 0.3s;\n}\n.p-toast-message-leave-active {\n -webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n}\n"),h.render=function(e,t,s,n,a,i){const r=o.resolveComponent("ToastMessage"),l=o.resolveComponent("Portal");return o.openBlock(),o.createBlock(l,null,{default:o.withCtx((()=>[o.createElementVNode("div",o.mergeProps({ref:"container",class:i.containerClass},e.$attrs),[o.createVNode(o.TransitionGroup,{name:"p-toast-message",tag:"div",onEnter:i.onEnter,onLeave:i.onLeave},{default:o.withCtx((()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.messages,(n=>(o.openBlock(),o.createBlock(r,{key:n.id,message:n,template:e.$slots.message,closeIcon:s.closeIcon,infoIcon:s.infoIcon,warnIcon:s.warnIcon,errorIcon:s.errorIcon,successIcon:s.successIcon,onClose:t[0]||(t[0]=e=>i.remove(e))},null,8,["message","template","closeIcon","infoIcon","warnIcon","errorIcon","successIcon"])))),128))])),_:1},8,["onEnter","onLeave"])],16)])),_:1})},module.exports=h;
1
+ "use strict";var e=require("primevue/portal"),t=require("primevue/toasteventbus"),s=require("primevue/utils"),n=require("primevue/ripple"),o=require("vue");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=a(e),l=a(t),r={name:"ToastMessage",emits:["close"],props:{message:{type:null,default:null},template:{type:null,default:null},closeIcon:{type:String,default:null},infoIcon:{type:String,default:null},warnIcon:{type:String,default:null},errorIcon:{type:String,default:null},successIcon:{type:String,default:null},closeButtonProps:{type:null,default:null}},closeTimeout:null,mounted(){this.message.life&&(this.closeTimeout=setTimeout((()=>{this.close()}),this.message.life))},beforeUnmount(){this.clearCloseTimeout()},methods:{close(){this.$emit("close",this.message)},onCloseClick(){this.clearCloseTimeout(),this.close()},clearCloseTimeout(){this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)}},computed:{containerClass(){return["p-toast-message",this.message.styleClass,{"p-toast-message-info":"info"===this.message.severity,"p-toast-message-warn":"warn"===this.message.severity,"p-toast-message-error":"error"===this.message.severity,"p-toast-message-success":"success"===this.message.severity}]},iconClass(){return["p-toast-message-icon",{[this.infoIcon]:"info"===this.message.severity,[this.warnIcon]:"warn"===this.message.severity,[this.errorIcon]:"error"===this.message.severity,[this.successIcon]:"success"===this.message.severity}]},closeAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},directives:{ripple:a(n).default}};const c={class:"p-toast-message-text"},m={class:"p-toast-summary"},p={class:"p-toast-detail"},u={key:2},d=["aria-label"];r.render=function(e,t,s,n,a,i){const l=o.resolveDirective("ripple");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(i.containerClass),role:"alert","aria-live":"assertive","aria-atomic":"true"},[o.createElementVNode("div",{class:o.normalizeClass(["p-toast-message-content",s.message.contentStyleClass])},[s.template?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(s.template),{key:1,message:s.message},null,8,["message"])):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("span",{class:o.normalizeClass(i.iconClass)},null,2),o.createElementVNode("div",c,[o.createElementVNode("span",m,o.toDisplayString(s.message.summary),1),o.createElementVNode("div",p,o.toDisplayString(s.message.detail),1)])],64)),!1!==s.message.closable?(o.openBlock(),o.createElementBlock("div",u,[o.withDirectives((o.openBlock(),o.createElementBlock("button",o.mergeProps({class:"p-toast-icon-close p-link",type:"button","aria-label":i.closeAriaLabel,onClick:t[0]||(t[0]=(...e)=>i.onCloseClick&&i.onCloseClick(...e)),autofocus:""},s.closeButtonProps),[o.createElementVNode("span",{class:o.normalizeClass(["p-toast-icon-close-icon",s.closeIcon])},null,2)],16,d)),[[l]])])):o.createCommentVNode("",!0)],2)],2)};var h=0,f={name:"Toast",inheritAttrs:!1,props:{group:{type:String,default:null},position:{type:String,default:"top-right"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},breakpoints:{type:Object,default:null},closeIcon:{type:String,default:"pi pi-times"},infoIcon:{type:String,default:"pi pi-info-circle"},warnIcon:{type:String,default:"pi pi-exclamation-triangle"},errorIcon:{type:String,default:"pi pi-times"},successIcon:{type:String,default:"pi pi-check"},closeButtonProps:{type:null,default:null}},data:()=>({messages:[]}),styleElement:null,mounted(){l.default.on("add",this.onAdd),l.default.on("remove-group",this.onRemoveGroup),l.default.on("remove-all-groups",this.onRemoveAllGroups),this.breakpoints&&this.createStyle()},beforeUnmount(){this.destroyStyle(),this.$refs.container&&this.autoZIndex&&s.ZIndexUtils.clear(this.$refs.container),l.default.off("add",this.onAdd),l.default.off("remove-group",this.onRemoveGroup),l.default.off("remove-all-groups",this.onRemoveAllGroups)},methods:{add(e){null==e.id&&(e.id=h++),this.messages=[...this.messages,e]},remove(e){let t=-1;for(let s=0;s<this.messages.length;s++)if(this.messages[s]===e){t=s;break}this.messages.splice(t,1)},onAdd(e){this.group==e.group&&this.add(e)},onRemoveGroup(e){this.group===e&&(this.messages=[])},onRemoveAllGroups(){this.messages=[]},onEnter(){this.$refs.container.setAttribute(this.attributeSelector,""),this.autoZIndex&&s.ZIndexUtils.set("modal",this.$refs.container,this.baseZIndex||this.$primevue.config.zIndex.modal)},onLeave(){this.$refs.container&&this.autoZIndex&&s.ObjectUtils.isEmpty(this.messages)&&setTimeout((()=>{s.ZIndexUtils.clear(this.$refs.container)}),200)},createStyle(){if(!this.styleElement){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e="";for(let t in this.breakpoints){let s="";for(let e in this.breakpoints[t])s+=e+":"+this.breakpoints[t][e]+"!important;";e+=`\n @media screen and (max-width: ${t}) {\n .p-toast[${this.attributeSelector}] {\n ${s}\n }\n }\n `}this.styleElement.innerHTML=e}},destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{containerClass(){return["p-toast p-component p-toast-"+this.position,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},attributeSelector:()=>s.UniqueComponentId()},components:{ToastMessage:r,Portal:i.default}};!function(e,t){void 0===t&&(t={});var s=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===s&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-toast {\n position: fixed;\n width: 25rem;\n}\n.p-toast-message-content {\n display: flex;\n align-items: flex-start;\n}\n.p-toast-message-text {\n flex: 1 1 auto;\n}\n.p-toast-top-right {\n top: 20px;\n right: 20px;\n}\n.p-toast-top-left {\n top: 20px;\n left: 20px;\n}\n.p-toast-bottom-left {\n bottom: 20px;\n left: 20px;\n}\n.p-toast-bottom-right {\n bottom: 20px;\n right: 20px;\n}\n.p-toast-top-center {\n top: 20px;\n left: 50%;\n transform: translateX(-50%);\n}\n.p-toast-bottom-center {\n bottom: 20px;\n left: 50%;\n transform: translateX(-50%);\n}\n.p-toast-center {\n left: 50%;\n top: 50%;\n min-width: 20vw;\n transform: translate(-50%, -50%);\n}\n.p-toast-icon-close {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n.p-toast-icon-close.p-link {\n cursor: pointer;\n}\n\n/* Animations */\n.p-toast-message-enter-from {\n opacity: 0;\n -webkit-transform: translateY(50%);\n -ms-transform: translateY(50%);\n transform: translateY(50%);\n}\n.p-toast-message-leave-from {\n max-height: 1000px;\n}\n.p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n}\n.p-toast-message-enter-active {\n -webkit-transition: transform 0.3s, opacity 0.3s;\n transition: transform 0.3s, opacity 0.3s;\n}\n.p-toast-message-leave-active {\n -webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n}\n"),f.render=function(e,t,s,n,a,i){const l=o.resolveComponent("ToastMessage"),r=o.resolveComponent("Portal");return o.openBlock(),o.createBlock(r,null,{default:o.withCtx((()=>[o.createElementVNode("div",o.mergeProps({ref:"container",class:i.containerClass},e.$attrs),[o.createVNode(o.TransitionGroup,{name:"p-toast-message",tag:"div",onEnter:i.onEnter,onLeave:i.onLeave},{default:o.withCtx((()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.messages,(n=>(o.openBlock(),o.createBlock(l,{key:n.id,message:n,template:e.$slots.message,closeIcon:s.closeIcon,infoIcon:s.infoIcon,warnIcon:s.warnIcon,errorIcon:s.errorIcon,successIcon:s.successIcon,closeButtonProps:s.closeButtonProps,onClose:t[0]||(t[0]=e=>i.remove(e))},null,8,["message","template","closeIcon","infoIcon","warnIcon","errorIcon","successIcon","closeButtonProps"])))),128))])),_:1},8,["onEnter","onLeave"])],16)])),_:1})},module.exports=f;
@@ -2,19 +2,44 @@ import Portal from 'primevue/portal';
2
2
  import ToastEventBus from 'primevue/toasteventbus';
3
3
  import { ZIndexUtils, ObjectUtils, UniqueComponentId } from 'primevue/utils';
4
4
  import Ripple from 'primevue/ripple';
5
- import { resolveDirective, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, toDisplayString, createBlock, resolveDynamicComponent, withDirectives, createCommentVNode, resolveComponent, withCtx, mergeProps, createVNode, TransitionGroup, renderList } from 'vue';
5
+ import { resolveDirective, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, toDisplayString, createBlock, resolveDynamicComponent, withDirectives, mergeProps, createCommentVNode, resolveComponent, withCtx, createVNode, TransitionGroup, renderList } from 'vue';
6
6
 
7
7
  var script$1 = {
8
8
  name: 'ToastMessage',
9
9
  emits: ['close'],
10
10
  props: {
11
- message: null,
12
- template: null,
13
- closeIcon: null,
14
- infoIcon: null,
15
- warnIcon: null,
16
- errorIcon: null,
17
- successIcon: null
11
+ message: {
12
+ type: null,
13
+ default: null
14
+ },
15
+ template: {
16
+ type: null,
17
+ default: null
18
+ },
19
+ closeIcon: {
20
+ type: String,
21
+ default: null
22
+ },
23
+ infoIcon: {
24
+ type: String,
25
+ default: null
26
+ },
27
+ warnIcon: {
28
+ type: String,
29
+ default: null
30
+ },
31
+ errorIcon: {
32
+ type: String,
33
+ default: null
34
+ },
35
+ successIcon: {
36
+ type: String,
37
+ default: null
38
+ },
39
+ closeButtonProps: {
40
+ type: null,
41
+ default: null
42
+ }
18
43
  },
19
44
  closeTimeout: null,
20
45
  mounted() {
@@ -65,6 +90,9 @@ var script$1 = {
65
90
  [this.successIcon]: this.message.severity === 'success'
66
91
  }
67
92
  ];
93
+ },
94
+ closeAriaLabel() {
95
+ return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : undefined;
68
96
  }
69
97
  },
70
98
  directives: {
@@ -76,6 +104,7 @@ const _hoisted_1 = { class: "p-toast-message-text" };
76
104
  const _hoisted_2 = { class: "p-toast-summary" };
77
105
  const _hoisted_3 = { class: "p-toast-detail" };
78
106
  const _hoisted_4 = { key: 2 };
107
+ const _hoisted_5 = ["aria-label"];
79
108
 
80
109
  function render$1(_ctx, _cache, $props, $setup, $data, $options) {
81
110
  const _directive_ripple = resolveDirective("ripple");
@@ -105,15 +134,17 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
105
134
  }, null, 8, ["message"])),
106
135
  ($props.message.closable !== false)
107
136
  ? (openBlock(), createElementBlock("div", _hoisted_4, [
108
- withDirectives((openBlock(), createElementBlock("button", {
137
+ withDirectives((openBlock(), createElementBlock("button", mergeProps({
109
138
  class: "p-toast-icon-close p-link",
139
+ type: "button",
140
+ "aria-label": $options.closeAriaLabel,
110
141
  onClick: _cache[0] || (_cache[0] = (...args) => ($options.onCloseClick && $options.onCloseClick(...args))),
111
- type: "button"
112
- }, [
142
+ autofocus: ""
143
+ }, $props.closeButtonProps), [
113
144
  createElementVNode("span", {
114
145
  class: normalizeClass(['p-toast-icon-close-icon', $props.closeIcon])
115
146
  }, null, 2)
116
- ])), [
147
+ ], 16, _hoisted_5)), [
117
148
  [_directive_ripple]
118
149
  ])
119
150
  ]))
@@ -169,6 +200,10 @@ var script = {
169
200
  successIcon: {
170
201
  type: String,
171
202
  default: 'pi pi-check'
203
+ },
204
+ closeButtonProps: {
205
+ type: null,
206
+ default: null
172
207
  }
173
208
  },
174
209
  data() {
@@ -325,8 +360,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
325
360
  warnIcon: $props.warnIcon,
326
361
  errorIcon: $props.errorIcon,
327
362
  successIcon: $props.successIcon,
363
+ closeButtonProps: $props.closeButtonProps,
328
364
  onClose: _cache[0] || (_cache[0] = $event => ($options.remove($event)))
329
- }, null, 8, ["message", "template", "closeIcon", "infoIcon", "warnIcon", "errorIcon", "successIcon"]))
365
+ }, null, 8, ["message", "template", "closeIcon", "infoIcon", "warnIcon", "errorIcon", "successIcon", "closeButtonProps"]))
330
366
  }), 128))
331
367
  ]),
332
368
  _: 1
@@ -364,7 +400,7 @@ function styleInject(css, ref) {
364
400
  }
365
401
  }
366
402
 
367
- var css_248z = "\n.p-toast {\n position: fixed;\n width: 25rem;\n}\n.p-toast-message-content {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n.p-toast-message-text {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-toast-top-right {\n top: 20px;\n right: 20px;\n}\n.p-toast-top-left {\n top: 20px;\n left: 20px;\n}\n.p-toast-bottom-left {\n bottom: 20px;\n left: 20px;\n}\n.p-toast-bottom-right {\n bottom: 20px;\n right: 20px;\n}\n.p-toast-top-center {\n top: 20px;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n.p-toast-bottom-center {\n bottom: 20px;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n.p-toast-center {\n left: 50%;\n top: 50%;\n min-width: 20vw;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.p-toast-icon-close {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n.p-toast-icon-close.p-link {\n cursor: pointer;\n}\n\n/* Animations */\n.p-toast-message-enter-from {\n opacity: 0;\n -webkit-transform: translateY(50%);\n transform: translateY(50%);\n}\n.p-toast-message-leave-from {\n max-height: 1000px;\n}\n.p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n}\n.p-toast-message-enter-active {\n -webkit-transition: transform 0.3s, opacity 0.3s;\n -webkit-transition: opacity 0.3s, -webkit-transform 0.3s;\n transition: opacity 0.3s, -webkit-transform 0.3s;\n transition: transform 0.3s, opacity 0.3s;\n transition: transform 0.3s, opacity 0.3s, -webkit-transform 0.3s;\n}\n.p-toast-message-leave-active {\n -webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n}\n";
403
+ var css_248z = "\n.p-toast {\n position: fixed;\n width: 25rem;\n}\n.p-toast-message-content {\n display: flex;\n align-items: flex-start;\n}\n.p-toast-message-text {\n flex: 1 1 auto;\n}\n.p-toast-top-right {\n top: 20px;\n right: 20px;\n}\n.p-toast-top-left {\n top: 20px;\n left: 20px;\n}\n.p-toast-bottom-left {\n bottom: 20px;\n left: 20px;\n}\n.p-toast-bottom-right {\n bottom: 20px;\n right: 20px;\n}\n.p-toast-top-center {\n top: 20px;\n left: 50%;\n transform: translateX(-50%);\n}\n.p-toast-bottom-center {\n bottom: 20px;\n left: 50%;\n transform: translateX(-50%);\n}\n.p-toast-center {\n left: 50%;\n top: 50%;\n min-width: 20vw;\n transform: translate(-50%, -50%);\n}\n.p-toast-icon-close {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n.p-toast-icon-close.p-link {\n cursor: pointer;\n}\n\n/* Animations */\n.p-toast-message-enter-from {\n opacity: 0;\n -webkit-transform: translateY(50%);\n -ms-transform: translateY(50%);\n transform: translateY(50%);\n}\n.p-toast-message-leave-from {\n max-height: 1000px;\n}\n.p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n}\n.p-toast-message-enter-active {\n -webkit-transition: transform 0.3s, opacity 0.3s;\n transition: transform 0.3s, opacity 0.3s;\n}\n.p-toast-message-leave-active {\n -webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n}\n";
368
404
  styleInject(css_248z);
369
405
 
370
406
  script.render = render;
@@ -1 +1 @@
1
- import e from"primevue/portal";import t from"primevue/toasteventbus";import{ZIndexUtils as s,ObjectUtils as n,UniqueComponentId as o}from"primevue/utils";import i from"primevue/ripple";import{resolveDirective as a,openBlock as r,createElementBlock as l,normalizeClass as m,createElementVNode as c,Fragment as p,toDisplayString as u,createBlock as h,resolveDynamicComponent as d,withDirectives as f,createCommentVNode as g,resolveComponent as y,withCtx as b,mergeProps as v,createVNode as x,TransitionGroup as I,renderList as k}from"vue";var w={name:"ToastMessage",emits:["close"],props:{message:null,template:null,closeIcon:null,infoIcon:null,warnIcon:null,errorIcon:null,successIcon:null},closeTimeout:null,mounted(){this.message.life&&(this.closeTimeout=setTimeout((()=>{this.close()}),this.message.life))},beforeUnmount(){this.clearCloseTimeout()},methods:{close(){this.$emit("close",this.message)},onCloseClick(){this.clearCloseTimeout(),this.close()},clearCloseTimeout(){this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)}},computed:{containerClass(){return["p-toast-message",this.message.styleClass,{"p-toast-message-info":"info"===this.message.severity,"p-toast-message-warn":"warn"===this.message.severity,"p-toast-message-error":"error"===this.message.severity,"p-toast-message-success":"success"===this.message.severity}]},iconClass(){return["p-toast-message-icon",{[this.infoIcon]:"info"===this.message.severity,[this.warnIcon]:"warn"===this.message.severity,[this.errorIcon]:"error"===this.message.severity,[this.successIcon]:"success"===this.message.severity}]}},directives:{ripple:i}};const C={class:"p-toast-message-text"},T={class:"p-toast-summary"},S={class:"p-toast-detail"},E={key:2};w.render=function(e,t,s,n,o,i){const y=a("ripple");return r(),l("div",{class:m(i.containerClass),role:"alert","aria-live":"assertive","aria-atomic":"true"},[c("div",{class:m(["p-toast-message-content",s.message.contentStyleClass])},[s.template?(r(),h(d(s.template),{key:1,message:s.message},null,8,["message"])):(r(),l(p,{key:0},[c("span",{class:m(i.iconClass)},null,2),c("div",C,[c("span",T,u(s.message.summary),1),c("div",S,u(s.message.detail),1)])],64)),!1!==s.message.closable?(r(),l("div",E,[f((r(),l("button",{class:"p-toast-icon-close p-link",onClick:t[0]||(t[0]=(...e)=>i.onCloseClick&&i.onCloseClick(...e)),type:"button"},[c("span",{class:m(["p-toast-icon-close-icon",s.closeIcon])},null,2)])),[[y]])])):g("",!0)],2)],2)};var $=0,A={name:"Toast",inheritAttrs:!1,props:{group:{type:String,default:null},position:{type:String,default:"top-right"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},breakpoints:{type:Object,default:null},closeIcon:{type:String,default:"pi pi-times"},infoIcon:{type:String,default:"pi pi-info-circle"},warnIcon:{type:String,default:"pi pi-exclamation-triangle"},errorIcon:{type:String,default:"pi pi-times"},successIcon:{type:String,default:"pi pi-check"}},data:()=>({messages:[]}),styleElement:null,mounted(){t.on("add",this.onAdd),t.on("remove-group",this.onRemoveGroup),t.on("remove-all-groups",this.onRemoveAllGroups),this.breakpoints&&this.createStyle()},beforeUnmount(){this.destroyStyle(),this.$refs.container&&this.autoZIndex&&s.clear(this.$refs.container),t.off("add",this.onAdd),t.off("remove-group",this.onRemoveGroup),t.off("remove-all-groups",this.onRemoveAllGroups)},methods:{add(e){null==e.id&&(e.id=$++),this.messages=[...this.messages,e]},remove(e){let t=-1;for(let s=0;s<this.messages.length;s++)if(this.messages[s]===e){t=s;break}this.messages.splice(t,1)},onAdd(e){this.group==e.group&&this.add(e)},onRemoveGroup(e){this.group===e&&(this.messages=[])},onRemoveAllGroups(){this.messages=[]},onEnter(){this.$refs.container.setAttribute(this.attributeSelector,""),this.autoZIndex&&s.set("modal",this.$refs.container,this.baseZIndex||this.$primevue.config.zIndex.modal)},onLeave(){this.$refs.container&&this.autoZIndex&&n.isEmpty(this.messages)&&setTimeout((()=>{s.clear(this.$refs.container)}),200)},createStyle(){if(!this.styleElement){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e="";for(let t in this.breakpoints){let s="";for(let e in this.breakpoints[t])s+=e+":"+this.breakpoints[t][e]+"!important;";e+=`\n @media screen and (max-width: ${t}) {\n .p-toast[${this.attributeSelector}] {\n ${s}\n }\n }\n `}this.styleElement.innerHTML=e}},destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{containerClass(){return["p-toast p-component p-toast-"+this.position,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},attributeSelector:()=>o()},components:{ToastMessage:w,Portal:e}};!function(e,t){void 0===t&&(t={});var s=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===s&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-toast {\n position: fixed;\n width: 25rem;\n}\n.p-toast-message-content {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n.p-toast-message-text {\n -webkit-box-flex: 1;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n}\n.p-toast-top-right {\n top: 20px;\n right: 20px;\n}\n.p-toast-top-left {\n top: 20px;\n left: 20px;\n}\n.p-toast-bottom-left {\n bottom: 20px;\n left: 20px;\n}\n.p-toast-bottom-right {\n bottom: 20px;\n right: 20px;\n}\n.p-toast-top-center {\n top: 20px;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n.p-toast-bottom-center {\n bottom: 20px;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n.p-toast-center {\n left: 50%;\n top: 50%;\n min-width: 20vw;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.p-toast-icon-close {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n.p-toast-icon-close.p-link {\n cursor: pointer;\n}\n\n/* Animations */\n.p-toast-message-enter-from {\n opacity: 0;\n -webkit-transform: translateY(50%);\n transform: translateY(50%);\n}\n.p-toast-message-leave-from {\n max-height: 1000px;\n}\n.p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n}\n.p-toast-message-enter-active {\n -webkit-transition: transform 0.3s, opacity 0.3s;\n -webkit-transition: opacity 0.3s, -webkit-transform 0.3s;\n transition: opacity 0.3s, -webkit-transform 0.3s;\n transition: transform 0.3s, opacity 0.3s;\n transition: transform 0.3s, opacity 0.3s, -webkit-transform 0.3s;\n}\n.p-toast-message-leave-active {\n -webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n}\n"),A.render=function(e,t,s,n,o,i){const a=y("ToastMessage"),m=y("Portal");return r(),h(m,null,{default:b((()=>[c("div",v({ref:"container",class:i.containerClass},e.$attrs),[x(I,{name:"p-toast-message",tag:"div",onEnter:i.onEnter,onLeave:i.onLeave},{default:b((()=>[(r(!0),l(p,null,k(o.messages,(n=>(r(),h(a,{key:n.id,message:n,template:e.$slots.message,closeIcon:s.closeIcon,infoIcon:s.infoIcon,warnIcon:s.warnIcon,errorIcon:s.errorIcon,successIcon:s.successIcon,onClose:t[0]||(t[0]=e=>i.remove(e))},null,8,["message","template","closeIcon","infoIcon","warnIcon","errorIcon","successIcon"])))),128))])),_:1},8,["onEnter","onLeave"])],16)])),_:1})};export{A as default};
1
+ import e from"primevue/portal";import t from"primevue/toasteventbus";import{ZIndexUtils as s,ObjectUtils as n,UniqueComponentId as o}from"primevue/utils";import i from"primevue/ripple";import{resolveDirective as a,openBlock as l,createElementBlock as r,normalizeClass as c,createElementVNode as p,Fragment as m,toDisplayString as u,createBlock as d,resolveDynamicComponent as h,withDirectives as f,mergeProps as g,createCommentVNode as y,resolveComponent as v,withCtx as b,createVNode as I,TransitionGroup as x,renderList as C}from"vue";var S={name:"ToastMessage",emits:["close"],props:{message:{type:null,default:null},template:{type:null,default:null},closeIcon:{type:String,default:null},infoIcon:{type:String,default:null},warnIcon:{type:String,default:null},errorIcon:{type:String,default:null},successIcon:{type:String,default:null},closeButtonProps:{type:null,default:null}},closeTimeout:null,mounted(){this.message.life&&(this.closeTimeout=setTimeout((()=>{this.close()}),this.message.life))},beforeUnmount(){this.clearCloseTimeout()},methods:{close(){this.$emit("close",this.message)},onCloseClick(){this.clearCloseTimeout(),this.close()},clearCloseTimeout(){this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)}},computed:{containerClass(){return["p-toast-message",this.message.styleClass,{"p-toast-message-info":"info"===this.message.severity,"p-toast-message-warn":"warn"===this.message.severity,"p-toast-message-error":"error"===this.message.severity,"p-toast-message-success":"success"===this.message.severity}]},iconClass(){return["p-toast-message-icon",{[this.infoIcon]:"info"===this.message.severity,[this.warnIcon]:"warn"===this.message.severity,[this.errorIcon]:"error"===this.message.severity,[this.successIcon]:"success"===this.message.severity}]},closeAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0}},directives:{ripple:i}};const k={class:"p-toast-message-text"},T={class:"p-toast-summary"},w={class:"p-toast-detail"},E={key:2},$=["aria-label"];S.render=function(e,t,s,n,o,i){const v=a("ripple");return l(),r("div",{class:c(i.containerClass),role:"alert","aria-live":"assertive","aria-atomic":"true"},[p("div",{class:c(["p-toast-message-content",s.message.contentStyleClass])},[s.template?(l(),d(h(s.template),{key:1,message:s.message},null,8,["message"])):(l(),r(m,{key:0},[p("span",{class:c(i.iconClass)},null,2),p("div",k,[p("span",T,u(s.message.summary),1),p("div",w,u(s.message.detail),1)])],64)),!1!==s.message.closable?(l(),r("div",E,[f((l(),r("button",g({class:"p-toast-icon-close p-link",type:"button","aria-label":i.closeAriaLabel,onClick:t[0]||(t[0]=(...e)=>i.onCloseClick&&i.onCloseClick(...e)),autofocus:""},s.closeButtonProps),[p("span",{class:c(["p-toast-icon-close-icon",s.closeIcon])},null,2)],16,$)),[[v]])])):y("",!0)],2)],2)};var A=0,B={name:"Toast",inheritAttrs:!1,props:{group:{type:String,default:null},position:{type:String,default:"top-right"},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},breakpoints:{type:Object,default:null},closeIcon:{type:String,default:"pi pi-times"},infoIcon:{type:String,default:"pi pi-info-circle"},warnIcon:{type:String,default:"pi pi-exclamation-triangle"},errorIcon:{type:String,default:"pi pi-times"},successIcon:{type:String,default:"pi pi-check"},closeButtonProps:{type:null,default:null}},data:()=>({messages:[]}),styleElement:null,mounted(){t.on("add",this.onAdd),t.on("remove-group",this.onRemoveGroup),t.on("remove-all-groups",this.onRemoveAllGroups),this.breakpoints&&this.createStyle()},beforeUnmount(){this.destroyStyle(),this.$refs.container&&this.autoZIndex&&s.clear(this.$refs.container),t.off("add",this.onAdd),t.off("remove-group",this.onRemoveGroup),t.off("remove-all-groups",this.onRemoveAllGroups)},methods:{add(e){null==e.id&&(e.id=A++),this.messages=[...this.messages,e]},remove(e){let t=-1;for(let s=0;s<this.messages.length;s++)if(this.messages[s]===e){t=s;break}this.messages.splice(t,1)},onAdd(e){this.group==e.group&&this.add(e)},onRemoveGroup(e){this.group===e&&(this.messages=[])},onRemoveAllGroups(){this.messages=[]},onEnter(){this.$refs.container.setAttribute(this.attributeSelector,""),this.autoZIndex&&s.set("modal",this.$refs.container,this.baseZIndex||this.$primevue.config.zIndex.modal)},onLeave(){this.$refs.container&&this.autoZIndex&&n.isEmpty(this.messages)&&setTimeout((()=>{s.clear(this.$refs.container)}),200)},createStyle(){if(!this.styleElement){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e="";for(let t in this.breakpoints){let s="";for(let e in this.breakpoints[t])s+=e+":"+this.breakpoints[t][e]+"!important;";e+=`\n @media screen and (max-width: ${t}) {\n .p-toast[${this.attributeSelector}] {\n ${s}\n }\n }\n `}this.styleElement.innerHTML=e}},destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}},computed:{containerClass(){return["p-toast p-component p-toast-"+this.position,{"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},attributeSelector:()=>o()},components:{ToastMessage:S,Portal:e}};!function(e,t){void 0===t&&(t={});var s=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===s&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("\n.p-toast {\n position: fixed;\n width: 25rem;\n}\n.p-toast-message-content {\n display: flex;\n align-items: flex-start;\n}\n.p-toast-message-text {\n flex: 1 1 auto;\n}\n.p-toast-top-right {\n top: 20px;\n right: 20px;\n}\n.p-toast-top-left {\n top: 20px;\n left: 20px;\n}\n.p-toast-bottom-left {\n bottom: 20px;\n left: 20px;\n}\n.p-toast-bottom-right {\n bottom: 20px;\n right: 20px;\n}\n.p-toast-top-center {\n top: 20px;\n left: 50%;\n transform: translateX(-50%);\n}\n.p-toast-bottom-center {\n bottom: 20px;\n left: 50%;\n transform: translateX(-50%);\n}\n.p-toast-center {\n left: 50%;\n top: 50%;\n min-width: 20vw;\n transform: translate(-50%, -50%);\n}\n.p-toast-icon-close {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n}\n.p-toast-icon-close.p-link {\n cursor: pointer;\n}\n\n/* Animations */\n.p-toast-message-enter-from {\n opacity: 0;\n -webkit-transform: translateY(50%);\n -ms-transform: translateY(50%);\n transform: translateY(50%);\n}\n.p-toast-message-leave-from {\n max-height: 1000px;\n}\n.p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n}\n.p-toast-message-enter-active {\n -webkit-transition: transform 0.3s, opacity 0.3s;\n transition: transform 0.3s, opacity 0.3s;\n}\n.p-toast-message-leave-active {\n -webkit-transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n}\n"),B.render=function(e,t,s,n,o,i){const a=v("ToastMessage"),c=v("Portal");return l(),d(c,null,{default:b((()=>[p("div",g({ref:"container",class:i.containerClass},e.$attrs),[I(x,{name:"p-toast-message",tag:"div",onEnter:i.onEnter,onLeave:i.onLeave},{default:b((()=>[(l(!0),r(m,null,C(o.messages,(n=>(l(),d(a,{key:n.id,message:n,template:e.$slots.message,closeIcon:s.closeIcon,infoIcon:s.infoIcon,warnIcon:s.warnIcon,errorIcon:s.errorIcon,successIcon:s.successIcon,closeButtonProps:s.closeButtonProps,onClose:t[0]||(t[0]=e=>i.remove(e))},null,8,["message","template","closeIcon","infoIcon","warnIcon","errorIcon","successIcon","closeButtonProps"])))),128))])),_:1},8,["onEnter","onLeave"])],16)])),_:1})};export{B as default};