@campxdev/react-blueprint 3.0.0-alpha.5 → 3.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/types/src/components/Assets/ErrorPages/ComingSoon.d.ts +24 -0
- package/dist/cjs/types/src/components/Assets/ErrorPages/InternalServerError.d.ts +20 -0
- package/dist/cjs/types/src/components/Assets/ErrorPages/NoInternetConnection.d.ts +20 -0
- package/dist/cjs/types/src/components/Assets/ErrorPages/NoItemFound.d.ts +28 -0
- package/dist/cjs/types/src/components/Assets/ErrorPages/PageNotFound.d.ts +21 -0
- package/dist/cjs/types/src/components/Assets/ErrorPages/ResourceNotFound.d.ts +21 -0
- package/dist/cjs/types/src/components/Assets/ErrorPages/UnAuthorized.d.ts +31 -0
- package/dist/cjs/types/src/components/Assets/Icons/Icons.d.ts +54 -0
- package/dist/cjs/types/src/components/Charts/BarChart/BarChart.d.ts +38 -0
- package/dist/cjs/types/src/components/Charts/BarChart/HorizontalBarChart.d.ts +93 -0
- package/dist/cjs/types/src/components/Charts/BarChart/VerticalBarChart.d.ts +110 -0
- package/dist/cjs/types/src/components/Charts/LineChart/LineChart.d.ts +89 -0
- package/dist/cjs/types/src/components/Charts/PieChart/PieChart.d.ts +86 -0
- package/dist/cjs/types/src/components/Charts/TreeMap/TreeMap.d.ts +74 -0
- package/dist/cjs/types/src/components/DataDisplay/Accordion/Accordion.d.ts +54 -0
- package/dist/cjs/types/src/components/DataDisplay/ActivityLogView/ActivityLogFilter.d.ts +35 -0
- package/dist/cjs/types/src/components/DataDisplay/ActivityLogView/ActivityLogView.d.ts +78 -0
- package/dist/cjs/types/src/components/DataDisplay/Avatar/Avatar.d.ts +40 -0
- package/dist/cjs/types/src/components/DataDisplay/Chip/Chip.d.ts +28 -0
- package/dist/cjs/types/src/components/DataDisplay/Chips/Chips.d.ts +55 -0
- package/dist/cjs/types/src/components/DataDisplay/DataTable/DataTable.d.ts +95 -0
- package/dist/cjs/types/src/components/DataDisplay/DataTable/components/TablePagination.d.ts +35 -0
- package/dist/cjs/types/src/components/DataDisplay/EmptyIllustration/EmptyIllustration.d.ts +30 -0
- package/dist/cjs/types/src/components/DataDisplay/ReactJoyride/ReactJoyride.d.ts +64 -0
- package/dist/cjs/types/src/components/DataDisplay/Separator/Separator.d.ts +30 -0
- package/dist/cjs/types/src/components/DataDisplay/Skeleton/Skeleton.d.ts +20 -0
- package/dist/cjs/types/src/components/DataDisplay/StatusCard/StatusCard.d.ts +36 -0
- package/dist/cjs/types/src/components/DataDisplay/Timeline/Timeline.d.ts +58 -0
- package/dist/cjs/types/src/components/DataDisplay/Typography/Typography.d.ts +25 -0
- package/dist/cjs/types/src/components/Feedback/Alert/Alert.d.ts +31 -0
- package/dist/cjs/types/src/components/Feedback/Snackbar/Snackbar.d.ts +54 -0
- package/dist/cjs/types/src/components/Feedback/Spinner/Spinner.d.ts +15 -0
- package/dist/cjs/types/src/components/Feedback/Tooltip/Tooltip.d.ts +54 -0
- package/dist/cjs/types/src/components/Input/Button/Button.d.ts +26 -0
- package/dist/cjs/types/src/components/Input/DatePicker/DatePicker.d.ts +41 -0
- package/dist/cjs/types/src/components/Input/DateTimePicker/DateTimePicker.d.ts +42 -0
- package/dist/cjs/types/src/components/Input/FileUpload/FileUpload.d.ts +41 -0
- package/dist/cjs/types/src/components/Input/FormActions/FormActions.d.ts +37 -0
- package/dist/cjs/types/src/components/Input/FormControlWrapper/FormControlWrapper.d.ts +31 -0
- package/dist/cjs/types/src/components/Input/FormWrapper/FormWrapper.d.ts +20 -0
- package/dist/cjs/types/src/components/Input/HelpButton/HelpButton.d.ts +14 -0
- package/dist/cjs/types/src/components/Input/IconButtons/IconButtons/DeleteButton.d.ts +16 -0
- package/dist/cjs/types/src/components/Input/IconButtons/IconButtons/EditButton.d.ts +16 -0
- package/dist/cjs/types/src/components/Input/IconButtons/IconButtons/RedirectButton.d.ts +16 -0
- package/dist/cjs/types/src/components/Input/IconButtons/IconButtons/ViewButton.d.ts +16 -0
- package/dist/cjs/types/src/components/Input/IconButtons/IconButtons.d.ts +18 -0
- package/dist/cjs/types/src/components/Input/LabelWrapper/LabelWrapper.d.ts +26 -0
- package/dist/cjs/types/src/components/Input/MultiCheckBox/MultiCheckBox.d.ts +34 -0
- package/dist/cjs/types/src/components/Input/MultiSelect/MultiSelect.d.ts +40 -0
- package/dist/cjs/types/src/components/Input/OtpInput/OtpInput.d.ts +29 -0
- package/dist/cjs/types/src/components/Input/PasswordField/PasswordField.d.ts +34 -0
- package/dist/cjs/types/src/components/Input/RadioGroup/RadioGroup.d.ts +38 -0
- package/dist/cjs/types/src/components/Input/SearchBar/SearchBar.d.ts +26 -0
- package/dist/cjs/types/src/components/Input/Select/Select.d.ts +32 -0
- package/dist/cjs/types/src/components/Input/SingleCheckBox/SingleCheckBox.d.ts +29 -0
- package/dist/cjs/types/src/components/Input/SingleSelect/SingleSelect.d.ts +40 -0
- package/dist/cjs/types/src/components/Input/Switch/Switch.d.ts +23 -0
- package/dist/cjs/types/src/components/Input/Tags/Tags.d.ts +26 -0
- package/dist/cjs/types/src/components/Input/TextField/TextField.d.ts +35 -0
- package/dist/cjs/types/src/components/Input/Textarea/Textarea.d.ts +36 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/AppLayout.d.ts +32 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/MenuToggleButton.d.ts +16 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/MenuBar.d.ts +26 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/MenuItem.d.ts +37 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/Sidebar.d.ts +30 -1
- package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/StyledComponents.d.ts +139 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/UserProfilePopup.d.ts +34 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/context/SidebarContext.d.ts +48 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/types.d.ts +1 -1
- package/dist/cjs/types/src/components/Layout/PageContent/PageContent.d.ts +19 -0
- package/dist/cjs/types/src/components/Layout/PageHeader/PageHeader.d.ts +46 -0
- package/dist/cjs/types/src/components/Layout/PageHeader/components/SearchBar.d.ts +22 -0
- package/dist/cjs/types/src/components/Layout/UserBox/UserBox.d.ts +40 -0
- package/dist/cjs/types/src/components/Navigation/Breadcrumbs/Breadcrumbs.d.ts +33 -0
- package/dist/cjs/types/src/components/Navigation/Calendar/Calendar.d.ts +63 -0
- package/dist/cjs/types/src/components/Navigation/ConfirmDialog/ConfirmDialog.d.ts +64 -0
- package/dist/cjs/types/src/components/Navigation/Dialog/Dialog.d.ts +55 -0
- package/dist/cjs/types/src/components/Navigation/DialogButton/DialogButton.d.ts +64 -0
- package/dist/cjs/types/src/components/Navigation/DropDownMenu/DropDownMenu.d.ts +73 -0
- package/dist/cjs/types/src/components/Navigation/PreviewFiles/PreviewFiles.d.ts +54 -0
- package/dist/cjs/types/src/components/Navigation/Stepper/Stepper.d.ts +55 -10
- package/dist/cjs/types/src/components/Navigation/TabsContainer/TabsContainer.d.ts +80 -0
- package/dist/cjs/types/src/components/Navigation/UploadDialog/UploadDialog.d.ts +64 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/types/src/components/Assets/ErrorPages/ComingSoon.d.ts +24 -0
- package/dist/esm/types/src/components/Assets/ErrorPages/InternalServerError.d.ts +20 -0
- package/dist/esm/types/src/components/Assets/ErrorPages/NoInternetConnection.d.ts +20 -0
- package/dist/esm/types/src/components/Assets/ErrorPages/NoItemFound.d.ts +28 -0
- package/dist/esm/types/src/components/Assets/ErrorPages/PageNotFound.d.ts +21 -0
- package/dist/esm/types/src/components/Assets/ErrorPages/ResourceNotFound.d.ts +21 -0
- package/dist/esm/types/src/components/Assets/ErrorPages/UnAuthorized.d.ts +31 -0
- package/dist/esm/types/src/components/Assets/Icons/Icons.d.ts +54 -0
- package/dist/esm/types/src/components/Charts/BarChart/BarChart.d.ts +38 -0
- package/dist/esm/types/src/components/Charts/BarChart/HorizontalBarChart.d.ts +93 -0
- package/dist/esm/types/src/components/Charts/BarChart/VerticalBarChart.d.ts +110 -0
- package/dist/esm/types/src/components/Charts/LineChart/LineChart.d.ts +89 -0
- package/dist/esm/types/src/components/Charts/PieChart/PieChart.d.ts +86 -0
- package/dist/esm/types/src/components/Charts/TreeMap/TreeMap.d.ts +74 -0
- package/dist/esm/types/src/components/DataDisplay/Accordion/Accordion.d.ts +54 -0
- package/dist/esm/types/src/components/DataDisplay/ActivityLogView/ActivityLogFilter.d.ts +35 -0
- package/dist/esm/types/src/components/DataDisplay/ActivityLogView/ActivityLogView.d.ts +78 -0
- package/dist/esm/types/src/components/DataDisplay/Avatar/Avatar.d.ts +40 -0
- package/dist/esm/types/src/components/DataDisplay/Chip/Chip.d.ts +28 -0
- package/dist/esm/types/src/components/DataDisplay/Chips/Chips.d.ts +55 -0
- package/dist/esm/types/src/components/DataDisplay/DataTable/DataTable.d.ts +95 -0
- package/dist/esm/types/src/components/DataDisplay/DataTable/components/TablePagination.d.ts +35 -0
- package/dist/esm/types/src/components/DataDisplay/EmptyIllustration/EmptyIllustration.d.ts +30 -0
- package/dist/esm/types/src/components/DataDisplay/ReactJoyride/ReactJoyride.d.ts +64 -0
- package/dist/esm/types/src/components/DataDisplay/Separator/Separator.d.ts +30 -0
- package/dist/esm/types/src/components/DataDisplay/Skeleton/Skeleton.d.ts +20 -0
- package/dist/esm/types/src/components/DataDisplay/StatusCard/StatusCard.d.ts +36 -0
- package/dist/esm/types/src/components/DataDisplay/Timeline/Timeline.d.ts +58 -0
- package/dist/esm/types/src/components/DataDisplay/Typography/Typography.d.ts +25 -0
- package/dist/esm/types/src/components/Feedback/Alert/Alert.d.ts +31 -0
- package/dist/esm/types/src/components/Feedback/Snackbar/Snackbar.d.ts +54 -0
- package/dist/esm/types/src/components/Feedback/Spinner/Spinner.d.ts +15 -0
- package/dist/esm/types/src/components/Feedback/Tooltip/Tooltip.d.ts +54 -0
- package/dist/esm/types/src/components/Input/Button/Button.d.ts +26 -0
- package/dist/esm/types/src/components/Input/DatePicker/DatePicker.d.ts +41 -0
- package/dist/esm/types/src/components/Input/DateTimePicker/DateTimePicker.d.ts +42 -0
- package/dist/esm/types/src/components/Input/FileUpload/FileUpload.d.ts +41 -0
- package/dist/esm/types/src/components/Input/FormActions/FormActions.d.ts +37 -0
- package/dist/esm/types/src/components/Input/FormControlWrapper/FormControlWrapper.d.ts +31 -0
- package/dist/esm/types/src/components/Input/FormWrapper/FormWrapper.d.ts +20 -0
- package/dist/esm/types/src/components/Input/HelpButton/HelpButton.d.ts +14 -0
- package/dist/esm/types/src/components/Input/IconButtons/IconButtons/DeleteButton.d.ts +16 -0
- package/dist/esm/types/src/components/Input/IconButtons/IconButtons/EditButton.d.ts +16 -0
- package/dist/esm/types/src/components/Input/IconButtons/IconButtons/RedirectButton.d.ts +16 -0
- package/dist/esm/types/src/components/Input/IconButtons/IconButtons/ViewButton.d.ts +16 -0
- package/dist/esm/types/src/components/Input/IconButtons/IconButtons.d.ts +18 -0
- package/dist/esm/types/src/components/Input/LabelWrapper/LabelWrapper.d.ts +26 -0
- package/dist/esm/types/src/components/Input/MultiCheckBox/MultiCheckBox.d.ts +34 -0
- package/dist/esm/types/src/components/Input/MultiSelect/MultiSelect.d.ts +40 -0
- package/dist/esm/types/src/components/Input/OtpInput/OtpInput.d.ts +29 -0
- package/dist/esm/types/src/components/Input/PasswordField/PasswordField.d.ts +34 -0
- package/dist/esm/types/src/components/Input/RadioGroup/RadioGroup.d.ts +38 -0
- package/dist/esm/types/src/components/Input/SearchBar/SearchBar.d.ts +26 -0
- package/dist/esm/types/src/components/Input/Select/Select.d.ts +32 -0
- package/dist/esm/types/src/components/Input/SingleCheckBox/SingleCheckBox.d.ts +29 -0
- package/dist/esm/types/src/components/Input/SingleSelect/SingleSelect.d.ts +40 -0
- package/dist/esm/types/src/components/Input/Switch/Switch.d.ts +23 -0
- package/dist/esm/types/src/components/Input/Tags/Tags.d.ts +26 -0
- package/dist/esm/types/src/components/Input/TextField/TextField.d.ts +35 -0
- package/dist/esm/types/src/components/Input/Textarea/Textarea.d.ts +36 -0
- package/dist/esm/types/src/components/Layout/AppLayout/AppLayout.d.ts +32 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/MenuToggleButton.d.ts +16 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/MenuBar.d.ts +26 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/MenuItem.d.ts +37 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/Sidebar.d.ts +30 -1
- package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/StyledComponents.d.ts +139 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/UserProfilePopup.d.ts +34 -0
- package/dist/esm/types/src/components/Layout/AppLayout/context/SidebarContext.d.ts +48 -0
- package/dist/esm/types/src/components/Layout/AppLayout/types.d.ts +1 -1
- package/dist/esm/types/src/components/Layout/PageContent/PageContent.d.ts +19 -0
- package/dist/esm/types/src/components/Layout/PageHeader/PageHeader.d.ts +46 -0
- package/dist/esm/types/src/components/Layout/PageHeader/components/SearchBar.d.ts +22 -0
- package/dist/esm/types/src/components/Layout/UserBox/UserBox.d.ts +40 -0
- package/dist/esm/types/src/components/Navigation/Breadcrumbs/Breadcrumbs.d.ts +33 -0
- package/dist/esm/types/src/components/Navigation/Calendar/Calendar.d.ts +63 -0
- package/dist/esm/types/src/components/Navigation/ConfirmDialog/ConfirmDialog.d.ts +64 -0
- package/dist/esm/types/src/components/Navigation/Dialog/Dialog.d.ts +55 -0
- package/dist/esm/types/src/components/Navigation/DialogButton/DialogButton.d.ts +64 -0
- package/dist/esm/types/src/components/Navigation/DropDownMenu/DropDownMenu.d.ts +73 -0
- package/dist/esm/types/src/components/Navigation/PreviewFiles/PreviewFiles.d.ts +54 -0
- package/dist/esm/types/src/components/Navigation/Stepper/Stepper.d.ts +55 -10
- package/dist/esm/types/src/components/Navigation/TabsContainer/TabsContainer.d.ts +80 -0
- package/dist/esm/types/src/components/Navigation/UploadDialog/UploadDialog.d.ts +64 -0
- package/dist/index.d.ts +2953 -12
- package/dist/styles.css +30 -9
- package/package.json +1 -1
- package/src/components/Assets/ErrorPages/ComingSoon.tsx +24 -0
- package/src/components/Assets/ErrorPages/InternalServerError.tsx +20 -0
- package/src/components/Assets/ErrorPages/NoInternetConnection.tsx +20 -0
- package/src/components/Assets/ErrorPages/NoItemFound.tsx +28 -0
- package/src/components/Assets/ErrorPages/PageNotFound.tsx +21 -0
- package/src/components/Assets/ErrorPages/ResourceNotFound.tsx +21 -0
- package/src/components/Assets/ErrorPages/UnAuthorized.tsx +31 -0
- package/src/components/Assets/Icons/Icons.tsx +55 -1
- package/src/components/Charts/BarChart/BarChart.tsx +38 -0
- package/src/components/Charts/BarChart/HorizontalBarChart.tsx +93 -0
- package/src/components/Charts/BarChart/VerticalBarChart.tsx +110 -0
- package/src/components/Charts/LineChart/LineChart.tsx +89 -0
- package/src/components/Charts/PieChart/PieChart.tsx +86 -0
- package/src/components/Charts/TreeMap/TreeMap.tsx +90 -0
- package/src/components/DataDisplay/Accordion/Accordion.tsx +54 -0
- package/src/components/DataDisplay/ActivityLogView/ActivityLogFilter.tsx +35 -0
- package/src/components/DataDisplay/ActivityLogView/ActivityLogView.tsx +84 -0
- package/src/components/DataDisplay/Avatar/Avatar.tsx +40 -0
- package/src/components/DataDisplay/Chip/Chip.tsx +28 -0
- package/src/components/DataDisplay/Chips/Chips.tsx +56 -0
- package/src/components/DataDisplay/DataTable/DataTable.tsx +95 -0
- package/src/components/DataDisplay/DataTable/components/TablePagination.tsx +35 -0
- package/src/components/DataDisplay/EmptyIllustration/EmptyIllustration.tsx +31 -0
- package/src/components/DataDisplay/ReactJoyride/ReactJoyride.tsx +64 -0
- package/src/components/DataDisplay/Separator/Separator.tsx +32 -0
- package/src/components/DataDisplay/Skeleton/Skeleton.tsx +20 -0
- package/src/components/DataDisplay/StatusCard/StatusCard.tsx +36 -0
- package/src/components/DataDisplay/Timeline/Timeline.tsx +58 -0
- package/src/components/DataDisplay/Typography/Typography.tsx +25 -0
- package/src/components/Feedback/Alert/Alert.tsx +38 -0
- package/src/components/Feedback/Snackbar/Snackbar.tsx +54 -0
- package/src/components/Feedback/Spinner/Spinner.tsx +15 -0
- package/src/components/Feedback/Tooltip/Tooltip.tsx +54 -0
- package/src/components/Input/Button/Button.tsx +26 -0
- package/src/components/Input/DatePicker/DatePicker.tsx +41 -0
- package/src/components/Input/DateTimePicker/DateTimePicker.tsx +42 -0
- package/src/components/Input/FileUpload/FileUpload.tsx +41 -0
- package/src/components/Input/FormActions/FormActions.tsx +37 -0
- package/src/components/Input/FormControlWrapper/FormControlWrapper.tsx +31 -0
- package/src/components/Input/FormWrapper/FormWrapper.tsx +20 -0
- package/src/components/Input/HelpButton/HelpButton.tsx +14 -0
- package/src/components/Input/IconButtons/IconButtons/DeleteButton.tsx +16 -0
- package/src/components/Input/IconButtons/IconButtons/EditButton.tsx +16 -0
- package/src/components/Input/IconButtons/IconButtons/RedirectButton.tsx +16 -0
- package/src/components/Input/IconButtons/IconButtons/ViewButton.tsx +16 -0
- package/src/components/Input/IconButtons/IconButtons.tsx +18 -0
- package/src/components/Input/LabelWrapper/LabelWrapper.tsx +26 -0
- package/src/components/Input/MultiCheckBox/MultiCheckBox.tsx +34 -0
- package/src/components/Input/MultiSelect/MultiSelect.tsx +40 -0
- package/src/components/Input/OtpInput/OtpInput.tsx +29 -0
- package/src/components/Input/PasswordField/PasswordField.tsx +34 -0
- package/src/components/Input/RadioGroup/RadioGroup.tsx +38 -0
- package/src/components/Input/SearchBar/SearchBar.tsx +26 -0
- package/src/components/Input/Select/Select.tsx +41 -0
- package/src/components/Input/SingleCheckBox/SingleCheckBox.tsx +29 -0
- package/src/components/Input/SingleSelect/SingleSelect.tsx +40 -0
- package/src/components/Input/Switch/Switch.tsx +23 -0
- package/src/components/Input/Tags/Tags.tsx +26 -0
- package/src/components/Input/TextField/TextField.tsx +35 -0
- package/src/components/Input/Textarea/Textarea.tsx +36 -0
- package/src/components/Layout/AppLayout/AppLayout.tsx +33 -1
- package/src/components/Layout/AppLayout/components/MenuToggleButton.tsx +16 -0
- package/src/components/Layout/AppLayout/components/Sidebar/MenuBar.tsx +26 -0
- package/src/components/Layout/AppLayout/components/Sidebar/MenuItem.tsx +51 -1
- package/src/components/Layout/AppLayout/components/Sidebar/Sidebar.tsx +173 -104
- package/src/components/Layout/AppLayout/components/Sidebar/StyledComponents.tsx +139 -9
- package/src/components/Layout/AppLayout/components/UserProfilePopup.tsx +34 -0
- package/src/components/Layout/AppLayout/context/SidebarContext.tsx +48 -0
- package/src/components/Layout/AppLayout/types.ts +1 -1
- package/src/components/Layout/PageContent/PageContent.tsx +19 -0
- package/src/components/Layout/PageHeader/PageHeader.tsx +46 -0
- package/src/components/Layout/PageHeader/components/SearchBar.tsx +22 -0
- package/src/components/Layout/UserBox/UserBox.tsx +40 -0
- package/src/components/Navigation/Breadcrumbs/Breadcrumbs.tsx +33 -0
- package/src/components/Navigation/Calendar/Calendar.tsx +63 -0
- package/src/components/Navigation/ConfirmDialog/ConfirmDialog.tsx +64 -0
- package/src/components/Navigation/Dialog/Dialog.tsx +55 -0
- package/src/components/Navigation/DialogButton/DialogButton.tsx +64 -0
- package/src/components/Navigation/DropDownMenu/DropDownMenu.tsx +73 -0
- package/src/components/Navigation/PreviewFiles/PreviewFiles.tsx +93 -0
- package/src/components/Navigation/Stepper/Stepper.tsx +56 -10
- package/src/components/Navigation/TabsContainer/TabsContainer.tsx +80 -0
- package/src/components/Navigation/UploadDialog/UploadDialog.tsx +64 -0
- package/src/shadcn-components/Layout/Sheet/Sheet.tsx +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -44,10 +44,74 @@ interface NoItemFoundProps$1 {
|
|
|
44
44
|
title?: string;
|
|
45
45
|
description: ReactNode;
|
|
46
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* ComingSoon component displays a "Coming Soon" placeholder page.
|
|
49
|
+
*
|
|
50
|
+
* This component renders a centered container with an SVG illustration,
|
|
51
|
+
* a title, and a description message to inform users that a feature or page
|
|
52
|
+
* is not yet available.
|
|
53
|
+
*
|
|
54
|
+
* @component
|
|
55
|
+
* @param {Object} props - The component props
|
|
56
|
+
* @param {string} [props.title='Coming Soon'] - The title text to display. Defaults to "Coming Soon"
|
|
57
|
+
* @param {ReactNode} props.description - The description or message to display below the title
|
|
58
|
+
* @returns {React.ReactElement} A centered layout with SVG, title, and description
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* // Basic usage
|
|
62
|
+
* <ComingSoon description="This feature will be available soon!" />
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* // With custom title
|
|
66
|
+
* <ComingSoon
|
|
67
|
+
* title="New Dashboard"
|
|
68
|
+
* description="We're working hard to bring you an improved dashboard experience."
|
|
69
|
+
* />
|
|
70
|
+
*/
|
|
47
71
|
declare const ComingSoon: ({ title, description, }: NoItemFoundProps$1) => react_jsx_runtime.JSX.Element;
|
|
48
72
|
|
|
73
|
+
/**
|
|
74
|
+
* InternalServerError component displays a 500 server error page.
|
|
75
|
+
*
|
|
76
|
+
* This component renders a centered error page with an SVG illustration,
|
|
77
|
+
* error message, and a "Try Again" button that triggers the error boundary reset.
|
|
78
|
+
* Typically used within an error boundary to handle unexpected server errors.
|
|
79
|
+
*
|
|
80
|
+
* @component
|
|
81
|
+
* @param {Object} props - The component props
|
|
82
|
+
* @param {Function} props.resetBoundary - Callback function to reset the error boundary and retry the operation
|
|
83
|
+
* @returns {React.ReactElement} A centered error page with icon, message, and retry button
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* // Usage within an error boundary
|
|
87
|
+
* <InternalServerError resetBoundary={() => window.location.reload()} />
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* // Usage with custom reset logic
|
|
91
|
+
* <InternalServerError resetBoundary={handleRetry} />
|
|
92
|
+
*/
|
|
49
93
|
declare const InternalServerError: ({ resetBoundary }: any) => react_jsx_runtime.JSX.Element;
|
|
50
94
|
|
|
95
|
+
/**
|
|
96
|
+
* NoInterneConnection component displays a "No Internet Connection" error page.
|
|
97
|
+
*
|
|
98
|
+
* This component renders a centered error page with an SVG illustration,
|
|
99
|
+
* a message informing the user of a lost internet connection, and a "Try Again" button.
|
|
100
|
+
* Useful for displaying when the application detects no network connectivity.
|
|
101
|
+
*
|
|
102
|
+
* @component
|
|
103
|
+
* @param {Object} props - The component props
|
|
104
|
+
* @param {Function} props.resetBoundary - Callback function to retry the connection or operation
|
|
105
|
+
* @returns {React.ReactElement} A centered offline error page with icon, message, and retry button
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* // Display when network connection is lost
|
|
109
|
+
* <NoInterneConnection resetBoundary={handleRetry} />
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* // With navigation reset
|
|
113
|
+
* <NoInterneConnection resetBoundary={() => window.location.reload()} />
|
|
114
|
+
*/
|
|
51
115
|
declare const NoInterneConnection: ({ resetBoundary }: any) => react_jsx_runtime.JSX.Element;
|
|
52
116
|
|
|
53
117
|
interface NoItemFoundProps {
|
|
@@ -56,16 +120,131 @@ interface NoItemFoundProps {
|
|
|
56
120
|
height?: string | number;
|
|
57
121
|
width?: string | number;
|
|
58
122
|
}
|
|
123
|
+
/**
|
|
124
|
+
* NoItemFound component displays a "No Items Found" placeholder page.
|
|
125
|
+
*
|
|
126
|
+
* This component renders a centered container with an empty state SVG illustration,
|
|
127
|
+
* a title, and a description. The SVG size can be customized with height and width props.
|
|
128
|
+
* Commonly used to indicate when a list, search results, or data collection is empty.
|
|
129
|
+
*
|
|
130
|
+
* @component
|
|
131
|
+
* @param {Object} props - The component props
|
|
132
|
+
* @param {string} [props.title='No Items Found'] - The title text to display. Defaults to "No Items Found"
|
|
133
|
+
* @param {ReactNode} props.description - The description or message to display below the title
|
|
134
|
+
* @param {string | number} [props.height] - The height of the SVG illustration
|
|
135
|
+
* @param {string | number} [props.width] - The width of the SVG illustration
|
|
136
|
+
* @returns {React.ReactElement} A centered layout with SVG, title, and description
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* // Basic usage
|
|
140
|
+
* <NoItemFound description="Try adjusting your search criteria." />
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* // With custom title and SVG dimensions
|
|
144
|
+
* <NoItemFound
|
|
145
|
+
* title="No Results"
|
|
146
|
+
* description="Your search didn't return any results."
|
|
147
|
+
* width={200}
|
|
148
|
+
* height={200}
|
|
149
|
+
* />
|
|
150
|
+
*/
|
|
59
151
|
declare const NoItemFound: ({ title, description, height, width, }: NoItemFoundProps) => react_jsx_runtime.JSX.Element;
|
|
60
152
|
|
|
153
|
+
/**
|
|
154
|
+
* PageNotFound component displays a 404 "Page Not Found" error page.
|
|
155
|
+
*
|
|
156
|
+
* This component renders a centered error page with an SVG illustration
|
|
157
|
+
* and informative messages to indicate that the requested page does not exist.
|
|
158
|
+
* Typically used as a fallback for invalid or missing routes.
|
|
159
|
+
*
|
|
160
|
+
* @component
|
|
161
|
+
* @returns {React.ReactElement} A centered 404 error page with icon and messages
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* // Basic usage in routing
|
|
165
|
+
* <Route path="*" element={<PageNotFound />} />
|
|
166
|
+
*
|
|
167
|
+
* @example
|
|
168
|
+
* // As a fallback route
|
|
169
|
+
* <Routes>
|
|
170
|
+
* <Route path="/" element={<Home />} />
|
|
171
|
+
* <Route path="*" element={<PageNotFound />} />
|
|
172
|
+
* </Routes>
|
|
173
|
+
*/
|
|
61
174
|
declare const PageNotFound: () => react_jsx_runtime.JSX.Element;
|
|
62
175
|
|
|
176
|
+
/**
|
|
177
|
+
* ResourceNotFound component displays a "Resource Not Found" error page.
|
|
178
|
+
*
|
|
179
|
+
* This component renders a centered error page with an SVG illustration
|
|
180
|
+
* and a custom message. Typically used when a specific resource (e.g., user, post, item)
|
|
181
|
+
* cannot be found in the system.
|
|
182
|
+
*
|
|
183
|
+
* @component
|
|
184
|
+
* @param {any} message - The error message or description to display. Can be any ReactNode type
|
|
185
|
+
* @returns {React.ReactElement} A centered error page with icon and custom message
|
|
186
|
+
*
|
|
187
|
+
* @example
|
|
188
|
+
* // Basic usage
|
|
189
|
+
* <ResourceNotFound message="The user profile you're looking for does not exist." />
|
|
190
|
+
*
|
|
191
|
+
* @example
|
|
192
|
+
* // With JSX message
|
|
193
|
+
* <ResourceNotFound
|
|
194
|
+
* message={<span>The requested <strong>item</strong> was not found in the database.</span>}
|
|
195
|
+
* />
|
|
196
|
+
*/
|
|
63
197
|
declare const ResourceNotFound: (message: any) => react_jsx_runtime.JSX.Element;
|
|
64
198
|
|
|
199
|
+
/**
|
|
200
|
+
* UnAuthorized component displays an "Unauthorized Access" error page.
|
|
201
|
+
*
|
|
202
|
+
* This component renders a centered error page with an SVG illustration,
|
|
203
|
+
* a message indicating the user must be logged in, and an optional login component.
|
|
204
|
+
* Typically used to protect routes that require authentication.
|
|
205
|
+
*
|
|
206
|
+
* @component
|
|
207
|
+
* @param {Object} props - The component props
|
|
208
|
+
* @param {ReactNode} [props.component] - Optional React element to render below the messages (e.g., a login form or button)
|
|
209
|
+
* @returns {React.ReactElement} A centered authorization error page with icon, messages, and optional component
|
|
210
|
+
*
|
|
211
|
+
* @example
|
|
212
|
+
* // Basic usage without additional component
|
|
213
|
+
* <UnAuthorized />
|
|
214
|
+
*
|
|
215
|
+
* @example
|
|
216
|
+
* // With a login button
|
|
217
|
+
* <UnAuthorized component={<LoginButton />} />
|
|
218
|
+
*
|
|
219
|
+
* @example
|
|
220
|
+
* // With a full login form
|
|
221
|
+
* <UnAuthorized
|
|
222
|
+
* component={
|
|
223
|
+
* <form>
|
|
224
|
+
* <input type="email" placeholder="Email" />
|
|
225
|
+
* <button>Sign In</button>
|
|
226
|
+
* </form>
|
|
227
|
+
* }
|
|
228
|
+
* />
|
|
229
|
+
*/
|
|
65
230
|
declare const UnAuthorized: ({ component }: {
|
|
66
231
|
component?: ReactNode;
|
|
67
232
|
}) => react_jsx_runtime.JSX.Element;
|
|
68
233
|
|
|
234
|
+
/**
|
|
235
|
+
* IconProps interface defines common properties for icon components.
|
|
236
|
+
*
|
|
237
|
+
* Provides a standardized set of props for customizing icon appearance
|
|
238
|
+
* and behavior across the application.
|
|
239
|
+
*
|
|
240
|
+
* @interface IconProps
|
|
241
|
+
* @property {number} [size] - The size of the icon in pixels
|
|
242
|
+
* @property {string} [color] - The color of the icon (CSS color value)
|
|
243
|
+
* @property {boolean} [disabled] - Whether the icon is in a disabled state
|
|
244
|
+
* @property {string} [hoverColor] - The color of the icon on hover (CSS color value)
|
|
245
|
+
* @property {string} [backgroundColor] - The background color behind the icon (CSS color value)
|
|
246
|
+
* @property {Function} [onClick] - Callback function triggered when the icon is clicked
|
|
247
|
+
*/
|
|
69
248
|
interface IconProps {
|
|
70
249
|
size?: number;
|
|
71
250
|
color?: string;
|
|
@@ -74,11 +253,51 @@ interface IconProps {
|
|
|
74
253
|
backgroundColor?: string;
|
|
75
254
|
onClick?: (event: MouseEvent$1<Element>) => void;
|
|
76
255
|
}
|
|
256
|
+
/**
|
|
257
|
+
* IconComponent type represents a React functional component that accepts IconProps.
|
|
258
|
+
*
|
|
259
|
+
* Used as the base type for icon components throughout the application.
|
|
260
|
+
*
|
|
261
|
+
* @typedef {FC<IconProps>} IconComponent
|
|
262
|
+
*/
|
|
77
263
|
type IconComponent = FC<IconProps>;
|
|
264
|
+
/**
|
|
265
|
+
* IconsType interface defines the shape of the Icons object.
|
|
266
|
+
*
|
|
267
|
+
* Maps icon names to their corresponding component implementations.
|
|
268
|
+
*
|
|
269
|
+
* @interface IconsType
|
|
270
|
+
* @property {IconComponent} CampxFullLogoIcon - The full Campx logo with text icon component
|
|
271
|
+
* @property {IconComponent} CampxIcon - The Campx logo mark icon component
|
|
272
|
+
*/
|
|
78
273
|
type IconsType = {
|
|
79
274
|
CampxFullLogoIcon: IconComponent;
|
|
80
275
|
CampxIcon: IconComponent;
|
|
81
276
|
};
|
|
277
|
+
/**
|
|
278
|
+
* Icons object exports all available icon components.
|
|
279
|
+
*
|
|
280
|
+
* Provides a centralized registry of all icon components used throughout the application.
|
|
281
|
+
* Each icon can be accessed as a property of this object and used as a React component.
|
|
282
|
+
*
|
|
283
|
+
* @constant
|
|
284
|
+
* @type {IconsType}
|
|
285
|
+
*
|
|
286
|
+
* @example
|
|
287
|
+
* // Use individual icons
|
|
288
|
+
* <Icons.CampxIcon size={24} />
|
|
289
|
+
* <Icons.CampxFullLogoIcon />
|
|
290
|
+
*
|
|
291
|
+
* @example
|
|
292
|
+
* // Use in a component
|
|
293
|
+
* const MyComponent = () => {
|
|
294
|
+
* return (
|
|
295
|
+
* <div>
|
|
296
|
+
* <Icons.CampxIcon size={32} color="#E43341" />
|
|
297
|
+
* </div>
|
|
298
|
+
* );
|
|
299
|
+
* };
|
|
300
|
+
*/
|
|
82
301
|
declare const Icons: IconsType;
|
|
83
302
|
|
|
84
303
|
declare const THEMES: {
|
|
@@ -148,9 +367,46 @@ type LegendProps = {
|
|
|
148
367
|
className?: string;
|
|
149
368
|
};
|
|
150
369
|
|
|
370
|
+
/**
|
|
371
|
+
* Data object for HorizontalBarChart
|
|
372
|
+
* @typedef {Object} HorizontalBarChartData
|
|
373
|
+
* @property {string|number} [key] - Dynamic data properties
|
|
374
|
+
*/
|
|
151
375
|
interface HorizontalBarChartData {
|
|
152
376
|
[key: string]: string | number;
|
|
153
377
|
}
|
|
378
|
+
/**
|
|
379
|
+
* Props for the HorizontalBarChart component
|
|
380
|
+
* @typedef {Object} HorizontalBarChartProps
|
|
381
|
+
* @property {HorizontalBarChartData[]} data - Array of data objects to display
|
|
382
|
+
* @property {string[]} dataKeys - Array of keys from data objects to visualize as bars
|
|
383
|
+
* @property {string} xAxisKey - The key to use for Y-axis (category) labels
|
|
384
|
+
* @property {ChartConfig} config - Chart configuration with color mappings for data keys
|
|
385
|
+
* @property {number} [height] - Chart height in pixels (auto-calculated if not provided)
|
|
386
|
+
* @property {MarginProps} [margin={top: 20, right: 30, bottom: 20, left: -20}] - Chart margins
|
|
387
|
+
* @property {number} [barSize=32] - Height of each bar in pixels
|
|
388
|
+
* @property {number|number[]} [radius=5] - Border radius for bars (single value or [top-left, top-right, bottom-right, bottom-left])
|
|
389
|
+
* @property {string} [stackId] - ID for stacking multiple bars together
|
|
390
|
+
* @property {boolean} [hideXAxis=false] - Whether to hide the X-axis
|
|
391
|
+
* @property {number} [yAxisWidth=100] - Width allocated for Y-axis labels
|
|
392
|
+
* @property {Function} [yAxisTickFormatter] - Function to format Y-axis tick labels
|
|
393
|
+
* @property {Function} [xAxisTickFormatter] - Function to format X-axis tick labels
|
|
394
|
+
* @property {boolean} [showTooltip=true] - Whether to show tooltip on hover
|
|
395
|
+
* @property {boolean|object} [tooltipCursor=false] - Tooltip cursor appearance
|
|
396
|
+
* @property {boolean} [hideTooltipLabel=true] - Whether to hide the label in tooltip
|
|
397
|
+
* @property {'line'|'dot'|'dashed'} [tooltipIndicator='line'] - Tooltip indicator style
|
|
398
|
+
* @property {LegendProps} [legend] - Legend configuration props
|
|
399
|
+
* @property {boolean} [showLegend=false] - Whether to display the legend
|
|
400
|
+
* @property {string} [title] - Chart title text
|
|
401
|
+
* @property {TitleProps} [titleProps={variant: 'h3', className: ''}] - Title styling props
|
|
402
|
+
* @property {string} [subtitle] - Chart subtitle text
|
|
403
|
+
* @property {SubTitleProps} [subtitleProps={variant: 'muted', className: ''}] - Subtitle styling props
|
|
404
|
+
* @property {string} [className] - CSS class for the container
|
|
405
|
+
* @property {Function} [onBarClick] - Callback function when a bar is clicked
|
|
406
|
+
* @property {number} [animationDuration=750] - Duration of animations in milliseconds
|
|
407
|
+
* @property {'ease'|'ease-in'|'ease-out'|'ease-in-out'|'linear'} [animationEasing='ease-in-out'] - Easing function for animations
|
|
408
|
+
* @property {boolean} [accessibilityLayer=true] - Enable accessibility features
|
|
409
|
+
*/
|
|
154
410
|
interface HorizontalBarChartProps {
|
|
155
411
|
data: HorizontalBarChartData[];
|
|
156
412
|
dataKeys: string[];
|
|
@@ -181,11 +437,111 @@ interface HorizontalBarChartProps {
|
|
|
181
437
|
animationEasing?: 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear';
|
|
182
438
|
accessibilityLayer?: boolean;
|
|
183
439
|
}
|
|
440
|
+
/**
|
|
441
|
+
* HorizontalBarChart Component
|
|
442
|
+
* Displays data as horizontal bars with full customization support for axes, tooltips, legends, and animations.
|
|
443
|
+
* The chart dynamically calculates height based on data length if height is not provided.
|
|
444
|
+
*
|
|
445
|
+
* @component
|
|
446
|
+
* @param {HorizontalBarChartProps} props - The component props
|
|
447
|
+
* @param {HorizontalBarChartData[]} props.data - Array of data objects to display
|
|
448
|
+
* @param {string[]} props.dataKeys - Keys from data objects to visualize
|
|
449
|
+
* @param {string} props.xAxisKey - The key for Y-axis category labels
|
|
450
|
+
* @param {ChartConfig} props.config - Chart color and display configuration
|
|
451
|
+
* @param {number} [props.height] - Chart height; auto-calculated if not provided
|
|
452
|
+
* @param {MarginProps} [props.margin] - Chart margin spacing
|
|
453
|
+
* @param {number} [props.barSize] - Height of each bar in pixels
|
|
454
|
+
* @param {number|number[]} [props.radius] - Border radius for bar corners
|
|
455
|
+
* @param {string} [props.stackId] - ID for stacked bars
|
|
456
|
+
* @param {boolean} [props.hideXAxis] - Hide/show the X-axis
|
|
457
|
+
* @param {number} [props.yAxisWidth] - Width of Y-axis label area
|
|
458
|
+
* @param {Function} [props.yAxisTickFormatter] - Custom Y-axis label formatter
|
|
459
|
+
* @param {Function} [props.xAxisTickFormatter] - Custom X-axis label formatter
|
|
460
|
+
* @param {boolean} [props.showTooltip] - Show/hide tooltip
|
|
461
|
+
* @param {boolean|object} [props.tooltipCursor] - Tooltip cursor style
|
|
462
|
+
* @param {boolean} [props.hideTooltipLabel] - Hide/show tooltip label
|
|
463
|
+
* @param {'line'|'dot'|'dashed'} [props.tooltipIndicator] - Tooltip indicator style
|
|
464
|
+
* @param {LegendProps} [props.legend] - Legend configuration
|
|
465
|
+
* @param {boolean} [props.showLegend] - Show/hide legend
|
|
466
|
+
* @param {string} [props.title] - Chart title
|
|
467
|
+
* @param {TitleProps} [props.titleProps] - Title styling
|
|
468
|
+
* @param {string} [props.subtitle] - Chart subtitle
|
|
469
|
+
* @param {SubTitleProps} [props.subtitleProps] - Subtitle styling
|
|
470
|
+
* @param {string} [props.className] - Container CSS class
|
|
471
|
+
* @param {Function} [props.onBarClick] - Click handler callback
|
|
472
|
+
* @param {number} [props.animationDuration] - Animation duration in ms
|
|
473
|
+
* @param {'ease'|'ease-in'|'ease-out'|'ease-in-out'|'linear'} [props.animationEasing] - Animation easing
|
|
474
|
+
* @param {boolean} [props.accessibilityLayer] - Enable accessibility features
|
|
475
|
+
* @returns {React.ReactElement} Rendered horizontal bar chart
|
|
476
|
+
*
|
|
477
|
+
* @example
|
|
478
|
+
* const data = [
|
|
479
|
+
* { category: 'Category A', value: 120 },
|
|
480
|
+
* { category: 'Category B', value: 200 }
|
|
481
|
+
* ];
|
|
482
|
+
* const config = {
|
|
483
|
+
* value: { label: 'Value', color: '#3b82f6' }
|
|
484
|
+
* };
|
|
485
|
+
*
|
|
486
|
+
* return (
|
|
487
|
+
* <HorizontalBarChart
|
|
488
|
+
* data={data}
|
|
489
|
+
* dataKeys={['value']}
|
|
490
|
+
* xAxisKey="category"
|
|
491
|
+
* config={config}
|
|
492
|
+
* title="Sales by Category"
|
|
493
|
+
* />
|
|
494
|
+
* );
|
|
495
|
+
*/
|
|
184
496
|
declare const HorizontalBarChart: React__default.FC<HorizontalBarChartProps>;
|
|
185
497
|
|
|
498
|
+
/**
|
|
499
|
+
* Data object for VerticalBarChart
|
|
500
|
+
* @typedef {Object} VerticalBarChartData
|
|
501
|
+
* @property {string|number} [key] - Dynamic data properties
|
|
502
|
+
*/
|
|
186
503
|
interface VerticalBarChartData {
|
|
187
504
|
[key: string]: string | number;
|
|
188
505
|
}
|
|
506
|
+
/**
|
|
507
|
+
* Props for the VerticalBarChart component
|
|
508
|
+
* @typedef {Object} VerticalBarChartProps
|
|
509
|
+
* @property {VerticalBarChartData[]} data - Array of data objects to display
|
|
510
|
+
* @property {string[]} dataKeys - Array of keys from data objects to visualize as bars
|
|
511
|
+
* @property {string} xAxisKey - The key to use for X-axis (category) labels
|
|
512
|
+
* @property {ChartConfig} config - Chart configuration with color mappings for data keys
|
|
513
|
+
* @property {number} [height=400] - Chart height in pixels
|
|
514
|
+
* @property {MarginProps} [margin={top: 20, right: 30, bottom: 20, left: 30}] - Chart margins
|
|
515
|
+
* @property {number} [barSize] - Width of each bar in pixels
|
|
516
|
+
* @property {number} [barGap=4] - Gap between bars in pixels
|
|
517
|
+
* @property {number|string} [barCategoryGap='10%'] - Gap between bar groups (pixels or percentage)
|
|
518
|
+
* @property {number|number[]} [radius=4] - Border radius for bars (single value or [top-left, top-right, bottom-right, bottom-left])
|
|
519
|
+
* @property {string} [stackId] - ID for stacking multiple bars together
|
|
520
|
+
* @property {boolean} [showGrid=true] - Whether to show the cartesian grid
|
|
521
|
+
* @property {string|number} [gridStrokeDasharray='3 3'] - Grid line dash pattern
|
|
522
|
+
* @property {Function} [xAxisTickFormatter] - Function to format X-axis tick labels
|
|
523
|
+
* @property {Function} [yAxisTickFormatter] - Function to format Y-axis tick labels
|
|
524
|
+
* @property {boolean} [showLabels=false] - Whether to show value labels on bars
|
|
525
|
+
* @property {'top'|'bottom'|'left'|'right'|'inside'|'outside'|'insideLeft'|'insideRight'|'insideTop'|'insideBottom'|'center'} [labelPosition='top'] - Position of bar labels
|
|
526
|
+
* @property {Function} [labelFormatter] - Function to format label values
|
|
527
|
+
* @property {boolean} [showTooltip=true] - Whether to show tooltip on hover
|
|
528
|
+
* @property {boolean|object} [tooltipCursor=false] - Tooltip cursor appearance
|
|
529
|
+
* @property {boolean} [hideTooltipLabel=false] - Whether to hide the label in tooltip
|
|
530
|
+
* @property {'line'|'dot'|'dashed'} [tooltipIndicator='dashed'] - Tooltip indicator style
|
|
531
|
+
* @property {LegendProps} [legend] - Legend configuration props
|
|
532
|
+
* @property {boolean} [showLegend=false] - Whether to display the legend
|
|
533
|
+
* @property {string} [title] - Chart title text
|
|
534
|
+
* @property {TitleProps} [titleProps={variant: 'h3', className: ''}] - Title styling props
|
|
535
|
+
* @property {string} [subtitle] - Chart subtitle text
|
|
536
|
+
* @property {SubTitleProps} [subtitleProps={variant: 'muted', className: ''}] - Subtitle styling props
|
|
537
|
+
* @property {string} [className] - CSS class for the container
|
|
538
|
+
* @property {boolean} [activeBar=false] - Enable/disable active bar highlighting
|
|
539
|
+
* @property {number} [activeBarIndex] - Index of the initially active bar
|
|
540
|
+
* @property {Function} [onBarClick] - Callback function when a bar is clicked
|
|
541
|
+
* @property {number} [animationDuration=750] - Duration of animations in milliseconds
|
|
542
|
+
* @property {'ease'|'ease-in'|'ease-out'|'ease-in-out'|'linear'} [animationEasing='ease-in-out'] - Easing function for animations
|
|
543
|
+
* @property {boolean} [accessibilityLayer=true] - Enable accessibility features
|
|
544
|
+
*/
|
|
189
545
|
interface VerticalBarChartProps {
|
|
190
546
|
data: VerticalBarChartData[];
|
|
191
547
|
dataKeys: string[];
|
|
@@ -223,15 +579,114 @@ interface VerticalBarChartProps {
|
|
|
223
579
|
animationEasing?: 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear';
|
|
224
580
|
accessibilityLayer?: boolean;
|
|
225
581
|
}
|
|
582
|
+
/**
|
|
583
|
+
* VerticalBarChart Component
|
|
584
|
+
* Displays data as vertical bars with comprehensive customization for grid, labels, tooltips, legends, and animations.
|
|
585
|
+
* Supports active bar highlighting with state management for user interaction.
|
|
586
|
+
*
|
|
587
|
+
* @component
|
|
588
|
+
* @param {VerticalBarChartProps} props - The component props
|
|
589
|
+
* @param {VerticalBarChartData[]} props.data - Array of data objects to display
|
|
590
|
+
* @param {string[]} props.dataKeys - Keys from data objects to visualize as bars
|
|
591
|
+
* @param {string} props.xAxisKey - The key for X-axis category labels
|
|
592
|
+
* @param {ChartConfig} props.config - Chart color and display configuration
|
|
593
|
+
* @param {number} [props.height] - Chart height in pixels
|
|
594
|
+
* @param {MarginProps} [props.margin] - Chart margin spacing
|
|
595
|
+
* @param {number} [props.barSize] - Width of each bar in pixels
|
|
596
|
+
* @param {number} [props.barGap] - Spacing between adjacent bars
|
|
597
|
+
* @param {number|string} [props.barCategoryGap] - Spacing between bar groups
|
|
598
|
+
* @param {number|number[]} [props.radius] - Border radius for bar corners
|
|
599
|
+
* @param {string} [props.stackId] - ID for stacked bars
|
|
600
|
+
* @param {boolean} [props.showGrid] - Show/hide background grid
|
|
601
|
+
* @param {string|number} [props.gridStrokeDasharray] - Grid line dash pattern
|
|
602
|
+
* @param {Function} [props.xAxisTickFormatter] - Custom X-axis label formatter
|
|
603
|
+
* @param {Function} [props.yAxisTickFormatter] - Custom Y-axis label formatter
|
|
604
|
+
* @param {boolean} [props.showLabels] - Show/hide value labels on bars
|
|
605
|
+
* @param {string} [props.labelPosition] - Label position relative to bars
|
|
606
|
+
* @param {Function} [props.labelFormatter] - Custom label value formatter
|
|
607
|
+
* @param {boolean} [props.showTooltip] - Show/hide tooltip
|
|
608
|
+
* @param {boolean|object} [props.tooltipCursor] - Tooltip cursor style
|
|
609
|
+
* @param {boolean} [props.hideTooltipLabel] - Hide/show tooltip label
|
|
610
|
+
* @param {'line'|'dot'|'dashed'} [props.tooltipIndicator] - Tooltip indicator style
|
|
611
|
+
* @param {LegendProps} [props.legend] - Legend configuration
|
|
612
|
+
* @param {boolean} [props.showLegend] - Show/hide legend
|
|
613
|
+
* @param {string} [props.title] - Chart title
|
|
614
|
+
* @param {TitleProps} [props.titleProps] - Title styling
|
|
615
|
+
* @param {string} [props.subtitle] - Chart subtitle
|
|
616
|
+
* @param {SubTitleProps} [props.subtitleProps] - Subtitle styling
|
|
617
|
+
* @param {string} [props.className] - Container CSS class
|
|
618
|
+
* @param {boolean} [props.activeBar] - Enable active bar highlighting
|
|
619
|
+
* @param {number} [props.activeBarIndex] - Initial active bar index
|
|
620
|
+
* @param {Function} [props.onBarClick] - Click handler callback
|
|
621
|
+
* @param {number} [props.animationDuration] - Animation duration in ms
|
|
622
|
+
* @param {'ease'|'ease-in'|'ease-out'|'ease-in-out'|'linear'} [props.animationEasing] - Animation easing
|
|
623
|
+
* @param {boolean} [props.accessibilityLayer] - Enable accessibility features
|
|
624
|
+
* @returns {React.ReactElement} Rendered vertical bar chart
|
|
625
|
+
*
|
|
626
|
+
* @example
|
|
627
|
+
* const data = [
|
|
628
|
+
* { month: 'Jan', sales: 400, revenue: 2400 },
|
|
629
|
+
* { month: 'Feb', sales: 300, revenue: 1398 }
|
|
630
|
+
* ];
|
|
631
|
+
* const config = {
|
|
632
|
+
* sales: { label: 'Sales', color: '#3b82f6' },
|
|
633
|
+
* revenue: { label: 'Revenue', color: '#10b981' }
|
|
634
|
+
* };
|
|
635
|
+
*
|
|
636
|
+
* return (
|
|
637
|
+
* <VerticalBarChart
|
|
638
|
+
* data={data}
|
|
639
|
+
* dataKeys={['sales', 'revenue']}
|
|
640
|
+
* xAxisKey="month"
|
|
641
|
+
* config={config}
|
|
642
|
+
* title="Monthly Sales & Revenue"
|
|
643
|
+
* showLabels={true}
|
|
644
|
+
* activeBar={true}
|
|
645
|
+
* />
|
|
646
|
+
* );
|
|
647
|
+
*/
|
|
226
648
|
declare const VerticalBarChart: React__default.FC<VerticalBarChartProps>;
|
|
227
649
|
|
|
228
650
|
type BarChartVariant = 'vertical' | 'horizontal';
|
|
229
651
|
type BarChartData = HorizontalBarChartData | VerticalBarChartData;
|
|
652
|
+
/**
|
|
653
|
+
* Props for the BarChart component
|
|
654
|
+
* Combines props from both VerticalBarChart and HorizontalBarChart
|
|
655
|
+
* @typedef {Object} BarChartProps
|
|
656
|
+
* @property {BarChartData[]} data - Array of data objects to display in the chart
|
|
657
|
+
* @property {BarChartVariant} [variant='vertical'] - Orientation of the bars ('vertical' or 'horizontal')
|
|
658
|
+
*/
|
|
230
659
|
interface BarChartProps extends Omit<VerticalBarChartProps, 'data'>, Omit<HorizontalBarChartProps, 'data' | keyof VerticalBarChartProps> {
|
|
231
660
|
data: BarChartData[];
|
|
232
661
|
variant?: BarChartVariant;
|
|
233
662
|
}
|
|
234
663
|
|
|
664
|
+
/**
|
|
665
|
+
* Props for the LineChart component
|
|
666
|
+
* @typedef {Object} LineChartProps
|
|
667
|
+
* @property {string} [title='Line Chart'] - Chart title text
|
|
668
|
+
* @property {boolean} [showSubtitle=false] - Whether to display subtitle
|
|
669
|
+
* @property {string} [subTitle=''] - Chart subtitle text
|
|
670
|
+
* @property {TitleProps} [titleProps={variant: 'large'}] - Title styling props
|
|
671
|
+
* @property {SubTitleProps} [subTitleProps={variant: 'small'}] - Subtitle styling props
|
|
672
|
+
* @property {ChartConfig} config - Chart configuration with color mappings for data keys
|
|
673
|
+
* @property {number} [width=700] - Chart width in pixels
|
|
674
|
+
* @property {number} [height=500] - Chart height in pixels
|
|
675
|
+
* @property {string} dataKey - The key in data objects to use for X-axis values
|
|
676
|
+
* @property {any[]} data - Array of data objects to display
|
|
677
|
+
* @property {LineItem[]} lines - Array of line configurations with curve types and colors
|
|
678
|
+
* @property {boolean} [showToolTip=true] - Whether to show tooltip on hover
|
|
679
|
+
* @property {boolean} [showLegend=true] - Whether to display the legend
|
|
680
|
+
* @property {CartesianGridProps} [cartesianGrid={showCartesianGrid: false}] - Grid configuration
|
|
681
|
+
* @property {AxisLabelProps} [axisLabelProps] - X and Y axis label configuration
|
|
682
|
+
* @property {BaseAxisProps} [baseAxisProps] - Base axis customization props
|
|
683
|
+
* @property {LegendProps} [legendSx] - Legend styling props
|
|
684
|
+
* @property {string} [className] - CSS class for the container
|
|
685
|
+
* @property {MarginProps} [margin={top: 20, right: 30, bottom: 20, left: 30}] - Chart margins
|
|
686
|
+
* @property {boolean} [hideTooltipLabel=false] - Whether to hide the label in tooltip
|
|
687
|
+
* @property {'line'|'dot'|'dashed'} [tooltipIndicator='line'] - Tooltip indicator style
|
|
688
|
+
* @property {boolean} [accessibilityLayer=true] - Enable accessibility features
|
|
689
|
+
*/
|
|
235
690
|
type LineChartProps = {
|
|
236
691
|
title?: string;
|
|
237
692
|
showSubtitle?: boolean;
|
|
@@ -256,14 +711,97 @@ type LineChartProps = {
|
|
|
256
711
|
tooltipIndicator?: 'line' | 'dot' | 'dashed';
|
|
257
712
|
accessibilityLayer?: boolean;
|
|
258
713
|
};
|
|
714
|
+
/**
|
|
715
|
+
* Configuration for a single line in the LineChart
|
|
716
|
+
* @typedef {Object} LineItem
|
|
717
|
+
* @property {CurveType} type - Curve type for the line ('linear', 'monotone', 'natural', 'step', 'stepBefore', 'stepAfter', 'basisOpen', 'basis', 'basisClosed')
|
|
718
|
+
* @property {string} dataKey - The key in data objects to use for Y-axis values
|
|
719
|
+
* @property {string} stroke - Line color (CSS color value)
|
|
720
|
+
* @property {any} [activeDot] - Configuration for the active dot on hover
|
|
721
|
+
*/
|
|
259
722
|
type LineItem = {
|
|
260
723
|
type: CurveType;
|
|
261
724
|
dataKey: string;
|
|
262
725
|
stroke: string;
|
|
263
726
|
activeDot?: any;
|
|
264
727
|
};
|
|
728
|
+
/**
|
|
729
|
+
* LineChart Component
|
|
730
|
+
* Displays one or more lines with customizable curve types, colors, and interactive features.
|
|
731
|
+
* Supports grid, tooltips, legends, and labeled axes.
|
|
732
|
+
*
|
|
733
|
+
* @component
|
|
734
|
+
* @param {LineChartProps} props - The component props
|
|
735
|
+
* @param {string} [props.title] - Chart title
|
|
736
|
+
* @param {boolean} [props.showSubtitle] - Show/hide subtitle
|
|
737
|
+
* @param {string} [props.subTitle] - Chart subtitle
|
|
738
|
+
* @param {TitleProps} [props.titleProps] - Title styling
|
|
739
|
+
* @param {SubTitleProps} [props.subTitleProps] - Subtitle styling
|
|
740
|
+
* @param {ChartConfig} props.config - Chart color configuration
|
|
741
|
+
* @param {number} [props.width] - Chart width in pixels
|
|
742
|
+
* @param {number} [props.height] - Chart height in pixels
|
|
743
|
+
* @param {string} props.dataKey - X-axis data key
|
|
744
|
+
* @param {any[]} props.data - Chart data array
|
|
745
|
+
* @param {LineItem[]} props.lines - Line configurations
|
|
746
|
+
* @param {boolean} [props.showToolTip] - Show/hide tooltip
|
|
747
|
+
* @param {boolean} [props.showLegend] - Show/hide legend
|
|
748
|
+
* @param {CartesianGridProps} [props.cartesianGrid] - Grid settings
|
|
749
|
+
* @param {AxisLabelProps} [props.axisLabelProps] - Axis labels
|
|
750
|
+
* @param {BaseAxisProps} [props.baseAxisProps] - Axis customization
|
|
751
|
+
* @param {LegendProps} [props.legendSx] - Legend styling
|
|
752
|
+
* @param {string} [props.className] - Container CSS class
|
|
753
|
+
* @param {MarginProps} [props.margin] - Chart margins
|
|
754
|
+
* @param {boolean} [props.hideTooltipLabel] - Hide tooltip label
|
|
755
|
+
* @param {'line'|'dot'|'dashed'} [props.tooltipIndicator] - Tooltip indicator style
|
|
756
|
+
* @param {boolean} [props.accessibilityLayer] - Enable accessibility features
|
|
757
|
+
* @returns {React.ReactElement} Rendered line chart
|
|
758
|
+
*
|
|
759
|
+
* @example
|
|
760
|
+
* const data = [
|
|
761
|
+
* { month: 'Jan', sales: 400, revenue: 2400 },
|
|
762
|
+
* { month: 'Feb', sales: 300, revenue: 1398 }
|
|
763
|
+
* ];
|
|
764
|
+
* const config = {
|
|
765
|
+
* sales: { label: 'Sales', color: '#3b82f6' },
|
|
766
|
+
* revenue: { label: 'Revenue', color: '#10b981' }
|
|
767
|
+
* };
|
|
768
|
+
* const lines = [
|
|
769
|
+
* { dataKey: 'sales', stroke: '#3b82f6', type: 'monotone' },
|
|
770
|
+
* { dataKey: 'revenue', stroke: '#10b981', type: 'monotone' }
|
|
771
|
+
* ];
|
|
772
|
+
*
|
|
773
|
+
* return (
|
|
774
|
+
* <LineChart
|
|
775
|
+
* data={data}
|
|
776
|
+
* dataKey="month"
|
|
777
|
+
* lines={lines}
|
|
778
|
+
* config={config}
|
|
779
|
+
* title="Sales & Revenue Trend"
|
|
780
|
+
* />
|
|
781
|
+
* );
|
|
782
|
+
*/
|
|
265
783
|
declare const LineChart: ({ title, showSubtitle, subTitle, subTitleProps, titleProps, config, width, height, margin, dataKey, data, lines, showToolTip, showLegend, cartesianGrid, axisLabelProps, baseAxisProps, legendSx, className, hideTooltipLabel, tooltipIndicator, accessibilityLayer, }: LineChartProps) => react_jsx_runtime.JSX.Element;
|
|
266
784
|
|
|
785
|
+
/**
|
|
786
|
+
* Props for the PieChart component
|
|
787
|
+
* @typedef {Object} PieChartProps
|
|
788
|
+
* @property {string} [title='Pie Chart'] - Chart title text
|
|
789
|
+
* @property {boolean} [showSubtitle=false] - Whether to display subtitle
|
|
790
|
+
* @property {string} [subTitle=''] - Chart subtitle text
|
|
791
|
+
* @property {TitleProps} [titleProps={variant: 'large'}] - Title styling props
|
|
792
|
+
* @property {SubTitleProps} [subTitleProps={variant: 'small'}] - Subtitle styling props
|
|
793
|
+
* @property {MarginProps} [margin] - Chart margins
|
|
794
|
+
* @property {number} [width=500] - Chart width in pixels
|
|
795
|
+
* @property {number} [height=500] - Chart height in pixels
|
|
796
|
+
* @property {PieProps} pie1 - Configuration for the primary pie (required)
|
|
797
|
+
* @property {PieProps} [pie2] - Configuration for the secondary pie (optional, for donut charts)
|
|
798
|
+
* @property {string} [className] - CSS class for the container
|
|
799
|
+
* @property {boolean} [showLegend=true] - Whether to display the legend
|
|
800
|
+
* @property {LegendProps} [legendSx] - Legend styling props
|
|
801
|
+
* @property {boolean} [showToolTip=true] - Whether to show tooltip on hover
|
|
802
|
+
* @property {ChartConfig} config - Chart configuration with color mappings
|
|
803
|
+
* @property {boolean} [hideTooltipLabel=false] - Whether to hide the label in tooltip
|
|
804
|
+
*/
|
|
267
805
|
type PieChartProps = {
|
|
268
806
|
title?: string;
|
|
269
807
|
showSubtitle?: boolean;
|
|
@@ -282,6 +820,22 @@ type PieChartProps = {
|
|
|
282
820
|
config: ChartConfig;
|
|
283
821
|
hideTooltipLabel?: boolean;
|
|
284
822
|
};
|
|
823
|
+
/**
|
|
824
|
+
* Configuration for a single pie in the PieChart
|
|
825
|
+
* @typedef {Object} PieProps
|
|
826
|
+
* @property {any[]} data - Array of data objects for the pie slices
|
|
827
|
+
* @property {string} dataKey - The key in data objects to use for slice values
|
|
828
|
+
* @property {string} [nameKey] - The key in data objects to use for slice labels
|
|
829
|
+
* @property {number} [innerRadius] - Inner radius for donut charts (creates hollow center)
|
|
830
|
+
* @property {number} [outerRadius] - Outer radius of the pie
|
|
831
|
+
* @property {string} [fill] - Default fill color for pie slices
|
|
832
|
+
* @property {boolean} [label] - Whether to show labels on pie slices
|
|
833
|
+
* @property {string} [cx='50%'] - X-coordinate of pie center (percentage or pixels)
|
|
834
|
+
* @property {string} [cy='50%'] - Y-coordinate of pie center (percentage or pixels)
|
|
835
|
+
* @property {number} [startAngle] - Starting angle of the pie in degrees
|
|
836
|
+
* @property {number} [endAngle] - Ending angle of the pie in degrees
|
|
837
|
+
* @property {string[]} [colors] - Array of colors for pie slices (cycles if fewer than slices)
|
|
838
|
+
*/
|
|
285
839
|
type PieProps = {
|
|
286
840
|
data: any[];
|
|
287
841
|
dataKey: string;
|
|
@@ -296,8 +850,81 @@ type PieProps = {
|
|
|
296
850
|
endAngle?: number;
|
|
297
851
|
colors?: string[];
|
|
298
852
|
};
|
|
853
|
+
/**
|
|
854
|
+
* PieChart Component
|
|
855
|
+
* Displays data as one or two pie/donut charts with customizable colors, labels, and legend.
|
|
856
|
+
* Supports single pie, donut, or dual-pie layouts.
|
|
857
|
+
*
|
|
858
|
+
* @component
|
|
859
|
+
* @param {PieChartProps} props - The component props
|
|
860
|
+
* @param {string} [props.title] - Chart title
|
|
861
|
+
* @param {boolean} [props.showSubtitle] - Show/hide subtitle
|
|
862
|
+
* @param {string} [props.subTitle] - Chart subtitle
|
|
863
|
+
* @param {TitleProps} [props.titleProps] - Title styling
|
|
864
|
+
* @param {SubTitleProps} [props.subTitleProps] - Subtitle styling
|
|
865
|
+
* @param {MarginProps} [props.margin] - Chart margins
|
|
866
|
+
* @param {number} [props.width] - Chart width in pixels
|
|
867
|
+
* @param {number} [props.height] - Chart height in pixels
|
|
868
|
+
* @param {PieProps} props.pie1 - Primary pie configuration
|
|
869
|
+
* @param {PieProps} [props.pie2] - Secondary pie configuration (creates dual-pie)
|
|
870
|
+
* @param {string} [props.className] - Container CSS class
|
|
871
|
+
* @param {boolean} [props.showLegend] - Show/hide legend
|
|
872
|
+
* @param {LegendProps} [props.legendSx] - Legend styling
|
|
873
|
+
* @param {boolean} [props.showToolTip] - Show/hide tooltip
|
|
874
|
+
* @param {ChartConfig} props.config - Chart color configuration
|
|
875
|
+
* @param {boolean} [props.hideTooltipLabel] - Hide tooltip label
|
|
876
|
+
* @returns {React.ReactElement} Rendered pie chart
|
|
877
|
+
*
|
|
878
|
+
* @example
|
|
879
|
+
* const data = [
|
|
880
|
+
* { name: 'Slice A', value: 400 },
|
|
881
|
+
* { name: 'Slice B', value: 300 },
|
|
882
|
+
* { name: 'Slice C', value: 300 }
|
|
883
|
+
* ];
|
|
884
|
+
* const config = {
|
|
885
|
+
* name: { label: 'Category', color: '#3b82f6' },
|
|
886
|
+
* value: { label: 'Value', color: '#10b981' }
|
|
887
|
+
* };
|
|
888
|
+
*
|
|
889
|
+
* return (
|
|
890
|
+
* <PieChart
|
|
891
|
+
* pie1={{
|
|
892
|
+
* data: data,
|
|
893
|
+
* dataKey: 'value',
|
|
894
|
+
* nameKey: 'name',
|
|
895
|
+
* colors: ['#3b82f6', '#10b981', '#f59e0b']
|
|
896
|
+
* }}
|
|
897
|
+
* config={config}
|
|
898
|
+
* title="Sales Distribution"
|
|
899
|
+
* showLegend={true}
|
|
900
|
+
* />
|
|
901
|
+
* );
|
|
902
|
+
*/
|
|
299
903
|
declare const PieChart: ({ title, showSubtitle, subTitle, subTitleProps, titleProps, margin, width, height, showToolTip, showLegend, legendSx, pie1, pie2, className, config, hideTooltipLabel, }: PieChartProps) => react_jsx_runtime.JSX.Element;
|
|
300
904
|
|
|
905
|
+
/**
|
|
906
|
+
* Props for the TreeMap component
|
|
907
|
+
* @typedef {Object} TreeMapProps
|
|
908
|
+
* @property {any} data - Hierarchical data structure for the treemap (should have children property for nested data)
|
|
909
|
+
* @property {string|number} dataKey - The key to use for treemap cell sizing
|
|
910
|
+
* @property {ChartConfig} config - Chart configuration with color mappings
|
|
911
|
+
* @property {string} [title='Tree Map'] - Chart title text
|
|
912
|
+
* @property {boolean} [showSubtitle=false] - Whether to display subtitle
|
|
913
|
+
* @property {string} [subTitle=''] - Chart subtitle text
|
|
914
|
+
* @property {TitleProps} [titleProps={variant: 'large'}] - Title styling props
|
|
915
|
+
* @property {SubTitleProps} [subTitleProps={variant: 'small'}] - Subtitle styling props
|
|
916
|
+
* @property {number} [width=400] - Chart width in pixels
|
|
917
|
+
* @property {number} [height=200] - Chart height in pixels
|
|
918
|
+
* @property {MarginProps} [margin] - Chart margins
|
|
919
|
+
* @property {number} [aspectRatio] - Aspect ratio of treemap cells
|
|
920
|
+
* @property {string} [fill='#F8C12D'] - Default fill color for cells
|
|
921
|
+
* @property {string} [stroke='#fff'] - Border color for cells
|
|
922
|
+
* @property {string[]} [colors] - Array of colors for cells (overrides fill if provided)
|
|
923
|
+
* @property {string} [className] - CSS class for the container
|
|
924
|
+
* @property {boolean} [showToolTip=true] - Whether to show tooltip on hover
|
|
925
|
+
* @property {boolean} [isAnimationActive=false] - Whether to animate cells
|
|
926
|
+
* @property {AnimationTiming} [animationEasing='linear'] - Animation easing function
|
|
927
|
+
*/
|
|
301
928
|
interface TreeMapProps {
|
|
302
929
|
data: any;
|
|
303
930
|
dataKey: string | number;
|
|
@@ -320,6 +947,16 @@ interface TreeMapProps {
|
|
|
320
947
|
animationEasing?: AnimationTiming;
|
|
321
948
|
}
|
|
322
949
|
|
|
950
|
+
/**
|
|
951
|
+
* Props for individual accordion items
|
|
952
|
+
* @typedef {Object} AccordionItemProps
|
|
953
|
+
* @property {ReactNode} title - The title/header content of the accordion item
|
|
954
|
+
* @property {ReactNode} content - The main content displayed when item is expanded
|
|
955
|
+
* @property {ReactNode} [actions] - Optional action buttons or elements displayed in the header
|
|
956
|
+
* @property {string[]} [errorKeys] - Array of error field keys associated with this item
|
|
957
|
+
* @property {string} [className] - Optional CSS class for the accordion item container
|
|
958
|
+
* @property {string} [contentClassName] - Optional CSS class for the content section
|
|
959
|
+
*/
|
|
323
960
|
type AccordionItemProps = {
|
|
324
961
|
title: ReactNode;
|
|
325
962
|
content: ReactNode;
|
|
@@ -328,21 +965,93 @@ type AccordionItemProps = {
|
|
|
328
965
|
className?: string;
|
|
329
966
|
contentClassName?: string;
|
|
330
967
|
};
|
|
968
|
+
/**
|
|
969
|
+
* Props for the Accordion component
|
|
970
|
+
* @typedef {Object} AccordionProps
|
|
971
|
+
* @property {AccordionItemProps[]} data - Array of accordion items to display
|
|
972
|
+
* @property {string} [className] - Optional CSS class for the accordion container
|
|
973
|
+
* @property {number} [defaultExpandedIndex] - Index of item to expand by default
|
|
974
|
+
* @property {string} [errorField] - Error field name to auto-expand item containing this error
|
|
975
|
+
*/
|
|
331
976
|
type AccordionProps = {
|
|
332
977
|
data: AccordionItemProps[];
|
|
333
978
|
className?: string;
|
|
334
979
|
defaultExpandedIndex?: number;
|
|
335
980
|
errorField?: string;
|
|
336
981
|
};
|
|
982
|
+
/**
|
|
983
|
+
* Accordion component for displaying collapsible sections
|
|
984
|
+
* Auto-expands section containing error field, supports custom actions per item
|
|
985
|
+
*
|
|
986
|
+
* @component
|
|
987
|
+
* @param {AccordionProps} props - Accordion configuration
|
|
988
|
+
* @param {AccordionItemProps[]} props.data - Array of accordion items with title, content, and optional actions
|
|
989
|
+
* @param {string} [props.className] - Additional CSS class for the accordion wrapper
|
|
990
|
+
* @param {number} [props.defaultExpandedIndex] - Index of the item to expand on initial render (0-based)
|
|
991
|
+
* @param {string} [props.errorField] - Field name containing error; matching item will auto-expand
|
|
992
|
+
* @returns {JSX.Element} Accordion component with collapsible sections
|
|
993
|
+
*
|
|
994
|
+
* @example
|
|
995
|
+
* // Basic accordion
|
|
996
|
+
* <Accordion
|
|
997
|
+
* data={[
|
|
998
|
+
* { title: "Section 1", content: "Content 1" },
|
|
999
|
+
* { title: "Section 2", content: "Content 2" }
|
|
1000
|
+
* ]}
|
|
1001
|
+
* defaultExpandedIndex={0}
|
|
1002
|
+
* />
|
|
1003
|
+
*
|
|
1004
|
+
* @example
|
|
1005
|
+
* // With actions and error handling
|
|
1006
|
+
* <Accordion
|
|
1007
|
+
* data={[
|
|
1008
|
+
* {
|
|
1009
|
+
* title: "Personal Info",
|
|
1010
|
+
* content: <PersonForm />,
|
|
1011
|
+
* actions: <Button>Edit</Button>,
|
|
1012
|
+
* errorKeys: ["firstName", "lastName"]
|
|
1013
|
+
* }
|
|
1014
|
+
* ]}
|
|
1015
|
+
* errorField="firstName"
|
|
1016
|
+
* />
|
|
1017
|
+
*/
|
|
337
1018
|
declare const Accordion: ({ data, className, defaultExpandedIndex, errorField, }: AccordionProps) => react_jsx_runtime.JSX.Element;
|
|
338
1019
|
|
|
1020
|
+
/**
|
|
1021
|
+
* Type for activity action
|
|
1022
|
+
* @typedef {'create' | 'update' | 'delete'} ActivityAction
|
|
1023
|
+
*/
|
|
339
1024
|
type ActivityAction = 'create' | 'update' | 'delete';
|
|
1025
|
+
/**
|
|
1026
|
+
* Interface for a single activity entry
|
|
1027
|
+
* @typedef {Object} Activity
|
|
1028
|
+
* @property {string} [userName] - Name of user who performed the action
|
|
1029
|
+
* @property {ActivityAction} [action] - Type of action performed
|
|
1030
|
+
* @property {string} message - Description or details of the activity
|
|
1031
|
+
* @property {string} timestamp - ISO timestamp of when activity occurred
|
|
1032
|
+
*/
|
|
340
1033
|
interface Activity {
|
|
341
1034
|
userName?: string;
|
|
342
1035
|
action?: ActivityAction;
|
|
343
1036
|
message: string;
|
|
344
1037
|
timestamp: string;
|
|
345
1038
|
}
|
|
1039
|
+
/**
|
|
1040
|
+
* Props for ActivityLogView component
|
|
1041
|
+
* @typedef {Object} ActivityLogProps
|
|
1042
|
+
* @property {Activity[]} activitiesData - Array of activities to display
|
|
1043
|
+
* @property {boolean} isFetchingNextPage - Whether next page is being fetched
|
|
1044
|
+
* @property {() => void} fetchNextPage - Callback to fetch next page
|
|
1045
|
+
* @property {boolean | undefined} hasNextPage - Whether more activities exist
|
|
1046
|
+
* @property {Date | null} fromDate - Filter start date
|
|
1047
|
+
* @property {Date | null} toDate - Filter end date
|
|
1048
|
+
* @property {(date: Date | null) => void} setFromDate - Update filter start date
|
|
1049
|
+
* @property {(date: Date | null) => void} setToDate - Update filter end date
|
|
1050
|
+
* @property {boolean} isLoading - Whether data is loading
|
|
1051
|
+
* @property {boolean} [hideLogFilter] - Hide the date filter controls
|
|
1052
|
+
* @property {string} [className] - CSS class for container
|
|
1053
|
+
* @property {string} [title] - Title to display above activities
|
|
1054
|
+
*/
|
|
346
1055
|
interface ActivityLogProps {
|
|
347
1056
|
activitiesData: Activity[];
|
|
348
1057
|
isFetchingNextPage: boolean;
|
|
@@ -357,8 +1066,68 @@ interface ActivityLogProps {
|
|
|
357
1066
|
className?: string;
|
|
358
1067
|
title?: string;
|
|
359
1068
|
}
|
|
1069
|
+
/**
|
|
1070
|
+
* ActivityLogView component for displaying chronological activity feed
|
|
1071
|
+
* Groups activities by date, supports filtering and infinite scroll
|
|
1072
|
+
*
|
|
1073
|
+
* @component
|
|
1074
|
+
* @param {ActivityLogProps} props - Activity log configuration
|
|
1075
|
+
* @param {Activity[]} props.activitiesData - Array of activity entries to display
|
|
1076
|
+
* @param {boolean} props.isFetchingNextPage - Whether next page is loading
|
|
1077
|
+
* @param {() => void} props.fetchNextPage - Callback to load more activities
|
|
1078
|
+
* @param {boolean | undefined} props.hasNextPage - Whether more activities available
|
|
1079
|
+
* @param {Date | null} props.fromDate - Filter start date (null = no limit)
|
|
1080
|
+
* @param {Date | null} props.toDate - Filter end date (null = no limit)
|
|
1081
|
+
* @param {(date: Date | null) => void} props.setFromDate - Update filter start date
|
|
1082
|
+
* @param {(date: Date | null) => void} props.setToDate - Update filter end date
|
|
1083
|
+
* @param {boolean} props.isLoading - Initial load state
|
|
1084
|
+
* @param {boolean} [props.hideLogFilter=false] - Hide filter controls
|
|
1085
|
+
* @param {string} [props.className] - CSS class for container
|
|
1086
|
+
* @param {string} [props.title] - Title to display above log
|
|
1087
|
+
* @returns {JSX.Element} Activity log with timeline, filtering, and infinite scroll
|
|
1088
|
+
*
|
|
1089
|
+
* @example
|
|
1090
|
+
* // Activity log with filtering
|
|
1091
|
+
* <ActivityLogView
|
|
1092
|
+
* activitiesData={activities}
|
|
1093
|
+
* isFetchingNextPage={loading}
|
|
1094
|
+
* fetchNextPage={() => loadMore()}
|
|
1095
|
+
* hasNextPage={true}
|
|
1096
|
+
* fromDate={startDate}
|
|
1097
|
+
* toDate={endDate}
|
|
1098
|
+
* setFromDate={setStartDate}
|
|
1099
|
+
* setToDate={setEndDate}
|
|
1100
|
+
* isLoading={false}
|
|
1101
|
+
* title="Activity Feed"
|
|
1102
|
+
* />
|
|
1103
|
+
*
|
|
1104
|
+
* @example
|
|
1105
|
+
* // Activity log without filter
|
|
1106
|
+
* <ActivityLogView
|
|
1107
|
+
* activitiesData={activities}
|
|
1108
|
+
* isFetchingNextPage={loading}
|
|
1109
|
+
* fetchNextPage={() => loadMore()}
|
|
1110
|
+
* hasNextPage={true}
|
|
1111
|
+
* fromDate={null}
|
|
1112
|
+
* toDate={null}
|
|
1113
|
+
* setFromDate={() => {}}
|
|
1114
|
+
* setToDate={() => {}}
|
|
1115
|
+
* isLoading={false}
|
|
1116
|
+
* hideLogFilter
|
|
1117
|
+
* />
|
|
1118
|
+
*/
|
|
360
1119
|
declare const ActivityLogView: ({ activitiesData, isFetchingNextPage, fetchNextPage, hasNextPage, fromDate, toDate, setFromDate, setToDate, isLoading, hideLogFilter, className, title, }: ActivityLogProps) => react_jsx_runtime.JSX.Element;
|
|
361
1120
|
|
|
1121
|
+
/**
|
|
1122
|
+
* Props for CircularAvatar component
|
|
1123
|
+
* @typedef {Object} CircularAvatarProps
|
|
1124
|
+
* @property {string} text - Text to display as fallback initials (e.g., "John Doe" -> "JD")
|
|
1125
|
+
* @property {string} [src] - Optional image source URL for the avatar
|
|
1126
|
+
* @property {string} [alt] - Optional alt text for the avatar image
|
|
1127
|
+
* @property {string} [className] - Optional CSS class for the avatar container
|
|
1128
|
+
* @property {string} [fallbackClassName] - Optional CSS class for the fallback text
|
|
1129
|
+
* @property {(e: React.MouseEvent<HTMLDivElement>) => void} [onClick] - Optional click handler
|
|
1130
|
+
*/
|
|
362
1131
|
type CircularAvatarProps = {
|
|
363
1132
|
text: string;
|
|
364
1133
|
src?: string;
|
|
@@ -367,6 +1136,36 @@ type CircularAvatarProps = {
|
|
|
367
1136
|
fallbackClassName?: string;
|
|
368
1137
|
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
369
1138
|
};
|
|
1139
|
+
/**
|
|
1140
|
+
* Circular avatar component with image and fallback initials
|
|
1141
|
+
* Extracts first letter from each word to create initials fallback
|
|
1142
|
+
*
|
|
1143
|
+
* @component
|
|
1144
|
+
* @param {CircularAvatarProps} props - Avatar configuration
|
|
1145
|
+
* @param {string} props.text - Text to extract initials from for fallback display
|
|
1146
|
+
* @param {string} [props.src] - Image URL to display; falls back to initials if not provided
|
|
1147
|
+
* @param {string} [props.alt] - Alternative text for image accessibility
|
|
1148
|
+
* @param {string} [props.className] - Additional CSS classes for avatar wrapper
|
|
1149
|
+
* @param {string} [props.fallbackClassName] - Additional CSS classes for fallback text display
|
|
1150
|
+
* @param {(e: React.MouseEvent<HTMLDivElement>) => void} [props.onClick] - Handler called when avatar is clicked
|
|
1151
|
+
* @returns {JSX.Element} Circular avatar with image or initials
|
|
1152
|
+
*
|
|
1153
|
+
* @example
|
|
1154
|
+
* // Avatar with image
|
|
1155
|
+
* <CircularAvatar
|
|
1156
|
+
* text="John Doe"
|
|
1157
|
+
* src="/path/to/avatar.jpg"
|
|
1158
|
+
* alt="John's avatar"
|
|
1159
|
+
* />
|
|
1160
|
+
*
|
|
1161
|
+
* @example
|
|
1162
|
+
* // Avatar with fallback initials and click handler
|
|
1163
|
+
* <CircularAvatar
|
|
1164
|
+
* text="Jane Smith"
|
|
1165
|
+
* onClick={(e) => openUserMenu(e)}
|
|
1166
|
+
* className="border-2 border-blue-500"
|
|
1167
|
+
* />
|
|
1168
|
+
*/
|
|
370
1169
|
declare const CircularAvatar: ({ text, src, alt, className, fallbackClassName, onClick, }: CircularAvatarProps) => react_jsx_runtime.JSX.Element;
|
|
371
1170
|
|
|
372
1171
|
declare function Card$1({ className, ...props }: React$1.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
@@ -443,11 +1242,55 @@ declare function Badge({ className, variant, asChild, ...props }: React$1.Compon
|
|
|
443
1242
|
asChild?: boolean;
|
|
444
1243
|
}): react_jsx_runtime.JSX.Element;
|
|
445
1244
|
|
|
1245
|
+
/**
|
|
1246
|
+
* Props for Chip component
|
|
1247
|
+
* @typedef {Object} ChipProps
|
|
1248
|
+
* @property {string} label - The text content displayed in the chip
|
|
1249
|
+
* @extends {React.ComponentPropsWithoutRef<typeof Badge>}
|
|
1250
|
+
*/
|
|
446
1251
|
interface ChipProps extends React$1.ComponentPropsWithoutRef<typeof Badge> {
|
|
447
1252
|
label: string;
|
|
448
1253
|
}
|
|
1254
|
+
/**
|
|
1255
|
+
* Chip component for displaying compact, labeled badges
|
|
1256
|
+
* Wrapper around shadcn Badge component with simpler API
|
|
1257
|
+
*
|
|
1258
|
+
* @component
|
|
1259
|
+
* @param {ChipProps} props - Chip configuration
|
|
1260
|
+
* @param {string} props.label - Text to display in the chip
|
|
1261
|
+
* @param {...React.ComponentPropsWithoutRef<typeof Badge>} [props] - Additional Badge props (variant, className, etc.)
|
|
1262
|
+
* @returns {JSX.Element} Chip badge element
|
|
1263
|
+
*
|
|
1264
|
+
* @example
|
|
1265
|
+
* // Basic chip
|
|
1266
|
+
* <Chip label="JavaScript" />
|
|
1267
|
+
*
|
|
1268
|
+
* @example
|
|
1269
|
+
* // Chip with custom variant
|
|
1270
|
+
* <Chip
|
|
1271
|
+
* label="Active"
|
|
1272
|
+
* variant="default"
|
|
1273
|
+
* className="bg-green-500"
|
|
1274
|
+
* />
|
|
1275
|
+
*/
|
|
449
1276
|
declare const Chip: ({ label, ...rest }: ChipProps) => react_jsx_runtime.JSX.Element;
|
|
450
1277
|
|
|
1278
|
+
/**
|
|
1279
|
+
* Props for individual chip item
|
|
1280
|
+
* @typedef {Object} ChipItem
|
|
1281
|
+
* @property {string | ReactNode} label - Display label for the chip
|
|
1282
|
+
* @property {string | number} value - Unique value identifier for the chip
|
|
1283
|
+
*/
|
|
1284
|
+
/**
|
|
1285
|
+
* Props for Chips component (multi/single selection)
|
|
1286
|
+
* @typedef {Object} ChipsProps
|
|
1287
|
+
* @property {{ label: string | ReactNode; value: string | number }[]} list - Array of chip items
|
|
1288
|
+
* @property {string[] | string | number} selected - Currently selected value(s)
|
|
1289
|
+
* @property {(selected: string[] | string | number) => void} onSelected - Callback when selection changes
|
|
1290
|
+
* @property {'row' | 'column'} [direction='row'] - Layout direction for chips
|
|
1291
|
+
* @property {boolean} [singleSelection=true] - Enable single or multiple selection
|
|
1292
|
+
* @property {boolean} [toggle=false] - Allow toggling selection off
|
|
1293
|
+
*/
|
|
451
1294
|
interface ChipsProps {
|
|
452
1295
|
list: {
|
|
453
1296
|
label: string | ReactNode;
|
|
@@ -459,8 +1302,57 @@ interface ChipsProps {
|
|
|
459
1302
|
singleSelection?: boolean;
|
|
460
1303
|
toggle?: boolean;
|
|
461
1304
|
}
|
|
1305
|
+
/**
|
|
1306
|
+
* Chips component for single or multi-select chip groups
|
|
1307
|
+
* Renders interactive chips with toggle/selection capabilities
|
|
1308
|
+
*
|
|
1309
|
+
* @component
|
|
1310
|
+
* @param {ChipsProps} props - Chips configuration
|
|
1311
|
+
* @param {{ label: string | ReactNode; value: string | number }[]} props.list - Array of chip options
|
|
1312
|
+
* @param {string[] | string | number} props.selected - Current selected value(s)
|
|
1313
|
+
* @param {(selected: string[] | string | number) => void} props.onSelected - Callback fired when selection changes
|
|
1314
|
+
* @param {'row' | 'column'} [props.direction='row'] - Flex direction for chip layout
|
|
1315
|
+
* @param {boolean} [props.singleSelection=true] - If true, only one chip can be selected at a time
|
|
1316
|
+
* @param {boolean} [props.toggle=false] - If true, clicking selected chip deselects it (only in singleSelection mode)
|
|
1317
|
+
* @returns {JSX.Element} Interactive chip group
|
|
1318
|
+
*
|
|
1319
|
+
* @example
|
|
1320
|
+
* // Single selection chips
|
|
1321
|
+
* <Chips
|
|
1322
|
+
* list={[
|
|
1323
|
+
* { label: "Option 1", value: "opt1" },
|
|
1324
|
+
* { label: "Option 2", value: "opt2" }
|
|
1325
|
+
* ]}
|
|
1326
|
+
* selected="opt1"
|
|
1327
|
+
* onSelected={(value) => setSelected(value)}
|
|
1328
|
+
* />
|
|
1329
|
+
*
|
|
1330
|
+
* @example
|
|
1331
|
+
* // Multi-selection chips with column layout
|
|
1332
|
+
* <Chips
|
|
1333
|
+
* list={[
|
|
1334
|
+
* { label: "JavaScript", value: "js" },
|
|
1335
|
+
* { label: "TypeScript", value: "ts" },
|
|
1336
|
+
* { label: "Python", value: "py" }
|
|
1337
|
+
* ]}
|
|
1338
|
+
* selected={["js", "ts"]}
|
|
1339
|
+
* onSelected={(values) => setTags(values)}
|
|
1340
|
+
* singleSelection={false}
|
|
1341
|
+
* direction="column"
|
|
1342
|
+
* />
|
|
1343
|
+
*/
|
|
462
1344
|
declare const Chips: ({ list, selected: _selected, onSelected, direction, singleSelection, toggle, }: ChipsProps) => react_jsx_runtime.JSX.Element;
|
|
463
1345
|
|
|
1346
|
+
/**
|
|
1347
|
+
* Props for TablePagination component
|
|
1348
|
+
* @typedef {Object} PaginationProps
|
|
1349
|
+
* @property {number} limit - Number of rows per page
|
|
1350
|
+
* @property {number} offset - Current page offset (0-indexed)
|
|
1351
|
+
* @property {number} totalCount - Total number of records
|
|
1352
|
+
* @property {(offset: number) => void} onPageChange - Callback when page changes
|
|
1353
|
+
* @property {(limit: number) => void} onLimitChange - Callback when page limit changes
|
|
1354
|
+
* @property {number} rowCount - Number of rows in current page
|
|
1355
|
+
*/
|
|
464
1356
|
type PaginationProps = {
|
|
465
1357
|
limit: number;
|
|
466
1358
|
offset: number;
|
|
@@ -469,8 +1361,66 @@ type PaginationProps = {
|
|
|
469
1361
|
onLimitChange: (limit: number) => void;
|
|
470
1362
|
rowCount: number;
|
|
471
1363
|
};
|
|
1364
|
+
/**
|
|
1365
|
+
* TablePagination component for controlling data table pagination
|
|
1366
|
+
* Displays page numbers, navigation arrows, row count, and page limit selector
|
|
1367
|
+
*
|
|
1368
|
+
* @component
|
|
1369
|
+
* @param {PaginationProps} props - Pagination configuration
|
|
1370
|
+
* @param {number} props.limit - Rows per page
|
|
1371
|
+
* @param {number} props.offset - Current page offset
|
|
1372
|
+
* @param {number} props.totalCount - Total records in dataset
|
|
1373
|
+
* @param {(offset: number) => void} props.onPageChange - Handler for page navigation
|
|
1374
|
+
* @param {(limit: number) => void} props.onLimitChange - Handler for limit changes
|
|
1375
|
+
* @param {number} props.rowCount - Current page row count
|
|
1376
|
+
* @returns {JSX.Element} Pagination controls with page selector and limit dropdown
|
|
1377
|
+
*
|
|
1378
|
+
* @example
|
|
1379
|
+
* // Pagination with 20 rows per page
|
|
1380
|
+
* <TablePagination
|
|
1381
|
+
* limit={20}
|
|
1382
|
+
* offset={0}
|
|
1383
|
+
* totalCount={150}
|
|
1384
|
+
* rowCount={20}
|
|
1385
|
+
* onPageChange={(offset) => setOffset(offset)}
|
|
1386
|
+
* onLimitChange={(limit) => setLimit(limit)}
|
|
1387
|
+
* />
|
|
1388
|
+
*/
|
|
472
1389
|
declare const TablePagination: (props: PaginationProps) => react_jsx_runtime.JSX.Element;
|
|
473
1390
|
|
|
1391
|
+
/**
|
|
1392
|
+
* Props for the DataTable component
|
|
1393
|
+
* @typedef {Object} DataTableProps
|
|
1394
|
+
* @template TData - Type of data in table rows
|
|
1395
|
+
*
|
|
1396
|
+
* @property {number} [limit] - Number of rows per page for pagination
|
|
1397
|
+
* @property {number} [offset] - Current page offset for pagination
|
|
1398
|
+
* @property {number} [totalCount] - Total number of records in dataset
|
|
1399
|
+
* @property {(page: number) => void} [onPageChange] - Callback when page changes
|
|
1400
|
+
* @property {(limit: number) => void} [onLimitChange] - Callback when page limit changes
|
|
1401
|
+
* @property {ColumnDef<TData, any>[]} columns - Column definitions for the table
|
|
1402
|
+
* @property {TData[]} rows - Array of data rows to display
|
|
1403
|
+
* @property {'standard' | 'compact' | 'comfortable'} [density='standard'] - Row height density
|
|
1404
|
+
* @property {{ [x: string]: boolean }} [columnVisibilityModel] - Column visibility state
|
|
1405
|
+
* @property {boolean} [isLoading=false] - Whether table is loading
|
|
1406
|
+
* @property {boolean} [checkboxSelection=false] - Enable row checkboxes
|
|
1407
|
+
* @property {Record<string, boolean>} [rowSelectionModel={}] - Selected rows state
|
|
1408
|
+
* @property {(newRowSelectionModel: Record<string, boolean>) => void} [onRowSelectionModelChange] - Selection change callback
|
|
1409
|
+
* @property {React.ReactNode[]} [selectionActions] - Actions to show when rows selected
|
|
1410
|
+
* @property {(params: { row: Row<TData> }) => void} [onRowClick] - Row click handler
|
|
1411
|
+
* @property {boolean} [enableSorting=false] - Enable column sorting
|
|
1412
|
+
* @property {SortingState} [sortingState] - Current sorting state
|
|
1413
|
+
* @property {(newSortingState: SortingState) => void} [onSortingChange] - Sorting change callback
|
|
1414
|
+
* @property {boolean} [hideTableActionHeader] - Hide the action header
|
|
1415
|
+
* @property {Object} [tableActionProps] - Table action header configuration
|
|
1416
|
+
* @property {React.ReactNode[]} cards - Card view items for card layout
|
|
1417
|
+
* @property {string} [className] - CSS class for wrapper
|
|
1418
|
+
* @property {string} [tableClassName] - CSS class for table element
|
|
1419
|
+
* @property {string} [headerClassName] - CSS class for header row
|
|
1420
|
+
* @property {string | ((row: Row<TData>) => string)} [rowClassName] - CSS class for data rows
|
|
1421
|
+
* @property {string} [cellClassName] - CSS class for cells
|
|
1422
|
+
* @property {string} [cardContainerClassName] - CSS class for card container
|
|
1423
|
+
*/
|
|
474
1424
|
type DataTableProps<TData = any> = {
|
|
475
1425
|
limit?: number;
|
|
476
1426
|
offset?: number;
|
|
@@ -510,24 +1460,155 @@ type DataTableProps<TData = any> = {
|
|
|
510
1460
|
cellClassName?: string;
|
|
511
1461
|
cardContainerClassName?: string;
|
|
512
1462
|
};
|
|
1463
|
+
/**
|
|
1464
|
+
* DataTable component for displaying tabular data with advanced features
|
|
1465
|
+
* Supports sorting, filtering, pagination, row selection, and card view layout
|
|
1466
|
+
*
|
|
1467
|
+
* @component
|
|
1468
|
+
* @template TData - Type of data in table rows
|
|
1469
|
+
* @param {DataTableProps<TData>} props - DataTable configuration
|
|
1470
|
+
* @param {ColumnDef<TData, any>[]} props.columns - TanStack table column definitions
|
|
1471
|
+
* @param {TData[]} props.rows - Array of data rows
|
|
1472
|
+
* @param {number} [props.limit] - Rows per page (enables pagination)
|
|
1473
|
+
* @param {number} [props.offset] - Page offset
|
|
1474
|
+
* @param {number} [props.totalCount] - Total row count for pagination
|
|
1475
|
+
* @param {(page: number) => void} [props.onPageChange] - Page change handler
|
|
1476
|
+
* @param {(limit: number) => void} [props.onLimitChange] - Page limit change handler
|
|
1477
|
+
* @param {'standard' | 'compact' | 'comfortable'} [props.density='standard'] - Row height
|
|
1478
|
+
* @param {boolean} [props.checkboxSelection] - Show row selection checkboxes
|
|
1479
|
+
* @param {Record<string, boolean>} [props.rowSelectionModel] - Selected rows
|
|
1480
|
+
* @param {(newRowSelectionModel: Record<string, boolean>) => void} [props.onRowSelectionModelChange] - Selection changed callback
|
|
1481
|
+
* @param {React.ReactNode[]} [props.selectionActions] - Actions when rows selected
|
|
1482
|
+
* @param {(params: { row: Row<TData> }) => void} [props.onRowClick] - Row clicked callback
|
|
1483
|
+
* @param {boolean} [props.enableSorting] - Enable column sorting
|
|
1484
|
+
* @param {SortingState} [props.sortingState] - Current sort state
|
|
1485
|
+
* @param {(newSortingState: SortingState) => void} [props.onSortingChange] - Sort changed callback
|
|
1486
|
+
* @param {boolean} [props.isLoading] - Show loading skeletons
|
|
1487
|
+
* @param {boolean} [props.hideTableActionHeader] - Hide action header
|
|
1488
|
+
* @param {Object} [props.tableActionProps] - Table action configuration
|
|
1489
|
+
* @param {React.ReactNode[]} props.cards - Card view items
|
|
1490
|
+
* @param {string} [props.className] - Wrapper CSS class
|
|
1491
|
+
* @param {string} [props.tableClassName] - Table CSS class
|
|
1492
|
+
* @param {string} [props.headerClassName] - Header CSS class
|
|
1493
|
+
* @param {string | ((row: Row<TData>) => string)} [props.rowClassName] - Row CSS class
|
|
1494
|
+
* @param {string} [props.cellClassName] - Cell CSS class
|
|
1495
|
+
* @param {string} [props.cardContainerClassName] - Card container CSS class
|
|
1496
|
+
* @returns {JSX.Element} Data table with optional pagination, sorting, and selection
|
|
1497
|
+
*
|
|
1498
|
+
* @example
|
|
1499
|
+
* // Basic table
|
|
1500
|
+
* <DataTable
|
|
1501
|
+
* columns={columns}
|
|
1502
|
+
* rows={data}
|
|
1503
|
+
* limit={10}
|
|
1504
|
+
* offset={0}
|
|
1505
|
+
* totalCount={100}
|
|
1506
|
+
* />
|
|
1507
|
+
*
|
|
1508
|
+
* @example
|
|
1509
|
+
* // Table with selection and sorting
|
|
1510
|
+
* <DataTable
|
|
1511
|
+
* columns={columns}
|
|
1512
|
+
* rows={data}
|
|
1513
|
+
* checkboxSelection
|
|
1514
|
+
* rowSelectionModel={selected}
|
|
1515
|
+
* onRowSelectionModelChange={setSelected}
|
|
1516
|
+
* enableSorting
|
|
1517
|
+
* sortingState={sorting}
|
|
1518
|
+
* onSortingChange={setSorting}
|
|
1519
|
+
* limit={20}
|
|
1520
|
+
* offset={page * 20}
|
|
1521
|
+
* totalCount={total}
|
|
1522
|
+
* onPageChange={(offset) => setPage(offset / 20)}
|
|
1523
|
+
* />
|
|
1524
|
+
*/
|
|
513
1525
|
declare const DataTable: <TData extends Record<string, any> = any>(props: DataTableProps<TData>) => react_jsx_runtime.JSX.Element;
|
|
514
1526
|
|
|
515
1527
|
declare const typographyVariants: (props?: ({
|
|
516
|
-
variant?: "blockquote" | "h1" | "h2" | "h3" | "h4" | "p" | "small" | "list" | "
|
|
1528
|
+
variant?: "blockquote" | "h1" | "h2" | "h3" | "h4" | "p" | "small" | "list" | "inlineCode" | "lead" | "large" | "muted" | null | undefined;
|
|
517
1529
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
518
1530
|
interface TypographyProps extends React$1.HTMLAttributes<HTMLElement>, VariantProps<typeof typographyVariants> {
|
|
519
1531
|
as?: React$1.ElementType;
|
|
520
1532
|
children?: React$1.ReactNode;
|
|
521
1533
|
}
|
|
522
1534
|
|
|
1535
|
+
/**
|
|
1536
|
+
* Typography component wrapper around shadcn Typography
|
|
1537
|
+
* Provides semantic text rendering with predefined variants
|
|
1538
|
+
*
|
|
1539
|
+
* @component
|
|
1540
|
+
* @param {TypographyProps} props - Typography configuration
|
|
1541
|
+
* @param {'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'blockquote' | 'code' | 'lead' | 'large' | 'small' | 'muted'} [props.variant='p'] - Predefined typography variant
|
|
1542
|
+
* @param {React.ReactNode} props.children - Content to render with typography styling
|
|
1543
|
+
* @param {...TypographyProps} [props] - Additional typography props (className, etc.)
|
|
1544
|
+
* @returns {JSX.Element} Styled typography element
|
|
1545
|
+
*
|
|
1546
|
+
* @example
|
|
1547
|
+
* // Heading
|
|
1548
|
+
* <Typography variant="h1">Page Title</Typography>
|
|
1549
|
+
*
|
|
1550
|
+
* @example
|
|
1551
|
+
* // Paragraph with custom class
|
|
1552
|
+
* <Typography variant="p" className="text-gray-600">
|
|
1553
|
+
* This is a paragraph with custom styling
|
|
1554
|
+
* </Typography>
|
|
1555
|
+
*
|
|
1556
|
+
* @example
|
|
1557
|
+
* // Small text
|
|
1558
|
+
* <Typography variant="small">Small disclaimer text</Typography>
|
|
1559
|
+
*/
|
|
523
1560
|
declare const Typography: ({ variant, children, ...props }: TypographyProps) => react_jsx_runtime.JSX.Element;
|
|
524
1561
|
|
|
1562
|
+
/**
|
|
1563
|
+
* Props for EmptyIllustration component
|
|
1564
|
+
* @typedef {Object} EmptyIllustrationProps
|
|
1565
|
+
* @property {string} message - Text message displayed below the empty illustration
|
|
1566
|
+
* @property {TypographyProps} [messageProps] - Typography props for styling the message text
|
|
1567
|
+
* @property {string} [containerClassName] - CSS class for the container div
|
|
1568
|
+
*/
|
|
1569
|
+
/**
|
|
1570
|
+
* EmptyIllustration component for displaying empty state messaging
|
|
1571
|
+
* Shows decorative empty state icon with customizable message
|
|
1572
|
+
*
|
|
1573
|
+
* @component
|
|
1574
|
+
* @param {Object} props - Component props
|
|
1575
|
+
* @param {string} props.message - Text message to display below illustration
|
|
1576
|
+
* @param {TypographyProps} [props.messageProps] - Typography styling props (variant, className, etc.)
|
|
1577
|
+
* @param {string} [props.containerClassName] - Additional CSS classes for the container
|
|
1578
|
+
* @returns {JSX.Element} Empty state illustration with message
|
|
1579
|
+
*
|
|
1580
|
+
* @example
|
|
1581
|
+
* // Basic empty state
|
|
1582
|
+
* <EmptyIllustration message="No data found" />
|
|
1583
|
+
*
|
|
1584
|
+
* @example
|
|
1585
|
+
* // With custom styling
|
|
1586
|
+
* <EmptyIllustration
|
|
1587
|
+
* message="No search results match your criteria"
|
|
1588
|
+
* messageProps={{ variant: "p", className: "text-gray-600" }}
|
|
1589
|
+
* containerClassName="py-12"
|
|
1590
|
+
* />
|
|
1591
|
+
*/
|
|
525
1592
|
declare const EmptyIllustration: ({ message, messageProps, containerClassName, }: {
|
|
526
1593
|
message: string;
|
|
527
1594
|
messageProps?: TypographyProps;
|
|
528
1595
|
containerClassName?: string;
|
|
529
1596
|
}) => react_jsx_runtime.JSX.Element;
|
|
530
1597
|
|
|
1598
|
+
/**
|
|
1599
|
+
* Configuration for individual tour step
|
|
1600
|
+
* @typedef {Object} JoyrideStep
|
|
1601
|
+
* @property {string} target - CSS selector for the element to highlight
|
|
1602
|
+
* @property {string | ReactNode} content - Description or content for the step
|
|
1603
|
+
* @property {string} [title] - Title text for the step tooltip
|
|
1604
|
+
* @property {'top' | 'bottom' | 'left' | 'right' | 'center' | 'auto'} [placement='auto'] - Tooltip placement relative to target
|
|
1605
|
+
* @property {boolean} [disableBeacon] - Hide the beacon pulse animation
|
|
1606
|
+
* @property {boolean} [hideCloseButton] - Hide close button in tooltip
|
|
1607
|
+
* @property {boolean} [showProgress] - Display progress indicator
|
|
1608
|
+
* @property {boolean} [showSkipButton] - Show skip button in tooltip
|
|
1609
|
+
* @property {boolean} [spotlightClicks] - Allow clicking inside spotlight area
|
|
1610
|
+
* @property {Record<string, any>} [styles] - Custom styles for tooltip
|
|
1611
|
+
*/
|
|
531
1612
|
interface JoyrideStep {
|
|
532
1613
|
target: string;
|
|
533
1614
|
content: string | ReactNode;
|
|
@@ -540,6 +1621,56 @@ interface JoyrideStep {
|
|
|
540
1621
|
spotlightClicks?: boolean;
|
|
541
1622
|
styles?: Record<string, any>;
|
|
542
1623
|
}
|
|
1624
|
+
/**
|
|
1625
|
+
* ReactJoyride component for interactive product tours
|
|
1626
|
+
* Provides guided walkthrough of UI elements with customizable steps
|
|
1627
|
+
*
|
|
1628
|
+
* @component
|
|
1629
|
+
* @param {Object} props - Tour configuration
|
|
1630
|
+
* @param {JoyrideStep[]} props.steps - Array of tour steps with targets, content, and placement
|
|
1631
|
+
* @param {ReactNode} [props.children] - Application content to overlay tour on
|
|
1632
|
+
* @param {string} props.tourName - Unique identifier for the tour (for state management)
|
|
1633
|
+
* @returns {JSX.Element} Tour overlay component with tour trigger button
|
|
1634
|
+
*
|
|
1635
|
+
* @example
|
|
1636
|
+
* // Basic product tour
|
|
1637
|
+
* <ReactJoyRide
|
|
1638
|
+
* tourName="dashboard-tour"
|
|
1639
|
+
* steps={[
|
|
1640
|
+
* {
|
|
1641
|
+
* target: ".logo",
|
|
1642
|
+
* title: "Welcome",
|
|
1643
|
+
* content: "Welcome to our dashboard!",
|
|
1644
|
+
* placement: "bottom"
|
|
1645
|
+
* },
|
|
1646
|
+
* {
|
|
1647
|
+
* target: ".user-menu",
|
|
1648
|
+
* title: "Profile",
|
|
1649
|
+
* content: "Access your profile and settings here",
|
|
1650
|
+
* placement: "left"
|
|
1651
|
+
* }
|
|
1652
|
+
* ]}
|
|
1653
|
+
* >
|
|
1654
|
+
* <Dashboard />
|
|
1655
|
+
* </ReactJoyRide>
|
|
1656
|
+
*
|
|
1657
|
+
* @example
|
|
1658
|
+
* // Advanced tour with custom placement and styling
|
|
1659
|
+
* <ReactJoyRide
|
|
1660
|
+
* tourName="feature-tour"
|
|
1661
|
+
* steps={[
|
|
1662
|
+
* {
|
|
1663
|
+
* target: ".new-feature",
|
|
1664
|
+
* title: "New Feature",
|
|
1665
|
+
* content: "Check out this exciting new feature",
|
|
1666
|
+
* placement: "right",
|
|
1667
|
+
* disableBeacon: false
|
|
1668
|
+
* }
|
|
1669
|
+
* ]}
|
|
1670
|
+
* >
|
|
1671
|
+
* <App />
|
|
1672
|
+
* </ReactJoyRide>
|
|
1673
|
+
*/
|
|
543
1674
|
declare const ReactJoyRide: ({ steps, children, tourName, }: {
|
|
544
1675
|
steps: JoyrideStep[];
|
|
545
1676
|
children?: ReactNode;
|
|
@@ -548,48 +1679,223 @@ declare const ReactJoyRide: ({ steps, children, tourName, }: {
|
|
|
548
1679
|
|
|
549
1680
|
declare function Separator$1({ className, orientation, decorative, ...props }: React$1.ComponentProps<typeof SeparatorPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
550
1681
|
|
|
1682
|
+
/**
|
|
1683
|
+
* Props for Separator component
|
|
1684
|
+
* @typedef {Object} SeparatorProps
|
|
1685
|
+
* @property {'horizontal' | 'vertical'} [orientation='horizontal'] - Direction of the separator
|
|
1686
|
+
* @property {boolean} [decorative=true] - If true, renders as non-semantic element for styling
|
|
1687
|
+
* @property {string} [className] - Optional CSS class for custom styling
|
|
1688
|
+
* @extends {React.ComponentPropsWithoutRef<typeof ShadcnSaperator>}
|
|
1689
|
+
*/
|
|
551
1690
|
interface SeparatorProps extends React$1.ComponentPropsWithoutRef<typeof Separator$1> {
|
|
552
1691
|
orientation?: 'horizontal' | 'vertical';
|
|
553
1692
|
decorative?: boolean;
|
|
554
1693
|
className?: string;
|
|
555
1694
|
}
|
|
1695
|
+
/**
|
|
1696
|
+
* Separator component for dividing content sections
|
|
1697
|
+
* Renders semantic or decorative separator line
|
|
1698
|
+
*
|
|
1699
|
+
* @component
|
|
1700
|
+
* @param {SeparatorProps} props - Separator configuration
|
|
1701
|
+
* @param {'horizontal' | 'vertical'} [props.orientation='horizontal'] - Direction of the dividing line
|
|
1702
|
+
* @param {boolean} [props.decorative=true] - Whether separator is decorative (non-semantic)
|
|
1703
|
+
* @param {string} [props.className] - Additional CSS classes for styling
|
|
1704
|
+
* @param {...React.ComponentPropsWithoutRef<typeof ShadcnSaperator>} [props] - Additional separator props
|
|
1705
|
+
* @returns {JSX.Element} Separator line element
|
|
1706
|
+
* @example
|
|
1707
|
+
* // Horizontal separator
|
|
1708
|
+
* <Separator />
|
|
1709
|
+
*
|
|
1710
|
+
* @example
|
|
1711
|
+
* // Vertical separator with custom styling
|
|
1712
|
+
* <Separator
|
|
1713
|
+
* orientation="vertical"
|
|
1714
|
+
* className="h-12"
|
|
1715
|
+
* />
|
|
1716
|
+
*/
|
|
556
1717
|
declare const Separator: React$1.ForwardRefExoticComponent<SeparatorProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
557
1718
|
|
|
558
1719
|
declare function Skeleton({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
559
1720
|
|
|
1721
|
+
/**
|
|
1722
|
+
* Props for StatusCard component
|
|
1723
|
+
* @typedef {Object} StatusCardProps
|
|
1724
|
+
* @property {'green' | 'red' | 'orange' | 'yellow' | 'blue' | 'pink'} color - Color theme for the status card
|
|
1725
|
+
* @property {string} text - Text content to display in the status card
|
|
1726
|
+
* @property {string} [className] - Optional additional CSS classes
|
|
1727
|
+
* @property {TypographyProps['variant']} [typographyVariant='small'] - Typography variant for text styling
|
|
1728
|
+
*/
|
|
560
1729
|
type StatusCardProps = {
|
|
561
1730
|
color: 'green' | 'red' | 'orange' | 'yellow' | 'blue' | 'pink';
|
|
562
1731
|
text: string;
|
|
563
1732
|
className?: string;
|
|
564
1733
|
typographyVariant?: TypographyProps['variant'];
|
|
565
1734
|
};
|
|
1735
|
+
/**
|
|
1736
|
+
* StatusCard component for displaying colored status badges
|
|
1737
|
+
* Renders status indicators with color-coded backgrounds and text
|
|
1738
|
+
*
|
|
1739
|
+
* @component
|
|
1740
|
+
* @param {StatusCardProps} props - StatusCard configuration
|
|
1741
|
+
* @param {'green' | 'red' | 'orange' | 'yellow' | 'blue' | 'pink'} props.color - Status color (determines styling)
|
|
1742
|
+
* @param {string} props.text - Status text to display
|
|
1743
|
+
* @param {string} [props.className] - Additional CSS classes for custom styling
|
|
1744
|
+
* @param {TypographyProps['variant']} [props.typographyVariant='small'] - Typography variant (h1-h6, p, small, etc.)
|
|
1745
|
+
* @returns {JSX.Element} Colored status badge
|
|
1746
|
+
*
|
|
1747
|
+
* @example
|
|
1748
|
+
* // Active status
|
|
1749
|
+
* <StatusCard
|
|
1750
|
+
* color="green"
|
|
1751
|
+
* text="Active"
|
|
1752
|
+
* />
|
|
1753
|
+
*
|
|
1754
|
+
* @example
|
|
1755
|
+
* // Error status with custom styling
|
|
1756
|
+
* <StatusCard
|
|
1757
|
+
* color="red"
|
|
1758
|
+
* text="Error"
|
|
1759
|
+
* typographyVariant="p"
|
|
1760
|
+
* className="font-bold"
|
|
1761
|
+
* />
|
|
1762
|
+
*/
|
|
566
1763
|
declare const StatusCard: ({ color, text, className, typographyVariant, }: StatusCardProps) => react_jsx_runtime.JSX.Element;
|
|
567
1764
|
|
|
1765
|
+
/**
|
|
1766
|
+
* Props for individual timeline item
|
|
1767
|
+
* @typedef {Object} TimelineItems
|
|
1768
|
+
* @property {ReactNode} timelineContent - Main content of the timeline item
|
|
1769
|
+
* @property {ReactNode} [timelineOppositeContent] - Optional opposite-side content (for alternate layouts)
|
|
1770
|
+
* @property {'info' | 'success' | 'error' | 'warning'} [variant='info'] - Icon variant for the timeline marker
|
|
1771
|
+
*/
|
|
568
1772
|
type TimelineItems = {
|
|
569
1773
|
timelineContent: ReactNode;
|
|
570
1774
|
timelineOppositeContent?: ReactNode;
|
|
571
1775
|
variant?: 'info' | 'success' | 'error' | 'warning';
|
|
572
1776
|
};
|
|
1777
|
+
/**
|
|
1778
|
+
* Props for Timeline component
|
|
1779
|
+
* @typedef {Object} TimelineProps
|
|
1780
|
+
* @property {TimelineItems[]} timelineItems - Array of timeline items to display
|
|
1781
|
+
* @property {'left' | 'right' | 'alternate' | 'alternate-reverse'} [position='right'] - Timeline layout position
|
|
1782
|
+
* @property {string} [className] - Optional CSS class for the timeline container
|
|
1783
|
+
*/
|
|
573
1784
|
type TimelineProps = {
|
|
574
1785
|
timelineItems: TimelineItems[];
|
|
575
1786
|
position?: 'left' | 'right' | 'alternate' | 'alternate-reverse';
|
|
576
1787
|
className?: string;
|
|
577
1788
|
};
|
|
1789
|
+
/**
|
|
1790
|
+
* Timeline component for displaying chronological events or steps
|
|
1791
|
+
* Supports multiple layout positions and icon variants per item
|
|
1792
|
+
*
|
|
1793
|
+
* @component
|
|
1794
|
+
* @param {TimelineProps} props - Timeline configuration
|
|
1795
|
+
* @param {TimelineItems[]} props.timelineItems - Array of timeline events with content and optional opposite content
|
|
1796
|
+
* @param {'left' | 'right' | 'alternate' | 'alternate-reverse'} [props.position='right'] - Position of timeline connector
|
|
1797
|
+
* - 'left': All content on left side
|
|
1798
|
+
* - 'right': All content on right side
|
|
1799
|
+
* - 'alternate': Content alternates left/right starting with left
|
|
1800
|
+
* - 'alternate-reverse': Content alternates left/right starting with right
|
|
1801
|
+
* @param {string} [props.className] - Additional CSS classes for the timeline wrapper
|
|
1802
|
+
* @returns {JSX.Element} Timeline visualization with ordered events
|
|
1803
|
+
*
|
|
1804
|
+
* @example
|
|
1805
|
+
* // Basic timeline (content on right)
|
|
1806
|
+
* <Timeline
|
|
1807
|
+
* position="right"
|
|
1808
|
+
* timelineItems={[
|
|
1809
|
+
* { timelineContent: "Project started", variant: "success" },
|
|
1810
|
+
* { timelineContent: "First milestone", variant: "info" },
|
|
1811
|
+
* { timelineContent: "Completed", variant: "success" }
|
|
1812
|
+
* ]}
|
|
1813
|
+
* />
|
|
1814
|
+
*
|
|
1815
|
+
* @example
|
|
1816
|
+
* // Alternating timeline with opposite content
|
|
1817
|
+
* <Timeline
|
|
1818
|
+
* position="alternate"
|
|
1819
|
+
* timelineItems={[
|
|
1820
|
+
* {
|
|
1821
|
+
* timelineContent: "Development",
|
|
1822
|
+
* timelineOppositeContent: "Jan 2024",
|
|
1823
|
+
* variant: "info"
|
|
1824
|
+
* },
|
|
1825
|
+
* {
|
|
1826
|
+
* timelineContent: "Testing",
|
|
1827
|
+
* timelineOppositeContent: "Feb 2024",
|
|
1828
|
+
* variant: "warning"
|
|
1829
|
+
* }
|
|
1830
|
+
* ]}
|
|
1831
|
+
* />
|
|
1832
|
+
*/
|
|
578
1833
|
declare const Timeline: ({ timelineItems, position, className, }: TimelineProps) => react_jsx_runtime.JSX.Element;
|
|
579
1834
|
|
|
1835
|
+
/**
|
|
1836
|
+
* Props for the Alert component.
|
|
1837
|
+
* @typedef {Object} AlertProps
|
|
1838
|
+
* @property {string | ReactNode} message - The message content to display in the alert
|
|
1839
|
+
* @property {'success' | 'error' | 'info' | 'warning'} [severity] - The severity level of the alert that determines the icon displayed
|
|
1840
|
+
* @property {'default' | 'destructive'} [variant] - The visual variant of the alert. Defaults to 'destructive' if severity is 'error'
|
|
1841
|
+
* @property {string} [className] - Additional CSS classes to apply to the alert component
|
|
1842
|
+
*/
|
|
580
1843
|
type AlertProps = {
|
|
581
1844
|
message: string | ReactNode;
|
|
582
1845
|
severity?: 'success' | 'error' | 'info' | 'warning';
|
|
583
1846
|
variant?: 'default' | 'destructive';
|
|
584
1847
|
className?: string;
|
|
585
1848
|
};
|
|
1849
|
+
/**
|
|
1850
|
+
* Alert component that displays a message with an optional severity-based icon.
|
|
1851
|
+
* Renders a styled alert box with appropriate visual indicators based on severity level.
|
|
1852
|
+
*
|
|
1853
|
+
* @param {AlertProps} props - The component props
|
|
1854
|
+
* @param {string | ReactNode} props.message - The message content to display
|
|
1855
|
+
* @param {'success' | 'error' | 'info' | 'warning'} [props.severity] - The severity level determining icon and styling
|
|
1856
|
+
* @param {'default' | 'destructive'} [props.variant] - The visual variant. Overrides default variant selection
|
|
1857
|
+
* @param {string} [props.className] - Additional CSS classes to apply to the alert
|
|
1858
|
+
* @returns {JSX.Element} The rendered alert component
|
|
1859
|
+
*
|
|
1860
|
+
* @example
|
|
1861
|
+
* // Display a success alert
|
|
1862
|
+
* <Alert message="Operation completed successfully" severity="success" />
|
|
1863
|
+
*
|
|
1864
|
+
* @example
|
|
1865
|
+
* // Display an error alert with custom styling
|
|
1866
|
+
* <Alert
|
|
1867
|
+
* message="An error occurred"
|
|
1868
|
+
* severity="error"
|
|
1869
|
+
* className="mt-4"
|
|
1870
|
+
* />
|
|
1871
|
+
*/
|
|
586
1872
|
declare const Alert: ({ severity, message, variant, className, }: AlertProps) => react_jsx_runtime.JSX.Element;
|
|
587
1873
|
|
|
1874
|
+
/**
|
|
1875
|
+
* Severity levels for snackbar alerts.
|
|
1876
|
+
* @typedef {'success' | 'info' | 'warning' | 'error'} Severity
|
|
1877
|
+
*/
|
|
588
1878
|
type Severity = 'success' | 'info' | 'warning' | 'error';
|
|
1879
|
+
/**
|
|
1880
|
+
* Position configuration for snackbar placement on screen.
|
|
1881
|
+
* @typedef {Object} SnackbarPosition
|
|
1882
|
+
* @property {'top' | 'bottom'} vertical - Vertical alignment of the snackbar
|
|
1883
|
+
* @property {'left' | 'center' | 'right'} horizontal - Horizontal alignment of the snackbar
|
|
1884
|
+
*/
|
|
589
1885
|
type SnackbarPosition = {
|
|
590
1886
|
vertical: 'top' | 'bottom';
|
|
591
1887
|
horizontal: 'left' | 'center' | 'right';
|
|
592
1888
|
};
|
|
1889
|
+
/**
|
|
1890
|
+
* Props for the Snackbar component.
|
|
1891
|
+
* @typedef {Object} SnackbarProps
|
|
1892
|
+
* @property {Severity} severity - The severity level of the snackbar (success, info, warning, error)
|
|
1893
|
+
* @property {string} message - The message text to display in the snackbar
|
|
1894
|
+
* @property {boolean} open - Whether the snackbar is visible
|
|
1895
|
+
* @property {Function} [onClose] - Callback function when snackbar is closed. Called with reason ('timeout' or 'clickaway')
|
|
1896
|
+
* @property {SnackbarPosition} [anchorOrigin] - Position configuration for the snackbar placement. Defaults to {vertical: 'top', horizontal: 'center'}
|
|
1897
|
+
* @property {number} [autoHideDuration] - Duration in milliseconds after which the snackbar auto-closes. If not provided, snackbar stays open until manually closed
|
|
1898
|
+
*/
|
|
593
1899
|
type SnackbarProps = {
|
|
594
1900
|
severity: Severity;
|
|
595
1901
|
message: string;
|
|
@@ -598,10 +1904,71 @@ type SnackbarProps = {
|
|
|
598
1904
|
anchorOrigin?: SnackbarPosition;
|
|
599
1905
|
autoHideDuration?: number;
|
|
600
1906
|
};
|
|
1907
|
+
/**
|
|
1908
|
+
* Snackbar component for displaying temporary notification messages.
|
|
1909
|
+
* Displays a dismissible notification box with icon and message based on severity.
|
|
1910
|
+
* Auto-hides after specified duration or when close button is clicked.
|
|
1911
|
+
*
|
|
1912
|
+
* @param {SnackbarProps} props - The component props
|
|
1913
|
+
* @param {Severity} props.severity - The severity level of the notification
|
|
1914
|
+
* @param {string} props.message - The message text to display
|
|
1915
|
+
* @param {boolean} props.open - Whether the snackbar is visible
|
|
1916
|
+
* @param {Function} [props.onClose] - Callback when snackbar is closed. Receives close reason as parameter
|
|
1917
|
+
* @param {SnackbarPosition} [props.anchorOrigin] - Position configuration for placement (defaults to top center)
|
|
1918
|
+
* @param {number} [props.autoHideDuration] - Duration in milliseconds before auto-closing (undefined = no auto-close)
|
|
1919
|
+
* @returns {JSX.Element | null} The rendered snackbar component or null if not open
|
|
1920
|
+
*
|
|
1921
|
+
* @example
|
|
1922
|
+
* // Display a success message that auto-hides after 3 seconds
|
|
1923
|
+
* <Snackbar
|
|
1924
|
+
* severity="success"
|
|
1925
|
+
* message="Changes saved successfully"
|
|
1926
|
+
* open={true}
|
|
1927
|
+
* autoHideDuration={3000}
|
|
1928
|
+
* onClose={(reason) => console.log('Closed:', reason)}
|
|
1929
|
+
* />
|
|
1930
|
+
*
|
|
1931
|
+
* @example
|
|
1932
|
+
* // Position snackbar at bottom-right
|
|
1933
|
+
* <Snackbar
|
|
1934
|
+
* severity="info"
|
|
1935
|
+
* message="New updates available"
|
|
1936
|
+
* open={isOpen}
|
|
1937
|
+
* anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}
|
|
1938
|
+
* onClose={() => setIsOpen(false)}
|
|
1939
|
+
* />
|
|
1940
|
+
*/
|
|
601
1941
|
declare const Snackbar: ({ severity, message, open, onClose, anchorOrigin, autoHideDuration, }: SnackbarProps) => react_jsx_runtime.JSX.Element | null;
|
|
602
1942
|
|
|
1943
|
+
/**
|
|
1944
|
+
* Spinner component that displays an animated loading indicator.
|
|
1945
|
+
* Renders a dual-colored rotating spinner with smooth continuous animation.
|
|
1946
|
+
* No props required - it's a simple stateless component.
|
|
1947
|
+
*
|
|
1948
|
+
* @returns {JSX.Element} The rendered spinner component
|
|
1949
|
+
*
|
|
1950
|
+
* @example
|
|
1951
|
+
* // Display a loading spinner
|
|
1952
|
+
* <Spinner />
|
|
1953
|
+
*
|
|
1954
|
+
* @example
|
|
1955
|
+
* // Use in a loading state
|
|
1956
|
+
* {isLoading ? <Spinner /> : <div>Content loaded</div>}
|
|
1957
|
+
*/
|
|
603
1958
|
declare const Spinner: () => react_jsx_runtime.JSX.Element;
|
|
604
1959
|
|
|
1960
|
+
/**
|
|
1961
|
+
* Props for the Tooltip component.
|
|
1962
|
+
* @typedef {Object} TooltipProps
|
|
1963
|
+
* @property {ReactNode} children - The element that triggers the tooltip on hover
|
|
1964
|
+
* @property {ReactNode} title - The tooltip content to display
|
|
1965
|
+
* @property {'top' | 'right' | 'bottom' | 'left'} [placement] - The direction to place the tooltip relative to the trigger element. Defaults to 'right'
|
|
1966
|
+
* @property {boolean} [arrow] - Whether to display an arrow pointing to the trigger element. Currently not implemented in UI
|
|
1967
|
+
* @property {boolean} [open] - Controlled open state of the tooltip
|
|
1968
|
+
* @property {boolean} [defaultOpen] - Initial open state if tooltip is uncontrolled
|
|
1969
|
+
* @property {Function} [onOpenChange] - Callback fired when tooltip open state changes
|
|
1970
|
+
* @property {number} [delayDuration] - Delay in milliseconds before tooltip appears on hover
|
|
1971
|
+
*/
|
|
605
1972
|
type TooltipProps = {
|
|
606
1973
|
children: ReactNode;
|
|
607
1974
|
title: ReactNode;
|
|
@@ -612,6 +1979,48 @@ type TooltipProps = {
|
|
|
612
1979
|
onOpenChange?: (open: boolean) => void;
|
|
613
1980
|
delayDuration?: number;
|
|
614
1981
|
};
|
|
1982
|
+
/**
|
|
1983
|
+
* Tooltip component that displays contextual information on hover.
|
|
1984
|
+
* Wraps the shadcn tooltip component with enhanced positioning and configuration options.
|
|
1985
|
+
* Supports both controlled and uncontrolled modes for tooltip visibility.
|
|
1986
|
+
*
|
|
1987
|
+
* @param {TooltipProps} props - The component props
|
|
1988
|
+
* @param {ReactNode} props.children - The element that triggers the tooltip
|
|
1989
|
+
* @param {ReactNode} props.title - The tooltip content to display
|
|
1990
|
+
* @param {'top' | 'right' | 'bottom' | 'left'} [props.placement] - Tooltip placement direction (defaults to 'right')
|
|
1991
|
+
* @param {boolean} [props.arrow] - Arrow display option (not currently implemented)
|
|
1992
|
+
* @param {boolean} [props.open] - Controlled open state
|
|
1993
|
+
* @param {boolean} [props.defaultOpen] - Initial open state for uncontrolled mode
|
|
1994
|
+
* @param {Function} [props.onOpenChange] - Callback when open state changes
|
|
1995
|
+
* @param {number} [props.delayDuration] - Delay before showing tooltip in milliseconds
|
|
1996
|
+
* @returns {JSX.Element} The rendered tooltip component
|
|
1997
|
+
*
|
|
1998
|
+
* @example
|
|
1999
|
+
* // Basic tooltip with default placement
|
|
2000
|
+
* <Tooltip title="This is a helpful tip">
|
|
2001
|
+
* <button>Hover me</button>
|
|
2002
|
+
* </Tooltip>
|
|
2003
|
+
*
|
|
2004
|
+
* @example
|
|
2005
|
+
* // Tooltip positioned at bottom with delay
|
|
2006
|
+
* <Tooltip
|
|
2007
|
+
* title="Additional information"
|
|
2008
|
+
* placement="bottom"
|
|
2009
|
+
* delayDuration={500}
|
|
2010
|
+
* >
|
|
2011
|
+
* <span>Information icon</span>
|
|
2012
|
+
* </Tooltip>
|
|
2013
|
+
*
|
|
2014
|
+
* @example
|
|
2015
|
+
* // Controlled tooltip state
|
|
2016
|
+
* <Tooltip
|
|
2017
|
+
* title="Controlled tooltip"
|
|
2018
|
+
* open={isTooltipOpen}
|
|
2019
|
+
* onOpenChange={setIsTooltipOpen}
|
|
2020
|
+
* >
|
|
2021
|
+
* <button>Toggle</button>
|
|
2022
|
+
* </Tooltip>
|
|
2023
|
+
*/
|
|
615
2024
|
declare const Tooltip: ({ children, title, placement, open, defaultOpen, onOpenChange, delayDuration, }: TooltipProps) => react_jsx_runtime.JSX.Element;
|
|
616
2025
|
|
|
617
2026
|
declare const buttonVariants: (props?: ({
|
|
@@ -626,6 +2035,32 @@ type ButtonProps = React.ComponentProps<'button'> & VariantProps<typeof buttonVa
|
|
|
626
2035
|
endIcon?: ReactNode;
|
|
627
2036
|
fullWidth?: boolean;
|
|
628
2037
|
};
|
|
2038
|
+
/**
|
|
2039
|
+
* Button component with enhanced features
|
|
2040
|
+
*
|
|
2041
|
+
* A customizable button component that wraps the shadcn Button with additional
|
|
2042
|
+
* functionality including loading states, icons, and full width options.
|
|
2043
|
+
*
|
|
2044
|
+
* @component
|
|
2045
|
+
* @param {ButtonProps} props - The button properties
|
|
2046
|
+
* @param {boolean} [props.loading=false] - Whether the button is in a loading state
|
|
2047
|
+
* @param {ReactNode} [props.startIcon] - Icon to display at the start of the button
|
|
2048
|
+
* @param {ReactNode} [props.endIcon] - Icon to display at the end of the button
|
|
2049
|
+
* @param {boolean} [props.fullWidth=false] - Whether the button should take full width
|
|
2050
|
+
* @param {boolean} [props.disabled] - Whether the button is disabled
|
|
2051
|
+
* @param {ReactNode} [props.children] - The button content/label
|
|
2052
|
+
* @param {string} [props.className] - Additional CSS classes to apply
|
|
2053
|
+
* @param {string} [props.variant] - Button style variant from buttonVariants
|
|
2054
|
+
* @param {string} [props.size] - Button size variant from buttonVariants
|
|
2055
|
+
* @returns {React.ReactElement} The rendered button element
|
|
2056
|
+
*
|
|
2057
|
+
* @example
|
|
2058
|
+
* ```tsx
|
|
2059
|
+
* <Button loading={isLoading} startIcon={<SendIcon />} variant="default">
|
|
2060
|
+
* Submit
|
|
2061
|
+
* </Button>
|
|
2062
|
+
* ```
|
|
2063
|
+
*/
|
|
629
2064
|
declare const Button: ({ loading, disabled, children, startIcon, endIcon, fullWidth, className, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
630
2065
|
|
|
631
2066
|
type DateFormat = 'yyyy' | 'MMMM yyyy' | 'dd MMMM yyyy' | 'dd/MM/yyyy';
|
|
@@ -661,6 +2096,47 @@ type DatePickerProps = {
|
|
|
661
2096
|
type?: 'input' | 'filter';
|
|
662
2097
|
[key: string]: any;
|
|
663
2098
|
};
|
|
2099
|
+
/**
|
|
2100
|
+
* DatePicker component for date selection
|
|
2101
|
+
*
|
|
2102
|
+
* A flexible date picker component that supports both input and filter modes,
|
|
2103
|
+
* with customizable date formats, restrictions, and shortcuts.
|
|
2104
|
+
*
|
|
2105
|
+
* @component
|
|
2106
|
+
* @param {DatePickerProps} props - The date picker properties
|
|
2107
|
+
* @param {React.ReactNode | string} [props.label] - Label for the date picker
|
|
2108
|
+
* @param {string} [props.name] - Name attribute for the input
|
|
2109
|
+
* @param {Date} [props.value] - Currently selected date
|
|
2110
|
+
* @param {(date: Date | undefined) => void} [props.onChange] - Callback fired when date changes
|
|
2111
|
+
* @param {DateFormat} [props.format='dd/MM/yyyy'] - Date format for display
|
|
2112
|
+
* @param {string} [props.placeholder] - Placeholder text
|
|
2113
|
+
* @param {string} [props.helperText] - Helper text below the input
|
|
2114
|
+
* @param {boolean} [props.required] - Whether the field is required
|
|
2115
|
+
* @param {boolean} [props.disabled] - Whether the picker is disabled
|
|
2116
|
+
* @param {Date} [props.minDate] - Minimum selectable date
|
|
2117
|
+
* @param {Date} [props.maxDate] - Maximum selectable date
|
|
2118
|
+
* @param {boolean} [props.disablePast] - Whether past dates are disabled
|
|
2119
|
+
* @param {boolean} [props.disableFuture] - Whether future dates are disabled
|
|
2120
|
+
* @param {(date: Date) => boolean} [props.shouldDisableDate] - Custom date disable logic
|
|
2121
|
+
* @param {(date: Date) => boolean} [props.shouldDisableMonth] - Custom month disable logic
|
|
2122
|
+
* @param {(date: Date) => boolean} [props.shouldDisableYear] - Custom year disable logic
|
|
2123
|
+
* @param {boolean} [props.fullWidth] - Whether the picker takes full width
|
|
2124
|
+
* @param {'input' | 'filter'} [props.type='input'] - Display type of the picker
|
|
2125
|
+
* @param {() => void} [props.onOpen] - Callback when picker opens
|
|
2126
|
+
* @param {() => void} [props.onClose] - Callback when picker closes
|
|
2127
|
+
* @returns {React.ReactElement} The rendered date picker component
|
|
2128
|
+
*
|
|
2129
|
+
* @example
|
|
2130
|
+
* ```tsx
|
|
2131
|
+
* <DatePicker
|
|
2132
|
+
* label="Select Date"
|
|
2133
|
+
* value={date}
|
|
2134
|
+
* onChange={setDate}
|
|
2135
|
+
* format="dd/MM/yyyy"
|
|
2136
|
+
* required
|
|
2137
|
+
* />
|
|
2138
|
+
* ```
|
|
2139
|
+
*/
|
|
664
2140
|
declare const DatePicker: ({ type, ...props }: DatePickerProps) => react_jsx_runtime.JSX.Element;
|
|
665
2141
|
|
|
666
2142
|
type DateTimePickerViews = 'year' | 'month' | 'day' | 'hours' | 'minutes' | 'seconds';
|
|
@@ -698,6 +2174,48 @@ type DateTimePickerProps = {
|
|
|
698
2174
|
type?: 'input' | 'filter';
|
|
699
2175
|
[key: string]: any;
|
|
700
2176
|
};
|
|
2177
|
+
/**
|
|
2178
|
+
* DateTimePicker component for date and time selection
|
|
2179
|
+
*
|
|
2180
|
+
* A comprehensive date and time picker component supporting both input and filter modes,
|
|
2181
|
+
* with flexible date/time formats, time unit selection, and date restrictions.
|
|
2182
|
+
*
|
|
2183
|
+
* @component
|
|
2184
|
+
* @param {DateTimePickerProps} props - The date time picker properties
|
|
2185
|
+
* @param {React.ReactNode | string} [props.label] - Label for the picker
|
|
2186
|
+
* @param {string} [props.name] - Name attribute for the input
|
|
2187
|
+
* @param {Date} [props.value] - Currently selected date and time
|
|
2188
|
+
* @param {(date: Date | undefined) => void} [props.onChange] - Callback fired when date/time changes
|
|
2189
|
+
* @param {DateTimeFormat} [props.format] - Date and time format for display
|
|
2190
|
+
* @param {DateTimePickerViews[]} [props.views] - Which time units to display (year, month, day, hours, minutes, seconds)
|
|
2191
|
+
* @param {string} [props.placeholder] - Placeholder text
|
|
2192
|
+
* @param {string} [props.helperText] - Helper text below the input
|
|
2193
|
+
* @param {boolean} [props.required] - Whether the field is required
|
|
2194
|
+
* @param {boolean} [props.disabled] - Whether the picker is disabled
|
|
2195
|
+
* @param {Date} [props.minDate] - Minimum selectable date/time
|
|
2196
|
+
* @param {Date} [props.maxDate] - Maximum selectable date/time
|
|
2197
|
+
* @param {boolean} [props.disablePast] - Whether past dates/times are disabled
|
|
2198
|
+
* @param {boolean} [props.disableFuture] - Whether future dates/times are disabled
|
|
2199
|
+
* @param {(date: Date) => boolean} [props.shouldDisableDate] - Custom date disable logic
|
|
2200
|
+
* @param {(date: Date) => boolean} [props.shouldDisableMonth] - Custom month disable logic
|
|
2201
|
+
* @param {(date: Date) => boolean} [props.shouldDisableYear] - Custom year disable logic
|
|
2202
|
+
* @param {boolean} [props.fullWidth] - Whether the picker takes full width
|
|
2203
|
+
* @param {'input' | 'filter'} [props.type='input'] - Display type of the picker
|
|
2204
|
+
* @param {() => void} [props.onOpen] - Callback when picker opens
|
|
2205
|
+
* @param {() => void} [props.onClose] - Callback when picker closes
|
|
2206
|
+
* @returns {React.ReactElement} The rendered date time picker component
|
|
2207
|
+
*
|
|
2208
|
+
* @example
|
|
2209
|
+
* ```tsx
|
|
2210
|
+
* <DateTimePicker
|
|
2211
|
+
* label="Select Date & Time"
|
|
2212
|
+
* value={dateTime}
|
|
2213
|
+
* onChange={setDateTime}
|
|
2214
|
+
* format="dd/MM/yyyy hh:mm a"
|
|
2215
|
+
* views={['year', 'month', 'day', 'hours', 'minutes']}
|
|
2216
|
+
* />
|
|
2217
|
+
* ```
|
|
2218
|
+
*/
|
|
701
2219
|
declare const DateTimePicker: ({ type, ...props }: DateTimePickerProps) => react_jsx_runtime.JSX.Element;
|
|
702
2220
|
|
|
703
2221
|
type FileUploadProps = {
|
|
@@ -720,6 +2238,47 @@ type FileUploadProps = {
|
|
|
720
2238
|
previewClassName?: string;
|
|
721
2239
|
required?: boolean;
|
|
722
2240
|
};
|
|
2241
|
+
/**
|
|
2242
|
+
* FileUpload component for file selection and management
|
|
2243
|
+
*
|
|
2244
|
+
* A comprehensive file upload component with drag-and-drop support, file validation,
|
|
2245
|
+
* preview capabilities, and file management features.
|
|
2246
|
+
*
|
|
2247
|
+
* @component
|
|
2248
|
+
* @param {FileUploadProps} props - The file upload properties
|
|
2249
|
+
* @param {string} props.label - Label text for the upload field
|
|
2250
|
+
* @param {string} props.name - Name attribute for the input element
|
|
2251
|
+
* @param {File[]} [props.files=[]] - Array of currently selected files
|
|
2252
|
+
* @param {(files: File[]) => void} [props.onChange] - Callback fired when files are selected
|
|
2253
|
+
* @param {(index: number) => void} [props.handleRemove] - Callback to remove a file by index
|
|
2254
|
+
* @param {'image/*' | '.pdf' | '.docx' | '.txt' | '*'} [props.accept='*'] - File type filter
|
|
2255
|
+
* @param {(file: File) => void} [props.onInvalidFile] - Callback fired when an invalid file is selected
|
|
2256
|
+
* @param {string} [props.inputText] - Custom text for the upload prompt
|
|
2257
|
+
* @param {boolean} [props.multiple=true] - Whether multiple files can be selected
|
|
2258
|
+
* @param {boolean} [props.disabled=false] - Whether the upload is disabled
|
|
2259
|
+
* @param {boolean} [props.hideDeleteButton=false] - Whether to hide delete buttons on files
|
|
2260
|
+
* @param {boolean} [props.hideInput=false] - Whether to hide the file input area
|
|
2261
|
+
* @param {string} [props.errorText] - Error message to display
|
|
2262
|
+
* @param {string} [props.className] - Additional CSS classes for the upload area
|
|
2263
|
+
* @param {string} [props.containerClassName] - Additional CSS classes for the container
|
|
2264
|
+
* @param {boolean} [props.showImage] - Whether to show image previews instead of file list
|
|
2265
|
+
* @param {string} [props.previewClassName] - Additional CSS classes for previews
|
|
2266
|
+
* @param {boolean} [props.required] - Whether the field is required
|
|
2267
|
+
* @returns {React.ReactElement} The rendered file upload component
|
|
2268
|
+
*
|
|
2269
|
+
* @example
|
|
2270
|
+
* ```tsx
|
|
2271
|
+
* <FileUpload
|
|
2272
|
+
* label="Upload Documents"
|
|
2273
|
+
* name="documents"
|
|
2274
|
+
* files={files}
|
|
2275
|
+
* onChange={setFiles}
|
|
2276
|
+
* accept=".pdf,.docx"
|
|
2277
|
+
* multiple
|
|
2278
|
+
* required
|
|
2279
|
+
* />
|
|
2280
|
+
* ```
|
|
2281
|
+
*/
|
|
723
2282
|
declare const FileUpload: ({ label, name, disabled, onChange, handleRemove, files, accept, inputText, onInvalidFile, hideDeleteButton, hideInput, multiple, errorText, showImage, previewClassName, className, containerClassName, required, }: FileUploadProps) => react_jsx_runtime.JSX.Element;
|
|
724
2283
|
|
|
725
2284
|
interface ButtonConfig extends ButtonProps {
|
|
@@ -733,6 +2292,43 @@ interface FormActionsProps {
|
|
|
733
2292
|
className?: string;
|
|
734
2293
|
showTopBorder?: boolean;
|
|
735
2294
|
}
|
|
2295
|
+
/**
|
|
2296
|
+
* FormActions component for form submission and cancellation
|
|
2297
|
+
*
|
|
2298
|
+
* A component that renders submit and cancel buttons with customizable configurations
|
|
2299
|
+
* and visibility options. Typically used at the bottom of forms.
|
|
2300
|
+
*
|
|
2301
|
+
* @component
|
|
2302
|
+
* @param {FormActionsProps} props - The form actions properties
|
|
2303
|
+
* @param {ButtonConfig} [props.submitButtonProps] - Configuration for the submit button
|
|
2304
|
+
* @param {ButtonConfig} [props.submitButtonProps.show=true] - Whether to show the submit button
|
|
2305
|
+
* @param {string} [props.submitButtonProps.title='Submit'] - Submit button label
|
|
2306
|
+
* @param {() => void} [props.submitButtonProps.onClick] - Callback when submit is clicked
|
|
2307
|
+
* @param {ButtonConfig} [props.cancelButtonProps] - Configuration for the cancel button
|
|
2308
|
+
* @param {ButtonConfig} [props.cancelButtonProps.show=true] - Whether to show the cancel button
|
|
2309
|
+
* @param {string} [props.cancelButtonProps.title='Cancel'] - Cancel button label
|
|
2310
|
+
* @param {() => void} [props.cancelButtonProps.onClick] - Callback when cancel is clicked
|
|
2311
|
+
* @param {string} [props.className] - Additional CSS classes to apply
|
|
2312
|
+
* @param {boolean} [props.showTopBorder=false] - Whether to show a top border
|
|
2313
|
+
* @returns {React.ReactElement} The rendered form actions component
|
|
2314
|
+
*
|
|
2315
|
+
* @example
|
|
2316
|
+
* ```tsx
|
|
2317
|
+
* <FormActions
|
|
2318
|
+
* submitButtonProps={{
|
|
2319
|
+
* title: 'Save Changes',
|
|
2320
|
+
* onClick: handleSubmit,
|
|
2321
|
+
* variant: 'default'
|
|
2322
|
+
* }}
|
|
2323
|
+
* cancelButtonProps={{
|
|
2324
|
+
* title: 'Discard',
|
|
2325
|
+
* onClick: handleCancel,
|
|
2326
|
+
* variant: 'ghost'
|
|
2327
|
+
* }}
|
|
2328
|
+
* showTopBorder
|
|
2329
|
+
* />
|
|
2330
|
+
* ```
|
|
2331
|
+
*/
|
|
736
2332
|
declare const FormActions: ({ submitButtonProps, cancelButtonProps, className, showTopBorder, }: FormActionsProps) => react_jsx_runtime.JSX.Element;
|
|
737
2333
|
|
|
738
2334
|
interface FormControlWrapperProps<T extends FieldValues = FieldValues> {
|
|
@@ -742,22 +2338,155 @@ interface FormControlWrapperProps<T extends FieldValues = FieldValues> {
|
|
|
742
2338
|
formActionProps?: FormActionsProps;
|
|
743
2339
|
disabled?: boolean;
|
|
744
2340
|
}
|
|
2341
|
+
/**
|
|
2342
|
+
* FormControlWrapper component for react-hook-form integration
|
|
2343
|
+
*
|
|
2344
|
+
* A wrapper component that integrates react-hook-form's Controller with form elements,
|
|
2345
|
+
* automatically handling field registration, validation, and error display.
|
|
2346
|
+
*
|
|
2347
|
+
* @component
|
|
2348
|
+
* @template T - The form values type from react-hook-form
|
|
2349
|
+
* @param {FormControlWrapperProps<T>} props - The wrapper properties
|
|
2350
|
+
* @param {Control<T>} props.control - React Hook Form control instance from useForm()
|
|
2351
|
+
* @param {ReactNode} props.children - Child form elements to be controlled
|
|
2352
|
+
* @param {string} [props.containerClassName] - Additional CSS classes for the container
|
|
2353
|
+
* @param {FormActionsProps} [props.formActionProps] - Properties for form submit/cancel buttons
|
|
2354
|
+
* @param {boolean} [props.disabled=false] - Whether all controlled fields are disabled
|
|
2355
|
+
* @returns {React.ReactElement} The rendered wrapper with controlled form elements
|
|
2356
|
+
*
|
|
2357
|
+
* @example
|
|
2358
|
+
* ```tsx
|
|
2359
|
+
* const { control, handleSubmit } = useForm();
|
|
2360
|
+
*
|
|
2361
|
+
* <FormControlWrapper
|
|
2362
|
+
* control={control}
|
|
2363
|
+
* formActionProps={{
|
|
2364
|
+
* submitButtonProps: { onClick: handleSubmit(onSubmit) }
|
|
2365
|
+
* }}
|
|
2366
|
+
* >
|
|
2367
|
+
* <TextField name="email" label="Email" />
|
|
2368
|
+
* <PasswordField name="password" label="Password" />
|
|
2369
|
+
* </FormControlWrapper>
|
|
2370
|
+
* ```
|
|
2371
|
+
*/
|
|
745
2372
|
declare function FormControlWrapper<T extends FieldValues = FieldValues>({ control, children, containerClassName, formActionProps, disabled, }: FormControlWrapperProps<T>): react_jsx_runtime.JSX.Element;
|
|
746
2373
|
|
|
747
2374
|
type FormWrapperProps = {
|
|
748
2375
|
children: ReactNode;
|
|
749
2376
|
className?: string;
|
|
750
2377
|
};
|
|
2378
|
+
/**
|
|
2379
|
+
* FormWrapper component for layout styling
|
|
2380
|
+
*
|
|
2381
|
+
* A simple wrapper component that provides default styling and spacing for form elements.
|
|
2382
|
+
* Used to maintain consistent form layout and spacing throughout the application.
|
|
2383
|
+
*
|
|
2384
|
+
* @component
|
|
2385
|
+
* @param {FormWrapperProps} props - The wrapper properties
|
|
2386
|
+
* @param {ReactNode} props.children - Child form elements
|
|
2387
|
+
* @param {string} [props.className] - Additional CSS classes to apply
|
|
2388
|
+
* @returns {React.ReactElement} The styled form wrapper container
|
|
2389
|
+
*
|
|
2390
|
+
* @example
|
|
2391
|
+
* ```tsx
|
|
2392
|
+
* <FormWrapper>
|
|
2393
|
+
* <TextField label="Name" name="name" />
|
|
2394
|
+
* <TextField label="Email" name="email" />
|
|
2395
|
+
* </FormWrapper>
|
|
2396
|
+
* ```
|
|
2397
|
+
*/
|
|
751
2398
|
declare const FormWrapper: ({ children, className }: FormWrapperProps) => react_jsx_runtime.JSX.Element;
|
|
752
2399
|
|
|
2400
|
+
/**
|
|
2401
|
+
* DeleteButton component for delete actions
|
|
2402
|
+
*
|
|
2403
|
+
* An icon button with a trash icon for triggering delete/remove actions.
|
|
2404
|
+
* Minimal styling suitable for use in tables and lists.
|
|
2405
|
+
*
|
|
2406
|
+
* @component
|
|
2407
|
+
* @param {ButtonProps} props - Button properties
|
|
2408
|
+
* @param {boolean} [props.disabled] - Whether the button is disabled
|
|
2409
|
+
* @returns {React.ReactElement} The rendered delete button
|
|
2410
|
+
*
|
|
2411
|
+
* @example
|
|
2412
|
+
* ```tsx
|
|
2413
|
+
* <DeleteButton onClick={handleDelete} />
|
|
2414
|
+
* ```
|
|
2415
|
+
*/
|
|
753
2416
|
declare function DeleteButton({ disabled, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
754
2417
|
|
|
2418
|
+
/**
|
|
2419
|
+
* EditButton component for edit actions
|
|
2420
|
+
*
|
|
2421
|
+
* An icon button with a pencil icon for triggering edit/modify actions.
|
|
2422
|
+
* Minimal styling suitable for use in tables and lists.
|
|
2423
|
+
*
|
|
2424
|
+
* @component
|
|
2425
|
+
* @param {ButtonProps} props - Button properties
|
|
2426
|
+
* @param {boolean} [props.disabled] - Whether the button is disabled
|
|
2427
|
+
* @returns {React.ReactElement} The rendered edit button
|
|
2428
|
+
*
|
|
2429
|
+
* @example
|
|
2430
|
+
* ```tsx
|
|
2431
|
+
* <EditButton onClick={handleEdit} />
|
|
2432
|
+
* ```
|
|
2433
|
+
*/
|
|
755
2434
|
declare function EditButton({ disabled, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
756
2435
|
|
|
2436
|
+
/**
|
|
2437
|
+
* RedirectButton component for navigation/external link actions
|
|
2438
|
+
*
|
|
2439
|
+
* An icon button with an external link arrow icon for redirecting users
|
|
2440
|
+
* to other pages or external URLs. Minimal styling suitable for use in tables and lists.
|
|
2441
|
+
*
|
|
2442
|
+
* @component
|
|
2443
|
+
* @param {ButtonProps} props - Button properties
|
|
2444
|
+
* @param {boolean} [props.disabled] - Whether the button is disabled
|
|
2445
|
+
* @returns {React.ReactElement} The rendered redirect button
|
|
2446
|
+
*
|
|
2447
|
+
* @example
|
|
2448
|
+
* ```tsx
|
|
2449
|
+
* <RedirectButton onClick={() => window.open(url)} />
|
|
2450
|
+
* ```
|
|
2451
|
+
*/
|
|
757
2452
|
declare function RedirectButton({ disabled, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
758
2453
|
|
|
2454
|
+
/**
|
|
2455
|
+
* ViewButton component for view/preview actions
|
|
2456
|
+
*
|
|
2457
|
+
* An icon button with an eye icon for triggering view/preview actions.
|
|
2458
|
+
* Minimal styling suitable for use in tables and lists.
|
|
2459
|
+
*
|
|
2460
|
+
* @component
|
|
2461
|
+
* @param {ButtonProps} props - Button properties
|
|
2462
|
+
* @param {boolean} [props.disabled] - Whether the button is disabled
|
|
2463
|
+
* @returns {React.ReactElement} The rendered view button
|
|
2464
|
+
*
|
|
2465
|
+
* @example
|
|
2466
|
+
* ```tsx
|
|
2467
|
+
* <ViewButton onClick={handleView} />
|
|
2468
|
+
* ```
|
|
2469
|
+
*/
|
|
759
2470
|
declare function ViewButton({ disabled, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
760
2471
|
|
|
2472
|
+
/**
|
|
2473
|
+
* IconButtons object namespace
|
|
2474
|
+
*
|
|
2475
|
+
* A collection of common action icon buttons for use in tables and lists.
|
|
2476
|
+
* All buttons are minimal icon-only buttons with consistent styling.
|
|
2477
|
+
*
|
|
2478
|
+
* @namespace IconButtons
|
|
2479
|
+
* @property {typeof DeleteButton} DeleteButton - Button with trash icon for delete actions
|
|
2480
|
+
* @property {typeof EditButton} EditButton - Button with pencil icon for edit actions
|
|
2481
|
+
* @property {typeof ViewButton} ViewButton - Button with eye icon for view/preview actions
|
|
2482
|
+
* @property {typeof RedirectButton} RedirectButton - Button with external link icon for navigation
|
|
2483
|
+
*
|
|
2484
|
+
* @example
|
|
2485
|
+
* ```tsx
|
|
2486
|
+
* <IconButtons.DeleteButton onClick={handleDelete} />
|
|
2487
|
+
* <IconButtons.EditButton onClick={handleEdit} />
|
|
2488
|
+
* ```
|
|
2489
|
+
*/
|
|
761
2490
|
declare const IconButtons: {
|
|
762
2491
|
DeleteButton: typeof DeleteButton;
|
|
763
2492
|
EditButton: typeof EditButton;
|
|
@@ -772,6 +2501,32 @@ interface LabelWrapperProps {
|
|
|
772
2501
|
children: ReactNode;
|
|
773
2502
|
containerProps?: React.HTMLAttributes<HTMLDivElement>;
|
|
774
2503
|
}
|
|
2504
|
+
/**
|
|
2505
|
+
* LabelWrapper component for form field labeling
|
|
2506
|
+
*
|
|
2507
|
+
* A wrapper component that provides consistent label styling and required field indicators.
|
|
2508
|
+
* Automatically handles string labels and custom label elements.
|
|
2509
|
+
*
|
|
2510
|
+
* @component
|
|
2511
|
+
* @param {LabelWrapperProps} props - The wrapper properties
|
|
2512
|
+
* @param {boolean} props.required - Whether the field is required (adds asterisk indicator)
|
|
2513
|
+
* @param {string} [props.name] - Name attribute for the associated label
|
|
2514
|
+
* @param {ReactNode | string} [props.label] - The label text or element
|
|
2515
|
+
* @param {ReactNode} props.children - The form element to be labeled
|
|
2516
|
+
* @param {React.HTMLAttributes<HTMLDivElement>} [props.containerProps] - Additional container attributes
|
|
2517
|
+
* @returns {React.ReactElement} The label and children wrapped in a container
|
|
2518
|
+
*
|
|
2519
|
+
* @example
|
|
2520
|
+
* ```tsx
|
|
2521
|
+
* <LabelWrapper
|
|
2522
|
+
* label="Email Address"
|
|
2523
|
+
* name="email"
|
|
2524
|
+
* required
|
|
2525
|
+
* >
|
|
2526
|
+
* <Input type="email" />
|
|
2527
|
+
* </LabelWrapper>
|
|
2528
|
+
* ```
|
|
2529
|
+
*/
|
|
775
2530
|
declare const LabelWrapper: ({ required, name, children, containerProps, label, }: LabelWrapperProps) => react_jsx_runtime.JSX.Element;
|
|
776
2531
|
|
|
777
2532
|
type MultiCheckboxProps = {
|
|
@@ -788,6 +2543,40 @@ type MultiCheckboxProps = {
|
|
|
788
2543
|
name: string;
|
|
789
2544
|
className?: string;
|
|
790
2545
|
};
|
|
2546
|
+
/**
|
|
2547
|
+
* MultiCheckBox component for multi-value checkbox selection
|
|
2548
|
+
*
|
|
2549
|
+
* A component that renders multiple checkboxes in a row or column layout,
|
|
2550
|
+
* allowing users to select multiple values from a set of options.
|
|
2551
|
+
*
|
|
2552
|
+
* @component
|
|
2553
|
+
* @param {MultiCheckboxProps} props - The checkbox group properties
|
|
2554
|
+
* @param {string} props.label - Group label text
|
|
2555
|
+
* @param {Array<{label: ReactNode, value: any}>} props.options - Available checkbox options
|
|
2556
|
+
* @param {any[]} props.values - Currently selected values
|
|
2557
|
+
* @param {(values: any[]) => void} props.onChange - Callback when selection changes
|
|
2558
|
+
* @param {string} props.name - Name attribute for the checkbox group
|
|
2559
|
+
* @param {boolean} props.required - Whether the field is required
|
|
2560
|
+
* @param {'row' | 'column'} [props.direction='column'] - Layout direction for checkboxes
|
|
2561
|
+
* @param {string} [props.className] - Additional CSS classes for the options container
|
|
2562
|
+
* @param {React.HTMLAttributes<HTMLDivElement>} [props.containerProps] - Additional container attributes
|
|
2563
|
+
* @returns {React.ReactElement} The rendered checkbox group
|
|
2564
|
+
*
|
|
2565
|
+
* @example
|
|
2566
|
+
* ```tsx
|
|
2567
|
+
* <MultiCheckBox
|
|
2568
|
+
* label="Select Features"
|
|
2569
|
+
* name="features"
|
|
2570
|
+
* values={selectedFeatures}
|
|
2571
|
+
* onChange={setSelectedFeatures}
|
|
2572
|
+
* required
|
|
2573
|
+
* options={[
|
|
2574
|
+
* { label: 'Feature A', value: 'a' },
|
|
2575
|
+
* { label: 'Feature B', value: 'b' }
|
|
2576
|
+
* ]}
|
|
2577
|
+
* />
|
|
2578
|
+
* ```
|
|
2579
|
+
*/
|
|
791
2580
|
declare const MultiCheckBox: ({ name, options, required, containerProps, label, direction, values, onChange, className, ...rest }: MultiCheckboxProps) => react_jsx_runtime.JSX.Element;
|
|
792
2581
|
|
|
793
2582
|
type MultiSelectProps = {
|
|
@@ -828,6 +2617,46 @@ type MultiSelectProps = {
|
|
|
828
2617
|
disabled?: boolean;
|
|
829
2618
|
loading?: boolean;
|
|
830
2619
|
};
|
|
2620
|
+
/**
|
|
2621
|
+
* MultiSelect component for multi-value selection
|
|
2622
|
+
*
|
|
2623
|
+
* A feature-rich multi-select component supporting both local and API-driven options,
|
|
2624
|
+
* with search, pagination, filtering, and flexible display modes.
|
|
2625
|
+
*
|
|
2626
|
+
* @component
|
|
2627
|
+
* @param {MultiSelectProps} props - The select properties
|
|
2628
|
+
* @param {Array<{label: string, subLabel?: string, value: any, icon?: ReactNode}>} [props.options] - Static options array
|
|
2629
|
+
* @param {string} [props.optionsApiEndPoint] - API endpoint for dynamic options loading
|
|
2630
|
+
* @param {any} [props.optionsApiEndpointParams] - Additional parameters for API requests
|
|
2631
|
+
* @param {AxiosInstance} [props.externalAxios] - Custom axios instance for API calls
|
|
2632
|
+
* @param {any[]} [props.value] - Currently selected values
|
|
2633
|
+
* @param {(values: any[]) => void} [props.onChange] - Callback fired when selection changes
|
|
2634
|
+
* @param {(option: any) => any} [props.getValue] - Function to extract value from option object
|
|
2635
|
+
* @param {{valueKey: string, isObjectId?: boolean, isInt?: boolean, isFloat?: boolean}} [props.dbValueProps] - Database value mapping properties
|
|
2636
|
+
* @param {{labelKey: string, subLabelKey?: string, useLabelStartCase?: boolean, useSubLabelStartCase?: boolean}} [props.dbLabelProps] - Database label mapping properties
|
|
2637
|
+
* @param {string} [props.label] - Label for the select
|
|
2638
|
+
* @param {string} [props.name] - Name attribute
|
|
2639
|
+
* @param {boolean} [props.required] - Whether the field is required
|
|
2640
|
+
* @param {boolean} [props.disabled] - Whether the select is disabled
|
|
2641
|
+
* @param {boolean} [props.loading] - Whether options are loading
|
|
2642
|
+
* @param {boolean} [props.disableClear] - Whether to hide the clear button
|
|
2643
|
+
* @param {boolean} [props.fullWidth] - Whether the select takes full width
|
|
2644
|
+
* @param {'input' | 'filter'} [props.type='input'] - Display type
|
|
2645
|
+
* @param {(event: SyntheticEvent) => void} [props.onOpen] - Callback when menu opens
|
|
2646
|
+
* @param {(event: SyntheticEvent, reason: string) => void} [props.onClose] - Callback when menu closes
|
|
2647
|
+
* @returns {React.ReactElement} The rendered multi-select component
|
|
2648
|
+
*
|
|
2649
|
+
* @example
|
|
2650
|
+
* ```tsx
|
|
2651
|
+
* <MultiSelect
|
|
2652
|
+
* label="Select Users"
|
|
2653
|
+
* value={selectedUsers}
|
|
2654
|
+
* onChange={setSelectedUsers}
|
|
2655
|
+
* options={users}
|
|
2656
|
+
* required
|
|
2657
|
+
* />
|
|
2658
|
+
* ```
|
|
2659
|
+
*/
|
|
831
2660
|
declare const MultiSelect: ({ options, optionsApiEndPoint, optionsApiEndpointParams, externalAxios, getValue, value, onChange, dbValueProps, dbLabelProps, onOpen, onClose, type, ...restProps }: MultiSelectProps) => react_jsx_runtime.JSX.Element;
|
|
832
2661
|
|
|
833
2662
|
interface OtpInputProps {
|
|
@@ -841,6 +2670,35 @@ interface OtpInputProps {
|
|
|
841
2670
|
error?: boolean;
|
|
842
2671
|
helperText?: string;
|
|
843
2672
|
}
|
|
2673
|
+
/**
|
|
2674
|
+
* OtpInput component for one-time password entry
|
|
2675
|
+
*
|
|
2676
|
+
* A component that renders a sequence of single-digit input fields for OTP entry,
|
|
2677
|
+
* with auto-focus, paste support, and keyboard navigation.
|
|
2678
|
+
*
|
|
2679
|
+
* @component
|
|
2680
|
+
* @param {OtpInputProps} props - The OTP input properties
|
|
2681
|
+
* @param {number} props.length - Number of OTP digits
|
|
2682
|
+
* @param {(otp: string) => void} props.onChangeOtp - Callback fired when OTP changes
|
|
2683
|
+
* @param {string} [props.label] - Optional label for the OTP input group
|
|
2684
|
+
* @param {string} [props.name] - Name attribute for the inputs
|
|
2685
|
+
* @param {boolean} [props.required] - Whether the field is required
|
|
2686
|
+
* @param {boolean} [props.error=false] - Whether there's a validation error
|
|
2687
|
+
* @param {string} [props.helperText] - Helper or error text to display
|
|
2688
|
+
* @param {string} [props.containerClassName] - Additional CSS classes for the input container
|
|
2689
|
+
* @param {string} [props.inputClassName] - Additional CSS classes for individual inputs
|
|
2690
|
+
* @returns {React.ReactElement} The rendered OTP input component
|
|
2691
|
+
*
|
|
2692
|
+
* @example
|
|
2693
|
+
* ```tsx
|
|
2694
|
+
* <OtpInput
|
|
2695
|
+
* length={6}
|
|
2696
|
+
* onChangeOtp={setOtp}
|
|
2697
|
+
* label="Enter Verification Code"
|
|
2698
|
+
* required
|
|
2699
|
+
* />
|
|
2700
|
+
* ```
|
|
2701
|
+
*/
|
|
844
2702
|
declare const OtpInput: ({ length, onChangeOtp, containerClassName, inputClassName, label, name, required, error, helperText, }: OtpInputProps) => react_jsx_runtime.JSX.Element;
|
|
845
2703
|
|
|
846
2704
|
type PasswordFieldProps = {
|
|
@@ -858,6 +2716,40 @@ type PasswordFieldProps = {
|
|
|
858
2716
|
className?: string;
|
|
859
2717
|
fullWidth?: boolean;
|
|
860
2718
|
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'>;
|
|
2719
|
+
/**
|
|
2720
|
+
* PasswordField component for password input
|
|
2721
|
+
*
|
|
2722
|
+
* A text input field specialized for password entry with visibility toggle,
|
|
2723
|
+
* error states, and helper text support.
|
|
2724
|
+
*
|
|
2725
|
+
* @component
|
|
2726
|
+
* @param {PasswordFieldProps} props - The password field properties
|
|
2727
|
+
* @param {string} [props.label] - Label for the field
|
|
2728
|
+
* @param {string} [props.name] - Name attribute for the input
|
|
2729
|
+
* @param {string} [props.value] - Current input value
|
|
2730
|
+
* @param {(e: React.ChangeEvent<HTMLInputElement>) => void} [props.onChange] - Callback when value changes
|
|
2731
|
+
* @param {string} [props.placeholder='Enter password'] - Placeholder text
|
|
2732
|
+
* @param {boolean} [props.required] - Whether the field is required
|
|
2733
|
+
* @param {boolean} [props.disabled] - Whether the field is disabled
|
|
2734
|
+
* @param {boolean} [props.error] - Whether there's a validation error
|
|
2735
|
+
* @param {string} [props.helperText] - Helper or error text
|
|
2736
|
+
* @param {string} [props.description] - Additional description text
|
|
2737
|
+
* @param {boolean} [props.fullWidth] - Whether the field takes full width
|
|
2738
|
+
* @param {string} [props.className] - Additional CSS classes
|
|
2739
|
+
* @param {React.HTMLAttributes<HTMLDivElement>} [props.containerProps] - Container attributes
|
|
2740
|
+
* @returns {React.ReactElement} The rendered password field component
|
|
2741
|
+
*
|
|
2742
|
+
* @example
|
|
2743
|
+
* ```tsx
|
|
2744
|
+
* <PasswordField
|
|
2745
|
+
* label="Password"
|
|
2746
|
+
* name="password"
|
|
2747
|
+
* value={password}
|
|
2748
|
+
* onChange={(e) => setPassword(e.target.value)}
|
|
2749
|
+
* required
|
|
2750
|
+
* />
|
|
2751
|
+
* ```
|
|
2752
|
+
*/
|
|
861
2753
|
declare const PasswordField: ({ name, label, value, onChange, required, containerProps, description, placeholder, disabled, error, helperText, className, fullWidth, ...rest }: PasswordFieldProps) => react_jsx_runtime.JSX.Element;
|
|
862
2754
|
|
|
863
2755
|
type RadioGroupProps = {
|
|
@@ -880,6 +2772,44 @@ type RadioGroupProps = {
|
|
|
880
2772
|
error?: boolean;
|
|
881
2773
|
helperText?: ReactNode;
|
|
882
2774
|
};
|
|
2775
|
+
/**
|
|
2776
|
+
* RadioGroup component for exclusive single-value selection
|
|
2777
|
+
*
|
|
2778
|
+
* A component that renders a group of radio buttons allowing users to select
|
|
2779
|
+
* exactly one value from a set of options, with row or column layout.
|
|
2780
|
+
*
|
|
2781
|
+
* @component
|
|
2782
|
+
* @param {RadioGroupProps} props - The radio group properties
|
|
2783
|
+
* @param {string} props.name - Name attribute for the radio group
|
|
2784
|
+
* @param {Array<{label: ReactNode, value: any, disabled?: boolean}>} props.options - Available radio options
|
|
2785
|
+
* @param {string} [props.label] - Group label text
|
|
2786
|
+
* @param {any} [props.value] - Currently selected value (controlled)
|
|
2787
|
+
* @param {any} [props.defaultValue] - Default selected value (uncontrolled)
|
|
2788
|
+
* @param {(value: any) => void} [props.onChange] - Callback when selection changes
|
|
2789
|
+
* @param {(value: string) => void} [props.onValueChange] - Alternative callback when selection changes
|
|
2790
|
+
* @param {boolean} [props.required] - Whether the field is required
|
|
2791
|
+
* @param {boolean} [props.disabled] - Whether all options are disabled
|
|
2792
|
+
* @param {'row' | 'column'} [props.direction='column'] - Layout direction for radio buttons
|
|
2793
|
+
* @param {boolean} [props.error] - Whether there's a validation error
|
|
2794
|
+
* @param {ReactNode} [props.helperText] - Helper or error text
|
|
2795
|
+
* @param {string} [props.className] - Additional CSS classes for the radio container
|
|
2796
|
+
* @param {React.HTMLAttributes<HTMLDivElement>} [props.containerProps] - Container attributes
|
|
2797
|
+
* @returns {React.ReactElement} The rendered radio group component
|
|
2798
|
+
*
|
|
2799
|
+
* @example
|
|
2800
|
+
* ```tsx
|
|
2801
|
+
* <RadioGroup
|
|
2802
|
+
* name="status"
|
|
2803
|
+
* label="Select Status"
|
|
2804
|
+
* value={status}
|
|
2805
|
+
* onChange={setStatus}
|
|
2806
|
+
* options={[
|
|
2807
|
+
* { label: 'Active', value: 'active' },
|
|
2808
|
+
* { label: 'Inactive', value: 'inactive' }
|
|
2809
|
+
* ]}
|
|
2810
|
+
* />
|
|
2811
|
+
* ```
|
|
2812
|
+
*/
|
|
883
2813
|
declare const RadioGroup: ({ label, required, options, name, containerProps, disabled, onChange, onValueChange, direction, className, error, helperText, ...rest }: RadioGroupProps) => react_jsx_runtime.JSX.Element;
|
|
884
2814
|
|
|
885
2815
|
type SearchBarProps = {
|
|
@@ -891,6 +2821,32 @@ type SearchBarProps = {
|
|
|
891
2821
|
containerClassName?: string;
|
|
892
2822
|
inputClassName?: string;
|
|
893
2823
|
} & Omit<React.ComponentProps<'input'>, 'onChange' | 'value'>;
|
|
2824
|
+
/**
|
|
2825
|
+
* SearchBar component for search input
|
|
2826
|
+
*
|
|
2827
|
+
* A search input component with built-in debouncing for efficient search operations,
|
|
2828
|
+
* featuring a search icon and customizable styling.
|
|
2829
|
+
*
|
|
2830
|
+
* @component
|
|
2831
|
+
* @param {SearchBarProps} props - The search bar properties
|
|
2832
|
+
* @param {string} [props.placeholder='Search by Name'] - Placeholder text
|
|
2833
|
+
* @param {string | ReactNode} [props.label] - Optional label above the search input
|
|
2834
|
+
* @param {string} [props.value=''] - Current search value
|
|
2835
|
+
* @param {(value: string) => void} [props.onSearch] - Callback fired when search value changes (debounced)
|
|
2836
|
+
* @param {string} [props.className] - Additional CSS classes for the input wrapper
|
|
2837
|
+
* @param {string} [props.containerClassName] - Additional CSS classes for the container
|
|
2838
|
+
* @param {string} [props.inputClassName] - Additional CSS classes for the input element
|
|
2839
|
+
* @returns {React.ReactElement} The rendered search bar component
|
|
2840
|
+
*
|
|
2841
|
+
* @example
|
|
2842
|
+
* ```tsx
|
|
2843
|
+
* <SearchBar
|
|
2844
|
+
* label="Search Users"
|
|
2845
|
+
* placeholder="Enter username..."
|
|
2846
|
+
* onSearch={handleSearch}
|
|
2847
|
+
* />
|
|
2848
|
+
* ```
|
|
2849
|
+
*/
|
|
894
2850
|
declare const SearchBar: ({ placeholder, label, value, onSearch, className, containerClassName, inputClassName, ...rest }: SearchBarProps) => react_jsx_runtime.JSX.Element;
|
|
895
2851
|
|
|
896
2852
|
type SelectProps = {
|
|
@@ -908,6 +2864,38 @@ type SelectProps = {
|
|
|
908
2864
|
fullWidth?: boolean;
|
|
909
2865
|
loading?: boolean;
|
|
910
2866
|
};
|
|
2867
|
+
/**
|
|
2868
|
+
* Select component for single-value selection
|
|
2869
|
+
*
|
|
2870
|
+
* A select dropdown component with support for colors, loading states, and flexible sizing.
|
|
2871
|
+
* Built on shadcn's Select component with additional enhancements.
|
|
2872
|
+
*
|
|
2873
|
+
* @component
|
|
2874
|
+
* @param {SelectProps} props - The select properties
|
|
2875
|
+
* @param {Array<{label: React.ReactNode, value: string | number, color?: string}>} props.options - Available select options
|
|
2876
|
+
* @param {(value: string) => void} [props.onChange] - Callback fired when selection changes
|
|
2877
|
+
* @param {string | number} [props.value] - Currently selected value (controlled)
|
|
2878
|
+
* @param {string | number} [props.defaultValue] - Default selected value (uncontrolled)
|
|
2879
|
+
* @param {string} [props.placeholder='Select an option...'] - Placeholder text when no value selected
|
|
2880
|
+
* @param {boolean} [props.disabled] - Whether the select is disabled
|
|
2881
|
+
* @param {boolean} [props.loading] - Whether options are loading
|
|
2882
|
+
* @param {boolean} [props.fullWidth] - Whether the select takes full width
|
|
2883
|
+
* @param {string} [props.className] - Additional CSS classes
|
|
2884
|
+
* @returns {React.ReactElement} The rendered select component
|
|
2885
|
+
*
|
|
2886
|
+
* @example
|
|
2887
|
+
* ```tsx
|
|
2888
|
+
* <Select
|
|
2889
|
+
* options={[
|
|
2890
|
+
* { label: 'Option 1', value: 'opt1', color: 'blue' },
|
|
2891
|
+
* { label: 'Option 2', value: 'opt2', color: 'green' }
|
|
2892
|
+
* ]}
|
|
2893
|
+
* value={selected}
|
|
2894
|
+
* onChange={setSelected}
|
|
2895
|
+
* placeholder="Choose an option"
|
|
2896
|
+
* />
|
|
2897
|
+
* ```
|
|
2898
|
+
*/
|
|
911
2899
|
declare const Select: ({ options, onChange, value, placeholder, className, defaultValue, disabled, fullWidth, loading, }: SelectProps) => react_jsx_runtime.JSX.Element;
|
|
912
2900
|
|
|
913
2901
|
type CheckboxProps = {
|
|
@@ -921,6 +2909,35 @@ type CheckboxProps = {
|
|
|
921
2909
|
disabled?: boolean;
|
|
922
2910
|
name?: string;
|
|
923
2911
|
} & Omit<React.ComponentProps<typeof CheckboxPrimitive.Root>, 'checked' | 'onChange' | 'onCheckedChange'>;
|
|
2912
|
+
/**
|
|
2913
|
+
* SingleCheckBox component for single checkbox selection
|
|
2914
|
+
*
|
|
2915
|
+
* A checkbox component with label support, validation states, and required field indicators.
|
|
2916
|
+
* Built on Radix UI's checkbox primitive.
|
|
2917
|
+
*
|
|
2918
|
+
* @component
|
|
2919
|
+
* @param {CheckboxProps} props - The checkbox properties
|
|
2920
|
+
* @param {ReactNode} props.label - Label text for the checkbox
|
|
2921
|
+
* @param {boolean} [props.checked] - Whether the checkbox is checked (controlled)
|
|
2922
|
+
* @param {(checked: boolean) => void} [props.onChange] - Callback when checked state changes
|
|
2923
|
+
* @param {string} [props.name] - Name attribute for the checkbox
|
|
2924
|
+
* @param {boolean} [props.required] - Whether the field is required
|
|
2925
|
+
* @param {boolean} [props.disabled] - Whether the checkbox is disabled
|
|
2926
|
+
* @param {string} [props.className] - Additional CSS classes for the checkbox
|
|
2927
|
+
* @param {string} [props.labelClassName] - Additional CSS classes for the label
|
|
2928
|
+
* @param {string} [props.containerClassName='flex items-center space-x-2'] - Additional CSS classes for the container
|
|
2929
|
+
* @returns {React.ReactElement} The rendered checkbox component
|
|
2930
|
+
*
|
|
2931
|
+
* @example
|
|
2932
|
+
* ```tsx
|
|
2933
|
+
* <SingleCheckBox
|
|
2934
|
+
* label="I agree to the terms"
|
|
2935
|
+
* checked={agreed}
|
|
2936
|
+
* onChange={setAgreed}
|
|
2937
|
+
* required
|
|
2938
|
+
* />
|
|
2939
|
+
* ```
|
|
2940
|
+
*/
|
|
924
2941
|
declare const SingleCheckBox: ({ checked, label, onChange, required, className, labelClassName, containerClassName, disabled, name, ...rest }: CheckboxProps) => react_jsx_runtime.JSX.Element;
|
|
925
2942
|
|
|
926
2943
|
type SingleSelectProps = {
|
|
@@ -961,6 +2978,46 @@ type SingleSelectProps = {
|
|
|
961
2978
|
disabled?: boolean;
|
|
962
2979
|
loading?: boolean;
|
|
963
2980
|
};
|
|
2981
|
+
/**
|
|
2982
|
+
* SingleSelect component for single-value selection
|
|
2983
|
+
*
|
|
2984
|
+
* A feature-rich single-select component supporting both local and API-driven options,
|
|
2985
|
+
* with search, pagination, filtering, and flexible display modes.
|
|
2986
|
+
*
|
|
2987
|
+
* @component
|
|
2988
|
+
* @param {SingleSelectProps} props - The select properties
|
|
2989
|
+
* @param {Array<{label: string, subLabel?: string, value: any, icon?: ReactNode}>} [props.options] - Static options array
|
|
2990
|
+
* @param {string} [props.optionsApiEndPoint] - API endpoint for dynamic options loading
|
|
2991
|
+
* @param {any} [props.optionsApiEndpointParams] - Additional parameters for API requests
|
|
2992
|
+
* @param {AxiosInstance} [props.externalAxios] - Custom axios instance for API calls
|
|
2993
|
+
* @param {any} [props.value] - Currently selected value
|
|
2994
|
+
* @param {(value: any) => void} [props.onChange] - Callback fired when selection changes
|
|
2995
|
+
* @param {(option: any) => any} [props.getValue] - Function to extract value from option object
|
|
2996
|
+
* @param {{valueKey: string, isObjectId?: boolean, isInt?: boolean, isFloat?: boolean}} [props.dbValueProps] - Database value mapping properties
|
|
2997
|
+
* @param {{labelKey: string, subLabelKey?: string, useLabelStartCase?: boolean, useSubLabelStartCase?: boolean}} [props.dbLabelProps] - Database label mapping properties
|
|
2998
|
+
* @param {string} [props.label] - Label for the select
|
|
2999
|
+
* @param {string} [props.name] - Name attribute
|
|
3000
|
+
* @param {boolean} [props.required] - Whether the field is required
|
|
3001
|
+
* @param {boolean} [props.disabled] - Whether the select is disabled
|
|
3002
|
+
* @param {boolean} [props.loading] - Whether options are loading
|
|
3003
|
+
* @param {boolean} [props.disableClear] - Whether to hide the clear button
|
|
3004
|
+
* @param {boolean} [props.fullWidth] - Whether the select takes full width
|
|
3005
|
+
* @param {'input' | 'filter'} [props.type='input'] - Display type
|
|
3006
|
+
* @param {(event: SyntheticEvent) => void} [props.onOpen] - Callback when menu opens
|
|
3007
|
+
* @param {(event: SyntheticEvent, reason: string) => void} [props.onClose] - Callback when menu closes
|
|
3008
|
+
* @returns {React.ReactElement} The rendered single-select component
|
|
3009
|
+
*
|
|
3010
|
+
* @example
|
|
3011
|
+
* ```tsx
|
|
3012
|
+
* <SingleSelect
|
|
3013
|
+
* label="Select User"
|
|
3014
|
+
* value={selectedUser}
|
|
3015
|
+
* onChange={setSelectedUser}
|
|
3016
|
+
* options={users}
|
|
3017
|
+
* required
|
|
3018
|
+
* />
|
|
3019
|
+
* ```
|
|
3020
|
+
*/
|
|
964
3021
|
declare const SingleSelect: ({ options, optionsApiEndPoint, optionsApiEndpointParams, externalAxios, getValue, value, onChange, dbValueProps, dbLabelProps, onOpen, onClose, type, ...restProps }: SingleSelectProps) => react_jsx_runtime.JSX.Element;
|
|
965
3022
|
|
|
966
3023
|
declare function Switch$1({ className, ...props }: React$1.ComponentProps<typeof SwitchPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
@@ -968,6 +3025,29 @@ declare function Switch$1({ className, ...props }: React$1.ComponentProps<typeof
|
|
|
968
3025
|
interface SwitchProps extends React$1.ComponentPropsWithoutRef<typeof Switch$1> {
|
|
969
3026
|
label?: string;
|
|
970
3027
|
}
|
|
3028
|
+
/**
|
|
3029
|
+
* Switch component for boolean toggle input
|
|
3030
|
+
*
|
|
3031
|
+
* A toggle switch component with optional label support, built on shadcn's Switch.
|
|
3032
|
+
* Renders a label beside the switch if provided.
|
|
3033
|
+
*
|
|
3034
|
+
* @component
|
|
3035
|
+
* @param {SwitchProps} props - The switch properties
|
|
3036
|
+
* @param {string} [props.label] - Optional label text to display next to the switch
|
|
3037
|
+
* @param {boolean} [props.checked] - Whether the switch is checked
|
|
3038
|
+
* @param {(checked: boolean) => void} [props.onCheckedChange] - Callback when switch state changes
|
|
3039
|
+
* @param {boolean} [props.disabled] - Whether the switch is disabled
|
|
3040
|
+
* @returns {React.ReactElement} The rendered switch component
|
|
3041
|
+
*
|
|
3042
|
+
* @example
|
|
3043
|
+
* ```tsx
|
|
3044
|
+
* <Switch
|
|
3045
|
+
* label="Enable notifications"
|
|
3046
|
+
* checked={enabled}
|
|
3047
|
+
* onCheckedChange={setEnabled}
|
|
3048
|
+
* />
|
|
3049
|
+
* ```
|
|
3050
|
+
*/
|
|
971
3051
|
declare const Switch: React$1.ForwardRefExoticComponent<SwitchProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
972
3052
|
|
|
973
3053
|
declare function Textarea$1({ className, ...props }: React$1.ComponentProps<'textarea'>): react_jsx_runtime.JSX.Element;
|
|
@@ -981,6 +3061,42 @@ type TextareaProps = {
|
|
|
981
3061
|
error?: boolean;
|
|
982
3062
|
helperText?: React$1.ReactNode;
|
|
983
3063
|
} & React$1.ComponentProps<typeof Textarea$1>;
|
|
3064
|
+
/**
|
|
3065
|
+
* Textarea component for multi-line text input
|
|
3066
|
+
*
|
|
3067
|
+
* A multi-line text input field with label support, validation states,
|
|
3068
|
+
* helper/error text, and optional description.
|
|
3069
|
+
*
|
|
3070
|
+
* @component
|
|
3071
|
+
* @param {TextareaProps} props - The textarea properties
|
|
3072
|
+
* @param {React.ReactNode | string} [props.label] - Label for the field
|
|
3073
|
+
* @param {string} [props.name] - Name attribute for the textarea
|
|
3074
|
+
* @param {string} [props.value] - Current input value
|
|
3075
|
+
* @param {(e: React.ChangeEvent<HTMLTextAreaElement>) => void} [props.onChange] - Callback when value changes
|
|
3076
|
+
* @param {string} [props.placeholder] - Placeholder text
|
|
3077
|
+
* @param {number} [props.rows] - Number of visible rows
|
|
3078
|
+
* @param {boolean} [props.required] - Whether the field is required
|
|
3079
|
+
* @param {boolean} [props.disabled] - Whether the field is disabled
|
|
3080
|
+
* @param {boolean} [props.error] - Whether there's a validation error
|
|
3081
|
+
* @param {React.ReactNode} [props.helperText] - Helper or error text
|
|
3082
|
+
* @param {string} [props.description] - Additional description text
|
|
3083
|
+
* @param {boolean} [props.fullWidth] - Whether the field takes full width
|
|
3084
|
+
* @param {string} [props.className] - Additional CSS classes
|
|
3085
|
+
* @param {React.HTMLAttributes<HTMLDivElement>} [props.containerProps] - Container attributes
|
|
3086
|
+
* @returns {React.ReactElement} The rendered textarea component
|
|
3087
|
+
*
|
|
3088
|
+
* @example
|
|
3089
|
+
* ```tsx
|
|
3090
|
+
* <Textarea
|
|
3091
|
+
* label="Comments"
|
|
3092
|
+
* name="comments"
|
|
3093
|
+
* value={comments}
|
|
3094
|
+
* onChange={(e) => setComments(e.target.value)}
|
|
3095
|
+
* placeholder="Enter your comments..."
|
|
3096
|
+
* rows={4}
|
|
3097
|
+
* />
|
|
3098
|
+
* ```
|
|
3099
|
+
*/
|
|
984
3100
|
declare const Textarea: ({ name, label, value, onChange, required, containerProps, description, fullWidth, className, error, helperText, ...rest }: TextareaProps) => react_jsx_runtime.JSX.Element;
|
|
985
3101
|
|
|
986
3102
|
declare function Input({ className, type, ...props }: React$1.ComponentProps<"input">): react_jsx_runtime.JSX.Element;
|
|
@@ -994,6 +3110,41 @@ type TextFieldProps = {
|
|
|
994
3110
|
error?: boolean;
|
|
995
3111
|
helperText?: React$1.ReactNode;
|
|
996
3112
|
} & React$1.ComponentProps<typeof Input>;
|
|
3113
|
+
/**
|
|
3114
|
+
* TextField component for text input
|
|
3115
|
+
*
|
|
3116
|
+
* A general-purpose text input field with label support, validation states,
|
|
3117
|
+
* helper/error text, and optional description.
|
|
3118
|
+
*
|
|
3119
|
+
* @component
|
|
3120
|
+
* @param {TextFieldProps} props - The text field properties
|
|
3121
|
+
* @param {React.ReactNode | string} [props.label] - Label for the field
|
|
3122
|
+
* @param {string} [props.name] - Name attribute for the input
|
|
3123
|
+
* @param {string} [props.value] - Current input value
|
|
3124
|
+
* @param {(e: React.ChangeEvent<HTMLInputElement>) => void} [props.onChange] - Callback when value changes
|
|
3125
|
+
* @param {string} [props.placeholder] - Placeholder text
|
|
3126
|
+
* @param {boolean} [props.required] - Whether the field is required
|
|
3127
|
+
* @param {boolean} [props.disabled] - Whether the field is disabled
|
|
3128
|
+
* @param {boolean} [props.error] - Whether there's a validation error
|
|
3129
|
+
* @param {React.ReactNode} [props.helperText] - Helper or error text
|
|
3130
|
+
* @param {string} [props.description] - Additional description text
|
|
3131
|
+
* @param {boolean} [props.fullWidth] - Whether the field takes full width
|
|
3132
|
+
* @param {string} [props.className] - Additional CSS classes
|
|
3133
|
+
* @param {React.HTMLAttributes<HTMLDivElement>} [props.containerProps] - Container attributes
|
|
3134
|
+
* @returns {React.ReactElement} The rendered text field component
|
|
3135
|
+
*
|
|
3136
|
+
* @example
|
|
3137
|
+
* ```tsx
|
|
3138
|
+
* <TextField
|
|
3139
|
+
* label="Username"
|
|
3140
|
+
* name="username"
|
|
3141
|
+
* value={username}
|
|
3142
|
+
* onChange={(e) => setUsername(e.target.value)}
|
|
3143
|
+
* placeholder="Enter your username"
|
|
3144
|
+
* required
|
|
3145
|
+
* />
|
|
3146
|
+
* ```
|
|
3147
|
+
*/
|
|
997
3148
|
declare const TextField: ({ name, label, value, onChange, required, containerProps, description, fullWidth, className, error, helperText, ...rest }: TextFieldProps) => react_jsx_runtime.JSX.Element;
|
|
998
3149
|
|
|
999
3150
|
interface SideMenuItemProps {
|
|
@@ -1077,6 +3228,40 @@ interface UserProfilePopupProps {
|
|
|
1077
3228
|
/**Persistant Side bar collapsed - boolean */
|
|
1078
3229
|
collapsed?: boolean;
|
|
1079
3230
|
}
|
|
3231
|
+
/**
|
|
3232
|
+
* UserProfilePopup Component
|
|
3233
|
+
*
|
|
3234
|
+
* User profile dropdown menu component displayed in the sidebar footer. Shows user avatar/initials,
|
|
3235
|
+
* and provides a menu with Account section, optional Active Devices, custom profile actions, and Logout.
|
|
3236
|
+
* Automatically adapts layout when sidebar is collapsed (centered alignment, avatar only).
|
|
3237
|
+
*
|
|
3238
|
+
* @param {string} userFullName - User's full name (required, used for avatar text and display)
|
|
3239
|
+
* @param {string} [email=''] - User's email address (shown in account section)
|
|
3240
|
+
* @param {React.ReactNode[]} [profileActions=[]] - Custom menu items to include in the dropdown
|
|
3241
|
+
* @param {() => void} [onLogout] - Callback handler when user clicks logout
|
|
3242
|
+
* @param {string} [profileUrl] - URL to user's profile image (uses initials fallback if not provided)
|
|
3243
|
+
* @param {string} [avatarClassName=''] - Additional CSS classes for the avatar component
|
|
3244
|
+
* @param {boolean} [showActiveDevices=false] - Whether to show the "Active Devices" menu item
|
|
3245
|
+
* @param {() => void} [onActiveDevicesClick] - Callback handler when user clicks active devices
|
|
3246
|
+
* @param {() => void} [onAccountClick] - Callback handler when user clicks the account section
|
|
3247
|
+
* @param {boolean} [collapsed] - Whether the sidebar is in collapsed state (affects layout)
|
|
3248
|
+
*
|
|
3249
|
+
* @returns {React.ReactElement} A dropdown menu anchored to user avatar with profile options
|
|
3250
|
+
*
|
|
3251
|
+
* @example
|
|
3252
|
+
* ```tsx
|
|
3253
|
+
* <UserProfilePopup
|
|
3254
|
+
* userFullName="Jane Smith"
|
|
3255
|
+
* email="jane@example.com"
|
|
3256
|
+
* profileUrl="/avatar.jpg"
|
|
3257
|
+
* showActiveDevices={true}
|
|
3258
|
+
* onLogout={handleLogout}
|
|
3259
|
+
* onAccountClick={navigateToSettings}
|
|
3260
|
+
* onActiveDevicesClick={showDevices}
|
|
3261
|
+
* collapsed={false}
|
|
3262
|
+
* />
|
|
3263
|
+
* ```
|
|
3264
|
+
*/
|
|
1080
3265
|
declare const UserProfilePopup: React__default.FC<UserProfilePopupProps>;
|
|
1081
3266
|
|
|
1082
3267
|
interface HelpDocsAction {
|
|
@@ -1095,7 +3280,7 @@ interface AppLayoutProps {
|
|
|
1095
3280
|
/** Navigation menu items */
|
|
1096
3281
|
menu: SideMenuItemProps[];
|
|
1097
3282
|
/**User profile parameters */
|
|
1098
|
-
userProfileParams
|
|
3283
|
+
userProfileParams?: UserProfilePopupProps;
|
|
1099
3284
|
/** Switchers section customization - receives collapsed state */
|
|
1100
3285
|
actions?: ReactNode | ((params: {
|
|
1101
3286
|
collapsed: boolean;
|
|
@@ -1110,6 +3295,38 @@ interface AppLayoutProps {
|
|
|
1110
3295
|
initialCollapsed?: boolean;
|
|
1111
3296
|
}
|
|
1112
3297
|
|
|
3298
|
+
/**
|
|
3299
|
+
* AppLayout Component
|
|
3300
|
+
*
|
|
3301
|
+
* Main layout component that provides a persistent sidebar navigation structure with responsive behavior.
|
|
3302
|
+
* Automatically collapses on small screens and wraps content in a SidebarProvider for state management.
|
|
3303
|
+
* Includes a floating help docs button in the bottom-right corner.
|
|
3304
|
+
*
|
|
3305
|
+
* @param {React.ReactNode} children - Main content to render inside the layout
|
|
3306
|
+
* @param {SideMenuItemProps[]} menu - Navigation menu items for the sidebar
|
|
3307
|
+
* @param {ReactNode | ((params: { collapsed: boolean }) => ReactNode)} [actions] - Optional action elements or function that receives collapsed state
|
|
3308
|
+
* @param {string} [mainContainerClassName=''] - Additional CSS classes for the main content container
|
|
3309
|
+
* @param {HelpDocsConfig} [helpDocsConfig] - Configuration for context-based help documentation
|
|
3310
|
+
* @param {boolean} [initialCollapsed] - Initial state of sidebar collapse (auto-determined on small screens)
|
|
3311
|
+
* @param {UserProfilePopupProps} [userProfileParams] - Configuration for user profile popup/menu
|
|
3312
|
+
*
|
|
3313
|
+
* @returns {React.ReactElement} The complete app layout with sidebar and main content area
|
|
3314
|
+
*
|
|
3315
|
+
* @example
|
|
3316
|
+
* ```tsx
|
|
3317
|
+
* <AppLayout
|
|
3318
|
+
* menu={menuItems}
|
|
3319
|
+
* userProfileParams={{
|
|
3320
|
+
* userFullName: "John Doe",
|
|
3321
|
+
* email: "john@example.com",
|
|
3322
|
+
* onLogout: handleLogout
|
|
3323
|
+
* }}
|
|
3324
|
+
* actions={<ActionButtons />}
|
|
3325
|
+
* >
|
|
3326
|
+
* <YourContent />
|
|
3327
|
+
* </AppLayout>
|
|
3328
|
+
* ```
|
|
3329
|
+
*/
|
|
1113
3330
|
declare const AppLayout: React__default.FC<AppLayoutProps>;
|
|
1114
3331
|
|
|
1115
3332
|
interface SidebarContextType {
|
|
@@ -1121,13 +3338,77 @@ interface SidebarProviderProps {
|
|
|
1121
3338
|
children: React__default.ReactNode;
|
|
1122
3339
|
initialCollapsed?: boolean;
|
|
1123
3340
|
}
|
|
3341
|
+
/**
|
|
3342
|
+
* SidebarProvider Component
|
|
3343
|
+
*
|
|
3344
|
+
* React Context provider that manages global sidebar collapse state and provides methods
|
|
3345
|
+
* to toggle and set the collapse state. Wraps the application or specific layout sections
|
|
3346
|
+
* to enable sidebar state management across the component tree.
|
|
3347
|
+
*
|
|
3348
|
+
* @param {React.ReactNode} children - Child components that will have access to sidebar context
|
|
3349
|
+
* @param {boolean} [initialCollapsed=false] - Initial collapsed state of the sidebar
|
|
3350
|
+
*
|
|
3351
|
+
* @returns {React.ReactElement} Context provider wrapping children with sidebar state
|
|
3352
|
+
*
|
|
3353
|
+
* @example
|
|
3354
|
+
* ```tsx
|
|
3355
|
+
* <SidebarProvider initialCollapsed={isMobile}>
|
|
3356
|
+
* <AppLayout>
|
|
3357
|
+
* <Content />
|
|
3358
|
+
* </AppLayout>
|
|
3359
|
+
* </SidebarProvider>
|
|
3360
|
+
* ```
|
|
3361
|
+
*/
|
|
1124
3362
|
declare const SidebarProvider: React__default.FC<SidebarProviderProps>;
|
|
3363
|
+
/**
|
|
3364
|
+
* useSidebar Hook
|
|
3365
|
+
*
|
|
3366
|
+
* Custom React hook to access the sidebar context state and methods.
|
|
3367
|
+
* Must be used within a SidebarProvider component, otherwise it throws an error.
|
|
3368
|
+
*
|
|
3369
|
+
* @returns {{
|
|
3370
|
+
* collapsed: boolean;
|
|
3371
|
+
* toggleSidebar: () => void;
|
|
3372
|
+
* setCollapsed: (collapsed: boolean) => void;
|
|
3373
|
+
* }} Object containing sidebar state and methods to control it
|
|
3374
|
+
*
|
|
3375
|
+
* @throws {Error} If used outside of SidebarProvider
|
|
3376
|
+
*
|
|
3377
|
+
* @example
|
|
3378
|
+
* ```tsx
|
|
3379
|
+
* function MyComponent() {
|
|
3380
|
+
* const { collapsed, toggleSidebar, setCollapsed } = useSidebar();
|
|
3381
|
+
*
|
|
3382
|
+
* return (
|
|
3383
|
+
* <button onClick={toggleSidebar}>
|
|
3384
|
+
* {collapsed ? 'Expand' : 'Collapse'}
|
|
3385
|
+
* </button>
|
|
3386
|
+
* );
|
|
3387
|
+
* }
|
|
3388
|
+
* ```
|
|
3389
|
+
*/
|
|
1125
3390
|
declare const useSidebar: () => SidebarContextType;
|
|
1126
3391
|
|
|
1127
3392
|
interface MenuToggleButtonProps {
|
|
1128
3393
|
/** Custom className */
|
|
1129
3394
|
className?: string;
|
|
1130
3395
|
}
|
|
3396
|
+
/**
|
|
3397
|
+
* MenuToggleButton Component
|
|
3398
|
+
*
|
|
3399
|
+
* Mobile-only button that toggles the sidebar visibility. This button is hidden on desktop screens
|
|
3400
|
+
* (above 768px width) using the Tailwind media query. Useful for including in page headers
|
|
3401
|
+
* on mobile devices to control sidebar drawer visibility.
|
|
3402
|
+
*
|
|
3403
|
+
* @param {string} [className=''] - Additional CSS classes to apply to the button
|
|
3404
|
+
*
|
|
3405
|
+
* @returns {React.ReactElement} A menu toggle button (empty fragment on desktop)
|
|
3406
|
+
*
|
|
3407
|
+
* @example
|
|
3408
|
+
* ```tsx
|
|
3409
|
+
* <MenuToggleButton className="ml-4" />
|
|
3410
|
+
* ```
|
|
3411
|
+
*/
|
|
1131
3412
|
declare const MenuToggleButton: React__default.FC<MenuToggleButtonProps>;
|
|
1132
3413
|
|
|
1133
3414
|
declare function Sheet({ ...props }: React$1.ComponentProps<typeof SheetPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
@@ -1145,6 +3426,25 @@ interface PageContentProps {
|
|
|
1145
3426
|
children: ReactNode;
|
|
1146
3427
|
className?: string;
|
|
1147
3428
|
}
|
|
3429
|
+
/**
|
|
3430
|
+
* PageContent Component
|
|
3431
|
+
*
|
|
3432
|
+
* Main content area wrapper that provides responsive padding, scrolling behavior, and custom scrollbar styling.
|
|
3433
|
+
* Automatically adjusts height based on screen size to account for page header and other UI elements.
|
|
3434
|
+
* Includes thin scrollbar styling using Tailwind's scrollbar utilities.
|
|
3435
|
+
*
|
|
3436
|
+
* @param {React.ReactNode} children - Content to render inside the page content area
|
|
3437
|
+
* @param {string} [className=''] - Additional CSS classes to apply to the container
|
|
3438
|
+
*
|
|
3439
|
+
* @returns {React.ReactElement} A scrollable content container with responsive height and styling
|
|
3440
|
+
*
|
|
3441
|
+
* @example
|
|
3442
|
+
* ```tsx
|
|
3443
|
+
* <PageContent className="bg-white">
|
|
3444
|
+
* <YourPageContent />
|
|
3445
|
+
* </PageContent>
|
|
3446
|
+
* ```
|
|
3447
|
+
*/
|
|
1148
3448
|
declare const PageContent: ({ children, className }: PageContentProps) => react_jsx_runtime.JSX.Element;
|
|
1149
3449
|
|
|
1150
3450
|
interface PageHeaderProps {
|
|
@@ -1167,13 +3467,92 @@ interface PageHeaderProps {
|
|
|
1167
3467
|
}) => ReactNode[]);
|
|
1168
3468
|
};
|
|
1169
3469
|
}
|
|
3470
|
+
/**
|
|
3471
|
+
* PageHeader Component
|
|
3472
|
+
*
|
|
3473
|
+
* Header component for page content that displays breadcrumbs and action bar with search,
|
|
3474
|
+
* filter, add button, and custom action menus. Supports Redux integration for maintaining
|
|
3475
|
+
* search and filter state across re-renders. Responsive design with mobile optimization.
|
|
3476
|
+
*
|
|
3477
|
+
* @param {string} [uniqueId] - Optional unique identifier for Redux state management of this header
|
|
3478
|
+
* @param {number} pathTrimCount - Number of path segments to trim from breadcrumb
|
|
3479
|
+
* @param {React.ReactElement} [breadcrumbAction] - Optional element to display next to breadcrumbs
|
|
3480
|
+
* @param {SearchBarProps & { uniqueId?: string; searchText?: string }} [searchBarProps] - Configuration for search bar including placeholder
|
|
3481
|
+
* @param {{
|
|
3482
|
+
* label?: string;
|
|
3483
|
+
* startIcon?: React.ReactNode;
|
|
3484
|
+
* components: React.ReactElement[];
|
|
3485
|
+
* }} [filterButtonProps] - Configuration for filter dropdown with filter components
|
|
3486
|
+
* @param {{
|
|
3487
|
+
* label?: string;
|
|
3488
|
+
* onClick: () => void;
|
|
3489
|
+
* }} [addButtonProps] - Configuration for add/create button
|
|
3490
|
+
* @param {{
|
|
3491
|
+
* menu: React.ReactNode[] | ((props: { close: () => void }) => React.ReactNode[]);
|
|
3492
|
+
* }} [actionProps] - Configuration for additional action menu
|
|
3493
|
+
*
|
|
3494
|
+
* @returns {React.ReactElement} A responsive header with breadcrumbs and action controls
|
|
3495
|
+
*
|
|
3496
|
+
* @example
|
|
3497
|
+
* ```tsx
|
|
3498
|
+
* <PageHeader
|
|
3499
|
+
* uniqueId="users-list"
|
|
3500
|
+
* pathTrimCount={1}
|
|
3501
|
+
* searchBarProps={{
|
|
3502
|
+
* placeholder: "Search users...",
|
|
3503
|
+
* uniqueId: "users-list"
|
|
3504
|
+
* }}
|
|
3505
|
+
* filterButtonProps={{
|
|
3506
|
+
* label: "Filters",
|
|
3507
|
+
* components: [<StatusFilter />, <RoleFilter />]
|
|
3508
|
+
* }}
|
|
3509
|
+
* addButtonProps={{
|
|
3510
|
+
* label: "Add User",
|
|
3511
|
+
* onClick: handleAddUser
|
|
3512
|
+
* }}
|
|
3513
|
+
* />
|
|
3514
|
+
* ```
|
|
3515
|
+
*/
|
|
1170
3516
|
declare const PageHeader: ({ uniqueId, pathTrimCount, breadcrumbAction, searchBarProps, filterButtonProps, addButtonProps, actionProps, }: PageHeaderProps) => react_jsx_runtime.JSX.Element;
|
|
1171
3517
|
|
|
3518
|
+
/**
|
|
3519
|
+
* Props for the Breadcrumbs component
|
|
3520
|
+
*/
|
|
1172
3521
|
type BreadcrumbsProps = {
|
|
3522
|
+
/** Number of path segments to trim from the beginning of the current URL path */
|
|
1173
3523
|
pathTrimCount: number;
|
|
3524
|
+
/** Optional CSS class names for the container element */
|
|
1174
3525
|
containerClassName?: string;
|
|
3526
|
+
/** Optional React element to render as an action button/component on the right side */
|
|
1175
3527
|
action?: ReactElement;
|
|
1176
3528
|
};
|
|
3529
|
+
/**
|
|
3530
|
+
* Breadcrumbs component that displays a navigation breadcrumb trail based on the current URL path.
|
|
3531
|
+
*
|
|
3532
|
+
* Automatically generates breadcrumb items from the URL pathname and displays them with navigation links.
|
|
3533
|
+
* When there are more than 2 breadcrumb items, it shows the first item, a dropdown menu with middle items,
|
|
3534
|
+
* and the last item to save space.
|
|
3535
|
+
*
|
|
3536
|
+
* @component
|
|
3537
|
+
* @param {BreadcrumbsProps} props - The component props
|
|
3538
|
+
* @param {number} props.pathTrimCount - Number of path segments to trim from the beginning of the URL path
|
|
3539
|
+
* @param {string} [props.containerClassName] - Optional CSS class names to apply to the container div
|
|
3540
|
+
* @param {ReactElement} [props.action] - Optional React element displayed on the right side of the breadcrumb
|
|
3541
|
+
*
|
|
3542
|
+
* @returns {React.ReactElement} A div containing the breadcrumb navigation component with a menu toggle button and breadcrumb list
|
|
3543
|
+
*
|
|
3544
|
+
* @example
|
|
3545
|
+
* // Basic usage
|
|
3546
|
+
* <Breadcrumbs pathTrimCount={1} />
|
|
3547
|
+
*
|
|
3548
|
+
* @example
|
|
3549
|
+
* // With custom action button
|
|
3550
|
+
* <Breadcrumbs
|
|
3551
|
+
* pathTrimCount={2}
|
|
3552
|
+
* action={<button>Export</button>}
|
|
3553
|
+
* containerClassName="bg-gray-50 border-b"
|
|
3554
|
+
* />
|
|
3555
|
+
*/
|
|
1177
3556
|
declare const Breadcrumbs: ({ pathTrimCount, containerClassName, action, }: BreadcrumbsProps) => react_jsx_runtime.JSX.Element;
|
|
1178
3557
|
|
|
1179
3558
|
interface CalendarEvent {
|
|
@@ -1265,6 +3644,69 @@ interface CalendarProps {
|
|
|
1265
3644
|
selectConstraint?: any;
|
|
1266
3645
|
}
|
|
1267
3646
|
|
|
3647
|
+
/**
|
|
3648
|
+
* Calendar component that provides a fully-featured calendar interface with FullCalendar integration.
|
|
3649
|
+
*
|
|
3650
|
+
* This component displays an interactive calendar with support for events, drag-and-drop,
|
|
3651
|
+
* resizing, and various view modes (month, week, day). It offers extensive customization options
|
|
3652
|
+
* for appearance, behavior, and event handling.
|
|
3653
|
+
*
|
|
3654
|
+
* @component
|
|
3655
|
+
* @param {CalendarProps} props - The component props
|
|
3656
|
+
* @param {CalendarEvent[]} [props.events] - Array of calendar events to display. Defaults to empty array
|
|
3657
|
+
* @param {(eventInfo: CalendarEventClickInfo) => void} [props.onEventClick] - Callback fired when an event is clicked
|
|
3658
|
+
* @param {(dropInfo: CalendarEventDropInfo) => void} [props.onEventDrop] - Callback fired when an event is drag-dropped
|
|
3659
|
+
* @param {(resizeInfo: CalendarEventResizeInfo) => void} [props.onEventResize] - Callback fired when an event is resized
|
|
3660
|
+
* @param {(dateInfo: CalendarDateClickInfo) => void} [props.onDateClick] - Callback fired when a date is clicked
|
|
3661
|
+
* @param {(selectInfo: CalendarDateSelectInfo) => void} [props.onDateSelect] - Callback fired when a date range is selected
|
|
3662
|
+
* @param {(events: EventApi[]) => void} [props.onEventsSet] - Callback fired when the list of events changes
|
|
3663
|
+
* @param {CalendarView} [props.initialView='dayGridMonth'] - Initial view mode to display (dayGridMonth, timeGridWeek, timeGridDay, listWeek)
|
|
3664
|
+
* @param {CalendarView[]} [props.views] - Array of available view modes to show in view switcher
|
|
3665
|
+
* @param {CalendarHeaderToolbar | boolean} [props.headerToolbar] - Header toolbar configuration object or false to hide it
|
|
3666
|
+
* @param {boolean} [props.editable=false] - Whether events can be dragged/resized to modify dates
|
|
3667
|
+
* @param {boolean} [props.selectable=false] - Whether users can select date ranges by clicking and dragging
|
|
3668
|
+
* @param {boolean} [props.selectMirror=true] - Whether to show a visual mirror while selecting date ranges
|
|
3669
|
+
* @param {boolean} [props.eventResizable=false] - Whether events can be resized by dragging their edges
|
|
3670
|
+
* @param {boolean} [props.eventDraggable=false] - Whether events can be dragged to change their dates
|
|
3671
|
+
* @param {boolean | number} [props.dayMaxEvents=true] - Maximum number of events to show per day (true for auto, false for unlimited)
|
|
3672
|
+
* @param {string | number} [props.height='auto'] - Height of the calendar (CSS string or number in pixels)
|
|
3673
|
+
* @param {number} [props.aspectRatio] - Aspect ratio for the calendar dimensions
|
|
3674
|
+
* @param {React.HTMLAttributes<HTMLDivElement>} [props.containerProps] - Additional HTML attributes for the container div
|
|
3675
|
+
* @param {string} [props.locale='en'] - Locale/language code for calendar text (e.g., 'en', 'es', 'fr')
|
|
3676
|
+
* @param {string} [props.timezone='local'] - Timezone for displaying dates ('local' or standard timezone identifier)
|
|
3677
|
+
* @param {0 | 1 | 2 | 3 | 4 | 5 | 6} [props.firstDayOfWeek=0] - First day of the week (0=Sunday, 1=Monday, etc.)
|
|
3678
|
+
* @param {(eventInfo: any) => React.ReactNode} [props.eventContent] - Custom render function for event content
|
|
3679
|
+
* @param {(dayInfo: any) => React.ReactNode} [props.dayCellContent] - Custom render function for day cell content
|
|
3680
|
+
* @param {boolean} [props.showNavigationButtons=true] - Whether to show previous/next navigation buttons
|
|
3681
|
+
* @param {boolean} [props.showViewSwitcher=true] - Whether to show view mode selector buttons
|
|
3682
|
+
* @param {boolean} [props.showToday=true] - Whether to show the "today" button
|
|
3683
|
+
* @param {boolean} [props.weekends=true] - Whether to display weekend days
|
|
3684
|
+
* @param {any} [props.businessHours] - Business hours configuration
|
|
3685
|
+
* @param {any} [props.eventConstraint] - Constraint rules for event dragging
|
|
3686
|
+
* @param {any} [props.selectConstraint] - Constraint rules for date selection
|
|
3687
|
+
*
|
|
3688
|
+
* @returns {React.ReactElement} A div container with the FullCalendar component
|
|
3689
|
+
*
|
|
3690
|
+
* @example
|
|
3691
|
+
* // Basic calendar with events
|
|
3692
|
+
* <Calendar
|
|
3693
|
+
* events={[
|
|
3694
|
+
* { id: '1', title: 'Meeting', start: '2024-01-15' }
|
|
3695
|
+
* ]}
|
|
3696
|
+
* onEventClick={(info) => console.log(info.event.title)}
|
|
3697
|
+
* />
|
|
3698
|
+
*
|
|
3699
|
+
* @example
|
|
3700
|
+
* // Editable calendar with custom height
|
|
3701
|
+
* <Calendar
|
|
3702
|
+
* events={events}
|
|
3703
|
+
* editable={true}
|
|
3704
|
+
* eventDraggable={true}
|
|
3705
|
+
* eventResizable={true}
|
|
3706
|
+
* height={600}
|
|
3707
|
+
* onEventDrop={(info) => updateEventDate(info)}
|
|
3708
|
+
* />
|
|
3709
|
+
*/
|
|
1268
3710
|
declare const Calendar: React__default.FC<CalendarProps>;
|
|
1269
3711
|
|
|
1270
3712
|
/**
|
|
@@ -1322,50 +3764,233 @@ declare const validateEvent: (event: Partial<CalendarEvent>) => {
|
|
|
1322
3764
|
errors: string[];
|
|
1323
3765
|
};
|
|
1324
3766
|
|
|
3767
|
+
/**
|
|
3768
|
+
* Type definition for the kind of confirmation dialog
|
|
3769
|
+
*/
|
|
1325
3770
|
type ConfirmDialogType = 'confirm' | 'delete';
|
|
3771
|
+
/**
|
|
3772
|
+
* Available max-width sizes for the dialog
|
|
3773
|
+
*/
|
|
1326
3774
|
type MaxWidthSize$2 = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
3775
|
+
/**
|
|
3776
|
+
* Props for the ConfirmDialog component
|
|
3777
|
+
*/
|
|
1327
3778
|
type ConfirmDialogProps = {
|
|
3779
|
+
/** Whether the dialog is open and visible */
|
|
1328
3780
|
isOpen: boolean;
|
|
3781
|
+
/** Title text displayed in the dialog header */
|
|
1329
3782
|
title: string;
|
|
3783
|
+
/** Message/description text displayed in the dialog */
|
|
1330
3784
|
message: string;
|
|
3785
|
+
/** Callback function triggered when the user confirms the action */
|
|
1331
3786
|
onConfirm: () => void;
|
|
3787
|
+
/** Callback function triggered when the user cancels the dialog */
|
|
1332
3788
|
onCancel: () => void;
|
|
3789
|
+
/** Type of confirmation dialog - 'confirm' for general confirmations, 'delete' for destructive actions */
|
|
1333
3790
|
type: ConfirmDialogType;
|
|
3791
|
+
/** Custom text for the confirm button. Defaults to 'Confirm Delete' for delete type, 'Confirm' otherwise */
|
|
1334
3792
|
confirmButtonText?: string;
|
|
3793
|
+
/** Custom text for the cancel button. Defaults to 'Cancel' */
|
|
1335
3794
|
cancelButtonText?: string;
|
|
3795
|
+
/** Max-width size class of the dialog. Defaults to 'xl' */
|
|
1336
3796
|
maxWidth?: MaxWidthSize$2;
|
|
1337
3797
|
};
|
|
3798
|
+
/**
|
|
3799
|
+
* ConfirmDialog component that displays a modal confirmation dialog with custom title, message, and action buttons.
|
|
3800
|
+
*
|
|
3801
|
+
* This component provides a user-friendly confirmation interface with support for two types:
|
|
3802
|
+
* 'confirm' for general confirmations and 'delete' for destructive operations. The dialog
|
|
3803
|
+
* includes an animated GIF icon that changes based on the dialog type.
|
|
3804
|
+
*
|
|
3805
|
+
* @component
|
|
3806
|
+
* @param {ConfirmDialogProps} props - The component props
|
|
3807
|
+
* @param {boolean} props.isOpen - Whether the dialog is currently open
|
|
3808
|
+
* @param {string} props.title - Dialog title text
|
|
3809
|
+
* @param {string} props.message - Dialog message/body text
|
|
3810
|
+
* @param {() => void} props.onConfirm - Callback fired when the confirm button is clicked
|
|
3811
|
+
* @param {() => void} props.onCancel - Callback fired when the cancel button is clicked or dialog is closed
|
|
3812
|
+
* @param {ConfirmDialogType} props.type - Dialog type ('confirm' or 'delete') which affects styling and default text
|
|
3813
|
+
* @param {string} [props.confirmButtonText] - Custom text for confirm button
|
|
3814
|
+
* @param {string} [props.cancelButtonText] - Custom text for cancel button
|
|
3815
|
+
* @param {MaxWidthSize} [props.maxWidth='xl'] - Maximum width of the dialog
|
|
3816
|
+
*
|
|
3817
|
+
* @returns {React.ReactElement} A Dialog component with header, message, and action buttons
|
|
3818
|
+
*
|
|
3819
|
+
* @example
|
|
3820
|
+
* // Basic confirmation dialog
|
|
3821
|
+
* <ConfirmDialog
|
|
3822
|
+
* isOpen={isOpen}
|
|
3823
|
+
* type="confirm"
|
|
3824
|
+
* title="Confirm Action"
|
|
3825
|
+
* message="Are you sure you want to proceed?"
|
|
3826
|
+
* onConfirm={() => handleAction()}
|
|
3827
|
+
* onCancel={() => setIsOpen(false)}
|
|
3828
|
+
* />
|
|
3829
|
+
*
|
|
3830
|
+
* @example
|
|
3831
|
+
* // Delete confirmation dialog with custom buttons
|
|
3832
|
+
* <ConfirmDialog
|
|
3833
|
+
* isOpen={deleteOpen}
|
|
3834
|
+
* type="delete"
|
|
3835
|
+
* title="Delete Item"
|
|
3836
|
+
* message="This action cannot be undone. All data will be permanently deleted."
|
|
3837
|
+
* confirmButtonText="Yes, Delete"
|
|
3838
|
+
* cancelButtonText="Keep Item"
|
|
3839
|
+
* onConfirm={() => deleteItem()}
|
|
3840
|
+
* onCancel={() => setDeleteOpen(false)}
|
|
3841
|
+
* maxWidth="md"
|
|
3842
|
+
* />
|
|
3843
|
+
*/
|
|
1338
3844
|
declare const ConfirmDialog: React.FC<ConfirmDialogProps>;
|
|
1339
3845
|
|
|
3846
|
+
/**
|
|
3847
|
+
* Available max-width sizes for the dialog
|
|
3848
|
+
*/
|
|
1340
3849
|
type MaxWidthSize$1 = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
3850
|
+
/**
|
|
3851
|
+
* Props for the Dialog component
|
|
3852
|
+
*/
|
|
1341
3853
|
type DialogProps = {
|
|
3854
|
+
/** Function that renders the dialog content. Receives close callback to allow closing from within content */
|
|
1342
3855
|
content: (props: {
|
|
1343
3856
|
close: () => void;
|
|
1344
3857
|
}) => ReactNode;
|
|
3858
|
+
/** Optional title displayed in the dialog header */
|
|
1345
3859
|
title?: string | undefined;
|
|
3860
|
+
/** Callback function triggered when the dialog is closed */
|
|
1346
3861
|
onClose: () => void;
|
|
3862
|
+
/** Whether the dialog is open and visible */
|
|
1347
3863
|
open: boolean;
|
|
3864
|
+
/** Optional CSS class names for the dialog content element */
|
|
1348
3865
|
className?: string;
|
|
3866
|
+
/** Whether to show the close button in the dialog header. Defaults to true */
|
|
1349
3867
|
showCloseButton?: boolean;
|
|
3868
|
+
/** Max-width size class of the dialog. Defaults to 'lg' */
|
|
1350
3869
|
maxWidth?: MaxWidthSize$1;
|
|
1351
3870
|
};
|
|
3871
|
+
/**
|
|
3872
|
+
* Dialog component that wraps shadcn/ui Dialog with additional features and sensible defaults.
|
|
3873
|
+
*
|
|
3874
|
+
* This component provides a controlled dialog with optional header, configurable width,
|
|
3875
|
+
* and flexible content rendering with a close callback for self-closing from within the content.
|
|
3876
|
+
*
|
|
3877
|
+
* @component
|
|
3878
|
+
* @param {DialogProps} props - The component props
|
|
3879
|
+
* @param {(props: { close: () => void }) => ReactNode} props.content - Render function for dialog content
|
|
3880
|
+
* @param {() => void} props.onClose - Callback fired when the dialog is closed
|
|
3881
|
+
* @param {boolean} props.open - Whether the dialog is currently open
|
|
3882
|
+
* @param {string} [props.title] - Optional dialog title
|
|
3883
|
+
* @param {string} [props.className] - Optional CSS classes for the dialog content
|
|
3884
|
+
* @param {boolean} [props.showCloseButton=true] - Whether to show the close button
|
|
3885
|
+
* @param {MaxWidthSize} [props.maxWidth='lg'] - Maximum width of the dialog
|
|
3886
|
+
*
|
|
3887
|
+
* @returns {React.ReactElement} A Dialog component with optional header and flexible content
|
|
3888
|
+
*
|
|
3889
|
+
* @example
|
|
3890
|
+
* // Simple dialog with title
|
|
3891
|
+
* <Dialog
|
|
3892
|
+
* open={isOpen}
|
|
3893
|
+
* title="Delete Item"
|
|
3894
|
+
* onClose={() => setIsOpen(false)}
|
|
3895
|
+
* content={({ close }) => (
|
|
3896
|
+
* <div>
|
|
3897
|
+
* <p>Are you sure?</p>
|
|
3898
|
+
* <button onClick={close}>Cancel</button>
|
|
3899
|
+
* </div>
|
|
3900
|
+
* )}
|
|
3901
|
+
* />
|
|
3902
|
+
*
|
|
3903
|
+
* @example
|
|
3904
|
+
* // Dialog without title and custom width
|
|
3905
|
+
* <Dialog
|
|
3906
|
+
* open={showDialog}
|
|
3907
|
+
* onClose={handleClose}
|
|
3908
|
+
* maxWidth="sm"
|
|
3909
|
+
* showCloseButton={false}
|
|
3910
|
+
* content={({ close }) => <FormComponent onSubmit={close} />}
|
|
3911
|
+
* />
|
|
3912
|
+
*/
|
|
1352
3913
|
declare const Dialog: ({ onClose, title, content, open, className, showCloseButton, maxWidth, }: DialogProps) => react_jsx_runtime.JSX.Element;
|
|
1353
3914
|
|
|
3915
|
+
/**
|
|
3916
|
+
* Available max-width sizes for the dialog
|
|
3917
|
+
*/
|
|
1354
3918
|
type MaxWidthSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
3919
|
+
/**
|
|
3920
|
+
* Props for the DialogButton component
|
|
3921
|
+
*/
|
|
1355
3922
|
type DialogButtonProps = {
|
|
3923
|
+
/** Function that renders the dialog trigger element. Receives open callback to open the dialog */
|
|
1356
3924
|
anchor: (props: {
|
|
1357
3925
|
open: () => void;
|
|
1358
3926
|
}) => ReactNode;
|
|
3927
|
+
/** Optional callback fired when the dialog opens */
|
|
1359
3928
|
onDialogOpen?: () => void;
|
|
3929
|
+
/** Optional callback fired when the dialog closes */
|
|
1360
3930
|
onDialogClose?: () => void;
|
|
3931
|
+
/** Function that renders the dialog content. Receives close callback to close the dialog */
|
|
1361
3932
|
content: (props: {
|
|
1362
3933
|
close: () => void;
|
|
1363
3934
|
}) => ReactNode;
|
|
3935
|
+
/** Optional title displayed in the dialog header */
|
|
1364
3936
|
title?: string | undefined;
|
|
3937
|
+
/** Optional CSS class names for the dialog content element */
|
|
1365
3938
|
className?: string;
|
|
3939
|
+
/** Whether to show the close button in the dialog header. Defaults to true */
|
|
1366
3940
|
showCloseButton?: boolean;
|
|
3941
|
+
/** Max-width size class of the dialog. Defaults to 'lg' */
|
|
1367
3942
|
maxWidth?: MaxWidthSize;
|
|
1368
3943
|
};
|
|
3944
|
+
/**
|
|
3945
|
+
* DialogButton component that combines a trigger element and a dialog in a single component.
|
|
3946
|
+
*
|
|
3947
|
+
* This is a convenient wrapper that manages its own open/close state and provides
|
|
3948
|
+
* a clean API for rendering both the trigger (anchor) and the dialog content.
|
|
3949
|
+
* It's useful when you want to bind a button or other trigger element with a dialog
|
|
3950
|
+
* without managing state at the parent level.
|
|
3951
|
+
*
|
|
3952
|
+
* @component
|
|
3953
|
+
* @param {DialogButtonProps} props - The component props
|
|
3954
|
+
* @param {(props: { open: () => void }) => ReactNode} props.anchor - Render function for the trigger element
|
|
3955
|
+
* @param {(props: { close: () => void }) => ReactNode} props.content - Render function for dialog content
|
|
3956
|
+
* @param {string} [props.title] - Optional dialog title
|
|
3957
|
+
* @param {() => void} [props.onDialogOpen] - Optional callback fired when the dialog opens
|
|
3958
|
+
* @param {() => void} [props.onDialogClose] - Optional callback fired when the dialog closes
|
|
3959
|
+
* @param {string} [props.className] - Optional CSS classes for the dialog content
|
|
3960
|
+
* @param {boolean} [props.showCloseButton=true] - Whether to show the close button
|
|
3961
|
+
* @param {MaxWidthSize} [props.maxWidth='lg'] - Maximum width of the dialog
|
|
3962
|
+
*
|
|
3963
|
+
* @returns {React.ReactElement} A fragment containing the anchor element and the Dialog
|
|
3964
|
+
*
|
|
3965
|
+
* @example
|
|
3966
|
+
* // Button that opens a dialog with a form
|
|
3967
|
+
* <DialogButton
|
|
3968
|
+
* anchor={({ open }) => <button onClick={open}>Edit Profile</button>}
|
|
3969
|
+
* title="Edit Profile"
|
|
3970
|
+
* content={({ close }) => (
|
|
3971
|
+
* <form onSubmit={(e) => { handleSubmit(e); close(); }}>
|
|
3972
|
+
* <input type="text" placeholder="Name" />
|
|
3973
|
+
* <button type="submit">Save</button>
|
|
3974
|
+
* </form>
|
|
3975
|
+
* )}
|
|
3976
|
+
* />
|
|
3977
|
+
*
|
|
3978
|
+
* @example
|
|
3979
|
+
* // With callbacks and custom styling
|
|
3980
|
+
* <DialogButton
|
|
3981
|
+
* anchor={({ open }) => <IconButton icon={<EditIcon />} onClick={open} />}
|
|
3982
|
+
* title="Delete Item"
|
|
3983
|
+
* maxWidth="sm"
|
|
3984
|
+
* onDialogOpen={() => console.log('Dialog opened')}
|
|
3985
|
+
* onDialogClose={() => console.log('Dialog closed')}
|
|
3986
|
+
* content={({ close }) => (
|
|
3987
|
+
* <div>
|
|
3988
|
+
* <p>Are you sure?</p>
|
|
3989
|
+
* <button onClick={close}>Cancel</button>
|
|
3990
|
+
* </div>
|
|
3991
|
+
* )}
|
|
3992
|
+
* />
|
|
3993
|
+
*/
|
|
1369
3994
|
declare const DialogButton: ({ onDialogClose, onDialogOpen, anchor, content, title, className, showCloseButton, maxWidth, }: DialogButtonProps) => react_jsx_runtime.JSX.Element;
|
|
1370
3995
|
|
|
1371
3996
|
declare const DropDownButton: (props: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -1379,25 +4004,98 @@ declare const DropDownIcon: ({ icon, handleClick, }: {
|
|
|
1379
4004
|
handleClick: any;
|
|
1380
4005
|
}) => react_jsx_runtime.JSX.Element;
|
|
1381
4006
|
|
|
4007
|
+
/**
|
|
4008
|
+
* Props for the DropdownMenu component
|
|
4009
|
+
*/
|
|
1382
4010
|
type DropdownMenuProps = {
|
|
4011
|
+
/** Function that renders the dropdown trigger element. Receives open callback to open the dropdown */
|
|
1383
4012
|
anchor: (props: {
|
|
1384
4013
|
open: (e: any) => void;
|
|
1385
4014
|
}) => ReactNode;
|
|
4015
|
+
/** Array of menu items or a function that returns menu items. Can be static or dynamic */
|
|
1386
4016
|
menu?: ReactNode[] | ((props: {
|
|
1387
4017
|
close: () => void;
|
|
1388
4018
|
}) => ReactNode[]);
|
|
4019
|
+
/** Custom slot for rendering the entire menu content. Takes precedence over menu when useMenuSlot is true */
|
|
1389
4020
|
menuSlot?: (props: {
|
|
1390
4021
|
close: () => void;
|
|
1391
4022
|
}) => ReactNode;
|
|
4023
|
+
/** Whether to use menuSlot instead of menu items. Defaults to false */
|
|
1392
4024
|
useMenuSlot?: boolean;
|
|
4025
|
+
/** Optional CSS class names for the menu content container */
|
|
1393
4026
|
menuContentClassName?: string;
|
|
4027
|
+
/** Optional CSS class names for the menu list wrapper div */
|
|
1394
4028
|
menuListClassName?: string;
|
|
4029
|
+
/** Optional React element or component to render above the menu items */
|
|
1395
4030
|
menuHeader?: ReactNode;
|
|
4031
|
+
/** Optional React element or component to render below the menu items */
|
|
1396
4032
|
menuFooter?: ReactNode;
|
|
4033
|
+
/** Optional async callback fired when the menu is scrolled, useful for infinite scroll */
|
|
1397
4034
|
handleMenuScroll?: (event: any) => Promise<void>;
|
|
4035
|
+
/** Horizontal alignment of the dropdown menu relative to the trigger. Defaults to 'end' */
|
|
1398
4036
|
align?: 'start' | 'center' | 'end';
|
|
4037
|
+
/** Vertical placement of the dropdown menu relative to the trigger. Defaults to 'bottom' */
|
|
1399
4038
|
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
1400
4039
|
};
|
|
4040
|
+
/**
|
|
4041
|
+
* DropdownMenu component that provides a flexible dropdown menu with trigger element and menu content.
|
|
4042
|
+
*
|
|
4043
|
+
* This component wraps shadcn/ui's DropdownMenu and adds support for dynamic menu items,
|
|
4044
|
+
* header/footer sections, and custom scroll handling. It manages its own open/close state
|
|
4045
|
+
* and provides a convenient API for both static and dynamic menu items.
|
|
4046
|
+
*
|
|
4047
|
+
* @component
|
|
4048
|
+
* @param {DropdownMenuProps} props - The component props
|
|
4049
|
+
* @param {(props: { open: (e: any) => void }) => ReactNode} props.anchor - Render function for the trigger element
|
|
4050
|
+
* @param {ReactNode[] | ((props: { close: () => void }) => ReactNode[])} [props.menu] - Menu items array or function
|
|
4051
|
+
* @param {(props: { close: () => void }) => ReactNode} [props.menuSlot] - Custom menu content renderer
|
|
4052
|
+
* @param {boolean} [props.useMenuSlot=false] - Whether to use menuSlot instead of menu items
|
|
4053
|
+
* @param {string} [props.menuContentClassName] - CSS classes for the menu content container
|
|
4054
|
+
* @param {string} [props.menuListClassName] - CSS classes for the menu list wrapper
|
|
4055
|
+
* @param {ReactNode} [props.menuHeader] - Content to display above the menu items
|
|
4056
|
+
* @param {ReactNode} [props.menuFooter] - Content to display below the menu items
|
|
4057
|
+
* @param {(event: any) => Promise<void>} [props.handleMenuScroll] - Async callback for scroll events
|
|
4058
|
+
* @param {'start' | 'center' | 'end'} [props.align='end'] - Horizontal alignment of the menu
|
|
4059
|
+
* @param {'top' | 'right' | 'bottom' | 'left'} [props.side='bottom'] - Vertical placement of the menu
|
|
4060
|
+
*
|
|
4061
|
+
* @returns {React.ReactElement} A dropdown menu component with trigger and content
|
|
4062
|
+
*
|
|
4063
|
+
* @example
|
|
4064
|
+
* // Simple dropdown with static menu items
|
|
4065
|
+
* <DropdownMenu
|
|
4066
|
+
* anchor={({ open }) => <button onClick={open}>Actions</button>}
|
|
4067
|
+
* menu={[
|
|
4068
|
+
* <button key="1">Edit</button>,
|
|
4069
|
+
* <button key="2">Delete</button>,
|
|
4070
|
+
* ]}
|
|
4071
|
+
* />
|
|
4072
|
+
*
|
|
4073
|
+
* @example
|
|
4074
|
+
* // Dropdown with dynamic menu items and header
|
|
4075
|
+
* <DropdownMenu
|
|
4076
|
+
* anchor={({ open }) => <IconButton icon={<MoreIcon />} onClick={open} />}
|
|
4077
|
+
* menu={({ close }) => items.map(item => (
|
|
4078
|
+
* <button key={item.id} onClick={() => { selectItem(item); close(); }}>
|
|
4079
|
+
* {item.name}
|
|
4080
|
+
* </button>
|
|
4081
|
+
* ))}
|
|
4082
|
+
* menuHeader={<span className="px-2 py-1 text-sm font-semibold">Options</span>}
|
|
4083
|
+
* align="start"
|
|
4084
|
+
* />
|
|
4085
|
+
*
|
|
4086
|
+
* @example
|
|
4087
|
+
* // Dropdown with infinite scroll
|
|
4088
|
+
* <DropdownMenu
|
|
4089
|
+
* anchor={({ open }) => <button onClick={open}>Load More</button>}
|
|
4090
|
+
* menu={filteredItems}
|
|
4091
|
+
* menuFooter={<span className="text-xs text-muted">Showing {items.length} items</span>}
|
|
4092
|
+
* handleMenuScroll={async (e) => {
|
|
4093
|
+
* if (isNearBottom(e)) {
|
|
4094
|
+
* await loadMoreItems();
|
|
4095
|
+
* }
|
|
4096
|
+
* }}
|
|
4097
|
+
* />
|
|
4098
|
+
*/
|
|
1401
4099
|
declare const DropdownMenu: ({ menu, menuSlot, useMenuSlot, menuHeader, menuFooter, menuContentClassName, menuListClassName, anchor, handleMenuScroll, align, side, }: DropdownMenuProps) => react_jsx_runtime.JSX.Element;
|
|
1402
4100
|
|
|
1403
4101
|
type DropdownMenuItemProps = {
|
|
@@ -1410,14 +4108,68 @@ type DropdownMenuItemProps = {
|
|
|
1410
4108
|
};
|
|
1411
4109
|
declare const DropdownMenuItem: ({ icon, label, onClick, className, disabled, variant, }: DropdownMenuItemProps) => react_jsx_runtime.JSX.Element;
|
|
1412
4110
|
|
|
4111
|
+
/**
|
|
4112
|
+
* Props for the PreviewFiles component
|
|
4113
|
+
*/
|
|
1413
4114
|
type PreviewFilesProps = {
|
|
4115
|
+
/** Array of files or single file to display. Can be File objects or string URLs. Accepts null for empty state */
|
|
1414
4116
|
files: File[] | File | string[] | string | null;
|
|
4117
|
+
/** Optional label text displayed above the file list */
|
|
1415
4118
|
label?: string;
|
|
4119
|
+
/** Optional callback fired when files are deleted. Receives remaining files array and deleted file */
|
|
1416
4120
|
onChange?: (newFiles: File[], deletedFile: File) => void;
|
|
4121
|
+
/** Whether to show download button for each file. Defaults to false */
|
|
1417
4122
|
showDownload?: boolean;
|
|
4123
|
+
/** Whether to hide the delete button for each file. Defaults to false */
|
|
1418
4124
|
hideDelete?: boolean;
|
|
4125
|
+
/** Optional CSS class names for the container element */
|
|
1419
4126
|
className?: string;
|
|
1420
4127
|
};
|
|
4128
|
+
/**
|
|
4129
|
+
* PreviewFiles component that displays a list of files with preview, download, and delete functionality.
|
|
4130
|
+
*
|
|
4131
|
+
* This component renders file items in a grid/list format with icons, sizes, and action buttons.
|
|
4132
|
+
* It supports both File objects and URL strings, automatically fetching file information for remote files.
|
|
4133
|
+
* Users can preview files by clicking on them, download them, and delete them from the list.
|
|
4134
|
+
*
|
|
4135
|
+
* @component
|
|
4136
|
+
* @param {PreviewFilesProps} props - The component props
|
|
4137
|
+
* @param {File[] | File | string[] | string | null} props.files - Files to display (File objects or URLs)
|
|
4138
|
+
* @param {string} [props.label] - Optional label text displayed above the file list
|
|
4139
|
+
* @param {(newFiles: File[], deletedFile: File) => void} [props.onChange] - Callback when files are deleted
|
|
4140
|
+
* @param {boolean} [props.showDownload=false] - Whether to show download button
|
|
4141
|
+
* @param {boolean} [props.hideDelete=false] - Whether to hide delete button
|
|
4142
|
+
* @param {string} [props.className] - Optional CSS classes for the container
|
|
4143
|
+
*
|
|
4144
|
+
* @returns {React.ReactElement | null} A div containing the file list, or null if no files
|
|
4145
|
+
*
|
|
4146
|
+
* @example
|
|
4147
|
+
* // Display File objects with delete capability
|
|
4148
|
+
* <PreviewFiles
|
|
4149
|
+
* files={uploadedFiles}
|
|
4150
|
+
* label="Uploaded Files"
|
|
4151
|
+
* onChange={(newFiles, deleted) => setFiles(newFiles)}
|
|
4152
|
+
* />
|
|
4153
|
+
*
|
|
4154
|
+
* @example
|
|
4155
|
+
* // Display remote files with download button
|
|
4156
|
+
* <PreviewFiles
|
|
4157
|
+
* files={['https://example.com/file1.pdf', 'https://example.com/file2.docx']}
|
|
4158
|
+
* label="Documents"
|
|
4159
|
+
* showDownload={true}
|
|
4160
|
+
* hideDelete={true}
|
|
4161
|
+
* />
|
|
4162
|
+
*
|
|
4163
|
+
* @example
|
|
4164
|
+
* // Mixed files with custom styling
|
|
4165
|
+
* <PreviewFiles
|
|
4166
|
+
* files={[file1, 'https://example.com/file.pdf']}
|
|
4167
|
+
* label="Files"
|
|
4168
|
+
* showDownload={true}
|
|
4169
|
+
* onChange={handleFileDelete}
|
|
4170
|
+
* className="bg-gray-50 p-4 rounded-lg"
|
|
4171
|
+
* />
|
|
4172
|
+
*/
|
|
1421
4173
|
declare const PreviewFiles: ({ files, label, onChange, showDownload, hideDelete, className, }: PreviewFilesProps) => react_jsx_runtime.JSX.Element;
|
|
1422
4174
|
|
|
1423
4175
|
declare const HorizontalStepper: React__default.FC<StepperVariantProps>;
|
|
@@ -1425,69 +4177,258 @@ declare const HorizontalStepper: React__default.FC<StepperVariantProps>;
|
|
|
1425
4177
|
declare const VerticalStepper: React__default.FC<StepperVariantProps>;
|
|
1426
4178
|
|
|
1427
4179
|
/**
|
|
1428
|
-
* Interface for individual step items
|
|
4180
|
+
* Interface for individual step items in the stepper
|
|
1429
4181
|
*/
|
|
1430
4182
|
interface StepItem {
|
|
1431
|
-
/** The label text for
|
|
4183
|
+
/** The label text displayed for this step */
|
|
1432
4184
|
label: string;
|
|
1433
|
-
/** Optional description text shown below the label */
|
|
4185
|
+
/** Optional description text shown below the label for additional context */
|
|
1434
4186
|
description?: string;
|
|
1435
4187
|
}
|
|
1436
4188
|
/**
|
|
1437
|
-
* Props for the Stepper
|
|
4189
|
+
* Props for the Stepper variant components (HorizontalStepper and VerticalStepper)
|
|
1438
4190
|
*/
|
|
1439
4191
|
interface StepperVariantProps {
|
|
1440
|
-
/** Current active step index (0-based) */
|
|
4192
|
+
/** Current active step index (0-based). Determines which step is highlighted */
|
|
1441
4193
|
activeStep: number;
|
|
1442
4194
|
/** Array of step items with labels and optional descriptions */
|
|
1443
4195
|
steps: StepItem[];
|
|
1444
|
-
/** Additional
|
|
4196
|
+
/** Additional CSS class names for the stepper container element */
|
|
1445
4197
|
containerClassName?: string;
|
|
1446
|
-
/** Callback function
|
|
4198
|
+
/** Callback function fired when a step is clicked. Receives the step index (0-based) as parameter */
|
|
1447
4199
|
onStepClick?: (stepIndex: number) => void;
|
|
1448
|
-
/** Whether to allow
|
|
4200
|
+
/** Whether to allow users to navigate by clicking on steps. Defaults to true */
|
|
1449
4201
|
allowNavigation?: boolean;
|
|
1450
4202
|
}
|
|
4203
|
+
/**
|
|
4204
|
+
* Props for the Stepper component
|
|
4205
|
+
*/
|
|
1451
4206
|
type StepperProps = StepperVariantProps & {
|
|
1452
|
-
/** Orientation of the stepper - horizontal
|
|
4207
|
+
/** Orientation of the stepper layout - 'horizontal' displays steps left-to-right, 'vertical' displays top-to-bottom. Defaults to 'horizontal' */
|
|
1453
4208
|
orientation?: 'vertical' | 'horizontal';
|
|
1454
4209
|
};
|
|
1455
4210
|
/**
|
|
1456
|
-
*
|
|
4211
|
+
* Stepper component that displays a progress indicator with multiple steps.
|
|
4212
|
+
*
|
|
4213
|
+
* This is a wrapper component that renders either HorizontalStepper or VerticalStepper
|
|
4214
|
+
* based on the orientation prop. It provides a visual representation of progress through
|
|
4215
|
+
* a sequence of steps, with optional click handlers for step navigation.
|
|
4216
|
+
*
|
|
4217
|
+
* @component
|
|
4218
|
+
* @param {StepperProps} props - The component props
|
|
4219
|
+
* @param {number} props.activeStep - Index of the currently active step (0-based)
|
|
4220
|
+
* @param {StepItem[]} props.steps - Array of steps with label and optional description
|
|
4221
|
+
* @param {'horizontal' | 'vertical'} [props.orientation='horizontal'] - Layout orientation
|
|
4222
|
+
* @param {string} [props.containerClassName] - Optional CSS classes for the container
|
|
4223
|
+
* @param {(stepIndex: number) => void} [props.onStepClick] - Callback when a step is clicked
|
|
4224
|
+
* @param {boolean} [props.allowNavigation=true] - Whether clicking on steps navigates between them
|
|
4225
|
+
*
|
|
4226
|
+
* @returns {React.ReactElement} A HorizontalStepper or VerticalStepper component
|
|
4227
|
+
*
|
|
4228
|
+
* @example
|
|
4229
|
+
* // Horizontal stepper (default)
|
|
4230
|
+
* <Stepper
|
|
4231
|
+
* activeStep={1}
|
|
4232
|
+
* steps={[
|
|
4233
|
+
* { label: 'Step 1', description: 'Enter details' },
|
|
4234
|
+
* { label: 'Step 2', description: 'Confirm' },
|
|
4235
|
+
* { label: 'Step 3', description: 'Complete' }
|
|
4236
|
+
* ]}
|
|
4237
|
+
* onStepClick={(index) => setActiveStep(index)}
|
|
4238
|
+
* />
|
|
4239
|
+
*
|
|
4240
|
+
* @example
|
|
4241
|
+
* // Vertical stepper with custom styling
|
|
4242
|
+
* <Stepper
|
|
4243
|
+
* orientation="vertical"
|
|
4244
|
+
* activeStep={2}
|
|
4245
|
+
* steps={[
|
|
4246
|
+
* { label: 'Personal Info' },
|
|
4247
|
+
* { label: 'Address' },
|
|
4248
|
+
* { label: 'Payment' },
|
|
4249
|
+
* { label: 'Review' }
|
|
4250
|
+
* ]}
|
|
4251
|
+
* containerClassName="bg-gray-50 p-6 rounded"
|
|
4252
|
+
* allowNavigation={false}
|
|
4253
|
+
* />
|
|
1457
4254
|
*/
|
|
1458
4255
|
declare const Stepper: React__default.FC<StepperProps>;
|
|
1459
4256
|
|
|
4257
|
+
/**
|
|
4258
|
+
* Configuration for an individual tab in TabsContainer
|
|
4259
|
+
*/
|
|
1460
4260
|
interface CustomTabProps {
|
|
4261
|
+
/** Unique identifier for the tab. Can be string or number */
|
|
1461
4262
|
key: string | number;
|
|
4263
|
+
/** Display label or React element for the tab trigger */
|
|
1462
4264
|
label: React.ReactNode;
|
|
4265
|
+
/** React component or element to render when this tab is active */
|
|
1463
4266
|
component: React.ReactNode;
|
|
4267
|
+
/** Whether to show a highlight indicator (dot) on the tab trigger. Defaults to false */
|
|
1464
4268
|
highlight?: boolean;
|
|
4269
|
+
/** Whether the tab is disabled and cannot be selected. Defaults to false */
|
|
1465
4270
|
disabled?: boolean;
|
|
4271
|
+
/** Optional icon or React element to display before the label */
|
|
1466
4272
|
icon?: React.ReactNode;
|
|
1467
4273
|
}
|
|
4274
|
+
/**
|
|
4275
|
+
* Props for the TabsContainer component
|
|
4276
|
+
*/
|
|
1468
4277
|
interface TabsContainerProps {
|
|
4278
|
+
/** Array of tab configurations with labels, content, and optional metadata */
|
|
1469
4279
|
tabs: CustomTabProps[];
|
|
4280
|
+
/** Optional callback fired when a tab is selected. Receives the tab key as parameter */
|
|
1470
4281
|
onTabChange?: (tabKey: string) => void;
|
|
4282
|
+
/** Index of the tab to show initially. Defaults to 0 (first tab) */
|
|
1471
4283
|
currentTabIndex?: number;
|
|
4284
|
+
/** Optional CSS class names for the Tabs root element */
|
|
1472
4285
|
className?: string;
|
|
4286
|
+
/** Optional CSS class names for the TabsList container */
|
|
1473
4287
|
tabsListClassName?: string;
|
|
4288
|
+
/** Optional CSS class names for each TabsTrigger element */
|
|
1474
4289
|
tabsTriggerClassName?: string;
|
|
4290
|
+
/** Layout variant - 'fixed' uses viewport height, 'dynamic' uses content height. Defaults to 'fixed' */
|
|
1475
4291
|
variant?: 'fixed' | 'dynamic';
|
|
1476
4292
|
}
|
|
4293
|
+
/**
|
|
4294
|
+
* TabsContainer component that displays tabbed content with a tab list and content area.
|
|
4295
|
+
*
|
|
4296
|
+
* This component provides a responsive tab interface with support for icons, highlights,
|
|
4297
|
+
* disabled states, and two layout modes (fixed height for viewport or dynamic height for content).
|
|
4298
|
+
* It manages tab selection state and provides callbacks for external state management.
|
|
4299
|
+
*
|
|
4300
|
+
* @component
|
|
4301
|
+
* @param {TabsContainerProps} props - The component props
|
|
4302
|
+
* @param {CustomTabProps[]} props.tabs - Array of tab configurations
|
|
4303
|
+
* @param {(tabKey: string) => void} [props.onTabChange] - Callback when a tab is selected
|
|
4304
|
+
* @param {number} [props.currentTabIndex=0] - Initially active tab index
|
|
4305
|
+
* @param {string} [props.className] - CSS classes for the Tabs root
|
|
4306
|
+
* @param {string} [props.tabsListClassName] - CSS classes for the TabsList
|
|
4307
|
+
* @param {string} [props.tabsTriggerClassName] - CSS classes for TabsTrigger elements
|
|
4308
|
+
* @param {'fixed' | 'dynamic'} [props.variant='fixed'] - Layout mode for tab content
|
|
4309
|
+
*
|
|
4310
|
+
* @returns {React.ReactElement} A Tabs component with tab list and content area
|
|
4311
|
+
*
|
|
4312
|
+
* @example
|
|
4313
|
+
* // Basic tabs
|
|
4314
|
+
* <TabsContainer
|
|
4315
|
+
* tabs={[
|
|
4316
|
+
* { key: 'tab1', label: 'Overview', component: <OverviewPanel /> },
|
|
4317
|
+
* { key: 'tab2', label: 'Details', component: <DetailsPanel /> },
|
|
4318
|
+
* ]}
|
|
4319
|
+
* onTabChange={(key) => console.log('Selected:', key)}
|
|
4320
|
+
* />
|
|
4321
|
+
*
|
|
4322
|
+
* @example
|
|
4323
|
+
* // Tabs with icons and highlights
|
|
4324
|
+
* <TabsContainer
|
|
4325
|
+
* tabs={[
|
|
4326
|
+
* {
|
|
4327
|
+
* key: 'notifications',
|
|
4328
|
+
* label: 'Notifications',
|
|
4329
|
+
* icon: <BellIcon />,
|
|
4330
|
+
* component: <NotificationsList />,
|
|
4331
|
+
* highlight: unreadCount > 0
|
|
4332
|
+
* },
|
|
4333
|
+
* {
|
|
4334
|
+
* key: 'settings',
|
|
4335
|
+
* label: 'Settings',
|
|
4336
|
+
* icon: <SettingsIcon />,
|
|
4337
|
+
* component: <SettingsPanel />
|
|
4338
|
+
* },
|
|
4339
|
+
* ]}
|
|
4340
|
+
* variant="dynamic"
|
|
4341
|
+
* className="min-h-screen"
|
|
4342
|
+
* />
|
|
4343
|
+
*
|
|
4344
|
+
* @example
|
|
4345
|
+
* // Tabs with disabled state
|
|
4346
|
+
* <TabsContainer
|
|
4347
|
+
* tabs={[
|
|
4348
|
+
* { key: 'basic', label: 'Basic Info', component: <BasicForm /> },
|
|
4349
|
+
* { key: 'advanced', label: 'Advanced', component: <AdvancedForm />, disabled: !basicComplete },
|
|
4350
|
+
* ]}
|
|
4351
|
+
* currentTabIndex={0}
|
|
4352
|
+
* />
|
|
4353
|
+
*/
|
|
1477
4354
|
declare const TabsContainer: ({ tabs, onTabChange, currentTabIndex, className, tabsListClassName, tabsTriggerClassName, variant, }: TabsContainerProps) => react_jsx_runtime.JSX.Element;
|
|
1478
4355
|
|
|
4356
|
+
/**
|
|
4357
|
+
* Props for the UploadDialog component
|
|
4358
|
+
*/
|
|
1479
4359
|
type UploadDialogProps = {
|
|
4360
|
+
/** Function that renders the dialog trigger element. Receives open callback to open the dialog */
|
|
1480
4361
|
anchor: (props: {
|
|
1481
4362
|
open: () => void;
|
|
1482
4363
|
}) => ReactNode;
|
|
4364
|
+
/** Optional callback fired when the dialog opens */
|
|
1483
4365
|
onDialogOpen?: () => void;
|
|
4366
|
+
/** Optional callback fired when the dialog closes */
|
|
1484
4367
|
onDialogClose?: () => void;
|
|
4368
|
+
/** Title displayed in the dialog header. Defaults to 'Upload File' */
|
|
1485
4369
|
title?: string;
|
|
4370
|
+
/** Optional URL to a sample file for download */
|
|
1486
4371
|
sampleFileUrl?: string;
|
|
4372
|
+
/** Callback function fired when the Upload Now button is clicked. Receives single File or File[] */
|
|
1487
4373
|
onUpload: (file: File | File[]) => void;
|
|
4374
|
+
/** HTML accept attribute value for the file input (e.g., '.pdf,.doc', 'image/*'). Defaults to all files */
|
|
1488
4375
|
acceptFileType?: string;
|
|
4376
|
+
/** Whether the upload is currently in progress. Defaults to false */
|
|
1489
4377
|
loading?: boolean;
|
|
1490
4378
|
};
|
|
4379
|
+
/**
|
|
4380
|
+
* UploadDialog component that provides a file upload interface with preview and download sample options.
|
|
4381
|
+
*
|
|
4382
|
+
* This component manages file selection, displays selected file previews with delete capability,
|
|
4383
|
+
* and provides options to download sample files. It supports loading states and file type filtering.
|
|
4384
|
+
* The upload is triggered via an anchor element (trigger) that's configurable.
|
|
4385
|
+
*
|
|
4386
|
+
* @component
|
|
4387
|
+
* @param {UploadDialogProps} props - The component props
|
|
4388
|
+
* @param {(props: { open: () => void }) => ReactNode} props.anchor - Render function for the trigger element
|
|
4389
|
+
* @param {(file: File | File[]) => void} props.onUpload - Callback when upload button is clicked
|
|
4390
|
+
* @param {string} [props.title='Upload File'] - Dialog header title
|
|
4391
|
+
* @param {string} [props.sampleFileUrl] - URL to download a sample file
|
|
4392
|
+
* @param {string} [props.acceptFileType] - File type filter for the input (e.g., '.pdf', 'image/*')
|
|
4393
|
+
* @param {boolean} [props.loading=false] - Whether upload is in progress
|
|
4394
|
+
* @param {() => void} [props.onDialogOpen] - Callback when dialog opens
|
|
4395
|
+
* @param {() => void} [props.onDialogClose] - Callback when dialog closes
|
|
4396
|
+
*
|
|
4397
|
+
* @returns {React.ReactElement} A fragment with the anchor element and Upload Dialog
|
|
4398
|
+
*
|
|
4399
|
+
* @example
|
|
4400
|
+
* // Basic file upload
|
|
4401
|
+
* <UploadDialog
|
|
4402
|
+
* anchor={({ open }) => <button onClick={open}>Upload</button>}
|
|
4403
|
+
* title="Upload Document"
|
|
4404
|
+
* onUpload={(file) => uploadToServer(file)}
|
|
4405
|
+
* />
|
|
4406
|
+
*
|
|
4407
|
+
* @example
|
|
4408
|
+
* // Upload with sample file and type restriction
|
|
4409
|
+
* <UploadDialog
|
|
4410
|
+
* anchor={({ open }) => <IconButton icon={<UploadIcon />} onClick={open} />}
|
|
4411
|
+
* title="Upload CSV File"
|
|
4412
|
+
* acceptFileType=".csv"
|
|
4413
|
+
* sampleFileUrl="https://example.com/sample.csv"
|
|
4414
|
+
* onUpload={async (file) => {
|
|
4415
|
+
* await uploadFile(file);
|
|
4416
|
+
* setUploadComplete(true);
|
|
4417
|
+
* }}
|
|
4418
|
+
* loading={isUploading}
|
|
4419
|
+
* onDialogClose={() => setIsUploading(false)}
|
|
4420
|
+
* />
|
|
4421
|
+
*
|
|
4422
|
+
* @example
|
|
4423
|
+
* // Image upload with loading state
|
|
4424
|
+
* <UploadDialog
|
|
4425
|
+
* anchor={({ open }) => <button onClick={open}>Choose Avatar</button>}
|
|
4426
|
+
* title="Select Avatar"
|
|
4427
|
+
* acceptFileType="image/*"
|
|
4428
|
+
* onUpload={(file) => updateAvatar(file)}
|
|
4429
|
+
* loading={uploadInProgress}
|
|
4430
|
+
* />
|
|
4431
|
+
*/
|
|
1491
4432
|
declare const UploadDialog: ({ onUpload, sampleFileUrl, acceptFileType, loading, title, anchor, onDialogClose, onDialogOpen, }: UploadDialogProps) => react_jsx_runtime.JSX.Element;
|
|
1492
4433
|
|
|
1493
4434
|
/**
|