quick-platform 1.0.46 → 1.0.48
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/application/index.d.ts +8 -8
- package/dist/application/manage.d.ts +3 -3
- package/dist/business/index.d.ts +7 -53
- package/dist/components/i18n.d.ts +1 -1
- package/dist/index.js +8 -2
- package/dist/quick-platform.cjs.development.js +1380 -0
- package/dist/quick-platform.cjs.development.js.map +1 -0
- package/dist/quick-platform.cjs.production.min.js +2 -0
- package/dist/quick-platform.cjs.production.min.js.map +1 -0
- package/dist/quick-platform.esm.js +1361 -0
- package/dist/quick-platform.esm.js.map +1 -0
- package/dist/utils/i18n.d.ts +2 -2
- package/dist/utils/image.d.ts +1 -1
- package/dist/utils/request.d.ts +4 -4
- package/dist/utils/utils.d.ts +1 -1
- package/package.json +4 -3
- package/src/business/index.ts +2 -1
- package/src/components/LocalDebug.ts +1 -1
- package/src/utils/i18n.ts +3 -2
- package/dist/config.js +0 -2
- package/dist/config.js.map +0 -1
- package/dist/index-543d110b.js +0 -547
- package/dist/index-543d110b.js.map +0 -1
- package/dist/index-be61d86b.js +0 -2
- package/dist/index-be61d86b.js.map +0 -1
- package/dist/index.js.map +0 -1
package/dist/index-543d110b.js
DELETED
|
@@ -1,547 +0,0 @@
|
|
|
1
|
-
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
2
|
-
try {
|
|
3
|
-
var i = n[a](c),
|
|
4
|
-
u = i.value;
|
|
5
|
-
} catch (n) {
|
|
6
|
-
return void e(n);
|
|
7
|
-
}
|
|
8
|
-
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
9
|
-
}
|
|
10
|
-
function _asyncToGenerator(n) {
|
|
11
|
-
return function () {
|
|
12
|
-
var t = this,
|
|
13
|
-
e = arguments;
|
|
14
|
-
return new Promise(function (r, o) {
|
|
15
|
-
var a = n.apply(t, e);
|
|
16
|
-
function _next(n) {
|
|
17
|
-
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
|
|
18
|
-
}
|
|
19
|
-
function _throw(n) {
|
|
20
|
-
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
21
|
-
}
|
|
22
|
-
_next(void 0);
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
function _defineProperties(e, r) {
|
|
27
|
-
for (var t = 0; t < r.length; t++) {
|
|
28
|
-
var o = r[t];
|
|
29
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
function _createClass(e, r, t) {
|
|
33
|
-
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
34
|
-
writable: !1
|
|
35
|
-
}), e;
|
|
36
|
-
}
|
|
37
|
-
function _extends() {
|
|
38
|
-
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
39
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
40
|
-
var t = arguments[e];
|
|
41
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
42
|
-
}
|
|
43
|
-
return n;
|
|
44
|
-
}, _extends.apply(null, arguments);
|
|
45
|
-
}
|
|
46
|
-
function _objectWithoutPropertiesLoose(r, e) {
|
|
47
|
-
if (null == r) return {};
|
|
48
|
-
var t = {};
|
|
49
|
-
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
50
|
-
if (e.includes(n)) continue;
|
|
51
|
-
t[n] = r[n];
|
|
52
|
-
}
|
|
53
|
-
return t;
|
|
54
|
-
}
|
|
55
|
-
function _regeneratorRuntime() {
|
|
56
|
-
_regeneratorRuntime = function () {
|
|
57
|
-
return e;
|
|
58
|
-
};
|
|
59
|
-
var t,
|
|
60
|
-
e = {},
|
|
61
|
-
r = Object.prototype,
|
|
62
|
-
n = r.hasOwnProperty,
|
|
63
|
-
o = Object.defineProperty || function (t, e, r) {
|
|
64
|
-
t[e] = r.value;
|
|
65
|
-
},
|
|
66
|
-
i = "function" == typeof Symbol ? Symbol : {},
|
|
67
|
-
a = i.iterator || "@@iterator",
|
|
68
|
-
c = i.asyncIterator || "@@asyncIterator",
|
|
69
|
-
u = i.toStringTag || "@@toStringTag";
|
|
70
|
-
function define(t, e, r) {
|
|
71
|
-
return Object.defineProperty(t, e, {
|
|
72
|
-
value: r,
|
|
73
|
-
enumerable: !0,
|
|
74
|
-
configurable: !0,
|
|
75
|
-
writable: !0
|
|
76
|
-
}), t[e];
|
|
77
|
-
}
|
|
78
|
-
try {
|
|
79
|
-
define({}, "");
|
|
80
|
-
} catch (t) {
|
|
81
|
-
define = function (t, e, r) {
|
|
82
|
-
return t[e] = r;
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
function wrap(t, e, r, n) {
|
|
86
|
-
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
87
|
-
a = Object.create(i.prototype),
|
|
88
|
-
c = new Context(n || []);
|
|
89
|
-
return o(a, "_invoke", {
|
|
90
|
-
value: makeInvokeMethod(t, r, c)
|
|
91
|
-
}), a;
|
|
92
|
-
}
|
|
93
|
-
function tryCatch(t, e, r) {
|
|
94
|
-
try {
|
|
95
|
-
return {
|
|
96
|
-
type: "normal",
|
|
97
|
-
arg: t.call(e, r)
|
|
98
|
-
};
|
|
99
|
-
} catch (t) {
|
|
100
|
-
return {
|
|
101
|
-
type: "throw",
|
|
102
|
-
arg: t
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
e.wrap = wrap;
|
|
107
|
-
var h = "suspendedStart",
|
|
108
|
-
l = "suspendedYield",
|
|
109
|
-
f = "executing",
|
|
110
|
-
s = "completed",
|
|
111
|
-
y = {};
|
|
112
|
-
function Generator() {}
|
|
113
|
-
function GeneratorFunction() {}
|
|
114
|
-
function GeneratorFunctionPrototype() {}
|
|
115
|
-
var p = {};
|
|
116
|
-
define(p, a, function () {
|
|
117
|
-
return this;
|
|
118
|
-
});
|
|
119
|
-
var d = Object.getPrototypeOf,
|
|
120
|
-
v = d && d(d(values([])));
|
|
121
|
-
v && v !== r && n.call(v, a) && (p = v);
|
|
122
|
-
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
123
|
-
function defineIteratorMethods(t) {
|
|
124
|
-
["next", "throw", "return"].forEach(function (e) {
|
|
125
|
-
define(t, e, function (t) {
|
|
126
|
-
return this._invoke(e, t);
|
|
127
|
-
});
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
function AsyncIterator(t, e) {
|
|
131
|
-
function invoke(r, o, i, a) {
|
|
132
|
-
var c = tryCatch(t[r], t, o);
|
|
133
|
-
if ("throw" !== c.type) {
|
|
134
|
-
var u = c.arg,
|
|
135
|
-
h = u.value;
|
|
136
|
-
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
137
|
-
invoke("next", t, i, a);
|
|
138
|
-
}, function (t) {
|
|
139
|
-
invoke("throw", t, i, a);
|
|
140
|
-
}) : e.resolve(h).then(function (t) {
|
|
141
|
-
u.value = t, i(u);
|
|
142
|
-
}, function (t) {
|
|
143
|
-
return invoke("throw", t, i, a);
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
a(c.arg);
|
|
147
|
-
}
|
|
148
|
-
var r;
|
|
149
|
-
o(this, "_invoke", {
|
|
150
|
-
value: function (t, n) {
|
|
151
|
-
function callInvokeWithMethodAndArg() {
|
|
152
|
-
return new e(function (e, r) {
|
|
153
|
-
invoke(t, n, e, r);
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
function makeInvokeMethod(e, r, n) {
|
|
161
|
-
var o = h;
|
|
162
|
-
return function (i, a) {
|
|
163
|
-
if (o === f) throw Error("Generator is already running");
|
|
164
|
-
if (o === s) {
|
|
165
|
-
if ("throw" === i) throw a;
|
|
166
|
-
return {
|
|
167
|
-
value: t,
|
|
168
|
-
done: !0
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
for (n.method = i, n.arg = a;;) {
|
|
172
|
-
var c = n.delegate;
|
|
173
|
-
if (c) {
|
|
174
|
-
var u = maybeInvokeDelegate(c, n);
|
|
175
|
-
if (u) {
|
|
176
|
-
if (u === y) continue;
|
|
177
|
-
return u;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
181
|
-
if (o === h) throw o = s, n.arg;
|
|
182
|
-
n.dispatchException(n.arg);
|
|
183
|
-
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
184
|
-
o = f;
|
|
185
|
-
var p = tryCatch(e, r, n);
|
|
186
|
-
if ("normal" === p.type) {
|
|
187
|
-
if (o = n.done ? s : l, p.arg === y) continue;
|
|
188
|
-
return {
|
|
189
|
-
value: p.arg,
|
|
190
|
-
done: n.done
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
function maybeInvokeDelegate(e, r) {
|
|
198
|
-
var n = r.method,
|
|
199
|
-
o = e.iterator[n];
|
|
200
|
-
if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
|
|
201
|
-
var i = tryCatch(o, e.iterator, r.arg);
|
|
202
|
-
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
203
|
-
var a = i.arg;
|
|
204
|
-
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
|
|
205
|
-
}
|
|
206
|
-
function pushTryEntry(t) {
|
|
207
|
-
var e = {
|
|
208
|
-
tryLoc: t[0]
|
|
209
|
-
};
|
|
210
|
-
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
211
|
-
}
|
|
212
|
-
function resetTryEntry(t) {
|
|
213
|
-
var e = t.completion || {};
|
|
214
|
-
e.type = "normal", delete e.arg, t.completion = e;
|
|
215
|
-
}
|
|
216
|
-
function Context(t) {
|
|
217
|
-
this.tryEntries = [{
|
|
218
|
-
tryLoc: "root"
|
|
219
|
-
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
220
|
-
}
|
|
221
|
-
function values(e) {
|
|
222
|
-
if (e || "" === e) {
|
|
223
|
-
var r = e[a];
|
|
224
|
-
if (r) return r.call(e);
|
|
225
|
-
if ("function" == typeof e.next) return e;
|
|
226
|
-
if (!isNaN(e.length)) {
|
|
227
|
-
var o = -1,
|
|
228
|
-
i = function next() {
|
|
229
|
-
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
230
|
-
return next.value = t, next.done = !0, next;
|
|
231
|
-
};
|
|
232
|
-
return i.next = i;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
throw new TypeError(typeof e + " is not iterable");
|
|
236
|
-
}
|
|
237
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
238
|
-
value: GeneratorFunctionPrototype,
|
|
239
|
-
configurable: !0
|
|
240
|
-
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
241
|
-
value: GeneratorFunction,
|
|
242
|
-
configurable: !0
|
|
243
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
244
|
-
var e = "function" == typeof t && t.constructor;
|
|
245
|
-
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
246
|
-
}, e.mark = function (t) {
|
|
247
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
248
|
-
}, e.awrap = function (t) {
|
|
249
|
-
return {
|
|
250
|
-
__await: t
|
|
251
|
-
};
|
|
252
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
253
|
-
return this;
|
|
254
|
-
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
255
|
-
void 0 === i && (i = Promise);
|
|
256
|
-
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
257
|
-
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
258
|
-
return t.done ? t.value : a.next();
|
|
259
|
-
});
|
|
260
|
-
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
261
|
-
return this;
|
|
262
|
-
}), define(g, "toString", function () {
|
|
263
|
-
return "[object Generator]";
|
|
264
|
-
}), e.keys = function (t) {
|
|
265
|
-
var e = Object(t),
|
|
266
|
-
r = [];
|
|
267
|
-
for (var n in e) r.push(n);
|
|
268
|
-
return r.reverse(), function next() {
|
|
269
|
-
for (; r.length;) {
|
|
270
|
-
var t = r.pop();
|
|
271
|
-
if (t in e) return next.value = t, next.done = !1, next;
|
|
272
|
-
}
|
|
273
|
-
return next.done = !0, next;
|
|
274
|
-
};
|
|
275
|
-
}, e.values = values, Context.prototype = {
|
|
276
|
-
constructor: Context,
|
|
277
|
-
reset: function (e) {
|
|
278
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
279
|
-
},
|
|
280
|
-
stop: function () {
|
|
281
|
-
this.done = !0;
|
|
282
|
-
var t = this.tryEntries[0].completion;
|
|
283
|
-
if ("throw" === t.type) throw t.arg;
|
|
284
|
-
return this.rval;
|
|
285
|
-
},
|
|
286
|
-
dispatchException: function (e) {
|
|
287
|
-
if (this.done) throw e;
|
|
288
|
-
var r = this;
|
|
289
|
-
function handle(n, o) {
|
|
290
|
-
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
291
|
-
}
|
|
292
|
-
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
293
|
-
var i = this.tryEntries[o],
|
|
294
|
-
a = i.completion;
|
|
295
|
-
if ("root" === i.tryLoc) return handle("end");
|
|
296
|
-
if (i.tryLoc <= this.prev) {
|
|
297
|
-
var c = n.call(i, "catchLoc"),
|
|
298
|
-
u = n.call(i, "finallyLoc");
|
|
299
|
-
if (c && u) {
|
|
300
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
301
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
302
|
-
} else if (c) {
|
|
303
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
304
|
-
} else {
|
|
305
|
-
if (!u) throw Error("try statement without catch or finally");
|
|
306
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
},
|
|
311
|
-
abrupt: function (t, e) {
|
|
312
|
-
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
313
|
-
var o = this.tryEntries[r];
|
|
314
|
-
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
315
|
-
var i = o;
|
|
316
|
-
break;
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
320
|
-
var a = i ? i.completion : {};
|
|
321
|
-
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
322
|
-
},
|
|
323
|
-
complete: function (t, e) {
|
|
324
|
-
if ("throw" === t.type) throw t.arg;
|
|
325
|
-
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
|
|
326
|
-
},
|
|
327
|
-
finish: function (t) {
|
|
328
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
329
|
-
var r = this.tryEntries[e];
|
|
330
|
-
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
331
|
-
}
|
|
332
|
-
},
|
|
333
|
-
catch: function (t) {
|
|
334
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
335
|
-
var r = this.tryEntries[e];
|
|
336
|
-
if (r.tryLoc === t) {
|
|
337
|
-
var n = r.completion;
|
|
338
|
-
if ("throw" === n.type) {
|
|
339
|
-
var o = n.arg;
|
|
340
|
-
resetTryEntry(r);
|
|
341
|
-
}
|
|
342
|
-
return o;
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
throw Error("illegal catch attempt");
|
|
346
|
-
},
|
|
347
|
-
delegateYield: function (e, r, n) {
|
|
348
|
-
return this.delegate = {
|
|
349
|
-
iterator: values(e),
|
|
350
|
-
resultName: r,
|
|
351
|
-
nextLoc: n
|
|
352
|
-
}, "next" === this.method && (this.arg = t), y;
|
|
353
|
-
}
|
|
354
|
-
}, e;
|
|
355
|
-
}
|
|
356
|
-
function _toPrimitive(t, r) {
|
|
357
|
-
if ("object" != typeof t || !t) return t;
|
|
358
|
-
var e = t[Symbol.toPrimitive];
|
|
359
|
-
if (void 0 !== e) {
|
|
360
|
-
var i = e.call(t, r || "default");
|
|
361
|
-
if ("object" != typeof i) return i;
|
|
362
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
363
|
-
}
|
|
364
|
-
return ("string" === r ? String : Number)(t);
|
|
365
|
-
}
|
|
366
|
-
function _toPropertyKey(t) {
|
|
367
|
-
var i = _toPrimitive(t, "string");
|
|
368
|
-
return "symbol" == typeof i ? i : i + "";
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
var DefaultOpacity = /*#__PURE__*/(0.6 * 255).toString(16);
|
|
372
|
-
// eslint-disable-next-line import/no-mutable-exports
|
|
373
|
-
var PrimaryColor = '#ff6600';
|
|
374
|
-
var generateVar = function generateVar(name) {
|
|
375
|
-
return "--color-g-" + name;
|
|
376
|
-
};
|
|
377
|
-
//
|
|
378
|
-
/* todo 预留主题色阶
|
|
379
|
-
{
|
|
380
|
-
'brand-1': string;
|
|
381
|
-
'brand-2': string;
|
|
382
|
-
'brand-3': string;
|
|
383
|
-
'brand-4': string;
|
|
384
|
-
'brand-5': string;
|
|
385
|
-
'brand-6': string;
|
|
386
|
-
}
|
|
387
|
-
*/
|
|
388
|
-
var BrandColor = {};
|
|
389
|
-
var updateBrandColor = function updateBrandColor(color) {
|
|
390
|
-
PrimaryColor = color;
|
|
391
|
-
return BrandColor;
|
|
392
|
-
};
|
|
393
|
-
// todo 预留中性色
|
|
394
|
-
// export const NeutralColor = {} ;
|
|
395
|
-
// // todo 预留中性色-浅色
|
|
396
|
-
// export const NeutralHelperColor: Record<
|
|
397
|
-
// `${keyof typeof NeutralColor}-6`,
|
|
398
|
-
// string
|
|
399
|
-
// > = Object.keys(NeutralColor).reduce<any>((map, key) => {
|
|
400
|
-
// map[`${key}-6`] =
|
|
401
|
-
// NeutralColor[key as unknown as keyof typeof NeutralColor] + DefaultOpacity;
|
|
402
|
-
// return map;
|
|
403
|
-
// }, {});
|
|
404
|
-
/**
|
|
405
|
-
* todo预留功能色
|
|
406
|
-
*/
|
|
407
|
-
var FunctionalColor = {};
|
|
408
|
-
var FunctionalHelperColor = /*#__PURE__*/Object.keys(FunctionalColor).reduce(function (map, key) {
|
|
409
|
-
map[key + "-6"] = FunctionalColor[key] + DefaultOpacity;
|
|
410
|
-
return map;
|
|
411
|
-
}, {});
|
|
412
|
-
|
|
413
|
-
var color = {
|
|
414
|
-
__proto__: null,
|
|
415
|
-
get PrimaryColor () { return PrimaryColor; },
|
|
416
|
-
generateVar: generateVar,
|
|
417
|
-
BrandColor: BrandColor,
|
|
418
|
-
updateBrandColor: updateBrandColor,
|
|
419
|
-
FunctionalColor: FunctionalColor,
|
|
420
|
-
FunctionalHelperColor: FunctionalHelperColor
|
|
421
|
-
};
|
|
422
|
-
|
|
423
|
-
var EnFont = 'Inter';
|
|
424
|
-
var NumberFont = 'Inter';
|
|
425
|
-
var font = function font(size, _lineHeight) {
|
|
426
|
-
return {
|
|
427
|
-
fontSize: size,
|
|
428
|
-
fontWeight: 'initial'
|
|
429
|
-
};
|
|
430
|
-
};
|
|
431
|
-
var bold = function bold(_font) {
|
|
432
|
-
return _extends({}, _font, {
|
|
433
|
-
fontWeight: 'bold'
|
|
434
|
-
});
|
|
435
|
-
};
|
|
436
|
-
var TextFont = {
|
|
437
|
-
Normal: /*#__PURE__*/font(13),
|
|
438
|
-
NormalBold: /*#__PURE__*/bold( /*#__PURE__*/font(13)),
|
|
439
|
-
Small: /*#__PURE__*/font(12),
|
|
440
|
-
SmallBold: /*#__PURE__*/bold( /*#__PURE__*/font(12)),
|
|
441
|
-
Middle: /*#__PURE__*/font(14),
|
|
442
|
-
MiddleBold: /*#__PURE__*/bold( /*#__PURE__*/font(14)),
|
|
443
|
-
Large: /*#__PURE__*/font(16),
|
|
444
|
-
LargeBold: /*#__PURE__*/bold( /*#__PURE__*/font(16)),
|
|
445
|
-
Helper: /*#__PURE__*/font(12)
|
|
446
|
-
};
|
|
447
|
-
var TitleFont = {
|
|
448
|
-
Normal: /*#__PURE__*/font(14),
|
|
449
|
-
// Small: font(16, 24),
|
|
450
|
-
Middle: /*#__PURE__*/font(16)
|
|
451
|
-
};
|
|
452
|
-
|
|
453
|
-
var font$1 = {
|
|
454
|
-
__proto__: null,
|
|
455
|
-
EnFont: EnFont,
|
|
456
|
-
NumberFont: NumberFont,
|
|
457
|
-
TextFont: TextFont,
|
|
458
|
-
TitleFont: TitleFont
|
|
459
|
-
};
|
|
460
|
-
|
|
461
|
-
var DefaultSize = 4;
|
|
462
|
-
// todo 还未定义,暂时不处理
|
|
463
|
-
var BaseSize = /*#__PURE__*/Array.from({
|
|
464
|
-
length: 10
|
|
465
|
-
}).reduce(function (map, _, index) {
|
|
466
|
-
map["size-" + (index + 1)] = (index + 1) * DefaultSize;
|
|
467
|
-
return map;
|
|
468
|
-
}, {});
|
|
469
|
-
var ComponentSize = {};
|
|
470
|
-
var MarginSize = {};
|
|
471
|
-
var IconSize = {
|
|
472
|
-
normal: 16
|
|
473
|
-
};
|
|
474
|
-
// 参考 https://www.woshipm.com/pd/4736098.html
|
|
475
|
-
var ResponsiveScreenSize = {
|
|
476
|
-
s: 480,
|
|
477
|
-
m: 640,
|
|
478
|
-
l: 1024,
|
|
479
|
-
xl: 1366,
|
|
480
|
-
xxl: 1920
|
|
481
|
-
};
|
|
482
|
-
|
|
483
|
-
var size = {
|
|
484
|
-
__proto__: null,
|
|
485
|
-
BaseSize: BaseSize,
|
|
486
|
-
ComponentSize: ComponentSize,
|
|
487
|
-
MarginSize: MarginSize,
|
|
488
|
-
IconSize: IconSize,
|
|
489
|
-
ResponsiveScreenSize: ResponsiveScreenSize
|
|
490
|
-
};
|
|
491
|
-
|
|
492
|
-
var border = function border(width, style) {
|
|
493
|
-
return {
|
|
494
|
-
borderStyle: style,
|
|
495
|
-
borderWidth: width,
|
|
496
|
-
borderColor: '#F0F0F0'
|
|
497
|
-
};
|
|
498
|
-
};
|
|
499
|
-
var borderRadius = function borderRadius(radius) {
|
|
500
|
-
return {
|
|
501
|
-
borderRadius: radius
|
|
502
|
-
};
|
|
503
|
-
};
|
|
504
|
-
var BorderRadius = {
|
|
505
|
-
Small: /*#__PURE__*/borderRadius(6),
|
|
506
|
-
Normal: /*#__PURE__*/borderRadius(8)
|
|
507
|
-
};
|
|
508
|
-
var Border = {
|
|
509
|
-
SolidStroke: /*#__PURE__*/border(1, 'solid'),
|
|
510
|
-
// SolidNormal: border(2, 'solid'),
|
|
511
|
-
// SolidBold: border(3, 'solid'),
|
|
512
|
-
DashedStroke: /*#__PURE__*/border(1, 'dashed')
|
|
513
|
-
};
|
|
514
|
-
// const shadow = (x: number, y: number, b: number, s: number) => {
|
|
515
|
-
// return {
|
|
516
|
-
// offsetX: x,
|
|
517
|
-
// offsetY: y,
|
|
518
|
-
// blurRadius: b,
|
|
519
|
-
// spreadRadius: s,
|
|
520
|
-
// color: '#00000020',
|
|
521
|
-
// };
|
|
522
|
-
// };
|
|
523
|
-
var Shadow = {
|
|
524
|
-
// Level1: shadow(0, 2, 5, 0),
|
|
525
|
-
// Level2: shadow(0, 4, 10, 0),
|
|
526
|
-
// Level3: shadow(0, 8, 20, 0),
|
|
527
|
-
};
|
|
528
|
-
|
|
529
|
-
var style = {
|
|
530
|
-
__proto__: null,
|
|
531
|
-
BorderRadius: BorderRadius,
|
|
532
|
-
Border: Border,
|
|
533
|
-
Shadow: Shadow
|
|
534
|
-
};
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
var index = {
|
|
539
|
-
__proto__: null,
|
|
540
|
-
Color: color,
|
|
541
|
-
Size: size,
|
|
542
|
-
Font: font$1,
|
|
543
|
-
Style: style
|
|
544
|
-
};
|
|
545
|
-
|
|
546
|
-
export { BrandColor as B, MarginSize as M, PrimaryColor as P, Shadow as S, TextFont as T, _createClass as _, _asyncToGenerator as a, _regeneratorRuntime as b, _objectWithoutPropertiesLoose as c, _extends as d, BorderRadius as e, Border as f, generateVar as g, TitleFont as h, index as i, BaseSize as j, updateBrandColor as u };
|
|
547
|
-
//# sourceMappingURL=index-543d110b.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-543d110b.js","sources":["../src/theme/define/color.ts","../src/theme/define/font.ts","../src/theme/define/size.ts","../src/theme/define/style.ts"],"sourcesContent":["const DefaultOpacity = (0.6 * 255).toString(16);\n\n// eslint-disable-next-line import/no-mutable-exports\nexport let PrimaryColor = '#ff6600';\n\nexport const generateVar = (name: string) => {\n return `--color-g-${name}`;\n};\n\n//\n/* todo 预留主题色阶\n{\n 'brand-1': string;\n 'brand-2': string;\n 'brand-3': string;\n 'brand-4': string;\n 'brand-5': string;\n 'brand-6': string;\n}\n*/\nexport const BrandColor = {} as const;\n\nexport const updateBrandColor = (color: string) => {\n PrimaryColor = color;\n return BrandColor;\n};\n\n// todo 预留中性色\n// export const NeutralColor = {} ;\n\n// // todo 预留中性色-浅色\n// export const NeutralHelperColor: Record<\n// `${keyof typeof NeutralColor}-6`,\n// string\n// > = Object.keys(NeutralColor).reduce<any>((map, key) => {\n// map[`${key}-6`] =\n// NeutralColor[key as unknown as keyof typeof NeutralColor] + DefaultOpacity;\n// return map;\n// }, {});\n\n/**\n * todo预留功能色\n */\nexport const FunctionalColor = {};\n\nexport const FunctionalHelperColor: typeof FunctionalColor = Object.keys(\n FunctionalColor\n).reduce<any>((map, key) => {\n map[`${key}-6`] =\n FunctionalColor[(key as unknown) as keyof typeof FunctionalColor] +\n DefaultOpacity;\n return map;\n}, {});\n","export const EnFont = 'Inter';\nexport const NumberFont = 'Inter';\n\nconst font = (size: number, _lineHeight?: number) => {\n return { fontSize: size, fontWeight: 'initial' };\n};\n\nconst bold = (_font: ReturnType<typeof font>) => {\n return { ..._font, fontWeight: 'bold' };\n};\n\nexport const TextFont = {\n Normal: font(13, 22),\n NormalBold: bold(font(13, 22)),\n Small: font(12, 20),\n SmallBold: bold(font(12, 20)),\n Middle: font(14, 22),\n MiddleBold: bold(font(14, 22)),\n Large: font(16, 28),\n LargeBold: bold(font(16, 28)),\n Helper: font(12, 20),\n};\n\nexport const TitleFont = {\n Normal: font(14, 24),\n // Small: font(16, 24),\n Middle: font(16, 28),\n // Large: font(24, 32),\n};\n","const DefaultSize = 4;\n// todo 还未定义,暂时不处理\nexport const BaseSize: {\n 'size-1': number;\n 'size-2': number;\n 'size-3': number;\n 'size-4': number;\n 'size-5': number;\n 'size-6': number;\n 'size-7': number;\n 'size-8': number;\n 'size-9': number;\n 'size-10': number;\n} = Array.from({ length: 10 }).reduce<any>((map, _, index) => {\n map[`size-${index + 1}`] = (index + 1) * DefaultSize;\n return map;\n}, {});\n\nexport const ComponentSize = {};\n\nexport const MarginSize = {};\nexport const IconSize = { normal: 16 };\n\n// 参考 https://www.woshipm.com/pd/4736098.html\nexport const ResponsiveScreenSize = {\n s: 480,\n m: 640,\n l: 1024,\n xl: 1366,\n xxl: 1920,\n};\n","const border = (width: number, style: 'dashed' | 'solid') => {\n return {\n borderStyle: style,\n borderWidth: width,\n borderColor: '#F0F0F0', // todo\n };\n};\nconst borderRadius = (radius: number) => {\n return { borderRadius: radius };\n};\n\nexport const BorderRadius = {\n Small: borderRadius(6),\n Normal: borderRadius(8),\n // Large: borderRadius(10), // todo\n};\n\nexport const Border = {\n SolidStroke: border(1, 'solid'),\n // SolidNormal: border(2, 'solid'),\n // SolidBold: border(3, 'solid'),\n DashedStroke: border(1, 'dashed'),\n // DashedNormal: border(2, 'dashed'),\n // DashedBold: border(3, 'dashed'),\n};\n\n// const shadow = (x: number, y: number, b: number, s: number) => {\n// return {\n// offsetX: x,\n// offsetY: y,\n// blurRadius: b,\n// spreadRadius: s,\n// color: '#00000020',\n// };\n// };\n\nexport const Shadow = {\n // Level1: shadow(0, 2, 5, 0),\n // Level2: shadow(0, 4, 10, 0),\n // Level3: shadow(0, 8, 20, 0),\n};\n"],"names":["DefaultOpacity","toString","PrimaryColor","generateVar","name","BrandColor","updateBrandColor","color","FunctionalColor","FunctionalHelperColor","Object","keys","reduce","map","key","EnFont","NumberFont","font","size","_lineHeight","fontSize","fontWeight","bold","_font","_extends","TextFont","Normal","NormalBold","Small","SmallBold","Middle","MiddleBold","Large","LargeBold","Helper","TitleFont","DefaultSize","BaseSize","Array","from","length","_","index","ComponentSize","MarginSize","IconSize","normal","ResponsiveScreenSize","s","m","l","xl","xxl","border","width","style","borderStyle","borderWidth","borderColor","borderRadius","radius","BorderRadius","Border","SolidStroke","DashedStroke","Shadow"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,cAAc,gBAAG,CAAC,GAAG,GAAG,GAAG,EAAEC,QAAQ,CAAC,EAAE,CAAC;AAE/C;IACWC,YAAY,GAAG;IAEbC,WAAW,GAAG,SAAdA,WAAWA,CAAIC,IAAY;EACtC,sBAAoBA,IAAI;AAC1B;AAEA;AACA;;;;;;;;;;IAUaC,UAAU,GAAG;IAEbC,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,KAAa;EAC5CL,YAAY,GAAGK,KAAK;EACpB,OAAOF,UAAU;AACnB;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;AAGO,IAAMG,eAAe,GAAG,EAAE;AAE1B,IAAMC,qBAAqB,gBAA2BC,MAAM,CAACC,IAAI,CACtEH,eAAe,CAChB,CAACI,MAAM,CAAM,UAACC,GAAG,EAAEC,GAAG;EACrBD,GAAG,CAAIC,GAAG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@
|
|
|
1
|
-
"use strict";function t(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void e(t)}u.done?r(c):Promise.resolve(c).then(n,o)}function r(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,o(n.key),n)}}function e(){return(e=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)({}).hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t}).apply(null,arguments)}function n(){n=function(){return r};var t,r={},e=Object.prototype,o=e.hasOwnProperty,i=Object.defineProperty||function(t,r,e){t[r]=e.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{f({},"")}catch(t){f=function(t,r,e){return t[r]=e}}function s(t,r,e,n){var o=Object.create((r&&r.prototype instanceof g?r:g).prototype),a=new B(n||[]);return i(o,"_invoke",{value:j(t,e,a)}),o}function h(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}r.wrap=s;var p="suspendedStart",y="executing",d="completed",v={};function g(){}function m(){}function w(){}var x={};f(x,u,(function(){return this}));var b=Object.getPrototypeOf,_=b&&b(b(C([])));_&&_!==e&&o.call(_,u)&&(x=_);var L=w.prototype=g.prototype=Object.create(x);function S(t){["next","throw","return"].forEach((function(r){f(t,r,(function(t){return this._invoke(r,t)}))}))}function E(t,r){function e(n,i,a,u){var c=h(t[n],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==typeof f&&o.call(f,"__await")?r.resolve(f.__await).then((function(t){e("next",t,a,u)}),(function(t){e("throw",t,a,u)})):r.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return e("throw",t,a,u)}))}u(c.arg)}var n;i(this,"_invoke",{value:function(t,o){function i(){return new r((function(r,n){e(t,o,r,n)}))}return n=n?n.then(i,i):i()}})}function j(r,e,n){var o=p;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=O(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=h(r,e,n);if("normal"===l.type){if(o=n.done?d:"suspendedYield",l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function O(r,e){var n=e.method,o=r.iterator[n];if(o===t)return e.delegate=null,"throw"===n&&r.iterator.return&&(e.method="return",e.arg=t,O(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=h(o,r.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,v;var a=i.arg;return a?a.done?(e[r.resultName]=a.value,e.next=r.nextLoc,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,v):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function P(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function F(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function B(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function C(r){if(r||""===r){var e=r[u];if(e)return e.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var n=-1,i=function e(){for(;++n<r.length;)if(o.call(r,n))return e.value=r[n],e.done=!1,e;return e.value=t,e.done=!0,e};return i.next=i}}throw new TypeError(typeof r+" is not iterable")}return m.prototype=w,i(L,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:m,configurable:!0}),m.displayName=f(w,l,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===m||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,f(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},r.awrap=function(t){return{__await:t}},S(E.prototype),f(E.prototype,c,(function(){return this})),r.AsyncIterator=E,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new E(s(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(L),f(L,l,"Generator"),f(L,u,(function(){return this})),f(L,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=C,B.prototype={constructor:B,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(F),!r)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var e=this;function n(n,o){return u.type="throw",u.arg=r,e.next=n,o&&(e.method="next",e.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),v},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),F(e),v}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;F(e)}return o}}throw Error("illegal catch attempt")},delegateYield:function(r,e,n){return this.delegate={iterator:C(r),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=t),v}},r}function o(t){var r=function(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof r?r:r+""}var i=153..toString(16);exports.PrimaryColor="#ff6600";var a=function(t){return"--color-g-"+t},u={},c=function(t){return exports.PrimaryColor=t,u},l={},f={__proto__:null,get PrimaryColor(){return exports.PrimaryColor},generateVar:a,BrandColor:u,updateBrandColor:c,FunctionalColor:l,FunctionalHelperColor:Object.keys(l).reduce((function(t,r){return t[r+"-6"]=l[r]+i,t}),{})},s=function(t,r){return{fontSize:t,fontWeight:"initial"}},h=function(t){return e({},t,{fontWeight:"bold"})},p={Normal:s(13),NormalBold:h(s(13)),Small:s(12),SmallBold:h(s(12)),Middle:s(14),MiddleBold:h(s(14)),Large:s(16),LargeBold:h(s(16)),Helper:s(12)},y={Normal:s(14),Middle:s(16)},d={__proto__:null,EnFont:"Inter",NumberFont:"Inter",TextFont:p,TitleFont:y},v=Array.from({length:10}).reduce((function(t,r,e){return t["size-"+(e+1)]=4*(e+1),t}),{}),g={},m={__proto__:null,BaseSize:v,ComponentSize:{},MarginSize:g,IconSize:{normal:16},ResponsiveScreenSize:{s:480,m:640,l:1024,xl:1366,xxl:1920}},w=function(t,r){return{borderStyle:r,borderWidth:t,borderColor:"#F0F0F0"}},x=function(t){return{borderRadius:t}},b={Small:x(6),Normal:x(8)},_={SolidStroke:w(1,"solid"),DashedStroke:w(1,"dashed")},L={},S={__proto__:null,Color:f,Size:m,Font:d,Style:{__proto__:null,BorderRadius:b,Border:_,Shadow:L}};exports.BaseSize=v,exports.Border=_,exports.BorderRadius=b,exports.BrandColor=u,exports.MarginSize=g,exports.Shadow=L,exports.TextFont=p,exports.TitleFont=y,exports._asyncToGenerator=function(r){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=r.apply(e,n);function u(r){t(a,o,i,u,c,"next",r)}function c(r){t(a,o,i,u,c,"throw",r)}u(void 0)}))}},exports._createClass=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t},exports._extends=e,exports._objectWithoutPropertiesLoose=function(t,r){if(null==t)return{};var e={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(r.includes(n))continue;e[n]=t[n]}return e},exports._regeneratorRuntime=n,exports.generateVar=a,exports.index=S,exports.updateBrandColor=c;
|
|
2
|
-
//# sourceMappingURL=index-be61d86b.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-be61d86b.js","sources":["../src/theme/define/color.ts","../src/theme/define/font.ts","../src/theme/define/size.ts","../src/theme/define/style.ts"],"sourcesContent":["const DefaultOpacity = (0.6 * 255).toString(16);\n\n// eslint-disable-next-line import/no-mutable-exports\nexport let PrimaryColor = '#ff6600';\n\nexport const generateVar = (name: string) => {\n return `--color-g-${name}`;\n};\n\n//\n/* todo 预留主题色阶\n{\n 'brand-1': string;\n 'brand-2': string;\n 'brand-3': string;\n 'brand-4': string;\n 'brand-5': string;\n 'brand-6': string;\n}\n*/\nexport const BrandColor = {} as const;\n\nexport const updateBrandColor = (color: string) => {\n PrimaryColor = color;\n return BrandColor;\n};\n\n// todo 预留中性色\n// export const NeutralColor = {} ;\n\n// // todo 预留中性色-浅色\n// export const NeutralHelperColor: Record<\n// `${keyof typeof NeutralColor}-6`,\n// string\n// > = Object.keys(NeutralColor).reduce<any>((map, key) => {\n// map[`${key}-6`] =\n// NeutralColor[key as unknown as keyof typeof NeutralColor] + DefaultOpacity;\n// return map;\n// }, {});\n\n/**\n * todo预留功能色\n */\nexport const FunctionalColor = {};\n\nexport const FunctionalHelperColor: typeof FunctionalColor = Object.keys(\n FunctionalColor\n).reduce<any>((map, key) => {\n map[`${key}-6`] =\n FunctionalColor[(key as unknown) as keyof typeof FunctionalColor] +\n DefaultOpacity;\n return map;\n}, {});\n","export const EnFont = 'Inter';\nexport const NumberFont = 'Inter';\n\nconst font = (size: number, _lineHeight?: number) => {\n return { fontSize: size, fontWeight: 'initial' };\n};\n\nconst bold = (_font: ReturnType<typeof font>) => {\n return { ..._font, fontWeight: 'bold' };\n};\n\nexport const TextFont = {\n Normal: font(13, 22),\n NormalBold: bold(font(13, 22)),\n Small: font(12, 20),\n SmallBold: bold(font(12, 20)),\n Middle: font(14, 22),\n MiddleBold: bold(font(14, 22)),\n Large: font(16, 28),\n LargeBold: bold(font(16, 28)),\n Helper: font(12, 20),\n};\n\nexport const TitleFont = {\n Normal: font(14, 24),\n // Small: font(16, 24),\n Middle: font(16, 28),\n // Large: font(24, 32),\n};\n","const DefaultSize = 4;\n// todo 还未定义,暂时不处理\nexport const BaseSize: {\n 'size-1': number;\n 'size-2': number;\n 'size-3': number;\n 'size-4': number;\n 'size-5': number;\n 'size-6': number;\n 'size-7': number;\n 'size-8': number;\n 'size-9': number;\n 'size-10': number;\n} = Array.from({ length: 10 }).reduce<any>((map, _, index) => {\n map[`size-${index + 1}`] = (index + 1) * DefaultSize;\n return map;\n}, {});\n\nexport const ComponentSize = {};\n\nexport const MarginSize = {};\nexport const IconSize = { normal: 16 };\n\n// 参考 https://www.woshipm.com/pd/4736098.html\nexport const ResponsiveScreenSize = {\n s: 480,\n m: 640,\n l: 1024,\n xl: 1366,\n xxl: 1920,\n};\n","const border = (width: number, style: 'dashed' | 'solid') => {\n return {\n borderStyle: style,\n borderWidth: width,\n borderColor: '#F0F0F0', // todo\n };\n};\nconst borderRadius = (radius: number) => {\n return { borderRadius: radius };\n};\n\nexport const BorderRadius = {\n Small: borderRadius(6),\n Normal: borderRadius(8),\n // Large: borderRadius(10), // todo\n};\n\nexport const Border = {\n SolidStroke: border(1, 'solid'),\n // SolidNormal: border(2, 'solid'),\n // SolidBold: border(3, 'solid'),\n DashedStroke: border(1, 'dashed'),\n // DashedNormal: border(2, 'dashed'),\n // DashedBold: border(3, 'dashed'),\n};\n\n// const shadow = (x: number, y: number, b: number, s: number) => {\n// return {\n// offsetX: x,\n// offsetY: y,\n// blurRadius: b,\n// spreadRadius: s,\n// color: '#00000020',\n// };\n// };\n\nexport const Shadow = {\n // Level1: shadow(0, 2, 5, 0),\n // Level2: shadow(0, 4, 10, 0),\n // Level3: shadow(0, 8, 20, 0),\n};\n"],"names":["DefaultOpacity","toString","PrimaryColor","generateVar","name","BrandColor","updateBrandColor","color","FunctionalColor","Object","keys","reduce","map","key","font","size","_lineHeight","fontSize","fontWeight","bold","_font","_extends","TextFont","Normal","NormalBold","Small","SmallBold","Middle","MiddleBold","Large","LargeBold","Helper","TitleFont","BaseSize","Array","from","length","_","index","MarginSize","normal","s","m","l","xl","xxl","border","width","style","borderStyle","borderWidth","borderColor","borderRadius","radius","BorderRadius","Border","SolidStroke","DashedStroke","Shadow"],"mappings":"uoOAAA,IAAMA,EA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