@opentiny/tiny-robot 0.3.0-rc.5 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index2.js CHANGED
@@ -1,53 +1,53 @@
1
- import { ref as y, onMounted as ee, onBeforeUnmount as te, defineComponent as N, createElementBlock as r, openBlock as s, createElementVNode as R, createVNode as b, unref as n, toDisplayString as B, mergeModels as K, useModel as W, computed as x, normalizeStyle as ne, Fragment as O, renderList as V, createBlock as Q, resolveDynamicComponent as oe, nextTick as ie, normalizeClass as S, withDirectives as j, createCommentVNode as U, withKeys as q, withModifiers as A, isRef as se, vModelText as le, vShow as re } from "vue";
2
- import { IconEmptySearch as ae, IconEditPen as ue, IconDelete as ce, IconCheck as de, IconClose as me, IconMenu2 as fe } from "@opentiny/tiny-robot-svgs";
3
- import { _ as P } from "./_plugin-vue_export-helper.js";
4
- import { o as X, a as pe, d as ve, c as _e } from "./index3.js";
5
- import { t as G } from "./utils.js";
6
- const D = y(!1);
7
- let T = 0, $;
8
- function ge() {
9
- const i = window.matchMedia("(hover: none) and (pointer: coarse)"), m = () => {
10
- D.value = i.matches;
1
+ import { ref as _, onMounted as ne, onBeforeUnmount as oe, defineComponent as P, createElementBlock as a, openBlock as r, createElementVNode as w, createVNode as $, unref as n, toDisplayString as B, mergeModels as W, useModel as j, computed as I, normalizeStyle as ie, Fragment as S, renderList as V, createBlock as H, resolveDynamicComponent as Y, nextTick as se, normalizeClass as U, withDirectives as q, createCommentVNode as G, renderSlot as A, withKeys as F, withModifiers as J, isRef as le, vModelText as re, vShow as ae } from "vue";
2
+ import { IconEmptySearch as ue, IconEditPen as ce, IconDelete as de, IconCheck as me, IconClose as fe, IconMenu2 as pe } from "@opentiny/tiny-robot-svgs";
3
+ import { _ as z } from "./_plugin-vue_export-helper.js";
4
+ import { o as Z, a as ve, d as ge, c as ye } from "./index3.js";
5
+ import { t as O } from "./utils.js";
6
+ const D = _(!1);
7
+ let T = 0, b;
8
+ function _e() {
9
+ const s = window.matchMedia("(hover: none) and (pointer: coarse)"), m = () => {
10
+ D.value = s.matches;
11
11
  };
12
- m(), i.addEventListener("change", m);
12
+ m(), s.addEventListener("change", m);
13
13
  const t = (c) => {
14
14
  D.value = c.pointerType !== "mouse";
15
15
  };
16
16
  return window.addEventListener("pointerdown", t, !0), () => {
17
- i.removeEventListener("change", m), window.removeEventListener("pointerdown", t, !0);
17
+ s.removeEventListener("change", m), window.removeEventListener("pointerdown", t, !0);
18
18
  };
19
19
  }
20
- function ye() {
21
- $ == null || $(), $ = void 0;
22
- }
23
20
  function he() {
21
+ b == null || b(), b = void 0;
22
+ }
23
+ function Ce() {
24
24
  return typeof window > "u" ? {
25
25
  isTouchDevice: D
26
- } : (ee(() => {
27
- T++, T === 1 && ($ = ge());
28
- }), te(() => {
29
- T = Math.max(0, T - 1), T === 0 && ye();
26
+ } : (ne(() => {
27
+ T++, T === 1 && (b = _e());
28
+ }), oe(() => {
29
+ T = Math.max(0, T - 1), T === 0 && he();
30
30
  }), {
31
31
  isTouchDevice: D
32
32
  });
33
33
  }
34
- const Ce = { class: "tr-history__empty" }, ke = { class: "tr-history__empty-icon" }, Le = { class: "tr-history__empty-text" }, Ee = /* @__PURE__ */ N({
34
+ const ke = { class: "tr-history__empty" }, Le = { class: "tr-history__empty-icon" }, Ee = { class: "tr-history__empty-text" }, we = /* @__PURE__ */ P({
35
35
  __name: "Empty",
36
36
  props: {
37
37
  text: { default: "暂无内容" }
38
38
  },
39
- setup(i) {
40
- const m = i;
41
- return (t, c) => (s(), r("div", Ce, [
42
- R("span", ke, [
43
- b(n(ae))
39
+ setup(s) {
40
+ const m = s;
41
+ return (t, c) => (r(), a("div", ke, [
42
+ w("span", Le, [
43
+ $(n(ue))
44
44
  ]),
45
- R("span", Le, B(m.text), 1)
45
+ w("span", Ee, B(m.text), 1)
46
46
  ]));
47
47
  }
48
- }), we = /* @__PURE__ */ P(Ee, [["__scopeId", "data-v-d0340c39"]]), Re = ["onClick"], F = 4, xe = /* @__PURE__ */ N({
48
+ }), Re = /* @__PURE__ */ z(we, [["__scopeId", "data-v-d0340c39"]]), Ie = ["onClick"], Q = 4, xe = /* @__PURE__ */ P({
49
49
  __name: "MenuList",
50
- props: /* @__PURE__ */ K({
50
+ props: /* @__PURE__ */ W({
51
51
  items: {},
52
52
  menuListGap: { default: 8 }
53
53
  }, {
@@ -56,10 +56,10 @@ const Ce = { class: "tr-history__empty" }, ke = { class: "tr-history__empty-icon
56
56
  data: { default: null },
57
57
  dataModifiers: {}
58
58
  }),
59
- emits: /* @__PURE__ */ K(["item-click"], ["update:trigger", "update:data"]),
60
- setup(i, { emit: m }) {
61
- const t = W(i, "trigger"), c = W(i, "data"), h = i, C = m, E = y(null);
62
- X(
59
+ emits: /* @__PURE__ */ W(["item-click"], ["update:trigger", "update:data"]),
60
+ setup(s, { emit: m }) {
61
+ const t = j(s, "trigger"), c = j(s, "data"), h = s, C = m, E = _(null);
62
+ Z(
63
63
  E,
64
64
  () => {
65
65
  t.value = null, c.value = null;
@@ -68,73 +68,73 @@ const Ce = { class: "tr-history__empty" }, ke = { class: "tr-history__empty-icon
68
68
  ignore: [t]
69
69
  }
70
70
  );
71
- const { top: p, bottom: I, left: g } = pe(t), { width: M, height: k } = ve(E, void 0, { box: "border-box" }), { height: w } = _e(), o = x(() => {
71
+ const { top: p, bottom: x, left: y } = ve(t), { width: M, height: k } = ge(E, void 0, { box: "border-box" }), { height: R } = ye(), o = I(() => {
72
72
  const L = {
73
- left: `min(${G(g.value)}, calc(100% - ${G(M.value + F)}))`
74
- }, _ = I.value + h.menuListGap;
75
- return _ + k.value + F > w.value ? L.bottom = `calc(100% - ${G(p.value - h.menuListGap)})` : L.top = G(_), L;
73
+ left: `min(${O(y.value)}, calc(100% - ${O(M.value + Q)}))`
74
+ }, g = x.value + h.menuListGap;
75
+ return g + k.value + Q > R.value ? L.bottom = `calc(100% - ${O(p.value - h.menuListGap)})` : L.top = O(g), L;
76
76
  }), v = (L) => {
77
77
  C("item-click", L), t.value = null, c.value = null;
78
78
  };
79
- return (L, _) => (s(), r("ul", {
79
+ return (L, g) => (r(), a("ul", {
80
80
  class: "tr-history__menu-list",
81
81
  ref_key: "menuRef",
82
82
  ref: E,
83
- style: ne(o.value)
83
+ style: ie(o.value)
84
84
  }, [
85
- (s(!0), r(O, null, V(h.items, (a) => (s(), r("li", {
85
+ (r(!0), a(S, null, V(h.items, (u) => (r(), a("li", {
86
86
  class: "tr-history__menu-list__item",
87
- key: a.id,
88
- onClick: (z) => v(a)
87
+ key: u.id,
88
+ onClick: (K) => v(u)
89
89
  }, [
90
- (s(), Q(oe(a.icon))),
91
- R("span", null, B(a.text), 1)
92
- ], 8, Re))), 128))
90
+ (r(), H(Y(u.icon))),
91
+ w("span", null, B(u.text), 1)
92
+ ], 8, Ie))), 128))
93
93
  ], 4));
94
94
  }
95
- }), Ie = /* @__PURE__ */ P(xe, [["__scopeId", "data-v-c8365732"]]), Me = ({
96
- renameControlOnClickOutside: i,
95
+ }), Me = /* @__PURE__ */ z(xe, [["__scopeId", "data-v-89fdb41c"]]), Te = ({
96
+ renameControlOnClickOutside: s,
97
97
  onItemTitleChange: m
98
98
  }) => {
99
- const t = y(void 0), c = y(null), h = x(() => {
99
+ const t = _(void 0), c = _(null), h = I(() => {
100
100
  var o;
101
101
  return (o = c.value) == null ? void 0 : o.at(0);
102
- }), C = y(null), E = x(() => {
102
+ }), C = _(null), E = I(() => {
103
103
  var o;
104
104
  return (o = C.value) == null ? void 0 : o.at(0);
105
- }), p = y(null), I = x(() => {
105
+ }), p = _(null), x = I(() => {
106
106
  var o;
107
107
  return (o = p.value) == null ? void 0 : o.at(0);
108
- }), g = y(""), M = (o) => {
109
- t.value = o, g.value = o.title, ie(() => {
108
+ }), y = _(""), M = (o) => {
109
+ t.value = o, y.value = o.title, se(() => {
110
110
  const v = h.value;
111
111
  v && (v.focus(), v.select());
112
112
  });
113
113
  }, k = () => {
114
- t.value = void 0, g.value = "";
115
- }, w = () => {
116
- t.value && m(g.value, t.value), t.value = void 0, g.value = "";
114
+ t.value = void 0, y.value = "";
115
+ }, R = () => {
116
+ t.value && m(y.value, t.value), t.value = void 0, y.value = "";
117
117
  };
118
- return (i === "confirm" || i === "cancel") && X(
118
+ return (s === "confirm" || s === "cancel") && Z(
119
119
  h,
120
120
  () => {
121
- i === "confirm" ? w() : k();
121
+ s === "confirm" ? R() : k();
122
122
  },
123
- { ignore: [E, I] }
123
+ { ignore: [E, x] }
124
124
  ), {
125
125
  editingItem: t,
126
126
  editorRefList: c,
127
127
  editorConfirmRefList: C,
128
128
  editorCancelRefList: p,
129
- editorValue: g,
129
+ editorValue: y,
130
130
  handleEdit: M,
131
131
  handleEditCancel: k,
132
- handleEditConfirm: w
132
+ handleEditConfirm: R
133
133
  };
134
- }, J = Symbol("NO_GROUP"), Te = {
134
+ }, X = Symbol("NO_GROUP"), $e = {
135
135
  key: 0,
136
136
  class: "tr-history__group-title"
137
- }, be = { class: "tr-history__group-items" }, $e = ["onClick"], Ge = ["title"], Oe = ["onClick"], Be = /* @__PURE__ */ N({
137
+ }, be = { class: "tr-history__group-items" }, Ge = ["onClick"], Oe = ["title"], Se = ["onClick"], Be = /* @__PURE__ */ P({
138
138
  __name: "index",
139
139
  props: {
140
140
  data: {},
@@ -142,112 +142,118 @@ const Ce = { class: "tr-history__empty" }, ke = { class: "tr-history__empty-icon
142
142
  showRenameControls: { type: Boolean, default: !1 },
143
143
  renameControlOnClickOutside: { default: "confirm" },
144
144
  menuItems: { default: () => [
145
- { id: "rename", text: "重命名", icon: ue },
146
- { id: "delete", text: "删除", icon: ce }
145
+ { id: "rename", text: "重命名", icon: ce },
146
+ { id: "delete", text: "删除", icon: de }
147
147
  ] },
148
148
  menuListGap: { default: 8 }
149
149
  },
150
150
  emits: ["item-click", "item-title-change", "item-action"],
151
- setup(i, { emit: m }) {
152
- const t = i, c = m, h = (l) => {
151
+ setup(s, { emit: m }) {
152
+ const t = s, c = m, h = (i) => {
153
153
  var f;
154
- const e = typeof ((f = l[0]) == null ? void 0 : f.group);
154
+ const e = typeof ((f = i[0]) == null ? void 0 : f.group);
155
155
  return e === "string" || e === "symbol";
156
- }, C = x(() => {
157
- const l = t.data;
158
- return h(l) ? l : [{ group: J, items: l }];
159
- }), E = x(() => C.value.length === 0 || C.value.every((l) => l.items.length === 0)), {
156
+ }, C = I(() => {
157
+ const i = t.data;
158
+ return h(i) ? i : [{ group: X, items: i }];
159
+ }), E = I(() => C.value.length === 0 || C.value.every((i) => i.items.length === 0)), {
160
160
  editingItem: p,
161
- editorRefList: I,
162
- editorConfirmRefList: g,
161
+ editorRefList: x,
162
+ editorConfirmRefList: y,
163
163
  editorCancelRefList: M,
164
164
  editorValue: k,
165
- handleEdit: w,
165
+ handleEdit: R,
166
166
  handleEditCancel: o,
167
167
  handleEditConfirm: v
168
- } = Me({
168
+ } = Te({
169
169
  renameControlOnClickOutside: t.renameControlOnClickOutside,
170
- onItemTitleChange: (l, e) => {
171
- c("item-title-change", l, e);
170
+ onItemTitleChange: (i, e) => {
171
+ c("item-title-change", i, e);
172
172
  }
173
- }), { isTouchDevice: L } = he(), _ = y(null), a = y(null), z = (l, e) => {
174
- if (l.currentTarget instanceof HTMLButtonElement) {
175
- if (a.value === e) {
176
- _.value = null, a.value = null;
173
+ }), { isTouchDevice: L } = Ce(), g = _(null), u = _(null), K = (i, e) => {
174
+ if (i.currentTarget instanceof HTMLButtonElement) {
175
+ if (u.value === e) {
176
+ g.value = null, u.value = null;
177
177
  return;
178
178
  }
179
- _.value = l.currentTarget, a.value = e;
179
+ g.value = i.currentTarget, u.value = e;
180
180
  } else
181
- _.value = null, a.value = null;
182
- }, Y = (l) => {
183
- const e = a.value;
184
- e && (l.id === "rename" && w(e), c("item-action", l, e));
181
+ g.value = null, u.value = null;
182
+ }, ee = (i) => {
183
+ const e = u.value;
184
+ e && (i.id === "rename" && R(e), c("item-action", i, e));
185
185
  };
186
- return (l, e) => (s(), r("div", {
187
- class: S(["tr-history", { "touch-device": n(L) }])
186
+ return (i, e) => (r(), a("div", {
187
+ class: U(["tr-history", { "touch-device": n(L) }])
188
188
  }, [
189
- E.value ? (s(), Q(we, { key: 1 })) : (s(), r(O, { key: 0 }, [
190
- (s(!0), r(O, null, V(C.value, (f) => (s(), r("div", {
189
+ E.value ? (r(), H(Re, { key: 1 })) : (r(), a(S, { key: 0 }, [
190
+ (r(!0), a(S, null, V(C.value, (f) => (r(), a("div", {
191
191
  class: "tr-history__group",
192
192
  key: f.group
193
193
  }, [
194
- f.group !== n(J) ? (s(), r("div", Te, B(f.group), 1)) : U("", !0),
195
- R("div", be, [
196
- (s(!0), r(O, null, V(f.items, (u, Z) => (s(), r("div", {
197
- class: S(["tr-history__item", {
198
- selected: u.id && u.id === t.selected,
199
- editing: n(p) === u,
200
- active: a.value === u
194
+ f.group !== n(X) ? (r(), a("div", $e, B(f.group), 1)) : G("", !0),
195
+ w("div", be, [
196
+ (r(!0), a(S, null, V(f.items, (l, te) => (r(), a("div", {
197
+ class: U(["tr-history__item", {
198
+ selected: l.id && l.id === t.selected,
199
+ editing: n(p) === l,
200
+ active: u.value === l
201
201
  }]),
202
- key: u.id || Z,
203
- onClick: (d) => c("item-click", u)
202
+ key: l.id || te,
203
+ onClick: (d) => c("item-click", l)
204
204
  }, [
205
- n(p) === u ? j((s(), r("input", {
206
- key: 0,
205
+ A(i.$slots, "item-prefix", { item: l }, void 0, !0),
206
+ l.icon ? (r(), H(Y(l.icon), { key: 0 })) : G("", !0),
207
+ n(p) === l ? q((r(), a("input", {
208
+ key: 1,
207
209
  class: "tr-history__item-editor",
208
210
  type: "text",
209
- onClick: e[0] || (e[0] = A(() => {
211
+ onClick: e[0] || (e[0] = J(() => {
210
212
  }, ["stop"])),
211
213
  ref_for: !0,
212
214
  ref_key: "editorRefList",
213
- ref: I,
214
- "onUpdate:modelValue": e[1] || (e[1] = (d) => se(k) ? k.value = d : null),
215
+ ref: x,
216
+ "onUpdate:modelValue": e[1] || (e[1] = (d) => le(k) ? k.value = d : null),
215
217
  onKeydown: [
216
- e[2] || (e[2] = q(
218
+ e[2] || (e[2] = F(
217
219
  //@ts-ignore
218
220
  (...d) => n(v) && n(v)(...d),
219
221
  ["enter"]
220
222
  )),
221
- e[3] || (e[3] = q(
223
+ e[3] || (e[3] = F(
222
224
  //@ts-ignore
223
225
  (...d) => n(o) && n(o)(...d),
224
226
  ["escape"]
225
227
  ))
226
228
  ]
227
229
  }, null, 544)), [
228
- [le, n(k)]
229
- ]) : (s(), r("span", {
230
- key: 1,
231
- class: "text",
232
- title: u.title
233
- }, B(u.title), 9, Ge)),
234
- R("span", {
230
+ [re, n(k)]
231
+ ]) : A(i.$slots, "item-title", {
232
+ key: 2,
233
+ item: l
234
+ }, () => [
235
+ w("span", {
236
+ class: "text",
237
+ title: l.title
238
+ }, B(l.title), 9, Oe)
239
+ ], !0),
240
+ w("span", {
235
241
  class: "tr-history__item-actions",
236
- onClick: e[6] || (e[6] = A(() => {
242
+ onClick: e[6] || (e[6] = J(() => {
237
243
  }, ["stop"]))
238
244
  }, [
239
- t.showRenameControls && n(p) === u ? (s(), r("button", {
245
+ t.showRenameControls && n(p) === l ? (r(), a("button", {
240
246
  key: 0,
241
247
  class: "editor-confirm",
242
248
  ref_for: !0,
243
249
  ref_key: "editorConfirmRefList",
244
- ref: g,
250
+ ref: y,
245
251
  onClick: e[4] || (e[4] = //@ts-ignore
246
252
  (...d) => n(v) && n(v)(...d))
247
253
  }, [
248
- b(n(de))
249
- ], 512)) : U("", !0),
250
- t.showRenameControls && n(p) === u ? (s(), r("button", {
254
+ $(n(me))
255
+ ], 512)) : G("", !0),
256
+ t.showRenameControls && n(p) === l ? (r(), a("button", {
251
257
  key: 1,
252
258
  class: "editor-cancel",
253
259
  ref_for: !0,
@@ -256,40 +262,40 @@ const Ce = { class: "tr-history__empty" }, ke = { class: "tr-history__empty-icon
256
262
  onClick: e[5] || (e[5] = //@ts-ignore
257
263
  (...d) => n(o) && n(o)(...d))
258
264
  }, [
259
- b(n(me))
260
- ], 512)) : U("", !0),
261
- R("button", {
262
- class: S(["menu", { hidden: n(p) === u }]),
263
- onClick: (d) => z(d, u)
265
+ $(n(fe))
266
+ ], 512)) : G("", !0),
267
+ w("button", {
268
+ class: U(["menu", { hidden: n(p) === l }]),
269
+ onClick: (d) => K(d, l)
264
270
  }, [
265
- b(n(fe))
266
- ], 10, Oe)
271
+ $(n(pe))
272
+ ], 10, Se)
267
273
  ])
268
- ], 10, $e))), 128))
274
+ ], 10, Ge))), 128))
269
275
  ])
270
276
  ]))), 128)),
271
- j(b(Ie, {
272
- trigger: _.value,
273
- "onUpdate:trigger": e[7] || (e[7] = (f) => _.value = f),
274
- data: a.value,
275
- "onUpdate:data": e[8] || (e[8] = (f) => a.value = f),
277
+ q($(Me, {
278
+ trigger: g.value,
279
+ "onUpdate:trigger": e[7] || (e[7] = (f) => g.value = f),
280
+ data: u.value,
281
+ "onUpdate:data": e[8] || (e[8] = (f) => u.value = f),
276
282
  items: t.menuItems,
277
283
  "menu-list-gap": t.menuListGap,
278
- onItemClick: Y
284
+ onItemClick: ee
279
285
  }, null, 8, ["trigger", "data", "items", "menu-list-gap"]), [
280
- [re, _.value]
286
+ [ae, g.value]
281
287
  ])
282
288
  ], 64))
283
289
  ], 2));
284
290
  }
285
- }), H = /* @__PURE__ */ P(Be, [["__scopeId", "data-v-18ccfabf"]]), De = function(i) {
286
- i.component(H.name, H);
291
+ }), N = /* @__PURE__ */ z(Be, [["__scopeId", "data-v-97a7e8a2"]]), De = function(s) {
292
+ s.component(N.name, N);
287
293
  };
288
- Object.assign(H, {
294
+ Object.assign(N, {
289
295
  name: "TrHistory",
290
296
  install: De
291
297
  });
292
298
  export {
293
- H,
294
- he as u
299
+ N as H,
300
+ Ce as u
295
301
  };
package/dist/index4.js CHANGED
@@ -1,9 +1,9 @@
1
- import { onMounted as U, nextTick as B, h as C, defineComponent as g, render as R, onBeforeUnmount as D, Teleport as W, computed as h, ref as E, createBlock as F, openBlock as _, Transition as j, normalizeProps as q, guardReactiveProps as L, withCtx as Z, createElementBlock as G, createCommentVNode as J, renderSlot as K, useSlots as Q, watch as X, useAttrs as Y, resolveDynamicComponent as ee, unref as S, mergeProps as k, createVNode as te } from "vue";
1
+ import { onMounted as U, nextTick as B, h as C, defineComponent as b, render as R, onBeforeUnmount as D, Teleport as W, computed as h, ref as E, createBlock as F, openBlock as g, Transition as j, normalizeProps as q, guardReactiveProps as L, withCtx as Z, createElementBlock as G, createCommentVNode as J, renderSlot as K, useSlots as Q, watch as X, useAttrs as Y, resolveDynamicComponent as ee, unref as S, mergeProps as k, createVNode as te } from "vue";
2
2
  import { b as oe, a as re, d as ne } from "./index3.js";
3
3
  import { t as u } from "./utils.js";
4
4
  import { _ as N } from "./_plugin-vue_export-helper.js";
5
5
  import { u as se } from "./useSlotRefs.js";
6
- const pe = g({
6
+ const pe = b({
7
7
  setup: (r) => () => C(W, r.propsFactory(), r.vnodeFactory()),
8
8
  props: ["propsFactory", "vnodeFactory"]
9
9
  });
@@ -34,7 +34,7 @@ function ce(r, n) {
34
34
  return d;
35
35
  });
36
36
  }
37
- const ie = /* @__PURE__ */ g({
37
+ const ie = /* @__PURE__ */ b({
38
38
  __name: "Popper",
39
39
  props: {
40
40
  show: { type: Boolean },
@@ -44,9 +44,9 @@ const ie = /* @__PURE__ */ g({
44
44
  const e = E(null);
45
45
  return n({
46
46
  popperRef: e
47
- }), (t, s) => (_(), F(j, q(L(t.transitionProps)), {
47
+ }), (t, s) => (g(), F(j, q(L(r.transitionProps)), {
48
48
  default: Z(() => [
49
- t.show ? (_(), G("div", {
49
+ r.show ? (g(), G("div", {
50
50
  key: 0,
51
51
  class: "tr-base-popper",
52
52
  ref_key: "popperRef",
@@ -58,7 +58,7 @@ const ie = /* @__PURE__ */ g({
58
58
  _: 3
59
59
  }, 16));
60
60
  }
61
- }), le = /* @__PURE__ */ N(ie, [["__scopeId", "data-v-25c13ab7"]]), ue = /* @__PURE__ */ g({
61
+ }), le = /* @__PURE__ */ N(ie, [["__scopeId", "data-v-25c13ab7"]]), ue = /* @__PURE__ */ b({
62
62
  inheritAttrs: !1,
63
63
  __name: "index",
64
64
  props: {
@@ -88,7 +88,7 @@ const ie = /* @__PURE__ */ g({
88
88
  for (const [c, a] of Object.entries(o))
89
89
  /^on[A-Z]/.test(c) && typeof a == "function" && (p[c] = a);
90
90
  return p;
91
- }, f = E(null), b = h(() => {
91
+ }, f = E(null), _ = h(() => {
92
92
  var o;
93
93
  return ((o = f.value) == null ? void 0 : o.popperRef) || null;
94
94
  }), m = h(() => {
@@ -108,23 +108,23 @@ const ie = /* @__PURE__ */ g({
108
108
  width: z,
109
109
  update: A
110
110
  } = re(i), {
111
- width: y,
111
+ width: x,
112
112
  height: P
113
- } = ne(b, void 0, {
113
+ } = ne(_, void 0, {
114
114
  box: "border-box"
115
115
  }), H = h(() => {
116
116
  const {
117
117
  placement: o,
118
118
  preventOverflow: p
119
- } = e, c = {}, a = (l, x) => {
119
+ } = e, c = {}, a = (l, y) => {
120
120
  if (!p) {
121
- c[l] = x;
121
+ c[l] = y;
122
122
  return;
123
123
  }
124
- const T = u(l === "top" ? P.value : y.value);
125
- l === "top" ? c[l] = `clamp(var(--tr-base-popper-min-top), ${x}, calc(var(--tr-base-popper-max-bottom) - ${T}))` : l === "left" && (c[l] = `clamp(var(--tr-base-popper-min-left), ${x}, calc(var(--tr-base-popper-max-right) - ${T}))`);
124
+ const T = u(l === "top" ? P.value : x.value);
125
+ l === "top" ? c[l] = `clamp(var(--tr-base-popper-min-top), ${y}, calc(var(--tr-base-popper-max-bottom) - ${T}))` : l === "left" && (c[l] = `clamp(var(--tr-base-popper-min-left), ${y}, calc(var(--tr-base-popper-max-right) - ${T}))`);
126
126
  };
127
- return o.includes("top") && a("top", u($.value - P.value - m.value.mainAxis)), o.includes("bottom") && a("top", u(O.value + m.value.mainAxis)), o.includes("left") && a("left", u(w.value + m.value.crossAxis)), o.includes("right") && a("left", u(V.value - y.value + m.value.crossAxis)), o.includes("center") && a("left", u(w.value + z.value / 2 - y.value / 2 + m.value.crossAxis)), c;
127
+ return o.includes("top") && a("top", u($.value - P.value - m.value.mainAxis)), o.includes("bottom") && a("top", u(O.value + m.value.mainAxis)), o.includes("left") && a("left", u(w.value + m.value.crossAxis)), o.includes("right") && a("left", u(V.value - x.value + m.value.crossAxis)), o.includes("center") && a("left", u(w.value + z.value / 2 - x.value / 2 + m.value.crossAxis)), c;
128
128
  });
129
129
  X(() => e.show, (o) => {
130
130
  o && A();
@@ -146,9 +146,9 @@ const ie = /* @__PURE__ */ g({
146
146
  }
147
147
  })), n({
148
148
  triggerRef: i,
149
- popperRef: b,
149
+ popperRef: _,
150
150
  update: A
151
- }), (o, p) => (_(), F(ee(S(s)[0]), k({
151
+ }), (o, p) => (g(), F(ee(S(s)[0]), k({
152
152
  ref: S(d)
153
153
  }, v(e.triggerEvents)), null, 16));
154
154
  }