@flux-ui/statistics 3.0.0-next.28

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 (57) hide show
  1. package/README.md +16 -0
  2. package/dist/component/FluxStatisticsAreaChart.vue.d.ts +9 -0
  3. package/dist/component/FluxStatisticsBarChart.vue.d.ts +9 -0
  4. package/dist/component/FluxStatisticsBase.vue.d.ts +28 -0
  5. package/dist/component/FluxStatisticsChange.vue.d.ts +9 -0
  6. package/dist/component/FluxStatisticsChart.vue.d.ts +22 -0
  7. package/dist/component/FluxStatisticsChartPane.vue.d.ts +32 -0
  8. package/dist/component/FluxStatisticsDetailsTable.vue.d.ts +23 -0
  9. package/dist/component/FluxStatisticsDetailsTableRow.vue.d.ts +7 -0
  10. package/dist/component/FluxStatisticsDonutChart.vue.d.ts +9 -0
  11. package/dist/component/FluxStatisticsGrid.vue.d.ts +26 -0
  12. package/dist/component/FluxStatisticsKpi.vue.d.ts +11 -0
  13. package/dist/component/FluxStatisticsLegend.vue.d.ts +18 -0
  14. package/dist/component/FluxStatisticsLegendItem.vue.d.ts +10 -0
  15. package/dist/component/FluxStatisticsLineChart.vue.d.ts +9 -0
  16. package/dist/component/FluxStatisticsMeter.vue.d.ts +14 -0
  17. package/dist/component/FluxStatisticsMetric.vue.d.ts +29 -0
  18. package/dist/component/FluxStatisticsPieChart.vue.d.ts +9 -0
  19. package/dist/component/index.d.ts +17 -0
  20. package/dist/index.css +492 -0
  21. package/dist/index.d.ts +3 -0
  22. package/dist/index.js +10184 -0
  23. package/dist/index.js.map +1 -0
  24. package/dist/types.d.ts +13 -0
  25. package/package.json +77 -0
  26. package/src/component/FluxStatisticsAreaChart.vue +59 -0
  27. package/src/component/FluxStatisticsBarChart.vue +51 -0
  28. package/src/component/FluxStatisticsBase.vue +43 -0
  29. package/src/component/FluxStatisticsChange.vue +37 -0
  30. package/src/component/FluxStatisticsChart.vue +193 -0
  31. package/src/component/FluxStatisticsChartPane.vue +47 -0
  32. package/src/component/FluxStatisticsDetailsTable.vue +25 -0
  33. package/src/component/FluxStatisticsDetailsTableRow.vue +22 -0
  34. package/src/component/FluxStatisticsDonutChart.vue +32 -0
  35. package/src/component/FluxStatisticsGrid.vue +31 -0
  36. package/src/component/FluxStatisticsKpi.vue +43 -0
  37. package/src/component/FluxStatisticsLegend.vue +11 -0
  38. package/src/component/FluxStatisticsLegendItem.vue +59 -0
  39. package/src/component/FluxStatisticsLineChart.vue +59 -0
  40. package/src/component/FluxStatisticsMeter.vue +83 -0
  41. package/src/component/FluxStatisticsMetric.vue +59 -0
  42. package/src/component/FluxStatisticsPieChart.vue +32 -0
  43. package/src/component/index.ts +17 -0
  44. package/src/css/Base.module.scss +46 -0
  45. package/src/css/Change.module.scss +42 -0
  46. package/src/css/Chart.module.scss +93 -0
  47. package/src/css/ChartPane.module.scss +38 -0
  48. package/src/css/Core.module.scss +3 -0
  49. package/src/css/DetailsTable.module.scss +43 -0
  50. package/src/css/Grid.module.scss +26 -0
  51. package/src/css/Kpi.module.scss +21 -0
  52. package/src/css/Legend.module.scss +53 -0
  53. package/src/css/Meter.module.scss +98 -0
  54. package/src/css/Metric.module.scss +66 -0
  55. package/src/index.ts +48 -0
  56. package/src/types.d.ts +13 -0
  57. package/tsconfig.json +7 -0
package/dist/index.css ADDED
@@ -0,0 +1,492 @@
1
+ :root {
2
+ --chart-primary: var(--primary-700);
3
+ --chart-positive: var(--success-500);
4
+ --chart-negative: var(--danger-500);
5
+ --chart-1: var(--chart-primary);
6
+ --chart-2: var(--primary-500);
7
+ --chart-3: var(--primary-300);
8
+ --chart-4: var(--primary-100);
9
+ --chart-secondary-1: var(--gray-300);
10
+ --chart-secondary-2: var(--gray-200);
11
+ }
12
+
13
+ .pane:has(.statistics-chart) {
14
+ display: flex;
15
+ min-width: 0;
16
+ flex-flow: column;
17
+ }
18
+
19
+ .statistics-chart {
20
+ position: absolute;
21
+ display: block;
22
+ inset: 0;
23
+ height: unset;
24
+ width: unset;
25
+ }
26
+ .statistics-chart svg {
27
+ overflow: hidden;
28
+ }
29
+ .statistics-chart {
30
+ --stroke: rgb(from var(--surface-stroke) r g b / .5);
31
+ }
32
+ .statistics-chart .apexcharts-canvas .apexcharts-grid-borders {
33
+ display: none;
34
+ }
35
+ .statistics-chart .apexcharts-canvas .apexcharts-yaxis-texts-g {
36
+ display: none;
37
+ }
38
+ .statistics-chart .apexcharts-canvas .apexcharts-tooltip {
39
+ background: rgb(from var(--gray-25) r g b/0.85);
40
+ background-clip: padding-box;
41
+ backdrop-filter: blur(6px) saturate(180%);
42
+ border: 1px solid var(--surface-stroke-out-hover);
43
+ border-radius: var(--radius-double);
44
+ box-shadow: var(--shadow-lg);
45
+ color: var(--foreground);
46
+ contain: paint;
47
+ }
48
+
49
+ .statistics-chart-element {
50
+ position: absolute;
51
+ display: block;
52
+ inset: 0;
53
+ }
54
+
55
+ .statistics-chart-tooltip-title {
56
+ padding: 18px 18px 0;
57
+ color: var(--foreground-prominent);
58
+ font-size: 15px;
59
+ font-weight: 700;
60
+ line-height: 1;
61
+ }
62
+
63
+ .statistics-chart-tooltip-body {
64
+ display: grid;
65
+ padding: 12px 18px 15px;
66
+ align-items: center;
67
+ gap: 6px 15px;
68
+ grid-template-columns: repeat(3, auto);
69
+ }
70
+
71
+ .statistics-chart-tooltip-series-color {
72
+ height: 12px;
73
+ width: 12px;
74
+ background: var(--danger-600);
75
+ border-radius: 6px;
76
+ }
77
+
78
+ .statistics-chart-tooltip-series-name {
79
+ font-size: 14px;
80
+ font-weight: 700;
81
+ }
82
+
83
+ .statistics-chart-tooltip-series-value {
84
+ font-size: 14px;
85
+ font-weight: 500;
86
+ text-align: right;
87
+ }.statistics-base {
88
+ display: flex;
89
+ height: 100%;
90
+ flex-flow: column;
91
+ }
92
+
93
+ .statistics-base-small {
94
+ }
95
+
96
+ .statistics-base-content {
97
+ position: relative;
98
+ display: flex;
99
+ padding: 21px;
100
+ flex-flow: column;
101
+ }
102
+
103
+ .statistics-base-header {
104
+ display: flex;
105
+ padding: 21px 21px 0;
106
+ align-items: flex-start;
107
+ }
108
+
109
+ .statistics-base-header-title {
110
+ color: var(--foreground-prominent);
111
+ font-size: 15px;
112
+ font-weight: 600;
113
+ line-height: 24px;
114
+ word-break: break-word;
115
+ }
116
+
117
+ .statistics-base-header-icon {
118
+ margin-left: auto;
119
+ color: var(--primary-600);
120
+ font-size: 20px;
121
+ }
122
+
123
+ .statistics-base-small .statistics-base-header-title {
124
+ color: var(--foreground);
125
+ font-size: 14px;
126
+ line-height: 18px;
127
+ }
128
+
129
+ .statistics-base-small .statistics-base-header-icon {
130
+ font-size: 18px;
131
+ }.statistics-change {
132
+ display: inline-flex;
133
+ align-items: baseline;
134
+ flex-flow: row nowrap;
135
+ gap: 6px;
136
+ }
137
+ .statistics-change.is-gray {
138
+ --color: var(--foreground-prominent);
139
+ }
140
+ .statistics-change.is-primary {
141
+ --color: var(--primary-600);
142
+ }
143
+ .statistics-change.is-danger {
144
+ --color: var(--danger-600);
145
+ }
146
+ .statistics-change.is-info {
147
+ --color: var(--info-600);
148
+ }
149
+ .statistics-change.is-success {
150
+ --color: var(--success-600);
151
+ }
152
+ .statistics-change.is-warning {
153
+ --color: var(--warning-600);
154
+ }
155
+
156
+ .statistics-change-icon {
157
+ color: var(--color);
158
+ font-size: 12px;
159
+ translate: 0 1px;
160
+ }
161
+
162
+ .statistics-change-value {
163
+ color: var(--color);
164
+ font-size: 12px;
165
+ font-weight: 500;
166
+ }.statistics-chart-pane {
167
+ --aspect-ratio: unset;
168
+ max-width: 100%;
169
+ aspect-ratio: var(--aspect-ratio);
170
+ }
171
+
172
+ .statistics-chart-pane-body {
173
+ display: grid;
174
+ flex-grow: 1;
175
+ grid-template-columns: 1fr;
176
+ grid-template-rows: 1fr;
177
+ }
178
+ .statistics-chart-pane-body:has(.statistics-legend) {
179
+ grid-template-columns: 1fr 1fr;
180
+ }
181
+
182
+ .statistics-chart-pane-container {
183
+ position: relative;
184
+ display: block;
185
+ }
186
+ .statistics-chart-pane-container:first-child svg {
187
+ border-top-left-radius: var(--radius);
188
+ border-top-right-radius: var(--radius);
189
+ }
190
+ .statistics-chart-pane-container:last-child svg {
191
+ border-bottom-left-radius: var(--radius);
192
+ border-bottom-right-radius: var(--radius);
193
+ }
194
+
195
+ .pane-header + .statistics-chart-pane-container {
196
+ margin-top: 21px;
197
+ }.statistics-base-content .statistics-stackable + .statistics-stackable {
198
+ margin-top: 21px;
199
+ }.details-table {
200
+ display: flex;
201
+ flex-flow: column;
202
+ gap: 6px;
203
+ }
204
+
205
+ .details-table-row {
206
+ display: flex;
207
+ margin: -3px -6px;
208
+ padding: 3px 6px;
209
+ color: var(--foreground-secondary);
210
+ font-size: 14px;
211
+ line-height: 24px;
212
+ border-radius: var(--radius-half);
213
+ }
214
+ @media (hover: hover) {
215
+ .details-table-row:hover {
216
+ background: var(--gray-50);
217
+ }
218
+ }
219
+
220
+ .details-table-row-label {
221
+ flex-grow: 1;
222
+ font-weight: 500;
223
+ }
224
+
225
+ .details-table-row-value {
226
+ text-align: right;
227
+ }
228
+
229
+ .details-table-rows {
230
+ display: flex;
231
+ flex-flow: column;
232
+ gap: 3px;
233
+ }
234
+
235
+ .details-table-title {
236
+ font-size: 15px;
237
+ font-weight: 600;
238
+ }.statistics-grid {
239
+ --columns: 1;
240
+ --gap: 21px;
241
+ position: relative;
242
+ container: grid/inline-size;
243
+ }
244
+
245
+ .statistics-grid-content {
246
+ display: grid;
247
+ gap: var(--gap);
248
+ grid-template-columns: repeat(var(--columns), 1fr);
249
+ }
250
+
251
+ .statistics-grid-content {
252
+ --columns: var(--xl);
253
+ }
254
+
255
+ @container grid (max-width: 1279.98px) {
256
+ .statistics-grid-content {
257
+ --columns: var(--lg);
258
+ }
259
+ }
260
+ @container grid (max-width: 1023.98px) {
261
+ .statistics-grid-content {
262
+ --columns: var(--md);
263
+ }
264
+ }
265
+ @container grid (max-width: 767.98px) {
266
+ .statistics-grid-content {
267
+ --columns: var(--sm);
268
+ }
269
+ }
270
+ @container grid (max-width: 639.98px) {
271
+ .statistics-grid-content {
272
+ --columns: var(--xs);
273
+ }
274
+ }.statistics-kpi-bottom {
275
+ margin-top: 3px;
276
+ line-height: 18px;
277
+ }
278
+ .statistics-kpi-bottom .statistics-change {
279
+ margin-right: 0.3em;
280
+ }
281
+
282
+ .statistics-kpi-footer {
283
+ color: var(--foreground-secondary);
284
+ font-size: 14px;
285
+ }
286
+
287
+ .statistics-kpi-value {
288
+ padding-top: 21px;
289
+ color: var(--foreground-prominent);
290
+ font-size: 21px;
291
+ font-weight: 800;
292
+ line-height: 36px;
293
+ }.statistics-legend {
294
+ display: flex;
295
+ min-width: 0;
296
+ padding: 15px 21px 15px;
297
+ align-self: center;
298
+ flex-flow: column;
299
+ flex-grow: 1;
300
+ gap: 3px;
301
+ }
302
+
303
+ .statistics-legend-item {
304
+ --color: var(--primary-600);
305
+ display: flex;
306
+ padding: 6px 0;
307
+ align-items: flex-start;
308
+ flex-flow: row nowrap;
309
+ gap: 9px;
310
+ font-size: 14px;
311
+ line-height: 20px;
312
+ white-space: nowrap;
313
+ }
314
+
315
+ .statistics-legend-item-color {
316
+ height: 12px;
317
+ width: 12px;
318
+ margin: 4px;
319
+ flex-shrink: 0;
320
+ background: var(--color);
321
+ border-radius: calc(var(--radius-half) / 2);
322
+ }
323
+
324
+ .statistics-legend-item-icon {
325
+ margin: 2px;
326
+ color: var(--color);
327
+ }
328
+
329
+ .statistics-legend-item-label {
330
+ flex-grow: 1;
331
+ color: var(--foreground);
332
+ font-weight: 600;
333
+ }
334
+
335
+ .statistics-legend-item-value {
336
+ margin-left: 15px;
337
+ text-align: right;
338
+ }
339
+
340
+ .statistics-legend-item + .statistics-legend-item {
341
+ border-top: 1px dashed var(--surface-stroke);
342
+ }.statistics-meter {
343
+ --color: var(--primary-600);
344
+ --percentage: 0%;
345
+ display: flex;
346
+ flex-flow: column;
347
+ gap: 9px;
348
+ }
349
+
350
+ .statistics-meter-small {
351
+ align-self: center;
352
+ }
353
+
354
+ .statistics-meter-bar {
355
+ height: 6px;
356
+ background: var(--gray-100);
357
+ border-radius: var(--radius);
358
+ }
359
+
360
+ .statistics-meter-bar-value {
361
+ height: inherit;
362
+ width: var(--percentage);
363
+ background: var(--color);
364
+ border-radius: inherit;
365
+ }
366
+
367
+ .statistics-meter-footer {
368
+ color: var(--foreground-secondary);
369
+ font-size: 14px;
370
+ }
371
+
372
+ .statistics-meter-header {
373
+ display: grid;
374
+ gap: 6px 12px;
375
+ grid-template-areas: "title value" "sub-title tip";
376
+ grid-template-columns: 1fr auto;
377
+ grid-template-rows: auto auto;
378
+ line-height: 18px;
379
+ vertical-align: middle;
380
+ }
381
+ .statistics-meter-header:has(> .statistics-meter-header-icon) {
382
+ grid-template-areas: "icon title value" "icon sub-title tip";
383
+ grid-template-columns: auto 1fr auto;
384
+ }
385
+
386
+ .statistics-meter-header-icon {
387
+ margin-top: 1px;
388
+ grid-area: icon;
389
+ color: var(--color);
390
+ }
391
+
392
+ .statistics-meter-header-title {
393
+ grid-area: title;
394
+ color: var(--foreground);
395
+ font-weight: 700;
396
+ }
397
+
398
+ .statistics-meter-header-sub-title {
399
+ grid-area: sub-title;
400
+ color: var(--foreground);
401
+ font-size: 14px;
402
+ }
403
+
404
+ .statistics-meter-header-value {
405
+ grid-area: value;
406
+ justify-self: end;
407
+ color: var(--foreground-prominent);
408
+ font-size: 16px;
409
+ font-weight: 700;
410
+ }
411
+
412
+ .statistics-meter-header-tip {
413
+ grid-area: tip;
414
+ justify-self: end;
415
+ color: var(--foreground-secondary);
416
+ font-size: 13px;
417
+ }
418
+
419
+ .statistics-meter-small .statistics-meter-header {
420
+ grid-template-areas: "value tip";
421
+ grid-template-columns: 1fr auto;
422
+ grid-template-rows: auto;
423
+ }
424
+
425
+ .statistics-meter-small .statistics-meter-header-value {
426
+ justify-self: unset;
427
+ font-size: 14px;
428
+ font-weight: 600;
429
+ }
430
+
431
+ .table-cell .statistics-meter-small {
432
+ width: 180px;
433
+ }.statistics-metric-bottom {
434
+ margin-top: 3px;
435
+ line-height: 24px;
436
+ }
437
+ .statistics-metric-bottom .statistics-change {
438
+ margin-right: 0.3em;
439
+ }
440
+ .statistics-metric-bottom .statistics-change-icon,
441
+ .statistics-metric-bottom .statistics-change-value {
442
+ font-size: 14px;
443
+ font-weight: 600;
444
+ }
445
+
446
+ .statistics-metric-content {
447
+ display: flex;
448
+ flex-flow: column;
449
+ }
450
+ .statistics-metric-content small {
451
+ color: var(--foreground-secondary);
452
+ font-size: 14px;
453
+ font-weight: 500;
454
+ }
455
+ .statistics-metric-content span {
456
+ color: var(--foreground);
457
+ font-size: 18px;
458
+ font-weight: 600;
459
+ }
460
+ .statistics-metric-content strong {
461
+ color: var(--foreground-prominent);
462
+ font-size: 21px;
463
+ font-weight: 800;
464
+ line-height: 36px;
465
+ }
466
+ .statistics-metric-content small:not(:first-child) {
467
+ margin-top: 15px;
468
+ }
469
+
470
+ .statistics-metric-footer {
471
+ color: var(--foreground-secondary);
472
+ font-size: 14px;
473
+ }
474
+
475
+ .statistics-metric-label {
476
+ padding-top: 21px;
477
+ color: var(--foreground-secondary);
478
+ font-size: 15px;
479
+ font-weight: 500;
480
+ }
481
+
482
+ .statistics-metric-value {
483
+ color: var(--foreground-prominent);
484
+ font-size: 21px;
485
+ font-weight: 800;
486
+ line-height: 36px;
487
+ text-transform: capitalize;
488
+ }
489
+
490
+ .statistics-metric-content + .statistics-metric-bottom {
491
+ margin-top: 9px;
492
+ }/*$vite$:1*/
@@ -0,0 +1,3 @@
1
+ export * from './component';
2
+ export declare const CHART_COLORS: string[];
3
+ export declare const CHART_COLORFUL_COLORS: string[];