@xanui/core 1.2.31 → 1.2.32
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/Renderar.js +11 -2
- package/AppRoot/Renderar.js.map +1 -1
- package/AppRoot/Renderar.mjs +8 -2
- package/AppRoot/Renderar.mjs.map +1 -1
- package/AppRoot/index.js +22 -3
- package/AppRoot/index.js.map +1 -1
- package/AppRoot/index.mjs +16 -2
- package/AppRoot/index.mjs.map +1 -1
- package/Tag/ServerStyleTag.js +9 -2
- package/Tag/ServerStyleTag.js.map +1 -1
- package/Tag/ServerStyleTag.mjs +7 -2
- package/Tag/ServerStyleTag.mjs.map +1 -1
- package/Tag/cssPropList.js +7 -2
- package/Tag/cssPropList.js.map +1 -1
- package/Tag/cssPropList.mjs +4 -1
- package/Tag/cssPropList.mjs.map +1 -1
- package/Tag/index.js +34 -4
- package/Tag/index.js.map +1 -1
- package/Tag/index.mjs +11 -2
- package/Tag/index.mjs.map +1 -1
- package/Tag/useTagProps.js +13 -3
- package/Tag/useTagProps.js.map +1 -1
- package/Tag/useTagProps.mjs +10 -2
- package/Tag/useTagProps.mjs.map +1 -1
- package/Transition/index.js +13 -3
- package/Transition/index.js.map +1 -1
- package/Transition/index.mjs +10 -2
- package/Transition/index.mjs.map +1 -1
- package/breakpoint/BreakpointProvider.js +12 -2
- package/breakpoint/BreakpointProvider.js.map +1 -1
- package/breakpoint/BreakpointProvider.mjs +9 -2
- package/breakpoint/BreakpointProvider.mjs.map +1 -1
- package/breakpoint/useBreakpoint.js +11 -2
- package/breakpoint/useBreakpoint.js.map +1 -1
- package/breakpoint/useBreakpoint.mjs +9 -2
- package/breakpoint/useBreakpoint.mjs.map +1 -1
- package/breakpoint/useBreakpointProps.js +11 -3
- package/breakpoint/useBreakpointProps.js.map +1 -1
- package/breakpoint/useBreakpointProps.mjs +8 -2
- package/breakpoint/useBreakpointProps.mjs.map +1 -1
- package/css/aliases.js +7 -2
- package/css/aliases.js.map +1 -1
- package/css/aliases.mjs +4 -1
- package/css/aliases.mjs.map +1 -1
- package/css/getProps.js +7 -2
- package/css/getProps.js.map +1 -1
- package/css/getProps.mjs +4 -1
- package/css/getProps.mjs.map +1 -1
- package/css/getValue.js +7 -2
- package/css/getValue.js.map +1 -1
- package/css/getValue.mjs +4 -1
- package/css/getValue.mjs.map +1 -1
- package/css/index.js +21 -5
- package/css/index.js.map +1 -1
- package/css/index.mjs +10 -2
- package/css/index.mjs.map +1 -1
- package/hooks/useAnimation.js +13 -9
- package/hooks/useAnimation.js.map +1 -1
- package/hooks/useAnimation.mjs +8 -9
- package/hooks/useAnimation.mjs.map +1 -1
- package/hooks/useColorTemplate.js +8 -2
- package/hooks/useColorTemplate.js.map +1 -1
- package/hooks/useColorTemplate.mjs +5 -1
- package/hooks/useColorTemplate.mjs.map +1 -1
- package/hooks/useInterface.js +13 -2
- package/hooks/useInterface.js.map +1 -1
- package/hooks/useInterface.mjs +11 -2
- package/hooks/useInterface.mjs.map +1 -1
- package/hooks/usePortal.js +22 -3
- package/hooks/usePortal.js.map +1 -1
- package/hooks/usePortal.mjs +16 -2
- package/hooks/usePortal.mjs.map +1 -1
- package/hooks/useTransition/index.js +15 -2
- package/hooks/useTransition/index.js.map +1 -1
- package/hooks/useTransition/index.mjs +13 -2
- package/hooks/useTransition/index.mjs.map +1 -1
- package/hooks/useTransition/variants.js +20 -2
- package/hooks/useTransition/variants.js.map +1 -1
- package/hooks/useTransition/variants.mjs +4 -1
- package/hooks/useTransition/variants.mjs.map +1 -1
- package/index.js +53 -1
- package/index.js.map +1 -1
- package/index.mjs +21 -1
- package/index.mjs.map +1 -1
- package/package.json +2 -8
- package/readme.md +109 -109
- package/theme/ThemeCssVars.js +7 -2
- package/theme/ThemeCssVars.js.map +1 -1
- package/theme/ThemeCssVars.mjs +4 -1
- package/theme/ThemeCssVars.mjs.map +1 -1
- package/theme/ThemeDefaultOptions.js +13 -2
- package/theme/ThemeDefaultOptions.js.map +1 -1
- package/theme/ThemeDefaultOptions.mjs +7 -2
- package/theme/ThemeDefaultOptions.mjs.map +1 -1
- package/theme/ThemeProvider.js +39 -4
- package/theme/ThemeProvider.js.map +1 -1
- package/theme/ThemeProvider.mjs +16 -2
- package/theme/ThemeProvider.mjs.map +1 -1
- package/theme/core.js +13 -2
- package/theme/core.js.map +1 -1
- package/theme/core.mjs +7 -2
- package/theme/core.mjs.map +1 -1
- package/theme/createTheme.js +11 -2
- package/theme/createTheme.js.map +1 -1
- package/theme/createTheme.mjs +9 -2
- package/theme/createTheme.mjs.map +1 -1
- package/theme/createThemeSwitcher.d.ts +1 -1
- package/theme/createThemeSwitcher.js +11 -2
- package/theme/createThemeSwitcher.js.map +1 -1
- package/theme/createThemeSwitcher.mjs +9 -2
- package/theme/createThemeSwitcher.mjs.map +1 -1
- package/theme/index.js +15 -1
- package/theme/index.js.map +1 -1
- package/theme/index.mjs +10 -1
- package/theme/index.mjs.map +1 -1
package/Transition/index.js
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var tslib = require('tslib');
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var index = require('../hooks/useTransition/index.js');
|
|
7
|
+
|
|
8
|
+
const Transition = (_a) => {
|
|
2
9
|
var { children } = _a, options = tslib.__rest(_a, ["children"]);
|
|
3
|
-
const { props, exited } = index
|
|
10
|
+
const { props, exited } = index(options);
|
|
4
11
|
if (exited)
|
|
5
12
|
return null;
|
|
6
13
|
const clone = React.Children.only(children);
|
|
7
14
|
return React.cloneElement(clone, props);
|
|
8
|
-
};
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
module.exports = Transition;
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
package/Transition/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/Transition/index.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/Transition/index.tsx"],"sourcesContent":["\"use client\";\r\nimport { cloneElement, Children } from 'react';\r\nimport useTransition, { UseTransitionProps } from '../hooks/useTransition';\r\n\r\nexport type TransitionProps = UseTransitionProps & {\r\n children: React.ReactElement;\r\n}\r\n\r\nconst Transition = ({ children, ...options }: TransitionProps) => {\r\n const { props, exited } = useTransition(options);\r\n if (exited) return null;\r\n const clone: any = Children.only(children);\r\n return cloneElement(clone, props);\r\n}\r\n\r\n\r\nexport default Transition"],"names":[],"mappings":";;;;;;;AAQA;AAAoB;;AAEhB;AAAY;;AAEZ;AACJ;;"}
|
package/Transition/index.mjs
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { __rest } from 'tslib';
|
|
3
|
+
import { Children, cloneElement } from 'react';
|
|
4
|
+
import useTransition from '../hooks/useTransition/index.mjs';
|
|
5
|
+
|
|
6
|
+
const Transition = (_a) => {
|
|
2
7
|
var { children } = _a, options = __rest(_a, ["children"]);
|
|
3
8
|
const { props, exited } = useTransition(options);
|
|
4
9
|
if (exited)
|
|
5
10
|
return null;
|
|
6
11
|
const clone = Children.only(children);
|
|
7
12
|
return cloneElement(clone, props);
|
|
8
|
-
};
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { Transition as default };
|
|
16
|
+
//# sourceMappingURL=index.mjs.map
|
package/Transition/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/Transition/index.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/Transition/index.tsx"],"sourcesContent":["\"use client\";\r\nimport { cloneElement, Children } from 'react';\r\nimport useTransition, { UseTransitionProps } from '../hooks/useTransition';\r\n\r\nexport type TransitionProps = UseTransitionProps & {\r\n children: React.ReactElement;\r\n}\r\n\r\nconst Transition = ({ children, ...options }: TransitionProps) => {\r\n const { props, exited } = useTransition(options);\r\n if (exited) return null;\r\n const clone: any = Children.only(children);\r\n return cloneElement(clone, props);\r\n}\r\n\r\n\r\nexport default Transition"],"names":[],"mappings":";;;;;AAQA;AAAoB;;AAEhB;AAAY;;AAEZ;AACJ;;"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var index = require('../css/index.js');
|
|
6
|
+
|
|
7
|
+
const BreakpointCtx = React.createContext("xs");
|
|
2
8
|
/**
|
|
3
9
|
* SSR-safe breakpoint detection
|
|
4
10
|
*/
|
|
@@ -29,4 +35,8 @@ const BreakpointProvider = ({ children }) => {
|
|
|
29
35
|
return () => window.removeEventListener("resize", handler);
|
|
30
36
|
}, [handler]);
|
|
31
37
|
return (jsxRuntime.jsx(BreakpointCtx.Provider, { value: current, children: children }));
|
|
32
|
-
};
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
exports.BreakpointCtx = BreakpointCtx;
|
|
41
|
+
exports.BreakpointProvider = BreakpointProvider;
|
|
42
|
+
//# sourceMappingURL=BreakpointProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BreakpointProvider.js","sources":["../../src/breakpoint/BreakpointProvider.tsx"],"sourcesContent":["import React, { ReactNode, useState, useCallback } from \"react\";\nimport { breakpoints } from \"../css\";\nimport { BreakpointKeys } from \"../css/types\";\n\nexport const BreakpointCtx = React.createContext<BreakpointKeys>(\"xs\");\n\n/**\n * SSR-safe breakpoint detection\n */\nconst getKey = (): BreakpointKeys => {\n if (typeof window === 'undefined') {\n return \"xs\";\n }\n\n const width = window.innerWidth;\n\n if (width < breakpoints.sm) return \"xs\";\n if (width < breakpoints.md) return \"sm\";\n if (width < breakpoints.lg) return \"md\";\n if (width < breakpoints.xl) return \"lg\";\n return \"xl\";\n};\n\nexport const BreakpointProvider = ({ children }: { children?: ReactNode }) => {\n const [current, setCurrent] = useState<BreakpointKeys>(\"xl\");\n\n const handler = useCallback(() => {\n const newKey = getKey();\n setCurrent(prev => (prev === newKey ? prev : newKey));\n }, []);\n\n React.useEffect(() => {\n window.addEventListener(\"resize\", handler);\n handler(); // detect on mount\n return () => window.removeEventListener(\"resize\", handler);\n }, [handler]);\n\n return (\n <BreakpointCtx.Provider value={current}>\n {children}\n </BreakpointCtx.Provider>\n );\n};\n"],"names":["breakpoints","useState","useCallback","_jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"BreakpointProvider.js","sources":["../../src/breakpoint/BreakpointProvider.tsx"],"sourcesContent":["import React, { ReactNode, useState, useCallback } from \"react\";\r\nimport { breakpoints } from \"../css\";\r\nimport { BreakpointKeys } from \"../css/types\";\r\n\r\nexport const BreakpointCtx = React.createContext<BreakpointKeys>(\"xs\");\r\n\r\n/**\r\n * SSR-safe breakpoint detection\r\n */\r\nconst getKey = (): BreakpointKeys => {\r\n if (typeof window === 'undefined') {\r\n return \"xs\";\r\n }\r\n\r\n const width = window.innerWidth;\r\n\r\n if (width < breakpoints.sm) return \"xs\";\r\n if (width < breakpoints.md) return \"sm\";\r\n if (width < breakpoints.lg) return \"md\";\r\n if (width < breakpoints.xl) return \"lg\";\r\n return \"xl\";\r\n};\r\n\r\nexport const BreakpointProvider = ({ children }: { children?: ReactNode }) => {\r\n const [current, setCurrent] = useState<BreakpointKeys>(\"xl\");\r\n\r\n const handler = useCallback(() => {\r\n const newKey = getKey();\r\n setCurrent(prev => (prev === newKey ? prev : newKey));\r\n }, []);\r\n\r\n React.useEffect(() => {\r\n window.addEventListener(\"resize\", handler);\r\n handler(); // detect on mount\r\n return () => window.removeEventListener(\"resize\", handler);\r\n }, [handler]);\r\n\r\n return (\r\n <BreakpointCtx.Provider value={current}>\r\n {children}\r\n </BreakpointCtx.Provider>\r\n );\r\n};\r\n"],"names":["breakpoints","useState","useCallback","_jsx"],"mappings":";;;;;;AAIO,MAAM,aA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jC,QAAQ,EAAA,CACY;AAEjC;;;;;"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {jsx}from'react/jsx-runtime';
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import React__default, { useState, useCallback } from 'react';
|
|
3
|
+
import { breakpoints } from '../css/index.mjs';
|
|
4
|
+
|
|
5
|
+
const BreakpointCtx = React__default.createContext("xs");
|
|
2
6
|
/**
|
|
3
7
|
* SSR-safe breakpoint detection
|
|
4
8
|
*/
|
|
@@ -29,4 +33,7 @@ const BreakpointProvider = ({ children }) => {
|
|
|
29
33
|
return () => window.removeEventListener("resize", handler);
|
|
30
34
|
}, [handler]);
|
|
31
35
|
return (jsx(BreakpointCtx.Provider, { value: current, children: children }));
|
|
32
|
-
};
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export { BreakpointCtx, BreakpointProvider };
|
|
39
|
+
//# sourceMappingURL=BreakpointProvider.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BreakpointProvider.mjs","sources":["../../src/breakpoint/BreakpointProvider.tsx"],"sourcesContent":["import React, { ReactNode, useState, useCallback } from \"react\";\nimport { breakpoints } from \"../css\";\nimport { BreakpointKeys } from \"../css/types\";\n\nexport const BreakpointCtx = React.createContext<BreakpointKeys>(\"xs\");\n\n/**\n * SSR-safe breakpoint detection\n */\nconst getKey = (): BreakpointKeys => {\n if (typeof window === 'undefined') {\n return \"xs\";\n }\n\n const width = window.innerWidth;\n\n if (width < breakpoints.sm) return \"xs\";\n if (width < breakpoints.md) return \"sm\";\n if (width < breakpoints.lg) return \"md\";\n if (width < breakpoints.xl) return \"lg\";\n return \"xl\";\n};\n\nexport const BreakpointProvider = ({ children }: { children?: ReactNode }) => {\n const [current, setCurrent] = useState<BreakpointKeys>(\"xl\");\n\n const handler = useCallback(() => {\n const newKey = getKey();\n setCurrent(prev => (prev === newKey ? prev : newKey));\n }, []);\n\n React.useEffect(() => {\n window.addEventListener(\"resize\", handler);\n handler(); // detect on mount\n return () => window.removeEventListener(\"resize\", handler);\n }, [handler]);\n\n return (\n <BreakpointCtx.Provider value={current}>\n {children}\n </BreakpointCtx.Provider>\n );\n};\n"],"names":["React","_jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"BreakpointProvider.mjs","sources":["../../src/breakpoint/BreakpointProvider.tsx"],"sourcesContent":["import React, { ReactNode, useState, useCallback } from \"react\";\r\nimport { breakpoints } from \"../css\";\r\nimport { BreakpointKeys } from \"../css/types\";\r\n\r\nexport const BreakpointCtx = React.createContext<BreakpointKeys>(\"xs\");\r\n\r\n/**\r\n * SSR-safe breakpoint detection\r\n */\r\nconst getKey = (): BreakpointKeys => {\r\n if (typeof window === 'undefined') {\r\n return \"xs\";\r\n }\r\n\r\n const width = window.innerWidth;\r\n\r\n if (width < breakpoints.sm) return \"xs\";\r\n if (width < breakpoints.md) return \"sm\";\r\n if (width < breakpoints.lg) return \"md\";\r\n if (width < breakpoints.xl) return \"lg\";\r\n return \"xl\";\r\n};\r\n\r\nexport const BreakpointProvider = ({ children }: { children?: ReactNode }) => {\r\n const [current, setCurrent] = useState<BreakpointKeys>(\"xl\");\r\n\r\n const handler = useCallback(() => {\r\n const newKey = getKey();\r\n setCurrent(prev => (prev === newKey ? prev : newKey));\r\n }, []);\r\n\r\n React.useEffect(() => {\r\n window.addEventListener(\"resize\", handler);\r\n handler(); // detect on mount\r\n return () => window.removeEventListener(\"resize\", handler);\r\n }, [handler]);\r\n\r\n return (\r\n <BreakpointCtx.Provider value={current}>\r\n {children}\r\n </BreakpointCtx.Provider>\r\n );\r\n};\r\n"],"names":["React","_jsx"],"mappings":";;;;AAIO,MAAM,aAAa,GAAGA,cAAK,CAAC,aAAa,CAAiB,IAAI;AAErE;;AAEG;AACH,MAAM,MAAM,GAAG,MAAqB;AAChC,IAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;AAC/B,QAAA,OAAO,IAAI;IACf;AAEA,IAAA,MAAM,KAA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css/index.js');
|
|
6
|
+
|
|
7
|
+
const useBreakpoint = () => {
|
|
2
8
|
const value = React.useContext(BreakpointProvider.BreakpointCtx);
|
|
3
9
|
const getWidth = () => typeof window !== 'undefined' ? window.innerWidth : 99999;
|
|
4
10
|
const is = (key) => value === key;
|
|
@@ -12,4 +18,7 @@
|
|
|
12
18
|
isOrUp: (key) => is(key) || isUp(key),
|
|
13
19
|
isOrDown: (key) => is(key) || isDown(key)
|
|
14
20
|
};
|
|
15
|
-
};
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
module.exports = useBreakpoint;
|
|
24
|
+
//# sourceMappingURL=useBreakpoint.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBreakpoint.js","sources":["../../src/breakpoint/useBreakpoint.ts"],"sourcesContent":["import { useContext } from \"react\"\nimport { BreakpointCtx } from \"./BreakpointProvider\"\nimport { breakpoints } from \"../css\"\nimport { BreakpointKeys } from \"../css/types\"\n\nconst useBreakpoint = () => {\n const value = useContext(BreakpointCtx)\n const getWidth = () => typeof window !== 'undefined' ? window.innerWidth : 99999\n const is = (key: BreakpointKeys) => value === key\n const isUp = (key: BreakpointKeys) => getWidth() >= breakpoints[key]\n const isDown = (key: BreakpointKeys) => getWidth() < breakpoints[key]\n\n return {\n value,\n is,\n isUp,\n isDown,\n isOrUp: (key: BreakpointKeys) => is(key) || isUp(key),\n isOrDown: (key: BreakpointKeys) => is(key) || isDown(key)\n }\n}\n\nexport default useBreakpoint\n"],"names":["useContext","BreakpointCtx","breakpoints"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useBreakpoint.js","sources":["../../src/breakpoint/useBreakpoint.ts"],"sourcesContent":["import { useContext } from \"react\"\r\nimport { BreakpointCtx } from \"./BreakpointProvider\"\r\nimport { breakpoints } from \"../css\"\r\nimport { BreakpointKeys } from \"../css/types\"\r\n\r\nconst useBreakpoint = () => {\r\n const value = useContext(BreakpointCtx)\r\n const getWidth = () => typeof window !== 'undefined' ? window.innerWidth : 99999\r\n const is = (key: BreakpointKeys) => value === key\r\n const isUp = (key: BreakpointKeys) => getWidth() >= breakpoints[key]\r\n const isDown = (key: BreakpointKeys) => getWidth() < breakpoints[key]\r\n\r\n return {\r\n value,\r\n is,\r\n isUp,\r\n isDown,\r\n isOrUp: (key: BreakpointKeys) => is(key) || isUp(key),\r\n isOrDown: (key: BreakpointKeys) => is(key) || isDown(key)\r\n }\r\n}\r\n\r\nexport default useBreakpoint\r\n"],"names":["useContext","BreakpointCtx","breakpoints"],"mappings":";;;;;;AAKA,MAAM,aAAa,GAAG,MAAK;AACxB,IAAA,MAAM,KAAK,GAAGA,gBAAU,CAACC,gCAAa,CAAC;AACvC,IAAA,MAAM,QAAQ,GAAG,MAAM,OAAO,MAAM,KAAK,WAAW,GAAG,MAAM,CAAC,UAAU,GAAG,KAAK;IAChF,MAAM,EAAE,GAAG,CAAC,GAAmB,KAAK,KAAK,KAAK,GAAG;AACjD,IAAA,MAAM,IAAI,GAAG,CAAC,GAAmB,KAAK,QAAQ,EAAE,IAAIC,iBAAW,CAAC,GAAG,CAAC;AACpE,IAAA,MAAM,MAAM,GAAG,CAAC,GAAmB,KAAK,QAAQ,EAAE,GAAGA,iBAAW,CAAC,GAAG,CAAC;IAErE,OAAO;QACJ,KAAK;QACL,EAAE;QACF,IAAI;QACJ,MAAM;AACN,QAAA,MAAM,EAAE,CAAC,GAAmB,KAAK,EAAE,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC;AACrD,QAAA,QAAQ,EAAE,CAAC,GAAmB,KAAK,EAAE,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,GAAG;KAC1D;AACJ;;;;"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {useContext}
|
|
1
|
+
import { useContext } from 'react';
|
|
2
|
+
import { BreakpointCtx } from './BreakpointProvider.mjs';
|
|
3
|
+
import { breakpoints } from '../css/index.mjs';
|
|
4
|
+
|
|
5
|
+
const useBreakpoint = () => {
|
|
2
6
|
const value = useContext(BreakpointCtx);
|
|
3
7
|
const getWidth = () => typeof window !== 'undefined' ? window.innerWidth : 99999;
|
|
4
8
|
const is = (key) => value === key;
|
|
@@ -12,4 +16,7 @@ import {useContext}from'react';import {BreakpointCtx}from'./BreakpointProvider.m
|
|
|
12
16
|
isOrUp: (key) => is(key) || isUp(key),
|
|
13
17
|
isOrDown: (key) => is(key) || isDown(key)
|
|
14
18
|
};
|
|
15
|
-
};
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { useBreakpoint as default };
|
|
22
|
+
//# sourceMappingURL=useBreakpoint.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBreakpoint.mjs","sources":["../../src/breakpoint/useBreakpoint.ts"],"sourcesContent":["import { useContext } from \"react\"\nimport { BreakpointCtx } from \"./BreakpointProvider\"\nimport { breakpoints } from \"../css\"\nimport { BreakpointKeys } from \"../css/types\"\n\nconst useBreakpoint = () => {\n const value = useContext(BreakpointCtx)\n const getWidth = () => typeof window !== 'undefined' ? window.innerWidth : 99999\n const is = (key: BreakpointKeys) => value === key\n const isUp = (key: BreakpointKeys) => getWidth() >= breakpoints[key]\n const isDown = (key: BreakpointKeys) => getWidth() < breakpoints[key]\n\n return {\n value,\n is,\n isUp,\n isDown,\n isOrUp: (key: BreakpointKeys) => is(key) || isUp(key),\n isOrDown: (key: BreakpointKeys) => is(key) || isDown(key)\n }\n}\n\nexport default useBreakpoint\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useBreakpoint.mjs","sources":["../../src/breakpoint/useBreakpoint.ts"],"sourcesContent":["import { useContext } from \"react\"\r\nimport { BreakpointCtx } from \"./BreakpointProvider\"\r\nimport { breakpoints } from \"../css\"\r\nimport { BreakpointKeys } from \"../css/types\"\r\n\r\nconst useBreakpoint = () => {\r\n const value = useContext(BreakpointCtx)\r\n const getWidth = () => typeof window !== 'undefined' ? window.innerWidth : 99999\r\n const is = (key: BreakpointKeys) => value === key\r\n const isUp = (key: BreakpointKeys) => getWidth() >= breakpoints[key]\r\n const isDown = (key: BreakpointKeys) => getWidth() < breakpoints[key]\r\n\r\n return {\r\n value,\r\n is,\r\n isUp,\r\n isDown,\r\n isOrUp: (key: BreakpointKeys) => is(key) || isUp(key),\r\n isOrDown: (key: BreakpointKeys) => is(key) || isDown(key)\r\n }\r\n}\r\n\r\nexport default useBreakpoint\r\n"],"names":[],"mappings":";;;;AAKA,MAAM,aAAa,GAAG,MAAK;AACxB,IAAA,MAAM,KAAK,GAAG,UAAU,CAAC,aAAa,CAAC;AACvC,IAAA,MAAM,QAAQ,GAAG,MAAM,OAAO,MAAM,KAAK,WAAW,GAAG,MAAM,CAAC,UAAU,GAAG,KAAK;IAChF,MAAM,EAAE,GAAG,CAAC,GAAmB,KAAK,KAAK,KAAK,GAAG;AACjD,IAAA,MAAM,IAAI,GAAG,CAAC,GAAmB,KAAK,QAAQ,EAAE,IAAI,WAAW,CAAC,GAAG,CAAC;AACpE,IAAA,MAAM,MAAM,GAAG,CAAC,GAAmB,KAAK,QAAQ,EAAE,GAAG,WAAW,CAAC,GAAG,CAAC;IAErE,OAAO;QACJ,KAAK;QACL,EAAE;QACF,IAAI;QACJ,MAAM;AACN,QAAA,MAAM,EAAE,CAAC,GAAmB,KAAK,EAAE,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC;AACrD,QAAA,QAAQ,EAAE,CAAC,GAAmB,KAAK,EAAE,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,GAAG;KAC1D;AACJ;;;;"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var useBreakpoint = require('./useBreakpoint.js');
|
|
5
|
+
|
|
6
|
+
const useBreakpointProps = (props) => {
|
|
7
|
+
const bpoint = useBreakpoint();
|
|
3
8
|
const cachekey = JSON.stringify(props, (key, value) => {
|
|
4
9
|
return key === '_owner' || key === '_store' ? undefined : value;
|
|
5
10
|
}, 2);
|
|
@@ -38,4 +43,7 @@
|
|
|
38
43
|
}
|
|
39
44
|
}
|
|
40
45
|
return Object.assign(Object.assign({}, props), _props);
|
|
41
|
-
};
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
module.exports = useBreakpointProps;
|
|
49
|
+
//# sourceMappingURL=useBreakpointProps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBreakpointProps.js","sources":["../../src/breakpoint/useBreakpointProps.ts"],"sourcesContent":["import { isValidElement, useMemo } from \"react\"\nimport useBreakpoint from \"./useBreakpoint\"\nimport { BreakpointKeys } from \"../css/types\"\n\nexport type useBreakpointPropsType<P> = P | {\n [key in BreakpointKeys]?: P\n}\n\nconst useBreakpointProps = <P extends object>(props: useBreakpointPropsType<P>): useBreakpointPropsType<P> => {\n const bpoint = useBreakpoint()\n const cachekey = JSON.stringify(props, (key, value) => {\n return key === '_owner' || key === '_store' ? undefined : value;\n }, 2);\n\n const bprops = useMemo(() => {\n let bprops: any = []\n let bkeys = ['xs', 'sm', 'md', 'lg', 'xl']\n\n for (let prop in props) {\n let val = (props as any)[prop]\n if (!isValidElement(val) && typeof val === 'object' && val !== null && Object.keys(val).some(k => bkeys.includes(k))) {\n bprops.push(prop)\n }\n }\n return bprops\n }, [cachekey]);\n\n\n if (bprops.length === 0) return props;\n\n const format: any = {\n xs: {},\n sm: {},\n md: {},\n lg: {},\n xl: {}\n }\n\n for (let prop of bprops) {\n let val = (props as any)[prop]\n for (let bp in val) {\n format[bp][prop] = val[bp]\n }\n }\n\n let _props = format.xs || {};\n for (let key of ['sm', 'md', 'lg', 'xl']) {\n if (bpoint.isDown(key as any)) break;\n if (bpoint.isOrUp(key as any)) {\n _props = { ..._props, ...format[key] };\n }\n }\n\n return {\n ...props,\n ..._props\n };\n}\n\n\n\nexport default useBreakpointProps"],"names":["
|
|
1
|
+
{"version":3,"file":"useBreakpointProps.js","sources":["../../src/breakpoint/useBreakpointProps.ts"],"sourcesContent":["import { isValidElement, useMemo } from \"react\"\r\nimport useBreakpoint from \"./useBreakpoint\"\r\nimport { BreakpointKeys } from \"../css/types\"\r\n\r\nexport type useBreakpointPropsType<P> = P | {\r\n [key in BreakpointKeys]?: P\r\n}\r\n\r\nconst useBreakpointProps = <P extends object>(props: useBreakpointPropsType<P>): useBreakpointPropsType<P> => {\r\n const bpoint = useBreakpoint()\r\n const cachekey = JSON.stringify(props, (key, value) => {\r\n return key === '_owner' || key === '_store' ? undefined : value;\r\n }, 2);\r\n\r\n const bprops = useMemo(() => {\r\n let bprops: any = []\r\n let bkeys = ['xs', 'sm', 'md', 'lg', 'xl']\r\n\r\n for (let prop in props) {\r\n let val = (props as any)[prop]\r\n if (!isValidElement(val) && typeof val === 'object' && val !== null && Object.keys(val).some(k => bkeys.includes(k))) {\r\n bprops.push(prop)\r\n }\r\n }\r\n return bprops\r\n }, [cachekey]);\r\n\r\n\r\n if (bprops.length === 0) return props;\r\n\r\n const format: any = {\r\n xs: {},\r\n sm: {},\r\n md: {},\r\n lg: {},\r\n xl: {}\r\n }\r\n\r\n for (let prop of bprops) {\r\n let val = (props as any)[prop]\r\n for (let bp in val) {\r\n format[bp][prop] = val[bp]\r\n }\r\n }\r\n\r\n let _props = format.xs || {};\r\n for (let key of ['sm', 'md', 'lg', 'xl']) {\r\n if (bpoint.isDown(key as any)) break;\r\n if (bpoint.isOrUp(key as any)) {\r\n _props = { ..._props, ...format[key] };\r\n }\r\n }\r\n\r\n return {\r\n ...props,\r\n ..._props\r\n };\r\n}\r\n\r\n\r\n\r\nexport default useBreakpointProps"],"names":["useMemo","isValidElement"],"mappings":";;;;;AAQA,MAAM,kBAAkB,GAAG,CAAmB,KAAgC,KAA+B;AAC1G,IAAA,MAAM,MAAM,GAAG,aAAa,EAAE;AAC9B,IAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAA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AG,GAAG,CAAC,EAAE,CAAC;QAC7B;IACH;AAEA,IAAA,IAAI,MAAM,GAAG,MAAM,CAAC,EAAE,IAAI,EAAE;AAC5B,IAAA,KAAK,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE;AACvC,QAAA,IAAI,MAAM,CAAC,MAAM,CAAC,GAAU,CAAC;YAAE;AAC/B,QAAA,IAAI,MAAM,CAAC,MAAM,CAAC,GAAU,CAAC,EAAE;YAC5B,MAAM,GAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAQ,MAAM,CAAA,EAAK,MAAM,CAAC,GAAG,CAAC,CAAE;QACzC;IACH;IAEA,OAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACM,KAAK,CAAA,EACL,MAAM,CAAA;AAEf;;;;"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {useMemo,isValidElement}from'react';
|
|
1
|
+
import { useMemo, isValidElement } from 'react';
|
|
2
|
+
import useBreakpoint from './useBreakpoint.mjs';
|
|
3
|
+
|
|
4
|
+
const useBreakpointProps = (props) => {
|
|
2
5
|
const bpoint = useBreakpoint();
|
|
3
6
|
const cachekey = JSON.stringify(props, (key, value) => {
|
|
4
7
|
return key === '_owner' || key === '_store' ? undefined : value;
|
|
@@ -38,4 +41,7 @@ import {useMemo,isValidElement}from'react';import useBreakpoint from'./useBreakp
|
|
|
38
41
|
}
|
|
39
42
|
}
|
|
40
43
|
return Object.assign(Object.assign({}, props), _props);
|
|
41
|
-
};
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export { useBreakpointProps as default };
|
|
47
|
+
//# sourceMappingURL=useBreakpointProps.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBreakpointProps.mjs","sources":["../../src/breakpoint/useBreakpointProps.ts"],"sourcesContent":["import { isValidElement, useMemo } from \"react\"\nimport useBreakpoint from \"./useBreakpoint\"\nimport { BreakpointKeys } from \"../css/types\"\n\nexport type useBreakpointPropsType<P> = P | {\n [key in BreakpointKeys]?: P\n}\n\nconst useBreakpointProps = <P extends object>(props: useBreakpointPropsType<P>): useBreakpointPropsType<P> => {\n const bpoint = useBreakpoint()\n const cachekey = JSON.stringify(props, (key, value) => {\n return key === '_owner' || key === '_store' ? undefined : value;\n }, 2);\n\n const bprops = useMemo(() => {\n let bprops: any = []\n let bkeys = ['xs', 'sm', 'md', 'lg', 'xl']\n\n for (let prop in props) {\n let val = (props as any)[prop]\n if (!isValidElement(val) && typeof val === 'object' && val !== null && Object.keys(val).some(k => bkeys.includes(k))) {\n bprops.push(prop)\n }\n }\n return bprops\n }, [cachekey]);\n\n\n if (bprops.length === 0) return props;\n\n const format: any = {\n xs: {},\n sm: {},\n md: {},\n lg: {},\n xl: {}\n }\n\n for (let prop of bprops) {\n let val = (props as any)[prop]\n for (let bp in val) {\n format[bp][prop] = val[bp]\n }\n }\n\n let _props = format.xs || {};\n for (let key of ['sm', 'md', 'lg', 'xl']) {\n if (bpoint.isDown(key as any)) break;\n if (bpoint.isOrUp(key as any)) {\n _props = { ..._props, ...format[key] };\n }\n }\n\n return {\n ...props,\n ..._props\n };\n}\n\n\n\nexport default useBreakpointProps"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useBreakpointProps.mjs","sources":["../../src/breakpoint/useBreakpointProps.ts"],"sourcesContent":["import { isValidElement, useMemo } from \"react\"\r\nimport useBreakpoint from \"./useBreakpoint\"\r\nimport { BreakpointKeys } from \"../css/types\"\r\n\r\nexport type useBreakpointPropsType<P> = P | {\r\n [key in BreakpointKeys]?: P\r\n}\r\n\r\nconst useBreakpointProps = <P extends object>(props: useBreakpointPropsType<P>): useBreakpointPropsType<P> => {\r\n const bpoint = useBreakpoint()\r\n const cachekey = JSON.stringify(props, (key, value) => {\r\n return key === '_owner' || key === '_store' ? undefined : value;\r\n }, 2);\r\n\r\n const bprops = useMemo(() => {\r\n let bprops: any = []\r\n let bkeys = ['xs', 'sm', 'md', 'lg', 'xl']\r\n\r\n for (let prop in props) {\r\n let val = (props as any)[prop]\r\n if (!isValidElement(val) && typeof val === 'object' && val !== null && Object.keys(val).some(k => bkeys.includes(k))) {\r\n bprops.push(prop)\r\n }\r\n }\r\n return bprops\r\n }, [cachekey]);\r\n\r\n\r\n if (bprops.length === 0) return props;\r\n\r\n const format: any = {\r\n xs: {},\r\n sm: {},\r\n md: {},\r\n lg: {},\r\n xl: {}\r\n }\r\n\r\n for (let prop of bprops) {\r\n let val = (props as any)[prop]\r\n for (let bp in val) {\r\n format[bp][prop] = val[bp]\r\n }\r\n }\r\n\r\n let _props = format.xs || {};\r\n for (let key of ['sm', 'md', 'lg', 'xl']) {\r\n if (bpoint.isDown(key as any)) break;\r\n if (bpoint.isOrUp(key as any)) {\r\n _props = { ..._props, ...format[key] };\r\n }\r\n }\r\n\r\n return {\r\n ...props,\r\n ..._props\r\n };\r\n}\r\n\r\n\r\n\r\nexport default useBreakpointProps"],"names":[],"mappings":";;;AAQA,MAAM,kBAAkB,GAAG,CAAmB,KAAgC,KAA+B;AAC1G,IAAA,MAAM,MAAM,GAAG,aAAa,EAAE;AAC9B,IAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,GAAG,EAAE,KAAK,KAAI;AACnD,QAAA,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,QAAQ,GAAG,SAAS,GAAG,KAAK;IAClE,CAAC,EAAE,CAAC,CAAC;AAEL,IAAA,MAAM,MAAM,GAAG,OAAO,CAAC,MAAK;QACzB,IAAI,MAAM,GAAQ,EAAE;AACpB,QAAA,IAAI,KAAK,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;AAE1C,QAAA,KAAK,IAAI,IAAI,IAAI,KAAK,EAAE;AACrB,YAAA,IAAI,GAAG,GAAI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MAAM,CAAA,EAAK,MAAM,CAAC,GAAG,CAAC,CAAE;QACzC;IACH;IAEA,OAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACM,KAAK,CAAA,EACL,MAAM,CAAA;AAEf;;;;"}
|
package/css/aliases.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const isStr = (v, or) => typeof v === 'string' ? v : or;
|
|
2
4
|
const aliases = {
|
|
3
5
|
bgcolor: (v) => ({ backgroundColor: v }),
|
|
4
6
|
bgimage: (v) => ({ backgroundImage: `url(${v})`, backgroundSize: "cover", backgroundRepeat: "no-repeat" }),
|
|
@@ -26,4 +28,7 @@ const aliases = {
|
|
|
26
28
|
flexWraped: (v) => (v ? { flexWrap: "wrap" } : {}),
|
|
27
29
|
direction: (v) => (v === 'row' || v === 'column' ? { flexDirection: v } : { direction: v }),
|
|
28
30
|
gap: (v) => ({ gap: isStr(v, 8 * v) }),
|
|
29
|
-
};
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
module.exports = aliases;
|
|
34
|
+
//# sourceMappingURL=aliases.js.map
|
package/css/aliases.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aliases.js","sources":["../../src/css/aliases.ts"],"sourcesContent":["import { OptionAliases } from 'oncss'\nimport { Aliases } from './types'\n\nconst isStr = (v: any, or: any) => typeof v === 'string' ? v : or\n\nconst aliases: OptionAliases<Aliases> = {\n bgcolor: (v) => ({ backgroundColor: v }),\n bgimage: (v) => ({ backgroundImage: `url(${v})`, backgroundSize: \"cover\", backgroundRepeat: \"no-repeat\" }),\n bg: (v) => ({ background: v }),\n p: (v) => ({ padding: isStr(v, 8 * v) }),\n pt: (v) => ({ paddingTop: isStr(v, 8 * v) }),\n pr: (v) => ({ paddingRight: isStr(v, 8 * v) }),\n pb: (v) => ({ paddingBottom: isStr(v, 8 * v) }),\n pl: (v) => ({ paddingLeft: isStr(v, 8 * v) }),\n px: (v) => ({ paddingLeft: isStr(v, 8 * v), paddingRight: isStr(v, 8 * v) }),\n py: (v) => ({ paddingTop: isStr(v, 8 * v), paddingBottom: isStr(v, 8 * v) }),\n m: (v) => ({ margin: isStr(v, 8 * v) }),\n mt: (v) => ({ marginTop: isStr(v, 8 * v) }),\n mr: (v) => ({ marginRight: isStr(v, 8 * v) }),\n mb: (v) => ({ marginBottom: isStr(v, 8 * v) }),\n ml: (v) => ({ marginLeft: isStr(v, 8 * v) }),\n mx: (v) => ({ marginLeft: isStr(v, 8 * v), marginRight: isStr(v, 8 * v) }),\n my: (v) => ({ marginTop: isStr(v, 8 * v), marginBottom: isStr(v, 8 * v) }),\n radius: (v) => ({ borderRadius: isStr(v, 8 * v) }),\n borderRadius: (v) => ({ borderRadius: isStr(v, 8 * v) }),\n shadow: (v) => ({ boxShadow: v }),\n flexBox: (v) => (v ? { display: \"flex\" } : {}),\n flexRow: (v) => (v ? { flexDirection: \"row\" } : {}),\n flexColumn: (v) => (v ? { flexDirection: \"column\" } : {}),\n flexWraped: (v) => (v ? { flexWrap: \"wrap\" } : {}),\n direction: (v) => (v === 'row' || v === 'column' ? { flexDirection: v } : { direction: v }),\n gap: (v) => ({ gap: isStr(v, 8 * v) }),\n};\n\nexport default aliases"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"aliases.js","sources":["../../src/css/aliases.ts"],"sourcesContent":["import { OptionAliases } from 'oncss'\r\nimport { Aliases } from './types'\r\n\r\nconst isStr = (v: any, or: any) => typeof v === 'string' ? v : or\r\n\r\nconst aliases: OptionAliases<Aliases> = {\r\n bgcolor: (v) => ({ backgroundColor: v }),\r\n bgimage: (v) => ({ backgroundImage: `url(${v})`, backgroundSize: \"cover\", backgroundRepeat: \"no-repeat\" }),\r\n bg: (v) => ({ background: v }),\r\n p: (v) => ({ padding: isStr(v, 8 * v) }),\r\n pt: (v) => ({ paddingTop: isStr(v, 8 * v) }),\r\n pr: (v) => ({ paddingRight: isStr(v, 8 * v) }),\r\n pb: (v) => ({ paddingBottom: isStr(v, 8 * v) }),\r\n pl: (v) => ({ paddingLeft: isStr(v, 8 * v) }),\r\n px: (v) => ({ paddingLeft: isStr(v, 8 * v), paddingRight: isStr(v, 8 * v) }),\r\n py: (v) => ({ paddingTop: isStr(v, 8 * v), paddingBottom: isStr(v, 8 * v) }),\r\n m: (v) => ({ margin: isStr(v, 8 * v) }),\r\n mt: (v) => ({ marginTop: isStr(v, 8 * v) }),\r\n mr: (v) => ({ marginRight: isStr(v, 8 * v) }),\r\n mb: (v) => ({ marginBottom: isStr(v, 8 * v) }),\r\n ml: (v) => ({ marginLeft: isStr(v, 8 * v) }),\r\n mx: (v) => ({ marginLeft: isStr(v, 8 * v), marginRight: isStr(v, 8 * v) }),\r\n my: (v) => ({ marginTop: isStr(v, 8 * v), marginBottom: isStr(v, 8 * v) }),\r\n radius: (v) => ({ borderRadius: isStr(v, 8 * v) }),\r\n borderRadius: (v) => ({ borderRadius: isStr(v, 8 * v) }),\r\n shadow: (v) => ({ boxShadow: v }),\r\n flexBox: (v) => (v ? { display: \"flex\" } : {}),\r\n flexRow: (v) => (v ? { flexDirection: \"row\" } : {}),\r\n flexColumn: (v) => (v ? { flexDirection: \"column\" } : {}),\r\n flexWraped: (v) => (v ? { flexWrap: \"wrap\" } : {}),\r\n direction: (v) => (v === 'row' || v === 'column' ? { flexDirection: v } : { direction: v }),\r\n gap: (v) => ({ gap: isStr(v, 8 * v) }),\r\n};\r\n\r\nexport default aliases"],"names":[],"mappings":";;AAGA,MAAM,KAAK,GAAG,CAAC,CAAM,EAAE,EAAO,KAAK,OAAO,CAAC,KAAK,QAAQ,GAAG,CAAC,GAAG,EAAE;AAEjE,MAAM,OAAO,GAA2B;AACrC,IAAA,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,eAAe,EAAE,CAAC,EAAE,CAAC;IACxC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE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AAC,EAAE,CAAC;IACjC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;IAC9C,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;IACnD,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC;IACzD,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AAClD,IAAA,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,QAAQ,GAAG,EAAE,aAAa,EAAE,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;AAC3F,IAAA,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;;;;;"}
|
package/css/aliases.mjs
CHANGED
|
@@ -26,4 +26,7 @@ const aliases = {
|
|
|
26
26
|
flexWraped: (v) => (v ? { flexWrap: "wrap" } : {}),
|
|
27
27
|
direction: (v) => (v === 'row' || v === 'column' ? { flexDirection: v } : { direction: v }),
|
|
28
28
|
gap: (v) => ({ gap: isStr(v, 8 * v) }),
|
|
29
|
-
};
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export { aliases as default };
|
|
32
|
+
//# sourceMappingURL=aliases.mjs.map
|
package/css/aliases.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aliases.mjs","sources":["../../src/css/aliases.ts"],"sourcesContent":["import { OptionAliases } from 'oncss'\nimport { Aliases } from './types'\n\nconst isStr = (v: any, or: any) => typeof v === 'string' ? v : or\n\nconst aliases: OptionAliases<Aliases> = {\n bgcolor: (v) => ({ backgroundColor: v }),\n bgimage: (v) => ({ backgroundImage: `url(${v})`, backgroundSize: \"cover\", backgroundRepeat: \"no-repeat\" }),\n bg: (v) => ({ background: v }),\n p: (v) => ({ padding: isStr(v, 8 * v) }),\n pt: (v) => ({ paddingTop: isStr(v, 8 * v) }),\n pr: (v) => ({ paddingRight: isStr(v, 8 * v) }),\n pb: (v) => ({ paddingBottom: isStr(v, 8 * v) }),\n pl: (v) => ({ paddingLeft: isStr(v, 8 * v) }),\n px: (v) => ({ paddingLeft: isStr(v, 8 * v), paddingRight: isStr(v, 8 * v) }),\n py: (v) => ({ paddingTop: isStr(v, 8 * v), paddingBottom: isStr(v, 8 * v) }),\n m: (v) => ({ margin: isStr(v, 8 * v) }),\n mt: (v) => ({ marginTop: isStr(v, 8 * v) }),\n mr: (v) => ({ marginRight: isStr(v, 8 * v) }),\n mb: (v) => ({ marginBottom: isStr(v, 8 * v) }),\n ml: (v) => ({ marginLeft: isStr(v, 8 * v) }),\n mx: (v) => ({ marginLeft: isStr(v, 8 * v), marginRight: isStr(v, 8 * v) }),\n my: (v) => ({ marginTop: isStr(v, 8 * v), marginBottom: isStr(v, 8 * v) }),\n radius: (v) => ({ borderRadius: isStr(v, 8 * v) }),\n borderRadius: (v) => ({ borderRadius: isStr(v, 8 * v) }),\n shadow: (v) => ({ boxShadow: v }),\n flexBox: (v) => (v ? { display: \"flex\" } : {}),\n flexRow: (v) => (v ? { flexDirection: \"row\" } : {}),\n flexColumn: (v) => (v ? { flexDirection: \"column\" } : {}),\n flexWraped: (v) => (v ? { flexWrap: \"wrap\" } : {}),\n direction: (v) => (v === 'row' || v === 'column' ? { flexDirection: v } : { direction: v }),\n gap: (v) => ({ gap: isStr(v, 8 * v) }),\n};\n\nexport default aliases"],"names":[],"mappings":"AAGA,MAAM,KAAK,GAAG,CAAC,CAAM,EAAE,EAAO,KAAK,OAAO,CAAC,KAAK,QAAQ,GAAG,CAAC,GAAG,EAAE;AAEjE,MAAM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YAAY,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;AACxD,IAAA,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IACjC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;IAC9C,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;IACnD,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC;IACzD,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AAClD,IAAA,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,QAAQ,GAAG,EAAE,aAAa,EAAE,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;AAC3F,IAAA,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC
|
|
1
|
+
{"version":3,"file":"aliases.mjs","sources":["../../src/css/aliases.ts"],"sourcesContent":["import { OptionAliases } from 'oncss'\r\nimport { Aliases } from './types'\r\n\r\nconst isStr = (v: any, or: any) => typeof v === 'string' ? v : or\r\n\r\nconst aliases: OptionAliases<Aliases> = {\r\n bgcolor: (v) => ({ backgroundColor: v }),\r\n bgimage: (v) => ({ backgroundImage: `url(${v})`, backgroundSize: \"cover\", backgroundRepeat: \"no-repeat\" }),\r\n bg: (v) => ({ background: v }),\r\n p: (v) => ({ padding: isStr(v, 8 * v) }),\r\n pt: (v) => ({ paddingTop: isStr(v, 8 * v) }),\r\n pr: (v) => ({ paddingRight: isStr(v, 8 * v) }),\r\n pb: (v) => ({ paddingBottom: isStr(v, 8 * v) }),\r\n pl: (v) => ({ paddingLeft: isStr(v, 8 * v) }),\r\n px: (v) => ({ paddingLeft: isStr(v, 8 * v), paddingRight: isStr(v, 8 * v) }),\r\n py: (v) => ({ paddingTop: isStr(v, 8 * v), paddingBottom: isStr(v, 8 * v) }),\r\n m: (v) => ({ margin: isStr(v, 8 * v) }),\r\n mt: (v) => ({ marginTop: isStr(v, 8 * v) }),\r\n mr: (v) => ({ marginRight: isStr(v, 8 * v) }),\r\n mb: (v) => ({ marginBottom: isStr(v, 8 * v) }),\r\n ml: (v) => ({ marginLeft: isStr(v, 8 * v) }),\r\n mx: (v) => ({ marginLeft: isStr(v, 8 * v), marginRight: isStr(v, 8 * v) }),\r\n my: (v) => ({ marginTop: isStr(v, 8 * v), marginBottom: isStr(v, 8 * v) }),\r\n radius: (v) => ({ borderRadius: isStr(v, 8 * v) }),\r\n borderRadius: (v) => ({ borderRadius: isStr(v, 8 * v) }),\r\n shadow: (v) => ({ boxShadow: v }),\r\n flexBox: (v) => (v ? { display: \"flex\" } : {}),\r\n flexRow: (v) => (v ? { flexDirection: \"row\" } : {}),\r\n flexColumn: (v) => (v ? { flexDirection: \"column\" } : {}),\r\n flexWraped: (v) => (v ? { flexWrap: \"wrap\" } : {}),\r\n direction: (v) => (v === 'row' || v === 'column' ? { flexDirection: v } : { direction: v }),\r\n gap: (v) => ({ gap: isStr(v, 8 * v) }),\r\n};\r\n\r\nexport default aliases"],"names":[],"mappings":"AAGA,MAAM,KAAK,GAAG,CAAC,CAAM,EAAE,EAAO,KAAK,OAAO,CAAC,KAAK,QAAQ,GAAG,CAAC,GAAG,EAAE;AAEjE,MAAM,OAAO,GAA2B;AACrC,IAAA,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,eAAe,EAAE,CAAC,EAAE,CAAC;IACxC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,eAAe,EAAE,CAAA,I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C,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;IAC9C,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;IACnD,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC;IACzD,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AAClD,IAAA,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,QAAQ,GAAG,EAAE,aAAa,EAAE,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;AAC3F,IAAA,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;;;;;"}
|
package/css/getProps.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const getProps = (prop, value, _css) => {
|
|
2
4
|
if (typeof value === 'string') {
|
|
3
5
|
const split = value.split("!");
|
|
4
6
|
split[1] ? "!important" : "";
|
|
@@ -48,4 +50,7 @@
|
|
|
48
50
|
// }
|
|
49
51
|
// return p
|
|
50
52
|
// }
|
|
51
|
-
};
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
module.exports = getProps;
|
|
56
|
+
//# sourceMappingURL=getProps.js.map
|
package/css/getProps.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getProps.js","sources":["../../src/css/getProps.ts"],"sourcesContent":["import { CSSProps } from \"./types\";\n\nconst getProps = (prop: string, value: string, _css: CSSProps) => {\n let important;\n if (typeof value === 'string') {\n const split = value.split(\"!\")\n important = split[1] ? \"!important\" : \"\"\n value = split[0]\n }\n\n if (prop === 'disabled') {\n if ((value as any) === true) {\n let c: any = {\n pointerEvents: \"none!important\",\n cursor: \"default!important\",\n userSelect: \"none!important\",\n opacity: \"0.5!important\",\n color: `text.primary!important`,\n borderColor: `divider.secondary!important`,\n }\n\n if ((_css as any).bgcolor && (_css as any).bgcolor !== 'transparent') {\n c.bgcolor = `divider.primary!important`\n }\n return c\n }\n return {}\n }\n\n\n if (prop === \"spacing\" && typeof value === \"number\") {\n const val = value * 8;\n const hasWidth = \"width\" in _css;\n const width = `calc(${hasWidth ? _css.width : \"100%\"} + ${val}px)`;\n return {\n marginLeft: `-${val}px`,\n marginTop: `-${val}px`,\n width: width,\n\n \"& > *\": {\n paddingLeft: `${val}px`,\n paddingTop: `${val}px`,\n },\n } as any;\n }\n\n\n\n // if (value && typeof value === \"number\" && [\"border\", \"borderRight\", \"borderLeft\", \"borderTop\", \"borderBottom\"].includes(prop as any)) {\n // const keys: any = Object.keys(_css)\n // let p: any = {\n // [`${prop}Width`]: value + 'px' + (important || \"\"),\n // }\n // // if (!keys.includes(`${prop}Color`)) {\n // // p[`${prop}Color`] = \"divider.primary\"\n // // }\n // if (!keys.includes(`${prop}Style`)) {\n // p[`${prop}Style`] = \"solid\"\n // }\n // return p\n // }\n}\n\nexport default getProps"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getProps.js","sources":["../../src/css/getProps.ts"],"sourcesContent":["import { CSSProps } from \"./types\";\r\n\r\nconst getProps = (prop: string, value: string, _css: CSSProps) => {\r\n let important;\r\n if (typeof value === 'string') {\r\n const split = value.split(\"!\")\r\n important = split[1] ? \"!important\" : \"\"\r\n value = split[0]\r\n }\r\n\r\n if (prop === 'disabled') {\r\n if ((value as any) === true) {\r\n let c: any = {\r\n pointerEvents: \"none!important\",\r\n cursor: \"default!important\",\r\n userSelect: \"none!important\",\r\n opacity: \"0.5!important\",\r\n color: `text.primary!important`,\r\n borderColor: `divider.secondary!important`,\r\n }\r\n\r\n if ((_css as any).bgcolor && (_css as any).bgcolor !== 'transparent') {\r\n c.bgcolor = `divider.primary!important`\r\n }\r\n return c\r\n }\r\n return {}\r\n }\r\n\r\n\r\n if (prop === \"spacing\" && typeof value === \"number\") {\r\n const val = value * 8;\r\n const hasWidth = \"width\" in _css;\r\n const width = `calc(${hasWidth ? _css.width : \"100%\"} + ${val}px)`;\r\n return {\r\n marginLeft: `-${val}px`,\r\n marginTop: `-${val}px`,\r\n width: width,\r\n\r\n \"& > *\": {\r\n paddingLeft: `${val}px`,\r\n paddingTop: `${val}px`,\r\n },\r\n } as any;\r\n }\r\n\r\n\r\n\r\n // if (value && typeof value === \"number\" && [\"border\", \"borderRight\", \"borderLeft\", \"borderTop\", \"borderBottom\"].includes(prop as any)) {\r\n // const keys: any = Object.keys(_css)\r\n // let p: any = {\r\n // [`${prop}Width`]: value + 'px' + (important || \"\"),\r\n // }\r\n // // if (!keys.includes(`${prop}Color`)) {\r\n // // p[`${prop}Color`] = \"divider.primary\"\r\n // // }\r\n // if (!keys.includes(`${prop}Style`)) {\r\n // p[`${prop}Style`] = \"solid\"\r\n // }\r\n // return p\r\n // }\r\n}\r\n\r\nexport default getProps"],"names":[],"mappings":";;AAEA,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,KAAa,EAAE,IAAc,KAAI;AAE7D,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC3B,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;AAC9B,QAAY,KAAK,CAAC,CAAC,CAAC,GAAG,YAAY,GAAG,EAAE;AACxC,QAAA,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC;IACpB;AAEA,IAAA,IAAI,IAAI,KAAK,UAAU,EAAE;AACrB,QAAA,IAAK,KAAa,KAAK,IAAI,EAAE;AACzB,YAAA,IAAI,CAAC,GAAQ;AACT,gBAAA,aAAa,EAAE,gBAAgB;AAC/B,gBAAA,MAAM,EAAE,mBAAmB;AAC3B,gBAAA,UAAU,EAAE,gBAAgB;AAC5B,gBAAA,OAAO,EAAE,eAAe;AACxB,gBAAA,KAAK,EAAE,CAAA,sBAAA,CAAwB;AAC/B,gBAAA,WAAW,EAAE,CAAA,2BAAA,CAA6B;aAC7C;YAED,IAAK,IAAY,CAAC,OAAO,IAAK,IAAY,CAAC,OAAO,KAAK,aAAa,EAAE;AAClE,gBAAA,CAAC,CAAC,OAAO,GAAG,CAAA,yBAAA,CAA2B;YAC3C;AACA,YAAA,OAAO,CAAC;QACZ;AACA,QAAA,OAAO,EAAE;IACb;IAGA,IAAI,IAAI,KAAK,SAAS,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACjD,QAAA,MAAM,GAAG,GAAG,KAAK,GAAG,CAAC;AACrB,QAAA,MAAM,QAAQ,GAAG,OAAO,IAAI,IAAI;AAChC,QAAA,MAAM,KAAK,GAAG,CAAA,KAAA,EAAQ,QAAQ,GAAG,IAAI,CAAC,KAAK,GAAG,MAAM,CAAA,GAAA,EAAM,GAAG,KAAK;QAClE,OAAO;YACH,UAAU,EAAE,CAAA,CAAA,EAAI,GAAG,CAAA,EAAA,CAAI;YACvB,SAAS,EAAE,CAAA,CAAA,EAAI,GAAG,CAAA,EAAA,CAAI;AACtB,YAAA,KAAK,EAAE,KAAK;AAEZ,YAAA,OAAO,EAAE;gBACL,WAAW,EAAE,CAAA,EAAG,GAAG,CAAA,EAAA,CAAI;gBACvB,UAAU,EAAE,CAAA,EAAG,GAAG,CAAA,EAAA,CAAI;AACzB,aAAA;SACG;IACZ;;;;;;;;;;;;;;AAiBJ;;;;"}
|
package/css/getProps.mjs
CHANGED
package/css/getProps.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getProps.mjs","sources":["../../src/css/getProps.ts"],"sourcesContent":["import { CSSProps } from \"./types\";\n\nconst getProps = (prop: string, value: string, _css: CSSProps) => {\n let important;\n if (typeof value === 'string') {\n const split = value.split(\"!\")\n important = split[1] ? \"!important\" : \"\"\n value = split[0]\n }\n\n if (prop === 'disabled') {\n if ((value as any) === true) {\n let c: any = {\n pointerEvents: \"none!important\",\n cursor: \"default!important\",\n userSelect: \"none!important\",\n opacity: \"0.5!important\",\n color: `text.primary!important`,\n borderColor: `divider.secondary!important`,\n }\n\n if ((_css as any).bgcolor && (_css as any).bgcolor !== 'transparent') {\n c.bgcolor = `divider.primary!important`\n }\n return c\n }\n return {}\n }\n\n\n if (prop === \"spacing\" && typeof value === \"number\") {\n const val = value * 8;\n const hasWidth = \"width\" in _css;\n const width = `calc(${hasWidth ? _css.width : \"100%\"} + ${val}px)`;\n return {\n marginLeft: `-${val}px`,\n marginTop: `-${val}px`,\n width: width,\n\n \"& > *\": {\n paddingLeft: `${val}px`,\n paddingTop: `${val}px`,\n },\n } as any;\n }\n\n\n\n // if (value && typeof value === \"number\" && [\"border\", \"borderRight\", \"borderLeft\", \"borderTop\", \"borderBottom\"].includes(prop as any)) {\n // const keys: any = Object.keys(_css)\n // let p: any = {\n // [`${prop}Width`]: value + 'px' + (important || \"\"),\n // }\n // // if (!keys.includes(`${prop}Color`)) {\n // // p[`${prop}Color`] = \"divider.primary\"\n // // }\n // if (!keys.includes(`${prop}Style`)) {\n // p[`${prop}Style`] = \"solid\"\n // }\n // return p\n // }\n}\n\nexport default getProps"],"names":[],"mappings":"AAEA,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,KAAa,EAAE,IAAc,KAAI;AAE7D,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC3B,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;AAC9B,QAAY,KAAK,CAAC,CAAC,CAAC,GAAG,YAAY,GAAG,EAAE;AACxC,QAAA,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC;IACpB;AAEA,IAAA,IAAI,IAAI,KAAK,UAAU,EAAE;AACrB,QAAA,IAAK,KAAa,KAAK,IAAI,EAAE;AACzB,YAAA,IAAI,CAAC,GAAQ;AACT,gBAAA,aAAa,EAAE,gBAAgB;AAC/B,gBAAA,MAAM,EAAE,mBAAmB;AAC3B,gBAAA,UAAU,EAAE,gBAAgB;AAC5B,gBAAA,OAAO,EAAE,eAAe;AACxB,gBAAA,KAAK,EAAE,CAAA,sBAAA,CAAwB;AAC/B,gBAAA,WAAW,EAAE,CAAA,2BAAA,CAA6B;aAC7C;YAED,IAAK,IAAY,CAAC,OAAO,IAAK,IAAY,CAAC,OAAO,KAAK,aAAa,EAAE;AAClE,gBAAA,CAAC,CAAC,OAAO,GAAG,CAAA,yBAAA,CAA2B;YAC3C;AACA,YAAA,OAAO,CAAC;QACZ;AACA,QAAA,OAAO,EAAE;IACb;IAGA,IAAI,IAAI,KAAK,SAAS,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACjD,QAAA,MAAM,GAAG,GAAG,KAAK,GAAG,CAAC;AACrB,QAAA,MAAM,QAAQ,GAAG,OAAO,IAAI,IAAI;AAChC,QAAA,MAAM,KAAK,GAAG,CAAA,KAAA,EAAQ,QAAQ,GAAG,IAAI,CAAC,KAAK,GAAG,MAAM,CAAA,GAAA,EAAM,GAAG,KAAK;QAClE,OAAO;YACH,UAAU,EAAE,CAAA,CAAA,EAAI,GAAG,CAAA,EAAA,CAAI;YACvB,SAAS,EAAE,CAAA,CAAA,EAAI,GAAG,CAAA,EAAA,CAAI;AACtB,YAAA,KAAK,EAAE,KAAK;AAEZ,YAAA,OAAO,EAAE;gBACL,WAAW,EAAE,CAAA,EAAG,GAAG,CAAA,EAAA,CAAI;gBACvB,UAAU,EAAE,CAAA,EAAG,GAAG,CAAA,EAAA,CAAI;AACzB,aAAA;SACG;IACZ;;;;;;;;;;;;;;AAiBJ"}
|
|
1
|
+
{"version":3,"file":"getProps.mjs","sources":["../../src/css/getProps.ts"],"sourcesContent":["import { CSSProps } from \"./types\";\r\n\r\nconst getProps = (prop: string, value: string, _css: CSSProps) => {\r\n let important;\r\n if (typeof value === 'string') {\r\n const split = value.split(\"!\")\r\n important = split[1] ? \"!important\" : \"\"\r\n value = split[0]\r\n }\r\n\r\n if (prop === 'disabled') {\r\n if ((value as any) === true) {\r\n let c: any = {\r\n pointerEvents: \"none!important\",\r\n cursor: \"default!important\",\r\n userSelect: \"none!important\",\r\n opacity: \"0.5!important\",\r\n color: `text.primary!important`,\r\n borderColor: `divider.secondary!important`,\r\n }\r\n\r\n if ((_css as any).bgcolor && (_css as any).bgcolor !== 'transparent') {\r\n c.bgcolor = `divider.primary!important`\r\n }\r\n return c\r\n }\r\n return {}\r\n }\r\n\r\n\r\n if (prop === \"spacing\" && typeof value === \"number\") {\r\n const val = value * 8;\r\n const hasWidth = \"width\" in _css;\r\n const width = `calc(${hasWidth ? _css.width : \"100%\"} + ${val}px)`;\r\n return {\r\n marginLeft: `-${val}px`,\r\n marginTop: `-${val}px`,\r\n width: width,\r\n\r\n \"& > *\": {\r\n paddingLeft: `${val}px`,\r\n paddingTop: `${val}px`,\r\n },\r\n } as any;\r\n }\r\n\r\n\r\n\r\n // if (value && typeof value === \"number\" && [\"border\", \"borderRight\", \"borderLeft\", \"borderTop\", \"borderBottom\"].includes(prop as any)) {\r\n // const keys: any = Object.keys(_css)\r\n // let p: any = {\r\n // [`${prop}Width`]: value + 'px' + (important || \"\"),\r\n // }\r\n // // if (!keys.includes(`${prop}Color`)) {\r\n // // p[`${prop}Color`] = \"divider.primary\"\r\n // // }\r\n // if (!keys.includes(`${prop}Style`)) {\r\n // p[`${prop}Style`] = \"solid\"\r\n // }\r\n // return p\r\n // }\r\n}\r\n\r\nexport default getProps"],"names":[],"mappings":"AAEA,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,KAAa,EAAE,IAAc,KAAI;AAE7D,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC3B,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;AAC9B,QAAY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zB,aAAA;SACG;IACZ;;;;;;;;;;;;;;AAiBJ;;;;"}
|
package/css/getValue.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const getColor = (color, hasText = true) => {
|
|
2
4
|
const i = {
|
|
3
5
|
[`${color}`]: `var(--color-${color}-primary)`,
|
|
4
6
|
[`${color}.primary`]: `var(--color-${color}-primary)`,
|
|
@@ -94,4 +96,7 @@ const getValue = (prop, value, _css) => {
|
|
|
94
96
|
return withImportant(important, `var(--shadow-${value})`);
|
|
95
97
|
}
|
|
96
98
|
return withImportant(important, colors[value] || value);
|
|
97
|
-
};
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
module.exports = getValue;
|
|
102
|
+
//# sourceMappingURL=getValue.js.map
|
package/css/getValue.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getValue.js","sources":["../../src/css/getValue.ts"],"sourcesContent":["import { CSSProps } from \"./types\"\n\nconst getColor = (color: string, hasText = true) => {\n const i = {\n [`${color}`]: `var(--color-${color}-primary)`,\n [`${color}.primary`]: `var(--color-${color}-primary)`,\n [`${color}.secondary`]: `var(--color-${color}-secondary)`,\n [`${color}.soft.primary`]: `var(--color-${color}-soft-primary)`,\n [`${color}.soft.secondary`]: `var(--color-${color}-soft-secondary)`,\n }\n if (hasText) {\n i[`${color}.text`] = `var(--color-${color}-text)`\n }\n\n return i\n}\n\nconst withImportant = (important: any, value: any) => important ? value + important : value\nconst colors: any = {\n ...getColor(\"background\", false),\n ...getColor(\"text\", false),\n ...getColor(\"divider\", false),\n ...getColor(\"brand\"),\n ...getColor(\"accent\"),\n ...getColor(\"info\"),\n ...getColor(\"success\"),\n ...getColor(\"warning\"),\n ...getColor(\"danger\"),\n}\n\nconst breakpoints: any = {\n \"xs\": \"var(--bp-xs)\",\n \"sm\": \"var(--bp-sm)\",\n \"md\": \"var(--bp-md)\",\n \"lg\": \"var(--bp-lg)\",\n \"xl\": \"var(--bp-xl)\"\n}\n\nlet fontsizes: any = {\n \"h1\": \"var(--fontsize-h1)\",\n \"h2\": \"var(--fontsize-h2)\",\n \"h3\": \"var(--fontsize-h3)\",\n \"h4\": \"var(--fontsize-h4)\",\n \"h5\": \"var(--fontsize-h5)\",\n \"h6\": \"var(--fontsize-h6)\",\n \"big\": \"var(--fontsize-big)\",\n \"text\": \"var(--fontsize-text)\",\n \"button\": \"var(--fontsize-button)\",\n \"small\": \"var(--fontsize-small)\"\n}\n\nlet lineHeights: any = {\n \"h1\": \"var(--lineheight-h1)\",\n \"h2\": \"var(--lineheight-h2)\",\n \"h3\": \"var(--lineheight-h3)\",\n \"h4\": \"var(--lineheight-h4)\",\n \"h5\": \"var(--lineheight-h5)\",\n \"h6\": \"var(--lineheight-h6)\",\n \"big\": \"var(--lineheight-big)\",\n \"text\": \"var(--lineheight-text)\",\n \"button\": \"var(--lineheight-button)\",\n \"small\": \"var(--lineheight-small)\"\n}\n\nlet fontWeights: any = {\n \"h1\": \"var(--fontweight-h1)\",\n \"h2\": \"var(--fontweight-h2)\",\n \"h3\": \"var(--fontweight-h3)\",\n \"h4\": \"var(--fontweight-h4)\",\n \"h5\": \"var(--fontweight-h5)\",\n \"h6\": \"var(--fontweight-h6)\",\n \"big\": \"var(--fontweight-big)\",\n \"text\": \"var(--fontweight-text)\",\n \"button\": \"var(--fontweight-button)\",\n \"small\": \"var(--fontweight-small)\"\n}\n\nlet font: any = {\n \"h1\": \"var(--font-h1)\",\n \"h2\": \"var(--font-h2)\",\n \"h3\": \"var(--font-h3)\",\n \"h4\": \"var(--font-h4)\",\n \"h5\": \"var(--font-h5)\",\n \"h6\": \"var(--font-h6)\",\n \"big\": \"var(--font-big)\",\n \"text\": \"var(--font-text)\",\n \"button\": \"var(--font-button)\",\n \"small\": \"var(--font-small)\"\n}\n\nconst getValue = (prop: any, value: string | number, _css: CSSProps): any => {\n let important;\n\n if (typeof value === 'string') {\n const split = value.split(\"!\")\n important = split[1] ? \"!important\" : \"\"\n value = split[0]\n }\n\n\n if (['width', 'maxWidth', 'minWidth', 'max-width', 'min-width'].includes(prop)) {\n return withImportant(important, breakpoints[value] || value)\n } else if (prop === 'font' && typeof value === \"string\" && ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'text', 'button', 'small'].includes(value)) {\n return withImportant(important, font[value] || value)\n } else if (['fontWeight', 'font-weight'].includes(prop) && typeof value === 'string' && ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'text', 'button', 'small'].includes(value)) {\n return withImportant(important, fontWeights[value] || value)\n } else if (['lineHeight', 'line-height'].includes(prop) && typeof value === 'string' && ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'text', 'button', 'small'].includes(value)) {\n return withImportant(important, lineHeights[value] || value)\n } else if (['fontSize', 'font-size'].includes(prop) && typeof value === 'string') {\n return withImportant(important, fontsizes[value] || value)\n } else if (typeof value === \"number\" && [\"shadow\", \"boxShadow\"].includes(prop)) {\n return withImportant(important, `var(--shadow-${value})`)\n }\n\n return withImportant(important, colors[value] || value)\n}\n\nexport default getValue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getValue.js","sources":["../../src/css/getValue.ts"],"sourcesContent":["import { CSSProps } from \"./types\"\r\n\r\nconst getColor = (color: string, hasText = true) => {\r\n const i = {\r\n [`${color}`]: `var(--color-${color}-primary)`,\r\n [`${color}.primary`]: `var(--color-${color}-primary)`,\r\n [`${color}.secondary`]: `var(--color-${color}-secondary)`,\r\n [`${color}.soft.primary`]: `var(--color-${color}-soft-primary)`,\r\n [`${color}.soft.secondary`]: `var(--color-${color}-soft-secondary)`,\r\n }\r\n if (hasText) {\r\n i[`${color}.text`] = `var(--color-${color}-text)`\r\n }\r\n\r\n return i\r\n}\r\n\r\nconst withImportant = (important: any, value: any) => important ? value + important : value\r\nconst colors: any = {\r\n ...getColor(\"background\", false),\r\n ...getColor(\"text\", false),\r\n ...getColor(\"divider\", false),\r\n ...getColor(\"brand\"),\r\n ...getColor(\"accent\"),\r\n ...getColor(\"info\"),\r\n ...getColor(\"success\"),\r\n ...getColor(\"warning\"),\r\n ...getColor(\"danger\"),\r\n}\r\n\r\nconst breakpoints: any = {\r\n \"xs\": \"var(--bp-xs)\",\r\n \"sm\": \"var(--bp-sm)\",\r\n \"md\": \"var(--bp-md)\",\r\n \"lg\": \"var(--bp-lg)\",\r\n \"xl\": \"var(--bp-xl)\"\r\n}\r\n\r\nlet fontsizes: any = {\r\n \"h1\": \"var(--fontsize-h1)\",\r\n \"h2\": \"var(--fontsize-h2)\",\r\n \"h3\": \"var(--fontsize-h3)\",\r\n \"h4\": \"var(--fontsize-h4)\",\r\n \"h5\": \"var(--fontsize-h5)\",\r\n \"h6\": \"var(--fontsize-h6)\",\r\n \"big\": \"var(--fontsize-big)\",\r\n \"text\": \"var(--fontsize-text)\",\r\n \"button\": \"var(--fontsize-button)\",\r\n \"small\": \"var(--fontsize-small)\"\r\n}\r\n\r\nlet lineHeights: any = {\r\n \"h1\": \"var(--lineheight-h1)\",\r\n \"h2\": \"var(--lineheight-h2)\",\r\n \"h3\": \"var(--lineheight-h3)\",\r\n \"h4\": \"var(--lineheight-h4)\",\r\n \"h5\": \"var(--lineheight-h5)\",\r\n \"h6\": \"var(--lineheight-h6)\",\r\n \"big\": \"var(--lineheight-big)\",\r\n \"text\": \"var(--lineheight-text)\",\r\n \"button\": \"var(--lineheight-button)\",\r\n \"small\": \"var(--lineheight-small)\"\r\n}\r\n\r\nlet fontWeights: any = {\r\n \"h1\": \"var(--fontweight-h1)\",\r\n \"h2\": \"var(--fontweight-h2)\",\r\n \"h3\": \"var(--fontweight-h3)\",\r\n \"h4\": \"var(--fontweight-h4)\",\r\n \"h5\": \"var(--fontweight-h5)\",\r\n \"h6\": \"var(--fontweight-h6)\",\r\n \"big\": \"var(--fontweight-big)\",\r\n \"text\": \"var(--fontweight-text)\",\r\n \"button\": \"var(--fontweight-button)\",\r\n \"small\": \"var(--fontweight-small)\"\r\n}\r\n\r\nlet font: any = {\r\n \"h1\": \"var(--font-h1)\",\r\n \"h2\": \"var(--font-h2)\",\r\n \"h3\": \"var(--font-h3)\",\r\n \"h4\": \"var(--font-h4)\",\r\n \"h5\": \"var(--font-h5)\",\r\n \"h6\": \"var(--font-h6)\",\r\n \"big\": \"var(--font-big)\",\r\n \"text\": \"var(--font-text)\",\r\n \"button\": \"var(--font-button)\",\r\n \"small\": \"var(--font-small)\"\r\n}\r\n\r\nconst getValue = (prop: any, value: string | number, _css: CSSProps): any => {\r\n let important;\r\n\r\n if (typeof value === 'string') {\r\n const split = value.split(\"!\")\r\n important = split[1] ? \"!important\" : \"\"\r\n value = split[0]\r\n }\r\n\r\n\r\n if (['width', 'maxWidth', 'minWidth', 'max-width', 'min-width'].includes(prop)) {\r\n return withImportant(important, breakpoints[value] || value)\r\n } else if (prop === 'font' && typeof value === \"string\" && ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'text', 'button', 'small'].includes(value)) {\r\n return withImportant(important, font[value] || value)\r\n } else if (['fontWeight', 'font-weight'].includes(prop) && typeof value === 'string' && ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'text', 'button', 'small'].includes(value)) {\r\n return withImportant(important, fontWeights[value] || value)\r\n } else if (['lineHeight', 'line-height'].includes(prop) && typeof value === 'string' && ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'text', 'button', 'small'].includes(value)) {\r\n return withImportant(important, lineHeights[value] || value)\r\n } else if (['fontSize', 'font-size'].includes(prop) && typeof value === 'string') {\r\n return withImportant(important, fontsizes[value] || value)\r\n } else if (typeof value === \"number\" && [\"shadow\", \"boxShadow\"].includes(prop)) {\r\n return withImportant(important, `var(--shadow-${value})`)\r\n }\r\n\r\n return withImportant(important, colors[value] || value)\r\n}\r\n\r\nexport default getValue"],"names":[],"mappings":";;AAEA,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAE,OAAO,GAAG,IAAI,KAAI;AAC/C,IAAA,MAAM,C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IAC7D;IAEA,OAAO,aAAa,CAAC,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC;AAC3D;;;;"}
|
package/css/getValue.mjs
CHANGED
|
@@ -94,4 +94,7 @@ const getValue = (prop, value, _css) => {
|
|
|
94
94
|
return withImportant(important, `var(--shadow-${value})`);
|
|
95
95
|
}
|
|
96
96
|
return withImportant(important, colors[value] || value);
|
|
97
|
-
};
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export { getValue as default };
|
|
100
|
+
//# sourceMappingURL=getValue.mjs.map
|
package/css/getValue.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getValue.mjs","sources":["../../src/css/getValue.ts"],"sourcesContent":["import { CSSProps } from \"./types\"\n\nconst getColor = (color: string, hasText = true) => {\n const i = {\n [`${color}`]: `var(--color-${color}-primary)`,\n [`${color}.primary`]: `var(--color-${color}-primary)`,\n [`${color}.secondary`]: `var(--color-${color}-secondary)`,\n [`${color}.soft.primary`]: `var(--color-${color}-soft-primary)`,\n [`${color}.soft.secondary`]: `var(--color-${color}-soft-secondary)`,\n }\n if (hasText) {\n i[`${color}.text`] = `var(--color-${color}-text)`\n }\n\n return i\n}\n\nconst withImportant = (important: any, value: any) => important ? value + important : value\nconst colors: any = {\n ...getColor(\"background\", false),\n ...getColor(\"text\", false),\n ...getColor(\"divider\", false),\n ...getColor(\"brand\"),\n ...getColor(\"accent\"),\n ...getColor(\"info\"),\n ...getColor(\"success\"),\n ...getColor(\"warning\"),\n ...getColor(\"danger\"),\n}\n\nconst breakpoints: any = {\n \"xs\": \"var(--bp-xs)\",\n \"sm\": \"var(--bp-sm)\",\n \"md\": \"var(--bp-md)\",\n \"lg\": \"var(--bp-lg)\",\n \"xl\": \"var(--bp-xl)\"\n}\n\nlet fontsizes: any = {\n \"h1\": \"var(--fontsize-h1)\",\n \"h2\": \"var(--fontsize-h2)\",\n \"h3\": \"var(--fontsize-h3)\",\n \"h4\": \"var(--fontsize-h4)\",\n \"h5\": \"var(--fontsize-h5)\",\n \"h6\": \"var(--fontsize-h6)\",\n \"big\": \"var(--fontsize-big)\",\n \"text\": \"var(--fontsize-text)\",\n \"button\": \"var(--fontsize-button)\",\n \"small\": \"var(--fontsize-small)\"\n}\n\nlet lineHeights: any = {\n \"h1\": \"var(--lineheight-h1)\",\n \"h2\": \"var(--lineheight-h2)\",\n \"h3\": \"var(--lineheight-h3)\",\n \"h4\": \"var(--lineheight-h4)\",\n \"h5\": \"var(--lineheight-h5)\",\n \"h6\": \"var(--lineheight-h6)\",\n \"big\": \"var(--lineheight-big)\",\n \"text\": \"var(--lineheight-text)\",\n \"button\": \"var(--lineheight-button)\",\n \"small\": \"var(--lineheight-small)\"\n}\n\nlet fontWeights: any = {\n \"h1\": \"var(--fontweight-h1)\",\n \"h2\": \"var(--fontweight-h2)\",\n \"h3\": \"var(--fontweight-h3)\",\n \"h4\": \"var(--fontweight-h4)\",\n \"h5\": \"var(--fontweight-h5)\",\n \"h6\": \"var(--fontweight-h6)\",\n \"big\": \"var(--fontweight-big)\",\n \"text\": \"var(--fontweight-text)\",\n \"button\": \"var(--fontweight-button)\",\n \"small\": \"var(--fontweight-small)\"\n}\n\nlet font: any = {\n \"h1\": \"var(--font-h1)\",\n \"h2\": \"var(--font-h2)\",\n \"h3\": \"var(--font-h3)\",\n \"h4\": \"var(--font-h4)\",\n \"h5\": \"var(--font-h5)\",\n \"h6\": \"var(--font-h6)\",\n \"big\": \"var(--font-big)\",\n \"text\": \"var(--font-text)\",\n \"button\": \"var(--font-button)\",\n \"small\": \"var(--font-small)\"\n}\n\nconst getValue = (prop: any, value: string | number, _css: CSSProps): any => {\n let important;\n\n if (typeof value === 'string') {\n const split = value.split(\"!\")\n important = split[1] ? \"!important\" : \"\"\n value = split[0]\n }\n\n\n if (['width', 'maxWidth', 'minWidth', 'max-width', 'min-width'].includes(prop)) {\n return withImportant(important, breakpoints[value] || value)\n } else if (prop === 'font' && typeof value === \"string\" && ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'text', 'button', 'small'].includes(value)) {\n return withImportant(important, font[value] || value)\n } else if (['fontWeight', 'font-weight'].includes(prop) && typeof value === 'string' && ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'text', 'button', 'small'].includes(value)) {\n return withImportant(important, fontWeights[value] || value)\n } else if (['lineHeight', 'line-height'].includes(prop) && typeof value === 'string' && ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'text', 'button', 'small'].includes(value)) {\n return withImportant(important, lineHeights[value] || value)\n } else if (['fontSize', 'font-size'].includes(prop) && typeof value === 'string') {\n return withImportant(important, fontsizes[value] || value)\n } else if (typeof value === \"number\" && [\"shadow\", \"boxShadow\"].includes(prop)) {\n return withImportant(important, `var(--shadow-${value})`)\n }\n\n return withImportant(important, colors[value] || value)\n}\n\nexport default getValue"],"names":[],"mappings":"AAEA,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAE,OAAO,GAAG,IAAI,KAAI;AAC/C,IAAA,MAAM,CAAC,GAAG;AACN,QAAA,CAAC,GAAG,KAAK,CAAA,CAAE,GAAG,CAAA,YAAA,EAAe,KAAK,CAAA,SAAA,CAAW;AAC7C,QAAA,CAAC,GAAG,KAAK,CAAA,QAAA,CAAU,GAAG,CAAA,YAAA,EAAe,KAAK,CAAA,SAAA,CAAW;AACrD,QAAA,CAAC,GAAG,KAAK,CAAA,UAAA,CAAY,GAAG,CAAA,YAAA,EAAe,KAAK,CAAA,WAAA,CAAa;AACzD,QAAA,CAAC,GAAG,KAAK,CAAA,aAAA,CAAe,GAAG,CAAA,YAAA,EAAe,KAAK,CAAA,cAAA,CAAgB;AAC/D,QAAA,CAAC,GAAG,KAAK,CAAA,eAAA,CAAiB,GAAG,CAAA,YAAA,EAAe,KAAK,CAAA,gBAAA,CAAkB;KACtE;IACD,IAAI,OAAO,EAAE;QACT,CAAC,CAAC,GAAG,KAAK,CAAA,KAAA,CAAO,CAAC,GAAG,CAAA,YAAA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,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;QACrK,OAAO,aAAa,CAAC,SAAS,EAAE,WAAW,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC;IAChE;AAAO,SAAA,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC9E,OAAO,aAAa,CAAC,SAAS,EAAE,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC;IAC9D;AAAO,SAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;QAC5E,OAAO,aAAa,CAAC,SAAS,EAAE,gBAAgB,KAAK,CAAA,CAAA,CAAG,CAAC;IAC7D;IAEA,OAAO,aAAa,CAAC,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC;AAC3D"}
|
|
1
|
+
{"version":3,"file":"getValue.mjs","sources":["../../src/css/getValue.ts"],"sourcesContent":["import { CSSProps } from \"./types\"\r\n\r\nconst getColor = (color: string, hasText = true) => {\r\n const i = {\r\n [`${color}`]: `var(--color-${color}-primary)`,\r\n [`${color}.primary`]: `var(--color-${color}-primary)`,\r\n [`${color}.secondary`]: `var(--color-${color}-secondary)`,\r\n [`${color}.soft.primary`]: `var(--color-${color}-soft-primary)`,\r\n [`${color}.soft.secondary`]: `var(--color-${color}-soft-secondary)`,\r\n }\r\n if (hasText) {\r\n i[`${color}.text`] = `var(--color-${color}-text)`\r\n }\r\n\r\n return i\r\n}\r\n\r\nconst withImportant = (important: any, value: any) => important ? value + important : value\r\nconst colors: any = {\r\n ...getColor(\"background\", false),\r\n ...getColor(\"text\", false),\r\n ...getColor(\"divider\", false),\r\n ...getColor(\"brand\"),\r\n ...getColor(\"accent\"),\r\n ...getColor(\"info\"),\r\n ...getColor(\"success\"),\r\n ...getColor(\"warning\"),\r\n ...getColor(\"danger\"),\r\n}\r\n\r\nconst breakpoints: any = {\r\n \"xs\": \"var(--bp-xs)\",\r\n \"sm\": \"var(--bp-sm)\",\r\n \"md\": \"var(--bp-md)\",\r\n \"lg\": \"var(--bp-lg)\",\r\n \"xl\": \"var(--bp-xl)\"\r\n}\r\n\r\nlet fontsizes: any = {\r\n \"h1\": \"var(--fontsize-h1)\",\r\n \"h2\": \"var(--fontsize-h2)\",\r\n \"h3\": \"var(--fontsize-h3)\",\r\n \"h4\": \"var(--fontsize-h4)\",\r\n \"h5\": \"var(--fontsize-h5)\",\r\n \"h6\": \"var(--fontsize-h6)\",\r\n \"big\": \"var(--fontsize-big)\",\r\n \"text\": \"var(--fontsize-text)\",\r\n \"button\": \"var(--fontsize-button)\",\r\n \"small\": \"var(--fontsize-small)\"\r\n}\r\n\r\nlet lineHeights: any = {\r\n \"h1\": \"var(--lineheight-h1)\",\r\n \"h2\": \"var(--lineheight-h2)\",\r\n \"h3\": \"var(--lineheight-h3)\",\r\n \"h4\": \"var(--lineheight-h4)\",\r\n \"h5\": \"var(--lineheight-h5)\",\r\n \"h6\": \"var(--lineheight-h6)\",\r\n \"big\": \"var(--lineheight-big)\",\r\n \"text\": \"var(--lineheight-text)\",\r\n \"button\": \"var(--lineheight-button)\",\r\n \"small\": \"var(--lineheight-small)\"\r\n}\r\n\r\nlet fontWeights: any = {\r\n \"h1\": \"var(--fontweight-h1)\",\r\n \"h2\": \"var(--fontweight-h2)\",\r\n \"h3\": \"var(--fontweight-h3)\",\r\n \"h4\": \"var(--fontweight-h4)\",\r\n \"h5\": \"var(--fontweight-h5)\",\r\n \"h6\": \"var(--fontweight-h6)\",\r\n \"big\": \"var(--fontweight-big)\",\r\n \"text\": \"var(--fontweight-text)\",\r\n \"button\": \"var(--fontweight-button)\",\r\n \"small\": \"var(--fontweight-small)\"\r\n}\r\n\r\nlet font: any = {\r\n \"h1\": \"var(--font-h1)\",\r\n \"h2\": \"var(--font-h2)\",\r\n \"h3\": \"var(--font-h3)\",\r\n \"h4\": \"var(--font-h4)\",\r\n \"h5\": \"var(--font-h5)\",\r\n \"h6\": \"var(--font-h6)\",\r\n \"big\": \"var(--font-big)\",\r\n \"text\": \"var(--font-text)\",\r\n \"button\": \"var(--font-button)\",\r\n \"small\": \"var(--font-small)\"\r\n}\r\n\r\nconst getValue = (prop: any, value: string | number, _css: CSSProps): any => {\r\n let important;\r\n\r\n if (typeof value === 'string') {\r\n const split = value.split(\"!\")\r\n important = split[1] ? \"!important\" : \"\"\r\n value = split[0]\r\n }\r\n\r\n\r\n if (['width', 'maxWidth', 'minWidth', 'max-width', 'min-width'].includes(prop)) {\r\n return withImportant(important, breakpoints[value] || value)\r\n } else if (prop === 'font' && typeof value === \"string\" && ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'text', 'button', 'small'].includes(value)) {\r\n return withImportant(important, font[value] || value)\r\n } else if (['fontWeight', 'font-weight'].includes(prop) && typeof value === 'string' && ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'text', 'button', 'small'].includes(value)) {\r\n return withImportant(important, fontWeights[value] || value)\r\n } else if (['lineHeight', 'line-height'].includes(prop) && typeof value === 'string' && ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'text', 'button', 'small'].includes(value)) {\r\n return withImportant(important, lineHeights[value] || value)\r\n } else if (['fontSize', 'font-size'].includes(prop) && typeof value === 'string') {\r\n return withImportant(important, fontsizes[value] || value)\r\n } else if (typeof value === \"number\" && [\"shadow\", \"boxShadow\"].includes(prop)) {\r\n return withImportant(important, `var(--shadow-${value})`)\r\n }\r\n\r\n return withImportant(important, colors[value] || value)\r\n}\r\n\r\nexport default getValue"],"names":[],"mappings":"AAEA,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAE,OAAO,GAAG,IAAI,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