@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.
- package/.github/workflows/check-build.yml +41 -0
- package/.github/workflows/deploy-on-npm.yml +43 -0
- package/.husky/commit-msg +4 -0
- package/.husky/pre-commit +4 -0
- package/.husky/pre-push +6 -0
- package/.lintstagedrc +5 -0
- package/.prettierignore +12 -0
- package/.prettierrc +22 -0
- package/.vscode/extensions.json +22 -0
- package/.vscode/settings.json +17 -0
- package/README.md +90 -0
- package/apps/docs/.eslintrc.cjs +9 -0
- package/apps/docs/.storybook/main.ts +23 -0
- package/apps/docs/.storybook/manager.ts +6 -0
- package/apps/docs/.storybook/preview.tsx +27 -0
- package/apps/docs/.storybook/theme.ts +8 -0
- package/apps/docs/next-env.d.ts +5 -0
- package/apps/docs/next.config.mjs +4 -0
- package/apps/docs/package.json +43 -0
- package/apps/docs/public/globals.css +26 -0
- package/apps/docs/stories/Actions/Actions.stories.tsx +49 -0
- package/apps/docs/stories/AgGrid/AgGrid.stories.tsx +70 -0
- package/apps/docs/stories/AppBar/AppBar.stories.tsx +39 -0
- package/apps/docs/stories/Breadcrumbs/Breadcrumbs.stories.tsx +37 -0
- package/apps/docs/stories/Button/ButtonGroup.stories.tsx +120 -0
- package/apps/docs/stories/Button/button.stories.tsx +99 -0
- package/apps/docs/stories/Card/AttendanceCard.stories.tsx +36 -0
- package/apps/docs/stories/Card/Card.stories.tsx +39 -0
- package/apps/docs/stories/Charts/PieChart.stories.tsx +265 -0
- package/apps/docs/stories/Chips/Chip.stories.tsx +141 -0
- package/apps/docs/stories/Chips/ChipWithBorder.stories.tsx +18 -0
- package/apps/docs/stories/Chips/FilterPill.stories.tsx +24 -0
- package/apps/docs/stories/Color/Color.stories.tsx +14 -0
- package/apps/docs/stories/Dialog/ButtomDialog.stories.tsx +48 -0
- package/apps/docs/stories/Dialog/DeleteDialog.stories.tsx +32 -0
- package/apps/docs/stories/Dialog/Dialog.stories.tsx +48 -0
- package/apps/docs/stories/Drawer/Drawer.stories.tsx +94 -0
- package/apps/docs/stories/FilterList/FilterList.stories.tsx +88 -0
- package/apps/docs/stories/FilterList/FilterListV2.stories.tsx +92 -0
- package/apps/docs/stories/FormFields/AutoComplete.stories.tsx +90 -0
- package/apps/docs/stories/FormFields/CheckBox.stories.tsx +64 -0
- package/apps/docs/stories/FormFields/DatePicker.stories.tsx +100 -0
- package/apps/docs/stories/FormFields/DateRangePicker.stories.tsx +39 -0
- package/apps/docs/stories/FormFields/DateTimePicker.stories.tsx +39 -0
- package/apps/docs/stories/FormFields/FileUpload.stories.tsx +83 -0
- package/apps/docs/stories/FormFields/ImageUpload.stories.tsx +69 -0
- package/apps/docs/stories/FormFields/ListItemButton.stories.tsx +59 -0
- package/apps/docs/stories/FormFields/PhoneInputField.stories.tsx +84 -0
- package/apps/docs/stories/FormFields/RadioGroupField.stories.tsx +172 -0
- package/apps/docs/stories/FormFields/SearchField.stories.tsx +74 -0
- package/apps/docs/stories/FormFields/TextField.stories.tsx +141 -0
- package/apps/docs/stories/FormFields/TimeField.stories.tsx +84 -0
- package/apps/docs/stories/FormFields/TimePicker.stories.tsx +84 -0
- package/apps/docs/stories/Indicator/Indicator.stories.tsx +33 -0
- package/apps/docs/stories/Indicator/SeverityIndicator.stories.tsx +27 -0
- package/apps/docs/stories/Layouts/FormRow.stories.tsx +45 -0
- package/apps/docs/stories/PadBox/PadBox.stories.tsx +49 -0
- package/apps/docs/stories/Stepper/Stepper.stories.tsx +110 -0
- package/apps/docs/stories/Stepper/StepperV2.stories.tsx +44 -0
- package/apps/docs/stories/Timeline/AttendanceStatus.stories.tsx +29 -0
- package/apps/docs/stories/Timeline/Timeline.stories.tsx +38 -0
- package/apps/docs/stories/Tooltip/Tooltip.stories.tsx +28 -0
- package/apps/docs/stories/UserProfileMenu/UserProfileMenu.stories.tsx +112 -0
- package/apps/docs/tsconfig.json +19 -0
- package/commitlint.config.cjs +6 -0
- package/index.ts +1 -0
- package/package.json +85 -0
- package/packages/eslint-config/README.md +3 -0
- package/packages/eslint-config/library.js +88 -0
- package/packages/eslint-config/next.js +85 -0
- package/packages/eslint-config/package.json +19 -0
- package/packages/eslint-config/react-internal.js +89 -0
- package/packages/shared-components/.eslintrc.js +10 -0
- package/packages/shared-components/package.json +51 -0
- package/packages/shared-components/src/Actions/AddAction.tsx +16 -0
- package/packages/shared-components/src/Actions/CalendarAction.tsx +16 -0
- package/packages/shared-components/src/Actions/ConfigureAction.tsx +16 -0
- package/packages/shared-components/src/Actions/DeleteAction.tsx +16 -0
- package/packages/shared-components/src/Actions/DownloadAction.tsx +16 -0
- package/packages/shared-components/src/Actions/EditAction.tsx +16 -0
- package/packages/shared-components/src/Actions/ExportAction.tsx +16 -0
- package/packages/shared-components/src/Actions/FilterAction.tsx +16 -0
- package/packages/shared-components/src/Actions/HistoryAction.tsx +16 -0
- package/packages/shared-components/src/Actions/ImportAction.tsx +16 -0
- package/packages/shared-components/src/Actions/ViewAction.tsx +16 -0
- package/packages/shared-components/src/Actions/index.ts +11 -0
- package/packages/shared-components/src/AgGrid/ActionCell/ActionCell.tsx +57 -0
- package/packages/shared-components/src/AgGrid/ActionCell/Popover.tsx +32 -0
- package/packages/shared-components/src/AgGrid/AgGrid.tsx +93 -0
- package/packages/shared-components/src/AgGrid/LoadingCell.tsx +5 -0
- package/packages/shared-components/src/AgGrid/index.ts +3 -0
- package/packages/shared-components/src/AppBar/AppBar.styled.tsx +33 -0
- package/packages/shared-components/src/AppBar/AppBar.tsx +20 -0
- package/packages/shared-components/src/AppBar/index.ts +1 -0
- package/packages/shared-components/src/Breadcrumbs/Breadcrumbs.tsx +76 -0
- package/packages/shared-components/src/Breadcrumbs/index.ts +1 -0
- package/packages/shared-components/src/Button/ActionButton.tsx +38 -0
- package/packages/shared-components/src/Button/Button.tsx +19 -0
- package/packages/shared-components/src/Button/ButtonGroup.tsx +37 -0
- package/packages/shared-components/src/Button/index.ts +3 -0
- package/packages/shared-components/src/Card/AttendanceCard.tsx +51 -0
- package/packages/shared-components/src/Card/Card.tsx +34 -0
- package/packages/shared-components/src/Card/CardItem/CardItem.tsx +33 -0
- package/packages/shared-components/src/Card/CardItem/CardItemValue.tsx +98 -0
- package/packages/shared-components/src/Card/CardItem/index.ts +2 -0
- package/packages/shared-components/src/Card/ProfileCard/ProfileCard.tsx +40 -0
- package/packages/shared-components/src/Card/ProfileCard/ProfileCardItem/ProfileCardBody.tsx +53 -0
- package/packages/shared-components/src/Card/ProfileCard/ProfileCardItem/ProfileCardHeader.tsx +94 -0
- package/packages/shared-components/src/Card/index.ts +6 -0
- package/packages/shared-components/src/Charts/PieChart.tsx +81 -0
- package/packages/shared-components/src/Charts/Skeleton.tsx +36 -0
- package/packages/shared-components/src/Charts/index.ts +1 -0
- package/packages/shared-components/src/Chips/Chip.tsx +26 -0
- package/packages/shared-components/src/Chips/ChipWithBorder.tsx +39 -0
- package/packages/shared-components/src/Chips/FilterPill.tsx +47 -0
- package/packages/shared-components/src/Chips/index.ts +3 -0
- package/packages/shared-components/src/Dialog/BottomDialog.styled.tsx +28 -0
- package/packages/shared-components/src/Dialog/BottomDialog.tsx +37 -0
- package/packages/shared-components/src/Dialog/DeleteDialog.tsx +48 -0
- package/packages/shared-components/src/Dialog/Dialog.tsx +61 -0
- package/packages/shared-components/src/Dialog/index.ts +3 -0
- package/packages/shared-components/src/Drawer/Bullet.tsx +12 -0
- package/packages/shared-components/src/Drawer/CloseDrawer/CloseDrawerMenuItem.tsx +57 -0
- package/packages/shared-components/src/Drawer/CloseDrawer/CloseDrawerMenuItemList.tsx +109 -0
- package/packages/shared-components/src/Drawer/CloseDrawer/CloseDrawerSubMenuItemList.tsx +128 -0
- package/packages/shared-components/src/Drawer/CloseDrawer/Popover.tsx +45 -0
- package/packages/shared-components/src/Drawer/CloseDrawer/Popper.tsx +43 -0
- package/packages/shared-components/src/Drawer/Drawer.styled.tsx +63 -0
- package/packages/shared-components/src/Drawer/Drawer.tsx +56 -0
- package/packages/shared-components/src/Drawer/MenuItem.tsx +75 -0
- package/packages/shared-components/src/Drawer/OpenDrawer/OpenDrawerCollapse.tsx +13 -0
- package/packages/shared-components/src/Drawer/OpenDrawer/OpenDrawerMenuItem.tsx +48 -0
- package/packages/shared-components/src/Drawer/OpenDrawer/OpenDrawerMenuItemList.tsx +232 -0
- package/packages/shared-components/src/Drawer/index.ts +1 -0
- package/packages/shared-components/src/FilterList/DateRangePickerPopUp.tsx +123 -0
- package/packages/shared-components/src/FilterList/FilterList.tsx +180 -0
- package/packages/shared-components/src/FilterList/FilterListV2.tsx +661 -0
- package/packages/shared-components/src/FilterList/FilterPopup.tsx +165 -0
- package/packages/shared-components/src/FilterList/FilterPopupWrapper.tsx +110 -0
- package/packages/shared-components/src/FilterList/FilterTypeWrapper.tsx +60 -0
- package/packages/shared-components/src/FilterList/GetFilterPopupComponent.tsx +76 -0
- package/packages/shared-components/src/FilterList/getFormData.ts +29 -0
- package/packages/shared-components/src/FilterList/index.ts +6 -0
- package/packages/shared-components/src/FormFields/Autocomplete/Autocomplete.tsx +509 -0
- package/packages/shared-components/src/FormFields/Autocomplete/Skeleton.tsx +26 -0
- package/packages/shared-components/src/FormFields/Autocomplete/index.ts +1 -0
- package/packages/shared-components/src/FormFields/CheckBox/CheckBox.styled.tsx +76 -0
- package/packages/shared-components/src/FormFields/CheckBox/CheckBox.tsx +44 -0
- package/packages/shared-components/src/FormFields/CheckBox/Skeleton.tsx +12 -0
- package/packages/shared-components/src/FormFields/CheckBox/index.ts +1 -0
- package/packages/shared-components/src/FormFields/DatePicker/DatePicker.tsx +217 -0
- package/packages/shared-components/src/FormFields/DatePicker/Skeleton.tsx +28 -0
- package/packages/shared-components/src/FormFields/DatePicker/index.ts +1 -0
- package/packages/shared-components/src/FormFields/DateRangePicker/DateRangePicker.tsx +97 -0
- package/packages/shared-components/src/FormFields/DateRangePicker/Skeleton.tsx +38 -0
- package/packages/shared-components/src/FormFields/DateRangePicker/index.ts +1 -0
- package/packages/shared-components/src/FormFields/DateTimePicker/DateTimePicker.tsx +253 -0
- package/packages/shared-components/src/FormFields/DateTimePicker/Skeleton.tsx +24 -0
- package/packages/shared-components/src/FormFields/DateTimePicker/index.ts +1 -0
- package/packages/shared-components/src/FormFields/FileUpload/FileNames.tsx +32 -0
- package/packages/shared-components/src/FormFields/FileUpload/FileUpload.styled.tsx +31 -0
- package/packages/shared-components/src/FormFields/FileUpload/FileUpload.tsx +160 -0
- package/packages/shared-components/src/FormFields/FileUpload/Skeleton.tsx +21 -0
- package/packages/shared-components/src/FormFields/FileUpload/index.ts +2 -0
- package/packages/shared-components/src/FormFields/ImageUpload/ImageUpload.styled.tsx +20 -0
- package/packages/shared-components/src/FormFields/ImageUpload/ImageUpload.tsx +181 -0
- package/packages/shared-components/src/FormFields/ImageUpload/ImageUploadView.tsx +65 -0
- package/packages/shared-components/src/FormFields/ImageUpload/PhotoCaptureDialog.tsx +74 -0
- package/packages/shared-components/src/FormFields/ImageUpload/Skeleton.tsx +31 -0
- package/packages/shared-components/src/FormFields/ImageUpload/index.ts +2 -0
- package/packages/shared-components/src/FormFields/ListItemButton/ListItemButton.styled.tsx +25 -0
- package/packages/shared-components/src/FormFields/ListItemButton/ListItemButton.tsx +52 -0
- package/packages/shared-components/src/FormFields/ListItemButton/index.ts +1 -0
- package/packages/shared-components/src/FormFields/PasswordField/PasswordField.tsx +50 -0
- package/packages/shared-components/src/FormFields/PasswordField/index.ts +1 -0
- package/packages/shared-components/src/FormFields/PhoneInputField/PhoneInputField.tsx +108 -0
- package/packages/shared-components/src/FormFields/PhoneInputField/Skeleton.tsx +31 -0
- package/packages/shared-components/src/FormFields/PhoneInputField/index.ts +1 -0
- package/packages/shared-components/src/FormFields/RadioGroupField/RadioGroupField.tsx +105 -0
- package/packages/shared-components/src/FormFields/RadioGroupField/Skeleton.tsx +26 -0
- package/packages/shared-components/src/FormFields/RadioGroupField/index.ts +1 -0
- package/packages/shared-components/src/FormFields/SearchField/SearchField.tsx +21 -0
- package/packages/shared-components/src/FormFields/SearchField/index.ts +1 -0
- package/packages/shared-components/src/FormFields/Switch/Skeleton.tsx +12 -0
- package/packages/shared-components/src/FormFields/Switch/Switch.tsx +33 -0
- package/packages/shared-components/src/FormFields/Switch/index.ts +1 -0
- package/packages/shared-components/src/FormFields/TextField/Skeleton.tsx +31 -0
- package/packages/shared-components/src/FormFields/TextField/TextField.tsx +167 -0
- package/packages/shared-components/src/FormFields/TextField/index.ts +1 -0
- package/packages/shared-components/src/FormFields/TimeField/Skeleton.tsx +24 -0
- package/packages/shared-components/src/FormFields/TimeField/TimeField.tsx +120 -0
- package/packages/shared-components/src/FormFields/TimeField/index.ts +1 -0
- package/packages/shared-components/src/FormFields/TimePicker/Skeleton.tsx +24 -0
- package/packages/shared-components/src/FormFields/TimePicker/TimePicker.tsx +168 -0
- package/packages/shared-components/src/FormFields/TimePicker/index.ts +1 -0
- package/packages/shared-components/src/FormFields/index.ts +16 -0
- package/packages/shared-components/src/Indicator/Indicator.tsx +18 -0
- package/packages/shared-components/src/Indicator/SeverityIndicator.tsx +34 -0
- package/packages/shared-components/src/Indicator/index.ts +2 -0
- package/packages/shared-components/src/Layouts/FormContainer.tsx +6 -0
- package/packages/shared-components/src/Layouts/FormGridLayout.tsx +27 -0
- package/packages/shared-components/src/Layouts/FormRow/FormRow.styled.tsx +47 -0
- package/packages/shared-components/src/Layouts/FormRow/FormRow.tsx +20 -0
- package/packages/shared-components/src/Layouts/FormRow/index.ts +1 -0
- package/packages/shared-components/src/Layouts/FormSection.tsx +22 -0
- package/packages/shared-components/src/Layouts/index.ts +4 -0
- package/packages/shared-components/src/Loader/FacebookCircularProgress.tsx +41 -0
- package/packages/shared-components/src/Loader/index.ts +1 -0
- package/packages/shared-components/src/PadBox/PadBox.tsx +21 -0
- package/packages/shared-components/src/PadBox/index.ts +1 -0
- package/packages/shared-components/src/Pagination/Pagination.tsx +42 -0
- package/packages/shared-components/src/Pagination/index.ts +1 -0
- package/packages/shared-components/src/Stepper/Stepper.tsx +88 -0
- package/packages/shared-components/src/Stepper/StepperV2.tsx +115 -0
- package/packages/shared-components/src/Stepper/StepperV3.tsx +72 -0
- package/packages/shared-components/src/Stepper/index.ts +3 -0
- package/packages/shared-components/src/Svgs/AppLogo/AppLogoMedium.tsx +65 -0
- package/packages/shared-components/src/Svgs/AppLogo/AppLogoSmall.tsx +48 -0
- package/packages/shared-components/src/Svgs/ArrowUp.tsx +11 -0
- package/packages/shared-components/src/Svgs/Company/CompanyBanner.tsx +480 -0
- package/packages/shared-components/src/Svgs/Company/index.ts +1 -0
- package/packages/shared-components/src/Svgs/Drawer/SettingIcon.tsx +31 -0
- package/packages/shared-components/src/Svgs/Drawer/SvgBankConfig.tsx +36 -0
- package/packages/shared-components/src/Svgs/Drawer/SvgConfiguration.tsx +16 -0
- package/packages/shared-components/src/Svgs/Drawer/SvgPayroll.tsx +32 -0
- package/packages/shared-components/src/Svgs/Drawer/SvgsEmployees.tsx +25 -0
- package/packages/shared-components/src/Svgs/Drawer/SvgsOrganization.tsx +36 -0
- package/packages/shared-components/src/Svgs/Drawer/SvgsTransaction.tsx +81 -0
- package/packages/shared-components/src/Svgs/Drawer/index.ts +7 -0
- package/packages/shared-components/src/Svgs/FormAction.tsx +118 -0
- package/packages/shared-components/src/Svgs/ImportExcelSuccessIcon.tsx +54 -0
- package/packages/shared-components/src/Svgs/LogoIcon.tsx +74 -0
- package/packages/shared-components/src/Svgs/SvgAdd.tsx +28 -0
- package/packages/shared-components/src/Svgs/SvgCalendar.tsx +89 -0
- package/packages/shared-components/src/Svgs/SvgConfigure.tsx +51 -0
- package/packages/shared-components/src/Svgs/SvgDelete.tsx +55 -0
- package/packages/shared-components/src/Svgs/SvgDownload.tsx +20 -0
- package/packages/shared-components/src/Svgs/SvgEmail.tsx +27 -0
- package/packages/shared-components/src/Svgs/SvgExport.tsx +33 -0
- package/packages/shared-components/src/Svgs/SvgFilterList.tsx +22 -0
- package/packages/shared-components/src/Svgs/SvgImport.tsx +43 -0
- package/packages/shared-components/src/Svgs/SvgNoLogo.tsx +66 -0
- package/packages/shared-components/src/Svgs/SvgNoSign.tsx +28 -0
- package/packages/shared-components/src/Svgs/SvgPhone.tsx +19 -0
- package/packages/shared-components/src/Svgs/SvgProfile.tsx +33 -0
- package/packages/shared-components/src/Svgs/SvgView.tsx +16 -0
- package/packages/shared-components/src/Svgs/SvgsDrop.tsx +44 -0
- package/packages/shared-components/src/Svgs/SvgsEdit.tsx +42 -0
- package/packages/shared-components/src/Svgs/SvgsHistory.tsx +40 -0
- package/packages/shared-components/src/Svgs/SvgsHome.tsx +18 -0
- package/packages/shared-components/src/Svgs/SvgsIndicator.tsx +24 -0
- package/packages/shared-components/src/Svgs/index.ts +18 -0
- package/packages/shared-components/src/Tab/Skeleton.tsx +15 -0
- package/packages/shared-components/src/Tab/Tabs.tsx +64 -0
- package/packages/shared-components/src/Tab/index.ts +1 -0
- package/packages/shared-components/src/Timeline/AttendanceStatus.tsx +56 -0
- package/packages/shared-components/src/Timeline/Timeline.tsx +159 -0
- package/packages/shared-components/src/Timeline/TimelineTrackSegments.tsx +130 -0
- package/packages/shared-components/src/Timeline/index.ts +2 -0
- package/packages/shared-components/src/Toast/Toast.tsx +59 -0
- package/packages/shared-components/src/Toast/ToastBody.tsx +26 -0
- package/packages/shared-components/src/Toast/ToastFooterLink.tsx +19 -0
- package/packages/shared-components/src/Toast/Toaster.styled.tsx +80 -0
- package/packages/shared-components/src/Toast/Toaster.tsx +21 -0
- package/packages/shared-components/src/Toast/index.ts +3 -0
- package/packages/shared-components/src/Toast/toasts.tsx +28 -0
- package/packages/shared-components/src/Toast/types.ts +13 -0
- package/packages/shared-components/src/Tooltip/Tooltip.tsx +36 -0
- package/packages/shared-components/src/Tooltip/index.ts +1 -0
- package/packages/shared-components/src/UserProfileMenu/UserProfileMenu.styled.tsx +42 -0
- package/packages/shared-components/src/UserProfileMenu/UserProfileMenu.tsx +168 -0
- package/packages/shared-components/src/UserProfileMenu/index.ts +1 -0
- package/packages/shared-components/src/index.ts +25 -0
- package/packages/shared-components/src/utils/colorVariant.ts +162 -0
- package/packages/shared-components/src/utils/date.ts +25 -0
- package/packages/shared-components/src/utils/file.ts +22 -0
- package/packages/shared-components/src/utils/index.ts +11 -0
- package/packages/shared-components/src/utils/theme/colorPalette.ts +112 -0
- package/packages/shared-components/src/utils/theme/colorPaletteUI.tsx +44 -0
- package/packages/shared-components/src/utils/theme/paletteDark.ts +10 -0
- package/packages/shared-components/src/utils/theme/paletteLight.ts +31 -0
- package/packages/shared-components/src/utils/theme/theme.ts +297 -0
- package/packages/shared-components/src/utils/theme/types.ts +18 -0
- package/packages/shared-components/src/utils/theme/typography.ts +52 -0
- package/packages/shared-components/src/utils/urlToNestedObject.ts +9 -0
- package/packages/shared-components/tsconfig.json +8 -0
- package/packages/shared-components/tsconfig.lint.json +8 -0
- package/packages/shared-components/webpack/cjs.js +20 -0
- package/packages/shared-components/webpack/common.js +36 -0
- package/packages/typescript-config/base.json +20 -0
- package/packages/typescript-config/nextjs.json +13 -0
- package/packages/typescript-config/package.json +9 -0
- package/packages/typescript-config/react-library.json +8 -0
- package/pnpm-workspace.yaml +3 -0
- package/turbo.json +42 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AttendanceStatus } from "@repo/shared-components";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof AttendanceStatus> = {
|
|
5
|
+
title: "shared-component/Timeline/AttendanceStatus",
|
|
6
|
+
component: AttendanceStatus,
|
|
7
|
+
tags: ["autodocs"],
|
|
8
|
+
argTypes: {
|
|
9
|
+
variant: {
|
|
10
|
+
control: "select",
|
|
11
|
+
options: [
|
|
12
|
+
"holiday",
|
|
13
|
+
"weekly_off",
|
|
14
|
+
"paid_leave",
|
|
15
|
+
"absent",
|
|
16
|
+
"unpaid_leave",
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
args: {
|
|
21
|
+
variant: "absent",
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default meta;
|
|
26
|
+
|
|
27
|
+
type Story = StoryObj<typeof AttendanceStatus>;
|
|
28
|
+
|
|
29
|
+
export const DefaultTimelineStatus: Story = {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Timeline } from "@repo/shared-components";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof Timeline> = {
|
|
5
|
+
title: "shared-component/Timeline/Timeline",
|
|
6
|
+
component: Timeline,
|
|
7
|
+
tags: ["autodocs"],
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default meta;
|
|
11
|
+
|
|
12
|
+
type Story = StoryObj<typeof Timeline>;
|
|
13
|
+
|
|
14
|
+
export const DefaultTimeline: Story = {
|
|
15
|
+
args: {
|
|
16
|
+
totalDots: 24,
|
|
17
|
+
highlightedIntervals: [
|
|
18
|
+
{
|
|
19
|
+
in_time: "2024-11-18T04:00:04.000Z",
|
|
20
|
+
out_time: "2024-11-18T07:00:04.000Z",
|
|
21
|
+
status_type: "present",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
in_time: "2024-11-18T08:00:04.000Z",
|
|
25
|
+
out_time: "2024-11-18T09:00:04.000Z",
|
|
26
|
+
status_type: "first_half_off",
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
in_time: "2024-11-18T10:00:04.000Z",
|
|
30
|
+
out_time: "2024-11-18T13:00:04.000Z",
|
|
31
|
+
status_type: "present",
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
startTimeline: "2024-11-17T22:30:04.000Z",
|
|
35
|
+
shiftStartTime: "2024-11-18T03:00:04.000Z",
|
|
36
|
+
shiftEndTime: "2024-11-18T13:00:04.000Z",
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Tooltip } from "@repo/shared-components";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof Tooltip> = {
|
|
5
|
+
title: "shared-component/Tooltip",
|
|
6
|
+
component: Tooltip,
|
|
7
|
+
tags: ["autodocs"],
|
|
8
|
+
args: {
|
|
9
|
+
children: "tooltip",
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default meta;
|
|
14
|
+
|
|
15
|
+
type Story = StoryObj<typeof Tooltip>;
|
|
16
|
+
|
|
17
|
+
export const DefaultTooltip: Story = {
|
|
18
|
+
args: {
|
|
19
|
+
toolTipLabel: "This is a default tooltip",
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const LongTextTooltip: Story = {
|
|
24
|
+
args: {
|
|
25
|
+
toolTipLabel:
|
|
26
|
+
"This tooltip has a long text that will be truncated if it exceeds the maximum width of 150px.",
|
|
27
|
+
},
|
|
28
|
+
};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { AccountCircle, Logout, Settings } from "@mui/icons-material";
|
|
2
|
+
import { UserProfileMenu } from "@repo/shared-components";
|
|
3
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
4
|
+
import { fn } from "@storybook/test";
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof UserProfileMenu> = {
|
|
7
|
+
title: "shared-component/UserProfileMenu",
|
|
8
|
+
component: UserProfileMenu,
|
|
9
|
+
tags: ["autodocs"],
|
|
10
|
+
argTypes: {
|
|
11
|
+
userDetails: { control: "object" },
|
|
12
|
+
menuItems: {
|
|
13
|
+
control: {
|
|
14
|
+
type: "object",
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
args: {
|
|
19
|
+
userDetails: {
|
|
20
|
+
name: "John Doe",
|
|
21
|
+
email: "john.doe@example.com",
|
|
22
|
+
avatar: "https://i.pravatar.cc/150?img=3",
|
|
23
|
+
},
|
|
24
|
+
menuItems: [],
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default meta;
|
|
29
|
+
|
|
30
|
+
type Story = StoryObj<typeof UserProfileMenu>;
|
|
31
|
+
|
|
32
|
+
export const DefaultUserProfileMenu: Story = {
|
|
33
|
+
args: {
|
|
34
|
+
userDetails: {
|
|
35
|
+
name: "John Doe",
|
|
36
|
+
email: "john.doe@example.com",
|
|
37
|
+
avatar: "https://i.pravatar.cc/150?img=3",
|
|
38
|
+
},
|
|
39
|
+
menuItems: [],
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const UserProfileMenuWithItems: Story = {
|
|
44
|
+
args: {
|
|
45
|
+
userDetails: {
|
|
46
|
+
name: "Jane Smith",
|
|
47
|
+
email: "jane.smith@example.com",
|
|
48
|
+
avatar: "https://i.pravatar.cc/150?img=10",
|
|
49
|
+
},
|
|
50
|
+
menuItems: [
|
|
51
|
+
{
|
|
52
|
+
key: "profile",
|
|
53
|
+
label: "Profile",
|
|
54
|
+
icon: <AccountCircle />,
|
|
55
|
+
onClick: fn(),
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
key: "settings",
|
|
59
|
+
label: "Settings",
|
|
60
|
+
icon: <Settings />,
|
|
61
|
+
onClick: fn(),
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
key: "logout",
|
|
65
|
+
label: "Logout",
|
|
66
|
+
icon: <Logout />,
|
|
67
|
+
divider: true,
|
|
68
|
+
onClick: fn(),
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export const UserProfileMenuWithDividers: Story = {
|
|
75
|
+
args: {
|
|
76
|
+
userDetails: {
|
|
77
|
+
name: "Alice Johnson",
|
|
78
|
+
email: "alice.johnson@example.com",
|
|
79
|
+
avatar: "https://i.pravatar.cc/150?img=5",
|
|
80
|
+
},
|
|
81
|
+
menuItems: [
|
|
82
|
+
{
|
|
83
|
+
key: "profile",
|
|
84
|
+
label: "Profile",
|
|
85
|
+
icon: <AccountCircle />,
|
|
86
|
+
onClick: fn(),
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
key: "divider1",
|
|
90
|
+
label: "",
|
|
91
|
+
divider: true,
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
key: "settings",
|
|
95
|
+
label: "Settings",
|
|
96
|
+
icon: <Settings />,
|
|
97
|
+
onClick: fn(),
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
key: "divider2",
|
|
101
|
+
label: "",
|
|
102
|
+
divider: true,
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
key: "logout",
|
|
106
|
+
label: "Logout",
|
|
107
|
+
icon: <Logout />,
|
|
108
|
+
onClick: fn(),
|
|
109
|
+
},
|
|
110
|
+
],
|
|
111
|
+
},
|
|
112
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "@repo/typescript-config/nextjs.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"plugins": [
|
|
5
|
+
{
|
|
6
|
+
"name": "next"
|
|
7
|
+
}
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
"include": [
|
|
11
|
+
"next-auth.ds",
|
|
12
|
+
"next-env.d.ts",
|
|
13
|
+
"next.config.js",
|
|
14
|
+
"**/*.ts",
|
|
15
|
+
"**/*.tsx",
|
|
16
|
+
".next/types/**/*.ts"
|
|
17
|
+
],
|
|
18
|
+
"exclude": ["node_modules"]
|
|
19
|
+
}
|
package/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./packages/shared-components/src";
|
package/package.json
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@codezee/sixtify-brahma",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "git+https://github.com/hardikranpariya/sixtify-brahma.git"
|
|
7
|
+
},
|
|
8
|
+
"workspaces": [
|
|
9
|
+
"packages/*"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"lint": "turbo lint",
|
|
13
|
+
"format": "turbo format",
|
|
14
|
+
"prepare": "husky install",
|
|
15
|
+
"build": "turbo build",
|
|
16
|
+
"dev": "turbo dev -- -p 4201",
|
|
17
|
+
"clean": "turbo clean",
|
|
18
|
+
"check:types": "turbo check:types",
|
|
19
|
+
"check:format": "turbo check:format"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@commitlint/cli": "^19.3.0",
|
|
23
|
+
"@commitlint/config-conventional": "^19.2.2",
|
|
24
|
+
"@types/lodash": "^4.17.5",
|
|
25
|
+
"@types/luxon": "^3.4.2",
|
|
26
|
+
"@types/node": "^22.10.0",
|
|
27
|
+
"@types/react-date-range": "^1.4.9",
|
|
28
|
+
"@types/react-image-gallery": "^1.2.4",
|
|
29
|
+
"@types/uuid": "^10.0.0",
|
|
30
|
+
"eslint-config-prettier": "^9.1.0",
|
|
31
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
32
|
+
"husky": "^8.0.0",
|
|
33
|
+
"lint-staged": "^15.2.7",
|
|
34
|
+
"prettier": "^3.2.5",
|
|
35
|
+
"turbo": "1.10.12",
|
|
36
|
+
"typescript": "^5.4.5"
|
|
37
|
+
},
|
|
38
|
+
"packageManager": "pnpm@8.15.6",
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=18"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"react": "^17.0.0 || ^18.0.0",
|
|
44
|
+
"react-dom": "^17.0.0 || ^18.0.0",
|
|
45
|
+
"react-hook-form": "^7.51.5"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@emotion/react": "^11.11.4",
|
|
49
|
+
"@emotion/styled": "^11.11.5",
|
|
50
|
+
"@hookform/resolvers": "^3.6.0",
|
|
51
|
+
"@mui/icons-material": "^5.15.20",
|
|
52
|
+
"@mui/material": "^5.15.20",
|
|
53
|
+
"@mui/styled-engine-sc": "6.0.0-alpha.18",
|
|
54
|
+
"@mui/x-charts": "^7.22.3",
|
|
55
|
+
"@mui/x-data-grid": "^7.6.2",
|
|
56
|
+
"@mui/x-date-pickers": "^7.8.0",
|
|
57
|
+
"@tanstack/react-query": "^5.48.0",
|
|
58
|
+
"@tanstack/react-query-devtools": "^5.48.0",
|
|
59
|
+
"@types/file-saver": "^2.0.7",
|
|
60
|
+
"ag-grid-community": "^31.3.2",
|
|
61
|
+
"ag-grid-react": "^31.3.2",
|
|
62
|
+
"axios": "^1.7.2",
|
|
63
|
+
"date-fns": "^4.1.0",
|
|
64
|
+
"eslint-plugin-sonarjs": "1.0.4-alpha.1",
|
|
65
|
+
"file-saver": "^2.0.5",
|
|
66
|
+
"file64": "1.0.1",
|
|
67
|
+
"gh-pages": "^6.3.0",
|
|
68
|
+
"i18next": "^23.12.1",
|
|
69
|
+
"jszip": "^3.10.1",
|
|
70
|
+
"lodash": "^4.17.21",
|
|
71
|
+
"luxon": "^3.4.4",
|
|
72
|
+
"next": "^14.2.5",
|
|
73
|
+
"next-auth": "^4.24.7",
|
|
74
|
+
"react-date-range": "^2.0.1",
|
|
75
|
+
"react-i18next": "^14.1.2",
|
|
76
|
+
"react-multi-carousel": "^2.8.5",
|
|
77
|
+
"react-phone-input-2": "^2.15.1",
|
|
78
|
+
"react-toastify": "^10.0.5",
|
|
79
|
+
"react-webcam": "7.2.0",
|
|
80
|
+
"styled-components": "^6.1.11",
|
|
81
|
+
"usehooks-ts": "^3.1.0",
|
|
82
|
+
"uuid": "^10.0.0",
|
|
83
|
+
"zod": "^3.23.8"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
const { resolve } = require("node:path");
|
|
2
|
+
|
|
3
|
+
const project = resolve(process.cwd(), "tsconfig.json");
|
|
4
|
+
|
|
5
|
+
/** @type {import("eslint").Linter.Config} */
|
|
6
|
+
module.exports = {
|
|
7
|
+
extends: [
|
|
8
|
+
"eslint:recommended",
|
|
9
|
+
"plugin:react/recommended",
|
|
10
|
+
"prettier",
|
|
11
|
+
"turbo",
|
|
12
|
+
"plugin:@typescript-eslint/recommended",
|
|
13
|
+
"plugin:sonarjs/recommended-legacy",
|
|
14
|
+
"plugin:import/recommended",
|
|
15
|
+
],
|
|
16
|
+
plugins: ["sonarjs", "import"],
|
|
17
|
+
|
|
18
|
+
globals: {
|
|
19
|
+
React: true,
|
|
20
|
+
JSX: true,
|
|
21
|
+
},
|
|
22
|
+
env: {
|
|
23
|
+
node: true,
|
|
24
|
+
},
|
|
25
|
+
settings: {
|
|
26
|
+
react: {
|
|
27
|
+
version: "detect",
|
|
28
|
+
},
|
|
29
|
+
"import/resolver": {
|
|
30
|
+
typescript: {
|
|
31
|
+
project,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
ignorePatterns: [".*.js", "node_modules/", "dist/"],
|
|
36
|
+
overrides: [
|
|
37
|
+
{
|
|
38
|
+
files: ["*.js?(x)", "*.ts?(x)"],
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
rules: {
|
|
42
|
+
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
|
|
43
|
+
"react/jsx-curly-brace-presence": [
|
|
44
|
+
"error",
|
|
45
|
+
{ props: "never", children: "never" },
|
|
46
|
+
],
|
|
47
|
+
"object-shorthand": ["error", "always"],
|
|
48
|
+
"import/no-duplicates": ["error"],
|
|
49
|
+
curly: "error",
|
|
50
|
+
quotes: ["error", "double"],
|
|
51
|
+
"import/no-default-export": "off",
|
|
52
|
+
"sonarjs/todo-tag": "off",
|
|
53
|
+
"no-template-curly-in-string": "error",
|
|
54
|
+
"@typescript-eslint/consistent-type-imports": "error",
|
|
55
|
+
"no-use-before-define": "error",
|
|
56
|
+
"no-console": "error",
|
|
57
|
+
"no-empty-function": "error",
|
|
58
|
+
"no-lone-blocks": "error",
|
|
59
|
+
"no-lonely-if": "error",
|
|
60
|
+
"no-else-return": "error",
|
|
61
|
+
"padding-line-between-statements": [
|
|
62
|
+
"error",
|
|
63
|
+
{ blankLine: "always", prev: ["case", "default"], next: "*" },
|
|
64
|
+
{ blankLine: "always", prev: "directive", next: "*" },
|
|
65
|
+
{ blankLine: "any", prev: "directive", next: "directive" },
|
|
66
|
+
{
|
|
67
|
+
blankLine: "always",
|
|
68
|
+
prev: ["var", "let", "const"],
|
|
69
|
+
next: "*",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
blankLine: "always",
|
|
73
|
+
prev: "*",
|
|
74
|
+
next: ["var", "let", "const"],
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
blankLine: "always",
|
|
78
|
+
prev: "*",
|
|
79
|
+
next: "return",
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
blankLine: "always",
|
|
83
|
+
prev: "*",
|
|
84
|
+
next: "if",
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
const { resolve } = require("node:path");
|
|
2
|
+
|
|
3
|
+
const project = resolve(process.cwd(), "tsconfig.json");
|
|
4
|
+
|
|
5
|
+
/** @type {import("eslint").Linter.Config} */
|
|
6
|
+
module.exports = {
|
|
7
|
+
extends: [
|
|
8
|
+
"eslint:recommended",
|
|
9
|
+
"plugin:react/recommended",
|
|
10
|
+
"plugin:sonarjs/recommended-legacy",
|
|
11
|
+
"prettier",
|
|
12
|
+
require.resolve("@vercel/style-guide/eslint/next"),
|
|
13
|
+
"plugin:@typescript-eslint/recommended",
|
|
14
|
+
"plugin:import/recommended",
|
|
15
|
+
],
|
|
16
|
+
plugins: ["sonarjs", "import"],
|
|
17
|
+
globals: {
|
|
18
|
+
React: true,
|
|
19
|
+
JSX: true,
|
|
20
|
+
},
|
|
21
|
+
env: {
|
|
22
|
+
node: true,
|
|
23
|
+
browser: true,
|
|
24
|
+
},
|
|
25
|
+
settings: {
|
|
26
|
+
react: {
|
|
27
|
+
version: "detect",
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
"import/resolver": {
|
|
31
|
+
typescript: {
|
|
32
|
+
project,
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
ignorePatterns: [".*.js", "node_modules/"],
|
|
37
|
+
overrides: [{ files: ["*.js?(x)", "*.ts?(x)"] }],
|
|
38
|
+
rules: {
|
|
39
|
+
"@next/next/no-html-link-for-pages": "off",
|
|
40
|
+
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
|
|
41
|
+
"react/jsx-curly-brace-presence": [
|
|
42
|
+
"error",
|
|
43
|
+
{ props: "never", children: "never" },
|
|
44
|
+
],
|
|
45
|
+
"object-shorthand": ["error", "always"],
|
|
46
|
+
curly: "error",
|
|
47
|
+
quotes: ["error", "double"],
|
|
48
|
+
"import/no-duplicates": ["error"],
|
|
49
|
+
"@typescript-eslint/consistent-type-imports": "error",
|
|
50
|
+
"no-template-curly-in-string": "error",
|
|
51
|
+
"no-use-before-define": "error",
|
|
52
|
+
"no-console": "error",
|
|
53
|
+
"no-empty-function": "error",
|
|
54
|
+
"no-lone-blocks": "error",
|
|
55
|
+
"no-lonely-if": "error",
|
|
56
|
+
"sonarjs/todo-tag": "off",
|
|
57
|
+
"no-else-return": "error",
|
|
58
|
+
"padding-line-between-statements": [
|
|
59
|
+
"error",
|
|
60
|
+
{ blankLine: "always", prev: ["case", "default"], next: "*" },
|
|
61
|
+
{ blankLine: "always", prev: "directive", next: "*" },
|
|
62
|
+
{ blankLine: "any", prev: "directive", next: "directive" },
|
|
63
|
+
{
|
|
64
|
+
blankLine: "always",
|
|
65
|
+
prev: ["var", "let", "const"],
|
|
66
|
+
next: "*",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
blankLine: "always",
|
|
70
|
+
prev: "*",
|
|
71
|
+
next: ["var", "let", "const"],
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
blankLine: "always",
|
|
75
|
+
prev: "*",
|
|
76
|
+
next: "return",
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
blankLine: "always",
|
|
80
|
+
prev: "*",
|
|
81
|
+
next: "if",
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
},
|
|
85
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@repo/eslint-config",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"files": [
|
|
6
|
+
"library.js",
|
|
7
|
+
"next.js",
|
|
8
|
+
"react-internal.js"
|
|
9
|
+
],
|
|
10
|
+
"devDependencies": {
|
|
11
|
+
"@vercel/style-guide": "^5.2.0",
|
|
12
|
+
"eslint-config-turbo": "^2.0.0",
|
|
13
|
+
"eslint-config-prettier": "^9.1.0",
|
|
14
|
+
"eslint-plugin-only-warn": "^1.1.0",
|
|
15
|
+
"@typescript-eslint/parser": "^7.1.0",
|
|
16
|
+
"@typescript-eslint/eslint-plugin": "^7.1.0",
|
|
17
|
+
"typescript": "^5.3.3"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
const { resolve } = require("node:path");
|
|
2
|
+
|
|
3
|
+
const project = resolve(process.cwd(), "tsconfig.json");
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* This is a custom ESLint configuration for use with
|
|
7
|
+
* internal (bundled by their consumer) libraries
|
|
8
|
+
* that utilize React.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/** @type {import("eslint").Linter.Config} */
|
|
12
|
+
module.exports = {
|
|
13
|
+
extends: [
|
|
14
|
+
"eslint:recommended",
|
|
15
|
+
"plugin:react/recommended",
|
|
16
|
+
"prettier",
|
|
17
|
+
"turbo",
|
|
18
|
+
"plugin:@typescript-eslint/recommended",
|
|
19
|
+
"plugin:sonarjs/recommended-legacy",
|
|
20
|
+
"plugin:import/recommended",
|
|
21
|
+
],
|
|
22
|
+
plugins: ["sonarjs", "import"],
|
|
23
|
+
globals: {
|
|
24
|
+
React: true,
|
|
25
|
+
JSX: true,
|
|
26
|
+
},
|
|
27
|
+
env: {
|
|
28
|
+
browser: true,
|
|
29
|
+
},
|
|
30
|
+
settings: {
|
|
31
|
+
react: {
|
|
32
|
+
version: "detect",
|
|
33
|
+
},
|
|
34
|
+
"import/resolver": {
|
|
35
|
+
typescript: {
|
|
36
|
+
project,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
ignorePatterns: [".*.js", "node_modules/", "dist/"],
|
|
41
|
+
overrides: [{ files: ["*.js?(x)", "*.ts?(x)"] }],
|
|
42
|
+
rules: {
|
|
43
|
+
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
|
|
44
|
+
"import/no-duplicates": ["error"],
|
|
45
|
+
"react/jsx-curly-brace-presence": [
|
|
46
|
+
"error",
|
|
47
|
+
{ props: "never", children: "never" },
|
|
48
|
+
],
|
|
49
|
+
"object-shorthand": ["error", "always"],
|
|
50
|
+
curly: "error",
|
|
51
|
+
quotes: ["error", "double"],
|
|
52
|
+
"import/no-default-export": "error",
|
|
53
|
+
"no-template-curly-in-string": "error",
|
|
54
|
+
"sonarjs/todo-tag": "off",
|
|
55
|
+
"no-use-before-define": "error",
|
|
56
|
+
"@typescript-eslint/consistent-type-imports": "error",
|
|
57
|
+
"no-console": "error",
|
|
58
|
+
"no-empty-function": "error",
|
|
59
|
+
"no-lone-blocks": "error",
|
|
60
|
+
"no-lonely-if": "error",
|
|
61
|
+
"no-else-return": "error",
|
|
62
|
+
"padding-line-between-statements": [
|
|
63
|
+
"error",
|
|
64
|
+
{ blankLine: "always", prev: ["case", "default"], next: "*" },
|
|
65
|
+
{ blankLine: "always", prev: "directive", next: "*" },
|
|
66
|
+
{ blankLine: "any", prev: "directive", next: "directive" },
|
|
67
|
+
{
|
|
68
|
+
blankLine: "always",
|
|
69
|
+
prev: ["var", "let", "const"],
|
|
70
|
+
next: "*",
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
blankLine: "always",
|
|
74
|
+
prev: "*",
|
|
75
|
+
next: ["var", "let", "const"],
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
blankLine: "always",
|
|
79
|
+
prev: "*",
|
|
80
|
+
next: "return",
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
blankLine: "always",
|
|
84
|
+
prev: "*",
|
|
85
|
+
next: "if",
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** @type {import("eslint").Linter.Config} */
|
|
2
|
+
module.exports = {
|
|
3
|
+
root: true,
|
|
4
|
+
extends: ["@repo/eslint-config/react-internal.js"],
|
|
5
|
+
parser: "@typescript-eslint/parser",
|
|
6
|
+
parserOptions: {
|
|
7
|
+
project: "./tsconfig.lint.json",
|
|
8
|
+
tsconfigRootDir: __dirname,
|
|
9
|
+
},
|
|
10
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"devDependencies": {
|
|
3
|
+
"@repo/eslint-config": "workspace:*",
|
|
4
|
+
"@repo/typescript-config": "workspace:*",
|
|
5
|
+
"@turbo/gen": "^1.12.4",
|
|
6
|
+
"@types/eslint": "^8.56.5",
|
|
7
|
+
"@types/node": "^20.11.24",
|
|
8
|
+
"@types/react": "^18.2.61",
|
|
9
|
+
"@types/react-dom": "^18.2.19",
|
|
10
|
+
"eslint": "^8.57.0",
|
|
11
|
+
"react": "^18.2.0",
|
|
12
|
+
"typescript": "^5.3.3",
|
|
13
|
+
"ts-loader": "^9.4.2",
|
|
14
|
+
"webpack": "^5.76.0",
|
|
15
|
+
"clean-webpack-plugin": "^4.0.0",
|
|
16
|
+
"progress-webpack-plugin": "^1.0.16",
|
|
17
|
+
"webpack-cli": "^5.0.1",
|
|
18
|
+
"terser-webpack-plugin": "^5.3.6",
|
|
19
|
+
"webpack-merge": "^5.8.0",
|
|
20
|
+
"mkdirp": "^3.0.1",
|
|
21
|
+
"source-map-loader": "^4.0.1"
|
|
22
|
+
},
|
|
23
|
+
"main": "./dist/cjs/index.js",
|
|
24
|
+
"types": "./dist/types/src/index.d.ts",
|
|
25
|
+
"files": [
|
|
26
|
+
"dist/**"
|
|
27
|
+
],
|
|
28
|
+
"name": "@repo/shared-components",
|
|
29
|
+
"private": true,
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"access": "public"
|
|
32
|
+
},
|
|
33
|
+
"exports": {
|
|
34
|
+
".": {
|
|
35
|
+
"import": "./dist/cjs/index.js",
|
|
36
|
+
"require": "./dist/cjs/index.js",
|
|
37
|
+
"types": "./dist/types/src/index.d.ts"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "mkdirp dist && pnpm run build:cjs",
|
|
42
|
+
"build:cjs": "webpack --config=webpack/cjs.js",
|
|
43
|
+
"generate:component": "turbo gen react-component",
|
|
44
|
+
"lint": "eslint .",
|
|
45
|
+
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
|
|
46
|
+
"check:types": "tsc --noEmit",
|
|
47
|
+
"check:format": "prettier --check \"./src/**/*.{ts,tsx,js}\"",
|
|
48
|
+
"format": "prettier --write \"./src/**/*.{ts,tsx}\""
|
|
49
|
+
},
|
|
50
|
+
"version": "1.0.0"
|
|
51
|
+
}
|