@xanui/core 1.2.4 → 1.2.5
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.js +1 -1
- package/AppRoot/index.js.map +1 -1
- package/AppRoot/index.mjs +1 -1
- package/AppRoot/index.mjs.map +1 -1
- package/Tag/useTagProps.d.ts +1 -1
- package/Tag/useTagProps.js +8 -8
- package/Tag/useTagProps.js.map +1 -1
- package/Tag/useTagProps.mjs +8 -8
- package/Tag/useTagProps.mjs.map +1 -1
- package/package.json +1 -1
- package/theme/ThemeProvider.js +1 -1
- package/theme/ThemeProvider.js.map +1 -1
- package/theme/ThemeProvider.mjs +1 -1
- package/theme/ThemeProvider.mjs.map +1 -1
package/AppRoot/index.js
CHANGED
package/AppRoot/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/AppRoot/index.tsx"],"sourcesContent":["\r\nimport React, { useEffect, useMemo } from 'react';\r\nimport { TagComponentType } from '../Tag/types';\r\nimport { ThemeProvider, ThemeProviderProps, themeRootClass } from '../theme';\r\nimport { BreakpointProvider } from '../breakpoint';\r\nimport useScrollbar from '../hooks/useScrollbar';\r\nimport { css } from '../css';\r\nimport { RenderRenderar } from './Renderar';\r\n\r\n\r\n\r\nexport type AppRootProps<T extends TagComponentType = \"div\"> = ThemeProviderProps<T> & {\r\n noScrollbarCss?: boolean;\r\n}\r\n\r\nconst appRootClassName = \"xui-app-root\"\r\nexport const appRootElement = () => document.querySelector(`.${appRootClassName}`) as HTMLDivElement;\r\n\r\nconst AppRoot = React.forwardRef(<T extends TagComponentType = \"div\">({ children, noScrollbarCss, theme, ...props }: AppRootProps<T>, ref: React.Ref<any>) => {\r\n noScrollbarCss ??= false\r\n const [visibility, setVisibility] = React.useState<string>(\"hidden\");\r\n\r\n const scrollbarCss: any = useMemo(() => {\r\n if (noScrollbarCss) return;\r\n return useScrollbar({\r\n themeName: theme,\r\n root_cls: themeRootClass(theme)\r\n })\r\n }, [noScrollbarCss, theme])\r\n\r\n const globalStyle = useMemo(() => {\r\n return css({\r\n \"@global\": {\r\n \"*\": {\r\n m: 0,\r\n p: 0,\r\n outline: \"none\",\r\n boxSizing: \"border-box\",\r\n verticalAlign: \"baseline\",\r\n },\r\n \"html, body\": {\r\n minHeight: \"100%\",\r\n \"-webkit-font-smoothing\": \"antialiased\",\r\n \"-moz-osx-font-smoothing\": \"grayscale\",\r\n } as any,\r\n \"img, picture, video, canvas, svg\": {\r\n maxWidth: \"100%\",\r\n display: \"block\"\r\n },\r\n \"input, button, textarea, select\": {\r\n font: \"inherit\"\r\n },\r\n \"table\": {\r\n borderCollapse: \"collapse\",\r\n borderSpacing: 0,\r\n },\r\n \"ol, ul\": {\r\n listStyle: \"none\",\r\n padding: 0,\r\n margin: 0,\r\n },\r\n \"a\": {\r\n display: \"inline-block\",\r\n color: \"inherit\",\r\n textDecoration: \"none\",\r\n cursor: \"pointer\",\r\n \"&:hover\": {\r\n textDecoration: \"underline\"\r\n }\r\n },\r\n \"p, h1, h2, h3, h4, h5, h6\": {\r\n overflowWrap: \"break-word\",\r\n }
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/AppRoot/index.tsx"],"sourcesContent":["\r\nimport React, { useEffect, useMemo } from 'react';\r\nimport { TagComponentType } from '../Tag/types';\r\nimport { ThemeProvider, ThemeProviderProps, themeRootClass } from '../theme';\r\nimport { BreakpointProvider } from '../breakpoint';\r\nimport useScrollbar from '../hooks/useScrollbar';\r\nimport { css } from '../css';\r\nimport { RenderRenderar } from './Renderar';\r\n\r\n\r\n\r\nexport type AppRootProps<T extends TagComponentType = \"div\"> = ThemeProviderProps<T> & {\r\n noScrollbarCss?: boolean;\r\n}\r\n\r\nconst appRootClassName = \"xui-app-root\"\r\nexport const appRootElement = () => document.querySelector(`.${appRootClassName}`) as HTMLDivElement;\r\n\r\nconst AppRoot = React.forwardRef(<T extends TagComponentType = \"div\">({ children, noScrollbarCss, theme, ...props }: AppRootProps<T>, ref: React.Ref<any>) => {\r\n noScrollbarCss ??= false\r\n const [visibility, setVisibility] = React.useState<string>(\"hidden\");\r\n\r\n const scrollbarCss: any = useMemo(() => {\r\n if (noScrollbarCss) return;\r\n return useScrollbar({\r\n themeName: theme,\r\n root_cls: themeRootClass(theme)\r\n })\r\n }, [noScrollbarCss, theme])\r\n\r\n const globalStyle = useMemo(() => {\r\n return css({\r\n \"@global\": {\r\n \"*\": {\r\n m: 0,\r\n p: 0,\r\n outline: \"none\",\r\n boxSizing: \"border-box\",\r\n verticalAlign: \"baseline\",\r\n },\r\n \"html, body\": {\r\n minHeight: \"100%\",\r\n \"-webkit-font-smoothing\": \"antialiased\",\r\n \"-moz-osx-font-smoothing\": \"grayscale\",\r\n } as any,\r\n \"img, picture, video, canvas, svg\": {\r\n maxWidth: \"100%\",\r\n display: \"block\"\r\n },\r\n \"input, button, textarea, select\": {\r\n font: \"inherit\"\r\n },\r\n \"table\": {\r\n borderCollapse: \"collapse\",\r\n borderSpacing: 0,\r\n },\r\n \"ol, ul\": {\r\n listStyle: \"none\",\r\n padding: 0,\r\n margin: 0,\r\n },\r\n \"a\": {\r\n display: \"inline-block\",\r\n color: \"inherit\",\r\n textDecoration: \"none\",\r\n cursor: \"pointer\",\r\n \"&:hover\": {\r\n textDecoration: \"underline\"\r\n }\r\n },\r\n \"p, h1, h2, h3, h4, h5, h6\": {\r\n overflowWrap: \"break-word\",\r\n },\r\n }\r\n }, {\r\n injectStyle: typeof window !== 'undefined'\r\n })\r\n }, [])\r\n\r\n useEffect(() => {\r\n\r\n const root = document.querySelectorAll(`.${appRootClassName}`)\r\n if (!root || root.length > 1) {\r\n throw new Error(\"Multiple AppRoot detected in the application tree. Please ensure that there is only one AppRoot component wrapping your application.\");\r\n }\r\n\r\n setVisibility(\"visible\");\r\n\r\n // move oncss style tags to head\r\n if (typeof window === 'undefined') return;\r\n const head = document.getElementsByTagName('head')[0];\r\n const styles = Array.from(document.querySelectorAll('body style[data-oncss]'));\r\n styles.forEach((style) => {\r\n head.appendChild(style);\r\n });\r\n\r\n }, [])\r\n\r\n return (\r\n <ThemeProvider\r\n ref={ref}\r\n theme={theme}\r\n {...props}\r\n sx={{\r\n ...props.sx,\r\n ...(visibility === \"hidden\" ? { visibility: \"hidden\" } : {})\r\n }}\r\n classNames={[appRootClassName]}\r\n >\r\n {\r\n typeof window === 'undefined' && <>\r\n <style\r\n precedence={globalStyle.classname}\r\n href={globalStyle.classname}\r\n dangerouslySetInnerHTML={{ __html: globalStyle.css }}\r\n />\r\n {\r\n scrollbarCss && <style\r\n precedence={scrollbarCss.classname}\r\n href={scrollbarCss.classname}\r\n dangerouslySetInnerHTML={{ __html: scrollbarCss.css }}\r\n />\r\n }\r\n </>\r\n }\r\n <BreakpointProvider>\r\n {children}\r\n <RenderRenderar />\r\n </BreakpointProvider>\r\n </ThemeProvider>\r\n )\r\n})\r\n\r\nexport default AppRoot\r\n\r\n"],"names":["__rest","useMemo","useScrollbar","themeRootClass","css","useEffect","_jsxs","ThemeProvider","_Fragment","_jsx","BreakpointProvider","RenderRenderar"],"mappings":"8aAeA,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,GAAAA,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;AACxB,IAAA,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAS,QAAQ,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/D,UAAU,EAAE,CAAC,gBAAgB,CAAC,EAAA,QAAA,EAAA,CAG3B,OAAO,MAAM,KAAK,WAAW,IAAID,eAAA,CAAAE,mBAAA,EAAA,EAAA,QAAA,EAAA,CAC9BC,cAAA,CAAA,OAAA,EAAA,EACG,UAAU,EAAE,WAAW,CAAC,SAAS,EACjC,IAAI,EAAE,WAAW,CAAC,SAAS,EAC3B,uBAAuB,EAAE,EAAE,MAAM,EAAE,WAAW,CAAC,GAAG,EAAE,EAAA,CACrD,EAEC,YAAY,IAAIA,cAAA,CAAA,OAAA,EAAA,EACb,UAAU,EAAE,YAAY,CAAC,SAAS,EAClC,IAAI,EAAE,YAAY,CAAC,SAAS,EAC5B,uBAAuB,EAAE,EAAE,MAAM,EAAE,YAAY,CAAC,GAAG,EAAE,EAAA,CACtD,IAEL,EAENH,eAAA,CAACI,qCAAkB,EAAA,EAAA,QAAA,EAAA,CACf,QAAQ,EACTD,cAAA,CAACE,uBAAc,EAAA,EAAA,CAAG,CAAA,EAAA,CACA,CAAA,EAAA,CAAA,CACR;AAEtB,CAAC"}
|
package/AppRoot/index.mjs
CHANGED
package/AppRoot/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/AppRoot/index.tsx"],"sourcesContent":["\r\nimport React, { useEffect, useMemo } from 'react';\r\nimport { TagComponentType } from '../Tag/types';\r\nimport { ThemeProvider, ThemeProviderProps, themeRootClass } from '../theme';\r\nimport { BreakpointProvider } from '../breakpoint';\r\nimport useScrollbar from '../hooks/useScrollbar';\r\nimport { css } from '../css';\r\nimport { RenderRenderar } from './Renderar';\r\n\r\n\r\n\r\nexport type AppRootProps<T extends TagComponentType = \"div\"> = ThemeProviderProps<T> & {\r\n noScrollbarCss?: boolean;\r\n}\r\n\r\nconst appRootClassName = \"xui-app-root\"\r\nexport const appRootElement = () => document.querySelector(`.${appRootClassName}`) as HTMLDivElement;\r\n\r\nconst AppRoot = React.forwardRef(<T extends TagComponentType = \"div\">({ children, noScrollbarCss, theme, ...props }: AppRootProps<T>, ref: React.Ref<any>) => {\r\n noScrollbarCss ??= false\r\n const [visibility, setVisibility] = React.useState<string>(\"hidden\");\r\n\r\n const scrollbarCss: any = useMemo(() => {\r\n if (noScrollbarCss) return;\r\n return useScrollbar({\r\n themeName: theme,\r\n root_cls: themeRootClass(theme)\r\n })\r\n }, [noScrollbarCss, theme])\r\n\r\n const globalStyle = useMemo(() => {\r\n return css({\r\n \"@global\": {\r\n \"*\": {\r\n m: 0,\r\n p: 0,\r\n outline: \"none\",\r\n boxSizing: \"border-box\",\r\n verticalAlign: \"baseline\",\r\n },\r\n \"html, body\": {\r\n minHeight: \"100%\",\r\n \"-webkit-font-smoothing\": \"antialiased\",\r\n \"-moz-osx-font-smoothing\": \"grayscale\",\r\n } as any,\r\n \"img, picture, video, canvas, svg\": {\r\n maxWidth: \"100%\",\r\n display: \"block\"\r\n },\r\n \"input, button, textarea, select\": {\r\n font: \"inherit\"\r\n },\r\n \"table\": {\r\n borderCollapse: \"collapse\",\r\n borderSpacing: 0,\r\n },\r\n \"ol, ul\": {\r\n listStyle: \"none\",\r\n padding: 0,\r\n margin: 0,\r\n },\r\n \"a\": {\r\n display: \"inline-block\",\r\n color: \"inherit\",\r\n textDecoration: \"none\",\r\n cursor: \"pointer\",\r\n \"&:hover\": {\r\n textDecoration: \"underline\"\r\n }\r\n },\r\n \"p, h1, h2, h3, h4, h5, h6\": {\r\n overflowWrap: \"break-word\",\r\n }
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/AppRoot/index.tsx"],"sourcesContent":["\r\nimport React, { useEffect, useMemo } from 'react';\r\nimport { TagComponentType } from '../Tag/types';\r\nimport { ThemeProvider, ThemeProviderProps, themeRootClass } from '../theme';\r\nimport { BreakpointProvider } from '../breakpoint';\r\nimport useScrollbar from '../hooks/useScrollbar';\r\nimport { css } from '../css';\r\nimport { RenderRenderar } from './Renderar';\r\n\r\n\r\n\r\nexport type AppRootProps<T extends TagComponentType = \"div\"> = ThemeProviderProps<T> & {\r\n noScrollbarCss?: boolean;\r\n}\r\n\r\nconst appRootClassName = \"xui-app-root\"\r\nexport const appRootElement = () => document.querySelector(`.${appRootClassName}`) as HTMLDivElement;\r\n\r\nconst AppRoot = React.forwardRef(<T extends TagComponentType = \"div\">({ children, noScrollbarCss, theme, ...props }: AppRootProps<T>, ref: React.Ref<any>) => {\r\n noScrollbarCss ??= false\r\n const [visibility, setVisibility] = React.useState<string>(\"hidden\");\r\n\r\n const scrollbarCss: any = useMemo(() => {\r\n if (noScrollbarCss) return;\r\n return useScrollbar({\r\n themeName: theme,\r\n root_cls: themeRootClass(theme)\r\n })\r\n }, [noScrollbarCss, theme])\r\n\r\n const globalStyle = useMemo(() => {\r\n return css({\r\n \"@global\": {\r\n \"*\": {\r\n m: 0,\r\n p: 0,\r\n outline: \"none\",\r\n boxSizing: \"border-box\",\r\n verticalAlign: \"baseline\",\r\n },\r\n \"html, body\": {\r\n minHeight: \"100%\",\r\n \"-webkit-font-smoothing\": \"antialiased\",\r\n \"-moz-osx-font-smoothing\": \"grayscale\",\r\n } as any,\r\n \"img, picture, video, canvas, svg\": {\r\n maxWidth: \"100%\",\r\n display: \"block\"\r\n },\r\n \"input, button, textarea, select\": {\r\n font: \"inherit\"\r\n },\r\n \"table\": {\r\n borderCollapse: \"collapse\",\r\n borderSpacing: 0,\r\n },\r\n \"ol, ul\": {\r\n listStyle: \"none\",\r\n padding: 0,\r\n margin: 0,\r\n },\r\n \"a\": {\r\n display: \"inline-block\",\r\n color: \"inherit\",\r\n textDecoration: \"none\",\r\n cursor: \"pointer\",\r\n \"&:hover\": {\r\n textDecoration: \"underline\"\r\n }\r\n },\r\n \"p, h1, h2, h3, h4, h5, h6\": {\r\n overflowWrap: \"break-word\",\r\n },\r\n }\r\n }, {\r\n injectStyle: typeof window !== 'undefined'\r\n })\r\n }, [])\r\n\r\n useEffect(() => {\r\n\r\n const root = document.querySelectorAll(`.${appRootClassName}`)\r\n if (!root || root.length > 1) {\r\n throw new Error(\"Multiple AppRoot detected in the application tree. Please ensure that there is only one AppRoot component wrapping your application.\");\r\n }\r\n\r\n setVisibility(\"visible\");\r\n\r\n // move oncss style tags to head\r\n if (typeof window === 'undefined') return;\r\n const head = document.getElementsByTagName('head')[0];\r\n const styles = Array.from(document.querySelectorAll('body style[data-oncss]'));\r\n styles.forEach((style) => {\r\n head.appendChild(style);\r\n });\r\n\r\n }, [])\r\n\r\n return (\r\n <ThemeProvider\r\n ref={ref}\r\n theme={theme}\r\n {...props}\r\n sx={{\r\n ...props.sx,\r\n ...(visibility === \"hidden\" ? { visibility: \"hidden\" } : {})\r\n }}\r\n classNames={[appRootClassName]}\r\n >\r\n {\r\n typeof window === 'undefined' && <>\r\n <style\r\n precedence={globalStyle.classname}\r\n href={globalStyle.classname}\r\n dangerouslySetInnerHTML={{ __html: globalStyle.css }}\r\n />\r\n {\r\n scrollbarCss && <style\r\n precedence={scrollbarCss.classname}\r\n href={scrollbarCss.classname}\r\n dangerouslySetInnerHTML={{ __html: scrollbarCss.css }}\r\n />\r\n }\r\n </>\r\n }\r\n <BreakpointProvider>\r\n {children}\r\n <RenderRenderar />\r\n </BreakpointProvider>\r\n </ThemeProvider>\r\n )\r\n})\r\n\r\nexport default AppRoot\r\n\r\n"],"names":["React","_jsxs","_Fragment","_jsx"],"mappings":"ibAeA,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;IAC9G,cAAc,KAAA,I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A,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACI,KAAK,CAAC,EAAE,CAAA,GACP,UAAU,KAAK,QAAQ,GAAG,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAC,EAE/D,UAAU,EAAE,CAAC,gBAAgB,CAAC,EAAA,QAAA,EAAA,CAG3B,OAAO,MAAM,KAAK,WAAW,IAAIA,IAAA,CAAAC,QAAA,EAAA,EAAA,QAAA,EAAA,CAC9BC,GAAA,CAAA,OAAA,EAAA,EACG,UAAU,EAAE,WAAW,CAAC,SAAS,EACjC,IAAI,EAAE,WAAW,CAAC,SAAS,EAC3B,uBAAuB,EAAE,EAAE,MAAM,EAAE,WAAW,CAAC,GAAG,EAAE,EAAA,CACrD,EAEC,YAAY,IAAIA,GAAA,CAAA,OAAA,EAAA,EACb,UAAU,EAAE,YAAY,CAAC,SAAS,EAClC,IAAI,EAAE,YAAY,CAAC,SAAS,EAC5B,uBAAuB,EAAE,EAAE,MAAM,EAAE,YAAY,CAAC,GAAG,EAAE,EAAA,CACtD,IAEL,EAENF,IAAA,CAAC,kBAAkB,EAAA,EAAA,QAAA,EAAA,CACf,QAAQ,EACTE,GAAA,CAAC,cAAc,EAAA,EAAA,CAAG,CAAA,EAAA,CACA,CAAA,EAAA,CAAA,CACR;AAEtB,CAAC"}
|
package/Tag/useTagProps.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ type useTagPropsReturn<T extends TagComponentType = "div"> = {
|
|
|
5
5
|
props: TagProps<T>;
|
|
6
6
|
style: CSSFactoryType;
|
|
7
7
|
};
|
|
8
|
-
declare const useTagProps: <T extends TagComponentType = "div">({ baseClass, classNames: clses, ...props }: TagPropsRoot<T>) => useTagPropsReturn<T>;
|
|
8
|
+
declare const useTagProps: <T extends TagComponentType = "div">({ baseClass, classNames: clses, sx, sxr, style, hover, ...props }: TagPropsRoot<T>) => useTagPropsReturn<T>;
|
|
9
9
|
|
|
10
10
|
export { useTagProps as default };
|
|
11
11
|
export type { useTagPropsReturn };
|
package/Tag/useTagProps.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var tslib=require('tslib'),cssPropList=require('./cssPropList.js'),index=require('../css/index.js'),prettyClass=require('pretty-class');const useTagProps = (_a) => {
|
|
2
|
-
var { baseClass, classNames: clses } = _a, props = tslib.__rest(_a, ["baseClass", "classNames"]);
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
var { baseClass, classNames: clses, sx, sxr, style, hover } = _a, props = tslib.__rest(_a, ["baseClass", "classNames", "sx", "sxr", "style", "hover"]);
|
|
3
|
+
const _css = Object.assign(Object.assign(Object.assign(Object.assign({}, (sxr || {})), (sx || {})), (style || {})), props);
|
|
4
|
+
if (hover) {
|
|
5
|
+
_css['&:hover'] = Object.assign(Object.assign({}, (_css['&:hover'] || {})), hover);
|
|
6
6
|
}
|
|
7
|
-
const
|
|
7
|
+
const styles = index.css(_css, {
|
|
8
8
|
skipProps: (prop, _val, dept) => dept === 1 && !cssPropList.default[prop],
|
|
9
9
|
injectStyle: typeof window !== 'undefined',
|
|
10
10
|
});
|
|
11
|
-
let skipProps =
|
|
11
|
+
let skipProps = styles.skiped[styles.classname] || [];
|
|
12
12
|
const _props = {};
|
|
13
13
|
for (let prop of skipProps) {
|
|
14
14
|
_props[prop] = props[prop];
|
|
15
15
|
}
|
|
16
16
|
_props.className = prettyClass.classNames([
|
|
17
17
|
baseClass ? "xui-" + baseClass : "",
|
|
18
|
-
|
|
18
|
+
styles.classname,
|
|
19
19
|
props.className,
|
|
20
20
|
...(clses || []),
|
|
21
21
|
]);
|
|
22
|
-
return { props: _props, style };
|
|
22
|
+
return { props: _props, style: styles };
|
|
23
23
|
};exports.default=useTagProps;//# sourceMappingURL=useTagProps.js.map
|
package/Tag/useTagProps.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTagProps.js","sources":["../../src/Tag/useTagProps.ts"],"sourcesContent":["import { TagComponentType, TagProps, TagPropsRoot } from './types';\r\nimport cssPropList from './cssPropList';\r\nimport { css } from '../css';\r\nimport { classNames } from 'pretty-class';\r\nimport { CSSFactoryType } from 'oncss';\r\n\r\nexport type useTagPropsReturn<T extends TagComponentType = \"div\"> = {\r\n props: TagProps<T>,\r\n style: CSSFactoryType\r\n}\r\n\r\nconst useTagProps = <T extends TagComponentType = \"div\">({ baseClass, classNames: clses, ...props }: TagPropsRoot<T>): useTagPropsReturn<T> => {\r\n\r\n
|
|
1
|
+
{"version":3,"file":"useTagProps.js","sources":["../../src/Tag/useTagProps.ts"],"sourcesContent":["import { TagComponentType, TagProps, TagPropsRoot } from './types';\r\nimport cssPropList from './cssPropList';\r\nimport { css } from '../css';\r\nimport { classNames } from 'pretty-class';\r\nimport { CSSFactoryType } from 'oncss';\r\n\r\nexport type useTagPropsReturn<T extends TagComponentType = \"div\"> = {\r\n props: TagProps<T>,\r\n style: CSSFactoryType\r\n}\r\n\r\nconst useTagProps = <T extends TagComponentType = \"div\">({ baseClass, classNames: clses, sx, sxr, style, hover, ...props }: TagPropsRoot<T>): useTagPropsReturn<T> => {\r\n const _css: any = {\r\n ...(sxr || {}),\r\n ...(sx || {}),\r\n ...(style || {}),\r\n ...props\r\n }\r\n\r\n if (hover) {\r\n _css['&:hover'] = { ...(_css['&:hover'] || {}), ...hover }\r\n }\r\n\r\n const styles = css(_css, {\r\n skipProps: (prop, _val, dept): any => dept === 1 && !cssPropList[prop],\r\n injectStyle: typeof window !== 'undefined',\r\n })\r\n\r\n let skipProps = styles.skiped[styles.classname as any] || []\r\n const _props: any = {};\r\n for (let prop of skipProps) {\r\n _props[prop] = (props as any)[prop]\r\n }\r\n _props.className = classNames([\r\n baseClass ? \"xui-\" + baseClass : \"\",\r\n styles.classname,\r\n props.className,\r\n ...(clses as any || []),\r\n ])\r\n return { props: _props, style: styles };\r\n}\r\n\r\n\r\nexport default useTagProps"],"names":["__rest","css","cssPropList","classNames"],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AACzB,KAAA,CAAC;IACF,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;AAC1C"}
|
package/Tag/useTagProps.mjs
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {__rest}from'tslib';import CSS_PROP_LIST from'./cssPropList.mjs';import {css}from'../css/index.mjs';import {classNames}from'pretty-class';const useTagProps = (_a) => {
|
|
2
|
-
var { baseClass, classNames: clses } = _a, props = __rest(_a, ["baseClass", "classNames"]);
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
var { baseClass, classNames: clses, sx, sxr, style, hover } = _a, props = __rest(_a, ["baseClass", "classNames", "sx", "sxr", "style", "hover"]);
|
|
3
|
+
const _css = Object.assign(Object.assign(Object.assign(Object.assign({}, (sxr || {})), (sx || {})), (style || {})), props);
|
|
4
|
+
if (hover) {
|
|
5
|
+
_css['&:hover'] = Object.assign(Object.assign({}, (_css['&:hover'] || {})), hover);
|
|
6
6
|
}
|
|
7
|
-
const
|
|
7
|
+
const styles = css(_css, {
|
|
8
8
|
skipProps: (prop, _val, dept) => dept === 1 && !CSS_PROP_LIST[prop],
|
|
9
9
|
injectStyle: typeof window !== 'undefined',
|
|
10
10
|
});
|
|
11
|
-
let skipProps =
|
|
11
|
+
let skipProps = styles.skiped[styles.classname] || [];
|
|
12
12
|
const _props = {};
|
|
13
13
|
for (let prop of skipProps) {
|
|
14
14
|
_props[prop] = props[prop];
|
|
15
15
|
}
|
|
16
16
|
_props.className = classNames([
|
|
17
17
|
baseClass ? "xui-" + baseClass : "",
|
|
18
|
-
|
|
18
|
+
styles.classname,
|
|
19
19
|
props.className,
|
|
20
20
|
...(clses || []),
|
|
21
21
|
]);
|
|
22
|
-
return { props: _props, style };
|
|
22
|
+
return { props: _props, style: styles };
|
|
23
23
|
};export{useTagProps as default};//# sourceMappingURL=useTagProps.mjs.map
|
package/Tag/useTagProps.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTagProps.mjs","sources":["../../src/Tag/useTagProps.ts"],"sourcesContent":["import { TagComponentType, TagProps, TagPropsRoot } from './types';\r\nimport cssPropList from './cssPropList';\r\nimport { css } from '../css';\r\nimport { classNames } from 'pretty-class';\r\nimport { CSSFactoryType } from 'oncss';\r\n\r\nexport type useTagPropsReturn<T extends TagComponentType = \"div\"> = {\r\n props: TagProps<T>,\r\n style: CSSFactoryType\r\n}\r\n\r\nconst useTagProps = <T extends TagComponentType = \"div\">({ baseClass, classNames: clses, ...props }: TagPropsRoot<T>): useTagPropsReturn<T> => {\r\n\r\n
|
|
1
|
+
{"version":3,"file":"useTagProps.mjs","sources":["../../src/Tag/useTagProps.ts"],"sourcesContent":["import { TagComponentType, TagProps, TagPropsRoot } from './types';\r\nimport cssPropList from './cssPropList';\r\nimport { css } from '../css';\r\nimport { classNames } from 'pretty-class';\r\nimport { CSSFactoryType } from 'oncss';\r\n\r\nexport type useTagPropsReturn<T extends TagComponentType = \"div\"> = {\r\n props: TagProps<T>,\r\n style: CSSFactoryType\r\n}\r\n\r\nconst useTagProps = <T extends TagComponentType = \"div\">({ baseClass, classNames: clses, sx, sxr, style, hover, ...props }: TagPropsRoot<T>): useTagPropsReturn<T> => {\r\n const _css: any = {\r\n ...(sxr || {}),\r\n ...(sx || {}),\r\n ...(style || {}),\r\n ...props\r\n }\r\n\r\n if (hover) {\r\n _css['&:hover'] = { ...(_css['&:hover'] || {}), ...hover }\r\n }\r\n\r\n const styles = css(_css, {\r\n skipProps: (prop, _val, dept): any => dept === 1 && !cssPropList[prop],\r\n injectStyle: typeof window !== 'undefined',\r\n })\r\n\r\n let skipProps = styles.skiped[styles.classname as any] || []\r\n const _props: any = {};\r\n for (let prop of skipProps) {\r\n _props[prop] = (props as any)[prop]\r\n }\r\n _props.className = classNames([\r\n baseClass ? \"xui-\" + baseClass : \"\",\r\n styles.classname,\r\n props.className,\r\n ...(clses as any || []),\r\n ])\r\n return { props: _props, style: styles };\r\n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AAA,IAAI,KAAY,IAAI,EAAE,CAAC;AACzB,KAAA,CAAC;IACF,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;AAC1C"}
|
package/package.json
CHANGED
package/theme/ThemeProvider.js
CHANGED
|
@@ -20,7 +20,7 @@ const ThemeProvider = (_a) => {
|
|
|
20
20
|
injectStyle: typeof window !== 'undefined'
|
|
21
21
|
});
|
|
22
22
|
}, [theme]);
|
|
23
|
-
return (jsxRuntime.jsxs(core.ThemeContex.Provider, { value: theme, children: [typeof window === 'undefined' && jsxRuntime.jsx("style", { precedence: globalStyle.classname, href: globalStyle.classname, dangerouslySetInnerHTML: { __html: globalStyle.css } }), jsxRuntime.jsx(index$1.default, Object.assign({ minHeight: "100%", bgcolor: THEME.colors.common.primary, color: THEME.colors.common.text.primary, fontSize: THEME.typography.text.fontSize, fontWeight: THEME.typography.text.fontWeight, lineHeight: THEME.typography.text.lineHeight }, props, { sxr: {
|
|
23
|
+
return (jsxRuntime.jsxs(core.ThemeContex.Provider, { value: theme, children: [typeof window === 'undefined' && jsxRuntime.jsx("style", { precedence: globalStyle.classname, href: globalStyle.classname, dangerouslySetInnerHTML: { __html: globalStyle.css } }), jsxRuntime.jsx(index$1.default, Object.assign({ minHeight: "100%", bgcolor: THEME.colors.common.primary, color: THEME.colors.common.text.primary, fontSize: THEME.typography.text.fontSize, fontWeight: THEME.typography.text.fontWeight, lineHeight: THEME.typography.text.lineHeight, fontFamily: `system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif` }, props, { sxr: {
|
|
24
24
|
"& a": {
|
|
25
25
|
color: THEME.colors.brand.primary || 'inherit',
|
|
26
26
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.js","sources":["../../src/theme/ThemeProvider.tsx"],"sourcesContent":["import * as React from \"react\"\r\nimport { ThemeOptions } from \"./types\"\r\nimport Tag from \"../Tag\"\r\nimport { TagComponentType, TagProps } from \"../Tag/types\"\r\nimport { ThemeContex, ThemeFactory } from \"./core\"\r\nimport ThemeCssVars from \"./ThemeCssVars\"\r\nimport { css } from \"../css\"\r\nimport { createTheme } from \"./createTheme\"\r\nimport { darkThemeOptions, lightThemeOptions } from \"./ThemeDefaultOptions\"\r\n\r\nexport type ThemeProviderProps<T extends TagComponentType = 'div'> = TagProps<T> & {\r\n theme: string;\r\n}\r\n\r\ncreateTheme(\"light\", lightThemeOptions)\r\ncreateTheme(\"dark\", darkThemeOptions)\r\n\r\nconst ThemeProvider = <T extends TagComponentType = 'div'>({ children, theme, ...props }: ThemeProviderProps<T>) => {\r\n let THEME = ThemeFactory.get(theme) as ThemeOptions\r\n if (!THEME) {\r\n console.error(`ThemeProvider: The theme '${theme}' is not defined. Please make sure to use a valid theme name.`)\r\n THEME = ThemeFactory.get(\"light\") as ThemeOptions\r\n }\r\n\r\n const globalStyle: any = React.useMemo(() => {\r\n const root_cls = `.xui-${theme}-theme-root`\r\n let gkeys = Object.keys(THEME.globalStyle || {})\r\n let gstyles: any = {}\r\n gkeys.forEach((key) => {\r\n gstyles[`${root_cls} ${key}`] = THEME.globalStyle[key as any]\r\n })\r\n\r\n return css({\r\n \"@global\": {\r\n ...gstyles,\r\n [root_cls]: ThemeCssVars(THEME)\r\n }\r\n }, {\r\n injectStyle: typeof window !== 'undefined'\r\n })\r\n }, [theme])\r\n\r\n return (\r\n <ThemeContex.Provider value={theme}>\r\n {\r\n typeof window === 'undefined' && <style\r\n precedence={globalStyle.classname}\r\n href={globalStyle.classname}\r\n dangerouslySetInnerHTML={{ __html: globalStyle.css }}\r\n />\r\n }\r\n <Tag\r\n minHeight=\"100%\"\r\n bgcolor={THEME.colors.common.primary}\r\n color={THEME.colors.common.text.primary}\r\n fontSize={THEME.typography.text.fontSize}\r\n fontWeight={THEME.typography.text.fontWeight}\r\n lineHeight={THEME.typography.text.lineHeight}\r\n {...props}\r\n sxr={{\r\n \"& a\": {\r\n color: THEME.colors.brand.primary || 'inherit',\r\n },\r\n }}\r\n baseClass={`${theme}-theme-root`}\r\n direction={THEME.rtl ? \"rtl\" : \"ltr\"}\r\n >\r\n {children}\r\n </Tag>\r\n </ThemeContex.Provider>\r\n )\r\n}\r\n\r\nexport default ThemeProvider"],"names":["createTheme","lightThemeOptions","darkThemeOptions","__rest","ThemeFactory","React","css","ThemeCssVars","_jsxs","ThemeContex","_jsx","Tag"],"mappings":"wuBAcAA,uBAAW,CAAC,OAAO,EAAEC,qCAAiB,CAAC;AACvCD,uBAAW,CAAC,MAAM,EAAEE,oCAAgB,CAAC;AAErC,MAAM,aAAa,GAAG,CAAqC,EAAoD,KAAI;QAAxD,EAAE,QAAQ,EAAE,KAAK,EAAA,GAAA,EAAmC,EAA9B,KAAK,GAAAC,YAAA,CAAA,EAAA,EAA3B,qBAA6B,CAAF;IACnF,IAAI,KAAK,GAAGC,iBAAY,CAAC,GAAG,CAAC,KAAK,CAAiB;IACnD,IAAI,CAAC,KAAK,EAAE;AACT,QAAA,OAAO,CAAC,KAAK,CAAC,6BAA6B,KAAK,CAAA,6DAAA,CAA+D,CAAC;AAChH,QAAA,KAAK,GAAGA,iBAAY,CAAC,GAAG,CAAC,OAAO,CAAiB;IACpD;AAEA,IAAA,MAAM,WAAW,GAAQC,gBAAK,CAAC,OAAO,CAAC,MAAK;AACzC,QAAA,MAAM,QAAQ,GAAG,CAAA,KAAA,EAAQ,KAAK,aAAa;AAC3C,QAAA,IAAI,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,EAAE,CAAC;QAChD,IAAI,OAAO,GAAQ,EAAE;AACrB,QAAA,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,KAAI;AACnB,YAAA,OAAO,CAAC,CAAA,EAAG,QAAQ,CAAA,CAAA,EAAI,GAAG,CAAA,CAAE,CAAC,GAAG,KAAK,CAAC,WAAW,CAAC,GAAU,CAAC;AAChE,QAAA,CAAC,CAAC;AAEF,QAAA,OAAOC,SAAG,CAAC;YACR,SAAS,EAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACH,OAAO,CAAA,EAAA,EACV,CAAC,QAAQ,GAAGC,oBAAY,CAAC,KAAK,CAAC,EAAA;SAEpC,EAAE;AACA,YAAA,WAAW,EAAE,OAAO,MAAM,KAAK;AACjC,SAAA,CAAC;AACL,IAAA,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;IAEX,QACGC,gBAACC,gBAAW,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,KAAK,EAAA,QAAA,EAAA,CAE5B,OAAO,MAAM,KAAK,WAAW,IAAIC,cAAA,CAAA,OAAA,EAAA,EAC9B,UAAU,EAAE,WAAW,CAAC,SAAS,EACjC,IAAI,EAAE,WAAW,CAAC,SAAS,EAC3B,uBAAuB,EAAE,EAAE,MAAM,EAAE,WAAW,CAAC,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"ThemeProvider.js","sources":["../../src/theme/ThemeProvider.tsx"],"sourcesContent":["import * as React from \"react\"\r\nimport { ThemeOptions } from \"./types\"\r\nimport Tag from \"../Tag\"\r\nimport { TagComponentType, TagProps } from \"../Tag/types\"\r\nimport { ThemeContex, ThemeFactory } from \"./core\"\r\nimport ThemeCssVars from \"./ThemeCssVars\"\r\nimport { css } from \"../css\"\r\nimport { createTheme } from \"./createTheme\"\r\nimport { darkThemeOptions, lightThemeOptions } from \"./ThemeDefaultOptions\"\r\n\r\nexport type ThemeProviderProps<T extends TagComponentType = 'div'> = TagProps<T> & {\r\n theme: string;\r\n}\r\n\r\ncreateTheme(\"light\", lightThemeOptions)\r\ncreateTheme(\"dark\", darkThemeOptions)\r\n\r\nconst ThemeProvider = <T extends TagComponentType = 'div'>({ children, theme, ...props }: ThemeProviderProps<T>) => {\r\n let THEME = ThemeFactory.get(theme) as ThemeOptions\r\n if (!THEME) {\r\n console.error(`ThemeProvider: The theme '${theme}' is not defined. Please make sure to use a valid theme name.`)\r\n THEME = ThemeFactory.get(\"light\") as ThemeOptions\r\n }\r\n\r\n const globalStyle: any = React.useMemo(() => {\r\n const root_cls = `.xui-${theme}-theme-root`\r\n let gkeys = Object.keys(THEME.globalStyle || {})\r\n let gstyles: any = {}\r\n gkeys.forEach((key) => {\r\n gstyles[`${root_cls} ${key}`] = THEME.globalStyle[key as any]\r\n })\r\n\r\n return css({\r\n \"@global\": {\r\n ...gstyles,\r\n [root_cls]: ThemeCssVars(THEME)\r\n }\r\n }, {\r\n injectStyle: typeof window !== 'undefined'\r\n })\r\n }, [theme])\r\n\r\n return (\r\n <ThemeContex.Provider value={theme}>\r\n {\r\n typeof window === 'undefined' && <style\r\n precedence={globalStyle.classname}\r\n href={globalStyle.classname}\r\n dangerouslySetInnerHTML={{ __html: globalStyle.css }}\r\n />\r\n }\r\n <Tag\r\n minHeight=\"100%\"\r\n bgcolor={THEME.colors.common.primary}\r\n color={THEME.colors.common.text.primary}\r\n fontSize={THEME.typography.text.fontSize}\r\n fontWeight={THEME.typography.text.fontWeight}\r\n lineHeight={THEME.typography.text.lineHeight}\r\n fontFamily={`system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif`}\r\n {...props}\r\n sxr={{\r\n \"& a\": {\r\n color: THEME.colors.brand.primary || 'inherit',\r\n },\r\n }}\r\n baseClass={`${theme}-theme-root`}\r\n direction={THEME.rtl ? \"rtl\" : \"ltr\"}\r\n >\r\n {children}\r\n </Tag>\r\n </ThemeContex.Provider>\r\n )\r\n}\r\n\r\nexport default ThemeProvider"],"names":["createTheme","lightThemeOptions","darkThemeOptions","__rest","ThemeFactory","React","css","ThemeCssVars","_jsxs","ThemeContex","_jsx","Tag"],"mappings":"wuBAcAA,uBAAW,CAAC,OAAO,EAAEC,qCAAiB,CAAC;AACvCD,uBAAW,CAAC,MAAM,EAAEE,oCAAgB,CAAC;AAErC,MAAM,aAAa,GAAG,CAAqC,EAAoD,KAAI;QAAxD,EAAE,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AAA,EAAA,EAC9B,UAAU,EAAE,WAAW,CAAC,SAAS,EACjC,IAAI,EAAE,WAAW,CAAC,SAAS,EAC3B,uBAAuB,EAAE,EAAE,MAAM,EAAE,WAAW,CAAC,GAAG,EAAE,EAAA,CACrD,EAELA,cAAA,CAACC,eAAG,EAAA,MAAA,CAAA,MAAA,CAAA,EACD,SAAS,EAAC,MAAM,EAChB,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EACpC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EACvC,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,EACxC,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,EAC5C,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,EAC5C,UAAU,EAAE,gGAAgG,EAAA,EACxG,KAAK,EAAA,EACT,GAAG,EAAE;AACF,oBAAA,KAAK,EAAE;wBACJ,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,IAAI,SAAS;AAChD,qBAAA;iBACH,EACD,SAAS,EAAE,CAAA,EAAG,KAAK,CAAA,WAAA,CAAa,EAChC,SAAS,EAAE,KAAK,CAAC,GAAG,GAAG,KAAK,GAAG,KAAK,YAEnC,QAAQ,EAAA,CAAA,CACN,CAAA,EAAA,CACc;AAE7B"}
|
package/theme/ThemeProvider.mjs
CHANGED
|
@@ -20,7 +20,7 @@ const ThemeProvider = (_a) => {
|
|
|
20
20
|
injectStyle: typeof window !== 'undefined'
|
|
21
21
|
});
|
|
22
22
|
}, [theme]);
|
|
23
|
-
return (jsxs(ThemeContex.Provider, { value: theme, children: [typeof window === 'undefined' && jsx("style", { precedence: globalStyle.classname, href: globalStyle.classname, dangerouslySetInnerHTML: { __html: globalStyle.css } }), jsx(Tag, Object.assign({ minHeight: "100%", bgcolor: THEME.colors.common.primary, color: THEME.colors.common.text.primary, fontSize: THEME.typography.text.fontSize, fontWeight: THEME.typography.text.fontWeight, lineHeight: THEME.typography.text.lineHeight }, props, { sxr: {
|
|
23
|
+
return (jsxs(ThemeContex.Provider, { value: theme, children: [typeof window === 'undefined' && jsx("style", { precedence: globalStyle.classname, href: globalStyle.classname, dangerouslySetInnerHTML: { __html: globalStyle.css } }), jsx(Tag, Object.assign({ minHeight: "100%", bgcolor: THEME.colors.common.primary, color: THEME.colors.common.text.primary, fontSize: THEME.typography.text.fontSize, fontWeight: THEME.typography.text.fontWeight, lineHeight: THEME.typography.text.lineHeight, fontFamily: `system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif` }, props, { sxr: {
|
|
24
24
|
"& a": {
|
|
25
25
|
color: THEME.colors.brand.primary || 'inherit',
|
|
26
26
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.mjs","sources":["../../src/theme/ThemeProvider.tsx"],"sourcesContent":["import * as React from \"react\"\r\nimport { ThemeOptions } from \"./types\"\r\nimport Tag from \"../Tag\"\r\nimport { TagComponentType, TagProps } from \"../Tag/types\"\r\nimport { ThemeContex, ThemeFactory } from \"./core\"\r\nimport ThemeCssVars from \"./ThemeCssVars\"\r\nimport { css } from \"../css\"\r\nimport { createTheme } from \"./createTheme\"\r\nimport { darkThemeOptions, lightThemeOptions } from \"./ThemeDefaultOptions\"\r\n\r\nexport type ThemeProviderProps<T extends TagComponentType = 'div'> = TagProps<T> & {\r\n theme: string;\r\n}\r\n\r\ncreateTheme(\"light\", lightThemeOptions)\r\ncreateTheme(\"dark\", darkThemeOptions)\r\n\r\nconst ThemeProvider = <T extends TagComponentType = 'div'>({ children, theme, ...props }: ThemeProviderProps<T>) => {\r\n let THEME = ThemeFactory.get(theme) as ThemeOptions\r\n if (!THEME) {\r\n console.error(`ThemeProvider: The theme '${theme}' is not defined. Please make sure to use a valid theme name.`)\r\n THEME = ThemeFactory.get(\"light\") as ThemeOptions\r\n }\r\n\r\n const globalStyle: any = React.useMemo(() => {\r\n const root_cls = `.xui-${theme}-theme-root`\r\n let gkeys = Object.keys(THEME.globalStyle || {})\r\n let gstyles: any = {}\r\n gkeys.forEach((key) => {\r\n gstyles[`${root_cls} ${key}`] = THEME.globalStyle[key as any]\r\n })\r\n\r\n return css({\r\n \"@global\": {\r\n ...gstyles,\r\n [root_cls]: ThemeCssVars(THEME)\r\n }\r\n }, {\r\n injectStyle: typeof window !== 'undefined'\r\n })\r\n }, [theme])\r\n\r\n return (\r\n <ThemeContex.Provider value={theme}>\r\n {\r\n typeof window === 'undefined' && <style\r\n precedence={globalStyle.classname}\r\n href={globalStyle.classname}\r\n dangerouslySetInnerHTML={{ __html: globalStyle.css }}\r\n />\r\n }\r\n <Tag\r\n minHeight=\"100%\"\r\n bgcolor={THEME.colors.common.primary}\r\n color={THEME.colors.common.text.primary}\r\n fontSize={THEME.typography.text.fontSize}\r\n fontWeight={THEME.typography.text.fontWeight}\r\n lineHeight={THEME.typography.text.lineHeight}\r\n {...props}\r\n sxr={{\r\n \"& a\": {\r\n color: THEME.colors.brand.primary || 'inherit',\r\n },\r\n }}\r\n baseClass={`${theme}-theme-root`}\r\n direction={THEME.rtl ? \"rtl\" : \"ltr\"}\r\n >\r\n {children}\r\n </Tag>\r\n </ThemeContex.Provider>\r\n )\r\n}\r\n\r\nexport default ThemeProvider"],"names":["_jsxs","_jsx"],"mappings":"2XAcA,WAAW,CAAC,OAAO,EAAE,iBAAiB,CAAC;AACvC,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC;AAErC,MAAM,aAAa,GAAG,CAAqC,EAAoD,KAAI;QAAxD,EAAE,QAAQ,EAAE,KAAK,EAAA,GAAA,EAAmC,EAA9B,KAAK,GAAA,MAAA,CAAA,EAAA,EAA3B,qBAA6B,CAAF;IACnF,IAAI,KAAK,GAAG,YAAY,CAAC,GAAG,CAAC,KAAK,CAAiB;IACnD,IAAI,CAAC,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":["../../src/theme/ThemeProvider.tsx"],"sourcesContent":["import * as React from \"react\"\r\nimport { ThemeOptions } from \"./types\"\r\nimport Tag from \"../Tag\"\r\nimport { TagComponentType, TagProps } from \"../Tag/types\"\r\nimport { ThemeContex, ThemeFactory } from \"./core\"\r\nimport ThemeCssVars from \"./ThemeCssVars\"\r\nimport { css } from \"../css\"\r\nimport { createTheme } from \"./createTheme\"\r\nimport { darkThemeOptions, lightThemeOptions } from \"./ThemeDefaultOptions\"\r\n\r\nexport type ThemeProviderProps<T extends TagComponentType = 'div'> = TagProps<T> & {\r\n theme: string;\r\n}\r\n\r\ncreateTheme(\"light\", lightThemeOptions)\r\ncreateTheme(\"dark\", darkThemeOptions)\r\n\r\nconst ThemeProvider = <T extends TagComponentType = 'div'>({ children, theme, ...props }: ThemeProviderProps<T>) => {\r\n let THEME = ThemeFactory.get(theme) as ThemeOptions\r\n if (!THEME) {\r\n console.error(`ThemeProvider: The theme '${theme}' is not defined. Please make sure to use a valid theme name.`)\r\n THEME = ThemeFactory.get(\"light\") as ThemeOptions\r\n }\r\n\r\n const globalStyle: any = React.useMemo(() => {\r\n const root_cls = `.xui-${theme}-theme-root`\r\n let gkeys = Object.keys(THEME.globalStyle || {})\r\n let gstyles: any = {}\r\n gkeys.forEach((key) => {\r\n gstyles[`${root_cls} ${key}`] = THEME.globalStyle[key as any]\r\n })\r\n\r\n return css({\r\n \"@global\": {\r\n ...gstyles,\r\n [root_cls]: ThemeCssVars(THEME)\r\n }\r\n }, {\r\n injectStyle: typeof window !== 'undefined'\r\n })\r\n }, [theme])\r\n\r\n return (\r\n <ThemeContex.Provider value={theme}>\r\n {\r\n typeof window === 'undefined' && <style\r\n precedence={globalStyle.classname}\r\n href={globalStyle.classname}\r\n dangerouslySetInnerHTML={{ __html: globalStyle.css }}\r\n />\r\n }\r\n <Tag\r\n minHeight=\"100%\"\r\n bgcolor={THEME.colors.common.primary}\r\n color={THEME.colors.common.text.primary}\r\n fontSize={THEME.typography.text.fontSize}\r\n fontWeight={THEME.typography.text.fontWeight}\r\n lineHeight={THEME.typography.text.lineHeight}\r\n fontFamily={`system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif`}\r\n {...props}\r\n sxr={{\r\n \"& a\": {\r\n color: THEME.colors.brand.primary || 'inherit',\r\n },\r\n }}\r\n baseClass={`${theme}-theme-root`}\r\n direction={THEME.rtl ? \"rtl\" : \"ltr\"}\r\n >\r\n {children}\r\n </Tag>\r\n </ThemeContex.Provider>\r\n )\r\n}\r\n\r\nexport default ThemeProvider"],"names":["_jsxs","_jsx"],"mappings":"2XAcA,WAAW,CAAC,OAAO,EAAE,iBAAiB,CAAC;AACvC,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC;AAErC,MAAM,aAAa,GAAG,CAAqC,EAAoD,KAAI;QAAxD,EAAE,QAAQ,EAAE,KAAK,EAAA,GAAA,EAAmC,EAA9B,KAAK,GAAA,MAAA,CAAA,EAAA,EAA3B,qBAA6B,CAAF;IACnF,IAAI,KAAK,GAAG,YAAY,CAAC,GAAG,CAAC,KAAK,CAAiB;IACnD,IAAI,CAAC,KAAK,EAAE;AACT,QAAA,OAAO,CAAC,KAAK,CAAC,6BAA6B,KAAK,CAAA,6DAAA,CAA+D,CAAC;AAChH,QAAA,KAAK,GAAG,YAAY,CAAC,GAAG,CAAC,OAAO,CAAiB;IACpD;AAEA,IAAA,MAAM,WAAW,GAAQ,KAAK,CAAC,OAAO,CAAC,MAAK;AACzC,QAAA,MAAM,QAAQ,GAAG,CAAA,KAAA,EAAQ,KAAK,aAAa;AAC3C,QAAA,IAAI,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,EAAE,CAAC;QAChD,IAAI,OAAO,GAAQ,EAAE;AACrB,QAAA,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,KAAI;AACnB,YAAA,OAAO,CAAC,CAAA,EAAG,QAAQ,CAAA,CAAA,EAAI,GA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