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

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 (263) 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 +96 -1
  23. package/dist/cjs/types/src/components/DataDisplay/DataTable/components/CardsView.d.ts +14 -2
  24. package/dist/cjs/types/src/components/DataDisplay/DataTable/components/TablePagination.d.ts +35 -0
  25. package/dist/cjs/types/src/components/DataDisplay/EmptyIllustration/EmptyIllustration.d.ts +30 -0
  26. package/dist/cjs/types/src/components/DataDisplay/ReactJoyride/ReactJoyride.d.ts +64 -0
  27. package/dist/cjs/types/src/components/DataDisplay/Separator/Separator.d.ts +30 -0
  28. package/dist/cjs/types/src/components/DataDisplay/Skeleton/Skeleton.d.ts +20 -0
  29. package/dist/cjs/types/src/components/DataDisplay/StatusCard/StatusCard.d.ts +36 -0
  30. package/dist/cjs/types/src/components/DataDisplay/Timeline/Timeline.d.ts +58 -0
  31. package/dist/cjs/types/src/components/DataDisplay/Typography/Typography.d.ts +25 -0
  32. package/dist/cjs/types/src/components/Feedback/Alert/Alert.d.ts +31 -0
  33. package/dist/cjs/types/src/components/Feedback/Snackbar/Snackbar.d.ts +54 -0
  34. package/dist/cjs/types/src/components/Feedback/Spinner/Spinner.d.ts +15 -0
  35. package/dist/cjs/types/src/components/Feedback/Tooltip/Tooltip.d.ts +54 -0
  36. package/dist/cjs/types/src/components/Input/Button/Button.d.ts +26 -0
  37. package/dist/cjs/types/src/components/Input/DatePicker/DatePicker.d.ts +41 -0
  38. package/dist/cjs/types/src/components/Input/DateTimePicker/DateTimePicker.d.ts +42 -0
  39. package/dist/cjs/types/src/components/Input/FileUpload/FileUpload.d.ts +41 -0
  40. package/dist/cjs/types/src/components/Input/FormActions/FormActions.d.ts +37 -0
  41. package/dist/cjs/types/src/components/Input/FormControlWrapper/FormControlWrapper.d.ts +31 -0
  42. package/dist/cjs/types/src/components/Input/FormWrapper/FormWrapper.d.ts +20 -0
  43. package/dist/cjs/types/src/components/Input/HelpButton/HelpButton.d.ts +14 -0
  44. package/dist/cjs/types/src/components/Input/IconButtons/IconButtons/DeleteButton.d.ts +16 -0
  45. package/dist/cjs/types/src/components/Input/IconButtons/IconButtons/EditButton.d.ts +16 -0
  46. package/dist/cjs/types/src/components/Input/IconButtons/IconButtons/RedirectButton.d.ts +16 -0
  47. package/dist/cjs/types/src/components/Input/IconButtons/IconButtons/ViewButton.d.ts +16 -0
  48. package/dist/cjs/types/src/components/Input/IconButtons/IconButtons.d.ts +18 -0
  49. package/dist/cjs/types/src/components/Input/LabelWrapper/LabelWrapper.d.ts +26 -0
  50. package/dist/cjs/types/src/components/Input/MultiCheckBox/MultiCheckBox.d.ts +34 -0
  51. package/dist/cjs/types/src/components/Input/MultiSelect/MultiSelect.d.ts +40 -0
  52. package/dist/cjs/types/src/components/Input/OtpInput/OtpInput.d.ts +29 -0
  53. package/dist/cjs/types/src/components/Input/PasswordField/PasswordField.d.ts +34 -0
  54. package/dist/cjs/types/src/components/Input/RadioGroup/RadioGroup.d.ts +38 -0
  55. package/dist/cjs/types/src/components/Input/SearchBar/SearchBar.d.ts +26 -0
  56. package/dist/cjs/types/src/components/Input/Select/Select.d.ts +32 -0
  57. package/dist/cjs/types/src/components/Input/SingleCheckBox/SingleCheckBox.d.ts +29 -0
  58. package/dist/cjs/types/src/components/Input/SingleSelect/SingleSelect.d.ts +40 -0
  59. package/dist/cjs/types/src/components/Input/Switch/Switch.d.ts +23 -0
  60. package/dist/cjs/types/src/components/Input/Tags/Tags.d.ts +26 -0
  61. package/dist/cjs/types/src/components/Input/TextField/TextField.d.ts +35 -0
  62. package/dist/cjs/types/src/components/Input/Textarea/Textarea.d.ts +36 -0
  63. package/dist/cjs/types/src/components/Layout/AppLayout/AppLayout.d.ts +32 -0
  64. package/dist/cjs/types/src/components/Layout/AppLayout/components/MenuToggleButton.d.ts +16 -0
  65. package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/MenuBar.d.ts +26 -0
  66. package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/MenuItem.d.ts +37 -0
  67. package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/Sidebar.d.ts +30 -1
  68. package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/StyledComponents.d.ts +139 -0
  69. package/dist/cjs/types/src/components/Layout/AppLayout/components/UserProfilePopup.d.ts +34 -0
  70. package/dist/cjs/types/src/components/Layout/AppLayout/context/SidebarContext.d.ts +48 -0
  71. package/dist/cjs/types/src/components/Layout/AppLayout/types.d.ts +1 -1
  72. package/dist/cjs/types/src/components/Layout/PageContent/PageContent.d.ts +21 -1
  73. package/dist/cjs/types/src/components/Layout/PageHeader/PageHeader.d.ts +46 -0
  74. package/dist/cjs/types/src/components/Layout/PageHeader/components/SearchBar.d.ts +22 -0
  75. package/dist/cjs/types/src/components/Layout/UserBox/UserBox.d.ts +40 -0
  76. package/dist/cjs/types/src/components/Navigation/Breadcrumbs/Breadcrumbs.d.ts +33 -0
  77. package/dist/cjs/types/src/components/Navigation/Calendar/Calendar.d.ts +63 -0
  78. package/dist/cjs/types/src/components/Navigation/ConfirmDialog/ConfirmDialog.d.ts +64 -0
  79. package/dist/cjs/types/src/components/Navigation/Dialog/Dialog.d.ts +55 -0
  80. package/dist/cjs/types/src/components/Navigation/DialogButton/DialogButton.d.ts +64 -0
  81. package/dist/cjs/types/src/components/Navigation/DropDownMenu/DropDownMenu.d.ts +73 -0
  82. package/dist/cjs/types/src/components/Navigation/PreviewFiles/PreviewFiles.d.ts +54 -0
  83. package/dist/cjs/types/src/components/Navigation/Stepper/Stepper.d.ts +55 -10
  84. package/dist/cjs/types/src/components/Navigation/TabsContainer/TabsContainer.d.ts +85 -1
  85. package/dist/cjs/types/src/components/Navigation/UploadDialog/UploadDialog.d.ts +64 -0
  86. package/dist/cjs/types/src/shadcn-components/Input/Button/Button.d.ts +1 -1
  87. package/dist/esm/index.js +2 -2
  88. package/dist/esm/types/src/components/Assets/ErrorPages/ComingSoon.d.ts +24 -0
  89. package/dist/esm/types/src/components/Assets/ErrorPages/InternalServerError.d.ts +20 -0
  90. package/dist/esm/types/src/components/Assets/ErrorPages/NoInternetConnection.d.ts +20 -0
  91. package/dist/esm/types/src/components/Assets/ErrorPages/NoItemFound.d.ts +28 -0
  92. package/dist/esm/types/src/components/Assets/ErrorPages/PageNotFound.d.ts +21 -0
  93. package/dist/esm/types/src/components/Assets/ErrorPages/ResourceNotFound.d.ts +21 -0
  94. package/dist/esm/types/src/components/Assets/ErrorPages/UnAuthorized.d.ts +31 -0
  95. package/dist/esm/types/src/components/Assets/Icons/Icons.d.ts +54 -0
  96. package/dist/esm/types/src/components/Charts/BarChart/BarChart.d.ts +38 -0
  97. package/dist/esm/types/src/components/Charts/BarChart/HorizontalBarChart.d.ts +93 -0
  98. package/dist/esm/types/src/components/Charts/BarChart/VerticalBarChart.d.ts +110 -0
  99. package/dist/esm/types/src/components/Charts/LineChart/LineChart.d.ts +89 -0
  100. package/dist/esm/types/src/components/Charts/PieChart/PieChart.d.ts +86 -0
  101. package/dist/esm/types/src/components/Charts/TreeMap/TreeMap.d.ts +74 -0
  102. package/dist/esm/types/src/components/DataDisplay/Accordion/Accordion.d.ts +54 -0
  103. package/dist/esm/types/src/components/DataDisplay/ActivityLogView/ActivityLogFilter.d.ts +35 -0
  104. package/dist/esm/types/src/components/DataDisplay/ActivityLogView/ActivityLogView.d.ts +78 -0
  105. package/dist/esm/types/src/components/DataDisplay/Avatar/Avatar.d.ts +40 -0
  106. package/dist/esm/types/src/components/DataDisplay/Chip/Chip.d.ts +28 -0
  107. package/dist/esm/types/src/components/DataDisplay/Chips/Chips.d.ts +55 -0
  108. package/dist/esm/types/src/components/DataDisplay/DataTable/DataTable.d.ts +96 -1
  109. package/dist/esm/types/src/components/DataDisplay/DataTable/components/CardsView.d.ts +14 -2
  110. package/dist/esm/types/src/components/DataDisplay/DataTable/components/TablePagination.d.ts +35 -0
  111. package/dist/esm/types/src/components/DataDisplay/EmptyIllustration/EmptyIllustration.d.ts +30 -0
  112. package/dist/esm/types/src/components/DataDisplay/ReactJoyride/ReactJoyride.d.ts +64 -0
  113. package/dist/esm/types/src/components/DataDisplay/Separator/Separator.d.ts +30 -0
  114. package/dist/esm/types/src/components/DataDisplay/Skeleton/Skeleton.d.ts +20 -0
  115. package/dist/esm/types/src/components/DataDisplay/StatusCard/StatusCard.d.ts +36 -0
  116. package/dist/esm/types/src/components/DataDisplay/Timeline/Timeline.d.ts +58 -0
  117. package/dist/esm/types/src/components/DataDisplay/Typography/Typography.d.ts +25 -0
  118. package/dist/esm/types/src/components/Feedback/Alert/Alert.d.ts +31 -0
  119. package/dist/esm/types/src/components/Feedback/Snackbar/Snackbar.d.ts +54 -0
  120. package/dist/esm/types/src/components/Feedback/Spinner/Spinner.d.ts +15 -0
  121. package/dist/esm/types/src/components/Feedback/Tooltip/Tooltip.d.ts +54 -0
  122. package/dist/esm/types/src/components/Input/Button/Button.d.ts +26 -0
  123. package/dist/esm/types/src/components/Input/DatePicker/DatePicker.d.ts +41 -0
  124. package/dist/esm/types/src/components/Input/DateTimePicker/DateTimePicker.d.ts +42 -0
  125. package/dist/esm/types/src/components/Input/FileUpload/FileUpload.d.ts +41 -0
  126. package/dist/esm/types/src/components/Input/FormActions/FormActions.d.ts +37 -0
  127. package/dist/esm/types/src/components/Input/FormControlWrapper/FormControlWrapper.d.ts +31 -0
  128. package/dist/esm/types/src/components/Input/FormWrapper/FormWrapper.d.ts +20 -0
  129. package/dist/esm/types/src/components/Input/HelpButton/HelpButton.d.ts +14 -0
  130. package/dist/esm/types/src/components/Input/IconButtons/IconButtons/DeleteButton.d.ts +16 -0
  131. package/dist/esm/types/src/components/Input/IconButtons/IconButtons/EditButton.d.ts +16 -0
  132. package/dist/esm/types/src/components/Input/IconButtons/IconButtons/RedirectButton.d.ts +16 -0
  133. package/dist/esm/types/src/components/Input/IconButtons/IconButtons/ViewButton.d.ts +16 -0
  134. package/dist/esm/types/src/components/Input/IconButtons/IconButtons.d.ts +18 -0
  135. package/dist/esm/types/src/components/Input/LabelWrapper/LabelWrapper.d.ts +26 -0
  136. package/dist/esm/types/src/components/Input/MultiCheckBox/MultiCheckBox.d.ts +34 -0
  137. package/dist/esm/types/src/components/Input/MultiSelect/MultiSelect.d.ts +40 -0
  138. package/dist/esm/types/src/components/Input/OtpInput/OtpInput.d.ts +29 -0
  139. package/dist/esm/types/src/components/Input/PasswordField/PasswordField.d.ts +34 -0
  140. package/dist/esm/types/src/components/Input/RadioGroup/RadioGroup.d.ts +38 -0
  141. package/dist/esm/types/src/components/Input/SearchBar/SearchBar.d.ts +26 -0
  142. package/dist/esm/types/src/components/Input/Select/Select.d.ts +32 -0
  143. package/dist/esm/types/src/components/Input/SingleCheckBox/SingleCheckBox.d.ts +29 -0
  144. package/dist/esm/types/src/components/Input/SingleSelect/SingleSelect.d.ts +40 -0
  145. package/dist/esm/types/src/components/Input/Switch/Switch.d.ts +23 -0
  146. package/dist/esm/types/src/components/Input/Tags/Tags.d.ts +26 -0
  147. package/dist/esm/types/src/components/Input/TextField/TextField.d.ts +35 -0
  148. package/dist/esm/types/src/components/Input/Textarea/Textarea.d.ts +36 -0
  149. package/dist/esm/types/src/components/Layout/AppLayout/AppLayout.d.ts +32 -0
  150. package/dist/esm/types/src/components/Layout/AppLayout/components/MenuToggleButton.d.ts +16 -0
  151. package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/MenuBar.d.ts +26 -0
  152. package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/MenuItem.d.ts +37 -0
  153. package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/Sidebar.d.ts +30 -1
  154. package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/StyledComponents.d.ts +139 -0
  155. package/dist/esm/types/src/components/Layout/AppLayout/components/UserProfilePopup.d.ts +34 -0
  156. package/dist/esm/types/src/components/Layout/AppLayout/context/SidebarContext.d.ts +48 -0
  157. package/dist/esm/types/src/components/Layout/AppLayout/types.d.ts +1 -1
  158. package/dist/esm/types/src/components/Layout/PageContent/PageContent.d.ts +21 -1
  159. package/dist/esm/types/src/components/Layout/PageHeader/PageHeader.d.ts +46 -0
  160. package/dist/esm/types/src/components/Layout/PageHeader/components/SearchBar.d.ts +22 -0
  161. package/dist/esm/types/src/components/Layout/UserBox/UserBox.d.ts +40 -0
  162. package/dist/esm/types/src/components/Navigation/Breadcrumbs/Breadcrumbs.d.ts +33 -0
  163. package/dist/esm/types/src/components/Navigation/Calendar/Calendar.d.ts +63 -0
  164. package/dist/esm/types/src/components/Navigation/ConfirmDialog/ConfirmDialog.d.ts +64 -0
  165. package/dist/esm/types/src/components/Navigation/Dialog/Dialog.d.ts +55 -0
  166. package/dist/esm/types/src/components/Navigation/DialogButton/DialogButton.d.ts +64 -0
  167. package/dist/esm/types/src/components/Navigation/DropDownMenu/DropDownMenu.d.ts +73 -0
  168. package/dist/esm/types/src/components/Navigation/PreviewFiles/PreviewFiles.d.ts +54 -0
  169. package/dist/esm/types/src/components/Navigation/Stepper/Stepper.d.ts +55 -10
  170. package/dist/esm/types/src/components/Navigation/TabsContainer/TabsContainer.d.ts +85 -1
  171. package/dist/esm/types/src/components/Navigation/UploadDialog/UploadDialog.d.ts +64 -0
  172. package/dist/esm/types/src/shadcn-components/Input/Button/Button.d.ts +1 -1
  173. package/dist/index.d.ts +2961 -16
  174. package/dist/styles.css +30 -81
  175. package/package.json +1 -1
  176. package/src/components/Assets/ErrorPages/ComingSoon.tsx +24 -0
  177. package/src/components/Assets/ErrorPages/InternalServerError.tsx +20 -0
  178. package/src/components/Assets/ErrorPages/NoInternetConnection.tsx +20 -0
  179. package/src/components/Assets/ErrorPages/NoItemFound.tsx +28 -0
  180. package/src/components/Assets/ErrorPages/PageNotFound.tsx +21 -0
  181. package/src/components/Assets/ErrorPages/ResourceNotFound.tsx +21 -0
  182. package/src/components/Assets/ErrorPages/UnAuthorized.tsx +31 -0
  183. package/src/components/Assets/Icons/Icons.tsx +55 -1
  184. package/src/components/Charts/BarChart/BarChart.tsx +38 -0
  185. package/src/components/Charts/BarChart/HorizontalBarChart.tsx +93 -0
  186. package/src/components/Charts/BarChart/VerticalBarChart.tsx +110 -0
  187. package/src/components/Charts/LineChart/LineChart.tsx +89 -0
  188. package/src/components/Charts/PieChart/PieChart.tsx +86 -0
  189. package/src/components/Charts/TreeMap/TreeMap.tsx +90 -0
  190. package/src/components/DataDisplay/Accordion/Accordion.tsx +54 -0
  191. package/src/components/DataDisplay/ActivityLogView/ActivityLogFilter.tsx +35 -0
  192. package/src/components/DataDisplay/ActivityLogView/ActivityLogView.tsx +84 -0
  193. package/src/components/DataDisplay/Avatar/Avatar.tsx +40 -0
  194. package/src/components/DataDisplay/Chip/Chip.tsx +28 -0
  195. package/src/components/DataDisplay/Chips/Chips.tsx +56 -0
  196. package/src/components/DataDisplay/DataTable/DataTable.tsx +109 -2
  197. package/src/components/DataDisplay/DataTable/components/CardsView.tsx +28 -13
  198. package/src/components/DataDisplay/DataTable/components/ColumnSelector/ColumnSelector.tsx +22 -4
  199. package/src/components/DataDisplay/DataTable/components/TableHeaders/TableActionHeader.tsx +9 -4
  200. package/src/components/DataDisplay/DataTable/components/TablePagination.tsx +35 -0
  201. package/src/components/DataDisplay/DataTable/components/TableView.tsx +5 -1
  202. package/src/components/DataDisplay/EmptyIllustration/EmptyIllustration.tsx +31 -0
  203. package/src/components/DataDisplay/ReactJoyride/ReactJoyride.tsx +64 -0
  204. package/src/components/DataDisplay/Separator/Separator.tsx +32 -0
  205. package/src/components/DataDisplay/Skeleton/Skeleton.tsx +20 -0
  206. package/src/components/DataDisplay/StatusCard/StatusCard.tsx +36 -0
  207. package/src/components/DataDisplay/Timeline/Timeline.tsx +58 -0
  208. package/src/components/DataDisplay/Typography/Typography.tsx +25 -0
  209. package/src/components/Feedback/Alert/Alert.tsx +38 -0
  210. package/src/components/Feedback/Snackbar/Snackbar.tsx +54 -0
  211. package/src/components/Feedback/Spinner/Spinner.tsx +15 -0
  212. package/src/components/Feedback/Tooltip/Tooltip.tsx +54 -0
  213. package/src/components/Input/Button/Button.tsx +26 -0
  214. package/src/components/Input/DatePicker/DatePicker.tsx +41 -0
  215. package/src/components/Input/DateTimePicker/DateTimePicker.tsx +42 -0
  216. package/src/components/Input/FileUpload/FileUpload.tsx +41 -0
  217. package/src/components/Input/FormActions/FormActions.tsx +37 -0
  218. package/src/components/Input/FormControlWrapper/FormControlWrapper.tsx +31 -0
  219. package/src/components/Input/FormWrapper/FormWrapper.tsx +20 -0
  220. package/src/components/Input/HelpButton/HelpButton.tsx +14 -0
  221. package/src/components/Input/IconButtons/IconButtons/DeleteButton.tsx +16 -0
  222. package/src/components/Input/IconButtons/IconButtons/EditButton.tsx +16 -0
  223. package/src/components/Input/IconButtons/IconButtons/RedirectButton.tsx +16 -0
  224. package/src/components/Input/IconButtons/IconButtons/ViewButton.tsx +16 -0
  225. package/src/components/Input/IconButtons/IconButtons.tsx +18 -0
  226. package/src/components/Input/LabelWrapper/LabelWrapper.tsx +26 -0
  227. package/src/components/Input/MultiCheckBox/MultiCheckBox.tsx +34 -0
  228. package/src/components/Input/MultiSelect/MultiSelect.tsx +40 -0
  229. package/src/components/Input/OtpInput/OtpInput.tsx +29 -0
  230. package/src/components/Input/PasswordField/PasswordField.tsx +34 -0
  231. package/src/components/Input/RadioGroup/RadioGroup.tsx +38 -0
  232. package/src/components/Input/SearchBar/SearchBar.tsx +26 -0
  233. package/src/components/Input/Select/Select.tsx +41 -0
  234. package/src/components/Input/SingleCheckBox/SingleCheckBox.tsx +29 -0
  235. package/src/components/Input/SingleSelect/SingleSelect.tsx +40 -0
  236. package/src/components/Input/Switch/Switch.tsx +23 -0
  237. package/src/components/Input/Tags/Tags.tsx +26 -0
  238. package/src/components/Input/TextField/TextField.tsx +35 -0
  239. package/src/components/Input/Textarea/Textarea.tsx +36 -0
  240. package/src/components/Layout/AppLayout/AppLayout.tsx +34 -11
  241. package/src/components/Layout/AppLayout/components/MenuToggleButton.tsx +16 -0
  242. package/src/components/Layout/AppLayout/components/Sidebar/MenuBar.tsx +26 -0
  243. package/src/components/Layout/AppLayout/components/Sidebar/MenuItem.tsx +51 -1
  244. package/src/components/Layout/AppLayout/components/Sidebar/Sidebar.tsx +173 -104
  245. package/src/components/Layout/AppLayout/components/Sidebar/StyledComponents.tsx +139 -9
  246. package/src/components/Layout/AppLayout/components/UserProfilePopup.tsx +35 -1
  247. package/src/components/Layout/AppLayout/context/SidebarContext.tsx +48 -0
  248. package/src/components/Layout/AppLayout/types.ts +1 -1
  249. package/src/components/Layout/PageContent/PageContent.tsx +23 -3
  250. package/src/components/Layout/PageHeader/PageHeader.tsx +68 -7
  251. package/src/components/Layout/PageHeader/components/SearchBar.tsx +22 -0
  252. package/src/components/Layout/UserBox/UserBox.tsx +40 -0
  253. package/src/components/Navigation/Breadcrumbs/Breadcrumbs.tsx +53 -4
  254. package/src/components/Navigation/Calendar/Calendar.tsx +63 -0
  255. package/src/components/Navigation/ConfirmDialog/ConfirmDialog.tsx +64 -0
  256. package/src/components/Navigation/Dialog/Dialog.tsx +62 -2
  257. package/src/components/Navigation/DialogButton/DialogButton.tsx +64 -0
  258. package/src/components/Navigation/DropDownMenu/DropDownMenu.tsx +73 -0
  259. package/src/components/Navigation/PreviewFiles/PreviewFiles.tsx +93 -0
  260. package/src/components/Navigation/Stepper/Stepper.tsx +56 -10
  261. package/src/components/Navigation/TabsContainer/TabsContainer.tsx +86 -1
  262. package/src/components/Navigation/UploadDialog/UploadDialog.tsx +64 -0
  263. package/src/shadcn-components/Layout/Sheet/Sheet.tsx +2 -2
@@ -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',
@@ -6,27 +6,110 @@ import {
6
6
  TabsList,
7
7
  TabsTrigger,
8
8
  } from '@/shadcn-components/Navigation/Tabs/Tabs';
9
- import { useEffect, useState } from 'react';
9
+ import { CSSProperties, 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
+ /** Optional inline styles for the TabsContent container */
46
+ tabsContainerStyles?: CSSProperties;
47
+ /** Layout variant - 'fixed' uses viewport height, 'dynamic' uses content height. Defaults to 'fixed' */
27
48
  variant?: 'fixed' | 'dynamic';
28
49
  }
29
50
 
51
+ /**
52
+ * TabsContainer component that displays tabbed content with a tab list and content area.
53
+ *
54
+ * This component provides a responsive tab interface with support for icons, highlights,
55
+ * disabled states, and two layout modes (fixed height for viewport or dynamic height for content).
56
+ * It manages tab selection state and provides callbacks for external state management.
57
+ *
58
+ * @component
59
+ * @param {TabsContainerProps} props - The component props
60
+ * @param {CustomTabProps[]} props.tabs - Array of tab configurations
61
+ * @param {(tabKey: string) => void} [props.onTabChange] - Callback when a tab is selected
62
+ * @param {number} [props.currentTabIndex=0] - Initially active tab index
63
+ * @param {string} [props.className] - CSS classes for the Tabs root
64
+ * @param {string} [props.tabsListClassName] - CSS classes for the TabsList
65
+ * @param {string} [props.tabsTriggerClassName] - CSS classes for TabsTrigger elements
66
+ * @param {CSSProperties} [props.tabsContainerStyles] - Inline styles for TabsContent
67
+ * @param {'fixed' | 'dynamic'} [props.variant='fixed'] - Layout mode for tab content
68
+ *
69
+ * @returns {React.ReactElement} A Tabs component with tab list and content area
70
+ *
71
+ * @example
72
+ * // Basic tabs
73
+ * <TabsContainer
74
+ * tabs={[
75
+ * { key: 'tab1', label: 'Overview', component: <OverviewPanel /> },
76
+ * { key: 'tab2', label: 'Details', component: <DetailsPanel /> },
77
+ * ]}
78
+ * onTabChange={(key) => console.log('Selected:', key)}
79
+ * />
80
+ *
81
+ * @example
82
+ * // Tabs with icons and highlights
83
+ * <TabsContainer
84
+ * tabs={[
85
+ * {
86
+ * key: 'notifications',
87
+ * label: 'Notifications',
88
+ * icon: <BellIcon />,
89
+ * component: <NotificationsList />,
90
+ * highlight: unreadCount > 0
91
+ * },
92
+ * {
93
+ * key: 'settings',
94
+ * label: 'Settings',
95
+ * icon: <SettingsIcon />,
96
+ * component: <SettingsPanel />
97
+ * },
98
+ * ]}
99
+ * variant="dynamic"
100
+ * className="min-h-screen"
101
+ * />
102
+ *
103
+ * @example
104
+ * // Tabs with disabled state
105
+ * <TabsContainer
106
+ * tabs={[
107
+ * { key: 'basic', label: 'Basic Info', component: <BasicForm /> },
108
+ * { key: 'advanced', label: 'Advanced', component: <AdvancedForm />, disabled: !basicComplete },
109
+ * ]}
110
+ * currentTabIndex={0}
111
+ * />
112
+ */
30
113
  export const TabsContainer = ({
31
114
  tabs,
32
115
  onTabChange,
@@ -34,6 +117,7 @@ export const TabsContainer = ({
34
117
  className,
35
118
  tabsListClassName,
36
119
  tabsTriggerClassName,
120
+ tabsContainerStyles,
37
121
  variant = 'fixed',
38
122
  }: TabsContainerProps) => {
39
123
  const isSmallScreen = useMediaQuery('(max-width: 768px)');
@@ -88,6 +172,7 @@ export const TabsContainer = ({
88
172
  ? `calc(100vh - 98px)`
89
173
  : `calc(100vh - 80px)`
90
174
  : 'max-content',
175
+ ...tabsContainerStyles,
91
176
  }}
92
177
  >
93
178
  {component}
@@ -6,17 +6,81 @@ import { PreviewFiles } from '../PreviewFiles/PreviewFiles';
6
6
  import { LoadingUploadDialogContainer } from './LoadingUploadDialogContainer';
7
7
  import { UploadDialogContainer } from './UploadDialogContainer';
8
8
 
9
+ /**
10
+ * Props for the UploadDialog component
11
+ */
9
12
  export type UploadDialogProps = {
13
+ /** Function that renders the dialog trigger element. Receives open callback to open the dialog */
10
14
  anchor: (props: { open: () => void }) => ReactNode;
15
+ /** Optional callback fired when the dialog opens */
11
16
  onDialogOpen?: () => void;
17
+ /** Optional callback fired when the dialog closes */
12
18
  onDialogClose?: () => void;
19
+ /** Title displayed in the dialog header. Defaults to 'Upload File' */
13
20
  title?: string;
21
+ /** Optional URL to a sample file for download */
14
22
  sampleFileUrl?: string;
23
+ /** Callback function fired when the Upload Now button is clicked. Receives single File or File[] */
15
24
  onUpload: (file: File | File[]) => void;
25
+ /** HTML accept attribute value for the file input (e.g., '.pdf,.doc', 'image/*'). Defaults to all files */
16
26
  acceptFileType?: string;
27
+ /** Whether the upload is currently in progress. Defaults to false */
17
28
  loading?: boolean;
18
29
  };
19
30
 
31
+ /**
32
+ * UploadDialog component that provides a file upload interface with preview and download sample options.
33
+ *
34
+ * This component manages file selection, displays selected file previews with delete capability,
35
+ * and provides options to download sample files. It supports loading states and file type filtering.
36
+ * The upload is triggered via an anchor element (trigger) that's configurable.
37
+ *
38
+ * @component
39
+ * @param {UploadDialogProps} props - The component props
40
+ * @param {(props: { open: () => void }) => ReactNode} props.anchor - Render function for the trigger element
41
+ * @param {(file: File | File[]) => void} props.onUpload - Callback when upload button is clicked
42
+ * @param {string} [props.title='Upload File'] - Dialog header title
43
+ * @param {string} [props.sampleFileUrl] - URL to download a sample file
44
+ * @param {string} [props.acceptFileType] - File type filter for the input (e.g., '.pdf', 'image/*')
45
+ * @param {boolean} [props.loading=false] - Whether upload is in progress
46
+ * @param {() => void} [props.onDialogOpen] - Callback when dialog opens
47
+ * @param {() => void} [props.onDialogClose] - Callback when dialog closes
48
+ *
49
+ * @returns {React.ReactElement} A fragment with the anchor element and Upload Dialog
50
+ *
51
+ * @example
52
+ * // Basic file upload
53
+ * <UploadDialog
54
+ * anchor={({ open }) => <button onClick={open}>Upload</button>}
55
+ * title="Upload Document"
56
+ * onUpload={(file) => uploadToServer(file)}
57
+ * />
58
+ *
59
+ * @example
60
+ * // Upload with sample file and type restriction
61
+ * <UploadDialog
62
+ * anchor={({ open }) => <IconButton icon={<UploadIcon />} onClick={open} />}
63
+ * title="Upload CSV File"
64
+ * acceptFileType=".csv"
65
+ * sampleFileUrl="https://example.com/sample.csv"
66
+ * onUpload={async (file) => {
67
+ * await uploadFile(file);
68
+ * setUploadComplete(true);
69
+ * }}
70
+ * loading={isUploading}
71
+ * onDialogClose={() => setIsUploading(false)}
72
+ * />
73
+ *
74
+ * @example
75
+ * // Image upload with loading state
76
+ * <UploadDialog
77
+ * anchor={({ open }) => <button onClick={open}>Choose Avatar</button>}
78
+ * title="Select Avatar"
79
+ * acceptFileType="image/*"
80
+ * onUpload={(file) => updateAvatar(file)}
81
+ * loading={uploadInProgress}
82
+ * />
83
+ */
20
84
  export const UploadDialog = ({
21
85
  onUpload,
22
86
  sampleFileUrl,
@@ -34,7 +34,7 @@ function SheetOverlay({
34
34
  <SheetPrimitive.Overlay
35
35
  data-slot="sheet-overlay"
36
36
  className={cn(
37
- 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50',
37
+ 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 bg-black/50',
38
38
  className,
39
39
  )}
40
40
  {...props}
@@ -56,7 +56,7 @@ function SheetContent({
56
56
  <SheetPrimitive.Content
57
57
  data-slot="sheet-content"
58
58
  className={cn(
59
- 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500',
59
+ 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500',
60
60
  side === 'right' &&
61
61
  'data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',
62
62
  side === 'left' &&