@ambuj.bhaskar/react-component-library 0.13.0-alpha → 0.15.0-alpha

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.ts CHANGED
@@ -1,8 +1,10 @@
1
1
  import { ComponentProps } from 'react';
2
2
  import { default as default_2 } from 'react';
3
+ import { Dispatch } from 'react';
3
4
  import { JSX as JSX_2 } from 'react/jsx-runtime';
4
5
  import * as React_2 from 'react';
5
6
  import { ReactNode } from 'react';
7
+ import { SetStateAction } from 'react';
6
8
  import { TimeRangePickerProps } from 'antd';
7
9
 
8
10
  export declare const Badge: React.FC<BadgeProps>;
@@ -36,8 +38,23 @@ declare type BlobType = {
36
38
 
37
39
  export declare const Button: React.FC<ButtonProps>;
38
40
 
41
+ export declare const ButtonGroup: React.FC<ButtonGroupProps>;
42
+
43
+ export declare type ButtonGroupProps = {
44
+ items: {
45
+ label: string;
46
+ value: string | number;
47
+ disabled?: boolean;
48
+ loading?: boolean;
49
+ }[];
50
+ value?: string | number;
51
+ onChange?: (value: string | number) => void;
52
+ color?: Color;
53
+ gap?: CSSstring;
54
+ };
55
+
39
56
  export declare type ButtonProps = HTMLButtonProps & {
40
- variant?: "primary" | "secondary" | "tertiary" | "nav";
57
+ variant?: ButtonVariant;
41
58
  backgroundColor?: Color;
42
59
  borderColor?: Color;
43
60
  textColor?: Color;
@@ -56,6 +73,8 @@ export declare type ButtonProps = HTMLButtonProps & {
56
73
  className?: string;
57
74
  };
58
75
 
76
+ declare type ButtonVariant = "primary" | "secondary" | "tertiary" | "nav";
77
+
59
78
  declare type Color = string;
60
79
 
61
80
  export declare const CompactEventCard: React.FC<CompactEventCardPropsType>;
@@ -236,6 +255,18 @@ declare type Option_2 = {
236
255
  value: string | number;
237
256
  };
238
257
 
258
+ export declare const Pagination: ({ totalPages, currentPage, onPageChange, onNext, onPrev, color, size, }: PaginationProps) => JSX_2.Element;
259
+
260
+ export declare type PaginationProps = {
261
+ totalPages: number;
262
+ currentPage: number;
263
+ onPageChange: (page: number) => void;
264
+ onNext: () => void;
265
+ onPrev: () => void;
266
+ color?: Color;
267
+ size?: "s" | "m" | "l";
268
+ };
269
+
239
270
  export declare const Select: React.FC<SelectProps>;
240
271
 
241
272
  export declare type SelectProps = {
@@ -396,6 +427,15 @@ declare type ToastProps = {
396
427
 
397
428
  declare type ToastType = "success" | "error" | "info" | "warning";
398
429
 
430
+ export declare function usePagination(initialPage?: number): {
431
+ currentPage: number;
432
+ setPage: (newPage: number) => void;
433
+ nextPage: () => void;
434
+ prevPage: () => void;
435
+ totalPages: number;
436
+ setTotalPages: Dispatch<SetStateAction<number>>;
437
+ };
438
+
399
439
  export declare const useTheme: () => Record<string, string>;
400
440
 
401
441
  export declare const useToast: () => {