@xanui/core 1.1.3 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/ServerStyleTags.js +3 -2
  2. package/ServerStyleTags.js.map +1 -7
  3. package/ServerStyleTags.mjs +3 -0
  4. package/ServerStyleTags.mjs.map +1 -0
  5. package/Tag/cssPropList.js +186 -2
  6. package/Tag/cssPropList.js.map +1 -7
  7. package/Tag/cssPropList.mjs +186 -0
  8. package/Tag/cssPropList.mjs.map +1 -0
  9. package/Tag/index.js +6 -2
  10. package/Tag/index.js.map +1 -7
  11. package/Tag/index.mjs +6 -0
  12. package/Tag/index.mjs.map +1 -0
  13. package/Tag/useTagProps.js +21 -2
  14. package/Tag/useTagProps.js.map +1 -7
  15. package/Tag/useTagProps.mjs +21 -0
  16. package/Tag/useTagProps.mjs.map +1 -0
  17. package/Transition/index.js +93 -2
  18. package/Transition/index.js.map +1 -7
  19. package/Transition/index.mjs +93 -0
  20. package/Transition/index.mjs.map +1 -0
  21. package/Transition/variants.js +158 -2
  22. package/Transition/variants.js.map +1 -7
  23. package/Transition/variants.mjs +158 -0
  24. package/Transition/variants.mjs.map +1 -0
  25. package/breakpoint/BreakpointProvider.js +43 -0
  26. package/breakpoint/BreakpointProvider.js.map +1 -0
  27. package/breakpoint/BreakpointProvider.mjs +43 -0
  28. package/breakpoint/BreakpointProvider.mjs.map +1 -0
  29. package/breakpoint/useBreakpoint.js +23 -2
  30. package/breakpoint/useBreakpoint.js.map +1 -7
  31. package/breakpoint/useBreakpoint.mjs +23 -0
  32. package/breakpoint/useBreakpoint.mjs.map +1 -0
  33. package/breakpoint/useBreakpointProps.js +42 -2
  34. package/breakpoint/useBreakpointProps.js.map +1 -7
  35. package/breakpoint/useBreakpointProps.mjs +42 -0
  36. package/breakpoint/useBreakpointProps.mjs.map +1 -0
  37. package/css/aliases.js +29 -2
  38. package/css/aliases.js.map +1 -7
  39. package/css/aliases.mjs +29 -0
  40. package/css/aliases.mjs.map +1 -0
  41. package/css/getProps.js +32 -2
  42. package/css/getProps.js.map +1 -7
  43. package/css/getProps.mjs +32 -0
  44. package/css/getProps.mjs.map +1 -0
  45. package/css/getValue.js +92 -2
  46. package/css/getValue.js.map +1 -7
  47. package/css/getValue.mjs +92 -0
  48. package/css/getValue.mjs.map +1 -0
  49. package/css/index.js +55 -2
  50. package/css/index.js.map +1 -7
  51. package/css/index.mjs +55 -0
  52. package/css/index.mjs.map +1 -0
  53. package/index.d.ts +629 -21
  54. package/index.js +1 -2
  55. package/index.js.map +1 -7
  56. package/index.mjs +1 -0
  57. package/index.mjs.map +1 -0
  58. package/isWindow.js +1 -2
  59. package/isWindow.js.map +1 -7
  60. package/isWindow.mjs +1 -0
  61. package/isWindow.mjs.map +1 -0
  62. package/package.json +29 -24
  63. package/theme/ThemeCssVars.js +5 -2
  64. package/theme/ThemeCssVars.js.map +1 -7
  65. package/theme/ThemeCssVars.mjs +5 -0
  66. package/theme/ThemeCssVars.mjs.map +1 -0
  67. package/theme/ThemeDefaultOptions.js +131 -2
  68. package/theme/ThemeDefaultOptions.js.map +1 -7
  69. package/theme/ThemeDefaultOptions.mjs +131 -0
  70. package/theme/ThemeDefaultOptions.mjs.map +1 -0
  71. package/theme/ThemeProvider.js +88 -2
  72. package/theme/ThemeProvider.js.map +1 -7
  73. package/theme/ThemeProvider.mjs +88 -0
  74. package/theme/ThemeProvider.mjs.map +1 -0
  75. package/theme/core.js +18 -2
  76. package/theme/core.js.map +1 -7
  77. package/theme/core.mjs +18 -0
  78. package/theme/core.mjs.map +1 -0
  79. package/theme/createColor.js +46 -2
  80. package/theme/createColor.js.map +1 -7
  81. package/theme/createColor.mjs +46 -0
  82. package/theme/createColor.mjs.map +1 -0
  83. package/theme/createTheme.js +21 -2
  84. package/theme/createTheme.js.map +1 -7
  85. package/theme/createTheme.mjs +21 -0
  86. package/theme/createTheme.mjs.map +1 -0
  87. package/theme/createThemeSwitcher.js +12 -2
  88. package/theme/createThemeSwitcher.js.map +1 -7
  89. package/theme/createThemeSwitcher.mjs +12 -0
  90. package/theme/createThemeSwitcher.mjs.map +1 -0
  91. package/theme/index.js +2 -2
  92. package/theme/index.js.map +1 -7
  93. package/theme/index.mjs +2 -0
  94. package/theme/index.mjs.map +1 -0
  95. package/useAnimation.js +25 -2
  96. package/useAnimation.js.map +1 -7
  97. package/useAnimation.mjs +25 -0
  98. package/useAnimation.mjs.map +1 -0
  99. package/useColorTemplate.js +6 -2
  100. package/useColorTemplate.js.map +1 -7
  101. package/useColorTemplate.mjs +6 -0
  102. package/useColorTemplate.mjs.map +1 -0
  103. package/useInterface.js +8 -2
  104. package/useInterface.js.map +1 -7
  105. package/useInterface.mjs +8 -0
  106. package/useInterface.mjs.map +1 -0
  107. package/ServerStyleTags.d.ts +0 -3
  108. package/Tag/cssPropList.d.ts +0 -2
  109. package/Tag/index.d.ts +0 -4
  110. package/Tag/types.d.ts +0 -179
  111. package/Tag/types.js +0 -1
  112. package/Tag/types.js.map +0 -7
  113. package/Tag/useTagProps.d.ts +0 -3
  114. package/Transition/index.d.ts +0 -31
  115. package/Transition/variants.d.ts +0 -131
  116. package/breakpoint/index.d.ts +0 -6
  117. package/breakpoint/index.js +0 -2
  118. package/breakpoint/index.js.map +0 -7
  119. package/breakpoint/useBreakpoint.d.ts +0 -10
  120. package/breakpoint/useBreakpointProps.d.ts +0 -6
  121. package/cjs/ServerStyleTags.js +0 -2
  122. package/cjs/ServerStyleTags.js.map +0 -7
  123. package/cjs/Tag/cssPropList.js +0 -2
  124. package/cjs/Tag/cssPropList.js.map +0 -7
  125. package/cjs/Tag/index.js +0 -2
  126. package/cjs/Tag/index.js.map +0 -7
  127. package/cjs/Tag/types.js +0 -2
  128. package/cjs/Tag/types.js.map +0 -7
  129. package/cjs/Tag/useTagProps.js +0 -2
  130. package/cjs/Tag/useTagProps.js.map +0 -7
  131. package/cjs/Transition/index.js +0 -2
  132. package/cjs/Transition/index.js.map +0 -7
  133. package/cjs/Transition/variants.js +0 -2
  134. package/cjs/Transition/variants.js.map +0 -7
  135. package/cjs/breakpoint/index.js +0 -2
  136. package/cjs/breakpoint/index.js.map +0 -7
  137. package/cjs/breakpoint/useBreakpoint.js +0 -2
  138. package/cjs/breakpoint/useBreakpoint.js.map +0 -7
  139. package/cjs/breakpoint/useBreakpointProps.js +0 -2
  140. package/cjs/breakpoint/useBreakpointProps.js.map +0 -7
  141. package/cjs/css/aliases.js +0 -2
  142. package/cjs/css/aliases.js.map +0 -7
  143. package/cjs/css/getProps.js +0 -2
  144. package/cjs/css/getProps.js.map +0 -7
  145. package/cjs/css/getValue.js +0 -2
  146. package/cjs/css/getValue.js.map +0 -7
  147. package/cjs/css/index.js +0 -2
  148. package/cjs/css/index.js.map +0 -7
  149. package/cjs/css/types.js +0 -2
  150. package/cjs/css/types.js.map +0 -7
  151. package/cjs/index.js +0 -2
  152. package/cjs/index.js.map +0 -7
  153. package/cjs/isWindow.js +0 -2
  154. package/cjs/isWindow.js.map +0 -7
  155. package/cjs/theme/ThemeCssVars.js +0 -2
  156. package/cjs/theme/ThemeCssVars.js.map +0 -7
  157. package/cjs/theme/ThemeDefaultOptions.js +0 -2
  158. package/cjs/theme/ThemeDefaultOptions.js.map +0 -7
  159. package/cjs/theme/ThemeProvider.js +0 -2
  160. package/cjs/theme/ThemeProvider.js.map +0 -7
  161. package/cjs/theme/core.js +0 -2
  162. package/cjs/theme/core.js.map +0 -7
  163. package/cjs/theme/createColor.js +0 -2
  164. package/cjs/theme/createColor.js.map +0 -7
  165. package/cjs/theme/createTheme.js +0 -2
  166. package/cjs/theme/createTheme.js.map +0 -7
  167. package/cjs/theme/createThemeSwitcher.js +0 -2
  168. package/cjs/theme/createThemeSwitcher.js.map +0 -7
  169. package/cjs/theme/index.js +0 -2
  170. package/cjs/theme/index.js.map +0 -7
  171. package/cjs/theme/types.js +0 -2
  172. package/cjs/theme/types.js.map +0 -7
  173. package/cjs/useAnimation.js +0 -2
  174. package/cjs/useAnimation.js.map +0 -7
  175. package/cjs/useColorTemplate.js +0 -2
  176. package/cjs/useColorTemplate.js.map +0 -7
  177. package/cjs/useInterface.js +0 -2
  178. package/cjs/useInterface.js.map +0 -7
  179. package/css/aliases.d.ts +0 -4
  180. package/css/getProps.d.ts +0 -3
  181. package/css/getValue.d.ts +0 -3
  182. package/css/index.d.ts +0 -15
  183. package/css/types.d.ts +0 -54
  184. package/css/types.js +0 -1
  185. package/css/types.js.map +0 -7
  186. package/isWindow.d.ts +0 -2
  187. package/theme/ThemeCssVars.d.ts +0 -3
  188. package/theme/ThemeDefaultOptions.d.ts +0 -68
  189. package/theme/ThemeProvider.d.ts +0 -11
  190. package/theme/core.d.ts +0 -7
  191. package/theme/createColor.d.ts +0 -41
  192. package/theme/createTheme.d.ts +0 -2
  193. package/theme/createThemeSwitcher.d.ts +0 -6
  194. package/theme/index.d.ts +0 -5
  195. package/theme/types.d.ts +0 -124
  196. package/theme/types.js +0 -1
  197. package/theme/types.js.map +0 -7
  198. package/useAnimation.d.ts +0 -18
  199. package/useColorTemplate.d.ts +0 -4
  200. package/useInterface.d.ts +0 -2
@@ -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
- "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.js.map
@@ -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
- }
@@ -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.js.map
@@ -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
- }
@@ -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.js.map
@@ -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
- }
@@ -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.js.map
@@ -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
- }
@@ -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.js.map
@@ -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/css/aliases.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import { OptionAliases } from 'oncss';
2
- import { Aliases } from './types';
3
- declare const aliases: OptionAliases<Aliases>;
4
- export default aliases;
package/css/getProps.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import { CSSProps } from "./types";
2
- declare const getProps: (prop: string, value: string, _css: CSSProps) => any;
3
- export default getProps;
package/css/getValue.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import { CSSProps } from "./types";
2
- declare const getValue: (prop: any, value: string | number, _css: CSSProps) => any;
3
- export default getValue;
package/css/index.d.ts DELETED
@@ -1,15 +0,0 @@
1
- import getValue from "./getValue";
2
- import getProps from "./getProps";
3
- import { CSSOptionProps, CSSProps } from './types';
4
- export { getValue, getProps };
5
- export declare const breakpoints: {
6
- xs: number;
7
- sm: number;
8
- md: number;
9
- lg: number;
10
- xl: number;
11
- };
12
- export declare const css: (props: CSSProps, options?: CSSOptionProps) => import("oncss").CSSFactoryType;
13
- export declare const adjustColor: (hex: string, factor: number) => string;
14
- export declare const adjustTextContrast: (color: string) => "#FFFFFF" | "#111111";
15
- export declare const alpha: (color: string, opacity?: number) => string;
package/css/types.d.ts DELETED
@@ -1,54 +0,0 @@
1
- import * as CSS from 'csstype';
2
- import { ColorsRefTypes, TypographyRefTypes, ThemeOptions } from '../theme/types';
3
- import * as oncss from 'oncss';
4
- export type FN = (theme: ThemeOptions) => string | number;
5
- export type CSSBreakpointType = {
6
- [key in BreakpointKeys]: string | number;
7
- };
8
- export type CSSValueType<T extends keyof CSS.Properties> = CSS.Properties[T] | Partial<CSSBreakpointType> | number;
9
- export type Aliases = {
10
- bgcolor?: CSSValueType<'background'> | ColorsRefTypes;
11
- bgimage?: CSSValueType<'backgroundImage'>;
12
- bg?: CSSValueType<'background'> | ColorsRefTypes;
13
- p?: CSSValueType<'padding'>;
14
- pt?: CSSValueType<'padding'>;
15
- pr?: CSSValueType<'padding'>;
16
- pb?: CSSValueType<'padding'>;
17
- pl?: CSSValueType<'padding'>;
18
- px?: CSSValueType<'padding'>;
19
- py?: CSSValueType<'margin'>;
20
- m?: CSSValueType<'margin'>;
21
- mt?: CSSValueType<'margin'>;
22
- mr?: CSSValueType<'margin'>;
23
- mb?: CSSValueType<'margin'>;
24
- ml?: CSSValueType<'margin'>;
25
- mx?: CSSValueType<'margin'>;
26
- my?: CSSValueType<'margin'>;
27
- size?: CSSValueType<'width'>;
28
- spacing?: Partial<CSSBreakpointType> | number;
29
- radius?: CSSValueType<'borderRadius'> | number;
30
- borderRadius?: CSSValueType<'borderRadius'> | number;
31
- shadow?: CSSValueType<'boxShadow'> | number;
32
- flexBox?: boolean;
33
- flexRow?: boolean;
34
- flexColumn?: boolean;
35
- flexWraped?: boolean;
36
- direction?: "row" | "column" | CSSValueType<'direction'>;
37
- gap?: CSSValueType<'gap'>;
38
- color?: CSSValueType<'color'> | ColorsRefTypes;
39
- width?: CSSValueType<'width'> | BreakpointKeys;
40
- height?: CSSValueType<'height'>;
41
- borderColor?: CSSValueType<'backgroundColor'> | ColorsRefTypes;
42
- fontFamily?: CSSValueType<"fontFamily"> | "default";
43
- fontSize?: CSSValueType<"fontSize"> | TypographyRefTypes;
44
- minWidth?: CSSValueType<"minWidth"> | BreakpointKeys;
45
- maxWidth?: CSSValueType<"maxWidth"> | BreakpointKeys;
46
- minHeight?: CSSValueType<"minHeight">;
47
- maxHeight?: CSSValueType<"maxHeight">;
48
- };
49
- export type BreakpointKeys = "xs" | "sm" | "md" | "lg" | "xl";
50
- export type CSSProps = oncss.CSSProps<Aliases, BreakpointKeys>;
51
- export type CSSOptionProps = oncss.CSSOptionProps<Aliases, BreakpointKeys>;
52
- export type GlobalCSS = {
53
- [key: string]: oncss.CSSPropsWithoutGlobal<Aliases, BreakpointKeys>;
54
- };
package/css/types.js DELETED
@@ -1 +0,0 @@
1
- //# sourceMappingURL=types.js.map
package/css/types.js.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [],
5
- "mappings": "",
6
- "names": []
7
- }
package/isWindow.d.ts DELETED
@@ -1,2 +0,0 @@
1
- declare const isWindow: () => Window | void;
2
- export default isWindow;
@@ -1,3 +0,0 @@
1
- import { ThemeOptions } from "./types";
2
- declare const ThemeCssVars: (theme: ThemeOptions) => any;
3
- export default ThemeCssVars;
@@ -1,68 +0,0 @@
1
- import { ThemeOptionInput, ThemeTypographyType } from './types';
2
- export declare const lightColorPallete: {
3
- text: {
4
- primary: string;
5
- secondary: string;
6
- };
7
- background: {
8
- primary: string;
9
- secondary: string;
10
- };
11
- divider: string;
12
- };
13
- export declare const darkColorPallete: {
14
- text: {
15
- primary: string;
16
- secondary: string;
17
- };
18
- background: {
19
- primary: string;
20
- secondary: string;
21
- };
22
- divider: string;
23
- };
24
- export declare const ThemeColors: {
25
- brand: {
26
- primary: string;
27
- secondary: string;
28
- text: string;
29
- };
30
- accent: {
31
- primary: string;
32
- secondary: string;
33
- text: string;
34
- };
35
- info: {
36
- primary: string;
37
- secondary: string;
38
- text: string;
39
- };
40
- success: {
41
- primary: string;
42
- secondary: string;
43
- text: string;
44
- };
45
- warning: {
46
- primary: string;
47
- secondary: string;
48
- text: string;
49
- };
50
- danger: {
51
- primary: string;
52
- secondary: string;
53
- text: string;
54
- };
55
- text: {
56
- primary: string;
57
- secondary: string;
58
- };
59
- background: {
60
- primary: string;
61
- secondary: string;
62
- };
63
- divider: string;
64
- };
65
- export declare const ThemeTypography: ThemeTypographyType;
66
- export declare const shadow: string[];
67
- declare const _default: ThemeOptionInput;
68
- export default _default;
@@ -1,11 +0,0 @@
1
- import * as React from "react";
2
- import { TagComponentType, TagProps } from "../Tag/types";
3
- export type ThemeProviderProps<T extends TagComponentType = 'div'> = TagProps<T> & {
4
- theme: string;
5
- resetCss?: boolean;
6
- scrollbarCss?: boolean;
7
- isRootProvider?: boolean;
8
- renderIsRoot?: React.ReactElement;
9
- };
10
- declare const ThemeProvider: ({ children, theme, resetCss, scrollbarCss, isRootProvider, renderIsRoot, ...props }: ThemeProviderProps) => React.JSX.Element;
11
- export default ThemeProvider;
package/theme/core.d.ts DELETED
@@ -1,7 +0,0 @@
1
- import React from "react";
2
- import { ObjectType, ThemeOptions } from "./types";
3
- export declare const ThemeFactory: Map<string, ThemeOptions>;
4
- export declare const ThemeContex: React.Context<string>;
5
- export declare const getTheme: (theme: string) => ThemeOptions | undefined;
6
- export declare const useTheme: () => ThemeOptions;
7
- export declare const mergeObject: (a: ObjectType, b: ObjectType) => ObjectType;
@@ -1,41 +0,0 @@
1
- import { ThemeOptions, ThemeColor } from "./types";
2
- declare const createColor: (theme: ThemeOptions, name: keyof ThemeColor) => {
3
- alpha: string;
4
- template: {
5
- outline: {
6
- bgcolor: string;
7
- color: any;
8
- border: number;
9
- borderColor: any;
10
- hover: {
11
- color: any;
12
- borderColor: any;
13
- };
14
- };
15
- fill: {
16
- bgcolor: any;
17
- color: any;
18
- hover: {
19
- bgcolor: any;
20
- color: any;
21
- };
22
- };
23
- text: {
24
- bgcolor: string;
25
- color: any;
26
- hover: {
27
- bgcolor: any;
28
- color: any;
29
- };
30
- };
31
- alpha: {
32
- bgcolor: any;
33
- color: any;
34
- hover: {
35
- bgcolor: any;
36
- color: any;
37
- };
38
- };
39
- };
40
- };
41
- export default createColor;
@@ -1,2 +0,0 @@
1
- import { ThemeOptions, ThemeOptionInput } from "./types";
2
- export declare const createTheme: (name: string, options: ThemeOptionInput, darkMode?: boolean) => ThemeOptions;
@@ -1,6 +0,0 @@
1
- declare const createThemeSwitcher: (defaultTheme: string, store?: "session" | "local") => () => {
2
- name: string;
3
- theme: import("./types").ThemeOptions | undefined;
4
- change: (theme: string) => void;
5
- };
6
- export default createThemeSwitcher;
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/types.d.ts DELETED
@@ -1,124 +0,0 @@
1
- import { BreakpointKeys, GlobalCSS } from "../css/types";
2
- export type ObjectType = {
3
- [key: string]: any;
4
- };
5
- export type ThemeColorItem = {
6
- primary: string;
7
- secondary: string;
8
- text: string;
9
- alpha: string;
10
- template: {
11
- outline: {
12
- bgcolor: string;
13
- color: string;
14
- border: number;
15
- borderColor: string;
16
- hover: {
17
- bgcolor: string;
18
- color: string;
19
- };
20
- };
21
- fill: {
22
- bgcolor: string;
23
- color: string;
24
- hover: {
25
- bgcolor: string;
26
- color: string;
27
- };
28
- };
29
- text: {
30
- bgcolor: string;
31
- color: string;
32
- hover: {
33
- bgcolor: string;
34
- color: string;
35
- };
36
- };
37
- alpha: {
38
- bgcolor: string;
39
- color: string;
40
- hover: {
41
- bgcolor: string;
42
- color: string;
43
- };
44
- };
45
- };
46
- };
47
- export type ThemeTypographyItem = {
48
- fontSize: number;
49
- lineHeight: number;
50
- fontWeight: number;
51
- };
52
- export type ThemeColor = {
53
- background: Omit<ThemeColorItem, "text">;
54
- text: Omit<ThemeColorItem, "text" | "alpha" | "template">;
55
- divider: string;
56
- brand: ThemeColorItem;
57
- accent: ThemeColorItem;
58
- success: ThemeColorItem;
59
- info: ThemeColorItem;
60
- warning: ThemeColorItem;
61
- danger: ThemeColorItem;
62
- };
63
- export type ThemeTypographyType = {
64
- fontFamily: string;
65
- h1: ThemeTypographyItem;
66
- h2: ThemeTypographyItem;
67
- h3: ThemeTypographyItem;
68
- h4: ThemeTypographyItem;
69
- h5: ThemeTypographyItem;
70
- h6: ThemeTypographyItem;
71
- text: ThemeTypographyItem;
72
- button: ThemeTypographyItem;
73
- small: ThemeTypographyItem;
74
- };
75
- export interface ThemeOptions {
76
- name: string;
77
- rtl: boolean;
78
- globalStyle: GlobalCSS;
79
- breakpoints: {
80
- [key in BreakpointKeys]: number;
81
- };
82
- shadow: string[];
83
- interfaces: {
84
- [name: string]: <P extends object>(defaultProps: P, theme: ThemeOptions) => P;
85
- };
86
- colors: ThemeColor;
87
- typography: ThemeTypographyType;
88
- }
89
- export type ThemeColorItemInput = Partial<Omit<ThemeColorItem, "alpha">>;
90
- export type ThemeTypographyItemInput = Partial<ThemeTypographyItem>;
91
- export type ThemeColorInput = {
92
- background?: Omit<ThemeColorItemInput, "text">;
93
- text?: Omit<ThemeColorItemInput, "text">;
94
- divider?: string;
95
- brand?: ThemeColorItemInput;
96
- accent?: ThemeColorItemInput;
97
- success?: ThemeColorItemInput;
98
- info?: ThemeColorItemInput;
99
- warning?: ThemeColorItemInput;
100
- danger?: ThemeColorItemInput;
101
- };
102
- export type ThemeTypographyInputType = {
103
- fontFamily?: string;
104
- h1?: ThemeTypographyItemInput;
105
- h2?: ThemeTypographyItemInput;
106
- h3?: ThemeTypographyItemInput;
107
- h4?: ThemeTypographyItemInput;
108
- h5?: ThemeTypographyItemInput;
109
- h6?: ThemeTypographyItemInput;
110
- text?: ThemeTypographyItemInput;
111
- button?: ThemeTypographyItemInput;
112
- small?: ThemeTypographyItemInput;
113
- };
114
- export interface ThemeOptionInput {
115
- rtl?: boolean;
116
- globalStyle?: GlobalCSS;
117
- interfaces?: {
118
- [name: string]: <P extends object>(defaultProps: P, theme: ThemeOptions) => P;
119
- };
120
- colors?: ThemeColorInput;
121
- typography?: ThemeTypographyInputType;
122
- }
123
- export type TypographyRefTypes = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "text" | "button" | "small";
124
- export type ColorsRefTypes = "text" | "text.primary" | "text.secondary" | "background" | "background.primary" | "background.secondary" | "background.alpha" | "brand" | "brand.primary" | "brand.secondary" | "brand.alpha" | "brand.text" | "accent" | "accent.primary" | "accent.secondary" | "accent.alpha" | "accent.text" | "info" | "info.primary" | "info.secondary" | "info.alpha" | "info.text" | "success" | "success.primary" | "success.secondary" | "success.alpha" | "success.text" | "warning" | "warning.primary" | "warning.secondary" | "warning.alpha" | "warning.text" | "danger" | "danger.primary" | "danger.secondary" | "danger.alpha" | "danger.text";
package/theme/types.js DELETED
@@ -1 +0,0 @@
1
- //# sourceMappingURL=types.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [],
5
- "mappings": "",
6
- "names": []
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;
@@ -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/useInterface.d.ts DELETED
@@ -1,2 +0,0 @@
1
- declare const useInterface: <P extends object>(name: string, userPorps: P, defaultProps: P) => (import(".").ThemeOptions | P)[];
2
- export default useInterface;