block.json
229 lines
| 1 | { |
| 2 | "name": "kubio/menu-offscreen", |
| 3 | "category": "kubio-basic", |
| 4 | "attributes": { |
| 5 | "kubio": { |
| 6 | "type": "object" |
| 7 | }, |
| 8 | "openSide": { |
| 9 | "type": "string", |
| 10 | "default": "right" |
| 11 | }, |
| 12 | "icon": { |
| 13 | "type": "string", |
| 14 | "default": "font-awesome/navicon" |
| 15 | } |
| 16 | }, |
| 17 | "supports": { |
| 18 | "kubio": { |
| 19 | "default": { |
| 20 | "style": { |
| 21 | "descendants": { |
| 22 | "offscreen": { |
| 23 | "background": { |
| 24 | "color": "#222B34" |
| 25 | }, |
| 26 | "width": { |
| 27 | "value": 300, |
| 28 | "unit": "px", |
| 29 | "important": true |
| 30 | } |
| 31 | }, |
| 32 | "offscreenOverlay": { |
| 33 | "background": { |
| 34 | "color": "rgba(0,0,0,0.5)" |
| 35 | } |
| 36 | }, |
| 37 | "icon": { |
| 38 | "background": { |
| 39 | "color": "rgba(0, 0, 0, 0.1)" |
| 40 | }, |
| 41 | "border": { |
| 42 | "top": { |
| 43 | "radius": { |
| 44 | "left": { |
| 45 | "unit": "%", |
| 46 | "value": "100" |
| 47 | }, |
| 48 | "right": { |
| 49 | "unit": "%", |
| 50 | "value": "100" |
| 51 | } |
| 52 | }, |
| 53 | "width": { |
| 54 | "value": "0", |
| 55 | "unit": "px" |
| 56 | }, |
| 57 | "style": "solid", |
| 58 | "color": "black" |
| 59 | }, |
| 60 | "left": { |
| 61 | "width": { |
| 62 | "value": "0", |
| 63 | "unit": "px" |
| 64 | }, |
| 65 | "style": "solid", |
| 66 | "color": "black" |
| 67 | }, |
| 68 | "right": { |
| 69 | "width": { |
| 70 | "value": "0", |
| 71 | "unit": "px" |
| 72 | }, |
| 73 | "style": "solid", |
| 74 | "color": "black" |
| 75 | }, |
| 76 | "bottom": { |
| 77 | "radius": { |
| 78 | "left": { |
| 79 | "unit": "%", |
| 80 | "value": "100" |
| 81 | }, |
| 82 | "right": { |
| 83 | "unit": "%", |
| 84 | "value": "100" |
| 85 | } |
| 86 | }, |
| 87 | "width": { |
| 88 | "value": "0", |
| 89 | "unit": "px" |
| 90 | }, |
| 91 | "style": "solid", |
| 92 | "color": "black" |
| 93 | } |
| 94 | }, |
| 95 | "fill": "white", |
| 96 | "padding": { |
| 97 | "top": { |
| 98 | "unit": "px", |
| 99 | "value": "5" |
| 100 | }, |
| 101 | "bottom": { |
| 102 | "unit": "px", |
| 103 | "value": "5" |
| 104 | }, |
| 105 | "left": { |
| 106 | "unit": "px", |
| 107 | "value": "5" |
| 108 | }, |
| 109 | "right": { |
| 110 | "unit": "px", |
| 111 | "value": "5" |
| 112 | } |
| 113 | }, |
| 114 | "width": { |
| 115 | "unit": "px", |
| 116 | "value": "24" |
| 117 | }, |
| 118 | "height": { |
| 119 | "unit": "px", |
| 120 | "value": "24" |
| 121 | } |
| 122 | } |
| 123 | } |
| 124 | } |
| 125 | }, |
| 126 | "elementsEnum": { |
| 127 | "CONTAINER": "container", |
| 128 | "OFFSCREEN": "offscreen", |
| 129 | "OFFSCREEN_OVERLAY": "offscreenOverlay", |
| 130 | "ICON_WRAPPER": "iconWrapper", |
| 131 | "ICON": "icon", |
| 132 | "ALIGN": "align" |
| 133 | }, |
| 134 | "elementsByName": { |
| 135 | "container": { |
| 136 | "wrapper": true |
| 137 | }, |
| 138 | "iconWrapper": { |
| 139 | "props": { |
| 140 | "tag": "button", |
| 141 | "className": [ |
| 142 | "kubio-offscreen-icon-wrapper" |
| 143 | ] |
| 144 | } |
| 145 | }, |
| 146 | "icon": { |
| 147 | "default": true, |
| 148 | "props": { |
| 149 | "tag": "icon" |
| 150 | } |
| 151 | }, |
| 152 | "offscreen": { |
| 153 | "useWrapperPrefix": false, |
| 154 | "usePrefix": false, |
| 155 | "props": { |
| 156 | "className": [ |
| 157 | "kubio-offscreen", |
| 158 | "offscreen" |
| 159 | ] |
| 160 | } |
| 161 | }, |
| 162 | "offscreenOverlay": { |
| 163 | "useWrapperPrefix": false, |
| 164 | "usePrefix": false, |
| 165 | "props": { |
| 166 | "className": [ |
| 167 | "kubio-offscreen-overlay" |
| 168 | ] |
| 169 | } |
| 170 | } |
| 171 | }, |
| 172 | "template": { |
| 173 | "type": "element", |
| 174 | "props": { |
| 175 | "name": "container" |
| 176 | }, |
| 177 | "children": [ |
| 178 | { |
| 179 | "type": "element", |
| 180 | "props": { |
| 181 | "name": "align" |
| 182 | }, |
| 183 | "children": [ |
| 184 | { |
| 185 | "type": "element", |
| 186 | "props": { |
| 187 | "name": "iconWrapper" |
| 188 | }, |
| 189 | "children": [ |
| 190 | { |
| 191 | "type": "element", |
| 192 | "props": { |
| 193 | "name": "icon" |
| 194 | } |
| 195 | } |
| 196 | ] |
| 197 | } |
| 198 | ] |
| 199 | }, |
| 200 | { |
| 201 | "type": "element", |
| 202 | "props": { |
| 203 | "name": "offscreenOverlay" |
| 204 | } |
| 205 | }, |
| 206 | { |
| 207 | "type": "element", |
| 208 | "props": { |
| 209 | "name": "offscreen" |
| 210 | }, |
| 211 | "children": [ |
| 212 | { |
| 213 | "type": "element", |
| 214 | "props": { |
| 215 | "name": "inner" |
| 216 | }, |
| 217 | "children": [ |
| 218 | { |
| 219 | "type": "wp:InnerBlocks" |
| 220 | } |
| 221 | ] |
| 222 | } |
| 223 | ] |
| 224 | } |
| 225 | ] |
| 226 | } |
| 227 | } |
| 228 | } |
| 229 | } |