@vtable-guild/vtable-guild 2.9.0-alpha.7 → 2.9.0-alpha.9
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 +197 -0
- package/css/style.css +197 -18
- package/css/tailwind3-utilities.css +0 -18
- package/css/tailwind3.css +197 -0
- package/css/tailwind4.css +197 -0
- package/dist/css/index.css +197 -0
- package/dist/css/style.css +197 -18
- package/dist/css/tailwind3-utilities.css +0 -18
- package/dist/css/tailwind3.css +197 -0
- package/dist/css/tailwind4.css +197 -0
- package/dist/icons/src/ElFilterIcon.mjs +9 -0
- package/dist/index.full.mjs +6059 -5504
- package/dist/table/src/components/TableLightFilter.d.ts +76 -0
- package/dist/table/src/components/TableLightFilter.d.ts.map +1 -0
- package/dist/table/src/components/TableLightFilter.mjs +318 -0
- package/dist/table/src/components/TableLightFilter.test.d.ts +2 -0
- package/dist/table/src/components/TableLightFilter.test.d.ts.map +1 -0
- package/dist/table/src/components/TableQuery.d.ts +101 -46
- package/dist/table/src/components/TableQuery.d.ts.map +1 -1
- package/dist/table/src/components/TableQuery.mjs +312 -184
- package/dist/table/src/components/VTableQuery.vue.d.ts +4 -3
- package/dist/table/src/components/VTableQuery.vue.d.ts.map +1 -1
- package/dist/table/src/components/VTableQuery.vue.mjs +49 -30
- package/dist/table/src/controls.d.ts.map +1 -1
- package/dist/table/src/controls.mjs +95 -68
- package/dist/table/src/types/controls.d.ts +20 -1
- package/dist/table/src/types/controls.d.ts.map +1 -1
- package/dist/table/src/types/editable.d.ts +4 -3
- package/dist/table/src/types/editable.d.ts.map +1 -1
- package/dist/table/src/types/query-form.d.ts +71 -16
- package/dist/table/src/types/query-form.d.ts.map +1 -1
- package/dist/table/src/types/query-form.typecheck.d.ts +15 -0
- package/dist/table/src/types/query-form.typecheck.d.ts.map +1 -1
- package/dist/table/src/utils/queryFields.mjs +11 -11
- package/dist/table/src/utils/queryFilterLayout.d.ts +29 -0
- package/dist/table/src/utils/queryFilterLayout.d.ts.map +1 -0
- package/dist/table/src/utils/queryFilterLayout.mjs +74 -0
- package/dist/table/src/utils/queryFilterLayout.test.d.ts +2 -0
- package/dist/table/src/utils/queryFilterLayout.test.d.ts.map +1 -0
- package/dist/theme/src/query.d.ts +54 -49
- package/dist/theme/src/query.d.ts.map +1 -1
- package/dist/theme/src/query.mjs +25 -19
- package/package.json +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { valueEnumEntries as m } from "./valueEnum.mjs";
|
|
2
|
-
function h(
|
|
3
|
-
const s = [], l = /* @__PURE__ */ new Set(),
|
|
2
|
+
function h(p, y = {}) {
|
|
3
|
+
const s = [], l = /* @__PURE__ */ new Set(), r = (o) => {
|
|
4
4
|
for (const e of o) {
|
|
5
|
-
if (typeof e == "symbol" || e.
|
|
5
|
+
if (typeof e == "symbol" || e.search === !1 || e.hideInSearch) continue;
|
|
6
6
|
if ("children" in e) {
|
|
7
|
-
|
|
7
|
+
r(e.children);
|
|
8
8
|
continue;
|
|
9
9
|
}
|
|
10
|
-
const
|
|
10
|
+
const c = e.search ?? {}, t = c.name ?? (typeof e.dataIndex == "string" ? e.dataIndex : void 0);
|
|
11
11
|
if (t === void 0) continue;
|
|
12
|
-
const
|
|
13
|
-
if (
|
|
14
|
-
const d = { ...
|
|
15
|
-
const
|
|
16
|
-
return typeof
|
|
12
|
+
const u = y[t];
|
|
13
|
+
if (u === !1) continue;
|
|
14
|
+
const d = { ...c, ...u }, a = m(e.valueEnum), v = a.flatMap(([T, n]) => {
|
|
15
|
+
const f = typeof n == "string" ? n : n.text;
|
|
16
|
+
return typeof f == "string" ? [{ value: T, label: f, ...typeof n == "object" ? { status: n.status } : {} }] : [];
|
|
17
17
|
}), i = {
|
|
18
18
|
name: t,
|
|
19
19
|
label: typeof e.title == "function" ? t : e.title ?? t,
|
|
@@ -24,7 +24,7 @@ function h(f, p = {}) {
|
|
|
24
24
|
l.has(i.name) || (l.add(i.name), s.push(i));
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
|
-
return
|
|
27
|
+
return r(p), s.sort((o, e) => (e.order ?? 0) - (o.order ?? 0));
|
|
28
28
|
}
|
|
29
29
|
export {
|
|
30
30
|
h as deriveTableQueryFields
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { CSSProperties, Ref } from 'vue';
|
|
2
|
+
import { TableQueryProps } from '../types/query-form';
|
|
3
|
+
interface QueryFilterLayoutOptions {
|
|
4
|
+
width: number;
|
|
5
|
+
layout?: TableQueryProps['layout'];
|
|
6
|
+
span?: TableQueryProps['span'];
|
|
7
|
+
defaultColsNumber?: number;
|
|
8
|
+
defaultFormItemsNumber?: number;
|
|
9
|
+
collapsed: boolean;
|
|
10
|
+
showActions?: boolean;
|
|
11
|
+
submitterColSpanProps?: TableQueryProps['submitterColSpanProps'];
|
|
12
|
+
}
|
|
13
|
+
/** Position query controls and submitter on the same 24-column grid. */
|
|
14
|
+
export declare function getQueryFilterLayout<T extends {
|
|
15
|
+
colSize?: number;
|
|
16
|
+
}>(fields: readonly T[], options: QueryFilterLayoutOptions): {
|
|
17
|
+
layout: "inline" | "vertical" | "horizontal";
|
|
18
|
+
fields: {
|
|
19
|
+
field: T;
|
|
20
|
+
style: CSSProperties;
|
|
21
|
+
endsRow: boolean;
|
|
22
|
+
}[];
|
|
23
|
+
actionStyle: CSSProperties;
|
|
24
|
+
canCollapse: boolean;
|
|
25
|
+
hiddenCount: number;
|
|
26
|
+
};
|
|
27
|
+
export declare function useQueryFilterWidth(root: Ref<HTMLElement | null>): import('vue').ShallowRef<number, number>;
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=queryFilterLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queryFilterLayout.d.ts","sourceRoot":"","sources":["../../../../../table/src/utils/queryFilterLayout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,aAAa,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAS1D,UAAU,wBAAwB;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAA;IAClC,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAA;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,SAAS,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,qBAAqB,CAAC,EAAE,eAAe,CAAC,uBAAuB,CAAC,CAAA;CACjE;AAgCD,wEAAwE;AACxE,wBAAgB,oBAAoB,CAAC,CAAC,SAAS;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,EACjE,MAAM,EAAE,SAAS,CAAC,EAAE,EACpB,OAAO,EAAE,wBAAwB;;;;;;;iBA0D1B,aAAa;;;EAIrB;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,4CAkBhE"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { shallowRef as z, watch as M } from "vue";
|
|
2
|
+
const a = 24, S = 1024, k = [513, 785, 992, 1057, 1 / 0], N = [513, 701, 1352, 1 / 0], F = [513, 785, 1057, 1 / 0];
|
|
3
|
+
function y(e, t) {
|
|
4
|
+
return e !== void 0 && Number.isFinite(e) && e > 0 ? e : t;
|
|
5
|
+
}
|
|
6
|
+
function g(e) {
|
|
7
|
+
return Math.max(1, Math.min(a, Math.round(e)));
|
|
8
|
+
}
|
|
9
|
+
function B(e, t) {
|
|
10
|
+
const n = k.findIndex((o) => e < o), s = [t.xs ?? t.sm, t.md, t.lg, t.xl, t.xxl];
|
|
11
|
+
for (let o = n; o >= 0; o--)
|
|
12
|
+
if (s[o] !== void 0) return s[o];
|
|
13
|
+
}
|
|
14
|
+
function W(e, t, n) {
|
|
15
|
+
const o = (t === "vertical" ? F : N).findIndex((u) => e < u) + 1, c = typeof n == "object" ? B(e, n) : n;
|
|
16
|
+
return {
|
|
17
|
+
layout: t ?? (c || e >= 701 ? "horizontal" : "vertical"),
|
|
18
|
+
span: g(y(c, a / o))
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function O(e, t) {
|
|
22
|
+
const { layout: n, span: s } = W(t.width, t.layout, t.span), o = t.showActions === !1 ? 0 : 1, c = a / s - o, u = t.defaultFormItemsNumber ?? (t.defaultColsNumber === void 0 ? Math.max(1, c) : Math.min(t.defaultColsNumber, c)), m = e.map((i) => {
|
|
23
|
+
const l = y(i.colSize, 1);
|
|
24
|
+
return { field: i, size: l, span: g(s * l) };
|
|
25
|
+
}), I = m[0]?.span === a;
|
|
26
|
+
let v = 0, f = 0;
|
|
27
|
+
for (const { size: i } of m) {
|
|
28
|
+
if (v += i, f > 0 && (I || v > u)) break;
|
|
29
|
+
f++;
|
|
30
|
+
}
|
|
31
|
+
let d = 1, r = 0;
|
|
32
|
+
const x = t.collapsed ? m.slice(0, f) : m, w = x.map(({ field: i, span: l }, C) => {
|
|
33
|
+
r + l > a && (d++, r = 0);
|
|
34
|
+
const R = { gridColumn: `${r + 1} / span ${l}`, gridRow: d };
|
|
35
|
+
return r += l, { field: i, style: R, endsRow: r === a && C < x.length - 1 };
|
|
36
|
+
}), b = g(y(t.submitterColSpanProps?.span, s)), p = t.submitterColSpanProps?.offset;
|
|
37
|
+
let h = a - b;
|
|
38
|
+
if (p === void 0 || !Number.isFinite(p))
|
|
39
|
+
r > h && d++;
|
|
40
|
+
else {
|
|
41
|
+
const i = Math.max(0, Math.min(h, Math.round(p)));
|
|
42
|
+
r + i + b > a && (d++, r = 0), h = r + i;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
layout: n,
|
|
46
|
+
fields: w,
|
|
47
|
+
actionStyle: {
|
|
48
|
+
gridColumn: `${h + 1} / span ${b}`,
|
|
49
|
+
gridRow: d
|
|
50
|
+
},
|
|
51
|
+
canCollapse: f < e.length,
|
|
52
|
+
hiddenCount: t.collapsed ? e.length - f : 0
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function _(e) {
|
|
56
|
+
const t = z(S);
|
|
57
|
+
return M(
|
|
58
|
+
e,
|
|
59
|
+
(n, s, o) => {
|
|
60
|
+
if (!n) return;
|
|
61
|
+
const c = () => {
|
|
62
|
+
n.offsetWidth > 0 && (t.value = n.offsetWidth);
|
|
63
|
+
};
|
|
64
|
+
if (c(), typeof ResizeObserver > "u") return;
|
|
65
|
+
const u = new ResizeObserver(c);
|
|
66
|
+
u.observe(n), o(() => u.disconnect());
|
|
67
|
+
},
|
|
68
|
+
{ flush: "post" }
|
|
69
|
+
), t;
|
|
70
|
+
}
|
|
71
|
+
export {
|
|
72
|
+
O as getQueryFilterLayout,
|
|
73
|
+
_ as useQueryFilterWidth
|
|
74
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queryFilterLayout.test.d.ts","sourceRoot":"","sources":["../../../../../table/src/utils/queryFilterLayout.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,112 +1,111 @@
|
|
|
1
1
|
import { ThemePresetName } from '../../core/src/index.ts';
|
|
2
|
-
/** ProTable QueryFilter layout; host controls retain their own UI library styling. */
|
|
3
2
|
export declare const queryTheme: {
|
|
4
3
|
readonly slots: {
|
|
5
|
-
readonly root: "
|
|
6
|
-
readonly fields: "
|
|
4
|
+
readonly root: "min-w-0 rounded-[var(--vtg-query-radius,6px)] bg-[color:var(--color-surface)] p-[var(--vtg-query-padding,24px)] font-[family-name:var(--font-family-base)] text-[length:var(--vtg-table-font-size)] text-[color:var(--color-on-surface)]";
|
|
5
|
+
readonly fields: "";
|
|
7
6
|
readonly field: "flex min-w-0 items-start gap-[var(--vtg-query-label-gap,12px)]";
|
|
8
|
-
readonly label: "flex h-[var(--vtg-query-control-height,32px)]
|
|
9
|
-
readonly control: "min-w-0
|
|
7
|
+
readonly label: "flex h-[var(--vtg-query-control-height,32px)] shrink-0 items-center";
|
|
8
|
+
readonly control: "min-w-0";
|
|
10
9
|
readonly error: "mt-1 text-[color:var(--vtg-cell-error)] text-[length:var(--vtg-query-error-font-size,12px)]";
|
|
11
|
-
readonly actions: "
|
|
10
|
+
readonly actions: "flex min-h-[var(--vtg-query-control-height,32px)] max-w-full flex-wrap items-center gap-[var(--vtg-query-action-gap,8px)]";
|
|
12
11
|
readonly feedback: "w-full text-[color:var(--vtg-cell-error)]";
|
|
13
12
|
readonly collapse: "inline-flex items-center gap-1";
|
|
14
13
|
};
|
|
15
14
|
readonly variants: {
|
|
16
|
-
readonly
|
|
17
|
-
readonly
|
|
18
|
-
|
|
15
|
+
readonly layoutType: {
|
|
16
|
+
readonly QueryFilter: {
|
|
17
|
+
readonly control: "flex-1 [&>*]:w-full";
|
|
18
|
+
readonly actions: "justify-end";
|
|
19
|
+
};
|
|
20
|
+
readonly LightFilter: {
|
|
19
21
|
readonly root: "p-[var(--vtg-query-light-padding,16px)]";
|
|
20
|
-
readonly fields: "flex flex-wrap items-start gap-x-[var(--vtg-query-column-gap,24px)] gap-y-[var(--vtg-query-row-gap,16px)]";
|
|
21
|
-
readonly field: "w-[var(--vtg-query-light-field-width,240px)] max-w-full";
|
|
22
|
-
readonly label: "w-auto justify-start";
|
|
23
22
|
};
|
|
24
23
|
};
|
|
25
24
|
};
|
|
26
25
|
readonly defaultVariants: {
|
|
27
|
-
readonly
|
|
26
|
+
readonly layoutType: "QueryFilter";
|
|
28
27
|
};
|
|
29
28
|
};
|
|
30
29
|
export declare const elementPlusQueryTheme: {
|
|
31
30
|
readonly slots: {
|
|
32
|
-
readonly root: "
|
|
33
|
-
readonly fields: "
|
|
31
|
+
readonly root: "min-w-0 rounded-[var(--vtg-query-radius,6px)] bg-[color:var(--color-surface)] p-[var(--vtg-query-padding,24px)] font-[family-name:var(--font-family-base)] text-[length:var(--vtg-table-font-size)] text-[color:var(--color-on-surface)] rounded-[var(--vtg-query-radius,4px)]";
|
|
32
|
+
readonly fields: "";
|
|
34
33
|
readonly field: "flex min-w-0 items-start gap-[var(--vtg-query-label-gap,12px)]";
|
|
35
|
-
readonly label: "flex h-[var(--vtg-query-control-height,32px)]
|
|
36
|
-
readonly control: "min-w-0
|
|
34
|
+
readonly label: "flex h-[var(--vtg-query-control-height,32px)] shrink-0 items-center";
|
|
35
|
+
readonly control: "min-w-0";
|
|
37
36
|
readonly error: "mt-1 text-[color:var(--vtg-cell-error)] text-[length:var(--vtg-query-error-font-size,12px)]";
|
|
38
|
-
readonly actions: "
|
|
37
|
+
readonly actions: "flex min-h-[var(--vtg-query-control-height,32px)] max-w-full flex-wrap items-center gap-[var(--vtg-query-action-gap,8px)]";
|
|
39
38
|
readonly feedback: "w-full text-[color:var(--vtg-cell-error)]";
|
|
40
39
|
readonly collapse: "inline-flex items-center gap-1";
|
|
41
40
|
};
|
|
42
41
|
readonly variants: {
|
|
43
|
-
readonly
|
|
44
|
-
readonly
|
|
45
|
-
|
|
42
|
+
readonly layoutType: {
|
|
43
|
+
readonly QueryFilter: {
|
|
44
|
+
readonly control: "flex-1 [&>*]:w-full";
|
|
45
|
+
readonly actions: "justify-end";
|
|
46
|
+
};
|
|
47
|
+
readonly LightFilter: {
|
|
46
48
|
readonly root: "p-[var(--vtg-query-light-padding,16px)]";
|
|
47
|
-
readonly fields: "flex flex-wrap items-start gap-x-[var(--vtg-query-column-gap,24px)] gap-y-[var(--vtg-query-row-gap,16px)]";
|
|
48
|
-
readonly field: "w-[var(--vtg-query-light-field-width,240px)] max-w-full";
|
|
49
|
-
readonly label: "w-auto justify-start";
|
|
50
49
|
};
|
|
51
50
|
};
|
|
52
51
|
};
|
|
53
52
|
readonly defaultVariants: {
|
|
54
|
-
readonly
|
|
53
|
+
readonly layoutType: "QueryFilter";
|
|
55
54
|
};
|
|
56
55
|
};
|
|
57
56
|
export type QueryThemeConfig = typeof queryTheme;
|
|
58
57
|
export type QuerySlots = keyof QueryThemeConfig['slots'];
|
|
59
58
|
export declare function resolveQueryThemePreset(name?: ThemePresetName): {
|
|
60
59
|
readonly slots: {
|
|
61
|
-
readonly root: "
|
|
62
|
-
readonly fields: "
|
|
60
|
+
readonly root: "min-w-0 rounded-[var(--vtg-query-radius,6px)] bg-[color:var(--color-surface)] p-[var(--vtg-query-padding,24px)] font-[family-name:var(--font-family-base)] text-[length:var(--vtg-table-font-size)] text-[color:var(--color-on-surface)]";
|
|
61
|
+
readonly fields: "";
|
|
63
62
|
readonly field: "flex min-w-0 items-start gap-[var(--vtg-query-label-gap,12px)]";
|
|
64
|
-
readonly label: "flex h-[var(--vtg-query-control-height,32px)]
|
|
65
|
-
readonly control: "min-w-0
|
|
63
|
+
readonly label: "flex h-[var(--vtg-query-control-height,32px)] shrink-0 items-center";
|
|
64
|
+
readonly control: "min-w-0";
|
|
66
65
|
readonly error: "mt-1 text-[color:var(--vtg-cell-error)] text-[length:var(--vtg-query-error-font-size,12px)]";
|
|
67
|
-
readonly actions: "
|
|
66
|
+
readonly actions: "flex min-h-[var(--vtg-query-control-height,32px)] max-w-full flex-wrap items-center gap-[var(--vtg-query-action-gap,8px)]";
|
|
68
67
|
readonly feedback: "w-full text-[color:var(--vtg-cell-error)]";
|
|
69
68
|
readonly collapse: "inline-flex items-center gap-1";
|
|
70
69
|
};
|
|
71
70
|
readonly variants: {
|
|
72
|
-
readonly
|
|
73
|
-
readonly
|
|
74
|
-
|
|
71
|
+
readonly layoutType: {
|
|
72
|
+
readonly QueryFilter: {
|
|
73
|
+
readonly control: "flex-1 [&>*]:w-full";
|
|
74
|
+
readonly actions: "justify-end";
|
|
75
|
+
};
|
|
76
|
+
readonly LightFilter: {
|
|
75
77
|
readonly root: "p-[var(--vtg-query-light-padding,16px)]";
|
|
76
|
-
readonly fields: "flex flex-wrap items-start gap-x-[var(--vtg-query-column-gap,24px)] gap-y-[var(--vtg-query-row-gap,16px)]";
|
|
77
|
-
readonly field: "w-[var(--vtg-query-light-field-width,240px)] max-w-full";
|
|
78
|
-
readonly label: "w-auto justify-start";
|
|
79
78
|
};
|
|
80
79
|
};
|
|
81
80
|
};
|
|
82
81
|
readonly defaultVariants: {
|
|
83
|
-
readonly
|
|
82
|
+
readonly layoutType: "QueryFilter";
|
|
84
83
|
};
|
|
85
84
|
} | {
|
|
86
85
|
readonly slots: {
|
|
87
|
-
readonly root: "
|
|
88
|
-
readonly fields: "
|
|
86
|
+
readonly root: "min-w-0 rounded-[var(--vtg-query-radius,6px)] bg-[color:var(--color-surface)] p-[var(--vtg-query-padding,24px)] font-[family-name:var(--font-family-base)] text-[length:var(--vtg-table-font-size)] text-[color:var(--color-on-surface)] rounded-[var(--vtg-query-radius,4px)]";
|
|
87
|
+
readonly fields: "";
|
|
89
88
|
readonly field: "flex min-w-0 items-start gap-[var(--vtg-query-label-gap,12px)]";
|
|
90
|
-
readonly label: "flex h-[var(--vtg-query-control-height,32px)]
|
|
91
|
-
readonly control: "min-w-0
|
|
89
|
+
readonly label: "flex h-[var(--vtg-query-control-height,32px)] shrink-0 items-center";
|
|
90
|
+
readonly control: "min-w-0";
|
|
92
91
|
readonly error: "mt-1 text-[color:var(--vtg-cell-error)] text-[length:var(--vtg-query-error-font-size,12px)]";
|
|
93
|
-
readonly actions: "
|
|
92
|
+
readonly actions: "flex min-h-[var(--vtg-query-control-height,32px)] max-w-full flex-wrap items-center gap-[var(--vtg-query-action-gap,8px)]";
|
|
94
93
|
readonly feedback: "w-full text-[color:var(--vtg-cell-error)]";
|
|
95
94
|
readonly collapse: "inline-flex items-center gap-1";
|
|
96
95
|
};
|
|
97
96
|
readonly variants: {
|
|
98
|
-
readonly
|
|
99
|
-
readonly
|
|
100
|
-
|
|
97
|
+
readonly layoutType: {
|
|
98
|
+
readonly QueryFilter: {
|
|
99
|
+
readonly control: "flex-1 [&>*]:w-full";
|
|
100
|
+
readonly actions: "justify-end";
|
|
101
|
+
};
|
|
102
|
+
readonly LightFilter: {
|
|
101
103
|
readonly root: "p-[var(--vtg-query-light-padding,16px)]";
|
|
102
|
-
readonly fields: "flex flex-wrap items-start gap-x-[var(--vtg-query-column-gap,24px)] gap-y-[var(--vtg-query-row-gap,16px)]";
|
|
103
|
-
readonly field: "w-[var(--vtg-query-light-field-width,240px)] max-w-full";
|
|
104
|
-
readonly label: "w-auto justify-start";
|
|
105
104
|
};
|
|
106
105
|
};
|
|
107
106
|
};
|
|
108
107
|
readonly defaultVariants: {
|
|
109
|
-
readonly
|
|
108
|
+
readonly layoutType: "QueryFilter";
|
|
110
109
|
};
|
|
111
110
|
};
|
|
112
111
|
export declare const queryZhCN: {
|
|
@@ -115,6 +114,9 @@ export declare const queryZhCN: {
|
|
|
115
114
|
readonly reset: "重置";
|
|
116
115
|
readonly expand: "展开";
|
|
117
116
|
readonly collapse: "收起";
|
|
117
|
+
readonly more: "更多筛选";
|
|
118
|
+
readonly confirm: "确认";
|
|
119
|
+
readonly clear: "清空";
|
|
118
120
|
readonly validationFailed: "请检查查询条件";
|
|
119
121
|
};
|
|
120
122
|
export declare const queryEnUS: {
|
|
@@ -123,6 +125,9 @@ export declare const queryEnUS: {
|
|
|
123
125
|
readonly reset: "Reset";
|
|
124
126
|
readonly expand: "Expand";
|
|
125
127
|
readonly collapse: "Collapse";
|
|
128
|
+
readonly more: "More filters";
|
|
129
|
+
readonly confirm: "Confirm";
|
|
130
|
+
readonly clear: "Clear";
|
|
126
131
|
readonly validationFailed: "Check query conditions";
|
|
127
132
|
};
|
|
128
133
|
//# sourceMappingURL=query.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../../theme/src/query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEtE,
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../../theme/src/query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEtE,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BS,CAAA;AAEhC,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;CAMF,CAAA;AAEhC,MAAM,MAAM,gBAAgB,GAAG,OAAO,UAAU,CAAA;AAChD,MAAM,MAAM,UAAU,GAAG,MAAM,gBAAgB,CAAC,OAAO,CAAC,CAAA;AAExD,wBAAgB,uBAAuB,CAAC,IAAI,GAAE,eAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEtE;AAED,eAAO,MAAM,SAAS;;;;;;;;;;CAUZ,CAAA;AACV,eAAO,MAAM,SAAS;;;;;;;;;;CAUZ,CAAA"}
|
package/dist/theme/src/query.mjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
const e = {
|
|
2
2
|
slots: {
|
|
3
|
-
root: "
|
|
4
|
-
fields: "
|
|
3
|
+
root: "min-w-0 rounded-[var(--vtg-query-radius,6px)] bg-[color:var(--color-surface)] p-[var(--vtg-query-padding,24px)] font-[family-name:var(--font-family-base)] text-[length:var(--vtg-table-font-size)] text-[color:var(--color-on-surface)]",
|
|
4
|
+
fields: "",
|
|
5
5
|
field: "flex min-w-0 items-start gap-[var(--vtg-query-label-gap,12px)]",
|
|
6
|
-
label: "flex h-[var(--vtg-query-control-height,32px)]
|
|
7
|
-
control: "min-w-0
|
|
6
|
+
label: "flex h-[var(--vtg-query-control-height,32px)] shrink-0 items-center",
|
|
7
|
+
control: "min-w-0",
|
|
8
8
|
error: "mt-1 text-[color:var(--vtg-cell-error)] text-[length:var(--vtg-query-error-font-size,12px)]",
|
|
9
|
-
actions: "
|
|
9
|
+
actions: "flex min-h-[var(--vtg-query-control-height,32px)] max-w-full flex-wrap items-center gap-[var(--vtg-query-action-gap,8px)]",
|
|
10
10
|
feedback: "w-full text-[color:var(--vtg-cell-error)]",
|
|
11
11
|
collapse: "inline-flex items-center gap-1"
|
|
12
12
|
},
|
|
13
13
|
variants: {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
layoutType: {
|
|
15
|
+
QueryFilter: {
|
|
16
|
+
control: "flex-1 [&>*]:w-full",
|
|
17
|
+
actions: "justify-end"
|
|
18
|
+
},
|
|
19
|
+
LightFilter: {
|
|
20
|
+
root: "p-[var(--vtg-query-light-padding,16px)]"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
|
-
defaultVariants: {
|
|
24
|
+
defaultVariants: { layoutType: "QueryFilter" }
|
|
25
25
|
}, t = {
|
|
26
26
|
...e,
|
|
27
27
|
slots: {
|
|
@@ -29,28 +29,34 @@ const e = {
|
|
|
29
29
|
root: `${e.slots.root} rounded-[var(--vtg-query-radius,4px)]`
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
function
|
|
32
|
+
function l(r = "antdv") {
|
|
33
33
|
return r === "element-plus" ? t : e;
|
|
34
34
|
}
|
|
35
|
-
const
|
|
35
|
+
const o = {
|
|
36
36
|
label: "表格查询",
|
|
37
37
|
submit: "查询",
|
|
38
38
|
reset: "重置",
|
|
39
39
|
expand: "展开",
|
|
40
40
|
collapse: "收起",
|
|
41
|
+
more: "更多筛选",
|
|
42
|
+
confirm: "确认",
|
|
43
|
+
clear: "清空",
|
|
41
44
|
validationFailed: "请检查查询条件"
|
|
42
|
-
},
|
|
45
|
+
}, a = {
|
|
43
46
|
label: "Table query",
|
|
44
47
|
submit: "Search",
|
|
45
48
|
reset: "Reset",
|
|
46
49
|
expand: "Expand",
|
|
47
50
|
collapse: "Collapse",
|
|
51
|
+
more: "More filters",
|
|
52
|
+
confirm: "Confirm",
|
|
53
|
+
clear: "Clear",
|
|
48
54
|
validationFailed: "Check query conditions"
|
|
49
55
|
};
|
|
50
56
|
export {
|
|
51
57
|
t as elementPlusQueryTheme,
|
|
52
|
-
|
|
58
|
+
a as queryEnUS,
|
|
53
59
|
e as queryTheme,
|
|
54
|
-
|
|
55
|
-
|
|
60
|
+
o as queryZhCN,
|
|
61
|
+
l as resolveQueryThemePreset
|
|
56
62
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vtable-guild/vtable-guild",
|
|
3
|
-
"version": "2.9.0-alpha.
|
|
3
|
+
"version": "2.9.0-alpha.9",
|
|
4
4
|
"description": "Vue 3 table component with built-in virtual scrolling and switchable ant-design-vue / element-plus theme presets, powered by tailwind-variants",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|