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
- import t from"primevue/basecomponent";import{useStyle as e}from"primevue/usestyle";import{openBlock as n,createElementBlock as r,mergeProps as i,createElementVNode as o}from"vue";var a=e("\n.p-chart {\n position: relative;\n}\n",{name:"chart",manual:!0}),c={name:"Chart",extends:{name:"BaseChart",extends:t,props:{type:String,data:null,options:null,plugins:null,width:{type:Number,default:300},height:{type:Number,default:150},canvasProps:{type:null,default:null}},css:{classes:{root:"p-chart"},loadStyle:a.load},provide:function(){return{$parentInstance:this}}},emits:["select","loaded"],chart:null,watch:{data:{handler:function(){this.reinit()},deep:!0},type:function(){this.reinit()},options:function(){this.reinit()}},mounted:function(){this.initChart()},beforeUnmount:function(){this.chart&&(this.chart.destroy(),this.chart=null)},methods:{initChart:function(){var t=this;import("chart.js/auto").then((function(e){t.chart&&(t.chart.destroy(),t.chart=null),e&&e.default&&(t.chart=new e.default(t.$refs.canvas,{type:t.type,data:t.data,options:t.options,plugins:t.plugins})),t.$emit("loaded",t.chart)}))},getCanvas:function(){return this.$canvas},getChart:function(){return this.chart},getBase64Image:function(){return this.chart.toBase64Image()},refresh:function(){this.chart&&this.chart.update()},reinit:function(){this.initChart()},onCanvasClick:function(t){if(this.chart){var e=this.chart.getElementsAtEventForMode(t,"nearest",{intersect:!0},!1),n=this.chart.getElementsAtEventForMode(t,"dataset",{intersect:!0},!1);e&&e[0]&&n&&this.$emit("select",{originalEvent:t,element:e[0],dataset:n})}},generateLegend:function(){if(this.chart)return this.chart.generateLegend()}}};function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){h(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function h(t,e,n){return(e=f(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(t){var e=p(t,"string");return"symbol"===s(e)?e:String(e)}function p(t,e){if("object"!==s(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var m=["width","height"];c.render=function(t,e,a,c,s,u){return n(),r("div",i({class:t.cx("root")},t.ptm("root"),{"data-pc-name":"chart"}),[o("canvas",i({ref:"canvas",width:t.width,height:t.height,onClick:e[0]||(e[0]=function(t){return u.onCanvasClick(t)})},l(l({},t.canvasProps),t.ptm("canvas"))),null,16,m)],16)};export{c as default};
1
+ import t from"primevue/basecomponent";import{useStyle as e}from"primevue/usestyle";import{openBlock as n,createElementBlock as r,mergeProps as i,createElementVNode as o}from"vue";var a=e("\n@layer primevue {\n .p-chart {\n position: relative;\n }\n}\n",{name:"chart",manual:!0}),c={name:"Chart",extends:{name:"BaseChart",extends:t,props:{type:String,data:null,options:null,plugins:null,width:{type:Number,default:300},height:{type:Number,default:150},canvasProps:{type:null,default:null}},css:{classes:{root:"p-chart"},loadStyle:a.load},provide:function(){return{$parentInstance:this}}},emits:["select","loaded"],chart:null,watch:{data:{handler:function(){this.reinit()},deep:!0},type:function(){this.reinit()},options:function(){this.reinit()}},mounted:function(){this.initChart()},beforeUnmount:function(){this.chart&&(this.chart.destroy(),this.chart=null)},methods:{initChart:function(){var t=this;import("chart.js/auto").then((function(e){t.chart&&(t.chart.destroy(),t.chart=null),e&&e.default&&(t.chart=new e.default(t.$refs.canvas,{type:t.type,data:t.data,options:t.options,plugins:t.plugins})),t.$emit("loaded",t.chart)}))},getCanvas:function(){return this.$canvas},getChart:function(){return this.chart},getBase64Image:function(){return this.chart.toBase64Image()},refresh:function(){this.chart&&this.chart.update()},reinit:function(){this.initChart()},onCanvasClick:function(t){if(this.chart){var e=this.chart.getElementsAtEventForMode(t,"nearest",{intersect:!0},!1),n=this.chart.getElementsAtEventForMode(t,"dataset",{intersect:!0},!1);e&&e[0]&&n&&this.$emit("select",{originalEvent:t,element:e[0],dataset:n})}},generateLegend:function(){if(this.chart)return this.chart.generateLegend()}}};function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){h(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function h(t,e,n){return(e=f(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(t){var e=p(t,"string");return"symbol"===s(e)?e:String(e)}function p(t,e){if("object"!==s(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var m=["width","height"];c.render=function(t,e,a,c,s,u){return n(),r("div",i({class:t.cx("root")},t.ptm("root"),{"data-pc-name":"chart"}),[o("canvas",i({ref:"canvas",width:t.width,height:t.height,onClick:e[0]||(e[0]=function(t){return u.onCanvasClick(t)})},l(l({},t.canvasProps),t.ptm("canvas"))),null,16,m)],16)};export{c as default};
package/chart/chart.js CHANGED
@@ -6,7 +6,7 @@ this.primevue.chart = (function (BaseComponent, usestyle, vue) {
6
6
 
7
7
  var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
8
8
 
9
- var styles = "\n.p-chart {\n position: relative;\n}\n";
9
+ var styles = "\n@layer primevue {\n .p-chart {\n position: relative;\n }\n}\n";
10
10
  var classes = {
11
11
  root: 'p-chart'
12
12
  };
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.chart=function(t,e,n){"use strict";function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i=r(t),o=e.useStyle("\n.p-chart {\n position: relative;\n}\n",{name:"chart",manual:!0}),a={name:"Chart",extends:{name:"BaseChart",extends:i.default,props:{type:String,data:null,options:null,plugins:null,width:{type:Number,default:300},height:{type:Number,default:150},canvasProps:{type:null,default:null}},css:{classes:{root:"p-chart"},loadStyle:o.load},provide:function(){return{$parentInstance:this}}},emits:["select","loaded"],chart:null,watch:{data:{handler:function(){this.reinit()},deep:!0},type:function(){this.reinit()},options:function(){this.reinit()}},mounted:function(){this.initChart()},beforeUnmount:function(){this.chart&&(this.chart.destroy(),this.chart=null)},methods:{initChart:function(){var t=this;import("chart.js/auto").then((function(e){t.chart&&(t.chart.destroy(),t.chart=null),e&&e.default&&(t.chart=new e.default(t.$refs.canvas,{type:t.type,data:t.data,options:t.options,plugins:t.plugins})),t.$emit("loaded",t.chart)}))},getCanvas:function(){return this.$canvas},getChart:function(){return this.chart},getBase64Image:function(){return this.chart.toBase64Image()},refresh:function(){this.chart&&this.chart.update()},reinit:function(){this.initChart()},onCanvasClick:function(t){if(this.chart){var e=this.chart.getElementsAtEventForMode(t,"nearest",{intersect:!0},!1),n=this.chart.getElementsAtEventForMode(t,"dataset",{intersect:!0},!1);e&&e[0]&&n&&this.$emit("select",{originalEvent:t,element:e[0],dataset:n})}},generateLegend:function(){if(this.chart)return this.chart.generateLegend()}}};function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function l(t,e,n){return(e=h(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function h(t){var e=f(t,"string");return"symbol"===c(e)?e:String(e)}function f(t,e){if("object"!==c(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var p=["width","height"];return a.render=function(t,e,r,i,o,a){return n.openBlock(),n.createElementBlock("div",n.mergeProps({class:t.cx("root")},t.ptm("root"),{"data-pc-name":"chart"}),[n.createElementVNode("canvas",n.mergeProps({ref:"canvas",width:t.width,height:t.height,onClick:e[0]||(e[0]=function(t){return a.onCanvasClick(t)})},s(s({},t.canvasProps),t.ptm("canvas"))),null,16,p)],16)},a}(primevue.basecomponent,primevue.usestyle,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.chart=function(t,e,n){"use strict";function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i=r(t),a=e.useStyle("\n@layer primevue {\n .p-chart {\n position: relative;\n }\n}\n",{name:"chart",manual:!0}),o={name:"Chart",extends:{name:"BaseChart",extends:i.default,props:{type:String,data:null,options:null,plugins:null,width:{type:Number,default:300},height:{type:Number,default:150},canvasProps:{type:null,default:null}},css:{classes:{root:"p-chart"},loadStyle:a.load},provide:function(){return{$parentInstance:this}}},emits:["select","loaded"],chart:null,watch:{data:{handler:function(){this.reinit()},deep:!0},type:function(){this.reinit()},options:function(){this.reinit()}},mounted:function(){this.initChart()},beforeUnmount:function(){this.chart&&(this.chart.destroy(),this.chart=null)},methods:{initChart:function(){var t=this;import("chart.js/auto").then((function(e){t.chart&&(t.chart.destroy(),t.chart=null),e&&e.default&&(t.chart=new e.default(t.$refs.canvas,{type:t.type,data:t.data,options:t.options,plugins:t.plugins})),t.$emit("loaded",t.chart)}))},getCanvas:function(){return this.$canvas},getChart:function(){return this.chart},getBase64Image:function(){return this.chart.toBase64Image()},refresh:function(){this.chart&&this.chart.update()},reinit:function(){this.initChart()},onCanvasClick:function(t){if(this.chart){var e=this.chart.getElementsAtEventForMode(t,"nearest",{intersect:!0},!1),n=this.chart.getElementsAtEventForMode(t,"dataset",{intersect:!0},!1);e&&e[0]&&n&&this.$emit("select",{originalEvent:t,element:e[0],dataset:n})}},generateLegend:function(){if(this.chart)return this.chart.generateLegend()}}};function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function l(t,e,n){return(e=h(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function h(t){var e=f(t,"string");return"symbol"===c(e)?e:String(e)}function f(t,e){if("object"!==c(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var p=["width","height"];return o.render=function(t,e,r,i,a,o){return n.openBlock(),n.createElementBlock("div",n.mergeProps({class:t.cx("root")},t.ptm("root"),{"data-pc-name":"chart"}),[n.createElementVNode("canvas",n.mergeProps({ref:"canvas",width:t.width,height:t.height,onClick:e[0]||(e[0]=function(t){return o.onCanvasClick(t)})},s(s({},t.canvasProps),t.ptm("canvas"))),null,16,p)],16)},o}(primevue.basecomponent,primevue.usestyle,Vue);
package/chip/BaseChip.vue CHANGED
@@ -3,26 +3,28 @@ import BaseComponent from 'primevue/basecomponent';
3
3
  import { useStyle } from 'primevue/usestyle';
4
4
 
5
5
  const styles = `
6
- .p-chip {
7
- display: inline-flex;
8
- align-items: center;
9
- }
10
-
11
- .p-chip-text {
12
- line-height: 1.5;
13
- }
14
-
15
- .p-chip-icon.pi {
16
- line-height: 1.5;
17
- }
18
-
19
- .p-chip-remove-icon {
20
- line-height: 1.5;
21
- cursor: pointer;
22
- }
23
-
24
- .p-chip img {
25
- border-radius: 50%;
6
+ @layer primevue {
7
+ .p-chip {
8
+ display: inline-flex;
9
+ align-items: center;
10
+ }
11
+
12
+ .p-chip-text {
13
+ line-height: 1.5;
14
+ }
15
+
16
+ .p-chip-icon.pi {
17
+ line-height: 1.5;
18
+ }
19
+
20
+ .p-chip-remove-icon {
21
+ line-height: 1.5;
22
+ cursor: pointer;
23
+ }
24
+
25
+ .p-chip img {
26
+ border-radius: 50%;
27
+ }
26
28
  }
27
29
  `;
28
30
 
package/chip/chip.cjs.js CHANGED
@@ -10,7 +10,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
10
10
  var TimesCircleIcon__default = /*#__PURE__*/_interopDefaultLegacy(TimesCircleIcon);
11
11
  var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
12
12
 
13
- var styles = "\n.p-chip {\n display: inline-flex;\n align-items: center;\n}\n\n.p-chip-text {\n line-height: 1.5;\n}\n\n.p-chip-icon.pi {\n line-height: 1.5;\n}\n\n.p-chip-remove-icon {\n line-height: 1.5;\n cursor: pointer;\n}\n\n.p-chip img {\n border-radius: 50%;\n}\n";
13
+ var styles = "\n@layer primevue {\n .p-chip {\n display: inline-flex;\n align-items: center;\n }\n \n .p-chip-text {\n line-height: 1.5;\n }\n \n .p-chip-icon.pi {\n line-height: 1.5;\n }\n \n .p-chip-remove-icon {\n line-height: 1.5;\n cursor: pointer;\n }\n \n .p-chip img {\n border-radius: 50%;\n }\n}\n";
14
14
  var classes = {
15
15
  root: function root(_ref) {
16
16
  var props = _ref.props;
@@ -1 +1 @@
1
- "use strict";var e=require("primevue/icons/timescircle"),n=require("primevue/basecomponent"),o=require("primevue/usestyle"),t=require("vue");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=c(e),i=c(n),r=o.useStyle("\n.p-chip {\n display: inline-flex;\n align-items: center;\n}\n\n.p-chip-text {\n line-height: 1.5;\n}\n\n.p-chip-icon.pi {\n line-height: 1.5;\n}\n\n.p-chip-remove-icon {\n line-height: 1.5;\n cursor: pointer;\n}\n\n.p-chip img {\n border-radius: 50%;\n}\n",{name:"chip",manual:!0}),a={name:"Chip",extends:{name:"BaseChip",extends:i.default,props:{label:{type:String,default:null},icon:{type:String,default:null},image:{type:String,default:null},removable:{type:Boolean,default:!1},removeIcon:{type:String,default:void 0}},css:{classes:{root:function(e){return["p-chip p-component",{"p-chip-image":null!=e.props.image}]},icon:"p-chip-icon",label:"p-chip-text",removeIcon:"p-chip-remove-icon"},loadStyle:r.load},provide:function(){return{$parentInstance:this}}},emits:["remove"],data:function(){return{visible:!0}},methods:{onKeydown:function(e){"Enter"!==e.key&&"Backspace"!==e.key||this.close(e)},close:function(e){this.visible=!1,this.$emit("remove",e)}},components:{TimesCircleIcon:l.default}},s=["aria-label"],p=["src"];a.render=function(e,n,o,c,l,i){return l.visible?(t.openBlock(),t.createElementBlock("div",t.mergeProps({key:0,class:e.cx("root"),"aria-label":e.label},e.ptm("root"),{"data-pc-name":"chip"}),[t.renderSlot(e.$slots,"default",{},(function(){return[e.image?(t.openBlock(),t.createElementBlock("img",t.mergeProps({key:0,src:e.image},e.ptm("image")),null,16,p)):e.$slots.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.$slots.icon),t.mergeProps({key:1,class:e.cx("icon")},e.ptm("icon")),null,16,["class"])):e.icon?(t.openBlock(),t.createElementBlock("span",t.mergeProps({key:2,class:[e.cx("icon"),e.icon]},e.ptm("icon")),null,16)):t.createCommentVNode("",!0),e.label?(t.openBlock(),t.createElementBlock("div",t.mergeProps({key:3,class:e.cx("label")},e.ptm("label")),t.toDisplayString(e.label),17)):t.createCommentVNode("",!0)]})),e.removable?t.renderSlot(e.$slots,"removeicon",{key:0,onClick:i.close,onKeydown:i.onKeydown},(function(){return[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.removeIcon?"span":"TimesCircleIcon"),t.mergeProps({tabindex:"0",class:[e.cx("removeIcon"),e.removeIcon],onClick:i.close,onKeydown:i.onKeydown},e.ptm("removeIcon")),null,16,["class","onClick","onKeydown"]))]})):t.createCommentVNode("",!0)],16,s)):t.createCommentVNode("",!0)},module.exports=a;
1
+ "use strict";var e=require("primevue/icons/timescircle"),n=require("primevue/basecomponent"),o=require("primevue/usestyle"),t=require("vue");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=l(e),i=l(n),r=o.useStyle("\n@layer primevue {\n .p-chip {\n display: inline-flex;\n align-items: center;\n }\n \n .p-chip-text {\n line-height: 1.5;\n }\n \n .p-chip-icon.pi {\n line-height: 1.5;\n }\n \n .p-chip-remove-icon {\n line-height: 1.5;\n cursor: pointer;\n }\n \n .p-chip img {\n border-radius: 50%;\n }\n}\n",{name:"chip",manual:!0}),a={name:"Chip",extends:{name:"BaseChip",extends:i.default,props:{label:{type:String,default:null},icon:{type:String,default:null},image:{type:String,default:null},removable:{type:Boolean,default:!1},removeIcon:{type:String,default:void 0}},css:{classes:{root:function(e){return["p-chip p-component",{"p-chip-image":null!=e.props.image}]},icon:"p-chip-icon",label:"p-chip-text",removeIcon:"p-chip-remove-icon"},loadStyle:r.load},provide:function(){return{$parentInstance:this}}},emits:["remove"],data:function(){return{visible:!0}},methods:{onKeydown:function(e){"Enter"!==e.key&&"Backspace"!==e.key||this.close(e)},close:function(e){this.visible=!1,this.$emit("remove",e)}},components:{TimesCircleIcon:c.default}},s=["aria-label"],p=["src"];a.render=function(e,n,o,l,c,i){return c.visible?(t.openBlock(),t.createElementBlock("div",t.mergeProps({key:0,class:e.cx("root"),"aria-label":e.label},e.ptm("root"),{"data-pc-name":"chip"}),[t.renderSlot(e.$slots,"default",{},(function(){return[e.image?(t.openBlock(),t.createElementBlock("img",t.mergeProps({key:0,src:e.image},e.ptm("image")),null,16,p)):e.$slots.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.$slots.icon),t.mergeProps({key:1,class:e.cx("icon")},e.ptm("icon")),null,16,["class"])):e.icon?(t.openBlock(),t.createElementBlock("span",t.mergeProps({key:2,class:[e.cx("icon"),e.icon]},e.ptm("icon")),null,16)):t.createCommentVNode("",!0),e.label?(t.openBlock(),t.createElementBlock("div",t.mergeProps({key:3,class:e.cx("label")},e.ptm("label")),t.toDisplayString(e.label),17)):t.createCommentVNode("",!0)]})),e.removable?t.renderSlot(e.$slots,"removeicon",{key:0,onClick:i.close,onKeydown:i.onKeydown},(function(){return[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.removeIcon?"span":"TimesCircleIcon"),t.mergeProps({tabindex:"0",class:[e.cx("removeIcon"),e.removeIcon],onClick:i.close,onKeydown:i.onKeydown},e.ptm("removeIcon")),null,16,["class","onClick","onKeydown"]))]})):t.createCommentVNode("",!0)],16,s)):t.createCommentVNode("",!0)},module.exports=a;
package/chip/chip.esm.js CHANGED
@@ -3,7 +3,7 @@ import BaseComponent from 'primevue/basecomponent';
3
3
  import { useStyle } from 'primevue/usestyle';
4
4
  import { openBlock, createElementBlock, mergeProps, renderSlot, createBlock, resolveDynamicComponent, createCommentVNode, toDisplayString } from 'vue';
5
5
 
6
- var styles = "\n.p-chip {\n display: inline-flex;\n align-items: center;\n}\n\n.p-chip-text {\n line-height: 1.5;\n}\n\n.p-chip-icon.pi {\n line-height: 1.5;\n}\n\n.p-chip-remove-icon {\n line-height: 1.5;\n cursor: pointer;\n}\n\n.p-chip img {\n border-radius: 50%;\n}\n";
6
+ var styles = "\n@layer primevue {\n .p-chip {\n display: inline-flex;\n align-items: center;\n }\n \n .p-chip-text {\n line-height: 1.5;\n }\n \n .p-chip-icon.pi {\n line-height: 1.5;\n }\n \n .p-chip-remove-icon {\n line-height: 1.5;\n cursor: pointer;\n }\n \n .p-chip img {\n border-radius: 50%;\n }\n}\n";
7
7
  var classes = {
8
8
  root: function root(_ref) {
9
9
  var props = _ref.props;
@@ -1 +1 @@
1
- import e from"primevue/icons/timescircle";import n from"primevue/basecomponent";import{useStyle as o}from"primevue/usestyle";import{openBlock as i,createElementBlock as l,mergeProps as c,renderSlot as t,createBlock as r,resolveDynamicComponent as s,createCommentVNode as a,toDisplayString as p}from"vue";var m=o("\n.p-chip {\n display: inline-flex;\n align-items: center;\n}\n\n.p-chip-text {\n line-height: 1.5;\n}\n\n.p-chip-icon.pi {\n line-height: 1.5;\n}\n\n.p-chip-remove-icon {\n line-height: 1.5;\n cursor: pointer;\n}\n\n.p-chip img {\n border-radius: 50%;\n}\n",{name:"chip",manual:!0}),u={name:"Chip",extends:{name:"BaseChip",extends:n,props:{label:{type:String,default:null},icon:{type:String,default:null},image:{type:String,default:null},removable:{type:Boolean,default:!1},removeIcon:{type:String,default:void 0}},css:{classes:{root:function(e){return["p-chip p-component",{"p-chip-image":null!=e.props.image}]},icon:"p-chip-icon",label:"p-chip-text",removeIcon:"p-chip-remove-icon"},loadStyle:m.load},provide:function(){return{$parentInstance:this}}},emits:["remove"],data:function(){return{visible:!0}},methods:{onKeydown:function(e){"Enter"!==e.key&&"Backspace"!==e.key||this.close(e)},close:function(e){this.visible=!1,this.$emit("remove",e)}},components:{TimesCircleIcon:e}},d=["aria-label"],h=["src"];u.render=function(e,n,o,m,u,v){return u.visible?(i(),l("div",c({key:0,class:e.cx("root"),"aria-label":e.label},e.ptm("root"),{"data-pc-name":"chip"}),[t(e.$slots,"default",{},(function(){return[e.image?(i(),l("img",c({key:0,src:e.image},e.ptm("image")),null,16,h)):e.$slots.icon?(i(),r(s(e.$slots.icon),c({key:1,class:e.cx("icon")},e.ptm("icon")),null,16,["class"])):e.icon?(i(),l("span",c({key:2,class:[e.cx("icon"),e.icon]},e.ptm("icon")),null,16)):a("",!0),e.label?(i(),l("div",c({key:3,class:e.cx("label")},e.ptm("label")),p(e.label),17)):a("",!0)]})),e.removable?t(e.$slots,"removeicon",{key:0,onClick:v.close,onKeydown:v.onKeydown},(function(){return[(i(),r(s(e.removeIcon?"span":"TimesCircleIcon"),c({tabindex:"0",class:[e.cx("removeIcon"),e.removeIcon],onClick:v.close,onKeydown:v.onKeydown},e.ptm("removeIcon")),null,16,["class","onClick","onKeydown"]))]})):a("",!0)],16,d)):a("",!0)};export{u as default};
1
+ import e from"primevue/icons/timescircle";import n from"primevue/basecomponent";import{useStyle as o}from"primevue/usestyle";import{openBlock as i,createElementBlock as l,mergeProps as c,renderSlot as t,createBlock as r,resolveDynamicComponent as a,createCommentVNode as s,toDisplayString as p}from"vue";var m=o("\n@layer primevue {\n .p-chip {\n display: inline-flex;\n align-items: center;\n }\n \n .p-chip-text {\n line-height: 1.5;\n }\n \n .p-chip-icon.pi {\n line-height: 1.5;\n }\n \n .p-chip-remove-icon {\n line-height: 1.5;\n cursor: pointer;\n }\n \n .p-chip img {\n border-radius: 50%;\n }\n}\n",{name:"chip",manual:!0}),u={name:"Chip",extends:{name:"BaseChip",extends:n,props:{label:{type:String,default:null},icon:{type:String,default:null},image:{type:String,default:null},removable:{type:Boolean,default:!1},removeIcon:{type:String,default:void 0}},css:{classes:{root:function(e){return["p-chip p-component",{"p-chip-image":null!=e.props.image}]},icon:"p-chip-icon",label:"p-chip-text",removeIcon:"p-chip-remove-icon"},loadStyle:m.load},provide:function(){return{$parentInstance:this}}},emits:["remove"],data:function(){return{visible:!0}},methods:{onKeydown:function(e){"Enter"!==e.key&&"Backspace"!==e.key||this.close(e)},close:function(e){this.visible=!1,this.$emit("remove",e)}},components:{TimesCircleIcon:e}},d=["aria-label"],v=["src"];u.render=function(e,n,o,m,u,h){return u.visible?(i(),l("div",c({key:0,class:e.cx("root"),"aria-label":e.label},e.ptm("root"),{"data-pc-name":"chip"}),[t(e.$slots,"default",{},(function(){return[e.image?(i(),l("img",c({key:0,src:e.image},e.ptm("image")),null,16,v)):e.$slots.icon?(i(),r(a(e.$slots.icon),c({key:1,class:e.cx("icon")},e.ptm("icon")),null,16,["class"])):e.icon?(i(),l("span",c({key:2,class:[e.cx("icon"),e.icon]},e.ptm("icon")),null,16)):s("",!0),e.label?(i(),l("div",c({key:3,class:e.cx("label")},e.ptm("label")),p(e.label),17)):s("",!0)]})),e.removable?t(e.$slots,"removeicon",{key:0,onClick:h.close,onKeydown:h.onKeydown},(function(){return[(i(),r(a(e.removeIcon?"span":"TimesCircleIcon"),c({tabindex:"0",class:[e.cx("removeIcon"),e.removeIcon],onClick:h.close,onKeydown:h.onKeydown},e.ptm("removeIcon")),null,16,["class","onClick","onKeydown"]))]})):s("",!0)],16,d)):s("",!0)};export{u as default};
package/chip/chip.js CHANGED
@@ -7,7 +7,7 @@ this.primevue.chip = (function (TimesCircleIcon, BaseComponent, usestyle, vue) {
7
7
  var TimesCircleIcon__default = /*#__PURE__*/_interopDefaultLegacy(TimesCircleIcon);
8
8
  var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
9
9
 
10
- var styles = "\n.p-chip {\n display: inline-flex;\n align-items: center;\n}\n\n.p-chip-text {\n line-height: 1.5;\n}\n\n.p-chip-icon.pi {\n line-height: 1.5;\n}\n\n.p-chip-remove-icon {\n line-height: 1.5;\n cursor: pointer;\n}\n\n.p-chip img {\n border-radius: 50%;\n}\n";
10
+ var styles = "\n@layer primevue {\n .p-chip {\n display: inline-flex;\n align-items: center;\n }\n \n .p-chip-text {\n line-height: 1.5;\n }\n \n .p-chip-icon.pi {\n line-height: 1.5;\n }\n \n .p-chip-remove-icon {\n line-height: 1.5;\n cursor: pointer;\n }\n \n .p-chip img {\n border-radius: 50%;\n }\n}\n";
11
11
  var classes = {
12
12
  root: function root(_ref) {
13
13
  var props = _ref.props;
package/chip/chip.min.js CHANGED
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.chip=function(e,n,o,t){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=i(e),l=i(n),r=o.useStyle("\n.p-chip {\n display: inline-flex;\n align-items: center;\n}\n\n.p-chip-text {\n line-height: 1.5;\n}\n\n.p-chip-icon.pi {\n line-height: 1.5;\n}\n\n.p-chip-remove-icon {\n line-height: 1.5;\n cursor: pointer;\n}\n\n.p-chip img {\n border-radius: 50%;\n}\n",{name:"chip",manual:!0}),a={name:"Chip",extends:{name:"BaseChip",extends:l.default,props:{label:{type:String,default:null},icon:{type:String,default:null},image:{type:String,default:null},removable:{type:Boolean,default:!1},removeIcon:{type:String,default:void 0}},css:{classes:{root:function(e){return["p-chip p-component",{"p-chip-image":null!=e.props.image}]},icon:"p-chip-icon",label:"p-chip-text",removeIcon:"p-chip-remove-icon"},loadStyle:r.load},provide:function(){return{$parentInstance:this}}},emits:["remove"],data:function(){return{visible:!0}},methods:{onKeydown:function(e){"Enter"!==e.key&&"Backspace"!==e.key||this.close(e)},close:function(e){this.visible=!1,this.$emit("remove",e)}},components:{TimesCircleIcon:c.default}},s=["aria-label"],p=["src"];return a.render=function(e,n,o,i,c,l){return c.visible?(t.openBlock(),t.createElementBlock("div",t.mergeProps({key:0,class:e.cx("root"),"aria-label":e.label},e.ptm("root"),{"data-pc-name":"chip"}),[t.renderSlot(e.$slots,"default",{},(function(){return[e.image?(t.openBlock(),t.createElementBlock("img",t.mergeProps({key:0,src:e.image},e.ptm("image")),null,16,p)):e.$slots.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.$slots.icon),t.mergeProps({key:1,class:e.cx("icon")},e.ptm("icon")),null,16,["class"])):e.icon?(t.openBlock(),t.createElementBlock("span",t.mergeProps({key:2,class:[e.cx("icon"),e.icon]},e.ptm("icon")),null,16)):t.createCommentVNode("",!0),e.label?(t.openBlock(),t.createElementBlock("div",t.mergeProps({key:3,class:e.cx("label")},e.ptm("label")),t.toDisplayString(e.label),17)):t.createCommentVNode("",!0)]})),e.removable?t.renderSlot(e.$slots,"removeicon",{key:0,onClick:l.close,onKeydown:l.onKeydown},(function(){return[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.removeIcon?"span":"TimesCircleIcon"),t.mergeProps({tabindex:"0",class:[e.cx("removeIcon"),e.removeIcon],onClick:l.close,onKeydown:l.onKeydown},e.ptm("removeIcon")),null,16,["class","onClick","onKeydown"]))]})):t.createCommentVNode("",!0)],16,s)):t.createCommentVNode("",!0)},a}(primevue.icons.timescircle,primevue.basecomponent,primevue.usestyle,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.chip=function(e,n,o,t){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=i(e),l=i(n),r=o.useStyle("\n@layer primevue {\n .p-chip {\n display: inline-flex;\n align-items: center;\n }\n \n .p-chip-text {\n line-height: 1.5;\n }\n \n .p-chip-icon.pi {\n line-height: 1.5;\n }\n \n .p-chip-remove-icon {\n line-height: 1.5;\n cursor: pointer;\n }\n \n .p-chip img {\n border-radius: 50%;\n }\n}\n",{name:"chip",manual:!0}),a={name:"Chip",extends:{name:"BaseChip",extends:l.default,props:{label:{type:String,default:null},icon:{type:String,default:null},image:{type:String,default:null},removable:{type:Boolean,default:!1},removeIcon:{type:String,default:void 0}},css:{classes:{root:function(e){return["p-chip p-component",{"p-chip-image":null!=e.props.image}]},icon:"p-chip-icon",label:"p-chip-text",removeIcon:"p-chip-remove-icon"},loadStyle:r.load},provide:function(){return{$parentInstance:this}}},emits:["remove"],data:function(){return{visible:!0}},methods:{onKeydown:function(e){"Enter"!==e.key&&"Backspace"!==e.key||this.close(e)},close:function(e){this.visible=!1,this.$emit("remove",e)}},components:{TimesCircleIcon:c.default}},s=["aria-label"],p=["src"];return a.render=function(e,n,o,i,c,l){return c.visible?(t.openBlock(),t.createElementBlock("div",t.mergeProps({key:0,class:e.cx("root"),"aria-label":e.label},e.ptm("root"),{"data-pc-name":"chip"}),[t.renderSlot(e.$slots,"default",{},(function(){return[e.image?(t.openBlock(),t.createElementBlock("img",t.mergeProps({key:0,src:e.image},e.ptm("image")),null,16,p)):e.$slots.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.$slots.icon),t.mergeProps({key:1,class:e.cx("icon")},e.ptm("icon")),null,16,["class"])):e.icon?(t.openBlock(),t.createElementBlock("span",t.mergeProps({key:2,class:[e.cx("icon"),e.icon]},e.ptm("icon")),null,16)):t.createCommentVNode("",!0),e.label?(t.openBlock(),t.createElementBlock("div",t.mergeProps({key:3,class:e.cx("label")},e.ptm("label")),t.toDisplayString(e.label),17)):t.createCommentVNode("",!0)]})),e.removable?t.renderSlot(e.$slots,"removeicon",{key:0,onClick:l.close,onKeydown:l.onKeydown},(function(){return[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.removeIcon?"span":"TimesCircleIcon"),t.mergeProps({tabindex:"0",class:[e.cx("removeIcon"),e.removeIcon],onClick:l.close,onKeydown:l.onKeydown},e.ptm("removeIcon")),null,16,["class","onClick","onKeydown"]))]})):t.createCommentVNode("",!0)],16,s)):t.createCommentVNode("",!0)},a}(primevue.icons.timescircle,primevue.basecomponent,primevue.usestyle,Vue);
@@ -3,50 +3,52 @@ import BaseComponent from 'primevue/basecomponent';
3
3
  import { useStyle } from 'primevue/usestyle';
4
4
 
5
5
  const styles = `
6
- .p-chips {
7
- display: inline-flex;
8
- }
9
-
10
- .p-chips-multiple-container {
11
- margin: 0;
12
- padding: 0;
13
- list-style-type: none;
14
- cursor: text;
15
- overflow: hidden;
16
- display: flex;
17
- align-items: center;
18
- flex-wrap: wrap;
19
- }
20
-
21
- .p-chips-token {
22
- cursor: default;
23
- display: inline-flex;
24
- align-items: center;
25
- flex: 0 0 auto;
26
- }
27
-
28
- .p-chips-input-token {
29
- flex: 1 1 auto;
30
- display: inline-flex;
31
- }
32
-
33
- .p-chips-token-icon {
34
- cursor: pointer;
35
- }
36
-
37
- .p-chips-input-token input {
38
- border: 0 none;
39
- outline: 0 none;
40
- background-color: transparent;
41
- margin: 0;
42
- padding: 0;
43
- box-shadow: none;
44
- border-radius: 0;
45
- width: 100%;
46
- }
47
-
48
- .p-fluid .p-chips {
49
- display: flex;
6
+ @layer primevue {
7
+ .p-chips {
8
+ display: inline-flex;
9
+ }
10
+
11
+ .p-chips-multiple-container {
12
+ margin: 0;
13
+ padding: 0;
14
+ list-style-type: none;
15
+ cursor: text;
16
+ overflow: hidden;
17
+ display: flex;
18
+ align-items: center;
19
+ flex-wrap: wrap;
20
+ }
21
+
22
+ .p-chips-token {
23
+ cursor: default;
24
+ display: inline-flex;
25
+ align-items: center;
26
+ flex: 0 0 auto;
27
+ }
28
+
29
+ .p-chips-input-token {
30
+ flex: 1 1 auto;
31
+ display: inline-flex;
32
+ }
33
+
34
+ .p-chips-token-icon {
35
+ cursor: pointer;
36
+ }
37
+
38
+ .p-chips-input-token input {
39
+ border: 0 none;
40
+ outline: 0 none;
41
+ background-color: transparent;
42
+ margin: 0;
43
+ padding: 0;
44
+ box-shadow: none;
45
+ border-radius: 0;
46
+ width: 100%;
47
+ }
48
+
49
+ .p-fluid .p-chips {
50
+ display: flex;
51
+ }
50
52
  }
51
53
  `;
52
54
 
@@ -11,7 +11,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
11
11
  var TimesCircleIcon__default = /*#__PURE__*/_interopDefaultLegacy(TimesCircleIcon);
12
12
  var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
13
13
 
14
- var styles = "\n.p-chips {\n display: inline-flex;\n}\n\n.p-chips-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n}\n\n.p-chips-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n}\n\n.p-chips-input-token {\n flex: 1 1 auto;\n display: inline-flex;\n}\n\n.p-chips-token-icon {\n cursor: pointer;\n}\n\n.p-chips-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n}\n\n.p-fluid .p-chips {\n display: flex;\n}\n";
14
+ var styles = "\n@layer primevue {\n .p-chips {\n display: inline-flex;\n }\n \n .p-chips-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n }\n \n .p-chips-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n }\n \n .p-chips-input-token {\n flex: 1 1 auto;\n display: inline-flex;\n }\n \n .p-chips-token-icon {\n cursor: pointer;\n }\n \n .p-chips-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n }\n \n .p-fluid .p-chips {\n display: flex;\n }\n}\n";
15
15
  var classes = {
16
16
  root: function root(_ref) {
17
17
  var instance = _ref.instance,
@@ -1 +1 @@
1
- "use strict";var e=require("primevue/icons/timescircle"),n=require("primevue/utils"),t=require("primevue/basecomponent"),o=require("primevue/usestyle"),r=require("vue");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=i(e),a=i(t),u=o.useStyle("\n.p-chips {\n display: inline-flex;\n}\n\n.p-chips-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n}\n\n.p-chips-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n}\n\n.p-chips-input-token {\n flex: 1 1 auto;\n display: inline-flex;\n}\n\n.p-chips-token-icon {\n cursor: pointer;\n}\n\n.p-chips-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n}\n\n.p-fluid .p-chips {\n display: flex;\n}\n",{name:"chips",manual:!0});function s(e){return f(e)||d(e)||p(e)||c()}function c(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function p(e,n){if(e){if("string"==typeof e)return m(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?m(e,n):void 0}}function d(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function f(e){if(Array.isArray(e))return m(e)}function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=new Array(n);t<n;t++)o[t]=e[t];return o}var h={name:"Chips",extends:{name:"BaseChips",extends:a.default,props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:[String,Object],default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},placeholder:{type:String,default:null},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},removeTokenIcon:{type:String,default:void 0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:function(e){var n=e.instance,t=e.props;return["p-chips p-component p-inputwrapper",{"p-disabled":t.disabled,"p-focus":n.focused,"p-inputwrapper-filled":t.modelValue&&t.modelValue.length||n.inputValue&&n.inputValue.length,"p-inputwrapper-focus":n.focused}]},container:"p-inputtext p-chips-multiple-container",token:function(e){return["p-chips-token",{"p-focus":e.state.focusedIndex===e.index}]},label:"p-chips-token-label",removeTokenIcon:"p-chips-token-icon",inputToken:"p-chips-input-token"},loadStyle:u.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","add","remove","focus","blur"],data:function(){return{id:n.UniqueComponentId(),inputValue:null,focused:!1,focusedIndex:null}},methods:{onWrapperClick:function(){this.$refs.input.focus()},onInput:function(e){this.inputValue=e.target.value,this.focusedIndex=null},onFocus:function(e){this.focused=!0,this.focusedIndex=null,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedIndex=null,this.addOnBlur&&this.addItem(e,e.target.value,!1),this.$emit("blur",e)},onKeyDown:function(e){var n=e.target.value;switch(e.code){case"Backspace":0===n.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,null!==this.focusedIndex?this.focusedIndex:this.modelValue.length-1);break;case"Enter":n&&n.trim().length&&!this.maxedOut&&this.addItem(e,n,!0);break;case"ArrowLeft":0===n.length&&this.modelValue&&this.modelValue.length>0&&this.$refs.container.focus();break;case"ArrowRight":e.stopPropagation();break;default:this.separator&&(this.separator===e.key||e.key.match(this.separator))&&this.addItem(e,n,!0)}},onPaste:function(e){var n=this;if(this.separator){var t=(e.clipboardData||window.clipboardData).getData("Text");if(t){var o=this.modelValue||[],r=t.split(this.separator);r=r.filter((function(e){return n.allowDuplicate||-1===o.indexOf(e)})),o=[].concat(s(o),s(r)),this.updateModel(e,o,!0)}}},onContainerFocus:function(){this.focused=!0},onContainerBlur:function(){this.focusedIndex=-1,this.focused=!1},onContainerKeyDown:function(e){switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOn(e);break;case"ArrowRight":this.onArrowRightKeyOn(e);break;case"Backspace":this.onBackspaceKeyOn(e)}},onArrowLeftKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex=null===this.focusedIndex?this.modelValue.length-1:this.focusedIndex-1,this.focusedIndex<0&&(this.focusedIndex=0))},onArrowRightKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex===this.modelValue.length-1?(this.focusedIndex=null,this.$refs.input.focus()):this.focusedIndex++)},onBackspaceKeyOn:function(e){null!==this.focusedIndex&&this.removeItem(e,this.focusedIndex)},updateModel:function(e,n,t){var o=this;this.$emit("update:modelValue",n),this.$emit("add",{originalEvent:e,value:n}),this.$refs.input.value="",this.inputValue="",setTimeout((function(){o.maxedOut&&(o.focused=!1)}),0),t&&e.preventDefault()},addItem:function(e,n,t){if(n&&n.trim().length){var o=this.modelValue?s(this.modelValue):[];(this.allowDuplicate||-1===o.indexOf(n))&&(o.push(n),this.updateModel(e,o,t))}},removeItem:function(e,n){if(!this.disabled){var t=s(this.modelValue),o=t.splice(n,1);this.focusedIndex=null,this.$refs.input.focus(),this.$emit("update:modelValue",t),this.$emit("remove",{originalEvent:e,value:o})}}},computed:{maxedOut:function(){return this.max&&this.modelValue&&this.max===this.modelValue.length},focusedOptionId:function(){return null!==this.focusedIndex?"".concat(this.id,"_chips_item_").concat(this.focusedIndex):null}},components:{TimesCircleIcon:l.default}};function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function b(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function g(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?b(Object(t),!0).forEach((function(n){v(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function v(e,n,t){return(n=x(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function x(e){var n=I(e,"string");return"symbol"===y(n)?n:String(n)}function I(e,n){if("object"!==y(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,n||"default");if("object"!==y(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}var k=["aria-labelledby","aria-label","aria-activedescendant"],w=["id","aria-label","aria-setsize","aria-posinset","data-p-focused"],O=["id","disabled","placeholder"];h.render=function(e,n,t,o,i,l){return r.openBlock(),r.createElementBlock("div",r.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"chips"}),[r.createElementVNode("ul",r.mergeProps({ref:"container",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-activedescendant":i.focused?l.focusedOptionId:void 0,onClick:n[5]||(n[5]=function(e){return l.onWrapperClick()}),onFocus:n[6]||(n[6]=function(){return l.onContainerFocus&&l.onContainerFocus.apply(l,arguments)}),onBlur:n[7]||(n[7]=function(){return l.onContainerBlur&&l.onContainerBlur.apply(l,arguments)}),onKeydown:n[8]||(n[8]=function(){return l.onContainerKeyDown&&l.onContainerKeyDown.apply(l,arguments)})},e.ptm("container")),[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.modelValue,(function(n,t){return r.openBlock(),r.createElementBlock("li",r.mergeProps({key:"".concat(t,"_").concat(n),id:i.id+"_chips_item_"+t,role:"option",class:e.cx("token",{index:t}),"aria-label":n,"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":t+1},e.ptm("token"),{"data-p-focused":i.focusedIndex===t}),[r.renderSlot(e.$slots,"chip",{class:r.normalizeClass(e.cx("label")),value:n},(function(){return[r.createElementVNode("span",r.mergeProps({class:e.cx("label")},e.ptm("label")),r.toDisplayString(n),17)]})),r.renderSlot(e.$slots,"removetokenicon",{class:r.normalizeClass(e.cx("removeTokenIcon")),index:t,onClick:function(e){return l.removeItem(e,t)}},(function(){return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.removeTokenIcon?"span":"TimesCircleIcon"),r.mergeProps({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return l.removeItem(e,t)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,w)})),128)),r.createElementVNode("li",r.mergeProps({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[r.createElementVNode("input",r.mergeProps({ref:"input",id:e.inputId,type:"text",class:e.inputClass,style:e.inputStyle,disabled:e.disabled||l.maxedOut,placeholder:e.placeholder,onFocus:n[0]||(n[0]=function(e){return l.onFocus(e)}),onBlur:n[1]||(n[1]=function(e){return l.onBlur(e)}),onInput:n[2]||(n[2]=function(){return l.onInput&&l.onInput.apply(l,arguments)}),onKeydown:n[3]||(n[3]=function(e){return l.onKeyDown(e)}),onPaste:n[4]||(n[4]=function(e){return l.onPaste(e)})},g(g({},e.inputProps),e.ptm("input"))),null,16,O)],16)],16,k)],16)},module.exports=h;
1
+ "use strict";var e=require("primevue/icons/timescircle"),n=require("primevue/utils"),t=require("primevue/basecomponent"),o=require("primevue/usestyle"),r=require("vue");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=i(e),a=i(t),u=o.useStyle("\n@layer primevue {\n .p-chips {\n display: inline-flex;\n }\n \n .p-chips-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n }\n \n .p-chips-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n }\n \n .p-chips-input-token {\n flex: 1 1 auto;\n display: inline-flex;\n }\n \n .p-chips-token-icon {\n cursor: pointer;\n }\n \n .p-chips-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n }\n \n .p-fluid .p-chips {\n display: flex;\n }\n}\n",{name:"chips",manual:!0});function s(e){return f(e)||d(e)||p(e)||c()}function c(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function p(e,n){if(e){if("string"==typeof e)return m(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?m(e,n):void 0}}function d(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function f(e){if(Array.isArray(e))return m(e)}function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=new Array(n);t<n;t++)o[t]=e[t];return o}var h={name:"Chips",extends:{name:"BaseChips",extends:a.default,props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:[String,Object],default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},placeholder:{type:String,default:null},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},removeTokenIcon:{type:String,default:void 0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:function(e){var n=e.instance,t=e.props;return["p-chips p-component p-inputwrapper",{"p-disabled":t.disabled,"p-focus":n.focused,"p-inputwrapper-filled":t.modelValue&&t.modelValue.length||n.inputValue&&n.inputValue.length,"p-inputwrapper-focus":n.focused}]},container:"p-inputtext p-chips-multiple-container",token:function(e){return["p-chips-token",{"p-focus":e.state.focusedIndex===e.index}]},label:"p-chips-token-label",removeTokenIcon:"p-chips-token-icon",inputToken:"p-chips-input-token"},loadStyle:u.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","add","remove","focus","blur"],data:function(){return{id:n.UniqueComponentId(),inputValue:null,focused:!1,focusedIndex:null}},methods:{onWrapperClick:function(){this.$refs.input.focus()},onInput:function(e){this.inputValue=e.target.value,this.focusedIndex=null},onFocus:function(e){this.focused=!0,this.focusedIndex=null,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedIndex=null,this.addOnBlur&&this.addItem(e,e.target.value,!1),this.$emit("blur",e)},onKeyDown:function(e){var n=e.target.value;switch(e.code){case"Backspace":0===n.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,null!==this.focusedIndex?this.focusedIndex:this.modelValue.length-1);break;case"Enter":n&&n.trim().length&&!this.maxedOut&&this.addItem(e,n,!0);break;case"ArrowLeft":0===n.length&&this.modelValue&&this.modelValue.length>0&&this.$refs.container.focus();break;case"ArrowRight":e.stopPropagation();break;default:this.separator&&(this.separator===e.key||e.key.match(this.separator))&&this.addItem(e,n,!0)}},onPaste:function(e){var n=this;if(this.separator){var t=(e.clipboardData||window.clipboardData).getData("Text");if(t){var o=this.modelValue||[],r=t.split(this.separator);r=r.filter((function(e){return n.allowDuplicate||-1===o.indexOf(e)})),o=[].concat(s(o),s(r)),this.updateModel(e,o,!0)}}},onContainerFocus:function(){this.focused=!0},onContainerBlur:function(){this.focusedIndex=-1,this.focused=!1},onContainerKeyDown:function(e){switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOn(e);break;case"ArrowRight":this.onArrowRightKeyOn(e);break;case"Backspace":this.onBackspaceKeyOn(e)}},onArrowLeftKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex=null===this.focusedIndex?this.modelValue.length-1:this.focusedIndex-1,this.focusedIndex<0&&(this.focusedIndex=0))},onArrowRightKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex===this.modelValue.length-1?(this.focusedIndex=null,this.$refs.input.focus()):this.focusedIndex++)},onBackspaceKeyOn:function(e){null!==this.focusedIndex&&this.removeItem(e,this.focusedIndex)},updateModel:function(e,n,t){var o=this;this.$emit("update:modelValue",n),this.$emit("add",{originalEvent:e,value:n}),this.$refs.input.value="",this.inputValue="",setTimeout((function(){o.maxedOut&&(o.focused=!1)}),0),t&&e.preventDefault()},addItem:function(e,n,t){if(n&&n.trim().length){var o=this.modelValue?s(this.modelValue):[];(this.allowDuplicate||-1===o.indexOf(n))&&(o.push(n),this.updateModel(e,o,t))}},removeItem:function(e,n){if(!this.disabled){var t=s(this.modelValue),o=t.splice(n,1);this.focusedIndex=null,this.$refs.input.focus(),this.$emit("update:modelValue",t),this.$emit("remove",{originalEvent:e,value:o})}}},computed:{maxedOut:function(){return this.max&&this.modelValue&&this.max===this.modelValue.length},focusedOptionId:function(){return null!==this.focusedIndex?"".concat(this.id,"_chips_item_").concat(this.focusedIndex):null}},components:{TimesCircleIcon:l.default}};function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function b(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function v(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?b(Object(t),!0).forEach((function(n){g(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function g(e,n,t){return(n=x(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function x(e){var n=I(e,"string");return"symbol"===y(n)?n:String(n)}function I(e,n){if("object"!==y(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,n||"default");if("object"!==y(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}var k=["aria-labelledby","aria-label","aria-activedescendant"],w=["id","aria-label","aria-setsize","aria-posinset","data-p-focused"],O=["id","disabled","placeholder"];h.render=function(e,n,t,o,i,l){return r.openBlock(),r.createElementBlock("div",r.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"chips"}),[r.createElementVNode("ul",r.mergeProps({ref:"container",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-activedescendant":i.focused?l.focusedOptionId:void 0,onClick:n[5]||(n[5]=function(e){return l.onWrapperClick()}),onFocus:n[6]||(n[6]=function(){return l.onContainerFocus&&l.onContainerFocus.apply(l,arguments)}),onBlur:n[7]||(n[7]=function(){return l.onContainerBlur&&l.onContainerBlur.apply(l,arguments)}),onKeydown:n[8]||(n[8]=function(){return l.onContainerKeyDown&&l.onContainerKeyDown.apply(l,arguments)})},e.ptm("container")),[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.modelValue,(function(n,t){return r.openBlock(),r.createElementBlock("li",r.mergeProps({key:"".concat(t,"_").concat(n),id:i.id+"_chips_item_"+t,role:"option",class:e.cx("token",{index:t}),"aria-label":n,"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":t+1},e.ptm("token"),{"data-p-focused":i.focusedIndex===t}),[r.renderSlot(e.$slots,"chip",{class:r.normalizeClass(e.cx("label")),value:n},(function(){return[r.createElementVNode("span",r.mergeProps({class:e.cx("label")},e.ptm("label")),r.toDisplayString(n),17)]})),r.renderSlot(e.$slots,"removetokenicon",{class:r.normalizeClass(e.cx("removeTokenIcon")),index:t,onClick:function(e){return l.removeItem(e,t)}},(function(){return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.removeTokenIcon?"span":"TimesCircleIcon"),r.mergeProps({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return l.removeItem(e,t)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,w)})),128)),r.createElementVNode("li",r.mergeProps({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[r.createElementVNode("input",r.mergeProps({ref:"input",id:e.inputId,type:"text",class:e.inputClass,style:e.inputStyle,disabled:e.disabled||l.maxedOut,placeholder:e.placeholder,onFocus:n[0]||(n[0]=function(e){return l.onFocus(e)}),onBlur:n[1]||(n[1]=function(e){return l.onBlur(e)}),onInput:n[2]||(n[2]=function(){return l.onInput&&l.onInput.apply(l,arguments)}),onKeydown:n[3]||(n[3]=function(e){return l.onKeyDown(e)}),onPaste:n[4]||(n[4]=function(e){return l.onPaste(e)})},v(v({},e.inputProps),e.ptm("input"))),null,16,O)],16)],16,k)],16)},module.exports=h;
@@ -4,7 +4,7 @@ import BaseComponent from 'primevue/basecomponent';
4
4
  import { useStyle } from 'primevue/usestyle';
5
5
  import { openBlock, createElementBlock, mergeProps, createElementVNode, Fragment, renderList, renderSlot, normalizeClass, toDisplayString, createBlock, resolveDynamicComponent } from 'vue';
6
6
 
7
- var styles = "\n.p-chips {\n display: inline-flex;\n}\n\n.p-chips-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n}\n\n.p-chips-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n}\n\n.p-chips-input-token {\n flex: 1 1 auto;\n display: inline-flex;\n}\n\n.p-chips-token-icon {\n cursor: pointer;\n}\n\n.p-chips-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n}\n\n.p-fluid .p-chips {\n display: flex;\n}\n";
7
+ var styles = "\n@layer primevue {\n .p-chips {\n display: inline-flex;\n }\n \n .p-chips-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n }\n \n .p-chips-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n }\n \n .p-chips-input-token {\n flex: 1 1 auto;\n display: inline-flex;\n }\n \n .p-chips-token-icon {\n cursor: pointer;\n }\n \n .p-chips-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n }\n \n .p-fluid .p-chips {\n display: flex;\n }\n}\n";
8
8
  var classes = {
9
9
  root: function root(_ref) {
10
10
  var instance = _ref.instance,
@@ -1 +1 @@
1
- import e from"primevue/icons/timescircle";import{UniqueComponentId as n}from"primevue/utils";import t from"primevue/basecomponent";import{useStyle as o}from"primevue/usestyle";import{openBlock as i,createElementBlock as r,mergeProps as a,createElementVNode as l,Fragment as u,renderList as s,renderSlot as c,normalizeClass as p,toDisplayString as d,createBlock as f,resolveDynamicComponent as h}from"vue";var m=o("\n.p-chips {\n display: inline-flex;\n}\n\n.p-chips-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n}\n\n.p-chips-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n}\n\n.p-chips-input-token {\n flex: 1 1 auto;\n display: inline-flex;\n}\n\n.p-chips-token-icon {\n cursor: pointer;\n}\n\n.p-chips-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n}\n\n.p-fluid .p-chips {\n display: flex;\n}\n",{name:"chips",manual:!0});function y(e){return g(e)||x(e)||v(e)||b()}function b(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function v(e,n){if(e){if("string"==typeof e)return I(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?I(e,n):void 0}}function x(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function g(e){if(Array.isArray(e))return I(e)}function I(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=new Array(n);t<n;t++)o[t]=e[t];return o}var k={name:"Chips",extends:{name:"BaseChips",extends:t,props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:[String,Object],default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},placeholder:{type:String,default:null},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},removeTokenIcon:{type:String,default:void 0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:function(e){var n=e.instance,t=e.props;return["p-chips p-component p-inputwrapper",{"p-disabled":t.disabled,"p-focus":n.focused,"p-inputwrapper-filled":t.modelValue&&t.modelValue.length||n.inputValue&&n.inputValue.length,"p-inputwrapper-focus":n.focused}]},container:"p-inputtext p-chips-multiple-container",token:function(e){return["p-chips-token",{"p-focus":e.state.focusedIndex===e.index}]},label:"p-chips-token-label",removeTokenIcon:"p-chips-token-icon",inputToken:"p-chips-input-token"},loadStyle:m.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","add","remove","focus","blur"],data:function(){return{id:n(),inputValue:null,focused:!1,focusedIndex:null}},methods:{onWrapperClick:function(){this.$refs.input.focus()},onInput:function(e){this.inputValue=e.target.value,this.focusedIndex=null},onFocus:function(e){this.focused=!0,this.focusedIndex=null,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedIndex=null,this.addOnBlur&&this.addItem(e,e.target.value,!1),this.$emit("blur",e)},onKeyDown:function(e){var n=e.target.value;switch(e.code){case"Backspace":0===n.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,null!==this.focusedIndex?this.focusedIndex:this.modelValue.length-1);break;case"Enter":n&&n.trim().length&&!this.maxedOut&&this.addItem(e,n,!0);break;case"ArrowLeft":0===n.length&&this.modelValue&&this.modelValue.length>0&&this.$refs.container.focus();break;case"ArrowRight":e.stopPropagation();break;default:this.separator&&(this.separator===e.key||e.key.match(this.separator))&&this.addItem(e,n,!0)}},onPaste:function(e){var n=this;if(this.separator){var t=(e.clipboardData||window.clipboardData).getData("Text");if(t){var o=this.modelValue||[],i=t.split(this.separator);i=i.filter((function(e){return n.allowDuplicate||-1===o.indexOf(e)})),o=[].concat(y(o),y(i)),this.updateModel(e,o,!0)}}},onContainerFocus:function(){this.focused=!0},onContainerBlur:function(){this.focusedIndex=-1,this.focused=!1},onContainerKeyDown:function(e){switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOn(e);break;case"ArrowRight":this.onArrowRightKeyOn(e);break;case"Backspace":this.onBackspaceKeyOn(e)}},onArrowLeftKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex=null===this.focusedIndex?this.modelValue.length-1:this.focusedIndex-1,this.focusedIndex<0&&(this.focusedIndex=0))},onArrowRightKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex===this.modelValue.length-1?(this.focusedIndex=null,this.$refs.input.focus()):this.focusedIndex++)},onBackspaceKeyOn:function(e){null!==this.focusedIndex&&this.removeItem(e,this.focusedIndex)},updateModel:function(e,n,t){var o=this;this.$emit("update:modelValue",n),this.$emit("add",{originalEvent:e,value:n}),this.$refs.input.value="",this.inputValue="",setTimeout((function(){o.maxedOut&&(o.focused=!1)}),0),t&&e.preventDefault()},addItem:function(e,n,t){if(n&&n.trim().length){var o=this.modelValue?y(this.modelValue):[];(this.allowDuplicate||-1===o.indexOf(n))&&(o.push(n),this.updateModel(e,o,t))}},removeItem:function(e,n){if(!this.disabled){var t=y(this.modelValue),o=t.splice(n,1);this.focusedIndex=null,this.$refs.input.focus(),this.$emit("update:modelValue",t),this.$emit("remove",{originalEvent:e,value:o})}}},computed:{maxedOut:function(){return this.max&&this.modelValue&&this.max===this.modelValue.length},focusedOptionId:function(){return null!==this.focusedIndex?"".concat(this.id,"_chips_item_").concat(this.focusedIndex):null}},components:{TimesCircleIcon:e}};function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function O(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function V(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?O(Object(t),!0).forEach((function(n){S(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function S(e,n,t){return(n=C(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function C(e){var n=j(e,"string");return"symbol"===w(n)?n:String(n)}function j(e,n){if("object"!==w(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,n||"default");if("object"!==w(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}var B=["aria-labelledby","aria-label","aria-activedescendant"],P=["id","aria-label","aria-setsize","aria-posinset","data-p-focused"],A=["id","disabled","placeholder"];k.render=function(e,n,t,o,m,y){return i(),r("div",a({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"chips"}),[l("ul",a({ref:"container",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-activedescendant":m.focused?y.focusedOptionId:void 0,onClick:n[5]||(n[5]=function(e){return y.onWrapperClick()}),onFocus:n[6]||(n[6]=function(){return y.onContainerFocus&&y.onContainerFocus.apply(y,arguments)}),onBlur:n[7]||(n[7]=function(){return y.onContainerBlur&&y.onContainerBlur.apply(y,arguments)}),onKeydown:n[8]||(n[8]=function(){return y.onContainerKeyDown&&y.onContainerKeyDown.apply(y,arguments)})},e.ptm("container")),[(i(!0),r(u,null,s(e.modelValue,(function(n,t){return i(),r("li",a({key:"".concat(t,"_").concat(n),id:m.id+"_chips_item_"+t,role:"option",class:e.cx("token",{index:t}),"aria-label":n,"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":t+1},e.ptm("token"),{"data-p-focused":m.focusedIndex===t}),[c(e.$slots,"chip",{class:p(e.cx("label")),value:n},(function(){return[l("span",a({class:e.cx("label")},e.ptm("label")),d(n),17)]})),c(e.$slots,"removetokenicon",{class:p(e.cx("removeTokenIcon")),index:t,onClick:function(e){return y.removeItem(e,t)}},(function(){return[(i(),f(h(e.removeTokenIcon?"span":"TimesCircleIcon"),a({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return y.removeItem(e,t)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,P)})),128)),l("li",a({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[l("input",a({ref:"input",id:e.inputId,type:"text",class:e.inputClass,style:e.inputStyle,disabled:e.disabled||y.maxedOut,placeholder:e.placeholder,onFocus:n[0]||(n[0]=function(e){return y.onFocus(e)}),onBlur:n[1]||(n[1]=function(e){return y.onBlur(e)}),onInput:n[2]||(n[2]=function(){return y.onInput&&y.onInput.apply(y,arguments)}),onKeydown:n[3]||(n[3]=function(e){return y.onKeyDown(e)}),onPaste:n[4]||(n[4]=function(e){return y.onPaste(e)})},V(V({},e.inputProps),e.ptm("input"))),null,16,A)],16)],16,B)],16)};export{k as default};
1
+ import e from"primevue/icons/timescircle";import{UniqueComponentId as n}from"primevue/utils";import t from"primevue/basecomponent";import{useStyle as o}from"primevue/usestyle";import{openBlock as i,createElementBlock as r,mergeProps as a,createElementVNode as l,Fragment as u,renderList as s,renderSlot as c,normalizeClass as p,toDisplayString as d,createBlock as f,resolveDynamicComponent as h}from"vue";var m=o("\n@layer primevue {\n .p-chips {\n display: inline-flex;\n }\n \n .p-chips-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n }\n \n .p-chips-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n }\n \n .p-chips-input-token {\n flex: 1 1 auto;\n display: inline-flex;\n }\n \n .p-chips-token-icon {\n cursor: pointer;\n }\n \n .p-chips-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n }\n \n .p-fluid .p-chips {\n display: flex;\n }\n}\n",{name:"chips",manual:!0});function y(e){return g(e)||x(e)||v(e)||b()}function b(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function v(e,n){if(e){if("string"==typeof e)return I(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?I(e,n):void 0}}function x(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function g(e){if(Array.isArray(e))return I(e)}function I(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=new Array(n);t<n;t++)o[t]=e[t];return o}var k={name:"Chips",extends:{name:"BaseChips",extends:t,props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:[String,Object],default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},placeholder:{type:String,default:null},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},removeTokenIcon:{type:String,default:void 0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:function(e){var n=e.instance,t=e.props;return["p-chips p-component p-inputwrapper",{"p-disabled":t.disabled,"p-focus":n.focused,"p-inputwrapper-filled":t.modelValue&&t.modelValue.length||n.inputValue&&n.inputValue.length,"p-inputwrapper-focus":n.focused}]},container:"p-inputtext p-chips-multiple-container",token:function(e){return["p-chips-token",{"p-focus":e.state.focusedIndex===e.index}]},label:"p-chips-token-label",removeTokenIcon:"p-chips-token-icon",inputToken:"p-chips-input-token"},loadStyle:m.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","add","remove","focus","blur"],data:function(){return{id:n(),inputValue:null,focused:!1,focusedIndex:null}},methods:{onWrapperClick:function(){this.$refs.input.focus()},onInput:function(e){this.inputValue=e.target.value,this.focusedIndex=null},onFocus:function(e){this.focused=!0,this.focusedIndex=null,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedIndex=null,this.addOnBlur&&this.addItem(e,e.target.value,!1),this.$emit("blur",e)},onKeyDown:function(e){var n=e.target.value;switch(e.code){case"Backspace":0===n.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,null!==this.focusedIndex?this.focusedIndex:this.modelValue.length-1);break;case"Enter":n&&n.trim().length&&!this.maxedOut&&this.addItem(e,n,!0);break;case"ArrowLeft":0===n.length&&this.modelValue&&this.modelValue.length>0&&this.$refs.container.focus();break;case"ArrowRight":e.stopPropagation();break;default:this.separator&&(this.separator===e.key||e.key.match(this.separator))&&this.addItem(e,n,!0)}},onPaste:function(e){var n=this;if(this.separator){var t=(e.clipboardData||window.clipboardData).getData("Text");if(t){var o=this.modelValue||[],i=t.split(this.separator);i=i.filter((function(e){return n.allowDuplicate||-1===o.indexOf(e)})),o=[].concat(y(o),y(i)),this.updateModel(e,o,!0)}}},onContainerFocus:function(){this.focused=!0},onContainerBlur:function(){this.focusedIndex=-1,this.focused=!1},onContainerKeyDown:function(e){switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOn(e);break;case"ArrowRight":this.onArrowRightKeyOn(e);break;case"Backspace":this.onBackspaceKeyOn(e)}},onArrowLeftKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex=null===this.focusedIndex?this.modelValue.length-1:this.focusedIndex-1,this.focusedIndex<0&&(this.focusedIndex=0))},onArrowRightKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex===this.modelValue.length-1?(this.focusedIndex=null,this.$refs.input.focus()):this.focusedIndex++)},onBackspaceKeyOn:function(e){null!==this.focusedIndex&&this.removeItem(e,this.focusedIndex)},updateModel:function(e,n,t){var o=this;this.$emit("update:modelValue",n),this.$emit("add",{originalEvent:e,value:n}),this.$refs.input.value="",this.inputValue="",setTimeout((function(){o.maxedOut&&(o.focused=!1)}),0),t&&e.preventDefault()},addItem:function(e,n,t){if(n&&n.trim().length){var o=this.modelValue?y(this.modelValue):[];(this.allowDuplicate||-1===o.indexOf(n))&&(o.push(n),this.updateModel(e,o,t))}},removeItem:function(e,n){if(!this.disabled){var t=y(this.modelValue),o=t.splice(n,1);this.focusedIndex=null,this.$refs.input.focus(),this.$emit("update:modelValue",t),this.$emit("remove",{originalEvent:e,value:o})}}},computed:{maxedOut:function(){return this.max&&this.modelValue&&this.max===this.modelValue.length},focusedOptionId:function(){return null!==this.focusedIndex?"".concat(this.id,"_chips_item_").concat(this.focusedIndex):null}},components:{TimesCircleIcon:e}};function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function O(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function V(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?O(Object(t),!0).forEach((function(n){S(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function S(e,n,t){return(n=C(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function C(e){var n=j(e,"string");return"symbol"===w(n)?n:String(n)}function j(e,n){if("object"!==w(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,n||"default");if("object"!==w(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}var B=["aria-labelledby","aria-label","aria-activedescendant"],P=["id","aria-label","aria-setsize","aria-posinset","data-p-focused"],A=["id","disabled","placeholder"];k.render=function(e,n,t,o,m,y){return i(),r("div",a({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"chips"}),[l("ul",a({ref:"container",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-activedescendant":m.focused?y.focusedOptionId:void 0,onClick:n[5]||(n[5]=function(e){return y.onWrapperClick()}),onFocus:n[6]||(n[6]=function(){return y.onContainerFocus&&y.onContainerFocus.apply(y,arguments)}),onBlur:n[7]||(n[7]=function(){return y.onContainerBlur&&y.onContainerBlur.apply(y,arguments)}),onKeydown:n[8]||(n[8]=function(){return y.onContainerKeyDown&&y.onContainerKeyDown.apply(y,arguments)})},e.ptm("container")),[(i(!0),r(u,null,s(e.modelValue,(function(n,t){return i(),r("li",a({key:"".concat(t,"_").concat(n),id:m.id+"_chips_item_"+t,role:"option",class:e.cx("token",{index:t}),"aria-label":n,"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":t+1},e.ptm("token"),{"data-p-focused":m.focusedIndex===t}),[c(e.$slots,"chip",{class:p(e.cx("label")),value:n},(function(){return[l("span",a({class:e.cx("label")},e.ptm("label")),d(n),17)]})),c(e.$slots,"removetokenicon",{class:p(e.cx("removeTokenIcon")),index:t,onClick:function(e){return y.removeItem(e,t)}},(function(){return[(i(),f(h(e.removeTokenIcon?"span":"TimesCircleIcon"),a({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return y.removeItem(e,t)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,P)})),128)),l("li",a({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[l("input",a({ref:"input",id:e.inputId,type:"text",class:e.inputClass,style:e.inputStyle,disabled:e.disabled||y.maxedOut,placeholder:e.placeholder,onFocus:n[0]||(n[0]=function(e){return y.onFocus(e)}),onBlur:n[1]||(n[1]=function(e){return y.onBlur(e)}),onInput:n[2]||(n[2]=function(){return y.onInput&&y.onInput.apply(y,arguments)}),onKeydown:n[3]||(n[3]=function(e){return y.onKeyDown(e)}),onPaste:n[4]||(n[4]=function(e){return y.onPaste(e)})},V(V({},e.inputProps),e.ptm("input"))),null,16,A)],16)],16,B)],16)};export{k as default};
package/chips/chips.js CHANGED
@@ -7,7 +7,7 @@ this.primevue.chips = (function (TimesCircleIcon, utils, BaseComponent, usestyle
7
7
  var TimesCircleIcon__default = /*#__PURE__*/_interopDefaultLegacy(TimesCircleIcon);
8
8
  var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
9
9
 
10
- var styles = "\n.p-chips {\n display: inline-flex;\n}\n\n.p-chips-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n}\n\n.p-chips-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n}\n\n.p-chips-input-token {\n flex: 1 1 auto;\n display: inline-flex;\n}\n\n.p-chips-token-icon {\n cursor: pointer;\n}\n\n.p-chips-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n}\n\n.p-fluid .p-chips {\n display: flex;\n}\n";
10
+ var styles = "\n@layer primevue {\n .p-chips {\n display: inline-flex;\n }\n \n .p-chips-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n }\n \n .p-chips-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n }\n \n .p-chips-input-token {\n flex: 1 1 auto;\n display: inline-flex;\n }\n \n .p-chips-token-icon {\n cursor: pointer;\n }\n \n .p-chips-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n }\n \n .p-fluid .p-chips {\n display: flex;\n }\n}\n";
11
11
  var classes = {
12
12
  root: function root(_ref) {
13
13
  var instance = _ref.instance,
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.chips=function(e,n,t,o,i){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=r(e),a=r(t),u=o.useStyle("\n.p-chips {\n display: inline-flex;\n}\n\n.p-chips-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n}\n\n.p-chips-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n}\n\n.p-chips-input-token {\n flex: 1 1 auto;\n display: inline-flex;\n}\n\n.p-chips-token-icon {\n cursor: pointer;\n}\n\n.p-chips-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n}\n\n.p-fluid .p-chips {\n display: flex;\n}\n",{name:"chips",manual:!0});function s(e){return f(e)||d(e)||p(e)||c()}function c(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function p(e,n){if(e){if("string"==typeof e)return m(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?m(e,n):void 0}}function d(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function f(e){if(Array.isArray(e))return m(e)}function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=new Array(n);t<n;t++)o[t]=e[t];return o}var h={name:"Chips",extends:{name:"BaseChips",extends:a.default,props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:[String,Object],default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},placeholder:{type:String,default:null},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},removeTokenIcon:{type:String,default:void 0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:function(e){var n=e.instance,t=e.props;return["p-chips p-component p-inputwrapper",{"p-disabled":t.disabled,"p-focus":n.focused,"p-inputwrapper-filled":t.modelValue&&t.modelValue.length||n.inputValue&&n.inputValue.length,"p-inputwrapper-focus":n.focused}]},container:"p-inputtext p-chips-multiple-container",token:function(e){return["p-chips-token",{"p-focus":e.state.focusedIndex===e.index}]},label:"p-chips-token-label",removeTokenIcon:"p-chips-token-icon",inputToken:"p-chips-input-token"},loadStyle:u.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","add","remove","focus","blur"],data:function(){return{id:n.UniqueComponentId(),inputValue:null,focused:!1,focusedIndex:null}},methods:{onWrapperClick:function(){this.$refs.input.focus()},onInput:function(e){this.inputValue=e.target.value,this.focusedIndex=null},onFocus:function(e){this.focused=!0,this.focusedIndex=null,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedIndex=null,this.addOnBlur&&this.addItem(e,e.target.value,!1),this.$emit("blur",e)},onKeyDown:function(e){var n=e.target.value;switch(e.code){case"Backspace":0===n.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,null!==this.focusedIndex?this.focusedIndex:this.modelValue.length-1);break;case"Enter":n&&n.trim().length&&!this.maxedOut&&this.addItem(e,n,!0);break;case"ArrowLeft":0===n.length&&this.modelValue&&this.modelValue.length>0&&this.$refs.container.focus();break;case"ArrowRight":e.stopPropagation();break;default:this.separator&&(this.separator===e.key||e.key.match(this.separator))&&this.addItem(e,n,!0)}},onPaste:function(e){var n=this;if(this.separator){var t=(e.clipboardData||window.clipboardData).getData("Text");if(t){var o=this.modelValue||[],i=t.split(this.separator);i=i.filter((function(e){return n.allowDuplicate||-1===o.indexOf(e)})),o=[].concat(s(o),s(i)),this.updateModel(e,o,!0)}}},onContainerFocus:function(){this.focused=!0},onContainerBlur:function(){this.focusedIndex=-1,this.focused=!1},onContainerKeyDown:function(e){switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOn(e);break;case"ArrowRight":this.onArrowRightKeyOn(e);break;case"Backspace":this.onBackspaceKeyOn(e)}},onArrowLeftKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex=null===this.focusedIndex?this.modelValue.length-1:this.focusedIndex-1,this.focusedIndex<0&&(this.focusedIndex=0))},onArrowRightKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex===this.modelValue.length-1?(this.focusedIndex=null,this.$refs.input.focus()):this.focusedIndex++)},onBackspaceKeyOn:function(e){null!==this.focusedIndex&&this.removeItem(e,this.focusedIndex)},updateModel:function(e,n,t){var o=this;this.$emit("update:modelValue",n),this.$emit("add",{originalEvent:e,value:n}),this.$refs.input.value="",this.inputValue="",setTimeout((function(){o.maxedOut&&(o.focused=!1)}),0),t&&e.preventDefault()},addItem:function(e,n,t){if(n&&n.trim().length){var o=this.modelValue?s(this.modelValue):[];(this.allowDuplicate||-1===o.indexOf(n))&&(o.push(n),this.updateModel(e,o,t))}},removeItem:function(e,n){if(!this.disabled){var t=s(this.modelValue),o=t.splice(n,1);this.focusedIndex=null,this.$refs.input.focus(),this.$emit("update:modelValue",t),this.$emit("remove",{originalEvent:e,value:o})}}},computed:{maxedOut:function(){return this.max&&this.modelValue&&this.max===this.modelValue.length},focusedOptionId:function(){return null!==this.focusedIndex?"".concat(this.id,"_chips_item_").concat(this.focusedIndex):null}},components:{TimesCircleIcon:l.default}};function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function b(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function v(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?b(Object(t),!0).forEach((function(n){g(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function g(e,n,t){return(n=x(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function x(e){var n=I(e,"string");return"symbol"===y(n)?n:String(n)}function I(e,n){if("object"!==y(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,n||"default");if("object"!==y(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}var k=["aria-labelledby","aria-label","aria-activedescendant"],w=["id","aria-label","aria-setsize","aria-posinset","data-p-focused"],O=["id","disabled","placeholder"];return h.render=function(e,n,t,o,r,l){return i.openBlock(),i.createElementBlock("div",i.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"chips"}),[i.createElementVNode("ul",i.mergeProps({ref:"container",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-activedescendant":r.focused?l.focusedOptionId:void 0,onClick:n[5]||(n[5]=function(e){return l.onWrapperClick()}),onFocus:n[6]||(n[6]=function(){return l.onContainerFocus&&l.onContainerFocus.apply(l,arguments)}),onBlur:n[7]||(n[7]=function(){return l.onContainerBlur&&l.onContainerBlur.apply(l,arguments)}),onKeydown:n[8]||(n[8]=function(){return l.onContainerKeyDown&&l.onContainerKeyDown.apply(l,arguments)})},e.ptm("container")),[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.modelValue,(function(n,t){return i.openBlock(),i.createElementBlock("li",i.mergeProps({key:"".concat(t,"_").concat(n),id:r.id+"_chips_item_"+t,role:"option",class:e.cx("token",{index:t}),"aria-label":n,"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":t+1},e.ptm("token"),{"data-p-focused":r.focusedIndex===t}),[i.renderSlot(e.$slots,"chip",{class:i.normalizeClass(e.cx("label")),value:n},(function(){return[i.createElementVNode("span",i.mergeProps({class:e.cx("label")},e.ptm("label")),i.toDisplayString(n),17)]})),i.renderSlot(e.$slots,"removetokenicon",{class:i.normalizeClass(e.cx("removeTokenIcon")),index:t,onClick:function(e){return l.removeItem(e,t)}},(function(){return[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(e.removeTokenIcon?"span":"TimesCircleIcon"),i.mergeProps({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return l.removeItem(e,t)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,w)})),128)),i.createElementVNode("li",i.mergeProps({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[i.createElementVNode("input",i.mergeProps({ref:"input",id:e.inputId,type:"text",class:e.inputClass,style:e.inputStyle,disabled:e.disabled||l.maxedOut,placeholder:e.placeholder,onFocus:n[0]||(n[0]=function(e){return l.onFocus(e)}),onBlur:n[1]||(n[1]=function(e){return l.onBlur(e)}),onInput:n[2]||(n[2]=function(){return l.onInput&&l.onInput.apply(l,arguments)}),onKeydown:n[3]||(n[3]=function(e){return l.onKeyDown(e)}),onPaste:n[4]||(n[4]=function(e){return l.onPaste(e)})},v(v({},e.inputProps),e.ptm("input"))),null,16,O)],16)],16,k)],16)},h}(primevue.icons.timescircle,primevue.utils,primevue.basecomponent,primevue.usestyle,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.chips=function(e,n,t,o,i){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=r(e),a=r(t),u=o.useStyle("\n@layer primevue {\n .p-chips {\n display: inline-flex;\n }\n \n .p-chips-multiple-container {\n margin: 0;\n padding: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n }\n \n .p-chips-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n }\n \n .p-chips-input-token {\n flex: 1 1 auto;\n display: inline-flex;\n }\n \n .p-chips-token-icon {\n cursor: pointer;\n }\n \n .p-chips-input-token input {\n border: 0 none;\n outline: 0 none;\n background-color: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n }\n \n .p-fluid .p-chips {\n display: flex;\n }\n}\n",{name:"chips",manual:!0});function s(e){return f(e)||d(e)||p(e)||c()}function c(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function p(e,n){if(e){if("string"==typeof e)return m(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?m(e,n):void 0}}function d(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function f(e){if(Array.isArray(e))return m(e)}function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=new Array(n);t<n;t++)o[t]=e[t];return o}var h={name:"Chips",extends:{name:"BaseChips",extends:a.default,props:{modelValue:{type:Array,default:null},max:{type:Number,default:null},separator:{type:[String,Object],default:null},addOnBlur:{type:Boolean,default:null},allowDuplicate:{type:Boolean,default:!0},placeholder:{type:String,default:null},disabled:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},removeTokenIcon:{type:String,default:void 0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:function(e){var n=e.instance,t=e.props;return["p-chips p-component p-inputwrapper",{"p-disabled":t.disabled,"p-focus":n.focused,"p-inputwrapper-filled":t.modelValue&&t.modelValue.length||n.inputValue&&n.inputValue.length,"p-inputwrapper-focus":n.focused}]},container:"p-inputtext p-chips-multiple-container",token:function(e){return["p-chips-token",{"p-focus":e.state.focusedIndex===e.index}]},label:"p-chips-token-label",removeTokenIcon:"p-chips-token-icon",inputToken:"p-chips-input-token"},loadStyle:u.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","add","remove","focus","blur"],data:function(){return{id:n.UniqueComponentId(),inputValue:null,focused:!1,focusedIndex:null}},methods:{onWrapperClick:function(){this.$refs.input.focus()},onInput:function(e){this.inputValue=e.target.value,this.focusedIndex=null},onFocus:function(e){this.focused=!0,this.focusedIndex=null,this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.focusedIndex=null,this.addOnBlur&&this.addItem(e,e.target.value,!1),this.$emit("blur",e)},onKeyDown:function(e){var n=e.target.value;switch(e.code){case"Backspace":0===n.length&&this.modelValue&&this.modelValue.length>0&&this.removeItem(e,null!==this.focusedIndex?this.focusedIndex:this.modelValue.length-1);break;case"Enter":n&&n.trim().length&&!this.maxedOut&&this.addItem(e,n,!0);break;case"ArrowLeft":0===n.length&&this.modelValue&&this.modelValue.length>0&&this.$refs.container.focus();break;case"ArrowRight":e.stopPropagation();break;default:this.separator&&(this.separator===e.key||e.key.match(this.separator))&&this.addItem(e,n,!0)}},onPaste:function(e){var n=this;if(this.separator){var t=(e.clipboardData||window.clipboardData).getData("Text");if(t){var o=this.modelValue||[],i=t.split(this.separator);i=i.filter((function(e){return n.allowDuplicate||-1===o.indexOf(e)})),o=[].concat(s(o),s(i)),this.updateModel(e,o,!0)}}},onContainerFocus:function(){this.focused=!0},onContainerBlur:function(){this.focusedIndex=-1,this.focused=!1},onContainerKeyDown:function(e){switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOn(e);break;case"ArrowRight":this.onArrowRightKeyOn(e);break;case"Backspace":this.onBackspaceKeyOn(e)}},onArrowLeftKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex=null===this.focusedIndex?this.modelValue.length-1:this.focusedIndex-1,this.focusedIndex<0&&(this.focusedIndex=0))},onArrowRightKeyOn:function(){0===this.inputValue.length&&this.modelValue&&this.modelValue.length>0&&(this.focusedIndex===this.modelValue.length-1?(this.focusedIndex=null,this.$refs.input.focus()):this.focusedIndex++)},onBackspaceKeyOn:function(e){null!==this.focusedIndex&&this.removeItem(e,this.focusedIndex)},updateModel:function(e,n,t){var o=this;this.$emit("update:modelValue",n),this.$emit("add",{originalEvent:e,value:n}),this.$refs.input.value="",this.inputValue="",setTimeout((function(){o.maxedOut&&(o.focused=!1)}),0),t&&e.preventDefault()},addItem:function(e,n,t){if(n&&n.trim().length){var o=this.modelValue?s(this.modelValue):[];(this.allowDuplicate||-1===o.indexOf(n))&&(o.push(n),this.updateModel(e,o,t))}},removeItem:function(e,n){if(!this.disabled){var t=s(this.modelValue),o=t.splice(n,1);this.focusedIndex=null,this.$refs.input.focus(),this.$emit("update:modelValue",t),this.$emit("remove",{originalEvent:e,value:o})}}},computed:{maxedOut:function(){return this.max&&this.modelValue&&this.max===this.modelValue.length},focusedOptionId:function(){return null!==this.focusedIndex?"".concat(this.id,"_chips_item_").concat(this.focusedIndex):null}},components:{TimesCircleIcon:l.default}};function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function b(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function v(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?b(Object(t),!0).forEach((function(n){g(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function g(e,n,t){return(n=x(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function x(e){var n=I(e,"string");return"symbol"===y(n)?n:String(n)}function I(e,n){if("object"!==y(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,n||"default");if("object"!==y(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}var k=["aria-labelledby","aria-label","aria-activedescendant"],w=["id","aria-label","aria-setsize","aria-posinset","data-p-focused"],O=["id","disabled","placeholder"];return h.render=function(e,n,t,o,r,l){return i.openBlock(),i.createElementBlock("div",i.mergeProps({class:e.cx("root")},e.ptm("root"),{"data-pc-name":"chips"}),[i.createElementVNode("ul",i.mergeProps({ref:"container",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-activedescendant":r.focused?l.focusedOptionId:void 0,onClick:n[5]||(n[5]=function(e){return l.onWrapperClick()}),onFocus:n[6]||(n[6]=function(){return l.onContainerFocus&&l.onContainerFocus.apply(l,arguments)}),onBlur:n[7]||(n[7]=function(){return l.onContainerBlur&&l.onContainerBlur.apply(l,arguments)}),onKeydown:n[8]||(n[8]=function(){return l.onContainerKeyDown&&l.onContainerKeyDown.apply(l,arguments)})},e.ptm("container")),[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.modelValue,(function(n,t){return i.openBlock(),i.createElementBlock("li",i.mergeProps({key:"".concat(t,"_").concat(n),id:r.id+"_chips_item_"+t,role:"option",class:e.cx("token",{index:t}),"aria-label":n,"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":t+1},e.ptm("token"),{"data-p-focused":r.focusedIndex===t}),[i.renderSlot(e.$slots,"chip",{class:i.normalizeClass(e.cx("label")),value:n},(function(){return[i.createElementVNode("span",i.mergeProps({class:e.cx("label")},e.ptm("label")),i.toDisplayString(n),17)]})),i.renderSlot(e.$slots,"removetokenicon",{class:i.normalizeClass(e.cx("removeTokenIcon")),index:t,onClick:function(e){return l.removeItem(e,t)}},(function(){return[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(e.removeTokenIcon?"span":"TimesCircleIcon"),i.mergeProps({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return l.removeItem(e,t)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,w)})),128)),i.createElementVNode("li",i.mergeProps({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[i.createElementVNode("input",i.mergeProps({ref:"input",id:e.inputId,type:"text",class:e.inputClass,style:e.inputStyle,disabled:e.disabled||l.maxedOut,placeholder:e.placeholder,onFocus:n[0]||(n[0]=function(e){return l.onFocus(e)}),onBlur:n[1]||(n[1]=function(e){return l.onBlur(e)}),onInput:n[2]||(n[2]=function(){return l.onInput&&l.onInput.apply(l,arguments)}),onKeydown:n[3]||(n[3]=function(e){return l.onKeyDown(e)}),onPaste:n[4]||(n[4]=function(e){return l.onPaste(e)})},v(v({},e.inputProps),e.ptm("input"))),null,16,O)],16)],16,k)],16)},h}(primevue.icons.timescircle,primevue.utils,primevue.basecomponent,primevue.usestyle,Vue);
@@ -3,12 +3,14 @@ import BaseComponent from 'primevue/basecomponent';
3
3
  import { useStyle } from 'primevue/usestyle';
4
4
 
5
5
  const styles = `
6
- .p-colorpicker-panel .p-colorpicker-color {
7
- background: linear-gradient(to top, #000 0%, rgb(0 0 0 / 0) 100%), linear-gradient(to right, #fff 0%, rgb(255 255 255 / 0) 100%)
8
- }
9
-
10
- .p-colorpicker-panel .p-colorpicker-hue {
11
- background: linear-gradient(0deg, red 0, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, red)
6
+ @layer primevue {
7
+ .p-colorpicker-panel .p-colorpicker-color {
8
+ background: linear-gradient(to top, #000 0%, rgb(0 0 0 / 0) 100%), linear-gradient(to right, #fff 0%, rgb(255 255 255 / 0) 100%)
9
+ }
10
+
11
+ .p-colorpicker-panel .p-colorpicker-hue {
12
+ background: linear-gradient(0deg, red 0, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, red)
13
+ }
12
14
  }
13
15
  `;
14
16
 
@@ -13,7 +13,7 @@ var OverlayEventBus__default = /*#__PURE__*/_interopDefaultLegacy(OverlayEventBu
13
13
  var Portal__default = /*#__PURE__*/_interopDefaultLegacy(Portal);
14
14
  var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
15
15
 
16
- var styles = "\n.p-colorpicker-panel .p-colorpicker-color {\n background: linear-gradient(to top, #000 0%, rgb(0 0 0 / 0) 100%), linear-gradient(to right, #fff 0%, rgb(255 255 255 / 0) 100%)\n}\n\n.p-colorpicker-panel .p-colorpicker-hue {\n background: linear-gradient(0deg, red 0, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, red)\n}\n";
16
+ var styles = "\n@layer primevue {\n .p-colorpicker-panel .p-colorpicker-color {\n background: linear-gradient(to top, #000 0%, rgb(0 0 0 / 0) 100%), linear-gradient(to right, #fff 0%, rgb(255 255 255 / 0) 100%)\n }\n \n .p-colorpicker-panel .p-colorpicker-hue {\n background: linear-gradient(0deg, red 0, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, red)\n }\n}\n";
17
17
  var classes = {
18
18
  root: function root(_ref) {
19
19
  var props = _ref.props;