primevue 3.34.0 → 3.35.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 (664) hide show
  1. package/README.md +1 -0
  2. package/accordion/BaseAccordion.vue +17 -15
  3. package/accordion/accordion.cjs.js +1 -1
  4. package/accordion/accordion.cjs.min.js +1 -1
  5. package/accordion/accordion.esm.js +1 -1
  6. package/accordion/accordion.esm.min.js +1 -1
  7. package/accordion/accordion.js +1 -1
  8. package/accordion/accordion.min.js +1 -1
  9. package/autocomplete/AutoComplete.vue +1 -1
  10. package/autocomplete/BaseAutoComplete.vue +81 -79
  11. package/autocomplete/autocomplete.cjs.js +4 -2
  12. package/autocomplete/autocomplete.cjs.min.js +1 -1
  13. package/autocomplete/autocomplete.esm.js +4 -2
  14. package/autocomplete/autocomplete.esm.min.js +1 -1
  15. package/autocomplete/autocomplete.js +4 -2
  16. package/autocomplete/autocomplete.min.js +1 -1
  17. package/avatar/BaseAvatar.vue +30 -28
  18. package/avatar/avatar.cjs.js +1 -1
  19. package/avatar/avatar.cjs.min.js +1 -1
  20. package/avatar/avatar.esm.js +1 -1
  21. package/avatar/avatar.esm.min.js +1 -1
  22. package/avatar/avatar.js +1 -1
  23. package/avatar/avatar.min.js +1 -1
  24. package/avatargroup/BaseAvatarGroup.vue +9 -7
  25. package/avatargroup/avatargroup.cjs.js +1 -1
  26. package/avatargroup/avatargroup.cjs.min.js +1 -1
  27. package/avatargroup/avatargroup.esm.js +1 -1
  28. package/avatargroup/avatargroup.esm.min.js +1 -1
  29. package/avatargroup/avatargroup.js +1 -1
  30. package/avatargroup/avatargroup.min.js +1 -1
  31. package/badge/BaseBadge.vue +33 -31
  32. package/badge/badge.cjs.js +1 -1
  33. package/badge/badge.cjs.min.js +1 -1
  34. package/badge/badge.esm.js +1 -1
  35. package/badge/badge.esm.min.js +1 -1
  36. package/badge/badge.js +1 -1
  37. package/badge/badge.min.js +1 -1
  38. package/badgedirective/badgedirective.cjs.js +1 -1
  39. package/badgedirective/badgedirective.cjs.min.js +1 -1
  40. package/badgedirective/badgedirective.esm.js +1 -1
  41. package/badgedirective/badgedirective.esm.min.js +1 -1
  42. package/badgedirective/badgedirective.js +1 -1
  43. package/badgedirective/badgedirective.min.js +1 -1
  44. package/base/base.cjs.js +1 -1
  45. package/base/base.cjs.min.js +1 -1
  46. package/base/base.esm.js +1 -1
  47. package/base/base.esm.min.js +1 -1
  48. package/base/base.js +1 -1
  49. package/base/base.min.js +1 -1
  50. package/basecomponent/BaseComponent.vue +11 -8
  51. package/basecomponent/basecomponent.cjs.js +18 -13
  52. package/basecomponent/basecomponent.cjs.min.js +1 -1
  53. package/basecomponent/basecomponent.esm.js +18 -13
  54. package/basecomponent/basecomponent.esm.min.js +1 -1
  55. package/basecomponent/basecomponent.js +18 -13
  56. package/basecomponent/basecomponent.min.js +1 -1
  57. package/basedirective/basedirective.cjs.js +7 -6
  58. package/basedirective/basedirective.cjs.min.js +1 -1
  59. package/basedirective/basedirective.esm.js +7 -6
  60. package/basedirective/basedirective.esm.min.js +1 -1
  61. package/basedirective/basedirective.js +7 -6
  62. package/basedirective/basedirective.min.js +1 -1
  63. package/blockui/BaseBlockUI.vue +12 -10
  64. package/blockui/BlockUI.vue +2 -0
  65. package/blockui/blockui.cjs.js +3 -1
  66. package/blockui/blockui.cjs.min.js +1 -1
  67. package/blockui/blockui.esm.js +3 -1
  68. package/blockui/blockui.esm.min.js +1 -1
  69. package/blockui/blockui.js +3 -1
  70. package/blockui/blockui.min.js +1 -1
  71. package/breadcrumb/BaseBreadcrumb.vue +32 -30
  72. package/breadcrumb/Breadcrumb.vue +1 -1
  73. package/breadcrumb/breadcrumb.cjs.js +2 -2
  74. package/breadcrumb/breadcrumb.cjs.min.js +1 -1
  75. package/breadcrumb/breadcrumb.esm.js +2 -2
  76. package/breadcrumb/breadcrumb.esm.min.js +1 -1
  77. package/breadcrumb/breadcrumb.js +2 -2
  78. package/breadcrumb/breadcrumb.min.js +1 -1
  79. package/calendar/BaseCalendar.vue +149 -146
  80. package/calendar/Calendar.d.ts +11 -5
  81. package/calendar/Calendar.vue +85 -47
  82. package/calendar/calendar.cjs.js +162 -118
  83. package/calendar/calendar.cjs.min.js +1 -1
  84. package/calendar/calendar.esm.js +162 -118
  85. package/calendar/calendar.esm.min.js +1 -1
  86. package/calendar/calendar.js +162 -118
  87. package/calendar/calendar.min.js +1 -1
  88. package/carousel/BaseCarousel.vue +70 -68
  89. package/carousel/carousel.cjs.js +1 -1
  90. package/carousel/carousel.cjs.min.js +1 -1
  91. package/carousel/carousel.esm.js +1 -1
  92. package/carousel/carousel.esm.min.js +1 -1
  93. package/carousel/carousel.js +1 -1
  94. package/carousel/carousel.min.js +1 -1
  95. package/cascadeselect/BaseCascadeSelect.vue +81 -79
  96. package/cascadeselect/cascadeselect.cjs.js +1 -1
  97. package/cascadeselect/cascadeselect.cjs.min.js +1 -1
  98. package/cascadeselect/cascadeselect.esm.js +1 -1
  99. package/cascadeselect/cascadeselect.esm.min.js +1 -1
  100. package/cascadeselect/cascadeselect.js +1 -1
  101. package/cascadeselect/cascadeselect.min.js +1 -1
  102. package/chart/BaseChart.vue +4 -2
  103. package/chart/chart.cjs.js +1 -1
  104. package/chart/chart.cjs.min.js +1 -1
  105. package/chart/chart.esm.js +1 -1
  106. package/chart/chart.esm.min.js +1 -1
  107. package/chart/chart.js +1 -1
  108. package/chart/chart.min.js +1 -1
  109. package/chip/BaseChip.vue +22 -20
  110. package/chip/chip.cjs.js +1 -1
  111. package/chip/chip.cjs.min.js +1 -1
  112. package/chip/chip.esm.js +1 -1
  113. package/chip/chip.esm.min.js +1 -1
  114. package/chip/chip.js +1 -1
  115. package/chip/chip.min.js +1 -1
  116. package/chips/BaseChips.vue +46 -44
  117. package/chips/chips.cjs.js +1 -1
  118. package/chips/chips.cjs.min.js +1 -1
  119. package/chips/chips.esm.js +1 -1
  120. package/chips/chips.esm.min.js +1 -1
  121. package/chips/chips.js +1 -1
  122. package/chips/chips.min.js +1 -1
  123. package/colorpicker/BaseColorPicker.vue +8 -6
  124. package/colorpicker/colorpicker.cjs.js +1 -1
  125. package/colorpicker/colorpicker.cjs.min.js +1 -1
  126. package/colorpicker/colorpicker.esm.js +1 -1
  127. package/colorpicker/colorpicker.esm.min.js +1 -1
  128. package/colorpicker/colorpicker.js +1 -1
  129. package/colorpicker/colorpicker.min.js +1 -1
  130. package/column/Column.d.ts +8 -0
  131. package/config/PrimeVue.d.ts +3 -0
  132. package/config/config.cjs.js +5 -0
  133. package/config/config.cjs.min.js +1 -1
  134. package/config/config.esm.js +5 -0
  135. package/config/config.esm.min.js +1 -1
  136. package/config/config.js +5 -0
  137. package/config/config.min.js +1 -1
  138. package/confirmdialog/BaseConfirmDialog.vue +2 -2
  139. package/confirmdialog/ConfirmDialog.d.ts +22 -0
  140. package/confirmdialog/ConfirmDialog.vue +15 -10
  141. package/confirmdialog/confirmdialog.cjs.js +42 -29
  142. package/confirmdialog/confirmdialog.cjs.min.js +1 -1
  143. package/confirmdialog/confirmdialog.esm.js +43 -30
  144. package/confirmdialog/confirmdialog.esm.min.js +1 -1
  145. package/confirmdialog/confirmdialog.js +42 -29
  146. package/confirmdialog/confirmdialog.min.js +1 -1
  147. package/confirmpopup/BaseConfirmPopup.vue +72 -70
  148. package/confirmpopup/ConfirmPopup.d.ts +18 -0
  149. package/confirmpopup/ConfirmPopup.vue +45 -24
  150. package/confirmpopup/confirmpopup.cjs.js +14 -10
  151. package/confirmpopup/confirmpopup.cjs.min.js +1 -1
  152. package/confirmpopup/confirmpopup.esm.js +15 -11
  153. package/confirmpopup/confirmpopup.esm.min.js +1 -1
  154. package/confirmpopup/confirmpopup.js +14 -10
  155. package/confirmpopup/confirmpopup.min.js +1 -1
  156. package/contextmenu/BaseContextMenu.vue +41 -39
  157. package/contextmenu/contextmenu.cjs.js +1 -1
  158. package/contextmenu/contextmenu.cjs.min.js +1 -1
  159. package/contextmenu/contextmenu.esm.js +1 -1
  160. package/contextmenu/contextmenu.esm.min.js +1 -1
  161. package/contextmenu/contextmenu.js +1 -1
  162. package/contextmenu/contextmenu.min.js +1 -1
  163. package/core/core.js +138 -76
  164. package/core/core.min.js +18 -18
  165. package/datatable/BaseDataTable.vue +235 -233
  166. package/datatable/BodyCell.vue +1 -1
  167. package/datatable/ColumnFilter.vue +1 -1
  168. package/datatable/DataTable.d.ts +48 -4
  169. package/datatable/DataTable.vue +32 -19
  170. package/datatable/TableBody.vue +1 -1
  171. package/datatable/datatable.cjs.js +74 -24
  172. package/datatable/datatable.cjs.min.js +1 -1
  173. package/datatable/datatable.esm.js +74 -24
  174. package/datatable/datatable.esm.min.js +1 -1
  175. package/datatable/datatable.js +74 -24
  176. package/datatable/datatable.min.js +1 -1
  177. package/dialog/BaseDialog.vue +136 -130
  178. package/dialog/Dialog.d.ts +20 -0
  179. package/dialog/Dialog.vue +54 -50
  180. package/dialog/dialog.cjs.js +24 -9
  181. package/dialog/dialog.cjs.min.js +1 -1
  182. package/dialog/dialog.esm.js +25 -10
  183. package/dialog/dialog.esm.min.js +1 -1
  184. package/dialog/dialog.js +24 -9
  185. package/dialog/dialog.min.js +1 -1
  186. package/divider/BaseDivider.vue +61 -59
  187. package/divider/divider.cjs.js +1 -1
  188. package/divider/divider.cjs.min.js +1 -1
  189. package/divider/divider.esm.js +1 -1
  190. package/divider/divider.esm.min.js +1 -1
  191. package/divider/divider.js +1 -1
  192. package/divider/divider.min.js +1 -1
  193. package/dock/BaseDock.vue +106 -104
  194. package/dock/dock.cjs.js +1 -1
  195. package/dock/dock.cjs.min.js +1 -1
  196. package/dock/dock.esm.js +1 -1
  197. package/dock/dock.esm.min.js +1 -1
  198. package/dock/dock.js +1 -1
  199. package/dock/dock.min.js +1 -1
  200. package/dropdown/BaseDropdown.vue +93 -91
  201. package/dropdown/dropdown.cjs.js +1 -1
  202. package/dropdown/dropdown.cjs.min.js +1 -1
  203. package/dropdown/dropdown.esm.js +1 -1
  204. package/dropdown/dropdown.esm.min.js +1 -1
  205. package/dropdown/dropdown.js +1 -1
  206. package/dropdown/dropdown.min.js +1 -1
  207. package/fieldset/BaseFieldset.vue +19 -17
  208. package/fieldset/fieldset.cjs.js +1 -1
  209. package/fieldset/fieldset.cjs.min.js +1 -1
  210. package/fieldset/fieldset.esm.js +1 -1
  211. package/fieldset/fieldset.esm.min.js +1 -1
  212. package/fieldset/fieldset.js +1 -1
  213. package/fieldset/fieldset.min.js +1 -1
  214. package/fileupload/BaseFileUpload.vue +44 -42
  215. package/fileupload/fileupload.cjs.js +1 -1
  216. package/fileupload/fileupload.cjs.min.js +1 -1
  217. package/fileupload/fileupload.esm.js +1 -1
  218. package/fileupload/fileupload.esm.min.js +1 -1
  219. package/fileupload/fileupload.js +1 -1
  220. package/fileupload/fileupload.min.js +1 -1
  221. package/galleria/BaseGalleria.vue +283 -281
  222. package/galleria/Galleria.vue +3 -0
  223. package/galleria/galleria.cjs.js +4 -1
  224. package/galleria/galleria.cjs.min.js +1 -1
  225. package/galleria/galleria.esm.js +4 -1
  226. package/galleria/galleria.esm.min.js +1 -1
  227. package/galleria/galleria.js +4 -1
  228. package/galleria/galleria.min.js +1 -1
  229. package/image/BaseImage.vue +64 -62
  230. package/image/Image.vue +4 -0
  231. package/image/image.cjs.js +5 -1
  232. package/image/image.cjs.min.js +1 -1
  233. package/image/image.esm.js +5 -1
  234. package/image/image.esm.min.js +1 -1
  235. package/image/image.js +5 -1
  236. package/image/image.min.js +1 -1
  237. package/inlinemessage/BaseInlineMessage.vue +16 -14
  238. package/inlinemessage/inlinemessage.cjs.js +1 -1
  239. package/inlinemessage/inlinemessage.cjs.min.js +1 -1
  240. package/inlinemessage/inlinemessage.esm.js +1 -1
  241. package/inlinemessage/inlinemessage.esm.min.js +1 -1
  242. package/inlinemessage/inlinemessage.js +1 -1
  243. package/inlinemessage/inlinemessage.min.js +1 -1
  244. package/inplace/BaseInplace.vue +18 -16
  245. package/inplace/Inplace.vue +1 -1
  246. package/inplace/inplace.cjs.js +4 -2
  247. package/inplace/inplace.cjs.min.js +1 -1
  248. package/inplace/inplace.esm.js +4 -2
  249. package/inplace/inplace.esm.min.js +1 -1
  250. package/inplace/inplace.js +4 -2
  251. package/inplace/inplace.min.js +1 -1
  252. package/inputnumber/BaseInputNumber.vue +101 -99
  253. package/inputnumber/InputNumber.vue +4 -4
  254. package/inputnumber/inputnumber.cjs.js +13 -5
  255. package/inputnumber/inputnumber.cjs.min.js +1 -1
  256. package/inputnumber/inputnumber.esm.js +13 -5
  257. package/inputnumber/inputnumber.esm.min.js +1 -1
  258. package/inputnumber/inputnumber.js +13 -5
  259. package/inputnumber/inputnumber.min.js +1 -1
  260. package/inputswitch/BaseInputSwitch.vue +20 -18
  261. package/inputswitch/inputswitch.cjs.js +1 -1
  262. package/inputswitch/inputswitch.cjs.min.js +1 -1
  263. package/inputswitch/inputswitch.esm.js +1 -1
  264. package/inputswitch/inputswitch.esm.min.js +1 -1
  265. package/inputswitch/inputswitch.js +1 -1
  266. package/inputswitch/inputswitch.min.js +1 -1
  267. package/knob/BaseKnob.vue +14 -12
  268. package/knob/knob.cjs.js +1 -1
  269. package/knob/knob.cjs.min.js +1 -1
  270. package/knob/knob.esm.js +1 -1
  271. package/knob/knob.esm.min.js +1 -1
  272. package/knob/knob.js +1 -1
  273. package/knob/knob.min.js +1 -1
  274. package/listbox/BaseListbox.vue +34 -32
  275. package/listbox/listbox.cjs.js +1 -1
  276. package/listbox/listbox.cjs.min.js +1 -1
  277. package/listbox/listbox.esm.js +1 -1
  278. package/listbox/listbox.esm.min.js +1 -1
  279. package/listbox/listbox.js +1 -1
  280. package/listbox/listbox.min.js +1 -1
  281. package/megamenu/BaseMegaMenu.vue +111 -109
  282. package/megamenu/megamenu.cjs.js +1 -1
  283. package/megamenu/megamenu.cjs.min.js +1 -1
  284. package/megamenu/megamenu.esm.js +1 -1
  285. package/megamenu/megamenu.esm.min.js +1 -1
  286. package/megamenu/megamenu.js +1 -1
  287. package/megamenu/megamenu.min.js +1 -1
  288. package/menu/BaseMenu.vue +19 -17
  289. package/menu/menu.cjs.js +1 -1
  290. package/menu/menu.cjs.min.js +1 -1
  291. package/menu/menu.esm.js +1 -1
  292. package/menu/menu.esm.min.js +1 -1
  293. package/menu/menu.js +1 -1
  294. package/menu/menu.min.js +1 -1
  295. package/menubar/BaseMenubar.vue +72 -70
  296. package/menubar/Menubar.vue +2 -2
  297. package/menubar/menubar.cjs.js +3 -3
  298. package/menubar/menubar.cjs.min.js +1 -1
  299. package/menubar/menubar.esm.js +3 -3
  300. package/menubar/menubar.esm.min.js +1 -1
  301. package/menubar/menubar.js +3 -3
  302. package/menubar/menubar.min.js +1 -1
  303. package/message/BaseMessage.vue +49 -47
  304. package/message/Message.d.ts +10 -0
  305. package/message/Message.vue +2 -1
  306. package/message/message.cjs.js +7 -3
  307. package/message/message.cjs.min.js +1 -1
  308. package/message/message.esm.js +8 -4
  309. package/message/message.esm.min.js +1 -1
  310. package/message/message.js +7 -3
  311. package/message/message.min.js +1 -1
  312. package/multiselect/BaseMultiSelect.vue +106 -104
  313. package/multiselect/multiselect.cjs.js +1 -1
  314. package/multiselect/multiselect.cjs.min.js +1 -1
  315. package/multiselect/multiselect.esm.js +1 -1
  316. package/multiselect/multiselect.esm.min.js +1 -1
  317. package/multiselect/multiselect.js +1 -1
  318. package/multiselect/multiselect.min.js +1 -1
  319. package/orderlist/BaseOrderList.vue +38 -36
  320. package/orderlist/OrderList.vue +4 -4
  321. package/orderlist/orderlist.cjs.js +13 -5
  322. package/orderlist/orderlist.cjs.min.js +1 -1
  323. package/orderlist/orderlist.esm.js +14 -6
  324. package/orderlist/orderlist.esm.min.js +1 -1
  325. package/orderlist/orderlist.js +13 -5
  326. package/orderlist/orderlist.min.js +1 -1
  327. package/organizationchart/BaseOrganizationChart.vue +53 -51
  328. package/organizationchart/organizationchart.cjs.js +1 -1
  329. package/organizationchart/organizationchart.cjs.min.js +1 -1
  330. package/organizationchart/organizationchart.esm.js +1 -1
  331. package/organizationchart/organizationchart.esm.min.js +1 -1
  332. package/organizationchart/organizationchart.js +1 -1
  333. package/organizationchart/organizationchart.min.js +1 -1
  334. package/overlaypanel/BaseOverlayPanel.vue +70 -68
  335. package/overlaypanel/OverlayPanel.d.ts +15 -0
  336. package/overlaypanel/OverlayPanel.vue +11 -8
  337. package/overlaypanel/overlaypanel.cjs.js +11 -3
  338. package/overlaypanel/overlaypanel.cjs.min.js +1 -1
  339. package/overlaypanel/overlaypanel.esm.js +12 -4
  340. package/overlaypanel/overlaypanel.esm.min.js +1 -1
  341. package/overlaypanel/overlaypanel.js +11 -3
  342. package/overlaypanel/overlaypanel.min.js +1 -1
  343. package/package.json +1 -1
  344. package/paginator/BasePaginator.vue +40 -38
  345. package/paginator/JumpToPageDropdown.vue +7 -2
  346. package/paginator/Paginator.d.ts +20 -0
  347. package/paginator/Paginator.vue +7 -4
  348. package/paginator/RowsPerPageDropdown.vue +7 -2
  349. package/paginator/paginator.cjs.js +41 -12
  350. package/paginator/paginator.cjs.min.js +1 -1
  351. package/paginator/paginator.esm.js +42 -13
  352. package/paginator/paginator.esm.min.js +1 -1
  353. package/paginator/paginator.js +41 -12
  354. package/paginator/paginator.min.js +1 -1
  355. package/panel/BasePanel.vue +20 -18
  356. package/panel/panel.cjs.js +1 -1
  357. package/panel/panel.cjs.min.js +1 -1
  358. package/panel/panel.esm.js +1 -1
  359. package/panel/panel.esm.min.js +1 -1
  360. package/panel/panel.js +1 -1
  361. package/panel/panel.min.js +1 -1
  362. package/panelmenu/BasePanelMenu.vue +33 -31
  363. package/panelmenu/panelmenu.cjs.js +1 -1
  364. package/panelmenu/panelmenu.cjs.min.js +1 -1
  365. package/panelmenu/panelmenu.esm.js +1 -1
  366. package/panelmenu/panelmenu.esm.min.js +1 -1
  367. package/panelmenu/panelmenu.js +1 -1
  368. package/panelmenu/panelmenu.min.js +1 -1
  369. package/passthrough/index.cjs.js +2 -9
  370. package/passthrough/index.cjs.min.js +1 -1
  371. package/passthrough/index.esm.js +2 -9
  372. package/passthrough/index.esm.min.js +1 -1
  373. package/passthrough/index.js +2 -9
  374. package/passthrough/index.min.js +1 -1
  375. package/passthrough/tailwind/index.cjs.js +5 -5
  376. package/passthrough/tailwind/index.cjs.min.js +1 -1
  377. package/passthrough/tailwind/index.esm.js +5 -5
  378. package/passthrough/tailwind/index.esm.min.js +1 -1
  379. package/passthrough/tailwind/index.js +5 -5
  380. package/passthrough/tailwind/index.min.js +1 -1
  381. package/password/BasePassword.vue +27 -25
  382. package/password/password.cjs.js +1 -1
  383. package/password/password.cjs.min.js +1 -1
  384. package/password/password.esm.js +1 -1
  385. package/password/password.esm.min.js +1 -1
  386. package/password/password.js +1 -1
  387. package/password/password.min.js +1 -1
  388. package/picklist/BasePickList.vue +34 -32
  389. package/picklist/PickList.vue +12 -12
  390. package/picklist/picklist.cjs.js +37 -13
  391. package/picklist/picklist.cjs.min.js +1 -1
  392. package/picklist/picklist.esm.js +38 -14
  393. package/picklist/picklist.esm.min.js +1 -1
  394. package/picklist/picklist.js +37 -13
  395. package/picklist/picklist.min.js +1 -1
  396. package/progressbar/BaseProgressBar.vue +99 -97
  397. package/progressbar/progressbar.cjs.js +1 -1
  398. package/progressbar/progressbar.cjs.min.js +1 -1
  399. package/progressbar/progressbar.esm.js +1 -1
  400. package/progressbar/progressbar.esm.min.js +1 -1
  401. package/progressbar/progressbar.js +1 -1
  402. package/progressbar/progressbar.min.js +1 -1
  403. package/progressspinner/BaseProgressSpinner.vue +26 -24
  404. package/progressspinner/progressspinner.cjs.js +1 -1
  405. package/progressspinner/progressspinner.cjs.min.js +1 -1
  406. package/progressspinner/progressspinner.esm.js +1 -1
  407. package/progressspinner/progressspinner.esm.min.js +1 -1
  408. package/progressspinner/progressspinner.js +1 -1
  409. package/progressspinner/progressspinner.min.js +1 -1
  410. package/rating/BaseRating.vue +19 -17
  411. package/rating/Rating.vue +4 -1
  412. package/rating/rating.cjs.js +7 -5
  413. package/rating/rating.cjs.min.js +1 -1
  414. package/rating/rating.esm.js +7 -5
  415. package/rating/rating.esm.min.js +1 -1
  416. package/rating/rating.js +7 -5
  417. package/rating/rating.min.js +1 -1
  418. package/resources/themes/arya-blue/theme.css +5601 -5585
  419. package/resources/themes/arya-green/theme.css +5601 -5585
  420. package/resources/themes/arya-orange/theme.css +5601 -5585
  421. package/resources/themes/arya-purple/theme.css +5601 -5585
  422. package/resources/themes/bootstrap4-dark-blue/theme.css +5538 -5523
  423. package/resources/themes/bootstrap4-dark-purple/theme.css +5538 -5523
  424. package/resources/themes/bootstrap4-light-blue/theme.css +5607 -5592
  425. package/resources/themes/bootstrap4-light-purple/theme.css +5607 -5592
  426. package/resources/themes/fluent-light/theme.css +5734 -5718
  427. package/resources/themes/lara-dark-blue/fonts/Inter-italic.var.woff2 +0 -0
  428. package/resources/themes/lara-dark-blue/fonts/Inter-roman.var.woff2 +0 -0
  429. package/resources/themes/lara-dark-blue/theme.css +5590 -5556
  430. package/resources/themes/lara-dark-indigo/fonts/Inter-italic.var.woff2 +0 -0
  431. package/resources/themes/lara-dark-indigo/fonts/Inter-roman.var.woff2 +0 -0
  432. package/resources/themes/lara-dark-indigo/theme.css +5590 -5556
  433. package/resources/themes/lara-dark-purple/fonts/Inter-italic.var.woff2 +0 -0
  434. package/resources/themes/lara-dark-purple/fonts/Inter-roman.var.woff2 +0 -0
  435. package/resources/themes/lara-dark-purple/theme.css +5590 -5556
  436. package/resources/themes/lara-dark-teal/fonts/Inter-italic.var.woff2 +0 -0
  437. package/resources/themes/lara-dark-teal/fonts/Inter-roman.var.woff2 +0 -0
  438. package/resources/themes/lara-dark-teal/theme.css +5590 -5556
  439. package/resources/themes/lara-light-blue/fonts/Inter-italic.var.woff2 +0 -0
  440. package/resources/themes/lara-light-blue/fonts/Inter-roman.var.woff2 +0 -0
  441. package/resources/themes/lara-light-blue/theme.css +5604 -5570
  442. package/resources/themes/lara-light-indigo/fonts/Inter-italic.var.woff2 +0 -0
  443. package/resources/themes/lara-light-indigo/fonts/Inter-roman.var.woff2 +0 -0
  444. package/resources/themes/lara-light-indigo/theme.css +5604 -5570
  445. package/resources/themes/lara-light-purple/fonts/Inter-italic.var.woff2 +0 -0
  446. package/resources/themes/lara-light-purple/fonts/Inter-roman.var.woff2 +0 -0
  447. package/resources/themes/lara-light-purple/theme.css +5604 -5570
  448. package/resources/themes/lara-light-teal/fonts/Inter-italic.var.woff2 +0 -0
  449. package/resources/themes/lara-light-teal/fonts/Inter-roman.var.woff2 +0 -0
  450. package/resources/themes/lara-light-teal/theme.css +5604 -5570
  451. package/resources/themes/luna-amber/theme.css +5553 -5539
  452. package/resources/themes/luna-blue/theme.css +5553 -5539
  453. package/resources/themes/luna-green/theme.css +5553 -5539
  454. package/resources/themes/luna-pink/theme.css +5553 -5539
  455. package/resources/themes/md-dark-deeppurple/theme.css +7052 -7037
  456. package/resources/themes/md-dark-indigo/theme.css +7052 -7037
  457. package/resources/themes/md-light-deeppurple/theme.css +7073 -7058
  458. package/resources/themes/md-light-indigo/theme.css +7073 -7058
  459. package/resources/themes/mdc-dark-deeppurple/theme.css +7067 -7052
  460. package/resources/themes/mdc-dark-indigo/theme.css +7067 -7052
  461. package/resources/themes/mdc-light-deeppurple/theme.css +7074 -7059
  462. package/resources/themes/mdc-light-indigo/theme.css +7074 -7059
  463. package/resources/themes/mira/theme.css +5773 -5757
  464. package/resources/themes/nano/theme.css +5574 -5559
  465. package/resources/themes/nova/theme.css +5563 -5548
  466. package/resources/themes/nova-accent/theme.css +5539 -5524
  467. package/resources/themes/nova-alt/theme.css +5550 -5535
  468. package/resources/themes/nova-vue/theme.css +5563 -5548
  469. package/resources/themes/rhea/theme.css +5530 -5515
  470. package/resources/themes/saga-blue/theme.css +5590 -5574
  471. package/resources/themes/saga-green/theme.css +5590 -5574
  472. package/resources/themes/saga-orange/theme.css +5590 -5574
  473. package/resources/themes/saga-purple/theme.css +5590 -5574
  474. package/resources/themes/soho-dark/theme.css +5542 -5526
  475. package/resources/themes/soho-light/theme.css +5602 -5586
  476. package/resources/themes/tailwind-light/theme.css +5653 -5637
  477. package/resources/themes/vela-blue/theme.css +5590 -5574
  478. package/resources/themes/vela-green/theme.css +5590 -5574
  479. package/resources/themes/vela-orange/theme.css +5590 -5574
  480. package/resources/themes/vela-purple/theme.css +5590 -5574
  481. package/resources/themes/viva-dark/theme.css +5709 -5693
  482. package/resources/themes/viva-light/theme.css +5692 -5676
  483. package/ripple/ripple.cjs.js +1 -1
  484. package/ripple/ripple.cjs.min.js +1 -1
  485. package/ripple/ripple.esm.js +1 -1
  486. package/ripple/ripple.esm.min.js +1 -1
  487. package/ripple/ripple.js +1 -1
  488. package/ripple/ripple.min.js +1 -1
  489. package/scrollpanel/BaseScrollPanel.vue +56 -54
  490. package/scrollpanel/scrollpanel.cjs.js +1 -1
  491. package/scrollpanel/scrollpanel.cjs.min.js +1 -1
  492. package/scrollpanel/scrollpanel.esm.js +1 -1
  493. package/scrollpanel/scrollpanel.esm.min.js +1 -1
  494. package/scrollpanel/scrollpanel.js +1 -1
  495. package/scrollpanel/scrollpanel.min.js +1 -1
  496. package/scrolltop/BaseScrollTop.vue +33 -31
  497. package/scrolltop/scrolltop.cjs.js +1 -1
  498. package/scrolltop/scrolltop.cjs.min.js +1 -1
  499. package/scrolltop/scrolltop.esm.js +1 -1
  500. package/scrolltop/scrolltop.esm.min.js +1 -1
  501. package/scrolltop/scrolltop.js +1 -1
  502. package/scrolltop/scrolltop.min.js +1 -1
  503. package/sidebar/BaseSidebar.vue +146 -144
  504. package/sidebar/Sidebar.d.ts +10 -0
  505. package/sidebar/Sidebar.vue +17 -12
  506. package/sidebar/sidebar.cjs.js +10 -3
  507. package/sidebar/sidebar.cjs.min.js +1 -1
  508. package/sidebar/sidebar.esm.js +11 -4
  509. package/sidebar/sidebar.esm.min.js +1 -1
  510. package/sidebar/sidebar.js +10 -3
  511. package/sidebar/sidebar.min.js +1 -1
  512. package/skeleton/BaseSkeleton.vue +30 -28
  513. package/skeleton/skeleton.cjs.js +1 -1
  514. package/skeleton/skeleton.cjs.min.js +1 -1
  515. package/skeleton/skeleton.esm.js +1 -1
  516. package/skeleton/skeleton.esm.min.js +1 -1
  517. package/skeleton/skeleton.js +1 -1
  518. package/skeleton/skeleton.min.js +1 -1
  519. package/slider/BaseSlider.vue +39 -37
  520. package/slider/slider.cjs.js +1 -2
  521. package/slider/slider.cjs.min.js +1 -1
  522. package/slider/slider.esm.js +1 -2
  523. package/slider/slider.esm.min.js +1 -1
  524. package/slider/slider.js +1 -2
  525. package/slider/slider.min.js +1 -1
  526. package/speeddial/BaseSpeedDial.vue +77 -75
  527. package/speeddial/SpeedDial.vue +2 -2
  528. package/speeddial/speeddial.cjs.js +7 -3
  529. package/speeddial/speeddial.cjs.min.js +1 -1
  530. package/speeddial/speeddial.esm.js +7 -3
  531. package/speeddial/speeddial.esm.min.js +1 -1
  532. package/speeddial/speeddial.js +7 -3
  533. package/speeddial/speeddial.min.js +1 -1
  534. package/splitbutton/BaseSplitButton.vue +32 -30
  535. package/splitbutton/SplitButton.vue +2 -1
  536. package/splitbutton/splitbutton.cjs.js +3 -2
  537. package/splitbutton/splitbutton.cjs.min.js +1 -1
  538. package/splitbutton/splitbutton.esm.js +3 -2
  539. package/splitbutton/splitbutton.esm.min.js +1 -1
  540. package/splitbutton/splitbutton.js +3 -2
  541. package/splitbutton/splitbutton.min.js +1 -1
  542. package/splitter/BaseSplitter.vue +46 -44
  543. package/splitter/splitter.cjs.js +1 -1
  544. package/splitter/splitter.cjs.min.js +1 -1
  545. package/splitter/splitter.esm.js +1 -1
  546. package/splitter/splitter.esm.min.js +1 -1
  547. package/splitter/splitter.js +1 -1
  548. package/splitter/splitter.min.js +1 -1
  549. package/splitterpanel/BaseSplitterPanel.vue +13 -11
  550. package/splitterpanel/splitterpanel.cjs.js +1 -1
  551. package/splitterpanel/splitterpanel.cjs.min.js +1 -1
  552. package/splitterpanel/splitterpanel.esm.js +1 -1
  553. package/splitterpanel/splitterpanel.esm.min.js +1 -1
  554. package/splitterpanel/splitterpanel.js +1 -1
  555. package/splitterpanel/splitterpanel.min.js +1 -1
  556. package/steps/BaseSteps.vue +52 -50
  557. package/steps/steps.cjs.js +1 -1
  558. package/steps/steps.cjs.min.js +1 -1
  559. package/steps/steps.esm.js +1 -1
  560. package/steps/steps.esm.min.js +1 -1
  561. package/steps/steps.js +1 -1
  562. package/steps/steps.min.js +1 -1
  563. package/tabmenu/BaseTabMenu.vue +40 -38
  564. package/tabmenu/TabMenu.vue +5 -0
  565. package/tabmenu/tabmenu.cjs.js +6 -1
  566. package/tabmenu/tabmenu.cjs.min.js +1 -1
  567. package/tabmenu/tabmenu.esm.js +6 -1
  568. package/tabmenu/tabmenu.esm.min.js +1 -1
  569. package/tabmenu/tabmenu.js +6 -1
  570. package/tabmenu/tabmenu.min.js +1 -1
  571. package/tabview/BaseTabView.vue +70 -68
  572. package/tabview/tabview.cjs.js +1 -1
  573. package/tabview/tabview.cjs.min.js +1 -1
  574. package/tabview/tabview.esm.js +1 -1
  575. package/tabview/tabview.esm.min.js +1 -1
  576. package/tabview/tabview.js +1 -1
  577. package/tabview/tabview.min.js +1 -1
  578. package/tag/BaseTag.vue +16 -14
  579. package/tag/tag.cjs.js +1 -1
  580. package/tag/tag.cjs.min.js +1 -1
  581. package/tag/tag.esm.js +1 -1
  582. package/tag/tag.esm.min.js +1 -1
  583. package/tag/tag.js +1 -1
  584. package/tag/tag.min.js +1 -1
  585. package/terminal/BaseTerminal.vue +23 -21
  586. package/terminal/terminal.cjs.js +1 -1
  587. package/terminal/terminal.cjs.min.js +1 -1
  588. package/terminal/terminal.esm.js +1 -1
  589. package/terminal/terminal.esm.min.js +1 -1
  590. package/terminal/terminal.js +1 -1
  591. package/terminal/terminal.min.js +1 -1
  592. package/textarea/BaseTextarea.vue +9 -7
  593. package/textarea/Textarea.vue +1 -3
  594. package/textarea/textarea.cjs.js +2 -3
  595. package/textarea/textarea.cjs.min.js +1 -1
  596. package/textarea/textarea.esm.js +2 -3
  597. package/textarea/textarea.esm.min.js +1 -1
  598. package/textarea/textarea.js +2 -3
  599. package/textarea/textarea.min.js +1 -1
  600. package/tieredmenu/BaseTieredMenu.vue +40 -38
  601. package/tieredmenu/tieredmenu.cjs.js +1 -1
  602. package/tieredmenu/tieredmenu.cjs.min.js +1 -1
  603. package/tieredmenu/tieredmenu.esm.js +1 -1
  604. package/tieredmenu/tieredmenu.esm.min.js +1 -1
  605. package/tieredmenu/tieredmenu.js +1 -1
  606. package/tieredmenu/tieredmenu.min.js +1 -1
  607. package/timeline/BaseTimeline.vue +111 -109
  608. package/timeline/timeline.cjs.js +1 -1
  609. package/timeline/timeline.cjs.min.js +1 -1
  610. package/timeline/timeline.esm.js +1 -1
  611. package/timeline/timeline.esm.min.js +1 -1
  612. package/timeline/timeline.js +1 -1
  613. package/timeline/timeline.min.js +1 -1
  614. package/toast/BaseToast.vue +73 -71
  615. package/toast/Toast.d.ts +14 -0
  616. package/toast/ToastMessage.vue +3 -2
  617. package/toast/toast.cjs.js +9 -4
  618. package/toast/toast.cjs.min.js +1 -1
  619. package/toast/toast.esm.js +10 -5
  620. package/toast/toast.esm.min.js +1 -1
  621. package/toast/toast.js +9 -4
  622. package/toast/toast.min.js +1 -1
  623. package/toolbar/BaseToolbar.vue +21 -19
  624. package/toolbar/toolbar.cjs.js +1 -2
  625. package/toolbar/toolbar.cjs.min.js +1 -1
  626. package/toolbar/toolbar.esm.js +1 -2
  627. package/toolbar/toolbar.esm.min.js +1 -1
  628. package/toolbar/toolbar.js +1 -2
  629. package/toolbar/toolbar.min.js +1 -1
  630. package/tooltip/tooltip.cjs.js +1 -1
  631. package/tooltip/tooltip.cjs.min.js +1 -1
  632. package/tooltip/tooltip.esm.js +1 -1
  633. package/tooltip/tooltip.esm.min.js +1 -1
  634. package/tooltip/tooltip.js +1 -1
  635. package/tooltip/tooltip.min.js +1 -1
  636. package/tree/BaseTree.vue +82 -80
  637. package/tree/Tree.vue +1 -1
  638. package/tree/TreeNode.vue +1 -1
  639. package/tree/tree.cjs.js +8 -6
  640. package/tree/tree.cjs.min.js +1 -1
  641. package/tree/tree.esm.js +9 -7
  642. package/tree/tree.esm.min.js +1 -1
  643. package/tree/tree.js +8 -6
  644. package/tree/tree.min.js +1 -1
  645. package/treeselect/BaseTreeSelect.vue +51 -49
  646. package/treeselect/treeselect.cjs.js +1 -1
  647. package/treeselect/treeselect.cjs.min.js +1 -1
  648. package/treeselect/treeselect.esm.js +1 -1
  649. package/treeselect/treeselect.esm.min.js +1 -1
  650. package/treeselect/treeselect.js +1 -1
  651. package/treeselect/treeselect.min.js +1 -1
  652. package/treetable/BaseTreeTable.vue +169 -167
  653. package/treetable/BodyCell.vue +1 -1
  654. package/treetable/TreeTable.d.ts +48 -4
  655. package/treetable/TreeTable.vue +28 -16
  656. package/treetable/treetable.cjs.js +66 -18
  657. package/treetable/treetable.cjs.min.js +1 -1
  658. package/treetable/treetable.esm.js +66 -18
  659. package/treetable/treetable.esm.min.js +1 -1
  660. package/treetable/treetable.js +66 -18
  661. package/treetable/treetable.min.js +1 -1
  662. package/vetur-attributes.json +4 -0
  663. package/vetur-tags.json +1 -0
  664. package/web-types.json +46 -1
@@ -1 +1 @@
1
- "use strict";var e=require("primevue/basecomponent"),n=require("primevue/usestyle"),r=require("vue");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=t(e),i=n.useStyle("\n.p-progress-spinner {\n position: relative;\n margin: 0 auto;\n width: 100px;\n height: 100px;\n display: inline-block;\n}\n\n.p-progress-spinner::before {\n content: '';\n display: block;\n padding-top: 100%;\n}\n\n.p-progress-spinner-svg {\n height: 100%;\n transform-origin: center center;\n width: 100%;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: auto;\n}\n",{name:"progressspinner",manual:!0}),o={name:"ProgressSpinner",extends:{name:"BaseProgressSpinner",extends:s.default,props:{strokeWidth:{type:String,default:"2"},fill:{type:String,default:"none"},animationDuration:{type:String,default:"2s"}},css:{classes:{root:"p-progress-spinner",spinner:"p-progress-spinner-svg",circle:"p-progress-spinner-circle"},loadStyle:i.load},provide:function(){return{$parentInstance:this}}},computed:{svgStyle:function(){return{"animation-duration":this.animationDuration}}}},p=["fill","stroke-width"];o.render=function(e,n,t,s,i,o){return r.openBlock(),r.createElementBlock("div",r.mergeProps({class:e.cx("root"),role:"progressbar"},e.ptm("root"),{"data-pc-name":"progressspinner"}),[(r.openBlock(),r.createElementBlock("svg",r.mergeProps({class:e.cx("spinner"),viewBox:"25 25 50 50",style:o.svgStyle},e.ptm("spinner")),[r.createElementVNode("circle",r.mergeProps({class:e.cx("circle"),cx:"50",cy:"50",r:"20",fill:e.fill,"stroke-width":e.strokeWidth,strokeMiterlimit:"10"},e.ptm("circle")),null,16,p)],16))],16)},module.exports=o;
1
+ "use strict";var e=require("primevue/basecomponent"),n=require("primevue/usestyle"),r=require("vue");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=t(e),i=n.useStyle("\n@layer primevue {\n .p-progress-spinner {\n position: relative;\n margin: 0 auto;\n width: 100px;\n height: 100px;\n display: inline-block;\n }\n \n .p-progress-spinner::before {\n content: '';\n display: block;\n padding-top: 100%;\n }\n \n .p-progress-spinner-svg {\n height: 100%;\n transform-origin: center center;\n width: 100%;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: auto;\n }\n}\n",{name:"progressspinner",manual:!0}),o={name:"ProgressSpinner",extends:{name:"BaseProgressSpinner",extends:s.default,props:{strokeWidth:{type:String,default:"2"},fill:{type:String,default:"none"},animationDuration:{type:String,default:"2s"}},css:{classes:{root:"p-progress-spinner",spinner:"p-progress-spinner-svg",circle:"p-progress-spinner-circle"},loadStyle:i.load},provide:function(){return{$parentInstance:this}}},computed:{svgStyle:function(){return{"animation-duration":this.animationDuration}}}},p=["fill","stroke-width"];o.render=function(e,n,t,s,i,o){return r.openBlock(),r.createElementBlock("div",r.mergeProps({class:e.cx("root"),role:"progressbar"},e.ptm("root"),{"data-pc-name":"progressspinner"}),[(r.openBlock(),r.createElementBlock("svg",r.mergeProps({class:e.cx("spinner"),viewBox:"25 25 50 50",style:o.svgStyle},e.ptm("spinner")),[r.createElementVNode("circle",r.mergeProps({class:e.cx("circle"),cx:"50",cy:"50",r:"20",fill:e.fill,"stroke-width":e.strokeWidth,strokeMiterlimit:"10"},e.ptm("circle")),null,16,p)],16))],16)},module.exports=o;
@@ -2,7 +2,7 @@ import BaseComponent from 'primevue/basecomponent';
2
2
  import { useStyle } from 'primevue/usestyle';
3
3
  import { openBlock, createElementBlock, mergeProps, createElementVNode } from 'vue';
4
4
 
5
- var styles = "\n.p-progress-spinner {\n position: relative;\n margin: 0 auto;\n width: 100px;\n height: 100px;\n display: inline-block;\n}\n\n.p-progress-spinner::before {\n content: '';\n display: block;\n padding-top: 100%;\n}\n\n.p-progress-spinner-svg {\n height: 100%;\n transform-origin: center center;\n width: 100%;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: auto;\n}\n";
5
+ var styles = "\n@layer primevue {\n .p-progress-spinner {\n position: relative;\n margin: 0 auto;\n width: 100px;\n height: 100px;\n display: inline-block;\n }\n \n .p-progress-spinner::before {\n content: '';\n display: block;\n padding-top: 100%;\n }\n \n .p-progress-spinner-svg {\n height: 100%;\n transform-origin: center center;\n width: 100%;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: auto;\n }\n}\n";
6
6
  var classes = {
7
7
  root: 'p-progress-spinner',
8
8
  spinner: 'p-progress-spinner-svg',
@@ -1 +1 @@
1
- import n from"primevue/basecomponent";import{useStyle as e}from"primevue/usestyle";import{openBlock as r,createElementBlock as t,mergeProps as i,createElementVNode as s}from"vue";var o=e("\n.p-progress-spinner {\n position: relative;\n margin: 0 auto;\n width: 100px;\n height: 100px;\n display: inline-block;\n}\n\n.p-progress-spinner::before {\n content: '';\n display: block;\n padding-top: 100%;\n}\n\n.p-progress-spinner-svg {\n height: 100%;\n transform-origin: center center;\n width: 100%;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: auto;\n}\n",{name:"progressspinner",manual:!0}),p={name:"ProgressSpinner",extends:{name:"BaseProgressSpinner",extends:n,props:{strokeWidth:{type:String,default:"2"},fill:{type:String,default:"none"},animationDuration:{type:String,default:"2s"}},css:{classes:{root:"p-progress-spinner",spinner:"p-progress-spinner-svg",circle:"p-progress-spinner-circle"},loadStyle:o.load},provide:function(){return{$parentInstance:this}}},computed:{svgStyle:function(){return{"animation-duration":this.animationDuration}}}},a=["fill","stroke-width"];p.render=function(n,e,o,p,l,c){return r(),t("div",i({class:n.cx("root"),role:"progressbar"},n.ptm("root"),{"data-pc-name":"progressspinner"}),[(r(),t("svg",i({class:n.cx("spinner"),viewBox:"25 25 50 50",style:c.svgStyle},n.ptm("spinner")),[s("circle",i({class:n.cx("circle"),cx:"50",cy:"50",r:"20",fill:n.fill,"stroke-width":n.strokeWidth,strokeMiterlimit:"10"},n.ptm("circle")),null,16,a)],16))],16)};export{p as default};
1
+ import n from"primevue/basecomponent";import{useStyle as e}from"primevue/usestyle";import{openBlock as r,createElementBlock as t,mergeProps as i,createElementVNode as s}from"vue";var o=e("\n@layer primevue {\n .p-progress-spinner {\n position: relative;\n margin: 0 auto;\n width: 100px;\n height: 100px;\n display: inline-block;\n }\n \n .p-progress-spinner::before {\n content: '';\n display: block;\n padding-top: 100%;\n }\n \n .p-progress-spinner-svg {\n height: 100%;\n transform-origin: center center;\n width: 100%;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: auto;\n }\n}\n",{name:"progressspinner",manual:!0}),p={name:"ProgressSpinner",extends:{name:"BaseProgressSpinner",extends:n,props:{strokeWidth:{type:String,default:"2"},fill:{type:String,default:"none"},animationDuration:{type:String,default:"2s"}},css:{classes:{root:"p-progress-spinner",spinner:"p-progress-spinner-svg",circle:"p-progress-spinner-circle"},loadStyle:o.load},provide:function(){return{$parentInstance:this}}},computed:{svgStyle:function(){return{"animation-duration":this.animationDuration}}}},a=["fill","stroke-width"];p.render=function(n,e,o,p,l,c){return r(),t("div",i({class:n.cx("root"),role:"progressbar"},n.ptm("root"),{"data-pc-name":"progressspinner"}),[(r(),t("svg",i({class:n.cx("spinner"),viewBox:"25 25 50 50",style:c.svgStyle},n.ptm("spinner")),[s("circle",i({class:n.cx("circle"),cx:"50",cy:"50",r:"20",fill:n.fill,"stroke-width":n.strokeWidth,strokeMiterlimit:"10"},n.ptm("circle")),null,16,a)],16))],16)};export{p as default};
@@ -6,7 +6,7 @@ this.primevue.progressspinner = (function (BaseComponent, usestyle, vue) {
6
6
 
7
7
  var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
8
8
 
9
- var styles = "\n.p-progress-spinner {\n position: relative;\n margin: 0 auto;\n width: 100px;\n height: 100px;\n display: inline-block;\n}\n\n.p-progress-spinner::before {\n content: '';\n display: block;\n padding-top: 100%;\n}\n\n.p-progress-spinner-svg {\n height: 100%;\n transform-origin: center center;\n width: 100%;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: auto;\n}\n";
9
+ var styles = "\n@layer primevue {\n .p-progress-spinner {\n position: relative;\n margin: 0 auto;\n width: 100px;\n height: 100px;\n display: inline-block;\n }\n \n .p-progress-spinner::before {\n content: '';\n display: block;\n padding-top: 100%;\n }\n \n .p-progress-spinner-svg {\n height: 100%;\n transform-origin: center center;\n width: 100%;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: auto;\n }\n}\n";
10
10
  var classes = {
11
11
  root: 'p-progress-spinner',
12
12
  spinner: 'p-progress-spinner-svg',
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.progressspinner=function(e,n,r){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=t(e),i=n.useStyle("\n.p-progress-spinner {\n position: relative;\n margin: 0 auto;\n width: 100px;\n height: 100px;\n display: inline-block;\n}\n\n.p-progress-spinner::before {\n content: '';\n display: block;\n padding-top: 100%;\n}\n\n.p-progress-spinner-svg {\n height: 100%;\n transform-origin: center center;\n width: 100%;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: auto;\n}\n",{name:"progressspinner",manual:!0}),o={name:"ProgressSpinner",extends:{name:"BaseProgressSpinner",extends:s.default,props:{strokeWidth:{type:String,default:"2"},fill:{type:String,default:"none"},animationDuration:{type:String,default:"2s"}},css:{classes:{root:"p-progress-spinner",spinner:"p-progress-spinner-svg",circle:"p-progress-spinner-circle"},loadStyle:i.load},provide:function(){return{$parentInstance:this}}},computed:{svgStyle:function(){return{"animation-duration":this.animationDuration}}}},p=["fill","stroke-width"];return o.render=function(e,n,t,s,i,o){return r.openBlock(),r.createElementBlock("div",r.mergeProps({class:e.cx("root"),role:"progressbar"},e.ptm("root"),{"data-pc-name":"progressspinner"}),[(r.openBlock(),r.createElementBlock("svg",r.mergeProps({class:e.cx("spinner"),viewBox:"25 25 50 50",style:o.svgStyle},e.ptm("spinner")),[r.createElementVNode("circle",r.mergeProps({class:e.cx("circle"),cx:"50",cy:"50",r:"20",fill:e.fill,"stroke-width":e.strokeWidth,strokeMiterlimit:"10"},e.ptm("circle")),null,16,p)],16))],16)},o}(primevue.basecomponent,primevue.usestyle,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.progressspinner=function(e,n,r){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=t(e),i=n.useStyle("\n@layer primevue {\n .p-progress-spinner {\n position: relative;\n margin: 0 auto;\n width: 100px;\n height: 100px;\n display: inline-block;\n }\n \n .p-progress-spinner::before {\n content: '';\n display: block;\n padding-top: 100%;\n }\n \n .p-progress-spinner-svg {\n height: 100%;\n transform-origin: center center;\n width: 100%;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: auto;\n }\n}\n",{name:"progressspinner",manual:!0}),o={name:"ProgressSpinner",extends:{name:"BaseProgressSpinner",extends:s.default,props:{strokeWidth:{type:String,default:"2"},fill:{type:String,default:"none"},animationDuration:{type:String,default:"2s"}},css:{classes:{root:"p-progress-spinner",spinner:"p-progress-spinner-svg",circle:"p-progress-spinner-circle"},loadStyle:i.load},provide:function(){return{$parentInstance:this}}},computed:{svgStyle:function(){return{"animation-duration":this.animationDuration}}}},p=["fill","stroke-width"];return o.render=function(e,n,t,s,i,o){return r.openBlock(),r.createElementBlock("div",r.mergeProps({class:e.cx("root"),role:"progressbar"},e.ptm("root"),{"data-pc-name":"progressspinner"}),[(r.openBlock(),r.createElementBlock("svg",r.mergeProps({class:e.cx("spinner"),viewBox:"25 25 50 50",style:o.svgStyle},e.ptm("spinner")),[r.createElementVNode("circle",r.mergeProps({class:e.cx("circle"),cx:"50",cy:"50",r:"20",fill:e.fill,"stroke-width":e.strokeWidth,strokeMiterlimit:"10"},e.ptm("circle")),null,16,p)],16))],16)},o}(primevue.basecomponent,primevue.usestyle,Vue);
@@ -3,20 +3,22 @@ import BaseComponent from 'primevue/basecomponent';
3
3
  import { useStyle } from 'primevue/usestyle';
4
4
 
5
5
  const styles = `
6
- .p-rating {
7
- position: relative;
8
- display: flex;
9
- align-items: center;
10
- }
11
-
12
- .p-rating-item {
13
- display: inline-flex;
14
- align-items: center;
15
- cursor: pointer;
16
- }
17
-
18
- .p-rating.p-readonly .p-rating-item {
19
- cursor: default;
6
+ @layer primevue {
7
+ .p-rating {
8
+ position: relative;
9
+ display: flex;
10
+ align-items: center;
11
+ }
12
+
13
+ .p-rating-item {
14
+ display: inline-flex;
15
+ align-items: center;
16
+ cursor: pointer;
17
+ }
18
+
19
+ .p-rating.p-readonly .p-rating-item {
20
+ cursor: default;
21
+ }
20
22
  }
21
23
  `;
22
24
 
@@ -31,7 +33,7 @@ const classes = {
31
33
  cancelItem: ({ instance }) => [
32
34
  'p-rating-item p-rating-cancel-item',
33
35
  {
34
- 'p-focus': instance.focusedOptionIndex === 0
36
+ 'p-focus': instance.focusedOptionIndex === 0 && instance.isFocusVisibleItem
35
37
  }
36
38
  ],
37
39
  cancelIcon: 'p-rating-icon p-rating-cancel',
@@ -39,14 +41,14 @@ const classes = {
39
41
  'p-rating-item',
40
42
  {
41
43
  'p-rating-item-active': value <= props.modelValue,
42
- 'p-focus': value === instance.focusedOptionIndex
44
+ 'p-focus': value === instance.focusedOptionIndex && instance.isFocusVisibleItem
43
45
  }
44
46
  ],
45
47
  onIcon: 'p-rating-icon',
46
48
  offIcon: 'p-rating-icon'
47
49
  };
48
50
 
49
- const { load: loadStyle, unload: unloadStyle } = useStyle(styles, { name: 'rating', manual: true });
51
+ const { load: loadStyle } = useStyle(styles, { name: 'rating', manual: true });
50
52
 
51
53
  export default {
52
54
  name: 'BaseRating',
package/rating/Rating.vue CHANGED
@@ -62,7 +62,8 @@ export default {
62
62
  data() {
63
63
  return {
64
64
  name: this.$attrs.name,
65
- focusedOptionIndex: -1
65
+ focusedOptionIndex: -1,
66
+ isFocusVisibleItem: true
66
67
  };
67
68
  },
68
69
  watch: {
@@ -85,6 +86,7 @@ export default {
85
86
  onOptionClick(event, value) {
86
87
  if (!this.readonly && !this.disabled) {
87
88
  this.onOptionSelect(event, value);
89
+ this.isFocusVisibleItem = false;
88
90
  const firstFocusableEl = DomHandler.getFirstFocusableElement(event.currentTarget);
89
91
 
90
92
  firstFocusableEl && DomHandler.focus(firstFocusableEl);
@@ -100,6 +102,7 @@ export default {
100
102
  },
101
103
  onChange(event, value) {
102
104
  this.onOptionSelect(event, value);
105
+ this.isFocusVisibleItem = true;
103
106
  },
104
107
  onOptionSelect(event, value) {
105
108
  this.focusedOptionIndex = value;
@@ -15,7 +15,7 @@ var StarIcon__default = /*#__PURE__*/_interopDefaultLegacy(StarIcon);
15
15
  var StarFillIcon__default = /*#__PURE__*/_interopDefaultLegacy(StarFillIcon);
16
16
  var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
17
17
 
18
- var styles = "\n.p-rating {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.p-rating-item {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n}\n\n.p-rating.p-readonly .p-rating-item {\n cursor: default;\n}\n";
18
+ var styles = "\n@layer primevue {\n .p-rating {\n position: relative;\n display: flex;\n align-items: center;\n }\n \n .p-rating-item {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n }\n \n .p-rating.p-readonly .p-rating-item {\n cursor: default;\n }\n}\n";
19
19
  var classes = {
20
20
  root: function root(_ref) {
21
21
  var props = _ref.props;
@@ -27,7 +27,7 @@ var classes = {
27
27
  cancelItem: function cancelItem(_ref2) {
28
28
  var instance = _ref2.instance;
29
29
  return ['p-rating-item p-rating-cancel-item', {
30
- 'p-focus': instance.focusedOptionIndex === 0
30
+ 'p-focus': instance.focusedOptionIndex === 0 && instance.isFocusVisibleItem
31
31
  }];
32
32
  },
33
33
  cancelIcon: 'p-rating-icon p-rating-cancel',
@@ -37,7 +37,7 @@ var classes = {
37
37
  value = _ref3.value;
38
38
  return ['p-rating-item', {
39
39
  'p-rating-item-active': value <= props.modelValue,
40
- 'p-focus': value === instance.focusedOptionIndex
40
+ 'p-focus': value === instance.focusedOptionIndex && instance.isFocusVisibleItem
41
41
  }];
42
42
  },
43
43
  onIcon: 'p-rating-icon',
@@ -48,7 +48,6 @@ var _useStyle = usestyle.useStyle(styles, {
48
48
  manual: true
49
49
  }),
50
50
  loadStyle = _useStyle.load;
51
- _useStyle.unload;
52
51
  var script$1 = {
53
52
  name: 'BaseRating',
54
53
  "extends": BaseComponent__default["default"],
@@ -104,7 +103,8 @@ var script = {
104
103
  data: function data() {
105
104
  return {
106
105
  name: this.$attrs.name,
107
- focusedOptionIndex: -1
106
+ focusedOptionIndex: -1,
107
+ isFocusVisibleItem: true
108
108
  };
109
109
  },
110
110
  watch: {
@@ -127,6 +127,7 @@ var script = {
127
127
  onOptionClick: function onOptionClick(event, value) {
128
128
  if (!this.readonly && !this.disabled) {
129
129
  this.onOptionSelect(event, value);
130
+ this.isFocusVisibleItem = false;
130
131
  var firstFocusableEl = utils.DomHandler.getFirstFocusableElement(event.currentTarget);
131
132
  firstFocusableEl && utils.DomHandler.focus(firstFocusableEl);
132
133
  }
@@ -141,6 +142,7 @@ var script = {
141
142
  },
142
143
  onChange: function onChange(event, value) {
143
144
  this.onOptionSelect(event, value);
145
+ this.isFocusVisibleItem = true;
144
146
  },
145
147
  onOptionSelect: function onOptionSelect(event, value) {
146
148
  this.focusedOptionIndex = value;
@@ -1 +1 @@
1
- "use strict";var e=require("primevue/icons/ban"),n=require("primevue/icons/star"),t=require("primevue/icons/starfill"),o=require("primevue/utils"),a=require("primevue/basecomponent"),c=require("primevue/usestyle"),l=require("vue");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=i(e),s=i(n),u=i(t),d=i(a),p=c.useStyle("\n.p-rating {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.p-rating-item {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n}\n\n.p-rating.p-readonly .p-rating-item {\n cursor: default;\n}\n",{name:"rating",manual:!0}),m={name:"Rating",extends:{name:"BaseRating",extends:d.default,props:{modelValue:{type:Number,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},stars:{type:Number,default:5},cancel:{type:Boolean,default:!0},onIcon:{type:String,default:void 0},offIcon:{type:String,default:void 0},cancelIcon:{type:String,default:void 0}},css:{classes:{root:function(e){var n=e.props;return["p-rating",{"p-readonly":n.readonly,"p-disabled":n.disabled}]},cancelItem:function(e){return["p-rating-item p-rating-cancel-item",{"p-focus":0===e.instance.focusedOptionIndex}]},cancelIcon:"p-rating-icon p-rating-cancel",item:function(e){var n=e.value;return["p-rating-item",{"p-rating-item-active":n<=e.props.modelValue,"p-focus":n===e.instance.focusedOptionIndex}]},onIcon:"p-rating-icon",offIcon:"p-rating-icon"},loadStyle:p.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur"],data:function(){return{name:this.$attrs.name,focusedOptionIndex:-1}},watch:{"$attrs.name":function(e){this.name=e||o.UniqueComponentId()}},mounted:function(){this.name=this.name||o.UniqueComponentId()},methods:{getPTOptions:function(e,n){return this.ptm(e,{context:{active:n<=this.modelValue,focused:n===this.focusedOptionIndex}})},onOptionClick:function(e,n){if(!this.readonly&&!this.disabled){this.onOptionSelect(e,n);var t=o.DomHandler.getFirstFocusableElement(e.currentTarget);t&&o.DomHandler.focus(t)}},onFocus:function(e,n){this.focusedOptionIndex=n,this.$emit("focus",e)},onBlur:function(e){this.focusedOptionIndex=-1,this.$emit("blur",e)},onChange:function(e,n){this.onOptionSelect(e,n)},onOptionSelect:function(e,n){this.focusedOptionIndex=n,this.updateModel(e,n||null)},updateModel:function(e,n){this.$emit("update:modelValue",n),this.$emit("change",{originalEvent:e,value:n})},cancelAriaLabel:function(){return this.$primevue.config.locale.clear},starAriaLabel:function(e){return 1===e?this.$primevue.config.locale.aria.star:this.$primevue.config.locale.aria.stars.replace(/{star}/g,e)}},components:{StarFillIcon:u.default,StarIcon:s.default,BanIcon:r.default}},f=["data-p-focused"],g=["name","checked","disabled","readonly","aria-label"],I=["onClick","data-p-active","data-p-focused"],h=["value","name","checked","disabled","readonly","aria-label","onFocus","onChange"];m.render=function(e,n,t,o,a,c){return l.openBlock(),l.createElementBlock("div",l.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"rating"}),[e.cancel?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,class:e.cx("cancelItem"),onClick:n[3]||(n[3]=function(e){return c.onOptionClick(e,0)})},c.getPTOptions("cancelItem",0),{"data-p-focused":0===a.focusedOptionIndex}),[l.createElementVNode("span",l.mergeProps({class:"p-hidden-accessible"},e.ptm("hiddenCancelInputWrapper"),{"data-p-hidden-accessible":!0}),[l.createElementVNode("input",l.mergeProps({type:"radio",value:"0",name:a.name,checked:0===e.modelValue,disabled:e.disabled,readonly:e.readonly,"aria-label":c.cancelAriaLabel(),onFocus:n[0]||(n[0]=function(e){return c.onFocus(e,0)}),onBlur:n[1]||(n[1]=function(){return c.onBlur&&c.onBlur.apply(c,arguments)}),onChange:n[2]||(n[2]=function(e){return c.onChange(e,0)})},e.ptm("hiddenCancelInput")),null,16,g)],16),l.renderSlot(e.$slots,"cancelicon",{class:l.normalizeClass(e.cx("cancelIcon"))},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.cancelIcon?"span":"BanIcon"),l.mergeProps({class:[e.cx("cancelIcon"),e.cancelIcon]},e.ptm("cancelIcon")),null,16,["class"]))]}))],16,f)):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.stars,(function(t){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:t,class:e.cx("item",{value:t}),onClick:function(e){return c.onOptionClick(e,t)}},c.getPTOptions("item",t),{"data-p-active":t<=e.modelValue,"data-p-focused":t===a.focusedOptionIndex}),[l.createElementVNode("span",l.mergeProps({class:"p-hidden-accessible"},e.ptm("hiddenItemInputWrapper"),{"data-p-hidden-accessible":!0}),[l.createElementVNode("input",l.mergeProps({type:"radio",value:t,name:a.name,checked:e.modelValue===t,disabled:e.disabled,readonly:e.readonly,"aria-label":c.starAriaLabel(t),onFocus:function(e){return c.onFocus(e,t)},onBlur:n[4]||(n[4]=function(){return c.onBlur&&c.onBlur.apply(c,arguments)}),onChange:function(e){return c.onChange(e,t)}},e.ptm("hiddenItemInput")),null,16,h)],16),t<=e.modelValue?l.renderSlot(e.$slots,"onicon",{key:0,value:t,class:l.normalizeClass(e.cx("onIcon"))},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.onIcon?"span":"StarFillIcon"),l.mergeProps({class:[e.cx("onIcon"),e.onIcon]},e.ptm("onIcon")),null,16,["class"]))]})):l.renderSlot(e.$slots,"officon",{key:1,value:t,class:l.normalizeClass(e.cx("offIcon"))},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.offIcon?"span":"StarIcon"),l.mergeProps({class:[e.cx("offIcon"),e.offIcon]},e.ptm("offIcon")),null,16,["class"]))]}))],16,I)})),128))],16)},module.exports=m;
1
+ "use strict";var e=require("primevue/icons/ban"),n=require("primevue/icons/star"),t=require("primevue/icons/starfill"),o=require("primevue/utils"),a=require("primevue/basecomponent"),c=require("primevue/usestyle"),i=require("vue");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=l(e),s=l(n),u=l(t),d=l(a),p=c.useStyle("\n@layer primevue {\n .p-rating {\n position: relative;\n display: flex;\n align-items: center;\n }\n \n .p-rating-item {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n }\n \n .p-rating.p-readonly .p-rating-item {\n cursor: default;\n }\n}\n",{name:"rating",manual:!0}),m={name:"Rating",extends:{name:"BaseRating",extends:d.default,props:{modelValue:{type:Number,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},stars:{type:Number,default:5},cancel:{type:Boolean,default:!0},onIcon:{type:String,default:void 0},offIcon:{type:String,default:void 0},cancelIcon:{type:String,default:void 0}},css:{classes:{root:function(e){var n=e.props;return["p-rating",{"p-readonly":n.readonly,"p-disabled":n.disabled}]},cancelItem:function(e){var n=e.instance;return["p-rating-item p-rating-cancel-item",{"p-focus":0===n.focusedOptionIndex&&n.isFocusVisibleItem}]},cancelIcon:"p-rating-icon p-rating-cancel",item:function(e){var n=e.instance,t=e.value;return["p-rating-item",{"p-rating-item-active":t<=e.props.modelValue,"p-focus":t===n.focusedOptionIndex&&n.isFocusVisibleItem}]},onIcon:"p-rating-icon",offIcon:"p-rating-icon"},loadStyle:p.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur"],data:function(){return{name:this.$attrs.name,focusedOptionIndex:-1,isFocusVisibleItem:!0}},watch:{"$attrs.name":function(e){this.name=e||o.UniqueComponentId()}},mounted:function(){this.name=this.name||o.UniqueComponentId()},methods:{getPTOptions:function(e,n){return this.ptm(e,{context:{active:n<=this.modelValue,focused:n===this.focusedOptionIndex}})},onOptionClick:function(e,n){if(!this.readonly&&!this.disabled){this.onOptionSelect(e,n),this.isFocusVisibleItem=!1;var t=o.DomHandler.getFirstFocusableElement(e.currentTarget);t&&o.DomHandler.focus(t)}},onFocus:function(e,n){this.focusedOptionIndex=n,this.$emit("focus",e)},onBlur:function(e){this.focusedOptionIndex=-1,this.$emit("blur",e)},onChange:function(e,n){this.onOptionSelect(e,n),this.isFocusVisibleItem=!0},onOptionSelect:function(e,n){this.focusedOptionIndex=n,this.updateModel(e,n||null)},updateModel:function(e,n){this.$emit("update:modelValue",n),this.$emit("change",{originalEvent:e,value:n})},cancelAriaLabel:function(){return this.$primevue.config.locale.clear},starAriaLabel:function(e){return 1===e?this.$primevue.config.locale.aria.star:this.$primevue.config.locale.aria.stars.replace(/{star}/g,e)}},components:{StarFillIcon:u.default,StarIcon:s.default,BanIcon:r.default}},f=["data-p-focused"],I=["name","checked","disabled","readonly","aria-label"],g=["onClick","data-p-active","data-p-focused"],h=["value","name","checked","disabled","readonly","aria-label","onFocus","onChange"];m.render=function(e,n,t,o,a,c){return i.openBlock(),i.createElementBlock("div",i.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"rating"}),[e.cancel?(i.openBlock(),i.createElementBlock("div",i.mergeProps({key:0,class:e.cx("cancelItem"),onClick:n[3]||(n[3]=function(e){return c.onOptionClick(e,0)})},c.getPTOptions("cancelItem",0),{"data-p-focused":0===a.focusedOptionIndex}),[i.createElementVNode("span",i.mergeProps({class:"p-hidden-accessible"},e.ptm("hiddenCancelInputWrapper"),{"data-p-hidden-accessible":!0}),[i.createElementVNode("input",i.mergeProps({type:"radio",value:"0",name:a.name,checked:0===e.modelValue,disabled:e.disabled,readonly:e.readonly,"aria-label":c.cancelAriaLabel(),onFocus:n[0]||(n[0]=function(e){return c.onFocus(e,0)}),onBlur:n[1]||(n[1]=function(){return c.onBlur&&c.onBlur.apply(c,arguments)}),onChange:n[2]||(n[2]=function(e){return c.onChange(e,0)})},e.ptm("hiddenCancelInput")),null,16,I)],16),i.renderSlot(e.$slots,"cancelicon",{class:i.normalizeClass(e.cx("cancelIcon"))},(function(){return[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(e.cancelIcon?"span":"BanIcon"),i.mergeProps({class:[e.cx("cancelIcon"),e.cancelIcon]},e.ptm("cancelIcon")),null,16,["class"]))]}))],16,f)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.stars,(function(t){return i.openBlock(),i.createElementBlock("div",i.mergeProps({key:t,class:e.cx("item",{value:t}),onClick:function(e){return c.onOptionClick(e,t)}},c.getPTOptions("item",t),{"data-p-active":t<=e.modelValue,"data-p-focused":t===a.focusedOptionIndex}),[i.createElementVNode("span",i.mergeProps({class:"p-hidden-accessible"},e.ptm("hiddenItemInputWrapper"),{"data-p-hidden-accessible":!0}),[i.createElementVNode("input",i.mergeProps({type:"radio",value:t,name:a.name,checked:e.modelValue===t,disabled:e.disabled,readonly:e.readonly,"aria-label":c.starAriaLabel(t),onFocus:function(e){return c.onFocus(e,t)},onBlur:n[4]||(n[4]=function(){return c.onBlur&&c.onBlur.apply(c,arguments)}),onChange:function(e){return c.onChange(e,t)}},e.ptm("hiddenItemInput")),null,16,h)],16),t<=e.modelValue?i.renderSlot(e.$slots,"onicon",{key:0,value:t,class:i.normalizeClass(e.cx("onIcon"))},(function(){return[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(e.onIcon?"span":"StarFillIcon"),i.mergeProps({class:[e.cx("onIcon"),e.onIcon]},e.ptm("onIcon")),null,16,["class"]))]})):i.renderSlot(e.$slots,"officon",{key:1,value:t,class:i.normalizeClass(e.cx("offIcon"))},(function(){return[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(e.offIcon?"span":"StarIcon"),i.mergeProps({class:[e.cx("offIcon"),e.offIcon]},e.ptm("offIcon")),null,16,["class"]))]}))],16,g)})),128))],16)},module.exports=m;
@@ -6,7 +6,7 @@ import BaseComponent from 'primevue/basecomponent';
6
6
  import { useStyle } from 'primevue/usestyle';
7
7
  import { openBlock, createElementBlock, mergeProps, createElementVNode, renderSlot, normalizeClass, createBlock, resolveDynamicComponent, createCommentVNode, Fragment, renderList } from 'vue';
8
8
 
9
- var styles = "\n.p-rating {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.p-rating-item {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n}\n\n.p-rating.p-readonly .p-rating-item {\n cursor: default;\n}\n";
9
+ var styles = "\n@layer primevue {\n .p-rating {\n position: relative;\n display: flex;\n align-items: center;\n }\n \n .p-rating-item {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n }\n \n .p-rating.p-readonly .p-rating-item {\n cursor: default;\n }\n}\n";
10
10
  var classes = {
11
11
  root: function root(_ref) {
12
12
  var props = _ref.props;
@@ -18,7 +18,7 @@ var classes = {
18
18
  cancelItem: function cancelItem(_ref2) {
19
19
  var instance = _ref2.instance;
20
20
  return ['p-rating-item p-rating-cancel-item', {
21
- 'p-focus': instance.focusedOptionIndex === 0
21
+ 'p-focus': instance.focusedOptionIndex === 0 && instance.isFocusVisibleItem
22
22
  }];
23
23
  },
24
24
  cancelIcon: 'p-rating-icon p-rating-cancel',
@@ -28,7 +28,7 @@ var classes = {
28
28
  value = _ref3.value;
29
29
  return ['p-rating-item', {
30
30
  'p-rating-item-active': value <= props.modelValue,
31
- 'p-focus': value === instance.focusedOptionIndex
31
+ 'p-focus': value === instance.focusedOptionIndex && instance.isFocusVisibleItem
32
32
  }];
33
33
  },
34
34
  onIcon: 'p-rating-icon',
@@ -39,7 +39,6 @@ var _useStyle = useStyle(styles, {
39
39
  manual: true
40
40
  }),
41
41
  loadStyle = _useStyle.load;
42
- _useStyle.unload;
43
42
  var script$1 = {
44
43
  name: 'BaseRating',
45
44
  "extends": BaseComponent,
@@ -95,7 +94,8 @@ var script = {
95
94
  data: function data() {
96
95
  return {
97
96
  name: this.$attrs.name,
98
- focusedOptionIndex: -1
97
+ focusedOptionIndex: -1,
98
+ isFocusVisibleItem: true
99
99
  };
100
100
  },
101
101
  watch: {
@@ -118,6 +118,7 @@ var script = {
118
118
  onOptionClick: function onOptionClick(event, value) {
119
119
  if (!this.readonly && !this.disabled) {
120
120
  this.onOptionSelect(event, value);
121
+ this.isFocusVisibleItem = false;
121
122
  var firstFocusableEl = DomHandler.getFirstFocusableElement(event.currentTarget);
122
123
  firstFocusableEl && DomHandler.focus(firstFocusableEl);
123
124
  }
@@ -132,6 +133,7 @@ var script = {
132
133
  },
133
134
  onChange: function onChange(event, value) {
134
135
  this.onOptionSelect(event, value);
136
+ this.isFocusVisibleItem = true;
135
137
  },
136
138
  onOptionSelect: function onOptionSelect(event, value) {
137
139
  this.focusedOptionIndex = value;
@@ -1 +1 @@
1
- import n from"primevue/icons/ban";import e from"primevue/icons/star";import t from"primevue/icons/starfill";import{UniqueComponentId as a,DomHandler as o}from"primevue/utils";import i from"primevue/basecomponent";import{useStyle as c}from"primevue/usestyle";import{openBlock as l,createElementBlock as r,mergeProps as s,createElementVNode as u,renderSlot as d,normalizeClass as p,createBlock as f,resolveDynamicComponent as m,createCommentVNode as I,Fragment as h,renderList as g}from"vue";var v=c("\n.p-rating {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.p-rating-item {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n}\n\n.p-rating.p-readonly .p-rating-item {\n cursor: default;\n}\n",{name:"rating",manual:!0}),y={name:"Rating",extends:{name:"BaseRating",extends:i,props:{modelValue:{type:Number,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},stars:{type:Number,default:5},cancel:{type:Boolean,default:!0},onIcon:{type:String,default:void 0},offIcon:{type:String,default:void 0},cancelIcon:{type:String,default:void 0}},css:{classes:{root:function(n){var e=n.props;return["p-rating",{"p-readonly":e.readonly,"p-disabled":e.disabled}]},cancelItem:function(n){return["p-rating-item p-rating-cancel-item",{"p-focus":0===n.instance.focusedOptionIndex}]},cancelIcon:"p-rating-icon p-rating-cancel",item:function(n){var e=n.value;return["p-rating-item",{"p-rating-item-active":e<=n.props.modelValue,"p-focus":e===n.instance.focusedOptionIndex}]},onIcon:"p-rating-icon",offIcon:"p-rating-icon"},loadStyle:v.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur"],data:function(){return{name:this.$attrs.name,focusedOptionIndex:-1}},watch:{"$attrs.name":function(n){this.name=n||a()}},mounted:function(){this.name=this.name||a()},methods:{getPTOptions:function(n,e){return this.ptm(n,{context:{active:e<=this.modelValue,focused:e===this.focusedOptionIndex}})},onOptionClick:function(n,e){if(!this.readonly&&!this.disabled){this.onOptionSelect(n,e);var t=o.getFirstFocusableElement(n.currentTarget);t&&o.focus(t)}},onFocus:function(n,e){this.focusedOptionIndex=e,this.$emit("focus",n)},onBlur:function(n){this.focusedOptionIndex=-1,this.$emit("blur",n)},onChange:function(n,e){this.onOptionSelect(n,e)},onOptionSelect:function(n,e){this.focusedOptionIndex=e,this.updateModel(n,e||null)},updateModel:function(n,e){this.$emit("update:modelValue",e),this.$emit("change",{originalEvent:n,value:e})},cancelAriaLabel:function(){return this.$primevue.config.locale.clear},starAriaLabel:function(n){return 1===n?this.$primevue.config.locale.aria.star:this.$primevue.config.locale.aria.stars.replace(/{star}/g,n)}},components:{StarFillIcon:t,StarIcon:e,BanIcon:n}},b=["data-p-focused"],x=["name","checked","disabled","readonly","aria-label"],O=["onClick","data-p-active","data-p-focused"],k=["value","name","checked","disabled","readonly","aria-label","onFocus","onChange"];y.render=function(n,e,t,a,o,i){return l(),r("div",s({class:n.cx("root")},n.ptm("root"),{"data-pc-name":"rating"}),[n.cancel?(l(),r("div",s({key:0,class:n.cx("cancelItem"),onClick:e[3]||(e[3]=function(n){return i.onOptionClick(n,0)})},i.getPTOptions("cancelItem",0),{"data-p-focused":0===o.focusedOptionIndex}),[u("span",s({class:"p-hidden-accessible"},n.ptm("hiddenCancelInputWrapper"),{"data-p-hidden-accessible":!0}),[u("input",s({type:"radio",value:"0",name:o.name,checked:0===n.modelValue,disabled:n.disabled,readonly:n.readonly,"aria-label":i.cancelAriaLabel(),onFocus:e[0]||(e[0]=function(n){return i.onFocus(n,0)}),onBlur:e[1]||(e[1]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)}),onChange:e[2]||(e[2]=function(n){return i.onChange(n,0)})},n.ptm("hiddenCancelInput")),null,16,x)],16),d(n.$slots,"cancelicon",{class:p(n.cx("cancelIcon"))},(function(){return[(l(),f(m(n.cancelIcon?"span":"BanIcon"),s({class:[n.cx("cancelIcon"),n.cancelIcon]},n.ptm("cancelIcon")),null,16,["class"]))]}))],16,b)):I("",!0),(l(!0),r(h,null,g(n.stars,(function(t){return l(),r("div",s({key:t,class:n.cx("item",{value:t}),onClick:function(n){return i.onOptionClick(n,t)}},i.getPTOptions("item",t),{"data-p-active":t<=n.modelValue,"data-p-focused":t===o.focusedOptionIndex}),[u("span",s({class:"p-hidden-accessible"},n.ptm("hiddenItemInputWrapper"),{"data-p-hidden-accessible":!0}),[u("input",s({type:"radio",value:t,name:o.name,checked:n.modelValue===t,disabled:n.disabled,readonly:n.readonly,"aria-label":i.starAriaLabel(t),onFocus:function(n){return i.onFocus(n,t)},onBlur:e[4]||(e[4]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)}),onChange:function(n){return i.onChange(n,t)}},n.ptm("hiddenItemInput")),null,16,k)],16),t<=n.modelValue?d(n.$slots,"onicon",{key:0,value:t,class:p(n.cx("onIcon"))},(function(){return[(l(),f(m(n.onIcon?"span":"StarFillIcon"),s({class:[n.cx("onIcon"),n.onIcon]},n.ptm("onIcon")),null,16,["class"]))]})):d(n.$slots,"officon",{key:1,value:t,class:p(n.cx("offIcon"))},(function(){return[(l(),f(m(n.offIcon?"span":"StarIcon"),s({class:[n.cx("offIcon"),n.offIcon]},n.ptm("offIcon")),null,16,["class"]))]}))],16,O)})),128))],16)};export{y as default};
1
+ import n from"primevue/icons/ban";import e from"primevue/icons/star";import t from"primevue/icons/starfill";import{UniqueComponentId as a,DomHandler as o}from"primevue/utils";import i from"primevue/basecomponent";import{useStyle as c}from"primevue/usestyle";import{openBlock as l,createElementBlock as s,mergeProps as r,createElementVNode as u,renderSlot as d,normalizeClass as p,createBlock as m,resolveDynamicComponent as f,createCommentVNode as I,Fragment as h,renderList as g}from"vue";var v=c("\n@layer primevue {\n .p-rating {\n position: relative;\n display: flex;\n align-items: center;\n }\n \n .p-rating-item {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n }\n \n .p-rating.p-readonly .p-rating-item {\n cursor: default;\n }\n}\n",{name:"rating",manual:!0}),b={name:"Rating",extends:{name:"BaseRating",extends:i,props:{modelValue:{type:Number,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},stars:{type:Number,default:5},cancel:{type:Boolean,default:!0},onIcon:{type:String,default:void 0},offIcon:{type:String,default:void 0},cancelIcon:{type:String,default:void 0}},css:{classes:{root:function(n){var e=n.props;return["p-rating",{"p-readonly":e.readonly,"p-disabled":e.disabled}]},cancelItem:function(n){var e=n.instance;return["p-rating-item p-rating-cancel-item",{"p-focus":0===e.focusedOptionIndex&&e.isFocusVisibleItem}]},cancelIcon:"p-rating-icon p-rating-cancel",item:function(n){var e=n.instance,t=n.value;return["p-rating-item",{"p-rating-item-active":t<=n.props.modelValue,"p-focus":t===e.focusedOptionIndex&&e.isFocusVisibleItem}]},onIcon:"p-rating-icon",offIcon:"p-rating-icon"},loadStyle:v.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur"],data:function(){return{name:this.$attrs.name,focusedOptionIndex:-1,isFocusVisibleItem:!0}},watch:{"$attrs.name":function(n){this.name=n||a()}},mounted:function(){this.name=this.name||a()},methods:{getPTOptions:function(n,e){return this.ptm(n,{context:{active:e<=this.modelValue,focused:e===this.focusedOptionIndex}})},onOptionClick:function(n,e){if(!this.readonly&&!this.disabled){this.onOptionSelect(n,e),this.isFocusVisibleItem=!1;var t=o.getFirstFocusableElement(n.currentTarget);t&&o.focus(t)}},onFocus:function(n,e){this.focusedOptionIndex=e,this.$emit("focus",n)},onBlur:function(n){this.focusedOptionIndex=-1,this.$emit("blur",n)},onChange:function(n,e){this.onOptionSelect(n,e),this.isFocusVisibleItem=!0},onOptionSelect:function(n,e){this.focusedOptionIndex=e,this.updateModel(n,e||null)},updateModel:function(n,e){this.$emit("update:modelValue",e),this.$emit("change",{originalEvent:n,value:e})},cancelAriaLabel:function(){return this.$primevue.config.locale.clear},starAriaLabel:function(n){return 1===n?this.$primevue.config.locale.aria.star:this.$primevue.config.locale.aria.stars.replace(/{star}/g,n)}},components:{StarFillIcon:t,StarIcon:e,BanIcon:n}},y=["data-p-focused"],x=["name","checked","disabled","readonly","aria-label"],O=["onClick","data-p-active","data-p-focused"],F=["value","name","checked","disabled","readonly","aria-label","onFocus","onChange"];b.render=function(n,e,t,a,o,i){return l(),s("div",r({class:n.cx("root")},n.ptm("root"),{"data-pc-name":"rating"}),[n.cancel?(l(),s("div",r({key:0,class:n.cx("cancelItem"),onClick:e[3]||(e[3]=function(n){return i.onOptionClick(n,0)})},i.getPTOptions("cancelItem",0),{"data-p-focused":0===o.focusedOptionIndex}),[u("span",r({class:"p-hidden-accessible"},n.ptm("hiddenCancelInputWrapper"),{"data-p-hidden-accessible":!0}),[u("input",r({type:"radio",value:"0",name:o.name,checked:0===n.modelValue,disabled:n.disabled,readonly:n.readonly,"aria-label":i.cancelAriaLabel(),onFocus:e[0]||(e[0]=function(n){return i.onFocus(n,0)}),onBlur:e[1]||(e[1]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)}),onChange:e[2]||(e[2]=function(n){return i.onChange(n,0)})},n.ptm("hiddenCancelInput")),null,16,x)],16),d(n.$slots,"cancelicon",{class:p(n.cx("cancelIcon"))},(function(){return[(l(),m(f(n.cancelIcon?"span":"BanIcon"),r({class:[n.cx("cancelIcon"),n.cancelIcon]},n.ptm("cancelIcon")),null,16,["class"]))]}))],16,y)):I("",!0),(l(!0),s(h,null,g(n.stars,(function(t){return l(),s("div",r({key:t,class:n.cx("item",{value:t}),onClick:function(n){return i.onOptionClick(n,t)}},i.getPTOptions("item",t),{"data-p-active":t<=n.modelValue,"data-p-focused":t===o.focusedOptionIndex}),[u("span",r({class:"p-hidden-accessible"},n.ptm("hiddenItemInputWrapper"),{"data-p-hidden-accessible":!0}),[u("input",r({type:"radio",value:t,name:o.name,checked:n.modelValue===t,disabled:n.disabled,readonly:n.readonly,"aria-label":i.starAriaLabel(t),onFocus:function(n){return i.onFocus(n,t)},onBlur:e[4]||(e[4]=function(){return i.onBlur&&i.onBlur.apply(i,arguments)}),onChange:function(n){return i.onChange(n,t)}},n.ptm("hiddenItemInput")),null,16,F)],16),t<=n.modelValue?d(n.$slots,"onicon",{key:0,value:t,class:p(n.cx("onIcon"))},(function(){return[(l(),m(f(n.onIcon?"span":"StarFillIcon"),r({class:[n.cx("onIcon"),n.onIcon]},n.ptm("onIcon")),null,16,["class"]))]})):d(n.$slots,"officon",{key:1,value:t,class:p(n.cx("offIcon"))},(function(){return[(l(),m(f(n.offIcon?"span":"StarIcon"),r({class:[n.cx("offIcon"),n.offIcon]},n.ptm("offIcon")),null,16,["class"]))]}))],16,O)})),128))],16)};export{b as default};
package/rating/rating.js CHANGED
@@ -9,7 +9,7 @@ this.primevue.rating = (function (BanIcon, StarIcon, StarFillIcon, utils, BaseCo
9
9
  var StarFillIcon__default = /*#__PURE__*/_interopDefaultLegacy(StarFillIcon);
10
10
  var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
11
11
 
12
- var styles = "\n.p-rating {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.p-rating-item {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n}\n\n.p-rating.p-readonly .p-rating-item {\n cursor: default;\n}\n";
12
+ var styles = "\n@layer primevue {\n .p-rating {\n position: relative;\n display: flex;\n align-items: center;\n }\n \n .p-rating-item {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n }\n \n .p-rating.p-readonly .p-rating-item {\n cursor: default;\n }\n}\n";
13
13
  var classes = {
14
14
  root: function root(_ref) {
15
15
  var props = _ref.props;
@@ -21,7 +21,7 @@ this.primevue.rating = (function (BanIcon, StarIcon, StarFillIcon, utils, BaseCo
21
21
  cancelItem: function cancelItem(_ref2) {
22
22
  var instance = _ref2.instance;
23
23
  return ['p-rating-item p-rating-cancel-item', {
24
- 'p-focus': instance.focusedOptionIndex === 0
24
+ 'p-focus': instance.focusedOptionIndex === 0 && instance.isFocusVisibleItem
25
25
  }];
26
26
  },
27
27
  cancelIcon: 'p-rating-icon p-rating-cancel',
@@ -31,7 +31,7 @@ this.primevue.rating = (function (BanIcon, StarIcon, StarFillIcon, utils, BaseCo
31
31
  value = _ref3.value;
32
32
  return ['p-rating-item', {
33
33
  'p-rating-item-active': value <= props.modelValue,
34
- 'p-focus': value === instance.focusedOptionIndex
34
+ 'p-focus': value === instance.focusedOptionIndex && instance.isFocusVisibleItem
35
35
  }];
36
36
  },
37
37
  onIcon: 'p-rating-icon',
@@ -42,7 +42,6 @@ this.primevue.rating = (function (BanIcon, StarIcon, StarFillIcon, utils, BaseCo
42
42
  manual: true
43
43
  }),
44
44
  loadStyle = _useStyle.load;
45
- _useStyle.unload;
46
45
  var script$1 = {
47
46
  name: 'BaseRating',
48
47
  "extends": BaseComponent__default["default"],
@@ -98,7 +97,8 @@ this.primevue.rating = (function (BanIcon, StarIcon, StarFillIcon, utils, BaseCo
98
97
  data: function data() {
99
98
  return {
100
99
  name: this.$attrs.name,
101
- focusedOptionIndex: -1
100
+ focusedOptionIndex: -1,
101
+ isFocusVisibleItem: true
102
102
  };
103
103
  },
104
104
  watch: {
@@ -121,6 +121,7 @@ this.primevue.rating = (function (BanIcon, StarIcon, StarFillIcon, utils, BaseCo
121
121
  onOptionClick: function onOptionClick(event, value) {
122
122
  if (!this.readonly && !this.disabled) {
123
123
  this.onOptionSelect(event, value);
124
+ this.isFocusVisibleItem = false;
124
125
  var firstFocusableEl = utils.DomHandler.getFirstFocusableElement(event.currentTarget);
125
126
  firstFocusableEl && utils.DomHandler.focus(firstFocusableEl);
126
127
  }
@@ -135,6 +136,7 @@ this.primevue.rating = (function (BanIcon, StarIcon, StarFillIcon, utils, BaseCo
135
136
  },
136
137
  onChange: function onChange(event, value) {
137
138
  this.onOptionSelect(event, value);
139
+ this.isFocusVisibleItem = true;
138
140
  },
139
141
  onOptionSelect: function onOptionSelect(event, value) {
140
142
  this.focusedOptionIndex = value;
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.rating=function(e,n,t,o,a,c,l){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=i(e),s=i(n),u=i(t),d=i(a),p=c.useStyle("\n.p-rating {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.p-rating-item {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n}\n\n.p-rating.p-readonly .p-rating-item {\n cursor: default;\n}\n",{name:"rating",manual:!0}),m={name:"Rating",extends:{name:"BaseRating",extends:d.default,props:{modelValue:{type:Number,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},stars:{type:Number,default:5},cancel:{type:Boolean,default:!0},onIcon:{type:String,default:void 0},offIcon:{type:String,default:void 0},cancelIcon:{type:String,default:void 0}},css:{classes:{root:function(e){var n=e.props;return["p-rating",{"p-readonly":n.readonly,"p-disabled":n.disabled}]},cancelItem:function(e){return["p-rating-item p-rating-cancel-item",{"p-focus":0===e.instance.focusedOptionIndex}]},cancelIcon:"p-rating-icon p-rating-cancel",item:function(e){var n=e.value;return["p-rating-item",{"p-rating-item-active":n<=e.props.modelValue,"p-focus":n===e.instance.focusedOptionIndex}]},onIcon:"p-rating-icon",offIcon:"p-rating-icon"},loadStyle:p.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur"],data:function(){return{name:this.$attrs.name,focusedOptionIndex:-1}},watch:{"$attrs.name":function(e){this.name=e||o.UniqueComponentId()}},mounted:function(){this.name=this.name||o.UniqueComponentId()},methods:{getPTOptions:function(e,n){return this.ptm(e,{context:{active:n<=this.modelValue,focused:n===this.focusedOptionIndex}})},onOptionClick:function(e,n){if(!this.readonly&&!this.disabled){this.onOptionSelect(e,n);var t=o.DomHandler.getFirstFocusableElement(e.currentTarget);t&&o.DomHandler.focus(t)}},onFocus:function(e,n){this.focusedOptionIndex=n,this.$emit("focus",e)},onBlur:function(e){this.focusedOptionIndex=-1,this.$emit("blur",e)},onChange:function(e,n){this.onOptionSelect(e,n)},onOptionSelect:function(e,n){this.focusedOptionIndex=n,this.updateModel(e,n||null)},updateModel:function(e,n){this.$emit("update:modelValue",n),this.$emit("change",{originalEvent:e,value:n})},cancelAriaLabel:function(){return this.$primevue.config.locale.clear},starAriaLabel:function(e){return 1===e?this.$primevue.config.locale.aria.star:this.$primevue.config.locale.aria.stars.replace(/{star}/g,e)}},components:{StarFillIcon:u.default,StarIcon:s.default,BanIcon:r.default}},f=["data-p-focused"],g=["name","checked","disabled","readonly","aria-label"],h=["onClick","data-p-active","data-p-focused"],I=["value","name","checked","disabled","readonly","aria-label","onFocus","onChange"];return m.render=function(e,n,t,o,a,c){return l.openBlock(),l.createElementBlock("div",l.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"rating"}),[e.cancel?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,class:e.cx("cancelItem"),onClick:n[3]||(n[3]=function(e){return c.onOptionClick(e,0)})},c.getPTOptions("cancelItem",0),{"data-p-focused":0===a.focusedOptionIndex}),[l.createElementVNode("span",l.mergeProps({class:"p-hidden-accessible"},e.ptm("hiddenCancelInputWrapper"),{"data-p-hidden-accessible":!0}),[l.createElementVNode("input",l.mergeProps({type:"radio",value:"0",name:a.name,checked:0===e.modelValue,disabled:e.disabled,readonly:e.readonly,"aria-label":c.cancelAriaLabel(),onFocus:n[0]||(n[0]=function(e){return c.onFocus(e,0)}),onBlur:n[1]||(n[1]=function(){return c.onBlur&&c.onBlur.apply(c,arguments)}),onChange:n[2]||(n[2]=function(e){return c.onChange(e,0)})},e.ptm("hiddenCancelInput")),null,16,g)],16),l.renderSlot(e.$slots,"cancelicon",{class:l.normalizeClass(e.cx("cancelIcon"))},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.cancelIcon?"span":"BanIcon"),l.mergeProps({class:[e.cx("cancelIcon"),e.cancelIcon]},e.ptm("cancelIcon")),null,16,["class"]))]}))],16,f)):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.stars,(function(t){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:t,class:e.cx("item",{value:t}),onClick:function(e){return c.onOptionClick(e,t)}},c.getPTOptions("item",t),{"data-p-active":t<=e.modelValue,"data-p-focused":t===a.focusedOptionIndex}),[l.createElementVNode("span",l.mergeProps({class:"p-hidden-accessible"},e.ptm("hiddenItemInputWrapper"),{"data-p-hidden-accessible":!0}),[l.createElementVNode("input",l.mergeProps({type:"radio",value:t,name:a.name,checked:e.modelValue===t,disabled:e.disabled,readonly:e.readonly,"aria-label":c.starAriaLabel(t),onFocus:function(e){return c.onFocus(e,t)},onBlur:n[4]||(n[4]=function(){return c.onBlur&&c.onBlur.apply(c,arguments)}),onChange:function(e){return c.onChange(e,t)}},e.ptm("hiddenItemInput")),null,16,I)],16),t<=e.modelValue?l.renderSlot(e.$slots,"onicon",{key:0,value:t,class:l.normalizeClass(e.cx("onIcon"))},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.onIcon?"span":"StarFillIcon"),l.mergeProps({class:[e.cx("onIcon"),e.onIcon]},e.ptm("onIcon")),null,16,["class"]))]})):l.renderSlot(e.$slots,"officon",{key:1,value:t,class:l.normalizeClass(e.cx("offIcon"))},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.offIcon?"span":"StarIcon"),l.mergeProps({class:[e.cx("offIcon"),e.offIcon]},e.ptm("offIcon")),null,16,["class"]))]}))],16,h)})),128))],16)},m}(primevue.icons.ban,primevue.icons.star,primevue.icons.starfill,primevue.utils,primevue.basecomponent,primevue.usestyle,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.rating=function(e,n,t,o,a,c,i){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=l(e),s=l(n),u=l(t),d=l(a),p=c.useStyle("\n@layer primevue {\n .p-rating {\n position: relative;\n display: flex;\n align-items: center;\n }\n \n .p-rating-item {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n }\n \n .p-rating.p-readonly .p-rating-item {\n cursor: default;\n }\n}\n",{name:"rating",manual:!0}),m={name:"Rating",extends:{name:"BaseRating",extends:d.default,props:{modelValue:{type:Number,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},stars:{type:Number,default:5},cancel:{type:Boolean,default:!0},onIcon:{type:String,default:void 0},offIcon:{type:String,default:void 0},cancelIcon:{type:String,default:void 0}},css:{classes:{root:function(e){var n=e.props;return["p-rating",{"p-readonly":n.readonly,"p-disabled":n.disabled}]},cancelItem:function(e){var n=e.instance;return["p-rating-item p-rating-cancel-item",{"p-focus":0===n.focusedOptionIndex&&n.isFocusVisibleItem}]},cancelIcon:"p-rating-icon p-rating-cancel",item:function(e){var n=e.instance,t=e.value;return["p-rating-item",{"p-rating-item-active":t<=e.props.modelValue,"p-focus":t===n.focusedOptionIndex&&n.isFocusVisibleItem}]},onIcon:"p-rating-icon",offIcon:"p-rating-icon"},loadStyle:p.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur"],data:function(){return{name:this.$attrs.name,focusedOptionIndex:-1,isFocusVisibleItem:!0}},watch:{"$attrs.name":function(e){this.name=e||o.UniqueComponentId()}},mounted:function(){this.name=this.name||o.UniqueComponentId()},methods:{getPTOptions:function(e,n){return this.ptm(e,{context:{active:n<=this.modelValue,focused:n===this.focusedOptionIndex}})},onOptionClick:function(e,n){if(!this.readonly&&!this.disabled){this.onOptionSelect(e,n),this.isFocusVisibleItem=!1;var t=o.DomHandler.getFirstFocusableElement(e.currentTarget);t&&o.DomHandler.focus(t)}},onFocus:function(e,n){this.focusedOptionIndex=n,this.$emit("focus",e)},onBlur:function(e){this.focusedOptionIndex=-1,this.$emit("blur",e)},onChange:function(e,n){this.onOptionSelect(e,n),this.isFocusVisibleItem=!0},onOptionSelect:function(e,n){this.focusedOptionIndex=n,this.updateModel(e,n||null)},updateModel:function(e,n){this.$emit("update:modelValue",n),this.$emit("change",{originalEvent:e,value:n})},cancelAriaLabel:function(){return this.$primevue.config.locale.clear},starAriaLabel:function(e){return 1===e?this.$primevue.config.locale.aria.star:this.$primevue.config.locale.aria.stars.replace(/{star}/g,e)}},components:{StarFillIcon:u.default,StarIcon:s.default,BanIcon:r.default}},f=["data-p-focused"],I=["name","checked","disabled","readonly","aria-label"],g=["onClick","data-p-active","data-p-focused"],h=["value","name","checked","disabled","readonly","aria-label","onFocus","onChange"];return m.render=function(e,n,t,o,a,c){return i.openBlock(),i.createElementBlock("div",i.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"rating"}),[e.cancel?(i.openBlock(),i.createElementBlock("div",i.mergeProps({key:0,class:e.cx("cancelItem"),onClick:n[3]||(n[3]=function(e){return c.onOptionClick(e,0)})},c.getPTOptions("cancelItem",0),{"data-p-focused":0===a.focusedOptionIndex}),[i.createElementVNode("span",i.mergeProps({class:"p-hidden-accessible"},e.ptm("hiddenCancelInputWrapper"),{"data-p-hidden-accessible":!0}),[i.createElementVNode("input",i.mergeProps({type:"radio",value:"0",name:a.name,checked:0===e.modelValue,disabled:e.disabled,readonly:e.readonly,"aria-label":c.cancelAriaLabel(),onFocus:n[0]||(n[0]=function(e){return c.onFocus(e,0)}),onBlur:n[1]||(n[1]=function(){return c.onBlur&&c.onBlur.apply(c,arguments)}),onChange:n[2]||(n[2]=function(e){return c.onChange(e,0)})},e.ptm("hiddenCancelInput")),null,16,I)],16),i.renderSlot(e.$slots,"cancelicon",{class:i.normalizeClass(e.cx("cancelIcon"))},(function(){return[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(e.cancelIcon?"span":"BanIcon"),i.mergeProps({class:[e.cx("cancelIcon"),e.cancelIcon]},e.ptm("cancelIcon")),null,16,["class"]))]}))],16,f)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.stars,(function(t){return i.openBlock(),i.createElementBlock("div",i.mergeProps({key:t,class:e.cx("item",{value:t}),onClick:function(e){return c.onOptionClick(e,t)}},c.getPTOptions("item",t),{"data-p-active":t<=e.modelValue,"data-p-focused":t===a.focusedOptionIndex}),[i.createElementVNode("span",i.mergeProps({class:"p-hidden-accessible"},e.ptm("hiddenItemInputWrapper"),{"data-p-hidden-accessible":!0}),[i.createElementVNode("input",i.mergeProps({type:"radio",value:t,name:a.name,checked:e.modelValue===t,disabled:e.disabled,readonly:e.readonly,"aria-label":c.starAriaLabel(t),onFocus:function(e){return c.onFocus(e,t)},onBlur:n[4]||(n[4]=function(){return c.onBlur&&c.onBlur.apply(c,arguments)}),onChange:function(e){return c.onChange(e,t)}},e.ptm("hiddenItemInput")),null,16,h)],16),t<=e.modelValue?i.renderSlot(e.$slots,"onicon",{key:0,value:t,class:i.normalizeClass(e.cx("onIcon"))},(function(){return[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(e.onIcon?"span":"StarFillIcon"),i.mergeProps({class:[e.cx("onIcon"),e.onIcon]},e.ptm("onIcon")),null,16,["class"]))]})):i.renderSlot(e.$slots,"officon",{key:1,value:t,class:i.normalizeClass(e.cx("offIcon"))},(function(){return[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(e.offIcon?"span":"StarIcon"),i.mergeProps({class:[e.cx("offIcon"),e.offIcon]},e.ptm("offIcon")),null,16,["class"]))]}))],16,g)})),128))],16)},m}(primevue.icons.ban,primevue.icons.star,primevue.icons.starfill,primevue.utils,primevue.basecomponent,primevue.usestyle,Vue);