@vtx-ui/react 0.0.1-beta.12 → 0.0.1-beta.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/README.md +865 -103
  2. package/dist/index.cjs.js +1 -1
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.esm.js +1 -1
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/types/components/Autocomplete/Autocomplete.d.ts +173 -0
  7. package/dist/types/components/Autocomplete/index.d.ts +2 -0
  8. package/dist/types/components/DatePicker/Calendar.d.ts +15 -0
  9. package/dist/types/components/DatePicker/DatePicker.d.ts +99 -0
  10. package/dist/types/components/DatePicker/DateRangePicker.d.ts +114 -0
  11. package/dist/types/components/DatePicker/index.d.ts +6 -0
  12. package/dist/types/components/FormControl/FormControl.d.ts +77 -0
  13. package/dist/types/components/FormControl/index.d.ts +3 -0
  14. package/dist/types/components/Image/Image.d.ts +14 -0
  15. package/dist/types/components/Image/index.d.ts +2 -0
  16. package/dist/types/components/Link/Link.d.ts +5 -0
  17. package/dist/types/components/Navbar/Navbar.d.ts +236 -0
  18. package/dist/types/components/Navbar/index.d.ts +2 -0
  19. package/dist/types/components/RichTextEditor/RichTextEditor.d.ts +153 -0
  20. package/dist/types/components/RichTextEditor/index.d.ts +2 -0
  21. package/dist/types/components/Text/Text.d.ts +9 -3
  22. package/dist/types/components/Textarea/Textarea.d.ts +81 -0
  23. package/dist/types/components/Textarea/index.d.ts +3 -0
  24. package/dist/types/components/Widget/IntelligentGrid.d.ts +15 -0
  25. package/dist/types/components/Widget/Widget.d.ts +9 -0
  26. package/dist/types/components/Widget/index.d.ts +16 -0
  27. package/dist/types/components/Widget/renderers/CarouselWidget.d.ts +40 -0
  28. package/dist/types/components/Widget/renderers/ContentBlockWidget.d.ts +56 -0
  29. package/dist/types/components/Widget/renderers/ContentBlockWidget.stories.d.ts +24 -0
  30. package/dist/types/components/Widget/renderers/GridCarouselWidget.d.ts +35 -0
  31. package/dist/types/components/Widget/renderers/HeaderWidget.d.ts +18 -0
  32. package/dist/types/components/Widget/renderers/ImageWidget.d.ts +69 -0
  33. package/dist/types/components/Widget/renderers/ImageWidget.stories.d.ts +11 -0
  34. package/dist/types/components/Widget/renderers/InfoWidget.d.ts +18 -0
  35. package/dist/types/components/Widget/renderers/ListWidget.d.ts +18 -0
  36. package/dist/types/components/Widget/renderers/MetricWidget.d.ts +18 -0
  37. package/dist/types/components/Widget/renderers/NavbarWidget.d.ts +16 -0
  38. package/dist/types/components/Widget/renderers/OrderWidget.d.ts +8 -0
  39. package/dist/types/components/Widget/renderers/ProductWidget.d.ts +8 -0
  40. package/dist/types/components/Widget/renderers/TestimonialWidget.d.ts +14 -0
  41. package/dist/types/components/Widget/renderers/TextWidget.d.ts +18 -0
  42. package/dist/types/components/Widget/types.d.ts +629 -0
  43. package/dist/types/icons/IconComponents.d.ts +4 -0
  44. package/dist/types/index.d.ts +19 -5
  45. package/dist/types/stories/components/Autocomplete.stories.d.ts +20 -0
  46. package/dist/types/stories/components/CarouselWidget.stories.d.ts +11 -0
  47. package/dist/types/stories/components/ContentBlockWidget.stories.d.ts +24 -0
  48. package/dist/types/stories/components/DatePicker.stories.d.ts +69 -0
  49. package/dist/types/stories/components/FormControl.stories.d.ts +57 -0
  50. package/dist/types/stories/components/GridCarouselWidget.stories.d.ts +17 -0
  51. package/dist/types/stories/components/HeaderWidget.stories.d.ts +10 -0
  52. package/dist/types/stories/components/InfoWidget.stories.d.ts +24 -0
  53. package/dist/types/stories/components/ListWidget.stories.d.ts +10 -0
  54. package/dist/types/stories/components/MetricWidget.stories.d.ts +12 -0
  55. package/dist/types/stories/components/OrderWidget.stories.d.ts +12 -0
  56. package/dist/types/stories/components/ProductWidget.stories.d.ts +13 -0
  57. package/dist/types/stories/components/RichTextEditor.stories.d.ts +22 -0
  58. package/dist/types/stories/components/TestimonialWidget.stories.d.ts +47 -0
  59. package/dist/types/stories/components/TextWidget.stories.d.ts +10 -0
  60. package/dist/types/stories/components/Textarea.stories.d.ts +21 -0
  61. package/dist/types/stories/components/Toast.stories.d.ts +56 -13
  62. package/dist/types/stories/components/Widget.stories.d.ts +10 -0
  63. package/dist/types/stories/widgets/DashboardCard.stories.d.ts +58 -0
  64. package/dist/types/stories/widgets/InfoCard.stories.d.ts +1 -4
  65. package/dist/types/stories/widgets/InfoListCard.stories.d.ts +3 -15
  66. package/dist/types/stories/widgets/InfoText.stories.d.ts +1 -19
  67. package/dist/types/stories/widgets/MetricCard.stories.d.ts +27 -0
  68. package/dist/types/stories/widgets/OrderCard.stories.d.ts +3 -9
  69. package/dist/types/stories/widgets/OrderConfirmation.stories.d.ts +1 -24
  70. package/dist/types/stories/widgets/OrderDetails.stories.d.ts +3 -7
  71. package/dist/types/stories/widgets/ProductCard.stories.d.ts +1 -15
  72. package/dist/types/theme/ThemeProvider.d.ts +14 -0
  73. package/dist/types/utils/parseClass.d.ts +2 -0
  74. package/dist/types/widgets/DashboardCard/DashboardCard.d.ts +275 -0
  75. package/dist/types/widgets/DashboardCard/index.d.ts +2 -0
  76. package/dist/types/widgets/MetricCard/MetricCard.d.ts +106 -0
  77. package/dist/types/widgets/MetricCard/index.d.ts +2 -0
  78. package/dist/types/widgets/Navbar/Navbar.d.ts +308 -0
  79. package/dist/types/widgets/Navbar/Navbar.stories.d.ts +23 -0
  80. package/dist/types/widgets/Navbar/index.d.ts +2 -0
  81. package/dist/types/widgets/OrderCard/OrderCard.d.ts +1 -0
  82. package/package.json +2 -1
@@ -0,0 +1,236 @@
1
+ import React from 'react';
2
+ import './Navbar.css';
3
+ /**
4
+ * Navigation item configuration
5
+ */
6
+ export interface NavigationItem {
7
+ /**
8
+ * Label to display
9
+ */
10
+ label: string;
11
+ /**
12
+ * Link URL
13
+ */
14
+ href?: string;
15
+ /**
16
+ * Click handler (alternative to href)
17
+ */
18
+ onClick?: () => void;
19
+ /**
20
+ * Icon to display before label
21
+ */
22
+ icon?: React.ReactNode;
23
+ /**
24
+ * Badge to display next to label
25
+ */
26
+ badge?: string | number;
27
+ /**
28
+ * Badge variant
29
+ */
30
+ badgeVariant?: 'neutral' | 'primary' | 'success' | 'warning' | 'error' | 'info';
31
+ /**
32
+ * If true, item is marked as active
33
+ */
34
+ active?: boolean;
35
+ /**
36
+ * If true, item is disabled
37
+ */
38
+ disabled?: boolean;
39
+ /**
40
+ * Submenu items (for dropdown menus)
41
+ */
42
+ children?: NavigationItem[];
43
+ /**
44
+ * Mega menu columns (for large dropdown menus)
45
+ */
46
+ megaMenu?: MegaMenuColumn[];
47
+ }
48
+ /**
49
+ * Mega menu column configuration
50
+ */
51
+ export interface MegaMenuColumn {
52
+ /**
53
+ * Column title
54
+ */
55
+ title?: string;
56
+ /**
57
+ * Items in this column
58
+ */
59
+ items: NavigationItem[];
60
+ }
61
+ /**
62
+ * Top bar configuration (above main navbar)
63
+ */
64
+ export interface TopBarConfig {
65
+ /**
66
+ * Left side content/links
67
+ */
68
+ left?: React.ReactNode | NavigationItem[];
69
+ /**
70
+ * Right side content/links
71
+ */
72
+ right?: React.ReactNode | NavigationItem[];
73
+ /**
74
+ * Background color
75
+ */
76
+ backgroundColor?: string;
77
+ /**
78
+ * Text color
79
+ */
80
+ textColor?: string;
81
+ }
82
+ interface NavbarBaseProps {
83
+ /**
84
+ * Logo image source
85
+ */
86
+ logo?: string;
87
+ /**
88
+ * Logo alt text
89
+ */
90
+ logoAlt?: string;
91
+ /**
92
+ * Logo click handler
93
+ */
94
+ onLogoClick?: () => void;
95
+ /**
96
+ * Brand text (shown if no logo)
97
+ */
98
+ brandText?: string;
99
+ /**
100
+ * Main navigation items
101
+ */
102
+ navigationItems?: NavigationItem[];
103
+ /**
104
+ * If true, navbar will be sticky at the top
105
+ * @default false
106
+ */
107
+ sticky?: boolean;
108
+ /**
109
+ * If true, navbar has a shadow
110
+ * @default true
111
+ */
112
+ shadow?: boolean;
113
+ /**
114
+ * Background color
115
+ */
116
+ backgroundColor?: string;
117
+ /**
118
+ * Custom class name
119
+ */
120
+ className?: string;
121
+ /**
122
+ * Top bar configuration
123
+ */
124
+ topBar?: TopBarConfig;
125
+ /**
126
+ * User profile section
127
+ */
128
+ user?: {
129
+ name?: string;
130
+ email?: string;
131
+ avatar?: string;
132
+ menuItems?: NavigationItem[];
133
+ };
134
+ /**
135
+ * Search configuration
136
+ */
137
+ search?: {
138
+ placeholder?: string;
139
+ onSearch?: (query: string) => void;
140
+ };
141
+ /**
142
+ * Search options for autocomplete
143
+ */
144
+ searchOptions?: any[];
145
+ /**
146
+ * Function to get label from search option
147
+ */
148
+ searchGetOptionLabel?: string | ((option: any) => string);
149
+ /**
150
+ * Function to get value from search option
151
+ */
152
+ searchGetOptionValue?: string | ((option: any) => string);
153
+ /**
154
+ * Function to get description from search option
155
+ */
156
+ searchGetOptionDescription?: string | ((option: any) => string | undefined);
157
+ /**
158
+ * Function to get icon from search option
159
+ */
160
+ searchGetOptionIcon?: string | ((option: any) => React.ReactNode);
161
+ /**
162
+ * No options message for search
163
+ */
164
+ searchNoOptionsMessage?: string;
165
+ /**
166
+ * If true, search is in loading state
167
+ */
168
+ searchLoading?: boolean;
169
+ /**
170
+ * Callback when search option is selected
171
+ */
172
+ onSearchSelect?: (value: string, option: any) => void;
173
+ /**
174
+ * Notifications badge count
175
+ */
176
+ notificationCount?: number;
177
+ /**
178
+ * Notification click handler
179
+ */
180
+ onNotificationClick?: () => void;
181
+ /**
182
+ * Shopping cart badge count
183
+ */
184
+ cartCount?: number;
185
+ /**
186
+ * Cart click handler
187
+ */
188
+ onCartClick?: () => void;
189
+ /**
190
+ * Action buttons (e.g., Login, Sign Up)
191
+ */
192
+ actions?: React.ReactNode;
193
+ /**
194
+ * If true, uses container for content width
195
+ * @default true
196
+ */
197
+ containerized?: boolean;
198
+ }
199
+ export interface NavbarDesktopProps extends NavbarBaseProps {
200
+ /**
201
+ * Layout variant
202
+ * - single-row: Logo, nav, search, and actions in one row
203
+ * - two-row: Logo/search in first row, nav in second row
204
+ * - centered: Logo/nav/actions centered
205
+ * @default 'single-row'
206
+ */
207
+ layout?: 'single-row' | 'two-row' | 'centered';
208
+ }
209
+ export interface NavbarMobileProps extends NavbarBaseProps {
210
+ /**
211
+ * If true, drawer is open
212
+ */
213
+ isOpen?: boolean;
214
+ /**
215
+ * Callback when drawer state changes
216
+ */
217
+ onOpenChange?: (open: boolean) => void;
218
+ }
219
+ export interface NavbarResponsiveProps extends NavbarBaseProps {
220
+ /**
221
+ * Layout variant for desktop
222
+ * @default 'single-row'
223
+ */
224
+ desktopLayout?: 'single-row' | 'two-row' | 'centered';
225
+ /**
226
+ * Breakpoint for switching to mobile view (px)
227
+ * @default 768
228
+ */
229
+ mobileBreakpoint?: number;
230
+ }
231
+ export declare const Navbar: React.FC<NavbarResponsiveProps> & {
232
+ Desktop: React.FC<NavbarDesktopProps>;
233
+ Mobile: React.FC<NavbarMobileProps>;
234
+ Responsive: React.FC<NavbarResponsiveProps>;
235
+ };
236
+ export default Navbar;
@@ -0,0 +1,2 @@
1
+ export { Navbar, default } from './Navbar';
2
+ export type { NavigationItem, MegaMenuColumn, TopBarConfig, NavbarDesktopProps, NavbarMobileProps, NavbarResponsiveProps, } from './Navbar';
@@ -0,0 +1,153 @@
1
+ import React from 'react';
2
+ import { Size } from '../../theme';
3
+ import './RichTextEditor.css';
4
+ export interface RichTextEditorProps {
5
+ /**
6
+ * Label text displayed above the editor
7
+ */
8
+ label?: string;
9
+ /**
10
+ * Helper text displayed below the editor
11
+ * Provides additional context or instructions
12
+ */
13
+ helperText?: string;
14
+ /**
15
+ * Error message - when provided, editor is shown in error state
16
+ * Takes precedence over helperText when both are present
17
+ */
18
+ error?: string;
19
+ /**
20
+ * Success message - when provided, editor is shown in success state
21
+ */
22
+ success?: string;
23
+ /**
24
+ * Size of the editor
25
+ * @default theme.defaultSize
26
+ */
27
+ size?: Size;
28
+ /**
29
+ * If true, editor will take full width of its container
30
+ * @default true
31
+ */
32
+ fullWidth?: boolean;
33
+ /**
34
+ * If true, shows a clear button when editor has content
35
+ * @default false
36
+ */
37
+ clearable?: boolean;
38
+ /**
39
+ * Callback fired when clear button is clicked
40
+ */
41
+ onClear?: () => void;
42
+ /**
43
+ * If true, shows a character counter below the editor
44
+ * @default false
45
+ */
46
+ showCount?: boolean;
47
+ /**
48
+ * Maximum character length
49
+ */
50
+ maxLength?: number;
51
+ /**
52
+ * Custom class name for the wrapper element
53
+ */
54
+ wrapperClassName?: string;
55
+ /**
56
+ * Custom class name for the label element
57
+ */
58
+ labelClassName?: string;
59
+ /**
60
+ * Custom class name for the editor element itself
61
+ */
62
+ editorClassName?: string;
63
+ /**
64
+ * Custom class name for the toolbar
65
+ */
66
+ toolbarClassName?: string;
67
+ /**
68
+ * If true, the field is required
69
+ */
70
+ required?: boolean;
71
+ /**
72
+ * If true, the editor is disabled
73
+ */
74
+ disabled?: boolean;
75
+ /**
76
+ * Placeholder text
77
+ */
78
+ placeholder?: string;
79
+ /**
80
+ * HTML content of the editor
81
+ */
82
+ value?: string;
83
+ /**
84
+ * Default HTML content
85
+ */
86
+ defaultValue?: string;
87
+ /**
88
+ * Callback fired when content changes
89
+ */
90
+ onChange?: (html: string, text: string) => void;
91
+ /**
92
+ * Minimum height of the editor area in pixels
93
+ * @default 200
94
+ */
95
+ minHeight?: number;
96
+ /**
97
+ * Custom id for the editor
98
+ */
99
+ id?: string;
100
+ /**
101
+ * If true, hides the toolbar
102
+ * @default false
103
+ */
104
+ hideToolbar?: boolean;
105
+ /**
106
+ * Custom toolbar buttons to show
107
+ * @default all buttons
108
+ */
109
+ toolbarButtons?: ToolbarButton[];
110
+ }
111
+ export type ToolbarButton = 'bold' | 'italic' | 'underline' | 'strikethrough' | 'h1' | 'h2' | 'h3' | 'orderedList' | 'unorderedList' | 'link' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'code' | 'clearFormat' | 'undo' | 'redo';
112
+ /**
113
+ * RichTextEditor component - A WYSIWYG text editor with formatting toolbar
114
+ *
115
+ * A comprehensive rich text editor with support for text formatting, lists, links,
116
+ * alignment, and character counting.
117
+ *
118
+ * @example
119
+ * Basic usage
120
+ * ```tsx
121
+ * <RichTextEditor
122
+ * label="Article Content"
123
+ * placeholder="Start writing..."
124
+ * onChange={(html, text) => setContent(html)}
125
+ * />
126
+ * ```
127
+ *
128
+ * @example
129
+ * With character limit
130
+ * ```tsx
131
+ * <RichTextEditor
132
+ * label="Description"
133
+ * maxLength={500}
134
+ * showCount
135
+ * value={description}
136
+ * onChange={(html, text) => setDescription(html)}
137
+ * />
138
+ * ```
139
+ *
140
+ * @example
141
+ * With validation
142
+ * ```tsx
143
+ * <RichTextEditor
144
+ * label="Comment"
145
+ * required
146
+ * error={error}
147
+ * value={comment}
148
+ * onChange={(html, text) => handleChange(html, text)}
149
+ * />
150
+ * ```
151
+ */
152
+ declare const RichTextEditor: React.ForwardRefExoticComponent<RichTextEditorProps & React.RefAttributes<HTMLDivElement>>;
153
+ export default RichTextEditor;
@@ -0,0 +1,2 @@
1
+ export { default as RichTextEditor } from './RichTextEditor';
2
+ export type { RichTextEditorProps, ToolbarButton } from './RichTextEditor';
@@ -22,10 +22,16 @@ export interface TextProps extends Omit<React.HTMLAttributes<HTMLElement>, 'colo
22
22
  */
23
23
  align?: TextAlign;
24
24
  /**
25
- * Text color - accepts CSS color values or theme color tokens
26
- * Examples: 'primary.500', '#000', 'rgb(0,0,0)', 'neutral.700'
25
+ * Semantic text color - applies predefined theme colors via CSS classes
26
+ * Examples: 'primary', 'secondary', 'success', 'error', 'warning', 'info'
27
27
  */
28
- color?: string;
28
+ color?: 'primary' | 'secondary' | 'success' | 'error' | 'warning' | 'info' | 'inherit';
29
+ /**
30
+ * Direct text color override - accepts any CSS color value
31
+ * Examples: '#000', 'rgb(0,0,0)', '#primary.500'
32
+ * Overrides semantic color if both are provided
33
+ */
34
+ textColor?: string;
29
35
  /**
30
36
  * Font weight override
31
37
  */
@@ -0,0 +1,81 @@
1
+ import React, { TextareaHTMLAttributes } from 'react';
2
+ import { Size } from '../../theme';
3
+ import './Textarea.css';
4
+ export interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'> {
5
+ /**
6
+ * Label text displayed above the textarea
7
+ */
8
+ label?: string;
9
+ /**
10
+ * Helper text displayed below the textarea
11
+ * Provides additional context or instructions
12
+ */
13
+ helperText?: string;
14
+ /**
15
+ * Error message - when provided, textarea is shown in error state
16
+ * Takes precedence over helperText when both are present
17
+ */
18
+ error?: string;
19
+ /**
20
+ * Success message - when provided, textarea is shown in success state
21
+ */
22
+ success?: string;
23
+ /**
24
+ * Size of the textarea
25
+ * @default theme.defaultSize
26
+ */
27
+ size?: Size;
28
+ /**
29
+ * If true, textarea will take full width of its container
30
+ * @default true
31
+ */
32
+ fullWidth?: boolean;
33
+ /**
34
+ * If true, shows a clear button when textarea has value
35
+ * @default false
36
+ */
37
+ clearable?: boolean;
38
+ /**
39
+ * Callback fired when clear button is clicked
40
+ */
41
+ onClear?: () => void;
42
+ /**
43
+ * If true, shows a character counter below the textarea
44
+ * When maxLength is provided, it automatically shows the counter
45
+ * @default false
46
+ */
47
+ showCount?: boolean;
48
+ /**
49
+ * Custom class name for the wrapper element
50
+ */
51
+ wrapperClassName?: string;
52
+ /**
53
+ * Custom class name for the label element
54
+ */
55
+ labelClassName?: string;
56
+ /**
57
+ * Custom class name for the textarea element itself
58
+ */
59
+ textareaClassName?: string;
60
+ /**
61
+ * If true, textarea will automatically grow in height based on content
62
+ * @default false
63
+ */
64
+ autoResize?: boolean;
65
+ /**
66
+ * Minimum number of rows to display
67
+ * @default 3
68
+ */
69
+ minRows?: number;
70
+ /**
71
+ * Maximum number of rows to display (only used with autoResize)
72
+ */
73
+ maxRows?: number;
74
+ }
75
+ declare const TextareaWithParsedClasses: {
76
+ (props: TextareaProps & React.RefAttributes<HTMLTextAreaElement>): import("react/jsx-runtime").JSX.Element;
77
+ displayName: string;
78
+ };
79
+ declare const _default: React.FC<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
80
+ export default _default;
81
+ export { TextareaWithParsedClasses as Textarea };
@@ -0,0 +1,3 @@
1
+ export { default as Textarea } from './Textarea';
2
+ export type { TextareaProps } from './Textarea';
3
+ export { Textarea as TextareaComponent } from './Textarea';
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { GridConfig } from './types';
3
+ interface IntelligentGridProps {
4
+ data: any[];
5
+ grid?: GridConfig;
6
+ renderItem: (item: any, index: number) => React.ReactNode;
7
+ className?: string;
8
+ }
9
+ export type { IntelligentGridProps };
10
+ /**
11
+ * Intelligent grid system that auto-adjusts based on data array length
12
+ * or uses explicit configuration
13
+ */
14
+ export declare const IntelligentGrid: React.FC<IntelligentGridProps>;
15
+ export default IntelligentGrid;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { WidgetConfig } from './types';
3
+ export interface WidgetProps {
4
+ config: WidgetConfig;
5
+ className?: string;
6
+ style?: React.CSSProperties;
7
+ }
8
+ declare const Widget: React.FC<WidgetProps>;
9
+ export default Widget;
@@ -0,0 +1,16 @@
1
+ export { default as Widget } from './Widget';
2
+ export type { WidgetProps } from './Widget';
3
+ export * from './types';
4
+ export { default as IntelligentGrid } from './IntelligentGrid';
5
+ export type { IntelligentGridProps } from './IntelligentGrid';
6
+ export { default as MetricWidget } from './renderers/MetricWidget';
7
+ export { default as InfoWidget } from './renderers/InfoWidget';
8
+ export { default as ProductWidget } from './renderers/ProductWidget';
9
+ export { default as OrderWidget } from './renderers/OrderWidget';
10
+ export { default as ListWidget } from './renderers/ListWidget';
11
+ export { default as TextWidget } from './renderers/TextWidget';
12
+ export { default as HeaderWidget } from './renderers/HeaderWidget';
13
+ export { default as CarouselWidget } from './renderers/CarouselWidget';
14
+ export { default as TestimonialWidget } from './renderers/TestimonialWidget';
15
+ export { default as GridCarouselWidget } from './renderers/GridCarouselWidget';
16
+ export type { GridCarouselWidgetProps } from './renderers/GridCarouselWidget';
@@ -0,0 +1,40 @@
1
+ import React from 'react';
2
+ import type { CarouselWidgetData, CarouselWidgetSettings } from '../types';
3
+ interface CarouselWidgetProps {
4
+ data: CarouselWidgetData;
5
+ settings?: CarouselWidgetSettings;
6
+ className?: string;
7
+ theme?: any;
8
+ variant?: any;
9
+ size?: any;
10
+ style?: React.CSSProperties;
11
+ borderRadius?: boolean;
12
+ /**
13
+ * Custom Carousel/Swiper component to use (e.g., Swiper, react-slick)
14
+ * @example
15
+ * import { Swiper, SwiperSlide } from 'swiper/react'
16
+ * <CarouselWidget carouselComponent={Swiper} slideComponent={SwiperSlide} />
17
+ */
18
+ carouselComponent?: React.ElementType;
19
+ /**
20
+ * Custom Slide component to use with the carousel
21
+ */
22
+ slideComponent?: React.ElementType;
23
+ /**
24
+ * Custom Image component to use (e.g., Next.js Image, native img)
25
+ * @example
26
+ * import Image from 'next/image'
27
+ * <CarouselWidget imageComponent={Image} />
28
+ */
29
+ imageComponent?: React.ElementType;
30
+ /**
31
+ * Props to pass to the carousel component
32
+ */
33
+ carouselProps?: Record<string, any>;
34
+ /**
35
+ * Props to pass to the image component
36
+ */
37
+ imageProps?: Record<string, any>;
38
+ }
39
+ declare const CarouselWidget: React.FC<CarouselWidgetProps>;
40
+ export default CarouselWidget;
@@ -0,0 +1,56 @@
1
+ import React from 'react';
2
+ import { ContentBlockWidgetData, WidgetTheme } from '../types';
3
+ export type ContentBlockLayout = 'media-left' | 'media-right' | 'split-equal' | 'media-top' | 'media-bottom' | 'media-background' | 'centered' | 'centered-media-top' | 'grid-2col' | 'grid-3col' | 'sidebar-left' | 'sidebar-right';
4
+ export interface ContentBlockWidgetSettings {
5
+ layout?: ContentBlockLayout;
6
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
7
+ mediaWidth?: '20%' | '30%' | '40%' | '50%' | '60%' | '70%' | 'auto';
8
+ contentWidth?: 'narrow' | 'medium' | 'wide' | 'full';
9
+ gap?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
10
+ padding?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
11
+ contentAlign?: 'left' | 'center' | 'right' | 'justify';
12
+ verticalAlign?: 'start' | 'center' | 'end' | 'stretch';
13
+ variant?: 'minimal' | 'card' | 'bordered' | 'elevated' | 'outlined' | 'flat';
14
+ rounded?: boolean | 'sm' | 'md' | 'lg' | 'xl' | 'full';
15
+ shadow?: boolean | 'sm' | 'md' | 'lg' | 'xl' | 'inner';
16
+ border?: boolean | 'all' | 'left' | 'right' | 'top' | 'bottom';
17
+ background?: {
18
+ color?: string;
19
+ gradient?: string;
20
+ opacity?: number;
21
+ };
22
+ overlay?: {
23
+ enabled: boolean;
24
+ color?: string;
25
+ opacity?: number;
26
+ blur?: number;
27
+ gradient?: 'top' | 'bottom' | 'center' | 'none';
28
+ };
29
+ grid?: {
30
+ columns?: number;
31
+ gap?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
32
+ minItemWidth?: string;
33
+ };
34
+ responsive?: {
35
+ stackOnMobile?: boolean;
36
+ stackOnTablet?: boolean;
37
+ reverseOnMobile?: boolean;
38
+ hideMediaOnMobile?: boolean;
39
+ };
40
+ hover?: {
41
+ enabled?: boolean;
42
+ effect?: 'lift' | 'glow' | 'scale' | 'none';
43
+ mediaZoom?: boolean;
44
+ };
45
+ animate?: boolean;
46
+ animationType?: 'fade' | 'slide-up' | 'slide-left' | 'slide-right' | 'zoom' | 'none';
47
+ }
48
+ export interface ContentBlockWidgetProps {
49
+ data: ContentBlockWidgetData;
50
+ settings?: ContentBlockWidgetSettings;
51
+ theme?: WidgetTheme;
52
+ className?: string;
53
+ style?: React.CSSProperties;
54
+ }
55
+ declare const ContentBlockWidget: React.FC<ContentBlockWidgetProps>;
56
+ export default ContentBlockWidget;
@@ -0,0 +1,24 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import Widget from '../Widget';
3
+ declare const meta: Meta<typeof Widget>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Widget>;
6
+ export declare const EcommerceProductShowcase: Story;
7
+ export declare const EcommerceProductGrid: Story;
8
+ export declare const EcommerceCategoryBanner: Story;
9
+ export declare const BlogFeaturedPost: Story;
10
+ export declare const BlogQuoteBlock: Story;
11
+ export declare const ServiceFeatureHighlight: Story;
12
+ export declare const ServiceTeamMember: Story;
13
+ export declare const ServiceAboutUs: Story;
14
+ export declare const ServiceProcessStep: Story;
15
+ export declare const SaaSFeature: Story;
16
+ export declare const SaaSPricingCard: Story;
17
+ export declare const SaaSCustomerTestimonial: Story;
18
+ export declare const PortfolioProject: Story;
19
+ export declare const CTABanner: Story;
20
+ export declare const SplitLayoutFeature: Story;
21
+ export declare const SidebarLayout: Story;
22
+ export declare const RealEstateProperty: Story;
23
+ export declare const MinimalInfoCard: Story;
24
+ export declare const CompactFeatureList: Story;