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,12 @@
|
|
|
1
|
+
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
2
|
+
function getDefaultExportFromCjs(x) {
|
|
3
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
4
|
+
}
|
|
5
|
+
function commonjsRequire(path) {
|
|
6
|
+
throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
commonjsRequire as a,
|
|
10
|
+
commonjsGlobal as c,
|
|
11
|
+
getDefaultExportFromCjs as g
|
|
12
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const str2Xml = (xmlStr, format = "text/xml") => {
|
|
2
|
+
if (window.DOMParser)
|
|
3
|
+
return new window.DOMParser().parseFromString(xmlStr, format).documentElement;
|
|
4
|
+
if (typeof window.ActiveXObject !== "undefined") {
|
|
5
|
+
const xmlDoc = new window.ActiveXObject("Microsoft.XMLDOM");
|
|
6
|
+
xmlDoc.async = "false";
|
|
7
|
+
xmlDoc.loadXML(xmlStr);
|
|
8
|
+
return xmlDoc;
|
|
9
|
+
}
|
|
10
|
+
return void 0;
|
|
11
|
+
};
|
|
12
|
+
const __variableDynamicImportRuntimeHelper = (glob, path) => {
|
|
13
|
+
const v = glob[path];
|
|
14
|
+
if (v) {
|
|
15
|
+
return typeof v === "function" ? v() : Promise.resolve(v);
|
|
16
|
+
}
|
|
17
|
+
return new Promise((_, reject) => {
|
|
18
|
+
(typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(reject.bind(null, new Error("Unknown variable dynamic import: " + path)));
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
const arrowDown = { "success": true, "_identification": true, "data": '<svg viewBox="0 0 1024 1024" width="200" height="200" version="1.1"\n fill="currentColor" xmlns="http://www.w3.org/2000/svg">\n <path\n d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path>\n</svg>' };
|
|
22
|
+
const arrowDown$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
23
|
+
__proto__: null,
|
|
24
|
+
default: arrowDown
|
|
25
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
26
|
+
export {
|
|
27
|
+
__variableDynamicImportRuntimeHelper as _,
|
|
28
|
+
arrowDown$1 as a,
|
|
29
|
+
str2Xml as s
|
|
30
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const failImage = "\n data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaAS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gKKC4YMA4TAAAAABJRU5ErkJggg==\n";
|
|
2
|
+
export default failImage;
|
package/dist/button.js
ADDED
package/dist/checkbox.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "./utils-BMBEcoPj.js";
|
|
2
|
+
import "./index-CSnBqUsQ.js";
|
|
3
|
+
import { C, a } from "./index-EnzWG8R0.js";
|
|
4
|
+
import "./index-CWWI8SHO.js";
|
|
5
|
+
import "./index-CbyMC6Yz.js";
|
|
6
|
+
import "./index-CFnsLnrb.js";
|
|
7
|
+
import "./index-Bv6Z6rIe.js";
|
|
8
|
+
import "./option.js";
|
|
9
|
+
import "./index-CJZp9lE4.js";
|
|
10
|
+
export {
|
|
11
|
+
C as ColorPicker,
|
|
12
|
+
a as default
|
|
13
|
+
};
|
|
@@ -129,11 +129,7 @@ class Color {
|
|
|
129
129
|
}
|
|
130
130
|
const hexToRgb = function(hex) {
|
|
131
131
|
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
132
|
-
return result ? [
|
|
133
|
-
parseInt(result[1], 16),
|
|
134
|
-
parseInt(result[2], 16),
|
|
135
|
-
parseInt(result[3], 16)
|
|
136
|
-
] : null;
|
|
132
|
+
return result ? [parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)] : null;
|
|
137
133
|
};
|
|
138
134
|
const getDarkColor = (color, level) => {
|
|
139
135
|
const rgbc = hexToRgb(color) || [];
|
|
@@ -1,2 +1,39 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
declare const Button_base: {
|
|
3
|
+
new (): HTMLElement;
|
|
4
|
+
prototype: HTMLElement;
|
|
5
|
+
};
|
|
6
|
+
export declare class Button extends Button_base {
|
|
7
|
+
_btn: HTMLDivElement;
|
|
8
|
+
_btnContent: HTMLDivElement;
|
|
9
|
+
_iconElement?: HTMLElement;
|
|
10
|
+
_slot: HTMLSlotElement;
|
|
11
|
+
_shadowDom: ShadowRoot;
|
|
12
|
+
debounceTimeId?: NodeJS.Timeout;
|
|
13
|
+
static get observedAttributes(): string[];
|
|
14
|
+
constructor();
|
|
15
|
+
get sheet(): string;
|
|
16
|
+
set sheet(value: string);
|
|
17
|
+
get disabled(): boolean | string;
|
|
18
|
+
set disabled(value: boolean | string | undefined | null);
|
|
19
|
+
get iconSize(): string;
|
|
20
|
+
set iconSize(value: string | undefined | null);
|
|
21
|
+
get icon(): string;
|
|
22
|
+
set icon(value: string | null);
|
|
23
|
+
get effect(): string;
|
|
24
|
+
set effect(value: string | null);
|
|
25
|
+
/**
|
|
26
|
+
* @description: 设置 button 的 icon
|
|
27
|
+
* @return {*}
|
|
28
|
+
*/
|
|
29
|
+
setIcon: () => void;
|
|
30
|
+
mousedown: (event: MouseEvent) => void;
|
|
31
|
+
mouseup: (event: MouseEvent) => void;
|
|
32
|
+
debounceMouseEvent: () => void;
|
|
33
|
+
handlerExternalCss: () => void;
|
|
34
|
+
connectedCallback(): void;
|
|
35
|
+
disconnectCallback(): void;
|
|
36
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
37
|
+
}
|
|
38
|
+
declare const _default: import("@/utils/index").CustomErrorType;
|
|
2
39
|
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
interface Context {
|
|
3
|
+
checked: boolean;
|
|
4
|
+
}
|
|
5
|
+
declare const Checkbox_base: {
|
|
6
|
+
new (): HTMLElement;
|
|
7
|
+
prototype: HTMLElement;
|
|
8
|
+
};
|
|
9
|
+
export declare class Checkbox extends Checkbox_base {
|
|
10
|
+
checkInput: HTMLInputElement;
|
|
11
|
+
checkInner: HTMLSpanElement;
|
|
12
|
+
context: Context;
|
|
13
|
+
static get observedAttributes(): string[];
|
|
14
|
+
constructor();
|
|
15
|
+
get disabled(): string;
|
|
16
|
+
set disabled(value: string);
|
|
17
|
+
get checked(): string;
|
|
18
|
+
set checked(value: string);
|
|
19
|
+
updateChecked: () => void;
|
|
20
|
+
update: () => void;
|
|
21
|
+
onChange: () => void;
|
|
22
|
+
connectedCallback(): void;
|
|
23
|
+
disconnectCallback(): void;
|
|
24
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
25
|
+
}
|
|
26
|
+
declare const _default: import("@/utils/index").CustomErrorType;
|
|
27
|
+
export default _default;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import '@/components/popover';
|
|
2
|
+
import '@/components/content';
|
|
3
|
+
import '@/shadowless/input';
|
|
4
|
+
import '@/shadowless/select';
|
|
5
|
+
import '@/components/option';
|
|
6
|
+
import '@/components/progress';
|
|
7
|
+
import './index.less';
|
|
8
|
+
interface Context {
|
|
9
|
+
disabled: Signal<boolean>;
|
|
10
|
+
value: Signal<string>;
|
|
11
|
+
hue: Signal<number>;
|
|
12
|
+
saturation: Signal<number>;
|
|
13
|
+
lightness: Signal<number>;
|
|
14
|
+
transparency: Signal<number>;
|
|
15
|
+
}
|
|
16
|
+
interface RGBA {
|
|
17
|
+
r: number;
|
|
18
|
+
g: number;
|
|
19
|
+
b: number;
|
|
20
|
+
a: number;
|
|
21
|
+
}
|
|
22
|
+
interface Signal<T> {
|
|
23
|
+
getter: () => T;
|
|
24
|
+
setter: (newValue: T) => void;
|
|
25
|
+
}
|
|
26
|
+
declare const ColorPicker_base: {
|
|
27
|
+
new (): HTMLElement;
|
|
28
|
+
prototype: HTMLElement;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* @description: 数据驱动视图,改变数据,即改变视图
|
|
32
|
+
* @return {*}
|
|
33
|
+
*/
|
|
34
|
+
export declare class ColorPicker extends ColorPicker_base {
|
|
35
|
+
colorpicker: HTMLDivElement;
|
|
36
|
+
colorpickerInner: HTMLDivElement;
|
|
37
|
+
context: Context;
|
|
38
|
+
popoverBlock: HTMLElement;
|
|
39
|
+
popoverContent: HTMLElement;
|
|
40
|
+
colorPickerInner?: HTMLDivElement;
|
|
41
|
+
colorPickerInnerContent?: HTMLDivElement;
|
|
42
|
+
colorPickerPanel?: HTMLDivElement;
|
|
43
|
+
colorPickerInputContainer?: HTMLDivElement;
|
|
44
|
+
colorPickerPanelDot?: HTMLDivElement;
|
|
45
|
+
colorPickerPanelSliderContainer?: HTMLDivElement;
|
|
46
|
+
colorPickerPanelSliderGroup?: HTMLDivElement;
|
|
47
|
+
colorPickerPanelSliderHue?: HTMLElement;
|
|
48
|
+
colorPickerPanelSliderAlpha?: HTMLElement;
|
|
49
|
+
colorPickerColorBlockInner?: HTMLDivElement;
|
|
50
|
+
colorPickerColorBlock?: HTMLDivElement;
|
|
51
|
+
colorPickerInnerContentSelect?: HTMLDivElement;
|
|
52
|
+
colorPickerPanelPalette?: HTMLDivElement;
|
|
53
|
+
colorPickerPanelSaturation?: HTMLDivElement;
|
|
54
|
+
colorPickerInputContainerSelect?: HTMLElement;
|
|
55
|
+
colorPickerInputContainerInputColor?: HTMLElement;
|
|
56
|
+
colorPickerInputContainerInputNumber?: HTMLElement;
|
|
57
|
+
colorPickerInputContainerSelectItem?: HTMLElement;
|
|
58
|
+
colorPickerPaletteSelect: boolean;
|
|
59
|
+
colorPickerPanelDotInner?: HTMLDivElement;
|
|
60
|
+
static get observedAttributes(): string[];
|
|
61
|
+
constructor();
|
|
62
|
+
get value(): string;
|
|
63
|
+
set value(value: string);
|
|
64
|
+
createContext: () => void;
|
|
65
|
+
/**
|
|
66
|
+
* @description: 0 - 360 色相 hue
|
|
67
|
+
* @param {*} Signal
|
|
68
|
+
* @return {*}
|
|
69
|
+
*/
|
|
70
|
+
createColorHue: () => Signal<number>;
|
|
71
|
+
/**
|
|
72
|
+
* @description: 0 - 100 饱和度 x
|
|
73
|
+
* @param {*} Signal
|
|
74
|
+
* @return {*}
|
|
75
|
+
*/
|
|
76
|
+
createColorSaturation: () => Signal<number>;
|
|
77
|
+
/**
|
|
78
|
+
* @description: 0 - 100 亮度 y
|
|
79
|
+
* @param {*} Signal
|
|
80
|
+
* @return {*}
|
|
81
|
+
*/
|
|
82
|
+
createColorLightness: () => Signal<number>;
|
|
83
|
+
/**
|
|
84
|
+
* @description: 0 - 100 透明度
|
|
85
|
+
* @param {*} Signal
|
|
86
|
+
* @return {*}
|
|
87
|
+
*/
|
|
88
|
+
createColorTransparency: () => Signal<number>;
|
|
89
|
+
createColorDisabled: () => Signal<boolean>;
|
|
90
|
+
createColorValueSignal: () => Signal<string>;
|
|
91
|
+
generateHue2rgb: () => string;
|
|
92
|
+
generateHsv2Rgb: () => string;
|
|
93
|
+
generateHsv2Rgba: () => RGBA;
|
|
94
|
+
generateHsv2RgbaValue: () => string;
|
|
95
|
+
generateColorPickerProgress: () => string;
|
|
96
|
+
updateColorValue: (value: string) => void;
|
|
97
|
+
updateColorPickerPanelSliderHueProgressPercent: (hue: number) => void;
|
|
98
|
+
updateColorPickerPanelSliderAlphaProgressPercent: (alpha: number) => void;
|
|
99
|
+
updateColorPickerPanelSliderAlphaProgressWrap: () => void;
|
|
100
|
+
updateColorPickerPanelSliderAlphaProgressDot: () => void;
|
|
101
|
+
updateColorPickerPanelSliderHueProgressDot: () => void;
|
|
102
|
+
updateColorPickerColorBlockInnerBackground: () => void;
|
|
103
|
+
updateColorPickerPanelSaturationBackground: () => void;
|
|
104
|
+
clickStop: (e: MouseEvent) => void;
|
|
105
|
+
changeColorPalettePositionByContext: () => void;
|
|
106
|
+
changeColorPalettePosition: (offsetX: number, offsetY: number) => void;
|
|
107
|
+
clickColorPalette: (e: MouseEvent) => void;
|
|
108
|
+
createColorPickerProgress: () => void;
|
|
109
|
+
changeColorPickerHue: (e: Event) => void;
|
|
110
|
+
changeColorPickerAlpha: (e: Event) => void;
|
|
111
|
+
createColorPickerSelect: () => void;
|
|
112
|
+
createColorPickerInput: () => void;
|
|
113
|
+
openColorPicker: () => void;
|
|
114
|
+
mouseMoveColorPickerPalette: (e: MouseEvent) => void;
|
|
115
|
+
mouseDownColorPickerPalette: (e: MouseEvent) => void;
|
|
116
|
+
mouseUpColorPickerPalette: (e: MouseEvent) => void;
|
|
117
|
+
connectedCallback(): void;
|
|
118
|
+
disconnectCallback(): void;
|
|
119
|
+
attributeChangedCallback(n: string, o: string, v: string): void;
|
|
120
|
+
}
|
|
121
|
+
declare const _default: import("@/utils/index").CustomErrorType;
|
|
122
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
declare const Content_base: {
|
|
3
|
+
new (): HTMLElement;
|
|
4
|
+
prototype: HTMLElement;
|
|
5
|
+
};
|
|
6
|
+
export declare class Content extends Content_base {
|
|
7
|
+
observer: MutationObserver;
|
|
8
|
+
constructor();
|
|
9
|
+
callback: (mutations: MutationRecord[], observer: MutationObserver) => void;
|
|
10
|
+
onChange: (mutation: MutationRecord) => void;
|
|
11
|
+
connectedCallback(): void;
|
|
12
|
+
disconnectCallback(): void;
|
|
13
|
+
}
|
|
14
|
+
declare const _default: import("@/utils/index").CustomErrorType;
|
|
15
|
+
export default _default;
|
|
@@ -1,2 +1,209 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const Input_base: {
|
|
2
|
+
new (): HTMLElement;
|
|
3
|
+
prototype: HTMLElement;
|
|
4
|
+
};
|
|
5
|
+
export declare class Input extends Input_base {
|
|
6
|
+
static get observedAttributes(): string[];
|
|
7
|
+
_input: HTMLDivElement;
|
|
8
|
+
_label: HTMLLabelElement | undefined;
|
|
9
|
+
_inputContent: HTMLInputElement;
|
|
10
|
+
_icon: HTMLElement | undefined;
|
|
11
|
+
constructor();
|
|
12
|
+
/**
|
|
13
|
+
* @description: 获取 input 的值
|
|
14
|
+
* @return {String}
|
|
15
|
+
*/
|
|
16
|
+
get value(): string;
|
|
17
|
+
/**
|
|
18
|
+
* @description: 设置 input 的值
|
|
19
|
+
* @param {String} value
|
|
20
|
+
*/
|
|
21
|
+
set value(value: string);
|
|
22
|
+
/**
|
|
23
|
+
* @description: 获取 input 的占位字符
|
|
24
|
+
* @return {String}
|
|
25
|
+
*/
|
|
26
|
+
get placeholder(): string;
|
|
27
|
+
/**
|
|
28
|
+
* @description: 设置 input 的占位字符
|
|
29
|
+
* @param {String} value
|
|
30
|
+
*/
|
|
31
|
+
set placeholder(value: string);
|
|
32
|
+
/**
|
|
33
|
+
* @description: input 是否为必选
|
|
34
|
+
* @return {String}
|
|
35
|
+
*/
|
|
36
|
+
get required(): string;
|
|
37
|
+
/**
|
|
38
|
+
* @description: 设置 input 是否为必选,除非设置成 false,否则都是必填
|
|
39
|
+
* @param {*} value
|
|
40
|
+
*/
|
|
41
|
+
set required(value: string);
|
|
42
|
+
/**
|
|
43
|
+
* @description: 获取 input 上 disabled 属性
|
|
44
|
+
* @return {String | null}
|
|
45
|
+
*/
|
|
46
|
+
get disabled(): string;
|
|
47
|
+
/**
|
|
48
|
+
* @description: 设置 input 的 disabled 属性
|
|
49
|
+
* @param {String} value
|
|
50
|
+
*/
|
|
51
|
+
set disabled(value: string);
|
|
52
|
+
/**
|
|
53
|
+
* @description: 获取类似于 Metiral Design 的输入体验。
|
|
54
|
+
*/
|
|
55
|
+
get label(): string;
|
|
56
|
+
/**
|
|
57
|
+
* @description: 设置类似于 Metiral Design 的输入体验。
|
|
58
|
+
*/
|
|
59
|
+
set label(value: string);
|
|
60
|
+
/**
|
|
61
|
+
* @description: 获取 input 框的状态
|
|
62
|
+
*/
|
|
63
|
+
get status(): string;
|
|
64
|
+
/**
|
|
65
|
+
* @description: 设置 input 框的状态
|
|
66
|
+
*/
|
|
67
|
+
set status(value: string);
|
|
68
|
+
/**
|
|
69
|
+
* @description: 与 form 组件联动时,收集的属性名
|
|
70
|
+
* @return {String}
|
|
71
|
+
*/
|
|
72
|
+
get name(): string;
|
|
73
|
+
/**
|
|
74
|
+
* @description: 设置 name 属性
|
|
75
|
+
* @param {string} value
|
|
76
|
+
*/
|
|
77
|
+
set name(value: string);
|
|
78
|
+
/**
|
|
79
|
+
* @description: 当 input 类型为 number 类型时,可以获取 min 属性
|
|
80
|
+
* @return {String}
|
|
81
|
+
*/
|
|
82
|
+
get min(): string;
|
|
83
|
+
/**
|
|
84
|
+
* @description: 当 input 类型为 number 类型时,设置 min 属性
|
|
85
|
+
* @param {string} value
|
|
86
|
+
*/
|
|
87
|
+
set min(value: string);
|
|
88
|
+
/**
|
|
89
|
+
* @description: 当 input 类型为 number 类型时,可以获取 max 属性
|
|
90
|
+
* @return {String}
|
|
91
|
+
*/
|
|
92
|
+
get max(): string;
|
|
93
|
+
/**
|
|
94
|
+
* @description: 当 input 类型为 number 类型时,设置 max 属性
|
|
95
|
+
* @param {string} value
|
|
96
|
+
*/
|
|
97
|
+
set max(value: string);
|
|
98
|
+
/**
|
|
99
|
+
* @description: 当 input 类型为 number 类型时,可以获取 step 属性
|
|
100
|
+
* @return {String}
|
|
101
|
+
*/
|
|
102
|
+
get step(): string;
|
|
103
|
+
/**
|
|
104
|
+
* @description: 当 input 类型为 number 类型时,设置 step 属性
|
|
105
|
+
* @param {string} value
|
|
106
|
+
*/
|
|
107
|
+
set step(value: string);
|
|
108
|
+
/**
|
|
109
|
+
* @description: 获取一个 icon
|
|
110
|
+
* @return {String}
|
|
111
|
+
*/
|
|
112
|
+
get icon(): string;
|
|
113
|
+
/**
|
|
114
|
+
* @description: 设置 icon 来表示标识
|
|
115
|
+
* @param {string|null} value
|
|
116
|
+
*/
|
|
117
|
+
set icon(value: string);
|
|
118
|
+
/**
|
|
119
|
+
* @description: 获取前面的 icon
|
|
120
|
+
* @return {String}
|
|
121
|
+
*/
|
|
122
|
+
get prefix(): string;
|
|
123
|
+
/**
|
|
124
|
+
* @description: 设置前面的 icon 来表示标识
|
|
125
|
+
* @param {string|null} value
|
|
126
|
+
*/
|
|
127
|
+
set prefix(value: string);
|
|
128
|
+
/**
|
|
129
|
+
* @description: 获取后面的 icon
|
|
130
|
+
* @return {String}
|
|
131
|
+
*/
|
|
132
|
+
get suffix(): string;
|
|
133
|
+
/**
|
|
134
|
+
* @description: 设置后面的 icon 来表示标识
|
|
135
|
+
* @param {string|null} value
|
|
136
|
+
*/
|
|
137
|
+
set suffix(value: string);
|
|
138
|
+
/**
|
|
139
|
+
* @description: 获取 input 的类型
|
|
140
|
+
* @return {string|null}
|
|
141
|
+
*/
|
|
142
|
+
get type(): string;
|
|
143
|
+
/**
|
|
144
|
+
* @description: 设置 input 的类型
|
|
145
|
+
* @param {string|null} value
|
|
146
|
+
*/
|
|
147
|
+
set type(value: string);
|
|
148
|
+
/**
|
|
149
|
+
* @description: 原生的 input 方法
|
|
150
|
+
* @param {Event} event
|
|
151
|
+
*/
|
|
152
|
+
customInput: (event: Event) => void;
|
|
153
|
+
/**
|
|
154
|
+
* @description: 增加 change 方法,同时兼容大小写的情况
|
|
155
|
+
*/
|
|
156
|
+
customChange: () => void;
|
|
157
|
+
/**
|
|
158
|
+
* @description: 监听 placeholder 属性函数
|
|
159
|
+
* @param {string} name
|
|
160
|
+
* @param {string} value
|
|
161
|
+
*/
|
|
162
|
+
listenPlaceholder: (name: string, value: string) => void;
|
|
163
|
+
/**
|
|
164
|
+
* @description: 监听 label 属性函数
|
|
165
|
+
* @param {string} name
|
|
166
|
+
* @param {string} value
|
|
167
|
+
*/
|
|
168
|
+
listenLabel: (name: string, value: string) => void;
|
|
169
|
+
/**
|
|
170
|
+
* @description: 监听 type 属性
|
|
171
|
+
* @param {string} name
|
|
172
|
+
* @param {string} value
|
|
173
|
+
*/
|
|
174
|
+
listenType: (name: string, value: string) => void;
|
|
175
|
+
/**
|
|
176
|
+
* @description: 监听 status 属性
|
|
177
|
+
* @param {string} name
|
|
178
|
+
* @param {string} value
|
|
179
|
+
*/
|
|
180
|
+
listenStatus: (name: string, value: string) => void;
|
|
181
|
+
/**
|
|
182
|
+
* @description: 监听 disabled 属性
|
|
183
|
+
* @param {string} name
|
|
184
|
+
* @param {string} value
|
|
185
|
+
*/
|
|
186
|
+
listenDisabled: (name: string, value: string) => void;
|
|
187
|
+
/**
|
|
188
|
+
* @description: 监听 icon 属性
|
|
189
|
+
* @param {string} name
|
|
190
|
+
* @param {string} value
|
|
191
|
+
*/
|
|
192
|
+
listenIcon: (name: string, value: string, oldValue: string) => void;
|
|
193
|
+
/**
|
|
194
|
+
* @description: 处理 icon 属性的问题
|
|
195
|
+
*/
|
|
196
|
+
dealIcon: () => void;
|
|
197
|
+
/**
|
|
198
|
+
* @description: 聚合监听事件
|
|
199
|
+
* @param {string} name
|
|
200
|
+
* @param {string} oldValue
|
|
201
|
+
* @param {string} newValue
|
|
202
|
+
*/
|
|
203
|
+
listenEvent: (name: string, oldValue: string, newValue: string) => void;
|
|
204
|
+
connectedCallback(): void;
|
|
205
|
+
disconnectCallback(): void;
|
|
206
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
207
|
+
}
|
|
208
|
+
declare const _default: import("@/utils/index").CustomErrorType;
|
|
2
209
|
export default _default;
|