@mantine/emotion 8.3.8 → 8.3.9
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/cjs/index.cjs +2 -0
- package/cjs/index.cjs.map +1 -1
- package/cjs/merge-sx.cjs +17 -0
- package/cjs/merge-sx.cjs.map +1 -0
- package/esm/index.mjs +1 -0
- package/esm/index.mjs.map +1 -1
- package/esm/merge-sx.mjs +15 -0
- package/esm/merge-sx.mjs.map +1 -0
- package/lib/index.d.mts +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/merge-sx.d.ts +4 -0
- package/package.json +3 -3
package/cjs/index.cjs
CHANGED
|
@@ -4,6 +4,7 @@ var react = require('@emotion/react');
|
|
|
4
4
|
var createStyles = require('./create-styles.cjs');
|
|
5
5
|
var emotionTransform = require('./emotion-transform.cjs');
|
|
6
6
|
var Global = require('./Global.cjs');
|
|
7
|
+
var mergeSx = require('./merge-sx.cjs');
|
|
7
8
|
var MantineEmotionProvider = require('./MantineEmotionProvider.cjs');
|
|
8
9
|
var useCss = require('./use-css.cjs');
|
|
9
10
|
var ssr = require('./ssr.cjs');
|
|
@@ -19,6 +20,7 @@ exports.getHelpers = createStyles.getHelpers;
|
|
|
19
20
|
exports.getStylesRef = createStyles.getStylesRef;
|
|
20
21
|
exports.emotionTransform = emotionTransform.emotionTransform;
|
|
21
22
|
exports.Global = Global.Global;
|
|
23
|
+
exports.mergeSx = mergeSx.mergeSx;
|
|
22
24
|
exports.EmotionCacheContext = MantineEmotionProvider.EmotionCacheContext;
|
|
23
25
|
exports.MantineEmotionProvider = MantineEmotionProvider.MantineEmotionProvider;
|
|
24
26
|
exports.useEmotionCache = MantineEmotionProvider.useEmotionCache;
|
package/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/cjs/merge-sx.cjs
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
function mergeSx(...sxs) {
|
|
5
|
+
return (theme, params) => {
|
|
6
|
+
return sxs.filter(Boolean).reduce((merged, sx) => {
|
|
7
|
+
const cssObj = typeof sx === "function" ? sx(theme, params) : sx;
|
|
8
|
+
return {
|
|
9
|
+
...merged,
|
|
10
|
+
...cssObj || {}
|
|
11
|
+
};
|
|
12
|
+
}, {});
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
exports.mergeSx = mergeSx;
|
|
17
|
+
//# sourceMappingURL=merge-sx.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge-sx.cjs","sources":["../src/merge-sx.ts"],"sourcesContent":["import type { MantineTheme } from '@mantine/core';\nimport { EmotionHelpers } from './create-styles';\nimport { CSSObject, EmotionSx } from './types';\n\nexport function mergeSx(...sxs: (EmotionSx | undefined)[]) {\n return (theme: MantineTheme, params: EmotionHelpers) => {\n return sxs.filter(Boolean).reduce<CSSObject>((merged, sx) => {\n const cssObj = typeof sx === 'function' ? sx(theme, params) : sx;\n return {\n ...merged,\n ...(cssObj || {}),\n };\n }, {});\n };\n}\n"],"names":[],"mappings":";;;AAIO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,KAAW,CAAA,CAAA,CAAA,CAAA,CAAgC,CAAA;AACzD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,CAAC,CAAA,CAAA,CAAA,CAAA,GAAqB,MAAA,CAAA,CAAA,CAAA,CAAA,CAA2B,CAAA;AACtD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,CAAA,CAAA,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,EAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkB,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,GAAQ,EAAA,CAAA,CAAA,CAAA,CAAA,CAAO,CAAA;AAC3D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,IAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,EAAA,CAAA,CAAA,CAAA,CAAA,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,IAAa,CAAA,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,GAAI,CAAA,CAAA,CAAA;AAC9D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,CAAA;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACL,GAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACH,CAAA,CAAA,CAAI,UAAU,CAAA,CAAA;AAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACjB,CAAA;AAAA,CAAA,CAAA,CAAA,CACF,CAAA,CAAA,CAAG,CAAA,CAAE,CAAA,CAAA;AAAA,CAAA,CACP,CAAA,CAAA;AACF,CAAA;;"}
|
package/esm/index.mjs
CHANGED
|
@@ -2,6 +2,7 @@ export { keyframes } from '@emotion/react';
|
|
|
2
2
|
export { createStyles, getHelpers, getStylesRef } from './create-styles.mjs';
|
|
3
3
|
export { emotionTransform } from './emotion-transform.mjs';
|
|
4
4
|
export { Global } from './Global.mjs';
|
|
5
|
+
export { mergeSx } from './merge-sx.mjs';
|
|
5
6
|
export { EmotionCacheContext, MantineEmotionProvider, useEmotionCache } from './MantineEmotionProvider.mjs';
|
|
6
7
|
export { cssFactory, useCss } from './use-css.mjs';
|
|
7
8
|
export { ServerStyles, createGetInitialProps, getSSRStyles } from './ssr.mjs';
|
package/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
package/esm/merge-sx.mjs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
function mergeSx(...sxs) {
|
|
3
|
+
return (theme, params) => {
|
|
4
|
+
return sxs.filter(Boolean).reduce((merged, sx) => {
|
|
5
|
+
const cssObj = typeof sx === "function" ? sx(theme, params) : sx;
|
|
6
|
+
return {
|
|
7
|
+
...merged,
|
|
8
|
+
...cssObj || {}
|
|
9
|
+
};
|
|
10
|
+
}, {});
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { mergeSx };
|
|
15
|
+
//# sourceMappingURL=merge-sx.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge-sx.mjs","sources":["../src/merge-sx.ts"],"sourcesContent":["import type { MantineTheme } from '@mantine/core';\nimport { EmotionHelpers } from './create-styles';\nimport { CSSObject, EmotionSx } from './types';\n\nexport function mergeSx(...sxs: (EmotionSx | undefined)[]) {\n return (theme: MantineTheme, params: EmotionHelpers) => {\n return sxs.filter(Boolean).reduce<CSSObject>((merged, sx) => {\n const cssObj = typeof sx === 'function' ? sx(theme, params) : sx;\n return {\n ...merged,\n ...(cssObj || {}),\n };\n }, {});\n };\n}\n"],"names":[],"mappings":";AAIO,CAAA,CAAA,CAAA,CAAA,C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CAAA,CAAA,CAAA,CAAA,CAAA,CACjB,CAAA;AAAA,CAAA,CAAA,CAAA,CACF,CAAA,CAAA,CAAG,CAAA,CAAE,CAAA,CAAA;AAAA,CAAA,CACP,CAAA,CAAA;AACF,CAAA;;"}
|
package/lib/index.d.mts
CHANGED
|
@@ -2,6 +2,7 @@ export { keyframes } from '@emotion/react';
|
|
|
2
2
|
export * from './create-styles';
|
|
3
3
|
export * from './emotion-transform';
|
|
4
4
|
export * from './Global';
|
|
5
|
+
export * from './merge-sx';
|
|
5
6
|
export * from './MantineEmotionProvider';
|
|
6
7
|
export * from './use-css';
|
|
7
8
|
export * from './types';
|
package/lib/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { keyframes } from '@emotion/react';
|
|
|
2
2
|
export * from './create-styles';
|
|
3
3
|
export * from './emotion-transform';
|
|
4
4
|
export * from './Global';
|
|
5
|
+
export * from './merge-sx';
|
|
5
6
|
export * from './MantineEmotionProvider';
|
|
6
7
|
export * from './use-css';
|
|
7
8
|
export * from './types';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { MantineTheme } from '@mantine/core';
|
|
2
|
+
import { EmotionHelpers } from './create-styles';
|
|
3
|
+
import { CSSObject, EmotionSx } from './types';
|
|
4
|
+
export declare function mergeSx(...sxs: (EmotionSx | undefined)[]): (theme: MantineTheme, params: EmotionHelpers) => CSSObject;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mantine/emotion",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.9",
|
|
4
4
|
"description": "Emotion bindings for Mantine",
|
|
5
5
|
"homepage": "https://mantine.dev/",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"@emotion/react": "^11.11.4",
|
|
36
36
|
"@emotion/serialize": "^1.1.4",
|
|
37
37
|
"@emotion/utils": "^1.2.1",
|
|
38
|
-
"@mantine/core": "8.3.
|
|
39
|
-
"@mantine/hooks": "8.3.
|
|
38
|
+
"@mantine/core": "8.3.9",
|
|
39
|
+
"@mantine/hooks": "8.3.9",
|
|
40
40
|
"react": "^18.x || ^19.x",
|
|
41
41
|
"react-dom": "^18.x || ^19.x"
|
|
42
42
|
},
|