block.json
5 days ago
index-rtl.css
5 days ago
index.asset.php
5 days ago
index.css
5 days ago
index.js
5 days ago
style-index-rtl.css
5 days ago
style-index.css
5 days ago
block.json
183 lines
| 1 | { |
| 2 | "$schema": "https://schemas.wp.org/trunk/block.json", |
| 3 | "apiVersion": 3, |
| 4 | "name": "superb-addons/form-field", |
| 5 | "parent": ["superb-addons/form", "superb-addons/form-step"], |
| 6 | "version": "0.1.0", |
| 7 | "title": "Form Field", |
| 8 | "category": "superb-addons-blocks", |
| 9 | "icon": "editor-textcolor", |
| 10 | "description": "A form field. Select the field type, configure validation, and set conditional logic.", |
| 11 | "keywords": ["field", "input", "form", "text", "email"], |
| 12 | "supports": { |
| 13 | "html": false, |
| 14 | "inserter": true, |
| 15 | "reusable": false |
| 16 | }, |
| 17 | "attributes": { |
| 18 | "fieldId": { |
| 19 | "type": "string" |
| 20 | }, |
| 21 | "fieldType": { |
| 22 | "type": "string", |
| 23 | "default": "text" |
| 24 | }, |
| 25 | "label": { |
| 26 | "type": "string", |
| 27 | "default": "" |
| 28 | }, |
| 29 | "placeholder": { |
| 30 | "type": "string", |
| 31 | "default": "" |
| 32 | }, |
| 33 | "helpText": { |
| 34 | "type": "string", |
| 35 | "default": "" |
| 36 | }, |
| 37 | "required": { |
| 38 | "type": "boolean", |
| 39 | "default": false |
| 40 | }, |
| 41 | "defaultValue": { |
| 42 | "type": "string", |
| 43 | "default": "" |
| 44 | }, |
| 45 | "fieldName": { |
| 46 | "type": "string", |
| 47 | "default": "" |
| 48 | }, |
| 49 | "width": { |
| 50 | "type": "number", |
| 51 | "default": 100 |
| 52 | }, |
| 53 | "options": { |
| 54 | "type": "array", |
| 55 | "default": [], |
| 56 | "items": { |
| 57 | "type": "object", |
| 58 | "properties": { |
| 59 | "label": { "type": "string" }, |
| 60 | "value": { "type": "string" } |
| 61 | } |
| 62 | } |
| 63 | }, |
| 64 | "minLength": { |
| 65 | "type": "number" |
| 66 | }, |
| 67 | "maxLength": { |
| 68 | "type": "number" |
| 69 | }, |
| 70 | "showCharacterCounter": { |
| 71 | "type": "boolean", |
| 72 | "default": true |
| 73 | }, |
| 74 | "minValue": { |
| 75 | "type": "number" |
| 76 | }, |
| 77 | "maxValue": { |
| 78 | "type": "number" |
| 79 | }, |
| 80 | "pattern": { |
| 81 | "type": "string", |
| 82 | "default": "" |
| 83 | }, |
| 84 | "patternMessage": { |
| 85 | "type": "string", |
| 86 | "default": "" |
| 87 | }, |
| 88 | "hideLabel": { |
| 89 | "type": "boolean", |
| 90 | "default": false |
| 91 | }, |
| 92 | "sensitive": { |
| 93 | "type": "boolean", |
| 94 | "default": false |
| 95 | }, |
| 96 | "conditionalLogic": { |
| 97 | "type": "object", |
| 98 | "default": { |
| 99 | "action": "show", |
| 100 | "ruleGroups": [] |
| 101 | } |
| 102 | }, |
| 103 | "calculatedSettings": { |
| 104 | "type": "object", |
| 105 | "default": { |
| 106 | "formula": "", |
| 107 | "prefix": "", |
| 108 | "suffix": "", |
| 109 | "roundResult": -1 |
| 110 | } |
| 111 | }, |
| 112 | "signatureSettings": { |
| 113 | "type": "object", |
| 114 | "default": { |
| 115 | "canvasHeight": 150, |
| 116 | "placeholderText": "", |
| 117 | "clearText": "" |
| 118 | } |
| 119 | }, |
| 120 | "sliderSettings": { |
| 121 | "type": "object", |
| 122 | "default": { |
| 123 | "min": 0, |
| 124 | "max": 100, |
| 125 | "step": 1, |
| 126 | "showValue": true, |
| 127 | "prefix": "", |
| 128 | "suffix": "" |
| 129 | } |
| 130 | }, |
| 131 | "colorSettings": { |
| 132 | "type": "object", |
| 133 | "default": { |
| 134 | "defaultColor": "", |
| 135 | "showHexInput": false |
| 136 | } |
| 137 | }, |
| 138 | "ratingSettings": { |
| 139 | "type": "object", |
| 140 | "default": { |
| 141 | "maxRating": 5, |
| 142 | "defaultRating": 0 |
| 143 | } |
| 144 | }, |
| 145 | "fileSettings": { |
| 146 | "type": "object", |
| 147 | "default": { |
| 148 | "accept": [".jpg", ".jpeg", ".png", ".gif", ".webp", ".pdf", ".doc", ".docx", ".txt", ".xls", ".xlsx", ".csv"], |
| 149 | "maxFileSize": 5, |
| 150 | "multiple": false, |
| 151 | "maxFiles": 5 |
| 152 | } |
| 153 | }, |
| 154 | "dateSettings": { |
| 155 | "type": "object", |
| 156 | "default": { |
| 157 | "dateConstraint": "none", |
| 158 | "minDateMode": "none", |
| 159 | "maxDateMode": "none", |
| 160 | "minDate": "", |
| 161 | "maxDate": "", |
| 162 | "minDateOffset": 0, |
| 163 | "maxDateOffset": 0, |
| 164 | "excludeDays": [], |
| 165 | "dateTimeMessage": "" |
| 166 | } |
| 167 | }, |
| 168 | "timeSettings": { |
| 169 | "type": "object", |
| 170 | "default": { |
| 171 | "minTime": "", |
| 172 | "maxTime": "", |
| 173 | "timeStep": 1, |
| 174 | "dateTimeMessage": "" |
| 175 | } |
| 176 | } |
| 177 | }, |
| 178 | "textdomain": "superb-blocks", |
| 179 | "editorScript": "file:./index.js", |
| 180 | "editorStyle": "file:./index.css", |
| 181 | "style": "file:./style-index.css" |
| 182 | } |
| 183 |