warqadui 0.0.50 → 0.0.51

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/index.d.mts CHANGED
@@ -4,6 +4,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react_hook_form from 'react-hook-form';
5
5
  import { FieldValues, Path, UseFormReturn } from 'react-hook-form';
6
6
  import { ColumnDef, SortingState, ColumnFiltersState, RowData } from '@tanstack/react-table';
7
+ import * as z from 'zod';
7
8
  import * as react_to_print from 'react-to-print';
8
9
  import { UploadFile } from 'antd';
9
10
 
@@ -527,6 +528,54 @@ interface BrandingProps {
527
528
  }
528
529
  declare const Branding: React__default.FC<BrandingProps>;
529
530
 
531
+ type LoginTheme = "tech" | "travel" | "healthcare";
532
+ interface BaseLoginProps {
533
+ form: UseFormReturn<LoginSchema>;
534
+ onSubmit: (data: LoginSchema, form: UseFormReturn<LoginSchema>) => void;
535
+ image?: string;
536
+ theme?: LoginTheme;
537
+ title?: string;
538
+ subtitle?: string;
539
+ logo?: React__default.ReactNode;
540
+ footer?: React__default.ReactNode;
541
+ brandName?: string;
542
+ backUrl?: string;
543
+ }
544
+ declare const ThemedLogin: React__default.FC<BaseLoginProps>;
545
+
546
+ declare const defaultLoginSchema: z.ZodObject<{
547
+ email: z.ZodString;
548
+ password: z.ZodString;
549
+ }, "strip", z.ZodTypeAny, {
550
+ email: string;
551
+ password: string;
552
+ }, {
553
+ email: string;
554
+ password: string;
555
+ }>;
556
+ type LoginSchema = z.infer<typeof defaultLoginSchema>;
557
+ interface UseLoginProps {
558
+ theme?: LoginTheme;
559
+ image?: string;
560
+ schema?: z.ZodType<any, any, any>;
561
+ defaultValues?: any;
562
+ onSubmit: (data: any, form: UseFormReturn<LoginSchema>) => void;
563
+ brandName?: string;
564
+ title?: string;
565
+ subtitle?: string;
566
+ backUrl?: string;
567
+ }
568
+ declare const useLogin: (props: UseLoginProps) => {
569
+ form: UseFormReturn<{
570
+ email: string;
571
+ password: string;
572
+ }, any, {
573
+ email: string;
574
+ password: string;
575
+ }>;
576
+ Login: React__default.FC<{}>;
577
+ };
578
+
530
579
  interface FetchProps {
531
580
  url: string;
532
581
  body?: Record<string, any>;
@@ -774,4 +823,4 @@ declare const Views: {
774
823
  }>;
775
824
  };
776
825
 
777
- export { Badge, type BadgeProps, Branding, type BrandingProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CategoryCard, type CategoryItem, ClassicSpin, CodeBlock, DashboardLayout, DataTable, type DataTableColumn, DateInput, type DateInputProps, type DeleteFunction, type FetchFunction, type FetchProps, Fields, InfoGrid, Input, type InputProps, LoadingBox, LoadingSpin, Modal, type ModalProps, type NavItem, type NavItems, type Option, OverlaySpin, PageA4, PageHeader, type PdfOptions, PhoneInput, type PhoneInputProps, type PostFunction, PostTable, type PostTableActions, type PostTableChangeParams, type PutFunction, SearchApi, SearchApiContent, SearchApiInput, SearchApiItem, type SearchApiProps, SearchApiTrigger, Select, SelectContent, SelectItem, type SelectProps, SelectTrigger, SimpleTable, type SimpleTableColumn, type StorageManager, type StoreConfig, Textarea, type TextareaProps, type ThemeConfig, ThemeProvider, ThemeToggle, type UseModalReturn, Views, type WarqadConfig, type WarqadConfigContextType, WarqadProvider, generatePdf, storage, useA4CategoryView, useA4StatementView, useAntdImageUpload, useApi, useModal, useSearchApiContext, useSelectContext, useTheme, useTransaction, useWarqadConfig };
826
+ export { Badge, type BadgeProps, Branding, type BrandingProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CategoryCard, type CategoryItem, ClassicSpin, CodeBlock, DashboardLayout, DataTable, type DataTableColumn, DateInput, type DateInputProps, type DeleteFunction, type FetchFunction, type FetchProps, Fields, InfoGrid, Input, type InputProps, LoadingBox, LoadingSpin, type LoginSchema, type LoginTheme, Modal, type ModalProps, type NavItem, type NavItems, type Option, OverlaySpin, PageA4, PageHeader, type PdfOptions, PhoneInput, type PhoneInputProps, type PostFunction, PostTable, type PostTableActions, type PostTableChangeParams, type PutFunction, SearchApi, SearchApiContent, SearchApiInput, SearchApiItem, type SearchApiProps, SearchApiTrigger, Select, SelectContent, SelectItem, type SelectProps, SelectTrigger, SimpleTable, type SimpleTableColumn, type StorageManager, type StoreConfig, Textarea, type TextareaProps, type ThemeConfig, ThemeProvider, ThemeToggle, ThemedLogin, type UseModalReturn, Views, type WarqadConfig, type WarqadConfigContextType, WarqadProvider, generatePdf, storage, useA4CategoryView, useA4StatementView, useAntdImageUpload, useApi, useLogin, useModal, useSearchApiContext, useSelectContext, useTheme, useTransaction, useWarqadConfig };
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react_hook_form from 'react-hook-form';
5
5
  import { FieldValues, Path, UseFormReturn } from 'react-hook-form';
6
6
  import { ColumnDef, SortingState, ColumnFiltersState, RowData } from '@tanstack/react-table';
7
+ import * as z from 'zod';
7
8
  import * as react_to_print from 'react-to-print';
8
9
  import { UploadFile } from 'antd';
9
10
 
@@ -527,6 +528,54 @@ interface BrandingProps {
527
528
  }
528
529
  declare const Branding: React__default.FC<BrandingProps>;
529
530
 
531
+ type LoginTheme = "tech" | "travel" | "healthcare";
532
+ interface BaseLoginProps {
533
+ form: UseFormReturn<LoginSchema>;
534
+ onSubmit: (data: LoginSchema, form: UseFormReturn<LoginSchema>) => void;
535
+ image?: string;
536
+ theme?: LoginTheme;
537
+ title?: string;
538
+ subtitle?: string;
539
+ logo?: React__default.ReactNode;
540
+ footer?: React__default.ReactNode;
541
+ brandName?: string;
542
+ backUrl?: string;
543
+ }
544
+ declare const ThemedLogin: React__default.FC<BaseLoginProps>;
545
+
546
+ declare const defaultLoginSchema: z.ZodObject<{
547
+ email: z.ZodString;
548
+ password: z.ZodString;
549
+ }, "strip", z.ZodTypeAny, {
550
+ email: string;
551
+ password: string;
552
+ }, {
553
+ email: string;
554
+ password: string;
555
+ }>;
556
+ type LoginSchema = z.infer<typeof defaultLoginSchema>;
557
+ interface UseLoginProps {
558
+ theme?: LoginTheme;
559
+ image?: string;
560
+ schema?: z.ZodType<any, any, any>;
561
+ defaultValues?: any;
562
+ onSubmit: (data: any, form: UseFormReturn<LoginSchema>) => void;
563
+ brandName?: string;
564
+ title?: string;
565
+ subtitle?: string;
566
+ backUrl?: string;
567
+ }
568
+ declare const useLogin: (props: UseLoginProps) => {
569
+ form: UseFormReturn<{
570
+ email: string;
571
+ password: string;
572
+ }, any, {
573
+ email: string;
574
+ password: string;
575
+ }>;
576
+ Login: React__default.FC<{}>;
577
+ };
578
+
530
579
  interface FetchProps {
531
580
  url: string;
532
581
  body?: Record<string, any>;
@@ -774,4 +823,4 @@ declare const Views: {
774
823
  }>;
775
824
  };
776
825
 
777
- export { Badge, type BadgeProps, Branding, type BrandingProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CategoryCard, type CategoryItem, ClassicSpin, CodeBlock, DashboardLayout, DataTable, type DataTableColumn, DateInput, type DateInputProps, type DeleteFunction, type FetchFunction, type FetchProps, Fields, InfoGrid, Input, type InputProps, LoadingBox, LoadingSpin, Modal, type ModalProps, type NavItem, type NavItems, type Option, OverlaySpin, PageA4, PageHeader, type PdfOptions, PhoneInput, type PhoneInputProps, type PostFunction, PostTable, type PostTableActions, type PostTableChangeParams, type PutFunction, SearchApi, SearchApiContent, SearchApiInput, SearchApiItem, type SearchApiProps, SearchApiTrigger, Select, SelectContent, SelectItem, type SelectProps, SelectTrigger, SimpleTable, type SimpleTableColumn, type StorageManager, type StoreConfig, Textarea, type TextareaProps, type ThemeConfig, ThemeProvider, ThemeToggle, type UseModalReturn, Views, type WarqadConfig, type WarqadConfigContextType, WarqadProvider, generatePdf, storage, useA4CategoryView, useA4StatementView, useAntdImageUpload, useApi, useModal, useSearchApiContext, useSelectContext, useTheme, useTransaction, useWarqadConfig };
826
+ export { Badge, type BadgeProps, Branding, type BrandingProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CategoryCard, type CategoryItem, ClassicSpin, CodeBlock, DashboardLayout, DataTable, type DataTableColumn, DateInput, type DateInputProps, type DeleteFunction, type FetchFunction, type FetchProps, Fields, InfoGrid, Input, type InputProps, LoadingBox, LoadingSpin, type LoginSchema, type LoginTheme, Modal, type ModalProps, type NavItem, type NavItems, type Option, OverlaySpin, PageA4, PageHeader, type PdfOptions, PhoneInput, type PhoneInputProps, type PostFunction, PostTable, type PostTableActions, type PostTableChangeParams, type PutFunction, SearchApi, SearchApiContent, SearchApiInput, SearchApiItem, type SearchApiProps, SearchApiTrigger, Select, SelectContent, SelectItem, type SelectProps, SelectTrigger, SimpleTable, type SimpleTableColumn, type StorageManager, type StoreConfig, Textarea, type TextareaProps, type ThemeConfig, ThemeProvider, ThemeToggle, ThemedLogin, type UseModalReturn, Views, type WarqadConfig, type WarqadConfigContextType, WarqadProvider, generatePdf, storage, useA4CategoryView, useA4StatementView, useAntdImageUpload, useApi, useLogin, useModal, useSearchApiContext, useSelectContext, useTheme, useTransaction, useWarqadConfig };