@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,41 @@
|
|
|
1
|
+
name: Check Build Status on PR
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
# Checkout repository
|
|
14
|
+
- name: Checkout repository
|
|
15
|
+
uses: actions/checkout@v3
|
|
16
|
+
|
|
17
|
+
# Set up Node.js
|
|
18
|
+
- name: Set up Node.js
|
|
19
|
+
uses: actions/setup-node@v3
|
|
20
|
+
with:
|
|
21
|
+
node-version: 20
|
|
22
|
+
|
|
23
|
+
- name: Install PNPM Globally
|
|
24
|
+
run: npm install -g pnpm
|
|
25
|
+
|
|
26
|
+
# Install dependencies
|
|
27
|
+
- name: Install dependencies
|
|
28
|
+
run: pnpm install
|
|
29
|
+
|
|
30
|
+
- name: Check lint
|
|
31
|
+
run: pnpm run lint
|
|
32
|
+
|
|
33
|
+
- name: Check format
|
|
34
|
+
run: pnpm run check:format
|
|
35
|
+
|
|
36
|
+
- name: Check types
|
|
37
|
+
run: pnpm run check:types
|
|
38
|
+
|
|
39
|
+
# Build the project
|
|
40
|
+
- name: Build package
|
|
41
|
+
run: pnpm run build
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: Publish to NPM registry
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- feat/optimization
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
publish-npm:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
# Checkout repository
|
|
15
|
+
- name: Checkout repository
|
|
16
|
+
uses: actions/checkout@v3
|
|
17
|
+
|
|
18
|
+
# Set up Node.js
|
|
19
|
+
- name: Set up Node.js
|
|
20
|
+
uses: actions/setup-node@v3
|
|
21
|
+
with:
|
|
22
|
+
node-version: 20
|
|
23
|
+
registry-url: 'https://registry.npmjs.org/'
|
|
24
|
+
|
|
25
|
+
- name: Install PNPM Globally
|
|
26
|
+
run: npm install -g pnpm
|
|
27
|
+
|
|
28
|
+
# Install dependencies
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
run: pnpm install
|
|
31
|
+
|
|
32
|
+
# Build the package
|
|
33
|
+
- name: Build package
|
|
34
|
+
run: pnpm run build
|
|
35
|
+
|
|
36
|
+
# Set npm authentication token
|
|
37
|
+
- name: Authenticate with npm
|
|
38
|
+
run: npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
|
|
39
|
+
|
|
40
|
+
- name: Publish to NPM registry
|
|
41
|
+
run: npm publish --access public
|
|
42
|
+
|
|
43
|
+
|
package/.husky/pre-push
ADDED
package/.lintstagedrc
ADDED
package/.prettierignore
ADDED
package/.prettierrc
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"arrowParens": "always",
|
|
3
|
+
"bracketSameLine": false,
|
|
4
|
+
"bracketSpacing": true,
|
|
5
|
+
"embeddedLanguageFormatting": "auto",
|
|
6
|
+
"endOfLine": "lf",
|
|
7
|
+
"htmlWhitespaceSensitivity": "css",
|
|
8
|
+
"insertPragma": false,
|
|
9
|
+
"jsxSingleQuote": false,
|
|
10
|
+
"parser": "typescript",
|
|
11
|
+
"printWidth": 80,
|
|
12
|
+
"proseWrap": "preserve",
|
|
13
|
+
"quoteProps": "as-needed",
|
|
14
|
+
"requirePragma": false,
|
|
15
|
+
"semi": true,
|
|
16
|
+
"singleAttributePerLine": false,
|
|
17
|
+
"singleQuote": false,
|
|
18
|
+
"tabWidth": 2,
|
|
19
|
+
"trailingComma": "es5",
|
|
20
|
+
"useTabs": false,
|
|
21
|
+
"vueIndentScriptAndStyle": false
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
|
|
3
|
+
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
|
|
4
|
+
|
|
5
|
+
// List of extensions which should be recommended for users of this workspace.
|
|
6
|
+
"recommendations": [
|
|
7
|
+
"alefragnani.bookmarks",
|
|
8
|
+
"streetsidesoftware.code-spell-checker",
|
|
9
|
+
"naumovs.color-highlight",
|
|
10
|
+
"dbaeumer.vscode-eslint",
|
|
11
|
+
"eamodio.gitlens",
|
|
12
|
+
"wix.vscode-import-cost",
|
|
13
|
+
"unifiedjs.vscode-mdx",
|
|
14
|
+
"liviuschera.noctis",
|
|
15
|
+
"esbenp.prettier-vscode",
|
|
16
|
+
"tyriar.sort-lines",
|
|
17
|
+
"gruntfuggly.todo-tree",
|
|
18
|
+
"wayou.vscode-todo-highlight"
|
|
19
|
+
],
|
|
20
|
+
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
|
|
21
|
+
"unwantedRecommendations": []
|
|
22
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"eslint.workingDirectories": [
|
|
3
|
+
{
|
|
4
|
+
"mode": "auto"
|
|
5
|
+
}
|
|
6
|
+
],
|
|
7
|
+
"editor.formatOnSave": true,
|
|
8
|
+
"editor.codeActionsOnSave": {
|
|
9
|
+
"source.organizeImports": "explicit",
|
|
10
|
+
// "source.fixAll.eslint": "explicit"
|
|
11
|
+
},
|
|
12
|
+
"eslint.format.enable": true,
|
|
13
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
14
|
+
"files.associations": {
|
|
15
|
+
"*.env.*": "env",
|
|
16
|
+
}
|
|
17
|
+
}
|
package/README.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# @codezee/sixtify-brahama
|
|
2
|
+
|
|
3
|
+
A React package that simplifies form creation and table management!
|
|
4
|
+
This package leverages react-hook-form and AG Grid to provide a comprehensive set of input fields and components for building dynamic and powerful forms.
|
|
5
|
+
It also includes a complete Storybook for all components to help you explore and integrate them easily.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
- Integrates seamlessly with react-hook-form for form handling.
|
|
9
|
+
- Includes AG Grid for powerful table management.
|
|
10
|
+
- A wide variety of input components to suit all your needs.
|
|
11
|
+
- Fully documented with Storybook.
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
This package is 100% [TypeScript](https://www.typescriptlang.org/).
|
|
15
|
+
|
|
16
|
+
### Utilities
|
|
17
|
+
|
|
18
|
+
This Turborepo has some additional tools already setup for you:
|
|
19
|
+
|
|
20
|
+
- [TypeScript](https://www.typescriptlang.org/) for static type checking
|
|
21
|
+
- [ESLint](https://eslint.org/) for code linting
|
|
22
|
+
- [Prettier](https://prettier.io) for code formatting
|
|
23
|
+
|
|
24
|
+
### Remote Caching
|
|
25
|
+
|
|
26
|
+
Turborepo can use a technique known as [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching) to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
|
|
27
|
+
|
|
28
|
+
By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can [create one](https://vercel.com/signup), then enter the following commands:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
cd my-turborepo
|
|
32
|
+
npx turbo login
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview).
|
|
36
|
+
|
|
37
|
+
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
npx turbo link
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Useful Links
|
|
44
|
+
|
|
45
|
+
Learn more about the power of Turborepo:
|
|
46
|
+
|
|
47
|
+
- [Tasks](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks)
|
|
48
|
+
- [Caching](https://turbo.build/repo/docs/core-concepts/caching)
|
|
49
|
+
- [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching)
|
|
50
|
+
- [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering)
|
|
51
|
+
- [Configuration Options](https://turbo.build/repo/docs/reference/configuration)
|
|
52
|
+
- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
## Installation
|
|
58
|
+
|
|
59
|
+
Install the package using pnpm:
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
pnpm install @codezee/sixtify-brahama
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Usage
|
|
66
|
+
|
|
67
|
+
Import the package in your React component:
|
|
68
|
+
|
|
69
|
+
```jsx
|
|
70
|
+
import { TextField } from '@codezee/sixtify-brahama';
|
|
71
|
+
import { useForm } from 'react-hook-form';
|
|
72
|
+
|
|
73
|
+
function MyComponent() {
|
|
74
|
+
const { control } = useForm({
|
|
75
|
+
defaultValues: {
|
|
76
|
+
name: 'John Doe',
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
return (
|
|
81
|
+
<TextField name="name" label="Name" control={control} />
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
## Documentation
|
|
88
|
+
|
|
89
|
+
For detailed usage and examples, check out the full documentation:
|
|
90
|
+
[See Documentation](https://hardikranpariya.github.io/sixtify-brahma/)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { StorybookConfig } from "@storybook/nextjs";
|
|
2
|
+
|
|
3
|
+
import { dirname, join } from "path";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* This function is used to resolve the absolute path of a package.
|
|
7
|
+
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
|
|
8
|
+
*/
|
|
9
|
+
function getAbsolutePath(value: string): any {
|
|
10
|
+
return dirname(require.resolve(join(value, "package.json")));
|
|
11
|
+
}
|
|
12
|
+
const config: StorybookConfig = {
|
|
13
|
+
stories: ["../stories/**/*.stories.tsx"],
|
|
14
|
+
addons: [
|
|
15
|
+
getAbsolutePath("@storybook/addon-links"),
|
|
16
|
+
getAbsolutePath("@storybook/addon-essentials"),
|
|
17
|
+
],
|
|
18
|
+
framework: {
|
|
19
|
+
name: getAbsolutePath("@storybook/nextjs"),
|
|
20
|
+
options: {},
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
export default config;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Preview } from "@storybook/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ThemeProvider, createTheme } from "@mui/material";
|
|
4
|
+
import { Theme, appTheme } from "@repo/shared-components";
|
|
5
|
+
import "../public/globals.css";
|
|
6
|
+
|
|
7
|
+
const createdAppTheme = createTheme(appTheme(Theme.light));
|
|
8
|
+
|
|
9
|
+
export const decorators = [
|
|
10
|
+
(Story) => (
|
|
11
|
+
<ThemeProvider theme={createdAppTheme}>
|
|
12
|
+
<Story />
|
|
13
|
+
</ThemeProvider>
|
|
14
|
+
),
|
|
15
|
+
];
|
|
16
|
+
const preview: Preview = {
|
|
17
|
+
parameters: {
|
|
18
|
+
controls: {
|
|
19
|
+
matchers: {
|
|
20
|
+
color: /(background|color)$/i,
|
|
21
|
+
date: /Date$/i,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default preview;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "docs",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"private": true,
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "storybook dev",
|
|
8
|
+
"build": "storybook build",
|
|
9
|
+
"start": "serve storybook-static",
|
|
10
|
+
"deploy-storybook": "gh-pages -d storybook-static",
|
|
11
|
+
"clean": "rm -rf .turbo && rm -rf node_modules",
|
|
12
|
+
"lint": "eslint './stories/**/*.{ts,tsx}'",
|
|
13
|
+
"check:types": "tsc --noEmit",
|
|
14
|
+
"check:format": "prettier --check \"./stories/**/*.{ts,tsx,js}\"",
|
|
15
|
+
"format": "prettier --write \"./stories/**/*.{ts,tsx}\""
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@repo/shared-components": "workspace:*",
|
|
19
|
+
"@storybook/addons": "^7.6.17",
|
|
20
|
+
"@storybook/theming": "^8.6.12",
|
|
21
|
+
"react": "^18.2.0",
|
|
22
|
+
"react-dom": "^18.2.0"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@repo/eslint-config": "workspace:*",
|
|
26
|
+
"@repo/typescript-config": "workspace:*",
|
|
27
|
+
"@storybook/addon-actions": "^8.2.6",
|
|
28
|
+
"@storybook/addon-essentials": "^8.2.6",
|
|
29
|
+
"@storybook/addon-links": "^8.2.6",
|
|
30
|
+
"@storybook/nextjs": "^8.3.4",
|
|
31
|
+
"@storybook/react": "^8.2.6",
|
|
32
|
+
"@storybook/test": "^8.3.4",
|
|
33
|
+
"@types/node": "^20",
|
|
34
|
+
"@types/react": "^18.2.0",
|
|
35
|
+
"@types/react-dom": "^18.2.0",
|
|
36
|
+
"eslint": "^8.57.0",
|
|
37
|
+
"eslint-config-next": "15.0.0-rc.0",
|
|
38
|
+
"postcss": "^8",
|
|
39
|
+
"serve": "^14.2.1",
|
|
40
|
+
"storybook": "^8.2.6",
|
|
41
|
+
"typescript": "^5.3.3"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
@import "ag-grid-community/styles/ag-grid.css";
|
|
2
|
+
@import "ag-grid-community/styles/ag-theme-quartz.css";
|
|
3
|
+
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
|
|
4
|
+
@import 'react-date-range/dist/styles.css';
|
|
5
|
+
@import 'react-date-range/dist/theme/default.css';
|
|
6
|
+
@import 'react-phone-input-2/lib/style.css';
|
|
7
|
+
|
|
8
|
+
body {
|
|
9
|
+
font-family: 'Poppins', sans-serif;
|
|
10
|
+
margin: 0;
|
|
11
|
+
height:100%;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ag-theme-quartz {
|
|
15
|
+
--ag-font-family: 'Poppins', sans-serif;
|
|
16
|
+
}
|
|
17
|
+
.ag-row .ag-cell {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
}
|
|
21
|
+
.ag-header-cell-text {
|
|
22
|
+
font-weight: 600;
|
|
23
|
+
}
|
|
24
|
+
.rdrDefinedRangesWrapper{
|
|
25
|
+
width:0px !important;
|
|
26
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Stack } from "@mui/material";
|
|
2
|
+
import {
|
|
3
|
+
AddAction,
|
|
4
|
+
CalendarAction,
|
|
5
|
+
ConfigureAction,
|
|
6
|
+
DeleteAction,
|
|
7
|
+
DownloadAction,
|
|
8
|
+
EditAction,
|
|
9
|
+
ExportAction,
|
|
10
|
+
FilterAction,
|
|
11
|
+
HistoryAction,
|
|
12
|
+
ImportAction,
|
|
13
|
+
ViewAction,
|
|
14
|
+
} from "@repo/shared-components";
|
|
15
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
16
|
+
|
|
17
|
+
const meta: Meta<typeof Stack> = {
|
|
18
|
+
title: "shared-component/ActionBox",
|
|
19
|
+
component: Stack,
|
|
20
|
+
tags: ["autodocs"],
|
|
21
|
+
render: () => {
|
|
22
|
+
return (
|
|
23
|
+
<Stack
|
|
24
|
+
justifyContent="center"
|
|
25
|
+
alignItems="center"
|
|
26
|
+
flexDirection="row"
|
|
27
|
+
sx={{ width: "100%", height: "50px", gap: "10px" }}
|
|
28
|
+
>
|
|
29
|
+
<AddAction />
|
|
30
|
+
<CalendarAction />
|
|
31
|
+
<ConfigureAction />
|
|
32
|
+
<DownloadAction />
|
|
33
|
+
<HistoryAction />
|
|
34
|
+
<DeleteAction />
|
|
35
|
+
<EditAction />
|
|
36
|
+
<FilterAction />
|
|
37
|
+
<ExportAction />
|
|
38
|
+
<ImportAction />
|
|
39
|
+
<ViewAction />
|
|
40
|
+
</Stack>
|
|
41
|
+
);
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export default meta;
|
|
46
|
+
|
|
47
|
+
type Story = StoryObj<typeof Stack>;
|
|
48
|
+
|
|
49
|
+
export const ActionsIcons: Story = {};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { AgGrid } from "@repo/shared-components";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
import type { ColDef } from "ag-grid-community";
|
|
4
|
+
|
|
5
|
+
const column: ColDef[] = [
|
|
6
|
+
{
|
|
7
|
+
headerName: "Id",
|
|
8
|
+
field: "id",
|
|
9
|
+
sortable: false,
|
|
10
|
+
width: 150,
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
headerName: "name",
|
|
14
|
+
field: "name",
|
|
15
|
+
width: 150,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
headerName: "age",
|
|
19
|
+
field: "age",
|
|
20
|
+
width: 150,
|
|
21
|
+
},
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
const rowData = [
|
|
25
|
+
{ id: 1, name: "John", age: 25 },
|
|
26
|
+
{ id: 2, name: "Jane", age: 30 },
|
|
27
|
+
{ id: 3, name: "Bob", age: 40 },
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
const meta: Meta<typeof AgGrid> = {
|
|
31
|
+
title: "shared-component/AgGrid",
|
|
32
|
+
component: AgGrid,
|
|
33
|
+
tags: ["autodocs"],
|
|
34
|
+
argTypes: {
|
|
35
|
+
height: { control: "text" },
|
|
36
|
+
totalRecords: { control: "number" },
|
|
37
|
+
rowModelType: { control: "select", options: ["clientSide", "infinite"] },
|
|
38
|
+
ref: { control: false },
|
|
39
|
+
overlayNoRowsTemplate: { control: false },
|
|
40
|
+
},
|
|
41
|
+
args: {
|
|
42
|
+
rowData,
|
|
43
|
+
rowModelType: "clientSide",
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export default meta;
|
|
48
|
+
|
|
49
|
+
type Story = StoryObj<typeof AgGrid>;
|
|
50
|
+
|
|
51
|
+
export const DefaultAgGrid: Story = {
|
|
52
|
+
args: {
|
|
53
|
+
rowModelType: "clientSide",
|
|
54
|
+
totalRecords: 3,
|
|
55
|
+
},
|
|
56
|
+
render: (args) => {
|
|
57
|
+
return <AgGrid {...args} columnDefs={column} height="500px" />;
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export const NoRecordsAgGridWithOverlay: Story = {
|
|
62
|
+
args: {
|
|
63
|
+
rowData: [],
|
|
64
|
+
// eslint-disable-next-line quotes
|
|
65
|
+
overlayNoRowsTemplate: '<span class="no-rows">No records to display</span>',
|
|
66
|
+
},
|
|
67
|
+
render: (args) => {
|
|
68
|
+
return <AgGrid {...args} columnDefs={column} height="500px" />;
|
|
69
|
+
},
|
|
70
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Stack } from "@mui/material";
|
|
2
|
+
import { AppBar, Button } from "@repo/shared-components";
|
|
3
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof AppBar> = {
|
|
6
|
+
title: "shared-component/AppBar",
|
|
7
|
+
tags: ["autodocs"],
|
|
8
|
+
component: AppBar,
|
|
9
|
+
argTypes: {
|
|
10
|
+
drawerOpen: {
|
|
11
|
+
control: "boolean",
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
render: (args) => (
|
|
15
|
+
<AppBar {...args}>
|
|
16
|
+
<Stack gap="24px" direction="row" alignItems="center">
|
|
17
|
+
<Button>Home</Button>
|
|
18
|
+
<Button>About</Button>
|
|
19
|
+
<Button>Contact</Button>
|
|
20
|
+
</Stack>
|
|
21
|
+
</AppBar>
|
|
22
|
+
),
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default meta;
|
|
26
|
+
|
|
27
|
+
type Story = StoryObj;
|
|
28
|
+
|
|
29
|
+
export const Default: Story = {
|
|
30
|
+
args: {
|
|
31
|
+
drawerOpen: false,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const DrawerOpen: Story = {
|
|
36
|
+
args: {
|
|
37
|
+
drawerOpen: true,
|
|
38
|
+
},
|
|
39
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import FolderIcon from "@mui/icons-material/Folder";
|
|
2
|
+
import HomeIcon from "@mui/icons-material/Home";
|
|
3
|
+
import { Breadcrumbs } from "@repo/shared-components";
|
|
4
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
5
|
+
import { fn } from "@storybook/test";
|
|
6
|
+
|
|
7
|
+
type StoryProps = React.ComponentProps<typeof Breadcrumbs>;
|
|
8
|
+
|
|
9
|
+
const meta: Meta<StoryProps> = {
|
|
10
|
+
title: "shared-component/Breadcrumbs",
|
|
11
|
+
component: Breadcrumbs,
|
|
12
|
+
tags: ["autodocs"],
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default meta;
|
|
16
|
+
|
|
17
|
+
type Story = StoryObj<typeof Breadcrumbs>;
|
|
18
|
+
|
|
19
|
+
export const TextOnly: Story = {
|
|
20
|
+
args: {
|
|
21
|
+
items: [
|
|
22
|
+
{ text: "Home", onClick: fn() },
|
|
23
|
+
{ text: "Products", onClick: fn() },
|
|
24
|
+
{ text: "Categories" },
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const WithIcons: Story = {
|
|
30
|
+
args: {
|
|
31
|
+
items: [
|
|
32
|
+
{ icon: <HomeIcon />, text: "Home", onClick: fn() },
|
|
33
|
+
{ icon: <FolderIcon />, text: "Documents", onClick: fn() },
|
|
34
|
+
{ text: "Details" },
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
};
|