@opentiny/tiny-robot 0.3.0-alpha.2 → 0.3.0-alpha.3
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/action-group/index.js +16 -16
- package/dist/bubble/index.js +855 -852
- package/dist/container/index.js +10 -10
- package/dist/feedback/index.js +43 -43
- package/dist/flow-layout-buttons/index.js +10 -10
- package/dist/history/index.js +39 -39
- package/dist/question/index.js +66 -66
- package/dist/sender/index.js +130 -130
- package/dist/style.css +1 -1
- package/dist/suggestion/index.js +58 -58
- package/dist/suggestion-pills/index.js +1 -1
- package/dist/suggestion-popover/index.js +25 -25
- package/dist/tiny-robot-svgs.js +172 -172
- package/package.json +3 -3
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as $, useSlots as H, computed as i, ref as f, watch as x, nextTick as W, createElementBlock as _, openBlock as n, createBlock as v, createCommentVNode as N, Fragment as R, renderList as G, unref as h, withCtx as S, createElementVNode as w, resolveDynamicComponent as I, renderSlot as L, createVNode as E, Transition as j, withDirectives as q, normalizeClass as J, withModifiers as K, toDisplayString as Q, vShow as U } from "vue";
|
|
2
|
+
import { x as Y } from "../tiny-robot-svgs.js";
|
|
3
3
|
import { T as M } from "../index4.js";
|
|
4
4
|
import { o as Z, a as ee } from "../index2.js";
|
|
5
5
|
import te from "../icon-button/index.js";
|
|
6
6
|
import { _ as oe } from "../_plugin-vue_export-helper.js";
|
|
7
|
-
const ne = { class: "tr-action-group" }, re = ["onClick"], le = ["onClick"], ae = { class: "tr-action-group__dropdown-item-text" }, ce = /* @__PURE__ */
|
|
7
|
+
const ne = { class: "tr-action-group" }, re = ["onClick"], le = ["onClick"], ae = { class: "tr-action-group__dropdown-item-text" }, ce = /* @__PURE__ */ $({
|
|
8
8
|
__name: "ActionGroup",
|
|
9
9
|
props: {
|
|
10
10
|
maxNum: {},
|
|
@@ -13,9 +13,9 @@ const ne = { class: "tr-action-group" }, re = ["onClick"], le = ["onClick"], ae
|
|
|
13
13
|
},
|
|
14
14
|
emits: ["item-click"],
|
|
15
15
|
setup(l, { emit: k }) {
|
|
16
|
-
const a = l,
|
|
16
|
+
const a = l, F = H(), O = k, p = i(() => {
|
|
17
17
|
var o, t;
|
|
18
|
-
const e =
|
|
18
|
+
const e = F.default();
|
|
19
19
|
return Array.isArray(e) ? e.length === 1 && ((o = e[0].type) == null ? void 0 : o.toString()) === "Symbol(v-fgt)" ? e[0].children : e : ((t = e.type) == null ? void 0 : t.toString()) === "Symbol(v-fgt)" ? e.children : [e];
|
|
20
20
|
}), y = i(() => {
|
|
21
21
|
const e = a.maxNum ?? Number.MAX_SAFE_INTEGER;
|
|
@@ -28,21 +28,21 @@ const ne = { class: "tr-action-group" }, re = ["onClick"], le = ["onClick"], ae
|
|
|
28
28
|
(o = m.value) != null && o.contains(e.target) || (r.value = !1);
|
|
29
29
|
});
|
|
30
30
|
const A = (e) => {
|
|
31
|
-
|
|
31
|
+
O("item-click", e), r.value = !1;
|
|
32
32
|
}, B = f("placement-bottom"), { height: D } = ee(), T = () => {
|
|
33
33
|
if (!d.value || !m.value)
|
|
34
34
|
return "placement-bottom";
|
|
35
35
|
const e = d.value.getBoundingClientRect(), o = m.value.getBoundingClientRect();
|
|
36
36
|
B.value = o.bottom + e.height + 16 > D.value ? "placement-top" : "placement-bottom";
|
|
37
37
|
};
|
|
38
|
-
return
|
|
38
|
+
return x(r, (e) => {
|
|
39
39
|
e && W(() => {
|
|
40
40
|
T();
|
|
41
41
|
});
|
|
42
|
-
}),
|
|
42
|
+
}), x(D, () => {
|
|
43
43
|
r.value && T();
|
|
44
44
|
}), (e, o) => (n(), _("div", ne, [
|
|
45
|
-
(n(!0), _(
|
|
45
|
+
(n(!0), _(R, null, G(V.value, (t, C) => {
|
|
46
46
|
var c;
|
|
47
47
|
return n(), v(h(M), {
|
|
48
48
|
key: C,
|
|
@@ -60,7 +60,7 @@ const ne = { class: "tr-action-group" }, re = ["onClick"], le = ["onClick"], ae
|
|
|
60
60
|
return A((s = t.props) == null ? void 0 : s.name);
|
|
61
61
|
}
|
|
62
62
|
}, [
|
|
63
|
-
(n(), v(
|
|
63
|
+
(n(), v(I(t)))
|
|
64
64
|
], 8, re)
|
|
65
65
|
]),
|
|
66
66
|
_: 2
|
|
@@ -81,7 +81,7 @@ const ne = { class: "tr-action-group" }, re = ["onClick"], le = ["onClick"], ae
|
|
|
81
81
|
class: "tr-action-group__btn-wrapper",
|
|
82
82
|
onClick: P
|
|
83
83
|
}, [
|
|
84
|
-
|
|
84
|
+
L(e.$slots, "moreBtn", {}, () => [
|
|
85
85
|
E(h(te), { icon: h(Y) }, null, 8, ["icon"])
|
|
86
86
|
], !0),
|
|
87
87
|
E(j, { name: "tr-action-group-dropdown" }, {
|
|
@@ -91,7 +91,7 @@ const ne = { class: "tr-action-group" }, re = ["onClick"], le = ["onClick"], ae
|
|
|
91
91
|
ref: d,
|
|
92
92
|
class: J(["tr-action-group__dropdown", B.value])
|
|
93
93
|
}, [
|
|
94
|
-
(n(!0), _(
|
|
94
|
+
(n(!0), _(R, null, G(z.value, (t, C) => {
|
|
95
95
|
var c;
|
|
96
96
|
return n(), _("li", {
|
|
97
97
|
class: "tr-action-group__dropdown-item",
|
|
@@ -101,7 +101,7 @@ const ne = { class: "tr-action-group" }, re = ["onClick"], le = ["onClick"], ae
|
|
|
101
101
|
return A((s = t.props) == null ? void 0 : s.name);
|
|
102
102
|
}, ["stop"])
|
|
103
103
|
}, [
|
|
104
|
-
a.dropDownShowLabelOnly ?
|
|
104
|
+
a.dropDownShowLabelOnly ? N("", !0) : (n(), v(I(t), { key: 0 })),
|
|
105
105
|
w("span", ae, Q((c = t.props) == null ? void 0 : c.label), 1)
|
|
106
106
|
], 8, le);
|
|
107
107
|
}), 128))
|
|
@@ -114,17 +114,17 @@ const ne = { class: "tr-action-group" }, re = ["onClick"], le = ["onClick"], ae
|
|
|
114
114
|
], 512)
|
|
115
115
|
]),
|
|
116
116
|
_: 3
|
|
117
|
-
}, 8, ["disabled"])) :
|
|
117
|
+
}, 8, ["disabled"])) : N("", !0)
|
|
118
118
|
]));
|
|
119
119
|
}
|
|
120
|
-
}), g = /* @__PURE__ */ oe(ce, [["__scopeId", "data-v-f3138789"]]), u = /* @__PURE__ */
|
|
120
|
+
}), g = /* @__PURE__ */ oe(ce, [["__scopeId", "data-v-f3138789"]]), u = /* @__PURE__ */ $({
|
|
121
121
|
__name: "ActionGroupItem",
|
|
122
122
|
props: {
|
|
123
123
|
name: {},
|
|
124
124
|
label: {}
|
|
125
125
|
},
|
|
126
126
|
setup(l) {
|
|
127
|
-
return (k, a) =>
|
|
127
|
+
return (k, a) => L(k.$slots, "default");
|
|
128
128
|
}
|
|
129
129
|
});
|
|
130
130
|
g.name = "TrActionGroup";
|