warqadui 0.0.300 → 0.0.302

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
@@ -287,7 +287,7 @@ type defaultStateT = {
287
287
  };
288
288
  declare const useModal: (initialState?: boolean) => UseModalReturn;
289
289
 
290
- interface DateInputProps$1<T extends FieldValues> {
290
+ interface DateInputProps$2<T extends FieldValues> {
291
291
  label?: string;
292
292
  error?: string;
293
293
  containerClassName?: string;
@@ -296,7 +296,7 @@ interface DateInputProps$1<T extends FieldValues> {
296
296
  [key: string]: any;
297
297
  }
298
298
 
299
- interface DateInputProps<T extends FieldValues> {
299
+ interface DateInputProps$1<T extends FieldValues> {
300
300
  label?: string;
301
301
  error?: string;
302
302
  containerClassName?: string;
@@ -304,7 +304,7 @@ interface DateInputProps<T extends FieldValues> {
304
304
  form?: UseFormReturn<T>;
305
305
  [key: string]: any;
306
306
  }
307
- declare const DateInput: <T extends FieldValues>(props: DateInputProps<T> & {
307
+ declare const DateInput: <T extends FieldValues>(props: DateInputProps$1<T> & {
308
308
  ref?: React.ForwardedRef<HTMLInputElement>;
309
309
  }) => React.ReactElement;
310
310
 
@@ -611,10 +611,10 @@ declare const Fields: {
611
611
  SearchApiInput: React$1.ForwardRefExoticComponent<Omit<any, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
612
612
  SearchApiContent: React$1.ForwardRefExoticComponent<Omit<any, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
613
613
  SearchApiItem: React$1.ForwardRefExoticComponent<Omit<any, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
614
- DateInput: <T extends react_hook_form.FieldValues>(props: DateInputProps<T> & {
614
+ DateInput: <T extends react_hook_form.FieldValues>(props: DateInputProps$1<T> & {
615
615
  ref?: React.ForwardedRef<HTMLInputElement>;
616
616
  }) => React.ReactElement;
617
- MonthInput: <T extends react_hook_form.FieldValues>(props: DateInputProps$1<T> & {
617
+ MonthInput: <T extends react_hook_form.FieldValues>(props: DateInputProps$2<T> & {
618
618
  ref?: React.ForwardedRef<HTMLInputElement>;
619
619
  }) => React.ReactElement;
620
620
  };
@@ -911,6 +911,7 @@ interface FetchProps {
911
911
  }) => void;
912
912
  };
913
913
  multipart?: boolean;
914
+ headers?: Record<string, any>;
914
915
  }
915
916
  type FetchFunction = (props: Omit<FetchProps, "body">) => Promise<any>;
916
917
  type PostFunction = (props: FetchProps) => Promise<any>;
@@ -925,7 +926,7 @@ declare const useApi: () => {
925
926
  post: PostFunction;
926
927
  put: PutFunction;
927
928
  remove: DeleteFunction;
928
- fetchPdf: ({ url, v, method, body, }: FetchProps & {
929
+ fetchPdf: ({ url, v, method, body, headers, }: FetchProps & {
929
930
  method: "GET" | "POST";
930
931
  }) => Promise<{
931
932
  ok: boolean;
@@ -2832,6 +2833,18 @@ interface SelectOption<T = string | number> {
2832
2833
  badge?: string;
2833
2834
  }
2834
2835
 
2836
+ interface DateInputProps<T extends FieldValues = any> extends BaseInputProps<T> {
2837
+ value?: any;
2838
+ onChange?: (dateString: string, date?: dayjs.Dayjs | null) => void;
2839
+ onBlur?: (e?: React__default.FocusEvent<HTMLInputElement>) => void;
2840
+ format?: string;
2841
+ picker?: "date" | "week" | "month" | "quarter" | "year";
2842
+ disabledDate?: (currentDate: dayjs.Dayjs) => boolean;
2843
+ allowClear?: boolean;
2844
+ showTime?: boolean | object;
2845
+ needConfirm?: boolean;
2846
+ }
2847
+
2835
2848
  interface SelectInputProps<T = string | number> extends BaseInputProps {
2836
2849
  options: SelectOption<T>[];
2837
2850
  value?: T;
@@ -2899,6 +2912,7 @@ declare const AntdFormInput: {
2899
2912
  Number: React$1.ForwardRefExoticComponent<NumberInputProps & React$1.RefAttributes<HTMLInputElement>>;
2900
2913
  Amount: React$1.ForwardRefExoticComponent<AmountInputProps & React$1.RefAttributes<HTMLInputElement>>;
2901
2914
  Select: React$1.ForwardRefExoticComponent<SelectInputProps<string | number> & React$1.RefAttributes<HTMLButtonElement>>;
2915
+ Date: React$1.ForwardRefExoticComponent<DateInputProps<any> & React$1.RefAttributes<any>>;
2902
2916
  };
2903
2917
 
2904
- export { AccountBalances, AccountFields, AccountForm, AccountReport, AccountStatements, type AccountType, Accounts, AdminProtectedRoute, AntdFormInput, Badge, type BadgeProps, type BranchesContext, BrandField, BrandForm$1 as BrandForm, Branding, type BrandingProps, Brands, Breadcrumbs, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CargoIM, CargoIMReport, Categories, CategoryCard, CategoryField, CategoryForm$1 as CategoryForm, type CategoryItem, ClassicSpin, ClothendStockAdjustment, ClothendStockTransfer, CodeBlock, ConfirmModal, type ConfirmModalProps, type CreateAccountSchemaType, type CreateBrandSchemaType, type CreateCategorySchemaType, type CreatePackSchemaType, type CreateProductSchemaType, type CreateWalletSchemaType, CurrencyTransactions, type CurrencyType$2 as CurrencyType, DashboardLayout, DataTable, type DataTableColumn, DateInput, type DateInputProps, DateSalesReport, type DeleteFunction, Dgl, Dropdown, type DropdownItem, type DropdownProps, type EnumsConfig, ErrorPage, type ErrorPageProps, ExpenseAReport, ExpenseAccountReport, ExpenseAccountStatement as ExpenseAccountStatements, ExpenseForm$1 as ExpenseForm, type ExpenseSchemaType, Expenses, type FetchFunction, type FetchProps, Fields, Floors, Forex2Accounts, ForexAccountReport, ForexAccountStatements, ForexAccounts, ForexCurrencyAccountReport, ForexDubaiToChina, ForexDubaiToChinaForm, type ForexDubaiToChinaSchemaType, ForexExpenseForm, ForexExpenses, ForexExpensesReport, ForexTransactions, ForexTransferForm, type ForexTransferSchemaType, ForexTransfers, Guard, InAndOut, InfoGrid, Input, type InputProps, InvoiceManager, InvoiceManagerReport, ItemReport, JournalForm$2 as JournalForm, type JournalSchemaType, Journals$2 as Journals, Lease, LeaseAccountReport, LeaseAccountStatements, LeaseCollection, LeaseRentOverViewCard, LeaseRentOverviews, LinkUser, LoadingBox, LoadingSpin, type LoginSchema, type LoginTheme, Messages, Modal, type ModalProps, MoneyTransferForm, type MoneyTransferSchemaType, MoneyTransfers, type NavItem, type NavItems, type Option, OverlaySpin, _default as PackField, PackForm, type PackProductItemSchemaType, Packs, PageA4, PageHeader, PaymentForm$2 as PaymentForm, type PaymentSchemaType, Payments$2 as Payments, type PdfOptions, PhoneInput, type PhoneInputProps$1 as PhoneInputProps, type PostFunction, PostTable, type PostTableActions, type PostTableChangeParams, Posts, ProductField, ProductForm$1 as ProductForm, ProductImage, ProductList, Products, ProfileAccount, ProfileCard, type ProfileCardProps, ProfileDropdown, type ProfileDropdownItem, type ProfileDropdownProps, ProfilePage, ProfileTransactionReport, ProfileView, type ProfileViewInfoItem, type ProfileViewProps, ProfitAndLossReport, ProtectedRoute, type PutFunction, RealestateAccountReport, RealEastateStatements as RealestateAccountStatements, RealEastateAccounts as RealestateAccounts, ResetPasswordPage, type Role, Sale2, SaleStockAdjustment, SaleStockForm, SearchApi, SearchApiContent, SearchApiInput, SearchApiItem, type SearchApiProps, SearchApiTrigger, Select, SelectContent, SelectItem, type SelectProps, SelectTrigger, ShopendAccountReport, SimpleTable, type SimpleTableColumn, PosStockAdjustment as StockAdjustmentForm, StockLevel, PosStockTransfer as StockTransferForm, type StorageManager, type StoreConfig, type SummaryColumn, SummaryTable, type SummaryTableProps, Textarea, type TextareaProps, type ThemeConfig, ThemeProvider, ThemeToggle, ThemedLogin, Tickets, TodayForexTransaction, Transaction3, UnProtectedRoute, Units, type UseModalReturn, UserBranches, UserForm, UserProfile, UserUpdate, Users, Views, WalletAdjustmentForm, type WalletAdjustmentSchemaType, WalletAdjustments, WalletField, WalletForm, WalletOverView, WalletReport, WalletStatements, Wallets, type WarqadConfig, type WarqadConfigContextType, WarqadProvider, type apiConfig, createAccountSchema, createBrandSchema, createCategorySchema, createPackSchema, createProductSchema, createUserSchema, type createUserSchemaType, createWalletSchema, expenseSchema, forexDubaiToChinaSchema, forexTransferSchema, generatePdf, journalSchema, linkUserSchema, type linkUserSchemaType, manageBranchSchema, type manageBranchSchemaType, moneyTransferSchema, packProductItemSchema, packTypes, paymentSchema, resetPasswordSchema, type resetPasswordSchemaType, storage, updateUserEmailSchema, type updateUserEmailSchemaType, updateUserSchema, type updateUserSchemaType, useA4CategoryView, useA4StatementView, useAntdImageUpload, useApi, useApp, useAuth, useAuthStore, useFirebaseStorage, useLogin, useModal, usePostView, useSearchApiContext, useSelectContext, useTheme, useTicketView, useTransaction, useWarqadConfig, useWarqadSocket, verifyUserEmailSchema, type verifyUserEmailSchemaType, walletAdjustmentSchema };
2918
+ export { AccountBalances, AccountFields, AccountForm, AccountReport, AccountStatements, type AccountType, Accounts, AdminProtectedRoute, AntdFormInput, Badge, type BadgeProps, type BranchesContext, BrandField, BrandForm$1 as BrandForm, Branding, type BrandingProps, Brands, Breadcrumbs, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CargoIM, CargoIMReport, Categories, CategoryCard, CategoryField, CategoryForm$1 as CategoryForm, type CategoryItem, ClassicSpin, ClothendStockAdjustment, ClothendStockTransfer, CodeBlock, ConfirmModal, type ConfirmModalProps, type CreateAccountSchemaType, type CreateBrandSchemaType, type CreateCategorySchemaType, type CreatePackSchemaType, type CreateProductSchemaType, type CreateWalletSchemaType, CurrencyTransactions, type CurrencyType$2 as CurrencyType, DashboardLayout, DataTable, type DataTableColumn, DateInput, type DateInputProps$1 as DateInputProps, DateSalesReport, type DeleteFunction, Dgl, Dropdown, type DropdownItem, type DropdownProps, type EnumsConfig, ErrorPage, type ErrorPageProps, ExpenseAReport, ExpenseAccountReport, ExpenseAccountStatement as ExpenseAccountStatements, ExpenseForm$1 as ExpenseForm, type ExpenseSchemaType, Expenses, type FetchFunction, type FetchProps, Fields, Floors, Forex2Accounts, ForexAccountReport, ForexAccountStatements, ForexAccounts, ForexCurrencyAccountReport, ForexDubaiToChina, ForexDubaiToChinaForm, type ForexDubaiToChinaSchemaType, ForexExpenseForm, ForexExpenses, ForexExpensesReport, ForexTransactions, ForexTransferForm, type ForexTransferSchemaType, ForexTransfers, Guard, InAndOut, InfoGrid, Input, type InputProps, InvoiceManager, InvoiceManagerReport, ItemReport, JournalForm$2 as JournalForm, type JournalSchemaType, Journals$2 as Journals, Lease, LeaseAccountReport, LeaseAccountStatements, LeaseCollection, LeaseRentOverViewCard, LeaseRentOverviews, LinkUser, LoadingBox, LoadingSpin, type LoginSchema, type LoginTheme, Messages, Modal, type ModalProps, MoneyTransferForm, type MoneyTransferSchemaType, MoneyTransfers, type NavItem, type NavItems, type Option, OverlaySpin, _default as PackField, PackForm, type PackProductItemSchemaType, Packs, PageA4, PageHeader, PaymentForm$2 as PaymentForm, type PaymentSchemaType, Payments$2 as Payments, type PdfOptions, PhoneInput, type PhoneInputProps$1 as PhoneInputProps, type PostFunction, PostTable, type PostTableActions, type PostTableChangeParams, Posts, ProductField, ProductForm$1 as ProductForm, ProductImage, ProductList, Products, ProfileAccount, ProfileCard, type ProfileCardProps, ProfileDropdown, type ProfileDropdownItem, type ProfileDropdownProps, ProfilePage, ProfileTransactionReport, ProfileView, type ProfileViewInfoItem, type ProfileViewProps, ProfitAndLossReport, ProtectedRoute, type PutFunction, RealestateAccountReport, RealEastateStatements as RealestateAccountStatements, RealEastateAccounts as RealestateAccounts, ResetPasswordPage, type Role, Sale2, SaleStockAdjustment, SaleStockForm, SearchApi, SearchApiContent, SearchApiInput, SearchApiItem, type SearchApiProps, SearchApiTrigger, Select, SelectContent, SelectItem, type SelectProps, SelectTrigger, ShopendAccountReport, SimpleTable, type SimpleTableColumn, PosStockAdjustment as StockAdjustmentForm, StockLevel, PosStockTransfer as StockTransferForm, type StorageManager, type StoreConfig, type SummaryColumn, SummaryTable, type SummaryTableProps, Textarea, type TextareaProps, type ThemeConfig, ThemeProvider, ThemeToggle, ThemedLogin, Tickets, TodayForexTransaction, Transaction3, UnProtectedRoute, Units, type UseModalReturn, UserBranches, UserForm, UserProfile, UserUpdate, Users, Views, WalletAdjustmentForm, type WalletAdjustmentSchemaType, WalletAdjustments, WalletField, WalletForm, WalletOverView, WalletReport, WalletStatements, Wallets, type WarqadConfig, type WarqadConfigContextType, WarqadProvider, type apiConfig, createAccountSchema, createBrandSchema, createCategorySchema, createPackSchema, createProductSchema, createUserSchema, type createUserSchemaType, createWalletSchema, expenseSchema, forexDubaiToChinaSchema, forexTransferSchema, generatePdf, journalSchema, linkUserSchema, type linkUserSchemaType, manageBranchSchema, type manageBranchSchemaType, moneyTransferSchema, packProductItemSchema, packTypes, paymentSchema, resetPasswordSchema, type resetPasswordSchemaType, storage, updateUserEmailSchema, type updateUserEmailSchemaType, updateUserSchema, type updateUserSchemaType, useA4CategoryView, useA4StatementView, useAntdImageUpload, useApi, useApp, useAuth, useAuthStore, useFirebaseStorage, useLogin, useModal, usePostView, useSearchApiContext, useSelectContext, useTheme, useTicketView, useTransaction, useWarqadConfig, useWarqadSocket, verifyUserEmailSchema, type verifyUserEmailSchemaType, walletAdjustmentSchema };
package/dist/index.d.ts CHANGED
@@ -287,7 +287,7 @@ type defaultStateT = {
287
287
  };
288
288
  declare const useModal: (initialState?: boolean) => UseModalReturn;
289
289
 
290
- interface DateInputProps$1<T extends FieldValues> {
290
+ interface DateInputProps$2<T extends FieldValues> {
291
291
  label?: string;
292
292
  error?: string;
293
293
  containerClassName?: string;
@@ -296,7 +296,7 @@ interface DateInputProps$1<T extends FieldValues> {
296
296
  [key: string]: any;
297
297
  }
298
298
 
299
- interface DateInputProps<T extends FieldValues> {
299
+ interface DateInputProps$1<T extends FieldValues> {
300
300
  label?: string;
301
301
  error?: string;
302
302
  containerClassName?: string;
@@ -304,7 +304,7 @@ interface DateInputProps<T extends FieldValues> {
304
304
  form?: UseFormReturn<T>;
305
305
  [key: string]: any;
306
306
  }
307
- declare const DateInput: <T extends FieldValues>(props: DateInputProps<T> & {
307
+ declare const DateInput: <T extends FieldValues>(props: DateInputProps$1<T> & {
308
308
  ref?: React.ForwardedRef<HTMLInputElement>;
309
309
  }) => React.ReactElement;
310
310
 
@@ -611,10 +611,10 @@ declare const Fields: {
611
611
  SearchApiInput: React$1.ForwardRefExoticComponent<Omit<any, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
612
612
  SearchApiContent: React$1.ForwardRefExoticComponent<Omit<any, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
613
613
  SearchApiItem: React$1.ForwardRefExoticComponent<Omit<any, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
614
- DateInput: <T extends react_hook_form.FieldValues>(props: DateInputProps<T> & {
614
+ DateInput: <T extends react_hook_form.FieldValues>(props: DateInputProps$1<T> & {
615
615
  ref?: React.ForwardedRef<HTMLInputElement>;
616
616
  }) => React.ReactElement;
617
- MonthInput: <T extends react_hook_form.FieldValues>(props: DateInputProps$1<T> & {
617
+ MonthInput: <T extends react_hook_form.FieldValues>(props: DateInputProps$2<T> & {
618
618
  ref?: React.ForwardedRef<HTMLInputElement>;
619
619
  }) => React.ReactElement;
620
620
  };
@@ -911,6 +911,7 @@ interface FetchProps {
911
911
  }) => void;
912
912
  };
913
913
  multipart?: boolean;
914
+ headers?: Record<string, any>;
914
915
  }
915
916
  type FetchFunction = (props: Omit<FetchProps, "body">) => Promise<any>;
916
917
  type PostFunction = (props: FetchProps) => Promise<any>;
@@ -925,7 +926,7 @@ declare const useApi: () => {
925
926
  post: PostFunction;
926
927
  put: PutFunction;
927
928
  remove: DeleteFunction;
928
- fetchPdf: ({ url, v, method, body, }: FetchProps & {
929
+ fetchPdf: ({ url, v, method, body, headers, }: FetchProps & {
929
930
  method: "GET" | "POST";
930
931
  }) => Promise<{
931
932
  ok: boolean;
@@ -2832,6 +2833,18 @@ interface SelectOption<T = string | number> {
2832
2833
  badge?: string;
2833
2834
  }
2834
2835
 
2836
+ interface DateInputProps<T extends FieldValues = any> extends BaseInputProps<T> {
2837
+ value?: any;
2838
+ onChange?: (dateString: string, date?: dayjs.Dayjs | null) => void;
2839
+ onBlur?: (e?: React__default.FocusEvent<HTMLInputElement>) => void;
2840
+ format?: string;
2841
+ picker?: "date" | "week" | "month" | "quarter" | "year";
2842
+ disabledDate?: (currentDate: dayjs.Dayjs) => boolean;
2843
+ allowClear?: boolean;
2844
+ showTime?: boolean | object;
2845
+ needConfirm?: boolean;
2846
+ }
2847
+
2835
2848
  interface SelectInputProps<T = string | number> extends BaseInputProps {
2836
2849
  options: SelectOption<T>[];
2837
2850
  value?: T;
@@ -2899,6 +2912,7 @@ declare const AntdFormInput: {
2899
2912
  Number: React$1.ForwardRefExoticComponent<NumberInputProps & React$1.RefAttributes<HTMLInputElement>>;
2900
2913
  Amount: React$1.ForwardRefExoticComponent<AmountInputProps & React$1.RefAttributes<HTMLInputElement>>;
2901
2914
  Select: React$1.ForwardRefExoticComponent<SelectInputProps<string | number> & React$1.RefAttributes<HTMLButtonElement>>;
2915
+ Date: React$1.ForwardRefExoticComponent<DateInputProps<any> & React$1.RefAttributes<any>>;
2902
2916
  };
2903
2917
 
2904
- export { AccountBalances, AccountFields, AccountForm, AccountReport, AccountStatements, type AccountType, Accounts, AdminProtectedRoute, AntdFormInput, Badge, type BadgeProps, type BranchesContext, BrandField, BrandForm$1 as BrandForm, Branding, type BrandingProps, Brands, Breadcrumbs, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CargoIM, CargoIMReport, Categories, CategoryCard, CategoryField, CategoryForm$1 as CategoryForm, type CategoryItem, ClassicSpin, ClothendStockAdjustment, ClothendStockTransfer, CodeBlock, ConfirmModal, type ConfirmModalProps, type CreateAccountSchemaType, type CreateBrandSchemaType, type CreateCategorySchemaType, type CreatePackSchemaType, type CreateProductSchemaType, type CreateWalletSchemaType, CurrencyTransactions, type CurrencyType$2 as CurrencyType, DashboardLayout, DataTable, type DataTableColumn, DateInput, type DateInputProps, DateSalesReport, type DeleteFunction, Dgl, Dropdown, type DropdownItem, type DropdownProps, type EnumsConfig, ErrorPage, type ErrorPageProps, ExpenseAReport, ExpenseAccountReport, ExpenseAccountStatement as ExpenseAccountStatements, ExpenseForm$1 as ExpenseForm, type ExpenseSchemaType, Expenses, type FetchFunction, type FetchProps, Fields, Floors, Forex2Accounts, ForexAccountReport, ForexAccountStatements, ForexAccounts, ForexCurrencyAccountReport, ForexDubaiToChina, ForexDubaiToChinaForm, type ForexDubaiToChinaSchemaType, ForexExpenseForm, ForexExpenses, ForexExpensesReport, ForexTransactions, ForexTransferForm, type ForexTransferSchemaType, ForexTransfers, Guard, InAndOut, InfoGrid, Input, type InputProps, InvoiceManager, InvoiceManagerReport, ItemReport, JournalForm$2 as JournalForm, type JournalSchemaType, Journals$2 as Journals, Lease, LeaseAccountReport, LeaseAccountStatements, LeaseCollection, LeaseRentOverViewCard, LeaseRentOverviews, LinkUser, LoadingBox, LoadingSpin, type LoginSchema, type LoginTheme, Messages, Modal, type ModalProps, MoneyTransferForm, type MoneyTransferSchemaType, MoneyTransfers, type NavItem, type NavItems, type Option, OverlaySpin, _default as PackField, PackForm, type PackProductItemSchemaType, Packs, PageA4, PageHeader, PaymentForm$2 as PaymentForm, type PaymentSchemaType, Payments$2 as Payments, type PdfOptions, PhoneInput, type PhoneInputProps$1 as PhoneInputProps, type PostFunction, PostTable, type PostTableActions, type PostTableChangeParams, Posts, ProductField, ProductForm$1 as ProductForm, ProductImage, ProductList, Products, ProfileAccount, ProfileCard, type ProfileCardProps, ProfileDropdown, type ProfileDropdownItem, type ProfileDropdownProps, ProfilePage, ProfileTransactionReport, ProfileView, type ProfileViewInfoItem, type ProfileViewProps, ProfitAndLossReport, ProtectedRoute, type PutFunction, RealestateAccountReport, RealEastateStatements as RealestateAccountStatements, RealEastateAccounts as RealestateAccounts, ResetPasswordPage, type Role, Sale2, SaleStockAdjustment, SaleStockForm, SearchApi, SearchApiContent, SearchApiInput, SearchApiItem, type SearchApiProps, SearchApiTrigger, Select, SelectContent, SelectItem, type SelectProps, SelectTrigger, ShopendAccountReport, SimpleTable, type SimpleTableColumn, PosStockAdjustment as StockAdjustmentForm, StockLevel, PosStockTransfer as StockTransferForm, type StorageManager, type StoreConfig, type SummaryColumn, SummaryTable, type SummaryTableProps, Textarea, type TextareaProps, type ThemeConfig, ThemeProvider, ThemeToggle, ThemedLogin, Tickets, TodayForexTransaction, Transaction3, UnProtectedRoute, Units, type UseModalReturn, UserBranches, UserForm, UserProfile, UserUpdate, Users, Views, WalletAdjustmentForm, type WalletAdjustmentSchemaType, WalletAdjustments, WalletField, WalletForm, WalletOverView, WalletReport, WalletStatements, Wallets, type WarqadConfig, type WarqadConfigContextType, WarqadProvider, type apiConfig, createAccountSchema, createBrandSchema, createCategorySchema, createPackSchema, createProductSchema, createUserSchema, type createUserSchemaType, createWalletSchema, expenseSchema, forexDubaiToChinaSchema, forexTransferSchema, generatePdf, journalSchema, linkUserSchema, type linkUserSchemaType, manageBranchSchema, type manageBranchSchemaType, moneyTransferSchema, packProductItemSchema, packTypes, paymentSchema, resetPasswordSchema, type resetPasswordSchemaType, storage, updateUserEmailSchema, type updateUserEmailSchemaType, updateUserSchema, type updateUserSchemaType, useA4CategoryView, useA4StatementView, useAntdImageUpload, useApi, useApp, useAuth, useAuthStore, useFirebaseStorage, useLogin, useModal, usePostView, useSearchApiContext, useSelectContext, useTheme, useTicketView, useTransaction, useWarqadConfig, useWarqadSocket, verifyUserEmailSchema, type verifyUserEmailSchemaType, walletAdjustmentSchema };
2918
+ export { AccountBalances, AccountFields, AccountForm, AccountReport, AccountStatements, type AccountType, Accounts, AdminProtectedRoute, AntdFormInput, Badge, type BadgeProps, type BranchesContext, BrandField, BrandForm$1 as BrandForm, Branding, type BrandingProps, Brands, Breadcrumbs, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CargoIM, CargoIMReport, Categories, CategoryCard, CategoryField, CategoryForm$1 as CategoryForm, type CategoryItem, ClassicSpin, ClothendStockAdjustment, ClothendStockTransfer, CodeBlock, ConfirmModal, type ConfirmModalProps, type CreateAccountSchemaType, type CreateBrandSchemaType, type CreateCategorySchemaType, type CreatePackSchemaType, type CreateProductSchemaType, type CreateWalletSchemaType, CurrencyTransactions, type CurrencyType$2 as CurrencyType, DashboardLayout, DataTable, type DataTableColumn, DateInput, type DateInputProps$1 as DateInputProps, DateSalesReport, type DeleteFunction, Dgl, Dropdown, type DropdownItem, type DropdownProps, type EnumsConfig, ErrorPage, type ErrorPageProps, ExpenseAReport, ExpenseAccountReport, ExpenseAccountStatement as ExpenseAccountStatements, ExpenseForm$1 as ExpenseForm, type ExpenseSchemaType, Expenses, type FetchFunction, type FetchProps, Fields, Floors, Forex2Accounts, ForexAccountReport, ForexAccountStatements, ForexAccounts, ForexCurrencyAccountReport, ForexDubaiToChina, ForexDubaiToChinaForm, type ForexDubaiToChinaSchemaType, ForexExpenseForm, ForexExpenses, ForexExpensesReport, ForexTransactions, ForexTransferForm, type ForexTransferSchemaType, ForexTransfers, Guard, InAndOut, InfoGrid, Input, type InputProps, InvoiceManager, InvoiceManagerReport, ItemReport, JournalForm$2 as JournalForm, type JournalSchemaType, Journals$2 as Journals, Lease, LeaseAccountReport, LeaseAccountStatements, LeaseCollection, LeaseRentOverViewCard, LeaseRentOverviews, LinkUser, LoadingBox, LoadingSpin, type LoginSchema, type LoginTheme, Messages, Modal, type ModalProps, MoneyTransferForm, type MoneyTransferSchemaType, MoneyTransfers, type NavItem, type NavItems, type Option, OverlaySpin, _default as PackField, PackForm, type PackProductItemSchemaType, Packs, PageA4, PageHeader, PaymentForm$2 as PaymentForm, type PaymentSchemaType, Payments$2 as Payments, type PdfOptions, PhoneInput, type PhoneInputProps$1 as PhoneInputProps, type PostFunction, PostTable, type PostTableActions, type PostTableChangeParams, Posts, ProductField, ProductForm$1 as ProductForm, ProductImage, ProductList, Products, ProfileAccount, ProfileCard, type ProfileCardProps, ProfileDropdown, type ProfileDropdownItem, type ProfileDropdownProps, ProfilePage, ProfileTransactionReport, ProfileView, type ProfileViewInfoItem, type ProfileViewProps, ProfitAndLossReport, ProtectedRoute, type PutFunction, RealestateAccountReport, RealEastateStatements as RealestateAccountStatements, RealEastateAccounts as RealestateAccounts, ResetPasswordPage, type Role, Sale2, SaleStockAdjustment, SaleStockForm, SearchApi, SearchApiContent, SearchApiInput, SearchApiItem, type SearchApiProps, SearchApiTrigger, Select, SelectContent, SelectItem, type SelectProps, SelectTrigger, ShopendAccountReport, SimpleTable, type SimpleTableColumn, PosStockAdjustment as StockAdjustmentForm, StockLevel, PosStockTransfer as StockTransferForm, type StorageManager, type StoreConfig, type SummaryColumn, SummaryTable, type SummaryTableProps, Textarea, type TextareaProps, type ThemeConfig, ThemeProvider, ThemeToggle, ThemedLogin, Tickets, TodayForexTransaction, Transaction3, UnProtectedRoute, Units, type UseModalReturn, UserBranches, UserForm, UserProfile, UserUpdate, Users, Views, WalletAdjustmentForm, type WalletAdjustmentSchemaType, WalletAdjustments, WalletField, WalletForm, WalletOverView, WalletReport, WalletStatements, Wallets, type WarqadConfig, type WarqadConfigContextType, WarqadProvider, type apiConfig, createAccountSchema, createBrandSchema, createCategorySchema, createPackSchema, createProductSchema, createUserSchema, type createUserSchemaType, createWalletSchema, expenseSchema, forexDubaiToChinaSchema, forexTransferSchema, generatePdf, journalSchema, linkUserSchema, type linkUserSchemaType, manageBranchSchema, type manageBranchSchemaType, moneyTransferSchema, packProductItemSchema, packTypes, paymentSchema, resetPasswordSchema, type resetPasswordSchemaType, storage, updateUserEmailSchema, type updateUserEmailSchemaType, updateUserSchema, type updateUserSchemaType, useA4CategoryView, useA4StatementView, useAntdImageUpload, useApi, useApp, useAuth, useAuthStore, useFirebaseStorage, useLogin, useModal, usePostView, useSearchApiContext, useSelectContext, useTheme, useTicketView, useTransaction, useWarqadConfig, useWarqadSocket, verifyUserEmailSchema, type verifyUserEmailSchemaType, walletAdjustmentSchema };
package/dist/index.js CHANGED
@@ -745,14 +745,14 @@ var useApi = () => {
745
745
  const [isLoading, setIsLoading] = (0, import_react5.useState)(false);
746
746
  const [pdfLoading, setPdfLoading] = (0, import_react5.useState)(false);
747
747
  const [error, setError] = (0, import_react5.useState)(null);
748
- const get = async ({ url, v = 1, params, delay }) => {
748
+ const get = async ({ url, v = 1, params, delay, headers }) => {
749
749
  setIsLoading(true);
750
750
  try {
751
751
  if (delay) await new Promise((r) => setTimeout(r, delay));
752
752
  const prefix = v === 0 ? "" : `/v${v}`;
753
753
  const response = await api.get(`${prefix}${url}`, {
754
754
  params,
755
- headers: { Authorization: `Bearer ${getToken()}` }
755
+ headers: { Authorization: `Bearer ${getToken()}`, ...headers }
756
756
  });
757
757
  setData(response.data);
758
758
  setError(null);
@@ -771,7 +771,8 @@ var useApi = () => {
771
771
  v = 1,
772
772
  body,
773
773
  form,
774
- multipart = false
774
+ multipart = false,
775
+ headers
775
776
  }) => {
776
777
  setIsLoading(true);
777
778
  try {
@@ -799,13 +800,14 @@ var useApi = () => {
799
800
  response = await api.post(`${prefix}${url}`, formData, {
800
801
  headers: {
801
802
  "Content-Type": "multipart/form-data",
802
- Authorization: `Bearer ${getToken()}`
803
+ Authorization: `Bearer ${getToken()}`,
804
+ ...headers
803
805
  }
804
806
  });
805
807
  } else {
806
808
  const prefix = v === 0 ? "" : `/v${v}`;
807
809
  response = await api.post(`${prefix}${url}`, body, {
808
- headers: { Authorization: `Bearer ${getToken()}` }
810
+ headers: { Authorization: `Bearer ${getToken()}`, ...headers }
809
811
  });
810
812
  }
811
813
  setData(response.data);
@@ -828,12 +830,12 @@ var useApi = () => {
828
830
  setIsLoading(false);
829
831
  }
830
832
  };
831
- const put = async ({ url, v = 1, body }) => {
833
+ const put = async ({ url, v = 1, body, headers }) => {
832
834
  setIsLoading(true);
833
835
  try {
834
836
  const prefix = v === 0 ? "" : `/v${v}`;
835
837
  const response = await api.put(`${prefix}${url}`, body, {
836
- headers: { Authorization: `Bearer ${getToken()}` }
838
+ headers: { Authorization: `Bearer ${getToken()}`, ...headers }
837
839
  });
838
840
  setData(response.data);
839
841
  return response.data;
@@ -845,13 +847,13 @@ var useApi = () => {
845
847
  setIsLoading(false);
846
848
  }
847
849
  };
848
- const remove = async ({ url, v = 1, params }) => {
850
+ const remove = async ({ url, v = 1, params, headers }) => {
849
851
  setIsLoading(true);
850
852
  try {
851
853
  const prefix = v === 0 ? "" : `/v${v}`;
852
854
  const response = await api.delete(`${prefix}${url}`, {
853
855
  params,
854
- headers: { Authorization: `Bearer ${getToken()}` }
856
+ headers: { Authorization: `Bearer ${getToken()}`, ...headers }
855
857
  });
856
858
  setData(response.data);
857
859
  setError(null);
@@ -869,7 +871,8 @@ var useApi = () => {
869
871
  url,
870
872
  v = 1,
871
873
  method,
872
- body
874
+ body,
875
+ headers
873
876
  }) => {
874
877
  setPdfLoading(true);
875
878
  try {
@@ -878,7 +881,7 @@ var useApi = () => {
878
881
  method,
879
882
  data: body,
880
883
  responseType: "blob",
881
- headers: { Authorization: `Bearer ${getToken()}` }
884
+ headers: { Authorization: `Bearer ${getToken()}`, ...headers }
882
885
  });
883
886
  if (!response.data || response.data.size === 0) {
884
887
  return { ok: false, message: "Received empty PDF file", errors: [] };
@@ -52508,6 +52511,147 @@ var SelectInput = (0, import_react179.forwardRef)(
52508
52511
  );
52509
52512
  SelectInput.displayName = "SelectInput";
52510
52513
 
52514
+ // src/Antd/inputs/Date.tsx
52515
+ var import_react180 = require("react");
52516
+ var import_antd106 = require("antd");
52517
+ var import_dayjs15 = __toESM(require("dayjs"));
52518
+ var import_customParseFormat3 = __toESM(require("dayjs/plugin/customParseFormat"));
52519
+ var import_lucide_react137 = require("lucide-react");
52520
+ var import_react_hook_form86 = require("react-hook-form");
52521
+ var import_jsx_runtime288 = require("react/jsx-runtime");
52522
+ import_dayjs15.default.extend(import_customParseFormat3.default);
52523
+ var DateInput2 = (0, import_react180.forwardRef)(
52524
+ ({
52525
+ label,
52526
+ id,
52527
+ name,
52528
+ methods,
52529
+ form,
52530
+ required,
52531
+ disabled,
52532
+ readOnly,
52533
+ error,
52534
+ hint,
52535
+ topRight,
52536
+ icon,
52537
+ rightIcon,
52538
+ placeholder = "DD/MM/YYYY",
52539
+ className = "",
52540
+ inputClassName = "",
52541
+ containerClassName = "",
52542
+ size = "md",
52543
+ format = "DD/MM/YYYY",
52544
+ value,
52545
+ onChange,
52546
+ onBlur,
52547
+ allowClear = true,
52548
+ needConfirm = false,
52549
+ picker = "date",
52550
+ disabledDate,
52551
+ showTime,
52552
+ ...rest
52553
+ }, ref2) => {
52554
+ const activeForm = useFormInstance(methods, form);
52555
+ const inputId = id || name || (label ? String(label).toLowerCase().replace(/\s+/g, "-") : void 0);
52556
+ const errorMessage = getFormFieldError(name, activeForm, error);
52557
+ const hasError = Boolean(errorMessage);
52558
+ const sizeHeightClass = size === "sm" ? "h-8 text-xs" : size === "lg" ? "h-12 text-sm" : "h-10 text-xs";
52559
+ const normalizeToDayjs = (val) => {
52560
+ if (!val) return null;
52561
+ if (import_dayjs15.default.isDayjs(val)) return val;
52562
+ if (typeof val === "string") {
52563
+ const parsed = (0, import_dayjs15.default)(val, format, true);
52564
+ if (parsed.isValid()) return parsed;
52565
+ const fallback = (0, import_dayjs15.default)(val);
52566
+ return fallback.isValid() ? fallback : null;
52567
+ }
52568
+ if (val instanceof Date) return (0, import_dayjs15.default)(val);
52569
+ return null;
52570
+ };
52571
+ const renderDatePicker = (pickerRef, currentValue, onValueChange, onInputBlur) => {
52572
+ const dateValue = normalizeToDayjs(currentValue);
52573
+ const calendarIcon = icon || rightIcon || /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(import_lucide_react137.Calendar, { size: 15, className: "text-zinc-400" });
52574
+ const pickerStyles = `w-full rounded-xl border transition-all ${sizeHeightClass} ${icon ? "pl-9" : "pl-3"} pr-3 ${hasError ? "border-rose-400 dark:border-rose-800 bg-rose-50/20 dark:bg-rose-950/20 text-rose-900 dark:text-rose-200 [&.ant-picker-focused]:border-rose-500 [&.ant-picker-focused]:ring-2 [&.ant-picker-focused]:ring-rose-500/20" : "border-zinc-200 dark:border-zinc-700 bg-zinc-50/50 dark:bg-zinc-800/60 text-zinc-900 dark:text-zinc-100 hover:border-zinc-300 dark:hover:border-zinc-600 [&.ant-picker-focused]:border-emerald-500 [&.ant-picker-focused]:ring-2 [&.ant-picker-focused]:ring-emerald-500/20 [&.ant-picker-focused]:bg-white dark:[&.ant-picker-focused]:bg-zinc-900"} ${disabled ? "opacity-60 cursor-not-allowed bg-zinc-100 dark:bg-zinc-800/40" : ""} [&>input]:text-zinc-900! dark:[&>input]:text-zinc-100! [&>input]:placeholder:text-zinc-400! dark:[&>input]:placeholder:text-zinc-500! [&>input]:text-xs ${inputClassName}`;
52575
+ return /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(
52576
+ FormField_default,
52577
+ {
52578
+ label,
52579
+ id: inputId,
52580
+ required,
52581
+ error: errorMessage,
52582
+ hint,
52583
+ topRight,
52584
+ className,
52585
+ children: /* @__PURE__ */ (0, import_jsx_runtime288.jsxs)("div", { className: `relative flex items-center ${containerClassName}`, children: [
52586
+ icon && /* @__PURE__ */ (0, import_jsx_runtime288.jsx)("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none text-zinc-400 z-10", children: icon }),
52587
+ /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(
52588
+ import_antd106.DatePicker,
52589
+ {
52590
+ ref: pickerRef || ref2,
52591
+ id: inputId,
52592
+ format,
52593
+ picker,
52594
+ disabled,
52595
+ placeholder,
52596
+ value: dateValue?.isValid() ? dateValue : null,
52597
+ onChange: (date) => {
52598
+ const formattedStr = date ? date.format(format) : "";
52599
+ onValueChange(formattedStr, date);
52600
+ },
52601
+ onBlur: (e) => {
52602
+ onInputBlur?.();
52603
+ onBlur?.(e);
52604
+ },
52605
+ disabledDate,
52606
+ showTime,
52607
+ allowClear,
52608
+ needConfirm,
52609
+ className: pickerStyles,
52610
+ classNames: { popup: { root: "z-50" } },
52611
+ suffixIcon: icon ? void 0 : calendarIcon,
52612
+ ...rest
52613
+ }
52614
+ )
52615
+ ] })
52616
+ }
52617
+ );
52618
+ };
52619
+ if (activeForm && name) {
52620
+ return /* @__PURE__ */ (0, import_jsx_runtime288.jsx)(
52621
+ import_react_hook_form86.Controller,
52622
+ {
52623
+ control: activeForm.control,
52624
+ name,
52625
+ render: ({
52626
+ field: {
52627
+ onChange: fieldOnChange,
52628
+ value: fieldValue,
52629
+ ref: fieldRef,
52630
+ onBlur: fieldOnBlur
52631
+ }
52632
+ }) => renderDatePicker(
52633
+ fieldRef,
52634
+ fieldValue !== void 0 ? fieldValue : value !== void 0 ? value : "",
52635
+ (formattedStr, dateObj) => {
52636
+ fieldOnChange(formattedStr);
52637
+ onChange?.(formattedStr, dateObj);
52638
+ },
52639
+ fieldOnBlur
52640
+ )
52641
+ }
52642
+ );
52643
+ }
52644
+ return renderDatePicker(
52645
+ ref2,
52646
+ value !== void 0 ? value : "",
52647
+ (formattedStr, dateObj) => {
52648
+ onChange?.(formattedStr, dateObj);
52649
+ }
52650
+ );
52651
+ }
52652
+ );
52653
+ DateInput2.displayName = "DateInput";
52654
+
52511
52655
  // src/Antd/inputs/countryData.ts
52512
52656
  var COUNTRIES = [
52513
52657
  // Primary / Regional (East Africa & Horn of Africa)
@@ -52954,7 +53098,8 @@ var AntdFormInput = {
52954
53098
  Phone: PhoneInput2,
52955
53099
  Number: NumberInput,
52956
53100
  Amount: AmountInput,
52957
- Select: SelectInput
53101
+ Select: SelectInput,
53102
+ Date: DateInput2
52958
53103
  };
52959
53104
  var inputs_default = AntdFormInput;
52960
53105
  // Annotate the CommonJS export names for ESM import in node:
package/dist/index.mjs CHANGED
@@ -526,14 +526,14 @@ var useApi = () => {
526
526
  const [isLoading, setIsLoading] = useState3(false);
527
527
  const [pdfLoading, setPdfLoading] = useState3(false);
528
528
  const [error, setError] = useState3(null);
529
- const get = async ({ url, v = 1, params, delay }) => {
529
+ const get = async ({ url, v = 1, params, delay, headers }) => {
530
530
  setIsLoading(true);
531
531
  try {
532
532
  if (delay) await new Promise((r) => setTimeout(r, delay));
533
533
  const prefix = v === 0 ? "" : `/v${v}`;
534
534
  const response = await api.get(`${prefix}${url}`, {
535
535
  params,
536
- headers: { Authorization: `Bearer ${getToken()}` }
536
+ headers: { Authorization: `Bearer ${getToken()}`, ...headers }
537
537
  });
538
538
  setData(response.data);
539
539
  setError(null);
@@ -552,7 +552,8 @@ var useApi = () => {
552
552
  v = 1,
553
553
  body,
554
554
  form,
555
- multipart = false
555
+ multipart = false,
556
+ headers
556
557
  }) => {
557
558
  setIsLoading(true);
558
559
  try {
@@ -580,13 +581,14 @@ var useApi = () => {
580
581
  response = await api.post(`${prefix}${url}`, formData, {
581
582
  headers: {
582
583
  "Content-Type": "multipart/form-data",
583
- Authorization: `Bearer ${getToken()}`
584
+ Authorization: `Bearer ${getToken()}`,
585
+ ...headers
584
586
  }
585
587
  });
586
588
  } else {
587
589
  const prefix = v === 0 ? "" : `/v${v}`;
588
590
  response = await api.post(`${prefix}${url}`, body, {
589
- headers: { Authorization: `Bearer ${getToken()}` }
591
+ headers: { Authorization: `Bearer ${getToken()}`, ...headers }
590
592
  });
591
593
  }
592
594
  setData(response.data);
@@ -609,12 +611,12 @@ var useApi = () => {
609
611
  setIsLoading(false);
610
612
  }
611
613
  };
612
- const put = async ({ url, v = 1, body }) => {
614
+ const put = async ({ url, v = 1, body, headers }) => {
613
615
  setIsLoading(true);
614
616
  try {
615
617
  const prefix = v === 0 ? "" : `/v${v}`;
616
618
  const response = await api.put(`${prefix}${url}`, body, {
617
- headers: { Authorization: `Bearer ${getToken()}` }
619
+ headers: { Authorization: `Bearer ${getToken()}`, ...headers }
618
620
  });
619
621
  setData(response.data);
620
622
  return response.data;
@@ -626,13 +628,13 @@ var useApi = () => {
626
628
  setIsLoading(false);
627
629
  }
628
630
  };
629
- const remove = async ({ url, v = 1, params }) => {
631
+ const remove = async ({ url, v = 1, params, headers }) => {
630
632
  setIsLoading(true);
631
633
  try {
632
634
  const prefix = v === 0 ? "" : `/v${v}`;
633
635
  const response = await api.delete(`${prefix}${url}`, {
634
636
  params,
635
- headers: { Authorization: `Bearer ${getToken()}` }
637
+ headers: { Authorization: `Bearer ${getToken()}`, ...headers }
636
638
  });
637
639
  setData(response.data);
638
640
  setError(null);
@@ -650,7 +652,8 @@ var useApi = () => {
650
652
  url,
651
653
  v = 1,
652
654
  method,
653
- body
655
+ body,
656
+ headers
654
657
  }) => {
655
658
  setPdfLoading(true);
656
659
  try {
@@ -659,7 +662,7 @@ var useApi = () => {
659
662
  method,
660
663
  data: body,
661
664
  responseType: "blob",
662
- headers: { Authorization: `Bearer ${getToken()}` }
665
+ headers: { Authorization: `Bearer ${getToken()}`, ...headers }
663
666
  });
664
667
  if (!response.data || response.data.size === 0) {
665
668
  return { ok: false, message: "Received empty PDF file", errors: [] };
@@ -52734,6 +52737,147 @@ var SelectInput = forwardRef15(
52734
52737
  );
52735
52738
  SelectInput.displayName = "SelectInput";
52736
52739
 
52740
+ // src/Antd/inputs/Date.tsx
52741
+ import { forwardRef as forwardRef16 } from "react";
52742
+ import { DatePicker as DatePicker11 } from "antd";
52743
+ import dayjs15 from "dayjs";
52744
+ import customParseFormat3 from "dayjs/plugin/customParseFormat";
52745
+ import { Calendar as Calendar24 } from "lucide-react";
52746
+ import { Controller as Controller12 } from "react-hook-form";
52747
+ import { jsx as jsx288, jsxs as jsxs256 } from "react/jsx-runtime";
52748
+ dayjs15.extend(customParseFormat3);
52749
+ var DateInput2 = forwardRef16(
52750
+ ({
52751
+ label,
52752
+ id,
52753
+ name,
52754
+ methods,
52755
+ form,
52756
+ required,
52757
+ disabled,
52758
+ readOnly,
52759
+ error,
52760
+ hint,
52761
+ topRight,
52762
+ icon,
52763
+ rightIcon,
52764
+ placeholder = "DD/MM/YYYY",
52765
+ className = "",
52766
+ inputClassName = "",
52767
+ containerClassName = "",
52768
+ size = "md",
52769
+ format = "DD/MM/YYYY",
52770
+ value,
52771
+ onChange,
52772
+ onBlur,
52773
+ allowClear = true,
52774
+ needConfirm = false,
52775
+ picker = "date",
52776
+ disabledDate,
52777
+ showTime,
52778
+ ...rest
52779
+ }, ref2) => {
52780
+ const activeForm = useFormInstance(methods, form);
52781
+ const inputId = id || name || (label ? String(label).toLowerCase().replace(/\s+/g, "-") : void 0);
52782
+ const errorMessage = getFormFieldError(name, activeForm, error);
52783
+ const hasError = Boolean(errorMessage);
52784
+ const sizeHeightClass = size === "sm" ? "h-8 text-xs" : size === "lg" ? "h-12 text-sm" : "h-10 text-xs";
52785
+ const normalizeToDayjs = (val) => {
52786
+ if (!val) return null;
52787
+ if (dayjs15.isDayjs(val)) return val;
52788
+ if (typeof val === "string") {
52789
+ const parsed = dayjs15(val, format, true);
52790
+ if (parsed.isValid()) return parsed;
52791
+ const fallback = dayjs15(val);
52792
+ return fallback.isValid() ? fallback : null;
52793
+ }
52794
+ if (val instanceof Date) return dayjs15(val);
52795
+ return null;
52796
+ };
52797
+ const renderDatePicker = (pickerRef, currentValue, onValueChange, onInputBlur) => {
52798
+ const dateValue = normalizeToDayjs(currentValue);
52799
+ const calendarIcon = icon || rightIcon || /* @__PURE__ */ jsx288(Calendar24, { size: 15, className: "text-zinc-400" });
52800
+ const pickerStyles = `w-full rounded-xl border transition-all ${sizeHeightClass} ${icon ? "pl-9" : "pl-3"} pr-3 ${hasError ? "border-rose-400 dark:border-rose-800 bg-rose-50/20 dark:bg-rose-950/20 text-rose-900 dark:text-rose-200 [&.ant-picker-focused]:border-rose-500 [&.ant-picker-focused]:ring-2 [&.ant-picker-focused]:ring-rose-500/20" : "border-zinc-200 dark:border-zinc-700 bg-zinc-50/50 dark:bg-zinc-800/60 text-zinc-900 dark:text-zinc-100 hover:border-zinc-300 dark:hover:border-zinc-600 [&.ant-picker-focused]:border-emerald-500 [&.ant-picker-focused]:ring-2 [&.ant-picker-focused]:ring-emerald-500/20 [&.ant-picker-focused]:bg-white dark:[&.ant-picker-focused]:bg-zinc-900"} ${disabled ? "opacity-60 cursor-not-allowed bg-zinc-100 dark:bg-zinc-800/40" : ""} [&>input]:text-zinc-900! dark:[&>input]:text-zinc-100! [&>input]:placeholder:text-zinc-400! dark:[&>input]:placeholder:text-zinc-500! [&>input]:text-xs ${inputClassName}`;
52801
+ return /* @__PURE__ */ jsx288(
52802
+ FormField_default,
52803
+ {
52804
+ label,
52805
+ id: inputId,
52806
+ required,
52807
+ error: errorMessage,
52808
+ hint,
52809
+ topRight,
52810
+ className,
52811
+ children: /* @__PURE__ */ jsxs256("div", { className: `relative flex items-center ${containerClassName}`, children: [
52812
+ icon && /* @__PURE__ */ jsx288("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none text-zinc-400 z-10", children: icon }),
52813
+ /* @__PURE__ */ jsx288(
52814
+ DatePicker11,
52815
+ {
52816
+ ref: pickerRef || ref2,
52817
+ id: inputId,
52818
+ format,
52819
+ picker,
52820
+ disabled,
52821
+ placeholder,
52822
+ value: dateValue?.isValid() ? dateValue : null,
52823
+ onChange: (date) => {
52824
+ const formattedStr = date ? date.format(format) : "";
52825
+ onValueChange(formattedStr, date);
52826
+ },
52827
+ onBlur: (e) => {
52828
+ onInputBlur?.();
52829
+ onBlur?.(e);
52830
+ },
52831
+ disabledDate,
52832
+ showTime,
52833
+ allowClear,
52834
+ needConfirm,
52835
+ className: pickerStyles,
52836
+ classNames: { popup: { root: "z-50" } },
52837
+ suffixIcon: icon ? void 0 : calendarIcon,
52838
+ ...rest
52839
+ }
52840
+ )
52841
+ ] })
52842
+ }
52843
+ );
52844
+ };
52845
+ if (activeForm && name) {
52846
+ return /* @__PURE__ */ jsx288(
52847
+ Controller12,
52848
+ {
52849
+ control: activeForm.control,
52850
+ name,
52851
+ render: ({
52852
+ field: {
52853
+ onChange: fieldOnChange,
52854
+ value: fieldValue,
52855
+ ref: fieldRef,
52856
+ onBlur: fieldOnBlur
52857
+ }
52858
+ }) => renderDatePicker(
52859
+ fieldRef,
52860
+ fieldValue !== void 0 ? fieldValue : value !== void 0 ? value : "",
52861
+ (formattedStr, dateObj) => {
52862
+ fieldOnChange(formattedStr);
52863
+ onChange?.(formattedStr, dateObj);
52864
+ },
52865
+ fieldOnBlur
52866
+ )
52867
+ }
52868
+ );
52869
+ }
52870
+ return renderDatePicker(
52871
+ ref2,
52872
+ value !== void 0 ? value : "",
52873
+ (formattedStr, dateObj) => {
52874
+ onChange?.(formattedStr, dateObj);
52875
+ }
52876
+ );
52877
+ }
52878
+ );
52879
+ DateInput2.displayName = "DateInput";
52880
+
52737
52881
  // src/Antd/inputs/countryData.ts
52738
52882
  var COUNTRIES = [
52739
52883
  // Primary / Regional (East Africa & Horn of Africa)
@@ -53180,7 +53324,8 @@ var AntdFormInput = {
53180
53324
  Phone: PhoneInput2,
53181
53325
  Number: NumberInput,
53182
53326
  Amount: AmountInput,
53183
- Select: SelectInput
53327
+ Select: SelectInput,
53328
+ Date: DateInput2
53184
53329
  };
53185
53330
  var inputs_default = AntdFormInput;
53186
53331
  export {
package/dist/styles.js CHANGED
@@ -3519,6 +3519,10 @@ select:-webkit-autofill:focus {
3519
3519
  --tw-border-opacity: 1;
3520
3520
  border-color: rgb(239 68 68 / var(--tw-border-opacity, 1));
3521
3521
  }
3522
+ .hover\\:border-zinc-300:hover {
3523
+ --tw-border-opacity: 1;
3524
+ border-color: rgb(212 212 216 / var(--tw-border-opacity, 1));
3525
+ }
3522
3526
  .hover\\:bg-\\[var\\(--dropdown-hover\\)\\]:hover {
3523
3527
  background-color: var(--dropdown-hover);
3524
3528
  }
@@ -4681,6 +4685,10 @@ select:-webkit-autofill:focus {
4681
4685
  .dark\\:hover\\:border-indigo-900\\/50:hover:is(.dark *) {
4682
4686
  border-color: rgb(49 46 129 / 0.5);
4683
4687
  }
4688
+ .dark\\:hover\\:border-zinc-600:hover:is(.dark *) {
4689
+ --tw-border-opacity: 1;
4690
+ border-color: rgb(82 82 91 / var(--tw-border-opacity, 1));
4691
+ }
4684
4692
  .dark\\:hover\\:border-zinc-700:hover:is(.dark *) {
4685
4693
  --tw-border-opacity: 1;
4686
4694
  border-color: rgb(63 63 70 / var(--tw-border-opacity, 1));
@@ -5144,10 +5152,18 @@ select:-webkit-autofill:focus {
5144
5152
  var(--tw-shadow);
5145
5153
  }
5146
5154
  }
5155
+ .\\[\\&\\.ant-picker-focused\\]\\:border-emerald-500.ant-picker-focused {
5156
+ --tw-border-opacity: 1;
5157
+ border-color: rgb(16 185 129 / var(--tw-border-opacity, 1));
5158
+ }
5147
5159
  .\\[\\&\\.ant-picker-focused\\]\\:border-red-500.ant-picker-focused {
5148
5160
  --tw-border-opacity: 1;
5149
5161
  border-color: rgb(239 68 68 / var(--tw-border-opacity, 1));
5150
5162
  }
5163
+ .\\[\\&\\.ant-picker-focused\\]\\:border-rose-500.ant-picker-focused {
5164
+ --tw-border-opacity: 1;
5165
+ border-color: rgb(244 63 94 / var(--tw-border-opacity, 1));
5166
+ }
5151
5167
  .\\[\\&\\.ant-picker-focused\\]\\:bg-white.ant-picker-focused {
5152
5168
  --tw-bg-opacity: 1;
5153
5169
  background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
@@ -5171,9 +5187,15 @@ select:-webkit-autofill:focus {
5171
5187
  var(--tw-ring-shadow),
5172
5188
  var(--tw-shadow, 0 0 #0000);
5173
5189
  }
5190
+ .\\[\\&\\.ant-picker-focused\\]\\:ring-emerald-500\\/20.ant-picker-focused {
5191
+ --tw-ring-color: rgb(16 185 129 / 0.2);
5192
+ }
5174
5193
  .\\[\\&\\.ant-picker-focused\\]\\:ring-red-500\\/20.ant-picker-focused {
5175
5194
  --tw-ring-color: rgb(239 68 68 / 0.2);
5176
5195
  }
5196
+ .\\[\\&\\.ant-picker-focused\\]\\:ring-rose-500\\/20.ant-picker-focused {
5197
+ --tw-ring-color: rgb(244 63 94 / 0.2);
5198
+ }
5177
5199
  .dark\\:\\[\\&\\.ant-picker-focused\\]\\:bg-zinc-900.ant-picker-focused:is(.dark *) {
5178
5200
  --tw-bg-opacity: 1;
5179
5201
  background-color: rgb(24 24 27 / var(--tw-bg-opacity, 1));
@@ -5182,6 +5204,10 @@ select:-webkit-autofill:focus {
5182
5204
  font-size: 1rem;
5183
5205
  line-height: 1.5rem;
5184
5206
  }
5207
+ .\\[\\&\\>input\\]\\:text-xs > input {
5208
+ font-size: 0.75rem;
5209
+ line-height: 1rem;
5210
+ }
5185
5211
  .\\[\\&_\\.PhoneInputCountrySelectArrow\\]\\:text-zinc-400 .PhoneInputCountrySelectArrow {
5186
5212
  --tw-text-opacity: 1;
5187
5213
  color: rgb(161 161 170 / var(--tw-text-opacity, 1));
package/dist/styles.mjs CHANGED
@@ -3517,6 +3517,10 @@ select:-webkit-autofill:focus {
3517
3517
  --tw-border-opacity: 1;
3518
3518
  border-color: rgb(239 68 68 / var(--tw-border-opacity, 1));
3519
3519
  }
3520
+ .hover\\:border-zinc-300:hover {
3521
+ --tw-border-opacity: 1;
3522
+ border-color: rgb(212 212 216 / var(--tw-border-opacity, 1));
3523
+ }
3520
3524
  .hover\\:bg-\\[var\\(--dropdown-hover\\)\\]:hover {
3521
3525
  background-color: var(--dropdown-hover);
3522
3526
  }
@@ -4679,6 +4683,10 @@ select:-webkit-autofill:focus {
4679
4683
  .dark\\:hover\\:border-indigo-900\\/50:hover:is(.dark *) {
4680
4684
  border-color: rgb(49 46 129 / 0.5);
4681
4685
  }
4686
+ .dark\\:hover\\:border-zinc-600:hover:is(.dark *) {
4687
+ --tw-border-opacity: 1;
4688
+ border-color: rgb(82 82 91 / var(--tw-border-opacity, 1));
4689
+ }
4682
4690
  .dark\\:hover\\:border-zinc-700:hover:is(.dark *) {
4683
4691
  --tw-border-opacity: 1;
4684
4692
  border-color: rgb(63 63 70 / var(--tw-border-opacity, 1));
@@ -5142,10 +5150,18 @@ select:-webkit-autofill:focus {
5142
5150
  var(--tw-shadow);
5143
5151
  }
5144
5152
  }
5153
+ .\\[\\&\\.ant-picker-focused\\]\\:border-emerald-500.ant-picker-focused {
5154
+ --tw-border-opacity: 1;
5155
+ border-color: rgb(16 185 129 / var(--tw-border-opacity, 1));
5156
+ }
5145
5157
  .\\[\\&\\.ant-picker-focused\\]\\:border-red-500.ant-picker-focused {
5146
5158
  --tw-border-opacity: 1;
5147
5159
  border-color: rgb(239 68 68 / var(--tw-border-opacity, 1));
5148
5160
  }
5161
+ .\\[\\&\\.ant-picker-focused\\]\\:border-rose-500.ant-picker-focused {
5162
+ --tw-border-opacity: 1;
5163
+ border-color: rgb(244 63 94 / var(--tw-border-opacity, 1));
5164
+ }
5149
5165
  .\\[\\&\\.ant-picker-focused\\]\\:bg-white.ant-picker-focused {
5150
5166
  --tw-bg-opacity: 1;
5151
5167
  background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
@@ -5169,9 +5185,15 @@ select:-webkit-autofill:focus {
5169
5185
  var(--tw-ring-shadow),
5170
5186
  var(--tw-shadow, 0 0 #0000);
5171
5187
  }
5188
+ .\\[\\&\\.ant-picker-focused\\]\\:ring-emerald-500\\/20.ant-picker-focused {
5189
+ --tw-ring-color: rgb(16 185 129 / 0.2);
5190
+ }
5172
5191
  .\\[\\&\\.ant-picker-focused\\]\\:ring-red-500\\/20.ant-picker-focused {
5173
5192
  --tw-ring-color: rgb(239 68 68 / 0.2);
5174
5193
  }
5194
+ .\\[\\&\\.ant-picker-focused\\]\\:ring-rose-500\\/20.ant-picker-focused {
5195
+ --tw-ring-color: rgb(244 63 94 / 0.2);
5196
+ }
5175
5197
  .dark\\:\\[\\&\\.ant-picker-focused\\]\\:bg-zinc-900.ant-picker-focused:is(.dark *) {
5176
5198
  --tw-bg-opacity: 1;
5177
5199
  background-color: rgb(24 24 27 / var(--tw-bg-opacity, 1));
@@ -5180,6 +5202,10 @@ select:-webkit-autofill:focus {
5180
5202
  font-size: 1rem;
5181
5203
  line-height: 1.5rem;
5182
5204
  }
5205
+ .\\[\\&\\>input\\]\\:text-xs > input {
5206
+ font-size: 0.75rem;
5207
+ line-height: 1rem;
5208
+ }
5183
5209
  .\\[\\&_\\.PhoneInputCountrySelectArrow\\]\\:text-zinc-400 .PhoneInputCountrySelectArrow {
5184
5210
  --tw-text-opacity: 1;
5185
5211
  color: rgb(161 161 170 / var(--tw-text-opacity, 1));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "warqadui",
3
- "version": "0.0.300",
3
+ "version": "0.0.302",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",