ranui 0.1.10-alpha.2 → 0.1.10-alpha.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/dist/{utils-74Icp-PI.js → arrow-down-Beig7FXI.js} +139 -28
- package/dist/assets/image/failImage.d.ts +2 -0
- package/dist/build/config.d.ts +3 -0
- package/dist/build/config.es.d.ts +2 -0
- package/dist/build/config.sha.d.ts +2 -0
- package/dist/build/config.umd.d.ts +2 -0
- package/dist/button.js +3 -3
- package/dist/checkbox.js +3 -3
- package/dist/colorpicker.js +7 -9
- package/dist/{colz-CRDozfZA.js → colz-DJZvo_8B.js} +3 -8
- package/dist/components/button/index.d.ts +39 -0
- package/dist/components/checkbox/index.d.ts +27 -0
- package/dist/components/colorpicker/index.d.ts +120 -0
- package/dist/components/dropdown/index.d.ts +28 -0
- package/dist/components/form/index.d.ts +2 -0
- package/dist/components/icon/index.d.ts +2 -0
- package/dist/components/image/index.d.ts +2 -0
- package/dist/components/input/index.d.ts +209 -0
- package/dist/components/loading/index.d.ts +77 -0
- package/dist/components/math/index.d.ts +17 -0
- package/dist/components/message/index.d.ts +16 -0
- package/dist/components/modal/index.d.ts +2 -0
- package/dist/components/player/index.d.ts +238 -0
- package/dist/components/popover/content/index.d.ts +16 -0
- package/dist/components/popover/index.d.ts +59 -0
- package/dist/components/preview/colz.d.ts +72 -0
- package/dist/components/preview/constant.d.ts +5 -0
- package/dist/components/preview/docx.d.ts +8 -0
- package/dist/components/preview/excel/excel.d.ts +2 -0
- package/dist/components/preview/excel/index.d.ts +2 -0
- package/dist/components/preview/excel/media.d.ts +37 -0
- package/dist/components/preview/index.d.ts +3 -0
- package/dist/components/preview/pdf.d.ts +2 -0
- package/dist/components/preview/pptx/index.d.ts +19 -0
- package/dist/components/preview/pptx/process_pptx.d.ts +23 -0
- package/dist/components/preview/pptx/t_xml.d.ts +1 -0
- package/dist/components/preview/pptx/worker.d.ts +1 -0
- package/dist/components/preview/types.d.ts +10 -0
- package/dist/components/progress/index.d.ts +41 -0
- package/dist/components/radar/index.d.ts +2 -0
- package/dist/components/scratch/index.d.ts +23 -0
- package/dist/components/select/dropdown-item/index.d.ts +23 -0
- package/dist/components/select/index.d.ts +115 -0
- package/dist/components/select/option/index.d.ts +2 -0
- package/dist/components/skeleton/index.d.ts +2 -0
- package/dist/components/tab/index.d.ts +410 -0
- package/dist/components/tabpane/index.d.ts +354 -0
- package/dist/{docx-CChZ5Ycr.js → docx-CHkPTdGU.js} +1 -1
- package/dist/drop-4j4abxje.js +36 -0
- package/dist/icon.js +3 -3
- package/dist/iconShadowless.js +3 -3
- package/dist/image.js +1 -1
- package/dist/{index-BpOERe9M.js → index-BZR0HaP2.js} +1 -4
- package/dist/{index-B2yRe66F.js → index-BafnazTJ.js} +9 -17
- package/dist/{index-Dapt713u.js → index-Bl6-5Hp8.js} +2438 -4361
- package/dist/{index-ByBbFhvo.js → index-BqWbyjm2.js} +1165 -1831
- package/dist/{index-DqtzBqPN.js → index-C0Xh8vJ3.js} +12 -23
- package/dist/{index-DRi1ylHx.js → index-C1rSQlmc.js} +16 -23
- package/dist/{index-Cbp6LrE5.js → index-C4Sv0T51.js} +6 -12
- package/dist/index-CCxIoCAT.js +657 -0
- package/dist/{index-BHmWrPCW.js → index-CGEx9VOA.js} +866 -1662
- package/dist/{index-C-p_Wpit.js → index-CILRcFIV.js} +3 -6
- package/dist/index-COa4RzeW.js +105 -0
- package/dist/{index-B4bfIbdI.js → index-CWNtaUwu.js} +17 -25
- package/dist/{index-DytfjwBV.js → index-CjSKJE6S.js} +11 -15
- package/dist/{index-C6wPL-2Y.js → index-Ck9TOxFh.js} +22 -41
- package/dist/{index-BF8tJ6rR.js → index-CryFK9u4.js} +11 -21
- package/dist/{index-C1x9Popy.js → index-DAxs7Dd2.js} +5 -12
- package/dist/index-DBecKjmY.js +279 -0
- package/dist/{index-CSnBqUsQ.js → index-DC5EA657.js} +2 -6
- package/dist/index-DEcHDJ1m.js +306 -0
- package/dist/index-DL-1C2RQ.js +496 -0
- package/dist/index-DN-kAx-A.js +72 -0
- package/dist/{index-DRWOSfdF.js → index-DUF6lQQS.js} +15 -28
- package/dist/{index-Du-Biu-I.js → index-KS2nvVcO.js} +1 -4
- package/dist/{index-CFnsLnrb.js → index-WfFw4LJT.js} +42 -48
- package/dist/index.d.ts +231 -0
- package/dist/index.js +20 -26
- package/dist/input.js +2 -2
- package/dist/inputShadowless.js +2 -2
- package/dist/{jszip.min-DD9Dc6z4.js → jszip.min-Dhs3nUkD.js} +699 -1027
- package/dist/katex-es-B5r5vt3m.js +14628 -0
- package/dist/loading-scene-BMc2wqKm.js +4 -0
- package/dist/loading.js +4 -2
- package/dist/math.js +7 -0
- package/dist/message.js +3 -2
- package/dist/{pdf-DpNqCylD.js → pdf-Cx0VWKFo.js} +2 -5
- package/dist/player.js +4 -4
- package/dist/playwright.config.d.ts +9 -0
- package/dist/plugins/auto-import-file.d.ts +0 -0
- package/dist/plugins/load-style.d.ts +6 -0
- package/dist/plugins/load-svg.d.ts +9 -0
- package/dist/popover.js +4 -2
- package/dist/preview.js +4 -4
- package/dist/progress.js +3 -3
- package/dist/radar.js +3 -3
- package/dist/select.js +6 -6
- package/dist/selectShadowless.js +562 -8
- package/dist/shadowless/icon/index.d.ts +3 -0
- package/dist/shadowless/input/index.d.ts +210 -0
- package/dist/shadowless/select/index.d.ts +109 -0
- package/dist/shadowless/select/option/index.d.ts +2 -0
- package/dist/shadowless/shadowless/index.js +3 -9
- package/dist/shadowless.d.ts +3 -0
- package/dist/skeleton.js +1 -1
- package/dist/style.css +1 -1
- package/dist/tab.js +3 -3
- package/dist/tabpane.js +1 -1
- package/dist/tests/button.spec.d.ts +1 -0
- package/dist/tsconfig.json +3 -2
- package/dist/typings.d.ts +211 -0
- package/dist/umd/index.umd.cjs +9 -9
- package/dist/umd/shadowless/shadowless.umd.cjs +1 -1
- package/dist/umd/shadowless/style.css +1 -1
- package/dist/umd/style.css +1 -1
- package/dist/utils/color.d.ts +52 -0
- package/dist/utils/image.d.ts +32 -0
- package/dist/utils/index.d.ts +72 -0
- package/dist/utils/math.d.ts +26 -0
- package/dist/utils/tween.d.ts +21 -0
- package/dist/vite.config.d.ts +7 -0
- package/package.json +47 -38
- package/readme.md +7 -48
- package/typings.d.ts +113 -2
- package/dist/arrow-down-D4qr4m33.js +0 -30
- package/dist/content.js +0 -6
- package/dist/global-DOOKQmNv.js +0 -4
- package/dist/index-01Qfd9QI.js +0 -207
- package/dist/index-CWWI8SHO.js +0 -206
- package/dist/index-CbyMC6Yz.js +0 -59
- package/dist/index-Cr9AYoGT.js +0 -498
- package/dist/index-DLB8VOy7.js +0 -281
- package/dist/index-DsIUhdNt.js +0 -533
- package/dist/option.js +0 -92
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) =>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
import { _ as __variableDynamicImportRuntimeHelper, s as str2Xml } from "./arrow-down-D4qr4m33.js";
|
|
8
|
-
import "./utils-74Icp-PI.js";
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
+
import { _ as __variableDynamicImportRuntimeHelper, s as str2Xml } from "./drop-4j4abxje.js";
|
|
5
|
+
import "./arrow-down-Beig7FXI.js";
|
|
9
6
|
const X_LINKS_NS = "http://www.w3.org/1999/xlink";
|
|
10
7
|
const X_LINK_HREF = "xlink:href";
|
|
11
8
|
function Custom() {
|
|
@@ -20,7 +17,7 @@ function Custom() {
|
|
|
20
17
|
*/
|
|
21
18
|
__publicField(this, "loadLocal", () => {
|
|
22
19
|
return new Promise((resolve, reject) => {
|
|
23
|
-
__variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../../assets/icons/add-user.svg": () => import("./add-user-BN1JlY7e.js"), "../../assets/icons/arrow-down.svg": () => import("./arrow-down-
|
|
20
|
+
__variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../../assets/icons/add-user.svg": () => import("./add-user-BN1JlY7e.js"), "../../assets/icons/arrow-down.svg": () => import("./arrow-down-Beig7FXI.js").then((n) => n.j), "../../assets/icons/book.svg": () => import("./book-nTEFXU2x.js"), "../../assets/icons/check-circle-fill.svg": () => import("./check-circle-fill-B_pd8ZSs.js"), "../../assets/icons/check-circle.svg": () => import("./check-circle-szyAJiap.js"), "../../assets/icons/close-circle-fill.svg": () => import("./close-circle-fill-jSqPPw9i.js"), "../../assets/icons/close-circle.svg": () => import("./close-circle-CwmuN2C6.js"), "../../assets/icons/close.svg": () => import("./close-CFnkhudp.js"), "../../assets/icons/drop.svg": () => import("./drop-4j4abxje.js").then((n) => n.d), "../../assets/icons/eye-close.svg": () => import("./eye-close-BVr3NJtg.js"), "../../assets/icons/eye.svg": () => import("./eye-D_mEt17f.js"), "../../assets/icons/home.svg": () => import("./home-BUQ4USMk.js"), "../../assets/icons/info-circle-fill.svg": () => import("./info-circle-fill-CFeVMdci.js"), "../../assets/icons/info-circle.svg": () => import("./info-circle-COnL5bTJ.js"), "../../assets/icons/loading-scene.svg": () => import("./loading-scene-BMc2wqKm.js"), "../../assets/icons/loading.svg": () => import("./loading-Dcc5RApI.js"), "../../assets/icons/lock.svg": () => import("./lock-Cr7BnmWN.js"), "../../assets/icons/message.svg": () => import("./message-D36_Zo2l.js"), "../../assets/icons/power-off.svg": () => import("./power-off-lQRbiBak.js"), "../../assets/icons/preview.svg": () => import("./preview-CJbz9GjO.js"), "../../assets/icons/setting.svg": () => import("./setting-DemlgzVC.js"), "../../assets/icons/sprite.svg": () => import("./sprite-CH2zLtZy.js"), "../../assets/icons/team.svg": () => import("./team-tl4NJXPC.js"), "../../assets/icons/unlock.svg": () => import("./unlock-CeU74z9n.js"), "../../assets/icons/user.svg": () => import("./user-B-eVXwuk.js"), "../../assets/icons/warning-circle-fill.svg": () => import("./warning-circle-fill-lODUKz0i.js"), "../../assets/icons/warning-circle.svg": () => import("./warning-circle-DDUgEDIv.js") }), `../../assets/icons/${this.name}.svg`, 5).then((result) => {
|
|
24
21
|
if (result && result.default && result.default._identification) {
|
|
25
22
|
const { data } = result.default;
|
|
26
23
|
this._icon && this._div.removeChild(this._icon);
|
|
@@ -102,29 +99,25 @@ function Custom() {
|
|
|
102
99
|
return this.getAttribute("name");
|
|
103
100
|
}
|
|
104
101
|
set name(value) {
|
|
105
|
-
if (value)
|
|
106
|
-
this.setAttribute("name", value);
|
|
102
|
+
if (value) this.setAttribute("name", value);
|
|
107
103
|
}
|
|
108
104
|
get size() {
|
|
109
105
|
return this.getAttribute("size");
|
|
110
106
|
}
|
|
111
107
|
set size(value) {
|
|
112
|
-
if (value)
|
|
113
|
-
this.setAttribute("size", value);
|
|
108
|
+
if (value) this.setAttribute("size", value);
|
|
114
109
|
}
|
|
115
110
|
get color() {
|
|
116
111
|
return this.getAttribute("color");
|
|
117
112
|
}
|
|
118
113
|
set color(value) {
|
|
119
|
-
if (value)
|
|
120
|
-
this.setAttribute("color", value);
|
|
114
|
+
if (value) this.setAttribute("color", value);
|
|
121
115
|
}
|
|
122
116
|
get spin() {
|
|
123
117
|
return this.getAttribute("spin");
|
|
124
118
|
}
|
|
125
119
|
set spin(value) {
|
|
126
|
-
if (value != null)
|
|
127
|
-
this.setAttribute("spin", value);
|
|
120
|
+
if (value != null) this.setAttribute("spin", value);
|
|
128
121
|
}
|
|
129
122
|
connectedCallback() {
|
|
130
123
|
this.appendChild(this._div);
|
|
@@ -132,14 +125,10 @@ function Custom() {
|
|
|
132
125
|
}
|
|
133
126
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
134
127
|
if (newValue !== oldValue) {
|
|
135
|
-
if (name === "name")
|
|
136
|
-
|
|
137
|
-
if (name === "
|
|
138
|
-
|
|
139
|
-
if (name === "color")
|
|
140
|
-
this.setColor();
|
|
141
|
-
if (name === "spin")
|
|
142
|
-
this.setSpin();
|
|
128
|
+
if (name === "name") this.setIcon();
|
|
129
|
+
if (name === "size") this.setSize();
|
|
130
|
+
if (name === "color") this.setColor();
|
|
131
|
+
if (name === "spin") this.setSpin();
|
|
143
132
|
}
|
|
144
133
|
}
|
|
145
134
|
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) =>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
import { p as perToNum } from "./utils-74Icp-PI.js";
|
|
8
|
-
import { H as HTMLElementSSR, c as createCustomError } from "./index-CSnBqUsQ.js";
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
+
import { p as perToNum } from "./arrow-down-Beig7FXI.js";
|
|
5
|
+
import { H as HTMLElementSSR, c as createCustomError } from "./index-DC5EA657.js";
|
|
6
|
+
const f7170ee498e0dd32cbdcb63fba8f75cc = ".remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transparent}.remove-wap-active-focus:active,.remove-wap-active-focus:focus{outline:0;-webkit-tap-highlight-color:transparent}:host:active,:host:focus{outline:0;-webkit-tap-highlight-color:transparent}.ran-progress{position:var(--ran-progress-position, relative);cursor:var(--ran-progress-cursor, pointer);width:100%;height:100%}.ran-progress:active,.ran-progress:focus{outline:0;-webkit-tap-highlight-color:transparent}.ran-progress-wrap{width:100%;height:8px;border-radius:20px;background:var(--ran-progress-wrap, #5b5b5b);position:relative;overflow:hidden}.ran-progress-wrap-value{position:absolute;top:0;left:0;height:100%;width:100%;transform:scaleX(0);transform-origin:0 0;will-change:transform;background:var(--ran-progress-wrap-value, linear-gradient(90deg, #0bc8bb 2.42%, #00d297 98.79%));border-radius:20px}.ran-progress-dot{position:absolute;top:-5px;left:-9px;border-radius:50%;width:18px;height:18px;background:var(--ran-progress-dot, linear-gradient(90deg, #0bc8bb 2.42%, #00d297 98.79%));cursor:pointer}";
|
|
9
7
|
const attributes = ["percent", "type", "total", "dot"];
|
|
10
8
|
class Progress extends HTMLElementSSR() {
|
|
11
9
|
constructor() {
|
|
@@ -15,6 +13,7 @@ class Progress extends HTMLElementSSR() {
|
|
|
15
13
|
__publicField(this, "_progressWrapValue");
|
|
16
14
|
__publicField(this, "_progressDot");
|
|
17
15
|
__publicField(this, "moveProgress");
|
|
16
|
+
__publicField(this, "_shadowDom");
|
|
18
17
|
__publicField(this, "progressClick", (e) => {
|
|
19
18
|
const rect = this._progress.getBoundingClientRect();
|
|
20
19
|
const offsetX = e.clientX - rect.left;
|
|
@@ -28,8 +27,7 @@ class Progress extends HTMLElementSSR() {
|
|
|
28
27
|
this.moveProgress.mouseDown = true;
|
|
29
28
|
});
|
|
30
29
|
__publicField(this, "progressDotMouseMove", (e) => {
|
|
31
|
-
if (!this.moveProgress.mouseDown)
|
|
32
|
-
return;
|
|
30
|
+
if (!this.moveProgress.mouseDown) return;
|
|
33
31
|
const rect = this._progress.getBoundingClientRect();
|
|
34
32
|
const offsetX = e.clientX - rect.left;
|
|
35
33
|
const percentage = Math.min(1, Math.max(0, offsetX / this._progress.offsetWidth));
|
|
@@ -39,8 +37,7 @@ class Progress extends HTMLElementSSR() {
|
|
|
39
37
|
this.change();
|
|
40
38
|
});
|
|
41
39
|
__publicField(this, "progressDotMouseUp", (e) => {
|
|
42
|
-
if (!this.moveProgress.mouseDown)
|
|
43
|
-
return;
|
|
40
|
+
if (!this.moveProgress.mouseDown) return;
|
|
44
41
|
this.moveProgress.mouseDown = false;
|
|
45
42
|
});
|
|
46
43
|
__publicField(this, "change", () => {
|
|
@@ -68,19 +65,12 @@ class Progress extends HTMLElementSSR() {
|
|
|
68
65
|
this._progressDot.style.setProperty("transform", `translateX(${percent * this._progress.offsetWidth}px)`);
|
|
69
66
|
});
|
|
70
67
|
__publicField(this, "dragEvent", () => {
|
|
71
|
-
if (this.type !== "drag")
|
|
72
|
-
return;
|
|
68
|
+
if (this.type !== "drag") return;
|
|
73
69
|
this._progress.addEventListener("click", this.progressClick);
|
|
74
70
|
this._progressDot.addEventListener("mousedown", this.progressDotMouseDown);
|
|
75
71
|
document.addEventListener("mousemove", this.progressDotMouseMove);
|
|
76
72
|
document.addEventListener("mouseup", this.progressDotMouseUp);
|
|
77
73
|
});
|
|
78
|
-
__publicField(this, "createProgress", () => {
|
|
79
|
-
if (!(this.children.length > 0 && [...this.children].some((item) => item.className === "ran-progress"))) {
|
|
80
|
-
this._progress.appendChild(this._progressDot);
|
|
81
|
-
this.appendChild(this._progress);
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
74
|
__publicField(this, "resize", () => {
|
|
85
75
|
this.updateCurrentProgress();
|
|
86
76
|
});
|
|
@@ -98,6 +88,13 @@ class Progress extends HTMLElementSSR() {
|
|
|
98
88
|
this.moveProgress = {
|
|
99
89
|
mouseDown: false
|
|
100
90
|
};
|
|
91
|
+
this._progress.appendChild(this._progressDot);
|
|
92
|
+
const shadowRoot = this.attachShadow({ mode: "closed" });
|
|
93
|
+
const F7170EE498E0DD32CBDCB63FBA8F75CC = document.createElement("style");
|
|
94
|
+
F7170EE498E0DD32CBDCB63FBA8F75CC.textContent = f7170ee498e0dd32cbdcb63fba8f75cc;
|
|
95
|
+
shadowRoot.appendChild(F7170EE498E0DD32CBDCB63FBA8F75CC);
|
|
96
|
+
this._shadowDom = shadowRoot;
|
|
97
|
+
shadowRoot.appendChild(this._progress);
|
|
101
98
|
}
|
|
102
99
|
static get observedAttributes() {
|
|
103
100
|
return attributes;
|
|
@@ -117,8 +114,7 @@ class Progress extends HTMLElementSSR() {
|
|
|
117
114
|
}
|
|
118
115
|
get total() {
|
|
119
116
|
const total = this.getAttribute("total");
|
|
120
|
-
if (!total)
|
|
121
|
-
return "1";
|
|
117
|
+
if (!total) return "1";
|
|
122
118
|
return `${perToNum(total)}`;
|
|
123
119
|
}
|
|
124
120
|
set total(value) {
|
|
@@ -178,9 +174,6 @@ class Progress extends HTMLElementSSR() {
|
|
|
178
174
|
}
|
|
179
175
|
attributeChangedCallback(k, o, n) {
|
|
180
176
|
if (o !== n) {
|
|
181
|
-
if (k === "type") {
|
|
182
|
-
this.createProgress();
|
|
183
|
-
}
|
|
184
177
|
if (k === "dot") {
|
|
185
178
|
this.appendProgressDot();
|
|
186
179
|
}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) =>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
import { H as HTMLElementSSR, i as isDisabled, f as falseList, c as createCustomError } from "./index-CSnBqUsQ.js";
|
|
8
|
-
const f7170ee498e0dd32cbdcb63fba8f75cc = '.remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transparent}.remove-wap-active-focus:active,.remove-wap-active-focus:focus{outline:0;-webkit-tap-highlight-color:transparent}.ran-input{position:relative;display:flex;width:var(--ran-input-width, calc(100% - 16px) );height:var(--ran-input-height, calc(100% - 4px) );min-width:0;padding:var(--ran-input-padding, 2px 8px);color:#000000d9;font-size:var(--ran-input-font-size, 12px);line-height:var(--ran-input-line-height, 1.5715);background-color:var(--ran-input-background-color, #fff);background-image:var(--ran-input-background-image, none);border:var(--ran-input-border, 1px solid #d9d9d9);border-radius:var(--ran-input-border-radius, 2px);transition:var(--ran-input-transition, all .3s)}.ran-input .ran-icon{display:flex;align-items:center;justify-content:center}.ran-input:active{border-color:#40a9ff;box-shadow:0 0 0 2px #1890ff33;border-right-width:1px;outline:0}.ran-input:hover{border-color:#40a9ff;border-right-width:1px}.ran-input>.ran-input-content:hover~.ran-input-label{color:#40a9ff}.ran-input[value]>.ran-input-label{transform:translateY(calc(-50% - .43em)) scale(.8);color:#00000040}.ran-input[status=error]{border-color:#ff4d4f}.ran-input[status=error]>.ran-input-content~.ran-input-label{color:#ff4d4f}.ran-input[status=warning]{border-color:#ff7875}.ran-input[status=warning]>.ran-input-content~.ran-input-label{color:#ff7875}.ran-input[disabled]{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ran-input[disabled]>.ran-input-content{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ran-input[disabled]>.ran-input-content~.ran-input-label{color:#00000040;background-color:#f5f5f5}.ran-input[disabled]>.ran-input-label{color:#999;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed}.ran-input-content{writing-mode:horizontal-tb;text-rendering:auto;letter-spacing:normal;word-spacing:normal;text-transform:none;text-indent:0px;text-shadow:none;text-align:start;-webkit-rtl-ordering:logical;cursor:text;touch-action:manipulation;-webkit-appearance:none;text-overflow:ellipsis;box-sizing:border-box;margin:0;font-variant:tabular-nums;list-style:none;font-feature-settings:"tnum";position:relative;border:none;width:100%;min-width:0;color:#000000d9;font-size:14px;line-height:1.48;background-color:#fff;background-image:none;transition:all .3s;outline:none}.ran-input-content:focus,.ran-input-content:hover{border:none;outline:0}.ran-input-content::placeholder{color:#999}.ran-input-content:placeholder-shown~.ran-input-label{transform:translateY(calc(-50% - .43em)) scale(.8)}.ran-input-content:focus~.ran-input-label{transform:translateY(calc(-50% - .43em)) scale(.8)}.ran-input-content::-webkit-search-cancel-button{display:none;-webkit-appearance:none}.ran-input-label{pointer-events:none;position:absolute;font-size:14px;left:8px;transition:transform .3s,color .3s,background-color .3s,backdrop-filter .3s;transform-origin:left;padding:0 .2em;color:#999;background:#fff;opacity:.9}';
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
+
import { H as HTMLElementSSR, i as isDisabled, f as falseList, c as createCustomError } from "./index-DC5EA657.js";
|
|
5
|
+
const f7170ee498e0dd32cbdcb63fba8f75cc = '.remove-wap-active-focus{outline:0;-webkit-tap-highlight-color:transparent}.remove-wap-active-focus:active,.remove-wap-active-focus:focus{outline:0;-webkit-tap-highlight-color:transparent}.ran-input{position:var(--ran-input-position, relative);display:var(--ran-input-display, flex);width:var(--ran-input-width, calc(100% - 16px) );height:var(--ran-input-height, calc(100% - 4px) );min-width:0;padding:var(--ran-input-padding, 2px 8px);color:#000000d9;font-size:var(--ran-input-font-size, 12px);line-height:var(--ran-input-line-height, 1.5715);background-color:var(--ran-input-background-color, #fff);background-image:var(--ran-input-background-image, none);border:var(--ran-input-border, 1px solid #d9d9d9);border-radius:var(--ran-input-border-radius, 2px);transition:var(--ran-input-transition, all .3s)}.ran-input .ran-icon{display:var(--ran-input-icon-display, flex);align-items:var(--ran-input-icon-align-items, center);justify-content:var(--ran-input-icon-justify-content, center)}.ran-input:active{border-color:var(--ran-input-active-border-color, #40a9ff);box-shadow:var(--ran-input-active-box-shadow, 0 0 0 2px rgba(24, 144, 255, .2));border-right-width:var(--ran-input-active-border-right-width, 1px);outline:var(--ran-input-active-outline, 0)}.ran-input:hover{border-color:var(--ran-input-hover-border-color, #40a9ff);border-right-width:var(--ran-input-hover-border-right-width, 1px)}.ran-input>.ran-input-content:hover~.ran-input-label{color:var(--ran-input-label-hover-color, #40a9ff)}.ran-input[value]>.ran-input-label{transform:var(--ran-input-label-value-transform, translateY( calc(-50% - .43em) ) scale(.8));color:var(--ran-input-label-value-color, #00000040)}.ran-input[status=error]{border-color:var(--ran-input-status-error-border-color, #ff4d4f)}.ran-input[status=error]>.ran-input-content~.ran-input-label{color:var(--ran-input-label-status-error-color, #ff4d4f)}.ran-input[status=warning]{border-color:var(--ran-input-status-warning-border-color, #ff7875)}.ran-input[status=warning]>.ran-input-content~.ran-input-label{color:var(--ran-input-label-status-warning-color, #ff7875)}.ran-input[disabled]{color:var(--ran-input-disabled-color, #00000040);background-color:var(--ran-input-disabled-background-color, #f5f5f5);border-color:var(--ran-input-disabled-border-color, #d9d9d9);box-shadow:var(--ran-input-disabled-box-shadow, none);cursor:var(--ran-input-disabled-cursor, not-allowed);opacity:var(--ran-input-disabled-opacity, 1)}.ran-input[disabled]>.ran-input-content{color:var(--ran-input-content-disabled-color, #00000040);background-color:var(--ran-input-content-disabled-background-color, #f5f5f5);border-color:var(--ran-input-content-disabled-border-color, #d9d9d9);box-shadow:var(--ran-input-content-disabled-box-shadow, none);cursor:var(--ran-input-content-disabled-cursor, not-allowed);opacity:var(--ran-input-content-disabled-opacity, 1)}.ran-input[disabled]>.ran-input-content~.ran-input-label{color:var(--ran-input-label-disabled-color, #00000040);background-color:var(--ran-input-label-disabled-background-color, #f5f5f5)}.ran-input[disabled]>.ran-input-label{color:#999;border-color:var(--ran-input-label-disabled-border-color, #d9d9d9);box-shadow:var(--ran-input-label-disabled-box-shadow, none);cursor:var(--ran-input-label-disabled-cursor, not-allowed)}.ran-input-content{writing-mode:var(--ran-input-content-writing-mode, horizontal-tb);text-rendering:var(--ran-input-content-text-rendering, auto);letter-spacing:var(--ran-input-content-letter-spacing, normal);word-spacing:var(--ran-input-content-word-spacing, normal);text-transform:var(--ran-input-content-text-transform, none);text-indent:var(--ran-input-content-text-indent, 0px);text-shadow:var(--ran-input-content-text-shadow, none);text-align:var(--ran-input-content-text-align, start);cursor:var(--ran-input-content-cursor, text);touch-action:var(--ran-input-content-touch-action, manipulation);-webkit-appearance:var(--ran-input-content--webkit-appearance, none);text-overflow:var(--ran-input-content-text-overflow, ellipsis);box-sizing:var(--ran-input-content-box-sizing, border-box);margin:var(--ran-input-content-margin, 0);font-variant:var(--ran-input-content-font-variant, tabular-nums);list-style:var(--ran-input-content-list-style, none);font-feature-settings:var(--ran-input-content-font-feature-settings, "tnum");position:var(--ran-input-content-position, relative);border:var(--ran-input-content-border, none);width:var(--ran-input-content-width, 100%);min-width:var(--ran-input-content-min-width, 0);color:var(--ran-input-content-color, #000000d9);font-size:var(--ran-input-content-font-size, 14px);line-height:var(--ran-input-content-line-height, 1.48);background-color:var(--ran-input-content-background-color, #fff);background-image:var(--ran-input-content-background-image, none);transition:var(--ran-input-content-transition, all .3s);outline:var(--ran-input-content-outline, none)}.ran-input-content:focus,.ran-input-content:hover{border:var(--ran-input-content-hover-border, none);outline:var(--ran-input-content-hover-outline, 0)}.ran-input-content::placeholder{color:var(--ran-input-content-placeholder-color, #999)}.ran-input-content:placeholder-shown~.ran-input-label{transform:var(--ran-input-content-placeholder-label-transform, translateY( calc(-50% - .43em) ) scale(.8))}.ran-input-content:focus~.ran-input-label{transform:var(--ran-input-content-focus-label-transform, translateY( calc(-50% - .43em) ) scale(.8))}.ran-input-content::-webkit-search-cancel-button{display:none;-webkit-appearance:none}.ran-input-label{pointer-events:var(--ran-input-label-pointer-events, none);position:var(--ran-input-label-position, absolute);font-size:var(--ran-input-label-font-size, 14px);left:var(--ran-input-label-left, 8px);transition:var(--ran-input-label-transition, transform .3s, color .3s, background-color .3s, backdrop-filter .3s);transform-origin:var(--ran-input-label-transform-origin, left);padding:var(--ran-input-label-padding, 0 .2em);color:var(--ran-input-label-color, #999);background:var(--ran-input-label-background, #fff);opacity:var(--ran-input-label-opacity, .9)}';
|
|
9
6
|
class Input extends HTMLElementSSR() {
|
|
10
7
|
constructor() {
|
|
11
8
|
super();
|
|
@@ -348,8 +345,7 @@ class Input extends HTMLElementSSR() {
|
|
|
348
345
|
* @param {string} value
|
|
349
346
|
*/
|
|
350
347
|
set min(value) {
|
|
351
|
-
if (this.type === "number")
|
|
352
|
-
this.setAttribute("min", value);
|
|
348
|
+
if (this.type === "number") this.setAttribute("min", value);
|
|
353
349
|
}
|
|
354
350
|
/**
|
|
355
351
|
* @description: 当 input 类型为 number 类型时,可以获取 max 属性
|
|
@@ -363,8 +359,7 @@ class Input extends HTMLElementSSR() {
|
|
|
363
359
|
* @param {string} value
|
|
364
360
|
*/
|
|
365
361
|
set max(value) {
|
|
366
|
-
if (this.type === "number")
|
|
367
|
-
this.setAttribute("max", value);
|
|
362
|
+
if (this.type === "number") this.setAttribute("max", value);
|
|
368
363
|
}
|
|
369
364
|
/**
|
|
370
365
|
* @description: 当 input 类型为 number 类型时,可以获取 step 属性
|
|
@@ -378,8 +373,7 @@ class Input extends HTMLElementSSR() {
|
|
|
378
373
|
* @param {string} value
|
|
379
374
|
*/
|
|
380
375
|
set step(value) {
|
|
381
|
-
if (this.type === "number")
|
|
382
|
-
this.setAttribute("step", value);
|
|
376
|
+
if (this.type === "number") this.setAttribute("step", value);
|
|
383
377
|
}
|
|
384
378
|
/**
|
|
385
379
|
* @description: 获取一个 icon
|