ranui 0.1.0-alpha → 0.1.1-alpha.12

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.
Files changed (106) hide show
  1. package/LICENSE +21 -0
  2. package/dist/_commonjs-dynamic-modules-2ceabb0b.js +12 -0
  3. package/dist/add-user-d07564bd.js +4 -0
  4. package/dist/book-2a5a596c.js +4 -0
  5. package/dist/check-circle-2c986969.js +4 -0
  6. package/dist/check-circle-fill-62eaa796.js +4 -0
  7. package/dist/close-circle-2afb6e94.js +4 -0
  8. package/dist/close-circle-fill-b6906239.js +4 -0
  9. package/dist/close-ee3ba1d1.js +4 -0
  10. package/dist/colz-746223ab.js +241 -0
  11. package/dist/components/button/index.d.ts +331 -1
  12. package/dist/components/icon/index.d.ts +2 -0
  13. package/dist/components/input/index.d.ts +435 -1
  14. package/dist/components/message/index.d.ts +8 -0
  15. package/dist/components/preview/colz.d.ts +72 -0
  16. package/dist/components/preview/docx.d.ts +8 -0
  17. package/dist/components/preview/excel/excel.d.ts +11 -0
  18. package/dist/components/preview/excel/index.d.ts +1 -0
  19. package/dist/components/preview/excel/media.d.ts +37 -0
  20. package/dist/components/preview/index.d.ts +2 -0
  21. package/dist/components/preview/pdf.d.ts +1 -0
  22. package/dist/components/preview/pptx/index.d.ts +16 -0
  23. package/dist/components/preview/pptx/process_pptx.d.ts +23 -0
  24. package/dist/components/preview/pptx/t_xml.d.ts +1 -0
  25. package/dist/components/preview/pptx/worker.d.ts +1 -0
  26. package/dist/components/skeleton/index.d.ts +2 -0
  27. package/dist/components/tabpane/index.d.ts +327 -0
  28. package/dist/components/tabs/index.d.ts +382 -1
  29. package/dist/components/video/index.d.ts +393 -0
  30. package/dist/docx-a71f9b36.js +2635 -0
  31. package/dist/eye-bd60afe1.js +4 -0
  32. package/dist/eye-close-bde3c1fc.js +4 -0
  33. package/dist/home-f824d8f4.js +4 -0
  34. package/dist/index-b14db636.js +23075 -0
  35. package/dist/index-d9a6fb36.js +1756 -0
  36. package/dist/index-eca1b437.js +85583 -0
  37. package/dist/index.d.ts +9 -0
  38. package/dist/index.js +11 -676
  39. package/dist/index.umd.cjs +53 -2
  40. package/dist/info-circle-59333e1c.js +4 -0
  41. package/dist/info-circle-fill-3ab7660d.js +4 -0
  42. package/dist/jszip.min-97cf7c6a.js +2655 -0
  43. package/dist/loading-407d8249.js +4 -0
  44. package/dist/lock-6d20715b.js +4 -0
  45. package/dist/message-ee4fe153.js +4 -0
  46. package/dist/pdf-f6057747.js +112 -0
  47. package/dist/playwright.config.d.ts +11 -0
  48. package/dist/plugins/auto-import-file.d.ts +10 -0
  49. package/dist/plugins/load-style.d.ts +6 -0
  50. package/dist/plugins/load-svg.d.ts +9 -0
  51. package/dist/power-off-bbec6b5f.js +4 -0
  52. package/dist/preview-164a4944.js +4 -0
  53. package/dist/setting-735a1963.js +4 -0
  54. package/dist/style.css +1 -1
  55. package/dist/team-42573142.js +4 -0
  56. package/dist/tests/button.spec.d.ts +1 -0
  57. package/dist/unlock-ae33c6f7.js +4 -0
  58. package/dist/user-b7098183.js +4 -0
  59. package/dist/utils/index.d.ts +34 -4
  60. package/dist/vite.config.d.ts +2 -0
  61. package/dist/warning-circle-536d4749.js +4 -0
  62. package/dist/warning-circle-fill-e4be98bc.js +4 -0
  63. package/package.json +51 -17
  64. package/readme.md +71 -0
  65. package/.vitepress/config.ts +0 -26
  66. package/.vitepress/theme/index.ts +0 -9
  67. package/assets/image/failImage.ts +0 -4
  68. package/assets/svgs/check-circle.svg +0 -4
  69. package/assets/svgs/close-circle.svg +0 -4
  70. package/assets/svgs/eye-close.svg +0 -4
  71. package/assets/svgs/eye.svg +0 -4
  72. package/assets/svgs/info-circle.svg +0 -5
  73. package/assets/svgs/lock.svg +0 -4
  74. package/assets/svgs/unlock.svg +0 -4
  75. package/assets/svgs/user.svg +0 -3
  76. package/components/button/index.less +0 -95
  77. package/components/button/index.ts +0 -64
  78. package/components/form/index.ts +0 -36
  79. package/components/image/index.less +0 -0
  80. package/components/image/index.ts +0 -62
  81. package/components/input/index.less +0 -114
  82. package/components/input/index.ts +0 -367
  83. package/components/modal/index.less +0 -0
  84. package/components/modal/index.ts +0 -118
  85. package/components/tabPane/index.less +0 -0
  86. package/components/tabPane/index.ts +0 -71
  87. package/components/tabs/index.less +0 -47
  88. package/components/tabs/index.ts +0 -207
  89. package/dist/index.js.map +0 -1
  90. package/dist/index.umd.cjs.map +0 -1
  91. package/dist/typings.d.ts +0 -4
  92. package/docs/button/index.md +0 -25
  93. package/docs/image/index.md +0 -9
  94. package/docs/input/index.md +0 -146
  95. package/docs/tabs/index.md +0 -121
  96. package/index.html +0 -67
  97. package/index.md +0 -1
  98. package/index.ts +0 -6
  99. package/plugins/auto-import-file.ts +0 -59
  100. package/plugins/load-style.ts +0 -31
  101. package/tsconfig.json +0 -31
  102. package/typings.d.ts +0 -4
  103. package/utils/index.ts +0 -12
  104. package/vite.config.ts +0 -58
  105. /package/{components/form/index.less → dist/component.d.ts} +0 -0
  106. /package/dist/components/{tabPane → form}/index.d.ts +0 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 chaxus
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -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,4 @@
1
+ const addUser = { "_identification": true, "data": '<svg t="1667110768583" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8046" width="200" height="200"><path d="M678.3 642.4c24.2-13 51.9-20.4 81.4-20.4h0.1c3 0 4.4-3.6 2.2-5.6-30.8-27.6-65.6-49.7-103.7-65.8-0.4-0.2-0.8-0.3-1.2-0.5C719.2 505 759.6 431.7 759.6 349c0-137-110.8-248-247.5-248S264.7 212 264.7 349c0 82.7 40.4 156 102.6 201.1-0.4 0.2-0.8 0.3-1.2 0.5-44.7 18.9-84.8 46-119.3 80.6-34.5 34.5-61.5 74.7-80.4 119.5C147.9 794.5 138 841 137 888.8c-0.1 4.5 3.5 8.2 8 8.2h59.9c4.3 0 7.9-3.5 8-7.8 2-77.2 32.9-149.5 87.6-204.3C357 628.2 432.2 597 512.2 597c56.7 0 111.1 15.7 158 45.1 2.5 1.5 5.5 1.7 8.1 0.3zM512.2 521c-45.8 0-88.9-17.9-121.4-50.4-32.4-32.5-50.3-75.7-50.3-121.6 0-45.9 17.9-89.1 50.3-121.6S466.3 177 512.2 177s88.9 17.9 121.4 50.4c32.4 32.5 50.3 75.7 50.3 121.6 0 45.9-17.9 89.1-50.3 121.6C601.1 503.1 558 521 512.2 521zM880 759h-84v-84c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v84h-84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h84v84c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-84h84c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z" p-id="8047"></path></svg>' };
2
+ export {
3
+ addUser as default
4
+ };
@@ -0,0 +1,4 @@
1
+ const book = { "_identification": true, "data": '<svg t="1667110830636" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8464" width="200" height="200"><path d="M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32z m-260 72h96v209.9L621.5 312 572 347.4V136z m220 752H232V136h280v296.9c0 3.3 1 6.6 3 9.3 5.1 7.2 15.1 8.9 22.3 3.7l83.8-59.9 81.4 59.4c2.7 2 6 3.1 9.4 3.1 8.8 0 16-7.2 16-16V136h64v752z" p-id="8465"></path></svg>' };
2
+ export {
3
+ book as default
4
+ };
@@ -0,0 +1,4 @@
1
+ const checkCircle = { "_identification": true, "data": '<svg t="1667483538687" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8683" width="200" height="200"><path d="M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8c12.7 17.7 39 17.7 51.7 0l210.6-292c3.9-5.3 0.1-12.7-6.4-12.7z" p-id="8684"></path><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" p-id="8685"></path></svg>' };
2
+ export {
3
+ checkCircle as default
4
+ };
@@ -0,0 +1,4 @@
1
+ const checkCircleFill = { "_identification": true, "data": '<svg t="1667965185400" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8572" width="200" height="200"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m193.5 301.7l-210.6 292c-12.7 17.7-39 17.7-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" p-id="8573"></path></svg>' };
2
+ export {
3
+ checkCircleFill as default
4
+ };
@@ -0,0 +1,4 @@
1
+ const closeCircle = { "_identification": true, "data": '<svg t="1667483596224" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8848" width="200" height="200"><path d="M685.4 354.8c0-4.4-3.6-8-8-8l-66 0.3L512 465.6l-99.3-118.4-66.1-0.3c-4.4 0-8 3.5-8 8 0 1.9 0.7 3.7 1.9 5.2l130.1 155L340.5 670c-1.2 1.5-1.9 3.3-1.9 5.2 0 4.4 3.6 8 8 8l66.1-0.3L512 564.4l99.3 118.4 66 0.3c4.4 0 8-3.5 8-8 0-1.9-0.7-3.7-1.9-5.2L553.5 515l130.1-155c1.2-1.4 1.8-3.3 1.8-5.2z" p-id="8849"></path><path d="M512 65C264.6 65 64 265.6 64 513s200.6 448 448 448 448-200.6 448-448S759.4 65 512 65z m0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" p-id="8850"></path></svg>' };
2
+ export {
3
+ closeCircle as default
4
+ };
@@ -0,0 +1,4 @@
1
+ const closeCircleFill = { "_identification": true, "data": '<svg t="1667965220951" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8711" width="200" height="200"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m165.4 618.2l-66-0.3L512 563.4l-99.3 118.4-66.1 0.3c-4.4 0-8-3.5-8-8 0-1.9 0.7-3.7 1.9-5.2l130.1-155L340.5 359c-1.2-1.5-1.9-3.3-1.9-5.2 0-4.4 3.6-8 8-8l66.1 0.3L512 464.6l99.3-118.4 66-0.3c4.4 0 8 3.5 8 8 0 1.9-0.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z" p-id="8712"></path></svg>' };
2
+ export {
3
+ closeCircleFill as default
4
+ };
@@ -0,0 +1,4 @@
1
+ const close = { "_identification": true, "data": '<svg t="1688378016663" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2608" width="128" height="128"><path d="M568 515.008l254.016-255.008q12-11.008 12-27.488t-11.488-28-28-11.488-27.488 12l-255.008 254.016-255.008-254.016q-11.008-12-27.488-12t-28 11.488-11.488 28 12 27.488l254.016 255.008-254.016 255.008q-12 11.008-12 27.488t11.488 28 28 11.488 27.488-12l255.008-255.008 255.008 255.008q11.008 12 27.488 12t28-11.488 11.488-28-12-27.488z" p-id="2609" ></path></svg>' };
2
+ export {
3
+ close as default
4
+ };
@@ -0,0 +1,241 @@
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
+ const round = Math.round;
8
+ class Rgb {
9
+ constructor(col) {
10
+ __publicField(this, "r");
11
+ __publicField(this, "g");
12
+ __publicField(this, "b");
13
+ this.r = col[0];
14
+ this.g = col[1];
15
+ this.b = col[2];
16
+ }
17
+ toString() {
18
+ return `rgb(${this.r},${this.g},${this.b})`;
19
+ }
20
+ }
21
+ class Rgba extends Rgb {
22
+ constructor(col) {
23
+ super(col);
24
+ __publicField(this, "a");
25
+ this.a = col[3];
26
+ }
27
+ toString() {
28
+ return `rgba(${this.r},${this.g},${this.b},${this.a})`;
29
+ }
30
+ }
31
+ class Hsl {
32
+ constructor(col) {
33
+ __publicField(this, "h");
34
+ __publicField(this, "s");
35
+ __publicField(this, "l");
36
+ this.h = col[0];
37
+ this.s = col[1];
38
+ this.l = col[2];
39
+ }
40
+ toString() {
41
+ return `hsl(${this.h},${this.s}%,${this.l}%)`;
42
+ }
43
+ }
44
+ class Hsla extends Hsl {
45
+ constructor(col) {
46
+ super(col);
47
+ __publicField(this, "a");
48
+ this.a = col[3];
49
+ }
50
+ toString() {
51
+ return `hsla(${this.h},${this.s}%,${this.l}%,${this.a})`;
52
+ }
53
+ }
54
+ class Color {
55
+ constructor(r, g = 0, b = 0, a = 1) {
56
+ __publicField(this, "r");
57
+ __publicField(this, "g");
58
+ __publicField(this, "b");
59
+ __publicField(this, "a");
60
+ __publicField(this, "rgb");
61
+ __publicField(this, "rgba");
62
+ __publicField(this, "hex");
63
+ __publicField(this, "hsl");
64
+ __publicField(this, "hsla");
65
+ __publicField(this, "h");
66
+ __publicField(this, "s");
67
+ __publicField(this, "l");
68
+ if (typeof r === "string") {
69
+ let str = r;
70
+ if (str.charAt(0) !== "#") {
71
+ str = "#" + str;
72
+ }
73
+ if (str.length < 7) {
74
+ str = "#" + str[1] + str[1] + str[2] + str[2] + str[3] + str[3];
75
+ }
76
+ [r, g, b] = hexToRgb(str);
77
+ } else if (r instanceof Array) {
78
+ a = r[3] || a;
79
+ b = r[2];
80
+ g = r[1];
81
+ r = r[0];
82
+ }
83
+ this.r = Number(r);
84
+ this.g = Number(g);
85
+ this.b = Number(b);
86
+ this.a = a;
87
+ this.rgb = new Rgb([this.r, this.g, this.b]);
88
+ this.rgba = new Rgba([this.r, this.g, this.b, this.a]);
89
+ this.hex = rgbToHex(this.r, this.g, this.b);
90
+ this.hsl = new Hsl(rgbToHsl(this.r, this.g, this.b));
91
+ this.h = this.hsl.h;
92
+ this.s = this.hsl.s;
93
+ this.l = this.hsl.l;
94
+ this.hsla = new Hsla([this.h, this.s, this.l, this.a]);
95
+ }
96
+ setHue(newHue) {
97
+ this.h = newHue;
98
+ this.hsl.h = newHue;
99
+ this.hsla.h = newHue;
100
+ this.updateFromHsl();
101
+ }
102
+ setSat(newSat) {
103
+ this.s = newSat;
104
+ this.hsl.s = newSat;
105
+ this.hsla.s = newSat;
106
+ this.updateFromHsl();
107
+ }
108
+ setLum(newLum) {
109
+ this.l = newLum;
110
+ this.hsl.l = newLum;
111
+ this.hsla.l = newLum;
112
+ this.updateFromHsl();
113
+ }
114
+ setAlpha(newAlpha) {
115
+ this.a = newAlpha;
116
+ this.hsla.a = newAlpha;
117
+ this.rgba.a = newAlpha;
118
+ }
119
+ updateFromHsl() {
120
+ this.rgb = new Rgb(hslToRgb(this.h, this.s, this.l));
121
+ this.r = this.rgb.r;
122
+ this.g = this.rgb.g;
123
+ this.b = this.rgb.b;
124
+ this.rgba.r = this.rgb.r;
125
+ this.rgba.g = this.rgb.g;
126
+ this.rgba.b = this.rgb.b;
127
+ this.hex = rgbToHex([this.r, this.g, this.b]);
128
+ }
129
+ }
130
+ const hexToRgb = function(hex) {
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;
137
+ };
138
+ const getDarkColor = (color, level) => {
139
+ const rgbc = hexToRgb(color) || [];
140
+ for (let i = 0; i < 3; i++)
141
+ rgbc[i] = Math.floor(Number(rgbc[i]) * (1 - level));
142
+ return rgbToHex(rgbc[0], rgbc[1], rgbc[2]);
143
+ };
144
+ function getLightColor(color, level) {
145
+ const rgbc = hexToRgb(color) || [];
146
+ for (let i = 0; i < 3; i++)
147
+ rgbc[i] = Math.floor((255 - Number(rgbc[i])) * level + Number(rgbc[i]));
148
+ return rgbToHex(rgbc[0], rgbc[1], rgbc[2]);
149
+ }
150
+ const componentToHex = function(c) {
151
+ const hex = c.toString(16);
152
+ return hex.length === 1 ? "0" + hex : hex;
153
+ };
154
+ const rgbToHex = function(r, g = 0, b = 0) {
155
+ if (r instanceof Array) {
156
+ b = r[2];
157
+ g = r[1];
158
+ r = r[0];
159
+ }
160
+ return "#" + componentToHex(r) + componentToHex(g) + componentToHex(b);
161
+ };
162
+ const rgbToHsl = function(r, g = 0, b = 0) {
163
+ if (r instanceof Array) {
164
+ b = r[2];
165
+ g = r[1];
166
+ r = r[0];
167
+ }
168
+ let s, l, d, h = 0;
169
+ r /= 255;
170
+ g /= 255;
171
+ b /= 255;
172
+ const max = Math.max(r, g, b);
173
+ const min = Math.min(r, g, b);
174
+ l = (max + min) / 2;
175
+ if (max === min) {
176
+ h = s = 0;
177
+ } else {
178
+ d = max - min;
179
+ s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
180
+ switch (max) {
181
+ case r:
182
+ h = (g - b) / d + (g < b ? 6 : 0);
183
+ break;
184
+ case g:
185
+ h = (b - r) / d + 2;
186
+ break;
187
+ case b:
188
+ h = (r - g) / d + 4;
189
+ break;
190
+ }
191
+ h /= 6;
192
+ }
193
+ h = round(h * 360);
194
+ s = round(s * 100);
195
+ l = round(l * 100);
196
+ return [h, s, l];
197
+ };
198
+ const hue2rgb = function(p, q, t) {
199
+ if (t < 0) {
200
+ t += 1;
201
+ }
202
+ if (t > 1) {
203
+ t -= 1;
204
+ }
205
+ if (t < 1 / 6) {
206
+ return p + (q - p) * 6 * t;
207
+ }
208
+ if (t < 1 / 2) {
209
+ return q;
210
+ }
211
+ if (t < 2 / 3) {
212
+ return p + (q - p) * (2 / 3 - t) * 6;
213
+ }
214
+ return p;
215
+ };
216
+ const hslToRgb = function(h, s, l) {
217
+ if (h instanceof Array) {
218
+ l = h[2];
219
+ s = h[1];
220
+ h = h[0];
221
+ }
222
+ h = Number(h) / 360;
223
+ s = Number(s) / 100;
224
+ l = Number(l) / 100;
225
+ let r, g, b, q, p;
226
+ if (s === 0) {
227
+ r = g = b = l;
228
+ } else {
229
+ q = l < 0.5 ? l * (1 + s) : l + s - l * s;
230
+ p = 2 * l - q;
231
+ r = hue2rgb(p, q, h + 1 / 3);
232
+ g = hue2rgb(p, q, h);
233
+ b = hue2rgb(p, q, h - 1 / 3);
234
+ }
235
+ return [round(r * 255), round(g * 255), round(b * 255)];
236
+ };
237
+ export {
238
+ Color as C,
239
+ getDarkColor as a,
240
+ getLightColor as g
241
+ };
@@ -1,2 +1,332 @@
1
- declare const _default: void;
1
+ declare class CustomError {
2
+ message: string;
3
+ constructor(message?: string);
4
+ }
5
+ declare const _default: typeof CustomError | {
6
+ new (): {
7
+ _btn: HTMLDivElement;
8
+ _iconElement?: HTMLElement | undefined;
9
+ _slot: HTMLSlotElement;
10
+ _shadowDom: ShadowRoot;
11
+ sheet: string | null;
12
+ disabled: string | boolean | null | undefined;
13
+ iconSize: string | null | undefined;
14
+ icon: string | null;
15
+ effect: string | null;
16
+ /**
17
+ * @description: 设置button的icon
18
+ * @return {*}
19
+ */
20
+ setIcon: () => void;
21
+ mousedown: (event: MouseEvent) => void;
22
+ mouseLeave: () => void;
23
+ handlerExternalCss(): void;
24
+ connectedCallback(): void;
25
+ disconnectCallback(): void;
26
+ attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
27
+ accessKey: string;
28
+ readonly accessKeyLabel: string;
29
+ autocapitalize: string;
30
+ dir: string;
31
+ draggable: boolean;
32
+ hidden: boolean;
33
+ inert: boolean;
34
+ innerText: string;
35
+ lang: string;
36
+ readonly offsetHeight: number;
37
+ readonly offsetLeft: number;
38
+ readonly offsetParent: Element | null;
39
+ readonly offsetTop: number;
40
+ readonly offsetWidth: number;
41
+ outerText: string;
42
+ spellcheck: boolean;
43
+ title: string;
44
+ translate: boolean;
45
+ attachInternals(): ElementInternals;
46
+ click(): void;
47
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
48
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
49
+ removeEventListener<K_1 extends keyof HTMLElementEventMap>(type: K_1, listener: (this: HTMLElement, ev: HTMLElementEventMap[K_1]) => any, options?: boolean | EventListenerOptions | undefined): void;
50
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
51
+ readonly attributes: NamedNodeMap;
52
+ readonly classList: DOMTokenList;
53
+ className: string;
54
+ readonly clientHeight: number;
55
+ readonly clientLeft: number;
56
+ readonly clientTop: number;
57
+ readonly clientWidth: number;
58
+ id: string;
59
+ readonly localName: string;
60
+ readonly namespaceURI: string | null;
61
+ onfullscreenchange: ((this: Element, ev: Event) => any) | null;
62
+ onfullscreenerror: ((this: Element, ev: Event) => any) | null;
63
+ outerHTML: string;
64
+ readonly ownerDocument: Document;
65
+ readonly part: DOMTokenList;
66
+ readonly prefix: string | null;
67
+ readonly scrollHeight: number;
68
+ scrollLeft: number;
69
+ scrollTop: number;
70
+ readonly scrollWidth: number;
71
+ readonly shadowRoot: ShadowRoot | null;
72
+ slot: string;
73
+ readonly tagName: string;
74
+ attachShadow(init: ShadowRootInit): ShadowRoot;
75
+ closest<K_2 extends keyof HTMLElementTagNameMap>(selector: K_2): HTMLElementTagNameMap[K_2] | null;
76
+ closest<K_3 extends keyof SVGElementTagNameMap>(selector: K_3): SVGElementTagNameMap[K_3] | null;
77
+ closest<E extends Element = Element>(selectors: string): E | null;
78
+ getAttribute(qualifiedName: string): string | null;
79
+ getAttributeNS(namespace: string | null, localName: string): string | null;
80
+ getAttributeNames(): string[];
81
+ getAttributeNode(qualifiedName: string): Attr | null;
82
+ getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
83
+ getBoundingClientRect(): DOMRect;
84
+ getClientRects(): DOMRectList;
85
+ getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
86
+ getElementsByTagName<K_4 extends keyof HTMLElementTagNameMap>(qualifiedName: K_4): HTMLCollectionOf<HTMLElementTagNameMap[K_4]>;
87
+ getElementsByTagName<K_5 extends keyof SVGElementTagNameMap>(qualifiedName: K_5): HTMLCollectionOf<SVGElementTagNameMap[K_5]>;
88
+ getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
89
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
90
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
91
+ getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
92
+ hasAttribute(qualifiedName: string): boolean;
93
+ hasAttributeNS(namespace: string | null, localName: string): boolean;
94
+ hasAttributes(): boolean;
95
+ hasPointerCapture(pointerId: number): boolean;
96
+ insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
97
+ insertAdjacentHTML(position: InsertPosition, text: string): void;
98
+ insertAdjacentText(where: InsertPosition, data: string): void;
99
+ matches(selectors: string): boolean;
100
+ releasePointerCapture(pointerId: number): void;
101
+ removeAttribute(qualifiedName: string): void;
102
+ removeAttributeNS(namespace: string | null, localName: string): void;
103
+ removeAttributeNode(attr: Attr): Attr;
104
+ requestFullscreen(options?: FullscreenOptions | undefined): Promise<void>;
105
+ requestPointerLock(): void;
106
+ scroll(options?: ScrollToOptions | undefined): void;
107
+ scroll(x: number, y: number): void;
108
+ scrollBy(options?: ScrollToOptions | undefined): void;
109
+ scrollBy(x: number, y: number): void;
110
+ scrollIntoView(arg?: boolean | ScrollIntoViewOptions | undefined): void;
111
+ scrollTo(options?: ScrollToOptions | undefined): void;
112
+ scrollTo(x: number, y: number): void;
113
+ setAttribute(qualifiedName: string, value: string): void;
114
+ setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
115
+ setAttributeNode(attr: Attr): Attr | null;
116
+ setAttributeNodeNS(attr: Attr): Attr | null;
117
+ setPointerCapture(pointerId: number): void;
118
+ toggleAttribute(qualifiedName: string, force?: boolean | undefined): boolean;
119
+ webkitMatchesSelector(selectors: string): boolean;
120
+ readonly baseURI: string;
121
+ readonly childNodes: NodeListOf<ChildNode>;
122
+ readonly firstChild: ChildNode | null;
123
+ readonly isConnected: boolean;
124
+ readonly lastChild: ChildNode | null;
125
+ readonly nextSibling: ChildNode | null;
126
+ readonly nodeName: string;
127
+ readonly nodeType: number;
128
+ nodeValue: string | null;
129
+ readonly parentElement: HTMLElement | null;
130
+ readonly parentNode: ParentNode | null;
131
+ readonly previousSibling: ChildNode | null;
132
+ textContent: string | null;
133
+ appendChild<T extends Node>(node: T): T;
134
+ cloneNode(deep?: boolean | undefined): Node;
135
+ compareDocumentPosition(other: Node): number;
136
+ contains(other: Node | null): boolean;
137
+ getRootNode(options?: GetRootNodeOptions | undefined): Node;
138
+ hasChildNodes(): boolean;
139
+ insertBefore<T_1 extends Node>(node: T_1, child: Node | null): T_1;
140
+ isDefaultNamespace(namespace: string | null): boolean;
141
+ isEqualNode(otherNode: Node | null): boolean;
142
+ isSameNode(otherNode: Node | null): boolean;
143
+ lookupNamespaceURI(prefix: string | null): string | null;
144
+ lookupPrefix(namespace: string | null): string | null;
145
+ normalize(): void;
146
+ removeChild<T_2 extends Node>(child: T_2): T_2;
147
+ replaceChild<T_3 extends Node>(node: Node, child: T_3): T_3;
148
+ readonly ATTRIBUTE_NODE: number;
149
+ readonly CDATA_SECTION_NODE: number;
150
+ readonly COMMENT_NODE: number;
151
+ readonly DOCUMENT_FRAGMENT_NODE: number;
152
+ readonly DOCUMENT_NODE: number;
153
+ readonly DOCUMENT_POSITION_CONTAINED_BY: number;
154
+ readonly DOCUMENT_POSITION_CONTAINS: number;
155
+ readonly DOCUMENT_POSITION_DISCONNECTED: number;
156
+ readonly DOCUMENT_POSITION_FOLLOWING: number;
157
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
158
+ readonly DOCUMENT_POSITION_PRECEDING: number;
159
+ readonly DOCUMENT_TYPE_NODE: number;
160
+ readonly ELEMENT_NODE: number;
161
+ readonly ENTITY_NODE: number;
162
+ readonly ENTITY_REFERENCE_NODE: number;
163
+ readonly NOTATION_NODE: number;
164
+ readonly PROCESSING_INSTRUCTION_NODE: number;
165
+ readonly TEXT_NODE: number;
166
+ dispatchEvent(event: Event): boolean;
167
+ ariaAtomic: string | null;
168
+ ariaAutoComplete: string | null;
169
+ ariaBusy: string | null;
170
+ ariaChecked: string | null;
171
+ ariaColCount: string | null;
172
+ ariaColIndex: string | null;
173
+ ariaColSpan: string | null;
174
+ ariaCurrent: string | null;
175
+ ariaDisabled: string | null;
176
+ ariaExpanded: string | null;
177
+ ariaHasPopup: string | null;
178
+ ariaHidden: string | null;
179
+ ariaKeyShortcuts: string | null;
180
+ ariaLabel: string | null;
181
+ ariaLevel: string | null;
182
+ ariaLive: string | null;
183
+ ariaModal: string | null;
184
+ ariaMultiLine: string | null;
185
+ ariaMultiSelectable: string | null;
186
+ ariaOrientation: string | null;
187
+ ariaPlaceholder: string | null;
188
+ ariaPosInSet: string | null;
189
+ ariaPressed: string | null;
190
+ ariaReadOnly: string | null;
191
+ ariaRequired: string | null;
192
+ ariaRoleDescription: string | null;
193
+ ariaRowCount: string | null;
194
+ ariaRowIndex: string | null;
195
+ ariaRowSpan: string | null;
196
+ ariaSelected: string | null;
197
+ ariaSetSize: string | null;
198
+ ariaSort: string | null;
199
+ ariaValueMax: string | null;
200
+ ariaValueMin: string | null;
201
+ ariaValueNow: string | null;
202
+ ariaValueText: string | null;
203
+ animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions | undefined): Animation;
204
+ getAnimations(options?: GetAnimationsOptions | undefined): Animation[];
205
+ after(...nodes: (string | Node)[]): void;
206
+ before(...nodes: (string | Node)[]): void;
207
+ remove(): void;
208
+ replaceWith(...nodes: (string | Node)[]): void;
209
+ innerHTML: string;
210
+ readonly nextElementSibling: Element | null;
211
+ readonly previousElementSibling: Element | null;
212
+ readonly childElementCount: number;
213
+ readonly children: HTMLCollection;
214
+ readonly firstElementChild: Element | null;
215
+ readonly lastElementChild: Element | null;
216
+ append(...nodes: (string | Node)[]): void;
217
+ prepend(...nodes: (string | Node)[]): void;
218
+ querySelector<K_6 extends keyof HTMLElementTagNameMap>(selectors: K_6): HTMLElementTagNameMap[K_6] | null;
219
+ querySelector<K_7 extends keyof SVGElementTagNameMap>(selectors: K_7): SVGElementTagNameMap[K_7] | null;
220
+ querySelector<E_1 extends Element = Element>(selectors: string): E_1 | null;
221
+ querySelectorAll<K_8 extends keyof HTMLElementTagNameMap>(selectors: K_8): NodeListOf<HTMLElementTagNameMap[K_8]>;
222
+ querySelectorAll<K_9 extends keyof SVGElementTagNameMap>(selectors: K_9): NodeListOf<SVGElementTagNameMap[K_9]>;
223
+ querySelectorAll<E_2 extends Element = Element>(selectors: string): NodeListOf<E_2>;
224
+ replaceChildren(...nodes: (string | Node)[]): void;
225
+ readonly assignedSlot: HTMLSlotElement | null;
226
+ oncopy: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
227
+ oncut: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
228
+ onpaste: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
229
+ readonly style: CSSStyleDeclaration;
230
+ contentEditable: string;
231
+ enterKeyHint: string;
232
+ inputMode: string;
233
+ readonly isContentEditable: boolean;
234
+ onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
235
+ onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
236
+ onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
237
+ onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
238
+ onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
239
+ onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
240
+ onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
241
+ oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
242
+ oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
243
+ onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
244
+ onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
245
+ onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
246
+ oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
247
+ oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
248
+ ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
249
+ ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
250
+ ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
251
+ ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
252
+ ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
253
+ ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
254
+ ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
255
+ ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
256
+ ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
257
+ onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
258
+ onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
259
+ onerror: OnErrorEventHandler;
260
+ onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
261
+ onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
262
+ ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
263
+ oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null;
264
+ oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
265
+ onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
266
+ onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
267
+ onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
268
+ onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
269
+ onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
270
+ onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
271
+ onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
272
+ onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
273
+ onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
274
+ onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
275
+ onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
276
+ onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
277
+ onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
278
+ onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
279
+ onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
280
+ onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
281
+ onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
282
+ onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
283
+ onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
284
+ onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
285
+ onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
286
+ onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
287
+ onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
288
+ onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
289
+ onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
290
+ onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
291
+ onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent<EventTarget>) => any) | null;
292
+ onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
293
+ onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
294
+ onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
295
+ onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
296
+ onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
297
+ onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
298
+ onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
299
+ onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
300
+ onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
301
+ onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
302
+ onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
303
+ onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
304
+ onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
305
+ onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
306
+ ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
307
+ ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
308
+ ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
309
+ ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
310
+ ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
311
+ ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
312
+ ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
313
+ ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
314
+ ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
315
+ ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
316
+ onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
317
+ onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
318
+ onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
319
+ onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
320
+ onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
321
+ onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
322
+ onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
323
+ autofocus: boolean;
324
+ readonly dataset: DOMStringMap;
325
+ nonce?: string | undefined;
326
+ tabIndex: number;
327
+ blur(): void;
328
+ focus(options?: FocusOptions | undefined): void;
329
+ };
330
+ readonly observedAttributes: string[];
331
+ };
2
332
  export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: void;
2
+ export default _default;