@lingxiteam/assets 1.0.11 → 1.0.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 (137) hide show
  1. package/es/dealDsl/preprocess/common.js +27 -16
  2. package/es/error/errorDisplay/Web/Drawer/Drawer.less +31 -0
  3. package/es/error/errorDisplay/Web/Drawer/index.js +12 -4
  4. package/es/error/errorDisplay/Web/ErrorMsg/index.js +27 -4
  5. package/es/error/errorDisplay/Web/Notification/index.js +22 -11
  6. package/es/rootConfig/mobile/BusiComp.js +1 -1
  7. package/es/rootConfig/mobile/MobileModal.js +1 -1
  8. package/es/rootConfig/mobile/MobilePopover.js +1 -1
  9. package/es/rootConfig/pc/BusiComp.js +1 -1
  10. package/es/rootConfig/pc/Drawer.js +1 -1
  11. package/es/rootConfig/pc/Modal.js +1 -1
  12. package/es/rootConfig/pc/Popover.js +1 -1
  13. package/es/rootConfig/todoActionList.js +1 -1
  14. package/es/rootConfig/todoOptionList.js +1 -1
  15. package/es/theme/bin/cucc/theme.js +275 -0
  16. package/es/theme/bin/cucc/theme.less +272 -0
  17. package/es/theme/bin/cucc/theme.scss +272 -0
  18. package/es/theme/bin/default/theme.js +275 -0
  19. package/es/theme/bin/default/theme.less +272 -0
  20. package/es/theme/bin/default/theme.scss +272 -0
  21. package/es/theme/build.js +42 -0
  22. package/es/theme/src/cucc/index.js +131 -0
  23. package/es/theme/src/default/index.js +131 -0
  24. package/es/theme/utils/colorPaletteMixin.js +59 -0
  25. package/es/theme/utils/px2Num.js +12 -0
  26. package/es/theme/utils/renderColors.js +16 -0
  27. package/lib/IconSvg/index.d.ts +6 -0
  28. package/lib/IconSvg/index.js +30 -0
  29. package/lib/dealDsl/PropType.d.ts +7 -0
  30. package/lib/dealDsl/PropType.js +5 -0
  31. package/lib/dealDsl/events/actionObj.d.ts +3 -0
  32. package/lib/dealDsl/events/actionObj.js +13 -0
  33. package/lib/dealDsl/events/index.d.ts +6 -0
  34. package/lib/dealDsl/events/index.js +21 -0
  35. package/lib/dealDsl/index.d.ts +2 -0
  36. package/lib/dealDsl/index.js +31 -0
  37. package/lib/dealDsl/preprocess/common.d.ts +9 -0
  38. package/lib/dealDsl/preprocess/common.js +277 -0
  39. package/lib/dealDsl/preprocess/editor.d.ts +9 -0
  40. package/lib/dealDsl/preprocess/editor.js +28 -0
  41. package/lib/dealDsl/preprocess/engine.d.ts +9 -0
  42. package/lib/dealDsl/preprocess/engine.js +26 -0
  43. package/lib/dealDsl/preprocessDSL.d.ts +21 -0
  44. package/lib/dealDsl/preprocessDSL.js +88 -0
  45. package/lib/dealDsl/utils/index.d.ts +13 -0
  46. package/lib/dealDsl/utils/index.js +29 -0
  47. package/lib/error/errorCatch/index.js +48 -0
  48. package/lib/error/errorDisplay/Mobile/Drawer/Drawer.js +115 -0
  49. package/lib/error/errorDisplay/Mobile/Drawer/Drawer.less +201 -0
  50. package/lib/error/errorDisplay/Mobile/Drawer/index.js +140 -0
  51. package/lib/error/errorDisplay/Mobile/ErrorMsg/index.js +207 -0
  52. package/lib/error/errorDisplay/Mobile/Modal/Modal.js +53 -0
  53. package/lib/error/errorDisplay/Mobile/Modal/Modal.less +146 -0
  54. package/lib/error/errorDisplay/Mobile/Modal/index.js +127 -0
  55. package/lib/error/errorDisplay/Mobile/defaultGlobalConfig.js +21 -0
  56. package/lib/error/errorDisplay/SVGstring.js +18 -0
  57. package/lib/error/errorDisplay/Web/Drawer/Drawer.js +274 -0
  58. package/lib/error/errorDisplay/Web/Drawer/Drawer.less +420 -0
  59. package/lib/error/errorDisplay/Web/Drawer/DrawerConnect.js +213 -0
  60. package/lib/error/errorDisplay/Web/Drawer/index.js +142 -0
  61. package/lib/error/errorDisplay/Web/ErrorMsg/index.js +301 -0
  62. package/lib/error/errorDisplay/Web/Notification/Notice.js +161 -0
  63. package/lib/error/errorDisplay/Web/Notification/Notification.js +149 -0
  64. package/lib/error/errorDisplay/Web/Notification/Notification.less +137 -0
  65. package/lib/error/errorDisplay/Web/Notification/index.js +104 -0
  66. package/lib/error/errorDisplay/Web/defaultGlobalConfig.js +29 -0
  67. package/lib/error/errorDisplay/animation.less +112 -0
  68. package/lib/error/errorDisplay/compUtils.js +52 -0
  69. package/lib/error/errorDisplay/const.js +83 -0
  70. package/lib/error/errorDisplay/http.js +103 -0
  71. package/lib/error/errorDisplay/variables.less +1 -0
  72. package/lib/error/index.js +34 -0
  73. package/lib/images/ico-back.png +0 -0
  74. package/lib/index.d.ts +9 -0
  75. package/lib/rootConfig/index.d.ts +5 -0
  76. package/lib/rootConfig/index.js +28 -0
  77. package/lib/rootConfig/mobile/BusiComp.d.ts +66 -0
  78. package/lib/rootConfig/mobile/BusiComp.js +88 -0
  79. package/lib/rootConfig/mobile/MobileModal.d.ts +114 -0
  80. package/lib/rootConfig/mobile/MobileModal.js +140 -0
  81. package/lib/rootConfig/mobile/MobilePopover.d.ts +81 -0
  82. package/lib/rootConfig/mobile/MobilePopover.js +89 -0
  83. package/lib/rootConfig/mobile/index.d.ts +4 -0
  84. package/lib/rootConfig/mobile/index.js +34 -0
  85. package/lib/rootConfig/mobile/page.d.ts +157 -0
  86. package/lib/rootConfig/mobile/page.js +161 -0
  87. package/lib/rootConfig/pc/BusiComp.d.ts +66 -0
  88. package/lib/rootConfig/pc/BusiComp.js +88 -0
  89. package/lib/rootConfig/pc/Drawer.d.ts +150 -0
  90. package/lib/rootConfig/pc/Drawer.js +203 -0
  91. package/lib/rootConfig/pc/Modal.d.ts +160 -0
  92. package/lib/rootConfig/pc/Modal.js +195 -0
  93. package/lib/rootConfig/pc/Popover.d.ts +90 -0
  94. package/lib/rootConfig/pc/Popover.js +104 -0
  95. package/lib/rootConfig/pc/index.d.ts +5 -0
  96. package/lib/rootConfig/pc/index.js +41 -0
  97. package/lib/rootConfig/pc/page.d.ts +146 -0
  98. package/lib/rootConfig/pc/page.js +153 -0
  99. package/lib/rootConfig/todoActionList.d.ts +3082 -0
  100. package/lib/rootConfig/todoActionList.js +3600 -0
  101. package/lib/rootConfig/todoOptionList.d.ts +1466 -0
  102. package/lib/rootConfig/todoOptionList.js +1685 -0
  103. package/lib/security/const.d.ts +22 -0
  104. package/lib/security/const.js +38 -0
  105. package/lib/security/encipher/aes.d.ts +2 -0
  106. package/lib/security/encipher/aes.js +35 -0
  107. package/lib/security/encipher/des.d.ts +2 -0
  108. package/lib/security/encipher/des.js +34 -0
  109. package/lib/security/encipher/rsa.d.ts +2 -0
  110. package/lib/security/encipher/rsa.js +26 -0
  111. package/lib/security/encipher/sign.d.ts +6 -0
  112. package/lib/security/encipher/sign.js +102 -0
  113. package/lib/security/fetch.d.ts +9 -0
  114. package/lib/security/fetch.js +212 -0
  115. package/lib/security/httpEncryption.js +83 -0
  116. package/lib/security/index.d.ts +39 -0
  117. package/lib/security/index.js +29 -0
  118. package/lib/svg/check.svg +10 -0
  119. package/lib/svg/normal-check.svg +10 -0
  120. package/lib/svg/webViewError.svg +40 -0
  121. package/lib/theme/bin/cucc/theme.js +277 -0
  122. package/lib/theme/bin/cucc/theme.less +272 -0
  123. package/lib/theme/bin/cucc/theme.scss +272 -0
  124. package/lib/theme/bin/default/theme.js +277 -0
  125. package/lib/theme/bin/default/theme.less +272 -0
  126. package/lib/theme/bin/default/theme.scss +272 -0
  127. package/lib/theme/build.js +44 -0
  128. package/lib/theme/src/cucc/index.js +133 -0
  129. package/lib/theme/src/default/index.js +133 -0
  130. package/lib/theme/utils/colorPaletteMixin.js +61 -0
  131. package/lib/theme/utils/px2Num.js +14 -0
  132. package/lib/theme/utils/renderColors.js +18 -0
  133. package/lib/utils/img.d.ts +1 -0
  134. package/lib/utils/img.js +10 -0
  135. package/lib/utils/url.d.ts +16 -0
  136. package/lib/utils/url.js +111 -0
  137. package/package.json +6 -3
@@ -0,0 +1,272 @@
1
+ $blue-base: #3295fa;
2
+ $blue-1: #f0faff;
3
+ $blue-2: #d6f0ff;
4
+ $blue-3: #addeff;
5
+ $blue-4: #85caff;
6
+ $blue-5: #5cb3ff;
7
+ $blue-6: #3296fa;
8
+ $blue-7: #2074d4;
9
+ $blue-8: #1155ad;
10
+ $blue-9: #073a87;
11
+ $blue-10: #042661;
12
+ $cyan-base: #0dd1a9;
13
+ $cyan-1: #e6fff6;
14
+ $cyan-2: #b3ffe5;
15
+ $cyan-3: #86f7d5;
16
+ $cyan-4: #59ebc4;
17
+ $cyan-5: #31deb5;
18
+ $cyan-6: #0dd1aa;
19
+ $cyan-7: #02ab8f;
20
+ $cyan-8: #008573;
21
+ $cyan-9: #005e55;
22
+ $cyan-10: #003834;
23
+ $green-base: #02b342;
24
+ $green-1: #daf2df;
25
+ $green-2: #95e6a8;
26
+ $green-3: #6ad988;
27
+ $green-4: #43cc6c;
28
+ $green-5: #21bf55;
29
+ $green-6: #02b343;
30
+ $green-7: #008c38;
31
+ $green-8: #00662c;
32
+ $green-9: #00401e;
33
+ $green-10: #001a0d;
34
+ $gold-base: #faaf0c;
35
+ $gold-1: #fffbe6;
36
+ $gold-2: #fff1b0;
37
+ $gold-3: #ffe587;
38
+ $gold-4: #ffd75e;
39
+ $gold-5: #ffc636;
40
+ $gold-6: #faaf0c;
41
+ $gold-7: #d48a00;
42
+ $gold-8: #ad6b00;
43
+ $gold-9: #874f00;
44
+ $gold-10: #613500;
45
+ $volcano-base: #fa6432;
46
+ $volcano-1: #fff6f0;
47
+ $volcano-2: #ffe6d6;
48
+ $volcano-3: #ffcaad;
49
+ $volcano-4: #ffab85;
50
+ $volcano-5: #ff8a5c;
51
+ $volcano-6: #fa6432;
52
+ $volcano-7: #d44720;
53
+ $volcano-8: #ad2e11;
54
+ $volcano-9: #871a07;
55
+ $volcano-10: #610f04;
56
+ $red-base: #f23030;
57
+ $red-1: #fff2f0;
58
+ $red-2: #ffdcd6;
59
+ $red-3: #ffb6ad;
60
+ $red-4: #ff8d85;
61
+ $red-5: #ff615c;
62
+ $red-6: #f23030;
63
+ $red-7: #cc1f24;
64
+ $red-8: #a6111b;
65
+ $red-9: #800612;
66
+ $red-10: #59040f;
67
+ $purple-base: #6732e6;
68
+ $purple-1: #f7f0ff;
69
+ $purple-2: #ebdbff;
70
+ $purple-3: #d1b3ff;
71
+ $purple-4: #b58aff;
72
+ $purple-5: #8e5cf2;
73
+ $purple-6: #6832e6;
74
+ $purple-7: #4b21bf;
75
+ $purple-8: #321299;
76
+ $purple-9: #1d0873;
77
+ $purple-10: #11054d;
78
+ $geekblue-base: #3366ee;
79
+ $geekblue-1: #f0f6ff;
80
+ $geekblue-2: #d9e8ff;
81
+ $geekblue-3: #b0cdff;
82
+ $geekblue-4: #87afff;
83
+ $geekblue-5: #5c8cfa;
84
+ $geekblue-6: #3264ed;
85
+ $geekblue-7: #2047c7;
86
+ $geekblue-8: #122ea1;
87
+ $geekblue-9: #071b7a;
88
+ $geekblue-10: #040f54;
89
+ $pink-base: #eb2f96;
90
+ $pink-1: #fff0f6;
91
+ $pink-2: #ffd6e7;
92
+ $pink-3: #ffadd2;
93
+ $pink-4: #ff85c0;
94
+ $pink-5: #f759ab;
95
+ $pink-6: #eb2f96;
96
+ $pink-7: #c41d7f;
97
+ $pink-8: #9e1068;
98
+ $pink-9: #780650;
99
+ $pink-10: #520339;
100
+ $orange-base: #fa8c16;
101
+ $orange-1: #fff7e6;
102
+ $orange-2: #ffe7ba;
103
+ $orange-3: #ffd591;
104
+ $orange-4: #ffc069;
105
+ $orange-5: #ffa940;
106
+ $orange-6: #fa8c16;
107
+ $orange-7: #d46b08;
108
+ $orange-8: #ad4e00;
109
+ $orange-9: #873800;
110
+ $orange-10: #612500;
111
+ $yellow-base: #fadb14;
112
+ $yellow-1: #feffe6;
113
+ $yellow-2: #ffffb8;
114
+ $yellow-3: #fffb8f;
115
+ $yellow-4: #fff566;
116
+ $yellow-5: #ffec3d;
117
+ $yellow-6: #fadb14;
118
+ $yellow-7: #d4b106;
119
+ $yellow-8: #ad8b00;
120
+ $yellow-9: #876800;
121
+ $yellow-10: #614700;
122
+ $lime-base: #a0d911;
123
+ $lime-1: #fcffe6;
124
+ $lime-2: #f4ffb8;
125
+ $lime-3: #eaff8f;
126
+ $lime-4: #d3f261;
127
+ $lime-5: #bae637;
128
+ $lime-6: #a0d911;
129
+ $lime-7: #7cb305;
130
+ $lime-8: #5b8c00;
131
+ $lime-9: #3f6600;
132
+ $lime-10: #254000;
133
+ $primary-color: #4477ee;
134
+ $primary-1: #f0f7ff;
135
+ $primary-2: #edf5ff;
136
+ $primary-3: #c4dcff;
137
+ $primary-4: #9cc0ff;
138
+ $primary-5: #709efa;
139
+ $primary-6: #4577ed;
140
+ $primary-7: #3058c7;
141
+ $primary-8: #1f3da1;
142
+ $primary-9: #11267a;
143
+ $primary-10: #0b1754;
144
+ $info-color: #4477ee;
145
+ $info-1: #f0f7ff;
146
+ $info-2: #edf5ff;
147
+ $info-3: #c4dcff;
148
+ $info-4: #9cc0ff;
149
+ $info-5: #709efa;
150
+ $info-6: #4577ed;
151
+ $info-7: #3058c7;
152
+ $info-8: #1f3da1;
153
+ $info-9: #11267a;
154
+ $info-10: #0b1754;
155
+ $success-color: #36bf36;
156
+ $success-1: #f2fff0;
157
+ $success-2: #e1f2df;
158
+ $success-3: #b4e6ae;
159
+ $success-4: #88d982;
160
+ $success-5: #5ecc5a;
161
+ $success-6: #36bf36;
162
+ $success-7: #239927;
163
+ $success-8: #15731b;
164
+ $success-9: #0a4d11;
165
+ $success-10: #052609;
166
+ $warning-color: #faad14;
167
+ $warning-1: #fffbe6;
168
+ $warning-2: #fff1b8;
169
+ $warning-3: #ffe58f;
170
+ $warning-4: #ffd666;
171
+ $warning-5: #ffc53d;
172
+ $warning-6: #faad14;
173
+ $warning-7: #d48806;
174
+ $warning-8: #ad6800;
175
+ $warning-9: #874d00;
176
+ $warning-10: #613400;
177
+ $error-color: #f52230;
178
+ $error-1: #fff1f0;
179
+ $error-2: #ffcbc7;
180
+ $error-3: #ffa19e;
181
+ $error-4: #ff7575;
182
+ $error-5: #ff4d52;
183
+ $error-6: #f52230;
184
+ $error-7: #cf1325;
185
+ $error-8: #a8071c;
186
+ $error-9: #820016;
187
+ $error-10: #5c0012;
188
+ $highlight-color: #fa6432;
189
+ $highlight-1: #fff6f0;
190
+ $highlight-2: #ffe6d6;
191
+ $highlight-3: #ffcaad;
192
+ $highlight-4: #ffab85;
193
+ $highlight-5: #ff8a5c;
194
+ $highlight-6: #fa6432;
195
+ $highlight-7: #d44720;
196
+ $highlight-8: #ad2e11;
197
+ $highlight-9: #871a07;
198
+ $highlight-10: #610f04;
199
+ $black-1: rgba(28, 36, 46, 0.15);
200
+ $black-2: rgba(28, 36, 46, 0.25);
201
+ $black-3: rgba(28, 36, 46, 0.35);
202
+ $black-4: rgba(28, 36, 46, 0.45);
203
+ $black-5: rgba(28, 36, 46, 0.55);
204
+ $black-6: rgba(28, 36, 46, 0.65);
205
+ $black-7: rgba(28, 36, 46, 0.75);
206
+ $black-8: rgba(28, 36, 46, 0.85);
207
+ $black-9: rgba(28, 36, 46, 0.95);
208
+ $black-10: rgba(28, 36, 46, 1);
209
+ $white: #fff;
210
+ $black: rgba(28, 36, 46, 1);
211
+ $link-color: #2299ff;
212
+ $body-background: #fff;
213
+ $background-color-base: #edf0f5;
214
+ $border-color-base: #e5e5e5;
215
+ $dividing-color: #e5e5e5;
216
+ $border-color-split: #f0f0f0;
217
+ $component-background: #fff;
218
+ $background-color-light: hsv(0, 0, 98%);
219
+ $disabled-bg: #f5f5f5;
220
+ $modal-mask-bg: rgba(28, 36, 46, 0.45);
221
+ $item-hover-bg: #f5f5f5;
222
+ $heading-color: rgba(28, 36, 46, 1);
223
+ $text-color: rgba(28, 36, 46, 0.85);
224
+ $text-color-paragraph: rgba(28, 36, 46, 0.65);
225
+ $text-color-secondary: rgba(28, 36, 46, 0.45);
226
+ $disabled-color: rgba(28, 36, 46, 0.25);
227
+ $text-color-inverse: #fff;
228
+ $line-height-base: 1.5715;
229
+ $icon-color: inherit;
230
+ $icon-color-hover: rgba(28, 36, 46, 0.75);
231
+ $icon-color-secondary: rgba(28, 36, 46, 0.45);
232
+ $icon-color-heading: rgba(28, 36, 46, 1);
233
+ $font-size-base: 14px;
234
+ $font-size-lg: 16px;
235
+ $font-size-md: 15px;
236
+ $font-size-sm: 12px;
237
+ $font-weight: 500;
238
+ $heading-1-size: 38px;
239
+ $heading-2-size: 30px;
240
+ $heading-3-size: 24px;
241
+ $heading-4-size: 20px;
242
+ $heading-5-size: 16px;
243
+ $heading-6-size: 14px;
244
+ $border-radius-base: 2px;
245
+ $border-radius-md: 4px;
246
+ $border-radius-lg: 8px;
247
+ $border-radius-round: 50%;
248
+ $padding-lg: 20px;
249
+ $padding-md: 16px;
250
+ $padding-sm: 12px;
251
+ $padding-xs: 8px;
252
+ $padding-xxs: 4px;
253
+ $padding-xxxs: 2px;
254
+ $size-xs: 16px;
255
+ $size-sm: 24px;
256
+ $size-md: 28px;
257
+ $size-base: 32px;
258
+ $size-lg: 40px;
259
+ $size-xl: 56px;
260
+ $btn-height-base: 32px;
261
+ $btn-height-lg: 40px;
262
+ $btn-height-sm: 24px;
263
+ $radio-size: 16px;
264
+ $checkbox-size: 16px;
265
+ $input-height-base: 32px;
266
+ $input-height-lg: 40px;
267
+ $input-height-sm: 24px;
268
+ $menu-inline-toplevel-item-height: 40px;
269
+ $menu-item-height: 40px;
270
+ $tabs-card-height: 40px;
271
+ $tree-title-height: 24px;
272
+ $transfer-header-height: 40px;
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ var fs = require('fs');
4
+ var path = require('path');
5
+ var srcPath = path.resolve(__dirname, './src');
6
+ // 遍历目录
7
+ fs.readdir(srcPath, function (err, files) {
8
+ if (err) throw err;
9
+ // 遍历文件
10
+ files.forEach(function (file) {
11
+ var filePath = path.join(srcPath, file);
12
+ var moduleIdx = path.join(filePath, 'index.js');
13
+ if (fs.existsSync(moduleIdx)) {
14
+ // eslint-disable-next-line
15
+ var modules = require(moduleIdx);
16
+ if (modules && Object.keys(modules).length > 0) {
17
+ var binDir = path.resolve(__dirname, "bin/".concat(file));
18
+ if (!fs.existsSync(binDir)) {
19
+ fs.mkdirSync(binDir, {
20
+ recursive: true
21
+ });
22
+ }
23
+ var jsonStr = 'const theme = {\n';
24
+ var lessStr = '';
25
+ var sassStr = '';
26
+ Object.keys(modules).forEach(function (item) {
27
+ lessStr += "@".concat(item, ": ").concat(modules[item], ";\n");
28
+ sassStr += "$".concat(item, ": ").concat(modules[item], ";\n");
29
+ jsonStr += " ".concat(item.indexOf('-') > -1 ? "'".concat(item, "'") : item, ": '").concat(modules[item], "',\n");
30
+ });
31
+ jsonStr += '};\n\nmodule.exports = theme;\n';
32
+ fs.writeFileSync(path.resolve(__dirname, "".concat(binDir, "/theme.less")), lessStr, {
33
+ encoding: 'utf-8'
34
+ });
35
+ fs.writeFileSync(path.resolve(__dirname, "".concat(binDir, "/theme.scss")), sassStr, {
36
+ encoding: 'utf-8'
37
+ });
38
+ fs.writeFileSync(path.resolve(__dirname, "".concat(binDir, "/theme.js")), jsonStr, {
39
+ encoding: 'utf-8'
40
+ });
41
+ }
42
+ }
43
+ });
44
+ });
@@ -0,0 +1,133 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
9
+ var renderColors = require('../../utils/renderColors');
10
+ var px2Num = require('../../utils/px2Num');
11
+ var colors = {
12
+ blue: '#3295fa',
13
+ cyan: '#0dd1a9',
14
+ green: '#02b342',
15
+ gold: '#faaf0c',
16
+ volcano: '#fa6432',
17
+ red: '#f23030',
18
+ purple: '#6732e6',
19
+ geekblue: '#3366ee',
20
+ pink: '#eb2f96',
21
+ orange: '#fa8c16',
22
+ yellow: '#fadb14',
23
+ lime: '#a0d911'
24
+ };
25
+ var sceneColors = {
26
+ primary: '#445566',
27
+ info: '#4477ee',
28
+ success: '#36bf36',
29
+ warning: '#faad14',
30
+ error: '#f52230',
31
+ highlight: '#fa6432'
32
+ };
33
+ var colorPlate = renderColors(colors, 'base');
34
+ var sceneColorPlate = renderColors(sceneColors);
35
+
36
+ // 黑色色阶
37
+ var blackPlate = {
38
+ 'black-1': 'rgba(28, 36, 46, 0.15)',
39
+ 'black-2': 'rgba(28, 36, 46, 0.25)',
40
+ 'black-3': 'rgba(28, 36, 46, 0.35)',
41
+ 'black-4': 'rgba(28, 36, 46, 0.45)',
42
+ 'black-5': 'rgba(28, 36, 46, 0.55)',
43
+ 'black-6': 'rgba(28, 36, 46, 0.65)',
44
+ 'black-7': 'rgba(28, 36, 46, 0.75)',
45
+ 'black-8': 'rgba(28, 36, 46, 0.85)',
46
+ 'black-9': 'rgba(28, 36, 46, 0.95)',
47
+ 'black-10': 'rgba(28, 36, 46, 1)'
48
+ };
49
+
50
+ // 文字尺寸
51
+ var fontSizes = {
52
+ 'font-size-base': '14px',
53
+ 'font-size-lg': '16px',
54
+ 'font-size-md': '15px',
55
+ 'font-size-sm': '12px',
56
+ 'font-weight': '500'
57
+ };
58
+
59
+ // 圆角
60
+ var radius = {
61
+ 'border-radius-base': '2px',
62
+ 'border-radius-md': '4px',
63
+ 'border-radius-lg': '8px',
64
+ 'border-radius-round': '50%'
65
+ };
66
+
67
+ // 间距
68
+ var paddings = {
69
+ 'padding-lg': '20px',
70
+ 'padding-md': '16px',
71
+ 'padding-sm': '12px',
72
+ 'padding-xs': '8px',
73
+ 'padding-xxs': '4px',
74
+ 'padding-xxxs': '2px'
75
+ };
76
+
77
+ // 尺寸
78
+ var sizes = {
79
+ 'size-xs': '16px',
80
+ 'size-sm': '24px',
81
+ 'size-md': '28px',
82
+ 'size-base': '32px',
83
+ 'size-lg': '40px',
84
+ 'size-xl': '56px'
85
+ };
86
+ var variable = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, colorPlate), sceneColorPlate), blackPlate), {}, {
87
+ white: '#fff',
88
+ black: 'rgba(28, 36, 46, 1)',
89
+ 'link-color': '#2299ff',
90
+ 'body-background': '#fff',
91
+ 'background-color-base': '#edf0f5',
92
+ 'border-color-base': '#e5e5e5',
93
+ 'dividing-color': '#e5e5e5',
94
+ 'border-color-split': '#f0f0f0',
95
+ 'component-background': '#fff',
96
+ 'background-color-light': 'hsv(0, 0, 98%)',
97
+ 'disabled-bg': '#f5f5f5',
98
+ 'modal-mask-bg': blackPlate['black-4'],
99
+ 'item-hover-bg': '#f5f5f5',
100
+ 'heading-color': blackPlate['black-10'],
101
+ 'text-color': blackPlate['black-8'],
102
+ 'text-color-paragraph': blackPlate['black-6'],
103
+ 'text-color-secondary': blackPlate['black-4'],
104
+ 'disabled-color': blackPlate['black-2'],
105
+ 'text-color-inverse': '#fff',
106
+ 'line-height-base': '1.5715',
107
+ 'icon-color': 'inherit',
108
+ 'icon-color-hover': blackPlate['black-7'],
109
+ 'icon-color-secondary': blackPlate['black-4'],
110
+ 'icon-color-heading': blackPlate['black-10']
111
+ }, fontSizes), {}, {
112
+ 'heading-1-size': "".concat(Math.ceil(px2Num(fontSizes['font-size-base']) * 2.71), "px"),
113
+ 'heading-2-size': "".concat(Math.ceil(px2Num(fontSizes['font-size-base']) * 2.14), "px"),
114
+ 'heading-3-size': "".concat(Math.ceil(px2Num(fontSizes['font-size-base']) * 1.71), "px"),
115
+ 'heading-4-size': "".concat(Math.ceil(px2Num(fontSizes['font-size-base']) * 1.42), "px"),
116
+ 'heading-5-size': "".concat(Math.ceil(px2Num(fontSizes['font-size-base']) * 1.14), "px"),
117
+ 'heading-6-size': "".concat(Math.ceil(px2Num(fontSizes['font-size-base']) * 1), "px")
118
+ }, radius), paddings), sizes), {}, {
119
+ 'btn-height-base': sizes['size-base'],
120
+ 'btn-height-lg': sizes['size-lg'],
121
+ 'btn-height-sm': sizes['size-sm'],
122
+ 'radio-size': sizes['size-xs'],
123
+ 'checkbox-size': sizes['size-xs'],
124
+ 'input-height-base': sizes['size-base'],
125
+ 'input-height-lg': sizes['size-lg'],
126
+ 'input-height-sm': sizes['size-sm'],
127
+ 'menu-inline-toplevel-item-height': sizes['size-lg'],
128
+ 'menu-item-height': sizes['size-lg'],
129
+ 'tabs-card-height': sizes['size-lg'],
130
+ 'tree-title-height': sizes['size-sm'],
131
+ 'transfer-header-height': sizes['size-lg']
132
+ });
133
+ module.exports = variable;
@@ -0,0 +1,133 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
9
+ var renderColors = require('../../utils/renderColors');
10
+ var px2Num = require('../../utils/px2Num');
11
+ var colors = {
12
+ blue: '#3295fa',
13
+ cyan: '#0dd1a9',
14
+ green: '#02b342',
15
+ gold: '#faaf0c',
16
+ volcano: '#fa6432',
17
+ red: '#f23030',
18
+ purple: '#6732e6',
19
+ geekblue: '#3366ee',
20
+ pink: '#eb2f96',
21
+ orange: '#fa8c16',
22
+ yellow: '#fadb14',
23
+ lime: '#a0d911'
24
+ };
25
+ var sceneColors = {
26
+ primary: '#4477ee',
27
+ info: '#4477ee',
28
+ success: '#36bf36',
29
+ warning: '#faad14',
30
+ error: '#f52230',
31
+ highlight: '#fa6432'
32
+ };
33
+ var colorPlate = renderColors(colors, 'base');
34
+ var sceneColorPlate = renderColors(sceneColors);
35
+
36
+ // 黑色色阶
37
+ var blackPlate = {
38
+ 'black-1': 'rgba(28, 36, 46, 0.15)',
39
+ 'black-2': 'rgba(28, 36, 46, 0.25)',
40
+ 'black-3': 'rgba(28, 36, 46, 0.35)',
41
+ 'black-4': 'rgba(28, 36, 46, 0.45)',
42
+ 'black-5': 'rgba(28, 36, 46, 0.55)',
43
+ 'black-6': 'rgba(28, 36, 46, 0.65)',
44
+ 'black-7': 'rgba(28, 36, 46, 0.75)',
45
+ 'black-8': 'rgba(28, 36, 46, 0.85)',
46
+ 'black-9': 'rgba(28, 36, 46, 0.95)',
47
+ 'black-10': 'rgba(28, 36, 46, 1)'
48
+ };
49
+
50
+ // 文字尺寸
51
+ var fontSizes = {
52
+ 'font-size-base': '14px',
53
+ 'font-size-lg': '16px',
54
+ 'font-size-md': '15px',
55
+ 'font-size-sm': '12px',
56
+ 'font-weight': '500'
57
+ };
58
+
59
+ // 圆角
60
+ var radius = {
61
+ 'border-radius-base': '2px',
62
+ 'border-radius-md': '4px',
63
+ 'border-radius-lg': '8px',
64
+ 'border-radius-round': '50%'
65
+ };
66
+
67
+ // 间距
68
+ var paddings = {
69
+ 'padding-lg': '20px',
70
+ 'padding-md': '16px',
71
+ 'padding-sm': '12px',
72
+ 'padding-xs': '8px',
73
+ 'padding-xxs': '4px',
74
+ 'padding-xxxs': '2px'
75
+ };
76
+
77
+ // 尺寸
78
+ var sizes = {
79
+ 'size-xs': '16px',
80
+ 'size-sm': '24px',
81
+ 'size-md': '28px',
82
+ 'size-base': '32px',
83
+ 'size-lg': '40px',
84
+ 'size-xl': '56px'
85
+ };
86
+ var variable = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, colorPlate), sceneColorPlate), blackPlate), {}, {
87
+ white: '#fff',
88
+ black: 'rgba(28, 36, 46, 1)',
89
+ 'link-color': '#2299ff',
90
+ 'body-background': '#fff',
91
+ 'background-color-base': '#edf0f5',
92
+ 'border-color-base': '#e5e5e5',
93
+ 'dividing-color': '#e5e5e5',
94
+ 'border-color-split': '#f0f0f0',
95
+ 'component-background': '#fff',
96
+ 'background-color-light': 'hsv(0, 0, 98%)',
97
+ 'disabled-bg': '#f5f5f5',
98
+ 'modal-mask-bg': blackPlate['black-4'],
99
+ 'item-hover-bg': '#f5f5f5',
100
+ 'heading-color': blackPlate['black-10'],
101
+ 'text-color': blackPlate['black-8'],
102
+ 'text-color-paragraph': blackPlate['black-6'],
103
+ 'text-color-secondary': blackPlate['black-4'],
104
+ 'disabled-color': blackPlate['black-2'],
105
+ 'text-color-inverse': '#fff',
106
+ 'line-height-base': '1.5715',
107
+ 'icon-color': 'inherit',
108
+ 'icon-color-hover': blackPlate['black-7'],
109
+ 'icon-color-secondary': blackPlate['black-4'],
110
+ 'icon-color-heading': blackPlate['black-10']
111
+ }, fontSizes), {}, {
112
+ 'heading-1-size': "".concat(Math.ceil(px2Num(fontSizes['font-size-base']) * 2.71), "px"),
113
+ 'heading-2-size': "".concat(Math.ceil(px2Num(fontSizes['font-size-base']) * 2.14), "px"),
114
+ 'heading-3-size': "".concat(Math.ceil(px2Num(fontSizes['font-size-base']) * 1.71), "px"),
115
+ 'heading-4-size': "".concat(Math.ceil(px2Num(fontSizes['font-size-base']) * 1.42), "px"),
116
+ 'heading-5-size': "".concat(Math.ceil(px2Num(fontSizes['font-size-base']) * 1.14), "px"),
117
+ 'heading-6-size': "".concat(Math.ceil(px2Num(fontSizes['font-size-base']) * 1), "px")
118
+ }, radius), paddings), sizes), {}, {
119
+ 'btn-height-base': sizes['size-base'],
120
+ 'btn-height-lg': sizes['size-lg'],
121
+ 'btn-height-sm': sizes['size-sm'],
122
+ 'radio-size': sizes['size-xs'],
123
+ 'checkbox-size': sizes['size-xs'],
124
+ 'input-height-base': sizes['size-base'],
125
+ 'input-height-lg': sizes['size-lg'],
126
+ 'input-height-sm': sizes['size-sm'],
127
+ 'menu-inline-toplevel-item-height': sizes['size-lg'],
128
+ 'menu-item-height': sizes['size-lg'],
129
+ 'tabs-card-height': sizes['size-lg'],
130
+ 'tree-title-height': sizes['size-sm'],
131
+ 'transfer-header-height': sizes['size-lg']
132
+ });
133
+ module.exports = variable;
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+
3
+ var tinycolor = require('tinycolor2');
4
+ var hueStep = 2;
5
+ var saturationStep = 16;
6
+ var saturationStep2 = 5;
7
+ var brightnessStep1 = 5;
8
+ var brightnessStep2 = 15;
9
+ var lightColorCount = 5;
10
+ var darkColorCount = 4;
11
+ function getHue(hsv, i, isLight) {
12
+ var hue;
13
+ if (hsv.h >= 60 && hsv.h <= 240) {
14
+ hue = isLight ? hsv.h - hueStep * i : hsv.h + hueStep * i;
15
+ } else {
16
+ hue = isLight ? hsv.h + hueStep * i : hsv.h - hueStep * i;
17
+ }
18
+ if (hue < 0) {
19
+ hue += 360;
20
+ } else if (hue >= 360) {
21
+ hue -= 360;
22
+ }
23
+ return Math.round(hue);
24
+ }
25
+ function getSaturation(hsv, i, isLight) {
26
+ var saturation;
27
+ if (isLight) {
28
+ saturation = Math.round(hsv.s * 100) - saturationStep * i;
29
+ } else if (i === darkColorCount) {
30
+ saturation = Math.round(hsv.s * 100) + saturationStep;
31
+ } else {
32
+ saturation = Math.round(hsv.s * 100) + saturationStep2 * i;
33
+ }
34
+ if (saturation > 100) {
35
+ saturation = 100;
36
+ }
37
+ if (isLight && i === lightColorCount && saturation > 10) {
38
+ saturation = 10;
39
+ }
40
+ if (saturation < 6) {
41
+ saturation = 6;
42
+ }
43
+ return Math.round(saturation);
44
+ }
45
+ function getValue(hsv, i, isLight) {
46
+ if (isLight) {
47
+ return Math.round(hsv.v * 100) + brightnessStep1 * i;
48
+ }
49
+ return Math.round(hsv.v * 100) - brightnessStep2 * i;
50
+ }
51
+ function colorPalette(color, index) {
52
+ var isLight = index <= 6;
53
+ var hsv = tinycolor(color).toHsv();
54
+ var i = isLight ? lightColorCount + 1 - index : index - lightColorCount - 1;
55
+ return tinycolor({
56
+ h: getHue(hsv, i, isLight),
57
+ s: getSaturation(hsv, i, isLight),
58
+ v: getValue(hsv, i, isLight)
59
+ }).toHexString();
60
+ }
61
+ module.exports = colorPalette;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ function px2Num(val) {
4
+ var res = 0;
5
+ if (typeof val === 'string') {
6
+ var _val = val.replace(/[px|rem|em]/gi, '');
7
+ return Number(_val);
8
+ }
9
+ if (typeof val === 'number') {
10
+ res = val;
11
+ }
12
+ return res;
13
+ }
14
+ module.exports = px2Num;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ var colorPaletteMixin = require('./colorPaletteMixin');
4
+ function renderColors(colors) {
5
+ var suffix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'color';
6
+ var res = {};
7
+ if (colors && Object.keys(colors).length > 0) {
8
+ Object.keys(colors).forEach(function (item) {
9
+ for (var i = 0; i <= 10; i += 1) {
10
+ var name = i === 0 ? "".concat(item, "-").concat(suffix) : "".concat(item, "-").concat(i);
11
+ var color = i === 0 ? colors[item] : colorPaletteMixin(colors[item], i);
12
+ res[name] = color;
13
+ }
14
+ });
15
+ }
16
+ return res;
17
+ }
18
+ module.exports = renderColors;
@@ -0,0 +1 @@
1
+ export declare const getSvgImageBase64: (text: string) => string;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getSvgImageBase64 = void 0;
7
+ var getSvgImageBase64 = function getSvgImageBase64(text) {
8
+ return "data:image/svg+xml;charset=utf-8,".concat(encodeURIComponent(text));
9
+ };
10
+ exports.getSvgImageBase64 = getSvgImageBase64;