@bridge-ui/vue 0.18.0 → 0.19.0
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/ai/skills/bridge-ui-components/SKILL.md +35 -34
- package/ai/skills/bridge-ui-setup/SKILL.md +1 -1
- package/dist/Components/ChartBar/ChartBar.vue_vue_type_script_setup_true_lang.js +5 -0
- package/dist/Components/ChartBar/chartBar.types.d.ts +11 -1
- package/dist/Components/ChartBar/index.d.ts +1 -1
- package/dist/Components/ChartBarSeries/ChartBarSeries.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/Components/ChartBarSeries/chartBarSeries.types.d.ts +24 -2
- package/dist/Components/ChartBarSeries/composables/useChartBarSeries.js +3 -0
- package/dist/Components/ChartBarSeries/index.d.ts +1 -0
- package/dist/Components/ChartLine/ChartLine.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/Components/ChartLine/chartLine.types.d.ts +7 -0
- package/dist/Components/ChartLineSeries/ChartLineSeries.vue_vue_type_script_setup_true_lang.js +3 -0
- package/dist/Components/ChartLineSeries/chartLineSeries.types.d.ts +23 -2
- package/dist/Components/ChartLineSeries/composables/useChartLineSeries.js +3 -0
- package/dist/Components/ChartLineSeries/index.d.ts +1 -0
- package/dist/Components/ChartPie/ChartPie.vue_vue_type_script_setup_true_lang.js +3 -0
- package/dist/Components/ChartPie/chartPie.types.d.ts +20 -1
- package/dist/Components/ChartPie/composables/useChartPie.d.ts +1 -1
- package/dist/Components/ChartPie/composables/useChartPie.js +35 -25
- package/dist/Components/ChartScatter/composables/useChartScatter.js +61 -56
- package/dist/Components/ChartScatterSeries/ChartScatterSeries.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/Components/ChartScatterSeries/chartScatterSeries.types.d.ts +8 -1
- package/dist/Components/ChartScatterSeries/composables/useChartScatterSeries.js +2 -1
- package/dist/Components/ChartScatterSeries/index.d.ts +1 -0
- package/dist/Components/ChartTooltip/ChartTooltip.vue_vue_type_script_setup_true_lang.js +11 -7
- package/dist/Components/ChartTooltip/chartTooltip.types.d.ts +4 -0
- package/dist/Components/ChartTooltip/composables/useChartTooltip.d.ts +1 -0
- package/dist/Components/ChartTooltip/composables/useChartTooltip.js +4 -0
- package/dist/Components/Heading/Heading.js +5 -0
- package/dist/Components/Heading/Heading.vue.d.ts +11 -0
- package/dist/Components/Heading/Heading.vue_vue_type_script_setup_true_lang.js +29 -0
- package/dist/Components/Heading/composables/useHeading.d.ts +10 -0
- package/dist/Components/Heading/composables/useHeading.js +56 -0
- package/dist/Components/Heading/heading.types.d.ts +56 -0
- package/dist/Components/Heading/index.d.ts +3 -0
- package/dist/Components/Heading/index.js +3 -0
- package/dist/Components/Text/Text.js +5 -0
- package/dist/Components/Text/Text.vue.d.ts +11 -0
- package/dist/Components/Text/Text.vue_vue_type_script_setup_true_lang.js +33 -0
- package/dist/Components/Text/composables/useText.d.ts +9 -0
- package/dist/Components/Text/composables/useText.js +56 -0
- package/dist/Components/Text/index.d.ts +3 -0
- package/dist/Components/Text/index.js +3 -0
- package/dist/Components/Text/text.types.d.ts +76 -0
- package/dist/Utils/Charts/chart.types.d.ts +17 -0
- package/dist/Utils/Charts/chartInjectionKey.d.ts +2 -2
- package/dist/Utils/Charts/echarts/bar.js +11 -10
- package/dist/Utils/Charts/echarts/cartesian.d.ts +2 -2
- package/dist/Utils/Charts/echarts/cartesian.js +139 -104
- package/dist/Utils/Charts/echarts/line.js +9 -8
- package/dist/Utils/Charts/echarts/pie.js +3 -2
- package/dist/Utils/Charts/echarts/scatter.js +58 -49
- package/dist/Utils/Charts/index.d.ts +1 -1
- package/dist/Utils/Charts/useChartCartesian.d.ts +4 -2
- package/dist/Utils/Charts/useChartCartesian.js +90 -76
- package/dist/augments.d.ts +10 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +90 -86
- package/docs/README.md +2 -0
- package/docs/components/BridgeUIProvider.md +1 -1
- package/docs/components/Card.md +15 -0
- package/docs/components/Chart.md +17 -10
- package/docs/components/ChartBar.md +70 -17
- package/docs/components/ChartLine.md +57 -16
- package/docs/components/ChartPie.md +33 -10
- package/docs/components/ChartScatter.md +25 -7
- package/docs/components/Heading.md +85 -0
- package/docs/components/Text.md +118 -0
- package/package.json +2 -2
|
@@ -1,27 +1,36 @@
|
|
|
1
1
|
import { labelStyle as e, mountEchartsPlot as t } from "./plot.js";
|
|
2
|
-
import { get as n, isArray as r,
|
|
3
|
-
import { isChartValue as
|
|
4
|
-
import { ScatterChart as
|
|
5
|
-
import { GridComponent as
|
|
6
|
-
import { use as
|
|
7
|
-
import { SVGRenderer as
|
|
2
|
+
import { get as n, isArray as r, isEmpty as i, isNil as a, isNumber as o } from "es-toolkit/compat";
|
|
3
|
+
import { findChartScatterRange as s, isChartValue as c, scaleChartBubbleSize as l } from "@bridge-ui/core/Domain";
|
|
4
|
+
import { ScatterChart as u } from "echarts/charts";
|
|
5
|
+
import { GridComponent as d, TooltipComponent as f } from "echarts/components";
|
|
6
|
+
import { use as p } from "echarts/core";
|
|
7
|
+
import { SVGRenderer as m } from "echarts/renderers";
|
|
8
8
|
//#region src/Utils/Charts/echarts/scatter.ts
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
p([
|
|
10
|
+
u,
|
|
11
|
+
d,
|
|
12
|
+
m,
|
|
13
|
+
f
|
|
14
14
|
]);
|
|
15
|
-
var
|
|
16
|
-
function
|
|
17
|
-
let
|
|
18
|
-
return !
|
|
19
|
-
value:
|
|
15
|
+
var h = .7;
|
|
16
|
+
function g(e, t, n) {
|
|
17
|
+
let i = r(n) ? n[2] : void 0, o = t.symbolSize ?? e.symbolSize;
|
|
18
|
+
return !c(i) || a(e.sizeDomain) ? o : l({
|
|
19
|
+
value: i,
|
|
20
20
|
range: e.bubbleSize,
|
|
21
21
|
domain: e.sizeDomain
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function _(e) {
|
|
25
|
+
return i(e.colorRanges) ? e.data : e.data.map((t) => {
|
|
26
|
+
let n = c(t[1]) ? s(e, t[1]) : void 0;
|
|
27
|
+
return a(n) ? t : {
|
|
28
|
+
value: t,
|
|
29
|
+
itemStyle: { color: n.color }
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function v(t, n) {
|
|
25
34
|
let { theme: r } = t;
|
|
26
35
|
return {
|
|
27
36
|
scale: !0,
|
|
@@ -39,12 +48,12 @@ function h(t, n) {
|
|
|
39
48
|
},
|
|
40
49
|
axisLabel: {
|
|
41
50
|
...e(r),
|
|
42
|
-
formatter:
|
|
51
|
+
formatter: a(n.formatTick) ? void 0 : (e) => n.formatTick?.(Number(e)) ?? String(e)
|
|
43
52
|
}
|
|
44
53
|
};
|
|
45
54
|
}
|
|
46
|
-
function
|
|
47
|
-
let { theme: t } = e, n = Math.round(t.fontSize * 2.25), r = !
|
|
55
|
+
function y(e) {
|
|
56
|
+
let { theme: t } = e, n = Math.round(t.fontSize * 2.25), r = !a(e.sizeDomain);
|
|
48
57
|
return {
|
|
49
58
|
animation: e.animation,
|
|
50
59
|
tooltip: {
|
|
@@ -53,7 +62,7 @@ function g(e) {
|
|
|
53
62
|
showContent: !1
|
|
54
63
|
},
|
|
55
64
|
yAxis: {
|
|
56
|
-
...
|
|
65
|
+
...v(e, e.yAxis),
|
|
57
66
|
nameLocation: "end"
|
|
58
67
|
},
|
|
59
68
|
textStyle: {
|
|
@@ -61,7 +70,7 @@ function g(e) {
|
|
|
61
70
|
fontFamily: t.fontFamily
|
|
62
71
|
},
|
|
63
72
|
xAxis: {
|
|
64
|
-
...
|
|
73
|
+
...v(e, e.xAxis),
|
|
65
74
|
nameGap: n,
|
|
66
75
|
nameLocation: "middle"
|
|
67
76
|
},
|
|
@@ -69,75 +78,75 @@ function g(e) {
|
|
|
69
78
|
left: 4,
|
|
70
79
|
outerBoundsMode: "same",
|
|
71
80
|
outerBoundsContain: "axisLabel",
|
|
72
|
-
top:
|
|
81
|
+
top: a(e.yAxis.label) ? 12 : n,
|
|
73
82
|
right: r ? e.bubbleSize[1] / 2 : 12,
|
|
74
|
-
bottom:
|
|
83
|
+
bottom: a(e.xAxis.label) ? 4 : n
|
|
75
84
|
},
|
|
76
85
|
series: e.series.map((t) => ({
|
|
77
86
|
id: t.id,
|
|
78
87
|
type: "scatter",
|
|
79
88
|
name: t.name,
|
|
80
|
-
data: t
|
|
89
|
+
data: _(t),
|
|
81
90
|
emphasis: {
|
|
82
91
|
scale: 1.2,
|
|
83
92
|
focus: "series"
|
|
84
93
|
},
|
|
85
|
-
symbolSize: (n) =>
|
|
94
|
+
symbolSize: (n) => g(e, t, n),
|
|
86
95
|
itemStyle: {
|
|
87
96
|
color: t.color,
|
|
88
|
-
opacity: r ?
|
|
97
|
+
opacity: r ? h : 1
|
|
89
98
|
}
|
|
90
99
|
}))
|
|
91
100
|
};
|
|
92
101
|
}
|
|
93
|
-
function
|
|
102
|
+
function b(e, t, n) {
|
|
94
103
|
let r = e.points.findIndex((e) => e.seriesIndex === t && e.dataIndex === n);
|
|
95
104
|
return r === -1 ? null : r;
|
|
96
105
|
}
|
|
97
|
-
var
|
|
98
|
-
build:
|
|
106
|
+
var x = {
|
|
107
|
+
build: y,
|
|
99
108
|
highlight: (e, t, n) => {
|
|
100
|
-
e.dispatchAction({ type: "downplay" }),
|
|
109
|
+
e.dispatchAction({ type: "downplay" }), a(n) || e.dispatchAction({
|
|
101
110
|
seriesId: n,
|
|
102
111
|
type: "highlight"
|
|
103
112
|
});
|
|
104
113
|
},
|
|
105
114
|
attach: (e, t, r) => {
|
|
106
115
|
e.on("mouseover", (e) => {
|
|
107
|
-
let i = n(e, "seriesIndex"),
|
|
108
|
-
|
|
116
|
+
let i = n(e, "seriesIndex"), a = n(e, "dataIndex");
|
|
117
|
+
o(i) && o(a) && t(b(r(), i, a));
|
|
109
118
|
}), e.on("mouseout", () => {
|
|
110
119
|
t(null);
|
|
111
120
|
});
|
|
112
121
|
},
|
|
113
122
|
showActive: (e, t, n) => {
|
|
114
123
|
e.dispatchAction({ type: "downplay" });
|
|
115
|
-
let r =
|
|
116
|
-
if (
|
|
124
|
+
let r = a(n) ? void 0 : t.points[n];
|
|
125
|
+
if (a(r)) {
|
|
117
126
|
e.dispatchAction({ type: "hideTip" });
|
|
118
127
|
return;
|
|
119
128
|
}
|
|
120
|
-
let
|
|
129
|
+
let i = {
|
|
121
130
|
dataIndex: r.dataIndex,
|
|
122
131
|
seriesIndex: r.seriesIndex
|
|
123
132
|
};
|
|
124
133
|
e.dispatchAction({
|
|
125
|
-
...
|
|
134
|
+
...i,
|
|
126
135
|
type: "highlight"
|
|
127
136
|
}), e.dispatchAction({
|
|
128
|
-
...
|
|
137
|
+
...i,
|
|
129
138
|
type: "showTip"
|
|
130
139
|
});
|
|
131
140
|
},
|
|
132
141
|
getAnchor: (e, t, n) => {
|
|
133
|
-
let
|
|
134
|
-
if (i
|
|
135
|
-
let c = e.convertToPixel({ seriesIndex:
|
|
136
|
-
if (!r(c) || !
|
|
137
|
-
let l =
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
142
|
+
let i = t.points[n], s = a(i) ? void 0 : t.series[i.seriesIndex];
|
|
143
|
+
if (a(i) || a(s)) return null;
|
|
144
|
+
let c = e.convertToPixel({ seriesIndex: i.seriesIndex }, [i.x, i.y]);
|
|
145
|
+
if (!r(c) || !o(c[0]) || !o(c[1])) return null;
|
|
146
|
+
let l = g(t, s, a(i.size) ? [i.x, i.y] : [
|
|
147
|
+
i.x,
|
|
148
|
+
i.y,
|
|
149
|
+
i.size
|
|
141
150
|
]);
|
|
142
151
|
return {
|
|
143
152
|
x: c[0],
|
|
@@ -145,8 +154,8 @@ var v = {
|
|
|
145
154
|
};
|
|
146
155
|
}
|
|
147
156
|
};
|
|
148
|
-
function
|
|
149
|
-
return t(e,
|
|
157
|
+
function S(e) {
|
|
158
|
+
return t(e, x);
|
|
150
159
|
}
|
|
151
160
|
//#endregion
|
|
152
|
-
export {
|
|
161
|
+
export { y as buildEchartsScatterOption, S as mountEchartsScatter };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { ChartClasses, ChartColorOverrides, ChartColorValue, ChartCustomProps, ChartRootOwnProps, ChartSizeOverrides, ChartSlots, } from './chart.types';
|
|
1
|
+
export type { ChartCategoryColors, ChartClasses, ChartColorOverrides, ChartColorRangeOption, ChartColorValue, ChartCustomProps, ChartRootOwnProps, ChartSizeOverrides, ChartSlots, } from './chart.types';
|
|
2
2
|
export { default as ChartFrame } from './ChartFrame.vue';
|
|
3
3
|
export { CHART_INJECTION_KEY, useChartContext, type ChartBarSeriesRegistration, type ChartContextValue, type ChartFamily, type ChartLegendItem, type ChartLegendPosition, type ChartLineSeriesRegistration, type ChartScatterSeriesRegistration, type ChartSeriesRegistration, } from './chartInjectionKey';
|
|
4
4
|
export { useChartRegistry } from './useChartRegistry';
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { ChartCartesianRenderOptions, ChartCurve, ChartHandle, ChartMountOptions, ChartOrientation, ChartStep } from '@bridge-ui/core/Domain';
|
|
2
|
-
import { ChartRootOwnProps } from './chart.types';
|
|
2
|
+
import { ChartCategoryColors, ChartRootOwnProps } from './chart.types';
|
|
3
3
|
import { ChartRootMerged } from './useChartRoot';
|
|
4
4
|
/**
|
|
5
5
|
* Props shared by `ChartLine` and `ChartBar` (each root exposes its subset).
|
|
6
6
|
*/
|
|
7
7
|
export type ChartCartesianOwnProps = ChartRootOwnProps & {
|
|
8
8
|
area?: boolean;
|
|
9
|
+
areaOpacity?: number;
|
|
9
10
|
categories: Date[] | string[];
|
|
11
|
+
categoryColors?: ChartCategoryColors;
|
|
10
12
|
curve?: ChartCurve;
|
|
11
13
|
formatDate?: (date: Date) => string;
|
|
12
14
|
formatLabel?: (value: number) => string;
|
|
@@ -21,7 +23,7 @@ export type ChartCartesianOwnProps = ChartRootOwnProps & {
|
|
|
21
23
|
/**
|
|
22
24
|
* Merged cartesian props after registry defaults.
|
|
23
25
|
*/
|
|
24
|
-
export type ChartCartesianMerged = ChartRootMerged & Pick<ChartCartesianOwnProps, "area" | "step" | "curve" | "labels" | "radius" | "showPoints" | "orientation">;
|
|
26
|
+
export type ChartCartesianMerged = ChartRootMerged & Pick<ChartCartesianOwnProps, "area" | "step" | "curve" | "labels" | "radius" | "showPoints" | "areaOpacity" | "orientation">;
|
|
25
27
|
/**
|
|
26
28
|
* Line / bar root: series registry, category (or time) axis, stacks, and the
|
|
27
29
|
* shared chart frame.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useChartRegistry as e } from "./useChartRegistry.js";
|
|
2
2
|
import { chartRootBridgeKeys as t, toChartLegendItems as n, useChartColors as r, useChartContextValue as i, useChartFrame as a, useChartPlot as o, useChartRoot as s } from "./useChartRoot.js";
|
|
3
3
|
import { computed as c } from "vue";
|
|
4
|
-
import { isDate as l,
|
|
5
|
-
import { DEFAULT_CHART_BAR_RADIUS as
|
|
4
|
+
import { isDate as l, isEmpty as u, isNil as d, isString as f } from "es-toolkit/compat";
|
|
5
|
+
import { DEFAULT_CHART_AREA_OPACITY as p, DEFAULT_CHART_BAR_RADIUS as m, formatChartValue as h, getChartCartesianRenderSeries as g, getChartCartesianSummaryParams as _, getChartCartesianTable as v, getChartCartesianTooltip as y, getChartCategoryColorItems as b, getChartCategoryLabels as x, getChartRangeColorItems as S, getChartTimeTickFormatter as C, isChartEmpty as w, isChartTimeCategories as T } from "@bridge-ui/core/Domain";
|
|
6
6
|
//#region src/Utils/Charts/useChartCartesian.ts
|
|
7
|
-
var
|
|
7
|
+
var E = [
|
|
8
8
|
...t,
|
|
9
9
|
"area",
|
|
10
10
|
"step",
|
|
@@ -16,9 +16,11 @@ var x = [
|
|
|
16
16
|
"categories",
|
|
17
17
|
"formatDate",
|
|
18
18
|
"showPoints",
|
|
19
|
+
"areaOpacity",
|
|
19
20
|
"formatLabel",
|
|
20
|
-
"orientation"
|
|
21
|
-
|
|
21
|
+
"orientation",
|
|
22
|
+
"categoryColors"
|
|
23
|
+
], D = [
|
|
22
24
|
"area",
|
|
23
25
|
"size",
|
|
24
26
|
"step",
|
|
@@ -29,18 +31,22 @@ var x = [
|
|
|
29
31
|
"classes",
|
|
30
32
|
"animation",
|
|
31
33
|
"showPoints",
|
|
34
|
+
"areaOpacity",
|
|
32
35
|
"customProps",
|
|
33
36
|
"orientation"
|
|
34
37
|
];
|
|
35
|
-
function
|
|
38
|
+
function O(e, t, n) {
|
|
36
39
|
return e.kind === "bar" ? {
|
|
37
40
|
kind: "bar",
|
|
38
41
|
id: e.id,
|
|
39
42
|
name: e.name,
|
|
40
43
|
data: e.data,
|
|
41
44
|
color: e.color,
|
|
45
|
+
tone: e.tone ?? "solid",
|
|
42
46
|
reference: e.reference ?? [],
|
|
47
|
+
colorBy: e.colorBy ?? "value",
|
|
43
48
|
stack: e.stack ?? t.stack,
|
|
49
|
+
colorRanges: e.colorRanges ?? [],
|
|
44
50
|
labels: e.labels ?? t.labels ?? !1
|
|
45
51
|
} : {
|
|
46
52
|
kind: "line",
|
|
@@ -50,106 +56,114 @@ function C(e, t, n) {
|
|
|
50
56
|
color: e.color,
|
|
51
57
|
dashed: e.dashed ?? !1,
|
|
52
58
|
reference: e.reference ?? [],
|
|
59
|
+
colorBy: e.colorBy ?? "value",
|
|
60
|
+
colorRanges: e.colorRanges ?? [],
|
|
53
61
|
area: e.area ?? t.area ?? !1,
|
|
54
62
|
step: e.step ?? t.step ?? !1,
|
|
55
63
|
labels: e.labels ?? t.labels ?? !1,
|
|
56
64
|
curve: e.curve ?? t.curve ?? "linear",
|
|
57
65
|
showPoints: e.showPoints ?? t.showPoints ?? !1,
|
|
58
|
-
stack: e.stack ?? (n === "line" ? t.stack : void 0)
|
|
66
|
+
stack: e.stack ?? (n === "line" ? t.stack : void 0),
|
|
67
|
+
areaOpacity: e.areaOpacity ?? t.areaOpacity ?? p
|
|
59
68
|
};
|
|
60
69
|
}
|
|
61
|
-
function
|
|
62
|
-
let
|
|
70
|
+
function k(t, { kind: p, mount: k, libDefaults: A, componentName: j }) {
|
|
71
|
+
let M = s({
|
|
63
72
|
props: t,
|
|
64
|
-
libDefaults:
|
|
65
|
-
componentName:
|
|
66
|
-
bridgeKeys:
|
|
67
|
-
registryKeys:
|
|
73
|
+
libDefaults: A,
|
|
74
|
+
componentName: j,
|
|
75
|
+
bridgeKeys: E,
|
|
76
|
+
registryKeys: D,
|
|
68
77
|
fallbackProps: () => t.sparkline ? { height: 48 } : {}
|
|
69
|
-
}),
|
|
70
|
-
locale:
|
|
71
|
-
categories:
|
|
78
|
+
}), N = e(), { merged: P, hidden: F, locale: I, resolveMessage: L } = M, R = c(() => JSON.stringify((t.categories ?? []).map((e) => l(e) ? { time: e.getTime() } : e))), z = c(() => JSON.parse(R.value).map((e) => f(e) ? e : new Date(e.time))), B = c(() => T(z.value) ? z.value.map((e) => e.getTime()) : null), V = c(() => x({
|
|
79
|
+
locale: I.value,
|
|
80
|
+
categories: z.value,
|
|
72
81
|
formatDate: t.formatDate
|
|
73
|
-
})),
|
|
74
|
-
let e = t.formatLabel, n =
|
|
75
|
-
return e ?? ((e) =>
|
|
76
|
-
}),
|
|
77
|
-
...
|
|
82
|
+
})), H = c(() => {
|
|
83
|
+
let e = t.formatLabel, n = I.value;
|
|
84
|
+
return e ?? ((e) => h(e, n));
|
|
85
|
+
}), U = c(() => p === "bar" ? P.value.orientation ?? "vertical" : "vertical"), W = c(() => N.entries.value.map((e) => O(e, {
|
|
86
|
+
...P.value,
|
|
78
87
|
stack: t.stack
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}))),
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
88
|
+
}, p))), G = r(M, () => [...N.entries.value, ...S(W.value)]), K = c(() => b({
|
|
89
|
+
labels: V.value,
|
|
90
|
+
categoryColors: p === "bar" ? t.categoryColors : void 0
|
|
91
|
+
})), q = r(M, () => K.value), J = c(() => g({
|
|
92
|
+
colors: G.value,
|
|
93
|
+
series: W.value,
|
|
94
|
+
theme: M.theme.value,
|
|
95
|
+
categoryColors: u(K.value) ? null : K.value.map((e) => q.value[e.id] ?? "")
|
|
96
|
+
})), Y = c(() => J.value.filter((e) => !F.value.includes(e.id))), X = c(() => Object.fromEntries(J.value.map((e) => [e.id, e.color]))), Z = c(() => {
|
|
97
|
+
let e = { ...N.axes.value.x }, t = { ...N.axes.value.y };
|
|
98
|
+
if (!d(B.value)) {
|
|
99
|
+
let n = U.value === "horizontal" ? t : e;
|
|
100
|
+
n.formatTick ??= C({
|
|
101
|
+
locale: I.value,
|
|
102
|
+
timestamps: B.value
|
|
89
103
|
});
|
|
90
104
|
}
|
|
91
105
|
return {
|
|
92
106
|
xAxis: e,
|
|
93
107
|
yAxis: t
|
|
94
108
|
};
|
|
95
|
-
}),
|
|
96
|
-
let e =
|
|
97
|
-
return
|
|
109
|
+
}), Q = c(() => {
|
|
110
|
+
let e = M.theme.value;
|
|
111
|
+
return d(e) ? null : {
|
|
98
112
|
theme: e,
|
|
99
|
-
xAxis:
|
|
100
|
-
yAxis:
|
|
101
|
-
categories:
|
|
102
|
-
series:
|
|
103
|
-
timestamps:
|
|
104
|
-
orientation:
|
|
105
|
-
formatLabel:
|
|
106
|
-
animation:
|
|
107
|
-
width:
|
|
108
|
-
height:
|
|
113
|
+
xAxis: Z.value.xAxis,
|
|
114
|
+
yAxis: Z.value.yAxis,
|
|
115
|
+
categories: V.value,
|
|
116
|
+
series: Y.value,
|
|
117
|
+
timestamps: B.value,
|
|
118
|
+
orientation: U.value,
|
|
119
|
+
formatLabel: H.value,
|
|
120
|
+
animation: M.animation.value,
|
|
121
|
+
width: M.plotSize.value.width,
|
|
122
|
+
height: M.plotSize.value.height,
|
|
109
123
|
sparkline: t.sparkline === !0,
|
|
110
|
-
radius:
|
|
124
|
+
radius: P.value.radius ?? m
|
|
111
125
|
};
|
|
112
126
|
});
|
|
113
|
-
o(
|
|
114
|
-
mount:
|
|
115
|
-
options:
|
|
127
|
+
o(M, {
|
|
128
|
+
mount: k,
|
|
129
|
+
options: Q
|
|
116
130
|
});
|
|
117
|
-
let
|
|
118
|
-
let e =
|
|
119
|
-
return
|
|
131
|
+
let $ = c(() => {
|
|
132
|
+
let e = M.active.value.index;
|
|
133
|
+
return d(e) ? null : y({
|
|
120
134
|
index: e,
|
|
121
|
-
series:
|
|
122
|
-
title:
|
|
135
|
+
series: Y.value,
|
|
136
|
+
title: V.value[e] ?? ""
|
|
123
137
|
});
|
|
124
138
|
});
|
|
125
139
|
return {
|
|
126
|
-
frame: a(
|
|
127
|
-
tooltip:
|
|
128
|
-
count:
|
|
129
|
-
isEmpty:
|
|
130
|
-
table:
|
|
131
|
-
locale:
|
|
132
|
-
series:
|
|
133
|
-
categories:
|
|
134
|
-
categoryHeader:
|
|
140
|
+
frame: a(M, c(() => ({
|
|
141
|
+
tooltip: $.value,
|
|
142
|
+
count: V.value.length,
|
|
143
|
+
isEmpty: w(W.value.flatMap((e) => e.data)),
|
|
144
|
+
table: v({
|
|
145
|
+
locale: I.value,
|
|
146
|
+
series: W.value,
|
|
147
|
+
categories: V.value,
|
|
148
|
+
categoryHeader: L(d(B.value) ? "Category" : "Date")
|
|
135
149
|
}),
|
|
136
|
-
summary:
|
|
137
|
-
series:
|
|
138
|
-
categories:
|
|
150
|
+
summary: L("Chart with {{count}} series ({{names}}) across {{categories}} categories, from {{first}} to {{last}}.", _({
|
|
151
|
+
series: W.value,
|
|
152
|
+
categories: V.value
|
|
139
153
|
}))
|
|
140
154
|
}))),
|
|
141
|
-
merged:
|
|
142
|
-
context: i(
|
|
143
|
-
family:
|
|
144
|
-
tooltip:
|
|
145
|
-
setAxis:
|
|
146
|
-
removeAxis:
|
|
147
|
-
upsertSeries:
|
|
148
|
-
removeSeries:
|
|
149
|
-
legendItems: n(
|
|
155
|
+
merged: P,
|
|
156
|
+
context: i(M, c(() => ({
|
|
157
|
+
family: p,
|
|
158
|
+
tooltip: $.value,
|
|
159
|
+
setAxis: N.setAxis,
|
|
160
|
+
removeAxis: N.removeAxis,
|
|
161
|
+
upsertSeries: N.upsertSeries,
|
|
162
|
+
removeSeries: N.removeSeries,
|
|
163
|
+
legendItems: n(W.value, X.value, F.value)
|
|
150
164
|
}))),
|
|
151
|
-
options:
|
|
165
|
+
options: Q
|
|
152
166
|
};
|
|
153
167
|
}
|
|
154
168
|
//#endregion
|
|
155
|
-
export {
|
|
169
|
+
export { k as useChartCartesian };
|
package/dist/augments.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ import { ChipClasses, ChipProps } from './Components/Chip';
|
|
|
20
20
|
import { DividerClasses, DividerProps } from './Components/Divider';
|
|
21
21
|
import { EmptyStateClasses, EmptyStateProps } from './Components/EmptyState';
|
|
22
22
|
import { FileUploadClasses, FileUploadProps } from './Components/FileUpload';
|
|
23
|
+
import { HeadingClasses, HeadingProps } from './Components/Heading';
|
|
23
24
|
import { IconProps } from './Components/Icon';
|
|
24
25
|
import { LabelClasses, LabelProps } from './Components/Label';
|
|
25
26
|
import { LinkClasses, LinkProps } from './Components/Link';
|
|
@@ -44,6 +45,7 @@ import { SliderClasses, SliderProps } from './Components/Slider';
|
|
|
44
45
|
import { SnackbarClasses, SnackbarProps } from './Components/Snackbar';
|
|
45
46
|
import { SpinnerClasses, SpinnerProps } from './Components/Spinner';
|
|
46
47
|
import { SwitchClasses, SwitchProps } from './Components/Switch';
|
|
48
|
+
import { TextClasses, TextProps } from './Components/Text';
|
|
47
49
|
import { TextareaClasses, TextareaProps } from './Components/Textarea';
|
|
48
50
|
import { TextFieldClasses, TextFieldProps } from './Components/TextField';
|
|
49
51
|
declare module "@bridge-ui/core/Config" {
|
|
@@ -133,6 +135,10 @@ declare module "@bridge-ui/core/Config" {
|
|
|
133
135
|
classes: FileUploadClasses;
|
|
134
136
|
defaultProps: Partial<Pick<FileUploadProps, "size" | "color" | "rounded" | "variant" | "multiple" | "orientation">>;
|
|
135
137
|
}
|
|
138
|
+
interface HeadingConfigOverrides {
|
|
139
|
+
classes: HeadingClasses;
|
|
140
|
+
defaultProps: Partial<Pick<HeadingProps, "size" | "color" | "weight" | "variant">>;
|
|
141
|
+
}
|
|
136
142
|
interface IconConfigOverrides {
|
|
137
143
|
defaultProps: Partial<Pick<IconProps, "size">>;
|
|
138
144
|
}
|
|
@@ -226,6 +232,10 @@ declare module "@bridge-ui/core/Config" {
|
|
|
226
232
|
classes: SwitchClasses;
|
|
227
233
|
defaultProps: Partial<Pick<SwitchProps, "size" | "color" | "rounded" | "hideErrorMessage">>;
|
|
228
234
|
}
|
|
235
|
+
interface TextConfigOverrides {
|
|
236
|
+
classes: TextClasses;
|
|
237
|
+
defaultProps: Partial<Pick<TextProps, "size" | "color" | "weight" | "variant">>;
|
|
238
|
+
}
|
|
229
239
|
interface TextareaConfigOverrides {
|
|
230
240
|
classes: TextareaClasses;
|
|
231
241
|
defaultProps: Partial<Pick<TextareaProps, "size" | "color" | "resize" | "rounded" | "variant" | "autosize" | "showErrorIcon" | "hideErrorMessage" | "showDescriptionOnError">>;
|
package/dist/index.d.ts
CHANGED
|
@@ -82,6 +82,8 @@ export { FormControl, useFormControl } from './Components/FormControl';
|
|
|
82
82
|
export type { FormControlClasses, FormControlCustomProps, FormControlOwnProps, FormControlProps, FormControlSizeOverrides, FormControlSlots, UseFormControlReturn, } from './Components/FormControl';
|
|
83
83
|
export { FormField, useFormField } from './Components/FormField';
|
|
84
84
|
export type { FormFieldClasses, FormFieldColorOverrides, FormFieldCustomProps, FormFieldOwnProps, FormFieldProps, FormFieldRoundedOverrides, FormFieldSizeOverrides, FormFieldSlots, FormFieldVariantOverrides, UseFormFieldReturn, } from './Components/FormField';
|
|
85
|
+
export { Heading, useHeading } from './Components/Heading';
|
|
86
|
+
export type { HeadingClasses, HeadingOwnProps, HeadingProps, HeadingSlots, } from './Components/Heading';
|
|
85
87
|
export { Icon, type IconOwnProps, type IconProps } from './Components/Icon';
|
|
86
88
|
export type { IconSizeOverrides } from './Components/Icon';
|
|
87
89
|
export { Label, useLabel } from './Components/Label';
|
|
@@ -148,6 +150,8 @@ export { TabPanel, useTabPanel } from './Components/TabPanel';
|
|
|
148
150
|
export type { TabPanelClasses, TabPanelCustomProps, TabPanelOwnProps, TabPanelProps, TabPanelSlots, } from './Components/TabPanel';
|
|
149
151
|
export { TABS_INJECTION_KEY, Tabs, useTabs } from './Components/Tabs';
|
|
150
152
|
export type { TabsClasses, TabsColorOverrides, TabsContextValue, TabsCustomProps, TabsEmits, TabsItemEntry, TabsOrientationOverrides, TabsOwnProps, TabsProps, TabsSizeOverrides, TabsSlots, TabsTokenClasses, TabsVariantOverrides, } from './Components/Tabs';
|
|
153
|
+
export { Text, useText } from './Components/Text';
|
|
154
|
+
export type { TextClasses, TextColorOverrides, TextOwnProps, TextProps, TextSizeOverrides, TextSlots, TextVariantOverrides, TextWeightOverrides, } from './Components/Text';
|
|
151
155
|
export { Textarea, useTextarea } from './Components/Textarea';
|
|
152
156
|
export type { TextareaClasses, TextareaCustomProps, TextareaOwnProps, TextareaProps, TextareaSlots, } from './Components/Textarea';
|
|
153
157
|
export { TextField, useTextField } from './Components/TextField';
|