@qwickapps/react-framework 1.8.1 → 1.9.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.
Files changed (36) hide show
  1. package/README.md +4 -7
  2. package/dist/components/blocks/index.d.ts +0 -2
  3. package/dist/components/blocks/index.d.ts.map +1 -1
  4. package/dist/components/forms/FormField.d.ts.map +1 -1
  5. package/dist/components/forms/FormSelect.d.ts.map +1 -1
  6. package/dist/index.esm.js +17 -98
  7. package/dist/index.js +16 -98
  8. package/dist/palettes/palette-autumn.1.8.0.css +174 -0
  9. package/dist/palettes/palette-autumn.1.8.0.min.css +1 -0
  10. package/dist/palettes/palette-boutique.1.8.0.css +176 -0
  11. package/dist/palettes/palette-boutique.1.8.0.min.css +1 -0
  12. package/dist/palettes/palette-cosmic.1.8.0.css +174 -0
  13. package/dist/palettes/palette-cosmic.1.8.0.min.css +1 -0
  14. package/dist/palettes/palette-default.1.8.0.css +178 -0
  15. package/dist/palettes/palette-default.1.8.0.min.css +1 -0
  16. package/dist/palettes/palette-ocean.1.8.0.css +174 -0
  17. package/dist/palettes/palette-ocean.1.8.0.min.css +1 -0
  18. package/dist/palettes/palette-spring.1.8.0.css +168 -0
  19. package/dist/palettes/palette-spring.1.8.0.min.css +1 -0
  20. package/dist/palettes/palette-winter.1.8.0.css +174 -0
  21. package/dist/palettes/palette-winter.1.8.0.min.css +1 -0
  22. package/dist/schemas/FormFieldSchema.d.ts +1 -0
  23. package/dist/schemas/FormFieldSchema.d.ts.map +1 -1
  24. package/dist/schemas/FormSelectSchema.d.ts +1 -0
  25. package/dist/schemas/FormSelectSchema.d.ts.map +1 -1
  26. package/package.json +21 -19
  27. package/scripts/build-palettes.cjs +0 -0
  28. package/scripts/create-project.sh +0 -0
  29. package/src/components/Html.tsx +7 -1
  30. package/src/components/Logo.tsx +1 -1
  31. package/src/components/forms/FormField.tsx +6 -0
  32. package/src/components/forms/FormSelect.tsx +6 -0
  33. package/src/schemas/FormFieldSchema.ts +11 -0
  34. package/src/schemas/FormSelectSchema.ts +11 -0
  35. package/dist/components/blocks/HeroSlideshow.d.ts +0 -54
  36. package/dist/components/blocks/HeroSlideshow.d.ts.map +0 -1
@@ -40,6 +40,8 @@ export interface FormFieldProps extends ViewProps, SchemaProps<typeof FormFieldM
40
40
  endAdornment?: React.ReactNode;
41
41
  /** Additional input props */
42
42
  inputProps?: unknown;
43
+ /** Show error state styling */
44
+ error?: boolean;
43
45
  }
44
46
 
45
47
  /**
@@ -60,9 +62,11 @@ function FormFieldView({
60
62
  multiline = false,
61
63
  rows,
62
64
  placeholder,
65
+ name,
63
66
  startAdornment,
64
67
  endAdornment,
65
68
  inputProps,
69
+ error,
66
70
  // Exclude ViewProps that conflict with MUI FormControl types
67
71
  margin: _margin,
68
72
  marginTop: _marginTop,
@@ -128,6 +132,7 @@ function FormFieldView({
128
132
  return (
129
133
  <FormControl
130
134
  fullWidth={fullWidth}
135
+ error={error}
131
136
  {...restProps}
132
137
  >
133
138
  <InputLabel htmlFor={fieldId} sx={labelStyles} shrink>
@@ -136,6 +141,7 @@ function FormFieldView({
136
141
 
137
142
  <Input
138
143
  id={fieldId}
144
+ name={name}
139
145
  type={type}
140
146
  value={value}
141
147
  onChange={handleChange}
@@ -38,6 +38,8 @@ export interface FormSelectProps extends ViewProps, SchemaProps<typeof FormSelec
38
38
  onChange: (value: string | number) => void;
39
39
  /** Options array (runtime prop, overrides schema) */
40
40
  options: FormSelectOption[];
41
+ /** Show error state styling */
42
+ error?: boolean;
41
43
  }
42
44
 
43
45
  /**
@@ -54,6 +56,8 @@ function FormSelectView({
54
56
  fullWidth = true,
55
57
  size = 'small',
56
58
  placeholder,
59
+ name,
60
+ error,
57
61
  // Exclude ViewProps that conflict with MUI FormControl types
58
62
  margin: _margin,
59
63
  marginTop: _marginTop,
@@ -99,6 +103,7 @@ function FormSelectView({
99
103
  <FormControl
100
104
  fullWidth={fullWidth}
101
105
  size={size}
106
+ error={error}
102
107
  {...restProps}
103
108
  >
104
109
  {label && (
@@ -108,6 +113,7 @@ function FormSelectView({
108
113
  )}
109
114
 
110
115
  <Select
116
+ name={name}
111
117
  value={value}
112
118
  onChange={handleChange}
113
119
  disabled={disabled}
@@ -135,6 +135,17 @@ 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;
138
149
  }
139
150
 
140
151
  export default FormFieldModel;
@@ -103,6 +103,17 @@ 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;
106
117
  }
107
118
 
108
119
  export default FormSelectModel;
@@ -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"}