react-science 0.26.1 → 0.26.3-pre.1695816657
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/README.md +8 -0
- package/lib/components/info-panel/InfoPanel.js +1 -1
- package/lib/components/modal/Modal.js +3 -1
- package/lib/components/root-layout/RootLayout.js +5 -13
- package/lib-esm/components/info-panel/InfoPanel.js +1 -1
- package/lib-esm/components/info-panel/InfoPanel.js.map +1 -1
- package/lib-esm/components/modal/Modal.d.ts.map +1 -1
- package/lib-esm/components/modal/Modal.js +3 -1
- package/lib-esm/components/modal/Modal.js.map +1 -1
- package/lib-esm/components/root-layout/RootLayout.d.ts +1 -1
- package/lib-esm/components/root-layout/RootLayout.d.ts.map +1 -1
- package/lib-esm/components/root-layout/RootLayout.js +2 -7
- package/lib-esm/components/root-layout/RootLayout.js.map +1 -1
- package/package.json +5 -5
- package/src/components/info-panel/InfoPanel.tsx +1 -1
- package/src/components/modal/Modal.tsx +3 -1
- package/src/components/root-layout/RootLayout.tsx +2 -8
- package/lib/components/root-layout/css-reset/preflight.js +0 -416
- package/lib-esm/components/root-layout/css-reset/preflight.d.ts +0 -2
- package/lib-esm/components/root-layout/css-reset/preflight.d.ts.map +0 -1
- package/lib-esm/components/root-layout/css-reset/preflight.js +0 -414
- package/lib-esm/components/root-layout/css-reset/preflight.js.map +0 -1
- package/src/components/root-layout/css-reset/preflight.ts +0 -414
- package/src/styles/storybook-globals.css +0 -6
- /package/{src/components/root-layout/css-reset → styles}/preflight.css +0 -0
package/README.md
CHANGED
|
@@ -19,6 +19,14 @@ React components to build scientific applications UI.
|
|
|
19
19
|
> npm i react-science
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
+
### Global css
|
|
23
|
+
|
|
24
|
+
If you use tailwindcss and already you added `@tailwind base;` to your tailwind stylesheet, you can skip this step.
|
|
25
|
+
|
|
26
|
+
Otherwise, import the global styles in your application:
|
|
27
|
+
|
|
28
|
+
`import 'react-science/styles/preflight.css';`
|
|
29
|
+
|
|
22
30
|
## Introduction
|
|
23
31
|
|
|
24
32
|
Science has specific requirements to display and process data. This is especially true in chemistry where a large number of techniques are used to extract important information (or characterize) samples.
|
|
@@ -52,7 +52,7 @@ function InfoPanel(props) {
|
|
|
52
52
|
setSearch(target.value);
|
|
53
53
|
}, style: inputStyle }), data.map(({ description, data }) => {
|
|
54
54
|
const content = viewData(data);
|
|
55
|
-
return content.length > 0 ? ((0, jsx_runtime_1.jsx)(react_2.Disclosure, { defaultOpen: true, children: ({ open }) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_2.Disclosure.Button, { css: style.button, children: [(0, jsx_runtime_1.jsx)(fa_1.FaChevronRight, { css: style.chevron(open) }), description] }), (0, jsx_runtime_1.jsx)(react_2.Disclosure.Panel, { children: (0, jsx_runtime_1.jsxs)(Table_1.Table, { css: style.table, style: tableStyle, children: [(0, jsx_runtime_1.jsxs)(Table_1.Table.Header, { children: [(0, jsx_runtime_1.jsx)(index_1.ValueRenderers.Title, { value: "Parameter" }), (0, jsx_runtime_1.jsx)(index_1.ValueRenderers.Title, { value: "Value" })] }), content] }) })] })) })) : null;
|
|
55
|
+
return content.length > 0 ? ((0, jsx_runtime_1.jsx)(react_2.Disclosure, { defaultOpen: true, children: ({ open }) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_2.Disclosure.Button, { css: style.button, children: [(0, jsx_runtime_1.jsx)(fa_1.FaChevronRight, { css: style.chevron(open) }), description] }), (0, jsx_runtime_1.jsx)(react_2.Disclosure.Panel, { children: (0, jsx_runtime_1.jsxs)(Table_1.Table, { css: style.table, style: tableStyle, children: [(0, jsx_runtime_1.jsxs)(Table_1.Table.Header, { children: [(0, jsx_runtime_1.jsx)(index_1.ValueRenderers.Title, { value: "Parameter" }), (0, jsx_runtime_1.jsx)(index_1.ValueRenderers.Title, { value: "Value" })] }), content] }) })] })) }, description)) : null;
|
|
56
56
|
})] }));
|
|
57
57
|
}
|
|
58
58
|
exports.InfoPanel = InfoPanel;
|
|
@@ -13,7 +13,9 @@ const ModalCloseButton_1 = __importDefault(require("./ModalCloseButton"));
|
|
|
13
13
|
const useDialog_1 = require("./useDialog");
|
|
14
14
|
const DialogRoot = styled_1.default.dialog `
|
|
15
15
|
background-color: transparent;
|
|
16
|
-
|
|
16
|
+
:focus {
|
|
17
|
+
outline: none;
|
|
18
|
+
}
|
|
17
19
|
::backdrop {
|
|
18
20
|
background-color: rgba(113, 113, 122, 0.75);
|
|
19
21
|
}
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.RootLayout = void 0;
|
|
7
|
-
const jsx_runtime_1 = require("
|
|
8
|
-
/** @jsxImportSource @emotion/react */
|
|
9
|
-
const react_1 = require("@emotion/react");
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
10
5
|
const react_query_1 = require("@tanstack/react-query");
|
|
11
|
-
const
|
|
12
|
-
// @ts-expect-error We load emotion.esm because until this project is moved to true ESM.
|
|
13
|
-
const emotion_esm_1 = __importDefault(require("react-shadow/emotion"));
|
|
6
|
+
const react_1 = require("react");
|
|
14
7
|
const AccordionContext_1 = require("../accordion/AccordionContext");
|
|
15
8
|
const RootLayoutContext_1 = require("./RootLayoutContext");
|
|
16
9
|
const customPreflight_1 = require("./css-reset/customPreflight");
|
|
17
|
-
const preflight_1 = require("./css-reset/preflight");
|
|
18
10
|
const queryClient_1 = require("./queryClient");
|
|
19
11
|
const style = {
|
|
20
12
|
width: '100%',
|
|
@@ -22,12 +14,12 @@ const style = {
|
|
|
22
14
|
fontSize: '12px',
|
|
23
15
|
};
|
|
24
16
|
function RootLayout(props) {
|
|
25
|
-
const [rootRef, setRootRef] = (0,
|
|
26
|
-
const ref = (0,
|
|
17
|
+
const [rootRef, setRootRef] = (0, react_1.useState)(typeof document !== 'undefined' ? document.body : null);
|
|
18
|
+
const ref = (0, react_1.useCallback)((node) => {
|
|
27
19
|
if (node !== null) {
|
|
28
20
|
setRootRef(node);
|
|
29
21
|
}
|
|
30
22
|
}, []);
|
|
31
|
-
return ((0, jsx_runtime_1.
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: { ...style, ...props.style }, children: (0, jsx_runtime_1.jsx)(customPreflight_1.CustomDivPreflight, { ref: ref, children: (0, jsx_runtime_1.jsx)(RootLayoutContext_1.RootLayoutProvider, { innerRef: rootRef, children: (0, jsx_runtime_1.jsx)(react_query_1.QueryClientProvider, { client: queryClient_1.queryClient, children: (0, jsx_runtime_1.jsx)(AccordionContext_1.AccordionProvider, { children: props.children }) }) }) }) }));
|
|
32
24
|
}
|
|
33
25
|
exports.RootLayout = RootLayout;
|
|
@@ -49,7 +49,7 @@ export function InfoPanel(props) {
|
|
|
49
49
|
setSearch(target.value);
|
|
50
50
|
}, style: inputStyle }), data.map(({ description, data }) => {
|
|
51
51
|
const content = viewData(data);
|
|
52
|
-
return content.length > 0 ? (_jsx(Disclosure, { defaultOpen: true, children: ({ open }) => (_jsxs(_Fragment, { children: [_jsxs(Disclosure.Button, { css: style.button, children: [_jsx(FaChevronRight, { css: style.chevron(open) }), description] }), _jsx(Disclosure.Panel, { children: _jsxs(Table, { css: style.table, style: tableStyle, children: [_jsxs(Table.Header, { children: [_jsx(ValueRenderers.Title, { value: "Parameter" }), _jsx(ValueRenderers.Title, { value: "Value" })] }), content] }) })] })) })) : null;
|
|
52
|
+
return content.length > 0 ? (_jsx(Disclosure, { defaultOpen: true, children: ({ open }) => (_jsxs(_Fragment, { children: [_jsxs(Disclosure.Button, { css: style.button, children: [_jsx(FaChevronRight, { css: style.chevron(open) }), description] }), _jsx(Disclosure.Panel, { children: _jsxs(Table, { css: style.table, style: tableStyle, children: [_jsxs(Table.Header, { children: [_jsx(ValueRenderers.Title, { value: "Parameter" }), _jsx(ValueRenderers.Title, { value: "Value" })] }), content] }) })] })) }, description)) : null;
|
|
53
53
|
})] }));
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InfoPanel.js","sourceRoot":"","sources":["../../../src/components/info-panel/InfoPanel.tsx"],"names":[],"mappings":";AAAA,sCAAsC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,wGAAwG;AACxG,aAAa;AACb,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAiB,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAcvC,MAAM,KAAK,GAAG;IACZ,SAAS,EAAE,GAAG,CAAC;QACb,OAAO,EAAE,KAAK;KACf,CAAC;IACF,OAAO,EAAE,CAAC,IAAa,EAAE,EAAE,CACzB,GAAG,CAAC;QACF,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM;QAC/B,UAAU,EAAE,sBAAsB;KACnC,CAAC;IACJ,MAAM,EAAE,GAAG,CAAC;QACV,OAAO,EAAE,MAAM;QACf,UAAU,EAAE,QAAQ;QACpB,GAAG,EAAE,CAAC;QACN,OAAO,EAAE,SAAS;KACnB,CAAC;IACF,KAAK,EAAE,GAAG,CAAA;;;;;GAKT;CACF,CAAC;AAEF,MAAM,UAAU,SAAS,CAAC,KAAqB;IAC7C,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACzC,MAAM,E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,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/components/modal/Modal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASrD,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;IACxC,MAAM,EAAE,OAAO,CAAC;IAChB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AA8CD,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,kDAwDtC;yBAxDe,KAAK"}
|
|
@@ -7,7 +7,9 @@ import ModalCloseButton from './ModalCloseButton';
|
|
|
7
7
|
import { useDialog } from './useDialog';
|
|
8
8
|
const DialogRoot = styled.dialog `
|
|
9
9
|
background-color: transparent;
|
|
10
|
-
|
|
10
|
+
:focus {
|
|
11
|
+
outline: none;
|
|
12
|
+
}
|
|
11
13
|
::backdrop {
|
|
12
14
|
background-color: rgba(113, 113, 122, 0.75);
|
|
13
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../../src/components/modal/Modal.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAu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OAAO,KAAC,iBAAiB,cAAE,KAAK,CAAC,QAAQ,GAAqB,CAAC;AACjE,CAAC,CAAC"}
|
|
@@ -3,6 +3,6 @@ interface RootLayoutProps {
|
|
|
3
3
|
style?: CSSProperties;
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
}
|
|
6
|
-
export declare function RootLayout(props: RootLayoutProps): import("
|
|
6
|
+
export declare function RootLayout(props: RootLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=RootLayout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RootLayout.d.ts","sourceRoot":"","sources":["../../../src/components/root-layout/RootLayout.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RootLayout.d.ts","sourceRoot":"","sources":["../../../src/components/root-layout/RootLayout.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAyB,MAAM,OAAO,CAAC;AAQxE,UAAU,eAAe;IACvB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAQD,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CAsBhD"}
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
2
|
-
/** @jsxImportSource @emotion/react */
|
|
3
|
-
import { Global } from '@emotion/react';
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
2
|
import { QueryClientProvider } from '@tanstack/react-query';
|
|
5
3
|
import { useState, useCallback } from 'react';
|
|
6
|
-
// @ts-expect-error We load emotion.esm because until this project is moved to true ESM.
|
|
7
|
-
import root from 'react-shadow/emotion.esm';
|
|
8
4
|
import { AccordionProvider } from '../accordion/AccordionContext';
|
|
9
5
|
import { RootLayoutProvider } from './RootLayoutContext';
|
|
10
6
|
import { CustomDivPreflight } from './css-reset/customPreflight';
|
|
11
|
-
import { preflight } from './css-reset/preflight';
|
|
12
7
|
import { queryClient } from './queryClient';
|
|
13
8
|
const style = {
|
|
14
9
|
width: '100%',
|
|
@@ -22,6 +17,6 @@ export function RootLayout(props) {
|
|
|
22
17
|
setRootRef(node);
|
|
23
18
|
}
|
|
24
19
|
}, []);
|
|
25
|
-
return (
|
|
20
|
+
return (_jsx("div", { style: { ...style, ...props.style }, children: _jsx(CustomDivPreflight, { ref: ref, children: _jsx(RootLayoutProvider, { innerRef: rootRef, children: _jsx(QueryClientProvider, { client: queryClient, children: _jsx(AccordionProvider, { children: props.children }) }) }) }) }));
|
|
26
21
|
}
|
|
27
22
|
//# sourceMappingURL=RootLayout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RootLayout.js","sourceRoot":"","sources":["../../../src/components/root-layout/RootLayout.tsx"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"RootLayout.js","sourceRoot":"","sources":["../../../src/components/root-layout/RootLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAA4B,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAExE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAO5C,MAAM,KAAK,GAAkB;IAC3B,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM;IACd,QAAQ,EAAE,MAAM;CACjB,CAAC;AAEF,MAAM,UAAU,UAAU,CAAC,KAAsB;IAC/C,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CACpC,OAAO,QAAQ,KAAK,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CACvD,CAAC;IAEF,MAAM,GAAG,GAAG,WAAW,CAAC,CAAC,IAAoB,EAAE,EAAE;QAC/C,IAAI,IAAI,KAAK,IAAI,EAAE;YACjB,UAAU,CAAC,IAAI,CAAC,CAAC;SAClB;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,cAAK,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,GAAG,KAAK,CAAC,KAAK,EAAE,YACtC,KAAC,kBAAkB,IAAC,GAAG,EAAE,GAAG,YAC1B,KAAC,kBAAkB,IAAC,QAAQ,EAAE,OAAO,YACnC,KAAC,mBAAmB,IAAC,MAAM,EAAE,WAAW,YACtC,KAAC,iBAAiB,cAAE,KAAK,CAAC,QAAQ,GAAqB,GACnC,GACH,GACF,GACjB,CACP,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-science",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.3-pre.1695816657",
|
|
4
4
|
"description": "React components to build scientific applications UI",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./app": {
|
|
@@ -22,10 +22,11 @@
|
|
|
22
22
|
"files": [
|
|
23
23
|
"lib",
|
|
24
24
|
"lib-esm",
|
|
25
|
-
"src"
|
|
25
|
+
"src",
|
|
26
|
+
"styles/preflight.css"
|
|
26
27
|
],
|
|
27
28
|
"scripts": {
|
|
28
|
-
"build": "npm run clean && npm run build-ts
|
|
29
|
+
"build": "npm run clean && npm run build-ts",
|
|
29
30
|
"build-all": "npm run build-app && npm run build-storybook && mv storybook-static dist/stories",
|
|
30
31
|
"build-app": "cross-env NO_MINIFY=true vite build",
|
|
31
32
|
"build-storybook": "storybook build",
|
|
@@ -37,7 +38,6 @@
|
|
|
37
38
|
"dev-app": "vite --open /pages/demo.html",
|
|
38
39
|
"eslint": "eslint .",
|
|
39
40
|
"eslint-fix": "npm run eslint -- --fix",
|
|
40
|
-
"fix-react-shadow": "node scripts/fix-react-shadow.mjs",
|
|
41
41
|
"playwright": "npm run playwright-ct -- --project chromium && npm run playwright-e2e -- --project chromium",
|
|
42
42
|
"playwright-ct": "playwright test -c playwright-ct.config.ts",
|
|
43
43
|
"playwright-e2e": "playwright test -c playwright-e2e.config.ts",
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
"@lukeed/uuid": "^2.0.1",
|
|
68
68
|
"@popperjs/core": "^2.11.8",
|
|
69
69
|
"@radix-ui/react-checkbox": "^1.0.4",
|
|
70
|
+
"@radix-ui/react-radio-group": "^1.1.3",
|
|
70
71
|
"@radix-ui/react-select": "^1.2.2",
|
|
71
72
|
"@tanstack/react-query": "^4.32.6",
|
|
72
73
|
"@tanstack/react-table": "^8.9.3",
|
|
@@ -102,7 +103,6 @@
|
|
|
102
103
|
"@babel/eslint-parser": "^7.22.10",
|
|
103
104
|
"@playwright/experimental-ct-react": "^1.37.0",
|
|
104
105
|
"@playwright/test": "^1.37.0",
|
|
105
|
-
"@radix-ui/react-radio-group": "^1.1.3",
|
|
106
106
|
"@storybook/addon-essentials": "7.3.0",
|
|
107
107
|
"@storybook/addon-storysource": "7.3.0",
|
|
108
108
|
"@storybook/blocks": "7.3.0",
|
|
@@ -87,7 +87,7 @@ export function InfoPanel(props: InfoPanelProps) {
|
|
|
87
87
|
{data.map(({ description, data }) => {
|
|
88
88
|
const content = viewData(data);
|
|
89
89
|
return content.length > 0 ? (
|
|
90
|
-
<Disclosure defaultOpen>
|
|
90
|
+
<Disclosure defaultOpen key={description}>
|
|
91
91
|
{({ open }) => (
|
|
92
92
|
<>
|
|
93
93
|
<Disclosure.Button css={style.button}>
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
/** @jsxImportSource @emotion/react */
|
|
2
|
-
import { Global } from '@emotion/react';
|
|
3
1
|
import { QueryClientProvider } from '@tanstack/react-query';
|
|
4
2
|
import { ReactNode, CSSProperties, useState, useCallback } from 'react';
|
|
5
|
-
// @ts-expect-error We load emotion.esm because until this project is moved to true ESM.
|
|
6
|
-
import root from 'react-shadow/emotion.esm';
|
|
7
3
|
|
|
8
4
|
import { AccordionProvider } from '../accordion/AccordionContext';
|
|
9
5
|
|
|
10
6
|
import { RootLayoutProvider } from './RootLayoutContext';
|
|
11
7
|
import { CustomDivPreflight } from './css-reset/customPreflight';
|
|
12
|
-
import { preflight } from './css-reset/preflight';
|
|
13
8
|
import { queryClient } from './queryClient';
|
|
14
9
|
|
|
15
10
|
interface RootLayoutProps {
|
|
@@ -35,8 +30,7 @@ export function RootLayout(props: RootLayoutProps) {
|
|
|
35
30
|
}, []);
|
|
36
31
|
|
|
37
32
|
return (
|
|
38
|
-
<
|
|
39
|
-
<Global styles={preflight} />
|
|
33
|
+
<div style={{ ...style, ...props.style }}>
|
|
40
34
|
<CustomDivPreflight ref={ref}>
|
|
41
35
|
<RootLayoutProvider innerRef={rootRef}>
|
|
42
36
|
<QueryClientProvider client={queryClient}>
|
|
@@ -44,6 +38,6 @@ export function RootLayout(props: RootLayoutProps) {
|
|
|
44
38
|
</QueryClientProvider>
|
|
45
39
|
</RootLayoutProvider>
|
|
46
40
|
</CustomDivPreflight>
|
|
47
|
-
</
|
|
41
|
+
</div>
|
|
48
42
|
);
|
|
49
43
|
}
|