wp/wp-includes/blocks/button/block.json
changeset 21 48c4eec2b7e6
parent 19 3d72ae0968f4
child 22 8c2e4d02f4ef
equal deleted inserted replaced
20:7b1b88e27a20 21:48c4eec2b7e6
     1 {
     1 {
     2 	"$schema": "https://schemas.wp.org/trunk/block.json",
     2 	"$schema": "https://schemas.wp.org/trunk/block.json",
     3 	"apiVersion": 2,
     3 	"apiVersion": 3,
     4 	"name": "core/button",
     4 	"name": "core/button",
     5 	"title": "Button",
     5 	"title": "Button",
     6 	"category": "design",
     6 	"category": "design",
     7 	"parent": [ "core/buttons" ],
     7 	"parent": [ "core/buttons" ],
     8 	"description": "Prompt visitors to take action with a button-style link.",
     8 	"description": "Prompt visitors to take action with a button-style link.",
     9 	"keywords": [ "link" ],
     9 	"keywords": [ "link" ],
    10 	"textdomain": "default",
    10 	"textdomain": "default",
    11 	"attributes": {
    11 	"attributes": {
       
    12 		"tagName": {
       
    13 			"type": "string",
       
    14 			"enum": [ "a", "button" ],
       
    15 			"default": "a"
       
    16 		},
       
    17 		"type": {
       
    18 			"type": "string",
       
    19 			"default": "button"
       
    20 		},
       
    21 		"textAlign": {
       
    22 			"type": "string"
       
    23 		},
    12 		"url": {
    24 		"url": {
    13 			"type": "string",
    25 			"type": "string",
    14 			"source": "attribute",
    26 			"source": "attribute",
    15 			"selector": "a",
    27 			"selector": "a",
    16 			"attribute": "href"
    28 			"attribute": "href",
       
    29 			"__experimentalRole": "content"
    17 		},
    30 		},
    18 		"title": {
    31 		"title": {
    19 			"type": "string",
    32 			"type": "string",
    20 			"source": "attribute",
    33 			"source": "attribute",
    21 			"selector": "a",
    34 			"selector": "a,button",
    22 			"attribute": "title"
    35 			"attribute": "title",
       
    36 			"__experimentalRole": "content"
    23 		},
    37 		},
    24 		"text": {
    38 		"text": {
    25 			"type": "string",
    39 			"type": "rich-text",
    26 			"source": "html",
    40 			"source": "rich-text",
    27 			"selector": "a"
    41 			"selector": "a,button",
       
    42 			"__experimentalRole": "content"
    28 		},
    43 		},
    29 		"linkTarget": {
    44 		"linkTarget": {
    30 			"type": "string",
    45 			"type": "string",
    31 			"source": "attribute",
    46 			"source": "attribute",
    32 			"selector": "a",
    47 			"selector": "a",
    33 			"attribute": "target"
    48 			"attribute": "target",
       
    49 			"__experimentalRole": "content"
    34 		},
    50 		},
    35 		"rel": {
    51 		"rel": {
    36 			"type": "string",
    52 			"type": "string",
    37 			"source": "attribute",
    53 			"source": "attribute",
    38 			"selector": "a",
    54 			"selector": "a",
    39 			"attribute": "rel"
    55 			"attribute": "rel",
       
    56 			"__experimentalRole": "content"
    40 		},
    57 		},
    41 		"placeholder": {
    58 		"placeholder": {
    42 			"type": "string"
    59 			"type": "string"
    43 		},
    60 		},
    44 		"backgroundColor": {
    61 		"backgroundColor": {
    54 			"type": "number"
    71 			"type": "number"
    55 		}
    72 		}
    56 	},
    73 	},
    57 	"supports": {
    74 	"supports": {
    58 		"anchor": true,
    75 		"anchor": true,
    59 		"align": true,
    76 		"splitting": true,
       
    77 		"align": false,
    60 		"alignWide": false,
    78 		"alignWide": false,
    61 		"color": {
    79 		"color": {
    62 			"__experimentalSkipSerialization": true,
    80 			"__experimentalSkipSerialization": true,
    63 			"gradients": true,
    81 			"gradients": true,
    64 			"__experimentalDefaultControls": {
    82 			"__experimentalDefaultControls": {
    66 				"text": true
    84 				"text": true
    67 			}
    85 			}
    68 		},
    86 		},
    69 		"typography": {
    87 		"typography": {
    70 			"fontSize": true,
    88 			"fontSize": true,
       
    89 			"lineHeight": true,
    71 			"__experimentalFontFamily": true,
    90 			"__experimentalFontFamily": true,
       
    91 			"__experimentalFontWeight": true,
       
    92 			"__experimentalFontStyle": true,
       
    93 			"__experimentalTextTransform": true,
       
    94 			"__experimentalTextDecoration": true,
       
    95 			"__experimentalLetterSpacing": true,
    72 			"__experimentalDefaultControls": {
    96 			"__experimentalDefaultControls": {
    73 				"fontSize": true
    97 				"fontSize": true
    74 			}
    98 			}
    75 		},
    99 		},
    76 		"reusable": false,
   100 		"reusable": false,
       
   101 		"shadow": {
       
   102 			"__experimentalSkipSerialization": true
       
   103 		},
    77 		"spacing": {
   104 		"spacing": {
    78 			"__experimentalSkipSerialization": true,
   105 			"__experimentalSkipSerialization": true,
    79 			"padding": [ "horizontal", "vertical" ],
   106 			"padding": [ "horizontal", "vertical" ],
    80 			"__experimentalDefaultControls": {
   107 			"__experimentalDefaultControls": {
    81 				"padding": true
   108 				"padding": true
    82 			}
   109 			}
    83 		},
   110 		},
    84 		"__experimentalBorder": {
   111 		"__experimentalBorder": {
       
   112 			"color": true,
    85 			"radius": true,
   113 			"radius": true,
       
   114 			"style": true,
       
   115 			"width": true,
    86 			"__experimentalSkipSerialization": true,
   116 			"__experimentalSkipSerialization": true,
    87 			"__experimentalDefaultControls": {
   117 			"__experimentalDefaultControls": {
    88 				"radius": true
   118 				"color": true,
       
   119 				"radius": true,
       
   120 				"style": true,
       
   121 				"width": true
    89 			}
   122 			}
    90 		},
   123 		},
    91 		"__experimentalSelector": ".wp-block-button__link"
   124 		"__experimentalSelector": ".wp-block-button .wp-block-button__link",
       
   125 		"interactivity": {
       
   126 			"clientNavigation": true
       
   127 		}
    92 	},
   128 	},
    93 	"styles": [
   129 	"styles": [
    94 		{ "name": "fill", "label": "Fill", "isDefault": true },
   130 		{ "name": "fill", "label": "Fill", "isDefault": true },
    95 		{ "name": "outline", "label": "Outline" }
   131 		{ "name": "outline", "label": "Outline" }
    96 	],
   132 	],