@qwickapps/react-framework 1.7.0 → 1.8.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.map +1 -1
- package/dist/components/blocks/OptionSelector.d.ts.map +1 -1
- package/dist/components/blocks/ProductCard.d.ts +10 -2
- package/dist/components/blocks/ProductCard.d.ts.map +1 -1
- package/dist/components/forms/FormCheckbox.d.ts.map +1 -1
- package/dist/components/forms/FormField.d.ts.map +1 -1
- package/dist/components/forms/FormSelect.d.ts.map +1 -1
- package/dist/index.esm.js +257 -31
- package/dist/index.js +256 -30
- package/dist/palettes/manifest.json +22 -22
- package/package.json +1 -1
- package/src/components/blocks/ImageGallery.tsx +6 -5
- package/src/components/blocks/OptionSelector.tsx +18 -3
- package/src/components/blocks/ProductCard.tsx +283 -84
- package/src/components/forms/FormCheckbox.tsx +15 -0
- package/src/components/forms/FormField.tsx +15 -0
- package/src/components/forms/FormSelect.tsx +15 -0
- package/src/stories/ProductCard.stories.tsx +151 -1
- /package/dist/palettes/{palette-autumn.1.7.0.css → palette-autumn.1.8.0.css} +0 -0
- /package/dist/palettes/{palette-autumn.1.7.0.min.css → palette-autumn.1.8.0.min.css} +0 -0
- /package/dist/palettes/{palette-boutique.1.7.0.css → palette-boutique.1.8.0.css} +0 -0
- /package/dist/palettes/{palette-boutique.1.7.0.min.css → palette-boutique.1.8.0.min.css} +0 -0
- /package/dist/palettes/{palette-cosmic.1.7.0.css → palette-cosmic.1.8.0.css} +0 -0
- /package/dist/palettes/{palette-cosmic.1.7.0.min.css → palette-cosmic.1.8.0.min.css} +0 -0
- /package/dist/palettes/{palette-default.1.7.0.css → palette-default.1.8.0.css} +0 -0
- /package/dist/palettes/{palette-default.1.7.0.min.css → palette-default.1.8.0.min.css} +0 -0
- /package/dist/palettes/{palette-ocean.1.7.0.css → palette-ocean.1.8.0.css} +0 -0
- /package/dist/palettes/{palette-ocean.1.7.0.min.css → palette-ocean.1.8.0.min.css} +0 -0
- /package/dist/palettes/{palette-spring.1.7.0.css → palette-spring.1.8.0.css} +0 -0
- /package/dist/palettes/{palette-spring.1.7.0.min.css → palette-spring.1.8.0.min.css} +0 -0
- /package/dist/palettes/{palette-winter.1.7.0.css → palette-winter.1.8.0.css} +0 -0
- /package/dist/palettes/{palette-winter.1.7.0.min.css → palette-winter.1.8.0.min.css} +0 -0
|
@@ -13,7 +13,7 @@ import { ProductCard } from '../components/blocks/ProductCard';
|
|
|
13
13
|
import { GridLayout } from '../components/layout';
|
|
14
14
|
import QwickApp from '../components/QwickApp';
|
|
15
15
|
|
|
16
|
-
// Sample product data
|
|
16
|
+
// Sample software product data
|
|
17
17
|
const sampleProducts: Product[] = [
|
|
18
18
|
{
|
|
19
19
|
id: 'qwickapps-react-framework',
|
|
@@ -70,6 +70,58 @@ const sampleProducts: Product[] = [
|
|
|
70
70
|
}
|
|
71
71
|
];
|
|
72
72
|
|
|
73
|
+
// Sample e-commerce product data
|
|
74
|
+
const sampleEcommerceProducts: Product[] = [
|
|
75
|
+
{
|
|
76
|
+
id: 'organic-cotton-tshirt',
|
|
77
|
+
name: 'Organic Cotton T-Shirt',
|
|
78
|
+
category: 'Mens Clothing',
|
|
79
|
+
description: 'Premium organic cotton t-shirt with sustainable manufacturing',
|
|
80
|
+
status: 'launched',
|
|
81
|
+
image: 'https://via.placeholder.com/400x280/4caf50/ffffff?text=Organic+T-Shirt',
|
|
82
|
+
price: 29.99,
|
|
83
|
+
rating: 4.5,
|
|
84
|
+
reviewCount: 128,
|
|
85
|
+
isNew: true
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: 'denim-jacket',
|
|
89
|
+
name: 'Classic Denim Jacket',
|
|
90
|
+
category: 'Outerwear',
|
|
91
|
+
description: 'Timeless denim jacket with modern fit',
|
|
92
|
+
status: 'launched',
|
|
93
|
+
image: 'https://via.placeholder.com/400x280/2196f3/ffffff?text=Denim+Jacket',
|
|
94
|
+
price: 89.99,
|
|
95
|
+
salePrice: 67.49,
|
|
96
|
+
rating: 4.8,
|
|
97
|
+
reviewCount: 256
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: 'running-shoes',
|
|
101
|
+
name: 'Performance Running Shoes',
|
|
102
|
+
category: 'Footwear',
|
|
103
|
+
description: 'Lightweight running shoes with advanced cushioning',
|
|
104
|
+
status: 'launched',
|
|
105
|
+
image: 'https://via.placeholder.com/400x280/ff5722/ffffff?text=Running+Shoes',
|
|
106
|
+
price: 119.99,
|
|
107
|
+
rating: 4.6,
|
|
108
|
+
reviewCount: 89,
|
|
109
|
+
isNew: true
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
id: 'leather-wallet',
|
|
113
|
+
name: 'Genuine Leather Wallet',
|
|
114
|
+
category: 'Accessories',
|
|
115
|
+
description: 'Handcrafted leather wallet with RFID protection',
|
|
116
|
+
status: 'launched',
|
|
117
|
+
image: 'https://via.placeholder.com/400x280/795548/ffffff?text=Leather+Wallet',
|
|
118
|
+
price: 45.00,
|
|
119
|
+
salePrice: 36.00,
|
|
120
|
+
rating: 4.9,
|
|
121
|
+
reviewCount: 342
|
|
122
|
+
}
|
|
123
|
+
];
|
|
124
|
+
|
|
73
125
|
// Sample CMS data for data binding stories
|
|
74
126
|
const sampleCmsData = {
|
|
75
127
|
'products': {
|
|
@@ -501,4 +553,102 @@ export const EmptyAndLoadingStates: Story = {
|
|
|
501
553
|
},
|
|
502
554
|
},
|
|
503
555
|
},
|
|
556
|
+
};
|
|
557
|
+
|
|
558
|
+
// E-commerce Product Examples
|
|
559
|
+
export const EcommerceProducts: Story = {
|
|
560
|
+
render: () => (
|
|
561
|
+
<QwickApp appId="productcard-ecommerce" appName='E-commerce ProductCard'>
|
|
562
|
+
<Box>
|
|
563
|
+
<Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
|
|
564
|
+
<Typography variant="h5" gutterBottom>🛍️ E-commerce Products</Typography>
|
|
565
|
+
<Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
|
|
566
|
+
ProductCard automatically detects e-commerce products (those with price field) and renders appropriate layout with price, rating, and badges.
|
|
567
|
+
</Typography>
|
|
568
|
+
</Box>
|
|
569
|
+
|
|
570
|
+
<GridLayout columns={4} spacing="large" equalHeight>
|
|
571
|
+
{sampleEcommerceProducts.map((product) => (
|
|
572
|
+
<ProductCard
|
|
573
|
+
key={product.id}
|
|
574
|
+
product={product}
|
|
575
|
+
variant="compact"
|
|
576
|
+
/>
|
|
577
|
+
))}
|
|
578
|
+
</GridLayout>
|
|
579
|
+
</Box>
|
|
580
|
+
</QwickApp>
|
|
581
|
+
),
|
|
582
|
+
parameters: {
|
|
583
|
+
docs: {
|
|
584
|
+
description: {
|
|
585
|
+
story: 'E-commerce products display price, rating, category badge, and NEW/discount badges automatically.',
|
|
586
|
+
},
|
|
587
|
+
},
|
|
588
|
+
},
|
|
589
|
+
};
|
|
590
|
+
|
|
591
|
+
export const EcommerceDetailed: Story = {
|
|
592
|
+
render: () => (
|
|
593
|
+
<QwickApp appId="productcard-ecommerce-detailed" appName='Detailed E-commerce ProductCard'>
|
|
594
|
+
<Box>
|
|
595
|
+
<Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
|
|
596
|
+
<Typography variant="h5" gutterBottom>Detailed E-commerce View</Typography>
|
|
597
|
+
<Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
|
|
598
|
+
Detailed variant for e-commerce products.
|
|
599
|
+
</Typography>
|
|
600
|
+
</Box>
|
|
601
|
+
|
|
602
|
+
<ProductCard
|
|
603
|
+
product={sampleEcommerceProducts[1]}
|
|
604
|
+
variant="detailed"
|
|
605
|
+
/>
|
|
606
|
+
</Box>
|
|
607
|
+
</QwickApp>
|
|
608
|
+
),
|
|
609
|
+
parameters: {
|
|
610
|
+
docs: {
|
|
611
|
+
description: {
|
|
612
|
+
story: 'Detailed e-commerce product showing sale price with discount badge.',
|
|
613
|
+
},
|
|
614
|
+
},
|
|
615
|
+
},
|
|
616
|
+
};
|
|
617
|
+
|
|
618
|
+
export const MixedProductTypes: Story = {
|
|
619
|
+
render: () => (
|
|
620
|
+
<QwickApp appId="productcard-mixed" appName='Mixed Product Types'>
|
|
621
|
+
<Box>
|
|
622
|
+
<Box sx={{ p: 4, backgroundColor: 'background.paper' }}>
|
|
623
|
+
<Typography variant="h5" gutterBottom>🔀 Mixed Product Types</Typography>
|
|
624
|
+
<Typography variant="body1" sx={{ mb: 3, opacity: 0.8 }}>
|
|
625
|
+
ProductCard seamlessly handles both software and e-commerce products in the same grid.
|
|
626
|
+
</Typography>
|
|
627
|
+
</Box>
|
|
628
|
+
|
|
629
|
+
<GridLayout columns={3} spacing="large" equalHeight>
|
|
630
|
+
<ProductCard
|
|
631
|
+
product={sampleProducts[0]}
|
|
632
|
+
variant="compact"
|
|
633
|
+
maxFeaturesCompact={2}
|
|
634
|
+
/>
|
|
635
|
+
<ProductCard
|
|
636
|
+
product={sampleEcommerceProducts[0]}
|
|
637
|
+
variant="compact"
|
|
638
|
+
/>
|
|
639
|
+
<ProductCard
|
|
640
|
+
product={sampleEcommerceProducts[1]}
|
|
641
|
+
variant="compact"
|
|
642
|
+
/>
|
|
643
|
+
</GridLayout>
|
|
644
|
+
</Box>
|
|
645
|
+
</QwickApp>
|
|
646
|
+
),
|
|
647
|
+
parameters: {
|
|
648
|
+
docs: {
|
|
649
|
+
description: {
|
|
650
|
+
story: 'Software products show features/technologies while e-commerce products show price/rating - all using the same ProductCard component.',
|
|
651
|
+
},
|
|
652
|
+
},
|
|
653
|
+
},
|
|
504
654
|
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|