@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.
- package/README.md +16 -0
- package/dist/component/FluxStatisticsAreaChart.vue.d.ts +9 -0
- package/dist/component/FluxStatisticsBarChart.vue.d.ts +9 -0
- package/dist/component/FluxStatisticsBase.vue.d.ts +28 -0
- package/dist/component/FluxStatisticsChange.vue.d.ts +9 -0
- package/dist/component/FluxStatisticsChart.vue.d.ts +22 -0
- package/dist/component/FluxStatisticsChartPane.vue.d.ts +32 -0
- package/dist/component/FluxStatisticsDetailsTable.vue.d.ts +23 -0
- package/dist/component/FluxStatisticsDetailsTableRow.vue.d.ts +7 -0
- package/dist/component/FluxStatisticsDonutChart.vue.d.ts +9 -0
- package/dist/component/FluxStatisticsGrid.vue.d.ts +26 -0
- package/dist/component/FluxStatisticsKpi.vue.d.ts +11 -0
- package/dist/component/FluxStatisticsLegend.vue.d.ts +18 -0
- package/dist/component/FluxStatisticsLegendItem.vue.d.ts +10 -0
- package/dist/component/FluxStatisticsLineChart.vue.d.ts +9 -0
- package/dist/component/FluxStatisticsMeter.vue.d.ts +14 -0
- package/dist/component/FluxStatisticsMetric.vue.d.ts +29 -0
- package/dist/component/FluxStatisticsPieChart.vue.d.ts +9 -0
- package/dist/component/index.d.ts +17 -0
- package/dist/index.css +492 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +10184 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +13 -0
- package/package.json +77 -0
- package/src/component/FluxStatisticsAreaChart.vue +59 -0
- package/src/component/FluxStatisticsBarChart.vue +51 -0
- package/src/component/FluxStatisticsBase.vue +43 -0
- package/src/component/FluxStatisticsChange.vue +37 -0
- package/src/component/FluxStatisticsChart.vue +193 -0
- package/src/component/FluxStatisticsChartPane.vue +47 -0
- package/src/component/FluxStatisticsDetailsTable.vue +25 -0
- package/src/component/FluxStatisticsDetailsTableRow.vue +22 -0
- package/src/component/FluxStatisticsDonutChart.vue +32 -0
- package/src/component/FluxStatisticsGrid.vue +31 -0
- package/src/component/FluxStatisticsKpi.vue +43 -0
- package/src/component/FluxStatisticsLegend.vue +11 -0
- package/src/component/FluxStatisticsLegendItem.vue +59 -0
- package/src/component/FluxStatisticsLineChart.vue +59 -0
- package/src/component/FluxStatisticsMeter.vue +83 -0
- package/src/component/FluxStatisticsMetric.vue +59 -0
- package/src/component/FluxStatisticsPieChart.vue +32 -0
- package/src/component/index.ts +17 -0
- package/src/css/Base.module.scss +46 -0
- package/src/css/Change.module.scss +42 -0
- package/src/css/Chart.module.scss +93 -0
- package/src/css/ChartPane.module.scss +38 -0
- package/src/css/Core.module.scss +3 -0
- package/src/css/DetailsTable.module.scss +43 -0
- package/src/css/Grid.module.scss +26 -0
- package/src/css/Kpi.module.scss +21 -0
- package/src/css/Legend.module.scss +53 -0
- package/src/css/Meter.module.scss +98 -0
- package/src/css/Metric.module.scss +66 -0
- package/src/index.ts +48 -0
- package/src/types.d.ts +13 -0
- package/tsconfig.json +7 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
.statisticsMeter {
|
|
2
|
+
--color: var(--primary-600);
|
|
3
|
+
--percentage: 0%;
|
|
4
|
+
|
|
5
|
+
composes: statisticsStackable from './Core.module.scss';
|
|
6
|
+
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-flow: column;
|
|
9
|
+
gap: 9px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.statisticsMeterSmall {
|
|
13
|
+
composes: statisticsMeter;
|
|
14
|
+
|
|
15
|
+
align-self: center;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.statisticsMeterBar {
|
|
19
|
+
height: 6px;
|
|
20
|
+
background: var(--gray-100);
|
|
21
|
+
border-radius: var(--radius);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.statisticsMeterBarValue {
|
|
25
|
+
height: inherit;
|
|
26
|
+
width: var(--percentage);
|
|
27
|
+
background: var(--color);
|
|
28
|
+
border-radius: inherit;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.statisticsMeterFooter {
|
|
32
|
+
color: var(--foreground-secondary);
|
|
33
|
+
font-size: 14px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.statisticsMeterHeader {
|
|
37
|
+
display: grid;
|
|
38
|
+
gap: 6px 12px;
|
|
39
|
+
grid-template-areas: "title value" "sub-title tip";
|
|
40
|
+
grid-template-columns: 1fr auto;
|
|
41
|
+
grid-template-rows: auto auto;
|
|
42
|
+
line-height: 18px;
|
|
43
|
+
vertical-align: middle;
|
|
44
|
+
|
|
45
|
+
&:has(> .statisticsMeterHeaderIcon) {
|
|
46
|
+
grid-template-areas: "icon title value" "icon sub-title tip";
|
|
47
|
+
grid-template-columns: auto 1fr auto;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.statisticsMeterHeaderIcon {
|
|
52
|
+
margin-top: 1px;
|
|
53
|
+
grid-area: icon;
|
|
54
|
+
color: var(--color);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.statisticsMeterHeaderTitle {
|
|
58
|
+
grid-area: title;
|
|
59
|
+
color: var(--foreground);
|
|
60
|
+
font-weight: 700;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.statisticsMeterHeaderSubTitle {
|
|
64
|
+
grid-area: sub-title;
|
|
65
|
+
color: var(--foreground);
|
|
66
|
+
font-size: 14px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.statisticsMeterHeaderValue {
|
|
70
|
+
grid-area: value;
|
|
71
|
+
justify-self: end;
|
|
72
|
+
color: var(--foreground-prominent);
|
|
73
|
+
font-size: 16px;
|
|
74
|
+
font-weight: 700;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.statisticsMeterHeaderTip {
|
|
78
|
+
grid-area: tip;
|
|
79
|
+
justify-self: end;
|
|
80
|
+
color: var(--foreground-secondary);
|
|
81
|
+
font-size: 13px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.statisticsMeterSmall .statisticsMeterHeader {
|
|
85
|
+
grid-template-areas: "value tip";
|
|
86
|
+
grid-template-columns: 1fr auto;
|
|
87
|
+
grid-template-rows: auto;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.statisticsMeterSmall .statisticsMeterHeaderValue {
|
|
91
|
+
justify-self: unset;
|
|
92
|
+
font-size: 14px;
|
|
93
|
+
font-weight: 600;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
:local(.tableCell) .statisticsMeterSmall {
|
|
97
|
+
width: 180px;
|
|
98
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
.statisticsMetricBottom {
|
|
2
|
+
margin-top: 3px;
|
|
3
|
+
line-height: 24px;
|
|
4
|
+
|
|
5
|
+
:local(.statisticsChange) {
|
|
6
|
+
margin-right: .3em;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:local(.statisticsChangeIcon),
|
|
10
|
+
:local(.statisticsChangeValue) {
|
|
11
|
+
font-size: 14px;
|
|
12
|
+
font-weight: 600;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.statisticsMetricContent {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-flow: column;
|
|
19
|
+
|
|
20
|
+
:global(small) {
|
|
21
|
+
color: var(--foreground-secondary);
|
|
22
|
+
font-size: 14px;
|
|
23
|
+
font-weight: 500;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:global(span) {
|
|
27
|
+
color: var(--foreground);
|
|
28
|
+
font-size: 18px;
|
|
29
|
+
font-weight: 600;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:global(strong) {
|
|
33
|
+
color: var(--foreground-prominent);
|
|
34
|
+
font-size: 21px;
|
|
35
|
+
font-weight: 800;
|
|
36
|
+
line-height: 36px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:global(small):not(:first-child) {
|
|
40
|
+
margin-top: 15px;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.statisticsMetricFooter {
|
|
45
|
+
color: var(--foreground-secondary);
|
|
46
|
+
font-size: 14px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.statisticsMetricLabel {
|
|
50
|
+
padding-top: 21px;
|
|
51
|
+
color: var(--foreground-secondary);
|
|
52
|
+
font-size: 15px;
|
|
53
|
+
font-weight: 500;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.statisticsMetricValue {
|
|
57
|
+
color: var(--foreground-prominent);
|
|
58
|
+
font-size: 21px;
|
|
59
|
+
font-weight: 800;
|
|
60
|
+
line-height: 36px;
|
|
61
|
+
text-transform: capitalize;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.statisticsMetricContent + .statisticsMetricBottom {
|
|
65
|
+
margin-top: 9px;
|
|
66
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import {
|
|
2
|
+
red500,
|
|
3
|
+
orange500,
|
|
4
|
+
amber500,
|
|
5
|
+
yellow500,
|
|
6
|
+
lime500,
|
|
7
|
+
green500,
|
|
8
|
+
emerald500,
|
|
9
|
+
teal500,
|
|
10
|
+
cyan500,
|
|
11
|
+
sky500,
|
|
12
|
+
blue500,
|
|
13
|
+
indigo500,
|
|
14
|
+
violet500,
|
|
15
|
+
purple500,
|
|
16
|
+
fuchsia500,
|
|
17
|
+
pink500,
|
|
18
|
+
rose50
|
|
19
|
+
} from '@flux-ui/internals';
|
|
20
|
+
|
|
21
|
+
export * from './component';
|
|
22
|
+
|
|
23
|
+
export const CHART_COLORS = [
|
|
24
|
+
'var(--chart-1)',
|
|
25
|
+
'var(--chart-2)',
|
|
26
|
+
'var(--chart-3)',
|
|
27
|
+
'var(--chart-4)'
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
export const CHART_COLORFUL_COLORS = [
|
|
31
|
+
red500,
|
|
32
|
+
orange500,
|
|
33
|
+
amber500,
|
|
34
|
+
yellow500,
|
|
35
|
+
lime500,
|
|
36
|
+
green500,
|
|
37
|
+
emerald500,
|
|
38
|
+
teal500,
|
|
39
|
+
cyan500,
|
|
40
|
+
sky500,
|
|
41
|
+
blue500,
|
|
42
|
+
indigo500,
|
|
43
|
+
violet500,
|
|
44
|
+
purple500,
|
|
45
|
+
fuchsia500,
|
|
46
|
+
pink500,
|
|
47
|
+
rose50
|
|
48
|
+
];
|
package/src/types.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare module '*.module.css' {
|
|
2
|
+
const content: Record<string, string>;
|
|
3
|
+
export default content;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
declare module '*.module.scss' {
|
|
7
|
+
const content: Record<string, string>;
|
|
8
|
+
export default content;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare module '*.svg' {
|
|
12
|
+
export = string;
|
|
13
|
+
}
|