@vtx-ui/react 0.0.1-beta.3 → 0.0.1-beta.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.
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/types/components/AdminHeader/AdminHeader.d.ts +179 -0
- package/dist/types/components/AdminHeader/AdminHeader.examples.d.ts +44 -0
- package/dist/types/components/AdminHeader/AdminHeader.stories.d.ts +53 -0
- package/dist/types/components/AdminHeader/AdminHeader.widgets.stories.d.ts +86 -0
- package/dist/types/components/AdminHeader/index.d.ts +2 -0
- package/dist/types/components/Alert/Alert.d.ts +7 -54
- package/dist/types/components/Avatar/Avatar.d.ts +5 -2
- package/dist/types/components/Badge/Badge.d.ts +8 -34
- package/dist/types/components/Button/Button.d.ts +7 -43
- package/dist/types/components/Card/Card.d.ts +7 -64
- package/dist/types/components/Checkbox/Checkbox.d.ts +5 -59
- package/dist/types/components/CheckboxGroup/CheckboxGroup.d.ts +5 -53
- package/dist/types/components/Chip/Chip.d.ts +7 -33
- package/dist/types/components/DataGrid/DataGrid.d.ts +97 -0
- package/dist/types/components/DataGrid/index.d.ts +2 -0
- package/dist/types/components/Divider/Divider.d.ts +5 -72
- package/dist/types/components/Flex/Flex.d.ts +5 -26
- package/dist/types/components/Grid/Grid.d.ts +5 -77
- package/dist/types/components/Header/Header.d.ts +5 -33
- package/dist/types/components/Input/Input.d.ts +8 -54
- package/dist/types/components/Menu/Menu.d.ts +5 -32
- package/dist/types/components/Modal/Modal.d.ts +7 -73
- package/dist/types/components/MultiSelect/MultiSelect.d.ts +5 -41
- package/dist/types/components/Radio/Radio.d.ts +8 -57
- package/dist/types/components/RadioGroup/RadioGroup.d.ts +8 -59
- package/dist/types/components/Select/Select.d.ts +8 -60
- package/dist/types/components/SideMenu/SideMenu.d.ts +5 -34
- package/dist/types/components/SideMenu/SideMenu.examples.d.ts +18 -0
- package/dist/types/components/SideMenu/index.d.ts +1 -3
- package/dist/types/components/Table/Table.d.ts +108 -60
- package/dist/types/components/Text/Text.d.ts +4 -1
- package/dist/types/components/Timeline/Timeline.d.ts +34 -0
- package/dist/types/components/Timeline/index.d.ts +2 -0
- package/dist/types/components/Toast/Toast.d.ts +5 -51
- package/dist/types/hoc/withParsedClasses.d.ts +4 -1
- package/dist/types/icons/IconComponents.d.ts +55 -0
- package/dist/types/icons/index.d.ts +1 -0
- package/dist/types/index.d.ts +21 -1
- package/dist/types/stories/components/Accordion.stories.d.ts +11 -0
- package/dist/types/stories/components/Alert.stories.d.ts +9 -0
- package/dist/types/stories/components/Avatar.stories.d.ts +13 -0
- package/dist/types/stories/components/Badge.stories.d.ts +8 -0
- package/dist/types/stories/components/Button.stories.d.ts +9 -0
- package/dist/types/stories/components/Card.stories.d.ts +8 -0
- package/dist/types/stories/components/Checkbox.stories.d.ts +17 -0
- package/dist/types/stories/components/CheckboxGroup.stories.d.ts +13 -0
- package/dist/types/stories/components/Chip.stories.d.ts +22 -0
- package/dist/types/stories/components/DataGrid.stories.d.ts +20 -0
- package/dist/types/stories/components/Divider.stories.d.ts +15 -0
- package/dist/types/stories/components/Flex.stories.d.ts +14 -0
- package/dist/types/stories/components/Grid.stories.d.ts +11 -0
- package/dist/types/stories/components/Header.stories.d.ts +14 -0
- package/dist/types/stories/components/Input.stories.d.ts +9 -0
- package/dist/types/stories/components/Menu.stories.d.ts +13 -0
- package/dist/types/stories/components/Modal.stories.d.ts +12 -0
- package/dist/types/stories/components/MultiSelect.stories.d.ts +19 -0
- package/dist/types/stories/components/Radio.stories.d.ts +16 -0
- package/dist/types/stories/components/RadioGroup.stories.d.ts +15 -0
- package/dist/types/stories/components/Select.stories.d.ts +17 -0
- package/dist/types/stories/components/SideMenu.stories.d.ts +62 -0
- package/dist/types/stories/components/Table.stories.d.ts +25 -0
- package/dist/types/stories/components/Text.stories.d.ts +18 -0
- package/dist/types/stories/components/Timeline.stories.d.ts +20 -0
- package/dist/types/stories/components/Toast.stories.d.ts +17 -0
- package/dist/types/stories/components/Tooltip.stories.d.ts +20 -0
- package/dist/types/stories/widgets/InfoCard.stories.d.ts +12 -0
- package/dist/types/stories/widgets/InfoListCard.stories.d.ts +19 -0
- package/dist/types/stories/widgets/InfoText.stories.d.ts +30 -0
- package/dist/types/stories/widgets/OrderCard.stories.d.ts +13 -0
- package/dist/types/stories/widgets/OrderConfirmation.stories.d.ts +36 -0
- package/dist/types/stories/widgets/OrderDetails.stories.d.ts +11 -0
- package/dist/types/stories/widgets/ProductCard.stories.d.ts +25 -0
- package/dist/types/theme/index.d.ts +1 -1
- package/dist/types/widgets/Header/Header.d.ts +252 -0
- package/dist/types/widgets/Header/Header.examples.d.ts +17 -0
- package/dist/types/widgets/Header/Header.megamenu.examples.d.ts +22 -0
- package/dist/types/widgets/Header/Header.stories.d.ts +30 -0
- package/dist/types/widgets/Header/index.d.ts +2 -0
- package/dist/types/widgets/InfoCard/InfoCard.d.ts +40 -0
- package/dist/types/widgets/InfoCard/index.d.ts +1 -0
- package/dist/types/widgets/InfoListCard/InfoListCard.d.ts +43 -0
- package/dist/types/widgets/InfoListCard/index.d.ts +2 -0
- package/dist/types/widgets/InfoText/InfoText.d.ts +144 -0
- package/dist/types/widgets/InfoText/InfoText.examples.d.ts +33 -0
- package/dist/types/widgets/InfoText/index.d.ts +1 -0
- package/dist/types/widgets/OrderCard/OrderCard.d.ts +71 -0
- package/dist/types/widgets/OrderCard/index.d.ts +2 -0
- package/dist/types/widgets/OrderConfirmation/OrderConfirmation.d.ts +85 -0
- package/dist/types/widgets/OrderConfirmation/index.d.ts +3 -0
- package/dist/types/widgets/OrderDetails/OrderDetails.d.ts +91 -0
- package/dist/types/widgets/OrderDetails/index.d.ts +3 -0
- package/dist/types/widgets/ProductCard/ProductCard.d.ts +42 -0
- package/dist/types/widgets/ProductCard/index.d.ts +1 -0
- package/dist/types/widgets/product-card-old/ProductCard.d.ts +12 -0
- package/package.json +73 -59
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './InfoText.css';
|
|
3
|
+
export interface InfoTextBaseProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Icon element to display
|
|
6
|
+
*/
|
|
7
|
+
icon: React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Visual variant for icon styling
|
|
10
|
+
* @default 'primary'
|
|
11
|
+
*/
|
|
12
|
+
iconVariant?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info';
|
|
13
|
+
/**
|
|
14
|
+
* Display icon in a circle
|
|
15
|
+
* @default true
|
|
16
|
+
*/
|
|
17
|
+
iconCircle?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Main heading text
|
|
20
|
+
*/
|
|
21
|
+
heading: React.ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* Optional secondary text
|
|
24
|
+
*/
|
|
25
|
+
subText?: React.ReactNode;
|
|
26
|
+
className?: string;
|
|
27
|
+
style?: React.CSSProperties;
|
|
28
|
+
}
|
|
29
|
+
export interface InfoTextStatProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
30
|
+
/**
|
|
31
|
+
* Optional icon element
|
|
32
|
+
*/
|
|
33
|
+
icon?: React.ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* Visual variant for icon styling
|
|
36
|
+
* @default 'primary'
|
|
37
|
+
*/
|
|
38
|
+
iconVariant?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info';
|
|
39
|
+
/**
|
|
40
|
+
* Display icon in a circle
|
|
41
|
+
* @default true
|
|
42
|
+
*/
|
|
43
|
+
iconCircle?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Metric/stat value
|
|
46
|
+
*/
|
|
47
|
+
value: React.ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* Label for the stat
|
|
50
|
+
*/
|
|
51
|
+
label: React.ReactNode;
|
|
52
|
+
/**
|
|
53
|
+
* Optional additional text
|
|
54
|
+
*/
|
|
55
|
+
subText?: React.ReactNode;
|
|
56
|
+
className?: string;
|
|
57
|
+
style?: React.CSSProperties;
|
|
58
|
+
}
|
|
59
|
+
export interface InfoTextFeatureProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
60
|
+
/**
|
|
61
|
+
* Icon element to display
|
|
62
|
+
*/
|
|
63
|
+
icon: React.ReactNode;
|
|
64
|
+
/**
|
|
65
|
+
* Visual variant for icon styling
|
|
66
|
+
* @default 'primary'
|
|
67
|
+
*/
|
|
68
|
+
iconVariant?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info';
|
|
69
|
+
/**
|
|
70
|
+
* Display icon in a circle
|
|
71
|
+
* @default true
|
|
72
|
+
*/
|
|
73
|
+
iconCircle?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Feature title
|
|
76
|
+
*/
|
|
77
|
+
title: React.ReactNode;
|
|
78
|
+
/**
|
|
79
|
+
* Feature description
|
|
80
|
+
*/
|
|
81
|
+
description: React.ReactNode;
|
|
82
|
+
/**
|
|
83
|
+
* Optional badge element
|
|
84
|
+
*/
|
|
85
|
+
badge?: React.ReactNode;
|
|
86
|
+
className?: string;
|
|
87
|
+
style?: React.CSSProperties;
|
|
88
|
+
}
|
|
89
|
+
export interface InfoTextCompactProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
90
|
+
/**
|
|
91
|
+
* Icon element to display
|
|
92
|
+
*/
|
|
93
|
+
icon: React.ReactNode;
|
|
94
|
+
/**
|
|
95
|
+
* Visual variant for icon styling
|
|
96
|
+
* @default 'primary'
|
|
97
|
+
*/
|
|
98
|
+
iconVariant?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info';
|
|
99
|
+
/**
|
|
100
|
+
* Display icon in a circle
|
|
101
|
+
* @default true
|
|
102
|
+
*/
|
|
103
|
+
iconCircle?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Text content
|
|
106
|
+
*/
|
|
107
|
+
text: React.ReactNode;
|
|
108
|
+
className?: string;
|
|
109
|
+
style?: React.CSSProperties;
|
|
110
|
+
}
|
|
111
|
+
export interface InfoTextVerticalProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
112
|
+
/**
|
|
113
|
+
* Icon element to display
|
|
114
|
+
*/
|
|
115
|
+
icon: React.ReactNode;
|
|
116
|
+
/**
|
|
117
|
+
* Visual variant for icon styling
|
|
118
|
+
* @default 'primary'
|
|
119
|
+
*/
|
|
120
|
+
iconVariant?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info';
|
|
121
|
+
/**
|
|
122
|
+
* Display icon in a circle
|
|
123
|
+
* @default true
|
|
124
|
+
*/
|
|
125
|
+
iconCircle?: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Main heading text
|
|
128
|
+
*/
|
|
129
|
+
heading: React.ReactNode;
|
|
130
|
+
/**
|
|
131
|
+
* Optional secondary text
|
|
132
|
+
*/
|
|
133
|
+
subText?: React.ReactNode;
|
|
134
|
+
className?: string;
|
|
135
|
+
style?: React.CSSProperties;
|
|
136
|
+
}
|
|
137
|
+
export declare const InfoText: {
|
|
138
|
+
Base: React.FC<InfoTextBaseProps & React.RefAttributes<HTMLDivElement>>;
|
|
139
|
+
Stat: React.FC<InfoTextStatProps & React.RefAttributes<HTMLDivElement>>;
|
|
140
|
+
Feature: React.FC<InfoTextFeatureProps & React.RefAttributes<HTMLDivElement>>;
|
|
141
|
+
Compact: React.FC<InfoTextCompactProps & React.RefAttributes<HTMLDivElement>>;
|
|
142
|
+
Vertical: React.FC<InfoTextVerticalProps & React.RefAttributes<HTMLDivElement>>;
|
|
143
|
+
};
|
|
144
|
+
export default InfoText;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* InfoText.Base - Basic info text with icon, heading, and optional subtext
|
|
3
|
+
*/
|
|
4
|
+
export declare const InfoTextBaseExample: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
/**
|
|
6
|
+
* InfoText.Stat - Statistics display with icon, large value, and label
|
|
7
|
+
*/
|
|
8
|
+
export declare const InfoTextStatExample: () => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
/**
|
|
10
|
+
* InfoText.Feature - Feature highlights with icon, title, description, and optional badge
|
|
11
|
+
*/
|
|
12
|
+
export declare const InfoTextFeatureExample: () => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
/**
|
|
14
|
+
* InfoText.Compact - Compact info display for inline use
|
|
15
|
+
*/
|
|
16
|
+
export declare const InfoTextCompactExample: () => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
/**
|
|
18
|
+
* InfoText.Vertical - Vertical layout with centered icon and text
|
|
19
|
+
*/
|
|
20
|
+
export declare const InfoTextVerticalExample: () => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
/**
|
|
22
|
+
* Mixed Usage Example - Combining different variants
|
|
23
|
+
*/
|
|
24
|
+
export declare const InfoTextMixedExample: () => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
declare const _default: {
|
|
26
|
+
Base: () => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
Stat: () => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
Feature: () => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
Compact: () => import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
Vertical: () => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
Mixed: () => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
};
|
|
33
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './InfoText';
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './OrderCard.css';
|
|
3
|
+
export interface OrderItem {
|
|
4
|
+
id?: string;
|
|
5
|
+
name: string;
|
|
6
|
+
image?: string;
|
|
7
|
+
quantity?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface OrderCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
10
|
+
/**
|
|
11
|
+
* Unique order identifier
|
|
12
|
+
*/
|
|
13
|
+
orderId: string;
|
|
14
|
+
/**
|
|
15
|
+
* Display order number (defaults to orderId)
|
|
16
|
+
*/
|
|
17
|
+
orderNumber?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Order status
|
|
20
|
+
* @default 'pending'
|
|
21
|
+
*/
|
|
22
|
+
status?: 'pending' | 'processing' | 'delivered' | 'cancelled' | 'shipped';
|
|
23
|
+
/**
|
|
24
|
+
* Custom status text (overrides default)
|
|
25
|
+
*/
|
|
26
|
+
statusText?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Array of order items
|
|
29
|
+
*/
|
|
30
|
+
items: OrderItem[];
|
|
31
|
+
/**
|
|
32
|
+
* Delivery date string
|
|
33
|
+
*/
|
|
34
|
+
deliveryDate?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Delivery label text
|
|
37
|
+
* @default 'Delivered on'
|
|
38
|
+
*/
|
|
39
|
+
deliveryLabel?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Total order amount
|
|
42
|
+
*/
|
|
43
|
+
totalAmount: number;
|
|
44
|
+
/**
|
|
45
|
+
* Currency symbol
|
|
46
|
+
* @default '₹'
|
|
47
|
+
*/
|
|
48
|
+
currency?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Track order button handler
|
|
51
|
+
*/
|
|
52
|
+
onTrackOrder?: (orderId: string) => void;
|
|
53
|
+
/**
|
|
54
|
+
* View details handler
|
|
55
|
+
*/
|
|
56
|
+
onViewDetails?: (orderId: string) => void;
|
|
57
|
+
/**
|
|
58
|
+
* Track button text
|
|
59
|
+
* @default 'Track Order'
|
|
60
|
+
*/
|
|
61
|
+
trackButtonText?: string;
|
|
62
|
+
className?: string;
|
|
63
|
+
style?: React.CSSProperties;
|
|
64
|
+
}
|
|
65
|
+
declare const OrderCardWithParsedClasses: {
|
|
66
|
+
(props: OrderCardProps & React.RefAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
67
|
+
displayName: string;
|
|
68
|
+
};
|
|
69
|
+
declare const _default: React.FC<OrderCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
70
|
+
export default _default;
|
|
71
|
+
export { OrderCardWithParsedClasses as OrderCard };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './OrderConfirmation.css';
|
|
3
|
+
export interface OrderConfirmationItem {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
image?: string;
|
|
7
|
+
quantity: number;
|
|
8
|
+
price: number;
|
|
9
|
+
variant?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface OrderConfirmationAddress {
|
|
12
|
+
name: string;
|
|
13
|
+
addressLine1: string;
|
|
14
|
+
addressLine2?: string;
|
|
15
|
+
city: string;
|
|
16
|
+
state: string;
|
|
17
|
+
zipCode: string;
|
|
18
|
+
phone?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* OrderConfirmation - Complete order confirmation view
|
|
22
|
+
*
|
|
23
|
+
* Displays comprehensive order confirmation with items, pricing, addresses, and action buttons
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* <OrderConfirmation
|
|
28
|
+
* orderId="12345"
|
|
29
|
+
* status="confirmed"
|
|
30
|
+
* items={orderItems}
|
|
31
|
+
* shippingAddress={address}
|
|
32
|
+
* total={199.99}
|
|
33
|
+
* />
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export interface OrderConfirmationProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
37
|
+
orderId: string;
|
|
38
|
+
orderNumber?: string;
|
|
39
|
+
orderDate?: string;
|
|
40
|
+
status?: 'pending' | 'processing' | 'confirmed' | 'delivered' | 'cancelled';
|
|
41
|
+
statusText?: string;
|
|
42
|
+
headerText?: string;
|
|
43
|
+
headerSubtitle?: string;
|
|
44
|
+
customerEmail?: string;
|
|
45
|
+
customerPhone?: string;
|
|
46
|
+
shippingAddress: OrderConfirmationAddress;
|
|
47
|
+
billingAddress?: OrderConfirmationAddress;
|
|
48
|
+
items: OrderConfirmationItem[];
|
|
49
|
+
subtotal: number;
|
|
50
|
+
shippingCost?: number;
|
|
51
|
+
tax?: number;
|
|
52
|
+
discount?: number;
|
|
53
|
+
total: number;
|
|
54
|
+
currency?: string;
|
|
55
|
+
paymentMethod?: string;
|
|
56
|
+
transactionId?: string;
|
|
57
|
+
estimatedDelivery?: string;
|
|
58
|
+
trackingNumber?: string;
|
|
59
|
+
onDownloadInvoice?: (orderId: string) => void;
|
|
60
|
+
onContinueShopping?: () => void;
|
|
61
|
+
onTrackOrder?: (orderId: string) => void;
|
|
62
|
+
onViewDetails?: (orderId: string) => void;
|
|
63
|
+
onContactSupport?: (orderId: string) => void;
|
|
64
|
+
onShareOrder?: (orderId: string) => void;
|
|
65
|
+
downloadInvoiceText?: string;
|
|
66
|
+
continueShoppingText?: string;
|
|
67
|
+
trackOrderText?: string;
|
|
68
|
+
viewDetailsText?: string;
|
|
69
|
+
contactSupportText?: string;
|
|
70
|
+
shareOrderText?: string;
|
|
71
|
+
showActions?: boolean;
|
|
72
|
+
hideDownloadInvoice?: boolean;
|
|
73
|
+
hideContinueShopping?: boolean;
|
|
74
|
+
hideTrackOrder?: boolean;
|
|
75
|
+
hideContactSupport?: boolean;
|
|
76
|
+
className?: string;
|
|
77
|
+
style?: React.CSSProperties;
|
|
78
|
+
}
|
|
79
|
+
declare const OrderConfirmationWithParsedClasses: {
|
|
80
|
+
(props: OrderConfirmationProps & React.RefAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
81
|
+
displayName: string;
|
|
82
|
+
};
|
|
83
|
+
declare const _default: React.FC<OrderConfirmationProps & React.RefAttributes<HTMLDivElement>>;
|
|
84
|
+
export default _default;
|
|
85
|
+
export { OrderConfirmationWithParsedClasses as OrderConfirmation };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './OrderDetails.css';
|
|
3
|
+
export interface OrderDetailsItem {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
image?: string;
|
|
7
|
+
quantity: number;
|
|
8
|
+
price: number;
|
|
9
|
+
variant?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface OrderDetailsAddress {
|
|
12
|
+
name: string;
|
|
13
|
+
addressLine1: string;
|
|
14
|
+
addressLine2?: string;
|
|
15
|
+
city: string;
|
|
16
|
+
state: string;
|
|
17
|
+
zipCode: string;
|
|
18
|
+
phone?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* OrderDetails - Comprehensive order details view
|
|
22
|
+
*
|
|
23
|
+
* Displays complete order information with items, pricing, tracking, and management actions
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* <OrderDetails
|
|
28
|
+
* orderId="12345"
|
|
29
|
+
* orderDate="Dec 19, 2023"
|
|
30
|
+
* status="delivered"
|
|
31
|
+
* items={orderItems}
|
|
32
|
+
* shippingAddress={address}
|
|
33
|
+
* total={199.99}
|
|
34
|
+
* />
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export interface OrderDetailsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
38
|
+
orderId: string;
|
|
39
|
+
orderNumber?: string;
|
|
40
|
+
orderDate: string;
|
|
41
|
+
status: 'pending' | 'processing' | 'confirmed' | 'shipped' | 'delivered' | 'cancelled' | 'returned';
|
|
42
|
+
statusText?: string;
|
|
43
|
+
customerName?: string;
|
|
44
|
+
customerEmail?: string;
|
|
45
|
+
customerPhone?: string;
|
|
46
|
+
shippingAddress: OrderDetailsAddress;
|
|
47
|
+
billingAddress?: OrderDetailsAddress;
|
|
48
|
+
items: OrderDetailsItem[];
|
|
49
|
+
subtotal: number;
|
|
50
|
+
shippingCost?: number;
|
|
51
|
+
tax?: number;
|
|
52
|
+
discount?: number;
|
|
53
|
+
total: number;
|
|
54
|
+
currency?: string;
|
|
55
|
+
couponCode?: string;
|
|
56
|
+
paymentMethod?: string;
|
|
57
|
+
paymentStatus?: 'pending' | 'paid' | 'failed' | 'refunded';
|
|
58
|
+
transactionId?: string;
|
|
59
|
+
estimatedDelivery?: string;
|
|
60
|
+
deliveredDate?: string;
|
|
61
|
+
trackingNumber?: string;
|
|
62
|
+
trackingUrl?: string;
|
|
63
|
+
carrier?: string;
|
|
64
|
+
onDownloadInvoice?: (orderId: string) => void;
|
|
65
|
+
onTrackOrder?: (orderId: string) => void;
|
|
66
|
+
onCancelOrder?: (orderId: string) => void;
|
|
67
|
+
onReturnOrder?: (orderId: string) => void;
|
|
68
|
+
onReorder?: (orderId: string) => void;
|
|
69
|
+
onContactSupport?: (orderId: string) => void;
|
|
70
|
+
onWriteReview?: (orderId: string) => void;
|
|
71
|
+
downloadInvoiceText?: string;
|
|
72
|
+
trackOrderText?: string;
|
|
73
|
+
cancelOrderText?: string;
|
|
74
|
+
returnOrderText?: string;
|
|
75
|
+
reorderText?: string;
|
|
76
|
+
contactSupportText?: string;
|
|
77
|
+
writeReviewText?: string;
|
|
78
|
+
showActions?: boolean;
|
|
79
|
+
allowCancel?: boolean;
|
|
80
|
+
allowReturn?: boolean;
|
|
81
|
+
allowReorder?: boolean;
|
|
82
|
+
className?: string;
|
|
83
|
+
style?: React.CSSProperties;
|
|
84
|
+
}
|
|
85
|
+
declare const OrderDetailsWithParsedClasses: {
|
|
86
|
+
(props: OrderDetailsProps & React.RefAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
87
|
+
displayName: string;
|
|
88
|
+
};
|
|
89
|
+
declare const _default: React.FC<OrderDetailsProps & React.RefAttributes<HTMLDivElement>>;
|
|
90
|
+
export default _default;
|
|
91
|
+
export { OrderDetailsWithParsedClasses as OrderDetails };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './ProductCard.css';
|
|
3
|
+
export interface ProductCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
id?: string;
|
|
5
|
+
image: string;
|
|
6
|
+
imageAlt?: string;
|
|
7
|
+
category?: string;
|
|
8
|
+
name: React.ReactNode;
|
|
9
|
+
weight?: number;
|
|
10
|
+
units?: string;
|
|
11
|
+
price: number;
|
|
12
|
+
originalPrice?: number;
|
|
13
|
+
discount?: string;
|
|
14
|
+
rating?: number;
|
|
15
|
+
initialQuantity?: number;
|
|
16
|
+
featured?: boolean;
|
|
17
|
+
featuredText?: string;
|
|
18
|
+
showWishlist?: boolean;
|
|
19
|
+
isWishlisted?: boolean;
|
|
20
|
+
cartIcon?: React.ReactNode;
|
|
21
|
+
wishlistIcon?: React.ReactNode;
|
|
22
|
+
wishlistFilledIcon?: React.ReactNode;
|
|
23
|
+
quickViewIcon?: React.ReactNode;
|
|
24
|
+
onAddToCart?: (id?: string, quantity?: number) => void | Promise<void>;
|
|
25
|
+
onIncrementCart?: (id?: string, quantity?: number) => void | Promise<void>;
|
|
26
|
+
onDecrementCart?: (id?: string, quantity?: number) => void | Promise<void>;
|
|
27
|
+
onWishlist?: () => void;
|
|
28
|
+
onQuickView?: () => void;
|
|
29
|
+
onClick?: () => void;
|
|
30
|
+
loading?: boolean;
|
|
31
|
+
className?: string;
|
|
32
|
+
style?: React.CSSProperties;
|
|
33
|
+
}
|
|
34
|
+
export interface ProductCardWideProps extends ProductCardProps {
|
|
35
|
+
imagePosition?: 'left' | 'right';
|
|
36
|
+
}
|
|
37
|
+
export declare const ProductCard: {
|
|
38
|
+
Base: React.FC<ProductCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
39
|
+
Wide: React.FC<ProductCardWideProps & React.RefAttributes<HTMLDivElement>>;
|
|
40
|
+
Minimal: React.FC<ProductCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
41
|
+
};
|
|
42
|
+
export default ProductCard;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ProductCard';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface ProductCardProps {
|
|
2
|
+
id: string;
|
|
3
|
+
category: string;
|
|
4
|
+
name: string;
|
|
5
|
+
weight?: number;
|
|
6
|
+
units?: string;
|
|
7
|
+
price: number;
|
|
8
|
+
ratings: number;
|
|
9
|
+
imageUrl?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const ProductCard: (props: ProductCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default ProductCard;
|
package/package.json
CHANGED
|
@@ -1,59 +1,73 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@vtx-ui/react",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
4
|
-
"description": "A production-ready React + TypeScript UI library with enterprise-grade components",
|
|
5
|
-
"main": "dist/index.cjs.js",
|
|
6
|
-
"module": "dist/index.esm.js",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"publishConfig": {
|
|
9
|
-
"access": "public"
|
|
10
|
-
},
|
|
11
|
-
"files": [
|
|
12
|
-
"dist"
|
|
13
|
-
],
|
|
14
|
-
"sideEffects": [
|
|
15
|
-
"*.css"
|
|
16
|
-
],
|
|
17
|
-
"author": "Innostes Solutions Pvt Ltd <contact@innostes.com>",
|
|
18
|
-
"license": "MIT",
|
|
19
|
-
"repository": {
|
|
20
|
-
"type": "git",
|
|
21
|
-
"url": "https://github.com/vertex-ui/react"
|
|
22
|
-
},
|
|
23
|
-
"homepage": "https://innostes.com/",
|
|
24
|
-
"bugs": {
|
|
25
|
-
"url": "https://github.com/vertex-ui/react/issues"
|
|
26
|
-
},
|
|
27
|
-
"scripts": {
|
|
28
|
-
"build": "rollup -c",
|
|
29
|
-
"test": "jest",
|
|
30
|
-
"test:watch": "jest --watch",
|
|
31
|
-
"test:coverage": "jest --coverage"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
42
|
-
"@
|
|
43
|
-
"@
|
|
44
|
-
"@
|
|
45
|
-
"@
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"jest
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@vtx-ui/react",
|
|
3
|
+
"version": "0.0.1-beta.5",
|
|
4
|
+
"description": "A production-ready React + TypeScript UI library with enterprise-grade components",
|
|
5
|
+
"main": "dist/index.cjs.js",
|
|
6
|
+
"module": "dist/index.esm.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"sideEffects": [
|
|
15
|
+
"*.css"
|
|
16
|
+
],
|
|
17
|
+
"author": "Innostes Solutions Pvt Ltd <contact@innostes.com>",
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "https://github.com/vertex-ui/react"
|
|
22
|
+
},
|
|
23
|
+
"homepage": "https://innostes.com/",
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://github.com/vertex-ui/react/issues"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "rollup -c",
|
|
29
|
+
"test": "jest",
|
|
30
|
+
"test:watch": "jest --watch",
|
|
31
|
+
"test:coverage": "jest --coverage",
|
|
32
|
+
"storybook": "storybook dev -p 6006",
|
|
33
|
+
"build-storybook": "storybook build"
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"react": ">=17",
|
|
37
|
+
"react-dom": ">=17"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@chromatic-com/storybook": "^4.1.3",
|
|
41
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
42
|
+
"@storybook/addon-a11y": "^10.1.10",
|
|
43
|
+
"@storybook/addon-docs": "^10.1.10",
|
|
44
|
+
"@storybook/addon-vitest": "^10.1.10",
|
|
45
|
+
"@storybook/react-vite": "^10.1.10",
|
|
46
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
47
|
+
"@testing-library/react": "^16.3.0",
|
|
48
|
+
"@testing-library/user-event": "^14.6.1",
|
|
49
|
+
"@types/jest": "^30.0.0",
|
|
50
|
+
"@types/react": "^19.2.7",
|
|
51
|
+
"@types/react-dom": "^19.2.3",
|
|
52
|
+
"@vitejs/plugin-react": "^5.1.2",
|
|
53
|
+
"@vitest/browser-playwright": "^4.0.16",
|
|
54
|
+
"@vitest/coverage-v8": "^4.0.16",
|
|
55
|
+
"eslint-plugin-storybook": "^10.1.10",
|
|
56
|
+
"identity-obj-proxy": "^3.0.0",
|
|
57
|
+
"jest": "^30.2.0",
|
|
58
|
+
"jest-axe": "^7.0.0",
|
|
59
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
60
|
+
"playwright": "^1.57.0",
|
|
61
|
+
"rollup": "^2.79.2",
|
|
62
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
63
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
64
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
65
|
+
"storybook": "^10.1.10",
|
|
66
|
+
"ts-jest": "^29.4.6",
|
|
67
|
+
"vitest": "^4.0.16"
|
|
68
|
+
},
|
|
69
|
+
"dependencies": {
|
|
70
|
+
"react-icons": "^5.5.0",
|
|
71
|
+
"tslib": "^2.8.1"
|
|
72
|
+
}
|
|
73
|
+
}
|