@vtx-ui/react 0.0.1-beta.3 → 0.0.1-beta.4
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 +176 -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 +2 -53
- package/dist/types/components/Avatar/Avatar.d.ts +2 -2
- package/dist/types/components/Badge/Badge.d.ts +2 -32
- package/dist/types/components/Button/Button.d.ts +2 -42
- package/dist/types/components/Card/Card.d.ts +2 -63
- package/dist/types/components/Checkbox/Checkbox.d.ts +2 -59
- package/dist/types/components/CheckboxGroup/CheckboxGroup.d.ts +2 -53
- package/dist/types/components/Chip/Chip.d.ts +2 -32
- package/dist/types/components/Divider/Divider.d.ts +2 -72
- package/dist/types/components/Flex/Flex.d.ts +2 -26
- package/dist/types/components/Grid/Grid.d.ts +2 -77
- package/dist/types/components/Header/Header.d.ts +2 -33
- package/dist/types/components/Input/Input.d.ts +2 -52
- package/dist/types/components/Menu/Menu.d.ts +2 -32
- package/dist/types/components/Modal/Modal.d.ts +4 -73
- package/dist/types/components/MultiSelect/MultiSelect.d.ts +2 -41
- package/dist/types/components/Radio/Radio.d.ts +2 -55
- package/dist/types/components/RadioGroup/RadioGroup.d.ts +2 -57
- package/dist/types/components/Select/Select.d.ts +2 -58
- package/dist/types/components/SideMenu/SideMenu.d.ts +139 -38
- package/dist/types/components/SideMenu/SideMenu.examples.d.ts +17 -0
- package/dist/types/components/SideMenu/index.d.ts +2 -4
- package/dist/types/components/Table/Table.d.ts +2 -58
- 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 +2 -51
- package/dist/types/icons/IconComponents.d.ts +50 -0
- package/dist/types/icons/index.d.ts +1 -0
- package/dist/types/index.d.ts +19 -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/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 +131 -0
- package/dist/types/stories/components/Table.stories.d.ts +18 -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/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 +40 -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 +68 -0
- package/dist/types/widgets/OrderCard/index.d.ts +2 -0
- package/dist/types/widgets/OrderConfirmation/OrderConfirmation.d.ts +82 -0
- package/dist/types/widgets/OrderConfirmation/index.d.ts +3 -0
- package/dist/types/widgets/OrderDetails/OrderDetails.d.ts +88 -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 +72 -59
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Header.css';
|
|
3
|
+
export interface TopBarConfig {
|
|
4
|
+
/**
|
|
5
|
+
* Content to display in the top bar
|
|
6
|
+
*/
|
|
7
|
+
content?: React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Left-aligned content
|
|
10
|
+
*/
|
|
11
|
+
leftContent?: React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Right-aligned content
|
|
14
|
+
*/
|
|
15
|
+
rightContent?: React.ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Top bar styling variant
|
|
18
|
+
* @default 'subtle'
|
|
19
|
+
*/
|
|
20
|
+
variant?: 'subtle' | 'bold' | 'accent' | 'dark' | 'gradient';
|
|
21
|
+
/**
|
|
22
|
+
* If true, shows a dismiss button
|
|
23
|
+
*/
|
|
24
|
+
dismissible?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Callback when dismiss button is clicked
|
|
27
|
+
*/
|
|
28
|
+
onDismiss?: () => void;
|
|
29
|
+
}
|
|
30
|
+
export interface MegaMenuColumn {
|
|
31
|
+
/**
|
|
32
|
+
* Column title
|
|
33
|
+
*/
|
|
34
|
+
title?: React.ReactNode;
|
|
35
|
+
/**
|
|
36
|
+
* Column items
|
|
37
|
+
*/
|
|
38
|
+
items: NavigationItem[];
|
|
39
|
+
}
|
|
40
|
+
export interface NavigationItem {
|
|
41
|
+
/**
|
|
42
|
+
* Unique identifier for the navigation item
|
|
43
|
+
*/
|
|
44
|
+
id: string;
|
|
45
|
+
/**
|
|
46
|
+
* Label text to display
|
|
47
|
+
*/
|
|
48
|
+
label: React.ReactNode;
|
|
49
|
+
/**
|
|
50
|
+
* URL or path for navigation
|
|
51
|
+
*/
|
|
52
|
+
href?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Icon to display before label
|
|
55
|
+
*/
|
|
56
|
+
icon?: React.ReactNode;
|
|
57
|
+
/**
|
|
58
|
+
* Nested child items for dropdown menus
|
|
59
|
+
*/
|
|
60
|
+
children?: NavigationItem[];
|
|
61
|
+
/**
|
|
62
|
+
* Click handler
|
|
63
|
+
*/
|
|
64
|
+
onClick?: () => void;
|
|
65
|
+
/**
|
|
66
|
+
* If true, marks this item as active/selected
|
|
67
|
+
*/
|
|
68
|
+
active?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* If true, disables the item
|
|
71
|
+
*/
|
|
72
|
+
disabled?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Badge content to display (e.g., notification count)
|
|
75
|
+
*/
|
|
76
|
+
badge?: React.ReactNode;
|
|
77
|
+
/**
|
|
78
|
+
* If true, renders as a mega menu with columns
|
|
79
|
+
*/
|
|
80
|
+
megaMenu?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Mega menu columns (when megaMenu is true)
|
|
83
|
+
*/
|
|
84
|
+
megaMenuColumns?: MegaMenuColumn[];
|
|
85
|
+
/**
|
|
86
|
+
* Description text for mega menu items
|
|
87
|
+
*/
|
|
88
|
+
description?: React.ReactNode;
|
|
89
|
+
/**
|
|
90
|
+
* Featured image for mega menu
|
|
91
|
+
*/
|
|
92
|
+
image?: string;
|
|
93
|
+
}
|
|
94
|
+
export interface HeaderDesktopProps extends React.HTMLAttributes<HTMLElement> {
|
|
95
|
+
/**
|
|
96
|
+
* Logo element or brand name
|
|
97
|
+
*/
|
|
98
|
+
logo?: React.ReactNode;
|
|
99
|
+
/**
|
|
100
|
+
* Array of navigation items
|
|
101
|
+
*/
|
|
102
|
+
navItems?: NavigationItem[];
|
|
103
|
+
/**
|
|
104
|
+
* Action buttons or elements to display on the right
|
|
105
|
+
*/
|
|
106
|
+
actions?: React.ReactNode;
|
|
107
|
+
/**
|
|
108
|
+
* Visual theme variant
|
|
109
|
+
* @default 'primary'
|
|
110
|
+
*/
|
|
111
|
+
variant?: 'primary' | 'secondary' | 'dark' | 'light' | 'transparent' | 'gradient';
|
|
112
|
+
/**
|
|
113
|
+
* If true, header has a shadow effect
|
|
114
|
+
* @default false
|
|
115
|
+
*/
|
|
116
|
+
elevated?: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* If true, header sticks to top on scroll
|
|
119
|
+
* @default false
|
|
120
|
+
*/
|
|
121
|
+
sticky?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* If true, makes header full bleed (no max-width)
|
|
124
|
+
* @default false
|
|
125
|
+
*/
|
|
126
|
+
fullWidth?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* If true, enables search functionality
|
|
129
|
+
* @default false
|
|
130
|
+
*/
|
|
131
|
+
searchEnabled?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Search placeholder text
|
|
134
|
+
*/
|
|
135
|
+
searchPlaceholder?: string;
|
|
136
|
+
/**
|
|
137
|
+
* Search input handler
|
|
138
|
+
*/
|
|
139
|
+
onSearch?: (query: string) => void;
|
|
140
|
+
/**
|
|
141
|
+
* Custom logo click handler
|
|
142
|
+
*/
|
|
143
|
+
onLogoClick?: () => void;
|
|
144
|
+
/**
|
|
145
|
+
* Layout style for the header
|
|
146
|
+
* @default 'single-row'
|
|
147
|
+
*/
|
|
148
|
+
layout?: 'single-row' | 'two-row' | 'centered';
|
|
149
|
+
/**
|
|
150
|
+
* Two-row bottom styling variant (only applicable when layout='two-row')
|
|
151
|
+
* @default 'default'
|
|
152
|
+
*/
|
|
153
|
+
twoRowBottomStyle?: 'default' | 'divider' | 'dark-bottom' | 'gradient-bottom' | 'elevated-bottom';
|
|
154
|
+
/**
|
|
155
|
+
* Top bar configuration (displays above main header)
|
|
156
|
+
*/
|
|
157
|
+
topBar?: TopBarConfig;
|
|
158
|
+
/**
|
|
159
|
+
* Scroll behavior - 'transparent-to-solid' makes header transparent initially and solid on scroll
|
|
160
|
+
* @default undefined
|
|
161
|
+
*/
|
|
162
|
+
scrollBehavior?: 'transparent-to-solid';
|
|
163
|
+
/**
|
|
164
|
+
* Scroll threshold in pixels before applying scroll effect
|
|
165
|
+
* @default 50
|
|
166
|
+
*/
|
|
167
|
+
scrollThreshold?: number;
|
|
168
|
+
/**
|
|
169
|
+
* Callback fired when scroll state changes
|
|
170
|
+
* @param scrolled - true if user has scrolled past threshold, false otherwise
|
|
171
|
+
*/
|
|
172
|
+
onScrollStateChange?: (scrolled: boolean) => void;
|
|
173
|
+
className?: string;
|
|
174
|
+
style?: React.CSSProperties;
|
|
175
|
+
}
|
|
176
|
+
export interface HeaderMobileProps extends React.HTMLAttributes<HTMLElement> {
|
|
177
|
+
/**
|
|
178
|
+
* Logo element or brand name
|
|
179
|
+
*/
|
|
180
|
+
logo?: React.ReactNode;
|
|
181
|
+
/**
|
|
182
|
+
* Array of navigation items
|
|
183
|
+
*/
|
|
184
|
+
navItems?: NavigationItem[];
|
|
185
|
+
/**
|
|
186
|
+
* Action buttons or elements to display on the right
|
|
187
|
+
*/
|
|
188
|
+
actions?: React.ReactNode;
|
|
189
|
+
/**
|
|
190
|
+
* Visual theme variant
|
|
191
|
+
* @default 'primary'
|
|
192
|
+
*/
|
|
193
|
+
variant?: 'primary' | 'secondary' | 'dark' | 'light' | 'transparent' | 'gradient';
|
|
194
|
+
/**
|
|
195
|
+
* If true, header has a shadow effect
|
|
196
|
+
* @default false
|
|
197
|
+
*/
|
|
198
|
+
elevated?: boolean;
|
|
199
|
+
/**
|
|
200
|
+
* If true, header sticks to top on scroll
|
|
201
|
+
* @default false
|
|
202
|
+
*/
|
|
203
|
+
sticky?: boolean;
|
|
204
|
+
/**
|
|
205
|
+
* If true, enables search functionality in mobile menu
|
|
206
|
+
* @default false
|
|
207
|
+
*/
|
|
208
|
+
searchEnabled?: boolean;
|
|
209
|
+
/**
|
|
210
|
+
* Search placeholder text
|
|
211
|
+
*/
|
|
212
|
+
searchPlaceholder?: string;
|
|
213
|
+
/**
|
|
214
|
+
* Search input handler
|
|
215
|
+
*/
|
|
216
|
+
onSearch?: (query: string) => void;
|
|
217
|
+
/**
|
|
218
|
+
* Custom logo click handler
|
|
219
|
+
*/
|
|
220
|
+
onLogoClick?: () => void;
|
|
221
|
+
/**
|
|
222
|
+
* Menu open state (controlled)
|
|
223
|
+
*/
|
|
224
|
+
menuOpen?: boolean;
|
|
225
|
+
/**
|
|
226
|
+
* Menu open change handler (controlled)
|
|
227
|
+
*/
|
|
228
|
+
onMenuOpenChange?: (open: boolean) => void;
|
|
229
|
+
className?: string;
|
|
230
|
+
style?: React.CSSProperties;
|
|
231
|
+
}
|
|
232
|
+
export interface HeaderResponsiveProps {
|
|
233
|
+
/**
|
|
234
|
+
* Props for desktop header
|
|
235
|
+
*/
|
|
236
|
+
desktopProps: HeaderDesktopProps;
|
|
237
|
+
/**
|
|
238
|
+
* Props for mobile header
|
|
239
|
+
*/
|
|
240
|
+
mobileProps: HeaderMobileProps;
|
|
241
|
+
/**
|
|
242
|
+
* Breakpoint in pixels to switch between desktop and mobile
|
|
243
|
+
* @default 768
|
|
244
|
+
*/
|
|
245
|
+
breakpoint?: number;
|
|
246
|
+
}
|
|
247
|
+
export declare const Header: {
|
|
248
|
+
Desktop: React.FC<HeaderDesktopProps & React.RefAttributes<HTMLElement>>;
|
|
249
|
+
Mobile: React.FC<HeaderMobileProps & React.RefAttributes<HTMLElement>>;
|
|
250
|
+
Responsive: React.FC<HeaderResponsiveProps>;
|
|
251
|
+
};
|
|
252
|
+
export default Header;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const BasicDesktopExample: () => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const NestedNavigationExample: () => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const EcommerceDesktopExample: () => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const MobileHeaderExample: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const ResponsiveHeaderExample: () => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const AllVariantsExample: () => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const SaaSHeaderExample: () => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const HeaderExamples: {
|
|
9
|
+
BasicDesktop: () => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
NestedNavigation: () => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
EcommerceDesktop: () => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
Mobile: () => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
Responsive: () => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
AllVariants: () => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
SaaS: () => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
};
|
|
17
|
+
export default HeaderExamples;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Example 1: E-commerce Header with Mega Menu
|
|
3
|
+
* Layout: Two rows (Logo + Search + Actions on top, Mega menu navigation below)
|
|
4
|
+
*/
|
|
5
|
+
export declare const EcommerceMegaMenuExample: () => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
/**
|
|
7
|
+
* Example 2: SaaS Platform with Mega Menu
|
|
8
|
+
* Layout: Two rows with centered search
|
|
9
|
+
*/
|
|
10
|
+
export declare const SaaSMegaMenuExample: () => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
/**
|
|
12
|
+
* Example 3: Corporate Website with Centered Layout
|
|
13
|
+
*/
|
|
14
|
+
export declare const CenteredMegaMenuExample: () => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
/**
|
|
16
|
+
* Example 4: Standard Single Row with Mega Menu
|
|
17
|
+
*/
|
|
18
|
+
export declare const SingleRowMegaMenuExample: () => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
/**
|
|
20
|
+
* Example 5: Mixed Mega Menu and Regular Dropdowns
|
|
21
|
+
*/
|
|
22
|
+
export declare const MixedNavigationExample: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { Header } from './Header';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import("react").FC<import("./Header").HeaderResponsiveProps>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof Header.Responsive>;
|
|
13
|
+
type MobileStory = StoryObj<typeof Header.Mobile>;
|
|
14
|
+
type ResponsiveStory = StoryObj<typeof Header.Responsive>;
|
|
15
|
+
export declare const Primary: Story;
|
|
16
|
+
export declare const WithSearch: Story;
|
|
17
|
+
export declare const WithActions: Story;
|
|
18
|
+
export declare const NestedMenu: Story;
|
|
19
|
+
export declare const FullFeatured: Story;
|
|
20
|
+
export declare const TwoRowLayout: Story;
|
|
21
|
+
export declare const WithMegaMenu: Story;
|
|
22
|
+
export declare const MobilePrimary: MobileStory;
|
|
23
|
+
export declare const MobileDark: MobileStory;
|
|
24
|
+
export declare const MobileNested: MobileStory;
|
|
25
|
+
export declare const MobileWithSearch: MobileStory;
|
|
26
|
+
export declare const MobileWithActions: MobileStory;
|
|
27
|
+
export declare const ResponsiveBasic: ResponsiveStory;
|
|
28
|
+
export declare const ResponsiveTwoRowWithMegaMenu: ResponsiveStory;
|
|
29
|
+
export declare const ScrollTransparentToSolid: Story;
|
|
30
|
+
export declare const ScrollTwoRowTransparent: Story;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './InfoCard.css';
|
|
3
|
+
export interface InfoCardBaseProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Icon element to display
|
|
6
|
+
*/
|
|
7
|
+
icon: React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Visual variant for the icon styling
|
|
10
|
+
* @default 'primary'
|
|
11
|
+
*/
|
|
12
|
+
iconVariant?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info';
|
|
13
|
+
/**
|
|
14
|
+
* Main text content
|
|
15
|
+
*/
|
|
16
|
+
text: React.ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Optional secondary text below main text
|
|
19
|
+
*/
|
|
20
|
+
subText?: React.ReactNode;
|
|
21
|
+
className?: string;
|
|
22
|
+
style?: React.CSSProperties;
|
|
23
|
+
}
|
|
24
|
+
export interface InfoCardMetricProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
25
|
+
/**
|
|
26
|
+
* Primary value/metric to display
|
|
27
|
+
*/
|
|
28
|
+
value: React.ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* Optional label for the metric
|
|
31
|
+
*/
|
|
32
|
+
label?: React.ReactNode;
|
|
33
|
+
className?: string;
|
|
34
|
+
style?: React.CSSProperties;
|
|
35
|
+
}
|
|
36
|
+
export declare const InfoCard: {
|
|
37
|
+
Base: React.FC<InfoCardBaseProps & React.RefAttributes<HTMLDivElement>>;
|
|
38
|
+
Metric: React.FC<InfoCardMetricProps & React.RefAttributes<HTMLDivElement>>;
|
|
39
|
+
};
|
|
40
|
+
export default InfoCard;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './InfoCard';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './InfoListCard.css';
|
|
3
|
+
export interface InfoListItem {
|
|
4
|
+
/** Label/key - can be text or any React node */
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
/** Value - can be text or any React node */
|
|
7
|
+
value: React.ReactNode;
|
|
8
|
+
/** Optional CSS class for value styling */
|
|
9
|
+
valueClass?: string;
|
|
10
|
+
/** Optional CSS class for label styling */
|
|
11
|
+
labelClass?: string;
|
|
12
|
+
/** Hide this item */
|
|
13
|
+
hidden?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface InfoListCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
16
|
+
/** Card heading/title */
|
|
17
|
+
heading?: string;
|
|
18
|
+
/** Array of label-value pairs */
|
|
19
|
+
items: InfoListItem[];
|
|
20
|
+
/** Show divider between items
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
showDividers?: boolean;
|
|
24
|
+
/** Compact spacing
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
compact?: boolean;
|
|
28
|
+
/** Card variant
|
|
29
|
+
* @default 'outlined'
|
|
30
|
+
*/
|
|
31
|
+
variant?: 'outlined' | 'elevated' | 'flat';
|
|
32
|
+
/** Additional class name */
|
|
33
|
+
className?: string;
|
|
34
|
+
/** Inline styles */
|
|
35
|
+
style?: React.CSSProperties;
|
|
36
|
+
}
|
|
37
|
+
declare const InfoListCardWithParsedClasses: (props: InfoListCardProps & React.RefAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
declare const _default: React.FC<InfoListCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
39
|
+
export default _default;
|
|
40
|
+
export { InfoListCardWithParsedClasses as InfoListCard };
|
|
@@ -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,68 @@
|
|
|
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: (props: OrderCardProps & React.RefAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
|
|
66
|
+
declare const _default: React.FC<OrderCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
67
|
+
export default _default;
|
|
68
|
+
export { OrderCardWithParsedClasses as OrderCard };
|