@campxdev/react-blueprint 3.0.0-alpha.5 → 3.0.0-alpha.6

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 (255) hide show
  1. package/dist/cjs/index.js +1 -1
  2. package/dist/cjs/types/src/components/Assets/ErrorPages/ComingSoon.d.ts +24 -0
  3. package/dist/cjs/types/src/components/Assets/ErrorPages/InternalServerError.d.ts +20 -0
  4. package/dist/cjs/types/src/components/Assets/ErrorPages/NoInternetConnection.d.ts +20 -0
  5. package/dist/cjs/types/src/components/Assets/ErrorPages/NoItemFound.d.ts +28 -0
  6. package/dist/cjs/types/src/components/Assets/ErrorPages/PageNotFound.d.ts +21 -0
  7. package/dist/cjs/types/src/components/Assets/ErrorPages/ResourceNotFound.d.ts +21 -0
  8. package/dist/cjs/types/src/components/Assets/ErrorPages/UnAuthorized.d.ts +31 -0
  9. package/dist/cjs/types/src/components/Assets/Icons/Icons.d.ts +54 -0
  10. package/dist/cjs/types/src/components/Charts/BarChart/BarChart.d.ts +38 -0
  11. package/dist/cjs/types/src/components/Charts/BarChart/HorizontalBarChart.d.ts +93 -0
  12. package/dist/cjs/types/src/components/Charts/BarChart/VerticalBarChart.d.ts +110 -0
  13. package/dist/cjs/types/src/components/Charts/LineChart/LineChart.d.ts +89 -0
  14. package/dist/cjs/types/src/components/Charts/PieChart/PieChart.d.ts +86 -0
  15. package/dist/cjs/types/src/components/Charts/TreeMap/TreeMap.d.ts +74 -0
  16. package/dist/cjs/types/src/components/DataDisplay/Accordion/Accordion.d.ts +54 -0
  17. package/dist/cjs/types/src/components/DataDisplay/ActivityLogView/ActivityLogFilter.d.ts +35 -0
  18. package/dist/cjs/types/src/components/DataDisplay/ActivityLogView/ActivityLogView.d.ts +78 -0
  19. package/dist/cjs/types/src/components/DataDisplay/Avatar/Avatar.d.ts +40 -0
  20. package/dist/cjs/types/src/components/DataDisplay/Chip/Chip.d.ts +28 -0
  21. package/dist/cjs/types/src/components/DataDisplay/Chips/Chips.d.ts +55 -0
  22. package/dist/cjs/types/src/components/DataDisplay/DataTable/DataTable.d.ts +95 -0
  23. package/dist/cjs/types/src/components/DataDisplay/DataTable/components/TablePagination.d.ts +35 -0
  24. package/dist/cjs/types/src/components/DataDisplay/EmptyIllustration/EmptyIllustration.d.ts +30 -0
  25. package/dist/cjs/types/src/components/DataDisplay/ReactJoyride/ReactJoyride.d.ts +64 -0
  26. package/dist/cjs/types/src/components/DataDisplay/Separator/Separator.d.ts +30 -0
  27. package/dist/cjs/types/src/components/DataDisplay/Skeleton/Skeleton.d.ts +20 -0
  28. package/dist/cjs/types/src/components/DataDisplay/StatusCard/StatusCard.d.ts +36 -0
  29. package/dist/cjs/types/src/components/DataDisplay/Timeline/Timeline.d.ts +58 -0
  30. package/dist/cjs/types/src/components/DataDisplay/Typography/Typography.d.ts +25 -0
  31. package/dist/cjs/types/src/components/Feedback/Alert/Alert.d.ts +31 -0
  32. package/dist/cjs/types/src/components/Feedback/Snackbar/Snackbar.d.ts +54 -0
  33. package/dist/cjs/types/src/components/Feedback/Spinner/Spinner.d.ts +15 -0
  34. package/dist/cjs/types/src/components/Feedback/Tooltip/Tooltip.d.ts +54 -0
  35. package/dist/cjs/types/src/components/Input/Button/Button.d.ts +26 -0
  36. package/dist/cjs/types/src/components/Input/DatePicker/DatePicker.d.ts +41 -0
  37. package/dist/cjs/types/src/components/Input/DateTimePicker/DateTimePicker.d.ts +42 -0
  38. package/dist/cjs/types/src/components/Input/FileUpload/FileUpload.d.ts +41 -0
  39. package/dist/cjs/types/src/components/Input/FormActions/FormActions.d.ts +37 -0
  40. package/dist/cjs/types/src/components/Input/FormControlWrapper/FormControlWrapper.d.ts +31 -0
  41. package/dist/cjs/types/src/components/Input/FormWrapper/FormWrapper.d.ts +20 -0
  42. package/dist/cjs/types/src/components/Input/HelpButton/HelpButton.d.ts +14 -0
  43. package/dist/cjs/types/src/components/Input/IconButtons/IconButtons/DeleteButton.d.ts +16 -0
  44. package/dist/cjs/types/src/components/Input/IconButtons/IconButtons/EditButton.d.ts +16 -0
  45. package/dist/cjs/types/src/components/Input/IconButtons/IconButtons/RedirectButton.d.ts +16 -0
  46. package/dist/cjs/types/src/components/Input/IconButtons/IconButtons/ViewButton.d.ts +16 -0
  47. package/dist/cjs/types/src/components/Input/IconButtons/IconButtons.d.ts +18 -0
  48. package/dist/cjs/types/src/components/Input/LabelWrapper/LabelWrapper.d.ts +26 -0
  49. package/dist/cjs/types/src/components/Input/MultiCheckBox/MultiCheckBox.d.ts +34 -0
  50. package/dist/cjs/types/src/components/Input/MultiSelect/MultiSelect.d.ts +40 -0
  51. package/dist/cjs/types/src/components/Input/OtpInput/OtpInput.d.ts +29 -0
  52. package/dist/cjs/types/src/components/Input/PasswordField/PasswordField.d.ts +34 -0
  53. package/dist/cjs/types/src/components/Input/RadioGroup/RadioGroup.d.ts +38 -0
  54. package/dist/cjs/types/src/components/Input/SearchBar/SearchBar.d.ts +26 -0
  55. package/dist/cjs/types/src/components/Input/Select/Select.d.ts +32 -0
  56. package/dist/cjs/types/src/components/Input/SingleCheckBox/SingleCheckBox.d.ts +29 -0
  57. package/dist/cjs/types/src/components/Input/SingleSelect/SingleSelect.d.ts +40 -0
  58. package/dist/cjs/types/src/components/Input/Switch/Switch.d.ts +23 -0
  59. package/dist/cjs/types/src/components/Input/Tags/Tags.d.ts +26 -0
  60. package/dist/cjs/types/src/components/Input/TextField/TextField.d.ts +35 -0
  61. package/dist/cjs/types/src/components/Input/Textarea/Textarea.d.ts +36 -0
  62. package/dist/cjs/types/src/components/Layout/AppLayout/AppLayout.d.ts +32 -0
  63. package/dist/cjs/types/src/components/Layout/AppLayout/components/MenuToggleButton.d.ts +16 -0
  64. package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/MenuBar.d.ts +26 -0
  65. package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/MenuItem.d.ts +37 -0
  66. package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/Sidebar.d.ts +30 -1
  67. package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/StyledComponents.d.ts +139 -0
  68. package/dist/cjs/types/src/components/Layout/AppLayout/components/UserProfilePopup.d.ts +34 -0
  69. package/dist/cjs/types/src/components/Layout/AppLayout/context/SidebarContext.d.ts +48 -0
  70. package/dist/cjs/types/src/components/Layout/AppLayout/types.d.ts +1 -1
  71. package/dist/cjs/types/src/components/Layout/PageContent/PageContent.d.ts +19 -0
  72. package/dist/cjs/types/src/components/Layout/PageHeader/PageHeader.d.ts +46 -0
  73. package/dist/cjs/types/src/components/Layout/PageHeader/components/SearchBar.d.ts +22 -0
  74. package/dist/cjs/types/src/components/Layout/UserBox/UserBox.d.ts +40 -0
  75. package/dist/cjs/types/src/components/Navigation/Breadcrumbs/Breadcrumbs.d.ts +33 -0
  76. package/dist/cjs/types/src/components/Navigation/Calendar/Calendar.d.ts +63 -0
  77. package/dist/cjs/types/src/components/Navigation/ConfirmDialog/ConfirmDialog.d.ts +64 -0
  78. package/dist/cjs/types/src/components/Navigation/Dialog/Dialog.d.ts +55 -0
  79. package/dist/cjs/types/src/components/Navigation/DialogButton/DialogButton.d.ts +64 -0
  80. package/dist/cjs/types/src/components/Navigation/DropDownMenu/DropDownMenu.d.ts +73 -0
  81. package/dist/cjs/types/src/components/Navigation/PreviewFiles/PreviewFiles.d.ts +54 -0
  82. package/dist/cjs/types/src/components/Navigation/Stepper/Stepper.d.ts +55 -10
  83. package/dist/cjs/types/src/components/Navigation/TabsContainer/TabsContainer.d.ts +80 -0
  84. package/dist/cjs/types/src/components/Navigation/UploadDialog/UploadDialog.d.ts +64 -0
  85. package/dist/esm/index.js +2 -2
  86. package/dist/esm/types/src/components/Assets/ErrorPages/ComingSoon.d.ts +24 -0
  87. package/dist/esm/types/src/components/Assets/ErrorPages/InternalServerError.d.ts +20 -0
  88. package/dist/esm/types/src/components/Assets/ErrorPages/NoInternetConnection.d.ts +20 -0
  89. package/dist/esm/types/src/components/Assets/ErrorPages/NoItemFound.d.ts +28 -0
  90. package/dist/esm/types/src/components/Assets/ErrorPages/PageNotFound.d.ts +21 -0
  91. package/dist/esm/types/src/components/Assets/ErrorPages/ResourceNotFound.d.ts +21 -0
  92. package/dist/esm/types/src/components/Assets/ErrorPages/UnAuthorized.d.ts +31 -0
  93. package/dist/esm/types/src/components/Assets/Icons/Icons.d.ts +54 -0
  94. package/dist/esm/types/src/components/Charts/BarChart/BarChart.d.ts +38 -0
  95. package/dist/esm/types/src/components/Charts/BarChart/HorizontalBarChart.d.ts +93 -0
  96. package/dist/esm/types/src/components/Charts/BarChart/VerticalBarChart.d.ts +110 -0
  97. package/dist/esm/types/src/components/Charts/LineChart/LineChart.d.ts +89 -0
  98. package/dist/esm/types/src/components/Charts/PieChart/PieChart.d.ts +86 -0
  99. package/dist/esm/types/src/components/Charts/TreeMap/TreeMap.d.ts +74 -0
  100. package/dist/esm/types/src/components/DataDisplay/Accordion/Accordion.d.ts +54 -0
  101. package/dist/esm/types/src/components/DataDisplay/ActivityLogView/ActivityLogFilter.d.ts +35 -0
  102. package/dist/esm/types/src/components/DataDisplay/ActivityLogView/ActivityLogView.d.ts +78 -0
  103. package/dist/esm/types/src/components/DataDisplay/Avatar/Avatar.d.ts +40 -0
  104. package/dist/esm/types/src/components/DataDisplay/Chip/Chip.d.ts +28 -0
  105. package/dist/esm/types/src/components/DataDisplay/Chips/Chips.d.ts +55 -0
  106. package/dist/esm/types/src/components/DataDisplay/DataTable/DataTable.d.ts +95 -0
  107. package/dist/esm/types/src/components/DataDisplay/DataTable/components/TablePagination.d.ts +35 -0
  108. package/dist/esm/types/src/components/DataDisplay/EmptyIllustration/EmptyIllustration.d.ts +30 -0
  109. package/dist/esm/types/src/components/DataDisplay/ReactJoyride/ReactJoyride.d.ts +64 -0
  110. package/dist/esm/types/src/components/DataDisplay/Separator/Separator.d.ts +30 -0
  111. package/dist/esm/types/src/components/DataDisplay/Skeleton/Skeleton.d.ts +20 -0
  112. package/dist/esm/types/src/components/DataDisplay/StatusCard/StatusCard.d.ts +36 -0
  113. package/dist/esm/types/src/components/DataDisplay/Timeline/Timeline.d.ts +58 -0
  114. package/dist/esm/types/src/components/DataDisplay/Typography/Typography.d.ts +25 -0
  115. package/dist/esm/types/src/components/Feedback/Alert/Alert.d.ts +31 -0
  116. package/dist/esm/types/src/components/Feedback/Snackbar/Snackbar.d.ts +54 -0
  117. package/dist/esm/types/src/components/Feedback/Spinner/Spinner.d.ts +15 -0
  118. package/dist/esm/types/src/components/Feedback/Tooltip/Tooltip.d.ts +54 -0
  119. package/dist/esm/types/src/components/Input/Button/Button.d.ts +26 -0
  120. package/dist/esm/types/src/components/Input/DatePicker/DatePicker.d.ts +41 -0
  121. package/dist/esm/types/src/components/Input/DateTimePicker/DateTimePicker.d.ts +42 -0
  122. package/dist/esm/types/src/components/Input/FileUpload/FileUpload.d.ts +41 -0
  123. package/dist/esm/types/src/components/Input/FormActions/FormActions.d.ts +37 -0
  124. package/dist/esm/types/src/components/Input/FormControlWrapper/FormControlWrapper.d.ts +31 -0
  125. package/dist/esm/types/src/components/Input/FormWrapper/FormWrapper.d.ts +20 -0
  126. package/dist/esm/types/src/components/Input/HelpButton/HelpButton.d.ts +14 -0
  127. package/dist/esm/types/src/components/Input/IconButtons/IconButtons/DeleteButton.d.ts +16 -0
  128. package/dist/esm/types/src/components/Input/IconButtons/IconButtons/EditButton.d.ts +16 -0
  129. package/dist/esm/types/src/components/Input/IconButtons/IconButtons/RedirectButton.d.ts +16 -0
  130. package/dist/esm/types/src/components/Input/IconButtons/IconButtons/ViewButton.d.ts +16 -0
  131. package/dist/esm/types/src/components/Input/IconButtons/IconButtons.d.ts +18 -0
  132. package/dist/esm/types/src/components/Input/LabelWrapper/LabelWrapper.d.ts +26 -0
  133. package/dist/esm/types/src/components/Input/MultiCheckBox/MultiCheckBox.d.ts +34 -0
  134. package/dist/esm/types/src/components/Input/MultiSelect/MultiSelect.d.ts +40 -0
  135. package/dist/esm/types/src/components/Input/OtpInput/OtpInput.d.ts +29 -0
  136. package/dist/esm/types/src/components/Input/PasswordField/PasswordField.d.ts +34 -0
  137. package/dist/esm/types/src/components/Input/RadioGroup/RadioGroup.d.ts +38 -0
  138. package/dist/esm/types/src/components/Input/SearchBar/SearchBar.d.ts +26 -0
  139. package/dist/esm/types/src/components/Input/Select/Select.d.ts +32 -0
  140. package/dist/esm/types/src/components/Input/SingleCheckBox/SingleCheckBox.d.ts +29 -0
  141. package/dist/esm/types/src/components/Input/SingleSelect/SingleSelect.d.ts +40 -0
  142. package/dist/esm/types/src/components/Input/Switch/Switch.d.ts +23 -0
  143. package/dist/esm/types/src/components/Input/Tags/Tags.d.ts +26 -0
  144. package/dist/esm/types/src/components/Input/TextField/TextField.d.ts +35 -0
  145. package/dist/esm/types/src/components/Input/Textarea/Textarea.d.ts +36 -0
  146. package/dist/esm/types/src/components/Layout/AppLayout/AppLayout.d.ts +32 -0
  147. package/dist/esm/types/src/components/Layout/AppLayout/components/MenuToggleButton.d.ts +16 -0
  148. package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/MenuBar.d.ts +26 -0
  149. package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/MenuItem.d.ts +37 -0
  150. package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/Sidebar.d.ts +30 -1
  151. package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/StyledComponents.d.ts +139 -0
  152. package/dist/esm/types/src/components/Layout/AppLayout/components/UserProfilePopup.d.ts +34 -0
  153. package/dist/esm/types/src/components/Layout/AppLayout/context/SidebarContext.d.ts +48 -0
  154. package/dist/esm/types/src/components/Layout/AppLayout/types.d.ts +1 -1
  155. package/dist/esm/types/src/components/Layout/PageContent/PageContent.d.ts +19 -0
  156. package/dist/esm/types/src/components/Layout/PageHeader/PageHeader.d.ts +46 -0
  157. package/dist/esm/types/src/components/Layout/PageHeader/components/SearchBar.d.ts +22 -0
  158. package/dist/esm/types/src/components/Layout/UserBox/UserBox.d.ts +40 -0
  159. package/dist/esm/types/src/components/Navigation/Breadcrumbs/Breadcrumbs.d.ts +33 -0
  160. package/dist/esm/types/src/components/Navigation/Calendar/Calendar.d.ts +63 -0
  161. package/dist/esm/types/src/components/Navigation/ConfirmDialog/ConfirmDialog.d.ts +64 -0
  162. package/dist/esm/types/src/components/Navigation/Dialog/Dialog.d.ts +55 -0
  163. package/dist/esm/types/src/components/Navigation/DialogButton/DialogButton.d.ts +64 -0
  164. package/dist/esm/types/src/components/Navigation/DropDownMenu/DropDownMenu.d.ts +73 -0
  165. package/dist/esm/types/src/components/Navigation/PreviewFiles/PreviewFiles.d.ts +54 -0
  166. package/dist/esm/types/src/components/Navigation/Stepper/Stepper.d.ts +55 -10
  167. package/dist/esm/types/src/components/Navigation/TabsContainer/TabsContainer.d.ts +80 -0
  168. package/dist/esm/types/src/components/Navigation/UploadDialog/UploadDialog.d.ts +64 -0
  169. package/dist/index.d.ts +2953 -12
  170. package/dist/styles.css +30 -9
  171. package/package.json +1 -1
  172. package/src/components/Assets/ErrorPages/ComingSoon.tsx +24 -0
  173. package/src/components/Assets/ErrorPages/InternalServerError.tsx +20 -0
  174. package/src/components/Assets/ErrorPages/NoInternetConnection.tsx +20 -0
  175. package/src/components/Assets/ErrorPages/NoItemFound.tsx +28 -0
  176. package/src/components/Assets/ErrorPages/PageNotFound.tsx +21 -0
  177. package/src/components/Assets/ErrorPages/ResourceNotFound.tsx +21 -0
  178. package/src/components/Assets/ErrorPages/UnAuthorized.tsx +31 -0
  179. package/src/components/Assets/Icons/Icons.tsx +55 -1
  180. package/src/components/Charts/BarChart/BarChart.tsx +38 -0
  181. package/src/components/Charts/BarChart/HorizontalBarChart.tsx +93 -0
  182. package/src/components/Charts/BarChart/VerticalBarChart.tsx +110 -0
  183. package/src/components/Charts/LineChart/LineChart.tsx +89 -0
  184. package/src/components/Charts/PieChart/PieChart.tsx +86 -0
  185. package/src/components/Charts/TreeMap/TreeMap.tsx +90 -0
  186. package/src/components/DataDisplay/Accordion/Accordion.tsx +54 -0
  187. package/src/components/DataDisplay/ActivityLogView/ActivityLogFilter.tsx +35 -0
  188. package/src/components/DataDisplay/ActivityLogView/ActivityLogView.tsx +84 -0
  189. package/src/components/DataDisplay/Avatar/Avatar.tsx +40 -0
  190. package/src/components/DataDisplay/Chip/Chip.tsx +28 -0
  191. package/src/components/DataDisplay/Chips/Chips.tsx +56 -0
  192. package/src/components/DataDisplay/DataTable/DataTable.tsx +95 -0
  193. package/src/components/DataDisplay/DataTable/components/TablePagination.tsx +35 -0
  194. package/src/components/DataDisplay/EmptyIllustration/EmptyIllustration.tsx +31 -0
  195. package/src/components/DataDisplay/ReactJoyride/ReactJoyride.tsx +64 -0
  196. package/src/components/DataDisplay/Separator/Separator.tsx +32 -0
  197. package/src/components/DataDisplay/Skeleton/Skeleton.tsx +20 -0
  198. package/src/components/DataDisplay/StatusCard/StatusCard.tsx +36 -0
  199. package/src/components/DataDisplay/Timeline/Timeline.tsx +58 -0
  200. package/src/components/DataDisplay/Typography/Typography.tsx +25 -0
  201. package/src/components/Feedback/Alert/Alert.tsx +38 -0
  202. package/src/components/Feedback/Snackbar/Snackbar.tsx +54 -0
  203. package/src/components/Feedback/Spinner/Spinner.tsx +15 -0
  204. package/src/components/Feedback/Tooltip/Tooltip.tsx +54 -0
  205. package/src/components/Input/Button/Button.tsx +26 -0
  206. package/src/components/Input/DatePicker/DatePicker.tsx +41 -0
  207. package/src/components/Input/DateTimePicker/DateTimePicker.tsx +42 -0
  208. package/src/components/Input/FileUpload/FileUpload.tsx +41 -0
  209. package/src/components/Input/FormActions/FormActions.tsx +37 -0
  210. package/src/components/Input/FormControlWrapper/FormControlWrapper.tsx +31 -0
  211. package/src/components/Input/FormWrapper/FormWrapper.tsx +20 -0
  212. package/src/components/Input/HelpButton/HelpButton.tsx +14 -0
  213. package/src/components/Input/IconButtons/IconButtons/DeleteButton.tsx +16 -0
  214. package/src/components/Input/IconButtons/IconButtons/EditButton.tsx +16 -0
  215. package/src/components/Input/IconButtons/IconButtons/RedirectButton.tsx +16 -0
  216. package/src/components/Input/IconButtons/IconButtons/ViewButton.tsx +16 -0
  217. package/src/components/Input/IconButtons/IconButtons.tsx +18 -0
  218. package/src/components/Input/LabelWrapper/LabelWrapper.tsx +26 -0
  219. package/src/components/Input/MultiCheckBox/MultiCheckBox.tsx +34 -0
  220. package/src/components/Input/MultiSelect/MultiSelect.tsx +40 -0
  221. package/src/components/Input/OtpInput/OtpInput.tsx +29 -0
  222. package/src/components/Input/PasswordField/PasswordField.tsx +34 -0
  223. package/src/components/Input/RadioGroup/RadioGroup.tsx +38 -0
  224. package/src/components/Input/SearchBar/SearchBar.tsx +26 -0
  225. package/src/components/Input/Select/Select.tsx +41 -0
  226. package/src/components/Input/SingleCheckBox/SingleCheckBox.tsx +29 -0
  227. package/src/components/Input/SingleSelect/SingleSelect.tsx +40 -0
  228. package/src/components/Input/Switch/Switch.tsx +23 -0
  229. package/src/components/Input/Tags/Tags.tsx +26 -0
  230. package/src/components/Input/TextField/TextField.tsx +35 -0
  231. package/src/components/Input/Textarea/Textarea.tsx +36 -0
  232. package/src/components/Layout/AppLayout/AppLayout.tsx +33 -1
  233. package/src/components/Layout/AppLayout/components/MenuToggleButton.tsx +16 -0
  234. package/src/components/Layout/AppLayout/components/Sidebar/MenuBar.tsx +26 -0
  235. package/src/components/Layout/AppLayout/components/Sidebar/MenuItem.tsx +51 -1
  236. package/src/components/Layout/AppLayout/components/Sidebar/Sidebar.tsx +173 -104
  237. package/src/components/Layout/AppLayout/components/Sidebar/StyledComponents.tsx +139 -9
  238. package/src/components/Layout/AppLayout/components/UserProfilePopup.tsx +34 -0
  239. package/src/components/Layout/AppLayout/context/SidebarContext.tsx +48 -0
  240. package/src/components/Layout/AppLayout/types.ts +1 -1
  241. package/src/components/Layout/PageContent/PageContent.tsx +19 -0
  242. package/src/components/Layout/PageHeader/PageHeader.tsx +46 -0
  243. package/src/components/Layout/PageHeader/components/SearchBar.tsx +22 -0
  244. package/src/components/Layout/UserBox/UserBox.tsx +40 -0
  245. package/src/components/Navigation/Breadcrumbs/Breadcrumbs.tsx +33 -0
  246. package/src/components/Navigation/Calendar/Calendar.tsx +63 -0
  247. package/src/components/Navigation/ConfirmDialog/ConfirmDialog.tsx +64 -0
  248. package/src/components/Navigation/Dialog/Dialog.tsx +55 -0
  249. package/src/components/Navigation/DialogButton/DialogButton.tsx +64 -0
  250. package/src/components/Navigation/DropDownMenu/DropDownMenu.tsx +73 -0
  251. package/src/components/Navigation/PreviewFiles/PreviewFiles.tsx +93 -0
  252. package/src/components/Navigation/Stepper/Stepper.tsx +56 -10
  253. package/src/components/Navigation/TabsContainer/TabsContainer.tsx +80 -0
  254. package/src/components/Navigation/UploadDialog/UploadDialog.tsx +64 -0
  255. package/src/shadcn-components/Layout/Sheet/Sheet.tsx +2 -2
@@ -3,22 +3,86 @@ import { Typography } from '@/shadcn-components/DataDisplay/Typography/Typograph
3
3
  import { Button } from '@/shadcn-components/Input/Button/Button';
4
4
  import { AnimatedGIFs } from '../../../assets/images/gif';
5
5
 
6
+ /**
7
+ * Type definition for the kind of confirmation dialog
8
+ */
6
9
  export type ConfirmDialogType = 'confirm' | 'delete';
7
10
 
11
+ /**
12
+ * Available max-width sizes for the dialog
13
+ */
8
14
  type MaxWidthSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
9
15
 
16
+ /**
17
+ * Props for the ConfirmDialog component
18
+ */
10
19
  export type ConfirmDialogProps = {
20
+ /** Whether the dialog is open and visible */
11
21
  isOpen: boolean;
22
+ /** Title text displayed in the dialog header */
12
23
  title: string;
24
+ /** Message/description text displayed in the dialog */
13
25
  message: string;
26
+ /** Callback function triggered when the user confirms the action */
14
27
  onConfirm: () => void;
28
+ /** Callback function triggered when the user cancels the dialog */
15
29
  onCancel: () => void;
30
+ /** Type of confirmation dialog - 'confirm' for general confirmations, 'delete' for destructive actions */
16
31
  type: ConfirmDialogType;
32
+ /** Custom text for the confirm button. Defaults to 'Confirm Delete' for delete type, 'Confirm' otherwise */
17
33
  confirmButtonText?: string;
34
+ /** Custom text for the cancel button. Defaults to 'Cancel' */
18
35
  cancelButtonText?: string;
36
+ /** Max-width size class of the dialog. Defaults to 'xl' */
19
37
  maxWidth?: MaxWidthSize;
20
38
  };
21
39
 
40
+ /**
41
+ * ConfirmDialog component that displays a modal confirmation dialog with custom title, message, and action buttons.
42
+ *
43
+ * This component provides a user-friendly confirmation interface with support for two types:
44
+ * 'confirm' for general confirmations and 'delete' for destructive operations. The dialog
45
+ * includes an animated GIF icon that changes based on the dialog type.
46
+ *
47
+ * @component
48
+ * @param {ConfirmDialogProps} props - The component props
49
+ * @param {boolean} props.isOpen - Whether the dialog is currently open
50
+ * @param {string} props.title - Dialog title text
51
+ * @param {string} props.message - Dialog message/body text
52
+ * @param {() => void} props.onConfirm - Callback fired when the confirm button is clicked
53
+ * @param {() => void} props.onCancel - Callback fired when the cancel button is clicked or dialog is closed
54
+ * @param {ConfirmDialogType} props.type - Dialog type ('confirm' or 'delete') which affects styling and default text
55
+ * @param {string} [props.confirmButtonText] - Custom text for confirm button
56
+ * @param {string} [props.cancelButtonText] - Custom text for cancel button
57
+ * @param {MaxWidthSize} [props.maxWidth='xl'] - Maximum width of the dialog
58
+ *
59
+ * @returns {React.ReactElement} A Dialog component with header, message, and action buttons
60
+ *
61
+ * @example
62
+ * // Basic confirmation dialog
63
+ * <ConfirmDialog
64
+ * isOpen={isOpen}
65
+ * type="confirm"
66
+ * title="Confirm Action"
67
+ * message="Are you sure you want to proceed?"
68
+ * onConfirm={() => handleAction()}
69
+ * onCancel={() => setIsOpen(false)}
70
+ * />
71
+ *
72
+ * @example
73
+ * // Delete confirmation dialog with custom buttons
74
+ * <ConfirmDialog
75
+ * isOpen={deleteOpen}
76
+ * type="delete"
77
+ * title="Delete Item"
78
+ * message="This action cannot be undone. All data will be permanently deleted."
79
+ * confirmButtonText="Yes, Delete"
80
+ * cancelButtonText="Keep Item"
81
+ * onConfirm={() => deleteItem()}
82
+ * onCancel={() => setDeleteOpen(false)}
83
+ * maxWidth="md"
84
+ * />
85
+ */
22
86
  export const ConfirmDialog: React.FC<ConfirmDialogProps> = ({
23
87
  isOpen,
24
88
  title,
@@ -1,18 +1,73 @@
1
1
  import { DialogHeader, Dialog as ShadcnDialog, DialogContent as ShadcnDialogContent, DialogTitle as ShadcnDialogTitle } from '@/shadcn-components/DataDisplay/Dialog/Dialog';
2
2
  import { ReactNode } from 'react';
3
3
 
4
+ /**
5
+ * Available max-width sizes for the dialog
6
+ */
4
7
  type MaxWidthSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
5
8
 
9
+ /**
10
+ * Props for the Dialog component
11
+ */
6
12
  type DialogProps = {
13
+ /** Function that renders the dialog content. Receives close callback to allow closing from within content */
7
14
  content: (props: { close: () => void }) => ReactNode;
15
+ /** Optional title displayed in the dialog header */
8
16
  title?: string | undefined;
17
+ /** Callback function triggered when the dialog is closed */
9
18
  onClose: () => void;
19
+ /** Whether the dialog is open and visible */
10
20
  open: boolean;
21
+ /** Optional CSS class names for the dialog content element */
11
22
  className?: string;
23
+ /** Whether to show the close button in the dialog header. Defaults to true */
12
24
  showCloseButton?: boolean;
25
+ /** Max-width size class of the dialog. Defaults to 'lg' */
13
26
  maxWidth?: MaxWidthSize;
14
27
  };
15
28
 
29
+ /**
30
+ * Dialog component that wraps shadcn/ui Dialog with additional features and sensible defaults.
31
+ *
32
+ * This component provides a controlled dialog with optional header, configurable width,
33
+ * and flexible content rendering with a close callback for self-closing from within the content.
34
+ *
35
+ * @component
36
+ * @param {DialogProps} props - The component props
37
+ * @param {(props: { close: () => void }) => ReactNode} props.content - Render function for dialog content
38
+ * @param {() => void} props.onClose - Callback fired when the dialog is closed
39
+ * @param {boolean} props.open - Whether the dialog is currently open
40
+ * @param {string} [props.title] - Optional dialog title
41
+ * @param {string} [props.className] - Optional CSS classes for the dialog content
42
+ * @param {boolean} [props.showCloseButton=true] - Whether to show the close button
43
+ * @param {MaxWidthSize} [props.maxWidth='lg'] - Maximum width of the dialog
44
+ *
45
+ * @returns {React.ReactElement} A Dialog component with optional header and flexible content
46
+ *
47
+ * @example
48
+ * // Simple dialog with title
49
+ * <Dialog
50
+ * open={isOpen}
51
+ * title="Delete Item"
52
+ * onClose={() => setIsOpen(false)}
53
+ * content={({ close }) => (
54
+ * <div>
55
+ * <p>Are you sure?</p>
56
+ * <button onClick={close}>Cancel</button>
57
+ * </div>
58
+ * )}
59
+ * />
60
+ *
61
+ * @example
62
+ * // Dialog without title and custom width
63
+ * <Dialog
64
+ * open={showDialog}
65
+ * onClose={handleClose}
66
+ * maxWidth="sm"
67
+ * showCloseButton={false}
68
+ * content={({ close }) => <FormComponent onSubmit={close} />}
69
+ * />
70
+ */
16
71
  const Dialog = ({
17
72
  onClose,
18
73
  title,
@@ -6,19 +6,83 @@ import {
6
6
  } from '@/shadcn-components/DataDisplay/Dialog/Dialog';
7
7
  import { ReactNode, useState } from 'react';
8
8
 
9
+ /**
10
+ * Available max-width sizes for the dialog
11
+ */
9
12
  type MaxWidthSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
10
13
 
14
+ /**
15
+ * Props for the DialogButton component
16
+ */
11
17
  export type DialogButtonProps = {
18
+ /** Function that renders the dialog trigger element. Receives open callback to open the dialog */
12
19
  anchor: (props: { open: () => void }) => ReactNode;
20
+ /** Optional callback fired when the dialog opens */
13
21
  onDialogOpen?: () => void;
22
+ /** Optional callback fired when the dialog closes */
14
23
  onDialogClose?: () => void;
24
+ /** Function that renders the dialog content. Receives close callback to close the dialog */
15
25
  content: (props: { close: () => void }) => ReactNode;
26
+ /** Optional title displayed in the dialog header */
16
27
  title?: string | undefined;
28
+ /** Optional CSS class names for the dialog content element */
17
29
  className?: string;
30
+ /** Whether to show the close button in the dialog header. Defaults to true */
18
31
  showCloseButton?: boolean;
32
+ /** Max-width size class of the dialog. Defaults to 'lg' */
19
33
  maxWidth?: MaxWidthSize;
20
34
  };
21
35
 
36
+ /**
37
+ * DialogButton component that combines a trigger element and a dialog in a single component.
38
+ *
39
+ * This is a convenient wrapper that manages its own open/close state and provides
40
+ * a clean API for rendering both the trigger (anchor) and the dialog content.
41
+ * It's useful when you want to bind a button or other trigger element with a dialog
42
+ * without managing state at the parent level.
43
+ *
44
+ * @component
45
+ * @param {DialogButtonProps} props - The component props
46
+ * @param {(props: { open: () => void }) => ReactNode} props.anchor - Render function for the trigger element
47
+ * @param {(props: { close: () => void }) => ReactNode} props.content - Render function for dialog content
48
+ * @param {string} [props.title] - Optional dialog title
49
+ * @param {() => void} [props.onDialogOpen] - Optional callback fired when the dialog opens
50
+ * @param {() => void} [props.onDialogClose] - Optional callback fired when the dialog closes
51
+ * @param {string} [props.className] - Optional CSS classes for the dialog content
52
+ * @param {boolean} [props.showCloseButton=true] - Whether to show the close button
53
+ * @param {MaxWidthSize} [props.maxWidth='lg'] - Maximum width of the dialog
54
+ *
55
+ * @returns {React.ReactElement} A fragment containing the anchor element and the Dialog
56
+ *
57
+ * @example
58
+ * // Button that opens a dialog with a form
59
+ * <DialogButton
60
+ * anchor={({ open }) => <button onClick={open}>Edit Profile</button>}
61
+ * title="Edit Profile"
62
+ * content={({ close }) => (
63
+ * <form onSubmit={(e) => { handleSubmit(e); close(); }}>
64
+ * <input type="text" placeholder="Name" />
65
+ * <button type="submit">Save</button>
66
+ * </form>
67
+ * )}
68
+ * />
69
+ *
70
+ * @example
71
+ * // With callbacks and custom styling
72
+ * <DialogButton
73
+ * anchor={({ open }) => <IconButton icon={<EditIcon />} onClick={open} />}
74
+ * title="Delete Item"
75
+ * maxWidth="sm"
76
+ * onDialogOpen={() => console.log('Dialog opened')}
77
+ * onDialogClose={() => console.log('Dialog closed')}
78
+ * content={({ close }) => (
79
+ * <div>
80
+ * <p>Are you sure?</p>
81
+ * <button onClick={close}>Cancel</button>
82
+ * </div>
83
+ * )}
84
+ * />
85
+ */
22
86
  export const DialogButton = ({
23
87
  onDialogClose,
24
88
  onDialogOpen,
@@ -7,20 +7,93 @@ import {
7
7
  } from '@/shadcn-components/Navigation/DropdownMenu/DropdownMenu';
8
8
  import { ReactNode, useEffect, useRef, useState } from 'react';
9
9
 
10
+ /**
11
+ * Props for the DropdownMenu component
12
+ */
10
13
  export type DropdownMenuProps = {
14
+ /** Function that renders the dropdown trigger element. Receives open callback to open the dropdown */
11
15
  anchor: (props: { open: (e: any) => void }) => ReactNode;
16
+ /** Array of menu items or a function that returns menu items. Can be static or dynamic */
12
17
  menu?: ReactNode[] | ((props: { close: () => void }) => ReactNode[]);
18
+ /** Custom slot for rendering the entire menu content. Takes precedence over menu when useMenuSlot is true */
13
19
  menuSlot?: (props: { close: () => void }) => ReactNode;
20
+ /** Whether to use menuSlot instead of menu items. Defaults to false */
14
21
  useMenuSlot?: boolean;
22
+ /** Optional CSS class names for the menu content container */
15
23
  menuContentClassName?: string;
24
+ /** Optional CSS class names for the menu list wrapper div */
16
25
  menuListClassName?: string;
26
+ /** Optional React element or component to render above the menu items */
17
27
  menuHeader?: ReactNode;
28
+ /** Optional React element or component to render below the menu items */
18
29
  menuFooter?: ReactNode;
30
+ /** Optional async callback fired when the menu is scrolled, useful for infinite scroll */
19
31
  handleMenuScroll?: (event: any) => Promise<void>;
32
+ /** Horizontal alignment of the dropdown menu relative to the trigger. Defaults to 'end' */
20
33
  align?: 'start' | 'center' | 'end';
34
+ /** Vertical placement of the dropdown menu relative to the trigger. Defaults to 'bottom' */
21
35
  side?: 'top' | 'right' | 'bottom' | 'left';
22
36
  };
23
37
 
38
+ /**
39
+ * DropdownMenu component that provides a flexible dropdown menu with trigger element and menu content.
40
+ *
41
+ * This component wraps shadcn/ui's DropdownMenu and adds support for dynamic menu items,
42
+ * header/footer sections, and custom scroll handling. It manages its own open/close state
43
+ * and provides a convenient API for both static and dynamic menu items.
44
+ *
45
+ * @component
46
+ * @param {DropdownMenuProps} props - The component props
47
+ * @param {(props: { open: (e: any) => void }) => ReactNode} props.anchor - Render function for the trigger element
48
+ * @param {ReactNode[] | ((props: { close: () => void }) => ReactNode[])} [props.menu] - Menu items array or function
49
+ * @param {(props: { close: () => void }) => ReactNode} [props.menuSlot] - Custom menu content renderer
50
+ * @param {boolean} [props.useMenuSlot=false] - Whether to use menuSlot instead of menu items
51
+ * @param {string} [props.menuContentClassName] - CSS classes for the menu content container
52
+ * @param {string} [props.menuListClassName] - CSS classes for the menu list wrapper
53
+ * @param {ReactNode} [props.menuHeader] - Content to display above the menu items
54
+ * @param {ReactNode} [props.menuFooter] - Content to display below the menu items
55
+ * @param {(event: any) => Promise<void>} [props.handleMenuScroll] - Async callback for scroll events
56
+ * @param {'start' | 'center' | 'end'} [props.align='end'] - Horizontal alignment of the menu
57
+ * @param {'top' | 'right' | 'bottom' | 'left'} [props.side='bottom'] - Vertical placement of the menu
58
+ *
59
+ * @returns {React.ReactElement} A dropdown menu component with trigger and content
60
+ *
61
+ * @example
62
+ * // Simple dropdown with static menu items
63
+ * <DropdownMenu
64
+ * anchor={({ open }) => <button onClick={open}>Actions</button>}
65
+ * menu={[
66
+ * <button key="1">Edit</button>,
67
+ * <button key="2">Delete</button>,
68
+ * ]}
69
+ * />
70
+ *
71
+ * @example
72
+ * // Dropdown with dynamic menu items and header
73
+ * <DropdownMenu
74
+ * anchor={({ open }) => <IconButton icon={<MoreIcon />} onClick={open} />}
75
+ * menu={({ close }) => items.map(item => (
76
+ * <button key={item.id} onClick={() => { selectItem(item); close(); }}>
77
+ * {item.name}
78
+ * </button>
79
+ * ))}
80
+ * menuHeader={<span className="px-2 py-1 text-sm font-semibold">Options</span>}
81
+ * align="start"
82
+ * />
83
+ *
84
+ * @example
85
+ * // Dropdown with infinite scroll
86
+ * <DropdownMenu
87
+ * anchor={({ open }) => <button onClick={open}>Load More</button>}
88
+ * menu={filteredItems}
89
+ * menuFooter={<span className="text-xs text-muted">Showing {items.length} items</span>}
90
+ * handleMenuScroll={async (e) => {
91
+ * if (isNearBottom(e)) {
92
+ * await loadMoreItems();
93
+ * }
94
+ * }}
95
+ * />
96
+ */
24
97
  export const DropdownMenu = ({
25
98
  menu = [],
26
99
  menuSlot,
@@ -19,15 +19,69 @@ type FileInfo = {
19
19
  url: string;
20
20
  };
21
21
 
22
+ /**
23
+ * Props for the PreviewFiles component
24
+ */
22
25
  export type PreviewFilesProps = {
26
+ /** Array of files or single file to display. Can be File objects or string URLs. Accepts null for empty state */
23
27
  files: File[] | File | string[] | string | null;
28
+ /** Optional label text displayed above the file list */
24
29
  label?: string;
30
+ /** Optional callback fired when files are deleted. Receives remaining files array and deleted file */
25
31
  onChange?: (newFiles: File[], deletedFile: File) => void;
32
+ /** Whether to show download button for each file. Defaults to false */
26
33
  showDownload?: boolean;
34
+ /** Whether to hide the delete button for each file. Defaults to false */
27
35
  hideDelete?: boolean;
36
+ /** Optional CSS class names for the container element */
28
37
  className?: string;
29
38
  };
30
39
 
40
+ /**
41
+ * PreviewFiles component that displays a list of files with preview, download, and delete functionality.
42
+ *
43
+ * This component renders file items in a grid/list format with icons, sizes, and action buttons.
44
+ * It supports both File objects and URL strings, automatically fetching file information for remote files.
45
+ * Users can preview files by clicking on them, download them, and delete them from the list.
46
+ *
47
+ * @component
48
+ * @param {PreviewFilesProps} props - The component props
49
+ * @param {File[] | File | string[] | string | null} props.files - Files to display (File objects or URLs)
50
+ * @param {string} [props.label] - Optional label text displayed above the file list
51
+ * @param {(newFiles: File[], deletedFile: File) => void} [props.onChange] - Callback when files are deleted
52
+ * @param {boolean} [props.showDownload=false] - Whether to show download button
53
+ * @param {boolean} [props.hideDelete=false] - Whether to hide delete button
54
+ * @param {string} [props.className] - Optional CSS classes for the container
55
+ *
56
+ * @returns {React.ReactElement | null} A div containing the file list, or null if no files
57
+ *
58
+ * @example
59
+ * // Display File objects with delete capability
60
+ * <PreviewFiles
61
+ * files={uploadedFiles}
62
+ * label="Uploaded Files"
63
+ * onChange={(newFiles, deleted) => setFiles(newFiles)}
64
+ * />
65
+ *
66
+ * @example
67
+ * // Display remote files with download button
68
+ * <PreviewFiles
69
+ * files={['https://example.com/file1.pdf', 'https://example.com/file2.docx']}
70
+ * label="Documents"
71
+ * showDownload={true}
72
+ * hideDelete={true}
73
+ * />
74
+ *
75
+ * @example
76
+ * // Mixed files with custom styling
77
+ * <PreviewFiles
78
+ * files={[file1, 'https://example.com/file.pdf']}
79
+ * label="Files"
80
+ * showDownload={true}
81
+ * onChange={handleFileDelete}
82
+ * className="bg-gray-50 p-4 rounded-lg"
83
+ * />
84
+ */
31
85
  export const PreviewFiles = ({
32
86
  files,
33
87
  label,
@@ -234,6 +288,16 @@ export const PreviewFiles = ({
234
288
  );
235
289
  };
236
290
 
291
+ /**
292
+ * Formats a file size in bytes to a human-readable string.
293
+ *
294
+ * @param {number} size - File size in bytes
295
+ * @returns {string} Formatted file size (e.g., "1.5 MB", "256 KB")
296
+ *
297
+ * @example
298
+ * formatFileSize(1024) // "1.00 KB"
299
+ * formatFileSize(1048576) // "1.00 MB"
300
+ */
237
301
  const formatFileSize = (size: number) => {
238
302
  if (size < 1024) return `${size} bytes`;
239
303
  if (size < 1048576) return `${(size / 1024).toFixed(2)} KB`;
@@ -241,6 +305,15 @@ const formatFileSize = (size: number) => {
241
305
  return `${(size / 1073741824).toFixed(2)} GB`;
242
306
  };
243
307
 
308
+ /**
309
+ * Returns the appropriate icon component for a file based on its MIME type.
310
+ *
311
+ * @param {File | FileInfo} file - File object to get icon for
312
+ * @returns {React.ReactElement} Icon component for the file type
313
+ *
314
+ * @example
315
+ * getFileIcon(file) // Returns Image icon for image files, FileText for PDFs, etc.
316
+ */
244
317
  const getFileIcon = (file: File | FileInfo) => {
245
318
  const IconComponent =
246
319
  Object.entries(FILE_TYPE_ICON_MAP).find(([key]) =>
@@ -249,6 +322,16 @@ const getFileIcon = (file: File | FileInfo) => {
249
322
  return <IconComponent size={30} />;
250
323
  };
251
324
 
325
+ /**
326
+ * Creates a FileInfo object from a URL string, extracting file name and MIME type.
327
+ *
328
+ * @param {string} fileUrl - URL of the file
329
+ * @returns {FileInfo} FileInfo object with name, type, and url
330
+ *
331
+ * @example
332
+ * createFileInfoFromUrl('https://example.com/document.pdf')
333
+ * // Returns { name: 'document.pdf', type: 'application/pdf', size: 0, url: '...' }
334
+ */
252
335
  const createFileInfoFromUrl = (fileUrl: string): FileInfo => {
253
336
  const fileName = fileUrl.split('/').pop() || 'unknown_file';
254
337
  const extension = Object.keys(EXTENSION_TO_MIME_TYPE).find((ext) =>
@@ -266,6 +349,16 @@ const createFileInfoFromUrl = (fileUrl: string): FileInfo => {
266
349
  };
267
350
  };
268
351
 
352
+ /**
353
+ * Fetches the file size for a remote file by making a HEAD request or partial GET request.
354
+ *
355
+ * @param {string} url - URL of the file to fetch size for
356
+ * @returns {Promise<number>} File size in bytes, or 0 if unable to determine
357
+ *
358
+ * @example
359
+ * const size = await fetchFileSizeAsync('https://example.com/file.pdf');
360
+ * console.log(size); // File size in bytes
361
+ */
269
362
  const fetchFileSizeAsync = async (url: string): Promise<number> => {
270
363
  try {
271
364
  const response = await fetch(url, { method: 'HEAD' });
@@ -3,37 +3,83 @@ import HorizontalStepper from './HorizontalStepper';
3
3
  import VerticalStepper from './VerticalStepper';
4
4
 
5
5
  /**
6
- * Interface for individual step items
6
+ * Interface for individual step items in the stepper
7
7
  */
8
8
  export interface StepItem {
9
- /** The label text for the step */
9
+ /** The label text displayed for this step */
10
10
  label: string;
11
- /** Optional description text shown below the label */
11
+ /** Optional description text shown below the label for additional context */
12
12
  description?: string;
13
13
  }
14
14
 
15
15
  /**
16
- * Props for the Stepper Variant components
16
+ * Props for the Stepper variant components (HorizontalStepper and VerticalStepper)
17
17
  */
18
18
  export interface StepperVariantProps {
19
- /** Current active step index (0-based) */
19
+ /** Current active step index (0-based). Determines which step is highlighted */
20
20
  activeStep: number;
21
21
  /** Array of step items with labels and optional descriptions */
22
22
  steps: StepItem[];
23
- /** Additional className for the container */
23
+ /** Additional CSS class names for the stepper container element */
24
24
  containerClassName?: string;
25
- /** Callback function called when a step is clicked. Receives the step index as parameter */
25
+ /** Callback function fired when a step is clicked. Receives the step index (0-based) as parameter */
26
26
  onStepClick?: (stepIndex: number) => void;
27
- /** Whether to allow navigation by clicking on steps. Defaults to true */
27
+ /** Whether to allow users to navigate by clicking on steps. Defaults to true */
28
28
  allowNavigation?: boolean;
29
29
  }
30
+
31
+ /**
32
+ * Props for the Stepper component
33
+ */
30
34
  export type StepperProps = StepperVariantProps & {
31
- /** Orientation of the stepper - horizontal or vertical */
35
+ /** Orientation of the stepper layout - 'horizontal' displays steps left-to-right, 'vertical' displays top-to-bottom. Defaults to 'horizontal' */
32
36
  orientation?: 'vertical' | 'horizontal';
33
37
  };
34
38
 
35
39
  /**
36
- * Main Stepper component that handles both horizontal and vertical orientations
40
+ * Stepper component that displays a progress indicator with multiple steps.
41
+ *
42
+ * This is a wrapper component that renders either HorizontalStepper or VerticalStepper
43
+ * based on the orientation prop. It provides a visual representation of progress through
44
+ * a sequence of steps, with optional click handlers for step navigation.
45
+ *
46
+ * @component
47
+ * @param {StepperProps} props - The component props
48
+ * @param {number} props.activeStep - Index of the currently active step (0-based)
49
+ * @param {StepItem[]} props.steps - Array of steps with label and optional description
50
+ * @param {'horizontal' | 'vertical'} [props.orientation='horizontal'] - Layout orientation
51
+ * @param {string} [props.containerClassName] - Optional CSS classes for the container
52
+ * @param {(stepIndex: number) => void} [props.onStepClick] - Callback when a step is clicked
53
+ * @param {boolean} [props.allowNavigation=true] - Whether clicking on steps navigates between them
54
+ *
55
+ * @returns {React.ReactElement} A HorizontalStepper or VerticalStepper component
56
+ *
57
+ * @example
58
+ * // Horizontal stepper (default)
59
+ * <Stepper
60
+ * activeStep={1}
61
+ * steps={[
62
+ * { label: 'Step 1', description: 'Enter details' },
63
+ * { label: 'Step 2', description: 'Confirm' },
64
+ * { label: 'Step 3', description: 'Complete' }
65
+ * ]}
66
+ * onStepClick={(index) => setActiveStep(index)}
67
+ * />
68
+ *
69
+ * @example
70
+ * // Vertical stepper with custom styling
71
+ * <Stepper
72
+ * orientation="vertical"
73
+ * activeStep={2}
74
+ * steps={[
75
+ * { label: 'Personal Info' },
76
+ * { label: 'Address' },
77
+ * { label: 'Payment' },
78
+ * { label: 'Review' }
79
+ * ]}
80
+ * containerClassName="bg-gray-50 p-6 rounded"
81
+ * allowNavigation={false}
82
+ * />
37
83
  */
38
84
  const Stepper: React.FC<StepperProps> = ({
39
85
  orientation = 'horizontal',
@@ -8,25 +8,105 @@ import {
8
8
  } from '@/shadcn-components/Navigation/Tabs/Tabs';
9
9
  import { useEffect, useState } from 'react';
10
10
 
11
+ /**
12
+ * Configuration for an individual tab in TabsContainer
13
+ */
11
14
  interface CustomTabProps {
15
+ /** Unique identifier for the tab. Can be string or number */
12
16
  key: string | number;
17
+ /** Display label or React element for the tab trigger */
13
18
  label: React.ReactNode;
19
+ /** React component or element to render when this tab is active */
14
20
  component: React.ReactNode;
21
+ /** Whether to show a highlight indicator (dot) on the tab trigger. Defaults to false */
15
22
  highlight?: boolean;
23
+ /** Whether the tab is disabled and cannot be selected. Defaults to false */
16
24
  disabled?: boolean;
25
+ /** Optional icon or React element to display before the label */
17
26
  icon?: React.ReactNode;
18
27
  }
19
28
 
29
+ /**
30
+ * Props for the TabsContainer component
31
+ */
20
32
  export interface TabsContainerProps {
33
+ /** Array of tab configurations with labels, content, and optional metadata */
21
34
  tabs: CustomTabProps[];
35
+ /** Optional callback fired when a tab is selected. Receives the tab key as parameter */
22
36
  onTabChange?: (tabKey: string) => void;
37
+ /** Index of the tab to show initially. Defaults to 0 (first tab) */
23
38
  currentTabIndex?: number;
39
+ /** Optional CSS class names for the Tabs root element */
24
40
  className?: string;
41
+ /** Optional CSS class names for the TabsList container */
25
42
  tabsListClassName?: string;
43
+ /** Optional CSS class names for each TabsTrigger element */
26
44
  tabsTriggerClassName?: string;
45
+ /** Layout variant - 'fixed' uses viewport height, 'dynamic' uses content height. Defaults to 'fixed' */
27
46
  variant?: 'fixed' | 'dynamic';
28
47
  }
29
48
 
49
+ /**
50
+ * TabsContainer component that displays tabbed content with a tab list and content area.
51
+ *
52
+ * This component provides a responsive tab interface with support for icons, highlights,
53
+ * disabled states, and two layout modes (fixed height for viewport or dynamic height for content).
54
+ * It manages tab selection state and provides callbacks for external state management.
55
+ *
56
+ * @component
57
+ * @param {TabsContainerProps} props - The component props
58
+ * @param {CustomTabProps[]} props.tabs - Array of tab configurations
59
+ * @param {(tabKey: string) => void} [props.onTabChange] - Callback when a tab is selected
60
+ * @param {number} [props.currentTabIndex=0] - Initially active tab index
61
+ * @param {string} [props.className] - CSS classes for the Tabs root
62
+ * @param {string} [props.tabsListClassName] - CSS classes for the TabsList
63
+ * @param {string} [props.tabsTriggerClassName] - CSS classes for TabsTrigger elements
64
+ * @param {'fixed' | 'dynamic'} [props.variant='fixed'] - Layout mode for tab content
65
+ *
66
+ * @returns {React.ReactElement} A Tabs component with tab list and content area
67
+ *
68
+ * @example
69
+ * // Basic tabs
70
+ * <TabsContainer
71
+ * tabs={[
72
+ * { key: 'tab1', label: 'Overview', component: <OverviewPanel /> },
73
+ * { key: 'tab2', label: 'Details', component: <DetailsPanel /> },
74
+ * ]}
75
+ * onTabChange={(key) => console.log('Selected:', key)}
76
+ * />
77
+ *
78
+ * @example
79
+ * // Tabs with icons and highlights
80
+ * <TabsContainer
81
+ * tabs={[
82
+ * {
83
+ * key: 'notifications',
84
+ * label: 'Notifications',
85
+ * icon: <BellIcon />,
86
+ * component: <NotificationsList />,
87
+ * highlight: unreadCount > 0
88
+ * },
89
+ * {
90
+ * key: 'settings',
91
+ * label: 'Settings',
92
+ * icon: <SettingsIcon />,
93
+ * component: <SettingsPanel />
94
+ * },
95
+ * ]}
96
+ * variant="dynamic"
97
+ * className="min-h-screen"
98
+ * />
99
+ *
100
+ * @example
101
+ * // Tabs with disabled state
102
+ * <TabsContainer
103
+ * tabs={[
104
+ * { key: 'basic', label: 'Basic Info', component: <BasicForm /> },
105
+ * { key: 'advanced', label: 'Advanced', component: <AdvancedForm />, disabled: !basicComplete },
106
+ * ]}
107
+ * currentTabIndex={0}
108
+ * />
109
+ */
30
110
  export const TabsContainer = ({
31
111
  tabs,
32
112
  onTabChange,