@xanui/core 1.0.22 → 1.1.0

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 (199) hide show
  1. package/{cjs/ServerStyleTags.js → ServerStyleTags.cjs} +1 -1
  2. package/{cjs/ServerStyleTags.js.map → ServerStyleTags.cjs.map} +2 -2
  3. package/{ServerStyleTags.js → ServerStyleTags.mjs} +1 -1
  4. package/{ServerStyleTags.js.map → ServerStyleTags.mjs.map} +1 -1
  5. package/{cjs/Tag/cssPropList.js → Tag/cssPropList.cjs} +1 -1
  6. package/Tag/cssPropList.cjs.map +7 -0
  7. package/Tag/{cssPropList.js → cssPropList.mjs} +1 -1
  8. package/Tag/cssPropList.mjs.map +7 -0
  9. package/{cjs/Tag/index.js → Tag/index.cjs} +1 -1
  10. package/Tag/index.cjs.map +7 -0
  11. package/Tag/{index.js → index.mjs} +1 -1
  12. package/Tag/index.mjs.map +7 -0
  13. package/{cjs/Tag/types.js → Tag/types.cjs} +1 -1
  14. package/Tag/types.cjs.map +7 -0
  15. package/Tag/types.mjs +1 -0
  16. package/{cjs/Tag/useTagProps.js → Tag/useTagProps.cjs} +1 -1
  17. package/{cjs/Tag/useTagProps.js.map → Tag/useTagProps.cjs.map} +2 -2
  18. package/Tag/{useTagProps.js → useTagProps.mjs} +1 -1
  19. package/Tag/useTagProps.mjs.map +7 -0
  20. package/Transition/index.cjs +2 -0
  21. package/Transition/index.cjs.map +7 -0
  22. package/Transition/index.mjs +2 -0
  23. package/Transition/index.mjs.map +7 -0
  24. package/{cjs/Transition/variants.js → Transition/variants.cjs} +1 -1
  25. package/Transition/variants.cjs.map +7 -0
  26. package/Transition/{variants.js → variants.mjs} +1 -1
  27. package/Transition/variants.mjs.map +7 -0
  28. package/{cjs/breakpoint/index.js → breakpoint/index.cjs} +1 -1
  29. package/breakpoint/index.cjs.map +7 -0
  30. package/breakpoint/{index.js → index.mjs} +1 -1
  31. package/breakpoint/index.mjs.map +7 -0
  32. package/{cjs/breakpoint/useBreakpoint.js → breakpoint/useBreakpoint.cjs} +1 -1
  33. package/breakpoint/useBreakpoint.cjs.map +7 -0
  34. package/breakpoint/{useBreakpoint.js → useBreakpoint.mjs} +1 -1
  35. package/breakpoint/useBreakpoint.mjs.map +7 -0
  36. package/{cjs/breakpoint/useBreakpointProps.js → breakpoint/useBreakpointProps.cjs} +1 -1
  37. package/breakpoint/useBreakpointProps.cjs.map +7 -0
  38. package/breakpoint/{useBreakpointProps.js → useBreakpointProps.mjs} +1 -1
  39. package/breakpoint/useBreakpointProps.mjs.map +7 -0
  40. package/{cjs/css/aliases.js → css/aliases.cjs} +1 -1
  41. package/css/aliases.cjs.map +7 -0
  42. package/css/{aliases.js → aliases.mjs} +1 -1
  43. package/css/aliases.mjs.map +7 -0
  44. package/{cjs/css/getProps.js → css/getProps.cjs} +1 -1
  45. package/css/getProps.cjs.map +7 -0
  46. package/css/{getProps.js → getProps.mjs} +1 -1
  47. package/css/getProps.mjs.map +7 -0
  48. package/{cjs/css/getValue.js → css/getValue.cjs} +1 -1
  49. package/css/getValue.cjs.map +7 -0
  50. package/css/{getValue.js → getValue.mjs} +1 -1
  51. package/css/getValue.mjs.map +7 -0
  52. package/{cjs/css/index.js → css/index.cjs} +1 -1
  53. package/css/index.cjs.map +7 -0
  54. package/css/{index.js → index.mjs} +1 -1
  55. package/css/index.mjs.map +7 -0
  56. package/{cjs/css/types.js → css/types.cjs} +1 -1
  57. package/css/types.cjs.map +7 -0
  58. package/css/types.mjs +1 -0
  59. package/{cjs/index.js → index.cjs} +1 -1
  60. package/index.cjs.map +7 -0
  61. package/{index.js → index.mjs} +1 -1
  62. package/index.mjs.map +7 -0
  63. package/{cjs/isWindow.js → isWindow.cjs} +1 -1
  64. package/{cjs/isWindow.js.map → isWindow.cjs.map} +2 -2
  65. package/{isWindow.js → isWindow.mjs} +1 -1
  66. package/{isWindow.js.map → isWindow.mjs.map} +1 -1
  67. package/package.json +8 -13
  68. package/{cjs/theme/ThemeCssVars.js → theme/ThemeCssVars.cjs} +1 -1
  69. package/theme/ThemeCssVars.cjs.map +7 -0
  70. package/theme/{ThemeCssVars.js → ThemeCssVars.mjs} +1 -1
  71. package/theme/ThemeCssVars.mjs.map +7 -0
  72. package/{cjs/theme/ThemeDefaultOptions.js → theme/ThemeDefaultOptions.cjs} +1 -1
  73. package/theme/ThemeDefaultOptions.cjs.map +7 -0
  74. package/theme/{ThemeDefaultOptions.js → ThemeDefaultOptions.mjs} +1 -1
  75. package/theme/ThemeDefaultOptions.mjs.map +7 -0
  76. package/theme/ThemeProvider.cjs +2 -0
  77. package/theme/ThemeProvider.cjs.map +7 -0
  78. package/theme/ThemeProvider.mjs +2 -0
  79. package/theme/ThemeProvider.mjs.map +7 -0
  80. package/{cjs/theme/core.js → theme/core.cjs} +1 -1
  81. package/theme/core.cjs.map +7 -0
  82. package/theme/{core.js → core.mjs} +1 -1
  83. package/theme/core.mjs.map +7 -0
  84. package/{cjs/theme/createColor.js → theme/createColor.cjs} +1 -1
  85. package/theme/createColor.cjs.map +7 -0
  86. package/theme/{createColor.js → createColor.mjs} +1 -1
  87. package/theme/createColor.mjs.map +7 -0
  88. package/{cjs/theme/createTheme.js → theme/createTheme.cjs} +1 -1
  89. package/theme/createTheme.cjs.map +7 -0
  90. package/theme/{createTheme.js → createTheme.mjs} +1 -1
  91. package/theme/createTheme.mjs.map +7 -0
  92. package/{cjs/theme/createThemeSwitcher.js → theme/createThemeSwitcher.cjs} +1 -1
  93. package/{cjs/theme/createThemeSwitcher.js.map → theme/createThemeSwitcher.cjs.map} +2 -2
  94. package/theme/{createThemeSwitcher.js → createThemeSwitcher.mjs} +1 -1
  95. package/theme/{createThemeSwitcher.js.map → createThemeSwitcher.mjs.map} +1 -1
  96. package/{cjs/theme/index.js → theme/index.cjs} +1 -1
  97. package/theme/index.cjs.map +7 -0
  98. package/theme/{index.js → index.mjs} +1 -1
  99. package/theme/index.mjs.map +7 -0
  100. package/{cjs/theme/types.js → theme/types.cjs} +1 -1
  101. package/theme/types.cjs.map +7 -0
  102. package/theme/types.mjs +1 -0
  103. package/{cjs/useAnimation.js → useAnimation.cjs} +1 -1
  104. package/useAnimation.cjs.map +7 -0
  105. package/{useAnimation.js → useAnimation.mjs} +1 -1
  106. package/useAnimation.mjs.map +7 -0
  107. package/{cjs/useColorTemplate.js → useColorTemplate.cjs} +1 -1
  108. package/useColorTemplate.cjs.map +7 -0
  109. package/{useColorTemplate.js → useColorTemplate.mjs} +1 -1
  110. package/useColorTemplate.mjs.map +7 -0
  111. package/{cjs/useInterface.js → useInterface.cjs} +1 -1
  112. package/{cjs/useInterface.js.map → useInterface.cjs.map} +2 -2
  113. package/{useInterface.js → useInterface.mjs} +1 -1
  114. package/{useInterface.js.map → useInterface.mjs.map} +1 -1
  115. package/Tag/cssPropList.js.map +0 -7
  116. package/Tag/index.js.map +0 -7
  117. package/Tag/types.js +0 -1
  118. package/Tag/useTagProps.js.map +0 -7
  119. package/Transition/index.js +0 -2
  120. package/Transition/index.js.map +0 -7
  121. package/Transition/variants.js.map +0 -7
  122. package/breakpoint/index.js.map +0 -7
  123. package/breakpoint/useBreakpoint.js.map +0 -7
  124. package/breakpoint/useBreakpointProps.js.map +0 -7
  125. package/cjs/Tag/cssPropList.js.map +0 -7
  126. package/cjs/Tag/index.js.map +0 -7
  127. package/cjs/Tag/types.js.map +0 -7
  128. package/cjs/Transition/index.js +0 -2
  129. package/cjs/Transition/index.js.map +0 -7
  130. package/cjs/Transition/variants.js.map +0 -7
  131. package/cjs/breakpoint/index.js.map +0 -7
  132. package/cjs/breakpoint/useBreakpoint.js.map +0 -7
  133. package/cjs/breakpoint/useBreakpointProps.js.map +0 -7
  134. package/cjs/css/aliases.js.map +0 -7
  135. package/cjs/css/getProps.js.map +0 -7
  136. package/cjs/css/getValue.js.map +0 -7
  137. package/cjs/css/index.js.map +0 -7
  138. package/cjs/css/types.js.map +0 -7
  139. package/cjs/index.js.map +0 -7
  140. package/cjs/theme/ThemeCssVars.js.map +0 -7
  141. package/cjs/theme/ThemeDefaultOptions.js.map +0 -7
  142. package/cjs/theme/ThemeProvider.js +0 -2
  143. package/cjs/theme/ThemeProvider.js.map +0 -7
  144. package/cjs/theme/core.js.map +0 -7
  145. package/cjs/theme/createColor.js.map +0 -7
  146. package/cjs/theme/createTheme.js.map +0 -7
  147. package/cjs/theme/index.js.map +0 -7
  148. package/cjs/theme/types.js.map +0 -7
  149. package/cjs/useAnimation.js.map +0 -7
  150. package/cjs/useColorTemplate.js.map +0 -7
  151. package/css/aliases.js.map +0 -7
  152. package/css/getProps.js.map +0 -7
  153. package/css/getValue.js.map +0 -7
  154. package/css/index.js.map +0 -7
  155. package/css/types.js +0 -1
  156. package/index.js.map +0 -7
  157. package/theme/ThemeCssVars.js.map +0 -7
  158. package/theme/ThemeDefaultOptions.js.map +0 -7
  159. package/theme/ThemeProvider.js +0 -2
  160. package/theme/ThemeProvider.js.map +0 -7
  161. package/theme/core.js.map +0 -7
  162. package/theme/createColor.js.map +0 -7
  163. package/theme/createTheme.js.map +0 -7
  164. package/theme/index.js.map +0 -7
  165. package/theme/types.js +0 -1
  166. package/useAnimation.js.map +0 -7
  167. package/useColorTemplate.js.map +0 -7
  168. /package/{types/ServerStyleTags.d.ts → ServerStyleTags.d.ts} +0 -0
  169. /package/{types/Tag → Tag}/cssPropList.d.ts +0 -0
  170. /package/{types/Tag → Tag}/index.d.ts +0 -0
  171. /package/{types/Tag → Tag}/types.d.ts +0 -0
  172. /package/Tag/{types.js.map → types.mjs.map} +0 -0
  173. /package/{types/Tag → Tag}/useTagProps.d.ts +0 -0
  174. /package/{types/Transition → Transition}/index.d.ts +0 -0
  175. /package/{types/Transition → Transition}/variants.d.ts +0 -0
  176. /package/{types/breakpoint → breakpoint}/index.d.ts +0 -0
  177. /package/{types/breakpoint → breakpoint}/useBreakpoint.d.ts +0 -0
  178. /package/{types/breakpoint → breakpoint}/useBreakpointProps.d.ts +0 -0
  179. /package/{types/css → css}/aliases.d.ts +0 -0
  180. /package/{types/css → css}/getProps.d.ts +0 -0
  181. /package/{types/css → css}/getValue.d.ts +0 -0
  182. /package/{types/css → css}/index.d.ts +0 -0
  183. /package/{types/css → css}/types.d.ts +0 -0
  184. /package/css/{types.js.map → types.mjs.map} +0 -0
  185. /package/{types/index.d.ts → index.d.ts} +0 -0
  186. /package/{types/isWindow.d.ts → isWindow.d.ts} +0 -0
  187. /package/{types/theme → theme}/ThemeCssVars.d.ts +0 -0
  188. /package/{types/theme → theme}/ThemeDefaultOptions.d.ts +0 -0
  189. /package/{types/theme → theme}/ThemeProvider.d.ts +0 -0
  190. /package/{types/theme → theme}/core.d.ts +0 -0
  191. /package/{types/theme → theme}/createColor.d.ts +0 -0
  192. /package/{types/theme → theme}/createTheme.d.ts +0 -0
  193. /package/{types/theme → theme}/createThemeSwitcher.d.ts +0 -0
  194. /package/{types/theme → theme}/index.d.ts +0 -0
  195. /package/{types/theme → theme}/types.d.ts +0 -0
  196. /package/theme/{types.js.map → types.mjs.map} +0 -0
  197. /package/{types/useAnimation.d.ts → useAnimation.d.ts} +0 -0
  198. /package/{types/useColorTemplate.d.ts → useColorTemplate.d.ts} +0 -0
  199. /package/{types/useInterface.d.ts → useInterface.d.ts} +0 -0
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/Transition/variants.ts"],
4
- "sourcesContent": ["import { TransitionElementProps } from \".\"\r\n\r\nexport const slideDown = (_arg: TransitionElementProps) => {\r\n return {\r\n from: {\r\n transform: `translateY(-${_arg.height}px)!important`,\r\n },\r\n to: {\r\n transform: `translateY(0)!important`,\r\n }\r\n }\r\n}\r\n\r\nexport const slideUp = (_arg: TransitionElementProps) => {\r\n return {\r\n from: {\r\n transform: `translateY(${_arg.height}px)!important`,\r\n },\r\n to: {\r\n transform: `translateY(0)!important`,\r\n }\r\n }\r\n}\r\n\r\nexport const slideRight = (_arg: TransitionElementProps) => {\r\n return {\r\n from: {\r\n transform: `translateX(-${_arg.width}px)!important`,\r\n },\r\n to: {\r\n transform: `translateX(0)!important`,\r\n }\r\n }\r\n}\r\n\r\nexport const slideLeft = (_arg: TransitionElementProps) => {\r\n return {\r\n from: {\r\n transform: `translateX(${_arg.width}px)!important`,\r\n },\r\n to: {\r\n transform: `translateX(0)!important`,\r\n }\r\n }\r\n}\r\n\r\nexport const fade = (_arg: TransitionElementProps) => {\r\n return {\r\n from: {\r\n opacity: 0\r\n },\r\n to: {\r\n opacity: 1\r\n }\r\n }\r\n}\r\n\r\nexport const fadeDown = (_arg: TransitionElementProps) => {\r\n return {\r\n from: {\r\n transform: `translateY(-30px)!important`,\r\n opacity: 0\r\n },\r\n to: {\r\n transform: `translateY(0)!important`,\r\n opacity: 1\r\n }\r\n }\r\n}\r\n\r\nexport const fadeUp = (_arg: TransitionElementProps) => {\r\n return {\r\n from: {\r\n transform: `translateY(30px)!important`,\r\n opacity: 0\r\n },\r\n to: {\r\n transform: `translateY(0)!important`,\r\n opacity: 1\r\n }\r\n }\r\n}\r\n\r\nexport const fadeRight = (_arg: TransitionElementProps) => {\r\n return {\r\n from: {\r\n transform: `translateX(-30px)!important`,\r\n opacity: 0\r\n },\r\n to: {\r\n transform: `translateX(0)!important`,\r\n opacity: 1\r\n }\r\n }\r\n}\r\n\r\nexport const fadeLeft = (_arg: TransitionElementProps) => {\r\n return {\r\n from: {\r\n transform: `translateX(30px)!important`,\r\n opacity: 0\r\n },\r\n to: {\r\n transform: `translateX(0)!important`,\r\n opacity: 1\r\n }\r\n }\r\n}\r\n\r\nexport const grow = (_arg: TransitionElementProps) => {\r\n return {\r\n from: {\r\n transform: \"scale(.8, .6)!important\",\r\n opacity: 0\r\n },\r\n to: {\r\n transform: \"scale(1)!important\",\r\n opacity: 1\r\n }\r\n }\r\n}\r\n\r\nexport const zoom = (_arg: TransitionElementProps) => {\r\n return {\r\n from: {\r\n transform: \"scale(.8)!important\",\r\n opacity: 0\r\n },\r\n to: {\r\n transform: \"scale(1)!important\",\r\n opacity: 1\r\n }\r\n }\r\n}\r\n\r\nexport const zoomOver = (_arg: TransitionElementProps) => {\r\n return {\r\n from: {\r\n transform: \"scale(1.2)!important\",\r\n opacity: 0\r\n },\r\n to: {\r\n transform: \"scale(1)!important\",\r\n opacity: 1\r\n }\r\n }\r\n}\r\n\r\nexport const collapsVerticle = (_arg: TransitionElementProps) => {\r\n return {\r\n from: {\r\n height: 0 + \"px!important\",\r\n overflow: \"hidden\"\r\n },\r\n to: {\r\n height: _arg?.height ? _arg?.height + \"px!important\" : \"auto\",\r\n overflow: \"hidden\"\r\n }\r\n }\r\n}\r\n\r\n\r\nexport const collapsHorizental = (_arg: TransitionElementProps) => {\r\n return {\r\n from: {\r\n width: 0 + \"px!important\",\r\n overflow: \"hidden\"\r\n },\r\n to: {\r\n width: _arg?.width ? _arg?.width + \"px!important\" : \"auto\",\r\n overflow: \"hidden\"\r\n }\r\n }\r\n}\r\n\r\n\r\n\r\n\r\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,uBAAAE,EAAA,oBAAAC,EAAA,SAAAC,EAAA,aAAAC,EAAA,aAAAC,EAAA,cAAAC,EAAA,WAAAC,EAAA,SAAAC,EAAA,cAAAC,EAAA,cAAAC,EAAA,eAAAC,EAAA,YAAAC,EAAA,SAAAC,EAAA,aAAAC,IAAA,eAAAC,EAAAhB,GAEO,MAAMU,EAAaO,IACf,CACH,KAAM,CACF,UAAW,eAAeA,EAAK,MAAM,eACzC,EACA,GAAI,CACA,UAAW,yBACf,CACJ,GAGSJ,EAAWI,IACb,CACH,KAAM,CACF,UAAW,cAAcA,EAAK,MAAM,eACxC,EACA,GAAI,CACA,UAAW,yBACf,CACJ,GAGSL,EAAcK,IAChB,CACH,KAAM,CACF,UAAW,eAAeA,EAAK,KAAK,eACxC,EACA,GAAI,CACA,UAAW,yBACf,CACJ,GAGSN,EAAaM,IACf,CACH,KAAM,CACF,UAAW,cAAcA,EAAK,KAAK,eACvC,EACA,GAAI,CACA,UAAW,yBACf,CACJ,GAGSb,EAAQa,IACV,CACH,KAAM,CACF,QAAS,CACb,EACA,GAAI,CACA,QAAS,CACb,CACJ,GAGSZ,EAAYY,IACd,CACH,KAAM,CACF,UAAW,8BACX,QAAS,CACb,EACA,GAAI,CACA,UAAW,0BACX,QAAS,CACb,CACJ,GAGST,EAAUS,IACZ,CACH,KAAM,CACF,UAAW,6BACX,QAAS,CACb,EACA,GAAI,CACA,UAAW,0BACX,QAAS,CACb,CACJ,GAGSV,EAAaU,IACf,CACH,KAAM,CACF,UAAW,8BACX,QAAS,CACb,EACA,GAAI,CACA,UAAW,0BACX,QAAS,CACb,CACJ,GAGSX,EAAYW,IACd,CACH,KAAM,CACF,UAAW,6BACX,QAAS,CACb,EACA,GAAI,CACA,UAAW,0BACX,QAAS,CACb,CACJ,GAGSR,EAAQQ,IACV,CACH,KAAM,CACF,UAAW,0BACX,QAAS,CACb,EACA,GAAI,CACA,UAAW,qBACX,QAAS,CACb,CACJ,GAGSH,EAAQG,IACV,CACH,KAAM,CACF,UAAW,sBACX,QAAS,CACb,EACA,GAAI,CACA,UAAW,qBACX,QAAS,CACb,CACJ,GAGSF,EAAYE,IACd,CACH,KAAM,CACF,UAAW,uBACX,QAAS,CACb,EACA,GAAI,CACA,UAAW,qBACX,QAAS,CACb,CACJ,GAGSd,EAAmBc,IACrB,CACH,KAAM,CACF,OAAQ,gBACR,SAAU,QACd,EACA,GAAI,CACA,OAAQA,GAAM,OAASA,GAAM,OAAS,eAAiB,OACvD,SAAU,QACd,CACJ,GAISf,EAAqBe,IACvB,CACH,KAAM,CACF,MAAO,gBACP,SAAU,QACd,EACA,GAAI,CACA,MAAOA,GAAM,MAAQA,GAAM,MAAQ,eAAiB,OACpD,SAAU,QACd,CACJ",
6
- "names": ["variants_exports", "__export", "collapsHorizental", "collapsVerticle", "fade", "fadeDown", "fadeLeft", "fadeRight", "fadeUp", "grow", "slideDown", "slideLeft", "slideRight", "slideUp", "zoom", "zoomOver", "__toCommonJS", "_arg"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/breakpoint/index.tsx"],
4
- "sourcesContent": ["import React, { ReactNode, useState } from \"react\";\r\nimport isWindow from \"../isWindow\";\r\nimport { breakpoints } from \"../css\";\r\nimport { BreakpointKeys } from \"../css/types\";\r\n\r\nexport const BreakpointCtx = React.createContext<BreakpointKeys>(\"xl\")\r\n\r\nconst getKey = (): BreakpointKeys => {\r\n const isWin = isWindow()\r\n if (isWin) {\r\n const width = window.innerWidth\r\n if (width < breakpoints.sm) {\r\n return 'xs'\r\n } else if (width > breakpoints.xs && width < breakpoints.md) {\r\n return 'sm'\r\n } else if (width > breakpoints.sm && width < breakpoints.lg) {\r\n return 'md'\r\n } else if (width > breakpoints.md && width < breakpoints.xl) {\r\n return 'lg'\r\n } else {\r\n return 'xl'\r\n }\r\n } else {\r\n return 'xl'\r\n }\r\n}\r\n\r\nexport const BreakpointProvider = ({ children }: { children?: ReactNode }) => {\r\n const [current, setCurrent] = useState<BreakpointKeys>(getKey)\r\n\r\n const handler = () => {\r\n let c = getKey()\r\n if (current !== c) {\r\n setCurrent(c)\r\n }\r\n }\r\n\r\n React.useEffect(() => {\r\n window.removeEventListener(\"resize\", handler)\r\n window.addEventListener(\"resize\", handler)\r\n handler()\r\n return () => {\r\n window.removeEventListener(\"resize\", handler)\r\n }\r\n }, [current])\r\n\r\n return (\r\n <BreakpointCtx.Provider value={current}>\r\n {children}\r\n </BreakpointCtx.Provider>\r\n )\r\n}\r\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,EAAA,uBAAAC,IAAA,eAAAC,EAAAJ,GAAA,IAAAK,EAA2C,sBAC3CC,EAAqB,4BACrBC,EAA4B,kBAGrB,MAAML,EAAgB,EAAAM,QAAM,cAA8B,IAAI,EAE/DC,EAAS,IAAsB,CAEjC,MADc,EAAAC,SAAS,EACZ,CACP,MAAMC,EAAQ,OAAO,WACrB,OAAIA,EAAQ,cAAY,GACb,KACAA,EAAQ,cAAY,IAAMA,EAAQ,cAAY,GAC9C,KACAA,EAAQ,cAAY,IAAMA,EAAQ,cAAY,GAC9C,KACAA,EAAQ,cAAY,IAAMA,EAAQ,cAAY,GAC9C,KAEA,IAEf,KACI,OAAO,IAEf,EAEaR,EAAqB,CAAC,CAAE,SAAAS,CAAS,IAAgC,CAC1E,KAAM,CAACC,EAASC,CAAU,KAAI,YAAyBL,CAAM,EAEvDM,EAAU,IAAM,CAClB,IAAIC,EAAIP,EAAO,EACXI,IAAYG,GACZF,EAAWE,CAAC,CAEpB,EAEA,SAAAR,QAAM,UAAU,KACZ,OAAO,oBAAoB,SAAUO,CAAO,EAC5C,OAAO,iBAAiB,SAAUA,CAAO,EACzCA,EAAQ,EACD,IAAM,CACT,OAAO,oBAAoB,SAAUA,CAAO,CAChD,GACD,CAACF,CAAO,CAAC,EAGR,EAAAL,QAAA,cAACN,EAAc,SAAd,CAAuB,MAAOW,GAC1BD,CACL,CAER",
6
- "names": ["breakpoint_exports", "__export", "BreakpointCtx", "BreakpointProvider", "__toCommonJS", "import_react", "import_isWindow", "import_css", "React", "getKey", "isWindow", "width", "children", "current", "setCurrent", "handler", "c"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/breakpoint/useBreakpoint.ts"],
4
- "sourcesContent": ["import { useContext } from \"react\"\r\nimport { BreakpointCtx } from \".\"\r\nimport isWindow from \"../isWindow\"\r\nimport { breakpoints } from \"../css\"\r\nimport { BreakpointKeys } from \"../css/types\"\r\n\r\nconst useBreakpoint = () => {\r\n const val = useContext(BreakpointCtx)\r\n const isWin = isWindow()\r\n const o = {\r\n value: val,\r\n is: (key: BreakpointKeys) => val === key,\r\n isDown: (key: BreakpointKeys) => {\r\n if (isWin) {\r\n return window.innerWidth > breakpoints[key]\r\n }\r\n return false\r\n },\r\n isUp: (key: BreakpointKeys) => {\r\n if (isWin) {\r\n return window.innerWidth < breakpoints[key]\r\n }\r\n return false\r\n },\r\n isOrDown: (key: BreakpointKeys) => o.is(key) || o.isDown(key),\r\n isOrUp: (key: BreakpointKeys) => o.is(key) || o.isUp(key)\r\n }\r\n return o\r\n}\r\n\r\nexport default useBreakpoint\r\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA2B,iBAC3BC,EAA8B,aAC9BC,EAAqB,4BACrBC,EAA4B,kBAG5B,MAAMC,EAAgB,IAAM,CACzB,MAAMC,KAAM,cAAW,eAAa,EAC9BC,KAAQ,EAAAC,SAAS,EACjB,EAAI,CACP,MAAOF,EACP,GAAKG,GAAwBH,IAAQG,EACrC,OAASA,GACFF,EACM,OAAO,WAAa,cAAYE,CAAG,EAEtC,GAEV,KAAOA,GACAF,EACM,OAAO,WAAa,cAAYE,CAAG,EAEtC,GAEV,SAAWA,GAAwB,EAAE,GAAGA,CAAG,GAAK,EAAE,OAAOA,CAAG,EAC5D,OAASA,GAAwB,EAAE,GAAGA,CAAG,GAAK,EAAE,KAAKA,CAAG,CAC3D,EACA,OAAO,CACV,EAEA,IAAOV,EAAQM",
6
- "names": ["useBreakpoint_exports", "__export", "useBreakpoint_default", "__toCommonJS", "import_react", "import__", "import_isWindow", "import_css", "useBreakpoint", "val", "isWin", "isWindow", "key"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/breakpoint/useBreakpointProps.ts"],
4
- "sourcesContent": ["import React, { isValidElement } 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 useBreakpoinProps = <P extends object>(props: useBreakpointPropsType<P>): useBreakpointPropsType<P> => {\r\n const bpoint = useBreakpoint()\r\n const stringifiedElement = JSON.stringify(props, (key, value) => {\r\n if (key === '_owner' || key === '_store') {\r\n return undefined; // Skip circular references\r\n }\r\n return value;\r\n }, 2);\r\n\r\n let format: any = React.useMemo(() => {\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 for (let prop in props) {\r\n let val = (props as any)[prop]\r\n if (!isValidElement(val) && typeof val === 'object') {\r\n for (let breakpoin in val) {\r\n _format[breakpoin][prop] = (props as any)[prop][breakpoin]\r\n }\r\n } else {\r\n _format.xs[prop] = (props as any)[prop]\r\n }\r\n }\r\n\r\n return _format\r\n }, [stringifiedElement, bpoint.value])\r\n\r\n return React.useMemo(() => {\r\n let _props = format.xs || {};\r\n for (let key of ['sm', 'md', 'lg', 'xl']) {\r\n if (bpoint.isOrDown(key as any)) {\r\n _props = { ..._props, ...format[key] };\r\n }\r\n if (bpoint.is(key as any)) {\r\n break;\r\n }\r\n }\r\n return _props;\r\n }, [format, bpoint.value]);\r\n}\r\n\r\n\r\n\r\nexport default useBreakpoinProps"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAsC,sBACtCC,EAA0B,gCAO1B,MAAMC,EAAuCC,GAAgE,CAC1G,MAAMC,KAAS,EAAAC,SAAc,EACvBC,EAAqB,KAAK,UAAUH,EAAO,CAACI,EAAKC,IAAU,CAC9D,GAAI,EAAAD,IAAQ,UAAYA,IAAQ,UAGhC,OAAOC,CACV,EAAG,CAAC,EAEJ,IAAIC,EAAc,EAAAC,QAAM,QAAQ,IAAM,CAEnC,MAAMC,EAAe,CAClB,GAAI,CAAC,EACL,GAAI,CAAC,EACL,GAAI,CAAC,EACL,GAAI,CAAC,EACL,GAAI,CAAC,CACR,EACA,QAASC,KAAQT,EAAO,CACrB,IAAIU,EAAOV,EAAcS,CAAI,EAC7B,GAAI,IAAC,kBAAeC,CAAG,GAAK,OAAOA,GAAQ,SACxC,QAASC,KAAaD,EACnBF,EAAQG,CAAS,EAAEF,CAAI,EAAKT,EAAcS,CAAI,EAAEE,CAAS,OAG5DH,EAAQ,GAAGC,CAAI,EAAKT,EAAcS,CAAI,CAE5C,CAEA,OAAOD,CACV,EAAG,CAACL,EAAoBF,EAAO,KAAK,CAAC,EAErC,OAAO,EAAAM,QAAM,QAAQ,IAAM,CACxB,IAAIK,EAASN,EAAO,IAAM,CAAC,EAC3B,QAASF,IAAO,CAAC,KAAM,KAAM,KAAM,IAAI,EAIpC,GAHIH,EAAO,SAASG,CAAU,IAC3BQ,EAAS,CAAE,GAAGA,EAAQ,GAAGN,EAAOF,CAAG,CAAE,GAEpCH,EAAO,GAAGG,CAAU,EACrB,MAGN,OAAOQ,CACV,EAAG,CAACN,EAAQL,EAAO,KAAK,CAAC,CAC5B,EAIA,IAAON,EAAQI",
6
- "names": ["useBreakpointProps_exports", "__export", "useBreakpointProps_default", "__toCommonJS", "import_react", "import_useBreakpoint", "useBreakpoinProps", "props", "bpoint", "useBreakpoint", "stringifiedElement", "key", "value", "format", "React", "_format", "prop", "val", "breakpoin", "_props"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/css/aliases.ts"],
4
- "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"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAGA,MAAMI,EAAQ,CAACC,EAAQC,IAAY,OAAOD,GAAM,SAAWA,EAAIC,EAEzDC,EAAkC,CACrC,QAAUF,IAAO,CAAE,gBAAiBA,CAAE,GACtC,QAAUA,IAAO,CAAE,gBAAiB,OAAOA,CAAC,IAAK,eAAgB,QAAS,iBAAkB,WAAY,GACxG,GAAKA,IAAO,CAAE,WAAYA,CAAE,GAC5B,EAAIA,IAAO,CAAE,QAASD,EAAMC,EAAG,EAAIA,CAAC,CAAE,GACtC,GAAKA,IA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AUA,GAAOA,EAAI,CAAE,cAAe,KAAM,EAAI,CAAC,EACjD,WAAaA,GAAOA,EAAI,CAAE,cAAe,QAAS,EAAI,CAAC,EACvD,WAAaA,GAAOA,EAAI,CAAE,SAAU,MAAO,EAAI,CAAC,EAChD,UAAYA,GAAOA,IAAM,OAASA,IAAM,SAAW,CAAE,cAAeA,CAAE,EAAI,CAAE,UAAWA,CAAE,EACzF,IAAMA,IAAO,CAAE,IAAKD,EAAMC,EAAG,EAAIA,CAAC,CAAE,EACvC,EAEA,IAAOH,EAAQK",
6
- "names": ["aliases_exports", "__export", "aliases_default", "__toCommonJS", "isStr", "v", "or", "aliases"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/css/getProps.ts"],
4
- "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 return {\r\n pointerEvents: \"none!important\",\r\n cursor: \"default!important\",\r\n userSelect: \"none!important\",\r\n opacity: \".8!important\"\r\n } as any\r\n }\r\n return {}\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\"\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"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAEA,MAAMI,EAAW,CAACC,EAAcC,EAAeC,IAAmB,CAC9D,IAAIC,EACJ,GAAI,OAAOF,GAAU,SAAU,CAC3B,MAAMG,EAAQH,EAAM,MAAM,GAAG,EAC7BE,EAAYC,EAAM,CAAC,EAAI,aAAe,GACtCH,EAAQG,EAAM,CAAC,CACnB,CAEA,GAAIJ,IAAS,WACT,OAAKC,IAAkB,GACZ,CACH,cAAe,iBACf,OAAQ,oBACR,WAAY,iBACZ,QAAS,cACb,EAEG,CAAC,EAGZ,GAAIA,GAAS,OAAOA,GAAU,UAAY,CAAC,SAAU,cAAe,aAAc,YAAa,cAAc,EAAE,SAASD,CAAW,EAAG,CAClI,MAAMK,EAAY,OAAO,KAAKH,CAAI,EAClC,IAAII,EAAS,CACT,CAAC,GAAGN,CAAI,OAAO,EAAGC,EAAQ,MAAQE,GAAa,GACnD,EACA,OAAKE,EAAK,SAAS,GAAGL,CAAI,OAAO,IAC7BM,EAAE,GAAGN,CAAI,OAAO,EAAI,WAEnBK,EAAK,SAAS,GAAGL,CAAI,OAAO,IAC7BM,EAAE,GAAGN,CAAI,OAAO,EAAI,SAEjBM,CACX,CACJ,EAEA,IAAOT,EAAQE",
6
- "names": ["getProps_exports", "__export", "getProps_default", "__toCommonJS", "getProps", "prop", "value", "_css", "important", "split", "keys", "p"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/css/getValue.ts"],
4
- "sourcesContent": ["import { CSSProps } from \"./types\"\r\n\r\nconst getColor = (color: string) => {\r\n return {\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}.text`]: `var(--color-${color}-text)`,\r\n [`${color}.alpha`]: `var(--color-${color}-alpha)`\r\n }\r\n}\r\n\r\nconst withImportant = (important: any, value: any) => important ? value + important : value\r\nconst colors: any = {\r\n \"text\": `var(--color-text-primary)`,\r\n \"text.primary\": `var(--color-text-primary)`,\r\n \"text.secondary\": `var(--color-text-secondary)`,\r\n\r\n \"background\": `var(--color-background-primary)`,\r\n \"background.primary\": `var(--color-background-primary)`,\r\n \"background.secondary\": `var(--color-background-secondary)`,\r\n \"background.alpha\": `var(--color-background-alpha)`,\r\n \"divider\": `var(--color-divider)`,\r\n\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 \"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 \"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 \"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 \"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 if (['width', 'maxWidth', 'minWidth', 'max-width', 'min-width'].includes(prop)) {\r\n return withImportant(important, breakpoints[value] || value)\r\n } else if (['fontFamily', 'font-family'].includes(prop) && value === 'default') {\r\n return withImportant(important, \"var(--font-family)\")\r\n } 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 } 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"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAEA,MAAMI,EAAYC,IACP,CACH,CAAC,GAAGA,CAAK,EAAE,EAAG,eAAeA,CAAK,YAClC,CAAC,GAAGA,CAAK,UAAU,EAAG,eAAeA,CAAK,YAC1C,CAAC,GAAGA,CAAK,YAAY,EAAG,eAAeA,CAAK,cAC5C,CAAC,GAAGA,CAAK,OAAO,EAAG,eAAeA,CAAK,SACvC,CAAC,GAAGA,CAAK,QAAQ,EAAG,eAAeA,CAAK,SAC5C,GAGEC,EAAgB,CAACC,EAAgBC,IAAeD,EAAYC,EAAQD,EAAYC,EAChFC,EAAc,CAChB,KAAQ,4BACR,eAAgB,4BAChB,iBAAkB,8BAElB,WAAc,kCACd,qBAAsB,kCACtB,uBAAwB,oCACxB,mBAAoB,gCACpB,QAAW,uBAEX,GAAGL,EAAS,OAAO,EACnB,GAAGA,EAAS,QAAQ,EACpB,GAAGA,EAAS,MAAM,EAClB,GAAGA,EAAS,SAAS,EACrB,GAAGA,EAAS,SAAS,EACrB,GAAGA,EAAS,QAAQ,CACxB,EAEMM,EAAmB,CACrB,GAAM,eACN,GAAM,eACN,GAAM,eACN,GAAM,eACN,GAAM,cACV,EAEA,IAAIC,EAAiB,CACjB,GAAM,qBACN,GAAM,qBACN,GAAM,qBACN,GAAM,qBACN,GAAM,qBACN,GAAM,qBACN,KAAQ,uBACR,OAAU,yBACV,MAAS,uBACb,EAEIC,EAAmB,CACnB,GAAM,uBACN,GAAM,uBACN,GAAM,uBACN,GAAM,uBACN,GAAM,uBACN,GAAM,uBACN,KAAQ,yBACR,OAAU,2BACV,MAAS,yBACb,EAEIC,EAAmB,CACnB,GAAM,uBACN,GAAM,uBACN,GAAM,uBACN,GAAM,uBACN,GAAM,uBACN,GAAM,uBACN,KAAQ,yBACR,OAAU,2BACV,M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GAAU,UAAY,CAAC,SAAU,WAAW,EAAE,SAASQ,CAAI,EAClEV,EAAcC,EAAW,gBAAgBC,CAAK,GAAG,EAGrDF,EAAcC,EAAWE,EAAOD,CAAK,GAAKA,CAAK,CAC1D,EAEA,IAAON,EAAQa",
6
- "names": ["getValue_exports", "__export", "getValue_default", "__toCommonJS", "getColor", "color", "withImportant", "important", "value", "colors", "breakpoints", "fontsizes", "lineHeights", "fontWeights", "font", "getValue", "prop", "_css", "split"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/css/index.ts"],
4
- "sourcesContent": ["import getValue from \"./getValue\"\r\nimport getProps from \"./getProps\"\r\nimport aliases from \"./aliases\"\r\nimport { Aliases, BreakpointKeys, CSSOptionProps, CSSProps } from './types'\r\nimport { css as _css } from \"oncss\"\r\n\r\nexport {\r\n getValue,\r\n getProps\r\n}\r\n\r\nexport const breakpoints = {\r\n xs: 0,\r\n sm: 600,\r\n md: 900,\r\n lg: 1200,\r\n xl: 1536\r\n}\r\n\r\nexport const css = (props: CSSProps, options?: CSSOptionProps) => {\r\n const cssOptions: CSSOptionProps = {\r\n ...options,\r\n breakpoints,\r\n aliases,\r\n getValue: (p: any, v: any, _c: any, dept) => {\r\n if (options?.getValue) {\r\n let _val = options?.getValue(p, v, _c, dept)\r\n if (_val) return _val\r\n }\r\n return getValue(p, v, _c)\r\n },\r\n getProps: (p: any, v: any, _c: any, dept) => {\r\n if (options?.getProps) {\r\n let _p = options?.getProps(p, v, _c, dept)\r\n if (_p) return _p\r\n }\r\n return getProps(p, v, _c)\r\n },\r\n }\r\n return _css<Aliases, BreakpointKeys>(props, cssOptions)\r\n}\r\n\r\nexport const adjustColor = (hex: string, factor: number) => {\r\n\r\n hex = hex.replace(/^#/, '')\r\n\r\n let r = parseInt(hex.slice(0, 2), 16)\r\n let g = parseInt(hex.slice(2, 4), 16)\r\n let b = parseInt(hex.slice(4, 6), 16)\r\n\r\n r = Math.floor(r * factor)\r\n g = Math.floor(g * factor)\r\n b = Math.floor(b * factor)\r\n\r\n r = Math.min(255, Math.max(0, r))\r\n g = Math.min(255, Math.max(0, g))\r\n b = Math.min(255, Math.max(0, b))\r\n\r\n return `#${r.toString(16).padStart(2, '0')}${g.toString(16).padStart(2, '0')}${b.toString(16).padStart(2, '0')}`;\r\n}\r\n\r\nexport const adjustTextContrast = (color: string) => {\r\n color = color.replace(/^#/, '')\r\n const r = parseInt(color.slice(0, 2), 16);\r\n const g = parseInt(color.slice(2, 4), 16);\r\n const b = parseInt(color.slice(4, 6), 16);\r\n\r\n const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;\r\n return luminance > 0.5 ? '#111111' : '#FFFFFF';\r\n}\r\n\r\nexport const alpha = (color: string, opacity = 1) => {\r\n if (typeof opacity !== 'number') return color\r\n let _opacity = opacity * 100\r\n if (!color.startsWith(\"#\")) throw new Error(`color must be hex`)\r\n return (color + (`0${Math.round((255 / 100) * _opacity).toString(16)}`.slice(-2))).toUpperCase();\r\n};\r\n\r\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,EAAA,uBAAAC,EAAA,UAAAC,EAAA,gBAAAC,EAAA,QAAAC,EAAA,eAAAC,QAAA,eAAAC,UAAA,eAAAC,EAAAT,GAAA,IAAAU,EAAqB,2BACrBC,EAAqB,2BACrBC,EAAoB,0BAEpBC,EAA4B,iBAOrB,MAAMR,EAAc,CACvB,GAAI,EACJ,GAAI,IACJ,GAAI,IACJ,GAAI,KACJ,GAAI,IACR,EAEaC,EAAM,CAACQ,EAAiBC,IAA6B,CAC9D,MAAMC,EAA6B,CAC/B,GAAGD,EACH,YAAAV,EACA,UAAAY,QACA,SAAU,CAACC,EAAQC,EAAQC,EAASC,IAAS,CACzC,GAAIN,GAAS,SAAU,CACnB,IAAIO,EAAOP,GAAS,SAASG,EAAGC,EAAGC,EAAIC,CAAI,EAC3C,GAAIC,EAAM,OAAOA,CACrB,CACA,SAA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E,EAClCD,EAAI,SAASC,EAAM,MAAM,EAAG,CAAC,EAAG,EAAE,EAGxC,OADmB,KAAQ,EAAI,KAAQF,EAAI,KAAQC,GAAK,IACrC,GAAM,UAAY,SACzC,EAEazB,EAAQ,CAAC0B,EAAeC,EAAU,IAAM,CACjD,GAAI,OAAOA,GAAY,SAAU,OAAOD,EACxC,IAAIE,EAAWD,EAAU,IACzB,GAAI,CAACD,EAAM,WAAW,GAAG,EAAG,MAAM,IAAI,MAAM,mBAAmB,EAC/D,OAAQA,EAAS,IAAI,KAAK,MAAO,IAAM,IAAOE,CAAQ,EAAE,SAAS,EAAE,CAAC,GAAG,MAAM,EAAE,GAAI,YAAY,CACnG",
6
- "names": ["css_exports", "__export", "adjustColor", "adjustTextContrast", "alpha", "breakpoints", "css", "getProps", "getValue", "__toCommonJS", "import_getValue", "import_getProps", "import_aliases", "import_oncss", "props", "options", "cssOptions", "aliases", "p", "v", "_c", "dept", "_val", "_p", "_css", "hex", "factor", "r", "g", "b", "color", "opacity", "_opacity"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/css/types.ts"],
4
- "sourcesContent": ["import * as CSS from 'csstype'\r\nimport { ColorsRefTypes, TypographyRefTypes, ThemeOptions, } from '../theme/types';\r\nimport * as oncss from 'oncss'\r\nexport type FN = (theme: ThemeOptions) => string | number\r\nexport type CSSBreakpointType = { [key in BreakpointKeys]: string | number }\r\nexport type CSSValueType<T extends keyof CSS.Properties> = CSS.Properties[T] | Partial<CSSBreakpointType> | number\r\n\r\nexport type Aliases = {\r\n bgcolor?: CSSValueType<'background'> | ColorsRefTypes;\r\n bgimage?: CSSValueType<'backgroundImage'>;\r\n bg?: CSSValueType<'background'> | ColorsRefTypes;\r\n p?: CSSValueType<'padding'>;\r\n pt?: CSSValueType<'padding'>;\r\n pr?: CSSValueType<'padding'>;\r\n pb?: CSSValueType<'padding'>;\r\n pl?: CSSValueType<'padding'>;\r\n px?: CSSValueType<'padding'>;\r\n py?: CSSValueType<'margin'>;\r\n m?: CSSValueType<'margin'>;\r\n mt?: CSSValueType<'margin'>;\r\n mr?: CSSValueType<'margin'>;\r\n mb?: CSSValueType<'margin'>;\r\n ml?: CSSValueType<'margin'>;\r\n mx?: CSSValueType<'margin'>;\r\n my?: CSSValueType<'margin'>;\r\n size?: CSSValueType<'width'>;\r\n spacing?: Partial<CSSBreakpointType> | number;\r\n\r\n radius?: CSSValueType<'borderRadius'> | number;\r\n borderRadius?: CSSValueType<'borderRadius'> | number;\r\n shadow?: CSSValueType<'boxShadow'> | number;\r\n flexBox?: boolean;\r\n flexRow?: boolean;\r\n flexColumn?: boolean;\r\n flexWraped?: boolean;\r\n direction?: \"row\" | \"column\" | CSSValueType<'direction'>;\r\n gap?: CSSValueType<'gap'>;\r\n\r\n color?: CSSValueType<'color'> | ColorsRefTypes;\r\n width?: CSSValueType<'width'> | BreakpointKeys;\r\n height?: CSSValueType<'height'>\r\n borderColor?: CSSValueType<'backgroundColor'> | ColorsRefTypes;\r\n\r\n fontFamily?: CSSValueType<\"fontFamily\"> | \"default\";\r\n fontSize?: CSSValueType<\"fontSize\"> | TypographyRefTypes;\r\n minWidth?: CSSValueType<\"minWidth\"> | BreakpointKeys;\r\n maxWidth?: CSSValueType<\"maxWidth\"> | BreakpointKeys;\r\n minHeight?: CSSValueType<\"minHeight\">\r\n maxHeight?: CSSValueType<\"maxHeight\">\r\n}\r\n\r\n\r\nexport type BreakpointKeys = \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\"\r\n\r\nexport type CSSProps = oncss.CSSProps<Aliases, BreakpointKeys>\r\nexport type CSSOptionProps = oncss.CSSOptionProps<Aliases, BreakpointKeys>\r\n\r\nexport type GlobalCSS = {\r\n [key: string]: oncss.CSSPropsWithoutGlobal<Aliases, BreakpointKeys>;\r\n}"],
5
- "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
- "names": ["types_exports", "__toCommonJS"]
7
- }
package/cjs/index.js.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.ts"],
4
- "sourcesContent": ["import Tag from './Tag'\r\nimport useTagProps from './Tag/useTagProps'\r\nimport useAnimation from './useAnimation'\r\nimport useColorTemplate from './useColorTemplate'\r\nimport useBreakpoint from './breakpoint/useBreakpoint'\r\nimport useBreakpointProps from './breakpoint/useBreakpointProps'\r\nimport ServerStyleTags from './ServerStyleTags'\r\nimport isWindow from './isWindow'\r\nimport useInterface from './useInterface'\r\nimport Transition from './Transition'\r\n\r\nexport * from './css'\r\nexport * from \"./theme\"\r\nexport * from './css/types'\r\nexport * from './Tag/types'\r\nexport * from './theme/types'\r\nexport * from './useColorTemplate'\r\nexport * from './useAnimation'\r\nexport type * from './Transition'\r\nexport type * from './Tag/types'\r\nexport type { useBreakpointPropsType } from './breakpoint/useBreakpointProps'\r\n\r\nexport {\r\n Tag,\r\n useTagProps,\r\n useAnimation,\r\n Transition,\r\n useColorTemplate,\r\n ServerStyleTags,\r\n useBreakpoint,\r\n useBreakpointProps,\r\n isWindow,\r\n useInterface\r\n}"],
5
- "mappings": "wmBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,uBAAAE,QAAA,UAAAC,QAAA,iBAAAC,QAAA,eAAAC,QAAA,mBAAAC,QAAA,oBAAAC,QAAA,yBAAAC,QAAA,uBAAAC,QAAA,mBAAAC,QAAA,kBAAAC,UAAA,eAAAC,EAAAZ,GAAA,IAAAa,EAAgB,sBAChBC,EAAwB,kCACxBC,EAAyB,+BACzBC,EAA6B,mCAC7BC,EAA0B,2CAC1BC,EAA+B,gDAC/BC,EAA4B,kCAC5BC,EAAqB,2BACrBC,EAAyB,+BACzBC,EAAuB,6BAEvBC,EAAAvB,EAAc,iBAXd,gBAYAuB,EAAAvB,EAAc,mBAZd,gBAaAuB,EAAAvB,EAAc,uBAbd,gBAcAuB,EAAAvB,EAAc,uBAdd,gBAeAuB,EAAAvB,EAAc,yBAfd,gBAgBAuB,EAAAvB,EAAc,8BAhBd,gBAiBAuB,EAAAvB,EAAc,0BAjBd",
6
- "names": ["index_exports", "__export", "ServerStyleTags", "Tag", "Transition", "isWindow", "useAnimation", "useBreakpoint", "useBreakpointProps", "useColorTemplate", "useInterface", "useTagProps", "__toCommonJS", "import_Tag", "import_useTagProps", "import_useAnimation", "import_useColorTemplate", "import_useBreakpoint", "import_useBreakpointProps", "import_ServerStyleTags", "import_isWindow", "import_useInterface", "import_Transition", "__reExport"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/theme/ThemeCssVars.ts"],
4
- "sourcesContent": ["import { ThemeOptions } from \"./types\";\r\n\r\nconst ThemeCssVars = (theme: ThemeOptions) => {\r\n\r\n const shadows: any = {}\r\n theme.shadow.forEach((s, i) => shadows[`--shadow-${i}`] = s)\r\n\r\n return {\r\n \"--bp-xs\": theme.breakpoints.xs,\r\n \"--bp-sm\": theme.breakpoints.sm,\r\n \"--bp-md\": theme.breakpoints.md,\r\n \"--bp-lg\": theme.breakpoints.lg,\r\n \"--bp-xl\": theme.breakpoints.xl,\r\n\r\n \"--font-family\": theme.typography.fontFamily,\r\n \"--font-h1\": `${theme.typography.h1.fontWeight} ${theme.typography.h1.fontSize}px/${theme.typography.h1.lineHeight} ${theme.typography.fontFamily}`,\r\n \"--font-h2\": `${theme.typography.h2.fontWeight} ${theme.typography.h2.fontSize}px/${theme.typography.h2.lineHeight} ${theme.typography.fontFamily}`,\r\n \"--font-h3\": `${theme.typography.h3.fontWeight} ${theme.typography.h3.fontSize}px/${theme.typography.h3.lineHeight} ${theme.typography.fontFamily}`,\r\n \"--font-h4\": `${theme.typography.h4.fontWeight} ${theme.typography.h4.fontSize}px/${theme.typography.h4.lineHeight} ${theme.typography.fontFamily}`,\r\n \"--font-h5\": `${theme.typography.h5.fontWeight} ${theme.typography.h5.fontSize}px/${theme.typography.h5.lineHeight} ${theme.typography.fontFamily}`,\r\n \"--font-h6\": `${theme.typography.h6.fontWeight} ${theme.typography.h6.fontSize}px/${theme.typography.h6.lineHeight} ${theme.typography.fontFamily}`,\r\n \"--font-text\": `${theme.typography.text.fontWeight} ${theme.typography.text.fontSize}px/${theme.typography.text.lineHeight} ${theme.typography.fontFamily}`,\r\n \"--font-button\": `${theme.typography.button.fontWeight} ${theme.typography.button.fontSize}px/${theme.typography.button.lineHeight} ${theme.typography.fontFamily}`,\r\n \"--font-small\": `${theme.typography.small.fontWeight} ${theme.typography.small.fontSize}px/${theme.typography.small.lineHeight} ${theme.typography.fontFamily}`,\r\n\r\n \"--fontsize-h1\": `${theme.typography.h1.fontSize}px`,\r\n \"--fontsize-h2\": `${theme.typography.h2.fontSize}px`,\r\n \"--fontsize-h3\": `${theme.typography.h3.fontSize}px`,\r\n \"--fontsize-h4\": `${theme.typography.h4.fontSize}px`,\r\n \"--fontsize-h5\": `${theme.typography.h5.fontSize}px`,\r\n \"--fontsize-h6\": `${theme.typography.h6.fontSize}px`,\r\n \"--fontsize-text\": `${theme.typography.text.fontSize}px`,\r\n \"--fontsize-button\": `${theme.typography.button.fontSize}px`,\r\n \"--fontsize-small\": `${theme.typography.small.fontSize}px`,\r\n\r\n \"--fontweight-h1\": theme.typography.h1.fontWeight + \"\",\r\n \"--fontweight-h2\": theme.typography.h2.fontWeight + \"\",\r\n \"--fontweight-h3\": theme.typography.h3.fontWeight + \"\",\r\n \"--fontweight-h4\": theme.typography.h4.fontWeight + \"\",\r\n \"--fontweight-h5\": theme.typography.h5.fontWeight + \"\",\r\n \"--fontweight-h6\": theme.typography.h6.fontWeight + \"\",\r\n \"--fontweight-text\": theme.typography.text.fontWeight + \"\",\r\n \"--fontweight-button\": theme.typography.button.fontWeight + \"\",\r\n \"--fontweight-small\": theme.typography.small.fontWeight + \"\",\r\n\r\n \"--lineheight-h1\": theme.typography.h1.lineHeight + \"\",\r\n \"--lineheight-h2\": theme.typography.h2.lineHeight + \"\",\r\n \"--lineheight-h3\": theme.typography.h3.lineHeight + \"\",\r\n \"--lineheight-h4\": theme.typography.h4.lineHeight + \"\",\r\n \"--lineheight-h5\": theme.typography.h5.lineHeight + \"\",\r\n \"--lineheight-h6\": theme.typography.h6.lineHeight + \"\",\r\n \"--lineheight-text\": theme.typography.text.lineHeight + \"\",\r\n \"--lineheight-button\": theme.typography.button.lineHeight + \"\",\r\n \"--lineheight-small\": theme.typography.small.lineHeight + \"\",\r\n\r\n \"--color-text\": theme.colors.text.primary,\r\n \"--color-text-primary\": theme.colors.text.primary,\r\n \"--color-text-secondary\": theme.colors.text.secondary,\r\n\r\n \"--color-background\": theme.colors.background.primary,\r\n \"--color-background-primary\": theme.colors.background.primary,\r\n \"--color-background-secondary\": theme.colors.background.secondary,\r\n \"--color-background-alpha\": theme.colors.background.alpha,\r\n\r\n \"--color-divider\": theme.colors.divider,\r\n\r\n \"--color-brand\": theme.colors.brand.primary,\r\n \"--color-brand-primary\": theme.colors.brand.primary,\r\n \"--color-brand-secondary\": theme.colors.brand.secondary,\r\n \"--color-brand-alpha\": theme.colors.brand.alpha,\r\n \"--color-brand-text\": theme.colors.brand.text,\r\n\r\n \"--color-accent\": theme.colors.accent.primary,\r\n \"--color-accent-primary\": theme.colors.accent.primary,\r\n \"--color-accent-secondary\": theme.colors.accent.secondary,\r\n \"--color-accent-alpha\": theme.colors.accent.alpha,\r\n \"--color-accent-text\": theme.colors.accent.text,\r\n\r\n \"--color-info\": theme.colors.info.primary,\r\n \"--color-info-primary\": theme.colors.info.primary,\r\n \"--color-info-secondary\": theme.colors.info.secondary,\r\n \"--color-info-alpha\": theme.colors.info.alpha,\r\n \"--color-info-text\": theme.colors.info.text,\r\n\r\n \"--color-success\": theme.colors.success.primary,\r\n \"--color-success-primary\": theme.colors.success.primary,\r\n \"--color-success-secondary\": theme.colors.success.secondary,\r\n \"--color-success-alpha\": theme.colors.success.alpha,\r\n \"--color-success-text\": theme.colors.success.text,\r\n\r\n \"--color-warning\": theme.colors.warning.primary,\r\n \"--color-warning-primary\": theme.colors.warning.primary,\r\n \"--color-warning-secondary\": theme.colors.warning.secondary,\r\n \"--color-warning-alpha\": theme.colors.warning.alpha,\r\n \"--color-warning-text\": theme.colors.warning.text,\r\n\r\n \"--color-danger\": theme.colors.danger.primary,\r\n \"--color-danger-primary\": theme.colors.danger.primary,\r\n \"--color-danger-secondary\": theme.colors.danger.secondary,\r\n \"--color-danger-alpha\": theme.colors.danger.alpha,\r\n \"--color-danger-text\": theme.colors.danger.text,\r\n ...shadows,\r\n }\r\n}\r\n\r\n\r\nexport default ThemeCssVars"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAEA,MAAMI,EAAgBC,GAAwB,CAE1C,MAAMC,EAAe,CAAC,EACtB,OAAAD,EAAM,OAAO,QAAQ,CAACE,EAAGC,IAAMF,EAAQ,YAAYE,CAAC,EAAE,EAAID,CAAC,EAEpD,CACH,UAAWF,EAAM,YAAY,GAC7B,UAAWA,EAAM,YAAY,GAC7B,UAAWA,EAAM,YAAY,GAC7B,UAAWA,EAAM,YAAY,GAC7B,UAAWA,EAAM,YAAY,GAE7B,gBAAiBA,EAAM,WAAW,WAClC,YAAa,GAAGA,EAAM,WAAW,GAAG,UAAU,IAAIA,EAAM,WAAW,GAAG,QAAQ,MAAMA,EAAM,WAAW,GAAG,UAAU,IAAIA,EAAM,WAAW,UAAU,GACjJ,YAAa,GAAGA,EAAM,WAAW,GAAG,UAAU,IAAIA,EAAM,WAAW,GAAG,QAAQ,MAAMA,EAAM,WAAW,GAAG,UAAU,IAAIA,EAAM,WAAW,UAAU,GACjJ,YAAa,GAAGA,EAAM,WAAW,GAAG,UAAU,IAAIA,EAAM,WAAW,GAAG,QAAQ,MAAMA,EAAM,WAAW,GAAG,UAAU,IAAIA,EAAM,WAAW,UAAU,GACjJ,YAAa,GAAGA,EAAM,WAAW,GAAG,UAAU,IAAIA,EAAM,WAAW,GAAG,QAAQ,MAAMA,EAAM,WAAW,GAAG,UAAU,I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A,EAAM,OAAO,KAAK,QAClC,uBAAwBA,EAAM,OAAO,KAAK,QAC1C,yBAA0BA,EAAM,OAAO,KAAK,UAC5C,qBAAsBA,EAAM,OAAO,KAAK,MACxC,oBAAqBA,EAAM,OAAO,KAAK,KAEvC,kBAAmBA,EAAM,OAAO,QAAQ,QACxC,0BAA2BA,EAAM,OAAO,QAAQ,QAChD,4BAA6BA,EAAM,OAAO,QAAQ,UAClD,wBAAyBA,EAAM,OAAO,QAAQ,MAC9C,uBAAwBA,EAAM,OAAO,QAAQ,KAE7C,kBAAmBA,EAAM,OAAO,QAAQ,QACxC,0BAA2BA,EAAM,OAAO,QAAQ,QAChD,4BAA6BA,EAAM,OAAO,QAAQ,UAClD,wBAAyBA,EAAM,OAAO,QAAQ,MAC9C,uBAAwBA,EAAM,OAAO,QAAQ,KAE7C,iBAAkBA,EAAM,OAAO,OAAO,QACtC,yBAA0BA,EAAM,OAAO,OAAO,QAC9C,2BAA4BA,EAAM,OAAO,OAAO,UAChD,uBAAwBA,EAAM,OAAO,OAAO,MAC5C,sBAAuBA,EAAM,OAAO,OAAO,KAC3C,GAAGC,CACP,CACJ,EAGA,IAAOJ,EAAQE",
6
- "names": ["ThemeCssVars_exports", "__export", "ThemeCssVars_default", "__toCommonJS", "ThemeCssVars", "theme", "shadows", "s", "i"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/theme/ThemeDefaultOptions.ts"],
4
- "sourcesContent": ["import { ThemeOptionInput, ThemeTypographyType } from './types'\r\n\r\nexport const lightColorPallete = {\r\n text: {\r\n primary: \"#212B36\",\r\n secondary: \"#637381\",\r\n },\r\n background: {\r\n primary: \"#FFFFFF\",\r\n secondary: \"#EDEFF7\",\r\n },\r\n divider: \"#DADCE0\"\r\n}\r\n\r\nexport const darkColorPallete = {\r\n text: {\r\n primary: \"#FFFFFF\",\r\n secondary: \"#C4CDD5\",\r\n },\r\n background: {\r\n primary: \"#272727\",\r\n secondary: \"#1E1E1E\",\r\n },\r\n divider: \"#3D3D3D\"\r\n}\r\n\r\nexport const ThemeColors = {\r\n ...lightColorPallete,\r\n brand: {\r\n primary: \"#3b82f6\",\r\n secondary: \"#60a5fa\",\r\n text: \"#FFFFFF\"\r\n },\r\n accent: {\r\n primary: \"#14b8a6\",\r\n secondary: \"#2dd4bf\",\r\n text: \"#FFFFFF\"\r\n },\r\n info: {\r\n primary: \"#0ea5e9\",\r\n secondary: \"#60a5fa\",\r\n text: \"#FFFFFF\"\r\n },\r\n success: {\r\n primary: \"#22c55e\",\r\n secondary: \"#4ade80\",\r\n text: \"#FFFFFF\"\r\n },\r\n warning: {\r\n primary: \"#f59e0b\",\r\n secondary: \"#fbbf24\",\r\n text: \"#FFFFFF\"\r\n },\r\n danger: {\r\n primary: \"#ef4444\",\r\n secondary: \"#f87171\",\r\n text: \"#FFFFFF\"\r\n },\r\n}\r\n\r\nexport const ThemeTypography: ThemeTypographyType = {\r\n fontFamily: '\"Inter\",sans-serif,\"Helvetica\",\"Arial\"',\r\n h1: {\r\n fontSize: 47.78,\r\n lineHeight: 1.3,\r\n fontWeight: 400,\r\n },\r\n h2: {\r\n fontSize: 39.81,\r\n lineHeight: 1.35,\r\n fontWeight: 400,\r\n },\r\n h3: {\r\n fontSize: 33.18,\r\n lineHeight: 1.4,\r\n fontWeight: 400,\r\n },\r\n h4: {\r\n fontSize: 27.65,\r\n lineHeight: 1.45,\r\n fontWeight: 400,\r\n },\r\n h5: {\r\n fontSize: 27.65,\r\n lineHeight: 1.5,\r\n fontWeight: 400,\r\n },\r\n h6: {\r\n fontSize: 23.04,\r\n lineHeight: 1.55,\r\n fontWeight: 400,\r\n },\r\n text: {\r\n fontSize: 16,\r\n lineHeight: 1.6,\r\n fontWeight: 400,\r\n },\r\n button: {\r\n fontSize: 13.33,\r\n lineHeight: 1.6,\r\n fontWeight: 500,\r\n },\r\n small: {\r\n fontSize: 12.33,\r\n lineHeight: 1.6,\r\n fontWeight: 400,\r\n }\r\n}\r\n\r\nexport const shadow = [\r\n \"none\",\r\n \"0px 2px 1px -1px rgba(0,0,0,0.2),0px 1px 1px 0px rgba(0,0,0,0.14),0px 1px 3px 0px rgba(0,0,0,0.12)\",\r\n \"0px 3px 1px -2px rgba(0,0,0,0.2),0px 2px 2px 0px rgba(0,0,0,0.14),0px 1px 5px 0px rgba(0,0,0,0.12)\",\r\n \"0px 3px 3px -2px rgba(0,0,0,0.2),0px 3px 4px 0px rgba(0,0,0,0.14),0px 1px 8px 0px rgba(0,0,0,0.12)\",\r\n \"0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)\",\r\n \"0px 3px 5px -1px rgba(0,0,0,0.2),0px 5px 8px 0px rgba(0,0,0,0.14),0px 1px 14px 0px rgba(0,0,0,0.12)\",\r\n \"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)\",\r\n \"0px 4px 5px -2px rgba(0,0,0,0.2),0px 7px 10px 1px rgba(0,0,0,0.14),0px 2px 16px 1px rgba(0,0,0,0.12)\",\r\n \"0px 5px 5px -3px rgba(0,0,0,0.2),0px 8px 10px 1px rgba(0,0,0,0.14),0px 3px 14px 2px rgba(0,0,0,0.12)\",\r\n \"0px 5px 6px -3px rgba(0,0,0,0.2),0px 9px 12px 1px rgba(0,0,0,0.14),0px 3px 16px 2px rgba(0,0,0,0.12)\",\r\n \"0px 6px 6px -3px rgba(0,0,0,0.2),0px 10px 14px 1px rgba(0,0,0,0.14),0px 4px 18px 3px rgba(0,0,0,0.12)\",\r\n \"0px 6px 7px -4px rgba(0,0,0,0.2),0px 11px 15px 1px rgba(0,0,0,0.14),0px 4px 20px 3px rgba(0,0,0,0.12)\",\r\n \"0px 7px 8px -4px rgba(0,0,0,0.2),0px 12px 17px 2px rgba(0,0,0,0.14),0px 5px 22px 4px rgba(0,0,0,0.12)\",\r\n \"0px 7px 8px -4px rgba(0,0,0,0.2),0px 13px 19px 2px rgba(0,0,0,0.14),0px 5px 24px 4px rgba(0,0,0,0.12)\",\r\n \"0px 7px 9px -4px rgba(0,0,0,0.2),0px 14px 21px 2px rgba(0,0,0,0.14),0px 5px 26px 4px rgba(0,0,0,0.12)\",\r\n \"0px 8px 9px -5px rgba(0,0,0,0.2),0px 15px 22px 2px rgba(0,0,0,0.14),0px 6px 28px 5px rgba(0,0,0,0.12)\",\r\n \"0px 8px 10px -5px rgba(0,0,0,0.2),0px 16px 24px 2px rgba(0,0,0,0.14),0px 6px 30px 5px rgba(0,0,0,0.12)\",\r\n \"0px 8px 11px -5px rgba(0,0,0,0.2),0px 17px 26px 2px rgba(0,0,0,0.14),0px 6px 32px 5px rgba(0,0,0,0.12)\",\r\n \"0px 9px 11px -5px rgba(0,0,0,0.2),0px 18px 28px 2px rgba(0,0,0,0.14),0px 7px 34px 6px rgba(0,0,0,0.12)\",\r\n \"0px 9px 12px -6px rgba(0,0,0,0.2),0px 19px 29px 2px rgba(0,0,0,0.14),0px 7px 36px 6px rgba(0,0,0,0.12)\",\r\n \"0px 10px 13px -6px rgba(0,0,0,0.2),0px 20px 31px 3px rgba(0,0,0,0.14),0px 8px 38px 7px rgba(0,0,0,0.12)\",\r\n \"0px 10px 13px -6px rgba(0,0,0,0.2),0px 21px 33px 3px rgba(0,0,0,0.14),0px 8px 40px 7px rgba(0,0,0,0.12)\",\r\n \"0px 10px 14px -6px rgba(0,0,0,0.2),0px 22px 35px 3px rgba(0,0,0,0.14),0px 8px 42px 7px rgba(0,0,0,0.12)\",\r\n \"0px 11px 14px -7px rgba(0,0,0,0.2),0px 23px 36px 3px rgba(0,0,0,0.14),0px 9px 44px 8px rgba(0,0,0,0.12)\",\r\n \"0px 11px 15px -7px rgba(0,0,0,0.2),0px 24px 38px 3px rgba(0,0,0,0.14),0px 9px 46px 8px rgba(0,0,0,0.12)\",\r\n]\r\n\r\nexport default {\r\n name: \"light\",\r\n rtl: false,\r\n shadow,\r\n globalStyle: {},\r\n colors: ThemeColors,\r\n typography: ThemeTypography,\r\n interfaces: {}\r\n} as ThemeOptionInput\r\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,EAAA,oBAAAC,EAAA,qBAAAC,EAAA,YAAAC,EAAA,sBAAAC,EAAA,WAAAC,IAAA,eAAAC,EAAAR,GAEO,MAAMM,EAAoB,CAC7B,KAAM,CACF,QAAS,UACT,UAAW,SACf,EACA,WAAY,CACR,QAAS,UACT,UAAW,SACf,EACA,QAAS,SACb,EAEaF,EAAmB,CAC5B,KAAM,CACF,QAAS,UACT,UAAW,SACf,EACA,WAAY,CACR,QAAS,UACT,UAAW,SACf,EACA,QAAS,SACb,EAEaF,EAAc,CACvB,GAAGI,EACH,MAAO,CACH,QAAS,UACT,UAAW,UACX,KAAM,SACV,EACA,OAAQ,CACJ,QAAS,UACT,UAAW,UACX,KAAM,SACV,EACA,KAAM,CACF,QAAS,UACT,UAAW,UACX,KAAM,SACV,EACA,QAAS,CACL,QAAS,UACT,UAAW,UACX,KAAM,SACV,EACA,QAAS,CACL,QAAS,UACT,UAAW,UACX,KAAM,SACV,EACA,OAAQ,CACJ,QAAS,UACT,UAAW,UACX,KAAM,SACV,CACJ,EAEaH,EAAuC,CAChD,WAAY,yCACZ,GAAI,CACA,SAAU,MACV,WAAY,IACZ,WAAY,GAChB,EACA,GAAI,CACA,SAAU,MACV,WAAY,KACZ,WAAY,GAChB,EACA,GAAI,CACA,SAAU,MACV,WAAY,IACZ,WAAY,GAChB,EACA,GAAI,CACA,SAAU,MACV,WAAY,KACZ,WAAY,GAChB,EACA,GAAI,CACA,SAAU,MACV,WAAY,IACZ,WAAY,GAChB,EACA,GAAI,CACA,SAAU,MACV,WAAY,KACZ,WAAY,GAChB,EACA,KAAM,CACF,SAAU,GACV,WAAY,IACZ,WAAY,GAChB,EACA,OAAQ,CACJ,SAAU,MACV,WAAY,IACZ,WAAY,GAChB,EACA,MAAO,CACH,SAAU,MACV,WAAY,IACZ,WAAY,GAChB,CACJ,EAEaI,EAAS,CAClB,OACA,qGACA,qGACA,qGACA,sGACA,sGACA,uGACA,uGACA,uGACA,uGACA,wGACA,wGACA,wGACA,wGACA,wGACA,wGACA,yGACA,yGACA,yGACA,yGACA,0GACA,0GACA,0GACA,0GACA,yGACJ,EAEA,IAAOF,EAAQ,CACX,KAAM,QACN,IAAK,GACL,OAAAE,EACA,YAAa,CAAC,EACd,OAAQL,EACR,WAAYC,EACZ,WAAY,CAAC,CACjB",
6
- "names": ["ThemeDefaultOptions_exports", "__export", "ThemeColors", "ThemeTypography", "darkColorPallete", "ThemeDefaultOptions_default", "lightColorPallete", "shadow", "__toCommonJS"]
7
- }
@@ -1,2 +0,0 @@
1
- "use strict";var k=Object.create;var p=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var C=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var w=(r,o)=>{for(var t in o)p(r,t,{get:o[t],enumerable:!0})},c=(r,o,t,l)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of x(o))!P.call(r,i)&&i!==t&&p(r,i,{get:()=>o[i],enumerable:!(l=v(o,i))||l.enumerable});return r};var g=(r,o,t)=>(t=r!=null?k(C(r)):{},c(o||!r||!r.__esModule?p(t,"default",{value:r,enumerable:!0}):t,r)),S=r=>c(p({},"__esModule",{value:!0}),r);var z={};w(z,{default:()=>W});module.exports=S(z);var a=g(require("react"),1),h=g(require("../Tag"),1),f=require("../breakpoint"),s=require("./core"),u=g(require("./ThemeCssVars"),1),n=require("../css");const H=({children:r,theme:o,resetCss:t,scrollbarCss:l,isRootProvider:i,renderIsRoot:T,...m})=>{const e=s.ThemeFactory.get(o);if(!e)throw new Error(`Invalid theme name provided: ${o}`);return t??=!0,l??=!0,a.useMemo(()=>{if(Object.keys(e.globalStyle).length&&(0,n.css)({"@global":e.globalStyle}),(0,n.css)({"@global":{[`.xui-${o}-theme-root`]:(0,u.default)(e)}}),l&&typeof document<"u"){let d=10,b=e.colors.divider,y=e.colors.background.secondary;(0,n.css)({"@global":{"*":{scrollbarWidth:"thin",scrollbarColor:`${b} ${y}`},"::-webkit-scrollbar":{width:d,height:d},"::-webkit-scrollbar-thumb":{backgroundColor:b,borderRadius:"5px",border:"2px solid #f4f4f4"},"::-webkit-scrollbar-thumb:hover":{backgroundColor:b},"::-webkit-scrollbar-track":{backgroundColor:y,borderRadius:"5px"}}})}t&&(0,n.css)({"@global":{"*":{m:0,p:0,outline:"none",boxSizing:"border-box",verticalAlign:"baseline"},"html, body":{minHeight:"100%","-webkit-font-smoothing":"antialiased"},"img, picture, video, canvas, svg":{maxWidth:"100%",display:"block"},"input, button, textarea, select":{font:"inherit"},table:{borderCollapse:"collapse",borderSpacing:0},"ol, ul":{listStyle:"none"},a:{display:"inline-block"},"p, h1, h2, h3, h4, h5, h6":{overflowWrap:"break-word"}}})},[o]),a.createElement(s.ThemeContex.Provider,{value:o},i?a.createElement(f.BreakpointProvider,null,a.createElement(h.default,{minHeight:"100%",bgcolor:e.colors.background.primary,fontFamily:e.typography.fontFamily,fontSize:e.typography.text.fontSize,fontWeight:e.typography.text.fontWeight,lineHeight:e.typography.text.lineHeight,...m,baseClass:`${o}-theme-root`,direction:e.rtl?"rtl":"ltr"},r,T)):a.createElement(h.default,{minHeight:"100%",bgcolor:e.colors.background.primary,fontFamily:e.typography.fontFamily,fontSize:e.typography.text.fontSize,fontWeight:e.typography.text.fontWeight,lineHeight:e.typography.text.lineHeight,...m,baseClass:`${o}-theme-root`,direction:e.rtl?"rtl":"ltr"},r))};var W=H;
2
- //# sourceMappingURL=ThemeProvider.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/theme/ThemeProvider.tsx"],
4
- "sourcesContent": ["import * as React from \"react\"\r\nimport { ThemeOptions } from \"./types\"\r\nimport Tag from \"../Tag\"\r\nimport { TagComponentType, TagProps } from \"../Tag/types\"\r\nimport { BreakpointProvider } from \"../breakpoint\"\r\nimport { ThemeContex, ThemeFactory } from \"./core\"\r\nimport ThemeCssVars from \"./ThemeCssVars\"\r\nimport { css } from \"../css\"\r\n\r\nexport type ThemeProviderProps<T extends TagComponentType = 'div'> = TagProps<T> & {\r\n theme: string;\r\n resetCss?: boolean;\r\n scrollbarCss?: boolean;\r\n isRootProvider?: boolean;\r\n renderIsRoot?: React.ReactElement;\r\n}\r\n\r\nconst ThemeProvider = ({ children, theme, resetCss, scrollbarCss, isRootProvider, renderIsRoot, ...props }: ThemeProviderProps) => {\r\n const THEME = ThemeFactory.get(theme) as ThemeOptions\r\n if (!THEME) throw new Error(`Invalid theme name provided: ${theme}`)\r\n resetCss ??= true\r\n scrollbarCss ??= true\r\n\r\n React.useMemo(() => {\r\n if (!!Object.keys(THEME.globalStyle).length) {\r\n css({\r\n \"@global\": THEME.globalStyle\r\n })\r\n }\r\n\r\n css({\r\n \"@global\": {\r\n [`.xui-${theme}-theme-root`]: ThemeCssVars(THEME)\r\n }\r\n })\r\n\r\n if (scrollbarCss && typeof document !== 'undefined') {\r\n let thumbSize = 10\r\n let thumbColor = THEME.colors.divider\r\n let trackColor = THEME.colors.background.secondary\r\n css({\r\n \"@global\": {\r\n \"*\": {\r\n scrollbarWidth: \"thin\",\r\n scrollbarColor: `${thumbColor} ${trackColor}`,\r\n },\r\n \"::-webkit-scrollbar\": {\r\n width: thumbSize,\r\n height: thumbSize,\r\n },\r\n \"::-webkit-scrollbar-thumb\": {\r\n backgroundColor: thumbColor,\r\n borderRadius: \"5px\",\r\n border: \"2px solid #f4f4f4\",\r\n },\r\n \"::-webkit-scrollbar-thumb:hover\": {\r\n backgroundColor: thumbColor,\r\n },\r\n \"::-webkit-scrollbar-track\": {\r\n backgroundColor: trackColor,\r\n borderRadius: \"5px\",\r\n },\r\n }\r\n })\r\n }\r\n\r\n resetCss && css({\r\n \"@global\": {\r\n \"*\": {\r\n m: 0,\r\n p: 0,\r\n outline: \"none\",\r\n boxSizing: \"border-box\",\r\n verticalAlign: \"baseline\",\r\n },\r\n \"html, body\": {\r\n minHeight: \"100%\",\r\n \"-webkit-font-smoothing\": \"antialiased\"\r\n } as any,\r\n \"img, picture, video, canvas, svg\": {\r\n maxWidth: \"100%\",\r\n display: \"block\"\r\n },\r\n \"input, button, textarea, select\": {\r\n font: \"inherit\"\r\n },\r\n \"table\": {\r\n borderCollapse: \"collapse\",\r\n borderSpacing: 0\r\n },\r\n \"ol, ul\": {\r\n listStyle: \"none\"\r\n },\r\n \"a\": {\r\n display: \"inline-block\"\r\n },\r\n \"p, h1, h2, h3, h4, h5, h6\": {\r\n overflowWrap: \"break-word\",\r\n }\r\n }\r\n })\r\n }, [theme])\r\n\r\n return (\r\n <ThemeContex.Provider value={theme}>\r\n {\r\n isRootProvider ? <BreakpointProvider>\r\n <Tag\r\n minHeight=\"100%\"\r\n bgcolor={THEME.colors.background.primary}\r\n fontFamily={THEME.typography.fontFamily}\r\n fontSize={THEME.typography.text.fontSize}\r\n fontWeight={THEME.typography.text.fontWeight}\r\n lineHeight={THEME.typography.text.lineHeight}\r\n {...props}\r\n baseClass={`${theme}-theme-root`}\r\n direction={THEME.rtl ? \"rtl\" : \"ltr\"}\r\n >\r\n {children}\r\n {renderIsRoot}\r\n </Tag>\r\n </BreakpointProvider> : <Tag\r\n minHeight=\"100%\"\r\n bgcolor={THEME.colors.background.primary}\r\n fontFamily={THEME.typography.fontFamily}\r\n fontSize={THEME.typography.text.fontSize}\r\n fontWeight={THEME.typography.text.fontWeight}\r\n lineHeight={THEME.typography.text.lineHeight}\r\n {...props}\r\n baseClass={`${theme}-theme-root`}\r\n direction={THEME.rtl ? \"rtl\" : \"ltr\"}\r\n >\r\n {children}\r\n </Tag>\r\n }\r\n </ThemeContex.Provider>\r\n )\r\n}\r\n\r\nexport default ThemeProvider"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,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AgB,WAChB,cAAe,CAClB,EACA,SAAU,CACP,UAAW,MACd,EACA,EAAK,CACF,QAAS,cACZ,EACA,4BAA6B,CAC1B,aAAc,YACjB,CACH,CACH,CAAC,CACJ,EAAG,CAACD,CAAK,CAAC,EAGPR,EAAA,cAAC,cAAY,SAAZ,CAAqB,MAAOQ,GAEvBG,EAAiBX,EAAA,cAAC,0BACfA,EAAA,cAAC,EAAAmB,QAAA,CACE,UAAU,OACV,QAASL,EAAM,OAAO,WAAW,QACjC,WAAYA,EAAM,WAAW,WAC7B,SAAUA,EAAM,WAAW,KAAK,SAChC,WAAYA,EAAM,WAAW,KAAK,WAClC,WAAYA,EAAM,WAAW,KAAK,WACjC,GAAGD,EACJ,UAAW,GAAGL,CAAK,cACnB,UAAWM,EAAM,IAAM,MAAQ,OAE9BP,EACAK,CACJ,CACH,EAAwBZ,EAAA,cAAC,EAAAmB,QAAA,CACtB,UAAU,OACV,QAASL,EAAM,OAAO,WAAW,QACjC,WAAYA,EAAM,WAAW,WAC7B,SAAUA,EAAM,WAAW,KAAK,SAChC,WAAYA,EAAM,WAAW,KAAK,WAClC,WAAYA,EAAM,WAAW,KAAK,WACjC,GAAGD,EACJ,UAAW,GAAGL,CAAK,cACnB,UAAWM,EAAM,IAAM,MAAQ,OAE9BP,CACJ,CAEN,CAEN,EAEA,IAAOT,EAAQQ",
6
- "names": ["ThemeProvider_exports", "__export", "ThemeProvider_default", "__toCommonJS", "React", "import_Tag", "import_breakpoint", "import_core", "import_ThemeCssVars", "import_css", "ThemeProvider", "children", "theme", "resetCss", "scrollbarCss", "isRootProvider", "renderIsRoot", "props", "THEME", "ThemeCssVars", "thumbSize", "thumbColor", "trackColor", "Tag"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/theme/core.ts"],
4
- "sourcesContent": ["import React from \"react\"\r\nimport { ObjectType, ThemeOptions } from \"./types\"\r\n\r\nexport const ThemeFactory = new Map<string, ThemeOptions>()\r\nexport const ThemeContex = React.createContext(\"light\")\r\nexport const getTheme = (theme: string) => ThemeFactory.get(theme)\r\nexport const useTheme = (): ThemeOptions => ThemeFactory.get(React.useContext(ThemeContex)) as any\r\n\r\nexport const mergeObject = (a: ObjectType, b: ObjectType) => {\r\n a = { ...a }\r\n b = { ...b }\r\n for (const key in b) {\r\n const v = (b as any)[key]\r\n if (typeof v === 'object' && !Array.isArray(v) && !React.isValidElement(v)) {\r\n a[key] = mergeObject(a[key], b[key])\r\n } else {\r\n a[key] = v\r\n }\r\n }\r\n return a\r\n}\r\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,EAAA,iBAAAC,EAAA,aAAAC,EAAA,gBAAAC,EAAA,aAAAC,IAAA,eAAAC,EAAAP,GAAA,IAAAQ,EAAkB,sBAGX,MAAML,EAAe,IAAI,IACnBD,EAAc,EAAAO,QAAM,cAAc,OAAO,EACzCL,EAAYM,GAAkBP,EAAa,IAAIO,CAAK,EACpDJ,EAAW,IAAoBH,EAAa,IAAI,EAAAM,QAAM,WAAWP,CAAW,CAAC,EAE7EG,EAAc,CAACM,EAAeC,IAAkB,CAC1DD,EAAI,CAAE,GAAGA,CAAE,EACXC,EAAI,CAAE,GAAGA,CAAE,EACX,UAAWC,KAAOD,EAAG,CAClB,MAAME,EAAKF,EAAUC,CAAG,EACpB,OAAOC,GAAM,UAAY,CAAC,MAAM,QAAQA,CAAC,GAAK,CAAC,EAAAL,QAAM,eAAeK,CAAC,EACtEH,EAAEE,CAAG,EAAIR,EAAYM,EAAEE,CAAG,EAAGD,EAAEC,CAAG,CAAC,EAEnCF,EAAEE,CAAG,EAAIC,CAEf,CACA,OAAOH,CACV",
6
- "names": ["core_exports", "__export", "ThemeContex", "ThemeFactory", "getTheme", "mergeObject", "useTheme", "__toCommonJS", "import_react", "React", "theme", "a", "b", "key", "v"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/theme/createColor.ts"],
4
- "sourcesContent": ["import { ThemeOptions, ThemeColor } from \"./types\"\r\nimport { alpha } from \"../css\"\r\n\r\nconst createColor = (theme: ThemeOptions, name: keyof ThemeColor) => {\r\n let color = theme.colors[name]\r\n let { primary, secondary } = color as any\r\n let text = (color as any).text || theme.colors.text.primary\r\n let _alpha = alpha(primary, .1)\r\n\r\n const isBag = (a: any, b: any) => name === \"background\" ? a : b\r\n\r\n return {\r\n alpha: _alpha,\r\n template: {\r\n outline: {\r\n bgcolor: \"transparent\",\r\n color: isBag(text, primary),\r\n border: 1,\r\n borderColor: isBag(\"divider\", alpha(primary, .4)),\r\n hover: {\r\n color: isBag(text, primary),\r\n borderColor: isBag(\"divider\", alpha(primary, .8)),\r\n }\r\n },\r\n fill: {\r\n bgcolor: isBag(secondary, primary),\r\n color: text,\r\n hover: {\r\n bgcolor: isBag(alpha(secondary, .6), secondary),\r\n color: text,\r\n }\r\n },\r\n text: {\r\n bgcolor: \"transparent\",\r\n color: isBag(text, primary),\r\n hover: {\r\n bgcolor: isBag(alpha(secondary, .6), alpha(primary, .1)),\r\n color: isBag(text, primary),\r\n }\r\n },\r\n alpha: {\r\n bgcolor: isBag(alpha(secondary, .5), alpha(primary, .1)),\r\n color: isBag(text, primary),\r\n hover: {\r\n bgcolor: isBag(alpha(secondary, .8), alpha(primary, .15)),\r\n color: isBag(text, primary),\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport default createColor"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GACA,IAAAI,EAAsB,kBAEtB,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,KAAS,SAAMH,EAAS,EAAE,EAE9B,MAAMI,EAAQ,CAACC,EAAQ,IAAWP,IAAS,aAAeO,EAAI,EAE9D,MAAO,CACJ,MAAOF,EACP,SAAU,CACP,QAAS,CACN,QAAS,cACT,MAAOC,EAAMF,EAAMF,CAAO,EAC1B,OAAQ,EACR,YAAaI,EAAM,aAAW,SAAMJ,EAAS,EAAE,CAAC,EAChD,MAAO,CACJ,MAAOI,EAAMF,EAAMF,CAAO,EAC1B,YAAaI,EAAM,aAAW,SAAMJ,EAAS,EAAE,CAAC,CACnD,CACH,EACA,KAAM,CACH,QAASI,EAAMH,EAAWD,CAAO,EACjC,MAAOE,EACP,MAAO,CACJ,QAASE,KAAM,SAAMH,EAAW,EAAE,EAAGA,CAAS,EAC9C,MAAOC,CACV,CACH,EACA,KAAM,CACH,QAAS,cACT,MAAOE,EAAMF,EAAMF,CAAO,EAC1B,MAAO,CACJ,QAASI,KAAM,SAAMH,EAAW,EAAE,KAAG,SAAMD,EAAS,EAAE,CAAC,EACvD,MAAOI,EAAMF,EAAMF,CAAO,CAC7B,CACH,EACA,MAAO,CACJ,QAASI,KAAM,SAAMH,EAAW,EAAE,KAAG,SAAMD,EAAS,EAAE,CAAC,EACvD,MAAOI,EAAMF,EAAMF,CAAO,EAC1B,MAAO,CACJ,QAASI,KAAM,SAAMH,EAAW,EAAE,KAAG,SAAMD,EAAS,GAAG,CAAC,EACxD,MAAOI,EAAMF,EAAMF,CAAO,CAC7B,CACH,CACH,CACH,CACH,EAEA,IAAOP,EAAQG",
6
- "names": ["createColor_exports", "__export", "createColor_default", "__toCommonJS", "import_css", "createColor", "theme", "name", "color", "primary", "secondary", "text", "_alpha", "isBag", "a"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/theme/createTheme.ts"],
4
- "sourcesContent": ["import { ThemeOptions, ThemeOptionInput } from \"./types\"\r\nimport defaultThemeOption, { darkColorPallete } from './ThemeDefaultOptions'\r\nimport { mergeObject, ThemeFactory } from \"./core\"\r\nimport createColor from \"./createColor\"\r\nimport { breakpoints } from \"../css\"\r\n\r\nexport const createTheme = (name: string, options: ThemeOptionInput, darkMode?: boolean): ThemeOptions => {\r\n if (!ThemeFactory.has(name)) {\r\n let theme: any = mergeObject(defaultThemeOption, {\r\n ...(darkMode ? darkColorPallete : {}),\r\n ...options,\r\n name,\r\n breakpoints: breakpoints\r\n })\r\n\r\n theme = mergeObject(theme, {\r\n colors: {\r\n background: createColor(theme, \"background\"),\r\n brand: createColor(theme, \"brand\"),\r\n accent: createColor(theme, \"accent\"),\r\n info: createColor(theme, \"info\"),\r\n success: createColor(theme, \"success\"),\r\n warning: createColor(theme, \"warning\"),\r\n danger: createColor(theme, \"danger\")\r\n }\r\n })\r\n ThemeFactory.set(name, theme)\r\n } else {\r\n throw new Error(`theme \"${name}\" already exists!`);\r\n }\r\n\r\n return ThemeFactory.get(name) as ThemeOptions\r\n}\r\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
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/theme/index.tsx"],
4
- "sourcesContent": ["import { lightColorPallete, darkColorPallete } from './ThemeDefaultOptions'\r\nimport { createTheme } from \"./createTheme\"\r\nimport ThemeProvider from './ThemeProvider'\r\nimport createThemeSwitcher from './createThemeSwitcher'\r\nimport { getTheme, useTheme } from './core'\r\nexport type { ThemeProviderProps } from './ThemeProvider'\r\n\r\nexport {\r\n ThemeProvider,\r\n createThemeSwitcher,\r\n getTheme,\r\n useTheme\r\n}\r\n\r\ncreateTheme(\"light\", { colors: lightColorPallete })\r\ncreateTheme(\"dark\", { colors: darkColorPallete })\r\n\r\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,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/theme/types.ts"],
4
- "sourcesContent": ["import { BreakpointKeys, GlobalCSS } from \"../css/types\";\r\n\r\nexport type ObjectType = { [key: string]: any }\r\n\r\nexport type ThemeColorItem = {\r\n primary: string;\r\n secondary: string;\r\n text: string;\r\n alpha: string;\r\n template: {\r\n outline: {\r\n bgcolor: string;\r\n color: string;\r\n border: number;\r\n borderColor: string;\r\n hover: {\r\n bgcolor: string,\r\n color: string,\r\n }\r\n },\r\n fill: {\r\n bgcolor: string;\r\n color: string,\r\n hover: {\r\n bgcolor: string;\r\n color: string;\r\n }\r\n },\r\n text: {\r\n bgcolor: string;\r\n color: string;\r\n hover: {\r\n bgcolor: string;\r\n color: string;\r\n }\r\n },\r\n alpha: {\r\n bgcolor: string\r\n color: string;\r\n hover: {\r\n bgcolor: string;\r\n color: string;\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport type ThemeTypographyItem = {\r\n fontSize: number;\r\n lineHeight: number;\r\n fontWeight: number;\r\n}\r\n\r\nexport type ThemeColor = {\r\n background: Omit<ThemeColorItem, \"text\">;\r\n text: Omit<ThemeColorItem, \"text\" | \"alpha\" | \"template\">;\r\n divider: string;\r\n brand: ThemeColorItem;\r\n accent: ThemeColorItem;\r\n success: ThemeColorItem\r\n info: ThemeColorItem\r\n warning: ThemeColorItem\r\n danger: ThemeColorItem\r\n};\r\n\r\nexport type ThemeTypographyType = {\r\n fontFamily: string,\r\n h1: ThemeTypographyItem;\r\n h2: ThemeTypographyItem;\r\n h3: ThemeTypographyItem;\r\n h4: ThemeTypographyItem;\r\n h5: ThemeTypographyItem;\r\n h6: ThemeTypographyItem;\r\n text: ThemeTypographyItem;\r\n button: ThemeTypographyItem;\r\n small: ThemeTypographyItem;\r\n}\r\n\r\nexport interface ThemeOptions {\r\n name: string;\r\n rtl: boolean;\r\n globalStyle: GlobalCSS,\r\n breakpoints: { [key in BreakpointKeys]: number };\r\n shadow: string[];\r\n interfaces: { [name: string]: <P extends object>(defaultProps: P, theme: ThemeOptions) => P };\r\n colors: ThemeColor;\r\n typography: ThemeTypographyType;\r\n}\r\n\r\n// Theme Input\r\nexport type ThemeColorItemInput = Partial<Omit<ThemeColorItem, \"alpha\">>\r\nexport type ThemeTypographyItemInput = Partial<ThemeTypographyItem>\r\nexport type ThemeColorInput = {\r\n background?: Omit<ThemeColorItemInput, \"text\">\r\n text?: Omit<ThemeColorItemInput, \"text\">\r\n divider?: string;\r\n brand?: ThemeColorItemInput;\r\n accent?: ThemeColorItemInput;\r\n success?: ThemeColorItemInput\r\n info?: ThemeColorItemInput\r\n warning?: ThemeColorItemInput\r\n danger?: ThemeColorItemInput\r\n};\r\nexport type ThemeTypographyInputType = {\r\n fontFamily?: string,\r\n h1?: ThemeTypographyItemInput;\r\n h2?: ThemeTypographyItemInput;\r\n h3?: ThemeTypographyItemInput;\r\n h4?: ThemeTypographyItemInput;\r\n h5?: ThemeTypographyItemInput;\r\n h6?: ThemeTypographyItemInput;\r\n text?: ThemeTypographyItemInput;\r\n button?: ThemeTypographyItemInput;\r\n small?: ThemeTypographyItemInput;\r\n};\r\nexport interface ThemeOptionInput {\r\n rtl?: boolean;\r\n globalStyle?: GlobalCSS,\r\n interfaces?: { [name: string]: <P extends object>(defaultProps: P, theme: ThemeOptions) => P };\r\n colors?: ThemeColorInput;\r\n typography?: ThemeTypographyInputType;\r\n}\r\n\r\n// ============ Reference Types\r\n\r\nexport type TypographyRefTypes =\r\n | \"h1\"\r\n | \"h2\"\r\n | \"h3\"\r\n | \"h4\"\r\n | \"h5\"\r\n | \"h6\"\r\n | \"text\"\r\n | \"button\"\r\n | \"small\"\r\n\r\nexport type ColorsRefTypes =\r\n | \"text\"\r\n | \"text.primary\"\r\n | \"text.secondary\"\r\n\r\n | \"background\"\r\n | \"background.primary\"\r\n | \"background.secondary\"\r\n | \"background.alpha\"\r\n\r\n | \"brand\"\r\n | \"brand.primary\"\r\n | \"brand.secondary\"\r\n | \"brand.alpha\"\r\n | \"brand.text\"\r\n\r\n | \"accent\"\r\n | \"accent.primary\"\r\n | \"accent.secondary\"\r\n | \"accent.alpha\"\r\n | \"accent.text\"\r\n\r\n | \"info\"\r\n | \"info.primary\"\r\n | \"info.secondary\"\r\n | \"info.alpha\"\r\n | \"info.text\"\r\n\r\n | \"success\"\r\n | \"success.primary\"\r\n | \"success.secondary\"\r\n | \"success.alpha\"\r\n | \"success.text\"\r\n\r\n | \"warning\"\r\n | \"warning.primary\"\r\n | \"warning.secondary\"\r\n | \"warning.alpha\"\r\n | \"warning.text\"\r\n\r\n | \"danger\"\r\n | \"danger.primary\"\r\n | \"danger.secondary\"\r\n | \"danger.alpha\"\r\n | \"danger.text\""],
5
- "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
- "names": ["types_exports", "__toCommonJS"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/useAnimation.ts"],
4
- "sourcesContent": ["import { css } from './css'\r\nimport { useId } from 'react'\r\nimport { CSSProps } from './css/types'\r\n\r\nexport const animationEases = {\r\n easeInOut: \"cubic-bezier(0.4, 0, 0.2, 1)\",\r\n easeOut: \"cubic-bezier(0.0, 0, 0.2, 1)\",\r\n easeIn: \"cubic-bezier(0.4, 0, 1, 1)\",\r\n sharp: \"cubic-bezier(0.4, 0, 0.6, 1)\",\r\n linear: \"cubic-bezier(0, 0, 1, 1)\",\r\n easeBounceOut: \"cubic-bezier(0.68, -0.55, 0.265, 1.55)\"\r\n}\r\n\r\nexport interface UseAnimationProps {\r\n delay?: number;\r\n duration?: number;\r\n from: CSSProps;\r\n to: CSSProps;\r\n ease?: keyof typeof animationEases;\r\n}\r\n\r\nconst useAnimation = ({ from, to, delay, ease, duration }: UseAnimationProps) => {\r\n let _delay = delay || 0;\r\n let _duration = duration || 600;\r\n let _ease = ease || \"easeBounceOut\"\r\n const id = \"anim\" + useId().replace(/:/g, \"\")\r\n const anim = css({\r\n animationName: id,\r\n animationDelay: _delay + \"ms\",\r\n animationDuration: _duration + \"ms\",\r\n animationTimingFunction: animationEases[_ease] || animationEases.easeBounceOut,\r\n [`@keyframes ${id}`]: {\r\n from: from as any,\r\n to: to as any\r\n }\r\n })\r\n return anim.classname\r\n}\r\n\r\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,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/useColorTemplate.ts"],
4
- "sourcesContent": ["import { useTheme } from \"./theme\"\r\nexport type ColorTemplateColors = \"default\" | \"brand\" | \"accent\" | \"info\" | \"success\" | \"warning\" | \"danger\"\r\nexport type ColorTemplateType = \"fill\" | \"outline\" | \"text\" | \"alpha\"\r\n\r\nconst useColorTemplate = (color: ColorTemplateColors, type: ColorTemplateType) => {\r\n const theme: any = useTheme()\r\n let _color = color === 'default' ? \"background\" : color as any\r\n return theme.colors[_color]?.template[type]\r\n}\r\n\r\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,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/css/aliases.ts"],
4
- "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"],
5
- "mappings": "AAGA,MAAMA,EAAQ,CAACC,EAAQC,IAAY,OAAOD,GAAM,SAAWA,EAAIC,EAEzDC,EAAkC,CACrC,QAAUF,IAAO,CAAE,gBAAiBA,CAAE,GACtC,QAAUA,IAAO,CAAE,gBAAiB,OAAOA,CAAC,IAAK,eAAgB,QAAS,iBAAkB,WAAY,GACxG,GAAKA,IAAO,CAAE,WAAYA,CAAE,GAC5B,EAAIA,IAAO,CAAE,QAASD,EAAMC,EAAG,EAAIA,CAAC,CAAE,GACtC,GAAKA,IAAO,CAAE,WAAYD,EAAMC,EAAG,EAAIA,CAAC,CAAE,GAC1C,GAAKA,IAAO,CAAE,aAAcD,EAAMC,EAAG,EAAIA,CAAC,CAAE,GAC5C,GAAKA,IAAO,CAAE,cAAeD,EAAMC,EAAG,EAAIA,CAAC,CAAE,GAC7C,GAAKA,IAAO,CAAE,YAAaD,EAAMC,EAAG,EAAIA,CAAC,CAAE,GAC3C,GAAKA,IAAO,CAAE,YAAaD,EAAMC,EAAG,EAAIA,CAAC,EAAG,aAAcD,EAAMC,EAAG,EAAIA,CAAC,CAAE,GAC1E,G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or", "aliases", "aliases_default"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/css/getProps.ts"],
4
- "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 return {\r\n pointerEvents: \"none!important\",\r\n cursor: \"default!important\",\r\n userSelect: \"none!important\",\r\n opacity: \".8!important\"\r\n } as any\r\n }\r\n return {}\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\"\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"],
5
- "mappings": "AAEA,MAAMA,EAAW,CAACC,EAAcC,EAAeC,IAAmB,CAC9D,IAAIC,EACJ,GAAI,OAAOF,GAAU,SAAU,CAC3B,MAAMG,EAAQH,EAAM,MAAM,GAAG,EAC7BE,EAAYC,EAAM,CAAC,EAAI,aAAe,GACtCH,EAAQG,EAAM,CAAC,CACnB,CAEA,GAAIJ,IAAS,WACT,OAAKC,IAAkB,GACZ,CACH,cAAe,iBACf,OAAQ,oBACR,WAAY,iBACZ,QAAS,cACb,EAEG,CAAC,EAGZ,GAAIA,GAAS,OAAOA,GAAU,UAAY,CAAC,SAAU,cAAe,aAAc,YAAa,cAAc,EAAE,SAASD,CAAW,EAAG,CAClI,MAAMK,EAAY,OAAO,KAAKH,CAAI,EAClC,IAAII,EAAS,CACT,CAAC,GAAGN,CAAI,OAAO,EAAGC,EAAQ,MAAQE,GAAa,GACnD,EACA,OAAKE,EAAK,SAAS,GAAGL,CAAI,OAAO,IAC7BM,EAAE,GAAGN,CAAI,OAAO,EAAI,WAEnBK,EAAK,SAAS,GAAGL,CAAI,OAAO,IAC7BM,EAAE,GAAGN,CAAI,OAAO,EAAI,SAEjBM,CACX,CACJ,EAEA,IAAOC,EAAQR",
6
- "names": ["getProps", "prop", "value", "_css", "important", "split", "keys", "p", "getProps_default"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/css/getValue.ts"],
4
- "sourcesContent": ["import { CSSProps } from \"./types\"\r\n\r\nconst getColor = (color: string) => {\r\n return {\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}.text`]: `var(--color-${color}-text)`,\r\n [`${color}.alpha`]: `var(--color-${color}-alpha)`\r\n }\r\n}\r\n\r\nconst withImportant = (important: any, value: any) => important ? value + important : value\r\nconst colors: any = {\r\n \"text\": `var(--color-text-primary)`,\r\n \"text.primary\": `var(--color-text-primary)`,\r\n \"text.secondary\": `var(--color-text-secondary)`,\r\n\r\n \"background\": `var(--color-background-primary)`,\r\n \"background.primary\": `var(--color-background-primary)`,\r\n \"background.secondary\": `var(--color-background-secondary)`,\r\n \"background.alpha\": `var(--color-background-alpha)`,\r\n \"divider\": `var(--color-divider)`,\r\n\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 \"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 \"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 \"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 \"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 if (['width', 'maxWidth', 'minWidth', 'max-width', 'min-width'].includes(prop)) {\r\n return withImportant(important, breakpoints[value] || value)\r\n } else if (['fontFamily', 'font-family'].includes(prop) && value === 'default') {\r\n return withImportant(important, \"var(--font-family)\")\r\n } 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 } 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"],
5
- "mappings": "AAEA,MAAMA,EAAYC,IACP,CACH,CAAC,GAAGA,CAAK,EAAE,EAAG,eAAeA,CAAK,YAClC,CAAC,GAAGA,CAAK,UAAU,EAAG,eAAeA,CAAK,YAC1C,CAAC,GAAGA,CAAK,YAAY,EAAG,eAAeA,CAAK,cAC5C,CAAC,GAAGA,CAAK,OAAO,EAAG,eAAeA,CAAK,SACvC,CAAC,GAAGA,CAAK,QAAQ,EAAG,eAAeA,CAAK,SAC5C,GAGEC,EAAgB,CAACC,EAAgBC,IAAeD,EAAYC,EAAQD,EAAYC,EAChFC,EAAc,CAChB,KAAQ,4BACR,eAAgB,4BAChB,iBAAkB,8BAElB,WAAc,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,IAAS,QAAU,OAAOR,GAAU,UAAY,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,OAAQ,SAAU,OAAO,EAAE,SAASA,CAAK,EACzHF,EAAcC,EAAWO,EAAKN,CAAK,GAAKA,CAAK,EAClD,CAAC,aAAc,aAAa,EAAE,SAASQ,CAAI,GAAK,OAAOR,GAAU,UAAY,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,OAAQ,SAAU,OAAO,EAAE,SAASA,CAAK,EACtJF,EAAcC,EAAWM,EAAYL,CAAK,GAAKA,CAAK,EACpD,CAAC,aAAc,aAAa,EAAE,SAASQ,CAAI,GAAK,OAAOR,GAAU,UAAY,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,OAAQ,SAAU,OAAO,EAAE,SAASA,CAAK,EAC3JF,EAAcC,EAAWK,EAAYJ,CAAK,GAAKA,CAAK,EACpD,CAAC,WAAY,WAAW,EAAE,SAASQ,CAAI,GAAK,OAAOR,GAAU,SAC7DF,EAAcC,EAAWI,EAAUH,CAAK,GAAKA,CAAK,EAClD,OAAOA,GAAU,UAAY,CAAC,SAAU,WAAW,EAAE,SAASQ,CAAI,EAClEV,EAAcC,EAAW,gBAAgBC,CAAK,GAAG,EAGrDF,EAAcC,EAAWE,EAAOD,CAAK,GAAKA,CAAK,CAC1D,EAEA,IAAOW,EAAQJ",
6
- "names": ["getColor", "color", "withImportant", "important", "value", "colors", "breakpoints", "fontsizes", "lineHeights", "fontWeights", "font", "getValue", "prop", "_css", "split", "getValue_default"]
7
- }
package/css/index.js.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/css/index.ts"],
4
- "sourcesContent": ["import getValue from \"./getValue\"\r\nimport getProps from \"./getProps\"\r\nimport aliases from \"./aliases\"\r\nimport { Aliases, BreakpointKeys, CSSOptionProps, CSSProps } from './types'\r\nimport { css as _css } from \"oncss\"\r\n\r\nexport {\r\n getValue,\r\n getProps\r\n}\r\n\r\nexport const breakpoints = {\r\n xs: 0,\r\n sm: 600,\r\n md: 900,\r\n lg: 1200,\r\n xl: 1536\r\n}\r\n\r\nexport const css = (props: CSSProps, options?: CSSOptionProps) => {\r\n const cssOptions: CSSOptionProps = {\r\n ...options,\r\n breakpoints,\r\n aliases,\r\n getValue: (p: any, v: any, _c: any, dept) => {\r\n if (options?.getValue) {\r\n let _val = options?.getValue(p, v, _c, dept)\r\n if (_val) return _val\r\n }\r\n return getValue(p, v, _c)\r\n },\r\n getProps: (p: any, v: any, _c: any, dept) => {\r\n if (options?.getProps) {\r\n let _p = options?.getProps(p, v, _c, dept)\r\n if (_p) return _p\r\n }\r\n return getProps(p, v, _c)\r\n },\r\n }\r\n return _css<Aliases, BreakpointKeys>(props, cssOptions)\r\n}\r\n\r\nexport const adjustColor = (hex: string, factor: number) => {\r\n\r\n hex = hex.replace(/^#/, '')\r\n\r\n let r = parseInt(hex.slice(0, 2), 16)\r\n let g = parseInt(hex.slice(2, 4), 16)\r\n let b = parseInt(hex.slice(4, 6), 16)\r\n\r\n r = Math.floor(r * factor)\r\n g = Math.floor(g * factor)\r\n b = Math.floor(b * factor)\r\n\r\n r = Math.min(255, Math.max(0, r))\r\n g = Math.min(255, Math.max(0, g))\r\n b = Math.min(255, Math.max(0, b))\r\n\r\n return `#${r.toString(16).padStart(2, '0')}${g.toString(16).padStart(2, '0')}${b.toString(16).padStart(2, '0')}`;\r\n}\r\n\r\nexport const adjustTextContrast = (color: string) => {\r\n color = color.replace(/^#/, '')\r\n const r = parseInt(color.slice(0, 2), 16);\r\n const g = parseInt(color.slice(2, 4), 16);\r\n const b = parseInt(color.slice(4, 6), 16);\r\n\r\n const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;\r\n return luminance > 0.5 ? '#111111' : '#FFFFFF';\r\n}\r\n\r\nexport const alpha = (color: string, opacity = 1) => {\r\n if (typeof opacity !== 'number') return color\r\n let _opacity = opacity * 100\r\n if (!color.startsWith(\"#\")) throw new Error(`color must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AK,IAAI,EAAGA,CAAC,CAAC,EAChCC,EAAI,KAAK,IAAI,IAAK,KAAK,IAAI,EAAGA,CAAC,CAAC,EAChCC,EAAI,KAAK,IAAI,IAAK,KAAK,IAAI,EAAGA,CAAC,CAAC,EAEzB,IAAIF,EAAE,SAAS,EAAE,EAAE,SAAS,EAAG,GAAG,CAAC,GAAGC,EAAE,SAAS,EAAE,EAAE,SAAS,EAAG,GAAG,CAAC,GAAGC,EAAE,SAAS,EAAE,EAAE,SAAS,EAAG,GAAG,CAAC,EAClH,EAEaC,EAAsBC,GAAkB,CACjDA,EAAQA,EAAM,QAAQ,KAAM,EAAE,EAC9B,MAAM,EAAI,SAASA,EAAM,MAAM,EAAG,CAAC,EAAG,EAAE,EAClCH,EAAI,SAASG,EAAM,MAAM,EAAG,CAAC,EAAG,EAAE,EAClCF,EAAI,SAASE,EAAM,MAAM,EAAG,CAAC,EAAG,EAAE,EAGxC,OADmB,KAAQ,EAAI,KAAQH,EAAI,KAAQC,GAAK,IACrC,GAAM,UAAY,SACzC,EAEaG,EAAQ,CAACD,EAAeE,EAAU,IAAM,CACjD,GAAI,OAAOA,GAAY,SAAU,OAAOF,EACxC,IAAIG,EAAWD,EAAU,IACzB,GAAI,CAACF,EAAM,WAAW,GAAG,EAAG,MAAM,IAAI,MAAM,mBAAmB,EAC/D,OAAQA,EAAS,IAAI,KAAK,MAAO,IAAM,IAAOG,CAAQ,EAAE,SAAS,EAAE,CAAC,GAAG,MAAM,EAAE,GAAI,YAAY,CACnG",
6
- "names": ["getValue", "getProps", "aliases", "_css", "breakpoints", "css", "props", "options", "cssOptions", "p", "v", "_c", "dept", "_val", "_p", "adjustColor", "hex", "factor", "r", "g", "b", "adjustTextContrast", "color", "alpha", "opacity", "_opacity"]
7
- }
package/css/types.js DELETED
@@ -1 +0,0 @@
1
- //# sourceMappingURL=types.js.map
package/index.js.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/index.ts"],
4
- "sourcesContent": ["import Tag from './Tag'\r\nimport useTagProps from './Tag/useTagProps'\r\nimport useAnimation from './useAnimation'\r\nimport useColorTemplate from './useColorTemplate'\r\nimport useBreakpoint from './breakpoint/useBreakpoint'\r\nimport useBreakpointProps from './breakpoint/useBreakpointProps'\r\nimport ServerStyleTags from './ServerStyleTags'\r\nimport isWindow from './isWindow'\r\nimport useInterface from './useInterface'\r\nimport Transition from './Transition'\r\n\r\nexport * from './css'\r\nexport * from \"./theme\"\r\nexport * from './css/types'\r\nexport * from './Tag/types'\r\nexport * from './theme/types'\r\nexport * from './useColorTemplate'\r\nexport * from './useAnimation'\r\nexport type * from './Transition'\r\nexport type * from './Tag/types'\r\nexport type { useBreakpointPropsType } from './breakpoint/useBreakpointProps'\r\n\r\nexport {\r\n Tag,\r\n useTagProps,\r\n useAnimation,\r\n Transition,\r\n useColorTemplate,\r\n ServerStyleTags,\r\n useBreakpoint,\r\n useBreakpointProps,\r\n isWindow,\r\n useInterface\r\n}"],
5
- "mappings": "AAAA,OAAOA,MAAS,QAChB,OAAOC,MAAiB,oBACxB,OAAOC,MAAkB,iBACzB,OAAOC,MAAsB,qBAC7B,OAAOC,MAAmB,6BAC1B,OAAOC,MAAwB,kCAC/B,OAAOC,MAAqB,oBAC5B,OAAOC,MAAc,aACrB,OAAOC,MAAkB,iBACzB,OAAOC,MAAgB,eAEvB,WAAc,QACd,WAAc,UACd,WAAc,cACd,WAAc,cACd,WAAc,gBACd,WAAc,qBACd,WAAc",
6
- "names": ["Tag", "useTagProps", "useAnimation", "useColorTemplate", "useBreakpoint", "useBreakpointProps", "ServerStyleTags", "isWindow", "useInterface", "Transition"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/theme/ThemeCssVars.ts"],
4
- "sourcesContent": ["import { ThemeOptions } from \"./types\";\r\n\r\nconst ThemeCssVars = (theme: ThemeOptions) => {\r\n\r\n const shadows: any = {}\r\n theme.shadow.forEach((s, i) => shadows[`--shadow-${i}`] = s)\r\n\r\n return {\r\n \"--bp-xs\": theme.breakpoints.xs,\r\n \"--bp-sm\": theme.breakpoints.sm,\r\n \"--bp-md\": theme.breakpoints.md,\r\n \"--bp-lg\": theme.breakpoints.lg,\r\n \"--bp-xl\": theme.breakpoints.xl,\r\n\r\n \"--font-family\": theme.typography.fontFamily,\r\n \"--font-h1\": `${theme.typography.h1.fontWeight} ${theme.typography.h1.fontSize}px/${theme.typography.h1.lineHeight} ${theme.typography.fontFamily}`,\r\n \"--font-h2\": `${theme.typography.h2.fontWeight} ${theme.typography.h2.fontSize}px/${theme.typography.h2.lineHeight} ${theme.typography.fontFamily}`,\r\n \"--font-h3\": `${theme.typography.h3.fontWeight} ${theme.typography.h3.fontSize}px/${theme.typography.h3.lineHeight} ${theme.typography.fontFamily}`,\r\n \"--font-h4\": `${theme.typography.h4.fontWeight} ${theme.typography.h4.fontSize}px/${theme.typography.h4.lineHeight} ${theme.typography.fontFamily}`,\r\n \"--font-h5\": `${theme.typography.h5.fontWeight} ${theme.typography.h5.fontSize}px/${theme.typography.h5.lineHeight} ${theme.typography.fontFamily}`,\r\n \"--font-h6\": `${theme.typography.h6.fontWeight} ${theme.typography.h6.fontSize}px/${theme.typography.h6.lineHeight} ${theme.typography.fontFamily}`,\r\n \"--font-text\": `${theme.typography.text.fontWeight} ${theme.typography.text.fontSize}px/${theme.typography.text.lineHeight} ${theme.typography.fontFamily}`,\r\n \"--font-button\": `${theme.typography.button.fontWeight} ${theme.typography.button.fontSize}px/${theme.typography.button.lineHeight} ${theme.typography.fontFamily}`,\r\n \"--font-small\": `${theme.typography.small.fontWeight} ${theme.typography.small.fontSize}px/${theme.typography.small.lineHeight} ${theme.typography.fontFamily}`,\r\n\r\n \"--fontsize-h1\": `${theme.typography.h1.fontSize}px`,\r\n \"--fontsize-h2\": `${theme.typography.h2.fontSize}px`,\r\n \"--fontsize-h3\": `${theme.typography.h3.fontSize}px`,\r\n \"--fontsize-h4\": `${theme.typography.h4.fontSize}px`,\r\n \"--fontsize-h5\": `${theme.typography.h5.fontSize}px`,\r\n \"--fontsize-h6\": `${theme.typography.h6.fontSize}px`,\r\n \"--fontsize-text\": `${theme.typography.text.fontSize}px`,\r\n \"--fontsize-button\": `${theme.typography.button.fontSize}px`,\r\n \"--fontsize-small\": `${theme.typography.small.fontSize}px`,\r\n\r\n \"--fontweight-h1\": theme.typography.h1.fontWeight + \"\",\r\n \"--fontweight-h2\": theme.typography.h2.fontWeight + \"\",\r\n \"--fontweight-h3\": theme.typography.h3.fontWeight + \"\",\r\n \"--fontweight-h4\": theme.typography.h4.fontWeight + \"\",\r\n \"--fontweight-h5\": theme.typography.h5.fontWeight + \"\",\r\n \"--fontweight-h6\": theme.typography.h6.fontWeight + \"\",\r\n \"--fontweight-text\": theme.typography.text.fontWeight + \"\",\r\n \"--fontweight-button\": theme.typography.button.fontWeight + \"\",\r\n \"--fontweight-small\": theme.typography.small.fontWeight + \"\",\r\n\r\n \"--lineheight-h1\": theme.typography.h1.lineHeight + \"\",\r\n \"--lineheight-h2\": theme.typography.h2.lineHeight + \"\",\r\n \"--lineheight-h3\": theme.typography.h3.lineHeight + \"\",\r\n \"--lineheight-h4\": theme.typography.h4.lineHeight + \"\",\r\n \"--lineheight-h5\": theme.typography.h5.lineHeight + \"\",\r\n \"--lineheight-h6\": theme.typography.h6.lineHeight + \"\",\r\n \"--lineheight-text\": theme.typography.text.lineHeight + \"\",\r\n \"--lineheight-button\": theme.typography.button.lineHeight + \"\",\r\n \"--lineheight-small\": theme.typography.small.lineHeight + \"\",\r\n\r\n \"--color-text\": theme.colors.text.primary,\r\n \"--color-text-primary\": theme.colors.text.primary,\r\n \"--color-text-secondary\": theme.colors.text.secondary,\r\n\r\n \"--color-background\": theme.colors.background.primary,\r\n \"--color-background-primary\": theme.colors.background.primary,\r\n \"--color-background-secondary\": theme.colors.background.secondary,\r\n \"--color-background-alpha\": theme.colors.background.alpha,\r\n\r\n \"--color-divider\": theme.colors.divider,\r\n\r\n \"--color-brand\": theme.colors.brand.primary,\r\n \"--color-brand-primary\": theme.colors.brand.primary,\r\n \"--color-brand-secondary\": theme.colors.brand.secondary,\r\n \"--color-brand-alpha\": theme.colors.brand.alpha,\r\n \"--color-brand-text\": theme.colors.brand.text,\r\n\r\n \"--color-accent\": theme.colors.accent.primary,\r\n \"--color-accent-primary\": theme.colors.accent.primary,\r\n \"--color-accent-secondary\": theme.colors.accent.secondary,\r\n \"--color-accent-alpha\": theme.colors.accent.alpha,\r\n \"--color-accent-text\": theme.colors.accent.text,\r\n\r\n \"--color-info\": theme.colors.info.primary,\r\n \"--color-info-primary\": theme.colors.info.primary,\r\n \"--color-info-secondary\": theme.colors.info.secondary,\r\n \"--color-info-alpha\": theme.colors.info.alpha,\r\n \"--color-info-text\": theme.colors.info.text,\r\n\r\n \"--color-success\": theme.colors.success.primary,\r\n \"--color-success-primary\": theme.colors.success.primary,\r\n \"--color-success-secondary\": theme.colors.success.secondary,\r\n \"--color-success-alpha\": theme.colors.success.alpha,\r\n \"--color-success-text\": theme.colors.success.text,\r\n\r\n \"--color-warning\": theme.colors.warning.primary,\r\n \"--color-warning-primary\": theme.colors.warning.primary,\r\n \"--color-warning-secondary\": theme.colors.warning.secondary,\r\n \"--color-warning-alpha\": theme.colors.warning.alpha,\r\n \"--color-warning-text\": theme.colors.warning.text,\r\n\r\n \"--color-danger\": theme.colors.danger.primary,\r\n \"--color-danger-primary\": theme.colors.danger.primary,\r\n \"--color-danger-secondary\": theme.colors.danger.secondary,\r\n \"--color-danger-alpha\": theme.colors.danger.alpha,\r\n \"--color-danger-text\": theme.colors.danger.text,\r\n ...shadows,\r\n }\r\n}\r\n\r\n\r\nexport default ThemeCssVars"],
5
- "mappings": "AAEA,MAAMA,EAAgBC,GAAwB,CAE1C,MAAMC,EAAe,CAAC,EACtB,OAAAD,EAAM,OAAO,QAAQ,CAACE,EAAGC,IAAMF,EAAQ,YAAYE,CAAC,EAAE,EAAID,CAAC,EAEpD,CACH,UAAWF,EAAM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AC9C,2BAA4BA,EAAM,OAAO,OAAO,UAChD,uBAAwBA,EAAM,OAAO,OAAO,MAC5C,sBAAuBA,EAAM,OAAO,OAAO,KAC3C,GAAGC,CACP,CACJ,EAGA,IAAOG,EAAQL",
6
- "names": ["ThemeCssVars", "theme", "shadows", "s", "i", "ThemeCssVars_default"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/theme/ThemeDefaultOptions.ts"],
4
- "sourcesContent": ["import { ThemeOptionInput, ThemeTypographyType } from './types'\r\n\r\nexport const lightColorPallete = {\r\n text: {\r\n primary: \"#212B36\",\r\n secondary: \"#637381\",\r\n },\r\n background: {\r\n primary: \"#FFFFFF\",\r\n secondary: \"#EDEFF7\",\r\n },\r\n divider: \"#DADCE0\"\r\n}\r\n\r\nexport const darkColorPallete = {\r\n text: {\r\n primary: \"#FFFFFF\",\r\n secondary: \"#C4CDD5\",\r\n },\r\n background: {\r\n primary: \"#272727\",\r\n secondary: \"#1E1E1E\",\r\n },\r\n divider: \"#3D3D3D\"\r\n}\r\n\r\nexport const ThemeColors = {\r\n ...lightColorPallete,\r\n brand: {\r\n primary: \"#3b82f6\",\r\n secondary: \"#60a5fa\",\r\n text: \"#FFFFFF\"\r\n },\r\n accent: {\r\n primary: \"#14b8a6\",\r\n secondary: \"#2dd4bf\",\r\n text: \"#FFFFFF\"\r\n },\r\n info: {\r\n primary: \"#0ea5e9\",\r\n secondary: \"#60a5fa\",\r\n text: \"#FFFFFF\"\r\n },\r\n success: {\r\n primary: \"#22c55e\",\r\n secondary: \"#4ade80\",\r\n text: \"#FFFFFF\"\r\n },\r\n warning: {\r\n primary: \"#f59e0b\",\r\n secondary: \"#fbbf24\",\r\n text: \"#FFFFFF\"\r\n },\r\n danger: {\r\n primary: \"#ef4444\",\r\n secondary: \"#f87171\",\r\n text: \"#FFFFFF\"\r\n },\r\n}\r\n\r\nexport const ThemeTypography: ThemeTypographyType = {\r\n fontFamily: '\"Inter\",sans-serif,\"Helvetica\",\"Arial\"',\r\n h1: {\r\n fontSize: 47.78,\r\n lineHeight: 1.3,\r\n fontWeight: 400,\r\n },\r\n h2: {\r\n fontSize: 39.81,\r\n lineHeight: 1.35,\r\n fontWeight: 400,\r\n },\r\n h3: {\r\n fontSize: 33.18,\r\n lineHeight: 1.4,\r\n fontWeight: 400,\r\n },\r\n h4: {\r\n fontSize: 27.65,\r\n lineHeight: 1.45,\r\n fontWeight: 400,\r\n },\r\n h5: {\r\n fontSize: 27.65,\r\n lineHeight: 1.5,\r\n fontWeight: 400,\r\n },\r\n h6: {\r\n fontSize: 23.04,\r\n lineHeight: 1.55,\r\n fontWeight: 400,\r\n },\r\n text: {\r\n fontSize: 16,\r\n lineHeight: 1.6,\r\n fontWeight: 400,\r\n },\r\n button: {\r\n fontSize: 13.33,\r\n lineHeight: 1.6,\r\n fontWeight: 500,\r\n },\r\n small: {\r\n fontSize: 12.33,\r\n lineHeight: 1.6,\r\n fontWeight: 400,\r\n }\r\n}\r\n\r\nexport const shadow = [\r\n \"none\",\r\n \"0px 2px 1px -1px rgba(0,0,0,0.2),0px 1px 1px 0px rgba(0,0,0,0.14),0px 1px 3px 0px rgba(0,0,0,0.12)\",\r\n \"0px 3px 1px -2px rgba(0,0,0,0.2),0px 2px 2px 0px rgba(0,0,0,0.14),0px 1px 5px 0px rgba(0,0,0,0.12)\",\r\n \"0px 3px 3px -2px rgba(0,0,0,0.2),0px 3px 4px 0px rgba(0,0,0,0.14),0px 1px 8px 0px rgba(0,0,0,0.12)\",\r\n \"0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)\",\r\n \"0px 3px 5px -1px rgba(0,0,0,0.2),0px 5px 8px 0px rgba(0,0,0,0.14),0px 1px 14px 0px rgba(0,0,0,0.12)\",\r\n \"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)\",\r\n \"0px 4px 5px -2px rgba(0,0,0,0.2),0px 7px 10px 1px rgba(0,0,0,0.14),0px 2px 16px 1px rgba(0,0,0,0.12)\",\r\n \"0px 5px 5px -3px rgba(0,0,0,0.2),0px 8px 10px 1px rgba(0,0,0,0.14),0px 3px 14px 2px rgba(0,0,0,0.12)\",\r\n \"0px 5px 6px -3px rgba(0,0,0,0.2),0px 9px 12px 1px rgba(0,0,0,0.14),0px 3px 16px 2px rgba(0,0,0,0.12)\",\r\n \"0px 6px 6px -3px rgba(0,0,0,0.2),0px 10px 14px 1px rgba(0,0,0,0.14),0px 4px 18px 3px rgba(0,0,0,0.12)\",\r\n \"0px 6px 7px -4px rgba(0,0,0,0.2),0px 11px 15px 1px rgba(0,0,0,0.14),0px 4px 20px 3px rgba(0,0,0,0.12)\",\r\n \"0px 7px 8px -4px rgba(0,0,0,0.2),0px 12px 17px 2px rgba(0,0,0,0.14),0px 5px 22px 4px rgba(0,0,0,0.12)\",\r\n \"0px 7px 8px -4px rgba(0,0,0,0.2),0px 13px 19px 2px rgba(0,0,0,0.14),0px 5px 24px 4px rgba(0,0,0,0.12)\",\r\n \"0px 7px 9px -4px rgba(0,0,0,0.2),0px 14px 21px 2px rgba(0,0,0,0.14),0px 5px 26px 4px rgba(0,0,0,0.12)\",\r\n \"0px 8px 9px -5px rgba(0,0,0,0.2),0px 15px 22px 2px rgba(0,0,0,0.14),0px 6px 28px 5px rgba(0,0,0,0.12)\",\r\n \"0px 8px 10px -5px rgba(0,0,0,0.2),0px 16px 24px 2px rgba(0,0,0,0.14),0px 6px 30px 5px rgba(0,0,0,0.12)\",\r\n \"0px 8px 11px -5px rgba(0,0,0,0.2),0px 17px 26px 2px rgba(0,0,0,0.14),0px 6px 32px 5px rgba(0,0,0,0.12)\",\r\n \"0px 9px 11px -5px rgba(0,0,0,0.2),0px 18px 28px 2px rgba(0,0,0,0.14),0px 7px 34px 6px rgba(0,0,0,0.12)\",\r\n \"0px 9px 12px -6px rgba(0,0,0,0.2),0px 19px 29px 2px rgba(0,0,0,0.14),0px 7px 36px 6px rgba(0,0,0,0.12)\",\r\n \"0px 10px 13px -6px rgba(0,0,0,0.2),0px 20px 31px 3px rgba(0,0,0,0.14),0px 8px 38px 7px rgba(0,0,0,0.12)\",\r\n \"0px 10px 13px -6px rgba(0,0,0,0.2),0px 21px 33px 3px rgba(0,0,0,0.14),0px 8px 40px 7px rgba(0,0,0,0.12)\",\r\n \"0px 10px 14px -6px rgba(0,0,0,0.2),0px 22px 35px 3px rgba(0,0,0,0.14),0px 8px 42px 7px rgba(0,0,0,0.12)\",\r\n \"0px 11px 14px -7px rgba(0,0,0,0.2),0px 23px 36px 3px rgba(0,0,0,0.14),0px 9px 44px 8px rgba(0,0,0,0.12)\",\r\n \"0px 11px 15px -7px rgba(0,0,0,0.2),0px 24px 38px 3px rgba(0,0,0,0.14),0px 9px 46px 8px rgba(0,0,0,0.12)\",\r\n]\r\n\r\nexport default {\r\n name: \"light\",\r\n rtl: false,\r\n shadow,\r\n globalStyle: {},\r\n colors: ThemeColors,\r\n typography: ThemeTypography,\r\n interfaces: {}\r\n} as ThemeOptionInput\r\n"],
5
- "mappings": "AAEO,MAAMA,EAAoB,CAC7B,KAAM,CACF,QAAS,UACT,UAAW,SACf,EACA,WAAY,CACR,QAAS,UACT,UAAW,SACf,EACA,QAAS,SACb,EAEaC,EAAmB,CAC5B,KAAM,CACF,QAAS,UACT,UAAW,SACf,EACA,WAAY,CACR,QAAS,UACT,UAAW,SACf,EACA,QAAS,SACb,EAEaC,EAAc,CACvB,GAAGF,EACH,MAAO,CACH,QAAS,UACT,UAAW,UACX,KAAM,SACV,EACA,OAAQ,CACJ,QAAS,UACT,UAAW,UACX,KAAM,SACV,EACA,KAAM,CACF,QAAS,UACT,UAAW,UACX,KAAM,SACV,EACA,QAAS,CACL,QAAS,UACT,UAAW,UACX,KAAM,SACV,EACA,QAAS,CACL,QAAS,UACT,UAAW,UACX,KAAM,SACV,EACA,OAAQ,CACJ,QAAS,UACT,UAAW,UACX,KAAM,SACV,CACJ,EAEaG,EAAuC,CAChD,WAAY,yCACZ,GAAI,CACA,SAAU,MACV,WAAY,IACZ,WAAY,GAChB,EACA,GAAI,CACA,SAAU,MACV,WAAY,KACZ,WAAY,GAChB,EACA,GAAI,CACA,SAAU,MACV,WAAY,IACZ,WAAY,GAChB,EACA,GAAI,CACA,SAAU,MACV,WAAY,KACZ,WAAY,GAChB,EACA,GAAI,CACA,SAAU,MACV,WAAY,IACZ,WAAY,GAChB,EACA,GAAI,CACA,SAAU,MACV,WAAY,KACZ,WAAY,GAChB,EACA,KAAM,CACF,SAAU,GACV,WAAY,IACZ,WAAY,GAChB,EACA,OAAQ,CACJ,SAAU,MACV,WAAY,IACZ,WAAY,GAChB,EACA,MAAO,CACH,SAAU,MACV,WAAY,IACZ,WAAY,GAChB,CACJ,EAEaC,EAAS,CAClB,OACA,qGACA,qGACA,qGACA,sGACA,sGACA,uGACA,uGACA,uGACA,uGACA,wGACA,wGACA,wGACA,wGACA,wGACA,wGACA,yGACA,yGACA,yGACA,yGACA,0GACA,0GACA,0GACA,0GACA,yGACJ,EAEA,IAAOC,EAAQ,CACX,KAAM,QACN,IAAK,GACL,OAAAD,EACA,YAAa,CAAC,EACd,OAAQF,EACR,WAAYC,EACZ,WAAY,CAAC,CACjB",
6
- "names": ["lightColorPallete", "darkColorPallete", "ThemeColors", "ThemeTypography", "shadow", "ThemeDefaultOptions_default"]
7
- }
@@ -1,2 +0,0 @@
1
- import*as r from"react";import g from"../Tag";import{BreakpointProvider as d}from"../breakpoint";import{ThemeContex as y,ThemeFactory as c}from"./core";import f from"./ThemeCssVars";import{css as t}from"../css";const u=({children:l,theme:e,resetCss:a,scrollbarCss:n,isRootProvider:h,renderIsRoot:m,...p})=>{const o=c.get(e);if(!o)throw new Error(`Invalid theme name provided: ${e}`);return a??=!0,n??=!0,r.useMemo(()=>{if(Object.keys(o.globalStyle).length&&t({"@global":o.globalStyle}),t({"@global":{[`.xui-${e}-theme-root`]:f(o)}}),n&&typeof document<"u"){let s=10,i=o.colors.divider,b=o.colors.background.secondary;t({"@global":{"*":{scrollbarWidth:"thin",scrollbarColor:`${i} ${b}`},"::-webkit-scrollbar":{width:s,height:s},"::-webkit-scrollbar-thumb":{backgroundColor:i,borderRadius:"5px",border:"2px solid #f4f4f4"},"::-webkit-scrollbar-thumb:hover":{backgroundColor:i},"::-webkit-scrollbar-track":{backgroundColor:b,borderRadius:"5px"}}})}a&&t({"@global":{"*":{m:0,p:0,outline:"none",boxSizing:"border-box",verticalAlign:"baseline"},"html, body":{minHeight:"100%","-webkit-font-smoothing":"antialiased"},"img, picture, video, canvas, svg":{maxWidth:"100%",display:"block"},"input, button, textarea, select":{font:"inherit"},table:{borderCollapse:"collapse",borderSpacing:0},"ol, ul":{listStyle:"none"},a:{display:"inline-block"},"p, h1, h2, h3, h4, h5, h6":{overflowWrap:"break-word"}}})},[e]),r.createElement(y.Provider,{value:e},h?r.createElement(d,null,r.createElement(g,{minHeight:"100%",bgcolor:o.colors.background.primary,fontFamily:o.typography.fontFamily,fontSize:o.typography.text.fontSize,fontWeight:o.typography.text.fontWeight,lineHeight:o.typography.text.lineHeight,...p,baseClass:`${e}-theme-root`,direction:o.rtl?"rtl":"ltr"},l,m)):r.createElement(g,{minHeight:"100%",bgcolor:o.colors.background.primary,fontFamily:o.typography.fontFamily,fontSize:o.typography.text.fontSize,fontWeight:o.typography.text.fontWeight,lineHeight:o.typography.text.lineHeight,...p,baseClass:`${e}-theme-root`,direction:o.rtl?"rtl":"ltr"},l))};var z=u;export{z as default};
2
- //# sourceMappingURL=ThemeProvider.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/theme/ThemeProvider.tsx"],
4
- "sourcesContent": ["import * as React from \"react\"\r\nimport { ThemeOptions } from \"./types\"\r\nimport Tag from \"../Tag\"\r\nimport { TagComponentType, TagProps } from \"../Tag/types\"\r\nimport { BreakpointProvider } from \"../breakpoint\"\r\nimport { ThemeContex, ThemeFactory } from \"./core\"\r\nimport ThemeCssVars from \"./ThemeCssVars\"\r\nimport { css } from \"../css\"\r\n\r\nexport type ThemeProviderProps<T extends TagComponentType = 'div'> = TagProps<T> & {\r\n theme: string;\r\n resetCss?: boolean;\r\n scrollbarCss?: boolean;\r\n isRootProvider?: boolean;\r\n renderIsRoot?: React.ReactElement;\r\n}\r\n\r\nconst ThemeProvider = ({ children, theme, resetCss, scrollbarCss, isRootProvider, renderIsRoot, ...props }: ThemeProviderProps) => {\r\n const THEME = ThemeFactory.get(theme) as ThemeOptions\r\n if (!THEME) throw new Error(`Invalid theme name provided: ${theme}`)\r\n resetCss ??= true\r\n scrollbarCss ??= true\r\n\r\n React.useMemo(() => {\r\n if (!!Object.keys(THEME.globalStyle).length) {\r\n css({\r\n \"@global\": THEME.globalStyle\r\n })\r\n }\r\n\r\n css({\r\n \"@global\": {\r\n [`.xui-${theme}-theme-root`]: ThemeCssVars(THEME)\r\n }\r\n })\r\n\r\n if (scrollbarCss && typeof document !== 'undefined') {\r\n let thumbSize = 10\r\n let thumbColor = THEME.colors.divider\r\n let trackColor = THEME.colors.background.secondary\r\n css({\r\n \"@global\": {\r\n \"*\": {\r\n scrollbarWidth: \"thin\",\r\n scrollbarColor: `${thumbColor} ${trackColor}`,\r\n },\r\n \"::-webkit-scrollbar\": {\r\n width: thumbSize,\r\n height: thumbSize,\r\n },\r\n \"::-webkit-scrollbar-thumb\": {\r\n backgroundColor: thumbColor,\r\n borderRadius: \"5px\",\r\n border: \"2px solid #f4f4f4\",\r\n },\r\n \"::-webkit-scrollbar-thumb:hover\": {\r\n backgroundColor: thumbColor,\r\n },\r\n \"::-webkit-scrollbar-track\": {\r\n backgroundColor: trackColor,\r\n borderRadius: \"5px\",\r\n },\r\n }\r\n })\r\n }\r\n\r\n resetCss && css({\r\n \"@global\": {\r\n \"*\": {\r\n m: 0,\r\n p: 0,\r\n outline: \"none\",\r\n boxSizing: \"border-box\",\r\n verticalAlign: \"baseline\",\r\n },\r\n \"html, body\": {\r\n minHeight: \"100%\",\r\n \"-webkit-font-smoothing\": \"antialiased\"\r\n } as any,\r\n \"img, picture, video, canvas, svg\": {\r\n maxWidth: \"100%\",\r\n display: \"block\"\r\n },\r\n \"input, button, textarea, select\": {\r\n font: \"inherit\"\r\n },\r\n \"table\": {\r\n borderCollapse: \"collapse\",\r\n borderSpacing: 0\r\n },\r\n \"ol, ul\": {\r\n listStyle: \"none\"\r\n },\r\n \"a\": {\r\n display: \"inline-block\"\r\n },\r\n \"p, h1, h2, h3, h4, h5, h6\": {\r\n overflowWrap: \"break-word\",\r\n }\r\n }\r\n })\r\n }, [theme])\r\n\r\n return (\r\n <ThemeContex.Provider value={theme}>\r\n {\r\n isRootProvider ? <BreakpointProvider>\r\n <Tag\r\n minHeight=\"100%\"\r\n bgcolor={THEME.colors.background.primary}\r\n fontFamily={THEME.typography.fontFamily}\r\n fontSize={THEME.typography.text.fontSize}\r\n fontWeight={THEME.typography.text.fontWeight}\r\n lineHeight={THEME.typography.text.lineHeight}\r\n {...props}\r\n baseClass={`${theme}-theme-root`}\r\n direction={THEME.rtl ? \"rtl\" : \"ltr\"}\r\n >\r\n {children}\r\n {renderIsRoot}\r\n </Tag>\r\n </BreakpointProvider> : <Tag\r\n minHeight=\"100%\"\r\n bgcolor={THEME.colors.background.primary}\r\n fontFamily={THEME.typography.fontFamily}\r\n fontSize={THEME.typography.text.fontSize}\r\n fontWeight={THEME.typography.text.fontWeight}\r\n lineHeight={THEME.typography.text.lineHeight}\r\n {...props}\r\n baseClass={`${theme}-theme-root`}\r\n direction={THEME.rtl ? \"rtl\" : \"ltr\"}\r\n >\r\n {children}\r\n </Tag>\r\n }\r\n </ThemeContex.Provider>\r\n )\r\n}\r\n\r\nexport default ThemeProvider"],
5
- "mappings": "AAAA,UAAYA,MAAW,QAEvB,OAAOC,MAAS,SAEhB,OAAS,sBAAAC,MAA0B,gBACnC,OAAS,eAAAC,EAAa,gBAAA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d,EACA,EAAK,CACF,QAAS,cACZ,EACA,4BAA6B,CAC1B,aAAc,YACjB,CACH,CACH,CAAC,CACJ,EAAG,CAACG,CAAK,CAAC,EAGPT,EAAA,cAACG,EAAY,SAAZ,CAAqB,MAAOM,GAEvBG,EAAiBZ,EAAA,cAACE,EAAA,KACfF,EAAA,cAACC,EAAA,CACE,UAAU,OACV,QAASc,EAAM,OAAO,WAAW,QACjC,WAAYA,EAAM,WAAW,WAC7B,SAAUA,EAAM,WAAW,KAAK,SAChC,WAAYA,EAAM,WAAW,KAAK,WAClC,WAAYA,EAAM,WAAW,KAAK,WACjC,GAAGD,EACJ,UAAW,GAAGL,CAAK,cACnB,UAAWM,EAAM,IAAM,MAAQ,OAE9BP,EACAK,CACJ,CACH,EAAwBb,EAAA,cAACC,EAAA,CACtB,UAAU,OACV,QAASc,EAAM,OAAO,WAAW,QACjC,WAAYA,EAAM,WAAW,WAC7B,SAAUA,EAAM,WAAW,KAAK,SAChC,WAAYA,EAAM,WAAW,KAAK,WAClC,WAAYA,EAAM,WAAW,KAAK,WACjC,GAAGD,EACJ,UAAW,GAAGL,CAAK,cACnB,UAAWM,EAAM,IAAM,MAAQ,OAE9BP,CACJ,CAEN,CAEN,EAEA,IAAOW,EAAQZ",
6
- "names": ["React", "Tag", "BreakpointProvider", "ThemeContex", "ThemeFactory", "ThemeCssVars", "css", "ThemeProvider", "children", "theme", "resetCss", "scrollbarCss", "isRootProvider", "renderIsRoot", "props", "THEME", "thumbSize", "thumbColor", "trackColor", "ThemeProvider_default"]
7
- }
package/theme/core.js.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/theme/core.ts"],
4
- "sourcesContent": ["import React from \"react\"\r\nimport { ObjectType, ThemeOptions } from \"./types\"\r\n\r\nexport const ThemeFactory = new Map<string, ThemeOptions>()\r\nexport const ThemeContex = React.createContext(\"light\")\r\nexport const getTheme = (theme: string) => ThemeFactory.get(theme)\r\nexport const useTheme = (): ThemeOptions => ThemeFactory.get(React.useContext(ThemeContex)) as any\r\n\r\nexport const mergeObject = (a: ObjectType, b: ObjectType) => {\r\n a = { ...a }\r\n b = { ...b }\r\n for (const key in b) {\r\n const v = (b as any)[key]\r\n if (typeof v === 'object' && !Array.isArray(v) && !React.isValidElement(v)) {\r\n a[key] = mergeObject(a[key], b[key])\r\n } else {\r\n a[key] = v\r\n }\r\n }\r\n return a\r\n}\r\n"],
5
- "mappings": "AAAA,OAAOA,MAAW,QAGX,MAAMC,EAAe,IAAI,IACnBC,EAAcF,EAAM,cAAc,OAAO,EACzCG,EAAYC,GAAkBH,EAAa,IAAIG,CAAK,EACpDC,EAAW,IAAoBJ,EAAa,IAAID,EAAM,WAAWE,CAAW,CAAC,EAE7EI,EAAc,CAACC,EAAeC,IAAkB,CAC1DD,EAAI,CAAE,GAAGA,CAAE,EACXC,EAAI,CAAE,GAAGA,CAAE,EACX,UAAWC,KAAOD,EAAG,CAClB,MAAME,EAAKF,EAAUC,CAAG,EACpB,OAAOC,GAAM,UAAY,CAAC,MAAM,QAAQA,CAAC,GAAK,CAACV,EAAM,eAAeU,CAAC,EACtEH,EAAEE,CAAG,EAAIH,EAAYC,EAAEE,CAAG,EAAGD,EAAEC,CAAG,CAAC,EAEnCF,EAAEE,CAAG,EAAIC,CAEf,CACA,OAAOH,CACV",
6
- "names": ["React", "ThemeFactory", "ThemeContex", "getTheme", "theme", "useTheme", "mergeObject", "a", "b", "key", "v"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/theme/createColor.ts"],
4
- "sourcesContent": ["import { ThemeOptions, ThemeColor } from \"./types\"\r\nimport { alpha } from \"../css\"\r\n\r\nconst createColor = (theme: ThemeOptions, name: keyof ThemeColor) => {\r\n let color = theme.colors[name]\r\n let { primary, secondary } = color as any\r\n let text = (color as any).text || theme.colors.text.primary\r\n let _alpha = alpha(primary, .1)\r\n\r\n const isBag = (a: any, b: any) => name === \"background\" ? a : b\r\n\r\n return {\r\n alpha: _alpha,\r\n template: {\r\n outline: {\r\n bgcolor: \"transparent\",\r\n color: isBag(text, primary),\r\n border: 1,\r\n borderColor: isBag(\"divider\", alpha(primary, .4)),\r\n hover: {\r\n color: isBag(text, primary),\r\n borderColor: isBag(\"divider\", alpha(primary, .8)),\r\n }\r\n },\r\n fill: {\r\n bgcolor: isBag(secondary, primary),\r\n color: text,\r\n hover: {\r\n bgcolor: isBag(alpha(secondary, .6), secondary),\r\n color: text,\r\n }\r\n },\r\n text: {\r\n bgcolor: \"transparent\",\r\n color: isBag(text, primary),\r\n hover: {\r\n bgcolor: isBag(alpha(secondary, .6), alpha(primary, .1)),\r\n color: isBag(text, primary),\r\n }\r\n },\r\n alpha: {\r\n bgcolor: isBag(alpha(secondary, .5), alpha(primary, .1)),\r\n color: isBag(text, primary),\r\n hover: {\r\n bgcolor: isBag(alpha(secondary, .8), alpha(primary, .15)),\r\n color: isBag(text, primary),\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\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
- }