@orchidui/dashboard 1.8.1-95 → 1.8.1-96
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/dist/AccordionTrigger.vue_vue_type_script_setup_true_lang-BdmLII9i.js +295 -0
- package/dist/CalendarPrevButton.vue_vue_type_script_setup_true_lang-DpJRpFhK.js +891 -0
- package/dist/CardTitle.vue_vue_type_script_setup_true_lang-D2_Bj3jw.js +68 -0
- package/dist/Checkbox.vue_vue_type_script_setup_true_lang-C51LjITJ.js +172 -0
- package/dist/CollapsibleTrigger-fCarY5DJ.js +154 -0
- package/dist/Collection-COudIl-A.js +55 -0
- package/dist/ConfigProvider-7mV0D7Sp.js +6 -0
- package/dist/Dashboard/Card/OcCard.js +1 -1
- package/dist/Dashboard/TextEditor/QuillEditor.js +1 -1
- package/dist/DialogContent.vue_vue_type_script_setup_true_lang-CdrrrG29.js +68 -0
- package/dist/DialogOverlay-Cj3UTjZ8.js +309 -0
- package/dist/DialogPortal-zAvO8zt4.js +23 -0
- package/dist/DialogTrigger-BIF1A4hk.js +72 -0
- package/dist/DismissableLayer-C7IJliOb.js +151 -0
- package/dist/FocusScope--pJ6bboI.js +121 -0
- package/dist/FormMessage.vue_vue_type_script_setup_true_lang-DwlnFEn2.js +92 -0
- package/dist/Input.vue_vue_type_script_setup_true_lang-BrjsUUvL.js +27 -0
- package/dist/Label.vue_vue_type_script_setup_true_lang-D_LMIKBv.js +51 -0
- package/dist/ListboxItem-CjMk-mEX.js +417 -0
- package/dist/MenuSubTrigger-CUrxnPwO.js +845 -0
- package/dist/{OcCard-D3be6IMj.js → OcCard-B3SCzVwn.js} +54 -58
- package/dist/{OcLottieAnimation-0mdksHMn.js → OcLottieAnimation-DeMoIDaX.js} +1 -1
- package/dist/PopoverTrigger.vue_vue_type_script_setup_true_lang-DtI_qIyx.js +394 -0
- package/dist/PopperContent-BT3Svcc3.js +1465 -0
- package/dist/Presence-CxfTrw6l.js +133 -0
- package/dist/Primitive-B3twiLO1.js +44 -0
- package/dist/{QuillEditor-DRwC0sgJ.js → QuillEditor-hFQ0MJZO.js} +556 -579
- package/dist/RadioGroupItem.vue_vue_type_script_setup_true_lang-BNfRYIhL.js +297 -0
- package/dist/RovingFocusGroup-0OHdFQl0.js +92 -0
- package/dist/RovingFocusItem-s7Ug6oxb.js +82 -0
- package/dist/SelectValue.vue_vue_type_script_setup_true_lang-CVsYrN1R.js +1255 -0
- package/dist/Separator-DRam5i7g.js +54 -0
- package/dist/Separator.vue_vue_type_script_setup_true_lang-DGPbh6Dt.js +27 -0
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-k1A7l6Y-.js +17 -0
- package/dist/Switch.vue_vue_type_script_setup_true_lang-94ZKgnTz.js +135 -0
- package/dist/Teleport-DnUewq5H.js +25 -0
- package/dist/Textarea.vue_vue_type_script_setup_true_lang-DKazues9.js +27 -0
- package/dist/TooltipTrigger.vue_vue_type_script_setup_true_lang-CZ3AuN38.js +426 -0
- package/dist/VisuallyHidden-DMAU4heD.js +41 -0
- package/dist/VisuallyHiddenInput-DvJnsVHt.js +59 -0
- package/dist/_commonjsHelpers-B4e78b8K.js +28 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/array-CqVTtuYm.js +6 -0
- package/dist/arrays-4jDZqbdb.js +20 -0
- package/dist/check-C2tzJ0Gk.js +11 -0
- package/dist/chevron-down-CnpAlizg.js +13 -0
- package/dist/chevron-left-BOwFasou.js +13 -0
- package/dist/chevron-right-D308801z.js +13 -0
- package/dist/circle-A-6NpYiX.js +13 -0
- package/dist/clamp-BL1Rb24G.js +22 -0
- package/dist/constant-CuDQlTIy.js +3433 -0
- package/dist/createContext-CZEfaSVa.js +17 -0
- package/dist/createLucideIcon-eXqDwUWj.js +71 -0
- package/dist/ellipsis-CEG9G7eN.js +15 -0
- package/dist/getActiveElement-B-HWdUIb.js +11 -0
- package/dist/handleAndDispatchCustomEvent-Byh08EHr.js +11 -0
- package/dist/index-B3LW8uSH.js +133 -0
- package/dist/index-BIlpXuWX.js +3430 -0
- package/dist/index-BlGEiPHj.js +1246 -0
- package/dist/index-BwPb_idr.js +574 -0
- package/dist/index-C9julNQm.js +173 -0
- package/dist/index-C_aI-Wfj.js +34 -0
- package/dist/index-CumjCvqB.js +5703 -0
- package/dist/index-LqWMCtOd.js +809 -0
- package/dist/index-OpE2oGce.js +110 -0
- package/dist/index.js +3 -3
- package/dist/isValueEqualOrExist-BDSMUv8t.js +8 -0
- package/dist/lib/utils.js +5 -0
- package/dist/nullish-CjWwlQS3.js +6 -0
- package/dist/ohash.D__AXeF1-DX2n0b2C.js +106 -0
- package/dist/plus-CgluTYQY.js +14 -0
- package/dist/text-zwICaAnx.js +743 -0
- package/dist/ui/accordion/index.js +7 -0
- package/dist/ui/alert/index.js +64 -0
- package/dist/ui/alert-dialog/index.js +356 -0
- package/dist/ui/aspect-ratio/index.js +50 -0
- package/dist/ui/auto-form/constant.js +5 -0
- package/dist/ui/auto-form/dependencies.js +61 -0
- package/dist/ui/auto-form/index.js +227 -0
- package/dist/ui/auto-form/interface.js +4 -0
- package/dist/ui/auto-form/utils.js +89 -0
- package/dist/ui/avatar/index.js +189 -0
- package/dist/ui/badge/index.js +37 -0
- package/dist/ui/breadcrumb/index.js +126 -0
- package/dist/ui/button/index.js +55 -0
- package/dist/ui/calendar/index.js +15 -0
- package/dist/ui/card/index.js +38 -0
- package/dist/ui/carousel/index.js +174 -0
- package/dist/ui/carousel/interface.js +1 -0
- package/dist/ui/carousel/useCarousel.js +1288 -0
- package/dist/ui/chart/index.js +8 -0
- package/dist/ui/chart/interface.js +1 -0
- package/dist/ui/chart-area/index.js +331 -0
- package/dist/ui/chart-bar/index.js +490 -0
- package/dist/ui/chart-donut/index.js +509 -0
- package/dist/ui/chart-line/index.js +110 -0
- package/dist/ui/checkbox/index.js +4 -0
- package/dist/ui/collapsible/index.js +60 -0
- package/dist/ui/combobox/index.js +877 -0
- package/dist/ui/command/index.js +323 -0
- package/dist/ui/context-menu/index.js +734 -0
- package/dist/ui/dialog/index.js +169 -0
- package/dist/ui/drawer/index.js +971 -0
- package/dist/ui/dropdown-menu/index.js +723 -0
- package/dist/ui/form/index.js +13 -0
- package/dist/ui/form/injectionKeys.js +4 -0
- package/dist/ui/form/useFormField.js +25 -0
- package/dist/ui/hover-card/index.js +331 -0
- package/dist/ui/input/index.js +4 -0
- package/dist/ui/label/index.js +4 -0
- package/dist/ui/menubar/index.js +862 -0
- package/dist/ui/navigation-menu/index.js +873 -0
- package/dist/ui/number-field/index.js +682 -0
- package/dist/ui/pagination/index.js +444 -0
- package/dist/ui/pin-input/index.js +308 -0
- package/dist/ui/popover/index.js +6 -0
- package/dist/ui/progress/index.js +137 -0
- package/dist/ui/radio-group/index.js +5 -0
- package/dist/ui/range-calendar/index.js +986 -0
- package/dist/ui/resizable/index.js +1432 -0
- package/dist/ui/scroll-area/index.js +775 -0
- package/dist/ui/select/index.js +135 -0
- package/dist/ui/separator/index.js +4 -0
- package/dist/ui/sheet/index.js +188 -0
- package/dist/ui/sidebar/index.js +652 -0
- package/dist/ui/sidebar/utils.js +12 -0
- package/dist/ui/skeleton/index.js +4 -0
- package/dist/ui/slider/index.js +478 -0
- package/dist/ui/sonner/index.js +892 -0
- package/dist/ui/stepper/index.js +442 -0
- package/dist/ui/switch/index.js +4 -0
- package/dist/ui/table/index.js +153 -0
- package/dist/ui/tabs/index.js +280 -0
- package/dist/ui/tags-input/index.js +449 -0
- package/dist/ui/textarea/index.js +4 -0
- package/dist/ui/toast/index.js +738 -0
- package/dist/ui/toast/use-toast.js +85 -0
- package/dist/ui/toggle/index.js +6 -0
- package/dist/ui/toggle-group/index.js +112 -0
- package/dist/ui/tooltip/index.js +29 -0
- package/dist/useArrowNavigation-BRMPveaB.js +49 -0
- package/dist/useBodyScrollLock-CazCRZjZ.js +153 -0
- package/dist/useDirection-C3C_TLKm.js +14 -0
- package/dist/useFocusGuards-CyjC9cG9.js +26 -0
- package/dist/useFormControl-CFVC51Lp.js +11 -0
- package/dist/useForwardExpose-DZT6mL_U.js +37 -0
- package/dist/useForwardPropsEmits-0XKBv1pB.js +33 -0
- package/dist/useGraceArea-D7-GP1ii.js +137 -0
- package/dist/useId-reAg216X.js +13 -0
- package/dist/useKbd-BJNupnml.js +41 -0
- package/dist/useLocale-BfU0LC8Z.js +14 -0
- package/dist/useNonce-C1ZOgOp5.js +14 -0
- package/dist/usePrimitiveElement-BjwUvHih.js +15 -0
- package/dist/useSingleOrMultipleValue-BkTAaaJB.js +43 -0
- package/dist/useSize-BnyQ8FZF.js +37 -0
- package/dist/useTypeahead-oSidjyFF.js +40 -0
- package/dist/utils-DKNaYMZh.js +57 -0
- package/dist/utils-Dx9la83v.js +35 -0
- package/dist/utils-DxQ_ywGa.js +55 -0
- package/dist/utils-SFgRDk1R.js +2748 -0
- package/dist/utils-W-UiqiPE.js +1869 -0
- package/dist/vee-validate-Cf8JDJ_k.js +2232 -0
- package/dist/x-Cl6YllUK.js +14 -0
- package/package.json +264 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
import { defineComponent as U, inject as W, computed as N, ref as q, createElementBlock as S, onMounted as Z, nextTick as ee, onUnmounted as te, watch as E, openBlock as h, normalizeClass as ae, unref as v, createBlock as A, createCommentVNode as B, createVNode as oe, normalizeStyle as ne, withCtx as re, renderSlot as se, createElementVNode as F, Fragment as G, renderList as H } from "vue";
|
|
2
|
+
import { w as ie, c as x, X as le, b as J, i as ce, e as ue, f as de, g as I, h as _, j as fe, k as z, s as R, l as pe, m as ye, n as me, o as he, p as ve, q as ge, r as ke, d as xe, _ as be, a as we } from "../../index-CumjCvqB.js";
|
|
3
|
+
import { u as Ce } from "../../index-B3LW8uSH.js";
|
|
4
|
+
import { c as Se } from "../../utils-SFgRDk1R.js";
|
|
5
|
+
import { c as Ae, x as Te, y as $e, l as De, C as K, a as je, i as Be, S as Ge, L as Me } from "../../index-BlGEiPHj.js";
|
|
6
|
+
import { u as Pe } from "../../useId-reAg216X.js";
|
|
7
|
+
import { $ as Le, O as V, A as Oe } from "../../index-LqWMCtOd.js";
|
|
8
|
+
import { a as Xe } from "../../array-CqVTtuYm.js";
|
|
9
|
+
function Fe(y, i, t) {
|
|
10
|
+
var l = null, u = x(!0), f = null, c = Ae, o = null, w = ie(r);
|
|
11
|
+
y = typeof y == "function" ? y : y === void 0 ? Te : x(+y), i = typeof i == "function" ? i : i === void 0 ? x(0) : x(+i), t = typeof t == "function" ? t : t === void 0 ? $e : x(+t);
|
|
12
|
+
function r(e) {
|
|
13
|
+
var a, m, g, p = (e = Xe(e)).length, s, d = !1, b, k = new Array(p), C = new Array(p);
|
|
14
|
+
for (f == null && (o = c(b = w())), a = 0; a <= p; ++a) {
|
|
15
|
+
if (!(a < p && u(s = e[a], a, e)) === d)
|
|
16
|
+
if (d = !d)
|
|
17
|
+
m = a, o.areaStart(), o.lineStart();
|
|
18
|
+
else {
|
|
19
|
+
for (o.lineEnd(), o.lineStart(), g = a - 1; g >= m; --g)
|
|
20
|
+
o.point(k[g], C[g]);
|
|
21
|
+
o.lineEnd(), o.areaEnd();
|
|
22
|
+
}
|
|
23
|
+
d && (k[a] = +y(s, a, e), C[a] = +i(s, a, e), o.point(l ? +l(s, a, e) : k[a], t ? +t(s, a, e) : C[a]));
|
|
24
|
+
}
|
|
25
|
+
if (b) return o = null, b + "" || null;
|
|
26
|
+
}
|
|
27
|
+
function n() {
|
|
28
|
+
return De().defined(u).curve(c).context(f);
|
|
29
|
+
}
|
|
30
|
+
return r.x = function(e) {
|
|
31
|
+
return arguments.length ? (y = typeof e == "function" ? e : x(+e), l = null, r) : y;
|
|
32
|
+
}, r.x0 = function(e) {
|
|
33
|
+
return arguments.length ? (y = typeof e == "function" ? e : x(+e), r) : y;
|
|
34
|
+
}, r.x1 = function(e) {
|
|
35
|
+
return arguments.length ? (l = e == null ? null : typeof e == "function" ? e : x(+e), r) : l;
|
|
36
|
+
}, r.y = function(e) {
|
|
37
|
+
return arguments.length ? (i = typeof e == "function" ? e : x(+e), t = null, r) : i;
|
|
38
|
+
}, r.y0 = function(e) {
|
|
39
|
+
return arguments.length ? (i = typeof e == "function" ? e : x(+e), r) : i;
|
|
40
|
+
}, r.y1 = function(e) {
|
|
41
|
+
return arguments.length ? (t = e == null ? null : typeof e == "function" ? e : x(+e), r) : t;
|
|
42
|
+
}, r.lineX0 = r.lineY0 = function() {
|
|
43
|
+
return n().x(y).y(i);
|
|
44
|
+
}, r.lineY1 = function() {
|
|
45
|
+
return n().x(y).y(t);
|
|
46
|
+
}, r.lineX1 = function() {
|
|
47
|
+
return n().x(l).y(i);
|
|
48
|
+
}, r.defined = function(e) {
|
|
49
|
+
return arguments.length ? (u = typeof e == "function" ? e : x(!!e), r) : u;
|
|
50
|
+
}, r.curve = function(e) {
|
|
51
|
+
return arguments.length ? (c = e, f != null && (o = c(f)), r) : c;
|
|
52
|
+
}, r.context = function(e) {
|
|
53
|
+
return arguments.length ? (e == null ? f = o = null : o = c(f = e), r) : f;
|
|
54
|
+
}, r;
|
|
55
|
+
}
|
|
56
|
+
const He = Object.assign(Object.assign({}, le), { color: void 0, curveType: K.MonotoneX, baseline: () => 0, opacity: 1, cursor: null, minHeight1Px: !1, minHeight: void 0 }), Q = J`
|
|
57
|
+
label: area-component;
|
|
58
|
+
`, Ne = ce`
|
|
59
|
+
:root {
|
|
60
|
+
--vis-area-cursor: default;
|
|
61
|
+
--vis-area-fill-opacity: 1;
|
|
62
|
+
--vis-area-stroke-color: none;
|
|
63
|
+
--vis-area-stroke-width: 0px;
|
|
64
|
+
--vis-area-stroke-dasharray: none;
|
|
65
|
+
--vis-area-stroke-opacity: 1;
|
|
66
|
+
--vis-area-hover-fill-opacity: none;
|
|
67
|
+
--vis-area-hover-stroke-width: none;
|
|
68
|
+
|
|
69
|
+
/* Dark Theme */
|
|
70
|
+
--vis-dark-area-stroke-color: none;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
body.theme-dark ${`.${Q}`} {
|
|
74
|
+
--vis-area-stroke-color: var(--vis-dark-area-stroke-color);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
`, Y = J`
|
|
78
|
+
label: area;
|
|
79
|
+
cursor: var(--vis-area-cursor);
|
|
80
|
+
fill-opacity: var(--vis-area-fill-opacity);
|
|
81
|
+
stroke-width: var(--vis-area-stroke-width);
|
|
82
|
+
stroke-dasharray: var(--vis-area-stroke-dasharray);
|
|
83
|
+
stroke: var(--vis-area-stroke-color);
|
|
84
|
+
stroke-opacity: var(--vis-area-stroke-opacity);
|
|
85
|
+
|
|
86
|
+
&:hover {
|
|
87
|
+
fill-opacity: var(--vis-area-hover-fill-opacity);
|
|
88
|
+
stroke-width: var(--vis-area-hover-stroke-width);
|
|
89
|
+
}
|
|
90
|
+
`, Ye = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
91
|
+
__proto__: null,
|
|
92
|
+
area: Y,
|
|
93
|
+
globalStyles: Ne,
|
|
94
|
+
root: Q
|
|
95
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
96
|
+
class T extends ue {
|
|
97
|
+
constructor(i) {
|
|
98
|
+
super(), this._defaultConfig = He, this.config = this._defaultConfig, this.stacked = !0, this.events = {
|
|
99
|
+
[T.selectors.area]: {}
|
|
100
|
+
}, i && this.setConfig(i), this.stacked = Array.isArray(this.config.y);
|
|
101
|
+
}
|
|
102
|
+
_render(i) {
|
|
103
|
+
super._render(i);
|
|
104
|
+
const { config: t, datamodel: { data: l } } = this, u = de(i) ? i : t.duration, f = je[t.curveType];
|
|
105
|
+
this._areaGen = Fe().x((s) => s.x).y0((s) => s.y0).y1((s) => s.y1).curve(f);
|
|
106
|
+
const c = I(t.y) ? t.y : [t.y], o = l.map((s, d) => this.xScale(_(s, t.x, d))), w = fe(l, t.baseline, c, this._prevNegative);
|
|
107
|
+
this._prevNegative = w.map((s) => !!s.isMostlyNegative);
|
|
108
|
+
const r = [], n = w.map((s) => s.map((d, b) => {
|
|
109
|
+
var k, C;
|
|
110
|
+
const M = o[b], P = this.yScale(d[0]), L = this.yScale(d[1]), O = L > P, $ = r[b] || 0, X = O ? P + $ : P - $, D = O ? L + $ : L - $;
|
|
111
|
+
let j = 0;
|
|
112
|
+
return (t.minHeight || t.minHeight1Px) && Math.abs(D - X) < ((k = t.minHeight) !== null && k !== void 0 ? k : 1) && (j = ((C = t.minHeight) !== null && C !== void 0 ? C : 1) - Math.abs(D - X), r[b] = $ + j), {
|
|
113
|
+
x: M,
|
|
114
|
+
y0: X,
|
|
115
|
+
y1: O ? D + j : D - j
|
|
116
|
+
};
|
|
117
|
+
})), e = n.length - 1, a = n.reverse(), m = this.g.selectAll(`.${Y}`).data(a), g = m.enter().append("path").attr("class", Y).attr("d", (s) => this._areaGen(s) || this._emptyPath()).style("opacity", 0).style("fill", (s, d) => z(l, t.color, e - d)), p = R(g.merge(m), u).style("opacity", (s, d) => s.some((k) => k.y0 - k.y1 !== 0) ? _(l, t.opacity, e - d) : 0).style("fill", (s, d) => z(l, t.color, e - d)).style("cursor", (s, d) => pe(l, t.cursor, e - d));
|
|
118
|
+
u ? p.attrTween("d", (d, b, k) => {
|
|
119
|
+
const C = ye(k[b]).attr("d"), M = this._areaGen(d) || this._emptyPath();
|
|
120
|
+
return Be(C, M);
|
|
121
|
+
}) : p.attr("d", (s) => this._areaGen(s) || this._emptyPath()), R(m.exit(), u).style("opacity", 0).remove();
|
|
122
|
+
}
|
|
123
|
+
getYDataExtent(i) {
|
|
124
|
+
const { config: t, datamodel: l } = this, u = I(t.y) ? t.y : [t.y], f = i ? me(l.data, this.xScale.domain(), t.x) : l.data;
|
|
125
|
+
return he(f, t.baseline, ...u);
|
|
126
|
+
}
|
|
127
|
+
_emptyPath() {
|
|
128
|
+
const i = this.xScale.range(), t = this.yScale.domain(), l = this.yScale((t[0] + t[1]) / 2), u = l;
|
|
129
|
+
return this._areaGen([
|
|
130
|
+
{ y0: l, y1: u, x: i[0] },
|
|
131
|
+
{ y0: l, y1: u, x: i[1] }
|
|
132
|
+
]);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
T.selectors = Ye;
|
|
136
|
+
const Ee = { "data-vis-component": "" };
|
|
137
|
+
T.selectors;
|
|
138
|
+
const Ie = /* @__PURE__ */ U({
|
|
139
|
+
__name: "index",
|
|
140
|
+
props: {
|
|
141
|
+
color: {},
|
|
142
|
+
curveType: {},
|
|
143
|
+
baseline: {},
|
|
144
|
+
opacity: {},
|
|
145
|
+
cursor: {},
|
|
146
|
+
minHeight1Px: { type: Boolean },
|
|
147
|
+
minHeight: {},
|
|
148
|
+
x: {},
|
|
149
|
+
y: {},
|
|
150
|
+
id: { type: Function },
|
|
151
|
+
xScale: { type: [Object, Function] },
|
|
152
|
+
yScale: { type: [Object, Function] },
|
|
153
|
+
excludeFromDomainCalculation: { type: Boolean },
|
|
154
|
+
duration: {},
|
|
155
|
+
events: {},
|
|
156
|
+
attributes: {},
|
|
157
|
+
data: {}
|
|
158
|
+
},
|
|
159
|
+
setup(y, { expose: i }) {
|
|
160
|
+
const t = W(ve), l = y, u = N(() => t.data.value ?? l.data), f = ge(l), c = q();
|
|
161
|
+
return Z(() => {
|
|
162
|
+
ee(() => {
|
|
163
|
+
var o;
|
|
164
|
+
c.value = new T(f.value), (o = c.value) == null || o.setData(u.value), t.update(c.value);
|
|
165
|
+
});
|
|
166
|
+
}), te(() => {
|
|
167
|
+
var o;
|
|
168
|
+
(o = c.value) == null || o.destroy(), t.destroy();
|
|
169
|
+
}), E(f, (o, w) => {
|
|
170
|
+
var r;
|
|
171
|
+
ke(o, w) || (r = c.value) == null || r.setConfig(f.value);
|
|
172
|
+
}), E(u, () => {
|
|
173
|
+
var o;
|
|
174
|
+
(o = c.value) == null || o.setData(u.value);
|
|
175
|
+
}), i({
|
|
176
|
+
component: c
|
|
177
|
+
}), (o, w) => (h(), S("div", Ee));
|
|
178
|
+
}
|
|
179
|
+
}), _e = {
|
|
180
|
+
width: "0",
|
|
181
|
+
height: "0"
|
|
182
|
+
}, ze = ["id"], Re = ["stop-color"], Ve = ["stop-color"], Ue = ["stop-color"], at = /* @__PURE__ */ U({
|
|
183
|
+
__name: "AreaChart",
|
|
184
|
+
props: {
|
|
185
|
+
data: {},
|
|
186
|
+
categories: {},
|
|
187
|
+
index: {},
|
|
188
|
+
colors: {},
|
|
189
|
+
margin: { default: () => ({ top: 0, bottom: 0, left: 0, right: 0 }) },
|
|
190
|
+
filterOpacity: { default: 0.2 },
|
|
191
|
+
xFormatter: {},
|
|
192
|
+
yFormatter: {},
|
|
193
|
+
showXAxis: { type: Boolean, default: !0 },
|
|
194
|
+
showYAxis: { type: Boolean, default: !0 },
|
|
195
|
+
showTooltip: { type: Boolean, default: !0 },
|
|
196
|
+
showLegend: { type: Boolean, default: !0 },
|
|
197
|
+
showGridLine: { type: Boolean, default: !0 },
|
|
198
|
+
customTooltip: {},
|
|
199
|
+
curveType: { default: K.MonotoneX },
|
|
200
|
+
showGradiant: { type: Boolean, default: !0 }
|
|
201
|
+
},
|
|
202
|
+
emits: ["legendItemClick"],
|
|
203
|
+
setup(y, { emit: i }) {
|
|
204
|
+
const t = y, l = i, u = Pe(), f = N(() => t.index), c = N(() => {
|
|
205
|
+
var n;
|
|
206
|
+
return (n = t.colors) != null && n.length ? t.colors : xe(t.categories.length);
|
|
207
|
+
}), o = q(t.categories.map((n, e) => ({
|
|
208
|
+
name: n,
|
|
209
|
+
color: c.value[e],
|
|
210
|
+
inactive: !1
|
|
211
|
+
}))), w = Ce();
|
|
212
|
+
function r(n, e) {
|
|
213
|
+
l("legendItemClick", n, e);
|
|
214
|
+
}
|
|
215
|
+
return (n, e) => (h(), S("div", {
|
|
216
|
+
class: ae(v(Se)("w-full h-[400px] flex flex-col items-end", n.$attrs.class ?? ""))
|
|
217
|
+
}, [
|
|
218
|
+
n.showLegend ? (h(), A(v(be), {
|
|
219
|
+
key: 0,
|
|
220
|
+
items: o.value,
|
|
221
|
+
"onUpdate:items": e[0] || (e[0] = (a) => o.value = a),
|
|
222
|
+
onLegendItemClick: r
|
|
223
|
+
}, null, 8, ["items"])) : B("", !0),
|
|
224
|
+
oe(v(Le), {
|
|
225
|
+
style: ne({ height: v(w) ? "100%" : "auto" }),
|
|
226
|
+
margin: { left: 20, right: 20 },
|
|
227
|
+
data: n.data
|
|
228
|
+
}, {
|
|
229
|
+
default: re(() => [
|
|
230
|
+
(h(), S("svg", _e, [
|
|
231
|
+
F("defs", null, [
|
|
232
|
+
(h(!0), S(G, null, H(c.value, (a, m) => (h(), S("linearGradient", {
|
|
233
|
+
id: `${v(u)}-color-${m}`,
|
|
234
|
+
key: m,
|
|
235
|
+
x1: "0",
|
|
236
|
+
y1: "0",
|
|
237
|
+
x2: "0",
|
|
238
|
+
y2: "1"
|
|
239
|
+
}, [
|
|
240
|
+
n.showGradiant ? (h(), S(G, { key: 0 }, [
|
|
241
|
+
F("stop", {
|
|
242
|
+
offset: "5%",
|
|
243
|
+
"stop-color": a,
|
|
244
|
+
"stop-opacity": "0.4"
|
|
245
|
+
}, null, 8, Re),
|
|
246
|
+
F("stop", {
|
|
247
|
+
offset: "95%",
|
|
248
|
+
"stop-color": a,
|
|
249
|
+
"stop-opacity": "0"
|
|
250
|
+
}, null, 8, Ve)
|
|
251
|
+
], 64)) : (h(), S("stop", {
|
|
252
|
+
key: 1,
|
|
253
|
+
offset: "0%",
|
|
254
|
+
"stop-color": a
|
|
255
|
+
}, null, 8, Ue))
|
|
256
|
+
], 8, ze))), 128))
|
|
257
|
+
])
|
|
258
|
+
])),
|
|
259
|
+
n.showTooltip ? (h(), A(v(we), {
|
|
260
|
+
key: 0,
|
|
261
|
+
colors: c.value,
|
|
262
|
+
items: o.value,
|
|
263
|
+
index: f.value,
|
|
264
|
+
"custom-tooltip": n.customTooltip
|
|
265
|
+
}, null, 8, ["colors", "items", "index", "custom-tooltip"])) : B("", !0),
|
|
266
|
+
(h(!0), S(G, null, H(n.categories, (a, m) => {
|
|
267
|
+
var g;
|
|
268
|
+
return h(), A(v(Ie), {
|
|
269
|
+
key: a,
|
|
270
|
+
x: (p, s) => s,
|
|
271
|
+
y: (p) => p[a],
|
|
272
|
+
color: "auto",
|
|
273
|
+
"curve-type": n.curveType,
|
|
274
|
+
attributes: {
|
|
275
|
+
[v(T).selectors.area]: {
|
|
276
|
+
fill: `url(#${v(u)}-color-${m})`
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
opacity: (g = o.value.find((p) => p.name === a)) != null && g.inactive ? n.filterOpacity : 1
|
|
280
|
+
}, null, 8, ["x", "y", "curve-type", "attributes", "opacity"]);
|
|
281
|
+
}), 128)),
|
|
282
|
+
(h(!0), S(G, null, H(n.categories, (a, m) => {
|
|
283
|
+
var g;
|
|
284
|
+
return h(), A(v(Ge), {
|
|
285
|
+
key: a,
|
|
286
|
+
x: (p, s) => s,
|
|
287
|
+
y: (p) => p[a],
|
|
288
|
+
color: c.value[m],
|
|
289
|
+
"curve-type": n.curveType,
|
|
290
|
+
attributes: {
|
|
291
|
+
[v(Me).selectors.line]: {
|
|
292
|
+
opacity: (g = o.value.find((p) => p.name === a)) != null && g.inactive ? n.filterOpacity : 1
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}, null, 8, ["x", "y", "color", "curve-type", "attributes"]);
|
|
296
|
+
}), 128)),
|
|
297
|
+
n.showXAxis ? (h(), A(v(V), {
|
|
298
|
+
key: 1,
|
|
299
|
+
type: "x",
|
|
300
|
+
"tick-format": n.xFormatter ?? ((a) => {
|
|
301
|
+
var m;
|
|
302
|
+
return (m = n.data[a]) == null ? void 0 : m[f.value];
|
|
303
|
+
}),
|
|
304
|
+
"grid-line": !1,
|
|
305
|
+
"tick-line": !1,
|
|
306
|
+
"tick-text-color": "hsl(var(--vis-text-color))"
|
|
307
|
+
}, null, 8, ["tick-format"])) : B("", !0),
|
|
308
|
+
n.showYAxis ? (h(), A(v(V), {
|
|
309
|
+
key: 2,
|
|
310
|
+
type: "y",
|
|
311
|
+
"tick-line": !1,
|
|
312
|
+
"tick-format": n.yFormatter,
|
|
313
|
+
"domain-line": !1,
|
|
314
|
+
"grid-line": n.showGridLine,
|
|
315
|
+
attributes: {
|
|
316
|
+
[v(Oe).selectors.grid]: {
|
|
317
|
+
class: "text-muted"
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
"tick-text-color": "hsl(var(--vis-text-color))"
|
|
321
|
+
}, null, 8, ["tick-format", "grid-line", "attributes"])) : B("", !0),
|
|
322
|
+
se(n.$slots, "default")
|
|
323
|
+
]),
|
|
324
|
+
_: 3
|
|
325
|
+
}, 8, ["style", "data"])
|
|
326
|
+
], 2));
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
export {
|
|
330
|
+
at as AreaChart
|
|
331
|
+
};
|