@dashadmin/dash-boilerplate 1.3.50 → 1.3.51
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/index.cjs +56 -18
- package/dist/index.js +56 -18
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -602,23 +602,14 @@ var createMinimalTheme = (mode, extendedOptions) => {
|
|
|
602
602
|
const colors = getThemeColors(mode);
|
|
603
603
|
const fontSizeBase = getCssVariableNumber("--font-size-base", 14);
|
|
604
604
|
const borderRadiusBase = getCssVariableNumber("--border-radius-base", 6);
|
|
605
|
-
const
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
keys: ["xs", "sm", "md", "lg", "xl"],
|
|
609
|
-
values: { xs: 0, sm: 600, md: 900, lg: 1200, xl: 1536 }
|
|
610
|
-
},
|
|
605
|
+
const primaryMain = colors.btnBg || colors.primaryColor;
|
|
606
|
+
const primaryContrastText = colors.btnColor || colors.primaryContrast;
|
|
607
|
+
const custom = {
|
|
611
608
|
palette: {
|
|
612
609
|
mode,
|
|
613
610
|
primary: {
|
|
614
|
-
main:
|
|
615
|
-
|
|
616
|
-
// getContrastText(main) (picks black/white text by contrast ratio) when
|
|
617
|
-
// omitted. Trusting --primary-contrast here caused illegible button text
|
|
618
|
-
// whenever an app picked a --primary-contrast too close in tone to
|
|
619
|
-
// --primary-color (e.g. vanexa-system's near-identical blues, 2026-08-03) —
|
|
620
|
-
// --primary-contrast is also used standalone as a gradient stop elsewhere,
|
|
621
|
-
// so it was never guaranteed to double as a legible foreground color.
|
|
611
|
+
main: primaryMain,
|
|
612
|
+
contrastText: primaryContrastText
|
|
622
613
|
},
|
|
623
614
|
secondary: {
|
|
624
615
|
main: colors.secondaryColor
|
|
@@ -640,7 +631,7 @@ var createMinimalTheme = (mode, extendedOptions) => {
|
|
|
640
631
|
shape: {
|
|
641
632
|
borderRadius: borderRadiusBase
|
|
642
633
|
},
|
|
643
|
-
components: {
|
|
634
|
+
components: __spreadValues({
|
|
644
635
|
MuiButton: {
|
|
645
636
|
styleOverrides: {
|
|
646
637
|
root: {
|
|
@@ -660,12 +651,59 @@ var createMinimalTheme = (mode, extendedOptions) => {
|
|
|
660
651
|
MuiPaper: {
|
|
661
652
|
styleOverrides: {
|
|
662
653
|
root: {
|
|
663
|
-
|
|
654
|
+
color: "var(--text-color)",
|
|
655
|
+
backgroundColor: "var(--component-bg)",
|
|
656
|
+
"&.Mui-focused": {
|
|
657
|
+
color: "var(--primary-color)",
|
|
658
|
+
backgroundColor: "var(--component-bg)"
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
},
|
|
663
|
+
MuiOutlinedInput: {
|
|
664
|
+
styleOverrides: {
|
|
665
|
+
root: {
|
|
666
|
+
color: "var(--text-color)",
|
|
667
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
668
|
+
borderColor: "var(--border-color)"
|
|
669
|
+
},
|
|
670
|
+
"&:hover .MuiOutlinedInput-notchedOutline": {
|
|
671
|
+
borderColor: "var(--primary-color)"
|
|
672
|
+
},
|
|
673
|
+
"&.Mui-focused .MuiOutlinedInput-notchedOutline": {
|
|
674
|
+
borderColor: "var(--primary-color)"
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
},
|
|
679
|
+
MuiInputLabel: {
|
|
680
|
+
styleOverrides: {
|
|
681
|
+
root: {
|
|
682
|
+
color: "var(--text-color)",
|
|
683
|
+
"&.Mui-focused": {
|
|
684
|
+
color: "var(--primary-color)"
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
},
|
|
689
|
+
MuiSelect: {
|
|
690
|
+
styleOverrides: {
|
|
691
|
+
select: {
|
|
692
|
+
color: "var(--text-color)"
|
|
693
|
+
},
|
|
694
|
+
icon: {
|
|
695
|
+
color: "var(--text-color)"
|
|
664
696
|
}
|
|
665
697
|
}
|
|
666
698
|
}
|
|
667
|
-
}
|
|
668
|
-
}
|
|
699
|
+
}, (extendedOptions == null ? void 0 : extendedOptions.components) || {})
|
|
700
|
+
};
|
|
701
|
+
console.log("custom theme options:", custom);
|
|
702
|
+
const createdTheme = (0, import_material.createTheme)(__spreadValues(__spreadValues({}, custom), extendedOptions ? ((_a) => {
|
|
703
|
+
var _b = _a, { components } = _b, rest = __objRest(_b, ["components"]);
|
|
704
|
+
return rest;
|
|
705
|
+
})(extendedOptions) : {}));
|
|
706
|
+
return createdTheme;
|
|
669
707
|
};
|
|
670
708
|
var DashThemeContext = (0, import_react4.createContext)(null);
|
|
671
709
|
var useDashThemeContextLight = () => {
|
package/dist/index.js
CHANGED
|
@@ -531,23 +531,14 @@ var createMinimalTheme = (mode, extendedOptions) => {
|
|
|
531
531
|
const colors = getThemeColors(mode);
|
|
532
532
|
const fontSizeBase = getCssVariableNumber("--font-size-base", 14);
|
|
533
533
|
const borderRadiusBase = getCssVariableNumber("--border-radius-base", 6);
|
|
534
|
-
const
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
keys: ["xs", "sm", "md", "lg", "xl"],
|
|
538
|
-
values: { xs: 0, sm: 600, md: 900, lg: 1200, xl: 1536 }
|
|
539
|
-
},
|
|
534
|
+
const primaryMain = colors.btnBg || colors.primaryColor;
|
|
535
|
+
const primaryContrastText = colors.btnColor || colors.primaryContrast;
|
|
536
|
+
const custom = {
|
|
540
537
|
palette: {
|
|
541
538
|
mode,
|
|
542
539
|
primary: {
|
|
543
|
-
main:
|
|
544
|
-
|
|
545
|
-
// getContrastText(main) (picks black/white text by contrast ratio) when
|
|
546
|
-
// omitted. Trusting --primary-contrast here caused illegible button text
|
|
547
|
-
// whenever an app picked a --primary-contrast too close in tone to
|
|
548
|
-
// --primary-color (e.g. vanexa-system's near-identical blues, 2026-08-03) —
|
|
549
|
-
// --primary-contrast is also used standalone as a gradient stop elsewhere,
|
|
550
|
-
// so it was never guaranteed to double as a legible foreground color.
|
|
540
|
+
main: primaryMain,
|
|
541
|
+
contrastText: primaryContrastText
|
|
551
542
|
},
|
|
552
543
|
secondary: {
|
|
553
544
|
main: colors.secondaryColor
|
|
@@ -569,7 +560,7 @@ var createMinimalTheme = (mode, extendedOptions) => {
|
|
|
569
560
|
shape: {
|
|
570
561
|
borderRadius: borderRadiusBase
|
|
571
562
|
},
|
|
572
|
-
components: {
|
|
563
|
+
components: __spreadValues({
|
|
573
564
|
MuiButton: {
|
|
574
565
|
styleOverrides: {
|
|
575
566
|
root: {
|
|
@@ -589,12 +580,59 @@ var createMinimalTheme = (mode, extendedOptions) => {
|
|
|
589
580
|
MuiPaper: {
|
|
590
581
|
styleOverrides: {
|
|
591
582
|
root: {
|
|
592
|
-
|
|
583
|
+
color: "var(--text-color)",
|
|
584
|
+
backgroundColor: "var(--component-bg)",
|
|
585
|
+
"&.Mui-focused": {
|
|
586
|
+
color: "var(--primary-color)",
|
|
587
|
+
backgroundColor: "var(--component-bg)"
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
},
|
|
592
|
+
MuiOutlinedInput: {
|
|
593
|
+
styleOverrides: {
|
|
594
|
+
root: {
|
|
595
|
+
color: "var(--text-color)",
|
|
596
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
597
|
+
borderColor: "var(--border-color)"
|
|
598
|
+
},
|
|
599
|
+
"&:hover .MuiOutlinedInput-notchedOutline": {
|
|
600
|
+
borderColor: "var(--primary-color)"
|
|
601
|
+
},
|
|
602
|
+
"&.Mui-focused .MuiOutlinedInput-notchedOutline": {
|
|
603
|
+
borderColor: "var(--primary-color)"
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
},
|
|
608
|
+
MuiInputLabel: {
|
|
609
|
+
styleOverrides: {
|
|
610
|
+
root: {
|
|
611
|
+
color: "var(--text-color)",
|
|
612
|
+
"&.Mui-focused": {
|
|
613
|
+
color: "var(--primary-color)"
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
},
|
|
618
|
+
MuiSelect: {
|
|
619
|
+
styleOverrides: {
|
|
620
|
+
select: {
|
|
621
|
+
color: "var(--text-color)"
|
|
622
|
+
},
|
|
623
|
+
icon: {
|
|
624
|
+
color: "var(--text-color)"
|
|
593
625
|
}
|
|
594
626
|
}
|
|
595
627
|
}
|
|
596
|
-
}
|
|
597
|
-
}
|
|
628
|
+
}, (extendedOptions == null ? void 0 : extendedOptions.components) || {})
|
|
629
|
+
};
|
|
630
|
+
console.log("custom theme options:", custom);
|
|
631
|
+
const createdTheme = createTheme(__spreadValues(__spreadValues({}, custom), extendedOptions ? ((_a) => {
|
|
632
|
+
var _b = _a, { components } = _b, rest = __objRest(_b, ["components"]);
|
|
633
|
+
return rest;
|
|
634
|
+
})(extendedOptions) : {}));
|
|
635
|
+
return createdTheme;
|
|
598
636
|
};
|
|
599
637
|
var DashThemeContext = createContext2(null);
|
|
600
638
|
var useDashThemeContextLight = () => {
|