@qwickapps/react-framework 1.7.1 → 1.8.1
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 +9 -0
- package/dist/components/QwickIcon.d.ts +1 -1
- package/dist/components/QwickIcon.d.ts.map +1 -1
- package/dist/components/blocks/HeroSlideshow.d.ts +54 -0
- package/dist/components/blocks/HeroSlideshow.d.ts.map +1 -0
- package/dist/components/blocks/ProductCard.d.ts +10 -2
- package/dist/components/blocks/ProductCard.d.ts.map +1 -1
- package/dist/components/blocks/index.d.ts +2 -0
- package/dist/components/blocks/index.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.js +316 -47
- package/dist/index.js +315 -45
- package/dist/palettes/manifest.json +22 -22
- package/dist/schemas/transformers/ComponentTransformer.d.ts.map +1 -1
- package/package.json +19 -21
- package/scripts/build-palettes.cjs +0 -0
- package/scripts/create-project.sh +0 -0
- package/src/assets/qwick-icon.svg +11 -0
- package/src/components/QwickApp.css +2 -2
- package/src/components/QwickIcon.tsx +26 -21
- package/src/components/blocks/HeroSlideshow.tsx +156 -0
- package/src/components/blocks/ProductCard.tsx +283 -84
- package/src/components/blocks/index.ts +2 -0
- package/src/components/layout/GridCellWrapper.tsx +4 -4
- package/src/schemas/transformers/ComponentTransformer.ts +7 -1
- package/src/schemas/transformers/ReactNodeTransformer.ts +1 -1
- package/src/stories/HeroSlideshow.stories.tsx +164 -0
- package/src/stories/ProductCard.stories.tsx +151 -1
- /package/dist/palettes/{palette-autumn.1.7.1.css → palette-autumn.1.8.1.css} +0 -0
- /package/dist/palettes/{palette-autumn.1.7.1.min.css → palette-autumn.1.8.1.min.css} +0 -0
- /package/dist/palettes/{palette-boutique.1.7.1.css → palette-boutique.1.8.1.css} +0 -0
- /package/dist/palettes/{palette-boutique.1.7.1.min.css → palette-boutique.1.8.1.min.css} +0 -0
- /package/dist/palettes/{palette-cosmic.1.7.1.css → palette-cosmic.1.8.1.css} +0 -0
- /package/dist/palettes/{palette-cosmic.1.7.1.min.css → palette-cosmic.1.8.1.min.css} +0 -0
- /package/dist/palettes/{palette-default.1.7.1.css → palette-default.1.8.1.css} +0 -0
- /package/dist/palettes/{palette-default.1.7.1.min.css → palette-default.1.8.1.min.css} +0 -0
- /package/dist/palettes/{palette-ocean.1.7.1.css → palette-ocean.1.8.1.css} +0 -0
- /package/dist/palettes/{palette-ocean.1.7.1.min.css → palette-ocean.1.8.1.min.css} +0 -0
- /package/dist/palettes/{palette-spring.1.7.1.css → palette-spring.1.8.1.css} +0 -0
- /package/dist/palettes/{palette-spring.1.7.1.min.css → palette-spring.1.8.1.min.css} +0 -0
- /package/dist/palettes/{palette-winter.1.7.1.css → palette-winter.1.8.1.css} +0 -0
- /package/dist/palettes/{palette-winter.1.7.1.min.css → palette-winter.1.8.1.min.css} +0 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HeroSlideshow Component Stories
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import QwickApp from '../components/QwickApp';
|
|
10
|
+
import { HeroSlideshow } from '../components/blocks';
|
|
11
|
+
import type { HeroSlide } from '../components/blocks/HeroSlideshow';
|
|
12
|
+
|
|
13
|
+
// ─── Shared slide sets ──────────────────────────────────────────────────────
|
|
14
|
+
|
|
15
|
+
const gradientSlides: HeroSlide[] = [
|
|
16
|
+
{
|
|
17
|
+
title: 'Build Apps 10x Faster',
|
|
18
|
+
subtitle: 'The most developer-friendly React framework. Production-ready in hours, not weeks.',
|
|
19
|
+
backgroundGradient: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
|
|
20
|
+
actions: [
|
|
21
|
+
{ label: 'Get Started', variant: 'primary', buttonSize: 'large' },
|
|
22
|
+
{ label: 'View Docs', variant: 'outlined', buttonSize: 'large' },
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
title: 'Schema-Driven Components',
|
|
27
|
+
subtitle: 'Define once in Payload CMS, render everywhere. Data binding built in.',
|
|
28
|
+
backgroundGradient: 'linear-gradient(135deg, #f093fb 0%, #f5576c 100%)',
|
|
29
|
+
actions: [
|
|
30
|
+
{ label: 'See Components', variant: 'primary', buttonSize: 'large' },
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
title: 'Ship With Confidence',
|
|
35
|
+
subtitle: 'Storybook-documented components, TypeScript-first, MUI-powered.',
|
|
36
|
+
backgroundGradient: 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)',
|
|
37
|
+
actions: [
|
|
38
|
+
{ label: 'Browse Storybook', variant: 'primary', buttonSize: 'large' },
|
|
39
|
+
{ label: 'GitHub', variant: 'text', buttonSize: 'large' },
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
const imageSlides: HeroSlide[] = [
|
|
45
|
+
{
|
|
46
|
+
title: 'Connect Talent with Opportunity',
|
|
47
|
+
subtitle: 'WorkMacha bridges restaurant owners and culinary students for short-term gigs.',
|
|
48
|
+
backgroundImage: 'https://images.unsplash.com/photo-1414235077428-338989a2e8c0?w=1400&q=80',
|
|
49
|
+
overlayOpacity: 0.55,
|
|
50
|
+
actions: [
|
|
51
|
+
{ label: 'Post a Job', variant: 'primary', buttonSize: 'large' },
|
|
52
|
+
{ label: 'Find Work', variant: 'outlined', buttonSize: 'large' },
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
title: 'Build Your Culinary Portfolio',
|
|
57
|
+
subtitle: 'Every gig you complete earns a verified certificate you can share with employers.',
|
|
58
|
+
backgroundImage: 'https://images.unsplash.com/photo-1556910103-1c02745aec4b?w=1400&q=80',
|
|
59
|
+
overlayOpacity: 0.55,
|
|
60
|
+
actions: [
|
|
61
|
+
{ label: 'Browse Jobs', variant: 'primary', buttonSize: 'large' },
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
title: 'Hire the Right Talent, Fast',
|
|
66
|
+
subtitle: 'Verified culinary students available for shifts, events, and pop-ups.',
|
|
67
|
+
backgroundImage: 'https://images.unsplash.com/photo-1590846406792-0adc7f938f1d?w=1400&q=80',
|
|
68
|
+
overlayOpacity: 0.5,
|
|
69
|
+
actions: [
|
|
70
|
+
{ label: 'Start Hiring', variant: 'primary', buttonSize: 'large' },
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
];
|
|
74
|
+
|
|
75
|
+
// ─── Meta ────────────────────────────────────────────────────────────────────
|
|
76
|
+
|
|
77
|
+
const meta: Meta<typeof HeroSlideshow> = {
|
|
78
|
+
title: 'Blocks/HeroSlideshow',
|
|
79
|
+
component: HeroSlideshow,
|
|
80
|
+
decorators: [
|
|
81
|
+
(Story) => (
|
|
82
|
+
<QwickApp appName="Storybook" appId="storybook" enableScaffolding={false}>
|
|
83
|
+
<Story />
|
|
84
|
+
</QwickApp>
|
|
85
|
+
),
|
|
86
|
+
],
|
|
87
|
+
parameters: {
|
|
88
|
+
layout: 'fullscreen',
|
|
89
|
+
},
|
|
90
|
+
argTypes: {
|
|
91
|
+
autoPlayInterval: {
|
|
92
|
+
control: { type: 'number', min: 0, max: 10000, step: 500 },
|
|
93
|
+
description: 'Auto-advance interval in ms. Set to 0 to disable.',
|
|
94
|
+
},
|
|
95
|
+
showDots: { control: 'boolean' },
|
|
96
|
+
blockHeight: {
|
|
97
|
+
control: { type: 'select' },
|
|
98
|
+
options: ['small', 'medium', 'large', 'viewport'],
|
|
99
|
+
},
|
|
100
|
+
textAlign: {
|
|
101
|
+
control: { type: 'select' },
|
|
102
|
+
options: ['left', 'center', 'right'],
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export default meta;
|
|
108
|
+
type Story = StoryObj<typeof HeroSlideshow>;
|
|
109
|
+
|
|
110
|
+
// ─── Stories ─────────────────────────────────────────────────────────────────
|
|
111
|
+
|
|
112
|
+
export const GradientSlides: Story = {
|
|
113
|
+
name: 'Gradient slides (props-driven)',
|
|
114
|
+
args: {
|
|
115
|
+
slides: gradientSlides,
|
|
116
|
+
autoPlayInterval: 4000,
|
|
117
|
+
showDots: true,
|
|
118
|
+
blockHeight: 'large',
|
|
119
|
+
textAlign: 'center',
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
export const ImageSlides: Story = {
|
|
124
|
+
name: 'Image slides (WorkMacha style)',
|
|
125
|
+
args: {
|
|
126
|
+
slides: imageSlides,
|
|
127
|
+
autoPlayInterval: 5000,
|
|
128
|
+
showDots: true,
|
|
129
|
+
blockHeight: 'large',
|
|
130
|
+
textAlign: 'center',
|
|
131
|
+
},
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
export const SingleSlide: Story = {
|
|
135
|
+
name: 'Single slide (no dots, no auto-play)',
|
|
136
|
+
args: {
|
|
137
|
+
slides: [gradientSlides[0]],
|
|
138
|
+
autoPlayInterval: 0,
|
|
139
|
+
showDots: false,
|
|
140
|
+
blockHeight: 'medium',
|
|
141
|
+
textAlign: 'center',
|
|
142
|
+
},
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export const SlowAutoPlay: Story = {
|
|
146
|
+
name: 'Slow auto-play (8 second interval)',
|
|
147
|
+
args: {
|
|
148
|
+
slides: gradientSlides,
|
|
149
|
+
autoPlayInterval: 8000,
|
|
150
|
+
showDots: true,
|
|
151
|
+
blockHeight: 'medium',
|
|
152
|
+
},
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
export const LeftAligned: Story = {
|
|
156
|
+
name: 'Left-aligned content',
|
|
157
|
+
args: {
|
|
158
|
+
slides: imageSlides,
|
|
159
|
+
autoPlayInterval: 5000,
|
|
160
|
+
showDots: true,
|
|
161
|
+
blockHeight: 'large',
|
|
162
|
+
textAlign: 'left',
|
|
163
|
+
},
|
|
164
|
+
};
|
|
@@ -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
|