@almadar/std 16.10.3 → 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 +147 -146
  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 +147 -146
  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 +147 -146
  24. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "std-stats-hero-metric",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "description": "Hero metric — one elevated card, one oversize number. The headline KPI for executive landing pages and finance hero dashboards.",
5
5
  "orbitals": [
6
6
  {
@@ -21,29 +21,108 @@
21
21
  "required": true
22
22
  },
23
23
  {
24
- "name": "label",
25
- "type": "string",
26
- "required": true
27
- },
28
- {
29
- "name": "value",
30
- "type": "number"
31
- },
32
- {
33
- "name": "icon",
34
- "type": "string"
35
- },
36
- {
37
- "name": "prefix",
38
- "type": "string"
39
- },
40
- {
41
- "name": "suffix",
42
- "type": "string"
43
- },
44
- {
45
- "name": "trend",
46
- "type": "number"
24
+ "name": "cards",
25
+ "type": "array",
26
+ "default": [],
27
+ "items": {
28
+ "type": "object",
29
+ "properties": {
30
+ "max": {
31
+ "name": "max",
32
+ "type": "number",
33
+ "required": false
34
+ },
35
+ "value": {
36
+ "name": "value",
37
+ "type": "number",
38
+ "required": false
39
+ },
40
+ "target": {
41
+ "name": "target",
42
+ "type": "number",
43
+ "required": false
44
+ },
45
+ "icon": {
46
+ "name": "icon",
47
+ "type": "string",
48
+ "required": false
49
+ },
50
+ "format": {
51
+ "name": "format",
52
+ "type": "string",
53
+ "required": false,
54
+ "values": [
55
+ "number",
56
+ "currency",
57
+ "percent"
58
+ ]
59
+ },
60
+ "trendPolarity": {
61
+ "name": "trendPolarity",
62
+ "type": "string",
63
+ "required": false,
64
+ "values": [
65
+ "higher-is-better",
66
+ "lower-is-better"
67
+ ]
68
+ },
69
+ "trendFormat": {
70
+ "name": "trendFormat",
71
+ "type": "string",
72
+ "required": false,
73
+ "values": [
74
+ "absolute",
75
+ "percent"
76
+ ]
77
+ },
78
+ "sparklineData": {
79
+ "name": "sparklineData",
80
+ "type": "array",
81
+ "required": false,
82
+ "items": {
83
+ "type": "number"
84
+ }
85
+ },
86
+ "clickEvent": {
87
+ "name": "clickEvent",
88
+ "type": "string",
89
+ "required": false
90
+ },
91
+ "suffix": {
92
+ "name": "suffix",
93
+ "type": "string",
94
+ "required": false
95
+ },
96
+ "label": {
97
+ "name": "label",
98
+ "type": "string",
99
+ "required": true
100
+ },
101
+ "prefix": {
102
+ "name": "prefix",
103
+ "type": "string",
104
+ "required": false
105
+ },
106
+ "variant": {
107
+ "name": "variant",
108
+ "type": "string",
109
+ "required": false,
110
+ "values": [
111
+ "default",
112
+ "primary",
113
+ "success",
114
+ "warning",
115
+ "error",
116
+ "info"
117
+ ]
118
+ },
119
+ "trend": {
120
+ "name": "trend",
121
+ "type": "number",
122
+ "required": false
123
+ }
124
+ }
125
+ }
47
126
  }
48
127
  ]
49
128
  },
@@ -54,104 +133,133 @@
54
133
  "linkedEntity": "HeroMetricStats",
55
134
  "config": {
56
135
  "bodyContent": {
57
- "direction": "vertical",
58
136
  "gap": "none",
59
- "type": "stack",
60
- "className": "relative w-full rounded-xl shadow-lg overflow-hidden",
61
- "children": [
137
+ "fields": [],
138
+ "entity": "@entity.cards",
139
+ "type": "data-list",
140
+ "renderItem": [
141
+ "fn",
142
+ "card",
62
143
  {
63
- "type": "card",
64
- "padding": "lg",
144
+ "gap": "none",
145
+ "className": "relative w-full rounded-xl shadow-lg overflow-hidden",
146
+ "type": "stack",
65
147
  "children": [
66
148
  {
67
- "className": "relative z-10 w-full max-w-2xl mx-auto text-center",
68
- "direction": "vertical",
69
- "type": "stack",
70
- "align": "center",
71
- "gap": "md",
149
+ "padding": "lg",
150
+ "type": "card",
151
+ "look": "elevated",
72
152
  "children": [
73
153
  {
74
- "gap": "sm",
75
- "align": "center",
76
- "justify": "center",
154
+ "className": "relative z-10 w-full max-w-2xl mx-auto text-center",
77
155
  "type": "stack",
78
156
  "children": [
79
157
  {
80
- "type": "icon",
81
- "name": "@entity.icon",
82
- "color": "muted",
83
- "size": "md"
158
+ "align": "center",
159
+ "children": [
160
+ {
161
+ "type": "icon",
162
+ "color": "muted",
163
+ "size": "md",
164
+ "name": "@card.icon"
165
+ },
166
+ {
167
+ "variant": "overline",
168
+ "content": "@card.label",
169
+ "type": "typography",
170
+ "weight": "bold",
171
+ "color": "muted",
172
+ "className": "uppercase tracking-widest"
173
+ }
174
+ ],
175
+ "gap": "sm",
176
+ "type": "stack",
177
+ "justify": "center",
178
+ "direction": "horizontal"
84
179
  },
85
180
  {
86
- "className": "uppercase tracking-widest",
87
- "color": "muted",
88
- "variant": "overline",
89
- "weight": "bold",
90
- "type": "typography",
91
- "content": "@entity.label"
92
- }
93
- ],
94
- "direction": "horizontal"
95
- },
96
- {
97
- "children": [
98
- {
99
- "color": "muted",
100
- "weight": "normal",
101
- "type": "typography",
102
- "variant": "h2",
103
- "content": "@entity.prefix"
181
+ "className": "py-section",
182
+ "gap": "xs",
183
+ "children": [
184
+ {
185
+ "type": "typography",
186
+ "variant": "h2",
187
+ "color": "muted",
188
+ "weight": "normal",
189
+ "content": "@card.prefix"
190
+ },
191
+ {
192
+ "value": "@card.value",
193
+ "className": "text-7xl md:text-8xl font-bold tracking-tighter tabular-nums text-[var(--color-foreground)]",
194
+ "type": "animated-counter"
195
+ },
196
+ {
197
+ "content": "@card.suffix",
198
+ "variant": "h2",
199
+ "type": "typography",
200
+ "color": "muted",
201
+ "weight": "normal"
202
+ }
203
+ ],
204
+ "align": "baseline",
205
+ "justify": "center",
206
+ "type": "stack",
207
+ "direction": "horizontal"
104
208
  },
105
209
  {
106
- "value": "@entity.value",
107
- "className": "text-7xl md:text-8xl font-bold tracking-tighter tabular-nums text-[var(--color-foreground)]",
108
- "type": "animated-counter"
109
- },
110
- {
111
- "type": "typography",
112
- "content": "@entity.suffix",
113
- "variant": "h2",
114
- "color": "muted",
115
- "weight": "normal"
210
+ "showValue": true,
211
+ "type": "trend-indicator",
212
+ "size": "md",
213
+ "value": "@card.trend"
116
214
  }
117
215
  ],
118
- "type": "stack",
119
- "align": "baseline",
120
- "justify": "center",
121
- "gap": "xs",
122
- "className": "py-section",
123
- "direction": "horizontal"
216
+ "gap": "md",
217
+ "direction": "vertical",
218
+ "align": "center"
124
219
  },
125
220
  {
126
- "value": "@entity.trend",
127
- "type": "trend-indicator",
128
- "showValue": true,
129
- "size": "md"
221
+ "data": "@card.sparklineData",
222
+ "color": "auto",
223
+ "type": "sparkline",
224
+ "strokeWidth": 1.0,
225
+ "height": 96.0,
226
+ "fill": true,
227
+ "className": "absolute inset-x-0 bottom-0 w-full opacity-10 pointer-events-none"
130
228
  }
131
229
  ]
132
- },
133
- {
134
- "height": 96.0,
135
- "fill": true,
136
- "color": "auto",
137
- "type": "sparkline",
138
- "className": "absolute inset-x-0 bottom-0 w-full opacity-10 pointer-events-none",
139
- "strokeWidth": 1.0,
140
- "data": [
141
- 1.0,
142
- 2.0,
143
- 3.0,
144
- 4.0,
145
- 5.0,
146
- 6.0,
147
- 7.0
148
- ]
149
230
  }
150
231
  ],
151
- "look": "elevated"
232
+ "direction": "vertical"
152
233
  }
153
234
  ]
154
- }
235
+ },
236
+ "metrics": [
237
+ {
238
+ "trendFormat": "percent",
239
+ "trend": 12.5,
240
+ "label": "Monthly Recurring Revenue",
241
+ "variant": "success",
242
+ "value": 128400.0,
243
+ "prefix": "$",
244
+ "trendPolarity": "higher-is-better",
245
+ "icon": "dollar-sign",
246
+ "format": "currency",
247
+ "sparklineData": [
248
+ 86000.0,
249
+ 91000.0,
250
+ 89500.0,
251
+ 97000.0,
252
+ 104000.0,
253
+ 101500.0,
254
+ 110000.0,
255
+ 116000.0,
256
+ 119500.0,
257
+ 123000.0,
258
+ 126200.0,
259
+ 128400.0
260
+ ]
261
+ }
262
+ ]
155
263
  }
156
264
  }
157
265
  ],