litos-ui 0.6.3 → 0.7.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/lib/base.js +13 -13
- package/lib/browser.d.ts +1 -0
- package/lib/button/regist.d.ts +2 -0
- package/lib/button/regist.js +7 -0
- package/lib/index-C2D4YsFw.js +4 -0
- package/lib/index.d.ts +10 -0
- package/lib/index.js +34 -24
- package/lib/litos-ui.css +1 -1
- package/lib/litos-ui.min.js +1 -1
- package/lib/popconfirm/index.d.ts +7 -0
- package/lib/popconfirm/index.js +36 -0
- package/lib/popconfirm/regist.d.ts +2 -0
- package/lib/popconfirm/regist.js +7 -0
- package/lib/popover/index.d.ts +5 -2
- package/lib/popover/index.js +68 -60
- package/lib/popover/regist.d.ts +2 -0
- package/lib/popover/regist.js +7 -0
- package/lib/tabbar/index.js +10 -9
- package/lib/tabbar/regist.d.ts +2 -0
- package/lib/tabbar/regist.js +7 -0
- package/lib/utils/index.js +46 -43
- package/lib/utils/transition.js +11 -6
- package/package.json +1 -1
package/lib/popover/index.js
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var N = Object.defineProperty;
|
|
2
|
+
var L = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var s = (e, i, t) =>
|
|
7
|
-
var o = (e, i, t) => (
|
|
8
|
-
var
|
|
9
|
-
import
|
|
10
|
-
import { initAttr as
|
|
11
|
-
import { set as
|
|
12
|
-
import { $one as
|
|
13
|
-
var r,
|
|
14
|
-
class
|
|
5
|
+
var j = (e, i, t) => i in e ? N(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t;
|
|
6
|
+
var s = (e, i, t) => j(e, typeof i != "symbol" ? i + "" : i, t), O = (e, i, t) => i.has(e) || L("Cannot " + t);
|
|
7
|
+
var o = (e, i, t) => (O(e, i, "read from private field"), t ? t.call(e) : i.get(e)), d = (e, i, t) => i.has(e) ? L("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(e) : i.set(e, t);
|
|
8
|
+
var f = (e, i, t) => (O(e, i, "access private method"), t);
|
|
9
|
+
import D from "../base.js";
|
|
10
|
+
import { initAttr as X, useId as Y, getPopoverOffsetY as q, getPopoverOffsetX as z, impactDetect as F } from "../utils/index.js";
|
|
11
|
+
import { set as G, remove as J } from "../utils/clickoutside.js";
|
|
12
|
+
import { $one as p, $$ as P, on as u, off as m } from "ph-utils/dom";
|
|
13
|
+
var r, S, x, H, C, l, c, v, E, M;
|
|
14
|
+
class K extends D {
|
|
15
15
|
constructor() {
|
|
16
16
|
super();
|
|
17
17
|
d(this, r);
|
|
18
|
-
s(this, "inline", !1);
|
|
19
18
|
s(this, "placement", "top");
|
|
20
19
|
s(this, "content");
|
|
21
20
|
s(this, "showArrow", !0);
|
|
@@ -31,11 +30,14 @@ class J extends j {
|
|
|
31
30
|
/** 浮层定位方式 */
|
|
32
31
|
s(this, "position", "absolute");
|
|
33
32
|
s(this, "theme", "default");
|
|
33
|
+
/**
|
|
34
|
+
* @property inline = false
|
|
35
|
+
*/
|
|
34
36
|
s(this, "_t");
|
|
35
|
-
d(this,
|
|
37
|
+
d(this, C, (t) => {
|
|
36
38
|
t.target.id !== this.id && this.hide();
|
|
37
39
|
});
|
|
38
|
-
d(this,
|
|
40
|
+
d(this, l, (t) => {
|
|
39
41
|
this.show(t.target);
|
|
40
42
|
});
|
|
41
43
|
d(this, c, () => {
|
|
@@ -44,13 +46,13 @@ class J extends j {
|
|
|
44
46
|
d(this, v, (t) => {
|
|
45
47
|
this.trigger === "click" ? this.toggle(t.target) : this.trigger === "focus" && this.show(t.target);
|
|
46
48
|
});
|
|
47
|
-
|
|
49
|
+
X(this);
|
|
48
50
|
}
|
|
49
51
|
connectedCallback() {
|
|
50
|
-
this.loadStyle(["popover"]), super.connectedCallback(), this.renderContent(),
|
|
52
|
+
this.loadStyle(["popover"]), f(this, r, S).call(this), super.connectedCallback(), this.renderContent(), f(this, r, x).call(this);
|
|
51
53
|
}
|
|
52
54
|
disconnectedCallback() {
|
|
53
|
-
super.disconnectedCallback(),
|
|
55
|
+
super.disconnectedCallback(), f(this, r, H).call(this);
|
|
54
56
|
}
|
|
55
57
|
render() {
|
|
56
58
|
const t = document.createElement("slot");
|
|
@@ -58,36 +60,39 @@ class J extends j {
|
|
|
58
60
|
}
|
|
59
61
|
renderContent() {
|
|
60
62
|
if (!this.isShow) return;
|
|
61
|
-
let t =
|
|
63
|
+
let t = p(".l-popover--content", this.root);
|
|
62
64
|
if (t) {
|
|
63
65
|
t.style.removeProperty("display");
|
|
64
66
|
return;
|
|
65
67
|
}
|
|
66
|
-
if (t =
|
|
68
|
+
if (t = P("div", {
|
|
67
69
|
class: [
|
|
68
70
|
"l-popover--content",
|
|
69
71
|
`l-popover-${this.placement}`,
|
|
70
|
-
this.theme === "
|
|
72
|
+
this.theme === "default" ? void 0 : `l-popover-${this.theme}`
|
|
71
73
|
]
|
|
72
|
-
}), this.offset && (t.style.cssText = "--l-popover-offset: ${this.offset}px;"), t.part = "content", t.innerHTML = this.
|
|
73
|
-
const n =
|
|
74
|
+
}), this.offset && (t.style.cssText = "--l-popover-offset: ${this.offset}px;"), t.part = "content", t.innerHTML = this.contentHTML(), this.showArrow) {
|
|
75
|
+
const n = P("div", {
|
|
74
76
|
class: "l-popover--arrow"
|
|
75
77
|
});
|
|
76
78
|
t.appendChild(n);
|
|
77
79
|
}
|
|
78
|
-
this.trigger === "hover" && (
|
|
80
|
+
this.trigger === "hover" && (u(t, "mouseenter", o(this, l)), u(t, "mouseleave", o(this, c))), this.root.appendChild(t);
|
|
81
|
+
}
|
|
82
|
+
contentHTML() {
|
|
83
|
+
return this.content ? `<span>${this.content}</span>` : "<slot></slot>";
|
|
79
84
|
}
|
|
80
85
|
hideContent() {
|
|
81
|
-
const t =
|
|
82
|
-
t && (this.destroyOnHide ? (this.trigger === "hover" && (
|
|
86
|
+
const t = p(".l-popover--content", this.root);
|
|
87
|
+
t && (this.destroyOnHide ? (this.trigger === "hover" && (m(t, "mouseenter", o(this, l)), m(t, "mouseleave", o(this, c))), this.root.removeChild(t)) : t.style.display = "none");
|
|
83
88
|
}
|
|
84
89
|
show(t) {
|
|
85
90
|
if (!this.disabled) {
|
|
86
91
|
if (this.isShow) {
|
|
87
|
-
|
|
92
|
+
f(this, r, E).call(this);
|
|
88
93
|
return;
|
|
89
94
|
}
|
|
90
|
-
this.isShow = !0, this.renderContent(),
|
|
95
|
+
this.isShow = !0, this.renderContent(), f(this, r, M).call(this, t);
|
|
91
96
|
}
|
|
92
97
|
}
|
|
93
98
|
hide() {
|
|
@@ -99,55 +104,58 @@ class J extends j {
|
|
|
99
104
|
this.isShow ? this.hide() : this.show(t);
|
|
100
105
|
}
|
|
101
106
|
}
|
|
102
|
-
r = new WeakSet(),
|
|
103
|
-
const t =
|
|
104
|
-
|
|
105
|
-
},
|
|
106
|
-
const t =
|
|
107
|
-
t && (this.trigger === "hover" ? (u(t, "mouseenter", o(this,
|
|
108
|
-
},
|
|
107
|
+
r = new WeakSet(), S = function() {
|
|
108
|
+
const t = this.getAttr("inline", !1);
|
|
109
|
+
this.style.display = t ? "inline-block" : "block", this.id || (this.id = `${Y()}-popover`);
|
|
110
|
+
}, x = function() {
|
|
111
|
+
const t = p('[slot="trigger"]', this);
|
|
112
|
+
t && (this.trigger === "hover" ? (u(t, "mouseenter", o(this, l)), u(t, "mouseleave", o(this, c))) : (this.trigger === "click" || this.trigger === "focus") && (u(t, "click", o(this, v)), G(t, o(this, C))));
|
|
113
|
+
}, H = function() {
|
|
114
|
+
const t = p('[slot="trigger"]', this);
|
|
115
|
+
t && (this.trigger === "hover" ? (m(t, "mouseenter", o(this, l)), m(t, "mouseleave", o(this, c))) : (this.trigger === "click" || this.trigger === "focus") && (m(t, "click", o(this, v)), J(t)));
|
|
116
|
+
}, C = new WeakMap(), l = new WeakMap(), c = new WeakMap(), v = new WeakMap(), E = function() {
|
|
109
117
|
this._t && (clearTimeout(this._t), this._t = void 0);
|
|
110
|
-
},
|
|
111
|
-
let n = "bottom",
|
|
118
|
+
}, M = function(t) {
|
|
119
|
+
let n = "bottom", h = "";
|
|
112
120
|
const y = this.placement.split("-");
|
|
113
|
-
y != null && (n = y[0],
|
|
121
|
+
y != null && (n = y[0], h = y[1] || "");
|
|
114
122
|
let a;
|
|
115
|
-
t == null && (t =
|
|
116
|
-
const
|
|
117
|
-
if (
|
|
118
|
-
let w =
|
|
119
|
-
const
|
|
123
|
+
t == null && (t = p('[slot="trigger"]', this));
|
|
124
|
+
const g = p(".l-popover--content", this.root);
|
|
125
|
+
if (g) {
|
|
126
|
+
let w = g.getBoundingClientRect();
|
|
127
|
+
const $ = t.getBoundingClientRect();
|
|
120
128
|
let k = document.documentElement;
|
|
121
|
-
const
|
|
122
|
-
this.width != null && (this.width === "trigger" ? a =
|
|
123
|
-
const B =
|
|
124
|
-
|
|
129
|
+
const R = k.scrollLeft, _ = k.scrollTop;
|
|
130
|
+
this.width != null && (this.width === "trigger" ? a = $.width : a = this.width), a != null && (w.width = a);
|
|
131
|
+
const B = q(
|
|
132
|
+
$,
|
|
125
133
|
w,
|
|
126
134
|
n,
|
|
127
|
-
|
|
135
|
+
h,
|
|
128
136
|
this.offset
|
|
129
|
-
), I =
|
|
130
|
-
|
|
137
|
+
), I = z(
|
|
138
|
+
$,
|
|
131
139
|
w,
|
|
132
140
|
n,
|
|
133
|
-
|
|
141
|
+
h,
|
|
134
142
|
this.offset
|
|
135
|
-
),
|
|
136
|
-
|
|
143
|
+
), T = F(
|
|
144
|
+
$,
|
|
137
145
|
w,
|
|
138
146
|
n,
|
|
139
|
-
|
|
147
|
+
h,
|
|
148
|
+
R,
|
|
140
149
|
_,
|
|
141
|
-
H,
|
|
142
150
|
I,
|
|
143
151
|
B,
|
|
144
152
|
this.offset
|
|
145
153
|
);
|
|
146
|
-
n =
|
|
147
|
-
const
|
|
148
|
-
b[1] !==
|
|
154
|
+
n = T.mainAlign, h = T.crossAlign, a != null && g.style.setProperty("width", `${a}px`);
|
|
155
|
+
const A = `l-popover-${n}${h === "" ? "" : "-" + h}`, b = g.className.split(" ");
|
|
156
|
+
b[1] !== A && (b[1] = `${A}`, g.className = b.join(" "));
|
|
149
157
|
}
|
|
150
|
-
}, s(
|
|
158
|
+
}, s(K, "baseName", "popover");
|
|
151
159
|
export {
|
|
152
|
-
|
|
160
|
+
K as default
|
|
153
161
|
};
|
package/lib/tabbar/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
var L = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var A = (n) => {
|
|
3
3
|
throw TypeError(n);
|
|
4
4
|
};
|
|
5
5
|
var N = (n, a, e) => a in n ? L(n, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[a] = e;
|
|
6
|
-
var f = (n, a, e) => N(n, typeof a != "symbol" ? a + "" : a, e), w = (n, a, e) => a.has(n) ||
|
|
7
|
-
var
|
|
6
|
+
var f = (n, a, e) => N(n, typeof a != "symbol" ? a + "" : a, e), w = (n, a, e) => a.has(n) || A("Cannot " + e);
|
|
7
|
+
var k = (n, a, e) => a.has(n) ? A("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(n) : a.set(n, e);
|
|
8
8
|
var u = (n, a, e) => (w(n, a, "access private method"), e);
|
|
9
9
|
import { isBlank as g, isNumeric as T } from "ph-utils";
|
|
10
10
|
import W from "../base.js";
|
|
11
11
|
import { initAttr as E, parseAttrValue as C } from "../utils/index.js";
|
|
12
|
-
import { addClass as v, removeClass as $, $one as l, create as b, $ as
|
|
12
|
+
import { addClass as v, removeClass as $, $one as l, create as b, $ as x, iterate as j, on as S, off as B, isVisible as D, formatStyle as I, formatClass as M } from "ph-utils/dom";
|
|
13
13
|
function R(n, a, e) {
|
|
14
14
|
let t = n.target, i = "";
|
|
15
15
|
do
|
|
@@ -21,7 +21,7 @@ var p, y, _;
|
|
|
21
21
|
class F extends W {
|
|
22
22
|
constructor() {
|
|
23
23
|
super();
|
|
24
|
-
|
|
24
|
+
k(this, p);
|
|
25
25
|
/**
|
|
26
26
|
* 标签类型:
|
|
27
27
|
* 1. nav - 每一项等分排列, 类似于移动端底部的标签栏
|
|
@@ -76,13 +76,13 @@ class F extends W {
|
|
|
76
76
|
const s = document.createElement("slot");
|
|
77
77
|
t.appendChild(s);
|
|
78
78
|
} else {
|
|
79
|
-
const s =
|
|
79
|
+
const s = x("[l-name]", this);
|
|
80
80
|
s.length > 0 && j(s, (r) => {
|
|
81
81
|
const h = r.getAttribute("l-name");
|
|
82
82
|
if (h) {
|
|
83
83
|
const o = r.cloneNode(!0);
|
|
84
|
-
o.classList.add("l-tabbar-item"), h === this.name && o.classList.add("active");
|
|
85
|
-
const d = l("[l-icon]", o), c =
|
|
84
|
+
o.classList.add("l-tabbar-item"), o.setAttribute("part", "item"), h === this.name && o.classList.add("active");
|
|
85
|
+
const d = l("[l-icon]", o), c = x(":not([l-icon])", o);
|
|
86
86
|
if (d) {
|
|
87
87
|
const m = b("div", {
|
|
88
88
|
class: [
|
|
@@ -170,7 +170,8 @@ p = new WeakSet(), y = function() {
|
|
|
170
170
|
"l-tabbar-item",
|
|
171
171
|
this.name === r.name ? "active" : void 0
|
|
172
172
|
]),
|
|
173
|
-
"l-name": r.name
|
|
173
|
+
"l-name": r.name,
|
|
174
|
+
part: "item"
|
|
174
175
|
}), o = r.icon;
|
|
175
176
|
if (o) {
|
|
176
177
|
const c = b("div", { class: "l-tabbar-item-icon" });
|
package/lib/utils/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { isBlank as $ } from "ph-utils";
|
|
2
|
-
import { iterate as N, transition as
|
|
3
|
-
let E = -1,
|
|
2
|
+
import { iterate as N, transition as c, $ as p } from "ph-utils/dom";
|
|
3
|
+
let E = -1, b = {
|
|
4
4
|
/** 注册应用的前缀 */
|
|
5
5
|
prefix: "l"
|
|
6
6
|
};
|
|
7
|
-
function
|
|
8
|
-
|
|
7
|
+
function P(t) {
|
|
8
|
+
b = { ...b, ...t };
|
|
9
9
|
}
|
|
10
10
|
function k(t, r) {
|
|
11
11
|
const e = Array.isArray(t) ? t : [t];
|
|
12
12
|
for (const i of e) {
|
|
13
|
-
const n = r || `${
|
|
13
|
+
const n = r || `${b.prefix}-${i.baseName}`;
|
|
14
14
|
customElements.get(n) || customElements.define(n, i);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
function V() {
|
|
18
|
-
return `${
|
|
18
|
+
return `${b.prefix}-${++E}`;
|
|
19
19
|
}
|
|
20
20
|
function W(t, r, e) {
|
|
21
21
|
if (t == null) return r;
|
|
@@ -34,16 +34,19 @@ function _(t) {
|
|
|
34
34
|
const { name: i, value: n } = e;
|
|
35
35
|
if (i.startsWith("data-") || i.startsWith("aria-") || i.startsWith("_") || i.startsWith("$"))
|
|
36
36
|
continue;
|
|
37
|
-
const f = i.split("-").map((
|
|
38
|
-
|
|
37
|
+
const f = i.split("-").map((s, u) => u === 0 ? s : s[0].toUpperCase() + s.slice(1)).join("");
|
|
38
|
+
if (Object.hasOwn(t, f)) {
|
|
39
|
+
const s = W(n, t[f], i);
|
|
40
|
+
t[f] = s, i === "value" && (t._resetValue = s);
|
|
41
|
+
}
|
|
39
42
|
}
|
|
40
43
|
}
|
|
41
|
-
function
|
|
44
|
+
function O(t, r) {
|
|
42
45
|
let e = " ";
|
|
43
46
|
return r === !0 ? e = ` ${t}` : typeof r == "string" && !$(r) && (e = ` ${t}="${r}"`), e;
|
|
44
47
|
}
|
|
45
48
|
function B(t) {
|
|
46
|
-
return t.map((e) =>
|
|
49
|
+
return t.map((e) => O(e[0], e[1])).join("");
|
|
47
50
|
}
|
|
48
51
|
function F(t, r) {
|
|
49
52
|
for (const e of r) {
|
|
@@ -57,83 +60,83 @@ function M() {
|
|
|
57
60
|
attributes: !0,
|
|
58
61
|
attributeFilter: ["l-transition-emit"]
|
|
59
62
|
}, e = (f) => {
|
|
60
|
-
for (let
|
|
61
|
-
if (
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
for (let s of f)
|
|
64
|
+
if (s.type === "attributes" && s.attributeName) {
|
|
65
|
+
const u = s.target, y = u.getAttribute(s.attributeName) || "show", a = u.getAttribute("l-transition") || "l", w = u.getAttribute("l-transition-method") || "hide";
|
|
66
|
+
y === "show" ? (u.style.removeProperty("display"), c(u, a, "enter")) : c(u, a, "leave", () => {
|
|
67
|
+
w === "remove" ? u.remove() : u.style.display = "none";
|
|
65
68
|
});
|
|
66
69
|
}
|
|
67
70
|
};
|
|
68
71
|
function i(f) {
|
|
69
|
-
f && f.length > 0 && (t == null && (t = new MutationObserver(e)), N(f, (
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
+
f && f.length > 0 && (t == null && (t = new MutationObserver(e)), N(f, (s) => {
|
|
73
|
+
const u = s.getAttribute("l-transition");
|
|
74
|
+
u && (c(s, u, "enter"), t.observe(s, r));
|
|
72
75
|
}));
|
|
73
76
|
}
|
|
74
77
|
function n(f) {
|
|
75
78
|
f == null && (f = p("[l-transition]"), i(f));
|
|
76
79
|
}
|
|
77
|
-
function
|
|
80
|
+
function o() {
|
|
78
81
|
t && (t.disconnect(), t = void 0);
|
|
79
82
|
}
|
|
80
|
-
return { destroy:
|
|
83
|
+
return { destroy: o, add: i, init: n };
|
|
81
84
|
}
|
|
82
|
-
function
|
|
83
|
-
let
|
|
84
|
-
return e === "top" ?
|
|
85
|
+
function m(t, r, e, i, n = 10) {
|
|
86
|
+
let o = 0;
|
|
87
|
+
return e === "top" ? o = r.height + n : e === "bottom" ? o = -(t.height + n) : (e === "left" || e === "right") && (i === "" ? o = r.height / 2 - t.height / 2 : i === "end" && (o = r.height - t.height)), o;
|
|
85
88
|
}
|
|
86
89
|
function x(t, r, e, i, n = 10) {
|
|
87
|
-
let
|
|
88
|
-
return e === "left" ?
|
|
90
|
+
let o = 0;
|
|
91
|
+
return e === "left" ? o = r.width + n : e === "right" ? o = -(t.width + n) : (e === "top" || e === "bottom") && (i === "" ? o = r.width / 2 - t.width / 2 : i === "end" && (o = r.width - t.width)), o;
|
|
89
92
|
}
|
|
90
|
-
function U(t, r, e, i, n,
|
|
91
|
-
const
|
|
92
|
-
let
|
|
93
|
-
|
|
93
|
+
function U(t, r, e, i, n, o, f, s, u = 10, y = "absolute") {
|
|
94
|
+
const a = window.innerHeight + o - 10, w = window.innerWidth + n - 10;
|
|
95
|
+
let h = t.top + o - s;
|
|
96
|
+
h + r.height > a && (e === "left" || e === "right" ? i = "end" : e = "top", s = m(
|
|
94
97
|
t,
|
|
95
98
|
r,
|
|
96
99
|
e,
|
|
97
100
|
i,
|
|
98
|
-
|
|
99
|
-
),
|
|
100
|
-
let
|
|
101
|
-
return
|
|
101
|
+
u
|
|
102
|
+
), h = t.top + o - s), h < o && (e === "left" || e === "right" ? i = "start" : e = "bottom");
|
|
103
|
+
let d = t.left + n - f;
|
|
104
|
+
return d + r.width > w && (e === "top" || e === "bottom" ? i = "end" : e = "left", f = x(
|
|
102
105
|
t,
|
|
103
106
|
r,
|
|
104
107
|
e,
|
|
105
108
|
i,
|
|
106
|
-
|
|
107
|
-
),
|
|
109
|
+
u
|
|
110
|
+
), d = t.left + n - f), d < n && (e === "top" || e === "bottom" ? i = "start" : e = "right"), y === "fixed" && (s = m(
|
|
108
111
|
t,
|
|
109
112
|
r,
|
|
110
113
|
e,
|
|
111
114
|
i,
|
|
112
|
-
|
|
115
|
+
u
|
|
113
116
|
), f = x(
|
|
114
117
|
t,
|
|
115
118
|
r,
|
|
116
119
|
e,
|
|
117
120
|
i,
|
|
118
|
-
|
|
119
|
-
),
|
|
120
|
-
x:
|
|
121
|
-
y:
|
|
121
|
+
u
|
|
122
|
+
), d = t.left + n - f, h = t.top + o - s), {
|
|
123
|
+
x: d,
|
|
124
|
+
y: h,
|
|
122
125
|
mainAlign: e,
|
|
123
126
|
crossAlign: i
|
|
124
127
|
};
|
|
125
128
|
}
|
|
126
129
|
export {
|
|
127
|
-
|
|
130
|
+
P as config,
|
|
128
131
|
M as createTransition,
|
|
129
132
|
x as getPopoverOffsetX,
|
|
130
|
-
|
|
133
|
+
m as getPopoverOffsetY,
|
|
131
134
|
U as impactDetect,
|
|
132
135
|
_ as initAttr,
|
|
133
136
|
W as parseAttrValue,
|
|
134
137
|
k as regist,
|
|
135
138
|
F as setAttrs,
|
|
136
|
-
|
|
139
|
+
O as tagAttr,
|
|
137
140
|
B as tagAttrs,
|
|
138
141
|
V as useId
|
|
139
142
|
};
|
package/lib/utils/transition.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var c = Object.defineProperty;
|
|
2
2
|
var p = (s, e, t) => e in s ? c(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
3
|
var o = (s, e, t) => p(s, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { initAttr as
|
|
5
|
-
import
|
|
4
|
+
import { initAttr as m } from "./index.js";
|
|
5
|
+
import d from "../base.js";
|
|
6
6
|
import "../message/index.js";
|
|
7
7
|
import { transition as n } from "ph-utils/dom";
|
|
8
8
|
import "ph-utils";
|
|
@@ -10,13 +10,18 @@ import "ph-utils/validator";
|
|
|
10
10
|
import "../button/index.js";
|
|
11
11
|
import "../list/index.js";
|
|
12
12
|
import "ph-utils/theme";
|
|
13
|
-
|
|
13
|
+
import "../button/regist.js";
|
|
14
|
+
import "../tabbar/regist.js";
|
|
15
|
+
import "../popover/regist.js";
|
|
16
|
+
import "../popconfirm/index.js";
|
|
17
|
+
import "../popconfirm/regist.js";
|
|
18
|
+
class u extends d {
|
|
14
19
|
constructor() {
|
|
15
20
|
super();
|
|
16
21
|
/** 应用过滤动画的属性值, 例如: opacity: 0; transform: xx; */
|
|
17
22
|
o(this, "sheetRec");
|
|
18
23
|
o(this, "duration", "0.3s");
|
|
19
|
-
|
|
24
|
+
m(this), this.sheetRec = this._parseSheets(this.getAttr("sheets", "opacity: 0"));
|
|
20
25
|
}
|
|
21
26
|
static get observedAttributes() {
|
|
22
27
|
return ["sheets"];
|
|
@@ -52,7 +57,7 @@ class m extends u {
|
|
|
52
57
|
return t != null && t.assignedNodes().length > 0 ? t.assignedNodes()[0] : null;
|
|
53
58
|
}
|
|
54
59
|
}
|
|
55
|
-
o(
|
|
60
|
+
o(u, "baseName", "transition");
|
|
56
61
|
export {
|
|
57
|
-
|
|
62
|
+
u as Transition
|
|
58
63
|
};
|