@campxdev/react-blueprint 3.0.0-alpha.5 → 3.0.0-alpha.6
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 +95 -0
- 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 +19 -0
- 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 +80 -0
- package/dist/cjs/types/src/components/Navigation/UploadDialog/UploadDialog.d.ts +64 -0
- 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 +95 -0
- 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 +19 -0
- 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 +80 -0
- package/dist/esm/types/src/components/Navigation/UploadDialog/UploadDialog.d.ts +64 -0
- package/dist/index.d.ts +2953 -12
- package/dist/styles.css +30 -9
- 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 +95 -0
- package/src/components/DataDisplay/DataTable/components/TablePagination.tsx +35 -0
- 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 +33 -1
- 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 +34 -0
- 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 +19 -0
- package/src/components/Layout/PageHeader/PageHeader.tsx +46 -0
- 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 +33 -0
- 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 +55 -0
- 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 +80 -0
- package/src/components/Navigation/UploadDialog/UploadDialog.tsx +64 -0
- package/src/shadcn-components/Layout/Sheet/Sheet.tsx +2 -2
|
@@ -12,8 +12,20 @@ import {
|
|
|
12
12
|
useIntersectionObserver,
|
|
13
13
|
} from './service';
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* Type for activity action
|
|
17
|
+
* @typedef {'create' | 'update' | 'delete'} ActivityAction
|
|
18
|
+
*/
|
|
15
19
|
export type ActivityAction = 'create' | 'update' | 'delete';
|
|
16
20
|
|
|
21
|
+
/**
|
|
22
|
+
* Interface for a single activity entry
|
|
23
|
+
* @typedef {Object} Activity
|
|
24
|
+
* @property {string} [userName] - Name of user who performed the action
|
|
25
|
+
* @property {ActivityAction} [action] - Type of action performed
|
|
26
|
+
* @property {string} message - Description or details of the activity
|
|
27
|
+
* @property {string} timestamp - ISO timestamp of when activity occurred
|
|
28
|
+
*/
|
|
17
29
|
export interface Activity {
|
|
18
30
|
userName?: string;
|
|
19
31
|
action?: ActivityAction;
|
|
@@ -21,6 +33,22 @@ export interface Activity {
|
|
|
21
33
|
timestamp: string;
|
|
22
34
|
}
|
|
23
35
|
|
|
36
|
+
/**
|
|
37
|
+
* Props for ActivityLogView component
|
|
38
|
+
* @typedef {Object} ActivityLogProps
|
|
39
|
+
* @property {Activity[]} activitiesData - Array of activities to display
|
|
40
|
+
* @property {boolean} isFetchingNextPage - Whether next page is being fetched
|
|
41
|
+
* @property {() => void} fetchNextPage - Callback to fetch next page
|
|
42
|
+
* @property {boolean | undefined} hasNextPage - Whether more activities exist
|
|
43
|
+
* @property {Date | null} fromDate - Filter start date
|
|
44
|
+
* @property {Date | null} toDate - Filter end date
|
|
45
|
+
* @property {(date: Date | null) => void} setFromDate - Update filter start date
|
|
46
|
+
* @property {(date: Date | null) => void} setToDate - Update filter end date
|
|
47
|
+
* @property {boolean} isLoading - Whether data is loading
|
|
48
|
+
* @property {boolean} [hideLogFilter] - Hide the date filter controls
|
|
49
|
+
* @property {string} [className] - CSS class for container
|
|
50
|
+
* @property {string} [title] - Title to display above activities
|
|
51
|
+
*/
|
|
24
52
|
interface ActivityLogProps {
|
|
25
53
|
activitiesData: Activity[];
|
|
26
54
|
isFetchingNextPage: boolean;
|
|
@@ -36,6 +64,12 @@ interface ActivityLogProps {
|
|
|
36
64
|
title?: string;
|
|
37
65
|
}
|
|
38
66
|
|
|
67
|
+
/**
|
|
68
|
+
* Get icon component for activity action type
|
|
69
|
+
* @param {ActivityAction} [action] - The action type
|
|
70
|
+
* @returns {JSX.Element} Icon component for the action
|
|
71
|
+
* @private
|
|
72
|
+
*/
|
|
39
73
|
const getActivityIcon = (action?: ActivityAction) => {
|
|
40
74
|
const iconProps = { size: 16, className: 'text-foreground' };
|
|
41
75
|
switch (action) {
|
|
@@ -50,6 +84,56 @@ const getActivityIcon = (action?: ActivityAction) => {
|
|
|
50
84
|
}
|
|
51
85
|
};
|
|
52
86
|
|
|
87
|
+
/**
|
|
88
|
+
* ActivityLogView component for displaying chronological activity feed
|
|
89
|
+
* Groups activities by date, supports filtering and infinite scroll
|
|
90
|
+
*
|
|
91
|
+
* @component
|
|
92
|
+
* @param {ActivityLogProps} props - Activity log configuration
|
|
93
|
+
* @param {Activity[]} props.activitiesData - Array of activity entries to display
|
|
94
|
+
* @param {boolean} props.isFetchingNextPage - Whether next page is loading
|
|
95
|
+
* @param {() => void} props.fetchNextPage - Callback to load more activities
|
|
96
|
+
* @param {boolean | undefined} props.hasNextPage - Whether more activities available
|
|
97
|
+
* @param {Date | null} props.fromDate - Filter start date (null = no limit)
|
|
98
|
+
* @param {Date | null} props.toDate - Filter end date (null = no limit)
|
|
99
|
+
* @param {(date: Date | null) => void} props.setFromDate - Update filter start date
|
|
100
|
+
* @param {(date: Date | null) => void} props.setToDate - Update filter end date
|
|
101
|
+
* @param {boolean} props.isLoading - Initial load state
|
|
102
|
+
* @param {boolean} [props.hideLogFilter=false] - Hide filter controls
|
|
103
|
+
* @param {string} [props.className] - CSS class for container
|
|
104
|
+
* @param {string} [props.title] - Title to display above log
|
|
105
|
+
* @returns {JSX.Element} Activity log with timeline, filtering, and infinite scroll
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* // Activity log with filtering
|
|
109
|
+
* <ActivityLogView
|
|
110
|
+
* activitiesData={activities}
|
|
111
|
+
* isFetchingNextPage={loading}
|
|
112
|
+
* fetchNextPage={() => loadMore()}
|
|
113
|
+
* hasNextPage={true}
|
|
114
|
+
* fromDate={startDate}
|
|
115
|
+
* toDate={endDate}
|
|
116
|
+
* setFromDate={setStartDate}
|
|
117
|
+
* setToDate={setEndDate}
|
|
118
|
+
* isLoading={false}
|
|
119
|
+
* title="Activity Feed"
|
|
120
|
+
* />
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* // Activity log without filter
|
|
124
|
+
* <ActivityLogView
|
|
125
|
+
* activitiesData={activities}
|
|
126
|
+
* isFetchingNextPage={loading}
|
|
127
|
+
* fetchNextPage={() => loadMore()}
|
|
128
|
+
* hasNextPage={true}
|
|
129
|
+
* fromDate={null}
|
|
130
|
+
* toDate={null}
|
|
131
|
+
* setFromDate={() => {}}
|
|
132
|
+
* setToDate={() => {}}
|
|
133
|
+
* isLoading={false}
|
|
134
|
+
* hideLogFilter
|
|
135
|
+
* />
|
|
136
|
+
*/
|
|
53
137
|
export const ActivityLogView = ({
|
|
54
138
|
activitiesData,
|
|
55
139
|
isFetchingNextPage,
|
|
@@ -6,6 +6,16 @@ import {
|
|
|
6
6
|
} from '@/shadcn-components/DataDisplay/Avatar/Avatar';
|
|
7
7
|
import { Typography } from '../Typography/Typography';
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Props for CircularAvatar component
|
|
11
|
+
* @typedef {Object} CircularAvatarProps
|
|
12
|
+
* @property {string} text - Text to display as fallback initials (e.g., "John Doe" -> "JD")
|
|
13
|
+
* @property {string} [src] - Optional image source URL for the avatar
|
|
14
|
+
* @property {string} [alt] - Optional alt text for the avatar image
|
|
15
|
+
* @property {string} [className] - Optional CSS class for the avatar container
|
|
16
|
+
* @property {string} [fallbackClassName] - Optional CSS class for the fallback text
|
|
17
|
+
* @property {(e: React.MouseEvent<HTMLDivElement>) => void} [onClick] - Optional click handler
|
|
18
|
+
*/
|
|
9
19
|
export type CircularAvatarProps = {
|
|
10
20
|
text: string;
|
|
11
21
|
src?: string;
|
|
@@ -15,6 +25,36 @@ export type CircularAvatarProps = {
|
|
|
15
25
|
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
16
26
|
};
|
|
17
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Circular avatar component with image and fallback initials
|
|
30
|
+
* Extracts first letter from each word to create initials fallback
|
|
31
|
+
*
|
|
32
|
+
* @component
|
|
33
|
+
* @param {CircularAvatarProps} props - Avatar configuration
|
|
34
|
+
* @param {string} props.text - Text to extract initials from for fallback display
|
|
35
|
+
* @param {string} [props.src] - Image URL to display; falls back to initials if not provided
|
|
36
|
+
* @param {string} [props.alt] - Alternative text for image accessibility
|
|
37
|
+
* @param {string} [props.className] - Additional CSS classes for avatar wrapper
|
|
38
|
+
* @param {string} [props.fallbackClassName] - Additional CSS classes for fallback text display
|
|
39
|
+
* @param {(e: React.MouseEvent<HTMLDivElement>) => void} [props.onClick] - Handler called when avatar is clicked
|
|
40
|
+
* @returns {JSX.Element} Circular avatar with image or initials
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* // Avatar with image
|
|
44
|
+
* <CircularAvatar
|
|
45
|
+
* text="John Doe"
|
|
46
|
+
* src="/path/to/avatar.jpg"
|
|
47
|
+
* alt="John's avatar"
|
|
48
|
+
* />
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* // Avatar with fallback initials and click handler
|
|
52
|
+
* <CircularAvatar
|
|
53
|
+
* text="Jane Smith"
|
|
54
|
+
* onClick={(e) => openUserMenu(e)}
|
|
55
|
+
* className="border-2 border-blue-500"
|
|
56
|
+
* />
|
|
57
|
+
*/
|
|
18
58
|
export const CircularAvatar = ({
|
|
19
59
|
text,
|
|
20
60
|
src,
|
|
@@ -1,10 +1,38 @@
|
|
|
1
1
|
import { Badge } from '@/shadcn-components/DataDisplay/Badge/Badge';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Props for Chip component
|
|
6
|
+
* @typedef {Object} ChipProps
|
|
7
|
+
* @property {string} label - The text content displayed in the chip
|
|
8
|
+
* @extends {React.ComponentPropsWithoutRef<typeof Badge>}
|
|
9
|
+
*/
|
|
4
10
|
export interface ChipProps extends React.ComponentPropsWithoutRef<typeof Badge> {
|
|
5
11
|
label: string;
|
|
6
12
|
}
|
|
7
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Chip component for displaying compact, labeled badges
|
|
16
|
+
* Wrapper around shadcn Badge component with simpler API
|
|
17
|
+
*
|
|
18
|
+
* @component
|
|
19
|
+
* @param {ChipProps} props - Chip configuration
|
|
20
|
+
* @param {string} props.label - Text to display in the chip
|
|
21
|
+
* @param {...React.ComponentPropsWithoutRef<typeof Badge>} [props] - Additional Badge props (variant, className, etc.)
|
|
22
|
+
* @returns {JSX.Element} Chip badge element
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* // Basic chip
|
|
26
|
+
* <Chip label="JavaScript" />
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* // Chip with custom variant
|
|
30
|
+
* <Chip
|
|
31
|
+
* label="Active"
|
|
32
|
+
* variant="default"
|
|
33
|
+
* className="bg-green-500"
|
|
34
|
+
* />
|
|
35
|
+
*/
|
|
8
36
|
export const Chip = ({ label, ...rest }: ChipProps) => {
|
|
9
37
|
return <Badge {...rest}>{label}</Badge>;
|
|
10
38
|
};
|
|
@@ -2,6 +2,23 @@ import { cn } from '@/lib/utils';
|
|
|
2
2
|
import { Badge } from '@/shadcn-components/DataDisplay/Badge/Badge';
|
|
3
3
|
import { ReactNode, useEffect, useState } from 'react';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Props for individual chip item
|
|
7
|
+
* @typedef {Object} ChipItem
|
|
8
|
+
* @property {string | ReactNode} label - Display label for the chip
|
|
9
|
+
* @property {string | number} value - Unique value identifier for the chip
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Props for Chips component (multi/single selection)
|
|
14
|
+
* @typedef {Object} ChipsProps
|
|
15
|
+
* @property {{ label: string | ReactNode; value: string | number }[]} list - Array of chip items
|
|
16
|
+
* @property {string[] | string | number} selected - Currently selected value(s)
|
|
17
|
+
* @property {(selected: string[] | string | number) => void} onSelected - Callback when selection changes
|
|
18
|
+
* @property {'row' | 'column'} [direction='row'] - Layout direction for chips
|
|
19
|
+
* @property {boolean} [singleSelection=true] - Enable single or multiple selection
|
|
20
|
+
* @property {boolean} [toggle=false] - Allow toggling selection off
|
|
21
|
+
*/
|
|
5
22
|
interface ChipsProps {
|
|
6
23
|
list: { label: string | ReactNode; value: string | number }[];
|
|
7
24
|
selected: string[] | string | number;
|
|
@@ -11,6 +28,45 @@ interface ChipsProps {
|
|
|
11
28
|
toggle?: boolean;
|
|
12
29
|
}
|
|
13
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Chips component for single or multi-select chip groups
|
|
33
|
+
* Renders interactive chips with toggle/selection capabilities
|
|
34
|
+
*
|
|
35
|
+
* @component
|
|
36
|
+
* @param {ChipsProps} props - Chips configuration
|
|
37
|
+
* @param {{ label: string | ReactNode; value: string | number }[]} props.list - Array of chip options
|
|
38
|
+
* @param {string[] | string | number} props.selected - Current selected value(s)
|
|
39
|
+
* @param {(selected: string[] | string | number) => void} props.onSelected - Callback fired when selection changes
|
|
40
|
+
* @param {'row' | 'column'} [props.direction='row'] - Flex direction for chip layout
|
|
41
|
+
* @param {boolean} [props.singleSelection=true] - If true, only one chip can be selected at a time
|
|
42
|
+
* @param {boolean} [props.toggle=false] - If true, clicking selected chip deselects it (only in singleSelection mode)
|
|
43
|
+
* @returns {JSX.Element} Interactive chip group
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* // Single selection chips
|
|
47
|
+
* <Chips
|
|
48
|
+
* list={[
|
|
49
|
+
* { label: "Option 1", value: "opt1" },
|
|
50
|
+
* { label: "Option 2", value: "opt2" }
|
|
51
|
+
* ]}
|
|
52
|
+
* selected="opt1"
|
|
53
|
+
* onSelected={(value) => setSelected(value)}
|
|
54
|
+
* />
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* // Multi-selection chips with column layout
|
|
58
|
+
* <Chips
|
|
59
|
+
* list={[
|
|
60
|
+
* { label: "JavaScript", value: "js" },
|
|
61
|
+
* { label: "TypeScript", value: "ts" },
|
|
62
|
+
* { label: "Python", value: "py" }
|
|
63
|
+
* ]}
|
|
64
|
+
* selected={["js", "ts"]}
|
|
65
|
+
* onSelected={(values) => setTags(values)}
|
|
66
|
+
* singleSelection={false}
|
|
67
|
+
* direction="column"
|
|
68
|
+
* />
|
|
69
|
+
*/
|
|
14
70
|
export const Chips = ({
|
|
15
71
|
list = [],
|
|
16
72
|
selected: _selected,
|
|
@@ -26,6 +26,39 @@ import {
|
|
|
26
26
|
processColumnsForSorting,
|
|
27
27
|
} from './components/utils';
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* Props for the DataTable component
|
|
31
|
+
* @typedef {Object} DataTableProps
|
|
32
|
+
* @template TData - Type of data in table rows
|
|
33
|
+
*
|
|
34
|
+
* @property {number} [limit] - Number of rows per page for pagination
|
|
35
|
+
* @property {number} [offset] - Current page offset for pagination
|
|
36
|
+
* @property {number} [totalCount] - Total number of records in dataset
|
|
37
|
+
* @property {(page: number) => void} [onPageChange] - Callback when page changes
|
|
38
|
+
* @property {(limit: number) => void} [onLimitChange] - Callback when page limit changes
|
|
39
|
+
* @property {ColumnDef<TData, any>[]} columns - Column definitions for the table
|
|
40
|
+
* @property {TData[]} rows - Array of data rows to display
|
|
41
|
+
* @property {'standard' | 'compact' | 'comfortable'} [density='standard'] - Row height density
|
|
42
|
+
* @property {{ [x: string]: boolean }} [columnVisibilityModel] - Column visibility state
|
|
43
|
+
* @property {boolean} [isLoading=false] - Whether table is loading
|
|
44
|
+
* @property {boolean} [checkboxSelection=false] - Enable row checkboxes
|
|
45
|
+
* @property {Record<string, boolean>} [rowSelectionModel={}] - Selected rows state
|
|
46
|
+
* @property {(newRowSelectionModel: Record<string, boolean>) => void} [onRowSelectionModelChange] - Selection change callback
|
|
47
|
+
* @property {React.ReactNode[]} [selectionActions] - Actions to show when rows selected
|
|
48
|
+
* @property {(params: { row: Row<TData> }) => void} [onRowClick] - Row click handler
|
|
49
|
+
* @property {boolean} [enableSorting=false] - Enable column sorting
|
|
50
|
+
* @property {SortingState} [sortingState] - Current sorting state
|
|
51
|
+
* @property {(newSortingState: SortingState) => void} [onSortingChange] - Sorting change callback
|
|
52
|
+
* @property {boolean} [hideTableActionHeader] - Hide the action header
|
|
53
|
+
* @property {Object} [tableActionProps] - Table action header configuration
|
|
54
|
+
* @property {React.ReactNode[]} cards - Card view items for card layout
|
|
55
|
+
* @property {string} [className] - CSS class for wrapper
|
|
56
|
+
* @property {string} [tableClassName] - CSS class for table element
|
|
57
|
+
* @property {string} [headerClassName] - CSS class for header row
|
|
58
|
+
* @property {string | ((row: Row<TData>) => string)} [rowClassName] - CSS class for data rows
|
|
59
|
+
* @property {string} [cellClassName] - CSS class for cells
|
|
60
|
+
* @property {string} [cardContainerClassName] - CSS class for card container
|
|
61
|
+
*/
|
|
29
62
|
type DataTableProps<TData = any> = {
|
|
30
63
|
// Pagination props
|
|
31
64
|
limit?: number;
|
|
@@ -81,6 +114,68 @@ type DataTableProps<TData = any> = {
|
|
|
81
114
|
cardContainerClassName?: string;
|
|
82
115
|
};
|
|
83
116
|
|
|
117
|
+
/**
|
|
118
|
+
* DataTable component for displaying tabular data with advanced features
|
|
119
|
+
* Supports sorting, filtering, pagination, row selection, and card view layout
|
|
120
|
+
*
|
|
121
|
+
* @component
|
|
122
|
+
* @template TData - Type of data in table rows
|
|
123
|
+
* @param {DataTableProps<TData>} props - DataTable configuration
|
|
124
|
+
* @param {ColumnDef<TData, any>[]} props.columns - TanStack table column definitions
|
|
125
|
+
* @param {TData[]} props.rows - Array of data rows
|
|
126
|
+
* @param {number} [props.limit] - Rows per page (enables pagination)
|
|
127
|
+
* @param {number} [props.offset] - Page offset
|
|
128
|
+
* @param {number} [props.totalCount] - Total row count for pagination
|
|
129
|
+
* @param {(page: number) => void} [props.onPageChange] - Page change handler
|
|
130
|
+
* @param {(limit: number) => void} [props.onLimitChange] - Page limit change handler
|
|
131
|
+
* @param {'standard' | 'compact' | 'comfortable'} [props.density='standard'] - Row height
|
|
132
|
+
* @param {boolean} [props.checkboxSelection] - Show row selection checkboxes
|
|
133
|
+
* @param {Record<string, boolean>} [props.rowSelectionModel] - Selected rows
|
|
134
|
+
* @param {(newRowSelectionModel: Record<string, boolean>) => void} [props.onRowSelectionModelChange] - Selection changed callback
|
|
135
|
+
* @param {React.ReactNode[]} [props.selectionActions] - Actions when rows selected
|
|
136
|
+
* @param {(params: { row: Row<TData> }) => void} [props.onRowClick] - Row clicked callback
|
|
137
|
+
* @param {boolean} [props.enableSorting] - Enable column sorting
|
|
138
|
+
* @param {SortingState} [props.sortingState] - Current sort state
|
|
139
|
+
* @param {(newSortingState: SortingState) => void} [props.onSortingChange] - Sort changed callback
|
|
140
|
+
* @param {boolean} [props.isLoading] - Show loading skeletons
|
|
141
|
+
* @param {boolean} [props.hideTableActionHeader] - Hide action header
|
|
142
|
+
* @param {Object} [props.tableActionProps] - Table action configuration
|
|
143
|
+
* @param {React.ReactNode[]} props.cards - Card view items
|
|
144
|
+
* @param {string} [props.className] - Wrapper CSS class
|
|
145
|
+
* @param {string} [props.tableClassName] - Table CSS class
|
|
146
|
+
* @param {string} [props.headerClassName] - Header CSS class
|
|
147
|
+
* @param {string | ((row: Row<TData>) => string)} [props.rowClassName] - Row CSS class
|
|
148
|
+
* @param {string} [props.cellClassName] - Cell CSS class
|
|
149
|
+
* @param {string} [props.cardContainerClassName] - Card container CSS class
|
|
150
|
+
* @returns {JSX.Element} Data table with optional pagination, sorting, and selection
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* // Basic table
|
|
154
|
+
* <DataTable
|
|
155
|
+
* columns={columns}
|
|
156
|
+
* rows={data}
|
|
157
|
+
* limit={10}
|
|
158
|
+
* offset={0}
|
|
159
|
+
* totalCount={100}
|
|
160
|
+
* />
|
|
161
|
+
*
|
|
162
|
+
* @example
|
|
163
|
+
* // Table with selection and sorting
|
|
164
|
+
* <DataTable
|
|
165
|
+
* columns={columns}
|
|
166
|
+
* rows={data}
|
|
167
|
+
* checkboxSelection
|
|
168
|
+
* rowSelectionModel={selected}
|
|
169
|
+
* onRowSelectionModelChange={setSelected}
|
|
170
|
+
* enableSorting
|
|
171
|
+
* sortingState={sorting}
|
|
172
|
+
* onSortingChange={setSorting}
|
|
173
|
+
* limit={20}
|
|
174
|
+
* offset={page * 20}
|
|
175
|
+
* totalCount={total}
|
|
176
|
+
* onPageChange={(offset) => setPage(offset / 20)}
|
|
177
|
+
* />
|
|
178
|
+
*/
|
|
84
179
|
const DataTable = <TData extends Record<string, any> = any>(
|
|
85
180
|
props: DataTableProps<TData>,
|
|
86
181
|
) => {
|
|
@@ -14,6 +14,16 @@ import { DropdownMenu } from '../../../Navigation/DropDownMenu/DropDownMenu';
|
|
|
14
14
|
import { DropdownMenuItem } from '../../../Navigation/DropDownMenu/DropdownMenuItem';
|
|
15
15
|
import { Typography } from '../../Typography/Typography';
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Props for TablePagination component
|
|
19
|
+
* @typedef {Object} PaginationProps
|
|
20
|
+
* @property {number} limit - Number of rows per page
|
|
21
|
+
* @property {number} offset - Current page offset (0-indexed)
|
|
22
|
+
* @property {number} totalCount - Total number of records
|
|
23
|
+
* @property {(offset: number) => void} onPageChange - Callback when page changes
|
|
24
|
+
* @property {(limit: number) => void} onLimitChange - Callback when page limit changes
|
|
25
|
+
* @property {number} rowCount - Number of rows in current page
|
|
26
|
+
*/
|
|
17
27
|
export type PaginationProps = {
|
|
18
28
|
limit: number;
|
|
19
29
|
offset: number;
|
|
@@ -23,6 +33,31 @@ export type PaginationProps = {
|
|
|
23
33
|
rowCount: number;
|
|
24
34
|
};
|
|
25
35
|
|
|
36
|
+
/**
|
|
37
|
+
* TablePagination component for controlling data table pagination
|
|
38
|
+
* Displays page numbers, navigation arrows, row count, and page limit selector
|
|
39
|
+
*
|
|
40
|
+
* @component
|
|
41
|
+
* @param {PaginationProps} props - Pagination configuration
|
|
42
|
+
* @param {number} props.limit - Rows per page
|
|
43
|
+
* @param {number} props.offset - Current page offset
|
|
44
|
+
* @param {number} props.totalCount - Total records in dataset
|
|
45
|
+
* @param {(offset: number) => void} props.onPageChange - Handler for page navigation
|
|
46
|
+
* @param {(limit: number) => void} props.onLimitChange - Handler for limit changes
|
|
47
|
+
* @param {number} props.rowCount - Current page row count
|
|
48
|
+
* @returns {JSX.Element} Pagination controls with page selector and limit dropdown
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* // Pagination with 20 rows per page
|
|
52
|
+
* <TablePagination
|
|
53
|
+
* limit={20}
|
|
54
|
+
* offset={0}
|
|
55
|
+
* totalCount={150}
|
|
56
|
+
* rowCount={20}
|
|
57
|
+
* onPageChange={(offset) => setOffset(offset)}
|
|
58
|
+
* onLimitChange={(limit) => setLimit(limit)}
|
|
59
|
+
* />
|
|
60
|
+
*/
|
|
26
61
|
export const TablePagination = (props: PaginationProps) => {
|
|
27
62
|
const { limit, offset, totalCount, onPageChange, onLimitChange, rowCount } =
|
|
28
63
|
props;
|
|
@@ -5,6 +5,37 @@ import {
|
|
|
5
5
|
TypographyProps,
|
|
6
6
|
} from '../../DataDisplay/Typography/Typography';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Props for EmptyIllustration component
|
|
10
|
+
* @typedef {Object} EmptyIllustrationProps
|
|
11
|
+
* @property {string} message - Text message displayed below the empty illustration
|
|
12
|
+
* @property {TypographyProps} [messageProps] - Typography props for styling the message text
|
|
13
|
+
* @property {string} [containerClassName] - CSS class for the container div
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* EmptyIllustration component for displaying empty state messaging
|
|
18
|
+
* Shows decorative empty state icon with customizable message
|
|
19
|
+
*
|
|
20
|
+
* @component
|
|
21
|
+
* @param {Object} props - Component props
|
|
22
|
+
* @param {string} props.message - Text message to display below illustration
|
|
23
|
+
* @param {TypographyProps} [props.messageProps] - Typography styling props (variant, className, etc.)
|
|
24
|
+
* @param {string} [props.containerClassName] - Additional CSS classes for the container
|
|
25
|
+
* @returns {JSX.Element} Empty state illustration with message
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* // Basic empty state
|
|
29
|
+
* <EmptyIllustration message="No data found" />
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* // With custom styling
|
|
33
|
+
* <EmptyIllustration
|
|
34
|
+
* message="No search results match your criteria"
|
|
35
|
+
* messageProps={{ variant: "p", className: "text-gray-600" }}
|
|
36
|
+
* containerClassName="py-12"
|
|
37
|
+
* />
|
|
38
|
+
*/
|
|
8
39
|
export const EmptyIllustration = ({
|
|
9
40
|
message,
|
|
10
41
|
messageProps,
|
|
@@ -4,6 +4,20 @@ import { Button } from '../../Input/Button/Button';
|
|
|
4
4
|
import { Typography } from '../Typography/Typography';
|
|
5
5
|
import './CustomJoyRideStyles.css';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Configuration for individual tour step
|
|
9
|
+
* @typedef {Object} JoyrideStep
|
|
10
|
+
* @property {string} target - CSS selector for the element to highlight
|
|
11
|
+
* @property {string | ReactNode} content - Description or content for the step
|
|
12
|
+
* @property {string} [title] - Title text for the step tooltip
|
|
13
|
+
* @property {'top' | 'bottom' | 'left' | 'right' | 'center' | 'auto'} [placement='auto'] - Tooltip placement relative to target
|
|
14
|
+
* @property {boolean} [disableBeacon] - Hide the beacon pulse animation
|
|
15
|
+
* @property {boolean} [hideCloseButton] - Hide close button in tooltip
|
|
16
|
+
* @property {boolean} [showProgress] - Display progress indicator
|
|
17
|
+
* @property {boolean} [showSkipButton] - Show skip button in tooltip
|
|
18
|
+
* @property {boolean} [spotlightClicks] - Allow clicking inside spotlight area
|
|
19
|
+
* @property {Record<string, any>} [styles] - Custom styles for tooltip
|
|
20
|
+
*/
|
|
7
21
|
interface JoyrideStep {
|
|
8
22
|
target: string;
|
|
9
23
|
content: string | ReactNode;
|
|
@@ -17,6 +31,56 @@ interface JoyrideStep {
|
|
|
17
31
|
styles?: Record<string, any>;
|
|
18
32
|
}
|
|
19
33
|
|
|
34
|
+
/**
|
|
35
|
+
* ReactJoyride component for interactive product tours
|
|
36
|
+
* Provides guided walkthrough of UI elements with customizable steps
|
|
37
|
+
*
|
|
38
|
+
* @component
|
|
39
|
+
* @param {Object} props - Tour configuration
|
|
40
|
+
* @param {JoyrideStep[]} props.steps - Array of tour steps with targets, content, and placement
|
|
41
|
+
* @param {ReactNode} [props.children] - Application content to overlay tour on
|
|
42
|
+
* @param {string} props.tourName - Unique identifier for the tour (for state management)
|
|
43
|
+
* @returns {JSX.Element} Tour overlay component with tour trigger button
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* // Basic product tour
|
|
47
|
+
* <ReactJoyRide
|
|
48
|
+
* tourName="dashboard-tour"
|
|
49
|
+
* steps={[
|
|
50
|
+
* {
|
|
51
|
+
* target: ".logo",
|
|
52
|
+
* title: "Welcome",
|
|
53
|
+
* content: "Welcome to our dashboard!",
|
|
54
|
+
* placement: "bottom"
|
|
55
|
+
* },
|
|
56
|
+
* {
|
|
57
|
+
* target: ".user-menu",
|
|
58
|
+
* title: "Profile",
|
|
59
|
+
* content: "Access your profile and settings here",
|
|
60
|
+
* placement: "left"
|
|
61
|
+
* }
|
|
62
|
+
* ]}
|
|
63
|
+
* >
|
|
64
|
+
* <Dashboard />
|
|
65
|
+
* </ReactJoyRide>
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* // Advanced tour with custom placement and styling
|
|
69
|
+
* <ReactJoyRide
|
|
70
|
+
* tourName="feature-tour"
|
|
71
|
+
* steps={[
|
|
72
|
+
* {
|
|
73
|
+
* target: ".new-feature",
|
|
74
|
+
* title: "New Feature",
|
|
75
|
+
* content: "Check out this exciting new feature",
|
|
76
|
+
* placement: "right",
|
|
77
|
+
* disableBeacon: false
|
|
78
|
+
* }
|
|
79
|
+
* ]}
|
|
80
|
+
* >
|
|
81
|
+
* <App />
|
|
82
|
+
* </ReactJoyRide>
|
|
83
|
+
*/
|
|
20
84
|
export const ReactJoyRide = ({
|
|
21
85
|
steps,
|
|
22
86
|
children,
|
|
@@ -2,6 +2,14 @@ import * as React from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { Separator as ShadcnSaperator } from '@/shadcn-components/DataDisplay/Seperator/Seperator';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Props for Separator component
|
|
7
|
+
* @typedef {Object} SeparatorProps
|
|
8
|
+
* @property {'horizontal' | 'vertical'} [orientation='horizontal'] - Direction of the separator
|
|
9
|
+
* @property {boolean} [decorative=true] - If true, renders as non-semantic element for styling
|
|
10
|
+
* @property {string} [className] - Optional CSS class for custom styling
|
|
11
|
+
* @extends {React.ComponentPropsWithoutRef<typeof ShadcnSaperator>}
|
|
12
|
+
*/
|
|
5
13
|
interface SeparatorProps
|
|
6
14
|
extends React.ComponentPropsWithoutRef<typeof ShadcnSaperator> {
|
|
7
15
|
orientation?: 'horizontal' | 'vertical';
|
|
@@ -9,6 +17,28 @@ interface SeparatorProps
|
|
|
9
17
|
className?: string;
|
|
10
18
|
}
|
|
11
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Separator component for dividing content sections
|
|
22
|
+
* Renders semantic or decorative separator line
|
|
23
|
+
*
|
|
24
|
+
* @component
|
|
25
|
+
* @param {SeparatorProps} props - Separator configuration
|
|
26
|
+
* @param {'horizontal' | 'vertical'} [props.orientation='horizontal'] - Direction of the dividing line
|
|
27
|
+
* @param {boolean} [props.decorative=true] - Whether separator is decorative (non-semantic)
|
|
28
|
+
* @param {string} [props.className] - Additional CSS classes for styling
|
|
29
|
+
* @param {...React.ComponentPropsWithoutRef<typeof ShadcnSaperator>} [props] - Additional separator props
|
|
30
|
+
* @returns {JSX.Element} Separator line element
|
|
31
|
+
* @example
|
|
32
|
+
* // Horizontal separator
|
|
33
|
+
* <Separator />
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* // Vertical separator with custom styling
|
|
37
|
+
* <Separator
|
|
38
|
+
* orientation="vertical"
|
|
39
|
+
* className="h-12"
|
|
40
|
+
* />
|
|
41
|
+
*/
|
|
12
42
|
const Separator = React.forwardRef<
|
|
13
43
|
React.ElementRef<typeof ShadcnSaperator>,
|
|
14
44
|
SeparatorProps
|
|
@@ -29,4 +59,6 @@ const Separator = React.forwardRef<
|
|
|
29
59
|
},
|
|
30
60
|
);
|
|
31
61
|
|
|
62
|
+
Separator.displayName = 'Separator';
|
|
63
|
+
|
|
32
64
|
export { Separator };
|
|
@@ -1,3 +1,23 @@
|
|
|
1
1
|
import { Skeleton as SkeletonUI } from '@/shadcn-components/DataDisplay/Skeleton/Skeleton';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Skeleton component for loading placeholder animations
|
|
5
|
+
* Re-export of shadcn Skeleton component for use in DataDisplay module
|
|
6
|
+
*
|
|
7
|
+
* @component
|
|
8
|
+
* @param {React.ComponentProps<typeof SkeletonUI>} props - Standard HTML div props with className for styling
|
|
9
|
+
* @param {string} [props.className] - CSS classes for sizing and styling the skeleton (e.g., "h-12 w-12 rounded-full")
|
|
10
|
+
* @returns {JSX.Element} Animated skeleton placeholder
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* // Skeleton for profile picture
|
|
14
|
+
* <Skeleton className="h-12 w-12 rounded-full" />
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // Skeleton for content block
|
|
18
|
+
* <div className="space-y-2">
|
|
19
|
+
* <Skeleton className="h-4 w-full" />
|
|
20
|
+
* <Skeleton className="h-4 w-3/4" />
|
|
21
|
+
* </div>
|
|
22
|
+
*/
|
|
3
23
|
export { SkeletonUI as Skeleton };
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { cn } from '@/lib/utils';
|
|
2
2
|
import { Typography, TypographyProps } from '../Typography/Typography';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Props for StatusCard component
|
|
6
|
+
* @typedef {Object} StatusCardProps
|
|
7
|
+
* @property {'green' | 'red' | 'orange' | 'yellow' | 'blue' | 'pink'} color - Color theme for the status card
|
|
8
|
+
* @property {string} text - Text content to display in the status card
|
|
9
|
+
* @property {string} [className] - Optional additional CSS classes
|
|
10
|
+
* @property {TypographyProps['variant']} [typographyVariant='small'] - Typography variant for text styling
|
|
11
|
+
*/
|
|
4
12
|
export type StatusCardProps = {
|
|
5
13
|
color: 'green' | 'red' | 'orange' | 'yellow' | 'blue' | 'pink';
|
|
6
14
|
text: string;
|
|
@@ -8,6 +16,34 @@ export type StatusCardProps = {
|
|
|
8
16
|
typographyVariant?: TypographyProps['variant'];
|
|
9
17
|
};
|
|
10
18
|
|
|
19
|
+
/**
|
|
20
|
+
* StatusCard component for displaying colored status badges
|
|
21
|
+
* Renders status indicators with color-coded backgrounds and text
|
|
22
|
+
*
|
|
23
|
+
* @component
|
|
24
|
+
* @param {StatusCardProps} props - StatusCard configuration
|
|
25
|
+
* @param {'green' | 'red' | 'orange' | 'yellow' | 'blue' | 'pink'} props.color - Status color (determines styling)
|
|
26
|
+
* @param {string} props.text - Status text to display
|
|
27
|
+
* @param {string} [props.className] - Additional CSS classes for custom styling
|
|
28
|
+
* @param {TypographyProps['variant']} [props.typographyVariant='small'] - Typography variant (h1-h6, p, small, etc.)
|
|
29
|
+
* @returns {JSX.Element} Colored status badge
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* // Active status
|
|
33
|
+
* <StatusCard
|
|
34
|
+
* color="green"
|
|
35
|
+
* text="Active"
|
|
36
|
+
* />
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* // Error status with custom styling
|
|
40
|
+
* <StatusCard
|
|
41
|
+
* color="red"
|
|
42
|
+
* text="Error"
|
|
43
|
+
* typographyVariant="p"
|
|
44
|
+
* className="font-bold"
|
|
45
|
+
* />
|
|
46
|
+
*/
|
|
11
47
|
export const StatusCard = ({
|
|
12
48
|
color,
|
|
13
49
|
text,
|