@vtable-guild/vtable-guild 2.9.0-alpha.3 → 2.9.0-alpha.5
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/css/index.css +17 -0
- package/css/presets/antdv.css +10 -5
- package/css/presets/element-plus.css +9 -4
- package/css/style.css +83 -84
- package/css/tailwind3-utilities.css +35 -44
- package/css/tailwind3.css +48 -40
- package/css/tailwind4.css +48 -40
- package/css/transitions.css +12 -31
- package/dist/css/index.css +17 -0
- package/dist/css/presets/antdv.css +10 -5
- package/dist/css/presets/element-plus.css +9 -4
- package/dist/css/style.css +83 -84
- package/dist/css/tailwind3-utilities.css +35 -44
- package/dist/css/tailwind3.css +48 -40
- package/dist/css/tailwind4.css +48 -40
- package/dist/css/transitions.css +12 -31
- package/dist/index.full.mjs +5297 -5255
- package/dist/table/src/components/FilterDropdown.d.ts +23 -23
- package/dist/table/src/components/FilterDropdown.d.ts.map +1 -1
- package/dist/table/src/components/FilterDropdown.mjs +163 -175
- package/dist/table/src/components/PaginationSizeSelect.d.ts.map +1 -1
- package/dist/table/src/components/PaginationSizeSelect.mjs +85 -95
- package/dist/table/src/components/SelectionDropdown.d.ts +0 -27
- package/dist/table/src/components/SelectionDropdown.d.ts.map +1 -1
- package/dist/table/src/components/SelectionDropdown.mjs +31 -56
- package/dist/table/src/components/Table.d.ts +1 -1
- package/dist/table/src/components/TableColumnSettings.d.ts.map +1 -1
- package/dist/table/src/components/TableColumnSettings.mjs +212 -236
- package/dist/table/src/components/TableHeaderCell.d.ts.map +1 -1
- package/dist/table/src/components/TableHeaderCell.mjs +272 -278
- package/dist/table/src/components/TablePopup.d.ts +77 -0
- package/dist/table/src/components/TablePopup.d.ts.map +1 -0
- package/dist/table/src/components/TablePopup.mjs +104 -0
- package/dist/table/src/components/TablePopup.test.d.ts +2 -0
- package/dist/table/src/components/TablePopup.test.d.ts.map +1 -0
- package/dist/table/src/components/VTableHeaderAlignment.test.d.ts +2 -0
- package/dist/table/src/components/VTableHeaderAlignment.test.d.ts.map +1 -0
- package/dist/table/src/composables/useHeaderTitleBalance.d.ts +7 -0
- package/dist/table/src/composables/useHeaderTitleBalance.d.ts.map +1 -0
- package/dist/table/src/composables/useHeaderTitleBalance.mjs +50 -0
- package/dist/table/src/composables/useHeaderTitleBalance.test.d.ts +2 -0
- package/dist/table/src/composables/useHeaderTitleBalance.test.d.ts.map +1 -0
- package/dist/table/src/preset-config.d.ts +2 -0
- package/dist/table/src/preset-config.d.ts.map +1 -1
- package/dist/table/src/preset-config.mjs +12 -10
- package/dist/table/src/utils/popupPosition.d.ts +1 -6
- package/dist/table/src/utils/popupPosition.d.ts.map +1 -1
- package/dist/table/src/utils/popupPosition.mjs +22 -26
- package/dist/theme/src/column-settings.d.ts +8 -8
- package/dist/theme/src/column-settings.d.ts.map +1 -1
- package/dist/theme/src/column-settings.mjs +16 -18
- package/dist/theme/src/pagination.d.ts +2 -2
- package/dist/theme/src/pagination.d.ts.map +1 -1
- package/dist/theme/src/pagination.mjs +7 -8
- package/dist/theme/src/presets/antdv/table.d.ts +6 -6
- package/dist/theme/src/presets/antdv/table.d.ts.map +1 -1
- package/dist/theme/src/presets/antdv/table.mjs +9 -19
- package/dist/theme/src/presets/element-plus/table.d.ts +6 -6
- package/dist/theme/src/presets/element-plus/table.d.ts.map +1 -1
- package/dist/theme/src/presets/element-plus/table.mjs +9 -20
- package/package.json +1 -1
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { HTMLAttributes, PropType } from 'vue';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
3
|
+
open: BooleanConstructor;
|
|
4
|
+
anchor: PropType<HTMLElement | null>;
|
|
5
|
+
focusAnchor: PropType<HTMLElement | null>;
|
|
6
|
+
getPopupContainer: PropType<(anchor: HTMLElement) => HTMLElement | string>;
|
|
7
|
+
preset: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
as: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
align: {
|
|
16
|
+
type: PropType<"start" | "end">;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
alignmentWidth: {
|
|
20
|
+
type: NumberConstructor;
|
|
21
|
+
default: number;
|
|
22
|
+
};
|
|
23
|
+
matchTriggerWidth: BooleanConstructor;
|
|
24
|
+
clipToAnchorAncestors: BooleanConstructor;
|
|
25
|
+
closeOnFocusOutside: BooleanConstructor;
|
|
26
|
+
outsideBoundary: PropType<HTMLElement | null>;
|
|
27
|
+
panelRef: PropType<(element: HTMLElement | null) => void>;
|
|
28
|
+
panelAttrs: PropType<HTMLAttributes>;
|
|
29
|
+
panelKey: StringConstructor;
|
|
30
|
+
initialFocus: StringConstructor;
|
|
31
|
+
zIndex: StringConstructor;
|
|
32
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
33
|
+
dismiss: (_reason: "outside" | "escape") => true;
|
|
34
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
35
|
+
open: BooleanConstructor;
|
|
36
|
+
anchor: PropType<HTMLElement | null>;
|
|
37
|
+
focusAnchor: PropType<HTMLElement | null>;
|
|
38
|
+
getPopupContainer: PropType<(anchor: HTMLElement) => HTMLElement | string>;
|
|
39
|
+
preset: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
default: string;
|
|
42
|
+
};
|
|
43
|
+
as: {
|
|
44
|
+
type: StringConstructor;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
align: {
|
|
48
|
+
type: PropType<"start" | "end">;
|
|
49
|
+
default: string;
|
|
50
|
+
};
|
|
51
|
+
alignmentWidth: {
|
|
52
|
+
type: NumberConstructor;
|
|
53
|
+
default: number;
|
|
54
|
+
};
|
|
55
|
+
matchTriggerWidth: BooleanConstructor;
|
|
56
|
+
clipToAnchorAncestors: BooleanConstructor;
|
|
57
|
+
closeOnFocusOutside: BooleanConstructor;
|
|
58
|
+
outsideBoundary: PropType<HTMLElement | null>;
|
|
59
|
+
panelRef: PropType<(element: HTMLElement | null) => void>;
|
|
60
|
+
panelAttrs: PropType<HTMLAttributes>;
|
|
61
|
+
panelKey: StringConstructor;
|
|
62
|
+
initialFocus: StringConstructor;
|
|
63
|
+
zIndex: StringConstructor;
|
|
64
|
+
}>> & Readonly<{
|
|
65
|
+
onDismiss?: ((_reason: "outside" | "escape") => any) | undefined;
|
|
66
|
+
}>, {
|
|
67
|
+
align: "end" | "start";
|
|
68
|
+
open: boolean;
|
|
69
|
+
matchTriggerWidth: boolean;
|
|
70
|
+
clipToAnchorAncestors: boolean;
|
|
71
|
+
closeOnFocusOutside: boolean;
|
|
72
|
+
preset: string;
|
|
73
|
+
as: string;
|
|
74
|
+
alignmentWidth: number;
|
|
75
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
76
|
+
export default _default;
|
|
77
|
+
//# sourceMappingURL=TablePopup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TablePopup.d.ts","sourceRoot":"","sources":["../../../../../table/src/components/TablePopup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,cAAc,EACnB,KAAK,QAAQ,EACd,MAAM,KAAK,CAAA;;;YAQU,QAAQ,CAAC,WAAW,GAAG,IAAI,CAAC;iBACvB,QAAQ,CAAC,WAAW,GAAG,IAAI,CAAC;uBACpB,QAAQ,CAAC,CAAC,MAAM,EAAE,WAAW,KAAK,WAAW,GAAG,MAAM,CAAC;;;;;;;;;;cAG7D,QAAQ,CAAC,OAAO,GAAG,KAAK,CAAC;;;;;;;;;;qBAKvB,QAAQ,CAAC,WAAW,GAAG,IAAI,CAAC;cACjC,QAAQ,CAAC,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;gBAC/C,QAAQ,CAAC,cAAc,CAAC;;;;;uBAM3B,SAAS,GAAG,QAAQ;;;YAlBrB,QAAQ,CAAC,WAAW,GAAG,IAAI,CAAC;iBACvB,QAAQ,CAAC,WAAW,GAAG,IAAI,CAAC;uBACpB,QAAQ,CAAC,CAAC,MAAM,EAAE,WAAW,KAAK,WAAW,GAAG,MAAM,CAAC;;;;;;;;;;cAG7D,QAAQ,CAAC,OAAO,GAAG,KAAK,CAAC;;;;;;;;;;qBAKvB,QAAQ,CAAC,WAAW,GAAG,IAAI,CAAC;cACjC,QAAQ,CAAC,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;gBAC/C,QAAQ,CAAC,cAAc,CAAC;;;;;;;;;;;;;;;;AAjBlD,wBAqLE"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { defineComponent as $, shallowRef as L, watch as P, nextTick as j, createVNode as z, Teleport as I, Transition as K, h as _ } from "vue";
|
|
2
|
+
import { getPopupVerticalBoundary as N, getPopupPositionStyle as V } from "../utils/popupPosition.mjs";
|
|
3
|
+
const q = /* @__PURE__ */ $({
|
|
4
|
+
name: "TablePopup",
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
props: {
|
|
7
|
+
open: Boolean,
|
|
8
|
+
anchor: Object,
|
|
9
|
+
focusAnchor: Object,
|
|
10
|
+
getPopupContainer: Function,
|
|
11
|
+
preset: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: "antdv"
|
|
14
|
+
},
|
|
15
|
+
as: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: "div"
|
|
18
|
+
},
|
|
19
|
+
align: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: "start"
|
|
22
|
+
},
|
|
23
|
+
alignmentWidth: {
|
|
24
|
+
type: Number,
|
|
25
|
+
default: 0
|
|
26
|
+
},
|
|
27
|
+
matchTriggerWidth: Boolean,
|
|
28
|
+
clipToAnchorAncestors: Boolean,
|
|
29
|
+
closeOnFocusOutside: Boolean,
|
|
30
|
+
outsideBoundary: Object,
|
|
31
|
+
panelRef: Function,
|
|
32
|
+
panelAttrs: Object,
|
|
33
|
+
panelKey: String,
|
|
34
|
+
initialFocus: String,
|
|
35
|
+
zIndex: String
|
|
36
|
+
},
|
|
37
|
+
emits: {
|
|
38
|
+
dismiss: (e) => !0
|
|
39
|
+
},
|
|
40
|
+
setup(e, {
|
|
41
|
+
attrs: g,
|
|
42
|
+
emit: W,
|
|
43
|
+
slots: F
|
|
44
|
+
}) {
|
|
45
|
+
const y = L("body"), T = L({}), o = L(null);
|
|
46
|
+
function l() {
|
|
47
|
+
const n = e.anchor;
|
|
48
|
+
if (!e.open || !n) return;
|
|
49
|
+
const i = n.getBoundingClientRect(), a = y.value, t = typeof a != "string" && a !== document.body ? a : void 0, r = t?.getBoundingClientRect(), u = t ? getComputedStyle(t) : void 0, f = /^(auto|scroll|hidden|clip|overlay)$/, d = f.test(u?.overflowX ?? ""), c = f.test(u?.overflowY ?? ""), h = e.clipToAnchorAncestors ? N(n) : void 0, m = c && t && r ? {
|
|
50
|
+
top: Math.max(r.top + t.clientTop, h?.top ?? 0),
|
|
51
|
+
bottom: Math.min(r.top + t.clientTop + t.clientHeight, h?.bottom ?? window.innerHeight)
|
|
52
|
+
} : h, w = (r?.left ?? 0) + (t?.clientLeft ?? 0), M = d ? Math.max(0, w) : 0, p = d && t ? Math.min(window.innerWidth, w + t.clientWidth) : window.innerWidth, S = Math.max(0, p - M), A = o.value?.offsetWidth ?? 0, b = e.matchTriggerWidth ? i.width : 0, O = Math.max(A, b, e.alignmentWidth), R = e.align === "end" || i.left + O > p, x = e.align === "end" && !t ? Math.min(8, S / 2) : 0, E = Math.max(0, S - 2 * x), B = Math.min(E, Math.max(A, b)), k = R ? i.right - B : i.left, C = o.value ? o.value.scrollHeight + o.value.offsetHeight - o.value.clientHeight : void 0, s = V(i, a, O, C, m);
|
|
53
|
+
delete s.right;
|
|
54
|
+
const H = Math.max(M + x, Math.min(k, p - x - B));
|
|
55
|
+
s.left = `${H - w + (t?.scrollLeft ?? 0)}px`, t && (s.top = `${parseFloat(s.top) - t.clientTop}px`), s.maxWidth = `${E}px`, e.matchTriggerWidth && (s.minWidth = `${Math.min(b, E)}px`), e.zIndex && (s.zIndex = e.zIndex), T.value = s;
|
|
56
|
+
}
|
|
57
|
+
function v(n) {
|
|
58
|
+
if (!e.open || n.key !== "Escape" || n.defaultPrevented) return;
|
|
59
|
+
n.preventDefault(), n.stopPropagation(), W("dismiss", "escape"), (e.focusAnchor ?? e.anchor)?.focus({
|
|
60
|
+
preventScroll: !0
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
return P(o, (n, i, a) => {
|
|
64
|
+
e.panelRef?.(n), n?.addEventListener("keydown", v), a(() => n?.removeEventListener("keydown", v));
|
|
65
|
+
}, {
|
|
66
|
+
flush: "sync"
|
|
67
|
+
}), P(() => [e.open, e.anchor, e.getPopupContainer, e.panelKey], async ([n, i, a], t, r) => {
|
|
68
|
+
if (!n || !i || typeof document > "u") return;
|
|
69
|
+
const u = i;
|
|
70
|
+
let f = !0, d;
|
|
71
|
+
y.value = a?.(i) ?? document.body, l();
|
|
72
|
+
function c(h) {
|
|
73
|
+
const m = h.target;
|
|
74
|
+
!u.contains(m) && !e.outsideBoundary?.contains(m) && !o.value?.contains(m) && W("dismiss", "outside");
|
|
75
|
+
}
|
|
76
|
+
u.addEventListener("keydown", v), document.addEventListener("mousedown", c, !0), document.addEventListener("touchstart", c, !0), e.closeOnFocusOutside && document.addEventListener("focusin", c), window.addEventListener("resize", l), window.addEventListener("scroll", l, !0), r(() => {
|
|
77
|
+
f = !1, d?.disconnect(), u.removeEventListener("keydown", v), document.removeEventListener("mousedown", c, !0), document.removeEventListener("touchstart", c, !0), document.removeEventListener("focusin", c), window.removeEventListener("resize", l), window.removeEventListener("scroll", l, !0);
|
|
78
|
+
}), await j(), f && (l(), e.initialFocus && o.value?.querySelector(e.initialFocus)?.focus({
|
|
79
|
+
preventScroll: !0
|
|
80
|
+
}), typeof ResizeObserver < "u" && (d = new ResizeObserver(l), d.observe(i), o.value && d.observe(o.value)));
|
|
81
|
+
}, {
|
|
82
|
+
immediate: !0
|
|
83
|
+
}), () => z(I, {
|
|
84
|
+
to: y.value
|
|
85
|
+
}, {
|
|
86
|
+
default: () => [z(K, {
|
|
87
|
+
name: "vtg-table-popup"
|
|
88
|
+
}, {
|
|
89
|
+
default: () => [e.open && e.anchor && _(e.as, {
|
|
90
|
+
...g,
|
|
91
|
+
...e.panelAttrs,
|
|
92
|
+
key: e.panelKey,
|
|
93
|
+
ref: o,
|
|
94
|
+
class: ["vtg-table-popup", g.class, e.panelAttrs?.class],
|
|
95
|
+
style: [g.style, e.panelAttrs?.style, T.value],
|
|
96
|
+
"data-vtg-preset": e.preset
|
|
97
|
+
}, F.default?.())]
|
|
98
|
+
})]
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
export {
|
|
103
|
+
q as default
|
|
104
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TablePopup.test.d.ts","sourceRoot":"","sources":["../../../../../table/src/components/TablePopup.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VTableHeaderAlignment.test.d.ts","sourceRoot":"","sources":["../../../../../table/src/components/VTableHeaderAlignment.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* 在标题左侧预留与右侧控件实际占用相同的空间,使标题以整列为基准居中。
|
|
4
|
+
* 只测量现有布局,不推断预设、图标数量或自定义图标的宽度;样式由主题消费。
|
|
5
|
+
*/
|
|
6
|
+
export declare function useHeaderTitleBalance(enabled: Ref<boolean>, innerRef: Ref<HTMLElement | null>, titleRef: Ref<HTMLElement | null>, filterRef?: Ref<HTMLElement | null>, sortRef?: Ref<HTMLElement | null>): Ref<number>;
|
|
7
|
+
//# sourceMappingURL=useHeaderTitleBalance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useHeaderTitleBalance.d.ts","sourceRoot":"","sources":["../../../../../table/src/composables/useHeaderTitleBalance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAEjE;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,EACrB,QAAQ,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,EACjC,QAAQ,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,EACjC,SAAS,GAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAoB,EACrD,OAAO,GAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAoB,GAClD,GAAG,CAAC,MAAM,CAAC,CAyFb"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { shallowRef as l, watch as A, onScopeDispose as B } from "vue";
|
|
2
|
+
function C(m, f, h, v = l(null), p = l(null)) {
|
|
3
|
+
const a = l(0);
|
|
4
|
+
let e, n, u = !1;
|
|
5
|
+
function c() {
|
|
6
|
+
n = void 0;
|
|
7
|
+
const o = f.value, s = h.value;
|
|
8
|
+
if (u || !m.value || !o || !s) {
|
|
9
|
+
a.value = 0;
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const t = o.getBoundingClientRect();
|
|
13
|
+
if (t.width <= 0 || !Number.isFinite(t.width)) {
|
|
14
|
+
a.value = 0;
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const i = o.offsetWidth, r = i > 0 && Math.abs(t.width - i) > 1 ? t.width / i : 1, M = t.width / r;
|
|
18
|
+
function w(d) {
|
|
19
|
+
if (!d) return 0;
|
|
20
|
+
const y = getComputedStyle(d);
|
|
21
|
+
return d.getBoundingClientRect().width / r + (Number.parseFloat(y.marginLeft) || 0) + (Number.parseFloat(y.marginRight) || 0);
|
|
22
|
+
}
|
|
23
|
+
const g = Math.max(0, w(v.value) + w(p.value)), F = Math.min(g, Math.max(0, M - g));
|
|
24
|
+
Math.abs(a.value - F) > 0.01 && (a.value = F);
|
|
25
|
+
}
|
|
26
|
+
function b() {
|
|
27
|
+
n !== void 0 && typeof cancelAnimationFrame < "u" && cancelAnimationFrame(n), n = void 0;
|
|
28
|
+
}
|
|
29
|
+
function x() {
|
|
30
|
+
if (!(u || n !== void 0)) {
|
|
31
|
+
if (typeof requestAnimationFrame > "u") {
|
|
32
|
+
c();
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
n = requestAnimationFrame(c);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return A(
|
|
39
|
+
[m, f, h, v, p],
|
|
40
|
+
([o, s, t, i, r]) => {
|
|
41
|
+
b(), e?.disconnect(), e = void 0, c(), !(!o || !s || !t || typeof ResizeObserver > "u") && (e = new ResizeObserver(x), e.observe(s), e.observe(t), i && e.observe(i), r && e.observe(r));
|
|
42
|
+
},
|
|
43
|
+
{ immediate: !0, flush: "post" }
|
|
44
|
+
), B(() => {
|
|
45
|
+
u = !0, b(), e?.disconnect();
|
|
46
|
+
}), a;
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
C as useHeaderTitleBalance
|
|
50
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useHeaderTitleBalance.test.d.ts","sourceRoot":"","sources":["../../../../../table/src/composables/useHeaderTitleBalance.test.ts"],"names":[],"mappings":""}
|
|
@@ -6,6 +6,8 @@ export interface TablePresetConfig {
|
|
|
6
6
|
filterIcon: Component;
|
|
7
7
|
filterSingleSelectMode: 'radio' | 'highlight';
|
|
8
8
|
showSorterTooltip: boolean;
|
|
9
|
+
/** Whether centered titles use the full cell or travel with adjacent controls. */
|
|
10
|
+
headerTitleCenter: 'cell' | 'content';
|
|
9
11
|
emptyIcon?: Component;
|
|
10
12
|
loadingIcon: Component;
|
|
11
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preset-config.d.ts","sourceRoot":"","sources":["../../../../table/src/preset-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AACpC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAazD,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,SAAS,CAAA;IACtB,YAAY,EAAE,SAAS,CAAA;IACvB,UAAU,EAAE,SAAS,CAAA;IACrB,sBAAsB,EAAE,OAAO,GAAG,WAAW,CAAA;IAC7C,iBAAiB,EAAE,OAAO,CAAA;IAC1B,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,WAAW,EAAE,SAAS,CAAA;CACvB;AAED,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,eAAe,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"preset-config.d.ts","sourceRoot":"","sources":["../../../../table/src/preset-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AACpC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAazD,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,SAAS,CAAA;IACtB,YAAY,EAAE,SAAS,CAAA;IACvB,UAAU,EAAE,SAAS,CAAA;IACrB,sBAAsB,EAAE,OAAO,GAAG,WAAW,CAAA;IAC7C,iBAAiB,EAAE,OAAO,CAAA;IAC1B,kFAAkF;IAClF,iBAAiB,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,WAAW,EAAE,SAAS,CAAA;CACvB;AAED,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,eAAe,EAAE,iBAAiB,CAoBzE,CAAA;AAED,wBAAgB,wBAAwB,CAAC,IAAI,GAAE,eAAyB,GAAG,iBAAiB,CAE3F"}
|
|
@@ -1,35 +1,37 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import e from "../../icons/src/CaretUpIcon.mjs";
|
|
2
|
+
import r from "../../icons/src/CaretDownIcon.mjs";
|
|
3
3
|
import n from "../../icons/src/FilterFilledIcon.mjs";
|
|
4
4
|
import i from "../../icons/src/ElCaretTopIcon.mjs";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import l from "../../icons/src/ElCaretBottomIcon.mjs";
|
|
6
|
+
import c from "../../icons/src/ElArrowDownIcon.mjs";
|
|
7
7
|
import m from "../../icons/src/AntdvEmptyIcon.mjs";
|
|
8
8
|
import p from "../../icons/src/AntdvSpinIndicator.mjs";
|
|
9
9
|
import I from "../../icons/src/ElLoadingIcon.mjs";
|
|
10
10
|
const o = {
|
|
11
11
|
antdv: {
|
|
12
|
-
sortAscIcon:
|
|
13
|
-
sortDescIcon:
|
|
12
|
+
sortAscIcon: e,
|
|
13
|
+
sortDescIcon: r,
|
|
14
14
|
filterIcon: n,
|
|
15
15
|
filterSingleSelectMode: "radio",
|
|
16
16
|
showSorterTooltip: !0,
|
|
17
|
+
headerTitleCenter: "cell",
|
|
17
18
|
emptyIcon: m,
|
|
18
19
|
loadingIcon: p
|
|
19
20
|
},
|
|
20
21
|
"element-plus": {
|
|
21
22
|
sortAscIcon: i,
|
|
22
|
-
sortDescIcon:
|
|
23
|
-
filterIcon:
|
|
23
|
+
sortDescIcon: l,
|
|
24
|
+
filterIcon: c,
|
|
24
25
|
filterSingleSelectMode: "highlight",
|
|
25
26
|
showSorterTooltip: !1,
|
|
27
|
+
headerTitleCenter: "content",
|
|
26
28
|
loadingIcon: I
|
|
27
29
|
}
|
|
28
30
|
};
|
|
29
|
-
function
|
|
31
|
+
function T(t = "antdv") {
|
|
30
32
|
return o[t] ?? o.antdv;
|
|
31
33
|
}
|
|
32
34
|
export {
|
|
33
|
-
|
|
35
|
+
T as resolveTablePresetConfig,
|
|
34
36
|
o as tablePresetConfigs
|
|
35
37
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { TableContext } from '../context';
|
|
2
1
|
export interface PopupAnchorRect {
|
|
3
2
|
top: number;
|
|
4
3
|
left: number;
|
|
@@ -8,11 +7,7 @@ export interface PopupAnchorRect {
|
|
|
8
7
|
/** Available vertical space around a trigger, including ancestors that clip its content. */
|
|
9
8
|
export declare function getPopupVerticalBoundary(trigger: HTMLElement): Pick<PopupAnchorRect, 'top' | 'bottom'>;
|
|
10
9
|
/**
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
|
-
export declare function resolvePopupContainer(tableContext: TableContext, triggerNode: HTMLElement | null): HTMLElement | string;
|
|
14
|
-
/**
|
|
15
|
-
* 计算下拉层定位样式(TableHeaderCell / FilterDropdown / SelectionDropdown 共享)。
|
|
10
|
+
* 计算表格弹层定位样式。
|
|
16
11
|
*
|
|
17
12
|
* - 挂载 body(或字符串容器):fixed 定位,按视口宽度决定左右对齐
|
|
18
13
|
* - 挂载自定义容器:absolute 定位,按容器滚动偏移换算
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popupPosition.d.ts","sourceRoot":"","sources":["../../../../../table/src/utils/popupPosition.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"popupPosition.d.ts","sourceRoot":"","sources":["../../../../../table/src/utils/popupPosition.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf;AAED,4FAA4F;AAC5F,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,WAAW,GACnB,IAAI,CAAC,eAAe,EAAE,KAAK,GAAG,QAAQ,CAAC,CAWzC;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,eAAe,EAC3B,SAAS,EAAE,WAAW,GAAG,MAAM,EAC/B,YAAY,EAAE,MAAM,EACpB,WAAW,CAAC,EAAE,MAAM,EACpB,QAAQ,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,KAAK,GAAG,QAAQ,CAAC,GACjD,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAwDxB"}
|
|
@@ -1,43 +1,39 @@
|
|
|
1
|
-
function
|
|
2
|
-
let o = 0,
|
|
1
|
+
function c(t) {
|
|
2
|
+
let o = 0, i = window.innerHeight;
|
|
3
3
|
for (let e = t.parentElement; e; e = e.parentElement) {
|
|
4
|
-
const
|
|
5
|
-
if (!/^(auto|scroll|hidden|clip|overlay)$/.test(
|
|
4
|
+
const n = getComputedStyle(e);
|
|
5
|
+
if (!/^(auto|scroll|hidden|clip|overlay)$/.test(n.overflowY)) continue;
|
|
6
6
|
const l = e.getBoundingClientRect();
|
|
7
|
-
o = Math.max(o, l.top + (parseFloat(
|
|
7
|
+
o = Math.max(o, l.top + (parseFloat(n.borderTopWidth) || 0)), i = Math.min(i, l.bottom - (parseFloat(n.borderBottomWidth) || 0));
|
|
8
8
|
}
|
|
9
|
-
return { top: o, bottom:
|
|
9
|
+
return { top: o, bottom: i };
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
function h(t, o, n, e, i) {
|
|
15
|
-
const l = typeof window > "u" ? 0 : window.innerWidth, m = typeof window > "u" ? 0 : window.innerHeight, d = Math.max(
|
|
11
|
+
function y(t, o, i, e, n) {
|
|
12
|
+
const l = typeof window > "u" ? 0 : window.innerWidth, m = typeof window > "u" ? 0 : window.innerHeight, s = Math.max(
|
|
16
13
|
0,
|
|
17
|
-
Math.min(m,
|
|
18
|
-
),
|
|
19
|
-
maxHeight: `${
|
|
20
|
-
transformOrigin:
|
|
14
|
+
Math.min(m, n?.bottom ?? m) - t.bottom - 4
|
|
15
|
+
), p = Math.max(0, t.top - Math.max(0, n?.top ?? 0) - 4), d = e !== void 0 && e > s && p > s, u = Math.min(e ?? 0, d ? p : s), w = d ? t.top - u - 4 : t.bottom + 4, x = e === void 0 ? {} : {
|
|
16
|
+
maxHeight: `${d ? p : s}px`,
|
|
17
|
+
transformOrigin: d ? "bottom center" : "top center"
|
|
21
18
|
};
|
|
22
19
|
if (typeof o == "string" || typeof document < "u" && o === document.body) {
|
|
23
|
-
const
|
|
20
|
+
const a = t.left + i > l, g = {
|
|
24
21
|
position: "fixed",
|
|
25
|
-
top: `${
|
|
22
|
+
top: `${w}px`,
|
|
26
23
|
zIndex: "1050",
|
|
27
|
-
...
|
|
24
|
+
...x
|
|
28
25
|
};
|
|
29
|
-
return
|
|
26
|
+
return a ? g.right = `${l - t.right}px` : g.left = `${t.left}px`, g;
|
|
30
27
|
}
|
|
31
|
-
const
|
|
28
|
+
const f = o.getBoundingClientRect(), h = t.left - f.left + i > o.clientWidth, r = {
|
|
32
29
|
position: "absolute",
|
|
33
|
-
top: `${
|
|
30
|
+
top: `${w - f.top + o.scrollTop}px`,
|
|
34
31
|
zIndex: "1050",
|
|
35
|
-
...
|
|
32
|
+
...x
|
|
36
33
|
};
|
|
37
|
-
return
|
|
34
|
+
return h ? r.right = `${f.right - t.right + o.scrollLeft}px` : r.left = `${t.left - f.left + o.scrollLeft}px`, r;
|
|
38
35
|
}
|
|
39
36
|
export {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
b as resolvePopupContainer
|
|
37
|
+
y as getPopupPositionStyle,
|
|
38
|
+
c as getPopupVerticalBoundary
|
|
43
39
|
};
|
|
@@ -5,8 +5,8 @@ export declare const columnSettingsTheme: {
|
|
|
5
5
|
readonly root: "inline-flex items-center gap-4";
|
|
6
6
|
readonly trigger: "inline-flex items-center justify-center h-6 w-6 p-0 border-0 bg-transparent text-[length:var(--vtg-column-settings-icon-size)] text-[color:var(--color-on-surface)] cursor-pointer transition-colors duration-200 hover:text-[color:var(--color-primary)] disabled:cursor-not-allowed disabled:text-[color:var(--color-text-disabled)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[color:var(--color-primary)]";
|
|
7
7
|
readonly densityTrigger: "inline-flex items-center justify-center h-6 w-6 p-0 border-0 bg-transparent text-[length:var(--vtg-column-settings-icon-size)] text-[color:var(--color-on-surface)] cursor-pointer transition-colors duration-200 hover:text-[color:var(--color-primary)] disabled:cursor-not-allowed disabled:text-[color:var(--color-text-disabled)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[color:var(--color-primary)]";
|
|
8
|
-
readonly popup: "
|
|
9
|
-
readonly densityPopup: "
|
|
8
|
+
readonly popup: "[--vtg-table-popup-panel-radius:var(--vtg-column-settings-radius)] [--vtg-table-popup-panel-shadow:var(--vtg-column-settings-shadow)] flex flex-col [--vtg-table-popup-width:var(--vtg-column-settings-width)] max-w-[calc(100vw-16px)]";
|
|
9
|
+
readonly densityPopup: "[--vtg-table-popup-panel-radius:var(--vtg-column-settings-radius)] [--vtg-table-popup-panel-shadow:var(--vtg-column-settings-shadow)] min-w-[80px]";
|
|
10
10
|
readonly density: "block w-full border-0 rounded-[var(--vtg-btn-border-radius-sm)] px-3 py-[5px] text-left text-[length:var(--vtg-table-font-size)] font-normal leading-[var(--vtg-table-line-height)] bg-transparent cursor-pointer hover:bg-[color:var(--color-control-item-hover-bg)] aria-checked:bg-[color:var(--color-control-item-active-bg)] aria-checked:text-[color:var(--color-primary)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[color:var(--color-primary)]";
|
|
11
11
|
readonly header: "flex items-center justify-between gap-3 h-8 mb-2";
|
|
12
12
|
readonly heading: "group inline-flex items-center gap-2 cursor-pointer font-normal";
|
|
@@ -33,14 +33,14 @@ export declare const columnSettingsTheme: {
|
|
|
33
33
|
};
|
|
34
34
|
export declare const elementPlusColumnSettingsTheme: {
|
|
35
35
|
readonly slots: {
|
|
36
|
-
readonly popup: "box-border overflow-auto rounded-[var(--vtg-column-settings-radius)] bg-[color:var(--color-surface)] text-[color:var(--color-on-surface)] text-[length:var(--vtg-table-font-size)] font-[family-name:var(--font-family-base)] font-normal leading-[var(--vtg-table-line-height)] shadow-[var(--vtg-column-settings-shadow)] flex flex-col w-[var(--vtg-column-settings-width)] max-w-[calc(100vw-16px)] p-3 border border-[color:var(--color-border)]";
|
|
37
|
-
readonly densityPopup: "box-border overflow-auto rounded-[var(--vtg-column-settings-radius)] bg-[color:var(--color-surface)] text-[color:var(--color-on-surface)] text-[length:var(--vtg-table-font-size)] font-[family-name:var(--font-family-base)] font-normal leading-[var(--vtg-table-line-height)] shadow-[var(--vtg-column-settings-shadow)] min-w-[80px] p-1 border border-[color:var(--color-border)]";
|
|
38
36
|
readonly checkbox: "peer m-0 h-full w-full appearance-none border border-[color:var(--color-border)] rounded-[var(--vtg-checkbox-border-radius)] bg-[color:var(--color-surface)] cursor-inherit transition-colors duration-300 checked:bg-[color:var(--color-primary)] checked:border-[color:var(--color-primary)] group-hover:enabled:border-[color:var(--color-primary)] group-hover:enabled:checked:bg-[color:var(--color-primary-hover)] group-hover:enabled:checked:border-transparent disabled:bg-[color:var(--color-bg-disabled)] disabled:border-[color:var(--color-border)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[color:var(--color-primary)] indeterminate:bg-[color:var(--color-primary)] indeterminate:border-[color:var(--color-primary)]";
|
|
39
37
|
readonly checkMark: `${string} peer-disabled:border-[color:var(--color-text-placeholder)]`;
|
|
40
38
|
readonly indeterminateMark: string;
|
|
41
39
|
readonly root: "inline-flex items-center gap-4";
|
|
42
40
|
readonly trigger: "inline-flex items-center justify-center h-6 w-6 p-0 border-0 bg-transparent text-[length:var(--vtg-column-settings-icon-size)] text-[color:var(--color-on-surface)] cursor-pointer transition-colors duration-200 hover:text-[color:var(--color-primary)] disabled:cursor-not-allowed disabled:text-[color:var(--color-text-disabled)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[color:var(--color-primary)]";
|
|
43
41
|
readonly densityTrigger: "inline-flex items-center justify-center h-6 w-6 p-0 border-0 bg-transparent text-[length:var(--vtg-column-settings-icon-size)] text-[color:var(--color-on-surface)] cursor-pointer transition-colors duration-200 hover:text-[color:var(--color-primary)] disabled:cursor-not-allowed disabled:text-[color:var(--color-text-disabled)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[color:var(--color-primary)]";
|
|
42
|
+
readonly popup: "[--vtg-table-popup-panel-radius:var(--vtg-column-settings-radius)] [--vtg-table-popup-panel-shadow:var(--vtg-column-settings-shadow)] flex flex-col [--vtg-table-popup-width:var(--vtg-column-settings-width)] max-w-[calc(100vw-16px)]";
|
|
43
|
+
readonly densityPopup: "[--vtg-table-popup-panel-radius:var(--vtg-column-settings-radius)] [--vtg-table-popup-panel-shadow:var(--vtg-column-settings-shadow)] min-w-[80px]";
|
|
44
44
|
readonly density: "block w-full border-0 rounded-[var(--vtg-btn-border-radius-sm)] px-3 py-[5px] text-left text-[length:var(--vtg-table-font-size)] font-normal leading-[var(--vtg-table-line-height)] bg-transparent cursor-pointer hover:bg-[color:var(--color-control-item-hover-bg)] aria-checked:bg-[color:var(--color-control-item-active-bg)] aria-checked:text-[color:var(--color-primary)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[color:var(--color-primary)]";
|
|
45
45
|
readonly header: "flex items-center justify-between gap-3 h-8 mb-2";
|
|
46
46
|
readonly heading: "group inline-flex items-center gap-2 cursor-pointer font-normal";
|
|
@@ -69,8 +69,8 @@ export declare function resolveColumnSettingsThemePreset(name?: ThemePresetName)
|
|
|
69
69
|
readonly root: "inline-flex items-center gap-4";
|
|
70
70
|
readonly trigger: "inline-flex items-center justify-center h-6 w-6 p-0 border-0 bg-transparent text-[length:var(--vtg-column-settings-icon-size)] text-[color:var(--color-on-surface)] cursor-pointer transition-colors duration-200 hover:text-[color:var(--color-primary)] disabled:cursor-not-allowed disabled:text-[color:var(--color-text-disabled)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[color:var(--color-primary)]";
|
|
71
71
|
readonly densityTrigger: "inline-flex items-center justify-center h-6 w-6 p-0 border-0 bg-transparent text-[length:var(--vtg-column-settings-icon-size)] text-[color:var(--color-on-surface)] cursor-pointer transition-colors duration-200 hover:text-[color:var(--color-primary)] disabled:cursor-not-allowed disabled:text-[color:var(--color-text-disabled)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[color:var(--color-primary)]";
|
|
72
|
-
readonly popup: "
|
|
73
|
-
readonly densityPopup: "
|
|
72
|
+
readonly popup: "[--vtg-table-popup-panel-radius:var(--vtg-column-settings-radius)] [--vtg-table-popup-panel-shadow:var(--vtg-column-settings-shadow)] flex flex-col [--vtg-table-popup-width:var(--vtg-column-settings-width)] max-w-[calc(100vw-16px)]";
|
|
73
|
+
readonly densityPopup: "[--vtg-table-popup-panel-radius:var(--vtg-column-settings-radius)] [--vtg-table-popup-panel-shadow:var(--vtg-column-settings-shadow)] min-w-[80px]";
|
|
74
74
|
readonly density: "block w-full border-0 rounded-[var(--vtg-btn-border-radius-sm)] px-3 py-[5px] text-left text-[length:var(--vtg-table-font-size)] font-normal leading-[var(--vtg-table-line-height)] bg-transparent cursor-pointer hover:bg-[color:var(--color-control-item-hover-bg)] aria-checked:bg-[color:var(--color-control-item-active-bg)] aria-checked:text-[color:var(--color-primary)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[color:var(--color-primary)]";
|
|
75
75
|
readonly header: "flex items-center justify-between gap-3 h-8 mb-2";
|
|
76
76
|
readonly heading: "group inline-flex items-center gap-2 cursor-pointer font-normal";
|
|
@@ -96,14 +96,14 @@ export declare function resolveColumnSettingsThemePreset(name?: ThemePresetName)
|
|
|
96
96
|
};
|
|
97
97
|
} | {
|
|
98
98
|
readonly slots: {
|
|
99
|
-
readonly popup: "box-border overflow-auto rounded-[var(--vtg-column-settings-radius)] bg-[color:var(--color-surface)] text-[color:var(--color-on-surface)] text-[length:var(--vtg-table-font-size)] font-[family-name:var(--font-family-base)] font-normal leading-[var(--vtg-table-line-height)] shadow-[var(--vtg-column-settings-shadow)] flex flex-col w-[var(--vtg-column-settings-width)] max-w-[calc(100vw-16px)] p-3 border border-[color:var(--color-border)]";
|
|
100
|
-
readonly densityPopup: "box-border overflow-auto rounded-[var(--vtg-column-settings-radius)] bg-[color:var(--color-surface)] text-[color:var(--color-on-surface)] text-[length:var(--vtg-table-font-size)] font-[family-name:var(--font-family-base)] font-normal leading-[var(--vtg-table-line-height)] shadow-[var(--vtg-column-settings-shadow)] min-w-[80px] p-1 border border-[color:var(--color-border)]";
|
|
101
99
|
readonly checkbox: "peer m-0 h-full w-full appearance-none border border-[color:var(--color-border)] rounded-[var(--vtg-checkbox-border-radius)] bg-[color:var(--color-surface)] cursor-inherit transition-colors duration-300 checked:bg-[color:var(--color-primary)] checked:border-[color:var(--color-primary)] group-hover:enabled:border-[color:var(--color-primary)] group-hover:enabled:checked:bg-[color:var(--color-primary-hover)] group-hover:enabled:checked:border-transparent disabled:bg-[color:var(--color-bg-disabled)] disabled:border-[color:var(--color-border)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[color:var(--color-primary)] indeterminate:bg-[color:var(--color-primary)] indeterminate:border-[color:var(--color-primary)]";
|
|
102
100
|
readonly checkMark: `${string} peer-disabled:border-[color:var(--color-text-placeholder)]`;
|
|
103
101
|
readonly indeterminateMark: string;
|
|
104
102
|
readonly root: "inline-flex items-center gap-4";
|
|
105
103
|
readonly trigger: "inline-flex items-center justify-center h-6 w-6 p-0 border-0 bg-transparent text-[length:var(--vtg-column-settings-icon-size)] text-[color:var(--color-on-surface)] cursor-pointer transition-colors duration-200 hover:text-[color:var(--color-primary)] disabled:cursor-not-allowed disabled:text-[color:var(--color-text-disabled)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[color:var(--color-primary)]";
|
|
106
104
|
readonly densityTrigger: "inline-flex items-center justify-center h-6 w-6 p-0 border-0 bg-transparent text-[length:var(--vtg-column-settings-icon-size)] text-[color:var(--color-on-surface)] cursor-pointer transition-colors duration-200 hover:text-[color:var(--color-primary)] disabled:cursor-not-allowed disabled:text-[color:var(--color-text-disabled)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[color:var(--color-primary)]";
|
|
105
|
+
readonly popup: "[--vtg-table-popup-panel-radius:var(--vtg-column-settings-radius)] [--vtg-table-popup-panel-shadow:var(--vtg-column-settings-shadow)] flex flex-col [--vtg-table-popup-width:var(--vtg-column-settings-width)] max-w-[calc(100vw-16px)]";
|
|
106
|
+
readonly densityPopup: "[--vtg-table-popup-panel-radius:var(--vtg-column-settings-radius)] [--vtg-table-popup-panel-shadow:var(--vtg-column-settings-shadow)] min-w-[80px]";
|
|
107
107
|
readonly density: "block w-full border-0 rounded-[var(--vtg-btn-border-radius-sm)] px-3 py-[5px] text-left text-[length:var(--vtg-table-font-size)] font-normal leading-[var(--vtg-table-line-height)] bg-transparent cursor-pointer hover:bg-[color:var(--color-control-item-hover-bg)] aria-checked:bg-[color:var(--color-control-item-active-bg)] aria-checked:text-[color:var(--color-primary)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[color:var(--color-primary)]";
|
|
108
108
|
readonly header: "flex items-center justify-between gap-3 h-8 mb-2";
|
|
109
109
|
readonly heading: "group inline-flex items-center gap-2 cursor-pointer font-normal";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"column-settings.d.ts","sourceRoot":"","sources":["../../../../theme/src/column-settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,eAAe,EAEhB,MAAM,oBAAoB,CAAA;AAU3B,4FAA4F;AAC5F,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCA,CAAA;AAEhC,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"column-settings.d.ts","sourceRoot":"","sources":["../../../../theme/src/column-settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,eAAe,EAEhB,MAAM,oBAAoB,CAAA;AAU3B,4FAA4F;AAC5F,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCA,CAAA;AAEhC,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQX,CAAA;AAEhC,MAAM,MAAM,yBAAyB,GAAG,OAAO,mBAAmB,CAAA;AAClE,MAAM,MAAM,mBAAmB,GAAG,MAAM,yBAAyB,CAAC,OAAO,CAAC,CAAA;AAE1E,wBAAgB,gCAAgC,CAAC,IAAI,GAAE,eAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE/E;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;CAeqB,CAAA;AAEpD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;CAeqB,CAAA"}
|
|
@@ -1,50 +1,48 @@
|
|
|
1
1
|
import { antdvCheckboxTheme as o } from "./presets/antdv/checkbox.mjs";
|
|
2
2
|
import { elementPlusCheckboxTheme as t } from "./presets/element-plus/checkbox.mjs";
|
|
3
|
-
const
|
|
3
|
+
const e = "focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[color:var(--color-primary)]", l = `inline-flex items-center justify-center h-6 w-6 p-0 border-0 bg-transparent text-[length:var(--vtg-column-settings-icon-size)] text-[color:var(--color-on-surface)] cursor-pointer transition-colors duration-200 hover:text-[color:var(--color-primary)] disabled:cursor-not-allowed disabled:text-[color:var(--color-text-disabled)] ${e}`, n = "[--vtg-table-popup-panel-radius:var(--vtg-column-settings-radius)] [--vtg-table-popup-panel-shadow:var(--vtg-column-settings-shadow)]", r = {
|
|
4
4
|
slots: {
|
|
5
5
|
root: "inline-flex items-center gap-4",
|
|
6
6
|
trigger: l,
|
|
7
7
|
densityTrigger: l,
|
|
8
|
-
popup: `${n} flex flex-col
|
|
9
|
-
densityPopup: `${n} min-w-[80px]
|
|
10
|
-
density: `block w-full border-0 rounded-[var(--vtg-btn-border-radius-sm)] px-3 py-[5px] text-left text-[length:var(--vtg-table-font-size)] font-normal leading-[var(--vtg-table-line-height)] bg-transparent cursor-pointer hover:bg-[color:var(--color-control-item-hover-bg)] aria-checked:bg-[color:var(--color-control-item-active-bg)] aria-checked:text-[color:var(--color-primary)] ${
|
|
8
|
+
popup: `${n} flex flex-col [--vtg-table-popup-width:var(--vtg-column-settings-width)] max-w-[calc(100vw-16px)]`,
|
|
9
|
+
densityPopup: `${n} min-w-[80px]`,
|
|
10
|
+
density: `block w-full border-0 rounded-[var(--vtg-btn-border-radius-sm)] px-3 py-[5px] text-left text-[length:var(--vtg-table-font-size)] font-normal leading-[var(--vtg-table-line-height)] bg-transparent cursor-pointer hover:bg-[color:var(--color-control-item-hover-bg)] aria-checked:bg-[color:var(--color-control-item-active-bg)] aria-checked:text-[color:var(--color-primary)] ${e}`,
|
|
11
11
|
header: "flex items-center justify-between gap-3 h-8 mb-2",
|
|
12
12
|
heading: "group inline-flex items-center gap-2 cursor-pointer font-normal",
|
|
13
|
-
reset: `shrink-0 border-0 bg-transparent p-0 text-[color:var(--color-primary)] text-[length:var(--vtg-table-font-size)] font-semibold cursor-pointer hover:text-[color:var(--color-primary-hover)] ${
|
|
13
|
+
reset: `shrink-0 border-0 bg-transparent p-0 text-[color:var(--color-primary)] text-[length:var(--vtg-table-font-size)] font-semibold cursor-pointer hover:text-[color:var(--color-primary-hover)] ${e}`,
|
|
14
14
|
columns: "m-0 max-h-[280px] overflow-auto list-none px-0 py-2",
|
|
15
15
|
children: "m-0 list-none pl-6",
|
|
16
16
|
item: "m-0 p-0 pb-1",
|
|
17
17
|
row: "flex min-w-0 items-center gap-1",
|
|
18
18
|
dragHandle: "shrink-0 select-none text-[color:var(--color-muted)] cursor-grab active:cursor-grabbing [&:not([draggable=true])]:cursor-not-allowed",
|
|
19
19
|
pinActions: "inline-flex shrink-0 items-center gap-0.5",
|
|
20
|
-
pinAction: `inline-flex items-center justify-center h-5 w-5 p-0 border-0 rounded-[var(--vtg-btn-border-radius-sm)] bg-transparent text-[color:var(--color-muted)] cursor-pointer hover:text-[color:var(--color-primary)] hover:bg-[color:var(--color-control-item-hover-bg)] aria-pressed:text-[color:var(--color-primary)] disabled:cursor-not-allowed disabled:text-[color:var(--color-text-disabled)] ${
|
|
20
|
+
pinAction: `inline-flex items-center justify-center h-5 w-5 p-0 border-0 rounded-[var(--vtg-btn-border-radius-sm)] bg-transparent text-[color:var(--color-muted)] cursor-pointer hover:text-[color:var(--color-primary)] hover:bg-[color:var(--color-control-item-hover-bg)] aria-pressed:text-[color:var(--color-primary)] disabled:cursor-not-allowed disabled:text-[color:var(--color-text-disabled)] ${e}`,
|
|
21
21
|
pinIcon: "h-[var(--vtg-column-settings-pin-icon-size,14px)] w-[var(--vtg-column-settings-pin-icon-size,14px)]",
|
|
22
22
|
group: "m-0 list-none p-0",
|
|
23
23
|
groupTitle: "py-1 text-[length:var(--vtg-table-font-size)] text-[color:var(--color-muted)]",
|
|
24
24
|
groupColumns: "m-0 list-none p-0",
|
|
25
25
|
label: "group flex min-w-0 flex-1 min-h-6 items-center gap-1 cursor-pointer has-[:disabled]:cursor-not-allowed has-[:disabled]:text-[color:var(--color-text-disabled)]",
|
|
26
26
|
checkboxControl: "relative inline-flex shrink-0 h-[var(--vtg-checkbox-size)] w-[var(--vtg-checkbox-size)]",
|
|
27
|
-
checkbox: `peer m-0 h-full w-full appearance-none border border-[color:var(--color-border)] rounded-[var(--vtg-checkbox-border-radius)] bg-[color:var(--color-surface)] cursor-inherit transition-colors duration-300 checked:bg-[color:var(--color-primary)] checked:border-[color:var(--color-primary)] group-hover:enabled:border-[color:var(--color-primary)] group-hover:enabled:checked:bg-[color:var(--color-primary-hover)] group-hover:enabled:checked:border-transparent disabled:bg-[color:var(--color-bg-disabled)] disabled:border-[color:var(--color-border)] ${
|
|
27
|
+
checkbox: `peer m-0 h-full w-full appearance-none border border-[color:var(--color-border)] rounded-[var(--vtg-checkbox-border-radius)] bg-[color:var(--color-surface)] cursor-inherit transition-colors duration-300 checked:bg-[color:var(--color-primary)] checked:border-[color:var(--color-primary)] group-hover:enabled:border-[color:var(--color-primary)] group-hover:enabled:checked:bg-[color:var(--color-primary-hover)] group-hover:enabled:checked:border-transparent disabled:bg-[color:var(--color-bg-disabled)] disabled:border-[color:var(--color-border)] ${e}`,
|
|
28
28
|
checkMark: `${o.slots.checkMark} peer-disabled:border-[color:var(--color-text-disabled)]`,
|
|
29
29
|
indeterminateMark: o.slots.indeterminateMark,
|
|
30
30
|
labelText: "min-w-0 flex-1 truncate px-1",
|
|
31
31
|
empty: "py-2 text-[color:var(--color-muted)]"
|
|
32
32
|
}
|
|
33
33
|
}, a = {
|
|
34
|
-
...
|
|
34
|
+
...r,
|
|
35
35
|
slots: {
|
|
36
|
-
...
|
|
37
|
-
|
|
38
|
-
densityPopup: `${e.slots.densityPopup} border border-[color:var(--color-border)]`,
|
|
39
|
-
checkbox: `${e.slots.checkbox} indeterminate:bg-[color:var(--color-primary)] indeterminate:border-[color:var(--color-primary)]`,
|
|
36
|
+
...r.slots,
|
|
37
|
+
checkbox: `${r.slots.checkbox} indeterminate:bg-[color:var(--color-primary)] indeterminate:border-[color:var(--color-primary)]`,
|
|
40
38
|
checkMark: `${t.slots.checkMark} peer-disabled:border-[color:var(--color-text-placeholder)]`,
|
|
41
39
|
indeterminateMark: t.slots.indeterminateMark
|
|
42
40
|
}
|
|
43
41
|
};
|
|
44
42
|
function d(i = "antdv") {
|
|
45
|
-
return i === "element-plus" ? a :
|
|
43
|
+
return i === "element-plus" ? a : r;
|
|
46
44
|
}
|
|
47
|
-
const
|
|
45
|
+
const p = {
|
|
48
46
|
title: "列设置",
|
|
49
47
|
reset: "重置",
|
|
50
48
|
density: "表格密度",
|
|
@@ -59,7 +57,7 @@ const m = {
|
|
|
59
57
|
unfixed: "不固定",
|
|
60
58
|
mixed: "混合固定",
|
|
61
59
|
move: "拖动调整列顺序"
|
|
62
|
-
},
|
|
60
|
+
}, m = {
|
|
63
61
|
title: "Column settings",
|
|
64
62
|
reset: "Reset",
|
|
65
63
|
density: "Density",
|
|
@@ -76,9 +74,9 @@ const m = {
|
|
|
76
74
|
move: "Drag to reorder columns"
|
|
77
75
|
};
|
|
78
76
|
export {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
m as columnSettingsEnUS,
|
|
78
|
+
r as columnSettingsTheme,
|
|
79
|
+
p as columnSettingsZhCN,
|
|
82
80
|
a as elementPlusColumnSettingsTheme,
|
|
83
81
|
d as resolveColumnSettingsThemePreset
|
|
84
82
|
};
|