@bomjan133/react-crud-ui 1.2.5 → 1.2.7
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 +4630 -369
- package/bin/cli.js +387 -387
- 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.d.ts +42 -0
- 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/docs/1_GETTING_STARTED.md +333 -333
- package/docs/2_UI_COMPONENTS.md +586 -586
- package/docs/3_CRUD_COMPONENTS.md +974 -974
- package/docs/4_FORM_COMPONENTS.md +778 -778
- package/docs/5_LAYOUT_COMPONENTS.md +402 -402
- package/docs/6_STORE_FACTORY.md +456 -456
- package/docs/7_BOOK_VIEWER.md +365 -365
- package/docs/8_TOAST_NOTIFICATIONS.md +130 -130
- package/docs/9_UTILITIES.md +204 -204
- package/docs/README.md +83 -83
- package/package.json +1 -1
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export { Input } from './components/ui/input';
|
|
2
|
+
export { Label } from './components/ui/label';
|
|
3
|
+
export { Textarea } from './components/ui/textarea';
|
|
4
|
+
export { Checkbox } from './components/ui/checkbox';
|
|
5
|
+
export { Switch } from './components/ui/switch';
|
|
6
|
+
export { Skeleton } from './components/ui/skeleton';
|
|
7
|
+
export { Separator } from './components/ui/separator';
|
|
8
|
+
export { QTabs } from './components/ui/q-tabs';
|
|
9
|
+
export { Calendar } from './components/ui/calendar';
|
|
10
|
+
export { DatePicker } from './components/ui/date-picker';
|
|
11
|
+
export { DateRangePicker } from './components/ui/date-range-picker';
|
|
12
|
+
export { RichTextEditor } from './components/ui/rich-text-editor';
|
|
13
|
+
export { SearchSelect } from './components/ui/search-select';
|
|
14
|
+
export { Pagination } from './components/crud/Pagination';
|
|
15
|
+
export { DataTable } from './components/crud/DataTable';
|
|
16
|
+
export { CrudList } from './components/crud/CrudList';
|
|
17
|
+
export { CrudForm } from './components/crud/CrudForm';
|
|
18
|
+
export { CrudDetail } from './components/crud/CrudDetail';
|
|
19
|
+
export { useToast } from './components/toast/useUI';
|
|
20
|
+
export { default as ToastContainer } from './components/toast/ToastContainer';
|
|
21
|
+
export { Button, buttonVariants } from './components/ui/button';
|
|
22
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from './components/ui/card';
|
|
23
|
+
export { Badge, badgeVariants } from './components/ui/badge';
|
|
24
|
+
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton } from './components/ui/select';
|
|
25
|
+
export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription } from './components/ui/dialog';
|
|
26
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent } from './components/ui/tabs';
|
|
27
|
+
export { Avatar, AvatarImage, AvatarFallback } from './components/ui/avatar';
|
|
28
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from './components/ui/tooltip';
|
|
29
|
+
export { Popover, PopoverTrigger, PopoverContent } from './components/ui/popover';
|
|
30
|
+
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup } from './components/ui/dropdown-menu';
|
|
31
|
+
export { ScrollArea, ScrollBar } from './components/ui/scroll-area';
|
|
32
|
+
export { Alert, AlertTitle, AlertDescription, AlertWithIcon, alertVariants } from './components/ui/alert';
|
|
33
|
+
export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel } from './components/ui/alert-dialog';
|
|
34
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption } from './components/ui/table';
|
|
35
|
+
export { FormField, QInput, QTextarea, QSelect, QSearchSelect, QSwitch, QCheckbox, QForm, QDatePicker, QDateRangePicker, QRichTextEditor } from './components/ui/form-fields';
|
|
36
|
+
export { Loading, LoadingOverlay, LoadingButton } from './components/crud/Loading';
|
|
37
|
+
export { EmptyState, SearchEmptyState, CreateEmptyState, ErrorState } from './components/crud/EmptyState';
|
|
38
|
+
export { Modal, ConfirmModal, DeleteConfirmModal, FormModal } from './components/crud/Modal';
|
|
39
|
+
export { createCrudStore, createStore } from './store/createCrudStore';
|
|
40
|
+
export { AuthLayout, LoginPage, DashboardLayout, Sidebar, Header, SidebarProvider, useSidebarContext, BreadcrumbProvider, useBreadcrumb, HeaderSlotProvider, useHeaderSlot } from './components/layouts';
|
|
41
|
+
export { cn, formatCurrency, formatDate, formatDateTime, formatRelativeTime, truncate, capitalize, slugify, debounce, generateId, deepClone, isEmpty, getInitials, parseQueryString, buildQueryString, TimeStampFormat } from './lib/utils';
|
|
42
|
+
export { default as BookViewer, EpubViewer, PdfViewer, useBookDimensions } from './components/book-viewer';
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Merge Tailwind classes with clsx
|
|
3
|
+
*/
|
|
4
|
+
export function cn(...inputs: any[]): string;
|
|
5
|
+
/**
|
|
6
|
+
* Format currency
|
|
7
|
+
*/
|
|
8
|
+
export function formatCurrency(amount: any, currency?: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Format date
|
|
11
|
+
*/
|
|
12
|
+
export function formatDate(date: any, options?: {}): string;
|
|
13
|
+
/**
|
|
14
|
+
* Format date time
|
|
15
|
+
*/
|
|
16
|
+
export function formatDateTime(date: any): string;
|
|
17
|
+
export function TimeStampFormat(date: any): string;
|
|
18
|
+
/**
|
|
19
|
+
* Format relative time (e.g., "2 hours ago")
|
|
20
|
+
*/
|
|
21
|
+
export function formatRelativeTime(date: any): string;
|
|
22
|
+
/**
|
|
23
|
+
* Truncate string
|
|
24
|
+
*/
|
|
25
|
+
export function truncate(str: any, length?: number): any;
|
|
26
|
+
/**
|
|
27
|
+
* Capitalize first letter
|
|
28
|
+
*/
|
|
29
|
+
export function capitalize(str: any): any;
|
|
30
|
+
/**
|
|
31
|
+
* Generate slug from string
|
|
32
|
+
*/
|
|
33
|
+
export function slugify(str: any): any;
|
|
34
|
+
/**
|
|
35
|
+
* Debounce function
|
|
36
|
+
*/
|
|
37
|
+
export function debounce(func: any, wait?: number): (...args: any[]) => void;
|
|
38
|
+
/**
|
|
39
|
+
* Deep clone object
|
|
40
|
+
*/
|
|
41
|
+
export function deepClone(obj: any): any;
|
|
42
|
+
/**
|
|
43
|
+
* Check if object is empty
|
|
44
|
+
*/
|
|
45
|
+
export function isEmpty(obj: any): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Get initials from name
|
|
48
|
+
*/
|
|
49
|
+
export function getInitials(name: any): any;
|
|
50
|
+
/**
|
|
51
|
+
* Generate random ID
|
|
52
|
+
*/
|
|
53
|
+
export function generateId(): string;
|
|
54
|
+
/**
|
|
55
|
+
* Parse query string to object
|
|
56
|
+
*/
|
|
57
|
+
export function parseQueryString(queryString: any): {};
|
|
58
|
+
/**
|
|
59
|
+
* Build query string from object
|
|
60
|
+
*/
|
|
61
|
+
export function buildQueryString(params: any): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function createCrudStore(options: {
|
|
2
|
+
name: string;
|
|
3
|
+
apiClient: Object;
|
|
4
|
+
endpoint: string;
|
|
5
|
+
transformResponse: Function;
|
|
6
|
+
transformRequest: Function;
|
|
7
|
+
initialState: Object;
|
|
8
|
+
extraActions: Object;
|
|
9
|
+
}): Function;
|
|
10
|
+
export function createStore(options: any): import('zustand').UseBoundStore<import('zustand').StoreApi<any>>;
|
|
11
|
+
export default createCrudStore;
|