@vtable-guild/vtable-guild 2.9.0-alpha.4 → 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.
Files changed (51) hide show
  1. package/css/index.css +17 -0
  2. package/css/presets/antdv.css +10 -5
  3. package/css/presets/element-plus.css +9 -4
  4. package/css/style.css +69 -84
  5. package/css/tailwind3-utilities.css +21 -44
  6. package/css/tailwind3.css +48 -40
  7. package/css/tailwind4.css +48 -40
  8. package/css/transitions.css +12 -31
  9. package/dist/css/index.css +17 -0
  10. package/dist/css/presets/antdv.css +10 -5
  11. package/dist/css/presets/element-plus.css +9 -4
  12. package/dist/css/style.css +69 -84
  13. package/dist/css/tailwind3-utilities.css +21 -44
  14. package/dist/css/tailwind3.css +48 -40
  15. package/dist/css/tailwind4.css +48 -40
  16. package/dist/css/transitions.css +12 -31
  17. package/dist/index.full.mjs +5114 -5140
  18. package/dist/table/src/components/FilterDropdown.d.ts +23 -23
  19. package/dist/table/src/components/FilterDropdown.d.ts.map +1 -1
  20. package/dist/table/src/components/FilterDropdown.mjs +163 -175
  21. package/dist/table/src/components/PaginationSizeSelect.d.ts.map +1 -1
  22. package/dist/table/src/components/PaginationSizeSelect.mjs +85 -95
  23. package/dist/table/src/components/SelectionDropdown.d.ts +0 -27
  24. package/dist/table/src/components/SelectionDropdown.d.ts.map +1 -1
  25. package/dist/table/src/components/SelectionDropdown.mjs +31 -56
  26. package/dist/table/src/components/Table.d.ts +1 -1
  27. package/dist/table/src/components/TableColumnSettings.d.ts.map +1 -1
  28. package/dist/table/src/components/TableColumnSettings.mjs +212 -236
  29. package/dist/table/src/components/TableHeaderCell.d.ts.map +1 -1
  30. package/dist/table/src/components/TableHeaderCell.mjs +278 -299
  31. package/dist/table/src/components/TablePopup.d.ts +77 -0
  32. package/dist/table/src/components/TablePopup.d.ts.map +1 -0
  33. package/dist/table/src/components/TablePopup.mjs +104 -0
  34. package/dist/table/src/components/TablePopup.test.d.ts +2 -0
  35. package/dist/table/src/components/TablePopup.test.d.ts.map +1 -0
  36. package/dist/table/src/utils/popupPosition.d.ts +1 -6
  37. package/dist/table/src/utils/popupPosition.d.ts.map +1 -1
  38. package/dist/table/src/utils/popupPosition.mjs +22 -26
  39. package/dist/theme/src/column-settings.d.ts +8 -8
  40. package/dist/theme/src/column-settings.d.ts.map +1 -1
  41. package/dist/theme/src/column-settings.mjs +16 -18
  42. package/dist/theme/src/pagination.d.ts +2 -2
  43. package/dist/theme/src/pagination.d.ts.map +1 -1
  44. package/dist/theme/src/pagination.mjs +7 -8
  45. package/dist/theme/src/presets/antdv/table.d.ts +3 -3
  46. package/dist/theme/src/presets/antdv/table.d.ts.map +1 -1
  47. package/dist/theme/src/presets/antdv/table.mjs +3 -16
  48. package/dist/theme/src/presets/element-plus/table.d.ts +3 -3
  49. package/dist/theme/src/presets/element-plus/table.d.ts.map +1 -1
  50. package/dist/theme/src/presets/element-plus/table.mjs +3 -17
  51. package/package.json +1 -1
@@ -13,18 +13,17 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
13
13
  type: BooleanConstructor;
14
14
  default: boolean;
15
15
  };
16
- anchorRect: {
17
- type: PropType<{
18
- top: number;
19
- left: number;
20
- right: number;
21
- bottom: number;
22
- }>;
23
- required: true;
16
+ anchor: {
17
+ type: PropType<HTMLElement | null>;
18
+ default: null;
24
19
  };
25
- popupContainer: {
26
- type: PropType<string | HTMLElement>;
27
- default: string;
20
+ focusAnchor: {
21
+ type: PropType<HTMLElement | null>;
22
+ default: null;
23
+ };
24
+ getPopupContainer: {
25
+ type: PropType<(anchor: HTMLElement) => HTMLElement | string>;
26
+ default: undefined;
28
27
  };
29
28
  filterSearch: {
30
29
  type: PropType<boolean | ((input: string, filter: ColumnFilterItem) => boolean)>;
@@ -55,18 +54,17 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
55
54
  type: BooleanConstructor;
56
55
  default: boolean;
57
56
  };
58
- anchorRect: {
59
- type: PropType<{
60
- top: number;
61
- left: number;
62
- right: number;
63
- bottom: number;
64
- }>;
65
- required: true;
57
+ anchor: {
58
+ type: PropType<HTMLElement | null>;
59
+ default: null;
66
60
  };
67
- popupContainer: {
68
- type: PropType<string | HTMLElement>;
69
- default: string;
61
+ focusAnchor: {
62
+ type: PropType<HTMLElement | null>;
63
+ default: null;
64
+ };
65
+ getPopupContainer: {
66
+ type: PropType<(anchor: HTMLElement) => HTMLElement | string>;
67
+ default: undefined;
70
68
  };
71
69
  filterSearch: {
72
70
  type: PropType<boolean | ((input: string, filter: ColumnFilterItem) => boolean)>;
@@ -90,12 +88,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
90
88
  onConfirm?: ((...args: any[]) => any) | undefined;
91
89
  "onUpdate:expandedKeys"?: ((...args: any[]) => any) | undefined;
92
90
  }>, {
91
+ anchor: HTMLElement | null;
93
92
  visible: boolean;
94
93
  multiple: boolean;
95
94
  filterSearch: boolean | ((input: string, filter: ColumnFilterItem) => boolean);
96
95
  filterMode: "tree" | "menu";
96
+ getPopupContainer: (anchor: HTMLElement) => HTMLElement | string;
97
+ focusAnchor: HTMLElement | null;
97
98
  selectedKeys: (string | number | boolean)[];
98
- popupContainer: string | HTMLElement;
99
99
  expandedKeys: Set<string | number | boolean> | null;
100
100
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
101
101
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"FilterDropdown.d.ts","sourceRoot":"","sources":["../../../../../table/src/components/FilterDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAWL,KAAK,QAAQ,EAEd,MAAM,KAAK,CAAA;AAGZ,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;;;cAkClB,QAAQ,CAAC,gBAAgB,EAAE,CAAC;;;;cACvB,QAAQ,CAAC,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,EAAE,CAAC;;;;;;;;cAGpD,QAAQ,CA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,UAAU,gBAAgB,KAAK,OAAO;;gCAL7B,WAAW,KAAK,WAAW,GAAG,MAAM;;;;;AAf9E,wBA2gBE"}
@@ -1,24 +1,24 @@
1
- import { defineComponent as ae, inject as ie, ref as x, onMounted as W, watch as ue, computed as f, nextTick as ce, onBeforeUnmount as de, createVNode as r, Teleport as fe, Transition as _ } from "vue";
2
- import N from "../../../core/src/components/Checkbox.mjs";
3
- import he from "../../../core/src/components/Radio.mjs";
4
- import O from "../../../core/src/components/Button.mjs";
5
- import ve from "../../../core/src/components/Input.mjs";
6
- import j from "../../../core/src/components/Scrollbar.mjs";
7
- import me from "../../../icons/src/CaretDownIcon.mjs";
8
- import pe from "../../../icons/src/SearchIcon.mjs";
9
- import { TABLE_CONTEXT_KEY as Se } from "../context.mjs";
10
- import { getPopupPositionStyle as Te } from "../utils/popupPosition.mjs";
11
- function D(n) {
1
+ import { defineComponent as le, inject as ne, ref as C, onMounted as re, watch as oe, computed as f, createVNode as r, Transition as se } from "vue";
2
+ import P from "../../../core/src/components/Checkbox.mjs";
3
+ import ae from "../../../core/src/components/Radio.mjs";
4
+ import H from "../../../core/src/components/Button.mjs";
5
+ import ie from "../../../core/src/components/Input.mjs";
6
+ import W from "../../../core/src/components/Scrollbar.mjs";
7
+ import ue from "../../../icons/src/CaretDownIcon.mjs";
8
+ import ce from "../../../icons/src/SearchIcon.mjs";
9
+ import { TABLE_CONTEXT_KEY as de } from "../context.mjs";
10
+ import fe from "./TablePopup.mjs";
11
+ function w(n) {
12
12
  const i = [];
13
13
  for (const t of n)
14
- i.push(t.value), t.children?.length && i.push(...D(t.children));
14
+ i.push(t.value), t.children?.length && i.push(...w(t.children));
15
15
  return i;
16
16
  }
17
- function $(n, i) {
17
+ function _(n, i) {
18
18
  for (const t of n)
19
- t.children?.length && ($(t.children, i), t.children.every((v) => i.has(v.value)) ? i.add(t.value) : i.delete(t.value));
19
+ t.children?.length && (_(t.children, i), t.children.every((c) => i.has(c.value)) ? i.add(t.value) : i.delete(t.value));
20
20
  }
21
- const ke = /* @__PURE__ */ ae({
21
+ const xe = /* @__PURE__ */ le({
22
22
  name: "FilterDropdown",
23
23
  props: {
24
24
  filters: {
@@ -33,13 +33,17 @@ const ke = /* @__PURE__ */ ae({
33
33
  type: Boolean,
34
34
  default: !0
35
35
  },
36
- anchorRect: {
36
+ anchor: {
37
37
  type: Object,
38
- required: !0
38
+ default: null
39
+ },
40
+ focusAnchor: {
41
+ type: Object,
42
+ default: null
39
43
  },
40
- popupContainer: {
41
- type: [String, Object],
42
- default: "body"
44
+ getPopupContainer: {
45
+ type: Function,
46
+ default: void 0
43
47
  },
44
48
  filterSearch: {
45
49
  type: [Boolean, Function],
@@ -62,8 +66,8 @@ const ke = /* @__PURE__ */ ae({
62
66
  setup(n, {
63
67
  emit: i
64
68
  }) {
65
- const t = ie(Se, {}), a = x([...n.selectedKeys]), v = x(null), h = x(""), d = x(/* @__PURE__ */ new Set());
66
- W(() => {
69
+ const t = ne(de, {}), a = C([...n.selectedKeys]), c = C(""), d = C(/* @__PURE__ */ new Set());
70
+ re(() => {
67
71
  if (n.expandedKeys)
68
72
  d.value = new Set(n.expandedKeys);
69
73
  else {
@@ -76,249 +80,233 @@ const ke = /* @__PURE__ */ ae({
76
80
  d.value = new Set(e(n.filters)), i("update:expandedKeys", d.value);
77
81
  }
78
82
  });
79
- function z(e) {
83
+ function N(e) {
80
84
  d.value.has(e) ? d.value.delete(e) : d.value.add(e), i("update:expandedKeys", d.value);
81
85
  }
82
- function L(e) {
86
+ function E(e) {
83
87
  return d.value.has(e);
84
88
  }
85
- function V(e) {
89
+ function O(e) {
86
90
  const o = e.style;
87
91
  o.height = "0", o.overflow = "hidden", o.opacity = "0";
88
92
  }
89
- function q(e, o) {
93
+ function R(e, o) {
90
94
  const l = e, s = l.scrollHeight, u = l.style;
91
95
  u.transition = "height 0.2s ease, opacity 0.2s ease", l.offsetHeight, u.height = `${s}px`, u.opacity = "1", l.addEventListener("transitionend", o, {
92
96
  once: !0
93
97
  });
94
98
  }
95
- function U(e) {
99
+ function j(e) {
96
100
  e.style.cssText = "";
97
101
  }
98
- function X(e) {
102
+ function $(e) {
99
103
  const o = e, l = o.style;
100
104
  l.height = `${o.scrollHeight}px`, l.overflow = "hidden";
101
105
  }
102
- function Y(e, o) {
106
+ function z(e, o) {
103
107
  const l = e, s = l.style;
104
108
  s.transition = "height 0.15s ease, opacity 0.15s ease", l.offsetHeight, s.height = "0", s.opacity = "0", l.addEventListener("transitionend", o, {
105
109
  once: !0
106
110
  });
107
111
  }
108
- function G(e) {
112
+ function V(e) {
109
113
  e.style.cssText = "";
110
114
  }
111
- ue(() => n.selectedKeys, (e) => {
115
+ oe(() => n.selectedKeys, (e) => {
112
116
  a.value = [...e];
113
117
  });
114
118
  function I(e, o) {
115
119
  return typeof n.filterSearch == "function" ? n.filterSearch(o, e) : e.text.toLowerCase().includes(o.toLowerCase());
116
120
  }
117
- function J(e, o) {
121
+ function q(e, o) {
118
122
  return e.filter((l) => I(l, o));
119
123
  }
120
- const T = f(() => !n.filterSearch || !h.value || n.filterMode === "tree" ? n.filters : J(n.filters, h.value)), w = f(() => t.presetConfig?.value.filterSingleSelectMode === "highlight"), m = f(() => t.locale?.value.filterDropdown), Q = f(() => T.value.length > 0), k = f(() => !!n.filterSearch && h.value.trim().length > 0 && n.filterMode !== "tree" && !Q.value);
121
- function B(e) {
124
+ const m = f(() => !n.filterSearch || !c.value || n.filterMode === "tree" ? n.filters : q(n.filters, c.value)), p = f(() => t.presetConfig?.value.filterSingleSelectMode === "highlight"), v = f(() => t.locale?.value.filterDropdown), U = f(() => m.value.length > 0), k = f(() => !!n.filterSearch && c.value.trim().length > 0 && n.filterMode !== "tree" && !U.value);
125
+ function L(e) {
122
126
  return a.value.includes(e);
123
127
  }
124
- function M(e, o) {
128
+ function A(e, o) {
125
129
  if (n.multiple) {
126
130
  if (n.filterMode === "tree" && o) {
127
131
  const l = new Set(a.value);
128
132
  if (!!o.children?.length) {
129
- const u = D([o]);
130
- u.every((c) => l.has(c)) ? u.forEach((c) => l.delete(c)) : u.forEach((c) => l.add(c));
133
+ const u = w([o]);
134
+ u.every((h) => l.has(h)) ? u.forEach((h) => l.delete(h)) : u.forEach((h) => l.add(h));
131
135
  } else
132
136
  l.has(e) ? l.delete(e) : l.add(e);
133
- $(n.filters, l), a.value = Array.from(l);
137
+ _(n.filters, l), a.value = Array.from(l);
134
138
  } else {
135
139
  const l = a.value.indexOf(e);
136
140
  l > -1 ? a.value.splice(l, 1) : a.value.push(e);
137
141
  }
138
142
  return;
139
143
  }
140
- B(e) || (a.value = [e]);
144
+ L(e) || (a.value = [e]);
141
145
  }
142
- function Z() {
146
+ function X() {
143
147
  i("confirm", [...a.value]);
144
148
  }
145
- function ee() {
149
+ function Y() {
146
150
  a.value = [], i("reset");
147
151
  }
148
- const C = f(() => n.filterMode === "tree" && n.multiple), E = f(() => C.value ? D(T.value) : []), g = f(() => {
149
- const e = E.value.length;
152
+ const y = f(() => n.filterMode === "tree" && n.multiple), b = f(() => y.value ? w(m.value) : []), S = f(() => {
153
+ const e = b.value.length;
150
154
  if (e === 0) return "none";
151
- const o = E.value.filter((l) => a.value.includes(l)).length;
155
+ const o = b.value.filter((l) => a.value.includes(l)).length;
152
156
  return o === 0 ? "none" : o === e ? "all" : "partial";
153
157
  });
154
- function te() {
155
- g.value === "all" ? a.value = [] : a.value = [...E.value];
156
- }
157
- function A(e) {
158
- n.visible && v.value && !v.value.contains(e.target) && i("close");
158
+ function G() {
159
+ S.value === "all" ? a.value = [] : a.value = [...b.value];
159
160
  }
160
- function F(e) {
161
- n.visible && (v.value?.contains(e.target) || i("close"));
162
- }
163
- W(() => {
164
- ce(() => {
165
- document.addEventListener("mousedown", A), window.addEventListener("scroll", F, !0);
166
- });
167
- }), de(() => {
168
- document.removeEventListener("mousedown", A), window.removeEventListener("scroll", F, !0);
169
- });
170
- function K(e, o) {
171
- return n.multiple ? r(N, {
161
+ function B(e, o) {
162
+ return n.multiple ? r(P, {
172
163
  checked: e,
173
164
  indeterminate: o
174
- }, null) : w.value ? null : r(he, {
165
+ }, null) : p.value ? null : r(ae, {
175
166
  checked: e
176
167
  }, null);
177
168
  }
178
- function le(e, o = 0) {
179
- const l = B(e.value), s = !!e.children?.length, u = L(e.value), p = !n.multiple && w.value, c = n.filterMode === "tree" && h.value.trim().length > 0 && I(e, h.value);
180
- let S = !1;
181
- if (C.value && s) {
182
- const oe = D(e.children).some((se) => a.value.includes(se));
183
- S = !l && oe;
169
+ function J(e, o = 0) {
170
+ const l = L(e.value), s = !!e.children?.length, u = E(e.value), x = !n.multiple && p.value, h = n.filterMode === "tree" && c.value.trim().length > 0 && I(e, c.value);
171
+ let D = !1;
172
+ if (y.value && s) {
173
+ const ee = w(e.children).some((te) => a.value.includes(te));
174
+ D = !l && ee;
184
175
  }
185
- const ne = () => s ? r("span", {
176
+ const Q = () => s ? r("span", {
186
177
  class: [t.subThemeSlots?.filterDropdownSwitcher(), u ? t.subThemeSlots?.filterDropdownSwitcherExpanded() : t.subThemeSlots?.filterDropdownSwitcherCollapsed()],
187
- onClick: (R) => {
188
- R.stopPropagation(), z(e.value);
178
+ onClick: (K) => {
179
+ K.stopPropagation(), N(e.value);
189
180
  },
190
181
  "aria-label": u ? "Collapse" : "Expand"
191
- }, [r(me, null, null)]) : r("span", {
182
+ }, [r(ue, null, null)]) : r("span", {
192
183
  class: [t.subThemeSlots?.filterDropdownSwitcher(), t.subThemeSlots?.filterDropdownSwitcherNoop()],
193
184
  "aria-hidden": "true"
194
- }, null), b = n.filterMode === "tree", H = b ? t.subThemeSlots?.filterDropdownTreeItem() : t.subThemeSlots?.filterDropdownItem(), P = b ? t.subThemeSlots?.filterDropdownTreeContentWrapper() : t.subThemeSlots?.filterDropdownContentWrapper(), re = b ? {
185
+ }, null), g = n.filterMode === "tree", F = g ? t.subThemeSlots?.filterDropdownTreeItem() : t.subThemeSlots?.filterDropdownItem(), M = g ? t.subThemeSlots?.filterDropdownTreeContentWrapper() : t.subThemeSlots?.filterDropdownContentWrapper(), Z = g ? {
195
186
  paddingLeft: `calc(var(--vtg-table-filter-tree-indent-size, 24px) * ${o})`
196
187
  } : void 0;
197
- return b ? r("li", {
188
+ return g ? r("li", {
198
189
  key: String(e.value),
199
- class: H,
200
- style: re,
201
- onClick: () => M(e.value, e)
202
- }, [r(ne, null, null), r("span", {
190
+ class: F,
191
+ style: Z,
192
+ onClick: () => A(e.value, e)
193
+ }, [r(Q, null, null), r("span", {
203
194
  class: t.vtgClass?.("mt-1 mr-2 shrink-0")
204
- }, [K(l, S)]), r("div", {
205
- class: [P, l ? t.subThemeSlots?.filterDropdownTreeItemSelected() : t.subThemeSlots?.filterDropdownItemHover()]
195
+ }, [B(l, D)]), r("div", {
196
+ class: [M, l ? t.subThemeSlots?.filterDropdownTreeItemSelected() : t.subThemeSlots?.filterDropdownItemHover()]
206
197
  }, [r("span", {
207
- class: [t.vtgClass?.("text-[color:var(--color-on-surface)]"), c && t.subThemeSlots?.filterDropdownTreeItemMatched()]
198
+ class: [t.vtgClass?.("text-[color:var(--color-on-surface)]"), h && t.subThemeSlots?.filterDropdownTreeItemMatched()]
208
199
  }, [e.text])])]) : r("li", {
209
200
  key: String(e.value),
210
- role: p ? "radio" : void 0,
211
- "aria-checked": p ? l : void 0,
212
- class: [H, !n.multiple && w.value && t.vtgClass?.("gap-0")]
201
+ role: x ? "radio" : void 0,
202
+ "aria-checked": x ? l : void 0,
203
+ class: [F, !n.multiple && p.value && t.vtgClass?.("gap-0")]
213
204
  }, [r("div", {
214
- class: [P, l ? !n.multiple && t.subThemeSlots?.filterDropdownItemSelectedSingle?.() || t.subThemeSlots?.filterDropdownItemSelected() : t.subThemeSlots?.filterDropdownItemHover()],
215
- onClick: () => M(e.value, e)
216
- }, [K(l, S), r("span", {
205
+ class: [M, l ? !n.multiple && t.subThemeSlots?.filterDropdownItemSelectedSingle?.() || t.subThemeSlots?.filterDropdownItemSelected() : t.subThemeSlots?.filterDropdownItemHover()],
206
+ onClick: () => A(e.value, e)
207
+ }, [B(l, D), r("span", {
217
208
  class: t.vtgClass?.("text-[color:var(--color-on-surface)]")
218
209
  }, [e.text])])]);
219
210
  }
220
- function y(e, o = 0) {
211
+ function T(e, o = 0) {
221
212
  const l = [];
222
213
  for (const s of e)
223
- l.push(le(s, o)), s.children?.length && (n.filterMode === "tree" ? l.push(r(_, {
214
+ l.push(J(s, o)), s.children?.length && (n.filterMode === "tree" ? l.push(r(se, {
224
215
  css: !1,
225
- onBeforeEnter: V,
226
- onEnter: q,
227
- onAfterEnter: U,
228
- onBeforeLeave: X,
229
- onLeave: Y,
230
- onAfterLeave: G
216
+ onBeforeEnter: O,
217
+ onEnter: R,
218
+ onAfterEnter: j,
219
+ onBeforeLeave: $,
220
+ onLeave: z,
221
+ onAfterLeave: V
231
222
  }, {
232
- default: () => [L(s.value) && r("div", {
223
+ default: () => [E(s.value) && r("div", {
233
224
  key: `tree-${s.value}`
234
- }, [y(s.children, o + 1)])]
235
- })) : l.push(...y(s.children, o + 1)));
225
+ }, [T(s.children, o + 1)])]
226
+ })) : l.push(...T(s.children, o + 1)));
236
227
  return l;
237
228
  }
238
229
  return () => {
239
- const {
240
- anchorRect: e
241
- } = n, o = 150, l = n.popupContainer, s = n.filterMode === "tree", u = s ? t.subThemeSlots?.filterDropdownTreeList() : t.subThemeSlots?.filterDropdownList(), p = s ? t.subThemeSlots?.filterDropdownTreeContentWrapper() : t.subThemeSlots?.filterDropdownContentWrapper(), c = Te(e, l, o);
230
+ const e = n.filterMode === "tree", o = e ? t.subThemeSlots?.filterDropdownTreeList() : t.subThemeSlots?.filterDropdownList(), l = e ? t.subThemeSlots?.filterDropdownTreeContentWrapper() : t.subThemeSlots?.filterDropdownContentWrapper();
242
231
  return r(fe, {
243
- to: l
232
+ open: n.visible,
233
+ anchor: n.anchor,
234
+ focusAnchor: n.focusAnchor,
235
+ getPopupContainer: n.getPopupContainer,
236
+ preset: t.themePreset?.value ?? "antdv",
237
+ alignmentWidth: 150,
238
+ class: t.subThemeSlots?.filterDropdown(),
239
+ onDismiss: () => i("close")
244
240
  }, {
245
- default: () => [r(_, {
246
- name: "vtg-dropdown"
241
+ default: () => [n.filterSearch && r("div", {
242
+ class: t.subThemeSlots?.filterDropdownSearch()
243
+ }, [r("div", {
244
+ class: t.subThemeSlots?.filterDropdownSearchField()
245
+ }, [r("span", {
246
+ class: t.subThemeSlots?.filterDropdownSearchIcon(),
247
+ "aria-hidden": "true"
248
+ }, [r(ce, null, null)]), r(ie, {
249
+ bare: !0,
250
+ value: c.value,
251
+ placeholder: v.value?.searchPlaceholder ?? "在筛选项中搜索",
252
+ inputClass: t.subThemeSlots?.filterDropdownSearchInput(),
253
+ "onUpdate:value": (s) => {
254
+ c.value = s;
255
+ }
256
+ }, null)])]), e ? r("div", {
257
+ class: t.subThemeSlots?.filterDropdownTreeWrapper()
258
+ }, [y.value && r("div", {
259
+ key: "__vtg_select_all__",
260
+ class: t.subThemeSlots?.filterDropdownTreeCheckAll(),
261
+ onClick: G
262
+ }, [r("span", {
263
+ class: t.vtgClass?.("mt-1 mr-2 shrink-0")
264
+ }, [r(P, {
265
+ checked: S.value === "all",
266
+ indeterminate: S.value === "partial"
267
+ }, null)]), r("div", {
268
+ class: [l, S.value === "all" ? t.subThemeSlots?.filterDropdownTreeItemSelected() : t.subThemeSlots?.filterDropdownItemHover()]
269
+ }, [r("span", {
270
+ class: t.vtgClass?.("text-[color:var(--color-on-surface)]")
271
+ }, [v.value?.selectAllText ?? "全选"])])]), r(W, {
272
+ maxHeight: "var(--vtg-table-filter-dropdown-max-height, 264px)"
273
+ }, {
274
+ default: () => [r("ul", {
275
+ class: o
276
+ }, [T(m.value), k.value && r("li", {
277
+ class: t.subThemeSlots?.filterDropdownListEmpty()
278
+ }, [v.value?.emptyText ?? "Not Found"])])]
279
+ })]) : r(W, {
280
+ maxHeight: "var(--vtg-table-filter-dropdown-max-height, 264px)"
281
+ }, {
282
+ default: () => [r("ul", {
283
+ role: !n.multiple && p.value ? "radiogroup" : void 0,
284
+ class: o
285
+ }, [T(m.value), k.value && r("li", {
286
+ class: t.subThemeSlots?.filterDropdownListEmpty()
287
+ }, [v.value?.emptyText ?? "Not Found"])])]
288
+ }), r("div", {
289
+ class: t.subThemeSlots?.filterDropdownActions()
290
+ }, [r(H, {
291
+ type: "link",
292
+ size: "sm",
293
+ class: t.subThemeSlots?.filterDropdownResetButton?.(),
294
+ disabled: a.value.length === 0,
295
+ onClick: Y
296
+ }, {
297
+ default: () => [v.value?.resetText ?? "重置"]
298
+ }), r(H, {
299
+ type: "primary",
300
+ size: "sm",
301
+ class: t.subThemeSlots?.filterDropdownConfirmButton?.(),
302
+ onClick: X
247
303
  }, {
248
- default: () => [n.visible && r("div", {
249
- ref: v,
250
- class: t.subThemeSlots?.filterDropdown(),
251
- style: c
252
- }, [n.filterSearch && r("div", {
253
- class: t.subThemeSlots?.filterDropdownSearch()
254
- }, [r("div", {
255
- class: t.subThemeSlots?.filterDropdownSearchField()
256
- }, [r("span", {
257
- class: t.subThemeSlots?.filterDropdownSearchIcon(),
258
- "aria-hidden": "true"
259
- }, [r(pe, null, null)]), r(ve, {
260
- bare: !0,
261
- value: h.value,
262
- placeholder: m.value?.searchPlaceholder ?? "在筛选项中搜索",
263
- inputClass: t.subThemeSlots?.filterDropdownSearchInput(),
264
- "onUpdate:value": (S) => {
265
- h.value = S;
266
- }
267
- }, null)])]), s ? r("div", {
268
- class: t.subThemeSlots?.filterDropdownTreeWrapper()
269
- }, [C.value && r("div", {
270
- key: "__vtg_select_all__",
271
- class: t.subThemeSlots?.filterDropdownTreeCheckAll(),
272
- onClick: te
273
- }, [r("span", {
274
- class: t.vtgClass?.("mt-1 mr-2 shrink-0")
275
- }, [r(N, {
276
- checked: g.value === "all",
277
- indeterminate: g.value === "partial"
278
- }, null)]), r("div", {
279
- class: [p, g.value === "all" ? t.subThemeSlots?.filterDropdownTreeItemSelected() : t.subThemeSlots?.filterDropdownItemHover()]
280
- }, [r("span", {
281
- class: t.vtgClass?.("text-[color:var(--color-on-surface)]")
282
- }, [m.value?.selectAllText ?? "全选"])])]), r(j, {
283
- maxHeight: "var(--vtg-table-filter-dropdown-max-height, 264px)"
284
- }, {
285
- default: () => [r("ul", {
286
- class: u
287
- }, [y(T.value), k.value && r("li", {
288
- class: t.subThemeSlots?.filterDropdownListEmpty()
289
- }, [m.value?.emptyText ?? "Not Found"])])]
290
- })]) : r(j, {
291
- maxHeight: "var(--vtg-table-filter-dropdown-max-height, 264px)"
292
- }, {
293
- default: () => [r("ul", {
294
- role: !n.multiple && w.value ? "radiogroup" : void 0,
295
- class: u
296
- }, [y(T.value), k.value && r("li", {
297
- class: t.subThemeSlots?.filterDropdownListEmpty()
298
- }, [m.value?.emptyText ?? "Not Found"])])]
299
- }), r("div", {
300
- class: t.subThemeSlots?.filterDropdownActions()
301
- }, [r(O, {
302
- type: "link",
303
- size: "sm",
304
- class: t.subThemeSlots?.filterDropdownResetButton?.(),
305
- disabled: a.value.length === 0,
306
- onClick: ee
307
- }, {
308
- default: () => [m.value?.resetText ?? "重置"]
309
- }), r(O, {
310
- type: "primary",
311
- size: "sm",
312
- class: t.subThemeSlots?.filterDropdownConfirmButton?.(),
313
- onClick: Z
314
- }, {
315
- default: () => [m.value?.confirmText ?? "确 定"]
316
- })])])]
317
- })]
304
+ default: () => [v.value?.confirmText ?? "确 定"]
305
+ })])]
318
306
  });
319
307
  };
320
308
  }
321
309
  });
322
310
  export {
323
- ke as default
311
+ xe as default
324
312
  };
@@ -1 +1 @@
1
- {"version":3,"file":"PaginationSizeSelect.d.ts","sourceRoot":"","sources":["../../../../../table/src/components/PaginationSizeSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,EAWL,KAAK,QAAQ,EACb,KAAK,UAAU,EAChB,MAAM,KAAK,CAAA;AAGZ,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;;;;;;;cAO5B,QAAQ,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;;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