@mantine/styles
Advanced tools
Comparing version 6.0.7 to 6.0.8
@@ -6,2 +6,3 @@ 'use strict'; | ||
var attachFunctions = require('../../functions/attach-functions.js'); | ||
var breakpoints = require('../../functions/fns/breakpoints/breakpoints.js'); | ||
@@ -44,2 +45,8 @@ var __defProp = Object.defineProperty; | ||
} | ||
if (key === "breakpoints" && themeOverride.breakpoints) { | ||
const mergedBreakpoints = __spreadValues(__spreadValues({}, currentTheme.breakpoints), themeOverride.breakpoints); | ||
return __spreadProps(__spreadValues({}, acc), { | ||
breakpoints: Object.fromEntries(Object.entries(mergedBreakpoints).sort((a, b) => breakpoints.getBreakpointValue(a[1]) - breakpoints.getBreakpointValue(b[1]))) | ||
}); | ||
} | ||
acc[key] = typeof themeOverride[key] === "object" ? __spreadValues(__spreadValues({}, currentTheme[key]), themeOverride[key]) : typeof themeOverride[key] === "number" || typeof themeOverride[key] === "boolean" || typeof themeOverride[key] === "function" ? themeOverride[key] : themeOverride[key] || currentTheme[key]; | ||
@@ -46,0 +53,0 @@ return acc; |
import { attachFunctions } from '../../functions/attach-functions.js'; | ||
import { getBreakpointValue } from '../../functions/fns/breakpoints/breakpoints.js'; | ||
@@ -39,2 +40,8 @@ var __defProp = Object.defineProperty; | ||
} | ||
if (key === "breakpoints" && themeOverride.breakpoints) { | ||
const mergedBreakpoints = __spreadValues(__spreadValues({}, currentTheme.breakpoints), themeOverride.breakpoints); | ||
return __spreadProps(__spreadValues({}, acc), { | ||
breakpoints: Object.fromEntries(Object.entries(mergedBreakpoints).sort((a, b) => getBreakpointValue(a[1]) - getBreakpointValue(b[1]))) | ||
}); | ||
} | ||
acc[key] = typeof themeOverride[key] === "object" ? __spreadValues(__spreadValues({}, currentTheme[key]), themeOverride[key]) : typeof themeOverride[key] === "number" || typeof themeOverride[key] === "boolean" || typeof themeOverride[key] === "function" ? themeOverride[key] : themeOverride[key] || currentTheme[key]; | ||
@@ -41,0 +48,0 @@ return acc; |
{ | ||
"name": "@mantine/styles", | ||
"description": "Mantine css-in-js styles engine, based on emotion", | ||
"version": "6.0.7", | ||
"version": "6.0.8", | ||
"main": "cjs/index.js", | ||
@@ -6,0 +6,0 @@ "module": "esm/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
369431
3523