@campxdev/react-blueprint 3.0.0-alpha.5 → 3.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/types/src/components/Assets/ErrorPages/ComingSoon.d.ts +24 -0
- package/dist/cjs/types/src/components/Assets/ErrorPages/InternalServerError.d.ts +20 -0
- package/dist/cjs/types/src/components/Assets/ErrorPages/NoInternetConnection.d.ts +20 -0
- package/dist/cjs/types/src/components/Assets/ErrorPages/NoItemFound.d.ts +28 -0
- package/dist/cjs/types/src/components/Assets/ErrorPages/PageNotFound.d.ts +21 -0
- package/dist/cjs/types/src/components/Assets/ErrorPages/ResourceNotFound.d.ts +21 -0
- package/dist/cjs/types/src/components/Assets/ErrorPages/UnAuthorized.d.ts +31 -0
- package/dist/cjs/types/src/components/Assets/Icons/Icons.d.ts +54 -0
- package/dist/cjs/types/src/components/Charts/BarChart/BarChart.d.ts +38 -0
- package/dist/cjs/types/src/components/Charts/BarChart/HorizontalBarChart.d.ts +93 -0
- package/dist/cjs/types/src/components/Charts/BarChart/VerticalBarChart.d.ts +110 -0
- package/dist/cjs/types/src/components/Charts/LineChart/LineChart.d.ts +89 -0
- package/dist/cjs/types/src/components/Charts/PieChart/PieChart.d.ts +86 -0
- package/dist/cjs/types/src/components/Charts/TreeMap/TreeMap.d.ts +74 -0
- package/dist/cjs/types/src/components/DataDisplay/Accordion/Accordion.d.ts +54 -0
- package/dist/cjs/types/src/components/DataDisplay/ActivityLogView/ActivityLogFilter.d.ts +35 -0
- package/dist/cjs/types/src/components/DataDisplay/ActivityLogView/ActivityLogView.d.ts +78 -0
- package/dist/cjs/types/src/components/DataDisplay/Avatar/Avatar.d.ts +40 -0
- package/dist/cjs/types/src/components/DataDisplay/Chip/Chip.d.ts +28 -0
- package/dist/cjs/types/src/components/DataDisplay/Chips/Chips.d.ts +55 -0
- package/dist/cjs/types/src/components/DataDisplay/DataTable/DataTable.d.ts +95 -0
- package/dist/cjs/types/src/components/DataDisplay/DataTable/components/TablePagination.d.ts +35 -0
- package/dist/cjs/types/src/components/DataDisplay/EmptyIllustration/EmptyIllustration.d.ts +30 -0
- package/dist/cjs/types/src/components/DataDisplay/ReactJoyride/ReactJoyride.d.ts +64 -0
- package/dist/cjs/types/src/components/DataDisplay/Separator/Separator.d.ts +30 -0
- package/dist/cjs/types/src/components/DataDisplay/Skeleton/Skeleton.d.ts +20 -0
- package/dist/cjs/types/src/components/DataDisplay/StatusCard/StatusCard.d.ts +36 -0
- package/dist/cjs/types/src/components/DataDisplay/Timeline/Timeline.d.ts +58 -0
- package/dist/cjs/types/src/components/DataDisplay/Typography/Typography.d.ts +25 -0
- package/dist/cjs/types/src/components/Feedback/Alert/Alert.d.ts +31 -0
- package/dist/cjs/types/src/components/Feedback/Snackbar/Snackbar.d.ts +54 -0
- package/dist/cjs/types/src/components/Feedback/Spinner/Spinner.d.ts +15 -0
- package/dist/cjs/types/src/components/Feedback/Tooltip/Tooltip.d.ts +54 -0
- package/dist/cjs/types/src/components/Input/Button/Button.d.ts +26 -0
- package/dist/cjs/types/src/components/Input/DatePicker/DatePicker.d.ts +41 -0
- package/dist/cjs/types/src/components/Input/DateTimePicker/DateTimePicker.d.ts +42 -0
- package/dist/cjs/types/src/components/Input/FileUpload/FileUpload.d.ts +41 -0
- package/dist/cjs/types/src/components/Input/FormActions/FormActions.d.ts +37 -0
- package/dist/cjs/types/src/components/Input/FormControlWrapper/FormControlWrapper.d.ts +31 -0
- package/dist/cjs/types/src/components/Input/FormWrapper/FormWrapper.d.ts +20 -0
- package/dist/cjs/types/src/components/Input/HelpButton/HelpButton.d.ts +14 -0
- package/dist/cjs/types/src/components/Input/IconButtons/IconButtons/DeleteButton.d.ts +16 -0
- package/dist/cjs/types/src/components/Input/IconButtons/IconButtons/EditButton.d.ts +16 -0
- package/dist/cjs/types/src/components/Input/IconButtons/IconButtons/RedirectButton.d.ts +16 -0
- package/dist/cjs/types/src/components/Input/IconButtons/IconButtons/ViewButton.d.ts +16 -0
- package/dist/cjs/types/src/components/Input/IconButtons/IconButtons.d.ts +18 -0
- package/dist/cjs/types/src/components/Input/LabelWrapper/LabelWrapper.d.ts +26 -0
- package/dist/cjs/types/src/components/Input/MultiCheckBox/MultiCheckBox.d.ts +34 -0
- package/dist/cjs/types/src/components/Input/MultiSelect/MultiSelect.d.ts +40 -0
- package/dist/cjs/types/src/components/Input/OtpInput/OtpInput.d.ts +29 -0
- package/dist/cjs/types/src/components/Input/PasswordField/PasswordField.d.ts +34 -0
- package/dist/cjs/types/src/components/Input/RadioGroup/RadioGroup.d.ts +38 -0
- package/dist/cjs/types/src/components/Input/SearchBar/SearchBar.d.ts +26 -0
- package/dist/cjs/types/src/components/Input/Select/Select.d.ts +32 -0
- package/dist/cjs/types/src/components/Input/SingleCheckBox/SingleCheckBox.d.ts +29 -0
- package/dist/cjs/types/src/components/Input/SingleSelect/SingleSelect.d.ts +40 -0
- package/dist/cjs/types/src/components/Input/Switch/Switch.d.ts +23 -0
- package/dist/cjs/types/src/components/Input/Tags/Tags.d.ts +26 -0
- package/dist/cjs/types/src/components/Input/TextField/TextField.d.ts +35 -0
- package/dist/cjs/types/src/components/Input/Textarea/Textarea.d.ts +36 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/AppLayout.d.ts +32 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/MenuToggleButton.d.ts +16 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/MenuBar.d.ts +26 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/MenuItem.d.ts +37 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/Sidebar.d.ts +30 -1
- package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/StyledComponents.d.ts +139 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/UserProfilePopup.d.ts +34 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/context/SidebarContext.d.ts +48 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/types.d.ts +1 -1
- package/dist/cjs/types/src/components/Layout/PageContent/PageContent.d.ts +19 -0
- package/dist/cjs/types/src/components/Layout/PageHeader/PageHeader.d.ts +46 -0
- package/dist/cjs/types/src/components/Layout/PageHeader/components/SearchBar.d.ts +22 -0
- package/dist/cjs/types/src/components/Layout/UserBox/UserBox.d.ts +40 -0
- package/dist/cjs/types/src/components/Navigation/Breadcrumbs/Breadcrumbs.d.ts +33 -0
- package/dist/cjs/types/src/components/Navigation/Calendar/Calendar.d.ts +63 -0
- package/dist/cjs/types/src/components/Navigation/ConfirmDialog/ConfirmDialog.d.ts +64 -0
- package/dist/cjs/types/src/components/Navigation/Dialog/Dialog.d.ts +55 -0
- package/dist/cjs/types/src/components/Navigation/DialogButton/DialogButton.d.ts +64 -0
- package/dist/cjs/types/src/components/Navigation/DropDownMenu/DropDownMenu.d.ts +73 -0
- package/dist/cjs/types/src/components/Navigation/PreviewFiles/PreviewFiles.d.ts +54 -0
- package/dist/cjs/types/src/components/Navigation/Stepper/Stepper.d.ts +55 -10
- package/dist/cjs/types/src/components/Navigation/TabsContainer/TabsContainer.d.ts +80 -0
- package/dist/cjs/types/src/components/Navigation/UploadDialog/UploadDialog.d.ts +64 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/types/src/components/Assets/ErrorPages/ComingSoon.d.ts +24 -0
- package/dist/esm/types/src/components/Assets/ErrorPages/InternalServerError.d.ts +20 -0
- package/dist/esm/types/src/components/Assets/ErrorPages/NoInternetConnection.d.ts +20 -0
- package/dist/esm/types/src/components/Assets/ErrorPages/NoItemFound.d.ts +28 -0
- package/dist/esm/types/src/components/Assets/ErrorPages/PageNotFound.d.ts +21 -0
- package/dist/esm/types/src/components/Assets/ErrorPages/ResourceNotFound.d.ts +21 -0
- package/dist/esm/types/src/components/Assets/ErrorPages/UnAuthorized.d.ts +31 -0
- package/dist/esm/types/src/components/Assets/Icons/Icons.d.ts +54 -0
- package/dist/esm/types/src/components/Charts/BarChart/BarChart.d.ts +38 -0
- package/dist/esm/types/src/components/Charts/BarChart/HorizontalBarChart.d.ts +93 -0
- package/dist/esm/types/src/components/Charts/BarChart/VerticalBarChart.d.ts +110 -0
- package/dist/esm/types/src/components/Charts/LineChart/LineChart.d.ts +89 -0
- package/dist/esm/types/src/components/Charts/PieChart/PieChart.d.ts +86 -0
- package/dist/esm/types/src/components/Charts/TreeMap/TreeMap.d.ts +74 -0
- package/dist/esm/types/src/components/DataDisplay/Accordion/Accordion.d.ts +54 -0
- package/dist/esm/types/src/components/DataDisplay/ActivityLogView/ActivityLogFilter.d.ts +35 -0
- package/dist/esm/types/src/components/DataDisplay/ActivityLogView/ActivityLogView.d.ts +78 -0
- package/dist/esm/types/src/components/DataDisplay/Avatar/Avatar.d.ts +40 -0
- package/dist/esm/types/src/components/DataDisplay/Chip/Chip.d.ts +28 -0
- package/dist/esm/types/src/components/DataDisplay/Chips/Chips.d.ts +55 -0
- package/dist/esm/types/src/components/DataDisplay/DataTable/DataTable.d.ts +95 -0
- package/dist/esm/types/src/components/DataDisplay/DataTable/components/TablePagination.d.ts +35 -0
- package/dist/esm/types/src/components/DataDisplay/EmptyIllustration/EmptyIllustration.d.ts +30 -0
- package/dist/esm/types/src/components/DataDisplay/ReactJoyride/ReactJoyride.d.ts +64 -0
- package/dist/esm/types/src/components/DataDisplay/Separator/Separator.d.ts +30 -0
- package/dist/esm/types/src/components/DataDisplay/Skeleton/Skeleton.d.ts +20 -0
- package/dist/esm/types/src/components/DataDisplay/StatusCard/StatusCard.d.ts +36 -0
- package/dist/esm/types/src/components/DataDisplay/Timeline/Timeline.d.ts +58 -0
- package/dist/esm/types/src/components/DataDisplay/Typography/Typography.d.ts +25 -0
- package/dist/esm/types/src/components/Feedback/Alert/Alert.d.ts +31 -0
- package/dist/esm/types/src/components/Feedback/Snackbar/Snackbar.d.ts +54 -0
- package/dist/esm/types/src/components/Feedback/Spinner/Spinner.d.ts +15 -0
- package/dist/esm/types/src/components/Feedback/Tooltip/Tooltip.d.ts +54 -0
- package/dist/esm/types/src/components/Input/Button/Button.d.ts +26 -0
- package/dist/esm/types/src/components/Input/DatePicker/DatePicker.d.ts +41 -0
- package/dist/esm/types/src/components/Input/DateTimePicker/DateTimePicker.d.ts +42 -0
- package/dist/esm/types/src/components/Input/FileUpload/FileUpload.d.ts +41 -0
- package/dist/esm/types/src/components/Input/FormActions/FormActions.d.ts +37 -0
- package/dist/esm/types/src/components/Input/FormControlWrapper/FormControlWrapper.d.ts +31 -0
- package/dist/esm/types/src/components/Input/FormWrapper/FormWrapper.d.ts +20 -0
- package/dist/esm/types/src/components/Input/HelpButton/HelpButton.d.ts +14 -0
- package/dist/esm/types/src/components/Input/IconButtons/IconButtons/DeleteButton.d.ts +16 -0
- package/dist/esm/types/src/components/Input/IconButtons/IconButtons/EditButton.d.ts +16 -0
- package/dist/esm/types/src/components/Input/IconButtons/IconButtons/RedirectButton.d.ts +16 -0
- package/dist/esm/types/src/components/Input/IconButtons/IconButtons/ViewButton.d.ts +16 -0
- package/dist/esm/types/src/components/Input/IconButtons/IconButtons.d.ts +18 -0
- package/dist/esm/types/src/components/Input/LabelWrapper/LabelWrapper.d.ts +26 -0
- package/dist/esm/types/src/components/Input/MultiCheckBox/MultiCheckBox.d.ts +34 -0
- package/dist/esm/types/src/components/Input/MultiSelect/MultiSelect.d.ts +40 -0
- package/dist/esm/types/src/components/Input/OtpInput/OtpInput.d.ts +29 -0
- package/dist/esm/types/src/components/Input/PasswordField/PasswordField.d.ts +34 -0
- package/dist/esm/types/src/components/Input/RadioGroup/RadioGroup.d.ts +38 -0
- package/dist/esm/types/src/components/Input/SearchBar/SearchBar.d.ts +26 -0
- package/dist/esm/types/src/components/Input/Select/Select.d.ts +32 -0
- package/dist/esm/types/src/components/Input/SingleCheckBox/SingleCheckBox.d.ts +29 -0
- package/dist/esm/types/src/components/Input/SingleSelect/SingleSelect.d.ts +40 -0
- package/dist/esm/types/src/components/Input/Switch/Switch.d.ts +23 -0
- package/dist/esm/types/src/components/Input/Tags/Tags.d.ts +26 -0
- package/dist/esm/types/src/components/Input/TextField/TextField.d.ts +35 -0
- package/dist/esm/types/src/components/Input/Textarea/Textarea.d.ts +36 -0
- package/dist/esm/types/src/components/Layout/AppLayout/AppLayout.d.ts +32 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/MenuToggleButton.d.ts +16 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/MenuBar.d.ts +26 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/MenuItem.d.ts +37 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/Sidebar.d.ts +30 -1
- package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/StyledComponents.d.ts +139 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/UserProfilePopup.d.ts +34 -0
- package/dist/esm/types/src/components/Layout/AppLayout/context/SidebarContext.d.ts +48 -0
- package/dist/esm/types/src/components/Layout/AppLayout/types.d.ts +1 -1
- package/dist/esm/types/src/components/Layout/PageContent/PageContent.d.ts +19 -0
- package/dist/esm/types/src/components/Layout/PageHeader/PageHeader.d.ts +46 -0
- package/dist/esm/types/src/components/Layout/PageHeader/components/SearchBar.d.ts +22 -0
- package/dist/esm/types/src/components/Layout/UserBox/UserBox.d.ts +40 -0
- package/dist/esm/types/src/components/Navigation/Breadcrumbs/Breadcrumbs.d.ts +33 -0
- package/dist/esm/types/src/components/Navigation/Calendar/Calendar.d.ts +63 -0
- package/dist/esm/types/src/components/Navigation/ConfirmDialog/ConfirmDialog.d.ts +64 -0
- package/dist/esm/types/src/components/Navigation/Dialog/Dialog.d.ts +55 -0
- package/dist/esm/types/src/components/Navigation/DialogButton/DialogButton.d.ts +64 -0
- package/dist/esm/types/src/components/Navigation/DropDownMenu/DropDownMenu.d.ts +73 -0
- package/dist/esm/types/src/components/Navigation/PreviewFiles/PreviewFiles.d.ts +54 -0
- package/dist/esm/types/src/components/Navigation/Stepper/Stepper.d.ts +55 -10
- package/dist/esm/types/src/components/Navigation/TabsContainer/TabsContainer.d.ts +80 -0
- package/dist/esm/types/src/components/Navigation/UploadDialog/UploadDialog.d.ts +64 -0
- package/dist/index.d.ts +2953 -12
- package/dist/styles.css +30 -9
- package/package.json +1 -1
- package/src/components/Assets/ErrorPages/ComingSoon.tsx +24 -0
- package/src/components/Assets/ErrorPages/InternalServerError.tsx +20 -0
- package/src/components/Assets/ErrorPages/NoInternetConnection.tsx +20 -0
- package/src/components/Assets/ErrorPages/NoItemFound.tsx +28 -0
- package/src/components/Assets/ErrorPages/PageNotFound.tsx +21 -0
- package/src/components/Assets/ErrorPages/ResourceNotFound.tsx +21 -0
- package/src/components/Assets/ErrorPages/UnAuthorized.tsx +31 -0
- package/src/components/Assets/Icons/Icons.tsx +55 -1
- package/src/components/Charts/BarChart/BarChart.tsx +38 -0
- package/src/components/Charts/BarChart/HorizontalBarChart.tsx +93 -0
- package/src/components/Charts/BarChart/VerticalBarChart.tsx +110 -0
- package/src/components/Charts/LineChart/LineChart.tsx +89 -0
- package/src/components/Charts/PieChart/PieChart.tsx +86 -0
- package/src/components/Charts/TreeMap/TreeMap.tsx +90 -0
- package/src/components/DataDisplay/Accordion/Accordion.tsx +54 -0
- package/src/components/DataDisplay/ActivityLogView/ActivityLogFilter.tsx +35 -0
- package/src/components/DataDisplay/ActivityLogView/ActivityLogView.tsx +84 -0
- package/src/components/DataDisplay/Avatar/Avatar.tsx +40 -0
- package/src/components/DataDisplay/Chip/Chip.tsx +28 -0
- package/src/components/DataDisplay/Chips/Chips.tsx +56 -0
- package/src/components/DataDisplay/DataTable/DataTable.tsx +95 -0
- package/src/components/DataDisplay/DataTable/components/TablePagination.tsx +35 -0
- package/src/components/DataDisplay/EmptyIllustration/EmptyIllustration.tsx +31 -0
- package/src/components/DataDisplay/ReactJoyride/ReactJoyride.tsx +64 -0
- package/src/components/DataDisplay/Separator/Separator.tsx +32 -0
- package/src/components/DataDisplay/Skeleton/Skeleton.tsx +20 -0
- package/src/components/DataDisplay/StatusCard/StatusCard.tsx +36 -0
- package/src/components/DataDisplay/Timeline/Timeline.tsx +58 -0
- package/src/components/DataDisplay/Typography/Typography.tsx +25 -0
- package/src/components/Feedback/Alert/Alert.tsx +38 -0
- package/src/components/Feedback/Snackbar/Snackbar.tsx +54 -0
- package/src/components/Feedback/Spinner/Spinner.tsx +15 -0
- package/src/components/Feedback/Tooltip/Tooltip.tsx +54 -0
- package/src/components/Input/Button/Button.tsx +26 -0
- package/src/components/Input/DatePicker/DatePicker.tsx +41 -0
- package/src/components/Input/DateTimePicker/DateTimePicker.tsx +42 -0
- package/src/components/Input/FileUpload/FileUpload.tsx +41 -0
- package/src/components/Input/FormActions/FormActions.tsx +37 -0
- package/src/components/Input/FormControlWrapper/FormControlWrapper.tsx +31 -0
- package/src/components/Input/FormWrapper/FormWrapper.tsx +20 -0
- package/src/components/Input/HelpButton/HelpButton.tsx +14 -0
- package/src/components/Input/IconButtons/IconButtons/DeleteButton.tsx +16 -0
- package/src/components/Input/IconButtons/IconButtons/EditButton.tsx +16 -0
- package/src/components/Input/IconButtons/IconButtons/RedirectButton.tsx +16 -0
- package/src/components/Input/IconButtons/IconButtons/ViewButton.tsx +16 -0
- package/src/components/Input/IconButtons/IconButtons.tsx +18 -0
- package/src/components/Input/LabelWrapper/LabelWrapper.tsx +26 -0
- package/src/components/Input/MultiCheckBox/MultiCheckBox.tsx +34 -0
- package/src/components/Input/MultiSelect/MultiSelect.tsx +40 -0
- package/src/components/Input/OtpInput/OtpInput.tsx +29 -0
- package/src/components/Input/PasswordField/PasswordField.tsx +34 -0
- package/src/components/Input/RadioGroup/RadioGroup.tsx +38 -0
- package/src/components/Input/SearchBar/SearchBar.tsx +26 -0
- package/src/components/Input/Select/Select.tsx +41 -0
- package/src/components/Input/SingleCheckBox/SingleCheckBox.tsx +29 -0
- package/src/components/Input/SingleSelect/SingleSelect.tsx +40 -0
- package/src/components/Input/Switch/Switch.tsx +23 -0
- package/src/components/Input/Tags/Tags.tsx +26 -0
- package/src/components/Input/TextField/TextField.tsx +35 -0
- package/src/components/Input/Textarea/Textarea.tsx +36 -0
- package/src/components/Layout/AppLayout/AppLayout.tsx +33 -1
- package/src/components/Layout/AppLayout/components/MenuToggleButton.tsx +16 -0
- package/src/components/Layout/AppLayout/components/Sidebar/MenuBar.tsx +26 -0
- package/src/components/Layout/AppLayout/components/Sidebar/MenuItem.tsx +51 -1
- package/src/components/Layout/AppLayout/components/Sidebar/Sidebar.tsx +173 -104
- package/src/components/Layout/AppLayout/components/Sidebar/StyledComponents.tsx +139 -9
- package/src/components/Layout/AppLayout/components/UserProfilePopup.tsx +34 -0
- package/src/components/Layout/AppLayout/context/SidebarContext.tsx +48 -0
- package/src/components/Layout/AppLayout/types.ts +1 -1
- package/src/components/Layout/PageContent/PageContent.tsx +19 -0
- package/src/components/Layout/PageHeader/PageHeader.tsx +46 -0
- package/src/components/Layout/PageHeader/components/SearchBar.tsx +22 -0
- package/src/components/Layout/UserBox/UserBox.tsx +40 -0
- package/src/components/Navigation/Breadcrumbs/Breadcrumbs.tsx +33 -0
- package/src/components/Navigation/Calendar/Calendar.tsx +63 -0
- package/src/components/Navigation/ConfirmDialog/ConfirmDialog.tsx +64 -0
- package/src/components/Navigation/Dialog/Dialog.tsx +55 -0
- package/src/components/Navigation/DialogButton/DialogButton.tsx +64 -0
- package/src/components/Navigation/DropDownMenu/DropDownMenu.tsx +73 -0
- package/src/components/Navigation/PreviewFiles/PreviewFiles.tsx +93 -0
- package/src/components/Navigation/Stepper/Stepper.tsx +56 -10
- package/src/components/Navigation/TabsContainer/TabsContainer.tsx +80 -0
- package/src/components/Navigation/UploadDialog/UploadDialog.tsx +64 -0
- package/src/shadcn-components/Layout/Sheet/Sheet.tsx +2 -2
|
@@ -20,5 +20,51 @@ interface PageHeaderProps {
|
|
|
20
20
|
}) => ReactNode[]);
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* PageHeader Component
|
|
25
|
+
*
|
|
26
|
+
* Header component for page content that displays breadcrumbs and action bar with search,
|
|
27
|
+
* filter, add button, and custom action menus. Supports Redux integration for maintaining
|
|
28
|
+
* search and filter state across re-renders. Responsive design with mobile optimization.
|
|
29
|
+
*
|
|
30
|
+
* @param {string} [uniqueId] - Optional unique identifier for Redux state management of this header
|
|
31
|
+
* @param {number} pathTrimCount - Number of path segments to trim from breadcrumb
|
|
32
|
+
* @param {React.ReactElement} [breadcrumbAction] - Optional element to display next to breadcrumbs
|
|
33
|
+
* @param {SearchBarProps & { uniqueId?: string; searchText?: string }} [searchBarProps] - Configuration for search bar including placeholder
|
|
34
|
+
* @param {{
|
|
35
|
+
* label?: string;
|
|
36
|
+
* startIcon?: React.ReactNode;
|
|
37
|
+
* components: React.ReactElement[];
|
|
38
|
+
* }} [filterButtonProps] - Configuration for filter dropdown with filter components
|
|
39
|
+
* @param {{
|
|
40
|
+
* label?: string;
|
|
41
|
+
* onClick: () => void;
|
|
42
|
+
* }} [addButtonProps] - Configuration for add/create button
|
|
43
|
+
* @param {{
|
|
44
|
+
* menu: React.ReactNode[] | ((props: { close: () => void }) => React.ReactNode[]);
|
|
45
|
+
* }} [actionProps] - Configuration for additional action menu
|
|
46
|
+
*
|
|
47
|
+
* @returns {React.ReactElement} A responsive header with breadcrumbs and action controls
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```tsx
|
|
51
|
+
* <PageHeader
|
|
52
|
+
* uniqueId="users-list"
|
|
53
|
+
* pathTrimCount={1}
|
|
54
|
+
* searchBarProps={{
|
|
55
|
+
* placeholder: "Search users...",
|
|
56
|
+
* uniqueId: "users-list"
|
|
57
|
+
* }}
|
|
58
|
+
* filterButtonProps={{
|
|
59
|
+
* label: "Filters",
|
|
60
|
+
* components: [<StatusFilter />, <RoleFilter />]
|
|
61
|
+
* }}
|
|
62
|
+
* addButtonProps={{
|
|
63
|
+
* label: "Add User",
|
|
64
|
+
* onClick: handleAddUser
|
|
65
|
+
* }}
|
|
66
|
+
* />
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
23
69
|
declare const PageHeader: ({ uniqueId, pathTrimCount, breadcrumbAction, searchBarProps, filterButtonProps, addButtonProps, actionProps, }: PageHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
70
|
export { PageHeader, type PageHeaderProps };
|
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
import { type SearchBarProps } from '../../../export';
|
|
2
|
+
/**
|
|
3
|
+
* PageHeaderSearchBar Component
|
|
4
|
+
*
|
|
5
|
+
* Redux-integrated search bar component that automatically manages search state in Redux store.
|
|
6
|
+
* The search value is persisted and retrieved using the provided uniqueId, allowing search state
|
|
7
|
+
* to survive component re-renders and navigation.
|
|
8
|
+
*
|
|
9
|
+
* @param {string} [uniqueId='default'] - Unique identifier for Redux state persistence (should match PageHeader uniqueId)
|
|
10
|
+
* @param {string} [searchText='Search'] - Placeholder text for the search input
|
|
11
|
+
* @param {SearchBarProps} props - Additional SearchBar component props
|
|
12
|
+
*
|
|
13
|
+
* @returns {React.ReactElement} A controlled search bar connected to Redux store
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <PageHeaderSearchBar
|
|
18
|
+
* uniqueId="users-list"
|
|
19
|
+
* searchText="Search users..."
|
|
20
|
+
* onSearch={handleSearch}
|
|
21
|
+
* />
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
2
24
|
export declare const PageHeaderSearchBar: ({ uniqueId, searchText, ...props }: SearchBarProps & {
|
|
3
25
|
uniqueId?: string;
|
|
4
26
|
searchText?: string;
|
|
@@ -1,4 +1,44 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* UserBox Component
|
|
4
|
+
*
|
|
5
|
+
* User profile information and dropdown menu component with customizable sections.
|
|
6
|
+
* Displays user avatar with fallback to initials, supports optional designation,
|
|
7
|
+
* active devices toggle, custom actions, and logout. Avatar click can trigger
|
|
8
|
+
* custom handler or open the dropdown menu.
|
|
9
|
+
*
|
|
10
|
+
* @param {string} fullName - User's full name (required, used for avatar initials and display)
|
|
11
|
+
* @param {string} [designation=''] - User's job designation or title (optional)
|
|
12
|
+
* @param {any[]} [institutionsData] - Optional array of institution data (for future use)
|
|
13
|
+
* @param {React.ReactNode[]} actions - Array of custom menu item elements to include in dropdown
|
|
14
|
+
* @param {() => void} [onLogoutClick] - Callback handler when logout menu item is clicked
|
|
15
|
+
* @param {string} [profileUrl] - URL to user's profile image (uses initials fallback if not provided)
|
|
16
|
+
* @param {React.ReactNode} [changePassword] - Optional change password component/element
|
|
17
|
+
* @param {any} [profileSx={}] - Custom styles/className to apply to avatar element
|
|
18
|
+
* @param {boolean} [avatar=true] - Whether to show the avatar in the account menu section
|
|
19
|
+
* @param {boolean} [navigationIcon=true] - Whether to show the navigation icon next to account info
|
|
20
|
+
* @param {boolean} [showActiveDevices=true] - Whether to show the "Active Devices" menu item
|
|
21
|
+
* @param {() => void} [onAccountClick] - Callback handler when account section is clicked
|
|
22
|
+
* @param {() => void} [onActiveDevicesClick] - Callback handler when active devices item is clicked
|
|
23
|
+
* @param {() => void} [onChangeInstitutionClick] - Callback handler for changing institution (future use)
|
|
24
|
+
* @param {() => void} [onAvatarClick] - Callback handler when avatar is clicked (prevents menu opening if provided)
|
|
25
|
+
*
|
|
26
|
+
* @returns {React.ReactElement} A user profile dropdown menu component
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* <UserBox
|
|
31
|
+
* fullName="John Doe"
|
|
32
|
+
* designation="Software Engineer"
|
|
33
|
+
* profileUrl="/avatars/john.jpg"
|
|
34
|
+
* onLogoutClick={handleLogout}
|
|
35
|
+
* onAccountClick={navigateToSettings}
|
|
36
|
+
* onActiveDevicesClick={showActiveDevices}
|
|
37
|
+
* actions={[<CustomMenuAction1 />, <CustomMenuAction2 />]}
|
|
38
|
+
* showActiveDevices={true}
|
|
39
|
+
* />
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
2
42
|
export default function UserBox({ fullName, onLogoutClick, designation, actions, profileUrl, profileSx, institutionsData, changePassword, avatar, navigationIcon, showActiveDevices, onAccountClick, onActiveDevicesClick, onChangeInstitutionClick, onAvatarClick, }: {
|
|
3
43
|
fullName: string;
|
|
4
44
|
designation?: string;
|
|
@@ -1,7 +1,40 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the Breadcrumbs component
|
|
4
|
+
*/
|
|
2
5
|
export type BreadcrumbsProps = {
|
|
6
|
+
/** Number of path segments to trim from the beginning of the current URL path */
|
|
3
7
|
pathTrimCount: number;
|
|
8
|
+
/** Optional CSS class names for the container element */
|
|
4
9
|
containerClassName?: string;
|
|
10
|
+
/** Optional React element to render as an action button/component on the right side */
|
|
5
11
|
action?: ReactElement;
|
|
6
12
|
};
|
|
13
|
+
/**
|
|
14
|
+
* Breadcrumbs component that displays a navigation breadcrumb trail based on the current URL path.
|
|
15
|
+
*
|
|
16
|
+
* Automatically generates breadcrumb items from the URL pathname and displays them with navigation links.
|
|
17
|
+
* When there are more than 2 breadcrumb items, it shows the first item, a dropdown menu with middle items,
|
|
18
|
+
* and the last item to save space.
|
|
19
|
+
*
|
|
20
|
+
* @component
|
|
21
|
+
* @param {BreadcrumbsProps} props - The component props
|
|
22
|
+
* @param {number} props.pathTrimCount - Number of path segments to trim from the beginning of the URL path
|
|
23
|
+
* @param {string} [props.containerClassName] - Optional CSS class names to apply to the container div
|
|
24
|
+
* @param {ReactElement} [props.action] - Optional React element displayed on the right side of the breadcrumb
|
|
25
|
+
*
|
|
26
|
+
* @returns {React.ReactElement} A div containing the breadcrumb navigation component with a menu toggle button and breadcrumb list
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* // Basic usage
|
|
30
|
+
* <Breadcrumbs pathTrimCount={1} />
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* // With custom action button
|
|
34
|
+
* <Breadcrumbs
|
|
35
|
+
* pathTrimCount={2}
|
|
36
|
+
* action={<button>Export</button>}
|
|
37
|
+
* containerClassName="bg-gray-50 border-b"
|
|
38
|
+
* />
|
|
39
|
+
*/
|
|
7
40
|
export declare const Breadcrumbs: ({ pathTrimCount, containerClassName, action, }: BreadcrumbsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,67 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './Calendar.css';
|
|
3
3
|
import { CalendarProps } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Calendar component that provides a fully-featured calendar interface with FullCalendar integration.
|
|
6
|
+
*
|
|
7
|
+
* This component displays an interactive calendar with support for events, drag-and-drop,
|
|
8
|
+
* resizing, and various view modes (month, week, day). It offers extensive customization options
|
|
9
|
+
* for appearance, behavior, and event handling.
|
|
10
|
+
*
|
|
11
|
+
* @component
|
|
12
|
+
* @param {CalendarProps} props - The component props
|
|
13
|
+
* @param {CalendarEvent[]} [props.events] - Array of calendar events to display. Defaults to empty array
|
|
14
|
+
* @param {(eventInfo: CalendarEventClickInfo) => void} [props.onEventClick] - Callback fired when an event is clicked
|
|
15
|
+
* @param {(dropInfo: CalendarEventDropInfo) => void} [props.onEventDrop] - Callback fired when an event is drag-dropped
|
|
16
|
+
* @param {(resizeInfo: CalendarEventResizeInfo) => void} [props.onEventResize] - Callback fired when an event is resized
|
|
17
|
+
* @param {(dateInfo: CalendarDateClickInfo) => void} [props.onDateClick] - Callback fired when a date is clicked
|
|
18
|
+
* @param {(selectInfo: CalendarDateSelectInfo) => void} [props.onDateSelect] - Callback fired when a date range is selected
|
|
19
|
+
* @param {(events: EventApi[]) => void} [props.onEventsSet] - Callback fired when the list of events changes
|
|
20
|
+
* @param {CalendarView} [props.initialView='dayGridMonth'] - Initial view mode to display (dayGridMonth, timeGridWeek, timeGridDay, listWeek)
|
|
21
|
+
* @param {CalendarView[]} [props.views] - Array of available view modes to show in view switcher
|
|
22
|
+
* @param {CalendarHeaderToolbar | boolean} [props.headerToolbar] - Header toolbar configuration object or false to hide it
|
|
23
|
+
* @param {boolean} [props.editable=false] - Whether events can be dragged/resized to modify dates
|
|
24
|
+
* @param {boolean} [props.selectable=false] - Whether users can select date ranges by clicking and dragging
|
|
25
|
+
* @param {boolean} [props.selectMirror=true] - Whether to show a visual mirror while selecting date ranges
|
|
26
|
+
* @param {boolean} [props.eventResizable=false] - Whether events can be resized by dragging their edges
|
|
27
|
+
* @param {boolean} [props.eventDraggable=false] - Whether events can be dragged to change their dates
|
|
28
|
+
* @param {boolean | number} [props.dayMaxEvents=true] - Maximum number of events to show per day (true for auto, false for unlimited)
|
|
29
|
+
* @param {string | number} [props.height='auto'] - Height of the calendar (CSS string or number in pixels)
|
|
30
|
+
* @param {number} [props.aspectRatio] - Aspect ratio for the calendar dimensions
|
|
31
|
+
* @param {React.HTMLAttributes<HTMLDivElement>} [props.containerProps] - Additional HTML attributes for the container div
|
|
32
|
+
* @param {string} [props.locale='en'] - Locale/language code for calendar text (e.g., 'en', 'es', 'fr')
|
|
33
|
+
* @param {string} [props.timezone='local'] - Timezone for displaying dates ('local' or standard timezone identifier)
|
|
34
|
+
* @param {0 | 1 | 2 | 3 | 4 | 5 | 6} [props.firstDayOfWeek=0] - First day of the week (0=Sunday, 1=Monday, etc.)
|
|
35
|
+
* @param {(eventInfo: any) => React.ReactNode} [props.eventContent] - Custom render function for event content
|
|
36
|
+
* @param {(dayInfo: any) => React.ReactNode} [props.dayCellContent] - Custom render function for day cell content
|
|
37
|
+
* @param {boolean} [props.showNavigationButtons=true] - Whether to show previous/next navigation buttons
|
|
38
|
+
* @param {boolean} [props.showViewSwitcher=true] - Whether to show view mode selector buttons
|
|
39
|
+
* @param {boolean} [props.showToday=true] - Whether to show the "today" button
|
|
40
|
+
* @param {boolean} [props.weekends=true] - Whether to display weekend days
|
|
41
|
+
* @param {any} [props.businessHours] - Business hours configuration
|
|
42
|
+
* @param {any} [props.eventConstraint] - Constraint rules for event dragging
|
|
43
|
+
* @param {any} [props.selectConstraint] - Constraint rules for date selection
|
|
44
|
+
*
|
|
45
|
+
* @returns {React.ReactElement} A div container with the FullCalendar component
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* // Basic calendar with events
|
|
49
|
+
* <Calendar
|
|
50
|
+
* events={[
|
|
51
|
+
* { id: '1', title: 'Meeting', start: '2024-01-15' }
|
|
52
|
+
* ]}
|
|
53
|
+
* onEventClick={(info) => console.log(info.event.title)}
|
|
54
|
+
* />
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* // Editable calendar with custom height
|
|
58
|
+
* <Calendar
|
|
59
|
+
* events={events}
|
|
60
|
+
* editable={true}
|
|
61
|
+
* eventDraggable={true}
|
|
62
|
+
* eventResizable={true}
|
|
63
|
+
* height={600}
|
|
64
|
+
* onEventDrop={(info) => updateEventDate(info)}
|
|
65
|
+
* />
|
|
66
|
+
*/
|
|
4
67
|
export declare const Calendar: React.FC<CalendarProps>;
|
|
@@ -1,15 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definition for the kind of confirmation dialog
|
|
3
|
+
*/
|
|
1
4
|
export type ConfirmDialogType = 'confirm' | 'delete';
|
|
5
|
+
/**
|
|
6
|
+
* Available max-width sizes for the dialog
|
|
7
|
+
*/
|
|
2
8
|
type MaxWidthSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
9
|
+
/**
|
|
10
|
+
* Props for the ConfirmDialog component
|
|
11
|
+
*/
|
|
3
12
|
export type ConfirmDialogProps = {
|
|
13
|
+
/** Whether the dialog is open and visible */
|
|
4
14
|
isOpen: boolean;
|
|
15
|
+
/** Title text displayed in the dialog header */
|
|
5
16
|
title: string;
|
|
17
|
+
/** Message/description text displayed in the dialog */
|
|
6
18
|
message: string;
|
|
19
|
+
/** Callback function triggered when the user confirms the action */
|
|
7
20
|
onConfirm: () => void;
|
|
21
|
+
/** Callback function triggered when the user cancels the dialog */
|
|
8
22
|
onCancel: () => void;
|
|
23
|
+
/** Type of confirmation dialog - 'confirm' for general confirmations, 'delete' for destructive actions */
|
|
9
24
|
type: ConfirmDialogType;
|
|
25
|
+
/** Custom text for the confirm button. Defaults to 'Confirm Delete' for delete type, 'Confirm' otherwise */
|
|
10
26
|
confirmButtonText?: string;
|
|
27
|
+
/** Custom text for the cancel button. Defaults to 'Cancel' */
|
|
11
28
|
cancelButtonText?: string;
|
|
29
|
+
/** Max-width size class of the dialog. Defaults to 'xl' */
|
|
12
30
|
maxWidth?: MaxWidthSize;
|
|
13
31
|
};
|
|
32
|
+
/**
|
|
33
|
+
* ConfirmDialog component that displays a modal confirmation dialog with custom title, message, and action buttons.
|
|
34
|
+
*
|
|
35
|
+
* This component provides a user-friendly confirmation interface with support for two types:
|
|
36
|
+
* 'confirm' for general confirmations and 'delete' for destructive operations. The dialog
|
|
37
|
+
* includes an animated GIF icon that changes based on the dialog type.
|
|
38
|
+
*
|
|
39
|
+
* @component
|
|
40
|
+
* @param {ConfirmDialogProps} props - The component props
|
|
41
|
+
* @param {boolean} props.isOpen - Whether the dialog is currently open
|
|
42
|
+
* @param {string} props.title - Dialog title text
|
|
43
|
+
* @param {string} props.message - Dialog message/body text
|
|
44
|
+
* @param {() => void} props.onConfirm - Callback fired when the confirm button is clicked
|
|
45
|
+
* @param {() => void} props.onCancel - Callback fired when the cancel button is clicked or dialog is closed
|
|
46
|
+
* @param {ConfirmDialogType} props.type - Dialog type ('confirm' or 'delete') which affects styling and default text
|
|
47
|
+
* @param {string} [props.confirmButtonText] - Custom text for confirm button
|
|
48
|
+
* @param {string} [props.cancelButtonText] - Custom text for cancel button
|
|
49
|
+
* @param {MaxWidthSize} [props.maxWidth='xl'] - Maximum width of the dialog
|
|
50
|
+
*
|
|
51
|
+
* @returns {React.ReactElement} A Dialog component with header, message, and action buttons
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* // Basic confirmation dialog
|
|
55
|
+
* <ConfirmDialog
|
|
56
|
+
* isOpen={isOpen}
|
|
57
|
+
* type="confirm"
|
|
58
|
+
* title="Confirm Action"
|
|
59
|
+
* message="Are you sure you want to proceed?"
|
|
60
|
+
* onConfirm={() => handleAction()}
|
|
61
|
+
* onCancel={() => setIsOpen(false)}
|
|
62
|
+
* />
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* // Delete confirmation dialog with custom buttons
|
|
66
|
+
* <ConfirmDialog
|
|
67
|
+
* isOpen={deleteOpen}
|
|
68
|
+
* type="delete"
|
|
69
|
+
* title="Delete Item"
|
|
70
|
+
* message="This action cannot be undone. All data will be permanently deleted."
|
|
71
|
+
* confirmButtonText="Yes, Delete"
|
|
72
|
+
* cancelButtonText="Keep Item"
|
|
73
|
+
* onConfirm={() => deleteItem()}
|
|
74
|
+
* onCancel={() => setDeleteOpen(false)}
|
|
75
|
+
* maxWidth="md"
|
|
76
|
+
* />
|
|
77
|
+
*/
|
|
14
78
|
export declare const ConfirmDialog: React.FC<ConfirmDialogProps>;
|
|
15
79
|
export {};
|
|
@@ -1,15 +1,70 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Available max-width sizes for the dialog
|
|
4
|
+
*/
|
|
2
5
|
type MaxWidthSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
6
|
+
/**
|
|
7
|
+
* Props for the Dialog component
|
|
8
|
+
*/
|
|
3
9
|
type DialogProps = {
|
|
10
|
+
/** Function that renders the dialog content. Receives close callback to allow closing from within content */
|
|
4
11
|
content: (props: {
|
|
5
12
|
close: () => void;
|
|
6
13
|
}) => ReactNode;
|
|
14
|
+
/** Optional title displayed in the dialog header */
|
|
7
15
|
title?: string | undefined;
|
|
16
|
+
/** Callback function triggered when the dialog is closed */
|
|
8
17
|
onClose: () => void;
|
|
18
|
+
/** Whether the dialog is open and visible */
|
|
9
19
|
open: boolean;
|
|
20
|
+
/** Optional CSS class names for the dialog content element */
|
|
10
21
|
className?: string;
|
|
22
|
+
/** Whether to show the close button in the dialog header. Defaults to true */
|
|
11
23
|
showCloseButton?: boolean;
|
|
24
|
+
/** Max-width size class of the dialog. Defaults to 'lg' */
|
|
12
25
|
maxWidth?: MaxWidthSize;
|
|
13
26
|
};
|
|
27
|
+
/**
|
|
28
|
+
* Dialog component that wraps shadcn/ui Dialog with additional features and sensible defaults.
|
|
29
|
+
*
|
|
30
|
+
* This component provides a controlled dialog with optional header, configurable width,
|
|
31
|
+
* and flexible content rendering with a close callback for self-closing from within the content.
|
|
32
|
+
*
|
|
33
|
+
* @component
|
|
34
|
+
* @param {DialogProps} props - The component props
|
|
35
|
+
* @param {(props: { close: () => void }) => ReactNode} props.content - Render function for dialog content
|
|
36
|
+
* @param {() => void} props.onClose - Callback fired when the dialog is closed
|
|
37
|
+
* @param {boolean} props.open - Whether the dialog is currently open
|
|
38
|
+
* @param {string} [props.title] - Optional dialog title
|
|
39
|
+
* @param {string} [props.className] - Optional CSS classes for the dialog content
|
|
40
|
+
* @param {boolean} [props.showCloseButton=true] - Whether to show the close button
|
|
41
|
+
* @param {MaxWidthSize} [props.maxWidth='lg'] - Maximum width of the dialog
|
|
42
|
+
*
|
|
43
|
+
* @returns {React.ReactElement} A Dialog component with optional header and flexible content
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* // Simple dialog with title
|
|
47
|
+
* <Dialog
|
|
48
|
+
* open={isOpen}
|
|
49
|
+
* title="Delete Item"
|
|
50
|
+
* onClose={() => setIsOpen(false)}
|
|
51
|
+
* content={({ close }) => (
|
|
52
|
+
* <div>
|
|
53
|
+
* <p>Are you sure?</p>
|
|
54
|
+
* <button onClick={close}>Cancel</button>
|
|
55
|
+
* </div>
|
|
56
|
+
* )}
|
|
57
|
+
* />
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* // Dialog without title and custom width
|
|
61
|
+
* <Dialog
|
|
62
|
+
* open={showDialog}
|
|
63
|
+
* onClose={handleClose}
|
|
64
|
+
* maxWidth="sm"
|
|
65
|
+
* showCloseButton={false}
|
|
66
|
+
* content={({ close }) => <FormComponent onSubmit={close} />}
|
|
67
|
+
* />
|
|
68
|
+
*/
|
|
14
69
|
declare const Dialog: ({ onClose, title, content, open, className, showCloseButton, maxWidth, }: DialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
70
|
export { Dialog, type DialogProps, type MaxWidthSize };
|
|
@@ -1,18 +1,82 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Available max-width sizes for the dialog
|
|
4
|
+
*/
|
|
2
5
|
type MaxWidthSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
6
|
+
/**
|
|
7
|
+
* Props for the DialogButton component
|
|
8
|
+
*/
|
|
3
9
|
export type DialogButtonProps = {
|
|
10
|
+
/** Function that renders the dialog trigger element. Receives open callback to open the dialog */
|
|
4
11
|
anchor: (props: {
|
|
5
12
|
open: () => void;
|
|
6
13
|
}) => ReactNode;
|
|
14
|
+
/** Optional callback fired when the dialog opens */
|
|
7
15
|
onDialogOpen?: () => void;
|
|
16
|
+
/** Optional callback fired when the dialog closes */
|
|
8
17
|
onDialogClose?: () => void;
|
|
18
|
+
/** Function that renders the dialog content. Receives close callback to close the dialog */
|
|
9
19
|
content: (props: {
|
|
10
20
|
close: () => void;
|
|
11
21
|
}) => ReactNode;
|
|
22
|
+
/** Optional title displayed in the dialog header */
|
|
12
23
|
title?: string | undefined;
|
|
24
|
+
/** Optional CSS class names for the dialog content element */
|
|
13
25
|
className?: string;
|
|
26
|
+
/** Whether to show the close button in the dialog header. Defaults to true */
|
|
14
27
|
showCloseButton?: boolean;
|
|
28
|
+
/** Max-width size class of the dialog. Defaults to 'lg' */
|
|
15
29
|
maxWidth?: MaxWidthSize;
|
|
16
30
|
};
|
|
31
|
+
/**
|
|
32
|
+
* DialogButton component that combines a trigger element and a dialog in a single component.
|
|
33
|
+
*
|
|
34
|
+
* This is a convenient wrapper that manages its own open/close state and provides
|
|
35
|
+
* a clean API for rendering both the trigger (anchor) and the dialog content.
|
|
36
|
+
* It's useful when you want to bind a button or other trigger element with a dialog
|
|
37
|
+
* without managing state at the parent level.
|
|
38
|
+
*
|
|
39
|
+
* @component
|
|
40
|
+
* @param {DialogButtonProps} props - The component props
|
|
41
|
+
* @param {(props: { open: () => void }) => ReactNode} props.anchor - Render function for the trigger element
|
|
42
|
+
* @param {(props: { close: () => void }) => ReactNode} props.content - Render function for dialog content
|
|
43
|
+
* @param {string} [props.title] - Optional dialog title
|
|
44
|
+
* @param {() => void} [props.onDialogOpen] - Optional callback fired when the dialog opens
|
|
45
|
+
* @param {() => void} [props.onDialogClose] - Optional callback fired when the dialog closes
|
|
46
|
+
* @param {string} [props.className] - Optional CSS classes for the dialog content
|
|
47
|
+
* @param {boolean} [props.showCloseButton=true] - Whether to show the close button
|
|
48
|
+
* @param {MaxWidthSize} [props.maxWidth='lg'] - Maximum width of the dialog
|
|
49
|
+
*
|
|
50
|
+
* @returns {React.ReactElement} A fragment containing the anchor element and the Dialog
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* // Button that opens a dialog with a form
|
|
54
|
+
* <DialogButton
|
|
55
|
+
* anchor={({ open }) => <button onClick={open}>Edit Profile</button>}
|
|
56
|
+
* title="Edit Profile"
|
|
57
|
+
* content={({ close }) => (
|
|
58
|
+
* <form onSubmit={(e) => { handleSubmit(e); close(); }}>
|
|
59
|
+
* <input type="text" placeholder="Name" />
|
|
60
|
+
* <button type="submit">Save</button>
|
|
61
|
+
* </form>
|
|
62
|
+
* )}
|
|
63
|
+
* />
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* // With callbacks and custom styling
|
|
67
|
+
* <DialogButton
|
|
68
|
+
* anchor={({ open }) => <IconButton icon={<EditIcon />} onClick={open} />}
|
|
69
|
+
* title="Delete Item"
|
|
70
|
+
* maxWidth="sm"
|
|
71
|
+
* onDialogOpen={() => console.log('Dialog opened')}
|
|
72
|
+
* onDialogClose={() => console.log('Dialog closed')}
|
|
73
|
+
* content={({ close }) => (
|
|
74
|
+
* <div>
|
|
75
|
+
* <p>Are you sure?</p>
|
|
76
|
+
* <button onClick={close}>Cancel</button>
|
|
77
|
+
* </div>
|
|
78
|
+
* )}
|
|
79
|
+
* />
|
|
80
|
+
*/
|
|
17
81
|
export declare const DialogButton: ({ onDialogClose, onDialogOpen, anchor, content, title, className, showCloseButton, maxWidth, }: DialogButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
82
|
export {};
|
|
@@ -1,21 +1,94 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the DropdownMenu component
|
|
4
|
+
*/
|
|
2
5
|
export type DropdownMenuProps = {
|
|
6
|
+
/** Function that renders the dropdown trigger element. Receives open callback to open the dropdown */
|
|
3
7
|
anchor: (props: {
|
|
4
8
|
open: (e: any) => void;
|
|
5
9
|
}) => ReactNode;
|
|
10
|
+
/** Array of menu items or a function that returns menu items. Can be static or dynamic */
|
|
6
11
|
menu?: ReactNode[] | ((props: {
|
|
7
12
|
close: () => void;
|
|
8
13
|
}) => ReactNode[]);
|
|
14
|
+
/** Custom slot for rendering the entire menu content. Takes precedence over menu when useMenuSlot is true */
|
|
9
15
|
menuSlot?: (props: {
|
|
10
16
|
close: () => void;
|
|
11
17
|
}) => ReactNode;
|
|
18
|
+
/** Whether to use menuSlot instead of menu items. Defaults to false */
|
|
12
19
|
useMenuSlot?: boolean;
|
|
20
|
+
/** Optional CSS class names for the menu content container */
|
|
13
21
|
menuContentClassName?: string;
|
|
22
|
+
/** Optional CSS class names for the menu list wrapper div */
|
|
14
23
|
menuListClassName?: string;
|
|
24
|
+
/** Optional React element or component to render above the menu items */
|
|
15
25
|
menuHeader?: ReactNode;
|
|
26
|
+
/** Optional React element or component to render below the menu items */
|
|
16
27
|
menuFooter?: ReactNode;
|
|
28
|
+
/** Optional async callback fired when the menu is scrolled, useful for infinite scroll */
|
|
17
29
|
handleMenuScroll?: (event: any) => Promise<void>;
|
|
30
|
+
/** Horizontal alignment of the dropdown menu relative to the trigger. Defaults to 'end' */
|
|
18
31
|
align?: 'start' | 'center' | 'end';
|
|
32
|
+
/** Vertical placement of the dropdown menu relative to the trigger. Defaults to 'bottom' */
|
|
19
33
|
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
20
34
|
};
|
|
35
|
+
/**
|
|
36
|
+
* DropdownMenu component that provides a flexible dropdown menu with trigger element and menu content.
|
|
37
|
+
*
|
|
38
|
+
* This component wraps shadcn/ui's DropdownMenu and adds support for dynamic menu items,
|
|
39
|
+
* header/footer sections, and custom scroll handling. It manages its own open/close state
|
|
40
|
+
* and provides a convenient API for both static and dynamic menu items.
|
|
41
|
+
*
|
|
42
|
+
* @component
|
|
43
|
+
* @param {DropdownMenuProps} props - The component props
|
|
44
|
+
* @param {(props: { open: (e: any) => void }) => ReactNode} props.anchor - Render function for the trigger element
|
|
45
|
+
* @param {ReactNode[] | ((props: { close: () => void }) => ReactNode[])} [props.menu] - Menu items array or function
|
|
46
|
+
* @param {(props: { close: () => void }) => ReactNode} [props.menuSlot] - Custom menu content renderer
|
|
47
|
+
* @param {boolean} [props.useMenuSlot=false] - Whether to use menuSlot instead of menu items
|
|
48
|
+
* @param {string} [props.menuContentClassName] - CSS classes for the menu content container
|
|
49
|
+
* @param {string} [props.menuListClassName] - CSS classes for the menu list wrapper
|
|
50
|
+
* @param {ReactNode} [props.menuHeader] - Content to display above the menu items
|
|
51
|
+
* @param {ReactNode} [props.menuFooter] - Content to display below the menu items
|
|
52
|
+
* @param {(event: any) => Promise<void>} [props.handleMenuScroll] - Async callback for scroll events
|
|
53
|
+
* @param {'start' | 'center' | 'end'} [props.align='end'] - Horizontal alignment of the menu
|
|
54
|
+
* @param {'top' | 'right' | 'bottom' | 'left'} [props.side='bottom'] - Vertical placement of the menu
|
|
55
|
+
*
|
|
56
|
+
* @returns {React.ReactElement} A dropdown menu component with trigger and content
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* // Simple dropdown with static menu items
|
|
60
|
+
* <DropdownMenu
|
|
61
|
+
* anchor={({ open }) => <button onClick={open}>Actions</button>}
|
|
62
|
+
* menu={[
|
|
63
|
+
* <button key="1">Edit</button>,
|
|
64
|
+
* <button key="2">Delete</button>,
|
|
65
|
+
* ]}
|
|
66
|
+
* />
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* // Dropdown with dynamic menu items and header
|
|
70
|
+
* <DropdownMenu
|
|
71
|
+
* anchor={({ open }) => <IconButton icon={<MoreIcon />} onClick={open} />}
|
|
72
|
+
* menu={({ close }) => items.map(item => (
|
|
73
|
+
* <button key={item.id} onClick={() => { selectItem(item); close(); }}>
|
|
74
|
+
* {item.name}
|
|
75
|
+
* </button>
|
|
76
|
+
* ))}
|
|
77
|
+
* menuHeader={<span className="px-2 py-1 text-sm font-semibold">Options</span>}
|
|
78
|
+
* align="start"
|
|
79
|
+
* />
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* // Dropdown with infinite scroll
|
|
83
|
+
* <DropdownMenu
|
|
84
|
+
* anchor={({ open }) => <button onClick={open}>Load More</button>}
|
|
85
|
+
* menu={filteredItems}
|
|
86
|
+
* menuFooter={<span className="text-xs text-muted">Showing {items.length} items</span>}
|
|
87
|
+
* handleMenuScroll={async (e) => {
|
|
88
|
+
* if (isNearBottom(e)) {
|
|
89
|
+
* await loadMoreItems();
|
|
90
|
+
* }
|
|
91
|
+
* }}
|
|
92
|
+
* />
|
|
93
|
+
*/
|
|
21
94
|
export declare const DropdownMenu: ({ menu, menuSlot, useMenuSlot, menuHeader, menuFooter, menuContentClassName, menuListClassName, anchor, handleMenuScroll, align, side, }: DropdownMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props for the PreviewFiles component
|
|
3
|
+
*/
|
|
1
4
|
export type PreviewFilesProps = {
|
|
5
|
+
/** Array of files or single file to display. Can be File objects or string URLs. Accepts null for empty state */
|
|
2
6
|
files: File[] | File | string[] | string | null;
|
|
7
|
+
/** Optional label text displayed above the file list */
|
|
3
8
|
label?: string;
|
|
9
|
+
/** Optional callback fired when files are deleted. Receives remaining files array and deleted file */
|
|
4
10
|
onChange?: (newFiles: File[], deletedFile: File) => void;
|
|
11
|
+
/** Whether to show download button for each file. Defaults to false */
|
|
5
12
|
showDownload?: boolean;
|
|
13
|
+
/** Whether to hide the delete button for each file. Defaults to false */
|
|
6
14
|
hideDelete?: boolean;
|
|
15
|
+
/** Optional CSS class names for the container element */
|
|
7
16
|
className?: string;
|
|
8
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* PreviewFiles component that displays a list of files with preview, download, and delete functionality.
|
|
20
|
+
*
|
|
21
|
+
* This component renders file items in a grid/list format with icons, sizes, and action buttons.
|
|
22
|
+
* It supports both File objects and URL strings, automatically fetching file information for remote files.
|
|
23
|
+
* Users can preview files by clicking on them, download them, and delete them from the list.
|
|
24
|
+
*
|
|
25
|
+
* @component
|
|
26
|
+
* @param {PreviewFilesProps} props - The component props
|
|
27
|
+
* @param {File[] | File | string[] | string | null} props.files - Files to display (File objects or URLs)
|
|
28
|
+
* @param {string} [props.label] - Optional label text displayed above the file list
|
|
29
|
+
* @param {(newFiles: File[], deletedFile: File) => void} [props.onChange] - Callback when files are deleted
|
|
30
|
+
* @param {boolean} [props.showDownload=false] - Whether to show download button
|
|
31
|
+
* @param {boolean} [props.hideDelete=false] - Whether to hide delete button
|
|
32
|
+
* @param {string} [props.className] - Optional CSS classes for the container
|
|
33
|
+
*
|
|
34
|
+
* @returns {React.ReactElement | null} A div containing the file list, or null if no files
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* // Display File objects with delete capability
|
|
38
|
+
* <PreviewFiles
|
|
39
|
+
* files={uploadedFiles}
|
|
40
|
+
* label="Uploaded Files"
|
|
41
|
+
* onChange={(newFiles, deleted) => setFiles(newFiles)}
|
|
42
|
+
* />
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* // Display remote files with download button
|
|
46
|
+
* <PreviewFiles
|
|
47
|
+
* files={['https://example.com/file1.pdf', 'https://example.com/file2.docx']}
|
|
48
|
+
* label="Documents"
|
|
49
|
+
* showDownload={true}
|
|
50
|
+
* hideDelete={true}
|
|
51
|
+
* />
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* // Mixed files with custom styling
|
|
55
|
+
* <PreviewFiles
|
|
56
|
+
* files={[file1, 'https://example.com/file.pdf']}
|
|
57
|
+
* label="Files"
|
|
58
|
+
* showDownload={true}
|
|
59
|
+
* onChange={handleFileDelete}
|
|
60
|
+
* className="bg-gray-50 p-4 rounded-lg"
|
|
61
|
+
* />
|
|
62
|
+
*/
|
|
9
63
|
export declare const PreviewFiles: ({ files, label, onChange, showDownload, hideDelete, className, }: PreviewFilesProps) => import("react/jsx-runtime").JSX.Element;
|