warqadui 0.0.30 → 0.0.32
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 +37 -5
- package/dist/index.d.ts +37 -5
- package/dist/index.js +461 -235
- package/dist/index.mjs +496 -257
- package/dist/styles.js +17 -30
- package/dist/styles.mjs +17 -30
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -351,7 +351,7 @@ interface PhoneInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElemen
|
|
|
351
351
|
}
|
|
352
352
|
declare const PhoneInput: React$1.ForwardRefExoticComponent<PhoneInputProps & React$1.RefAttributes<any>>;
|
|
353
353
|
|
|
354
|
-
interface InputProps<T extends FieldValues> extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "name" | "form"> {
|
|
354
|
+
interface InputProps<T extends FieldValues> extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "name" | "form" | "onChange"> {
|
|
355
355
|
label?: string;
|
|
356
356
|
icon?: React.ReactNode;
|
|
357
357
|
error?: string;
|
|
@@ -360,6 +360,7 @@ interface InputProps<T extends FieldValues> extends Omit<React.InputHTMLAttribut
|
|
|
360
360
|
form?: UseFormReturn<T>;
|
|
361
361
|
type?: "text" | "number" | "email" | "password";
|
|
362
362
|
variant?: "ghost" | "default";
|
|
363
|
+
onChange?: (value: any) => void;
|
|
363
364
|
}
|
|
364
365
|
declare const Input: <T extends FieldValues>(props: InputProps<T> & {
|
|
365
366
|
ref?: React.ForwardedRef<HTMLInputElement>;
|
|
@@ -421,9 +422,10 @@ interface DataTableProps<TData, TValue> {
|
|
|
421
422
|
}) => void;
|
|
422
423
|
selectable?: boolean;
|
|
423
424
|
filterables?: boolean;
|
|
425
|
+
emptyState?: React__default.ReactNode;
|
|
424
426
|
}
|
|
425
427
|
declare function DataTable<TData, TValue>({ columns: userColumns, data, isLoading, pageRows, searchPlaceholder, className, verticalLines, rowPadding, index, renderSubComponent, hasSubComponent, // default to true
|
|
426
|
-
defaultExpanded, onChange, selectable, filterables, }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
|
|
428
|
+
defaultExpanded, onChange, selectable, filterables, emptyState, }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
|
|
427
429
|
|
|
428
430
|
declare module "@tanstack/react-table" {
|
|
429
431
|
interface ColumnMeta<TData extends RowData, TValue> {
|
|
@@ -464,9 +466,10 @@ interface PostTableProps<TData> {
|
|
|
464
466
|
}) => React__default.ReactNode;
|
|
465
467
|
hasSubComponent?: (row: TData) => boolean;
|
|
466
468
|
defaultExpanded?: boolean;
|
|
469
|
+
submitLoading?: boolean;
|
|
467
470
|
}
|
|
468
471
|
declare function PostTable<TData extends Record<string, any>>({ columns: userColumns, data: controlledData, onChange, isLoading, className, verticalLines, rowPadding, index, renderAddButton, renderSubComponent, hasSubComponent, // default to true if renderSubComponent is provided
|
|
469
|
-
defaultExpanded, }: PostTableProps<TData>): react_jsx_runtime.JSX.Element;
|
|
472
|
+
defaultExpanded, submitLoading, }: PostTableProps<TData>): react_jsx_runtime.JSX.Element;
|
|
470
473
|
|
|
471
474
|
type SimpleTableColumn<TData> = ColumnDef<TData, any> & {
|
|
472
475
|
key?: string;
|
|
@@ -491,8 +494,9 @@ interface SimpleTableProps<TData> {
|
|
|
491
494
|
isLoading?: boolean;
|
|
492
495
|
title?: string;
|
|
493
496
|
enableSearch?: boolean;
|
|
497
|
+
emptyState?: React__default.ReactNode;
|
|
494
498
|
}
|
|
495
|
-
declare function SimpleTable<TData>({ columns: userColumns, data, className, renderFooter: componentFooter, rowPadding, verticalLines, index, startIndex, isLoading, title, enableSearch, }: SimpleTableProps<TData>): react_jsx_runtime.JSX.Element;
|
|
499
|
+
declare function SimpleTable<TData>({ columns: userColumns, data, className, renderFooter: componentFooter, rowPadding, verticalLines, index, startIndex, isLoading, title, enableSearch, emptyState, }: SimpleTableProps<TData>): react_jsx_runtime.JSX.Element;
|
|
496
500
|
|
|
497
501
|
interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
498
502
|
variant?: "primary" | "danger" | "warning" | "success";
|
|
@@ -672,4 +676,32 @@ interface PdfOptions {
|
|
|
672
676
|
*/
|
|
673
677
|
declare const generatePdf: (elementId: string, options?: PdfOptions) => Promise<void>;
|
|
674
678
|
|
|
675
|
-
|
|
679
|
+
/**
|
|
680
|
+
* A robust localStorage manager utility with TypeScript support.
|
|
681
|
+
* Suitable for production environments and reusable frontend packages.
|
|
682
|
+
*/
|
|
683
|
+
/**
|
|
684
|
+
* Interface for the storage utility to support method overloads.
|
|
685
|
+
*/
|
|
686
|
+
interface StorageManager {
|
|
687
|
+
/** Saves a value to localStorage using JSON.stringify. */
|
|
688
|
+
set<T>(key: string, value: T): void;
|
|
689
|
+
/** Retrieves a parsed value from localStorage. */
|
|
690
|
+
get<T>(key: string): T | null;
|
|
691
|
+
/** Retrieves all items from localStorage as an object. */
|
|
692
|
+
get(): Record<string, any>;
|
|
693
|
+
/** Removes a specific key from localStorage. */
|
|
694
|
+
remove(key: string): void;
|
|
695
|
+
/** Clears all localStorage. */
|
|
696
|
+
clear(): void;
|
|
697
|
+
/** Returns true if the key exists. */
|
|
698
|
+
has(key: string): boolean;
|
|
699
|
+
/** Returns all localStorage keys. */
|
|
700
|
+
keys(): string[];
|
|
701
|
+
}
|
|
702
|
+
/**
|
|
703
|
+
* Storage utility to manage browser localStorage with type safety and error handling.
|
|
704
|
+
*/
|
|
705
|
+
declare const storage: StorageManager;
|
|
706
|
+
|
|
707
|
+
export { A4DataView, Badge, type BadgeProps, Branding, type BrandingProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, 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 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, type WarqadConfig, type WarqadConfigContextType, WarqadProvider, generatePdf, storage, useA4StatementView, useApi, useModal, useSearchApiContext, useSelectContext, useTheme, useTransaction, useWarqadConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -351,7 +351,7 @@ interface PhoneInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElemen
|
|
|
351
351
|
}
|
|
352
352
|
declare const PhoneInput: React$1.ForwardRefExoticComponent<PhoneInputProps & React$1.RefAttributes<any>>;
|
|
353
353
|
|
|
354
|
-
interface InputProps<T extends FieldValues> extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "name" | "form"> {
|
|
354
|
+
interface InputProps<T extends FieldValues> extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "name" | "form" | "onChange"> {
|
|
355
355
|
label?: string;
|
|
356
356
|
icon?: React.ReactNode;
|
|
357
357
|
error?: string;
|
|
@@ -360,6 +360,7 @@ interface InputProps<T extends FieldValues> extends Omit<React.InputHTMLAttribut
|
|
|
360
360
|
form?: UseFormReturn<T>;
|
|
361
361
|
type?: "text" | "number" | "email" | "password";
|
|
362
362
|
variant?: "ghost" | "default";
|
|
363
|
+
onChange?: (value: any) => void;
|
|
363
364
|
}
|
|
364
365
|
declare const Input: <T extends FieldValues>(props: InputProps<T> & {
|
|
365
366
|
ref?: React.ForwardedRef<HTMLInputElement>;
|
|
@@ -421,9 +422,10 @@ interface DataTableProps<TData, TValue> {
|
|
|
421
422
|
}) => void;
|
|
422
423
|
selectable?: boolean;
|
|
423
424
|
filterables?: boolean;
|
|
425
|
+
emptyState?: React__default.ReactNode;
|
|
424
426
|
}
|
|
425
427
|
declare function DataTable<TData, TValue>({ columns: userColumns, data, isLoading, pageRows, searchPlaceholder, className, verticalLines, rowPadding, index, renderSubComponent, hasSubComponent, // default to true
|
|
426
|
-
defaultExpanded, onChange, selectable, filterables, }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
|
|
428
|
+
defaultExpanded, onChange, selectable, filterables, emptyState, }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
|
|
427
429
|
|
|
428
430
|
declare module "@tanstack/react-table" {
|
|
429
431
|
interface ColumnMeta<TData extends RowData, TValue> {
|
|
@@ -464,9 +466,10 @@ interface PostTableProps<TData> {
|
|
|
464
466
|
}) => React__default.ReactNode;
|
|
465
467
|
hasSubComponent?: (row: TData) => boolean;
|
|
466
468
|
defaultExpanded?: boolean;
|
|
469
|
+
submitLoading?: boolean;
|
|
467
470
|
}
|
|
468
471
|
declare function PostTable<TData extends Record<string, any>>({ columns: userColumns, data: controlledData, onChange, isLoading, className, verticalLines, rowPadding, index, renderAddButton, renderSubComponent, hasSubComponent, // default to true if renderSubComponent is provided
|
|
469
|
-
defaultExpanded, }: PostTableProps<TData>): react_jsx_runtime.JSX.Element;
|
|
472
|
+
defaultExpanded, submitLoading, }: PostTableProps<TData>): react_jsx_runtime.JSX.Element;
|
|
470
473
|
|
|
471
474
|
type SimpleTableColumn<TData> = ColumnDef<TData, any> & {
|
|
472
475
|
key?: string;
|
|
@@ -491,8 +494,9 @@ interface SimpleTableProps<TData> {
|
|
|
491
494
|
isLoading?: boolean;
|
|
492
495
|
title?: string;
|
|
493
496
|
enableSearch?: boolean;
|
|
497
|
+
emptyState?: React__default.ReactNode;
|
|
494
498
|
}
|
|
495
|
-
declare function SimpleTable<TData>({ columns: userColumns, data, className, renderFooter: componentFooter, rowPadding, verticalLines, index, startIndex, isLoading, title, enableSearch, }: SimpleTableProps<TData>): react_jsx_runtime.JSX.Element;
|
|
499
|
+
declare function SimpleTable<TData>({ columns: userColumns, data, className, renderFooter: componentFooter, rowPadding, verticalLines, index, startIndex, isLoading, title, enableSearch, emptyState, }: SimpleTableProps<TData>): react_jsx_runtime.JSX.Element;
|
|
496
500
|
|
|
497
501
|
interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
498
502
|
variant?: "primary" | "danger" | "warning" | "success";
|
|
@@ -672,4 +676,32 @@ interface PdfOptions {
|
|
|
672
676
|
*/
|
|
673
677
|
declare const generatePdf: (elementId: string, options?: PdfOptions) => Promise<void>;
|
|
674
678
|
|
|
675
|
-
|
|
679
|
+
/**
|
|
680
|
+
* A robust localStorage manager utility with TypeScript support.
|
|
681
|
+
* Suitable for production environments and reusable frontend packages.
|
|
682
|
+
*/
|
|
683
|
+
/**
|
|
684
|
+
* Interface for the storage utility to support method overloads.
|
|
685
|
+
*/
|
|
686
|
+
interface StorageManager {
|
|
687
|
+
/** Saves a value to localStorage using JSON.stringify. */
|
|
688
|
+
set<T>(key: string, value: T): void;
|
|
689
|
+
/** Retrieves a parsed value from localStorage. */
|
|
690
|
+
get<T>(key: string): T | null;
|
|
691
|
+
/** Retrieves all items from localStorage as an object. */
|
|
692
|
+
get(): Record<string, any>;
|
|
693
|
+
/** Removes a specific key from localStorage. */
|
|
694
|
+
remove(key: string): void;
|
|
695
|
+
/** Clears all localStorage. */
|
|
696
|
+
clear(): void;
|
|
697
|
+
/** Returns true if the key exists. */
|
|
698
|
+
has(key: string): boolean;
|
|
699
|
+
/** Returns all localStorage keys. */
|
|
700
|
+
keys(): string[];
|
|
701
|
+
}
|
|
702
|
+
/**
|
|
703
|
+
* Storage utility to manage browser localStorage with type safety and error handling.
|
|
704
|
+
*/
|
|
705
|
+
declare const storage: StorageManager;
|
|
706
|
+
|
|
707
|
+
export { A4DataView, Badge, type BadgeProps, Branding, type BrandingProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, 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 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, type WarqadConfig, type WarqadConfigContextType, WarqadProvider, generatePdf, storage, useA4StatementView, useApi, useModal, useSearchApiContext, useSelectContext, useTheme, useTransaction, useWarqadConfig };
|