@bomjan133/react-crud-ui 1.2.6 → 1.2.8
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/README.md +4284 -23
- package/dist/components/book-viewer/EpubViewer.d.ts +8 -0
- package/dist/components/book-viewer/PdfViewer.d.ts +9 -0
- package/dist/components/book-viewer/constants.d.ts +23 -0
- package/dist/components/book-viewer/hooks.d.ts +6 -0
- package/dist/components/book-viewer/index.d.ts +16 -0
- package/dist/components/book-viewer/ui.d.ts +16 -0
- package/dist/components/book-viewer/utils.d.ts +12 -0
- package/dist/components/crud/CrudDetail.d.ts +86 -0
- package/dist/components/crud/CrudForm.d.ts +33 -0
- package/dist/components/crud/CrudList.d.ts +105 -0
- package/dist/components/crud/DataTable.d.ts +64 -0
- package/dist/components/crud/EmptyState.d.ts +54 -0
- package/dist/components/crud/Loading.d.ts +32 -0
- package/dist/components/crud/Modal.d.ts +75 -0
- package/dist/components/crud/Pagination.d.ts +18 -0
- package/dist/components/crud/ServerErrorPage.d.ts +7 -0
- package/dist/components/layouts/AuthLayout.d.ts +32 -0
- package/dist/components/layouts/BreadcrumbContext.d.ts +4 -0
- package/dist/components/layouts/DashboardLayout.d.ts +41 -0
- package/dist/components/layouts/DetailView.d.ts +58 -0
- package/dist/components/layouts/Header.d.ts +13 -0
- package/dist/components/layouts/HeaderSlotContext.d.ts +4 -0
- package/dist/components/layouts/LoginPage.d.ts +50 -0
- package/dist/components/layouts/Sidebar.d.ts +38 -0
- package/dist/components/layouts/SidebarContext.d.ts +18 -0
- package/dist/components/layouts/index.d.ts +8 -0
- package/dist/components/toast/ToastContainer.d.ts +4 -0
- package/dist/components/toast/useUI.d.ts +33 -0
- package/dist/components/ui/CopyableField.d.ts +12 -0
- package/dist/components/ui/DownloadableButton.d.ts +15 -0
- package/dist/components/ui/alert-dialog.d.ts +26 -0
- package/dist/components/ui/alert.d.ts +8 -0
- package/dist/components/ui/avatar.d.ts +4 -0
- package/dist/components/ui/badge.d.ts +8 -0
- package/dist/components/ui/button.d.ts +6 -0
- package/dist/components/ui/calendar.d.ts +16 -0
- package/dist/components/ui/card.d.ts +7 -0
- package/dist/components/ui/checkbox.d.ts +2 -0
- package/dist/components/ui/collapsible.d.ts +3 -0
- package/dist/components/ui/date-picker.d.ts +2 -0
- package/dist/components/ui/date-range-picker.d.ts +2 -0
- package/dist/components/ui/dialog.d.ts +25 -0
- package/dist/components/ui/dropdown-menu.d.ts +23 -0
- package/dist/components/ui/form-fields.d.ts +19 -0
- package/dist/components/ui/input-group.d.ts +28 -0
- package/dist/components/ui/input.d.ts +2 -0
- package/dist/components/ui/label.d.ts +2 -0
- package/dist/components/ui/popover.d.ts +5 -0
- package/dist/components/ui/q-tabs.d.ts +18 -0
- package/dist/components/ui/rich-text-editor.d.ts +2 -0
- package/dist/components/ui/scroll-area.d.ts +3 -0
- package/dist/components/ui/search-select.d.ts +6 -0
- package/dist/components/ui/select.d.ts +12 -0
- package/dist/components/ui/separator.d.ts +2 -0
- package/dist/components/ui/skeleton.d.ts +4 -0
- package/dist/components/ui/switch.d.ts +2 -0
- package/dist/components/ui/table.d.ts +9 -0
- package/dist/components/ui/tabs.d.ts +6 -0
- package/dist/components/ui/textarea.d.ts +2 -0
- package/dist/components/ui/tiptap-editor.d.ts +2 -0
- package/dist/components/ui/tooltip.d.ts +6 -0
- package/dist/{index-DEnRTqSW.cjs → index-C1SYIwJ0.cjs} +2 -2
- package/dist/{index-DEnRTqSW.cjs.map → index-C1SYIwJ0.cjs.map} +1 -1
- package/dist/{index-YVvpDXLO.js → index-C27owgN3.js} +989 -971
- package/dist/{index-YVvpDXLO.js.map → index-C27owgN3.js.map} +1 -1
- package/dist/{index-DGN44off.cjs → index-CoyU9yXi.cjs} +29 -29
- package/dist/index-CoyU9yXi.cjs.map +1 -0
- package/dist/{index-CYnVj6pv.js → index-DYnTJrkh.js} +2 -2
- package/dist/{index-CYnVj6pv.js.map → index-DYnTJrkh.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +42 -0
- package/dist/index.js +1 -1
- package/dist/lib/utils.d.ts +61 -0
- package/dist/store/createCrudStore.d.ts +11 -0
- package/dist/store/useUIStore.d.ts +5 -0
- package/package.json +1 -1
- package/dist/index-DGN44off.cjs.map +0 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export function PdfViewer({ blobUrl, pageWidth, pageHeight, canDownload, downloadUrl, title, totalPagesHint, }: {
|
|
2
|
+
blobUrl: any;
|
|
3
|
+
pageWidth: any;
|
|
4
|
+
pageHeight: any;
|
|
5
|
+
canDownload: any;
|
|
6
|
+
downloadUrl: any;
|
|
7
|
+
title: any;
|
|
8
|
+
totalPagesHint: any;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export const ASPECT: 1.414;
|
|
2
|
+
export const PDF_LAZY_RADIUS: 2;
|
|
3
|
+
export const FLIP_MS: 600;
|
|
4
|
+
export const TOOLBAR_HEIGHT: 52;
|
|
5
|
+
export const NAV_BTN_SIZE: 40;
|
|
6
|
+
export const VERTICAL_PADDING: 32;
|
|
7
|
+
export const PAGE_PAD: 24;
|
|
8
|
+
export const MAX_PAGES: 3000;
|
|
9
|
+
export namespace navBtnStyle {
|
|
10
|
+
export let display: string;
|
|
11
|
+
export let alignItems: string;
|
|
12
|
+
export let justifyContent: string;
|
|
13
|
+
export { NAV_BTN_SIZE as width };
|
|
14
|
+
export { NAV_BTN_SIZE as height };
|
|
15
|
+
export let borderRadius: string;
|
|
16
|
+
export let border: string;
|
|
17
|
+
export let background: string;
|
|
18
|
+
export let color: string;
|
|
19
|
+
export let cursor: string;
|
|
20
|
+
export let flexShrink: number;
|
|
21
|
+
export let boxShadow: string;
|
|
22
|
+
export let transition: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export default function BookViewer({ src, file, blobUrl: externalBlobUrl, type, mimeType, title, canDownload, downloadUrl, totalPagesHint, onFetch, fetchOptions, }: {
|
|
2
|
+
src: any;
|
|
3
|
+
file: any;
|
|
4
|
+
blobUrl: any;
|
|
5
|
+
type: any;
|
|
6
|
+
mimeType: any;
|
|
7
|
+
title?: string | undefined;
|
|
8
|
+
canDownload?: boolean | undefined;
|
|
9
|
+
downloadUrl: any;
|
|
10
|
+
totalPagesHint: any;
|
|
11
|
+
onFetch: any;
|
|
12
|
+
fetchOptions: any;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export { EpubViewer } from './EpubViewer';
|
|
15
|
+
export { PdfViewer } from './PdfViewer';
|
|
16
|
+
export { useBookDimensions } from './hooks';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export function Toolbar({ title, pageLabel, canDownload, downloadUrl, isCapturing, captureProgress }: {
|
|
2
|
+
title: any;
|
|
3
|
+
pageLabel: any;
|
|
4
|
+
canDownload: any;
|
|
5
|
+
downloadUrl: any;
|
|
6
|
+
isCapturing: any;
|
|
7
|
+
captureProgress: any;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export function CenteredSpinner({ label }: {
|
|
10
|
+
label: any;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export function PageSpinner(): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export function ErrorState({ message, downloadUrl }: {
|
|
14
|
+
message: any;
|
|
15
|
+
downloadUrl: any;
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compute scroll-positions where page breaks should occur so that no
|
|
3
|
+
* paragraph-level element is split across pages.
|
|
4
|
+
*
|
|
5
|
+
* Uses querySelectorAll + offsetParent traversal so it works at any
|
|
6
|
+
* nesting depth (body > section > div > p, etc.).
|
|
7
|
+
*
|
|
8
|
+
* Returns an array of y-offsets (one per page).
|
|
9
|
+
*/
|
|
10
|
+
export function computeSmartBreaks(body: any, innerH: any, totalH: any, maxPages: any): number[];
|
|
11
|
+
export function captureRenditionPage(containerEl: any, w: any, h: any, sy?: number, captureH?: null): Promise<string>;
|
|
12
|
+
export function detectType(src: any, mimeType: any): "pdf" | "epub";
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CrudDetail - A component for displaying detail view of an item
|
|
3
|
+
* Supports store integration, custom field rendering and actions
|
|
4
|
+
*
|
|
5
|
+
* Usage with store and children:
|
|
6
|
+
* ```jsx
|
|
7
|
+
* <CrudDetail
|
|
8
|
+
* title="User"
|
|
9
|
+
* useStore={useUserStore}
|
|
10
|
+
* listPath="/users"
|
|
11
|
+
* editPath="/users"
|
|
12
|
+
* getParentPath={(data) => `/organizations/${data.org_id}`}
|
|
13
|
+
* >
|
|
14
|
+
* {(data) => <CustomContent data={data} />}
|
|
15
|
+
* </CrudDetail>
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* Usage with fields array:
|
|
19
|
+
* ```jsx
|
|
20
|
+
* <CrudDetail
|
|
21
|
+
* data={user}
|
|
22
|
+
* fields={[
|
|
23
|
+
* { name: 'email', label: 'Email', type: 'email' }
|
|
24
|
+
* ]}
|
|
25
|
+
* onBack={() => navigate('/users')}
|
|
26
|
+
* />
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export function CrudDetail({ useStore, children, data: propData, paramName, loading: propLoading, error: propError, fields, onBack, onEdit, onDelete, listPath, editPath, title, description, editLabel, deleteLabel, backLabel, itemName, getItemName, showBackButton, additionalActions, getBreadcrumbName, customBreadcrumbPaths, getCustomBreadcrumbPath, getParentPath, preserveLocationState, showEditButton, showDeleteButton, showHeader, showMeta, showCard, columns, icon: Icon, className, cardClassName, cardHeaderClassName, cardContentClassName, headerClassName, titleClassName, descriptionClassName, fieldsGridClassName, fieldItemClassName, fieldLabelClassName, fieldValueClassName, metaClassName, metaItemClassName, backButtonClassName, actionsDropdownClassName, actionsDropdownItemClassName, loadingStateClassName, errorStateClassName, emptyStateClassName, ...props }: {
|
|
30
|
+
[x: string]: any;
|
|
31
|
+
useStore: any;
|
|
32
|
+
children: any;
|
|
33
|
+
data?: null | undefined;
|
|
34
|
+
paramName?: string | undefined;
|
|
35
|
+
loading?: boolean | undefined;
|
|
36
|
+
error?: null | undefined;
|
|
37
|
+
fields?: never[] | undefined;
|
|
38
|
+
onBack: any;
|
|
39
|
+
onEdit: any;
|
|
40
|
+
onDelete: any;
|
|
41
|
+
listPath: any;
|
|
42
|
+
editPath: any;
|
|
43
|
+
title: any;
|
|
44
|
+
description: any;
|
|
45
|
+
editLabel?: string | undefined;
|
|
46
|
+
deleteLabel?: string | undefined;
|
|
47
|
+
backLabel?: string | undefined;
|
|
48
|
+
itemName?: string | undefined;
|
|
49
|
+
getItemName: any;
|
|
50
|
+
showBackButton?: boolean | undefined;
|
|
51
|
+
additionalActions?: never[] | undefined;
|
|
52
|
+
getBreadcrumbName: any;
|
|
53
|
+
customBreadcrumbPaths: any;
|
|
54
|
+
getCustomBreadcrumbPath: any;
|
|
55
|
+
getParentPath: any;
|
|
56
|
+
preserveLocationState?: boolean | undefined;
|
|
57
|
+
showEditButton?: boolean | undefined;
|
|
58
|
+
showDeleteButton?: boolean | undefined;
|
|
59
|
+
showHeader?: boolean | undefined;
|
|
60
|
+
showMeta?: boolean | undefined;
|
|
61
|
+
showCard?: boolean | undefined;
|
|
62
|
+
columns?: number | undefined;
|
|
63
|
+
icon: any;
|
|
64
|
+
className: any;
|
|
65
|
+
cardClassName: any;
|
|
66
|
+
cardHeaderClassName: any;
|
|
67
|
+
cardContentClassName: any;
|
|
68
|
+
headerClassName: any;
|
|
69
|
+
titleClassName: any;
|
|
70
|
+
descriptionClassName: any;
|
|
71
|
+
fieldsGridClassName: any;
|
|
72
|
+
fieldItemClassName: any;
|
|
73
|
+
fieldLabelClassName: any;
|
|
74
|
+
fieldValueClassName: any;
|
|
75
|
+
metaClassName: any;
|
|
76
|
+
metaItemClassName: any;
|
|
77
|
+
backButtonClassName: any;
|
|
78
|
+
actionsDropdownClassName: any;
|
|
79
|
+
actionsDropdownItemClassName: any;
|
|
80
|
+
loadingStateClassName: any;
|
|
81
|
+
errorStateClassName: any;
|
|
82
|
+
emptyStateClassName: any;
|
|
83
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
84
|
+
export namespace CrudDetail {
|
|
85
|
+
let displayName: string;
|
|
86
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export function CrudForm({ useStore, fields, defaultValues, validationSchema, children, onSubmit, onCancel, onBack, onBeforeSubmit, onAfterCreate, initialData, loading: propLoading, submitting: propSubmitting, title, description, submitLabel, cancelLabel, backLabel, columns, showHeader, showFooter, showBack, showCard, listPath, icon: Icon, className, getBreadcrumbName, ...props }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
useStore: any;
|
|
4
|
+
fields?: never[] | undefined;
|
|
5
|
+
defaultValues?: {} | undefined;
|
|
6
|
+
validationSchema: any;
|
|
7
|
+
children: any;
|
|
8
|
+
onSubmit: any;
|
|
9
|
+
onCancel: any;
|
|
10
|
+
onBack: any;
|
|
11
|
+
onBeforeSubmit: any;
|
|
12
|
+
onAfterCreate: any;
|
|
13
|
+
initialData?: null | undefined;
|
|
14
|
+
loading?: boolean | undefined;
|
|
15
|
+
submitting?: boolean | undefined;
|
|
16
|
+
title: any;
|
|
17
|
+
description: any;
|
|
18
|
+
submitLabel?: string | undefined;
|
|
19
|
+
cancelLabel?: string | undefined;
|
|
20
|
+
backLabel?: string | undefined;
|
|
21
|
+
columns?: number | undefined;
|
|
22
|
+
showHeader?: boolean | undefined;
|
|
23
|
+
showFooter?: boolean | undefined;
|
|
24
|
+
showBack?: boolean | undefined;
|
|
25
|
+
showCard?: boolean | undefined;
|
|
26
|
+
listPath: any;
|
|
27
|
+
icon: any;
|
|
28
|
+
className: any;
|
|
29
|
+
getBreadcrumbName: any;
|
|
30
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export namespace CrudForm {
|
|
32
|
+
let displayName: string;
|
|
33
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CrudList - A complete CRUD list component
|
|
3
|
+
* Supports both direct props and store integration
|
|
4
|
+
* *
|
|
5
|
+
* Usage with store:
|
|
6
|
+
* ```jsx
|
|
7
|
+
* <CrudList
|
|
8
|
+
* store={useUserStore()}
|
|
9
|
+
* title="Users"
|
|
10
|
+
* columns={columns}
|
|
11
|
+
* createPath="/users/create"
|
|
12
|
+
* detailPath="/users"
|
|
13
|
+
* editPath="/users"
|
|
14
|
+
* />
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* Usage with direct props:
|
|
18
|
+
* ```jsx
|
|
19
|
+
* <CrudList
|
|
20
|
+
* data={users}
|
|
21
|
+
* loading={isLoading}
|
|
22
|
+
* columns={columns}
|
|
23
|
+
* onPageChange={handlePageChange}
|
|
24
|
+
* />
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export function CrudList({ store, data: propData, loading: propLoading, error: propError, skipInitialFetch, columns, currentPage: propCurrentPage, pageSize: propPageSize, totalItems: propTotalItems, totalPages: propTotalPages, onPageChange: propOnPageChange, onPageSizeChange: propOnPageSizeChange, sortColumn: propSortColumn, sortDirection: propSortDirection, onSort: propOnSort, searchValue: propSearchValue, onSearchChange: propOnSearchChange, searchPlaceholder, openInNewTab, selectable, selectedRows, onSelectionChange, onCreate: propOnCreate, onView: propOnView, onEdit: propOnEdit, onDelete: propOnDelete, onRefresh: propOnRefresh, onExport, tableClassName, tableHeaderClassName, tableBodyClassName, tableRowClassName, tableHeadClassName, tableCellClassName, headerRowClassName, statusRowClassName, paginationClassName, createButtonClassName, refreshButtonClassName, exportButtonClassName, bulkActionButtonClassName, createPath, detailPath, editPath, getBreadcrumbName, customBreadcrumbPaths, getCustomBreadcrumbPath, additionalActions, bulkActions, title, description, createLabel, refreshLabel, exportLabel, viewLabel, editLabel, deleteLabel, itemName, getRowKey, showHeader, showToolbar, compact, className, deleteConfirmTitle, deleteConfirmDescription, getDeleteItemName, filters, headerActions, searchable, showEditButton, showDeleteButton, getParentPath, preserveLocationState, clickableColumns, }: {
|
|
28
|
+
store: any;
|
|
29
|
+
data: any;
|
|
30
|
+
loading?: boolean | undefined;
|
|
31
|
+
error?: null | undefined;
|
|
32
|
+
skipInitialFetch?: boolean | undefined;
|
|
33
|
+
columns?: never[] | undefined;
|
|
34
|
+
currentPage?: number | undefined;
|
|
35
|
+
pageSize?: number | undefined;
|
|
36
|
+
totalItems?: number | undefined;
|
|
37
|
+
totalPages?: number | undefined;
|
|
38
|
+
onPageChange: any;
|
|
39
|
+
onPageSizeChange: any;
|
|
40
|
+
sortColumn: any;
|
|
41
|
+
sortDirection: any;
|
|
42
|
+
onSort: any;
|
|
43
|
+
searchValue?: string | undefined;
|
|
44
|
+
onSearchChange: any;
|
|
45
|
+
searchPlaceholder?: string | undefined;
|
|
46
|
+
openInNewTab?: boolean | undefined;
|
|
47
|
+
selectable?: boolean | undefined;
|
|
48
|
+
selectedRows?: never[] | undefined;
|
|
49
|
+
onSelectionChange: any;
|
|
50
|
+
onCreate: any;
|
|
51
|
+
onView: any;
|
|
52
|
+
onEdit: any;
|
|
53
|
+
onDelete: any;
|
|
54
|
+
onRefresh: any;
|
|
55
|
+
onExport: any;
|
|
56
|
+
tableClassName: any;
|
|
57
|
+
tableHeaderClassName: any;
|
|
58
|
+
tableBodyClassName: any;
|
|
59
|
+
tableRowClassName: any;
|
|
60
|
+
tableHeadClassName: any;
|
|
61
|
+
tableCellClassName: any;
|
|
62
|
+
headerRowClassName: any;
|
|
63
|
+
statusRowClassName: any;
|
|
64
|
+
paginationClassName: any;
|
|
65
|
+
createButtonClassName: any;
|
|
66
|
+
refreshButtonClassName: any;
|
|
67
|
+
exportButtonClassName: any;
|
|
68
|
+
bulkActionButtonClassName: any;
|
|
69
|
+
createPath: any;
|
|
70
|
+
detailPath: any;
|
|
71
|
+
editPath: any;
|
|
72
|
+
getBreadcrumbName: any;
|
|
73
|
+
customBreadcrumbPaths: any;
|
|
74
|
+
getCustomBreadcrumbPath: any;
|
|
75
|
+
additionalActions?: never[] | undefined;
|
|
76
|
+
bulkActions?: never[] | undefined;
|
|
77
|
+
title: any;
|
|
78
|
+
description: any;
|
|
79
|
+
createLabel?: string | undefined;
|
|
80
|
+
refreshLabel?: string | undefined;
|
|
81
|
+
exportLabel?: string | undefined;
|
|
82
|
+
viewLabel?: string | undefined;
|
|
83
|
+
editLabel?: string | undefined;
|
|
84
|
+
deleteLabel?: string | undefined;
|
|
85
|
+
itemName?: string | undefined;
|
|
86
|
+
getRowKey?: ((row: any) => any) | undefined;
|
|
87
|
+
showHeader?: boolean | undefined;
|
|
88
|
+
showToolbar?: boolean | undefined;
|
|
89
|
+
compact?: boolean | undefined;
|
|
90
|
+
className: any;
|
|
91
|
+
deleteConfirmTitle: any;
|
|
92
|
+
deleteConfirmDescription: any;
|
|
93
|
+
getDeleteItemName: any;
|
|
94
|
+
filters: any;
|
|
95
|
+
headerActions: any;
|
|
96
|
+
searchable?: boolean | undefined;
|
|
97
|
+
showEditButton?: boolean | undefined;
|
|
98
|
+
showDeleteButton?: boolean | undefined;
|
|
99
|
+
getParentPath: any;
|
|
100
|
+
preserveLocationState?: boolean | undefined;
|
|
101
|
+
clickableColumns?: never[] | undefined;
|
|
102
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
103
|
+
export namespace CrudList {
|
|
104
|
+
let displayName: string;
|
|
105
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export function DataTable({ data, columns, loading, error, pagination, currentPage, pageSize, totalItems, totalPages, onPageChange, onPageSizeChange, sortable, sortColumn, sortDirection, onSort, openInNewTab, searchable, searchValue, onSearchChange, searchPlaceholder, filters, toolbarActions, selectable, selectedRows, onSelectionChange, actions, onRowClick, striped, hover, compact, className, emptyTitle, emptyDescription, emptyAction, onEmptyAction, getRowKey, showSerialNumber, serialNumberHeader, onViewClick, onViewLink, onBeforeNavigate, clickableColumns, enableTextClamping, defaultMaxLines, tableClassName, tableHeaderClassName, tableBodyClassName, tableRowClassName, tableHeadClassName, tableCellClassName, headerRowClassName, statusRowClassName, paginationClassName, }: {
|
|
2
|
+
data?: never[] | undefined;
|
|
3
|
+
columns?: never[] | undefined;
|
|
4
|
+
loading?: boolean | undefined;
|
|
5
|
+
error?: null | undefined;
|
|
6
|
+
pagination?: null | undefined;
|
|
7
|
+
currentPage?: number | undefined;
|
|
8
|
+
pageSize?: number | undefined;
|
|
9
|
+
totalItems?: number | undefined;
|
|
10
|
+
totalPages?: number | undefined;
|
|
11
|
+
onPageChange: any;
|
|
12
|
+
onPageSizeChange: any;
|
|
13
|
+
sortable?: boolean | undefined;
|
|
14
|
+
sortColumn?: null | undefined;
|
|
15
|
+
sortDirection?: null | undefined;
|
|
16
|
+
onSort: any;
|
|
17
|
+
openInNewTab?: boolean | undefined;
|
|
18
|
+
searchable?: boolean | undefined;
|
|
19
|
+
searchValue?: string | undefined;
|
|
20
|
+
onSearchChange: any;
|
|
21
|
+
searchPlaceholder?: string | undefined;
|
|
22
|
+
filters: any;
|
|
23
|
+
toolbarActions: any;
|
|
24
|
+
selectable?: boolean | undefined;
|
|
25
|
+
selectedRows?: never[] | undefined;
|
|
26
|
+
onSelectionChange: any;
|
|
27
|
+
actions?: never[] | undefined;
|
|
28
|
+
onRowClick: any;
|
|
29
|
+
striped?: boolean | undefined;
|
|
30
|
+
hover?: boolean | undefined;
|
|
31
|
+
compact?: boolean | undefined;
|
|
32
|
+
className: any;
|
|
33
|
+
emptyTitle?: string | undefined;
|
|
34
|
+
emptyDescription?: string | undefined;
|
|
35
|
+
emptyAction: any;
|
|
36
|
+
onEmptyAction: any;
|
|
37
|
+
getRowKey?: ((row: any) => any) | undefined;
|
|
38
|
+
showSerialNumber?: boolean | undefined;
|
|
39
|
+
serialNumberHeader?: string | undefined;
|
|
40
|
+
onViewClick: any;
|
|
41
|
+
onViewLink: any;
|
|
42
|
+
onBeforeNavigate: any;
|
|
43
|
+
clickableColumns?: never[] | undefined;
|
|
44
|
+
enableTextClamping?: boolean | undefined;
|
|
45
|
+
defaultMaxLines?: number | undefined;
|
|
46
|
+
tableClassName: any;
|
|
47
|
+
tableHeaderClassName: any;
|
|
48
|
+
tableBodyClassName: any;
|
|
49
|
+
tableRowClassName: any;
|
|
50
|
+
tableHeadClassName: any;
|
|
51
|
+
tableCellClassName: any;
|
|
52
|
+
headerRowClassName: any;
|
|
53
|
+
statusRowClassName: any;
|
|
54
|
+
paginationClassName: any;
|
|
55
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
export namespace DataTable {
|
|
57
|
+
let displayName: string;
|
|
58
|
+
}
|
|
59
|
+
export function ClampedText({ text, maxLines, className, showTooltip }: {
|
|
60
|
+
text: any;
|
|
61
|
+
maxLines?: number | undefined;
|
|
62
|
+
className: any;
|
|
63
|
+
showTooltip?: boolean | undefined;
|
|
64
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EmptyState component for displaying when no data is available
|
|
3
|
+
*/
|
|
4
|
+
export function EmptyState({ icon: Icon, title, description, action, actionLabel, onAction, variant, className, children, }: {
|
|
5
|
+
icon?: React.ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>> | undefined;
|
|
6
|
+
title?: string | undefined;
|
|
7
|
+
description?: string | undefined;
|
|
8
|
+
action: any;
|
|
9
|
+
actionLabel: any;
|
|
10
|
+
onAction: any;
|
|
11
|
+
variant?: string | undefined;
|
|
12
|
+
className: any;
|
|
13
|
+
children: any;
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export namespace EmptyState {
|
|
16
|
+
let displayName: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* SearchEmptyState - Specific empty state for search results
|
|
20
|
+
*/
|
|
21
|
+
export function SearchEmptyState({ searchTerm, onClear, className }: {
|
|
22
|
+
searchTerm: any;
|
|
23
|
+
onClear: any;
|
|
24
|
+
className: any;
|
|
25
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export namespace SearchEmptyState {
|
|
27
|
+
let displayName_1: string;
|
|
28
|
+
export { displayName_1 as displayName };
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* CreateEmptyState - Specific empty state for creating first item
|
|
32
|
+
*/
|
|
33
|
+
export function CreateEmptyState({ itemName, onCreate, className }: {
|
|
34
|
+
itemName?: string | undefined;
|
|
35
|
+
onCreate: any;
|
|
36
|
+
className: any;
|
|
37
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export namespace CreateEmptyState {
|
|
39
|
+
let displayName_2: string;
|
|
40
|
+
export { displayName_2 as displayName };
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* ErrorState - Specific empty state for error
|
|
44
|
+
*/
|
|
45
|
+
export function ErrorState({ error, onRetry, className }: {
|
|
46
|
+
error: any;
|
|
47
|
+
onRetry: any;
|
|
48
|
+
className: any;
|
|
49
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
export namespace ErrorState {
|
|
51
|
+
let displayName_3: string;
|
|
52
|
+
export { displayName_3 as displayName };
|
|
53
|
+
}
|
|
54
|
+
import * as React from "react";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loading component with multiple variants
|
|
3
|
+
*/
|
|
4
|
+
export function Loading({ variant, size, text, className, fullScreen, overlay, }: {
|
|
5
|
+
variant?: string | undefined;
|
|
6
|
+
size?: string | undefined;
|
|
7
|
+
text: any;
|
|
8
|
+
className: any;
|
|
9
|
+
fullScreen?: boolean | undefined;
|
|
10
|
+
overlay?: boolean | undefined;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export namespace Loading {
|
|
13
|
+
let displayName: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* LoadingOverlay - Overlay loading for sections
|
|
17
|
+
*/
|
|
18
|
+
export function LoadingOverlay({ loading, children, text, className }: {
|
|
19
|
+
loading: any;
|
|
20
|
+
children: any;
|
|
21
|
+
text: any;
|
|
22
|
+
className: any;
|
|
23
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export namespace LoadingOverlay {
|
|
25
|
+
let displayName_1: string;
|
|
26
|
+
export { displayName_1 as displayName };
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* LoadingButton - Button with loading state
|
|
30
|
+
*/
|
|
31
|
+
export const LoadingButton: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
32
|
+
import * as React from "react";
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Modal component - A reusable modal/dialog wrapper
|
|
3
|
+
*/
|
|
4
|
+
export function Modal({ open, onOpenChange, onClose, title, description, children, footer, size, showClose, className, ...props }: {
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
open: any;
|
|
7
|
+
onOpenChange: any;
|
|
8
|
+
onClose: any;
|
|
9
|
+
title: any;
|
|
10
|
+
description: any;
|
|
11
|
+
children: any;
|
|
12
|
+
footer: any;
|
|
13
|
+
size?: string | undefined;
|
|
14
|
+
showClose?: boolean | undefined;
|
|
15
|
+
className: any;
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export namespace Modal {
|
|
18
|
+
let displayName: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* ConfirmModal - Confirmation dialog
|
|
22
|
+
*/
|
|
23
|
+
export function ConfirmModal({ open, onOpenChange, onConfirm, onCancel, title, description, confirmText, cancelText, variant, loading, className, }: {
|
|
24
|
+
open: any;
|
|
25
|
+
onOpenChange: any;
|
|
26
|
+
onConfirm: any;
|
|
27
|
+
onCancel: any;
|
|
28
|
+
title?: string | undefined;
|
|
29
|
+
description?: string | undefined;
|
|
30
|
+
confirmText?: string | undefined;
|
|
31
|
+
cancelText?: string | undefined;
|
|
32
|
+
variant?: string | undefined;
|
|
33
|
+
loading?: boolean | undefined;
|
|
34
|
+
className: any;
|
|
35
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export namespace ConfirmModal {
|
|
37
|
+
let displayName_1: string;
|
|
38
|
+
export { displayName_1 as displayName };
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* DeleteConfirmModal - Specific confirmation for delete actions
|
|
42
|
+
*/
|
|
43
|
+
export function DeleteConfirmModal({ open, onOpenChange, onConfirm, title, description, itemName, loading, }: {
|
|
44
|
+
open: any;
|
|
45
|
+
onOpenChange: any;
|
|
46
|
+
onConfirm: any;
|
|
47
|
+
title: any;
|
|
48
|
+
description: any;
|
|
49
|
+
itemName?: string | undefined;
|
|
50
|
+
loading?: boolean | undefined;
|
|
51
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
export namespace DeleteConfirmModal {
|
|
53
|
+
let displayName_2: string;
|
|
54
|
+
export { displayName_2 as displayName };
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* FormModal - Modal for forms
|
|
58
|
+
*/
|
|
59
|
+
export function FormModal({ open, onOpenChange, onSubmit, title, description, children, submitText, cancelText, loading, size, className, }: {
|
|
60
|
+
open: any;
|
|
61
|
+
onOpenChange: any;
|
|
62
|
+
onSubmit: any;
|
|
63
|
+
title: any;
|
|
64
|
+
description: any;
|
|
65
|
+
children: any;
|
|
66
|
+
submitText?: string | undefined;
|
|
67
|
+
cancelText?: string | undefined;
|
|
68
|
+
loading?: boolean | undefined;
|
|
69
|
+
size?: string | undefined;
|
|
70
|
+
className: any;
|
|
71
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
72
|
+
export namespace FormModal {
|
|
73
|
+
let displayName_3: string;
|
|
74
|
+
export { displayName_3 as displayName };
|
|
75
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pagination component for DataTable and CrudList
|
|
3
|
+
*/
|
|
4
|
+
export function Pagination({ currentPage, totalPages, totalItems, pageSize, pageSizeOptions, onPageChange, onPageSizeChange, showPageSizeSelector, showInfo, className, }: {
|
|
5
|
+
currentPage?: number | undefined;
|
|
6
|
+
totalPages?: number | undefined;
|
|
7
|
+
totalItems?: number | undefined;
|
|
8
|
+
pageSize?: number | undefined;
|
|
9
|
+
pageSizeOptions?: number[] | undefined;
|
|
10
|
+
onPageChange: any;
|
|
11
|
+
onPageSizeChange: any;
|
|
12
|
+
showPageSizeSelector?: boolean | undefined;
|
|
13
|
+
showInfo?: boolean | undefined;
|
|
14
|
+
className: any;
|
|
15
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export namespace Pagination {
|
|
17
|
+
let displayName: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AuthLayout - A reusable authentication layout with split screen design
|
|
3
|
+
*
|
|
4
|
+
* Props:
|
|
5
|
+
* - brandName: Company/App name displayed on the left panel
|
|
6
|
+
* - brandLogo: Logo component or element for the brand
|
|
7
|
+
* - brandDescription: Tagline or short description
|
|
8
|
+
* - quote: Motivational quote or message
|
|
9
|
+
* - quoteAuthor: Author of the quote
|
|
10
|
+
* - copyright: Copyright text (defaults to current year)
|
|
11
|
+
* - leftPanelClassName: Additional classes for left panel
|
|
12
|
+
* - rightPanelClassName: Additional classes for right panel
|
|
13
|
+
* - leftPanelContent: Custom content for left panel (replaces default)
|
|
14
|
+
* - rightPanelContent: Custom content for right panel (replaces Outlet)
|
|
15
|
+
* - showLeftPanel: Whether to show the left brand panel (default: true)
|
|
16
|
+
* - children: Children are rendered in the right panel
|
|
17
|
+
*/
|
|
18
|
+
export function AuthLayout({ brandName, brandLogo, brandDescription, quote, quoteAuthor, copyright, leftPanelClassName, rightPanelClassName, leftPanelContent, rightPanelContent, showLeftPanel, children, }: {
|
|
19
|
+
brandName?: string | undefined;
|
|
20
|
+
brandLogo: any;
|
|
21
|
+
brandDescription?: string | undefined;
|
|
22
|
+
quote: any;
|
|
23
|
+
quoteAuthor: any;
|
|
24
|
+
copyright: any;
|
|
25
|
+
leftPanelClassName: any;
|
|
26
|
+
rightPanelClassName: any;
|
|
27
|
+
leftPanelContent: any;
|
|
28
|
+
rightPanelContent: any;
|
|
29
|
+
showLeftPanel?: boolean | undefined;
|
|
30
|
+
children: any;
|
|
31
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export default AuthLayout;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DashboardLayout - A reusable dashboard layout with sidebar and header *
|
|
3
|
+
* Props:
|
|
4
|
+
* - sidebarProps: Props passed to Sidebar component
|
|
5
|
+
* - items: Navigation items array
|
|
6
|
+
* - brandName: Brand name for sidebar
|
|
7
|
+
* - brandLogo: Brand logo component
|
|
8
|
+
* - brandPath: Path when clicking brand
|
|
9
|
+
* - user: User object { firstName, lastName, email, avatar }
|
|
10
|
+
* - onLogout: Logout callback
|
|
11
|
+
* - userMenuItems: Additional user menu items
|
|
12
|
+
* - showUserProfile: Whether to show user profile
|
|
13
|
+
* - headerSlot: Custom header slot for sidebar
|
|
14
|
+
* - footerSlot: Custom footer slot for sidebar
|
|
15
|
+
*
|
|
16
|
+
* - headerProps: Props passed to Header component
|
|
17
|
+
* - pathNames: Custom path name mappings for breadcrumbs
|
|
18
|
+
* - showBreadcrumbs: Whether to show breadcrumbs
|
|
19
|
+
* - leftSlot: Custom left content
|
|
20
|
+
* - rightSlot: Custom right content (notifications, etc.)
|
|
21
|
+
*
|
|
22
|
+
* - defaultOpen: Initial mobile sidebar state (default: false)
|
|
23
|
+
* - defaultCollapsed: Initial desktop sidebar state (default: false)
|
|
24
|
+
* - showHeader: Whether to show the header (default: true)
|
|
25
|
+
* - showSidebar: Whether to show the sidebar (default: true)
|
|
26
|
+
* - contentClassName: Additional classes for main content area
|
|
27
|
+
* - mainSlot: Custom main content (replaces Outlet)
|
|
28
|
+
* - children: Children rendered in main content
|
|
29
|
+
*/
|
|
30
|
+
export function DashboardLayout({ sidebarProps, headerProps, defaultOpen, defaultCollapsed, showHeader, showSidebar, contentClassName, mainSlot, children, }: {
|
|
31
|
+
sidebarProps?: {} | undefined;
|
|
32
|
+
headerProps?: {} | undefined;
|
|
33
|
+
defaultOpen?: boolean | undefined;
|
|
34
|
+
defaultCollapsed?: boolean | undefined;
|
|
35
|
+
showHeader?: boolean | undefined;
|
|
36
|
+
showSidebar?: boolean | undefined;
|
|
37
|
+
contentClassName: any;
|
|
38
|
+
mainSlot: any;
|
|
39
|
+
children: any;
|
|
40
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export default DashboardLayout;
|