@campxdev/react-blueprint 3.0.0-alpha.4 → 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 +43 -1
- package/dist/cjs/types/src/components/Input/DatePicker/components/DatePickerFilter.d.ts +2 -0
- package/dist/cjs/types/src/components/Input/DatePicker/components/DatePickerInput.d.ts +2 -0
- package/dist/cjs/types/src/components/Input/DateTimePicker/DateTimePicker.d.ts +44 -1
- package/dist/cjs/types/src/components/Input/DateTimePicker/components/DateTimePickerFilter.d.ts +2 -0
- package/dist/cjs/types/src/components/Input/DateTimePicker/components/DateTimePickerInput.d.ts +2 -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 +42 -0
- package/dist/cjs/types/src/components/Input/MultiSelect/components/MultiSelectFilter.d.ts +1 -1
- package/dist/cjs/types/src/components/Input/MultiSelect/components/MultiSelectInput.d.ts +1 -1
- 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 +34 -1
- package/dist/cjs/types/src/components/Input/SingleCheckBox/SingleCheckBox.d.ts +29 -0
- package/dist/cjs/types/src/components/Input/SingleSelect/SingleSelect.d.ts +42 -0
- package/dist/cjs/types/src/components/Input/SingleSelect/components/SingleFilter.d.ts +1 -1
- package/dist/cjs/types/src/components/Input/SingleSelect/components/SingleInput.d.ts +1 -1
- 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/cjs/types/src/shadcn-components/Input/Select/Select.d.ts +2 -2
- 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 +43 -1
- package/dist/esm/types/src/components/Input/DatePicker/components/DatePickerFilter.d.ts +2 -0
- package/dist/esm/types/src/components/Input/DatePicker/components/DatePickerInput.d.ts +2 -0
- package/dist/esm/types/src/components/Input/DateTimePicker/DateTimePicker.d.ts +44 -1
- package/dist/esm/types/src/components/Input/DateTimePicker/components/DateTimePickerFilter.d.ts +2 -0
- package/dist/esm/types/src/components/Input/DateTimePicker/components/DateTimePickerInput.d.ts +2 -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 +42 -0
- package/dist/esm/types/src/components/Input/MultiSelect/components/MultiSelectFilter.d.ts +1 -1
- package/dist/esm/types/src/components/Input/MultiSelect/components/MultiSelectInput.d.ts +1 -1
- 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 +34 -1
- package/dist/esm/types/src/components/Input/SingleCheckBox/SingleCheckBox.d.ts +29 -0
- package/dist/esm/types/src/components/Input/SingleSelect/SingleSelect.d.ts +42 -0
- package/dist/esm/types/src/components/Input/SingleSelect/components/SingleFilter.d.ts +1 -1
- package/dist/esm/types/src/components/Input/SingleSelect/components/SingleInput.d.ts +1 -1
- 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/esm/types/src/shadcn-components/Input/Select/Select.d.ts +2 -2
- package/dist/index.d.ts +2963 -15
- package/dist/styles.css +402 -13
- 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/DataTable/components/TableView.tsx +31 -5
- 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 +71 -3
- package/src/components/Input/Button/Button.tsx +26 -0
- package/src/components/Input/Button/ButtonLoader.css +2 -2
- package/src/components/Input/DatePicker/DatePicker.tsx +50 -188
- package/src/components/Input/DatePicker/components/DatePickerFilter.tsx +178 -0
- package/src/components/Input/DatePicker/components/DatePickerInput.tsx +192 -0
- package/src/components/Input/DateTimePicker/DateTimePicker.tsx +50 -294
- package/src/components/Input/DateTimePicker/components/DateTimePickerFilter.tsx +292 -0
- package/src/components/Input/DateTimePicker/components/DateTimePickerInput.tsx +297 -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 +42 -0
- package/src/components/Input/MultiSelect/components/MultiSelectFilter.tsx +7 -3
- package/src/components/Input/MultiSelect/components/MultiSelectInput.tsx +8 -3
- 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 +63 -12
- package/src/components/Input/SingleCheckBox/SingleCheckBox.tsx +29 -0
- package/src/components/Input/SingleSelect/SingleSelect.tsx +42 -0
- package/src/components/Input/SingleSelect/components/SingleFilter.tsx +7 -3
- package/src/components/Input/SingleSelect/components/SingleInput.tsx +8 -3
- 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 +70 -1
- package/src/components/Navigation/DropDownMenu/DropDownMenu.tsx +74 -1
- 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 +81 -1
- package/src/components/Navigation/UploadDialog/UploadDialog.tsx +64 -0
- package/src/shadcn-components/DataDisplay/Dialog/Dialog.tsx +2 -2
- package/src/shadcn-components/Input/Popover/Popover.tsx +1 -1
- package/src/shadcn-components/Input/Select/Select.tsx +8 -8
- package/src/shadcn-components/Layout/Sheet/Sheet.tsx +2 -2
- package/src/shadcn-components/Navigation/DropdownMenu/DropdownMenu.tsx +2 -2
- package/src/styles/globals.css +4 -2
- package/src/styles/index.css +5 -0
|
@@ -42,8 +42,50 @@ export type MultiSelectProps = {
|
|
|
42
42
|
type?: 'input' | 'filter';
|
|
43
43
|
disableClear?: boolean;
|
|
44
44
|
fullWidth?: boolean;
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
loading?: boolean;
|
|
45
47
|
};
|
|
46
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
|
+
*/
|
|
47
89
|
export const MultiSelect = ({
|
|
48
90
|
options,
|
|
49
91
|
optionsApiEndPoint,
|
|
@@ -46,6 +46,8 @@ export const MultiSelectFilter = ({
|
|
|
46
46
|
handleClearAll,
|
|
47
47
|
state,
|
|
48
48
|
disableClear = false,
|
|
49
|
+
disabled = false,
|
|
50
|
+
loading = false,
|
|
49
51
|
}: MultiSelectFilterProps) => {
|
|
50
52
|
const {
|
|
51
53
|
open,
|
|
@@ -101,8 +103,10 @@ export const MultiSelectFilter = ({
|
|
|
101
103
|
|
|
102
104
|
return (
|
|
103
105
|
<Popover
|
|
104
|
-
open={open}
|
|
106
|
+
open={open && !disabled}
|
|
105
107
|
onOpenChange={(isOpen) => {
|
|
108
|
+
if (disabled) return;
|
|
109
|
+
|
|
106
110
|
const syntheticEvent = {
|
|
107
111
|
currentTarget: {},
|
|
108
112
|
target: {},
|
|
@@ -115,7 +119,7 @@ export const MultiSelectFilter = ({
|
|
|
115
119
|
}
|
|
116
120
|
}}
|
|
117
121
|
>
|
|
118
|
-
<PopoverTrigger asChild>
|
|
122
|
+
<PopoverTrigger asChild disabled={disabled}>
|
|
119
123
|
<span
|
|
120
124
|
ref={wrapperRef}
|
|
121
125
|
style={{ display: 'inline-block', width: '100%' }}
|
|
@@ -125,7 +129,7 @@ export const MultiSelectFilter = ({
|
|
|
125
129
|
role="combobox"
|
|
126
130
|
aria-expanded={open}
|
|
127
131
|
className="justify-between w-full"
|
|
128
|
-
disabled={loadingInitialInternalOptions}
|
|
132
|
+
disabled={disabled || loading || loadingInitialInternalOptions}
|
|
129
133
|
>
|
|
130
134
|
{displayText || label}
|
|
131
135
|
<ChevronDown className="ml-2 h-4 w-4 shrink-0 opacity-50" />
|
|
@@ -55,6 +55,8 @@ export const MultiSelectInput = ({
|
|
|
55
55
|
state,
|
|
56
56
|
disableClear = false,
|
|
57
57
|
fullWidth,
|
|
58
|
+
disabled = false,
|
|
59
|
+
loading = false,
|
|
58
60
|
}: MultiSelectInputProps) => {
|
|
59
61
|
const {
|
|
60
62
|
open,
|
|
@@ -88,7 +90,7 @@ export const MultiSelectInput = ({
|
|
|
88
90
|
.map((val) => internalOptionsMap[val])
|
|
89
91
|
.filter(Boolean);
|
|
90
92
|
|
|
91
|
-
if (loadingInitialInternalOptions) {
|
|
93
|
+
if (loadingInitialInternalOptions || loading) {
|
|
92
94
|
return (
|
|
93
95
|
<TextField
|
|
94
96
|
label={label}
|
|
@@ -117,8 +119,10 @@ export const MultiSelectInput = ({
|
|
|
117
119
|
}}
|
|
118
120
|
>
|
|
119
121
|
<Popover
|
|
120
|
-
open={open}
|
|
122
|
+
open={open && !disabled}
|
|
121
123
|
onOpenChange={(isOpen) => {
|
|
124
|
+
if (disabled) return;
|
|
125
|
+
|
|
122
126
|
const syntheticEvent = {
|
|
123
127
|
currentTarget: {},
|
|
124
128
|
target: {},
|
|
@@ -131,7 +135,7 @@ export const MultiSelectInput = ({
|
|
|
131
135
|
}
|
|
132
136
|
}}
|
|
133
137
|
>
|
|
134
|
-
<PopoverTrigger asChild>
|
|
138
|
+
<PopoverTrigger asChild disabled={disabled}>
|
|
135
139
|
<span
|
|
136
140
|
ref={wrapperRef}
|
|
137
141
|
style={{ display: fullWidth ? 'block' : 'inline-block' }}
|
|
@@ -141,6 +145,7 @@ export const MultiSelectInput = ({
|
|
|
141
145
|
role="combobox"
|
|
142
146
|
aria-expanded={open}
|
|
143
147
|
aria-invalid={!!error}
|
|
148
|
+
disabled={disabled}
|
|
144
149
|
className={cn(
|
|
145
150
|
'justify-between font-normal min-h-[40px] h-auto',
|
|
146
151
|
fullWidth ? 'w-full' : 'w-auto',
|
|
@@ -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,
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
SelectValue,
|
|
7
7
|
Select as ShadcnSelect,
|
|
8
8
|
} from '@/shadcn-components/Input/Select/Select';
|
|
9
|
+
import { Loader2 } from 'lucide-react';
|
|
9
10
|
import * as React from 'react';
|
|
10
11
|
import { useEffect, useRef, useState } from 'react';
|
|
11
12
|
|
|
@@ -29,8 +30,18 @@ export type SelectProps = {
|
|
|
29
30
|
className?: string;
|
|
30
31
|
disabled?: boolean;
|
|
31
32
|
fullWidth?: boolean;
|
|
33
|
+
loading?: boolean;
|
|
32
34
|
};
|
|
33
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
|
+
*/
|
|
34
45
|
const getColorClasses = (
|
|
35
46
|
color?: 'red' | 'green' | 'blue' | 'pink' | 'yellow' | 'orange' | 'secondary',
|
|
36
47
|
) => {
|
|
@@ -54,6 +65,38 @@ const getColorClasses = (
|
|
|
54
65
|
}
|
|
55
66
|
};
|
|
56
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
|
+
*/
|
|
57
100
|
export const Select = ({
|
|
58
101
|
options = [],
|
|
59
102
|
onChange,
|
|
@@ -63,6 +106,7 @@ export const Select = ({
|
|
|
63
106
|
defaultValue,
|
|
64
107
|
disabled = false,
|
|
65
108
|
fullWidth = false,
|
|
109
|
+
loading = false,
|
|
66
110
|
}: SelectProps) => {
|
|
67
111
|
const wrapperRef = useRef<HTMLDivElement>(null);
|
|
68
112
|
|
|
@@ -111,18 +155,25 @@ export const Select = ({
|
|
|
111
155
|
</SelectTrigger>
|
|
112
156
|
</div>
|
|
113
157
|
<SelectContent>
|
|
114
|
-
{
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
<
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
158
|
+
{loading ? (
|
|
159
|
+
<div className="flex flex-col items-center justify-center py-8 px-4">
|
|
160
|
+
<Loader2 className="h-6 w-6 animate-spin text-muted-foreground mb-2" />
|
|
161
|
+
<p className="text-sm text-muted-foreground">Loading...</p>
|
|
162
|
+
</div>
|
|
163
|
+
) : (
|
|
164
|
+
options?.map((item, index) => {
|
|
165
|
+
const itemColorClasses = getColorClasses(item.color);
|
|
166
|
+
return (
|
|
167
|
+
<SelectItem
|
|
168
|
+
key={index}
|
|
169
|
+
value={item.value.toString()}
|
|
170
|
+
className={cn(itemColorClasses)}
|
|
171
|
+
>
|
|
172
|
+
{item.label}
|
|
173
|
+
</SelectItem>
|
|
174
|
+
);
|
|
175
|
+
})
|
|
176
|
+
)}
|
|
126
177
|
</SelectContent>
|
|
127
178
|
</ShadcnSelect>
|
|
128
179
|
);
|
|
@@ -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,
|
|
@@ -50,8 +50,50 @@ export type SingleSelectProps = {
|
|
|
50
50
|
type?: 'input' | 'filter';
|
|
51
51
|
disableClear?: boolean;
|
|
52
52
|
fullWidth?: boolean;
|
|
53
|
+
disabled?: boolean;
|
|
54
|
+
loading?: boolean;
|
|
53
55
|
};
|
|
54
56
|
|
|
57
|
+
/**
|
|
58
|
+
* SingleSelect component for single-value selection
|
|
59
|
+
*
|
|
60
|
+
* A feature-rich single-select component supporting both local and API-driven options,
|
|
61
|
+
* with search, pagination, filtering, and flexible display modes.
|
|
62
|
+
*
|
|
63
|
+
* @component
|
|
64
|
+
* @param {SingleSelectProps} props - The select properties
|
|
65
|
+
* @param {Array<{label: string, subLabel?: string, value: any, icon?: ReactNode}>} [props.options] - Static options array
|
|
66
|
+
* @param {string} [props.optionsApiEndPoint] - API endpoint for dynamic options loading
|
|
67
|
+
* @param {any} [props.optionsApiEndpointParams] - Additional parameters for API requests
|
|
68
|
+
* @param {AxiosInstance} [props.externalAxios] - Custom axios instance for API calls
|
|
69
|
+
* @param {any} [props.value] - Currently selected value
|
|
70
|
+
* @param {(value: any) => void} [props.onChange] - Callback fired when selection changes
|
|
71
|
+
* @param {(option: any) => any} [props.getValue] - Function to extract value from option object
|
|
72
|
+
* @param {{valueKey: string, isObjectId?: boolean, isInt?: boolean, isFloat?: boolean}} [props.dbValueProps] - Database value mapping properties
|
|
73
|
+
* @param {{labelKey: string, subLabelKey?: string, useLabelStartCase?: boolean, useSubLabelStartCase?: boolean}} [props.dbLabelProps] - Database label mapping properties
|
|
74
|
+
* @param {string} [props.label] - Label for the select
|
|
75
|
+
* @param {string} [props.name] - Name attribute
|
|
76
|
+
* @param {boolean} [props.required] - Whether the field is required
|
|
77
|
+
* @param {boolean} [props.disabled] - Whether the select is disabled
|
|
78
|
+
* @param {boolean} [props.loading] - Whether options are loading
|
|
79
|
+
* @param {boolean} [props.disableClear] - Whether to hide the clear button
|
|
80
|
+
* @param {boolean} [props.fullWidth] - Whether the select takes full width
|
|
81
|
+
* @param {'input' | 'filter'} [props.type='input'] - Display type
|
|
82
|
+
* @param {(event: SyntheticEvent) => void} [props.onOpen] - Callback when menu opens
|
|
83
|
+
* @param {(event: SyntheticEvent, reason: string) => void} [props.onClose] - Callback when menu closes
|
|
84
|
+
* @returns {React.ReactElement} The rendered single-select component
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```tsx
|
|
88
|
+
* <SingleSelect
|
|
89
|
+
* label="Select User"
|
|
90
|
+
* value={selectedUser}
|
|
91
|
+
* onChange={setSelectedUser}
|
|
92
|
+
* options={users}
|
|
93
|
+
* required
|
|
94
|
+
* />
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
55
97
|
export const SingleSelect = ({
|
|
56
98
|
options,
|
|
57
99
|
optionsApiEndPoint,
|
|
@@ -43,6 +43,8 @@ export const SingleFilter = ({
|
|
|
43
43
|
state,
|
|
44
44
|
disableClear = false,
|
|
45
45
|
fullWidth,
|
|
46
|
+
disabled = false,
|
|
47
|
+
loading = false,
|
|
46
48
|
}: SingleFilterProps) => {
|
|
47
49
|
const {
|
|
48
50
|
open,
|
|
@@ -82,8 +84,10 @@ export const SingleFilter = ({
|
|
|
82
84
|
|
|
83
85
|
return (
|
|
84
86
|
<Popover
|
|
85
|
-
open={open}
|
|
87
|
+
open={open && !disabled}
|
|
86
88
|
onOpenChange={(isOpen) => {
|
|
89
|
+
if (disabled) return;
|
|
90
|
+
|
|
87
91
|
const syntheticEvent = {
|
|
88
92
|
currentTarget: {},
|
|
89
93
|
target: {},
|
|
@@ -96,7 +100,7 @@ export const SingleFilter = ({
|
|
|
96
100
|
}
|
|
97
101
|
}}
|
|
98
102
|
>
|
|
99
|
-
<PopoverTrigger asChild>
|
|
103
|
+
<PopoverTrigger asChild disabled={disabled}>
|
|
100
104
|
<span
|
|
101
105
|
ref={wrapperRef}
|
|
102
106
|
style={{ display: fullWidth ? 'block' : 'inline-block' }}
|
|
@@ -106,7 +110,7 @@ export const SingleFilter = ({
|
|
|
106
110
|
role="combobox"
|
|
107
111
|
aria-expanded={open}
|
|
108
112
|
className={cn('justify-between', fullWidth ? 'w-full' : '')}
|
|
109
|
-
disabled={loadingInitialInternalOptions}
|
|
113
|
+
disabled={disabled || loading || loadingInitialInternalOptions}
|
|
110
114
|
>
|
|
111
115
|
{selectedOption ? `${label} = ${selectedOption.label}` : label}
|
|
112
116
|
<ChevronDown className="ml-2 h-4 w-4 shrink-0 opacity-50" />
|
|
@@ -48,6 +48,8 @@ export const SingleInput = ({
|
|
|
48
48
|
handleScroll,
|
|
49
49
|
state,
|
|
50
50
|
fullWidth,
|
|
51
|
+
disabled = false,
|
|
52
|
+
loading = false,
|
|
51
53
|
}: SingleInputProps) => {
|
|
52
54
|
const {
|
|
53
55
|
open,
|
|
@@ -77,7 +79,7 @@ export const SingleInput = ({
|
|
|
77
79
|
|
|
78
80
|
const selectedOption = internalOptionsMap[value];
|
|
79
81
|
|
|
80
|
-
if (loadingInitialInternalOptions) {
|
|
82
|
+
if (loadingInitialInternalOptions || loading) {
|
|
81
83
|
return (
|
|
82
84
|
<TextField
|
|
83
85
|
label={label}
|
|
@@ -103,8 +105,10 @@ export const SingleInput = ({
|
|
|
103
105
|
}}
|
|
104
106
|
>
|
|
105
107
|
<Popover
|
|
106
|
-
open={open}
|
|
108
|
+
open={open && !disabled}
|
|
107
109
|
onOpenChange={(isOpen) => {
|
|
110
|
+
if (disabled) return;
|
|
111
|
+
|
|
108
112
|
const syntheticEvent = {
|
|
109
113
|
currentTarget: {},
|
|
110
114
|
target: {},
|
|
@@ -117,7 +121,7 @@ export const SingleInput = ({
|
|
|
117
121
|
}
|
|
118
122
|
}}
|
|
119
123
|
>
|
|
120
|
-
<PopoverTrigger asChild>
|
|
124
|
+
<PopoverTrigger asChild disabled={disabled}>
|
|
121
125
|
<span
|
|
122
126
|
ref={wrapperRef}
|
|
123
127
|
style={{ display: fullWidth ? 'block' : 'inline-block' }}
|
|
@@ -127,6 +131,7 @@ export const SingleInput = ({
|
|
|
127
131
|
role="combobox"
|
|
128
132
|
aria-expanded={open}
|
|
129
133
|
aria-invalid={!!error}
|
|
134
|
+
disabled={disabled}
|
|
130
135
|
className={cn(
|
|
131
136
|
'justify-between font-normal',
|
|
132
137
|
fullWidth ? 'w-full' : 'w-auto',
|
|
@@ -7,6 +7,29 @@ export interface SwitchProps
|
|
|
7
7
|
label?: string;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Switch component for boolean toggle input
|
|
12
|
+
*
|
|
13
|
+
* A toggle switch component with optional label support, built on shadcn's Switch.
|
|
14
|
+
* Renders a label beside the switch if provided.
|
|
15
|
+
*
|
|
16
|
+
* @component
|
|
17
|
+
* @param {SwitchProps} props - The switch properties
|
|
18
|
+
* @param {string} [props.label] - Optional label text to display next to the switch
|
|
19
|
+
* @param {boolean} [props.checked] - Whether the switch is checked
|
|
20
|
+
* @param {(checked: boolean) => void} [props.onCheckedChange] - Callback when switch state changes
|
|
21
|
+
* @param {boolean} [props.disabled] - Whether the switch is disabled
|
|
22
|
+
* @returns {React.ReactElement} The rendered switch component
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <Switch
|
|
27
|
+
* label="Enable notifications"
|
|
28
|
+
* checked={enabled}
|
|
29
|
+
* onCheckedChange={setEnabled}
|
|
30
|
+
* />
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
10
33
|
export const Switch = React.forwardRef<
|
|
11
34
|
React.ElementRef<typeof ShadcnSwitch>,
|
|
12
35
|
SwitchProps
|
|
@@ -9,6 +9,32 @@ export type TagsProps = {
|
|
|
9
9
|
className?: string;
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Tags component for displaying and managing tag badges
|
|
14
|
+
*
|
|
15
|
+
* A component that renders a collection of tags/badges with optional delete functionality.
|
|
16
|
+
* Useful for displaying categories, labels, or removable items.
|
|
17
|
+
*
|
|
18
|
+
* @component
|
|
19
|
+
* @param {TagsProps} props - The tags properties
|
|
20
|
+
* @param {Array<{label: string, value: any}>} props.tags - Array of tags to display
|
|
21
|
+
* @param {(deletedChip: any) => void} [props.onDelete] - Callback fired when a tag is deleted
|
|
22
|
+
* @param {'default' | 'secondary' | 'destructive' | 'outline'} [props.variant='secondary'] - Badge variant style
|
|
23
|
+
* @param {string} [props.className] - Additional CSS classes for the container
|
|
24
|
+
* @returns {React.ReactElement} The rendered tags component
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* <Tags
|
|
29
|
+
* tags={[
|
|
30
|
+
* { label: 'React', value: 'react' },
|
|
31
|
+
* { label: 'TypeScript', value: 'ts' }
|
|
32
|
+
* ]}
|
|
33
|
+
* onDelete={handleTagDelete}
|
|
34
|
+
* variant="secondary"
|
|
35
|
+
* />
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
12
38
|
export const Tags = ({
|
|
13
39
|
tags,
|
|
14
40
|
onDelete,
|
|
@@ -14,6 +14,41 @@ export type TextFieldProps = {
|
|
|
14
14
|
helperText?: React.ReactNode;
|
|
15
15
|
} & React.ComponentProps<typeof Input>;
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* TextField component for text input
|
|
19
|
+
*
|
|
20
|
+
* A general-purpose text input field with label support, validation states,
|
|
21
|
+
* helper/error text, and optional description.
|
|
22
|
+
*
|
|
23
|
+
* @component
|
|
24
|
+
* @param {TextFieldProps} props - The text field properties
|
|
25
|
+
* @param {React.ReactNode | string} [props.label] - Label for the field
|
|
26
|
+
* @param {string} [props.name] - Name attribute for the input
|
|
27
|
+
* @param {string} [props.value] - Current input value
|
|
28
|
+
* @param {(e: React.ChangeEvent<HTMLInputElement>) => void} [props.onChange] - Callback when value changes
|
|
29
|
+
* @param {string} [props.placeholder] - Placeholder text
|
|
30
|
+
* @param {boolean} [props.required] - Whether the field is required
|
|
31
|
+
* @param {boolean} [props.disabled] - Whether the field is disabled
|
|
32
|
+
* @param {boolean} [props.error] - Whether there's a validation error
|
|
33
|
+
* @param {React.ReactNode} [props.helperText] - Helper or error text
|
|
34
|
+
* @param {string} [props.description] - Additional description text
|
|
35
|
+
* @param {boolean} [props.fullWidth] - Whether the field takes full width
|
|
36
|
+
* @param {string} [props.className] - Additional CSS classes
|
|
37
|
+
* @param {React.HTMLAttributes<HTMLDivElement>} [props.containerProps] - Container attributes
|
|
38
|
+
* @returns {React.ReactElement} The rendered text field component
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```tsx
|
|
42
|
+
* <TextField
|
|
43
|
+
* label="Username"
|
|
44
|
+
* name="username"
|
|
45
|
+
* value={username}
|
|
46
|
+
* onChange={(e) => setUsername(e.target.value)}
|
|
47
|
+
* placeholder="Enter your username"
|
|
48
|
+
* required
|
|
49
|
+
* />
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
17
52
|
export const TextField = ({
|
|
18
53
|
name,
|
|
19
54
|
label,
|