ranui 0.1.8 → 0.1.10-alpha.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/dist/_commonjs-dynamic-modules-DLbDWi6a.js +12 -0
- package/dist/arrow-down-C9jBUUt3.js +30 -0
- package/dist/assets/image/failImage.d.ts +2 -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/components/button/index.d.ts +38 -1
- package/dist/components/checkbox/index.d.ts +27 -0
- package/dist/components/colorpicker/index.d.ts +122 -0
- package/dist/components/content/index.d.ts +15 -0
- package/dist/components/input/index.d.ts +208 -1
- package/dist/components/message/index.d.ts +2 -0
- package/dist/components/option/index.d.ts +2 -1
- package/dist/components/player/index.d.ts +207 -493
- package/dist/components/popover/index.d.ts +39 -0
- package/dist/components/preview/docx.d.ts +1 -1
- package/dist/components/preview/index.d.ts +2 -0
- package/dist/components/preview/pptx/process_pptx.d.ts +1 -1
- package/dist/components/progress/index.d.ts +11 -5
- package/dist/components/radar/index.d.ts +1 -1
- package/dist/components/scratch/index.d.ts +23 -0
- package/dist/components/select/index.d.ts +18 -6
- package/dist/components/tab/index.d.ts +5 -0
- package/dist/components/tabpane/index.d.ts +5 -0
- package/dist/content.js +6 -0
- package/dist/docx-ajDUtnbM.js +3665 -0
- package/dist/global-DOfcrQ2N.js +4 -0
- package/dist/icon.js +6 -0
- package/dist/iconShadowless.js +6 -0
- package/dist/image.js +4 -0
- package/dist/index-0fvHQjmN.js +298 -0
- package/dist/{index-f6d6982d.js → index-BLepXisd.js} +101 -84
- package/dist/{index-b2be6bef.js → index-BOoNI-Al.js} +904 -1078
- package/dist/index-BPBRPxND.js +195 -0
- package/dist/{index-b90299ca.js → index-BpOERe9M.js} +1 -1
- package/dist/index-Bv6Z6rIe.js +498 -0
- package/dist/index-ByJ7zZdQ.js +65641 -0
- package/dist/{index-5975bbc0.js → index-C1x9Popy.js} +1 -1
- package/dist/index-CCNK5H8T.js +103 -0
- package/dist/{index-a1a53af6.js → index-CD09p_mF.js} +7 -31
- package/dist/index-CFnsLnrb.js +496 -0
- package/dist/{index-a43b144f.js → index-CJZp9lE4.js} +29 -50
- package/dist/{index-57492b9b.js → index-CSnBqUsQ.js} +48 -1
- package/dist/index-CWWI8SHO.js +206 -0
- package/dist/{index-7b8840f9.js → index-CZlEoE62.js} +220 -1010
- package/dist/index-CbyMC6Yz.js +59 -0
- package/dist/index-CiBVH-oH.js +258 -0
- package/dist/{index-0e7229ea.js → index-DUMmFdJ7.js} +9 -21
- package/dist/{index-aea75a9f.js → index-Du-Biu-I.js} +1 -1
- package/dist/index-EnzWG8R0.js +521 -0
- package/dist/index-F2RO3OU4.js +501 -0
- package/dist/{index-7f513a14.js → index-GavQwMDL.js} +11 -29
- package/dist/{index-48653b79.js → index-suip9eAw.js} +2 -2
- package/dist/index.d.ts +18 -14
- package/dist/index.js +23 -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-Ca6PjkYs.js +2674 -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-B2a6ll8f.js} +1 -1
- 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/{umd/components/image → shadowless/icon}/index.d.ts +1 -0
- package/dist/shadowless/input/index.d.ts +210 -0
- package/dist/{umd/components → shadowless}/select/index.d.ts +19 -11
- package/dist/shadowless/shadowless/index.js +14 -0
- package/dist/shadowless.d.ts +3 -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/color.d.ts +52 -0
- package/dist/utils/index.d.ts +9 -1
- package/dist/utils-BMBEcoPj.js +356 -0
- package/dist/vite.config.d.ts +1 -0
- package/package.json +61 -39
- package/readme.md +14 -14
- package/typings.d.ts +101 -0
- package/dist/components/button/index.js +0 -7
- package/dist/components/icon/index.js +0 -6
- package/dist/components/image/index.js +0 -4
- package/dist/components/input/index.js +0 -5
- package/dist/components/message/index.js +0 -4
- package/dist/components/modal/index.js +0 -4
- package/dist/components/player/index.js +0 -11
- package/dist/components/preview/index.js +0 -8
- package/dist/components/progress/index.js +0 -8
- package/dist/components/radar/index.js +0 -7
- package/dist/components/select/index.js +0 -11
- package/dist/components/skeleton/index.js +0 -4
- package/dist/components/tab/index.js +0 -7
- package/dist/components/tabpane/index.js +0 -4
- package/dist/docx-c5d02d8c.js +0 -21
- package/dist/index-183517e7.js +0 -265
- package/dist/index-4d873a42.js +0 -195
- package/dist/index-a216f328.js +0 -662
- package/dist/index-d2d69b06.js +0 -225
- package/dist/index-ecaed5cc.js +0 -439
- package/dist/info-circle-fill-90ec9aa9.js +0 -14
- package/dist/umd/build/config.d.ts +0 -3
- package/dist/umd/build/config.umd.d.ts +0 -2
- package/dist/umd/components/button/index.d.ts +0 -2
- package/dist/umd/components/form/index.d.ts +0 -2
- package/dist/umd/components/icon/index.d.ts +0 -2
- package/dist/umd/components/input/index.d.ts +0 -2
- 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 -524
- 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/skeleton/index.d.ts +0 -2
- package/dist/umd/components/tab/index.d.ts +0 -403
- package/dist/umd/components/tabpane/index.d.ts +0 -347
- 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/vendor-f71e6f68.js +0 -92126
- /package/dist/{add-user-b2bed3e7.js → add-user-BN1JlY7e.js} +0 -0
- /package/dist/{book-b11a68eb.js → book-nTEFXU2x.js} +0 -0
- /package/dist/{umd/build/config.es.d.ts → build/config.sha.d.ts} +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
|
@@ -0,0 +1,195 @@
|
|
|
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 { c as currentDevice } from "./utils-BMBEcoPj.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
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
__publicField(this, "_btn");
|
|
14
|
+
__publicField(this, "_btnContent");
|
|
15
|
+
__publicField(this, "_iconElement");
|
|
16
|
+
__publicField(this, "_slot");
|
|
17
|
+
__publicField(this, "_shadowDom");
|
|
18
|
+
__publicField(this, "debounceTimeId");
|
|
19
|
+
/**
|
|
20
|
+
* @description: 设置 button 的 icon
|
|
21
|
+
* @return {*}
|
|
22
|
+
*/
|
|
23
|
+
__publicField(this, "setIcon", () => {
|
|
24
|
+
if (this.icon) {
|
|
25
|
+
const { width, height } = this._slot.getBoundingClientRect();
|
|
26
|
+
const size = Math.min(width, height);
|
|
27
|
+
if (this._iconElement) {
|
|
28
|
+
this._iconElement.setAttribute("name", this.icon);
|
|
29
|
+
} else {
|
|
30
|
+
this._iconElement = document.createElement("r-icon");
|
|
31
|
+
this._iconElement.setAttribute("name", this.icon);
|
|
32
|
+
this._iconElement.setAttribute("color", "currentColor");
|
|
33
|
+
this._iconElement.setAttribute("class", "icon");
|
|
34
|
+
this._slot.insertAdjacentElement("beforebegin", this._iconElement);
|
|
35
|
+
}
|
|
36
|
+
if (this.iconSize) {
|
|
37
|
+
this._iconElement.setAttribute("size", this.iconSize);
|
|
38
|
+
} else {
|
|
39
|
+
this._iconElement.setAttribute("size", `${size - 5}`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
__publicField(this, "mousedown", (event) => {
|
|
44
|
+
if (currentDevice() !== "pc")
|
|
45
|
+
return;
|
|
46
|
+
if (!this.disabled || this.disabled === "false") {
|
|
47
|
+
this.debounceMouseEvent();
|
|
48
|
+
const { left, top } = this.getBoundingClientRect();
|
|
49
|
+
this._btn.style.setProperty("--ran-x", event.clientX - left + "px");
|
|
50
|
+
this._btn.style.setProperty("--ran-y", event.clientY - top + "px");
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
__publicField(this, "mouseup", (event) => {
|
|
54
|
+
if (currentDevice() !== "pc")
|
|
55
|
+
return;
|
|
56
|
+
if (this.debounceTimeId)
|
|
57
|
+
return;
|
|
58
|
+
this.debounceTimeId = setTimeout(() => {
|
|
59
|
+
this._btn.style.removeProperty("--ran-x");
|
|
60
|
+
this._btn.style.removeProperty("--ran-y");
|
|
61
|
+
this.debounceMouseEvent();
|
|
62
|
+
}, 600);
|
|
63
|
+
});
|
|
64
|
+
__publicField(this, "debounceMouseEvent", () => {
|
|
65
|
+
clearTimeout(this.debounceTimeId);
|
|
66
|
+
this.debounceTimeId = void 0;
|
|
67
|
+
});
|
|
68
|
+
__publicField(this, "handlerExternalCss", () => {
|
|
69
|
+
if (this.sheet) {
|
|
70
|
+
try {
|
|
71
|
+
const sheet = new CSSStyleSheet();
|
|
72
|
+
sheet.insertRule(this.sheet);
|
|
73
|
+
this._shadowDom.adoptedStyleSheets = [sheet];
|
|
74
|
+
} catch (error) {
|
|
75
|
+
console.error(`Failed to parse the rule in CSSStyleSheet: ${this.sheet}`);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
this._slot = document.createElement("slot");
|
|
80
|
+
this._btnContent = document.createElement("div");
|
|
81
|
+
this._btn = document.createElement("div");
|
|
82
|
+
this._btn.setAttribute("class", "ran-btn");
|
|
83
|
+
this._btn.setAttribute("part", "ran-btn");
|
|
84
|
+
this._btnContent.setAttribute("class", "ran-btn-content");
|
|
85
|
+
this._btnContent.setAttribute("part", "ran-btn-content");
|
|
86
|
+
this._btnContent.appendChild(this._slot);
|
|
87
|
+
this._slot.setAttribute("class", "slot");
|
|
88
|
+
const shadowRoot = this.attachShadow({ mode: "closed" });
|
|
89
|
+
const F7170EE498E0DD32CBDCB63FBA8F75CC = document.createElement("style");
|
|
90
|
+
F7170EE498E0DD32CBDCB63FBA8F75CC.textContent = f7170ee498e0dd32cbdcb63fba8f75cc;
|
|
91
|
+
shadowRoot.appendChild(F7170EE498E0DD32CBDCB63FBA8F75CC);
|
|
92
|
+
this._shadowDom = shadowRoot;
|
|
93
|
+
this._btn.appendChild(this._btnContent);
|
|
94
|
+
shadowRoot.appendChild(this._btn);
|
|
95
|
+
}
|
|
96
|
+
static get observedAttributes() {
|
|
97
|
+
return ["disabled", "icon", "effect", "iconSize", "sheet"];
|
|
98
|
+
}
|
|
99
|
+
get sheet() {
|
|
100
|
+
return this.getAttribute("sheet") || "";
|
|
101
|
+
}
|
|
102
|
+
set sheet(value) {
|
|
103
|
+
this.setAttribute("sheet", value || "");
|
|
104
|
+
}
|
|
105
|
+
get disabled() {
|
|
106
|
+
return isDisabled(this);
|
|
107
|
+
}
|
|
108
|
+
set disabled(value) {
|
|
109
|
+
if (!value || value === "false") {
|
|
110
|
+
this.removeAttribute("disabled");
|
|
111
|
+
this.removeAttribute("aria-disabled");
|
|
112
|
+
} else {
|
|
113
|
+
this.setAttribute("disabled", "");
|
|
114
|
+
this.setAttribute("aria-disabled", "true");
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
get iconSize() {
|
|
118
|
+
return this.getAttribute("iconSize") || "";
|
|
119
|
+
}
|
|
120
|
+
set iconSize(value) {
|
|
121
|
+
if (!value || value === "false") {
|
|
122
|
+
this.removeAttribute("iconSize");
|
|
123
|
+
} else {
|
|
124
|
+
this.setAttribute("iconSize", value);
|
|
125
|
+
this.setIcon();
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
get icon() {
|
|
129
|
+
return this.getAttribute("icon") || "";
|
|
130
|
+
}
|
|
131
|
+
set icon(value) {
|
|
132
|
+
if (!value || value === "false") {
|
|
133
|
+
this.removeAttribute("icon");
|
|
134
|
+
} else {
|
|
135
|
+
this.setAttribute("icon", value);
|
|
136
|
+
this.setIcon();
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
get effect() {
|
|
140
|
+
return this.getAttribute("effect") || "";
|
|
141
|
+
}
|
|
142
|
+
set effect(value) {
|
|
143
|
+
if (falseList.includes(value) || !value) {
|
|
144
|
+
this.removeAttribute("effect");
|
|
145
|
+
} else {
|
|
146
|
+
this.setAttribute("effect", value);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
connectedCallback() {
|
|
150
|
+
this._btn.addEventListener("mousedown", this.mousedown);
|
|
151
|
+
this._btn.addEventListener("mouseup", this.mouseup);
|
|
152
|
+
this.handlerExternalCss();
|
|
153
|
+
this.setIcon();
|
|
154
|
+
this.setAttribute("role", "button");
|
|
155
|
+
this.setAttribute("tabindex", "0");
|
|
156
|
+
}
|
|
157
|
+
disconnectCallback() {
|
|
158
|
+
this._btn.removeEventListener("mousedown", this.mousedown);
|
|
159
|
+
this._btn.removeEventListener("mouseup", this.mouseup);
|
|
160
|
+
}
|
|
161
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
162
|
+
if (name === "disabled" && this._btnContent) {
|
|
163
|
+
if (!newValue || newValue === "false") {
|
|
164
|
+
this._btnContent.setAttribute("disabled", "");
|
|
165
|
+
} else {
|
|
166
|
+
this._btnContent.removeAttribute("disabled");
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
if (name === "icon" && this._btnContent && oldValue !== newValue)
|
|
170
|
+
this.setIcon();
|
|
171
|
+
if (name === "iconSize" && this._btnContent && oldValue !== newValue)
|
|
172
|
+
this._btnContent.setAttribute("iconSize", newValue);
|
|
173
|
+
if (name === "sheet" && this._shadowDom && oldValue !== newValue)
|
|
174
|
+
this.handlerExternalCss();
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
function Custom() {
|
|
178
|
+
if (typeof document !== "undefined" && !customElements.get("r-button")) {
|
|
179
|
+
customElements.define("r-button", Button);
|
|
180
|
+
return Button;
|
|
181
|
+
} else {
|
|
182
|
+
return createCustomError("document is undefined or r-button is exist");
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
const index = Custom();
|
|
186
|
+
const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
187
|
+
__proto__: null,
|
|
188
|
+
Button,
|
|
189
|
+
default: index
|
|
190
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
191
|
+
export {
|
|
192
|
+
Button as B,
|
|
193
|
+
index as a,
|
|
194
|
+
index$1 as i
|
|
195
|
+
};
|
|
@@ -4,7 +4,7 @@ var __publicField = (obj, key, value) => {
|
|
|
4
4
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
|
-
const f7170ee498e0dd32cbdcb63fba8f75cc = '@keyframes skeleton{0%{transform:translate(-37.5%)}to{transform:translate(37.5%)}}.ran-skeleton{position:relative;z-index:0;overflow:hidden;background:0 0;width:100%;height:16px;background
|
|
7
|
+
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}@keyframes skeleton{0%{transform:translate(-37.5%)}to{transform:translate(37.5%)}}.ran-skeleton{position:relative;z-index:0;overflow:hidden;background:0 0;width:100%;height:16px;background:#0000000f;border-radius:4px}.ran-skeleton:after{position:absolute;top:0;inset-inline-end:-150%;bottom:0;inset-inline-start:-150%;background:linear-gradient(90deg,#0000000f 25%,#00000026 37%,#0000000f 63%);animation-name:skeleton;animation-duration:1.4s;animation-timing-function:ease;animation-iteration-count:infinite;content:""}';
|
|
8
8
|
function Skeleton() {
|
|
9
9
|
if (typeof window !== "undefined" && !customElements.get("r-skeleton")) {
|
|
10
10
|
class CustomElement extends HTMLElement {
|