@opentiny/tiny-robot 0.2.0-alpha.5 → 0.2.0-alpha.6
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 +69 -67
- package/dist/bubble/index.js +17 -16
- package/dist/dropdown-menu/index.js +34 -32
- package/dist/flow-layout-buttons/index.js +74 -71
- package/dist/index.d.ts +11 -11
- package/dist/style.css +1 -1
- package/dist/suggestion-pills/index.js +36 -35
- package/dist/suggestion-popover/index.js +66 -64
- package/package.json +3 -3
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as T, useSlots as N, computed as d, createElementBlock as a, openBlock as n, normalizeClass as R, renderSlot as v, createBlock as c, resolveDynamicComponent as V, createCommentVNode as z, toDisplayString as E, useCssVars as F, ref as L, Fragment as $, renderList as b, unref as i, mergeProps as x, createSlots as M, withCtx as C, createVNode as D } from "vue";
|
|
2
2
|
import { d as j } from "../index3.js";
|
|
3
3
|
import q from "../dropdown-menu/index.js";
|
|
4
4
|
import A from "../suggestion-popover/index.js";
|
|
5
5
|
import { _ as w } from "../_plugin-vue_export-helper.js";
|
|
6
|
-
const H = { key: 0 }, J = /* @__PURE__ */
|
|
6
|
+
const H = { key: 0 }, J = /* @__PURE__ */ T({
|
|
7
7
|
__name: "PillButton",
|
|
8
8
|
props: {
|
|
9
9
|
item: {}
|
|
10
10
|
},
|
|
11
11
|
setup(s) {
|
|
12
|
-
const u = s, p = N(),
|
|
12
|
+
const u = s, p = N(), r = d(() => {
|
|
13
13
|
var e;
|
|
14
14
|
return !!(p.icon || (e = u.item) != null && e.icon);
|
|
15
|
-
}),
|
|
15
|
+
}), m = d(() => {
|
|
16
16
|
var e;
|
|
17
17
|
return !!(p.default || (e = u.item) != null && e.text);
|
|
18
|
-
}),
|
|
18
|
+
}), k = d(() => r.value && !m.value);
|
|
19
19
|
return (e, g) => (n(), a("button", {
|
|
20
|
-
class: R(["tr-suggestion-pills__item", { "only-icon":
|
|
20
|
+
class: R(["tr-suggestion-pills__item", { "only-icon": k.value }])
|
|
21
21
|
}, [
|
|
22
22
|
v(e.$slots, "icon", {}, () => {
|
|
23
23
|
var l;
|
|
@@ -33,10 +33,7 @@ const H = { key: 0 }, J = /* @__PURE__ */ D({
|
|
|
33
33
|
}, !0)
|
|
34
34
|
], 2));
|
|
35
35
|
}
|
|
36
|
-
}), o = /* @__PURE__ */ w(J, [["__scopeId", "data-v-8df2df8c"]]), K = {
|
|
37
|
-
class: "tr-suggestion-pills__container",
|
|
38
|
-
ref: "container"
|
|
39
|
-
}, O = /* @__PURE__ */ D({
|
|
36
|
+
}), o = /* @__PURE__ */ w(J, [["__scopeId", "data-v-8df2df8c"]]), K = /* @__PURE__ */ T({
|
|
40
37
|
__name: "index",
|
|
41
38
|
props: {
|
|
42
39
|
items: {}
|
|
@@ -44,40 +41,44 @@ const H = { key: 0 }, J = /* @__PURE__ */ D({
|
|
|
44
41
|
emits: ["item-click"],
|
|
45
42
|
setup(s, { emit: u }) {
|
|
46
43
|
F((g) => ({
|
|
47
|
-
|
|
44
|
+
31203585: e.value
|
|
48
45
|
}));
|
|
49
|
-
const p = s,
|
|
50
|
-
return (g, l) => (n(), a("div",
|
|
46
|
+
const p = s, r = u, m = L(null), { arrivedState: k } = j(m), e = d(() => k.left ? "linear-gradient(to right, black 95%, transparent)" : k.right ? "linear-gradient(to left, black 95%, transparent)" : "linear-gradient(to right, transparent, black 5%, black 95%, transparent)");
|
|
47
|
+
return (g, l) => (n(), a("div", {
|
|
48
|
+
class: "tr-suggestion-pills__container",
|
|
49
|
+
ref_key: "containerRef",
|
|
50
|
+
ref: m
|
|
51
|
+
}, [
|
|
51
52
|
v(g.$slots, "default", {}, () => [
|
|
52
53
|
(n(!0), a($, null, b(p.items, (t) => {
|
|
53
|
-
var
|
|
54
|
+
var y, h, S, B, I, P;
|
|
54
55
|
return n(), a($, {
|
|
55
56
|
key: t.id
|
|
56
57
|
}, [
|
|
57
|
-
((
|
|
58
|
+
((y = t.action) == null ? void 0 : y.type) === "popover" ? (n(), c(i(A), x({
|
|
58
59
|
key: 0,
|
|
59
60
|
class: "shrink",
|
|
60
61
|
ref_for: !0
|
|
61
62
|
}, t.action.props, {
|
|
62
|
-
onItemClick: (
|
|
63
|
+
onItemClick: (h = t.action.events) == null ? void 0 : h.itemClick,
|
|
63
64
|
onGroupClick: (S = t.action.events) == null ? void 0 : S.groupClick,
|
|
64
65
|
onClose: (B = t.action.events) == null ? void 0 : B.close
|
|
65
66
|
}), M({
|
|
66
67
|
default: C(() => [
|
|
67
|
-
|
|
68
|
+
D(i(o), {
|
|
68
69
|
item: t,
|
|
69
|
-
onClick: (
|
|
70
|
+
onClick: (f) => r("item-click", t)
|
|
70
71
|
}, null, 8, ["item", "onClick"])
|
|
71
72
|
]),
|
|
72
73
|
_: 2
|
|
73
74
|
}, [
|
|
74
|
-
b(t.action.slots, (
|
|
75
|
+
b(t.action.slots, (f, G) => ({
|
|
75
76
|
name: G,
|
|
76
77
|
fn: C(() => [
|
|
77
|
-
(n(), c(V(
|
|
78
|
+
(n(), c(V(f)))
|
|
78
79
|
])
|
|
79
80
|
}))
|
|
80
|
-
]), 1040, ["onItemClick", "onGroupClick", "onClose"])) : ((I = t.action) == null ? void 0 : I.type) === "menu" ? (n(), c(
|
|
81
|
+
]), 1040, ["onItemClick", "onGroupClick", "onClose"])) : ((I = t.action) == null ? void 0 : I.type) === "menu" ? (n(), c(i(q), x({
|
|
81
82
|
key: 1,
|
|
82
83
|
class: "shrink",
|
|
83
84
|
ref_for: !0
|
|
@@ -85,35 +86,35 @@ const H = { key: 0 }, J = /* @__PURE__ */ D({
|
|
|
85
86
|
onItemClick: (P = t.action.events) == null ? void 0 : P.itemClick
|
|
86
87
|
}), {
|
|
87
88
|
default: C(() => [
|
|
88
|
-
|
|
89
|
+
D(i(o), {
|
|
89
90
|
item: t,
|
|
90
|
-
onClick: (
|
|
91
|
+
onClick: (f) => r("item-click", t)
|
|
91
92
|
}, null, 8, ["item", "onClick"])
|
|
92
93
|
]),
|
|
93
94
|
_: 2
|
|
94
|
-
}, 1040, ["onItemClick"])) : (n(), c(
|
|
95
|
+
}, 1040, ["onItemClick"])) : (n(), c(i(o), {
|
|
95
96
|
key: 2,
|
|
96
97
|
item: t,
|
|
97
|
-
onClick: (
|
|
98
|
+
onClick: (f) => r("item-click", t)
|
|
98
99
|
}, null, 8, ["item", "onClick"]))
|
|
99
100
|
], 64);
|
|
100
101
|
}), 128))
|
|
101
102
|
], !0)
|
|
102
103
|
], 512));
|
|
103
104
|
}
|
|
104
|
-
}),
|
|
105
|
-
|
|
106
|
-
const
|
|
107
|
-
s.component(
|
|
105
|
+
}), _ = /* @__PURE__ */ w(K, [["__scopeId", "data-v-9c74797b"]]);
|
|
106
|
+
_.name = "TrSuggestionPills";
|
|
107
|
+
const O = function(s) {
|
|
108
|
+
s.component(_.name, _);
|
|
108
109
|
};
|
|
109
|
-
|
|
110
|
+
_.install = O;
|
|
110
111
|
o.name = "TrSuggestionPillButton";
|
|
111
|
-
const
|
|
112
|
+
const Q = function(s) {
|
|
112
113
|
s.component(o.name, o);
|
|
113
114
|
};
|
|
114
|
-
o.install =
|
|
115
|
-
const
|
|
115
|
+
o.install = Q;
|
|
116
|
+
const tt = o;
|
|
116
117
|
export {
|
|
117
|
-
|
|
118
|
-
|
|
118
|
+
tt as SuggestionPillButton,
|
|
119
|
+
_ as default
|
|
119
120
|
};
|