@qwickapps/react-framework 1.9.1 → 1.9.2

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 (50) hide show
  1. package/README.md +7 -4
  2. package/dist/components/Html.d.ts.map +1 -1
  3. package/dist/components/blocks/index.d.ts +0 -2
  4. package/dist/components/blocks/index.d.ts.map +1 -1
  5. package/dist/components/forms/FormField.d.ts +0 -2
  6. package/dist/components/forms/FormField.d.ts.map +1 -1
  7. package/dist/components/forms/FormSelect.d.ts +0 -2
  8. package/dist/components/forms/FormSelect.d.ts.map +1 -1
  9. package/dist/index.css +1 -1
  10. package/dist/index.esm.css +1 -1
  11. package/dist/index.esm.js +2104 -1589
  12. package/dist/index.js +2103 -1589
  13. package/dist/palettes/manifest.json +22 -22
  14. package/dist/palettes/{palette-boutique.1.9.1.css → palette-boutique.1.9.2.css} +29 -29
  15. package/dist/palettes/{palette-boutique.1.9.1.min.css → palette-boutique.1.9.2.min.css} +1 -1
  16. package/dist/palettes/palette-boutique.latest.css +29 -29
  17. package/dist/palettes/palette-boutique.latest.min.css +1 -1
  18. package/dist/schemas/FormFieldSchema.d.ts +0 -1
  19. package/dist/schemas/FormFieldSchema.d.ts.map +1 -1
  20. package/dist/schemas/FormSelectSchema.d.ts +0 -1
  21. package/dist/schemas/FormSelectSchema.d.ts.map +1 -1
  22. package/package.json +3 -3
  23. package/src/components/Html.tsx +1 -7
  24. package/src/components/Logo.tsx +1 -1
  25. package/src/components/QwickApp.css +2 -2
  26. package/src/components/Scaffold.css +0 -3
  27. package/src/components/blocks/index.ts +0 -2
  28. package/src/components/forms/FormField.tsx +0 -6
  29. package/src/components/forms/FormSelect.tsx +0 -6
  30. package/src/components/layout/GridCellWrapper.tsx +4 -4
  31. package/src/palettes/PaletteBoutique.css +29 -29
  32. package/src/schemas/FormFieldSchema.ts +0 -11
  33. package/src/schemas/FormSelectSchema.ts +0 -11
  34. package/src/schemas/transformers/ReactNodeTransformer.ts +1 -1
  35. package/dist/components/blocks/HeroSlideshow.d.ts +0 -54
  36. package/dist/components/blocks/HeroSlideshow.d.ts.map +0 -1
  37. package/src/components/blocks/HeroSlideshow.tsx +0 -156
  38. package/src/stories/HeroSlideshow.stories.tsx +0 -164
  39. /package/dist/palettes/{palette-autumn.1.9.1.css → palette-autumn.1.9.2.css} +0 -0
  40. /package/dist/palettes/{palette-autumn.1.9.1.min.css → palette-autumn.1.9.2.min.css} +0 -0
  41. /package/dist/palettes/{palette-cosmic.1.9.1.css → palette-cosmic.1.9.2.css} +0 -0
  42. /package/dist/palettes/{palette-cosmic.1.9.1.min.css → palette-cosmic.1.9.2.min.css} +0 -0
  43. /package/dist/palettes/{palette-default.1.9.1.css → palette-default.1.9.2.css} +0 -0
  44. /package/dist/palettes/{palette-default.1.9.1.min.css → palette-default.1.9.2.min.css} +0 -0
  45. /package/dist/palettes/{palette-ocean.1.9.1.css → palette-ocean.1.9.2.css} +0 -0
  46. /package/dist/palettes/{palette-ocean.1.9.1.min.css → palette-ocean.1.9.2.min.css} +0 -0
  47. /package/dist/palettes/{palette-spring.1.9.1.css → palette-spring.1.9.2.css} +0 -0
  48. /package/dist/palettes/{palette-spring.1.9.1.min.css → palette-spring.1.9.2.min.css} +0 -0
  49. /package/dist/palettes/{palette-winter.1.9.1.css → palette-winter.1.9.2.css} +0 -0
  50. /package/dist/palettes/{palette-winter.1.9.1.min.css → palette-winter.1.9.2.min.css} +0 -0
@@ -135,17 +135,6 @@ export class FormFieldModel extends ViewSchema {
135
135
  @IsOptional()
136
136
  @IsString()
137
137
  placeholder?: string;
138
-
139
- @Field()
140
- @Editor({
141
- field_type: FieldType.TEXT,
142
- label: 'Name',
143
- description: 'Name attribute for the input (for forms and accessibility)',
144
- placeholder: 'Enter name...'
145
- })
146
- @IsOptional()
147
- @IsString()
148
- name?: string;
149
138
  }
150
139
 
151
140
  export default FormFieldModel;
@@ -103,17 +103,6 @@ export class FormSelectModel extends ViewSchema {
103
103
  @IsOptional()
104
104
  @IsString()
105
105
  placeholder?: string;
106
-
107
- @Field()
108
- @Editor({
109
- field_type: FieldType.TEXT,
110
- label: 'Name',
111
- description: 'Name attribute for the select (for forms and accessibility)',
112
- placeholder: 'Enter name...'
113
- })
114
- @IsOptional()
115
- @IsString()
116
- name?: string;
117
106
  }
118
107
 
119
108
  export default FormSelectModel;
@@ -186,7 +186,7 @@ export class ReactNodeTransformer {
186
186
 
187
187
  // Use Html component to render HTML content safely
188
188
  const typedProps = props as Record<string, unknown>;
189
- return createElement(Html, { key, children: typedProps.children as ReactNode });
189
+ return createElement(Html, { key, children: typedProps.children });
190
190
  }
191
191
 
192
192
  /**
@@ -1,54 +0,0 @@
1
- /**
2
- * HeroSlideshow Component
3
- *
4
- * A slideshow built on top of HeroBlock that cycles through multiple slides
5
- * with auto-rotation, fade transitions, and progress dot navigation.
6
- *
7
- * Usage (props-driven, e.g. qwickdocs):
8
- * <HeroSlideshow slides={[{ title: 'Slide 1', ... }, ...]} />
9
- *
10
- * Usage (CMS-driven, e.g. work-macha):
11
- * const slideshow = await payload.findByID({ collection: 'hero-slideshows', id });
12
- * <HeroSlideshow slides={slideshow.slides} autoPlayInterval={slideshow.autoPlayInterval} />
13
- *
14
- * Copyright (c) 2025 QwickApps.com. All rights reserved.
15
- */
16
- import type { HeroBlockProps } from './HeroBlock';
17
- import type { ButtonProps } from '../buttons/Button';
18
- /**
19
- * A single slide - subset of HeroBlockProps that drives visual content
20
- */
21
- export interface HeroSlide {
22
- /** Main headline text */
23
- title: string;
24
- /** Subtitle or description text */
25
- subtitle?: string;
26
- /** Background image URL */
27
- backgroundImage?: string;
28
- /** CSS gradient string, e.g. 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)' */
29
- backgroundGradient?: string;
30
- /** Theme color variant when no image/gradient set */
31
- backgroundColor?: 'default' | 'primary' | 'secondary' | 'surface';
32
- /** Call-to-action buttons */
33
- actions?: ButtonProps[];
34
- /** Overlay opacity when backgroundImage is set (0-1) */
35
- overlayOpacity?: number;
36
- }
37
- export interface HeroSlideshowProps {
38
- /** Array of slides to cycle through */
39
- slides: HeroSlide[];
40
- /** Auto-play interval in milliseconds. Default: 5000 */
41
- autoPlayInterval?: number;
42
- /** Show dot navigation. Default: true */
43
- showDots?: boolean;
44
- /** Height preset applied to all slides */
45
- blockHeight?: HeroBlockProps['blockHeight'];
46
- /** Text alignment applied to all slides */
47
- textAlign?: HeroBlockProps['textAlign'];
48
- }
49
- /**
50
- * HeroSlideshow - Cycles through HeroBlock slides with fade transitions
51
- */
52
- export declare function HeroSlideshow({ slides, autoPlayInterval, showDots, blockHeight, textAlign, }: HeroSlideshowProps): import("react/jsx-runtime").JSX.Element | null;
53
- export default HeroSlideshow;
54
- //# sourceMappingURL=HeroSlideshow.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HeroSlideshow.d.ts","sourceRoot":"","sources":["../../../src/components/blocks/HeroSlideshow.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAOH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2BAA2B;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oFAAoF;IACpF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,qDAAqD;IACrD,eAAe,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;IAClE,6BAA6B;IAC7B,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,wDAAwD;IACxD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,kBAAkB;IACjC,uCAAuC;IACvC,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,wDAAwD;IACxD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yCAAyC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;IAC5C,2CAA2C;IAC3C,SAAS,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;CACzC;AAID;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,gBAAuB,EACvB,QAAe,EACf,WAAqB,EACrB,SAAoB,GACrB,EAAE,kBAAkB,kDAqFpB;AAED,eAAe,aAAa,CAAC"}
@@ -1,156 +0,0 @@
1
- /**
2
- * HeroSlideshow Component
3
- *
4
- * A slideshow built on top of HeroBlock that cycles through multiple slides
5
- * with auto-rotation, fade transitions, and progress dot navigation.
6
- *
7
- * Usage (props-driven, e.g. qwickdocs):
8
- * <HeroSlideshow slides={[{ title: 'Slide 1', ... }, ...]} />
9
- *
10
- * Usage (CMS-driven, e.g. work-macha):
11
- * const slideshow = await payload.findByID({ collection: 'hero-slideshows', id });
12
- * <HeroSlideshow slides={slideshow.slides} autoPlayInterval={slideshow.autoPlayInterval} />
13
- *
14
- * Copyright (c) 2025 QwickApps.com. All rights reserved.
15
- */
16
-
17
- 'use client';
18
-
19
- import React, { useState, useEffect, useCallback } from 'react';
20
- import { Box } from '@mui/material';
21
- import HeroBlock from './HeroBlock';
22
- import type { HeroBlockProps } from './HeroBlock';
23
- import type { ButtonProps } from '../buttons/Button';
24
-
25
- /**
26
- * A single slide - subset of HeroBlockProps that drives visual content
27
- */
28
- export interface HeroSlide {
29
- /** Main headline text */
30
- title: string;
31
- /** Subtitle or description text */
32
- subtitle?: string;
33
- /** Background image URL */
34
- backgroundImage?: string;
35
- /** CSS gradient string, e.g. 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)' */
36
- backgroundGradient?: string;
37
- /** Theme color variant when no image/gradient set */
38
- backgroundColor?: 'default' | 'primary' | 'secondary' | 'surface';
39
- /** Call-to-action buttons */
40
- actions?: ButtonProps[];
41
- /** Overlay opacity when backgroundImage is set (0-1) */
42
- overlayOpacity?: number;
43
- }
44
-
45
- export interface HeroSlideshowProps {
46
- /** Array of slides to cycle through */
47
- slides: HeroSlide[];
48
- /** Auto-play interval in milliseconds. Default: 5000 */
49
- autoPlayInterval?: number;
50
- /** Show dot navigation. Default: true */
51
- showDots?: boolean;
52
- /** Height preset applied to all slides */
53
- blockHeight?: HeroBlockProps['blockHeight'];
54
- /** Text alignment applied to all slides */
55
- textAlign?: HeroBlockProps['textAlign'];
56
- }
57
-
58
- const TRANSITION_DURATION = 300; // ms
59
-
60
- /**
61
- * HeroSlideshow - Cycles through HeroBlock slides with fade transitions
62
- */
63
- export function HeroSlideshow({
64
- slides,
65
- autoPlayInterval = 5000,
66
- showDots = true,
67
- blockHeight = 'large',
68
- textAlign = 'center',
69
- }: HeroSlideshowProps) {
70
- const [currentIndex, setCurrentIndex] = useState(0);
71
- const [isVisible, setIsVisible] = useState(true);
72
-
73
- const goToSlide = useCallback(
74
- (index: number) => {
75
- if (index === currentIndex) return;
76
- setIsVisible(false);
77
- setTimeout(() => {
78
- setCurrentIndex(index);
79
- setIsVisible(true);
80
- }, TRANSITION_DURATION);
81
- },
82
- [currentIndex],
83
- );
84
-
85
- useEffect(() => {
86
- if (slides.length <= 1 || autoPlayInterval <= 0) return;
87
- const timer = setTimeout(() => {
88
- goToSlide((currentIndex + 1) % slides.length);
89
- }, autoPlayInterval);
90
- return () => clearTimeout(timer);
91
- }, [currentIndex, slides.length, autoPlayInterval, goToSlide]);
92
-
93
- if (!slides.length) return null;
94
-
95
- const slide = slides[currentIndex];
96
-
97
- return (
98
- <Box sx={{ position: 'relative', overflow: 'hidden' }}>
99
- {/* Current slide with fade transition */}
100
- <Box
101
- sx={{
102
- opacity: isVisible ? 1 : 0,
103
- transition: `opacity ${TRANSITION_DURATION}ms ease-in-out`,
104
- }}
105
- >
106
- <HeroBlock
107
- title={slide.title}
108
- subtitle={slide.subtitle}
109
- backgroundImage={slide.backgroundImage}
110
- backgroundGradient={slide.backgroundGradient}
111
- backgroundColor={slide.backgroundColor}
112
- actions={slide.actions}
113
- overlayOpacity={slide.overlayOpacity}
114
- blockHeight={blockHeight}
115
- textAlign={textAlign}
116
- />
117
- </Box>
118
-
119
- {/* Progress dots */}
120
- {showDots && slides.length > 1 && (
121
- <Box
122
- sx={{
123
- position: 'absolute',
124
- bottom: 20,
125
- left: '50%',
126
- transform: 'translateX(-50%)',
127
- display: 'flex',
128
- gap: 1,
129
- zIndex: 10,
130
- }}
131
- >
132
- {slides.map((_, index) => (
133
- <Box
134
- key={index}
135
- role="button"
136
- aria-label={`Go to slide ${index + 1}`}
137
- onClick={() => goToSlide(index)}
138
- sx={{
139
- width: index === currentIndex ? 28 : 8,
140
- height: 8,
141
- borderRadius: 4,
142
- backgroundColor: 'rgba(255, 255, 255, 0.9)',
143
- opacity: index === currentIndex ? 1 : 0.45,
144
- cursor: 'pointer',
145
- transition: 'all 0.3s ease',
146
- '&:hover': { opacity: 0.8 },
147
- }}
148
- />
149
- ))}
150
- </Box>
151
- )}
152
- </Box>
153
- );
154
- }
155
-
156
- export default HeroSlideshow;
@@ -1,164 +0,0 @@
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
- };