@blocklet/theme 2.13.42 → 2.13.44
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/cjs/index.js +348 -241
- package/dist/es/index.js +348 -241
- package/dist/types/index.d.ts +2 -40
- package/package.json +3 -2
package/dist/cjs/index.js
CHANGED
|
@@ -144,6 +144,114 @@ __export(src_exports, {
|
|
|
144
144
|
});
|
|
145
145
|
module.exports = __toCommonJS(src_exports);
|
|
146
146
|
|
|
147
|
+
// node_modules/@mui/utils/esm/formatMuiErrorMessage/formatMuiErrorMessage.js
|
|
148
|
+
function formatMuiErrorMessage(code, ...args) {
|
|
149
|
+
const url = new URL(`https://mui.com/production-error/?code=${code}`);
|
|
150
|
+
args.forEach((arg) => url.searchParams.append("args[]", arg));
|
|
151
|
+
return `Minified MUI error #${code}; visit ${url} for the full message.`;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// node_modules/@mui/utils/esm/clamp/clamp.js
|
|
155
|
+
function clamp(val, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {
|
|
156
|
+
return Math.max(min, Math.min(val, max));
|
|
157
|
+
}
|
|
158
|
+
var clamp_default = clamp;
|
|
159
|
+
|
|
160
|
+
// node_modules/@mui/system/esm/colorManipulator/colorManipulator.js
|
|
161
|
+
function clampWrapper(value, min = 0, max = 1) {
|
|
162
|
+
if (process.env.NODE_ENV !== "production") {
|
|
163
|
+
if (value < min || value > max) {
|
|
164
|
+
console.error(`MUI: The value provided ${value} is out of range [${min}, ${max}].`);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return clamp_default(value, min, max);
|
|
168
|
+
}
|
|
169
|
+
function hexToRgb(color) {
|
|
170
|
+
color = color.slice(1);
|
|
171
|
+
const re = new RegExp(`.{1,${color.length >= 6 ? 2 : 1}}`, "g");
|
|
172
|
+
let colors = color.match(re);
|
|
173
|
+
if (colors && colors[0].length === 1) {
|
|
174
|
+
colors = colors.map((n) => n + n);
|
|
175
|
+
}
|
|
176
|
+
if (process.env.NODE_ENV !== "production") {
|
|
177
|
+
if (color.length !== color.trim().length) {
|
|
178
|
+
console.error(`MUI: The color: "${color}" is invalid. Make sure the color input doesn't contain leading/trailing space.`);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
return colors ? `rgb${colors.length === 4 ? "a" : ""}(${colors.map((n, index) => {
|
|
182
|
+
return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1e3) / 1e3;
|
|
183
|
+
}).join(", ")})` : "";
|
|
184
|
+
}
|
|
185
|
+
function decomposeColor(color) {
|
|
186
|
+
if (color.type) {
|
|
187
|
+
return color;
|
|
188
|
+
}
|
|
189
|
+
if (color.charAt(0) === "#") {
|
|
190
|
+
return decomposeColor(hexToRgb(color));
|
|
191
|
+
}
|
|
192
|
+
const marker = color.indexOf("(");
|
|
193
|
+
const type = color.substring(0, marker);
|
|
194
|
+
if (!["rgb", "rgba", "hsl", "hsla", "color"].includes(type)) {
|
|
195
|
+
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: Unsupported \`${color}\` color.
|
|
196
|
+
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` : formatMuiErrorMessage(9, color));
|
|
197
|
+
}
|
|
198
|
+
let values = color.substring(marker + 1, color.length - 1);
|
|
199
|
+
let colorSpace;
|
|
200
|
+
if (type === "color") {
|
|
201
|
+
values = values.split(" ");
|
|
202
|
+
colorSpace = values.shift();
|
|
203
|
+
if (values.length === 4 && values[3].charAt(0) === "/") {
|
|
204
|
+
values[3] = values[3].slice(1);
|
|
205
|
+
}
|
|
206
|
+
if (!["srgb", "display-p3", "a98-rgb", "prophoto-rgb", "rec-2020"].includes(colorSpace)) {
|
|
207
|
+
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: unsupported \`${colorSpace}\` color space.
|
|
208
|
+
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.` : formatMuiErrorMessage(10, colorSpace));
|
|
209
|
+
}
|
|
210
|
+
} else {
|
|
211
|
+
values = values.split(",");
|
|
212
|
+
}
|
|
213
|
+
values = values.map((value) => parseFloat(value));
|
|
214
|
+
return {
|
|
215
|
+
type,
|
|
216
|
+
values,
|
|
217
|
+
colorSpace
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
function recomposeColor(color) {
|
|
221
|
+
const {
|
|
222
|
+
type,
|
|
223
|
+
colorSpace
|
|
224
|
+
} = color;
|
|
225
|
+
let {
|
|
226
|
+
values
|
|
227
|
+
} = color;
|
|
228
|
+
if (type.includes("rgb")) {
|
|
229
|
+
values = values.map((n, i) => i < 3 ? parseInt(n, 10) : n);
|
|
230
|
+
} else if (type.includes("hsl")) {
|
|
231
|
+
values[1] = `${values[1]}%`;
|
|
232
|
+
values[2] = `${values[2]}%`;
|
|
233
|
+
}
|
|
234
|
+
if (type.includes("color")) {
|
|
235
|
+
values = `${colorSpace} ${values.join(" ")}`;
|
|
236
|
+
} else {
|
|
237
|
+
values = `${values.join(", ")}`;
|
|
238
|
+
}
|
|
239
|
+
return `${type}(${values})`;
|
|
240
|
+
}
|
|
241
|
+
function alpha(color, value) {
|
|
242
|
+
color = decomposeColor(color);
|
|
243
|
+
value = clampWrapper(value);
|
|
244
|
+
if (color.type === "rgb" || color.type === "hsl") {
|
|
245
|
+
color.type += "a";
|
|
246
|
+
}
|
|
247
|
+
if (color.type === "color") {
|
|
248
|
+
color.values[3] = `/${value}`;
|
|
249
|
+
} else {
|
|
250
|
+
color.values[3] = value;
|
|
251
|
+
}
|
|
252
|
+
return recomposeColor(color);
|
|
253
|
+
}
|
|
254
|
+
|
|
147
255
|
// src/util.ts
|
|
148
256
|
var import_deepmerge = __toESM(require_cjs());
|
|
149
257
|
var merge = (x, y) => {
|
|
@@ -156,97 +264,6 @@ var merge = (x, y) => {
|
|
|
156
264
|
// src/blocklet.ts
|
|
157
265
|
var BLOCKLET_THEME_PREFER_KEY = "blocklet_theme_prefer";
|
|
158
266
|
var DEFAULT_FONTS = ["Roboto", "Helvetica", "Arial", "sans-serif"];
|
|
159
|
-
var paletteLight = {
|
|
160
|
-
mode: "light",
|
|
161
|
-
primary: {
|
|
162
|
-
main: "#00bba7",
|
|
163
|
-
contrastText: "#fff",
|
|
164
|
-
light: "#00d5be",
|
|
165
|
-
dark: "#009689"
|
|
166
|
-
},
|
|
167
|
-
secondary: {
|
|
168
|
-
main: "#00b8db",
|
|
169
|
-
contrastText: "#fff",
|
|
170
|
-
light: "#00d3f3",
|
|
171
|
-
dark: "#0092bb"
|
|
172
|
-
},
|
|
173
|
-
error: {
|
|
174
|
-
main: "#fb2c36",
|
|
175
|
-
contrastText: "#fff",
|
|
176
|
-
light: "#ff6467",
|
|
177
|
-
dark: "#e7000b"
|
|
178
|
-
},
|
|
179
|
-
warning: {
|
|
180
|
-
main: "#ff6900",
|
|
181
|
-
contrastText: "#fff",
|
|
182
|
-
light: "#ff8904",
|
|
183
|
-
dark: "#f54900"
|
|
184
|
-
},
|
|
185
|
-
info: {
|
|
186
|
-
main: "#2b7fff",
|
|
187
|
-
contrastText: "#fff",
|
|
188
|
-
light: "#51a2ff",
|
|
189
|
-
dark: "#155dfc"
|
|
190
|
-
},
|
|
191
|
-
success: {
|
|
192
|
-
main: "#00c950",
|
|
193
|
-
contrastText: "#fff",
|
|
194
|
-
light: "#05df72",
|
|
195
|
-
dark: "#00a63e"
|
|
196
|
-
},
|
|
197
|
-
grey: {
|
|
198
|
-
"50": "#fafafa",
|
|
199
|
-
"100": "#f4f4f5",
|
|
200
|
-
"200": "#e4e4e7",
|
|
201
|
-
"300": "#d4d4d8",
|
|
202
|
-
"400": "#9f9fa9",
|
|
203
|
-
"500": "#71717b",
|
|
204
|
-
"600": "#52525c",
|
|
205
|
-
"700": "#3f3f47",
|
|
206
|
-
"800": "#27272a",
|
|
207
|
-
"900": "#18181b",
|
|
208
|
-
A100: "#09090b",
|
|
209
|
-
A200: "#09090b",
|
|
210
|
-
A400: "#09090b",
|
|
211
|
-
A700: "#09090b"
|
|
212
|
-
},
|
|
213
|
-
text: {
|
|
214
|
-
primary: "#18181b",
|
|
215
|
-
secondary: "#71717b",
|
|
216
|
-
disabled: "#d4d4d8",
|
|
217
|
-
hint: "#d4d4d8",
|
|
218
|
-
contrast: "#fff"
|
|
219
|
-
},
|
|
220
|
-
divider: "#ececef",
|
|
221
|
-
background: {
|
|
222
|
-
default: "#fff",
|
|
223
|
-
paper: "#fff"
|
|
224
|
-
},
|
|
225
|
-
common: {
|
|
226
|
-
black: "#000",
|
|
227
|
-
white: "#fff"
|
|
228
|
-
},
|
|
229
|
-
action: {
|
|
230
|
-
active: "rgba(24, 24, 27, 0.54)",
|
|
231
|
-
hover: "rgba(24, 24, 27, 0.04)",
|
|
232
|
-
hoverOpacity: 0.04,
|
|
233
|
-
selected: "rgba(24, 24, 27, 0.08)",
|
|
234
|
-
selectedOpacity: 0.08,
|
|
235
|
-
disabled: "rgba(24, 24, 27, 0.26)",
|
|
236
|
-
disabledBackground: "rgba(24, 24, 27, 0.12)",
|
|
237
|
-
disabledOpacity: 0.38,
|
|
238
|
-
focus: "rgba(24, 24, 27, 0.12)",
|
|
239
|
-
focusOpacity: 0.12,
|
|
240
|
-
activatedOpacity: 0.12
|
|
241
|
-
},
|
|
242
|
-
// @extends palette
|
|
243
|
-
storeSecondary: { main: "#EBFEFF", contrastText: "#fff" },
|
|
244
|
-
// 适用于 did 相关的组件, 如果某些产品整体风格是 did 系列, 可以扩展出一个 did 系列的 theme
|
|
245
|
-
did: {
|
|
246
|
-
primary: "#4598FA",
|
|
247
|
-
secondary: "#49C3AD"
|
|
248
|
-
}
|
|
249
|
-
};
|
|
250
267
|
var shadows = [
|
|
251
268
|
"none",
|
|
252
269
|
"0px 1px 2px 0px rgba(24,24,27,0.06),0px 1px 3px 0px rgba(24,24,27,0.03)",
|
|
@@ -275,7 +292,97 @@ var shadows = [
|
|
|
275
292
|
"0px 12px 48px 0px rgba(24,24,27,0.29),0px 11.5px 26px 0px rgba(24,24,27,0.145)"
|
|
276
293
|
];
|
|
277
294
|
var BLOCKLET_THEME_LIGHT = {
|
|
278
|
-
palette:
|
|
295
|
+
palette: {
|
|
296
|
+
mode: "light",
|
|
297
|
+
primary: {
|
|
298
|
+
main: "#00bba7",
|
|
299
|
+
contrastText: "#fff",
|
|
300
|
+
light: "#00d5be",
|
|
301
|
+
dark: "#009689"
|
|
302
|
+
},
|
|
303
|
+
secondary: {
|
|
304
|
+
main: "#00b8db",
|
|
305
|
+
contrastText: "#fff",
|
|
306
|
+
light: "#00d3f3",
|
|
307
|
+
dark: "#0092bb"
|
|
308
|
+
},
|
|
309
|
+
error: {
|
|
310
|
+
main: "#fb2c36",
|
|
311
|
+
contrastText: "#fff",
|
|
312
|
+
light: "#ff6467",
|
|
313
|
+
dark: "#e7000b"
|
|
314
|
+
},
|
|
315
|
+
warning: {
|
|
316
|
+
main: "#ff6900",
|
|
317
|
+
contrastText: "#fff",
|
|
318
|
+
light: "#ff8904",
|
|
319
|
+
dark: "#f54900"
|
|
320
|
+
},
|
|
321
|
+
info: {
|
|
322
|
+
main: "#2b7fff",
|
|
323
|
+
contrastText: "#fff",
|
|
324
|
+
light: "#51a2ff",
|
|
325
|
+
dark: "#155dfc"
|
|
326
|
+
},
|
|
327
|
+
success: {
|
|
328
|
+
main: "#00c950",
|
|
329
|
+
contrastText: "#fff",
|
|
330
|
+
light: "#05df72",
|
|
331
|
+
dark: "#00a63e"
|
|
332
|
+
},
|
|
333
|
+
grey: {
|
|
334
|
+
"50": "#fafafa",
|
|
335
|
+
"100": "#f4f4f5",
|
|
336
|
+
"200": "#e4e4e7",
|
|
337
|
+
"300": "#d4d4d8",
|
|
338
|
+
"400": "#9f9fa9",
|
|
339
|
+
"500": "#71717b",
|
|
340
|
+
"600": "#52525c",
|
|
341
|
+
"700": "#3f3f47",
|
|
342
|
+
"800": "#27272a",
|
|
343
|
+
"900": "#18181b",
|
|
344
|
+
A100: "#09090b",
|
|
345
|
+
A200: "#09090b",
|
|
346
|
+
A400: "#09090b",
|
|
347
|
+
A700: "#09090b"
|
|
348
|
+
},
|
|
349
|
+
text: {
|
|
350
|
+
primary: "#18181b",
|
|
351
|
+
secondary: "#71717b",
|
|
352
|
+
disabled: "#d4d4d8",
|
|
353
|
+
hint: "#d4d4d8",
|
|
354
|
+
contrast: "#fff"
|
|
355
|
+
},
|
|
356
|
+
divider: "#ececef",
|
|
357
|
+
background: {
|
|
358
|
+
default: "#fff",
|
|
359
|
+
paper: "#fff"
|
|
360
|
+
},
|
|
361
|
+
common: {
|
|
362
|
+
black: "#000",
|
|
363
|
+
white: "#fff"
|
|
364
|
+
},
|
|
365
|
+
action: {
|
|
366
|
+
active: "rgba(24, 24, 27, 0.54)",
|
|
367
|
+
hover: "rgba(24, 24, 27, 0.04)",
|
|
368
|
+
hoverOpacity: 0.04,
|
|
369
|
+
selected: "rgba(24, 24, 27, 0.08)",
|
|
370
|
+
selectedOpacity: 0.08,
|
|
371
|
+
disabled: "rgba(24, 24, 27, 0.26)",
|
|
372
|
+
disabledBackground: "rgba(24, 24, 27, 0.12)",
|
|
373
|
+
disabledOpacity: 0.38,
|
|
374
|
+
focus: "rgba(24, 24, 27, 0.12)",
|
|
375
|
+
focusOpacity: 0.12,
|
|
376
|
+
activatedOpacity: 0.12
|
|
377
|
+
},
|
|
378
|
+
// @extends palette
|
|
379
|
+
storeSecondary: { main: "#EBFEFF", contrastText: "#fff" },
|
|
380
|
+
// 适用于 did 相关的组件, 如果某些产品整体风格是 did 系列, 可以扩展出一个 did 系列的 theme
|
|
381
|
+
did: {
|
|
382
|
+
primary: "#4598FA",
|
|
383
|
+
secondary: "#49C3AD"
|
|
384
|
+
}
|
|
385
|
+
},
|
|
279
386
|
shape: {
|
|
280
387
|
borderRadius: 8
|
|
281
388
|
},
|
|
@@ -289,13 +396,13 @@ var BLOCKLET_THEME_LIGHT = {
|
|
|
289
396
|
allVariants: {
|
|
290
397
|
textTransform: "none"
|
|
291
398
|
},
|
|
292
|
-
// @
|
|
399
|
+
// @deprecated 兼容旧代码,应使用 theme.palette.text 中的色值
|
|
293
400
|
color: {
|
|
294
401
|
// layout/sidebar.js -> Icon/image 加载图片时 color 会影响加载路径
|
|
295
402
|
// 或者如果可以的话直接删掉 typography#color, 文本颜色建议使用 theme.palette.text 中的色值?
|
|
296
403
|
// layout 组件建议重构, sidebar 中建议使用 icon 替换 img (#366)
|
|
297
|
-
main:
|
|
298
|
-
gray:
|
|
404
|
+
main: "#18181b",
|
|
405
|
+
gray: "#71717b"
|
|
299
406
|
},
|
|
300
407
|
h1: {
|
|
301
408
|
fontSize: "1.875rem",
|
|
@@ -434,13 +541,13 @@ var BLOCKLET_THEME_LIGHT = {
|
|
|
434
541
|
paddingLeft: 0,
|
|
435
542
|
paddingRight: "30px"
|
|
436
543
|
},
|
|
437
|
-
head: {
|
|
544
|
+
head: ({ theme }) => ({
|
|
438
545
|
textTransform: "uppercase",
|
|
439
|
-
color:
|
|
440
|
-
},
|
|
441
|
-
body: {
|
|
442
|
-
color:
|
|
443
|
-
}
|
|
546
|
+
color: theme.palette.grey[900]
|
|
547
|
+
}),
|
|
548
|
+
body: ({ theme }) => ({
|
|
549
|
+
color: theme.palette.grey[900]
|
|
550
|
+
})
|
|
444
551
|
}
|
|
445
552
|
},
|
|
446
553
|
MuiTableRow: {
|
|
@@ -457,20 +564,20 @@ var BLOCKLET_THEME_LIGHT = {
|
|
|
457
564
|
},
|
|
458
565
|
MuiTooltip: {
|
|
459
566
|
styleOverrides: {
|
|
460
|
-
tooltip: {
|
|
461
|
-
backgroundColor:
|
|
462
|
-
color:
|
|
463
|
-
},
|
|
464
|
-
arrow: {
|
|
465
|
-
color:
|
|
466
|
-
}
|
|
567
|
+
tooltip: ({ theme }) => ({
|
|
568
|
+
backgroundColor: theme.palette.grey[500],
|
|
569
|
+
color: theme.palette.text.contrast
|
|
570
|
+
}),
|
|
571
|
+
arrow: ({ theme }) => ({
|
|
572
|
+
color: theme.palette.grey[500]
|
|
573
|
+
})
|
|
467
574
|
}
|
|
468
575
|
},
|
|
469
576
|
MuiPaper: {
|
|
470
577
|
styleOverrides: {
|
|
471
|
-
root: {
|
|
472
|
-
|
|
473
|
-
}
|
|
578
|
+
root: ({ theme }) => ({
|
|
579
|
+
boxShadow: `inset 0 0 0 1px ${theme.palette.action.hover}`
|
|
580
|
+
})
|
|
474
581
|
}
|
|
475
582
|
},
|
|
476
583
|
MuiAlert: {
|
|
@@ -495,92 +602,91 @@ var BLOCKLET_THEME_LIGHT = {
|
|
|
495
602
|
}
|
|
496
603
|
}
|
|
497
604
|
};
|
|
498
|
-
var paletteDark = {
|
|
499
|
-
mode: "dark",
|
|
500
|
-
common: {
|
|
501
|
-
black: "#000",
|
|
502
|
-
white: "#fff"
|
|
503
|
-
},
|
|
504
|
-
primary: {
|
|
505
|
-
main: "#00d5be",
|
|
506
|
-
contrastText: "#f4f4f5",
|
|
507
|
-
light: "#4ce3d0",
|
|
508
|
-
dark: "#00a89a"
|
|
509
|
-
},
|
|
510
|
-
secondary: {
|
|
511
|
-
main: "#00d3f3",
|
|
512
|
-
contrastText: "#f4f4f5",
|
|
513
|
-
light: "#51e1ff",
|
|
514
|
-
dark: "#00a2c0"
|
|
515
|
-
},
|
|
516
|
-
error: {
|
|
517
|
-
main: "#ff6467",
|
|
518
|
-
contrastText: "#f4f4f5",
|
|
519
|
-
light: "#ff9598",
|
|
520
|
-
dark: "#e7000b"
|
|
521
|
-
},
|
|
522
|
-
warning: {
|
|
523
|
-
main: "#ff8904",
|
|
524
|
-
contrastText: "#f4f4f5",
|
|
525
|
-
light: "#ffa644",
|
|
526
|
-
dark: "#f54900"
|
|
527
|
-
},
|
|
528
|
-
info: {
|
|
529
|
-
main: "#51a2ff",
|
|
530
|
-
contrastText: "#f4f4f5",
|
|
531
|
-
light: "#83c3ff",
|
|
532
|
-
dark: "#1570e5"
|
|
533
|
-
},
|
|
534
|
-
success: {
|
|
535
|
-
main: "#05df72",
|
|
536
|
-
contrastText: "#f4f4f5",
|
|
537
|
-
light: "#56e799",
|
|
538
|
-
dark: "#00b24a"
|
|
539
|
-
},
|
|
540
|
-
grey: {
|
|
541
|
-
"50": "#18181b",
|
|
542
|
-
"100": "#27272a",
|
|
543
|
-
"200": "#3f3f47",
|
|
544
|
-
"300": "#52525c",
|
|
545
|
-
"400": "#71717b",
|
|
546
|
-
"500": "#9f9fa9",
|
|
547
|
-
"600": "#d4d4d8",
|
|
548
|
-
"700": "#e4e4e7",
|
|
549
|
-
"800": "#f4f4f5",
|
|
550
|
-
"900": "#fafafa",
|
|
551
|
-
A100: "#f8f8fa",
|
|
552
|
-
A200: "#f8f8fa",
|
|
553
|
-
A400: "#f8f8fa",
|
|
554
|
-
A700: "#f8f8fa"
|
|
555
|
-
},
|
|
556
|
-
text: {
|
|
557
|
-
primary: "#ffffff",
|
|
558
|
-
secondary: "#A1a1aa",
|
|
559
|
-
disabled: "#52525c",
|
|
560
|
-
hint: "#71717b",
|
|
561
|
-
contrast: "#18181b"
|
|
562
|
-
},
|
|
563
|
-
divider: "#27272A",
|
|
564
|
-
background: {
|
|
565
|
-
default: "#121212",
|
|
566
|
-
paper: "#18181b"
|
|
567
|
-
},
|
|
568
|
-
action: {
|
|
569
|
-
active: "rgba(255, 255, 255, 0.54)",
|
|
570
|
-
hover: "rgba(255, 255, 255, 0.08)",
|
|
571
|
-
hoverOpacity: 0.08,
|
|
572
|
-
selected: "rgba(255, 255, 255, 0.16)",
|
|
573
|
-
selectedOpacity: 0.16,
|
|
574
|
-
disabled: "rgba(255, 255, 255, 0.26)",
|
|
575
|
-
disabledBackground: "rgba(255, 255, 255, 0.12)",
|
|
576
|
-
disabledOpacity: 0.38,
|
|
577
|
-
focus: "rgba(255, 255, 255, 0.12)",
|
|
578
|
-
focusOpacity: 0.12,
|
|
579
|
-
activatedOpacity: 0.24
|
|
580
|
-
}
|
|
581
|
-
};
|
|
582
605
|
var BLOCKLET_THEME_DARK = merge(BLOCKLET_THEME_LIGHT, {
|
|
583
|
-
palette:
|
|
606
|
+
palette: {
|
|
607
|
+
mode: "dark",
|
|
608
|
+
common: {
|
|
609
|
+
black: "#000",
|
|
610
|
+
white: "#fff"
|
|
611
|
+
},
|
|
612
|
+
primary: {
|
|
613
|
+
main: "#00d5be",
|
|
614
|
+
contrastText: "#f4f4f5",
|
|
615
|
+
light: "#4ce3d0",
|
|
616
|
+
dark: "#00a89a"
|
|
617
|
+
},
|
|
618
|
+
secondary: {
|
|
619
|
+
main: "#00d3f3",
|
|
620
|
+
contrastText: "#f4f4f5",
|
|
621
|
+
light: "#51e1ff",
|
|
622
|
+
dark: "#00a2c0"
|
|
623
|
+
},
|
|
624
|
+
error: {
|
|
625
|
+
main: "#ff6467",
|
|
626
|
+
contrastText: "#f4f4f5",
|
|
627
|
+
light: "#ff9598",
|
|
628
|
+
dark: "#e7000b"
|
|
629
|
+
},
|
|
630
|
+
warning: {
|
|
631
|
+
main: "#ff8904",
|
|
632
|
+
contrastText: "#f4f4f5",
|
|
633
|
+
light: "#ffa644",
|
|
634
|
+
dark: "#f54900"
|
|
635
|
+
},
|
|
636
|
+
info: {
|
|
637
|
+
main: "#51a2ff",
|
|
638
|
+
contrastText: "#f4f4f5",
|
|
639
|
+
light: "#83c3ff",
|
|
640
|
+
dark: "#1570e5"
|
|
641
|
+
},
|
|
642
|
+
success: {
|
|
643
|
+
main: "#05df72",
|
|
644
|
+
contrastText: "#f4f4f5",
|
|
645
|
+
light: "#56e799",
|
|
646
|
+
dark: "#00b24a"
|
|
647
|
+
},
|
|
648
|
+
grey: {
|
|
649
|
+
"50": "#18181b",
|
|
650
|
+
"100": "#27272a",
|
|
651
|
+
"200": "#3f3f47",
|
|
652
|
+
"300": "#52525c",
|
|
653
|
+
"400": "#71717b",
|
|
654
|
+
"500": "#9f9fa9",
|
|
655
|
+
"600": "#d4d4d8",
|
|
656
|
+
"700": "#e4e4e7",
|
|
657
|
+
"800": "#f4f4f5",
|
|
658
|
+
"900": "#fafafa",
|
|
659
|
+
A100: "#f8f8fa",
|
|
660
|
+
A200: "#f8f8fa",
|
|
661
|
+
A400: "#f8f8fa",
|
|
662
|
+
A700: "#f8f8fa"
|
|
663
|
+
},
|
|
664
|
+
text: {
|
|
665
|
+
primary: "#ffffff",
|
|
666
|
+
secondary: "#A1a1aa",
|
|
667
|
+
disabled: "#52525c",
|
|
668
|
+
hint: "#71717b",
|
|
669
|
+
contrast: "#18181b"
|
|
670
|
+
},
|
|
671
|
+
divider: "#27272A",
|
|
672
|
+
background: {
|
|
673
|
+
default: "#121212",
|
|
674
|
+
paper: "#18181b"
|
|
675
|
+
},
|
|
676
|
+
action: {
|
|
677
|
+
active: "rgba(255, 255, 255, 0.54)",
|
|
678
|
+
hover: "rgba(255, 255, 255, 0.08)",
|
|
679
|
+
hoverOpacity: 0.08,
|
|
680
|
+
selected: "rgba(255, 255, 255, 0.16)",
|
|
681
|
+
selectedOpacity: 0.16,
|
|
682
|
+
disabled: "rgba(255, 255, 255, 0.26)",
|
|
683
|
+
disabledBackground: "rgba(255, 255, 255, 0.12)",
|
|
684
|
+
disabledOpacity: 0.38,
|
|
685
|
+
focus: "rgba(255, 255, 255, 0.12)",
|
|
686
|
+
focusOpacity: 0.12,
|
|
687
|
+
activatedOpacity: 0.24
|
|
688
|
+
}
|
|
689
|
+
},
|
|
584
690
|
typography: {
|
|
585
691
|
/** @deprecated */
|
|
586
692
|
color: {
|
|
@@ -592,13 +698,13 @@ var BLOCKLET_THEME_DARK = merge(BLOCKLET_THEME_LIGHT, {
|
|
|
592
698
|
components: {
|
|
593
699
|
MuiTableCell: {
|
|
594
700
|
styleOverrides: {
|
|
595
|
-
head: {
|
|
701
|
+
head: ({ theme }) => ({
|
|
596
702
|
textTransform: "uppercase",
|
|
597
|
-
color:
|
|
598
|
-
},
|
|
599
|
-
body: {
|
|
600
|
-
color:
|
|
601
|
-
}
|
|
703
|
+
color: theme.palette.grey[300]
|
|
704
|
+
}),
|
|
705
|
+
body: ({ theme }) => ({
|
|
706
|
+
color: theme.palette.grey[300]
|
|
707
|
+
})
|
|
602
708
|
}
|
|
603
709
|
},
|
|
604
710
|
MuiTableRow: {
|
|
@@ -612,64 +718,65 @@ var BLOCKLET_THEME_DARK = merge(BLOCKLET_THEME_LIGHT, {
|
|
|
612
718
|
},
|
|
613
719
|
MuiTooltip: {
|
|
614
720
|
styleOverrides: {
|
|
615
|
-
tooltip: {
|
|
616
|
-
backgroundColor:
|
|
617
|
-
color:
|
|
618
|
-
},
|
|
619
|
-
arrow: {
|
|
620
|
-
color:
|
|
621
|
-
}
|
|
721
|
+
tooltip: ({ theme }) => ({
|
|
722
|
+
backgroundColor: theme.palette.grey[500],
|
|
723
|
+
color: theme.palette.text.contrast
|
|
724
|
+
}),
|
|
725
|
+
arrow: ({ theme }) => ({
|
|
726
|
+
color: theme.palette.grey[500]
|
|
727
|
+
})
|
|
622
728
|
}
|
|
623
729
|
},
|
|
624
730
|
MuiPaper: {
|
|
625
731
|
styleOverrides: {
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
732
|
+
// 暗色模式下,Paper 使用内阴影营造边框效果
|
|
733
|
+
root: ({ theme }) => ({
|
|
734
|
+
boxShadow: `inset 0 0 0 1px ${theme.palette.action.hover}`
|
|
735
|
+
})
|
|
629
736
|
}
|
|
630
737
|
},
|
|
631
738
|
MuiAlert: {
|
|
632
739
|
styleOverrides: {
|
|
633
|
-
standardError: {
|
|
634
|
-
backgroundColor:
|
|
635
|
-
color:
|
|
740
|
+
standardError: ({ theme }) => ({
|
|
741
|
+
backgroundColor: alpha(theme.palette.error.main, 0.25),
|
|
742
|
+
color: theme.palette.warning.light,
|
|
636
743
|
"& .MuiAlert-icon": {
|
|
637
|
-
color:
|
|
744
|
+
color: theme.palette.warning.light
|
|
638
745
|
}
|
|
639
|
-
},
|
|
640
|
-
standardInfo: {
|
|
641
|
-
backgroundColor:
|
|
642
|
-
color:
|
|
746
|
+
}),
|
|
747
|
+
standardInfo: ({ theme }) => ({
|
|
748
|
+
backgroundColor: alpha(theme.palette.info.main, 0.25),
|
|
749
|
+
color: theme.palette.info.light,
|
|
643
750
|
"& .MuiAlert-icon": {
|
|
644
|
-
color:
|
|
751
|
+
color: theme.palette.info.light
|
|
645
752
|
}
|
|
646
|
-
},
|
|
647
|
-
standardWarning: {
|
|
648
|
-
backgroundColor:
|
|
649
|
-
color:
|
|
753
|
+
}),
|
|
754
|
+
standardWarning: ({ theme }) => ({
|
|
755
|
+
backgroundColor: alpha(theme.palette.warning.main, 0.25),
|
|
756
|
+
color: theme.palette.warning.light,
|
|
650
757
|
"& .MuiAlert-icon": {
|
|
651
|
-
color:
|
|
758
|
+
color: theme.palette.warning.light
|
|
652
759
|
}
|
|
653
|
-
},
|
|
654
|
-
standardSuccess: {
|
|
655
|
-
backgroundColor:
|
|
656
|
-
color:
|
|
760
|
+
}),
|
|
761
|
+
standardSuccess: ({ theme }) => ({
|
|
762
|
+
backgroundColor: alpha(theme.palette.success.main, 0.25),
|
|
763
|
+
color: theme.palette.success.light,
|
|
657
764
|
"& .MuiAlert-icon": {
|
|
658
|
-
color:
|
|
765
|
+
color: theme.palette.success.light
|
|
659
766
|
}
|
|
660
|
-
}
|
|
767
|
+
})
|
|
661
768
|
}
|
|
662
769
|
},
|
|
663
770
|
MuiSwitch: {
|
|
664
771
|
styleOverrides: {
|
|
665
|
-
switchBase: {
|
|
772
|
+
switchBase: ({ theme }) => ({
|
|
666
773
|
"&:not(.Mui-checked)": {
|
|
667
774
|
"& + .MuiSwitch-track": {
|
|
668
|
-
backgroundColor:
|
|
775
|
+
backgroundColor: theme.palette.grey["200"],
|
|
669
776
|
opacity: 1
|
|
670
777
|
},
|
|
671
778
|
"& > .MuiSwitch-thumb": {
|
|
672
|
-
backgroundColor:
|
|
779
|
+
backgroundColor: theme.palette.grey["700"]
|
|
673
780
|
}
|
|
674
781
|
},
|
|
675
782
|
"&.Mui-disabled": {
|
|
@@ -677,24 +784,24 @@ var BLOCKLET_THEME_DARK = merge(BLOCKLET_THEME_LIGHT, {
|
|
|
677
784
|
opacity: 0.3
|
|
678
785
|
},
|
|
679
786
|
"&:not(.Mui-checked) > .MuiSwitch-thumb": {
|
|
680
|
-
backgroundColor:
|
|
787
|
+
backgroundColor: theme.palette.grey["300"]
|
|
681
788
|
}
|
|
682
789
|
}
|
|
683
|
-
}
|
|
790
|
+
})
|
|
684
791
|
}
|
|
685
792
|
}
|
|
686
793
|
}
|
|
687
794
|
});
|
|
688
795
|
|
|
689
796
|
// src/did-connect.ts
|
|
690
|
-
var
|
|
797
|
+
var paletteLight = {
|
|
691
798
|
divider: "rgba(18, 22, 24, 0.06)",
|
|
692
799
|
action: {
|
|
693
800
|
hover: "#FAFAFA",
|
|
694
801
|
selected: "#F4F4F5"
|
|
695
802
|
}
|
|
696
803
|
};
|
|
697
|
-
var
|
|
804
|
+
var paletteDark = {
|
|
698
805
|
divider: "rgba(255, 255, 255, 0.06)",
|
|
699
806
|
action: {
|
|
700
807
|
hover: "rgba(255, 255, 255, 0.08)",
|
|
@@ -702,10 +809,10 @@ var paletteDark2 = {
|
|
|
702
809
|
}
|
|
703
810
|
};
|
|
704
811
|
var DID_CONNECT_THEME_LIGHT = merge(BLOCKLET_THEME_LIGHT, {
|
|
705
|
-
palette:
|
|
812
|
+
palette: paletteLight
|
|
706
813
|
});
|
|
707
814
|
var DID_CONNECT_THEME_DARK = merge(BLOCKLET_THEME_DARK, {
|
|
708
|
-
palette:
|
|
815
|
+
palette: paletteDark
|
|
709
816
|
});
|
|
710
817
|
// Annotate the CommonJS export names for ESM import in node:
|
|
711
818
|
0 && (module.exports = {
|