@hybr1d-tech/charizard 0.3.45 → 0.3.47

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.
@@ -17,6 +17,14 @@ type SegmentedControlProps = {
17
17
  * use this if you are controlling the behavior of segmented control from an external entity
18
18
  */
19
19
  handleOnChange?: (value: string) => void;
20
+ /**
21
+ * custom classes to override segmented control default styles
22
+ */
23
+ customStyles?: Record<string, string>;
24
+ /**
25
+ * custom class name to override segmented control default styles
26
+ */
27
+ customClassName?: string;
20
28
  };
21
- export declare function SegmentedControl({ items, defaultValue, handleOnChange }: SegmentedControlProps): import("react/jsx-runtime").JSX.Element;
29
+ export declare function SegmentedControl({ items, defaultValue, handleOnChange, customClassName, customStyles, }: SegmentedControlProps): import("react/jsx-runtime").JSX.Element;
22
30
  export {};
@@ -3,6 +3,9 @@ import type { FilterConfig } from './types';
3
3
  export interface TableProps {
4
4
  data: any;
5
5
  columns: any;
6
+ /**
7
+ * column for actions dropdown in the last row
8
+ */
6
9
  actionsConfig?: {
7
10
  isDropdownActions?: boolean;
8
11
  menuItems?: {
@@ -20,6 +23,9 @@ export interface TableProps {
20
23
  isError: boolean;
21
24
  errMsg?: string;
22
25
  };
26
+ /**
27
+ * table search
28
+ */
23
29
  searchConfig?: {
24
30
  placeholder?: string;
25
31
  search: string;
@@ -38,10 +44,12 @@ export interface TableProps {
38
44
  };
39
45
  /**
40
46
  * table filtering, data comes from an api
41
- *
42
47
  */
43
48
  filterConfig?: FilterConfig;
44
49
  totalText?: string;
50
+ /**
51
+ * Row checkbox or radio selection config
52
+ */
45
53
  rowSelectionConfig?: {
46
54
  isCheckbox?: boolean;
47
55
  isRadio?: boolean;
@@ -60,6 +68,9 @@ export interface TableProps {
60
68
  onClick: any;
61
69
  }[];
62
70
  };
71
+ /**
72
+ * @deprecated use infiniteScrollConfig
73
+ */
63
74
  paginationConfig?: {
64
75
  metaData: {
65
76
  total_items: number;
@@ -72,6 +83,13 @@ export interface TableProps {
72
83
  scrollThreshold?: string | number;
73
84
  scrollableTarget?: string;
74
85
  };
86
+ /**
87
+ * Used for infinite scroll, all the properties comes from useInfiniteQuery
88
+ */
89
+ infiniteScrollConfig?: {
90
+ fetchNextPage: () => void;
91
+ isFetchingNextPage: boolean;
92
+ };
75
93
  emptyStateConfig?: {
76
94
  icon: string;
77
95
  isCustom?: {
@@ -87,4 +105,4 @@ export interface TableProps {
87
105
  };
88
106
  headerText?: string;
89
107
  }
90
- export declare function Table({ data, loaderConfig, columns, filterConfig, sortConfig, rowSelectionConfig, actionsConfig, searchConfig, totalText, selectorConfig, paginationConfig, emptyStateConfig, headerText, }: TableProps): import("react/jsx-runtime").JSX.Element;
108
+ export declare function Table({ data, loaderConfig, columns, filterConfig, sortConfig, rowSelectionConfig, actionsConfig, searchConfig, totalText, selectorConfig, paginationConfig, emptyStateConfig, headerText, infiniteScrollConfig, }: TableProps): import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hybr1d-tech/charizard",
3
- "version": "0.3.45",
3
+ "version": "0.3.47",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -36,6 +36,7 @@
36
36
  "react-dom": "^18.2.0",
37
37
  "react-infinite-scroll-component": "^6.1.0",
38
38
  "react-inlinesvg": "^4.1.0",
39
+ "react-intersection-observer": "^9.5.3",
39
40
  "react-select": "^5.8.0",
40
41
  "use-deep-compare-effect": "^1.8.1",
41
42
  "zustand": "^4.4.6"
@@ -53,6 +54,7 @@
53
54
  "@types/react-dom": "^18.2.18",
54
55
  "@vitejs/plugin-react": "^4.2.1",
55
56
  "prop-types": "^15.8.1",
57
+ "react-intersection-observer": "^9.5.3",
56
58
  "storybook": "^7.6.6",
57
59
  "storybook-css-modules-preset": "^1.1.1",
58
60
  "typescript": "^5.3.3",