@qwickapps/react-framework 1.5.13 → 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.
Files changed (46) hide show
  1. package/dist/components/forms/Captcha.d.ts +33 -28
  2. package/dist/components/forms/Captcha.d.ts.map +1 -1
  3. package/dist/components/forms/FormCheckbox.d.ts +15 -12
  4. package/dist/components/forms/FormCheckbox.d.ts.map +1 -1
  5. package/dist/components/forms/FormField.d.ts +20 -23
  6. package/dist/components/forms/FormField.d.ts.map +1 -1
  7. package/dist/components/forms/FormSelect.d.ts +16 -15
  8. package/dist/components/forms/FormSelect.d.ts.map +1 -1
  9. package/dist/hooks/useBaseProps.d.ts +27 -1172
  10. package/dist/hooks/useBaseProps.d.ts.map +1 -1
  11. package/dist/index.esm.js +349 -156
  12. package/dist/index.js +348 -155
  13. package/dist/palettes/manifest.json +19 -19
  14. package/dist/schemas/CaptchaSchema.d.ts +16 -0
  15. package/dist/schemas/CaptchaSchema.d.ts.map +1 -0
  16. package/dist/schemas/FormCheckboxSchema.d.ts +16 -0
  17. package/dist/schemas/FormCheckboxSchema.d.ts.map +1 -0
  18. package/dist/schemas/FormFieldSchema.d.ts +23 -0
  19. package/dist/schemas/FormFieldSchema.d.ts.map +1 -0
  20. package/dist/schemas/FormSelectSchema.d.ts +20 -0
  21. package/dist/schemas/FormSelectSchema.d.ts.map +1 -0
  22. package/dist/schemas/index.d.ts +4 -0
  23. package/dist/schemas/index.d.ts.map +1 -1
  24. package/package.json +1 -1
  25. package/src/components/forms/Captcha.tsx +57 -63
  26. package/src/components/forms/FormCheckbox.tsx +35 -43
  27. package/src/components/forms/FormField.tsx +50 -66
  28. package/src/components/forms/FormSelect.tsx +41 -49
  29. package/src/hooks/useBaseProps.ts +34 -1
  30. package/src/schemas/CaptchaSchema.ts +65 -0
  31. package/src/schemas/FormCheckboxSchema.ts +65 -0
  32. package/src/schemas/FormFieldSchema.ts +140 -0
  33. package/src/schemas/FormSelectSchema.ts +108 -0
  34. package/src/schemas/index.ts +4 -0
  35. /package/dist/palettes/{palette-autumn.1.5.13.css → palette-autumn.1.6.0.css} +0 -0
  36. /package/dist/palettes/{palette-autumn.1.5.13.min.css → palette-autumn.1.6.0.min.css} +0 -0
  37. /package/dist/palettes/{palette-cosmic.1.5.13.css → palette-cosmic.1.6.0.css} +0 -0
  38. /package/dist/palettes/{palette-cosmic.1.5.13.min.css → palette-cosmic.1.6.0.min.css} +0 -0
  39. /package/dist/palettes/{palette-default.1.5.13.css → palette-default.1.6.0.css} +0 -0
  40. /package/dist/palettes/{palette-default.1.5.13.min.css → palette-default.1.6.0.min.css} +0 -0
  41. /package/dist/palettes/{palette-ocean.1.5.13.css → palette-ocean.1.6.0.css} +0 -0
  42. /package/dist/palettes/{palette-ocean.1.5.13.min.css → palette-ocean.1.6.0.min.css} +0 -0
  43. /package/dist/palettes/{palette-spring.1.5.13.css → palette-spring.1.6.0.css} +0 -0
  44. /package/dist/palettes/{palette-spring.1.5.13.min.css → palette-spring.1.6.0.min.css} +0 -0
  45. /package/dist/palettes/{palette-winter.1.5.13.css → palette-winter.1.6.0.css} +0 -0
  46. /package/dist/palettes/{palette-winter.1.5.13.min.css → palette-winter.1.6.0.min.css} +0 -0
@@ -0,0 +1,108 @@
1
+ /**
2
+ * Schema for FormSelect component - Themed dropdown select input
3
+ *
4
+ * Copyright (c) 2025 QwickApps.com. All rights reserved.
5
+ */
6
+
7
+ import { IsBoolean, IsIn, IsOptional, IsString } from 'class-validator';
8
+ import 'reflect-metadata';
9
+ import { Editor, Field, Schema, FieldType } from '@qwickapps/schema';
10
+ import ViewSchema from './ViewSchema';
11
+
12
+ @Schema('FormSelect', '1.0.0')
13
+ export class FormSelectModel extends ViewSchema {
14
+ @Field()
15
+ @Editor({
16
+ field_type: FieldType.TEXT,
17
+ label: 'Label',
18
+ description: 'Label text for the select field',
19
+ placeholder: 'Enter label...'
20
+ })
21
+ @IsOptional()
22
+ @IsString()
23
+ label?: string;
24
+
25
+ @Field()
26
+ @Editor({
27
+ field_type: FieldType.TEXT,
28
+ label: 'Value',
29
+ description: 'Current selected value',
30
+ placeholder: ''
31
+ })
32
+ @IsString()
33
+ value!: string | number;
34
+
35
+ @Field()
36
+ @Editor({
37
+ field_type: FieldType.TEXTAREA,
38
+ label: 'Options',
39
+ description: 'Select options as JSON array: [{"value": "1", "label": "Option 1"}]',
40
+ placeholder: '[{"value": "1", "label": "Option 1"}]'
41
+ })
42
+ @IsString()
43
+ options!: string; // JSON string of FormSelectOption[]
44
+
45
+ @Field()
46
+ @Editor({
47
+ field_type: FieldType.TEXT,
48
+ label: 'Helper Text',
49
+ description: 'Helper text displayed below the select',
50
+ placeholder: 'Enter helper text...'
51
+ })
52
+ @IsOptional()
53
+ @IsString()
54
+ helperText?: string;
55
+
56
+ @Field({ defaultValue: false })
57
+ @Editor({
58
+ field_type: FieldType.BOOLEAN,
59
+ label: 'Required',
60
+ description: 'Mark field as required'
61
+ })
62
+ @IsOptional()
63
+ @IsBoolean()
64
+ required?: boolean;
65
+
66
+ @Field({ defaultValue: false })
67
+ @Editor({
68
+ field_type: FieldType.BOOLEAN,
69
+ label: 'Disabled',
70
+ description: 'Disable the select field'
71
+ })
72
+ @IsOptional()
73
+ @IsBoolean()
74
+ disabled?: boolean;
75
+
76
+ @Field({ defaultValue: true })
77
+ @Editor({
78
+ field_type: FieldType.BOOLEAN,
79
+ label: 'Full Width',
80
+ description: 'Make select take full width of container'
81
+ })
82
+ @IsOptional()
83
+ @IsBoolean()
84
+ fullWidth?: boolean;
85
+
86
+ @Field({ defaultValue: 'small' })
87
+ @Editor({
88
+ field_type: FieldType.SELECT,
89
+ label: 'Size',
90
+ description: 'Size variant of the select field'
91
+ })
92
+ @IsOptional()
93
+ @IsIn(['small', 'medium'])
94
+ size?: 'small' | 'medium';
95
+
96
+ @Field()
97
+ @Editor({
98
+ field_type: FieldType.TEXT,
99
+ label: 'Placeholder',
100
+ description: 'Placeholder text when no value is selected',
101
+ placeholder: 'Select an option...'
102
+ })
103
+ @IsOptional()
104
+ @IsString()
105
+ placeholder?: string;
106
+ }
107
+
108
+ export default FormSelectModel;
@@ -28,6 +28,10 @@ export * from './FeatureGridSchema';
28
28
  export * from './FeatureItemSchema';
29
29
  export * from './FooterItemSchema';
30
30
  export * from './FormBlockSchema';
31
+ export * from './FormSelectSchema';
32
+ export * from './FormFieldSchema';
33
+ export * from './FormCheckboxSchema';
34
+ export * from './CaptchaSchema';
31
35
  export * from './FooterSchema';
32
36
  export * from './FooterSectionSchema';
33
37
  export * from './GridCellSchema';