litos-ui 0.4.0 → 0.6.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.d.ts +2 -2
- package/lib/base.js +2 -1
- package/lib/browser.d.ts +2 -0
- package/lib/button/index.js +10 -11
- package/lib/color_picker/index.d.ts +0 -1
- package/lib/color_picker/index.js +15 -15
- package/lib/form/form_inner.js +25 -25
- package/lib/form/form_item.js +1 -1
- package/lib/form/index.js +1 -1
- package/lib/icon/arrow_left.d.ts +5 -0
- package/lib/icon/arrow_left.js +13 -0
- package/lib/icon/arrow_right.d.ts +5 -0
- package/lib/icon/arrow_right.js +13 -0
- package/lib/icon/arrow_up.d.ts +6 -0
- package/lib/icon/arrow_up.js +16 -0
- package/lib/icon/base.js +13 -13
- package/lib/icon/theme_default.d.ts +6 -0
- package/lib/icon/theme_default.js +16 -0
- package/lib/index-116dRdDj.js +4 -0
- package/lib/index-BUyxD_nH.js +4 -0
- package/lib/{index-1Gw78Uze.js → index-Bl8lRTJd.js} +1 -1
- package/lib/index-DJ70Xyma.js +4 -0
- package/lib/index.d.ts +18 -1
- package/lib/index.js +82 -60
- package/lib/input/index.d.ts +1 -1
- package/lib/input/index.js +14 -14
- package/lib/list/index.js +1 -1
- package/lib/litos-ui.css +1 -1
- package/lib/litos-ui.min.js +1 -1
- package/lib/message/index.js +27 -27
- package/lib/polygon/index.js +1 -1
- package/lib/popover/index.d.ts +34 -0
- package/lib/popover/index.js +153 -0
- package/lib/radio/index.d.ts +1 -0
- package/lib/radio/index.js +61 -49
- package/lib/select_ori/index.js +1 -1
- package/lib/switch/index.d.ts +2 -5
- package/lib/switch/index.js +45 -48
- package/lib/tabbar/index.js +1 -1
- package/lib/theme/index.d.ts +12 -0
- package/lib/theme/index.js +95 -0
- package/lib/theme/theme_color.d.ts +9 -0
- package/lib/theme/theme_color.js +40 -0
- package/lib/utils/clickoutside.d.ts +5 -0
- package/lib/utils/clickoutside.js +22 -0
- package/lib/utils/index.d.ts +88 -0
- package/lib/utils/index.js +139 -0
- package/lib/utils/transition.js +58 -0
- package/package.json +69 -68
- package/styles/animation.css +13 -0
- package/styles/container.css +51 -0
- package/styles/scrollbar.css +23 -0
- package/styles/transition.css +33 -0
- package/lib/event.d.ts +0 -30
- package/lib/index-CPpMuwU3.js +0 -4
- package/lib/transition.d.ts +0 -15
- package/lib/transition.js +0 -52
- package/lib/util.d.ts +0 -42
- package/lib/util.js +0 -67
- /package/lib/{event.js → utils/event.js} +0 -0
package/lib/util.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { isBlank as u } from "ph-utils";
|
|
2
|
-
let m = -1, i = {
|
|
3
|
-
/** 注册应用的前缀 */
|
|
4
|
-
prefix: "l"
|
|
5
|
-
};
|
|
6
|
-
function y(t) {
|
|
7
|
-
i = { ...i, ...t };
|
|
8
|
-
}
|
|
9
|
-
function b(t, n) {
|
|
10
|
-
const e = n || `${i.prefix}-${t.baseName}`;
|
|
11
|
-
customElements.get(e) || customElements.define(e, t);
|
|
12
|
-
}
|
|
13
|
-
function h(t, n = !1) {
|
|
14
|
-
t = t || "l-transition";
|
|
15
|
-
let e = t;
|
|
16
|
-
typeof t == "string" && (e = document.querySelector(t)), e && e.hide(() => {
|
|
17
|
-
n && e.remove();
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
function l() {
|
|
21
|
-
return `${i.prefix}-${++m}`;
|
|
22
|
-
}
|
|
23
|
-
function p(t, n, e) {
|
|
24
|
-
if (t == null) return n;
|
|
25
|
-
switch (typeof n) {
|
|
26
|
-
case "boolean":
|
|
27
|
-
return t === "" || t === "true" || t === "1" || t === e;
|
|
28
|
-
case "number":
|
|
29
|
-
return Number(t);
|
|
30
|
-
default:
|
|
31
|
-
return t;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
function A(t) {
|
|
35
|
-
const n = t.attributes;
|
|
36
|
-
for (const e of n) {
|
|
37
|
-
const { name: r, value: s } = e;
|
|
38
|
-
if (r.startsWith("data-") || r.startsWith("aria-") || r.startsWith("_") || r.startsWith("$"))
|
|
39
|
-
continue;
|
|
40
|
-
const f = r.split("-").map((o, a) => a === 0 ? o : o[0].toUpperCase() + o.slice(1)).join(""), c = p(s, t[f], r);
|
|
41
|
-
t[f] = c, r === "value" && (t._resetValue = c);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
function g(t, n) {
|
|
45
|
-
let e = " ";
|
|
46
|
-
return n === !0 ? e = ` ${t}` : typeof n == "string" && !u(n) && (e = ` ${t}="${n}"`), e;
|
|
47
|
-
}
|
|
48
|
-
function x(t) {
|
|
49
|
-
return t.map((e) => g(e[0], e[1])).join("");
|
|
50
|
-
}
|
|
51
|
-
function N(t, n) {
|
|
52
|
-
for (const e of n) {
|
|
53
|
-
const r = e[1], s = e[0];
|
|
54
|
-
r === !0 ? t.setAttribute(s, "") : typeof r == "string" && !u(r) && t.setAttribute(s, r);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
export {
|
|
58
|
-
y as config,
|
|
59
|
-
h as hideTransition,
|
|
60
|
-
A as initAttr,
|
|
61
|
-
p as parseAttrValue,
|
|
62
|
-
b as regist,
|
|
63
|
-
N as setAttrs,
|
|
64
|
-
g as tagAttr,
|
|
65
|
-
x as tagAttrs,
|
|
66
|
-
l as useId
|
|
67
|
-
};
|
|
File without changes
|