primereact 10.0.0 → 10.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (483) hide show
  1. package/README.md +1 -1
  2. package/accordion/accordion.esm.js +0 -1
  3. package/api/api.esm.js +0 -1
  4. package/autocomplete/autocomplete.esm.js +8 -7
  5. package/autocomplete/autocomplete.esm.min.js +1 -1
  6. package/avatar/avatar.esm.js +0 -1
  7. package/avatargroup/avatargroup.esm.js +0 -1
  8. package/badge/badge.esm.js +0 -1
  9. package/blockui/blockui.esm.js +3 -1
  10. package/blockui/blockui.esm.min.js +1 -1
  11. package/breadcrumb/breadcrumb.esm.js +0 -1
  12. package/button/button.esm.js +0 -1
  13. package/calendar/calendar.esm.js +2 -1
  14. package/calendar/calendar.esm.min.js +1 -1
  15. package/card/card.esm.js +0 -1
  16. package/carousel/carousel.esm.js +7 -8
  17. package/carousel/carousel.esm.min.js +1 -1
  18. package/cascadeselect/cascadeselect.esm.js +0 -1
  19. package/chart/chart.esm.js +0 -1
  20. package/checkbox/checkbox.esm.js +0 -1
  21. package/chip/chip.esm.js +0 -1
  22. package/chips/chips.esm.js +0 -1
  23. package/colorpicker/colorpicker.esm.js +0 -1
  24. package/column/column.esm.js +0 -1
  25. package/columngroup/columngroup.esm.js +0 -1
  26. package/componentbase/componentbase.cjs.js +12 -7
  27. package/componentbase/componentbase.cjs.min.js +1 -1
  28. package/componentbase/componentbase.esm.js +23 -13
  29. package/componentbase/componentbase.esm.min.js +1 -1
  30. package/componentbase/componentbase.js +12 -7
  31. package/componentbase/componentbase.min.js +1 -1
  32. package/confirmdialog/confirmdialog.esm.js +0 -1
  33. package/confirmpopup/confirmpopup.esm.js +0 -1
  34. package/contextmenu/contextmenu.esm.js +0 -1
  35. package/core/core.js +12 -7
  36. package/core/core.min.js +1 -1
  37. package/csstransition/csstransition.esm.js +0 -1
  38. package/datascroller/datascroller.esm.js +0 -1
  39. package/datatable/datatable.esm.js +0 -1
  40. package/dataview/dataview.esm.js +0 -1
  41. package/deferredcontent/deferredcontent.esm.js +0 -1
  42. package/dialog/dialog.esm.js +2 -1
  43. package/dialog/dialog.esm.min.js +1 -1
  44. package/divider/divider.esm.js +0 -1
  45. package/dock/dock.esm.js +0 -1
  46. package/dropdown/dropdown.esm.js +0 -1
  47. package/editor/editor.esm.js +0 -1
  48. package/fieldset/fieldset.esm.js +0 -1
  49. package/fileupload/fileupload.esm.js +0 -1
  50. package/galleria/galleria.esm.js +11 -7
  51. package/galleria/galleria.esm.min.js +1 -1
  52. package/hooks/hooks.esm.js +0 -6
  53. package/iconbase/iconbase.esm.js +0 -1
  54. package/icons/angledoubledown/index.esm.js +0 -1
  55. package/icons/angledoubleleft/index.esm.js +0 -1
  56. package/icons/angledoubleright/index.esm.js +0 -1
  57. package/icons/angledoubleup/index.esm.js +0 -1
  58. package/icons/angledown/index.esm.js +0 -1
  59. package/icons/angleleft/index.esm.js +0 -1
  60. package/icons/angleright/index.esm.js +0 -1
  61. package/icons/angleup/index.esm.js +0 -1
  62. package/icons/arrowdown/index.esm.js +0 -1
  63. package/icons/arrowup/index.esm.js +0 -1
  64. package/icons/ban/index.esm.js +0 -1
  65. package/icons/bars/index.esm.js +0 -1
  66. package/icons/calendar/index.esm.js +0 -1
  67. package/icons/check/index.esm.js +0 -1
  68. package/icons/chevrondown/index.esm.js +0 -1
  69. package/icons/chevronleft/index.esm.js +0 -1
  70. package/icons/chevronright/index.esm.js +0 -1
  71. package/icons/chevronup/index.esm.js +0 -1
  72. package/icons/download/index.esm.js +0 -1
  73. package/icons/exclamationtriangle/index.esm.js +0 -1
  74. package/icons/eye/index.esm.js +0 -1
  75. package/icons/eyeslash/index.esm.js +0 -1
  76. package/icons/filter/index.esm.js +0 -1
  77. package/icons/filterslash/index.esm.js +0 -1
  78. package/icons/infocircle/index.esm.js +0 -1
  79. package/icons/minus/index.esm.js +0 -1
  80. package/icons/pencil/index.esm.js +0 -1
  81. package/icons/plus/index.esm.js +0 -1
  82. package/icons/refresh/index.esm.js +0 -1
  83. package/icons/search/index.esm.js +0 -1
  84. package/icons/searchminus/index.esm.js +0 -1
  85. package/icons/searchplus/index.esm.js +0 -1
  86. package/icons/sortalt/index.esm.js +0 -1
  87. package/icons/sortamountdown/index.esm.js +0 -1
  88. package/icons/sortamountupalt/index.esm.js +0 -1
  89. package/icons/spinner/index.esm.js +0 -1
  90. package/icons/star/index.esm.js +0 -1
  91. package/icons/starfill/index.esm.js +0 -1
  92. package/icons/thlarge/index.esm.js +0 -1
  93. package/icons/times/index.esm.js +0 -1
  94. package/icons/timescircle/index.esm.js +0 -1
  95. package/icons/trash/index.esm.js +0 -1
  96. package/icons/undo/index.esm.js +0 -1
  97. package/icons/upload/index.esm.js +0 -1
  98. package/icons/windowmaximize/index.esm.js +0 -1
  99. package/icons/windowminimize/index.esm.js +0 -1
  100. package/image/image.esm.js +2 -1
  101. package/image/image.esm.min.js +1 -1
  102. package/inplace/inplace.esm.js +0 -1
  103. package/inputmask/inputmask.esm.js +0 -1
  104. package/inputnumber/inputnumber.esm.js +0 -1
  105. package/inputswitch/inputswitch.esm.js +0 -1
  106. package/inputtext/inputtext.esm.js +0 -1
  107. package/inputtextarea/inputtextarea.esm.js +0 -1
  108. package/keyfilter/keyfilter.esm.js +0 -1
  109. package/knob/knob.esm.js +0 -1
  110. package/listbox/listbox.esm.js +0 -1
  111. package/megamenu/megamenu.esm.js +0 -1
  112. package/mention/mention.esm.js +0 -1
  113. package/menu/menu.esm.js +0 -1
  114. package/menubar/menubar.esm.js +0 -1
  115. package/message/message.esm.js +0 -1
  116. package/messages/messages.esm.js +1 -2
  117. package/messages/messages.esm.min.js +1 -1
  118. package/multiselect/multiselect.esm.js +0 -1
  119. package/multistatecheckbox/multistatecheckbox.esm.js +0 -1
  120. package/orderlist/orderlist.esm.js +9 -5
  121. package/orderlist/orderlist.esm.min.js +1 -1
  122. package/organizationchart/organizationchart.esm.js +0 -1
  123. package/overlaypanel/overlaypanel.esm.js +0 -1
  124. package/overlayservice/overlayservice.esm.js +0 -1
  125. package/package.json +2 -2
  126. package/paginator/paginator.esm.js +0 -1
  127. package/panel/panel.esm.js +0 -1
  128. package/panelmenu/panelmenu.esm.js +0 -1
  129. package/passthrough/index.esm.js +0 -1
  130. package/passthrough/tailwind/index.cjs.js +2 -4
  131. package/passthrough/tailwind/index.cjs.min.js +1 -1
  132. package/passthrough/tailwind/index.esm.js +149 -148
  133. package/passthrough/tailwind/index.esm.min.js +1 -1
  134. package/passthrough/tailwind/index.js +2 -4
  135. package/passthrough/tailwind/index.min.js +1 -1
  136. package/password/password.esm.js +0 -1
  137. package/picklist/picklist.esm.js +0 -1
  138. package/portal/portal.esm.js +0 -1
  139. package/primereact.all.cjs.js +12 -7
  140. package/primereact.all.cjs.min.js +1 -1
  141. package/primereact.all.esm.js +70 -42
  142. package/primereact.all.esm.min.js +1 -1
  143. package/primereact.all.js +12 -7
  144. package/primereact.all.min.js +1 -1
  145. package/progressbar/progressbar.esm.js +0 -1
  146. package/progressspinner/progressspinner.esm.js +0 -1
  147. package/radiobutton/radiobutton.esm.js +0 -1
  148. package/rating/rating.esm.js +0 -1
  149. package/ripple/ripple.esm.js +0 -1
  150. package/row/row.esm.js +0 -1
  151. package/scrollpanel/scrollpanel.esm.js +0 -1
  152. package/scrolltop/scrolltop.esm.js +0 -1
  153. package/selectbutton/selectbutton.esm.js +0 -1
  154. package/sidebar/sidebar.esm.js +2 -1
  155. package/sidebar/sidebar.esm.min.js +1 -1
  156. package/skeleton/skeleton.esm.js +0 -1
  157. package/slidemenu/slidemenu.esm.js +0 -1
  158. package/slider/slider.esm.js +0 -1
  159. package/speeddial/speeddial.esm.js +0 -1
  160. package/splitbutton/splitbutton.esm.js +0 -1
  161. package/splitter/splitter.esm.js +0 -1
  162. package/steps/steps.esm.js +0 -1
  163. package/styleclass/styleclass.esm.js +0 -1
  164. package/tabmenu/tabmenu.esm.js +0 -1
  165. package/tabview/tabview.esm.js +0 -1
  166. package/tag/tag.esm.js +0 -1
  167. package/terminal/terminal.esm.js +0 -1
  168. package/terminalservice/terminalservice.esm.js +0 -1
  169. package/tieredmenu/tieredmenu.esm.js +0 -1
  170. package/timeline/timeline.esm.js +0 -1
  171. package/toast/toast.esm.js +0 -1
  172. package/togglebutton/togglebutton.esm.js +0 -1
  173. package/toolbar/toolbar.esm.js +0 -1
  174. package/tooltip/tooltip.esm.js +0 -1
  175. package/tree/tree.esm.js +0 -1
  176. package/treeselect/treeselect.esm.js +0 -1
  177. package/treetable/treetable.esm.js +0 -1
  178. package/tristatecheckbox/tristatecheckbox.esm.js +0 -1
  179. package/utils/utils.esm.js +0 -1
  180. package/virtualscroller/virtualscroller.esm.js +0 -1
  181. package/web-types.json +1 -1
  182. package/accordion/accordion.esm.min.mjs +0 -1
  183. package/accordion/accordion.esm.mjs +0 -420
  184. package/api/api.esm.min.mjs +0 -1
  185. package/api/api.esm.mjs +0 -943
  186. package/autocomplete/autocomplete.esm.min.mjs +0 -1
  187. package/autocomplete/autocomplete.esm.mjs +0 -1128
  188. package/avatar/avatar.esm.min.mjs +0 -1
  189. package/avatar/avatar.esm.mjs +0 -244
  190. package/avatargroup/avatargroup.esm.min.mjs +0 -1
  191. package/avatargroup/avatargroup.esm.mjs +0 -54
  192. package/badge/badge.esm.min.mjs +0 -1
  193. package/badge/badge.esm.mjs +0 -109
  194. package/blockui/blockui.esm.min.mjs +0 -1
  195. package/blockui/blockui.esm.mjs +0 -267
  196. package/breadcrumb/breadcrumb.esm.min.mjs +0 -1
  197. package/breadcrumb/breadcrumb.esm.mjs +0 -350
  198. package/button/button.esm.min.mjs +0 -1
  199. package/button/button.esm.mjs +0 -294
  200. package/calendar/calendar.esm.min.mjs +0 -1
  201. package/calendar/calendar.esm.mjs +0 -3474
  202. package/card/card.esm.min.mjs +0 -1
  203. package/card/card.esm.mjs +0 -97
  204. package/carousel/carousel.esm.min.mjs +0 -1
  205. package/carousel/carousel.esm.mjs +0 -800
  206. package/cascadeselect/cascadeselect.esm.min.mjs +0 -1
  207. package/cascadeselect/cascadeselect.esm.mjs +0 -818
  208. package/chart/chart.esm.min.mjs +0 -1
  209. package/chart/chart.esm.mjs +0 -154
  210. package/checkbox/checkbox.esm.min.mjs +0 -1
  211. package/checkbox/checkbox.esm.mjs +0 -356
  212. package/chip/chip.esm.min.mjs +0 -1
  213. package/chip/chip.esm.mjs +0 -247
  214. package/chips/chips.esm.min.mjs +0 -1
  215. package/chips/chips.esm.mjs +0 -500
  216. package/colorpicker/colorpicker.esm.min.mjs +0 -1
  217. package/colorpicker/colorpicker.esm.mjs +0 -787
  218. package/column/column.esm.min.mjs +0 -1
  219. package/column/column.esm.mjs +0 -7
  220. package/columngroup/columngroup.esm.min.mjs +0 -1
  221. package/columngroup/columngroup.esm.mjs +0 -5
  222. package/componentbase/componentbase.esm.min.mjs +0 -1
  223. package/componentbase/componentbase.esm.mjs +0 -328
  224. package/confirmdialog/confirmdialog.esm.min.mjs +0 -1
  225. package/confirmdialog/confirmdialog.esm.mjs +0 -375
  226. package/confirmpopup/confirmpopup.esm.min.mjs +0 -1
  227. package/confirmpopup/confirmpopup.esm.mjs +0 -609
  228. package/contextmenu/contextmenu.esm.min.mjs +0 -1
  229. package/contextmenu/contextmenu.esm.mjs +0 -663
  230. package/csstransition/csstransition.esm.min.mjs +0 -1
  231. package/csstransition/csstransition.esm.mjs +0 -137
  232. package/datascroller/datascroller.esm.min.mjs +0 -1
  233. package/datascroller/datascroller.esm.mjs +0 -319
  234. package/datatable/datatable.esm.min.mjs +0 -1
  235. package/datatable/datatable.esm.mjs +0 -6635
  236. package/dataview/dataview.esm.min.mjs +0 -1
  237. package/dataview/dataview.esm.mjs +0 -505
  238. package/deferredcontent/deferredcontent.esm.min.mjs +0 -1
  239. package/deferredcontent/deferredcontent.esm.mjs +0 -132
  240. package/dialog/dialog.esm.min.mjs +0 -1
  241. package/dialog/dialog.esm.mjs +0 -984
  242. package/divider/divider.esm.min.mjs +0 -1
  243. package/divider/divider.esm.mjs +0 -78
  244. package/dock/dock.esm.min.mjs +0 -1
  245. package/dock/dock.esm.mjs +0 -347
  246. package/dropdown/dropdown.esm.min.mjs +0 -1
  247. package/dropdown/dropdown.esm.mjs +0 -1379
  248. package/editor/editor.esm.min.mjs +0 -1
  249. package/editor/editor.esm.mjs +0 -337
  250. package/fieldset/fieldset.esm.min.mjs +0 -1
  251. package/fieldset/fieldset.esm.mjs +0 -269
  252. package/fileupload/fileupload.esm.min.mjs +0 -1
  253. package/fileupload/fileupload.esm.mjs +0 -1004
  254. package/galleria/galleria.esm.min.mjs +0 -1
  255. package/galleria/galleria.esm.mjs +0 -1094
  256. package/hooks/hooks.esm.min.mjs +0 -1
  257. package/hooks/hooks.esm.mjs +0 -1036
  258. package/iconbase/iconbase.esm.min.mjs +0 -1
  259. package/iconbase/iconbase.esm.mjs +0 -32
  260. package/icons/angledoubledown/index.esm.min.mjs +0 -1
  261. package/icons/angledoubledown/index.esm.mjs +0 -38
  262. package/icons/angledoubleleft/index.esm.min.mjs +0 -1
  263. package/icons/angledoubleleft/index.esm.mjs +0 -38
  264. package/icons/angledoubleright/index.esm.min.mjs +0 -1
  265. package/icons/angledoubleright/index.esm.mjs +0 -38
  266. package/icons/angledoubleup/index.esm.min.mjs +0 -1
  267. package/icons/angledoubleup/index.esm.mjs +0 -38
  268. package/icons/angledown/index.esm.min.mjs +0 -1
  269. package/icons/angledown/index.esm.mjs +0 -36
  270. package/icons/angleleft/index.esm.min.mjs +0 -1
  271. package/icons/angleleft/index.esm.mjs +0 -36
  272. package/icons/angleright/index.esm.min.mjs +0 -1
  273. package/icons/angleright/index.esm.mjs +0 -36
  274. package/icons/angleup/index.esm.min.mjs +0 -1
  275. package/icons/angleup/index.esm.mjs +0 -36
  276. package/icons/arrowdown/index.esm.min.mjs +0 -1
  277. package/icons/arrowdown/index.esm.mjs +0 -660
  278. package/icons/arrowup/index.esm.min.mjs +0 -1
  279. package/icons/arrowup/index.esm.mjs +0 -660
  280. package/icons/ban/index.esm.min.mjs +0 -1
  281. package/icons/ban/index.esm.mjs +0 -658
  282. package/icons/bars/index.esm.min.mjs +0 -1
  283. package/icons/bars/index.esm.mjs +0 -38
  284. package/icons/calendar/index.esm.min.mjs +0 -1
  285. package/icons/calendar/index.esm.mjs +0 -36
  286. package/icons/check/index.esm.min.mjs +0 -1
  287. package/icons/check/index.esm.mjs +0 -36
  288. package/icons/chevrondown/index.esm.min.mjs +0 -1
  289. package/icons/chevrondown/index.esm.mjs +0 -36
  290. package/icons/chevronleft/index.esm.min.mjs +0 -1
  291. package/icons/chevronleft/index.esm.mjs +0 -36
  292. package/icons/chevronright/index.esm.min.mjs +0 -1
  293. package/icons/chevronright/index.esm.mjs +0 -36
  294. package/icons/chevronup/index.esm.min.mjs +0 -1
  295. package/icons/chevronup/index.esm.mjs +0 -36
  296. package/icons/download/index.esm.min.mjs +0 -1
  297. package/icons/download/index.esm.mjs +0 -660
  298. package/icons/exclamationtriangle/index.esm.min.mjs +0 -1
  299. package/icons/exclamationtriangle/index.esm.mjs +0 -664
  300. package/icons/eye/index.esm.min.mjs +0 -1
  301. package/icons/eye/index.esm.mjs +0 -38
  302. package/icons/eyeslash/index.esm.min.mjs +0 -1
  303. package/icons/eyeslash/index.esm.mjs +0 -660
  304. package/icons/filter/index.esm.min.mjs +0 -1
  305. package/icons/filter/index.esm.mjs +0 -658
  306. package/icons/filterslash/index.esm.min.mjs +0 -1
  307. package/icons/filterslash/index.esm.mjs +0 -660
  308. package/icons/infocircle/index.esm.min.mjs +0 -1
  309. package/icons/infocircle/index.esm.mjs +0 -660
  310. package/icons/minus/index.esm.min.mjs +0 -1
  311. package/icons/minus/index.esm.mjs +0 -36
  312. package/icons/pencil/index.esm.min.mjs +0 -1
  313. package/icons/pencil/index.esm.mjs +0 -658
  314. package/icons/plus/index.esm.min.mjs +0 -1
  315. package/icons/plus/index.esm.mjs +0 -658
  316. package/icons/refresh/index.esm.min.mjs +0 -1
  317. package/icons/refresh/index.esm.mjs +0 -660
  318. package/icons/search/index.esm.min.mjs +0 -1
  319. package/icons/search/index.esm.mjs +0 -660
  320. package/icons/searchminus/index.esm.min.mjs +0 -1
  321. package/icons/searchminus/index.esm.mjs +0 -660
  322. package/icons/searchplus/index.esm.min.mjs +0 -1
  323. package/icons/searchplus/index.esm.mjs +0 -660
  324. package/icons/sortalt/index.esm.min.mjs +0 -1
  325. package/icons/sortalt/index.esm.mjs +0 -667
  326. package/icons/sortamountdown/index.esm.min.mjs +0 -1
  327. package/icons/sortamountdown/index.esm.mjs +0 -673
  328. package/icons/sortamountupalt/index.esm.min.mjs +0 -1
  329. package/icons/sortamountupalt/index.esm.mjs +0 -673
  330. package/icons/spinner/index.esm.min.mjs +0 -1
  331. package/icons/spinner/index.esm.mjs +0 -658
  332. package/icons/star/index.esm.min.mjs +0 -1
  333. package/icons/star/index.esm.mjs +0 -658
  334. package/icons/starfill/index.esm.min.mjs +0 -1
  335. package/icons/starfill/index.esm.mjs +0 -658
  336. package/icons/thlarge/index.esm.min.mjs +0 -1
  337. package/icons/thlarge/index.esm.mjs +0 -660
  338. package/icons/times/index.esm.min.mjs +0 -1
  339. package/icons/times/index.esm.mjs +0 -36
  340. package/icons/timescircle/index.esm.min.mjs +0 -1
  341. package/icons/timescircle/index.esm.mjs +0 -660
  342. package/icons/trash/index.esm.min.mjs +0 -1
  343. package/icons/trash/index.esm.mjs +0 -660
  344. package/icons/undo/index.esm.min.mjs +0 -1
  345. package/icons/undo/index.esm.mjs +0 -660
  346. package/icons/upload/index.esm.min.mjs +0 -1
  347. package/icons/upload/index.esm.mjs +0 -660
  348. package/icons/windowmaximize/index.esm.min.mjs +0 -1
  349. package/icons/windowmaximize/index.esm.mjs +0 -660
  350. package/icons/windowminimize/index.esm.min.mjs +0 -1
  351. package/icons/windowminimize/index.esm.mjs +0 -660
  352. package/image/image.esm.min.mjs +0 -1
  353. package/image/image.esm.mjs +0 -1163
  354. package/inplace/inplace.esm.min.mjs +0 -1
  355. package/inplace/inplace.esm.mjs +0 -242
  356. package/inputmask/inputmask.esm.min.mjs +0 -1
  357. package/inputmask/inputmask.esm.mjs +0 -559
  358. package/inputnumber/inputnumber.esm.min.mjs +0 -1
  359. package/inputnumber/inputnumber.esm.mjs +0 -1208
  360. package/inputswitch/inputswitch.esm.min.mjs +0 -1
  361. package/inputswitch/inputswitch.esm.mjs +0 -290
  362. package/inputtext/inputtext.esm.min.mjs +0 -1
  363. package/inputtext/inputtext.esm.mjs +0 -170
  364. package/inputtextarea/inputtextarea.esm.min.mjs +0 -1
  365. package/inputtextarea/inputtextarea.esm.mjs +0 -219
  366. package/keyfilter/keyfilter.esm.min.mjs +0 -1
  367. package/keyfilter/keyfilter.esm.mjs +0 -107
  368. package/knob/knob.esm.min.mjs +0 -1
  369. package/knob/knob.esm.mjs +0 -317
  370. package/listbox/listbox.esm.min.mjs +0 -1
  371. package/listbox/listbox.esm.mjs +0 -809
  372. package/megamenu/megamenu.esm.min.mjs +0 -1
  373. package/megamenu/megamenu.esm.mjs +0 -715
  374. package/mention/mention.esm.min.mjs +0 -1
  375. package/mention/mention.esm.mjs +0 -770
  376. package/menu/menu.esm.min.mjs +0 -1
  377. package/menu/menu.esm.mjs +0 -484
  378. package/menubar/menubar.esm.min.mjs +0 -1
  379. package/menubar/menubar.esm.mjs +0 -583
  380. package/message/message.esm.min.mjs +0 -1
  381. package/message/message.esm.mjs +0 -168
  382. package/messages/messages.esm.min.mjs +0 -1
  383. package/messages/messages.esm.mjs +0 -438
  384. package/multiselect/multiselect.esm.min.mjs +0 -1
  385. package/multiselect/multiselect.esm.mjs +0 -1723
  386. package/multistatecheckbox/multistatecheckbox.esm.min.mjs +0 -1
  387. package/multistatecheckbox/multistatecheckbox.esm.mjs +0 -351
  388. package/orderlist/orderlist.esm.min.mjs +0 -1
  389. package/orderlist/orderlist.esm.mjs +0 -820
  390. package/organizationchart/organizationchart.esm.min.mjs +0 -1
  391. package/organizationchart/organizationchart.esm.mjs +0 -479
  392. package/overlaypanel/overlaypanel.esm.min.mjs +0 -1
  393. package/overlaypanel/overlaypanel.esm.mjs +0 -515
  394. package/overlayservice/overlayservice.esm.min.mjs +0 -1
  395. package/overlayservice/overlayservice.esm.mjs +0 -6
  396. package/paginator/paginator.esm.min.mjs +0 -1
  397. package/paginator/paginator.esm.mjs +0 -932
  398. package/panel/panel.esm.min.mjs +0 -1
  399. package/panel/panel.esm.mjs +0 -315
  400. package/panelmenu/panelmenu.esm.min.mjs +0 -1
  401. package/panelmenu/panelmenu.esm.mjs +0 -644
  402. package/passthrough/index.esm.min.mjs +0 -1
  403. package/passthrough/index.esm.mjs +0 -70
  404. package/passthrough/tailwind/index.esm.min.mjs +0 -1
  405. package/passthrough/tailwind/index.esm.mjs +0 -3513
  406. package/password/password.esm.min.mjs +0 -1
  407. package/password/password.esm.mjs +0 -566
  408. package/picklist/picklist.esm.min.mjs +0 -1
  409. package/picklist/picklist.esm.mjs +0 -1118
  410. package/portal/portal.esm.min.mjs +0 -1
  411. package/portal/portal.esm.mjs +0 -109
  412. package/primereact.all.esm.min.mjs +0 -1
  413. package/primereact.all.esm.mjs +0 -51669
  414. package/progressbar/progressbar.esm.min.mjs +0 -1
  415. package/progressbar/progressbar.esm.mjs +0 -189
  416. package/progressspinner/progressspinner.esm.min.mjs +0 -1
  417. package/progressspinner/progressspinner.esm.mjs +0 -87
  418. package/radiobutton/radiobutton.esm.min.mjs +0 -1
  419. package/radiobutton/radiobutton.esm.mjs +0 -328
  420. package/rating/rating.esm.min.mjs +0 -1
  421. package/rating/rating.esm.mjs +0 -272
  422. package/ripple/ripple.esm.min.mjs +0 -1
  423. package/ripple/ripple.esm.mjs +0 -99
  424. package/row/row.esm.min.mjs +0 -1
  425. package/row/row.esm.mjs +0 -35
  426. package/scrollpanel/scrollpanel.esm.min.mjs +0 -1
  427. package/scrollpanel/scrollpanel.esm.mjs +0 -209
  428. package/scrolltop/scrolltop.esm.min.mjs +0 -1
  429. package/scrolltop/scrolltop.esm.mjs +0 -268
  430. package/selectbutton/selectbutton.esm.min.mjs +0 -1
  431. package/selectbutton/selectbutton.esm.mjs +0 -326
  432. package/sidebar/sidebar.esm.min.mjs +0 -1
  433. package/sidebar/sidebar.esm.mjs +0 -544
  434. package/skeleton/skeleton.esm.min.mjs +0 -1
  435. package/skeleton/skeleton.esm.mjs +0 -124
  436. package/slidemenu/slidemenu.esm.min.mjs +0 -1
  437. package/slidemenu/slidemenu.esm.mjs +0 -688
  438. package/slider/slider.esm.min.mjs +0 -1
  439. package/slider/slider.esm.mjs +0 -477
  440. package/speeddial/speeddial.esm.min.mjs +0 -1
  441. package/speeddial/speeddial.esm.mjs +0 -520
  442. package/splitbutton/splitbutton.esm.min.mjs +0 -1
  443. package/splitbutton/splitbutton.esm.mjs +0 -544
  444. package/splitter/splitter.esm.min.mjs +0 -1
  445. package/splitter/splitter.esm.mjs +0 -465
  446. package/steps/steps.esm.min.mjs +0 -1
  447. package/steps/steps.esm.mjs +0 -293
  448. package/styleclass/styleclass.esm.min.mjs +0 -1
  449. package/styleclass/styleclass.esm.mjs +0 -268
  450. package/tabmenu/tabmenu.esm.min.mjs +0 -1
  451. package/tabmenu/tabmenu.esm.mjs +0 -331
  452. package/tabview/tabview.esm.min.mjs +0 -1
  453. package/tabview/tabview.esm.mjs +0 -677
  454. package/tag/tag.esm.min.mjs +0 -1
  455. package/tag/tag.esm.mjs +0 -116
  456. package/terminal/terminal.esm.min.mjs +0 -1
  457. package/terminal/terminal.esm.mjs +0 -279
  458. package/terminalservice/terminalservice.esm.min.mjs +0 -1
  459. package/terminalservice/terminalservice.esm.mjs +0 -6
  460. package/tieredmenu/tieredmenu.esm.min.mjs +0 -1
  461. package/tieredmenu/tieredmenu.esm.mjs +0 -698
  462. package/timeline/timeline.esm.min.mjs +0 -1
  463. package/timeline/timeline.esm.mjs +0 -163
  464. package/toast/toast.esm.min.mjs +0 -1
  465. package/toast/toast.esm.mjs +0 -738
  466. package/togglebutton/togglebutton.esm.min.mjs +0 -1
  467. package/togglebutton/togglebutton.esm.mjs +0 -216
  468. package/toolbar/toolbar.esm.min.mjs +0 -1
  469. package/toolbar/toolbar.esm.mjs +0 -78
  470. package/tooltip/tooltip.esm.min.mjs +0 -1
  471. package/tooltip/tooltip.esm.mjs +0 -695
  472. package/tree/tree.esm.min.mjs +0 -1
  473. package/tree/tree.esm.mjs +0 -1402
  474. package/treeselect/treeselect.esm.min.mjs +0 -1
  475. package/treeselect/treeselect.esm.mjs +0 -929
  476. package/treetable/treetable.esm.min.mjs +0 -1
  477. package/treetable/treetable.esm.mjs +0 -3093
  478. package/tristatecheckbox/tristatecheckbox.esm.min.mjs +0 -1
  479. package/tristatecheckbox/tristatecheckbox.esm.mjs +0 -291
  480. package/utils/utils.esm.min.mjs +0 -1
  481. package/utils/utils.esm.mjs +0 -2382
  482. package/virtualscroller/virtualscroller.esm.min.mjs +0 -1
  483. package/virtualscroller/virtualscroller.esm.mjs +0 -971
@@ -1,800 +0,0 @@
1
- 'use client';
2
- import * as React from 'react';
3
- import PrimeReact, { PrimeReactContext, ariaLabel } from 'primereact/api';
4
- import { ComponentBase, useHandleStyle } from 'primereact/componentbase';
5
- import { usePrevious, useResizeListener, useMountEffect, useUpdateEffect } from 'primereact/hooks';
6
- import { ChevronDownIcon } from 'primereact/icons/chevrondown';
7
- import { ChevronLeftIcon } from 'primereact/icons/chevronleft';
8
- import { ChevronRightIcon } from 'primereact/icons/chevronright';
9
- import { ChevronUpIcon } from 'primereact/icons/chevronup';
10
- import { Ripple } from 'primereact/ripple';
11
- import { classNames, mergeProps, UniqueComponentId, DomHandler, ObjectUtils, IconUtils } from 'primereact/utils';
12
-
13
- function _typeof(o) {
14
- "@babel/helpers - typeof";
15
-
16
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
17
- return typeof o;
18
- } : function (o) {
19
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
20
- }, _typeof(o);
21
- }
22
-
23
- function _toPrimitive(input, hint) {
24
- if (_typeof(input) !== "object" || input === null) return input;
25
- var prim = input[Symbol.toPrimitive];
26
- if (prim !== undefined) {
27
- var res = prim.call(input, hint || "default");
28
- if (_typeof(res) !== "object") return res;
29
- throw new TypeError("@@toPrimitive must return a primitive value.");
30
- }
31
- return (hint === "string" ? String : Number)(input);
32
- }
33
-
34
- function _toPropertyKey(arg) {
35
- var key = _toPrimitive(arg, "string");
36
- return _typeof(key) === "symbol" ? key : String(key);
37
- }
38
-
39
- function _defineProperty(obj, key, value) {
40
- key = _toPropertyKey(key);
41
- if (key in obj) {
42
- Object.defineProperty(obj, key, {
43
- value: value,
44
- enumerable: true,
45
- configurable: true,
46
- writable: true
47
- });
48
- } else {
49
- obj[key] = value;
50
- }
51
- return obj;
52
- }
53
-
54
- function _extends() {
55
- _extends = Object.assign ? Object.assign.bind() : function (target) {
56
- for (var i = 1; i < arguments.length; i++) {
57
- var source = arguments[i];
58
- for (var key in source) {
59
- if (Object.prototype.hasOwnProperty.call(source, key)) {
60
- target[key] = source[key];
61
- }
62
- }
63
- }
64
- return target;
65
- };
66
- return _extends.apply(this, arguments);
67
- }
68
-
69
- function _arrayLikeToArray(arr, len) {
70
- if (len == null || len > arr.length) len = arr.length;
71
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
72
- return arr2;
73
- }
74
-
75
- function _arrayWithoutHoles(arr) {
76
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
77
- }
78
-
79
- function _iterableToArray(iter) {
80
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
81
- }
82
-
83
- function _unsupportedIterableToArray(o, minLen) {
84
- if (!o) return;
85
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
86
- var n = Object.prototype.toString.call(o).slice(8, -1);
87
- if (n === "Object" && o.constructor) n = o.constructor.name;
88
- if (n === "Map" || n === "Set") return Array.from(o);
89
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
90
- }
91
-
92
- function _nonIterableSpread() {
93
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
94
- }
95
-
96
- function _toConsumableArray(arr) {
97
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
98
- }
99
-
100
- function _arrayWithHoles(arr) {
101
- if (Array.isArray(arr)) return arr;
102
- }
103
-
104
- function _iterableToArrayLimit(r, l) {
105
- var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
106
- if (null != t) {
107
- var e,
108
- n,
109
- i,
110
- u,
111
- a = [],
112
- f = !0,
113
- o = !1;
114
- try {
115
- if (i = (t = t.call(r)).next, 0 === l) {
116
- if (Object(t) !== t) return;
117
- f = !1;
118
- } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
119
- } catch (r) {
120
- o = !0, n = r;
121
- } finally {
122
- try {
123
- if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
124
- } finally {
125
- if (o) throw n;
126
- }
127
- }
128
- return a;
129
- }
130
- }
131
-
132
- function _nonIterableRest() {
133
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
134
- }
135
-
136
- function _slicedToArray(arr, i) {
137
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
138
- }
139
-
140
- var styles = "\n@layer primereact {\n .p-carousel {\n display: flex;\n flex-direction: column;\n }\n \n .p-carousel-content {\n display: flex;\n flex-direction: column;\n overflow: auto;\n }\n \n .p-carousel-prev,\n .p-carousel-next {\n align-self: center;\n flex-grow: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n }\n \n .p-carousel-container {\n display: flex;\n flex-direction: row;\n }\n \n .p-carousel-items-content {\n overflow: hidden;\n width: 100%;\n }\n \n .p-carousel-items-container {\n display: flex;\n flex-direction: row;\n }\n \n .p-carousel-indicators {\n display: flex;\n flex-direction: row;\n justify-content: center;\n flex-wrap: wrap;\n }\n \n .p-carousel-indicator > button {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n \n /* Vertical */\n .p-carousel-vertical .p-carousel-container {\n flex-direction: column;\n }\n \n .p-carousel-vertical .p-carousel-items-container {\n flex-direction: column;\n height: 100%;\n }\n \n /* Keyboard Support */\n .p-items-hidden .p-carousel-item {\n visibility: hidden;\n }\n \n .p-items-hidden .p-carousel-item.p-carousel-item-active {\n visibility: visible;\n }\n}\n";
141
- var classes = {
142
- root: function root(_ref) {
143
- var isVertical = _ref.isVertical;
144
- return classNames('p-carousel p-component', {
145
- 'p-carousel-vertical': isVertical,
146
- 'p-carousel-horizontal': !isVertical
147
- });
148
- },
149
- container: 'p-carousel-container',
150
- content: 'p-carousel-content',
151
- indicators: 'p-carousel-indicators p-reset',
152
- header: 'p-carousel-header',
153
- footer: 'p-carousel-footer',
154
- itemsContainer: 'p-carousel-items-container',
155
- itemsContent: 'p-carousel-items-content',
156
- previousButton: function previousButton(_ref2) {
157
- var isDisabled = _ref2.isDisabled;
158
- return classNames('p-carousel-prev p-link', {
159
- 'p-disabled': isDisabled
160
- });
161
- },
162
- previousButtonIcon: 'p-carousel-prev-icon',
163
- nextButton: function nextButton(_ref3) {
164
- var isDisabled = _ref3.isDisabled;
165
- return classNames('p-carousel-next p-link', {
166
- 'p-disabled': isDisabled
167
- });
168
- },
169
- nextButtonIcon: 'p-carousel-next-icon',
170
- indicator: function indicator(_ref4) {
171
- var isActive = _ref4.isActive;
172
- return classNames('p-carousel-indicator', {
173
- 'p-highlight': isActive
174
- });
175
- },
176
- indicatorButton: 'p-link',
177
- itemCloned: function itemCloned(_ref5) {
178
- var props = _ref5.itemProps;
179
- return classNames(props.className, 'p-carousel-item', {
180
- 'p-carousel-item-active': props.active,
181
- 'p-carousel-item-start': props.start,
182
- 'p-carousel-item-end': props.end
183
- });
184
- },
185
- item: function item(_ref6) {
186
- var props = _ref6.itemProps;
187
- return classNames(props.className, 'p-carousel-item', {
188
- 'p-carousel-item-active': props.active,
189
- 'p-carousel-item-start': props.start,
190
- 'p-carousel-item-end': props.end
191
- });
192
- }
193
- };
194
- var inlineStyles = {
195
- itemsContent: function itemsContent(_ref7) {
196
- var height = _ref7.height;
197
- return {
198
- height: height
199
- };
200
- }
201
- };
202
- var CarouselBase = ComponentBase.extend({
203
- defaultProps: {
204
- __TYPE: 'Carousel',
205
- id: null,
206
- value: null,
207
- page: 0,
208
- header: null,
209
- footer: null,
210
- style: null,
211
- className: null,
212
- itemTemplate: null,
213
- circular: false,
214
- showIndicators: true,
215
- showNavigators: true,
216
- autoplayInterval: 0,
217
- numVisible: 1,
218
- numScroll: 1,
219
- prevIcon: null,
220
- nextIcon: null,
221
- responsiveOptions: null,
222
- orientation: 'horizontal',
223
- verticalViewPortHeight: '300px',
224
- contentClassName: null,
225
- containerClassName: null,
226
- indicatorsContentClassName: null,
227
- onPageChange: null,
228
- children: undefined
229
- },
230
- css: {
231
- classes: classes,
232
- styles: styles,
233
- inlineStyles: inlineStyles
234
- }
235
- });
236
-
237
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
238
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
239
- var CarouselItem = /*#__PURE__*/React.memo(function (props) {
240
- var ptm = props.ptm,
241
- cx = props.cx;
242
- var key = props.className && props.className === 'p-carousel-item-cloned' ? 'itemCloned' : 'item';
243
- var content = props.template(props.item);
244
- var itemClonedProps = mergeProps({
245
- className: cx(key, {
246
- itemProps: props
247
- }),
248
- 'data-p-carousel-item-active': props.active,
249
- 'data-p-carousel-item-start': props.start,
250
- 'data-p-carousel-item-end': props.end
251
- }, ptm(key));
252
- return /*#__PURE__*/React.createElement("div", itemClonedProps, content);
253
- });
254
- var Carousel = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
255
- var context = React.useContext(PrimeReactContext);
256
- var props = CarouselBase.getProps(inProps, context);
257
- var _React$useState = React.useState(props.numVisible),
258
- _React$useState2 = _slicedToArray(_React$useState, 2),
259
- numVisibleState = _React$useState2[0],
260
- setNumVisibleState = _React$useState2[1];
261
- var _React$useState3 = React.useState(props.numScroll),
262
- _React$useState4 = _slicedToArray(_React$useState3, 2),
263
- numScrollState = _React$useState4[0],
264
- setNumScrollState = _React$useState4[1];
265
- var _React$useState5 = React.useState(props.page * props.numScroll * -1),
266
- _React$useState6 = _slicedToArray(_React$useState5, 2),
267
- totalShiftedItemsState = _React$useState6[0],
268
- setTotalShiftedItemsState = _React$useState6[1];
269
- var _React$useState7 = React.useState(props.page),
270
- _React$useState8 = _slicedToArray(_React$useState7, 2),
271
- pageState = _React$useState8[0],
272
- setPageState = _React$useState8[1];
273
- var _CarouselBase$setMeta = CarouselBase.setMetaData({
274
- props: props,
275
- state: {
276
- numVisible: numVisibleState,
277
- numScroll: numScrollState,
278
- totalShiftedItems: totalShiftedItemsState,
279
- page: pageState
280
- }
281
- }),
282
- ptm = _CarouselBase$setMeta.ptm,
283
- cx = _CarouselBase$setMeta.cx,
284
- sx = _CarouselBase$setMeta.sx,
285
- isUnstyled = _CarouselBase$setMeta.isUnstyled;
286
- useHandleStyle(CarouselBase.css.styles, isUnstyled, {
287
- name: 'carousel'
288
- });
289
- var elementRef = React.useRef(null);
290
- var itemsContainerRef = React.useRef(null);
291
- var remainingItems = React.useRef(0);
292
- var allowAutoplay = React.useRef(!!props.autoplayInterval);
293
- var attributeSelector = React.useRef('');
294
- var swipeThreshold = React.useRef(20);
295
- var startPos = React.useRef(null);
296
- var interval = React.useRef(null);
297
- var carouselStyle = React.useRef(null);
298
- var isRemainingItemsAdded = React.useRef(false);
299
- var responsiveOptions = React.useRef(null);
300
- var prevNumScroll = usePrevious(numScrollState);
301
- var prevNumVisible = usePrevious(numVisibleState);
302
- var prevValue = usePrevious(props.value);
303
- var prevPage = usePrevious(props.page);
304
- var isVertical = props.orientation === 'vertical';
305
- var circular = props.circular || !!props.autoplayInterval;
306
- var isCircular = circular && props.value && props.value.length >= numVisibleState;
307
- var totalIndicators = props.value ? Math.max(Math.ceil((props.value.length - numVisibleState) / numScrollState) + 1, 0) : 0;
308
- var isAutoplay = totalIndicators && props.autoplayInterval && allowAutoplay.current;
309
- var isControlled = props.onPageChange && !isAutoplay;
310
- var currentPage = isControlled ? props.page : pageState;
311
- var _useResizeListener = useResizeListener({
312
- listener: function listener() {
313
- calculatePosition();
314
- },
315
- when: props.responsiveOptions
316
- }),
317
- _useResizeListener2 = _slicedToArray(_useResizeListener, 1),
318
- bindWindowResizeListener = _useResizeListener2[0];
319
- var step = function step(dir, page) {
320
- var totalShiftedItems = totalShiftedItemsState;
321
- if (page != null) {
322
- totalShiftedItems = numScrollState * page * -1;
323
- if (isCircular) {
324
- totalShiftedItems -= numVisibleState;
325
- }
326
- isRemainingItemsAdded.current = false;
327
- } else {
328
- totalShiftedItems += numScrollState * dir;
329
- if (isRemainingItemsAdded.current) {
330
- totalShiftedItems += remainingItems.current - numScrollState * dir;
331
- isRemainingItemsAdded.current = false;
332
- }
333
- var originalShiftedItems = isCircular ? totalShiftedItems + numVisibleState : totalShiftedItems;
334
- page = Math.abs(Math.floor(originalShiftedItems / numScrollState));
335
- }
336
- if (isCircular && pageState === totalIndicators - 1 && dir === -1) {
337
- totalShiftedItems = -1 * (props.value.length + numVisibleState);
338
- page = 0;
339
- } else if (isCircular && pageState === 0 && dir === 1) {
340
- totalShiftedItems = 0;
341
- page = totalIndicators - 1;
342
- } else if (page === totalIndicators - 1 && remainingItems.current > 0) {
343
- totalShiftedItems += remainingItems.current * -1 - numScrollState * dir;
344
- isRemainingItemsAdded.current = true;
345
- }
346
- if (itemsContainerRef.current) {
347
- !isUnstyled() && DomHandler.removeClass(itemsContainerRef.current, 'p-items-hidden');
348
- changePosition(totalShiftedItems);
349
- itemsContainerRef.current.style.transition = 'transform 500ms ease 0s';
350
- }
351
- changePage(page);
352
- setTotalShiftedItemsState(totalShiftedItems);
353
- };
354
- var calculatePosition = function calculatePosition() {
355
- if (itemsContainerRef.current && responsiveOptions.current) {
356
- var windowWidth = window.innerWidth;
357
- var matchedResponsiveData = {
358
- numVisible: props.numVisible,
359
- numScroll: props.numScroll
360
- };
361
- for (var i = 0; i < responsiveOptions.current.length; i++) {
362
- var res = responsiveOptions.current[i];
363
- if (parseInt(res.breakpoint, 10) >= windowWidth) {
364
- matchedResponsiveData = res;
365
- }
366
- }
367
- if (numScrollState !== matchedResponsiveData.numScroll) {
368
- var page = Math.floor(currentPage * numScrollState / matchedResponsiveData.numScroll);
369
- var totalShiftedItems = matchedResponsiveData.numScroll * page * -1;
370
- if (isCircular) {
371
- totalShiftedItems -= matchedResponsiveData.numVisible;
372
- }
373
- setTotalShiftedItemsState(totalShiftedItems);
374
- setNumScrollState(matchedResponsiveData.numScroll);
375
- changePage(page);
376
- }
377
- if (numVisibleState !== matchedResponsiveData.numVisible) {
378
- setNumVisibleState(matchedResponsiveData.numVisible);
379
- }
380
- }
381
- };
382
- var navBackward = function navBackward(e, page) {
383
- if (circular || currentPage !== 0) {
384
- step(1, page);
385
- }
386
- allowAutoplay.current = false;
387
- if (e.cancelable) {
388
- e.preventDefault();
389
- }
390
- };
391
- var navForward = function navForward(e, page) {
392
- if (circular || currentPage < totalIndicators - 1) {
393
- step(-1, page);
394
- }
395
- allowAutoplay.current = false;
396
- if (e.cancelable) {
397
- e.preventDefault();
398
- }
399
- };
400
- var onDotClick = function onDotClick(e, page) {
401
- if (page > currentPage) {
402
- navForward(e, page);
403
- } else if (page < currentPage) {
404
- navBackward(e, page);
405
- }
406
- };
407
- var onTransitionEnd = function onTransitionEnd(e) {
408
- if (itemsContainerRef.current && e.propertyName === 'transform') {
409
- DomHandler.addClass(itemsContainerRef.current, 'p-items-hidden');
410
- itemsContainerRef.current.style.transition = '';
411
- if ((pageState === 0 || pageState === totalIndicators - 1) && isCircular) {
412
- changePosition(totalShiftedItemsState);
413
- }
414
- }
415
- };
416
- var _onTouchStart = function onTouchStart(e) {
417
- var touchobj = e.changedTouches[0];
418
- startPos.current = {
419
- x: touchobj.pageX,
420
- y: touchobj.pageY
421
- };
422
- };
423
- var _onTouchMove = function onTouchMove(e) {
424
- if (e.cancelable) {
425
- e.preventDefault();
426
- }
427
- };
428
- var _onTouchEnd = function onTouchEnd(e) {
429
- var touchobj = e.changedTouches[0];
430
- if (isVertical) {
431
- changePageOnTouch(e, touchobj.pageY - startPos.current.y);
432
- } else {
433
- changePageOnTouch(e, touchobj.pageX - startPos.current.x);
434
- }
435
- };
436
- var changePageOnTouch = function changePageOnTouch(e, diff) {
437
- if (Math.abs(diff) > swipeThreshold.current) {
438
- if (diff < 0) {
439
- // left
440
- navForward(e);
441
- } else {
442
- // right
443
- navBackward(e);
444
- }
445
- }
446
- };
447
- var startAutoplay = function startAutoplay() {
448
- if (props.autoplayInterval > 0) {
449
- interval.current = setInterval(function () {
450
- if (pageState === totalIndicators - 1) {
451
- step(-1, 0);
452
- } else {
453
- step(-1, pageState + 1);
454
- }
455
- }, props.autoplayInterval);
456
- }
457
- };
458
- var stopAutoplay = function stopAutoplay() {
459
- if (interval.current) {
460
- clearInterval(interval.current);
461
- }
462
- };
463
- var createStyle = function createStyle() {
464
- if (!carouselStyle.current) {
465
- carouselStyle.current = DomHandler.createInlineStyle(context && context.nonce || PrimeReact.nonce);
466
- }
467
- var innerHTML = "\n .p-carousel[".concat(attributeSelector.current, "] .p-carousel-item {\n flex: 1 0 ").concat(100 / numVisibleState, "%\n }\n ");
468
- if (props.responsiveOptions) {
469
- var comparator = ObjectUtils.localeComparator(context && context.locale || PrimeReact.locale);
470
- responsiveOptions.current = _toConsumableArray(props.responsiveOptions);
471
- responsiveOptions.current.sort(function (data1, data2) {
472
- var value1 = data1.breakpoint;
473
- var value2 = data2.breakpoint;
474
- return ObjectUtils.sort(value1, value2, -1, comparator, context && context.nullSortOrder || PrimeReact.nullSortOrder);
475
- });
476
- for (var i = 0; i < responsiveOptions.current.length; i++) {
477
- var res = responsiveOptions.current[i];
478
- innerHTML += "\n @media screen and (max-width: ".concat(res.breakpoint, ") {\n .p-carousel[").concat(attributeSelector.current, "] .p-carousel-item {\n flex: 1 0 ").concat(100 / res.numVisible, "%\n }\n }\n ");
479
- }
480
- }
481
- carouselStyle.current.innerHTML = innerHTML;
482
- };
483
- var destroyStyle = function destroyStyle() {
484
- carouselStyle.current = DomHandler.removeInlineStyle(carouselStyle.current);
485
- };
486
- var changePosition = function changePosition(totalShiftedItems) {
487
- if (itemsContainerRef.current) {
488
- itemsContainerRef.current.style.transform = isVertical ? "translate3d(0, ".concat(totalShiftedItems * (100 / numVisibleState), "%, 0)") : "translate3d(".concat(totalShiftedItems * (100 / numVisibleState), "%, 0, 0)");
489
- }
490
- };
491
- var changePage = function changePage(page) {
492
- !isControlled && setPageState(page);
493
- props.onPageChange && props.onPageChange({
494
- page: page
495
- });
496
- };
497
- React.useImperativeHandle(ref, function () {
498
- return {
499
- props: props,
500
- startAutoplay: startAutoplay,
501
- stopAutoplay: stopAutoplay,
502
- getElement: function getElement() {
503
- return elementRef.current;
504
- }
505
- };
506
- });
507
- useMountEffect(function () {
508
- if (elementRef.current) {
509
- attributeSelector.current = UniqueComponentId();
510
- elementRef.current.setAttribute(attributeSelector.current, '');
511
- }
512
- if (!carouselStyle.current) {
513
- calculatePosition();
514
- changePosition(totalShiftedItemsState);
515
- bindWindowResizeListener();
516
- }
517
- });
518
- useUpdateEffect(function () {
519
- var stateChanged = false;
520
- var totalShiftedItems = totalShiftedItemsState;
521
- createStyle();
522
- if (props.autoplayInterval) {
523
- stopAutoplay();
524
- }
525
- if (prevNumScroll !== numScrollState || prevNumVisible !== numVisibleState || props.value && prevValue && prevValue.length !== props.value.length) {
526
- remainingItems.current = (props.value.length - numVisibleState) % numScrollState;
527
- var page = currentPage;
528
- if (totalIndicators !== 0 && page >= totalIndicators) {
529
- page = totalIndicators - 1;
530
- changePage(page);
531
- stateChanged = true;
532
- }
533
- totalShiftedItems = page * numScrollState * -1;
534
- if (isCircular) {
535
- totalShiftedItems -= numVisibleState;
536
- }
537
- if (page === totalIndicators - 1 && remainingItems.current > 0) {
538
- totalShiftedItems += -1 * remainingItems.current + numScrollState;
539
- isRemainingItemsAdded.current = true;
540
- } else {
541
- isRemainingItemsAdded.current = false;
542
- }
543
- if (totalShiftedItems !== totalShiftedItemsState) {
544
- setTotalShiftedItemsState(totalShiftedItems);
545
- stateChanged = true;
546
- }
547
- changePosition(totalShiftedItems);
548
- }
549
- if (isCircular) {
550
- if (pageState === 0) {
551
- totalShiftedItems = -1 * numVisibleState;
552
- } else if (totalShiftedItems === 0) {
553
- totalShiftedItems = -1 * props.value.length;
554
- if (remainingItems.current > 0) {
555
- isRemainingItemsAdded.current = true;
556
- }
557
- }
558
- if (totalShiftedItems !== totalShiftedItemsState) {
559
- setTotalShiftedItemsState(totalShiftedItems);
560
- stateChanged = true;
561
- }
562
- }
563
- if (prevPage !== props.page) {
564
- if (props.page > prevPage && props.page <= totalIndicators - 1) {
565
- step(-1, props.page);
566
- } else if (props.page < prevPage) {
567
- step(1, props.page);
568
- }
569
- }
570
- if (!stateChanged && isAutoplay) {
571
- startAutoplay();
572
- }
573
- return function () {
574
- if (props.autoplayInterval) {
575
- stopAutoplay();
576
- }
577
- destroyStyle();
578
- };
579
- });
580
- var createItems = function createItems() {
581
- if (props.value && props.value.length) {
582
- var clonedItemsForStarting = null;
583
- var clonedItemsForFinishing = null;
584
- if (isCircular) {
585
- var clonedElements = null;
586
- clonedElements = props.value.slice(-1 * numVisibleState);
587
- clonedItemsForStarting = clonedElements.map(function (item, index) {
588
- var isActive = totalShiftedItemsState * -1 === props.value.length + numVisibleState;
589
- var start = index === 0;
590
- var end = index === clonedElements.length - 1;
591
- var key = index + '_scloned';
592
- return /*#__PURE__*/React.createElement(CarouselItem, {
593
- key: key,
594
- className: "p-carousel-item-cloned",
595
- template: props.itemTemplate,
596
- item: item,
597
- active: isActive,
598
- start: start,
599
- end: end,
600
- ptm: ptm,
601
- cx: cx
602
- });
603
- });
604
- clonedElements = props.value.slice(0, numVisibleState);
605
- clonedItemsForFinishing = clonedElements.map(function (item, index) {
606
- var isActive = totalShiftedItemsState === 0;
607
- var start = index === 0;
608
- var end = index === clonedElements.length - 1;
609
- var key = index + '_fcloned';
610
- return /*#__PURE__*/React.createElement(CarouselItem, {
611
- key: key,
612
- className: "p-carousel-item-cloned",
613
- template: props.itemTemplate,
614
- item: item,
615
- active: isActive,
616
- start: start,
617
- end: end,
618
- ptm: ptm,
619
- cx: cx
620
- });
621
- });
622
- }
623
- var items = props.value.map(function (item, index) {
624
- var firstIndex = isCircular ? -1 * (totalShiftedItemsState + numVisibleState) : totalShiftedItemsState * -1;
625
- var lastIndex = firstIndex + numVisibleState - 1;
626
- var isActive = firstIndex <= index && lastIndex >= index;
627
- var start = firstIndex === index;
628
- var end = lastIndex === index;
629
- return /*#__PURE__*/React.createElement(CarouselItem, {
630
- key: index,
631
- template: props.itemTemplate,
632
- item: item,
633
- active: isActive,
634
- start: start,
635
- end: end,
636
- ptm: ptm,
637
- cx: cx
638
- });
639
- });
640
- return /*#__PURE__*/React.createElement(React.Fragment, null, clonedItemsForStarting, items, clonedItemsForFinishing);
641
- }
642
- };
643
- var createHeader = function createHeader() {
644
- if (props.header) {
645
- var headerProps = mergeProps({
646
- className: cx('header')
647
- }, ptm('header'));
648
- return /*#__PURE__*/React.createElement("div", headerProps, props.header);
649
- }
650
- return null;
651
- };
652
- var createFooter = function createFooter() {
653
- if (props.footer) {
654
- var footerProps = mergeProps({
655
- className: cx('footer')
656
- }, ptm('footer'));
657
- return /*#__PURE__*/React.createElement("div", footerProps, props.footer);
658
- }
659
- return null;
660
- };
661
- var createContent = function createContent() {
662
- var items = createItems();
663
- var height = isVertical ? props.verticalViewPortHeight : 'auto';
664
- var backwardNavigator = createBackwardNavigator();
665
- var forwardNavigator = createForwardNavigator();
666
- var itemsContentProps = mergeProps({
667
- className: cx('itemsContent'),
668
- style: sx('itemsContent', {
669
- height: height
670
- }),
671
- onTouchStart: function onTouchStart(e) {
672
- return _onTouchStart(e);
673
- },
674
- onTouchMove: function onTouchMove(e) {
675
- return _onTouchMove(e);
676
- },
677
- onTouchEnd: function onTouchEnd(e) {
678
- return _onTouchEnd(e);
679
- }
680
- }, ptm('itemsContent'));
681
- var containerProps = mergeProps({
682
- className: classNames(props.containerClassName, cx('container'))
683
- }, ptm('container'));
684
- var itemsContainerProps = mergeProps({
685
- className: cx('itemsContainer'),
686
- onTransitionEnd: onTransitionEnd
687
- }, ptm('itemsContainer'));
688
- return /*#__PURE__*/React.createElement("div", containerProps, backwardNavigator, /*#__PURE__*/React.createElement("div", itemsContentProps, /*#__PURE__*/React.createElement("div", _extends({
689
- ref: itemsContainerRef
690
- }, itemsContainerProps), items)), forwardNavigator);
691
- };
692
- var createBackwardNavigator = function createBackwardNavigator() {
693
- if (props.showNavigators) {
694
- var isDisabled = (!circular || props.value && props.value.length < numVisibleState) && currentPage === 0;
695
- var previousButtonIconProps = mergeProps({
696
- className: cx('previousButtonIcon')
697
- }, ptm('previousButtonIcon'));
698
- var icon = isVertical ? props.prevIcon || /*#__PURE__*/React.createElement(ChevronUpIcon, previousButtonIconProps) : props.prevIcon || /*#__PURE__*/React.createElement(ChevronLeftIcon, previousButtonIconProps);
699
- var backwardNavigatorIcon = IconUtils.getJSXIcon(icon, _objectSpread({}, previousButtonIconProps), {
700
- props: props
701
- });
702
- var previousButtonProps = mergeProps({
703
- type: 'button',
704
- className: cx('previousButton', {
705
- isDisabled: isDisabled
706
- }),
707
- onClick: function onClick(e) {
708
- return navBackward(e);
709
- },
710
- disabled: isDisabled,
711
- 'aria-label': ariaLabel('previousPageLabel')
712
- }, ptm('previousButton'));
713
- return /*#__PURE__*/React.createElement("button", previousButtonProps, backwardNavigatorIcon, /*#__PURE__*/React.createElement(Ripple, null));
714
- }
715
- return null;
716
- };
717
- var createForwardNavigator = function createForwardNavigator() {
718
- if (props.showNavigators) {
719
- var isDisabled = (!circular || props.value && props.value.length < numVisibleState) && (currentPage === totalIndicators - 1 || totalIndicators === 0);
720
- var nextButtonIconProps = mergeProps({
721
- className: cx('nextButtonIcon')
722
- }, ptm('nextButtonIcon'));
723
- var icon = isVertical ? props.nextIcon || /*#__PURE__*/React.createElement(ChevronDownIcon, nextButtonIconProps) : props.nextIcon || /*#__PURE__*/React.createElement(ChevronRightIcon, nextButtonIconProps);
724
- var forwardNavigatorIcon = IconUtils.getJSXIcon(icon, _objectSpread({}, nextButtonIconProps), {
725
- props: props
726
- });
727
- var nextButtonProps = mergeProps({
728
- type: 'button',
729
- className: cx('nextButton', {
730
- isDisabled: isDisabled
731
- }),
732
- onClick: function onClick(e) {
733
- return navForward(e);
734
- },
735
- disabled: isDisabled,
736
- 'aria-label': ariaLabel('nextPageLabel')
737
- }, ptm('nextButton'));
738
- return /*#__PURE__*/React.createElement("button", nextButtonProps, forwardNavigatorIcon, /*#__PURE__*/React.createElement(Ripple, null));
739
- }
740
- return null;
741
- };
742
- var createIndicator = function createIndicator(index) {
743
- var isActive = currentPage === index;
744
- var getPTOptions = function getPTOptions(key) {
745
- return ptm(key, {
746
- context: {
747
- active: isActive
748
- }
749
- });
750
- };
751
- var key = 'carousel-indicator-' + index;
752
- var indicatorProps = mergeProps({
753
- key: key,
754
- className: cx('indicator', {
755
- isActive: isActive
756
- }),
757
- 'data-p-highlight': isActive
758
- }, getPTOptions('indicator'));
759
- var indicatorButtonProps = mergeProps({
760
- type: 'button',
761
- className: cx('indicatorButton'),
762
- onClick: function onClick(e) {
763
- return onDotClick(e, index);
764
- },
765
- 'aria-label': "".concat(ariaLabel('pageLabel'), " ").concat(index + 1)
766
- }, getPTOptions('indicatorButton'));
767
- return /*#__PURE__*/React.createElement("li", indicatorProps, /*#__PURE__*/React.createElement("button", indicatorButtonProps, /*#__PURE__*/React.createElement(Ripple, null)));
768
- };
769
- var createIndicators = function createIndicators() {
770
- if (props.showIndicators) {
771
- var _indicators = [];
772
- for (var i = 0; i < totalIndicators; i++) {
773
- _indicators.push(createIndicator(i));
774
- }
775
- var indicatorsProps = mergeProps({
776
- className: classNames(props.indicatorsContentClassName, cx('indicators'))
777
- }, ptm('indicators'));
778
- return /*#__PURE__*/React.createElement("ul", indicatorsProps, _indicators);
779
- }
780
- return null;
781
- };
782
- var content = createContent();
783
- var indicators = createIndicators();
784
- var header = createHeader();
785
- var footer = createFooter();
786
- var rootProps = mergeProps({
787
- id: props.id,
788
- ref: elementRef,
789
- className: classNames(props.className, cx('root')),
790
- style: props.style
791
- }, CarouselBase.getOtherProps(props), ptm('root'));
792
- var contentProps = mergeProps({
793
- className: classNames(props.contentClassName, cx('content'))
794
- }, ptm('content'));
795
- return /*#__PURE__*/React.createElement("div", rootProps, header, /*#__PURE__*/React.createElement("div", contentProps, content, indicators), footer);
796
- }));
797
- CarouselItem.displayName = 'CarouselItem';
798
- Carousel.displayName = 'Carousel';
799
-
800
- export { Carousel };