@vtable-guild/vtable-guild 2.2.2 → 2.3.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/core/src/components/Button.mjs +108 -0
- package/dist/core/src/components/Checkbox.mjs +84 -0
- package/dist/core/src/components/Input.mjs +82 -0
- package/dist/core/src/components/Radio.mjs +69 -0
- package/dist/core/src/components/Scrollbar.mjs +179 -0
- package/dist/core/src/components/ScrollbarBar.mjs +103 -0
- package/dist/core/src/components/Tooltip.mjs +321 -0
- package/dist/core/src/components/VTableGuildConfigProvider.mjs +77 -0
- package/dist/core/src/components/VirtualList/Filler.mjs +55 -0
- package/dist/core/src/components/VirtualList/Item.mjs +29 -0
- package/dist/core/src/components/VirtualList/VirtualList.mjs +373 -0
- package/dist/core/src/components/VirtualList/VirtualScrollBar.mjs +216 -0
- package/dist/core/src/components/VirtualList/hooks/useChildren.mjs +21 -0
- package/dist/core/src/components/VirtualList/hooks/useDiffItem.mjs +16 -0
- package/dist/core/src/components/VirtualList/hooks/useFrameWheel.mjs +48 -0
- package/dist/core/src/components/VirtualList/hooks/useGetSize.mjs +25 -0
- package/dist/core/src/components/VirtualList/hooks/useHeights.mjs +56 -0
- package/dist/core/src/components/VirtualList/hooks/useMobileTouchMove.mjs +40 -0
- package/dist/core/src/components/VirtualList/hooks/useOriginScroll.mjs +17 -0
- package/dist/core/src/components/VirtualList/hooks/useScrollDrag.mjs +41 -0
- package/dist/core/src/components/VirtualList/hooks/useScrollTo.mjs +88 -0
- package/dist/core/src/components/VirtualList/utils/CacheMap.mjs +24 -0
- package/dist/core/src/components/VirtualList/utils/algorithmUtil.mjs +22 -0
- package/dist/core/src/components/VirtualList/utils/isFirefox.mjs +4 -0
- package/dist/core/src/components/VirtualList/utils/scrollbarUtil.mjs +7 -0
- package/dist/core/src/composables/useScrollbar.mjs +55 -0
- package/dist/core/src/composables/useTheme.mjs +92 -0
- package/dist/core/src/index.d.ts +1 -0
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/plugin/index.mjs +27 -0
- package/dist/core/src/utils/classPrefix.mjs +100 -0
- package/dist/core/src/utils/devWarn.d.ts +4 -0
- package/dist/core/src/utils/devWarn.d.ts.map +1 -0
- package/dist/core/src/utils/devWarn.mjs +5 -0
- package/dist/core/src/utils/mergeDeep.mjs +20 -0
- package/dist/core/src/utils/props.mjs +33 -0
- package/dist/core/src/utils/tv.mjs +19 -0
- package/dist/icons/src/AntdvEmptyIcon.mjs +37 -0
- package/dist/icons/src/AntdvSpinIndicator.mjs +23 -0
- package/dist/icons/src/CaretDownIcon.d.ts.map +1 -1
- package/dist/icons/src/CaretDownIcon.mjs +9 -0
- package/dist/icons/src/CaretRightIcon.d.ts.map +1 -1
- package/dist/icons/src/CaretUpIcon.d.ts.map +1 -1
- package/dist/icons/src/CaretUpIcon.mjs +9 -0
- package/dist/icons/src/DownOutlinedIcon.d.ts.map +1 -1
- package/dist/icons/src/DownOutlinedIcon.mjs +9 -0
- package/dist/icons/src/ElArrowDownIcon.d.ts.map +1 -1
- package/dist/icons/src/ElArrowDownIcon.mjs +9 -0
- package/dist/icons/src/ElCaretBottomIcon.d.ts.map +1 -1
- package/dist/icons/src/ElCaretBottomIcon.mjs +9 -0
- package/dist/icons/src/ElCaretTopIcon.d.ts.map +1 -1
- package/dist/icons/src/ElCaretTopIcon.mjs +9 -0
- package/dist/icons/src/ElFilterIcon.d.ts.map +1 -1
- package/dist/icons/src/ElLoadingIcon.mjs +28 -0
- package/dist/icons/src/FilterFilledIcon.d.ts.map +1 -1
- package/dist/icons/src/FilterFilledIcon.mjs +9 -0
- package/dist/icons/src/SearchIcon.d.ts.map +1 -1
- package/dist/icons/src/SearchIcon.mjs +9 -0
- package/dist/icons/src/createSvgIcon.d.ts +13 -0
- package/dist/icons/src/createSvgIcon.d.ts.map +1 -0
- package/dist/icons/src/createSvgIcon.mjs +23 -0
- package/dist/index.mjs +82 -10196
- package/dist/table/src/components/ColGroup.mjs +25 -0
- package/dist/table/src/components/ExpandIcon.mjs +60 -0
- package/dist/table/src/components/FilterDropdown.d.ts.map +1 -1
- package/dist/table/src/components/FilterDropdown.mjs +324 -0
- package/dist/table/src/components/FilterIcon.mjs +30 -0
- package/dist/table/src/components/ResizeHandle.mjs +28 -0
- package/dist/table/src/components/SelectionCheckbox.mjs +33 -0
- package/dist/table/src/components/SelectionDropdown.d.ts.map +1 -1
- package/dist/table/src/components/SelectionDropdown.mjs +73 -0
- package/dist/table/src/components/SelectionRadio.mjs +28 -0
- package/dist/table/src/components/SortButton.mjs +30 -0
- package/dist/table/src/components/Table.d.ts.map +1 -1
- package/dist/table/src/components/Table.mjs +781 -0
- package/dist/table/src/components/TableBody.mjs +124 -0
- package/dist/table/src/components/TableCell.d.ts.map +1 -1
- package/dist/table/src/components/TableCell.mjs +222 -0
- package/dist/table/src/components/TableEmpty.mjs +38 -0
- package/dist/table/src/components/TableHeader.mjs +51 -0
- package/dist/table/src/components/TableHeaderCell.d.ts.map +1 -1
- package/dist/table/src/components/TableHeaderCell.mjs +391 -0
- package/dist/table/src/components/TableLoading.mjs +46 -0
- package/dist/table/src/components/TableRow.mjs +34 -0
- package/dist/table/src/components/VTable.vue.d.ts.map +1 -1
- package/dist/table/src/components/VTable.vue.mjs +155 -0
- package/dist/table/src/components/VTable.vue2.mjs +4 -0
- package/dist/table/src/components/VTableSummary.mjs +29 -0
- package/dist/table/src/components/VTableSummaryCell.d.ts.map +1 -1
- package/dist/table/src/components/VTableSummaryCell.mjs +68 -0
- package/dist/table/src/components/VTableSummaryRow.mjs +19 -0
- package/dist/table/src/components/VirtualTableBody.d.ts.map +1 -1
- package/dist/table/src/components/VirtualTableBody.mjs +172 -0
- package/dist/table/src/composables/index.d.ts +2 -1
- package/dist/table/src/composables/index.d.ts.map +1 -1
- package/dist/table/src/composables/useColumns.d.ts +6 -1
- package/dist/table/src/composables/useColumns.d.ts.map +1 -1
- package/dist/table/src/composables/useColumns.mjs +81 -0
- package/dist/table/src/composables/useControlledColumnState.d.ts +24 -0
- package/dist/table/src/composables/useControlledColumnState.d.ts.map +1 -0
- package/dist/table/src/composables/useControlledColumnState.mjs +23 -0
- package/dist/table/src/composables/useExpand.mjs +37 -0
- package/dist/table/src/composables/useFilter.d.ts.map +1 -1
- package/dist/table/src/composables/useFilter.mjs +68 -0
- package/dist/table/src/composables/useFixedColumnStyle.d.ts +18 -0
- package/dist/table/src/composables/useFixedColumnStyle.d.ts.map +1 -0
- package/dist/table/src/composables/useFixedColumnStyle.mjs +21 -0
- package/dist/table/src/composables/useHoverState.mjs +26 -0
- package/dist/table/src/composables/useResize.mjs +42 -0
- package/dist/table/src/composables/useScroll.d.ts +5 -4
- package/dist/table/src/composables/useScroll.d.ts.map +1 -1
- package/dist/table/src/composables/useScroll.mjs +68 -0
- package/dist/table/src/composables/useSelection.d.ts.map +1 -1
- package/dist/table/src/composables/useSelection.mjs +246 -0
- package/dist/table/src/composables/useSorter.d.ts +1 -5
- package/dist/table/src/composables/useSorter.d.ts.map +1 -1
- package/dist/table/src/composables/useSorter.mjs +161 -0
- package/dist/table/src/composables/useTreeData.d.ts +2 -0
- package/dist/table/src/composables/useTreeData.d.ts.map +1 -1
- package/dist/table/src/composables/useTreeData.mjs +92 -0
- package/dist/table/src/composables/useVirtual.mjs +19 -0
- package/dist/table/src/constants.mjs +8 -0
- package/dist/table/src/context.d.ts +90 -85
- package/dist/table/src/context.d.ts.map +1 -1
- package/dist/table/src/context.mjs +4 -0
- package/dist/table/src/index.d.ts.map +1 -1
- package/dist/table/src/index.mjs +23 -0
- package/dist/table/src/preset-config.mjs +35 -0
- package/dist/table/src/utils/cell.mjs +79 -0
- package/dist/table/src/utils/popupPosition.d.ts +20 -0
- package/dist/table/src/utils/popupPosition.d.ts.map +1 -0
- package/dist/table/src/utils/popupPosition.mjs +24 -0
- package/dist/table/src/utils/popupPosition.test.d.ts +2 -0
- package/dist/table/src/utils/popupPosition.test.d.ts.map +1 -0
- package/dist/table/src/utils/vnode.mjs +10 -0
- package/dist/theme/src/presets/antdv/button.mjs +70 -0
- package/dist/theme/src/presets/antdv/checkbox.mjs +51 -0
- package/dist/theme/src/presets/antdv/input.mjs +40 -0
- package/dist/theme/src/presets/antdv/radio.mjs +34 -0
- package/dist/theme/src/presets/antdv/scrollbar.mjs +22 -0
- package/dist/theme/src/presets/antdv/table-locale.mjs +55 -0
- package/dist/theme/src/presets/antdv/table.mjs +285 -0
- package/dist/theme/src/presets/antdv/tooltip.mjs +20 -0
- package/dist/theme/src/presets/element-plus/button.mjs +70 -0
- package/dist/theme/src/presets/element-plus/checkbox.mjs +65 -0
- package/dist/theme/src/presets/element-plus/input.mjs +39 -0
- package/dist/theme/src/presets/element-plus/radio.mjs +34 -0
- package/dist/theme/src/presets/element-plus/scrollbar.mjs +22 -0
- package/dist/theme/src/presets/element-plus/table-locale.mjs +56 -0
- package/dist/theme/src/presets/element-plus/table.mjs +235 -0
- package/dist/theme/src/presets/element-plus/tooltip.mjs +21 -0
- package/dist/theme/src/presets/index.mjs +92 -0
- package/package.json +5 -2
- package/dist/index.cjs +0 -1
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
import { defineComponent as F, ref as b, computed as i, watch as H, nextTick as B, onMounted as I, onBeforeUnmount as V, createVNode as r, Fragment as X, Teleport as D, Transition as N } from "vue";
|
|
2
|
+
import { useTheme as Y } from "../composables/useTheme.mjs";
|
|
3
|
+
const j = {
|
|
4
|
+
slots: {
|
|
5
|
+
content: ["text-white max-w-[250px] break-words relative", "text-[length:var(--vtg-tooltip-font-size)]", "leading-[1.5715]", "bg-[color:var(--vtg-tooltip-bg)]", "rounded-[var(--vtg-tooltip-border-radius)]", "p-[var(--vtg-tooltip-padding)]", "shadow-[0_6px_16px_0_rgba(0,0,0,0.08),0_3px_6px_-4px_rgba(0,0,0,0.12),0_9px_28px_8px_rgba(0,0,0,0.05)]"].join(" "),
|
|
6
|
+
arrow: "absolute block pointer-events-none",
|
|
7
|
+
arrowOuter: "absolute w-0 h-0",
|
|
8
|
+
arrowInner: "absolute w-0 h-0"
|
|
9
|
+
},
|
|
10
|
+
defaultVariants: {}
|
|
11
|
+
}, q = /* @__PURE__ */ F({
|
|
12
|
+
name: "VTooltip",
|
|
13
|
+
props: {
|
|
14
|
+
title: {
|
|
15
|
+
type: [String, Object],
|
|
16
|
+
default: void 0
|
|
17
|
+
},
|
|
18
|
+
placement: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "top"
|
|
21
|
+
},
|
|
22
|
+
open: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: void 0
|
|
25
|
+
},
|
|
26
|
+
mouseEnterDelay: {
|
|
27
|
+
type: Number,
|
|
28
|
+
default: 0.1
|
|
29
|
+
},
|
|
30
|
+
mouseLeaveDelay: {
|
|
31
|
+
type: Number,
|
|
32
|
+
default: 0.1
|
|
33
|
+
},
|
|
34
|
+
color: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: void 0
|
|
37
|
+
},
|
|
38
|
+
arrow: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !0
|
|
41
|
+
},
|
|
42
|
+
destroyOnHide: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: !1
|
|
45
|
+
},
|
|
46
|
+
block: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: !1
|
|
49
|
+
},
|
|
50
|
+
ui: {
|
|
51
|
+
type: Object,
|
|
52
|
+
default: void 0
|
|
53
|
+
},
|
|
54
|
+
class: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: void 0
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
setup(e, {
|
|
60
|
+
slots: m
|
|
61
|
+
}) {
|
|
62
|
+
const {
|
|
63
|
+
slots: c
|
|
64
|
+
} = Y("tooltip", j, e), L = b(null), R = b(null), w = b(!1);
|
|
65
|
+
let f = null, h = null;
|
|
66
|
+
const y = i(() => e.open !== void 0), s = i(() => y.value ? e.open : w.value), T = b({
|
|
67
|
+
top: 0,
|
|
68
|
+
left: 0
|
|
69
|
+
});
|
|
70
|
+
let n = null;
|
|
71
|
+
function S() {
|
|
72
|
+
const t = L.value, d = R.value;
|
|
73
|
+
if (!t || !d) return;
|
|
74
|
+
const o = t.getBoundingClientRect(), a = d.getBoundingClientRect(), v = window.scrollX, x = window.scrollY;
|
|
75
|
+
let p = 0, u = 0;
|
|
76
|
+
const g = 8;
|
|
77
|
+
switch (e.placement) {
|
|
78
|
+
case "top":
|
|
79
|
+
p = o.top + x - a.height - g, u = o.left + v + o.width / 2 - a.width / 2;
|
|
80
|
+
break;
|
|
81
|
+
case "bottom":
|
|
82
|
+
p = o.bottom + x + g, u = o.left + v + o.width / 2 - a.width / 2;
|
|
83
|
+
break;
|
|
84
|
+
case "left":
|
|
85
|
+
p = o.top + x + o.height / 2 - a.height / 2, u = o.left + v - a.width - g;
|
|
86
|
+
break;
|
|
87
|
+
case "right":
|
|
88
|
+
p = o.top + x + o.height / 2 - a.height / 2, u = o.right + v + g;
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
T.value = {
|
|
92
|
+
top: p,
|
|
93
|
+
left: u
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
function l() {
|
|
97
|
+
n !== null && cancelAnimationFrame(n), n = requestAnimationFrame(() => {
|
|
98
|
+
n = null, S();
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
function z() {
|
|
102
|
+
window.addEventListener("resize", l), window.addEventListener("scroll", l, !0);
|
|
103
|
+
}
|
|
104
|
+
function _() {
|
|
105
|
+
window.removeEventListener("resize", l), window.removeEventListener("scroll", l, !0);
|
|
106
|
+
}
|
|
107
|
+
function $() {
|
|
108
|
+
f && (clearTimeout(f), f = null), h && (clearTimeout(h), h = null);
|
|
109
|
+
}
|
|
110
|
+
function k() {
|
|
111
|
+
y.value || ($(), f = setTimeout(() => {
|
|
112
|
+
w.value = !0;
|
|
113
|
+
}, e.mouseEnterDelay * 1e3));
|
|
114
|
+
}
|
|
115
|
+
function C() {
|
|
116
|
+
y.value || ($(), h = setTimeout(() => {
|
|
117
|
+
w.value = !1;
|
|
118
|
+
}, e.mouseLeaveDelay * 1e3));
|
|
119
|
+
}
|
|
120
|
+
H(s, (t) => {
|
|
121
|
+
t ? (z(), B(() => l())) : _();
|
|
122
|
+
}), H(() => e.placement, () => {
|
|
123
|
+
s.value && B(() => l());
|
|
124
|
+
}), I(() => {
|
|
125
|
+
s.value && (z(), B(() => l()));
|
|
126
|
+
}), V(() => {
|
|
127
|
+
$(), _(), n !== null && (cancelAnimationFrame(n), n = null);
|
|
128
|
+
});
|
|
129
|
+
const E = i(() => {
|
|
130
|
+
switch (e.placement) {
|
|
131
|
+
case "top":
|
|
132
|
+
return {
|
|
133
|
+
bottom: "-7px",
|
|
134
|
+
left: "50%",
|
|
135
|
+
width: "14px",
|
|
136
|
+
height: "8px",
|
|
137
|
+
transform: "translateX(-50%)"
|
|
138
|
+
};
|
|
139
|
+
case "bottom":
|
|
140
|
+
return {
|
|
141
|
+
top: "-7px",
|
|
142
|
+
left: "50%",
|
|
143
|
+
width: "14px",
|
|
144
|
+
height: "8px",
|
|
145
|
+
transform: "translateX(-50%)"
|
|
146
|
+
};
|
|
147
|
+
case "left":
|
|
148
|
+
return {
|
|
149
|
+
right: "-7px",
|
|
150
|
+
top: "50%",
|
|
151
|
+
width: "8px",
|
|
152
|
+
height: "14px",
|
|
153
|
+
transform: "translateY(-50%)"
|
|
154
|
+
};
|
|
155
|
+
case "right":
|
|
156
|
+
return {
|
|
157
|
+
left: "-7px",
|
|
158
|
+
top: "50%",
|
|
159
|
+
width: "8px",
|
|
160
|
+
height: "14px",
|
|
161
|
+
transform: "translateY(-50%)"
|
|
162
|
+
};
|
|
163
|
+
default:
|
|
164
|
+
return {
|
|
165
|
+
bottom: "-7px",
|
|
166
|
+
left: "50%",
|
|
167
|
+
width: "14px",
|
|
168
|
+
height: "8px",
|
|
169
|
+
transform: "translateX(-50%)"
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
}), O = i(() => {
|
|
173
|
+
const t = e.color ?? "var(--vtg-tooltip-arrow-outer-color, var(--vtg-tooltip-bg))";
|
|
174
|
+
switch (e.placement) {
|
|
175
|
+
case "top":
|
|
176
|
+
return {
|
|
177
|
+
left: "0",
|
|
178
|
+
top: "0",
|
|
179
|
+
borderLeft: "7px solid transparent",
|
|
180
|
+
borderRight: "7px solid transparent",
|
|
181
|
+
borderTop: `8px solid ${t}`
|
|
182
|
+
};
|
|
183
|
+
case "bottom":
|
|
184
|
+
return {
|
|
185
|
+
left: "0",
|
|
186
|
+
top: "0",
|
|
187
|
+
borderLeft: "7px solid transparent",
|
|
188
|
+
borderRight: "7px solid transparent",
|
|
189
|
+
borderBottom: `8px solid ${t}`
|
|
190
|
+
};
|
|
191
|
+
case "left":
|
|
192
|
+
return {
|
|
193
|
+
left: "0",
|
|
194
|
+
top: "0",
|
|
195
|
+
borderTop: "7px solid transparent",
|
|
196
|
+
borderBottom: "7px solid transparent",
|
|
197
|
+
borderLeft: `8px solid ${t}`
|
|
198
|
+
};
|
|
199
|
+
case "right":
|
|
200
|
+
return {
|
|
201
|
+
left: "0",
|
|
202
|
+
top: "0",
|
|
203
|
+
borderTop: "7px solid transparent",
|
|
204
|
+
borderBottom: "7px solid transparent",
|
|
205
|
+
borderRight: `8px solid ${t}`
|
|
206
|
+
};
|
|
207
|
+
default:
|
|
208
|
+
return {
|
|
209
|
+
left: "0",
|
|
210
|
+
top: "0",
|
|
211
|
+
borderLeft: "7px solid transparent",
|
|
212
|
+
borderRight: "7px solid transparent",
|
|
213
|
+
borderTop: `8px solid ${t}`
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
}), M = i(() => {
|
|
217
|
+
const t = e.color ?? "var(--vtg-tooltip-bg)";
|
|
218
|
+
switch (e.placement) {
|
|
219
|
+
case "top":
|
|
220
|
+
return {
|
|
221
|
+
left: "1px",
|
|
222
|
+
top: "0",
|
|
223
|
+
borderLeft: "6px solid transparent",
|
|
224
|
+
borderRight: "6px solid transparent",
|
|
225
|
+
borderTop: `7px solid ${t}`
|
|
226
|
+
};
|
|
227
|
+
case "bottom":
|
|
228
|
+
return {
|
|
229
|
+
left: "1px",
|
|
230
|
+
top: "1px",
|
|
231
|
+
borderLeft: "6px solid transparent",
|
|
232
|
+
borderRight: "6px solid transparent",
|
|
233
|
+
borderBottom: `7px solid ${t}`
|
|
234
|
+
};
|
|
235
|
+
case "left":
|
|
236
|
+
return {
|
|
237
|
+
left: "0",
|
|
238
|
+
top: "1px",
|
|
239
|
+
borderTop: "6px solid transparent",
|
|
240
|
+
borderBottom: "6px solid transparent",
|
|
241
|
+
borderLeft: `7px solid ${t}`
|
|
242
|
+
};
|
|
243
|
+
case "right":
|
|
244
|
+
return {
|
|
245
|
+
left: "1px",
|
|
246
|
+
top: "1px",
|
|
247
|
+
borderTop: "6px solid transparent",
|
|
248
|
+
borderBottom: "6px solid transparent",
|
|
249
|
+
borderRight: `7px solid ${t}`
|
|
250
|
+
};
|
|
251
|
+
default:
|
|
252
|
+
return {
|
|
253
|
+
left: "1px",
|
|
254
|
+
top: "0",
|
|
255
|
+
borderLeft: "6px solid transparent",
|
|
256
|
+
borderRight: "6px solid transparent",
|
|
257
|
+
borderTop: `7px solid ${t}`
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
}), A = i(() => e.destroyOnHide ? s.value : !0);
|
|
261
|
+
return () => {
|
|
262
|
+
const t = m.title?.() ?? e.title;
|
|
263
|
+
if (t == null)
|
|
264
|
+
return m.default?.();
|
|
265
|
+
const d = r("span", {
|
|
266
|
+
ref: L,
|
|
267
|
+
onMouseenter: k,
|
|
268
|
+
onMouseleave: C,
|
|
269
|
+
style: e.block ? {
|
|
270
|
+
display: "flex",
|
|
271
|
+
flex: "1 1 auto",
|
|
272
|
+
minWidth: 0
|
|
273
|
+
} : {
|
|
274
|
+
display: "inline-flex"
|
|
275
|
+
}
|
|
276
|
+
}, [m.default?.()]), o = e.color ? {
|
|
277
|
+
background: e.color,
|
|
278
|
+
borderColor: e.color
|
|
279
|
+
} : void 0;
|
|
280
|
+
return r(X, null, [d, r(D, {
|
|
281
|
+
to: "body"
|
|
282
|
+
}, {
|
|
283
|
+
default: () => [r(N, {
|
|
284
|
+
enterActiveClass: "vtg-tooltip-enter-active",
|
|
285
|
+
leaveActiveClass: "vtg-tooltip-leave-active",
|
|
286
|
+
enterFromClass: "vtg-tooltip-enter-from",
|
|
287
|
+
leaveToClass: "vtg-tooltip-leave-to"
|
|
288
|
+
}, {
|
|
289
|
+
default: () => [A.value && s.value && r("div", {
|
|
290
|
+
ref: R,
|
|
291
|
+
role: "tooltip",
|
|
292
|
+
onMouseenter: k,
|
|
293
|
+
onMouseleave: C,
|
|
294
|
+
style: {
|
|
295
|
+
position: "absolute",
|
|
296
|
+
top: `${T.value.top}px`,
|
|
297
|
+
left: `${T.value.left}px`,
|
|
298
|
+
zIndex: 1070,
|
|
299
|
+
pointerEvents: "none"
|
|
300
|
+
}
|
|
301
|
+
}, [r("div", {
|
|
302
|
+
class: c.content(),
|
|
303
|
+
style: o
|
|
304
|
+
}, [t, e.arrow && r("div", {
|
|
305
|
+
class: c.arrow(),
|
|
306
|
+
style: E.value
|
|
307
|
+
}, [r("div", {
|
|
308
|
+
class: c.arrowOuter(),
|
|
309
|
+
style: O.value
|
|
310
|
+
}, null), r("div", {
|
|
311
|
+
class: c.arrowInner(),
|
|
312
|
+
style: M.value
|
|
313
|
+
}, null)])])])]
|
|
314
|
+
})]
|
|
315
|
+
})]);
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
export {
|
|
320
|
+
q as default
|
|
321
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { defineComponent as p, inject as O, computed as c, reactive as h, provide as y } from "vue";
|
|
2
|
+
import { mergeDeep as b } from "../utils/mergeDeep.mjs";
|
|
3
|
+
import { normalizeVtgClassPrefix as P } from "../utils/classPrefix.mjs";
|
|
4
|
+
import { mergeThemeConfigs as x } from "../composables/useTheme.mjs";
|
|
5
|
+
import { VTABLE_GUILD_INJECTION_KEY as a } from "../plugin/index.mjs";
|
|
6
|
+
const M = /* @__PURE__ */ p({
|
|
7
|
+
name: "VTableGuildConfigProvider",
|
|
8
|
+
props: {
|
|
9
|
+
theme: {
|
|
10
|
+
type: Object,
|
|
11
|
+
default: void 0
|
|
12
|
+
},
|
|
13
|
+
cssMode: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: void 0
|
|
16
|
+
},
|
|
17
|
+
classPrefix: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: void 0
|
|
20
|
+
},
|
|
21
|
+
locale: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: void 0
|
|
24
|
+
},
|
|
25
|
+
locales: {
|
|
26
|
+
type: Object,
|
|
27
|
+
default: void 0
|
|
28
|
+
},
|
|
29
|
+
localeOverrides: {
|
|
30
|
+
type: Object,
|
|
31
|
+
default: void 0
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
setup(t, {
|
|
35
|
+
slots: i
|
|
36
|
+
}) {
|
|
37
|
+
const e = O(a, null), u = c(() => {
|
|
38
|
+
const r = e?.theme ?? {}, n = t.theme ?? {};
|
|
39
|
+
if (!Object.keys(n).length) return r;
|
|
40
|
+
const v = /* @__PURE__ */ new Set([...Object.keys(r), ...Object.keys(n)]), d = {};
|
|
41
|
+
for (const l of v) {
|
|
42
|
+
const o = r[l], s = n[l];
|
|
43
|
+
d[l] = o && s ? x(o, s) : s ?? o;
|
|
44
|
+
}
|
|
45
|
+
return d;
|
|
46
|
+
}), f = c(() => ({
|
|
47
|
+
...e?.locales ?? {},
|
|
48
|
+
...t.locales ?? {}
|
|
49
|
+
})), m = c(() => b(e?.localeOverrides ?? {}, t.localeOverrides)), g = h({
|
|
50
|
+
get themePreset() {
|
|
51
|
+
return e?.themePreset ?? "antdv";
|
|
52
|
+
},
|
|
53
|
+
get cssMode() {
|
|
54
|
+
return t.cssMode ?? e?.cssMode ?? "prebuilt";
|
|
55
|
+
},
|
|
56
|
+
get classPrefix() {
|
|
57
|
+
return P(t.classPrefix ?? e?.classPrefix);
|
|
58
|
+
},
|
|
59
|
+
get theme() {
|
|
60
|
+
return u.value;
|
|
61
|
+
},
|
|
62
|
+
get locale() {
|
|
63
|
+
return t.locale ?? e?.locale ?? "zh-CN";
|
|
64
|
+
},
|
|
65
|
+
get locales() {
|
|
66
|
+
return f.value;
|
|
67
|
+
},
|
|
68
|
+
get localeOverrides() {
|
|
69
|
+
return m.value;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
return y(a, g), () => i.default?.();
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
export {
|
|
76
|
+
M as default
|
|
77
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { defineComponent as u, createVNode as f } from "vue";
|
|
2
|
+
const d = /* @__PURE__ */ u({
|
|
3
|
+
name: "VirtualFiller",
|
|
4
|
+
props: {
|
|
5
|
+
prefixCls: String,
|
|
6
|
+
height: Number,
|
|
7
|
+
offsetY: Number,
|
|
8
|
+
offsetX: Number,
|
|
9
|
+
scrollWidth: Number,
|
|
10
|
+
onInnerResize: Function,
|
|
11
|
+
innerProps: Object,
|
|
12
|
+
rtl: Boolean,
|
|
13
|
+
extra: Object
|
|
14
|
+
},
|
|
15
|
+
setup(e, {
|
|
16
|
+
slots: o
|
|
17
|
+
}) {
|
|
18
|
+
let n = null, i = null;
|
|
19
|
+
const s = (t) => {
|
|
20
|
+
i !== t && (n && i && n.unobserve(i), i = t, t && (n || (n = new ResizeObserver((r) => {
|
|
21
|
+
const l = r[0];
|
|
22
|
+
l && l.target.offsetHeight && e.onInnerResize && e.onInnerResize();
|
|
23
|
+
})), n.observe(t)));
|
|
24
|
+
};
|
|
25
|
+
return () => {
|
|
26
|
+
let t = {}, r = {
|
|
27
|
+
display: "flex",
|
|
28
|
+
flexDirection: "column"
|
|
29
|
+
};
|
|
30
|
+
return e.offsetY !== void 0 && (t = {
|
|
31
|
+
height: `${e.height}px`,
|
|
32
|
+
position: "relative",
|
|
33
|
+
overflow: "hidden"
|
|
34
|
+
}, r = {
|
|
35
|
+
...r,
|
|
36
|
+
transform: `translateY(${e.offsetY}px)`,
|
|
37
|
+
[e.rtl ? "marginRight" : "marginLeft"]: `-${e.offsetX || 0}px`,
|
|
38
|
+
position: "absolute",
|
|
39
|
+
left: 0,
|
|
40
|
+
right: 0,
|
|
41
|
+
top: 0
|
|
42
|
+
}), f("div", {
|
|
43
|
+
style: t
|
|
44
|
+
}, [f("div", {
|
|
45
|
+
ref: s,
|
|
46
|
+
style: r,
|
|
47
|
+
class: e.prefixCls ? `${e.prefixCls}-holder-inner` : void 0,
|
|
48
|
+
...e.innerProps
|
|
49
|
+
}, [o.default?.(), e.extra])]);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
export {
|
|
54
|
+
d as default
|
|
55
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { defineComponent as l, shallowRef as f, cloneVNode as o } from "vue";
|
|
2
|
+
function i(n) {
|
|
3
|
+
return n.filter((t) => t != null && typeof t != "boolean");
|
|
4
|
+
}
|
|
5
|
+
const a = /* @__PURE__ */ l({
|
|
6
|
+
name: "VirtualItem",
|
|
7
|
+
props: {
|
|
8
|
+
setRef: {
|
|
9
|
+
type: Function,
|
|
10
|
+
required: !0
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
setup(n, {
|
|
14
|
+
slots: t
|
|
15
|
+
}) {
|
|
16
|
+
const r = f(null), u = (e) => {
|
|
17
|
+
r.value !== e && (r.value = e, n.setRef(e));
|
|
18
|
+
};
|
|
19
|
+
return () => {
|
|
20
|
+
const e = i(t.default?.() ?? [])[0];
|
|
21
|
+
return e ? o(e, {
|
|
22
|
+
ref: u
|
|
23
|
+
}) : null;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
export {
|
|
28
|
+
a as default
|
|
29
|
+
};
|