ctc-component-library 0.1.2 → 0.1.4

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.
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { AvatarProps } from './types';
3
- export declare const Avatar: ({ text, textColor, backgroundColor, customClassName, dataTestid }: AvatarProps) => JSX.Element;
2
+ export declare const Avatar: ({ text, textColor, backgroundColor, customClassName, dataTestid }: AvatarProps) => import("react/jsx-runtime").JSX.Element;
@@ -13,6 +13,6 @@ export interface BadgeProps {
13
13
  variant?: 'big' | 'medium' | 'small';
14
14
  status: 'active' | 'inactive' | 'risk' | 'new';
15
15
  }
16
- export declare type BadgePropsStatusText = {
16
+ export type BadgePropsStatusText = {
17
17
  [key in BadgeProps['status']]: string;
18
18
  };
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { TooltipProps } from './types';
3
- export declare const Tooltip: ({ children, prompText, customStyles, customClassName, backgroundColor, opacity, dataTestid }: TooltipProps) => JSX.Element;
2
+ export declare const Tooltip: ({ children, prompText, customStyles, customClassName, backgroundColor, opacity, dataTestid }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import { TooltipWrapperProps } from './types';
3
- export declare const TooltipWrapper: ({ children, content, customStyles, customClassName, placement, color, backgroundColor, dataTestid }: TooltipWrapperProps) => JSX.Element;
2
+ export declare const TooltipWrapper: ({ children, content, customStyles, customClassName, placement, color, backgroundColor, dataTestid }: TooltipWrapperProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { TableProps } from './types';
2
+ export declare const Table: <T extends object>({ columns, data, onChange, customStyles, className, heightBodyScrollable, widthBodyScrollable, dataTestid }: TableProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ /// <reference types="react" />
2
+ import { ColumnsType } from 'antd/es/table';
3
+ import { TableProps as TablePropsAntD } from 'antd';
4
+ import { TablePaginationConfig } from 'antd/es/table';
5
+ import { FilterValue, SorterResult } from 'antd/es/table/interface';
6
+ export interface TableProps<T> extends Omit<TablePropsAntD<T>, 'columns' | 'data' | 'onChange'> {
7
+ columns: ColumnsType<T>;
8
+ heightBodyScrollable?: number;
9
+ widthBodyScrollable?: number;
10
+ onChange?: (pagination: TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult<T> | SorterResult<T>[], extra: {
11
+ currentDataSource: T[];
12
+ action: 'paginate' | 'sort' | 'filter';
13
+ }) => void;
14
+ data: T[];
15
+ dataTestid?: string;
16
+ className?: string;
17
+ customStyles?: React.CSSProperties;
18
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ctc-component-library",
3
3
  "private": false,
4
- "version": "0.1.2",
4
+ "version": "0.1.4",
5
5
  "type": "module",
6
6
  "main": "dist/index.umd.js",
7
7
  "module": "dist/index.es.js",
@@ -21,7 +21,7 @@
21
21
  "access": "public"
22
22
  },
23
23
  "engines": {
24
- "node": "18.19.1"
24
+ "node": ">=18.19.1"
25
25
  },
26
26
  "husky": {
27
27
  "hooks": {