@opentiny/tiny-robot 0.3.0-alpha.3 → 0.3.0-alpha.5
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 +41 -38
- package/dist/base-popper/index.js +123 -0
- package/dist/bubble/index.js +1207 -1992
- package/dist/container/index.js +12 -12
- package/dist/dropdown-menu/index.js +77 -62
- package/dist/feedback/index.js +42 -42
- package/dist/flow-layout-buttons/index.js +23 -20
- package/dist/history/index.js +24 -24
- package/dist/icon-button/index.js +18 -19
- package/dist/index.d.ts +606 -1935
- package/dist/index.js +43 -58
- package/dist/index2.js +358 -290
- package/dist/index3.js +33 -25
- package/dist/index5.js +179 -180
- package/dist/index6.js +610 -613
- package/dist/question/index.js +58 -58
- 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 +179 -129
- package/dist/suggestion-popover/index.js +215 -212
- package/dist/tiny-robot-svgs.js +174 -227
- package/dist/utils.js +4 -15
- package/package.json +3 -4
- package/dist/loading.js +0 -4
package/dist/index3.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { A as B, s as C, d as k, a as _, p as
|
|
2
|
-
import { createElementBlock as w, openBlock as f, createElementVNode as r, resolveComponent as
|
|
3
|
-
const z = ({ emit: e, props: t, state: n, designConfig: o }) => (
|
|
1
|
+
import { A as B, s as C, d as k, a as _, p as O, b as $, c as A, f as j } from "./index6.js";
|
|
2
|
+
import { createElementBlock as w, openBlock as f, createElementVNode as r, resolveComponent as D, mergeProps as I, createBlock as h, createCommentVNode as T, renderSlot as E, resolveDynamicComponent as L, normalizeClass as M, toDisplayString as U } from "vue";
|
|
3
|
+
const z = ({ emit: e, props: t, state: n, designConfig: o }) => (d) => {
|
|
4
4
|
var s, l;
|
|
5
|
-
const i = B.filterUrl(t.href),
|
|
6
|
-
let a =
|
|
7
|
-
t.resetTime !==
|
|
5
|
+
const i = B.filterUrl(t.href), u = 1e3;
|
|
6
|
+
let a = u;
|
|
7
|
+
t.resetTime !== u ? a = t.resetTime : a = (l = (s = o == null ? void 0 : o.props) == null ? void 0 : s.resetTime) != null ? l : t.resetTime, i ? location.href = i : t.nativeType === "button" && a > 0 && (n.disabled = !0, n.timer = window.setTimeout(() => {
|
|
8
8
|
n.disabled = !1;
|
|
9
|
-
}, a)), e("click",
|
|
10
|
-
}, F = (e) => () => clearTimeout(e.timer), N = ["state", "handleClick"], G = (e, { computed: t, onBeforeUnmount: n, reactive: o, watch:
|
|
9
|
+
}, a)), e("click", d);
|
|
10
|
+
}, F = (e) => () => clearTimeout(e.timer), N = ["state", "handleClick"], G = (e, { computed: t, onBeforeUnmount: n, reactive: o, watch: d, inject: s }, { emit: l, parent: i, designConfig: u }) => {
|
|
11
11
|
i.tinyForm = i.tinyForm || s("form", null);
|
|
12
12
|
const a = o({
|
|
13
13
|
timer: 0,
|
|
14
14
|
disabled: e.disabled,
|
|
15
15
|
plain: t(() => e.plain || (i.buttonGroup || {}).plain),
|
|
16
16
|
round: t(() => {
|
|
17
|
-
var c,
|
|
18
|
-
return (g = (
|
|
17
|
+
var c, v, g;
|
|
18
|
+
return (g = (v = e.round) != null ? v : (c = u == null ? void 0 : u.props) == null ? void 0 : c.round) != null ? g : !1;
|
|
19
19
|
}),
|
|
20
20
|
formDisabled: t(() => (i.tinyForm || {}).disabled),
|
|
21
21
|
buttonDisabled: t(
|
|
22
22
|
() => e.disabled || a.disabled || (i.buttonGroup || {}).disabled || a.formDisabled
|
|
23
23
|
)
|
|
24
24
|
});
|
|
25
|
-
|
|
25
|
+
d(
|
|
26
26
|
() => e.disabled,
|
|
27
27
|
(c) => {
|
|
28
28
|
a.disabled = c;
|
|
@@ -32,7 +32,7 @@ const z = ({ emit: e, props: t, state: n, designConfig: o }) => (u) => {
|
|
|
32
32
|
const b = {
|
|
33
33
|
state: a,
|
|
34
34
|
clearTimer: F(a),
|
|
35
|
-
handleClick: z({ emit: l, props: e, state: a, designConfig:
|
|
35
|
+
handleClick: z({ emit: l, props: e, state: a, designConfig: u })
|
|
36
36
|
};
|
|
37
37
|
return n(b.clearTimer), b;
|
|
38
38
|
};
|
|
@@ -135,14 +135,14 @@ function S(e, t) {
|
|
|
135
135
|
return o;
|
|
136
136
|
}
|
|
137
137
|
var Q = function(t, n) {
|
|
138
|
-
for (var o = t.__vccOpts || t,
|
|
139
|
-
var l = s.value, i = l[0],
|
|
140
|
-
o[i] =
|
|
138
|
+
for (var o = t.__vccOpts || t, d = J(n), s; !(s = d()).done; ) {
|
|
139
|
+
var l = s.value, i = l[0], u = l[1];
|
|
140
|
+
o[i] = u;
|
|
141
141
|
}
|
|
142
142
|
return o;
|
|
143
143
|
}, W = k({
|
|
144
144
|
emits: ["click"],
|
|
145
|
-
props: [].concat(
|
|
145
|
+
props: [].concat(O, ["type", "text", "size", "icon", "resetTime", "nativeType", "loading", "disabled", "plain", "autofocus", "round", "circle", "tabindex", "customClass", "ghost", "customStyle"]),
|
|
146
146
|
components: {
|
|
147
147
|
IconLoading: q()
|
|
148
148
|
},
|
|
@@ -155,9 +155,9 @@ var Q = function(t, n) {
|
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
157
|
}), x = ["disabled", "autofocus", "type", "tabindex"];
|
|
158
|
-
function ee(e, t, n, o,
|
|
159
|
-
var l =
|
|
160
|
-
return f(), w("button",
|
|
158
|
+
function ee(e, t, n, o, d, s) {
|
|
159
|
+
var l = D("icon-loading");
|
|
160
|
+
return f(), w("button", I({
|
|
161
161
|
class: ["tiny-button", [e.type ? "tiny-button--" + e.type : "", e.size ? "tiny-button--" + e.size : "", {
|
|
162
162
|
"is-disabled": e.state.buttonDisabled,
|
|
163
163
|
"is-loading": e.loading,
|
|
@@ -174,6 +174,7 @@ function ee(e, t, n, o, u, s) {
|
|
|
174
174
|
disabled: e.state.buttonDisabled || e.loading,
|
|
175
175
|
autofocus: e.autofocus,
|
|
176
176
|
type: e.nativeType,
|
|
177
|
+
style: e.customStyle,
|
|
177
178
|
tabindex: e.tabindex
|
|
178
179
|
}, e.a(e.$attrs, ["class", "style", "title", "id"], !0)), [e.loading ? (f(), h(l, {
|
|
179
180
|
key: 0,
|
|
@@ -194,19 +195,19 @@ function ee(e, t, n, o, u, s) {
|
|
|
194
195
|
})], 16, x);
|
|
195
196
|
}
|
|
196
197
|
var m = /* @__PURE__ */ Q(W, [["render", ee]]);
|
|
197
|
-
function
|
|
198
|
-
return
|
|
198
|
+
function y() {
|
|
199
|
+
return y = Object.assign ? Object.assign.bind() : function(e) {
|
|
199
200
|
for (var t = 1; t < arguments.length; t++) {
|
|
200
201
|
var n = arguments[t];
|
|
201
202
|
for (var o in n) ({}).hasOwnProperty.call(n, o) && (e[o] = n[o]);
|
|
202
203
|
}
|
|
203
204
|
return e;
|
|
204
|
-
},
|
|
205
|
+
}, y.apply(null, arguments);
|
|
205
206
|
}
|
|
206
207
|
var te = function(t) {
|
|
207
208
|
var n, o = typeof process == "object" ? (n = process.env) == null ? void 0 : n.TINY_MODE : null;
|
|
208
209
|
return m;
|
|
209
|
-
}, ne =
|
|
210
|
+
}, ne = y({}, j, {
|
|
210
211
|
/** 展示按钮不同的状态,设置为text则展示为文本按钮。可取值为:'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text' */
|
|
211
212
|
type: {
|
|
212
213
|
type: String,
|
|
@@ -275,6 +276,13 @@ var te = function(t) {
|
|
|
275
276
|
type: Boolean,
|
|
276
277
|
default: !1
|
|
277
278
|
},
|
|
279
|
+
/** 自定义样式 */
|
|
280
|
+
customStyle: {
|
|
281
|
+
type: Object,
|
|
282
|
+
default: function() {
|
|
283
|
+
return {};
|
|
284
|
+
}
|
|
285
|
+
},
|
|
278
286
|
/** 是否幽灵按钮 */
|
|
279
287
|
ghost: Boolean,
|
|
280
288
|
/** 点击事件 */
|
|
@@ -282,7 +290,7 @@ var te = function(t) {
|
|
|
282
290
|
type: Function
|
|
283
291
|
}
|
|
284
292
|
}), p = k({
|
|
285
|
-
name:
|
|
293
|
+
name: A + "Button",
|
|
286
294
|
inject: {
|
|
287
295
|
buttonGroup: {
|
|
288
296
|
default: ""
|
|
@@ -291,7 +299,7 @@ var te = function(t) {
|
|
|
291
299
|
props: ne,
|
|
292
300
|
slots: Object,
|
|
293
301
|
setup: function(t, n) {
|
|
294
|
-
return
|
|
302
|
+
return $({
|
|
295
303
|
props: t,
|
|
296
304
|
context: n,
|
|
297
305
|
template: te
|