@solidstarters/solid-core-ui 1.0.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (276) hide show
  1. package/dist/components/auth/SolidForgotPassword.d.ts +3 -0
  2. package/dist/components/auth/SolidForgotPassword.d.ts.map +1 -0
  3. package/dist/components/auth/SolidForgotPassword.js +108 -0
  4. package/dist/components/auth/SolidForgotPassword.js.map +1 -0
  5. package/dist/components/auth/SolidLogin.d.ts +3 -0
  6. package/dist/components/auth/SolidLogin.d.ts.map +1 -0
  7. package/dist/components/auth/SolidLogin.js +115 -0
  8. package/dist/components/auth/SolidLogin.js.map +1 -0
  9. package/dist/components/auth/SolidOTPVerify.d.ts +3 -0
  10. package/dist/components/auth/SolidOTPVerify.d.ts.map +1 -0
  11. package/dist/components/auth/SolidOTPVerify.js +108 -0
  12. package/dist/components/auth/SolidOTPVerify.js.map +1 -0
  13. package/dist/components/auth/SolidRegister.d.ts +3 -0
  14. package/dist/components/auth/SolidRegister.d.ts.map +1 -0
  15. package/dist/components/auth/SolidRegister.js +166 -0
  16. package/dist/components/auth/SolidRegister.js.map +1 -0
  17. package/dist/components/auth/SolidResetPassword.d.ts +3 -0
  18. package/dist/components/auth/SolidResetPassword.d.ts.map +1 -0
  19. package/dist/components/auth/SolidResetPassword.js +119 -0
  20. package/dist/components/auth/SolidResetPassword.js.map +1 -0
  21. package/dist/components/core/common/FilterComponent.d.ts +33 -1
  22. package/dist/components/core/common/FilterComponent.d.ts.map +1 -1
  23. package/dist/components/core/common/FilterComponent.js +26 -25
  24. package/dist/components/core/common/FilterComponent.js.map +1 -1
  25. package/dist/components/core/common/SolidConfigureLayoutElement.d.ts.map +1 -1
  26. package/dist/components/core/common/SolidConfigureLayoutElement.js +3 -3
  27. package/dist/components/core/common/SolidConfigureLayoutElement.js.map +1 -1
  28. package/dist/components/core/common/SolidCreateButton.js +1 -1
  29. package/dist/components/core/common/SolidCreateButton.js.map +1 -1
  30. package/dist/components/core/common/SolidGlobalSearchElement.d.ts +1 -1
  31. package/dist/components/core/common/SolidGlobalSearchElement.d.ts.map +1 -1
  32. package/dist/components/core/common/SolidGlobalSearchElement.js +14 -9
  33. package/dist/components/core/common/SolidGlobalSearchElement.js.map +1 -1
  34. package/dist/components/core/common/SolidLayoutViews.d.ts +19 -0
  35. package/dist/components/core/common/SolidLayoutViews.d.ts.map +1 -0
  36. package/dist/components/core/common/SolidLayoutViews.js +14 -0
  37. package/dist/components/core/common/SolidLayoutViews.js.map +1 -0
  38. package/dist/components/core/common/SolidListViewOptions.d.ts +2 -0
  39. package/dist/components/core/common/SolidListViewOptions.d.ts.map +1 -0
  40. package/dist/components/core/common/SolidListViewOptions.js +11 -0
  41. package/dist/components/core/common/SolidListViewOptions.js.map +1 -0
  42. package/dist/components/core/filter/SolidManyToOneFilterElement.js +1 -1
  43. package/dist/components/core/filter/SolidManyToOneFilterElement.js.map +1 -1
  44. package/dist/components/core/filter/columns/SolidBigintField.d.ts +4 -0
  45. package/dist/components/core/filter/columns/SolidBigintField.d.ts.map +1 -0
  46. package/dist/components/core/filter/columns/SolidBigintField.js +8 -0
  47. package/dist/components/core/filter/columns/SolidBigintField.js.map +1 -0
  48. package/dist/components/core/filter/columns/SolidBooleanField.d.ts +4 -0
  49. package/dist/components/core/filter/columns/SolidBooleanField.d.ts.map +1 -0
  50. package/dist/components/core/filter/columns/SolidBooleanField.js +27 -0
  51. package/dist/components/core/filter/columns/SolidBooleanField.js.map +1 -0
  52. package/dist/components/core/filter/columns/SolidComputedField.d.ts +4 -0
  53. package/dist/components/core/filter/columns/SolidComputedField.d.ts.map +1 -0
  54. package/dist/components/core/filter/columns/SolidComputedField.js +22 -0
  55. package/dist/components/core/filter/columns/SolidComputedField.js.map +1 -0
  56. package/dist/components/core/filter/columns/SolidDateField.d.ts +9 -0
  57. package/dist/components/core/filter/columns/SolidDateField.d.ts.map +1 -0
  58. package/dist/components/core/filter/columns/SolidDateField.js +35 -0
  59. package/dist/components/core/filter/columns/SolidDateField.js.map +1 -0
  60. package/dist/components/core/filter/columns/SolidDatetimeField.d.ts +4 -0
  61. package/dist/components/core/filter/columns/SolidDatetimeField.d.ts.map +1 -0
  62. package/dist/components/core/filter/columns/SolidDatetimeField.js +24 -0
  63. package/dist/components/core/filter/columns/SolidDatetimeField.js.map +1 -0
  64. package/dist/components/core/filter/columns/SolidDecimalField.d.ts +4 -0
  65. package/dist/components/core/filter/columns/SolidDecimalField.d.ts.map +1 -0
  66. package/dist/components/core/filter/columns/SolidDecimalField.js +8 -0
  67. package/dist/components/core/filter/columns/SolidDecimalField.js.map +1 -0
  68. package/dist/components/core/filter/columns/SolidExternalIdField.d.ts +4 -0
  69. package/dist/components/core/filter/columns/SolidExternalIdField.d.ts.map +1 -0
  70. package/dist/components/core/filter/columns/SolidExternalIdField.js +25 -0
  71. package/dist/components/core/filter/columns/SolidExternalIdField.js.map +1 -0
  72. package/dist/components/core/filter/columns/SolidFloatField.d.ts +4 -0
  73. package/dist/components/core/filter/columns/SolidFloatField.d.ts.map +1 -0
  74. package/dist/components/core/filter/columns/SolidFloatField.js +8 -0
  75. package/dist/components/core/filter/columns/SolidFloatField.js.map +1 -0
  76. package/dist/components/core/filter/columns/SolidIdField.d.ts +4 -0
  77. package/dist/components/core/filter/columns/SolidIdField.d.ts.map +1 -0
  78. package/dist/components/core/filter/columns/SolidIdField.js +25 -0
  79. package/dist/components/core/filter/columns/SolidIdField.js.map +1 -0
  80. package/dist/components/core/filter/columns/SolidIntField.d.ts +4 -0
  81. package/dist/components/core/filter/columns/SolidIntField.d.ts.map +1 -0
  82. package/dist/components/core/filter/columns/SolidIntField.js +34 -0
  83. package/dist/components/core/filter/columns/SolidIntField.js.map +1 -0
  84. package/dist/components/core/filter/columns/SolidLongTextField.d.ts +4 -0
  85. package/dist/components/core/filter/columns/SolidLongTextField.d.ts.map +1 -0
  86. package/dist/components/core/filter/columns/SolidLongTextField.js +8 -0
  87. package/dist/components/core/filter/columns/SolidLongTextField.js.map +1 -0
  88. package/dist/components/core/filter/columns/SolidMediaMultipleField.d.ts +4 -0
  89. package/dist/components/core/filter/columns/SolidMediaMultipleField.d.ts.map +1 -0
  90. package/dist/components/core/filter/columns/SolidMediaMultipleField.js +35 -0
  91. package/dist/components/core/filter/columns/SolidMediaMultipleField.js.map +1 -0
  92. package/dist/components/core/filter/columns/SolidMediaSingleField.d.ts +4 -0
  93. package/dist/components/core/filter/columns/SolidMediaSingleField.d.ts.map +1 -0
  94. package/dist/components/core/filter/columns/SolidMediaSingleField.js +35 -0
  95. package/dist/components/core/filter/columns/SolidMediaSingleField.js.map +1 -0
  96. package/dist/components/core/filter/columns/SolidRelationField.d.ts +4 -0
  97. package/dist/components/core/filter/columns/SolidRelationField.d.ts.map +1 -0
  98. package/dist/components/core/filter/columns/SolidRelationField.js +12 -0
  99. package/dist/components/core/filter/columns/SolidRelationField.js.map +1 -0
  100. package/dist/components/core/filter/columns/SolidRichTextField.d.ts +4 -0
  101. package/dist/components/core/filter/columns/SolidRichTextField.d.ts.map +1 -0
  102. package/dist/components/core/filter/columns/SolidRichTextField.js +8 -0
  103. package/dist/components/core/filter/columns/SolidRichTextField.js.map +1 -0
  104. package/dist/components/core/filter/columns/SolidSelectionDynamicField.d.ts +4 -0
  105. package/dist/components/core/filter/columns/SolidSelectionDynamicField.d.ts.map +1 -0
  106. package/dist/components/core/filter/columns/SolidSelectionDynamicField.js +25 -0
  107. package/dist/components/core/filter/columns/SolidSelectionDynamicField.js.map +1 -0
  108. package/dist/components/core/filter/columns/SolidSelectionStaticField.d.ts +4 -0
  109. package/dist/components/core/filter/columns/SolidSelectionStaticField.d.ts.map +1 -0
  110. package/dist/components/core/filter/columns/SolidSelectionStaticField.js +26 -0
  111. package/dist/components/core/filter/columns/SolidSelectionStaticField.js.map +1 -0
  112. package/dist/components/core/filter/columns/SolidShortTextField.d.ts +4 -0
  113. package/dist/components/core/filter/columns/SolidShortTextField.d.ts.map +1 -0
  114. package/dist/components/core/filter/columns/SolidShortTextField.js +33 -0
  115. package/dist/components/core/filter/columns/SolidShortTextField.js.map +1 -0
  116. package/dist/components/core/filter/columns/SolidTimeField.d.ts +4 -0
  117. package/dist/components/core/filter/columns/SolidTimeField.d.ts.map +1 -0
  118. package/dist/components/core/filter/columns/SolidTimeField.js +24 -0
  119. package/dist/components/core/filter/columns/SolidTimeField.js.map +1 -0
  120. package/dist/components/core/filter/columns/SolidUuidField.d.ts +4 -0
  121. package/dist/components/core/filter/columns/SolidUuidField.d.ts.map +1 -0
  122. package/dist/components/core/filter/columns/SolidUuidField.js +25 -0
  123. package/dist/components/core/filter/columns/SolidUuidField.js.map +1 -0
  124. package/dist/components/core/filter/columns/relations/SolidRelationManyToOneField.d.ts +4 -0
  125. package/dist/components/core/filter/columns/relations/SolidRelationManyToOneField.d.ts.map +1 -0
  126. package/dist/components/core/filter/columns/relations/SolidRelationManyToOneField.js +54 -0
  127. package/dist/components/core/filter/columns/relations/SolidRelationManyToOneField.js.map +1 -0
  128. package/dist/components/core/kanban/KanbanBoard.d.ts +1 -1
  129. package/dist/components/core/kanban/KanbanBoard.d.ts.map +1 -1
  130. package/dist/components/core/kanban/KanbanBoard.js +11 -11
  131. package/dist/components/core/kanban/KanbanBoard.js.map +1 -1
  132. package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
  133. package/dist/components/core/kanban/SolidKanbanView.js +113 -202
  134. package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
  135. package/dist/components/core/list/SolidListView.d.ts.map +1 -1
  136. package/dist/components/core/list/SolidListView.js +312 -62
  137. package/dist/components/core/list/SolidListView.js.map +1 -1
  138. package/dist/components/core/list/SolidManyToOneFilterElement.js +2 -3
  139. package/dist/components/core/list/SolidManyToOneFilterElement.js.map +1 -1
  140. package/dist/components/core/list/columns/SolidBooleanColumn.js +3 -1
  141. package/dist/components/core/list/columns/SolidBooleanColumn.js.map +1 -1
  142. package/dist/components/core/list/columns/SolidSelectionStaticColumn.js +3 -1
  143. package/dist/components/core/list/columns/SolidSelectionStaticColumn.js.map +1 -1
  144. package/dist/components/core/list/columns/SolidShortTextColumn.d.ts.map +1 -1
  145. package/dist/components/core/list/columns/SolidShortTextColumn.js +5 -1
  146. package/dist/components/core/list/columns/SolidShortTextColumn.js.map +1 -1
  147. package/dist/components/core/list/columns/SolidTimeColumn.js +3 -1
  148. package/dist/components/core/list/columns/SolidTimeColumn.js.map +1 -1
  149. package/dist/components/core/list/columns/SolidUuidColumn.js +3 -1
  150. package/dist/components/core/list/columns/SolidUuidColumn.js.map +1 -1
  151. package/dist/components/layout/AppConfig.d.ts +4 -0
  152. package/dist/components/layout/AppConfig.d.ts.map +1 -0
  153. package/dist/components/layout/AppConfig.js +57 -0
  154. package/dist/components/layout/AppConfig.js.map +1 -0
  155. package/dist/components/layout/AppSidebar.d.ts +3 -0
  156. package/dist/components/layout/AppSidebar.d.ts.map +1 -0
  157. package/dist/components/layout/AppSidebar.js +75 -0
  158. package/dist/components/layout/AppSidebar.js.map +1 -0
  159. package/dist/components/layout/CustomPagination.d.ts +0 -6
  160. package/dist/components/layout/CustomPagination.d.ts.map +1 -1
  161. package/dist/components/layout/CustomPagination.js +48 -27
  162. package/dist/components/layout/CustomPagination.js.map +1 -1
  163. package/dist/components/layout/FilterMenu.d.ts.map +1 -1
  164. package/dist/components/layout/FilterMenu.js +1 -2
  165. package/dist/components/layout/FilterMenu.js.map +1 -1
  166. package/dist/components/layout/context/layoutcontext.d.ts +5 -0
  167. package/dist/components/layout/context/layoutcontext.d.ts.map +1 -0
  168. package/dist/components/layout/context/layoutcontext.js +56 -0
  169. package/dist/components/layout/context/layoutcontext.js.map +1 -0
  170. package/dist/components/layout/navbar-two-menu.d.ts.map +1 -1
  171. package/dist/components/layout/navbar-two-menu.js +5 -5
  172. package/dist/components/layout/navbar-two-menu.js.map +1 -1
  173. package/dist/components/layout/user-profile-menu.d.ts.map +1 -1
  174. package/dist/components/layout/user-profile-menu.js +37 -5
  175. package/dist/components/layout/user-profile-menu.js.map +1 -1
  176. package/dist/components/modelsComponents/filterIcon.d.ts.map +1 -1
  177. package/dist/components/modelsComponents/filterIcon.js.map +1 -1
  178. package/dist/components/tables/ListViewTable.d.ts.map +1 -1
  179. package/dist/components/tables/ListViewTable.js +2 -1
  180. package/dist/components/tables/ListViewTable.js.map +1 -1
  181. package/dist/helpers/helpers.d.ts +1 -1
  182. package/dist/helpers/helpers.d.ts.map +1 -1
  183. package/dist/index.d.ts +19 -14
  184. package/dist/index.d.ts.map +1 -1
  185. package/dist/index.js +40 -32
  186. package/dist/index.js.map +1 -1
  187. package/package.json +2 -1
  188. package/src/components/auth/SolidForgotPassword.tsx +124 -0
  189. package/src/components/auth/SolidLogin.tsx +156 -0
  190. package/src/components/auth/SolidOTPVerify.tsx +127 -0
  191. package/src/components/auth/SolidRegister.tsx +221 -0
  192. package/src/components/auth/SolidResetPassword.tsx +160 -0
  193. package/src/components/core/common/FilterComponent.tsx +45 -40
  194. package/src/components/core/common/SolidConfigureLayoutElement.tsx +11 -10
  195. package/src/components/core/common/SolidCreateButton.tsx +1 -1
  196. package/src/components/core/common/SolidGlobalSearchElement.tsx +33 -13
  197. package/src/components/core/common/SolidLayoutViews.tsx +87 -0
  198. package/src/components/core/common/SolidListViewOptions.tsx +31 -0
  199. package/src/components/core/filter/SolidManyToOneFilterElement.tsx +1 -1
  200. package/src/components/core/kanban/KanbanBoard.tsx +7 -4
  201. package/src/components/core/kanban/SolidKanbanView.tsx +110 -248
  202. package/src/components/core/list/SolidListView.tsx +421 -96
  203. package/src/components/core/list/SolidManyToOneFilterElement.tsx +3 -3
  204. package/src/components/core/list/columns/SolidBooleanColumn.tsx +1 -1
  205. package/src/components/core/list/columns/SolidSelectionStaticColumn.tsx +1 -1
  206. package/src/components/core/list/columns/SolidShortTextColumn.tsx +8 -3
  207. package/src/components/core/list/columns/SolidTimeColumn.tsx +1 -1
  208. package/src/components/core/list/columns/SolidUuidColumn.tsx +1 -1
  209. package/src/components/layout/AppConfig.tsx +103 -0
  210. package/src/components/layout/AppSidebar.tsx +170 -0
  211. package/src/components/layout/CustomPagination.tsx +55 -55
  212. package/src/components/layout/FilterMenu.tsx +1 -2
  213. package/src/components/layout/context/layoutcontext.tsx +52 -0
  214. package/src/components/layout/navbar-two-menu.tsx +12 -9
  215. package/src/components/layout/user-profile-menu.tsx +74 -189
  216. package/src/components/modelsComponents/filterIcon.tsx +0 -1
  217. package/src/components/tables/ListViewTable.tsx +4 -3
  218. package/src/index.ts +157 -144
  219. package/src/types/index.d.ts +26 -0
  220. package/src/types/layout.d.ts +94 -0
  221. package/src/types/next-auth.d.ts +0 -0
  222. package/dist/components/core/kanban/SolidKanbanFilter.d.ts +0 -2
  223. package/dist/components/core/kanban/SolidKanbanFilter.d.ts.map +0 -1
  224. package/dist/components/core/kanban/SolidKanbanViewSearchColumn.d.ts +0 -10
  225. package/dist/components/core/kanban/SolidKanbanViewSearchColumn.d.ts.map +0 -1
  226. package/dist/components/core/kanban/SolidManyToOneFilterElement.d.ts +0 -2
  227. package/dist/components/core/kanban/SolidManyToOneFilterElement.d.ts.map +0 -1
  228. package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.d.ts +0 -2
  229. package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.d.ts.map +0 -1
  230. package/dist/components/core/kanban/SolidSelectionStaticFilterElement.d.ts +0 -2
  231. package/dist/components/core/kanban/SolidSelectionStaticFilterElement.d.ts.map +0 -1
  232. package/dist/components/core/kanban/SolidVarInputsFilterElement.d.ts +0 -12
  233. package/dist/components/core/kanban/SolidVarInputsFilterElement.d.ts.map +0 -1
  234. package/dist/components/core/kanban/columns/SolidBigintColumn.d.ts +0 -4
  235. package/dist/components/core/kanban/columns/SolidBigintColumn.d.ts.map +0 -1
  236. package/dist/components/core/kanban/columns/SolidBooleanColumn.d.ts +0 -4
  237. package/dist/components/core/kanban/columns/SolidBooleanColumn.d.ts.map +0 -1
  238. package/dist/components/core/kanban/columns/SolidComputedColumn.d.ts +0 -4
  239. package/dist/components/core/kanban/columns/SolidComputedColumn.d.ts.map +0 -1
  240. package/dist/components/core/kanban/columns/SolidDateColumn.d.ts +0 -9
  241. package/dist/components/core/kanban/columns/SolidDateColumn.d.ts.map +0 -1
  242. package/dist/components/core/kanban/columns/SolidDatetimeColumn.d.ts +0 -4
  243. package/dist/components/core/kanban/columns/SolidDatetimeColumn.d.ts.map +0 -1
  244. package/dist/components/core/kanban/columns/SolidDecimalColumn.d.ts +0 -4
  245. package/dist/components/core/kanban/columns/SolidDecimalColumn.d.ts.map +0 -1
  246. package/dist/components/core/kanban/columns/SolidExternalIdColumn.d.ts +0 -4
  247. package/dist/components/core/kanban/columns/SolidExternalIdColumn.d.ts.map +0 -1
  248. package/dist/components/core/kanban/columns/SolidFloatColumn.d.ts +0 -4
  249. package/dist/components/core/kanban/columns/SolidFloatColumn.d.ts.map +0 -1
  250. package/dist/components/core/kanban/columns/SolidIdColumn.d.ts +0 -4
  251. package/dist/components/core/kanban/columns/SolidIdColumn.d.ts.map +0 -1
  252. package/dist/components/core/kanban/columns/SolidIntColumn.d.ts +0 -4
  253. package/dist/components/core/kanban/columns/SolidIntColumn.d.ts.map +0 -1
  254. package/dist/components/core/kanban/columns/SolidLongTextColumn.d.ts +0 -4
  255. package/dist/components/core/kanban/columns/SolidLongTextColumn.d.ts.map +0 -1
  256. package/dist/components/core/kanban/columns/SolidMediaMultipleColumn.d.ts +0 -4
  257. package/dist/components/core/kanban/columns/SolidMediaMultipleColumn.d.ts.map +0 -1
  258. package/dist/components/core/kanban/columns/SolidMediaSingleColumn.d.ts +0 -4
  259. package/dist/components/core/kanban/columns/SolidMediaSingleColumn.d.ts.map +0 -1
  260. package/dist/components/core/kanban/columns/SolidRelationColumn.d.ts +0 -4
  261. package/dist/components/core/kanban/columns/SolidRelationColumn.d.ts.map +0 -1
  262. package/dist/components/core/kanban/columns/SolidRichTextColumn.d.ts +0 -4
  263. package/dist/components/core/kanban/columns/SolidRichTextColumn.d.ts.map +0 -1
  264. package/dist/components/core/kanban/columns/SolidSelectionDynamicColumn.d.ts +0 -4
  265. package/dist/components/core/kanban/columns/SolidSelectionDynamicColumn.d.ts.map +0 -1
  266. package/dist/components/core/kanban/columns/SolidSelectionStaticColumn.d.ts +0 -4
  267. package/dist/components/core/kanban/columns/SolidSelectionStaticColumn.d.ts.map +0 -1
  268. package/dist/components/core/kanban/columns/SolidShortTextColumn.d.ts +0 -4
  269. package/dist/components/core/kanban/columns/SolidShortTextColumn.d.ts.map +0 -1
  270. package/dist/components/core/kanban/columns/SolidTimeColumn.d.ts +0 -4
  271. package/dist/components/core/kanban/columns/SolidTimeColumn.d.ts.map +0 -1
  272. package/dist/components/core/kanban/columns/SolidUuidColumn.d.ts +0 -4
  273. package/dist/components/core/kanban/columns/SolidUuidColumn.d.ts.map +0 -1
  274. package/dist/components/core/kanban/columns/relations/SolidRelationManyToOneColumn.d.ts +0 -4
  275. package/dist/components/core/kanban/columns/relations/SolidRelationManyToOneColumn.d.ts.map +0 -1
  276. package/src/components/common/FilterComponent.tsx +0 -428
@@ -0,0 +1,124 @@
1
+ "use client";
2
+
3
+ import { Form, Formik } from "formik";
4
+ import { signIn } from "next-auth/react";
5
+ import Link from "next/link";
6
+ import { useRouter } from "next/navigation";
7
+ import { Button } from "primereact/button";
8
+ import { InputText } from "primereact/inputtext";
9
+ import { Message } from "primereact/message";
10
+ import { Toast } from "primereact/toast";
11
+ import { useContext, useRef, useState } from "react";
12
+ import * as Yup from "yup";
13
+ import { LayoutContext } from "../layout/context/layoutcontext";
14
+
15
+
16
+ const SolidForgotPassword = () => {
17
+ const { layoutConfig } = useContext(LayoutContext);
18
+ const { authLayout } = layoutConfig;
19
+ const toast = useRef<Toast>(null);
20
+ const router = useRouter();
21
+
22
+ const [password, setPassword] = useState('');
23
+ const [checked, setChecked] = useState<boolean>(false);
24
+
25
+ const validationSchema = Yup.object({
26
+ email: Yup.string()
27
+ .email("Invalid email address")
28
+ .required("Email is required"),
29
+ password: Yup.string().required("Password is required"),
30
+ });
31
+
32
+ const showToast = (severity: "success" | "error", summary: string, detail: string) => {
33
+ toast.current?.show({
34
+ severity,
35
+ summary,
36
+ detail,
37
+ life: 3000,
38
+ });
39
+ };
40
+
41
+ const isFormFieldValid = (formik: any, fieldName: string) =>
42
+ formik.touched[fieldName] && formik.errors[fieldName];
43
+
44
+ return (
45
+ <>
46
+ <Toast ref={toast} />
47
+ <div className={`auth-container ${authLayout === 'Center' ? 'center' : 'side'}`}>
48
+ <div className="flex justify-content-center">
49
+ <div className="solid-logo flex align-items-center gap-3">
50
+ <img
51
+ alt="solid logo"
52
+ src={'/images/SS-Logo-1 1.png'}
53
+ className="position-relative img-fluid"
54
+ />
55
+ <div>
56
+ <p className="solid-logo-title">
57
+ Solid<br />Starters
58
+ </p>
59
+ </div>
60
+ </div>
61
+ </div>
62
+ <h2 className="solid-auth-title text-center">Forgot Password</h2>
63
+ <p className="solid-auth-subtitle text-sm">By continuing, you agree to the <Link href={'#'}>Terms of Service</Link> and acknowledge you’ve read our <Link href={'#'}>Privacy Policy.</Link> </p>
64
+ <>
65
+ <Formik
66
+ initialValues={{
67
+ email: "",
68
+ password: "",
69
+ }}
70
+ validationSchema={validationSchema}
71
+ onSubmit={async (values) => {
72
+ // Handle form submission
73
+ const email = values.email;
74
+ const password = values.password;
75
+
76
+ const response = await signIn("credentials", {
77
+ redirect: false,
78
+ email,
79
+ password,
80
+ });
81
+ if (response?.error) {
82
+ showToast("error", "Login Error", response.error);
83
+ } else {
84
+ showToast("success", "Login Success", "Redirecting to dashboard...");
85
+ router.push("/admin/core/solid-core/user/list");
86
+ }
87
+
88
+ }}
89
+ >
90
+ {(formik) => (
91
+ <Form>
92
+ <div className="flex flex-column gap-2">
93
+ <label htmlFor="email" className="solid-auth-input-label">Username or Email</label>
94
+ <InputText
95
+ id="email"
96
+ name="email"
97
+ placeholder="Email ID"
98
+ onChange={formik.handleChange}
99
+ value={formik.values.email}
100
+ />
101
+ {isFormFieldValid(formik, "email") && <Message
102
+ className="text-red-500 text-sm"
103
+ severity="error"
104
+ text={formik?.errors?.email?.toString()}
105
+ />}
106
+ </div>
107
+ <div className="mt-4">
108
+ <Button className="w-full font-light" label="Send OTP" />
109
+ </div>
110
+ </Form>
111
+ )}
112
+ </Formik>
113
+ </>
114
+ </div>
115
+ <div className="text-center mt-5">
116
+ <div className="text-sm text-400 secondary-dark-color">
117
+ {'<'} Back to <Link className="font-bold" href="/auth/login">Sign In</Link>
118
+ </div>
119
+ </div>
120
+ </>
121
+ );
122
+ };
123
+
124
+ export default SolidForgotPassword;
@@ -0,0 +1,156 @@
1
+ "use client";
2
+
3
+ import { Form, Formik } from "formik";
4
+ import { signIn } from "next-auth/react";
5
+ import Link from "next/link";
6
+ import { useRouter } from "next/navigation";
7
+ import { Button } from "primereact/button";
8
+ import { InputText } from "primereact/inputtext";
9
+ import { Message } from "primereact/message";
10
+ import { Password } from "primereact/password";
11
+ import { Toast } from "primereact/toast";
12
+ import { classNames } from "primereact/utils";
13
+ import { useContext, useRef, useState } from "react";
14
+ import * as Yup from "yup";
15
+ import { LayoutContext } from "../layout/context/layoutcontext";
16
+
17
+
18
+ const SolidLogin = () => {
19
+ const { layoutConfig } = useContext(LayoutContext);
20
+ const { authLayout } = layoutConfig;
21
+ const toast = useRef<Toast>(null);
22
+ const router = useRouter();
23
+
24
+ const [password, setPassword] = useState('');
25
+ const [checked, setChecked] = useState<boolean>(false);
26
+
27
+ const validationSchema = Yup.object({
28
+ email: Yup.string()
29
+ .email("Invalid email address")
30
+ .required("Email is required"),
31
+ password: Yup.string().required("Password is required"),
32
+ });
33
+
34
+ const showToast = (severity: "success" | "error", summary: string, detail: string) => {
35
+ toast.current?.show({
36
+ severity,
37
+ summary,
38
+ detail,
39
+ life: 3000,
40
+ });
41
+ };
42
+
43
+ const isFormFieldValid = (formik: any, fieldName: string) =>
44
+ formik.touched[fieldName] && formik.errors[fieldName];
45
+
46
+ return (
47
+ <div className="">
48
+ <Toast ref={toast} />
49
+ <div className={`auth-container ${authLayout === 'Center' ? 'center' : 'side'}`}>
50
+ <div className="flex justify-content-center">
51
+ <div className="solid-logo flex align-items-center gap-3">
52
+ <img
53
+ alt="solid logo"
54
+ src={'/images/SS-Logo-1 1.png'}
55
+ className="position-relative img-fluid"
56
+ />
57
+ <div>
58
+ <p className="solid-logo-title">
59
+ Solid<br />Starters
60
+ </p>
61
+ </div>
62
+ </div>
63
+ </div>
64
+ <h2 className="solid-auth-title text-center">Sign In To Your Account</h2>
65
+ <p className="solid-auth-subtitle text-sm">By continuing, you agree to the <Link href={'#'}>Terms of Service</Link> and acknowledge you’ve read our <Link href={'#'}>Privacy Policy.</Link> </p>
66
+ <>
67
+ <Formik
68
+ initialValues={{
69
+ email: "",
70
+ password: "",
71
+ }}
72
+ validationSchema={validationSchema}
73
+ onSubmit={async (values) => {
74
+ // Handle form submission
75
+ const email = values.email;
76
+ const password = values.password;
77
+
78
+ const response = await signIn("credentials", {
79
+ redirect: false,
80
+ email,
81
+ password,
82
+ });
83
+ if (response?.error) {
84
+ showToast("error", "Login Error", response.error);
85
+ } else {
86
+ showToast("success", "Login Success", "Redirecting to dashboard...");
87
+ router.push("/admin/core/solid-core/user/list");
88
+ }
89
+
90
+ }}
91
+ >
92
+ {(formik) => (
93
+ <Form>
94
+ <div className="flex flex-column gap-2">
95
+ <label htmlFor="email" className="solid-auth-input-label">Username or Email</label>
96
+ <InputText
97
+ id="email"
98
+ name="email"
99
+ placeholder="Email ID"
100
+ onChange={formik.handleChange}
101
+ value={formik.values.email}
102
+ />
103
+ {isFormFieldValid(formik, "email") && <Message
104
+ className="text-red-500 text-sm"
105
+ severity="error"
106
+ text={formik?.errors?.email?.toString()}
107
+ />}
108
+ </div>
109
+ <div className="flex flex-column gap-2 mt-4" style={{}}>
110
+ <label htmlFor="password" className="solid-auth-input-label">Password</label>
111
+ <Password
112
+ id="password"
113
+ placeholder="***************"
114
+ value={password}
115
+ onChange={(e) => {
116
+ setPassword(e.target.value);
117
+ formik.setFieldValue("password", e.target.value);
118
+ }}
119
+ toggleMask
120
+ className={classNames("", {
121
+ "p-invalid": isFormFieldValid(formik, "password"),
122
+ })}
123
+ inputClassName="w-full"
124
+ feedback={false}
125
+ />
126
+ {isFormFieldValid(formik, "password") && <Message
127
+ className="text-red-500 text-sm"
128
+ severity="error"
129
+ text={formik?.errors?.password?.toString()}
130
+ />}
131
+ </div>
132
+ {/* <div className="flex align-items-center mt-4">
133
+ <Checkbox inputId="remember" onChange={(e: any) => setChecked(e.checked)} checked={checked} />
134
+ <label htmlFor="remember" className="ml-2">Remember me</label>
135
+ </div> */}
136
+ <div className="mt-4 text-right">
137
+ <Link href={"/auth/forgot-password"} className="solid-auth-input-label">Forgot Password?</Link>
138
+ </div>
139
+ <div className="mt-4">
140
+ <Button className="w-full font-light" label="Sign In" />
141
+ </div>
142
+ </Form>
143
+ )}
144
+ </Formik>
145
+ </>
146
+ </div>
147
+ <div className="text-center mt-5">
148
+ <div className="text-sm text-400 secondary-dark-color">
149
+ Don’t have an account ? <Link className="font-bold" href="/auth/register">Sign Up</Link>
150
+ </div>
151
+ </div>
152
+ </div>
153
+ );
154
+ };
155
+
156
+ export default SolidLogin;
@@ -0,0 +1,127 @@
1
+ "use client";
2
+
3
+ import { Form, Formik } from "formik";
4
+ import { signIn } from "next-auth/react";
5
+ import Link from "next/link";
6
+ import { useRouter } from "next/navigation";
7
+ import { Button } from "primereact/button";
8
+ import { InputOtp } from "primereact/inputotp";
9
+ import { Message } from "primereact/message";
10
+ import { Toast } from "primereact/toast";
11
+ import { useContext, useRef, useState } from "react";
12
+ import * as Yup from "yup";
13
+ import { LayoutContext } from "../layout/context/layoutcontext";
14
+
15
+
16
+ const SolidOTPVerify = () => {
17
+ const { layoutConfig } = useContext(LayoutContext);
18
+ const { authLayout } = layoutConfig;
19
+ const [otp, setOTP] = useState<number | any>();
20
+
21
+ const toast = useRef<Toast>(null);
22
+ const router = useRouter();
23
+
24
+ const [password, setPassword] = useState('');
25
+ const [checked, setChecked] = useState<boolean>(false);
26
+
27
+ const validationSchema = Yup.object({
28
+ email: Yup.string()
29
+ .email("Invalid email address")
30
+ .required("Email is required"),
31
+ });
32
+
33
+ const showToast = (severity: "success" | "error", summary: string, detail: string) => {
34
+ toast.current?.show({
35
+ severity,
36
+ summary,
37
+ detail,
38
+ life: 3000,
39
+ });
40
+ };
41
+
42
+ const isFormFieldValid = (formik: any, fieldName: string) =>
43
+ formik.touched[fieldName] && formik.errors[fieldName];
44
+
45
+ return (
46
+ <>
47
+ <Toast ref={toast} />
48
+ <div className={`auth-container ${authLayout === 'Center' ? 'center' : 'side'}`} style={{ minWidth: 480 }}>
49
+ <div className="flex justify-content-center">
50
+ <div className="solid-logo flex align-items-center gap-3">
51
+ <img
52
+ alt="solid logo"
53
+ src={'/images/SS-Logo-1 1.png'}
54
+ className="position-relative img-fluid"
55
+ />
56
+ <div>
57
+ <p className="solid-logo-title">
58
+ Solid<br />Starters
59
+ </p>
60
+ </div>
61
+ </div>
62
+ </div>
63
+ <h2 className="solid-auth-title text-center">OTP Verification</h2>
64
+ <p className="solid-auth-subtitle text-sm">
65
+ Please enter the OTP sent to your email to complete verification
66
+ </p>
67
+ <>
68
+ <Formik
69
+ initialValues={{
70
+ email: "",
71
+ password: "",
72
+ }}
73
+ validationSchema={validationSchema}
74
+ onSubmit={async (values) => {
75
+ // Handle form submission
76
+ const email = values.email;
77
+ const password = values.password;
78
+
79
+ const response = await signIn("credentials", {
80
+ redirect: false,
81
+ email,
82
+ password,
83
+ });
84
+ if (response?.error) {
85
+ showToast("error", "Login Error", response.error);
86
+ } else {
87
+ showToast("success", "Login Success", "Redirecting to dashboard...");
88
+ router.push("/admin/core/solid-core/user/list");
89
+ }
90
+
91
+ }}
92
+ >
93
+ {(formik) => (
94
+ <Form>
95
+ <div className="flex flex-column gap-2 px-3">
96
+ <label htmlFor="email" className="solid-auth-input-label">Enter OTP</label>
97
+ <InputOtp value={otp} onChange={(e) => setOTP(e.value)} length={6} style={{ width: '100%' }} />
98
+ {isFormFieldValid(formik, "email") && <Message
99
+ className="text-red-500 text-sm"
100
+ severity="error"
101
+ text={formik?.errors?.email?.toString()}
102
+ />}
103
+ <div className="flex align-items-center justify-content-between">
104
+ <Button type="button" icon='pi pi-refresh' iconPos="left" link label="Resend Code" className="px-0 text-sm font-normal" />
105
+ <p className="m-0 text-sm text-color">
106
+ Time left: 00:28
107
+ </p>
108
+ </div>
109
+ </div>
110
+ <div className="mt-4">
111
+ <Button type="submit" className="w-full font-light" label="Verify" />
112
+ </div>
113
+ </Form>
114
+ )}
115
+ </Formik>
116
+ </>
117
+ </div>
118
+ <div className="text-center mt-5">
119
+ <div className="text-sm text-400 secondary-dark-color">
120
+ {'<'} Back to <Link className="font-bold" href="/auth/login">Sign In</Link>
121
+ </div>
122
+ </div>
123
+ </>
124
+ );
125
+ };
126
+
127
+ export default SolidOTPVerify;
@@ -0,0 +1,221 @@
1
+ "use client";
2
+
3
+ import { useRegisterMutation } from "@/redux/api/authApi";
4
+ import { FetchBaseQueryError } from "@reduxjs/toolkit/query/react";
5
+ import { useFormik } from "formik";
6
+ import Link from "next/link";
7
+ import { useRouter } from "next/navigation";
8
+ import { Button } from "primereact/button";
9
+ import { InputText } from "primereact/inputtext";
10
+ import { Message } from "primereact/message";
11
+ import { Password } from "primereact/password";
12
+ import { Toast } from "primereact/toast";
13
+ import { classNames } from "primereact/utils";
14
+ import { ChangeEventHandler, useContext, useEffect, useRef, useState } from "react";
15
+ import * as Yup from "yup";
16
+ import { LayoutContext } from "../layout/context/layoutcontext";
17
+
18
+ const SolidRegister = () => {
19
+ const { layoutConfig } = useContext(LayoutContext);
20
+ const { authLayout } = layoutConfig;
21
+ const toast = useRef<Toast>(null);
22
+ const [password, setPassword] = useState("");
23
+ const [checked, setChecked] = useState<boolean>(false);
24
+ const [showPassword, setShowPassword] = useState(false);
25
+ const [user, setUser] = useState({
26
+ name: "",
27
+ email: "",
28
+ password: "",
29
+ });
30
+
31
+ const validationSchema = Yup.object({
32
+ username: Yup.string().required("User Name is required"),
33
+ email: Yup.string()
34
+ .email("Invalid email address")
35
+ .required("Email is required"),
36
+ password: Yup.string().required("Password is required"),
37
+ });
38
+
39
+ const router = useRouter();
40
+
41
+ const isFormFieldValid = (formik: any, fieldName: string) =>
42
+ formik.touched[fieldName] && formik.errors[fieldName];
43
+
44
+ const [register, { isLoading, error, isSuccess, data }] = useRegisterMutation();
45
+
46
+ const onChange: ChangeEventHandler<HTMLInputElement> = (e) => {
47
+ setUser({ ...user, [e.target.name]: e.target.value });
48
+ };
49
+
50
+ const initialValues = {
51
+ username: "",
52
+ email: "",
53
+ password: "",
54
+ }
55
+
56
+ const formik = useFormik({
57
+ initialValues,
58
+ validationSchema,
59
+ enableReinitialize: true,
60
+ onSubmit: async (values) => {
61
+ try {
62
+ const userData = {
63
+ username: values.username,
64
+ email: values.email,
65
+ password: values.password,
66
+ };
67
+
68
+ await register(userData);
69
+ } catch (err) {
70
+ console.log('inside', err);
71
+ }
72
+ }
73
+ });
74
+
75
+ const showError = () => {
76
+ if (error) {
77
+ if ("data" in error) {
78
+ const apiError = error as FetchBaseQueryError;
79
+ const errorMessages = Array.isArray(apiError.data?.message)
80
+ ? apiError.data?.message
81
+ : [apiError.data?.message];
82
+
83
+ toast.current?.show({
84
+ severity: "error",
85
+ summary: "Error",
86
+ detail: errorMessages.join(", "),
87
+ life: 3000,
88
+ });
89
+ } else {
90
+ const serializedError = error as Error;
91
+ toast.current?.show({
92
+ severity: "error",
93
+ summary: "Error",
94
+ detail: serializedError.message || "An error occurred",
95
+ life: 3000,
96
+ });
97
+ }
98
+ }
99
+ };
100
+
101
+ useEffect(() => {
102
+ if (error) {
103
+ showError();
104
+ }
105
+ }, [error]);
106
+
107
+ useEffect(() => {
108
+ if (isSuccess) {
109
+ router.replace("/auth/login");
110
+ }
111
+ }, [isSuccess])
112
+ return (
113
+ <>
114
+ <Toast ref={toast} />
115
+ <div className={`auth-container ${authLayout === 'Center' ? 'center' : 'side'}`}>
116
+ <div className="flex justify-content-center">
117
+ <div className="solid-logo flex align-items-center gap-3">
118
+ <img
119
+ alt="solid logo"
120
+ src={'/images/SS-Logo-1 1.png'}
121
+ className="position-relative img-fluid"
122
+ />
123
+ <div>
124
+ <p className="solid-logo-title">
125
+ Solid<br />Starters
126
+ </p>
127
+ </div>
128
+ </div>
129
+ </div>
130
+ <h2 className="solid-auth-title text-center">Sign Up To Your Account</h2>
131
+ <p className="solid-auth-subtitle text-sm">By continuing, you agree to the <Link href={'#'}>Terms of Service</Link> and acknowledge you’ve read our <Link href={'#'}>Privacy Policy.</Link> </p>
132
+ <>
133
+ <form onSubmit={formik.handleSubmit}>
134
+ <div className="grid">
135
+ <div className="col-6">
136
+ <div className="flex flex-column gap-2">
137
+ <label htmlFor="email" className="solid-auth-input-label">First Name</label>
138
+ <InputText
139
+ id="username"
140
+ name="username"
141
+ placeholder="username"
142
+ onChange={formik.handleChange}
143
+ value={formik.values.username}
144
+ />
145
+ {isFormFieldValid(formik, "username") && <Message
146
+ className="text-red-500 text-sm"
147
+ severity="error"
148
+ text={formik?.errors?.username?.toString()}
149
+ />}
150
+ </div>
151
+ </div>
152
+ <div className="col-6">
153
+ <div className="flex flex-column gap-2">
154
+ <label htmlFor="email" className="solid-auth-input-label">Last Name</label>
155
+ <InputText
156
+ id="email"
157
+ name="email"
158
+ placeholder="Yourgmail@123.com"
159
+ onChange={formik.handleChange}
160
+ value={formik.values.email}
161
+ />
162
+ {isFormFieldValid(formik, "email") && <Message
163
+ className="text-red-500 text-sm"
164
+ severity="error"
165
+ text={formik?.errors?.email?.toString()}
166
+ />}
167
+ </div>
168
+ </div>
169
+ </div>
170
+ <div className="flex flex-column gap-2 mt-3">
171
+ <label htmlFor="email" className="solid-auth-input-label">Email</label>
172
+ <InputText
173
+ id="email"
174
+ name="email"
175
+ placeholder="Yourgmail@123.com"
176
+ onChange={formik.handleChange}
177
+ value={formik.values.email}
178
+ />
179
+ {isFormFieldValid(formik, "email") && <Message
180
+ className="text-red-500 text-sm"
181
+ severity="error"
182
+ text={formik?.errors?.email?.toString()}
183
+ />}
184
+ </div>
185
+ <div className="flex flex-column gap-2 mt-3">
186
+ <label htmlFor="password" className="solid-auth-input-label">Password</label>
187
+ <Password
188
+ id="password"
189
+ name="password"
190
+ value={formik.values.password}
191
+ onChange={formik.handleChange}
192
+ placeholder="***************"
193
+ toggleMask
194
+ className={classNames("", {
195
+ "p-invalid": isFormFieldValid(formik, "password"),
196
+ })}
197
+ inputClassName="w-full"
198
+ feedback={false}
199
+ />
200
+ {isFormFieldValid(formik, "password") && <Message
201
+ className="text-red-500 text-sm"
202
+ severity="error"
203
+ text={formik?.errors?.password?.toString()}
204
+ />}
205
+ </div>
206
+ <div className="mt-4">
207
+ <Button className="w-full font-light" label="Sign Up" />
208
+ </div>
209
+ </form>
210
+ </>
211
+ </div>
212
+ <div className="text-center mt-5">
213
+ <div className="text-sm text-400 secondary-dark-color">
214
+ Already have an account ? <Link className="font-bold" href="/auth/login">Sign In</Link>
215
+ </div>
216
+ </div>
217
+ </>
218
+ );
219
+ };
220
+
221
+ export default SolidRegister;