analytica-frontend-lib 1.2.21 → 1.2.22

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.
@@ -92,6 +92,41 @@ interface PaginationConfig {
92
92
  /** Total pages (if known from backend) */
93
93
  totalPages?: number;
94
94
  }
95
+ /**
96
+ * Empty state configuration
97
+ */
98
+ interface EmptyStateConfig {
99
+ /** Custom component to render when table is empty (no data and no search active) */
100
+ component?: ReactNode;
101
+ /** Text message to show in empty state (used if component not provided) */
102
+ message?: string;
103
+ /** Image to display in empty state */
104
+ image?: string;
105
+ /** Button text for empty state action */
106
+ buttonText?: string;
107
+ /** Callback when empty state button is clicked */
108
+ onButtonClick?: () => void;
109
+ }
110
+ /**
111
+ * Loading state configuration
112
+ */
113
+ interface LoadingStateConfig {
114
+ /** Custom component to render when table is loading */
115
+ component?: ReactNode;
116
+ }
117
+ /**
118
+ * No search result state configuration
119
+ */
120
+ interface NoSearchResultConfig {
121
+ /** Custom component to render when search returns no results */
122
+ component?: ReactNode;
123
+ /** Title for no search result state */
124
+ title?: string;
125
+ /** Description for no search result state */
126
+ description?: string;
127
+ /** Image to display in no search result state */
128
+ image?: string;
129
+ }
95
130
  /**
96
131
  * Table components exposed via render prop
97
132
  */
@@ -131,8 +166,12 @@ interface TableProviderProps<T = Record<string, unknown>> {
131
166
  readonly paginationConfig?: PaginationConfig;
132
167
  /** Search placeholder text */
133
168
  readonly searchPlaceholder?: string;
134
- /** Image for no search result state */
135
- readonly noSearchResultImage?: string;
169
+ /** Empty state configuration (when table is empty with no search) */
170
+ readonly emptyState?: EmptyStateConfig;
171
+ /** Loading state configuration (when table is loading) */
172
+ readonly loadingState?: LoadingStateConfig;
173
+ /** No search result state configuration (when search returns no results) */
174
+ readonly noSearchResultState?: NoSearchResultConfig;
136
175
  /** Key field name to use for unique row identification (recommended for better performance) */
137
176
  readonly rowKey?: keyof T;
138
177
  /** Callback when any parameter changes */
@@ -187,6 +226,6 @@ interface TableProviderProps<T = Record<string, unknown>> {
187
226
  * />
188
227
  * ```
189
228
  */
190
- declare function TableProvider<T extends Record<string, unknown>>({ data, headers, loading, variant, enableSearch, enableFilters, enableTableSort, enablePagination, enableRowClick, initialFilters, paginationConfig, searchPlaceholder, noSearchResultImage, rowKey, onParamsChange, onRowClick, children, }: TableProviderProps<T>): react_jsx_runtime.JSX.Element;
229
+ declare function TableProvider<T extends Record<string, unknown>>({ data, headers, loading, variant, enableSearch, enableFilters, enableTableSort, enablePagination, enableRowClick, initialFilters, paginationConfig, searchPlaceholder, emptyState, loadingState, noSearchResultState, rowKey, onParamsChange, onRowClick, children, }: TableProviderProps<T>): react_jsx_runtime.JSX.Element;
191
230
 
192
- export { type ColumnConfig as C, type FilterConfig as F, type PaginationConfig as P, TableProvider as T, type UseTableFilterOptions as U, type UseTableFilterReturn as a, type TableParams as b, type TableProviderProps as c, type TableComponents as d, useTableFilter as u };
231
+ export { type ColumnConfig as C, type EmptyStateConfig as E, type FilterConfig as F, type LoadingStateConfig as L, type NoSearchResultConfig as N, type PaginationConfig as P, TableProvider as T, type UseTableFilterOptions as U, type UseTableFilterReturn as a, type TableParams as b, type TableProviderProps as c, type TableComponents as d, useTableFilter as u };
@@ -92,6 +92,41 @@ interface PaginationConfig {
92
92
  /** Total pages (if known from backend) */
93
93
  totalPages?: number;
94
94
  }
95
+ /**
96
+ * Empty state configuration
97
+ */
98
+ interface EmptyStateConfig {
99
+ /** Custom component to render when table is empty (no data and no search active) */
100
+ component?: ReactNode;
101
+ /** Text message to show in empty state (used if component not provided) */
102
+ message?: string;
103
+ /** Image to display in empty state */
104
+ image?: string;
105
+ /** Button text for empty state action */
106
+ buttonText?: string;
107
+ /** Callback when empty state button is clicked */
108
+ onButtonClick?: () => void;
109
+ }
110
+ /**
111
+ * Loading state configuration
112
+ */
113
+ interface LoadingStateConfig {
114
+ /** Custom component to render when table is loading */
115
+ component?: ReactNode;
116
+ }
117
+ /**
118
+ * No search result state configuration
119
+ */
120
+ interface NoSearchResultConfig {
121
+ /** Custom component to render when search returns no results */
122
+ component?: ReactNode;
123
+ /** Title for no search result state */
124
+ title?: string;
125
+ /** Description for no search result state */
126
+ description?: string;
127
+ /** Image to display in no search result state */
128
+ image?: string;
129
+ }
95
130
  /**
96
131
  * Table components exposed via render prop
97
132
  */
@@ -131,8 +166,12 @@ interface TableProviderProps<T = Record<string, unknown>> {
131
166
  readonly paginationConfig?: PaginationConfig;
132
167
  /** Search placeholder text */
133
168
  readonly searchPlaceholder?: string;
134
- /** Image for no search result state */
135
- readonly noSearchResultImage?: string;
169
+ /** Empty state configuration (when table is empty with no search) */
170
+ readonly emptyState?: EmptyStateConfig;
171
+ /** Loading state configuration (when table is loading) */
172
+ readonly loadingState?: LoadingStateConfig;
173
+ /** No search result state configuration (when search returns no results) */
174
+ readonly noSearchResultState?: NoSearchResultConfig;
136
175
  /** Key field name to use for unique row identification (recommended for better performance) */
137
176
  readonly rowKey?: keyof T;
138
177
  /** Callback when any parameter changes */
@@ -187,6 +226,6 @@ interface TableProviderProps<T = Record<string, unknown>> {
187
226
  * />
188
227
  * ```
189
228
  */
190
- declare function TableProvider<T extends Record<string, unknown>>({ data, headers, loading, variant, enableSearch, enableFilters, enableTableSort, enablePagination, enableRowClick, initialFilters, paginationConfig, searchPlaceholder, noSearchResultImage, rowKey, onParamsChange, onRowClick, children, }: TableProviderProps<T>): react_jsx_runtime.JSX.Element;
229
+ declare function TableProvider<T extends Record<string, unknown>>({ data, headers, loading, variant, enableSearch, enableFilters, enableTableSort, enablePagination, enableRowClick, initialFilters, paginationConfig, searchPlaceholder, emptyState, loadingState, noSearchResultState, rowKey, onParamsChange, onRowClick, children, }: TableProviderProps<T>): react_jsx_runtime.JSX.Element;
191
230
 
192
- export { type ColumnConfig as C, type FilterConfig as F, type PaginationConfig as P, TableProvider as T, type UseTableFilterOptions as U, type UseTableFilterReturn as a, type TableParams as b, type TableProviderProps as c, type TableComponents as d, useTableFilter as u };
231
+ export { type ColumnConfig as C, type EmptyStateConfig as E, type FilterConfig as F, type LoadingStateConfig as L, type NoSearchResultConfig as N, type PaginationConfig as P, TableProvider as T, type UseTableFilterOptions as U, type UseTableFilterReturn as a, type TableParams as b, type TableProviderProps as c, type TableComponents as d, useTableFilter as u };
package/dist/index.css CHANGED
@@ -2984,9 +2984,6 @@
2984
2984
  .py-8 {
2985
2985
  padding-block: calc(var(--spacing) * 8);
2986
2986
  }
2987
- .py-12 {
2988
- padding-block: calc(var(--spacing) * 12);
2989
- }
2990
2987
  .py-\[17px\] {
2991
2988
  padding-block: 17px;
2992
2989
  }