litos-ui 0.17.5 → 0.18.1
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-CTt9qgA7.js +4 -0
- package/lib/base-Dm0WS1pK.js +62 -0
- package/lib/base.js +111 -147
- package/lib/button/index.d.ts +8 -3
- package/lib/button/index.js +2 -137
- package/lib/button-CC5PmAb1.js +146 -0
- package/lib/calendar/index.d.ts +10 -5
- package/lib/calendar/index.js +2 -123
- package/lib/calendar-GpYHNmXG.js +149 -0
- package/lib/carousel/index.js +2 -280
- package/lib/carousel/item.js +2 -15
- package/lib/carousel-dT3FJPQo.js +272 -0
- package/lib/check/checkbox.js +2 -18
- package/lib/check/checkbox_group.js +6 -6
- package/lib/check/radio.js +2 -15
- package/lib/check/radio_group.js +9 -9
- package/lib/check-B0XraJvb.js +73 -0
- package/lib/check-CvGaONEx.js +117 -0
- package/lib/checkbox-DbWsmAaL.js +16 -0
- package/lib/collapse/index.d.ts +18 -11
- package/lib/collapse/index.js +2 -88
- package/lib/collapse/item.d.ts +28 -9
- package/lib/collapse/item.js +2 -115
- package/lib/collapse/types.d.ts +7 -0
- package/lib/collapse-C3IRHLeg.js +104 -0
- package/lib/color_picker/index.js +2 -42
- package/lib/color_picker-D0brKFm-.js +41 -0
- package/lib/date_picker/index.d.ts +23 -0
- package/lib/date_picker/index.js +3 -0
- package/lib/date_picker-DQGoiN8v.js +103 -0
- package/lib/date_picker_ori/index.js +2 -129
- package/lib/date_picker_ori-aRuSSi9D.js +122 -0
- package/lib/description_panel/index.js +2 -66
- package/lib/description_panel-BY2yljeC.js +57 -0
- package/lib/dialog/dialog_container.js +2 -131
- package/lib/dialog/index.js +67 -85
- package/lib/dialog_container-DcN87wj0.js +126 -0
- package/lib/esm-sVEoAVPu.js +244 -0
- package/lib/form/form_item.d.ts +1 -0
- package/lib/form/form_item.js +2 -136
- package/lib/form/index.js +2 -147
- package/lib/form-DdU0yK0k.js +154 -0
- package/lib/form_inner-DR9tyB_r.js +117 -0
- package/lib/form_item-Bv-YafZK.js +137 -0
- package/lib/icon/arrow_down.js +12 -12
- package/lib/icon/arrow_left.js +9 -9
- package/lib/icon/arrow_right.js +9 -9
- package/lib/icon/arrow_up.js +12 -12
- package/lib/icon/base.d.ts +16 -2
- package/lib/icon/base.js +2 -38
- package/lib/icon/calendar.d.ts +5 -0
- package/lib/icon/calendar.js +10 -0
- package/lib/icon/caret_bottom.js +9 -9
- package/lib/icon/caret_top.js +9 -9
- package/lib/icon/close.js +9 -9
- package/lib/icon/close_filled.js +12 -12
- package/lib/icon/d_arrow_left.js +12 -12
- package/lib/icon/d_arrow_right.js +12 -12
- package/lib/icon/font_icon.d.ts +2 -3
- package/lib/icon/font_icon.js +35 -39
- package/lib/icon/info.js +12 -12
- package/lib/icon/loading.js +9 -9
- package/lib/icon/moon.js +12 -12
- package/lib/icon/more.js +12 -12
- package/lib/icon/reduction.js +12 -12
- package/lib/icon/refresh.d.ts +5 -0
- package/lib/icon/refresh.js +10 -0
- package/lib/icon/refresh_left.js +12 -12
- package/lib/icon/refresh_right.js +9 -9
- package/lib/icon/search.js +9 -9
- package/lib/icon/select.js +12 -12
- package/lib/icon/sort.js +9 -9
- package/lib/icon/success.js +12 -12
- package/lib/icon/sun.js +12 -12
- package/lib/icon/theme_default.js +12 -12
- package/lib/icon/warn.js +12 -12
- package/lib/icon/zoom_in.js +12 -12
- package/lib/icon/zoom_out.js +12 -12
- package/lib/image/image_preview.js +2 -104
- package/lib/image/index.js +2 -176
- package/lib/image-COPKk8Jm.js +162 -0
- package/lib/image_preview-CYEup07F.js +92 -0
- package/lib/index.d.ts +5 -81
- package/lib/index.js +78 -169
- package/lib/input/index.d.ts +6 -2
- package/lib/input/index.js +188 -203
- package/lib/input-DjKxcxry.js +4 -0
- package/lib/input_inner-BKJg9n9A.js +4 -0
- package/lib/item-B7Elh5xE.js +14 -0
- package/lib/item-CvoJt3wp.js +60 -0
- package/lib/item-DRsOV_Tc.js +119 -0
- package/lib/list/index.js +2 -58
- package/lib/list-CU7vHS6s.js +51 -0
- package/lib/loading/index.d.ts +3 -2
- package/lib/loading/index.js +109 -127
- package/lib/mask/index.js +2 -105
- package/lib/mask-CEznzwji.js +112 -0
- package/lib/md_input/index.js +2 -60
- package/lib/md_input-DSQx5TMW.js +58 -0
- package/lib/menu/index.d.ts +30 -13
- package/lib/menu/index.js +2 -105
- package/lib/menu/types.d.ts +6 -0
- package/lib/menu/types.js +0 -0
- package/lib/menu-CzV6lOlw.js +224 -0
- package/lib/message/index.js +67 -60
- package/lib/modal/index.js +2 -196
- package/lib/modal/modal_box.js +87 -86
- package/lib/modal-DWyWrN-D.js +192 -0
- package/lib/page_header/index.js +2 -109
- package/lib/page_header-BJkEstRw.js +101 -0
- package/lib/pagination/index.js +2 -248
- package/lib/pagination-5t7AOeFV.js +210 -0
- package/lib/polygon/index.js +2 -27
- package/lib/polygon-C4Ow2lxi.js +20 -0
- package/lib/qrcode/index.d.ts +13 -4
- package/lib/qrcode/index.js +2 -57
- package/lib/qrcode-BKG2MibP.js +64 -0
- package/lib/radio-2mNSYujz.js +13 -0
- package/lib/select/index.js +3 -401
- package/lib/select-CAgggYh7.js +326 -0
- package/lib/select_ori/index.js +47 -50
- package/lib/space/index.js +2 -35
- package/lib/space-Bv-p0DL8.js +38 -0
- package/lib/switch/index.js +2 -50
- package/lib/switch-BaVBi5Ip.js +48 -0
- package/lib/tabbar/index.js +2 -109
- package/lib/tabbar/item.js +2 -58
- package/lib/tabbar-CI1xSj1G.js +96 -0
- package/lib/table/index.js +2 -269
- package/lib/table-DfL2hFqA.js +234 -0
- package/lib/tabs/index.js +38 -42
- package/lib/tag/index.js +2 -72
- package/lib/tag-72DwCkvq.js +76 -0
- package/lib/theme/index.js +2 -89
- package/lib/theme/theme_color.js +22 -26
- package/lib/theme-BRTI2-Yk.js +83 -0
- package/lib/utils/clickoutside.js +18 -18
- package/lib/utils/context_provide.js +21 -21
- package/lib/utils/event.js +13 -18
- package/lib/utils/index.js +55 -58
- package/lib/utils/popover.d.ts +4 -1
- package/lib/utils/popover.js +276 -352
- package/lib/utils/transition.js +33 -31
- package/package.json +14 -14
- package/styles/container.css +4 -0
- package/styles/datepicker.css +55 -0
- package/styles/popover.css +14 -1
- package/lib/animation-DttknHkX.js +0 -4
- package/lib/calendar/langs.js +0 -8
- package/lib/carousel/timer.js +0 -19
- package/lib/check/check.js +0 -118
- package/lib/check/index.js +0 -68
- package/lib/check-CksURvTv.js +0 -4
- package/lib/form/form_inner.js +0 -125
- package/lib/form/types.js +0 -1
- package/lib/index-CrMiSe0x.js +0 -249
- package/lib/index-DY6m9Wbe.js +0 -4
- package/lib/litos-ui.css +0 -1
- package/lib/menu/menu_item.d.ts +0 -6
- package/lib/menu/menu_item.js +0 -21
- package/lib/menu/sub_menu.d.ts +0 -15
- package/lib/menu/sub_menu.js +0 -83
- package/lib/table/types.js +0 -1
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import e from "./base.js";
|
|
2
|
+
import { initAttr as t } from "./utils/index.js";
|
|
3
|
+
import { $one as n, create as r, off as i, on as a } from "ph-utils/dom";
|
|
4
|
+
import { applyTheme as o, getTheme as s } from "ph-utils/theme";
|
|
5
|
+
//#region src/components/theme/index.less?inline
|
|
6
|
+
var c = ":host{box-sizing:border-box;width:auto;display:inline-flex}.l-theme-btn::part(default){--l-btn-background:transparent;--l-btn-hover-background:transparent;--l-btn-text-color:#9ca3af;--l-btn-hover-text-color:#666;width:var(--l-form-control-height,32px);padding:0;font-size:18px}.l-theme-switch.l-switch--checked{background-color:#65757129;border-color:#3c3f44}.l-theme-switch.l-switch--checked::part(action){color:#fff;background-color:#000}html.dark .l-theme-btn{--l-btn-hover-text-color:#fff}", l = [
|
|
7
|
+
{
|
|
8
|
+
value: "auto",
|
|
9
|
+
text: "跟随系统",
|
|
10
|
+
icon: "l-theme-default-icon"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
value: "light",
|
|
14
|
+
text: "浅色模式",
|
|
15
|
+
icon: "l-sun-icon"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
value: "dark",
|
|
19
|
+
text: "深色模式",
|
|
20
|
+
icon: "l-moon-icon"
|
|
21
|
+
}
|
|
22
|
+
], u = class extends e {
|
|
23
|
+
static baseName = "theme";
|
|
24
|
+
type = "button";
|
|
25
|
+
label = "text";
|
|
26
|
+
theme;
|
|
27
|
+
#e;
|
|
28
|
+
connectedCallback() {
|
|
29
|
+
t(this), this.theme = s(), this.loadStyleText(c), super.connectedCallback(), this.#s();
|
|
30
|
+
}
|
|
31
|
+
disconnectedCallback() {
|
|
32
|
+
super.disconnectedCallback(), this.#c();
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
35
|
+
switch (this.type) {
|
|
36
|
+
case "select": return this.#r();
|
|
37
|
+
case "radio": return this.#a();
|
|
38
|
+
case "switch": return this.#i();
|
|
39
|
+
default: return this.#t();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
#t() {
|
|
43
|
+
let e = r("l-button", { class: "l-theme-btn l-theme-inner" });
|
|
44
|
+
return this.#n(e), e;
|
|
45
|
+
}
|
|
46
|
+
#n(e) {
|
|
47
|
+
let t = this.theme === "auto" ? "sun" : "moon";
|
|
48
|
+
e.innerHTML = `<l-${t}-icon></l-${t}-icon>`;
|
|
49
|
+
}
|
|
50
|
+
#r() {
|
|
51
|
+
let e = r("l-select-ori", { class: "l-theme-inner" });
|
|
52
|
+
return e.value = this.theme, e.innerHTML = [
|
|
53
|
+
"<option value=\"auto\">跟随系统</option>",
|
|
54
|
+
"<option value=\"light\">浅色模式</option>",
|
|
55
|
+
"<option value=\"dark\">深色模式</option>"
|
|
56
|
+
].join(""), e;
|
|
57
|
+
}
|
|
58
|
+
#i() {
|
|
59
|
+
let e = r("l-switch", { class: "l-theme-switch l-theme-inner" });
|
|
60
|
+
return e.value = this.theme === "dark", e.innerHTML = "<l-sun-icon slot=\"unchecked-action\"></l-sun-icon><l-moon-icon slot=\"checked-action\"></l-moon-icon>", e;
|
|
61
|
+
}
|
|
62
|
+
#a() {
|
|
63
|
+
let e = r("l-radio", { class: "l-theme-inner" });
|
|
64
|
+
return e.value = this.theme, e.type = "button", e.innerHTML = l.map((e) => this.label === "icon" ? `<${e.icon} radio-value="${e.value}"></${e.icon}>` : `<span radio-value="${e.value}">${e.text}</span>`).join(""), e;
|
|
65
|
+
}
|
|
66
|
+
#o = async (e) => {
|
|
67
|
+
let t;
|
|
68
|
+
if (this.type === "button") t = this.theme === "dark" ? "auto" : "dark";
|
|
69
|
+
else {
|
|
70
|
+
let n = e.target.value;
|
|
71
|
+
t = this.type === "switch" ? n ? "dark" : "light" : n;
|
|
72
|
+
}
|
|
73
|
+
await o(t), this.theme = t, this.type === "button" && this.#n(this.#e), this.dispatchEvent(new CustomEvent("change", { detail: t }));
|
|
74
|
+
};
|
|
75
|
+
#s() {
|
|
76
|
+
this.#e = n(".l-theme-inner", this.root), this.type === "button" ? a(this.#e, "click", this.#o) : a(this.#e, "change", this.#o);
|
|
77
|
+
}
|
|
78
|
+
#c() {
|
|
79
|
+
this.#e &&= (this.type === "button" ? i(this.#e, "click", this.#o) : i(this.#e, "change", this.#o), void 0);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
//#endregion
|
|
83
|
+
export { u as t };
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
f(t, e);
|
|
1
|
+
//#region src/components/utils/clickoutside.ts
|
|
2
|
+
var e = /* @__PURE__ */ new Map();
|
|
3
|
+
function t(t) {
|
|
4
|
+
for (let r of e.values()) for (let e of r) n(t, e);
|
|
6
5
|
}
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
function n(e, t) {
|
|
7
|
+
let n = e.target, r = !n, i = t.el.contains(n), a = t.el === n;
|
|
8
|
+
r || i || a || t.handler(e);
|
|
10
9
|
}
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
function r(n, r) {
|
|
11
|
+
e.has(n) || e.set(n, []);
|
|
12
|
+
let i = e.get(n);
|
|
13
|
+
i && i.push({
|
|
14
|
+
el: n,
|
|
15
|
+
handler: r
|
|
16
|
+
}), e.size === 1 && document.addEventListener("click", t, !0);
|
|
15
17
|
}
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
+
function i(n) {
|
|
19
|
+
e.delete(n), e.size === 0 && document.removeEventListener("click", t, !0);
|
|
18
20
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
u as set
|
|
22
|
-
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { i as remove, r as set };
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
export {
|
|
21
|
-
d as default
|
|
1
|
+
import e from "../base.js";
|
|
2
|
+
import { off as t, on as n } from "ph-utils/dom";
|
|
3
|
+
//#region src/components/utils/context_provide.ts
|
|
4
|
+
var r = class extends e {
|
|
5
|
+
context;
|
|
6
|
+
contextEventName;
|
|
7
|
+
constructor() {
|
|
8
|
+
super(), this.contextEventName = "context-request";
|
|
9
|
+
}
|
|
10
|
+
connectedCallback() {
|
|
11
|
+
super.connectedCallback(), n(this, this.contextEventName, this.contextProvideHandler);
|
|
12
|
+
}
|
|
13
|
+
disconnectedCallback() {
|
|
14
|
+
super.disconnectedCallback(), t(this, this.contextEventName, this.contextProvideHandler);
|
|
15
|
+
}
|
|
16
|
+
contextProvideHandler(e) {
|
|
17
|
+
let { context: t, callback: n } = e.detail;
|
|
18
|
+
t === this.contextEventName && n(this.context);
|
|
19
|
+
}
|
|
22
20
|
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { r as default };
|
package/lib/utils/event.js
CHANGED
|
@@ -1,22 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
//#region src/components/utils/event.ts
|
|
2
|
+
var e;
|
|
3
|
+
function t(t, n, r) {
|
|
4
|
+
e ??= /* @__PURE__ */ new Map(), e.has(t) || e.set(t, new Map([[n, /* @__PURE__ */ new Set()]])), e.get(t).has(n) || e.get(t).set(n, /* @__PURE__ */ new Set()), e.get(t).get(n).add(r);
|
|
4
5
|
}
|
|
5
|
-
function
|
|
6
|
-
|
|
6
|
+
function n(t, n, r) {
|
|
7
|
+
e?.get(t)?.get(n)?.delete(r), e?.get(t)?.get(n)?.size == 0 && e.get(t)?.delete(n), e?.get(t)?.size == 0 && e.delete(t), e?.size == 0 && (e = void 0);
|
|
7
8
|
}
|
|
8
|
-
function
|
|
9
|
-
|
|
9
|
+
function r(t) {
|
|
10
|
+
t == null ? e != null && (e.clear(), e = void 0) : e != null && (e.delete(t), e.size === 0 && (e = void 0));
|
|
10
11
|
}
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
for (const g of o)
|
|
15
|
-
g(...f);
|
|
12
|
+
function i(t, n, ...r) {
|
|
13
|
+
let i = e?.get(t)?.get(n);
|
|
14
|
+
if (i != null) for (let e of i) e(...r);
|
|
16
15
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
l as clear,
|
|
20
|
-
u as emit,
|
|
21
|
-
d as remove
|
|
22
|
-
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { t as add, r as clear, i as emit, n as remove };
|
package/lib/utils/index.js
CHANGED
|
@@ -1,68 +1,65 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { isBlank as e, isNumeric as t } from "ph-utils";
|
|
2
|
+
//#region src/components/utils/index.ts
|
|
3
|
+
var n = -1;
|
|
4
|
+
function r(e, t) {
|
|
5
|
+
let n = Array.isArray(e) ? e : [e];
|
|
6
|
+
for (let e of n) {
|
|
7
|
+
let n = t || `l-${e.baseName}`;
|
|
8
|
+
customElements.get(n) || customElements.define(n, e);
|
|
9
|
+
}
|
|
9
10
|
}
|
|
10
|
-
function
|
|
11
|
-
|
|
11
|
+
function i() {
|
|
12
|
+
return `l-${++n}`;
|
|
12
13
|
}
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
function a(e, t, n) {
|
|
15
|
+
if (e == null) return t;
|
|
16
|
+
switch (typeof t) {
|
|
17
|
+
case "boolean": return [
|
|
18
|
+
"",
|
|
19
|
+
"true",
|
|
20
|
+
"1",
|
|
21
|
+
"on",
|
|
22
|
+
n
|
|
23
|
+
].includes(e);
|
|
24
|
+
case "number": return Number(e);
|
|
25
|
+
default: return e;
|
|
26
|
+
}
|
|
23
27
|
}
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
function o(e) {
|
|
29
|
+
let t = e.attributes;
|
|
30
|
+
for (let n of t) {
|
|
31
|
+
let { name: t, value: r } = n;
|
|
32
|
+
if (t.startsWith("data-") || t.startsWith("aria-") || t.startsWith("_") || t.startsWith("$") || [
|
|
33
|
+
"id",
|
|
34
|
+
"class",
|
|
35
|
+
"style"
|
|
36
|
+
].includes(t)) continue;
|
|
37
|
+
let i = t.split("-").map((e, t) => t === 0 ? e : e[0].toUpperCase() + e.slice(1)).join(""), o = a(r, e[i], t), s = Object.getOwnPropertyNames(e);
|
|
38
|
+
(e._ignoreInitAttrs || []).includes(i) || (t === "value" ? (e[i] = o, e._resetValue = o) : (s.includes(i) || s.includes(`_${i}`)) && (e[i] = o));
|
|
39
|
+
}
|
|
33
40
|
}
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
|
|
41
|
+
function s(t, n) {
|
|
42
|
+
let r = "";
|
|
43
|
+
return n === !0 ? r = ` ${t}` : typeof n == "string" && !e(n) && (r = ` ${t}="${n}"`), r;
|
|
37
44
|
}
|
|
38
|
-
function
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
function c(e) {
|
|
46
|
+
let t = e.map((e) => s(e[0], e[1]));
|
|
47
|
+
return t.length > 0 ? ` ${t.join("")}` : "";
|
|
41
48
|
}
|
|
42
|
-
function
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
49
|
+
function l(t, n) {
|
|
50
|
+
for (let r of n) {
|
|
51
|
+
let n = r[1], i = r[0];
|
|
52
|
+
n === !0 ? t.setAttribute(i, "") : typeof n == "string" && !e(n) && t.setAttribute(i, n);
|
|
53
|
+
}
|
|
47
54
|
}
|
|
48
|
-
function
|
|
49
|
-
|
|
55
|
+
function u(e) {
|
|
56
|
+
return e.replace(/-(\w)/g, (e, t) => t.toUpperCase());
|
|
50
57
|
}
|
|
51
|
-
function
|
|
52
|
-
|
|
58
|
+
function d(e) {
|
|
59
|
+
e && e();
|
|
53
60
|
}
|
|
54
|
-
function
|
|
55
|
-
|
|
61
|
+
function f(e, n = "px") {
|
|
62
|
+
return e && (t(e) ? `${e}${n}` : e);
|
|
56
63
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
W as kebabToCamel,
|
|
60
|
-
l as parseAttrValue,
|
|
61
|
-
y as regist,
|
|
62
|
-
I as setAttrs,
|
|
63
|
-
_ as stopSignal,
|
|
64
|
-
g as tagAttr,
|
|
65
|
-
N as tagAttrs,
|
|
66
|
-
j as unitNumberStr,
|
|
67
|
-
$ as useId
|
|
68
|
-
};
|
|
64
|
+
//#endregion
|
|
65
|
+
export { o as initAttr, u as kebabToCamel, a as parseAttrValue, r as regist, l as setAttrs, d as stopSignal, s as tagAttr, c as tagAttrs, f as unitNumberStr, i as useId };
|
package/lib/utils/popover.d.ts
CHANGED
|
@@ -62,7 +62,10 @@ type PopoverInitProps = {
|
|
|
62
62
|
offset?: number;
|
|
63
63
|
/** 点击 Popover 内具有 data-action 的元素时触发 */
|
|
64
64
|
onPopoverAction?: (action: string, target: HTMLElement) => void;
|
|
65
|
-
|
|
65
|
+
/** 显示/隐藏时触发 */
|
|
66
|
+
onOpenChange?: (isOpen: boolean, popoverElement?: HTMLElement) => void;
|
|
67
|
+
/** 点击 Popover 外部时触发, isReference: 是否点击的是触发区域, isPopover: 是否点击的是 Popover 主体 */
|
|
68
|
+
onOutsideTap?: (e: Event, isReference: boolean, isPopover: boolean) => void;
|
|
66
69
|
disabled?: boolean;
|
|
67
70
|
};
|
|
68
71
|
export declare class Popover {
|