@treeui/vue 0.11.0 → 0.13.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/README.md +5 -1
- package/dist/components/TAppShell.cjs +2 -0
- package/dist/components/TAppShell.cjs.map +1 -0
- package/dist/components/TAppShell.js +7 -0
- package/dist/components/TAppShell.js.map +1 -0
- package/dist/components/TAppShell.vue.d.ts +90 -0
- package/dist/components/TAppShell.vue.d.ts.map +1 -0
- package/dist/components/TAppShell.vue_vue_type_script_setup_true_lang.cjs +2 -0
- package/dist/components/TAppShell.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
- package/dist/components/TAppShell.vue_vue_type_script_setup_true_lang.js +244 -0
- package/dist/components/TAppShell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/TChart.cjs +2 -0
- package/dist/components/TChart.cjs.map +1 -0
- package/dist/components/TChart.js +7 -0
- package/dist/components/TChart.js.map +1 -0
- package/dist/components/TChart.vue.d.ts +123 -0
- package/dist/components/TChart.vue.d.ts.map +1 -0
- package/dist/components/TChart.vue_vue_type_script_setup_true_lang.cjs +2 -0
- package/dist/components/TChart.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
- package/dist/components/TChart.vue_vue_type_script_setup_true_lang.js +370 -0
- package/dist/components/TChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/TDonutChart.cjs +2 -0
- package/dist/components/TDonutChart.cjs.map +1 -0
- package/dist/components/TDonutChart.js +7 -0
- package/dist/components/TDonutChart.js.map +1 -0
- package/dist/components/TDonutChart.vue.d.ts +75 -0
- package/dist/components/TDonutChart.vue.d.ts.map +1 -0
- package/dist/components/TDonutChart.vue_vue_type_script_setup_true_lang.cjs +2 -0
- package/dist/components/TDonutChart.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
- package/dist/components/TDonutChart.vue_vue_type_script_setup_true_lang.js +168 -0
- package/dist/components/TDonutChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/TGrid.vue.d.ts +1 -1
- package/dist/components/TGrid.vue.d.ts.map +1 -1
- package/dist/components/TSparkline.cjs +2 -0
- package/dist/components/TSparkline.cjs.map +1 -0
- package/dist/components/TSparkline.js +7 -0
- package/dist/components/TSparkline.js.map +1 -0
- package/dist/components/TSparkline.vue.d.ts +40 -0
- package/dist/components/TSparkline.vue.d.ts.map +1 -0
- package/dist/components/TSparkline.vue_vue_type_script_setup_true_lang.cjs +2 -0
- package/dist/components/TSparkline.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
- package/dist/components/TSparkline.vue_vue_type_script_setup_true_lang.js +107 -0
- package/dist/components/TSparkline.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/TStack.vue.d.ts +1 -1
- package/dist/components/TStack.vue.d.ts.map +1 -1
- package/dist/components/index.d.ts +7 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +39 -35
- package/dist/plugin.cjs +1 -1
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +128 -120
- package/dist/plugin.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, defineComponent as o, normalizeClass as s, normalizeStyle as c, openBlock as l, ref as u, renderList as d, renderSlot as f, toDisplayString as p } from "vue";
|
|
2
|
+
import { donutSegments as m } from "@treeui/utils";
|
|
3
|
+
//#region src/components/TDonutChart.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var h = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "t-donut-chart__skeleton"
|
|
7
|
+
}, g = {
|
|
8
|
+
key: 1,
|
|
9
|
+
class: "t-donut-chart__empty"
|
|
10
|
+
}, _ = [
|
|
11
|
+
"width",
|
|
12
|
+
"height",
|
|
13
|
+
"viewBox",
|
|
14
|
+
"aria-label"
|
|
15
|
+
], v = ["transform"], y = [
|
|
16
|
+
"cx",
|
|
17
|
+
"cy",
|
|
18
|
+
"r",
|
|
19
|
+
"stroke",
|
|
20
|
+
"stroke-width",
|
|
21
|
+
"stroke-linecap",
|
|
22
|
+
"stroke-dasharray",
|
|
23
|
+
"stroke-dashoffset",
|
|
24
|
+
"onPointerenter"
|
|
25
|
+
], b = ["d", "onPointerenter"], x = {
|
|
26
|
+
key: 0,
|
|
27
|
+
class: "t-donut-chart__center"
|
|
28
|
+
}, S = { class: "t-donut-chart__center-value" }, C = { class: "t-donut-chart__center-label" }, w = {
|
|
29
|
+
key: 0,
|
|
30
|
+
class: "t-donut-chart__legend"
|
|
31
|
+
}, T = ["onPointerenter"], E = { class: "t-donut-chart__legend-label" }, D = { class: "t-donut-chart__legend-value" }, O = {
|
|
32
|
+
key: 0,
|
|
33
|
+
class: "t-donut-chart__legend-percent"
|
|
34
|
+
}, k = /*@__PURE__*/ o({
|
|
35
|
+
__name: "TDonutChart",
|
|
36
|
+
props: {
|
|
37
|
+
segments: { default: () => [] },
|
|
38
|
+
size: { default: 200 },
|
|
39
|
+
thickness: { default: 26 },
|
|
40
|
+
gap: { default: 2 },
|
|
41
|
+
rounded: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: !1
|
|
44
|
+
},
|
|
45
|
+
showLegend: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: !0
|
|
48
|
+
},
|
|
49
|
+
showPercent: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: !0
|
|
52
|
+
},
|
|
53
|
+
centerLabel: { default: void 0 },
|
|
54
|
+
centerValue: { default: void 0 },
|
|
55
|
+
valueFormat: {
|
|
56
|
+
type: Function,
|
|
57
|
+
default: void 0
|
|
58
|
+
},
|
|
59
|
+
loading: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: !1
|
|
62
|
+
},
|
|
63
|
+
ariaLabel: { default: void 0 }
|
|
64
|
+
},
|
|
65
|
+
setup(o) {
|
|
66
|
+
let k = o, A = u(null), j = t(() => k.segments.filter((e) => e.value > 0)), M = t(() => j.value.reduce((e, t) => e + t.value, 0)), N = t(() => M.value > 0), P = t(() => k.thickness > 0), F = t(() => k.size / 2), I = (e, t) => t.color ?? `var(--tree-color-chart-${e % 8 + 1})`, L = t(() => {
|
|
67
|
+
let e = j.value.length === 1;
|
|
68
|
+
if (P.value) {
|
|
69
|
+
let t = k.thickness / 2 + 3, n = k.size / 2 - t, r = 2 * Math.PI * n, i = k.gap / 360 * r, a = e ? 0 : k.rounded ? Math.max(i, k.thickness + 2) : Math.max(i, 2), o = 0;
|
|
70
|
+
return j.value.map((e, t) => {
|
|
71
|
+
let i = e.value / M.value, s = i * r, c = Math.max(.5, s - a), l = {
|
|
72
|
+
mode: "arc",
|
|
73
|
+
r: n,
|
|
74
|
+
circumference: r,
|
|
75
|
+
dashArray: `${c} ${r - c}`,
|
|
76
|
+
dashOffset: -o,
|
|
77
|
+
color: I(t, e),
|
|
78
|
+
label: e.label,
|
|
79
|
+
value: e.value,
|
|
80
|
+
fraction: i
|
|
81
|
+
};
|
|
82
|
+
return o += s, l;
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
let t = k.size / 2 - 2;
|
|
86
|
+
return m(j.value.map((e) => e.value), {
|
|
87
|
+
cx: F.value,
|
|
88
|
+
cy: F.value,
|
|
89
|
+
radius: t,
|
|
90
|
+
innerRadius: 0,
|
|
91
|
+
gap: e ? 0 : k.gap
|
|
92
|
+
}).map((e, t) => {
|
|
93
|
+
let n = j.value[t];
|
|
94
|
+
return {
|
|
95
|
+
mode: "wedge",
|
|
96
|
+
path: e.path,
|
|
97
|
+
fraction: e.fraction,
|
|
98
|
+
color: I(t, n),
|
|
99
|
+
label: n.label,
|
|
100
|
+
value: n.value
|
|
101
|
+
};
|
|
102
|
+
});
|
|
103
|
+
}), R = (e) => k.valueFormat ? k.valueFormat(e) : Math.abs(e) >= 1e3 ? e.toLocaleString("en-US") : `${e}`, z = (e) => `${Math.round(e * 100)}%`, B = t(() => A.value === null ? null : j.value[A.value] ?? null), V = t(() => B.value ? R(B.value.value) : k.centerValue === void 0 ? R(M.value) : `${k.centerValue}`), H = t(() => B.value ? B.value.label : k.centerLabel ?? "Total"), U = t(() => k.ariaLabel ?? `${P.value ? "Donut" : "Pie"} chart with ${j.value.length} segments`), W = t(() => ["t-donut-chart", {
|
|
104
|
+
"is-loading": k.loading,
|
|
105
|
+
"has-legend": k.showLegend
|
|
106
|
+
}]);
|
|
107
|
+
return (t, u) => (l(), r("div", { class: s(W.value) }, [i("div", {
|
|
108
|
+
class: "t-donut-chart__figure",
|
|
109
|
+
style: c({
|
|
110
|
+
width: `${o.size}px`,
|
|
111
|
+
height: `${o.size}px`
|
|
112
|
+
})
|
|
113
|
+
}, [o.loading ? (l(), r("div", h)) : N.value ? (l(), r(e, { key: 2 }, [(l(), r("svg", {
|
|
114
|
+
class: "t-donut-chart__svg",
|
|
115
|
+
width: o.size,
|
|
116
|
+
height: o.size,
|
|
117
|
+
viewBox: `0 0 ${o.size} ${o.size}`,
|
|
118
|
+
role: "img",
|
|
119
|
+
"aria-label": U.value
|
|
120
|
+
}, [i("g", { transform: P.value ? `rotate(-90 ${F.value} ${F.value})` : void 0 }, [(l(!0), r(e, null, d(L.value, (t, n) => (l(), r(e, { key: n }, [t.mode === "arc" ? (l(), r("circle", {
|
|
121
|
+
key: 0,
|
|
122
|
+
class: s(["t-donut-chart__segment t-donut-chart__segment--arc", { "is-dimmed": A.value !== null && A.value !== n }]),
|
|
123
|
+
cx: F.value,
|
|
124
|
+
cy: F.value,
|
|
125
|
+
r: t.r,
|
|
126
|
+
fill: "none",
|
|
127
|
+
stroke: t.color,
|
|
128
|
+
"stroke-width": A.value === n ? o.thickness + 4 : o.thickness,
|
|
129
|
+
"stroke-linecap": o.rounded ? "round" : "butt",
|
|
130
|
+
"stroke-dasharray": t.dashArray,
|
|
131
|
+
"stroke-dashoffset": t.dashOffset,
|
|
132
|
+
style: c({ animationDelay: `${n * 70}ms` }),
|
|
133
|
+
onPointerenter: (e) => A.value = n,
|
|
134
|
+
onPointerleave: u[0] ||= (e) => A.value = null
|
|
135
|
+
}, null, 46, y)) : (l(), r("path", {
|
|
136
|
+
key: 1,
|
|
137
|
+
class: s(["t-donut-chart__segment t-donut-chart__segment--wedge", { "is-dimmed": A.value !== null && A.value !== n }]),
|
|
138
|
+
d: t.path,
|
|
139
|
+
style: c({
|
|
140
|
+
fill: t.color,
|
|
141
|
+
animationDelay: `${n * 70}ms`
|
|
142
|
+
}),
|
|
143
|
+
onPointerenter: (e) => A.value = n,
|
|
144
|
+
onPointerleave: u[1] ||= (e) => A.value = null
|
|
145
|
+
}, null, 46, b))], 64))), 128))], 8, v)], 8, _)), P.value ? (l(), r("div", x, [f(t.$slots, "center", {
|
|
146
|
+
total: M.value,
|
|
147
|
+
active: B.value
|
|
148
|
+
}, () => [i("span", S, p(V.value), 1), i("span", C, p(H.value), 1)])])) : n("", !0)], 64)) : (l(), r("div", g, [f(t.$slots, "empty", {}, () => [u[3] ||= a(" No data ", -1)])]))], 4), o.showLegend && N.value ? (l(), r("ul", w, [(l(!0), r(e, null, d(L.value, (e, t) => (l(), r("li", {
|
|
149
|
+
key: t,
|
|
150
|
+
class: s(["t-donut-chart__legend-item", { "is-active": A.value === t }]),
|
|
151
|
+
onPointerenter: (e) => A.value = t,
|
|
152
|
+
onPointerleave: u[2] ||= (e) => A.value = null
|
|
153
|
+
}, [
|
|
154
|
+
i("span", {
|
|
155
|
+
class: "t-donut-chart__legend-swatch",
|
|
156
|
+
style: c({ background: e.color }),
|
|
157
|
+
"aria-hidden": "true"
|
|
158
|
+
}, null, 4),
|
|
159
|
+
i("span", E, p(e.label), 1),
|
|
160
|
+
i("span", D, p(R(e.value)), 1),
|
|
161
|
+
o.showPercent ? (l(), r("span", O, p(z(e.fraction)), 1)) : n("", !0)
|
|
162
|
+
], 42, T))), 128))])) : n("", !0)], 2));
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
//#endregion
|
|
166
|
+
export { k as default };
|
|
167
|
+
|
|
168
|
+
//# sourceMappingURL=TDonutChart.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TDonutChart.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/components/TDonutChart.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, ref } from 'vue';\nimport { donutSegments } from '@treeui/utils';\n\nexport interface TDonutSegment {\n /** Legend + tooltip label. */\n label: string;\n /** Slice magnitude; non-positive values are omitted. */\n value: number;\n /** Override the slice color; defaults to a chart palette token. */\n color?: string;\n}\n\nconst props = withDefaults(\n defineProps<{\n /** Slices to draw, in order. */\n segments?: TDonutSegment[];\n /** Square canvas size in px. */\n size?: number;\n /** Ring thickness in px. `0` renders a full pie. */\n thickness?: number;\n /** Gap between slices, in degrees. */\n gap?: number;\n /** Round the ends of donut segments (adds a larger gap to make room). */\n rounded?: boolean;\n /** Show the legend with values. */\n showLegend?: boolean;\n /** Show each slice's percentage in the legend. */\n showPercent?: boolean;\n /** Static label under the center value (donut only). */\n centerLabel?: string;\n /** Static value shown in the center (donut only). Overrides the auto total. */\n centerValue?: string | number;\n /** Format legend + center values. */\n valueFormat?: (value: number) => string;\n /** Render skeleton placeholders instead of the chart. */\n loading?: boolean;\n /** Accessible summary of the chart. */\n ariaLabel?: string;\n }>(),\n {\n segments: () => [],\n size: 200,\n thickness: 26,\n gap: 2,\n rounded: false,\n showLegend: true,\n showPercent: true,\n centerLabel: undefined,\n centerValue: undefined,\n valueFormat: undefined,\n loading: false,\n ariaLabel: undefined,\n },\n);\n\ndefineSlots<{\n center?: (props: { total: number; active: TDonutSegment | null }) => unknown;\n empty?: () => unknown;\n}>();\n\nconst activeIndex = ref<number | null>(null);\n\nconst visibleSegments = computed(() => props.segments.filter((item) => item.value > 0));\n\nconst total = computed(() =>\n visibleSegments.value.reduce((sum, item) => sum + item.value, 0),\n);\n\nconst hasData = computed(() => total.value > 0);\n\nconst isDonut = computed(() => props.thickness > 0);\n\nconst center = computed(() => props.size / 2);\n\nconst colorFor = (index: number, segment: TDonutSegment) =>\n segment.color ?? `var(--tree-color-chart-${(index % 8) + 1})`;\n\n// Donut segments are drawn as stroked arcs on a mid-radius circle, so the ring\n// stays perfectly smooth and gaps are one consistent width. Pie slices need a\n// filled wedge to the center, so they keep the path geometry.\nconst geometry = computed(() => {\n const single = visibleSegments.value.length === 1;\n\n if (isDonut.value) {\n // Leave room for the stroke width and the hover growth so nothing clips.\n const pad = props.thickness / 2 + 3;\n const midRadius = props.size / 2 - pad;\n const circumference = 2 * Math.PI * midRadius;\n const degreeGap = (props.gap / 360) * circumference;\n const gapPx = single\n ? 0\n : props.rounded\n ? Math.max(degreeGap, props.thickness + 2)\n : Math.max(degreeGap, 2);\n\n let start = 0;\n return visibleSegments.value.map((item, index) => {\n const fraction = item.value / total.value;\n const length = fraction * circumference;\n const on = Math.max(0.5, length - gapPx);\n const arc = {\n mode: 'arc' as const,\n r: midRadius,\n circumference,\n dashArray: `${on} ${circumference - on}`,\n dashOffset: -start,\n color: colorFor(index, item),\n label: item.label,\n value: item.value,\n fraction,\n };\n start += length;\n return arc;\n });\n }\n\n const radius = props.size / 2 - 2;\n const arcs = donutSegments(\n visibleSegments.value.map((item) => item.value),\n { cx: center.value, cy: center.value, radius, innerRadius: 0, gap: single ? 0 : props.gap },\n );\n\n return arcs.map((arc, index) => {\n const source = visibleSegments.value[index];\n return {\n mode: 'wedge' as const,\n path: arc.path,\n fraction: arc.fraction,\n color: colorFor(index, source),\n label: source.label,\n value: source.value,\n };\n });\n});\n\nconst formatValue = (value: number) => {\n if (props.valueFormat) return props.valueFormat(value);\n if (Math.abs(value) >= 1000) return value.toLocaleString('en-US');\n return `${value}`;\n};\n\nconst formatPercent = (fraction: number) => `${Math.round(fraction * 100)}%`;\n\nconst activeSegment = computed(() =>\n activeIndex.value === null ? null : visibleSegments.value[activeIndex.value] ?? null,\n);\n\nconst centerPrimary = computed(() => {\n if (activeSegment.value) return formatValue(activeSegment.value.value);\n if (props.centerValue !== undefined) return `${props.centerValue}`;\n return formatValue(total.value);\n});\n\nconst centerSecondary = computed(() => {\n if (activeSegment.value) return activeSegment.value.label;\n return props.centerLabel ?? 'Total';\n});\n\nconst resolvedLabel = computed(\n () => props.ariaLabel ?? `${isDonut.value ? 'Donut' : 'Pie'} chart with ${visibleSegments.value.length} segments`,\n);\n\nconst rootClasses = computed(() => [\n 't-donut-chart',\n { 'is-loading': props.loading, 'has-legend': props.showLegend },\n]);\n</script>\n\n<template>\n <div :class=\"rootClasses\">\n <div\n class=\"t-donut-chart__figure\"\n :style=\"{ width: `${size}px`, height: `${size}px` }\"\n >\n <div\n v-if=\"loading\"\n class=\"t-donut-chart__skeleton\"\n />\n\n <div\n v-else-if=\"!hasData\"\n class=\"t-donut-chart__empty\"\n >\n <slot name=\"empty\">\n No data\n </slot>\n </div>\n\n <template v-else>\n <svg\n class=\"t-donut-chart__svg\"\n :width=\"size\"\n :height=\"size\"\n :viewBox=\"`0 0 ${size} ${size}`\"\n role=\"img\"\n :aria-label=\"resolvedLabel\"\n >\n <g :transform=\"isDonut ? `rotate(-90 ${center} ${center})` : undefined\">\n <template\n v-for=\"(segment, index) in geometry\"\n :key=\"index\"\n >\n <circle\n v-if=\"segment.mode === 'arc'\"\n class=\"t-donut-chart__segment t-donut-chart__segment--arc\"\n :class=\"{ 'is-dimmed': activeIndex !== null && activeIndex !== index }\"\n :cx=\"center\"\n :cy=\"center\"\n :r=\"segment.r\"\n fill=\"none\"\n :stroke=\"segment.color\"\n :stroke-width=\"activeIndex === index ? thickness + 4 : thickness\"\n :stroke-linecap=\"rounded ? 'round' : 'butt'\"\n :stroke-dasharray=\"segment.dashArray\"\n :stroke-dashoffset=\"segment.dashOffset\"\n :style=\"{ animationDelay: `${index * 70}ms` }\"\n @pointerenter=\"activeIndex = index\"\n @pointerleave=\"activeIndex = null\"\n />\n <path\n v-else\n class=\"t-donut-chart__segment t-donut-chart__segment--wedge\"\n :class=\"{ 'is-dimmed': activeIndex !== null && activeIndex !== index }\"\n :d=\"segment.path\"\n :style=\"{ fill: segment.color, animationDelay: `${index * 70}ms` }\"\n @pointerenter=\"activeIndex = index\"\n @pointerleave=\"activeIndex = null\"\n />\n </template>\n </g>\n </svg>\n\n <div\n v-if=\"isDonut\"\n class=\"t-donut-chart__center\"\n >\n <slot\n name=\"center\"\n :total=\"total\"\n :active=\"activeSegment\"\n >\n <span class=\"t-donut-chart__center-value\">{{ centerPrimary }}</span>\n <span class=\"t-donut-chart__center-label\">{{ centerSecondary }}</span>\n </slot>\n </div>\n </template>\n </div>\n\n <ul\n v-if=\"showLegend && hasData\"\n class=\"t-donut-chart__legend\"\n >\n <li\n v-for=\"(segment, index) in geometry\"\n :key=\"index\"\n class=\"t-donut-chart__legend-item\"\n :class=\"{ 'is-active': activeIndex === index }\"\n @pointerenter=\"activeIndex = index\"\n @pointerleave=\"activeIndex = null\"\n >\n <span\n class=\"t-donut-chart__legend-swatch\"\n :style=\"{ background: segment.color }\"\n aria-hidden=\"true\"\n />\n <span class=\"t-donut-chart__legend-label\">{{ segment.label }}</span>\n <span class=\"t-donut-chart__legend-value\">{{ formatValue(segment.value) }}</span>\n <span\n v-if=\"showPercent\"\n class=\"t-donut-chart__legend-percent\"\n >{{ formatPercent(segment.fraction) }}</span>\n </li>\n </ul>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAaA,IAAM,IAAQ,GAgDR,IAAc,EAAmB,IAAI,GAErC,IAAkB,QAAe,EAAM,SAAS,QAAQ,MAAS,EAAK,QAAQ,CAAC,CAAC,GAEhF,IAAQ,QACZ,EAAgB,MAAM,QAAQ,GAAK,MAAS,IAAM,EAAK,OAAO,CAAC,CACjE,GAEM,IAAU,QAAe,EAAM,QAAQ,CAAC,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A,SAAA,CAAA,AAAA,EAAA,OAAA,EAFY,aAEnB,EAAA,CAAA,CAAA,CAAA,CAAA,EAyDgE,GAAA,CAAA,GAO5D,EAAA,cAAc,EAAA,SAAA,EAAA,GADtB,EAwBK,MAxBL,GAwBK,EAAA,EAAA,EAAA,GApBH,EAmBK,GAAA,MAAA,EAlBwB,EAAA,QAAnB,GAAS,YADnB,EAmBK,MAAA;GAjBF,KAAK;GACN,OAAK,EAAA,CAAC,8BAA4B,EAAA,aACX,EAAA,UAAgB,EAAK,CAAA,CAAA;GAC3C,iBAAY,MAAE,EAAA,QAAc;GAC5B,gBAAY,AAAA,EAAA,QAAA,MAAE,EAAA,QAAW;;GAE1B,EAIE,QAAA;IAHA,OAAM;IACL,OAAK,EAAA,EAAA,YAAgB,EAAQ,MAAK,CAAA;IACnC,eAAY;;GAEd,EAAoE,QAApE,GAAoE,EAAvB,EAAQ,KAAK,GAAA,CAAA;GAC1D,EAAiF,QAAjF,GAAiF,EAApC,EAAY,EAAQ,KAAK,CAAA,GAAA,CAAA;GAE9D,EAAA,eAAA,EAAA,GADR,EAG6C,QAH7C,GAG6C,EAAzC,EAAc,EAAQ,QAAQ,CAAA,GAAA,CAAA,KAAA,EAAA,IAAA,EAAA"}
|
|
@@ -18,11 +18,11 @@ declare function __VLS_template(): {
|
|
|
18
18
|
};
|
|
19
19
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
20
20
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
21
|
+
gap: string;
|
|
21
22
|
as: string;
|
|
22
23
|
align: string;
|
|
23
24
|
columns: number;
|
|
24
25
|
minItemWidth: string;
|
|
25
|
-
gap: string;
|
|
26
26
|
rowGap: string;
|
|
27
27
|
justify: string;
|
|
28
28
|
dense: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TGrid.vue.d.ts","sourceRoot":"","sources":["../../src/components/TGrid.vue"],"names":[],"mappings":"AA+EA,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAyDJ,iBAAS,cAAc;WAkCT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;
|
|
1
|
+
{"version":3,"file":"TGrid.vue.d.ts","sourceRoot":"","sources":["../../src/components/TGrid.vue"],"names":[],"mappings":"AA+EA,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAyDJ,iBAAS,cAAc;WAkCT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;SAlHX,MAAM;QAHP,MAAM;WAKH,MAAM;aAJJ,MAAM;kBACD,MAAM;YAEZ,MAAM;aAEL,MAAM;WACR,OAAO;6EAqHjB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TSparkline.cjs","names":[],"sources":["../../src/components/TSparkline.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { buildAreaPath, buildLinePath, linearScale, type ChartPoint } from '@treeui/utils';\n\ntype TSparklineType = 'line' | 'area' | 'bar';\n\nconst props = withDefaults(\n defineProps<{\n /** Values to plot, left to right. */\n data?: number[];\n /** Visual form. `area` fills under the line; `bar` draws thin columns. */\n type?: TSparklineType;\n /** Mark color. Any CSS color; defaults to the first chart token. */\n color?: string;\n /** Intrinsic width in px. */\n width?: number;\n /** Intrinsic height in px. */\n height?: number;\n /** Smooth (curved) line/area instead of straight segments. */\n smooth?: boolean;\n /** Line thickness in px (line/area only). */\n strokeWidth?: number;\n /** Force the low end of the value domain (defaults to the data min). */\n min?: number;\n /** Force the high end of the value domain (defaults to the data max). */\n max?: number;\n /** Draw a filled marker on the last point (line/area only). */\n showLastPoint?: boolean;\n /** Accessible label. Falls back to a generic trend description. */\n ariaLabel?: string;\n }>(),\n {\n data: () => [],\n type: 'line',\n color: 'var(--tree-color-chart-1)',\n width: 120,\n height: 32,\n smooth: false,\n strokeWidth: 2,\n min: undefined,\n max: undefined,\n showLastPoint: false,\n ariaLabel: undefined,\n },\n);\n\n// Inset so strokes and markers never clip against the SVG edge.\nconst inset = computed(() => Math.max(props.strokeWidth, props.showLastPoint ? 4 : 2));\n\nconst domain = computed<[number, number]>(() => {\n const values = props.data;\n const low = props.min ?? Math.min(...values);\n const high = props.max ?? Math.max(...values);\n // Pad a flat series so it renders as a centered line, not against an edge.\n return low === high ? [low - 1, high + 1] : [low, high];\n});\n\nconst points = computed<ChartPoint[]>(() => {\n const values = props.data;\n if (values.length === 0) return [];\n\n const x = linearScale([0, Math.max(1, values.length - 1)], [inset.value, props.width - inset.value]);\n const y = linearScale(domain.value, [props.height - inset.value, inset.value]);\n\n return values.map((value, index) => ({ x: x(index), y: y(value) }));\n});\n\nconst linePath = computed(() => buildLinePath(points.value, props.smooth));\nconst areaPath = computed(() =>\n buildAreaPath(points.value, props.height - inset.value, props.smooth),\n);\n\nconst bars = computed(() => {\n const values = props.data;\n if (values.length === 0) return [];\n\n const y = linearScale(domain.value, [props.height - inset.value, inset.value]);\n const baseline = props.height - inset.value;\n const gap = 2;\n const slot = (props.width - inset.value * 2) / values.length;\n const barWidth = Math.max(1, slot - gap);\n\n return values.map((value, index) => {\n const top = y(value);\n return {\n x: inset.value + index * slot + gap / 2,\n y: top,\n width: barWidth,\n height: Math.max(1, baseline - top),\n };\n });\n});\n\nconst lastPoint = computed(() => points.value[points.value.length - 1] ?? null);\n\nconst hasData = computed(() => props.data.length > 0);\n\nconst resolvedLabel = computed(() => props.ariaLabel ?? 'Trend sparkline');\n</script>\n\n<template>\n <svg\n class=\"t-sparkline\"\n :width=\"width\"\n :height=\"height\"\n :viewBox=\"`0 0 ${width} ${height}`\"\n role=\"img\"\n :aria-label=\"resolvedLabel\"\n :style=\"{ color }\"\n >\n <template v-if=\"hasData\">\n <path\n v-if=\"type === 'area'\"\n class=\"t-sparkline__area\"\n :d=\"areaPath\"\n />\n\n <template v-if=\"type === 'bar'\">\n <rect\n v-for=\"(bar, index) in bars\"\n :key=\"index\"\n class=\"t-sparkline__bar\"\n :x=\"bar.x\"\n :y=\"bar.y\"\n :width=\"bar.width\"\n :height=\"bar.height\"\n rx=\"1\"\n />\n </template>\n\n <path\n v-else\n class=\"t-sparkline__line\"\n :d=\"linePath\"\n :stroke-width=\"strokeWidth\"\n fill=\"none\"\n />\n\n <circle\n v-if=\"showLastPoint && type !== 'bar' && lastPoint\"\n class=\"t-sparkline__point\"\n :cx=\"lastPoint.x\"\n :cy=\"lastPoint.y\"\n :r=\"Math.max(2, strokeWidth)\"\n />\n </template>\n </svg>\n</template>\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TSparkline.js","names":[],"sources":["../../src/components/TSparkline.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { buildAreaPath, buildLinePath, linearScale, type ChartPoint } from '@treeui/utils';\n\ntype TSparklineType = 'line' | 'area' | 'bar';\n\nconst props = withDefaults(\n defineProps<{\n /** Values to plot, left to right. */\n data?: number[];\n /** Visual form. `area` fills under the line; `bar` draws thin columns. */\n type?: TSparklineType;\n /** Mark color. Any CSS color; defaults to the first chart token. */\n color?: string;\n /** Intrinsic width in px. */\n width?: number;\n /** Intrinsic height in px. */\n height?: number;\n /** Smooth (curved) line/area instead of straight segments. */\n smooth?: boolean;\n /** Line thickness in px (line/area only). */\n strokeWidth?: number;\n /** Force the low end of the value domain (defaults to the data min). */\n min?: number;\n /** Force the high end of the value domain (defaults to the data max). */\n max?: number;\n /** Draw a filled marker on the last point (line/area only). */\n showLastPoint?: boolean;\n /** Accessible label. Falls back to a generic trend description. */\n ariaLabel?: string;\n }>(),\n {\n data: () => [],\n type: 'line',\n color: 'var(--tree-color-chart-1)',\n width: 120,\n height: 32,\n smooth: false,\n strokeWidth: 2,\n min: undefined,\n max: undefined,\n showLastPoint: false,\n ariaLabel: undefined,\n },\n);\n\n// Inset so strokes and markers never clip against the SVG edge.\nconst inset = computed(() => Math.max(props.strokeWidth, props.showLastPoint ? 4 : 2));\n\nconst domain = computed<[number, number]>(() => {\n const values = props.data;\n const low = props.min ?? Math.min(...values);\n const high = props.max ?? Math.max(...values);\n // Pad a flat series so it renders as a centered line, not against an edge.\n return low === high ? [low - 1, high + 1] : [low, high];\n});\n\nconst points = computed<ChartPoint[]>(() => {\n const values = props.data;\n if (values.length === 0) return [];\n\n const x = linearScale([0, Math.max(1, values.length - 1)], [inset.value, props.width - inset.value]);\n const y = linearScale(domain.value, [props.height - inset.value, inset.value]);\n\n return values.map((value, index) => ({ x: x(index), y: y(value) }));\n});\n\nconst linePath = computed(() => buildLinePath(points.value, props.smooth));\nconst areaPath = computed(() =>\n buildAreaPath(points.value, props.height - inset.value, props.smooth),\n);\n\nconst bars = computed(() => {\n const values = props.data;\n if (values.length === 0) return [];\n\n const y = linearScale(domain.value, [props.height - inset.value, inset.value]);\n const baseline = props.height - inset.value;\n const gap = 2;\n const slot = (props.width - inset.value * 2) / values.length;\n const barWidth = Math.max(1, slot - gap);\n\n return values.map((value, index) => {\n const top = y(value);\n return {\n x: inset.value + index * slot + gap / 2,\n y: top,\n width: barWidth,\n height: Math.max(1, baseline - top),\n };\n });\n});\n\nconst lastPoint = computed(() => points.value[points.value.length - 1] ?? null);\n\nconst hasData = computed(() => props.data.length > 0);\n\nconst resolvedLabel = computed(() => props.ariaLabel ?? 'Trend sparkline');\n</script>\n\n<template>\n <svg\n class=\"t-sparkline\"\n :width=\"width\"\n :height=\"height\"\n :viewBox=\"`0 0 ${width} ${height}`\"\n role=\"img\"\n :aria-label=\"resolvedLabel\"\n :style=\"{ color }\"\n >\n <template v-if=\"hasData\">\n <path\n v-if=\"type === 'area'\"\n class=\"t-sparkline__area\"\n :d=\"areaPath\"\n />\n\n <template v-if=\"type === 'bar'\">\n <rect\n v-for=\"(bar, index) in bars\"\n :key=\"index\"\n class=\"t-sparkline__bar\"\n :x=\"bar.x\"\n :y=\"bar.y\"\n :width=\"bar.width\"\n :height=\"bar.height\"\n rx=\"1\"\n />\n </template>\n\n <path\n v-else\n class=\"t-sparkline__line\"\n :d=\"linePath\"\n :stroke-width=\"strokeWidth\"\n fill=\"none\"\n />\n\n <circle\n v-if=\"showLastPoint && type !== 'bar' && lastPoint\"\n class=\"t-sparkline__point\"\n :cx=\"lastPoint.x\"\n :cy=\"lastPoint.y\"\n :r=\"Math.max(2, strokeWidth)\"\n />\n </template>\n </svg>\n</template>\n"],"mappings":""}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
type TSparklineType = 'line' | 'area' | 'bar';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** Values to plot, left to right. */
|
|
4
|
+
data?: number[];
|
|
5
|
+
/** Visual form. `area` fills under the line; `bar` draws thin columns. */
|
|
6
|
+
type?: TSparklineType;
|
|
7
|
+
/** Mark color. Any CSS color; defaults to the first chart token. */
|
|
8
|
+
color?: string;
|
|
9
|
+
/** Intrinsic width in px. */
|
|
10
|
+
width?: number;
|
|
11
|
+
/** Intrinsic height in px. */
|
|
12
|
+
height?: number;
|
|
13
|
+
/** Smooth (curved) line/area instead of straight segments. */
|
|
14
|
+
smooth?: boolean;
|
|
15
|
+
/** Line thickness in px (line/area only). */
|
|
16
|
+
strokeWidth?: number;
|
|
17
|
+
/** Force the low end of the value domain (defaults to the data min). */
|
|
18
|
+
min?: number;
|
|
19
|
+
/** Force the high end of the value domain (defaults to the data max). */
|
|
20
|
+
max?: number;
|
|
21
|
+
/** Draw a filled marker on the last point (line/area only). */
|
|
22
|
+
showLastPoint?: boolean;
|
|
23
|
+
/** Accessible label. Falls back to a generic trend description. */
|
|
24
|
+
ariaLabel?: string;
|
|
25
|
+
};
|
|
26
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
27
|
+
type: TSparklineType;
|
|
28
|
+
data: number[];
|
|
29
|
+
width: number;
|
|
30
|
+
height: number;
|
|
31
|
+
color: string;
|
|
32
|
+
strokeWidth: number;
|
|
33
|
+
min: number;
|
|
34
|
+
max: number;
|
|
35
|
+
smooth: boolean;
|
|
36
|
+
ariaLabel: string;
|
|
37
|
+
showLastPoint: boolean;
|
|
38
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, SVGSVGElement>;
|
|
39
|
+
export default _default;
|
|
40
|
+
//# sourceMappingURL=TSparkline.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TSparkline.vue.d.ts","sourceRoot":"","sources":["../../src/components/TSparkline.vue"],"names":[],"mappings":"AAyJA,KAAK,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC;AAE9C,KAAK,WAAW,GAAG;IACf,qCAAqC;IACrC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,0EAA0E;IAC1E,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8DAA8D;IAC9D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,+DAA+D;IAC/D,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;;UAnBO,cAAc;UAFd,MAAM,EAAE;WAMP,MAAM;YAEL,MAAM;WAJP,MAAM;iBAQA,MAAM;SAEd,MAAM;SAEN,MAAM;YANH,OAAO;eAUJ,MAAM;mBAFF,OAAO;;AA8K3B,wBAQG"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
let e=require("vue"),t=require("@treeui/utils");var n=[`width`,`height`,`viewBox`,`aria-label`],r=[`d`],i=[`x`,`y`,`width`,`height`],a=[`d`,`stroke-width`],o=[`cx`,`cy`,`r`],s=(0,e.defineComponent)({__name:`TSparkline`,props:{data:{default:()=>[]},type:{default:`line`},color:{default:`var(--tree-color-chart-1)`},width:{default:120},height:{default:32},smooth:{type:Boolean,default:!1},strokeWidth:{default:2},min:{default:void 0},max:{default:void 0},showLastPoint:{type:Boolean,default:!1},ariaLabel:{default:void 0}},setup(s){let c=s,l=(0,e.computed)(()=>Math.max(c.strokeWidth,c.showLastPoint?4:2)),u=(0,e.computed)(()=>{let e=c.data,t=c.min??Math.min(...e),n=c.max??Math.max(...e);return t===n?[t-1,n+1]:[t,n]}),d=(0,e.computed)(()=>{let e=c.data;if(e.length===0)return[];let n=(0,t.linearScale)([0,Math.max(1,e.length-1)],[l.value,c.width-l.value]),r=(0,t.linearScale)(u.value,[c.height-l.value,l.value]);return e.map((e,t)=>({x:n(t),y:r(e)}))}),f=(0,e.computed)(()=>(0,t.buildLinePath)(d.value,c.smooth)),p=(0,e.computed)(()=>(0,t.buildAreaPath)(d.value,c.height-l.value,c.smooth)),m=(0,e.computed)(()=>{let e=c.data;if(e.length===0)return[];let n=(0,t.linearScale)(u.value,[c.height-l.value,l.value]),r=c.height-l.value,i=(c.width-l.value*2)/e.length,a=Math.max(1,i-2);return e.map((e,t)=>{let o=n(e);return{x:l.value+t*i+2/2,y:o,width:a,height:Math.max(1,r-o)}})}),h=(0,e.computed)(()=>d.value[d.value.length-1]??null),g=(0,e.computed)(()=>c.data.length>0),_=(0,e.computed)(()=>c.ariaLabel??`Trend sparkline`);return(t,c)=>((0,e.openBlock)(),(0,e.createElementBlock)(`svg`,{class:`t-sparkline`,width:s.width,height:s.height,viewBox:`0 0 ${s.width} ${s.height}`,role:`img`,"aria-label":_.value,style:(0,e.normalizeStyle)({color:s.color})},[g.value?((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:0},[s.type===`area`?((0,e.openBlock)(),(0,e.createElementBlock)(`path`,{key:0,class:`t-sparkline__area`,d:p.value},null,8,r)):(0,e.createCommentVNode)(``,!0),s.type===`bar`?((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,{key:1},(0,e.renderList)(m.value,(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`rect`,{key:n,class:`t-sparkline__bar`,x:t.x,y:t.y,width:t.width,height:t.height,rx:`1`},null,8,i))),128)):((0,e.openBlock)(),(0,e.createElementBlock)(`path`,{key:2,class:`t-sparkline__line`,d:f.value,"stroke-width":s.strokeWidth,fill:`none`},null,8,a)),s.showLastPoint&&s.type!==`bar`&&h.value?((0,e.openBlock)(),(0,e.createElementBlock)(`circle`,{key:3,class:`t-sparkline__point`,cx:h.value.x,cy:h.value.y,r:Math.max(2,s.strokeWidth)},null,8,o)):(0,e.createCommentVNode)(``,!0)],64)):(0,e.createCommentVNode)(``,!0)],12,n))}});exports.default=s;
|
|
2
|
+
//# sourceMappingURL=TSparkline.vue_vue_type_script_setup_true_lang.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TSparkline.vue_vue_type_script_setup_true_lang.cjs","names":[],"sources":["../../src/components/TSparkline.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { buildAreaPath, buildLinePath, linearScale, type ChartPoint } from '@treeui/utils';\n\ntype TSparklineType = 'line' | 'area' | 'bar';\n\nconst props = withDefaults(\n defineProps<{\n /** Values to plot, left to right. */\n data?: number[];\n /** Visual form. `area` fills under the line; `bar` draws thin columns. */\n type?: TSparklineType;\n /** Mark color. Any CSS color; defaults to the first chart token. */\n color?: string;\n /** Intrinsic width in px. */\n width?: number;\n /** Intrinsic height in px. */\n height?: number;\n /** Smooth (curved) line/area instead of straight segments. */\n smooth?: boolean;\n /** Line thickness in px (line/area only). */\n strokeWidth?: number;\n /** Force the low end of the value domain (defaults to the data min). */\n min?: number;\n /** Force the high end of the value domain (defaults to the data max). */\n max?: number;\n /** Draw a filled marker on the last point (line/area only). */\n showLastPoint?: boolean;\n /** Accessible label. Falls back to a generic trend description. */\n ariaLabel?: string;\n }>(),\n {\n data: () => [],\n type: 'line',\n color: 'var(--tree-color-chart-1)',\n width: 120,\n height: 32,\n smooth: false,\n strokeWidth: 2,\n min: undefined,\n max: undefined,\n showLastPoint: false,\n ariaLabel: undefined,\n },\n);\n\n// Inset so strokes and markers never clip against the SVG edge.\nconst inset = computed(() => Math.max(props.strokeWidth, props.showLastPoint ? 4 : 2));\n\nconst domain = computed<[number, number]>(() => {\n const values = props.data;\n const low = props.min ?? Math.min(...values);\n const high = props.max ?? Math.max(...values);\n // Pad a flat series so it renders as a centered line, not against an edge.\n return low === high ? [low - 1, high + 1] : [low, high];\n});\n\nconst points = computed<ChartPoint[]>(() => {\n const values = props.data;\n if (values.length === 0) return [];\n\n const x = linearScale([0, Math.max(1, values.length - 1)], [inset.value, props.width - inset.value]);\n const y = linearScale(domain.value, [props.height - inset.value, inset.value]);\n\n return values.map((value, index) => ({ x: x(index), y: y(value) }));\n});\n\nconst linePath = computed(() => buildLinePath(points.value, props.smooth));\nconst areaPath = computed(() =>\n buildAreaPath(points.value, props.height - inset.value, props.smooth),\n);\n\nconst bars = computed(() => {\n const values = props.data;\n if (values.length === 0) return [];\n\n const y = linearScale(domain.value, [props.height - inset.value, inset.value]);\n const baseline = props.height - inset.value;\n const gap = 2;\n const slot = (props.width - inset.value * 2) / values.length;\n const barWidth = Math.max(1, slot - gap);\n\n return values.map((value, index) => {\n const top = y(value);\n return {\n x: inset.value + index * slot + gap / 2,\n y: top,\n width: barWidth,\n height: Math.max(1, baseline - top),\n };\n });\n});\n\nconst lastPoint = computed(() => points.value[points.value.length - 1] ?? null);\n\nconst hasData = computed(() => props.data.length > 0);\n\nconst resolvedLabel = computed(() => props.ariaLabel ?? 'Trend sparkline');\n</script>\n\n<template>\n <svg\n class=\"t-sparkline\"\n :width=\"width\"\n :height=\"height\"\n :viewBox=\"`0 0 ${width} ${height}`\"\n role=\"img\"\n :aria-label=\"resolvedLabel\"\n :style=\"{ color }\"\n >\n <template v-if=\"hasData\">\n <path\n v-if=\"type === 'area'\"\n class=\"t-sparkline__area\"\n :d=\"areaPath\"\n />\n\n <template v-if=\"type === 'bar'\">\n <rect\n v-for=\"(bar, index) in bars\"\n :key=\"index\"\n class=\"t-sparkline__bar\"\n :x=\"bar.x\"\n :y=\"bar.y\"\n :width=\"bar.width\"\n :height=\"bar.height\"\n rx=\"1\"\n />\n </template>\n\n <path\n v-else\n class=\"t-sparkline__line\"\n :d=\"linePath\"\n :stroke-width=\"strokeWidth\"\n fill=\"none\"\n />\n\n <circle\n v-if=\"showLastPoint && type !== 'bar' && lastPoint\"\n class=\"t-sparkline__point\"\n :cx=\"lastPoint.x\"\n :cy=\"lastPoint.y\"\n :r=\"Math.max(2, strokeWidth)\"\n />\n </template>\n </svg>\n</template>\n"],"mappings":"khBAMA,IAAM,EAAQ,EAyCR,GAAA,EAAA,EAAA,SAAA,KAAuB,KAAK,IAAI,EAAM,YAAa,EAAM,cAAgB,EAAI,CAAC,CAAC,EAE/E,GAAA,EAAA,EAAA,SAAA,KAA0C,CAC9C,IAAM,EAAS,EAAM,KACf,EAAM,EAAM,KAAO,KAAK,IAAI,GAAG,CAAM,EACrC,EAAO,EAAM,KAAO,KAAK,IAAI,GAAG,CAAM,EAE5C,OAAO,IAAQ,EAAO,CAAC,EAAM,EAAG,EAAO,CAAC,EAAI,CAAC,EAAK,CAAI,CACxD,CAAC,EAEK,GAAA,EAAA,EAAA,SAAA,KAAsC,CAC1C,IAAM,EAAS,EAAM,KACrB,GAAI,EAAO,SAAW,EAAG,MAAO,CAAC,EAEjC,IAAM,GAAA,EAAA,EAAA,YAAA,CAAgB,CAAC,EAAG,KAAK,IAAI,EAAG,EAAO,OAAS,CAAC,CAAC,EAAG,CAAC,EAAM,MAAO,EAAM,MAAQ,EAAM,KAAK,CAAC,EAC7F,GAAA,EAAA,EAAA,YAAA,CAAgB,EAAO,MAAO,CAAC,EAAM,OAAS,EAAM,MAAO,EAAM,KAAK,CAAC,EAE7E,OAAO,EAAO,KAAK,EAAO,KAAW,CAAE,EAAG,EAAE,CAAK,EAAG,EAAG,EAAE,CAAK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AAA,EAAA,mBAAA,CAmCL,EAAA,SAAA,CAAA,IAAA,CAAA,EAAA,CAjCD,EAAA,OAAI,SAAA,EAAA,EAAA,UAAA,CAAA,GAAA,EAAA,EAAA,mBAAA,CAGV,OAAA,OAFA,MAAM,oBACL,EAAG,EAAA,kDAGU,EAAA,OAAI,QAAA,EAAA,EAAA,UAAA,CAAA,EAAA,GAAA,EAAA,EAAA,mBAAA,CAUhB,EAAA,SAAA,CAAA,IAAA,CAAA,GAAA,EAAA,EAAA,WAAA,CARuB,EAAA,OAAf,EAAK,gDAQb,OAAA,CAPC,IAAK,EACN,MAAM,mBACL,EAAG,EAAI,EACP,EAAG,EAAI,EACP,MAAO,EAAI,MACX,OAAQ,EAAI,OACb,GAAG,mEAUL,OAAA,OAJA,MAAM,oBACL,EAAG,EAAA,MACH,eAAc,EAAA,YACf,KAAK,mBAIC,EAAA,eAAiB,EAAA,OAAI,OAAc,EAAA,QAAA,EAAA,EAAA,UAAA,CAAA,GAAA,EAAA,EAAA,mBAAA,CAKzC,SAAA,OAJA,MAAM,qBACL,GAAI,EAAA,MAAU,EACd,GAAI,EAAA,MAAU,EACd,EAAG,KAAK,IAAG,EAAI,EAAA,WAAW"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, defineComponent as i, normalizeStyle as a, openBlock as o, renderList as s } from "vue";
|
|
2
|
+
import { buildAreaPath as c, buildLinePath as l, linearScale as u } from "@treeui/utils";
|
|
3
|
+
//#region src/components/TSparkline.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var d = [
|
|
5
|
+
"width",
|
|
6
|
+
"height",
|
|
7
|
+
"viewBox",
|
|
8
|
+
"aria-label"
|
|
9
|
+
], f = ["d"], p = [
|
|
10
|
+
"x",
|
|
11
|
+
"y",
|
|
12
|
+
"width",
|
|
13
|
+
"height"
|
|
14
|
+
], m = ["d", "stroke-width"], h = [
|
|
15
|
+
"cx",
|
|
16
|
+
"cy",
|
|
17
|
+
"r"
|
|
18
|
+
], g = /*@__PURE__*/ i({
|
|
19
|
+
__name: "TSparkline",
|
|
20
|
+
props: {
|
|
21
|
+
data: { default: () => [] },
|
|
22
|
+
type: { default: "line" },
|
|
23
|
+
color: { default: "var(--tree-color-chart-1)" },
|
|
24
|
+
width: { default: 120 },
|
|
25
|
+
height: { default: 32 },
|
|
26
|
+
smooth: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !1
|
|
29
|
+
},
|
|
30
|
+
strokeWidth: { default: 2 },
|
|
31
|
+
min: { default: void 0 },
|
|
32
|
+
max: { default: void 0 },
|
|
33
|
+
showLastPoint: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: !1
|
|
36
|
+
},
|
|
37
|
+
ariaLabel: { default: void 0 }
|
|
38
|
+
},
|
|
39
|
+
setup(i) {
|
|
40
|
+
let g = i, _ = t(() => Math.max(g.strokeWidth, g.showLastPoint ? 4 : 2)), v = t(() => {
|
|
41
|
+
let e = g.data, t = g.min ?? Math.min(...e), n = g.max ?? Math.max(...e);
|
|
42
|
+
return t === n ? [t - 1, n + 1] : [t, n];
|
|
43
|
+
}), y = t(() => {
|
|
44
|
+
let e = g.data;
|
|
45
|
+
if (e.length === 0) return [];
|
|
46
|
+
let t = u([0, Math.max(1, e.length - 1)], [_.value, g.width - _.value]), n = u(v.value, [g.height - _.value, _.value]);
|
|
47
|
+
return e.map((e, r) => ({
|
|
48
|
+
x: t(r),
|
|
49
|
+
y: n(e)
|
|
50
|
+
}));
|
|
51
|
+
}), b = t(() => l(y.value, g.smooth)), x = t(() => c(y.value, g.height - _.value, g.smooth)), S = t(() => {
|
|
52
|
+
let e = g.data;
|
|
53
|
+
if (e.length === 0) return [];
|
|
54
|
+
let t = u(v.value, [g.height - _.value, _.value]), n = g.height - _.value, r = (g.width - _.value * 2) / e.length, i = Math.max(1, r - 2);
|
|
55
|
+
return e.map((e, a) => {
|
|
56
|
+
let o = t(e);
|
|
57
|
+
return {
|
|
58
|
+
x: _.value + a * r + 2 / 2,
|
|
59
|
+
y: o,
|
|
60
|
+
width: i,
|
|
61
|
+
height: Math.max(1, n - o)
|
|
62
|
+
};
|
|
63
|
+
});
|
|
64
|
+
}), C = t(() => y.value[y.value.length - 1] ?? null), w = t(() => g.data.length > 0), T = t(() => g.ariaLabel ?? "Trend sparkline");
|
|
65
|
+
return (t, c) => (o(), r("svg", {
|
|
66
|
+
class: "t-sparkline",
|
|
67
|
+
width: i.width,
|
|
68
|
+
height: i.height,
|
|
69
|
+
viewBox: `0 0 ${i.width} ${i.height}`,
|
|
70
|
+
role: "img",
|
|
71
|
+
"aria-label": T.value,
|
|
72
|
+
style: a({ color: i.color })
|
|
73
|
+
}, [w.value ? (o(), r(e, { key: 0 }, [
|
|
74
|
+
i.type === "area" ? (o(), r("path", {
|
|
75
|
+
key: 0,
|
|
76
|
+
class: "t-sparkline__area",
|
|
77
|
+
d: x.value
|
|
78
|
+
}, null, 8, f)) : n("", !0),
|
|
79
|
+
i.type === "bar" ? (o(!0), r(e, { key: 1 }, s(S.value, (e, t) => (o(), r("rect", {
|
|
80
|
+
key: t,
|
|
81
|
+
class: "t-sparkline__bar",
|
|
82
|
+
x: e.x,
|
|
83
|
+
y: e.y,
|
|
84
|
+
width: e.width,
|
|
85
|
+
height: e.height,
|
|
86
|
+
rx: "1"
|
|
87
|
+
}, null, 8, p))), 128)) : (o(), r("path", {
|
|
88
|
+
key: 2,
|
|
89
|
+
class: "t-sparkline__line",
|
|
90
|
+
d: b.value,
|
|
91
|
+
"stroke-width": i.strokeWidth,
|
|
92
|
+
fill: "none"
|
|
93
|
+
}, null, 8, m)),
|
|
94
|
+
i.showLastPoint && i.type !== "bar" && C.value ? (o(), r("circle", {
|
|
95
|
+
key: 3,
|
|
96
|
+
class: "t-sparkline__point",
|
|
97
|
+
cx: C.value.x,
|
|
98
|
+
cy: C.value.y,
|
|
99
|
+
r: Math.max(2, i.strokeWidth)
|
|
100
|
+
}, null, 8, h)) : n("", !0)
|
|
101
|
+
], 64)) : n("", !0)], 12, d));
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
//#endregion
|
|
105
|
+
export { g as default };
|
|
106
|
+
|
|
107
|
+
//# sourceMappingURL=TSparkline.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TSparkline.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/components/TSparkline.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { buildAreaPath, buildLinePath, linearScale, type ChartPoint } from '@treeui/utils';\n\ntype TSparklineType = 'line' | 'area' | 'bar';\n\nconst props = withDefaults(\n defineProps<{\n /** Values to plot, left to right. */\n data?: number[];\n /** Visual form. `area` fills under the line; `bar` draws thin columns. */\n type?: TSparklineType;\n /** Mark color. Any CSS color; defaults to the first chart token. */\n color?: string;\n /** Intrinsic width in px. */\n width?: number;\n /** Intrinsic height in px. */\n height?: number;\n /** Smooth (curved) line/area instead of straight segments. */\n smooth?: boolean;\n /** Line thickness in px (line/area only). */\n strokeWidth?: number;\n /** Force the low end of the value domain (defaults to the data min). */\n min?: number;\n /** Force the high end of the value domain (defaults to the data max). */\n max?: number;\n /** Draw a filled marker on the last point (line/area only). */\n showLastPoint?: boolean;\n /** Accessible label. Falls back to a generic trend description. */\n ariaLabel?: string;\n }>(),\n {\n data: () => [],\n type: 'line',\n color: 'var(--tree-color-chart-1)',\n width: 120,\n height: 32,\n smooth: false,\n strokeWidth: 2,\n min: undefined,\n max: undefined,\n showLastPoint: false,\n ariaLabel: undefined,\n },\n);\n\n// Inset so strokes and markers never clip against the SVG edge.\nconst inset = computed(() => Math.max(props.strokeWidth, props.showLastPoint ? 4 : 2));\n\nconst domain = computed<[number, number]>(() => {\n const values = props.data;\n const low = props.min ?? Math.min(...values);\n const high = props.max ?? Math.max(...values);\n // Pad a flat series so it renders as a centered line, not against an edge.\n return low === high ? [low - 1, high + 1] : [low, high];\n});\n\nconst points = computed<ChartPoint[]>(() => {\n const values = props.data;\n if (values.length === 0) return [];\n\n const x = linearScale([0, Math.max(1, values.length - 1)], [inset.value, props.width - inset.value]);\n const y = linearScale(domain.value, [props.height - inset.value, inset.value]);\n\n return values.map((value, index) => ({ x: x(index), y: y(value) }));\n});\n\nconst linePath = computed(() => buildLinePath(points.value, props.smooth));\nconst areaPath = computed(() =>\n buildAreaPath(points.value, props.height - inset.value, props.smooth),\n);\n\nconst bars = computed(() => {\n const values = props.data;\n if (values.length === 0) return [];\n\n const y = linearScale(domain.value, [props.height - inset.value, inset.value]);\n const baseline = props.height - inset.value;\n const gap = 2;\n const slot = (props.width - inset.value * 2) / values.length;\n const barWidth = Math.max(1, slot - gap);\n\n return values.map((value, index) => {\n const top = y(value);\n return {\n x: inset.value + index * slot + gap / 2,\n y: top,\n width: barWidth,\n height: Math.max(1, baseline - top),\n };\n });\n});\n\nconst lastPoint = computed(() => points.value[points.value.length - 1] ?? null);\n\nconst hasData = computed(() => props.data.length > 0);\n\nconst resolvedLabel = computed(() => props.ariaLabel ?? 'Trend sparkline');\n</script>\n\n<template>\n <svg\n class=\"t-sparkline\"\n :width=\"width\"\n :height=\"height\"\n :viewBox=\"`0 0 ${width} ${height}`\"\n role=\"img\"\n :aria-label=\"resolvedLabel\"\n :style=\"{ color }\"\n >\n <template v-if=\"hasData\">\n <path\n v-if=\"type === 'area'\"\n class=\"t-sparkline__area\"\n :d=\"areaPath\"\n />\n\n <template v-if=\"type === 'bar'\">\n <rect\n v-for=\"(bar, index) in bars\"\n :key=\"index\"\n class=\"t-sparkline__bar\"\n :x=\"bar.x\"\n :y=\"bar.y\"\n :width=\"bar.width\"\n :height=\"bar.height\"\n rx=\"1\"\n />\n </template>\n\n <path\n v-else\n class=\"t-sparkline__line\"\n :d=\"linePath\"\n :stroke-width=\"strokeWidth\"\n fill=\"none\"\n />\n\n <circle\n v-if=\"showLastPoint && type !== 'bar' && lastPoint\"\n class=\"t-sparkline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AK,IAAG,GAAI,EAAA,WAAW"}
|
|
@@ -20,9 +20,9 @@ declare function __VLS_template(): {
|
|
|
20
20
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
21
21
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
22
22
|
reverse: boolean;
|
|
23
|
+
gap: string;
|
|
23
24
|
as: string;
|
|
24
25
|
align: string;
|
|
25
|
-
gap: string;
|
|
26
26
|
justify: string;
|
|
27
27
|
wrap: boolean;
|
|
28
28
|
direction: TStackDirection;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TStack.vue.d.ts","sourceRoot":"","sources":["../../src/components/TStack.vue"],"names":[],"mappings":"AA6EA,QAAA,MAAM,oBAAoB,qCAAsC,CAAC;AAEjE,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAmDJ,iBAAS,cAAc;WAkCT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;aAxGP,OAAO;
|
|
1
|
+
{"version":3,"file":"TStack.vue.d.ts","sourceRoot":"","sources":["../../src/components/TStack.vue"],"names":[],"mappings":"AA6EA,QAAA,MAAM,oBAAoB,qCAAsC,CAAC;AAEjE,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAmDJ,iBAAS,cAAc;WAkCT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;aAxGP,OAAO;SAJX,MAAM;QAFP,MAAM;WAGH,MAAM;aACJ,MAAM;UACT,OAAO;eAJF,eAAe;6EAoH7B,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -36,6 +36,8 @@ export { default as TSelect } from './TSelect.vue';
|
|
|
36
36
|
export type { TSelectOption } from './TSelect.vue';
|
|
37
37
|
export { default as TSidebar } from './TSidebar.vue';
|
|
38
38
|
export type { TSidebarSide } from './TSidebar.vue';
|
|
39
|
+
export { default as TAppShell } from './TAppShell.vue';
|
|
40
|
+
export type { AppShellSlotProps } from './TAppShell.vue';
|
|
39
41
|
export { default as TInput } from './TInput.vue';
|
|
40
42
|
export { default as TNumberInput } from './TNumberInput.vue';
|
|
41
43
|
export { default as TSelectableList } from './TSelectableList.vue';
|
|
@@ -77,6 +79,11 @@ export { default as TPricing } from './TPricing.vue';
|
|
|
77
79
|
export { default as TPricingCard } from './TPricingCard.vue';
|
|
78
80
|
export type { PricingFeature } from './TPricingCard.vue';
|
|
79
81
|
export { default as TMarkdownEditor } from './TMarkdownEditor.vue';
|
|
82
|
+
export { default as TChart } from './TChart.vue';
|
|
83
|
+
export type { TChartType, TChartSeries, TChartActivePayload } from './TChart.vue';
|
|
84
|
+
export { default as TSparkline } from './TSparkline.vue';
|
|
85
|
+
export { default as TDonutChart } from './TDonutChart.vue';
|
|
86
|
+
export type { TDonutSegment } from './TDonutChart.vue';
|
|
80
87
|
export { default as TIcon } from './TIcon.vue';
|
|
81
88
|
export type { TIconName } from '../../../icons/src/index.ts';
|
|
82
89
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;AACjD,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,SAAS,EA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}});/* empty css */const e=require("./components/TAccordion.cjs"),t=require("./components/TAccordionItem.cjs"),n=require("./components/TAlert.cjs"),r=require("./components/TBadge.cjs"),ee=require("./components/TBreadcrumb.cjs"),te=require("./components/TBreadcrumbItem.cjs"),i=require("./components/TSpinner.cjs"),a=require("./components/TButton.cjs"),o=require("./components/TCard.cjs"),s=require("./components/TCheckbox.cjs"),c=require("./components/TCombobox.cjs"),l=require("./components/TModal.cjs"),u=require("./components/TConfirmDialog.cjs"),d=require("./components/TContainer.cjs"),f=require("./components/TContextMenu.cjs"),p=require("./components/TDatePicker.cjs"),m=require("./components/TDateTimePicker.cjs"),h=require("./components/TDrawer.cjs"),g=require("./components/TDropdown.cjs"),_=require("./components/TEmptyState.cjs"),v=require("./components/TFileUpload.cjs"),y=require("./components/TMultiSelect.cjs"),b=require("./components/TGrid.cjs"),x=require("./components/TNavbar.cjs"),S=require("./components/TLink.cjs"),C=require("./components/TNavMenu.cjs"),w=require("./components/TRadio.cjs"),T=require("./components/TRadioGroup.cjs"),E=require("./components/TSelect.cjs"),D=require("./components/TSidebar.cjs"),O=require("./components/
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});/* empty css */const e=require("./components/TAccordion.cjs"),t=require("./components/TAccordionItem.cjs"),n=require("./components/TAlert.cjs"),r=require("./components/TBadge.cjs"),ee=require("./components/TBreadcrumb.cjs"),te=require("./components/TBreadcrumbItem.cjs"),i=require("./components/TSpinner.cjs"),a=require("./components/TButton.cjs"),o=require("./components/TCard.cjs"),s=require("./components/TCheckbox.cjs"),c=require("./components/TCombobox.cjs"),l=require("./components/TModal.cjs"),u=require("./components/TConfirmDialog.cjs"),d=require("./components/TContainer.cjs"),f=require("./components/TContextMenu.cjs"),p=require("./components/TDatePicker.cjs"),m=require("./components/TDateTimePicker.cjs"),h=require("./components/TDrawer.cjs"),g=require("./components/TDropdown.cjs"),_=require("./components/TEmptyState.cjs"),v=require("./components/TFileUpload.cjs"),y=require("./components/TMultiSelect.cjs"),b=require("./components/TGrid.cjs"),x=require("./components/TNavbar.cjs"),S=require("./components/TLink.cjs"),C=require("./components/TNavMenu.cjs"),w=require("./components/TRadio.cjs"),T=require("./components/TRadioGroup.cjs"),E=require("./components/TSelect.cjs"),D=require("./components/TSidebar.cjs"),O=require("./components/TAppShell.cjs"),k=require("./components/TInput.cjs"),A=require("./components/TNumberInput.cjs"),ne=require("./components/TSelectableList.cjs"),j=require("./components/TStack.cjs"),M=require("./components/TTreeView.cjs"),N=require("./components/TSteps.cjs"),P=require("./components/TToggleGroup.cjs"),F=require("./components/TTextarea.cjs"),I=require("./components/TSkeleton.cjs"),L=require("./components/TStat.cjs"),R=require("./components/TSwitch.cjs"),z=require("./components/TTooltip.cjs"),B=require("./components/TFormField.cjs"),V=require("./components/TPagination.cjs"),H=require("./components/TPopover.cjs"),U=require("./components/TProgress.cjs"),W=require("./components/TTabs.cjs"),G=require("./components/TTabList.cjs"),K=require("./components/TTab.cjs"),q=require("./components/TTabPanel.cjs"),J=require("./components/TToast.cjs"),Y=require("./composables/useToast.cjs"),X=require("./components/TToastProvider.cjs"),Z=require("./components/TAvatar.cjs"),re=require("./components/TDivider.cjs"),ie=require("./components/TTable.cjs"),ae=require("./components/TTag.cjs"),oe=require("./components/TTimeline.cjs"),se=require("./components/TPricingCard.cjs"),ce=require("./components/TPricing.cjs"),le=require("./components/TMarkdownEditor.cjs"),ue=require("./components/TChart.cjs"),de=require("./components/TSparkline.cjs"),fe=require("./components/TDonutChart.cjs"),pe=require("./components/TIcon.cjs"),Q=require("./plugin.cjs"),$=require("./types/contracts.cjs");exports.TAccordion=e.default,exports.TAccordionItem=t.default,exports.TAlert=n.default,exports.TAppBar=x.default,exports.TAppShell=O.default,exports.TAvatar=Z.default,exports.TBadge=r.default,exports.TBreadcrumb=ee.default,exports.TBreadcrumbItem=te.default,exports.TButton=a.default,exports.TCard=o.default,exports.TChart=ue.default,exports.TCheckbox=s.default,exports.TCombobox=c.default,exports.TConfirmDialog=u.default,exports.TContainer=d.default,exports.TContextMenu=f.default,exports.TDatePicker=p.default,exports.TDateTimePicker=m.default,exports.TDivider=re.default,exports.TDonutChart=fe.default,exports.TDrawer=h.default,exports.TDropdown=g.default,exports.TEmptyState=_.default,exports.TFileUpload=v.default,exports.TFormField=B.default,exports.TGrid=b.default,exports.TIcon=pe.default,exports.TInput=k.default,exports.TLink=S.default,exports.TMarkdownEditor=le.default,exports.TModal=l.default,exports.TMultiSelect=y.default,exports.TNavMenu=C.default,exports.TNavbar=x.default,exports.TNumberInput=A.default,exports.TPagination=V.default,exports.TPopover=H.default,exports.TPricing=ce.default,exports.TPricingCard=se.default,exports.TProgress=U.default,exports.TRadio=w.default,exports.TRadioGroup=T.default,exports.TSelect=E.default,exports.TSelectableList=ne.default,exports.TSidebar=D.default,exports.TSkeleton=I.default,exports.TSparkline=de.default,exports.TSpinner=i.default,exports.TStack=j.default,exports.TStat=L.default,exports.TStepper=N.default,exports.TSteps=N.default,exports.TSwitch=R.default,exports.TTab=K.default,exports.TTabList=G.default,exports.TTabPanel=q.default,exports.TTable=ie.default,exports.TTabs=W.default,exports.TTag=ae.default,exports.TTextarea=F.default,exports.TTimeline=oe.default,exports.TToast=J.default,exports.TToastProvider=X.default,exports.TToggleGroup=P.default,exports.TTooltip=z.default,exports.TTreeView=M.default,exports.TreeUIPlugin=Q.TreeUIPlugin,exports.default=Q.TreeUIPlugin,exports.install=Q.install,exports.treeCardVariants=$.treeCardVariants,exports.treeDrawerSides=$.treeDrawerSides,exports.treeSizes=$.treeSizes,exports.treeTooltipSides=$.treeTooltipSides,exports.treeVariants=$.treeVariants,exports.useToast=Y.useToast;
|