warqadui 0.0.19 → 0.0.20
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 +76 -7
- package/dist/index.d.ts +76 -7
- package/dist/index.js +725 -422
- package/dist/index.mjs +737 -429
- package/dist/styles.js +1 -1
- package/dist/styles.mjs +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -216,7 +216,7 @@ declare const DateInput: <T extends FieldValues>(props: DateInputProps<T> & {
|
|
|
216
216
|
|
|
217
217
|
interface SearchApiProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value"> {
|
|
218
218
|
label?: string;
|
|
219
|
-
api
|
|
219
|
+
api?: string;
|
|
220
220
|
placeholder?: string;
|
|
221
221
|
value?: any;
|
|
222
222
|
onChange?: (value: any) => void;
|
|
@@ -231,8 +231,47 @@ interface SearchApiProps extends Omit<React__default.InputHTMLAttributes<HTMLInp
|
|
|
231
231
|
filter?: any[];
|
|
232
232
|
v?: number;
|
|
233
233
|
variant?: "ghost" | "default";
|
|
234
|
+
children?: ReactNode;
|
|
234
235
|
}
|
|
236
|
+
interface SearchApiContextValue {
|
|
237
|
+
isOpen: boolean;
|
|
238
|
+
setIsOpen: (v: boolean) => void;
|
|
239
|
+
searchTerm: string;
|
|
240
|
+
setSearchTerm: (v: string) => void;
|
|
241
|
+
selectedValue: any;
|
|
242
|
+
setSelectedValue: (v: any) => void;
|
|
243
|
+
activeIndex: number;
|
|
244
|
+
setActiveIndex: (v: number) => void;
|
|
245
|
+
isFocused: boolean;
|
|
246
|
+
setIsFocused: (v: boolean) => void;
|
|
247
|
+
dropdownAnchorRef: React__default.RefObject<HTMLDivElement>;
|
|
248
|
+
dropdownContentRef: React__default.RefObject<HTMLDivElement>;
|
|
249
|
+
containerRef: React__default.RefObject<HTMLDivElement>;
|
|
250
|
+
inputRef: React__default.RefObject<HTMLInputElement>;
|
|
251
|
+
primaryColor?: string;
|
|
252
|
+
error?: string;
|
|
253
|
+
disabled?: boolean;
|
|
254
|
+
fieldInternalProps?: any;
|
|
255
|
+
options: any[];
|
|
256
|
+
setOptions: (opts: any[]) => void;
|
|
257
|
+
isLoading: boolean;
|
|
258
|
+
clearSelection: (e: React__default.MouseEvent) => void;
|
|
259
|
+
handleSelect: (opt: any) => void;
|
|
260
|
+
getDisplayValue: () => string;
|
|
261
|
+
placeholder?: string;
|
|
262
|
+
variant?: string;
|
|
263
|
+
labelKey: string;
|
|
264
|
+
valueKey: string;
|
|
265
|
+
form?: any;
|
|
266
|
+
name?: any;
|
|
267
|
+
obj?: any;
|
|
268
|
+
}
|
|
269
|
+
declare const useSearchApiContext: () => SearchApiContextValue;
|
|
235
270
|
declare const SearchApi: React__default.ForwardRefExoticComponent<SearchApiProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
271
|
+
declare const SearchApiTrigger: React__default.ForwardRefExoticComponent<Omit<any, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
272
|
+
declare const SearchApiInput: React__default.ForwardRefExoticComponent<Omit<any, "ref"> & React__default.RefAttributes<HTMLInputElement>>;
|
|
273
|
+
declare const SearchApiContent: React__default.ForwardRefExoticComponent<Omit<any, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
274
|
+
declare const SearchApiItem: React__default.ForwardRefExoticComponent<Omit<any, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
236
275
|
|
|
237
276
|
interface TextareaProps<T extends FieldValues> extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "name" | "form"> {
|
|
238
277
|
label: string;
|
|
@@ -252,17 +291,40 @@ interface Option {
|
|
|
252
291
|
}
|
|
253
292
|
interface SelectProps extends Omit<React__default.SelectHTMLAttributes<HTMLSelectElement>, "onChange" | "value"> {
|
|
254
293
|
label?: string;
|
|
255
|
-
options
|
|
294
|
+
options?: Option[];
|
|
256
295
|
icon?: React__default.ReactNode;
|
|
257
296
|
error?: string;
|
|
258
297
|
containerClassName?: string;
|
|
259
298
|
name?: any;
|
|
260
299
|
form?: any;
|
|
261
|
-
onChange?: (value:
|
|
262
|
-
value?:
|
|
300
|
+
onChange?: (value: any) => void;
|
|
301
|
+
value?: any;
|
|
263
302
|
variant?: "ghost" | "default";
|
|
303
|
+
children?: ReactNode;
|
|
304
|
+
}
|
|
305
|
+
interface SelectContextValue {
|
|
306
|
+
isOpen: boolean;
|
|
307
|
+
setIsOpen: (val: boolean) => void;
|
|
308
|
+
selectedValue: any;
|
|
309
|
+
setSelectedValue: (val: any) => void;
|
|
310
|
+
activeIndex: number;
|
|
311
|
+
setActiveIndex: (val: number) => void;
|
|
312
|
+
isFocused: boolean;
|
|
313
|
+
setIsFocused: (val: boolean) => void;
|
|
314
|
+
dropdownAnchorRef: React__default.RefObject<HTMLDivElement>;
|
|
315
|
+
dropdownContentRef: React__default.RefObject<HTMLDivElement>;
|
|
316
|
+
containerRef: React__default.RefObject<HTMLDivElement>;
|
|
317
|
+
primaryColor?: string;
|
|
318
|
+
options: Option[];
|
|
319
|
+
registerOption: (opt: Option) => void;
|
|
320
|
+
fieldInternalProps?: any;
|
|
321
|
+
disabled?: boolean;
|
|
264
322
|
}
|
|
265
|
-
declare const
|
|
323
|
+
declare const useSelectContext: () => SelectContextValue;
|
|
324
|
+
declare const Select: React__default.ForwardRefExoticComponent<SelectProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
325
|
+
declare const SelectTrigger: React__default.ForwardRefExoticComponent<Omit<any, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
326
|
+
declare const SelectContent: React__default.ForwardRefExoticComponent<Omit<any, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
327
|
+
declare const SelectItem: React__default.ForwardRefExoticComponent<Omit<any, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
266
328
|
|
|
267
329
|
interface PhoneInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange"> {
|
|
268
330
|
label: string;
|
|
@@ -295,11 +357,18 @@ declare const Fields: {
|
|
|
295
357
|
ref?: React.ForwardedRef<HTMLInputElement>;
|
|
296
358
|
}) => React.ReactElement;
|
|
297
359
|
PhoneInput: React$1.ForwardRefExoticComponent<PhoneInputProps & React$1.RefAttributes<any>>;
|
|
298
|
-
Select: React$1.ForwardRefExoticComponent<SelectProps & React$1.RefAttributes<
|
|
360
|
+
Select: React$1.ForwardRefExoticComponent<SelectProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
361
|
+
SelectTrigger: React$1.ForwardRefExoticComponent<Omit<any, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
362
|
+
SelectContent: React$1.ForwardRefExoticComponent<Omit<any, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
363
|
+
SelectItem: React$1.ForwardRefExoticComponent<Omit<any, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
299
364
|
Textarea: <T extends react_hook_form.FieldValues>(props: TextareaProps<T> & {
|
|
300
365
|
ref?: React.ForwardedRef<HTMLTextAreaElement>;
|
|
301
366
|
}) => React.ReactElement;
|
|
302
367
|
SearchApi: React$1.ForwardRefExoticComponent<SearchApiProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
368
|
+
SearchApiTrigger: React$1.ForwardRefExoticComponent<Omit<any, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
369
|
+
SearchApiInput: React$1.ForwardRefExoticComponent<Omit<any, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
370
|
+
SearchApiContent: React$1.ForwardRefExoticComponent<Omit<any, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
371
|
+
SearchApiItem: React$1.ForwardRefExoticComponent<Omit<any, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
303
372
|
DateInput: <T extends react_hook_form.FieldValues>(props: DateInputProps<T> & {
|
|
304
373
|
ref?: React.ForwardedRef<HTMLInputElement>;
|
|
305
374
|
}) => React.ReactElement;
|
|
@@ -583,4 +652,4 @@ interface PdfOptions {
|
|
|
583
652
|
*/
|
|
584
653
|
declare const generatePdf: (elementId: string, options?: PdfOptions) => Promise<void>;
|
|
585
654
|
|
|
586
|
-
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, type SearchApiProps, Select, type SelectProps, SimpleTable, type SimpleTableColumn, type StoreConfig, Textarea, type TextareaProps, type ThemeConfig, ThemeProvider, ThemeToggle, type UseModalReturn, type WarqadConfig, type WarqadConfigContextType, WarqadProvider, generatePdf, useA4StatementView, useApi, useModal, useTheme, useTransaction, useWarqadConfig };
|
|
655
|
+
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 StoreConfig, Textarea, type TextareaProps, type ThemeConfig, ThemeProvider, ThemeToggle, type UseModalReturn, type WarqadConfig, type WarqadConfigContextType, WarqadProvider, generatePdf, useA4StatementView, useApi, useModal, useSearchApiContext, useSelectContext, useTheme, useTransaction, useWarqadConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -216,7 +216,7 @@ declare const DateInput: <T extends FieldValues>(props: DateInputProps<T> & {
|
|
|
216
216
|
|
|
217
217
|
interface SearchApiProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value"> {
|
|
218
218
|
label?: string;
|
|
219
|
-
api
|
|
219
|
+
api?: string;
|
|
220
220
|
placeholder?: string;
|
|
221
221
|
value?: any;
|
|
222
222
|
onChange?: (value: any) => void;
|
|
@@ -231,8 +231,47 @@ interface SearchApiProps extends Omit<React__default.InputHTMLAttributes<HTMLInp
|
|
|
231
231
|
filter?: any[];
|
|
232
232
|
v?: number;
|
|
233
233
|
variant?: "ghost" | "default";
|
|
234
|
+
children?: ReactNode;
|
|
234
235
|
}
|
|
236
|
+
interface SearchApiContextValue {
|
|
237
|
+
isOpen: boolean;
|
|
238
|
+
setIsOpen: (v: boolean) => void;
|
|
239
|
+
searchTerm: string;
|
|
240
|
+
setSearchTerm: (v: string) => void;
|
|
241
|
+
selectedValue: any;
|
|
242
|
+
setSelectedValue: (v: any) => void;
|
|
243
|
+
activeIndex: number;
|
|
244
|
+
setActiveIndex: (v: number) => void;
|
|
245
|
+
isFocused: boolean;
|
|
246
|
+
setIsFocused: (v: boolean) => void;
|
|
247
|
+
dropdownAnchorRef: React__default.RefObject<HTMLDivElement>;
|
|
248
|
+
dropdownContentRef: React__default.RefObject<HTMLDivElement>;
|
|
249
|
+
containerRef: React__default.RefObject<HTMLDivElement>;
|
|
250
|
+
inputRef: React__default.RefObject<HTMLInputElement>;
|
|
251
|
+
primaryColor?: string;
|
|
252
|
+
error?: string;
|
|
253
|
+
disabled?: boolean;
|
|
254
|
+
fieldInternalProps?: any;
|
|
255
|
+
options: any[];
|
|
256
|
+
setOptions: (opts: any[]) => void;
|
|
257
|
+
isLoading: boolean;
|
|
258
|
+
clearSelection: (e: React__default.MouseEvent) => void;
|
|
259
|
+
handleSelect: (opt: any) => void;
|
|
260
|
+
getDisplayValue: () => string;
|
|
261
|
+
placeholder?: string;
|
|
262
|
+
variant?: string;
|
|
263
|
+
labelKey: string;
|
|
264
|
+
valueKey: string;
|
|
265
|
+
form?: any;
|
|
266
|
+
name?: any;
|
|
267
|
+
obj?: any;
|
|
268
|
+
}
|
|
269
|
+
declare const useSearchApiContext: () => SearchApiContextValue;
|
|
235
270
|
declare const SearchApi: React__default.ForwardRefExoticComponent<SearchApiProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
271
|
+
declare const SearchApiTrigger: React__default.ForwardRefExoticComponent<Omit<any, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
272
|
+
declare const SearchApiInput: React__default.ForwardRefExoticComponent<Omit<any, "ref"> & React__default.RefAttributes<HTMLInputElement>>;
|
|
273
|
+
declare const SearchApiContent: React__default.ForwardRefExoticComponent<Omit<any, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
274
|
+
declare const SearchApiItem: React__default.ForwardRefExoticComponent<Omit<any, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
236
275
|
|
|
237
276
|
interface TextareaProps<T extends FieldValues> extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "name" | "form"> {
|
|
238
277
|
label: string;
|
|
@@ -252,17 +291,40 @@ interface Option {
|
|
|
252
291
|
}
|
|
253
292
|
interface SelectProps extends Omit<React__default.SelectHTMLAttributes<HTMLSelectElement>, "onChange" | "value"> {
|
|
254
293
|
label?: string;
|
|
255
|
-
options
|
|
294
|
+
options?: Option[];
|
|
256
295
|
icon?: React__default.ReactNode;
|
|
257
296
|
error?: string;
|
|
258
297
|
containerClassName?: string;
|
|
259
298
|
name?: any;
|
|
260
299
|
form?: any;
|
|
261
|
-
onChange?: (value:
|
|
262
|
-
value?:
|
|
300
|
+
onChange?: (value: any) => void;
|
|
301
|
+
value?: any;
|
|
263
302
|
variant?: "ghost" | "default";
|
|
303
|
+
children?: ReactNode;
|
|
304
|
+
}
|
|
305
|
+
interface SelectContextValue {
|
|
306
|
+
isOpen: boolean;
|
|
307
|
+
setIsOpen: (val: boolean) => void;
|
|
308
|
+
selectedValue: any;
|
|
309
|
+
setSelectedValue: (val: any) => void;
|
|
310
|
+
activeIndex: number;
|
|
311
|
+
setActiveIndex: (val: number) => void;
|
|
312
|
+
isFocused: boolean;
|
|
313
|
+
setIsFocused: (val: boolean) => void;
|
|
314
|
+
dropdownAnchorRef: React__default.RefObject<HTMLDivElement>;
|
|
315
|
+
dropdownContentRef: React__default.RefObject<HTMLDivElement>;
|
|
316
|
+
containerRef: React__default.RefObject<HTMLDivElement>;
|
|
317
|
+
primaryColor?: string;
|
|
318
|
+
options: Option[];
|
|
319
|
+
registerOption: (opt: Option) => void;
|
|
320
|
+
fieldInternalProps?: any;
|
|
321
|
+
disabled?: boolean;
|
|
264
322
|
}
|
|
265
|
-
declare const
|
|
323
|
+
declare const useSelectContext: () => SelectContextValue;
|
|
324
|
+
declare const Select: React__default.ForwardRefExoticComponent<SelectProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
325
|
+
declare const SelectTrigger: React__default.ForwardRefExoticComponent<Omit<any, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
326
|
+
declare const SelectContent: React__default.ForwardRefExoticComponent<Omit<any, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
327
|
+
declare const SelectItem: React__default.ForwardRefExoticComponent<Omit<any, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
266
328
|
|
|
267
329
|
interface PhoneInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange"> {
|
|
268
330
|
label: string;
|
|
@@ -295,11 +357,18 @@ declare const Fields: {
|
|
|
295
357
|
ref?: React.ForwardedRef<HTMLInputElement>;
|
|
296
358
|
}) => React.ReactElement;
|
|
297
359
|
PhoneInput: React$1.ForwardRefExoticComponent<PhoneInputProps & React$1.RefAttributes<any>>;
|
|
298
|
-
Select: React$1.ForwardRefExoticComponent<SelectProps & React$1.RefAttributes<
|
|
360
|
+
Select: React$1.ForwardRefExoticComponent<SelectProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
361
|
+
SelectTrigger: React$1.ForwardRefExoticComponent<Omit<any, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
362
|
+
SelectContent: React$1.ForwardRefExoticComponent<Omit<any, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
363
|
+
SelectItem: React$1.ForwardRefExoticComponent<Omit<any, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
299
364
|
Textarea: <T extends react_hook_form.FieldValues>(props: TextareaProps<T> & {
|
|
300
365
|
ref?: React.ForwardedRef<HTMLTextAreaElement>;
|
|
301
366
|
}) => React.ReactElement;
|
|
302
367
|
SearchApi: React$1.ForwardRefExoticComponent<SearchApiProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
368
|
+
SearchApiTrigger: React$1.ForwardRefExoticComponent<Omit<any, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
369
|
+
SearchApiInput: React$1.ForwardRefExoticComponent<Omit<any, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
370
|
+
SearchApiContent: React$1.ForwardRefExoticComponent<Omit<any, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
371
|
+
SearchApiItem: React$1.ForwardRefExoticComponent<Omit<any, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
303
372
|
DateInput: <T extends react_hook_form.FieldValues>(props: DateInputProps<T> & {
|
|
304
373
|
ref?: React.ForwardedRef<HTMLInputElement>;
|
|
305
374
|
}) => React.ReactElement;
|
|
@@ -583,4 +652,4 @@ interface PdfOptions {
|
|
|
583
652
|
*/
|
|
584
653
|
declare const generatePdf: (elementId: string, options?: PdfOptions) => Promise<void>;
|
|
585
654
|
|
|
586
|
-
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, type SearchApiProps, Select, type SelectProps, SimpleTable, type SimpleTableColumn, type StoreConfig, Textarea, type TextareaProps, type ThemeConfig, ThemeProvider, ThemeToggle, type UseModalReturn, type WarqadConfig, type WarqadConfigContextType, WarqadProvider, generatePdf, useA4StatementView, useApi, useModal, useTheme, useTransaction, useWarqadConfig };
|
|
655
|
+
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 StoreConfig, Textarea, type TextareaProps, type ThemeConfig, ThemeProvider, ThemeToggle, type UseModalReturn, type WarqadConfig, type WarqadConfigContextType, WarqadProvider, generatePdf, useA4StatementView, useApi, useModal, useSearchApiContext, useSelectContext, useTheme, useTransaction, useWarqadConfig };
|