@inglorious/ui 3.0.0 → 3.0.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inglorious/ui",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "A design system for Inglorious Web with render-function components and customizable themes",
|
|
5
5
|
"author": "IceOnFire <antony.mistretta@gmail.com> (https://ingloriouscoderz.it)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -280,10 +280,10 @@
|
|
|
280
280
|
"**/*.css"
|
|
281
281
|
],
|
|
282
282
|
"peerDependencies": {
|
|
283
|
-
"@inglorious/charts": "6.0.
|
|
283
|
+
"@inglorious/charts": "6.0.1",
|
|
284
284
|
"@inglorious/store": "11.0.0",
|
|
285
|
-
"@inglorious/
|
|
286
|
-
"@inglorious/
|
|
285
|
+
"@inglorious/web": "6.0.1",
|
|
286
|
+
"@inglorious/utils": "3.8.0"
|
|
287
287
|
},
|
|
288
288
|
"devDependencies": {
|
|
289
289
|
"@fontsource/material-symbols-outlined": "^5.2.36",
|
|
@@ -297,11 +297,11 @@
|
|
|
297
297
|
"storybook": "^10.3.3",
|
|
298
298
|
"vite": "^7.3.1",
|
|
299
299
|
"vitest": "^4.0.15",
|
|
300
|
-
"@inglorious/
|
|
300
|
+
"@inglorious/vite-plugin-jsx": "2.0.0",
|
|
301
|
+
"@inglorious/web": "6.0.1",
|
|
301
302
|
"@inglorious/store": "11.0.0",
|
|
302
|
-
"@inglorious/web": "6.0.0",
|
|
303
303
|
"@inglorious/vite-plugin-vue": "1.0.1",
|
|
304
|
-
"@inglorious/
|
|
304
|
+
"@inglorious/eslint-config": "1.1.2"
|
|
305
305
|
},
|
|
306
306
|
"engines": {
|
|
307
307
|
"node": ">= 22"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./style.css"
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { Chart } from "@inglorious/charts"
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
createEntityRender,
|
|
@@ -21,9 +21,9 @@ const baseTypes = {
|
|
|
21
21
|
AppDrawer,
|
|
22
22
|
AppHeader,
|
|
23
23
|
PrimitiveSection,
|
|
24
|
-
area:
|
|
25
|
-
bar:
|
|
26
|
-
line:
|
|
24
|
+
area: Chart,
|
|
25
|
+
bar: Chart,
|
|
26
|
+
line: Chart,
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export default {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Chart } from "@inglorious/charts"
|
|
2
2
|
import { html } from "@inglorious/web"
|
|
3
3
|
|
|
4
4
|
import { Divider } from "../../data-display/divider"
|
|
@@ -48,18 +48,16 @@ export const SocialCard = {
|
|
|
48
48
|
},
|
|
49
49
|
|
|
50
50
|
renderAreaSpark(entity, api) {
|
|
51
|
-
return
|
|
51
|
+
return Chart.render(
|
|
52
52
|
{
|
|
53
53
|
type: "area",
|
|
54
54
|
data: entity.data.map((value, index) => ({ name: `${index}`, value })),
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
55
|
width: 640,
|
|
58
56
|
height: 200,
|
|
59
57
|
padding: 0,
|
|
60
58
|
dataKeys: ["value"],
|
|
61
59
|
children: [
|
|
62
|
-
|
|
60
|
+
Chart.Area({
|
|
63
61
|
dataKey: "value",
|
|
64
62
|
stroke: "rgba(255,255,255,0.9)",
|
|
65
63
|
fill: "rgba(255,255,255,0.35)",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Chart } from "@inglorious/charts"
|
|
2
2
|
import { html } from "@inglorious/web"
|
|
3
3
|
|
|
4
4
|
import { Button } from "../../controls/button"
|
|
@@ -54,7 +54,7 @@ export const StatCard = {
|
|
|
54
54
|
value,
|
|
55
55
|
}))
|
|
56
56
|
|
|
57
|
-
const
|
|
57
|
+
const base = {
|
|
58
58
|
id: entity.id,
|
|
59
59
|
type: entity.chartType,
|
|
60
60
|
data,
|
|
@@ -66,19 +66,19 @@ export const StatCard = {
|
|
|
66
66
|
const children = []
|
|
67
67
|
if (entity.hasDots) {
|
|
68
68
|
children.push(
|
|
69
|
-
|
|
69
|
+
Chart.Dots({ dataKey: "value", stroke: "white", fill: "#39a2f1" }),
|
|
70
70
|
)
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
if (entity.chartType === "area") {
|
|
74
|
-
children.push(
|
|
75
|
-
return
|
|
76
|
-
} else if (entity.chartType === "bar") {
|
|
77
|
-
children.push(chart.Bar({ fill: "rgba(255,255,255,0.3)" }))
|
|
78
|
-
return chart.renderBarChart(chartConfig, { children }, api)
|
|
79
|
-
} else {
|
|
80
|
-
children.push(chart.Line({ stroke: "white" }))
|
|
81
|
-
return chart.renderLineChart(chartConfig, { children }, api)
|
|
74
|
+
children.push(Chart.Area({ fill: "rgba(255,255,255,0.3)" }))
|
|
75
|
+
return Chart.render({ ...base, children }, api)
|
|
82
76
|
}
|
|
77
|
+
if (entity.chartType === "bar") {
|
|
78
|
+
children.push(Chart.Bar({ fill: "rgba(255,255,255,0.3)" }))
|
|
79
|
+
return Chart.render({ ...base, children }, api)
|
|
80
|
+
}
|
|
81
|
+
children.push(Chart.Line({ stroke: "white" }))
|
|
82
|
+
return Chart.render({ ...base, children }, api)
|
|
83
83
|
},
|
|
84
84
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Chart } from "@inglorious/charts"
|
|
2
2
|
import { html } from "@inglorious/web"
|
|
3
3
|
|
|
4
4
|
import { Button } from "../../controls/button"
|
|
@@ -84,22 +84,24 @@ export const TrafficCard = {
|
|
|
84
84
|
},
|
|
85
85
|
|
|
86
86
|
renderTrafficChart(_, api) {
|
|
87
|
-
return
|
|
88
|
-
{ id: "traffic", type: "area", data: trafficSeries },
|
|
87
|
+
return Chart.render(
|
|
89
88
|
{
|
|
89
|
+
id: "traffic",
|
|
90
|
+
type: "area",
|
|
91
|
+
data: trafficSeries,
|
|
90
92
|
width: 1400,
|
|
91
93
|
height: 320,
|
|
92
94
|
dataKeys: ["visits", "unique"],
|
|
93
95
|
children: [
|
|
94
|
-
|
|
96
|
+
Chart.CartesianGrid({
|
|
95
97
|
stroke: "rgba(255,255,255,0.08)",
|
|
96
98
|
strokeDasharray: "4 4",
|
|
97
99
|
}),
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
Chart.XAxis({ dataKey: "month" }),
|
|
101
|
+
Chart.YAxis({ width: "auto" }),
|
|
102
|
+
Chart.Area({ dataKey: "visits", stroke: "#39a2f1", strokeWidth: 3 }),
|
|
103
|
+
Chart.Area({ dataKey: "unique", stroke: "#2eb85c", strokeWidth: 3 }),
|
|
104
|
+
Chart.Tooltip({}),
|
|
103
105
|
],
|
|
104
106
|
},
|
|
105
107
|
api,
|