primereact 9.4.0 → 9.6.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 (886) hide show
  1. package/accordion/accordion.cjs.js +2 -1
  2. package/accordion/accordion.cjs.min.js +1 -1
  3. package/accordion/accordion.esm.js +3 -2
  4. package/accordion/accordion.esm.min.js +1 -1
  5. package/accordion/accordion.js +2 -1
  6. package/accordion/accordion.min.js +1 -1
  7. package/api/api.cjs.js +215 -3
  8. package/api/api.cjs.min.js +1 -1
  9. package/api/api.d.ts +882 -8
  10. package/api/api.esm.js +210 -4
  11. package/api/api.esm.min.js +1 -1
  12. package/api/api.js +216 -5
  13. package/api/api.min.js +1 -1
  14. package/autocomplete/autocomplete.cjs.js +148 -89
  15. package/autocomplete/autocomplete.cjs.min.js +1 -1
  16. package/autocomplete/autocomplete.d.ts +138 -2
  17. package/autocomplete/autocomplete.esm.js +150 -91
  18. package/autocomplete/autocomplete.esm.min.js +1 -1
  19. package/autocomplete/autocomplete.js +149 -91
  20. package/autocomplete/autocomplete.min.css +1 -1
  21. package/autocomplete/autocomplete.min.js +1 -1
  22. package/avatar/avatar.cjs.js +3 -1
  23. package/avatar/avatar.cjs.min.js +1 -1
  24. package/avatar/avatar.d.ts +1 -1
  25. package/avatar/avatar.esm.js +3 -1
  26. package/avatar/avatar.esm.min.js +1 -1
  27. package/avatar/avatar.js +4 -3
  28. package/avatar/avatar.min.js +1 -1
  29. package/avatargroup/avatargroup.cjs.js +3 -1
  30. package/avatargroup/avatargroup.cjs.min.js +1 -1
  31. package/avatargroup/avatargroup.esm.js +3 -1
  32. package/avatargroup/avatargroup.esm.min.js +1 -1
  33. package/avatargroup/avatargroup.js +4 -3
  34. package/avatargroup/avatargroup.min.js +1 -1
  35. package/badge/badge.cjs.js +3 -1
  36. package/badge/badge.cjs.min.js +1 -1
  37. package/badge/badge.esm.js +3 -1
  38. package/badge/badge.esm.min.js +1 -1
  39. package/badge/badge.js +4 -3
  40. package/badge/badge.min.js +1 -1
  41. package/blockui/blockui.cjs.js +4 -3
  42. package/blockui/blockui.cjs.min.js +1 -1
  43. package/blockui/blockui.esm.js +4 -3
  44. package/blockui/blockui.esm.min.js +1 -1
  45. package/blockui/blockui.js +5 -4
  46. package/blockui/blockui.min.js +1 -1
  47. package/breadcrumb/breadcrumb.cjs.js +97 -52
  48. package/breadcrumb/breadcrumb.cjs.min.js +1 -1
  49. package/breadcrumb/breadcrumb.d.ts +53 -1
  50. package/breadcrumb/breadcrumb.esm.js +97 -52
  51. package/breadcrumb/breadcrumb.esm.min.js +1 -1
  52. package/breadcrumb/breadcrumb.js +96 -53
  53. package/breadcrumb/breadcrumb.min.css +1 -1
  54. package/breadcrumb/breadcrumb.min.js +1 -1
  55. package/button/button.cjs.js +6 -2
  56. package/button/button.cjs.min.js +1 -1
  57. package/button/button.d.ts +6 -0
  58. package/button/button.esm.js +6 -2
  59. package/button/button.esm.min.js +1 -1
  60. package/button/button.js +7 -4
  61. package/button/button.min.js +1 -1
  62. package/calendar/calendar.cjs.js +322 -223
  63. package/calendar/calendar.cjs.min.js +1 -1
  64. package/calendar/calendar.d.ts +272 -3
  65. package/calendar/calendar.esm.js +324 -225
  66. package/calendar/calendar.esm.min.js +1 -1
  67. package/calendar/calendar.js +323 -225
  68. package/calendar/calendar.min.js +1 -1
  69. package/card/card.cjs.js +3 -1
  70. package/card/card.cjs.min.js +1 -1
  71. package/card/card.d.ts +5 -11
  72. package/card/card.esm.js +3 -1
  73. package/card/card.esm.min.js +1 -1
  74. package/card/card.js +4 -3
  75. package/card/card.min.js +1 -1
  76. package/carousel/carousel.cjs.js +154 -92
  77. package/carousel/carousel.cjs.min.js +1 -1
  78. package/carousel/carousel.d.ts +121 -1
  79. package/carousel/carousel.esm.js +156 -94
  80. package/carousel/carousel.esm.min.js +1 -1
  81. package/carousel/carousel.js +155 -94
  82. package/carousel/carousel.min.js +1 -1
  83. package/cascadeselect/cascadeselect.cjs.js +181 -108
  84. package/cascadeselect/cascadeselect.cjs.min.js +1 -1
  85. package/cascadeselect/cascadeselect.d.ts +100 -1
  86. package/cascadeselect/cascadeselect.esm.js +183 -110
  87. package/cascadeselect/cascadeselect.esm.min.js +1 -1
  88. package/cascadeselect/cascadeselect.js +180 -108
  89. package/cascadeselect/cascadeselect.min.js +1 -1
  90. package/chart/chart.cjs.js +31 -44
  91. package/chart/chart.cjs.min.js +1 -1
  92. package/chart/chart.d.ts +30 -0
  93. package/chart/chart.esm.js +18 -31
  94. package/chart/chart.esm.min.js +1 -1
  95. package/chart/chart.js +141 -156
  96. package/chart/chart.min.js +1 -1
  97. package/checkbox/checkbox.cjs.js +113 -48
  98. package/checkbox/checkbox.cjs.min.js +1 -1
  99. package/checkbox/checkbox.d.ts +65 -1
  100. package/checkbox/checkbox.esm.js +115 -50
  101. package/checkbox/checkbox.esm.min.js +1 -1
  102. package/checkbox/checkbox.js +113 -50
  103. package/checkbox/checkbox.min.js +1 -1
  104. package/chip/chip.cjs.js +3 -1
  105. package/chip/chip.cjs.min.js +1 -1
  106. package/chip/chip.d.ts +1 -1
  107. package/chip/chip.esm.js +3 -1
  108. package/chip/chip.esm.min.js +1 -1
  109. package/chip/chip.js +4 -3
  110. package/chip/chip.min.js +1 -1
  111. package/chips/chips.cjs.js +84 -55
  112. package/chips/chips.cjs.min.js +1 -1
  113. package/chips/chips.d.ts +78 -6
  114. package/chips/chips.esm.js +85 -56
  115. package/chips/chips.esm.min.js +1 -1
  116. package/chips/chips.js +83 -57
  117. package/chips/chips.min.js +1 -1
  118. package/colorpicker/colorpicker.cjs.js +123 -49
  119. package/colorpicker/colorpicker.cjs.min.js +1 -1
  120. package/colorpicker/colorpicker.d.ts +81 -0
  121. package/colorpicker/colorpicker.esm.js +125 -51
  122. package/colorpicker/colorpicker.esm.min.js +1 -1
  123. package/colorpicker/colorpicker.js +124 -51
  124. package/colorpicker/colorpicker.min.js +1 -1
  125. package/column/column.cjs.js +2 -0
  126. package/column/column.d.ts +298 -1
  127. package/column/column.esm.js +2 -0
  128. package/column/column.js +2 -0
  129. package/columngroup/columngroup.d.ts +28 -0
  130. package/componentbase/componentbase.cjs.js +29 -5
  131. package/componentbase/componentbase.cjs.min.js +1 -1
  132. package/componentbase/componentbase.esm.js +25 -5
  133. package/componentbase/componentbase.esm.min.js +1 -1
  134. package/componentbase/componentbase.js +30 -7
  135. package/componentbase/componentbase.min.js +1 -1
  136. package/confirmdialog/confirmdialog.cjs.js +4 -3
  137. package/confirmdialog/confirmdialog.cjs.min.js +1 -1
  138. package/confirmdialog/confirmdialog.esm.js +5 -4
  139. package/confirmdialog/confirmdialog.esm.min.js +1 -1
  140. package/confirmdialog/confirmdialog.js +4 -3
  141. package/confirmdialog/confirmdialog.min.js +1 -1
  142. package/confirmpopup/confirmpopup.cjs.js +5 -4
  143. package/confirmpopup/confirmpopup.cjs.min.js +1 -1
  144. package/confirmpopup/confirmpopup.esm.js +6 -5
  145. package/confirmpopup/confirmpopup.esm.min.js +1 -1
  146. package/confirmpopup/confirmpopup.js +5 -4
  147. package/confirmpopup/confirmpopup.min.js +1 -1
  148. package/contextmenu/contextmenu.cjs.js +121 -69
  149. package/contextmenu/contextmenu.cjs.min.js +1 -1
  150. package/contextmenu/contextmenu.d.ts +92 -1
  151. package/contextmenu/contextmenu.esm.js +123 -71
  152. package/contextmenu/contextmenu.esm.min.js +1 -1
  153. package/contextmenu/contextmenu.js +122 -71
  154. package/contextmenu/contextmenu.min.js +1 -1
  155. package/core/core.js +14005 -2381
  156. package/core/core.min.js +47 -47
  157. package/csstransition/csstransition.cjs.js +3 -2
  158. package/csstransition/csstransition.cjs.min.js +1 -1
  159. package/csstransition/csstransition.esm.js +3 -2
  160. package/csstransition/csstransition.esm.min.js +1 -1
  161. package/csstransition/csstransition.js +4 -3
  162. package/csstransition/csstransition.min.js +1 -1
  163. package/datascroller/datascroller.cjs.js +34 -43
  164. package/datascroller/datascroller.cjs.min.js +1 -1
  165. package/datascroller/datascroller.d.ts +51 -1
  166. package/datascroller/datascroller.esm.js +36 -45
  167. package/datascroller/datascroller.esm.min.js +1 -1
  168. package/datascroller/datascroller.js +35 -45
  169. package/datascroller/datascroller.min.js +1 -1
  170. package/datatable/datatable.cjs.js +1089 -649
  171. package/datatable/datatable.cjs.min.js +1 -1
  172. package/datatable/datatable.d.ts +191 -3
  173. package/datatable/datatable.esm.js +1091 -651
  174. package/datatable/datatable.esm.min.js +1 -1
  175. package/datatable/datatable.js +1090 -651
  176. package/datatable/datatable.min.js +1 -1
  177. package/dataview/dataview.cjs.js +125 -109
  178. package/dataview/dataview.cjs.min.js +1 -1
  179. package/dataview/dataview.d.ts +105 -2
  180. package/dataview/dataview.esm.js +127 -111
  181. package/dataview/dataview.esm.min.js +1 -1
  182. package/dataview/dataview.js +123 -108
  183. package/dataview/dataview.min.js +1 -1
  184. package/deferredcontent/deferredcontent.cjs.js +3 -1
  185. package/deferredcontent/deferredcontent.cjs.min.js +1 -1
  186. package/deferredcontent/deferredcontent.esm.js +3 -1
  187. package/deferredcontent/deferredcontent.esm.min.js +1 -1
  188. package/deferredcontent/deferredcontent.js +4 -3
  189. package/deferredcontent/deferredcontent.min.js +1 -1
  190. package/dialog/dialog.cjs.js +6 -5
  191. package/dialog/dialog.cjs.min.js +1 -1
  192. package/dialog/dialog.esm.js +7 -6
  193. package/dialog/dialog.esm.min.js +1 -1
  194. package/dialog/dialog.js +6 -5
  195. package/dialog/dialog.min.js +1 -1
  196. package/divider/divider.cjs.js +3 -1
  197. package/divider/divider.cjs.min.js +1 -1
  198. package/divider/divider.esm.js +3 -1
  199. package/divider/divider.esm.min.js +1 -1
  200. package/divider/divider.js +4 -3
  201. package/divider/divider.min.js +1 -1
  202. package/dock/dock.cjs.js +85 -46
  203. package/dock/dock.cjs.min.js +1 -1
  204. package/dock/dock.d.ts +66 -0
  205. package/dock/dock.esm.js +86 -47
  206. package/dock/dock.esm.min.js +1 -1
  207. package/dock/dock.js +85 -48
  208. package/dock/dock.min.js +1 -1
  209. package/dropdown/dropdown.cjs.js +170 -120
  210. package/dropdown/dropdown.cjs.min.js +1 -1
  211. package/dropdown/dropdown.d.ts +154 -2
  212. package/dropdown/dropdown.esm.js +172 -122
  213. package/dropdown/dropdown.esm.min.js +1 -1
  214. package/dropdown/dropdown.js +170 -121
  215. package/dropdown/dropdown.min.js +1 -1
  216. package/editor/editor.cjs.js +95 -116
  217. package/editor/editor.cjs.min.js +1 -1
  218. package/editor/editor.d.ts +50 -0
  219. package/editor/editor.esm.js +96 -117
  220. package/editor/editor.esm.min.js +1 -1
  221. package/editor/editor.js +95 -118
  222. package/editor/editor.min.js +1 -1
  223. package/fieldset/fieldset.cjs.js +3 -1
  224. package/fieldset/fieldset.cjs.min.js +1 -1
  225. package/fieldset/fieldset.esm.js +3 -1
  226. package/fieldset/fieldset.esm.min.js +1 -1
  227. package/fieldset/fieldset.js +4 -3
  228. package/fieldset/fieldset.min.js +1 -1
  229. package/fileupload/fileupload.cjs.js +234 -191
  230. package/fileupload/fileupload.cjs.min.js +1 -1
  231. package/fileupload/fileupload.d.ts +160 -1
  232. package/fileupload/fileupload.esm.js +235 -192
  233. package/fileupload/fileupload.esm.min.js +1 -1
  234. package/fileupload/fileupload.js +231 -188
  235. package/fileupload/fileupload.min.js +1 -1
  236. package/galleria/galleria.cjs.js +139 -124
  237. package/galleria/galleria.cjs.min.js +1 -1
  238. package/galleria/galleria.d.ts +156 -2
  239. package/galleria/galleria.esm.js +141 -126
  240. package/galleria/galleria.esm.min.js +1 -1
  241. package/galleria/galleria.js +138 -124
  242. package/galleria/galleria.min.js +1 -1
  243. package/hooks/hooks.cjs.js +10 -3
  244. package/hooks/hooks.cjs.min.js +1 -1
  245. package/hooks/hooks.esm.js +7 -3
  246. package/hooks/hooks.esm.min.js +1 -1
  247. package/hooks/hooks.js +11 -5
  248. package/hooks/hooks.min.js +1 -1
  249. package/icons/arrowdown/index.cjs.js +415 -2
  250. package/icons/arrowdown/index.cjs.min.js +1 -1
  251. package/icons/arrowdown/index.esm.js +415 -2
  252. package/icons/arrowdown/index.esm.min.js +1 -1
  253. package/icons/arrowdown/index.js +415 -2
  254. package/icons/arrowdown/index.min.js +1 -1
  255. package/icons/arrowup/index.cjs.js +415 -2
  256. package/icons/arrowup/index.cjs.min.js +1 -1
  257. package/icons/arrowup/index.esm.js +415 -2
  258. package/icons/arrowup/index.esm.min.js +1 -1
  259. package/icons/arrowup/index.js +415 -2
  260. package/icons/arrowup/index.min.js +1 -1
  261. package/icons/ban/index.cjs.js +415 -2
  262. package/icons/ban/index.cjs.min.js +1 -1
  263. package/icons/ban/index.esm.js +415 -2
  264. package/icons/ban/index.esm.min.js +1 -1
  265. package/icons/ban/index.js +415 -2
  266. package/icons/ban/index.min.js +1 -1
  267. package/icons/download/index.cjs.js +415 -2
  268. package/icons/download/index.cjs.min.js +1 -1
  269. package/icons/download/index.esm.js +415 -2
  270. package/icons/download/index.esm.min.js +1 -1
  271. package/icons/download/index.js +415 -2
  272. package/icons/download/index.min.js +1 -1
  273. package/icons/exclamationtriangle/index.cjs.js +415 -2
  274. package/icons/exclamationtriangle/index.cjs.min.js +1 -1
  275. package/icons/exclamationtriangle/index.esm.js +415 -2
  276. package/icons/exclamationtriangle/index.esm.min.js +1 -1
  277. package/icons/exclamationtriangle/index.js +415 -2
  278. package/icons/exclamationtriangle/index.min.js +1 -1
  279. package/icons/eyeslash/index.cjs.js +415 -2
  280. package/icons/eyeslash/index.cjs.min.js +1 -1
  281. package/icons/eyeslash/index.esm.js +415 -2
  282. package/icons/eyeslash/index.esm.min.js +1 -1
  283. package/icons/eyeslash/index.js +415 -2
  284. package/icons/eyeslash/index.min.js +1 -1
  285. package/icons/filter/index.cjs.js +415 -2
  286. package/icons/filter/index.cjs.min.js +1 -1
  287. package/icons/filter/index.esm.js +415 -2
  288. package/icons/filter/index.esm.min.js +1 -1
  289. package/icons/filter/index.js +415 -2
  290. package/icons/filter/index.min.js +1 -1
  291. package/icons/filterslash/index.cjs.js +415 -2
  292. package/icons/filterslash/index.cjs.min.js +1 -1
  293. package/icons/filterslash/index.esm.js +415 -2
  294. package/icons/filterslash/index.esm.min.js +1 -1
  295. package/icons/filterslash/index.js +415 -2
  296. package/icons/filterslash/index.min.js +1 -1
  297. package/icons/infocircle/index.cjs.js +415 -2
  298. package/icons/infocircle/index.cjs.min.js +1 -1
  299. package/icons/infocircle/index.esm.js +415 -2
  300. package/icons/infocircle/index.esm.min.js +1 -1
  301. package/icons/infocircle/index.js +415 -2
  302. package/icons/infocircle/index.min.js +1 -1
  303. package/icons/pencil/index.cjs.js +415 -2
  304. package/icons/pencil/index.cjs.min.js +1 -1
  305. package/icons/pencil/index.esm.js +415 -2
  306. package/icons/pencil/index.esm.min.js +1 -1
  307. package/icons/pencil/index.js +415 -2
  308. package/icons/pencil/index.min.js +1 -1
  309. package/icons/plus/index.cjs.js +415 -2
  310. package/icons/plus/index.cjs.min.js +1 -1
  311. package/icons/plus/index.esm.js +415 -2
  312. package/icons/plus/index.esm.min.js +1 -1
  313. package/icons/plus/index.js +415 -2
  314. package/icons/plus/index.min.js +1 -1
  315. package/icons/refresh/index.cjs.js +415 -2
  316. package/icons/refresh/index.cjs.min.js +1 -1
  317. package/icons/refresh/index.esm.js +415 -2
  318. package/icons/refresh/index.esm.min.js +1 -1
  319. package/icons/refresh/index.js +415 -2
  320. package/icons/refresh/index.min.js +1 -1
  321. package/icons/search/index.cjs.js +415 -2
  322. package/icons/search/index.cjs.min.js +1 -1
  323. package/icons/search/index.esm.js +415 -2
  324. package/icons/search/index.esm.min.js +1 -1
  325. package/icons/search/index.js +415 -2
  326. package/icons/search/index.min.js +1 -1
  327. package/icons/searchminus/index.cjs.js +415 -2
  328. package/icons/searchminus/index.cjs.min.js +1 -1
  329. package/icons/searchminus/index.esm.js +415 -2
  330. package/icons/searchminus/index.esm.min.js +1 -1
  331. package/icons/searchminus/index.js +415 -2
  332. package/icons/searchminus/index.min.js +1 -1
  333. package/icons/searchplus/index.cjs.js +415 -2
  334. package/icons/searchplus/index.cjs.min.js +1 -1
  335. package/icons/searchplus/index.esm.js +415 -2
  336. package/icons/searchplus/index.esm.min.js +1 -1
  337. package/icons/searchplus/index.js +415 -2
  338. package/icons/searchplus/index.min.js +1 -1
  339. package/icons/sortalt/index.cjs.js +415 -2
  340. package/icons/sortalt/index.cjs.min.js +1 -1
  341. package/icons/sortalt/index.esm.js +415 -2
  342. package/icons/sortalt/index.esm.min.js +1 -1
  343. package/icons/sortalt/index.js +415 -2
  344. package/icons/sortalt/index.min.js +1 -1
  345. package/icons/sortamountdown/index.cjs.js +415 -2
  346. package/icons/sortamountdown/index.cjs.min.js +1 -1
  347. package/icons/sortamountdown/index.esm.js +415 -2
  348. package/icons/sortamountdown/index.esm.min.js +1 -1
  349. package/icons/sortamountdown/index.js +415 -2
  350. package/icons/sortamountdown/index.min.js +1 -1
  351. package/icons/sortamountupalt/index.cjs.js +415 -2
  352. package/icons/sortamountupalt/index.cjs.min.js +1 -1
  353. package/icons/sortamountupalt/index.esm.js +415 -2
  354. package/icons/sortamountupalt/index.esm.min.js +1 -1
  355. package/icons/sortamountupalt/index.js +415 -2
  356. package/icons/sortamountupalt/index.min.js +1 -1
  357. package/icons/spinner/index.cjs.js +415 -2
  358. package/icons/spinner/index.cjs.min.js +1 -1
  359. package/icons/spinner/index.esm.js +415 -2
  360. package/icons/spinner/index.esm.min.js +1 -1
  361. package/icons/spinner/index.js +415 -2
  362. package/icons/spinner/index.min.js +1 -1
  363. package/icons/star/index.cjs.js +415 -2
  364. package/icons/star/index.cjs.min.js +1 -1
  365. package/icons/star/index.esm.js +415 -2
  366. package/icons/star/index.esm.min.js +1 -1
  367. package/icons/star/index.js +415 -2
  368. package/icons/star/index.min.js +1 -1
  369. package/icons/starfill/index.cjs.js +415 -2
  370. package/icons/starfill/index.cjs.min.js +1 -1
  371. package/icons/starfill/index.esm.js +415 -2
  372. package/icons/starfill/index.esm.min.js +1 -1
  373. package/icons/starfill/index.js +415 -2
  374. package/icons/starfill/index.min.js +1 -1
  375. package/icons/thlarge/index.cjs.js +415 -2
  376. package/icons/thlarge/index.cjs.min.js +1 -1
  377. package/icons/thlarge/index.esm.js +415 -2
  378. package/icons/thlarge/index.esm.min.js +1 -1
  379. package/icons/thlarge/index.js +415 -2
  380. package/icons/thlarge/index.min.js +1 -1
  381. package/icons/timescircle/index.cjs.js +415 -2
  382. package/icons/timescircle/index.cjs.min.js +1 -1
  383. package/icons/timescircle/index.esm.js +415 -2
  384. package/icons/timescircle/index.esm.min.js +1 -1
  385. package/icons/timescircle/index.js +415 -2
  386. package/icons/timescircle/index.min.js +1 -1
  387. package/icons/trash/index.cjs.js +415 -2
  388. package/icons/trash/index.cjs.min.js +1 -1
  389. package/icons/trash/index.esm.js +415 -2
  390. package/icons/trash/index.esm.min.js +1 -1
  391. package/icons/trash/index.js +415 -2
  392. package/icons/trash/index.min.js +1 -1
  393. package/icons/undo/index.cjs.js +415 -2
  394. package/icons/undo/index.cjs.min.js +1 -1
  395. package/icons/undo/index.esm.js +415 -2
  396. package/icons/undo/index.esm.min.js +1 -1
  397. package/icons/undo/index.js +415 -2
  398. package/icons/undo/index.min.js +1 -1
  399. package/icons/upload/index.cjs.js +415 -2
  400. package/icons/upload/index.cjs.min.js +1 -1
  401. package/icons/upload/index.esm.js +415 -2
  402. package/icons/upload/index.esm.min.js +1 -1
  403. package/icons/upload/index.js +415 -2
  404. package/icons/upload/index.min.js +1 -1
  405. package/icons/windowmaximize/index.cjs.js +415 -2
  406. package/icons/windowmaximize/index.cjs.min.js +1 -1
  407. package/icons/windowmaximize/index.esm.js +415 -2
  408. package/icons/windowmaximize/index.esm.min.js +1 -1
  409. package/icons/windowmaximize/index.js +415 -2
  410. package/icons/windowmaximize/index.min.js +1 -1
  411. package/icons/windowminimize/index.cjs.js +415 -2
  412. package/icons/windowminimize/index.cjs.min.js +1 -1
  413. package/icons/windowminimize/index.esm.js +415 -2
  414. package/icons/windowminimize/index.esm.min.js +1 -1
  415. package/icons/windowminimize/index.js +415 -2
  416. package/icons/windowminimize/index.min.js +1 -1
  417. package/image/image.cjs.js +480 -80
  418. package/image/image.cjs.min.js +1 -1
  419. package/image/image.d.ts +130 -3
  420. package/image/image.esm.js +483 -83
  421. package/image/image.esm.min.js +1 -1
  422. package/image/image.js +481 -82
  423. package/image/image.min.css +1 -1
  424. package/image/image.min.js +1 -1
  425. package/inplace/inplace.cjs.js +2 -1
  426. package/inplace/inplace.cjs.min.js +1 -1
  427. package/inplace/inplace.esm.js +3 -2
  428. package/inplace/inplace.esm.min.js +1 -1
  429. package/inplace/inplace.js +2 -1
  430. package/inplace/inplace.min.js +1 -1
  431. package/inputmask/inputmask.cjs.js +26 -26
  432. package/inputmask/inputmask.cjs.min.js +1 -1
  433. package/inputmask/inputmask.d.ts +7 -2
  434. package/inputmask/inputmask.esm.js +27 -27
  435. package/inputmask/inputmask.esm.min.js +1 -1
  436. package/inputmask/inputmask.js +26 -28
  437. package/inputmask/inputmask.min.js +1 -1
  438. package/inputnumber/inputnumber.cjs.js +68 -48
  439. package/inputnumber/inputnumber.cjs.min.js +1 -1
  440. package/inputnumber/inputnumber.d.ts +62 -1
  441. package/inputnumber/inputnumber.esm.js +66 -49
  442. package/inputnumber/inputnumber.esm.min.js +1 -1
  443. package/inputnumber/inputnumber.js +68 -50
  444. package/inputnumber/inputnumber.min.js +1 -1
  445. package/inputswitch/inputswitch.cjs.js +84 -25
  446. package/inputswitch/inputswitch.cjs.min.js +1 -1
  447. package/inputswitch/inputswitch.d.ts +61 -0
  448. package/inputswitch/inputswitch.esm.js +85 -26
  449. package/inputswitch/inputswitch.esm.min.js +1 -1
  450. package/inputswitch/inputswitch.js +83 -27
  451. package/inputswitch/inputswitch.min.js +1 -1
  452. package/inputtext/inputtext.cjs.js +25 -15
  453. package/inputtext/inputtext.cjs.min.js +1 -1
  454. package/inputtext/inputtext.d.ts +32 -0
  455. package/inputtext/inputtext.esm.js +26 -16
  456. package/inputtext/inputtext.esm.min.js +1 -1
  457. package/inputtext/inputtext.js +25 -17
  458. package/inputtext/inputtext.min.js +1 -1
  459. package/inputtextarea/inputtextarea.cjs.js +25 -15
  460. package/inputtextarea/inputtextarea.cjs.min.js +1 -1
  461. package/inputtextarea/inputtextarea.d.ts +33 -1
  462. package/inputtextarea/inputtextarea.esm.js +26 -16
  463. package/inputtextarea/inputtextarea.esm.min.js +1 -1
  464. package/inputtextarea/inputtextarea.js +25 -17
  465. package/inputtextarea/inputtextarea.min.js +1 -1
  466. package/keyfilter/keyfilter.cjs.js +25 -9
  467. package/keyfilter/keyfilter.cjs.min.js +1 -1
  468. package/keyfilter/keyfilter.esm.js +25 -9
  469. package/keyfilter/keyfilter.esm.min.js +1 -1
  470. package/keyfilter/keyfilter.js +25 -11
  471. package/keyfilter/keyfilter.min.js +1 -1
  472. package/knob/knob.cjs.js +44 -43
  473. package/knob/knob.cjs.min.js +1 -1
  474. package/knob/knob.d.ts +42 -0
  475. package/knob/knob.esm.js +45 -44
  476. package/knob/knob.esm.min.js +1 -1
  477. package/knob/knob.js +44 -45
  478. package/knob/knob.min.js +1 -1
  479. package/listbox/listbox.cjs.js +86 -56
  480. package/listbox/listbox.cjs.min.js +1 -1
  481. package/listbox/listbox.d.ts +103 -3
  482. package/listbox/listbox.esm.js +88 -58
  483. package/listbox/listbox.esm.min.js +1 -1
  484. package/listbox/listbox.js +86 -57
  485. package/listbox/listbox.min.js +1 -1
  486. package/megamenu/megamenu.cjs.js +151 -99
  487. package/megamenu/megamenu.cjs.min.js +1 -1
  488. package/megamenu/megamenu.d.ts +142 -2
  489. package/megamenu/megamenu.esm.js +152 -100
  490. package/megamenu/megamenu.esm.min.js +1 -1
  491. package/megamenu/megamenu.js +149 -98
  492. package/megamenu/megamenu.min.js +1 -1
  493. package/mention/mention.cjs.js +87 -61
  494. package/mention/mention.cjs.min.js +1 -1
  495. package/mention/mention.d.ts +80 -1
  496. package/mention/mention.esm.js +89 -63
  497. package/mention/mention.esm.min.js +1 -1
  498. package/mention/mention.js +88 -63
  499. package/mention/mention.min.js +1 -1
  500. package/menu/menu.cjs.js +99 -59
  501. package/menu/menu.cjs.min.js +1 -1
  502. package/menu/menu.d.ts +71 -0
  503. package/menu/menu.esm.js +101 -61
  504. package/menu/menu.esm.min.js +1 -1
  505. package/menu/menu.js +100 -61
  506. package/menu/menu.min.js +1 -1
  507. package/menubar/menubar.cjs.js +122 -114
  508. package/menubar/menubar.cjs.min.js +1 -1
  509. package/menubar/menubar.d.ts +94 -1
  510. package/menubar/menubar.esm.js +124 -116
  511. package/menubar/menubar.esm.min.js +1 -1
  512. package/menubar/menubar.js +122 -115
  513. package/menubar/menubar.min.js +1 -1
  514. package/message/message.cjs.js +69 -47
  515. package/message/message.cjs.min.js +1 -1
  516. package/message/message.d.ts +35 -2
  517. package/message/message.esm.js +70 -48
  518. package/message/message.esm.min.js +1 -1
  519. package/message/message.js +69 -49
  520. package/message/message.min.js +1 -1
  521. package/messages/messages.cjs.js +65 -63
  522. package/messages/messages.cjs.min.js +1 -1
  523. package/messages/messages.d.ts +51 -2
  524. package/messages/messages.esm.js +66 -64
  525. package/messages/messages.esm.min.js +1 -1
  526. package/messages/messages.js +65 -64
  527. package/messages/messages.min.js +1 -1
  528. package/multiselect/multiselect.cjs.js +249 -193
  529. package/multiselect/multiselect.cjs.min.js +1 -1
  530. package/multiselect/multiselect.d.ts +185 -3
  531. package/multiselect/multiselect.esm.js +252 -196
  532. package/multiselect/multiselect.esm.min.js +1 -1
  533. package/multiselect/multiselect.js +249 -194
  534. package/multiselect/multiselect.min.js +1 -1
  535. package/multistatecheckbox/multistatecheckbox.cjs.js +47 -33
  536. package/multistatecheckbox/multistatecheckbox.cjs.min.js +1 -1
  537. package/multistatecheckbox/multistatecheckbox.d.ts +61 -2
  538. package/multistatecheckbox/multistatecheckbox.esm.js +49 -35
  539. package/multistatecheckbox/multistatecheckbox.esm.min.js +1 -1
  540. package/multistatecheckbox/multistatecheckbox.js +48 -35
  541. package/multistatecheckbox/multistatecheckbox.min.js +1 -1
  542. package/orderlist/orderlist.cjs.js +188 -110
  543. package/orderlist/orderlist.cjs.min.js +1 -1
  544. package/orderlist/orderlist.d.ts +118 -2
  545. package/orderlist/orderlist.esm.js +190 -112
  546. package/orderlist/orderlist.esm.min.js +1 -1
  547. package/orderlist/orderlist.js +186 -109
  548. package/orderlist/orderlist.min.js +1 -1
  549. package/organizationchart/organizationchart.cjs.js +139 -73
  550. package/organizationchart/organizationchart.cjs.min.js +1 -1
  551. package/organizationchart/organizationchart.d.ts +89 -2
  552. package/organizationchart/organizationchart.esm.js +140 -74
  553. package/organizationchart/organizationchart.esm.min.js +1 -1
  554. package/organizationchart/organizationchart.js +139 -75
  555. package/organizationchart/organizationchart.min.js +1 -1
  556. package/overlaypanel/overlaypanel.cjs.js +7 -6
  557. package/overlaypanel/overlaypanel.cjs.min.js +1 -1
  558. package/overlaypanel/overlaypanel.d.ts +5 -0
  559. package/overlaypanel/overlaypanel.esm.js +8 -7
  560. package/overlaypanel/overlaypanel.esm.min.js +1 -1
  561. package/overlaypanel/overlaypanel.js +8 -7
  562. package/overlaypanel/overlaypanel.min.js +1 -1
  563. package/package.json +1 -1
  564. package/paginator/paginator.cjs.js +172 -166
  565. package/paginator/paginator.cjs.min.js +1 -1
  566. package/paginator/paginator.d.ts +111 -5
  567. package/paginator/paginator.esm.js +174 -168
  568. package/paginator/paginator.esm.min.js +1 -1
  569. package/paginator/paginator.js +172 -167
  570. package/paginator/paginator.min.js +1 -1
  571. package/panel/panel.cjs.js +3 -1
  572. package/panel/panel.cjs.min.js +1 -1
  573. package/panel/panel.esm.js +3 -1
  574. package/panel/panel.esm.min.js +1 -1
  575. package/panel/panel.js +4 -3
  576. package/panel/panel.min.js +1 -1
  577. package/panelmenu/panelmenu.cjs.js +148 -84
  578. package/panelmenu/panelmenu.cjs.min.js +1 -1
  579. package/panelmenu/panelmenu.d.ts +124 -2
  580. package/panelmenu/panelmenu.esm.js +148 -84
  581. package/panelmenu/panelmenu.esm.min.js +1 -1
  582. package/panelmenu/panelmenu.js +146 -84
  583. package/panelmenu/panelmenu.min.js +1 -1
  584. package/password/password.cjs.js +89 -46
  585. package/password/password.cjs.min.js +1 -1
  586. package/password/password.d.ts +98 -2
  587. package/password/password.esm.js +91 -48
  588. package/password/password.esm.min.js +1 -1
  589. package/password/password.js +88 -46
  590. package/password/password.min.js +1 -1
  591. package/picklist/picklist.cjs.js +146 -82
  592. package/picklist/picklist.cjs.min.js +1 -1
  593. package/picklist/picklist.d.ts +133 -1
  594. package/picklist/picklist.esm.js +148 -84
  595. package/picklist/picklist.esm.min.js +1 -1
  596. package/picklist/picklist.js +143 -80
  597. package/picklist/picklist.min.js +1 -1
  598. package/portal/portal.cjs.js +3 -2
  599. package/portal/portal.cjs.min.js +1 -1
  600. package/portal/portal.esm.js +3 -2
  601. package/portal/portal.esm.min.js +1 -1
  602. package/portal/portal.js +4 -3
  603. package/portal/portal.min.js +1 -1
  604. package/primereact.all.cjs.js +6656 -4389
  605. package/primereact.all.cjs.min.js +1 -1
  606. package/primereact.all.esm.js +6655 -4390
  607. package/primereact.all.esm.min.js +1 -1
  608. package/primereact.all.js +6656 -4389
  609. package/primereact.all.min.js +1 -1
  610. package/progressbar/progressbar.cjs.js +3 -1
  611. package/progressbar/progressbar.cjs.min.js +1 -1
  612. package/progressbar/progressbar.esm.js +3 -1
  613. package/progressbar/progressbar.esm.min.js +1 -1
  614. package/progressbar/progressbar.js +4 -3
  615. package/progressbar/progressbar.min.js +1 -1
  616. package/progressspinner/progressspinner.cjs.js +3 -1
  617. package/progressspinner/progressspinner.cjs.min.js +1 -1
  618. package/progressspinner/progressspinner.esm.js +3 -1
  619. package/progressspinner/progressspinner.esm.min.js +1 -1
  620. package/progressspinner/progressspinner.js +4 -3
  621. package/progressspinner/progressspinner.min.js +1 -1
  622. package/radiobutton/radiobutton.cjs.js +90 -30
  623. package/radiobutton/radiobutton.cjs.min.js +1 -1
  624. package/radiobutton/radiobutton.d.ts +66 -1
  625. package/radiobutton/radiobutton.esm.js +91 -31
  626. package/radiobutton/radiobutton.esm.min.js +1 -1
  627. package/radiobutton/radiobutton.js +89 -32
  628. package/radiobutton/radiobutton.min.js +1 -1
  629. package/rating/rating.cjs.js +47 -36
  630. package/rating/rating.cjs.min.js +1 -1
  631. package/rating/rating.d.ts +64 -1
  632. package/rating/rating.esm.js +48 -37
  633. package/rating/rating.esm.min.js +1 -1
  634. package/rating/rating.js +47 -38
  635. package/rating/rating.min.js +1 -1
  636. package/resources/primereact.css +475 -465
  637. package/resources/primereact.min.css +1 -1
  638. package/resources/themes/arya-blue/theme.css +33 -8
  639. package/resources/themes/arya-green/theme.css +33 -8
  640. package/resources/themes/arya-orange/theme.css +33 -8
  641. package/resources/themes/arya-purple/theme.css +33 -8
  642. package/resources/themes/bootstrap4-dark-blue/theme.css +33 -8
  643. package/resources/themes/bootstrap4-dark-purple/theme.css +33 -8
  644. package/resources/themes/bootstrap4-light-blue/theme.css +33 -8
  645. package/resources/themes/bootstrap4-light-purple/theme.css +33 -8
  646. package/resources/themes/fluent-light/theme.css +33 -8
  647. package/resources/themes/lara-dark-blue/theme.css +33 -8
  648. package/resources/themes/lara-dark-indigo/theme.css +33 -8
  649. package/resources/themes/lara-dark-purple/theme.css +33 -8
  650. package/resources/themes/lara-dark-teal/theme.css +33 -8
  651. package/resources/themes/lara-light-blue/theme.css +33 -8
  652. package/resources/themes/lara-light-indigo/theme.css +33 -8
  653. package/resources/themes/lara-light-purple/theme.css +33 -8
  654. package/resources/themes/lara-light-teal/theme.css +33 -8
  655. package/resources/themes/luna-amber/theme.css +33 -8
  656. package/resources/themes/luna-blue/theme.css +33 -8
  657. package/resources/themes/luna-green/theme.css +33 -8
  658. package/resources/themes/luna-pink/theme.css +33 -8
  659. package/resources/themes/md-dark-deeppurple/theme.css +33 -8
  660. package/resources/themes/md-dark-indigo/theme.css +33 -8
  661. package/resources/themes/md-light-deeppurple/theme.css +33 -8
  662. package/resources/themes/md-light-indigo/theme.css +33 -8
  663. package/resources/themes/mdc-dark-deeppurple/theme.css +33 -8
  664. package/resources/themes/mdc-dark-indigo/theme.css +33 -8
  665. package/resources/themes/mdc-light-deeppurple/theme.css +33 -8
  666. package/resources/themes/mdc-light-indigo/theme.css +33 -8
  667. package/resources/themes/mira/theme.css +33 -8
  668. package/resources/themes/nano/theme.css +33 -8
  669. package/resources/themes/nova/theme.css +33 -8
  670. package/resources/themes/nova-accent/theme.css +33 -8
  671. package/resources/themes/nova-alt/theme.css +33 -8
  672. package/resources/themes/rhea/theme.css +33 -8
  673. package/resources/themes/saga-blue/theme.css +33 -8
  674. package/resources/themes/saga-green/theme.css +33 -8
  675. package/resources/themes/saga-orange/theme.css +33 -8
  676. package/resources/themes/saga-purple/theme.css +33 -8
  677. package/resources/themes/soho-dark/theme.css +33 -8
  678. package/resources/themes/soho-light/theme.css +33 -8
  679. package/resources/themes/tailwind-light/theme.css +45 -20
  680. package/resources/themes/vela-blue/theme.css +33 -8
  681. package/resources/themes/vela-green/theme.css +33 -8
  682. package/resources/themes/vela-orange/theme.css +33 -8
  683. package/resources/themes/vela-purple/theme.css +33 -8
  684. package/resources/themes/viva-dark/theme.css +33 -8
  685. package/resources/themes/viva-light/theme.css +33 -8
  686. package/ripple/ripple.cjs.js +3 -2
  687. package/ripple/ripple.cjs.min.js +1 -1
  688. package/ripple/ripple.esm.js +3 -2
  689. package/ripple/ripple.esm.min.js +1 -1
  690. package/ripple/ripple.js +4 -3
  691. package/ripple/ripple.min.js +1 -1
  692. package/row/row.cjs.js +28 -41
  693. package/row/row.cjs.min.js +1 -1
  694. package/row/row.d.ts +28 -0
  695. package/row/row.esm.js +15 -28
  696. package/row/row.esm.min.js +1 -1
  697. package/row/row.js +49 -64
  698. package/row/row.min.js +1 -1
  699. package/scrollpanel/scrollpanel.cjs.js +3 -1
  700. package/scrollpanel/scrollpanel.cjs.min.js +1 -1
  701. package/scrollpanel/scrollpanel.esm.js +3 -1
  702. package/scrollpanel/scrollpanel.esm.min.js +1 -1
  703. package/scrollpanel/scrollpanel.js +4 -3
  704. package/scrollpanel/scrollpanel.min.js +1 -1
  705. package/scrolltop/scrolltop.cjs.js +9 -7
  706. package/scrolltop/scrolltop.cjs.min.js +1 -1
  707. package/scrolltop/scrolltop.esm.js +11 -9
  708. package/scrolltop/scrolltop.esm.min.js +1 -1
  709. package/scrolltop/scrolltop.js +10 -8
  710. package/scrolltop/scrolltop.min.js +1 -1
  711. package/selectbutton/selectbutton.cjs.js +37 -25
  712. package/selectbutton/selectbutton.cjs.min.js +1 -1
  713. package/selectbutton/selectbutton.d.ts +52 -1
  714. package/selectbutton/selectbutton.esm.js +38 -26
  715. package/selectbutton/selectbutton.esm.min.js +1 -1
  716. package/selectbutton/selectbutton.js +37 -27
  717. package/selectbutton/selectbutton.min.js +1 -1
  718. package/sidebar/sidebar.cjs.js +7 -6
  719. package/sidebar/sidebar.cjs.min.js +1 -1
  720. package/sidebar/sidebar.esm.js +8 -7
  721. package/sidebar/sidebar.esm.min.js +1 -1
  722. package/sidebar/sidebar.js +8 -7
  723. package/sidebar/sidebar.min.js +1 -1
  724. package/skeleton/skeleton.cjs.js +4 -3
  725. package/skeleton/skeleton.cjs.min.js +1 -1
  726. package/skeleton/skeleton.esm.js +4 -3
  727. package/skeleton/skeleton.esm.min.js +1 -1
  728. package/skeleton/skeleton.js +5 -5
  729. package/skeleton/skeleton.min.js +1 -1
  730. package/slidemenu/slidemenu.cjs.js +125 -114
  731. package/slidemenu/slidemenu.cjs.min.js +1 -1
  732. package/slidemenu/slidemenu.d.ts +103 -1
  733. package/slidemenu/slidemenu.esm.js +127 -116
  734. package/slidemenu/slidemenu.esm.min.js +1 -1
  735. package/slidemenu/slidemenu.js +125 -115
  736. package/slidemenu/slidemenu.min.js +1 -1
  737. package/slider/slider.cjs.js +71 -39
  738. package/slider/slider.cjs.min.js +1 -1
  739. package/slider/slider.d.ts +34 -1
  740. package/slider/slider.esm.js +72 -40
  741. package/slider/slider.esm.min.js +1 -1
  742. package/slider/slider.js +71 -41
  743. package/slider/slider.min.js +1 -1
  744. package/speeddial/speeddial.cjs.js +3 -1
  745. package/speeddial/speeddial.cjs.min.js +1 -1
  746. package/speeddial/speeddial.esm.js +3 -1
  747. package/speeddial/speeddial.esm.min.js +1 -1
  748. package/speeddial/speeddial.js +4 -3
  749. package/speeddial/speeddial.min.js +1 -1
  750. package/splitbutton/splitbutton.cjs.js +74 -63
  751. package/splitbutton/splitbutton.cjs.min.js +1 -1
  752. package/splitbutton/splitbutton.d.ts +39 -11
  753. package/splitbutton/splitbutton.esm.js +76 -65
  754. package/splitbutton/splitbutton.esm.min.js +1 -1
  755. package/splitbutton/splitbutton.js +74 -63
  756. package/splitbutton/splitbutton.min.js +1 -1
  757. package/splitter/splitter.cjs.js +3 -1
  758. package/splitter/splitter.cjs.min.js +1 -1
  759. package/splitter/splitter.d.ts +10 -0
  760. package/splitter/splitter.esm.js +3 -1
  761. package/splitter/splitter.esm.min.js +1 -1
  762. package/splitter/splitter.js +4 -3
  763. package/splitter/splitter.min.js +1 -1
  764. package/steps/steps.cjs.js +81 -46
  765. package/steps/steps.cjs.min.js +1 -1
  766. package/steps/steps.d.ts +50 -0
  767. package/steps/steps.esm.js +82 -47
  768. package/steps/steps.esm.min.js +1 -1
  769. package/steps/steps.js +81 -48
  770. package/steps/steps.min.js +1 -1
  771. package/styleclass/styleclass.cjs.js +3 -1
  772. package/styleclass/styleclass.cjs.min.js +1 -1
  773. package/styleclass/styleclass.esm.js +3 -1
  774. package/styleclass/styleclass.esm.min.js +1 -1
  775. package/styleclass/styleclass.js +4 -3
  776. package/styleclass/styleclass.min.js +1 -1
  777. package/tabmenu/tabmenu.cjs.js +86 -48
  778. package/tabmenu/tabmenu.cjs.min.js +1 -1
  779. package/tabmenu/tabmenu.d.ts +62 -0
  780. package/tabmenu/tabmenu.esm.js +87 -49
  781. package/tabmenu/tabmenu.esm.min.js +1 -1
  782. package/tabmenu/tabmenu.js +86 -50
  783. package/tabmenu/tabmenu.min.js +1 -1
  784. package/tabview/tabview.cjs.js +8 -5
  785. package/tabview/tabview.cjs.min.js +1 -1
  786. package/tabview/tabview.esm.js +9 -6
  787. package/tabview/tabview.esm.min.js +1 -1
  788. package/tabview/tabview.js +7 -4
  789. package/tabview/tabview.min.js +1 -1
  790. package/tag/tag.cjs.js +3 -1
  791. package/tag/tag.cjs.min.js +1 -1
  792. package/tag/tag.esm.js +3 -1
  793. package/tag/tag.esm.min.js +1 -1
  794. package/tag/tag.js +4 -3
  795. package/tag/tag.min.js +1 -1
  796. package/terminal/terminal.cjs.js +3 -1
  797. package/terminal/terminal.cjs.min.js +1 -1
  798. package/terminal/terminal.esm.js +3 -1
  799. package/terminal/terminal.esm.min.js +1 -1
  800. package/terminal/terminal.js +4 -3
  801. package/terminal/terminal.min.js +1 -1
  802. package/tieredmenu/tieredmenu.cjs.js +110 -64
  803. package/tieredmenu/tieredmenu.cjs.min.js +1 -1
  804. package/tieredmenu/tieredmenu.d.ts +83 -2
  805. package/tieredmenu/tieredmenu.esm.js +112 -66
  806. package/tieredmenu/tieredmenu.esm.min.js +1 -1
  807. package/tieredmenu/tieredmenu.js +111 -66
  808. package/tieredmenu/tieredmenu.min.js +1 -1
  809. package/timeline/timeline.cjs.js +51 -43
  810. package/timeline/timeline.cjs.min.js +1 -1
  811. package/timeline/timeline.d.ts +51 -1
  812. package/timeline/timeline.esm.js +52 -44
  813. package/timeline/timeline.esm.min.js +1 -1
  814. package/timeline/timeline.js +51 -45
  815. package/timeline/timeline.min.js +1 -1
  816. package/toast/toast.cjs.js +118 -75
  817. package/toast/toast.cjs.min.js +1 -1
  818. package/toast/toast.d.ts +122 -4
  819. package/toast/toast.esm.js +120 -77
  820. package/toast/toast.esm.min.js +1 -1
  821. package/toast/toast.js +116 -74
  822. package/toast/toast.min.js +1 -1
  823. package/togglebutton/togglebutton.cjs.js +74 -21
  824. package/togglebutton/togglebutton.cjs.min.js +1 -1
  825. package/togglebutton/togglebutton.d.ts +40 -2
  826. package/togglebutton/togglebutton.esm.js +75 -22
  827. package/togglebutton/togglebutton.esm.min.js +1 -1
  828. package/togglebutton/togglebutton.js +73 -23
  829. package/togglebutton/togglebutton.min.js +1 -1
  830. package/toolbar/toolbar.cjs.js +3 -1
  831. package/toolbar/toolbar.cjs.min.js +1 -1
  832. package/toolbar/toolbar.d.ts +5 -11
  833. package/toolbar/toolbar.esm.js +3 -1
  834. package/toolbar/toolbar.esm.min.js +1 -1
  835. package/toolbar/toolbar.js +4 -3
  836. package/toolbar/toolbar.min.js +1 -1
  837. package/tooltip/tooltip.cjs.js +3 -2
  838. package/tooltip/tooltip.cjs.min.js +1 -1
  839. package/tooltip/tooltip.d.ts +7 -7
  840. package/tooltip/tooltip.esm.js +4 -3
  841. package/tooltip/tooltip.esm.min.js +1 -1
  842. package/tooltip/tooltip.js +3 -2
  843. package/tooltip/tooltip.min.js +1 -1
  844. package/tree/tree.cjs.js +118 -88
  845. package/tree/tree.cjs.min.js +1 -1
  846. package/tree/tree.d.ts +139 -1
  847. package/tree/tree.esm.js +120 -90
  848. package/tree/tree.esm.min.js +1 -1
  849. package/tree/tree.js +116 -87
  850. package/tree/tree.min.js +1 -1
  851. package/treeselect/treeselect.cjs.js +135 -102
  852. package/treeselect/treeselect.cjs.min.js +1 -1
  853. package/treeselect/treeselect.d.ts +143 -2
  854. package/treeselect/treeselect.esm.js +137 -104
  855. package/treeselect/treeselect.esm.min.js +1 -1
  856. package/treeselect/treeselect.js +136 -104
  857. package/treeselect/treeselect.min.js +1 -1
  858. package/treetable/treetable.cjs.js +385 -198
  859. package/treetable/treetable.cjs.min.js +1 -1
  860. package/treetable/treetable.d.ts +305 -2
  861. package/treetable/treetable.esm.js +387 -200
  862. package/treetable/treetable.esm.min.js +1 -1
  863. package/treetable/treetable.js +383 -197
  864. package/treetable/treetable.min.js +1 -1
  865. package/tristatecheckbox/tristatecheckbox.cjs.js +97 -40
  866. package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
  867. package/tristatecheckbox/tristatecheckbox.d.ts +64 -1
  868. package/tristatecheckbox/tristatecheckbox.esm.js +99 -42
  869. package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
  870. package/tristatecheckbox/tristatecheckbox.js +97 -42
  871. package/tristatecheckbox/tristatecheckbox.min.js +1 -1
  872. package/utils/utils.cjs.js +31 -5
  873. package/utils/utils.cjs.min.js +1 -1
  874. package/utils/utils.d.ts +1 -1
  875. package/utils/utils.esm.js +28 -5
  876. package/utils/utils.esm.min.js +1 -1
  877. package/utils/utils.js +32 -7
  878. package/utils/utils.min.js +1 -1
  879. package/virtualscroller/virtualscroller.cjs.js +43 -29
  880. package/virtualscroller/virtualscroller.cjs.min.js +1 -1
  881. package/virtualscroller/virtualscroller.d.ts +78 -1
  882. package/virtualscroller/virtualscroller.esm.js +44 -30
  883. package/virtualscroller/virtualscroller.esm.min.js +1 -1
  884. package/virtualscroller/virtualscroller.js +43 -31
  885. package/virtualscroller/virtualscroller.min.js +1 -1
  886. package/web-types.json +1 -1
@@ -10,6 +10,57 @@
10
10
  import * as React from 'react';
11
11
  import { TooltipOptions } from '../tooltip/tooltipoptions';
12
12
  import { FormEvent } from '../ts-helpers';
13
+ import { PassThroughType } from '../utils/utils';
14
+ import { TooltipPassThroughOptions } from '../tooltip/tooltip';
15
+
16
+ export declare type InputSwitchPassThroughType<T> = PassThroughType<T, InputSwitchPassThroughMethodOptions>;
17
+
18
+ /**
19
+ * Custom passthrough(pt) option method.
20
+ */
21
+ export interface InputSwitchPassThroughMethodOptions {
22
+ props: InputSwitchProps;
23
+ state: InputSwitchState;
24
+ }
25
+
26
+ /**
27
+ * Custom passthrough(pt) options.
28
+ * @see {@link InputSwitchProps.pt}
29
+ */
30
+ export interface InputSwitchPassThroughOptions {
31
+ /**
32
+ * Uses to pass attributes to the root's DOM element.
33
+ */
34
+ root?: InputSwitchPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
35
+ /**
36
+ * Uses to pass attributes to the slider's DOM element.
37
+ */
38
+ slider?: InputSwitchPassThroughType<React.HTMLAttributes<HTMLSpanElement>>;
39
+ /**
40
+ * Uses to pass attributes to the hidden input wrapper's DOM element.
41
+ */
42
+ hiddenInputWrapper?: InputSwitchPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
43
+ /**
44
+ * Uses to pass attributes to the hidden input's DOM element.
45
+ */
46
+ hiddenInput?: InputSwitchPassThroughType<React.HTMLAttributes<HTMLInputElement>>;
47
+ /**
48
+ * Uses to pass attributes tooltip's DOM element.
49
+ * @type {TooltipPassThroughOptions}
50
+ */
51
+ tooltip?: TooltipPassThroughOptions;
52
+ }
53
+
54
+ /**
55
+ * Defines current inline state in InputSwitch component.
56
+ */
57
+ export interface InputSwitchState {
58
+ /**
59
+ * Current focus state as a boolean.
60
+ * @defaultValue false
61
+ */
62
+ focused: boolean;
63
+ }
13
64
 
14
65
  /**
15
66
  * Custom change event.
@@ -28,6 +79,11 @@ export interface InputSwitchProps extends Omit<React.DetailedHTMLProps<React.Inp
28
79
  * Unique identifier of the element.
29
80
  */
30
81
  id?: string | undefined;
82
+ /**
83
+ * When present, it specifies that the component should automatically get focus on load.
84
+ * @defaultValue false
85
+ */
86
+ autoFocus?: boolean | undefined;
31
87
  /**
32
88
  * Reference of the input element.
33
89
  */
@@ -101,6 +157,11 @@ export interface InputSwitchProps extends Omit<React.DetailedHTMLProps<React.Inp
101
157
  * @readonly
102
158
  */
103
159
  children?: React.ReactNode | undefined;
160
+ /**
161
+ * Uses to pass attributes to DOM elements inside the component.
162
+ * @type {InputSwitchPassThroughOptions}
163
+ */
164
+ pt?: InputSwitchPassThroughOptions;
104
165
  }
105
166
 
106
167
  /**
@@ -1,6 +1,9 @@
1
1
  import * as React from 'react';
2
+ import { useMountEffect } from 'primereact/hooks';
2
3
  import { Tooltip } from 'primereact/tooltip';
3
- import { ObjectUtils, DomHandler, classNames } from 'primereact/utils';
4
+ import { DomHandler, ObjectUtils, classNames, mergeProps } from 'primereact/utils';
5
+ import { ComponentBase } from 'primereact/componentbase';
6
+ import { PrimeReactContext } from 'primereact/api';
4
7
 
5
8
  function _extends() {
6
9
  _extends = Object.assign ? Object.assign.bind() : function (target) {
@@ -17,6 +20,47 @@ function _extends() {
17
20
  return _extends.apply(this, arguments);
18
21
  }
19
22
 
23
+ function _typeof(obj) {
24
+ "@babel/helpers - typeof";
25
+
26
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
27
+ return typeof obj;
28
+ } : function (obj) {
29
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
30
+ }, _typeof(obj);
31
+ }
32
+
33
+ function _toPrimitive(input, hint) {
34
+ if (_typeof(input) !== "object" || input === null) return input;
35
+ var prim = input[Symbol.toPrimitive];
36
+ if (prim !== undefined) {
37
+ var res = prim.call(input, hint || "default");
38
+ if (_typeof(res) !== "object") return res;
39
+ throw new TypeError("@@toPrimitive must return a primitive value.");
40
+ }
41
+ return (hint === "string" ? String : Number)(input);
42
+ }
43
+
44
+ function _toPropertyKey(arg) {
45
+ var key = _toPrimitive(arg, "string");
46
+ return _typeof(key) === "symbol" ? key : String(key);
47
+ }
48
+
49
+ function _defineProperty(obj, key, value) {
50
+ key = _toPropertyKey(key);
51
+ if (key in obj) {
52
+ Object.defineProperty(obj, key, {
53
+ value: value,
54
+ enumerable: true,
55
+ configurable: true,
56
+ writable: true
57
+ });
58
+ } else {
59
+ obj[key] = value;
60
+ }
61
+ return obj;
62
+ }
63
+
20
64
  function _arrayWithHoles(arr) {
21
65
  if (Array.isArray(arr)) return arr;
22
66
  }
@@ -72,9 +116,10 @@ function _slicedToArray(arr, i) {
72
116
  return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
73
117
  }
74
118
 
75
- var InputSwitchBase = {
119
+ var InputSwitchBase = ComponentBase.extend({
76
120
  defaultProps: {
77
121
  __TYPE: 'InputSwitch',
122
+ autoFocus: false,
78
123
  checked: false,
79
124
  className: null,
80
125
  disabled: false,
@@ -92,21 +137,25 @@ var InputSwitchBase = {
92
137
  tooltipOptions: null,
93
138
  trueValue: true,
94
139
  children: undefined
95
- },
96
- getProps: function getProps(props) {
97
- return ObjectUtils.getMergedProps(props, InputSwitchBase.defaultProps);
98
- },
99
- getOtherProps: function getOtherProps(props) {
100
- return ObjectUtils.getDiffProps(props, InputSwitchBase.defaultProps);
101
140
  }
102
- };
141
+ });
103
142
 
143
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
144
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
104
145
  var InputSwitch = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
105
- var props = InputSwitchBase.getProps(inProps);
146
+ var context = React.useContext(PrimeReactContext);
147
+ var props = InputSwitchBase.getProps(inProps, context);
106
148
  var _React$useState = React.useState(false),
107
149
  _React$useState2 = _slicedToArray(_React$useState, 2),
108
150
  focusedState = _React$useState2[0],
109
151
  setFocusedState = _React$useState2[1];
152
+ var _InputSwitchBase$setM = InputSwitchBase.setMetaData({
153
+ props: props,
154
+ state: {
155
+ focused: focusedState
156
+ }
157
+ }),
158
+ ptm = _InputSwitchBase$setM.ptm;
110
159
  var elementRef = React.useRef(null);
111
160
  var inputRef = React.useRef(props.inputRef);
112
161
  var checked = props.checked === props.trueValue;
@@ -163,6 +212,11 @@ var InputSwitch = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functio
163
212
  React.useEffect(function () {
164
213
  ObjectUtils.combinedRefs(inputRef, props.inputRef);
165
214
  }, [inputRef, props.inputRef]);
215
+ useMountEffect(function () {
216
+ if (props.autoFocus) {
217
+ DomHandler.focus(inputRef.current, props.autoFocus);
218
+ }
219
+ });
166
220
  var hasTooltip = ObjectUtils.isNotEmpty(props.tooltip);
167
221
  var otherProps = InputSwitchBase.getOtherProps(props);
168
222
  var ariaProps = ObjectUtils.reduceKeys(otherProps, DomHandler.ARIA_PROPS);
@@ -171,20 +225,21 @@ var InputSwitch = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functio
171
225
  'p-disabled': props.disabled,
172
226
  'p-focus': focusedState
173
227
  }, props.className);
174
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", _extends({
175
- ref: elementRef,
228
+ var rootProps = mergeProps({
176
229
  id: props.id,
230
+ ref: elementRef,
177
231
  className: className,
178
- style: props.style
179
- }, otherProps, {
232
+ style: props.style,
180
233
  onClick: onClick,
181
- role: "checkbox",
182
- "aria-checked": checked
183
- }), /*#__PURE__*/React.createElement("div", {
184
- className: "p-hidden-accessible"
185
- }, /*#__PURE__*/React.createElement("input", _extends({
234
+ role: 'checkbox',
235
+ 'aria-checked': checked
236
+ }, ptm('root'));
237
+ var hiddenInputWrapperProps = mergeProps({
238
+ className: 'p-hidden-accessible'
239
+ }, ptm('hiddenInputWrapper'));
240
+ var hiddenInputProps = mergeProps(_objectSpread({
186
241
  ref: inputRef,
187
- type: "checkbox",
242
+ type: 'checkbox',
188
243
  id: props.inputId,
189
244
  name: props.name,
190
245
  checked: checked,
@@ -192,15 +247,19 @@ var InputSwitch = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functio
192
247
  onFocus: onFocus,
193
248
  onBlur: onBlur,
194
249
  disabled: props.disabled,
195
- role: "switch",
250
+ role: 'switch',
196
251
  tabIndex: props.tabIndex,
197
- "aria-checked": checked
198
- }, ariaProps))), /*#__PURE__*/React.createElement("span", {
199
- className: "p-inputswitch-slider"
200
- })), hasTooltip && /*#__PURE__*/React.createElement(Tooltip, _extends({
252
+ 'aria-checked': checked
253
+ }, ariaProps), ptm('hiddenInput'));
254
+ var sliderProps = mergeProps({
255
+ className: 'p-inputswitch-slider'
256
+ }, ptm('slider'));
257
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", rootProps, /*#__PURE__*/React.createElement("div", hiddenInputWrapperProps, /*#__PURE__*/React.createElement("input", hiddenInputProps)), /*#__PURE__*/React.createElement("span", sliderProps)), hasTooltip && /*#__PURE__*/React.createElement(Tooltip, _extends({
201
258
  target: elementRef,
202
259
  content: props.tooltip
203
- }, props.tooltipOptions)));
260
+ }, props.tooltipOptions, {
261
+ pt: ptm('tooltip')
262
+ })));
204
263
  }));
205
264
  InputSwitch.displayName = 'InputSwitch';
206
265
 
@@ -1 +1 @@
1
- import*as e from"react";import{Tooltip as t}from"primereact/tooltip";import{ObjectUtils as n,DomHandler as r,classNames as o}from"primereact/utils";function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}function u(e){if(Array.isArray(e))return e}function a(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,l,u,a=[],i=!0,c=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(r=l.call(n)).done)&&(a.push(r.value),a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{if(!i&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}function s(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var p={defaultProps:{__TYPE:"InputSwitch",checked:!1,className:null,disabled:!1,falseValue:!1,id:null,inputId:null,inputRef:null,name:null,onBlur:null,onChange:null,onFocus:null,style:null,tabIndex:null,tooltip:null,tooltipOptions:null,trueValue:!0,children:void 0},getProps:function(e){return n.getMergedProps(e,p.defaultProps)},getOtherProps:function(e){return n.getDiffProps(e,p.defaultProps)}},f=e.memo(e.forwardRef((function(i,f){var d,m,h=p.getProps(i),b=e.useState(!1),g=(m=2,u(d=b)||a(d,m)||c(d,m)||s()),y=g[0],v=g[1],P=e.useRef(null),I=e.useRef(h.inputRef),O=h.checked===h.trueValue,w=function(e){if(h.onChange){var t=O?h.falseValue:h.trueValue;h.onChange({originalEvent:e,value:t,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{name:h.name,id:h.id,value:t}})}};e.useImperativeHandle(f,(function(){return{props:h,focus:function(){return r.focus(I.current)},getElement:function(){return P.current},getInput:function(){return I.current}}})),e.useEffect((function(){n.combinedRefs(I,h.inputRef)}),[I,h.inputRef]);var E=n.isNotEmpty(h.tooltip),R=p.getOtherProps(h),k=n.reduceKeys(R,r.ARIA_PROPS),S=o("p-inputswitch p-component",{"p-inputswitch-checked":O,"p-disabled":h.disabled,"p-focus":y},h.className);return e.createElement(e.Fragment,null,e.createElement("div",l({ref:P,id:h.id,className:S,style:h.style},R,{onClick:function(e){h.disabled||(w(e),r.focus(I.current),e.preventDefault())},role:"checkbox","aria-checked":O}),e.createElement("div",{className:"p-hidden-accessible"},e.createElement("input",l({ref:I,type:"checkbox",id:h.inputId,name:h.name,checked:O,onChange:w,onFocus:function(e){v(!0),h.onFocus&&h.onFocus(e)},onBlur:function(e){v(!1),h.onBlur&&h.onBlur(e)},disabled:h.disabled,role:"switch",tabIndex:h.tabIndex,"aria-checked":O},k))),e.createElement("span",{className:"p-inputswitch-slider"})),E&&e.createElement(t,l({target:P,content:h.tooltip},h.tooltipOptions)))})));f.displayName="InputSwitch";export{f as InputSwitch};
1
+ import*as e from"react";import{useMountEffect as t}from"primereact/hooks";import{Tooltip as r}from"primereact/tooltip";import{DomHandler as n,ObjectUtils as o,classNames as i,mergeProps as u}from"primereact/utils";import{ComponentBase as a}from"primereact/componentbase";import{PrimeReactContext as l}from"primereact/api";function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}function p(e){return p="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},p(e)}function s(e,t){if("object"!==p(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function f(e){var t=s(e,"string");return"symbol"===p(t)?t:String(t)}function m(e,t,r){return(t=f(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e){if(Array.isArray(e))return e}function b(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,u,a=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function h(e,t){if(e){if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(e,t):void 0}}function v(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var g=a.extend({defaultProps:{__TYPE:"InputSwitch",autoFocus:!1,checked:!1,className:null,disabled:!1,falseValue:!1,id:null,inputId:null,inputRef:null,name:null,onBlur:null,onChange:null,onFocus:null,style:null,tabIndex:null,tooltip:null,tooltipOptions:null,trueValue:!0,children:void 0}});function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var w=e.memo(e.forwardRef((function(a,p){var s,f,m=e.useContext(l),y=g.getProps(a,m),O=e.useState(!1),w=(f=2,d(s=O)||b(s,f)||h(s,f)||v()),P=w[0],S=w[1],E=g.setMetaData({props:y,state:{focused:P}}).ptm,I=e.useRef(null),k=e.useRef(y.inputRef),R=y.checked===y.trueValue,x=function(e){if(y.onChange){var t=R?y.falseValue:y.trueValue;y.onChange({originalEvent:e,value:t,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{name:y.name,id:y.id,value:t}})}};e.useImperativeHandle(p,(function(){return{props:y,focus:function(){return n.focus(k.current)},getElement:function(){return I.current},getInput:function(){return k.current}}})),e.useEffect((function(){o.combinedRefs(k,y.inputRef)}),[k,y.inputRef]),t((function(){y.autoFocus&&n.focus(k.current,y.autoFocus)}));var A=o.isNotEmpty(y.tooltip),D=g.getOtherProps(y),F=o.reduceKeys(D,n.ARIA_PROPS),N=i("p-inputswitch p-component",{"p-inputswitch-checked":R,"p-disabled":y.disabled,"p-focus":P},y.className),C=u({id:y.id,ref:I,className:N,style:y.style,onClick:function(e){y.disabled||(x(e),n.focus(k.current),e.preventDefault())},role:"checkbox","aria-checked":R},E("root")),V=u({className:"p-hidden-accessible"},E("hiddenInputWrapper")),B=u(j({ref:k,type:"checkbox",id:y.inputId,name:y.name,checked:R,onChange:x,onFocus:function(e){S(!0),y.onFocus&&y.onFocus(e)},onBlur:function(e){S(!1),y.onBlur&&y.onBlur(e)},disabled:y.disabled,role:"switch",tabIndex:y.tabIndex,"aria-checked":R},F),E("hiddenInput")),T=u({className:"p-inputswitch-slider"},E("slider"));return e.createElement(e.Fragment,null,e.createElement("div",C,e.createElement("div",V,e.createElement("input",B)),e.createElement("span",T)),A&&e.createElement(r,c({target:I,content:y.tooltip},y.tooltipOptions,{pt:E("tooltip")})))})));w.displayName="InputSwitch";export{w as InputSwitch};
@@ -1,5 +1,5 @@
1
1
  this.primereact = this.primereact || {};
2
- this.primereact.inputswitch = (function (exports, React, tooltip, utils) {
2
+ this.primereact.inputswitch = (function (exports, React, hooks, tooltip, utils, componentbase, api) {
3
3
  'use strict';
4
4
 
5
5
  function _interopNamespace(e) {
@@ -37,6 +37,47 @@ this.primereact.inputswitch = (function (exports, React, tooltip, utils) {
37
37
  return _extends.apply(this, arguments);
38
38
  }
39
39
 
40
+ function _typeof(obj) {
41
+ "@babel/helpers - typeof";
42
+
43
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
44
+ return typeof obj;
45
+ } : function (obj) {
46
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
47
+ }, _typeof(obj);
48
+ }
49
+
50
+ function _toPrimitive(input, hint) {
51
+ if (_typeof(input) !== "object" || input === null) return input;
52
+ var prim = input[Symbol.toPrimitive];
53
+ if (prim !== undefined) {
54
+ var res = prim.call(input, hint || "default");
55
+ if (_typeof(res) !== "object") return res;
56
+ throw new TypeError("@@toPrimitive must return a primitive value.");
57
+ }
58
+ return (hint === "string" ? String : Number)(input);
59
+ }
60
+
61
+ function _toPropertyKey(arg) {
62
+ var key = _toPrimitive(arg, "string");
63
+ return _typeof(key) === "symbol" ? key : String(key);
64
+ }
65
+
66
+ function _defineProperty(obj, key, value) {
67
+ key = _toPropertyKey(key);
68
+ if (key in obj) {
69
+ Object.defineProperty(obj, key, {
70
+ value: value,
71
+ enumerable: true,
72
+ configurable: true,
73
+ writable: true
74
+ });
75
+ } else {
76
+ obj[key] = value;
77
+ }
78
+ return obj;
79
+ }
80
+
40
81
  function _arrayWithHoles(arr) {
41
82
  if (Array.isArray(arr)) return arr;
42
83
  }
@@ -92,9 +133,10 @@ this.primereact.inputswitch = (function (exports, React, tooltip, utils) {
92
133
  return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
93
134
  }
94
135
 
95
- var InputSwitchBase = {
136
+ var InputSwitchBase = componentbase.ComponentBase.extend({
96
137
  defaultProps: {
97
138
  __TYPE: 'InputSwitch',
139
+ autoFocus: false,
98
140
  checked: false,
99
141
  className: null,
100
142
  disabled: false,
@@ -112,21 +154,25 @@ this.primereact.inputswitch = (function (exports, React, tooltip, utils) {
112
154
  tooltipOptions: null,
113
155
  trueValue: true,
114
156
  children: undefined
115
- },
116
- getProps: function getProps(props) {
117
- return utils.ObjectUtils.getMergedProps(props, InputSwitchBase.defaultProps);
118
- },
119
- getOtherProps: function getOtherProps(props) {
120
- return utils.ObjectUtils.getDiffProps(props, InputSwitchBase.defaultProps);
121
157
  }
122
- };
158
+ });
123
159
 
160
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
161
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
124
162
  var InputSwitch = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
125
- var props = InputSwitchBase.getProps(inProps);
163
+ var context = React__namespace.useContext(api.PrimeReactContext);
164
+ var props = InputSwitchBase.getProps(inProps, context);
126
165
  var _React$useState = React__namespace.useState(false),
127
166
  _React$useState2 = _slicedToArray(_React$useState, 2),
128
167
  focusedState = _React$useState2[0],
129
168
  setFocusedState = _React$useState2[1];
169
+ var _InputSwitchBase$setM = InputSwitchBase.setMetaData({
170
+ props: props,
171
+ state: {
172
+ focused: focusedState
173
+ }
174
+ }),
175
+ ptm = _InputSwitchBase$setM.ptm;
130
176
  var elementRef = React__namespace.useRef(null);
131
177
  var inputRef = React__namespace.useRef(props.inputRef);
132
178
  var checked = props.checked === props.trueValue;
@@ -183,6 +229,11 @@ this.primereact.inputswitch = (function (exports, React, tooltip, utils) {
183
229
  React__namespace.useEffect(function () {
184
230
  utils.ObjectUtils.combinedRefs(inputRef, props.inputRef);
185
231
  }, [inputRef, props.inputRef]);
232
+ hooks.useMountEffect(function () {
233
+ if (props.autoFocus) {
234
+ utils.DomHandler.focus(inputRef.current, props.autoFocus);
235
+ }
236
+ });
186
237
  var hasTooltip = utils.ObjectUtils.isNotEmpty(props.tooltip);
187
238
  var otherProps = InputSwitchBase.getOtherProps(props);
188
239
  var ariaProps = utils.ObjectUtils.reduceKeys(otherProps, utils.DomHandler.ARIA_PROPS);
@@ -191,20 +242,21 @@ this.primereact.inputswitch = (function (exports, React, tooltip, utils) {
191
242
  'p-disabled': props.disabled,
192
243
  'p-focus': focusedState
193
244
  }, props.className);
194
- return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("div", _extends({
195
- ref: elementRef,
245
+ var rootProps = utils.mergeProps({
196
246
  id: props.id,
247
+ ref: elementRef,
197
248
  className: className,
198
- style: props.style
199
- }, otherProps, {
249
+ style: props.style,
200
250
  onClick: onClick,
201
- role: "checkbox",
202
- "aria-checked": checked
203
- }), /*#__PURE__*/React__namespace.createElement("div", {
204
- className: "p-hidden-accessible"
205
- }, /*#__PURE__*/React__namespace.createElement("input", _extends({
251
+ role: 'checkbox',
252
+ 'aria-checked': checked
253
+ }, ptm('root'));
254
+ var hiddenInputWrapperProps = utils.mergeProps({
255
+ className: 'p-hidden-accessible'
256
+ }, ptm('hiddenInputWrapper'));
257
+ var hiddenInputProps = utils.mergeProps(_objectSpread({
206
258
  ref: inputRef,
207
- type: "checkbox",
259
+ type: 'checkbox',
208
260
  id: props.inputId,
209
261
  name: props.name,
210
262
  checked: checked,
@@ -212,15 +264,19 @@ this.primereact.inputswitch = (function (exports, React, tooltip, utils) {
212
264
  onFocus: onFocus,
213
265
  onBlur: onBlur,
214
266
  disabled: props.disabled,
215
- role: "switch",
267
+ role: 'switch',
216
268
  tabIndex: props.tabIndex,
217
- "aria-checked": checked
218
- }, ariaProps))), /*#__PURE__*/React__namespace.createElement("span", {
219
- className: "p-inputswitch-slider"
220
- })), hasTooltip && /*#__PURE__*/React__namespace.createElement(tooltip.Tooltip, _extends({
269
+ 'aria-checked': checked
270
+ }, ariaProps), ptm('hiddenInput'));
271
+ var sliderProps = utils.mergeProps({
272
+ className: 'p-inputswitch-slider'
273
+ }, ptm('slider'));
274
+ return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("div", rootProps, /*#__PURE__*/React__namespace.createElement("div", hiddenInputWrapperProps, /*#__PURE__*/React__namespace.createElement("input", hiddenInputProps)), /*#__PURE__*/React__namespace.createElement("span", sliderProps)), hasTooltip && /*#__PURE__*/React__namespace.createElement(tooltip.Tooltip, _extends({
221
275
  target: elementRef,
222
276
  content: props.tooltip
223
- }, props.tooltipOptions)));
277
+ }, props.tooltipOptions, {
278
+ pt: ptm('tooltip')
279
+ })));
224
280
  }));
225
281
  InputSwitch.displayName = 'InputSwitch';
226
282
 
@@ -230,4 +286,4 @@ this.primereact.inputswitch = (function (exports, React, tooltip, utils) {
230
286
 
231
287
  return exports;
232
288
 
233
- })({}, React, primereact.tooltip, primereact.utils);
289
+ })({}, React, primereact.hooks, primereact.tooltip, primereact.utils, primereact.componentbase, primereact.api);
@@ -1 +1 @@
1
- this.primereact=this.primereact||{},this.primereact.inputswitch=function(e,t,n,r){"use strict";function l(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var u=l(t);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}function i(e){if(Array.isArray(e))return e}function a(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,l,u,o,i=[],a=!0,c=!1;try{if(u=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=u.call(n)).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(e){c=!0,l=e}finally{try{if(!a&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw l}}return i}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function f(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var p={defaultProps:{__TYPE:"InputSwitch",checked:!1,className:null,disabled:!1,falseValue:!1,id:null,inputId:null,inputRef:null,name:null,onBlur:null,onChange:null,onFocus:null,style:null,tabIndex:null,tooltip:null,tooltipOptions:null,trueValue:!0,children:void 0},getProps:function(e){return r.ObjectUtils.getMergedProps(e,p.defaultProps)},getOtherProps:function(e){return r.ObjectUtils.getDiffProps(e,p.defaultProps)}},d=u.memo(u.forwardRef((function(e,t){var l,c,d=p.getProps(e),m=u.useState(!1),b=(c=2,i(l=m)||a(l,c)||s(l,c)||f()),h=b[0],g=b[1],y=u.useRef(null),v=u.useRef(d.inputRef),O=d.checked===d.trueValue,j=function(e){if(d.onChange){var t=O?d.falseValue:d.trueValue;d.onChange({originalEvent:e,value:t,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{name:d.name,id:d.id,value:t}})}};u.useImperativeHandle(t,(function(){return{props:d,focus:function(){return r.DomHandler.focus(v.current)},getElement:function(){return y.current},getInput:function(){return v.current}}})),u.useEffect((function(){r.ObjectUtils.combinedRefs(v,d.inputRef)}),[v,d.inputRef]);var P=r.ObjectUtils.isNotEmpty(d.tooltip),w=p.getOtherProps(d),I=r.ObjectUtils.reduceKeys(w,r.DomHandler.ARIA_PROPS),E=r.classNames("p-inputswitch p-component",{"p-inputswitch-checked":O,"p-disabled":d.disabled,"p-focus":h},d.className);return u.createElement(u.Fragment,null,u.createElement("div",o({ref:y,id:d.id,className:E,style:d.style},w,{onClick:function(e){d.disabled||(j(e),r.DomHandler.focus(v.current),e.preventDefault())},role:"checkbox","aria-checked":O}),u.createElement("div",{className:"p-hidden-accessible"},u.createElement("input",o({ref:v,type:"checkbox",id:d.inputId,name:d.name,checked:O,onChange:j,onFocus:function(e){g(!0),d.onFocus&&d.onFocus(e)},onBlur:function(e){g(!1),d.onBlur&&d.onBlur(e)},disabled:d.disabled,role:"switch",tabIndex:d.tabIndex,"aria-checked":O},I))),u.createElement("span",{className:"p-inputswitch-slider"})),P&&u.createElement(n.Tooltip,o({target:y,content:d.tooltip},d.tooltipOptions)))})));return d.displayName="InputSwitch",e.InputSwitch=d,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.tooltip,primereact.utils);
1
+ this.primereact=this.primereact||{},this.primereact.inputswitch=function(e,t,r,n,o,i,u){"use strict";function c(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var a=c(t);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l.apply(this,arguments)}function s(e){return s="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},s(e)}function p(e,t){if("object"!==s(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function f(e){var t=p(e,"string");return"symbol"===s(t)?t:String(t)}function m(e,t,r){return(t=f(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e){if(Array.isArray(e))return e}function b(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,u,c=[],a=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;a=!1}else for(;!(a=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{if(!a&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return c}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function h(e,t){if(e){if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(e,t):void 0}}function v(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var g=i.ComponentBase.extend({defaultProps:{__TYPE:"InputSwitch",autoFocus:!1,checked:!1,className:null,disabled:!1,falseValue:!1,id:null,inputId:null,inputRef:null,name:null,onBlur:null,onChange:null,onFocus:null,style:null,tabIndex:null,tooltip:null,tooltipOptions:null,trueValue:!0,children:void 0}});function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var P=a.memo(a.forwardRef((function(e,t){var i,c,s=a.useContext(u.PrimeReactContext),p=g.getProps(e,s),f=a.useState(!1),m=(c=2,d(i=f)||b(i,c)||h(i,c)||v()),y=m[0],O=m[1],P=g.setMetaData({props:p,state:{focused:y}}).ptm,w=a.useRef(null),S=a.useRef(p.inputRef),E=p.checked===p.trueValue,I=function(e){if(p.onChange){var t=E?p.falseValue:p.trueValue;p.onChange({originalEvent:e,value:t,stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},target:{name:p.name,id:p.id,value:t}})}};a.useImperativeHandle(t,(function(){return{props:p,focus:function(){return o.DomHandler.focus(S.current)},getElement:function(){return w.current},getInput:function(){return S.current}}})),a.useEffect((function(){o.ObjectUtils.combinedRefs(S,p.inputRef)}),[S,p.inputRef]),r.useMountEffect((function(){p.autoFocus&&o.DomHandler.focus(S.current,p.autoFocus)}));var D=o.ObjectUtils.isNotEmpty(p.tooltip),k=g.getOtherProps(p),R=o.ObjectUtils.reduceKeys(k,o.DomHandler.ARIA_PROPS),x=o.classNames("p-inputswitch p-component",{"p-inputswitch-checked":E,"p-disabled":p.disabled,"p-focus":y},p.className),C=o.mergeProps({id:p.id,ref:w,className:x,style:p.style,onClick:function(e){p.disabled||(I(e),o.DomHandler.focus(S.current),e.preventDefault())},role:"checkbox","aria-checked":E},P("root")),N=o.mergeProps({className:"p-hidden-accessible"},P("hiddenInputWrapper")),A=o.mergeProps(j({ref:S,type:"checkbox",id:p.inputId,name:p.name,checked:E,onChange:I,onFocus:function(e){O(!0),p.onFocus&&p.onFocus(e)},onBlur:function(e){O(!1),p.onBlur&&p.onBlur(e)},disabled:p.disabled,role:"switch",tabIndex:p.tabIndex,"aria-checked":E},R),P("hiddenInput")),F=o.mergeProps({className:"p-inputswitch-slider"},P("slider"));return a.createElement(a.Fragment,null,a.createElement("div",C,a.createElement("div",N,a.createElement("input",A)),a.createElement("span",F)),D&&a.createElement(n.Tooltip,l({target:w,content:p.tooltip},p.tooltipOptions,{pt:P("tooltip")})))})));return P.displayName="InputSwitch",e.InputSwitch=P,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.hooks,primereact.tooltip,primereact.utils,primereact.componentbase,primereact.api);
@@ -6,6 +6,8 @@ var React = require('react');
6
6
  var keyfilter = require('primereact/keyfilter');
7
7
  var tooltip = require('primereact/tooltip');
8
8
  var utils = require('primereact/utils');
9
+ var componentbase = require('primereact/componentbase');
10
+ var api = require('primereact/api');
9
11
 
10
12
  function _interopNamespace(e) {
11
13
  if (e && e.__esModule) return e;
@@ -42,28 +44,28 @@ function _extends() {
42
44
  return _extends.apply(this, arguments);
43
45
  }
44
46
 
45
- var InputTextBase = {
47
+ var InputTextBase = componentbase.ComponentBase.extend({
46
48
  defaultProps: {
47
49
  __TYPE: 'InputText',
48
50
  keyfilter: null,
49
51
  validateOnly: false,
50
52
  tooltip: null,
51
53
  tooltipOptions: null,
54
+ onBeforeInput: null,
52
55
  onInput: null,
53
56
  onKeyDown: null,
54
57
  onPaste: null,
55
58
  children: undefined
56
- },
57
- getProps: function getProps(props) {
58
- return utils.ObjectUtils.getMergedProps(props, InputTextBase.defaultProps);
59
- },
60
- getOtherProps: function getOtherProps(props) {
61
- return utils.ObjectUtils.getDiffProps(props, InputTextBase.defaultProps);
62
59
  }
63
- };
60
+ });
64
61
 
65
62
  var InputText = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
66
- var props = InputTextBase.getProps(inProps);
63
+ var context = React__namespace.useContext(api.PrimeReactContext);
64
+ var props = InputTextBase.getProps(inProps, context);
65
+ var _InputTextBase$setMet = InputTextBase.setMetaData({
66
+ props: props
67
+ }),
68
+ ptm = _InputTextBase$setMet.ptm;
67
69
  var elementRef = React__namespace.useRef(ref);
68
70
  var onKeyDown = function onKeyDown(event) {
69
71
  props.onKeyDown && props.onKeyDown(event);
@@ -71,6 +73,12 @@ var InputText = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespac
71
73
  keyfilter.KeyFilter.onKeyPress(event, props.keyfilter, props.validateOnly);
72
74
  }
73
75
  };
76
+ var onBeforeInput = function onBeforeInput(event) {
77
+ props.onBeforeInput && props.onBeforeInput(event);
78
+ if (props.keyfilter) {
79
+ keyfilter.KeyFilter.onBeforeInput(event, props.keyfilter, props.validateOnly);
80
+ }
81
+ };
74
82
  var onInput = function onInput(event) {
75
83
  var target = event.target;
76
84
  var validatePattern = true;
@@ -95,22 +103,24 @@ var InputText = /*#__PURE__*/React__namespace.memo( /*#__PURE__*/React__namespac
95
103
  return utils.ObjectUtils.isNotEmpty(props.value) || utils.ObjectUtils.isNotEmpty(props.defaultValue);
96
104
  }, [props.value, props.defaultValue]);
97
105
  var hasTooltip = utils.ObjectUtils.isNotEmpty(props.tooltip);
98
- var otherProps = InputTextBase.getOtherProps(props);
99
106
  var className = utils.classNames('p-inputtext p-component', {
100
107
  'p-disabled': props.disabled,
101
108
  'p-filled': isFilled
102
109
  }, props.className);
103
- return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("input", _extends({
104
- ref: elementRef
105
- }, otherProps, {
110
+ var rootProps = utils.mergeProps({
111
+ ref: elementRef,
106
112
  className: className,
113
+ onBeforeInput: onBeforeInput,
107
114
  onInput: onInput,
108
115
  onKeyDown: onKeyDown,
109
116
  onPaste: onPaste
110
- })), hasTooltip && /*#__PURE__*/React__namespace.createElement(tooltip.Tooltip, _extends({
117
+ }, InputTextBase.getOtherProps(props), ptm('root'));
118
+ return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement("input", rootProps), hasTooltip && /*#__PURE__*/React__namespace.createElement(tooltip.Tooltip, _extends({
111
119
  target: elementRef,
112
120
  content: props.tooltip
113
- }, props.tooltipOptions)));
121
+ }, props.tooltipOptions, {
122
+ pt: ptm('tooltip')
123
+ })));
114
124
  }));
115
125
  InputText.displayName = 'InputText';
116
126
 
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/keyfilter"),r=require("primereact/tooltip"),n=require("primereact/utils");function l(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var o=l(e);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i.apply(this,arguments)}var a={defaultProps:{__TYPE:"InputText",keyfilter:null,validateOnly:!1,tooltip:null,tooltipOptions:null,onInput:null,onKeyDown:null,onPaste:null,children:void 0},getProps:function(e){return n.ObjectUtils.getMergedProps(e,a.defaultProps)},getOtherProps:function(e){return n.ObjectUtils.getDiffProps(e,a.defaultProps)}},u=o.memo(o.forwardRef((function(e,l){var u=a.getProps(e),s=o.useRef(l);o.useEffect((function(){n.ObjectUtils.combinedRefs(s,l)}),[s,l]);var p=o.useMemo((function(){return n.ObjectUtils.isNotEmpty(u.value)||n.ObjectUtils.isNotEmpty(u.defaultValue)}),[u.value,u.defaultValue]),c=n.ObjectUtils.isNotEmpty(u.tooltip),f=a.getOtherProps(u),d=n.classNames("p-inputtext p-component",{"p-disabled":u.disabled,"p-filled":p},u.className);return o.createElement(o.Fragment,null,o.createElement("input",i({ref:s},f,{className:d,onInput:function(e){var r=e.target,l=!0;u.keyfilter&&u.validateOnly&&(l=t.KeyFilter.validate(e,u.keyfilter)),u.onInput&&u.onInput(e,l),n.ObjectUtils.isNotEmpty(r.value)?n.DomHandler.addClass(r,"p-filled"):n.DomHandler.removeClass(r,"p-filled")},onKeyDown:function(e){u.onKeyDown&&u.onKeyDown(e),u.keyfilter&&t.KeyFilter.onKeyPress(e,u.keyfilter,u.validateOnly)},onPaste:function(e){u.onPaste&&u.onPaste(e),u.keyfilter&&t.KeyFilter.onPaste(e,u.keyfilter,u.validateOnly)}})),c&&o.createElement(r.Tooltip,i({target:s,content:u.tooltip},u.tooltipOptions)))})));u.displayName="InputText",exports.InputText=u;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/keyfilter"),n=require("primereact/tooltip"),r=require("primereact/utils"),o=require("primereact/componentbase"),l=require("primereact/api");function i(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var a=i(e);function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}var p=o.ComponentBase.extend({defaultProps:{__TYPE:"InputText",keyfilter:null,validateOnly:!1,tooltip:null,tooltipOptions:null,onBeforeInput:null,onInput:null,onKeyDown:null,onPaste:null,children:void 0}}),s=a.memo(a.forwardRef((function(e,o){var i=a.useContext(l.PrimeReactContext),s=p.getProps(e,i),c=p.setMetaData({props:s}).ptm,f=a.useRef(o);a.useEffect((function(){r.ObjectUtils.combinedRefs(f,o)}),[f,o]);var y=a.useMemo((function(){return r.ObjectUtils.isNotEmpty(s.value)||r.ObjectUtils.isNotEmpty(s.defaultValue)}),[s.value,s.defaultValue]),d=r.ObjectUtils.isNotEmpty(s.tooltip),m=r.classNames("p-inputtext p-component",{"p-disabled":s.disabled,"p-filled":y},s.className),O=r.mergeProps({ref:f,className:m,onBeforeInput:function(e){s.onBeforeInput&&s.onBeforeInput(e),s.keyfilter&&t.KeyFilter.onBeforeInput(e,s.keyfilter,s.validateOnly)},onInput:function(e){var n=e.target,o=!0;s.keyfilter&&s.validateOnly&&(o=t.KeyFilter.validate(e,s.keyfilter)),s.onInput&&s.onInput(e,o),r.ObjectUtils.isNotEmpty(n.value)?r.DomHandler.addClass(n,"p-filled"):r.DomHandler.removeClass(n,"p-filled")},onKeyDown:function(e){s.onKeyDown&&s.onKeyDown(e),s.keyfilter&&t.KeyFilter.onKeyPress(e,s.keyfilter,s.validateOnly)},onPaste:function(e){s.onPaste&&s.onPaste(e),s.keyfilter&&t.KeyFilter.onPaste(e,s.keyfilter,s.validateOnly)}},p.getOtherProps(s),c("root"));return a.createElement(a.Fragment,null,a.createElement("input",O),d&&a.createElement(n.Tooltip,u({target:f,content:s.tooltip},s.tooltipOptions,{pt:c("tooltip")})))})));s.displayName="InputText",exports.InputText=s;
@@ -10,6 +10,33 @@
10
10
  import * as React from 'react';
11
11
  import { KeyFilterType } from '../keyfilter';
12
12
  import { TooltipOptions } from '../tooltip/tooltipoptions';
13
+ import { PassThroughType } from '../utils/utils';
14
+ import { TooltipPassThroughOptions } from '../tooltip/tooltip';
15
+
16
+ export declare type InputTextPassThroughType<T> = PassThroughType<T, InputTextPassThroughMethodOptions>;
17
+
18
+ /**
19
+ * Custom passthrough(pt) option method.
20
+ */
21
+ export interface InputTextPassThroughMethodOptions {
22
+ props: InputTextProps;
23
+ }
24
+
25
+ /**
26
+ * Custom passthrough(pt) options.
27
+ * @see {@link InputTextProps.pt}
28
+ */
29
+ export interface InputTextPassThroughOptions {
30
+ /**
31
+ * Uses to pass attributes to the root's DOM element.
32
+ */
33
+ root?: InputTextPassThroughType<React.HTMLAttributes<HTMLInputElement>>;
34
+ /**
35
+ * Uses to pass attributes to the Tooltip component.
36
+ * @see {@link TooltipPassThroughOptions}
37
+ */
38
+ tooltip?: TooltipPassThroughOptions;
39
+ }
13
40
 
14
41
  /**
15
42
  * Defines valid properties in InputText component. In addition to these, all properties of HTMLInputElement can be used in this component.
@@ -49,6 +76,11 @@ export interface InputTextProps extends Omit<React.DetailedHTMLProps<React.Input
49
76
  * @readonly
50
77
  */
51
78
  children?: React.ReactNode | undefined;
79
+ /**
80
+ * Uses to pass attributes to DOM elements inside the component.
81
+ * @type {InputTextPassThroughOptions}
82
+ */
83
+ pt?: InputTextPassThroughOptions;
52
84
  }
53
85
 
54
86
  /**