@codezee/sixtify-brahma 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (295) hide show
  1. package/.github/workflows/check-build.yml +41 -0
  2. package/.github/workflows/deploy-on-npm.yml +43 -0
  3. package/.husky/commit-msg +4 -0
  4. package/.husky/pre-commit +4 -0
  5. package/.husky/pre-push +6 -0
  6. package/.lintstagedrc +5 -0
  7. package/.prettierignore +12 -0
  8. package/.prettierrc +22 -0
  9. package/.vscode/extensions.json +22 -0
  10. package/.vscode/settings.json +17 -0
  11. package/README.md +90 -0
  12. package/apps/docs/.eslintrc.cjs +9 -0
  13. package/apps/docs/.storybook/main.ts +23 -0
  14. package/apps/docs/.storybook/manager.ts +6 -0
  15. package/apps/docs/.storybook/preview.tsx +27 -0
  16. package/apps/docs/.storybook/theme.ts +8 -0
  17. package/apps/docs/next-env.d.ts +5 -0
  18. package/apps/docs/next.config.mjs +4 -0
  19. package/apps/docs/package.json +43 -0
  20. package/apps/docs/public/globals.css +26 -0
  21. package/apps/docs/stories/Actions/Actions.stories.tsx +49 -0
  22. package/apps/docs/stories/AgGrid/AgGrid.stories.tsx +70 -0
  23. package/apps/docs/stories/AppBar/AppBar.stories.tsx +39 -0
  24. package/apps/docs/stories/Breadcrumbs/Breadcrumbs.stories.tsx +37 -0
  25. package/apps/docs/stories/Button/ButtonGroup.stories.tsx +120 -0
  26. package/apps/docs/stories/Button/button.stories.tsx +99 -0
  27. package/apps/docs/stories/Card/AttendanceCard.stories.tsx +36 -0
  28. package/apps/docs/stories/Card/Card.stories.tsx +39 -0
  29. package/apps/docs/stories/Charts/PieChart.stories.tsx +265 -0
  30. package/apps/docs/stories/Chips/Chip.stories.tsx +141 -0
  31. package/apps/docs/stories/Chips/ChipWithBorder.stories.tsx +18 -0
  32. package/apps/docs/stories/Chips/FilterPill.stories.tsx +24 -0
  33. package/apps/docs/stories/Color/Color.stories.tsx +14 -0
  34. package/apps/docs/stories/Dialog/ButtomDialog.stories.tsx +48 -0
  35. package/apps/docs/stories/Dialog/DeleteDialog.stories.tsx +32 -0
  36. package/apps/docs/stories/Dialog/Dialog.stories.tsx +48 -0
  37. package/apps/docs/stories/Drawer/Drawer.stories.tsx +94 -0
  38. package/apps/docs/stories/FilterList/FilterList.stories.tsx +88 -0
  39. package/apps/docs/stories/FilterList/FilterListV2.stories.tsx +92 -0
  40. package/apps/docs/stories/FormFields/AutoComplete.stories.tsx +90 -0
  41. package/apps/docs/stories/FormFields/CheckBox.stories.tsx +64 -0
  42. package/apps/docs/stories/FormFields/DatePicker.stories.tsx +100 -0
  43. package/apps/docs/stories/FormFields/DateRangePicker.stories.tsx +39 -0
  44. package/apps/docs/stories/FormFields/DateTimePicker.stories.tsx +39 -0
  45. package/apps/docs/stories/FormFields/FileUpload.stories.tsx +83 -0
  46. package/apps/docs/stories/FormFields/ImageUpload.stories.tsx +69 -0
  47. package/apps/docs/stories/FormFields/ListItemButton.stories.tsx +59 -0
  48. package/apps/docs/stories/FormFields/PhoneInputField.stories.tsx +84 -0
  49. package/apps/docs/stories/FormFields/RadioGroupField.stories.tsx +172 -0
  50. package/apps/docs/stories/FormFields/SearchField.stories.tsx +74 -0
  51. package/apps/docs/stories/FormFields/TextField.stories.tsx +141 -0
  52. package/apps/docs/stories/FormFields/TimeField.stories.tsx +84 -0
  53. package/apps/docs/stories/FormFields/TimePicker.stories.tsx +84 -0
  54. package/apps/docs/stories/Indicator/Indicator.stories.tsx +33 -0
  55. package/apps/docs/stories/Indicator/SeverityIndicator.stories.tsx +27 -0
  56. package/apps/docs/stories/Layouts/FormRow.stories.tsx +45 -0
  57. package/apps/docs/stories/PadBox/PadBox.stories.tsx +49 -0
  58. package/apps/docs/stories/Stepper/Stepper.stories.tsx +110 -0
  59. package/apps/docs/stories/Stepper/StepperV2.stories.tsx +44 -0
  60. package/apps/docs/stories/Timeline/AttendanceStatus.stories.tsx +29 -0
  61. package/apps/docs/stories/Timeline/Timeline.stories.tsx +38 -0
  62. package/apps/docs/stories/Tooltip/Tooltip.stories.tsx +28 -0
  63. package/apps/docs/stories/UserProfileMenu/UserProfileMenu.stories.tsx +112 -0
  64. package/apps/docs/tsconfig.json +19 -0
  65. package/commitlint.config.cjs +6 -0
  66. package/index.ts +1 -0
  67. package/package.json +85 -0
  68. package/packages/eslint-config/README.md +3 -0
  69. package/packages/eslint-config/library.js +88 -0
  70. package/packages/eslint-config/next.js +85 -0
  71. package/packages/eslint-config/package.json +19 -0
  72. package/packages/eslint-config/react-internal.js +89 -0
  73. package/packages/shared-components/.eslintrc.js +10 -0
  74. package/packages/shared-components/package.json +51 -0
  75. package/packages/shared-components/src/Actions/AddAction.tsx +16 -0
  76. package/packages/shared-components/src/Actions/CalendarAction.tsx +16 -0
  77. package/packages/shared-components/src/Actions/ConfigureAction.tsx +16 -0
  78. package/packages/shared-components/src/Actions/DeleteAction.tsx +16 -0
  79. package/packages/shared-components/src/Actions/DownloadAction.tsx +16 -0
  80. package/packages/shared-components/src/Actions/EditAction.tsx +16 -0
  81. package/packages/shared-components/src/Actions/ExportAction.tsx +16 -0
  82. package/packages/shared-components/src/Actions/FilterAction.tsx +16 -0
  83. package/packages/shared-components/src/Actions/HistoryAction.tsx +16 -0
  84. package/packages/shared-components/src/Actions/ImportAction.tsx +16 -0
  85. package/packages/shared-components/src/Actions/ViewAction.tsx +16 -0
  86. package/packages/shared-components/src/Actions/index.ts +11 -0
  87. package/packages/shared-components/src/AgGrid/ActionCell/ActionCell.tsx +57 -0
  88. package/packages/shared-components/src/AgGrid/ActionCell/Popover.tsx +32 -0
  89. package/packages/shared-components/src/AgGrid/AgGrid.tsx +93 -0
  90. package/packages/shared-components/src/AgGrid/LoadingCell.tsx +5 -0
  91. package/packages/shared-components/src/AgGrid/index.ts +3 -0
  92. package/packages/shared-components/src/AppBar/AppBar.styled.tsx +33 -0
  93. package/packages/shared-components/src/AppBar/AppBar.tsx +20 -0
  94. package/packages/shared-components/src/AppBar/index.ts +1 -0
  95. package/packages/shared-components/src/Breadcrumbs/Breadcrumbs.tsx +76 -0
  96. package/packages/shared-components/src/Breadcrumbs/index.ts +1 -0
  97. package/packages/shared-components/src/Button/ActionButton.tsx +38 -0
  98. package/packages/shared-components/src/Button/Button.tsx +19 -0
  99. package/packages/shared-components/src/Button/ButtonGroup.tsx +37 -0
  100. package/packages/shared-components/src/Button/index.ts +3 -0
  101. package/packages/shared-components/src/Card/AttendanceCard.tsx +51 -0
  102. package/packages/shared-components/src/Card/Card.tsx +34 -0
  103. package/packages/shared-components/src/Card/CardItem/CardItem.tsx +33 -0
  104. package/packages/shared-components/src/Card/CardItem/CardItemValue.tsx +98 -0
  105. package/packages/shared-components/src/Card/CardItem/index.ts +2 -0
  106. package/packages/shared-components/src/Card/ProfileCard/ProfileCard.tsx +40 -0
  107. package/packages/shared-components/src/Card/ProfileCard/ProfileCardItem/ProfileCardBody.tsx +53 -0
  108. package/packages/shared-components/src/Card/ProfileCard/ProfileCardItem/ProfileCardHeader.tsx +94 -0
  109. package/packages/shared-components/src/Card/index.ts +6 -0
  110. package/packages/shared-components/src/Charts/PieChart.tsx +81 -0
  111. package/packages/shared-components/src/Charts/Skeleton.tsx +36 -0
  112. package/packages/shared-components/src/Charts/index.ts +1 -0
  113. package/packages/shared-components/src/Chips/Chip.tsx +26 -0
  114. package/packages/shared-components/src/Chips/ChipWithBorder.tsx +39 -0
  115. package/packages/shared-components/src/Chips/FilterPill.tsx +47 -0
  116. package/packages/shared-components/src/Chips/index.ts +3 -0
  117. package/packages/shared-components/src/Dialog/BottomDialog.styled.tsx +28 -0
  118. package/packages/shared-components/src/Dialog/BottomDialog.tsx +37 -0
  119. package/packages/shared-components/src/Dialog/DeleteDialog.tsx +48 -0
  120. package/packages/shared-components/src/Dialog/Dialog.tsx +61 -0
  121. package/packages/shared-components/src/Dialog/index.ts +3 -0
  122. package/packages/shared-components/src/Drawer/Bullet.tsx +12 -0
  123. package/packages/shared-components/src/Drawer/CloseDrawer/CloseDrawerMenuItem.tsx +57 -0
  124. package/packages/shared-components/src/Drawer/CloseDrawer/CloseDrawerMenuItemList.tsx +109 -0
  125. package/packages/shared-components/src/Drawer/CloseDrawer/CloseDrawerSubMenuItemList.tsx +128 -0
  126. package/packages/shared-components/src/Drawer/CloseDrawer/Popover.tsx +45 -0
  127. package/packages/shared-components/src/Drawer/CloseDrawer/Popper.tsx +43 -0
  128. package/packages/shared-components/src/Drawer/Drawer.styled.tsx +63 -0
  129. package/packages/shared-components/src/Drawer/Drawer.tsx +56 -0
  130. package/packages/shared-components/src/Drawer/MenuItem.tsx +75 -0
  131. package/packages/shared-components/src/Drawer/OpenDrawer/OpenDrawerCollapse.tsx +13 -0
  132. package/packages/shared-components/src/Drawer/OpenDrawer/OpenDrawerMenuItem.tsx +48 -0
  133. package/packages/shared-components/src/Drawer/OpenDrawer/OpenDrawerMenuItemList.tsx +232 -0
  134. package/packages/shared-components/src/Drawer/index.ts +1 -0
  135. package/packages/shared-components/src/FilterList/DateRangePickerPopUp.tsx +123 -0
  136. package/packages/shared-components/src/FilterList/FilterList.tsx +180 -0
  137. package/packages/shared-components/src/FilterList/FilterListV2.tsx +661 -0
  138. package/packages/shared-components/src/FilterList/FilterPopup.tsx +165 -0
  139. package/packages/shared-components/src/FilterList/FilterPopupWrapper.tsx +110 -0
  140. package/packages/shared-components/src/FilterList/FilterTypeWrapper.tsx +60 -0
  141. package/packages/shared-components/src/FilterList/GetFilterPopupComponent.tsx +76 -0
  142. package/packages/shared-components/src/FilterList/getFormData.ts +29 -0
  143. package/packages/shared-components/src/FilterList/index.ts +6 -0
  144. package/packages/shared-components/src/FormFields/Autocomplete/Autocomplete.tsx +509 -0
  145. package/packages/shared-components/src/FormFields/Autocomplete/Skeleton.tsx +26 -0
  146. package/packages/shared-components/src/FormFields/Autocomplete/index.ts +1 -0
  147. package/packages/shared-components/src/FormFields/CheckBox/CheckBox.styled.tsx +76 -0
  148. package/packages/shared-components/src/FormFields/CheckBox/CheckBox.tsx +44 -0
  149. package/packages/shared-components/src/FormFields/CheckBox/Skeleton.tsx +12 -0
  150. package/packages/shared-components/src/FormFields/CheckBox/index.ts +1 -0
  151. package/packages/shared-components/src/FormFields/DatePicker/DatePicker.tsx +217 -0
  152. package/packages/shared-components/src/FormFields/DatePicker/Skeleton.tsx +28 -0
  153. package/packages/shared-components/src/FormFields/DatePicker/index.ts +1 -0
  154. package/packages/shared-components/src/FormFields/DateRangePicker/DateRangePicker.tsx +97 -0
  155. package/packages/shared-components/src/FormFields/DateRangePicker/Skeleton.tsx +38 -0
  156. package/packages/shared-components/src/FormFields/DateRangePicker/index.ts +1 -0
  157. package/packages/shared-components/src/FormFields/DateTimePicker/DateTimePicker.tsx +253 -0
  158. package/packages/shared-components/src/FormFields/DateTimePicker/Skeleton.tsx +24 -0
  159. package/packages/shared-components/src/FormFields/DateTimePicker/index.ts +1 -0
  160. package/packages/shared-components/src/FormFields/FileUpload/FileNames.tsx +32 -0
  161. package/packages/shared-components/src/FormFields/FileUpload/FileUpload.styled.tsx +31 -0
  162. package/packages/shared-components/src/FormFields/FileUpload/FileUpload.tsx +160 -0
  163. package/packages/shared-components/src/FormFields/FileUpload/Skeleton.tsx +21 -0
  164. package/packages/shared-components/src/FormFields/FileUpload/index.ts +2 -0
  165. package/packages/shared-components/src/FormFields/ImageUpload/ImageUpload.styled.tsx +20 -0
  166. package/packages/shared-components/src/FormFields/ImageUpload/ImageUpload.tsx +181 -0
  167. package/packages/shared-components/src/FormFields/ImageUpload/ImageUploadView.tsx +65 -0
  168. package/packages/shared-components/src/FormFields/ImageUpload/PhotoCaptureDialog.tsx +74 -0
  169. package/packages/shared-components/src/FormFields/ImageUpload/Skeleton.tsx +31 -0
  170. package/packages/shared-components/src/FormFields/ImageUpload/index.ts +2 -0
  171. package/packages/shared-components/src/FormFields/ListItemButton/ListItemButton.styled.tsx +25 -0
  172. package/packages/shared-components/src/FormFields/ListItemButton/ListItemButton.tsx +52 -0
  173. package/packages/shared-components/src/FormFields/ListItemButton/index.ts +1 -0
  174. package/packages/shared-components/src/FormFields/PasswordField/PasswordField.tsx +50 -0
  175. package/packages/shared-components/src/FormFields/PasswordField/index.ts +1 -0
  176. package/packages/shared-components/src/FormFields/PhoneInputField/PhoneInputField.tsx +108 -0
  177. package/packages/shared-components/src/FormFields/PhoneInputField/Skeleton.tsx +31 -0
  178. package/packages/shared-components/src/FormFields/PhoneInputField/index.ts +1 -0
  179. package/packages/shared-components/src/FormFields/RadioGroupField/RadioGroupField.tsx +105 -0
  180. package/packages/shared-components/src/FormFields/RadioGroupField/Skeleton.tsx +26 -0
  181. package/packages/shared-components/src/FormFields/RadioGroupField/index.ts +1 -0
  182. package/packages/shared-components/src/FormFields/SearchField/SearchField.tsx +21 -0
  183. package/packages/shared-components/src/FormFields/SearchField/index.ts +1 -0
  184. package/packages/shared-components/src/FormFields/Switch/Skeleton.tsx +12 -0
  185. package/packages/shared-components/src/FormFields/Switch/Switch.tsx +33 -0
  186. package/packages/shared-components/src/FormFields/Switch/index.ts +1 -0
  187. package/packages/shared-components/src/FormFields/TextField/Skeleton.tsx +31 -0
  188. package/packages/shared-components/src/FormFields/TextField/TextField.tsx +167 -0
  189. package/packages/shared-components/src/FormFields/TextField/index.ts +1 -0
  190. package/packages/shared-components/src/FormFields/TimeField/Skeleton.tsx +24 -0
  191. package/packages/shared-components/src/FormFields/TimeField/TimeField.tsx +120 -0
  192. package/packages/shared-components/src/FormFields/TimeField/index.ts +1 -0
  193. package/packages/shared-components/src/FormFields/TimePicker/Skeleton.tsx +24 -0
  194. package/packages/shared-components/src/FormFields/TimePicker/TimePicker.tsx +168 -0
  195. package/packages/shared-components/src/FormFields/TimePicker/index.ts +1 -0
  196. package/packages/shared-components/src/FormFields/index.ts +16 -0
  197. package/packages/shared-components/src/Indicator/Indicator.tsx +18 -0
  198. package/packages/shared-components/src/Indicator/SeverityIndicator.tsx +34 -0
  199. package/packages/shared-components/src/Indicator/index.ts +2 -0
  200. package/packages/shared-components/src/Layouts/FormContainer.tsx +6 -0
  201. package/packages/shared-components/src/Layouts/FormGridLayout.tsx +27 -0
  202. package/packages/shared-components/src/Layouts/FormRow/FormRow.styled.tsx +47 -0
  203. package/packages/shared-components/src/Layouts/FormRow/FormRow.tsx +20 -0
  204. package/packages/shared-components/src/Layouts/FormRow/index.ts +1 -0
  205. package/packages/shared-components/src/Layouts/FormSection.tsx +22 -0
  206. package/packages/shared-components/src/Layouts/index.ts +4 -0
  207. package/packages/shared-components/src/Loader/FacebookCircularProgress.tsx +41 -0
  208. package/packages/shared-components/src/Loader/index.ts +1 -0
  209. package/packages/shared-components/src/PadBox/PadBox.tsx +21 -0
  210. package/packages/shared-components/src/PadBox/index.ts +1 -0
  211. package/packages/shared-components/src/Pagination/Pagination.tsx +42 -0
  212. package/packages/shared-components/src/Pagination/index.ts +1 -0
  213. package/packages/shared-components/src/Stepper/Stepper.tsx +88 -0
  214. package/packages/shared-components/src/Stepper/StepperV2.tsx +115 -0
  215. package/packages/shared-components/src/Stepper/StepperV3.tsx +72 -0
  216. package/packages/shared-components/src/Stepper/index.ts +3 -0
  217. package/packages/shared-components/src/Svgs/AppLogo/AppLogoMedium.tsx +65 -0
  218. package/packages/shared-components/src/Svgs/AppLogo/AppLogoSmall.tsx +48 -0
  219. package/packages/shared-components/src/Svgs/ArrowUp.tsx +11 -0
  220. package/packages/shared-components/src/Svgs/Company/CompanyBanner.tsx +480 -0
  221. package/packages/shared-components/src/Svgs/Company/index.ts +1 -0
  222. package/packages/shared-components/src/Svgs/Drawer/SettingIcon.tsx +31 -0
  223. package/packages/shared-components/src/Svgs/Drawer/SvgBankConfig.tsx +36 -0
  224. package/packages/shared-components/src/Svgs/Drawer/SvgConfiguration.tsx +16 -0
  225. package/packages/shared-components/src/Svgs/Drawer/SvgPayroll.tsx +32 -0
  226. package/packages/shared-components/src/Svgs/Drawer/SvgsEmployees.tsx +25 -0
  227. package/packages/shared-components/src/Svgs/Drawer/SvgsOrganization.tsx +36 -0
  228. package/packages/shared-components/src/Svgs/Drawer/SvgsTransaction.tsx +81 -0
  229. package/packages/shared-components/src/Svgs/Drawer/index.ts +7 -0
  230. package/packages/shared-components/src/Svgs/FormAction.tsx +118 -0
  231. package/packages/shared-components/src/Svgs/ImportExcelSuccessIcon.tsx +54 -0
  232. package/packages/shared-components/src/Svgs/LogoIcon.tsx +74 -0
  233. package/packages/shared-components/src/Svgs/SvgAdd.tsx +28 -0
  234. package/packages/shared-components/src/Svgs/SvgCalendar.tsx +89 -0
  235. package/packages/shared-components/src/Svgs/SvgConfigure.tsx +51 -0
  236. package/packages/shared-components/src/Svgs/SvgDelete.tsx +55 -0
  237. package/packages/shared-components/src/Svgs/SvgDownload.tsx +20 -0
  238. package/packages/shared-components/src/Svgs/SvgEmail.tsx +27 -0
  239. package/packages/shared-components/src/Svgs/SvgExport.tsx +33 -0
  240. package/packages/shared-components/src/Svgs/SvgFilterList.tsx +22 -0
  241. package/packages/shared-components/src/Svgs/SvgImport.tsx +43 -0
  242. package/packages/shared-components/src/Svgs/SvgNoLogo.tsx +66 -0
  243. package/packages/shared-components/src/Svgs/SvgNoSign.tsx +28 -0
  244. package/packages/shared-components/src/Svgs/SvgPhone.tsx +19 -0
  245. package/packages/shared-components/src/Svgs/SvgProfile.tsx +33 -0
  246. package/packages/shared-components/src/Svgs/SvgView.tsx +16 -0
  247. package/packages/shared-components/src/Svgs/SvgsDrop.tsx +44 -0
  248. package/packages/shared-components/src/Svgs/SvgsEdit.tsx +42 -0
  249. package/packages/shared-components/src/Svgs/SvgsHistory.tsx +40 -0
  250. package/packages/shared-components/src/Svgs/SvgsHome.tsx +18 -0
  251. package/packages/shared-components/src/Svgs/SvgsIndicator.tsx +24 -0
  252. package/packages/shared-components/src/Svgs/index.ts +18 -0
  253. package/packages/shared-components/src/Tab/Skeleton.tsx +15 -0
  254. package/packages/shared-components/src/Tab/Tabs.tsx +64 -0
  255. package/packages/shared-components/src/Tab/index.ts +1 -0
  256. package/packages/shared-components/src/Timeline/AttendanceStatus.tsx +56 -0
  257. package/packages/shared-components/src/Timeline/Timeline.tsx +159 -0
  258. package/packages/shared-components/src/Timeline/TimelineTrackSegments.tsx +130 -0
  259. package/packages/shared-components/src/Timeline/index.ts +2 -0
  260. package/packages/shared-components/src/Toast/Toast.tsx +59 -0
  261. package/packages/shared-components/src/Toast/ToastBody.tsx +26 -0
  262. package/packages/shared-components/src/Toast/ToastFooterLink.tsx +19 -0
  263. package/packages/shared-components/src/Toast/Toaster.styled.tsx +80 -0
  264. package/packages/shared-components/src/Toast/Toaster.tsx +21 -0
  265. package/packages/shared-components/src/Toast/index.ts +3 -0
  266. package/packages/shared-components/src/Toast/toasts.tsx +28 -0
  267. package/packages/shared-components/src/Toast/types.ts +13 -0
  268. package/packages/shared-components/src/Tooltip/Tooltip.tsx +36 -0
  269. package/packages/shared-components/src/Tooltip/index.ts +1 -0
  270. package/packages/shared-components/src/UserProfileMenu/UserProfileMenu.styled.tsx +42 -0
  271. package/packages/shared-components/src/UserProfileMenu/UserProfileMenu.tsx +168 -0
  272. package/packages/shared-components/src/UserProfileMenu/index.ts +1 -0
  273. package/packages/shared-components/src/index.ts +25 -0
  274. package/packages/shared-components/src/utils/colorVariant.ts +162 -0
  275. package/packages/shared-components/src/utils/date.ts +25 -0
  276. package/packages/shared-components/src/utils/file.ts +22 -0
  277. package/packages/shared-components/src/utils/index.ts +11 -0
  278. package/packages/shared-components/src/utils/theme/colorPalette.ts +112 -0
  279. package/packages/shared-components/src/utils/theme/colorPaletteUI.tsx +44 -0
  280. package/packages/shared-components/src/utils/theme/paletteDark.ts +10 -0
  281. package/packages/shared-components/src/utils/theme/paletteLight.ts +31 -0
  282. package/packages/shared-components/src/utils/theme/theme.ts +297 -0
  283. package/packages/shared-components/src/utils/theme/types.ts +18 -0
  284. package/packages/shared-components/src/utils/theme/typography.ts +52 -0
  285. package/packages/shared-components/src/utils/urlToNestedObject.ts +9 -0
  286. package/packages/shared-components/tsconfig.json +8 -0
  287. package/packages/shared-components/tsconfig.lint.json +8 -0
  288. package/packages/shared-components/webpack/cjs.js +20 -0
  289. package/packages/shared-components/webpack/common.js +36 -0
  290. package/packages/typescript-config/base.json +20 -0
  291. package/packages/typescript-config/nextjs.json +13 -0
  292. package/packages/typescript-config/package.json +9 -0
  293. package/packages/typescript-config/react-library.json +8 -0
  294. package/pnpm-workspace.yaml +3 -0
  295. package/turbo.json +42 -0
@@ -0,0 +1,217 @@
1
+ import ChevronLeftIcon from "@mui/icons-material/ChevronLeft";
2
+ import ChevronRightIcon from "@mui/icons-material/ChevronRight";
3
+ import { InputLabel, Stack, useTheme } from "@mui/material";
4
+ import type { DatePickerProps as MuiDatePickerProps } from "@mui/x-date-pickers/DatePicker";
5
+ import { DatePicker as MuiDatePicker } from "@mui/x-date-pickers/DatePicker";
6
+ import type { PickerValidDate } from "@mui/x-date-pickers/models";
7
+ import { isFunction } from "lodash";
8
+ import { DateTime } from "luxon";
9
+ import React, { useState } from "react";
10
+ import type {
11
+ FieldError,
12
+ FieldValues,
13
+ UseControllerProps,
14
+ } from "react-hook-form";
15
+ import { useController } from "react-hook-form";
16
+ import { CalendarAction } from "../../Actions";
17
+ import { Skeleton } from "./Skeleton";
18
+
19
+ export type DatePickerProps<P extends FieldValues> = UseControllerProps<P> &
20
+ MuiDatePickerProps<PickerValidDate> &
21
+ Partial<{
22
+ label?: string;
23
+ required: boolean;
24
+ disabled: boolean;
25
+ format: string;
26
+ error: boolean;
27
+ helperText: string;
28
+ loading: boolean;
29
+ clearable?: boolean;
30
+ disableKeyboardInput?: boolean;
31
+ setError: (
32
+ name: keyof P,
33
+ error: FieldError | { type: string; message?: string }
34
+ ) => void;
35
+ }>;
36
+
37
+ export const dateFormats = {
38
+ dateWithISO8601: "yyyy-MM-dd",
39
+ dateWithEuropean: "dd-MM-yyyy",
40
+ };
41
+
42
+ export const LeftArrowIcon: React.FC = () => {
43
+ const theme = useTheme();
44
+
45
+ const { iron } = theme.palette.app.color;
46
+
47
+ return (
48
+ <ChevronLeftIcon
49
+ sx={{
50
+ border: `1px solid ${iron[800]}`,
51
+ borderRadius: "5px",
52
+ p: "4px",
53
+ }}
54
+ />
55
+ );
56
+ };
57
+
58
+ export const RightArrowIcon: React.FC = () => {
59
+ const theme = useTheme();
60
+
61
+ const { iron } = theme.palette.app.color;
62
+
63
+ return (
64
+ <ChevronRightIcon
65
+ sx={{
66
+ border: `1px solid ${iron[800]}`,
67
+ borderRadius: "5px",
68
+ p: "4px",
69
+ }}
70
+ />
71
+ );
72
+ };
73
+
74
+ export function DatePicker<P extends FieldValues>({
75
+ setError,
76
+ control,
77
+ defaultValue,
78
+ disabled = false,
79
+ label,
80
+ readOnly = false,
81
+ name,
82
+ error = false,
83
+ helperText,
84
+ loading = false,
85
+ required = false,
86
+ clearable = true,
87
+ rules,
88
+ disableKeyboardInput = false,
89
+ format = dateFormats.dateWithEuropean,
90
+ ...restProps
91
+ }: DatePickerProps<P>) {
92
+ const {
93
+ field: { value, onChange, ...restField },
94
+ } = useController({ name, control, defaultValue, rules });
95
+
96
+ const [open, setOpen] = useState(false);
97
+
98
+ const theme = useTheme();
99
+
100
+ const { iron, butterflyBlue, mirage } = theme.palette.app.color;
101
+
102
+ const finalValue = value ? DateTime.fromISO(value) : null;
103
+
104
+ if (loading) {
105
+ return <Skeleton label={label} />;
106
+ }
107
+
108
+ const EmptyIcon = () => null;
109
+
110
+ return (
111
+ <Stack gap="10px">
112
+ {label && <InputLabel required={required}>{label}</InputLabel>}
113
+
114
+ <MuiDatePicker<DateTime>
115
+ {...restField}
116
+ {...restProps}
117
+ disabled={disabled}
118
+ format={format}
119
+ value={finalValue}
120
+ readOnly={readOnly}
121
+ open={open && !readOnly}
122
+ onOpen={() => setOpen(true)}
123
+ onClose={() => setOpen(false)}
124
+ slotProps={{
125
+ field: {
126
+ clearable,
127
+ onClear: () => onChange(null),
128
+ readOnly: disableKeyboardInput,
129
+ },
130
+ clearButton: {
131
+ tabIndex: -1, // This will make the clear button skipped in the tab order
132
+ },
133
+ textField: {
134
+ disabled,
135
+ helperText,
136
+ error,
137
+ InputProps: {
138
+ endAdornment: (
139
+ <CalendarAction
140
+ disabled={disabled}
141
+ onClick={() => setOpen(true)}
142
+ />
143
+ ),
144
+ sx: {
145
+ "& .MuiInputAdornment-root": {
146
+ width: "30px",
147
+ },
148
+ },
149
+ },
150
+ onKeyDown: (event) => {
151
+ if (!clearable && event.key === "Backspace") {
152
+ event.preventDefault();
153
+ }
154
+ },
155
+ },
156
+ day: {
157
+ sx: {
158
+ "&.MuiPickersDay-root": {
159
+ borderRadius: "5px",
160
+ borderColor: butterflyBlue[900],
161
+ fontWeight: 500,
162
+ color: mirage[900],
163
+ },
164
+ "&.MuiPickersDay-root.Mui-selected": {
165
+ backgroundColor: butterflyBlue[900],
166
+ color: iron[600],
167
+ },
168
+ "&.MuiPickersDay-today": {
169
+ color: butterflyBlue[900],
170
+ backgroundColor: iron[600],
171
+ },
172
+ },
173
+ },
174
+ calendarHeader: {
175
+ sx: {
176
+ "& .MuiPickersCalendarHeader-label": {
177
+ fontWeight: "bold",
178
+ },
179
+ },
180
+ },
181
+ yearButton: {
182
+ sx: {
183
+ "&.MuiPickersYear-yearButton.Mui-selected": {
184
+ backgroundColor: butterflyBlue[900],
185
+ },
186
+ },
187
+ },
188
+ monthButton: {
189
+ sx: {
190
+ "&.MuiPickersMonth-monthButton.Mui-selected": {
191
+ backgroundColor: butterflyBlue[900],
192
+ },
193
+ },
194
+ },
195
+ }}
196
+ slots={{
197
+ leftArrowIcon: LeftArrowIcon,
198
+ rightArrowIcon: RightArrowIcon,
199
+ switchViewIcon: EmptyIcon,
200
+ }}
201
+ dayOfWeekFormatter={(weekday) => `${weekday.toFormat("ccc")}`}
202
+ onChange={(value, details) => {
203
+ if (details.validationError) {
204
+ if (isFunction(setError)) {
205
+ setError(name, {
206
+ type: "manual",
207
+ message: "common.date.invalid",
208
+ });
209
+ }
210
+ } else if (value) {
211
+ onChange(value.toISODate());
212
+ }
213
+ }}
214
+ />
215
+ </Stack>
216
+ );
217
+ }
@@ -0,0 +1,28 @@
1
+ import { Skeleton as MuiSkeleton, Stack } from "@mui/material";
2
+
3
+ type SkeletonProps = {
4
+ label?: string;
5
+ };
6
+
7
+ export const Skeleton = ({ label }: SkeletonProps) => {
8
+ return (
9
+ <Stack gap="10px">
10
+ {label && (
11
+ <MuiSkeleton
12
+ width={120}
13
+ height="23px"
14
+ sx={{
15
+ transform: "scale(1)",
16
+ }}
17
+ />
18
+ )}
19
+
20
+ <MuiSkeleton
21
+ height="40px"
22
+ sx={{
23
+ transform: "scale(1)",
24
+ }}
25
+ />
26
+ </Stack>
27
+ );
28
+ };
@@ -0,0 +1 @@
1
+ export * from "./DatePicker";
@@ -0,0 +1,97 @@
1
+ import { InputLabel, Stack, Typography } from "@mui/material";
2
+ import { useState } from "react";
3
+ import { DateRangePicker as RdrDateRangePicker } from "react-date-range";
4
+ import type { FieldValues, UseControllerProps } from "react-hook-form";
5
+ import { useController } from "react-hook-form";
6
+ import { Skeleton } from "./Skeleton";
7
+
8
+ export type DateRangePickerProps<P extends FieldValues> =
9
+ UseControllerProps<P> & {
10
+ label?: string;
11
+ required?: boolean;
12
+ disabled?: boolean;
13
+ error?: boolean;
14
+ helperText?: string;
15
+ loading?: boolean;
16
+ minDate?: Date;
17
+ maxDate?: Date;
18
+ };
19
+
20
+ export function DateRangePicker<P extends FieldValues>({
21
+ control,
22
+ defaultValue,
23
+ disabled = false,
24
+ label,
25
+ name,
26
+ error = false,
27
+ helperText,
28
+ loading = false,
29
+ required = false,
30
+ rules,
31
+ }: DateRangePickerProps<P>) {
32
+ const {
33
+ field: { onChange },
34
+ } = useController({ name, control, defaultValue, rules });
35
+
36
+ const [range, setRange] = useState([
37
+ {
38
+ startDate: new Date(),
39
+ endDate: new Date(),
40
+ key: "selection",
41
+ },
42
+ ]);
43
+
44
+ if (loading) {
45
+ return <Skeleton />;
46
+ }
47
+
48
+ return (
49
+ <Stack gap="10px">
50
+ {label && (
51
+ <InputLabel required={required} disabled={disabled}>
52
+ {label}
53
+ </InputLabel>
54
+ )}
55
+
56
+ <RdrDateRangePicker
57
+ ranges={range}
58
+ onChange={(ranges) => {
59
+ const selectedRange = ranges.selection;
60
+
61
+ if (
62
+ selectedRange?.endDate &&
63
+ selectedRange?.startDate &&
64
+ selectedRange?.key
65
+ ) {
66
+ setRange([
67
+ {
68
+ startDate: selectedRange.startDate,
69
+ endDate: selectedRange.endDate,
70
+ key: selectedRange.key,
71
+ },
72
+ ]);
73
+
74
+ const startDate = new Date(
75
+ selectedRange.startDate.toUTCString()
76
+ ).toISOString();
77
+
78
+ const endDate = new Date(
79
+ selectedRange.endDate.toUTCString()
80
+ ).toISOString();
81
+
82
+ onChange([startDate, endDate]);
83
+ }
84
+ }}
85
+ months={1}
86
+ direction="horizontal"
87
+ calendarFocus="backwards"
88
+ staticRanges={[]}
89
+ inputRanges={[]}
90
+ moveRangeOnFirstSelection={false}
91
+ preventSnapRefocus={true}
92
+ />
93
+
94
+ {error && <Typography color="red">{helperText}</Typography>}
95
+ </Stack>
96
+ );
97
+ }
@@ -0,0 +1,38 @@
1
+ import { Skeleton as MuiSkeleton, Stack } from "@mui/material";
2
+
3
+ export const Skeleton = () => {
4
+ return (
5
+ <Stack direction="row" gap="10px">
6
+ <Stack gap="10px">
7
+ <MuiSkeleton
8
+ width={120}
9
+ height="23px"
10
+ sx={{
11
+ transform: "scale(1)",
12
+ }}
13
+ />
14
+ <MuiSkeleton
15
+ height="40px"
16
+ sx={{
17
+ transform: "scale(1)",
18
+ }}
19
+ />
20
+ </Stack>
21
+ <Stack gap="10px">
22
+ <MuiSkeleton
23
+ width={120}
24
+ height="23px"
25
+ sx={{
26
+ transform: "scale(1)",
27
+ }}
28
+ />
29
+ <MuiSkeleton
30
+ height="40px"
31
+ sx={{
32
+ transform: "scale(1)",
33
+ }}
34
+ />
35
+ </Stack>
36
+ </Stack>
37
+ );
38
+ };
@@ -0,0 +1 @@
1
+ export * from "./DateRangePicker";
@@ -0,0 +1,253 @@
1
+ import ChevronLeftIcon from "@mui/icons-material/ChevronLeft";
2
+ import ChevronRightIcon from "@mui/icons-material/ChevronRight";
3
+ import { Box, InputLabel, Stack, Tooltip, useTheme } from "@mui/material";
4
+ import type { DateTimePickerProps as MuiDateTimePickerProps } from "@mui/x-date-pickers/DateTimePicker";
5
+ import { DateTimePicker as MuiDateTimePicker } from "@mui/x-date-pickers/DateTimePicker";
6
+ import type { PickerValidDate } from "@mui/x-date-pickers/models";
7
+ import { DateTime } from "luxon";
8
+ import React, { type ReactElement, useState } from "react";
9
+ import type {
10
+ FieldError,
11
+ FieldValues,
12
+ Path,
13
+ PathValue,
14
+ UseControllerProps,
15
+ } from "react-hook-form";
16
+ import { useController } from "react-hook-form";
17
+ import { CalendarAction } from "../../Actions";
18
+ import { Skeleton } from "./Skeleton";
19
+
20
+ export type DateTimePickerProps<P extends FieldValues> = UseControllerProps<P> &
21
+ MuiDateTimePickerProps<PickerValidDate> &
22
+ Partial<{
23
+ label: string;
24
+ required: boolean;
25
+ disabled: boolean;
26
+ format: string;
27
+ error: boolean;
28
+ helperText: string;
29
+ loading: boolean;
30
+ clearable?: boolean;
31
+ helperIcon?: ReactElement;
32
+ toolTipText?: string;
33
+ timeStepsMinutes?: number;
34
+ setError: (
35
+ name: keyof P,
36
+ error: FieldError | { type: string; message?: string }
37
+ ) => void;
38
+ }>;
39
+
40
+ const LeftArrowIcon: React.FC = () => {
41
+ const theme = useTheme();
42
+
43
+ const { iron } = theme.palette.app.color;
44
+
45
+ return (
46
+ <ChevronLeftIcon
47
+ sx={{
48
+ border: `1px solid ${iron[800]}`,
49
+ borderRadius: "5px",
50
+ p: "4px",
51
+ }}
52
+ />
53
+ );
54
+ };
55
+
56
+ const RightArrowIcon: React.FC = () => {
57
+ const theme = useTheme();
58
+
59
+ const { iron } = theme.palette.app.color;
60
+
61
+ return (
62
+ <ChevronRightIcon
63
+ sx={{
64
+ border: `1px solid ${iron[800]}`,
65
+ borderRadius: "5px",
66
+ p: "4px",
67
+ }}
68
+ />
69
+ );
70
+ };
71
+
72
+ export function DateTimePicker<P extends FieldValues>({
73
+ control,
74
+ defaultValue,
75
+ disabled = false,
76
+ label,
77
+ readOnly = false,
78
+ name,
79
+ error = false,
80
+ helperText,
81
+ loading = false,
82
+ required = false,
83
+ clearable = true,
84
+ rules,
85
+ format = "dd-MM-yyyy HH:mm",
86
+ helperIcon,
87
+ toolTipText,
88
+ timeStepsMinutes = 1,
89
+ ...restProps
90
+ }: DateTimePickerProps<P>) {
91
+ const {
92
+ field: { value, onChange, ...restField },
93
+ } = useController({ name, control, defaultValue, rules });
94
+
95
+ const [open, setOpen] = useState(false);
96
+
97
+ if (error && value && typeof value === "object") {
98
+ helperText = "Invalid time";
99
+ }
100
+
101
+ const theme = useTheme();
102
+
103
+ const { iron, butterflyBlue, mirage } = theme.palette.app.color;
104
+
105
+ const pickerValue = value
106
+ ? // eslint-disable-next-line sonarjs/no-nested-conditional
107
+ (DateTime.fromISO(value) as PathValue<P, Path<P> & (string | undefined)>)
108
+ : null;
109
+
110
+ if (loading) {
111
+ return (
112
+ <Box sx={{ width: "350px" }}>
113
+ <Skeleton label={label} />
114
+ </Box>
115
+ );
116
+ }
117
+
118
+ const EmptyIcon = () => null;
119
+
120
+ return (
121
+ <Stack gap="10px">
122
+ {label && (
123
+ <Stack alignItems="center" flexDirection="row" gap="5px">
124
+ <InputLabel required={required} disabled={disabled}>
125
+ {label}
126
+ </InputLabel>
127
+ {helperIcon && toolTipText && (
128
+ <Tooltip title={toolTipText} placement="bottom">
129
+ {helperIcon}
130
+ </Tooltip>
131
+ )}
132
+ </Stack>
133
+ )}
134
+ <MuiDateTimePicker<DateTime>
135
+ {...restField}
136
+ {...restProps}
137
+ disabled={disabled}
138
+ readOnly={readOnly}
139
+ open={open}
140
+ ampm={false}
141
+ value={pickerValue}
142
+ timeSteps={{ minutes: timeStepsMinutes }}
143
+ format={format}
144
+ onOpen={() => setOpen(true)}
145
+ onClose={() => setOpen(false)}
146
+ slotProps={{
147
+ field: {
148
+ clearable,
149
+ onClear: () => onChange(null),
150
+ },
151
+ clearButton: {
152
+ tabIndex: -1,
153
+ },
154
+ textField: {
155
+ disabled,
156
+ helperText,
157
+ error,
158
+ InputProps: {
159
+ endAdornment: <CalendarAction onClick={() => setOpen(true)} />,
160
+ sx: {
161
+ "& .MuiInputAdornment-root": {
162
+ width: "30px",
163
+ },
164
+ },
165
+ },
166
+ },
167
+ popper: {
168
+ sx: {
169
+ "& .MuiMultiSectionDigitalClockSection-root::after": {
170
+ display: "unset",
171
+ },
172
+ "& .MuiList-padding": {
173
+ padding: "10px",
174
+ },
175
+ "& .MuiMultiSectionDigitalClockSection-item": {
176
+ padding: "4px",
177
+ },
178
+ "& .MuiMultiSectionDigitalClockSection-item.Mui-selected": {
179
+ backgroundColor: butterflyBlue[900],
180
+ borderRadius: "5px",
181
+ },
182
+ "& .MuiMultiSectionDigitalClockSection-item.Mui-selected:hover": {
183
+ backgroundColor: butterflyBlue[900],
184
+ borderRadius: "5px",
185
+ },
186
+ "& .Mui-selected:hover": {
187
+ backgroundColor: butterflyBlue[900],
188
+ borderRadius: "5px",
189
+ },
190
+ "& .MuiMultiSectionDigitalClockSection-item.Mui-selected:focus-visible":
191
+ {
192
+ backgroundColor: butterflyBlue[900],
193
+ borderRadius: "5px",
194
+ },
195
+ "& .Mui-selected:focus-visible": {
196
+ backgroundColor: butterflyBlue[900],
197
+ borderRadius: "5px",
198
+ },
199
+ },
200
+ },
201
+ day: {
202
+ sx: {
203
+ "&.MuiPickersDay-root": {
204
+ borderRadius: "5px",
205
+ borderColor: butterflyBlue[900],
206
+ fontWeight: 500,
207
+ color: mirage[900],
208
+ },
209
+ "&.MuiPickersDay-root.Mui-selected": {
210
+ backgroundColor: butterflyBlue[900],
211
+ color: iron[600],
212
+ },
213
+ "&.MuiPickersDay-today": {
214
+ color: butterflyBlue[900],
215
+ backgroundColor: iron[600],
216
+ },
217
+ ":focus": {
218
+ backgroundColor: "transparent",
219
+ },
220
+ },
221
+ },
222
+ calendarHeader: {
223
+ sx: {
224
+ "& .MuiPickersCalendarHeader-label": {
225
+ fontWeight: "bold",
226
+ },
227
+ },
228
+ },
229
+ yearButton: {
230
+ sx: {
231
+ "&.MuiPickersYear-yearButton.Mui-selected": {
232
+ backgroundColor: butterflyBlue[900],
233
+ },
234
+ },
235
+ },
236
+ }}
237
+ slots={{
238
+ leftArrowIcon: LeftArrowIcon,
239
+ rightArrowIcon: RightArrowIcon,
240
+ switchViewIcon: EmptyIcon,
241
+ }}
242
+ shouldDisableTime={() => !pickerValue}
243
+ onChange={(value) => {
244
+ if (value?.isValid) {
245
+ return onChange(value.toUTC().toISO());
246
+ }
247
+
248
+ onChange(value);
249
+ }}
250
+ />
251
+ </Stack>
252
+ );
253
+ }
@@ -0,0 +1,24 @@
1
+ import { Skeleton as MuiSkeleton, Stack } from "@mui/material";
2
+
3
+ export const Skeleton = ({ label }: { label?: string }) => {
4
+ return (
5
+ <Stack gap="10px" flex={1}>
6
+ {label && (
7
+ <MuiSkeleton
8
+ width={120}
9
+ height="23px"
10
+ sx={{
11
+ transform: "scale(1)",
12
+ }}
13
+ />
14
+ )}
15
+ <MuiSkeleton
16
+ height="40px"
17
+ width="100%"
18
+ sx={{
19
+ transform: "scale(1)",
20
+ }}
21
+ />
22
+ </Stack>
23
+ );
24
+ };
@@ -0,0 +1 @@
1
+ export * from "./DateTimePicker";
@@ -0,0 +1,32 @@
1
+ import { AttachFile } from "@mui/icons-material";
2
+ import DeleteOutlineOutlinedIcon from "@mui/icons-material/DeleteOutlineOutlined";
3
+ import { IconButton, Stack, Typography } from "@mui/material";
4
+ import { v4 as uuidv4 } from "uuid";
5
+
6
+ type FileNamesProps = {
7
+ names: string[];
8
+ onDelete: (index: number) => void;
9
+ };
10
+
11
+ export const FileNames = ({ names, onDelete }: FileNamesProps) => {
12
+ return names.map((name: string, index: number) => {
13
+ return (
14
+ <Stack
15
+ key={uuidv4()}
16
+ direction="row"
17
+ justifyContent="space-between"
18
+ alignItems="center"
19
+ >
20
+ <Stack direction="row" gap="8x">
21
+ <AttachFile />
22
+
23
+ <Typography>{name}</Typography>
24
+ </Stack>
25
+
26
+ <IconButton onClick={() => onDelete(index)}>
27
+ <DeleteOutlineOutlinedIcon />
28
+ </IconButton>
29
+ </Stack>
30
+ );
31
+ });
32
+ };