@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
package/dist/styles.css
CHANGED
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
--color-pink-400: oklch(71.8% 0.202 349.761);
|
|
47
47
|
--color-pink-700: oklch(52.5% 0.223 3.958);
|
|
48
48
|
--color-pink-950: oklch(28.4% 0.109 3.907);
|
|
49
|
+
--color-gray-50: oklch(98.5% 0.002 247.839);
|
|
49
50
|
--color-gray-200: oklch(92.8% 0.006 264.531);
|
|
50
51
|
--color-gray-300: oklch(87.2% 0.01 258.338);
|
|
51
52
|
--color-gray-500: oklch(55.1% 0.027 264.364);
|
|
@@ -334,6 +335,9 @@
|
|
|
334
335
|
.relative {
|
|
335
336
|
position: relative;
|
|
336
337
|
}
|
|
338
|
+
.static {
|
|
339
|
+
position: static;
|
|
340
|
+
}
|
|
337
341
|
.inset-0 {
|
|
338
342
|
inset: calc(var(--spacing) * 0);
|
|
339
343
|
}
|
|
@@ -412,9 +416,6 @@
|
|
|
412
416
|
.left-\[50\%\] {
|
|
413
417
|
left: 50%;
|
|
414
418
|
}
|
|
415
|
-
.z-1 {
|
|
416
|
-
z-index: 1;
|
|
417
|
-
}
|
|
418
419
|
.z-50 {
|
|
419
420
|
z-index: 50;
|
|
420
421
|
}
|
|
@@ -424,12 +425,6 @@
|
|
|
424
425
|
.z-\[1000\] {
|
|
425
426
|
z-index: 1000;
|
|
426
427
|
}
|
|
427
|
-
.z-\[1299\] {
|
|
428
|
-
z-index: 1299;
|
|
429
|
-
}
|
|
430
|
-
.z-\[1300\] {
|
|
431
|
-
z-index: 1300;
|
|
432
|
-
}
|
|
433
428
|
.z-\[1500\] {
|
|
434
429
|
z-index: 1500;
|
|
435
430
|
}
|
|
@@ -804,6 +799,9 @@
|
|
|
804
799
|
.min-h-\[60px\] {
|
|
805
800
|
min-height: 60px;
|
|
806
801
|
}
|
|
802
|
+
.min-h-screen {
|
|
803
|
+
min-height: 100vh;
|
|
804
|
+
}
|
|
807
805
|
.w-\(--cell-size\) {
|
|
808
806
|
width: var(--cell-size);
|
|
809
807
|
}
|
|
@@ -1380,6 +1378,9 @@
|
|
|
1380
1378
|
.border-\(--color-border\) {
|
|
1381
1379
|
border-color: var(--color-border);
|
|
1382
1380
|
}
|
|
1381
|
+
.border-blue-500 {
|
|
1382
|
+
border-color: var(--color-blue-500);
|
|
1383
|
+
}
|
|
1383
1384
|
.border-blue-700 {
|
|
1384
1385
|
border-color: var(--color-blue-700);
|
|
1385
1386
|
}
|
|
@@ -1467,12 +1468,18 @@
|
|
|
1467
1468
|
.bg-foreground {
|
|
1468
1469
|
background-color: var(--foreground);
|
|
1469
1470
|
}
|
|
1471
|
+
.bg-gray-50 {
|
|
1472
|
+
background-color: var(--color-gray-50);
|
|
1473
|
+
}
|
|
1470
1474
|
.bg-gray-200 {
|
|
1471
1475
|
background-color: var(--color-gray-200);
|
|
1472
1476
|
}
|
|
1473
1477
|
.bg-green-50 {
|
|
1474
1478
|
background-color: var(--color-green-50);
|
|
1475
1479
|
}
|
|
1480
|
+
.bg-green-500 {
|
|
1481
|
+
background-color: var(--color-green-500);
|
|
1482
|
+
}
|
|
1476
1483
|
.bg-green-background {
|
|
1477
1484
|
background-color: var(--green-background);
|
|
1478
1485
|
}
|
|
@@ -1542,6 +1549,9 @@
|
|
|
1542
1549
|
.bg-transparent {
|
|
1543
1550
|
background-color: transparent;
|
|
1544
1551
|
}
|
|
1552
|
+
.bg-white {
|
|
1553
|
+
background-color: var(--color-white);
|
|
1554
|
+
}
|
|
1545
1555
|
.bg-yellow-50 {
|
|
1546
1556
|
background-color: var(--color-yellow-50);
|
|
1547
1557
|
}
|
|
@@ -1653,6 +1663,9 @@
|
|
|
1653
1663
|
.py-8 {
|
|
1654
1664
|
padding-block: calc(var(--spacing) * 8);
|
|
1655
1665
|
}
|
|
1666
|
+
.py-12 {
|
|
1667
|
+
padding-block: calc(var(--spacing) * 12);
|
|
1668
|
+
}
|
|
1656
1669
|
.py-\[0\.2rem\] {
|
|
1657
1670
|
padding-block: 0.2rem;
|
|
1658
1671
|
}
|
|
@@ -1896,6 +1909,9 @@
|
|
|
1896
1909
|
.text-highlight-yellow {
|
|
1897
1910
|
color: var(--highlight-yellow);
|
|
1898
1911
|
}
|
|
1912
|
+
.text-muted {
|
|
1913
|
+
color: var(--muted);
|
|
1914
|
+
}
|
|
1899
1915
|
.text-muted-foreground {
|
|
1900
1916
|
color: var(--muted-foreground);
|
|
1901
1917
|
}
|
|
@@ -3673,6 +3689,11 @@
|
|
|
3673
3689
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
3674
3690
|
}
|
|
3675
3691
|
}
|
|
3692
|
+
.\[\&\>button\]\:hidden {
|
|
3693
|
+
&>button {
|
|
3694
|
+
display: none;
|
|
3695
|
+
}
|
|
3696
|
+
}
|
|
3676
3697
|
.\[\&\>div\]\:\!aspect-auto {
|
|
3677
3698
|
&>div {
|
|
3678
3699
|
aspect-ratio: auto !important;
|
package/package.json
CHANGED
|
@@ -8,6 +8,30 @@ interface NoItemFoundProps {
|
|
|
8
8
|
description: ReactNode;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* ComingSoon component displays a "Coming Soon" placeholder page.
|
|
13
|
+
*
|
|
14
|
+
* This component renders a centered container with an SVG illustration,
|
|
15
|
+
* a title, and a description message to inform users that a feature or page
|
|
16
|
+
* is not yet available.
|
|
17
|
+
*
|
|
18
|
+
* @component
|
|
19
|
+
* @param {Object} props - The component props
|
|
20
|
+
* @param {string} [props.title='Coming Soon'] - The title text to display. Defaults to "Coming Soon"
|
|
21
|
+
* @param {ReactNode} props.description - The description or message to display below the title
|
|
22
|
+
* @returns {React.ReactElement} A centered layout with SVG, title, and description
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* // Basic usage
|
|
26
|
+
* <ComingSoon description="This feature will be available soon!" />
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* // With custom title
|
|
30
|
+
* <ComingSoon
|
|
31
|
+
* title="New Dashboard"
|
|
32
|
+
* description="We're working hard to bring you an improved dashboard experience."
|
|
33
|
+
* />
|
|
34
|
+
*/
|
|
11
35
|
export const ComingSoon = ({
|
|
12
36
|
title = 'Coming Soon',
|
|
13
37
|
description,
|
|
@@ -2,6 +2,26 @@ import { Svgs } from '../../../assets/images/svg';
|
|
|
2
2
|
import { Typography } from '../../DataDisplay/Typography/Typography';
|
|
3
3
|
import { Button } from '../../Input/Button/Button';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* InternalServerError component displays a 500 server error page.
|
|
7
|
+
*
|
|
8
|
+
* This component renders a centered error page with an SVG illustration,
|
|
9
|
+
* error message, and a "Try Again" button that triggers the error boundary reset.
|
|
10
|
+
* Typically used within an error boundary to handle unexpected server errors.
|
|
11
|
+
*
|
|
12
|
+
* @component
|
|
13
|
+
* @param {Object} props - The component props
|
|
14
|
+
* @param {Function} props.resetBoundary - Callback function to reset the error boundary and retry the operation
|
|
15
|
+
* @returns {React.ReactElement} A centered error page with icon, message, and retry button
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* // Usage within an error boundary
|
|
19
|
+
* <InternalServerError resetBoundary={() => window.location.reload()} />
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* // Usage with custom reset logic
|
|
23
|
+
* <InternalServerError resetBoundary={handleRetry} />
|
|
24
|
+
*/
|
|
5
25
|
export const InternalServerError = ({ resetBoundary }: any) => {
|
|
6
26
|
return (
|
|
7
27
|
<div className="flex w-full flex-col items-center justify-center">
|
|
@@ -2,6 +2,26 @@ import { Svgs } from '../../../assets/images/svg';
|
|
|
2
2
|
import { Typography } from '../../DataDisplay/Typography/Typography';
|
|
3
3
|
import { Button } from '../../Input/Button/Button';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* NoInterneConnection component displays a "No Internet Connection" error page.
|
|
7
|
+
*
|
|
8
|
+
* This component renders a centered error page with an SVG illustration,
|
|
9
|
+
* a message informing the user of a lost internet connection, and a "Try Again" button.
|
|
10
|
+
* Useful for displaying when the application detects no network connectivity.
|
|
11
|
+
*
|
|
12
|
+
* @component
|
|
13
|
+
* @param {Object} props - The component props
|
|
14
|
+
* @param {Function} props.resetBoundary - Callback function to retry the connection or operation
|
|
15
|
+
* @returns {React.ReactElement} A centered offline error page with icon, message, and retry button
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* // Display when network connection is lost
|
|
19
|
+
* <NoInterneConnection resetBoundary={handleRetry} />
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* // With navigation reset
|
|
23
|
+
* <NoInterneConnection resetBoundary={() => window.location.reload()} />
|
|
24
|
+
*/
|
|
5
25
|
export const NoInterneConnection = ({ resetBoundary }: any) => {
|
|
6
26
|
return (
|
|
7
27
|
<div className="flex w-full flex-col items-center justify-center">
|
|
@@ -10,6 +10,34 @@ interface NoItemFoundProps {
|
|
|
10
10
|
width?: string | number;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* NoItemFound component displays a "No Items Found" placeholder page.
|
|
15
|
+
*
|
|
16
|
+
* This component renders a centered container with an empty state SVG illustration,
|
|
17
|
+
* a title, and a description. The SVG size can be customized with height and width props.
|
|
18
|
+
* Commonly used to indicate when a list, search results, or data collection is empty.
|
|
19
|
+
*
|
|
20
|
+
* @component
|
|
21
|
+
* @param {Object} props - The component props
|
|
22
|
+
* @param {string} [props.title='No Items Found'] - The title text to display. Defaults to "No Items Found"
|
|
23
|
+
* @param {ReactNode} props.description - The description or message to display below the title
|
|
24
|
+
* @param {string | number} [props.height] - The height of the SVG illustration
|
|
25
|
+
* @param {string | number} [props.width] - The width of the SVG illustration
|
|
26
|
+
* @returns {React.ReactElement} A centered layout with SVG, title, and description
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* // Basic usage
|
|
30
|
+
* <NoItemFound description="Try adjusting your search criteria." />
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* // With custom title and SVG dimensions
|
|
34
|
+
* <NoItemFound
|
|
35
|
+
* title="No Results"
|
|
36
|
+
* description="Your search didn't return any results."
|
|
37
|
+
* width={200}
|
|
38
|
+
* height={200}
|
|
39
|
+
* />
|
|
40
|
+
*/
|
|
13
41
|
export const NoItemFound = ({
|
|
14
42
|
title = 'No Items Found',
|
|
15
43
|
description,
|
|
@@ -1,6 +1,27 @@
|
|
|
1
1
|
import { Svgs } from '../../../assets/images/svg';
|
|
2
2
|
import { Typography } from '../../DataDisplay/Typography/Typography';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* PageNotFound component displays a 404 "Page Not Found" error page.
|
|
6
|
+
*
|
|
7
|
+
* This component renders a centered error page with an SVG illustration
|
|
8
|
+
* and informative messages to indicate that the requested page does not exist.
|
|
9
|
+
* Typically used as a fallback for invalid or missing routes.
|
|
10
|
+
*
|
|
11
|
+
* @component
|
|
12
|
+
* @returns {React.ReactElement} A centered 404 error page with icon and messages
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* // Basic usage in routing
|
|
16
|
+
* <Route path="*" element={<PageNotFound />} />
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* // As a fallback route
|
|
20
|
+
* <Routes>
|
|
21
|
+
* <Route path="/" element={<Home />} />
|
|
22
|
+
* <Route path="*" element={<PageNotFound />} />
|
|
23
|
+
* </Routes>
|
|
24
|
+
*/
|
|
4
25
|
export const PageNotFound = () => {
|
|
5
26
|
return (
|
|
6
27
|
<div className="flex w-full flex-col items-center justify-center">
|
|
@@ -1,6 +1,27 @@
|
|
|
1
1
|
import { Svgs } from '../../../assets/images/svg';
|
|
2
2
|
import { Typography } from '../../DataDisplay/Typography/Typography';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* ResourceNotFound component displays a "Resource Not Found" error page.
|
|
6
|
+
*
|
|
7
|
+
* This component renders a centered error page with an SVG illustration
|
|
8
|
+
* and a custom message. Typically used when a specific resource (e.g., user, post, item)
|
|
9
|
+
* cannot be found in the system.
|
|
10
|
+
*
|
|
11
|
+
* @component
|
|
12
|
+
* @param {any} message - The error message or description to display. Can be any ReactNode type
|
|
13
|
+
* @returns {React.ReactElement} A centered error page with icon and custom message
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* // Basic usage
|
|
17
|
+
* <ResourceNotFound message="The user profile you're looking for does not exist." />
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* // With JSX message
|
|
21
|
+
* <ResourceNotFound
|
|
22
|
+
* message={<span>The requested <strong>item</strong> was not found in the database.</span>}
|
|
23
|
+
* />
|
|
24
|
+
*/
|
|
4
25
|
export const ResourceNotFound = (message: any) => {
|
|
5
26
|
return (
|
|
6
27
|
<div className="flex w-full flex-col items-center justify-center">
|
|
@@ -2,6 +2,37 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { Svgs } from '../../../assets/images/svg';
|
|
3
3
|
import { Typography } from '../../DataDisplay/Typography/Typography';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* UnAuthorized component displays an "Unauthorized Access" error page.
|
|
7
|
+
*
|
|
8
|
+
* This component renders a centered error page with an SVG illustration,
|
|
9
|
+
* a message indicating the user must be logged in, and an optional login component.
|
|
10
|
+
* Typically used to protect routes that require authentication.
|
|
11
|
+
*
|
|
12
|
+
* @component
|
|
13
|
+
* @param {Object} props - The component props
|
|
14
|
+
* @param {ReactNode} [props.component] - Optional React element to render below the messages (e.g., a login form or button)
|
|
15
|
+
* @returns {React.ReactElement} A centered authorization error page with icon, messages, and optional component
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* // Basic usage without additional component
|
|
19
|
+
* <UnAuthorized />
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* // With a login button
|
|
23
|
+
* <UnAuthorized component={<LoginButton />} />
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* // With a full login form
|
|
27
|
+
* <UnAuthorized
|
|
28
|
+
* component={
|
|
29
|
+
* <form>
|
|
30
|
+
* <input type="email" placeholder="Email" />
|
|
31
|
+
* <button>Sign In</button>
|
|
32
|
+
* </form>
|
|
33
|
+
* }
|
|
34
|
+
* />
|
|
35
|
+
*/
|
|
5
36
|
export const UnAuthorized = ({ component }: { component?: ReactNode }) => {
|
|
6
37
|
return (
|
|
7
38
|
<div className="flex w-full flex-col items-center justify-center">
|
|
@@ -2,6 +2,20 @@ import { FC, MouseEvent } from 'react';
|
|
|
2
2
|
import { CampxFullLogoIcon } from './IconComponents/CampxFullLogoIcon';
|
|
3
3
|
import { CampxIcon } from './IconComponents/CampxIcon';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* IconProps interface defines common properties for icon components.
|
|
7
|
+
*
|
|
8
|
+
* Provides a standardized set of props for customizing icon appearance
|
|
9
|
+
* and behavior across the application.
|
|
10
|
+
*
|
|
11
|
+
* @interface IconProps
|
|
12
|
+
* @property {number} [size] - The size of the icon in pixels
|
|
13
|
+
* @property {string} [color] - The color of the icon (CSS color value)
|
|
14
|
+
* @property {boolean} [disabled] - Whether the icon is in a disabled state
|
|
15
|
+
* @property {string} [hoverColor] - The color of the icon on hover (CSS color value)
|
|
16
|
+
* @property {string} [backgroundColor] - The background color behind the icon (CSS color value)
|
|
17
|
+
* @property {Function} [onClick] - Callback function triggered when the icon is clicked
|
|
18
|
+
*/
|
|
5
19
|
export interface IconProps {
|
|
6
20
|
size?: number;
|
|
7
21
|
color?: string;
|
|
@@ -11,13 +25,53 @@ export interface IconProps {
|
|
|
11
25
|
onClick?: (event: MouseEvent<Element>) => void;
|
|
12
26
|
}
|
|
13
27
|
|
|
28
|
+
/**
|
|
29
|
+
* IconComponent type represents a React functional component that accepts IconProps.
|
|
30
|
+
*
|
|
31
|
+
* Used as the base type for icon components throughout the application.
|
|
32
|
+
*
|
|
33
|
+
* @typedef {FC<IconProps>} IconComponent
|
|
34
|
+
*/
|
|
14
35
|
export type IconComponent = FC<IconProps>;
|
|
15
|
-
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* IconsType interface defines the shape of the Icons object.
|
|
39
|
+
*
|
|
40
|
+
* Maps icon names to their corresponding component implementations.
|
|
41
|
+
*
|
|
42
|
+
* @interface IconsType
|
|
43
|
+
* @property {IconComponent} CampxFullLogoIcon - The full Campx logo with text icon component
|
|
44
|
+
* @property {IconComponent} CampxIcon - The Campx logo mark icon component
|
|
45
|
+
*/
|
|
16
46
|
export type IconsType = {
|
|
17
47
|
CampxFullLogoIcon: IconComponent;
|
|
18
48
|
CampxIcon: IconComponent;
|
|
19
49
|
};
|
|
20
50
|
|
|
51
|
+
/**
|
|
52
|
+
* Icons object exports all available icon components.
|
|
53
|
+
*
|
|
54
|
+
* Provides a centralized registry of all icon components used throughout the application.
|
|
55
|
+
* Each icon can be accessed as a property of this object and used as a React component.
|
|
56
|
+
*
|
|
57
|
+
* @constant
|
|
58
|
+
* @type {IconsType}
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* // Use individual icons
|
|
62
|
+
* <Icons.CampxIcon size={24} />
|
|
63
|
+
* <Icons.CampxFullLogoIcon />
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* // Use in a component
|
|
67
|
+
* const MyComponent = () => {
|
|
68
|
+
* return (
|
|
69
|
+
* <div>
|
|
70
|
+
* <Icons.CampxIcon size={32} color="#E43341" />
|
|
71
|
+
* </div>
|
|
72
|
+
* );
|
|
73
|
+
* };
|
|
74
|
+
*/
|
|
21
75
|
export const Icons: IconsType = {
|
|
22
76
|
CampxFullLogoIcon,
|
|
23
77
|
CampxIcon,
|
|
@@ -12,6 +12,13 @@ export type BarChartVariant = 'vertical' | 'horizontal';
|
|
|
12
12
|
|
|
13
13
|
export type BarChartData = HorizontalBarChartData | VerticalBarChartData;
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* Props for the BarChart component
|
|
17
|
+
* Combines props from both VerticalBarChart and HorizontalBarChart
|
|
18
|
+
* @typedef {Object} BarChartProps
|
|
19
|
+
* @property {BarChartData[]} data - Array of data objects to display in the chart
|
|
20
|
+
* @property {BarChartVariant} [variant='vertical'] - Orientation of the bars ('vertical' or 'horizontal')
|
|
21
|
+
*/
|
|
15
22
|
export interface BarChartProps
|
|
16
23
|
extends Omit<VerticalBarChartProps, 'data'>,
|
|
17
24
|
Omit<HorizontalBarChartProps, 'data' | keyof VerticalBarChartProps> {
|
|
@@ -19,6 +26,37 @@ export interface BarChartProps
|
|
|
19
26
|
variant?: BarChartVariant;
|
|
20
27
|
}
|
|
21
28
|
|
|
29
|
+
/**
|
|
30
|
+
* BarChart Component
|
|
31
|
+
* A flexible bar chart component that supports both vertical and horizontal orientations.
|
|
32
|
+
* Delegates rendering to either VerticalBarChart or HorizontalBarChart based on the variant prop.
|
|
33
|
+
*
|
|
34
|
+
* @component
|
|
35
|
+
* @param {BarChartProps} props - The props object
|
|
36
|
+
* @param {BarChartData[]} props.data - Array of data objects containing chart values
|
|
37
|
+
* @param {BarChartVariant} [props.variant='vertical'] - Chart orientation: 'vertical' for vertical bars or 'horizontal' for horizontal bars
|
|
38
|
+
* @returns {React.ReactElement} Rendered bar chart component
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* const data = [
|
|
42
|
+
* { month: 'January', sales: 400, revenue: 2400 },
|
|
43
|
+
* { month: 'February', sales: 300, revenue: 1398 }
|
|
44
|
+
* ];
|
|
45
|
+
* const config = {
|
|
46
|
+
* sales: { label: 'Sales', color: '#2563eb' },
|
|
47
|
+
* revenue: { label: 'Revenue', color: '#7c3aed' }
|
|
48
|
+
* };
|
|
49
|
+
*
|
|
50
|
+
* return (
|
|
51
|
+
* <BarChart
|
|
52
|
+
* data={data}
|
|
53
|
+
* variant="vertical"
|
|
54
|
+
* dataKeys={['sales', 'revenue']}
|
|
55
|
+
* xAxisKey="month"
|
|
56
|
+
* config={config}
|
|
57
|
+
* />
|
|
58
|
+
* );
|
|
59
|
+
*/
|
|
22
60
|
const BarChart: React.FC<BarChartProps> = ({
|
|
23
61
|
variant = 'vertical',
|
|
24
62
|
...props
|
|
@@ -16,10 +16,47 @@ import type {
|
|
|
16
16
|
TitleProps,
|
|
17
17
|
} from '../types/types';
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* Data object for HorizontalBarChart
|
|
21
|
+
* @typedef {Object} HorizontalBarChartData
|
|
22
|
+
* @property {string|number} [key] - Dynamic data properties
|
|
23
|
+
*/
|
|
19
24
|
export interface HorizontalBarChartData {
|
|
20
25
|
[key: string]: string | number;
|
|
21
26
|
}
|
|
22
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Props for the HorizontalBarChart component
|
|
30
|
+
* @typedef {Object} HorizontalBarChartProps
|
|
31
|
+
* @property {HorizontalBarChartData[]} data - Array of data objects to display
|
|
32
|
+
* @property {string[]} dataKeys - Array of keys from data objects to visualize as bars
|
|
33
|
+
* @property {string} xAxisKey - The key to use for Y-axis (category) labels
|
|
34
|
+
* @property {ChartConfig} config - Chart configuration with color mappings for data keys
|
|
35
|
+
* @property {number} [height] - Chart height in pixels (auto-calculated if not provided)
|
|
36
|
+
* @property {MarginProps} [margin={top: 20, right: 30, bottom: 20, left: -20}] - Chart margins
|
|
37
|
+
* @property {number} [barSize=32] - Height of each bar in pixels
|
|
38
|
+
* @property {number|number[]} [radius=5] - Border radius for bars (single value or [top-left, top-right, bottom-right, bottom-left])
|
|
39
|
+
* @property {string} [stackId] - ID for stacking multiple bars together
|
|
40
|
+
* @property {boolean} [hideXAxis=false] - Whether to hide the X-axis
|
|
41
|
+
* @property {number} [yAxisWidth=100] - Width allocated for Y-axis labels
|
|
42
|
+
* @property {Function} [yAxisTickFormatter] - Function to format Y-axis tick labels
|
|
43
|
+
* @property {Function} [xAxisTickFormatter] - Function to format X-axis tick labels
|
|
44
|
+
* @property {boolean} [showTooltip=true] - Whether to show tooltip on hover
|
|
45
|
+
* @property {boolean|object} [tooltipCursor=false] - Tooltip cursor appearance
|
|
46
|
+
* @property {boolean} [hideTooltipLabel=true] - Whether to hide the label in tooltip
|
|
47
|
+
* @property {'line'|'dot'|'dashed'} [tooltipIndicator='line'] - Tooltip indicator style
|
|
48
|
+
* @property {LegendProps} [legend] - Legend configuration props
|
|
49
|
+
* @property {boolean} [showLegend=false] - Whether to display the legend
|
|
50
|
+
* @property {string} [title] - Chart title text
|
|
51
|
+
* @property {TitleProps} [titleProps={variant: 'h3', className: ''}] - Title styling props
|
|
52
|
+
* @property {string} [subtitle] - Chart subtitle text
|
|
53
|
+
* @property {SubTitleProps} [subtitleProps={variant: 'muted', className: ''}] - Subtitle styling props
|
|
54
|
+
* @property {string} [className] - CSS class for the container
|
|
55
|
+
* @property {Function} [onBarClick] - Callback function when a bar is clicked
|
|
56
|
+
* @property {number} [animationDuration=750] - Duration of animations in milliseconds
|
|
57
|
+
* @property {'ease'|'ease-in'|'ease-out'|'ease-in-out'|'linear'} [animationEasing='ease-in-out'] - Easing function for animations
|
|
58
|
+
* @property {boolean} [accessibilityLayer=true] - Enable accessibility features
|
|
59
|
+
*/
|
|
23
60
|
export interface HorizontalBarChartProps {
|
|
24
61
|
// Core data
|
|
25
62
|
data: HorizontalBarChartData[];
|
|
@@ -74,6 +111,62 @@ export interface HorizontalBarChartProps {
|
|
|
74
111
|
accessibilityLayer?: boolean;
|
|
75
112
|
}
|
|
76
113
|
|
|
114
|
+
/**
|
|
115
|
+
* HorizontalBarChart Component
|
|
116
|
+
* Displays data as horizontal bars with full customization support for axes, tooltips, legends, and animations.
|
|
117
|
+
* The chart dynamically calculates height based on data length if height is not provided.
|
|
118
|
+
*
|
|
119
|
+
* @component
|
|
120
|
+
* @param {HorizontalBarChartProps} props - The component props
|
|
121
|
+
* @param {HorizontalBarChartData[]} props.data - Array of data objects to display
|
|
122
|
+
* @param {string[]} props.dataKeys - Keys from data objects to visualize
|
|
123
|
+
* @param {string} props.xAxisKey - The key for Y-axis category labels
|
|
124
|
+
* @param {ChartConfig} props.config - Chart color and display configuration
|
|
125
|
+
* @param {number} [props.height] - Chart height; auto-calculated if not provided
|
|
126
|
+
* @param {MarginProps} [props.margin] - Chart margin spacing
|
|
127
|
+
* @param {number} [props.barSize] - Height of each bar in pixels
|
|
128
|
+
* @param {number|number[]} [props.radius] - Border radius for bar corners
|
|
129
|
+
* @param {string} [props.stackId] - ID for stacked bars
|
|
130
|
+
* @param {boolean} [props.hideXAxis] - Hide/show the X-axis
|
|
131
|
+
* @param {number} [props.yAxisWidth] - Width of Y-axis label area
|
|
132
|
+
* @param {Function} [props.yAxisTickFormatter] - Custom Y-axis label formatter
|
|
133
|
+
* @param {Function} [props.xAxisTickFormatter] - Custom X-axis label formatter
|
|
134
|
+
* @param {boolean} [props.showTooltip] - Show/hide tooltip
|
|
135
|
+
* @param {boolean|object} [props.tooltipCursor] - Tooltip cursor style
|
|
136
|
+
* @param {boolean} [props.hideTooltipLabel] - Hide/show tooltip label
|
|
137
|
+
* @param {'line'|'dot'|'dashed'} [props.tooltipIndicator] - Tooltip indicator style
|
|
138
|
+
* @param {LegendProps} [props.legend] - Legend configuration
|
|
139
|
+
* @param {boolean} [props.showLegend] - Show/hide legend
|
|
140
|
+
* @param {string} [props.title] - Chart title
|
|
141
|
+
* @param {TitleProps} [props.titleProps] - Title styling
|
|
142
|
+
* @param {string} [props.subtitle] - Chart subtitle
|
|
143
|
+
* @param {SubTitleProps} [props.subtitleProps] - Subtitle styling
|
|
144
|
+
* @param {string} [props.className] - Container CSS class
|
|
145
|
+
* @param {Function} [props.onBarClick] - Click handler callback
|
|
146
|
+
* @param {number} [props.animationDuration] - Animation duration in ms
|
|
147
|
+
* @param {'ease'|'ease-in'|'ease-out'|'ease-in-out'|'linear'} [props.animationEasing] - Animation easing
|
|
148
|
+
* @param {boolean} [props.accessibilityLayer] - Enable accessibility features
|
|
149
|
+
* @returns {React.ReactElement} Rendered horizontal bar chart
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* const data = [
|
|
153
|
+
* { category: 'Category A', value: 120 },
|
|
154
|
+
* { category: 'Category B', value: 200 }
|
|
155
|
+
* ];
|
|
156
|
+
* const config = {
|
|
157
|
+
* value: { label: 'Value', color: '#3b82f6' }
|
|
158
|
+
* };
|
|
159
|
+
*
|
|
160
|
+
* return (
|
|
161
|
+
* <HorizontalBarChart
|
|
162
|
+
* data={data}
|
|
163
|
+
* dataKeys={['value']}
|
|
164
|
+
* xAxisKey="category"
|
|
165
|
+
* config={config}
|
|
166
|
+
* title="Sales by Category"
|
|
167
|
+
* />
|
|
168
|
+
* );
|
|
169
|
+
*/
|
|
77
170
|
const HorizontalBarChart: React.FC<HorizontalBarChartProps> = ({
|
|
78
171
|
data,
|
|
79
172
|
dataKeys,
|