@opentiny/tiny-robot 0.3.0-alpha.3 → 0.3.0-alpha.4
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 +44 -41
- package/dist/base-popper/index.js +4 -0
- package/dist/bubble/index.js +1207 -1992
- package/dist/close.js +1 -1
- package/dist/container/index.js +12 -12
- package/dist/dropdown-menu/index.js +79 -64
- package/dist/feedback/index.js +43 -43
- package/dist/flow-layout-buttons/index.js +29 -26
- package/dist/history/index.js +25 -25
- package/dist/icon-button/index.js +18 -19
- package/dist/index.d.ts +562 -1945
- package/dist/index.js +43 -58
- package/dist/index2.js +359 -290
- package/dist/index3.js +137 -298
- package/dist/index4.js +269 -591
- package/dist/index5.js +528 -2048
- package/dist/index6.js +2069 -4665
- package/dist/index7.js +4749 -0
- package/dist/question/index.js +59 -59
- package/dist/sender/index.js +994 -1184
- package/dist/style.css +1 -1
- package/dist/suggestion/index.js +70 -70
- package/dist/suggestion-pills/index.js +125 -158
- package/dist/suggestion-popover/index.js +246 -219
- package/dist/tiny-robot-svgs.js +174 -227
- package/dist/useSlotRefs.js +36 -0
- package/dist/utils.js +4 -15
- package/package.json +3 -4
- package/dist/loading.js +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as $, useSlots as H, computed as i, ref as f, watch as
|
|
2
|
-
import {
|
|
3
|
-
import { T as M } from "../
|
|
4
|
-
import { o as Z,
|
|
1
|
+
import { defineComponent as $, useSlots as H, computed as i, ref as f, watch as N, nextTick as W, createElementBlock as _, openBlock as o, createBlock as v, createCommentVNode as R, Fragment as G, renderList as I, unref as h, withCtx as S, createElementVNode as w, resolveDynamicComponent as x, 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 { c as Y } from "../tiny-robot-svgs.js";
|
|
3
|
+
import { T as M } from "../index5.js";
|
|
4
|
+
import { o as Z, b 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
7
|
const ne = { class: "tr-action-group" }, re = ["onClick"], le = ["onClick"], ae = { class: "tr-action-group__dropdown-item-text" }, ce = /* @__PURE__ */ $({
|
|
@@ -12,45 +12,48 @@ const ne = { class: "tr-action-group" }, re = ["onClick"], le = ["onClick"], ae
|
|
|
12
12
|
dropDownShowLabelOnly: { type: Boolean }
|
|
13
13
|
},
|
|
14
14
|
emits: ["item-click"],
|
|
15
|
-
setup(
|
|
16
|
-
const
|
|
17
|
-
var
|
|
15
|
+
setup(r, { emit: k }) {
|
|
16
|
+
const l = r, F = H(), O = k, p = i(() => {
|
|
17
|
+
var a, t;
|
|
18
18
|
const e = F.default();
|
|
19
|
-
return Array.isArray(e) ? e.length === 1 && ((
|
|
20
|
-
}),
|
|
21
|
-
const e =
|
|
19
|
+
return Array.isArray(e) ? e.length === 1 && ((a = e[0].type) == null ? void 0 : a.toString()) === "Symbol(v-fgt)" ? e[0].children : e : ((t = e.type) == null ? void 0 : t.toString()) === "Symbol(v-fgt)" ? e.children : [e];
|
|
20
|
+
}), b = i(() => {
|
|
21
|
+
const e = l.maxNum ?? Number.MAX_SAFE_INTEGER;
|
|
22
22
|
return e > 0 ? e : Number.MAX_SAFE_INTEGER;
|
|
23
|
-
}),
|
|
24
|
-
|
|
23
|
+
}), y = i(() => p.value.length > b.value), V = i(() => y.value ? p.value.slice(0, b.value) : p.value), z = i(() => y.value ? p.value.slice(b.value) : []), m = f(null), d = f(null), n = f(!1), P = () => {
|
|
24
|
+
n.value = !n.value;
|
|
25
25
|
};
|
|
26
|
-
Z(
|
|
27
|
-
|
|
28
|
-
(
|
|
29
|
-
|
|
26
|
+
Z(
|
|
27
|
+
d,
|
|
28
|
+
() => {
|
|
29
|
+
n.value = !1;
|
|
30
|
+
},
|
|
31
|
+
{ ignore: [m] }
|
|
32
|
+
);
|
|
30
33
|
const A = (e) => {
|
|
31
|
-
O("item-click", e),
|
|
34
|
+
O("item-click", e), n.value = !1;
|
|
32
35
|
}, B = f("placement-bottom"), { height: D } = ee(), T = () => {
|
|
33
36
|
if (!d.value || !m.value)
|
|
34
37
|
return "placement-bottom";
|
|
35
|
-
const e = d.value.getBoundingClientRect(),
|
|
36
|
-
B.value =
|
|
38
|
+
const e = d.value.getBoundingClientRect(), a = m.value.getBoundingClientRect();
|
|
39
|
+
B.value = a.bottom + e.height + 16 > D.value ? "placement-top" : "placement-bottom";
|
|
37
40
|
};
|
|
38
|
-
return
|
|
41
|
+
return N(n, (e) => {
|
|
39
42
|
e && W(() => {
|
|
40
43
|
T();
|
|
41
44
|
});
|
|
42
|
-
}),
|
|
43
|
-
|
|
44
|
-
}), (e,
|
|
45
|
-
(
|
|
45
|
+
}), N(D, () => {
|
|
46
|
+
n.value && T();
|
|
47
|
+
}), (e, a) => (o(), _("div", ne, [
|
|
48
|
+
(o(!0), _(G, null, I(V.value, (t, C) => {
|
|
46
49
|
var c;
|
|
47
|
-
return
|
|
50
|
+
return o(), v(h(M), {
|
|
48
51
|
key: C,
|
|
49
52
|
content: (c = t.props) == null ? void 0 : c.label,
|
|
50
53
|
effect: "dark",
|
|
51
54
|
placement: "top",
|
|
52
55
|
"open-delay": 500,
|
|
53
|
-
disabled: !
|
|
56
|
+
disabled: !l.showTooltip
|
|
54
57
|
}, {
|
|
55
58
|
default: S(() => [
|
|
56
59
|
w("span", {
|
|
@@ -60,19 +63,19 @@ const ne = { class: "tr-action-group" }, re = ["onClick"], le = ["onClick"], ae
|
|
|
60
63
|
return A((s = t.props) == null ? void 0 : s.name);
|
|
61
64
|
}
|
|
62
65
|
}, [
|
|
63
|
-
(
|
|
66
|
+
(o(), v(x(t)))
|
|
64
67
|
], 8, re)
|
|
65
68
|
]),
|
|
66
69
|
_: 2
|
|
67
70
|
}, 1032, ["content", "disabled"]);
|
|
68
71
|
}), 128)),
|
|
69
|
-
|
|
72
|
+
y.value ? (o(), v(h(M), {
|
|
70
73
|
key: 0,
|
|
71
74
|
content: "更多",
|
|
72
75
|
effect: "dark",
|
|
73
76
|
placement: "top",
|
|
74
77
|
"open-delay": 500,
|
|
75
|
-
disabled: !
|
|
78
|
+
disabled: !l.showTooltip
|
|
76
79
|
}, {
|
|
77
80
|
default: S(() => [
|
|
78
81
|
w("span", {
|
|
@@ -91,9 +94,9 @@ const ne = { class: "tr-action-group" }, re = ["onClick"], le = ["onClick"], ae
|
|
|
91
94
|
ref: d,
|
|
92
95
|
class: J(["tr-action-group__dropdown", B.value])
|
|
93
96
|
}, [
|
|
94
|
-
(
|
|
97
|
+
(o(!0), _(G, null, I(z.value, (t, C) => {
|
|
95
98
|
var c;
|
|
96
|
-
return
|
|
99
|
+
return o(), _("li", {
|
|
97
100
|
class: "tr-action-group__dropdown-item",
|
|
98
101
|
key: C,
|
|
99
102
|
onClick: K((X) => {
|
|
@@ -101,12 +104,12 @@ const ne = { class: "tr-action-group" }, re = ["onClick"], le = ["onClick"], ae
|
|
|
101
104
|
return A((s = t.props) == null ? void 0 : s.name);
|
|
102
105
|
}, ["stop"])
|
|
103
106
|
}, [
|
|
104
|
-
|
|
107
|
+
l.dropDownShowLabelOnly ? R("", !0) : (o(), v(x(t), { key: 0 })),
|
|
105
108
|
w("span", ae, Q((c = t.props) == null ? void 0 : c.label), 1)
|
|
106
109
|
], 8, le);
|
|
107
110
|
}), 128))
|
|
108
111
|
], 2), [
|
|
109
|
-
[U,
|
|
112
|
+
[U, n.value]
|
|
110
113
|
])
|
|
111
114
|
]),
|
|
112
115
|
_: 1
|
|
@@ -114,27 +117,27 @@ const ne = { class: "tr-action-group" }, re = ["onClick"], le = ["onClick"], ae
|
|
|
114
117
|
], 512)
|
|
115
118
|
]),
|
|
116
119
|
_: 3
|
|
117
|
-
}, 8, ["disabled"])) :
|
|
120
|
+
}, 8, ["disabled"])) : R("", !0)
|
|
118
121
|
]));
|
|
119
122
|
}
|
|
120
|
-
}), g = /* @__PURE__ */ oe(ce, [["__scopeId", "data-v-
|
|
123
|
+
}), g = /* @__PURE__ */ oe(ce, [["__scopeId", "data-v-f8531261"]]), u = /* @__PURE__ */ $({
|
|
121
124
|
__name: "ActionGroupItem",
|
|
122
125
|
props: {
|
|
123
126
|
name: {},
|
|
124
127
|
label: {}
|
|
125
128
|
},
|
|
126
|
-
setup(
|
|
127
|
-
return (k,
|
|
129
|
+
setup(r) {
|
|
130
|
+
return (k, l) => L(k.$slots, "default");
|
|
128
131
|
}
|
|
129
132
|
});
|
|
130
133
|
g.name = "TrActionGroup";
|
|
131
|
-
const se = function(
|
|
132
|
-
|
|
134
|
+
const se = function(r) {
|
|
135
|
+
r.component(g.name, g);
|
|
133
136
|
};
|
|
134
137
|
g.install = se;
|
|
135
138
|
u.name = "TrActionGroupItem";
|
|
136
|
-
const ie = function(
|
|
137
|
-
|
|
139
|
+
const ie = function(r) {
|
|
140
|
+
r.component(u.name, u);
|
|
138
141
|
};
|
|
139
142
|
u.install = ie;
|
|
140
143
|
const ve = u;
|