@almadar/std 16.10.2 → 16.10.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/behaviors/registry/core-variations/atoms/std-browse-command-palette.orb +64 -62
  2. package/behaviors/registry/core-variations/atoms/std-browse-dense.orb +48 -46
  3. package/behaviors/registry/core-variations/atoms/std-browse-gallery.orb +55 -54
  4. package/behaviors/registry/core-variations/atoms/std-stats-hero-metric.orb +207 -99
  5. package/behaviors/registry/core-variations/atoms/std-stats-kpi-tiles.orb +215 -141
  6. package/behaviors/registry/core-variations/atoms/std-stats-sparkline-row.orb +215 -129
  7. package/behaviors/registry/core-variations/atoms/std-thread-email-threaded.orb +157 -147
  8. package/dist/behaviors/behaviors-registry.json +1 -1
  9. package/dist/behaviors/registry/core-variations/atoms/std-browse-command-palette.orb +64 -62
  10. package/dist/behaviors/registry/core-variations/atoms/std-browse-dense.orb +48 -46
  11. package/dist/behaviors/registry/core-variations/atoms/std-browse-gallery.orb +55 -54
  12. package/dist/behaviors/registry/core-variations/atoms/std-stats-hero-metric.orb +207 -99
  13. package/dist/behaviors/registry/core-variations/atoms/std-stats-kpi-tiles.orb +215 -141
  14. package/dist/behaviors/registry/core-variations/atoms/std-stats-sparkline-row.orb +215 -129
  15. package/dist/behaviors/registry/core-variations/atoms/std-thread-email-threaded.orb +157 -147
  16. package/dist/behaviors-registry.json +1 -1
  17. package/dist/registry/core-variations/atoms/std-browse-command-palette.orb +64 -62
  18. package/dist/registry/core-variations/atoms/std-browse-dense.orb +48 -46
  19. package/dist/registry/core-variations/atoms/std-browse-gallery.orb +55 -54
  20. package/dist/registry/core-variations/atoms/std-stats-hero-metric.orb +207 -99
  21. package/dist/registry/core-variations/atoms/std-stats-kpi-tiles.orb +215 -141
  22. package/dist/registry/core-variations/atoms/std-stats-sparkline-row.orb +215 -129
  23. package/dist/registry/core-variations/atoms/std-thread-email-threaded.orb +157 -147
  24. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "std-stats-kpi-tiles",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "KPI tiles — Stripe-dashboard style. 3–4 large numeric tiles arranged in a horizontal grid: huge typography number, label below, optional change indicator and sparkline hint. For trading dashboards, finance trackers, ecommerce metrics, payment volume. Same StatsItemStats trait, same aggregation pipeline, same listens as std-stats — only the bodyContent tree differs.",
5
5
  "orbitals": [
6
6
  {
@@ -27,6 +27,37 @@
27
27
  "items": {
28
28
  "type": "object",
29
29
  "properties": {
30
+ "trendPolarity": {
31
+ "name": "trendPolarity",
32
+ "type": "string",
33
+ "required": false,
34
+ "values": [
35
+ "higher-is-better",
36
+ "lower-is-better"
37
+ ]
38
+ },
39
+ "trendFormat": {
40
+ "name": "trendFormat",
41
+ "type": "string",
42
+ "required": false,
43
+ "values": [
44
+ "absolute",
45
+ "percent"
46
+ ]
47
+ },
48
+ "sparklineData": {
49
+ "name": "sparklineData",
50
+ "type": "array",
51
+ "required": false,
52
+ "items": {
53
+ "type": "number"
54
+ }
55
+ },
56
+ "clickEvent": {
57
+ "name": "clickEvent",
58
+ "type": "string",
59
+ "required": false
60
+ },
30
61
  "variant": {
31
62
  "name": "variant",
32
63
  "type": "string",
@@ -40,24 +71,14 @@
40
71
  "info"
41
72
  ]
42
73
  },
43
- "icon": {
44
- "name": "icon",
45
- "type": "string",
46
- "required": false
47
- },
48
- "target": {
49
- "name": "target",
50
- "type": "number",
51
- "required": false
52
- },
53
74
  "value": {
54
75
  "name": "value",
55
76
  "type": "number",
56
77
  "required": false
57
78
  },
58
- "max": {
59
- "name": "max",
60
- "type": "number",
79
+ "prefix": {
80
+ "name": "prefix",
81
+ "type": "string",
61
82
  "required": false
62
83
  },
63
84
  "trend": {
@@ -65,61 +86,40 @@
65
86
  "type": "number",
66
87
  "required": false
67
88
  },
68
- "clickEvent": {
69
- "name": "clickEvent",
70
- "type": "string",
71
- "required": false
72
- },
73
- "format": {
74
- "name": "format",
75
- "type": "string",
76
- "required": false,
77
- "values": [
78
- "number",
79
- "currency",
80
- "percent"
81
- ]
82
- },
83
- "trendPolarity": {
84
- "name": "trendPolarity",
85
- "type": "string",
86
- "required": false,
87
- "values": [
88
- "higher-is-better",
89
- "lower-is-better"
90
- ]
91
- },
92
89
  "label": {
93
90
  "name": "label",
94
91
  "type": "string",
95
92
  "required": true
96
93
  },
94
+ "icon": {
95
+ "name": "icon",
96
+ "type": "string",
97
+ "required": false
98
+ },
99
+ "target": {
100
+ "name": "target",
101
+ "type": "number",
102
+ "required": false
103
+ },
97
104
  "suffix": {
98
105
  "name": "suffix",
99
106
  "type": "string",
100
107
  "required": false
101
108
  },
102
- "trendFormat": {
103
- "name": "trendFormat",
109
+ "format": {
110
+ "name": "format",
104
111
  "type": "string",
105
112
  "required": false,
106
113
  "values": [
107
- "absolute",
114
+ "number",
115
+ "currency",
108
116
  "percent"
109
117
  ]
110
118
  },
111
- "prefix": {
112
- "name": "prefix",
113
- "type": "string",
119
+ "max": {
120
+ "name": "max",
121
+ "type": "number",
114
122
  "required": false
115
- },
116
- "sparklineData": {
117
- "name": "sparklineData",
118
- "type": "array",
119
- "required": false,
120
- "items": {
121
- "type": "number"
122
- }
123
123
  }
124
124
  }
125
125
  }
@@ -133,110 +133,184 @@
133
133
  "linkedEntity": "KpiTileStats",
134
134
  "config": {
135
135
  "bodyContent": {
136
- "gap": "lg",
137
- "type": "simple-grid",
136
+ "fields": [],
138
137
  "className": "w-full",
139
- "cols": 4.0,
140
- "children": [
138
+ "renderItem": [
139
+ "fn",
140
+ "card",
141
141
  {
142
- "fields": [],
143
- "type": "data-list",
144
- "entity": "@entity.cards",
145
- "cols": 4.0,
146
- "renderItem": [
147
- "fn",
148
- "card",
142
+ "className": "rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-card-lg shadow-elevation-sm hover:shadow-elevation-md transition-shadow",
143
+ "type": "stack",
144
+ "gap": "sm",
145
+ "children": [
149
146
  {
147
+ "align": "center",
148
+ "direction": "horizontal",
149
+ "gap": "xs",
150
+ "type": "stack",
151
+ "justify": "between",
150
152
  "children": [
151
153
  {
152
- "gap": "xs",
153
- "justify": "between",
154
- "type": "stack",
155
- "children": [
156
- {
157
- "content": "@card.label",
158
- "color": "muted",
159
- "weight": "medium",
160
- "className": "uppercase tracking-wide",
161
- "type": "typography",
162
- "variant": "caption"
163
- },
164
- {
165
- "type": "icon",
166
- "name": "@card.icon",
167
- "color": "muted",
168
- "size": "sm"
169
- }
170
- ],
171
- "direction": "horizontal",
172
- "align": "center"
154
+ "content": "@card.label",
155
+ "variant": "caption",
156
+ "color": "muted",
157
+ "type": "typography",
158
+ "weight": "medium",
159
+ "className": "uppercase tracking-wide"
173
160
  },
174
161
  {
175
- "direction": "horizontal",
176
- "gap": "xs",
177
- "type": "stack",
178
- "align": "baseline",
179
- "children": [
180
- {
181
- "type": "typography",
182
- "variant": "caption",
183
- "color": "muted",
184
- "content": "@card.prefix"
185
- },
186
- {
187
- "className": "text-4xl font-bold tracking-tight",
188
- "value": "@card.value",
189
- "type": "animated-counter"
190
- },
191
- {
192
- "type": "typography",
193
- "color": "muted",
194
- "variant": "caption",
195
- "content": "@card.suffix"
196
- }
197
- ]
162
+ "type": "icon",
163
+ "name": "@card.icon",
164
+ "color": "muted",
165
+ "size": "sm"
166
+ }
167
+ ]
168
+ },
169
+ {
170
+ "children": [
171
+ {
172
+ "type": "typography",
173
+ "variant": "caption",
174
+ "content": "@card.prefix",
175
+ "color": "muted"
198
176
  },
199
177
  {
200
- "direction": "horizontal",
201
- "align": "center",
202
- "type": "stack",
203
- "gap": "sm",
204
- "children": [
205
- {
206
- "showValue": true,
207
- "type": "trend-indicator",
208
- "value": "@card.trend",
209
- "size": "sm"
210
- },
211
- {
212
- "type": "sparkline",
213
- "color": "auto",
214
- "fill": true,
215
- "className": "flex-1",
216
- "data": [
217
- 1.0,
218
- 2.0,
219
- 3.0,
220
- 4.0,
221
- 5.0,
222
- 6.0,
223
- 7.0
224
- ],
225
- "height": 24.0
226
- }
227
- ]
178
+ "value": "@card.value",
179
+ "className": "text-4xl font-bold tracking-tight",
180
+ "type": "animated-counter"
181
+ },
182
+ {
183
+ "type": "typography",
184
+ "variant": "caption",
185
+ "color": "muted",
186
+ "content": "@card.suffix"
228
187
  }
229
188
  ],
230
- "gap": "sm",
189
+ "gap": "xs",
190
+ "direction": "horizontal",
191
+ "type": "stack",
192
+ "align": "baseline"
193
+ },
194
+ {
231
195
  "type": "stack",
232
- "direction": "vertical",
233
- "className": "rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-card-lg shadow-elevation-sm hover:shadow-elevation-md transition-shadow"
196
+ "children": [
197
+ {
198
+ "type": "trend-indicator",
199
+ "size": "sm",
200
+ "value": "@card.trend",
201
+ "showValue": true
202
+ },
203
+ {
204
+ "className": "flex-1",
205
+ "color": "auto",
206
+ "data": "@card.sparklineData",
207
+ "type": "sparkline",
208
+ "height": 24.0,
209
+ "fill": true
210
+ }
211
+ ],
212
+ "direction": "horizontal",
213
+ "gap": "sm",
214
+ "align": "center"
234
215
  }
235
216
  ],
236
- "gap": "lg"
217
+ "direction": "vertical"
237
218
  }
238
- ]
239
- }
219
+ ],
220
+ "cols": 4.0,
221
+ "gap": "lg",
222
+ "type": "data-grid",
223
+ "entity": "@entity.cards"
224
+ },
225
+ "metrics": [
226
+ {
227
+ "prefix": "$",
228
+ "icon": "dollar-sign",
229
+ "trendPolarity": "higher-is-better",
230
+ "variant": "success",
231
+ "trendFormat": "percent",
232
+ "sparklineData": [
233
+ 42000.0,
234
+ 45000.0,
235
+ 43500.0,
236
+ 48000.0,
237
+ 52000.0,
238
+ 50500.0,
239
+ 58000.0,
240
+ 61000.0,
241
+ 59000.0,
242
+ 64200.0,
243
+ 67800.0,
244
+ 72400.0
245
+ ],
246
+ "value": 72400.0,
247
+ "trend": 12.4,
248
+ "label": "Revenue",
249
+ "format": "currency"
250
+ },
251
+ {
252
+ "trend": 8.1,
253
+ "variant": "primary",
254
+ "trendPolarity": "higher-is-better",
255
+ "label": "Active Users",
256
+ "trendFormat": "percent",
257
+ "value": 3240.0,
258
+ "sparklineData": [
259
+ 2800.0,
260
+ 2950.0,
261
+ 2900.0,
262
+ 3100.0,
263
+ 3050.0,
264
+ 3200.0,
265
+ 3180.0,
266
+ 3240.0
267
+ ],
268
+ "format": "number",
269
+ "icon": "users"
270
+ },
271
+ {
272
+ "label": "Conversion",
273
+ "sparklineData": [
274
+ 5.2,
275
+ 5.0,
276
+ 4.8,
277
+ 4.9,
278
+ 4.6,
279
+ 4.7,
280
+ 4.5,
281
+ 4.7
282
+ ],
283
+ "variant": "info",
284
+ "value": 4.7,
285
+ "trendPolarity": "higher-is-better",
286
+ "icon": "trending-up",
287
+ "trend": -1.2,
288
+ "trendFormat": "percent",
289
+ "format": "percent",
290
+ "suffix": "%"
291
+ },
292
+ {
293
+ "format": "percent",
294
+ "variant": "warning",
295
+ "trend": -0.4,
296
+ "value": 1.9,
297
+ "trendFormat": "percent",
298
+ "trendPolarity": "lower-is-better",
299
+ "sparklineData": [
300
+ 2.3,
301
+ 2.1,
302
+ 2.2,
303
+ 2.0,
304
+ 1.9,
305
+ 2.0,
306
+ 1.8,
307
+ 1.9
308
+ ],
309
+ "icon": "trending-down",
310
+ "label": "Churn",
311
+ "suffix": "%"
312
+ }
313
+ ]
240
314
  }
241
315
  }
242
316
  ],