@xanui/core 1.1.21 → 1.1.22
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/AppRoot/index.d.ts +2 -1
- package/AppRoot/index.js +5 -3
- package/AppRoot/index.js.map +1 -1
- package/AppRoot/index.mjs +5 -3
- package/AppRoot/index.mjs.map +1 -1
- package/hooks/usePortal.d.ts +6 -1
- package/hooks/usePortal.js +34 -29
- package/hooks/usePortal.js.map +1 -1
- package/hooks/usePortal.mjs +34 -29
- package/hooks/usePortal.mjs.map +1 -1
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/package.json +1 -1
package/AppRoot/index.d.ts
CHANGED
|
@@ -5,7 +5,8 @@ import { ThemeProviderProps } from '../theme/ThemeProvider.js';
|
|
|
5
5
|
type AppRootProps<T extends TagComponentType = "div"> = ThemeProviderProps<T> & {
|
|
6
6
|
noScrollbarCss?: boolean;
|
|
7
7
|
};
|
|
8
|
+
declare const appRootElement: () => HTMLDivElement;
|
|
8
9
|
declare const AppRoot: React__default.ForwardRefExoticComponent<Omit<AppRootProps<TagComponentType>, "ref"> & React__default.RefAttributes<any>>;
|
|
9
10
|
|
|
10
|
-
export { AppRoot as default };
|
|
11
|
+
export { appRootElement, AppRoot as default };
|
|
11
12
|
export type { AppRootProps };
|
package/AppRoot/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var tslib=require('tslib'),jsxRuntime=require('react/jsx-runtime'),React=require('react'),index$1=require('../theme/index.js'),BreakpointProvider=require('../breakpoint/BreakpointProvider.js'),index=require('../css/index.js'),useScrollbar=require('../hooks/useScrollbar.js'),ThemeDefaultOptions=require('../theme/ThemeDefaultOptions.js'),createTheme=require('../theme/createTheme.js'),ThemeProvider=require('../theme/ThemeProvider.js');createTheme.createTheme("light", { colors: ThemeDefaultOptions.lightColorPallete });
|
|
2
2
|
createTheme.createTheme("dark", { colors: ThemeDefaultOptions.darkColorPallete });
|
|
3
|
+
const appRootClassName = "xui-app-root";
|
|
4
|
+
const appRootElement = () => document.querySelector(`.${appRootClassName}`);
|
|
3
5
|
const AppRoot = React.forwardRef((_a, ref) => {
|
|
4
6
|
var { children, noScrollbarCss, theme } = _a, props = tslib.__rest(_a, ["children", "noScrollbarCss", "theme"]);
|
|
5
7
|
noScrollbarCss !== null && noScrollbarCss !== void 0 ? noScrollbarCss : (noScrollbarCss = false);
|
|
@@ -49,7 +51,7 @@ const AppRoot = React.forwardRef((_a, ref) => {
|
|
|
49
51
|
});
|
|
50
52
|
}, []);
|
|
51
53
|
React.useEffect(() => {
|
|
52
|
-
const root = document.querySelectorAll(
|
|
54
|
+
const root = document.querySelectorAll(`.${appRootClassName}`);
|
|
53
55
|
if (!root || root.length > 1) {
|
|
54
56
|
throw new Error("Multiple AppRoot detected in the application tree. Please ensure that there is only one AppRoot component wrapping your application.");
|
|
55
57
|
}
|
|
@@ -62,5 +64,5 @@ const AppRoot = React.forwardRef((_a, ref) => {
|
|
|
62
64
|
head.appendChild(style);
|
|
63
65
|
});
|
|
64
66
|
}, []);
|
|
65
|
-
return (jsxRuntime.jsx(ThemeProvider.default, Object.assign({ ref: ref, theme: theme }, props, { classNames: [
|
|
66
|
-
});exports.default=AppRoot;//# sourceMappingURL=index.js.map
|
|
67
|
+
return (jsxRuntime.jsx(ThemeProvider.default, Object.assign({ ref: ref, theme: theme }, props, { classNames: [appRootClassName], children: jsxRuntime.jsx(BreakpointProvider.BreakpointProvider, { children: children }) })));
|
|
68
|
+
});exports.appRootElement=appRootElement;exports.default=AppRoot;//# sourceMappingURL=index.js.map
|
package/AppRoot/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/AppRoot/index.tsx"],"sourcesContent":["\nimport React, { useEffect, useMemo } from 'react';\nimport { TagComponentType } from '../Tag/types';\nimport { createTheme, ThemeProvider, ThemeProviderProps, themeRootClass } from '../theme';\nimport { BreakpointProvider } from '../breakpoint';\nimport useScrollbar from '../hooks/useScrollbar';\nimport { css } from '../css';\nimport { darkColorPallete, lightColorPallete } from '../theme/ThemeDefaultOptions';\n\ncreateTheme(\"light\", { colors: lightColorPallete })\ncreateTheme(\"dark\", { colors: darkColorPallete })\n\nexport type AppRootProps<T extends TagComponentType = \"div\"> = ThemeProviderProps<T> & {\n noScrollbarCss?: boolean;\n}\n\nconst AppRoot = React.forwardRef(<T extends TagComponentType = \"div\">({ children, noScrollbarCss, theme, ...props }: AppRootProps<T>, ref: React.Ref<any>) => {\n noScrollbarCss ??= false\n\n useMemo(() => {\n if (noScrollbarCss) return;\n useScrollbar({\n themeName: theme,\n root_cls: themeRootClass(theme)\n })\n }, [noScrollbarCss, theme])\n\n useMemo(() => {\n css({\n \"@global\": {\n \"*\": {\n m: 0,\n p: 0,\n outline: \"none\",\n boxSizing: \"border-box\",\n verticalAlign: \"baseline\",\n },\n \"html, body\": {\n minHeight: \"100%\",\n \"-webkit-font-smoothing\": \"antialiased\"\n } as any,\n \"img, picture, video, canvas, svg\": {\n maxWidth: \"100%\",\n display: \"block\"\n },\n \"input, button, textarea, select\": {\n font: \"inherit\"\n },\n \"table\": {\n borderCollapse: \"collapse\",\n borderSpacing: 0\n },\n \"ol, ul\": {\n listStyle: \"none\"\n },\n \"a\": {\n display: \"inline-block\"\n },\n \"p, h1, h2, h3, h4, h5, h6\": {\n overflowWrap: \"break-word\",\n }\n }\n })\n }, [])\n\n useEffect(() => {\n\n const root = document.querySelectorAll(
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/AppRoot/index.tsx"],"sourcesContent":["\nimport React, { useEffect, useMemo } from 'react';\nimport { TagComponentType } from '../Tag/types';\nimport { createTheme, ThemeProvider, ThemeProviderProps, themeRootClass } from '../theme';\nimport { BreakpointProvider } from '../breakpoint';\nimport useScrollbar from '../hooks/useScrollbar';\nimport { css } from '../css';\nimport { darkColorPallete, lightColorPallete } from '../theme/ThemeDefaultOptions';\n\ncreateTheme(\"light\", { colors: lightColorPallete })\ncreateTheme(\"dark\", { colors: darkColorPallete })\n\nexport type AppRootProps<T extends TagComponentType = \"div\"> = ThemeProviderProps<T> & {\n noScrollbarCss?: boolean;\n}\n\nconst appRootClassName = \"xui-app-root\"\nexport const appRootElement = () => document.querySelector(`.${appRootClassName}`) as HTMLDivElement;\n\nconst AppRoot = React.forwardRef(<T extends TagComponentType = \"div\">({ children, noScrollbarCss, theme, ...props }: AppRootProps<T>, ref: React.Ref<any>) => {\n noScrollbarCss ??= false\n\n useMemo(() => {\n if (noScrollbarCss) return;\n useScrollbar({\n themeName: theme,\n root_cls: themeRootClass(theme)\n })\n }, [noScrollbarCss, theme])\n\n useMemo(() => {\n css({\n \"@global\": {\n \"*\": {\n m: 0,\n p: 0,\n outline: \"none\",\n boxSizing: \"border-box\",\n verticalAlign: \"baseline\",\n },\n \"html, body\": {\n minHeight: \"100%\",\n \"-webkit-font-smoothing\": \"antialiased\"\n } as any,\n \"img, picture, video, canvas, svg\": {\n maxWidth: \"100%\",\n display: \"block\"\n },\n \"input, button, textarea, select\": {\n font: \"inherit\"\n },\n \"table\": {\n borderCollapse: \"collapse\",\n borderSpacing: 0\n },\n \"ol, ul\": {\n listStyle: \"none\"\n },\n \"a\": {\n display: \"inline-block\"\n },\n \"p, h1, h2, h3, h4, h5, h6\": {\n overflowWrap: \"break-word\",\n }\n }\n })\n }, [])\n\n useEffect(() => {\n\n const root = document.querySelectorAll(`.${appRootClassName}`)\n if (!root || root.length > 1) {\n throw new Error(\"Multiple AppRoot detected in the application tree. Please ensure that there is only one AppRoot component wrapping your application.\");\n }\n\n\n // move oncss style tags to head\n if (typeof window === 'undefined') return;\n const head = document.getElementsByTagName('head')[0];\n const styles = Array.from(document.querySelectorAll('body style[data-oncss]'));\n styles.forEach((style) => {\n head.appendChild(style);\n });\n }, [])\n\n return (\n <ThemeProvider\n ref={ref}\n theme={theme}\n {...props}\n classNames={[appRootClassName]}\n >\n <BreakpointProvider>\n {children}\n </BreakpointProvider>\n </ThemeProvider>\n )\n})\n\nexport default AppRoot\n\n"],"names":["createTheme","lightColorPallete","darkColorPallete","__rest","useMemo","useScrollbar","themeRootClass","css","useEffect","_jsx","ThemeProvider","BreakpointProvider"],"mappings":"0fASAA,uBAAW,CAAC,OAAO,EAAE,EAAE,MAAM,EAAEC,qCAAiB,EAAE,CAAC;AACnDD,uBAAW,CAAC,MAAM,EAAE,EAAE,MAAM,EAAEE,oCAAgB,EAAE,CAAC;AAMjD,MAAM,gBAAgB,GAAG,cAAc;AAChC,MAAM,cAAc,GAAG,MAAM,QAAQ,CAAC,aAAa,CAAC,CAAA,CAAA,EAAI,gBAAgB,CAAA,CAAE;AAEjF,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,CAAqC,EAA8D,EAAE,GAAmB,KAAI;QAAvF,EAAE,QAAQ,EAAE,cAAc,EAAE,KAAK,OAA6B,EAAxB,KAAK,GAAAC,YAAA,CAAA,EAAA,EAA3C,CAAA,UAAA,EAAA,gBAAA,EAAA,OAAA,CAA6C,CAAF;IAC9G,cAAc,KAAA,IAAA,IAAd,cAAc,KAAA,MAAA,GAAd,cAAc,IAAd,cAAc,GAAK,KAAK,CAAA;IAExBC,aAAO,CAAC,MAAK;AACV,QAAA,IAAI,cAAc;YAAE;AACpB,QAAAC,oBAAY,CAAC;AACV,YAAA,SAAS,EAAE,KAAK;AAChB,YAAA,QAAQ,EAAEC,sBAAc,CAAC,KAAK;AAChC,SAAA,CAAC;AACL,IAAA,CAAC,EAAE,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IAE3BF,aAAO,CAAC,MAAK;AACV,QAAAG,SAAG,CAAC;AACD,YAAA,SAAS,EAAE;AACR,gBAAA,GAAG,EAAE;AACF,oBAAA,CAAC,EAAE,CAAC;AACJ,oBAAA,CAAC,EAAE,CAAC;AACJ,oBAAA,OAAO,EAAE,MAAM;AACf,oBAAA,SAAS,EAAE,YAAY;AACvB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IACL,CAAC,EAAE,EAAE,CAAC;IAEN,QACGC,cAAA,CAACC,qBAAa,EAAA,MAAA,CAAA,MAAA,CAAA,EACX,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EAAA,EACR,KAAK,EAAA,EACT,UAAU,EAAE,CAAC,gBAAgB,CAAC,EAAA,QAAA,EAE9BD,cAAA,CAACE,qCAAkB,EAAA,EAAA,QAAA,EACf,QAAQ,EAAA,CACS,EAAA,CAAA,CACR;AAEtB,CAAC"}
|
package/AppRoot/index.mjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import {__rest}from'tslib';import {jsx}from'react/jsx-runtime';import React__default,{useMemo,useEffect}from'react';import {themeRootClass}from'../theme/index.mjs';import {BreakpointProvider}from'../breakpoint/BreakpointProvider.mjs';import {css}from'../css/index.mjs';import useScrollbar from'../hooks/useScrollbar.mjs';import {lightColorPallete,darkColorPallete}from'../theme/ThemeDefaultOptions.mjs';import {createTheme}from'../theme/createTheme.mjs';import ThemeProvider from'../theme/ThemeProvider.mjs';createTheme("light", { colors: lightColorPallete });
|
|
2
2
|
createTheme("dark", { colors: darkColorPallete });
|
|
3
|
+
const appRootClassName = "xui-app-root";
|
|
4
|
+
const appRootElement = () => document.querySelector(`.${appRootClassName}`);
|
|
3
5
|
const AppRoot = React__default.forwardRef((_a, ref) => {
|
|
4
6
|
var { children, noScrollbarCss, theme } = _a, props = __rest(_a, ["children", "noScrollbarCss", "theme"]);
|
|
5
7
|
noScrollbarCss !== null && noScrollbarCss !== void 0 ? noScrollbarCss : (noScrollbarCss = false);
|
|
@@ -49,7 +51,7 @@ const AppRoot = React__default.forwardRef((_a, ref) => {
|
|
|
49
51
|
});
|
|
50
52
|
}, []);
|
|
51
53
|
useEffect(() => {
|
|
52
|
-
const root = document.querySelectorAll(
|
|
54
|
+
const root = document.querySelectorAll(`.${appRootClassName}`);
|
|
53
55
|
if (!root || root.length > 1) {
|
|
54
56
|
throw new Error("Multiple AppRoot detected in the application tree. Please ensure that there is only one AppRoot component wrapping your application.");
|
|
55
57
|
}
|
|
@@ -62,5 +64,5 @@ const AppRoot = React__default.forwardRef((_a, ref) => {
|
|
|
62
64
|
head.appendChild(style);
|
|
63
65
|
});
|
|
64
66
|
}, []);
|
|
65
|
-
return (jsx(ThemeProvider, Object.assign({ ref: ref, theme: theme }, props, { classNames: [
|
|
66
|
-
});export{AppRoot as default};//# sourceMappingURL=index.mjs.map
|
|
67
|
+
return (jsx(ThemeProvider, Object.assign({ ref: ref, theme: theme }, props, { classNames: [appRootClassName], children: jsx(BreakpointProvider, { children: children }) })));
|
|
68
|
+
});export{appRootElement,AppRoot as default};//# sourceMappingURL=index.mjs.map
|
package/AppRoot/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/AppRoot/index.tsx"],"sourcesContent":["\nimport React, { useEffect, useMemo } from 'react';\nimport { TagComponentType } from '../Tag/types';\nimport { createTheme, ThemeProvider, ThemeProviderProps, themeRootClass } from '../theme';\nimport { BreakpointProvider } from '../breakpoint';\nimport useScrollbar from '../hooks/useScrollbar';\nimport { css } from '../css';\nimport { darkColorPallete, lightColorPallete } from '../theme/ThemeDefaultOptions';\n\ncreateTheme(\"light\", { colors: lightColorPallete })\ncreateTheme(\"dark\", { colors: darkColorPallete })\n\nexport type AppRootProps<T extends TagComponentType = \"div\"> = ThemeProviderProps<T> & {\n noScrollbarCss?: boolean;\n}\n\nconst AppRoot = React.forwardRef(<T extends TagComponentType = \"div\">({ children, noScrollbarCss, theme, ...props }: AppRootProps<T>, ref: React.Ref<any>) => {\n noScrollbarCss ??= false\n\n useMemo(() => {\n if (noScrollbarCss) return;\n useScrollbar({\n themeName: theme,\n root_cls: themeRootClass(theme)\n })\n }, [noScrollbarCss, theme])\n\n useMemo(() => {\n css({\n \"@global\": {\n \"*\": {\n m: 0,\n p: 0,\n outline: \"none\",\n boxSizing: \"border-box\",\n verticalAlign: \"baseline\",\n },\n \"html, body\": {\n minHeight: \"100%\",\n \"-webkit-font-smoothing\": \"antialiased\"\n } as any,\n \"img, picture, video, canvas, svg\": {\n maxWidth: \"100%\",\n display: \"block\"\n },\n \"input, button, textarea, select\": {\n font: \"inherit\"\n },\n \"table\": {\n borderCollapse: \"collapse\",\n borderSpacing: 0\n },\n \"ol, ul\": {\n listStyle: \"none\"\n },\n \"a\": {\n display: \"inline-block\"\n },\n \"p, h1, h2, h3, h4, h5, h6\": {\n overflowWrap: \"break-word\",\n }\n }\n })\n }, [])\n\n useEffect(() => {\n\n const root = document.querySelectorAll(
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/AppRoot/index.tsx"],"sourcesContent":["\nimport React, { useEffect, useMemo } from 'react';\nimport { TagComponentType } from '../Tag/types';\nimport { createTheme, ThemeProvider, ThemeProviderProps, themeRootClass } from '../theme';\nimport { BreakpointProvider } from '../breakpoint';\nimport useScrollbar from '../hooks/useScrollbar';\nimport { css } from '../css';\nimport { darkColorPallete, lightColorPallete } from '../theme/ThemeDefaultOptions';\n\ncreateTheme(\"light\", { colors: lightColorPallete })\ncreateTheme(\"dark\", { colors: darkColorPallete })\n\nexport type AppRootProps<T extends TagComponentType = \"div\"> = ThemeProviderProps<T> & {\n noScrollbarCss?: boolean;\n}\n\nconst appRootClassName = \"xui-app-root\"\nexport const appRootElement = () => document.querySelector(`.${appRootClassName}`) as HTMLDivElement;\n\nconst AppRoot = React.forwardRef(<T extends TagComponentType = \"div\">({ children, noScrollbarCss, theme, ...props }: AppRootProps<T>, ref: React.Ref<any>) => {\n noScrollbarCss ??= false\n\n useMemo(() => {\n if (noScrollbarCss) return;\n useScrollbar({\n themeName: theme,\n root_cls: themeRootClass(theme)\n })\n }, [noScrollbarCss, theme])\n\n useMemo(() => {\n css({\n \"@global\": {\n \"*\": {\n m: 0,\n p: 0,\n outline: \"none\",\n boxSizing: \"border-box\",\n verticalAlign: \"baseline\",\n },\n \"html, body\": {\n minHeight: \"100%\",\n \"-webkit-font-smoothing\": \"antialiased\"\n } as any,\n \"img, picture, video, canvas, svg\": {\n maxWidth: \"100%\",\n display: \"block\"\n },\n \"input, button, textarea, select\": {\n font: \"inherit\"\n },\n \"table\": {\n borderCollapse: \"collapse\",\n borderSpacing: 0\n },\n \"ol, ul\": {\n listStyle: \"none\"\n },\n \"a\": {\n display: \"inline-block\"\n },\n \"p, h1, h2, h3, h4, h5, h6\": {\n overflowWrap: \"break-word\",\n }\n }\n })\n }, [])\n\n useEffect(() => {\n\n const root = document.querySelectorAll(`.${appRootClassName}`)\n if (!root || root.length > 1) {\n throw new Error(\"Multiple AppRoot detected in the application tree. Please ensure that there is only one AppRoot component wrapping your application.\");\n }\n\n\n // move oncss style tags to head\n if (typeof window === 'undefined') return;\n const head = document.getElementsByTagName('head')[0];\n const styles = Array.from(document.querySelectorAll('body style[data-oncss]'));\n styles.forEach((style) => {\n head.appendChild(style);\n });\n }, [])\n\n return (\n <ThemeProvider\n ref={ref}\n theme={theme}\n {...props}\n classNames={[appRootClassName]}\n >\n <BreakpointProvider>\n {children}\n </BreakpointProvider>\n </ThemeProvider>\n )\n})\n\nexport default AppRoot\n\n"],"names":["React","_jsx"],"mappings":"4fASA,WAAW,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,iBAAiB,EAAE,CAAC;AACnD,WAAW,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC;AAMjD,MAAM,gBAAgB,GAAG,cAAc;AAChC,MAAM,cAAc,GAAG,MAAM,QAAQ,CAAC,aAAa,CAAC,CAAA,CAAA,EAAI,gBAAgB,CAAA,CAAE;AAEjF,MAAM,OAAO,GAAGA,cAAK,CAAC,UAAU,CAAC,CAAqC,EAA8D,EAAE,GAAmB,KAAI;QAAvF,EAAE,QAAQ,EAAE,cAAc,EAAE,KAAK,OAA6B,EAAxB,KAAK,GAAA,MAAA,CAAA,EAAA,EAA3C,CAAA,UAAA,EAAA,gBAAA,EAAA,OAAA,CAA6C,CAAF;I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AAgB,CAAC,CAAA,CAAA,EAAI,gBAAgB,CAAA,CAAE,CAAC;QAC9D,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;AAC3B,YAAA,MAAM,IAAI,KAAK,CAAC,sIAAsI,CAAC;QAC1J;;QAIA,IAAI,OAAO,MAAM,KAAK,WAAW;YAAE;QACnC,MAAM,IAAI,GAAG,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACrD,QAAA,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;AAC9E,QAAA,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,KAAI;AACtB,YAAA,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAC1B,QAAA,CAAC,CAAC;IACL,CAAC,EAAE,EAAE,CAAC;IAEN,QACGC,GAAA,CAAC,aAAa,EAAA,MAAA,CAAA,MAAA,CAAA,EACX,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EAAA,EACR,KAAK,EAAA,EACT,UAAU,EAAE,CAAC,gBAAgB,CAAC,EAAA,QAAA,EAE9BA,GAAA,CAAC,kBAAkB,EAAA,EAAA,QAAA,EACf,QAAQ,EAAA,CACS,EAAA,CAAA,CACR;AAEtB,CAAC"}
|
package/hooks/usePortal.d.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
type UsePortalOptions = {
|
|
4
|
+
container?: HTMLElement;
|
|
5
|
+
autoMount?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare function usePortal(children: React__default.ReactNode, options?: UsePortalOptions): {
|
|
4
8
|
isMount: () => boolean;
|
|
5
9
|
mount: () => void;
|
|
6
10
|
unmount: () => void;
|
|
7
11
|
};
|
|
8
12
|
|
|
9
13
|
export { usePortal as default, usePortal };
|
|
14
|
+
export type { UsePortalOptions };
|
package/hooks/usePortal.js
CHANGED
|
@@ -1,52 +1,57 @@
|
|
|
1
|
-
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var jsxRuntime=require('react/jsx-runtime'),React=require('react'),client=require('react-dom/client');require('../theme/ThemeDefaultOptions.js');var core=require('../theme/core.js');require('../css/getValue.js'),require('oncss');var ThemeProvider=require('../theme/ThemeProvider.js');require('react-state-bucket');function usePortal(children) {
|
|
2
|
-
|
|
1
|
+
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var jsxRuntime=require('react/jsx-runtime'),React=require('react'),client=require('react-dom/client');require('../theme/ThemeDefaultOptions.js');var core=require('../theme/core.js');require('../css/getValue.js'),require('oncss');var ThemeProvider=require('../theme/ThemeProvider.js');require('react-state-bucket');var index=require('../AppRoot/index.js');function usePortal(children, options) {
|
|
2
|
+
options = options || {};
|
|
3
|
+
if (options.autoMount === undefined) {
|
|
4
|
+
options.autoMount = true;
|
|
5
|
+
}
|
|
6
|
+
const [mounted, setMounted] = React.useState(options.autoMount);
|
|
3
7
|
const theme = core.useTheme();
|
|
4
8
|
const { el, root } = React.useMemo(() => {
|
|
5
9
|
const el = document.createElement("div");
|
|
6
10
|
const root = client.createRoot(el);
|
|
7
11
|
return { el, root };
|
|
8
|
-
}, []);
|
|
9
|
-
const render = () => root.render(jsxRuntime.jsx(ThemeProvider.default, { theme: theme.name, children: children }));
|
|
12
|
+
}, [options.autoMount]);
|
|
10
13
|
const container = () => {
|
|
11
|
-
const
|
|
12
|
-
if (!container) {
|
|
13
|
-
throw new Error(
|
|
14
|
+
const rootEle = index.appRootElement();
|
|
15
|
+
if ((options === null || options === void 0 ? void 0 : options.container) && !rootEle.contains(options.container)) {
|
|
16
|
+
throw new Error(`Provided container is not a child of AppRoot. Please ensure that the container is within the AppRoot component.`);
|
|
14
17
|
}
|
|
18
|
+
const container = (options === null || options === void 0 ? void 0 : options.container) || rootEle;
|
|
19
|
+
if (!container)
|
|
20
|
+
throw new Error(`Container not found for portal. Please ensure that AppRoot is present in the application tree.`);
|
|
15
21
|
return container;
|
|
16
22
|
};
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
if (!
|
|
20
|
-
|
|
23
|
+
const mount = () => {
|
|
24
|
+
const cont = container();
|
|
25
|
+
if (!cont.contains(el)) {
|
|
26
|
+
cont.appendChild(el);
|
|
21
27
|
}
|
|
28
|
+
root.render(jsxRuntime.jsx(ThemeProvider.default, { theme: theme.name, children: children }));
|
|
29
|
+
};
|
|
30
|
+
const unmount = () => {
|
|
31
|
+
root.render(null);
|
|
32
|
+
el.remove();
|
|
22
33
|
};
|
|
23
34
|
React.useEffect(() => {
|
|
24
|
-
if (
|
|
25
|
-
|
|
26
|
-
render();
|
|
27
|
-
}
|
|
35
|
+
if (mounted) {
|
|
36
|
+
mount();
|
|
28
37
|
}
|
|
29
38
|
else {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
39
|
+
unmount();
|
|
40
|
+
}
|
|
41
|
+
}, [mounted]);
|
|
42
|
+
React.useEffect(() => {
|
|
43
|
+
if (mounted) {
|
|
44
|
+
mount();
|
|
33
45
|
}
|
|
34
46
|
}, [children]);
|
|
35
47
|
React.useEffect(() => {
|
|
36
48
|
return () => {
|
|
37
|
-
|
|
38
|
-
el.remove();
|
|
49
|
+
unmount();
|
|
39
50
|
};
|
|
40
51
|
}, []);
|
|
41
52
|
return {
|
|
42
|
-
isMount: () =>
|
|
43
|
-
mount: () =>
|
|
44
|
-
|
|
45
|
-
render();
|
|
46
|
-
},
|
|
47
|
-
unmount: () => {
|
|
48
|
-
root.render(null);
|
|
49
|
-
el.remove();
|
|
50
|
-
}
|
|
53
|
+
isMount: () => mounted,
|
|
54
|
+
mount: () => setMounted(true),
|
|
55
|
+
unmount: () => setMounted(false)
|
|
51
56
|
};
|
|
52
57
|
}exports.default=usePortal;exports.usePortal=usePortal;//# sourceMappingURL=usePortal.js.map
|
package/hooks/usePortal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePortal.js","sources":["../../src/hooks/usePortal.tsx"],"sourcesContent":["import React, { useEffect, useMemo } from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport { ThemeProvider, useTheme } from \"../theme\";\n\nexport function usePortal(children: React.ReactNode) {\n const [
|
|
1
|
+
{"version":3,"file":"usePortal.js","sources":["../../src/hooks/usePortal.tsx"],"sourcesContent":["import React, { useEffect, useMemo } from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport { ThemeProvider, useTheme } from \"../theme\";\nimport { appRootElement } from \"../AppRoot\";\n\nexport type UsePortalOptions = {\n container?: HTMLElement;\n autoMount?: boolean;\n}\n\nexport function usePortal(children: React.ReactNode, options?: UsePortalOptions) {\n options = options || {};\n if (options.autoMount === undefined) {\n options.autoMount = true;\n }\n const [mounted, setMounted] = React.useState(options.autoMount);\n const theme = useTheme();\n const { el, root } = useMemo(() => {\n const el = document.createElement(\"div\");\n const root = createRoot(el);\n return { el, root };\n }, [options.autoMount]);\n\n const container = () => {\n const rootEle = appRootElement();\n if (options?.container && !rootEle.contains(options.container)) {\n throw new Error(`Provided container is not a child of AppRoot. Please ensure that the container is within the AppRoot component.`);\n }\n const container = options?.container || rootEle\n if (!container) throw new Error(`Container not found for portal. Please ensure that AppRoot is present in the application tree.`);\n return container;\n }\n\n const mount = () => {\n const cont = container();\n if (!cont.contains(el)) {\n cont.appendChild(el);\n }\n root.render(<ThemeProvider theme={theme.name}>{children}</ThemeProvider>)\n }\n\n const unmount = () => {\n root.render(null)\n el.remove();\n }\n\n\n useEffect(() => {\n if (mounted) {\n mount()\n } else {\n unmount()\n }\n }, [mounted]);\n\n useEffect(() => {\n if (mounted) {\n mount()\n }\n }, [children]);\n\n useEffect(() => {\n return () => {\n unmount()\n };\n }, []);\n\n return {\n isMount: () => mounted,\n mount: () => setMounted(true),\n unmount: () => setMounted(false)\n }\n}\n\n\nexport default usePortal;"],"names":["useTheme","useMemo","createRoot","appRootElement","_jsx","Th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A,CAAC;IAED,MAAM,KAAK,GAAG,MAAK;AAChB,QAAA,MAAM,IAAI,GAAG,SAAS,EAAE;QACxB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE;AACrB,YAAA,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;QACvB;AACA,QAAA,IAAI,CAAC,MAAM,CAACC,cAAA,CAACC,qBAAa,EAAA,EAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAA,QAAA,EAAG,QAAQ,EAAA,CAAiB,CAAC;AAC5E,IAAA,CAAC;IAED,MAAM,OAAO,GAAG,MAAK;AAClB,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;QACjB,EAAE,CAAC,MAAM,EAAE;AACd,IAAA,CAAC;IAGDC,eAAS,CAAC,MAAK;QACZ,IAAI,OAAO,EAAE;AACV,YAAA,KAAK,EAAE;QACV;aAAO;AACJ,YAAA,OAAO,EAAE;QACZ;AACH,IAAA,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;IAEbA,eAAS,CAAC,MAAK;QACZ,IAAI,OAAO,EAAE;AACV,YAAA,KAAK,EAAE;QACV;AACH,IAAA,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IAEdA,eAAS,CAAC,MAAK;AACZ,QAAA,OAAO,MAAK;AACT,YAAA,OAAO,EAAE;AACZ,QAAA,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC;IAEN,OAAO;AACJ,QAAA,OAAO,EAAE,MAAM,OAAO;AACtB,QAAA,KAAK,EAAE,MAAM,UAAU,CAAC,IAAI,CAAC;AAC7B,QAAA,OAAO,EAAE,MAAM,UAAU,CAAC,KAAK;KACjC;AACJ"}
|
package/hooks/usePortal.mjs
CHANGED
|
@@ -1,52 +1,57 @@
|
|
|
1
|
-
import {jsx}from'react/jsx-runtime';import React__default,{useMemo,useEffect}from'react';import {createRoot}from'react-dom/client';import'../theme/ThemeDefaultOptions.mjs';import {useTheme}from'../theme/core.mjs';import'../css/getValue.mjs';import'oncss';import ThemeProvider from'../theme/ThemeProvider.mjs';import'react-state-bucket';function usePortal(children) {
|
|
2
|
-
|
|
1
|
+
import {jsx}from'react/jsx-runtime';import React__default,{useMemo,useEffect}from'react';import {createRoot}from'react-dom/client';import'../theme/ThemeDefaultOptions.mjs';import {useTheme}from'../theme/core.mjs';import'../css/getValue.mjs';import'oncss';import ThemeProvider from'../theme/ThemeProvider.mjs';import'react-state-bucket';import {appRootElement}from'../AppRoot/index.mjs';function usePortal(children, options) {
|
|
2
|
+
options = options || {};
|
|
3
|
+
if (options.autoMount === undefined) {
|
|
4
|
+
options.autoMount = true;
|
|
5
|
+
}
|
|
6
|
+
const [mounted, setMounted] = React__default.useState(options.autoMount);
|
|
3
7
|
const theme = useTheme();
|
|
4
8
|
const { el, root } = useMemo(() => {
|
|
5
9
|
const el = document.createElement("div");
|
|
6
10
|
const root = createRoot(el);
|
|
7
11
|
return { el, root };
|
|
8
|
-
}, []);
|
|
9
|
-
const render = () => root.render(jsx(ThemeProvider, { theme: theme.name, children: children }));
|
|
12
|
+
}, [options.autoMount]);
|
|
10
13
|
const container = () => {
|
|
11
|
-
const
|
|
12
|
-
if (!container) {
|
|
13
|
-
throw new Error(
|
|
14
|
+
const rootEle = appRootElement();
|
|
15
|
+
if ((options === null || options === void 0 ? void 0 : options.container) && !rootEle.contains(options.container)) {
|
|
16
|
+
throw new Error(`Provided container is not a child of AppRoot. Please ensure that the container is within the AppRoot component.`);
|
|
14
17
|
}
|
|
18
|
+
const container = (options === null || options === void 0 ? void 0 : options.container) || rootEle;
|
|
19
|
+
if (!container)
|
|
20
|
+
throw new Error(`Container not found for portal. Please ensure that AppRoot is present in the application tree.`);
|
|
15
21
|
return container;
|
|
16
22
|
};
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
if (!
|
|
20
|
-
|
|
23
|
+
const mount = () => {
|
|
24
|
+
const cont = container();
|
|
25
|
+
if (!cont.contains(el)) {
|
|
26
|
+
cont.appendChild(el);
|
|
21
27
|
}
|
|
28
|
+
root.render(jsx(ThemeProvider, { theme: theme.name, children: children }));
|
|
29
|
+
};
|
|
30
|
+
const unmount = () => {
|
|
31
|
+
root.render(null);
|
|
32
|
+
el.remove();
|
|
22
33
|
};
|
|
23
34
|
useEffect(() => {
|
|
24
|
-
if (
|
|
25
|
-
|
|
26
|
-
render();
|
|
27
|
-
}
|
|
35
|
+
if (mounted) {
|
|
36
|
+
mount();
|
|
28
37
|
}
|
|
29
38
|
else {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
39
|
+
unmount();
|
|
40
|
+
}
|
|
41
|
+
}, [mounted]);
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
if (mounted) {
|
|
44
|
+
mount();
|
|
33
45
|
}
|
|
34
46
|
}, [children]);
|
|
35
47
|
useEffect(() => {
|
|
36
48
|
return () => {
|
|
37
|
-
|
|
38
|
-
el.remove();
|
|
49
|
+
unmount();
|
|
39
50
|
};
|
|
40
51
|
}, []);
|
|
41
52
|
return {
|
|
42
|
-
isMount: () =>
|
|
43
|
-
mount: () =>
|
|
44
|
-
|
|
45
|
-
render();
|
|
46
|
-
},
|
|
47
|
-
unmount: () => {
|
|
48
|
-
root.render(null);
|
|
49
|
-
el.remove();
|
|
50
|
-
}
|
|
53
|
+
isMount: () => mounted,
|
|
54
|
+
mount: () => setMounted(true),
|
|
55
|
+
unmount: () => setMounted(false)
|
|
51
56
|
};
|
|
52
57
|
}export{usePortal as default,usePortal};//# sourceMappingURL=usePortal.mjs.map
|
package/hooks/usePortal.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePortal.mjs","sources":["../../src/hooks/usePortal.tsx"],"sourcesContent":["import React, { useEffect, useMemo } from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport { ThemeProvider, useTheme } from \"../theme\";\n\nexport function usePortal(children: React.ReactNode) {\n const [
|
|
1
|
+
{"version":3,"file":"usePortal.mjs","sources":["../../src/hooks/usePortal.tsx"],"sourcesContent":["import React, { useEffect, useMemo } from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport { ThemeProvider, useTheme } from \"../theme\";\nimport { appRootElement } from \"../AppRoot\";\n\nexport type UsePortalOptions = {\n container?: HTMLElement;\n autoMount?: boolean;\n}\n\nexport function usePortal(children: React.ReactNode, options?: UsePortalOptions) {\n options = options || {};\n if (options.autoMount === undefined) {\n options.autoMount = true;\n }\n const [mounted, setMounted] = React.useState(options.autoMount);\n const theme = useTheme();\n const { el, root } = useMemo(() => {\n const el = document.createElement(\"div\");\n const root = createRoot(el);\n return { el, root };\n }, [options.autoMount]);\n\n const container = () => {\n const rootEle = appRootElement();\n if (options?.container && !rootEle.contains(options.container)) {\n throw new Error(`Provided container is not a child of AppRoot. Please ensure that the container is within the AppRoot component.`);\n }\n const container = options?.container || rootEle\n if (!container) throw new Error(`Container not found for portal. Please ensure that AppRoot is present in the application tree.`);\n return container;\n }\n\n const mount = () => {\n const cont = container();\n if (!cont.contains(el)) {\n cont.appendChild(el);\n }\n root.render(<ThemeProvider theme={theme.name}>{children}</ThemeProvider>)\n }\n\n const unmount = () => {\n root.render(null)\n el.remove();\n }\n\n\n useEffect(() => {\n if (mounted) {\n mount()\n } else {\n unmount()\n }\n }, [mounted]);\n\n useEffect(() => {\n if (mounted) {\n mount()\n }\n }, [children]);\n\n useEffect(() => {\n return () => {\n unmount()\n };\n }, []);\n\n return {\n isMount: () => mounted,\n mount: () => setMounted(true),\n unmount: () => setMounted(false)\n }\n}\n\n\nexport default usePortal;"],"names":["React","_jsx"],"mappings":"kYAUM,SAAU,SAAS,CAAC,QAAyB,EAAE,OAA0B,EAAA;AAC5E,IAAA,OAAO,GAAG,OAAO,IAAI,EAAE;AACvB,IAAA,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS,EAAE;AAClC,QAAA,OAAO,CAAC,SAAS,GAAG,IAAI;IAC3B;AACA,IAAA,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAGA,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AC,IAAI,EAAA,QAAA,EAAG,QAAQ,EAAA,CAAiB,CAAC;AAC5E,IAAA,CAAC;IAED,MAAM,OAAO,GAAG,MAAK;AAClB,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;QACjB,EAAE,CAAC,MAAM,EAAE;AACd,IAAA,CAAC;IAGD,SAAS,CAAC,MAAK;QACZ,IAAI,OAAO,EAAE;AACV,YAAA,KAAK,EAAE;QACV;aAAO;AACJ,YAAA,OAAO,EAAE;QACZ;AACH,IAAA,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;IAEb,SAAS,CAAC,MAAK;QACZ,IAAI,OAAO,EAAE;AACV,YAAA,KAAK,EAAE;QACV;AACH,IAAA,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IAEd,SAAS,CAAC,MAAK;AACZ,QAAA,OAAO,MAAK;AACT,YAAA,OAAO,EAAE;AACZ,QAAA,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC;IAEN,OAAO;AACJ,QAAA,OAAO,EAAE,MAAM,OAAO;AACtB,QAAA,KAAK,EAAE,MAAM,UAAU,CAAC,IAAI,CAAC;AAC7B,QAAA,OAAO,EAAE,MAAM,UAAU,CAAC,KAAK;KACjC;AACJ"}
|
package/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { default as isWindow } from './isWindow.js';
|
|
|
9
9
|
export { default as useInterface } from './hooks/useInterface.js';
|
|
10
10
|
export { default as Transition, TransitionElementProps, TransitionProps, TransitionState, TransitionVariantTypes } from './Transition/index.js';
|
|
11
11
|
export { default as useScrollbar } from './hooks/useScrollbar.js';
|
|
12
|
-
export { default as AppRoot, AppRootProps } from './AppRoot/index.js';
|
|
12
|
+
export { default as AppRoot, AppRootProps, appRootElement } from './AppRoot/index.js';
|
|
13
13
|
export { default as usePortal } from './hooks/usePortal.js';
|
|
14
14
|
export { adjustColor, adjustTextContrast, alpha, breakpoints, css } from './css/index.js';
|
|
15
15
|
export { themeRootClass } from './theme/index.js';
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var index$1=require('./Tag/index.js'),useTagProps=require('./Tag/useTagProps.js'),useAnimation=require('./hooks/useAnimation.js'),useColorTemplate=require('./hooks/useColorTemplate.js'),useBreakpoint=require('./breakpoint/useBreakpoint.js'),useBreakpointProps=require('./breakpoint/useBreakpointProps.js'),RenderServerStyles=require('./RenderServerStyles.js'),isWindow=require('./isWindow.js'),useInterface=require('./hooks/useInterface.js'),index$2=require('./Transition/index.js'),useScrollbar=require('./hooks/useScrollbar.js'),index=require('./AppRoot/index.js'),usePortal=require('./hooks/usePortal.js'),index$3=require('./css/index.js'),index$4=require('./theme/index.js'),getValue=require('./css/getValue.js'),getProps=require('./css/getProps.js'),ThemeProvider=require('./theme/ThemeProvider.js'),createThemeSwitcher=require('./theme/createThemeSwitcher.js'),createTheme=require('./theme/createTheme.js'),core=require('./theme/core.js');exports.Tag=index$1.default;exports.useTagProps=useTagProps.default;exports.animationEases=useAnimation.animationEases;exports.useAnimation=useAnimation.default;exports.useColorTemplate=useColorTemplate.default;exports.useBreakpoint=useBreakpoint.default;exports.useBreakpointProps=useBreakpointProps.default;exports.RenderServerStyles=RenderServerStyles.default;exports.isWindow=isWindow.default;exports.useInterface=useInterface.default;exports.Transition=index$2.default;exports.useScrollbar=useScrollbar.default;exports.AppRoot=index.default;exports.usePortal=usePortal.usePortal;exports.adjustColor=index$3.adjustColor;exports.adjustTextContrast=index$3.adjustTextContrast;exports.alpha=index$3.alpha;exports.breakpoints=index$3.breakpoints;exports.css=index$3.css;exports.themeRootClass=index$4.themeRootClass;exports.getValue=getValue.default;exports.getProps=getProps.default;exports.ThemeProvider=ThemeProvider.default;exports.createThemeSwitcher=createThemeSwitcher.default;exports.createTheme=createTheme.createTheme;exports.getTheme=core.getTheme;exports.useTheme=core.useTheme;//# sourceMappingURL=index.js.map
|
|
1
|
+
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var index$1=require('./Tag/index.js'),useTagProps=require('./Tag/useTagProps.js'),useAnimation=require('./hooks/useAnimation.js'),useColorTemplate=require('./hooks/useColorTemplate.js'),useBreakpoint=require('./breakpoint/useBreakpoint.js'),useBreakpointProps=require('./breakpoint/useBreakpointProps.js'),RenderServerStyles=require('./RenderServerStyles.js'),isWindow=require('./isWindow.js'),useInterface=require('./hooks/useInterface.js'),index$2=require('./Transition/index.js'),useScrollbar=require('./hooks/useScrollbar.js'),index=require('./AppRoot/index.js'),usePortal=require('./hooks/usePortal.js'),index$3=require('./css/index.js'),index$4=require('./theme/index.js'),getValue=require('./css/getValue.js'),getProps=require('./css/getProps.js'),ThemeProvider=require('./theme/ThemeProvider.js'),createThemeSwitcher=require('./theme/createThemeSwitcher.js'),createTheme=require('./theme/createTheme.js'),core=require('./theme/core.js');exports.Tag=index$1.default;exports.useTagProps=useTagProps.default;exports.animationEases=useAnimation.animationEases;exports.useAnimation=useAnimation.default;exports.useColorTemplate=useColorTemplate.default;exports.useBreakpoint=useBreakpoint.default;exports.useBreakpointProps=useBreakpointProps.default;exports.RenderServerStyles=RenderServerStyles.default;exports.isWindow=isWindow.default;exports.useInterface=useInterface.default;exports.Transition=index$2.default;exports.useScrollbar=useScrollbar.default;exports.AppRoot=index.default;exports.appRootElement=index.appRootElement;exports.usePortal=usePortal.usePortal;exports.adjustColor=index$3.adjustColor;exports.adjustTextContrast=index$3.adjustTextContrast;exports.alpha=index$3.alpha;exports.breakpoints=index$3.breakpoints;exports.css=index$3.css;exports.themeRootClass=index$4.themeRootClass;exports.getValue=getValue.default;exports.getProps=getProps.default;exports.ThemeProvider=ThemeProvider.default;exports.createThemeSwitcher=createThemeSwitcher.default;exports.createTheme=createTheme.createTheme;exports.getTheme=core.getTheme;exports.useTheme=core.useTheme;//# sourceMappingURL=index.js.map
|
package/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{default as Tag}from'./Tag/index.mjs';export{default as useTagProps}from'./Tag/useTagProps.mjs';export{animationEases,default as useAnimation}from'./hooks/useAnimation.mjs';export{default as useColorTemplate}from'./hooks/useColorTemplate.mjs';export{default as useBreakpoint}from'./breakpoint/useBreakpoint.mjs';export{default as useBreakpointProps}from'./breakpoint/useBreakpointProps.mjs';export{default as RenderServerStyles}from'./RenderServerStyles.mjs';export{default as isWindow}from'./isWindow.mjs';export{default as useInterface}from'./hooks/useInterface.mjs';export{default as Transition}from'./Transition/index.mjs';export{default as useScrollbar}from'./hooks/useScrollbar.mjs';export{default as AppRoot}from'./AppRoot/index.mjs';export{usePortal}from'./hooks/usePortal.mjs';export{adjustColor,adjustTextContrast,alpha,breakpoints,css}from'./css/index.mjs';export{themeRootClass}from'./theme/index.mjs';export{default as getValue}from'./css/getValue.mjs';export{default as getProps}from'./css/getProps.mjs';export{default as ThemeProvider}from'./theme/ThemeProvider.mjs';export{default as createThemeSwitcher}from'./theme/createThemeSwitcher.mjs';export{createTheme}from'./theme/createTheme.mjs';export{getTheme,useTheme}from'./theme/core.mjs';//# sourceMappingURL=index.mjs.map
|
|
1
|
+
export{default as Tag}from'./Tag/index.mjs';export{default as useTagProps}from'./Tag/useTagProps.mjs';export{animationEases,default as useAnimation}from'./hooks/useAnimation.mjs';export{default as useColorTemplate}from'./hooks/useColorTemplate.mjs';export{default as useBreakpoint}from'./breakpoint/useBreakpoint.mjs';export{default as useBreakpointProps}from'./breakpoint/useBreakpointProps.mjs';export{default as RenderServerStyles}from'./RenderServerStyles.mjs';export{default as isWindow}from'./isWindow.mjs';export{default as useInterface}from'./hooks/useInterface.mjs';export{default as Transition}from'./Transition/index.mjs';export{default as useScrollbar}from'./hooks/useScrollbar.mjs';export{default as AppRoot,appRootElement}from'./AppRoot/index.mjs';export{usePortal}from'./hooks/usePortal.mjs';export{adjustColor,adjustTextContrast,alpha,breakpoints,css}from'./css/index.mjs';export{themeRootClass}from'./theme/index.mjs';export{default as getValue}from'./css/getValue.mjs';export{default as getProps}from'./css/getProps.mjs';export{default as ThemeProvider}from'./theme/ThemeProvider.mjs';export{default as createThemeSwitcher}from'./theme/createThemeSwitcher.mjs';export{createTheme}from'./theme/createTheme.mjs';export{getTheme,useTheme}from'./theme/core.mjs';//# sourceMappingURL=index.mjs.map
|