ranui 0.1.9 → 0.1.10-alpha.2
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/_commonjs-dynamic-modules-DLbDWi6a.js +12 -0
- package/dist/arrow-down-D4qr4m33.js +30 -0
- package/dist/button.js +7 -0
- package/dist/checkbox.js +7 -0
- package/dist/colorpicker.js +13 -0
- package/dist/{colz-746223ab.js → colz-CRDozfZA.js} +1 -5
- package/dist/content.js +6 -0
- package/dist/docx-CChZ5Ycr.js +3665 -0
- package/dist/global-DOOKQmNv.js +4 -0
- package/dist/icon.js +6 -0
- package/dist/iconShadowless.js +6 -0
- package/dist/image.js +4 -0
- package/dist/index-01Qfd9QI.js +207 -0
- package/dist/{index-2d16a084.js → index-B2yRe66F.js} +8 -10
- package/dist/{index-3cf72afd.js → index-B4bfIbdI.js} +9 -23
- package/dist/{index-458debf7.js → index-BF8tJ6rR.js} +7 -31
- package/dist/{index-7b8840f9.js → index-BHmWrPCW.js} +223 -1011
- package/dist/{index-e03d23e7.js → index-BpOERe9M.js} +1 -1
- package/dist/{index-e2e5d725.js → index-ByBbFhvo.js} +123 -323
- package/dist/index-C-p_Wpit.js +103 -0
- package/dist/{index-b7790662.js → index-C1x9Popy.js} +1 -1
- package/dist/index-C6wPL-2Y.js +298 -0
- package/dist/{index-1048a998.js → index-CFnsLnrb.js} +68 -19
- package/dist/{index-57492b9b.js → index-CSnBqUsQ.js} +48 -1
- package/dist/index-CWWI8SHO.js +206 -0
- package/dist/index-Cbp6LrE5.js +501 -0
- package/dist/index-CbyMC6Yz.js +59 -0
- package/dist/index-Cr9AYoGT.js +498 -0
- package/dist/index-DLB8VOy7.js +281 -0
- package/dist/index-DRWOSfdF.js +521 -0
- package/dist/{index-4443363f.js → index-DRi1ylHx.js} +29 -50
- package/dist/index-Dapt713u.js +65624 -0
- package/dist/{index-7216d6b0.js → index-DqtzBqPN.js} +11 -29
- package/dist/{index-1b73beee.js → index-DsIUhdNt.js} +55 -90
- package/dist/{index-01b17e26.js → index-Du-Biu-I.js} +1 -1
- package/dist/{index-0d5b9435.js → index-DytfjwBV.js} +2 -2
- package/dist/index.js +25 -19
- package/dist/info-circle-fill-CFeVMdci.js +4 -0
- package/dist/input.js +6 -0
- package/dist/inputShadowless.js +6 -0
- package/dist/jszip.min-DD9Dc6z4.js +2674 -0
- package/dist/loading.js +6 -0
- package/dist/message.js +5 -0
- package/dist/modal.js +4 -0
- package/dist/{components/option/index.js → option.js} +3 -6
- package/dist/{pdf-bdb7818a.js → pdf-DpNqCylD.js} +12 -4
- package/dist/player.js +8 -0
- package/dist/popover.js +6 -0
- package/dist/preview.js +7 -0
- package/dist/progress.js +7 -0
- package/dist/radar.js +6 -0
- package/dist/select.js +10 -0
- package/dist/selectShadowless.js +10 -0
- package/dist/shadowless/shadowless/index.js +14 -0
- package/dist/skeleton.js +4 -0
- package/dist/sprite-CH2zLtZy.js +141 -0
- package/dist/style.css +1 -1
- package/dist/tab.js +6 -0
- package/dist/tabpane.js +4 -0
- package/dist/tsconfig.json +29 -0
- package/dist/umd/index.umd.cjs +21 -32
- package/dist/umd/shadowless/shadowless.umd.cjs +1 -0
- package/dist/umd/shadowless/style.css +1 -0
- package/dist/umd/style.css +1 -1
- package/dist/utils-74Icp-PI.js +541 -0
- package/package.json +54 -24
- package/readme.md +18 -14
- package/typings.d.ts +101 -0
- package/dist/build/config.d.ts +0 -3
- package/dist/build/config.es.d.ts +0 -2
- package/dist/build/config.umd.d.ts +0 -2
- package/dist/components/button/index.d.ts +0 -35
- package/dist/components/button/index.js +0 -8
- package/dist/components/form/index.d.ts +0 -2
- package/dist/components/icon/index.d.ts +0 -2
- package/dist/components/icon/index.js +0 -6
- package/dist/components/image/index.d.ts +0 -2
- package/dist/components/image/index.js +0 -4
- package/dist/components/input/index.d.ts +0 -185
- package/dist/components/input/index.js +0 -6
- package/dist/components/message/index.d.ts +0 -14
- package/dist/components/message/index.js +0 -4
- package/dist/components/modal/index.d.ts +0 -2
- package/dist/components/modal/index.js +0 -4
- package/dist/components/option/index.d.ts +0 -2
- package/dist/components/player/index.d.ts +0 -213
- package/dist/components/player/index.js +0 -12
- package/dist/components/preview/colz.d.ts +0 -72
- package/dist/components/preview/docx.d.ts +0 -8
- package/dist/components/preview/excel/excel.d.ts +0 -2
- package/dist/components/preview/excel/index.d.ts +0 -1
- package/dist/components/preview/excel/media.d.ts +0 -37
- package/dist/components/preview/index.d.ts +0 -6
- package/dist/components/preview/index.js +0 -8
- package/dist/components/preview/pdf.d.ts +0 -1
- package/dist/components/preview/pptx/index.d.ts +0 -16
- package/dist/components/preview/pptx/process_pptx.d.ts +0 -23
- package/dist/components/preview/pptx/t_xml.d.ts +0 -1
- package/dist/components/preview/pptx/worker.d.ts +0 -1
- package/dist/components/progress/index.d.ts +0 -36
- package/dist/components/progress/index.js +0 -8
- package/dist/components/radar/index.d.ts +0 -2
- package/dist/components/radar/index.js +0 -7
- package/dist/components/scratch/index.d.ts +0 -19
- package/dist/components/select/index.d.ts +0 -105
- package/dist/components/select/index.js +0 -11
- package/dist/components/skeleton/index.d.ts +0 -2
- package/dist/components/skeleton/index.js +0 -4
- package/dist/components/tab/index.d.ts +0 -408
- package/dist/components/tab/index.js +0 -7
- package/dist/components/tabpane/index.d.ts +0 -352
- package/dist/components/tabpane/index.js +0 -4
- package/dist/docx-c5d02d8c.js +0 -21
- package/dist/index-73ce455b.js +0 -264
- package/dist/index-7913ec46.js +0 -239
- package/dist/index-c14450a9.js +0 -662
- package/dist/index.d.ts +0 -14
- package/dist/info-circle-fill-90ec9aa9.js +0 -14
- package/dist/playwright.config.d.ts +0 -9
- package/dist/plugins/auto-import-file.d.ts +0 -0
- package/dist/plugins/load-style.d.ts +0 -6
- package/dist/plugins/load-svg.d.ts +0 -9
- package/dist/tests/button.spec.d.ts +0 -1
- package/dist/umd/build/config.d.ts +0 -3
- package/dist/umd/build/config.es.d.ts +0 -2
- package/dist/umd/build/config.umd.d.ts +0 -2
- package/dist/umd/components/button/index.d.ts +0 -35
- package/dist/umd/components/form/index.d.ts +0 -2
- package/dist/umd/components/icon/index.d.ts +0 -2
- package/dist/umd/components/image/index.d.ts +0 -2
- package/dist/umd/components/input/index.d.ts +0 -185
- package/dist/umd/components/message/index.d.ts +0 -14
- package/dist/umd/components/modal/index.d.ts +0 -2
- package/dist/umd/components/option/index.d.ts +0 -2
- package/dist/umd/components/player/index.d.ts +0 -213
- package/dist/umd/components/preview/colz.d.ts +0 -72
- package/dist/umd/components/preview/docx.d.ts +0 -8
- package/dist/umd/components/preview/excel/excel.d.ts +0 -2
- package/dist/umd/components/preview/excel/index.d.ts +0 -1
- package/dist/umd/components/preview/excel/media.d.ts +0 -37
- package/dist/umd/components/preview/index.d.ts +0 -6
- package/dist/umd/components/preview/pdf.d.ts +0 -1
- package/dist/umd/components/preview/pptx/index.d.ts +0 -16
- package/dist/umd/components/preview/pptx/process_pptx.d.ts +0 -23
- package/dist/umd/components/preview/pptx/t_xml.d.ts +0 -1
- package/dist/umd/components/preview/pptx/worker.d.ts +0 -1
- package/dist/umd/components/progress/index.d.ts +0 -36
- package/dist/umd/components/radar/index.d.ts +0 -2
- package/dist/umd/components/scratch/index.d.ts +0 -19
- package/dist/umd/components/select/index.d.ts +0 -105
- package/dist/umd/components/skeleton/index.d.ts +0 -2
- package/dist/umd/components/tab/index.d.ts +0 -408
- package/dist/umd/components/tabpane/index.d.ts +0 -352
- package/dist/umd/index.d.ts +0 -14
- package/dist/umd/playwright.config.d.ts +0 -9
- package/dist/umd/plugins/auto-import-file.d.ts +0 -0
- package/dist/umd/plugins/load-style.d.ts +0 -6
- package/dist/umd/plugins/load-svg.d.ts +0 -9
- package/dist/umd/tests/button.spec.d.ts +0 -1
- package/dist/umd/utils/image.d.ts +0 -32
- package/dist/umd/utils/index.d.ts +0 -64
- package/dist/umd/utils/math.d.ts +0 -26
- package/dist/umd/utils/tween.d.ts +0 -21
- package/dist/umd/vite.config.d.ts +0 -6
- package/dist/utils/image.d.ts +0 -32
- package/dist/utils/index.d.ts +0 -64
- package/dist/utils/math.d.ts +0 -26
- package/dist/utils/tween.d.ts +0 -21
- package/dist/vendor-f71e6f68.js +0 -92126
- package/dist/vite.config.d.ts +0 -6
- /package/dist/{add-user-b2bed3e7.js → add-user-BN1JlY7e.js} +0 -0
- /package/dist/{book-b11a68eb.js → book-nTEFXU2x.js} +0 -0
- /package/dist/{check-circle-fill-dc284144.js → check-circle-fill-B_pd8ZSs.js} +0 -0
- /package/dist/{check-circle-74bd09c3.js → check-circle-szyAJiap.js} +0 -0
- /package/dist/{close-20925345.js → close-CFnkhudp.js} +0 -0
- /package/dist/{close-circle-720c18be.js → close-circle-CwmuN2C6.js} +0 -0
- /package/dist/{close-circle-fill-238a66b1.js → close-circle-fill-jSqPPw9i.js} +0 -0
- /package/dist/{eye-5e742329.js → eye-D_mEt17f.js} +0 -0
- /package/dist/{eye-close-3874f1ae.js → eye-close-BVr3NJtg.js} +0 -0
- /package/dist/{home-c4a05e8b.js → home-BUQ4USMk.js} +0 -0
- /package/dist/{index-8e1e2573.js → index-CQTJoWhb.js} +0 -0
- /package/dist/{info-circle-5826decc.js → info-circle-COnL5bTJ.js} +0 -0
- /package/dist/{loading-09ca52df.js → loading-Dcc5RApI.js} +0 -0
- /package/dist/{lock-1d2487c9.js → lock-Cr7BnmWN.js} +0 -0
- /package/dist/{message-b2bfdea7.js → message-D36_Zo2l.js} +0 -0
- /package/dist/{power-off-6ade5a91.js → power-off-lQRbiBak.js} +0 -0
- /package/dist/{preview-b291aea8.js → preview-CJbz9GjO.js} +0 -0
- /package/dist/{setting-1e5ccb6d.js → setting-DemlgzVC.js} +0 -0
- /package/dist/{team-ca6a12e1.js → team-tl4NJXPC.js} +0 -0
- /package/dist/{unlock-f56086fd.js → unlock-CeU74z9n.js} +0 -0
- /package/dist/{user-5c01e665.js → user-B-eVXwuk.js} +0 -0
- /package/dist/{warning-circle-035e025c.js → warning-circle-DDUgEDIv.js} +0 -0
- /package/dist/{warning-circle-fill-d17c37c9.js → warning-circle-fill-lODUKz0i.js} +0 -0
package/dist/icon.js
ADDED
package/dist/image.js
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
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
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
return value;
|
|
6
|
+
};
|
|
7
|
+
import { H as HTMLElementSSR, c as createCustomError } from "./index-CSnBqUsQ.js";
|
|
8
|
+
class Loading extends HTMLElementSSR() {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
__publicField(this, "contain");
|
|
12
|
+
__publicField(this, "rotateLoading", () => {
|
|
13
|
+
const loading = document.createElement("div");
|
|
14
|
+
loading.setAttribute(
|
|
15
|
+
"class",
|
|
16
|
+
"rotate"
|
|
17
|
+
/* ROTATE */
|
|
18
|
+
);
|
|
19
|
+
this.contain.appendChild(loading);
|
|
20
|
+
});
|
|
21
|
+
__publicField(this, "stretchLoading", () => {
|
|
22
|
+
const loading = document.createElement("div");
|
|
23
|
+
loading.setAttribute(
|
|
24
|
+
"class",
|
|
25
|
+
"stretch"
|
|
26
|
+
/* STRETCH */
|
|
27
|
+
);
|
|
28
|
+
const arr = [1, 2, 3, 4, 5];
|
|
29
|
+
arr.forEach((i) => {
|
|
30
|
+
const rect = document.createElement("div");
|
|
31
|
+
rect.setAttribute("class", `rect${i}`);
|
|
32
|
+
loading.appendChild(rect);
|
|
33
|
+
});
|
|
34
|
+
this.contain.appendChild(loading);
|
|
35
|
+
});
|
|
36
|
+
__publicField(this, "doubleBounceLoading", () => {
|
|
37
|
+
const loading = document.createElement("div");
|
|
38
|
+
loading.setAttribute(
|
|
39
|
+
"class",
|
|
40
|
+
"double-bounce"
|
|
41
|
+
/* DOUBLE_BOUNCE */
|
|
42
|
+
);
|
|
43
|
+
const arr = [1, 2];
|
|
44
|
+
arr.forEach((i) => {
|
|
45
|
+
const rect = document.createElement("div");
|
|
46
|
+
rect.setAttribute("class", `double-bounce${i}`);
|
|
47
|
+
loading.appendChild(rect);
|
|
48
|
+
});
|
|
49
|
+
this.contain.appendChild(loading);
|
|
50
|
+
});
|
|
51
|
+
__publicField(this, "cubeLoading", () => {
|
|
52
|
+
const loading = document.createElement("div");
|
|
53
|
+
loading.setAttribute(
|
|
54
|
+
"class",
|
|
55
|
+
"cube"
|
|
56
|
+
/* CUBE */
|
|
57
|
+
);
|
|
58
|
+
const arr = [1, 2];
|
|
59
|
+
arr.forEach((i) => {
|
|
60
|
+
const rect = document.createElement("div");
|
|
61
|
+
rect.setAttribute("class", `cube${i}`);
|
|
62
|
+
loading.appendChild(rect);
|
|
63
|
+
});
|
|
64
|
+
this.contain.appendChild(loading);
|
|
65
|
+
});
|
|
66
|
+
__publicField(this, "dotLoading", () => {
|
|
67
|
+
const loading = document.createElement("div");
|
|
68
|
+
loading.setAttribute(
|
|
69
|
+
"class",
|
|
70
|
+
"dot"
|
|
71
|
+
/* DOT */
|
|
72
|
+
);
|
|
73
|
+
const arr = [1, 2];
|
|
74
|
+
arr.forEach((i) => {
|
|
75
|
+
const rect = document.createElement("div");
|
|
76
|
+
rect.setAttribute("class", `dot${i}`);
|
|
77
|
+
loading.appendChild(rect);
|
|
78
|
+
});
|
|
79
|
+
this.contain.appendChild(loading);
|
|
80
|
+
});
|
|
81
|
+
__publicField(this, "tripleBounceLoading", () => {
|
|
82
|
+
const loading = document.createElement("div");
|
|
83
|
+
loading.setAttribute(
|
|
84
|
+
"class",
|
|
85
|
+
"triple-bounce"
|
|
86
|
+
/* TRIPLE_BOUNCE */
|
|
87
|
+
);
|
|
88
|
+
const arr = [1, 2, 3];
|
|
89
|
+
arr.forEach((i) => {
|
|
90
|
+
const rect = document.createElement("div");
|
|
91
|
+
rect.setAttribute("class", `triple-bounce${i}`);
|
|
92
|
+
loading.appendChild(rect);
|
|
93
|
+
});
|
|
94
|
+
this.contain.appendChild(loading);
|
|
95
|
+
});
|
|
96
|
+
__publicField(this, "scaleOutLoading", () => {
|
|
97
|
+
const loading = document.createElement("div");
|
|
98
|
+
loading.setAttribute("class", "scale-out");
|
|
99
|
+
this.contain.appendChild(loading);
|
|
100
|
+
});
|
|
101
|
+
__publicField(this, "circleLoading", () => {
|
|
102
|
+
const loading = document.createElement("div");
|
|
103
|
+
loading.setAttribute("class", "circle");
|
|
104
|
+
[
|
|
105
|
+
[1, 2, 3, 4],
|
|
106
|
+
[1, 2, 3, 4],
|
|
107
|
+
[1, 2, 3, 4]
|
|
108
|
+
].forEach((i, index2) => {
|
|
109
|
+
const container = document.createElement("div");
|
|
110
|
+
container.setAttribute("class", `circle-container container${index2 + 1}`);
|
|
111
|
+
i.forEach((j) => {
|
|
112
|
+
const rect = document.createElement("div");
|
|
113
|
+
rect.setAttribute("class", `circle${j}`);
|
|
114
|
+
container.appendChild(rect);
|
|
115
|
+
});
|
|
116
|
+
loading.appendChild(container);
|
|
117
|
+
});
|
|
118
|
+
this.contain.appendChild(loading);
|
|
119
|
+
});
|
|
120
|
+
__publicField(this, "createLoading", () => {
|
|
121
|
+
this.contain.innerHTML = "";
|
|
122
|
+
const NAME_MAP = {
|
|
123
|
+
[
|
|
124
|
+
"stretch"
|
|
125
|
+
/* STRETCH */
|
|
126
|
+
]: this.stretchLoading,
|
|
127
|
+
[
|
|
128
|
+
"rotate"
|
|
129
|
+
/* ROTATE */
|
|
130
|
+
]: this.rotateLoading,
|
|
131
|
+
[
|
|
132
|
+
"double-bounce"
|
|
133
|
+
/* DOUBLE_BOUNCE */
|
|
134
|
+
]: this.doubleBounceLoading,
|
|
135
|
+
[
|
|
136
|
+
"cube"
|
|
137
|
+
/* CUBE */
|
|
138
|
+
]: this.cubeLoading,
|
|
139
|
+
[
|
|
140
|
+
"dot"
|
|
141
|
+
/* DOT */
|
|
142
|
+
]: this.dotLoading,
|
|
143
|
+
[
|
|
144
|
+
"triple-bounce"
|
|
145
|
+
/* TRIPLE_BOUNCE */
|
|
146
|
+
]: this.tripleBounceLoading,
|
|
147
|
+
[
|
|
148
|
+
"scale-out"
|
|
149
|
+
/* SCALE_OUT */
|
|
150
|
+
]: this.scaleOutLoading,
|
|
151
|
+
[
|
|
152
|
+
"circle"
|
|
153
|
+
/* CIRCLE */
|
|
154
|
+
]: this.circleLoading
|
|
155
|
+
};
|
|
156
|
+
const handler = NAME_MAP[this.name];
|
|
157
|
+
handler && handler();
|
|
158
|
+
if (this.contains(this.contain))
|
|
159
|
+
return;
|
|
160
|
+
this.appendChild(this.contain);
|
|
161
|
+
});
|
|
162
|
+
this.contain = document.createElement("div");
|
|
163
|
+
this.contain.setAttribute("class", "ran-loading");
|
|
164
|
+
}
|
|
165
|
+
static get observedAttributes() {
|
|
166
|
+
return ["name"];
|
|
167
|
+
}
|
|
168
|
+
get name() {
|
|
169
|
+
const name = this.getAttribute("name") || "";
|
|
170
|
+
if (!name)
|
|
171
|
+
return "circle";
|
|
172
|
+
return name;
|
|
173
|
+
}
|
|
174
|
+
set name(value) {
|
|
175
|
+
this.setAttribute("name", value || "");
|
|
176
|
+
}
|
|
177
|
+
connectedCallback() {
|
|
178
|
+
}
|
|
179
|
+
disconnectCallback() {
|
|
180
|
+
}
|
|
181
|
+
attributeChangedCallback(k, o, n) {
|
|
182
|
+
if (o !== n) {
|
|
183
|
+
if (k === "name") {
|
|
184
|
+
this.createLoading();
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
function Custom() {
|
|
190
|
+
if (typeof document !== "undefined" && !customElements.get("r-loading")) {
|
|
191
|
+
customElements.define("r-loading", Loading);
|
|
192
|
+
return Loading;
|
|
193
|
+
} else {
|
|
194
|
+
return createCustomError("document is undefined or r-loading is exist");
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
const index = Custom();
|
|
198
|
+
const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
199
|
+
__proto__: null,
|
|
200
|
+
Loading,
|
|
201
|
+
default: index
|
|
202
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
203
|
+
export {
|
|
204
|
+
Loading as L,
|
|
205
|
+
index as a,
|
|
206
|
+
index$1 as i
|
|
207
|
+
};
|
|
@@ -4,10 +4,10 @@ var __publicField = (obj, key, value) => {
|
|
|
4
4
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
|
-
import {
|
|
8
|
-
import { i as isDisabled, f as falseList, c as createCustomError } from "./index-
|
|
9
|
-
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{position:relative;display:inline-block;background-image:none;box-shadow:0 2px #00000004;cursor:pointer;-webkit-user-select:
|
|
10
|
-
class Button extends
|
|
7
|
+
import { c as currentDevice } from "./utils-74Icp-PI.js";
|
|
8
|
+
import { H as HTMLElementSSR, i as isDisabled, f as falseList, c as createCustomError } from "./index-CSnBqUsQ.js";
|
|
9
|
+
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{position:var(--ran-btn-position, relative);display:var(--ran-btn-display, inline-block);background-image:var(--ran-btn-background-image, none);box-shadow:var(--ran-btn-box-shadow, 0 2px #00000004);cursor:var(--ran-btn-cursor, pointer);-webkit-user-select:var(--ran-btn-user-select, none);user-select:var(--ran-btn-user-select, none);touch-action:var(--ran-btn-touch-action, manipulation);overflow:var(--ran-btn-overflow, hidden);pointer-events:var(--ran-btn-pointer-events, auto)}:host .ran-btn{position:relative;display:inline-block;background-image:none;cursor:pointer;transition:all .3s cubic-bezier(.645,.045,.355,1);-webkit-user-select:none;user-select:none;touch-action:manipulation;background:#fff}:host,:host(:active),:host(:focus){outline:0;-webkit-tap-highlight-color:transparent}:host .ran-btn,:host(:active) .ran-btn,:host(:focus) .ran-btn{outline:0}:host(:not([disabled]):hover) .ran-btn-content{border-color:var(--ran-btn-content-hover-border-color, #1890ff);color:var(--ran-btn-content-hover-color, #1890ff)}:host([type="primary"]) .ran-btn-content{background-color:var(--ran-btn-content-background-color, #1890ff);border-color:var(--ran-btn-content-border-color, #1890ff);color:var(--ran-btn-content-color, #fff)}:host([type="primary"]:not([disabled])) .ran-btn:after{background-image:var(--ran-btn-after-background-image, radial-gradient(circle, #fff 10%, transparent 10.01%))}:host([type="primary"]:not([disabled]):hover) .ran-btn-content{background-color:var(--ran-btn-content-hover-background-color, #40a9ff);color:var(--ran-btn-content-hover-color, #fff)}:host([type="warning"]) .ran-btn-content{border-color:#ff4d4f;background-color:#ff4d4f;color:#fff}:host([type="warning"]:not([disabled])) .ran-btn:after{background-image:radial-gradient(circle,#fff 10%,transparent 10.01%)}:host([type="warning"]:not([disabled]):hover) .ran-btn-content{border-color:#ff4d4f;background-color:#ff4d4f;color:#fff}:host([type="text"]) .ran-btn-content{border:none}:host([disabled]){cursor:not-allowed;pointer-events:all;opacity:.6}:host([disabled]) .ran-btn{cursor:not-allowed;pointer-events:all;opacity:.6}:host(:not([disabled]):active) .ran-btn:after{transform:translate(-50%,-50%) scale(0);opacity:.3;transition:0s}@media (min-width: 1024px){:host(:not([disabled],[effect])) .ran-btn:after{content:"";display:block;position:absolute;width:100%;height:100%;left:var(--ran-x, 0);top:var(--ran-y, 0);pointer-events:none;background-image:radial-gradient(circle,#1890ff 10%,transparent 10.01%);background-repeat:no-repeat;background-position:50%;transform:translate(-50%,-50%) scale(10);opacity:0;transition:transform .3s,opacity .8s}}:host .slot{display:block}.ran-btn-content{display:flex;justify-content:space-between;align-items:center;padding:4px 15px;border:1px solid transparent;border-radius:2px;border-color:#d9d9d9;color:#000000d9;line-height:22px;font-size:14px;font-weight:400;white-space:nowrap;text-align:center}.ran-btn-content .icon{margin-right:2px}';
|
|
10
|
+
class Button extends HTMLElementSSR() {
|
|
11
11
|
constructor() {
|
|
12
12
|
super();
|
|
13
13
|
__publicField(this, "_btn");
|
|
@@ -17,7 +17,7 @@ class Button extends HTMLElement {
|
|
|
17
17
|
__publicField(this, "_shadowDom");
|
|
18
18
|
__publicField(this, "debounceTimeId");
|
|
19
19
|
/**
|
|
20
|
-
* @description: 设置button的icon
|
|
20
|
+
* @description: 设置 button 的 icon
|
|
21
21
|
* @return {*}
|
|
22
22
|
*/
|
|
23
23
|
__publicField(this, "setIcon", () => {
|
|
@@ -41,7 +41,7 @@ class Button extends HTMLElement {
|
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
43
|
__publicField(this, "mousedown", (event) => {
|
|
44
|
-
if (
|
|
44
|
+
if (currentDevice() !== "pc")
|
|
45
45
|
return;
|
|
46
46
|
if (!this.disabled || this.disabled === "false") {
|
|
47
47
|
this.debounceMouseEvent();
|
|
@@ -51,7 +51,7 @@ class Button extends HTMLElement {
|
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
53
|
__publicField(this, "mouseup", (event) => {
|
|
54
|
-
if (
|
|
54
|
+
if (currentDevice() !== "pc")
|
|
55
55
|
return;
|
|
56
56
|
if (this.debounceTimeId)
|
|
57
57
|
return;
|
|
@@ -72,9 +72,7 @@ class Button extends HTMLElement {
|
|
|
72
72
|
sheet.insertRule(this.sheet);
|
|
73
73
|
this._shadowDom.adoptedStyleSheets = [sheet];
|
|
74
74
|
} catch (error) {
|
|
75
|
-
console.error(
|
|
76
|
-
`Failed to parse the rule in CSSStyleSheet: ${this.sheet}`
|
|
77
|
-
);
|
|
75
|
+
console.error(`Failed to parse the rule in CSSStyleSheet: ${this.sheet}`);
|
|
78
76
|
}
|
|
79
77
|
}
|
|
80
78
|
});
|
|
@@ -4,9 +4,9 @@ var __publicField = (obj, key, value) => {
|
|
|
4
4
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
|
-
import {
|
|
8
|
-
import { i as isDisabled, r as removeClassToElementChild } from "./index-
|
|
9
|
-
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-tab ::slotted(r-tab){box-sizing:border-box;width:100%;height:100%;padding:10px;flex-shrink:0;overflow:auto;text-align:start}.ran-tab-header{position:relative;overflow:hidden;scroll-behavior:smooth}.ran-tab-header-nav{display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:center}.ran-tab-header-nav::-webkit-scrollbar{display:none}.ran-tab-header-nav-item{flex-shrink:0}.ran-tab-header-nav .active{color:var(--active-color, #1890ff)}.ran-tab-header-line{position:absolute;width:0;margin-top:-2px;height:2px;border-radius:2px;background:var(--line-color, #1890ff);transition:.2s}.ran-tab-content{overflow:hidden}.ran-tab-content-wrap{display:flex;width:100%;height:100%;transition:.2s}:host([type="line"]) .ran-tab-header-nav-item{border:solid 1px transparent}:host([type="line"]) .ran-tab-header-nav .active{color:var(--line-color, #1890ff);border:solid 1px transparent;border-color:var(--border-color, rgba(0, 0, 0, .2)) var(--border-color, rgba(0, 0, 0, .2)) transparent;border-radius:var(--border-radius, .25em) var(--border-radius, .25em) 0 0}:host([type="line"]) .ran-tab-header-line{transition:none;visibility:hidden}:host([type="line"]) .ran-tab-header-line:after,:host([type="line"]) .ran-tab-header-line:before{content:"";position:absolute;visibility:visible;width:9999px;height:1px;bottom:0;background:var(--border-color, rgba(0, 0, 0, .2))}:host([type="line"]) .ran-tab-header-line:after{left:100%}:host([type="line"]) .ran-tab-header-line:before{right:100%}:host([align="center"]) .ran-tab-header-nav{justify-content:center}:host([align="center"]) .ran-tab-header-line{left:50%}:host([align="end"]) .ran-tab-header-nav{justify-content:flex-end}
|
|
7
|
+
import { b as createDocumentFragment, a as addClassToElement } from "./utils-74Icp-PI.js";
|
|
8
|
+
import { i as isDisabled, r as removeClassToElementChild } from "./index-CSnBqUsQ.js";
|
|
9
|
+
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-tab ::slotted(r-tab){box-sizing:border-box;width:100%;height:100%;padding:10px;flex-shrink:0;overflow:auto;text-align:start}.ran-tab-header{position:relative;overflow:hidden;scroll-behavior:smooth}.ran-tab-header-nav{display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:center}.ran-tab-header-nav::-webkit-scrollbar{display:none}.ran-tab-header-nav-item{flex-shrink:0}.ran-tab-header-nav .active{color:var(--active-color, #1890ff)}.ran-tab-header-line{position:absolute;width:0;margin-top:-2px;height:2px;border-radius:2px;background:var(--line-color, #1890ff);transition:.2s}.ran-tab-content{overflow:hidden}.ran-tab-content-wrap{display:flex;width:100%;height:100%;transition:.2s}:host([type="line"]) .ran-tab-header-nav-item{border:solid 1px transparent}:host([type="line"]) .ran-tab-header-nav .active{color:var(--line-color, #1890ff);border:solid 1px transparent;border-color:var(--border-color, rgba(0, 0, 0, .2)) var(--border-color, rgba(0, 0, 0, .2)) transparent;border-radius:var(--border-radius, .25em) var(--border-radius, .25em) 0 0}:host([type="line"]) .ran-tab-header-line{transition:none;visibility:hidden}:host([type="line"]) .ran-tab-header-line:after,:host([type="line"]) .ran-tab-header-line:before{content:"";position:absolute;visibility:visible;width:9999px;height:1px;bottom:0;background:var(--border-color, rgba(0, 0, 0, .2))}:host([type="line"]) .ran-tab-header-line:after{left:100%}:host([type="line"]) .ran-tab-header-line:before{right:100%}:host([align="center"]) .ran-tab-header-nav{justify-content:center}:host([align="center"]) .ran-tab-header-line{left:50%}:host([align="end"]) .ran-tab-header-nav{justify-content:flex-end}';
|
|
10
10
|
function CustomElement() {
|
|
11
11
|
if (typeof window !== "undefined" && !customElements.get("r-tabs")) {
|
|
12
12
|
class Tabs extends HTMLElement {
|
|
@@ -28,9 +28,7 @@ function CustomElement() {
|
|
|
28
28
|
__publicField(this, "initTabHeaderKeyMapIndex", (key, index2) => {
|
|
29
29
|
const value = this.tabHeaderKeyMapIndex[key];
|
|
30
30
|
if (value) {
|
|
31
|
-
throw new Error(
|
|
32
|
-
"tab 组件的 key 值存在重复, 或者某个 tab 组件缺少 key 属性"
|
|
33
|
-
);
|
|
31
|
+
throw new Error("tab 组件的 key 值存在重复, 或者某个 tab 组件缺少 key 属性");
|
|
34
32
|
} else {
|
|
35
33
|
this.tabHeaderKeyMapIndex[key] = index2;
|
|
36
34
|
}
|
|
@@ -75,10 +73,7 @@ function CustomElement() {
|
|
|
75
73
|
const { width: width2 = 0 } = item.getBoundingClientRect();
|
|
76
74
|
distance += width2;
|
|
77
75
|
}
|
|
78
|
-
this._line.style.setProperty(
|
|
79
|
-
"transform",
|
|
80
|
-
`translateX(${distance}px)`
|
|
81
|
-
);
|
|
76
|
+
this._line.style.setProperty("transform", `translateX(${distance}px)`);
|
|
82
77
|
}
|
|
83
78
|
});
|
|
84
79
|
/**
|
|
@@ -87,10 +82,7 @@ function CustomElement() {
|
|
|
87
82
|
__publicField(this, "setTabContent", (key) => {
|
|
88
83
|
if (key) {
|
|
89
84
|
const index2 = this.tabHeaderKeyMapIndex[key];
|
|
90
|
-
this._wrap.style.setProperty(
|
|
91
|
-
"transform",
|
|
92
|
-
`translateX(${index2 * -100}%)`
|
|
93
|
-
);
|
|
85
|
+
this._wrap.style.setProperty("transform", `translateX(${index2 * -100}%)`);
|
|
94
86
|
}
|
|
95
87
|
});
|
|
96
88
|
/**
|
|
@@ -133,9 +125,7 @@ function CustomElement() {
|
|
|
133
125
|
const initTabList = tabHeaderList.filter((item) => !isDisabled(item));
|
|
134
126
|
let initTabHeader;
|
|
135
127
|
if (this.active != null) {
|
|
136
|
-
initTabHeader = initTabList.find(
|
|
137
|
-
(item) => item.getAttribute("r-key") === this.active
|
|
138
|
-
);
|
|
128
|
+
initTabHeader = initTabList.find((item) => item.getAttribute("r-key") === this.active);
|
|
139
129
|
initTabHeader == null ? void 0 : initTabHeader.setAttribute("r-key", this.active);
|
|
140
130
|
}
|
|
141
131
|
if (!initTabHeader) {
|
|
@@ -200,12 +190,8 @@ function CustomElement() {
|
|
|
200
190
|
this._slot = document.createElement("slot");
|
|
201
191
|
this._wrap.appendChild(this._slot);
|
|
202
192
|
this._content.appendChild(this._wrap);
|
|
203
|
-
this._header.appendChild(
|
|
204
|
-
|
|
205
|
-
);
|
|
206
|
-
this._container.appendChild(
|
|
207
|
-
createDocumentFragment([this._header, this._content])
|
|
208
|
-
);
|
|
193
|
+
this._header.appendChild(createDocumentFragment([this._nav, this._line]));
|
|
194
|
+
this._container.appendChild(createDocumentFragment([this._header, this._content]));
|
|
209
195
|
this.tabHeaderKeyMapIndex = {};
|
|
210
196
|
const shadowRoot = this.attachShadow({ mode: "closed" });
|
|
211
197
|
const F7170EE498E0DD32CBDCB63FBA8F75CC = document.createElement("style");
|
|
@@ -4,9 +4,9 @@ var __publicField = (obj, key, value) => {
|
|
|
4
4
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
|
-
import { g as getPixelRatio } from "./
|
|
8
|
-
import { c as createCustomError } from "./index-
|
|
9
|
-
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-radar{position:relative;width:100%;height:100%;display:block}
|
|
7
|
+
import { g as getPixelRatio } from "./utils-74Icp-PI.js";
|
|
8
|
+
import { c as createCustomError } from "./index-CSnBqUsQ.js";
|
|
9
|
+
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-radar{position:relative;width:100%;height:100%;display:block}";
|
|
10
10
|
const BACKGROUND_COLOR = "rgba(0,0,0,0)";
|
|
11
11
|
const FONT_COLOR = "rgba(0,0,0,1)";
|
|
12
12
|
const POLYGON_COLOR = "#e6e6e6";
|
|
@@ -43,13 +43,7 @@ function Custom() {
|
|
|
43
43
|
shadowRoot.appendChild(this.abilityRadarChartContainer);
|
|
44
44
|
}
|
|
45
45
|
static get observedAttributes() {
|
|
46
|
-
return [
|
|
47
|
-
"abilitys",
|
|
48
|
-
"colorPolygon",
|
|
49
|
-
"colorLine",
|
|
50
|
-
"fillColor",
|
|
51
|
-
"strokeColor"
|
|
52
|
-
];
|
|
46
|
+
return ["abilitys", "colorPolygon", "colorLine", "fillColor", "strokeColor"];
|
|
53
47
|
}
|
|
54
48
|
get abilitys() {
|
|
55
49
|
const item = this.getAttribute("abilitys");
|
|
@@ -254,21 +248,9 @@ function Custom() {
|
|
|
254
248
|
ctx.fillStyle = color;
|
|
255
249
|
ctx.moveTo(x + radius, y);
|
|
256
250
|
ctx.lineTo(x + width - radius, y);
|
|
257
|
-
ctx.arc(
|
|
258
|
-
x + width - radius,
|
|
259
|
-
y + radius,
|
|
260
|
-
radius,
|
|
261
|
-
Math.PI * 3 / 2,
|
|
262
|
-
Math.PI * 2
|
|
263
|
-
);
|
|
251
|
+
ctx.arc(x + width - radius, y + radius, radius, Math.PI * 3 / 2, Math.PI * 2);
|
|
264
252
|
ctx.lineTo(x + width, y + height - radius);
|
|
265
|
-
ctx.arc(
|
|
266
|
-
x + width - radius,
|
|
267
|
-
y + height - radius,
|
|
268
|
-
radius,
|
|
269
|
-
Math.PI,
|
|
270
|
-
Math.PI / 2
|
|
271
|
-
);
|
|
253
|
+
ctx.arc(x + width - radius, y + height - radius, radius, Math.PI, Math.PI / 2);
|
|
272
254
|
ctx.lineTo(x + radius, y + height);
|
|
273
255
|
ctx.arc(x + radius, y + height - radius, radius, Math.PI / 2, Math.PI);
|
|
274
256
|
ctx.lineTo(x, y + radius);
|
|
@@ -325,13 +307,7 @@ function Custom() {
|
|
|
325
307
|
disconnectCallback() {
|
|
326
308
|
}
|
|
327
309
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
328
|
-
const attribute = [
|
|
329
|
-
"abilitys",
|
|
330
|
-
"colorPolygon",
|
|
331
|
-
"colorLine",
|
|
332
|
-
"fillColor",
|
|
333
|
-
"strokeColor"
|
|
334
|
-
];
|
|
310
|
+
const attribute = ["abilitys", "colorPolygon", "colorLine", "fillColor", "strokeColor"];
|
|
335
311
|
if (attribute.includes(name) && this.abilityRadarChartContainer && oldValue !== newValue) {
|
|
336
312
|
this.refreshData();
|
|
337
313
|
}
|