diff --git a/package-lock.json b/package-lock.json index 945674ce5..7d8b1ff80 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "2.0.0", "license": "GPL-2.0-or-later", "dependencies": { + "@hugeicons/core-free-icons": "^4.1.1", "@hugeicons/react": "^1.1.6", "@radix-ui/react-checkbox": "^1.3.3", "@radix-ui/react-dialog": "^1.1.15", @@ -2413,6 +2414,12 @@ "@hapi/hoek": "^9.0.0" } }, + "node_modules/@hugeicons/core-free-icons": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@hugeicons/core-free-icons/-/core-free-icons-4.1.1.tgz", + "integrity": "sha512-teqIBvPHl90ygIwKyJwTxOH8aNp1X1PjDTcMvLkEwdPxPD+8mssrZ5kXKIAJJFYPsz69a8LYQY0UPid4PAdavg==", + "license": "MIT" + }, "node_modules/@hugeicons/react": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/@hugeicons/react/-/react-1.1.6.tgz", diff --git a/package.json b/package.json index cd7dd66c9..aee7401a7 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "tw-animate-css": "^1.4.0" }, "dependencies": { + "@hugeicons/core-free-icons": "^4.1.1", "@hugeicons/react": "^1.1.6", "@radix-ui/react-checkbox": "^1.3.3", "@radix-ui/react-dialog": "^1.1.15", diff --git a/src/admin/components/formBuilder/FieldPalette.js b/src/admin/components/formBuilder/FieldPalette.js index c8fad8f4a..74fe61e9b 100644 --- a/src/admin/components/formBuilder/FieldPalette.js +++ b/src/admin/components/formBuilder/FieldPalette.js @@ -3,7 +3,7 @@ */ import { __ } from '@wordpress/i18n'; -import { Icon } from '@wordpress/icons'; +import { HugeiconsIcon } from '@hugeicons/react'; import { FIELD_CATEGORIES, getFieldTypesByCategory } from '../../config/fieldTypes'; import './FieldPalette.css'; @@ -37,7 +37,7 @@ export default function FieldPalette({ onDragStart }) { onDragStart={(e) => handleDragStart(e, field.type)} title={field.label} > - + { field.label } ))} diff --git a/src/admin/components/formBuilder/FieldSettingsPanel.js b/src/admin/components/formBuilder/FieldSettingsPanel.js index 85b5b35ef..a006b51d1 100644 --- a/src/admin/components/formBuilder/FieldSettingsPanel.js +++ b/src/admin/components/formBuilder/FieldSettingsPanel.js @@ -3,7 +3,11 @@ */ import { __ } from '@wordpress/i18n'; -import { TextControl, CheckboxControl, SelectControl, TextareaControl } from '@wordpress/components'; +import { Input } from '@/components/ui/input'; +import { Label } from '@/components/ui/label'; +import { Switch } from '@/components/ui/switch'; +import { Select, SelectTrigger, SelectContent, SelectItem, SelectValue } from '@/components/ui/select'; +import { Textarea } from '@/components/ui/textarea'; import { FIELD_TYPES } from '../../config/fieldTypes'; import FormFieldOptions from './FormFieldOptions'; import './FieldSettingsPanel.css'; @@ -53,44 +57,54 @@ export default function FieldSettingsPanel({
- handleChange('label', value)} - help={ __('The display label for this field', 'formipay') } - /> +
+ + handleChange('label', e.target.value)} + /> +

{ __('The display label for this field', 'formipay') }

+
- handleChange('field_id', value)} - help={ __('Unique identifier for this field (used in form data)', 'formipay') } - /> +
+ + handleChange('field_id', e.target.value)} + /> +

{ __('Unique identifier for this field (used in form data)', 'formipay') }

+
{ hasPlaceholder && ( - handleChange('placeholder', value)} - /> +
+ + handleChange('placeholder', e.target.value)} + /> +
) } { hasDefaultValue && ( - handleChange('default_value', value)} - /> +
+ + handleChange('default_value', e.target.value)} + /> +
) } { hasDescription && ( - handleChange('description', value)} - help={ __('Optional help text displayed below the field', 'formipay') } - rows={3} - /> +
+ +