@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
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
import { cn } from '@/lib/utils';
|
|
2
|
+
import { Calendar } from '@/shadcn-components/Input/Calendar/Calendar';
|
|
3
|
+
import { Input } from '@/shadcn-components/Input/Input/Input';
|
|
4
|
+
import {
|
|
5
|
+
Popover,
|
|
6
|
+
PopoverContent,
|
|
7
|
+
PopoverTrigger,
|
|
8
|
+
} from '@/shadcn-components/Input/Popover/Popover';
|
|
9
|
+
import { format as DateFnsFormat } from 'date-fns';
|
|
10
|
+
import { CalendarDays } from 'lucide-react';
|
|
11
|
+
import { cloneElement, useEffect, useMemo, useRef, useState } from 'react';
|
|
12
|
+
import { Typography } from '../../../DataDisplay/Typography/Typography';
|
|
13
|
+
import { Button } from '../../Button/Button';
|
|
14
|
+
import { LabelWrapper } from '../../LabelWrapper/LabelWrapper';
|
|
15
|
+
import { DateTimePickerProps } from '../DateTimePicker';
|
|
16
|
+
|
|
17
|
+
export const DateTimePickerInput = ({
|
|
18
|
+
label,
|
|
19
|
+
name,
|
|
20
|
+
value,
|
|
21
|
+
onChange,
|
|
22
|
+
required = false,
|
|
23
|
+
format = 'dd MMM yyyy hh:mm a',
|
|
24
|
+
views = ['year', 'month', 'day', 'hours', 'minutes', 'seconds'],
|
|
25
|
+
helperText,
|
|
26
|
+
placeholder = 'Pick a date and time',
|
|
27
|
+
shortcutsItems = [],
|
|
28
|
+
openPickerIcon: Icon = <CalendarDays />,
|
|
29
|
+
containerProps,
|
|
30
|
+
error,
|
|
31
|
+
disabled = false,
|
|
32
|
+
minDate,
|
|
33
|
+
maxDate,
|
|
34
|
+
disablePast = false,
|
|
35
|
+
disableFuture = false,
|
|
36
|
+
shouldDisableDate,
|
|
37
|
+
shouldDisableMonth,
|
|
38
|
+
shouldDisableYear,
|
|
39
|
+
className,
|
|
40
|
+
onOpen,
|
|
41
|
+
onClose,
|
|
42
|
+
fullWidth,
|
|
43
|
+
type,
|
|
44
|
+
...rest
|
|
45
|
+
}: DateTimePickerProps) => {
|
|
46
|
+
const [open, setOpen] = useState(false);
|
|
47
|
+
const [timeValue, setTimeValue] = useState<string>('');
|
|
48
|
+
const wrapperRef = useRef<HTMLSpanElement>(null);
|
|
49
|
+
|
|
50
|
+
// Determine view configurations based on views prop
|
|
51
|
+
const viewConfig = useMemo(() => {
|
|
52
|
+
const hasTime =
|
|
53
|
+
views.includes('hours') ||
|
|
54
|
+
views.includes('minutes') ||
|
|
55
|
+
views.includes('seconds');
|
|
56
|
+
const hasDate =
|
|
57
|
+
views.includes('day') ||
|
|
58
|
+
views.includes('month') ||
|
|
59
|
+
views.includes('year');
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
showTime: hasTime,
|
|
63
|
+
showDate: hasDate,
|
|
64
|
+
};
|
|
65
|
+
}, [views]);
|
|
66
|
+
|
|
67
|
+
// Update time value when value changes
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
if (value && viewConfig.showTime) {
|
|
70
|
+
const hours = value.getHours(),
|
|
71
|
+
minutes = value.getMinutes(),
|
|
72
|
+
seconds = value.getSeconds(),
|
|
73
|
+
timeStr = `${String(hours).padStart(2, '0')}:${String(minutes).padStart(
|
|
74
|
+
2,
|
|
75
|
+
'0',
|
|
76
|
+
)}:${String(seconds).padStart(2, '0')}`;
|
|
77
|
+
setTimeValue(timeStr);
|
|
78
|
+
}
|
|
79
|
+
}, [value, viewConfig.showTime]);
|
|
80
|
+
|
|
81
|
+
const formatDateTimeString = (date: Date | undefined) => {
|
|
82
|
+
if (!date) return '';
|
|
83
|
+
|
|
84
|
+
try {
|
|
85
|
+
return DateFnsFormat(date, format);
|
|
86
|
+
} catch {
|
|
87
|
+
return DateFnsFormat(date, 'dd/MM/yyyy hh:mm a');
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const handleOpenChange = (newOpen: boolean) => {
|
|
92
|
+
setOpen(newOpen);
|
|
93
|
+
if (newOpen && onOpen) {
|
|
94
|
+
onOpen();
|
|
95
|
+
} else if (!newOpen && onClose) {
|
|
96
|
+
onClose();
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const handleDateSelect = (date: Date | undefined) => {
|
|
101
|
+
if (date) {
|
|
102
|
+
const newDateTime = new Date(date);
|
|
103
|
+
// Preserve existing time if we have one
|
|
104
|
+
if (value) {
|
|
105
|
+
newDateTime.setHours(
|
|
106
|
+
value.getHours(),
|
|
107
|
+
value.getMinutes(),
|
|
108
|
+
value.getSeconds(),
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
onChange?.(newDateTime);
|
|
112
|
+
} else {
|
|
113
|
+
onChange?.(undefined);
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
const handleTimeChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
118
|
+
const timeStr = e.target.value;
|
|
119
|
+
setTimeValue(timeStr);
|
|
120
|
+
|
|
121
|
+
if (timeStr) {
|
|
122
|
+
const [hours, minutes, seconds] = timeStr.split(':').map(Number);
|
|
123
|
+
const newDateTime = value ? new Date(value) : new Date();
|
|
124
|
+
newDateTime.setHours(hours || 0, minutes || 0, seconds || 0);
|
|
125
|
+
onChange?.(newDateTime);
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const [, forceUpdate] = useState({});
|
|
130
|
+
useEffect(() => {
|
|
131
|
+
forceUpdate({});
|
|
132
|
+
}, []);
|
|
133
|
+
|
|
134
|
+
// If only time selection (no date), render native time input directly
|
|
135
|
+
if (viewConfig.showTime && !viewConfig.showDate) {
|
|
136
|
+
return (
|
|
137
|
+
<LabelWrapper
|
|
138
|
+
label={label}
|
|
139
|
+
required={required}
|
|
140
|
+
name={name}
|
|
141
|
+
containerProps={containerProps}
|
|
142
|
+
>
|
|
143
|
+
<Input
|
|
144
|
+
type="time"
|
|
145
|
+
step="1"
|
|
146
|
+
value={timeValue}
|
|
147
|
+
onChange={handleTimeChange}
|
|
148
|
+
disabled={disabled}
|
|
149
|
+
placeholder={placeholder}
|
|
150
|
+
className={cn(
|
|
151
|
+
'bg-input-background border-none text-muted-foreground',
|
|
152
|
+
error && 'border-destructive',
|
|
153
|
+
className,
|
|
154
|
+
)}
|
|
155
|
+
{...rest}
|
|
156
|
+
/>
|
|
157
|
+
|
|
158
|
+
{/* Helper Text / Error */}
|
|
159
|
+
{(helperText || error) && (
|
|
160
|
+
<Typography
|
|
161
|
+
variant="small"
|
|
162
|
+
className={cn('ml-1 mt-1', error && 'text-destructive')}
|
|
163
|
+
>
|
|
164
|
+
{typeof error === 'string' ? error : error?.message || helperText}
|
|
165
|
+
</Typography>
|
|
166
|
+
)}
|
|
167
|
+
</LabelWrapper>
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
return (
|
|
172
|
+
<LabelWrapper
|
|
173
|
+
label={label}
|
|
174
|
+
required={required}
|
|
175
|
+
name={name}
|
|
176
|
+
containerProps={{
|
|
177
|
+
...(fullWidth && { style: { width: '100%' } }),
|
|
178
|
+
...containerProps,
|
|
179
|
+
}}
|
|
180
|
+
>
|
|
181
|
+
<Popover open={open} onOpenChange={handleOpenChange}>
|
|
182
|
+
<PopoverTrigger asChild>
|
|
183
|
+
<span
|
|
184
|
+
ref={wrapperRef}
|
|
185
|
+
style={{ display: fullWidth ? 'block' : 'inline-block' }}
|
|
186
|
+
>
|
|
187
|
+
<Button
|
|
188
|
+
variant="input"
|
|
189
|
+
className={cn(
|
|
190
|
+
'w-full justify-between text-left font-normal',
|
|
191
|
+
!value && 'text-muted-foreground',
|
|
192
|
+
error && 'border-destructive',
|
|
193
|
+
fullWidth ? 'w-full' : 'w-auto',
|
|
194
|
+
className,
|
|
195
|
+
)}
|
|
196
|
+
disabled={disabled}
|
|
197
|
+
{...rest}
|
|
198
|
+
>
|
|
199
|
+
<span>
|
|
200
|
+
{value ? formatDateTimeString(value) : placeholder}
|
|
201
|
+
</span>
|
|
202
|
+
{Icon &&
|
|
203
|
+
cloneElement(Icon as React.ReactElement, {
|
|
204
|
+
className: 'ml-2 h-4 w-4 ',
|
|
205
|
+
})}
|
|
206
|
+
</Button>
|
|
207
|
+
</span>
|
|
208
|
+
</PopoverTrigger>
|
|
209
|
+
<PopoverContent className="w-auto p-0" align="start">
|
|
210
|
+
<div className="flex flex-col">
|
|
211
|
+
{/* Shortcuts */}
|
|
212
|
+
{shortcutsItems.length > 0 && (
|
|
213
|
+
<div className="border-b p-2">
|
|
214
|
+
<div className="flex flex-wrap gap-1">
|
|
215
|
+
{shortcutsItems.map((shortcut, index) => (
|
|
216
|
+
<Button
|
|
217
|
+
key={index}
|
|
218
|
+
variant="outline"
|
|
219
|
+
size="sm"
|
|
220
|
+
onClick={() => {
|
|
221
|
+
const newDate = shortcut.getValue();
|
|
222
|
+
onChange?.(newDate);
|
|
223
|
+
setOpen(false);
|
|
224
|
+
}}
|
|
225
|
+
>
|
|
226
|
+
{shortcut.label}
|
|
227
|
+
</Button>
|
|
228
|
+
))}
|
|
229
|
+
</div>
|
|
230
|
+
</div>
|
|
231
|
+
)}
|
|
232
|
+
|
|
233
|
+
{/* Calendar */}
|
|
234
|
+
{viewConfig.showDate && (
|
|
235
|
+
<Calendar
|
|
236
|
+
mode="single"
|
|
237
|
+
selected={value}
|
|
238
|
+
onSelect={handleDateSelect}
|
|
239
|
+
disabled={(date) => {
|
|
240
|
+
const today = new Date();
|
|
241
|
+
today.setHours(0, 0, 0, 0);
|
|
242
|
+
const compareDate = new Date(date);
|
|
243
|
+
compareDate.setHours(0, 0, 0, 0);
|
|
244
|
+
|
|
245
|
+
if (minDate) {
|
|
246
|
+
const min = new Date(minDate);
|
|
247
|
+
min.setHours(0, 0, 0, 0);
|
|
248
|
+
if (compareDate < min) return true;
|
|
249
|
+
}
|
|
250
|
+
if (maxDate) {
|
|
251
|
+
const max = new Date(maxDate);
|
|
252
|
+
max.setHours(0, 0, 0, 0);
|
|
253
|
+
if (compareDate > max) return true;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
if (disablePast && compareDate < today) return true;
|
|
257
|
+
if (disableFuture && compareDate > today) return true;
|
|
258
|
+
if (shouldDisableDate && shouldDisableDate(date)) return true;
|
|
259
|
+
if (shouldDisableMonth && shouldDisableMonth(date))
|
|
260
|
+
return true;
|
|
261
|
+
if (shouldDisableYear && shouldDisableYear(date)) return true;
|
|
262
|
+
|
|
263
|
+
return false;
|
|
264
|
+
}}
|
|
265
|
+
captionLayout={'dropdown'}
|
|
266
|
+
defaultMonth={value}
|
|
267
|
+
/>
|
|
268
|
+
)}
|
|
269
|
+
|
|
270
|
+
{/* Time Picker */}
|
|
271
|
+
{viewConfig.showTime && (
|
|
272
|
+
<div className={cn('p-3', viewConfig.showDate && 'border-t')}>
|
|
273
|
+
<Input
|
|
274
|
+
type="time"
|
|
275
|
+
step="1"
|
|
276
|
+
value={timeValue}
|
|
277
|
+
onChange={handleTimeChange}
|
|
278
|
+
className="bg-input-background border-none text-muted-foreground appearance-none [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-calendar-picker-indicator]:appearance-none"
|
|
279
|
+
/>
|
|
280
|
+
</div>
|
|
281
|
+
)}
|
|
282
|
+
</div>
|
|
283
|
+
</PopoverContent>
|
|
284
|
+
</Popover>
|
|
285
|
+
|
|
286
|
+
{/* Helper Text / Error */}
|
|
287
|
+
{(helperText || error) && (
|
|
288
|
+
<Typography
|
|
289
|
+
variant="small"
|
|
290
|
+
className={cn('ml-1 mt-1', error && 'text-destructive')}
|
|
291
|
+
>
|
|
292
|
+
{typeof error === 'string' ? error : error?.message || helperText}
|
|
293
|
+
</Typography>
|
|
294
|
+
)}
|
|
295
|
+
</LabelWrapper>
|
|
296
|
+
);
|
|
297
|
+
};
|
|
@@ -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,
|