shekel-fe-shared-lib 1.0.2 → 1.0.5

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,8 +1,8 @@
1
- import { default as React } from 'react';
1
+ import { FC, ReactNode } from 'react';
2
2
  export interface DropdownMenuItem {
3
3
  key: string;
4
- label: React.ReactNode;
5
- icon?: React.ReactNode;
4
+ label: ReactNode;
5
+ icon?: ReactNode;
6
6
  disabled?: boolean;
7
7
  danger?: boolean;
8
8
  onClick?: () => void;
@@ -11,10 +11,10 @@ export interface DropdownProps {
11
11
  items: DropdownMenuItem[];
12
12
  trigger?: 'click' | 'hover';
13
13
  placement?: 'bottomLeft' | 'bottomRight' | 'topLeft' | 'topRight';
14
- children: React.ReactNode;
14
+ children: ReactNode;
15
15
  className?: string;
16
16
  overlayClassName?: string;
17
17
  disabled?: boolean;
18
18
  }
19
- export declare const Dropdown: React.FC<DropdownProps>;
19
+ export declare const Dropdown: FC<DropdownProps>;
20
20
  export default Dropdown;
@@ -1,15 +1,15 @@
1
- import { default as React } from 'react';
1
+ import { FC, ReactNode } from 'react';
2
2
  export interface ModalProps {
3
3
  open: boolean;
4
4
  onClose: () => void;
5
5
  title?: string;
6
- children: React.ReactNode;
7
- footer?: React.ReactNode;
6
+ children: ReactNode;
7
+ footer?: ReactNode;
8
8
  width?: string | number;
9
9
  closable?: boolean;
10
10
  maskClosable?: boolean;
11
11
  centered?: boolean;
12
12
  className?: string;
13
13
  }
14
- export declare const Modal: React.FC<ModalProps>;
14
+ export declare const Modal: FC<ModalProps>;
15
15
  export default Modal;
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { FC, ReactNode } from 'react';
2
2
  export interface ProgressProps {
3
3
  percent?: number;
4
4
  status?: 'normal' | 'success' | 'exception' | 'active';
@@ -7,7 +7,7 @@ export interface ProgressProps {
7
7
  strokeWidth?: number;
8
8
  size?: 'sm' | 'md' | 'lg';
9
9
  className?: string;
10
- format?: (percent: number) => React.ReactNode;
10
+ format?: (percent: number) => ReactNode;
11
11
  }
12
- export declare const Progress: React.FC<ProgressProps>;
12
+ export declare const Progress: FC<ProgressProps>;
13
13
  export default Progress;
@@ -1,10 +1,10 @@
1
- import { default as React } from 'react';
2
- export interface SearchInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
3
- icon?: React.ReactNode;
1
+ import { FC, ReactNode, InputHTMLAttributes } from 'react';
2
+ export interface SearchInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
3
+ icon?: ReactNode;
4
4
  iconPosition?: 'left' | 'right';
5
5
  size?: 'sm' | 'md' | 'lg';
6
6
  fullWidth?: boolean;
7
7
  onIconClick?: () => void;
8
8
  }
9
- export declare const SearchInput: React.FC<SearchInputProps>;
9
+ export declare const SearchInput: FC<SearchInputProps>;
10
10
  export default SearchInput;
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { FC } from 'react';
2
2
  export interface SelectOption {
3
3
  value: string | number;
4
4
  label: string;
@@ -18,5 +18,5 @@ export interface SelectProps {
18
18
  showSearch?: boolean;
19
19
  searchPlaceholder?: string;
20
20
  }
21
- export declare const Select: React.FC<SelectProps>;
21
+ export declare const Select: FC<SelectProps>;
22
22
  export default Select;
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { FC } from 'react';
2
2
  export interface SelectedItem {
3
3
  id: string | number;
4
4
  label: string;
@@ -12,5 +12,5 @@ export interface SelectedItemsListProps {
12
12
  itemClassName?: string;
13
13
  maxHeight?: string;
14
14
  }
15
- export declare const SelectedItemsList: React.FC<SelectedItemsListProps>;
15
+ export declare const SelectedItemsList: FC<SelectedItemsListProps>;
16
16
  export default SelectedItemsList;
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import { FC } from 'react';
2
2
  export interface StatCardProps {
3
3
  label: string;
4
4
  value: string | number;
@@ -6,5 +6,5 @@ export interface StatCardProps {
6
6
  onClick?: () => void;
7
7
  className?: string;
8
8
  }
9
- export declare const StatCard: React.FC<StatCardProps>;
9
+ export declare const StatCard: FC<StatCardProps>;
10
10
  export default StatCard;
@@ -1,9 +1,9 @@
1
- import { default as React } from 'react';
1
+ import { FC, ReactNode } from 'react';
2
2
  export interface StepItem {
3
3
  title: string;
4
4
  description?: string;
5
5
  status?: 'wait' | 'process' | 'finish' | 'error';
6
- icon?: React.ReactNode;
6
+ icon?: ReactNode;
7
7
  }
8
8
  export interface StepsProps {
9
9
  items: StepItem[];
@@ -13,5 +13,5 @@ export interface StepsProps {
13
13
  variant?: 'default' | 'outline';
14
14
  className?: string;
15
15
  }
16
- export declare const Steps: React.FC<StepsProps>;
16
+ export declare const Steps: FC<StepsProps>;
17
17
  export default Steps;
@@ -1,9 +1,9 @@
1
- import { default as React } from 'react';
1
+ import { ReactNode, HTMLAttributes } from 'react';
2
2
  export interface ColumnDef<T = any> {
3
3
  key: string;
4
4
  title: string;
5
5
  dataIndex?: string;
6
- render?: (value: any, record: T, index: number) => React.ReactNode;
6
+ render?: (value: any, record: T, index: number) => ReactNode;
7
7
  width?: string | number;
8
8
  align?: 'left' | 'center' | 'right';
9
9
  sortable?: boolean;
@@ -14,7 +14,7 @@ export interface TableProps<T = any> {
14
14
  rowKey?: string | ((record: T) => string);
15
15
  pagination?: PaginationConfig | false;
16
16
  loading?: boolean;
17
- onRow?: (record: T, index: number) => React.HTMLAttributes<HTMLTableRowElement>;
17
+ onRow?: (record: T, index: number) => HTMLAttributes<HTMLTableRowElement>;
18
18
  className?: string;
19
19
  bordered?: boolean;
20
20
  striped?: boolean;
@@ -1,12 +1,12 @@
1
- import { default as React } from 'react';
1
+ import { FC, ReactNode } from 'react';
2
2
  export interface TableTopProps {
3
3
  title?: string;
4
4
  description?: string;
5
5
  searchPlaceholder?: string;
6
6
  onSearch?: (value: string) => void;
7
- actions?: React.ReactNode;
8
- filters?: React.ReactNode;
7
+ actions?: ReactNode;
8
+ filters?: ReactNode;
9
9
  className?: string;
10
10
  }
11
- export declare const TableTop: React.FC<TableTopProps>;
11
+ export declare const TableTop: FC<TableTopProps>;
12
12
  export default TableTop;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shekel-fe-shared-lib",
3
- "version": "1.0.2",
3
+ "version": "1.0.5",
4
4
  "description": "Shared component library built with React and Tailwind CSS",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -32,8 +32,8 @@
32
32
  "devDependencies": {
33
33
  "@tailwindcss/postcss": "^4.1.17",
34
34
  "@types/node": "^24.10.1",
35
- "@types/react": "^19.2.7",
36
- "@types/react-dom": "^19.2.3",
35
+ "@types/react": "^18.0.0",
36
+ "@types/react-dom": "^18.0.0",
37
37
  "@vitejs/plugin-react": "^4.7.0",
38
38
  "autoprefixer": "^10.4.22",
39
39
  "postcss": "^8.5.6",
@@ -43,7 +43,7 @@
43
43
  "vite-plugin-dts": "^4.5.4"
44
44
  },
45
45
  "peerDependencies": {
46
- "react": "^19.2.0",
47
- "react-dom": "^19.2.0"
46
+ "react": "^18.0.0 || ^19.0.0",
47
+ "react-dom": "^18.0.0 || ^19.0.0"
48
48
  }
49
49
  }