@xanui/core 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/main.tsx +97 -0
- package/package.json +51 -22
- package/src/ServerStyleTags.tsx +12 -0
- package/src/Tag/cssPropList.ts +191 -0
- package/src/Tag/index.tsx +11 -0
- package/{Tag/types.d.ts → src/Tag/types.ts} +13 -9
- package/src/Tag/useTagProps.ts +28 -0
- package/src/Transition/index.tsx +148 -0
- package/src/Transition/variants.ts +178 -0
- package/src/breakpoint/index.tsx +52 -0
- package/src/breakpoint/useBreakpoint.ts +31 -0
- package/src/breakpoint/useBreakpointProps.ts +57 -0
- package/src/css/aliases.ts +35 -0
- package/src/css/getProps.ts +38 -0
- package/src/css/getValue.ts +117 -0
- package/src/css/index.ts +78 -0
- package/{css/types.d.ts → src/css/types.ts} +22 -16
- package/src/index.ts +34 -0
- package/src/isWindow.ts +3 -0
- package/src/theme/ThemeCssVars.ts +107 -0
- package/src/theme/ThemeDefaultOptions.ts +146 -0
- package/src/theme/ThemeProvider.tsx +140 -0
- package/src/theme/core.ts +21 -0
- package/src/theme/createColor.ts +53 -0
- package/src/theme/createTheme.ts +33 -0
- package/src/theme/createThemeSwitcher.ts +18 -0
- package/src/theme/index.tsx +17 -0
- package/{theme/types.d.ts → src/theme/types.ts} +103 -46
- package/src/useAnimation.ts +40 -0
- package/src/useColorTemplate.ts +11 -0
- package/src/useInterface.ts +13 -0
- package/tsconfig.json +28 -0
- package/ServerStyleTags.cjs +0 -2
- package/ServerStyleTags.cjs.map +0 -7
- package/ServerStyleTags.d.ts +0 -3
- package/ServerStyleTags.mjs +0 -2
- package/ServerStyleTags.mjs.map +0 -7
- package/Tag/cssPropList.cjs +0 -2
- package/Tag/cssPropList.cjs.map +0 -7
- package/Tag/cssPropList.d.ts +0 -2
- package/Tag/cssPropList.mjs +0 -2
- package/Tag/cssPropList.mjs.map +0 -7
- package/Tag/index.cjs +0 -2
- package/Tag/index.cjs.map +0 -7
- package/Tag/index.d.ts +0 -4
- package/Tag/index.mjs +0 -2
- package/Tag/index.mjs.map +0 -7
- package/Tag/types.cjs +0 -2
- package/Tag/types.cjs.map +0 -7
- package/Tag/types.mjs +0 -1
- package/Tag/types.mjs.map +0 -7
- package/Tag/useTagProps.cjs +0 -2
- package/Tag/useTagProps.cjs.map +0 -7
- package/Tag/useTagProps.d.ts +0 -3
- package/Tag/useTagProps.mjs +0 -2
- package/Tag/useTagProps.mjs.map +0 -7
- package/Transition/index.cjs +0 -2
- package/Transition/index.cjs.map +0 -7
- package/Transition/index.d.ts +0 -31
- package/Transition/index.mjs +0 -2
- package/Transition/index.mjs.map +0 -7
- package/Transition/variants.cjs +0 -2
- package/Transition/variants.cjs.map +0 -7
- package/Transition/variants.d.ts +0 -131
- package/Transition/variants.mjs +0 -2
- package/Transition/variants.mjs.map +0 -7
- package/breakpoint/index.cjs +0 -2
- package/breakpoint/index.cjs.map +0 -7
- package/breakpoint/index.d.ts +0 -6
- package/breakpoint/index.mjs +0 -2
- package/breakpoint/index.mjs.map +0 -7
- package/breakpoint/useBreakpoint.cjs +0 -2
- package/breakpoint/useBreakpoint.cjs.map +0 -7
- package/breakpoint/useBreakpoint.d.ts +0 -10
- package/breakpoint/useBreakpoint.mjs +0 -2
- package/breakpoint/useBreakpoint.mjs.map +0 -7
- package/breakpoint/useBreakpointProps.cjs +0 -2
- package/breakpoint/useBreakpointProps.cjs.map +0 -7
- package/breakpoint/useBreakpointProps.d.ts +0 -6
- package/breakpoint/useBreakpointProps.mjs +0 -2
- package/breakpoint/useBreakpointProps.mjs.map +0 -7
- package/css/aliases.cjs +0 -2
- package/css/aliases.cjs.map +0 -7
- package/css/aliases.d.ts +0 -4
- package/css/aliases.mjs +0 -2
- package/css/aliases.mjs.map +0 -7
- package/css/getProps.cjs +0 -2
- package/css/getProps.cjs.map +0 -7
- package/css/getProps.d.ts +0 -3
- package/css/getProps.mjs +0 -2
- package/css/getProps.mjs.map +0 -7
- package/css/getValue.cjs +0 -2
- package/css/getValue.cjs.map +0 -7
- package/css/getValue.d.ts +0 -3
- package/css/getValue.mjs +0 -2
- package/css/getValue.mjs.map +0 -7
- package/css/index.cjs +0 -2
- package/css/index.cjs.map +0 -7
- package/css/index.d.ts +0 -15
- package/css/index.mjs +0 -2
- package/css/index.mjs.map +0 -7
- package/css/types.cjs +0 -2
- package/css/types.cjs.map +0 -7
- package/css/types.mjs +0 -1
- package/css/types.mjs.map +0 -7
- package/index.cjs +0 -2
- package/index.cjs.map +0 -7
- package/index.d.ts +0 -21
- package/index.mjs +0 -2
- package/index.mjs.map +0 -7
- package/isWindow.cjs +0 -2
- package/isWindow.cjs.map +0 -7
- package/isWindow.d.ts +0 -2
- package/isWindow.mjs +0 -2
- package/isWindow.mjs.map +0 -7
- package/theme/ThemeCssVars.cjs +0 -2
- package/theme/ThemeCssVars.cjs.map +0 -7
- package/theme/ThemeCssVars.d.ts +0 -3
- package/theme/ThemeCssVars.mjs +0 -2
- package/theme/ThemeCssVars.mjs.map +0 -7
- package/theme/ThemeDefaultOptions.cjs +0 -2
- package/theme/ThemeDefaultOptions.cjs.map +0 -7
- package/theme/ThemeDefaultOptions.d.ts +0 -68
- package/theme/ThemeDefaultOptions.mjs +0 -2
- package/theme/ThemeDefaultOptions.mjs.map +0 -7
- package/theme/ThemeProvider.cjs +0 -2
- package/theme/ThemeProvider.cjs.map +0 -7
- package/theme/ThemeProvider.d.ts +0 -11
- package/theme/ThemeProvider.mjs +0 -2
- package/theme/ThemeProvider.mjs.map +0 -7
- package/theme/core.cjs +0 -2
- package/theme/core.cjs.map +0 -7
- package/theme/core.d.ts +0 -7
- package/theme/core.mjs +0 -2
- package/theme/core.mjs.map +0 -7
- package/theme/createColor.cjs +0 -2
- package/theme/createColor.cjs.map +0 -7
- package/theme/createColor.d.ts +0 -41
- package/theme/createColor.mjs +0 -2
- package/theme/createColor.mjs.map +0 -7
- package/theme/createTheme.cjs +0 -2
- package/theme/createTheme.cjs.map +0 -7
- package/theme/createTheme.d.ts +0 -2
- package/theme/createTheme.mjs +0 -2
- package/theme/createTheme.mjs.map +0 -7
- package/theme/createThemeSwitcher.cjs +0 -2
- package/theme/createThemeSwitcher.cjs.map +0 -7
- package/theme/createThemeSwitcher.d.ts +0 -6
- package/theme/createThemeSwitcher.mjs +0 -2
- package/theme/createThemeSwitcher.mjs.map +0 -7
- package/theme/index.cjs +0 -2
- package/theme/index.cjs.map +0 -7
- package/theme/index.d.ts +0 -5
- package/theme/index.mjs +0 -2
- package/theme/index.mjs.map +0 -7
- package/theme/types.cjs +0 -2
- package/theme/types.cjs.map +0 -7
- package/theme/types.mjs +0 -1
- package/theme/types.mjs.map +0 -7
- package/useAnimation.cjs +0 -2
- package/useAnimation.cjs.map +0 -7
- package/useAnimation.d.ts +0 -18
- package/useAnimation.mjs +0 -2
- package/useAnimation.mjs.map +0 -7
- package/useColorTemplate.cjs +0 -2
- package/useColorTemplate.cjs.map +0 -7
- package/useColorTemplate.d.ts +0 -4
- package/useColorTemplate.mjs +0 -2
- package/useColorTemplate.mjs.map +0 -7
- package/useInterface.cjs +0 -2
- package/useInterface.cjs.map +0 -7
- package/useInterface.d.ts +0 -2
- package/useInterface.mjs +0 -2
- package/useInterface.mjs.map +0 -7
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/theme/createColor.ts"],
|
|
4
|
-
"sourcesContent": ["import { ThemeOptions, ThemeColor } from \"./types\"\nimport { alpha } from \"../css\"\n\nconst createColor = (theme: ThemeOptions, name: keyof ThemeColor) => {\n let color = theme.colors[name]\n let { primary, secondary } = color as any\n let text = (color as any).text || theme.colors.text.primary\n let _alpha = alpha(primary, .1)\n\n const isBag = (a: any, b: any) => name === \"background\" ? a : b\n\n return {\n alpha: _alpha,\n template: {\n outline: {\n bgcolor: \"transparent\",\n color: isBag(text, primary),\n border: 1,\n borderColor: isBag(\"divider\", alpha(primary, .4)),\n hover: {\n color: isBag(text, primary),\n borderColor: isBag(\"divider\", alpha(primary, .8)),\n }\n },\n fill: {\n bgcolor: isBag(secondary, primary),\n color: text,\n hover: {\n bgcolor: isBag(alpha(secondary, .6), secondary),\n color: text,\n }\n },\n text: {\n bgcolor: \"transparent\",\n color: isBag(text, primary),\n hover: {\n bgcolor: isBag(alpha(secondary, .6), alpha(primary, .1)),\n color: isBag(text, primary),\n }\n },\n alpha: {\n bgcolor: isBag(alpha(secondary, .5), alpha(primary, .1)),\n color: isBag(text, primary),\n hover: {\n bgcolor: isBag(alpha(secondary, .8), alpha(primary, .15)),\n color: isBag(text, primary),\n }\n }\n }\n }\n}\n\nexport default createColor"],
|
|
5
|
-
"mappings": "AACA,OAAS,SAAAA,MAAa,SAEtB,MAAMC,EAAc,CAACC,EAAqBC,IAA2B,CAClE,IAAIC,EAAQF,EAAM,OAAOC,CAAI,EACzB,CAAE,QAAAE,EAAS,UAAAC,CAAU,EAAIF,EACzBG,EAAQH,EAAc,MAAQF,EAAM,OAAO,KAAK,QAChDM,EAASR,EAAMK,EAAS,EAAE,EAE9B,MAAMI,EAAQ,CAACC,EAAQC,IAAWR,IAAS,aAAeO,EAAIC,EAE9D,MAAO,CACJ,MAAOH,EACP,SAAU,CACP,QAAS,CACN,QAAS,cACT,MAAOC,EAAMF,EAAMF,CAAO,EAC1B,OAAQ,EACR,YAAaI,EAAM,UAAWT,EAAMK,EAAS,EAAE,CAAC,EAChD,MAAO,CACJ,MAAOI,EAAMF,EAAMF,CAAO,EAC1B,YAAaI,EAAM,UAAWT,EAAMK,EAAS,EAAE,CAAC,CACnD,CACH,EACA,KAAM,CACH,QAASI,EAAMH,EAAWD,CAAO,EACjC,MAAOE,EACP,MAAO,CACJ,QAASE,EAAMT,EAAMM,EAAW,EAAE,EAAGA,CAAS,EAC9C,MAAOC,CACV,CACH,EACA,KAAM,CACH,QAAS,cACT,MAAOE,EAAMF,EAAMF,CAAO,EAC1B,MAAO,CACJ,QAASI,EAAMT,EAAMM,EAAW,EAAE,EAAGN,EAAMK,EAAS,EAAE,CAAC,EACvD,MAAOI,EAAMF,EAAMF,CAAO,CAC7B,CACH,EACA,MAAO,CACJ,QAASI,EAAMT,EAAMM,EAAW,EAAE,EAAGN,EAAMK,EAAS,EAAE,CAAC,EACvD,MAAOI,EAAMF,EAAMF,CAAO,EAC1B,MAAO,CACJ,QAASI,EAAMT,EAAMM,EAAW,EAAE,EAAGN,EAAMK,EAAS,GAAG,CAAC,EACxD,MAAOI,EAAMF,EAAMF,CAAO,CAC7B,CACH,CACH,CACH,CACH,EAEA,IAAOO,EAAQX",
|
|
6
|
-
"names": ["alpha", "createColor", "theme", "name", "color", "primary", "secondary", "text", "_alpha", "isBag", "a", "b", "createColor_default"]
|
|
7
|
-
}
|
package/theme/createTheme.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var l=Object.create;var s=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var u=(e,r)=>{for(var t in r)s(e,t,{get:r[t],enumerable:!0})},c=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of f(r))!b.call(e,i)&&i!==t&&s(e,i,{get:()=>r[i],enumerable:!(o=d(r,i))||o.enumerable});return e};var p=(e,r,t)=>(t=e!=null?l(g(e)):{},c(r||!e||!e.__esModule?s(t,"default",{value:e,enumerable:!0}):t,e)),T=e=>c(s({},"__esModule",{value:!0}),e);var k={};u(k,{createTheme:()=>O});module.exports=T(k);var m=p(require("./ThemeDefaultOptions"),1),a=require("./core"),n=p(require("./createColor"),1),h=require("../css");const O=(e,r,t)=>{if(a.ThemeFactory.has(e))throw new Error(`theme "${e}" already exists!`);{let o=(0,a.mergeObject)(m.default,{...t?m.darkColorPallete:{},...r,name:e,breakpoints:h.breakpoints});o=(0,a.mergeObject)(o,{colors:{background:(0,n.default)(o,"background"),brand:(0,n.default)(o,"brand"),accent:(0,n.default)(o,"accent"),info:(0,n.default)(o,"info"),success:(0,n.default)(o,"success"),warning:(0,n.default)(o,"warning"),danger:(0,n.default)(o,"danger")}}),a.ThemeFactory.set(e,o)}return a.ThemeFactory.get(e)};
|
|
2
|
-
//# sourceMappingURL=createTheme.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/theme/createTheme.ts"],
|
|
4
|
-
"sourcesContent": ["import { ThemeOptions, ThemeOptionInput } from \"./types\"\nimport defaultThemeOption, { darkColorPallete } from './ThemeDefaultOptions'\nimport { mergeObject, ThemeFactory } from \"./core\"\nimport createColor from \"./createColor\"\nimport { breakpoints } from \"../css\"\n\nexport const createTheme = (name: string, options: ThemeOptionInput, darkMode?: boolean): ThemeOptions => {\n if (!ThemeFactory.has(name)) {\n let theme: any = mergeObject(defaultThemeOption, {\n ...(darkMode ? darkColorPallete : {}),\n ...options,\n name,\n breakpoints: breakpoints\n })\n\n theme = mergeObject(theme, {\n colors: {\n background: createColor(theme, \"background\"),\n brand: createColor(theme, \"brand\"),\n accent: createColor(theme, \"accent\"),\n info: createColor(theme, \"info\"),\n success: createColor(theme, \"success\"),\n warning: createColor(theme, \"warning\"),\n danger: createColor(theme, \"danger\")\n }\n })\n ThemeFactory.set(name, theme)\n } else {\n throw new Error(`theme \"${name}\" already exists!`);\n }\n\n return ThemeFactory.get(name) as ThemeOptions\n}\n"],
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,IAAA,eAAAC,EAAAH,GACA,IAAAI,EAAqD,sCACrDC,EAA0C,kBAC1CC,EAAwB,8BACxBC,EAA4B,kBAErB,MAAML,EAAc,CAACM,EAAcC,EAA2BC,IAAqC,CACvG,GAAK,eAAa,IAAIF,CAAI,EAqBvB,MAAM,IAAI,MAAM,UAAUA,CAAI,mBAAmB,EArBvB,CAC1B,IAAIG,KAAa,eAAY,EAAAC,QAAoB,CAC9C,GAAIF,EAAW,mBAAmB,CAAC,EACnC,GAAGD,EACH,KAAAD,EACA,YAAa,aAChB,CAAC,EAEDG,KAAQ,eAAYA,EAAO,CACxB,OAAQ,CACL,cAAY,EAAAE,SAAYF,EAAO,YAAY,EAC3C,SAAO,EAAAE,SAAYF,EAAO,OAAO,EACjC,UAAQ,EAAAE,SAAYF,EAAO,QAAQ,EACnC,QAAM,EAAAE,SAAYF,EAAO,MAAM,EAC/B,WAAS,EAAAE,SAAYF,EAAO,SAAS,EACrC,WAAS,EAAAE,SAAYF,EAAO,SAAS,EACrC,UAAQ,EAAAE,SAAYF,EAAO,QAAQ,CACtC,CACH,CAAC,EACD,eAAa,IAAIH,EAAMG,CAAK,CAC/B,CAIA,OAAO,eAAa,IAAIH,CAAI,CAC/B",
|
|
6
|
-
"names": ["createTheme_exports", "__export", "createTheme", "__toCommonJS", "import_ThemeDefaultOptions", "import_core", "import_createColor", "import_css", "name", "options", "darkMode", "theme", "defaultThemeOption", "createColor"]
|
|
7
|
-
}
|
package/theme/createTheme.d.ts
DELETED
package/theme/createTheme.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import s,{darkColorPallete as m}from"./ThemeDefaultOptions";import{mergeObject as n,ThemeFactory as t}from"./core";import r from"./createColor";import{breakpoints as c}from"../css";const u=(o,a,i)=>{if(t.has(o))throw new Error(`theme "${o}" already exists!`);{let e=n(s,{...i?m:{},...a,name:o,breakpoints:c});e=n(e,{colors:{background:r(e,"background"),brand:r(e,"brand"),accent:r(e,"accent"),info:r(e,"info"),success:r(e,"success"),warning:r(e,"warning"),danger:r(e,"danger")}}),t.set(o,e)}return t.get(o)};export{u as createTheme};
|
|
2
|
-
//# sourceMappingURL=createTheme.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/theme/createTheme.ts"],
|
|
4
|
-
"sourcesContent": ["import { ThemeOptions, ThemeOptionInput } from \"./types\"\nimport defaultThemeOption, { darkColorPallete } from './ThemeDefaultOptions'\nimport { mergeObject, ThemeFactory } from \"./core\"\nimport createColor from \"./createColor\"\nimport { breakpoints } from \"../css\"\n\nexport const createTheme = (name: string, options: ThemeOptionInput, darkMode?: boolean): ThemeOptions => {\n if (!ThemeFactory.has(name)) {\n let theme: any = mergeObject(defaultThemeOption, {\n ...(darkMode ? darkColorPallete : {}),\n ...options,\n name,\n breakpoints: breakpoints\n })\n\n theme = mergeObject(theme, {\n colors: {\n background: createColor(theme, \"background\"),\n brand: createColor(theme, \"brand\"),\n accent: createColor(theme, \"accent\"),\n info: createColor(theme, \"info\"),\n success: createColor(theme, \"success\"),\n warning: createColor(theme, \"warning\"),\n danger: createColor(theme, \"danger\")\n }\n })\n ThemeFactory.set(name, theme)\n } else {\n throw new Error(`theme \"${name}\" already exists!`);\n }\n\n return ThemeFactory.get(name) as ThemeOptions\n}\n"],
|
|
5
|
-
"mappings": "AACA,OAAOA,GAAsB,oBAAAC,MAAwB,wBACrD,OAAS,eAAAC,EAAa,gBAAAC,MAAoB,SAC1C,OAAOC,MAAiB,gBACxB,OAAS,eAAAC,MAAmB,SAErB,MAAMC,EAAc,CAACC,EAAcC,EAA2BC,IAAqC,CACvG,GAAKN,EAAa,IAAII,CAAI,EAqBvB,MAAM,IAAI,MAAM,UAAUA,CAAI,mBAAmB,EArBvB,CAC1B,IAAIG,EAAaR,EAAYF,EAAoB,CAC9C,GAAIS,EAAWR,EAAmB,CAAC,EACnC,GAAGO,EACH,KAAAD,EACA,YAAaF,CAChB,CAAC,EAEDK,EAAQR,EAAYQ,EAAO,CACxB,OAAQ,CACL,WAAYN,EAAYM,EAAO,YAAY,EAC3C,MAAON,EAAYM,EAAO,OAAO,EACjC,OAAQN,EAAYM,EAAO,QAAQ,EACnC,KAAMN,EAAYM,EAAO,MAAM,EAC/B,QAASN,EAAYM,EAAO,SAAS,EACrC,QAASN,EAAYM,EAAO,SAAS,EACrC,OAAQN,EAAYM,EAAO,QAAQ,CACtC,CACH,CAAC,EACDP,EAAa,IAAII,EAAMG,CAAK,CAC/B,CAIA,OAAOP,EAAa,IAAII,CAAI,CAC/B",
|
|
6
|
-
"names": ["defaultThemeOption", "darkColorPallete", "mergeObject", "ThemeFactory", "createColor", "breakpoints", "createTheme", "name", "options", "darkMode", "theme"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var s=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var g=(t,e)=>{for(var m in e)s(t,m,{get:e[m],enumerable:!0})},T=(t,e,m,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of i(e))!u.call(t,r)&&r!==m&&s(t,r,{get:()=>e[r],enumerable:!(n=h(e,r))||n.enumerable});return t};var S=t=>T(s({},"__esModule",{value:!0}),t);var p={};g(p,{default:()=>l});module.exports=S(p);var a=require("react-state-bucket"),c=require("./core");const f=(t,e)=>{const m=(0,a.createBucket)({name:t},{store:e});return()=>{const r=m();return{name:r.get("name"),theme:(0,c.getTheme)(r.get("name")),change:o=>r.set("name",o)}}};var l=f;
|
|
2
|
-
//# sourceMappingURL=createThemeSwitcher.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/theme/createThemeSwitcher.ts"],
|
|
4
|
-
"sourcesContent": ["import { createBucket } from \"react-state-bucket\"\nimport { getTheme } from \"./core\"\n\nconst createThemeSwitcher = (defaultTheme: string, store?: \"session\" | \"local\") => {\n const useThemeState = createBucket({ name: defaultTheme }, { store })\n const useThemeSwitcher = () => {\n const state = useThemeState()\n return {\n name: state.get(\"name\"),\n theme: getTheme(state.get(\"name\")),\n change: (theme: string) => state.set(\"name\", theme)\n }\n }\n return useThemeSwitcher\n}\n\n\nexport default createThemeSwitcher"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA6B,8BAC7BC,EAAyB,kBAEzB,MAAMC,EAAsB,CAACC,EAAsBC,IAAgC,CAChF,MAAMC,KAAgB,gBAAa,CAAE,KAAMF,CAAa,EAAG,CAAE,MAAAC,CAAM,CAAC,EASpE,MARyB,IAAM,CAC5B,MAAME,EAAQD,EAAc,EAC5B,MAAO,CACJ,KAAMC,EAAM,IAAI,MAAM,EACtB,SAAO,YAASA,EAAM,IAAI,MAAM,CAAC,EACjC,OAASC,GAAkBD,EAAM,IAAI,OAAQC,CAAK,CACrD,CACH,CAEH,EAGA,IAAOT,EAAQI",
|
|
6
|
-
"names": ["createThemeSwitcher_exports", "__export", "createThemeSwitcher_default", "__toCommonJS", "import_react_state_bucket", "import_core", "createThemeSwitcher", "defaultTheme", "store", "useThemeState", "state", "theme"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{createBucket as s}from"react-state-bucket";import{getTheme as a}from"./core";const c=(t,r)=>{const m=s({name:t},{store:r});return()=>{const e=m();return{name:e.get("name"),theme:a(e.get("name")),change:n=>e.set("name",n)}}};var u=c;export{u as default};
|
|
2
|
-
//# sourceMappingURL=createThemeSwitcher.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/theme/createThemeSwitcher.ts"],
|
|
4
|
-
"sourcesContent": ["import { createBucket } from \"react-state-bucket\"\nimport { getTheme } from \"./core\"\n\nconst createThemeSwitcher = (defaultTheme: string, store?: \"session\" | \"local\") => {\n const useThemeState = createBucket({ name: defaultTheme }, { store })\n const useThemeSwitcher = () => {\n const state = useThemeState()\n return {\n name: state.get(\"name\"),\n theme: getTheme(state.get(\"name\")),\n change: (theme: string) => state.set(\"name\", theme)\n }\n }\n return useThemeSwitcher\n}\n\n\nexport default createThemeSwitcher"],
|
|
5
|
-
"mappings": "AAAA,OAAS,gBAAAA,MAAoB,qBAC7B,OAAS,YAAAC,MAAgB,SAEzB,MAAMC,EAAsB,CAACC,EAAsBC,IAAgC,CAChF,MAAMC,EAAgBL,EAAa,CAAE,KAAMG,CAAa,EAAG,CAAE,MAAAC,CAAM,CAAC,EASpE,MARyB,IAAM,CAC5B,MAAME,EAAQD,EAAc,EAC5B,MAAO,CACJ,KAAMC,EAAM,IAAI,MAAM,EACtB,MAAOL,EAASK,EAAM,IAAI,MAAM,CAAC,EACjC,OAASC,GAAkBD,EAAM,IAAI,OAAQC,CAAK,CACrD,CACH,CAEH,EAGA,IAAOC,EAAQN",
|
|
6
|
-
"names": ["createBucket", "getTheme", "createThemeSwitcher", "defaultTheme", "store", "useThemeState", "state", "theme", "createThemeSwitcher_default"]
|
|
7
|
-
}
|
package/theme/index.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var c=Object.create;var i=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var k=(e,r)=>{for(var o in r)i(e,o,{get:r[o],enumerable:!0})},f=(e,r,o,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of s(r))!v.call(e,t)&&t!==o&&i(e,t,{get:()=>r[t],enumerable:!(a=d(r,t))||a.enumerable});return e};var P=(e,r,o)=>(o=e!=null?c(g(e)):{},f(r||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),x=e=>f(i({},"__esModule",{value:!0}),e);var C={};k(C,{ThemeProvider:()=>p.default,createThemeSwitcher:()=>T.default,getTheme:()=>m.getTheme,useTheme:()=>m.useTheme});module.exports=x(C);var h=require("./ThemeDefaultOptions"),l=require("./createTheme"),p=P(require("./ThemeProvider"),1),T=P(require("./createThemeSwitcher"),1),m=require("./core");(0,l.createTheme)("light",{colors:h.lightColorPallete}),(0,l.createTheme)("dark",{colors:h.darkColorPallete});
|
|
2
|
-
//# sourceMappingURL=index.cjs.map
|
package/theme/index.cjs.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/theme/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import { lightColorPallete, darkColorPallete } from './ThemeDefaultOptions'\nimport { createTheme } from \"./createTheme\"\nimport ThemeProvider from './ThemeProvider'\nimport createThemeSwitcher from './createThemeSwitcher'\nimport { getTheme, useTheme } from './core'\nexport type { ThemeProviderProps } from './ThemeProvider'\n\nexport {\n ThemeProvider,\n createThemeSwitcher,\n getTheme,\n useTheme\n}\n\ncreateTheme(\"light\", { colors: lightColorPallete })\ncreateTheme(\"dark\", { colors: darkColorPallete })\n\n"],
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,qBAAAE,QAAA,0BAAAC,QAAA,iEAAAC,EAAAJ,GAAA,IAAAK,EAAoD,iCACpDC,EAA4B,yBAC5BC,EAA0B,gCAC1BC,EAAgC,sCAChCC,EAAmC,qBAUnC,eAAY,QAAS,CAAE,OAAQ,mBAAkB,CAAC,KAClD,eAAY,OAAQ,CAAE,OAAQ,kBAAiB,CAAC",
|
|
6
|
-
"names": ["theme_exports", "__export", "ThemeProvider", "createThemeSwitcher", "__toCommonJS", "import_ThemeDefaultOptions", "import_createTheme", "import_ThemeProvider", "import_createThemeSwitcher", "import_core"]
|
|
7
|
-
}
|
package/theme/index.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import ThemeProvider from './ThemeProvider';
|
|
2
|
-
import createThemeSwitcher from './createThemeSwitcher';
|
|
3
|
-
import { getTheme, useTheme } from './core';
|
|
4
|
-
export type { ThemeProviderProps } from './ThemeProvider';
|
|
5
|
-
export { ThemeProvider, createThemeSwitcher, getTheme, useTheme };
|
package/theme/index.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{lightColorPallete as r,darkColorPallete as o}from"./ThemeDefaultOptions";import{createTheme as e}from"./createTheme";import m from"./ThemeProvider";import t from"./createThemeSwitcher";import{getTheme as i,useTheme as h}from"./core";e("light",{colors:r}),e("dark",{colors:o});export{m as ThemeProvider,t as createThemeSwitcher,i as getTheme,h as useTheme};
|
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
package/theme/index.mjs.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/theme/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import { lightColorPallete, darkColorPallete } from './ThemeDefaultOptions'\nimport { createTheme } from \"./createTheme\"\nimport ThemeProvider from './ThemeProvider'\nimport createThemeSwitcher from './createThemeSwitcher'\nimport { getTheme, useTheme } from './core'\nexport type { ThemeProviderProps } from './ThemeProvider'\n\nexport {\n ThemeProvider,\n createThemeSwitcher,\n getTheme,\n useTheme\n}\n\ncreateTheme(\"light\", { colors: lightColorPallete })\ncreateTheme(\"dark\", { colors: darkColorPallete })\n\n"],
|
|
5
|
-
"mappings": "AAAA,OAAS,qBAAAA,EAAmB,oBAAAC,MAAwB,wBACpD,OAAS,eAAAC,MAAmB,gBAC5B,OAAOC,MAAmB,kBAC1B,OAAOC,MAAyB,wBAChC,OAAS,YAAAC,EAAU,YAAAC,MAAgB,SAUnCJ,EAAY,QAAS,CAAE,OAAQF,CAAkB,CAAC,EAClDE,EAAY,OAAQ,CAAE,OAAQD,CAAiB,CAAC",
|
|
6
|
-
"names": ["lightColorPallete", "darkColorPallete", "createTheme", "ThemeProvider", "createThemeSwitcher", "getTheme", "useTheme"]
|
|
7
|
-
}
|
package/theme/types.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var n=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var y=(t,e,p,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of m(e))!h.call(t,r)&&r!==p&&n(t,r,{get:()=>e[r],enumerable:!(o=a(e,r))||o.enumerable});return t};var g=t=>y(n({},"__esModule",{value:!0}),t);var l={};module.exports=g(l);
|
|
2
|
-
//# sourceMappingURL=types.cjs.map
|
package/theme/types.cjs.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/theme/types.ts"],
|
|
4
|
-
"sourcesContent": ["import { BreakpointKeys, GlobalCSS } from \"../css/types\";\n\nexport type ObjectType = { [key: string]: any }\n\nexport type ThemeColorItem = {\n primary: string;\n secondary: string;\n text: string;\n alpha: string;\n template: {\n outline: {\n bgcolor: string;\n color: string;\n border: number;\n borderColor: string;\n hover: {\n bgcolor: string,\n color: string,\n }\n },\n fill: {\n bgcolor: string;\n color: string,\n hover: {\n bgcolor: string;\n color: string;\n }\n },\n text: {\n bgcolor: string;\n color: string;\n hover: {\n bgcolor: string;\n color: string;\n }\n },\n alpha: {\n bgcolor: string\n color: string;\n hover: {\n bgcolor: string;\n color: string;\n }\n }\n }\n}\n\nexport type ThemeTypographyItem = {\n fontSize: number;\n lineHeight: number;\n fontWeight: number;\n}\n\nexport type ThemeColor = {\n background: Omit<ThemeColorItem, \"text\">;\n text: Omit<ThemeColorItem, \"text\" | \"alpha\" | \"template\">;\n divider: string;\n brand: ThemeColorItem;\n accent: ThemeColorItem;\n success: ThemeColorItem\n info: ThemeColorItem\n warning: ThemeColorItem\n danger: ThemeColorItem\n};\n\nexport type ThemeTypographyType = {\n fontFamily: string,\n h1: ThemeTypographyItem;\n h2: ThemeTypographyItem;\n h3: ThemeTypographyItem;\n h4: ThemeTypographyItem;\n h5: ThemeTypographyItem;\n h6: ThemeTypographyItem;\n text: ThemeTypographyItem;\n button: ThemeTypographyItem;\n small: ThemeTypographyItem;\n}\n\nexport interface ThemeOptions {\n name: string;\n rtl: boolean;\n globalStyle: GlobalCSS,\n breakpoints: { [key in BreakpointKeys]: number };\n shadow: string[];\n interfaces: { [name: string]: <P extends object>(defaultProps: P, theme: ThemeOptions) => P };\n colors: ThemeColor;\n typography: ThemeTypographyType;\n}\n\n// Theme Input\nexport type ThemeColorItemInput = Partial<Omit<ThemeColorItem, \"alpha\">>\nexport type ThemeTypographyItemInput = Partial<ThemeTypographyItem>\nexport type ThemeColorInput = {\n background?: Omit<ThemeColorItemInput, \"text\">\n text?: Omit<ThemeColorItemInput, \"text\">\n divider?: string;\n brand?: ThemeColorItemInput;\n accent?: ThemeColorItemInput;\n success?: ThemeColorItemInput\n info?: ThemeColorItemInput\n warning?: ThemeColorItemInput\n danger?: ThemeColorItemInput\n};\nexport type ThemeTypographyInputType = {\n fontFamily?: string,\n h1?: ThemeTypographyItemInput;\n h2?: ThemeTypographyItemInput;\n h3?: ThemeTypographyItemInput;\n h4?: ThemeTypographyItemInput;\n h5?: ThemeTypographyItemInput;\n h6?: ThemeTypographyItemInput;\n text?: ThemeTypographyItemInput;\n button?: ThemeTypographyItemInput;\n small?: ThemeTypographyItemInput;\n};\nexport interface ThemeOptionInput {\n rtl?: boolean;\n globalStyle?: GlobalCSS,\n interfaces?: { [name: string]: <P extends object>(defaultProps: P, theme: ThemeOptions) => P };\n colors?: ThemeColorInput;\n typography?: ThemeTypographyInputType;\n}\n\n// ============ Reference Types\n\nexport type TypographyRefTypes =\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | \"text\"\n | \"button\"\n | \"small\"\n\nexport type ColorsRefTypes =\n | \"text\"\n | \"text.primary\"\n | \"text.secondary\"\n\n | \"background\"\n | \"background.primary\"\n | \"background.secondary\"\n | \"background.alpha\"\n\n | \"brand\"\n | \"brand.primary\"\n | \"brand.secondary\"\n | \"brand.alpha\"\n | \"brand.text\"\n\n | \"accent\"\n | \"accent.primary\"\n | \"accent.secondary\"\n | \"accent.alpha\"\n | \"accent.text\"\n\n | \"info\"\n | \"info.primary\"\n | \"info.secondary\"\n | \"info.alpha\"\n | \"info.text\"\n\n | \"success\"\n | \"success.primary\"\n | \"success.secondary\"\n | \"success.alpha\"\n | \"success.text\"\n\n | \"warning\"\n | \"warning.primary\"\n | \"warning.secondary\"\n | \"warning.alpha\"\n | \"warning.text\"\n\n | \"danger\"\n | \"danger.primary\"\n | \"danger.secondary\"\n | \"danger.alpha\"\n | \"danger.text\""],
|
|
5
|
-
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
|
-
"names": ["types_exports", "__toCommonJS"]
|
|
7
|
-
}
|
package/theme/types.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=types.mjs.map
|
package/theme/types.mjs.map
DELETED
package/useAnimation.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var t=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var d=(a,e)=>{for(var n in e)t(a,n,{get:e[n],enumerable:!0})},z=(a,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of l(e))!y.call(a,i)&&i!==n&&t(a,i,{get:()=>e[i],enumerable:!(o=f(e,i))||o.enumerable});return a};var S=a=>z(t({},"__esModule",{value:!0}),a);var x={};d(x,{animationEases:()=>s,default:()=>P});module.exports=S(x);var m=require("./css"),c=require("react");const s={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)",linear:"cubic-bezier(0, 0, 1, 1)",easeBounceOut:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"},O=({from:a,to:e,delay:n,ease:o,duration:i})=>{let u=n||0,b=i||600,p=o||"easeBounceOut";const r="anim"+(0,c.useId)().replace(/:/g,"");return(0,m.css)({animationName:r,animationDelay:u+"ms",animationDuration:b+"ms",animationTimingFunction:s[p]||s.easeBounceOut,[`@keyframes ${r}`]:{from:a,to:e}}).classname};var P=O;
|
|
2
|
-
//# sourceMappingURL=useAnimation.cjs.map
|
package/useAnimation.cjs.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/useAnimation.ts"],
|
|
4
|
-
"sourcesContent": ["import { css } from './css'\nimport { useId } from 'react'\nimport { CSSProps } from './css/types'\n\nexport const animationEases = {\n easeInOut: \"cubic-bezier(0.4, 0, 0.2, 1)\",\n easeOut: \"cubic-bezier(0.0, 0, 0.2, 1)\",\n easeIn: \"cubic-bezier(0.4, 0, 1, 1)\",\n sharp: \"cubic-bezier(0.4, 0, 0.6, 1)\",\n linear: \"cubic-bezier(0, 0, 1, 1)\",\n easeBounceOut: \"cubic-bezier(0.68, -0.55, 0.265, 1.55)\"\n}\n\nexport interface UseAnimationProps {\n delay?: number;\n duration?: number;\n from: CSSProps;\n to: CSSProps;\n ease?: keyof typeof animationEases;\n}\n\nconst useAnimation = ({ from, to, delay, ease, duration }: UseAnimationProps) => {\n let _delay = delay || 0;\n let _duration = duration || 600;\n let _ease = ease || \"easeBounceOut\"\n const id = \"anim\" + useId().replace(/:/g, \"\")\n const anim = css({\n animationName: id,\n animationDelay: _delay + \"ms\",\n animationDuration: _duration + \"ms\",\n animationTimingFunction: animationEases[_ease] || animationEases.easeBounceOut,\n [`@keyframes ${id}`]: {\n from: from as any,\n to: to as any\n }\n })\n return anim.classname\n}\n\nexport default useAnimation"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,oBAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,GAAA,IAAAK,EAAoB,iBACpBC,EAAsB,iBAGf,MAAMJ,EAAiB,CAC1B,UAAW,+BACX,QAAS,+BACT,OAAQ,6BACR,MAAO,+BACP,OAAQ,2BACR,cAAe,wCACnB,EAUMK,EAAe,CAAC,CAAE,KAAAC,EAAM,GAAAC,EAAI,MAAAC,EAAO,KAAAC,EAAM,SAAAC,CAAS,IAAyB,CAC7E,IAAIC,EAASH,GAAS,EAClBI,EAAYF,GAAY,IACxBG,EAAQJ,GAAQ,gBACpB,MAAMK,EAAK,UAAS,SAAM,EAAE,QAAQ,KAAM,EAAE,EAW5C,SAVa,OAAI,CACb,cAAeA,EACf,eAAgBH,EAAS,KACzB,kBAAmBC,EAAY,KAC/B,wBAAyBZ,EAAea,CAAK,GAAKb,EAAe,cACjE,CAAC,cAAcc,CAAE,EAAE,EAAG,CAClB,KAAMR,EACN,GAAIC,CACR,CACJ,CAAC,EACW,SAChB,EAEA,IAAON,EAAQI",
|
|
6
|
-
"names": ["useAnimation_exports", "__export", "animationEases", "useAnimation_default", "__toCommonJS", "import_css", "import_react", "useAnimation", "from", "to", "delay", "ease", "duration", "_delay", "_duration", "_ease", "id"]
|
|
7
|
-
}
|
package/useAnimation.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { CSSProps } from './css/types';
|
|
2
|
-
export declare const animationEases: {
|
|
3
|
-
easeInOut: string;
|
|
4
|
-
easeOut: string;
|
|
5
|
-
easeIn: string;
|
|
6
|
-
sharp: string;
|
|
7
|
-
linear: string;
|
|
8
|
-
easeBounceOut: string;
|
|
9
|
-
};
|
|
10
|
-
export interface UseAnimationProps {
|
|
11
|
-
delay?: number;
|
|
12
|
-
duration?: number;
|
|
13
|
-
from: CSSProps;
|
|
14
|
-
to: CSSProps;
|
|
15
|
-
ease?: keyof typeof animationEases;
|
|
16
|
-
}
|
|
17
|
-
declare const useAnimation: ({ from, to, delay, ease, duration }: UseAnimationProps) => string;
|
|
18
|
-
export default useAnimation;
|
package/useAnimation.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{css as u}from"./css";import{useId as b}from"react";const a={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)",linear:"cubic-bezier(0, 0, 1, 1)",easeBounceOut:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"},p=({from:i,to:n,delay:o,ease:t,duration:s})=>{let r=o||0,m=s||600,c=t||"easeBounceOut";const e="anim"+b().replace(/:/g,"");return u({animationName:e,animationDelay:r+"ms",animationDuration:m+"ms",animationTimingFunction:a[c]||a.easeBounceOut,[`@keyframes ${e}`]:{from:i,to:n}}).classname};var S=p;export{a as animationEases,S as default};
|
|
2
|
-
//# sourceMappingURL=useAnimation.mjs.map
|
package/useAnimation.mjs.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/useAnimation.ts"],
|
|
4
|
-
"sourcesContent": ["import { css } from './css'\nimport { useId } from 'react'\nimport { CSSProps } from './css/types'\n\nexport const animationEases = {\n easeInOut: \"cubic-bezier(0.4, 0, 0.2, 1)\",\n easeOut: \"cubic-bezier(0.0, 0, 0.2, 1)\",\n easeIn: \"cubic-bezier(0.4, 0, 1, 1)\",\n sharp: \"cubic-bezier(0.4, 0, 0.6, 1)\",\n linear: \"cubic-bezier(0, 0, 1, 1)\",\n easeBounceOut: \"cubic-bezier(0.68, -0.55, 0.265, 1.55)\"\n}\n\nexport interface UseAnimationProps {\n delay?: number;\n duration?: number;\n from: CSSProps;\n to: CSSProps;\n ease?: keyof typeof animationEases;\n}\n\nconst useAnimation = ({ from, to, delay, ease, duration }: UseAnimationProps) => {\n let _delay = delay || 0;\n let _duration = duration || 600;\n let _ease = ease || \"easeBounceOut\"\n const id = \"anim\" + useId().replace(/:/g, \"\")\n const anim = css({\n animationName: id,\n animationDelay: _delay + \"ms\",\n animationDuration: _duration + \"ms\",\n animationTimingFunction: animationEases[_ease] || animationEases.easeBounceOut,\n [`@keyframes ${id}`]: {\n from: from as any,\n to: to as any\n }\n })\n return anim.classname\n}\n\nexport default useAnimation"],
|
|
5
|
-
"mappings": "AAAA,OAAS,OAAAA,MAAW,QACpB,OAAS,SAAAC,MAAa,QAGf,MAAMC,EAAiB,CAC1B,UAAW,+BACX,QAAS,+BACT,OAAQ,6BACR,MAAO,+BACP,OAAQ,2BACR,cAAe,wCACnB,EAUMC,EAAe,CAAC,CAAE,KAAAC,EAAM,GAAAC,EAAI,MAAAC,EAAO,KAAAC,EAAM,SAAAC,CAAS,IAAyB,CAC7E,IAAIC,EAASH,GAAS,EAClBI,EAAYF,GAAY,IACxBG,EAAQJ,GAAQ,gBACpB,MAAMK,EAAK,OAASX,EAAM,EAAE,QAAQ,KAAM,EAAE,EAW5C,OAVaD,EAAI,CACb,cAAeY,EACf,eAAgBH,EAAS,KACzB,kBAAmBC,EAAY,KAC/B,wBAAyBR,EAAeS,CAAK,GAAKT,EAAe,cACjE,CAAC,cAAcU,CAAE,EAAE,EAAG,CAClB,KAAMR,EACN,GAAIC,CACR,CACJ,CAAC,EACW,SAChB,EAEA,IAAOQ,EAAQV",
|
|
6
|
-
"names": ["css", "useId", "animationEases", "useAnimation", "from", "to", "delay", "ease", "duration", "_delay", "_duration", "_ease", "id", "useAnimation_default"]
|
|
7
|
-
}
|
package/useColorTemplate.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var r=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var u=(o,e)=>{for(var t in e)r(o,t,{get:e[t],enumerable:!0})},c=(o,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of s(e))!m.call(o,l)&&l!==t&&r(o,l,{get:()=>e[l],enumerable:!(a=n(e,l))||a.enumerable});return o};var T=o=>c(r({},"__esModule",{value:!0}),o);var f={};u(f,{default:()=>d});module.exports=T(f);var p=require("./theme");const C=(o,e)=>{const t=(0,p.useTheme)();let a=o==="default"?"background":o;return t.colors[a]?.template[e]};var d=C;
|
|
2
|
-
//# sourceMappingURL=useColorTemplate.cjs.map
|
package/useColorTemplate.cjs.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/useColorTemplate.ts"],
|
|
4
|
-
"sourcesContent": ["import { useTheme } from \"./theme\"\nexport type ColorTemplateColors = \"default\" | \"brand\" | \"accent\" | \"info\" | \"success\" | \"warning\" | \"danger\"\nexport type ColorTemplateType = \"fill\" | \"outline\" | \"text\" | \"alpha\"\n\nconst useColorTemplate = (color: ColorTemplateColors, type: ColorTemplateType) => {\n const theme: any = useTheme()\n let _color = color === 'default' ? \"background\" : color as any\n return theme.colors[_color]?.template[type]\n}\n\nexport default useColorTemplate"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAyB,mBAIzB,MAAMC,EAAmB,CAACC,EAA4BC,IAA4B,CAC9E,MAAMC,KAAa,YAAS,EAC5B,IAAIC,EAASH,IAAU,UAAY,aAAeA,EAClD,OAAOE,EAAM,OAAOC,CAAM,GAAG,SAASF,CAAI,CAC9C,EAEA,IAAOL,EAAQG",
|
|
6
|
-
"names": ["useColorTemplate_exports", "__export", "useColorTemplate_default", "__toCommonJS", "import_theme", "useColorTemplate", "color", "type", "theme", "_color"]
|
|
7
|
-
}
|
package/useColorTemplate.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export type ColorTemplateColors = "default" | "brand" | "accent" | "info" | "success" | "warning" | "danger";
|
|
2
|
-
export type ColorTemplateType = "fill" | "outline" | "text" | "alpha";
|
|
3
|
-
declare const useColorTemplate: (color: ColorTemplateColors, type: ColorTemplateType) => any;
|
|
4
|
-
export default useColorTemplate;
|
package/useColorTemplate.mjs
DELETED
package/useColorTemplate.mjs.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/useColorTemplate.ts"],
|
|
4
|
-
"sourcesContent": ["import { useTheme } from \"./theme\"\nexport type ColorTemplateColors = \"default\" | \"brand\" | \"accent\" | \"info\" | \"success\" | \"warning\" | \"danger\"\nexport type ColorTemplateType = \"fill\" | \"outline\" | \"text\" | \"alpha\"\n\nconst useColorTemplate = (color: ColorTemplateColors, type: ColorTemplateType) => {\n const theme: any = useTheme()\n let _color = color === 'default' ? \"background\" : color as any\n return theme.colors[_color]?.template[type]\n}\n\nexport default useColorTemplate"],
|
|
5
|
-
"mappings": "AAAA,OAAS,YAAAA,MAAgB,UAIzB,MAAMC,EAAmB,CAACC,EAA4BC,IAA4B,CAC9E,MAAMC,EAAaJ,EAAS,EAC5B,IAAIK,EAASH,IAAU,UAAY,aAAeA,EAClD,OAAOE,EAAM,OAAOC,CAAM,GAAG,SAASF,CAAI,CAC9C,EAEA,IAAOG,EAAQL",
|
|
6
|
-
"names": ["useTheme", "useColorTemplate", "color", "type", "theme", "_color", "useColorTemplate_default"]
|
|
7
|
-
}
|
package/useInterface.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var r=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var a=(t,e)=>{for(var n in e)r(t,n,{get:e[n],enumerable:!0})},h=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let c of o(e))!s.call(t,c)&&c!==n&&r(t,c,{get:()=>e[c],enumerable:!(i=m(e,c))||i.enumerable});return t};var x=t=>h(r({},"__esModule",{value:!0}),t);var j={};a(j,{default:()=>g});module.exports=x(j);var f=require("./theme");const b=(t,e,n)=>{const i=(0,f.useTheme)(),c=i.interfaces[t];return c&&(n=c({...n,...e},i)),[{...n,...e},i]};var g=b;
|
|
2
|
-
//# sourceMappingURL=useInterface.cjs.map
|
package/useInterface.cjs.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/useInterface.ts"],
|
|
4
|
-
"sourcesContent": ["import { useTheme } from \"./theme\"\n\nconst useInterface = <P extends object>(name: string, userPorps: P, defaultProps: P) => {\n const theme = useTheme()\n const _interface = theme.interfaces[name]\n\n if (_interface) {\n defaultProps = _interface<P>({ ...defaultProps, ...userPorps }, theme)\n }\n return [{ ...defaultProps, ...userPorps }, theme]\n}\n\nexport default useInterface"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAyB,mBAEzB,MAAMC,EAAe,CAAmBC,EAAcC,EAAcC,IAAoB,CACpF,MAAMC,KAAQ,YAAS,EACjBC,EAAaD,EAAM,WAAWH,CAAI,EAExC,OAAII,IACAF,EAAeE,EAAc,CAAE,GAAGF,EAAc,GAAGD,CAAU,EAAGE,CAAK,GAElE,CAAC,CAAE,GAAGD,EAAc,GAAGD,CAAU,EAAGE,CAAK,CACpD,EAEA,IAAOP,EAAQG",
|
|
6
|
-
"names": ["useInterface_exports", "__export", "useInterface_default", "__toCommonJS", "import_theme", "useInterface", "name", "userPorps", "defaultProps", "theme", "_interface"]
|
|
7
|
-
}
|
package/useInterface.d.ts
DELETED
package/useInterface.mjs
DELETED
package/useInterface.mjs.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/useInterface.ts"],
|
|
4
|
-
"sourcesContent": ["import { useTheme } from \"./theme\"\n\nconst useInterface = <P extends object>(name: string, userPorps: P, defaultProps: P) => {\n const theme = useTheme()\n const _interface = theme.interfaces[name]\n\n if (_interface) {\n defaultProps = _interface<P>({ ...defaultProps, ...userPorps }, theme)\n }\n return [{ ...defaultProps, ...userPorps }, theme]\n}\n\nexport default useInterface"],
|
|
5
|
-
"mappings": "AAAA,OAAS,YAAAA,MAAgB,UAEzB,MAAMC,EAAe,CAAmBC,EAAcC,EAAcC,IAAoB,CACpF,MAAMC,EAAQL,EAAS,EACjBM,EAAaD,EAAM,WAAWH,CAAI,EAExC,OAAII,IACAF,EAAeE,EAAc,CAAE,GAAGF,EAAc,GAAGD,CAAU,EAAGE,CAAK,GAElE,CAAC,CAAE,GAAGD,EAAc,GAAGD,CAAU,EAAGE,CAAK,CACpD,EAEA,IAAOE,EAAQN",
|
|
6
|
-
"names": ["useTheme", "useInterface", "name", "userPorps", "defaultProps", "theme", "_interface", "useInterface_default"]
|
|
7
|
-
}
|