| 1 |
{ |
| 2 |
"apiVersion": 3, |
| 3 |
"$schema": "https://schemas.wp.org/trunk/block.json", |
| 4 |
"name": "blockenberg/kpi-tiles", |
| 5 |
"title": "KPI Tiles", |
| 6 |
"category": "bkbg-business", |
| 7 |
"description": "Metric tiles grid with numbers, labels, trend indicators and mini sparkline charts.", |
| 8 |
"keywords": [ |
| 9 |
"kpi", |
| 10 |
"metrics", |
| 11 |
"stats", |
| 12 |
"sparkline", |
| 13 |
"dashboard" |
| 14 |
], |
| 15 |
"textdomain": "blockenberg", |
| 16 |
"editorScript": "bkbg-kpi-tiles-editor", |
| 17 |
"style": "bkbg-kpi-tiles-style", |
| 18 |
"viewScript": "bkbg-kpi-tiles-frontend", |
| 19 |
"supports": { |
| 20 |
"html": false, |
| 21 |
"anchor": true, |
| 22 |
"className": true, |
| 23 |
"align": [ |
| 24 |
"wide", |
| 25 |
"full" |
| 26 |
] |
| 27 |
}, |
| 28 |
"attributes": { |
| 29 |
"tiles": { |
| 30 |
"type": "array", |
| 31 |
"default": [ |
| 32 |
{ |
| 33 |
"label": "Revenue", |
| 34 |
"value": "$124,500", |
| 35 |
"trend": "+18%", |
| 36 |
"direction": "up", |
| 37 |
"sparkline": "40,55,45,70,60,80,90,75,95,110", |
| 38 |
"icon": "💰", |
| 39 |
"iconType": "custom-char", |
| 40 |
"iconDashicon": "", |
| 41 |
"iconImageUrl": "" |
| 42 |
}, |
| 43 |
{ |
| 44 |
"label": "Users", |
| 45 |
"value": "38,421", |
| 46 |
"trend": "+12%", |
| 47 |
"direction": "up", |
| 48 |
"sparkline": "20,30,28,40,38,50,55,48,60,72", |
| 49 |
"icon": "👥", |
| 50 |
"iconType": "custom-char", |
| 51 |
"iconDashicon": "", |
| 52 |
"iconImageUrl": "" |
| 53 |
}, |
| 54 |
{ |
| 55 |
"label": "Churn Rate", |
| 56 |
"value": "2.4%", |
| 57 |
"trend": "-0.6%", |
| 58 |
"direction": "down-good", |
| 59 |
"sparkline": "10,9,8,10,7,6,8,5,4,3", |
| 60 |
"icon": "📉", |
| 61 |
"iconType": "custom-char", |
| 62 |
"iconDashicon": "", |
| 63 |
"iconImageUrl": "" |
| 64 |
}, |
| 65 |
{ |
| 66 |
"label": "NPS Score", |
| 67 |
"value": "74", |
| 68 |
"trend": "+5 pts", |
| 69 |
"direction": "up", |
| 70 |
"sparkline": "50,55,52,60,58,65,68,70,72,74", |
| 71 |
"icon": "⭐", |
| 72 |
"iconType": "custom-char", |
| 73 |
"iconDashicon": "", |
| 74 |
"iconImageUrl": "" |
| 75 |
} |
| 76 |
] |
| 77 |
}, |
| 78 |
"columns": { |
| 79 |
"type": "number", |
| 80 |
"default": 4 |
| 81 |
}, |
| 82 |
"showSparkline": { |
| 83 |
"type": "boolean", |
| 84 |
"default": true |
| 85 |
}, |
| 86 |
"showIcon": { |
| 87 |
"type": "boolean", |
| 88 |
"default": true |
| 89 |
}, |
| 90 |
"showTrend": { |
| 91 |
"type": "boolean", |
| 92 |
"default": true |
| 93 |
}, |
| 94 |
"animateNumbers": { |
| 95 |
"type": "boolean", |
| 96 |
"default": true |
| 97 |
}, |
| 98 |
"cardRadius": { |
| 99 |
"type": "number", |
| 100 |
"default": 16 |
| 101 |
}, |
| 102 |
"cardPadding": { |
| 103 |
"type": "number", |
| 104 |
"default": 24 |
| 105 |
}, |
| 106 |
"sparklineHeight": { |
| 107 |
"type": "number", |
| 108 |
"default": 48 |
| 109 |
}, |
| 110 |
"sparklineWidth": { |
| 111 |
"type": "number", |
| 112 |
"default": 120 |
| 113 |
}, |
| 114 |
"valueSize": { |
| 115 |
"type": "number", |
| 116 |
"default": 32 |
| 117 |
}, |
| 118 |
"labelSize": { |
| 119 |
"type": "number", |
| 120 |
"default": 13 |
| 121 |
}, |
| 122 |
"trendSize": { |
| 123 |
"type": "number", |
| 124 |
"default": 12 |
| 125 |
}, |
| 126 |
"iconSize": { |
| 127 |
"type": "number", |
| 128 |
"default": 32 |
| 129 |
}, |
| 130 |
"cardBg": { |
| 131 |
"type": "string", |
| 132 |
"default": "#ffffff" |
| 133 |
}, |
| 134 |
"cardShadow": { |
| 135 |
"type": "string", |
| 136 |
"default": "rgba(0,0,0,0.08)" |
| 137 |
}, |
| 138 |
"valueColor": { |
| 139 |
"type": "string", |
| 140 |
"default": "#0f172a" |
| 141 |
}, |
| 142 |
"labelColor": { |
| 143 |
"type": "string", |
| 144 |
"default": "#64748b" |
| 145 |
}, |
| 146 |
"upColor": { |
| 147 |
"type": "string", |
| 148 |
"default": "#10b981" |
| 149 |
}, |
| 150 |
"downColor": { |
| 151 |
"type": "string", |
| 152 |
"default": "#ef4444" |
| 153 |
}, |
| 154 |
"downGoodColor": { |
| 155 |
"type": "string", |
| 156 |
"default": "#10b981" |
| 157 |
}, |
| 158 |
"sparklineColor": { |
| 159 |
"type": "string", |
| 160 |
"default": "#6366f1" |
| 161 |
}, |
| 162 |
"sparklineFill": { |
| 163 |
"type": "string", |
| 164 |
"default": "rgba(99,102,241,0.12)" |
| 165 |
}, |
| 166 |
"sectionBg": { |
| 167 |
"type": "string", |
| 168 |
"default": "transparent" |
| 169 |
}, |
| 170 |
"borderColor": { |
| 171 |
"type": "string", |
| 172 |
"default": "transparent" |
| 173 |
}, |
| 174 |
"valueTypo": { |
| 175 |
"type": "object", |
| 176 |
"default": {} |
| 177 |
}, |
| 178 |
"labelTypo": { |
| 179 |
"type": "object", |
| 180 |
"default": {} |
| 181 |
}, |
| 182 |
"trendTypo": { |
| 183 |
"type": "object", |
| 184 |
"default": {} |
| 185 |
} |
| 186 |
} |
| 187 |
} |
| 188 |
|