@true-tech-team/react-components 0.0.1 → 0.0.2

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.
@@ -21,6 +21,13 @@ import { default as Profile } from './profile.svg?react';
21
21
  import { default as Preferences } from './preferences.svg?react';
22
22
  import { default as Account } from './account.svg?react';
23
23
  import { default as Logout } from './logout.svg?react';
24
+ import { default as User } from './user.svg?react';
25
+ import { default as Users } from './users.svg?react';
26
+ import { default as Building } from './building.svg?react';
27
+ import { default as Dollar } from './dollar.svg?react';
28
+ import { default as ChartLine } from './chart-line.svg?react';
29
+ import { default as ChartBar } from './chart-bar.svg?react';
30
+ import { default as TrendingDown } from './trending-down.svg?react';
24
31
  /**
25
32
  * Icon registry mapping icon names to SVG components
26
33
  */
@@ -94,6 +101,27 @@ export declare const iconRegistry: {
94
101
  readonly logout: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
95
102
  title?: string;
96
103
  }>;
104
+ readonly user: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
105
+ title?: string;
106
+ }>;
107
+ readonly users: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
108
+ title?: string;
109
+ }>;
110
+ readonly building: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
111
+ title?: string;
112
+ }>;
113
+ readonly dollar: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
114
+ title?: string;
115
+ }>;
116
+ readonly 'chart-line': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
117
+ title?: string;
118
+ }>;
119
+ readonly 'chart-bar': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
120
+ title?: string;
121
+ }>;
122
+ readonly 'trending-down': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
123
+ title?: string;
124
+ }>;
97
125
  };
98
126
  /**
99
127
  * Available icon names
@@ -102,4 +130,4 @@ export type IconName = keyof typeof iconRegistry;
102
130
  /**
103
131
  * Named exports for direct import
104
132
  */
105
- export { Calendar, ChevronDown, ChevronUp, ChevronLeft, ChevronRight, Close, Check, Minus, Plus, Info, Help, Warning, Error, Eye, EyeOff, Edit, Copy, Delete, Settings, Profile, Preferences, Account, Logout, };
133
+ export { Calendar, ChevronDown, ChevronUp, ChevronLeft, ChevronRight, Close, Check, Minus, Plus, Info, Help, Warning, Error, Eye, EyeOff, Edit, Copy, Delete, Settings, Profile, Preferences, Account, Logout, User, Users, Building, Dollar, ChartLine, ChartBar, TrendingDown, };
@@ -0,0 +1,58 @@
1
+ import { default as React } from 'react';
2
+ import { BaseComponentProps, ExtendedComponentSize } from '../../../types/component.types';
3
+ /**
4
+ * Props for the Avatar component
5
+ */
6
+ export interface AvatarProps extends Omit<BaseComponentProps, 'children'> {
7
+ /**
8
+ * Image source URL
9
+ */
10
+ src?: string;
11
+ /**
12
+ * Alt text for the image
13
+ */
14
+ alt?: string;
15
+ /**
16
+ * Size of the avatar
17
+ * @default 'md'
18
+ */
19
+ size?: ExtendedComponentSize;
20
+ /**
21
+ * Visual variant of the avatar
22
+ * @default 'circular'
23
+ */
24
+ variant?: 'circular' | 'rounded' | 'square';
25
+ /**
26
+ * Fallback content when image fails to load
27
+ * Can be an icon, text, or any ReactNode
28
+ */
29
+ fallback?: React.ReactNode;
30
+ /**
31
+ * Initials to display when no image is available
32
+ * Takes precedence over fallback if provided
33
+ */
34
+ initials?: string;
35
+ /**
36
+ * Status indicator
37
+ */
38
+ status?: 'success' | 'warning' | 'error' | 'info' | 'neutral' | 'processing';
39
+ }
40
+ /**
41
+ * Avatar - User profile picture or placeholder with initials/fallback
42
+ *
43
+ * @example
44
+ * ```tsx
45
+ * <Avatar src="https://example.com/avatar.jpg" alt="John Doe" size="md" />
46
+ * ```
47
+ *
48
+ * @example
49
+ * ```tsx
50
+ * <Avatar initials="JD" status="success" variant="circular" />
51
+ * ```
52
+ *
53
+ * @example
54
+ * ```tsx
55
+ * <Avatar fallback={<Icon name="user" />} variant="rounded" size="lg" />
56
+ * ```
57
+ */
58
+ export declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ export { Avatar } from './Avatar';
2
+ export type { AvatarProps } from './Avatar';
@@ -0,0 +1,48 @@
1
+ import { default as React } from 'react';
2
+ import { BaseComponentProps } from '../../../types/component.types';
3
+ /**
4
+ * Props for the Badge component
5
+ */
6
+ export interface BadgeProps extends BaseComponentProps {
7
+ /**
8
+ * Visual variant of the component
9
+ * @default 'primary'
10
+ */
11
+ variant?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';
12
+ /**
13
+ * Size of the component
14
+ * @default 'md'
15
+ */
16
+ size?: 'sm' | 'md' | 'lg';
17
+ /**
18
+ * Whether the component is disabled
19
+ * @default false
20
+ */
21
+ disabled?: boolean;
22
+ }
23
+ /**
24
+ * Badge - Small status or count indicator for displaying numerical information or brief status text
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * <Badge variant="primary" size="md">
29
+ * 5
30
+ * </Badge>
31
+ * ```
32
+ *
33
+ * @example
34
+ * ```tsx
35
+ * <Badge variant="danger" size="sm">
36
+ * New
37
+ * </Badge>
38
+ * ```
39
+ *
40
+ * @example
41
+ * ```tsx
42
+ * <Badge variant="success">
43
+ * Active
44
+ * </Badge>
45
+ * ```
46
+ */
47
+ export declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
48
+ export default Badge;
@@ -0,0 +1,3 @@
1
+ export { Badge } from './Badge';
2
+ export type { BadgeProps } from './Badge';
3
+ export { default } from './Badge';
@@ -0,0 +1,61 @@
1
+ import { default as React } from 'react';
2
+ import { BaseComponentProps } from '../../../types/component.types';
3
+ /**
4
+ * Props for the Chip component
5
+ */
6
+ export interface ChipProps extends BaseComponentProps {
7
+ /**
8
+ * Visual variant of the component
9
+ * @default 'primary'
10
+ */
11
+ variant?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';
12
+ /**
13
+ * Size of the component
14
+ * @default 'md'
15
+ */
16
+ size?: 'sm' | 'md' | 'lg';
17
+ /**
18
+ * Whether the component is disabled
19
+ * @default false
20
+ */
21
+ disabled?: boolean;
22
+ /**
23
+ * Callback when the remove button is clicked
24
+ */
25
+ onRemove?: (event: React.MouseEvent<HTMLButtonElement>) => void;
26
+ /**
27
+ * Custom class name for the remove button
28
+ */
29
+ removeButtonClassName?: string;
30
+ /**
31
+ * ARIA label for the remove button
32
+ * @default 'Remove'
33
+ */
34
+ removeButtonAriaLabel?: string;
35
+ }
36
+ /**
37
+ * Chip - Interactive tag-like component with optional remove functionality
38
+ *
39
+ * @example
40
+ * ```tsx
41
+ * <Chip variant="primary" size="md">
42
+ * Tag Name
43
+ * </Chip>
44
+ * ```
45
+ *
46
+ * @example
47
+ * ```tsx
48
+ * <Chip variant="danger" size="sm" onRemove={() => console.log('removed')}>
49
+ * Removable
50
+ * </Chip>
51
+ * ```
52
+ *
53
+ * @example
54
+ * ```tsx
55
+ * <Chip variant="success">
56
+ * Active
57
+ * </Chip>
58
+ * ```
59
+ */
60
+ export declare const Chip: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<HTMLDivElement>>;
61
+ export default Chip;
@@ -0,0 +1,3 @@
1
+ export { Chip } from './Chip';
2
+ export type { ChipProps } from './Chip';
3
+ export { default } from './Chip';
@@ -0,0 +1,65 @@
1
+ import { default as React } from 'react';
2
+ import { BaseComponentProps } from '../../../types/component.types';
3
+ /**
4
+ * Props for the CircularProgress component
5
+ */
6
+ export interface CircularProgressProps extends Omit<BaseComponentProps, 'children'> {
7
+ /**
8
+ * Visual variant of the component
9
+ * @default 'primary'
10
+ */
11
+ variant?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';
12
+ /**
13
+ * Size of the component
14
+ * @default 'md'
15
+ */
16
+ size?: 'sm' | 'md' | 'lg';
17
+ /**
18
+ * Current progress value (0-100)
19
+ * @default 0
20
+ */
21
+ value?: number;
22
+ /**
23
+ * Maximum value
24
+ * @default 100
25
+ */
26
+ max?: number;
27
+ /**
28
+ * Whether to show the value label in the center
29
+ * @default false
30
+ */
31
+ showValue?: boolean;
32
+ /**
33
+ * Custom label to display in the center
34
+ */
35
+ label?: string;
36
+ /**
37
+ * Stroke width of the circle
38
+ * @default 4
39
+ */
40
+ strokeWidth?: number;
41
+ /**
42
+ * Custom format function for the value display
43
+ */
44
+ formatValue?: (value: number, max: number) => string;
45
+ }
46
+ /**
47
+ * CircularProgress - Circular progress indicator for showing task completion or loading states
48
+ *
49
+ * @example
50
+ * ```tsx
51
+ * <CircularProgress variant="primary" value={75} showValue />
52
+ * ```
53
+ *
54
+ * @example
55
+ * ```tsx
56
+ * <CircularProgress variant="success" value={90} label="Complete" />
57
+ * ```
58
+ *
59
+ * @example
60
+ * ```tsx
61
+ * <CircularProgress variant="warning" value={50} size="lg" />
62
+ * ```
63
+ */
64
+ export declare const CircularProgress: React.ForwardRefExoticComponent<CircularProgressProps & React.RefAttributes<HTMLDivElement>>;
65
+ export default CircularProgress;
@@ -0,0 +1,3 @@
1
+ export { CircularProgress } from './CircularProgress';
2
+ export type { CircularProgressProps } from './CircularProgress';
3
+ export { default } from './CircularProgress';
@@ -0,0 +1,85 @@
1
+ import { default as React } from 'react';
2
+ import { BaseComponentProps } from '../../../types/component.types';
3
+ /**
4
+ * Props for the KPI component
5
+ */
6
+ export interface KPIProps extends BaseComponentProps {
7
+ /**
8
+ * Visual variant of the component
9
+ * @default 'primary'
10
+ */
11
+ variant?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';
12
+ /**
13
+ * Size of the component
14
+ * @default 'md'
15
+ */
16
+ size?: 'sm' | 'md' | 'lg';
17
+ /**
18
+ * Title of the KPI
19
+ */
20
+ title: string;
21
+ /**
22
+ * The main metric value
23
+ */
24
+ value: string | number;
25
+ /**
26
+ * Optional subtitle or category
27
+ */
28
+ subtitle?: string;
29
+ /**
30
+ * Optional description text
31
+ */
32
+ description?: string;
33
+ /**
34
+ * Optional change indicator (e.g., "+12%", "-5%")
35
+ */
36
+ change?: string;
37
+ /**
38
+ * Direction of change
39
+ */
40
+ changeType?: 'increase' | 'decrease' | 'neutral';
41
+ /**
42
+ * Optional icon component
43
+ */
44
+ icon?: React.ReactNode;
45
+ /**
46
+ * Optional trend data or chart
47
+ */
48
+ trend?: React.ReactNode;
49
+ /**
50
+ * Optional footer content
51
+ */
52
+ footer?: React.ReactNode;
53
+ }
54
+ /**
55
+ * KPI - Key Performance Indicator card for displaying important metrics with context
56
+ *
57
+ * @example
58
+ * ```tsx
59
+ * <KPI title="Total Revenue" value="$54,239" />
60
+ * ```
61
+ *
62
+ * @example
63
+ * ```tsx
64
+ * <KPI
65
+ * title="Active Users"
66
+ * value="1,428"
67
+ * change="+12%"
68
+ * changeType="increase"
69
+ * description="Monthly active users"
70
+ * />
71
+ * ```
72
+ *
73
+ * @example
74
+ * ```tsx
75
+ * <KPI
76
+ * title="Conversion Rate"
77
+ * value="3.24%"
78
+ * subtitle="E-commerce"
79
+ * variant="success"
80
+ * trend={<TrendChart data={data} />}
81
+ * />
82
+ * ```
83
+ */
84
+ export declare const KPI: React.ForwardRefExoticComponent<KPIProps & React.RefAttributes<HTMLDivElement>>;
85
+ export default KPI;
@@ -0,0 +1,3 @@
1
+ export { KPI } from './KPI';
2
+ export type { KPIProps } from './KPI';
3
+ export { default } from './KPI';
@@ -0,0 +1,83 @@
1
+ import { default as React } from 'react';
2
+ import { BaseComponentProps } from '../../../types/component.types';
3
+ /**
4
+ * Props for the Pill component
5
+ */
6
+ export interface PillProps extends BaseComponentProps {
7
+ /**
8
+ * Visual variant of the component
9
+ * @default 'filled'
10
+ */
11
+ variant?: 'filled' | 'outlined' | 'subtle';
12
+ /**
13
+ * Color theme of the component
14
+ * @default 'primary'
15
+ */
16
+ color?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';
17
+ /**
18
+ * Size of the component
19
+ * @default 'md'
20
+ */
21
+ size?: 'sm' | 'md' | 'lg';
22
+ /**
23
+ * Whether the component is disabled
24
+ * @default false
25
+ */
26
+ disabled?: boolean;
27
+ /**
28
+ * Click handler - makes the pill clickable (renders as button)
29
+ */
30
+ onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
31
+ /**
32
+ * Remove handler - adds a remove button
33
+ */
34
+ onRemove?: (event: React.MouseEvent<HTMLButtonElement>) => void;
35
+ /**
36
+ * Icon to display at the start of the pill
37
+ */
38
+ startIcon?: React.ReactNode;
39
+ /**
40
+ * Icon to display at the end of the pill
41
+ */
42
+ endIcon?: React.ReactNode;
43
+ }
44
+ /**
45
+ * Pill - Fully rounded tag-like element for status, categories, or filter pills
46
+ *
47
+ * @example
48
+ * ```tsx
49
+ * <Pill color="primary" variant="filled">
50
+ * Active
51
+ * </Pill>
52
+ * ```
53
+ *
54
+ * @example
55
+ * ```tsx
56
+ * <Pill color="success" variant="outlined" size="sm">
57
+ * Available
58
+ * </Pill>
59
+ * ```
60
+ *
61
+ * @example
62
+ * ```tsx
63
+ * <Pill
64
+ * color="info"
65
+ * onClick={() => console.log('clicked')}
66
+ * startIcon={<Icon name="tag" />}
67
+ * >
68
+ * Clickable
69
+ * </Pill>
70
+ * ```
71
+ *
72
+ * @example
73
+ * ```tsx
74
+ * <Pill
75
+ * color="danger"
76
+ * onRemove={() => console.log('removed')}
77
+ * >
78
+ * Removable
79
+ * </Pill>
80
+ * ```
81
+ */
82
+ export declare const Pill: React.ForwardRefExoticComponent<PillProps & React.RefAttributes<HTMLElement>>;
83
+ export default Pill;
@@ -0,0 +1,2 @@
1
+ export { Pill, default } from './Pill';
2
+ export type { PillProps } from './Pill';
@@ -0,0 +1,70 @@
1
+ import { default as React } from 'react';
2
+ import { BaseComponentProps } from '../../../types/component.types';
3
+ /**
4
+ * Props for the ProgressBar component
5
+ */
6
+ export interface ProgressBarProps extends Omit<BaseComponentProps, 'children'> {
7
+ /**
8
+ * Visual variant of the component
9
+ * @default 'primary'
10
+ */
11
+ variant?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';
12
+ /**
13
+ * Size of the component
14
+ * @default 'md'
15
+ */
16
+ size?: 'sm' | 'md' | 'lg';
17
+ /**
18
+ * Current progress value (0-100)
19
+ * @default 0
20
+ */
21
+ value?: number;
22
+ /**
23
+ * Maximum value
24
+ * @default 100
25
+ */
26
+ max?: number;
27
+ /**
28
+ * Whether to show the value label
29
+ * @default false
30
+ */
31
+ showValue?: boolean;
32
+ /**
33
+ * Custom label to display
34
+ */
35
+ label?: string;
36
+ /**
37
+ * Whether to animate the progress
38
+ * @default true
39
+ */
40
+ animated?: boolean;
41
+ /**
42
+ * Whether to show striped pattern
43
+ * @default false
44
+ */
45
+ striped?: boolean;
46
+ /**
47
+ * Custom format function for the value display
48
+ */
49
+ formatValue?: (value: number, max: number) => string;
50
+ }
51
+ /**
52
+ * ProgressBar - Linear progress indicator for showing task completion or loading states
53
+ *
54
+ * @example
55
+ * ```tsx
56
+ * <ProgressBar variant="primary" value={50} showValue />
57
+ * ```
58
+ *
59
+ * @example
60
+ * ```tsx
61
+ * <ProgressBar variant="success" value={75} label="Uploading..." />
62
+ * ```
63
+ *
64
+ * @example
65
+ * ```tsx
66
+ * <ProgressBar variant="warning" value={30} size="lg" striped animated />
67
+ * ```
68
+ */
69
+ export declare const ProgressBar: React.ForwardRefExoticComponent<ProgressBarProps & React.RefAttributes<HTMLDivElement>>;
70
+ export default ProgressBar;
@@ -0,0 +1,3 @@
1
+ export { ProgressBar } from './ProgressBar';
2
+ export type { ProgressBarProps } from './ProgressBar';
3
+ export { default } from './ProgressBar';
@@ -0,0 +1,51 @@
1
+ import { default as React } from 'react';
2
+ import { BaseComponentProps } from '../../../types/component.types';
3
+ /**
4
+ * Props for the Skeleton component
5
+ */
6
+ export interface SkeletonProps extends Omit<BaseComponentProps, 'children'> {
7
+ /**
8
+ * Visual variant of the component
9
+ * @default 'primary'
10
+ */
11
+ variant?: 'text' | 'circular' | 'rectangular' | 'rounded';
12
+ /**
13
+ * Width of the skeleton
14
+ * @default '100%'
15
+ */
16
+ width?: string | number;
17
+ /**
18
+ * Height of the skeleton
19
+ */
20
+ height?: string | number;
21
+ /**
22
+ * Whether to animate the skeleton
23
+ * @default true
24
+ */
25
+ animated?: boolean;
26
+ /**
27
+ * Number of lines for text variant
28
+ * @default 1
29
+ */
30
+ lines?: number;
31
+ }
32
+ /**
33
+ * Skeleton - Loading placeholder component for content that is loading
34
+ *
35
+ * @example
36
+ * ```tsx
37
+ * <Skeleton variant="text" width="200px" />
38
+ * ```
39
+ *
40
+ * @example
41
+ * ```tsx
42
+ * <Skeleton variant="circular" width={40} height={40} />
43
+ * ```
44
+ *
45
+ * @example
46
+ * ```tsx
47
+ * <Skeleton variant="rectangular" width="100%" height="200px" />
48
+ * ```
49
+ */
50
+ export declare const Skeleton: React.ForwardRefExoticComponent<SkeletonProps & React.RefAttributes<HTMLDivElement>>;
51
+ export default Skeleton;
@@ -0,0 +1,3 @@
1
+ export { Skeleton } from './Skeleton';
2
+ export type { SkeletonProps } from './Skeleton';
3
+ export { default } from './Skeleton';
@@ -0,0 +1,56 @@
1
+ import { default as React } from 'react';
2
+ import { BaseComponentProps } from '../../../types/component.types';
3
+ /**
4
+ * Props for the StatusIndicator component
5
+ */
6
+ export interface StatusIndicatorProps extends BaseComponentProps {
7
+ /**
8
+ * Status variant of the indicator
9
+ * @default 'neutral'
10
+ */
11
+ status?: 'success' | 'warning' | 'error' | 'info' | 'neutral' | 'processing';
12
+ /**
13
+ * Size of the indicator
14
+ * @default 'md'
15
+ */
16
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
17
+ /**
18
+ * Whether to show pulse animation
19
+ * @default false
20
+ */
21
+ pulse?: boolean;
22
+ /**
23
+ * Whether to display text alongside the indicator
24
+ * @default false
25
+ */
26
+ withText?: boolean;
27
+ }
28
+ /**
29
+ * StatusIndicator - Visual colored dot indicator for status with optional text and pulse animation
30
+ *
31
+ * @example
32
+ * ```tsx
33
+ * <StatusIndicator status="success" />
34
+ * ```
35
+ *
36
+ * @example
37
+ * ```tsx
38
+ * <StatusIndicator status="error" pulse size="lg" />
39
+ * ```
40
+ *
41
+ * @example
42
+ * ```tsx
43
+ * <StatusIndicator status="processing" pulse withText>
44
+ * Processing
45
+ * </StatusIndicator>
46
+ * ```
47
+ *
48
+ * @example
49
+ * ```tsx
50
+ * <StatusIndicator status="warning" withText size="sm">
51
+ * Warning
52
+ * </StatusIndicator>
53
+ * ```
54
+ */
55
+ export declare const StatusIndicator: React.ForwardRefExoticComponent<StatusIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
56
+ export default StatusIndicator;
@@ -0,0 +1,2 @@
1
+ export { StatusIndicator } from './StatusIndicator';
2
+ export type { StatusIndicatorProps } from './StatusIndicator';