@vtx-ui/react 0.0.1-beta.1 → 0.0.1-beta.10
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 +15 -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 +5 -51
- 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 +7 -0
- package/dist/types/hooks/useTheme.d.ts +1 -244
- package/dist/types/icons/IconComponents.d.ts +55 -0
- package/dist/types/icons/index.d.ts +1 -0
- package/dist/types/index.d.ts +28 -5
- 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/ThemeProvider.d.ts +2 -2
- package/dist/types/theme/cssVariables.d.ts +5 -2
- package/dist/types/theme/index.d.ts +3 -3
- package/dist/types/theme/tokens.d.ts +271 -216
- package/dist/types/utils/parseClass.d.ts +1 -0
- package/dist/types/widgets/Header/Header.d.ts +252 -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/package.json +113 -59
- package/dist/components/Accordion/Accordion.d.ts +0 -31
- package/dist/components/Accordion/Accordion.examples.d.ts +0 -3
- package/dist/components/Accordion/AccordionItem.d.ts +0 -5
- package/dist/components/Accordion/index.d.ts +0 -4
- package/dist/components/Accordion/types.d.ts +0 -98
- package/dist/components/Alert/Alert.d.ts +0 -119
- package/dist/components/Alert/index.d.ts +0 -3
- package/dist/components/Avatar/Avatar.d.ts +0 -63
- package/dist/components/Avatar/index.d.ts +0 -3
- package/dist/components/Badge/Badge.d.ts +0 -81
- package/dist/components/Badge/index.d.ts +0 -3
- package/dist/components/Button/Button.d.ts +0 -117
- package/dist/components/Button/index.d.ts +0 -3
- package/dist/components/Card/Card.d.ts +0 -120
- package/dist/components/Card/index.d.ts +0 -3
- package/dist/components/Checkbox/Checkbox.d.ts +0 -114
- package/dist/components/Checkbox/index.d.ts +0 -3
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +0 -121
- package/dist/components/CheckboxGroup/index.d.ts +0 -3
- package/dist/components/Chip/Chip.d.ts +0 -91
- package/dist/components/Chip/index.d.ts +0 -3
- package/dist/components/Divider/Divider.d.ts +0 -118
- package/dist/components/Divider/index.d.ts +0 -3
- package/dist/components/Flex/Flex.d.ts +0 -66
- package/dist/components/Flex/index.d.ts +0 -3
- package/dist/components/Grid/Grid.d.ts +0 -156
- package/dist/components/Grid/index.d.ts +0 -3
- package/dist/components/Header/Header.d.ts +0 -138
- package/dist/components/Header/index.d.ts +0 -3
- package/dist/components/Input/Input.d.ts +0 -129
- package/dist/components/Input/index.d.ts +0 -3
- package/dist/components/Menu/Menu.d.ts +0 -114
- package/dist/components/Menu/index.d.ts +0 -4
- package/dist/components/Modal/Modal.d.ts +0 -201
- package/dist/components/Modal/index.d.ts +0 -3
- package/dist/components/MultiSelect/MultiSelect.d.ts +0 -190
- package/dist/components/MultiSelect/index.d.ts +0 -3
- package/dist/components/Radio/Radio.d.ts +0 -105
- package/dist/components/Radio/index.d.ts +0 -3
- package/dist/components/RadioGroup/RadioGroup.d.ts +0 -134
- package/dist/components/RadioGroup/index.d.ts +0 -3
- package/dist/components/Select/Select.d.ts +0 -169
- package/dist/components/Select/index.d.ts +0 -3
- package/dist/components/SideMenu/SideMenu.d.ts +0 -118
- package/dist/components/SideMenu/index.d.ts +0 -4
- package/dist/components/Table/Table.d.ts +0 -211
- package/dist/components/Table/index.d.ts +0 -3
- package/dist/components/Text/Text.d.ts +0 -160
- package/dist/components/Text/index.d.ts +0 -3
- package/dist/components/Toast/Toast.d.ts +0 -56
- package/dist/components/Toast/ToastContainer.d.ts +0 -6
- package/dist/components/Toast/index.d.ts +0 -5
- package/dist/components/Toast/types.d.ts +0 -148
- package/dist/components/Toast/useToast.d.ts +0 -34
- package/dist/components/Tooltip/Tooltip.d.ts +0 -108
- package/dist/components/Tooltip/index.d.ts +0 -3
- package/dist/hooks/index.d.ts +0 -85
- package/dist/hooks/useTheme.d.ts +0 -268
- package/dist/index.d.ts +0 -55
- package/dist/theme/ThemeProvider.d.ts +0 -39
- package/dist/theme/cssVariables.d.ts +0 -9
- package/dist/theme/index.d.ts +0 -6
- package/dist/theme/tokens.d.ts +0 -258
|
@@ -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';
|
package/package.json
CHANGED
|
@@ -1,59 +1,113 @@
|
|
|
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
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@vtx-ui/react",
|
|
3
|
+
"version": "0.0.1-beta.10",
|
|
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/types/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/types/index.d.ts",
|
|
11
|
+
"import": "./dist/index.esm.js",
|
|
12
|
+
"require": "./dist/index.cjs.js"
|
|
13
|
+
},
|
|
14
|
+
"./theme": {
|
|
15
|
+
"types": "./dist/types/theme/index.d.ts",
|
|
16
|
+
"import": "./dist/index.esm.js",
|
|
17
|
+
"require": "./dist/index.cjs.js"
|
|
18
|
+
},
|
|
19
|
+
"./package.json": "./package.json"
|
|
20
|
+
},
|
|
21
|
+
"typesVersions": {
|
|
22
|
+
"*": {
|
|
23
|
+
"*": [
|
|
24
|
+
"dist/types/index.d.ts"
|
|
25
|
+
],
|
|
26
|
+
"theme": [
|
|
27
|
+
"dist/types/theme/index.d.ts"
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"dist"
|
|
36
|
+
],
|
|
37
|
+
"sideEffects": [
|
|
38
|
+
"*.css"
|
|
39
|
+
],
|
|
40
|
+
"author": "Innostes Solutions Pvt Ltd <contact@innostes.com>",
|
|
41
|
+
"license": "MIT",
|
|
42
|
+
"repository": {
|
|
43
|
+
"type": "git",
|
|
44
|
+
"url": "https://github.com/vertex-ui/react"
|
|
45
|
+
},
|
|
46
|
+
"homepage": "https://innostes.com/",
|
|
47
|
+
"bugs": {
|
|
48
|
+
"url": "https://github.com/vertex-ui/react/issues"
|
|
49
|
+
},
|
|
50
|
+
"keywords": [
|
|
51
|
+
"react",
|
|
52
|
+
"react-component",
|
|
53
|
+
"react-components",
|
|
54
|
+
"ui",
|
|
55
|
+
"ui-library",
|
|
56
|
+
"component-library",
|
|
57
|
+
"design-system",
|
|
58
|
+
"typescript",
|
|
59
|
+
"vtx-ui",
|
|
60
|
+
"vertex-ui",
|
|
61
|
+
"accessibility",
|
|
62
|
+
"a11y",
|
|
63
|
+
"themeable",
|
|
64
|
+
"dark-mode",
|
|
65
|
+
"enterprise"
|
|
66
|
+
],
|
|
67
|
+
"scripts": {
|
|
68
|
+
"build": "rollup -c",
|
|
69
|
+
"test": "jest",
|
|
70
|
+
"test:watch": "jest --watch",
|
|
71
|
+
"test:coverage": "jest --coverage",
|
|
72
|
+
"storybook": "storybook dev -p 6006",
|
|
73
|
+
"build-storybook": "storybook build"
|
|
74
|
+
},
|
|
75
|
+
"peerDependencies": {
|
|
76
|
+
"react": ">=17",
|
|
77
|
+
"react-dom": ">=17"
|
|
78
|
+
},
|
|
79
|
+
"devDependencies": {
|
|
80
|
+
"@chromatic-com/storybook": "^4.1.3",
|
|
81
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
82
|
+
"@storybook/addon-a11y": "^10.1.10",
|
|
83
|
+
"@storybook/addon-docs": "^10.1.10",
|
|
84
|
+
"@storybook/addon-vitest": "^10.1.10",
|
|
85
|
+
"@storybook/react-vite": "^10.1.10",
|
|
86
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
87
|
+
"@testing-library/react": "^16.3.0",
|
|
88
|
+
"@testing-library/user-event": "^14.6.1",
|
|
89
|
+
"@types/jest": "^30.0.0",
|
|
90
|
+
"@types/react": "^19.2.7",
|
|
91
|
+
"@types/react-dom": "^19.2.3",
|
|
92
|
+
"@vitejs/plugin-react": "^5.1.2",
|
|
93
|
+
"@vitest/browser-playwright": "^4.0.16",
|
|
94
|
+
"@vitest/coverage-v8": "^4.0.16",
|
|
95
|
+
"eslint-plugin-storybook": "^10.1.10",
|
|
96
|
+
"identity-obj-proxy": "^3.0.0",
|
|
97
|
+
"jest": "^30.2.0",
|
|
98
|
+
"jest-axe": "^7.0.0",
|
|
99
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
100
|
+
"playwright": "^1.57.0",
|
|
101
|
+
"rollup": "^2.79.2",
|
|
102
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
103
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
104
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
105
|
+
"storybook": "^10.1.10",
|
|
106
|
+
"ts-jest": "^29.4.6",
|
|
107
|
+
"vitest": "^4.0.16"
|
|
108
|
+
},
|
|
109
|
+
"dependencies": {
|
|
110
|
+
"react-icons": "^5.5.0",
|
|
111
|
+
"tslib": "^2.8.1"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { AccordionProps } from "./types";
|
|
3
|
-
import './Accordion.css';
|
|
4
|
-
/**
|
|
5
|
-
* Accordion component - Collapsible content panels for presenting information in a limited space.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* Basic usage with items prop:
|
|
9
|
-
* ```tsx
|
|
10
|
-
* <Accordion
|
|
11
|
-
* items={[
|
|
12
|
-
* { id: 'item1', header: 'Section 1', children: <div>Content 1</div> },
|
|
13
|
-
* { id: 'item2', header: 'Section 2', children: <div>Content 2</div> },
|
|
14
|
-
* ]}
|
|
15
|
-
* />
|
|
16
|
-
* ```
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* Usage with AccordionItem children:
|
|
20
|
-
* ```tsx
|
|
21
|
-
* <Accordion>
|
|
22
|
-
* <AccordionItem id="item1" header="Section 1">Content 1</AccordionItem>
|
|
23
|
-
* <AccordionItem id="item2" header="Section 2">Content 2</AccordionItem>
|
|
24
|
-
* </Accordion>
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
declare const Accordion: React.ForwardRefExoticComponent<AccordionProps & React.RefAttributes<HTMLDivElement>>;
|
|
28
|
-
declare const _default: React.FC<AccordionProps & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
-
export default _default;
|
|
30
|
-
export { Accordion };
|
|
31
|
-
export type { AccordionProps };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AccordionItemComponentProps, AccordionItemProps } from './types';
|
|
3
|
-
declare const _default: React.FC<AccordionItemComponentProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
-
export default _default;
|
|
5
|
-
export declare const AccordionItemWrapper: React.FC<AccordionItemProps>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { default as Accordion } from './Accordion';
|
|
2
|
-
export type { AccordionProps, AccordionItemProps, AccordionItemComponentProps } from './types';
|
|
3
|
-
export { Accordion as AccordionComponent } from './Accordion';
|
|
4
|
-
export { default as AccordionItem, AccordionItemWrapper } from './AccordionItem';
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
export interface AccordionItemProps {
|
|
3
|
-
/** Unique identifier for the accordion item */
|
|
4
|
-
id: string;
|
|
5
|
-
/** The header content for the accordion item */
|
|
6
|
-
header: ReactNode;
|
|
7
|
-
/** The body content for the accordion item */
|
|
8
|
-
children: ReactNode;
|
|
9
|
-
/** Whether this item is disabled */
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
/** Custom class name for the accordion item */
|
|
12
|
-
className?: string;
|
|
13
|
-
/** Loading state for this specific item */
|
|
14
|
-
loading?: boolean;
|
|
15
|
-
/** Status indicator for the item */
|
|
16
|
-
status?: 'default' | 'success' | 'warning' | 'error' | 'featured';
|
|
17
|
-
/** Custom icon for this specific item (overrides accordion-level icons) */
|
|
18
|
-
icon?: {
|
|
19
|
-
expanded?: React.ReactNode;
|
|
20
|
-
collapsed?: React.ReactNode;
|
|
21
|
-
};
|
|
22
|
-
/** Additional data attributes for testing or analytics */
|
|
23
|
-
dataTestId?: string;
|
|
24
|
-
}
|
|
25
|
-
export interface AccordionProps {
|
|
26
|
-
/** Array of accordion items */
|
|
27
|
-
items?: AccordionItemProps[];
|
|
28
|
-
/** Children accordion items (alternative to items prop) */
|
|
29
|
-
children?: ReactNode;
|
|
30
|
-
/** Whether multiple items can be open at once */
|
|
31
|
-
allowMultiple?: boolean;
|
|
32
|
-
/** Default open items (controlled) */
|
|
33
|
-
defaultOpenItems?: string[];
|
|
34
|
-
/** Open items (uncontrolled) */
|
|
35
|
-
openItems?: string[];
|
|
36
|
-
/** Callback when items are toggled */
|
|
37
|
-
onToggle?: (openItems: string[]) => void;
|
|
38
|
-
/** Visual variant style of the accordion */
|
|
39
|
-
variant?: 'default' | 'bordered' | 'separated' | 'flush';
|
|
40
|
-
/** Size variant of the accordion */
|
|
41
|
-
size?: 'sm' | 'md' | 'lg';
|
|
42
|
-
/** Custom class name */
|
|
43
|
-
className?: string;
|
|
44
|
-
/** Custom styles */
|
|
45
|
-
style?: React.CSSProperties;
|
|
46
|
-
/** Whether to show chevron icons */
|
|
47
|
-
showChevron?: boolean;
|
|
48
|
-
/** Position of the chevron icon */
|
|
49
|
-
chevronPosition?: 'left' | 'right';
|
|
50
|
-
/** Custom icon for expanded state */
|
|
51
|
-
expandedIcon?: React.ReactNode;
|
|
52
|
-
/** Custom icon for collapsed state */
|
|
53
|
-
collapsedIcon?: React.ReactNode;
|
|
54
|
-
/** Icon type preset */
|
|
55
|
-
iconType?: 'chevron' | 'plus-minus' | 'custom';
|
|
56
|
-
/** Whether to show divider lines between items */
|
|
57
|
-
showDivider?: boolean;
|
|
58
|
-
/** Whether items are collapsible (can all be closed) */
|
|
59
|
-
collapsible?: boolean;
|
|
60
|
-
/** Loading state for the entire accordion */
|
|
61
|
-
loading?: boolean;
|
|
62
|
-
/** Disable all accordion interactions */
|
|
63
|
-
disabled?: boolean;
|
|
64
|
-
/** Spacing variant for compact or spacious layouts */
|
|
65
|
-
spacing?: 'compact' | 'default' | 'spacious';
|
|
66
|
-
/** Disable animations for better performance or accessibility */
|
|
67
|
-
disableAnimations?: boolean;
|
|
68
|
-
}
|
|
69
|
-
export interface AccordionItemComponentProps {
|
|
70
|
-
/** The accordion item data */
|
|
71
|
-
item: AccordionItemProps;
|
|
72
|
-
/** Whether this item is open */
|
|
73
|
-
isOpen: boolean;
|
|
74
|
-
/** Function to toggle this item */
|
|
75
|
-
onToggle: () => void;
|
|
76
|
-
/** Variant from parent accordion */
|
|
77
|
-
variant: AccordionProps['variant'];
|
|
78
|
-
/** Size from parent accordion */
|
|
79
|
-
size: AccordionProps['size'];
|
|
80
|
-
/** Whether to show chevron */
|
|
81
|
-
showChevron: boolean;
|
|
82
|
-
/** Chevron position */
|
|
83
|
-
chevronPosition: AccordionProps['chevronPosition'];
|
|
84
|
-
/** Custom icon for expanded state */
|
|
85
|
-
expandedIcon?: React.ReactNode;
|
|
86
|
-
/** Custom icon for collapsed state */
|
|
87
|
-
collapsedIcon?: React.ReactNode;
|
|
88
|
-
/** Icon type preset */
|
|
89
|
-
iconType?: AccordionProps['iconType'];
|
|
90
|
-
/** Loading state from parent accordion */
|
|
91
|
-
loading?: boolean;
|
|
92
|
-
/** Disabled state from parent accordion */
|
|
93
|
-
disabled?: boolean;
|
|
94
|
-
/** Spacing variant from parent accordion */
|
|
95
|
-
spacing?: AccordionProps['spacing'];
|
|
96
|
-
/** Disable animations */
|
|
97
|
-
disableAnimations?: boolean;
|
|
98
|
-
}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './Alert.css';
|
|
3
|
-
export interface AlertProps {
|
|
4
|
-
/**
|
|
5
|
-
* Content of the alert (primary message, can be any ReactNode)
|
|
6
|
-
*/
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
/**
|
|
9
|
-
* Alert title
|
|
10
|
-
*/
|
|
11
|
-
title?: string;
|
|
12
|
-
/**
|
|
13
|
-
* Alert description - alternative to children for simple text
|
|
14
|
-
*/
|
|
15
|
-
description?: string;
|
|
16
|
-
/**
|
|
17
|
-
* Visual variant of the alert
|
|
18
|
-
* @default 'info'
|
|
19
|
-
*/
|
|
20
|
-
variant?: 'success' | 'error' | 'warning' | 'info' | 'neutral';
|
|
21
|
-
/**
|
|
22
|
-
* Visual style of the alert
|
|
23
|
-
* @default 'subtle'
|
|
24
|
-
*/
|
|
25
|
-
alertStyle?: 'filled' | 'outlined' | 'subtle' | 'left-accent';
|
|
26
|
-
/** Size of the alert. Defaults to theme defaultSize or 'md'. */
|
|
27
|
-
size?: 'sm' | 'md' | 'lg';
|
|
28
|
-
/**
|
|
29
|
-
* Custom icon or false to hide icon
|
|
30
|
-
* If not provided, shows default icon based on variant
|
|
31
|
-
*/
|
|
32
|
-
icon?: React.ReactNode | false;
|
|
33
|
-
/**
|
|
34
|
-
* If true, shows close button
|
|
35
|
-
* @default false
|
|
36
|
-
*/
|
|
37
|
-
dismissible?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Callback fired when alert is dismissed
|
|
40
|
-
*/
|
|
41
|
-
onClose?: () => void;
|
|
42
|
-
/**
|
|
43
|
-
* Action element (button or link) displayed on the right
|
|
44
|
-
*/
|
|
45
|
-
action?: React.ReactNode;
|
|
46
|
-
/**
|
|
47
|
-
* If true, alert takes full width of container
|
|
48
|
-
* @default false
|
|
49
|
-
*/
|
|
50
|
-
fullWidth?: boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Custom class name
|
|
53
|
-
*/
|
|
54
|
-
className?: string;
|
|
55
|
-
/**
|
|
56
|
-
* Custom inline styles
|
|
57
|
-
*/
|
|
58
|
-
style?: React.CSSProperties;
|
|
59
|
-
/**
|
|
60
|
-
* Role attribute for accessibility
|
|
61
|
-
* @default 'alert'
|
|
62
|
-
*/
|
|
63
|
-
role?: string;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Alert component - Displays important messages and notifications
|
|
67
|
-
*
|
|
68
|
-
* A flexible alert component supporting multiple variants, styles, and interactive features.
|
|
69
|
-
* Can display simple messages or complex content with titles, actions, and custom icons.
|
|
70
|
-
*
|
|
71
|
-
* @example
|
|
72
|
-
* Simple alert with children
|
|
73
|
-
* ```tsx
|
|
74
|
-
* <Alert variant="success">
|
|
75
|
-
* Your changes have been saved!
|
|
76
|
-
* </Alert>
|
|
77
|
-
* ```
|
|
78
|
-
*
|
|
79
|
-
* @example
|
|
80
|
-
* Alert with title and description
|
|
81
|
-
* ```tsx
|
|
82
|
-
* <Alert
|
|
83
|
-
* variant="error"
|
|
84
|
-
* title="Error occurred"
|
|
85
|
-
* description="Unable to connect to the server."
|
|
86
|
-
* dismissible
|
|
87
|
-
* onClose={() => console.log('closed')}
|
|
88
|
-
* />
|
|
89
|
-
* ```
|
|
90
|
-
*
|
|
91
|
-
* @example
|
|
92
|
-
* Alert with action button
|
|
93
|
-
* ```tsx
|
|
94
|
-
* <Alert
|
|
95
|
-
* variant="warning"
|
|
96
|
-
* title="Update available"
|
|
97
|
-
* style="left-accent"
|
|
98
|
-
* action={<Button size="small">Update Now</Button>}
|
|
99
|
-
* >
|
|
100
|
-
* A new version is available. Update to get the latest features.
|
|
101
|
-
* </Alert>
|
|
102
|
-
* ```
|
|
103
|
-
*
|
|
104
|
-
* @example
|
|
105
|
-
* Alert with custom icon
|
|
106
|
-
* ```tsx
|
|
107
|
-
* <Alert
|
|
108
|
-
* variant="info"
|
|
109
|
-
* icon={<CustomIcon />}
|
|
110
|
-
* title="Custom notification"
|
|
111
|
-
* >
|
|
112
|
-
* This alert uses a custom icon.
|
|
113
|
-
* </Alert>
|
|
114
|
-
* ```
|
|
115
|
-
*/
|
|
116
|
-
declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
|
|
117
|
-
declare const _default: React.FC<AlertProps & React.RefAttributes<HTMLDivElement>>;
|
|
118
|
-
export default _default;
|
|
119
|
-
export { Alert };
|