@campxdev/react-blueprint 3.0.0-alpha.5 → 3.0.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/types/src/components/Assets/ErrorPages/ComingSoon.d.ts +24 -0
- package/dist/cjs/types/src/components/Assets/ErrorPages/InternalServerError.d.ts +20 -0
- package/dist/cjs/types/src/components/Assets/ErrorPages/NoInternetConnection.d.ts +20 -0
- package/dist/cjs/types/src/components/Assets/ErrorPages/NoItemFound.d.ts +28 -0
- package/dist/cjs/types/src/components/Assets/ErrorPages/PageNotFound.d.ts +21 -0
- package/dist/cjs/types/src/components/Assets/ErrorPages/ResourceNotFound.d.ts +21 -0
- package/dist/cjs/types/src/components/Assets/ErrorPages/UnAuthorized.d.ts +31 -0
- package/dist/cjs/types/src/components/Assets/Icons/Icons.d.ts +54 -0
- package/dist/cjs/types/src/components/Charts/BarChart/BarChart.d.ts +38 -0
- package/dist/cjs/types/src/components/Charts/BarChart/HorizontalBarChart.d.ts +93 -0
- package/dist/cjs/types/src/components/Charts/BarChart/VerticalBarChart.d.ts +110 -0
- package/dist/cjs/types/src/components/Charts/LineChart/LineChart.d.ts +89 -0
- package/dist/cjs/types/src/components/Charts/PieChart/PieChart.d.ts +86 -0
- package/dist/cjs/types/src/components/Charts/TreeMap/TreeMap.d.ts +74 -0
- package/dist/cjs/types/src/components/DataDisplay/Accordion/Accordion.d.ts +54 -0
- package/dist/cjs/types/src/components/DataDisplay/ActivityLogView/ActivityLogFilter.d.ts +35 -0
- package/dist/cjs/types/src/components/DataDisplay/ActivityLogView/ActivityLogView.d.ts +78 -0
- package/dist/cjs/types/src/components/DataDisplay/Avatar/Avatar.d.ts +40 -0
- package/dist/cjs/types/src/components/DataDisplay/Chip/Chip.d.ts +28 -0
- package/dist/cjs/types/src/components/DataDisplay/Chips/Chips.d.ts +55 -0
- package/dist/cjs/types/src/components/DataDisplay/DataTable/DataTable.d.ts +96 -1
- package/dist/cjs/types/src/components/DataDisplay/DataTable/components/CardsView.d.ts +14 -2
- package/dist/cjs/types/src/components/DataDisplay/DataTable/components/TablePagination.d.ts +35 -0
- package/dist/cjs/types/src/components/DataDisplay/EmptyIllustration/EmptyIllustration.d.ts +30 -0
- package/dist/cjs/types/src/components/DataDisplay/ReactJoyride/ReactJoyride.d.ts +64 -0
- package/dist/cjs/types/src/components/DataDisplay/Separator/Separator.d.ts +30 -0
- package/dist/cjs/types/src/components/DataDisplay/Skeleton/Skeleton.d.ts +20 -0
- package/dist/cjs/types/src/components/DataDisplay/StatusCard/StatusCard.d.ts +36 -0
- package/dist/cjs/types/src/components/DataDisplay/Timeline/Timeline.d.ts +58 -0
- package/dist/cjs/types/src/components/DataDisplay/Typography/Typography.d.ts +25 -0
- package/dist/cjs/types/src/components/Feedback/Alert/Alert.d.ts +31 -0
- package/dist/cjs/types/src/components/Feedback/Snackbar/Snackbar.d.ts +54 -0
- package/dist/cjs/types/src/components/Feedback/Spinner/Spinner.d.ts +15 -0
- package/dist/cjs/types/src/components/Feedback/Tooltip/Tooltip.d.ts +54 -0
- package/dist/cjs/types/src/components/Input/Button/Button.d.ts +26 -0
- package/dist/cjs/types/src/components/Input/DatePicker/DatePicker.d.ts +41 -0
- package/dist/cjs/types/src/components/Input/DateTimePicker/DateTimePicker.d.ts +42 -0
- package/dist/cjs/types/src/components/Input/FileUpload/FileUpload.d.ts +41 -0
- package/dist/cjs/types/src/components/Input/FormActions/FormActions.d.ts +37 -0
- package/dist/cjs/types/src/components/Input/FormControlWrapper/FormControlWrapper.d.ts +31 -0
- package/dist/cjs/types/src/components/Input/FormWrapper/FormWrapper.d.ts +20 -0
- package/dist/cjs/types/src/components/Input/HelpButton/HelpButton.d.ts +14 -0
- package/dist/cjs/types/src/components/Input/IconButtons/IconButtons/DeleteButton.d.ts +16 -0
- package/dist/cjs/types/src/components/Input/IconButtons/IconButtons/EditButton.d.ts +16 -0
- package/dist/cjs/types/src/components/Input/IconButtons/IconButtons/RedirectButton.d.ts +16 -0
- package/dist/cjs/types/src/components/Input/IconButtons/IconButtons/ViewButton.d.ts +16 -0
- package/dist/cjs/types/src/components/Input/IconButtons/IconButtons.d.ts +18 -0
- package/dist/cjs/types/src/components/Input/LabelWrapper/LabelWrapper.d.ts +26 -0
- package/dist/cjs/types/src/components/Input/MultiCheckBox/MultiCheckBox.d.ts +34 -0
- package/dist/cjs/types/src/components/Input/MultiSelect/MultiSelect.d.ts +40 -0
- package/dist/cjs/types/src/components/Input/OtpInput/OtpInput.d.ts +29 -0
- package/dist/cjs/types/src/components/Input/PasswordField/PasswordField.d.ts +34 -0
- package/dist/cjs/types/src/components/Input/RadioGroup/RadioGroup.d.ts +38 -0
- package/dist/cjs/types/src/components/Input/SearchBar/SearchBar.d.ts +26 -0
- package/dist/cjs/types/src/components/Input/Select/Select.d.ts +32 -0
- package/dist/cjs/types/src/components/Input/SingleCheckBox/SingleCheckBox.d.ts +29 -0
- package/dist/cjs/types/src/components/Input/SingleSelect/SingleSelect.d.ts +40 -0
- package/dist/cjs/types/src/components/Input/Switch/Switch.d.ts +23 -0
- package/dist/cjs/types/src/components/Input/Tags/Tags.d.ts +26 -0
- package/dist/cjs/types/src/components/Input/TextField/TextField.d.ts +35 -0
- package/dist/cjs/types/src/components/Input/Textarea/Textarea.d.ts +36 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/AppLayout.d.ts +32 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/MenuToggleButton.d.ts +16 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/MenuBar.d.ts +26 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/MenuItem.d.ts +37 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/Sidebar.d.ts +30 -1
- package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/StyledComponents.d.ts +139 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/UserProfilePopup.d.ts +34 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/context/SidebarContext.d.ts +48 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/types.d.ts +1 -1
- package/dist/cjs/types/src/components/Layout/PageContent/PageContent.d.ts +21 -1
- package/dist/cjs/types/src/components/Layout/PageHeader/PageHeader.d.ts +46 -0
- package/dist/cjs/types/src/components/Layout/PageHeader/components/SearchBar.d.ts +22 -0
- package/dist/cjs/types/src/components/Layout/UserBox/UserBox.d.ts +40 -0
- package/dist/cjs/types/src/components/Navigation/Breadcrumbs/Breadcrumbs.d.ts +33 -0
- package/dist/cjs/types/src/components/Navigation/Calendar/Calendar.d.ts +63 -0
- package/dist/cjs/types/src/components/Navigation/ConfirmDialog/ConfirmDialog.d.ts +64 -0
- package/dist/cjs/types/src/components/Navigation/Dialog/Dialog.d.ts +55 -0
- package/dist/cjs/types/src/components/Navigation/DialogButton/DialogButton.d.ts +64 -0
- package/dist/cjs/types/src/components/Navigation/DropDownMenu/DropDownMenu.d.ts +73 -0
- package/dist/cjs/types/src/components/Navigation/PreviewFiles/PreviewFiles.d.ts +54 -0
- package/dist/cjs/types/src/components/Navigation/Stepper/Stepper.d.ts +55 -10
- package/dist/cjs/types/src/components/Navigation/TabsContainer/TabsContainer.d.ts +85 -1
- package/dist/cjs/types/src/components/Navigation/UploadDialog/UploadDialog.d.ts +64 -0
- package/dist/cjs/types/src/shadcn-components/Input/Button/Button.d.ts +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/types/src/components/Assets/ErrorPages/ComingSoon.d.ts +24 -0
- package/dist/esm/types/src/components/Assets/ErrorPages/InternalServerError.d.ts +20 -0
- package/dist/esm/types/src/components/Assets/ErrorPages/NoInternetConnection.d.ts +20 -0
- package/dist/esm/types/src/components/Assets/ErrorPages/NoItemFound.d.ts +28 -0
- package/dist/esm/types/src/components/Assets/ErrorPages/PageNotFound.d.ts +21 -0
- package/dist/esm/types/src/components/Assets/ErrorPages/ResourceNotFound.d.ts +21 -0
- package/dist/esm/types/src/components/Assets/ErrorPages/UnAuthorized.d.ts +31 -0
- package/dist/esm/types/src/components/Assets/Icons/Icons.d.ts +54 -0
- package/dist/esm/types/src/components/Charts/BarChart/BarChart.d.ts +38 -0
- package/dist/esm/types/src/components/Charts/BarChart/HorizontalBarChart.d.ts +93 -0
- package/dist/esm/types/src/components/Charts/BarChart/VerticalBarChart.d.ts +110 -0
- package/dist/esm/types/src/components/Charts/LineChart/LineChart.d.ts +89 -0
- package/dist/esm/types/src/components/Charts/PieChart/PieChart.d.ts +86 -0
- package/dist/esm/types/src/components/Charts/TreeMap/TreeMap.d.ts +74 -0
- package/dist/esm/types/src/components/DataDisplay/Accordion/Accordion.d.ts +54 -0
- package/dist/esm/types/src/components/DataDisplay/ActivityLogView/ActivityLogFilter.d.ts +35 -0
- package/dist/esm/types/src/components/DataDisplay/ActivityLogView/ActivityLogView.d.ts +78 -0
- package/dist/esm/types/src/components/DataDisplay/Avatar/Avatar.d.ts +40 -0
- package/dist/esm/types/src/components/DataDisplay/Chip/Chip.d.ts +28 -0
- package/dist/esm/types/src/components/DataDisplay/Chips/Chips.d.ts +55 -0
- package/dist/esm/types/src/components/DataDisplay/DataTable/DataTable.d.ts +96 -1
- package/dist/esm/types/src/components/DataDisplay/DataTable/components/CardsView.d.ts +14 -2
- package/dist/esm/types/src/components/DataDisplay/DataTable/components/TablePagination.d.ts +35 -0
- package/dist/esm/types/src/components/DataDisplay/EmptyIllustration/EmptyIllustration.d.ts +30 -0
- package/dist/esm/types/src/components/DataDisplay/ReactJoyride/ReactJoyride.d.ts +64 -0
- package/dist/esm/types/src/components/DataDisplay/Separator/Separator.d.ts +30 -0
- package/dist/esm/types/src/components/DataDisplay/Skeleton/Skeleton.d.ts +20 -0
- package/dist/esm/types/src/components/DataDisplay/StatusCard/StatusCard.d.ts +36 -0
- package/dist/esm/types/src/components/DataDisplay/Timeline/Timeline.d.ts +58 -0
- package/dist/esm/types/src/components/DataDisplay/Typography/Typography.d.ts +25 -0
- package/dist/esm/types/src/components/Feedback/Alert/Alert.d.ts +31 -0
- package/dist/esm/types/src/components/Feedback/Snackbar/Snackbar.d.ts +54 -0
- package/dist/esm/types/src/components/Feedback/Spinner/Spinner.d.ts +15 -0
- package/dist/esm/types/src/components/Feedback/Tooltip/Tooltip.d.ts +54 -0
- package/dist/esm/types/src/components/Input/Button/Button.d.ts +26 -0
- package/dist/esm/types/src/components/Input/DatePicker/DatePicker.d.ts +41 -0
- package/dist/esm/types/src/components/Input/DateTimePicker/DateTimePicker.d.ts +42 -0
- package/dist/esm/types/src/components/Input/FileUpload/FileUpload.d.ts +41 -0
- package/dist/esm/types/src/components/Input/FormActions/FormActions.d.ts +37 -0
- package/dist/esm/types/src/components/Input/FormControlWrapper/FormControlWrapper.d.ts +31 -0
- package/dist/esm/types/src/components/Input/FormWrapper/FormWrapper.d.ts +20 -0
- package/dist/esm/types/src/components/Input/HelpButton/HelpButton.d.ts +14 -0
- package/dist/esm/types/src/components/Input/IconButtons/IconButtons/DeleteButton.d.ts +16 -0
- package/dist/esm/types/src/components/Input/IconButtons/IconButtons/EditButton.d.ts +16 -0
- package/dist/esm/types/src/components/Input/IconButtons/IconButtons/RedirectButton.d.ts +16 -0
- package/dist/esm/types/src/components/Input/IconButtons/IconButtons/ViewButton.d.ts +16 -0
- package/dist/esm/types/src/components/Input/IconButtons/IconButtons.d.ts +18 -0
- package/dist/esm/types/src/components/Input/LabelWrapper/LabelWrapper.d.ts +26 -0
- package/dist/esm/types/src/components/Input/MultiCheckBox/MultiCheckBox.d.ts +34 -0
- package/dist/esm/types/src/components/Input/MultiSelect/MultiSelect.d.ts +40 -0
- package/dist/esm/types/src/components/Input/OtpInput/OtpInput.d.ts +29 -0
- package/dist/esm/types/src/components/Input/PasswordField/PasswordField.d.ts +34 -0
- package/dist/esm/types/src/components/Input/RadioGroup/RadioGroup.d.ts +38 -0
- package/dist/esm/types/src/components/Input/SearchBar/SearchBar.d.ts +26 -0
- package/dist/esm/types/src/components/Input/Select/Select.d.ts +32 -0
- package/dist/esm/types/src/components/Input/SingleCheckBox/SingleCheckBox.d.ts +29 -0
- package/dist/esm/types/src/components/Input/SingleSelect/SingleSelect.d.ts +40 -0
- package/dist/esm/types/src/components/Input/Switch/Switch.d.ts +23 -0
- package/dist/esm/types/src/components/Input/Tags/Tags.d.ts +26 -0
- package/dist/esm/types/src/components/Input/TextField/TextField.d.ts +35 -0
- package/dist/esm/types/src/components/Input/Textarea/Textarea.d.ts +36 -0
- package/dist/esm/types/src/components/Layout/AppLayout/AppLayout.d.ts +32 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/MenuToggleButton.d.ts +16 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/MenuBar.d.ts +26 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/MenuItem.d.ts +37 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/Sidebar.d.ts +30 -1
- package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/StyledComponents.d.ts +139 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/UserProfilePopup.d.ts +34 -0
- package/dist/esm/types/src/components/Layout/AppLayout/context/SidebarContext.d.ts +48 -0
- package/dist/esm/types/src/components/Layout/AppLayout/types.d.ts +1 -1
- package/dist/esm/types/src/components/Layout/PageContent/PageContent.d.ts +21 -1
- package/dist/esm/types/src/components/Layout/PageHeader/PageHeader.d.ts +46 -0
- package/dist/esm/types/src/components/Layout/PageHeader/components/SearchBar.d.ts +22 -0
- package/dist/esm/types/src/components/Layout/UserBox/UserBox.d.ts +40 -0
- package/dist/esm/types/src/components/Navigation/Breadcrumbs/Breadcrumbs.d.ts +33 -0
- package/dist/esm/types/src/components/Navigation/Calendar/Calendar.d.ts +63 -0
- package/dist/esm/types/src/components/Navigation/ConfirmDialog/ConfirmDialog.d.ts +64 -0
- package/dist/esm/types/src/components/Navigation/Dialog/Dialog.d.ts +55 -0
- package/dist/esm/types/src/components/Navigation/DialogButton/DialogButton.d.ts +64 -0
- package/dist/esm/types/src/components/Navigation/DropDownMenu/DropDownMenu.d.ts +73 -0
- package/dist/esm/types/src/components/Navigation/PreviewFiles/PreviewFiles.d.ts +54 -0
- package/dist/esm/types/src/components/Navigation/Stepper/Stepper.d.ts +55 -10
- package/dist/esm/types/src/components/Navigation/TabsContainer/TabsContainer.d.ts +85 -1
- package/dist/esm/types/src/components/Navigation/UploadDialog/UploadDialog.d.ts +64 -0
- package/dist/esm/types/src/shadcn-components/Input/Button/Button.d.ts +1 -1
- package/dist/index.d.ts +2961 -16
- package/dist/styles.css +30 -81
- package/package.json +1 -1
- package/src/components/Assets/ErrorPages/ComingSoon.tsx +24 -0
- package/src/components/Assets/ErrorPages/InternalServerError.tsx +20 -0
- package/src/components/Assets/ErrorPages/NoInternetConnection.tsx +20 -0
- package/src/components/Assets/ErrorPages/NoItemFound.tsx +28 -0
- package/src/components/Assets/ErrorPages/PageNotFound.tsx +21 -0
- package/src/components/Assets/ErrorPages/ResourceNotFound.tsx +21 -0
- package/src/components/Assets/ErrorPages/UnAuthorized.tsx +31 -0
- package/src/components/Assets/Icons/Icons.tsx +55 -1
- package/src/components/Charts/BarChart/BarChart.tsx +38 -0
- package/src/components/Charts/BarChart/HorizontalBarChart.tsx +93 -0
- package/src/components/Charts/BarChart/VerticalBarChart.tsx +110 -0
- package/src/components/Charts/LineChart/LineChart.tsx +89 -0
- package/src/components/Charts/PieChart/PieChart.tsx +86 -0
- package/src/components/Charts/TreeMap/TreeMap.tsx +90 -0
- package/src/components/DataDisplay/Accordion/Accordion.tsx +54 -0
- package/src/components/DataDisplay/ActivityLogView/ActivityLogFilter.tsx +35 -0
- package/src/components/DataDisplay/ActivityLogView/ActivityLogView.tsx +84 -0
- package/src/components/DataDisplay/Avatar/Avatar.tsx +40 -0
- package/src/components/DataDisplay/Chip/Chip.tsx +28 -0
- package/src/components/DataDisplay/Chips/Chips.tsx +56 -0
- package/src/components/DataDisplay/DataTable/DataTable.tsx +109 -2
- package/src/components/DataDisplay/DataTable/components/CardsView.tsx +28 -13
- package/src/components/DataDisplay/DataTable/components/ColumnSelector/ColumnSelector.tsx +22 -4
- package/src/components/DataDisplay/DataTable/components/TableHeaders/TableActionHeader.tsx +9 -4
- package/src/components/DataDisplay/DataTable/components/TablePagination.tsx +35 -0
- package/src/components/DataDisplay/DataTable/components/TableView.tsx +5 -1
- package/src/components/DataDisplay/EmptyIllustration/EmptyIllustration.tsx +31 -0
- package/src/components/DataDisplay/ReactJoyride/ReactJoyride.tsx +64 -0
- package/src/components/DataDisplay/Separator/Separator.tsx +32 -0
- package/src/components/DataDisplay/Skeleton/Skeleton.tsx +20 -0
- package/src/components/DataDisplay/StatusCard/StatusCard.tsx +36 -0
- package/src/components/DataDisplay/Timeline/Timeline.tsx +58 -0
- package/src/components/DataDisplay/Typography/Typography.tsx +25 -0
- package/src/components/Feedback/Alert/Alert.tsx +38 -0
- package/src/components/Feedback/Snackbar/Snackbar.tsx +54 -0
- package/src/components/Feedback/Spinner/Spinner.tsx +15 -0
- package/src/components/Feedback/Tooltip/Tooltip.tsx +54 -0
- package/src/components/Input/Button/Button.tsx +26 -0
- package/src/components/Input/DatePicker/DatePicker.tsx +41 -0
- package/src/components/Input/DateTimePicker/DateTimePicker.tsx +42 -0
- package/src/components/Input/FileUpload/FileUpload.tsx +41 -0
- package/src/components/Input/FormActions/FormActions.tsx +37 -0
- package/src/components/Input/FormControlWrapper/FormControlWrapper.tsx +31 -0
- package/src/components/Input/FormWrapper/FormWrapper.tsx +20 -0
- package/src/components/Input/HelpButton/HelpButton.tsx +14 -0
- package/src/components/Input/IconButtons/IconButtons/DeleteButton.tsx +16 -0
- package/src/components/Input/IconButtons/IconButtons/EditButton.tsx +16 -0
- package/src/components/Input/IconButtons/IconButtons/RedirectButton.tsx +16 -0
- package/src/components/Input/IconButtons/IconButtons/ViewButton.tsx +16 -0
- package/src/components/Input/IconButtons/IconButtons.tsx +18 -0
- package/src/components/Input/LabelWrapper/LabelWrapper.tsx +26 -0
- package/src/components/Input/MultiCheckBox/MultiCheckBox.tsx +34 -0
- package/src/components/Input/MultiSelect/MultiSelect.tsx +40 -0
- package/src/components/Input/OtpInput/OtpInput.tsx +29 -0
- package/src/components/Input/PasswordField/PasswordField.tsx +34 -0
- package/src/components/Input/RadioGroup/RadioGroup.tsx +38 -0
- package/src/components/Input/SearchBar/SearchBar.tsx +26 -0
- package/src/components/Input/Select/Select.tsx +41 -0
- package/src/components/Input/SingleCheckBox/SingleCheckBox.tsx +29 -0
- package/src/components/Input/SingleSelect/SingleSelect.tsx +40 -0
- package/src/components/Input/Switch/Switch.tsx +23 -0
- package/src/components/Input/Tags/Tags.tsx +26 -0
- package/src/components/Input/TextField/TextField.tsx +35 -0
- package/src/components/Input/Textarea/Textarea.tsx +36 -0
- package/src/components/Layout/AppLayout/AppLayout.tsx +34 -11
- package/src/components/Layout/AppLayout/components/MenuToggleButton.tsx +16 -0
- package/src/components/Layout/AppLayout/components/Sidebar/MenuBar.tsx +26 -0
- package/src/components/Layout/AppLayout/components/Sidebar/MenuItem.tsx +51 -1
- package/src/components/Layout/AppLayout/components/Sidebar/Sidebar.tsx +173 -104
- package/src/components/Layout/AppLayout/components/Sidebar/StyledComponents.tsx +139 -9
- package/src/components/Layout/AppLayout/components/UserProfilePopup.tsx +35 -1
- package/src/components/Layout/AppLayout/context/SidebarContext.tsx +48 -0
- package/src/components/Layout/AppLayout/types.ts +1 -1
- package/src/components/Layout/PageContent/PageContent.tsx +23 -3
- package/src/components/Layout/PageHeader/PageHeader.tsx +68 -7
- package/src/components/Layout/PageHeader/components/SearchBar.tsx +22 -0
- package/src/components/Layout/UserBox/UserBox.tsx +40 -0
- package/src/components/Navigation/Breadcrumbs/Breadcrumbs.tsx +53 -4
- package/src/components/Navigation/Calendar/Calendar.tsx +63 -0
- package/src/components/Navigation/ConfirmDialog/ConfirmDialog.tsx +64 -0
- package/src/components/Navigation/Dialog/Dialog.tsx +62 -2
- package/src/components/Navigation/DialogButton/DialogButton.tsx +64 -0
- package/src/components/Navigation/DropDownMenu/DropDownMenu.tsx +73 -0
- package/src/components/Navigation/PreviewFiles/PreviewFiles.tsx +93 -0
- package/src/components/Navigation/Stepper/Stepper.tsx +56 -10
- package/src/components/Navigation/TabsContainer/TabsContainer.tsx +86 -1
- package/src/components/Navigation/UploadDialog/UploadDialog.tsx +64 -0
- package/src/shadcn-components/Layout/Sheet/Sheet.tsx +2 -2
|
@@ -26,6 +26,47 @@ export type FileUploadProps = {
|
|
|
26
26
|
required?: boolean;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* FileUpload component for file selection and management
|
|
31
|
+
*
|
|
32
|
+
* A comprehensive file upload component with drag-and-drop support, file validation,
|
|
33
|
+
* preview capabilities, and file management features.
|
|
34
|
+
*
|
|
35
|
+
* @component
|
|
36
|
+
* @param {FileUploadProps} props - The file upload properties
|
|
37
|
+
* @param {string} props.label - Label text for the upload field
|
|
38
|
+
* @param {string} props.name - Name attribute for the input element
|
|
39
|
+
* @param {File[]} [props.files=[]] - Array of currently selected files
|
|
40
|
+
* @param {(files: File[]) => void} [props.onChange] - Callback fired when files are selected
|
|
41
|
+
* @param {(index: number) => void} [props.handleRemove] - Callback to remove a file by index
|
|
42
|
+
* @param {'image/*' | '.pdf' | '.docx' | '.txt' | '*'} [props.accept='*'] - File type filter
|
|
43
|
+
* @param {(file: File) => void} [props.onInvalidFile] - Callback fired when an invalid file is selected
|
|
44
|
+
* @param {string} [props.inputText] - Custom text for the upload prompt
|
|
45
|
+
* @param {boolean} [props.multiple=true] - Whether multiple files can be selected
|
|
46
|
+
* @param {boolean} [props.disabled=false] - Whether the upload is disabled
|
|
47
|
+
* @param {boolean} [props.hideDeleteButton=false] - Whether to hide delete buttons on files
|
|
48
|
+
* @param {boolean} [props.hideInput=false] - Whether to hide the file input area
|
|
49
|
+
* @param {string} [props.errorText] - Error message to display
|
|
50
|
+
* @param {string} [props.className] - Additional CSS classes for the upload area
|
|
51
|
+
* @param {string} [props.containerClassName] - Additional CSS classes for the container
|
|
52
|
+
* @param {boolean} [props.showImage] - Whether to show image previews instead of file list
|
|
53
|
+
* @param {string} [props.previewClassName] - Additional CSS classes for previews
|
|
54
|
+
* @param {boolean} [props.required] - Whether the field is required
|
|
55
|
+
* @returns {React.ReactElement} The rendered file upload component
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```tsx
|
|
59
|
+
* <FileUpload
|
|
60
|
+
* label="Upload Documents"
|
|
61
|
+
* name="documents"
|
|
62
|
+
* files={files}
|
|
63
|
+
* onChange={setFiles}
|
|
64
|
+
* accept=".pdf,.docx"
|
|
65
|
+
* multiple
|
|
66
|
+
* required
|
|
67
|
+
* />
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
29
70
|
export const FileUpload = ({
|
|
30
71
|
label,
|
|
31
72
|
name = 'file-input',
|
|
@@ -14,6 +14,43 @@ export interface FormActionsProps {
|
|
|
14
14
|
showTopBorder?: boolean;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* FormActions component for form submission and cancellation
|
|
19
|
+
*
|
|
20
|
+
* A component that renders submit and cancel buttons with customizable configurations
|
|
21
|
+
* and visibility options. Typically used at the bottom of forms.
|
|
22
|
+
*
|
|
23
|
+
* @component
|
|
24
|
+
* @param {FormActionsProps} props - The form actions properties
|
|
25
|
+
* @param {ButtonConfig} [props.submitButtonProps] - Configuration for the submit button
|
|
26
|
+
* @param {ButtonConfig} [props.submitButtonProps.show=true] - Whether to show the submit button
|
|
27
|
+
* @param {string} [props.submitButtonProps.title='Submit'] - Submit button label
|
|
28
|
+
* @param {() => void} [props.submitButtonProps.onClick] - Callback when submit is clicked
|
|
29
|
+
* @param {ButtonConfig} [props.cancelButtonProps] - Configuration for the cancel button
|
|
30
|
+
* @param {ButtonConfig} [props.cancelButtonProps.show=true] - Whether to show the cancel button
|
|
31
|
+
* @param {string} [props.cancelButtonProps.title='Cancel'] - Cancel button label
|
|
32
|
+
* @param {() => void} [props.cancelButtonProps.onClick] - Callback when cancel is clicked
|
|
33
|
+
* @param {string} [props.className] - Additional CSS classes to apply
|
|
34
|
+
* @param {boolean} [props.showTopBorder=false] - Whether to show a top border
|
|
35
|
+
* @returns {React.ReactElement} The rendered form actions component
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```tsx
|
|
39
|
+
* <FormActions
|
|
40
|
+
* submitButtonProps={{
|
|
41
|
+
* title: 'Save Changes',
|
|
42
|
+
* onClick: handleSubmit,
|
|
43
|
+
* variant: 'default'
|
|
44
|
+
* }}
|
|
45
|
+
* cancelButtonProps={{
|
|
46
|
+
* title: 'Discard',
|
|
47
|
+
* onClick: handleCancel,
|
|
48
|
+
* variant: 'ghost'
|
|
49
|
+
* }}
|
|
50
|
+
* showTopBorder
|
|
51
|
+
* />
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
17
54
|
export const FormActions = ({
|
|
18
55
|
submitButtonProps,
|
|
19
56
|
cancelButtonProps,
|
|
@@ -32,6 +32,37 @@ type ControlledElementProps<T extends FieldValues = FieldValues> = {
|
|
|
32
32
|
[key: string]: any;
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
+
/**
|
|
36
|
+
* FormControlWrapper component for react-hook-form integration
|
|
37
|
+
*
|
|
38
|
+
* A wrapper component that integrates react-hook-form's Controller with form elements,
|
|
39
|
+
* automatically handling field registration, validation, and error display.
|
|
40
|
+
*
|
|
41
|
+
* @component
|
|
42
|
+
* @template T - The form values type from react-hook-form
|
|
43
|
+
* @param {FormControlWrapperProps<T>} props - The wrapper properties
|
|
44
|
+
* @param {Control<T>} props.control - React Hook Form control instance from useForm()
|
|
45
|
+
* @param {ReactNode} props.children - Child form elements to be controlled
|
|
46
|
+
* @param {string} [props.containerClassName] - Additional CSS classes for the container
|
|
47
|
+
* @param {FormActionsProps} [props.formActionProps] - Properties for form submit/cancel buttons
|
|
48
|
+
* @param {boolean} [props.disabled=false] - Whether all controlled fields are disabled
|
|
49
|
+
* @returns {React.ReactElement} The rendered wrapper with controlled form elements
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```tsx
|
|
53
|
+
* const { control, handleSubmit } = useForm();
|
|
54
|
+
*
|
|
55
|
+
* <FormControlWrapper
|
|
56
|
+
* control={control}
|
|
57
|
+
* formActionProps={{
|
|
58
|
+
* submitButtonProps: { onClick: handleSubmit(onSubmit) }
|
|
59
|
+
* }}
|
|
60
|
+
* >
|
|
61
|
+
* <TextField name="email" label="Email" />
|
|
62
|
+
* <PasswordField name="password" label="Password" />
|
|
63
|
+
* </FormControlWrapper>
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
35
66
|
export function FormControlWrapper<T extends FieldValues = FieldValues>({
|
|
36
67
|
control,
|
|
37
68
|
children,
|
|
@@ -6,6 +6,26 @@ type FormWrapperProps = {
|
|
|
6
6
|
className?: string;
|
|
7
7
|
};
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* FormWrapper component for layout styling
|
|
11
|
+
*
|
|
12
|
+
* A simple wrapper component that provides default styling and spacing for form elements.
|
|
13
|
+
* Used to maintain consistent form layout and spacing throughout the application.
|
|
14
|
+
*
|
|
15
|
+
* @component
|
|
16
|
+
* @param {FormWrapperProps} props - The wrapper properties
|
|
17
|
+
* @param {ReactNode} props.children - Child form elements
|
|
18
|
+
* @param {string} [props.className] - Additional CSS classes to apply
|
|
19
|
+
* @returns {React.ReactElement} The styled form wrapper container
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```tsx
|
|
23
|
+
* <FormWrapper>
|
|
24
|
+
* <TextField label="Name" name="name" />
|
|
25
|
+
* <TextField label="Email" name="email" />
|
|
26
|
+
* </FormWrapper>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
9
29
|
export const FormWrapper = ({ children, className }: FormWrapperProps) => {
|
|
10
30
|
return (
|
|
11
31
|
<div className={cn('flex flex-col gap-3 m-4', className)}>{children}</div>
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import { MessageCircleQuestionMark } from 'lucide-react';
|
|
2
2
|
import { Button } from '../../export';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* HelpButton component for documentation access
|
|
6
|
+
*
|
|
7
|
+
* A button component that opens the help/documentation page in a new window
|
|
8
|
+
* when clicked. Features a question mark icon.
|
|
9
|
+
*
|
|
10
|
+
* @component
|
|
11
|
+
* @returns {React.ReactElement} The rendered help button
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* <HelpButton />
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
4
18
|
const HelpButton = () => {
|
|
5
19
|
return (
|
|
6
20
|
<Button
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
import { Trash2 } from 'lucide-react';
|
|
2
2
|
import { Button, ButtonProps } from '../../Button/Button';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* DeleteButton component for delete actions
|
|
6
|
+
*
|
|
7
|
+
* An icon button with a trash icon for triggering delete/remove actions.
|
|
8
|
+
* Minimal styling suitable for use in tables and lists.
|
|
9
|
+
*
|
|
10
|
+
* @component
|
|
11
|
+
* @param {ButtonProps} props - Button properties
|
|
12
|
+
* @param {boolean} [props.disabled] - Whether the button is disabled
|
|
13
|
+
* @returns {React.ReactElement} The rendered delete button
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <DeleteButton onClick={handleDelete} />
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
4
20
|
export function DeleteButton({ disabled, ...props }: ButtonProps) {
|
|
5
21
|
return (
|
|
6
22
|
<Button size="icon" variant="ghost" disabled={disabled} {...props}>
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
import { Pencil } from 'lucide-react';
|
|
2
2
|
import { Button, ButtonProps } from '../../Button/Button';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* EditButton component for edit actions
|
|
6
|
+
*
|
|
7
|
+
* An icon button with a pencil icon for triggering edit/modify actions.
|
|
8
|
+
* Minimal styling suitable for use in tables and lists.
|
|
9
|
+
*
|
|
10
|
+
* @component
|
|
11
|
+
* @param {ButtonProps} props - Button properties
|
|
12
|
+
* @param {boolean} [props.disabled] - Whether the button is disabled
|
|
13
|
+
* @returns {React.ReactElement} The rendered edit button
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <EditButton onClick={handleEdit} />
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
4
20
|
export function EditButton({ disabled, ...props }: ButtonProps) {
|
|
5
21
|
return (
|
|
6
22
|
<Button size="icon" variant="ghost" disabled={disabled} {...props}>
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
import { SquareArrowOutUpRight } from 'lucide-react';
|
|
2
2
|
import { Button, ButtonProps } from '../../Button/Button';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* RedirectButton component for navigation/external link actions
|
|
6
|
+
*
|
|
7
|
+
* An icon button with an external link arrow icon for redirecting users
|
|
8
|
+
* to other pages or external URLs. Minimal styling suitable for use in tables and lists.
|
|
9
|
+
*
|
|
10
|
+
* @component
|
|
11
|
+
* @param {ButtonProps} props - Button properties
|
|
12
|
+
* @param {boolean} [props.disabled] - Whether the button is disabled
|
|
13
|
+
* @returns {React.ReactElement} The rendered redirect button
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <RedirectButton onClick={() => window.open(url)} />
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
4
20
|
export function RedirectButton({ disabled, ...props }: ButtonProps) {
|
|
5
21
|
return (
|
|
6
22
|
<Button size="icon" variant="ghost" disabled={disabled} {...props}>
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
import { Eye } from 'lucide-react';
|
|
2
2
|
import { Button, ButtonProps } from '../../Button/Button';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* ViewButton component for view/preview actions
|
|
6
|
+
*
|
|
7
|
+
* An icon button with an eye icon for triggering view/preview actions.
|
|
8
|
+
* Minimal styling suitable for use in tables and lists.
|
|
9
|
+
*
|
|
10
|
+
* @component
|
|
11
|
+
* @param {ButtonProps} props - Button properties
|
|
12
|
+
* @param {boolean} [props.disabled] - Whether the button is disabled
|
|
13
|
+
* @returns {React.ReactElement} The rendered view button
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <ViewButton onClick={handleView} />
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
4
20
|
export function ViewButton({ disabled, ...props }: ButtonProps) {
|
|
5
21
|
return (
|
|
6
22
|
<Button size="icon" variant="ghost" disabled={disabled} {...props}>
|
|
@@ -3,6 +3,24 @@ import { EditButton } from './IconButtons/EditButton';
|
|
|
3
3
|
import { RedirectButton } from './IconButtons/RedirectButton';
|
|
4
4
|
import { ViewButton } from './IconButtons/ViewButton';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* IconButtons object namespace
|
|
8
|
+
*
|
|
9
|
+
* A collection of common action icon buttons for use in tables and lists.
|
|
10
|
+
* All buttons are minimal icon-only buttons with consistent styling.
|
|
11
|
+
*
|
|
12
|
+
* @namespace IconButtons
|
|
13
|
+
* @property {typeof DeleteButton} DeleteButton - Button with trash icon for delete actions
|
|
14
|
+
* @property {typeof EditButton} EditButton - Button with pencil icon for edit actions
|
|
15
|
+
* @property {typeof ViewButton} ViewButton - Button with eye icon for view/preview actions
|
|
16
|
+
* @property {typeof RedirectButton} RedirectButton - Button with external link icon for navigation
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <IconButtons.DeleteButton onClick={handleDelete} />
|
|
21
|
+
* <IconButtons.EditButton onClick={handleEdit} />
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
6
24
|
export const IconButtons = {
|
|
7
25
|
DeleteButton,
|
|
8
26
|
EditButton,
|
|
@@ -9,6 +9,32 @@ export interface LabelWrapperProps {
|
|
|
9
9
|
containerProps?: React.HTMLAttributes<HTMLDivElement>;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* LabelWrapper component for form field labeling
|
|
14
|
+
*
|
|
15
|
+
* A wrapper component that provides consistent label styling and required field indicators.
|
|
16
|
+
* Automatically handles string labels and custom label elements.
|
|
17
|
+
*
|
|
18
|
+
* @component
|
|
19
|
+
* @param {LabelWrapperProps} props - The wrapper properties
|
|
20
|
+
* @param {boolean} props.required - Whether the field is required (adds asterisk indicator)
|
|
21
|
+
* @param {string} [props.name] - Name attribute for the associated label
|
|
22
|
+
* @param {ReactNode | string} [props.label] - The label text or element
|
|
23
|
+
* @param {ReactNode} props.children - The form element to be labeled
|
|
24
|
+
* @param {React.HTMLAttributes<HTMLDivElement>} [props.containerProps] - Additional container attributes
|
|
25
|
+
* @returns {React.ReactElement} The label and children wrapped in a container
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* <LabelWrapper
|
|
30
|
+
* label="Email Address"
|
|
31
|
+
* name="email"
|
|
32
|
+
* required
|
|
33
|
+
* >
|
|
34
|
+
* <Input type="email" />
|
|
35
|
+
* </LabelWrapper>
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
12
38
|
export const LabelWrapper = ({
|
|
13
39
|
required,
|
|
14
40
|
name,
|
|
@@ -15,6 +15,40 @@ export type MultiCheckboxProps = {
|
|
|
15
15
|
className?: string;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* MultiCheckBox component for multi-value checkbox selection
|
|
20
|
+
*
|
|
21
|
+
* A component that renders multiple checkboxes in a row or column layout,
|
|
22
|
+
* allowing users to select multiple values from a set of options.
|
|
23
|
+
*
|
|
24
|
+
* @component
|
|
25
|
+
* @param {MultiCheckboxProps} props - The checkbox group properties
|
|
26
|
+
* @param {string} props.label - Group label text
|
|
27
|
+
* @param {Array<{label: ReactNode, value: any}>} props.options - Available checkbox options
|
|
28
|
+
* @param {any[]} props.values - Currently selected values
|
|
29
|
+
* @param {(values: any[]) => void} props.onChange - Callback when selection changes
|
|
30
|
+
* @param {string} props.name - Name attribute for the checkbox group
|
|
31
|
+
* @param {boolean} props.required - Whether the field is required
|
|
32
|
+
* @param {'row' | 'column'} [props.direction='column'] - Layout direction for checkboxes
|
|
33
|
+
* @param {string} [props.className] - Additional CSS classes for the options container
|
|
34
|
+
* @param {React.HTMLAttributes<HTMLDivElement>} [props.containerProps] - Additional container attributes
|
|
35
|
+
* @returns {React.ReactElement} The rendered checkbox group
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```tsx
|
|
39
|
+
* <MultiCheckBox
|
|
40
|
+
* label="Select Features"
|
|
41
|
+
* name="features"
|
|
42
|
+
* values={selectedFeatures}
|
|
43
|
+
* onChange={setSelectedFeatures}
|
|
44
|
+
* required
|
|
45
|
+
* options={[
|
|
46
|
+
* { label: 'Feature A', value: 'a' },
|
|
47
|
+
* { label: 'Feature B', value: 'b' }
|
|
48
|
+
* ]}
|
|
49
|
+
* />
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
18
52
|
export const MultiCheckBox = ({
|
|
19
53
|
name,
|
|
20
54
|
options,
|
|
@@ -46,6 +46,46 @@ export type MultiSelectProps = {
|
|
|
46
46
|
loading?: boolean;
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
+
/**
|
|
50
|
+
* MultiSelect component for multi-value selection
|
|
51
|
+
*
|
|
52
|
+
* A feature-rich multi-select component supporting both local and API-driven options,
|
|
53
|
+
* with search, pagination, filtering, and flexible display modes.
|
|
54
|
+
*
|
|
55
|
+
* @component
|
|
56
|
+
* @param {MultiSelectProps} props - The select properties
|
|
57
|
+
* @param {Array<{label: string, subLabel?: string, value: any, icon?: ReactNode}>} [props.options] - Static options array
|
|
58
|
+
* @param {string} [props.optionsApiEndPoint] - API endpoint for dynamic options loading
|
|
59
|
+
* @param {any} [props.optionsApiEndpointParams] - Additional parameters for API requests
|
|
60
|
+
* @param {AxiosInstance} [props.externalAxios] - Custom axios instance for API calls
|
|
61
|
+
* @param {any[]} [props.value] - Currently selected values
|
|
62
|
+
* @param {(values: any[]) => void} [props.onChange] - Callback fired when selection changes
|
|
63
|
+
* @param {(option: any) => any} [props.getValue] - Function to extract value from option object
|
|
64
|
+
* @param {{valueKey: string, isObjectId?: boolean, isInt?: boolean, isFloat?: boolean}} [props.dbValueProps] - Database value mapping properties
|
|
65
|
+
* @param {{labelKey: string, subLabelKey?: string, useLabelStartCase?: boolean, useSubLabelStartCase?: boolean}} [props.dbLabelProps] - Database label mapping properties
|
|
66
|
+
* @param {string} [props.label] - Label for the select
|
|
67
|
+
* @param {string} [props.name] - Name attribute
|
|
68
|
+
* @param {boolean} [props.required] - Whether the field is required
|
|
69
|
+
* @param {boolean} [props.disabled] - Whether the select is disabled
|
|
70
|
+
* @param {boolean} [props.loading] - Whether options are loading
|
|
71
|
+
* @param {boolean} [props.disableClear] - Whether to hide the clear button
|
|
72
|
+
* @param {boolean} [props.fullWidth] - Whether the select takes full width
|
|
73
|
+
* @param {'input' | 'filter'} [props.type='input'] - Display type
|
|
74
|
+
* @param {(event: SyntheticEvent) => void} [props.onOpen] - Callback when menu opens
|
|
75
|
+
* @param {(event: SyntheticEvent, reason: string) => void} [props.onClose] - Callback when menu closes
|
|
76
|
+
* @returns {React.ReactElement} The rendered multi-select component
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```tsx
|
|
80
|
+
* <MultiSelect
|
|
81
|
+
* label="Select Users"
|
|
82
|
+
* value={selectedUsers}
|
|
83
|
+
* onChange={setSelectedUsers}
|
|
84
|
+
* options={users}
|
|
85
|
+
* required
|
|
86
|
+
* />
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
49
89
|
export const MultiSelect = ({
|
|
50
90
|
options,
|
|
51
91
|
optionsApiEndPoint,
|
|
@@ -16,6 +16,35 @@ interface OtpInputProps {
|
|
|
16
16
|
helperText?: string;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* OtpInput component for one-time password entry
|
|
21
|
+
*
|
|
22
|
+
* A component that renders a sequence of single-digit input fields for OTP entry,
|
|
23
|
+
* with auto-focus, paste support, and keyboard navigation.
|
|
24
|
+
*
|
|
25
|
+
* @component
|
|
26
|
+
* @param {OtpInputProps} props - The OTP input properties
|
|
27
|
+
* @param {number} props.length - Number of OTP digits
|
|
28
|
+
* @param {(otp: string) => void} props.onChangeOtp - Callback fired when OTP changes
|
|
29
|
+
* @param {string} [props.label] - Optional label for the OTP input group
|
|
30
|
+
* @param {string} [props.name] - Name attribute for the inputs
|
|
31
|
+
* @param {boolean} [props.required] - Whether the field is required
|
|
32
|
+
* @param {boolean} [props.error=false] - Whether there's a validation error
|
|
33
|
+
* @param {string} [props.helperText] - Helper or error text to display
|
|
34
|
+
* @param {string} [props.containerClassName] - Additional CSS classes for the input container
|
|
35
|
+
* @param {string} [props.inputClassName] - Additional CSS classes for individual inputs
|
|
36
|
+
* @returns {React.ReactElement} The rendered OTP input component
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```tsx
|
|
40
|
+
* <OtpInput
|
|
41
|
+
* length={6}
|
|
42
|
+
* onChangeOtp={setOtp}
|
|
43
|
+
* label="Enter Verification Code"
|
|
44
|
+
* required
|
|
45
|
+
* />
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
19
48
|
export const OtpInput = ({
|
|
20
49
|
length,
|
|
21
50
|
onChangeOtp,
|
|
@@ -21,6 +21,40 @@ export type PasswordFieldProps = {
|
|
|
21
21
|
fullWidth?: boolean;
|
|
22
22
|
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'>;
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* PasswordField component for password input
|
|
26
|
+
*
|
|
27
|
+
* A text input field specialized for password entry with visibility toggle,
|
|
28
|
+
* error states, and helper text support.
|
|
29
|
+
*
|
|
30
|
+
* @component
|
|
31
|
+
* @param {PasswordFieldProps} props - The password field properties
|
|
32
|
+
* @param {string} [props.label] - Label for the field
|
|
33
|
+
* @param {string} [props.name] - Name attribute for the input
|
|
34
|
+
* @param {string} [props.value] - Current input value
|
|
35
|
+
* @param {(e: React.ChangeEvent<HTMLInputElement>) => void} [props.onChange] - Callback when value changes
|
|
36
|
+
* @param {string} [props.placeholder='Enter password'] - Placeholder text
|
|
37
|
+
* @param {boolean} [props.required] - Whether the field is required
|
|
38
|
+
* @param {boolean} [props.disabled] - Whether the field is disabled
|
|
39
|
+
* @param {boolean} [props.error] - Whether there's a validation error
|
|
40
|
+
* @param {string} [props.helperText] - Helper or error text
|
|
41
|
+
* @param {string} [props.description] - Additional description text
|
|
42
|
+
* @param {boolean} [props.fullWidth] - Whether the field takes full width
|
|
43
|
+
* @param {string} [props.className] - Additional CSS classes
|
|
44
|
+
* @param {React.HTMLAttributes<HTMLDivElement>} [props.containerProps] - Container attributes
|
|
45
|
+
* @returns {React.ReactElement} The rendered password field component
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```tsx
|
|
49
|
+
* <PasswordField
|
|
50
|
+
* label="Password"
|
|
51
|
+
* name="password"
|
|
52
|
+
* value={password}
|
|
53
|
+
* onChange={(e) => setPassword(e.target.value)}
|
|
54
|
+
* required
|
|
55
|
+
* />
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
24
58
|
export const PasswordField = ({
|
|
25
59
|
name,
|
|
26
60
|
label,
|
|
@@ -22,6 +22,44 @@ export type RadioGroupProps = {
|
|
|
22
22
|
helperText?: ReactNode;
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* RadioGroup component for exclusive single-value selection
|
|
27
|
+
*
|
|
28
|
+
* A component that renders a group of radio buttons allowing users to select
|
|
29
|
+
* exactly one value from a set of options, with row or column layout.
|
|
30
|
+
*
|
|
31
|
+
* @component
|
|
32
|
+
* @param {RadioGroupProps} props - The radio group properties
|
|
33
|
+
* @param {string} props.name - Name attribute for the radio group
|
|
34
|
+
* @param {Array<{label: ReactNode, value: any, disabled?: boolean}>} props.options - Available radio options
|
|
35
|
+
* @param {string} [props.label] - Group label text
|
|
36
|
+
* @param {any} [props.value] - Currently selected value (controlled)
|
|
37
|
+
* @param {any} [props.defaultValue] - Default selected value (uncontrolled)
|
|
38
|
+
* @param {(value: any) => void} [props.onChange] - Callback when selection changes
|
|
39
|
+
* @param {(value: string) => void} [props.onValueChange] - Alternative callback when selection changes
|
|
40
|
+
* @param {boolean} [props.required] - Whether the field is required
|
|
41
|
+
* @param {boolean} [props.disabled] - Whether all options are disabled
|
|
42
|
+
* @param {'row' | 'column'} [props.direction='column'] - Layout direction for radio buttons
|
|
43
|
+
* @param {boolean} [props.error] - Whether there's a validation error
|
|
44
|
+
* @param {ReactNode} [props.helperText] - Helper or error text
|
|
45
|
+
* @param {string} [props.className] - Additional CSS classes for the radio container
|
|
46
|
+
* @param {React.HTMLAttributes<HTMLDivElement>} [props.containerProps] - Container attributes
|
|
47
|
+
* @returns {React.ReactElement} The rendered radio group component
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```tsx
|
|
51
|
+
* <RadioGroup
|
|
52
|
+
* name="status"
|
|
53
|
+
* label="Select Status"
|
|
54
|
+
* value={status}
|
|
55
|
+
* onChange={setStatus}
|
|
56
|
+
* options={[
|
|
57
|
+
* { label: 'Active', value: 'active' },
|
|
58
|
+
* { label: 'Inactive', value: 'inactive' }
|
|
59
|
+
* ]}
|
|
60
|
+
* />
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
25
63
|
export const RadioGroup = ({
|
|
26
64
|
label,
|
|
27
65
|
required = false,
|
|
@@ -15,6 +15,32 @@ export type SearchBarProps = {
|
|
|
15
15
|
inputClassName?: string;
|
|
16
16
|
} & Omit<React.ComponentProps<'input'>, 'onChange' | 'value'>;
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* SearchBar component for search input
|
|
20
|
+
*
|
|
21
|
+
* A search input component with built-in debouncing for efficient search operations,
|
|
22
|
+
* featuring a search icon and customizable styling.
|
|
23
|
+
*
|
|
24
|
+
* @component
|
|
25
|
+
* @param {SearchBarProps} props - The search bar properties
|
|
26
|
+
* @param {string} [props.placeholder='Search by Name'] - Placeholder text
|
|
27
|
+
* @param {string | ReactNode} [props.label] - Optional label above the search input
|
|
28
|
+
* @param {string} [props.value=''] - Current search value
|
|
29
|
+
* @param {(value: string) => void} [props.onSearch] - Callback fired when search value changes (debounced)
|
|
30
|
+
* @param {string} [props.className] - Additional CSS classes for the input wrapper
|
|
31
|
+
* @param {string} [props.containerClassName] - Additional CSS classes for the container
|
|
32
|
+
* @param {string} [props.inputClassName] - Additional CSS classes for the input element
|
|
33
|
+
* @returns {React.ReactElement} The rendered search bar component
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```tsx
|
|
37
|
+
* <SearchBar
|
|
38
|
+
* label="Search Users"
|
|
39
|
+
* placeholder="Enter username..."
|
|
40
|
+
* onSearch={handleSearch}
|
|
41
|
+
* />
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
18
44
|
export const SearchBar = ({
|
|
19
45
|
placeholder = 'Search by Name',
|
|
20
46
|
label,
|
|
@@ -33,6 +33,15 @@ export type SelectProps = {
|
|
|
33
33
|
loading?: boolean;
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
+
/**
|
|
37
|
+
* Helper function to get color CSS classes for select options
|
|
38
|
+
*
|
|
39
|
+
* Maps color names to Tailwind CSS classes for styling select options.
|
|
40
|
+
*
|
|
41
|
+
* @param {string} [color] - Color name ('red', 'green', 'blue', 'pink', 'yellow', 'orange', 'secondary')
|
|
42
|
+
* @returns {string} Tailwind CSS classes for the color
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
36
45
|
const getColorClasses = (
|
|
37
46
|
color?: 'red' | 'green' | 'blue' | 'pink' | 'yellow' | 'orange' | 'secondary',
|
|
38
47
|
) => {
|
|
@@ -56,6 +65,38 @@ const getColorClasses = (
|
|
|
56
65
|
}
|
|
57
66
|
};
|
|
58
67
|
|
|
68
|
+
/**
|
|
69
|
+
* Select component for single-value selection
|
|
70
|
+
*
|
|
71
|
+
* A select dropdown component with support for colors, loading states, and flexible sizing.
|
|
72
|
+
* Built on shadcn's Select component with additional enhancements.
|
|
73
|
+
*
|
|
74
|
+
* @component
|
|
75
|
+
* @param {SelectProps} props - The select properties
|
|
76
|
+
* @param {Array<{label: React.ReactNode, value: string | number, color?: string}>} props.options - Available select options
|
|
77
|
+
* @param {(value: string) => void} [props.onChange] - Callback fired when selection changes
|
|
78
|
+
* @param {string | number} [props.value] - Currently selected value (controlled)
|
|
79
|
+
* @param {string | number} [props.defaultValue] - Default selected value (uncontrolled)
|
|
80
|
+
* @param {string} [props.placeholder='Select an option...'] - Placeholder text when no value selected
|
|
81
|
+
* @param {boolean} [props.disabled] - Whether the select is disabled
|
|
82
|
+
* @param {boolean} [props.loading] - Whether options are loading
|
|
83
|
+
* @param {boolean} [props.fullWidth] - Whether the select takes full width
|
|
84
|
+
* @param {string} [props.className] - Additional CSS classes
|
|
85
|
+
* @returns {React.ReactElement} The rendered select component
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```tsx
|
|
89
|
+
* <Select
|
|
90
|
+
* options={[
|
|
91
|
+
* { label: 'Option 1', value: 'opt1', color: 'blue' },
|
|
92
|
+
* { label: 'Option 2', value: 'opt2', color: 'green' }
|
|
93
|
+
* ]}
|
|
94
|
+
* value={selected}
|
|
95
|
+
* onChange={setSelected}
|
|
96
|
+
* placeholder="Choose an option"
|
|
97
|
+
* />
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
59
100
|
export const Select = ({
|
|
60
101
|
options = [],
|
|
61
102
|
onChange,
|
|
@@ -18,6 +18,35 @@ export type CheckboxProps = {
|
|
|
18
18
|
'checked' | 'onChange' | 'onCheckedChange'
|
|
19
19
|
>;
|
|
20
20
|
|
|
21
|
+
/**
|
|
22
|
+
* SingleCheckBox component for single checkbox selection
|
|
23
|
+
*
|
|
24
|
+
* A checkbox component with label support, validation states, and required field indicators.
|
|
25
|
+
* Built on Radix UI's checkbox primitive.
|
|
26
|
+
*
|
|
27
|
+
* @component
|
|
28
|
+
* @param {CheckboxProps} props - The checkbox properties
|
|
29
|
+
* @param {ReactNode} props.label - Label text for the checkbox
|
|
30
|
+
* @param {boolean} [props.checked] - Whether the checkbox is checked (controlled)
|
|
31
|
+
* @param {(checked: boolean) => void} [props.onChange] - Callback when checked state changes
|
|
32
|
+
* @param {string} [props.name] - Name attribute for the checkbox
|
|
33
|
+
* @param {boolean} [props.required] - Whether the field is required
|
|
34
|
+
* @param {boolean} [props.disabled] - Whether the checkbox is disabled
|
|
35
|
+
* @param {string} [props.className] - Additional CSS classes for the checkbox
|
|
36
|
+
* @param {string} [props.labelClassName] - Additional CSS classes for the label
|
|
37
|
+
* @param {string} [props.containerClassName='flex items-center space-x-2'] - Additional CSS classes for the container
|
|
38
|
+
* @returns {React.ReactElement} The rendered checkbox component
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```tsx
|
|
42
|
+
* <SingleCheckBox
|
|
43
|
+
* label="I agree to the terms"
|
|
44
|
+
* checked={agreed}
|
|
45
|
+
* onChange={setAgreed}
|
|
46
|
+
* required
|
|
47
|
+
* />
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
21
50
|
export const SingleCheckBox = ({
|
|
22
51
|
checked,
|
|
23
52
|
label,
|