@bridge-ui/vue 0.17.3 → 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 +36 -35
- package/ai/skills/bridge-ui-setup/SKILL.md +1 -1
- package/dist/Components/CalendarMonth/composables/useCalendarMonth.d.ts +1 -1
- package/dist/Components/ChartAxis/ChartAxis.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/Components/ChartAxis/chartAxis.types.d.ts +17 -7
- package/dist/Components/ChartAxis/composables/useChartAxis.d.ts +2 -2
- package/dist/Components/ChartAxis/composables/useChartAxis.js +15 -10
- package/dist/Components/ChartBar/ChartBar.js +5 -0
- package/dist/Components/ChartBar/ChartBar.vue.d.ts +16 -0
- package/dist/Components/ChartBar/ChartBar.vue_vue_type_script_setup_true_lang.js +64 -0
- package/dist/Components/ChartBar/chartBar.types.d.ts +66 -0
- package/dist/Components/ChartBar/composables/useChartBar.d.ts +26 -0
- package/dist/Components/ChartBar/composables/useChartBar.js +13 -0
- package/dist/Components/ChartBar/index.d.ts +4 -0
- package/dist/Components/ChartBar/index.js +4 -0
- package/dist/Components/ChartBarSeries/ChartBarSeries.js +5 -0
- package/dist/Components/ChartBarSeries/ChartBarSeries.vue.d.ts +6 -0
- package/dist/Components/ChartBarSeries/ChartBarSeries.vue_vue_type_script_setup_true_lang.js +28 -0
- package/dist/Components/ChartBarSeries/chartBarSeries.types.d.ts +67 -0
- package/dist/Components/ChartBarSeries/composables/useChartBarSeries.d.ts +5 -0
- package/dist/Components/ChartBarSeries/composables/useChartBarSeries.js +23 -0
- package/dist/Components/ChartBarSeries/index.d.ts +4 -0
- package/dist/Components/ChartBarSeries/index.js +3 -0
- package/dist/Components/ChartFunnel/ChartFunnel.js +5 -0
- package/dist/Components/ChartFunnel/ChartFunnel.vue.d.ts +16 -0
- package/dist/Components/ChartFunnel/ChartFunnel.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/Components/ChartFunnel/chartFunnel.types.d.ts +54 -0
- package/dist/Components/ChartFunnel/composables/useChartFunnel.d.ts +29 -0
- package/dist/Components/ChartFunnel/composables/useChartFunnel.js +68 -0
- package/dist/Components/ChartFunnel/index.d.ts +4 -0
- package/dist/Components/ChartFunnel/index.js +4 -0
- package/dist/Components/ChartLegend/ChartLegend.vue.d.ts +2 -0
- package/dist/Components/ChartLegend/ChartLegend.vue_vue_type_script_setup_true_lang.js +33 -13
- package/dist/Components/ChartLegend/chartLegend.types.d.ts +41 -5
- package/dist/Components/ChartLegend/composables/useChartLegend.d.ts +9 -5
- package/dist/Components/ChartLegend/composables/useChartLegend.js +88 -54
- package/dist/Components/ChartLine/ChartLine.js +5 -0
- package/dist/Components/ChartLine/ChartLine.vue.d.ts +20 -0
- package/dist/Components/ChartLine/ChartLine.vue_vue_type_script_setup_true_lang.js +77 -0
- package/dist/Components/ChartLine/chartLine.types.d.ts +79 -0
- package/dist/Components/ChartLine/composables/useChartLine.d.ts +26 -0
- package/dist/Components/ChartLine/composables/useChartLine.js +13 -0
- package/dist/Components/ChartLine/index.d.ts +4 -0
- package/dist/Components/ChartLine/index.js +4 -0
- package/dist/Components/ChartLineSeries/ChartLineSeries.js +5 -0
- package/dist/Components/ChartLineSeries/ChartLineSeries.vue.d.ts +10 -0
- package/dist/Components/ChartLineSeries/ChartLineSeries.vue_vue_type_script_setup_true_lang.js +45 -0
- package/dist/Components/ChartLineSeries/chartLineSeries.types.d.ts +96 -0
- package/dist/Components/ChartLineSeries/composables/useChartLineSeries.d.ts +5 -0
- package/dist/Components/ChartLineSeries/composables/useChartLineSeries.js +28 -0
- package/dist/Components/ChartLineSeries/index.d.ts +4 -0
- package/dist/Components/ChartLineSeries/index.js +3 -0
- package/dist/Components/ChartPie/ChartPie.js +5 -0
- package/dist/Components/ChartPie/ChartPie.vue.d.ts +15 -0
- package/dist/Components/ChartPie/ChartPie.vue_vue_type_script_setup_true_lang.js +76 -0
- package/dist/Components/ChartPie/chartPie.types.d.ts +92 -0
- package/dist/Components/ChartPie/composables/useChartPie.d.ts +30 -0
- package/dist/Components/ChartPie/composables/useChartPie.js +81 -0
- package/dist/Components/ChartPie/index.d.ts +4 -0
- package/dist/Components/ChartPie/index.js +4 -0
- package/dist/Components/ChartScatter/ChartScatter.js +5 -0
- package/dist/Components/{Chart/Chart.vue.d.ts → ChartScatter/ChartScatter.vue.d.ts} +3 -2
- package/dist/Components/ChartScatter/ChartScatter.vue_vue_type_script_setup_true_lang.js +49 -0
- package/dist/Components/ChartScatter/chartScatter.types.d.ts +23 -0
- package/dist/Components/ChartScatter/composables/useChartScatter.d.ts +29 -0
- package/dist/Components/ChartScatter/composables/useChartScatter.js +108 -0
- package/dist/Components/ChartScatter/index.d.ts +4 -0
- package/dist/Components/ChartScatter/index.js +4 -0
- package/dist/Components/ChartScatterSeries/ChartScatterSeries.js +5 -0
- package/dist/Components/ChartScatterSeries/ChartScatterSeries.vue.d.ts +4 -0
- package/dist/Components/ChartScatterSeries/ChartScatterSeries.vue_vue_type_script_setup_true_lang.js +22 -0
- package/dist/Components/ChartScatterSeries/chartScatterSeries.types.d.ts +45 -0
- package/dist/Components/ChartScatterSeries/composables/useChartScatterSeries.d.ts +4 -0
- package/dist/Components/ChartScatterSeries/composables/useChartScatterSeries.js +19 -0
- package/dist/Components/ChartScatterSeries/index.d.ts +4 -0
- package/dist/Components/ChartScatterSeries/index.js +3 -0
- package/dist/Components/ChartTooltip/ChartTooltip.vue_vue_type_script_setup_true_lang.js +22 -10
- package/dist/Components/ChartTooltip/chartTooltip.types.d.ts +28 -9
- package/dist/Components/ChartTooltip/composables/useChartTooltip.d.ts +4 -1
- package/dist/Components/ChartTooltip/composables/useChartTooltip.js +81 -63
- 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/ResizablePanel/composables/useResizablePanel.d.ts +1 -1
- package/dist/Components/Spinner/composables/useSpinner.d.ts +1 -1
- 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/ChartFrame.js +5 -0
- package/dist/Utils/Charts/ChartFrame.vue.d.ts +24 -0
- package/dist/Utils/Charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +41 -0
- package/dist/{Components/Chart → Utils/Charts}/chart.types.d.ts +33 -18
- package/dist/Utils/Charts/chartInjectionKey.d.ts +151 -0
- package/dist/{Components/Chart → Utils/Charts}/chartInjectionKey.js +2 -2
- package/dist/Utils/Charts/echarts/bar.d.ts +6 -0
- package/dist/Utils/Charts/echarts/bar.js +23 -0
- package/dist/Utils/Charts/echarts/cartesian.d.ts +15 -0
- package/dist/Utils/Charts/echarts/cartesian.js +290 -0
- package/dist/Utils/Charts/echarts/funnel.d.ts +15 -0
- package/dist/Utils/Charts/echarts/funnel.js +79 -0
- package/dist/Utils/Charts/echarts/line.d.ts +5 -0
- package/dist/Utils/Charts/echarts/line.js +20 -0
- package/dist/Utils/Charts/echarts/part.d.ts +19 -0
- package/dist/Utils/Charts/echarts/part.js +45 -0
- package/dist/Utils/Charts/echarts/pie.d.ts +14 -0
- package/dist/Utils/Charts/echarts/pie.js +76 -0
- package/dist/Utils/Charts/echarts/plot.d.ts +44 -0
- package/dist/Utils/Charts/echarts/plot.js +52 -0
- package/dist/Utils/Charts/echarts/scatter.d.ts +14 -0
- package/dist/Utils/Charts/echarts/scatter.js +161 -0
- package/dist/Utils/Charts/index.d.ts +6 -0
- package/dist/Utils/Charts/index.js +6 -0
- package/dist/Utils/Charts/useChartCartesian.d.ts +59 -0
- package/dist/Utils/Charts/useChartCartesian.js +169 -0
- package/dist/Utils/Charts/useChartPart.d.ts +45 -0
- package/dist/Utils/Charts/useChartPart.js +97 -0
- package/dist/Utils/Charts/useChartRegistry.d.ts +13 -0
- package/dist/Utils/Charts/useChartRegistry.js +40 -0
- package/dist/Utils/Charts/useChartRoot.d.ts +156 -0
- package/dist/Utils/Charts/useChartRoot.js +342 -0
- package/dist/Utils/Charts/useChartSeries.d.ts +10 -0
- package/dist/Utils/Charts/useChartSeries.js +22 -0
- package/dist/augments.d.ts +33 -7
- package/dist/index.d.ts +4 -0
- package/dist/index.js +90 -86
- package/docs/README.md +8 -1
- package/docs/components/BridgeUIProvider.md +1 -1
- package/docs/components/Card.md +15 -0
- package/docs/components/Chart.md +118 -151
- package/docs/components/ChartBar.md +190 -0
- package/docs/components/ChartFunnel.md +62 -0
- package/docs/components/ChartLine.md +192 -0
- package/docs/components/ChartPie.md +138 -0
- package/docs/components/ChartScatter.md +102 -0
- package/docs/components/Heading.md +85 -0
- package/docs/components/Text.md +118 -0
- package/package.json +2 -2
- package/dist/Components/Chart/Chart.js +0 -5
- package/dist/Components/Chart/Chart.vue_vue_type_script_setup_true_lang.js +0 -52
- package/dist/Components/Chart/chartInjectionKey.d.ts +0 -94
- package/dist/Components/Chart/composables/useChart.d.ts +0 -40
- package/dist/Components/Chart/composables/useChart.js +0 -346
- package/dist/Components/Chart/echartsChart.d.ts +0 -14
- package/dist/Components/Chart/echartsChart.js +0 -199
- package/dist/Components/Chart/index.d.ts +0 -4
- package/dist/Components/Chart/index.js +0 -4
- package/dist/Components/ChartSeries/ChartSeries.js +0 -5
- package/dist/Components/ChartSeries/ChartSeries.vue.d.ts +0 -4
- package/dist/Components/ChartSeries/ChartSeries.vue_vue_type_script_setup_true_lang.js +0 -24
- package/dist/Components/ChartSeries/chartSeries.types.d.ts +0 -37
- package/dist/Components/ChartSeries/composables/useChartSeries.d.ts +0 -10
- package/dist/Components/ChartSeries/composables/useChartSeries.js +0 -29
- package/dist/Components/ChartSeries/index.d.ts +0 -3
- package/dist/Components/ChartSeries/index.js +0 -3
|
@@ -1,110 +1,128 @@
|
|
|
1
1
|
import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
|
|
2
|
-
import { useChartContext as r } from "
|
|
2
|
+
import { useChartContext as r } from "../../../Utils/Charts/chartInjectionKey.js";
|
|
3
3
|
import { computed as i, shallowRef as a, useAttrs as o, watch as s } from "vue";
|
|
4
4
|
import { get as c, isEqual as l, isNil as u } from "es-toolkit/compat";
|
|
5
|
-
import {
|
|
6
|
-
import { cn as
|
|
5
|
+
import { formatChartPercent as d, formatChartValue as f, resolveChartTooltipPosition as p } from "@bridge-ui/core/Domain";
|
|
6
|
+
import { cn as m, splitComponentProps as h } from "@bridge-ui/core/Utils";
|
|
7
7
|
//#region src/Components/ChartTooltip/composables/useChartTooltip.ts
|
|
8
|
-
var
|
|
8
|
+
var g = [
|
|
9
9
|
"classes",
|
|
10
10
|
"customProps",
|
|
11
|
-
"formatValue"
|
|
11
|
+
"formatValue",
|
|
12
|
+
"formatPercent"
|
|
12
13
|
];
|
|
13
|
-
function
|
|
14
|
-
let
|
|
14
|
+
function _(_, v) {
|
|
15
|
+
let y = o(), b = r(), x = a(null), S = i(() => h({
|
|
15
16
|
props: {
|
|
16
|
-
...
|
|
17
|
-
...
|
|
17
|
+
...y,
|
|
18
|
+
..._
|
|
18
19
|
},
|
|
19
|
-
bridgeKeys:
|
|
20
|
-
})), { merged:
|
|
20
|
+
bridgeKeys: g
|
|
21
|
+
})), { merged: C, entry: w } = t({
|
|
21
22
|
componentName: "ChartTooltip",
|
|
22
|
-
props: () =>
|
|
23
|
-
}),
|
|
24
|
-
entry:
|
|
25
|
-
props: () =>
|
|
26
|
-
}),
|
|
23
|
+
props: () => S.value.componentProps
|
|
24
|
+
}), T = n({
|
|
25
|
+
entry: w,
|
|
26
|
+
props: () => S.value.componentProps
|
|
27
|
+
}), E = i(() => C.value.customProps), D = i(() => {
|
|
28
|
+
let e = b.value.tooltip;
|
|
29
|
+
return !u(b.value.activeIndex) && !u(e) && e.items.length > 0;
|
|
30
|
+
});
|
|
27
31
|
s([
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
() =>
|
|
31
|
-
() =>
|
|
32
|
+
D,
|
|
33
|
+
v,
|
|
34
|
+
() => b.value.activeIndex,
|
|
35
|
+
() => b.value.tooltip
|
|
32
36
|
], () => {
|
|
33
|
-
let e =
|
|
34
|
-
if (!
|
|
35
|
-
let n =
|
|
37
|
+
let e = v.value, t = b.value.activeIndex;
|
|
38
|
+
if (!D.value || u(e) || u(t)) return;
|
|
39
|
+
let n = b.value.getTooltipAnchor(t), r = u(n) ? null : p({
|
|
36
40
|
anchor: n,
|
|
37
|
-
bounds:
|
|
41
|
+
bounds: b.value.getBounds(),
|
|
38
42
|
size: {
|
|
39
43
|
width: e.offsetWidth,
|
|
40
44
|
height: e.offsetHeight
|
|
41
45
|
}
|
|
42
46
|
});
|
|
43
|
-
l(
|
|
47
|
+
l(x.value, r) || (x.value = r);
|
|
44
48
|
}, {
|
|
45
49
|
flush: "post",
|
|
46
50
|
immediate: !0
|
|
47
51
|
});
|
|
48
|
-
let
|
|
49
|
-
let e =
|
|
50
|
-
return u(e) ? null : {
|
|
52
|
+
let O = i(() => {
|
|
53
|
+
let e = b.value.activeIndex, t = b.value.tooltip;
|
|
54
|
+
return u(e) || u(t) ? null : {
|
|
51
55
|
index: e,
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
color: t.color,
|
|
57
|
+
title: t.title,
|
|
58
|
+
items: t.items
|
|
54
59
|
};
|
|
55
60
|
});
|
|
56
|
-
function
|
|
57
|
-
return
|
|
61
|
+
function k(e) {
|
|
62
|
+
return C.value.formatValue?.(e.value, e) ?? f(e.value, b.value.locale);
|
|
63
|
+
}
|
|
64
|
+
function A(e) {
|
|
65
|
+
return u(e.percent) ? null : C.value.formatPercent?.(e.percent, e) ?? d(e.percent, b.value.locale);
|
|
58
66
|
}
|
|
59
|
-
let
|
|
67
|
+
let j = i(() => e(E.value?.root, S.value.inheritedAttrs, {
|
|
60
68
|
"aria-hidden": !0,
|
|
61
69
|
style: {
|
|
62
|
-
top: `${
|
|
63
|
-
left: `${
|
|
64
|
-
visibility: u(
|
|
70
|
+
top: `${x.value?.top ?? 0}px`,
|
|
71
|
+
left: `${x.value?.left ?? 0}px`,
|
|
72
|
+
visibility: u(x.value) ? "hidden" : "visible"
|
|
65
73
|
},
|
|
66
|
-
class:
|
|
74
|
+
class: m({
|
|
67
75
|
"pointer-events-none absolute z-20 flex min-w-32 flex-col": !0,
|
|
68
76
|
"rounded-md border border-dark-200 bg-white text-dark-700 shadow-lg": !0,
|
|
69
77
|
"dark:border-dark-700 dark:bg-dark-800 dark:text-dark-100": !0,
|
|
70
|
-
[
|
|
71
|
-
[c(
|
|
78
|
+
[b.value.tokenClasses.tooltip ?? ""]: !0,
|
|
79
|
+
[c(T.value, "root") ?? ""]: !0
|
|
72
80
|
})
|
|
73
|
-
})),
|
|
74
|
-
"font-semibold": !0,
|
|
75
|
-
[c(
|
|
76
|
-
}) })),
|
|
81
|
+
})), M = i(() => ({ class: m({
|
|
82
|
+
"flex items-center gap-2 font-semibold": !0,
|
|
83
|
+
[c(T.value, "title") ?? ""]: !0
|
|
84
|
+
}) })), N = i(() => ({ class: m({
|
|
77
85
|
"flex items-center gap-2": !0,
|
|
78
|
-
[c(
|
|
86
|
+
[c(T.value, "item") ?? ""]: !0
|
|
79
87
|
}) }));
|
|
80
|
-
function
|
|
88
|
+
function P(e) {
|
|
81
89
|
return {
|
|
82
|
-
style: { backgroundColor: e
|
|
83
|
-
class:
|
|
90
|
+
style: { backgroundColor: e },
|
|
91
|
+
class: m({
|
|
84
92
|
"shrink-0 rounded-full": !0,
|
|
85
|
-
[
|
|
86
|
-
[c(
|
|
93
|
+
[b.value.tokenClasses.swatch ?? ""]: !0,
|
|
94
|
+
[c(T.value, "swatch") ?? ""]: !0
|
|
87
95
|
})
|
|
88
96
|
};
|
|
89
97
|
}
|
|
98
|
+
let F = i(() => ({ class: m({
|
|
99
|
+
"flex-1 text-dark-500 dark:text-dark-400": !0,
|
|
100
|
+
[c(T.value, "label") ?? ""]: !0
|
|
101
|
+
}) })), I = i(() => ({ class: m({
|
|
102
|
+
"text-dark-500 tabular-nums dark:text-dark-400": !0,
|
|
103
|
+
[c(T.value, "percent") ?? ""]: !0
|
|
104
|
+
}) }));
|
|
90
105
|
return {
|
|
91
|
-
isOpen:
|
|
92
|
-
merged:
|
|
93
|
-
context:
|
|
94
|
-
itemBind:
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
"
|
|
98
|
-
[c(w.value, "label") ?? ""]: !0
|
|
106
|
+
isOpen: D,
|
|
107
|
+
merged: C,
|
|
108
|
+
context: O,
|
|
109
|
+
itemBind: N,
|
|
110
|
+
noteBind: i(() => ({ class: m({
|
|
111
|
+
"text-dark-500 dark:text-dark-400": !0,
|
|
112
|
+
[c(T.value, "note") ?? ""]: !0
|
|
99
113
|
}) })),
|
|
100
|
-
|
|
101
|
-
|
|
114
|
+
rootBind: j,
|
|
115
|
+
labelBind: F,
|
|
116
|
+
titleBind: M,
|
|
117
|
+
valueBind: i(() => ({ class: m({
|
|
102
118
|
"font-medium tabular-nums": !0,
|
|
103
|
-
[c(
|
|
119
|
+
[c(T.value, "value") ?? ""]: !0
|
|
104
120
|
}) })),
|
|
105
|
-
|
|
106
|
-
|
|
121
|
+
percentBind: I,
|
|
122
|
+
formatValue: k,
|
|
123
|
+
formatPercent: A,
|
|
124
|
+
getSwatchBind: P
|
|
107
125
|
};
|
|
108
126
|
}
|
|
109
127
|
//#endregion
|
|
110
|
-
export {
|
|
128
|
+
export { _ as useChartTooltip };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HeadingOwnProps, HeadingSlots } from './heading.types';
|
|
2
|
+
type __VLS_Slots = HeadingSlots;
|
|
3
|
+
declare const __VLS_base: import('vue').DefineComponent<HeadingOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<HeadingOwnProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
4
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
7
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
8
|
+
new (): {
|
|
9
|
+
$slots: S;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { useHeading as e } from "./composables/useHeading.js";
|
|
2
|
+
import { createBlock as t, defineComponent as n, guardReactiveProps as r, normalizeProps as i, openBlock as a, renderSlot as o, resolveDynamicComponent as s, unref as c, withCtx as l } from "vue";
|
|
3
|
+
//#region src/Components/Heading/Heading.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var u = /*@__PURE__*/ n({
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "Heading",
|
|
7
|
+
props: {
|
|
8
|
+
classes: {},
|
|
9
|
+
color: {},
|
|
10
|
+
level: {},
|
|
11
|
+
size: {},
|
|
12
|
+
variant: {},
|
|
13
|
+
weight: {}
|
|
14
|
+
},
|
|
15
|
+
setup(n) {
|
|
16
|
+
let { rootTag: u, rootBind: d } = e(n, {
|
|
17
|
+
level: 2,
|
|
18
|
+
color: "dark",
|
|
19
|
+
weight: "semibold",
|
|
20
|
+
variant: "default"
|
|
21
|
+
});
|
|
22
|
+
return (e, n) => (a(), t(s(c(u)), i(r(c(d))), {
|
|
23
|
+
default: l(() => [o(e.$slots, "default")]),
|
|
24
|
+
_: 3
|
|
25
|
+
}, 16));
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
//#endregion
|
|
29
|
+
export { u as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LibDefaultsShape, MergeLibDefaults } from '@bridge-ui/core/Utils';
|
|
2
|
+
import { HeadingOwnProps, HeadingProps } from '../heading.types';
|
|
3
|
+
type HeadingLibDefaults = LibDefaultsShape<HeadingOwnProps, "color" | "level" | "weight" | "variant">;
|
|
4
|
+
type HeadingMerged = MergeLibDefaults<HeadingOwnProps, HeadingLibDefaults>;
|
|
5
|
+
export declare function useHeading(props: HeadingOwnProps, libDefaults: HeadingLibDefaults): {
|
|
6
|
+
merged: import('vue').ComputedRef<HeadingMerged>;
|
|
7
|
+
rootTag: import('vue').ComputedRef<"h1" | "h2" | "h3" | "h4" | "h5" | "h6">;
|
|
8
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", {}, Omit<HeadingProps, "color" | "size" | "classes" | "variant" | "weight" | "level">>>;
|
|
9
|
+
};
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
|
|
2
|
+
import { computed as r, useAttrs as i } from "vue";
|
|
3
|
+
import { get as a, isNil as o } from "es-toolkit/compat";
|
|
4
|
+
import { headingLevelProps as s, textSizeProps as c, textVariantProps as l, textWeightProps as u } from "@bridge-ui/core/Tokens";
|
|
5
|
+
import { cn as d, mergeBridgeUILayeredClasses as f, splitComponentProps as p } from "@bridge-ui/core/Utils";
|
|
6
|
+
//#region src/Components/Heading/composables/useHeading.ts
|
|
7
|
+
var m = [
|
|
8
|
+
"size",
|
|
9
|
+
"color",
|
|
10
|
+
"level",
|
|
11
|
+
"weight",
|
|
12
|
+
"classes",
|
|
13
|
+
"variant"
|
|
14
|
+
];
|
|
15
|
+
function h(h, g) {
|
|
16
|
+
let _ = i(), v = r(() => p({
|
|
17
|
+
props: {
|
|
18
|
+
..._,
|
|
19
|
+
...h
|
|
20
|
+
},
|
|
21
|
+
bridgeKeys: m
|
|
22
|
+
})), { merged: y, entry: b } = t({
|
|
23
|
+
libDefaults: g,
|
|
24
|
+
componentName: "Heading",
|
|
25
|
+
props: () => v.value.componentProps
|
|
26
|
+
}), x = n({
|
|
27
|
+
entry: b,
|
|
28
|
+
props: () => v.value.componentProps
|
|
29
|
+
}), S = r(() => `h${y.value.level}`), C = r(() => {
|
|
30
|
+
if (o(y.value.size)) {
|
|
31
|
+
let e = f(s, b.value?.tokens?.level);
|
|
32
|
+
return a(e, String(y.value.level));
|
|
33
|
+
}
|
|
34
|
+
let e = f(c, b.value?.tokens?.size);
|
|
35
|
+
return a(e, y.value.size);
|
|
36
|
+
}), w = r(() => {
|
|
37
|
+
let e = f(l, b.value?.tokens?.variant);
|
|
38
|
+
return a(e, [y.value.variant, y.value.color]);
|
|
39
|
+
}), T = r(() => {
|
|
40
|
+
let e = f(u, b.value?.tokens?.weight);
|
|
41
|
+
return a(e, y.value.weight);
|
|
42
|
+
});
|
|
43
|
+
return {
|
|
44
|
+
merged: y,
|
|
45
|
+
rootTag: S,
|
|
46
|
+
rootBind: r(() => e({}, v.value.inheritedAttrs, d({
|
|
47
|
+
"tracking-tight": !0,
|
|
48
|
+
[C.value ?? ""]: !0,
|
|
49
|
+
[T.value ?? ""]: !0,
|
|
50
|
+
[w.value ?? ""]: !0,
|
|
51
|
+
[x.value.root ?? ""]: !0
|
|
52
|
+
})))
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
export { h as useHeading };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { HTMLAttributes, Slot } from 'vue';
|
|
2
|
+
import { TextColor, TextSize, TextVariant, TextWeight } from '@bridge-ui/core/Tokens';
|
|
3
|
+
import { MergeHtmlProps, MergeProps } from '@bridge-ui/core/Utils';
|
|
4
|
+
import { TextColorOverrides, TextSizeOverrides, TextVariantOverrides, TextWeightOverrides } from '../Text';
|
|
5
|
+
export interface HeadingClasses {
|
|
6
|
+
/**
|
|
7
|
+
* The classes to apply to the root.
|
|
8
|
+
*/
|
|
9
|
+
root?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface HeadingOwnProps {
|
|
12
|
+
/**
|
|
13
|
+
* The classes to apply to the heading.
|
|
14
|
+
*
|
|
15
|
+
* @default undefined
|
|
16
|
+
*/
|
|
17
|
+
classes?: HeadingClasses;
|
|
18
|
+
/**
|
|
19
|
+
* The color of the heading. Ignores `global.defaultColor`.
|
|
20
|
+
*
|
|
21
|
+
* @default "dark"
|
|
22
|
+
*/
|
|
23
|
+
color?: MergeProps<TextColor, TextColorOverrides>;
|
|
24
|
+
/**
|
|
25
|
+
* The heading level. Sets the element (`h1`–`h6`) and, when `size` is not
|
|
26
|
+
* set, the font size.
|
|
27
|
+
*
|
|
28
|
+
* @default 2
|
|
29
|
+
*/
|
|
30
|
+
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
31
|
+
/**
|
|
32
|
+
* The font size of the heading. When unset, it follows `level`.
|
|
33
|
+
*
|
|
34
|
+
* @default undefined
|
|
35
|
+
*/
|
|
36
|
+
size?: MergeProps<TextSize, TextSizeOverrides>;
|
|
37
|
+
/**
|
|
38
|
+
* The tone of the heading: `default` for main text, `muted` for secondary text.
|
|
39
|
+
*
|
|
40
|
+
* @default "default"
|
|
41
|
+
*/
|
|
42
|
+
variant?: MergeProps<TextVariant, TextVariantOverrides>;
|
|
43
|
+
/**
|
|
44
|
+
* The font weight of the heading.
|
|
45
|
+
*
|
|
46
|
+
* @default "semibold"
|
|
47
|
+
*/
|
|
48
|
+
weight?: MergeProps<TextWeight, TextWeightOverrides>;
|
|
49
|
+
}
|
|
50
|
+
export interface HeadingSlots {
|
|
51
|
+
/**
|
|
52
|
+
* The content of the heading.
|
|
53
|
+
*/
|
|
54
|
+
default?: Slot<undefined>;
|
|
55
|
+
}
|
|
56
|
+
export type HeadingProps = MergeHtmlProps<HeadingOwnProps, HTMLAttributes>;
|
|
@@ -13,7 +13,7 @@ export declare function useResizablePanel(props: ResizablePanelOwnProps, libDefa
|
|
|
13
13
|
[x: string]: string;
|
|
14
14
|
};
|
|
15
15
|
class: string;
|
|
16
|
-
}, "class", {}, Omit<Omit<ResizablePanelProps, "classes" | "
|
|
16
|
+
}, "class", {}, Omit<Omit<ResizablePanelProps, "classes" | "minSize" | "maxSize" | "collapsedSize" | "collapsible" | "defaultSize">, "style">>>;
|
|
17
17
|
collapsed: import('vue').ComputedRef<boolean>;
|
|
18
18
|
elementRef: Ref<HTMLElement | null, HTMLElement | null>;
|
|
19
19
|
id: string;
|
|
@@ -13,7 +13,7 @@ export declare function useSpinner(props: SpinnerOwnProps, libDefaults: SpinnerL
|
|
|
13
13
|
"aria-valuemax"?: number | undefined;
|
|
14
14
|
"aria-valuenow"?: number | undefined;
|
|
15
15
|
role: string;
|
|
16
|
-
}, "class", import('vue').HTMLAttributes | undefined, Omit<SpinnerProps, "color" | "size" | "value" | "classes" | "customProps" | "variant" | "
|
|
16
|
+
}, "class", import('vue').HTMLAttributes | undefined, Omit<SpinnerProps, "color" | "size" | "value" | "classes" | "customProps" | "variant" | "thickness" | "disableShrink" | "enableTrack">>>;
|
|
17
17
|
trackBind: import('vue').ComputedRef<(object & {
|
|
18
18
|
cx: number;
|
|
19
19
|
cy: number;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TextOwnProps, TextSlots } from './text.types';
|
|
2
|
+
type __VLS_Slots = TextSlots;
|
|
3
|
+
declare const __VLS_base: import('vue').DefineComponent<TextOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TextOwnProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
4
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
7
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
8
|
+
new (): {
|
|
9
|
+
$slots: S;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useText as e } from "./composables/useText.js";
|
|
2
|
+
import { createBlock as t, defineComponent as n, guardReactiveProps as r, normalizeProps as i, openBlock as a, renderSlot as o, resolveDynamicComponent as s, unref as c, withCtx as l } from "vue";
|
|
3
|
+
//#region src/Components/Text/Text.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var u = /*@__PURE__*/ n({
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "Text",
|
|
7
|
+
props: {
|
|
8
|
+
as: {},
|
|
9
|
+
classes: {},
|
|
10
|
+
color: {},
|
|
11
|
+
numeric: { type: Boolean },
|
|
12
|
+
size: {},
|
|
13
|
+
truncate: { type: Boolean },
|
|
14
|
+
uppercase: { type: Boolean },
|
|
15
|
+
variant: {},
|
|
16
|
+
weight: {}
|
|
17
|
+
},
|
|
18
|
+
setup(n) {
|
|
19
|
+
let { merged: u, rootBind: d } = e(n, {
|
|
20
|
+
as: "p",
|
|
21
|
+
size: "md",
|
|
22
|
+
color: "dark",
|
|
23
|
+
weight: "normal",
|
|
24
|
+
variant: "default"
|
|
25
|
+
});
|
|
26
|
+
return (e, n) => (a(), t(s(c(u).as), i(r(c(d))), {
|
|
27
|
+
default: l(() => [o(e.$slots, "default")]),
|
|
28
|
+
_: 3
|
|
29
|
+
}, 16));
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
//#endregion
|
|
33
|
+
export { u as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LibDefaultsShape, MergeLibDefaults } from '@bridge-ui/core/Utils';
|
|
2
|
+
import { TextOwnProps, TextProps } from '../text.types';
|
|
3
|
+
type TextLibDefaults = LibDefaultsShape<TextOwnProps, "as" | "size" | "color" | "weight" | "variant">;
|
|
4
|
+
type TextMerged = MergeLibDefaults<TextOwnProps, TextLibDefaults>;
|
|
5
|
+
export declare function useText(props: TextOwnProps, libDefaults: TextLibDefaults): {
|
|
6
|
+
merged: import('vue').ComputedRef<TextMerged>;
|
|
7
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", {}, Omit<TextProps, "color" | "size" | "classes" | "as" | "variant" | "numeric" | "truncate" | "weight" | "uppercase">>>;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
|
|
2
|
+
import { computed as r, useAttrs as i } from "vue";
|
|
3
|
+
import { get as a } from "es-toolkit/compat";
|
|
4
|
+
import { textSizeProps as o, textVariantProps as s, textWeightProps as c } from "@bridge-ui/core/Tokens";
|
|
5
|
+
import { cn as l, mergeBridgeUILayeredClasses as u, splitComponentProps as d } from "@bridge-ui/core/Utils";
|
|
6
|
+
//#region src/Components/Text/composables/useText.ts
|
|
7
|
+
var f = [
|
|
8
|
+
"as",
|
|
9
|
+
"size",
|
|
10
|
+
"color",
|
|
11
|
+
"weight",
|
|
12
|
+
"classes",
|
|
13
|
+
"numeric",
|
|
14
|
+
"variant",
|
|
15
|
+
"truncate",
|
|
16
|
+
"uppercase"
|
|
17
|
+
];
|
|
18
|
+
function p(p, m) {
|
|
19
|
+
let h = i(), g = r(() => d({
|
|
20
|
+
bridgeKeys: f,
|
|
21
|
+
props: {
|
|
22
|
+
...h,
|
|
23
|
+
...p
|
|
24
|
+
}
|
|
25
|
+
})), { merged: _, entry: v } = t({
|
|
26
|
+
libDefaults: m,
|
|
27
|
+
componentName: "Text",
|
|
28
|
+
props: () => g.value.componentProps
|
|
29
|
+
}), y = n({
|
|
30
|
+
entry: v,
|
|
31
|
+
props: () => g.value.componentProps
|
|
32
|
+
}), b = r(() => {
|
|
33
|
+
let e = u(o, v.value?.tokens?.size);
|
|
34
|
+
return a(e, _.value.size);
|
|
35
|
+
}), x = r(() => {
|
|
36
|
+
let e = u(s, v.value?.tokens?.variant);
|
|
37
|
+
return a(e, [_.value.variant, _.value.color]);
|
|
38
|
+
}), S = r(() => {
|
|
39
|
+
let e = u(c, v.value?.tokens?.weight);
|
|
40
|
+
return a(e, _.value.weight);
|
|
41
|
+
});
|
|
42
|
+
return {
|
|
43
|
+
merged: _,
|
|
44
|
+
rootBind: r(() => e({}, g.value.inheritedAttrs, l({
|
|
45
|
+
[b.value ?? ""]: !0,
|
|
46
|
+
[S.value ?? ""]: !0,
|
|
47
|
+
[x.value ?? ""]: !0,
|
|
48
|
+
truncate: _.value.truncate === !0,
|
|
49
|
+
"tabular-nums tracking-tight": _.value.numeric === !0,
|
|
50
|
+
"uppercase tracking-wider": _.value.uppercase === !0,
|
|
51
|
+
[y.value.root ?? ""]: !0
|
|
52
|
+
})))
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
export { p as useText };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { HTMLAttributes, Slot } from 'vue';
|
|
2
|
+
import { TextColor, TextSize, TextVariant, TextWeight } from '@bridge-ui/core/Tokens';
|
|
3
|
+
import { MergeHtmlProps, MergeProps } from '@bridge-ui/core/Utils';
|
|
4
|
+
export interface TextSizeOverrides {}
|
|
5
|
+
export interface TextColorOverrides {}
|
|
6
|
+
export interface TextWeightOverrides {}
|
|
7
|
+
export interface TextVariantOverrides {}
|
|
8
|
+
export interface TextClasses {
|
|
9
|
+
/**
|
|
10
|
+
* The classes to apply to the root.
|
|
11
|
+
*/
|
|
12
|
+
root?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface TextOwnProps {
|
|
15
|
+
/**
|
|
16
|
+
* The element rendered as the root.
|
|
17
|
+
*
|
|
18
|
+
* @default "p"
|
|
19
|
+
*/
|
|
20
|
+
as?: "p" | "dd" | "dt" | "em" | "li" | "div" | "span" | "label" | "small" | "strong" | "figcaption";
|
|
21
|
+
/**
|
|
22
|
+
* The classes to apply to the text.
|
|
23
|
+
*
|
|
24
|
+
* @default undefined
|
|
25
|
+
*/
|
|
26
|
+
classes?: TextClasses;
|
|
27
|
+
/**
|
|
28
|
+
* The color of the text. Ignores `global.defaultColor`.
|
|
29
|
+
*
|
|
30
|
+
* @default "dark"
|
|
31
|
+
*/
|
|
32
|
+
color?: MergeProps<TextColor, TextColorOverrides>;
|
|
33
|
+
/**
|
|
34
|
+
* Whether digits use tabular figures and tight tracking (money, counts).
|
|
35
|
+
*
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
numeric?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* The size of the text.
|
|
41
|
+
*
|
|
42
|
+
* @default "md"
|
|
43
|
+
*/
|
|
44
|
+
size?: MergeProps<TextSize, TextSizeOverrides>;
|
|
45
|
+
/**
|
|
46
|
+
* Whether the text is cut to one line with an ellipsis.
|
|
47
|
+
*
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
truncate?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Whether the text is uppercase with wide tracking (small labels).
|
|
53
|
+
*
|
|
54
|
+
* @default false
|
|
55
|
+
*/
|
|
56
|
+
uppercase?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* The tone of the text: `default` for main text, `muted` for secondary text.
|
|
59
|
+
*
|
|
60
|
+
* @default "default"
|
|
61
|
+
*/
|
|
62
|
+
variant?: MergeProps<TextVariant, TextVariantOverrides>;
|
|
63
|
+
/**
|
|
64
|
+
* The font weight of the text.
|
|
65
|
+
*
|
|
66
|
+
* @default "normal"
|
|
67
|
+
*/
|
|
68
|
+
weight?: MergeProps<TextWeight, TextWeightOverrides>;
|
|
69
|
+
}
|
|
70
|
+
export interface TextSlots {
|
|
71
|
+
/**
|
|
72
|
+
* The content of the text.
|
|
73
|
+
*/
|
|
74
|
+
default?: Slot<undefined>;
|
|
75
|
+
}
|
|
76
|
+
export type TextProps = MergeHtmlProps<TextOwnProps, HTMLAttributes>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ChartFrameState } from './useChartRoot';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
frame: ChartFrameState;
|
|
4
|
+
showCenter?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_10: {}, __VLS_12: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
center?: (props: typeof __VLS_1) => any;
|
|
9
|
+
} & {
|
|
10
|
+
loading?: (props: typeof __VLS_3) => any;
|
|
11
|
+
} & {
|
|
12
|
+
empty?: (props: typeof __VLS_10) => any;
|
|
13
|
+
} & {
|
|
14
|
+
default?: (props: typeof __VLS_12) => any;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|