@elliemae/ds-system 3.5.0-rc.9 → 3.5.1-rc.2
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.
|
@@ -28,15 +28,16 @@ __export(themeProviderHOC_exports, {
|
|
|
28
28
|
});
|
|
29
29
|
module.exports = __toCommonJS(themeProviderHOC_exports);
|
|
30
30
|
var React = __toESM(require("react"));
|
|
31
|
-
var
|
|
31
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
32
|
var import_styled_components = require("@xstyled/styled-components");
|
|
33
33
|
var import_theme = require("./theme");
|
|
34
34
|
const themeProviderHOC = (Component) => {
|
|
35
|
-
const WrappedComponent = (props) => /* @__PURE__ */
|
|
36
|
-
theme: import_theme.theme
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
const WrappedComponent = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled_components.ThemeProvider, {
|
|
36
|
+
theme: import_theme.theme,
|
|
37
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, {
|
|
38
|
+
...props
|
|
39
|
+
})
|
|
40
|
+
});
|
|
40
41
|
return WrappedComponent;
|
|
41
42
|
};
|
|
42
43
|
//# sourceMappingURL=themeProviderHOC.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/themeProviderHOC.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport { ThemeProvider } from '@xstyled/styled-components';\nimport { theme } from './theme';\n\nexport const themeProviderHOC = (Component: React.ElementType) => {\n const WrappedComponent = (props: Record<string, unknown>): JSX.Element => (\n <ThemeProvider theme={theme}>\n <Component {...props} />\n </ThemeProvider>\n );\n return WrappedComponent;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,+BAA8B;AAC9B,mBAAsB;AAEf,MAAM,mBAAmB,CAAC,cAAiC;AAChE,QAAM,mBAAmB,CAAC,UACxB,4CAAC;AAAA,IAAc,OAAO;AAAA,IACpB,sDAAC;AAAA,MAAW,GAAG;AAAA,KAAO;AAAA,GACxB;AAEF,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { ThemeProvider } from "@xstyled/styled-components";
|
|
4
4
|
import { theme } from "./theme";
|
|
5
5
|
const themeProviderHOC = (Component) => {
|
|
6
|
-
const WrappedComponent = (props) => /* @__PURE__ */
|
|
7
|
-
theme
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
const WrappedComponent = (props) => /* @__PURE__ */ jsx(ThemeProvider, {
|
|
7
|
+
theme,
|
|
8
|
+
children: /* @__PURE__ */ jsx(Component, {
|
|
9
|
+
...props
|
|
10
|
+
})
|
|
11
|
+
});
|
|
11
12
|
return WrappedComponent;
|
|
12
13
|
};
|
|
13
14
|
export {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/themeProviderHOC.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { ThemeProvider } from '@xstyled/styled-components';\nimport { theme } from './theme';\n\nexport const themeProviderHOC = (Component: React.ElementType) => {\n const WrappedComponent = (props: Record<string, unknown>): JSX.Element => (\n <ThemeProvider theme={theme}>\n <Component {...props} />\n </ThemeProvider>\n );\n return WrappedComponent;\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAS,qBAAqB;AAC9B,SAAS,aAAa;AAEf,MAAM,mBAAmB,CAAC,cAAiC;AAChE,QAAM,mBAAmB,CAAC,UACxB,oBAAC;AAAA,IAAc;AAAA,IACb,8BAAC;AAAA,MAAW,GAAG;AAAA,KAAO;AAAA,GACxB;AAEF,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|