accordion.json
3 months ago
button_group.json
3 months ago
checkbox.json
3 months ago
clone.json
3 months ago
color_picker.json
3 months ago
date_picker.json
3 months ago
date_time_picker.json
3 months ago
email.json
3 months ago
file.json
3 months ago
flexible_content.json
3 months ago
gallery.json
3 months ago
google_map.json
3 months ago
group.json
3 months ago
icon_picker.json
3 months ago
image.json
3 months ago
link.json
3 months ago
message.json
3 months ago
number.json
3 months ago
oembed.json
3 months ago
page_link.json
3 months ago
password.json
3 months ago
post_object.json
3 months ago
radio.json
3 months ago
range.json
3 months ago
relationship.json
3 months ago
repeater.json
3 months ago
select.json
3 months ago
tab.json
3 months ago
taxonomy.json
3 months ago
text.json
3 months ago
textarea.json
3 months ago
time_picker.json
3 months ago
true_false.json
3 months ago
url.json
3 months ago
user.json
3 months ago
wysiwyg.json
3 months ago
color_picker.json
129 lines
| 1 | { |
| 2 | "$schema": "http://json-schema.org/draft-07/schema#", |
| 3 | "type": "object", |
| 4 | "additionalProperties": false, |
| 5 | "properties": { |
| 6 | "label": { |
| 7 | "type": "string", |
| 8 | "description": "The field label displayed in the edit screen", |
| 9 | "minLength": 1 |
| 10 | }, |
| 11 | "type": { |
| 12 | "type": "string", |
| 13 | "enum": [ |
| 14 | "color_picker" |
| 15 | ], |
| 16 | "description": "Field type identifier. Must be \"color_picker\" for this field type." |
| 17 | }, |
| 18 | "name": { |
| 19 | "type": "string", |
| 20 | "description": "The field name used to save/load data. Auto-generated from label if not provided.", |
| 21 | "pattern": "^[a-z_][a-z0-9_]*$" |
| 22 | }, |
| 23 | "key": { |
| 24 | "type": "string", |
| 25 | "description": "Unique field key. Auto-generated if not provided.", |
| 26 | "pattern": "^field_[a-z0-9]+$" |
| 27 | }, |
| 28 | "instructions": { |
| 29 | "type": "string", |
| 30 | "description": "Instructions displayed to editors below the field label" |
| 31 | }, |
| 32 | "required": { |
| 33 | "type": "boolean", |
| 34 | "description": "Whether this field is required", |
| 35 | "default": false |
| 36 | }, |
| 37 | "conditional_logic": { |
| 38 | "type": [ |
| 39 | "boolean", |
| 40 | "array" |
| 41 | ], |
| 42 | "description": "Conditional logic rules. Set to false to disable, or provide rules array.", |
| 43 | "default": false |
| 44 | }, |
| 45 | "wrapper": { |
| 46 | "type": "object", |
| 47 | "description": "HTML wrapper attributes", |
| 48 | "properties": { |
| 49 | "width": { |
| 50 | "type": "string", |
| 51 | "description": "Width percentage (e.g., \"50\")" |
| 52 | }, |
| 53 | "class": { |
| 54 | "type": "string", |
| 55 | "description": "Custom CSS classes" |
| 56 | }, |
| 57 | "id": { |
| 58 | "type": "string", |
| 59 | "description": "Custom HTML ID" |
| 60 | } |
| 61 | } |
| 62 | }, |
| 63 | "default_value": { |
| 64 | "type": "string", |
| 65 | "description": "Default color value in hex format (e.g., \"#FFFFFF\", \"#FF5733\")", |
| 66 | "default": "" |
| 67 | }, |
| 68 | "placeholder": { |
| 69 | "type": "string", |
| 70 | "description": "Placeholder text shown in empty fields" |
| 71 | }, |
| 72 | "prepend": { |
| 73 | "type": "string", |
| 74 | "description": "Text to prepend before the input" |
| 75 | }, |
| 76 | "append": { |
| 77 | "type": "string", |
| 78 | "description": "Text to append after the input" |
| 79 | }, |
| 80 | "maxlength": { |
| 81 | "type": "integer", |
| 82 | "description": "Maximum character length (if applicable)", |
| 83 | "minimum": 1 |
| 84 | }, |
| 85 | "allow_in_bindings": { |
| 86 | "type": "boolean", |
| 87 | "description": "Whether this field can be used in block bindings", |
| 88 | "default": false |
| 89 | }, |
| 90 | "enable_opacity": { |
| 91 | "type": "boolean", |
| 92 | "description": "Enable transparency/alpha channel support for RGBA colors", |
| 93 | "default": false |
| 94 | }, |
| 95 | "return_format": { |
| 96 | "type": "string", |
| 97 | "description": "Format of the returned value", |
| 98 | "enum": [ |
| 99 | "string", |
| 100 | "array" |
| 101 | ], |
| 102 | "default": "string" |
| 103 | }, |
| 104 | "custom_palette_source": { |
| 105 | "type": "string", |
| 106 | "description": "Source for custom color palette (empty for default, \"custom\" for manual colors, \"themejson\" to use theme.json colors)", |
| 107 | "enum": [ |
| 108 | "", |
| 109 | "custom", |
| 110 | "themejson" |
| 111 | ], |
| 112 | "default": "" |
| 113 | }, |
| 114 | "palette_colors": { |
| 115 | "type": "string", |
| 116 | "description": "Comma-separated list of hex or rgba color values for custom palette (e.g., \"#FF0000,#00FF00,#0000FF\" or \"rgba(255,0,0,1),rgba(0,255,0,1)\")", |
| 117 | "default": "" |
| 118 | }, |
| 119 | "show_color_wheel": { |
| 120 | "type": "boolean", |
| 121 | "description": "Show or hide the color wheel in the picker interface", |
| 122 | "default": true |
| 123 | } |
| 124 | }, |
| 125 | "required": [ |
| 126 | "label", |
| 127 | "type" |
| 128 | ] |
| 129 | } |