@pantograph/vue 0.8.3 → 0.10.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/dist/ActionButton/index.js.js +1 -1
- package/dist/ActionButton/index.umd.cjs.js +1 -1
- package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-IN_Iar0s.js → ActionButton.vue_vue_type_script_setup_true_lang-ClxZJxTh.js} +2 -2
- package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-2X340gYi.js → ActionButton.vue_vue_type_script_setup_true_lang-Db3ryil1.js} +1 -1
- package/dist/Avatar/Avatar.d.ts +1 -1
- package/dist/Avatar/Avatar.model.d.ts +1 -1
- package/dist/Avatar/index.js.js +1 -1
- package/dist/Avatar/index.umd.cjs.js +1 -1
- package/dist/{Avatar.vue_vue_type_style_index_0_lang-BVysdOnq.js → Avatar.vue_vue_type_style_index_0_lang-B538jct0.js} +5 -5
- package/dist/Avatar.vue_vue_type_style_index_0_lang-BSi0qbuq.js +1 -0
- package/dist/AvatarGroup/index.js.js +1 -1
- package/dist/AvatarGroup/index.umd.cjs.js +1 -1
- package/dist/Badge/index.js.js +1 -1
- package/dist/Badge/index.umd.cjs.js +1 -1
- package/dist/{Badge.vue_vue_type_script_setup_true_lang-D7hKm2YM.js → Badge.vue_vue_type_script_setup_true_lang-CKxCSXXL.js} +1 -1
- package/dist/{Badge.vue_vue_type_script_setup_true_lang-CIkF44xM.js → Badge.vue_vue_type_script_setup_true_lang-CfA3dSJr.js} +5 -5
- package/dist/{BaseBadge.vue_vue_type_style_index_0_lang-Bm8mav0C.js → BaseBadge.vue_vue_type_style_index_0_lang-MM6bsdzR.js} +4 -4
- package/dist/{BaseButton.vue_vue_type_style_index_0_lang-CfBRZCKS.js → BaseButton.vue_vue_type_style_index_0_lang-gzePKYHN.js} +1 -1
- package/dist/{BaseButton.vue_vue_type_style_index_0_lang-5rSLcXNk.js → BaseButton.vue_vue_type_style_index_0_lang-s4G57j5o.js} +1 -1
- package/dist/Button/index.js.js +1 -1
- package/dist/Button/index.umd.cjs.js +1 -1
- package/dist/{Button.vue_vue_type_script_setup_true_lang-Pghn6KJY.js → Button.vue_vue_type_script_setup_true_lang-B8DWC8Du.js} +2 -2
- package/dist/{Button.vue_vue_type_script_setup_true_lang-687jBefr.js → Button.vue_vue_type_script_setup_true_lang-BVCP3jP3.js} +1 -1
- package/dist/Checkbox/index.js.js +1 -1
- package/dist/Checkbox/index.umd.cjs.js +1 -1
- package/dist/{Checkbox.vue_vue_type_style_index_0_lang-Bvk3KN2L.js → Checkbox.vue_vue_type_style_index_0_lang-Bm6sm_wm.js} +1 -1
- package/dist/{Checkbox.vue_vue_type_style_index_0_lang-DPxsdfde.js → Checkbox.vue_vue_type_style_index_0_lang-maH6mbC5.js} +2 -2
- package/dist/CheckboxGroup/index.js.js +1 -1
- package/dist/CheckboxGroup/index.umd.cjs.js +1 -1
- package/dist/ColorPicker/ColorPicker.d.ts +37 -0
- package/dist/ColorPicker/ColorPickerSpace.d.ts +2 -0
- package/dist/ColorPicker/index.d.ts +1 -0
- package/dist/ColorPicker/index.js.js +7 -0
- package/dist/ColorPicker/index.umd.cjs.js +1 -0
- package/dist/ColorPicker/types.d.ts +60 -0
- package/dist/ColorPicker/utilities/CssValues.d.ts +48 -0
- package/dist/ColorPicker/utilities/clamp.d.ts +8 -0
- package/dist/ColorPicker/utilities/colorConversions/convertHexToRgb.d.ts +7 -0
- package/dist/ColorPicker/utilities/colorConversions/convertHslToHsv.d.ts +7 -0
- package/dist/ColorPicker/utilities/colorConversions/convertHslToRgb.d.ts +7 -0
- package/dist/ColorPicker/utilities/colorConversions/convertHsvToHsl.d.ts +7 -0
- package/dist/ColorPicker/utilities/colorConversions/convertHsvToHwb.d.ts +5 -0
- package/dist/ColorPicker/utilities/colorConversions/convertHsvToRgb.d.ts +7 -0
- package/dist/ColorPicker/utilities/colorConversions/convertHwbToHsv.d.ts +7 -0
- package/dist/ColorPicker/utilities/colorConversions/convertRgbToHex.d.ts +5 -0
- package/dist/ColorPicker/utilities/colorConversions/convertRgbToHsl.d.ts +7 -0
- package/dist/ColorPicker/utilities/colorConversions/convertRgbToHwb.d.ts +5 -0
- package/dist/ColorPicker/utilities/colorsAreValueEqual.d.ts +4 -0
- package/dist/ColorPicker/utilities/convert.d.ts +2 -0
- package/dist/ColorPicker/utilities/detectFormat.d.ts +7 -0
- package/dist/ColorPicker/utilities/eyeDropper.d.ts +17 -0
- package/dist/ColorPicker/utilities/formatAsCssColor.d.ts +5 -0
- package/dist/ColorPicker/utilities/getNewThumbPosition.d.ts +4 -0
- package/dist/ColorPicker/utilities/isValidHexColor.d.ts +4 -0
- package/dist/ColorPicker/utilities/parsePropsColor.d.ts +7 -0
- package/dist/ColorPicker/utilities/round.d.ts +6 -0
- package/dist/ColorPicker.vue_vue_type_style_index_0_lang-CROQzfNe.js +944 -0
- package/dist/ColorPicker.vue_vue_type_style_index_0_lang-IZSWne-0.js +1 -0
- package/dist/ColorSwatch/ColorSwatch.d.ts +27 -0
- package/dist/ColorSwatch/index.d.ts +2 -0
- package/dist/ColorSwatch/index.js.js +7 -0
- package/dist/ColorSwatch/index.umd.cjs.js +1 -0
- package/dist/ColorSwatch.vue_vue_type_style_index_0_lang-Bf0glWPU.js +102 -0
- package/dist/ColorSwatch.vue_vue_type_style_index_0_lang-Dki5150Z.js +1 -0
- package/dist/ColorSwatchGroup/ColorSwatchGroup.d.ts +60 -0
- package/dist/ColorSwatchGroup/index.d.ts +1 -0
- package/dist/ColorSwatchGroup/index.js.js +165 -0
- package/dist/ColorSwatchGroup/index.umd.cjs.js +1 -0
- package/dist/ColorTrigger/ColorTrigger.d.ts +22 -0
- package/dist/ColorTrigger/index.d.ts +2 -0
- package/dist/ColorTrigger/index.js.js +92 -0
- package/dist/ColorTrigger/index.umd.cjs.js +1 -0
- package/dist/ConfigProvider/index.js.js +119 -9
- package/dist/ConfigProvider/index.umd.cjs.js +1 -1
- package/dist/FloatButton/index.js.js +1 -1
- package/dist/FloatButton/index.umd.cjs.js +1 -1
- package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-CQIk1UgJ.js → FloatButton.vue_vue_type_script_setup_true_lang-DARsq4US.js} +1 -1
- package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-DNeMMm9j.js → FloatButton.vue_vue_type_script_setup_true_lang-iElZdgSE.js} +2 -2
- package/dist/GraphicalObject/index.js.js +1 -1
- package/dist/GraphicalObject/index.umd.cjs.js +1 -1
- package/dist/{GraphicalObject.vue_vue_type_script_setup_true_lang-8ZXdETpQ.js → GraphicalObject.vue_vue_type_script_setup_true_lang-Bouixpu2.js} +1 -1
- package/dist/{GraphicalObject.vue_vue_type_script_setup_true_lang-C2MQwiwk.js → GraphicalObject.vue_vue_type_script_setup_true_lang-Cc4PxUnd.js} +11 -11
- package/dist/IconButton/index.js.js +1 -1
- package/dist/IconButton/index.umd.cjs.js +1 -1
- package/dist/{IconButton.vue_vue_type_script_setup_true_lang-BMbK9bu3.js → IconButton.vue_vue_type_script_setup_true_lang-CufKPHFD.js} +1 -1
- package/dist/{IconButton.vue_vue_type_script_setup_true_lang-BNuSFI1j.js → IconButton.vue_vue_type_script_setup_true_lang-D1nK8pEU.js} +2 -2
- package/dist/IndentLevel/index.js.js +1 -1
- package/dist/IndentLevel/index.umd.cjs.js +1 -1
- package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-C0p5Alem.js → IndentLevel.vue_vue_type_style_index_0_lang-C9mNx1Zx.js} +1 -1
- package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-Bs9k7yZP.js → IndentLevel.vue_vue_type_style_index_0_lang-CKJpRLV6.js} +1 -1
- package/dist/Indicator/index.js.js +1 -1
- package/dist/Indicator/index.umd.cjs.js +1 -1
- package/dist/{Indicator.vue_vue_type_script_setup_true_lang-CHuo9sYF.js → Indicator.vue_vue_type_script_setup_true_lang-DURlzRTQ.js} +2 -2
- package/dist/{Indicator.vue_vue_type_script_setup_true_lang-DzKJMO-h.js → Indicator.vue_vue_type_script_setup_true_lang-DpPAMjWw.js} +1 -1
- package/dist/Input/Input.d.ts +67 -0
- package/dist/Input/Input.model.d.ts +4 -0
- package/dist/Menu/index.js.js +1 -1
- package/dist/Menu/index.umd.cjs.js +1 -1
- package/dist/Menu.vue_vue_type_style_index_0_lang-Danl_w4K.js +480 -0
- package/dist/Menu.vue_vue_type_style_index_0_lang-eKNVzfnz.js +1 -0
- package/dist/MenuItem/index.js.js +1 -1
- package/dist/MenuItem/index.umd.cjs.js +1 -1
- package/dist/Popover/index.js.js +1 -1
- package/dist/Popover/index.umd.cjs.js +1 -1
- package/dist/{Popover.vue_vue_type_style_index_0_lang-MJjv8Cvt.js → Popover.vue_vue_type_style_index_0_lang-DkM_Ynrg.js} +3 -3
- package/dist/Popover.vue_vue_type_style_index_0_lang-pSXmj4z1.js +1 -0
- package/dist/Primitive-BT1RjuGS.js +1 -0
- package/dist/Primitive-nOVjbfuc.js +47 -0
- package/dist/RadioGroup/index.js.js +1 -1
- package/dist/RadioGroup/index.umd.cjs.js +1 -1
- package/dist/{RadioGroup.vue_vue_type_script_setup_true_lang-c3UZIDsE.js → RadioGroup.vue_vue_type_script_setup_true_lang-8BgnVYlc.js} +1 -1
- package/dist/{RadioGroup.vue_vue_type_script_setup_true_lang-DWC7_LXA.js → RadioGroup.vue_vue_type_script_setup_true_lang-NNLg5ogX.js} +1 -1
- package/dist/Switch/index.js.js +1 -1
- package/dist/Switch/index.umd.cjs.js +1 -1
- package/dist/{Switch.vue_vue_type_style_index_0_lang-LcwRXYSm.js → Switch.vue_vue_type_style_index_0_lang-B9_IPFyg.js} +1 -1
- package/dist/{Switch.vue_vue_type_style_index_0_lang-B4DpjGcF.js → Switch.vue_vue_type_style_index_0_lang-_FIrRkI7.js} +1 -1
- package/dist/Tree/index.js.js +1 -1
- package/dist/Tree/index.umd.cjs.js +1 -1
- package/dist/Tree.vue_vue_type_style_index_0_lang-B3ZzwkLN.js +1 -0
- package/dist/Tree.vue_vue_type_style_index_0_lang-D9GBs86I.js +547 -0
- package/dist/{cloneDeep-DIRSbAoF.js → cloneDeep-7ho7cOLj.js} +1 -1
- package/dist/cloneDeep-C6tiVz1k.js +1 -0
- package/dist/get-BULsy4gy.js +1 -0
- package/dist/get-CdoyK4GU.js +34 -0
- package/dist/index.js.js +124 -105
- package/dist/index.umd.cjs.js +1 -1
- package/dist/isString-BVAZt9W3.js +9 -0
- package/dist/isString-CKmTJsel.js +1 -0
- package/dist/{omit-wqhC12f_.js → omit-BHZMfUBv.js} +34 -25
- package/dist/omit-DlH5U9Jc.js +1 -0
- package/dist/{pick-DYQvkbv7.js → pick-BHVX8oMF.js} +3 -1
- package/dist/pick-DpwC5mlg.js +1 -0
- package/dist/style/index.css +1 -1
- package/dist/types/index.d.ts +1 -0
- package/package.json +21 -1
- package/dist/Avatar.vue_vue_type_style_index_0_lang-BiEWBKYn.js +0 -1
- package/dist/Menu.vue_vue_type_style_index_0_lang-C_lbO09l.js +0 -1
- package/dist/Menu.vue_vue_type_style_index_0_lang-oedL61ps.js +0 -521
- package/dist/Popover.vue_vue_type_style_index_0_lang-TwQPMDMD.js +0 -1
- package/dist/Tree.vue_vue_type_style_index_0_lang-D2iXdFbM.js +0 -1
- package/dist/Tree.vue_vue_type_style_index_0_lang-D9EB0NE_.js +0 -573
- package/dist/cloneDeep-DgcRQUzH.js +0 -1
- package/dist/index-CRYvpN0O.js +0 -126
- package/dist/index-JUGW3BX8.js +0 -1
- package/dist/omit-CMPOmOGF.js +0 -1
- package/dist/pick-CQkYSNzp.js +0 -1
|
@@ -1,573 +0,0 @@
|
|
|
1
|
-
import { defineComponent as xe, useSlots as Ce, computed as u, inject as Be, ref as b, watch as Y, provide as Ee, resolveComponent as Fe, createBlock as Q, openBlock as N, unref as c, normalizeClass as P, withCtx as W, createElementVNode as me, withDirectives as Le, createCommentVNode as ne, createElementBlock as G, createVNode as Te, renderSlot as X, normalizeProps as ue, guardReactiveProps as ve, withModifiers as ye, Fragment as fe, toDisplayString as $e, renderList as ae, createSlots as Ne, mergeProps as Se, vShow as Ae, normalizeStyle as Re, onMounted as Pe, onBeforeUnmount as Me } from "vue";
|
|
2
|
-
import { a as M, b as O, g as Oe, c as Ue } from "./class-DziTeW9B.js";
|
|
3
|
-
import { cva as we } from "class-variance-authority";
|
|
4
|
-
import { c as L } from "./cloneDeep-DIRSbAoF.js";
|
|
5
|
-
import { createContext as Ge, Primitive as He, useId as Ve } from "radix-vue";
|
|
6
|
-
import { M as je, S as ge, e as qe, q as Ye } from "./omit-wqhC12f_.js";
|
|
7
|
-
import Ze from "sortablejs";
|
|
8
|
-
import { g as Ke } from "./options-JBqnVZUl.js";
|
|
9
|
-
import { _ as Je } from "./IndentLevel.vue_vue_type_style_index_0_lang-Bs9k7yZP.js";
|
|
10
|
-
import { _ as Qe } from "./Icon.vue_vue_type_style_index_0_lang-BfPcw6PU.js";
|
|
11
|
-
import { _ as We } from "./Checkbox.vue_vue_type_style_index_0_lang-DPxsdfde.js";
|
|
12
|
-
var Xe = "__lodash_hash_undefined__";
|
|
13
|
-
function De(s) {
|
|
14
|
-
return this.__data__.set(s, Xe), this;
|
|
15
|
-
}
|
|
16
|
-
function et(s) {
|
|
17
|
-
return this.__data__.has(s);
|
|
18
|
-
}
|
|
19
|
-
function se(s) {
|
|
20
|
-
var l = -1, t = s == null ? 0 : s.length;
|
|
21
|
-
for (this.__data__ = new je(); ++l < t; )
|
|
22
|
-
this.add(s[l]);
|
|
23
|
-
}
|
|
24
|
-
se.prototype.add = se.prototype.push = De;
|
|
25
|
-
se.prototype.has = et;
|
|
26
|
-
function tt(s, l, t, e) {
|
|
27
|
-
for (var w = s.length, v = t + -1; ++v < w; )
|
|
28
|
-
if (l(s[v], v, s))
|
|
29
|
-
return v;
|
|
30
|
-
return -1;
|
|
31
|
-
}
|
|
32
|
-
function nt(s) {
|
|
33
|
-
return s !== s;
|
|
34
|
-
}
|
|
35
|
-
function at(s, l, t) {
|
|
36
|
-
for (var e = t - 1, w = s.length; ++e < w; )
|
|
37
|
-
if (s[e] === l)
|
|
38
|
-
return e;
|
|
39
|
-
return -1;
|
|
40
|
-
}
|
|
41
|
-
function st(s, l, t) {
|
|
42
|
-
return l === l ? at(s, l, t) : tt(s, nt, t);
|
|
43
|
-
}
|
|
44
|
-
function lt(s, l) {
|
|
45
|
-
var t = s == null ? 0 : s.length;
|
|
46
|
-
return !!t && st(s, l, 0) > -1;
|
|
47
|
-
}
|
|
48
|
-
function ot(s, l) {
|
|
49
|
-
return s.has(l);
|
|
50
|
-
}
|
|
51
|
-
function rt() {
|
|
52
|
-
}
|
|
53
|
-
function _e(s) {
|
|
54
|
-
var l = -1, t = Array(s.size);
|
|
55
|
-
return s.forEach(function(e) {
|
|
56
|
-
t[++l] = e;
|
|
57
|
-
}), t;
|
|
58
|
-
}
|
|
59
|
-
var it = 1 / 0, dt = ge && 1 / _e(new ge([, -0]))[1] == it ? function(s) {
|
|
60
|
-
return new ge(s);
|
|
61
|
-
} : rt, ct = 200;
|
|
62
|
-
function ut(s, l, t) {
|
|
63
|
-
var e = -1, w = lt, v = s.length, T = !0, p = [], h = p;
|
|
64
|
-
if (v >= ct) {
|
|
65
|
-
var K = dt(s);
|
|
66
|
-
if (K)
|
|
67
|
-
return _e(K);
|
|
68
|
-
T = !1, w = ot, h = new se();
|
|
69
|
-
} else
|
|
70
|
-
h = p;
|
|
71
|
-
e:
|
|
72
|
-
for (; ++e < v; ) {
|
|
73
|
-
var _ = s[e], x = _;
|
|
74
|
-
if (_ = _ !== 0 ? _ : 0, T && x === x) {
|
|
75
|
-
for (var C = h.length; C--; )
|
|
76
|
-
if (h[C] === x)
|
|
77
|
-
continue e;
|
|
78
|
-
p.push(_);
|
|
79
|
-
} else w(h, x, t) || (h !== p && h.push(x), p.push(_));
|
|
80
|
-
}
|
|
81
|
-
return p;
|
|
82
|
-
}
|
|
83
|
-
function vt(s) {
|
|
84
|
-
return s && s.length ? ut(s) : [];
|
|
85
|
-
}
|
|
86
|
-
function ke(s, l, t) {
|
|
87
|
-
var e = s == null ? void 0 : qe(s, l);
|
|
88
|
-
return e === void 0 ? t : e;
|
|
89
|
-
}
|
|
90
|
-
const gt = ["sm", "md", "lg"], be = { none: "gap-none", sm: "gap-sm", md: "gap-md", lg: "gap-lg" }, [ft, pt] = Ge("CheckboxGroup"), ht = ["tabindex"], mt = ["data-parents", "data-level"], yt = /* @__PURE__ */ xe({
|
|
91
|
-
...Ke("TreeNode"),
|
|
92
|
-
__name: "TreeNode",
|
|
93
|
-
props: {
|
|
94
|
-
item: {},
|
|
95
|
-
level: { default: 1 },
|
|
96
|
-
hovered: { type: Boolean },
|
|
97
|
-
parentKeys: {}
|
|
98
|
-
},
|
|
99
|
-
setup(s) {
|
|
100
|
-
const l = s, t = Ce(), e = ft(), w = we(e.prefixes.node, {
|
|
101
|
-
variants: {
|
|
102
|
-
disabled: M("disabled", e.prefixes.node),
|
|
103
|
-
active: M("active", e.prefixes.node)
|
|
104
|
-
}
|
|
105
|
-
}), v = u(() => {
|
|
106
|
-
switch (e.size.value) {
|
|
107
|
-
case "sm":
|
|
108
|
-
return "2xsm";
|
|
109
|
-
case "md":
|
|
110
|
-
case "lg":
|
|
111
|
-
return "xsm";
|
|
112
|
-
}
|
|
113
|
-
}), T = u(() => {
|
|
114
|
-
switch (e.size.value) {
|
|
115
|
-
case "sm":
|
|
116
|
-
return "2xsm";
|
|
117
|
-
default:
|
|
118
|
-
return "xsm";
|
|
119
|
-
}
|
|
120
|
-
}), p = (o) => e.getNodeField(o, "children"), h = (o) => e.getNodeField(o, "key"), K = u(() => p(l.item)), _ = u(() => e.getNodeField(l.item, "leaf")), x = u(() => e.draggable.value ? e.getNodeField(l.item, "draggable") ?? !0 : !1), C = u(() => h(l.item)), S = u(
|
|
121
|
-
() => !!(e.disabled.value || e.getNodeField(l.item, "disabled"))
|
|
122
|
-
), $ = u(
|
|
123
|
-
() => {
|
|
124
|
-
var o;
|
|
125
|
-
return !!((o = K.value) != null && o.some((a) => e.expandedKeys.value.includes(h(a))));
|
|
126
|
-
}
|
|
127
|
-
), m = Be("tree-node-context", {
|
|
128
|
-
hovered: b(l.hovered ?? !1),
|
|
129
|
-
expanded: b(!1),
|
|
130
|
-
childExpanded: $
|
|
131
|
-
}), B = u(
|
|
132
|
-
() => !(l.item.dragging ?? !1) && e.expandedKeys.value.includes(C.value)
|
|
133
|
-
), z = b(!1), A = (o) => {
|
|
134
|
-
z.value = o;
|
|
135
|
-
};
|
|
136
|
-
Y(z, (o) => {
|
|
137
|
-
e.showLine.value && m.hovered && (m.hovered.value = o);
|
|
138
|
-
}), Ee("tree-node-context", {
|
|
139
|
-
expanded: B,
|
|
140
|
-
childExpanded: $,
|
|
141
|
-
hovered: z
|
|
142
|
-
});
|
|
143
|
-
const Z = u(() => {
|
|
144
|
-
var o, a, n;
|
|
145
|
-
if (e.dragging.value) return !1;
|
|
146
|
-
if (e.showLine.value) {
|
|
147
|
-
if (l.hovered || (o = m.hovered) != null && o.value || z.value) return "all";
|
|
148
|
-
if (B.value && !$.value) return "self";
|
|
149
|
-
if ((a = m.expanded) != null && a.value && !((n = m.childExpanded) != null && n.value)) return "last";
|
|
150
|
-
}
|
|
151
|
-
}), I = u(() => {
|
|
152
|
-
var o;
|
|
153
|
-
return !((o = K.value) != null && o.length);
|
|
154
|
-
}), le = () => {
|
|
155
|
-
S.value || e.onSelect(l.item);
|
|
156
|
-
}, R = u(() => !!e.model.value.includes(C.value)), k = u(() => {
|
|
157
|
-
const o = (i = l.item) => {
|
|
158
|
-
const d = p(i);
|
|
159
|
-
return (d == null ? void 0 : d.length) && d.every((g) => e.checked.value.includes(h(g)));
|
|
160
|
-
}, a = (i = l.item) => {
|
|
161
|
-
const d = p(i);
|
|
162
|
-
return d != null && d.length ? !!(d != null && d.some(
|
|
163
|
-
(g) => e.checked.value.includes(h(g)) || a(g)
|
|
164
|
-
)) : !1;
|
|
165
|
-
}, n = e.checked.value.includes(C.value);
|
|
166
|
-
return o() ? (n || e.onCheck(l.item), !0) : a() ? (n && e.onCheck(l.item), "indeterminate") : !!n;
|
|
167
|
-
}), oe = () => {
|
|
168
|
-
var n;
|
|
169
|
-
if (!((n = K.value) != null && n.length)) return e.onCheck(l.item);
|
|
170
|
-
const o = (r = l.item) => {
|
|
171
|
-
const i = p(r);
|
|
172
|
-
return i != null && i.length ? i.reduce((d, g) => {
|
|
173
|
-
const E = p(g), j = h(g);
|
|
174
|
-
return E != null && E.length ? [...d, j, ...o(g)] : [...d, j];
|
|
175
|
-
}, []) : [];
|
|
176
|
-
}, a = o();
|
|
177
|
-
return e.onCheck(l.item, {
|
|
178
|
-
keys: [C.value, ...a],
|
|
179
|
-
value: !e.checked.value.includes(C.value)
|
|
180
|
-
});
|
|
181
|
-
}, D = u(() => [...l.parentKeys ?? [], C.value]), re = () => {
|
|
182
|
-
e.onExpandKey(l.item);
|
|
183
|
-
}, H = u(() => l.item.dragging_level ?? l.level), V = u(() => H.value + 1), U = b(), ee = b();
|
|
184
|
-
e.useSortable({
|
|
185
|
-
root: U,
|
|
186
|
-
instance: ee,
|
|
187
|
-
node: l.item
|
|
188
|
-
});
|
|
189
|
-
const ie = u(() => {
|
|
190
|
-
switch (e.size.value) {
|
|
191
|
-
case "sm":
|
|
192
|
-
return "2xsm";
|
|
193
|
-
case "md":
|
|
194
|
-
return "xsm";
|
|
195
|
-
case "lg":
|
|
196
|
-
return "sm";
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
return (o, a) => {
|
|
200
|
-
const n = Fe("TreeNode", !0);
|
|
201
|
-
return N(), Q(c(He), {
|
|
202
|
-
asChild: I.value,
|
|
203
|
-
key: I.value,
|
|
204
|
-
"data-parents": c(e).draggable.value ? o.parentKeys : void 0,
|
|
205
|
-
"data-key": c(e).draggable.value ? C.value : void 0,
|
|
206
|
-
"data-draggable": c(e).draggable.value ? !S.value && x.value : void 0,
|
|
207
|
-
class: P([{ [c(e).prefixes.group]: !I.value }, c(e).getNodeField(o.item, "class")])
|
|
208
|
-
}, {
|
|
209
|
-
default: W(() => {
|
|
210
|
-
var r, i;
|
|
211
|
-
return [
|
|
212
|
-
me("div", {
|
|
213
|
-
tabindex: S.value ? void 0 : 0,
|
|
214
|
-
class: P([
|
|
215
|
-
c(w)({
|
|
216
|
-
disabled: S.value,
|
|
217
|
-
active: R.value
|
|
218
|
-
}),
|
|
219
|
-
c(e).getNodeField(o.item, "class")
|
|
220
|
-
]),
|
|
221
|
-
onMouseenter: a[1] || (a[1] = (d) => A(!0)),
|
|
222
|
-
onMouseleave: a[2] || (a[2] = (d) => A(!1)),
|
|
223
|
-
onClick: le
|
|
224
|
-
}, [
|
|
225
|
-
c(e).draggable.value ? (N(), G("span", {
|
|
226
|
-
key: 0,
|
|
227
|
-
class: P(c(e).prefixes.draggable)
|
|
228
|
-
}, [
|
|
229
|
-
!o.item.dragging && !c(e).dragging.value ? (N(), Q(Qe, {
|
|
230
|
-
key: 0,
|
|
231
|
-
icon: "tabler:grip-vertical",
|
|
232
|
-
size: T.value,
|
|
233
|
-
class: P(c(e).prefixes.draggableIcon)
|
|
234
|
-
}, {
|
|
235
|
-
default: W(() => [
|
|
236
|
-
X(o.$slots, "dragTrigger", ue(ve({ ...o.item, selected: R.value, checked: k.value, disabled: S.value, unFocusable: !0 })))
|
|
237
|
-
]),
|
|
238
|
-
_: 3
|
|
239
|
-
}, 8, ["size", "class"])) : ne("", !0)
|
|
240
|
-
], 2)) : ne("", !0),
|
|
241
|
-
Te(Je, {
|
|
242
|
-
level: H.value,
|
|
243
|
-
children: !!((r = K.value) != null && r.length || c(e).lazyLoad.value && !_.value),
|
|
244
|
-
size: ie.value,
|
|
245
|
-
expanded: B.value,
|
|
246
|
-
showLine: Z.value,
|
|
247
|
-
loading: c(e).getNodeField(o.item, "loading"),
|
|
248
|
-
"branch-icon": c(e).getNodeField(o.item, "switcherIcon") ?? c(e).switcherIcon.value,
|
|
249
|
-
"no-rotate-branch": c(e).getNodeField(o.item, "noRotateSwitcherIcon") ?? c(e).noRotateSwitcherIcon.value,
|
|
250
|
-
onToggleExpand: ye(re, ["stop"])
|
|
251
|
-
}, {
|
|
252
|
-
default: W(() => [
|
|
253
|
-
X(o.$slots, "switcherIcon", ue(ve({ ...o.item, selected: R.value, checked: k.value, expanded: B.value, disabled: S.value, unFocusable: !0 })))
|
|
254
|
-
]),
|
|
255
|
-
_: 3
|
|
256
|
-
}, 8, ["level", "children", "size", "expanded", "showLine", "loading", "branch-icon", "no-rotate-branch"]),
|
|
257
|
-
!o.item.dragging || !c(e).dragging.value ? (N(), G(fe, { key: 1 }, [
|
|
258
|
-
c(e).checkbox.value ? (N(), Q(We, {
|
|
259
|
-
key: 0,
|
|
260
|
-
size: v.value,
|
|
261
|
-
onClick: a[0] || (a[0] = ye(() => {
|
|
262
|
-
}, ["stop"])),
|
|
263
|
-
checked: k.value,
|
|
264
|
-
"onUpdate:checked": oe,
|
|
265
|
-
disabled: S.value
|
|
266
|
-
}, null, 8, ["size", "checked", "disabled"])) : ne("", !0),
|
|
267
|
-
X(o.$slots, "title", ue(ve({ ...o.item, selected: R.value, checked: k.value, disabled: S.value, unFocusable: !0 })), () => [
|
|
268
|
-
me("div", {
|
|
269
|
-
class: P(c(O)(c(e).prefixes.node, "title"))
|
|
270
|
-
}, $e(c(e).getNodeField(o.item, "title")), 3)
|
|
271
|
-
])
|
|
272
|
-
], 64)) : (N(), G("div", {
|
|
273
|
-
key: 2,
|
|
274
|
-
class: P(c(O)(c(e).prefixes.node, "slot"))
|
|
275
|
-
}, null, 2))
|
|
276
|
-
], 42, ht),
|
|
277
|
-
(i = K.value) != null && i.length ? Le((N(), G("div", {
|
|
278
|
-
key: 0,
|
|
279
|
-
class: P(c(e).prefixes.groupList),
|
|
280
|
-
ref_key: "root",
|
|
281
|
-
ref: U,
|
|
282
|
-
"data-parents": c(e).draggable.value ? D.value : void 0,
|
|
283
|
-
"data-level": c(e).draggable.value ? V.value : void 0
|
|
284
|
-
}, [
|
|
285
|
-
(N(!0), G(fe, null, ae(p(o.item), (d) => {
|
|
286
|
-
var g;
|
|
287
|
-
return N(), Q(n, {
|
|
288
|
-
key: c(e).getNodeField(d, "key"),
|
|
289
|
-
parentKeys: D.value,
|
|
290
|
-
item: d,
|
|
291
|
-
level: V.value,
|
|
292
|
-
hovered: l.hovered || z.value || ((g = c(m).hovered) == null ? void 0 : g.value)
|
|
293
|
-
}, Ne({ _: 2 }, [
|
|
294
|
-
ae(Object.keys(t), (E) => ({
|
|
295
|
-
name: E,
|
|
296
|
-
fn: W((j) => [
|
|
297
|
-
X(o.$slots, E, Se({ ref_for: !0 }, j))
|
|
298
|
-
])
|
|
299
|
-
}))
|
|
300
|
-
]), 1032, ["parentKeys", "item", "level", "hovered"]);
|
|
301
|
-
}), 128))
|
|
302
|
-
], 10, mt)), [
|
|
303
|
-
[Ae, B.value]
|
|
304
|
-
]) : ne("", !0)
|
|
305
|
-
];
|
|
306
|
-
}),
|
|
307
|
-
_: 3
|
|
308
|
-
}, 8, ["asChild", "data-parents", "data-key", "data-draggable", "class"]);
|
|
309
|
-
};
|
|
310
|
-
}
|
|
311
|
-
}), Bt = /* @__PURE__ */ xe({
|
|
312
|
-
...Ke("Tree"),
|
|
313
|
-
__name: "Tree",
|
|
314
|
-
props: {
|
|
315
|
-
class: {},
|
|
316
|
-
size: { default: "md" },
|
|
317
|
-
gap: {},
|
|
318
|
-
data: {},
|
|
319
|
-
value: {},
|
|
320
|
-
checkedKeys: {},
|
|
321
|
-
expandedKeys: {},
|
|
322
|
-
multiple: { type: Boolean },
|
|
323
|
-
checkbox: { type: Boolean },
|
|
324
|
-
defaultExpandAll: { type: Boolean },
|
|
325
|
-
selectable: { type: Boolean },
|
|
326
|
-
showLine: { type: Boolean },
|
|
327
|
-
inlineNode: { type: Boolean },
|
|
328
|
-
lazyLoad: { type: Boolean },
|
|
329
|
-
fieldNames: {},
|
|
330
|
-
groupName: {},
|
|
331
|
-
switcherIcon: {},
|
|
332
|
-
noRotateSwitcherIcon: { type: Boolean },
|
|
333
|
-
draggable: { type: Boolean },
|
|
334
|
-
disabled: { type: Boolean }
|
|
335
|
-
},
|
|
336
|
-
emits: ["update:value", "update:expandedKeys", "update:checkedKeys", "expand", "select", "check", "dragStart", "dragEnd"],
|
|
337
|
-
setup(s, { emit: l }) {
|
|
338
|
-
const t = s, e = l, w = Ce(), v = Oe("tree"), T = O(v, "node"), p = O(T, "group"), h = O(T, "draggable"), K = O(h, "icon"), _ = O(p, "list"), x = {
|
|
339
|
-
node: T,
|
|
340
|
-
group: p,
|
|
341
|
-
draggable: h,
|
|
342
|
-
draggableIcon: K,
|
|
343
|
-
groupList: _
|
|
344
|
-
}, C = we(v, {
|
|
345
|
-
variants: {
|
|
346
|
-
size: M(gt, v),
|
|
347
|
-
gap: M(be, v),
|
|
348
|
-
selectable: M("selectable", v),
|
|
349
|
-
disabled: M("disabled", v),
|
|
350
|
-
inlineNode: M("inline-node", v),
|
|
351
|
-
dragging: M("dragging", v)
|
|
352
|
-
}
|
|
353
|
-
}), S = u(() => L(t.data)), $ = b(S.value), m = (a, n) => {
|
|
354
|
-
var i;
|
|
355
|
-
const r = ke(a, n);
|
|
356
|
-
return (i = t.fieldNames) != null && i[n] ? ke(a, t.fieldNames[n], r) : r;
|
|
357
|
-
}, B = () => {
|
|
358
|
-
if (!t.lazyLoad) {
|
|
359
|
-
const a = [], n = (r) => {
|
|
360
|
-
for (const i of r) {
|
|
361
|
-
const d = m(i, "children");
|
|
362
|
-
d != null && d.length && (a.push(m(i, "key")), n(d));
|
|
363
|
-
}
|
|
364
|
-
};
|
|
365
|
-
return n($.value), a;
|
|
366
|
-
}
|
|
367
|
-
return [];
|
|
368
|
-
}, z = b(
|
|
369
|
-
t.expandedKeys ?? (t.defaultExpandAll ? B() : [])
|
|
370
|
-
);
|
|
371
|
-
Y(
|
|
372
|
-
() => [t.defaultExpandAll, t.expandedKeys],
|
|
373
|
-
([a, n], [r, i]) => {
|
|
374
|
-
n !== i ? z.value = t.expandedKeys ?? [] : a && !r && (z.value = B());
|
|
375
|
-
}
|
|
376
|
-
);
|
|
377
|
-
const A = u({
|
|
378
|
-
get() {
|
|
379
|
-
return t.expandedKeys ? t.expandedKeys : z.value;
|
|
380
|
-
},
|
|
381
|
-
set(a) {
|
|
382
|
-
t.expandedKeys || (z.value = a), e("update:expandedKeys", a);
|
|
383
|
-
}
|
|
384
|
-
});
|
|
385
|
-
Y(
|
|
386
|
-
S,
|
|
387
|
-
(a) => {
|
|
388
|
-
$.value = a;
|
|
389
|
-
const n = B();
|
|
390
|
-
A.value = A.value.filter((r) => n.includes(r)), V.value++;
|
|
391
|
-
},
|
|
392
|
-
{ deep: !0 }
|
|
393
|
-
);
|
|
394
|
-
const Z = b(t.value ?? []);
|
|
395
|
-
Y(
|
|
396
|
-
() => t.value,
|
|
397
|
-
() => {
|
|
398
|
-
Z.value = t.value ?? [];
|
|
399
|
-
}
|
|
400
|
-
);
|
|
401
|
-
const I = u({
|
|
402
|
-
get() {
|
|
403
|
-
return t.value ? t.value : Z.value;
|
|
404
|
-
},
|
|
405
|
-
set(a) {
|
|
406
|
-
t.value || (Z.value = a), e("update:value", a);
|
|
407
|
-
}
|
|
408
|
-
}), le = (a) => {
|
|
409
|
-
if (t.selectable && !t.disabled) {
|
|
410
|
-
let n = L(I.value);
|
|
411
|
-
const r = m(a, "key");
|
|
412
|
-
t.multiple ? I.value.includes(r) ? n = L(I.value.filter((i) => i !== r)) : n = L([...I.value, r]) : n.includes(r) ? n = [] : n = [r], I.value = n, e("select", a, n.includes(r));
|
|
413
|
-
}
|
|
414
|
-
}, R = b(t.checkedKeys ?? []);
|
|
415
|
-
Y(
|
|
416
|
-
() => t.checkedKeys,
|
|
417
|
-
() => {
|
|
418
|
-
R.value = t.checkedKeys ?? [];
|
|
419
|
-
}
|
|
420
|
-
);
|
|
421
|
-
const k = u({
|
|
422
|
-
get() {
|
|
423
|
-
return t.checkedKeys ? t.checkedKeys : R.value;
|
|
424
|
-
},
|
|
425
|
-
set(a) {
|
|
426
|
-
t.checkedKeys || (R.value = a), e("update:checkedKeys", a);
|
|
427
|
-
}
|
|
428
|
-
}), oe = (a, n) => {
|
|
429
|
-
if (t.checkbox && !t.disabled) {
|
|
430
|
-
let r = L(k.value);
|
|
431
|
-
const i = m(a, "key");
|
|
432
|
-
n != null && n.keys.length ? n.value ? r = vt([...n.keys, ...r]) : r = L(k.value.filter((g) => !n.keys.includes(g))) : k.value.includes(i) ? r = L(k.value.filter((g) => g !== i)) : r = L([...k.value, i]), k.value = r;
|
|
433
|
-
const d = (n == null ? void 0 : n.value) ?? k.value.includes(i);
|
|
434
|
-
e("check", a, d, (n == null ? void 0 : n.keys) ?? i);
|
|
435
|
-
}
|
|
436
|
-
}, D = (a) => {
|
|
437
|
-
let n = !0;
|
|
438
|
-
const r = m(a, "key");
|
|
439
|
-
let i = L(A.value);
|
|
440
|
-
i.includes(r) ? (i = i.filter((d) => d !== r), n = !1) : i = [...i, r], A.value = i, e("expand", a, n);
|
|
441
|
-
}, re = u(() => {
|
|
442
|
-
if (t.gap) {
|
|
443
|
-
if (typeof t.gap == "number") return `${t.gap}px`;
|
|
444
|
-
if (!Object.keys(be).includes(t.gap)) return t.gap;
|
|
445
|
-
}
|
|
446
|
-
}), H = t.groupName ?? Ve(void 0, v), V = b(1), U = b(!1), ee = b(), ie = b(), o = (a) => {
|
|
447
|
-
const { root: n, instance: r, node: i } = a, d = (F) => {
|
|
448
|
-
var f;
|
|
449
|
-
return (f = F.getAttribute("data-parents")) == null ? void 0 : f.split(",");
|
|
450
|
-
}, g = (F) => {
|
|
451
|
-
const f = (J, ze = $.value) => {
|
|
452
|
-
const { parents: de, self: Ie } = J;
|
|
453
|
-
for (let ce of ze) {
|
|
454
|
-
const he = m(ce, "key").toString();
|
|
455
|
-
if (he === Ie) return ce;
|
|
456
|
-
const te = m(ce, "children");
|
|
457
|
-
if (de != null && de.includes(he) && (te != null && te.length)) return f(J, te);
|
|
458
|
-
}
|
|
459
|
-
}, y = d(F), q = F.getAttribute("data-key") ?? "";
|
|
460
|
-
return f({ parents: y, self: q });
|
|
461
|
-
}, E = Ue(O(v, "dragging_item"), t.size), j = (F = n.value) => new Ze(F, {
|
|
462
|
-
group: Ye(H) ? H(i) : H,
|
|
463
|
-
animation: 150,
|
|
464
|
-
forceFallback: !0,
|
|
465
|
-
fallbackOnBody: !0,
|
|
466
|
-
filter: "[data-draggable=false]",
|
|
467
|
-
handle: `.${x.node} .${x.draggable} .${x.draggableIcon}`,
|
|
468
|
-
// swapThreshold: 0.65,
|
|
469
|
-
dataIdAttr: "data-key",
|
|
470
|
-
dragClass: E,
|
|
471
|
-
onChoose(f) {
|
|
472
|
-
const y = g(f.item);
|
|
473
|
-
y && (y.dragging = !0);
|
|
474
|
-
},
|
|
475
|
-
onStart(f) {
|
|
476
|
-
var J;
|
|
477
|
-
const y = document.querySelector(`.${E}`), q = (J = getComputedStyle(n.value)) == null ? void 0 : J.direction;
|
|
478
|
-
y != null && y.style && (y.style.direction = q), U.value = !0, e("dragStart", f);
|
|
479
|
-
},
|
|
480
|
-
onUnchoose(f) {
|
|
481
|
-
const y = g(f.item);
|
|
482
|
-
y && (y.dragging = !1);
|
|
483
|
-
},
|
|
484
|
-
onEnd(f) {
|
|
485
|
-
U.value = !1, e("dragEnd", {
|
|
486
|
-
...f,
|
|
487
|
-
node: g(f.item),
|
|
488
|
-
oldParents: d(f.item),
|
|
489
|
-
newParents: d(f.to)
|
|
490
|
-
});
|
|
491
|
-
},
|
|
492
|
-
onMove(f) {
|
|
493
|
-
const y = Number(f.to.getAttribute("data-level") ?? "1"), q = g(f.dragged);
|
|
494
|
-
q && (q.dragging_level = y);
|
|
495
|
-
}
|
|
496
|
-
}), pe = () => {
|
|
497
|
-
var F;
|
|
498
|
-
(F = r.value) == null || F.destroy(), r.value = void 0;
|
|
499
|
-
};
|
|
500
|
-
Pe(() => {
|
|
501
|
-
Y(
|
|
502
|
-
() => [n.value, t.draggable, V.value],
|
|
503
|
-
() => {
|
|
504
|
-
r.value ? pe() : n.value && t.draggable && (r.value = j());
|
|
505
|
-
},
|
|
506
|
-
{ immediate: !0 }
|
|
507
|
-
);
|
|
508
|
-
}), Me(() => {
|
|
509
|
-
r.value && pe();
|
|
510
|
-
});
|
|
511
|
-
};
|
|
512
|
-
return o({
|
|
513
|
-
root: ee,
|
|
514
|
-
instance: ie
|
|
515
|
-
}), pt({
|
|
516
|
-
size: u(() => t.size),
|
|
517
|
-
draggable: u(() => t.draggable),
|
|
518
|
-
lazyLoad: u(() => t.lazyLoad),
|
|
519
|
-
checkbox: u(() => t.checkbox),
|
|
520
|
-
showLine: u(() => t.showLine),
|
|
521
|
-
disabled: u(() => t.disabled),
|
|
522
|
-
switcherIcon: u(() => t.switcherIcon),
|
|
523
|
-
noRotateSwitcherIcon: u(() => t.noRotateSwitcherIcon),
|
|
524
|
-
expandedKeys: A,
|
|
525
|
-
model: I,
|
|
526
|
-
checked: k,
|
|
527
|
-
onExpandKey: D,
|
|
528
|
-
onSelect: le,
|
|
529
|
-
onCheck: oe,
|
|
530
|
-
getNodeField: m,
|
|
531
|
-
useSortable: o,
|
|
532
|
-
dragging: U,
|
|
533
|
-
prefixes: x
|
|
534
|
-
}), (a, n) => (N(), G("div", {
|
|
535
|
-
key: V.value,
|
|
536
|
-
class: P([
|
|
537
|
-
c(C)({
|
|
538
|
-
size: t.size,
|
|
539
|
-
gap: t.gap ?? t.size,
|
|
540
|
-
selectable: t.selectable,
|
|
541
|
-
disabled: t.disabled,
|
|
542
|
-
inlineNode: t.inlineNode,
|
|
543
|
-
dragging: U.value
|
|
544
|
-
}),
|
|
545
|
-
t.class
|
|
546
|
-
]),
|
|
547
|
-
style: Re({
|
|
548
|
-
"--ptc-tree-gap": re.value
|
|
549
|
-
}),
|
|
550
|
-
ref_key: "root",
|
|
551
|
-
ref: ee
|
|
552
|
-
}, [
|
|
553
|
-
(N(!0), G(fe, null, ae($.value, (r) => (N(), Q(yt, {
|
|
554
|
-
key: m(r, "key"),
|
|
555
|
-
item: r
|
|
556
|
-
}, Ne({ _: 2 }, [
|
|
557
|
-
ae(Object.keys(w), (i) => ({
|
|
558
|
-
name: i,
|
|
559
|
-
fn: W((d) => [
|
|
560
|
-
X(a.$slots, i, Se({ ref_for: !0 }, d))
|
|
561
|
-
])
|
|
562
|
-
}))
|
|
563
|
-
]), 1032, ["item"]))), 128))
|
|
564
|
-
], 6));
|
|
565
|
-
}
|
|
566
|
-
});
|
|
567
|
-
export {
|
|
568
|
-
gt as T,
|
|
569
|
-
Bt as _,
|
|
570
|
-
be as a,
|
|
571
|
-
ft as i,
|
|
572
|
-
pt as p
|
|
573
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const n=require("./omit-CMPOmOGF.js");var o=1,r=4;function t(e){return n.baseClone(e,o|r)}exports.cloneDeep=t;
|
package/dist/index-CRYvpN0O.js
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { createContext as p, ConfigProvider as C } from "radix-vue";
|
|
2
|
-
import { toggleDark as T, getThemeConfig as d, init as E, defineTheme as s } from "@pantograph/tokens";
|
|
3
|
-
import { computed as m, unref as g, ref as h, defineComponent as _, watch as y, h as j } from "vue";
|
|
4
|
-
import { i as L, b as S } from "./isObjectLike-BatpeCIi.js";
|
|
5
|
-
import { i as M } from "./isArray-WzO_os3q.js";
|
|
6
|
-
import { useMutationObserver as v } from "@vueuse/core";
|
|
7
|
-
import { c as x } from "./options-JBqnVZUl.js";
|
|
8
|
-
var A = "[object String]";
|
|
9
|
-
function D(t) {
|
|
10
|
-
return typeof t == "string" || !M(t) && L(t) && S(t) == A;
|
|
11
|
-
}
|
|
12
|
-
const k = (t) => {
|
|
13
|
-
const n = m(() => {
|
|
14
|
-
const e = g(t);
|
|
15
|
-
return D(e) ? document.querySelector(e) : e instanceof HTMLElement ? e : document.documentElement;
|
|
16
|
-
}), r = h("ltr"), o = () => {
|
|
17
|
-
n.value instanceof HTMLElement && (r.value = getComputedStyle(n.value).direction);
|
|
18
|
-
};
|
|
19
|
-
o();
|
|
20
|
-
const c = (e) => {
|
|
21
|
-
let i = e;
|
|
22
|
-
(!e || !["rtl", "ltr"].includes(e)) && (i = r.value === "ltr" ? "rtl" : "ltr"), n.value && (n.value.dir = i);
|
|
23
|
-
};
|
|
24
|
-
return v(n, o, {
|
|
25
|
-
attributes: !0,
|
|
26
|
-
attributeFilter: ["dir", "class", "style"]
|
|
27
|
-
}), [r, c];
|
|
28
|
-
}, b = (t) => {
|
|
29
|
-
const n = m(() => {
|
|
30
|
-
const e = g(t);
|
|
31
|
-
return D(e) ? document.querySelector(e) : e instanceof HTMLElement ? e : document.documentElement;
|
|
32
|
-
}), r = h(!1), o = () => {
|
|
33
|
-
var e, i;
|
|
34
|
-
n.value instanceof HTMLElement && (r.value = ((i = (e = n.value) == null ? void 0 : e.classList) == null ? void 0 : i.contains("dark")) ?? !1);
|
|
35
|
-
};
|
|
36
|
-
o();
|
|
37
|
-
const c = (e) => {
|
|
38
|
-
let i = e;
|
|
39
|
-
[!0, !1].includes(e) || (i = !r.value), n.value && T(i, n.value);
|
|
40
|
-
};
|
|
41
|
-
return v(n, o, {
|
|
42
|
-
attributes: !0,
|
|
43
|
-
attributeFilter: ["class", "data-theme"]
|
|
44
|
-
}), [r, c];
|
|
45
|
-
}, [H, O] = p("config-provider"), [w, P] = k(), [q, F] = b(), $ = {
|
|
46
|
-
dir: w,
|
|
47
|
-
changeDirection: P,
|
|
48
|
-
dark: q,
|
|
49
|
-
toggleDark: F,
|
|
50
|
-
changeTheme: s,
|
|
51
|
-
theme: m(() => d())
|
|
52
|
-
}, R = () => H($), U = _({
|
|
53
|
-
name: `${x}ConfigProvider`,
|
|
54
|
-
inheritAttrs: !1,
|
|
55
|
-
props: {
|
|
56
|
-
locale: {
|
|
57
|
-
type: [String, Object],
|
|
58
|
-
required: !1
|
|
59
|
-
},
|
|
60
|
-
theme: {
|
|
61
|
-
type: Object,
|
|
62
|
-
required: !1
|
|
63
|
-
},
|
|
64
|
-
changeAbleDirectionElement: {
|
|
65
|
-
type: [String, HTMLElement, Object],
|
|
66
|
-
default: "html"
|
|
67
|
-
},
|
|
68
|
-
changeAbleDarkElement: {
|
|
69
|
-
type: [String, HTMLElement, Object],
|
|
70
|
-
default: "html"
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
setup(t, {
|
|
74
|
-
slots: n
|
|
75
|
-
}) {
|
|
76
|
-
const [r, o] = k(t.changeAbleDirectionElement), [c, e] = b(t.changeAbleDarkElement);
|
|
77
|
-
y(
|
|
78
|
-
() => t.theme,
|
|
79
|
-
() => {
|
|
80
|
-
var a, l;
|
|
81
|
-
if ((a = t.theme) != null && a.init || (l = t.theme) != null && l.element) {
|
|
82
|
-
const { init: G, ...f } = t.theme;
|
|
83
|
-
window.pantographThemeDefined ? s(f) : (E(f), Promise.resolve({ }), window.pantographThemeDefined = !0);
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
{ immediate: !0 }
|
|
87
|
-
);
|
|
88
|
-
const i = m(() => ({
|
|
89
|
-
...d(t.theme),
|
|
90
|
-
dark: c.value
|
|
91
|
-
})), u = (a) => {
|
|
92
|
-
var l;
|
|
93
|
-
return s({ element: (l = t.theme) == null ? void 0 : l.element, ...a });
|
|
94
|
-
};
|
|
95
|
-
return O({
|
|
96
|
-
dir: r,
|
|
97
|
-
theme: i,
|
|
98
|
-
dark: c,
|
|
99
|
-
changeDirection: o,
|
|
100
|
-
changeTheme: u,
|
|
101
|
-
toggleDark: e
|
|
102
|
-
}), () => j(
|
|
103
|
-
C,
|
|
104
|
-
{ dir: r.value },
|
|
105
|
-
{
|
|
106
|
-
default: () => {
|
|
107
|
-
var a;
|
|
108
|
-
return (a = n.default) == null ? void 0 : a.call(n, {
|
|
109
|
-
dir: r.value,
|
|
110
|
-
theme: i.value,
|
|
111
|
-
dark: c.value,
|
|
112
|
-
changeDirection: o,
|
|
113
|
-
changeTheme: u,
|
|
114
|
-
toggleDark: e
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
export {
|
|
122
|
-
U as C,
|
|
123
|
-
D as a,
|
|
124
|
-
R as i,
|
|
125
|
-
O as p
|
|
126
|
-
};
|