@blocklet/theme 2.13.32 → 2.13.34

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 CHANGED
@@ -214,7 +214,8 @@ var paletteLight = {
214
214
  primary: "#18181b",
215
215
  secondary: "#71717b",
216
216
  disabled: "#d4d4d8",
217
- hint: "#d4d4d8"
217
+ hint: "#d4d4d8",
218
+ contrast: "#fff"
218
219
  },
219
220
  divider: "#ececef",
220
221
  background: {
@@ -434,8 +435,11 @@ var BLOCKLET_THEME_LIGHT = {
434
435
  MuiTooltip: {
435
436
  styleOverrides: {
436
437
  tooltip: {
437
- backgroundColor: paletteLight.grey[700],
438
- color: paletteLight.common.white
438
+ backgroundColor: paletteLight.grey[500],
439
+ color: paletteLight.text.contrast
440
+ },
441
+ arrow: {
442
+ color: paletteLight.grey[500]
439
443
  }
440
444
  }
441
445
  },
@@ -456,37 +460,37 @@ var paletteDark = {
456
460
  },
457
461
  primary: {
458
462
  main: "#00d5be",
459
- contrastText: "#121212",
463
+ contrastText: "#f4f4f5",
460
464
  light: "#4ce3d0",
461
465
  dark: "#00a89a"
462
466
  },
463
467
  secondary: {
464
468
  main: "#00d3f3",
465
- contrastText: "#121212",
469
+ contrastText: "#f4f4f5",
466
470
  light: "#51e1ff",
467
471
  dark: "#00a2c0"
468
472
  },
469
473
  error: {
470
474
  main: "#ff6467",
471
- contrastText: "#121212",
475
+ contrastText: "#f4f4f5",
472
476
  light: "#ff9598",
473
477
  dark: "#e7000b"
474
478
  },
475
479
  warning: {
476
480
  main: "#ff8904",
477
- contrastText: "#121212",
481
+ contrastText: "#f4f4f5",
478
482
  light: "#ffa644",
479
483
  dark: "#f54900"
480
484
  },
481
485
  info: {
482
486
  main: "#51a2ff",
483
- contrastText: "#121212",
487
+ contrastText: "#f4f4f5",
484
488
  light: "#83c3ff",
485
489
  dark: "#1570e5"
486
490
  },
487
491
  success: {
488
492
  main: "#05df72",
489
- contrastText: "#121212",
493
+ contrastText: "#f4f4f5",
490
494
  light: "#56e799",
491
495
  dark: "#00b24a"
492
496
  },
@@ -510,7 +514,8 @@ var paletteDark = {
510
514
  primary: "#ffffff",
511
515
  secondary: "#d4d4d8",
512
516
  disabled: "#52525c",
513
- hint: "#71717b"
517
+ hint: "#71717b",
518
+ contrast: "#18181b"
514
519
  },
515
520
  divider: "#2a2a32",
516
521
  background: {
@@ -565,7 +570,11 @@ var BLOCKLET_THEME_DARK = merge(BLOCKLET_THEME_LIGHT, {
565
570
  MuiTooltip: {
566
571
  styleOverrides: {
567
572
  tooltip: {
568
- backgroundColor: paletteDark.grey[200]
573
+ backgroundColor: paletteDark.grey[500],
574
+ color: paletteDark.text.contrast
575
+ },
576
+ arrow: {
577
+ color: paletteDark.grey[500]
569
578
  }
570
579
  }
571
580
  },
@@ -615,6 +624,29 @@ var BLOCKLET_THEME_DARK = merge(BLOCKLET_THEME_LIGHT, {
615
624
  }
616
625
  }
617
626
  }
627
+ },
628
+ MuiSwitch: {
629
+ styleOverrides: {
630
+ switchBase: {
631
+ "&:not(.Mui-checked)": {
632
+ "& + .MuiSwitch-track": {
633
+ backgroundColor: paletteDark.grey["200"],
634
+ opacity: 1
635
+ },
636
+ "& > .MuiSwitch-thumb": {
637
+ backgroundColor: paletteDark.grey["700"]
638
+ }
639
+ },
640
+ "&.Mui-disabled": {
641
+ "& + .MuiSwitch-track": {
642
+ opacity: 0.3
643
+ },
644
+ "&:not(.Mui-checked) > .MuiSwitch-thumb": {
645
+ backgroundColor: paletteDark.grey["300"]
646
+ }
647
+ }
648
+ }
649
+ }
618
650
  }
619
651
  }
620
652
  });
package/dist/es/index.js CHANGED
@@ -197,7 +197,8 @@ var paletteLight = {
197
197
  primary: "#18181b",
198
198
  secondary: "#71717b",
199
199
  disabled: "#d4d4d8",
200
- hint: "#d4d4d8"
200
+ hint: "#d4d4d8",
201
+ contrast: "#fff"
201
202
  },
202
203
  divider: "#ececef",
203
204
  background: {
@@ -417,8 +418,11 @@ var BLOCKLET_THEME_LIGHT = {
417
418
  MuiTooltip: {
418
419
  styleOverrides: {
419
420
  tooltip: {
420
- backgroundColor: paletteLight.grey[700],
421
- color: paletteLight.common.white
421
+ backgroundColor: paletteLight.grey[500],
422
+ color: paletteLight.text.contrast
423
+ },
424
+ arrow: {
425
+ color: paletteLight.grey[500]
422
426
  }
423
427
  }
424
428
  },
@@ -439,37 +443,37 @@ var paletteDark = {
439
443
  },
440
444
  primary: {
441
445
  main: "#00d5be",
442
- contrastText: "#121212",
446
+ contrastText: "#f4f4f5",
443
447
  light: "#4ce3d0",
444
448
  dark: "#00a89a"
445
449
  },
446
450
  secondary: {
447
451
  main: "#00d3f3",
448
- contrastText: "#121212",
452
+ contrastText: "#f4f4f5",
449
453
  light: "#51e1ff",
450
454
  dark: "#00a2c0"
451
455
  },
452
456
  error: {
453
457
  main: "#ff6467",
454
- contrastText: "#121212",
458
+ contrastText: "#f4f4f5",
455
459
  light: "#ff9598",
456
460
  dark: "#e7000b"
457
461
  },
458
462
  warning: {
459
463
  main: "#ff8904",
460
- contrastText: "#121212",
464
+ contrastText: "#f4f4f5",
461
465
  light: "#ffa644",
462
466
  dark: "#f54900"
463
467
  },
464
468
  info: {
465
469
  main: "#51a2ff",
466
- contrastText: "#121212",
470
+ contrastText: "#f4f4f5",
467
471
  light: "#83c3ff",
468
472
  dark: "#1570e5"
469
473
  },
470
474
  success: {
471
475
  main: "#05df72",
472
- contrastText: "#121212",
476
+ contrastText: "#f4f4f5",
473
477
  light: "#56e799",
474
478
  dark: "#00b24a"
475
479
  },
@@ -493,7 +497,8 @@ var paletteDark = {
493
497
  primary: "#ffffff",
494
498
  secondary: "#d4d4d8",
495
499
  disabled: "#52525c",
496
- hint: "#71717b"
500
+ hint: "#71717b",
501
+ contrast: "#18181b"
497
502
  },
498
503
  divider: "#2a2a32",
499
504
  background: {
@@ -548,7 +553,11 @@ var BLOCKLET_THEME_DARK = merge(BLOCKLET_THEME_LIGHT, {
548
553
  MuiTooltip: {
549
554
  styleOverrides: {
550
555
  tooltip: {
551
- backgroundColor: paletteDark.grey[200]
556
+ backgroundColor: paletteDark.grey[500],
557
+ color: paletteDark.text.contrast
558
+ },
559
+ arrow: {
560
+ color: paletteDark.grey[500]
552
561
  }
553
562
  }
554
563
  },
@@ -598,6 +607,29 @@ var BLOCKLET_THEME_DARK = merge(BLOCKLET_THEME_LIGHT, {
598
607
  }
599
608
  }
600
609
  }
610
+ },
611
+ MuiSwitch: {
612
+ styleOverrides: {
613
+ switchBase: {
614
+ "&:not(.Mui-checked)": {
615
+ "& + .MuiSwitch-track": {
616
+ backgroundColor: paletteDark.grey["200"],
617
+ opacity: 1
618
+ },
619
+ "& > .MuiSwitch-thumb": {
620
+ backgroundColor: paletteDark.grey["700"]
621
+ }
622
+ },
623
+ "&.Mui-disabled": {
624
+ "& + .MuiSwitch-track": {
625
+ opacity: 0.3
626
+ },
627
+ "&:not(.Mui-checked) > .MuiSwitch-thumb": {
628
+ backgroundColor: paletteDark.grey["300"]
629
+ }
630
+ }
631
+ }
632
+ }
601
633
  }
602
634
  }
603
635
  });
@@ -1,5 +1,5 @@
1
1
  import { PaletteMode } from '@mui/material';
2
- import { Components, PaletteColorOptions, Shadows, Theme, ThemeOptions } from '@mui/material/styles';
2
+ import { Components, PaletteColorOptions, Shadows, SimplePaletteColorOptions, Theme, ThemeOptions } from '@mui/material/styles';
3
3
  import { Typography } from '@mui/material/styles/createTypography';
4
4
 
5
5
  declare module "@mui/material/styles" {
@@ -24,7 +24,7 @@ declare module "@mui/material/styles" {
24
24
  }
25
25
  // @extend theme.palette
26
26
  interface Palette {
27
- storeSecondary: Palette["primary"];
27
+ storeSecondary: SimplePaletteColorOptions;
28
28
  did: {
29
29
  primary: string;
30
30
  secondary: string;
@@ -40,6 +40,7 @@ declare module "@mui/material/styles" {
40
40
  // @extend theme.palette.text
41
41
  interface TypeText {
42
42
  hint: string;
43
+ contrast: string;
43
44
  }
44
45
  }
45
46
  declare module "@mui/material/styles/createTypography" {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "2.13.32",
6
+ "version": "2.13.34",
7
7
  "description": "A preset MUI-based theme configuration designed for use with Blocklet.",
8
8
  "main": "dist/cjs/index.js",
9
9
  "module": "dist/es/index.js",
@@ -27,7 +27,10 @@
27
27
  "build:types": "dts-bundle-generator -o dist/types/index.d.ts src/index.ts --no-banner --inline-declare-externals",
28
28
  "build:cjs": "esbuild src/index.ts --bundle --outfile=dist/cjs/index.js --platform=node --format=cjs",
29
29
  "build:esm": "esbuild src/index.ts --bundle --outfile=dist/es/index.js --platform=node --format=esm",
30
- "build": "npm run clean && npm run build:cjs && npm run build:esm && npm run build:types"
30
+ "build": "npm run clean && npm run build:cjs && npm run build:esm && npm run build:types",
31
+ "watch:cjs": "npm run build:cjs -- --watch",
32
+ "watch:esm": "npm run build:esm -- --watch",
33
+ "watch": "npm run watch:cjs & npm run watch:esm"
31
34
  },
32
35
  "author": "wangshijun<wangshijun2010@gmail.com>",
33
36
  "license": "Apache-2.0",
@@ -51,5 +54,5 @@
51
54
  "ts-jest": "^29.1.2",
52
55
  "typescript": "~5.5.4"
53
56
  },
54
- "gitHead": "87fa6cebba886885a5c2ac78c786c71599fb5f7a"
57
+ "gitHead": "2dd874ee643777fe089a0d02183543497d0c8f39"
55
58
  }