block.json
151 lines
| 1 | { |
| 2 | "name": "kubio/divider", |
| 3 | "category": "kubio-basic", |
| 4 | "attributes": { |
| 5 | "kubio": { |
| 6 | "type": "object" |
| 7 | }, |
| 8 | "iconName": { |
| 9 | "type": "string" |
| 10 | } |
| 11 | }, |
| 12 | "supports": { |
| 13 | "kubio": { |
| 14 | "appearanceEffect": true, |
| 15 | "default": { |
| 16 | "props": { |
| 17 | "type": "icon" |
| 18 | }, |
| 19 | "style": { |
| 20 | "descendants": { |
| 21 | "line": { |
| 22 | "border": { |
| 23 | "top": { |
| 24 | "style": "none" |
| 25 | }, |
| 26 | "left": { |
| 27 | "style": "none" |
| 28 | }, |
| 29 | "right": { |
| 30 | "style": "none" |
| 31 | }, |
| 32 | "bottom": { |
| 33 | "color": "rgba(var(--kubio-color-1),1)", |
| 34 | "style": "solid", |
| 35 | "width": { |
| 36 | "value": 3, |
| 37 | "unit": "px" |
| 38 | } |
| 39 | } |
| 40 | } |
| 41 | }, |
| 42 | "width-container": { |
| 43 | "width": { |
| 44 | "value": 100, |
| 45 | "unit": "px" |
| 46 | } |
| 47 | }, |
| 48 | "outer": { |
| 49 | "padding": { |
| 50 | "top": { |
| 51 | "value": 10, |
| 52 | "unit": "px" |
| 53 | }, |
| 54 | "bottom": { |
| 55 | "value": 10, |
| 56 | "unit": "px" |
| 57 | } |
| 58 | } |
| 59 | }, |
| 60 | "inner": { |
| 61 | "fill": "rgba(var(--kubio-color-1),1)", |
| 62 | "width": { |
| 63 | "value": 40, |
| 64 | "unit": "px" |
| 65 | }, |
| 66 | "height": { |
| 67 | "value": 40, |
| 68 | "unit": "px" |
| 69 | }, |
| 70 | "margin": { |
| 71 | "left": { |
| 72 | "value": "10", |
| 73 | "unit": "px" |
| 74 | }, |
| 75 | "right": { |
| 76 | "value": "10", |
| 77 | "unit": "px" |
| 78 | } |
| 79 | } |
| 80 | } |
| 81 | } |
| 82 | } |
| 83 | }, |
| 84 | "elementsEnum": { |
| 85 | "OUTER": "outer", |
| 86 | "LINE": "line", |
| 87 | "INNER": "inner", |
| 88 | "WIDTH_CONTAINER": "width-container" |
| 89 | }, |
| 90 | "elementsByName": { |
| 91 | "outer": { |
| 92 | "wrapper": true, |
| 93 | "default": true, |
| 94 | "className": [ |
| 95 | "kubio-divider" |
| 96 | ] |
| 97 | }, |
| 98 | "width-container": { |
| 99 | "internal": true |
| 100 | }, |
| 101 | "line": { |
| 102 | "className": [ |
| 103 | "canvas-divider" |
| 104 | ] |
| 105 | }, |
| 106 | "inner": { |
| 107 | "props": { |
| 108 | "tag": "icon" |
| 109 | } |
| 110 | } |
| 111 | }, |
| 112 | "template": { |
| 113 | "type": "element", |
| 114 | "props": { |
| 115 | "name": "outer" |
| 116 | }, |
| 117 | "children": [ |
| 118 | { |
| 119 | "type": "element", |
| 120 | "props": { |
| 121 | "name": "width-container" |
| 122 | }, |
| 123 | "children": [ |
| 124 | { |
| 125 | "type": "element", |
| 126 | "props": { |
| 127 | "name": "line" |
| 128 | } |
| 129 | }, |
| 130 | { |
| 131 | "type": "element", |
| 132 | "props": { |
| 133 | "name": "inner", |
| 134 | "shouldRender": "computed.iconEnabled" |
| 135 | } |
| 136 | }, |
| 137 | { |
| 138 | "type": "element", |
| 139 | "props": { |
| 140 | "name": "line", |
| 141 | "shouldRender": "computed.iconEnabled" |
| 142 | } |
| 143 | } |
| 144 | ] |
| 145 | } |
| 146 | ] |
| 147 | } |
| 148 | } |
| 149 | } |
| 150 | } |
| 151 |