UNPKG

@brightlayer-ui/react-themes

Version:
283 lines (282 loc) 12.5 kB
"use strict"; var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || (function () { var ownKeys = function(o) { ownKeys = Object.getOwnPropertyNames || function (o) { var ar = []; for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; return ar; }; return ownKeys(o); }; return function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); __setModuleDefault(result, mod); return result; }; })(); var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); var BLUIColors = __importStar(require("@brightlayer-ui/colors")); var color_1 = __importDefault(require("color")); exports.default = { styleOverrides: { root: function (_a) { var theme = _a.theme; return (__assign({ textTransform: "none" }, theme.applyStyles('dark', { textTransform: "none", "&:hover": { backgroundColor: BLUIColors.black[400], }, }))); }, iconSizeMedium: function (_a) { var theme = _a.theme; return (__assign({ "& > *:nth-of-type(1)": { fontSize: "1.125rem", } }, theme.applyStyles('dark', { "& > *:nth-of-type(1)": { fontSize: "1.125rem", }, }))); }, contained: function (_a) { var theme = _a.theme; return (__assign({ backgroundColor: theme.vars.palette.background.paper, color: theme.vars.palette.text.primary, "& .MuiButton-disableElevation:not(.MuiButton-containedPrimary):not(.MuiButton-containedSecondary)": { backgroundColor: BLUIColors.white[500], "&:hover": { backgroundColor: BLUIColors.white[300], }, "&.Mui-disabled": { borderWidth: 0, }, }, "&:hover": { backgroundColor: (0, color_1.default)(BLUIColors.black[500]) .alpha(0.05) .string(), }, "&.Mui-disabled": { backgroundColor: theme.vars.palette.background.paper, border: "1px solid ".concat((0, color_1.default)(BLUIColors.black[500]) .alpha(0.12) .string()) } }, theme.applyStyles('dark', { backgroundColor: BLUIColors.black[500], color: BLUIColors.white[50], "&:hover": { backgroundColor: BLUIColors.black[400], }, "&.Mui-disabled": { backgroundColor: theme.vars.palette.action.disabledBackground, color: BLUIColors.black[400], }, }))); }, containedPrimary: function (_a) { var theme = _a.theme; return (__assign({ backgroundColor: theme.vars.palette.primary.main, color: BLUIColors.white[50], "&:hover": { backgroundColor: BLUIColors.blue[300], }, "&.Mui-disabled": { backgroundColor: theme.vars.palette.primary.light, borderWidth: 0, color: BLUIColors.blue[200], } }, theme.applyStyles('dark', { backgroundColor: theme.vars.palette.primary.dark, color: BLUIColors.white[50], "&:hover": { backgroundColor: BLUIColors.blue[300], }, "&.Mui-disabled": { borderWidth: 0, backgroundColor: theme.vars.palette.action.disabledBackground, color: BLUIColors.black[400], }, }))); }, containedSecondary: function (_a) { var theme = _a.theme; return (__assign({ backgroundColor: theme.vars.palette.secondary.main, color: BLUIColors.white[50], "&:hover": { backgroundColor: BLUIColors.lightBlue[300], }, "&.Mui-disabled": { backgroundColor: theme.vars.palette.primary.light, borderWidth: 0, color: BLUIColors.blue[200], } }, theme.applyStyles('dark', { backgroundColor: theme.vars.palette.secondary.dark, color: BLUIColors.white[50], "&:hover": { backgroundColor: BLUIColors.lightBlue[300], }, "&.Mui-disabled": { backgroundColor: theme.vars.palette.action.disabledBackground, color: BLUIColors.black[400], }, }))); }, outlined: function (_a) { var theme = _a.theme; return (__assign({ "&:hover": { backgroundColor: (0, color_1.default)(BLUIColors.black[500]) .alpha(0.05) .string(), }, "&.Mui-disabled": { backgroundColor: theme.vars.palette.background.paper, borderColor: (0, color_1.default)(BLUIColors.black[500]).alpha(0.12).string() } }, theme.applyStyles('dark', { "&:hover": { backgroundColor: (0, color_1.default)(BLUIColors.black[50]) .alpha(0.1) .string(), }, "&.Mui-disabled": { borderColor: (0, color_1.default)(BLUIColors.black[300]) .alpha(0.36) .string(), color: (0, color_1.default)(BLUIColors.black[300]) .alpha(0.36) .string(), backgroundColor: 'transparent' }, }))); }, outlinedInherit: function (_a) { var theme = _a.theme; return (__assign({ borderColor: theme.vars.palette.divider, "&:hover": { backgroundColor: (0, color_1.default)(BLUIColors.black[500]) .alpha(0.05) .string(), }, "&.Mui-disabled": { backgroundColor: theme.vars.palette.background.paper, borderColor: (0, color_1.default)(BLUIColors.black[500]).alpha(0.12).string() } }, theme.applyStyles('dark', { borderColor: BLUIColors.black[200], "&:hover": { backgroundColor: (0, color_1.default)(BLUIColors.black[50]) .alpha(0.1) .string(), }, "&.Mui-disabled": { borderColor: (0, color_1.default)(BLUIColors.black[300]) .alpha(0.36) .string(), color: (0, color_1.default)(BLUIColors.black[300]) .alpha(0.36) .string(), backgroundColor: 'transparent' }, }))); }, outlinedPrimary: function (_a) { var theme = _a.theme; return (__assign({ borderColor: theme.vars.palette.primary.main, "&.Mui-disabled": { borderColor: (0, color_1.default)(BLUIColors.black[500]).alpha(0.12).string(), }, "&:hover": { backgroundColor: "rgba(".concat(theme.vars.palette.primary.main, " / 0.05)"), } }, theme.applyStyles('dark', { borderColor: theme.vars.palette.primary.main, "&:hover": { backgroundColor: "rgba(".concat(theme.vars.palette.primary.dark, " / 0.2)"), }, "&.Mui-disabled": { borderColor: (0, color_1.default)(BLUIColors.black[300]) .alpha(0.36) .string(), color: (0, color_1.default)(BLUIColors.black[300]) .alpha(0.36) .string(), backgroundColor: 'transparent' }, }))); }, outlinedSecondary: function (_a) { var theme = _a.theme; return (__assign({ borderColor: theme.vars.palette.secondary.main, "&.Mui-disabled": { borderColor: (0, color_1.default)(BLUIColors.black[500]).alpha(0.12).string(), }, "&:hover": { backgroundColor: "rgba(".concat(theme.vars.palette.secondary.main, " / 0.05)"), } }, theme.applyStyles('dark', { "&:not(.Mui-disabled)": { borderColor: theme.vars.palette.secondary.main, "&:hover": { backgroundColor: "rgba(".concat(theme.vars.palette.secondary.dark, " / 0.2)"), }, }, "&.Mui-disabled": { borderColor: (0, color_1.default)(BLUIColors.black[300]) .alpha(0.36) .string(), color: (0, color_1.default)(BLUIColors.black[300]) .alpha(0.36) .string(), backgroundColor: 'transparent' }, }))); }, text: function (_a) { var theme = _a.theme; return (__assign({ "&.Mui-disabled": { color: theme.vars.palette.action.disabled, }, "&:hover": { backgroundColor: (0, color_1.default)(BLUIColors.black[500]) .alpha(0.05) .string(), } }, theme.applyStyles('dark', { "&.Mui-disabled": { color: theme.vars.palette.action.disabled, }, "&:hover": { backgroundColor: theme.vars.palette.action.hover, }, }))); }, textPrimary: function (_a) { var theme = _a.theme; return (__assign({ "&:hover": { backgroundColor: "rgba(".concat(theme.vars.palette.primary.main, " / 0.05)"), } }, theme.applyStyles('dark', { "&:hover": { backgroundColor: "rgba(".concat(theme.vars.palette.primary.dark, " / 0.2)"), }, }))); }, textSecondary: function (_a) { var theme = _a.theme; return (__assign({ "&:hover": { backgroundColor: "rgba(".concat(theme.vars.palette.secondary.main, " / 0.05)"), } }, theme.applyStyles('dark', { "&:hover": { backgroundColor: "rgba(".concat(theme.vars.palette.secondary.dark, " / 0.2)"), }, }))); }, }, };