primevue 3.23.0 → 3.25.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 (366) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +18 -12
  3. package/accordion/Accordion.d.ts +53 -21
  4. package/accordiontab/AccordionTab.d.ts +33 -12
  5. package/api/Api.d.ts +284 -284
  6. package/autocomplete/AutoComplete.d.ts +116 -89
  7. package/autocomplete/AutoComplete.vue +5 -5
  8. package/autocomplete/autocomplete.cjs.js +5 -5
  9. package/autocomplete/autocomplete.cjs.min.js +1 -1
  10. package/autocomplete/autocomplete.esm.js +5 -5
  11. package/autocomplete/autocomplete.esm.min.js +1 -1
  12. package/autocomplete/autocomplete.js +5 -5
  13. package/autocomplete/autocomplete.min.js +1 -1
  14. package/avatar/Avatar.d.ts +38 -25
  15. package/avatar/Avatar.vue +1 -1
  16. package/avatar/avatar.cjs.js +2 -1
  17. package/avatar/avatar.cjs.min.js +1 -1
  18. package/avatar/avatar.esm.js +2 -1
  19. package/avatar/avatar.esm.min.js +1 -1
  20. package/avatar/avatar.js +2 -1
  21. package/avatar/avatar.min.js +1 -1
  22. package/avatargroup/AvatarGroup.d.ts +30 -14
  23. package/badge/Badge.d.ts +34 -20
  24. package/badge/Badge.vue +16 -5
  25. package/badge/badge.cjs.js +15 -5
  26. package/badge/badge.cjs.min.js +1 -1
  27. package/badge/badge.esm.js +15 -5
  28. package/badge/badge.esm.min.js +1 -1
  29. package/badge/badge.js +16 -7
  30. package/badge/badge.min.js +1 -1
  31. package/badgedirective/BadgeDirective.d.ts +60 -1
  32. package/blockui/BlockUI.d.ts +38 -16
  33. package/breadcrumb/Breadcrumb.d.ts +37 -20
  34. package/button/Button.d.ts +74 -17
  35. package/button/Button.vue +51 -8
  36. package/button/button.cjs.js +51 -8
  37. package/button/button.cjs.min.js +1 -1
  38. package/button/button.esm.js +51 -8
  39. package/button/button.esm.min.js +1 -1
  40. package/button/button.js +51 -8
  41. package/button/button.min.js +1 -1
  42. package/calendar/Calendar.d.ts +116 -81
  43. package/calendar/Calendar.vue +71 -17
  44. package/calendar/calendar.cjs.js +58 -20
  45. package/calendar/calendar.cjs.min.js +1 -1
  46. package/calendar/calendar.esm.js +58 -20
  47. package/calendar/calendar.esm.min.js +1 -1
  48. package/calendar/calendar.js +58 -20
  49. package/calendar/calendar.min.js +1 -1
  50. package/card/Card.d.ts +35 -15
  51. package/carousel/Carousel.d.ts +47 -29
  52. package/cascadeselect/CascadeSelect.d.ts +74 -63
  53. package/cascadeselect/CascadeSelect.vue +4 -4
  54. package/cascadeselect/cascadeselect.cjs.js +4 -4
  55. package/cascadeselect/cascadeselect.cjs.min.js +1 -1
  56. package/cascadeselect/cascadeselect.esm.js +4 -4
  57. package/cascadeselect/cascadeselect.esm.min.js +1 -1
  58. package/cascadeselect/cascadeselect.js +4 -4
  59. package/cascadeselect/cascadeselect.min.js +1 -1
  60. package/chart/Chart.d.ts +41 -23
  61. package/checkbox/Checkbox.d.ts +41 -17
  62. package/checkbox/Checkbox.vue +3 -3
  63. package/checkbox/checkbox.cjs.js +3 -3
  64. package/checkbox/checkbox.cjs.min.js +1 -1
  65. package/checkbox/checkbox.esm.js +3 -3
  66. package/checkbox/checkbox.esm.min.js +1 -1
  67. package/checkbox/checkbox.js +3 -3
  68. package/checkbox/checkbox.min.js +1 -1
  69. package/chip/Chip.d.ts +35 -14
  70. package/chips/Chips.d.ts +48 -22
  71. package/chips/Chips.vue +2 -2
  72. package/chips/chips.cjs.js +2 -2
  73. package/chips/chips.cjs.min.js +1 -1
  74. package/chips/chips.esm.js +2 -2
  75. package/chips/chips.esm.min.js +1 -1
  76. package/chips/chips.js +2 -2
  77. package/chips/chips.min.js +1 -1
  78. package/colorpicker/ColorPicker.d.ts +46 -28
  79. package/column/Column.d.ts +90 -65
  80. package/columngroup/ColumnGroup.d.ts +29 -13
  81. package/config/config.cjs.js +20 -1
  82. package/config/config.cjs.min.js +1 -1
  83. package/config/config.esm.js +20 -1
  84. package/config/config.esm.min.js +1 -1
  85. package/config/config.js +20 -1
  86. package/config/config.min.js +1 -1
  87. package/confirmationoptions/ConfirmationOptions.d.ts +16 -6
  88. package/confirmationservice/ConfirmationService.d.ts +11 -0
  89. package/confirmdialog/ConfirmDialog.d.ts +35 -17
  90. package/confirmpopup/ConfirmPopup.d.ts +32 -17
  91. package/confirmpopup/ConfirmPopup.vue +3 -0
  92. package/confirmpopup/confirmpopup.cjs.js +3 -0
  93. package/confirmpopup/confirmpopup.cjs.min.js +1 -1
  94. package/confirmpopup/confirmpopup.esm.js +3 -0
  95. package/confirmpopup/confirmpopup.esm.min.js +1 -1
  96. package/confirmpopup/confirmpopup.js +3 -0
  97. package/confirmpopup/confirmpopup.min.js +1 -1
  98. package/contextmenu/ContextMenu.d.ts +51 -35
  99. package/core/core.js +360 -118
  100. package/core/core.min.js +9 -9
  101. package/datatable/DataTable.d.ts +249 -206
  102. package/datatable/DataTable.vue +72 -111
  103. package/datatable/FooterCell.vue +2 -2
  104. package/datatable/TableBody.vue +9 -18
  105. package/datatable/datatable.cjs.js +71 -60
  106. package/datatable/datatable.cjs.min.js +1 -1
  107. package/datatable/datatable.esm.js +71 -60
  108. package/datatable/datatable.esm.min.js +1 -1
  109. package/datatable/datatable.js +71 -60
  110. package/datatable/datatable.min.js +1 -1
  111. package/dataview/DataView.d.ts +65 -47
  112. package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +33 -13
  113. package/deferredcontent/DeferredContent.d.ts +30 -13
  114. package/dialog/Dialog.d.ts +67 -46
  115. package/dialog/Dialog.vue +24 -7
  116. package/dialog/dialog.cjs.js +14 -7
  117. package/dialog/dialog.cjs.min.js +1 -1
  118. package/dialog/dialog.esm.js +14 -7
  119. package/dialog/dialog.esm.min.js +1 -1
  120. package/dialog/dialog.js +14 -7
  121. package/dialog/dialog.min.js +1 -1
  122. package/dialogservice/DialogService.d.ts +13 -2
  123. package/divider/Divider.d.ts +35 -30
  124. package/dock/Dock.d.ts +49 -36
  125. package/dropdown/Dropdown.d.ts +100 -86
  126. package/dropdown/Dropdown.vue +5 -5
  127. package/dropdown/dropdown.cjs.js +5 -5
  128. package/dropdown/dropdown.cjs.min.js +1 -1
  129. package/dropdown/dropdown.esm.js +5 -5
  130. package/dropdown/dropdown.esm.min.js +1 -1
  131. package/dropdown/dropdown.js +5 -5
  132. package/dropdown/dropdown.min.js +1 -1
  133. package/dynamicdialog/DynamicDialog.d.ts +30 -10
  134. package/dynamicdialog/DynamicDialog.vue +3 -3
  135. package/dynamicdialog/dynamicdialog.cjs.js +4 -4
  136. package/dynamicdialog/dynamicdialog.cjs.min.js +1 -1
  137. package/dynamicdialog/dynamicdialog.esm.js +4 -4
  138. package/dynamicdialog/dynamicdialog.esm.min.js +1 -1
  139. package/dynamicdialog/dynamicdialog.js +4 -4
  140. package/dynamicdialog/dynamicdialog.min.js +1 -1
  141. package/dynamicdialogoptions/DynamicDialogOptions.d.ts +28 -8
  142. package/editor/Editor.d.ts +49 -17
  143. package/fieldset/Fieldset.d.ts +43 -16
  144. package/fileupload/FileUpload.d.ts +101 -47
  145. package/focustrap/FocusTrap.d.ts +42 -3
  146. package/fullcalendar/FullCalendar.d.ts +1 -1
  147. package/galleria/Galleria.d.ts +64 -40
  148. package/image/Image.d.ts +33 -14
  149. package/inlinemessage/InlineMessage.d.ts +31 -17
  150. package/inplace/Inplace.d.ts +41 -18
  151. package/inputmask/InputMask.d.ts +41 -17
  152. package/inputmask/InputMask.vue +59 -49
  153. package/inputmask/inputmask.cjs.js +59 -49
  154. package/inputmask/inputmask.cjs.min.js +1 -1
  155. package/inputmask/inputmask.esm.js +59 -49
  156. package/inputmask/inputmask.esm.min.js +1 -1
  157. package/inputmask/inputmask.js +59 -49
  158. package/inputmask/inputmask.min.js +1 -1
  159. package/inputnumber/InputNumber.d.ts +62 -43
  160. package/inputnumber/InputNumber.vue +2 -2
  161. package/inputnumber/inputnumber.cjs.js +2 -2
  162. package/inputnumber/inputnumber.cjs.min.js +1 -1
  163. package/inputnumber/inputnumber.esm.js +2 -2
  164. package/inputnumber/inputnumber.esm.min.js +1 -1
  165. package/inputnumber/inputnumber.js +2 -2
  166. package/inputnumber/inputnumber.min.js +1 -1
  167. package/inputswitch/InputSwitch.d.ts +38 -17
  168. package/inputswitch/InputSwitch.vue +3 -2
  169. package/inputswitch/inputswitch.cjs.js +3 -3
  170. package/inputswitch/inputswitch.cjs.min.js +1 -1
  171. package/inputswitch/inputswitch.esm.js +3 -3
  172. package/inputswitch/inputswitch.esm.min.js +1 -1
  173. package/inputswitch/inputswitch.js +3 -3
  174. package/inputswitch/inputswitch.min.js +1 -1
  175. package/inputtext/InputText.d.ts +32 -12
  176. package/knob/Knob.d.ts +47 -21
  177. package/listbox/Listbox.d.ts +81 -60
  178. package/megamenu/MegaMenu.d.ts +42 -27
  179. package/megamenu/MegaMenu.vue +17 -0
  180. package/megamenu/megamenu.cjs.js +1 -1
  181. package/megamenu/megamenu.cjs.min.js +1 -1
  182. package/megamenu/megamenu.esm.js +1 -1
  183. package/megamenu/megamenu.esm.min.js +1 -1
  184. package/megamenu/megamenu.js +1 -1
  185. package/megamenu/megamenu.min.js +1 -1
  186. package/menu/Menu.d.ts +51 -30
  187. package/menubar/Menubar.d.ts +36 -19
  188. package/menuitem/MenuItem.d.ts +22 -10
  189. package/message/Message.d.ts +40 -21
  190. package/multiselect/MultiSelect.d.ts +111 -90
  191. package/orderlist/OrderList.d.ts +51 -23
  192. package/organizationchart/OrganizationChart.d.ts +46 -28
  193. package/overlaypanel/OverlayPanel.d.ts +46 -26
  194. package/package.json +2 -2
  195. package/paginator/Paginator.d.ts +49 -24
  196. package/panel/Panel.d.ts +41 -14
  197. package/panelmenu/PanelMenu.d.ts +49 -21
  198. package/password/Password.d.ts +51 -32
  199. package/password/Password.vue +4 -4
  200. package/password/password.cjs.js +4 -4
  201. package/password/password.cjs.min.js +1 -1
  202. package/password/password.esm.js +4 -4
  203. package/password/password.esm.min.js +1 -1
  204. package/password/password.js +4 -4
  205. package/password/password.min.js +1 -1
  206. package/picklist/PickList.d.ts +74 -33
  207. package/portal/Portal.d.ts +1 -0
  208. package/progressbar/ProgressBar.d.ts +34 -17
  209. package/progressspinner/ProgressSpinner.d.ts +32 -13
  210. package/radiobutton/RadioButton.d.ts +35 -16
  211. package/radiobutton/RadioButton.vue +2 -2
  212. package/radiobutton/radiobutton.cjs.js +2 -2
  213. package/radiobutton/radiobutton.cjs.min.js +1 -1
  214. package/radiobutton/radiobutton.esm.js +2 -2
  215. package/radiobutton/radiobutton.esm.min.js +1 -1
  216. package/radiobutton/radiobutton.js +2 -2
  217. package/radiobutton/radiobutton.min.js +1 -1
  218. package/rating/Rating.d.ts +51 -25
  219. package/resources/themes/arya-blue/theme.css +34 -11
  220. package/resources/themes/arya-green/theme.css +34 -11
  221. package/resources/themes/arya-orange/theme.css +34 -11
  222. package/resources/themes/arya-purple/theme.css +34 -11
  223. package/resources/themes/bootstrap4-dark-blue/theme.css +34 -11
  224. package/resources/themes/bootstrap4-dark-purple/theme.css +34 -11
  225. package/resources/themes/bootstrap4-light-blue/theme.css +34 -11
  226. package/resources/themes/bootstrap4-light-purple/theme.css +34 -11
  227. package/resources/themes/fluent-light/theme.css +34 -11
  228. package/resources/themes/lara-dark-blue/theme.css +34 -11
  229. package/resources/themes/lara-dark-indigo/theme.css +34 -11
  230. package/resources/themes/lara-dark-purple/theme.css +34 -11
  231. package/resources/themes/lara-dark-teal/theme.css +34 -11
  232. package/resources/themes/lara-light-blue/theme.css +34 -11
  233. package/resources/themes/lara-light-indigo/theme.css +34 -11
  234. package/resources/themes/lara-light-purple/theme.css +34 -11
  235. package/resources/themes/lara-light-teal/theme.css +34 -11
  236. package/resources/themes/luna-amber/theme.css +34 -11
  237. package/resources/themes/luna-blue/theme.css +34 -11
  238. package/resources/themes/luna-green/theme.css +34 -11
  239. package/resources/themes/luna-pink/theme.css +34 -11
  240. package/resources/themes/md-dark-deeppurple/theme.css +34 -11
  241. package/resources/themes/md-dark-indigo/theme.css +34 -11
  242. package/resources/themes/md-light-deeppurple/theme.css +34 -11
  243. package/resources/themes/md-light-indigo/theme.css +34 -11
  244. package/resources/themes/mdc-dark-deeppurple/theme.css +34 -11
  245. package/resources/themes/mdc-dark-indigo/theme.css +34 -11
  246. package/resources/themes/mdc-light-deeppurple/theme.css +34 -11
  247. package/resources/themes/mdc-light-indigo/theme.css +34 -11
  248. package/resources/themes/mira/theme.css +34 -11
  249. package/resources/themes/nano/theme.css +34 -11
  250. package/resources/themes/nova/theme.css +34 -11
  251. package/resources/themes/nova-accent/theme.css +34 -11
  252. package/resources/themes/nova-alt/theme.css +34 -11
  253. package/resources/themes/nova-vue/theme.css +34 -11
  254. package/resources/themes/rhea/theme.css +34 -11
  255. package/resources/themes/saga-blue/theme.css +34 -11
  256. package/resources/themes/saga-green/theme.css +34 -11
  257. package/resources/themes/saga-orange/theme.css +34 -11
  258. package/resources/themes/saga-purple/theme.css +34 -11
  259. package/resources/themes/soho-dark/theme.css +34 -11
  260. package/resources/themes/soho-light/theme.css +34 -11
  261. package/resources/themes/tailwind-light/theme.css +34 -11
  262. package/resources/themes/vela-blue/theme.css +34 -11
  263. package/resources/themes/vela-green/theme.css +34 -11
  264. package/resources/themes/vela-orange/theme.css +34 -11
  265. package/resources/themes/vela-purple/theme.css +34 -11
  266. package/resources/themes/viva-dark/theme.css +34 -11
  267. package/resources/themes/viva-light/theme.css +34 -11
  268. package/ripple/Ripple.d.ts +24 -1
  269. package/row/Row.d.ts +28 -10
  270. package/scrollpanel/ScrollPanel.d.ts +29 -11
  271. package/scrolltop/ScrollTop.d.ts +35 -18
  272. package/selectbutton/SelectButton.d.ts +47 -27
  273. package/selectbutton/SelectButton.vue +2 -2
  274. package/selectbutton/selectbutton.cjs.js +2 -2
  275. package/selectbutton/selectbutton.cjs.min.js +1 -1
  276. package/selectbutton/selectbutton.esm.js +2 -2
  277. package/selectbutton/selectbutton.esm.min.js +1 -1
  278. package/selectbutton/selectbutton.js +2 -2
  279. package/selectbutton/selectbutton.min.js +1 -1
  280. package/sidebar/Sidebar.d.ts +46 -27
  281. package/skeleton/Skeleton.d.ts +36 -22
  282. package/slider/Slider.d.ts +46 -23
  283. package/speeddial/SpeedDial.d.ts +64 -51
  284. package/splitbutton/SplitButton.d.ts +73 -24
  285. package/splitbutton/SplitButton.vue +41 -1
  286. package/splitbutton/splitbutton.cjs.js +43 -3
  287. package/splitbutton/splitbutton.cjs.min.js +1 -1
  288. package/splitbutton/splitbutton.esm.js +43 -3
  289. package/splitbutton/splitbutton.esm.min.js +1 -1
  290. package/splitbutton/splitbutton.js +43 -3
  291. package/splitbutton/splitbutton.min.js +1 -1
  292. package/splitter/Splitter.d.ts +49 -30
  293. package/splitterpanel/SplitterPanel.d.ts +28 -10
  294. package/steps/Steps.d.ts +36 -15
  295. package/styleclass/StyleClass.d.ts +72 -1
  296. package/tabmenu/TabMenu.d.ts +41 -16
  297. package/tabmenu/TabMenu.vue +1 -1
  298. package/tabmenu/tabmenu.cjs.js +1 -0
  299. package/tabmenu/tabmenu.cjs.min.js +1 -1
  300. package/tabmenu/tabmenu.esm.js +1 -0
  301. package/tabmenu/tabmenu.esm.min.js +1 -1
  302. package/tabmenu/tabmenu.js +1 -0
  303. package/tabmenu/tabmenu.min.js +1 -1
  304. package/tabpanel/TabPanel.d.ts +29 -11
  305. package/tabview/TabView.d.ts +47 -19
  306. package/tag/Tag.d.ts +33 -15
  307. package/terminal/Terminal.d.ts +30 -14
  308. package/terminalservice/TerminalService.d.ts +24 -5
  309. package/textarea/Textarea.d.ts +34 -11
  310. package/tieredmenu/TieredMenu.d.ts +47 -31
  311. package/timeline/Timeline.d.ts +41 -32
  312. package/toast/Toast.d.ts +63 -35
  313. package/toast/Toast.vue +4 -2
  314. package/toast/ToastMessage.vue +4 -4
  315. package/toast/toast.cjs.js +8 -6
  316. package/toast/toast.cjs.min.js +1 -1
  317. package/toast/toast.esm.js +8 -6
  318. package/toast/toast.esm.min.js +1 -1
  319. package/toast/toast.js +8 -6
  320. package/toast/toast.min.js +1 -1
  321. package/toastservice/ToastService.d.ts +16 -3
  322. package/togglebutton/ToggleButton.d.ts +44 -24
  323. package/togglebutton/ToggleButton.vue +2 -2
  324. package/togglebutton/togglebutton.cjs.js +2 -2
  325. package/togglebutton/togglebutton.cjs.min.js +1 -1
  326. package/togglebutton/togglebutton.esm.js +2 -2
  327. package/togglebutton/togglebutton.esm.min.js +1 -1
  328. package/togglebutton/togglebutton.js +2 -2
  329. package/togglebutton/togglebutton.min.js +1 -1
  330. package/toolbar/Toolbar.d.ts +34 -14
  331. package/tooltip/Tooltip.d.ts +99 -1
  332. package/tooltip/tooltip.cjs.js +1 -1
  333. package/tooltip/tooltip.cjs.min.js +1 -1
  334. package/tooltip/tooltip.esm.js +1 -1
  335. package/tooltip/tooltip.esm.min.js +1 -1
  336. package/tooltip/tooltip.js +1 -1
  337. package/tooltip/tooltip.min.js +1 -1
  338. package/tree/Tree.d.ts +58 -36
  339. package/treeselect/TreeSelect.d.ts +65 -57
  340. package/treeselect/TreeSelect.vue +3 -3
  341. package/treeselect/treeselect.cjs.js +3 -3
  342. package/treeselect/treeselect.cjs.min.js +1 -1
  343. package/treeselect/treeselect.esm.js +3 -3
  344. package/treeselect/treeselect.esm.min.js +1 -1
  345. package/treeselect/treeselect.js +3 -3
  346. package/treeselect/treeselect.min.js +1 -1
  347. package/treetable/TreeTable.d.ts +123 -107
  348. package/tristatecheckbox/TriStateCheckbox.d.ts +35 -12
  349. package/ts-helpers.d.ts +2 -2
  350. package/utils/utils.cjs.js +18 -15
  351. package/utils/utils.cjs.min.js +1 -1
  352. package/utils/utils.esm.js +18 -15
  353. package/utils/utils.esm.min.js +1 -1
  354. package/utils/utils.js +18 -15
  355. package/utils/utils.min.js +1 -1
  356. package/vetur-attributes.json +90 -30
  357. package/vetur-tags.json +17 -2
  358. package/virtualscroller/VirtualScroller.d.ts +99 -43
  359. package/virtualscroller/VirtualScroller.vue +248 -72
  360. package/virtualscroller/virtualscroller.cjs.js +234 -72
  361. package/virtualscroller/virtualscroller.cjs.min.js +1 -1
  362. package/virtualscroller/virtualscroller.esm.js +234 -72
  363. package/virtualscroller/virtualscroller.esm.min.js +1 -1
  364. package/virtualscroller/virtualscroller.js +235 -74
  365. package/virtualscroller/virtualscroller.min.js +1 -1
  366. package/web-types.json +1951 -1773
@@ -63,7 +63,7 @@ const _hoisted_2 = {
63
63
  key: 0,
64
64
  class: "p-avatar-text"
65
65
  };
66
- const _hoisted_3 = ["src"];
66
+ const _hoisted_3 = ["src", "alt"];
67
67
 
68
68
  function render(_ctx, _cache, $props, $setup, $data, $options) {
69
69
  return (vue.openBlock(), vue.createElementBlock("div", {
@@ -83,6 +83,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
83
83
  ? (vue.openBlock(), vue.createElementBlock("img", {
84
84
  key: 2,
85
85
  src: $props.image,
86
+ alt: _ctx.ariaLabel,
86
87
  onError: _cache[0] || (_cache[0] = (...args) => ($options.onError && $options.onError(...args)))
87
88
  }, null, 40, _hoisted_3))
88
89
  : vue.createCommentVNode("", true)
@@ -1 +1 @@
1
- "use strict";var e=require("vue"),a={name:"Avatar",emits:["error"],props:{label:{type:String,default:null},icon:{type:String,default:null},image:{type:String,default:null},size:{type:String,default:"normal"},shape:{type:String,default:"square"},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},methods:{onError(){this.$emit("error")}},computed:{containerClass(){return["p-avatar p-component",{"p-avatar-image":null!=this.image,"p-avatar-circle":"circle"===this.shape,"p-avatar-lg":"large"===this.size,"p-avatar-xl":"xlarge"===this.size}]},iconClass(){return["p-avatar-icon",this.icon]}}};const t=["aria-labelledby","aria-label"],r={key:0,class:"p-avatar-text"},n=["src"];!function(e,a){void 0===a&&(a={});var t=a.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===t&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-avatar {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n font-size: 1rem;\n}\n.p-avatar.p-avatar-image {\n background-color: transparent;\n}\n.p-avatar.p-avatar-circle {\n border-radius: 50%;\n}\n.p-avatar-circle img {\n border-radius: 50%;\n}\n.p-avatar .p-avatar-icon {\n font-size: 1rem;\n}\n.p-avatar img {\n width: 100%;\n height: 100%;\n}\n"),a.render=function(a,l,i,o,s,c){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(c.containerClass),"aria-labelledby":a.ariaLabelledby,"aria-label":a.ariaLabel},[e.renderSlot(a.$slots,"default",{},(()=>[i.label?(e.openBlock(),e.createElementBlock("span",r,e.toDisplayString(i.label),1)):i.icon?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(c.iconClass)},null,2)):i.image?(e.openBlock(),e.createElementBlock("img",{key:2,src:i.image,onError:l[0]||(l[0]=(...e)=>c.onError&&c.onError(...e))},null,40,n)):e.createCommentVNode("",!0)]))],10,t)},module.exports=a;
1
+ "use strict";var e=require("vue"),a={name:"Avatar",emits:["error"],props:{label:{type:String,default:null},icon:{type:String,default:null},image:{type:String,default:null},size:{type:String,default:"normal"},shape:{type:String,default:"square"},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},methods:{onError(){this.$emit("error")}},computed:{containerClass(){return["p-avatar p-component",{"p-avatar-image":null!=this.image,"p-avatar-circle":"circle"===this.shape,"p-avatar-lg":"large"===this.size,"p-avatar-xl":"xlarge"===this.size}]},iconClass(){return["p-avatar-icon",this.icon]}}};const t=["aria-labelledby","aria-label"],r={key:0,class:"p-avatar-text"},n=["src","alt"];!function(e,a){void 0===a&&(a={});var t=a.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===t&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-avatar {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n font-size: 1rem;\n}\n.p-avatar.p-avatar-image {\n background-color: transparent;\n}\n.p-avatar.p-avatar-circle {\n border-radius: 50%;\n}\n.p-avatar-circle img {\n border-radius: 50%;\n}\n.p-avatar .p-avatar-icon {\n font-size: 1rem;\n}\n.p-avatar img {\n width: 100%;\n height: 100%;\n}\n"),a.render=function(a,l,i,o,s,c){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(c.containerClass),"aria-labelledby":a.ariaLabelledby,"aria-label":a.ariaLabel},[e.renderSlot(a.$slots,"default",{},(()=>[i.label?(e.openBlock(),e.createElementBlock("span",r,e.toDisplayString(i.label),1)):i.icon?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(c.iconClass)},null,2)):i.image?(e.openBlock(),e.createElementBlock("img",{key:2,src:i.image,alt:a.ariaLabel,onError:l[0]||(l[0]=(...e)=>c.onError&&c.onError(...e))},null,40,n)):e.createCommentVNode("",!0)]))],10,t)},module.exports=a;
@@ -61,7 +61,7 @@ const _hoisted_2 = {
61
61
  key: 0,
62
62
  class: "p-avatar-text"
63
63
  };
64
- const _hoisted_3 = ["src"];
64
+ const _hoisted_3 = ["src", "alt"];
65
65
 
66
66
  function render(_ctx, _cache, $props, $setup, $data, $options) {
67
67
  return (openBlock(), createElementBlock("div", {
@@ -81,6 +81,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
81
81
  ? (openBlock(), createElementBlock("img", {
82
82
  key: 2,
83
83
  src: $props.image,
84
+ alt: _ctx.ariaLabel,
84
85
  onError: _cache[0] || (_cache[0] = (...args) => ($options.onError && $options.onError(...args)))
85
86
  }, null, 40, _hoisted_3))
86
87
  : createCommentVNode("", true)
@@ -1 +1 @@
1
- import{openBlock as a,createElementBlock as e,normalizeClass as t,renderSlot as r,toDisplayString as n,createCommentVNode as l}from"vue";var i={name:"Avatar",emits:["error"],props:{label:{type:String,default:null},icon:{type:String,default:null},image:{type:String,default:null},size:{type:String,default:"normal"},shape:{type:String,default:"square"},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},methods:{onError(){this.$emit("error")}},computed:{containerClass(){return["p-avatar p-component",{"p-avatar-image":null!=this.image,"p-avatar-circle":"circle"===this.shape,"p-avatar-lg":"large"===this.size,"p-avatar-xl":"xlarge"===this.size}]},iconClass(){return["p-avatar-icon",this.icon]}}};const s=["aria-labelledby","aria-label"],o={key:0,class:"p-avatar-text"},p=["src"];!function(a,e){void 0===e&&(e={});var t=e.insertAt;if(a&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===t&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=a:n.appendChild(document.createTextNode(a))}}("\n.p-avatar {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n font-size: 1rem;\n}\n.p-avatar.p-avatar-image {\n background-color: transparent;\n}\n.p-avatar.p-avatar-circle {\n border-radius: 50%;\n}\n.p-avatar-circle img {\n border-radius: 50%;\n}\n.p-avatar .p-avatar-icon {\n font-size: 1rem;\n}\n.p-avatar img {\n width: 100%;\n height: 100%;\n}\n"),i.render=function(i,d,c,u,m,g){return a(),e("div",{class:t(g.containerClass),"aria-labelledby":i.ariaLabelledby,"aria-label":i.ariaLabel},[r(i.$slots,"default",{},(()=>[c.label?(a(),e("span",o,n(c.label),1)):c.icon?(a(),e("span",{key:1,class:t(g.iconClass)},null,2)):c.image?(a(),e("img",{key:2,src:c.image,onError:d[0]||(d[0]=(...a)=>g.onError&&g.onError(...a))},null,40,p)):l("",!0)]))],10,s)};export{i as default};
1
+ import{openBlock as a,createElementBlock as e,normalizeClass as t,renderSlot as r,toDisplayString as n,createCommentVNode as l}from"vue";var i={name:"Avatar",emits:["error"],props:{label:{type:String,default:null},icon:{type:String,default:null},image:{type:String,default:null},size:{type:String,default:"normal"},shape:{type:String,default:"square"},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},methods:{onError(){this.$emit("error")}},computed:{containerClass(){return["p-avatar p-component",{"p-avatar-image":null!=this.image,"p-avatar-circle":"circle"===this.shape,"p-avatar-lg":"large"===this.size,"p-avatar-xl":"xlarge"===this.size}]},iconClass(){return["p-avatar-icon",this.icon]}}};const s=["aria-labelledby","aria-label"],o={key:0,class:"p-avatar-text"},p=["src","alt"];!function(a,e){void 0===e&&(e={});var t=e.insertAt;if(a&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===t&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=a:n.appendChild(document.createTextNode(a))}}("\n.p-avatar {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n font-size: 1rem;\n}\n.p-avatar.p-avatar-image {\n background-color: transparent;\n}\n.p-avatar.p-avatar-circle {\n border-radius: 50%;\n}\n.p-avatar-circle img {\n border-radius: 50%;\n}\n.p-avatar .p-avatar-icon {\n font-size: 1rem;\n}\n.p-avatar img {\n width: 100%;\n height: 100%;\n}\n"),i.render=function(i,d,c,u,m,g){return a(),e("div",{class:t(g.containerClass),"aria-labelledby":i.ariaLabelledby,"aria-label":i.ariaLabel},[r(i.$slots,"default",{},(()=>[c.label?(a(),e("span",o,n(c.label),1)):c.icon?(a(),e("span",{key:1,class:t(g.iconClass)},null,2)):c.image?(a(),e("img",{key:2,src:c.image,alt:i.ariaLabel,onError:d[0]||(d[0]=(...a)=>g.onError&&g.onError(...a))},null,40,p)):l("",!0)]))],10,s)};export{i as default};
package/avatar/avatar.js CHANGED
@@ -63,7 +63,7 @@ this.primevue.avatar = (function (vue) {
63
63
  key: 0,
64
64
  class: "p-avatar-text"
65
65
  };
66
- const _hoisted_3 = ["src"];
66
+ const _hoisted_3 = ["src", "alt"];
67
67
 
68
68
  function render(_ctx, _cache, $props, $setup, $data, $options) {
69
69
  return (vue.openBlock(), vue.createElementBlock("div", {
@@ -83,6 +83,7 @@ this.primevue.avatar = (function (vue) {
83
83
  ? (vue.openBlock(), vue.createElementBlock("img", {
84
84
  key: 2,
85
85
  src: $props.image,
86
+ alt: _ctx.ariaLabel,
86
87
  onError: _cache[0] || (_cache[0] = (...args) => ($options.onError && $options.onError(...args)))
87
88
  }, null, 40, _hoisted_3))
88
89
  : vue.createCommentVNode("", true)
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.avatar=function(e){"use strict";var a={name:"Avatar",emits:["error"],props:{label:{type:String,default:null},icon:{type:String,default:null},image:{type:String,default:null},size:{type:String,default:"normal"},shape:{type:String,default:"square"},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},methods:{onError(){this.$emit("error")}},computed:{containerClass(){return["p-avatar p-component",{"p-avatar-image":null!=this.image,"p-avatar-circle":"circle"===this.shape,"p-avatar-lg":"large"===this.size,"p-avatar-xl":"xlarge"===this.size}]},iconClass(){return["p-avatar-icon",this.icon]}}};const t=["aria-labelledby","aria-label"],r={key:0,class:"p-avatar-text"},n=["src"];return function(e,a){void 0===a&&(a={});var t=a.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===t&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-avatar {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n font-size: 1rem;\n}\n.p-avatar.p-avatar-image {\n background-color: transparent;\n}\n.p-avatar.p-avatar-circle {\n border-radius: 50%;\n}\n.p-avatar-circle img {\n border-radius: 50%;\n}\n.p-avatar .p-avatar-icon {\n font-size: 1rem;\n}\n.p-avatar img {\n width: 100%;\n height: 100%;\n}\n"),a.render=function(a,l,i,o,s,c){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(c.containerClass),"aria-labelledby":a.ariaLabelledby,"aria-label":a.ariaLabel},[e.renderSlot(a.$slots,"default",{},(()=>[i.label?(e.openBlock(),e.createElementBlock("span",r,e.toDisplayString(i.label),1)):i.icon?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(c.iconClass)},null,2)):i.image?(e.openBlock(),e.createElementBlock("img",{key:2,src:i.image,onError:l[0]||(l[0]=(...e)=>c.onError&&c.onError(...e))},null,40,n)):e.createCommentVNode("",!0)]))],10,t)},a}(Vue);
1
+ this.primevue=this.primevue||{},this.primevue.avatar=function(e){"use strict";var a={name:"Avatar",emits:["error"],props:{label:{type:String,default:null},icon:{type:String,default:null},image:{type:String,default:null},size:{type:String,default:"normal"},shape:{type:String,default:"square"},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},methods:{onError(){this.$emit("error")}},computed:{containerClass(){return["p-avatar p-component",{"p-avatar-image":null!=this.image,"p-avatar-circle":"circle"===this.shape,"p-avatar-lg":"large"===this.size,"p-avatar-xl":"xlarge"===this.size}]},iconClass(){return["p-avatar-icon",this.icon]}}};const t=["aria-labelledby","aria-label"],r={key:0,class:"p-avatar-text"},n=["src","alt"];return function(e,a){void 0===a&&(a={});var t=a.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===t&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-avatar {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n font-size: 1rem;\n}\n.p-avatar.p-avatar-image {\n background-color: transparent;\n}\n.p-avatar.p-avatar-circle {\n border-radius: 50%;\n}\n.p-avatar-circle img {\n border-radius: 50%;\n}\n.p-avatar .p-avatar-icon {\n font-size: 1rem;\n}\n.p-avatar img {\n width: 100%;\n height: 100%;\n}\n"),a.render=function(a,l,i,o,s,c){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(c.containerClass),"aria-labelledby":a.ariaLabelledby,"aria-label":a.ariaLabel},[e.renderSlot(a.$slots,"default",{},(()=>[i.label?(e.openBlock(),e.createElementBlock("span",r,e.toDisplayString(i.label),1)):i.icon?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(c.iconClass)},null,2)):i.image?(e.openBlock(),e.createElementBlock("img",{key:2,src:i.image,alt:a.ariaLabel,onError:l[0]||(l[0]=(...e)=>c.onError&&c.onError(...e))},null,40,n)):e.createCommentVNode("",!0)]))],10,t)},a}(Vue);
@@ -1,11 +1,40 @@
1
+ /**
2
+ *
3
+ * AvatarGroup is a helper component for Avatar.
4
+ *
5
+ * [Live Demo](https://www.primevue.org/accordion/)
6
+ *
7
+ * @module avatargroup
8
+ *
9
+ */
1
10
  import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
2
11
 
12
+ /**
13
+ * Defines valid properties in AvatarGroup component.
14
+ */
3
15
  export interface AvatarGroupProps {}
4
16
 
17
+ /**
18
+ * Defines valid slots in AvatarGroup component.
19
+ */
5
20
  export interface AvatarGroupSlots {}
6
21
 
7
- export declare type AvatarGroupEmits = {};
22
+ /**
23
+ * Defines valid emits in AvatarGroup component.
24
+ */
25
+ export interface AvatarGroupEmits {}
8
26
 
27
+ /**
28
+ * **PrimeVue - AvatarGroup**
29
+ *
30
+ * _A set of Avatars can be displayed together using the AvatarGroup component._
31
+ *
32
+ * [Live Demo](https://www.primevue.org/avatargroup/)
33
+ * --- ---
34
+ * ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
35
+ *
36
+ * @group Component
37
+ */
9
38
  declare class AvatarGroup extends ClassComponent<AvatarGroupProps, AvatarGroupSlots, AvatarGroupEmits> {}
10
39
 
11
40
  declare module '@vue/runtime-core' {
@@ -14,17 +43,4 @@ declare module '@vue/runtime-core' {
14
43
  }
15
44
  }
16
45
 
17
- /**
18
- *
19
- * A set of Avatars can be displayed together using the AvatarGroup component.
20
- *
21
- * Helper Components:
22
- *
23
- * - Avatar
24
- *
25
- * Demos:
26
- *
27
- * - [AvatarGroup](https://www.primefaces.org/primevue/avatar)
28
- *
29
- */
30
46
  export default AvatarGroup;
package/badge/Badge.d.ts CHANGED
@@ -1,36 +1,59 @@
1
+ /**
2
+ *
3
+ * Badge represents people using icons, labels and images.
4
+ *
5
+ * [Live Demo](https://www.primevue.org/badge)
6
+ *
7
+ * @module badge
8
+ *
9
+ */
1
10
  import { VNode } from 'vue';
2
11
  import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
3
12
 
4
- type BadgeSeverityType = 'info' | 'success' | 'warning' | 'danger' | undefined;
5
-
6
- type BadgeSizeType = 'large' | 'xlarge' | undefined;
7
-
13
+ /**
14
+ * Defines valid properties in Badge component.
15
+ */
8
16
  export interface BadgeProps {
9
17
  /**
10
18
  * Value to display inside the badge.
11
19
  */
12
- value?: any;
20
+ value?: string | number;
13
21
  /**
14
22
  * Severity type of the badge.
15
- * @see BadgeSeverityType
16
23
  */
17
- severity?: BadgeSeverityType;
24
+ severity?: 'info' | 'success' | 'warning' | 'danger' | null | undefined;
18
25
  /**
19
26
  * Size of the badge, valid options are 'large' and 'xlarge'.
20
- * @see BadgeSizeType
21
27
  */
22
- size?: BadgeSizeType;
28
+ size?: 'large' | 'xlarge' | null | undefined;
23
29
  }
24
30
 
31
+ /**
32
+ * Defines valid slots in Badge component.
33
+ */
25
34
  export interface BadgeSlots {
26
35
  /**
27
36
  * Content can easily be customized with the default slot instead of using the built-in display.
28
37
  */
29
- default: () => VNode[];
38
+ default(): VNode[];
30
39
  }
31
40
 
32
- export declare type BadgeEmits = {};
41
+ /**
42
+ * Defines valid emits in Badge component.
43
+ */
44
+ export interface BadgeEmits {}
33
45
 
46
+ /**
47
+ * **PrimeVue - Badge**
48
+ *
49
+ * _Badge represents people using icons, labels and images._
50
+ *
51
+ * [Live Demo](https://www.primevue.org/badge/)
52
+ * --- ---
53
+ * ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
54
+ *
55
+ * @group Component
56
+ */
34
57
  declare class Badge extends ClassComponent<BadgeProps, BadgeSlots, BadgeEmits> {}
35
58
 
36
59
  declare module '@vue/runtime-core' {
@@ -39,13 +62,4 @@ declare module '@vue/runtime-core' {
39
62
  }
40
63
  }
41
64
 
42
- /**
43
- *
44
- * Badge is a small status indicator for another element.
45
- *
46
- * Demos:
47
- *
48
- * - [Badge](https://www.primefaces.org/primevue/badge)
49
- *
50
- */
51
65
  export default Badge;
package/badge/Badge.vue CHANGED
@@ -5,12 +5,23 @@
5
5
  </template>
6
6
 
7
7
  <script>
8
+ import { ObjectUtils } from 'primevue/utils';
9
+
8
10
  export default {
9
11
  name: 'Badge',
10
12
  props: {
11
- value: null,
12
- severity: null,
13
- size: null
13
+ value: {
14
+ type: [String, Number],
15
+ default: null
16
+ },
17
+ severity: {
18
+ type: String,
19
+ default: null
20
+ },
21
+ size: {
22
+ type: String,
23
+ default: null
24
+ }
14
25
  },
15
26
  computed: {
16
27
  containerClass() {
@@ -20,8 +31,8 @@ export default {
20
31
  return [
21
32
  'p-badge p-component',
22
33
  {
23
- 'p-badge-no-gutter': this.value && String(this.value).length === 1,
24
- 'p-badge-dot': !this.value && !this.$slots.default,
34
+ 'p-badge-no-gutter': ObjectUtils.isNotEmpty(this.value) && String(this.value).length === 1,
35
+ 'p-badge-dot': ObjectUtils.isEmpty(this.value) && !this.$slots.default,
25
36
  'p-badge-lg': this.size === 'large',
26
37
  'p-badge-xl': this.size === 'xlarge',
27
38
  'p-badge-info': this.severity === 'info',
@@ -1,13 +1,23 @@
1
1
  'use strict';
2
2
 
3
+ var utils = require('primevue/utils');
3
4
  var vue = require('vue');
4
5
 
5
6
  var script = {
6
7
  name: 'Badge',
7
8
  props: {
8
- value: null,
9
- severity: null,
10
- size: null
9
+ value: {
10
+ type: [String, Number],
11
+ default: null
12
+ },
13
+ severity: {
14
+ type: String,
15
+ default: null
16
+ },
17
+ size: {
18
+ type: String,
19
+ default: null
20
+ }
11
21
  },
12
22
  computed: {
13
23
  containerClass() {
@@ -17,8 +27,8 @@ var script = {
17
27
  return [
18
28
  'p-badge p-component',
19
29
  {
20
- 'p-badge-no-gutter': this.value && String(this.value).length === 1,
21
- 'p-badge-dot': !this.value && !this.$slots.default,
30
+ 'p-badge-no-gutter': utils.ObjectUtils.isNotEmpty(this.value) && String(this.value).length === 1,
31
+ 'p-badge-dot': utils.ObjectUtils.isEmpty(this.value) && !this.$slots.default,
22
32
  'p-badge-lg': this.size === 'large',
23
33
  'p-badge-xl': this.size === 'xlarge',
24
34
  'p-badge-info': this.severity === 'info',
@@ -1 +1 @@
1
- "use strict";var e=require("vue"),s={name:"Badge",props:{value:null,severity:null,size:null},computed:{containerClass(){return this.$slots.default?"p-overlay-badge":this.badgeClass},badgeClass(){return["p-badge p-component",{"p-badge-no-gutter":this.value&&1===String(this.value).length,"p-badge-dot":!this.value&&!this.$slots.default,"p-badge-lg":"large"===this.size,"p-badge-xl":"xlarge"===this.size,"p-badge-info":"info"===this.severity,"p-badge-success":"success"===this.severity,"p-badge-warning":"warning"===this.severity,"p-badge-danger":"danger"===this.severity}]}}};s.render=function(s,t,a,l,r,i){return e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(i.badgeClass)},[e.renderSlot(s.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(a.value),1)]))],2)},module.exports=s;
1
+ "use strict";var e=require("primevue/utils"),t=require("vue"),s={name:"Badge",props:{value:{type:[String,Number],default:null},severity:{type:String,default:null},size:{type:String,default:null}},computed:{containerClass(){return this.$slots.default?"p-overlay-badge":this.badgeClass},badgeClass(){return["p-badge p-component",{"p-badge-no-gutter":e.ObjectUtils.isNotEmpty(this.value)&&1===String(this.value).length,"p-badge-dot":e.ObjectUtils.isEmpty(this.value)&&!this.$slots.default,"p-badge-lg":"large"===this.size,"p-badge-xl":"xlarge"===this.size,"p-badge-info":"info"===this.severity,"p-badge-success":"success"===this.severity,"p-badge-warning":"warning"===this.severity,"p-badge-danger":"danger"===this.severity}]}}};s.render=function(e,s,a,i,l,r){return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(r.badgeClass)},[t.renderSlot(e.$slots,"default",{},(()=>[t.createTextVNode(t.toDisplayString(a.value),1)]))],2)},module.exports=s;
@@ -1,11 +1,21 @@
1
+ import { ObjectUtils } from 'primevue/utils';
1
2
  import { openBlock, createElementBlock, normalizeClass, renderSlot, createTextVNode, toDisplayString } from 'vue';
2
3
 
3
4
  var script = {
4
5
  name: 'Badge',
5
6
  props: {
6
- value: null,
7
- severity: null,
8
- size: null
7
+ value: {
8
+ type: [String, Number],
9
+ default: null
10
+ },
11
+ severity: {
12
+ type: String,
13
+ default: null
14
+ },
15
+ size: {
16
+ type: String,
17
+ default: null
18
+ }
9
19
  },
10
20
  computed: {
11
21
  containerClass() {
@@ -15,8 +25,8 @@ var script = {
15
25
  return [
16
26
  'p-badge p-component',
17
27
  {
18
- 'p-badge-no-gutter': this.value && String(this.value).length === 1,
19
- 'p-badge-dot': !this.value && !this.$slots.default,
28
+ 'p-badge-no-gutter': ObjectUtils.isNotEmpty(this.value) && String(this.value).length === 1,
29
+ 'p-badge-dot': ObjectUtils.isEmpty(this.value) && !this.$slots.default,
20
30
  'p-badge-lg': this.size === 'large',
21
31
  'p-badge-xl': this.size === 'xlarge',
22
32
  'p-badge-info': this.severity === 'info',
@@ -1 +1 @@
1
- import{openBlock as e,createElementBlock as s,normalizeClass as a,renderSlot as t,createTextVNode as l,toDisplayString as i}from"vue";var r={name:"Badge",props:{value:null,severity:null,size:null},computed:{containerClass(){return this.$slots.default?"p-overlay-badge":this.badgeClass},badgeClass(){return["p-badge p-component",{"p-badge-no-gutter":this.value&&1===String(this.value).length,"p-badge-dot":!this.value&&!this.$slots.default,"p-badge-lg":"large"===this.size,"p-badge-xl":"xlarge"===this.size,"p-badge-info":"info"===this.severity,"p-badge-success":"success"===this.severity,"p-badge-warning":"warning"===this.severity,"p-badge-danger":"danger"===this.severity}]}}};r.render=function(r,n,g,d,u,p){return e(),s("span",{class:a(p.badgeClass)},[t(r.$slots,"default",{},(()=>[l(i(g.value),1)]))],2)};export{r as default};
1
+ import{ObjectUtils as e}from"primevue/utils";import{openBlock as t,createElementBlock as s,normalizeClass as a,renderSlot as i,createTextVNode as r,toDisplayString as l}from"vue";var n={name:"Badge",props:{value:{type:[String,Number],default:null},severity:{type:String,default:null},size:{type:String,default:null}},computed:{containerClass(){return this.$slots.default?"p-overlay-badge":this.badgeClass},badgeClass(){return["p-badge p-component",{"p-badge-no-gutter":e.isNotEmpty(this.value)&&1===String(this.value).length,"p-badge-dot":e.isEmpty(this.value)&&!this.$slots.default,"p-badge-lg":"large"===this.size,"p-badge-xl":"xlarge"===this.size,"p-badge-info":"info"===this.severity,"p-badge-success":"success"===this.severity,"p-badge-warning":"warning"===this.severity,"p-badge-danger":"danger"===this.severity}]}}};n.render=function(e,n,g,u,d,p){return t(),s("span",{class:a(p.badgeClass)},[i(e.$slots,"default",{},(()=>[r(l(g.value),1)]))],2)};export{n as default};
package/badge/badge.js CHANGED
@@ -1,13 +1,22 @@
1
1
  this.primevue = this.primevue || {};
2
- this.primevue.badge = (function (vue) {
2
+ this.primevue.badge = (function (utils, vue) {
3
3
  'use strict';
4
4
 
5
5
  var script = {
6
6
  name: 'Badge',
7
7
  props: {
8
- value: null,
9
- severity: null,
10
- size: null
8
+ value: {
9
+ type: [String, Number],
10
+ default: null
11
+ },
12
+ severity: {
13
+ type: String,
14
+ default: null
15
+ },
16
+ size: {
17
+ type: String,
18
+ default: null
19
+ }
11
20
  },
12
21
  computed: {
13
22
  containerClass() {
@@ -17,8 +26,8 @@ this.primevue.badge = (function (vue) {
17
26
  return [
18
27
  'p-badge p-component',
19
28
  {
20
- 'p-badge-no-gutter': this.value && String(this.value).length === 1,
21
- 'p-badge-dot': !this.value && !this.$slots.default,
29
+ 'p-badge-no-gutter': utils.ObjectUtils.isNotEmpty(this.value) && String(this.value).length === 1,
30
+ 'p-badge-dot': utils.ObjectUtils.isEmpty(this.value) && !this.$slots.default,
22
31
  'p-badge-lg': this.size === 'large',
23
32
  'p-badge-xl': this.size === 'xlarge',
24
33
  'p-badge-info': this.severity === 'info',
@@ -45,4 +54,4 @@ this.primevue.badge = (function (vue) {
45
54
 
46
55
  return script;
47
56
 
48
- })(Vue);
57
+ })(primevue.utils, Vue);
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.badge=function(e){"use strict";var s={name:"Badge",props:{value:null,severity:null,size:null},computed:{containerClass(){return this.$slots.default?"p-overlay-badge":this.badgeClass},badgeClass(){return["p-badge p-component",{"p-badge-no-gutter":this.value&&1===String(this.value).length,"p-badge-dot":!this.value&&!this.$slots.default,"p-badge-lg":"large"===this.size,"p-badge-xl":"xlarge"===this.size,"p-badge-info":"info"===this.severity,"p-badge-success":"success"===this.severity,"p-badge-warning":"warning"===this.severity,"p-badge-danger":"danger"===this.severity}]}}};return s.render=function(s,t,a,i,r,l){return e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(l.badgeClass)},[e.renderSlot(s.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(a.value),1)]))],2)},s}(Vue);
1
+ this.primevue=this.primevue||{},this.primevue.badge=function(e,t){"use strict";var s={name:"Badge",props:{value:{type:[String,Number],default:null},severity:{type:String,default:null},size:{type:String,default:null}},computed:{containerClass(){return this.$slots.default?"p-overlay-badge":this.badgeClass},badgeClass(){return["p-badge p-component",{"p-badge-no-gutter":e.ObjectUtils.isNotEmpty(this.value)&&1===String(this.value).length,"p-badge-dot":e.ObjectUtils.isEmpty(this.value)&&!this.$slots.default,"p-badge-lg":"large"===this.size,"p-badge-xl":"xlarge"===this.size,"p-badge-info":"info"===this.severity,"p-badge-success":"success"===this.severity,"p-badge-warning":"warning"===this.severity,"p-badge-danger":"danger"===this.severity}]}}};return s.render=function(e,s,a,i,r,l){return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(l.badgeClass)},[t.renderSlot(e.$slots,"default",{},(()=>[t.createTextVNode(t.toDisplayString(a.value),1)]))],2)},s}(primevue.utils,Vue);
@@ -1,5 +1,64 @@
1
- import { ObjectDirective } from 'vue';
1
+ /**
2
+ *
3
+ * Badge directive is a small status indicator for another element.
4
+ *
5
+ * [Live Demo](https://primevue.org/badge)
6
+ *
7
+ * @module badgedirective
8
+ */
9
+ import { DirectiveBinding, ObjectDirective } from 'vue';
2
10
 
11
+ /**
12
+ * Defines modifiers of Badge directive.
13
+ */
14
+ export interface BadgeDirectiveModifiers {
15
+ /**
16
+ * Info severity for Badge directive.
17
+ * @defaultValue true
18
+ */
19
+ info?: boolean | undefined;
20
+ /**
21
+ * Success severity for Badge directive.
22
+ * @defaultValue false
23
+ */
24
+ success?: boolean | undefined;
25
+ /**
26
+ * Warning severity for Badge directive.
27
+ * @defaultValue false
28
+ */
29
+ warning?: boolean | undefined;
30
+ /**
31
+ * Danger severity for Badge directive.
32
+ * @defaultValue false
33
+ */
34
+ danger?: boolean | undefined;
35
+ }
36
+
37
+ /**
38
+ * Binding of Badge directive.
39
+ */
40
+ export interface BadgeDirectiveBinding extends Omit<DirectiveBinding, 'modifiers' | 'value'> {
41
+ /**
42
+ * Value of the Badge.
43
+ */
44
+ value?: string | undefined;
45
+ /**
46
+ * Modifiers of the Badge.
47
+ * @type {BadgeDirectiveModifiers}
48
+ */
49
+ modifiers?: BadgeDirectiveModifiers | undefined;
50
+ }
51
+
52
+ /**
53
+ * **PrimeVue - Badge**
54
+ *
55
+ * _Badge directive provides advisory information for a component._
56
+ *
57
+ * [Live Demo](https://www.primevue.org/badge/)
58
+ * --- ---
59
+ * ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
60
+ *
61
+ */
3
62
  declare const BadgeDirective: ObjectDirective;
4
63
 
5
64
  export default BadgeDirective;
@@ -1,45 +1,76 @@
1
+ /**
2
+ *
3
+ * BlockUI represents people using icons, labels and images.
4
+ *
5
+ * [Live Demo](https://www.primevue.org/blockui)
6
+ *
7
+ * @module blockui
8
+ *
9
+ */
1
10
  import { VNode } from 'vue';
2
11
  import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
3
12
 
13
+ /**
14
+ * Defines valid properties in BlockUI component
15
+ */
4
16
  export interface BlockUIProps {
5
17
  /**
6
18
  * Controls the blocked state.
19
+ * @defaultValue false
7
20
  */
8
21
  blocked?: boolean | undefined;
9
22
  /**
10
23
  * When enabled, the whole document gets blocked.
24
+ * @defaultValue false
11
25
  */
12
26
  fullScreen?: boolean | undefined;
13
27
  /**
14
28
  * Base zIndex value to use in layering.
15
- * Default value is 0.
29
+ * @defaultValue 0
16
30
  */
17
31
  baseZIndex?: number | undefined;
18
32
  /**
19
33
  * Whether to automatically manage layering.
20
- * Default value is true.
34
+ * @defaultValue true
21
35
  */
22
36
  autoZIndex?: boolean | undefined;
23
37
  }
24
38
 
39
+ /**
40
+ * Defines valid slots in BlockUI component
41
+ */
25
42
  export interface BlockUISlots {
26
43
  /**
27
44
  * Custom content's slot.
28
45
  */
29
- default: () => VNode[];
46
+ default(): VNode[];
30
47
  }
31
48
 
32
- export declare type BlockUIEmits = {
49
+ /**
50
+ * Defines valid emits in BlockUI component
51
+ */
52
+ export interface BlockUIEmits {
33
53
  /**
34
54
  * Fired when the element gets blocked.
35
55
  */
36
- block: () => void;
56
+ block(): void;
37
57
  /**
38
58
  * Fired when the element gets unblocked.
39
59
  */
40
- unblock: () => void;
41
- };
60
+ unblock(): void;
61
+ }
42
62
 
63
+ /**
64
+ * **PrimeVue - BlockUI**
65
+ *
66
+ * _BlockUI represents people using icons, labels and images._
67
+ *
68
+ * [Live Demo](https://www.primevue.org/blockui/)
69
+ * --- ---
70
+ * ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
71
+ *
72
+ * @group Component
73
+ */
43
74
  declare class BlockUI extends ClassComponent<BlockUIProps, BlockUISlots, BlockUIEmits> {}
44
75
 
45
76
  declare module '@vue/runtime-core' {
@@ -48,13 +79,4 @@ declare module '@vue/runtime-core' {
48
79
  }
49
80
  }
50
81
 
51
- /**
52
- *
53
- * BlockUI can either block other components or the whole page.
54
- *
55
- * Demos:
56
- *
57
- * - [BlockUI](https://www.primefaces.org/primevue/blockui)
58
- *
59
- */
60
82
  export default BlockUI;