litos-ui 0.18.2 → 0.18.4
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/button/index.d.ts +2 -1
- package/lib/button/index.js +1 -1
- package/lib/{button-CBoYJ9Tt.js → button-CC5NBWtI.js} +23 -23
- package/lib/calendar/index.js +1 -1
- package/lib/carousel/index.js +1 -1
- package/lib/carousel/item.js +1 -1
- package/lib/check/checkbox.js +1 -1
- package/lib/check/checkbox_group.js +1 -1
- package/lib/check/radio.js +1 -1
- package/lib/check/radio_group.js +1 -1
- package/lib/{check-CvGaONEx.js → check-BQWzxdO2.js} +2 -2
- package/lib/{check-B0XraJvb.js → check-CuKgzwRS.js} +2 -2
- package/lib/{checkbox-DbWsmAaL.js → checkbox-CNluBmyo.js} +1 -1
- package/lib/collapse/index.js +1 -1
- package/lib/collapse/item.js +1 -1
- package/lib/{collapse-C3IRHLeg.js → collapse-BRxYoeJx.js} +1 -1
- package/lib/color_picker/index.js +1 -1
- package/lib/{color_picker-DYN8DCng.js → color_picker-fDdSa0hC.js} +2 -2
- package/lib/date_picker/index.js +1 -1
- package/lib/{date_picker-DQGoiN8v.js → date_picker-DHCCvMnX.js} +2 -2
- package/lib/date_picker_ori/index.js +1 -1
- package/lib/{date_picker_ori-aRuSSi9D.js → date_picker_ori-JXqzXaYz.js} +1 -1
- package/lib/description_panel/index.js +1 -1
- package/lib/dialog/dialog_container.js +1 -1
- package/lib/esm-Cir9D6cn.js +270 -0
- package/lib/form/form_item.d.ts +6 -0
- package/lib/form/form_item.js +1 -1
- package/lib/form/index.d.ts +8 -0
- package/lib/form/index.js +1 -1
- package/lib/{form-DdU0yK0k.js → form-uOybauzi.js} +38 -24
- package/lib/{form_inner-DR9tyB_r.js → form_inner-B7IMSpMf.js} +1 -1
- package/lib/form_item-DtqChzc3.js +149 -0
- package/lib/icon/arrow_down.js +1 -1
- package/lib/icon/arrow_left.js +1 -1
- package/lib/icon/arrow_right.js +1 -1
- package/lib/icon/arrow_up.js +1 -1
- package/lib/icon/base.js +1 -1
- package/lib/icon/calendar.js +1 -1
- package/lib/icon/caret_bottom.js +1 -1
- package/lib/icon/caret_top.js +1 -1
- package/lib/icon/close.js +1 -1
- package/lib/icon/close_filled.js +1 -1
- package/lib/icon/d_arrow_left.js +1 -1
- package/lib/icon/d_arrow_right.js +1 -1
- package/lib/icon/font_icon.js +1 -1
- package/lib/icon/info.js +1 -1
- package/lib/icon/loading.js +1 -1
- package/lib/icon/moon.js +1 -1
- package/lib/icon/more.js +1 -1
- package/lib/icon/reduction.js +1 -1
- package/lib/icon/refresh.js +1 -1
- package/lib/icon/refresh_left.js +1 -1
- package/lib/icon/refresh_right.js +1 -1
- package/lib/icon/search.js +1 -1
- package/lib/icon/select.js +1 -1
- package/lib/icon/sort.js +1 -1
- package/lib/icon/success.js +1 -1
- package/lib/icon/sun.js +1 -1
- package/lib/icon/theme_default.js +1 -1
- package/lib/icon/warn.js +1 -1
- package/lib/icon/zoom_in.js +1 -1
- package/lib/icon/zoom_out.js +1 -1
- package/lib/image/image_preview.js +1 -1
- package/lib/image/index.js +1 -1
- package/lib/{image_preview-CYEup07F.js → image_preview-BeJzfEoF.js} +1 -1
- package/lib/index.js +35 -35
- package/lib/input/index.js +11 -5
- package/lib/{item-DRsOV_Tc.js → item-Dq6M7lxw.js} +1 -1
- package/lib/list/index.js +1 -1
- package/lib/{list-CU7vHS6s.js → list-Dz1Ya118.js} +1 -1
- package/lib/loading/index.js +4 -4
- package/lib/mask/index.js +1 -1
- package/lib/md_input/index.js +1 -1
- package/lib/{md_input-DSQx5TMW.js → md_input-DHz8GRs3.js} +1 -1
- package/lib/menu/index.js +1 -1
- package/lib/modal/index.js +1 -1
- package/lib/modal/modal_box.js +3 -3
- package/lib/page_header/index.js +1 -1
- package/lib/pagination/index.js +1 -1
- package/lib/polygon/index.js +1 -1
- package/lib/qrcode/index.js +1 -1
- package/lib/{radio-2mNSYujz.js → radio-C8FTHdm3.js} +1 -1
- package/lib/select/index.js +1 -1
- package/lib/{select-CAgggYh7.js → select-CnwPEFQ3.js} +1 -1
- package/lib/select_ori/index.js +2 -2
- package/lib/space/index.js +1 -1
- package/lib/switch/index.js +1 -1
- package/lib/{switch-BaVBi5Ip.js → switch-DDNxkTiM.js} +1 -1
- package/lib/tabbar/index.js +1 -1
- package/lib/tabbar/item.js +1 -1
- package/lib/table/index.js +1 -1
- package/lib/tag/index.js +1 -1
- package/lib/theme/index.js +1 -1
- package/lib/utils/event.js +1 -1
- package/package.json +65 -65
- package/lib/esm-sVEoAVPu.js +0 -244
- package/lib/form_item-Bv-YafZK.js +0 -137
- /package/lib/{animation-CTt9qgA7.js → animation-DStAHzod.js} +0 -0
- /package/lib/{base-Dm0WS1pK.js → base-LvfO4mmL.js} +0 -0
- /package/lib/{calendar-GpYHNmXG.js → calendar-Clbg3qot.js} +0 -0
- /package/lib/{carousel-dT3FJPQo.js → carousel-Dgirxwzb.js} +0 -0
- /package/lib/{description_panel-BY2yljeC.js → description_panel-DaqVcA6-.js} +0 -0
- /package/lib/{dialog_container-DcN87wj0.js → dialog_container-CcTyfoaD.js} +0 -0
- /package/lib/{image-COPKk8Jm.js → image-BCUhVAFo.js} +0 -0
- /package/lib/{input-UfukfZIy.js → input-DUBlLEXS.js} +0 -0
- /package/lib/{input_inner-BKJg9n9A.js → input_inner-x4GfLGjj.js} +0 -0
- /package/lib/{item-B7Elh5xE.js → item-42bYhAkZ.js} +0 -0
- /package/lib/{item-CvoJt3wp.js → item-CX8C9X57.js} +0 -0
- /package/lib/{mask-CEznzwji.js → mask-BlDl9u8F.js} +0 -0
- /package/lib/{menu-CzV6lOlw.js → menu-BOmVa4xN.js} +0 -0
- /package/lib/{modal-DWyWrN-D.js → modal-cjj3Nw1B.js} +0 -0
- /package/lib/{page_header-BJkEstRw.js → page_header-BfuWJIdd.js} +0 -0
- /package/lib/{pagination-5t7AOeFV.js → pagination-DpOSOFwl.js} +0 -0
- /package/lib/{polygon-C4Ow2lxi.js → polygon-BY1FAACc.js} +0 -0
- /package/lib/{qrcode-BKG2MibP.js → qrcode-Bgr8gJzA.js} +0 -0
- /package/lib/{space-Bv-p0DL8.js → space-BT_dVhhv.js} +0 -0
- /package/lib/{tabbar-CI1xSj1G.js → tabbar-DO0kB58Y.js} +0 -0
- /package/lib/{table-DfL2hFqA.js → table-saZMryiV.js} +0 -0
- /package/lib/{tag-72DwCkvq.js → tag-BtDcKdxo.js} +0 -0
- /package/lib/{theme-BRTI2-Yk.js → theme-DBghUmYD.js} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import e from "./base.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as
|
|
4
|
-
import { $one as
|
|
5
|
-
import
|
|
2
|
+
import { kebabToCamel as t, parseAttrValue as n, unitNumberStr as r } from "./utils/index.js";
|
|
3
|
+
import { n as i } from "./esm-Cir9D6cn.js";
|
|
4
|
+
import { $one as a, formatClass as o, off as s, on as c } from "ph-utils/dom";
|
|
5
|
+
import l from "ph-utils/validator";
|
|
6
6
|
//#region src/components/form/index.less?inline
|
|
7
|
-
var
|
|
7
|
+
var u = ":host{display:block}.l-form{gap:var(--l-form-gap,20px);flex-flow:column;display:flex}.l-form-inline{gap:var(--l-form-gap,20px);flex-flow:wrap;display:flex}.l-form.l-form-inline{--l-form-item-display:flex}.l-form.l-form--left{--l-form-label-align:left}.l-form.l-form--top{--l-form-item-display:grid;--l-form-label-align:left;--l-form-label-empty-display:none;grid-template-columns:1fr}", d = class extends e {
|
|
8
8
|
static baseName = "form";
|
|
9
9
|
validator;
|
|
10
10
|
_data;
|
|
@@ -12,12 +12,12 @@ var l = ":host{display:block}.l-form{gap:var(--l-form-gap,20px);flex-flow:column
|
|
|
12
12
|
errors;
|
|
13
13
|
resetCtx;
|
|
14
14
|
constructor() {
|
|
15
|
-
super(), this._state = {
|
|
15
|
+
super(), this.version = 2, this._state = {
|
|
16
16
|
inline: !1,
|
|
17
17
|
labelPosition: "right",
|
|
18
18
|
labelWidth: "80px",
|
|
19
19
|
novalidate: !1
|
|
20
|
-
}, this.validator = new
|
|
20
|
+
}, this.validator = new l([]), this.context = i({ innerBlock: !1 }), this.errors = i({}), this.resetCtx = i(0);
|
|
21
21
|
}
|
|
22
22
|
static get observedAttributes() {
|
|
23
23
|
return [
|
|
@@ -25,49 +25,57 @@ var l = ":host{display:block}.l-form{gap:var(--l-form-gap,20px);flex-flow:column
|
|
|
25
25
|
"inner-block",
|
|
26
26
|
"inline",
|
|
27
27
|
"novalidate",
|
|
28
|
-
"label-width"
|
|
28
|
+
"label-width",
|
|
29
|
+
"label-height"
|
|
29
30
|
];
|
|
30
31
|
}
|
|
31
|
-
attributeChanged(e,
|
|
32
|
+
attributeChanged(e, i, a) {
|
|
32
33
|
switch (e) {
|
|
33
34
|
case "label-position":
|
|
34
|
-
this._state.labelPosition =
|
|
35
|
+
this._state.labelPosition = a;
|
|
35
36
|
break;
|
|
36
37
|
case "inner-block":
|
|
37
|
-
let
|
|
38
|
-
this.context({ innerBlock:
|
|
38
|
+
let i = n(a, !1, e);
|
|
39
|
+
this.context({ innerBlock: i });
|
|
39
40
|
break;
|
|
40
41
|
case "label-width":
|
|
41
|
-
|
|
42
|
+
case "label-height":
|
|
43
|
+
this._state[t(e)] = r(a);
|
|
42
44
|
break;
|
|
43
45
|
default:
|
|
44
|
-
let
|
|
45
|
-
this._state[e] =
|
|
46
|
+
let o = n(a, !1, e);
|
|
47
|
+
this._state[e] = o;
|
|
46
48
|
break;
|
|
47
49
|
}
|
|
48
50
|
}
|
|
49
51
|
updateDOM(e) {
|
|
50
52
|
if (e.has("label-position") || e.has("inline")) {
|
|
51
|
-
let e =
|
|
52
|
-
e && (e.className =
|
|
53
|
+
let e = a("form", this.root);
|
|
54
|
+
e && (e.className = o([
|
|
53
55
|
"l-form",
|
|
54
56
|
this._state.inline ? "l-form-inline" : void 0,
|
|
55
57
|
`l-form--${this._state.labelPosition}`
|
|
56
58
|
]));
|
|
57
59
|
}
|
|
58
|
-
e.has("label-width") && (this._state.labelWidth ? this.style.setProperty("--l-form-label-width", this._state.labelWidth) : this.style.removeProperty("--l-form-label-width"));
|
|
60
|
+
e.has("label-width") && (this._state.labelWidth ? this.style.setProperty("--l-form-label-width", this._state.labelWidth) : this.style.removeProperty("--l-form-label-width")), e.has("label-height") && (this._state.labelHeight ? this.style.setProperty("--l-form-label-height", this._state.labelHeight) : this.style.removeProperty("--l-form-label-height"));
|
|
59
61
|
}
|
|
60
62
|
connectedCallback() {
|
|
61
|
-
|
|
63
|
+
c(this, "form-context-request", this._provide), super.connectedCallback();
|
|
62
64
|
}
|
|
63
65
|
afterInit() {
|
|
64
|
-
|
|
66
|
+
c(this, "form-rule-change", this.ruleChange), c(this, "form-value-change", this._valueChange), c(this, "form-action", this._formAction);
|
|
65
67
|
}
|
|
66
68
|
disconnectedCallback() {
|
|
67
|
-
this.validator = void 0,
|
|
69
|
+
this.validator = void 0, s(this, "form-rule-change", this.ruleChange), s(this, "form-value-change", this._valueChange), s(this, "form-context-request", this._provide), s(this, "form-action", this._formAction), super.disconnectedCallback();
|
|
70
|
+
}
|
|
71
|
+
render_v2() {
|
|
72
|
+
return {
|
|
73
|
+
style: [u],
|
|
74
|
+
template: this.render()
|
|
75
|
+
};
|
|
68
76
|
}
|
|
69
77
|
render() {
|
|
70
|
-
let e =
|
|
78
|
+
let e = o([
|
|
71
79
|
"l-form",
|
|
72
80
|
this._state.inline ? "l-form-inline" : void 0,
|
|
73
81
|
`l-form--${this._state.labelPosition}`
|
|
@@ -77,6 +85,12 @@ var l = ":host{display:block}.l-form{gap:var(--l-form-gap,20px);flex-flow:column
|
|
|
77
85
|
ruleChange = (e) => {
|
|
78
86
|
e.stopPropagation(), this.validator.addSchema(e.detail);
|
|
79
87
|
};
|
|
88
|
+
addSchemas(e) {
|
|
89
|
+
this.validator.addSchemas(e);
|
|
90
|
+
}
|
|
91
|
+
addSchema(e) {
|
|
92
|
+
this.validator.addSchema(e);
|
|
93
|
+
}
|
|
80
94
|
_provide(e) {
|
|
81
95
|
let { context: t, callback: n } = e.detail;
|
|
82
96
|
t === "form-context-request" && n(this.context, this.errors, this.resetCtx);
|
|
@@ -138,7 +152,7 @@ var l = ":host{display:block}.l-form{gap:var(--l-form-gap,20px);flex-flow:column
|
|
|
138
152
|
}
|
|
139
153
|
async validate() {
|
|
140
154
|
try {
|
|
141
|
-
return await this.validator.validate(this._data), this.errors({}), Promise.resolve(!0);
|
|
155
|
+
return await this.validator.validate(this._data || {}), this.errors({}), Promise.resolve(!0);
|
|
142
156
|
} catch (e) {
|
|
143
157
|
return this.errors(e.detail), Promise.resolve(!1);
|
|
144
158
|
}
|
|
@@ -151,4 +165,4 @@ var l = ":host{display:block}.l-form{gap:var(--l-form-gap,20px);flex-flow:column
|
|
|
151
165
|
}
|
|
152
166
|
};
|
|
153
167
|
//#endregion
|
|
154
|
-
export {
|
|
168
|
+
export { d as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import e from "./base.js";
|
|
2
2
|
import { parseAttrValue as t, stopSignal as n } from "./utils/index.js";
|
|
3
|
-
import { t as r } from "./esm-
|
|
3
|
+
import { t as r } from "./esm-Cir9D6cn.js";
|
|
4
4
|
import { getAttr as i } from "ph-utils/dom";
|
|
5
5
|
//#region src/components/form/form_inner.ts
|
|
6
6
|
var a = class extends e {
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { kebabToCamel as e, parseAttrValue as t, stopSignal as n, unitNumberStr as r } from "./utils/index.js";
|
|
2
|
+
import { n as i, t as a } from "./esm-Cir9D6cn.js";
|
|
3
|
+
import o from "./utils/context_provide.js";
|
|
4
|
+
import { $$ as s, $one as c, addClass as l, removeClass as u } from "ph-utils/dom";
|
|
5
|
+
//#region src/components/form/form_item.less?inline
|
|
6
|
+
var d = ":host{display:var(--l-form-item-display,flex);font-size:14px}.l-form-item__label{text-align:var(--l-form-label-align,right);width:var(--l-form-label-width,auto);height:var(--l-form-label-height,var(--l-form-control-height,32px));line-height:var(--l-form-label-height,var(--l-form-control-height,32px));color:#606266;box-sizing:border-box;padding:0 10px 0 0;display:inline-block}.l-form-item__label:empty{display:var(--l-form-label-empty-display,inline-block)}:host(.is-required) .l-form-item__label:before{content:\"*\";color:var(--l-warn-color,#f56c6c);vertical-align:middle;margin-right:4px}.l-form-item__content{flex:1;align-items:center;display:flex;position:relative}.l-form-item__error{color:var(--nt-error-color,#ed3f13);padding-top:3px;font-size:12px;line-height:1;position:absolute;top:100%;left:0}:host(.l-form-item--left){--l-form-label-align:left}:host(.l-form-item--top){--l-form-item-display:grid;--l-form-label-align:left;--l-form-label-empty-display:none;grid-template-columns:1fr}", f = class extends o {
|
|
7
|
+
static baseName = "form-item";
|
|
8
|
+
formErrors;
|
|
9
|
+
_errorSignalStop;
|
|
10
|
+
constructor() {
|
|
11
|
+
super(), this.version = 2, this.contextEventName = "form-item-context-request", this._state = {
|
|
12
|
+
labelPosition: "right",
|
|
13
|
+
required: !1
|
|
14
|
+
}, this.context = i({ innerBlock: !1 });
|
|
15
|
+
}
|
|
16
|
+
static get observedAttributes() {
|
|
17
|
+
return [
|
|
18
|
+
"error",
|
|
19
|
+
"label",
|
|
20
|
+
"required",
|
|
21
|
+
"inner-block",
|
|
22
|
+
"prop",
|
|
23
|
+
"label-position",
|
|
24
|
+
"verify",
|
|
25
|
+
"pattern",
|
|
26
|
+
"validity",
|
|
27
|
+
"label-width",
|
|
28
|
+
"label-height"
|
|
29
|
+
];
|
|
30
|
+
}
|
|
31
|
+
attributeChanged(n, i, a) {
|
|
32
|
+
switch (n) {
|
|
33
|
+
case "error":
|
|
34
|
+
case "label":
|
|
35
|
+
case "verify":
|
|
36
|
+
case "pattern":
|
|
37
|
+
case "validity":
|
|
38
|
+
this._state[n] = a;
|
|
39
|
+
break;
|
|
40
|
+
case "label-position":
|
|
41
|
+
this._state.labelPosition = a;
|
|
42
|
+
break;
|
|
43
|
+
case "inner-block":
|
|
44
|
+
let i = t(a, !1, n);
|
|
45
|
+
this.context({ innerBlock: i });
|
|
46
|
+
break;
|
|
47
|
+
case "required":
|
|
48
|
+
let o = t(a, !1, n);
|
|
49
|
+
this._state.required = o;
|
|
50
|
+
break;
|
|
51
|
+
case "prop":
|
|
52
|
+
this._state.prop = a, this.context({
|
|
53
|
+
...this.context(),
|
|
54
|
+
prop: a
|
|
55
|
+
});
|
|
56
|
+
break;
|
|
57
|
+
case "label-width":
|
|
58
|
+
case "label-height":
|
|
59
|
+
this._state[e(n)] = r(a);
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
updateDOM(e) {
|
|
64
|
+
e.has("required") && this._updateRequired(), e.has("label") && this._updateLabel(), e.has("error") && this._updateError(), e.has("label-width") && (this._state.labelWidth ? this.style.setProperty("--l-form-label-width", this._state.labelWidth) : this.style.removeProperty("--l-form-label-width")), e.has("label-height") && (this._state.labelHeight ? this.style.setProperty("--l-form-label-height", this._state.labelHeight) : this.style.removeProperty("--l-form-label-height"));
|
|
65
|
+
}
|
|
66
|
+
connectedCallback() {
|
|
67
|
+
super.connectedCallback(), this._updateRequired(), this._parseSchema(), this.emitInject("form-context-request", ((e, t) => {
|
|
68
|
+
this.formErrors = t;
|
|
69
|
+
})), this._errorSignalStop = a(() => {
|
|
70
|
+
let e = this.context().prop, t = this.formErrors ? this.formErrors() : null;
|
|
71
|
+
e && t && (this._state.error = t[e], this._updateError());
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
beforeDestroy() {
|
|
75
|
+
this._errorSignalStop = n(this._errorSignalStop);
|
|
76
|
+
}
|
|
77
|
+
setRules(e) {
|
|
78
|
+
let t = this._state.prop;
|
|
79
|
+
if (t) {
|
|
80
|
+
let n = {
|
|
81
|
+
...e,
|
|
82
|
+
key: t
|
|
83
|
+
};
|
|
84
|
+
this._updateRules(n);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
render_v2() {
|
|
88
|
+
return {
|
|
89
|
+
template: this.render(),
|
|
90
|
+
style: [d]
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
render() {
|
|
94
|
+
this.classList.add(`l-form-item--${this._state.labelPosition}`);
|
|
95
|
+
let e = document.createDocumentFragment();
|
|
96
|
+
this._state.label != null && e.appendChild(s("label", {
|
|
97
|
+
class: "l-form-item__label",
|
|
98
|
+
textContent: this._state.label
|
|
99
|
+
}));
|
|
100
|
+
let t = s("div", { class: "l-form-item__content" }), n = s("slot");
|
|
101
|
+
return t.appendChild(n), this._state.error && t.appendChild(s("div", {
|
|
102
|
+
class: "l-form-item__error",
|
|
103
|
+
textContent: this._state.error
|
|
104
|
+
})), e.appendChild(t), e;
|
|
105
|
+
}
|
|
106
|
+
_updateRequired() {
|
|
107
|
+
this._state.required ? l(this, "is-required") : u(this, "is-required");
|
|
108
|
+
}
|
|
109
|
+
_parseSchema() {
|
|
110
|
+
let e = this.context().prop;
|
|
111
|
+
if (e) {
|
|
112
|
+
let t = [], n = this._state.verify;
|
|
113
|
+
n && (t = n.split("|"));
|
|
114
|
+
let r = this._state.pattern;
|
|
115
|
+
r && t.push(new RegExp(r));
|
|
116
|
+
let i = {
|
|
117
|
+
key: e,
|
|
118
|
+
required: this._state.required,
|
|
119
|
+
message: this._state.validity,
|
|
120
|
+
rules: t
|
|
121
|
+
};
|
|
122
|
+
this._updateRules(i);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
_updateError() {
|
|
126
|
+
if (this._state.error ? l(this, "is-error") : u(this, "is-error"), !this.rendered) return;
|
|
127
|
+
let e = c(".l-form-item__error", this.root);
|
|
128
|
+
if (e) this._state.error ? e.textContent = this._state.error : e.remove();
|
|
129
|
+
else if (this._state.error) {
|
|
130
|
+
e = document.createElement("div"), e.className = "l-form-item__error", e.textContent = this._state.error;
|
|
131
|
+
let t = c(".l-form-item__content", this.root);
|
|
132
|
+
t && t.appendChild(e);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
_updateLabel() {
|
|
136
|
+
if (!this.rendered) return;
|
|
137
|
+
let e = c(".l-form-item__label", this.root);
|
|
138
|
+
e == null ? this._state.label != null && (e = document.createElement("div"), e.className = "l-form-item__label", e.textContent = this._state.label, this.root.prepend(e)) : this._state.label == null ? e.remove() : e.textContent = this._state.label;
|
|
139
|
+
}
|
|
140
|
+
_updateRules(e) {
|
|
141
|
+
this.emit("form-rule-change", {
|
|
142
|
+
bubbles: !0,
|
|
143
|
+
composed: !0,
|
|
144
|
+
detail: e
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
//#endregion
|
|
149
|
+
export { f as t };
|
package/lib/icon/arrow_down.js
CHANGED
package/lib/icon/arrow_left.js
CHANGED
package/lib/icon/arrow_right.js
CHANGED
package/lib/icon/arrow_up.js
CHANGED
package/lib/icon/base.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../base-
|
|
1
|
+
import { t as e } from "../base-LvfO4mmL.js";
|
|
2
2
|
export { e as default };
|
package/lib/icon/calendar.js
CHANGED
package/lib/icon/caret_bottom.js
CHANGED
package/lib/icon/caret_top.js
CHANGED
package/lib/icon/close.js
CHANGED
package/lib/icon/close_filled.js
CHANGED
package/lib/icon/d_arrow_left.js
CHANGED
package/lib/icon/font_icon.js
CHANGED
package/lib/icon/info.js
CHANGED
package/lib/icon/loading.js
CHANGED
package/lib/icon/moon.js
CHANGED
package/lib/icon/more.js
CHANGED
package/lib/icon/reduction.js
CHANGED
package/lib/icon/refresh.js
CHANGED
package/lib/icon/refresh_left.js
CHANGED
package/lib/icon/search.js
CHANGED
package/lib/icon/select.js
CHANGED
package/lib/icon/sort.js
CHANGED
package/lib/icon/success.js
CHANGED
package/lib/icon/sun.js
CHANGED
package/lib/icon/warn.js
CHANGED
package/lib/icon/zoom_in.js
CHANGED
package/lib/icon/zoom_out.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../image_preview-
|
|
1
|
+
import { t as e } from "../image_preview-BeJzfEoF.js";
|
|
2
2
|
export { e as default };
|
package/lib/image/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../image-
|
|
1
|
+
import { t as e } from "../image-BCUhVAFo.js";
|
|
2
2
|
export { e as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./mask-
|
|
1
|
+
import { t as e } from "./mask-BlDl9u8F.js";
|
|
2
2
|
import { $$ as t, $one as n, off as r, on as i } from "ph-utils/dom";
|
|
3
3
|
//#region src/components/image/image_preview.less?inline
|
|
4
4
|
var a = ".l-image-preview--container{justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:relative}.l-image-preview__btn,.l-image-preview-operations{background-color:#606666;justify-content:center;align-items:center;display:flex}.l-image-preview__btn{z-index:1;opacity:.8;cursor:pointer;color:#fff;background-color:#606666;border:none;border-radius:50%;outline:none;justify-content:center;align-items:center;width:40px;height:40px;font-size:20px;transition:color .3s ease-in-out;display:flex;position:absolute}.l-image-preview__btn:hover{color:var(--l-primary-color,#4998f6)}.l-image-preview__close{top:30px;right:30px}.l-image-preview__prev,.l-image-preview__next{top:50%;transform:translateY(-50%)}.l-image-preview__prev{left:30px}.l-image-preview__next{right:30px}.l-image-preview-footer{z-index:1;flex-direction:column;align-items:center;display:flex;position:absolute;bottom:30px;left:50%;transform:translate(-50%)}.l-image-preview-progress{color:#fff;margin-bottom:10px}.l-image-preview-operations{cursor:default;border-radius:20px;padding:0 25px}.l-image-preview-operations .l-image-preview__btn{width:40px;position:static}.l-image-preview-img{vertical-align:middle;transform-origin:50%;user-select:none;z-index:0;max-width:calc(100vw - 40px);max-height:calc(100vh - 200px);transition:transform .25s}", o = class extends e {
|
package/lib/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import e from "./base.js";
|
|
2
2
|
import { initAttr as t, kebabToCamel as n, parseAttrValue as r, regist as i, setAttrs as a, stopSignal as o, tagAttr as s, tagAttrs as c, unitNumberStr as l, useId as u } from "./utils/index.js";
|
|
3
3
|
import { remove as d, set as f } from "./utils/clickoutside.js";
|
|
4
|
-
import { t as p } from "./base-
|
|
4
|
+
import { t as p } from "./base-LvfO4mmL.js";
|
|
5
5
|
import m from "./icon/close_filled.js";
|
|
6
6
|
import h from "./icon/success.js";
|
|
7
7
|
import g from "./icon/warn.js";
|
|
8
8
|
import _ from "./icon/info.js";
|
|
9
9
|
import v from "./message/index.js";
|
|
10
10
|
import y from "./dialog/index.js";
|
|
11
|
-
import { t as b } from "./dialog_container-
|
|
11
|
+
import { t as b } from "./dialog_container-CcTyfoaD.js";
|
|
12
12
|
import x from "./loading/index.js";
|
|
13
13
|
import S from "./tabs/index.js";
|
|
14
|
-
import { t as C } from "./modal-
|
|
14
|
+
import { t as C } from "./modal-cjj3Nw1B.js";
|
|
15
15
|
import w from "./icon/arrow_down.js";
|
|
16
16
|
import T from "./icon/arrow_left.js";
|
|
17
17
|
import E from "./icon/arrow_right.js";
|
|
@@ -37,42 +37,42 @@ import G from "./icon/zoom_out.js";
|
|
|
37
37
|
import K from "./icon/select.js";
|
|
38
38
|
import q from "./icon/calendar.js";
|
|
39
39
|
import J from "./icon/refresh.js";
|
|
40
|
-
import { t as Y } from "./form-
|
|
41
|
-
import { t as X } from "./form_item-
|
|
40
|
+
import { t as Y } from "./form-uOybauzi.js";
|
|
41
|
+
import { t as X } from "./form_item-DtqChzc3.js";
|
|
42
42
|
import Z from "./check/radio_group.js";
|
|
43
|
-
import { t as Q } from "./radio-
|
|
44
|
-
import { t as $ } from "./checkbox-
|
|
43
|
+
import { t as Q } from "./radio-C8FTHdm3.js";
|
|
44
|
+
import { t as $ } from "./checkbox-CNluBmyo.js";
|
|
45
45
|
import ee from "./check/checkbox_group.js";
|
|
46
|
-
import { t as te } from "./button-
|
|
46
|
+
import { t as te } from "./button-CC5NBWtI.js";
|
|
47
47
|
import ne from "./input/index.js";
|
|
48
48
|
import re from "./select_ori/index.js";
|
|
49
|
-
import { t as ie } from "./switch-
|
|
50
|
-
import { t as ae } from "./md_input-
|
|
51
|
-
import { t as oe } from "./select-
|
|
49
|
+
import { t as ie } from "./switch-DDNxkTiM.js";
|
|
50
|
+
import { t as ae } from "./md_input-DHz8GRs3.js";
|
|
51
|
+
import { t as oe } from "./select-CnwPEFQ3.js";
|
|
52
52
|
import { Popover as se, autoUpdate as ce, createPopoverObserver as le, getOverflowAncestors as ue, popconfirmProps as de, updatePosition as fe } from "./utils/popover.js";
|
|
53
|
-
import { t as pe } from "./date_picker-
|
|
54
|
-
import { t as me } from "./date_picker_ori-
|
|
55
|
-
import { t as he } from "./color_picker-
|
|
56
|
-
import { t as ge } from "./list-
|
|
57
|
-
import { t as _e } from "./polygon-
|
|
58
|
-
import { t as ve } from "./tabbar-
|
|
59
|
-
import { t as ye } from "./item-
|
|
60
|
-
import { t as be } from "./theme-
|
|
53
|
+
import { t as pe } from "./date_picker-DHCCvMnX.js";
|
|
54
|
+
import { t as me } from "./date_picker_ori-JXqzXaYz.js";
|
|
55
|
+
import { t as he } from "./color_picker-fDdSa0hC.js";
|
|
56
|
+
import { t as ge } from "./list-Dz1Ya118.js";
|
|
57
|
+
import { t as _e } from "./polygon-BY1FAACc.js";
|
|
58
|
+
import { t as ve } from "./tabbar-DO0kB58Y.js";
|
|
59
|
+
import { t as ye } from "./item-CX8C9X57.js";
|
|
60
|
+
import { t as be } from "./theme-DBghUmYD.js";
|
|
61
61
|
import xe from "./theme/theme_color.js";
|
|
62
|
-
import { t as Se } from "./menu-
|
|
63
|
-
import { t as Ce } from "./carousel-
|
|
64
|
-
import { t as we } from "./item-
|
|
65
|
-
import { t as Te } from "./qrcode-
|
|
66
|
-
import { t as Ee } from "./description_panel-
|
|
67
|
-
import { t as De } from "./pagination-
|
|
68
|
-
import { t as Oe } from "./mask-
|
|
69
|
-
import { t as ke } from "./page_header-
|
|
70
|
-
import { t as Ae } from "./tag-
|
|
71
|
-
import { t as je } from "./collapse-
|
|
72
|
-
import { t as Me } from "./item-
|
|
73
|
-
import { t as Ne } from "./image-
|
|
74
|
-
import { t as Pe } from "./image_preview-
|
|
75
|
-
import { t as Fe } from "./table-
|
|
76
|
-
import { t as Ie } from "./space-
|
|
77
|
-
import { t as Le } from "./calendar-
|
|
62
|
+
import { t as Se } from "./menu-BOmVa4xN.js";
|
|
63
|
+
import { t as Ce } from "./carousel-Dgirxwzb.js";
|
|
64
|
+
import { t as we } from "./item-42bYhAkZ.js";
|
|
65
|
+
import { t as Te } from "./qrcode-Bgr8gJzA.js";
|
|
66
|
+
import { t as Ee } from "./description_panel-DaqVcA6-.js";
|
|
67
|
+
import { t as De } from "./pagination-DpOSOFwl.js";
|
|
68
|
+
import { t as Oe } from "./mask-BlDl9u8F.js";
|
|
69
|
+
import { t as ke } from "./page_header-BfuWJIdd.js";
|
|
70
|
+
import { t as Ae } from "./tag-BtDcKdxo.js";
|
|
71
|
+
import { t as je } from "./collapse-BRxYoeJx.js";
|
|
72
|
+
import { t as Me } from "./item-Dq6M7lxw.js";
|
|
73
|
+
import { t as Ne } from "./image-BCUhVAFo.js";
|
|
74
|
+
import { t as Pe } from "./image_preview-BeJzfEoF.js";
|
|
75
|
+
import { t as Fe } from "./table-saZMryiV.js";
|
|
76
|
+
import { t as Ie } from "./space-BT_dVhhv.js";
|
|
77
|
+
import { t as Le } from "./calendar-Clbg3qot.js";
|
|
78
78
|
export { w as ArrowDownIcon, T as ArrowLeftIcon, E as ArrowRightIcon, D as ArrowUpIcon, e as BaseComponent, p as BaseIcon, te as Button, Le as Calendar, q as CalendarIcon, k as CaretBottomIcon, O as CaretTopIcon, Ce as Carousel, we as CarouselItem, $ as Checkbox, ee as CheckboxGroup, m as CloseFilledIcon, B as CloseIcon, je as Collapse, Me as CollapseItem, he as ColorPicker, H as DArrowLeftIcon, U as DArrowRightIcon, pe as DatePicker, me as DatePickerOri, Ee as DescriptionPanel, y as Dialog, b as DialogContainer, A as FontIcon, Y as Form, X as FormItem, Ne as Image, Pe as ImagePreview, _ as InfoIcon, ne as Input, ge as List, x as Loading, j as LoadingIcon, Oe as Mask, ae as MdInput, Se as Menu, v as Message, C as Modal, P as MoonIcon, V as MoreIcon, ke as PageHeader, De as Pagination, _e as Polygon, se as Popover, Te as Qrcode, Q as Radio, Z as RadioGroup, F as ReductionIcon, J as RefreshIcon, I as RefreshLeftIcon, L as RefreshRightIcon, M as SearchIcon, oe as Select, K as SelectIcon, re as SelectOri, R as SortIcon, Ie as Space, h as SuccessIcon, N as SunIcon, ie as Switch, ve as Tabbar, ye as TabbarItem, Fe as Table, S as Tabs, Ae as Tag, be as Theme, xe as ThemeColor, z as ThemeDefaultIcon, g as WarnIcon, W as ZoomInIcon, G as ZoomOutIcon, f as addClickOutside, ce as autoUpdate, le as createPopoverObserver, ue as getOverflowAncestors, t as initAttr, n as kebabToCamel, r as parseAttrValue, de as popconfirmProps, i as regist, d as removeClickOutside, a as setAttrs, o as stopSignal, s as tagAttr, c as tagAttrs, l as unitNumberStr, fe as updatePosition, u as useId };
|