primenglab 22.0.0-beta.1

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 (852) hide show
  1. package/LICENSE.md +77 -0
  2. package/README.md +11 -0
  3. package/fesm2022/primenglab-accordion.mjs +656 -0
  4. package/fesm2022/primenglab-accordion.mjs.map +1 -0
  5. package/fesm2022/primenglab-animateonscroll.mjs +166 -0
  6. package/fesm2022/primenglab-animateonscroll.mjs.map +1 -0
  7. package/fesm2022/primenglab-api.mjs +850 -0
  8. package/fesm2022/primenglab-api.mjs.map +1 -0
  9. package/fesm2022/primenglab-autocomplete.mjs +2140 -0
  10. package/fesm2022/primenglab-autocomplete.mjs.map +1 -0
  11. package/fesm2022/primenglab-autofocus.mjs +78 -0
  12. package/fesm2022/primenglab-autofocus.mjs.map +1 -0
  13. package/fesm2022/primenglab-avatar.mjs +211 -0
  14. package/fesm2022/primenglab-avatar.mjs.map +1 -0
  15. package/fesm2022/primenglab-avatargroup.mjs +99 -0
  16. package/fesm2022/primenglab-avatargroup.mjs.map +1 -0
  17. package/fesm2022/primenglab-badge.mjs +161 -0
  18. package/fesm2022/primenglab-badge.mjs.map +1 -0
  19. package/fesm2022/primenglab-base.mjs +124 -0
  20. package/fesm2022/primenglab-base.mjs.map +1 -0
  21. package/fesm2022/primenglab-basecomponent.mjs +477 -0
  22. package/fesm2022/primenglab-basecomponent.mjs.map +1 -0
  23. package/fesm2022/primenglab-baseeditableholder.mjs +70 -0
  24. package/fesm2022/primenglab-baseeditableholder.mjs.map +1 -0
  25. package/fesm2022/primenglab-baseinput.mjs +100 -0
  26. package/fesm2022/primenglab-baseinput.mjs.map +1 -0
  27. package/fesm2022/primenglab-basemodelholder.mjs +27 -0
  28. package/fesm2022/primenglab-basemodelholder.mjs.map +1 -0
  29. package/fesm2022/primenglab-bind.mjs +97 -0
  30. package/fesm2022/primenglab-bind.mjs.map +1 -0
  31. package/fesm2022/primenglab-blockui.mjs +240 -0
  32. package/fesm2022/primenglab-blockui.mjs.map +1 -0
  33. package/fesm2022/primenglab-breadcrumb.mjs +582 -0
  34. package/fesm2022/primenglab-breadcrumb.mjs.map +1 -0
  35. package/fesm2022/primenglab-button.mjs +799 -0
  36. package/fesm2022/primenglab-button.mjs.map +1 -0
  37. package/fesm2022/primenglab-buttongroup.mjs +110 -0
  38. package/fesm2022/primenglab-buttongroup.mjs.map +1 -0
  39. package/fesm2022/primenglab-card.mjs +252 -0
  40. package/fesm2022/primenglab-card.mjs.map +1 -0
  41. package/fesm2022/primenglab-carousel.mjs +2052 -0
  42. package/fesm2022/primenglab-carousel.mjs.map +1 -0
  43. package/fesm2022/primenglab-cascadeselect.mjs +1756 -0
  44. package/fesm2022/primenglab-cascadeselect.mjs.map +1 -0
  45. package/fesm2022/primenglab-chart.mjs +235 -0
  46. package/fesm2022/primenglab-chart.mjs.map +1 -0
  47. package/fesm2022/primenglab-checkbox.mjs +441 -0
  48. package/fesm2022/primenglab-checkbox.mjs.map +1 -0
  49. package/fesm2022/primenglab-chip.mjs +304 -0
  50. package/fesm2022/primenglab-chip.mjs.map +1 -0
  51. package/fesm2022/primenglab-classnames.mjs +49 -0
  52. package/fesm2022/primenglab-classnames.mjs.map +1 -0
  53. package/fesm2022/primenglab-colorpicker.mjs +741 -0
  54. package/fesm2022/primenglab-colorpicker.mjs.map +1 -0
  55. package/fesm2022/primenglab-commandmenu.mjs +419 -0
  56. package/fesm2022/primenglab-commandmenu.mjs.map +1 -0
  57. package/fesm2022/primenglab-compare.mjs +520 -0
  58. package/fesm2022/primenglab-compare.mjs.map +1 -0
  59. package/fesm2022/primenglab-config.mjs +322 -0
  60. package/fesm2022/primenglab-config.mjs.map +1 -0
  61. package/fesm2022/primenglab-confirmdialog.mjs +746 -0
  62. package/fesm2022/primenglab-confirmdialog.mjs.map +1 -0
  63. package/fesm2022/primenglab-confirmpopup.mjs +685 -0
  64. package/fesm2022/primenglab-confirmpopup.mjs.map +1 -0
  65. package/fesm2022/primenglab-contextmenu.mjs +1485 -0
  66. package/fesm2022/primenglab-contextmenu.mjs.map +1 -0
  67. package/fesm2022/primenglab-dataview.mjs +765 -0
  68. package/fesm2022/primenglab-dataview.mjs.map +1 -0
  69. package/fesm2022/primenglab-datepicker.mjs +4373 -0
  70. package/fesm2022/primenglab-datepicker.mjs.map +1 -0
  71. package/fesm2022/primenglab-dialog.mjs +1234 -0
  72. package/fesm2022/primenglab-dialog.mjs.map +1 -0
  73. package/fesm2022/primenglab-divider.mjs +160 -0
  74. package/fesm2022/primenglab-divider.mjs.map +1 -0
  75. package/fesm2022/primenglab-dock.mjs +580 -0
  76. package/fesm2022/primenglab-dock.mjs.map +1 -0
  77. package/fesm2022/primenglab-dom.mjs +778 -0
  78. package/fesm2022/primenglab-dom.mjs.map +1 -0
  79. package/fesm2022/primenglab-dragdrop.mjs +312 -0
  80. package/fesm2022/primenglab-dragdrop.mjs.map +1 -0
  81. package/fesm2022/primenglab-drawer.mjs +708 -0
  82. package/fesm2022/primenglab-drawer.mjs.map +1 -0
  83. package/fesm2022/primenglab-dynamicdialog.mjs +1096 -0
  84. package/fesm2022/primenglab-dynamicdialog.mjs.map +1 -0
  85. package/fesm2022/primenglab-editor.mjs +496 -0
  86. package/fesm2022/primenglab-editor.mjs.map +1 -0
  87. package/fesm2022/primenglab-fieldset.mjs +418 -0
  88. package/fesm2022/primenglab-fieldset.mjs.map +1 -0
  89. package/fesm2022/primenglab-fileupload.mjs +1486 -0
  90. package/fesm2022/primenglab-fileupload.mjs.map +1 -0
  91. package/fesm2022/primenglab-floatlabel.mjs +106 -0
  92. package/fesm2022/primenglab-floatlabel.mjs.map +1 -0
  93. package/fesm2022/primenglab-fluid.mjs +89 -0
  94. package/fesm2022/primenglab-fluid.mjs.map +1 -0
  95. package/fesm2022/primenglab-focustrap.mjs +113 -0
  96. package/fesm2022/primenglab-focustrap.mjs.map +1 -0
  97. package/fesm2022/primenglab-galleria.mjs +1854 -0
  98. package/fesm2022/primenglab-galleria.mjs.map +1 -0
  99. package/fesm2022/primenglab-gallery.mjs +1859 -0
  100. package/fesm2022/primenglab-gallery.mjs.map +1 -0
  101. package/fesm2022/primenglab-iconfield.mjs +97 -0
  102. package/fesm2022/primenglab-iconfield.mjs.map +1 -0
  103. package/fesm2022/primenglab-icons-angledoubledown.mjs +37 -0
  104. package/fesm2022/primenglab-icons-angledoubledown.mjs.map +1 -0
  105. package/fesm2022/primenglab-icons-angledoubleleft.mjs +37 -0
  106. package/fesm2022/primenglab-icons-angledoubleleft.mjs.map +1 -0
  107. package/fesm2022/primenglab-icons-angledoubleright.mjs +37 -0
  108. package/fesm2022/primenglab-icons-angledoubleright.mjs.map +1 -0
  109. package/fesm2022/primenglab-icons-angledoubleup.mjs +37 -0
  110. package/fesm2022/primenglab-icons-angledoubleup.mjs.map +1 -0
  111. package/fesm2022/primenglab-icons-angledown.mjs +33 -0
  112. package/fesm2022/primenglab-icons-angledown.mjs.map +1 -0
  113. package/fesm2022/primenglab-icons-angleleft.mjs +33 -0
  114. package/fesm2022/primenglab-icons-angleleft.mjs.map +1 -0
  115. package/fesm2022/primenglab-icons-angleright.mjs +33 -0
  116. package/fesm2022/primenglab-icons-angleright.mjs.map +1 -0
  117. package/fesm2022/primenglab-icons-angleup.mjs +33 -0
  118. package/fesm2022/primenglab-icons-angleup.mjs.map +1 -0
  119. package/fesm2022/primenglab-icons-arrowdown.mjs +56 -0
  120. package/fesm2022/primenglab-icons-arrowdown.mjs.map +1 -0
  121. package/fesm2022/primenglab-icons-arrowdownleft.mjs +33 -0
  122. package/fesm2022/primenglab-icons-arrowdownleft.mjs.map +1 -0
  123. package/fesm2022/primenglab-icons-arrowdownright.mjs +33 -0
  124. package/fesm2022/primenglab-icons-arrowdownright.mjs.map +1 -0
  125. package/fesm2022/primenglab-icons-arrowleft.mjs +56 -0
  126. package/fesm2022/primenglab-icons-arrowleft.mjs.map +1 -0
  127. package/fesm2022/primenglab-icons-arrowright.mjs +37 -0
  128. package/fesm2022/primenglab-icons-arrowright.mjs.map +1 -0
  129. package/fesm2022/primenglab-icons-arrowup.mjs +56 -0
  130. package/fesm2022/primenglab-icons-arrowup.mjs.map +1 -0
  131. package/fesm2022/primenglab-icons-ban.mjs +52 -0
  132. package/fesm2022/primenglab-icons-ban.mjs.map +1 -0
  133. package/fesm2022/primenglab-icons-bars.mjs +37 -0
  134. package/fesm2022/primenglab-icons-bars.mjs.map +1 -0
  135. package/fesm2022/primenglab-icons-baseicon.mjs +103 -0
  136. package/fesm2022/primenglab-icons-baseicon.mjs.map +1 -0
  137. package/fesm2022/primenglab-icons-blank.mjs +23 -0
  138. package/fesm2022/primenglab-icons-blank.mjs.map +1 -0
  139. package/fesm2022/primenglab-icons-calendar.mjs +33 -0
  140. package/fesm2022/primenglab-icons-calendar.mjs.map +1 -0
  141. package/fesm2022/primenglab-icons-caretleft.mjs +33 -0
  142. package/fesm2022/primenglab-icons-caretleft.mjs.map +1 -0
  143. package/fesm2022/primenglab-icons-caretright.mjs +33 -0
  144. package/fesm2022/primenglab-icons-caretright.mjs.map +1 -0
  145. package/fesm2022/primenglab-icons-check.mjs +33 -0
  146. package/fesm2022/primenglab-icons-check.mjs.map +1 -0
  147. package/fesm2022/primenglab-icons-chevrondown.mjs +33 -0
  148. package/fesm2022/primenglab-icons-chevrondown.mjs.map +1 -0
  149. package/fesm2022/primenglab-icons-chevronleft.mjs +33 -0
  150. package/fesm2022/primenglab-icons-chevronleft.mjs.map +1 -0
  151. package/fesm2022/primenglab-icons-chevronright.mjs +33 -0
  152. package/fesm2022/primenglab-icons-chevronright.mjs.map +1 -0
  153. package/fesm2022/primenglab-icons-chevronup.mjs +33 -0
  154. package/fesm2022/primenglab-icons-chevronup.mjs.map +1 -0
  155. package/fesm2022/primenglab-icons-exclamationtriangle.mjs +68 -0
  156. package/fesm2022/primenglab-icons-exclamationtriangle.mjs.map +1 -0
  157. package/fesm2022/primenglab-icons-eye.mjs +37 -0
  158. package/fesm2022/primenglab-icons-eye.mjs.map +1 -0
  159. package/fesm2022/primenglab-icons-eyeslash.mjs +56 -0
  160. package/fesm2022/primenglab-icons-eyeslash.mjs.map +1 -0
  161. package/fesm2022/primenglab-icons-filter.mjs +52 -0
  162. package/fesm2022/primenglab-icons-filter.mjs.map +1 -0
  163. package/fesm2022/primenglab-icons-filterfill.mjs +33 -0
  164. package/fesm2022/primenglab-icons-filterfill.mjs.map +1 -0
  165. package/fesm2022/primenglab-icons-filterslash.mjs +56 -0
  166. package/fesm2022/primenglab-icons-filterslash.mjs.map +1 -0
  167. package/fesm2022/primenglab-icons-home.mjs +56 -0
  168. package/fesm2022/primenglab-icons-home.mjs.map +1 -0
  169. package/fesm2022/primenglab-icons-infocircle.mjs +56 -0
  170. package/fesm2022/primenglab-icons-infocircle.mjs.map +1 -0
  171. package/fesm2022/primenglab-icons-minus.mjs +33 -0
  172. package/fesm2022/primenglab-icons-minus.mjs.map +1 -0
  173. package/fesm2022/primenglab-icons-pencil.mjs +52 -0
  174. package/fesm2022/primenglab-icons-pencil.mjs.map +1 -0
  175. package/fesm2022/primenglab-icons-plus.mjs +52 -0
  176. package/fesm2022/primenglab-icons-plus.mjs.map +1 -0
  177. package/fesm2022/primenglab-icons-refresh.mjs +56 -0
  178. package/fesm2022/primenglab-icons-refresh.mjs.map +1 -0
  179. package/fesm2022/primenglab-icons-search.mjs +56 -0
  180. package/fesm2022/primenglab-icons-search.mjs.map +1 -0
  181. package/fesm2022/primenglab-icons-searchminus.mjs +56 -0
  182. package/fesm2022/primenglab-icons-searchminus.mjs.map +1 -0
  183. package/fesm2022/primenglab-icons-searchplus.mjs +56 -0
  184. package/fesm2022/primenglab-icons-searchplus.mjs.map +1 -0
  185. package/fesm2022/primenglab-icons-sortalt.mjs +64 -0
  186. package/fesm2022/primenglab-icons-sortalt.mjs.map +1 -0
  187. package/fesm2022/primenglab-icons-sortamountdown.mjs +52 -0
  188. package/fesm2022/primenglab-icons-sortamountdown.mjs.map +1 -0
  189. package/fesm2022/primenglab-icons-sortamountupalt.mjs +52 -0
  190. package/fesm2022/primenglab-icons-sortamountupalt.mjs.map +1 -0
  191. package/fesm2022/primenglab-icons-spinner.mjs +52 -0
  192. package/fesm2022/primenglab-icons-spinner.mjs.map +1 -0
  193. package/fesm2022/primenglab-icons-star.mjs +52 -0
  194. package/fesm2022/primenglab-icons-star.mjs.map +1 -0
  195. package/fesm2022/primenglab-icons-starfill.mjs +52 -0
  196. package/fesm2022/primenglab-icons-starfill.mjs.map +1 -0
  197. package/fesm2022/primenglab-icons-thlarge.mjs +56 -0
  198. package/fesm2022/primenglab-icons-thlarge.mjs.map +1 -0
  199. package/fesm2022/primenglab-icons-times.mjs +33 -0
  200. package/fesm2022/primenglab-icons-times.mjs.map +1 -0
  201. package/fesm2022/primenglab-icons-timescircle.mjs +56 -0
  202. package/fesm2022/primenglab-icons-timescircle.mjs.map +1 -0
  203. package/fesm2022/primenglab-icons-trash.mjs +56 -0
  204. package/fesm2022/primenglab-icons-trash.mjs.map +1 -0
  205. package/fesm2022/primenglab-icons-undo.mjs +56 -0
  206. package/fesm2022/primenglab-icons-undo.mjs.map +1 -0
  207. package/fesm2022/primenglab-icons-upload.mjs +56 -0
  208. package/fesm2022/primenglab-icons-upload.mjs.map +1 -0
  209. package/fesm2022/primenglab-icons-windowmaximize.mjs +56 -0
  210. package/fesm2022/primenglab-icons-windowmaximize.mjs.map +1 -0
  211. package/fesm2022/primenglab-icons-windowminimize.mjs +56 -0
  212. package/fesm2022/primenglab-icons-windowminimize.mjs.map +1 -0
  213. package/fesm2022/primenglab-icons.mjs +63 -0
  214. package/fesm2022/primenglab-icons.mjs.map +1 -0
  215. package/fesm2022/primenglab-iftalabel.mjs +90 -0
  216. package/fesm2022/primenglab-iftalabel.mjs.map +1 -0
  217. package/fesm2022/primenglab-image.mjs +728 -0
  218. package/fesm2022/primenglab-image.mjs.map +1 -0
  219. package/fesm2022/primenglab-imagecompare.mjs +177 -0
  220. package/fesm2022/primenglab-imagecompare.mjs.map +1 -0
  221. package/fesm2022/primenglab-inplace.mjs +237 -0
  222. package/fesm2022/primenglab-inplace.mjs.map +1 -0
  223. package/fesm2022/primenglab-inputcolor.mjs +2262 -0
  224. package/fesm2022/primenglab-inputcolor.mjs.map +1 -0
  225. package/fesm2022/primenglab-inputgroup.mjs +121 -0
  226. package/fesm2022/primenglab-inputgroup.mjs.map +1 -0
  227. package/fesm2022/primenglab-inputgroupaddon.mjs +70 -0
  228. package/fesm2022/primenglab-inputgroupaddon.mjs.map +1 -0
  229. package/fesm2022/primenglab-inputicon.mjs +74 -0
  230. package/fesm2022/primenglab-inputicon.mjs.map +1 -0
  231. package/fesm2022/primenglab-inputmask.mjs +1495 -0
  232. package/fesm2022/primenglab-inputmask.mjs.map +1 -0
  233. package/fesm2022/primenglab-inputnumber.mjs +1624 -0
  234. package/fesm2022/primenglab-inputnumber.mjs.map +1 -0
  235. package/fesm2022/primenglab-inputotp.mjs +445 -0
  236. package/fesm2022/primenglab-inputotp.mjs.map +1 -0
  237. package/fesm2022/primenglab-inputpassword.mjs +102 -0
  238. package/fesm2022/primenglab-inputpassword.mjs.map +1 -0
  239. package/fesm2022/primenglab-inputtags.mjs +748 -0
  240. package/fesm2022/primenglab-inputtags.mjs.map +1 -0
  241. package/fesm2022/primenglab-inputtext.mjs +174 -0
  242. package/fesm2022/primenglab-inputtext.mjs.map +1 -0
  243. package/fesm2022/primenglab-keyfilter.mjs +252 -0
  244. package/fesm2022/primenglab-keyfilter.mjs.map +1 -0
  245. package/fesm2022/primenglab-knob.mjs +467 -0
  246. package/fesm2022/primenglab-knob.mjs.map +1 -0
  247. package/fesm2022/primenglab-label.mjs +85 -0
  248. package/fesm2022/primenglab-label.mjs.map +1 -0
  249. package/fesm2022/primenglab-license.mjs +39 -0
  250. package/fesm2022/primenglab-license.mjs.map +1 -0
  251. package/fesm2022/primenglab-listbox.mjs +2108 -0
  252. package/fesm2022/primenglab-listbox.mjs.map +1 -0
  253. package/fesm2022/primenglab-megamenu.mjs +1595 -0
  254. package/fesm2022/primenglab-megamenu.mjs.map +1 -0
  255. package/fesm2022/primenglab-menu.mjs +1224 -0
  256. package/fesm2022/primenglab-menu.mjs.map +1 -0
  257. package/fesm2022/primenglab-menubar.mjs +1448 -0
  258. package/fesm2022/primenglab-menubar.mjs.map +1 -0
  259. package/fesm2022/primenglab-message.mjs +306 -0
  260. package/fesm2022/primenglab-message.mjs.map +1 -0
  261. package/fesm2022/primenglab-metergroup.mjs +412 -0
  262. package/fesm2022/primenglab-metergroup.mjs.map +1 -0
  263. package/fesm2022/primenglab-motion.mjs +719 -0
  264. package/fesm2022/primenglab-motion.mjs.map +1 -0
  265. package/fesm2022/primenglab-multiselect.mjs +2543 -0
  266. package/fesm2022/primenglab-multiselect.mjs.map +1 -0
  267. package/fesm2022/primenglab-orderlist.mjs +868 -0
  268. package/fesm2022/primenglab-orderlist.mjs.map +1 -0
  269. package/fesm2022/primenglab-organizationchart.mjs +617 -0
  270. package/fesm2022/primenglab-organizationchart.mjs.map +1 -0
  271. package/fesm2022/primenglab-overlay.mjs +751 -0
  272. package/fesm2022/primenglab-overlay.mjs.map +1 -0
  273. package/fesm2022/primenglab-overlaybadge.mjs +134 -0
  274. package/fesm2022/primenglab-overlaybadge.mjs.map +1 -0
  275. package/fesm2022/primenglab-paginator.mjs +759 -0
  276. package/fesm2022/primenglab-paginator.mjs.map +1 -0
  277. package/fesm2022/primenglab-panel.mjs +487 -0
  278. package/fesm2022/primenglab-panel.mjs.map +1 -0
  279. package/fesm2022/primenglab-panelmenu.mjs +1599 -0
  280. package/fesm2022/primenglab-panelmenu.mjs.map +1 -0
  281. package/fesm2022/primenglab-passthrough.mjs +21 -0
  282. package/fesm2022/primenglab-passthrough.mjs.map +1 -0
  283. package/fesm2022/primenglab-password.mjs +1089 -0
  284. package/fesm2022/primenglab-password.mjs.map +1 -0
  285. package/fesm2022/primenglab-picklist.mjs +1992 -0
  286. package/fesm2022/primenglab-picklist.mjs.map +1 -0
  287. package/fesm2022/primenglab-popover.mjs +488 -0
  288. package/fesm2022/primenglab-popover.mjs.map +1 -0
  289. package/fesm2022/primenglab-progressbar.mjs +200 -0
  290. package/fesm2022/primenglab-progressbar.mjs.map +1 -0
  291. package/fesm2022/primenglab-progressspinner.mjs +313 -0
  292. package/fesm2022/primenglab-progressspinner.mjs.map +1 -0
  293. package/fesm2022/primenglab-radiobutton.mjs +347 -0
  294. package/fesm2022/primenglab-radiobutton.mjs.map +1 -0
  295. package/fesm2022/primenglab-rating.mjs +488 -0
  296. package/fesm2022/primenglab-rating.mjs.map +1 -0
  297. package/fesm2022/primenglab-ripple.mjs +192 -0
  298. package/fesm2022/primenglab-ripple.mjs.map +1 -0
  299. package/fesm2022/primenglab-scrollarea.mjs +730 -0
  300. package/fesm2022/primenglab-scrollarea.mjs.map +1 -0
  301. package/fesm2022/primenglab-scroller.mjs +1183 -0
  302. package/fesm2022/primenglab-scroller.mjs.map +1 -0
  303. package/fesm2022/primenglab-scrollpanel.mjs +543 -0
  304. package/fesm2022/primenglab-scrollpanel.mjs.map +1 -0
  305. package/fesm2022/primenglab-scrolltop.mjs +323 -0
  306. package/fesm2022/primenglab-scrolltop.mjs.map +1 -0
  307. package/fesm2022/primenglab-select.mjs +2287 -0
  308. package/fesm2022/primenglab-select.mjs.map +1 -0
  309. package/fesm2022/primenglab-selectbutton.mjs +390 -0
  310. package/fesm2022/primenglab-selectbutton.mjs.map +1 -0
  311. package/fesm2022/primenglab-sidebar.mjs +1461 -0
  312. package/fesm2022/primenglab-sidebar.mjs.map +1 -0
  313. package/fesm2022/primenglab-skeleton.mjs +161 -0
  314. package/fesm2022/primenglab-skeleton.mjs.map +1 -0
  315. package/fesm2022/primenglab-slider.mjs +776 -0
  316. package/fesm2022/primenglab-slider.mjs.map +1 -0
  317. package/fesm2022/primenglab-speeddial.mjs +892 -0
  318. package/fesm2022/primenglab-speeddial.mjs.map +1 -0
  319. package/fesm2022/primenglab-splitbutton.mjs +544 -0
  320. package/fesm2022/primenglab-splitbutton.mjs.map +1 -0
  321. package/fesm2022/primenglab-splitter.mjs +853 -0
  322. package/fesm2022/primenglab-splitter.mjs.map +1 -0
  323. package/fesm2022/primenglab-stepper.mjs +724 -0
  324. package/fesm2022/primenglab-stepper.mjs.map +1 -0
  325. package/fesm2022/primenglab-steps.mjs +425 -0
  326. package/fesm2022/primenglab-steps.mjs.map +1 -0
  327. package/fesm2022/primenglab-styleclass.mjs +331 -0
  328. package/fesm2022/primenglab-styleclass.mjs.map +1 -0
  329. package/fesm2022/primenglab-table.mjs +7125 -0
  330. package/fesm2022/primenglab-table.mjs.map +1 -0
  331. package/fesm2022/primenglab-tabs.mjs +932 -0
  332. package/fesm2022/primenglab-tabs.mjs.map +1 -0
  333. package/fesm2022/primenglab-tag.mjs +179 -0
  334. package/fesm2022/primenglab-tag.mjs.map +1 -0
  335. package/fesm2022/primenglab-terminal.mjs +253 -0
  336. package/fesm2022/primenglab-terminal.mjs.map +1 -0
  337. package/fesm2022/primenglab-textarea.mjs +208 -0
  338. package/fesm2022/primenglab-textarea.mjs.map +1 -0
  339. package/fesm2022/primenglab-tieredmenu.mjs +1547 -0
  340. package/fesm2022/primenglab-tieredmenu.mjs.map +1 -0
  341. package/fesm2022/primenglab-timeline.mjs +211 -0
  342. package/fesm2022/primenglab-timeline.mjs.map +1 -0
  343. package/fesm2022/primenglab-toast.mjs +1140 -0
  344. package/fesm2022/primenglab-toast.mjs.map +1 -0
  345. package/fesm2022/primenglab-togglebutton.mjs +343 -0
  346. package/fesm2022/primenglab-togglebutton.mjs.map +1 -0
  347. package/fesm2022/primenglab-toggleswitch.mjs +296 -0
  348. package/fesm2022/primenglab-toggleswitch.mjs.map +1 -0
  349. package/fesm2022/primenglab-toolbar.mjs +167 -0
  350. package/fesm2022/primenglab-toolbar.mjs.map +1 -0
  351. package/fesm2022/primenglab-tooltip.mjs +770 -0
  352. package/fesm2022/primenglab-tooltip.mjs.map +1 -0
  353. package/fesm2022/primenglab-tree.mjs +2332 -0
  354. package/fesm2022/primenglab-tree.mjs.map +1 -0
  355. package/fesm2022/primenglab-treeselect.mjs +1263 -0
  356. package/fesm2022/primenglab-treeselect.mjs.map +1 -0
  357. package/fesm2022/primenglab-treetable.mjs +4817 -0
  358. package/fesm2022/primenglab-treetable.mjs.map +1 -0
  359. package/fesm2022/primenglab-ts-helpers.mjs +4 -0
  360. package/fesm2022/primenglab-ts-helpers.mjs.map +1 -0
  361. package/fesm2022/primenglab-types-accordion.mjs +4 -0
  362. package/fesm2022/primenglab-types-accordion.mjs.map +1 -0
  363. package/fesm2022/primenglab-types-autocomplete.mjs +4 -0
  364. package/fesm2022/primenglab-types-autocomplete.mjs.map +1 -0
  365. package/fesm2022/primenglab-types-avatar.mjs +4 -0
  366. package/fesm2022/primenglab-types-avatar.mjs.map +1 -0
  367. package/fesm2022/primenglab-types-avatargroup.mjs +4 -0
  368. package/fesm2022/primenglab-types-avatargroup.mjs.map +1 -0
  369. package/fesm2022/primenglab-types-badge.mjs +4 -0
  370. package/fesm2022/primenglab-types-badge.mjs.map +1 -0
  371. package/fesm2022/primenglab-types-blockui.mjs +4 -0
  372. package/fesm2022/primenglab-types-blockui.mjs.map +1 -0
  373. package/fesm2022/primenglab-types-breadcrumb.mjs +4 -0
  374. package/fesm2022/primenglab-types-breadcrumb.mjs.map +1 -0
  375. package/fesm2022/primenglab-types-button.mjs +4 -0
  376. package/fesm2022/primenglab-types-button.mjs.map +1 -0
  377. package/fesm2022/primenglab-types-card.mjs +4 -0
  378. package/fesm2022/primenglab-types-card.mjs.map +1 -0
  379. package/fesm2022/primenglab-types-carousel.mjs +4 -0
  380. package/fesm2022/primenglab-types-carousel.mjs.map +1 -0
  381. package/fesm2022/primenglab-types-cascadeselect.mjs +4 -0
  382. package/fesm2022/primenglab-types-cascadeselect.mjs.map +1 -0
  383. package/fesm2022/primenglab-types-chart.mjs +4 -0
  384. package/fesm2022/primenglab-types-chart.mjs.map +1 -0
  385. package/fesm2022/primenglab-types-checkbox.mjs +4 -0
  386. package/fesm2022/primenglab-types-checkbox.mjs.map +1 -0
  387. package/fesm2022/primenglab-types-chip.mjs +4 -0
  388. package/fesm2022/primenglab-types-chip.mjs.map +1 -0
  389. package/fesm2022/primenglab-types-colorpicker.mjs +4 -0
  390. package/fesm2022/primenglab-types-colorpicker.mjs.map +1 -0
  391. package/fesm2022/primenglab-types-commandmenu.mjs +4 -0
  392. package/fesm2022/primenglab-types-commandmenu.mjs.map +1 -0
  393. package/fesm2022/primenglab-types-compare.mjs +4 -0
  394. package/fesm2022/primenglab-types-compare.mjs.map +1 -0
  395. package/fesm2022/primenglab-types-confirmdialog.mjs +4 -0
  396. package/fesm2022/primenglab-types-confirmdialog.mjs.map +1 -0
  397. package/fesm2022/primenglab-types-confirmpopup.mjs +4 -0
  398. package/fesm2022/primenglab-types-confirmpopup.mjs.map +1 -0
  399. package/fesm2022/primenglab-types-contextmenu.mjs +4 -0
  400. package/fesm2022/primenglab-types-contextmenu.mjs.map +1 -0
  401. package/fesm2022/primenglab-types-dataview.mjs +4 -0
  402. package/fesm2022/primenglab-types-dataview.mjs.map +1 -0
  403. package/fesm2022/primenglab-types-datepicker.mjs +4 -0
  404. package/fesm2022/primenglab-types-datepicker.mjs.map +1 -0
  405. package/fesm2022/primenglab-types-dialog.mjs +4 -0
  406. package/fesm2022/primenglab-types-dialog.mjs.map +1 -0
  407. package/fesm2022/primenglab-types-divider.mjs +4 -0
  408. package/fesm2022/primenglab-types-divider.mjs.map +1 -0
  409. package/fesm2022/primenglab-types-dock.mjs +4 -0
  410. package/fesm2022/primenglab-types-dock.mjs.map +1 -0
  411. package/fesm2022/primenglab-types-drawer.mjs +4 -0
  412. package/fesm2022/primenglab-types-drawer.mjs.map +1 -0
  413. package/fesm2022/primenglab-types-editor.mjs +4 -0
  414. package/fesm2022/primenglab-types-editor.mjs.map +1 -0
  415. package/fesm2022/primenglab-types-fieldset.mjs +4 -0
  416. package/fesm2022/primenglab-types-fieldset.mjs.map +1 -0
  417. package/fesm2022/primenglab-types-fileupload.mjs +4 -0
  418. package/fesm2022/primenglab-types-fileupload.mjs.map +1 -0
  419. package/fesm2022/primenglab-types-floatlabel.mjs +4 -0
  420. package/fesm2022/primenglab-types-floatlabel.mjs.map +1 -0
  421. package/fesm2022/primenglab-types-fluid.mjs +4 -0
  422. package/fesm2022/primenglab-types-fluid.mjs.map +1 -0
  423. package/fesm2022/primenglab-types-galleria.mjs +4 -0
  424. package/fesm2022/primenglab-types-galleria.mjs.map +1 -0
  425. package/fesm2022/primenglab-types-gallery.mjs +4 -0
  426. package/fesm2022/primenglab-types-gallery.mjs.map +1 -0
  427. package/fesm2022/primenglab-types-iconfield.mjs +4 -0
  428. package/fesm2022/primenglab-types-iconfield.mjs.map +1 -0
  429. package/fesm2022/primenglab-types-iftalabel.mjs +4 -0
  430. package/fesm2022/primenglab-types-iftalabel.mjs.map +1 -0
  431. package/fesm2022/primenglab-types-image.mjs +4 -0
  432. package/fesm2022/primenglab-types-image.mjs.map +1 -0
  433. package/fesm2022/primenglab-types-imagecompare.mjs +4 -0
  434. package/fesm2022/primenglab-types-imagecompare.mjs.map +1 -0
  435. package/fesm2022/primenglab-types-inplace.mjs +4 -0
  436. package/fesm2022/primenglab-types-inplace.mjs.map +1 -0
  437. package/fesm2022/primenglab-types-inputcolor.mjs +4 -0
  438. package/fesm2022/primenglab-types-inputcolor.mjs.map +1 -0
  439. package/fesm2022/primenglab-types-inputgroup.mjs +4 -0
  440. package/fesm2022/primenglab-types-inputgroup.mjs.map +1 -0
  441. package/fesm2022/primenglab-types-inputgroupaddon.mjs +4 -0
  442. package/fesm2022/primenglab-types-inputgroupaddon.mjs.map +1 -0
  443. package/fesm2022/primenglab-types-inputicon.mjs +4 -0
  444. package/fesm2022/primenglab-types-inputicon.mjs.map +1 -0
  445. package/fesm2022/primenglab-types-inputmask.mjs +4 -0
  446. package/fesm2022/primenglab-types-inputmask.mjs.map +1 -0
  447. package/fesm2022/primenglab-types-inputnumber.mjs +4 -0
  448. package/fesm2022/primenglab-types-inputnumber.mjs.map +1 -0
  449. package/fesm2022/primenglab-types-inputotp.mjs +4 -0
  450. package/fesm2022/primenglab-types-inputotp.mjs.map +1 -0
  451. package/fesm2022/primenglab-types-inputpassword.mjs +4 -0
  452. package/fesm2022/primenglab-types-inputpassword.mjs.map +1 -0
  453. package/fesm2022/primenglab-types-inputtags.mjs +4 -0
  454. package/fesm2022/primenglab-types-inputtags.mjs.map +1 -0
  455. package/fesm2022/primenglab-types-inputtext.mjs +4 -0
  456. package/fesm2022/primenglab-types-inputtext.mjs.map +1 -0
  457. package/fesm2022/primenglab-types-knob.mjs +4 -0
  458. package/fesm2022/primenglab-types-knob.mjs.map +1 -0
  459. package/fesm2022/primenglab-types-label.mjs +4 -0
  460. package/fesm2022/primenglab-types-label.mjs.map +1 -0
  461. package/fesm2022/primenglab-types-listbox.mjs +4 -0
  462. package/fesm2022/primenglab-types-listbox.mjs.map +1 -0
  463. package/fesm2022/primenglab-types-megamenu.mjs +4 -0
  464. package/fesm2022/primenglab-types-megamenu.mjs.map +1 -0
  465. package/fesm2022/primenglab-types-menu.mjs +4 -0
  466. package/fesm2022/primenglab-types-menu.mjs.map +1 -0
  467. package/fesm2022/primenglab-types-menubar.mjs +4 -0
  468. package/fesm2022/primenglab-types-menubar.mjs.map +1 -0
  469. package/fesm2022/primenglab-types-message.mjs +4 -0
  470. package/fesm2022/primenglab-types-message.mjs.map +1 -0
  471. package/fesm2022/primenglab-types-metergroup.mjs +4 -0
  472. package/fesm2022/primenglab-types-metergroup.mjs.map +1 -0
  473. package/fesm2022/primenglab-types-motion.mjs +4 -0
  474. package/fesm2022/primenglab-types-motion.mjs.map +1 -0
  475. package/fesm2022/primenglab-types-multiselect.mjs +4 -0
  476. package/fesm2022/primenglab-types-multiselect.mjs.map +1 -0
  477. package/fesm2022/primenglab-types-orderlist.mjs +4 -0
  478. package/fesm2022/primenglab-types-orderlist.mjs.map +1 -0
  479. package/fesm2022/primenglab-types-organizationchart.mjs +4 -0
  480. package/fesm2022/primenglab-types-organizationchart.mjs.map +1 -0
  481. package/fesm2022/primenglab-types-overlay.mjs +4 -0
  482. package/fesm2022/primenglab-types-overlay.mjs.map +1 -0
  483. package/fesm2022/primenglab-types-overlaybadge.mjs +4 -0
  484. package/fesm2022/primenglab-types-overlaybadge.mjs.map +1 -0
  485. package/fesm2022/primenglab-types-paginator.mjs +4 -0
  486. package/fesm2022/primenglab-types-paginator.mjs.map +1 -0
  487. package/fesm2022/primenglab-types-panel.mjs +4 -0
  488. package/fesm2022/primenglab-types-panel.mjs.map +1 -0
  489. package/fesm2022/primenglab-types-panelmenu.mjs +4 -0
  490. package/fesm2022/primenglab-types-panelmenu.mjs.map +1 -0
  491. package/fesm2022/primenglab-types-password.mjs +4 -0
  492. package/fesm2022/primenglab-types-password.mjs.map +1 -0
  493. package/fesm2022/primenglab-types-picklist.mjs +4 -0
  494. package/fesm2022/primenglab-types-picklist.mjs.map +1 -0
  495. package/fesm2022/primenglab-types-popover.mjs +4 -0
  496. package/fesm2022/primenglab-types-popover.mjs.map +1 -0
  497. package/fesm2022/primenglab-types-progressbar.mjs +4 -0
  498. package/fesm2022/primenglab-types-progressbar.mjs.map +1 -0
  499. package/fesm2022/primenglab-types-progressspinner.mjs +4 -0
  500. package/fesm2022/primenglab-types-progressspinner.mjs.map +1 -0
  501. package/fesm2022/primenglab-types-radiobutton.mjs +4 -0
  502. package/fesm2022/primenglab-types-radiobutton.mjs.map +1 -0
  503. package/fesm2022/primenglab-types-rating.mjs +4 -0
  504. package/fesm2022/primenglab-types-rating.mjs.map +1 -0
  505. package/fesm2022/primenglab-types-scrollarea.mjs +4 -0
  506. package/fesm2022/primenglab-types-scrollarea.mjs.map +1 -0
  507. package/fesm2022/primenglab-types-scroller.mjs +4 -0
  508. package/fesm2022/primenglab-types-scroller.mjs.map +1 -0
  509. package/fesm2022/primenglab-types-scrollpanel.mjs +4 -0
  510. package/fesm2022/primenglab-types-scrollpanel.mjs.map +1 -0
  511. package/fesm2022/primenglab-types-scrolltop.mjs +4 -0
  512. package/fesm2022/primenglab-types-scrolltop.mjs.map +1 -0
  513. package/fesm2022/primenglab-types-select.mjs +4 -0
  514. package/fesm2022/primenglab-types-select.mjs.map +1 -0
  515. package/fesm2022/primenglab-types-selectbutton.mjs +4 -0
  516. package/fesm2022/primenglab-types-selectbutton.mjs.map +1 -0
  517. package/fesm2022/primenglab-types-shared.mjs +4 -0
  518. package/fesm2022/primenglab-types-shared.mjs.map +1 -0
  519. package/fesm2022/primenglab-types-sidebar.mjs +4 -0
  520. package/fesm2022/primenglab-types-sidebar.mjs.map +1 -0
  521. package/fesm2022/primenglab-types-skeleton.mjs +4 -0
  522. package/fesm2022/primenglab-types-skeleton.mjs.map +1 -0
  523. package/fesm2022/primenglab-types-slider.mjs +4 -0
  524. package/fesm2022/primenglab-types-slider.mjs.map +1 -0
  525. package/fesm2022/primenglab-types-speeddial.mjs +4 -0
  526. package/fesm2022/primenglab-types-speeddial.mjs.map +1 -0
  527. package/fesm2022/primenglab-types-splitbutton.mjs +4 -0
  528. package/fesm2022/primenglab-types-splitbutton.mjs.map +1 -0
  529. package/fesm2022/primenglab-types-splitter.mjs +4 -0
  530. package/fesm2022/primenglab-types-splitter.mjs.map +1 -0
  531. package/fesm2022/primenglab-types-stepper.mjs +4 -0
  532. package/fesm2022/primenglab-types-stepper.mjs.map +1 -0
  533. package/fesm2022/primenglab-types-table.mjs +4 -0
  534. package/fesm2022/primenglab-types-table.mjs.map +1 -0
  535. package/fesm2022/primenglab-types-tabs.mjs +4 -0
  536. package/fesm2022/primenglab-types-tabs.mjs.map +1 -0
  537. package/fesm2022/primenglab-types-tag.mjs +4 -0
  538. package/fesm2022/primenglab-types-tag.mjs.map +1 -0
  539. package/fesm2022/primenglab-types-terminal.mjs +4 -0
  540. package/fesm2022/primenglab-types-terminal.mjs.map +1 -0
  541. package/fesm2022/primenglab-types-textarea.mjs +4 -0
  542. package/fesm2022/primenglab-types-textarea.mjs.map +1 -0
  543. package/fesm2022/primenglab-types-tieredmenu.mjs +4 -0
  544. package/fesm2022/primenglab-types-tieredmenu.mjs.map +1 -0
  545. package/fesm2022/primenglab-types-timeline.mjs +4 -0
  546. package/fesm2022/primenglab-types-timeline.mjs.map +1 -0
  547. package/fesm2022/primenglab-types-toast.mjs +4 -0
  548. package/fesm2022/primenglab-types-toast.mjs.map +1 -0
  549. package/fesm2022/primenglab-types-togglebutton.mjs +4 -0
  550. package/fesm2022/primenglab-types-togglebutton.mjs.map +1 -0
  551. package/fesm2022/primenglab-types-toggleswitch.mjs +4 -0
  552. package/fesm2022/primenglab-types-toggleswitch.mjs.map +1 -0
  553. package/fesm2022/primenglab-types-toolbar.mjs +4 -0
  554. package/fesm2022/primenglab-types-toolbar.mjs.map +1 -0
  555. package/fesm2022/primenglab-types-tooltip.mjs +4 -0
  556. package/fesm2022/primenglab-types-tooltip.mjs.map +1 -0
  557. package/fesm2022/primenglab-types-tree.mjs +4 -0
  558. package/fesm2022/primenglab-types-tree.mjs.map +1 -0
  559. package/fesm2022/primenglab-types-treeselect.mjs +4 -0
  560. package/fesm2022/primenglab-types-treeselect.mjs.map +1 -0
  561. package/fesm2022/primenglab-types-treetable.mjs +4 -0
  562. package/fesm2022/primenglab-types-treetable.mjs.map +1 -0
  563. package/fesm2022/primenglab-usestyle.mjs +54 -0
  564. package/fesm2022/primenglab-usestyle.mjs.map +1 -0
  565. package/fesm2022/primenglab-utils.mjs +332 -0
  566. package/fesm2022/primenglab-utils.mjs.map +1 -0
  567. package/fesm2022/primenglab.mjs +6 -0
  568. package/fesm2022/primenglab.mjs.map +1 -0
  569. package/package.json +1188 -0
  570. package/types/primenglab-accordion.d.ts +252 -0
  571. package/types/primenglab-animateonscroll.d.ts +68 -0
  572. package/types/primenglab-api.d.ts +2000 -0
  573. package/types/primenglab-autocomplete.d.ts +774 -0
  574. package/types/primenglab-autofocus.d.ts +29 -0
  575. package/types/primenglab-avatar.d.ts +133 -0
  576. package/types/primenglab-avatargroup.d.ts +58 -0
  577. package/types/primenglab-badge.d.ts +96 -0
  578. package/types/primenglab-base.d.ts +58 -0
  579. package/types/primenglab-basecomponent.d.ts +178 -0
  580. package/types/primenglab-baseeditableholder.d.ts +45 -0
  581. package/types/primenglab-baseinput.d.ts +74 -0
  582. package/types/primenglab-basemodelholder.d.ts +12 -0
  583. package/types/primenglab-bind.d.ts +37 -0
  584. package/types/primenglab-blockui.d.ts +97 -0
  585. package/types/primenglab-breadcrumb.d.ts +150 -0
  586. package/types/primenglab-button.d.ts +468 -0
  587. package/types/primenglab-buttongroup.d.ts +44 -0
  588. package/types/primenglab-card.d.ts +138 -0
  589. package/types/primenglab-carousel.d.ts +687 -0
  590. package/types/primenglab-cascadeselect.d.ts +581 -0
  591. package/types/primenglab-chart.d.ts +133 -0
  592. package/types/primenglab-checkbox.d.ts +227 -0
  593. package/types/primenglab-chip.d.ts +159 -0
  594. package/types/primenglab-classnames.d.ts +32 -0
  595. package/types/primenglab-colorpicker.d.ts +295 -0
  596. package/types/primenglab-commandmenu.d.ts +182 -0
  597. package/types/primenglab-compare.d.ts +225 -0
  598. package/types/primenglab-config.d.ts +313 -0
  599. package/types/primenglab-confirmdialog.d.ts +344 -0
  600. package/types/primenglab-confirmpopup.d.ts +230 -0
  601. package/types/primenglab-contextmenu.d.ts +388 -0
  602. package/types/primenglab-dataview.d.ts +361 -0
  603. package/types/primenglab-datepicker.d.ts +967 -0
  604. package/types/primenglab-dialog.d.ts +481 -0
  605. package/types/primenglab-divider.d.ts +116 -0
  606. package/types/primenglab-dock.d.ts +189 -0
  607. package/types/primenglab-dom.d.ts +109 -0
  608. package/types/primenglab-dragdrop.d.ts +117 -0
  609. package/types/primenglab-drawer.d.ts +272 -0
  610. package/types/primenglab-dynamicdialog.d.ts +576 -0
  611. package/types/primenglab-editor.d.ts +182 -0
  612. package/types/primenglab-fieldset.d.ts +182 -0
  613. package/types/primenglab-fileupload.d.ts +542 -0
  614. package/types/primenglab-floatlabel.d.ts +67 -0
  615. package/types/primenglab-fluid.d.ts +54 -0
  616. package/types/primenglab-focustrap.d.ts +32 -0
  617. package/types/primenglab-galleria.d.ts +450 -0
  618. package/types/primenglab-gallery.d.ts +653 -0
  619. package/types/primenglab-iconfield.d.ts +61 -0
  620. package/types/primenglab-icons-angledoubledown.d.ts +9 -0
  621. package/types/primenglab-icons-angledoubleleft.d.ts +9 -0
  622. package/types/primenglab-icons-angledoubleright.d.ts +9 -0
  623. package/types/primenglab-icons-angledoubleup.d.ts +9 -0
  624. package/types/primenglab-icons-angledown.d.ts +9 -0
  625. package/types/primenglab-icons-angleleft.d.ts +9 -0
  626. package/types/primenglab-icons-angleright.d.ts +9 -0
  627. package/types/primenglab-icons-angleup.d.ts +9 -0
  628. package/types/primenglab-icons-arrowdown.d.ts +11 -0
  629. package/types/primenglab-icons-arrowdownleft.d.ts +9 -0
  630. package/types/primenglab-icons-arrowdownright.d.ts +9 -0
  631. package/types/primenglab-icons-arrowleft.d.ts +11 -0
  632. package/types/primenglab-icons-arrowright.d.ts +9 -0
  633. package/types/primenglab-icons-arrowup.d.ts +11 -0
  634. package/types/primenglab-icons-ban.d.ts +11 -0
  635. package/types/primenglab-icons-bars.d.ts +9 -0
  636. package/types/primenglab-icons-baseicon.d.ts +33 -0
  637. package/types/primenglab-icons-blank.d.ts +9 -0
  638. package/types/primenglab-icons-calendar.d.ts +9 -0
  639. package/types/primenglab-icons-caretleft.d.ts +9 -0
  640. package/types/primenglab-icons-caretright.d.ts +9 -0
  641. package/types/primenglab-icons-check.d.ts +9 -0
  642. package/types/primenglab-icons-chevrondown.d.ts +9 -0
  643. package/types/primenglab-icons-chevronleft.d.ts +9 -0
  644. package/types/primenglab-icons-chevronright.d.ts +9 -0
  645. package/types/primenglab-icons-chevronup.d.ts +9 -0
  646. package/types/primenglab-icons-exclamationtriangle.d.ts +11 -0
  647. package/types/primenglab-icons-eye.d.ts +9 -0
  648. package/types/primenglab-icons-eyeslash.d.ts +11 -0
  649. package/types/primenglab-icons-filter.d.ts +11 -0
  650. package/types/primenglab-icons-filterfill.d.ts +9 -0
  651. package/types/primenglab-icons-filterslash.d.ts +11 -0
  652. package/types/primenglab-icons-home.d.ts +11 -0
  653. package/types/primenglab-icons-infocircle.d.ts +11 -0
  654. package/types/primenglab-icons-minus.d.ts +9 -0
  655. package/types/primenglab-icons-pencil.d.ts +11 -0
  656. package/types/primenglab-icons-plus.d.ts +11 -0
  657. package/types/primenglab-icons-refresh.d.ts +11 -0
  658. package/types/primenglab-icons-search.d.ts +11 -0
  659. package/types/primenglab-icons-searchminus.d.ts +11 -0
  660. package/types/primenglab-icons-searchplus.d.ts +11 -0
  661. package/types/primenglab-icons-sortalt.d.ts +11 -0
  662. package/types/primenglab-icons-sortamountdown.d.ts +11 -0
  663. package/types/primenglab-icons-sortamountupalt.d.ts +11 -0
  664. package/types/primenglab-icons-spinner.d.ts +11 -0
  665. package/types/primenglab-icons-star.d.ts +11 -0
  666. package/types/primenglab-icons-starfill.d.ts +11 -0
  667. package/types/primenglab-icons-thlarge.d.ts +11 -0
  668. package/types/primenglab-icons-times.d.ts +9 -0
  669. package/types/primenglab-icons-timescircle.d.ts +11 -0
  670. package/types/primenglab-icons-trash.d.ts +11 -0
  671. package/types/primenglab-icons-undo.d.ts +11 -0
  672. package/types/primenglab-icons-upload.d.ts +11 -0
  673. package/types/primenglab-icons-windowmaximize.d.ts +11 -0
  674. package/types/primenglab-icons-windowminimize.d.ts +11 -0
  675. package/types/primenglab-icons.d.ts +53 -0
  676. package/types/primenglab-iftalabel.d.ts +56 -0
  677. package/types/primenglab-image.d.ts +336 -0
  678. package/types/primenglab-imagecompare.d.ts +97 -0
  679. package/types/primenglab-inplace.d.ts +132 -0
  680. package/types/primenglab-inputcolor.d.ts +568 -0
  681. package/types/primenglab-inputgroup.d.ts +59 -0
  682. package/types/primenglab-inputgroupaddon.d.ts +37 -0
  683. package/types/primenglab-inputicon.d.ts +38 -0
  684. package/types/primenglab-inputmask.d.ts +385 -0
  685. package/types/primenglab-inputnumber.d.ts +424 -0
  686. package/types/primenglab-inputotp.d.ts +177 -0
  687. package/types/primenglab-inputpassword.d.ts +63 -0
  688. package/types/primenglab-inputtags.d.ts +315 -0
  689. package/types/primenglab-inputtext.d.ts +112 -0
  690. package/types/primenglab-keyfilter.d.ts +58 -0
  691. package/types/primenglab-knob.d.ts +202 -0
  692. package/types/primenglab-label.d.ts +55 -0
  693. package/types/primenglab-license.d.ts +23 -0
  694. package/types/primenglab-listbox.d.ts +775 -0
  695. package/types/primenglab-megamenu.d.ts +402 -0
  696. package/types/primenglab-menu.d.ts +382 -0
  697. package/types/primenglab-menubar.d.ts +374 -0
  698. package/types/primenglab-message.d.ts +166 -0
  699. package/types/primenglab-metergroup.d.ts +209 -0
  700. package/types/primenglab-motion.d.ts +398 -0
  701. package/types/primenglab-multiselect.d.ts +877 -0
  702. package/types/primenglab-orderlist.d.ts +390 -0
  703. package/types/primenglab-organizationchart.d.ts +189 -0
  704. package/types/primenglab-overlay.d.ts +300 -0
  705. package/types/primenglab-overlaybadge.d.ts +70 -0
  706. package/types/primenglab-paginator.d.ts +330 -0
  707. package/types/primenglab-panel.d.ts +234 -0
  708. package/types/primenglab-panelmenu.d.ts +248 -0
  709. package/types/primenglab-passthrough.d.ts +14 -0
  710. package/types/primenglab-password.d.ts +459 -0
  711. package/types/primenglab-picklist.d.ts +751 -0
  712. package/types/primenglab-popover.d.ts +183 -0
  713. package/types/primenglab-progressbar.d.ts +118 -0
  714. package/types/primenglab-progressspinner.d.ts +126 -0
  715. package/types/primenglab-radiobutton.d.ts +188 -0
  716. package/types/primenglab-rating.d.ts +210 -0
  717. package/types/primenglab-ripple.d.ts +60 -0
  718. package/types/primenglab-scrollarea.d.ts +286 -0
  719. package/types/primenglab-scroller.d.ts +462 -0
  720. package/types/primenglab-scrollpanel.d.ts +147 -0
  721. package/types/primenglab-scrolltop.d.ts +143 -0
  722. package/types/primenglab-select.d.ts +757 -0
  723. package/types/primenglab-selectbutton.d.ts +184 -0
  724. package/types/primenglab-sidebar.d.ts +669 -0
  725. package/types/primenglab-skeleton.d.ts +103 -0
  726. package/types/primenglab-slider.d.ts +327 -0
  727. package/types/primenglab-speeddial.d.ts +394 -0
  728. package/types/primenglab-splitbutton.d.ts +259 -0
  729. package/types/primenglab-splitter.d.ts +334 -0
  730. package/types/primenglab-stepper.d.ts +311 -0
  731. package/types/primenglab-steps.d.ts +153 -0
  732. package/types/primenglab-styleclass.d.ts +110 -0
  733. package/types/primenglab-table.d.ts +1953 -0
  734. package/types/primenglab-tabs.d.ts +356 -0
  735. package/types/primenglab-tag.d.ts +104 -0
  736. package/types/primenglab-terminal.d.ts +137 -0
  737. package/types/primenglab-textarea.d.ts +126 -0
  738. package/types/primenglab-tieredmenu.d.ts +419 -0
  739. package/types/primenglab-timeline.d.ts +128 -0
  740. package/types/primenglab-toast.d.ts +268 -0
  741. package/types/primenglab-togglebutton.d.ts +200 -0
  742. package/types/primenglab-toggleswitch.d.ts +161 -0
  743. package/types/primenglab-toolbar.d.ts +95 -0
  744. package/types/primenglab-tooltip.d.ts +251 -0
  745. package/types/primenglab-tree.d.ts +571 -0
  746. package/types/primenglab-treeselect.d.ts +560 -0
  747. package/types/primenglab-treetable.d.ts +1290 -0
  748. package/types/primenglab-ts-helpers.d.ts +6 -0
  749. package/types/primenglab-types-accordion.d.ts +135 -0
  750. package/types/primenglab-types-autocomplete.d.ts +312 -0
  751. package/types/primenglab-types-avatar.d.ts +50 -0
  752. package/types/primenglab-types-avatargroup.d.ts +28 -0
  753. package/types/primenglab-types-badge.d.ts +36 -0
  754. package/types/primenglab-types-blockui.d.ts +39 -0
  755. package/types/primenglab-types-breadcrumb.d.ts +96 -0
  756. package/types/primenglab-types-button.d.ts +140 -0
  757. package/types/primenglab-types-card.d.ts +75 -0
  758. package/types/primenglab-types-carousel.d.ts +244 -0
  759. package/types/primenglab-types-cascadeselect.d.ts +278 -0
  760. package/types/primenglab-types-chart.d.ts +57 -0
  761. package/types/primenglab-types-checkbox.d.ts +85 -0
  762. package/types/primenglab-types-chip.d.ts +70 -0
  763. package/types/primenglab-types-colorpicker.d.ts +83 -0
  764. package/types/primenglab-types-commandmenu.d.ts +154 -0
  765. package/types/primenglab-types-compare.d.ts +55 -0
  766. package/types/primenglab-types-confirmdialog.d.ts +161 -0
  767. package/types/primenglab-types-confirmpopup.d.ts +110 -0
  768. package/types/primenglab-types-contextmenu.d.ts +135 -0
  769. package/types/primenglab-types-dataview.d.ts +263 -0
  770. package/types/primenglab-types-datepicker.d.ts +535 -0
  771. package/types/primenglab-types-dialog.d.ts +124 -0
  772. package/types/primenglab-types-divider.d.ts +43 -0
  773. package/types/primenglab-types-dock.d.ts +75 -0
  774. package/types/primenglab-types-drawer.d.ts +83 -0
  775. package/types/primenglab-types-editor.d.ts +210 -0
  776. package/types/primenglab-types-fieldset.d.ts +120 -0
  777. package/types/primenglab-types-fileupload.d.ts +416 -0
  778. package/types/primenglab-types-floatlabel.d.ts +27 -0
  779. package/types/primenglab-types-fluid.d.ts +28 -0
  780. package/types/primenglab-types-galleria.d.ts +259 -0
  781. package/types/primenglab-types-gallery.d.ts +434 -0
  782. package/types/primenglab-types-iconfield.d.ts +27 -0
  783. package/types/primenglab-types-iftalabel.d.ts +26 -0
  784. package/types/primenglab-types-image.d.ts +149 -0
  785. package/types/primenglab-types-imagecompare.d.ts +43 -0
  786. package/types/primenglab-types-inplace.d.ts +72 -0
  787. package/types/primenglab-types-inputcolor.d.ts +206 -0
  788. package/types/primenglab-types-inputgroup.d.ts +28 -0
  789. package/types/primenglab-types-inputgroupaddon.d.ts +28 -0
  790. package/types/primenglab-types-inputicon.d.ts +26 -0
  791. package/types/primenglab-types-inputmask.d.ts +56 -0
  792. package/types/primenglab-types-inputnumber.d.ts +115 -0
  793. package/types/primenglab-types-inputotp.d.ts +101 -0
  794. package/types/primenglab-types-inputpassword.d.ts +24 -0
  795. package/types/primenglab-types-inputtags.d.ts +178 -0
  796. package/types/primenglab-types-inputtext.d.ts +24 -0
  797. package/types/primenglab-types-knob.d.ts +40 -0
  798. package/types/primenglab-types-label.d.ts +24 -0
  799. package/types/primenglab-types-listbox.d.ts +359 -0
  800. package/types/primenglab-types-megamenu.d.ts +183 -0
  801. package/types/primenglab-types-menu.d.ts +135 -0
  802. package/types/primenglab-types-menubar.d.ts +171 -0
  803. package/types/primenglab-types-message.d.ts +112 -0
  804. package/types/primenglab-types-metergroup.d.ts +178 -0
  805. package/types/primenglab-types-motion.d.ts +26 -0
  806. package/types/primenglab-types-multiselect.d.ts +454 -0
  807. package/types/primenglab-types-orderlist.d.ts +177 -0
  808. package/types/primenglab-types-organizationchart.d.ts +187 -0
  809. package/types/primenglab-types-overlay.d.ts +60 -0
  810. package/types/primenglab-types-overlaybadge.d.ts +34 -0
  811. package/types/primenglab-types-paginator.d.ts +167 -0
  812. package/types/primenglab-types-panel.d.ts +139 -0
  813. package/types/primenglab-types-panelmenu.d.ts +180 -0
  814. package/types/primenglab-types-password.d.ts +120 -0
  815. package/types/primenglab-types-picklist.d.ts +358 -0
  816. package/types/primenglab-types-popover.d.ts +59 -0
  817. package/types/primenglab-types-progressbar.d.ts +63 -0
  818. package/types/primenglab-types-progressspinner.d.ts +44 -0
  819. package/types/primenglab-types-radiobutton.d.ts +51 -0
  820. package/types/primenglab-types-rating.d.ts +94 -0
  821. package/types/primenglab-types-scrollarea.d.ts +60 -0
  822. package/types/primenglab-types-scroller.d.ts +231 -0
  823. package/types/primenglab-types-scrollpanel.d.ts +56 -0
  824. package/types/primenglab-types-scrolltop.d.ts +71 -0
  825. package/types/primenglab-types-select.d.ts +330 -0
  826. package/types/primenglab-types-selectbutton.d.ts +92 -0
  827. package/types/primenglab-types-shared.d.ts +27 -0
  828. package/types/primenglab-types-sidebar.d.ts +108 -0
  829. package/types/primenglab-types-skeleton.d.ts +28 -0
  830. package/types/primenglab-types-slider.d.ts +91 -0
  831. package/types/primenglab-types-speeddial.d.ts +110 -0
  832. package/types/primenglab-types-splitbutton.d.ts +60 -0
  833. package/types/primenglab-types-splitter.d.ts +127 -0
  834. package/types/primenglab-types-stepper.d.ts +186 -0
  835. package/types/primenglab-types-table.d.ts +902 -0
  836. package/types/primenglab-types-tabs.d.ts +120 -0
  837. package/types/primenglab-types-tag.d.ts +48 -0
  838. package/types/primenglab-types-terminal.d.ts +60 -0
  839. package/types/primenglab-types-textarea.d.ts +28 -0
  840. package/types/primenglab-types-tieredmenu.d.ts +203 -0
  841. package/types/primenglab-types-timeline.d.ts +93 -0
  842. package/types/primenglab-types-toast.d.ts +148 -0
  843. package/types/primenglab-types-togglebutton.d.ts +91 -0
  844. package/types/primenglab-types-toggleswitch.d.ts +73 -0
  845. package/types/primenglab-types-toolbar.d.ts +55 -0
  846. package/types/primenglab-types-tooltip.d.ts +42 -0
  847. package/types/primenglab-types-tree.d.ts +355 -0
  848. package/types/primenglab-types-treeselect.d.ts +266 -0
  849. package/types/primenglab-types-treetable.d.ts +659 -0
  850. package/types/primenglab-usestyle.d.ts +15 -0
  851. package/types/primenglab-utils.d.ts +43 -0
  852. package/types/primenglab.d.ts +2 -0
@@ -0,0 +1,2262 @@
1
+ export * from 'primenglab/types/inputcolor';
2
+ import * as i0 from '@angular/core';
3
+ import { InjectionToken, inject, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, input, booleanAttribute, effect, Directive, Injectable, forwardRef, signal, output, NgModule } from '@angular/core';
4
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
5
+ import { SharedModule } from 'primenglab/api';
6
+ import { BaseComponent, PARENT_INSTANCE } from 'primenglab/basecomponent';
7
+ import * as i1 from 'primenglab/bind';
8
+ import { Bind } from 'primenglab/bind';
9
+ import { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';
10
+ import { ButtonDirective, ButtonIcon } from 'primenglab/button';
11
+ import * as i1$1 from 'primenglab/inputtext';
12
+ import { InputText } from 'primenglab/inputtext';
13
+ import { style } from '@primeuix/styles/inputcolor';
14
+ import { BaseStyle } from 'primenglab/base';
15
+
16
+ function clamp(value, min, max) {
17
+ return Math.min(Math.max(value, min), max);
18
+ }
19
+ function round(value, decimals = 0) {
20
+ const factor = Math.pow(10, decimals);
21
+ return Math.round(value * factor) / factor;
22
+ }
23
+ function multiplyMatrices(matrix, vector) {
24
+ return [matrix[0] * vector[0] + matrix[1] * vector[1] + matrix[2] * vector[2], matrix[3] * vector[0] + matrix[4] * vector[1] + matrix[5] * vector[2], matrix[6] * vector[0] + matrix[7] * vector[1] + matrix[8] * vector[2]];
25
+ }
26
+ function mod(n, m) {
27
+ return ((n % m) + m) % m;
28
+ }
29
+ /**
30
+ * Snaps a value to the nearest step increment within min/max bounds.
31
+ * @example snap(23.7, 0, 100, 5) => 25
32
+ * @example snap(0.234, 0, 1, 0.01) => 0.23
33
+ */
34
+ function snapValue(value, min, max, step) {
35
+ const clamped = clamp(value, min, max);
36
+ const offset = clamped - min;
37
+ const steps = Math.round(offset / step);
38
+ const snapped = min + steps * step;
39
+ const precision = (step.toString().split('.')[1] || '').length;
40
+ return parseFloat(snapped.toFixed(precision));
41
+ }
42
+ class Color {
43
+ get alpha() {
44
+ return this.getChannelValue('alpha');
45
+ }
46
+ getSpaceAxes(xyChannels) {
47
+ const { xChannel, yChannel } = xyChannels;
48
+ if (xChannel === yChannel) {
49
+ throw new Error('xChannel and yChannel cannot be the same');
50
+ }
51
+ const zChannel = this.getChannels().find((channel) => channel !== xChannel && channel !== yChannel);
52
+ if (!zChannel) {
53
+ throw new Error('zChannel not found');
54
+ }
55
+ return { xChannel, yChannel, zChannel: zChannel };
56
+ }
57
+ incChannelValue(channel, step) {
58
+ const range = this.getChannelRange(channel);
59
+ const currentValue = this.getChannelValue(channel);
60
+ const newValue = snapValue(clamp(currentValue + step, range.minValue, range.maxValue), range.minValue, range.maxValue, range.step);
61
+ return this.setChannelValue(channel, newValue);
62
+ }
63
+ decChannelValue(channel, step) {
64
+ return this.incChannelValue(channel, -step);
65
+ }
66
+ toHex() {
67
+ const rgb = this.toRGB();
68
+ const r = Math.round(rgb.red).toString(16).padStart(2, '0');
69
+ const g = Math.round(rgb.green).toString(16).padStart(2, '0');
70
+ const b = Math.round(rgb.blue).toString(16).padStart(2, '0');
71
+ return `#${r}${g}${b}`;
72
+ }
73
+ toHexa() {
74
+ const hex = this.toHex();
75
+ if (this.alpha < 1) {
76
+ const a = Math.round(this.alpha * 255)
77
+ .toString(16)
78
+ .padStart(2, '0');
79
+ return `${hex}${a}`;
80
+ }
81
+ return hex;
82
+ }
83
+ toHexInt() {
84
+ const rgb = this.toRGB();
85
+ return (Math.round(rgb.red) << 16) | (Math.round(rgb.green) << 8) | Math.round(rgb.blue);
86
+ }
87
+ toRgbString() {
88
+ const rgb = this.toRGB();
89
+ const r = Math.round(rgb.red);
90
+ const g = Math.round(rgb.green);
91
+ const b = Math.round(rgb.blue);
92
+ if (this.alpha < 1) {
93
+ return `rgba(${r}, ${g}, ${b}, ${round(this.alpha, 2)})`;
94
+ }
95
+ return `rgb(${r}, ${g}, ${b})`;
96
+ }
97
+ toHslString() {
98
+ const hsl = this.toHSL();
99
+ const h = Math.round(hsl.hue) % 360;
100
+ const s = Math.round(hsl.saturation);
101
+ const l = Math.round(hsl.lightness);
102
+ if (this.alpha < 1) {
103
+ return `hsla(${h}, ${s}%, ${l}%, ${round(this.alpha, 2)})`;
104
+ }
105
+ return `hsl(${h}, ${s}%, ${l}%)`;
106
+ }
107
+ toHsbString() {
108
+ const hsb = this.toHSB();
109
+ const h = Math.round(hsb.hue) % 360;
110
+ const s = Math.round(hsb.saturation);
111
+ const b = Math.round(hsb.brightness);
112
+ if (this.alpha < 1) {
113
+ return `hsba(${h}, ${s}%, ${b}%, ${round(this.alpha, 2)})`;
114
+ }
115
+ return `hsb(${h}, ${s}%, ${b}%)`;
116
+ }
117
+ toString(format) {
118
+ const f = format || this.colorSpace;
119
+ switch (f) {
120
+ case 'hex':
121
+ return this.toHex();
122
+ case 'hexa':
123
+ return this.toHexa();
124
+ case 'rgb':
125
+ case 'rgba':
126
+ return this.toRgbString();
127
+ case 'hsl':
128
+ case 'hsla':
129
+ return this.toHslString();
130
+ case 'hsb':
131
+ case 'hsba':
132
+ return this.toHsbString();
133
+ case 'oklch':
134
+ return this.toOKLCH().toString('oklch');
135
+ case 'oklcha':
136
+ return this.toOKLCH().toString('oklcha');
137
+ case 'css':
138
+ return this.toHex();
139
+ default:
140
+ return this.toHex();
141
+ }
142
+ }
143
+ toFormat(format) {
144
+ switch (format) {
145
+ case 'hsba':
146
+ return this.toHSB();
147
+ case 'hsla':
148
+ return this.toHSL();
149
+ case 'rgba':
150
+ return this.toRGB();
151
+ case 'hexa':
152
+ return this.toRGB();
153
+ case 'oklch':
154
+ return this.toOKLCH();
155
+ default:
156
+ return this.toHSB();
157
+ }
158
+ }
159
+ }
160
+ class HSBColor extends Color {
161
+ hue;
162
+ saturation;
163
+ brightness;
164
+ _alpha;
165
+ colorSpace = 'hsba';
166
+ constructor(hue, saturation, brightness, _alpha = 1) {
167
+ super();
168
+ this.hue = hue;
169
+ this.saturation = saturation;
170
+ this.brightness = brightness;
171
+ this._alpha = _alpha;
172
+ this.hue = hue >= 0 && hue <= 360 ? hue : mod(hue, 360);
173
+ this.saturation = clamp(saturation, 0, 100);
174
+ this.brightness = clamp(brightness, 0, 100);
175
+ this._alpha = clamp(_alpha, 0, 1);
176
+ }
177
+ getChannelValue(channel) {
178
+ switch (channel) {
179
+ case 'hue':
180
+ return this.hue;
181
+ case 'saturation':
182
+ return this.saturation;
183
+ case 'brightness':
184
+ return this.brightness;
185
+ case 'alpha':
186
+ return this._alpha;
187
+ case 'lightness':
188
+ return this.toHSL().getChannelValue(channel);
189
+ case 'L':
190
+ case 'C':
191
+ case 'H':
192
+ case 'oklchLightness':
193
+ case 'oklchChroma':
194
+ case 'oklchHue':
195
+ return this.toOKLCH().getChannelValue(channel);
196
+ default:
197
+ return this.toRGB().getChannelValue(channel);
198
+ }
199
+ }
200
+ setChannelValue(channel, value) {
201
+ switch (channel) {
202
+ case 'hue':
203
+ return new HSBColor(value, this.saturation, this.brightness, this._alpha);
204
+ case 'saturation':
205
+ return new HSBColor(this.hue, value, this.brightness, this._alpha);
206
+ case 'brightness':
207
+ return new HSBColor(this.hue, this.saturation, value, this._alpha);
208
+ case 'alpha':
209
+ return new HSBColor(this.hue, this.saturation, this.brightness, value);
210
+ case 'lightness': {
211
+ const hsl = this.toHSL().setChannelValue(channel, value);
212
+ return hsl.toHSB();
213
+ }
214
+ case 'L':
215
+ case 'C':
216
+ case 'H':
217
+ case 'oklchLightness':
218
+ case 'oklchChroma':
219
+ case 'oklchHue': {
220
+ const oklch = this.toOKLCH().setChannelValue(channel, value);
221
+ return oklch.toHSB();
222
+ }
223
+ default: {
224
+ const rgb = this.toRGB().setChannelValue(channel, value);
225
+ return rgb.toHSB();
226
+ }
227
+ }
228
+ }
229
+ toHSB() {
230
+ return this.clone();
231
+ }
232
+ toHSL() {
233
+ const h = this.hue;
234
+ const s = this.saturation / 100;
235
+ const b = this.brightness / 100;
236
+ const l = b * (1 - s / 2);
237
+ const sl = l === 0 || l === 1 ? 0 : ((b - l) / Math.min(l, 1 - l)) * 100;
238
+ return new HSLColor(h, sl, l * 100, this._alpha);
239
+ }
240
+ toRGB() {
241
+ const h = this.hue / 360;
242
+ const s = this.saturation / 100;
243
+ const b = this.brightness / 100;
244
+ let r, g, bl;
245
+ const i = Math.floor(h * 6);
246
+ const f = h * 6 - i;
247
+ const p = b * (1 - s);
248
+ const q = b * (1 - f * s);
249
+ const t = b * (1 - (1 - f) * s);
250
+ switch (i % 6) {
251
+ case 0:
252
+ r = b;
253
+ g = t;
254
+ bl = p;
255
+ break;
256
+ case 1:
257
+ r = q;
258
+ g = b;
259
+ bl = p;
260
+ break;
261
+ case 2:
262
+ r = p;
263
+ g = b;
264
+ bl = t;
265
+ break;
266
+ case 3:
267
+ r = p;
268
+ g = q;
269
+ bl = b;
270
+ break;
271
+ case 4:
272
+ r = t;
273
+ g = p;
274
+ bl = b;
275
+ break;
276
+ case 5:
277
+ r = b;
278
+ g = p;
279
+ bl = q;
280
+ break;
281
+ default:
282
+ r = 0;
283
+ g = 0;
284
+ bl = 0;
285
+ }
286
+ return new RGBColor(r * 255, g * 255, bl * 255, this._alpha);
287
+ }
288
+ toOKLCH() {
289
+ return this.toRGB().toOKLCH();
290
+ }
291
+ clone() {
292
+ return new HSBColor(this.hue, this.saturation, this.brightness, this._alpha);
293
+ }
294
+ toJSON() {
295
+ return {
296
+ hue: this.hue,
297
+ saturation: this.saturation,
298
+ brightness: this.brightness,
299
+ alpha: this._alpha
300
+ };
301
+ }
302
+ getFormat() {
303
+ return 'hsba';
304
+ }
305
+ getChannels() {
306
+ return ['hue', 'saturation', 'brightness'];
307
+ }
308
+ getChannelRange(channel) {
309
+ switch (channel) {
310
+ case 'hue':
311
+ return { minValue: 0, maxValue: 360, step: 1, pageStep: 15 };
312
+ case 'saturation':
313
+ case 'brightness':
314
+ return { minValue: 0, maxValue: 100, step: 1, pageStep: 10 };
315
+ case 'alpha':
316
+ return { minValue: 0, maxValue: 1, step: 0.01, pageStep: 0.1 };
317
+ case 'lightness':
318
+ return this.toHSL().getChannelRange(channel);
319
+ case 'L':
320
+ case 'C':
321
+ case 'H':
322
+ case 'oklchLightness':
323
+ case 'oklchChroma':
324
+ case 'oklchHue':
325
+ return this.toOKLCH().getChannelRange(channel);
326
+ case 'red':
327
+ case 'green':
328
+ case 'blue':
329
+ return this.toRGB().getChannelRange(channel);
330
+ default:
331
+ throw new Error(`Unknown color channel: ${channel}`);
332
+ }
333
+ }
334
+ }
335
+ class HSLColor extends Color {
336
+ hue;
337
+ saturation;
338
+ lightness;
339
+ _alpha;
340
+ colorSpace = 'hsla';
341
+ constructor(hue, saturation, lightness, _alpha = 1) {
342
+ super();
343
+ this.hue = hue;
344
+ this.saturation = saturation;
345
+ this.lightness = lightness;
346
+ this._alpha = _alpha;
347
+ this.hue = hue >= 0 && hue <= 360 ? hue : mod(hue, 360);
348
+ this.saturation = clamp(saturation, 0, 100);
349
+ this.lightness = clamp(lightness, 0, 100);
350
+ this._alpha = clamp(_alpha, 0, 1);
351
+ }
352
+ getChannelValue(channel) {
353
+ switch (channel) {
354
+ case 'hue':
355
+ return this.hue;
356
+ case 'saturation':
357
+ return this.saturation;
358
+ case 'lightness':
359
+ return this.lightness;
360
+ case 'alpha':
361
+ return this._alpha;
362
+ case 'brightness':
363
+ return this.toHSB().getChannelValue(channel);
364
+ case 'L':
365
+ case 'C':
366
+ case 'H':
367
+ case 'oklchLightness':
368
+ case 'oklchChroma':
369
+ case 'oklchHue':
370
+ return this.toOKLCH().getChannelValue(channel);
371
+ default:
372
+ return this.toRGB().getChannelValue(channel);
373
+ }
374
+ }
375
+ setChannelValue(channel, value) {
376
+ switch (channel) {
377
+ case 'hue':
378
+ return new HSLColor(value, this.saturation, this.lightness, this._alpha);
379
+ case 'saturation':
380
+ return new HSLColor(this.hue, value, this.lightness, this._alpha);
381
+ case 'lightness':
382
+ return new HSLColor(this.hue, this.saturation, value, this._alpha);
383
+ case 'alpha':
384
+ return new HSLColor(this.hue, this.saturation, this.lightness, value);
385
+ case 'brightness': {
386
+ const hsb = this.toHSB().setChannelValue(channel, value);
387
+ return hsb.toHSL();
388
+ }
389
+ case 'L':
390
+ case 'C':
391
+ case 'H':
392
+ case 'oklchLightness':
393
+ case 'oklchChroma':
394
+ case 'oklchHue': {
395
+ const oklch = this.toOKLCH().setChannelValue(channel, value);
396
+ return oklch.toHSL();
397
+ }
398
+ default: {
399
+ const rgb = this.toRGB().setChannelValue(channel, value);
400
+ return rgb.toHSL();
401
+ }
402
+ }
403
+ }
404
+ toHSB() {
405
+ const h = this.hue;
406
+ const s = this.saturation / 100;
407
+ const l = this.lightness / 100;
408
+ const b = l + s * Math.min(l, 1 - l);
409
+ const sb = b === 0 ? 0 : 2 * (1 - l / b);
410
+ return new HSBColor(h, sb * 100, b * 100, this._alpha);
411
+ }
412
+ toHSL() {
413
+ return this.clone();
414
+ }
415
+ toRGB() {
416
+ const h = this.hue;
417
+ const s = this.saturation / 100;
418
+ const l = this.lightness / 100;
419
+ const a = s * Math.min(l, 1 - l);
420
+ const f = (n) => {
421
+ const k = (n + h / 30) % 12;
422
+ return l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);
423
+ };
424
+ return new RGBColor(f(0) * 255, f(8) * 255, f(4) * 255, this._alpha);
425
+ }
426
+ toOKLCH() {
427
+ return this.toRGB().toOKLCH();
428
+ }
429
+ clone() {
430
+ return new HSLColor(this.hue, this.saturation, this.lightness, this._alpha);
431
+ }
432
+ toJSON() {
433
+ return {
434
+ hue: this.hue,
435
+ saturation: this.saturation,
436
+ lightness: this.lightness,
437
+ alpha: this._alpha
438
+ };
439
+ }
440
+ getFormat() {
441
+ return 'hsla';
442
+ }
443
+ getChannels() {
444
+ return ['hue', 'saturation', 'lightness'];
445
+ }
446
+ getChannelRange(channel) {
447
+ switch (channel) {
448
+ case 'hue':
449
+ return { minValue: 0, maxValue: 360, step: 1, pageStep: 15 };
450
+ case 'saturation':
451
+ case 'lightness':
452
+ return { minValue: 0, maxValue: 100, step: 1, pageStep: 10 };
453
+ case 'alpha':
454
+ return { minValue: 0, maxValue: 1, step: 0.01, pageStep: 0.1 };
455
+ case 'brightness':
456
+ return this.toHSB().getChannelRange(channel);
457
+ case 'L':
458
+ case 'C':
459
+ case 'H':
460
+ case 'oklchLightness':
461
+ case 'oklchChroma':
462
+ case 'oklchHue':
463
+ return this.toOKLCH().getChannelRange(channel);
464
+ case 'red':
465
+ case 'green':
466
+ case 'blue':
467
+ return this.toRGB().getChannelRange(channel);
468
+ default:
469
+ throw new Error(`Unknown color channel: ${channel}`);
470
+ }
471
+ }
472
+ }
473
+ class RGBColor extends Color {
474
+ red;
475
+ green;
476
+ blue;
477
+ _alpha;
478
+ colorSpace = 'rgba';
479
+ constructor(red, green, blue, _alpha = 1) {
480
+ super();
481
+ this.red = red;
482
+ this.green = green;
483
+ this.blue = blue;
484
+ this._alpha = _alpha;
485
+ this.red = clamp(red, 0, 255);
486
+ this.green = clamp(green, 0, 255);
487
+ this.blue = clamp(blue, 0, 255);
488
+ this._alpha = clamp(_alpha, 0, 1);
489
+ }
490
+ getChannelValue(channel) {
491
+ switch (channel) {
492
+ case 'red':
493
+ return this.red;
494
+ case 'green':
495
+ return this.green;
496
+ case 'blue':
497
+ return this.blue;
498
+ case 'alpha':
499
+ return this._alpha;
500
+ case 'hue':
501
+ case 'saturation':
502
+ case 'brightness':
503
+ return this.toHSB().getChannelValue(channel);
504
+ case 'lightness':
505
+ return this.toHSL().getChannelValue(channel);
506
+ case 'L':
507
+ case 'C':
508
+ case 'H':
509
+ case 'oklchLightness':
510
+ case 'oklchChroma':
511
+ case 'oklchHue':
512
+ return this.toOKLCH().getChannelValue(channel);
513
+ default:
514
+ return this.toHSB().getChannelValue(channel);
515
+ }
516
+ }
517
+ setChannelValue(channel, value) {
518
+ switch (channel) {
519
+ case 'red':
520
+ return new RGBColor(value, this.green, this.blue, this._alpha);
521
+ case 'green':
522
+ return new RGBColor(this.red, value, this.blue, this._alpha);
523
+ case 'blue':
524
+ return new RGBColor(this.red, this.green, value, this._alpha);
525
+ case 'alpha':
526
+ return new RGBColor(this.red, this.green, this.blue, value);
527
+ case 'hue':
528
+ case 'saturation':
529
+ case 'brightness': {
530
+ const hsb = this.toHSB().setChannelValue(channel, value);
531
+ return hsb.toRGB();
532
+ }
533
+ case 'lightness': {
534
+ const hsl = this.toHSL().setChannelValue(channel, value);
535
+ return hsl.toRGB();
536
+ }
537
+ case 'L':
538
+ case 'C':
539
+ case 'H':
540
+ case 'oklchLightness':
541
+ case 'oklchChroma':
542
+ case 'oklchHue': {
543
+ const oklch = this.toOKLCH().setChannelValue(channel, value);
544
+ return oklch.toRGB();
545
+ }
546
+ default: {
547
+ const hsb = this.toHSB().setChannelValue(channel, value);
548
+ return hsb.toRGB();
549
+ }
550
+ }
551
+ }
552
+ toHSB() {
553
+ const r = this.red / 255;
554
+ const g = this.green / 255;
555
+ const b = this.blue / 255;
556
+ const max = Math.max(r, g, b);
557
+ const min = Math.min(r, g, b);
558
+ const d = max - min;
559
+ let h = 0;
560
+ const s = max === 0 ? 0 : d / max;
561
+ const v = max;
562
+ if (d !== 0) {
563
+ switch (max) {
564
+ case r:
565
+ h = ((g - b) / d + (g < b ? 6 : 0)) / 6;
566
+ break;
567
+ case g:
568
+ h = ((b - r) / d + 2) / 6;
569
+ break;
570
+ case b:
571
+ h = ((r - g) / d + 4) / 6;
572
+ break;
573
+ }
574
+ }
575
+ return new HSBColor(h * 360, s * 100, v * 100, this._alpha);
576
+ }
577
+ toHSL() {
578
+ const r = this.red / 255;
579
+ const g = this.green / 255;
580
+ const b = this.blue / 255;
581
+ const max = Math.max(r, g, b);
582
+ const min = Math.min(r, g, b);
583
+ const d = max - min;
584
+ const l = (max + min) / 2;
585
+ let h = 0;
586
+ let s = 0;
587
+ if (d !== 0) {
588
+ s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
589
+ switch (max) {
590
+ case r:
591
+ h = ((g - b) / d + (g < b ? 6 : 0)) / 6;
592
+ break;
593
+ case g:
594
+ h = ((b - r) / d + 2) / 6;
595
+ break;
596
+ case b:
597
+ h = ((r - g) / d + 4) / 6;
598
+ break;
599
+ }
600
+ }
601
+ return new HSLColor(h * 360, s * 100, l * 100, this._alpha);
602
+ }
603
+ toRGB() {
604
+ return this.clone();
605
+ }
606
+ toOKLCH() {
607
+ const rgb = [this.red / 255, this.green / 255, this.blue / 255];
608
+ const rgbLinear = rgb.map((c) => (Math.abs(c) <= 0.04045 ? c / 12.92 : (c < 0 ? -1 : 1) * ((Math.abs(c) + 0.055) / 1.055) ** 2.4));
609
+ const xyz = multiplyMatrices([0.41239079926595934, 0.357584339383878, 0.1804807884018343, 0.21263900587151027, 0.715168678767756, 0.07219231536073371, 0.01933081871559182, 0.11919477979462598, 0.9505321522496607], rgbLinear);
610
+ const LMS = multiplyMatrices([0.819022437996703, 0.3619062600528904, -0.1288737815209879, 0.0329836539323885, 0.9292868615863434, 0.0361446663506424, 0.0481771893596242, 0.2642395317527308, 0.6335478284694309], xyz);
611
+ const LMSg = LMS.map((val) => Math.cbrt(val));
612
+ const [L, a, b] = multiplyMatrices([0.210454268309314, 0.7936177747023054, -0.0040720430116193, 1.9779985324311684, -2.4285922420485799, 0.450593709617411, 0.0259040424655478, 0.7827717124575296, -0.8086757549230774], LMSg);
613
+ const C = Math.sqrt(a ** 2 + b ** 2);
614
+ const H = Math.abs(a) < 0.0002 && Math.abs(b) < 0.0002 ? NaN : ((((Math.atan2(b, a) * 180) / Math.PI) % 360) + 360) % 360;
615
+ const outL = Number(Math.min(1, Math.max(0, L)).toFixed(4));
616
+ const outC = Number(C.toFixed(4));
617
+ const outH = Number.isNaN(H) ? NaN : Number(H.toFixed(2));
618
+ return new OKLCHColor(outL, outC, outH, Number(this._alpha.toFixed(2)));
619
+ }
620
+ clone() {
621
+ return new RGBColor(this.red, this.green, this.blue, this._alpha);
622
+ }
623
+ toJSON() {
624
+ return {
625
+ red: this.red,
626
+ green: this.green,
627
+ blue: this.blue,
628
+ alpha: this._alpha
629
+ };
630
+ }
631
+ getFormat() {
632
+ return 'rgba';
633
+ }
634
+ getChannels() {
635
+ return ['red', 'green', 'blue'];
636
+ }
637
+ getChannelRange(channel) {
638
+ switch (channel) {
639
+ case 'red':
640
+ case 'green':
641
+ case 'blue':
642
+ return { minValue: 0, maxValue: 255, step: 1, pageStep: 17 };
643
+ case 'alpha':
644
+ return { minValue: 0, maxValue: 1, step: 0.01, pageStep: 0.1 };
645
+ case 'hue':
646
+ case 'saturation':
647
+ case 'brightness':
648
+ return this.toHSB().getChannelRange(channel);
649
+ case 'lightness':
650
+ return this.toHSL().getChannelRange(channel);
651
+ case 'L':
652
+ case 'C':
653
+ case 'H':
654
+ case 'oklchLightness':
655
+ case 'oklchChroma':
656
+ case 'oklchHue':
657
+ return this.toOKLCH().getChannelRange(channel);
658
+ default:
659
+ throw new Error(`Unknown color channel: ${channel}`);
660
+ }
661
+ }
662
+ }
663
+ class OKLCHColor extends Color {
664
+ L;
665
+ C;
666
+ H;
667
+ _alpha;
668
+ colorSpace = 'oklch';
669
+ constructor(L, C, H, _alpha = 1) {
670
+ super();
671
+ this.L = L;
672
+ this.C = C;
673
+ this.H = H;
674
+ this._alpha = _alpha;
675
+ this.L = clamp(L, 0, 1);
676
+ this.C = clamp(C, 0, 0.4);
677
+ this.H = Number.isNaN(H) ? NaN : H >= 0 && H <= 360 ? H : mod(H, 360);
678
+ this._alpha = clamp(_alpha, 0, 1);
679
+ }
680
+ getChannelValue(channel) {
681
+ switch (channel) {
682
+ case 'L':
683
+ case 'oklchLightness':
684
+ return this.L;
685
+ case 'C':
686
+ case 'oklchChroma':
687
+ return this.C;
688
+ case 'H':
689
+ case 'oklchHue':
690
+ return this.H;
691
+ case 'alpha':
692
+ return this._alpha;
693
+ default:
694
+ return this.toRGB().getChannelValue(channel);
695
+ }
696
+ }
697
+ setChannelValue(channel, value) {
698
+ switch (channel) {
699
+ case 'L':
700
+ case 'oklchLightness':
701
+ return new OKLCHColor(value, this.C, this.H, this._alpha);
702
+ case 'C':
703
+ case 'oklchChroma':
704
+ return new OKLCHColor(this.L, value, this.H, this._alpha);
705
+ case 'H':
706
+ case 'oklchHue':
707
+ return new OKLCHColor(this.L, this.C, value, this._alpha);
708
+ case 'alpha':
709
+ return new OKLCHColor(this.L, this.C, this.H, value);
710
+ default: {
711
+ const rgb = this.toRGB().setChannelValue(channel, value);
712
+ return rgb.toOKLCH();
713
+ }
714
+ }
715
+ }
716
+ toHSB() {
717
+ return this.toRGB().toHSB();
718
+ }
719
+ toHSL() {
720
+ return this.toRGB().toHSL();
721
+ }
722
+ toRGB() {
723
+ const hRad = (this.H * Math.PI) / 180;
724
+ const a = Number.isNaN(this.H) ? 0 : this.C * Math.cos(hRad);
725
+ const b = Number.isNaN(this.H) ? 0 : this.C * Math.sin(hRad);
726
+ const l_ = this.L + 0.3963377774 * a + 0.2158037573 * b;
727
+ const m_ = this.L - 0.1055613458 * a - 0.0638541728 * b;
728
+ const s_ = this.L - 0.0894841775 * a - 1.291485548 * b;
729
+ const l = l_ * l_ * l_;
730
+ const m = m_ * m_ * m_;
731
+ const s = s_ * s_ * s_;
732
+ const lr = 4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s;
733
+ const lg = -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s;
734
+ const lb = -0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s;
735
+ const toSrgb = (c) => {
736
+ if (c <= 0.0031308)
737
+ return c * 12.92;
738
+ return 1.055 * Math.pow(c, 1 / 2.4) - 0.055;
739
+ };
740
+ return new RGBColor(clamp(toSrgb(lr) * 255, 0, 255), clamp(toSrgb(lg) * 255, 0, 255), clamp(toSrgb(lb) * 255, 0, 255), this._alpha);
741
+ }
742
+ toOKLCH() {
743
+ return this.clone();
744
+ }
745
+ toString(format) {
746
+ const f = format || this.colorSpace;
747
+ switch (f) {
748
+ case 'oklch': {
749
+ const l = Number.isNaN(this.L) ? 0 : Number((this.L * 100).toFixed(2));
750
+ const c = Number.isNaN(this.C) ? 0 : Number(this.C.toFixed(4));
751
+ const h = Number.isNaN(this.H) ? 0 : Number(this.H.toFixed(2));
752
+ return `oklch(${l}% ${c} ${h})`;
753
+ }
754
+ case 'oklcha':
755
+ case 'css': {
756
+ const l = Number.isNaN(this.L) ? 0 : Number((this.L * 100).toFixed(2));
757
+ const c = Number.isNaN(this.C) ? 0 : Number(this.C.toFixed(4));
758
+ const h = Number.isNaN(this.H) ? 0 : Number(this.H.toFixed(2));
759
+ const a = Number.isNaN(this._alpha) ? 1 : Number(this._alpha.toFixed(2));
760
+ return `oklch(${l}% ${c} ${h} / ${a})`;
761
+ }
762
+ default:
763
+ return super.toString(f);
764
+ }
765
+ }
766
+ clone() {
767
+ return new OKLCHColor(this.L, this.C, this.H, this._alpha);
768
+ }
769
+ toJSON() {
770
+ return {
771
+ L: this.L,
772
+ C: this.C,
773
+ H: this.H,
774
+ alpha: this._alpha
775
+ };
776
+ }
777
+ getFormat() {
778
+ return 'oklch';
779
+ }
780
+ getChannels() {
781
+ return ['L', 'C', 'H'];
782
+ }
783
+ getChannelRange(channel) {
784
+ switch (channel) {
785
+ case 'L':
786
+ case 'oklchLightness':
787
+ return { minValue: 0, maxValue: 1, step: 0.01, pageStep: 0.1 };
788
+ case 'C':
789
+ case 'oklchChroma':
790
+ return { minValue: 0, maxValue: 0.4, step: 0.01, pageStep: 0.05 };
791
+ case 'H':
792
+ case 'oklchHue':
793
+ return { minValue: 0, maxValue: 360, step: 1, pageStep: 15 };
794
+ case 'alpha':
795
+ return { minValue: 0, maxValue: 1, step: 0.01, pageStep: 0.1 };
796
+ case 'hue':
797
+ case 'saturation':
798
+ case 'brightness':
799
+ return this.toHSB().getChannelRange(channel);
800
+ case 'lightness':
801
+ return this.toHSL().getChannelRange(channel);
802
+ case 'red':
803
+ case 'green':
804
+ case 'blue':
805
+ return this.toRGB().getChannelRange(channel);
806
+ default:
807
+ throw new Error(`Unknown color channel: ${channel}`);
808
+ }
809
+ }
810
+ }
811
+ function parseColor(value) {
812
+ if (!value)
813
+ return null;
814
+ if (value instanceof Color) {
815
+ return value;
816
+ }
817
+ if (typeof value !== 'string')
818
+ return null;
819
+ const str = value.trim();
820
+ const hexMatch = str.match(/^#?([0-9a-f]{3,8})$/i);
821
+ if (hexMatch) {
822
+ let hex = hexMatch[1];
823
+ if (hex.length === 3) {
824
+ hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
825
+ }
826
+ else if (hex.length === 4) {
827
+ hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2] + hex[3] + hex[3];
828
+ }
829
+ if (hex.length === 6) {
830
+ const r = parseInt(hex.substring(0, 2), 16);
831
+ const g = parseInt(hex.substring(2, 4), 16);
832
+ const b = parseInt(hex.substring(4, 6), 16);
833
+ return new RGBColor(r, g, b, 1);
834
+ }
835
+ if (hex.length === 8) {
836
+ const r = parseInt(hex.substring(0, 2), 16);
837
+ const g = parseInt(hex.substring(2, 4), 16);
838
+ const b = parseInt(hex.substring(4, 6), 16);
839
+ const a = parseInt(hex.substring(6, 8), 16) / 255;
840
+ return new RGBColor(r, g, b, a);
841
+ }
842
+ }
843
+ const rgbMatch = str.match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)$/i);
844
+ if (rgbMatch) {
845
+ return new RGBColor(parseInt(rgbMatch[1]), parseInt(rgbMatch[2]), parseInt(rgbMatch[3]), rgbMatch[4] !== undefined ? parseFloat(rgbMatch[4]) : 1);
846
+ }
847
+ const hslMatch = str.match(/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%?\s*,\s*([\d.]+)%?\s*(?:,\s*([\d.]+))?\s*\)$/i);
848
+ if (hslMatch) {
849
+ return new HSLColor(parseFloat(hslMatch[1]), parseFloat(hslMatch[2]), parseFloat(hslMatch[3]), hslMatch[4] !== undefined ? parseFloat(hslMatch[4]) : 1);
850
+ }
851
+ const hsbMatch = str.match(/^hsba?\(\s*([\d.]+)\s*,\s*([\d.]+)%?\s*,\s*([\d.]+)%?\s*(?:,\s*([\d.]+))?\s*\)$/i);
852
+ if (hsbMatch) {
853
+ return new HSBColor(parseFloat(hsbMatch[1]), parseFloat(hsbMatch[2]), parseFloat(hsbMatch[3]), hsbMatch[4] !== undefined ? parseFloat(hsbMatch[4]) : 1);
854
+ }
855
+ const oklchMatch = str.match(/^oklch\(\s*([\d.]+)(%?)\s+([\d.]+)\s+([\d.]+)\s*(?:\/\s*([\d.]+))?\s*\)$/i);
856
+ if (oklchMatch) {
857
+ const lVal = parseFloat(oklchMatch[1]);
858
+ const l = oklchMatch[2] === '%' ? lVal / 100 : lVal;
859
+ return new OKLCHColor(l, parseFloat(oklchMatch[3]), parseFloat(oklchMatch[4]), oklchMatch[5] !== undefined ? parseFloat(oklchMatch[5]) : 1);
860
+ }
861
+ return null;
862
+ }
863
+ function getChannelRange(channel) {
864
+ switch (channel) {
865
+ case 'hue':
866
+ return { minValue: 0, maxValue: 360, step: 1, pageStep: 15 };
867
+ case 'H':
868
+ case 'oklchHue':
869
+ return { minValue: 0, maxValue: 360, step: 1, pageStep: 15 };
870
+ case 'saturation':
871
+ case 'brightness':
872
+ case 'lightness':
873
+ return { minValue: 0, maxValue: 100, step: 1, pageStep: 10 };
874
+ case 'red':
875
+ case 'green':
876
+ case 'blue':
877
+ return { minValue: 0, maxValue: 255, step: 1, pageStep: 17 };
878
+ case 'alpha':
879
+ return { minValue: 0, maxValue: 1, step: 0.01, pageStep: 0.1 };
880
+ case 'L':
881
+ case 'oklchLightness':
882
+ return { minValue: 0, maxValue: 1, step: 0.01, pageStep: 0.1 };
883
+ case 'C':
884
+ case 'oklchChroma':
885
+ return { minValue: 0, maxValue: 0.4, step: 0.01, pageStep: 0.05 };
886
+ default:
887
+ return { minValue: 0, maxValue: 100, step: 1, pageStep: 10 };
888
+ }
889
+ }
890
+ function getInputChannelRange(channel) {
891
+ if (channel === 'hex') {
892
+ return { minValue: 0, maxValue: 0xffffff, step: 1, pageStep: 1 };
893
+ }
894
+ return getChannelRange(channel);
895
+ }
896
+ function getChannelGradient(color, channel, orientation = 'horizontal') {
897
+ const range = getChannelRange(channel);
898
+ const direction = orientation === 'horizontal' ? 'right' : 'top';
899
+ switch (channel) {
900
+ case 'hue':
901
+ case 'H':
902
+ case 'oklchHue':
903
+ return `linear-gradient(to ${direction}, rgb(255, 0, 0) 0%, rgb(255, 255, 0) 17%, rgb(0, 255, 0) 33%, rgb(0, 255, 255) 50%, rgb(0, 0, 255) 67%, rgb(255, 0, 255) 83%, rgb(255, 0, 0) 100%)`;
904
+ case 'lightness':
905
+ case 'L':
906
+ case 'oklchLightness': {
907
+ const start = color.setChannelValue(channel, range.minValue).toRgbString();
908
+ const middle = color.setChannelValue(channel, (range.maxValue - range.minValue) / 2).toRgbString();
909
+ const end = color.setChannelValue(channel, range.maxValue).toRgbString();
910
+ return `linear-gradient(to ${direction}, ${start}, ${middle}, ${end})`;
911
+ }
912
+ case 'alpha': {
913
+ const start = color.setChannelValue('alpha', range.minValue).toRgbString();
914
+ const end = color.setChannelValue('alpha', range.maxValue).toRgbString();
915
+ return `linear-gradient(to ${direction}, ${start}, ${end})`;
916
+ }
917
+ default: {
918
+ const start = color.setChannelValue(channel, range.minValue).toRgbString();
919
+ const end = color.setChannelValue(channel, range.maxValue).toRgbString();
920
+ return `linear-gradient(to ${direction}, ${start}, ${end})`;
921
+ }
922
+ }
923
+ }
924
+ const channelGenerators = {
925
+ hue: (color) => [0, 60, 120, 180, 240, 300, 360].map((h) => color.setChannelValue('hue', h).toRgbString()).join(', '),
926
+ saturation: (color) => `${color.setChannelValue('saturation', 0).toRgbString()}, transparent`,
927
+ lightness: () => 'black, transparent, white',
928
+ brightness: () => 'black, transparent'
929
+ };
930
+ function getAreaGradient(color, xChannel, yChannel, format) {
931
+ const axes3d = getDefault3DAxes(format);
932
+ const zChannel = axes3d.zChannel;
933
+ const zValue = color.getChannelValue(zChannel);
934
+ const isHSL = format === 'hsla';
935
+ let base;
936
+ if (isHSL) {
937
+ base = parseColor('hsl(0, 100%, 50%)').setChannelValue(zChannel, zValue);
938
+ }
939
+ else {
940
+ base = parseColor('hsb(0, 100%, 100%)').setChannelValue(zChannel, zValue);
941
+ }
942
+ const channels = [xChannel, yChannel];
943
+ const direction = (c) => (c === xChannel ? 'right' : 'top');
944
+ const layers = channels
945
+ .map((c) => {
946
+ const gen = channelGenerators[c];
947
+ if (!gen)
948
+ return null;
949
+ return `linear-gradient(to ${direction(c)}, ${gen(base)})`;
950
+ })
951
+ .filter(Boolean)
952
+ .reverse();
953
+ const isHueZ = zChannel === 'hue' || zChannel === 'H' || zChannel === 'oklchHue';
954
+ if (isHueZ) {
955
+ layers.push(base.toRgbString());
956
+ }
957
+ return layers.join(', ');
958
+ }
959
+ function getChannelColor(color, channel) {
960
+ switch (channel) {
961
+ case 'hue':
962
+ return parseColor(`hsl(${color.getChannelValue('hue')}, 100%, 50%)`);
963
+ case 'red':
964
+ case 'green':
965
+ case 'blue':
966
+ case 'lightness':
967
+ case 'brightness':
968
+ case 'saturation':
969
+ return color.setChannelValue('alpha', 1);
970
+ case 'alpha':
971
+ return color;
972
+ default:
973
+ return color.setChannelValue('alpha', 1);
974
+ }
975
+ }
976
+ function toCssString(color, format) {
977
+ const a = round(color.alpha, 2);
978
+ switch (format) {
979
+ case 'rgba':
980
+ case 'hexa': {
981
+ const rgb = color.toRGB();
982
+ return `rgba(${Math.round(rgb.red)}, ${Math.round(rgb.green)}, ${Math.round(rgb.blue)}, ${a})`;
983
+ }
984
+ case 'hsla': {
985
+ const hsl = color.toHSL();
986
+ return `hsla(${Math.round(hsl.hue) % 360}, ${hsl.saturation.toFixed(2)}%, ${hsl.lightness.toFixed(2)}%, ${a})`;
987
+ }
988
+ case 'hsba': {
989
+ // CSS doesn't support hsb, convert to hsl
990
+ const hsl = color.toHSL();
991
+ return `hsla(${Math.round(hsl.hue) % 360}, ${hsl.saturation.toFixed(2)}%, ${hsl.lightness.toFixed(2)}%, ${a})`;
992
+ }
993
+ case 'oklch': {
994
+ return color.toOKLCH().toString('css');
995
+ }
996
+ default:
997
+ return color.toOKLCH().toString('css');
998
+ }
999
+ }
1000
+ function getInputChannelValue(color, channel, format = 'hsba') {
1001
+ if (channel === 'hex') {
1002
+ const alphaRange = getChannelRange('alpha');
1003
+ if (color.alpha < alphaRange.maxValue) {
1004
+ return color.toHexa();
1005
+ }
1006
+ return color.toHex();
1007
+ }
1008
+ if (channel === 'css') {
1009
+ return toCssString(color, format);
1010
+ }
1011
+ const value = color.getChannelValue(channel);
1012
+ if (Number.isNaN(value))
1013
+ return 'NaN';
1014
+ const range = getChannelRange(channel);
1015
+ if (channel === 'H' || channel === 'oklchHue') {
1016
+ const rounded = round(value, 2);
1017
+ return rounded.toString();
1018
+ }
1019
+ if (channel === 'hue') {
1020
+ const rounded = Math.round(value);
1021
+ return rounded.toString();
1022
+ }
1023
+ if (range.step >= 1) {
1024
+ return Math.round(value).toString();
1025
+ }
1026
+ return round(value, 4).toString();
1027
+ }
1028
+ function getDefault2DAxes(format) {
1029
+ switch (format) {
1030
+ case 'hsla':
1031
+ return { xChannel: 'saturation', yChannel: 'lightness' };
1032
+ case 'hsba':
1033
+ case 'rgba':
1034
+ case 'oklch':
1035
+ default:
1036
+ return { xChannel: 'saturation', yChannel: 'brightness' };
1037
+ }
1038
+ }
1039
+ function getDefault3DAxes(format) {
1040
+ switch (format) {
1041
+ case 'hsla':
1042
+ return { xChannel: 'saturation', yChannel: 'lightness', zChannel: 'hue' };
1043
+ case 'hsba':
1044
+ case 'rgba':
1045
+ case 'oklch':
1046
+ default:
1047
+ return { xChannel: 'saturation', yChannel: 'brightness', zChannel: 'hue' };
1048
+ }
1049
+ }
1050
+
1051
+ const INPUT_COLOR_INSTANCE = new InjectionToken('INPUT_COLOR_INSTANCE');
1052
+ const INPUT_COLOR_SLIDER_INSTANCE = new InjectionToken('INPUT_COLOR_SLIDER_INSTANCE');
1053
+
1054
+ /**
1055
+ * InputColorArea is a helper component for InputColor component.
1056
+ * @group Components
1057
+ */
1058
+ class InputColorArea extends BaseComponent {
1059
+ componentName = 'InputColorArea';
1060
+ bindDirectiveInstance = inject(Bind, { self: true });
1061
+ $pc = inject(INPUT_COLOR_INSTANCE);
1062
+ $xChannel = computed(() => this.$pc.$axes().xChannel, /* @ts-ignore */
1063
+ ...(ngDevMode ? [{ debugName: "$xChannel" }] : /* istanbul ignore next */ []));
1064
+ $yChannel = computed(() => this.$pc.$axes().yChannel, /* @ts-ignore */
1065
+ ...(ngDevMode ? [{ debugName: "$yChannel" }] : /* istanbul ignore next */ []));
1066
+ $areaGradient = computed(() => {
1067
+ const color = this.$pc.$color();
1068
+ const xCh = this.$xChannel();
1069
+ const yCh = this.$yChannel();
1070
+ const format = this.$pc.format();
1071
+ return getAreaGradient(color, xCh, yCh, format);
1072
+ }, /* @ts-ignore */
1073
+ ...(ngDevMode ? [{ debugName: "$areaGradient" }] : /* istanbul ignore next */ []));
1074
+ $handleBackground = computed(() => this.$pc.$color().setChannelValue('alpha', 1).toRgbString(), /* @ts-ignore */
1075
+ ...(ngDevMode ? [{ debugName: "$handleBackground" }] : /* istanbul ignore next */ []));
1076
+ $handleLeft = computed(() => {
1077
+ const xCh = this.$xChannel();
1078
+ const range = getChannelRange(xCh);
1079
+ const value = this.$pc.$color().getChannelValue(xCh);
1080
+ const pct = ((value - range.minValue) / (range.maxValue - range.minValue)) * 100;
1081
+ return `${pct}%`;
1082
+ }, /* @ts-ignore */
1083
+ ...(ngDevMode ? [{ debugName: "$handleLeft" }] : /* istanbul ignore next */ []));
1084
+ $handleTop = computed(() => {
1085
+ const yCh = this.$yChannel();
1086
+ const range = getChannelRange(yCh);
1087
+ const value = this.$pc.$color().getChannelValue(yCh);
1088
+ const pct = (1 - (value - range.minValue) / (range.maxValue - range.minValue)) * 100;
1089
+ return `${pct}%`;
1090
+ }, /* @ts-ignore */
1091
+ ...(ngDevMode ? [{ debugName: "$handleTop" }] : /* istanbul ignore next */ []));
1092
+ dragging = false;
1093
+ dragOffset = { x: 0, y: 0 };
1094
+ cleanupDrag = null;
1095
+ onAfterViewChecked() {
1096
+ this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
1097
+ }
1098
+ onPointerDown(event) {
1099
+ if (this.$pc.$disabled())
1100
+ return;
1101
+ event.preventDefault();
1102
+ this.dragging = true;
1103
+ const el = this.el.nativeElement;
1104
+ el.setPointerCapture(event.pointerId);
1105
+ const handle = event.target?.closest('[data-pc-section="areahandle"], .p-inputcolor-area-handle');
1106
+ if (handle) {
1107
+ const handleRect = handle.getBoundingClientRect();
1108
+ this.dragOffset = {
1109
+ x: event.clientX - (handleRect.left + handleRect.width / 2),
1110
+ y: event.clientY - (handleRect.top + handleRect.height / 2)
1111
+ };
1112
+ }
1113
+ else {
1114
+ this.dragOffset = { x: 0, y: 0 };
1115
+ }
1116
+ this.updateFromPointer(event);
1117
+ const onMove = (e) => {
1118
+ if (!this.dragging)
1119
+ return;
1120
+ e.preventDefault();
1121
+ this.updateFromPointer(e);
1122
+ };
1123
+ const cleanup = () => {
1124
+ this.dragging = false;
1125
+ this.cleanupDrag = null;
1126
+ el.removeEventListener('pointermove', onMove);
1127
+ el.removeEventListener('pointerup', onUp);
1128
+ el.removeEventListener('pointercancel', onCancel);
1129
+ el.removeEventListener('lostpointercapture', onLostCapture);
1130
+ };
1131
+ this.cleanupDrag = cleanup;
1132
+ const onUp = (e) => {
1133
+ if (!this.dragging)
1134
+ return;
1135
+ this.updateFromPointer(e, true);
1136
+ this.dragOffset = { x: 0, y: 0 };
1137
+ cleanup();
1138
+ };
1139
+ const onCancel = () => {
1140
+ cleanup();
1141
+ };
1142
+ const onLostCapture = () => {
1143
+ cleanup();
1144
+ };
1145
+ el.addEventListener('pointermove', onMove);
1146
+ el.addEventListener('pointerup', onUp);
1147
+ el.addEventListener('pointercancel', onCancel);
1148
+ el.addEventListener('lostpointercapture', onLostCapture);
1149
+ }
1150
+ ngOnDestroy() {
1151
+ this.cleanupDrag?.();
1152
+ }
1153
+ updateFromPointer(event, isEnd = false) {
1154
+ const el = this.el.nativeElement;
1155
+ const rect = el.getBoundingClientRect();
1156
+ const xPercent = Math.max(0, Math.min(1, (event.clientX - this.dragOffset.x - rect.left) / rect.width));
1157
+ const yPercent = Math.max(0, Math.min(1, (event.clientY - this.dragOffset.y - rect.top) / rect.height));
1158
+ const xCh = this.$xChannel();
1159
+ const yCh = this.$yChannel();
1160
+ const xRange = getChannelRange(xCh);
1161
+ const yRange = getChannelRange(yCh);
1162
+ const xValue = snapValue(xRange.minValue + xPercent * (xRange.maxValue - xRange.minValue), xRange.minValue, xRange.maxValue, xRange.step);
1163
+ const yValue = snapValue(yRange.maxValue - yPercent * (yRange.maxValue - yRange.minValue), yRange.minValue, yRange.maxValue, yRange.step);
1164
+ const nativeColor = this.$pc.toChannelNativeFormat(this.$pc.$color(), xCh);
1165
+ let color = nativeColor.setChannelValue(xCh, xValue);
1166
+ color = color.setChannelValue(yCh, yValue);
1167
+ this.$pc.updateColor(color, event, isEnd);
1168
+ }
1169
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColorArea, deps: null, target: i0.ɵɵFactoryTarget.Component });
1170
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.3", type: InputColorArea, isStandalone: true, selector: "p-inputcolor-area", host: { listeners: { "pointerdown": "onPointerDown($event)" }, properties: { "class": "$pc.cx(\"area\")", "style.--px-area-gradient": "$areaGradient()", "style.--px-handle-background": "$handleBackground()", "style.--px-handle-position-left": "$handleLeft()", "style.--px-handle-position-top": "$handleTop()" } }, providers: [{ provide: PARENT_INSTANCE, useExisting: InputColorArea }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1171
+ }
1172
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColorArea, decorators: [{
1173
+ type: Component,
1174
+ args: [{
1175
+ selector: 'p-inputcolor-area',
1176
+ standalone: true,
1177
+ template: `<ng-content></ng-content>`,
1178
+ changeDetection: ChangeDetectionStrategy.OnPush,
1179
+ encapsulation: ViewEncapsulation.None,
1180
+ host: {
1181
+ '[class]': '$pc.cx("area")',
1182
+ '[style.--px-area-gradient]': '$areaGradient()',
1183
+ '[style.--px-handle-background]': '$handleBackground()',
1184
+ '[style.--px-handle-position-left]': '$handleLeft()',
1185
+ '[style.--px-handle-position-top]': '$handleTop()',
1186
+ '(pointerdown)': 'onPointerDown($event)'
1187
+ },
1188
+ providers: [{ provide: PARENT_INSTANCE, useExisting: InputColorArea }],
1189
+ hostDirectives: [Bind]
1190
+ }]
1191
+ }] });
1192
+
1193
+ /**
1194
+ * InputColorAreaBackground is a helper component for InputColor component.
1195
+ * @group Components
1196
+ */
1197
+ class InputColorAreaBackground extends BaseComponent {
1198
+ componentName = 'InputColorAreaBackground';
1199
+ bindDirectiveInstance = inject(Bind, { self: true });
1200
+ $pc = inject(INPUT_COLOR_INSTANCE);
1201
+ onAfterViewChecked() {
1202
+ this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
1203
+ }
1204
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColorAreaBackground, deps: null, target: i0.ɵɵFactoryTarget.Component });
1205
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.3", type: InputColorAreaBackground, isStandalone: true, selector: "p-inputcolor-area-background", host: { properties: { "class": "$pc.cx(\"areaBackground\")" } }, providers: [{ provide: PARENT_INSTANCE, useExisting: InputColorAreaBackground }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1206
+ }
1207
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColorAreaBackground, decorators: [{
1208
+ type: Component,
1209
+ args: [{
1210
+ selector: 'p-inputcolor-area-background',
1211
+ standalone: true,
1212
+ template: `<ng-content></ng-content>`,
1213
+ changeDetection: ChangeDetectionStrategy.OnPush,
1214
+ encapsulation: ViewEncapsulation.None,
1215
+ host: {
1216
+ '[class]': '$pc.cx("areaBackground")'
1217
+ },
1218
+ providers: [{ provide: PARENT_INSTANCE, useExisting: InputColorAreaBackground }],
1219
+ hostDirectives: [Bind]
1220
+ }]
1221
+ }] });
1222
+
1223
+ /**
1224
+ * InputColorAreaHandle is a helper component for InputColor component.
1225
+ * @group Components
1226
+ */
1227
+ class InputColorAreaHandle extends BaseComponent {
1228
+ componentName = 'InputColorAreaHandle';
1229
+ bindDirectiveInstance = inject(Bind, { self: true });
1230
+ $pc = inject(INPUT_COLOR_INSTANCE);
1231
+ $xChannel = computed(() => this.$pc.$axes().xChannel, /* @ts-ignore */
1232
+ ...(ngDevMode ? [{ debugName: "$xChannel" }] : /* istanbul ignore next */ []));
1233
+ $yChannel = computed(() => this.$pc.$axes().yChannel, /* @ts-ignore */
1234
+ ...(ngDevMode ? [{ debugName: "$yChannel" }] : /* istanbul ignore next */ []));
1235
+ $xRange = computed(() => getChannelRange(this.$xChannel()), /* @ts-ignore */
1236
+ ...(ngDevMode ? [{ debugName: "$xRange" }] : /* istanbul ignore next */ []));
1237
+ $yRange = computed(() => getChannelRange(this.$yChannel()), /* @ts-ignore */
1238
+ ...(ngDevMode ? [{ debugName: "$yRange" }] : /* istanbul ignore next */ []));
1239
+ $xValue = computed(() => this.$pc.$color().getChannelValue(this.$xChannel()), /* @ts-ignore */
1240
+ ...(ngDevMode ? [{ debugName: "$xValue" }] : /* istanbul ignore next */ []));
1241
+ $yValue = computed(() => this.$pc.$color().getChannelValue(this.$yChannel()), /* @ts-ignore */
1242
+ ...(ngDevMode ? [{ debugName: "$yValue" }] : /* istanbul ignore next */ []));
1243
+ $xMin = computed(() => this.$xRange().minValue, /* @ts-ignore */
1244
+ ...(ngDevMode ? [{ debugName: "$xMin" }] : /* istanbul ignore next */ []));
1245
+ $xMax = computed(() => this.$xRange().maxValue, /* @ts-ignore */
1246
+ ...(ngDevMode ? [{ debugName: "$xMax" }] : /* istanbul ignore next */ []));
1247
+ $tabindex = computed(() => (this.$pc.$disabled() ? -1 : 0), /* @ts-ignore */
1248
+ ...(ngDevMode ? [{ debugName: "$tabindex" }] : /* istanbul ignore next */ []));
1249
+ $ariaDisabled = computed(() => this.$pc.$disabled() || undefined, /* @ts-ignore */
1250
+ ...(ngDevMode ? [{ debugName: "$ariaDisabled" }] : /* istanbul ignore next */ []));
1251
+ $ariaValueText = computed(() => {
1252
+ const xCh = this.$xChannel();
1253
+ const yCh = this.$yChannel();
1254
+ return `${xCh} ${this.$xValue()}, ${yCh} ${this.$yValue()}`;
1255
+ }, /* @ts-ignore */
1256
+ ...(ngDevMode ? [{ debugName: "$ariaValueText" }] : /* istanbul ignore next */ []));
1257
+ onAfterViewChecked() {
1258
+ this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
1259
+ }
1260
+ onKeyDown(event) {
1261
+ if (this.$pc.$disabled())
1262
+ return;
1263
+ const xCh = this.$xChannel();
1264
+ const yCh = this.$yChannel();
1265
+ const xRange = this.$xRange();
1266
+ const yRange = this.$yRange();
1267
+ let xVal = this.$xValue();
1268
+ let yVal = this.$yValue();
1269
+ let handled = false;
1270
+ switch (event.key) {
1271
+ case 'ArrowRight':
1272
+ xVal = Math.min(xVal + xRange.step, xRange.maxValue);
1273
+ handled = true;
1274
+ break;
1275
+ case 'ArrowLeft':
1276
+ xVal = Math.max(xVal - xRange.step, xRange.minValue);
1277
+ handled = true;
1278
+ break;
1279
+ case 'ArrowUp':
1280
+ yVal = Math.min(yVal + yRange.step, yRange.maxValue);
1281
+ handled = true;
1282
+ break;
1283
+ case 'ArrowDown':
1284
+ yVal = Math.max(yVal - yRange.step, yRange.minValue);
1285
+ handled = true;
1286
+ break;
1287
+ case 'PageUp':
1288
+ yVal = Math.min(yVal + yRange.pageStep, yRange.maxValue);
1289
+ handled = true;
1290
+ break;
1291
+ case 'PageDown':
1292
+ yVal = Math.max(yVal - yRange.pageStep, yRange.minValue);
1293
+ handled = true;
1294
+ break;
1295
+ case 'Home':
1296
+ xVal = xRange.minValue;
1297
+ handled = true;
1298
+ break;
1299
+ case 'End':
1300
+ xVal = xRange.maxValue;
1301
+ handled = true;
1302
+ break;
1303
+ }
1304
+ if (handled) {
1305
+ event.preventDefault();
1306
+ const nativeColor = this.$pc.toChannelNativeFormat(this.$pc.$color(), xCh);
1307
+ let color = nativeColor.setChannelValue(xCh, xVal);
1308
+ color = color.setChannelValue(yCh, yVal);
1309
+ this.$pc.updateColor(color, event, true);
1310
+ }
1311
+ }
1312
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColorAreaHandle, deps: null, target: i0.ɵɵFactoryTarget.Component });
1313
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.3", type: InputColorAreaHandle, isStandalone: true, selector: "p-inputcolor-area-handle", host: { listeners: { "keydown": "onKeyDown($event)" }, properties: { "class": "$pc.cx(\"areaHandle\")", "attr.role": "'slider'", "attr.tabindex": "$tabindex()", "attr.aria-label": "'Color'", "attr.aria-roledescription": "'2d slider'", "attr.aria-disabled": "$ariaDisabled()", "attr.aria-valuemin": "$xMin()", "attr.aria-valuemax": "$xMax()", "attr.aria-valuenow": "$xValue()", "attr.aria-valuetext": "$ariaValueText()" } }, providers: [{ provide: PARENT_INSTANCE, useExisting: InputColorAreaHandle }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1314
+ }
1315
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColorAreaHandle, decorators: [{
1316
+ type: Component,
1317
+ args: [{
1318
+ selector: 'p-inputcolor-area-handle',
1319
+ standalone: true,
1320
+ template: `<ng-content></ng-content>`,
1321
+ changeDetection: ChangeDetectionStrategy.OnPush,
1322
+ encapsulation: ViewEncapsulation.None,
1323
+ host: {
1324
+ '[class]': '$pc.cx("areaHandle")',
1325
+ '[attr.role]': "'slider'",
1326
+ '[attr.tabindex]': '$tabindex()',
1327
+ '[attr.aria-label]': "'Color'",
1328
+ '[attr.aria-roledescription]': "'2d slider'",
1329
+ '[attr.aria-disabled]': '$ariaDisabled()',
1330
+ '[attr.aria-valuemin]': '$xMin()',
1331
+ '[attr.aria-valuemax]': '$xMax()',
1332
+ '[attr.aria-valuenow]': '$xValue()',
1333
+ '[attr.aria-valuetext]': '$ariaValueText()',
1334
+ '(keydown)': 'onKeyDown($event)'
1335
+ },
1336
+ providers: [{ provide: PARENT_INSTANCE, useExisting: InputColorAreaHandle }],
1337
+ hostDirectives: [Bind]
1338
+ }]
1339
+ }] });
1340
+
1341
+ /**
1342
+ * InputColorEyeDropper is a helper component for InputColor component.
1343
+ * @group Components
1344
+ */
1345
+ class InputColorEyeDropper extends BaseComponent {
1346
+ componentName = 'InputColorEyeDropper';
1347
+ bindDirectiveInstance = inject(Bind, { self: true });
1348
+ $pc = inject(INPUT_COLOR_INSTANCE);
1349
+ /**
1350
+ * Whether to display button as text.
1351
+ * @group Props
1352
+ */
1353
+ text = input(false, /* @ts-ignore */
1354
+ ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
1355
+ /**
1356
+ * Whether to display a rounded button.
1357
+ * @group Props
1358
+ */
1359
+ rounded = input(false, /* @ts-ignore */
1360
+ ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
1361
+ /**
1362
+ * Whether to display button as outlined.
1363
+ * @group Props
1364
+ */
1365
+ outlined = input(false, /* @ts-ignore */
1366
+ ...(ngDevMode ? [{ debugName: "outlined" }] : /* istanbul ignore next */ []));
1367
+ /**
1368
+ * Whether to display an icon-only button.
1369
+ * @group Props
1370
+ */
1371
+ iconOnly = input(false, /* @ts-ignore */
1372
+ ...(ngDevMode ? [{ debugName: "iconOnly" }] : /* istanbul ignore next */ []));
1373
+ /**
1374
+ * Defines the color severity of the button.
1375
+ * @group Props
1376
+ */
1377
+ severity = input(undefined, /* @ts-ignore */
1378
+ ...(ngDevMode ? [{ debugName: "severity" }] : /* istanbul ignore next */ []));
1379
+ /**
1380
+ * Defines the size of the button.
1381
+ * @group Props
1382
+ */
1383
+ size = input(undefined, /* @ts-ignore */
1384
+ ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
1385
+ onAfterViewChecked() {
1386
+ this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
1387
+ }
1388
+ async onPickColor(event) {
1389
+ if (this.$pc.$disabled())
1390
+ return;
1391
+ if (!isPlatformBrowser(this.platformId))
1392
+ return;
1393
+ try {
1394
+ const eyeDropper = new window.EyeDropper();
1395
+ const result = await eyeDropper.open();
1396
+ if (result?.sRGBHex) {
1397
+ const parsed = parseColor(result.sRGBHex);
1398
+ if (parsed) {
1399
+ this.$pc.updateColor(parsed, event, true);
1400
+ }
1401
+ }
1402
+ }
1403
+ catch {
1404
+ // User cancelled or API not available
1405
+ }
1406
+ }
1407
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColorEyeDropper, deps: null, target: i0.ɵɵFactoryTarget.Component });
1408
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.3", type: InputColorEyeDropper, isStandalone: true, selector: "p-inputcolor-eyedropper", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, outlined: { classPropertyName: "outlined", publicName: "outlined", isSignal: true, isRequired: false, transformFunction: null }, iconOnly: { classPropertyName: "iconOnly", publicName: "iconOnly", isSignal: true, isRequired: false, transformFunction: null }, severity: { classPropertyName: "severity", publicName: "severity", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "$pc.cx(\"eyeDropper\")" } }, providers: [{ provide: PARENT_INSTANCE, useExisting: InputColorEyeDropper }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
1409
+ <ng-template #contentTpl><ng-content /></ng-template>
1410
+ <button
1411
+ pButton
1412
+ type="button"
1413
+ [pButtonPT]="ptm('pcButton')"
1414
+ [text]="text()"
1415
+ [rounded]="rounded()"
1416
+ [outlined]="outlined()"
1417
+ [severity]="severity()"
1418
+ [size]="size()"
1419
+ [disabled]="$pc.$disabled()"
1420
+ (click)="onPickColor($event)"
1421
+ [attr.aria-label]="'Pick a color'"
1422
+ >
1423
+ @if (iconOnly()) {
1424
+ <span pButtonIcon>
1425
+ <ng-container *ngTemplateOutlet="contentTpl" />
1426
+ </span>
1427
+ } @else {
1428
+ <ng-container *ngTemplateOutlet="contentTpl" />
1429
+ }
1430
+ </button>
1431
+ `, isInline: true, dependencies: [{ kind: "directive", type: ButtonDirective, selector: "[pButton]", inputs: ["pButton", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "link", "rounded", "fluid", "variant", "iconOnly", "loading", "severity"] }, { kind: "directive", type: ButtonIcon, selector: "[pButtonIcon]", inputs: ["pButtonIconPT", "pButtonUnstyled"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1432
+ }
1433
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColorEyeDropper, decorators: [{
1434
+ type: Component,
1435
+ args: [{
1436
+ selector: 'p-inputcolor-eyedropper',
1437
+ standalone: true,
1438
+ imports: [ButtonDirective, ButtonIcon, NgTemplateOutlet],
1439
+ template: `
1440
+ <ng-template #contentTpl><ng-content /></ng-template>
1441
+ <button
1442
+ pButton
1443
+ type="button"
1444
+ [pButtonPT]="ptm('pcButton')"
1445
+ [text]="text()"
1446
+ [rounded]="rounded()"
1447
+ [outlined]="outlined()"
1448
+ [severity]="severity()"
1449
+ [size]="size()"
1450
+ [disabled]="$pc.$disabled()"
1451
+ (click)="onPickColor($event)"
1452
+ [attr.aria-label]="'Pick a color'"
1453
+ >
1454
+ @if (iconOnly()) {
1455
+ <span pButtonIcon>
1456
+ <ng-container *ngTemplateOutlet="contentTpl" />
1457
+ </span>
1458
+ } @else {
1459
+ <ng-container *ngTemplateOutlet="contentTpl" />
1460
+ }
1461
+ </button>
1462
+ `,
1463
+ changeDetection: ChangeDetectionStrategy.OnPush,
1464
+ encapsulation: ViewEncapsulation.None,
1465
+ host: {
1466
+ '[class]': '$pc.cx("eyeDropper")'
1467
+ },
1468
+ providers: [{ provide: PARENT_INSTANCE, useExisting: InputColorEyeDropper }],
1469
+ hostDirectives: [Bind]
1470
+ }]
1471
+ }], propDecorators: { text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], outlined: [{ type: i0.Input, args: [{ isSignal: true, alias: "outlined", required: false }] }], iconOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconOnly", required: false }] }], severity: [{ type: i0.Input, args: [{ isSignal: true, alias: "severity", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
1472
+
1473
+ class InputColorInput extends BaseComponent {
1474
+ componentName = 'InputColorInput';
1475
+ $pc = inject(INPUT_COLOR_INSTANCE);
1476
+ /**
1477
+ * The color channel this input controls.
1478
+ * @group Props
1479
+ */
1480
+ channel = input.required(/* @ts-ignore */
1481
+ ...(ngDevMode ? [{ debugName: "channel" }] : /* istanbul ignore next */ []));
1482
+ /**
1483
+ * The input type attribute.
1484
+ * @group Props
1485
+ */
1486
+ type = input(/* @ts-ignore */
1487
+ ...(ngDevMode ? [undefined, { debugName: "type" }] : /* istanbul ignore next */ []));
1488
+ /**
1489
+ * When present, it specifies that the input should be disabled.
1490
+ * @group Props
1491
+ */
1492
+ disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1493
+ $disabled = computed(() => this.disabled() || this.$pc.$disabled(), /* @ts-ignore */
1494
+ ...(ngDevMode ? [{ debugName: "$disabled" }] : /* istanbul ignore next */ []));
1495
+ $inputType = computed(() => {
1496
+ const t = this.type();
1497
+ if (t)
1498
+ return t;
1499
+ const ch = this.channel();
1500
+ return ch === 'hex' || ch === 'css' ? 'text' : 'number';
1501
+ }, /* @ts-ignore */
1502
+ ...(ngDevMode ? [{ debugName: "$inputType" }] : /* istanbul ignore next */ []));
1503
+ $displayValue = computed(() => {
1504
+ const ch = this.channel();
1505
+ const color = this.$pc.$color();
1506
+ const format = this.$pc.format();
1507
+ return getInputChannelValue(color, ch, format);
1508
+ }, /* @ts-ignore */
1509
+ ...(ngDevMode ? [{ debugName: "$displayValue" }] : /* istanbul ignore next */ []));
1510
+ pendingValue = null;
1511
+ constructor() {
1512
+ super();
1513
+ effect(() => {
1514
+ this.el.nativeElement.type = this.$inputType();
1515
+ });
1516
+ effect(() => {
1517
+ const el = this.el.nativeElement;
1518
+ const ch = this.channel();
1519
+ if (ch !== 'hex' && ch !== 'css') {
1520
+ const range = getChannelRange(ch);
1521
+ el.min = String(range.minValue);
1522
+ el.max = String(range.maxValue);
1523
+ el.step = String(range.step);
1524
+ }
1525
+ });
1526
+ effect(() => {
1527
+ this.el.nativeElement.value = String(this.$displayValue() ?? '');
1528
+ });
1529
+ }
1530
+ onInput(event) {
1531
+ const target = event.target;
1532
+ this.pendingValue = target.value;
1533
+ }
1534
+ onBlur(event) {
1535
+ this.commitValue(event);
1536
+ }
1537
+ onEnter(event) {
1538
+ this.commitValue(event);
1539
+ }
1540
+ commitValue(event) {
1541
+ if (this.pendingValue === null)
1542
+ return;
1543
+ const ch = this.channel();
1544
+ const value = this.pendingValue;
1545
+ this.pendingValue = null;
1546
+ if (ch === 'hex') {
1547
+ const hex = value.startsWith('#') ? value : `#${value}`;
1548
+ const parsed = parseColor(hex);
1549
+ if (parsed) {
1550
+ this.$pc.updateColor(parsed, event, true);
1551
+ }
1552
+ }
1553
+ else if (ch === 'css') {
1554
+ const parsed = parseColor(value);
1555
+ if (parsed) {
1556
+ this.$pc.updateColor(parsed, event, true);
1557
+ }
1558
+ }
1559
+ else {
1560
+ const numValue = parseFloat(value);
1561
+ if (!isNaN(numValue)) {
1562
+ const range = getChannelRange(ch);
1563
+ const clamped = Math.max(range.minValue, Math.min(range.maxValue, numValue));
1564
+ this.$pc.setChannelValue(ch, clamped, event, true);
1565
+ }
1566
+ }
1567
+ }
1568
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColorInput, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1569
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.3", type: InputColorInput, isStandalone: true, selector: "[pInputColorInput]", inputs: { channel: { classPropertyName: "channel", publicName: "channel", isSignal: true, isRequired: true, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "input": "onInput($event)", "blur": "onBlur($event)", "keydown.enter": "onEnter($event)" }, properties: { "attr.disabled": "$disabled() || null", "attr.data-channel": "channel()" } }, providers: [{ provide: PARENT_INSTANCE, useExisting: InputColorInput }], usesInheritance: true, hostDirectives: [{ directive: i1$1.InputText, inputs: ["pSize", "pSize", "fluid", "fluid", "variant", "variant", "invalid", "invalid"] }], ngImport: i0 });
1570
+ }
1571
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColorInput, decorators: [{
1572
+ type: Directive,
1573
+ args: [{
1574
+ selector: '[pInputColorInput]',
1575
+ standalone: true,
1576
+ host: {
1577
+ '[attr.disabled]': '$disabled() || null',
1578
+ '[attr.data-channel]': 'channel()',
1579
+ '(input)': 'onInput($event)',
1580
+ '(blur)': 'onBlur($event)',
1581
+ '(keydown.enter)': 'onEnter($event)'
1582
+ },
1583
+ providers: [{ provide: PARENT_INSTANCE, useExisting: InputColorInput }],
1584
+ hostDirectives: [
1585
+ {
1586
+ directive: InputText,
1587
+ inputs: ['pSize', 'fluid', 'variant', 'invalid']
1588
+ }
1589
+ ]
1590
+ }]
1591
+ }], ctorParameters: () => [], propDecorators: { channel: [{ type: i0.Input, args: [{ isSignal: true, alias: "channel", required: true }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
1592
+
1593
+ /**
1594
+ * InputColorSlider is a helper component for InputColor component.
1595
+ * @group Components
1596
+ */
1597
+ class InputColorSlider extends BaseComponent {
1598
+ componentName = 'InputColorSlider';
1599
+ bindDirectiveInstance = inject(Bind, { self: true });
1600
+ $pc = inject(INPUT_COLOR_INSTANCE);
1601
+ /**
1602
+ * The color channel this slider controls.
1603
+ * @group Props
1604
+ */
1605
+ channel = input('hue', /* @ts-ignore */
1606
+ ...(ngDevMode ? [{ debugName: "channel" }] : /* istanbul ignore next */ []));
1607
+ /**
1608
+ * Orientation of the slider.
1609
+ * @group Props
1610
+ */
1611
+ orientation = input('horizontal', /* @ts-ignore */
1612
+ ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
1613
+ dragging = false;
1614
+ cleanupDrag = null;
1615
+ onAfterViewChecked() {
1616
+ this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
1617
+ }
1618
+ onPointerDown(event) {
1619
+ if (this.$pc.$disabled())
1620
+ return;
1621
+ event.preventDefault();
1622
+ this.dragging = true;
1623
+ const el = this.el.nativeElement;
1624
+ el.setPointerCapture(event.pointerId);
1625
+ this.updateFromPointer(event);
1626
+ const onMove = (e) => {
1627
+ if (!this.dragging)
1628
+ return;
1629
+ e.preventDefault();
1630
+ this.updateFromPointer(e);
1631
+ };
1632
+ const cleanup = () => {
1633
+ this.dragging = false;
1634
+ this.cleanupDrag = null;
1635
+ el.removeEventListener('pointermove', onMove);
1636
+ el.removeEventListener('pointerup', onUp);
1637
+ el.removeEventListener('pointercancel', onCancel);
1638
+ el.removeEventListener('lostpointercapture', onLostCapture);
1639
+ };
1640
+ this.cleanupDrag = cleanup;
1641
+ const onUp = (e) => {
1642
+ if (!this.dragging)
1643
+ return;
1644
+ this.updateFromPointer(e, true);
1645
+ cleanup();
1646
+ };
1647
+ const onCancel = () => {
1648
+ cleanup();
1649
+ };
1650
+ const onLostCapture = () => {
1651
+ cleanup();
1652
+ };
1653
+ el.addEventListener('pointermove', onMove);
1654
+ el.addEventListener('pointerup', onUp);
1655
+ el.addEventListener('pointercancel', onCancel);
1656
+ el.addEventListener('lostpointercapture', onLostCapture);
1657
+ }
1658
+ ngOnDestroy() {
1659
+ this.cleanupDrag?.();
1660
+ }
1661
+ updateFromPointer(event, isEnd = false) {
1662
+ const el = this.el.nativeElement;
1663
+ const rect = el.getBoundingClientRect();
1664
+ const ch = this.channel();
1665
+ const range = getChannelRange(ch);
1666
+ let percent;
1667
+ if (this.orientation() === 'vertical') {
1668
+ percent = 1 - Math.max(0, Math.min(1, (event.clientY - rect.top) / rect.height));
1669
+ }
1670
+ else {
1671
+ percent = Math.max(0, Math.min(1, (event.clientX - rect.left) / rect.width));
1672
+ }
1673
+ const rawValue = range.minValue + percent * (range.maxValue - range.minValue);
1674
+ const value = snapValue(rawValue, range.minValue, range.maxValue, range.step);
1675
+ this.$pc.setChannelValue(ch, value, event, isEnd);
1676
+ }
1677
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColorSlider, deps: null, target: i0.ɵɵFactoryTarget.Component });
1678
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.3", type: InputColorSlider, isStandalone: true, selector: "p-inputcolor-slider", inputs: { channel: { classPropertyName: "channel", publicName: "channel", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "pointerdown": "onPointerDown($event)" }, properties: { "class": "$pc.cx(\"slider\")", "class.p-inputcolor-slider-horizontal": "orientation() === \"horizontal\"", "class.p-inputcolor-slider-vertical": "orientation() === \"vertical\"", "attr.data-orientation": "orientation()" } }, providers: [
1679
+ { provide: INPUT_COLOR_SLIDER_INSTANCE, useExisting: InputColorSlider },
1680
+ { provide: PARENT_INSTANCE, useExisting: InputColorSlider }
1681
+ ], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1682
+ }
1683
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColorSlider, decorators: [{
1684
+ type: Component,
1685
+ args: [{
1686
+ selector: 'p-inputcolor-slider',
1687
+ standalone: true,
1688
+ template: `<ng-content></ng-content>`,
1689
+ changeDetection: ChangeDetectionStrategy.OnPush,
1690
+ encapsulation: ViewEncapsulation.None,
1691
+ host: {
1692
+ '[class]': '$pc.cx("slider")',
1693
+ '[class.p-inputcolor-slider-horizontal]': 'orientation() === "horizontal"',
1694
+ '[class.p-inputcolor-slider-vertical]': 'orientation() === "vertical"',
1695
+ '[attr.data-orientation]': 'orientation()',
1696
+ '(pointerdown)': 'onPointerDown($event)'
1697
+ },
1698
+ providers: [
1699
+ { provide: INPUT_COLOR_SLIDER_INSTANCE, useExisting: InputColorSlider },
1700
+ { provide: PARENT_INSTANCE, useExisting: InputColorSlider }
1701
+ ],
1702
+ hostDirectives: [Bind]
1703
+ }]
1704
+ }], propDecorators: { channel: [{ type: i0.Input, args: [{ isSignal: true, alias: "channel", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }] } });
1705
+
1706
+ /**
1707
+ * InputColorSliderHandle is a helper component for InputColor component.
1708
+ * @group Components
1709
+ */
1710
+ class InputColorSliderHandle extends BaseComponent {
1711
+ componentName = 'InputColorSliderHandle';
1712
+ bindDirectiveInstance = inject(Bind, { self: true });
1713
+ $pc = inject(INPUT_COLOR_INSTANCE);
1714
+ pcSlider = inject(INPUT_COLOR_SLIDER_INSTANCE);
1715
+ $channel = computed(() => this.pcSlider.channel(), /* @ts-ignore */
1716
+ ...(ngDevMode ? [{ debugName: "$channel" }] : /* istanbul ignore next */ []));
1717
+ $isVertical = computed(() => this.pcSlider.orientation() === 'vertical', /* @ts-ignore */
1718
+ ...(ngDevMode ? [{ debugName: "$isVertical" }] : /* istanbul ignore next */ []));
1719
+ $range = computed(() => getChannelRange(this.$channel()), /* @ts-ignore */
1720
+ ...(ngDevMode ? [{ debugName: "$range" }] : /* istanbul ignore next */ []));
1721
+ $value = computed(() => this.$pc.$color().getChannelValue(this.$channel()), /* @ts-ignore */
1722
+ ...(ngDevMode ? [{ debugName: "$value" }] : /* istanbul ignore next */ []));
1723
+ $tabindex = computed(() => (this.$pc.$disabled() ? -1 : 0), /* @ts-ignore */
1724
+ ...(ngDevMode ? [{ debugName: "$tabindex" }] : /* istanbul ignore next */ []));
1725
+ $ariaDisabled = computed(() => this.$pc.$disabled() || undefined, /* @ts-ignore */
1726
+ ...(ngDevMode ? [{ debugName: "$ariaDisabled" }] : /* istanbul ignore next */ []));
1727
+ $handlePosition = computed(() => {
1728
+ const range = this.$range();
1729
+ const value = this.$value();
1730
+ const pct = ((value - range.minValue) / (range.maxValue - range.minValue)) * 100;
1731
+ return `${pct}%`;
1732
+ }, /* @ts-ignore */
1733
+ ...(ngDevMode ? [{ debugName: "$handlePosition" }] : /* istanbul ignore next */ []));
1734
+ $handlePositionVertical = computed(() => {
1735
+ const range = this.$range();
1736
+ const value = this.$value();
1737
+ const pct = 100 - ((value - range.minValue) / (range.maxValue - range.minValue)) * 100;
1738
+ return `${pct}%`;
1739
+ }, /* @ts-ignore */
1740
+ ...(ngDevMode ? [{ debugName: "$handlePositionVertical" }] : /* istanbul ignore next */ []));
1741
+ $left = computed(() => (this.$isVertical() ? null : this.$handlePosition()), /* @ts-ignore */
1742
+ ...(ngDevMode ? [{ debugName: "$left" }] : /* istanbul ignore next */ []));
1743
+ $top = computed(() => (this.$isVertical() ? this.$handlePositionVertical() : null), /* @ts-ignore */
1744
+ ...(ngDevMode ? [{ debugName: "$top" }] : /* istanbul ignore next */ []));
1745
+ $translate = computed(() => (this.$isVertical() ? '0 -50%' : '-50% 0'), /* @ts-ignore */
1746
+ ...(ngDevMode ? [{ debugName: "$translate" }] : /* istanbul ignore next */ []));
1747
+ $handleColor = computed(() => getChannelColor(this.$pc.$color(), this.$channel()).toRgbString(), /* @ts-ignore */
1748
+ ...(ngDevMode ? [{ debugName: "$handleColor" }] : /* istanbul ignore next */ []));
1749
+ onAfterViewChecked() {
1750
+ this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
1751
+ }
1752
+ onKeyDown(event) {
1753
+ if (this.$pc.$disabled())
1754
+ return;
1755
+ const ch = this.$channel();
1756
+ const range = this.$range();
1757
+ let value = this.$value();
1758
+ let handled = false;
1759
+ switch (event.key) {
1760
+ case 'ArrowRight':
1761
+ case 'ArrowUp':
1762
+ value = Math.min(value + range.step, range.maxValue);
1763
+ handled = true;
1764
+ break;
1765
+ case 'ArrowLeft':
1766
+ case 'ArrowDown':
1767
+ value = Math.max(value - range.step, range.minValue);
1768
+ handled = true;
1769
+ break;
1770
+ case 'PageUp':
1771
+ value = Math.min(value + range.pageStep, range.maxValue);
1772
+ handled = true;
1773
+ break;
1774
+ case 'PageDown':
1775
+ value = Math.max(value - range.pageStep, range.minValue);
1776
+ handled = true;
1777
+ break;
1778
+ case 'Home':
1779
+ value = range.minValue;
1780
+ handled = true;
1781
+ break;
1782
+ case 'End':
1783
+ value = range.maxValue;
1784
+ handled = true;
1785
+ break;
1786
+ }
1787
+ if (handled) {
1788
+ event.preventDefault();
1789
+ this.$pc.setChannelValue(ch, value, event, true);
1790
+ }
1791
+ }
1792
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColorSliderHandle, deps: null, target: i0.ɵɵFactoryTarget.Component });
1793
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.3", type: InputColorSliderHandle, isStandalone: true, selector: "p-inputcolor-slider-handle", host: { listeners: { "keydown": "onKeyDown($event)" }, properties: { "class": "$pc.cx(\"sliderHandle\")", "style.--px-slider-handle-background": "$handleColor()", "style.left": "$left()", "style.top": "$top()", "style.translate": "$translate()", "attr.role": "'slider'", "attr.tabindex": "$tabindex()", "attr.aria-label": "$channel()", "attr.aria-disabled": "$ariaDisabled()", "attr.aria-valuemin": "$range().minValue", "attr.aria-valuemax": "$range().maxValue", "attr.aria-valuenow": "$value()" } }, providers: [{ provide: PARENT_INSTANCE, useExisting: InputColorSliderHandle }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1794
+ }
1795
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColorSliderHandle, decorators: [{
1796
+ type: Component,
1797
+ args: [{
1798
+ selector: 'p-inputcolor-slider-handle',
1799
+ standalone: true,
1800
+ template: `<ng-content></ng-content>`,
1801
+ changeDetection: ChangeDetectionStrategy.OnPush,
1802
+ encapsulation: ViewEncapsulation.None,
1803
+ host: {
1804
+ '[class]': '$pc.cx("sliderHandle")',
1805
+ '[style.--px-slider-handle-background]': '$handleColor()',
1806
+ '[style.left]': '$left()',
1807
+ '[style.top]': '$top()',
1808
+ '[style.translate]': '$translate()',
1809
+ '[attr.role]': "'slider'",
1810
+ '[attr.tabindex]': '$tabindex()',
1811
+ '[attr.aria-label]': '$channel()',
1812
+ '[attr.aria-disabled]': '$ariaDisabled()',
1813
+ '[attr.aria-valuemin]': '$range().minValue',
1814
+ '[attr.aria-valuemax]': '$range().maxValue',
1815
+ '[attr.aria-valuenow]': '$value()',
1816
+ '(keydown)': 'onKeyDown($event)'
1817
+ },
1818
+ providers: [{ provide: PARENT_INSTANCE, useExisting: InputColorSliderHandle }],
1819
+ hostDirectives: [Bind]
1820
+ }]
1821
+ }] });
1822
+
1823
+ /**
1824
+ * InputColorSliderTrack is a helper component for InputColor component.
1825
+ * @group Components
1826
+ */
1827
+ class InputColorSliderTrack extends BaseComponent {
1828
+ componentName = 'InputColorSliderTrack';
1829
+ bindDirectiveInstance = inject(Bind, { self: true });
1830
+ $pc = inject(INPUT_COLOR_INSTANCE);
1831
+ pcSlider = inject(INPUT_COLOR_SLIDER_INSTANCE);
1832
+ $gradient = computed(() => {
1833
+ const ch = this.pcSlider.channel();
1834
+ const color = this.$pc.$color();
1835
+ const orientation = this.pcSlider.orientation();
1836
+ return getChannelGradient(color, ch, orientation);
1837
+ }, /* @ts-ignore */
1838
+ ...(ngDevMode ? [{ debugName: "$gradient" }] : /* istanbul ignore next */ []));
1839
+ onAfterViewChecked() {
1840
+ this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
1841
+ }
1842
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColorSliderTrack, deps: null, target: i0.ɵɵFactoryTarget.Component });
1843
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.3", type: InputColorSliderTrack, isStandalone: true, selector: "p-inputcolor-slider-track", host: { properties: { "class": "$pc.cx(\"sliderTrack\")", "style.--px-slider-background": "$gradient()" } }, providers: [{ provide: PARENT_INSTANCE, useExisting: InputColorSliderTrack }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1844
+ }
1845
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColorSliderTrack, decorators: [{
1846
+ type: Component,
1847
+ args: [{
1848
+ selector: 'p-inputcolor-slider-track',
1849
+ standalone: true,
1850
+ template: `<ng-content></ng-content>`,
1851
+ changeDetection: ChangeDetectionStrategy.OnPush,
1852
+ encapsulation: ViewEncapsulation.None,
1853
+ host: {
1854
+ '[class]': '$pc.cx("sliderTrack")',
1855
+ '[style.--px-slider-background]': '$gradient()'
1856
+ },
1857
+ providers: [{ provide: PARENT_INSTANCE, useExisting: InputColorSliderTrack }],
1858
+ hostDirectives: [Bind]
1859
+ }]
1860
+ }] });
1861
+
1862
+ /**
1863
+ * InputColorSwatch is a helper component for InputColor component.
1864
+ * @group Components
1865
+ */
1866
+ class InputColorSwatch extends BaseComponent {
1867
+ componentName = 'InputColorSwatch';
1868
+ bindDirectiveInstance = inject(Bind, { self: true });
1869
+ $pc = inject(INPUT_COLOR_INSTANCE);
1870
+ onAfterViewChecked() {
1871
+ this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
1872
+ }
1873
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColorSwatch, deps: null, target: i0.ɵɵFactoryTarget.Component });
1874
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.3", type: InputColorSwatch, isStandalone: true, selector: "p-inputcolor-swatch", host: { properties: { "class": "$pc.cx(\"swatch\")" } }, providers: [{ provide: PARENT_INSTANCE, useExisting: InputColorSwatch }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1875
+ }
1876
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColorSwatch, decorators: [{
1877
+ type: Component,
1878
+ args: [{
1879
+ selector: 'p-inputcolor-swatch',
1880
+ standalone: true,
1881
+ template: `<ng-content></ng-content>`,
1882
+ changeDetection: ChangeDetectionStrategy.OnPush,
1883
+ encapsulation: ViewEncapsulation.None,
1884
+ host: {
1885
+ '[class]': '$pc.cx("swatch")'
1886
+ },
1887
+ providers: [{ provide: PARENT_INSTANCE, useExisting: InputColorSwatch }],
1888
+ hostDirectives: [Bind]
1889
+ }]
1890
+ }] });
1891
+
1892
+ /**
1893
+ * InputColorSwatchBackground is a helper component for InputColor component.
1894
+ * @group Components
1895
+ */
1896
+ class InputColorSwatchBackground extends BaseComponent {
1897
+ componentName = 'InputColorSwatchBackground';
1898
+ bindDirectiveInstance = inject(Bind, { self: true });
1899
+ $pc = inject(INPUT_COLOR_INSTANCE);
1900
+ $swatchColor = computed(() => this.$pc.$color().toRgbString(), /* @ts-ignore */
1901
+ ...(ngDevMode ? [{ debugName: "$swatchColor" }] : /* istanbul ignore next */ []));
1902
+ onAfterViewChecked() {
1903
+ this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
1904
+ }
1905
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColorSwatchBackground, deps: null, target: i0.ɵɵFactoryTarget.Component });
1906
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.3", type: InputColorSwatchBackground, isStandalone: true, selector: "p-inputcolor-swatch-background", host: { properties: { "class": "$pc.cx(\"swatchBackground\")", "style.--px-swatch-background": "$swatchColor()" } }, providers: [{ provide: PARENT_INSTANCE, useExisting: InputColorSwatchBackground }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1907
+ }
1908
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColorSwatchBackground, decorators: [{
1909
+ type: Component,
1910
+ args: [{
1911
+ selector: 'p-inputcolor-swatch-background',
1912
+ standalone: true,
1913
+ template: `<ng-content></ng-content>`,
1914
+ changeDetection: ChangeDetectionStrategy.OnPush,
1915
+ encapsulation: ViewEncapsulation.None,
1916
+ host: {
1917
+ '[class]': '$pc.cx("swatchBackground")',
1918
+ '[style.--px-swatch-background]': '$swatchColor()'
1919
+ },
1920
+ providers: [{ provide: PARENT_INSTANCE, useExisting: InputColorSwatchBackground }],
1921
+ hostDirectives: [Bind]
1922
+ }]
1923
+ }] });
1924
+
1925
+ /**
1926
+ * InputColorTransparencyGrid is a helper component for InputColor component.
1927
+ * @group Components
1928
+ */
1929
+ class InputColorTransparencyGrid extends BaseComponent {
1930
+ componentName = 'InputColorTransparencyGrid';
1931
+ bindDirectiveInstance = inject(Bind, { self: true });
1932
+ $pc = inject(INPUT_COLOR_INSTANCE);
1933
+ onAfterViewChecked() {
1934
+ this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
1935
+ }
1936
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColorTransparencyGrid, deps: null, target: i0.ɵɵFactoryTarget.Component });
1937
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.3", type: InputColorTransparencyGrid, isStandalone: true, selector: "p-inputcolor-transparency-grid", host: { properties: { "class": "$pc.cx(\"transparencyGrid\")" } }, providers: [{ provide: PARENT_INSTANCE, useExisting: InputColorTransparencyGrid }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1938
+ }
1939
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColorTransparencyGrid, decorators: [{
1940
+ type: Component,
1941
+ args: [{
1942
+ selector: 'p-inputcolor-transparency-grid',
1943
+ standalone: true,
1944
+ template: `<ng-content></ng-content>`,
1945
+ changeDetection: ChangeDetectionStrategy.OnPush,
1946
+ encapsulation: ViewEncapsulation.None,
1947
+ host: {
1948
+ '[class]': '$pc.cx("transparencyGrid")'
1949
+ },
1950
+ providers: [{ provide: PARENT_INSTANCE, useExisting: InputColorTransparencyGrid }],
1951
+ hostDirectives: [Bind]
1952
+ }]
1953
+ }] });
1954
+
1955
+ const classes = {
1956
+ root: 'p-inputcolor p-component',
1957
+ area: 'p-inputcolor-area',
1958
+ areaHandle: ({ instance }) => ['p-inputcolor-area-handle', { 'p-disabled': instance.$disabled() }],
1959
+ areaBackground: 'p-inputcolor-area-background',
1960
+ slider: 'p-inputcolor-slider',
1961
+ sliderHandle: ({ instance }) => ['p-inputcolor-slider-handle', { 'p-disabled': instance.$disabled() }],
1962
+ sliderTrack: 'p-inputcolor-slider-track',
1963
+ transparencyGrid: 'p-inputcolor-transparency-grid',
1964
+ swatch: 'p-inputcolor-swatch',
1965
+ swatchBackground: 'p-inputcolor-swatch-background',
1966
+ eyeDropper: 'p-inputcolor-eyedropper'
1967
+ };
1968
+ class InputColorStyle extends BaseStyle {
1969
+ name = 'inputcolor';
1970
+ style = style;
1971
+ classes = classes;
1972
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColorStyle, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1973
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColorStyle });
1974
+ }
1975
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColorStyle, decorators: [{
1976
+ type: Injectable
1977
+ }] });
1978
+ /**
1979
+ *
1980
+ * InputColor is a composable color picker component.
1981
+ *
1982
+ * [Live Demo](https://www.primeng.org/inputcolor/)
1983
+ *
1984
+ * @module inputcolorstyle
1985
+ *
1986
+ */
1987
+ var InputColorClasses;
1988
+ (function (InputColorClasses) {
1989
+ /**
1990
+ * Class name of the root element
1991
+ */
1992
+ InputColorClasses["root"] = "p-inputcolor";
1993
+ /**
1994
+ * Class name of the area element
1995
+ */
1996
+ InputColorClasses["area"] = "p-inputcolor-area";
1997
+ /**
1998
+ * Class name of the area background element
1999
+ */
2000
+ InputColorClasses["areaBackground"] = "p-inputcolor-area-background";
2001
+ /**
2002
+ * Class name of the area handle element
2003
+ */
2004
+ InputColorClasses["areaHandle"] = "p-inputcolor-area-handle";
2005
+ /**
2006
+ * Class name of the slider element
2007
+ */
2008
+ InputColorClasses["slider"] = "p-inputcolor-slider";
2009
+ /**
2010
+ * Class name of the slider track element
2011
+ */
2012
+ InputColorClasses["sliderTrack"] = "p-inputcolor-slider-track";
2013
+ /**
2014
+ * Class name of the slider handle element
2015
+ */
2016
+ InputColorClasses["sliderHandle"] = "p-inputcolor-slider-handle";
2017
+ /**
2018
+ * Class name of the swatch element
2019
+ */
2020
+ InputColorClasses["swatch"] = "p-inputcolor-swatch";
2021
+ /**
2022
+ * Class name of the swatch background element
2023
+ */
2024
+ InputColorClasses["swatchBackground"] = "p-inputcolor-swatch-background";
2025
+ /**
2026
+ * Class name of the transparency grid element
2027
+ */
2028
+ InputColorClasses["transparencyGrid"] = "p-inputcolor-transparency-grid";
2029
+ /**
2030
+ * Class name of the input element
2031
+ */
2032
+ InputColorClasses["input"] = "p-inputcolor-input";
2033
+ /**
2034
+ * Class name of the eye dropper element
2035
+ */
2036
+ InputColorClasses["eyeDropper"] = "p-inputcolor-eyedropper";
2037
+ })(InputColorClasses || (InputColorClasses = {}));
2038
+
2039
+ const INPUT_COLOR_VALUE_ACCESSOR = {
2040
+ provide: NG_VALUE_ACCESSOR,
2041
+ useExisting: forwardRef(() => InputColor),
2042
+ multi: true
2043
+ };
2044
+ /**
2045
+ * InputColor is a composable color picker component.
2046
+ * @group Components
2047
+ */
2048
+ class InputColor extends BaseComponent {
2049
+ componentName = 'InputColor';
2050
+ bindDirectiveInstance = inject(Bind, { self: true });
2051
+ _componentStyle = inject(InputColorStyle);
2052
+ /**
2053
+ * Color format/space used internally.
2054
+ * @group Props
2055
+ */
2056
+ format = input('hsba', /* @ts-ignore */
2057
+ ...(ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []));
2058
+ /**
2059
+ * When present, it specifies that the component should be disabled.
2060
+ * @group Props
2061
+ */
2062
+ disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
2063
+ _disabled = signal(false, /* @ts-ignore */
2064
+ ...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
2065
+ $disabled = computed(() => this.disabled() || this._disabled(), /* @ts-ignore */
2066
+ ...(ngDevMode ? [{ debugName: "$disabled" }] : /* istanbul ignore next */ []));
2067
+ /**
2068
+ * Callback on value change (during interaction).
2069
+ * @group Emits
2070
+ */
2071
+ onValueChange = output();
2072
+ /**
2073
+ * Callback when interaction ends (mouseup/touchend/keyup).
2074
+ * @group Emits
2075
+ */
2076
+ onValueChangeEnd = output();
2077
+ // Internal color state
2078
+ _color = signal(null, /* @ts-ignore */
2079
+ ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
2080
+ // Computed color - resolved from internal state or fallback
2081
+ $color = computed(() => {
2082
+ return this._color() || parseColor('#ff0000').toFormat(this.format());
2083
+ }, /* @ts-ignore */
2084
+ ...(ngDevMode ? [{ debugName: "$color" }] : /* istanbul ignore next */ []));
2085
+ // Computed 2D axes based on format
2086
+ $axes = computed(() => getDefault2DAxes(this.format()), /* @ts-ignore */
2087
+ ...(ngDevMode ? [{ debugName: "$axes" }] : /* istanbul ignore next */ []));
2088
+ onAfterViewChecked() {
2089
+ this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
2090
+ }
2091
+ /**
2092
+ * Update color and emit changes
2093
+ */
2094
+ updateColor(color, event, isEnd = false) {
2095
+ this._color.set(color);
2096
+ const outputValue = color.toString(this.format());
2097
+ this.onModelChange(outputValue);
2098
+ this.onValueChange.emit({ color, originalEvent: event });
2099
+ if (isEnd) {
2100
+ this.onValueChangeEnd.emit({ color, originalEvent: event });
2101
+ this.onModelTouched();
2102
+ }
2103
+ }
2104
+ /**
2105
+ * Set a specific channel value
2106
+ */
2107
+ setChannelValue(channel, value, event, isEnd = false) {
2108
+ const color = this.toChannelNativeFormat(this.$color(), channel);
2109
+ const newColor = color.setChannelValue(channel, value);
2110
+ this.updateColor(newColor, event, isEnd);
2111
+ }
2112
+ onModelChange = () => { };
2113
+ onModelTouched = () => { };
2114
+ registerOnChange(fn) {
2115
+ this.onModelChange = fn;
2116
+ }
2117
+ registerOnTouched(fn) {
2118
+ this.onModelTouched = fn;
2119
+ }
2120
+ setDisabledState(val) {
2121
+ this._disabled.set(val);
2122
+ }
2123
+ writeValue(value) {
2124
+ if (value) {
2125
+ const current = this._color();
2126
+ if (current && current.toString(this.format()) === value) {
2127
+ return;
2128
+ }
2129
+ const parsed = parseColor(value);
2130
+ if (parsed) {
2131
+ this._color.set(parsed.toFormat(this.format()));
2132
+ }
2133
+ }
2134
+ else {
2135
+ this._color.set(null);
2136
+ }
2137
+ }
2138
+ toChannelNativeFormat(color, channel) {
2139
+ // If the current color natively supports this channel, don't convert
2140
+ if (color instanceof HSBColor && (channel === 'hue' || channel === 'saturation' || channel === 'brightness'))
2141
+ return color;
2142
+ if (color instanceof HSLColor && (channel === 'hue' || channel === 'saturation' || channel === 'lightness'))
2143
+ return color;
2144
+ if (color instanceof RGBColor && (channel === 'red' || channel === 'green' || channel === 'blue'))
2145
+ return color;
2146
+ if (color instanceof OKLCHColor && (channel === 'oklchLightness' || channel === 'oklchChroma' || channel === 'oklchHue' || channel === 'L' || channel === 'C' || channel === 'H'))
2147
+ return color;
2148
+ // Otherwise convert to the appropriate format
2149
+ switch (channel) {
2150
+ case 'hue':
2151
+ case 'saturation':
2152
+ case 'brightness':
2153
+ return color.toHSB();
2154
+ case 'lightness':
2155
+ return color.toHSL();
2156
+ case 'red':
2157
+ case 'green':
2158
+ case 'blue':
2159
+ return color.toRGB();
2160
+ case 'oklchLightness':
2161
+ case 'oklchChroma':
2162
+ case 'oklchHue':
2163
+ case 'L':
2164
+ case 'C':
2165
+ case 'H':
2166
+ return color.toOKLCH();
2167
+ case 'alpha':
2168
+ default:
2169
+ return color;
2170
+ }
2171
+ }
2172
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColor, deps: null, target: i0.ɵɵFactoryTarget.Component });
2173
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.3", type: InputColor, isStandalone: true, selector: "p-inputcolor, p-input-color", inputs: { format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onValueChange: "onValueChange", onValueChangeEnd: "onValueChangeEnd" }, host: { properties: { "attr.data-pc-name": "'inputcolor'", "attr.data-pc-section": "'root'", "class": "cx('root')" } }, providers: [INPUT_COLOR_VALUE_ACCESSOR, InputColorStyle, { provide: INPUT_COLOR_INSTANCE, useExisting: InputColor }, { provide: PARENT_INSTANCE, useExisting: InputColor }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, dependencies: [{ kind: "ngmodule", type: SharedModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
2174
+ }
2175
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColor, decorators: [{
2176
+ type: Component,
2177
+ args: [{
2178
+ selector: 'p-inputcolor, p-input-color',
2179
+ standalone: true,
2180
+ imports: [SharedModule],
2181
+ template: `<ng-content></ng-content>`,
2182
+ providers: [INPUT_COLOR_VALUE_ACCESSOR, InputColorStyle, { provide: INPUT_COLOR_INSTANCE, useExisting: InputColor }, { provide: PARENT_INSTANCE, useExisting: InputColor }],
2183
+ changeDetection: ChangeDetectionStrategy.OnPush,
2184
+ encapsulation: ViewEncapsulation.None,
2185
+ host: {
2186
+ '[attr.data-pc-name]': "'inputcolor'",
2187
+ '[attr.data-pc-section]': "'root'",
2188
+ '[class]': "cx('root')"
2189
+ },
2190
+ hostDirectives: [Bind]
2191
+ }]
2192
+ }], propDecorators: { format: [{ type: i0.Input, args: [{ isSignal: true, alias: "format", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], onValueChange: [{ type: i0.Output, args: ["onValueChange"] }], onValueChangeEnd: [{ type: i0.Output, args: ["onValueChangeEnd"] }] } });
2193
+ class InputColorModule {
2194
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2195
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.3", ngImport: i0, type: InputColorModule, imports: [InputColor, InputColorArea,
2196
+ InputColorAreaHandle,
2197
+ InputColorAreaBackground,
2198
+ InputColorSlider,
2199
+ InputColorSliderHandle,
2200
+ InputColorSliderTrack,
2201
+ InputColorSwatch,
2202
+ InputColorSwatchBackground,
2203
+ InputColorTransparencyGrid,
2204
+ InputColorInput,
2205
+ InputColorEyeDropper,
2206
+ SharedModule], exports: [InputColor, InputColorArea,
2207
+ InputColorAreaHandle,
2208
+ InputColorAreaBackground,
2209
+ InputColorSlider,
2210
+ InputColorSliderHandle,
2211
+ InputColorSliderTrack,
2212
+ InputColorSwatch,
2213
+ InputColorSwatchBackground,
2214
+ InputColorTransparencyGrid,
2215
+ InputColorInput,
2216
+ InputColorEyeDropper,
2217
+ SharedModule] });
2218
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColorModule, imports: [InputColor,
2219
+ SharedModule, SharedModule] });
2220
+ }
2221
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: InputColorModule, decorators: [{
2222
+ type: NgModule,
2223
+ args: [{
2224
+ imports: [
2225
+ InputColor,
2226
+ InputColorArea,
2227
+ InputColorAreaHandle,
2228
+ InputColorAreaBackground,
2229
+ InputColorSlider,
2230
+ InputColorSliderHandle,
2231
+ InputColorSliderTrack,
2232
+ InputColorSwatch,
2233
+ InputColorSwatchBackground,
2234
+ InputColorTransparencyGrid,
2235
+ InputColorInput,
2236
+ InputColorEyeDropper,
2237
+ SharedModule
2238
+ ],
2239
+ exports: [
2240
+ InputColor,
2241
+ InputColorArea,
2242
+ InputColorAreaHandle,
2243
+ InputColorAreaBackground,
2244
+ InputColorSlider,
2245
+ InputColorSliderHandle,
2246
+ InputColorSliderTrack,
2247
+ InputColorSwatch,
2248
+ InputColorSwatchBackground,
2249
+ InputColorTransparencyGrid,
2250
+ InputColorInput,
2251
+ InputColorEyeDropper,
2252
+ SharedModule
2253
+ ]
2254
+ }]
2255
+ }] });
2256
+
2257
+ /**
2258
+ * Generated bundle index. Do not edit.
2259
+ */
2260
+
2261
+ export { Color, HSBColor, HSLColor, INPUT_COLOR_INSTANCE, INPUT_COLOR_SLIDER_INSTANCE, INPUT_COLOR_VALUE_ACCESSOR, InputColor, InputColorArea, InputColorAreaBackground, InputColorAreaHandle, InputColorClasses, InputColorEyeDropper, InputColorInput, InputColorModule, InputColorSlider, InputColorSliderHandle, InputColorSliderTrack, InputColorStyle, InputColorSwatch, InputColorSwatchBackground, InputColorTransparencyGrid, OKLCHColor, RGBColor, getAreaGradient, getChannelColor, getChannelGradient, getChannelRange, getDefault2DAxes, getDefault3DAxes, getInputChannelRange, getInputChannelValue, parseColor, snapValue };
2262
+ //# sourceMappingURL=primenglab-inputcolor.mjs.map