shekel-fe-shared-lib 1.0.10 → 1.0.13

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.
Files changed (40) hide show
  1. package/README.md +40 -4
  2. package/dist/index.cjs +358 -23
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.mjs +3096 -927
  5. package/dist/index.mjs.map +1 -1
  6. package/dist/types/components/ActionCard/ActionCard.d.ts +10 -0
  7. package/dist/types/components/ActionCard/index.d.ts +1 -0
  8. package/dist/types/components/Button/Button.d.ts +7 -0
  9. package/dist/types/components/Button/index.d.ts +2 -0
  10. package/dist/types/components/Card/Card.d.ts +6 -0
  11. package/dist/types/components/Card/index.d.ts +2 -0
  12. package/dist/types/components/CountrySelector/CountrySelector.d.ts +14 -0
  13. package/dist/types/components/CountrySelector/index.d.ts +1 -0
  14. package/dist/types/components/DashboardCard/DashboardCard.d.ts +14 -0
  15. package/dist/types/components/DashboardCard/index.d.ts +1 -0
  16. package/dist/types/components/Input/CurrencyInput.d.ts +11 -0
  17. package/dist/types/components/Input/Input.d.ts +8 -0
  18. package/dist/types/components/Input/OTPInput.d.ts +12 -0
  19. package/dist/types/components/Input/PasswordInput.d.ts +8 -0
  20. package/dist/types/components/Input/PhoneInput.d.ts +19 -0
  21. package/dist/types/components/Input/index.d.ts +10 -0
  22. package/dist/types/components/NotificationDropdown/NotificationDropdown.d.ts +21 -0
  23. package/dist/types/components/NotificationDropdown/index.d.ts +1 -0
  24. package/dist/types/components/SearchInput.d.ts +7 -0
  25. package/dist/types/components/StatCard/StatCard.d.ts +14 -0
  26. package/dist/types/components/StatCard/index.d.ts +1 -0
  27. package/dist/types/components/TableTop.d.ts +2 -0
  28. package/dist/types/components/TabsComponent/TabsComponent.d.ts +14 -0
  29. package/dist/types/components/TabsComponent/index.d.ts +2 -0
  30. package/dist/types/components/UserCard/UserCard.d.ts +9 -0
  31. package/dist/types/components/UserCard/index.d.ts +2 -0
  32. package/dist/types/components/UserPill/UserPill.d.ts +9 -0
  33. package/dist/types/components/UserPill/index.d.ts +2 -0
  34. package/dist/types/components/UserProfileDropdown/UserProfileDropdown.d.ts +12 -0
  35. package/dist/types/components/UserProfileDropdown/index.d.ts +1 -0
  36. package/dist/types/components/index.d.ts +12 -6
  37. package/package.json +3 -2
  38. package/dist/types/components/Button.d.ts +0 -19
  39. package/dist/types/components/Card.d.ts +0 -13
  40. package/dist/types/components/StatCard.d.ts +0 -21
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ export interface ActionCardProps {
3
+ label: string;
4
+ icon: React.ReactNode;
5
+ iconColor?: 'red' | 'blue' | 'green' | 'purple' | 'orange' | 'yellow';
6
+ onClick?: () => void;
7
+ disabled?: boolean;
8
+ className?: string;
9
+ }
10
+ export declare const ActionCard: React.FC<ActionCardProps>;
@@ -0,0 +1 @@
1
+ export * from './ActionCard';
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { ButtonProps as AntButtonProps } from 'antd';
3
+ export interface ButtonProps extends Omit<AntButtonProps, 'variant' | 'size'> {
4
+ variant?: 'primary' | 'secondary' | 'outline' | 'ghost';
5
+ size?: 'small' | 'medium' | 'large';
6
+ }
7
+ export declare const Button: React.FC<ButtonProps>;
@@ -0,0 +1,2 @@
1
+ export { Button } from './Button';
2
+ export type { ButtonProps } from './Button';
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ import { CardProps as AntCardProps } from 'antd';
3
+ export interface CardProps extends AntCardProps {
4
+ shadow?: 'sm' | 'md' | 'lg' | 'xl';
5
+ }
6
+ export declare const Card: React.FC<CardProps>;
@@ -0,0 +1,2 @@
1
+ export { Card } from './Card';
2
+ export type { CardProps } from './Card';
@@ -0,0 +1,14 @@
1
+ import { default as React } from 'react';
2
+ import { SelectProps } from 'antd';
3
+ export interface Country {
4
+ code: string;
5
+ name: string;
6
+ flag: string;
7
+ }
8
+ export interface CountrySelectorProps extends Omit<SelectProps, 'options'> {
9
+ countries?: Country[];
10
+ defaultCountry?: string;
11
+ onCountryChange?: (countryCode: string) => void;
12
+ showSearch?: boolean;
13
+ }
14
+ export declare const CountrySelector: React.FC<CountrySelectorProps>;
@@ -0,0 +1 @@
1
+ export * from './CountrySelector';
@@ -0,0 +1,14 @@
1
+ import { default as React } from 'react';
2
+ export interface DashboardCardProps {
3
+ label: string;
4
+ value: string | number;
5
+ icon?: React.ReactNode;
6
+ showVisibilityToggle?: boolean;
7
+ onVisibilityToggle?: () => void;
8
+ valuePrefix?: string;
9
+ ledgerBalance?: string | number;
10
+ backgroundPattern?: 'wave' | 'grid' | 'none';
11
+ width?: string | number;
12
+ className?: string;
13
+ }
14
+ export declare const DashboardCard: React.FC<DashboardCardProps>;
@@ -0,0 +1 @@
1
+ export * from './DashboardCard';
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import { InputProps as AntInputProps } from 'antd';
3
+ export interface CurrencyInputProps extends Omit<AntInputProps, 'onChange'> {
4
+ label?: string;
5
+ error?: string;
6
+ helperText?: string;
7
+ currencySymbol?: string;
8
+ formatAmount?: boolean;
9
+ onChange?: (value: string, event: React.ChangeEvent<HTMLInputElement>) => void;
10
+ }
11
+ export declare const CurrencyInput: React.FC<CurrencyInputProps>;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { InputProps as AntInputProps } from 'antd';
3
+ export interface InputProps extends AntInputProps {
4
+ label?: string;
5
+ error?: string;
6
+ helperText?: string;
7
+ }
8
+ export declare const Input: React.FC<InputProps>;
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+ export interface OTPInputProps {
3
+ length?: number;
4
+ value?: string;
5
+ onChange?: (value: string) => void;
6
+ onComplete?: (value: string) => void;
7
+ error?: boolean;
8
+ errorMessage?: string;
9
+ disabled?: boolean;
10
+ className?: string;
11
+ }
12
+ export declare const OTPInput: React.FC<OTPInputProps>;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { PasswordProps as AntPasswordProps } from 'antd/es/input';
3
+ export interface PasswordInputProps extends AntPasswordProps {
4
+ label?: string;
5
+ error?: string;
6
+ helperText?: string;
7
+ }
8
+ export declare const PasswordInput: React.FC<PasswordInputProps>;
@@ -0,0 +1,19 @@
1
+ import { default as React } from 'react';
2
+ import { InputProps as AntInputProps } from 'antd';
3
+ export interface PhoneInputProps extends Omit<AntInputProps, 'addonBefore' | 'value' | 'onChange'> {
4
+ label?: string;
5
+ error?: string;
6
+ helperText?: string;
7
+ countryCode?: string;
8
+ onCountryCodeChange?: (value: string) => void;
9
+ countryCodes?: {
10
+ value: string;
11
+ label: string;
12
+ }[];
13
+ showCountryCodeDropdown?: boolean;
14
+ format?: 'default' | 'spaced' | 'dashed' | 'none';
15
+ customFormat?: (value: string) => string;
16
+ value?: string;
17
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
18
+ }
19
+ export declare const PhoneInput: React.FC<PhoneInputProps>;
@@ -0,0 +1,10 @@
1
+ export { Input } from './Input';
2
+ export { PasswordInput } from './PasswordInput';
3
+ export { OTPInput } from './OTPInput';
4
+ export { PhoneInput } from './PhoneInput';
5
+ export { CurrencyInput } from './CurrencyInput';
6
+ export type { InputProps } from './Input';
7
+ export type { PasswordInputProps } from './PasswordInput';
8
+ export type { OTPInputProps } from './OTPInput';
9
+ export type { PhoneInputProps } from './PhoneInput';
10
+ export type { CurrencyInputProps } from './CurrencyInput';
@@ -0,0 +1,21 @@
1
+ import { default as React } from 'react';
2
+ export interface NotificationItem {
3
+ id: string;
4
+ title: string;
5
+ description: string;
6
+ timestamp: string;
7
+ isNew?: boolean;
8
+ icon?: React.ReactNode;
9
+ iconBackgroundColor?: string;
10
+ iconColor?: string;
11
+ onClick?: () => void;
12
+ }
13
+ export interface NotificationDropdownProps {
14
+ title: string;
15
+ count?: number;
16
+ notifications: NotificationItem[];
17
+ onViewMore?: () => void;
18
+ className?: string;
19
+ maxHeight?: string | number;
20
+ }
21
+ export declare const NotificationDropdown: React.FC<NotificationDropdownProps>;
@@ -0,0 +1 @@
1
+ export * from './NotificationDropdown';
@@ -1,4 +1,8 @@
1
1
  import { FC, ReactNode, InputHTMLAttributes, CSSProperties } from 'react';
2
+ /**
3
+ * @deprecated SearchInput is deprecated as of v1.0.11. Please use the new Input component instead.
4
+ * The new Input component provides better functionality and consistent styling with Ant Design.
5
+ */
2
6
  export interface SearchInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
3
7
  icon?: ReactNode;
4
8
  iconPosition?: 'left' | 'right';
@@ -14,5 +18,8 @@ export interface SearchInputProps extends Omit<InputHTMLAttributes<HTMLInputElem
14
18
  rounded?: 'none' | 'sm' | 'md' | 'lg' | 'full';
15
19
  style?: CSSProperties;
16
20
  }
21
+ /**
22
+ * @deprecated SearchInput is deprecated as of v1.0.11. Please use the new Input component instead.
23
+ */
17
24
  export declare const SearchInput: FC<SearchInputProps>;
18
25
  export default SearchInput;
@@ -0,0 +1,14 @@
1
+ import { default as React } from 'react';
2
+ export interface StatCardProps {
3
+ label: string;
4
+ value: string | number;
5
+ icon?: React.ReactNode;
6
+ iconBackgroundColor?: string;
7
+ iconColor?: string;
8
+ valuePrefix?: string;
9
+ progressText?: string;
10
+ badge?: string;
11
+ width?: string | number;
12
+ className?: string;
13
+ }
14
+ export declare const StatCard: React.FC<StatCardProps>;
@@ -0,0 +1 @@
1
+ export * from './StatCard';
@@ -15,6 +15,8 @@ export interface TableTopProps {
15
15
  searchFocusBorderColor?: string;
16
16
  rounded?: 'none' | 'sm' | 'md' | 'lg' | 'full';
17
17
  style?: CSSProperties;
18
+ hideActionButtons?: boolean;
19
+ selectedActionButton?: ReactNode;
18
20
  }
19
21
  export declare const TableTop: FC<TableTopProps>;
20
22
  export default TableTop;
@@ -0,0 +1,14 @@
1
+ import { default as React } from 'react';
2
+ export interface TabItem {
3
+ key: string;
4
+ label: string;
5
+ children: React.ReactNode;
6
+ }
7
+ export interface TabsComponentProps {
8
+ items: TabItem[];
9
+ defaultActiveKey?: string;
10
+ activeKey?: string;
11
+ onChange?: (activeKey: string) => void;
12
+ className?: string;
13
+ }
14
+ export declare const TabsComponent: React.FC<TabsComponentProps>;
@@ -0,0 +1,2 @@
1
+ export { TabsComponent } from './TabsComponent';
2
+ export type { TabsComponentProps, TabItem } from './TabsComponent';
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ export interface UserCardProps {
3
+ name: string;
4
+ email: string;
5
+ role?: string;
6
+ avatar?: string;
7
+ className?: string;
8
+ }
9
+ export declare const UserCard: React.FC<UserCardProps>;
@@ -0,0 +1,2 @@
1
+ export { UserCard } from './UserCard';
2
+ export type { UserCardProps } from './UserCard';
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ export interface UserPillProps {
3
+ name: string;
4
+ subtitle?: string;
5
+ avatar?: string;
6
+ className?: string;
7
+ size?: 'small' | 'medium' | 'large';
8
+ }
9
+ export declare const UserPill: React.FC<UserPillProps>;
@@ -0,0 +1,2 @@
1
+ export { UserPill } from './UserPill';
2
+ export type { UserPillProps } from './UserPill';
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+ import { MenuProps } from 'antd';
3
+ export interface UserProfileDropdownProps {
4
+ name: string;
5
+ role?: string;
6
+ avatarUrl?: string;
7
+ menuItems?: MenuProps['items'];
8
+ onMenuClick?: (key: string) => void;
9
+ className?: string;
10
+ width?: string | number;
11
+ }
12
+ export declare const UserProfileDropdown: React.FC<UserProfileDropdownProps>;
@@ -0,0 +1 @@
1
+ export * from './UserProfileDropdown';
@@ -1,11 +1,8 @@
1
- export { Button } from './Button';
2
- export type { ButtonProps } from './Button';
3
- export { StatCard } from './StatCard';
4
- export type { StatCardProps } from './StatCard';
1
+ export * from './Button';
2
+ export * from './StatCard';
5
3
  export { SearchInput } from './SearchInput';
6
4
  export type { SearchInputProps } from './SearchInput';
7
- export { Card } from './Card';
8
- export type { CardProps } from './Card';
5
+ export * from './Card';
9
6
  export { Dropdown } from './Dropdown';
10
7
  export type { DropdownProps, DropdownMenuItem } from './Dropdown';
11
8
  export { Select } from './Select';
@@ -26,3 +23,12 @@ export { Checkbox } from './Checkbox';
26
23
  export type { CheckboxProps } from './Checkbox';
27
24
  export { SelectedItemsList } from './SelectedItemsList';
28
25
  export type { SelectedItemsListProps, SelectedItem } from './SelectedItemsList';
26
+ export * from './Input';
27
+ export * from './UserPill';
28
+ export * from './UserCard';
29
+ export * from './CountrySelector';
30
+ export * from './UserProfileDropdown';
31
+ export * from './ActionCard';
32
+ export * from './DashboardCard';
33
+ export * from './NotificationDropdown';
34
+ export * from './TabsComponent';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shekel-fe-shared-lib",
3
- "version": "1.0.10",
3
+ "version": "1.0.13",
4
4
  "description": "Shared component library built with React and Tailwind CSS",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -29,7 +29,7 @@
29
29
  "tailwindcss",
30
30
  "ui"
31
31
  ],
32
- "author": "",
32
+ "author": "Shekel",
33
33
  "license": "ISC",
34
34
  "devDependencies": {
35
35
  "@tailwindcss/postcss": "^4.1.17",
@@ -45,6 +45,7 @@
45
45
  "vite-plugin-dts": "^4.5.4"
46
46
  },
47
47
  "peerDependencies": {
48
+ "antd": "^5.0.0 || ^6.0.0",
48
49
  "react": "^18.0.0 || ^19.0.0",
49
50
  "react-dom": "^18.0.0 || ^19.0.0"
50
51
  }
@@ -1,19 +0,0 @@
1
- import { ButtonHTMLAttributes, CSSProperties, FC, ReactNode } from 'react';
2
- export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
3
- variant?: 'primary' | 'outlined' | 'ghost' | 'text';
4
- size?: 'sm' | 'md' | 'lg' | 'responsive';
5
- fullWidth?: boolean;
6
- icon?: ReactNode;
7
- iconPosition?: 'left' | 'right';
8
- loading?: boolean;
9
- hoverColor?: string;
10
- bgColor?: string;
11
- textColor?: string;
12
- borderColor?: string;
13
- hoverBgColor?: string;
14
- hoverTextColor?: string;
15
- rounded?: 'none' | 'sm' | 'md' | 'lg' | 'full';
16
- style?: CSSProperties;
17
- }
18
- export declare const Button: FC<ButtonProps>;
19
- export default Button;
@@ -1,13 +0,0 @@
1
- import { FC, HTMLAttributes, CSSProperties } from 'react';
2
- export interface CardProps extends HTMLAttributes<HTMLDivElement> {
3
- padding?: 'none' | 'sm' | 'md' | 'lg' | 'responsive';
4
- shadow?: 'none' | 'sm' | 'md' | 'lg';
5
- hover?: boolean;
6
- bordered?: boolean;
7
- rounded?: 'none' | 'sm' | 'md' | 'lg' | 'xl';
8
- bgColor?: string;
9
- borderColor?: string;
10
- style?: CSSProperties;
11
- }
12
- export declare const Card: FC<CardProps>;
13
- export default Card;
@@ -1,21 +0,0 @@
1
- import { FC, CSSProperties } from 'react';
2
- export interface StatCardProps {
3
- label: string;
4
- value: string | number;
5
- selected?: boolean;
6
- onClick?: () => void;
7
- className?: string;
8
- size?: 'sm' | 'md' | 'lg' | 'responsive';
9
- rounded?: 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
10
- bgColor?: string;
11
- borderColor?: string;
12
- labelColor?: string;
13
- valueColor?: string;
14
- selectedBgColor?: string;
15
- selectedBorderColor?: string;
16
- selectedLabelColor?: string;
17
- selectedValueColor?: string;
18
- style?: CSSProperties;
19
- }
20
- export declare const StatCard: FC<StatCardProps>;
21
- export default StatCard;