@gct-paas/excel 0.1.20 → 0.1.21
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/{VueVideoPlayer-DePpm38H.js → VueVideoPlayer-Bf0x69CJ.js} +2 -2
- package/dist/{agg-design-hreKYp5a.js → agg-design-CLSOm6QJ.js} +1 -1
- package/dist/{agg-props-CCDh2o6E.js → agg-props-4nnDqWtf.js} +1 -1
- package/dist/{agg-style-Bh8vdJvs.js → agg-style-FHSkeH5u.js} +1 -1
- package/dist/{align-editor-DpDuDOMr.js → align-editor-Bf391dfO.js} +1 -1
- package/dist/{attach-fields-editor-BeGxW6de.js → attach-fields-editor-U0Vg4ar8.js} +3 -2
- package/dist/{barcode-design-CFVTZNAy.js → barcode-design-XLuURxqD.js} +2 -2
- package/dist/base/index.es.js +352 -177
- package/dist/{base-font-editor-laOkjBe1.js → base-font-editor-adnb7ShQ.js} +3 -2
- package/dist/{boolean-design-DIlM9Nrt.js → boolean-design-Bk3jIc2m.js} +2 -2
- package/dist/{boolean-props-CGuFs72-.js → boolean-props-D1C7P7oX.js} +3 -3
- package/dist/{boolean-style-BUz6sBUN.js → boolean-style-CWmep9-Y.js} +4 -4
- package/dist/{cell-upload-Dw3t7ZKJ.js → cell-upload-wzPF8ovv.js} +3 -2
- package/dist/{date-range-editor-rXaru-8n.js → date-range-editor-CGCLkDFp.js} +3 -2
- package/dist/{date-time-design-HfjWK3SA.js → date-time-design-CG6fhsBd.js} +1 -1
- package/dist/{date-time-props-C_cG-6wI.js → date-time-props-DGa4XIFD.js} +3 -3
- package/dist/{date-time-style-BeCDP5TE.js → date-time-style-C5xs_HQX.js} +1 -1
- package/dist/{decimal-design-DzLpjX9N.js → decimal-design-Dg2PWB7J.js} +1 -1
- package/dist/{decimal-display-mode-BhD1cOOe.js → decimal-display-mode-B5nxWZnK.js} +2 -2
- package/dist/{decimal-props-C6f22071.js → decimal-props-BUduwEu5.js} +4 -4
- package/dist/{decimal-style-XN3rLM2j.js → decimal-style-CW6QyMh0.js} +1 -1
- package/dist/{default-value-editor.vue_vue_type_script_setup_true_name_default-value-editor_lang-CJC4kBNh.js → default-value-editor.vue_vue_type_script_setup_true_name_default-value-editor_lang-BlQSjkvP.js} +3 -2
- package/dist/{diagonal-design-Dh0qhgSq.js → diagonal-design-xlveiCza.js} +2 -2
- package/dist/{double-design-XHHlqmEp.js → double-design-Dkzgoo0g.js} +1 -1
- package/dist/{double-props-Cvi36aBN.js → double-props-DwI5z-Mz.js} +4 -4
- package/dist/{double-style-Dkoth54S.js → double-style-B09n2Oup.js} +1 -1
- package/dist/{dynamic-table-action-mGrBO_bn.js → dynamic-table-action-KwzaoPBC.js} +32 -2
- package/dist/{dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-OPdk2I5p.js → dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-ByU7Owiw.js} +224 -310
- package/dist/{edit.utils-CXmmCnxE-DeDBtyJd.js → edit.utils-CXmmCnxE-Do4weQUL.js} +1 -1
- package/dist/{enum-design-CAOAFdI6.js → enum-design-D_hYB8q2.js} +2 -2
- package/dist/{enum-props-CBN-AvBS.js → enum-props-SHpVl7is.js} +4 -4
- package/dist/{enum-style-cOiK44Ae.js → enum-style-zTZKj6Li.js} +3 -3
- package/dist/excel.css +9556 -10003
- package/dist/{exceljs.min-pnja99MZ.js → exceljs.min-Dy4OavkS.js} +2 -2
- package/dist/{expression-design-CqgcK8eO.js → expression-design-DH37JCnd.js} +1 -1
- package/dist/{expression-props-wXQOIrMY.js → expression-props-D4aZ2FzY.js} +1 -1
- package/dist/{expression-style-BzavnOux.js → expression-style-Bj0tEmqJ.js} +1 -1
- package/dist/{file-design-BSQknhnY.js → file-design-hV82bwcT.js} +1 -1
- package/dist/{file-props-CwiuBVHW.js → file-props-BR0xOn8f.js} +2 -2
- package/dist/{file-style-CG4a3THb.js → file-style-CPXRGFCR.js} +1 -1
- package/dist/{font-editor--CgwL-wF.js → font-editor-QrOFLcNA.js} +3 -3
- package/dist/{image-design-D1D0SN5W.js → image-design-B3FASJvR.js} +2 -2
- package/dist/{image-design-CwPjfDxf.js → image-design-WqYFe8Hz.js} +2 -2
- package/dist/{image-props-C4E9gMsG.js → image-props-DZ0lHvNN.js} +1 -1
- package/dist/{image-style-CIb1mi13.js → image-style-D3jSU46p.js} +1 -1
- package/dist/{index-CcmNFTia.js → index-4aWfyi4S.js} +2 -2
- package/dist/{index-B2ZNkbGm.js → index-B2JfWmQ5.js} +1 -1
- package/dist/{index-CIl6oWcB.js → index-BCRANZ6N.js} +1 -1
- package/dist/index-BYFfjfXo.js +4198 -0
- package/dist/{index-ZrNXSw4w.js → index-BYnhPyxm.js} +1 -1
- package/dist/{index-DOj318_B.js → index-B_bGf5j3.js} +2 -2
- package/dist/{index-BneV2tbp.js → index-BgJenclY.js} +1 -1
- package/dist/{index-ByTKu8n6.js → index-BocrGDq2.js} +1 -1
- package/dist/{index-CeMBvNee.js → index-BpacgAuY.js} +1 -1
- package/dist/{index-BJYSmTeW.js → index-C9uva5U9.js} +1 -1
- package/dist/{index-DLoQlQk6.js → index-CAp9OIUg.js} +2 -2
- package/dist/{index-Drf0Arr4.js → index-CVsM5Bam.js} +1 -1
- package/dist/{index-D9tUJAeF.js → index-Cblyq6yH.js} +1 -1
- package/dist/{index-B2tFXR--.js → index-ChFaMPeg.js} +2 -2
- package/dist/{index-A2MbCZtS.js → index-Cqh9EW_d.js} +1 -1
- package/dist/{index-D0n65ya-.js → index-CquVE9ii.js} +1 -1
- package/dist/{index-BG_CEaW0.js → index-CsLZerBY.js} +41133 -3488
- package/dist/{index-PWmkKVZV.js → index-D8uy8whi.js} +1 -1
- package/dist/{index-0mxMA4vZ.js → index-DKR79OBc.js} +1 -1
- package/dist/{index-BKoXo3Ha.js → index-DNHA-joo.js} +1 -1
- package/dist/{index-Hg59RKKE.js → index-DU3SF4eg.js} +1 -1
- package/dist/{index-B7DDYlzm.js → index-DVaUctcz.js} +1 -1
- package/dist/{index-D0XkCn_x.js → index-DegtNz07.js} +1 -1
- package/dist/{index-Cgka0WmQ.js → index-DpFPYL8b.js} +1 -1
- package/dist/{index-Dl2FIifp.js → index-Dvp79b5b.js} +1 -1
- package/dist/{index-PMDIMwwL.js → index-DxgKf-wy.js} +1 -1
- package/dist/{index-CGSTq7zN.js → index-Jz0_ApK0.js} +1 -1
- package/dist/{index-UUDS4nmS.js → index-Ol6_R1tg.js} +1 -1
- package/dist/{index-BAlLZmfu.js → index-RY064UmV.js} +1 -1
- package/dist/{index-BSHUFede.js → index-dECIkP6q.js} +1 -1
- package/dist/{index-HHF5iK-6.js → index-iGA3l7nd.js} +1 -1
- package/dist/{index-CKqLoN9r.js → index-pMF19I7H.js} +1 -1
- package/dist/{index-Bi4hE4Ye.js → index-wmbtcxzT.js} +2 -2
- package/dist/index.es.js +45 -45
- package/dist/{integer-design-Cy9c0fzI.js → integer-design-_-oIGMZi.js} +1 -1
- package/dist/{integer-props-DFDOIb2a.js → integer-props-CbhqGTWT.js} +5 -4
- package/dist/{integer-style-CfIX5ReH.js → integer-style-CRDDq2e1.js} +1 -1
- package/dist/{mb-render-D_uumPQr.js → mb-render-Bh6EegbE.js} +1 -30
- package/dist/{number-input-ex-CWci0pCj.js → number-input-ex-n0MRaA8Z.js} +2 -1
- package/dist/{org-props-B5dk289u.js → org-props-B_ED1XJd.js} +2 -2
- package/dist/{org-style-BoSDPuw9.js → org-style-P7mL2u1-.js} +1 -1
- package/dist/{pagination-design-Ci4wxUIk.js → pagination-design-CC2ZvE5K.js} +2 -2
- package/dist/paper-widget-design-CvvM0OZ2.js +4 -0
- package/dist/{qrcode-design-CJ9R5DIn.js → qrcode-design-C_G8R7Lo.js} +1 -1
- package/dist/{ref-autofill-editor-B4KDvHhR.js → ref-autofill-editor-DdUMjliQ.js} +2 -3
- package/dist/{ref-props-CwDGepT3.js → ref-props-CCwA0E2w.js} +3 -3
- package/dist/{ref-style-B35CsOQO.js → ref-style-C3Qy3L2V.js} +1 -1
- package/dist/{regex-editor-CIVvr_Lx.js → regex-editor-CswiNY9l.js} +3 -2
- package/dist/{revo-grid.entry-DeWzC35s.js → revo-grid.entry-fhJrZlXs.js} +1 -1
- package/dist/{revogr-attribution_7.entry-BJZ-twfj.js → revogr-attribution_7.entry-BxX5Aax7.js} +3 -3
- package/dist/{revogr-clipboard_3.entry-DkgRA8qw.js → revogr-clipboard_3.entry-B84Mg6_S.js} +2 -2
- package/dist/{revogr-data_4.entry-BZLzvcbo.js → revogr-data_4.entry-BSSMKH9X.js} +2 -2
- package/dist/{revogr-filter-panel.entry-zGvhshno.js → revogr-filter-panel.entry-xjYp1Z8c.js} +1 -1
- package/dist/{select-render-type-editor.vue_vue_type_script_setup_true_lang-Asn5-ZRz.js → select-render-type-editor.vue_vue_type_script_setup_true_lang-JwULnnUe.js} +2 -2
- package/dist/{serialnumber-design-CYFU5TVt.js → serialnumber-design-qdEzFAi4.js} +1 -1
- package/dist/shared/index.es.js +26 -27
- package/dist/{signature-design-Cwi0cZOI.js → signature-design-DyLTKEwS.js} +1 -1
- package/dist/{signature-props-cQRB8U8x.js → signature-props-CXwqrh0H.js} +3 -3
- package/dist/{signature-style-C90NsLxg.js → signature-style-ibNQSAPQ.js} +1 -1
- package/dist/{single-field-drop-BFhQs-3z.js → single-field-drop-BSdWy-C4.js} +3 -2
- package/dist/{size-editor-Dx3y_otg.js → size-editor-8C1AxONY.js} +1 -1
- package/dist/src/nocode-base/src/hooks/annotation/form-annotation-controller.d.ts +14 -148
- package/dist/src/nocode-base/src/hooks/annotation/index.d.ts +0 -1
- package/dist/src/nocode-web-render/src/index.d.ts +0 -1
- package/dist/src/online-form/src/views/designer/modules/panel/panel-data-init-config/common/data-source-title.vue.d.ts +2 -2
- package/dist/src/shared/components/Signature/ui/sign-editor.vue.d.ts +2 -2
- package/dist/src/shared/components/version-select/version-select.vue.d.ts +2 -2
- package/dist/{text-design-TEheiKQx.js → text-design-BzDtceUO.js} +2 -2
- package/dist/{text-design-jMPxIgZW.js → text-design-Di-2lpQC.js} +2 -2
- package/dist/{text-props-CrkSvg6D.js → text-props-YXtd9DCt.js} +5 -5
- package/dist/{text-style-DmwTt8KQ.js → text-style-BtclwHUQ.js} +1 -1
- package/dist/{throttle-Cpk1LoGk-DTkhEkFR.js → throttle-Cpk1LoGk-BFMM5iqm.js} +1 -1
- package/dist/{timediff-design-D_if-K1S.js → timediff-design-DPDNHC4C.js} +1 -1
- package/dist/{trace-design-oN7pgtab.js → trace-design-B2tffMF2.js} +2 -2
- package/dist/{trace-props-BFnUk6kv.js → trace-props-CWTXFYZ9.js} +6 -6
- package/dist/{trace-style-TNnFcvfw.js → trace-style-AmSVnHXF.js} +1 -1
- package/dist/use-namespace-qtLS8nEh.js +88 -0
- package/dist/{user-props-Ce-ilCmU.js → user-props-hR1saiG7.js} +2 -2
- package/dist/{user-style-4rp0jKYP.js → user-style-BsMfhFHo.js} +1 -1
- package/dist/{value-editor.vue_vue_type_style_index_0_lang-DMuR0u4j.js → value-editor.vue_vue_type_style_index_0_lang-zAPZ-2E_.js} +2 -2
- package/dist/{version-select-DSFIlYgX.js → version-select-CeQP0Bne.js} +1041 -4
- package/dist/web-render/index.es.js +12 -955
- package/dist/{widget-barcode-Du7LOaiy.js → widget-barcode-DPdsvAF5.js} +4 -4
- package/dist/{widget-diagonal-D-q7WK6T.js → widget-diagonal-BfjZGony.js} +4 -3
- package/dist/{widget-image-Da5mvgMm.js → widget-image-D_E_0ZEd.js} +5 -5
- package/dist/{widget-line-oIFH8P04.js → widget-line-SDiSxrzr.js} +2 -2
- package/dist/{widget-pagination-CSonelt_.js → widget-pagination-DdIoe9Yy.js} +5 -5
- package/dist/{widget-power-CWczWA7K.js → widget-power-hifeC3T0.js} +4 -3
- package/dist/{widget-qrcode-MQ-cSphb.js → widget-qrcode-DBEsM1iE.js} +3 -3
- package/dist/{widget-rangelimit-CFDeRJIf.js → widget-rangelimit-clQ84tvq.js} +4 -3
- package/dist/{widget-serialnumber-DlE2-jvp.js → widget-serialnumber-BXvzHCYR.js} +1 -1
- package/dist/{widget-text-B1SnpOGN.js → widget-text-CPojsb_9.js} +5 -5
- package/dist/{widget-timediff-DeyJbqRE.js → widget-timediff-DGBZsme_.js} +2 -2
- package/package.json +1 -1
- package/dist/AntdIcon-C3RMq2zm.js +0 -1040
- package/dist/form-annotation-controller-DDDyHAwe.js +0 -707
- package/dist/index-CWpratsK.js +0 -41850
- package/dist/paper-widget-design-BilYU9rh.js +0 -4
- package/dist/src/nocode-base/src/hooks/annotation/types.d.ts +0 -16
- package/dist/src/nocode-web-render/src/annotation/form-abandon-medpro-modal.vue.d.ts +0 -15
- package/dist/src/nocode-web-render/src/annotation/form-abandon-modal.vue.d.ts +0 -15
- package/dist/src/nocode-web-render/src/annotation/form-abandon-v2-modal.vue.d.ts +0 -11
- package/dist/src/nocode-web-render/src/annotation/index.d.ts +0 -2
- package/dist/src/nocode-web-render/src/annotation/submit-form-change-modal.vue.d.ts +0 -104
- package/dist/src/nocode-web-render/src/annotation/use-annotation.d.ts +0 -37
|
@@ -1,1040 +0,0 @@
|
|
|
1
|
-
import { nextTick, h, createVNode } from "vue";
|
|
2
|
-
var SignatureTypeEnum = /* @__PURE__ */ ((SignatureTypeEnum2) => {
|
|
3
|
-
SignatureTypeEnum2["SIGNATURE_ONLY"] = "signature_only";
|
|
4
|
-
SignatureTypeEnum2["SIGNATURE_DATE"] = "signature_date";
|
|
5
|
-
SignatureTypeEnum2["SIGNATURE_DATETIME"] = "signature_datetime";
|
|
6
|
-
return SignatureTypeEnum2;
|
|
7
|
-
})(SignatureTypeEnum || {});
|
|
8
|
-
function bound01(n, max) {
|
|
9
|
-
if (isOnePointZero(n)) {
|
|
10
|
-
n = "100%";
|
|
11
|
-
}
|
|
12
|
-
var isPercent = isPercentage(n);
|
|
13
|
-
n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));
|
|
14
|
-
if (isPercent) {
|
|
15
|
-
n = parseInt(String(n * max), 10) / 100;
|
|
16
|
-
}
|
|
17
|
-
if (Math.abs(n - max) < 1e-6) {
|
|
18
|
-
return 1;
|
|
19
|
-
}
|
|
20
|
-
if (max === 360) {
|
|
21
|
-
n = (n < 0 ? n % max + max : n % max) / parseFloat(String(max));
|
|
22
|
-
} else {
|
|
23
|
-
n = n % max / parseFloat(String(max));
|
|
24
|
-
}
|
|
25
|
-
return n;
|
|
26
|
-
}
|
|
27
|
-
function isOnePointZero(n) {
|
|
28
|
-
return typeof n === "string" && n.indexOf(".") !== -1 && parseFloat(n) === 1;
|
|
29
|
-
}
|
|
30
|
-
function isPercentage(n) {
|
|
31
|
-
return typeof n === "string" && n.indexOf("%") !== -1;
|
|
32
|
-
}
|
|
33
|
-
function boundAlpha(a) {
|
|
34
|
-
a = parseFloat(a);
|
|
35
|
-
if (isNaN(a) || a < 0 || a > 1) {
|
|
36
|
-
a = 1;
|
|
37
|
-
}
|
|
38
|
-
return a;
|
|
39
|
-
}
|
|
40
|
-
function convertToPercentage(n) {
|
|
41
|
-
if (n <= 1) {
|
|
42
|
-
return "".concat(Number(n) * 100, "%");
|
|
43
|
-
}
|
|
44
|
-
return n;
|
|
45
|
-
}
|
|
46
|
-
function pad2(c) {
|
|
47
|
-
return c.length === 1 ? "0" + c : String(c);
|
|
48
|
-
}
|
|
49
|
-
function rgbToRgb(r, g, b) {
|
|
50
|
-
return {
|
|
51
|
-
r: bound01(r, 255) * 255,
|
|
52
|
-
g: bound01(g, 255) * 255,
|
|
53
|
-
b: bound01(b, 255) * 255
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
function hue2rgb(p, q, t) {
|
|
57
|
-
if (t < 0) {
|
|
58
|
-
t += 1;
|
|
59
|
-
}
|
|
60
|
-
if (t > 1) {
|
|
61
|
-
t -= 1;
|
|
62
|
-
}
|
|
63
|
-
if (t < 1 / 6) {
|
|
64
|
-
return p + (q - p) * (6 * t);
|
|
65
|
-
}
|
|
66
|
-
if (t < 1 / 2) {
|
|
67
|
-
return q;
|
|
68
|
-
}
|
|
69
|
-
if (t < 2 / 3) {
|
|
70
|
-
return p + (q - p) * (2 / 3 - t) * 6;
|
|
71
|
-
}
|
|
72
|
-
return p;
|
|
73
|
-
}
|
|
74
|
-
function hslToRgb(h2, s, l) {
|
|
75
|
-
var r;
|
|
76
|
-
var g;
|
|
77
|
-
var b;
|
|
78
|
-
h2 = bound01(h2, 360);
|
|
79
|
-
s = bound01(s, 100);
|
|
80
|
-
l = bound01(l, 100);
|
|
81
|
-
if (s === 0) {
|
|
82
|
-
g = l;
|
|
83
|
-
b = l;
|
|
84
|
-
r = l;
|
|
85
|
-
} else {
|
|
86
|
-
var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
87
|
-
var p = 2 * l - q;
|
|
88
|
-
r = hue2rgb(p, q, h2 + 1 / 3);
|
|
89
|
-
g = hue2rgb(p, q, h2);
|
|
90
|
-
b = hue2rgb(p, q, h2 - 1 / 3);
|
|
91
|
-
}
|
|
92
|
-
return { r: r * 255, g: g * 255, b: b * 255 };
|
|
93
|
-
}
|
|
94
|
-
function rgbToHsv(r, g, b) {
|
|
95
|
-
r = bound01(r, 255);
|
|
96
|
-
g = bound01(g, 255);
|
|
97
|
-
b = bound01(b, 255);
|
|
98
|
-
var max = Math.max(r, g, b);
|
|
99
|
-
var min = Math.min(r, g, b);
|
|
100
|
-
var h2 = 0;
|
|
101
|
-
var v = max;
|
|
102
|
-
var d = max - min;
|
|
103
|
-
var s = max === 0 ? 0 : d / max;
|
|
104
|
-
if (max === min) {
|
|
105
|
-
h2 = 0;
|
|
106
|
-
} else {
|
|
107
|
-
switch (max) {
|
|
108
|
-
case r:
|
|
109
|
-
h2 = (g - b) / d + (g < b ? 6 : 0);
|
|
110
|
-
break;
|
|
111
|
-
case g:
|
|
112
|
-
h2 = (b - r) / d + 2;
|
|
113
|
-
break;
|
|
114
|
-
case b:
|
|
115
|
-
h2 = (r - g) / d + 4;
|
|
116
|
-
break;
|
|
117
|
-
}
|
|
118
|
-
h2 /= 6;
|
|
119
|
-
}
|
|
120
|
-
return { h: h2, s, v };
|
|
121
|
-
}
|
|
122
|
-
function hsvToRgb(h2, s, v) {
|
|
123
|
-
h2 = bound01(h2, 360) * 6;
|
|
124
|
-
s = bound01(s, 100);
|
|
125
|
-
v = bound01(v, 100);
|
|
126
|
-
var i = Math.floor(h2);
|
|
127
|
-
var f = h2 - i;
|
|
128
|
-
var p = v * (1 - s);
|
|
129
|
-
var q = v * (1 - f * s);
|
|
130
|
-
var t = v * (1 - (1 - f) * s);
|
|
131
|
-
var mod = i % 6;
|
|
132
|
-
var r = [v, q, p, p, t, v][mod];
|
|
133
|
-
var g = [t, v, v, q, p, p][mod];
|
|
134
|
-
var b = [p, p, t, v, v, q][mod];
|
|
135
|
-
return { r: r * 255, g: g * 255, b: b * 255 };
|
|
136
|
-
}
|
|
137
|
-
function rgbToHex(r, g, b, allow3Char) {
|
|
138
|
-
var hex = [
|
|
139
|
-
pad2(Math.round(r).toString(16)),
|
|
140
|
-
pad2(Math.round(g).toString(16)),
|
|
141
|
-
pad2(Math.round(b).toString(16))
|
|
142
|
-
];
|
|
143
|
-
return hex.join("");
|
|
144
|
-
}
|
|
145
|
-
function convertHexToDecimal(h2) {
|
|
146
|
-
return parseIntFromHex(h2) / 255;
|
|
147
|
-
}
|
|
148
|
-
function parseIntFromHex(val) {
|
|
149
|
-
return parseInt(val, 16);
|
|
150
|
-
}
|
|
151
|
-
var names = {
|
|
152
|
-
aliceblue: "#f0f8ff",
|
|
153
|
-
antiquewhite: "#faebd7",
|
|
154
|
-
aqua: "#00ffff",
|
|
155
|
-
aquamarine: "#7fffd4",
|
|
156
|
-
azure: "#f0ffff",
|
|
157
|
-
beige: "#f5f5dc",
|
|
158
|
-
bisque: "#ffe4c4",
|
|
159
|
-
black: "#000000",
|
|
160
|
-
blanchedalmond: "#ffebcd",
|
|
161
|
-
blue: "#0000ff",
|
|
162
|
-
blueviolet: "#8a2be2",
|
|
163
|
-
brown: "#a52a2a",
|
|
164
|
-
burlywood: "#deb887",
|
|
165
|
-
cadetblue: "#5f9ea0",
|
|
166
|
-
chartreuse: "#7fff00",
|
|
167
|
-
chocolate: "#d2691e",
|
|
168
|
-
coral: "#ff7f50",
|
|
169
|
-
cornflowerblue: "#6495ed",
|
|
170
|
-
cornsilk: "#fff8dc",
|
|
171
|
-
crimson: "#dc143c",
|
|
172
|
-
cyan: "#00ffff",
|
|
173
|
-
darkblue: "#00008b",
|
|
174
|
-
darkcyan: "#008b8b",
|
|
175
|
-
darkgoldenrod: "#b8860b",
|
|
176
|
-
darkgray: "#a9a9a9",
|
|
177
|
-
darkgreen: "#006400",
|
|
178
|
-
darkgrey: "#a9a9a9",
|
|
179
|
-
darkkhaki: "#bdb76b",
|
|
180
|
-
darkmagenta: "#8b008b",
|
|
181
|
-
darkolivegreen: "#556b2f",
|
|
182
|
-
darkorange: "#ff8c00",
|
|
183
|
-
darkorchid: "#9932cc",
|
|
184
|
-
darkred: "#8b0000",
|
|
185
|
-
darksalmon: "#e9967a",
|
|
186
|
-
darkseagreen: "#8fbc8f",
|
|
187
|
-
darkslateblue: "#483d8b",
|
|
188
|
-
darkslategray: "#2f4f4f",
|
|
189
|
-
darkslategrey: "#2f4f4f",
|
|
190
|
-
darkturquoise: "#00ced1",
|
|
191
|
-
darkviolet: "#9400d3",
|
|
192
|
-
deeppink: "#ff1493",
|
|
193
|
-
deepskyblue: "#00bfff",
|
|
194
|
-
dimgray: "#696969",
|
|
195
|
-
dimgrey: "#696969",
|
|
196
|
-
dodgerblue: "#1e90ff",
|
|
197
|
-
firebrick: "#b22222",
|
|
198
|
-
floralwhite: "#fffaf0",
|
|
199
|
-
forestgreen: "#228b22",
|
|
200
|
-
fuchsia: "#ff00ff",
|
|
201
|
-
gainsboro: "#dcdcdc",
|
|
202
|
-
ghostwhite: "#f8f8ff",
|
|
203
|
-
goldenrod: "#daa520",
|
|
204
|
-
gold: "#ffd700",
|
|
205
|
-
gray: "#808080",
|
|
206
|
-
green: "#008000",
|
|
207
|
-
greenyellow: "#adff2f",
|
|
208
|
-
grey: "#808080",
|
|
209
|
-
honeydew: "#f0fff0",
|
|
210
|
-
hotpink: "#ff69b4",
|
|
211
|
-
indianred: "#cd5c5c",
|
|
212
|
-
indigo: "#4b0082",
|
|
213
|
-
ivory: "#fffff0",
|
|
214
|
-
khaki: "#f0e68c",
|
|
215
|
-
lavenderblush: "#fff0f5",
|
|
216
|
-
lavender: "#e6e6fa",
|
|
217
|
-
lawngreen: "#7cfc00",
|
|
218
|
-
lemonchiffon: "#fffacd",
|
|
219
|
-
lightblue: "#add8e6",
|
|
220
|
-
lightcoral: "#f08080",
|
|
221
|
-
lightcyan: "#e0ffff",
|
|
222
|
-
lightgoldenrodyellow: "#fafad2",
|
|
223
|
-
lightgray: "#d3d3d3",
|
|
224
|
-
lightgreen: "#90ee90",
|
|
225
|
-
lightgrey: "#d3d3d3",
|
|
226
|
-
lightpink: "#ffb6c1",
|
|
227
|
-
lightsalmon: "#ffa07a",
|
|
228
|
-
lightseagreen: "#20b2aa",
|
|
229
|
-
lightskyblue: "#87cefa",
|
|
230
|
-
lightslategray: "#778899",
|
|
231
|
-
lightslategrey: "#778899",
|
|
232
|
-
lightsteelblue: "#b0c4de",
|
|
233
|
-
lightyellow: "#ffffe0",
|
|
234
|
-
lime: "#00ff00",
|
|
235
|
-
limegreen: "#32cd32",
|
|
236
|
-
linen: "#faf0e6",
|
|
237
|
-
magenta: "#ff00ff",
|
|
238
|
-
maroon: "#800000",
|
|
239
|
-
mediumaquamarine: "#66cdaa",
|
|
240
|
-
mediumblue: "#0000cd",
|
|
241
|
-
mediumorchid: "#ba55d3",
|
|
242
|
-
mediumpurple: "#9370db",
|
|
243
|
-
mediumseagreen: "#3cb371",
|
|
244
|
-
mediumslateblue: "#7b68ee",
|
|
245
|
-
mediumspringgreen: "#00fa9a",
|
|
246
|
-
mediumturquoise: "#48d1cc",
|
|
247
|
-
mediumvioletred: "#c71585",
|
|
248
|
-
midnightblue: "#191970",
|
|
249
|
-
mintcream: "#f5fffa",
|
|
250
|
-
mistyrose: "#ffe4e1",
|
|
251
|
-
moccasin: "#ffe4b5",
|
|
252
|
-
navajowhite: "#ffdead",
|
|
253
|
-
navy: "#000080",
|
|
254
|
-
oldlace: "#fdf5e6",
|
|
255
|
-
olive: "#808000",
|
|
256
|
-
olivedrab: "#6b8e23",
|
|
257
|
-
orange: "#ffa500",
|
|
258
|
-
orangered: "#ff4500",
|
|
259
|
-
orchid: "#da70d6",
|
|
260
|
-
palegoldenrod: "#eee8aa",
|
|
261
|
-
palegreen: "#98fb98",
|
|
262
|
-
paleturquoise: "#afeeee",
|
|
263
|
-
palevioletred: "#db7093",
|
|
264
|
-
papayawhip: "#ffefd5",
|
|
265
|
-
peachpuff: "#ffdab9",
|
|
266
|
-
peru: "#cd853f",
|
|
267
|
-
pink: "#ffc0cb",
|
|
268
|
-
plum: "#dda0dd",
|
|
269
|
-
powderblue: "#b0e0e6",
|
|
270
|
-
purple: "#800080",
|
|
271
|
-
rebeccapurple: "#663399",
|
|
272
|
-
red: "#ff0000",
|
|
273
|
-
rosybrown: "#bc8f8f",
|
|
274
|
-
royalblue: "#4169e1",
|
|
275
|
-
saddlebrown: "#8b4513",
|
|
276
|
-
salmon: "#fa8072",
|
|
277
|
-
sandybrown: "#f4a460",
|
|
278
|
-
seagreen: "#2e8b57",
|
|
279
|
-
seashell: "#fff5ee",
|
|
280
|
-
sienna: "#a0522d",
|
|
281
|
-
silver: "#c0c0c0",
|
|
282
|
-
skyblue: "#87ceeb",
|
|
283
|
-
slateblue: "#6a5acd",
|
|
284
|
-
slategray: "#708090",
|
|
285
|
-
slategrey: "#708090",
|
|
286
|
-
snow: "#fffafa",
|
|
287
|
-
springgreen: "#00ff7f",
|
|
288
|
-
steelblue: "#4682b4",
|
|
289
|
-
tan: "#d2b48c",
|
|
290
|
-
teal: "#008080",
|
|
291
|
-
thistle: "#d8bfd8",
|
|
292
|
-
tomato: "#ff6347",
|
|
293
|
-
turquoise: "#40e0d0",
|
|
294
|
-
violet: "#ee82ee",
|
|
295
|
-
wheat: "#f5deb3",
|
|
296
|
-
white: "#ffffff",
|
|
297
|
-
whitesmoke: "#f5f5f5",
|
|
298
|
-
yellow: "#ffff00",
|
|
299
|
-
yellowgreen: "#9acd32"
|
|
300
|
-
};
|
|
301
|
-
function inputToRGB(color) {
|
|
302
|
-
var rgb = { r: 0, g: 0, b: 0 };
|
|
303
|
-
var a = 1;
|
|
304
|
-
var s = null;
|
|
305
|
-
var v = null;
|
|
306
|
-
var l = null;
|
|
307
|
-
var ok = false;
|
|
308
|
-
var format = false;
|
|
309
|
-
if (typeof color === "string") {
|
|
310
|
-
color = stringInputToObject(color);
|
|
311
|
-
}
|
|
312
|
-
if (typeof color === "object") {
|
|
313
|
-
if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
|
|
314
|
-
rgb = rgbToRgb(color.r, color.g, color.b);
|
|
315
|
-
ok = true;
|
|
316
|
-
format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
|
|
317
|
-
} else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
|
|
318
|
-
s = convertToPercentage(color.s);
|
|
319
|
-
v = convertToPercentage(color.v);
|
|
320
|
-
rgb = hsvToRgb(color.h, s, v);
|
|
321
|
-
ok = true;
|
|
322
|
-
format = "hsv";
|
|
323
|
-
} else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
|
|
324
|
-
s = convertToPercentage(color.s);
|
|
325
|
-
l = convertToPercentage(color.l);
|
|
326
|
-
rgb = hslToRgb(color.h, s, l);
|
|
327
|
-
ok = true;
|
|
328
|
-
format = "hsl";
|
|
329
|
-
}
|
|
330
|
-
if (Object.prototype.hasOwnProperty.call(color, "a")) {
|
|
331
|
-
a = color.a;
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
a = boundAlpha(a);
|
|
335
|
-
return {
|
|
336
|
-
ok,
|
|
337
|
-
format: color.format || format,
|
|
338
|
-
r: Math.min(255, Math.max(rgb.r, 0)),
|
|
339
|
-
g: Math.min(255, Math.max(rgb.g, 0)),
|
|
340
|
-
b: Math.min(255, Math.max(rgb.b, 0)),
|
|
341
|
-
a
|
|
342
|
-
};
|
|
343
|
-
}
|
|
344
|
-
var CSS_INTEGER = "[-\\+]?\\d+%?";
|
|
345
|
-
var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
|
|
346
|
-
var CSS_UNIT = "(?:".concat(CSS_NUMBER, ")|(?:").concat(CSS_INTEGER, ")");
|
|
347
|
-
var PERMISSIVE_MATCH3 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
|
|
348
|
-
var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
|
|
349
|
-
var matchers = {
|
|
350
|
-
CSS_UNIT: new RegExp(CSS_UNIT),
|
|
351
|
-
rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
|
|
352
|
-
rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
|
|
353
|
-
hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
|
|
354
|
-
hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
|
|
355
|
-
hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
|
|
356
|
-
hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
|
|
357
|
-
hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
358
|
-
hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
|
|
359
|
-
hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
360
|
-
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
|
|
361
|
-
};
|
|
362
|
-
function stringInputToObject(color) {
|
|
363
|
-
color = color.trim().toLowerCase();
|
|
364
|
-
if (color.length === 0) {
|
|
365
|
-
return false;
|
|
366
|
-
}
|
|
367
|
-
var named = false;
|
|
368
|
-
if (names[color]) {
|
|
369
|
-
color = names[color];
|
|
370
|
-
named = true;
|
|
371
|
-
} else if (color === "transparent") {
|
|
372
|
-
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
|
|
373
|
-
}
|
|
374
|
-
var match = matchers.rgb.exec(color);
|
|
375
|
-
if (match) {
|
|
376
|
-
return { r: match[1], g: match[2], b: match[3] };
|
|
377
|
-
}
|
|
378
|
-
match = matchers.rgba.exec(color);
|
|
379
|
-
if (match) {
|
|
380
|
-
return { r: match[1], g: match[2], b: match[3], a: match[4] };
|
|
381
|
-
}
|
|
382
|
-
match = matchers.hsl.exec(color);
|
|
383
|
-
if (match) {
|
|
384
|
-
return { h: match[1], s: match[2], l: match[3] };
|
|
385
|
-
}
|
|
386
|
-
match = matchers.hsla.exec(color);
|
|
387
|
-
if (match) {
|
|
388
|
-
return { h: match[1], s: match[2], l: match[3], a: match[4] };
|
|
389
|
-
}
|
|
390
|
-
match = matchers.hsv.exec(color);
|
|
391
|
-
if (match) {
|
|
392
|
-
return { h: match[1], s: match[2], v: match[3] };
|
|
393
|
-
}
|
|
394
|
-
match = matchers.hsva.exec(color);
|
|
395
|
-
if (match) {
|
|
396
|
-
return { h: match[1], s: match[2], v: match[3], a: match[4] };
|
|
397
|
-
}
|
|
398
|
-
match = matchers.hex8.exec(color);
|
|
399
|
-
if (match) {
|
|
400
|
-
return {
|
|
401
|
-
r: parseIntFromHex(match[1]),
|
|
402
|
-
g: parseIntFromHex(match[2]),
|
|
403
|
-
b: parseIntFromHex(match[3]),
|
|
404
|
-
a: convertHexToDecimal(match[4]),
|
|
405
|
-
format: named ? "name" : "hex8"
|
|
406
|
-
};
|
|
407
|
-
}
|
|
408
|
-
match = matchers.hex6.exec(color);
|
|
409
|
-
if (match) {
|
|
410
|
-
return {
|
|
411
|
-
r: parseIntFromHex(match[1]),
|
|
412
|
-
g: parseIntFromHex(match[2]),
|
|
413
|
-
b: parseIntFromHex(match[3]),
|
|
414
|
-
format: named ? "name" : "hex"
|
|
415
|
-
};
|
|
416
|
-
}
|
|
417
|
-
match = matchers.hex4.exec(color);
|
|
418
|
-
if (match) {
|
|
419
|
-
return {
|
|
420
|
-
r: parseIntFromHex(match[1] + match[1]),
|
|
421
|
-
g: parseIntFromHex(match[2] + match[2]),
|
|
422
|
-
b: parseIntFromHex(match[3] + match[3]),
|
|
423
|
-
a: convertHexToDecimal(match[4] + match[4]),
|
|
424
|
-
format: named ? "name" : "hex8"
|
|
425
|
-
};
|
|
426
|
-
}
|
|
427
|
-
match = matchers.hex3.exec(color);
|
|
428
|
-
if (match) {
|
|
429
|
-
return {
|
|
430
|
-
r: parseIntFromHex(match[1] + match[1]),
|
|
431
|
-
g: parseIntFromHex(match[2] + match[2]),
|
|
432
|
-
b: parseIntFromHex(match[3] + match[3]),
|
|
433
|
-
format: named ? "name" : "hex"
|
|
434
|
-
};
|
|
435
|
-
}
|
|
436
|
-
return false;
|
|
437
|
-
}
|
|
438
|
-
function isValidCSSUnit(color) {
|
|
439
|
-
return Boolean(matchers.CSS_UNIT.exec(String(color)));
|
|
440
|
-
}
|
|
441
|
-
var hueStep = 2;
|
|
442
|
-
var saturationStep = 0.16;
|
|
443
|
-
var saturationStep2 = 0.05;
|
|
444
|
-
var brightnessStep1 = 0.05;
|
|
445
|
-
var brightnessStep2 = 0.15;
|
|
446
|
-
var lightColorCount = 5;
|
|
447
|
-
var darkColorCount = 4;
|
|
448
|
-
var darkColorMap = [{
|
|
449
|
-
index: 7,
|
|
450
|
-
opacity: 0.15
|
|
451
|
-
}, {
|
|
452
|
-
index: 6,
|
|
453
|
-
opacity: 0.25
|
|
454
|
-
}, {
|
|
455
|
-
index: 5,
|
|
456
|
-
opacity: 0.3
|
|
457
|
-
}, {
|
|
458
|
-
index: 5,
|
|
459
|
-
opacity: 0.45
|
|
460
|
-
}, {
|
|
461
|
-
index: 5,
|
|
462
|
-
opacity: 0.65
|
|
463
|
-
}, {
|
|
464
|
-
index: 5,
|
|
465
|
-
opacity: 0.85
|
|
466
|
-
}, {
|
|
467
|
-
index: 4,
|
|
468
|
-
opacity: 0.9
|
|
469
|
-
}, {
|
|
470
|
-
index: 3,
|
|
471
|
-
opacity: 0.95
|
|
472
|
-
}, {
|
|
473
|
-
index: 2,
|
|
474
|
-
opacity: 0.97
|
|
475
|
-
}, {
|
|
476
|
-
index: 1,
|
|
477
|
-
opacity: 0.98
|
|
478
|
-
}];
|
|
479
|
-
function toHsv(_ref) {
|
|
480
|
-
var r = _ref.r, g = _ref.g, b = _ref.b;
|
|
481
|
-
var hsv = rgbToHsv(r, g, b);
|
|
482
|
-
return {
|
|
483
|
-
h: hsv.h * 360,
|
|
484
|
-
s: hsv.s,
|
|
485
|
-
v: hsv.v
|
|
486
|
-
};
|
|
487
|
-
}
|
|
488
|
-
function toHex(_ref2) {
|
|
489
|
-
var r = _ref2.r, g = _ref2.g, b = _ref2.b;
|
|
490
|
-
return "#".concat(rgbToHex(r, g, b));
|
|
491
|
-
}
|
|
492
|
-
function mix(rgb1, rgb2, amount) {
|
|
493
|
-
var p = amount / 100;
|
|
494
|
-
var rgb = {
|
|
495
|
-
r: (rgb2.r - rgb1.r) * p + rgb1.r,
|
|
496
|
-
g: (rgb2.g - rgb1.g) * p + rgb1.g,
|
|
497
|
-
b: (rgb2.b - rgb1.b) * p + rgb1.b
|
|
498
|
-
};
|
|
499
|
-
return rgb;
|
|
500
|
-
}
|
|
501
|
-
function getHue(hsv, i, light) {
|
|
502
|
-
var hue;
|
|
503
|
-
if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) {
|
|
504
|
-
hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i;
|
|
505
|
-
} else {
|
|
506
|
-
hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i;
|
|
507
|
-
}
|
|
508
|
-
if (hue < 0) {
|
|
509
|
-
hue += 360;
|
|
510
|
-
} else if (hue >= 360) {
|
|
511
|
-
hue -= 360;
|
|
512
|
-
}
|
|
513
|
-
return hue;
|
|
514
|
-
}
|
|
515
|
-
function getSaturation(hsv, i, light) {
|
|
516
|
-
if (hsv.h === 0 && hsv.s === 0) {
|
|
517
|
-
return hsv.s;
|
|
518
|
-
}
|
|
519
|
-
var saturation;
|
|
520
|
-
if (light) {
|
|
521
|
-
saturation = hsv.s - saturationStep * i;
|
|
522
|
-
} else if (i === darkColorCount) {
|
|
523
|
-
saturation = hsv.s + saturationStep;
|
|
524
|
-
} else {
|
|
525
|
-
saturation = hsv.s + saturationStep2 * i;
|
|
526
|
-
}
|
|
527
|
-
if (saturation > 1) {
|
|
528
|
-
saturation = 1;
|
|
529
|
-
}
|
|
530
|
-
if (light && i === lightColorCount && saturation > 0.1) {
|
|
531
|
-
saturation = 0.1;
|
|
532
|
-
}
|
|
533
|
-
if (saturation < 0.06) {
|
|
534
|
-
saturation = 0.06;
|
|
535
|
-
}
|
|
536
|
-
return Number(saturation.toFixed(2));
|
|
537
|
-
}
|
|
538
|
-
function getValue(hsv, i, light) {
|
|
539
|
-
var value;
|
|
540
|
-
if (light) {
|
|
541
|
-
value = hsv.v + brightnessStep1 * i;
|
|
542
|
-
} else {
|
|
543
|
-
value = hsv.v - brightnessStep2 * i;
|
|
544
|
-
}
|
|
545
|
-
if (value > 1) {
|
|
546
|
-
value = 1;
|
|
547
|
-
}
|
|
548
|
-
return Number(value.toFixed(2));
|
|
549
|
-
}
|
|
550
|
-
function generate$1(color) {
|
|
551
|
-
var opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
552
|
-
var patterns = [];
|
|
553
|
-
var pColor = inputToRGB(color);
|
|
554
|
-
for (var i = lightColorCount; i > 0; i -= 1) {
|
|
555
|
-
var hsv = toHsv(pColor);
|
|
556
|
-
var colorString = toHex(inputToRGB({
|
|
557
|
-
h: getHue(hsv, i, true),
|
|
558
|
-
s: getSaturation(hsv, i, true),
|
|
559
|
-
v: getValue(hsv, i, true)
|
|
560
|
-
}));
|
|
561
|
-
patterns.push(colorString);
|
|
562
|
-
}
|
|
563
|
-
patterns.push(toHex(pColor));
|
|
564
|
-
for (var _i = 1; _i <= darkColorCount; _i += 1) {
|
|
565
|
-
var _hsv = toHsv(pColor);
|
|
566
|
-
var _colorString = toHex(inputToRGB({
|
|
567
|
-
h: getHue(_hsv, _i),
|
|
568
|
-
s: getSaturation(_hsv, _i),
|
|
569
|
-
v: getValue(_hsv, _i)
|
|
570
|
-
}));
|
|
571
|
-
patterns.push(_colorString);
|
|
572
|
-
}
|
|
573
|
-
if (opts.theme === "dark") {
|
|
574
|
-
return darkColorMap.map(function(_ref3) {
|
|
575
|
-
var index = _ref3.index, opacity = _ref3.opacity;
|
|
576
|
-
var darkColorString = toHex(mix(inputToRGB(opts.backgroundColor || "#141414"), inputToRGB(patterns[index]), opacity * 100));
|
|
577
|
-
return darkColorString;
|
|
578
|
-
});
|
|
579
|
-
}
|
|
580
|
-
return patterns;
|
|
581
|
-
}
|
|
582
|
-
var presetPrimaryColors = {
|
|
583
|
-
red: "#F5222D",
|
|
584
|
-
volcano: "#FA541C",
|
|
585
|
-
orange: "#FA8C16",
|
|
586
|
-
gold: "#FAAD14",
|
|
587
|
-
yellow: "#FADB14",
|
|
588
|
-
lime: "#A0D911",
|
|
589
|
-
green: "#52C41A",
|
|
590
|
-
cyan: "#13C2C2",
|
|
591
|
-
blue: "#1890FF",
|
|
592
|
-
geekblue: "#2F54EB",
|
|
593
|
-
purple: "#722ED1",
|
|
594
|
-
magenta: "#EB2F96",
|
|
595
|
-
grey: "#666666"
|
|
596
|
-
};
|
|
597
|
-
var presetPalettes = {};
|
|
598
|
-
var presetDarkPalettes = {};
|
|
599
|
-
Object.keys(presetPrimaryColors).forEach(function(key) {
|
|
600
|
-
presetPalettes[key] = generate$1(presetPrimaryColors[key]);
|
|
601
|
-
presetPalettes[key].primary = presetPalettes[key][5];
|
|
602
|
-
presetDarkPalettes[key] = generate$1(presetPrimaryColors[key], {
|
|
603
|
-
theme: "dark",
|
|
604
|
-
backgroundColor: "#141414"
|
|
605
|
-
});
|
|
606
|
-
presetDarkPalettes[key].primary = presetDarkPalettes[key][5];
|
|
607
|
-
});
|
|
608
|
-
var containers = [];
|
|
609
|
-
var styleElements = [];
|
|
610
|
-
var usage = "insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";
|
|
611
|
-
function createStyleElement() {
|
|
612
|
-
var styleElement = document.createElement("style");
|
|
613
|
-
styleElement.setAttribute("type", "text/css");
|
|
614
|
-
return styleElement;
|
|
615
|
-
}
|
|
616
|
-
function insertCss(css, options) {
|
|
617
|
-
options = options || {};
|
|
618
|
-
if (css === void 0) {
|
|
619
|
-
throw new Error(usage);
|
|
620
|
-
}
|
|
621
|
-
var position = options.prepend === true ? "prepend" : "append";
|
|
622
|
-
var container = options.container !== void 0 ? options.container : document.querySelector("head");
|
|
623
|
-
var containerId = containers.indexOf(container);
|
|
624
|
-
if (containerId === -1) {
|
|
625
|
-
containerId = containers.push(container) - 1;
|
|
626
|
-
styleElements[containerId] = {};
|
|
627
|
-
}
|
|
628
|
-
var styleElement;
|
|
629
|
-
if (styleElements[containerId] !== void 0 && styleElements[containerId][position] !== void 0) {
|
|
630
|
-
styleElement = styleElements[containerId][position];
|
|
631
|
-
} else {
|
|
632
|
-
styleElement = styleElements[containerId][position] = createStyleElement();
|
|
633
|
-
if (position === "prepend") {
|
|
634
|
-
container.insertBefore(styleElement, container.childNodes[0]);
|
|
635
|
-
} else {
|
|
636
|
-
container.appendChild(styleElement);
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
if (css.charCodeAt(0) === 65279) {
|
|
640
|
-
css = css.substr(1, css.length);
|
|
641
|
-
}
|
|
642
|
-
if (styleElement.styleSheet) {
|
|
643
|
-
styleElement.styleSheet.cssText += css;
|
|
644
|
-
} else {
|
|
645
|
-
styleElement.textContent += css;
|
|
646
|
-
}
|
|
647
|
-
return styleElement;
|
|
648
|
-
}
|
|
649
|
-
function _objectSpread$2(target) {
|
|
650
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
651
|
-
var source = arguments[i] != null ? Object(arguments[i]) : {};
|
|
652
|
-
var ownKeys = Object.keys(source);
|
|
653
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
654
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
655
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
656
|
-
}));
|
|
657
|
-
}
|
|
658
|
-
ownKeys.forEach(function(key) {
|
|
659
|
-
_defineProperty$2(target, key, source[key]);
|
|
660
|
-
});
|
|
661
|
-
}
|
|
662
|
-
return target;
|
|
663
|
-
}
|
|
664
|
-
function _defineProperty$2(obj, key, value) {
|
|
665
|
-
if (key in obj) {
|
|
666
|
-
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
667
|
-
} else {
|
|
668
|
-
obj[key] = value;
|
|
669
|
-
}
|
|
670
|
-
return obj;
|
|
671
|
-
}
|
|
672
|
-
function warn(valid, message) {
|
|
673
|
-
if (process.env.NODE_ENV !== "production" && !valid && console !== void 0) {
|
|
674
|
-
console.error("Warning: ".concat(message));
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
function warning(valid, message) {
|
|
678
|
-
warn(valid, "[@ant-design/icons-vue] ".concat(message));
|
|
679
|
-
}
|
|
680
|
-
function isIconDefinition(target) {
|
|
681
|
-
return typeof target === "object" && typeof target.name === "string" && typeof target.theme === "string" && (typeof target.icon === "object" || typeof target.icon === "function");
|
|
682
|
-
}
|
|
683
|
-
function generate(node, key, rootProps) {
|
|
684
|
-
if (!rootProps) {
|
|
685
|
-
return h(node.tag, _objectSpread$2({
|
|
686
|
-
key
|
|
687
|
-
}, node.attrs), (node.children || []).map(function(child, index) {
|
|
688
|
-
return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
|
|
689
|
-
}));
|
|
690
|
-
}
|
|
691
|
-
return h(node.tag, _objectSpread$2({
|
|
692
|
-
key
|
|
693
|
-
}, rootProps, node.attrs), (node.children || []).map(function(child, index) {
|
|
694
|
-
return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
|
|
695
|
-
}));
|
|
696
|
-
}
|
|
697
|
-
function getSecondaryColor(primaryColor) {
|
|
698
|
-
return generate$1(primaryColor)[0];
|
|
699
|
-
}
|
|
700
|
-
function normalizeTwoToneColors(twoToneColor) {
|
|
701
|
-
if (!twoToneColor) {
|
|
702
|
-
return [];
|
|
703
|
-
}
|
|
704
|
-
return Array.isArray(twoToneColor) ? twoToneColor : [twoToneColor];
|
|
705
|
-
}
|
|
706
|
-
var svgBaseProps = {
|
|
707
|
-
width: "1em",
|
|
708
|
-
height: "1em",
|
|
709
|
-
fill: "currentColor",
|
|
710
|
-
"aria-hidden": "true",
|
|
711
|
-
focusable: "false"
|
|
712
|
-
};
|
|
713
|
-
var iconStyles = "\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";
|
|
714
|
-
var cssInjectedFlag = false;
|
|
715
|
-
var useInsertStyles = function useInsertStyles2() {
|
|
716
|
-
var styleStr = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : iconStyles;
|
|
717
|
-
nextTick(function() {
|
|
718
|
-
if (!cssInjectedFlag) {
|
|
719
|
-
if (typeof window !== "undefined" && window.document && window.document.documentElement) {
|
|
720
|
-
insertCss(styleStr, {
|
|
721
|
-
prepend: true
|
|
722
|
-
});
|
|
723
|
-
}
|
|
724
|
-
cssInjectedFlag = true;
|
|
725
|
-
}
|
|
726
|
-
});
|
|
727
|
-
};
|
|
728
|
-
var _excluded$1 = ["icon", "primaryColor", "secondaryColor"];
|
|
729
|
-
function _objectWithoutProperties$1(source, excluded) {
|
|
730
|
-
if (source == null) return {};
|
|
731
|
-
var target = _objectWithoutPropertiesLoose$1(source, excluded);
|
|
732
|
-
var key, i;
|
|
733
|
-
if (Object.getOwnPropertySymbols) {
|
|
734
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
735
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
736
|
-
key = sourceSymbolKeys[i];
|
|
737
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
738
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
739
|
-
target[key] = source[key];
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
return target;
|
|
743
|
-
}
|
|
744
|
-
function _objectWithoutPropertiesLoose$1(source, excluded) {
|
|
745
|
-
if (source == null) return {};
|
|
746
|
-
var target = {};
|
|
747
|
-
var sourceKeys = Object.keys(source);
|
|
748
|
-
var key, i;
|
|
749
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
750
|
-
key = sourceKeys[i];
|
|
751
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
752
|
-
target[key] = source[key];
|
|
753
|
-
}
|
|
754
|
-
return target;
|
|
755
|
-
}
|
|
756
|
-
function _objectSpread$1(target) {
|
|
757
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
758
|
-
var source = arguments[i] != null ? Object(arguments[i]) : {};
|
|
759
|
-
var ownKeys = Object.keys(source);
|
|
760
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
761
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
762
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
763
|
-
}));
|
|
764
|
-
}
|
|
765
|
-
ownKeys.forEach(function(key) {
|
|
766
|
-
_defineProperty$1(target, key, source[key]);
|
|
767
|
-
});
|
|
768
|
-
}
|
|
769
|
-
return target;
|
|
770
|
-
}
|
|
771
|
-
function _defineProperty$1(obj, key, value) {
|
|
772
|
-
if (key in obj) {
|
|
773
|
-
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
774
|
-
} else {
|
|
775
|
-
obj[key] = value;
|
|
776
|
-
}
|
|
777
|
-
return obj;
|
|
778
|
-
}
|
|
779
|
-
var twoToneColorPalette = {
|
|
780
|
-
primaryColor: "#333",
|
|
781
|
-
secondaryColor: "#E6E6E6",
|
|
782
|
-
calculated: false
|
|
783
|
-
};
|
|
784
|
-
function setTwoToneColors(_ref) {
|
|
785
|
-
var primaryColor = _ref.primaryColor, secondaryColor = _ref.secondaryColor;
|
|
786
|
-
twoToneColorPalette.primaryColor = primaryColor;
|
|
787
|
-
twoToneColorPalette.secondaryColor = secondaryColor || getSecondaryColor(primaryColor);
|
|
788
|
-
twoToneColorPalette.calculated = !!secondaryColor;
|
|
789
|
-
}
|
|
790
|
-
function getTwoToneColors() {
|
|
791
|
-
return _objectSpread$1({}, twoToneColorPalette);
|
|
792
|
-
}
|
|
793
|
-
var IconBase = function IconBase2(props, context) {
|
|
794
|
-
var _props$context$attrs = _objectSpread$1({}, props, context.attrs), icon = _props$context$attrs.icon, primaryColor = _props$context$attrs.primaryColor, secondaryColor = _props$context$attrs.secondaryColor, restProps = _objectWithoutProperties$1(_props$context$attrs, _excluded$1);
|
|
795
|
-
var colors = twoToneColorPalette;
|
|
796
|
-
if (primaryColor) {
|
|
797
|
-
colors = {
|
|
798
|
-
primaryColor,
|
|
799
|
-
secondaryColor: secondaryColor || getSecondaryColor(primaryColor)
|
|
800
|
-
};
|
|
801
|
-
}
|
|
802
|
-
useInsertStyles();
|
|
803
|
-
warning(isIconDefinition(icon), "icon should be icon definiton, but got ".concat(icon));
|
|
804
|
-
if (!isIconDefinition(icon)) {
|
|
805
|
-
return null;
|
|
806
|
-
}
|
|
807
|
-
var target = icon;
|
|
808
|
-
if (target && typeof target.icon === "function") {
|
|
809
|
-
target = _objectSpread$1({}, target, {
|
|
810
|
-
icon: target.icon(colors.primaryColor, colors.secondaryColor)
|
|
811
|
-
});
|
|
812
|
-
}
|
|
813
|
-
return generate(target.icon, "svg-".concat(target.name), _objectSpread$1({}, restProps, {
|
|
814
|
-
"data-icon": target.name,
|
|
815
|
-
width: "1em",
|
|
816
|
-
height: "1em",
|
|
817
|
-
fill: "currentColor",
|
|
818
|
-
"aria-hidden": "true"
|
|
819
|
-
}));
|
|
820
|
-
};
|
|
821
|
-
IconBase.props = {
|
|
822
|
-
icon: Object,
|
|
823
|
-
primaryColor: String,
|
|
824
|
-
secondaryColor: String,
|
|
825
|
-
focusable: String
|
|
826
|
-
};
|
|
827
|
-
IconBase.inheritAttrs = false;
|
|
828
|
-
IconBase.displayName = "IconBase";
|
|
829
|
-
IconBase.getTwoToneColors = getTwoToneColors;
|
|
830
|
-
IconBase.setTwoToneColors = setTwoToneColors;
|
|
831
|
-
function _slicedToArray$1(arr, i) {
|
|
832
|
-
return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest$1();
|
|
833
|
-
}
|
|
834
|
-
function _nonIterableRest$1() {
|
|
835
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
836
|
-
}
|
|
837
|
-
function _unsupportedIterableToArray$1(o, minLen) {
|
|
838
|
-
if (!o) return;
|
|
839
|
-
if (typeof o === "string") return _arrayLikeToArray$1(o, minLen);
|
|
840
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
841
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
842
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
843
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);
|
|
844
|
-
}
|
|
845
|
-
function _arrayLikeToArray$1(arr, len) {
|
|
846
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
847
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
848
|
-
arr2[i] = arr[i];
|
|
849
|
-
}
|
|
850
|
-
return arr2;
|
|
851
|
-
}
|
|
852
|
-
function _iterableToArrayLimit$1(arr, i) {
|
|
853
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
854
|
-
if (_i == null) return;
|
|
855
|
-
var _arr = [];
|
|
856
|
-
var _n = true;
|
|
857
|
-
var _d = false;
|
|
858
|
-
var _s, _e;
|
|
859
|
-
try {
|
|
860
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
861
|
-
_arr.push(_s.value);
|
|
862
|
-
if (i && _arr.length === i) break;
|
|
863
|
-
}
|
|
864
|
-
} catch (err) {
|
|
865
|
-
_d = true;
|
|
866
|
-
_e = err;
|
|
867
|
-
} finally {
|
|
868
|
-
try {
|
|
869
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
870
|
-
} finally {
|
|
871
|
-
if (_d) throw _e;
|
|
872
|
-
}
|
|
873
|
-
}
|
|
874
|
-
return _arr;
|
|
875
|
-
}
|
|
876
|
-
function _arrayWithHoles$1(arr) {
|
|
877
|
-
if (Array.isArray(arr)) return arr;
|
|
878
|
-
}
|
|
879
|
-
function setTwoToneColor(twoToneColor) {
|
|
880
|
-
var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor), _normalizeTwoToneColo2 = _slicedToArray$1(_normalizeTwoToneColo, 2), primaryColor = _normalizeTwoToneColo2[0], secondaryColor = _normalizeTwoToneColo2[1];
|
|
881
|
-
return IconBase.setTwoToneColors({
|
|
882
|
-
primaryColor,
|
|
883
|
-
secondaryColor
|
|
884
|
-
});
|
|
885
|
-
}
|
|
886
|
-
function getTwoToneColor() {
|
|
887
|
-
var colors = IconBase.getTwoToneColors();
|
|
888
|
-
if (!colors.calculated) {
|
|
889
|
-
return colors.primaryColor;
|
|
890
|
-
}
|
|
891
|
-
return [colors.primaryColor, colors.secondaryColor];
|
|
892
|
-
}
|
|
893
|
-
var _excluded = ["class", "icon", "spin", "rotate", "tabindex", "twoToneColor", "onClick"];
|
|
894
|
-
function _slicedToArray(arr, i) {
|
|
895
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
896
|
-
}
|
|
897
|
-
function _nonIterableRest() {
|
|
898
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
899
|
-
}
|
|
900
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
901
|
-
if (!o) return;
|
|
902
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
903
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
904
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
905
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
906
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
907
|
-
}
|
|
908
|
-
function _arrayLikeToArray(arr, len) {
|
|
909
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
910
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
911
|
-
arr2[i] = arr[i];
|
|
912
|
-
}
|
|
913
|
-
return arr2;
|
|
914
|
-
}
|
|
915
|
-
function _iterableToArrayLimit(arr, i) {
|
|
916
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
917
|
-
if (_i == null) return;
|
|
918
|
-
var _arr = [];
|
|
919
|
-
var _n = true;
|
|
920
|
-
var _d = false;
|
|
921
|
-
var _s, _e;
|
|
922
|
-
try {
|
|
923
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
924
|
-
_arr.push(_s.value);
|
|
925
|
-
if (i && _arr.length === i) break;
|
|
926
|
-
}
|
|
927
|
-
} catch (err) {
|
|
928
|
-
_d = true;
|
|
929
|
-
_e = err;
|
|
930
|
-
} finally {
|
|
931
|
-
try {
|
|
932
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
933
|
-
} finally {
|
|
934
|
-
if (_d) throw _e;
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
|
-
return _arr;
|
|
938
|
-
}
|
|
939
|
-
function _arrayWithHoles(arr) {
|
|
940
|
-
if (Array.isArray(arr)) return arr;
|
|
941
|
-
}
|
|
942
|
-
function _objectSpread(target) {
|
|
943
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
944
|
-
var source = arguments[i] != null ? Object(arguments[i]) : {};
|
|
945
|
-
var ownKeys = Object.keys(source);
|
|
946
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
947
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
948
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
949
|
-
}));
|
|
950
|
-
}
|
|
951
|
-
ownKeys.forEach(function(key) {
|
|
952
|
-
_defineProperty(target, key, source[key]);
|
|
953
|
-
});
|
|
954
|
-
}
|
|
955
|
-
return target;
|
|
956
|
-
}
|
|
957
|
-
function _defineProperty(obj, key, value) {
|
|
958
|
-
if (key in obj) {
|
|
959
|
-
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
960
|
-
} else {
|
|
961
|
-
obj[key] = value;
|
|
962
|
-
}
|
|
963
|
-
return obj;
|
|
964
|
-
}
|
|
965
|
-
function _objectWithoutProperties(source, excluded) {
|
|
966
|
-
if (source == null) return {};
|
|
967
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
968
|
-
var key, i;
|
|
969
|
-
if (Object.getOwnPropertySymbols) {
|
|
970
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
971
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
972
|
-
key = sourceSymbolKeys[i];
|
|
973
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
974
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
975
|
-
target[key] = source[key];
|
|
976
|
-
}
|
|
977
|
-
}
|
|
978
|
-
return target;
|
|
979
|
-
}
|
|
980
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
981
|
-
if (source == null) return {};
|
|
982
|
-
var target = {};
|
|
983
|
-
var sourceKeys = Object.keys(source);
|
|
984
|
-
var key, i;
|
|
985
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
986
|
-
key = sourceKeys[i];
|
|
987
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
988
|
-
target[key] = source[key];
|
|
989
|
-
}
|
|
990
|
-
return target;
|
|
991
|
-
}
|
|
992
|
-
setTwoToneColor("#1890ff");
|
|
993
|
-
var Icon = function Icon2(props, context) {
|
|
994
|
-
var _classObj;
|
|
995
|
-
var _props$context$attrs = _objectSpread({}, props, context.attrs), cls = _props$context$attrs["class"], icon = _props$context$attrs.icon, spin = _props$context$attrs.spin, rotate = _props$context$attrs.rotate, tabindex = _props$context$attrs.tabindex, twoToneColor = _props$context$attrs.twoToneColor, onClick = _props$context$attrs.onClick, restProps = _objectWithoutProperties(_props$context$attrs, _excluded);
|
|
996
|
-
var classObj = (_classObj = {
|
|
997
|
-
anticon: true
|
|
998
|
-
}, _defineProperty(_classObj, "anticon-".concat(icon.name), Boolean(icon.name)), _defineProperty(_classObj, cls, cls), _classObj);
|
|
999
|
-
var svgClassString = spin === "" || !!spin || icon.name === "loading" ? "anticon-spin" : "";
|
|
1000
|
-
var iconTabIndex = tabindex;
|
|
1001
|
-
if (iconTabIndex === void 0 && onClick) {
|
|
1002
|
-
iconTabIndex = -1;
|
|
1003
|
-
restProps.tabindex = iconTabIndex;
|
|
1004
|
-
}
|
|
1005
|
-
var svgStyle = rotate ? {
|
|
1006
|
-
msTransform: "rotate(".concat(rotate, "deg)"),
|
|
1007
|
-
transform: "rotate(".concat(rotate, "deg)")
|
|
1008
|
-
} : void 0;
|
|
1009
|
-
var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor), _normalizeTwoToneColo2 = _slicedToArray(_normalizeTwoToneColo, 2), primaryColor = _normalizeTwoToneColo2[0], secondaryColor = _normalizeTwoToneColo2[1];
|
|
1010
|
-
return createVNode("span", _objectSpread({
|
|
1011
|
-
"role": "img",
|
|
1012
|
-
"aria-label": icon.name
|
|
1013
|
-
}, restProps, {
|
|
1014
|
-
"onClick": onClick,
|
|
1015
|
-
"class": classObj
|
|
1016
|
-
}), [createVNode(IconBase, {
|
|
1017
|
-
"class": svgClassString,
|
|
1018
|
-
"icon": icon,
|
|
1019
|
-
"primaryColor": primaryColor,
|
|
1020
|
-
"secondaryColor": secondaryColor,
|
|
1021
|
-
"style": svgStyle
|
|
1022
|
-
}, null)]);
|
|
1023
|
-
};
|
|
1024
|
-
Icon.props = {
|
|
1025
|
-
spin: Boolean,
|
|
1026
|
-
rotate: Number,
|
|
1027
|
-
icon: Object,
|
|
1028
|
-
twoToneColor: String
|
|
1029
|
-
};
|
|
1030
|
-
Icon.displayName = "AntdIcon";
|
|
1031
|
-
Icon.inheritAttrs = false;
|
|
1032
|
-
Icon.getTwoToneColor = getTwoToneColor;
|
|
1033
|
-
Icon.setTwoToneColor = setTwoToneColor;
|
|
1034
|
-
export {
|
|
1035
|
-
Icon as I,
|
|
1036
|
-
SignatureTypeEnum as S,
|
|
1037
|
-
svgBaseProps as s,
|
|
1038
|
-
useInsertStyles as u,
|
|
1039
|
-
warning as w
|
|
1040
|
-
};
|