@pantograph/vue 0.23.26 → 0.23.28

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.
@@ -1,28 +1,28 @@
1
- import { computed as m, unref as L, defineComponent as re, createBlock as Ve, openBlock as pe, mergeProps as we, withCtx as me, createElementBlock as Ee, createVNode as Ke, h as l, normalizeClass as Ye, renderSlot as Re, ref as ye, watch as Ne, useSlots as Je, useAttrs as Qe, createSlots as Xe, renderList as Ze, normalizeProps as et, guardReactiveProps as tt } from "vue";
2
- import { createContext as Ae, ComboboxInput as ot, ComboboxAnchor as nt, injectComboboxRootContext as at, useFilter as rt, ComboboxPortal as lt, ComboboxContent as st, useEmitAsProps as it, ComboboxRoot as pt } from "reka-ui";
3
- import { g as ut, h as ae, o as ct, f as Te, j as dt } from "./FormItem.vue_vue_type_style_index_0_lang-BpgRONei.js";
4
- import { a as xe, g as gt } from "./options-D4et5euX.js";
1
+ import { computed as m, unref as D, defineComponent as le, createBlock as xe, openBlock as ue, mergeProps as Ke, withCtx as ve, createElementBlock as Re, createVNode as Ne, h as l, normalizeClass as Ye, renderSlot as Ae, ref as Ve, watch as $e, useSlots as Je, useAttrs as Qe, createSlots as Xe, renderList as Ze, normalizeProps as et, guardReactiveProps as tt } from "vue";
2
+ import { createContext as Fe, ComboboxInput as ot, ComboboxAnchor as nt, injectComboboxRootContext as at, useFilter as rt, ComboboxPortal as lt, ComboboxContent as st, useEmitAsProps as it, ComboboxRoot as pt } from "reka-ui";
3
+ import { g as ut, h as re, o as ct, f as Me, j as dt } from "./FormItem.vue_vue_type_style_index_0_lang-BpgRONei.js";
4
+ import { a as Oe, g as gt } from "./options-D4et5euX.js";
5
5
  import { getBemBlock as mt, getBemElement as k, generateVariantClassList as H } from "@pantograph/utils";
6
- import { a as fe, i as U, b as _e, u as ft, d as ze } from "./index-jwkhq8oW.js";
7
- import { cva as Se } from "class-variance-authority";
8
- import { a as vt, l as ht, o as Me } from "./omit-BuBwx_M2.js";
6
+ import { a as he, i as A, b as Se, u as ft, d as Le } from "./index-jwkhq8oW.js";
7
+ import { cva as Be } from "class-variance-authority";
8
+ import { a as vt, l as ht, o as De } from "./omit-BuBwx_M2.js";
9
9
  import { _ as bt } from "./Empty.vue_vue_type_style_index_0_lang-jfObDGf0.js";
10
10
  import { _ as yt } from "./Skeleton.vue_vue_type_style_index_0_lang-Xi8CteLp.js";
11
- import { _ as Ce } from "./Divider.vue_vue_type_style_index_0_lang-B6fQsp1Y.js";
12
- import { b as F, f as Ct, a as Vt, i as _t, d as xt } from "./element-BfQuKSll.js";
11
+ import { _ as _e } from "./Divider.vue_vue_type_style_index_0_lang-B6fQsp1Y.js";
12
+ import { b as U, f as Ct, a as Vt, i as _t, d as xt } from "./element-BfQuKSll.js";
13
13
  import { u as St, U as Ot } from "./useInputDataStates-0nK-AuOK.js";
14
14
  import { u as Bt } from "./useLazyLoading-Zo-PEp2E.js";
15
- import { g as Pt, b as kt } from "./Popover.vue_vue_type_style_index_0_lang-DyIDJxIC.js";
16
- import { _ as It } from "./ScrollContainer.vue_vue_type_style_index_0_lang-DfMU1mTu.js";
15
+ import { g as Pt, b as It } from "./Popover.vue_vue_type_style_index_0_lang-DyIDJxIC.js";
16
+ import { _ as kt } from "./ScrollContainer.vue_vue_type_style_index_0_lang-DfMU1mTu.js";
17
17
  import { _ as Tt } from "./Tree.vue_vue_type_style_index_0_lang-E0A2gSV2.js";
18
- import { u as De } from "./uniq-Cxafs-eV.js";
19
- import { i as X } from "./isEmpty-wdqPTIXx.js";
18
+ import { u as we } from "./uniq-Cxafs-eV.js";
19
+ import { i as ae } from "./isEmpty-wdqPTIXx.js";
20
20
  import { _ as zt } from "./Chip.vue_vue_type_style_index_0_lang-DXsCoBle.js";
21
21
  import { _ as Mt } from "./ChipGroup.vue_vue_type_style_index_0_lang-R-SmBNur.js";
22
- import { _ as Oe } from "./Icon.vue_vue_type_style_index_0_lang-CbLL-Ngi.js";
23
- import { d as Dt, _ as $e } from "./Avatar.vue_vue_type_style_index_0_lang-DRTI7zpy.js";
24
- import { _ as Lt } from "./GraphicalObjectGroup.vue_vue_type_style_index_0_lang-C3LfQ7iN.js";
25
- import { _ as Fe } from "./GraphicalObject.vue_vue_type_script_setup_true_lang-Cm_eOjGc.js";
22
+ import { _ as Pe } from "./Icon.vue_vue_type_style_index_0_lang-CbLL-Ngi.js";
23
+ import { d as Lt, _ as We } from "./Avatar.vue_vue_type_style_index_0_lang-DRTI7zpy.js";
24
+ import { _ as Dt } from "./GraphicalObjectGroup.vue_vue_type_style_index_0_lang-C3LfQ7iN.js";
25
+ import { _ as Ge } from "./GraphicalObject.vue_vue_type_script_setup_true_lang-Cm_eOjGc.js";
26
26
  import { _ as wt } from "./Input.vue_vue_type_style_index_0_lang-oEQu3uIk.js";
27
27
  import { whenever as Et, useVModel as Kt } from "@vueuse/core";
28
28
  import { last as Rt } from "lodash-es";
@@ -30,13 +30,13 @@ import { a as Nt } from "./MenuItem.vue_vue_type_style_index_0_lang-7T_SPKSm.js"
30
30
  import "@iconify/vue";
31
31
  import { _ as At } from "./Checkbox.vue_vue_type_style_index_0_lang-aDK0Pvm-.js";
32
32
  import "@pantograph/tokens";
33
- const [Be, $t] = Ae("Combobox"), [Ft, Wt] = Ae("_Combobox"), R = mt("combobox");
33
+ const [Ie, $t] = Fe("Combobox"), [Ft, Wt] = Fe("_Combobox"), E = mt("combobox");
34
34
  var Gt = 1 / 0;
35
35
  function Ut(u) {
36
36
  var o = u == null ? 0 : u.length;
37
37
  return o ? vt(u, Gt) : [];
38
38
  }
39
- const ge = (u) => ut(u) || fe(u);
39
+ const fe = (u) => ut(u) || he(u);
40
40
  function jt({
41
41
  getValue: u,
42
42
  arr: o,
@@ -44,11 +44,11 @@ function jt({
44
44
  }) {
45
45
  const e = [], c = (i, B) => {
46
46
  i.forEach((T) => {
47
- const _ = u(T);
48
- if (ge(_)) {
49
- e.push({ ...T, _parentKeys: B, _key: _ });
47
+ const x = u(T);
48
+ if (fe(x)) {
49
+ e.push({ ...T, _parentKeys: B, _key: x });
50
50
  const y = t(T);
51
- y != null && y.length && c(y, [...B ?? [], _]);
51
+ y != null && y.length && c(y, [...B ?? [], x]);
52
52
  }
53
53
  });
54
54
  };
@@ -61,130 +61,138 @@ const Ht = ({
61
61
  getChildren: e
62
62
  }) => {
63
63
  const c = m(
64
- () => jt({ arr: L(u()), getChildren: e, getValue: t })
64
+ () => jt({ arr: D(u()), getChildren: e, getValue: t })
65
65
  ), i = (r, f = !1) => {
66
66
  const d = t(r);
67
67
  return c.value.filter((s) => {
68
- var x;
68
+ var S;
69
69
  if (f) {
70
70
  const V = ht(s._parentKeys ?? []);
71
71
  return V && V === d;
72
72
  }
73
- return (x = s._parentKeys) == null ? void 0 : x.includes(d);
73
+ return (S = s._parentKeys) == null ? void 0 : S.includes(d);
74
74
  });
75
75
  }, B = (r) => {
76
- if (r && U(r))
77
- return ae(r);
78
- const f = L(o());
79
- return f && U(f) ? ae(f) : [];
76
+ if (r && A(r))
77
+ return re(r);
78
+ const f = D(o());
79
+ return f && A(f) ? re(f) : [];
80
80
  }, T = (r, f) => {
81
81
  const d = B(f), s = i(r);
82
82
  if (s != null && s.length)
83
- return s.some((x) => {
83
+ return s.some((S) => {
84
84
  var a;
85
- const V = x._key;
85
+ const V = S._key;
86
86
  return V && ((a = d == null ? void 0 : d.includes) == null ? void 0 : a.call(d, V));
87
87
  });
88
- }, _ = (r, f) => {
88
+ }, x = (r, f) => {
89
89
  const d = B(f), s = i(r);
90
90
  if (s != null && s.length)
91
- return s.every((x) => {
91
+ return s.every((S) => {
92
92
  var a;
93
- const V = x._key;
93
+ const V = S._key;
94
94
  return V && ((a = d == null ? void 0 : d.includes) == null ? void 0 : a.call(d, V));
95
95
  });
96
96
  }, y = (r, f) => {
97
- const d = B(f), s = i(r), x = t(r);
98
- return s != null && s.length ? _(r) ? !0 : T(r) ? "intermediate" : !1 : d.includes(x);
99
- }, A = (r) => ge(r) ? c.value.find((f) => f._key === r) : void 0;
97
+ const d = B(f), s = i(r), S = t(r);
98
+ return s != null && s.length ? x(r) ? !0 : T(r) ? "intermediate" : !1 : d.includes(S);
99
+ }, K = (r) => fe(r) ? c.value.find((f) => f._key === r) : void 0;
100
100
  return {
101
101
  flattenData: c,
102
102
  getNodeChildren: i,
103
103
  isSomeChildrenSelected: T,
104
- isAllChildrenSelected: _,
104
+ isAllChildrenSelected: x,
105
105
  isSelected: y,
106
106
  selectValues: (r, f) => {
107
107
  if (r.length) {
108
108
  let d = B();
109
- const s = r.filter(ge);
109
+ const s = r.filter(fe);
110
110
  f ? d.push(...s) : d = d.filter((v) => !s.includes(v));
111
- const x = d.map(A).filter((v) => v && v._parentKeys), a = De(Ut(x.map((v) => v._parentKeys))).filter(ge).map(A).filter(Boolean), I = [], S = [];
111
+ const S = d.map(K).filter((v) => v && v._parentKeys), a = we(Ut(S.map((v) => v._parentKeys))).filter(fe).map(K).filter(Boolean), _ = [], z = [];
112
112
  return a.forEach((v) => {
113
- const w = t(v);
114
- _(v, d) ? I.push(w) : S.push(w);
115
- }), d.push(...I), De(d.filter((v) => !S.includes(v)));
113
+ const j = t(v);
114
+ x(v, d) ? _.push(j) : z.push(j);
115
+ }), d.push(..._), we(d.filter((v) => !z.includes(v)));
116
116
  }
117
117
  }
118
118
  };
119
- }, We = ["sm", "md", "lg"], qt = ["error", "warning", "success"], Yt = { key: 1 }, Ge = /* @__PURE__ */ re({
119
+ }, Ue = ["sm", "md", "lg"], qt = ["error", "warning", "success"], Yt = { key: 1 }, je = /* @__PURE__ */ le({
120
120
  __name: "ComboboxInput",
121
121
  setup(u) {
122
- const o = Be();
122
+ const o = Ie();
123
123
  Et(
124
124
  () => o.open.value && o.headerInputElement.value,
125
125
  () => {
126
126
  o.headerInputElement.value && o.open.value && o.focusOnInput();
127
127
  }
128
128
  );
129
- const t = m(() => !X(o.modelValue.value)), e = m(() => t.value ? U(o.modelValue.value) ? o.getLabelByValue(Rt(o.modelValue.value)) : o.getLabelByValue(o.modelValue.value) : o.props.placeholder), c = (T) => {
130
- if (T.key === "Backspace" && o.props.multiple && U(o.modelValue.value) && X(o.searchModel.value) && (o.setModelValue(o.modelValue.value.slice(0, -1)), X(o.modelValue.value))) {
131
- const _ = setTimeout(() => {
132
- o.focusOnInput(), clearTimeout(_);
129
+ const t = m(() => !ae(o.modelValue.value)), e = m(() => {
130
+ if (t.value) {
131
+ if (o.props.multiple && A(o.modelValue.value) && !o.props.noLastValueOnPlaceholder)
132
+ return o.getLabelByValue(Rt(o.modelValue.value));
133
+ if (!o.props.multiple && !A(o.modelValue.value))
134
+ return o.getLabelByValue(o.modelValue.value);
135
+ }
136
+ return o.props.placeholder ?? "";
137
+ }), c = (T) => {
138
+ if (T.key === "Backspace" && o.props.multiple && A(o.modelValue.value) && ae(o.searchModel.value) && (o.setModelValue(o.modelValue.value.slice(0, -1)), ae(o.modelValue.value))) {
139
+ const x = setTimeout(() => {
140
+ o.focusOnInput(), clearTimeout(x);
133
141
  }, 2);
134
142
  }
135
- }, i = k(R, "input"), B = Se(i, {
143
+ }, i = k(E, "input"), B = Be(i, {
136
144
  variants: {
137
145
  valuePlaceholder: H("value-placeholder", i)
138
146
  }
139
147
  });
140
- return (T, _) => (pe(), Ve(L(ot), we(L(o).comboboxInputBinding.value, {
141
- disabled: L(o).getDisabled.value,
148
+ return (T, x) => (ue(), xe(D(ot), Ke(D(o).comboboxInputBinding.value, {
149
+ disabled: D(o).getDisabled.value,
142
150
  placeholder: e.value,
143
151
  "as-child": "",
144
- modelValue: L(o).searchModel.value,
145
- "onUpdate:modelValue": _[0] || (_[0] = (y) => L(o).searchModel.value = y),
152
+ modelValue: D(o).searchModel.value,
153
+ "onUpdate:modelValue": x[0] || (x[0] = (y) => D(o).searchModel.value = y),
146
154
  onKeydown: c,
147
- class: L(B)({
155
+ class: D(B)({
148
156
  valuePlaceholder: t.value
149
157
  }),
150
158
  displayValue: () => ""
151
159
  }), {
152
- default: me(() => [
153
- L(o).props.headerSearch ? (pe(), Ve(wt, {
160
+ default: ve(() => [
161
+ D(o).props.headerSearch ? (ue(), xe(wt, {
154
162
  key: 0,
155
- ref: L(o).headerInputElement,
156
- placeholder: L(o).props.placeholder
163
+ ref: D(o).headerInputElement,
164
+ placeholder: D(o).props.placeholder
157
165
  }, {
158
- leading: me(({ iconSize: y }) => [
159
- Ke(Oe, {
166
+ leading: ve(({ iconSize: y }) => [
167
+ Ne(Pe, {
160
168
  size: y,
161
169
  icon: "tabler:search",
162
170
  flipOnDir: "rtl"
163
171
  }, null, 8, ["size"])
164
172
  ]),
165
173
  _: 1
166
- }, 8, ["placeholder"])) : (pe(), Ee("input", Yt))
174
+ }, 8, ["placeholder"])) : (ue(), Re("input", Yt))
167
175
  ]),
168
176
  _: 1
169
177
  }, 16, ["disabled", "placeholder", "modelValue", "class"]));
170
178
  }
171
- }), Jt = /* @__PURE__ */ re({
172
- name: xe("ComboboxTrigger"),
179
+ }), Jt = /* @__PURE__ */ le({
180
+ name: Oe("ComboboxTrigger"),
173
181
  props: {},
174
182
  setup(u, {
175
183
  slots: o,
176
184
  attrs: t
177
185
  }) {
178
- const e = Be(), c = ({
186
+ const e = Ie(), c = ({
179
187
  value: a
180
- }, I) => {
181
- if (I.stopPropagation(), a && U(e.modelValue.value) && !e.getDisabled.value) {
182
- const S = e.modelValue.value.filter((v) => v !== a);
183
- e.setModelValue(S);
188
+ }, _) => {
189
+ if (_.stopPropagation(), a && A(e.modelValue.value) && !e.getDisabled.value) {
190
+ const z = e.modelValue.value.filter((v) => v !== a);
191
+ e.setModelValue(z);
184
192
  }
185
- }, i = k(R, "trigger"), B = Se(i, {
193
+ }, i = k(E, "trigger"), B = Be(i, {
186
194
  variants: {
187
- size: H(We, i),
195
+ size: H(Ue, i),
188
196
  headerSearch: H("header-search", i),
189
197
  status: H(qt, i),
190
198
  bordered: H("bordered", i),
@@ -201,23 +209,23 @@ const Ht = ({
201
209
  default:
202
210
  return "xsm";
203
211
  }
204
- }), _ = m(() => {
205
- if (!e.props.multiple && fe(e.modelValue.value) && !X(e.modelValue.value))
212
+ }), x = m(() => {
213
+ if (!e.props.multiple && he(e.modelValue.value) && !ae(e.modelValue.value))
206
214
  return e.getOptionByValue(e.modelValue.value);
207
- }), y = (a = _.value) => {
208
- if (e.props.selectedItemIconAsTrailingIcon && _e(a) && "icon" in a)
215
+ }), y = (a = x.value) => {
216
+ if (e.props.selectedItemIconAsTrailingIcon && Se(a) && "icon" in a)
209
217
  return a.icon;
210
- }, A = m(() => y()), $ = m(() => {
218
+ }, K = m(() => y()), R = m(() => {
211
219
  if (!e.props.noTrailing)
212
220
  return e.props.trailingIcon;
213
221
  }), r = m(() => {
214
- var S, v;
215
- const a = ae(e.modelValue.value), I = U(e.modelValue.value);
222
+ var z, v;
223
+ const a = re(e.modelValue.value), _ = A(e.modelValue.value);
216
224
  return {
217
225
  modelValue: a,
218
- open: ae(e.open.value),
219
- option: I ? void 0 : e.getOptionByValue(e.modelValue.value),
220
- options: I ? (v = (S = e.modelValue.value).map) == null ? void 0 : v.call(S, e.getOptionByValue).filter(Boolean) : void 0
226
+ open: re(e.open.value),
227
+ option: _ ? void 0 : e.getOptionByValue(e.modelValue.value),
228
+ options: _ ? (v = (z = e.modelValue.value).map) == null ? void 0 : v.call(z, e.getOptionByValue).filter(Boolean) : void 0
221
229
  };
222
230
  }), f = () => {
223
231
  e.onOpenChange(!e.open.value);
@@ -236,88 +244,96 @@ const Ht = ({
236
244
  "data-state": e.open.value ? "open" : "closed",
237
245
  class: [B({
238
246
  size: e.getSize.value,
239
- status: e.getStatus.value === "success" && X(e.modelValue.value) ? void 0 : e.getStatus.value,
247
+ status: e.getStatus.value === "success" && ae(e.modelValue.value) ? void 0 : e.getStatus.value,
240
248
  bordered: e.props.bordered,
241
249
  multiple: e.props.multiple,
242
250
  contentFit: e.props.contentFit,
243
251
  wrapped: e.props.wrapped,
244
- filled: !X(e.modelValue.value),
252
+ filled: !ae(e.modelValue.value),
245
253
  headerSearch: e.props.headerSearch
246
254
  }), e.props.triggerCls],
247
255
  ...t
248
- })), x = (a, I = T.value) => l(Oe, {
256
+ })), S = (a, _ = T.value) => l(Pe, {
249
257
  icon: a,
250
- size: I
258
+ size: _
251
259
  }), V = () => {
252
- var S;
260
+ var z;
253
261
  let a;
254
- const I = (S = o.triggerTrailing) == null ? void 0 : S.call(o, r.value);
255
- if (F(I) ? $.value && (a = x($.value)) : a = I, a)
262
+ const _ = (z = o.triggerTrailing) == null ? void 0 : z.call(o, r.value);
263
+ if (U(_) ? R.value && (a = S(R.value)) : a = _, a)
256
264
  return l("div", {
257
265
  class: [k(i, "trailing"), e.props.triggerTrailingCls]
258
266
  }, a);
259
267
  };
260
268
  return () => {
261
- var v;
262
- const a = (v = o.trigger) == null ? void 0 : v.call(o, r.value), S = (() => {
263
- if (F(a)) return !1;
264
- const w = Ct(a) ?? null, N = w.length === 1 ? w[0] : w;
265
- return N ? Vt(N) && !_t(N) : !0;
266
- })();
269
+ var ee;
270
+ const a = (ee = o.trigger) == null ? void 0 : ee.call(o, r.value), _ = !U(a), v = (() => {
271
+ if (!_) return !1;
272
+ const Q = Ct(a) ?? null, X = Q.length === 1 ? Q[0] : Q;
273
+ return X ? Vt(X) && !_t(X) : !0;
274
+ })(), {
275
+ class: j,
276
+ ...J
277
+ } = s.value;
267
278
  return l(nt, {
268
- ...s.value,
279
+ ...J,
280
+ class: _ ? e.props.triggerCls : j,
269
281
  ...e.comboboxTriggerBinding.value,
270
- asChild: S,
271
- as: S ? "template" : "button",
272
- key: String(S),
282
+ asChild: v,
283
+ as: v ? "template" : "button",
284
+ key: String(v),
273
285
  onKeyUp: d,
274
286
  onClick: f
275
287
  }, () => {
276
- if (!F(a))
288
+ if (_)
277
289
  return a;
278
- const w = (M) => {
279
- var J, j;
280
- const K = e.getOptionByValue(M);
281
- return l($e, {
282
- ...K ? ((j = (J = e.props).getTagProps) == null ? void 0 : j.call(J, K)) ?? {} : {},
290
+ const Q = (P) => {
291
+ var F, N;
292
+ const $ = e.getOptionByValue(P) ?? {
293
+ value: P
294
+ };
295
+ return l(We, {
296
+ ...$ ? ((N = (F = e.props).getTagProps) == null ? void 0 : N.call(F, $)) ?? {} : {},
283
297
  size: e.getTagSize.value
284
298
  });
285
- }, N = (M) => {
286
- var J, j;
287
- const K = e.getOptionByValue(M);
288
- return l(Fe, {
289
- ...K ? ((j = (J = e.props).getTagProps) == null ? void 0 : j.call(J, K)) ?? {} : {},
299
+ }, X = (P) => {
300
+ var F, N;
301
+ const $ = e.getOptionByValue(P) ?? {
302
+ value: P
303
+ };
304
+ return l(Ge, {
305
+ ...$ ? ((N = (F = e.props).getTagProps) == null ? void 0 : N.call(F, $)) ?? {} : {},
290
306
  size: e.getTagSize.value
291
307
  });
292
308
  }, Z = () => {
293
- if (!e.props.multiple && !U(e.modelValue.value) && e.modelValue.value && (e.props.tagRenderMode && ["avatar", "go"].includes(e.props.tagRenderMode) || A.value || e.props.leadingIcon)) {
294
- let M;
295
- if (e.props.tagRenderMode === "avatar" ? M = w(e.modelValue.value) : e.props.tagRenderMode === "go" ? M = N(e.modelValue.value) : A.value ? M = x(A.value) : e.props.leadingIcon && (M = x(e.props.leadingIcon)), !F(M))
309
+ if (!e.props.multiple && !e.props.multiple && !A(e.modelValue.value) && e.modelValue.value && (e.props.tagRenderMode && ["avatar", "go"].includes(e.props.tagRenderMode) || K.value || e.props.leadingIcon)) {
310
+ let P;
311
+ if (e.props.tagRenderMode === "avatar" ? P = Q(e.modelValue.value) : e.props.tagRenderMode === "go" ? P = X(e.modelValue.value) : K.value ? P = S(K.value) : e.props.leadingIcon && (P = S(e.props.leadingIcon)), !U(P))
296
312
  return l("div", {
297
313
  class: [k(i, "leading"), e.props.triggerLeadingCls]
298
- }, M);
314
+ }, P);
299
315
  }
300
- }, ve = () => {
301
- const M = [], K = [k(i, "tags"), e.props.triggerContentCls, X(e.modelValue.value) ? e.props.triggerContentPlaceholderCls : e.props.triggerContentValueCls], j = (() => {
302
- if (e.props.multiple && U(e.modelValue.value)) {
316
+ }, ce = () => {
317
+ const P = [], $ = [k(i, "tags"), e.props.triggerContentCls, e.props.triggerContentValueCls], N = (() => {
318
+ if (e.props.multiple && A(e.modelValue.value)) {
303
319
  if (e.props.tagRenderMode === "avatar")
304
- return l(Dt, {
320
+ return l(Lt, {
305
321
  maxCount: e.props.maxCount,
306
322
  size: e.getTagSize.value,
307
323
  closeable: !e.getDisabled.value,
308
324
  noPopover: !0,
309
325
  noWrap: !e.props.wrapped,
310
- class: K
311
- }, () => e.modelValue.value.map(w));
326
+ class: $
327
+ }, () => e.modelValue.value.map(Q));
312
328
  if (e.props.tagRenderMode === "go")
313
- return l(Lt, {
329
+ return l(Dt, {
314
330
  maxCount: e.props.maxCount,
315
331
  size: e.getTagSize.value,
316
332
  closeable: !e.getDisabled.value,
317
333
  noPopover: !0,
318
334
  noWrap: !e.props.wrapped,
319
- class: K
320
- }, () => e.modelValue.value.map(N));
335
+ class: $
336
+ }, () => e.modelValue.value.map(X));
321
337
  if (e.props.tagRenderMode === "chip")
322
338
  return l(Mt, {
323
339
  maxCount: e.props.maxCount,
@@ -326,49 +342,49 @@ const Ht = ({
326
342
  closeable: !e.getDisabled.value,
327
343
  noPopover: !0,
328
344
  noWrap: !e.props.wrapped,
329
- class: K,
345
+ class: $,
330
346
  onClose: c
331
- }, () => e.modelValue.value.map((te) => {
332
- var ne, ue;
333
- const oe = () => e.getLabelByValue(te), se = ({
334
- size: ce
347
+ }, () => e.modelValue.value.map((q) => {
348
+ var ge, ne;
349
+ const se = () => e.getLabelByValue(q), be = ({
350
+ size: ye
335
351
  }) => {
336
- const de = y(e.getOptionByValue(te)) ?? e.props.leadingIcon;
337
- return de ? x(de, ce) : null;
338
- }, Q = e.getOptionByValue(te);
352
+ const me = y(e.getOptionByValue(q)) ?? e.props.leadingIcon;
353
+ return me ? S(me, ye) : null;
354
+ }, ie = e.getOptionByValue(q);
339
355
  return l(zt, {
340
- ...Q ? ((ue = (ne = e.props).getTagProps) == null ? void 0 : ue.call(ne, Q)) ?? {} : {},
341
- value: te,
356
+ ...ie ? ((ne = (ge = e.props).getTagProps) == null ? void 0 : ne.call(ge, ie)) ?? {} : {},
357
+ value: q,
342
358
  class: [k(i, "tag"), e.props.tagCls],
343
359
  closeIconCls: k(i, "tag__close")
344
360
  }, {
345
- text: oe,
346
- leading: se
361
+ text: se,
362
+ leading: be
347
363
  });
348
364
  }));
349
365
  }
350
366
  })();
351
- return j && M.push(j), e.props.headerSearch || M.push(l(Ge)), l("div", {
367
+ return N && P.push(N), e.props.headerSearch ? e.props.showLabelValueOnHeaderSearch && P.push(l("div", {}, "dddd")) : P.push(l(je)), l("div", {
352
368
  class: k(i, "content")
353
- }, M);
354
- }, ee = [], q = Z();
355
- F(q) || ee.push(q), ee.push(ve());
356
- const le = V();
357
- return F(le) || ee.push(le), ee;
369
+ }, P);
370
+ }, oe = [], te = Z();
371
+ U(te) || oe.push(te), oe.push(ce());
372
+ const de = V();
373
+ return U(de) || oe.push(de), oe;
358
374
  });
359
375
  };
360
376
  }
361
- }), Qt = /* @__PURE__ */ re({
377
+ }), Qt = /* @__PURE__ */ le({
362
378
  __name: "ComboboxLabel",
363
379
  setup(u) {
364
- return (o, t) => (pe(), Ee("div", {
365
- class: Ye(L(k)(L(R), "label"))
380
+ return (o, t) => (ue(), Re("div", {
381
+ class: Ye(D(k)(D(E), "label"))
366
382
  }, [
367
- Re(o.$slots, "default")
383
+ Ae(o.$slots, "default")
368
384
  ], 2));
369
385
  }
370
- }), Le = /* @__PURE__ */ re({
371
- name: xe("SelectOption"),
386
+ }), Ee = /* @__PURE__ */ le({
387
+ name: Oe("SelectOption"),
372
388
  props: {
373
389
  option: {
374
390
  type: [Object, String],
@@ -379,7 +395,7 @@ const Ht = ({
379
395
  setup(u, {
380
396
  slots: o
381
397
  }) {
382
- const t = Be(), e = m(() => {
398
+ const t = Ie(), e = m(() => {
383
399
  switch (t.getSize.value) {
384
400
  case "sm":
385
401
  return "2xsm";
@@ -389,56 +405,56 @@ const Ht = ({
389
405
  default:
390
406
  return "xsm";
391
407
  }
392
- }), c = m(() => t.getOptionValue(u.option)), i = m(() => t.getOptionNoCheckbox(u.option)), B = m(() => t.getOptionClear(u.option)), T = m(() => t.getOptionSingle(u.option)), _ = m(() => t.getOptionLabel(u.option)), y = m(() => t.getOptionIcon(u.option)), A = m(() => t.props.tree ? void 0 : t.getOptionDescription(u.option)), $ = m(() => t.getOptionDisabled(u.option)), r = m(() => t.isItemSelected(c.value)), f = k(R, "option"), d = () => {
393
- if (!(t.props.tree || !c.value || $.value))
408
+ }), c = m(() => t.getOptionValue(u.option)), i = m(() => t.getOptionNoCheckbox(u.option)), B = m(() => t.getOptionClear(u.option)), T = m(() => t.getOptionSingle(u.option)), x = m(() => t.getOptionLabel(u.option)), y = m(() => t.getOptionIcon(u.option)), K = m(() => t.props.tree ? void 0 : t.getOptionDescription(u.option)), R = m(() => t.getOptionDisabled(u.option)), r = m(() => t.isItemSelected(c.value)), f = k(E, "option"), d = () => {
409
+ if (!(t.props.tree || !c.value || R.value))
394
410
  if (t.props.multiple)
395
411
  if (B.value)
396
412
  t.setModelValue([]), t.emit("select", void 0, !1);
397
413
  else if (T.value)
398
414
  t.setModelValue([c.value]), t.emit("select", c.value, !0);
399
415
  else {
400
- let s = U(t.modelValue.value) ? t.modelValue.value : [];
401
- const x = s.includes(c.value);
402
- s.length === 1 && t.getSingleByValue(s[0]) && c.value !== s[0] && (s = []), x ? (t.setModelValue(s.filter((V) => V !== c.value)), t.emit("select", c.value, !0)) : (t.setModelValue([...s, c.value]), t.emit("select", c.value, !1));
416
+ let s = A(t.modelValue.value) ? t.modelValue.value : [];
417
+ const S = s.includes(c.value);
418
+ s.length === 1 && t.getSingleByValue(s[0]) && c.value !== s[0] && (s = []), S ? (t.setModelValue(s.filter((V) => V !== c.value)), t.emit("select", c.value, !0)) : (t.setModelValue([...s, c.value]), t.emit("select", c.value, !1));
403
419
  }
404
420
  else B.value ? (t.setModelValue(void 0), t.emit("select", void 0, !1)) : (t.setModelValue(c.value), t.emit("select", c.value, !0));
405
421
  };
406
422
  if (!u.option) throw new Error("option is required");
407
423
  return () => {
408
424
  const s = (V) => {
409
- var S, v, w, N, Z;
425
+ var z, v, j, J, ee;
410
426
  const a = [];
411
427
  !t.props.tree && t.props.multiple && t.props.checkbox && !i.value && a.push(l(At, {
412
428
  modelValue: r.value,
413
429
  size: V.checkboxSize,
414
- disabled: $.value
430
+ disabled: R.value
415
431
  }));
416
- const I = (S = o.leading) == null ? void 0 : S.call(o, {
432
+ const _ = (z = o.leading) == null ? void 0 : z.call(o, {
417
433
  option: u.option
418
434
  });
419
- return F(I) ? t.props.tagRenderMode === "avatar" ? a.push(l($e, {
420
- ...((w = (v = t.props).getTagProps) == null ? void 0 : w.call(v, u.option)) ?? {},
435
+ return U(_) ? t.props.tagRenderMode === "avatar" ? a.push(l(We, {
436
+ ...((j = (v = t.props).getTagProps) == null ? void 0 : j.call(v, u.option)) ?? {},
421
437
  size: t.getTagSize.value
422
- })) : t.props.tagRenderMode === "go" ? a.push(l(Fe, {
423
- ...((Z = (N = t.props).getTagProps) == null ? void 0 : Z.call(N, u.option)) ?? {},
438
+ })) : t.props.tagRenderMode === "go" ? a.push(l(Ge, {
439
+ ...((ee = (J = t.props).getTagProps) == null ? void 0 : ee.call(J, u.option)) ?? {},
424
440
  size: t.getTagSize.value
425
- })) : y.value && a.push(l(Oe, {
441
+ })) : y.value && a.push(l(Pe, {
426
442
  icon: y.value,
427
443
  size: e.value
428
- })) : a.push(I), F(a) ? null : a;
444
+ })) : a.push(_), U(a) ? null : a;
429
445
  };
430
446
  return (() => {
431
- const V = !!A.value;
447
+ const V = !!K.value;
432
448
  return l(Nt, {
433
449
  class: f,
434
- description: A.value,
435
- title: _.value,
450
+ description: K.value,
451
+ title: x.value,
436
452
  key: c.value,
437
453
  selected: r.value,
438
454
  unFocusable: !0,
439
455
  leadingCenter: !V,
440
456
  size: t.getSize.value,
441
- disabled: $.value,
457
+ disabled: R.value,
442
458
  onClick: d
443
459
  }, {
444
460
  leading: s,
@@ -452,45 +468,45 @@ const Ht = ({
452
468
  })();
453
469
  };
454
470
  }
455
- }), Xt = /* @__PURE__ */ re({
456
- name: xe("ComboboxWrapper"),
471
+ }), Xt = /* @__PURE__ */ le({
472
+ name: Oe("ComboboxWrapper"),
457
473
  setup(u, {
458
474
  slots: o
459
475
  }) {
460
- const t = Ft(), e = at(), c = ye();
476
+ const t = Ft(), e = at(), c = Ve();
461
477
  Bt({
462
478
  target: c
463
479
  });
464
- const i = ye(), B = Pt({
480
+ const i = Ve(), B = Pt({
465
481
  triggerRef: i,
466
482
  props: t.props
467
483
  }), {
468
484
  getFlipOnDir: T,
469
- getDir: _
470
- } = ft(), y = T("reversePlacementOnDir"), A = _(), $ = kt({
485
+ getDir: x
486
+ } = ft(), y = T("reversePlacementOnDir"), K = x(), R = It({
471
487
  props: t.props,
472
488
  flip: y,
473
489
  emitsAsProps: t.emitsAsProps,
474
- _dir: A,
490
+ _dir: K,
475
491
  controlAutoFocus: !1,
476
492
  extraPropNames: ["bodyLock", "position"]
477
493
  }), r = ({
478
494
  key: n,
479
495
  getterKey: p,
480
496
  defaultValue: h,
481
- noReturnOption: P
497
+ noReturnOption: I
482
498
  }) => (b) => {
483
- const D = ze(h) ? h(b) : h;
484
- if (_e(b)) {
485
- const W = b[n] ?? D, G = p && t.props[p];
499
+ const L = Le(h) ? h(b) : h;
500
+ if (Se(b)) {
501
+ const W = b[n] ?? L, G = p && t.props[p];
486
502
  if (G) {
487
- if (fe(G))
503
+ if (he(G))
488
504
  return b[G] ?? W;
489
- if (ze(G)) return G(b) ?? W;
505
+ if (Le(G)) return G(b) ?? W;
490
506
  }
491
507
  return W;
492
508
  }
493
- return fe(b) && !P ? b ?? D : D;
509
+ return he(b) && !I ? b ?? L : L;
494
510
  }, f = r({
495
511
  getterKey: "getValue",
496
512
  key: "value"
@@ -501,7 +517,7 @@ const Ht = ({
501
517
  getterKey: "getSingle",
502
518
  key: "single",
503
519
  noReturnOption: !0
504
- }), x = r({
520
+ }), S = r({
505
521
  getterKey: "getClear",
506
522
  key: "clear",
507
523
  noReturnOption: !0
@@ -513,11 +529,11 @@ const Ht = ({
513
529
  getterKey: "getIcon",
514
530
  key: "icon",
515
531
  noReturnOption: !0
516
- }), I = r({
532
+ }), _ = r({
517
533
  getterKey: "getDescription",
518
534
  key: "description",
519
535
  noReturnOption: !0
520
- }), S = r({
536
+ }), z = r({
521
537
  getterKey: "getDisabled",
522
538
  key: "disabled",
523
539
  defaultValue: !1,
@@ -526,67 +542,67 @@ const Ht = ({
526
542
  getterKey: "getGroupLabel",
527
543
  key: "label",
528
544
  noReturnOption: !0
529
- }), w = r({
545
+ }), j = r({
530
546
  getterKey: "getGroupOptions",
531
547
  key: "options",
532
548
  noReturnOption: !0
533
- }), N = (n) => {
549
+ }), J = (n) => {
534
550
  const p = (h) => {
535
551
  if (h != null && h.length && n)
536
- for (const P of h) {
537
- if (f(P) === n) return P;
538
- const b = w(P);
552
+ for (const I of h) {
553
+ if (f(I) === n) return I;
554
+ const b = j(I);
539
555
  if (b != null && b.length) {
540
- const D = p(b);
541
- if (D) return D;
556
+ const L = p(b);
557
+ if (L) return L;
542
558
  }
543
559
  }
544
560
  };
545
561
  return p(t.props.options);
546
- }, Z = (n) => {
547
- const p = N(n);
562
+ }, ee = (n) => {
563
+ const p = J(n);
548
564
  return p ? V(p) ?? n : n;
549
- }, ve = (n) => {
550
- const p = N(n);
565
+ }, Q = (n) => {
566
+ const p = J(n);
551
567
  return p ? s(p) ?? !1 : !1;
552
568
  }, {
553
- contains: ee
569
+ contains: X
554
570
  } = rt({
555
571
  sensitivity: "base"
556
- }), q = m(() => {
572
+ }), Z = m(() => {
557
573
  const n = (p) => p == null ? void 0 : p.map((h) => {
558
- const P = V(h), b = f(h), D = S(h), W = v(h), G = !t.searchModel.value || P && ee(P, t.searchModel.value), g = w(h), O = !t.props.tree || b;
574
+ const I = V(h), b = f(h), L = z(h), W = v(h), G = !t.searchModel.value || I && X(I, t.searchModel.value), g = j(h), O = !t.props.tree || b;
559
575
  if (g && O) {
560
576
  const C = n(g);
561
577
  if (C != null && C.length || G)
562
578
  return {
563
579
  groupLabel: W,
564
- title: P,
580
+ title: I,
565
581
  key: b,
566
- disabled: D,
582
+ disabled: L,
567
583
  children: C,
568
584
  _option: h
569
585
  };
570
586
  }
571
587
  return G && O ? {
572
- title: P,
588
+ title: I,
573
589
  key: b,
574
- disabled: D,
590
+ disabled: L,
575
591
  _option: h
576
592
  } : null;
577
593
  }).filter(Boolean);
578
594
  if (t.props.options)
579
595
  return n(t.props.options);
580
596
  }), {
581
- getDisabled: le,
582
- getStatus: M,
583
- getSize: K
597
+ getDisabled: ce,
598
+ getStatus: oe,
599
+ getSize: te
584
600
  } = St({
585
601
  getDisabled: () => t.props.disabled,
586
602
  getSize: () => t.props.size,
587
603
  getStatus: () => t.props.status
588
- }), J = m(() => {
589
- switch (K.value) {
604
+ }), de = m(() => {
605
+ switch (te.value) {
590
606
  case "sm":
591
607
  return "xsm";
592
608
  case "lg":
@@ -596,73 +612,73 @@ const Ht = ({
596
612
  return "sm";
597
613
  }
598
614
  }), {
599
- inputBindings: j,
600
- rootBindings: te
615
+ inputBindings: P,
616
+ rootBindings: $
601
617
  } = Ot({
602
- getDisabled: () => le.value
603
- }), oe = ye(), se = () => {
604
- var n, p, h, P, b, D, W;
605
- e.open.value && e.inputElement.value && (t.props.headerSearch && ((n = oe.value) != null && n.input) ? document.activeElement !== ((p = oe.value) == null ? void 0 : p.input) && ((b = (P = (h = oe.value) == null ? void 0 : h.input) == null ? void 0 : P.focus) == null || b.call(P)) : document.activeElement !== e.inputElement.value && ((W = (D = e.inputElement.value) == null ? void 0 : D.focus) == null || W.call(D)));
606
- }, Q = (n) => {
618
+ getDisabled: () => ce.value
619
+ }), F = Ve(), N = () => {
620
+ var n, p, h, I, b, L, W;
621
+ e.open.value && e.inputElement.value && (t.props.headerSearch && ((n = F.value) != null && n.input) ? document.activeElement !== ((p = F.value) == null ? void 0 : p.input) && ((b = (I = (h = F.value) == null ? void 0 : h.input) == null ? void 0 : I.focus) == null || b.call(I)) : document.activeElement !== e.inputElement.value && ((W = (L = e.inputElement.value) == null ? void 0 : L.focus) == null || W.call(L)));
622
+ }, q = (n) => {
607
623
  e.modelValue.value = n, t.emit("update:modelValue", n);
608
- }, ne = (n) => n === void 0 ? !1 : Array.isArray(e.modelValue.value) ? !!(n && e.modelValue.value.includes(n)) : e.modelValue.value === n;
624
+ }, se = (n) => n === void 0 ? !1 : Array.isArray(e.modelValue.value) ? !!(n && e.modelValue.value.includes(n)) : e.modelValue.value === n;
609
625
  $t({
610
626
  ...t,
611
627
  getOptionValue: f,
612
628
  getOptionLabel: V,
613
629
  getOptionSingle: s,
614
- getOptionClear: x,
630
+ getOptionClear: S,
615
631
  getOptionNoCheckbox: d,
616
- getOptionDescription: I,
617
- getOptionDisabled: S,
632
+ getOptionDescription: _,
633
+ getOptionDisabled: z,
618
634
  getOptionIcon: a,
619
- getOptionByValue: N,
620
- isItemSelected: ne,
621
- getLabelByValue: Z,
622
- getSingleByValue: ve,
623
- focusOnInput: se,
624
- setModelValue: Q,
625
- headerInputElement: oe,
626
- getDisabled: le,
627
- getStatus: M,
628
- getSize: K,
629
- getTagSize: J,
630
- comboboxInputBinding: j,
631
- comboboxTriggerBinding: te,
635
+ getOptionByValue: J,
636
+ isItemSelected: se,
637
+ getLabelByValue: ee,
638
+ getSingleByValue: Q,
639
+ focusOnInput: N,
640
+ setModelValue: q,
641
+ headerInputElement: F,
642
+ getDisabled: ce,
643
+ getStatus: oe,
644
+ getSize: te,
645
+ getTagSize: de,
646
+ comboboxInputBinding: P,
647
+ comboboxTriggerBinding: $,
632
648
  ...e,
633
649
  modelValue: e.modelValue
634
- }), Ne(() => [t.props.clearOnChangeMultiple, t.props.multiple], () => {
635
- t.props.clearOnChangeMultiple && Q(void 0);
650
+ }), $e(() => [t.props.clearOnChangeMultiple, t.props.multiple], () => {
651
+ t.props.clearOnChangeMultiple && q(void 0);
636
652
  });
637
- const ue = m(() => {
653
+ const be = m(() => {
638
654
  const n = t.props.scrollContainerProps ?? {};
639
655
  return {
640
656
  ...n,
641
- areaCls: [k(R, "scroll_area"), n == null ? void 0 : n.class, n == null ? void 0 : n.areaCls]
657
+ areaCls: [k(E, "scroll_area"), n == null ? void 0 : n.class, n == null ? void 0 : n.areaCls]
642
658
  };
643
- }), ce = k(R, "popup"), de = Se(ce, {
659
+ }), ie = k(E, "popup"), ge = Be(ie, {
644
660
  variants: {
645
- size: H(We, ce)
661
+ size: H(Ue, ie)
646
662
  }
647
- }), he = (n) => {
663
+ }), ne = (n) => {
648
664
  if (Number(n) > 0)
649
665
  return `${n}px`;
650
666
  if (typeof n == "string")
651
667
  return n;
652
- }, Ue = m(() => he(t.props.popupWidth)), je = m(() => he(t.props.popupHeight)), Pe = m(() => he(t.props.minWidth)), ke = m(() => ({
653
- type: K.value === "sm" ? "simple" : "advance",
654
- ...Me(t.props.emptyProps ?? {}, "class")
655
- })), He = m(() => Me(t.props.skeletonProps ?? {}, "class")), {
668
+ }, ye = m(() => ne(t.props.popupWidth)), me = m(() => ne(t.props.popupHeight)), ke = m(() => ne(t.props.minWidth)), Te = m(() => ({
669
+ type: te.value === "sm" ? "simple" : "advance",
670
+ ...De(t.props.emptyProps ?? {}, "class")
671
+ })), He = m(() => De(t.props.skeletonProps ?? {}, "class")), {
656
672
  selectValues: qe
657
673
  } = Ht({
658
674
  getValue: (n) => n == null ? void 0 : n.key,
659
675
  getChildren: (n) => n == null ? void 0 : n.children,
660
- getModel: () => ae(e.modelValue.value),
661
- getData: () => ae(q.value ?? [])
676
+ getModel: () => re(e.modelValue.value),
677
+ getData: () => re(Z.value ?? [])
662
678
  });
663
679
  return () => {
664
680
  var W, G;
665
- const n = (g) => l(Le, {
681
+ const n = (g) => l(Ee, {
666
682
  option: g
667
683
  }, {
668
684
  trailing: o.optionTrailing,
@@ -670,9 +686,9 @@ const Ht = ({
670
686
  }), p = [];
671
687
  let h;
672
688
  if (t.props.tree) {
673
- const O = U(e.modelValue.value) ? e.modelValue.value : e.modelValue.value ? [e.modelValue.value] : [];
689
+ const O = A(e.modelValue.value) ? e.modelValue.value : e.modelValue.value ? [e.modelValue.value] : [];
674
690
  h = l(Tt, {
675
- data: q.value ?? [],
691
+ data: Z.value ?? [],
676
692
  selectable: !0,
677
693
  checkbox: t.props.multiple && t.props.checkbox,
678
694
  multiple: t.props.multiple,
@@ -681,13 +697,13 @@ const Ht = ({
681
697
  showLine: !0,
682
698
  modelValue: O,
683
699
  checkedKeys: O,
684
- onExpand: se,
685
- onSelect: (C, E, z) => {
700
+ onExpand: N,
701
+ onSelect: (C, w, M) => {
686
702
  if (t.props.multiple) {
687
- const Y = U(z) ? z : [z];
688
- Q(qe(Y, E));
703
+ const Y = A(M) ? M : [M];
704
+ q(qe(Y, w));
689
705
  } else
690
- Q(z);
706
+ q(M);
691
707
  },
692
708
  class: "w-full"
693
709
  }, {
@@ -696,64 +712,64 @@ const Ht = ({
696
712
  } else {
697
713
  let g = !1;
698
714
  const O = [];
699
- if ((q.value ?? []).forEach((C) => {
700
- var E;
701
- if ((E = C.children) != null && E.length) {
702
- const z = [];
715
+ if ((Z.value ?? []).forEach((C) => {
716
+ var w;
717
+ if ((w = C.children) != null && w.length) {
718
+ const M = [];
703
719
  C.children.forEach((Y) => {
704
- const ie = n(Y._option);
705
- ne(f(Y._option)) && t.props.sortSelectedItems ? O.push(ie) : z.push(ie);
706
- }), z.length && ((g || p.length) && (p.push(l(Ce)), g = !1), C.groupLabel && p.push(l(Qt, {
720
+ const pe = n(Y._option);
721
+ se(f(Y._option)) && t.props.sortSelectedItems ? O.push(pe) : M.push(pe);
722
+ }), M.length && ((g || p.length) && (p.push(l(_e)), g = !1), C.groupLabel && p.push(l(Qt, {
707
723
  class: t.props.labelCls
708
- }, () => C.groupLabel)), p.push(...z), g = !0);
724
+ }, () => C.groupLabel)), p.push(...M), g = !0);
709
725
  } else {
710
- const z = n(C._option);
711
- ne(f(C._option)) && t.props.sortSelectedItems ? O.push(z) : (g && (p.push(l(Ce)), g = !1), p.push(z));
726
+ const M = n(C._option);
727
+ se(f(C._option)) && t.props.sortSelectedItems ? O.push(M) : (g && (p.push(l(_e)), g = !1), p.push(M));
712
728
  }
713
729
  }), t.props.sortSelectedItems && O.length) {
714
730
  const C = !!p.length;
715
- p.splice(0, 0, ...O), C && p.splice(O.length, 0, l(Ce));
731
+ p.splice(0, 0, ...O), C && p.splice(O.length, 0, l(_e));
716
732
  }
717
733
  }
718
- const P = xt(h ? [h] : p, Le).filter((g) => {
734
+ const I = xt(h ? [h] : p, Ee).filter((g) => {
719
735
  var O;
720
- return _e(g == null ? void 0 : g.props) && ((O = g == null ? void 0 : g.props) == null ? void 0 : O.option);
721
- }), b = !!(t.props.tree && ((W = q.value) != null && W.length) || P != null && P.length), D = () => {
736
+ return Se(g == null ? void 0 : g.props) && ((O = g == null ? void 0 : g.props) == null ? void 0 : O.option);
737
+ }), b = !!(t.props.tree && ((W = Z.value) != null && W.length) || I != null && I.length), L = () => {
722
738
  var O, C;
723
739
  const g = [];
724
740
  if (b || t.props.loading) {
725
- const E = [];
726
- if (b && E.push(...p), t.props.loading) {
727
- const z = (O = o.loading) == null ? void 0 : O.call(o, {});
728
- if (!F(z)) E.push(z);
741
+ const w = [];
742
+ if (b && w.push(...p), t.props.loading) {
743
+ const M = (O = o.loading) == null ? void 0 : O.call(o, {});
744
+ if (!U(M)) w.push(M);
729
745
  else {
730
746
  const Y = new Array(b ? 2 : t.props.loadingRowCount).fill(1);
731
- E.push(...Y.map(() => l(yt, {
732
- size: K.value,
733
- class: [k(R, "skeleton"), t.props.skeletonCls],
747
+ w.push(...Y.map(() => l(yt, {
748
+ size: te.value,
749
+ class: [k(E, "skeleton"), t.props.skeletonCls],
734
750
  ...He.value
735
751
  })));
736
752
  }
737
753
  }
738
754
  g.push(l("div", {
739
- class: [k(R, "options"), t.props.optionsCls]
740
- }, E));
755
+ class: [k(E, "options"), t.props.optionsCls]
756
+ }, w));
741
757
  } else if (!b) {
742
- const E = (C = o.empty) == null ? void 0 : C.call(o, ke.value);
743
- F(E) ? g.push(l(bt, {
744
- class: [k(R, "empty"), t.props.emptyCls],
745
- ...ke.value
758
+ const w = (C = o.empty) == null ? void 0 : C.call(o, Te.value);
759
+ U(w) ? g.push(l(bt, {
760
+ class: [k(E, "empty"), t.props.emptyCls],
761
+ ...Te.value
746
762
  }, {
747
763
  title: o.emptyTitle,
748
764
  description: o.emptyDescription,
749
765
  actions: o.emptyActions,
750
766
  image: o.emptyImage
751
- })) : g.push(E);
767
+ })) : g.push(w);
752
768
  }
753
769
  return t.props.lazyLoading && g.push(l("div", {
754
- class: k(R, "lazy_loading")
770
+ class: k(E, "lazy_loading")
755
771
  }, l("div", {
756
- class: k(R, "lazy_loading_trigger"),
772
+ class: k(E, "lazy_loading_trigger"),
757
773
  ref: c
758
774
  }))), g;
759
775
  };
@@ -762,51 +778,55 @@ const Ht = ({
762
778
  ...t.attrs,
763
779
  style: {
764
780
  ...((G = t.attrs) == null ? void 0 : G.style) ?? {},
765
- "--ptc-combobox-trigger-min-w": Pe.value
781
+ "--ptc-combobox-trigger-min-w": ke.value
766
782
  }
767
783
  }, {
768
784
  trigger: o.trigger,
769
785
  triggerTrailing: o.triggerTrailing
770
786
  }), l(lt, B.value, () => l(st, {
771
- ...$.value,
787
+ ...R.value,
772
788
  vShow: e.open.value,
773
- class: [de(t.props), t.props.popupCls],
789
+ class: [ge(t.props), t.props.popupCls],
774
790
  style: {
775
- "--ptc-combobox-popup-width": t.props.samePopupWidth ? void 0 : Ue.value,
776
- "--ptc-combobox-popup-height": je.value,
777
- "--ptc-combobox-trigger-min-w": Pe.value
791
+ zIndex: t.props.zIndex,
792
+ "--ptc-combobox-popup-width": t.props.samePopupWidth ? void 0 : ye.value,
793
+ "--ptc-combobox-popup-height": me.value,
794
+ "--ptc-combobox-trigger-min-w": ke.value
778
795
  },
779
- onClick: se
796
+ onClick: N
780
797
  }, () => {
781
- var z, Y, ie, Ie;
798
+ var M, Y, pe, ze;
782
799
  const g = [], O = (Y = o.header) == null ? void 0 : Y.call(o, {
783
- isEmpty: !((z = q.value) != null && z.length),
800
+ isEmpty: !((M = Z.value) != null && M.length),
784
801
  search: t.searchModel.value
785
- }), C = !F(O);
802
+ }), C = !U(O);
786
803
  if (t.props.headerSearch || C) {
787
- const be = [];
788
- C && be.push(O), t.props.headerSearch && be.push(l(Ge)), g.push(l("div", {
789
- class: k(R, "header")
790
- }, be));
804
+ const Ce = [];
805
+ C && Ce.push(O), t.props.headerSearch && Ce.push(l(je)), g.push(l("div", {
806
+ class: k(E, "header")
807
+ }, Ce));
791
808
  }
792
- g.push(l(It, ue.value, D));
793
- const E = (Ie = o.footer) == null ? void 0 : Ie.call(o, {
794
- isEmpty: !((ie = q.value) != null && ie.length),
809
+ g.push(l(kt, be.value, L));
810
+ const w = (ze = o.footer) == null ? void 0 : ze.call(o, {
811
+ isEmpty: !((pe = Z.value) != null && pe.length),
795
812
  search: t.searchModel.value
796
813
  });
797
- return F(E) || g.push(l("div", {
798
- class: k(R, "footer")
799
- }, E)), g;
814
+ return U(w) || g.push(l("div", {
815
+ class: k(E, "footer")
816
+ }, w)), g;
800
817
  }))];
801
818
  };
802
819
  }
803
- }), Mo = /* @__PURE__ */ re({
820
+ }), Mo = /* @__PURE__ */ le({
804
821
  ...gt("Combobox"),
805
822
  __name: "Combobox",
806
823
  props: {
807
824
  size: { default: "md" },
808
825
  status: {},
809
826
  multiple: { type: Boolean, default: void 0 },
827
+ noLastValueOnPlaceholder: { type: Boolean },
828
+ showLabelValueOnHeaderSearch: { type: Boolean },
829
+ zIndex: {},
810
830
  checkbox: { type: Boolean, default: !0 },
811
831
  tagRenderMode: { default: "chip" },
812
832
  getTagProps: {},
@@ -905,7 +925,7 @@ const Ht = ({
905
925
  const t = u, e = o, c = it(e), i = m(
906
926
  () => ct(
907
927
  {
908
- ...Te(
928
+ ...Me(
909
929
  t,
910
930
  "open",
911
931
  "defaultOpen",
@@ -916,7 +936,7 @@ const Ht = ({
916
936
  "multiple",
917
937
  "disabled"
918
938
  ),
919
- ...Te(
939
+ ...Me(
920
940
  c,
921
941
  "onUpdate:modelValue",
922
942
  "onUpdate:open"
@@ -928,26 +948,26 @@ const Ht = ({
928
948
  ), B = Kt(t, "search", e, {
929
949
  passive: t.search === void 0
930
950
  });
931
- Ne(
951
+ $e(
932
952
  () => t.open,
933
953
  (y) => {
934
954
  y || (B.value = void 0);
935
955
  }
936
956
  );
937
- const T = Je(), _ = Qe();
957
+ const T = Je(), x = Qe();
938
958
  return Wt({
939
- attrs: _,
959
+ attrs: x,
940
960
  props: t,
941
961
  emit: e,
942
962
  searchModel: B,
943
963
  emitsAsProps: c
944
- }), (y, A) => (pe(), Ve(L(pt), we(i.value, { class: L(R) }), {
945
- default: me(() => [
946
- Ke(L(Xt), null, Xe({ _: 2 }, [
947
- Ze(Object.keys(T), ($) => ({
948
- name: $,
949
- fn: me((r) => [
950
- Re(y.$slots, $, et(tt(r)))
964
+ }), (y, K) => (ue(), xe(D(pt), Ke(i.value, { class: D(E) }), {
965
+ default: ve(() => [
966
+ Ne(D(Xt), null, Xe({ _: 2 }, [
967
+ Ze(Object.keys(T), (R) => ({
968
+ name: R,
969
+ fn: ve((r) => [
970
+ Ae(y.$slots, R, et(tt(r)))
951
971
  ])
952
972
  }))
953
973
  ]), 1024)
@@ -957,9 +977,9 @@ const Ht = ({
957
977
  }
958
978
  });
959
979
  export {
960
- We as C,
980
+ Ue as C,
961
981
  Mo as _,
962
982
  qt as a,
963
- Be as i,
983
+ Ie as i,
964
984
  $t as p
965
985
  };