@qwickapps/react-framework 1.5.12 → 1.6.0
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/README.md +23 -0
- package/dist/components/blocks/ImageGallery.d.ts +30 -0
- package/dist/components/blocks/ImageGallery.d.ts.map +1 -0
- package/dist/components/blocks/OptionSelector.d.ts +45 -0
- package/dist/components/blocks/OptionSelector.d.ts.map +1 -0
- package/dist/components/blocks/index.d.ts +4 -0
- package/dist/components/blocks/index.d.ts.map +1 -1
- package/dist/components/forms/Captcha.d.ts +33 -28
- package/dist/components/forms/Captcha.d.ts.map +1 -1
- package/dist/components/forms/FormCheckbox.d.ts +15 -12
- package/dist/components/forms/FormCheckbox.d.ts.map +1 -1
- package/dist/components/forms/FormField.d.ts +20 -23
- package/dist/components/forms/FormField.d.ts.map +1 -1
- package/dist/components/forms/FormSelect.d.ts +16 -15
- package/dist/components/forms/FormSelect.d.ts.map +1 -1
- package/dist/hooks/useBaseProps.d.ts +27 -1172
- package/dist/hooks/useBaseProps.d.ts.map +1 -1
- package/dist/index.esm.js +1674 -554
- package/dist/index.js +1676 -552
- package/dist/palettes/manifest.json +19 -19
- package/dist/schemas/CaptchaSchema.d.ts +16 -0
- package/dist/schemas/CaptchaSchema.d.ts.map +1 -0
- package/dist/schemas/FormCheckboxSchema.d.ts +16 -0
- package/dist/schemas/FormCheckboxSchema.d.ts.map +1 -0
- package/dist/schemas/FormFieldSchema.d.ts +23 -0
- package/dist/schemas/FormFieldSchema.d.ts.map +1 -0
- package/dist/schemas/FormSelectSchema.d.ts +20 -0
- package/dist/schemas/FormSelectSchema.d.ts.map +1 -0
- package/dist/schemas/ImageGallerySchema.d.ts +27 -0
- package/dist/schemas/ImageGallerySchema.d.ts.map +1 -0
- package/dist/schemas/OptionSelectorSchema.d.ts +34 -0
- package/dist/schemas/OptionSelectorSchema.d.ts.map +1 -0
- package/dist/schemas/index.d.ts +6 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/blocks/Article.tsx +1 -1
- package/src/components/blocks/ImageGallery.tsx +464 -0
- package/src/components/blocks/OptionSelector.tsx +459 -0
- package/src/components/blocks/index.ts +4 -0
- package/src/components/forms/Captcha.tsx +57 -63
- package/src/components/forms/FormCheckbox.tsx +35 -43
- package/src/components/forms/FormField.tsx +50 -66
- package/src/components/forms/FormSelect.tsx +41 -49
- package/src/hooks/useBaseProps.ts +34 -1
- package/src/schemas/CaptchaSchema.ts +65 -0
- package/src/schemas/FormCheckboxSchema.ts +65 -0
- package/src/schemas/FormFieldSchema.ts +140 -0
- package/src/schemas/FormSelectSchema.ts +108 -0
- package/src/schemas/ImageGallerySchema.ts +148 -0
- package/src/schemas/OptionSelectorSchema.ts +216 -0
- package/src/schemas/index.ts +6 -0
- package/src/stories/ImageGallery.stories.tsx +497 -0
- package/src/stories/OptionSelector.stories.tsx +506 -0
- /package/dist/palettes/{palette-autumn.1.5.12.css → palette-autumn.1.6.0.css} +0 -0
- /package/dist/palettes/{palette-autumn.1.5.12.min.css → palette-autumn.1.6.0.min.css} +0 -0
- /package/dist/palettes/{palette-cosmic.1.5.12.css → palette-cosmic.1.6.0.css} +0 -0
- /package/dist/palettes/{palette-cosmic.1.5.12.min.css → palette-cosmic.1.6.0.min.css} +0 -0
- /package/dist/palettes/{palette-default.1.5.12.css → palette-default.1.6.0.css} +0 -0
- /package/dist/palettes/{palette-default.1.5.12.min.css → palette-default.1.6.0.min.css} +0 -0
- /package/dist/palettes/{palette-ocean.1.5.12.css → palette-ocean.1.6.0.css} +0 -0
- /package/dist/palettes/{palette-ocean.1.5.12.min.css → palette-ocean.1.6.0.min.css} +0 -0
- /package/dist/palettes/{palette-spring.1.5.12.css → palette-spring.1.6.0.css} +0 -0
- /package/dist/palettes/{palette-spring.1.5.12.min.css → palette-spring.1.6.0.min.css} +0 -0
- /package/dist/palettes/{palette-winter.1.5.12.css → palette-winter.1.6.0.css} +0 -0
- /package/dist/palettes/{palette-winter.1.5.12.min.css → palette-winter.1.6.0.min.css} +0 -0
|
@@ -0,0 +1,497 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ImageGallery Component Stories - Image gallery with multiple view variants
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { Box, Typography } from '@mui/material';
|
|
8
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
9
|
+
import { ImageGallery } from '../components/blocks/ImageGallery';
|
|
10
|
+
import QwickApp from '../components/QwickApp';
|
|
11
|
+
|
|
12
|
+
// Sample product images
|
|
13
|
+
const sampleImages = [
|
|
14
|
+
{
|
|
15
|
+
url: 'https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=800&h=800&fit=crop',
|
|
16
|
+
alt: 'Premium wristwatch - front view',
|
|
17
|
+
thumbnail: 'https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=100&h=100&fit=crop',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
url: 'https://images.unsplash.com/photo-1526170375885-4d8ecf77b99f?w=800&h=800&fit=crop',
|
|
21
|
+
alt: 'Premium wristwatch - side view',
|
|
22
|
+
thumbnail: 'https://images.unsplash.com/photo-1526170375885-4d8ecf77b99f?w=100&h=100&fit=crop',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
url: 'https://images.unsplash.com/photo-1542291026-7eec264c27ff?w=800&h=800&fit=crop',
|
|
26
|
+
alt: 'Premium sneakers - top view',
|
|
27
|
+
thumbnail: 'https://images.unsplash.com/photo-1542291026-7eec264c27ff?w=100&h=100&fit=crop',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
url: 'https://images.unsplash.com/photo-1606107557195-0e29a4b5b4aa?w=800&h=800&fit=crop',
|
|
31
|
+
alt: 'Premium sneakers - side view',
|
|
32
|
+
thumbnail: 'https://images.unsplash.com/photo-1606107557195-0e29a4b5b4aa?w=100&h=100&fit=crop',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
url: 'https://images.unsplash.com/photo-1560769629-975ec94e6a86?w=800&h=800&fit=crop',
|
|
36
|
+
alt: 'Premium sneakers - detail shot',
|
|
37
|
+
thumbnail: 'https://images.unsplash.com/photo-1560769629-975ec94e6a86?w=100&h=100&fit=crop',
|
|
38
|
+
},
|
|
39
|
+
];
|
|
40
|
+
|
|
41
|
+
const sampleImagesWide = [
|
|
42
|
+
{
|
|
43
|
+
url: 'https://images.unsplash.com/photo-1505740420928-5e560c06d30e?w=1200&h=800&fit=crop',
|
|
44
|
+
alt: 'Premium headphones - studio shot',
|
|
45
|
+
thumbnail: 'https://images.unsplash.com/photo-1505740420928-5e560c06d30e?w=100&h=100&fit=crop',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
url: 'https://images.unsplash.com/photo-1484704849700-f032a568e944?w=1200&h=800&fit=crop',
|
|
49
|
+
alt: 'Premium headphones - lifestyle',
|
|
50
|
+
thumbnail: 'https://images.unsplash.com/photo-1484704849700-f032a568e944?w=100&h=100&fit=crop',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
url: 'https://images.unsplash.com/photo-1590658268037-6bf12165a8df?w=1200&h=800&fit=crop',
|
|
54
|
+
alt: 'Premium headphones - detail',
|
|
55
|
+
thumbnail: 'https://images.unsplash.com/photo-1590658268037-6bf12165a8df?w=100&h=100&fit=crop',
|
|
56
|
+
},
|
|
57
|
+
];
|
|
58
|
+
|
|
59
|
+
const meta = {
|
|
60
|
+
title: 'Blocks/ImageGallery',
|
|
61
|
+
component: ImageGallery,
|
|
62
|
+
parameters: {
|
|
63
|
+
layout: 'padded',
|
|
64
|
+
docs: {
|
|
65
|
+
description: {
|
|
66
|
+
component: `ImageGallery is a comprehensive image gallery component designed for any content with multiple display variants.
|
|
67
|
+
|
|
68
|
+
**Key Features:**
|
|
69
|
+
- **Multiple Variants**: Thumbnails, carousel, and grid display modes
|
|
70
|
+
- **Flexible Thumbnail Position**: Left, bottom, or right (for thumbnails variant)
|
|
71
|
+
- **Image Zoom Modal**: Full-screen image viewing with zoom functionality
|
|
72
|
+
- **Responsive Design**: Adapts seamlessly to all screen sizes
|
|
73
|
+
- **Theme Compliant**: Uses CSS custom properties for perfect dark/light mode support
|
|
74
|
+
- **Accessibility**: Proper ARIA labels and keyboard navigation
|
|
75
|
+
- **Customizable Aspect Ratio**: Control main image proportions
|
|
76
|
+
|
|
77
|
+
**Perfect For:**
|
|
78
|
+
- E-commerce any content
|
|
79
|
+
- Portfolio showcases
|
|
80
|
+
- Image-heavy content
|
|
81
|
+
- Product catalogs
|
|
82
|
+
- Real estate listings`,
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
tags: ['autodocs'],
|
|
87
|
+
} satisfies Meta<typeof ImageGallery>;
|
|
88
|
+
|
|
89
|
+
export default meta;
|
|
90
|
+
type Story = StoryObj<typeof ImageGallery>;
|
|
91
|
+
|
|
92
|
+
// Thumbnails Variant Stories
|
|
93
|
+
export const ThumbnailsLeft: Story = {
|
|
94
|
+
render: () => (
|
|
95
|
+
<QwickApp appId="product-gallery-thumbnails-left" appName="Thumbnails Left">
|
|
96
|
+
<ImageGallery
|
|
97
|
+
images={sampleImages}
|
|
98
|
+
productName="Premium Wristwatch"
|
|
99
|
+
variant="thumbnails"
|
|
100
|
+
thumbnailPosition="left"
|
|
101
|
+
aspectRatio="1"
|
|
102
|
+
showZoom={true}
|
|
103
|
+
/>
|
|
104
|
+
</QwickApp>
|
|
105
|
+
),
|
|
106
|
+
parameters: {
|
|
107
|
+
docs: {
|
|
108
|
+
description: {
|
|
109
|
+
story: 'Classic product gallery with thumbnails on the left side - ideal for desktop layouts.',
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export const ThumbnailsBottom: Story = {
|
|
116
|
+
render: () => (
|
|
117
|
+
<QwickApp appId="product-gallery-thumbnails-bottom" appName="Thumbnails Bottom">
|
|
118
|
+
<ImageGallery
|
|
119
|
+
images={sampleImages}
|
|
120
|
+
productName="Premium Sneakers"
|
|
121
|
+
variant="thumbnails"
|
|
122
|
+
thumbnailPosition="bottom"
|
|
123
|
+
aspectRatio="1"
|
|
124
|
+
showZoom={true}
|
|
125
|
+
/>
|
|
126
|
+
</QwickApp>
|
|
127
|
+
),
|
|
128
|
+
parameters: {
|
|
129
|
+
docs: {
|
|
130
|
+
description: {
|
|
131
|
+
story: 'Product gallery with thumbnails at the bottom - great for mobile-first designs.',
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
export const ThumbnailsRight: Story = {
|
|
138
|
+
render: () => (
|
|
139
|
+
<QwickApp appId="product-gallery-thumbnails-right" appName="Thumbnails Right">
|
|
140
|
+
<ImageGallery
|
|
141
|
+
images={sampleImages}
|
|
142
|
+
productName="Premium Headphones"
|
|
143
|
+
variant="thumbnails"
|
|
144
|
+
thumbnailPosition="right"
|
|
145
|
+
aspectRatio="1"
|
|
146
|
+
showZoom={true}
|
|
147
|
+
/>
|
|
148
|
+
</QwickApp>
|
|
149
|
+
),
|
|
150
|
+
parameters: {
|
|
151
|
+
docs: {
|
|
152
|
+
description: {
|
|
153
|
+
story: 'Product gallery with thumbnails on the right side - alternative desktop layout.',
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
// Carousel Variant
|
|
160
|
+
export const Carousel: Story = {
|
|
161
|
+
render: () => (
|
|
162
|
+
<QwickApp appId="product-gallery-carousel" appName="Carousel View">
|
|
163
|
+
<ImageGallery
|
|
164
|
+
images={sampleImages}
|
|
165
|
+
productName="Premium Watch Collection"
|
|
166
|
+
variant="carousel"
|
|
167
|
+
aspectRatio="1"
|
|
168
|
+
showZoom={true}
|
|
169
|
+
/>
|
|
170
|
+
</QwickApp>
|
|
171
|
+
),
|
|
172
|
+
parameters: {
|
|
173
|
+
docs: {
|
|
174
|
+
description: {
|
|
175
|
+
story: 'Carousel mode with navigation arrows and dot indicators - perfect for mobile experiences.',
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
// Grid Variant
|
|
182
|
+
export const GridView: Story = {
|
|
183
|
+
render: () => (
|
|
184
|
+
<QwickApp appId="product-gallery-grid" appName="Grid View">
|
|
185
|
+
<ImageGallery
|
|
186
|
+
images={sampleImages}
|
|
187
|
+
productName="Product Image Collection"
|
|
188
|
+
variant="grid"
|
|
189
|
+
showZoom={true}
|
|
190
|
+
/>
|
|
191
|
+
</QwickApp>
|
|
192
|
+
),
|
|
193
|
+
parameters: {
|
|
194
|
+
docs: {
|
|
195
|
+
description: {
|
|
196
|
+
story: 'Grid layout showing all images at once - ideal for showcasing multiple product angles.',
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
// Aspect Ratio Variations
|
|
203
|
+
export const AspectRatioSquare: Story = {
|
|
204
|
+
render: () => (
|
|
205
|
+
<QwickApp appId="product-gallery-square" appName="Square Aspect Ratio">
|
|
206
|
+
<ImageGallery
|
|
207
|
+
images={sampleImages}
|
|
208
|
+
productName="Square Product Images"
|
|
209
|
+
variant="thumbnails"
|
|
210
|
+
thumbnailPosition="left"
|
|
211
|
+
aspectRatio="1"
|
|
212
|
+
showZoom={true}
|
|
213
|
+
/>
|
|
214
|
+
</QwickApp>
|
|
215
|
+
),
|
|
216
|
+
parameters: {
|
|
217
|
+
docs: {
|
|
218
|
+
description: {
|
|
219
|
+
story: 'Square aspect ratio (1:1) - standard for most product images.',
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
export const AspectRatioWide: Story = {
|
|
226
|
+
render: () => (
|
|
227
|
+
<QwickApp appId="product-gallery-wide" appName="Wide Aspect Ratio">
|
|
228
|
+
<ImageGallery
|
|
229
|
+
images={sampleImagesWide}
|
|
230
|
+
productName="Wide Format Product"
|
|
231
|
+
variant="thumbnails"
|
|
232
|
+
thumbnailPosition="bottom"
|
|
233
|
+
aspectRatio="4/3"
|
|
234
|
+
showZoom={true}
|
|
235
|
+
/>
|
|
236
|
+
</QwickApp>
|
|
237
|
+
),
|
|
238
|
+
parameters: {
|
|
239
|
+
docs: {
|
|
240
|
+
description: {
|
|
241
|
+
story: 'Wide aspect ratio (4:3) - great for landscape product photography.',
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
export const AspectRatioUltraWide: Story = {
|
|
248
|
+
render: () => (
|
|
249
|
+
<QwickApp appId="product-gallery-ultrawide" appName="Ultra Wide Aspect Ratio">
|
|
250
|
+
<ImageGallery
|
|
251
|
+
images={sampleImagesWide}
|
|
252
|
+
productName="Ultra Wide Product"
|
|
253
|
+
variant="thumbnails"
|
|
254
|
+
thumbnailPosition="bottom"
|
|
255
|
+
aspectRatio="16/9"
|
|
256
|
+
showZoom={true}
|
|
257
|
+
/>
|
|
258
|
+
</QwickApp>
|
|
259
|
+
),
|
|
260
|
+
parameters: {
|
|
261
|
+
docs: {
|
|
262
|
+
description: {
|
|
263
|
+
story: 'Ultra-wide aspect ratio (16:9) - cinematic product presentation.',
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
// Zoom Control
|
|
270
|
+
export const WithoutZoom: Story = {
|
|
271
|
+
render: () => (
|
|
272
|
+
<QwickApp appId="product-gallery-no-zoom" appName="Without Zoom">
|
|
273
|
+
<ImageGallery
|
|
274
|
+
images={sampleImages}
|
|
275
|
+
productName="Product Without Zoom"
|
|
276
|
+
variant="thumbnails"
|
|
277
|
+
thumbnailPosition="left"
|
|
278
|
+
aspectRatio="1"
|
|
279
|
+
showZoom={false}
|
|
280
|
+
/>
|
|
281
|
+
</QwickApp>
|
|
282
|
+
),
|
|
283
|
+
parameters: {
|
|
284
|
+
docs: {
|
|
285
|
+
description: {
|
|
286
|
+
story: 'Gallery without zoom functionality - simpler interaction for smaller products.',
|
|
287
|
+
},
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
// Limited Images
|
|
293
|
+
export const LimitedImages: Story = {
|
|
294
|
+
render: () => (
|
|
295
|
+
<QwickApp appId="product-gallery-limited" appName="Limited Images">
|
|
296
|
+
<ImageGallery
|
|
297
|
+
images={sampleImages}
|
|
298
|
+
productName="Product with Image Limit"
|
|
299
|
+
variant="grid"
|
|
300
|
+
showZoom={true}
|
|
301
|
+
maxImages={3}
|
|
302
|
+
/>
|
|
303
|
+
</QwickApp>
|
|
304
|
+
),
|
|
305
|
+
parameters: {
|
|
306
|
+
docs: {
|
|
307
|
+
description: {
|
|
308
|
+
story: 'Gallery with maxImages prop limiting displayed images - useful for preview sections.',
|
|
309
|
+
},
|
|
310
|
+
},
|
|
311
|
+
},
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
// Single Image
|
|
315
|
+
export const SingleImage: Story = {
|
|
316
|
+
render: () => (
|
|
317
|
+
<QwickApp appId="product-gallery-single" appName="Single Image">
|
|
318
|
+
<ImageGallery
|
|
319
|
+
images={[sampleImages[0]]}
|
|
320
|
+
productName="Single Product Image"
|
|
321
|
+
variant="thumbnails"
|
|
322
|
+
thumbnailPosition="left"
|
|
323
|
+
aspectRatio="1"
|
|
324
|
+
showZoom={true}
|
|
325
|
+
/>
|
|
326
|
+
</QwickApp>
|
|
327
|
+
),
|
|
328
|
+
parameters: {
|
|
329
|
+
docs: {
|
|
330
|
+
description: {
|
|
331
|
+
story: 'Gallery with single image - gracefully handles minimal image sets.',
|
|
332
|
+
},
|
|
333
|
+
},
|
|
334
|
+
},
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
// Real-World E-commerce Example
|
|
338
|
+
export const EcommerceProductPage: Story = {
|
|
339
|
+
render: () => (
|
|
340
|
+
<QwickApp appId="product-gallery-ecommerce" appName="E-commerce Product Page">
|
|
341
|
+
<Box sx={{ maxWidth: 1200, mx: 'auto', p: 3 }}>
|
|
342
|
+
<Box sx={{ display: 'grid', gridTemplateColumns: { xs: '1fr', md: '1fr 1fr' }, gap: 4 }}>
|
|
343
|
+
{/* Image Gallery */}
|
|
344
|
+
<Box>
|
|
345
|
+
<ImageGallery
|
|
346
|
+
images={sampleImages}
|
|
347
|
+
productName="Premium Leather Sneakers"
|
|
348
|
+
variant="thumbnails"
|
|
349
|
+
thumbnailPosition="left"
|
|
350
|
+
aspectRatio="1"
|
|
351
|
+
showZoom={true}
|
|
352
|
+
/>
|
|
353
|
+
</Box>
|
|
354
|
+
|
|
355
|
+
{/* Product Details */}
|
|
356
|
+
<Box>
|
|
357
|
+
<Typography variant="overline" color="text.secondary">
|
|
358
|
+
PREMIUM COLLECTION
|
|
359
|
+
</Typography>
|
|
360
|
+
<Typography variant="h3" gutterBottom>
|
|
361
|
+
Premium Leather Sneakers
|
|
362
|
+
</Typography>
|
|
363
|
+
<Typography variant="h4" color="primary" gutterBottom>
|
|
364
|
+
$149.99
|
|
365
|
+
</Typography>
|
|
366
|
+
<Typography variant="body1" paragraph sx={{ color: 'text.secondary' }}>
|
|
367
|
+
Handcrafted premium leather sneakers with exceptional comfort and timeless style.
|
|
368
|
+
Perfect for both casual and semi-formal occasions.
|
|
369
|
+
</Typography>
|
|
370
|
+
<Typography variant="h6" gutterBottom sx={{ mt: 3 }}>
|
|
371
|
+
Product Features
|
|
372
|
+
</Typography>
|
|
373
|
+
<Box component="ul" sx={{ color: 'text.secondary' }}>
|
|
374
|
+
<li>100% genuine leather upper</li>
|
|
375
|
+
<li>Memory foam insole for all-day comfort</li>
|
|
376
|
+
<li>Durable rubber outsole</li>
|
|
377
|
+
<li>Hand-stitched details</li>
|
|
378
|
+
<li>Available in multiple colors</li>
|
|
379
|
+
</Box>
|
|
380
|
+
</Box>
|
|
381
|
+
</Box>
|
|
382
|
+
</Box>
|
|
383
|
+
</QwickApp>
|
|
384
|
+
),
|
|
385
|
+
parameters: {
|
|
386
|
+
docs: {
|
|
387
|
+
description: {
|
|
388
|
+
story: 'Real-world example showing ImageGallery in a complete e-commerce product page layout.',
|
|
389
|
+
},
|
|
390
|
+
},
|
|
391
|
+
},
|
|
392
|
+
};
|
|
393
|
+
|
|
394
|
+
// Responsive Comparison
|
|
395
|
+
export const ResponsiveComparison: Story = {
|
|
396
|
+
render: () => (
|
|
397
|
+
<QwickApp appId="product-gallery-responsive" appName="Responsive Comparison">
|
|
398
|
+
<Box>
|
|
399
|
+
<Box sx={{ p: 4, backgroundColor: 'background.paper', mb: 4 }}>
|
|
400
|
+
<Typography variant="h5" gutterBottom>
|
|
401
|
+
Responsive Behavior
|
|
402
|
+
</Typography>
|
|
403
|
+
<Typography variant="body1" sx={{ mb: 2, opacity: 0.8 }}>
|
|
404
|
+
ImageGallery automatically adapts to different screen sizes:
|
|
405
|
+
</Typography>
|
|
406
|
+
<Box component="ul" sx={{ opacity: 0.8 }}>
|
|
407
|
+
<li>Mobile: Thumbnails stack below main image</li>
|
|
408
|
+
<li>Tablet: Thumbnails appear beside or below based on position prop</li>
|
|
409
|
+
<li>Desktop: Full layout with optimal thumbnail positioning</li>
|
|
410
|
+
</Box>
|
|
411
|
+
</Box>
|
|
412
|
+
|
|
413
|
+
{/* Desktop Layout */}
|
|
414
|
+
<Box sx={{ mb: 6 }}>
|
|
415
|
+
<Typography variant="h6" gutterBottom>
|
|
416
|
+
Desktop Layout (Thumbnails Left)
|
|
417
|
+
</Typography>
|
|
418
|
+
<ImageGallery
|
|
419
|
+
images={sampleImages}
|
|
420
|
+
productName="Desktop Product View"
|
|
421
|
+
variant="thumbnails"
|
|
422
|
+
thumbnailPosition="left"
|
|
423
|
+
aspectRatio="1"
|
|
424
|
+
showZoom={true}
|
|
425
|
+
/>
|
|
426
|
+
</Box>
|
|
427
|
+
|
|
428
|
+
{/* Mobile-Optimized Layout */}
|
|
429
|
+
<Box>
|
|
430
|
+
<Typography variant="h6" gutterBottom>
|
|
431
|
+
Mobile-Optimized (Carousel)
|
|
432
|
+
</Typography>
|
|
433
|
+
<Box sx={{ maxWidth: 375, mx: 'auto' }}>
|
|
434
|
+
<ImageGallery
|
|
435
|
+
images={sampleImages}
|
|
436
|
+
productName="Mobile Product View"
|
|
437
|
+
variant="carousel"
|
|
438
|
+
aspectRatio="1"
|
|
439
|
+
showZoom={true}
|
|
440
|
+
/>
|
|
441
|
+
</Box>
|
|
442
|
+
</Box>
|
|
443
|
+
</Box>
|
|
444
|
+
</QwickApp>
|
|
445
|
+
),
|
|
446
|
+
parameters: {
|
|
447
|
+
docs: {
|
|
448
|
+
description: {
|
|
449
|
+
story: 'Comparison of different layouts optimized for various screen sizes and use cases.',
|
|
450
|
+
},
|
|
451
|
+
},
|
|
452
|
+
},
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
// Theme Compliance Demo
|
|
456
|
+
export const ThemeCompliance: Story = {
|
|
457
|
+
render: () => (
|
|
458
|
+
<QwickApp appId="product-gallery-theme" appName="Theme Compliance">
|
|
459
|
+
<Box>
|
|
460
|
+
<Box sx={{ p: 4, backgroundColor: 'background.paper', mb: 4 }}>
|
|
461
|
+
<Typography variant="h5" gutterBottom>
|
|
462
|
+
Theme Compliance
|
|
463
|
+
</Typography>
|
|
464
|
+
<Typography variant="body1" sx={{ mb: 2, opacity: 0.8 }}>
|
|
465
|
+
ImageGallery uses CSS custom properties exclusively for all styling:
|
|
466
|
+
</Typography>
|
|
467
|
+
<Box component="ul" sx={{ opacity: 0.8, fontFamily: 'monospace', fontSize: '0.875rem' }}>
|
|
468
|
+
<li>var(--theme-surface) - Background colors</li>
|
|
469
|
+
<li>var(--theme-border-main) - Border colors</li>
|
|
470
|
+
<li>var(--theme-primary) - Selected states</li>
|
|
471
|
+
<li>var(--theme-border-radius) - Border radius</li>
|
|
472
|
+
<li>var(--theme-elevation-1) - Shadows</li>
|
|
473
|
+
</Box>
|
|
474
|
+
<Typography variant="body2" sx={{ mt: 2, opacity: 0.7 }}>
|
|
475
|
+
Try switching between light and dark modes to see seamless theme integration!
|
|
476
|
+
</Typography>
|
|
477
|
+
</Box>
|
|
478
|
+
|
|
479
|
+
<ImageGallery
|
|
480
|
+
images={sampleImages}
|
|
481
|
+
productName="Theme-Compliant Product"
|
|
482
|
+
variant="thumbnails"
|
|
483
|
+
thumbnailPosition="left"
|
|
484
|
+
aspectRatio="1"
|
|
485
|
+
showZoom={true}
|
|
486
|
+
/>
|
|
487
|
+
</Box>
|
|
488
|
+
</QwickApp>
|
|
489
|
+
),
|
|
490
|
+
parameters: {
|
|
491
|
+
docs: {
|
|
492
|
+
description: {
|
|
493
|
+
story: 'Demonstrates theme compliance with CSS custom properties for perfect light/dark mode support.',
|
|
494
|
+
},
|
|
495
|
+
},
|
|
496
|
+
},
|
|
497
|
+
};
|