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