@codezee/sixtify-brahma 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (267) hide show
  1. package/.github/workflows/deploy-storybook.yml +40 -0
  2. package/.husky/commit-msg +4 -0
  3. package/.husky/pre-commit +4 -0
  4. package/.husky/pre-push +4 -0
  5. package/.lintstagedrc +5 -0
  6. package/.prettierignore +11 -0
  7. package/.prettierrc +22 -0
  8. package/.vscode/extensions.json +22 -0
  9. package/.vscode/settings.json +17 -0
  10. package/README.md +81 -0
  11. package/apps/docs/.eslintrc.cjs +4 -0
  12. package/apps/docs/.eslintrc.js +9 -0
  13. package/apps/docs/.storybook/main.ts +23 -0
  14. package/apps/docs/.storybook/preview.tsx +27 -0
  15. package/apps/docs/next-env.d.ts +5 -0
  16. package/apps/docs/next.config.mjs +4 -0
  17. package/apps/docs/package.json +38 -0
  18. package/apps/docs/public/globals.css +25 -0
  19. package/apps/docs/stories/AgGrid/AgGrid.stories.tsx +69 -0
  20. package/apps/docs/stories/AppBar/AppBar.stories.tsx +39 -0
  21. package/apps/docs/stories/Breadcrumbs/Breadcrumbs.stories.tsx +37 -0
  22. package/apps/docs/stories/Button/ButtonGroup.stories.tsx +99 -0
  23. package/apps/docs/stories/Button/button.stories.tsx +99 -0
  24. package/apps/docs/stories/Card/AttendanceCard.stories.tsx +37 -0
  25. package/apps/docs/stories/Card/Card.stories.tsx +39 -0
  26. package/apps/docs/stories/Charts/PieChart.stories.tsx +264 -0
  27. package/apps/docs/stories/Chips/Chip.stories.tsx +141 -0
  28. package/apps/docs/stories/Chips/ChipWithBorder.stories.tsx +18 -0
  29. package/apps/docs/stories/Chips/FilterPill.stories.tsx +24 -0
  30. package/apps/docs/stories/Color/Color.stories.tsx +14 -0
  31. package/apps/docs/stories/Dialog/ButtomDialog.stories.tsx +47 -0
  32. package/apps/docs/stories/Dialog/DeleteDialog.stories.tsx +31 -0
  33. package/apps/docs/stories/Dialog/Dialog.stories.tsx +47 -0
  34. package/apps/docs/stories/Drawer/Drawer.stories.tsx +94 -0
  35. package/apps/docs/stories/FilterList/FilterList.stories.tsx +88 -0
  36. package/apps/docs/stories/FilterList/FilterListV2.stories.tsx +92 -0
  37. package/apps/docs/stories/FormFields/AutoComplete.stories.tsx +87 -0
  38. package/apps/docs/stories/FormFields/CheckBox.stories.tsx +61 -0
  39. package/apps/docs/stories/FormFields/DatePicker.stories.tsx +98 -0
  40. package/apps/docs/stories/FormFields/DateRangePicker.stories.tsx +37 -0
  41. package/apps/docs/stories/FormFields/FileUpload.stories.tsx +83 -0
  42. package/apps/docs/stories/FormFields/ImageUpload.stories.tsx +69 -0
  43. package/apps/docs/stories/FormFields/ListItemButton.stories.tsx +59 -0
  44. package/apps/docs/stories/FormFields/RadioGroupField.stories.tsx +170 -0
  45. package/apps/docs/stories/FormFields/SearchField.stories.tsx +72 -0
  46. package/apps/docs/stories/FormFields/TextField.stories.tsx +111 -0
  47. package/apps/docs/stories/FormFields/TimeField.stories.tsx +82 -0
  48. package/apps/docs/stories/FormFields/TimePicker.stories.tsx +82 -0
  49. package/apps/docs/stories/Indicator/Indicator.stories.tsx +33 -0
  50. package/apps/docs/stories/Indicator/SeverityIndicator.stories.tsx +27 -0
  51. package/apps/docs/stories/Layouts/FormRow.stories.tsx +45 -0
  52. package/apps/docs/stories/PadBox/PadBox.stories.tsx +49 -0
  53. package/apps/docs/stories/Stepper/Stepper.stories.tsx +75 -0
  54. package/apps/docs/stories/Stepper/StepperV2.stories.tsx +44 -0
  55. package/apps/docs/stories/Timeline/AttendanceStatus.stories.tsx +29 -0
  56. package/apps/docs/stories/Timeline/Timeline.stories.tsx +38 -0
  57. package/apps/docs/stories/Tooltip/Tooltip.stories.tsx +30 -0
  58. package/apps/docs/stories/UserProfileMenu/UserProfileMenu.stories.tsx +112 -0
  59. package/apps/docs/tsconfig.json +19 -0
  60. package/commitlint.config.cjs +6 -0
  61. package/index.ts +1 -0
  62. package/package.json +74 -0
  63. package/packages/eslint-config/README.md +3 -0
  64. package/packages/eslint-config/library.js +88 -0
  65. package/packages/eslint-config/next.js +85 -0
  66. package/packages/eslint-config/package.json +19 -0
  67. package/packages/eslint-config/react-internal.js +89 -0
  68. package/packages/shared-components/.eslintrc.js +10 -0
  69. package/packages/shared-components/package.json +22 -0
  70. package/packages/shared-components/src/Actions/AddAction.tsx +13 -0
  71. package/packages/shared-components/src/Actions/CalendarAction.tsx +13 -0
  72. package/packages/shared-components/src/Actions/DeleteAction.tsx +13 -0
  73. package/packages/shared-components/src/Actions/DownloadAction.tsx +13 -0
  74. package/packages/shared-components/src/Actions/EditAction.tsx +13 -0
  75. package/packages/shared-components/src/Actions/HistoryAction.tsx +13 -0
  76. package/packages/shared-components/src/Actions/index.ts +6 -0
  77. package/packages/shared-components/src/AgGrid/ActionCell/ActionCell.tsx +55 -0
  78. package/packages/shared-components/src/AgGrid/ActionCell/Popover.tsx +32 -0
  79. package/packages/shared-components/src/AgGrid/AgGrid.tsx +87 -0
  80. package/packages/shared-components/src/AgGrid/LoadingCell.tsx +5 -0
  81. package/packages/shared-components/src/AgGrid/index.ts +3 -0
  82. package/packages/shared-components/src/AppBar/AppBar.styled.tsx +25 -0
  83. package/packages/shared-components/src/AppBar/AppBar.tsx +20 -0
  84. package/packages/shared-components/src/AppBar/index.ts +1 -0
  85. package/packages/shared-components/src/Breadcrumbs/Breadcrumbs.tsx +76 -0
  86. package/packages/shared-components/src/Breadcrumbs/index.ts +1 -0
  87. package/packages/shared-components/src/Button/ActionButton.tsx +38 -0
  88. package/packages/shared-components/src/Button/Button.tsx +19 -0
  89. package/packages/shared-components/src/Button/ButtonGroup.tsx +37 -0
  90. package/packages/shared-components/src/Button/index.ts +3 -0
  91. package/packages/shared-components/src/Card/AttendanceCard.tsx +51 -0
  92. package/packages/shared-components/src/Card/Card.tsx +34 -0
  93. package/packages/shared-components/src/Card/CardItem/CardItem.tsx +33 -0
  94. package/packages/shared-components/src/Card/CardItem/CardItemValue.tsx +98 -0
  95. package/packages/shared-components/src/Card/CardItem/index.ts +2 -0
  96. package/packages/shared-components/src/Card/ProfileCard/ProfileCard.tsx +40 -0
  97. package/packages/shared-components/src/Card/ProfileCard/ProfileCardItem/ProfileCardBody.tsx +53 -0
  98. package/packages/shared-components/src/Card/ProfileCard/ProfileCardItem/ProfileCardHeader.tsx +96 -0
  99. package/packages/shared-components/src/Card/index.ts +6 -0
  100. package/packages/shared-components/src/Charts/PieChart.tsx +69 -0
  101. package/packages/shared-components/src/Charts/index.ts +1 -0
  102. package/packages/shared-components/src/Chips/Chip.tsx +26 -0
  103. package/packages/shared-components/src/Chips/ChipWithBorder.tsx +39 -0
  104. package/packages/shared-components/src/Chips/FilterPill.tsx +47 -0
  105. package/packages/shared-components/src/Chips/index.ts +3 -0
  106. package/packages/shared-components/src/Dialog/BottomDialog.styled.tsx +28 -0
  107. package/packages/shared-components/src/Dialog/BottomDialog.tsx +37 -0
  108. package/packages/shared-components/src/Dialog/DeleteDialog.tsx +48 -0
  109. package/packages/shared-components/src/Dialog/Dialog.tsx +61 -0
  110. package/packages/shared-components/src/Dialog/index.ts +3 -0
  111. package/packages/shared-components/src/Drawer/Bullet.tsx +12 -0
  112. package/packages/shared-components/src/Drawer/CloseDrawer/CloseDrawerMenuItem.tsx +50 -0
  113. package/packages/shared-components/src/Drawer/CloseDrawer/CloseDrawerMenuItemList.tsx +105 -0
  114. package/packages/shared-components/src/Drawer/CloseDrawer/CloseDrawerSubMenuItemList.tsx +125 -0
  115. package/packages/shared-components/src/Drawer/CloseDrawer/MenuItem.tsx +0 -0
  116. package/packages/shared-components/src/Drawer/CloseDrawer/Popover.tsx +45 -0
  117. package/packages/shared-components/src/Drawer/CloseDrawer/Popper.tsx +43 -0
  118. package/packages/shared-components/src/Drawer/Drawer.styled.tsx +51 -0
  119. package/packages/shared-components/src/Drawer/Drawer.tsx +55 -0
  120. package/packages/shared-components/src/Drawer/MenuItem.tsx +69 -0
  121. package/packages/shared-components/src/Drawer/OpenDrawer/OpenDrawerCollapse.tsx +13 -0
  122. package/packages/shared-components/src/Drawer/OpenDrawer/OpenDrawerMenuItem.tsx +46 -0
  123. package/packages/shared-components/src/Drawer/OpenDrawer/OpenDrawerMenuItemList.tsx +249 -0
  124. package/packages/shared-components/src/Drawer/index.ts +1 -0
  125. package/packages/shared-components/src/FilterList/FilterList.tsx +172 -0
  126. package/packages/shared-components/src/FilterList/FilterListV2.tsx +504 -0
  127. package/packages/shared-components/src/FilterList/FilterPopup.tsx +148 -0
  128. package/packages/shared-components/src/FilterList/FilterPopupWrapper.tsx +113 -0
  129. package/packages/shared-components/src/FilterList/FilterTypeWrapper.tsx +58 -0
  130. package/packages/shared-components/src/FilterList/getFormData.ts +29 -0
  131. package/packages/shared-components/src/FilterList/index.ts +3 -0
  132. package/packages/shared-components/src/FormFields/Autocomplete/Autocomplete.tsx +428 -0
  133. package/packages/shared-components/src/FormFields/Autocomplete/Skeleton.tsx +26 -0
  134. package/packages/shared-components/src/FormFields/Autocomplete/index.ts +1 -0
  135. package/packages/shared-components/src/FormFields/CheckBox/CheckBox.styled.tsx +67 -0
  136. package/packages/shared-components/src/FormFields/CheckBox/CheckBox.tsx +44 -0
  137. package/packages/shared-components/src/FormFields/CheckBox/Skeleton.tsx +12 -0
  138. package/packages/shared-components/src/FormFields/CheckBox/index.ts +1 -0
  139. package/packages/shared-components/src/FormFields/DatePicker/DatePicker.tsx +206 -0
  140. package/packages/shared-components/src/FormFields/DatePicker/Skeleton.tsx +21 -0
  141. package/packages/shared-components/src/FormFields/DatePicker/index.ts +1 -0
  142. package/packages/shared-components/src/FormFields/DateRangePicker/DateRangePicker.tsx +96 -0
  143. package/packages/shared-components/src/FormFields/DateRangePicker/Skeleton.tsx +38 -0
  144. package/packages/shared-components/src/FormFields/DateRangePicker/index.ts +1 -0
  145. package/packages/shared-components/src/FormFields/DateTimePicker/DateTimePicker.tsx +245 -0
  146. package/packages/shared-components/src/FormFields/DateTimePicker/Skeleton.tsx +24 -0
  147. package/packages/shared-components/src/FormFields/DateTimePicker/index.ts +1 -0
  148. package/packages/shared-components/src/FormFields/FileUpload/FileUpload.styled.tsx +22 -0
  149. package/packages/shared-components/src/FormFields/FileUpload/FileUpload.tsx +197 -0
  150. package/packages/shared-components/src/FormFields/FileUpload/Skeleton.tsx +21 -0
  151. package/packages/shared-components/src/FormFields/FileUpload/UploadedFileName.tsx +27 -0
  152. package/packages/shared-components/src/FormFields/FileUpload/index.ts +1 -0
  153. package/packages/shared-components/src/FormFields/ImageUpload/ImageUpload.styled.tsx +16 -0
  154. package/packages/shared-components/src/FormFields/ImageUpload/ImageUpload.tsx +181 -0
  155. package/packages/shared-components/src/FormFields/ImageUpload/ImageUploadView.tsx +65 -0
  156. package/packages/shared-components/src/FormFields/ImageUpload/PhotoCaptureDialog.tsx +74 -0
  157. package/packages/shared-components/src/FormFields/ImageUpload/Skeleton.tsx +31 -0
  158. package/packages/shared-components/src/FormFields/ImageUpload/index.ts +2 -0
  159. package/packages/shared-components/src/FormFields/ListItemButton/ListItemButton.styled.tsx +22 -0
  160. package/packages/shared-components/src/FormFields/ListItemButton/ListItemButton.tsx +37 -0
  161. package/packages/shared-components/src/FormFields/ListItemButton/index.ts +1 -0
  162. package/packages/shared-components/src/FormFields/PasswordField/PasswordField.tsx +50 -0
  163. package/packages/shared-components/src/FormFields/PasswordField/index.ts +1 -0
  164. package/packages/shared-components/src/FormFields/RadioGroupField/RadioGroupField.tsx +105 -0
  165. package/packages/shared-components/src/FormFields/RadioGroupField/Skeleton.tsx +26 -0
  166. package/packages/shared-components/src/FormFields/RadioGroupField/index.ts +1 -0
  167. package/packages/shared-components/src/FormFields/SearchField/SearchField.tsx +21 -0
  168. package/packages/shared-components/src/FormFields/SearchField/index.ts +1 -0
  169. package/packages/shared-components/src/FormFields/Switch/Skeleton.tsx +12 -0
  170. package/packages/shared-components/src/FormFields/Switch/Switch.tsx +33 -0
  171. package/packages/shared-components/src/FormFields/Switch/index.ts +1 -0
  172. package/packages/shared-components/src/FormFields/TextField/Skeleton.tsx +26 -0
  173. package/packages/shared-components/src/FormFields/TextField/TextField.tsx +92 -0
  174. package/packages/shared-components/src/FormFields/TextField/index.ts +1 -0
  175. package/packages/shared-components/src/FormFields/TimeField/Skeleton.tsx +24 -0
  176. package/packages/shared-components/src/FormFields/TimeField/TimeField.tsx +120 -0
  177. package/packages/shared-components/src/FormFields/TimeField/index.ts +1 -0
  178. package/packages/shared-components/src/FormFields/TimePicker/Skeleton.tsx +24 -0
  179. package/packages/shared-components/src/FormFields/TimePicker/TimePicker.tsx +162 -0
  180. package/packages/shared-components/src/FormFields/TimePicker/index.ts +1 -0
  181. package/packages/shared-components/src/FormFields/index.ts +13 -0
  182. package/packages/shared-components/src/Indicator/Indicator.tsx +17 -0
  183. package/packages/shared-components/src/Indicator/SeverityIndicator.tsx +34 -0
  184. package/packages/shared-components/src/Indicator/index.ts +2 -0
  185. package/packages/shared-components/src/Layouts/FormContainer.tsx +6 -0
  186. package/packages/shared-components/src/Layouts/FormRow/FormRow.styled.tsx +39 -0
  187. package/packages/shared-components/src/Layouts/FormRow/FormRow.tsx +20 -0
  188. package/packages/shared-components/src/Layouts/FormRow/index.ts +1 -0
  189. package/packages/shared-components/src/Layouts/FormSection.tsx +22 -0
  190. package/packages/shared-components/src/Layouts/index.ts +3 -0
  191. package/packages/shared-components/src/Loader/FacebookCircularProgress.tsx +41 -0
  192. package/packages/shared-components/src/Loader/index.ts +1 -0
  193. package/packages/shared-components/src/PadBox/PadBox.tsx +21 -0
  194. package/packages/shared-components/src/PadBox/index.ts +1 -0
  195. package/packages/shared-components/src/Stepper/Stepper.tsx +54 -0
  196. package/packages/shared-components/src/Stepper/StepperV2.tsx +115 -0
  197. package/packages/shared-components/src/Stepper/StepperV3.tsx +72 -0
  198. package/packages/shared-components/src/Stepper/index.ts +3 -0
  199. package/packages/shared-components/src/Svgs/AppLogo/AppLogoMedium.tsx +65 -0
  200. package/packages/shared-components/src/Svgs/AppLogo/AppLogoSmall.tsx +48 -0
  201. package/packages/shared-components/src/Svgs/ArrowUp.tsx +11 -0
  202. package/packages/shared-components/src/Svgs/Company/CompanyBanner.tsx +480 -0
  203. package/packages/shared-components/src/Svgs/Company/index.ts +1 -0
  204. package/packages/shared-components/src/Svgs/Drawer/SettingIcon.tsx +51 -0
  205. package/packages/shared-components/src/Svgs/Drawer/SvgsEmployees.tsx +25 -0
  206. package/packages/shared-components/src/Svgs/Drawer/SvgsOrganization.tsx +36 -0
  207. package/packages/shared-components/src/Svgs/Drawer/SvgsTransaction.tsx +79 -0
  208. package/packages/shared-components/src/Svgs/Drawer/index.ts +4 -0
  209. package/packages/shared-components/src/Svgs/FormAction.tsx +118 -0
  210. package/packages/shared-components/src/Svgs/LogoIcon.tsx +74 -0
  211. package/packages/shared-components/src/Svgs/SvgAdd.tsx +28 -0
  212. package/packages/shared-components/src/Svgs/SvgCalendar.tsx +89 -0
  213. package/packages/shared-components/src/Svgs/SvgDelete.tsx +55 -0
  214. package/packages/shared-components/src/Svgs/SvgDownload.tsx +20 -0
  215. package/packages/shared-components/src/Svgs/SvgFilterList.tsx +19 -0
  216. package/packages/shared-components/src/Svgs/SvgNoLogo.tsx +66 -0
  217. package/packages/shared-components/src/Svgs/SvgNoSign.tsx +28 -0
  218. package/packages/shared-components/src/Svgs/SvgsDrop.tsx +44 -0
  219. package/packages/shared-components/src/Svgs/SvgsEdit.tsx +42 -0
  220. package/packages/shared-components/src/Svgs/SvgsHistory.tsx +40 -0
  221. package/packages/shared-components/src/Svgs/SvgsHome.tsx +16 -0
  222. package/packages/shared-components/src/Svgs/SvgsIndicator.tsx +20 -0
  223. package/packages/shared-components/src/Svgs/index.ts +12 -0
  224. package/packages/shared-components/src/Tab/Skeleton.tsx +15 -0
  225. package/packages/shared-components/src/Tab/Tabs.tsx +64 -0
  226. package/packages/shared-components/src/Tab/index.ts +1 -0
  227. package/packages/shared-components/src/Timeline/AttendanceStatus.tsx +56 -0
  228. package/packages/shared-components/src/Timeline/Timeline.tsx +171 -0
  229. package/packages/shared-components/src/Timeline/TimelineTrackSegments.tsx +121 -0
  230. package/packages/shared-components/src/Timeline/index.ts +2 -0
  231. package/packages/shared-components/src/Toast/Toast.tsx +59 -0
  232. package/packages/shared-components/src/Toast/ToastBody.tsx +26 -0
  233. package/packages/shared-components/src/Toast/ToastFooterLink.tsx +19 -0
  234. package/packages/shared-components/src/Toast/Toaster.styled.tsx +76 -0
  235. package/packages/shared-components/src/Toast/Toaster.tsx +21 -0
  236. package/packages/shared-components/src/Toast/index.ts +3 -0
  237. package/packages/shared-components/src/Toast/toasts.tsx +28 -0
  238. package/packages/shared-components/src/Toast/types.ts +13 -0
  239. package/packages/shared-components/src/Tooltip/Tooltip.tsx +36 -0
  240. package/packages/shared-components/src/Tooltip/index.ts +1 -0
  241. package/packages/shared-components/src/UserProfileMenu/UserProfileMenu.styled.tsx +37 -0
  242. package/packages/shared-components/src/UserProfileMenu/UserProfileMenu.tsx +107 -0
  243. package/packages/shared-components/src/UserProfileMenu/index.ts +1 -0
  244. package/packages/shared-components/src/index.ts +24 -0
  245. package/packages/shared-components/src/utils/colorVariant.ts +142 -0
  246. package/packages/shared-components/src/utils/date.ts +11 -0
  247. package/packages/shared-components/src/utils/file.ts +20 -0
  248. package/packages/shared-components/src/utils/fileSizeValidate.ts +5 -0
  249. package/packages/shared-components/src/utils/index.ts +5 -0
  250. package/packages/shared-components/src/utils/theme/colorPalette.ts +110 -0
  251. package/packages/shared-components/src/utils/theme/colorPaletteUI.tsx +44 -0
  252. package/packages/shared-components/src/utils/theme/paletteDark.ts +10 -0
  253. package/packages/shared-components/src/utils/theme/paletteLight.ts +31 -0
  254. package/packages/shared-components/src/utils/theme/theme.ts +289 -0
  255. package/packages/shared-components/src/utils/theme/types.ts +18 -0
  256. package/packages/shared-components/src/utils/theme/typography.ts +52 -0
  257. package/packages/shared-components/src/utils/urlToNestedObject.ts +9 -0
  258. package/packages/shared-components/tsconfig.json +8 -0
  259. package/packages/shared-components/tsconfig.lint.json +8 -0
  260. package/packages/shared-components/turbo/generators/config.ts +33 -0
  261. package/packages/shared-components/turbo/generators/templates/component.hbs +8 -0
  262. package/packages/typescript-config/base.json +20 -0
  263. package/packages/typescript-config/nextjs.json +13 -0
  264. package/packages/typescript-config/package.json +9 -0
  265. package/packages/typescript-config/react-library.json +8 -0
  266. package/pnpm-workspace.yaml +3 -0
  267. package/turbo.json +44 -0
@@ -0,0 +1,31 @@
1
+ import { Button, DeleteDialog } from "@repo/shared-components";
2
+ import { Meta, StoryObj } from "@storybook/react";
3
+ import { useState } from "react";
4
+
5
+ const meta: Meta<typeof DeleteDialog> = {
6
+ title: "shared-component/Dialog/DeleteDialog",
7
+ component: DeleteDialog,
8
+ tags: ["autodocs"],
9
+ argTypes: {
10
+ title: { control: "text" },
11
+ },
12
+ args: {
13
+ title: "Do you want to Delete this?",
14
+ },
15
+ render: (args) => {
16
+ const [open, setOpen] = useState(args.open);
17
+
18
+ return (
19
+ <>
20
+ <Button onClick={() => setOpen(true)}>Open Delete Dialog</Button>
21
+ <DeleteDialog {...args} open={open} onClose={() => setOpen(false)} />
22
+ </>
23
+ );
24
+ },
25
+ };
26
+
27
+ export default meta;
28
+
29
+ type Story = StoryObj<typeof meta>;
30
+
31
+ export const DefaultDialog: Story = {};
@@ -0,0 +1,47 @@
1
+ import { Typography } from "@mui/material";
2
+ import { Button, Dialog } from "@repo/shared-components";
3
+ import { Meta, StoryObj } from "@storybook/react";
4
+ import { useState } from "react";
5
+
6
+ const meta: Meta<typeof Dialog> = {
7
+ title: "shared-component/Dialog/Dialog",
8
+ component: Dialog,
9
+ tags: ["autodocs"],
10
+ argTypes: {
11
+ title: { control: "text" },
12
+ children: { control: false },
13
+ isHideCloseIcon: { control: "boolean" },
14
+ isHideDividers: { control: "boolean" },
15
+ },
16
+ args: {
17
+ title: "Dialog Heading",
18
+ },
19
+ render: (args) => {
20
+ const [open, setOpen] = useState(false);
21
+
22
+ return (
23
+ <>
24
+ <Button onClick={() => setOpen(true)}>Open Dialog</Button>
25
+ <Dialog {...args} open={open} onClose={() => setOpen(false)}>
26
+ <Typography>Your content goes here 😊!</Typography>
27
+ </Dialog>
28
+ </>
29
+ );
30
+ },
31
+ };
32
+
33
+ export default meta;
34
+
35
+ type Story = StoryObj<typeof meta>;
36
+
37
+ export const DefaultDialog: Story = {};
38
+ export const WithoutCloseIcon: Story = {
39
+ args: {
40
+ isHideCloseIcon: true,
41
+ },
42
+ };
43
+ export const WithoutDivider: Story = {
44
+ args: {
45
+ isHideDividers: true,
46
+ },
47
+ };
@@ -0,0 +1,94 @@
1
+ import HomeIcon from "@mui/icons-material/Home";
2
+ import InfoIcon from "@mui/icons-material/Info";
3
+ import SettingsIcon from "@mui/icons-material/Settings";
4
+ import { Box } from "@mui/material";
5
+ import { Drawer, type MenuItem } from "@repo/shared-components";
6
+ import { Meta, StoryObj } from "@storybook/react";
7
+ import { fn } from "@storybook/test";
8
+
9
+ const menuItems: MenuItem[] = [
10
+ {
11
+ key: "home",
12
+ title: "Home",
13
+ icon: <HomeIcon />,
14
+ onClick: fn(),
15
+ },
16
+ {
17
+ key: "settings",
18
+ title: "Settings",
19
+ icon: <SettingsIcon />,
20
+ onClick: fn(),
21
+ },
22
+ {
23
+ key: "about",
24
+ title: "About",
25
+ icon: <InfoIcon />,
26
+ onClick: fn(),
27
+ },
28
+ ];
29
+
30
+ const meta: Meta<typeof Drawer> = {
31
+ title: "shared-component/Drawer",
32
+ component: Drawer,
33
+ tags: ["autodocs"],
34
+ argTypes: {
35
+ currentPathname: {
36
+ options: ["/home", "/settings", "/about"],
37
+ control: {
38
+ type: "select",
39
+ },
40
+ },
41
+ },
42
+ args: {
43
+ menuItems,
44
+ currentPathname: "/home",
45
+ },
46
+ render: (args) => {
47
+ return (
48
+ <Box sx={{ height: "100vh" }}>
49
+ <Drawer {...args} />
50
+ </Box>
51
+ );
52
+ },
53
+ };
54
+
55
+ export default meta;
56
+
57
+ type Story = StoryObj<typeof Drawer>;
58
+
59
+ export const OpenDrawer: Story = {
60
+ args: {
61
+ open: true,
62
+ },
63
+ };
64
+ export const ClosedDrawer: Story = {
65
+ args: {
66
+ open: false,
67
+ },
68
+ };
69
+
70
+ export const DrawerWithSubmenu: Story = {
71
+ args: {
72
+ open: true,
73
+ menuItems: [
74
+ ...menuItems,
75
+ {
76
+ key: "nested",
77
+ title: "Nested Menu",
78
+ icon: <SettingsIcon />,
79
+ menuItems: [
80
+ {
81
+ key: "nested-1",
82
+ title: "Nested Item 1",
83
+ onClick: fn(),
84
+ },
85
+ {
86
+ key: "nested-2",
87
+ title: "Nested Item 2",
88
+ onClick: fn(),
89
+ },
90
+ ],
91
+ },
92
+ ],
93
+ },
94
+ };
@@ -0,0 +1,88 @@
1
+ import { FilterList } from "@repo/shared-components";
2
+ import { FilterListType } from "@repo/shared-components/src/FilterList/FilterTypeWrapper";
3
+ import { Meta, StoryObj } from "@storybook/react";
4
+ import { LocalizationProvider } from "@mui/x-date-pickers";
5
+ import { AdapterLuxon } from "@mui/x-date-pickers/AdapterLuxon";
6
+
7
+ const filterList: FilterListType[] = [
8
+ {
9
+ label: "Single AutoComplete",
10
+ key: "status",
11
+ value: "",
12
+ type: "autoComplete",
13
+ options: [
14
+ {
15
+ value: "active",
16
+ label: "Active",
17
+ },
18
+ {
19
+ value: "pending",
20
+ label: "Pending",
21
+ },
22
+ ],
23
+ },
24
+ {
25
+ label: "Job Title",
26
+ key: "jobtitle",
27
+ value: "",
28
+ type: "text",
29
+ },
30
+ {
31
+ label: "Multi AutoComplete",
32
+ key: "persona",
33
+ value: "",
34
+ type: "autoComplete",
35
+ multiSelect: true,
36
+ options: [
37
+ {
38
+ value: "ituser",
39
+ label: "IT User",
40
+ },
41
+ {
42
+ value: "itadmin",
43
+ label: "IT Admin",
44
+ },
45
+ ],
46
+ },
47
+ {
48
+ label: "Date",
49
+ key: "date",
50
+ value: "",
51
+ type: "date",
52
+ },
53
+ {
54
+ label: "Date Range",
55
+ key: "dateRange",
56
+ value: "",
57
+ type: "dateRange",
58
+ menuInfo: "Start ~ End",
59
+ },
60
+ {
61
+ key: "switch",
62
+ label: "Switch",
63
+ type: "switch",
64
+ value: "",
65
+ },
66
+ ];
67
+
68
+ const meta: Meta<typeof FilterList> = {
69
+ title: "shared-component/FilterList/FilterList",
70
+ component: FilterList,
71
+ tags: ["autodocs"],
72
+ decorators: [
73
+ (Story) => (
74
+ <LocalizationProvider dateAdapter={AdapterLuxon}>
75
+ <Story />
76
+ </LocalizationProvider>
77
+ ),
78
+ ],
79
+ args: {
80
+ filterListItems: filterList,
81
+ },
82
+ };
83
+
84
+ export default meta;
85
+
86
+ type Story = StoryObj<typeof FilterList>;
87
+
88
+ export const DefaultFilterList: Story = {};
@@ -0,0 +1,92 @@
1
+ import { FilterListV2 } from "@repo/shared-components";
2
+ import { FilterListType } from "@repo/shared-components/src/FilterList/FilterTypeWrapper";
3
+ import { Meta, StoryObj } from "@storybook/react";
4
+ import { LocalizationProvider } from "@mui/x-date-pickers";
5
+ import { AdapterLuxon } from "@mui/x-date-pickers/AdapterLuxon";
6
+ import { fn } from "@storybook/test";
7
+
8
+ const filterList: FilterListType[] = [
9
+ {
10
+ label: "Single AutoComplete",
11
+ key: "status",
12
+ value: "",
13
+ type: "autoComplete",
14
+ options: [
15
+ {
16
+ value: "active",
17
+ label: "Active",
18
+ },
19
+ {
20
+ value: "pending",
21
+ label: "Pending",
22
+ },
23
+ ],
24
+ },
25
+ {
26
+ label: "Job Title",
27
+ key: "jobtitle",
28
+ value: "",
29
+ type: "text",
30
+ },
31
+ {
32
+ label: "Multi AutoComplete",
33
+ key: "persona",
34
+ value: "",
35
+ type: "autoComplete",
36
+ multiSelect: true,
37
+ options: [
38
+ {
39
+ value: "ituser",
40
+ label: "IT User",
41
+ },
42
+ {
43
+ value: "itadmin",
44
+ label: "IT Admin",
45
+ },
46
+ ],
47
+ },
48
+ {
49
+ label: "Date",
50
+ key: "date",
51
+ value: "",
52
+ type: "date",
53
+ },
54
+ {
55
+ label: "Date Range",
56
+ key: "dateRange",
57
+ value: "",
58
+ type: "dateRange",
59
+ menuInfo: "Start ~ End",
60
+ },
61
+ {
62
+ key: "switch",
63
+ label: "Switch",
64
+ type: "switch",
65
+ value: "",
66
+ },
67
+ ];
68
+
69
+ const meta: Meta<typeof FilterListV2> = {
70
+ title: "shared-component/FilterList/FilterListV2",
71
+ component: FilterListV2,
72
+ tags: ["autodocs"],
73
+ decorators: [
74
+ (Story) => (
75
+ <LocalizationProvider dateAdapter={AdapterLuxon}>
76
+ <Story />
77
+ </LocalizationProvider>
78
+ ),
79
+ ],
80
+ args: {
81
+ filterListItems: filterList,
82
+ onChange: fn(),
83
+ onApply: fn(),
84
+ onClear: fn(),
85
+ },
86
+ };
87
+
88
+ export default meta;
89
+
90
+ type Story = StoryObj<typeof FilterListV2>;
91
+
92
+ export const DefaultFilterListV2: Story = {};
@@ -0,0 +1,87 @@
1
+ import { Autocomplete } from "@repo/shared-components";
2
+ import { Meta, StoryObj } from "@storybook/react";
3
+ import { fn } from "@storybook/test";
4
+ import { FieldValues, useForm } from "react-hook-form";
5
+
6
+ const meta: Meta<typeof Autocomplete> = {
7
+ title: "shared-component/FormFields/Autocomplete",
8
+ component: Autocomplete,
9
+ tags: ["autodocs"],
10
+ argTypes: {
11
+ disabled: { control: "boolean" },
12
+ required: { control: "boolean" },
13
+ isShowAvatar: { control: "boolean" },
14
+ shouldCloseOnSelect: { control: "boolean" },
15
+ label: { control: "text" },
16
+ loading: { control: "boolean" },
17
+ multiple: { control: "boolean" },
18
+ error: { control: "boolean" },
19
+ placeholder: { control: "text" },
20
+ },
21
+ args: {
22
+ required: false,
23
+ label: "Select Option",
24
+ loading: false,
25
+ multiple: false,
26
+ error: false,
27
+ isShowAvatar: false,
28
+ shouldCloseOnSelect: false,
29
+ disabled: false,
30
+ placeholder: "Choose an option",
31
+ options: [
32
+ {
33
+ label: "Option 1",
34
+ value: "option1",
35
+ avatar:
36
+ "https://sixtify.s3.amazonaws.com/1723787550246_androgynous-avatar-non-binary-queer-person.jpg",
37
+ },
38
+ { label: "Option 2", value: "option2", disabled: true },
39
+ { label: "Option 3", value: "option3" },
40
+ ],
41
+ },
42
+ render: (args) => {
43
+ const { control } = useForm<FieldValues>({
44
+ values: {
45
+ example: "",
46
+ },
47
+ });
48
+ return <Autocomplete {...args} name="example" control={control} />;
49
+ },
50
+ };
51
+ export default meta;
52
+
53
+ type Story = StoryObj<typeof Autocomplete>;
54
+
55
+ export const Default: Story = {};
56
+
57
+ export const Disabled: Story = {
58
+ args: {
59
+ disabled: true,
60
+ },
61
+ };
62
+
63
+ export const WithAction: Story = {
64
+ args: {
65
+ onAction: fn(),
66
+ },
67
+ };
68
+
69
+ export const MultipleSelection: Story = {
70
+ args: {
71
+ multiple: true,
72
+ },
73
+ };
74
+
75
+ export const LoadingState: Story = {
76
+ args: {
77
+ loading: true,
78
+ },
79
+ };
80
+
81
+ export const ErrorState: Story = {
82
+ args: {
83
+ error: true,
84
+ required: true,
85
+ helperText: "This field is required",
86
+ },
87
+ };
@@ -0,0 +1,61 @@
1
+ import { CheckBox } from "@repo/shared-components";
2
+ import { Meta, StoryObj } from "@storybook/react";
3
+ import { FieldValues, useForm } from "react-hook-form";
4
+
5
+ const meta: Meta<typeof CheckBox> = {
6
+ title: "shared-component/FormFields/CheckBox",
7
+ component: CheckBox,
8
+ tags: ["autodocs"],
9
+ argTypes: {
10
+ size: {
11
+ options: ["small", "medium", "large"],
12
+ control: {
13
+ type: "select",
14
+ },
15
+ },
16
+ disabled: { control: "boolean" },
17
+ loading: { control: "boolean" },
18
+ },
19
+ args: {
20
+ size: "medium",
21
+ loading: false,
22
+ disabled: false,
23
+ },
24
+ render: (args) => {
25
+ const { control } = useForm<FieldValues>({
26
+ defaultValues: {
27
+ example: false,
28
+ },
29
+ });
30
+ return <CheckBox {...args} name="example" control={control} />;
31
+ },
32
+ };
33
+ export default meta;
34
+
35
+ type Story = StoryObj<typeof CheckBox>;
36
+
37
+ export const Default: Story = {};
38
+
39
+ export const Disabled: Story = {
40
+ args: {
41
+ disabled: true,
42
+ },
43
+ };
44
+
45
+ export const LoadingState: Story = {
46
+ args: {
47
+ loading: true,
48
+ },
49
+ };
50
+
51
+ export const SmallSize: Story = {
52
+ args: {
53
+ size: "small",
54
+ },
55
+ };
56
+
57
+ export const LargeSize: Story = {
58
+ args: {
59
+ size: "large",
60
+ },
61
+ };
@@ -0,0 +1,98 @@
1
+ import { LocalizationProvider } from "@mui/x-date-pickers";
2
+ import { AdapterLuxon } from "@mui/x-date-pickers/AdapterLuxon";
3
+ import { DatePicker, dateFormats } from "@repo/shared-components";
4
+ import { Meta, StoryObj } from "@storybook/react";
5
+ import { DateTime } from "luxon";
6
+ import { FieldValues, useForm } from "react-hook-form";
7
+
8
+ const meta: Meta<typeof DatePicker> = {
9
+ title: "shared-component/FormFields/DatePicker",
10
+ component: DatePicker,
11
+ tags: ["autodocs"],
12
+ decorators: [
13
+ (Story) => (
14
+ <LocalizationProvider dateAdapter={AdapterLuxon}>
15
+ <Story />
16
+ </LocalizationProvider>
17
+ ),
18
+ ],
19
+ argTypes: {
20
+ label: { control: "text" },
21
+ required: { control: "boolean" },
22
+ disabled: { control: "boolean" },
23
+ readOnly: { control: "boolean" },
24
+ error: { control: "boolean" },
25
+ helperText: { control: "text" },
26
+ loading: { control: "boolean" },
27
+ format: {
28
+ options: [dateFormats.dateWithISO8601, dateFormats.dateWithEuropean],
29
+ control: { type: "select" },
30
+ },
31
+ },
32
+ render: (args) => {
33
+ const { control } = useForm<FieldValues>({
34
+ defaultValues: {
35
+ dateField: DateTime.now().toISODate(),
36
+ },
37
+ });
38
+ return <DatePicker {...args} name="dateField" control={control} />;
39
+ },
40
+ args: {
41
+ label: "Select Date",
42
+ required: false,
43
+ disabled: false,
44
+ readOnly: false,
45
+ error: false,
46
+ helperText: "",
47
+ loading: false,
48
+ format: dateFormats.dateWithEuropean,
49
+ },
50
+ };
51
+
52
+ export default meta;
53
+
54
+ type Story = StoryObj<typeof DatePicker>;
55
+
56
+ export const DefaultDatePicker: Story = {
57
+ args: {
58
+ label: "Select Date",
59
+ },
60
+ };
61
+
62
+ export const RequiredDatePicker: Story = {
63
+ args: {
64
+ label: "Required Date",
65
+ required: true,
66
+ helperText: "This field is required",
67
+ },
68
+ };
69
+
70
+ export const DisabledDatePicker: Story = {
71
+ args: {
72
+ label: "Disabled Date",
73
+ disabled: true,
74
+ helperText: "This field is disabled",
75
+ },
76
+ };
77
+
78
+ export const LoadingDatePicker: Story = {
79
+ args: {
80
+ label: "Loading Date Picker",
81
+ loading: true,
82
+ },
83
+ };
84
+
85
+ export const ErrorDatePicker: Story = {
86
+ args: {
87
+ label: "Error Date Picker",
88
+ error: true,
89
+ helperText: "Invalid date",
90
+ },
91
+ };
92
+
93
+ export const ReadOnlyDatePicker: Story = {
94
+ args: {
95
+ label: "Read-Only Date Picker",
96
+ readOnly: true,
97
+ },
98
+ };
@@ -0,0 +1,37 @@
1
+ import { LocalizationProvider } from "@mui/x-date-pickers";
2
+ import { AdapterLuxon } from "@mui/x-date-pickers/AdapterLuxon";
3
+ import { DateRangePicker, dateFormats } from "@repo/shared-components";
4
+ import { Meta, StoryObj } from "@storybook/react";
5
+ import { DateTime } from "luxon";
6
+ import { FieldValues, useForm } from "react-hook-form";
7
+
8
+ const meta: Meta<typeof DateRangePicker> = {
9
+ title: "shared-component/FormFields/DateRangePicker",
10
+ component: DateRangePicker,
11
+ tags: ["autodocs"],
12
+ decorators: [
13
+ (Story) => (
14
+ <LocalizationProvider dateAdapter={AdapterLuxon}>
15
+ <Story />
16
+ </LocalizationProvider>
17
+ ),
18
+ ],
19
+ render: (args) => {
20
+ const { control } = useForm<FieldValues>({
21
+ defaultValues: {
22
+ dateField: DateTime.now().toISODate(),
23
+ },
24
+ });
25
+ return <DateRangePicker {...args} name="dateField" control={control} />;
26
+ },
27
+ };
28
+
29
+ export default meta;
30
+
31
+ type Story = StoryObj<typeof DateRangePicker>;
32
+
33
+ export const DefaultDateRangerPicker: Story = {
34
+ args: {
35
+ label: "Select Date",
36
+ },
37
+ };