litos-ui 0.0.2 → 0.1.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/animation-QfX4RtqD.js +4 -0
- package/lib/base.d.ts +33 -0
- package/lib/base.js +50 -25
- package/lib/browser.d.ts +7 -0
- package/lib/button/index.d.ts +11 -0
- package/lib/button/index.js +69 -15
- package/lib/form/form_events.d.ts +24 -0
- package/lib/form/form_events.js +20 -0
- package/lib/form/form_item.d.ts +6 -0
- package/lib/form/form_item.js +11 -0
- package/lib/form/index.d.ts +16 -0
- package/lib/form/index.js +37 -0
- package/lib/icon/arrow_down.d.ts +6 -0
- package/lib/icon/arrow_down.js +1 -1
- package/lib/icon/base.d.ts +11 -0
- package/lib/icon/base.js +1 -1
- package/lib/icon/caret_bottom.d.ts +5 -0
- package/lib/icon/caret_bottom.js +4 -4
- package/lib/icon/caret_top.d.ts +5 -0
- package/lib/icon/caret_top.js +5 -5
- package/lib/icon/font_icon.d.ts +12 -0
- package/lib/icon/font_icon.js +1 -1
- package/lib/icon/info.d.ts +6 -0
- package/lib/icon/info.js +5 -5
- package/lib/icon/loading.d.ts +5 -0
- package/lib/icon/loading.js +11 -0
- package/lib/icon/mask_close.d.ts +6 -0
- package/lib/icon/mask_close.js +4 -4
- package/lib/icon/search.d.ts +5 -0
- package/lib/icon/search.js +11 -0
- package/lib/icon/success.d.ts +6 -0
- package/lib/icon/success.js +5 -5
- package/lib/icon/warn.d.ts +6 -0
- package/lib/icon/warn.js +3 -3
- package/lib/index-CWq5_ldX.js +4 -0
- package/lib/index-CbaSCp33.js +4 -0
- package/lib/index-JjjljTZ2.js +4 -0
- package/lib/index.d.ts +27 -0
- package/lib/index.js +30 -19
- package/lib/input/index.d.ts +51 -0
- package/lib/input/index.js +118 -0
- package/lib/litos-ui.css +1 -0
- package/lib/litos-ui.min.js +1 -0
- package/lib/message/index.d.ts +25 -0
- package/lib/message/index.js +19 -19
- package/lib/transition.d.ts +15 -0
- package/lib/util.d.ts +40 -0
- package/lib/util.js +43 -17
- package/package.json +21 -14
- package/styles/message.css +4 -4
- package/lib/index-DMj9CroY.js +0 -4
package/lib/base.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export default class BaseComponent extends HTMLElement {
|
|
2
|
+
static baseName: string;
|
|
3
|
+
constructor(shadow?: boolean);
|
|
4
|
+
/**
|
|
5
|
+
* 返回一个数组,表示观察的属性列表
|
|
6
|
+
*/
|
|
7
|
+
static get observedAttributes(): string[] | undefined | null;
|
|
8
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
9
|
+
get shadow(): ShadowRoot;
|
|
10
|
+
createStyle(text: string): void;
|
|
11
|
+
createLink(href: string): void;
|
|
12
|
+
loadStyle(styleNames: string[]): void;
|
|
13
|
+
loadExternalStyle(styleNames: string[]): void;
|
|
14
|
+
setProperty(key: string, value: any): void;
|
|
15
|
+
setProperties(properties: Record<string, any>): void;
|
|
16
|
+
/**
|
|
17
|
+
* 获取属性值
|
|
18
|
+
* @param key 属性名称
|
|
19
|
+
*/
|
|
20
|
+
getAttr(key: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* 获取属性值,同时将值转换为默认值的类型,如果未赋值,则返回默认值;
|
|
23
|
+
* @param key 属性名称
|
|
24
|
+
* @param defaultValue 默认值
|
|
25
|
+
*/
|
|
26
|
+
getAttr(filepath: string, defaultValue: string): string;
|
|
27
|
+
getAttr(filepath: string, defaultValue: number): number;
|
|
28
|
+
getAttr(filepath: string, defaultValue: boolean): boolean;
|
|
29
|
+
getAttr<T extends Record<string, string | number | boolean>>(filepath: string, defaultValue: T): T;
|
|
30
|
+
connectedCallback(): void;
|
|
31
|
+
disconnectedCallback(): void;
|
|
32
|
+
render(): void;
|
|
33
|
+
}
|
package/lib/base.js
CHANGED
|
@@ -1,41 +1,66 @@
|
|
|
1
|
-
import { getAttr as
|
|
2
|
-
const
|
|
3
|
-
const n =
|
|
4
|
-
return n ? typeof n == "function" ? n() : Promise.resolve(n) : new Promise((
|
|
1
|
+
import { getAttr as c } from "ph-utils/dom";
|
|
2
|
+
const o = (a, t, e) => {
|
|
3
|
+
const n = a[t];
|
|
4
|
+
return n ? typeof n == "function" ? n() : Promise.resolve(n) : new Promise((r, s) => {
|
|
5
5
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
|
|
6
|
-
|
|
6
|
+
s.bind(
|
|
7
7
|
null,
|
|
8
8
|
new Error(
|
|
9
|
-
"Unknown variable dynamic import: " +
|
|
9
|
+
"Unknown variable dynamic import: " + t + (t.split("/").length !== e ? ". Note that variables only represent file names one level deep." : "")
|
|
10
10
|
)
|
|
11
11
|
)
|
|
12
12
|
);
|
|
13
13
|
});
|
|
14
|
-
},
|
|
15
|
-
constructor() {
|
|
16
|
-
super(), this.attachShadow({ mode: "open" });
|
|
14
|
+
}, i = class i extends HTMLElement {
|
|
15
|
+
constructor(t = !0) {
|
|
16
|
+
super(), t && this.attachShadow({ mode: "open" });
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 返回一个数组,表示观察的属性列表
|
|
20
|
+
*/
|
|
21
|
+
static get observedAttributes() {
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
// 当属性发生变化时调用的回调函数
|
|
25
|
+
// eslint-disable-next-line
|
|
26
|
+
attributeChangedCallback(t, e, n) {
|
|
17
27
|
}
|
|
18
28
|
get shadow() {
|
|
19
29
|
return this.shadowRoot;
|
|
20
30
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
31
|
+
createStyle(t) {
|
|
32
|
+
const e = document.createElement("style");
|
|
33
|
+
e.textContent = t.trim(), this.shadow.appendChild(e);
|
|
34
|
+
}
|
|
35
|
+
createLink(t) {
|
|
36
|
+
const e = document.createElement("link");
|
|
37
|
+
e.rel = "stylesheet", e.href = t, this.shadow.appendChild(e);
|
|
38
|
+
}
|
|
39
|
+
loadStyle(t) {
|
|
40
|
+
for (let e = 0, n = t.length; e < n; e++) {
|
|
41
|
+
const r = t[e];
|
|
42
|
+
o(/* @__PURE__ */ Object.assign({ "./button/index.css": () => import("./index-JjjljTZ2.js"), "./form/index.css": () => import("./index-CbaSCp33.js"), "./icon/index.css": () => import("./index-DZ2ZMrk1.js"), "./input/index.css": () => import("./index-CWq5_ldX.js") }), `./${r}/index.css`, 3).then((s) => {
|
|
43
|
+
this.createStyle(s.default);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
loadExternalStyle(t) {
|
|
48
|
+
for (let e = 0, n = t.length; e < n; e++) {
|
|
49
|
+
const r = t[e];
|
|
50
|
+
o(/* @__PURE__ */ Object.assign({ "./styles/animation.css": () => import("./animation-QfX4RtqD.js") }), `./styles/${r}.css`, 3).then((s) => {
|
|
51
|
+
this.createStyle(s.default);
|
|
27
52
|
});
|
|
28
53
|
}
|
|
29
54
|
}
|
|
30
|
-
setProperty(
|
|
31
|
-
this[
|
|
55
|
+
setProperty(t, e) {
|
|
56
|
+
this[t] = e;
|
|
32
57
|
}
|
|
33
|
-
setProperties(
|
|
34
|
-
for (const
|
|
35
|
-
this.setProperty(
|
|
58
|
+
setProperties(t) {
|
|
59
|
+
for (const e in t)
|
|
60
|
+
this.setProperty(e, t[e]);
|
|
36
61
|
}
|
|
37
|
-
getAttr(
|
|
38
|
-
return
|
|
62
|
+
getAttr(t, e) {
|
|
63
|
+
return c(this, t, e);
|
|
39
64
|
}
|
|
40
65
|
connectedCallback() {
|
|
41
66
|
this.render();
|
|
@@ -45,8 +70,8 @@ const d = (c, e, t) => {
|
|
|
45
70
|
render() {
|
|
46
71
|
}
|
|
47
72
|
};
|
|
48
|
-
|
|
49
|
-
let
|
|
73
|
+
i.baseName = "base-component";
|
|
74
|
+
let l = i;
|
|
50
75
|
export {
|
|
51
|
-
|
|
76
|
+
l as default
|
|
52
77
|
};
|
package/lib/browser.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import BaseComponent from "../base";
|
|
2
|
+
export default class Button extends BaseComponent {
|
|
3
|
+
static baseName: string;
|
|
4
|
+
constructor();
|
|
5
|
+
static get observedAttributes(): string[];
|
|
6
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
7
|
+
connectedCallback(): void;
|
|
8
|
+
render(): void;
|
|
9
|
+
loadingBody(): string;
|
|
10
|
+
applyColor(color: string, text?: boolean, ghost?: boolean): string;
|
|
11
|
+
}
|
package/lib/button/index.js
CHANGED
|
@@ -1,28 +1,82 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { regist as h, parseAttrValue as g } from "../util.js";
|
|
2
|
+
import p from "../base.js";
|
|
3
|
+
import { $one as d, addClass as u, removeClass as m, formatClass as A } from "ph-utils/dom";
|
|
4
|
+
import y from "../icon/loading.js";
|
|
5
|
+
import { adjust as c } from "ph-utils/color";
|
|
6
|
+
function C(r) {
|
|
7
|
+
let s = "";
|
|
8
|
+
if (Array.isArray(r))
|
|
9
|
+
for (let t = 0, e = r.length; t < e; t++) {
|
|
10
|
+
const n = r[t];
|
|
11
|
+
n && (s += `${n};`);
|
|
12
|
+
}
|
|
13
|
+
else
|
|
14
|
+
for (const t in r)
|
|
15
|
+
r[t] && (s += `${t}:${r[t]};`);
|
|
16
|
+
return s;
|
|
17
|
+
}
|
|
18
|
+
h(y);
|
|
19
|
+
const a = class a extends p {
|
|
4
20
|
constructor() {
|
|
5
|
-
super();
|
|
21
|
+
super(), this.loadExternalStyle(["animation"]);
|
|
22
|
+
}
|
|
23
|
+
// 初始化属性观察器
|
|
24
|
+
static get observedAttributes() {
|
|
25
|
+
return ["loading", "color"];
|
|
26
|
+
}
|
|
27
|
+
// 当属性发生变化时调用的回调函数
|
|
28
|
+
attributeChangedCallback(s, t, e) {
|
|
29
|
+
const n = d(".l-btn", this.shadow);
|
|
30
|
+
if (n) {
|
|
31
|
+
if (s === "loading") {
|
|
32
|
+
const o = g(e, !1, s), l = d(".l-btn", this.shadow);
|
|
33
|
+
o ? (u(l, "l-btn-loading"), l.disabled = !0, l.innerHTML = this.loadingBody()) : (m(l, "l-btn-loading"), l.disabled = this.getAttr("disabled", !1), l.innerHTML = "<slot></slot>");
|
|
34
|
+
} else if (s === "color") {
|
|
35
|
+
const o = this.getAttr("text", !1), l = this.getAttr("ghost", !1);
|
|
36
|
+
n.style.cssText = this.applyColor(e, o, l);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
6
39
|
}
|
|
7
40
|
connectedCallback() {
|
|
8
41
|
this.loadStyle(["button"]), this.render();
|
|
9
42
|
}
|
|
10
43
|
render() {
|
|
11
|
-
const
|
|
44
|
+
const s = this.getAttr("type", "normal"), t = document.createElement("button"), e = this.getAttr("loading", !1), n = this.getAttr("shape", "default"), o = this.getAttr("text", !1), l = this.getAttr("ghost", !1), b = [
|
|
12
45
|
"l-btn",
|
|
13
|
-
`l-btn-${
|
|
46
|
+
`l-btn-${s}`,
|
|
14
47
|
this.getAttr("block", !1) ? "l-btn-block" : "",
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
48
|
+
n === "round" ? "l-btn-round" : "",
|
|
49
|
+
n === "circle" ? "l-btn-circle" : "",
|
|
50
|
+
l ? "l-btn-ghost" : "",
|
|
51
|
+
o ? "l-btn-text" : "",
|
|
52
|
+
e ? "l-btn-loading" : ""
|
|
20
53
|
];
|
|
21
|
-
t.className =
|
|
54
|
+
t.className = A(b), t.disabled = this.getAttr("disabled", !1) || e, t.type = this.getAttr("html-type", "button");
|
|
55
|
+
const i = this.applyColor(this.getAttr("color"), o, l);
|
|
56
|
+
i && (t.style.cssText = i), e ? t.innerHTML = this.loadingBody() : t.innerHTML = "<slot></slot>", t.setAttribute("part", "default"), this.shadow.appendChild(t);
|
|
57
|
+
}
|
|
58
|
+
loadingBody() {
|
|
59
|
+
const s = this.getAttr("loading-text", ""), t = ['<l-loading-icon class="l-rotate-anim"></l-loading-icon>'];
|
|
60
|
+
return s === "" ? t.push("<slot></slot>") : t.push(`<span>${s}</span>`), t.join("");
|
|
61
|
+
}
|
|
62
|
+
applyColor(s, t = !1, e = !1) {
|
|
63
|
+
if (!s) return "";
|
|
64
|
+
const n = c(s, 1, !0), o = c(s, 3, !1);
|
|
65
|
+
return C({
|
|
66
|
+
"--l-btn-border-color": t ? "transparent" : s,
|
|
67
|
+
"--l-btn-text-color": e || t ? s : "#ffffff",
|
|
68
|
+
"--l-btn-hover-text-color": e || t ? n : "#ffffff",
|
|
69
|
+
"--l-btn-background": e || t ? "transparent" : s,
|
|
70
|
+
"--l-btn-active-text-color": e || t ? o : "#ffffff",
|
|
71
|
+
"--l-btn-hover-border-color": t ? "transparent" : n,
|
|
72
|
+
"--l-btn-hover-background": e || t ? "transparent" : n,
|
|
73
|
+
"--l-btn-active-background": e || t ? "transparent" : o,
|
|
74
|
+
"--l-btn-active-border-color": t ? "transparent" : o
|
|
75
|
+
});
|
|
22
76
|
}
|
|
23
77
|
};
|
|
24
|
-
|
|
25
|
-
let
|
|
78
|
+
a.baseName = "button";
|
|
79
|
+
let f = a;
|
|
26
80
|
export {
|
|
27
|
-
|
|
81
|
+
f as default
|
|
28
82
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 添加表单事件监听器。
|
|
3
|
+
* @param formId - 表单的唯一标识符。
|
|
4
|
+
* @param event - 要监听的事件类型,可以是 'attributeChanged' 或 'formSubmitted'。
|
|
5
|
+
* @param cb - 当事件触发时调用的回调函数,接收两个参数:属性名和属性值。
|
|
6
|
+
* 该函数用于将回调函数添加到指定表单ID的事件监听器集合中。
|
|
7
|
+
*/
|
|
8
|
+
export declare function add(formId: string, event: "attributeChanged" | "formSubmitted", cb: (...param: any) => void): void;
|
|
9
|
+
/**
|
|
10
|
+
* 移除指定表单的事件监听器。
|
|
11
|
+
* @param formId - 表单的唯一标识符。
|
|
12
|
+
* @param event - 要移除的事件类型,可以是 'attributeChanged' 或 'formSubmitted'。
|
|
13
|
+
* @param cb - 要移除的事件回调函数,该函数接收两个参数:属性名和属性值。
|
|
14
|
+
* 该函数会从事件存储中移除指定的回调函数,如果某个事件类型下没有更多的回调函数,则删除该事件类型;
|
|
15
|
+
* 如果表单下没有更多的事件类型,则删除该表单;如果事件存储为空,则重置事件存储。
|
|
16
|
+
*/
|
|
17
|
+
export declare function remove(formId: string, event: "attributeChanged" | "formSubmitted", cb: (...params: any) => void): void;
|
|
18
|
+
/**
|
|
19
|
+
* 触发指定表单的事件,并执行所有注册的回调函数。
|
|
20
|
+
* @param formId - 表单的唯一标识符。
|
|
21
|
+
* @param event - 要触发的事件名称。
|
|
22
|
+
* @param params - 要传递给回调函数的参数列表。
|
|
23
|
+
*/
|
|
24
|
+
export declare function emit(formId: string, event: string, ...params: any): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
let i;
|
|
2
|
+
function p(t, e, g) {
|
|
3
|
+
i == null && (i = /* @__PURE__ */ new Map()), i.has(t) || i.set(t, /* @__PURE__ */ new Map([[e, /* @__PURE__ */ new Set()]])), i.get(t).has(e) || i.get(t).set(e, /* @__PURE__ */ new Set()), i.get(t).get(e).add(g);
|
|
4
|
+
}
|
|
5
|
+
function z(t, e, g) {
|
|
6
|
+
var l, a, c, u, f, w;
|
|
7
|
+
(a = (l = i == null ? void 0 : i.get(t)) == null ? void 0 : l.get(e)) == null || a.delete(g), ((u = (c = i == null ? void 0 : i.get(t)) == null ? void 0 : c.get(e)) == null ? void 0 : u.size) == 0 && ((f = i.get(t)) == null || f.delete(e)), ((w = i == null ? void 0 : i.get(t)) == null ? void 0 : w.size) == 0 && i.delete(t), (i == null ? void 0 : i.size) == 0 && (i = void 0);
|
|
8
|
+
}
|
|
9
|
+
function h(t, e, ...g) {
|
|
10
|
+
var a;
|
|
11
|
+
const l = (a = i == null ? void 0 : i.get(t)) == null ? void 0 : a.get(e);
|
|
12
|
+
if (l != null)
|
|
13
|
+
for (const c of l)
|
|
14
|
+
c(...g);
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
p as add,
|
|
18
|
+
h as emit,
|
|
19
|
+
z as remove
|
|
20
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import BaseComponent from "../base";
|
|
2
|
+
export default class Form extends BaseComponent {
|
|
3
|
+
static baseName: string;
|
|
4
|
+
/** 是否行内表单 */
|
|
5
|
+
inline: boolean;
|
|
6
|
+
labelPosition?: "left" | "right" | "top";
|
|
7
|
+
labelWidth?: string;
|
|
8
|
+
formId: string;
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
sharedAttrs: string[];
|
|
11
|
+
constructor();
|
|
12
|
+
static get observedAttributes(): string[];
|
|
13
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
14
|
+
connectedCallback(): void;
|
|
15
|
+
render(): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { formatClass as o, formatStyle as d } from "ph-utils/dom";
|
|
2
|
+
import f from "../base.js";
|
|
3
|
+
import { initAttr as h, parseAttrValue as n } from "../util.js";
|
|
4
|
+
import { random as l } from "ph-utils";
|
|
5
|
+
import { emit as m } from "./form_events.js";
|
|
6
|
+
const i = class i extends f {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(), this.inline = !1, this.labelPosition = "right", this.disabled = !1, this.sharedAttrs = ["disabled", "formId"], this.formId = `l-f${l(3)}-${l(6)}`, h(this);
|
|
9
|
+
}
|
|
10
|
+
static get observedAttributes() {
|
|
11
|
+
return ["disabled"];
|
|
12
|
+
}
|
|
13
|
+
attributeChangedCallback(t, e, a) {
|
|
14
|
+
if (t === "disabled") {
|
|
15
|
+
const s = n(a, !1, t);
|
|
16
|
+
s !== this.disabled && (m(this.formId, "attributeChanged", "form", t, s, this.disabled), this.disabled = s);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
connectedCallback() {
|
|
20
|
+
this.loadStyle(["form"]), super.connectedCallback();
|
|
21
|
+
}
|
|
22
|
+
render() {
|
|
23
|
+
const t = o([
|
|
24
|
+
"l-form",
|
|
25
|
+
this.inline ? "l-form-inline" : void 0,
|
|
26
|
+
`l-form--${this.labelPosition}`
|
|
27
|
+
]), e = d({
|
|
28
|
+
"--l-form-label-width": this.labelWidth ? this.labelWidth : ""
|
|
29
|
+
});
|
|
30
|
+
this.shadow.innerHTML = `<form class="${t}" style="${e}"><slot></slot></form>`;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
i.baseName = "form";
|
|
34
|
+
let r = i;
|
|
35
|
+
export {
|
|
36
|
+
r as default
|
|
37
|
+
};
|
package/lib/icon/arrow_down.js
CHANGED
|
@@ -7,7 +7,7 @@ const a = class a extends t {
|
|
|
7
7
|
return '<path fill="currentColor" d="M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"></path>';
|
|
8
8
|
}
|
|
9
9
|
};
|
|
10
|
-
a.
|
|
10
|
+
a.baseName = "arrow-down-icon";
|
|
11
11
|
let e = a;
|
|
12
12
|
export {
|
|
13
13
|
e as default
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import BaseComponent from "../base";
|
|
2
|
+
export default class BaseIcon extends BaseComponent {
|
|
3
|
+
static baseName: string;
|
|
4
|
+
useLink: boolean;
|
|
5
|
+
viewBox: string;
|
|
6
|
+
constructor();
|
|
7
|
+
connectedCallback(): void;
|
|
8
|
+
render(): void;
|
|
9
|
+
renderChildren(): string;
|
|
10
|
+
createEl(tagName: string): SVGElement;
|
|
11
|
+
}
|
package/lib/icon/base.js
CHANGED
package/lib/icon/caret_bottom.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import a from "./base.js";
|
|
2
|
-
const
|
|
2
|
+
const e = class e extends a {
|
|
3
3
|
renderChildren() {
|
|
4
4
|
return '<path fill="currentColor" d="m192 384 320 384 320-384z"></path>';
|
|
5
5
|
}
|
|
6
6
|
};
|
|
7
|
-
|
|
8
|
-
let
|
|
7
|
+
e.baseName = "caret-bottom-icon";
|
|
8
|
+
let r = e;
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
r as default
|
|
11
11
|
};
|
package/lib/icon/caret_top.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
1
|
+
import r from "./base.js";
|
|
2
|
+
const e = class e extends r {
|
|
3
3
|
renderChildren() {
|
|
4
4
|
return '<path fill="currentColor" d="M512 320 192 704h639.936z"></path>';
|
|
5
5
|
}
|
|
6
6
|
};
|
|
7
|
-
|
|
8
|
-
let
|
|
7
|
+
e.baseName = "caret-top-icon";
|
|
8
|
+
let t = e;
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
t as default
|
|
11
11
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import BaseIcon from "./base";
|
|
2
|
+
export default class FontIcon extends BaseIcon {
|
|
3
|
+
static baseName: string;
|
|
4
|
+
private _t;
|
|
5
|
+
private _start;
|
|
6
|
+
constructor();
|
|
7
|
+
renderChildren(): string;
|
|
8
|
+
render(): void;
|
|
9
|
+
disconnectedCallback(): void;
|
|
10
|
+
connectedCallback(): void;
|
|
11
|
+
_loadIcon(name: string): void;
|
|
12
|
+
}
|
package/lib/icon/font_icon.js
CHANGED
package/lib/icon/info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
const c = class c extends
|
|
1
|
+
import a from "./base.js";
|
|
2
|
+
const c = class c extends a {
|
|
3
3
|
connectedCallback() {
|
|
4
4
|
super.connectedCallback();
|
|
5
5
|
}
|
|
@@ -7,8 +7,8 @@ const c = class c extends e {
|
|
|
7
7
|
return '<path fill="currentColor" d="M512 64a448 448 0 110 896.064A448 448 0 01512 64zm67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344zM590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 01-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 017.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"></path>';
|
|
8
8
|
}
|
|
9
9
|
};
|
|
10
|
-
c.
|
|
11
|
-
let
|
|
10
|
+
c.baseName = "info-icon";
|
|
11
|
+
let e = c;
|
|
12
12
|
export {
|
|
13
|
-
|
|
13
|
+
e as default
|
|
14
14
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import c from "./base.js";
|
|
2
|
+
const r = class r extends c {
|
|
3
|
+
renderChildren() {
|
|
4
|
+
return '<path d="M520.665 64.564a29.244 29.244 0 0 0-7.071-.894c-16.211 0-29.35 13.14-29.35 29.35 0 15.83 12.538 28.696 28.223 29.293v.073c.375 0 .751-.014 1.127-.014 216.493 0 389.629 173.942 389.629 390.433 0 216.496-173.136 388.827-389.63 388.827s-389.63-172.333-389.63-388.829c0-.27.01-.536.01-.804h-.01c0-16.209-13.141-29.35-29.35-29.35s-29.35 13.139-29.35 29.35c0 .055.007.11.007.164-.001.214-.007.425-.007.64 0 247.609 200.722 448.331 448.33 448.331 247.607 0 448.33-200.722 448.33-448.33-.002-245.242-196.917-444.456-441.258-448.24z" fill="currentColor"></path>';
|
|
5
|
+
}
|
|
6
|
+
};
|
|
7
|
+
r.baseName = "loading-icon";
|
|
8
|
+
let t = r;
|
|
9
|
+
export {
|
|
10
|
+
t as default
|
|
11
|
+
};
|
package/lib/icon/mask_close.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import e from "./base.js";
|
|
2
|
-
const
|
|
2
|
+
const r = class r extends e {
|
|
3
3
|
constructor() {
|
|
4
4
|
super(), this.viewBox = "0 0 24 24";
|
|
5
5
|
}
|
|
@@ -7,8 +7,8 @@ const t = class t extends e {
|
|
|
7
7
|
return '<path fill="currentColor" d="M12 23a11 11 0 100-22 11 11 0 000 22zM8.82 7.4L12 10.6l3.18-3.19 1.42 1.42L13.4 12l3.19 3.18-1.42 1.42L12 13.4 8.82 16.6 7.4 15.18 10.6 12 7.4 8.82 8.82 7.4z"></path>';
|
|
8
8
|
}
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
let
|
|
10
|
+
r.baseName = "mask-close-icon";
|
|
11
|
+
let t = r;
|
|
12
12
|
export {
|
|
13
|
-
|
|
13
|
+
t as default
|
|
14
14
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import t from "./base.js";
|
|
2
|
+
const a = class a extends t {
|
|
3
|
+
renderChildren() {
|
|
4
|
+
return '<path fill="currentColor" d="m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"></path>';
|
|
5
|
+
}
|
|
6
|
+
};
|
|
7
|
+
a.baseName = "search-icon";
|
|
8
|
+
let e = a;
|
|
9
|
+
export {
|
|
10
|
+
e as default
|
|
11
|
+
};
|
package/lib/icon/success.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
const e = class e extends
|
|
1
|
+
import t from "./base.js";
|
|
2
|
+
const e = class e extends t {
|
|
3
3
|
connectedCallback() {
|
|
4
4
|
super.connectedCallback();
|
|
5
5
|
}
|
|
@@ -7,8 +7,8 @@ const e = class e extends a {
|
|
|
7
7
|
return '<path fill="currentColor" d="M512 0C228.693333 0 0 228.693333 0 512s228.693333 512 512 512 512-228.693333 512-512S795.306667 0 512 0z m307.2 368.64L467.626667 730.453333c0 3.413333-3.413333 3.413333-3.413334 6.826667-13.653333 13.653333-37.546667 13.653333-51.2 0l-177.493333-177.493333c-13.653333-13.653333-13.653333-37.546667 0-51.2 13.653333-13.653333 37.546667-13.653333 51.2 0l150.186667 153.6 334.506666-341.333334c13.653333-13.653333 37.546667-13.653333 51.2 0 10.24 10.24 10.24 34.133333-3.413333 47.786667z m0 0"></path>';
|
|
8
8
|
}
|
|
9
9
|
};
|
|
10
|
-
e.
|
|
11
|
-
let
|
|
10
|
+
e.baseName = "success-icon";
|
|
11
|
+
let a = e;
|
|
12
12
|
export {
|
|
13
|
-
|
|
13
|
+
a as default
|
|
14
14
|
};
|
package/lib/icon/warn.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
const e = class e extends
|
|
1
|
+
import a from "./base.js";
|
|
2
|
+
const e = class e extends a {
|
|
3
3
|
connectedCallback() {
|
|
4
4
|
super.connectedCallback();
|
|
5
5
|
}
|
|
@@ -7,7 +7,7 @@ const e = class e extends t {
|
|
|
7
7
|
return '<path fill="currentColor" d="M512 1024C229.234 1024 0 794.766 0 512S229.234 0 512 0s512 229.234 512 512-229.234 512-512 512z m-64.853-734.52l19.484 244.906 1.309 16.156c1.251 15.93 15.018 28.644 30.72 28.644h25.571c15.56 0 29.298-12.601 30.663-28.132l1.422-16.668 21.334-244.907c3.214-36.978-24.434-66.844-61.725-66.844h-6.627c-37.462 0-65.138 29.923-62.18 66.844zM512 801.393a66.788 66.788 0 1 0 0-133.575 66.788 66.788 0 0 0 0 133.575z"></path>';
|
|
8
8
|
}
|
|
9
9
|
};
|
|
10
|
-
e.
|
|
10
|
+
e.baseName = "warn-icon";
|
|
11
11
|
let c = e;
|
|
12
12
|
export {
|
|
13
13
|
c as default
|