@campxdev/react-blueprint 3.0.0-alpha.5 → 3.0.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/types/src/components/Assets/ErrorPages/ComingSoon.d.ts +24 -0
- package/dist/cjs/types/src/components/Assets/ErrorPages/InternalServerError.d.ts +20 -0
- package/dist/cjs/types/src/components/Assets/ErrorPages/NoInternetConnection.d.ts +20 -0
- package/dist/cjs/types/src/components/Assets/ErrorPages/NoItemFound.d.ts +28 -0
- package/dist/cjs/types/src/components/Assets/ErrorPages/PageNotFound.d.ts +21 -0
- package/dist/cjs/types/src/components/Assets/ErrorPages/ResourceNotFound.d.ts +21 -0
- package/dist/cjs/types/src/components/Assets/ErrorPages/UnAuthorized.d.ts +31 -0
- package/dist/cjs/types/src/components/Assets/Icons/Icons.d.ts +54 -0
- package/dist/cjs/types/src/components/Charts/BarChart/BarChart.d.ts +38 -0
- package/dist/cjs/types/src/components/Charts/BarChart/HorizontalBarChart.d.ts +93 -0
- package/dist/cjs/types/src/components/Charts/BarChart/VerticalBarChart.d.ts +110 -0
- package/dist/cjs/types/src/components/Charts/LineChart/LineChart.d.ts +89 -0
- package/dist/cjs/types/src/components/Charts/PieChart/PieChart.d.ts +86 -0
- package/dist/cjs/types/src/components/Charts/TreeMap/TreeMap.d.ts +74 -0
- package/dist/cjs/types/src/components/DataDisplay/Accordion/Accordion.d.ts +54 -0
- package/dist/cjs/types/src/components/DataDisplay/ActivityLogView/ActivityLogFilter.d.ts +35 -0
- package/dist/cjs/types/src/components/DataDisplay/ActivityLogView/ActivityLogView.d.ts +78 -0
- package/dist/cjs/types/src/components/DataDisplay/Avatar/Avatar.d.ts +40 -0
- package/dist/cjs/types/src/components/DataDisplay/Chip/Chip.d.ts +28 -0
- package/dist/cjs/types/src/components/DataDisplay/Chips/Chips.d.ts +55 -0
- package/dist/cjs/types/src/components/DataDisplay/DataTable/DataTable.d.ts +96 -1
- package/dist/cjs/types/src/components/DataDisplay/DataTable/components/CardsView.d.ts +14 -2
- package/dist/cjs/types/src/components/DataDisplay/DataTable/components/TablePagination.d.ts +35 -0
- package/dist/cjs/types/src/components/DataDisplay/EmptyIllustration/EmptyIllustration.d.ts +30 -0
- package/dist/cjs/types/src/components/DataDisplay/ReactJoyride/ReactJoyride.d.ts +64 -0
- package/dist/cjs/types/src/components/DataDisplay/Separator/Separator.d.ts +30 -0
- package/dist/cjs/types/src/components/DataDisplay/Skeleton/Skeleton.d.ts +20 -0
- package/dist/cjs/types/src/components/DataDisplay/StatusCard/StatusCard.d.ts +36 -0
- package/dist/cjs/types/src/components/DataDisplay/Timeline/Timeline.d.ts +58 -0
- package/dist/cjs/types/src/components/DataDisplay/Typography/Typography.d.ts +25 -0
- package/dist/cjs/types/src/components/Feedback/Alert/Alert.d.ts +31 -0
- package/dist/cjs/types/src/components/Feedback/Snackbar/Snackbar.d.ts +54 -0
- package/dist/cjs/types/src/components/Feedback/Spinner/Spinner.d.ts +15 -0
- package/dist/cjs/types/src/components/Feedback/Tooltip/Tooltip.d.ts +54 -0
- package/dist/cjs/types/src/components/Input/Button/Button.d.ts +26 -0
- package/dist/cjs/types/src/components/Input/DatePicker/DatePicker.d.ts +41 -0
- package/dist/cjs/types/src/components/Input/DateTimePicker/DateTimePicker.d.ts +42 -0
- package/dist/cjs/types/src/components/Input/FileUpload/FileUpload.d.ts +41 -0
- package/dist/cjs/types/src/components/Input/FormActions/FormActions.d.ts +37 -0
- package/dist/cjs/types/src/components/Input/FormControlWrapper/FormControlWrapper.d.ts +31 -0
- package/dist/cjs/types/src/components/Input/FormWrapper/FormWrapper.d.ts +20 -0
- package/dist/cjs/types/src/components/Input/HelpButton/HelpButton.d.ts +14 -0
- package/dist/cjs/types/src/components/Input/IconButtons/IconButtons/DeleteButton.d.ts +16 -0
- package/dist/cjs/types/src/components/Input/IconButtons/IconButtons/EditButton.d.ts +16 -0
- package/dist/cjs/types/src/components/Input/IconButtons/IconButtons/RedirectButton.d.ts +16 -0
- package/dist/cjs/types/src/components/Input/IconButtons/IconButtons/ViewButton.d.ts +16 -0
- package/dist/cjs/types/src/components/Input/IconButtons/IconButtons.d.ts +18 -0
- package/dist/cjs/types/src/components/Input/LabelWrapper/LabelWrapper.d.ts +26 -0
- package/dist/cjs/types/src/components/Input/MultiCheckBox/MultiCheckBox.d.ts +34 -0
- package/dist/cjs/types/src/components/Input/MultiSelect/MultiSelect.d.ts +40 -0
- package/dist/cjs/types/src/components/Input/OtpInput/OtpInput.d.ts +29 -0
- package/dist/cjs/types/src/components/Input/PasswordField/PasswordField.d.ts +34 -0
- package/dist/cjs/types/src/components/Input/RadioGroup/RadioGroup.d.ts +38 -0
- package/dist/cjs/types/src/components/Input/SearchBar/SearchBar.d.ts +26 -0
- package/dist/cjs/types/src/components/Input/Select/Select.d.ts +32 -0
- package/dist/cjs/types/src/components/Input/SingleCheckBox/SingleCheckBox.d.ts +29 -0
- package/dist/cjs/types/src/components/Input/SingleSelect/SingleSelect.d.ts +40 -0
- package/dist/cjs/types/src/components/Input/Switch/Switch.d.ts +23 -0
- package/dist/cjs/types/src/components/Input/Tags/Tags.d.ts +26 -0
- package/dist/cjs/types/src/components/Input/TextField/TextField.d.ts +35 -0
- package/dist/cjs/types/src/components/Input/Textarea/Textarea.d.ts +36 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/AppLayout.d.ts +32 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/MenuToggleButton.d.ts +16 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/MenuBar.d.ts +26 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/MenuItem.d.ts +37 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/Sidebar.d.ts +30 -1
- package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/StyledComponents.d.ts +139 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/UserProfilePopup.d.ts +34 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/context/SidebarContext.d.ts +48 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/types.d.ts +1 -1
- package/dist/cjs/types/src/components/Layout/PageContent/PageContent.d.ts +21 -1
- package/dist/cjs/types/src/components/Layout/PageHeader/PageHeader.d.ts +46 -0
- package/dist/cjs/types/src/components/Layout/PageHeader/components/SearchBar.d.ts +22 -0
- package/dist/cjs/types/src/components/Layout/UserBox/UserBox.d.ts +40 -0
- package/dist/cjs/types/src/components/Navigation/Breadcrumbs/Breadcrumbs.d.ts +33 -0
- package/dist/cjs/types/src/components/Navigation/Calendar/Calendar.d.ts +63 -0
- package/dist/cjs/types/src/components/Navigation/ConfirmDialog/ConfirmDialog.d.ts +64 -0
- package/dist/cjs/types/src/components/Navigation/Dialog/Dialog.d.ts +55 -0
- package/dist/cjs/types/src/components/Navigation/DialogButton/DialogButton.d.ts +64 -0
- package/dist/cjs/types/src/components/Navigation/DropDownMenu/DropDownMenu.d.ts +73 -0
- package/dist/cjs/types/src/components/Navigation/PreviewFiles/PreviewFiles.d.ts +54 -0
- package/dist/cjs/types/src/components/Navigation/Stepper/Stepper.d.ts +55 -10
- package/dist/cjs/types/src/components/Navigation/TabsContainer/TabsContainer.d.ts +85 -1
- package/dist/cjs/types/src/components/Navigation/UploadDialog/UploadDialog.d.ts +64 -0
- package/dist/cjs/types/src/shadcn-components/Input/Button/Button.d.ts +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/types/src/components/Assets/ErrorPages/ComingSoon.d.ts +24 -0
- package/dist/esm/types/src/components/Assets/ErrorPages/InternalServerError.d.ts +20 -0
- package/dist/esm/types/src/components/Assets/ErrorPages/NoInternetConnection.d.ts +20 -0
- package/dist/esm/types/src/components/Assets/ErrorPages/NoItemFound.d.ts +28 -0
- package/dist/esm/types/src/components/Assets/ErrorPages/PageNotFound.d.ts +21 -0
- package/dist/esm/types/src/components/Assets/ErrorPages/ResourceNotFound.d.ts +21 -0
- package/dist/esm/types/src/components/Assets/ErrorPages/UnAuthorized.d.ts +31 -0
- package/dist/esm/types/src/components/Assets/Icons/Icons.d.ts +54 -0
- package/dist/esm/types/src/components/Charts/BarChart/BarChart.d.ts +38 -0
- package/dist/esm/types/src/components/Charts/BarChart/HorizontalBarChart.d.ts +93 -0
- package/dist/esm/types/src/components/Charts/BarChart/VerticalBarChart.d.ts +110 -0
- package/dist/esm/types/src/components/Charts/LineChart/LineChart.d.ts +89 -0
- package/dist/esm/types/src/components/Charts/PieChart/PieChart.d.ts +86 -0
- package/dist/esm/types/src/components/Charts/TreeMap/TreeMap.d.ts +74 -0
- package/dist/esm/types/src/components/DataDisplay/Accordion/Accordion.d.ts +54 -0
- package/dist/esm/types/src/components/DataDisplay/ActivityLogView/ActivityLogFilter.d.ts +35 -0
- package/dist/esm/types/src/components/DataDisplay/ActivityLogView/ActivityLogView.d.ts +78 -0
- package/dist/esm/types/src/components/DataDisplay/Avatar/Avatar.d.ts +40 -0
- package/dist/esm/types/src/components/DataDisplay/Chip/Chip.d.ts +28 -0
- package/dist/esm/types/src/components/DataDisplay/Chips/Chips.d.ts +55 -0
- package/dist/esm/types/src/components/DataDisplay/DataTable/DataTable.d.ts +96 -1
- package/dist/esm/types/src/components/DataDisplay/DataTable/components/CardsView.d.ts +14 -2
- package/dist/esm/types/src/components/DataDisplay/DataTable/components/TablePagination.d.ts +35 -0
- package/dist/esm/types/src/components/DataDisplay/EmptyIllustration/EmptyIllustration.d.ts +30 -0
- package/dist/esm/types/src/components/DataDisplay/ReactJoyride/ReactJoyride.d.ts +64 -0
- package/dist/esm/types/src/components/DataDisplay/Separator/Separator.d.ts +30 -0
- package/dist/esm/types/src/components/DataDisplay/Skeleton/Skeleton.d.ts +20 -0
- package/dist/esm/types/src/components/DataDisplay/StatusCard/StatusCard.d.ts +36 -0
- package/dist/esm/types/src/components/DataDisplay/Timeline/Timeline.d.ts +58 -0
- package/dist/esm/types/src/components/DataDisplay/Typography/Typography.d.ts +25 -0
- package/dist/esm/types/src/components/Feedback/Alert/Alert.d.ts +31 -0
- package/dist/esm/types/src/components/Feedback/Snackbar/Snackbar.d.ts +54 -0
- package/dist/esm/types/src/components/Feedback/Spinner/Spinner.d.ts +15 -0
- package/dist/esm/types/src/components/Feedback/Tooltip/Tooltip.d.ts +54 -0
- package/dist/esm/types/src/components/Input/Button/Button.d.ts +26 -0
- package/dist/esm/types/src/components/Input/DatePicker/DatePicker.d.ts +41 -0
- package/dist/esm/types/src/components/Input/DateTimePicker/DateTimePicker.d.ts +42 -0
- package/dist/esm/types/src/components/Input/FileUpload/FileUpload.d.ts +41 -0
- package/dist/esm/types/src/components/Input/FormActions/FormActions.d.ts +37 -0
- package/dist/esm/types/src/components/Input/FormControlWrapper/FormControlWrapper.d.ts +31 -0
- package/dist/esm/types/src/components/Input/FormWrapper/FormWrapper.d.ts +20 -0
- package/dist/esm/types/src/components/Input/HelpButton/HelpButton.d.ts +14 -0
- package/dist/esm/types/src/components/Input/IconButtons/IconButtons/DeleteButton.d.ts +16 -0
- package/dist/esm/types/src/components/Input/IconButtons/IconButtons/EditButton.d.ts +16 -0
- package/dist/esm/types/src/components/Input/IconButtons/IconButtons/RedirectButton.d.ts +16 -0
- package/dist/esm/types/src/components/Input/IconButtons/IconButtons/ViewButton.d.ts +16 -0
- package/dist/esm/types/src/components/Input/IconButtons/IconButtons.d.ts +18 -0
- package/dist/esm/types/src/components/Input/LabelWrapper/LabelWrapper.d.ts +26 -0
- package/dist/esm/types/src/components/Input/MultiCheckBox/MultiCheckBox.d.ts +34 -0
- package/dist/esm/types/src/components/Input/MultiSelect/MultiSelect.d.ts +40 -0
- package/dist/esm/types/src/components/Input/OtpInput/OtpInput.d.ts +29 -0
- package/dist/esm/types/src/components/Input/PasswordField/PasswordField.d.ts +34 -0
- package/dist/esm/types/src/components/Input/RadioGroup/RadioGroup.d.ts +38 -0
- package/dist/esm/types/src/components/Input/SearchBar/SearchBar.d.ts +26 -0
- package/dist/esm/types/src/components/Input/Select/Select.d.ts +32 -0
- package/dist/esm/types/src/components/Input/SingleCheckBox/SingleCheckBox.d.ts +29 -0
- package/dist/esm/types/src/components/Input/SingleSelect/SingleSelect.d.ts +40 -0
- package/dist/esm/types/src/components/Input/Switch/Switch.d.ts +23 -0
- package/dist/esm/types/src/components/Input/Tags/Tags.d.ts +26 -0
- package/dist/esm/types/src/components/Input/TextField/TextField.d.ts +35 -0
- package/dist/esm/types/src/components/Input/Textarea/Textarea.d.ts +36 -0
- package/dist/esm/types/src/components/Layout/AppLayout/AppLayout.d.ts +32 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/MenuToggleButton.d.ts +16 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/MenuBar.d.ts +26 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/MenuItem.d.ts +37 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/Sidebar.d.ts +30 -1
- package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/StyledComponents.d.ts +139 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/UserProfilePopup.d.ts +34 -0
- package/dist/esm/types/src/components/Layout/AppLayout/context/SidebarContext.d.ts +48 -0
- package/dist/esm/types/src/components/Layout/AppLayout/types.d.ts +1 -1
- package/dist/esm/types/src/components/Layout/PageContent/PageContent.d.ts +21 -1
- package/dist/esm/types/src/components/Layout/PageHeader/PageHeader.d.ts +46 -0
- package/dist/esm/types/src/components/Layout/PageHeader/components/SearchBar.d.ts +22 -0
- package/dist/esm/types/src/components/Layout/UserBox/UserBox.d.ts +40 -0
- package/dist/esm/types/src/components/Navigation/Breadcrumbs/Breadcrumbs.d.ts +33 -0
- package/dist/esm/types/src/components/Navigation/Calendar/Calendar.d.ts +63 -0
- package/dist/esm/types/src/components/Navigation/ConfirmDialog/ConfirmDialog.d.ts +64 -0
- package/dist/esm/types/src/components/Navigation/Dialog/Dialog.d.ts +55 -0
- package/dist/esm/types/src/components/Navigation/DialogButton/DialogButton.d.ts +64 -0
- package/dist/esm/types/src/components/Navigation/DropDownMenu/DropDownMenu.d.ts +73 -0
- package/dist/esm/types/src/components/Navigation/PreviewFiles/PreviewFiles.d.ts +54 -0
- package/dist/esm/types/src/components/Navigation/Stepper/Stepper.d.ts +55 -10
- package/dist/esm/types/src/components/Navigation/TabsContainer/TabsContainer.d.ts +85 -1
- package/dist/esm/types/src/components/Navigation/UploadDialog/UploadDialog.d.ts +64 -0
- package/dist/esm/types/src/shadcn-components/Input/Button/Button.d.ts +1 -1
- package/dist/index.d.ts +2961 -16
- package/dist/styles.css +30 -81
- package/package.json +1 -1
- package/src/components/Assets/ErrorPages/ComingSoon.tsx +24 -0
- package/src/components/Assets/ErrorPages/InternalServerError.tsx +20 -0
- package/src/components/Assets/ErrorPages/NoInternetConnection.tsx +20 -0
- package/src/components/Assets/ErrorPages/NoItemFound.tsx +28 -0
- package/src/components/Assets/ErrorPages/PageNotFound.tsx +21 -0
- package/src/components/Assets/ErrorPages/ResourceNotFound.tsx +21 -0
- package/src/components/Assets/ErrorPages/UnAuthorized.tsx +31 -0
- package/src/components/Assets/Icons/Icons.tsx +55 -1
- package/src/components/Charts/BarChart/BarChart.tsx +38 -0
- package/src/components/Charts/BarChart/HorizontalBarChart.tsx +93 -0
- package/src/components/Charts/BarChart/VerticalBarChart.tsx +110 -0
- package/src/components/Charts/LineChart/LineChart.tsx +89 -0
- package/src/components/Charts/PieChart/PieChart.tsx +86 -0
- package/src/components/Charts/TreeMap/TreeMap.tsx +90 -0
- package/src/components/DataDisplay/Accordion/Accordion.tsx +54 -0
- package/src/components/DataDisplay/ActivityLogView/ActivityLogFilter.tsx +35 -0
- package/src/components/DataDisplay/ActivityLogView/ActivityLogView.tsx +84 -0
- package/src/components/DataDisplay/Avatar/Avatar.tsx +40 -0
- package/src/components/DataDisplay/Chip/Chip.tsx +28 -0
- package/src/components/DataDisplay/Chips/Chips.tsx +56 -0
- package/src/components/DataDisplay/DataTable/DataTable.tsx +109 -2
- package/src/components/DataDisplay/DataTable/components/CardsView.tsx +28 -13
- package/src/components/DataDisplay/DataTable/components/ColumnSelector/ColumnSelector.tsx +22 -4
- package/src/components/DataDisplay/DataTable/components/TableHeaders/TableActionHeader.tsx +9 -4
- package/src/components/DataDisplay/DataTable/components/TablePagination.tsx +35 -0
- package/src/components/DataDisplay/DataTable/components/TableView.tsx +5 -1
- package/src/components/DataDisplay/EmptyIllustration/EmptyIllustration.tsx +31 -0
- package/src/components/DataDisplay/ReactJoyride/ReactJoyride.tsx +64 -0
- package/src/components/DataDisplay/Separator/Separator.tsx +32 -0
- package/src/components/DataDisplay/Skeleton/Skeleton.tsx +20 -0
- package/src/components/DataDisplay/StatusCard/StatusCard.tsx +36 -0
- package/src/components/DataDisplay/Timeline/Timeline.tsx +58 -0
- package/src/components/DataDisplay/Typography/Typography.tsx +25 -0
- package/src/components/Feedback/Alert/Alert.tsx +38 -0
- package/src/components/Feedback/Snackbar/Snackbar.tsx +54 -0
- package/src/components/Feedback/Spinner/Spinner.tsx +15 -0
- package/src/components/Feedback/Tooltip/Tooltip.tsx +54 -0
- package/src/components/Input/Button/Button.tsx +26 -0
- package/src/components/Input/DatePicker/DatePicker.tsx +41 -0
- package/src/components/Input/DateTimePicker/DateTimePicker.tsx +42 -0
- package/src/components/Input/FileUpload/FileUpload.tsx +41 -0
- package/src/components/Input/FormActions/FormActions.tsx +37 -0
- package/src/components/Input/FormControlWrapper/FormControlWrapper.tsx +31 -0
- package/src/components/Input/FormWrapper/FormWrapper.tsx +20 -0
- package/src/components/Input/HelpButton/HelpButton.tsx +14 -0
- package/src/components/Input/IconButtons/IconButtons/DeleteButton.tsx +16 -0
- package/src/components/Input/IconButtons/IconButtons/EditButton.tsx +16 -0
- package/src/components/Input/IconButtons/IconButtons/RedirectButton.tsx +16 -0
- package/src/components/Input/IconButtons/IconButtons/ViewButton.tsx +16 -0
- package/src/components/Input/IconButtons/IconButtons.tsx +18 -0
- package/src/components/Input/LabelWrapper/LabelWrapper.tsx +26 -0
- package/src/components/Input/MultiCheckBox/MultiCheckBox.tsx +34 -0
- package/src/components/Input/MultiSelect/MultiSelect.tsx +40 -0
- package/src/components/Input/OtpInput/OtpInput.tsx +29 -0
- package/src/components/Input/PasswordField/PasswordField.tsx +34 -0
- package/src/components/Input/RadioGroup/RadioGroup.tsx +38 -0
- package/src/components/Input/SearchBar/SearchBar.tsx +26 -0
- package/src/components/Input/Select/Select.tsx +41 -0
- package/src/components/Input/SingleCheckBox/SingleCheckBox.tsx +29 -0
- package/src/components/Input/SingleSelect/SingleSelect.tsx +40 -0
- package/src/components/Input/Switch/Switch.tsx +23 -0
- package/src/components/Input/Tags/Tags.tsx +26 -0
- package/src/components/Input/TextField/TextField.tsx +35 -0
- package/src/components/Input/Textarea/Textarea.tsx +36 -0
- package/src/components/Layout/AppLayout/AppLayout.tsx +34 -11
- package/src/components/Layout/AppLayout/components/MenuToggleButton.tsx +16 -0
- package/src/components/Layout/AppLayout/components/Sidebar/MenuBar.tsx +26 -0
- package/src/components/Layout/AppLayout/components/Sidebar/MenuItem.tsx +51 -1
- package/src/components/Layout/AppLayout/components/Sidebar/Sidebar.tsx +173 -104
- package/src/components/Layout/AppLayout/components/Sidebar/StyledComponents.tsx +139 -9
- package/src/components/Layout/AppLayout/components/UserProfilePopup.tsx +35 -1
- package/src/components/Layout/AppLayout/context/SidebarContext.tsx +48 -0
- package/src/components/Layout/AppLayout/types.ts +1 -1
- package/src/components/Layout/PageContent/PageContent.tsx +23 -3
- package/src/components/Layout/PageHeader/PageHeader.tsx +68 -7
- package/src/components/Layout/PageHeader/components/SearchBar.tsx +22 -0
- package/src/components/Layout/UserBox/UserBox.tsx +40 -0
- package/src/components/Navigation/Breadcrumbs/Breadcrumbs.tsx +53 -4
- package/src/components/Navigation/Calendar/Calendar.tsx +63 -0
- package/src/components/Navigation/ConfirmDialog/ConfirmDialog.tsx +64 -0
- package/src/components/Navigation/Dialog/Dialog.tsx +62 -2
- package/src/components/Navigation/DialogButton/DialogButton.tsx +64 -0
- package/src/components/Navigation/DropDownMenu/DropDownMenu.tsx +73 -0
- package/src/components/Navigation/PreviewFiles/PreviewFiles.tsx +93 -0
- package/src/components/Navigation/Stepper/Stepper.tsx +56 -10
- package/src/components/Navigation/TabsContainer/TabsContainer.tsx +86 -1
- package/src/components/Navigation/UploadDialog/UploadDialog.tsx +64 -0
- package/src/shadcn-components/Layout/Sheet/Sheet.tsx +2 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Sheet, SheetContent } from '@/shadcn-components/Layout/Sheet/Sheet';
|
|
2
|
+
import { motion } from 'framer-motion';
|
|
2
3
|
import { PanelLeftClose, PanelLeftOpen } from 'lucide-react';
|
|
3
4
|
import React, { ReactNode, useState } from 'react';
|
|
4
5
|
import { useMediaQuery } from '../../../../../hooks/useMediaQuery';
|
|
@@ -6,7 +7,7 @@ import { CampxFullLogoIcon } from '../../../../Assets/Icons/IconComponents/Campx
|
|
|
6
7
|
import { CampxIcon } from '../../../../Assets/Icons/IconComponents/CampxIcon';
|
|
7
8
|
import { Button } from '../../../../Input/Button/Button';
|
|
8
9
|
import { UserProfilePopup, UserProfilePopupProps } from '../UserProfilePopup';
|
|
9
|
-
import { SideMenuItemProps } from './interfaces';
|
|
10
|
+
import { SideMenuItemProps, SidebarNavigationHook } from './interfaces';
|
|
10
11
|
import { MenuBar } from './MenuBar';
|
|
11
12
|
import { useSidebarNavigation } from './useSidebarNavigation';
|
|
12
13
|
|
|
@@ -14,7 +15,7 @@ interface SidebarProps {
|
|
|
14
15
|
/** Menu items for navigation */
|
|
15
16
|
menu: SideMenuItemProps[];
|
|
16
17
|
/**User profile Params */
|
|
17
|
-
userProfileParams
|
|
18
|
+
userProfileParams?: UserProfilePopupProps;
|
|
18
19
|
/** Whether the sidebar is collapsed */
|
|
19
20
|
collapsed: boolean;
|
|
20
21
|
/** Function to toggle sidebar collapse state */
|
|
@@ -23,6 +24,140 @@ interface SidebarProps {
|
|
|
23
24
|
actions: ReactNode;
|
|
24
25
|
}
|
|
25
26
|
|
|
27
|
+
interface SidebarContentProps {
|
|
28
|
+
collapsed: boolean;
|
|
29
|
+
setCollapsed: (collapsed: boolean) => void;
|
|
30
|
+
onToggle: () => void;
|
|
31
|
+
isSmallScreen: boolean;
|
|
32
|
+
navigation: SidebarNavigationHook;
|
|
33
|
+
userProfileParams?: UserProfilePopupProps;
|
|
34
|
+
actions: ReactNode;
|
|
35
|
+
hovered: boolean;
|
|
36
|
+
setHovered: (hovered: boolean) => void;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* SidebarContent Component
|
|
41
|
+
* Renders the actual sidebar UI content (header, menu, footer)
|
|
42
|
+
* This component is reused for both mobile and desktop layouts
|
|
43
|
+
*/
|
|
44
|
+
const SidebarContent: React.FC<SidebarContentProps> = ({
|
|
45
|
+
collapsed,
|
|
46
|
+
setCollapsed,
|
|
47
|
+
onToggle,
|
|
48
|
+
isSmallScreen,
|
|
49
|
+
navigation,
|
|
50
|
+
userProfileParams,
|
|
51
|
+
actions,
|
|
52
|
+
hovered,
|
|
53
|
+
setHovered,
|
|
54
|
+
}) => (
|
|
55
|
+
<SidebarContainer>
|
|
56
|
+
{/* Sidebar Header */}
|
|
57
|
+
<div
|
|
58
|
+
className={`flex flex-row justify-between items-center h-16 ${
|
|
59
|
+
collapsed && !isSmallScreen ? '' : 'px-4'
|
|
60
|
+
} md:h-[54px]`}
|
|
61
|
+
>
|
|
62
|
+
{/* Logo - Show icon when collapsed (desktop only), full logo otherwise */}
|
|
63
|
+
{collapsed && !isSmallScreen ? (
|
|
64
|
+
<div
|
|
65
|
+
onClick={() => {
|
|
66
|
+
setHovered(false);
|
|
67
|
+
onToggle();
|
|
68
|
+
}}
|
|
69
|
+
onMouseEnter={() => setHovered(true)}
|
|
70
|
+
onMouseLeave={() => setHovered(false)}
|
|
71
|
+
className="w-full hover:cursor-ew-resize flex justify-center"
|
|
72
|
+
>
|
|
73
|
+
{hovered ? <PanelLeftOpen size={20} /> : <CampxIcon size={32} />}
|
|
74
|
+
</div>
|
|
75
|
+
) : (
|
|
76
|
+
<>
|
|
77
|
+
<CampxFullLogoIcon />
|
|
78
|
+
<Button
|
|
79
|
+
onClick={onToggle}
|
|
80
|
+
variant="ghost"
|
|
81
|
+
size="icon-sm"
|
|
82
|
+
className="hover:cursor-ew-resize"
|
|
83
|
+
>
|
|
84
|
+
<PanelLeftClose size={20} />
|
|
85
|
+
</Button>
|
|
86
|
+
</>
|
|
87
|
+
)}
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
{/* Menu Content */}
|
|
91
|
+
<motion.div
|
|
92
|
+
key={`sidebar-${navigation.currentMenuState.title || 'main'}`}
|
|
93
|
+
initial={{ x: navigation.menuPosition }}
|
|
94
|
+
animate={{ x: 0 }}
|
|
95
|
+
transition={{
|
|
96
|
+
duration: 0.3,
|
|
97
|
+
ease: navigation.menuPosition ? 'circOut' : 'circIn',
|
|
98
|
+
}}
|
|
99
|
+
className="h-[calc(100%-165px)] w-full"
|
|
100
|
+
onClick={() => setCollapsed(false)}
|
|
101
|
+
>
|
|
102
|
+
<MenuBar
|
|
103
|
+
currentMenuState={navigation.currentMenuState}
|
|
104
|
+
menuPosition={navigation.menuPosition}
|
|
105
|
+
internalMenuClickHandler={navigation.internalMenuClickHandler}
|
|
106
|
+
previousMenuClickHandler={navigation.previousMenuClickHandler}
|
|
107
|
+
onClose={isSmallScreen ? onToggle : undefined}
|
|
108
|
+
collapsed={isSmallScreen ? false : collapsed}
|
|
109
|
+
setCollapsed={setCollapsed}
|
|
110
|
+
/>
|
|
111
|
+
</motion.div>
|
|
112
|
+
|
|
113
|
+
{/* Footer */}
|
|
114
|
+
{(actions || userProfileParams) && (
|
|
115
|
+
<div className="fixed bottom-0 left-0 border-t border-border flex flex-col gap-1">
|
|
116
|
+
{actions}
|
|
117
|
+
{userProfileParams && (
|
|
118
|
+
<UserProfilePopup
|
|
119
|
+
userFullName={userProfileParams?.userFullName}
|
|
120
|
+
email={userProfileParams?.email}
|
|
121
|
+
onLogout={userProfileParams?.onLogout}
|
|
122
|
+
onAccountClick={userProfileParams?.onAccountClick}
|
|
123
|
+
profileActions={userProfileParams?.profileActions}
|
|
124
|
+
collapsed={isSmallScreen ? false : collapsed}
|
|
125
|
+
/>
|
|
126
|
+
)}
|
|
127
|
+
</div>
|
|
128
|
+
)}
|
|
129
|
+
</SidebarContainer>
|
|
130
|
+
);
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Sidebar Component
|
|
134
|
+
*
|
|
135
|
+
* Responsive sidebar navigation component that displays differently on mobile and desktop:
|
|
136
|
+
* - **Mobile**: Renders as a collapsible Sheet drawer
|
|
137
|
+
* - **Desktop**: Renders as an animated fixed-width sidebar with collapse/expand animation
|
|
138
|
+
*
|
|
139
|
+
* Manages menu navigation state, hover effects, and user profile popup. Automatically
|
|
140
|
+
* handles internal menu navigation and animated transitions between menu levels.
|
|
141
|
+
*
|
|
142
|
+
* @param {SideMenuItemProps[]} menu - Navigation menu items with support for nested/internal menus and sub-menus
|
|
143
|
+
* @param {UserProfilePopupProps} userProfileParams - User profile configuration including name, email, and action handlers
|
|
144
|
+
* @param {boolean} collapsed - Current collapse state of the sidebar
|
|
145
|
+
* @param {(collapsed: boolean) => void} setCollapsed - Function to update the collapse state
|
|
146
|
+
* @param {ReactNode} actions - Action elements to display in the sidebar footer (above user profile)
|
|
147
|
+
*
|
|
148
|
+
* @returns {React.ReactElement} Responsive sidebar component (Sheet on mobile, animated div on desktop)
|
|
149
|
+
*
|
|
150
|
+
* @example
|
|
151
|
+
* ```tsx
|
|
152
|
+
* <Sidebar
|
|
153
|
+
* menu={navigationMenu}
|
|
154
|
+
* collapsed={sidebarCollapsed}
|
|
155
|
+
* setCollapsed={setSidebarCollapsed}
|
|
156
|
+
* userProfileParams={userProfile}
|
|
157
|
+
* actions={<CustomActions />}
|
|
158
|
+
* />
|
|
159
|
+
* ```
|
|
160
|
+
*/
|
|
26
161
|
export const Sidebar: React.FC<SidebarProps> = ({
|
|
27
162
|
menu,
|
|
28
163
|
userProfileParams,
|
|
@@ -32,115 +167,49 @@ export const Sidebar: React.FC<SidebarProps> = ({
|
|
|
32
167
|
}) => {
|
|
33
168
|
const [hovered, setHovered] = useState(false);
|
|
34
169
|
const isSmallScreen = useMediaQuery('(max-width: 768px)');
|
|
35
|
-
// Use the navigation hook
|
|
36
170
|
const navigation = useSidebarNavigation(menu);
|
|
37
171
|
|
|
38
172
|
const onToggle = () => {
|
|
39
173
|
setCollapsed(!collapsed);
|
|
40
174
|
};
|
|
41
175
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
</AnimatePresence>
|
|
176
|
+
// Sidebar content component with all shared props
|
|
177
|
+
const sidebarContent = (
|
|
178
|
+
<SidebarContent
|
|
179
|
+
collapsed={collapsed}
|
|
180
|
+
setCollapsed={setCollapsed}
|
|
181
|
+
onToggle={onToggle}
|
|
182
|
+
isSmallScreen={isSmallScreen}
|
|
183
|
+
navigation={navigation}
|
|
184
|
+
userProfileParams={userProfileParams}
|
|
185
|
+
actions={actions}
|
|
186
|
+
hovered={hovered}
|
|
187
|
+
setHovered={setHovered}
|
|
188
|
+
/>
|
|
189
|
+
);
|
|
57
190
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
>
|
|
69
|
-
<SidebarContainer>
|
|
70
|
-
{/* Sidebar Header */}
|
|
71
|
-
<div
|
|
72
|
-
className={`flex flex-row justify-between items-center h-16 ${
|
|
73
|
-
collapsed ? '' : 'px-4'
|
|
74
|
-
} md:h-[54px]`}
|
|
75
|
-
>
|
|
76
|
-
{/* Logo - Show icon when collapsed, full logo when expanded */}
|
|
77
|
-
{collapsed ? (
|
|
78
|
-
<div
|
|
79
|
-
onClick={() => {
|
|
80
|
-
setHovered(false);
|
|
81
|
-
onToggle();
|
|
82
|
-
}}
|
|
83
|
-
onMouseEnter={() => setHovered(true)}
|
|
84
|
-
onMouseLeave={() => setHovered(false)}
|
|
85
|
-
className="w-full hover:cursor-ew-resize flex justify-center"
|
|
86
|
-
>
|
|
87
|
-
{hovered ? (
|
|
88
|
-
<PanelLeftOpen size={20} />
|
|
89
|
-
) : (
|
|
90
|
-
<CampxIcon size={32} />
|
|
91
|
-
)}
|
|
92
|
-
</div>
|
|
93
|
-
) : (
|
|
94
|
-
<>
|
|
95
|
-
<CampxFullLogoIcon />
|
|
96
|
-
<Button
|
|
97
|
-
onClick={onToggle}
|
|
98
|
-
variant="ghost"
|
|
99
|
-
size="icon-sm"
|
|
100
|
-
className="hover:cursor-ew-resize"
|
|
101
|
-
>
|
|
102
|
-
<PanelLeftClose size={20} />
|
|
103
|
-
</Button>
|
|
104
|
-
</>
|
|
105
|
-
)}
|
|
106
|
-
</div>
|
|
191
|
+
// Mobile: Wrap with Sheet
|
|
192
|
+
if (isSmallScreen) {
|
|
193
|
+
return (
|
|
194
|
+
<Sheet open={!collapsed} onOpenChange={(open) => setCollapsed(!open)}>
|
|
195
|
+
<SheetContent side="left" className="w-[250px] p-0 [&>button]:hidden">
|
|
196
|
+
{sidebarContent}
|
|
197
|
+
</SheetContent>
|
|
198
|
+
</Sheet>
|
|
199
|
+
);
|
|
200
|
+
}
|
|
107
201
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
>
|
|
120
|
-
<MenuBar
|
|
121
|
-
currentMenuState={navigation.currentMenuState}
|
|
122
|
-
menuPosition={navigation.menuPosition}
|
|
123
|
-
internalMenuClickHandler={navigation.internalMenuClickHandler}
|
|
124
|
-
previousMenuClickHandler={navigation.previousMenuClickHandler}
|
|
125
|
-
onClose={isSmallScreen ? onToggle : undefined}
|
|
126
|
-
collapsed={collapsed}
|
|
127
|
-
setCollapsed={setCollapsed}
|
|
128
|
-
/>
|
|
129
|
-
</motion.div>
|
|
130
|
-
<div className="fixed bottom-0 left-0 border-t border-border">
|
|
131
|
-
{actions}
|
|
132
|
-
<UserProfilePopup
|
|
133
|
-
userFullName={userProfileParams?.userFullName}
|
|
134
|
-
email={userProfileParams?.email}
|
|
135
|
-
onLogout={userProfileParams?.onLogout}
|
|
136
|
-
onAccountClick={userProfileParams?.onAccountClick}
|
|
137
|
-
profileActions={userProfileParams?.profileActions}
|
|
138
|
-
collapsed={collapsed}
|
|
139
|
-
/>
|
|
140
|
-
</div>
|
|
141
|
-
</SidebarContainer>
|
|
142
|
-
</motion.div>
|
|
143
|
-
</>
|
|
202
|
+
// Desktop: Wrap with Framer Motion for width animation
|
|
203
|
+
return (
|
|
204
|
+
<motion.div
|
|
205
|
+
animate={{
|
|
206
|
+
width: collapsed ? '64px' : '250px',
|
|
207
|
+
}}
|
|
208
|
+
transition={{ duration: 0.3, ease: [0.32, 0.72, 0, 1] }}
|
|
209
|
+
className="relative h-screen flex-shrink-0"
|
|
210
|
+
>
|
|
211
|
+
{sidebarContent}
|
|
212
|
+
</motion.div>
|
|
144
213
|
);
|
|
145
214
|
};
|
|
146
215
|
|
|
@@ -31,7 +31,18 @@ type ButtonProps = {
|
|
|
31
31
|
onClick?: () => void;
|
|
32
32
|
} & React.HTMLAttributes<HTMLButtonElement>;
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
/**
|
|
35
|
+
* SidebarContainer Component
|
|
36
|
+
*
|
|
37
|
+
* Main container for the sidebar with flex layout, rounded corners, and overflow hidden.
|
|
38
|
+
* Serves as the root wrapper for all sidebar content including header, menu, and footer.
|
|
39
|
+
*
|
|
40
|
+
* @param {React.ReactNode} children - Content to render inside the sidebar
|
|
41
|
+
* @param {string} [className] - Additional CSS classes to apply
|
|
42
|
+
* @param {React.HTMLAttributes<HTMLDivElement>} props - Additional HTML div attributes
|
|
43
|
+
*
|
|
44
|
+
* @returns {React.ReactElement} A flex container for sidebar content
|
|
45
|
+
*/
|
|
35
46
|
export const SidebarContainer: React.FC<BaseProps> = ({
|
|
36
47
|
children,
|
|
37
48
|
className,
|
|
@@ -50,7 +61,19 @@ export const SidebarContainer: React.FC<BaseProps> = ({
|
|
|
50
61
|
);
|
|
51
62
|
};
|
|
52
63
|
|
|
53
|
-
|
|
64
|
+
/**
|
|
65
|
+
* MenuBarContainer Component
|
|
66
|
+
*
|
|
67
|
+
* Scrollable container for menu items with custom scrollbar styling. Includes responsive
|
|
68
|
+
* design with different width and margin behavior on mobile vs desktop. Custom scrollbar
|
|
69
|
+
* uses theme colors with thin width.
|
|
70
|
+
*
|
|
71
|
+
* @param {React.ReactNode} children - Menu items to render inside the container
|
|
72
|
+
* @param {string} [className] - Additional CSS classes to apply
|
|
73
|
+
* @param {React.HTMLAttributes<HTMLDivElement>} props - Additional HTML div attributes
|
|
74
|
+
*
|
|
75
|
+
* @returns {React.ReactElement} A vertically scrollable menu container
|
|
76
|
+
*/
|
|
54
77
|
export const MenuBarContainer: React.FC<BaseProps> = ({
|
|
55
78
|
children,
|
|
56
79
|
className,
|
|
@@ -77,7 +100,19 @@ export const MenuBarContainer: React.FC<BaseProps> = ({
|
|
|
77
100
|
);
|
|
78
101
|
};
|
|
79
102
|
|
|
80
|
-
|
|
103
|
+
/**
|
|
104
|
+
* MenuHeaderContainer Component
|
|
105
|
+
*
|
|
106
|
+
* Header container for displaying nested menu titles with back navigation.
|
|
107
|
+
* Provides fixed height with flex layout for centered or start-aligned content.
|
|
108
|
+
* Includes hover background effect.
|
|
109
|
+
*
|
|
110
|
+
* @param {React.ReactNode} children - Header content (typically back button and title)
|
|
111
|
+
* @param {string} [className] - Additional CSS classes to apply
|
|
112
|
+
* @param {React.HTMLAttributes<HTMLDivElement>} props - Additional HTML div attributes
|
|
113
|
+
*
|
|
114
|
+
* @returns {React.ReactElement} A header container for menu navigation
|
|
115
|
+
*/
|
|
81
116
|
export const MenuHeaderContainer: React.FC<BaseProps> = ({
|
|
82
117
|
children,
|
|
83
118
|
className,
|
|
@@ -96,7 +131,18 @@ export const MenuHeaderContainer: React.FC<BaseProps> = ({
|
|
|
96
131
|
);
|
|
97
132
|
};
|
|
98
133
|
|
|
99
|
-
|
|
134
|
+
/**
|
|
135
|
+
* MenuItemContainer Component
|
|
136
|
+
*
|
|
137
|
+
* Wrapper container for individual menu items with flex centering and rounded corners.
|
|
138
|
+
* Provides consistent spacing and layout for menu items.
|
|
139
|
+
*
|
|
140
|
+
* @param {React.ReactNode} children - Menu item content
|
|
141
|
+
* @param {string} [className] - Additional CSS classes to apply
|
|
142
|
+
* @param {React.HTMLAttributes<HTMLDivElement>} props - Additional HTML div attributes
|
|
143
|
+
*
|
|
144
|
+
* @returns {React.ReactElement} A centered flex container for a menu item
|
|
145
|
+
*/
|
|
100
146
|
export const MenuItemContainer: React.FC<BaseProps> = ({
|
|
101
147
|
children,
|
|
102
148
|
className,
|
|
@@ -109,6 +155,18 @@ export const MenuItemContainer: React.FC<BaseProps> = ({
|
|
|
109
155
|
);
|
|
110
156
|
};
|
|
111
157
|
|
|
158
|
+
/**
|
|
159
|
+
* MenuItemButton Component
|
|
160
|
+
*
|
|
161
|
+
* Styled button for menu items with flex layout, whitespace handling, and rounded appearance.
|
|
162
|
+
* Based on Button component with ghost variant and custom padding.
|
|
163
|
+
*
|
|
164
|
+
* @param {React.ReactNode} children - Button content (icon and/or text)
|
|
165
|
+
* @param {string} [className] - Additional CSS classes to apply
|
|
166
|
+
* @param {React.HTMLAttributes<HTMLButtonElement>} props - Additional button attributes
|
|
167
|
+
*
|
|
168
|
+
* @returns {React.ReactElement} A styled button for menu navigation
|
|
169
|
+
*/
|
|
112
170
|
export const MenuItemButton: React.FC<ButtonProps> = ({
|
|
113
171
|
children,
|
|
114
172
|
className,
|
|
@@ -128,6 +186,18 @@ export const MenuItemButton: React.FC<ButtonProps> = ({
|
|
|
128
186
|
);
|
|
129
187
|
};
|
|
130
188
|
|
|
189
|
+
/**
|
|
190
|
+
* MenuItemIcon Component
|
|
191
|
+
*
|
|
192
|
+
* Container for menu item icons with flex centering and right margin.
|
|
193
|
+
* Ensures icons are properly sized and aligned within menu items.
|
|
194
|
+
*
|
|
195
|
+
* @param {React.ReactNode} children - Icon element
|
|
196
|
+
* @param {string} [className] - Additional CSS classes to apply
|
|
197
|
+
* @param {React.HTMLAttributes<HTMLDivElement>} props - Additional HTML div attributes
|
|
198
|
+
*
|
|
199
|
+
* @returns {React.ReactElement} A centered flex container for an icon
|
|
200
|
+
*/
|
|
131
201
|
export const MenuItemIcon: React.FC<BaseProps> = ({
|
|
132
202
|
children,
|
|
133
203
|
className,
|
|
@@ -143,7 +213,20 @@ export const MenuItemIcon: React.FC<BaseProps> = ({
|
|
|
143
213
|
);
|
|
144
214
|
};
|
|
145
215
|
|
|
146
|
-
|
|
216
|
+
/**
|
|
217
|
+
* MenuLink Component
|
|
218
|
+
*
|
|
219
|
+
* React Router Link component styled as a menu item. Shows different background color
|
|
220
|
+
* when the route matches the current location. Includes hover effects and transitions.
|
|
221
|
+
*
|
|
222
|
+
* @param {boolean} [match] - Whether the link destination matches current route
|
|
223
|
+
* @param {string} [to=''] - Route path to navigate to
|
|
224
|
+
* @param {React.ReactNode} children - Link content
|
|
225
|
+
* @param {string} [className] - Additional CSS classes to apply
|
|
226
|
+
* @param {any} props - Additional Link properties
|
|
227
|
+
*
|
|
228
|
+
* @returns {React.ReactElement} A styled navigation link
|
|
229
|
+
*/
|
|
147
230
|
export const MenuLink: React.FC<StyledLinkButtonProps> = ({
|
|
148
231
|
match,
|
|
149
232
|
to = '',
|
|
@@ -167,7 +250,20 @@ export const MenuLink: React.FC<StyledLinkButtonProps> = ({
|
|
|
167
250
|
);
|
|
168
251
|
};
|
|
169
252
|
|
|
170
|
-
|
|
253
|
+
/**
|
|
254
|
+
* SubMenuContainer Component
|
|
255
|
+
*
|
|
256
|
+
* Container for sub-menu items that can expand/collapse or navigate.
|
|
257
|
+
* Shows different background color when active/matched. Used for menu items
|
|
258
|
+
* with expandable sub-items or internal navigation.
|
|
259
|
+
*
|
|
260
|
+
* @param {boolean} [match] - Whether the sub-menu is currently active/matched
|
|
261
|
+
* @param {React.ReactNode} children - Sub-menu content
|
|
262
|
+
* @param {string} [className] - Additional CSS classes to apply
|
|
263
|
+
* @param {any} props - Additional HTML attributes
|
|
264
|
+
*
|
|
265
|
+
* @returns {React.ReactElement} A styled container for sub-menu items
|
|
266
|
+
*/
|
|
171
267
|
export const SubMenuContainer: React.FC<StyledLinkButtonProps> = ({
|
|
172
268
|
match,
|
|
173
269
|
children,
|
|
@@ -189,7 +285,19 @@ export const SubMenuContainer: React.FC<StyledLinkButtonProps> = ({
|
|
|
189
285
|
);
|
|
190
286
|
};
|
|
191
287
|
|
|
192
|
-
|
|
288
|
+
/**
|
|
289
|
+
* SubMenuItemContainer Component
|
|
290
|
+
*
|
|
291
|
+
* Container for a list of sub-menu items that appear below a parent menu item.
|
|
292
|
+
* Includes left border, gap spacing, and left margin for visual hierarchy.
|
|
293
|
+
* Used to display expandable/collapsible sub-menu items.
|
|
294
|
+
*
|
|
295
|
+
* @param {React.ReactNode} children - Sub-menu item elements
|
|
296
|
+
* @param {string} [className] - Additional CSS classes to apply
|
|
297
|
+
* @param {React.HTMLAttributes<HTMLDivElement>} props - Additional HTML div attributes
|
|
298
|
+
*
|
|
299
|
+
* @returns {React.ReactElement} A flex column container for sub-menu items
|
|
300
|
+
*/
|
|
193
301
|
export const SubMenuItemContainer: React.FC<BaseProps> = ({
|
|
194
302
|
children,
|
|
195
303
|
className,
|
|
@@ -208,7 +316,18 @@ export const SubMenuItemContainer: React.FC<BaseProps> = ({
|
|
|
208
316
|
);
|
|
209
317
|
};
|
|
210
318
|
|
|
211
|
-
|
|
319
|
+
/**
|
|
320
|
+
* HoverIcon Component
|
|
321
|
+
*
|
|
322
|
+
* Container for icons that appear on hover within menu items.
|
|
323
|
+
* Hidden by default and shown only when parent element is hovered.
|
|
324
|
+
*
|
|
325
|
+
* @param {React.ReactNode} children - Icon element to show on hover
|
|
326
|
+
* @param {string} [className] - Additional CSS classes to apply
|
|
327
|
+
* @param {React.HTMLAttributes<HTMLDivElement>} props - Additional HTML div attributes
|
|
328
|
+
*
|
|
329
|
+
* @returns {React.ReactElement} A hidden flex container that shows on hover
|
|
330
|
+
*/
|
|
212
331
|
export const HoverIcon: React.FC<BaseProps> = ({
|
|
213
332
|
children,
|
|
214
333
|
className,
|
|
@@ -227,7 +346,18 @@ export const HoverIcon: React.FC<BaseProps> = ({
|
|
|
227
346
|
);
|
|
228
347
|
};
|
|
229
348
|
|
|
230
|
-
|
|
349
|
+
/**
|
|
350
|
+
* AnimationWrapper Component
|
|
351
|
+
*
|
|
352
|
+
* Generic wrapper component for content that may have animation effects.
|
|
353
|
+
* Provides full width and height to accommodate animated children.
|
|
354
|
+
*
|
|
355
|
+
* @param {React.ReactNode} children - Content to wrap with animation support
|
|
356
|
+
* @param {string} [className] - Additional CSS classes to apply
|
|
357
|
+
* @param {React.HTMLAttributes<HTMLDivElement>} props - Additional HTML div attributes
|
|
358
|
+
*
|
|
359
|
+
* @returns {React.ReactElement} A full-size flex container for animated content
|
|
360
|
+
*/
|
|
231
361
|
export const AnimationWrapper: React.FC<BaseProps> = ({
|
|
232
362
|
children,
|
|
233
363
|
className,
|
|
@@ -29,6 +29,40 @@ export interface UserProfilePopupProps {
|
|
|
29
29
|
collapsed?: boolean;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
/**
|
|
33
|
+
* UserProfilePopup Component
|
|
34
|
+
*
|
|
35
|
+
* User profile dropdown menu component displayed in the sidebar footer. Shows user avatar/initials,
|
|
36
|
+
* and provides a menu with Account section, optional Active Devices, custom profile actions, and Logout.
|
|
37
|
+
* Automatically adapts layout when sidebar is collapsed (centered alignment, avatar only).
|
|
38
|
+
*
|
|
39
|
+
* @param {string} userFullName - User's full name (required, used for avatar text and display)
|
|
40
|
+
* @param {string} [email=''] - User's email address (shown in account section)
|
|
41
|
+
* @param {React.ReactNode[]} [profileActions=[]] - Custom menu items to include in the dropdown
|
|
42
|
+
* @param {() => void} [onLogout] - Callback handler when user clicks logout
|
|
43
|
+
* @param {string} [profileUrl] - URL to user's profile image (uses initials fallback if not provided)
|
|
44
|
+
* @param {string} [avatarClassName=''] - Additional CSS classes for the avatar component
|
|
45
|
+
* @param {boolean} [showActiveDevices=false] - Whether to show the "Active Devices" menu item
|
|
46
|
+
* @param {() => void} [onActiveDevicesClick] - Callback handler when user clicks active devices
|
|
47
|
+
* @param {() => void} [onAccountClick] - Callback handler when user clicks the account section
|
|
48
|
+
* @param {boolean} [collapsed] - Whether the sidebar is in collapsed state (affects layout)
|
|
49
|
+
*
|
|
50
|
+
* @returns {React.ReactElement} A dropdown menu anchored to user avatar with profile options
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```tsx
|
|
54
|
+
* <UserProfilePopup
|
|
55
|
+
* userFullName="Jane Smith"
|
|
56
|
+
* email="jane@example.com"
|
|
57
|
+
* profileUrl="/avatar.jpg"
|
|
58
|
+
* showActiveDevices={true}
|
|
59
|
+
* onLogout={handleLogout}
|
|
60
|
+
* onAccountClick={navigateToSettings}
|
|
61
|
+
* onActiveDevicesClick={showDevices}
|
|
62
|
+
* collapsed={false}
|
|
63
|
+
* />
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
32
66
|
export const UserProfilePopup: React.FC<UserProfilePopupProps> = ({
|
|
33
67
|
collapsed,
|
|
34
68
|
userFullName,
|
|
@@ -96,7 +130,7 @@ export const UserProfilePopup: React.FC<UserProfilePopupProps> = ({
|
|
|
96
130
|
label={
|
|
97
131
|
<div className="flex flex-col gap-1 flex-1">
|
|
98
132
|
Account
|
|
99
|
-
<div className="flex flex-row items-center justify-between">
|
|
133
|
+
<div className="flex flex-row items-center justify-between gap-4">
|
|
100
134
|
<div className="flex flex-row gap-2">
|
|
101
135
|
<CircularAvatar
|
|
102
136
|
text={userFullName}
|
|
@@ -13,6 +13,27 @@ interface SidebarProviderProps {
|
|
|
13
13
|
initialCollapsed?: boolean;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* SidebarProvider Component
|
|
18
|
+
*
|
|
19
|
+
* React Context provider that manages global sidebar collapse state and provides methods
|
|
20
|
+
* to toggle and set the collapse state. Wraps the application or specific layout sections
|
|
21
|
+
* to enable sidebar state management across the component tree.
|
|
22
|
+
*
|
|
23
|
+
* @param {React.ReactNode} children - Child components that will have access to sidebar context
|
|
24
|
+
* @param {boolean} [initialCollapsed=false] - Initial collapsed state of the sidebar
|
|
25
|
+
*
|
|
26
|
+
* @returns {React.ReactElement} Context provider wrapping children with sidebar state
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* <SidebarProvider initialCollapsed={isMobile}>
|
|
31
|
+
* <AppLayout>
|
|
32
|
+
* <Content />
|
|
33
|
+
* </AppLayout>
|
|
34
|
+
* </SidebarProvider>
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
16
37
|
export const SidebarProvider: React.FC<SidebarProviderProps> = ({
|
|
17
38
|
children,
|
|
18
39
|
initialCollapsed = false,
|
|
@@ -30,6 +51,33 @@ export const SidebarProvider: React.FC<SidebarProviderProps> = ({
|
|
|
30
51
|
);
|
|
31
52
|
};
|
|
32
53
|
|
|
54
|
+
/**
|
|
55
|
+
* useSidebar Hook
|
|
56
|
+
*
|
|
57
|
+
* Custom React hook to access the sidebar context state and methods.
|
|
58
|
+
* Must be used within a SidebarProvider component, otherwise it throws an error.
|
|
59
|
+
*
|
|
60
|
+
* @returns {{
|
|
61
|
+
* collapsed: boolean;
|
|
62
|
+
* toggleSidebar: () => void;
|
|
63
|
+
* setCollapsed: (collapsed: boolean) => void;
|
|
64
|
+
* }} Object containing sidebar state and methods to control it
|
|
65
|
+
*
|
|
66
|
+
* @throws {Error} If used outside of SidebarProvider
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```tsx
|
|
70
|
+
* function MyComponent() {
|
|
71
|
+
* const { collapsed, toggleSidebar, setCollapsed } = useSidebar();
|
|
72
|
+
*
|
|
73
|
+
* return (
|
|
74
|
+
* <button onClick={toggleSidebar}>
|
|
75
|
+
* {collapsed ? 'Expand' : 'Collapse'}
|
|
76
|
+
* </button>
|
|
77
|
+
* );
|
|
78
|
+
* }
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
33
81
|
export const useSidebar = () => {
|
|
34
82
|
const context = useContext(SidebarContext);
|
|
35
83
|
if (!context) {
|
|
@@ -22,7 +22,7 @@ export interface AppLayoutProps {
|
|
|
22
22
|
menu: SideMenuItemProps[];
|
|
23
23
|
|
|
24
24
|
/**User profile parameters */
|
|
25
|
-
userProfileParams
|
|
25
|
+
userProfileParams?: UserProfilePopupProps;
|
|
26
26
|
|
|
27
27
|
/** Switchers section customization - receives collapsed state */
|
|
28
28
|
actions?: ReactNode | ((params: { collapsed: boolean }) => ReactNode);
|