@xanui/core 1.2.34 → 1.2.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AppRoot/Renderar.js +11 -2
- package/AppRoot/Renderar.js.map +1 -1
- package/AppRoot/Renderar.mjs +8 -2
- package/AppRoot/Renderar.mjs.map +1 -1
- package/AppRoot/index.js +22 -3
- package/AppRoot/index.js.map +1 -1
- package/AppRoot/index.mjs +16 -2
- package/AppRoot/index.mjs.map +1 -1
- package/Tag/ServerStyleTag.js +9 -2
- package/Tag/ServerStyleTag.js.map +1 -1
- package/Tag/ServerStyleTag.mjs +7 -2
- package/Tag/ServerStyleTag.mjs.map +1 -1
- package/Tag/cssPropList.js +7 -2
- package/Tag/cssPropList.js.map +1 -1
- package/Tag/cssPropList.mjs +4 -1
- package/Tag/cssPropList.mjs.map +1 -1
- package/Tag/index.js +34 -4
- package/Tag/index.js.map +1 -1
- package/Tag/index.mjs +11 -2
- package/Tag/index.mjs.map +1 -1
- package/Tag/useTagProps.js +13 -3
- package/Tag/useTagProps.js.map +1 -1
- package/Tag/useTagProps.mjs +10 -2
- package/Tag/useTagProps.mjs.map +1 -1
- package/Transition/index.d.ts +3 -7
- package/Transition/index.js +24 -4
- package/Transition/index.js.map +1 -1
- package/Transition/index.mjs +22 -4
- package/Transition/index.mjs.map +1 -1
- package/breakpoint/BreakpointProvider.js +13 -2
- package/breakpoint/BreakpointProvider.js.map +1 -1
- package/breakpoint/BreakpointProvider.mjs +10 -2
- package/breakpoint/BreakpointProvider.mjs.map +1 -1
- package/breakpoint/useBreakpoint.js +11 -2
- package/breakpoint/useBreakpoint.js.map +1 -1
- package/breakpoint/useBreakpoint.mjs +9 -2
- package/breakpoint/useBreakpoint.mjs.map +1 -1
- package/breakpoint/useBreakpointProps.js +11 -3
- package/breakpoint/useBreakpointProps.js.map +1 -1
- package/breakpoint/useBreakpointProps.mjs +8 -2
- package/breakpoint/useBreakpointProps.mjs.map +1 -1
- package/css/aliases.js +7 -2
- package/css/aliases.js.map +1 -1
- package/css/aliases.mjs +4 -1
- package/css/aliases.mjs.map +1 -1
- package/css/getProps.js +7 -2
- package/css/getProps.js.map +1 -1
- package/css/getProps.mjs +4 -1
- package/css/getProps.mjs.map +1 -1
- package/css/getValue.js +7 -2
- package/css/getValue.js.map +1 -1
- package/css/getValue.mjs +4 -1
- package/css/getValue.mjs.map +1 -1
- package/css/index.js +21 -5
- package/css/index.js.map +1 -1
- package/css/index.mjs +10 -2
- package/css/index.mjs.map +1 -1
- package/hooks/useAnimation.js +14 -2
- package/hooks/useAnimation.js.map +1 -1
- package/hooks/useAnimation.mjs +9 -2
- package/hooks/useAnimation.mjs.map +1 -1
- package/hooks/useColorTemplate.js +8 -2
- package/hooks/useColorTemplate.js.map +1 -1
- package/hooks/useColorTemplate.mjs +5 -1
- package/hooks/useColorTemplate.mjs.map +1 -1
- package/hooks/useInterface.js +13 -2
- package/hooks/useInterface.js.map +1 -1
- package/hooks/useInterface.mjs +11 -2
- package/hooks/useInterface.mjs.map +1 -1
- package/hooks/usePortal.js +22 -3
- package/hooks/usePortal.js.map +1 -1
- package/hooks/usePortal.mjs +16 -2
- package/hooks/usePortal.mjs.map +1 -1
- package/hooks/useTransition/index.d.ts +1 -1
- package/hooks/useTransition/index.js +17 -5
- package/hooks/useTransition/index.js.map +1 -1
- package/hooks/useTransition/index.mjs +15 -5
- package/hooks/useTransition/index.mjs.map +1 -1
- package/hooks/useTransition/variants.js +20 -2
- package/hooks/useTransition/variants.js.map +1 -1
- package/hooks/useTransition/variants.mjs +4 -1
- package/hooks/useTransition/variants.mjs.map +1 -1
- package/index.js +53 -1
- package/index.js.map +1 -1
- package/index.mjs +21 -1
- package/index.mjs.map +1 -1
- package/package.json +2 -8
- package/theme/ThemeCssVars.js +7 -2
- package/theme/ThemeCssVars.js.map +1 -1
- package/theme/ThemeCssVars.mjs +4 -1
- package/theme/ThemeCssVars.mjs.map +1 -1
- package/theme/ThemeDefaultOptions.js +54 -44
- package/theme/ThemeDefaultOptions.js.map +1 -1
- package/theme/ThemeDefaultOptions.mjs +48 -44
- package/theme/ThemeDefaultOptions.mjs.map +1 -1
- package/theme/ThemeProvider.js +39 -4
- package/theme/ThemeProvider.js.map +1 -1
- package/theme/ThemeProvider.mjs +16 -2
- package/theme/ThemeProvider.mjs.map +1 -1
- package/theme/core.js +13 -2
- package/theme/core.js.map +1 -1
- package/theme/core.mjs +7 -2
- package/theme/core.mjs.map +1 -1
- package/theme/createTheme.js +11 -2
- package/theme/createTheme.js.map +1 -1
- package/theme/createTheme.mjs +9 -2
- package/theme/createTheme.mjs.map +1 -1
- package/theme/createThemeSwitcher.js +11 -2
- package/theme/createThemeSwitcher.js.map +1 -1
- package/theme/createThemeSwitcher.mjs +9 -2
- package/theme/createThemeSwitcher.mjs.map +1 -1
- package/theme/index.js +15 -1
- package/theme/index.js.map +1 -1
- package/theme/index.mjs +10 -1
- package/theme/index.mjs.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeDefaultOptions.js","sources":["../../src/theme/ThemeDefaultOptions.ts"],"sourcesContent":["import { createTheme } from './createTheme'\nimport { ThemeOptionInput, ThemeTypographyType } from './types'\n\nexport const lightShadows = [\n \"none\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\n]\n\nexport const darkShadows = [\n \"none\",\n \"0px 2px 1px -1px rgba(255,255,255,0.05),0px 1px 1px 0px rgba(255,255,255,0.04),0px 1px 3px 0px rgba(255,255,255,0.03)\",\n \"0px 3px 1px -2px rgba(255,255,255,0.05),0px 2px 2px 0px rgba(255,255,255,0.04),0px 1px 5px 0px rgba(255,255,255,0.03)\",\n \"0px 3px 3px -2px rgba(255,255,255,0.05),0px 3px 4px 0px rgba(255,255,255,0.04),0px 1px 8px 0px rgba(255,255,255,0.03)\",\n \"0px 2px 4px -1px rgba(255,255,255,0.05),0px 4px 5px 0px rgba(255,255,255,0.04),0px 1px 10px 0px rgba(255,255,255,0.03)\",\n \"0px 3px 5px -1px rgba(255,255,255,0.05),0px 5px 8px 0px rgba(255,255,255,0.04),0px 1px 14px 0px rgba(255,255,255,0.03)\",\n \"0px 3px 5px -1px rgba(255,255,255,0.05),0px 6px 10px 0px rgba(255,255,255,0.04),0px 1px 18px 0px rgba(255,255,255,0.03)\",\n \"0px 4px 5px -2px rgba(255,255,255,0.05),0px 7px 10px 1px rgba(255,255,255,0.04),0px 2px 16px 1px rgba(255,255,255,0.03)\",\n \"0px 5px 5px -3px rgba(255,255,255,0.05),0px 8px 10px 1px rgba(255,255,255,0.04),0px 3px 14px 2px rgba(255,255,255,0.03)\",\n \"0px 5px 6px -3px rgba(255,255,255,0.05),0px 9px 12px 1px rgba(255,255,255,0.04),0px 3px 16px 2px rgba(255,255,255,0.03)\",\n \"0px 6px 6px -3px rgba(255,255,255,0.05),0px 10px 14px 1px rgba(255,255,255,0.04),0px 4px 18px 3px rgba(255,255,255,0.03)\",\n \"0px 6px 7px -4px rgba(255,255,255,0.05),0px 11px 15px 1px rgba(255,255,255,0.04),0px 4px 20px 3px rgba(255,255,255,0.03)\",\n \"0px 7px 8px -4px rgba(255,255,255,0.05),0px 12px 17px 2px rgba(255,255,255,0.04),0px 5px 22px 4px rgba(255,255,255,0.03)\",\n \"0px 7px 8px -4px rgba(255,255,255,0.05),0px 13px 19px 2px rgba(255,255,255,0.04),0px 5px 24px 4px rgba(255,255,255,0.03)\",\n \"0px 7px 9px -4px rgba(255,255,255,0.05),0px 14px 21px 2px rgba(255,255,255,0.04),0px 5px 26px 4px rgba(255,255,255,0.03)\",\n \"0px 8px 9px -5px rgba(255,255,255,0.05),0px 15px 22px 2px rgba(255,255,255,0.04),0px 6px 28px 5px rgba(255,255,255,0.03)\",\n \"0px 8px 10px -5px rgba(255,255,255,0.05),0px 16px 24px 2px rgba(255,255,255,0.04),0px 6px 30px 5px rgba(255,255,255,0.03)\",\n \"0px 8px 11px -5px rgba(255,255,255,0.05),0px 17px 26px 2px rgba(255,255,255,0.04),0px 6px 32px 5px rgba(255,255,255,0.03)\",\n \"0px 9px 11px -5px rgba(255,255,255,0.05),0px 18px 28px 2px rgba(255,255,255,0.04),0px 7px 34px 6px rgba(255,255,255,0.03)\",\n \"0px 9px 12px -6px rgba(255,255,255,0.05),0px 19px 29px 2px rgba(255,255,255,0.04),0px 7px 36px 6px rgba(255,255,255,0.03)\",\n \"0px 10px 13px -6px rgba(255,255,255,0.05),0px 20px 31px 3px rgba(255,255,255,0.04),0px 8px 38px 7px rgba(255,255,255,0.03)\",\n \"0px 10px 13px -6px rgba(255,255,255,0.05),0px 21px 33px 3px rgba(255,255,255,0.04),0px 8px 40px 7px rgba(255,255,255,0.03)\",\n \"0px 10px 14px -6px rgba(255,255,255,0.05),0px 22px 35px 3px rgba(255,255,255,0.04),0px 8px 42px 7px rgba(255,255,255,0.03)\",\n \"0px 11px 14px -7px rgba(255,255,255,0.05),0px 23px 36px 3px rgba(255,255,255,0.04),0px 9px 44px 8px rgba(255,255,255,0.03)\",\n \"0px 11px 15px -7px rgba(255,255,255,0.05),0px 24px 38px 3px rgba(255,255,255,0.04),0px 9px 46px 8px rgba(255,255,255,0.03)\",\n]\n\nexport const ThemeTypography: ThemeTypographyType = {\n h1: { fontSize: 48, lineHeight: 1.3, fontWeight: 600 }, // bolder for emphasis\n h2: { fontSize: 40, lineHeight: 1.35, fontWeight: 500 },\n h3: { fontSize: 34, lineHeight: 1.4, fontWeight: 500 },\n h4: { fontSize: 28, lineHeight: 1.45, fontWeight: 500 },\n h5: { fontSize: 24, lineHeight: 1.5, fontWeight: 500 },\n h6: { fontSize: 20, lineHeight: 1.55, fontWeight: 500 },\n big: { fontSize: 18, lineHeight: 1.6, fontWeight: 400 },\n text: { fontSize: 16, lineHeight: 1.6, fontWeight: 400 },\n button: { fontSize: 14, lineHeight: 1.6, fontWeight: 500 },\n small: { fontSize: 12, lineHeight: 1.6, fontWeight: 400 },\n}\n\nexport const lightThemeOptions: ThemeOptionInput = {\n name: \"light\",\n rtl: false,\n shadow: lightShadows,\n globalStyle: {},\n colors: {\n background: {\n primary: \"#FFFFFF\", // main app background\n secondary: \"#F3F4F6\", // slightly darker surface for sections/cards\n },\n\n divider: {\n primary: \"#E5E7EB\", // soft divider, visible on #FFFFFF\n secondary: \"#D1D5DB\", // stronger divider for emphasis\n },\n\n text: {\n primary: \"#111827\",\n secondary: \"#6B7280\",\n },\n\n brand: {\n primary: \"#2563EB\",\n secondary: \"#1D4ED8\",\n text: \"#F9FAFB\",\n },\n\n accent: {\n primary: \"#7C3AED\",\n secondary: \"#6D28D9\",\n text: \"#F9FAFB\",\n },\n\n success: {\n primary: \"#16A34A\",\n secondary: \"#15803D\",\n text: \"#F9FAFB\",\n },\n\n info: {\n primary: \"#2563EB\",\n secondary: \"#1D4ED8\",\n text: \"#F9FAFB\",\n },\n\n warning: {\n primary: \"#D97706\",\n secondary: \"#B45309\",\n text: \"#FFFBEB\",\n },\n\n danger: {\n primary: \"#DC2626\",\n secondary: \"#B91C1C\",\n text: \"#FEF2F2\",\n },\n },\n typography: ThemeTypography,\n interfaces: {}\n} as ThemeOptionInput\n\n\nexport const createDefaultThemes = () => {\n createTheme(\"light\", {})\n createTheme(\"dark\", {\n shadow: darkShadows,\n colors: {\n background: {\n primary: \"#121212\",\n secondary: \"#1E1E1E\",\n },\n\n divider: {\n primary: \"#262626\",\n secondary: \"#2E2E2E\",\n },\n\n text: {\n primary: \"#F3F4F6\", // main readable text\n secondary: \"#9CA3AF\", // muted / secondary text\n },\n\n brand: {\n primary: \"#1D4ED8\",\n secondary: \"#2563EB\",\n text: \"#F9FAFB\",\n },\n\n accent: {\n primary: \"#6D28D9\",\n secondary: \"#7C3AED\",\n text: \"#F9FAFB\",\n },\n\n success: {\n primary: \"#15803D\",\n secondary: \"#16A34A\",\n text: \"#F9FAFB\",\n },\n\n info: {\n primary: \"#1D4ED8\",\n secondary: \"#2563EB\",\n text: \"#F9FAFB\",\n },\n\n warning: {\n primary: \"#B45309\",\n secondary: \"#D97706\",\n text: \"#FFFBEB\",\n },\n\n danger: {\n primary: \"#B91C1C\",\n secondary: \"#DC2626\",\n text: \"#FEF2F2\",\n },\n }\n })\n}"],"names":["createTheme"],"mappings":"kHAGO,MAAM,YAAY,GAAG;IACxB,MAA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A,SAAS,EAAE,SAAS;AACpB,gBAAA,IAAI,EAAE,SAAS;AAClB,aAAA;AAED,YAAA,OAAO,EAAE;AACL,gBAAA,OAAO,EAAE,SAAS;AAClB,gBAAA,SAAS,EAAE,SAAS;AACpB,gBAAA,IAAI,EAAE,SAAS;AAClB,aAAA;AAED,YAAA,IAAI,EAAE;AACF,gBAAA,OAAO,EAAE,SAAS;AAClB,gBAAA,SAAS,EAAE,SAAS;AACpB,gBAAA,IAAI,EAAE,SAAS;AAClB,aAAA;AAED,YAAA,OAAO,EAAE;AACL,gBAAA,OAAO,EAAE,SAAS;AAClB,gBAAA,SAAS,EAAE,SAAS;AACpB,gBAAA,IAAI,EAAE,SAAS;AAClB,aAAA;AAED,YAAA,MAAM,EAAE;AACJ,gBAAA,OAAO,EAAE,SAAS;AAClB,gBAAA,SAAS,EAAE,SAAS;AACpB,gBAAA,IAAI,EAAE,SAAS;AAClB,aAAA;AACJ;AACJ,KAAA,CAAC;AACN"}
|
|
1
|
+
{"version":3,"file":"ThemeDefaultOptions.js","sources":["../../src/theme/ThemeDefaultOptions.ts"],"sourcesContent":["import { createTheme } from './createTheme'\nimport { ThemeOptionInput, ThemeTypographyType } from './types'\n\nexport const lightShadows = [\n \"none\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\n]\n\nexport const darkShadows = [\n \"none\",\n\n \"0px 1px 2px rgba(0,0,0,0.65), inset 0px 1px 0px rgba(255,255,255,0.04)\",\n \"0px 2px 3px rgba(0,0,0,0.68), inset 0px 1px 0px rgba(255,255,255,0.04)\",\n \"0px 2px 4px rgba(0,0,0,0.7), inset 0px 1px 0px rgba(255,255,255,0.05)\",\n \"0px 3px 5px rgba(0,0,0,0.72), inset 0px 1px 0px rgba(255,255,255,0.05)\",\n\n \"0px 4px 6px rgba(0,0,0,0.75), inset 0px 1px 0px rgba(255,255,255,0.05)\",\n \"0px 5px 8px rgba(0,0,0,0.78), inset 0px 1px 0px rgba(255,255,255,0.06)\",\n \"0px 6px 10px rgba(0,0,0,0.8), inset 0px 1px 0px rgba(255,255,255,0.06)\",\n \"0px 7px 12px rgba(0,0,0,0.82), inset 0px 1px 0px rgba(255,255,255,0.06)\",\n \"0px 8px 14px rgba(0,0,0,0.84), inset 0px 1px 0px rgba(255,255,255,0.06)\",\n\n \"0px 9px 16px rgba(0,0,0,0.86), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n \"0px 10px 18px rgba(0,0,0,0.88), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n \"0px 11px 20px rgba(0,0,0,0.89), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n \"0px 12px 22px rgba(0,0,0,0.9), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n \"0px 13px 24px rgba(0,0,0,0.91), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n\n \"0px 14px 26px rgba(0,0,0,0.92), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 15px 28px rgba(0,0,0,0.93), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 16px 30px rgba(0,0,0,0.94), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 18px 32px rgba(0,0,0,0.95), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 20px 34px rgba(0,0,0,0.95), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n\n \"0px 22px 36px rgba(0,0,0,0.96), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 24px 38px rgba(0,0,0,0.97), inset 0px 1px 0px rgba(255,255,255,0.09)\",\n \"0px 26px 40px rgba(0,0,0,0.98), inset 0px 1px 0px rgba(255,255,255,0.09)\",\n \"0px 28px 42px rgba(0,0,0,0.99), inset 0px 1px 0px rgba(255,255,255,0.1)\",\n]\n\n\n\nexport const ThemeTypography: ThemeTypographyType = {\n h1: { fontSize: 48, lineHeight: 1.3, fontWeight: 600 }, // bolder for emphasis\n h2: { fontSize: 40, lineHeight: 1.35, fontWeight: 500 },\n h3: { fontSize: 34, lineHeight: 1.4, fontWeight: 500 },\n h4: { fontSize: 28, lineHeight: 1.45, fontWeight: 500 },\n h5: { fontSize: 24, lineHeight: 1.5, fontWeight: 500 },\n h6: { fontSize: 20, lineHeight: 1.55, fontWeight: 500 },\n big: { fontSize: 18, lineHeight: 1.6, fontWeight: 400 },\n text: { fontSize: 16, lineHeight: 1.6, fontWeight: 400 },\n button: { fontSize: 14, lineHeight: 1.6, fontWeight: 500 },\n small: { fontSize: 12, lineHeight: 1.6, fontWeight: 400 },\n}\n\nexport const lightThemeOptions: ThemeOptionInput = {\n name: \"light\",\n rtl: false,\n shadow: lightShadows,\n globalStyle: {},\n colors: {\n background: {\n primary: \"#FFFFFF\", // main app background\n secondary: \"#F3F4F6\", // slightly darker surface for sections/cards\n },\n\n divider: {\n primary: \"#E5E7EB\", // soft divider, visible on #FFFFFF\n secondary: \"#D1D5DB\", // stronger divider for emphasis\n },\n\n text: {\n primary: \"#111827\",\n secondary: \"#6B7280\",\n },\n\n brand: {\n primary: \"#2563EB\",\n secondary: \"#1D4ED8\",\n text: \"#F9FAFB\",\n },\n\n accent: {\n primary: \"#7C3AED\",\n secondary: \"#6D28D9\",\n text: \"#F9FAFB\",\n },\n\n success: {\n primary: \"#16A34A\",\n secondary: \"#15803D\",\n text: \"#F9FAFB\",\n },\n\n info: {\n primary: \"#2563EB\",\n secondary: \"#1D4ED8\",\n text: \"#F9FAFB\",\n },\n\n warning: {\n primary: \"#D97706\",\n secondary: \"#B45309\",\n text: \"#FFFBEB\",\n },\n\n danger: {\n primary: \"#DC2626\",\n secondary: \"#B91C1C\",\n text: \"#FEF2F2\",\n },\n },\n typography: ThemeTypography,\n interfaces: {}\n} as ThemeOptionInput\n\n\nexport const createDefaultThemes = () => {\n createTheme(\"light\", {})\n createTheme(\"dark\", {\n shadow: darkShadows,\n colors: {\n background: {\n primary: \"#121212\",\n secondary: \"#1E1E1E\",\n },\n\n divider: {\n primary: \"#262626\",\n secondary: \"#2E2E2E\",\n },\n\n text: {\n primary: \"#F3F4F6\", // main readable text\n secondary: \"#9CA3AF\", // muted / secondary text\n },\n\n brand: {\n primary: \"#3F5AE0\",\n secondary: \"#5F78F0\",\n text: \"#0B1220\",\n },\n\n accent: {\n primary: \"#6B4FE8\",\n secondary: \"#856FF2\",\n text: \"#0C0824\",\n },\n\n\n success: {\n primary: \"#22985A\",\n secondary: \"#3AB97C\",\n text: \"#052A18\",\n },\n\n info: {\n primary: \"#3F70E0\",\n secondary: \"#5F8CE8\",\n text: \"#0A1024\",\n },\n\n\n warning: {\n primary: \"#B7832B\",\n secondary: \"#D09B45\",\n text: \"#1F1304\",\n },\n\n danger: {\n primary: \"#C44040\",\n secondary: \"#DE6161\",\n text: \"#2A0808\",\n },\n }\n })\n}"],"names":["createTheme"],"mappings":";;;;AAGO,MAAM,YAAY,GAAG;IACxB,MAAM;IACN,oGAAoG;IACpG,oGAAoG;IACpG,oGAAoG;IACpG,qGAAqG;IACrG,qGAAqG;IACrG,sGAAsG;IACtG,sGAAsG;IACtG,sGAAsG;IACtG,sGAAsG;IACtG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,wGAAwG;IACxG,wGAAwG;IACxG,wGAAwG;IACxG,wGAAwG;IACxG,yGAAyG;IACzG,yGAAyG;IACzG,yGAAyG;IACzG,yGAAyG;IACzG,yGAAyG;;AAGtG,MAAM,WAAW,GAAG;IACvB,MAAM;IAEN,wEAAwE;IACxE,wEAAwE;IACxE,uEAAuE;IACvE,wEAAwE;IAExE,wEAAwE;IACxE,wEAAwE;IACxE,wEAAwE;IACxE,yEAAyE;IACzE,yEAAyE;IAEzE,yEAAyE;IACzE,0EAA0E;IAC1E,0EAA0E;IAC1E,yEAAyE;IACzE,0EAA0E;IAE1E,0EAA0E;IAC1E,0EAA0E;IAC1E,0EAA0E;IAC1E,0EAA0E;IAC1E,0EAA0E;IAE1E,0EAA0E;IAC1E,0EAA0E;IAC1E,0EAA0E;IAC1E,yEAAyE;;AAKtE,MAAM,eAAe,GAAwB;AAChD,IAAA,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE;AACtD,I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gBAAA,OAAO,EAAE,SAAS;AAClB,gBAAA,SAAS,EAAE,SAAS;AACvB,aAAA;AAED,YAAA,IAAI,EAAE;gBACF,OAAO,EAAE,SAAS;gBAClB,SAAS,EAAE,SAAS;AACvB,aAAA;AAED,YAAA,KAAK,EAAE;AACH,gBAAA,OAAO,EAAE,SAAS;AAClB,gBAAA,SAAS,EAAE,SAAS;AACpB,gBAAA,IAAI,EAAE,SAAS;AAClB,aAAA;AAED,YAAA,MAAM,EAAE;AACJ,gBAAA,OAAO,EAAE,SAAS;AAClB,gBAAA,SAAS,EAAE,SAAS;AACpB,gBAAA,IAAI,EAAE,SAAS;AAClB,aAAA;AAGD,YAAA,OAAO,EAAE;AACL,gBAAA,OAAO,EAAE,SAAS;AAClB,gBAAA,SAAS,EAAE,SAAS;AACpB,gBAAA,IAAI,EAAE,SAAS;AAClB,aAAA;AAED,YAAA,IAAI,EAAE;AACF,gBAAA,OAAO,EAAE,SAAS;AAClB,gBAAA,SAAS,EAAE,SAAS;AACpB,gBAAA,IAAI,EAAE,SAAS;AAClB,aAAA;AAGD,YAAA,OAAO,EAAE;AACL,gBAAA,OAAO,EAAE,SAAS;AAClB,gBAAA,SAAS,EAAE,SAAS;AACpB,gBAAA,IAAI,EAAE,SAAS;AAClB,aAAA;AAED,YAAA,MAAM,EAAE;AACJ,gBAAA,OAAO,EAAE,SAAS;AAClB,gBAAA,SAAS,EAAE,SAAS;AACpB,gBAAA,IAAI,EAAE,SAAS;AAClB,aAAA;AACJ;AACJ,KAAA,CAAC;AACN;;;;;;;;"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {createTheme}from'./createTheme.mjs';
|
|
1
|
+
import { createTheme } from './createTheme.mjs';
|
|
2
|
+
|
|
3
|
+
const lightShadows = [
|
|
2
4
|
"none",
|
|
3
5
|
"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)",
|
|
4
6
|
"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)",
|
|
@@ -27,30 +29,29 @@ import {createTheme}from'./createTheme.mjs';const lightShadows = [
|
|
|
27
29
|
];
|
|
28
30
|
const darkShadows = [
|
|
29
31
|
"none",
|
|
30
|
-
"0px
|
|
31
|
-
"0px 3px
|
|
32
|
-
"0px
|
|
33
|
-
"0px
|
|
34
|
-
"0px
|
|
35
|
-
"0px
|
|
36
|
-
"0px
|
|
37
|
-
"0px
|
|
38
|
-
"0px
|
|
39
|
-
"0px
|
|
40
|
-
"0px
|
|
41
|
-
"0px
|
|
42
|
-
"0px
|
|
43
|
-
"0px
|
|
44
|
-
"0px
|
|
45
|
-
"0px
|
|
46
|
-
"0px
|
|
47
|
-
"0px
|
|
48
|
-
"0px
|
|
49
|
-
"0px
|
|
50
|
-
"0px
|
|
51
|
-
"0px
|
|
52
|
-
"0px
|
|
53
|
-
"0px 11px 15px -7px rgba(255,255,255,0.05),0px 24px 38px 3px rgba(255,255,255,0.04),0px 9px 46px 8px rgba(255,255,255,0.03)",
|
|
32
|
+
"0px 1px 2px rgba(0,0,0,0.65), inset 0px 1px 0px rgba(255,255,255,0.04)",
|
|
33
|
+
"0px 2px 3px rgba(0,0,0,0.68), inset 0px 1px 0px rgba(255,255,255,0.04)",
|
|
34
|
+
"0px 2px 4px rgba(0,0,0,0.7), inset 0px 1px 0px rgba(255,255,255,0.05)",
|
|
35
|
+
"0px 3px 5px rgba(0,0,0,0.72), inset 0px 1px 0px rgba(255,255,255,0.05)",
|
|
36
|
+
"0px 4px 6px rgba(0,0,0,0.75), inset 0px 1px 0px rgba(255,255,255,0.05)",
|
|
37
|
+
"0px 5px 8px rgba(0,0,0,0.78), inset 0px 1px 0px rgba(255,255,255,0.06)",
|
|
38
|
+
"0px 6px 10px rgba(0,0,0,0.8), inset 0px 1px 0px rgba(255,255,255,0.06)",
|
|
39
|
+
"0px 7px 12px rgba(0,0,0,0.82), inset 0px 1px 0px rgba(255,255,255,0.06)",
|
|
40
|
+
"0px 8px 14px rgba(0,0,0,0.84), inset 0px 1px 0px rgba(255,255,255,0.06)",
|
|
41
|
+
"0px 9px 16px rgba(0,0,0,0.86), inset 0px 1px 0px rgba(255,255,255,0.07)",
|
|
42
|
+
"0px 10px 18px rgba(0,0,0,0.88), inset 0px 1px 0px rgba(255,255,255,0.07)",
|
|
43
|
+
"0px 11px 20px rgba(0,0,0,0.89), inset 0px 1px 0px rgba(255,255,255,0.07)",
|
|
44
|
+
"0px 12px 22px rgba(0,0,0,0.9), inset 0px 1px 0px rgba(255,255,255,0.07)",
|
|
45
|
+
"0px 13px 24px rgba(0,0,0,0.91), inset 0px 1px 0px rgba(255,255,255,0.07)",
|
|
46
|
+
"0px 14px 26px rgba(0,0,0,0.92), inset 0px 1px 0px rgba(255,255,255,0.08)",
|
|
47
|
+
"0px 15px 28px rgba(0,0,0,0.93), inset 0px 1px 0px rgba(255,255,255,0.08)",
|
|
48
|
+
"0px 16px 30px rgba(0,0,0,0.94), inset 0px 1px 0px rgba(255,255,255,0.08)",
|
|
49
|
+
"0px 18px 32px rgba(0,0,0,0.95), inset 0px 1px 0px rgba(255,255,255,0.08)",
|
|
50
|
+
"0px 20px 34px rgba(0,0,0,0.95), inset 0px 1px 0px rgba(255,255,255,0.08)",
|
|
51
|
+
"0px 22px 36px rgba(0,0,0,0.96), inset 0px 1px 0px rgba(255,255,255,0.08)",
|
|
52
|
+
"0px 24px 38px rgba(0,0,0,0.97), inset 0px 1px 0px rgba(255,255,255,0.09)",
|
|
53
|
+
"0px 26px 40px rgba(0,0,0,0.98), inset 0px 1px 0px rgba(255,255,255,0.09)",
|
|
54
|
+
"0px 28px 42px rgba(0,0,0,0.99), inset 0px 1px 0px rgba(255,255,255,0.1)",
|
|
54
55
|
];
|
|
55
56
|
const ThemeTypography = {
|
|
56
57
|
h1: { fontSize: 48, lineHeight: 1.3, fontWeight: 600 }, // bolder for emphasis
|
|
@@ -134,35 +135,38 @@ const createDefaultThemes = () => {
|
|
|
134
135
|
secondary: "#9CA3AF", // muted / secondary text
|
|
135
136
|
},
|
|
136
137
|
brand: {
|
|
137
|
-
primary: "#
|
|
138
|
-
secondary: "#
|
|
139
|
-
text: "#
|
|
138
|
+
primary: "#3F5AE0",
|
|
139
|
+
secondary: "#5F78F0",
|
|
140
|
+
text: "#0B1220",
|
|
140
141
|
},
|
|
141
142
|
accent: {
|
|
142
|
-
primary: "#
|
|
143
|
-
secondary: "#
|
|
144
|
-
text: "#
|
|
143
|
+
primary: "#6B4FE8",
|
|
144
|
+
secondary: "#856FF2",
|
|
145
|
+
text: "#0C0824",
|
|
145
146
|
},
|
|
146
147
|
success: {
|
|
147
|
-
primary: "#
|
|
148
|
-
secondary: "#
|
|
149
|
-
text: "#
|
|
148
|
+
primary: "#22985A",
|
|
149
|
+
secondary: "#3AB97C",
|
|
150
|
+
text: "#052A18",
|
|
150
151
|
},
|
|
151
152
|
info: {
|
|
152
|
-
primary: "#
|
|
153
|
-
secondary: "#
|
|
154
|
-
text: "#
|
|
153
|
+
primary: "#3F70E0",
|
|
154
|
+
secondary: "#5F8CE8",
|
|
155
|
+
text: "#0A1024",
|
|
155
156
|
},
|
|
156
157
|
warning: {
|
|
157
|
-
primary: "#
|
|
158
|
-
secondary: "#
|
|
159
|
-
text: "#
|
|
158
|
+
primary: "#B7832B",
|
|
159
|
+
secondary: "#D09B45",
|
|
160
|
+
text: "#1F1304",
|
|
160
161
|
},
|
|
161
162
|
danger: {
|
|
162
|
-
primary: "#
|
|
163
|
-
secondary: "#
|
|
164
|
-
text: "#
|
|
163
|
+
primary: "#C44040",
|
|
164
|
+
secondary: "#DE6161",
|
|
165
|
+
text: "#2A0808",
|
|
165
166
|
},
|
|
166
167
|
}
|
|
167
168
|
});
|
|
168
|
-
};
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
export { ThemeTypography, createDefaultThemes, darkShadows, lightShadows, lightThemeOptions };
|
|
172
|
+
//# sourceMappingURL=ThemeDefaultOptions.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeDefaultOptions.mjs","sources":["../../src/theme/ThemeDefaultOptions.ts"],"sourcesContent":["import { createTheme } from './createTheme'\nimport { ThemeOptionInput, ThemeTypographyType } from './types'\n\nexport const lightShadows = [\n \"none\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\n]\n\nexport const darkShadows = [\n \"none\",\n \"0px 2px 1px -1px rgba(255,255,255,0.05),0px 1px 1px 0px rgba(255,255,255,0.04),0px 1px 3px 0px rgba(255,255,255,0.03)\",\n \"0px 3px 1px -2px rgba(255,255,255,0.05),0px 2px 2px 0px rgba(255,255,255,0.04),0px 1px 5px 0px rgba(255,255,255,0.03)\",\n \"0px 3px 3px -2px rgba(255,255,255,0.05),0px 3px 4px 0px rgba(255,255,255,0.04),0px 1px 8px 0px rgba(255,255,255,0.03)\",\n \"0px 2px 4px -1px rgba(255,255,255,0.05),0px 4px 5px 0px rgba(255,255,255,0.04),0px 1px 10px 0px rgba(255,255,255,0.03)\",\n \"0px 3px 5px -1px rgba(255,255,255,0.05),0px 5px 8px 0px rgba(255,255,255,0.04),0px 1px 14px 0px rgba(255,255,255,0.03)\",\n \"0px 3px 5px -1px rgba(255,255,255,0.05),0px 6px 10px 0px rgba(255,255,255,0.04),0px 1px 18px 0px rgba(255,255,255,0.03)\",\n \"0px 4px 5px -2px rgba(255,255,255,0.05),0px 7px 10px 1px rgba(255,255,255,0.04),0px 2px 16px 1px rgba(255,255,255,0.03)\",\n \"0px 5px 5px -3px rgba(255,255,255,0.05),0px 8px 10px 1px rgba(255,255,255,0.04),0px 3px 14px 2px rgba(255,255,255,0.03)\",\n \"0px 5px 6px -3px rgba(255,255,255,0.05),0px 9px 12px 1px rgba(255,255,255,0.04),0px 3px 16px 2px rgba(255,255,255,0.03)\",\n \"0px 6px 6px -3px rgba(255,255,255,0.05),0px 10px 14px 1px rgba(255,255,255,0.04),0px 4px 18px 3px rgba(255,255,255,0.03)\",\n \"0px 6px 7px -4px rgba(255,255,255,0.05),0px 11px 15px 1px rgba(255,255,255,0.04),0px 4px 20px 3px rgba(255,255,255,0.03)\",\n \"0px 7px 8px -4px rgba(255,255,255,0.05),0px 12px 17px 2px rgba(255,255,255,0.04),0px 5px 22px 4px rgba(255,255,255,0.03)\",\n \"0px 7px 8px -4px rgba(255,255,255,0.05),0px 13px 19px 2px rgba(255,255,255,0.04),0px 5px 24px 4px rgba(255,255,255,0.03)\",\n \"0px 7px 9px -4px rgba(255,255,255,0.05),0px 14px 21px 2px rgba(255,255,255,0.04),0px 5px 26px 4px rgba(255,255,255,0.03)\",\n \"0px 8px 9px -5px rgba(255,255,255,0.05),0px 15px 22px 2px rgba(255,255,255,0.04),0px 6px 28px 5px rgba(255,255,255,0.03)\",\n \"0px 8px 10px -5px rgba(255,255,255,0.05),0px 16px 24px 2px rgba(255,255,255,0.04),0px 6px 30px 5px rgba(255,255,255,0.03)\",\n \"0px 8px 11px -5px rgba(255,255,255,0.05),0px 17px 26px 2px rgba(255,255,255,0.04),0px 6px 32px 5px rgba(255,255,255,0.03)\",\n \"0px 9px 11px -5px rgba(255,255,255,0.05),0px 18px 28px 2px rgba(255,255,255,0.04),0px 7px 34px 6px rgba(255,255,255,0.03)\",\n \"0px 9px 12px -6px rgba(255,255,255,0.05),0px 19px 29px 2px rgba(255,255,255,0.04),0px 7px 36px 6px rgba(255,255,255,0.03)\",\n \"0px 10px 13px -6px rgba(255,255,255,0.05),0px 20px 31px 3px rgba(255,255,255,0.04),0px 8px 38px 7px rgba(255,255,255,0.03)\",\n \"0px 10px 13px -6px rgba(255,255,255,0.05),0px 21px 33px 3px rgba(255,255,255,0.04),0px 8px 40px 7px rgba(255,255,255,0.03)\",\n \"0px 10px 14px -6px rgba(255,255,255,0.05),0px 22px 35px 3px rgba(255,255,255,0.04),0px 8px 42px 7px rgba(255,255,255,0.03)\",\n \"0px 11px 14px -7px rgba(255,255,255,0.05),0px 23px 36px 3px rgba(255,255,255,0.04),0px 9px 44px 8px rgba(255,255,255,0.03)\",\n \"0px 11px 15px -7px rgba(255,255,255,0.05),0px 24px 38px 3px rgba(255,255,255,0.04),0px 9px 46px 8px rgba(255,255,255,0.03)\",\n]\n\nexport const ThemeTypography: ThemeTypographyType = {\n h1: { fontSize: 48, lineHeight: 1.3, fontWeight: 600 }, // bolder for emphasis\n h2: { fontSize: 40, lineHeight: 1.35, fontWeight: 500 },\n h3: { fontSize: 34, lineHeight: 1.4, fontWeight: 500 },\n h4: { fontSize: 28, lineHeight: 1.45, fontWeight: 500 },\n h5: { fontSize: 24, lineHeight: 1.5, fontWeight: 500 },\n h6: { fontSize: 20, lineHeight: 1.55, fontWeight: 500 },\n big: { fontSize: 18, lineHeight: 1.6, fontWeight: 400 },\n text: { fontSize: 16, lineHeight: 1.6, fontWeight: 400 },\n button: { fontSize: 14, lineHeight: 1.6, fontWeight: 500 },\n small: { fontSize: 12, lineHeight: 1.6, fontWeight: 400 },\n}\n\nexport const lightThemeOptions: ThemeOptionInput = {\n name: \"light\",\n rtl: false,\n shadow: lightShadows,\n globalStyle: {},\n colors: {\n background: {\n primary: \"#FFFFFF\", // main app background\n secondary: \"#F3F4F6\", // slightly darker surface for sections/cards\n },\n\n divider: {\n primary: \"#E5E7EB\", // soft divider, visible on #FFFFFF\n secondary: \"#D1D5DB\", // stronger divider for emphasis\n },\n\n text: {\n primary: \"#111827\",\n secondary: \"#6B7280\",\n },\n\n brand: {\n primary: \"#2563EB\",\n secondary: \"#1D4ED8\",\n text: \"#F9FAFB\",\n },\n\n accent: {\n primary: \"#7C3AED\",\n secondary: \"#6D28D9\",\n text: \"#F9FAFB\",\n },\n\n success: {\n primary: \"#16A34A\",\n secondary: \"#15803D\",\n text: \"#F9FAFB\",\n },\n\n info: {\n primary: \"#2563EB\",\n secondary: \"#1D4ED8\",\n text: \"#F9FAFB\",\n },\n\n warning: {\n primary: \"#D97706\",\n secondary: \"#B45309\",\n text: \"#FFFBEB\",\n },\n\n danger: {\n primary: \"#DC2626\",\n secondary: \"#B91C1C\",\n text: \"#FEF2F2\",\n },\n },\n typography: ThemeTypography,\n interfaces: {}\n} as ThemeOptionInput\n\n\nexport const createDefaultThemes = () => {\n createTheme(\"light\", {})\n createTheme(\"dark\", {\n shadow: darkShadows,\n colors: {\n background: {\n primary: \"#121212\",\n secondary: \"#1E1E1E\",\n },\n\n divider: {\n primary: \"#262626\",\n secondary: \"#2E2E2E\",\n },\n\n text: {\n primary: \"#F3F4F6\", // main readable text\n secondary: \"#9CA3AF\", // muted / secondary text\n },\n\n brand: {\n primary: \"#1D4ED8\",\n secondary: \"#2563EB\",\n text: \"#F9FAFB\",\n },\n\n accent: {\n primary: \"#6D28D9\",\n secondary: \"#7C3AED\",\n text: \"#F9FAFB\",\n },\n\n success: {\n primary: \"#15803D\",\n secondary: \"#16A34A\",\n text: \"#F9FAFB\",\n },\n\n info: {\n primary: \"#1D4ED8\",\n secondary: \"#2563EB\",\n text: \"#F9FAFB\",\n },\n\n warning: {\n primary: \"#B45309\",\n secondary: \"#D97706\",\n text: \"#FFFBEB\",\n },\n\n danger: {\n primary: \"#B91C1C\",\n secondary: \"#DC2626\",\n text: \"#FEF2F2\",\n },\n }\n })\n}"],"names":[],"mappings":"4CAGO,MAAM,YAAY,GAAG;IACxB,MAAM;IACN,oGAAoG;IACpG,oGAAoG;IACpG,oGAAoG;IACpG,qGAAqG;IACrG,qGAAqG;IACrG,sGAAsG;IACtG,sGAAsG;IACtG,sGAAsG;IACtG,sGAAsG;IACtG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,wGAAwG;IACxG,wGAAwG;IACxG,wGAAwG;IACxG,wGAAwG;IACxG,yGAAyG;IACzG,yGAAyG;IACzG,yGAAyG;IACzG,yGAAyG;IACzG,yGAAyG;;AAGtG,MAAM,WAAW,GAAG;IACvB,MAAM;IACN,uHAAuH;IACvH,uHAAuH;IACvH,uHAAuH;IACvH,wHAAwH;IACxH,wHAAwH;IACxH,yHAAyH;IACzH,yHAAyH;IACzH,yHAAyH;IACzH,yHAAyH;IACzH,0HAA0H;IAC1H,0HAA0H;IAC1H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,SAAS;AAClB,aAAA;AACJ;AACJ,KAAA,CAAC;AACN"}
|
|
1
|
+
{"version":3,"file":"ThemeDefaultOptions.mjs","sources":["../../src/theme/ThemeDefaultOptions.ts"],"sourcesContent":["import { createTheme } from './createTheme'\nimport { ThemeOptionInput, ThemeTypographyType } from './types'\n\nexport const lightShadows = [\n \"none\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\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)\",\n]\n\nexport const darkShadows = [\n \"none\",\n\n \"0px 1px 2px rgba(0,0,0,0.65), inset 0px 1px 0px rgba(255,255,255,0.04)\",\n \"0px 2px 3px rgba(0,0,0,0.68), inset 0px 1px 0px rgba(255,255,255,0.04)\",\n \"0px 2px 4px rgba(0,0,0,0.7), inset 0px 1px 0px rgba(255,255,255,0.05)\",\n \"0px 3px 5px rgba(0,0,0,0.72), inset 0px 1px 0px rgba(255,255,255,0.05)\",\n\n \"0px 4px 6px rgba(0,0,0,0.75), inset 0px 1px 0px rgba(255,255,255,0.05)\",\n \"0px 5px 8px rgba(0,0,0,0.78), inset 0px 1px 0px rgba(255,255,255,0.06)\",\n \"0px 6px 10px rgba(0,0,0,0.8), inset 0px 1px 0px rgba(255,255,255,0.06)\",\n \"0px 7px 12px rgba(0,0,0,0.82), inset 0px 1px 0px rgba(255,255,255,0.06)\",\n \"0px 8px 14px rgba(0,0,0,0.84), inset 0px 1px 0px rgba(255,255,255,0.06)\",\n\n \"0px 9px 16px rgba(0,0,0,0.86), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n \"0px 10px 18px rgba(0,0,0,0.88), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n \"0px 11px 20px rgba(0,0,0,0.89), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n \"0px 12px 22px rgba(0,0,0,0.9), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n \"0px 13px 24px rgba(0,0,0,0.91), inset 0px 1px 0px rgba(255,255,255,0.07)\",\n\n \"0px 14px 26px rgba(0,0,0,0.92), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 15px 28px rgba(0,0,0,0.93), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 16px 30px rgba(0,0,0,0.94), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 18px 32px rgba(0,0,0,0.95), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 20px 34px rgba(0,0,0,0.95), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n\n \"0px 22px 36px rgba(0,0,0,0.96), inset 0px 1px 0px rgba(255,255,255,0.08)\",\n \"0px 24px 38px rgba(0,0,0,0.97), inset 0px 1px 0px rgba(255,255,255,0.09)\",\n \"0px 26px 40px rgba(0,0,0,0.98), inset 0px 1px 0px rgba(255,255,255,0.09)\",\n \"0px 28px 42px rgba(0,0,0,0.99), inset 0px 1px 0px rgba(255,255,255,0.1)\",\n]\n\n\n\nexport const ThemeTypography: ThemeTypographyType = {\n h1: { fontSize: 48, lineHeight: 1.3, fontWeight: 600 }, // bolder for emphasis\n h2: { fontSize: 40, lineHeight: 1.35, fontWeight: 500 },\n h3: { fontSize: 34, lineHeight: 1.4, fontWeight: 500 },\n h4: { fontSize: 28, lineHeight: 1.45, fontWeight: 500 },\n h5: { fontSize: 24, lineHeight: 1.5, fontWeight: 500 },\n h6: { fontSize: 20, lineHeight: 1.55, fontWeight: 500 },\n big: { fontSize: 18, lineHeight: 1.6, fontWeight: 400 },\n text: { fontSize: 16, lineHeight: 1.6, fontWeight: 400 },\n button: { fontSize: 14, lineHeight: 1.6, fontWeight: 500 },\n small: { fontSize: 12, lineHeight: 1.6, fontWeight: 400 },\n}\n\nexport const lightThemeOptions: ThemeOptionInput = {\n name: \"light\",\n rtl: false,\n shadow: lightShadows,\n globalStyle: {},\n colors: {\n background: {\n primary: \"#FFFFFF\", // main app background\n secondary: \"#F3F4F6\", // slightly darker surface for sections/cards\n },\n\n divider: {\n primary: \"#E5E7EB\", // soft divider, visible on #FFFFFF\n secondary: \"#D1D5DB\", // stronger divider for emphasis\n },\n\n text: {\n primary: \"#111827\",\n secondary: \"#6B7280\",\n },\n\n brand: {\n primary: \"#2563EB\",\n secondary: \"#1D4ED8\",\n text: \"#F9FAFB\",\n },\n\n accent: {\n primary: \"#7C3AED\",\n secondary: \"#6D28D9\",\n text: \"#F9FAFB\",\n },\n\n success: {\n primary: \"#16A34A\",\n secondary: \"#15803D\",\n text: \"#F9FAFB\",\n },\n\n info: {\n primary: \"#2563EB\",\n secondary: \"#1D4ED8\",\n text: \"#F9FAFB\",\n },\n\n warning: {\n primary: \"#D97706\",\n secondary: \"#B45309\",\n text: \"#FFFBEB\",\n },\n\n danger: {\n primary: \"#DC2626\",\n secondary: \"#B91C1C\",\n text: \"#FEF2F2\",\n },\n },\n typography: ThemeTypography,\n interfaces: {}\n} as ThemeOptionInput\n\n\nexport const createDefaultThemes = () => {\n createTheme(\"light\", {})\n createTheme(\"dark\", {\n shadow: darkShadows,\n colors: {\n background: {\n primary: \"#121212\",\n secondary: \"#1E1E1E\",\n },\n\n divider: {\n primary: \"#262626\",\n secondary: \"#2E2E2E\",\n },\n\n text: {\n primary: \"#F3F4F6\", // main readable text\n secondary: \"#9CA3AF\", // muted / secondary text\n },\n\n brand: {\n primary: \"#3F5AE0\",\n secondary: \"#5F78F0\",\n text: \"#0B1220\",\n },\n\n accent: {\n primary: \"#6B4FE8\",\n secondary: \"#856FF2\",\n text: \"#0C0824\",\n },\n\n\n success: {\n primary: \"#22985A\",\n secondary: \"#3AB97C\",\n text: \"#052A18\",\n },\n\n info: {\n primary: \"#3F70E0\",\n secondary: \"#5F8CE8\",\n text: \"#0A1024\",\n },\n\n\n warning: {\n primary: \"#B7832B\",\n secondary: \"#D09B45\",\n text: \"#1F1304\",\n },\n\n danger: {\n primary: \"#C44040\",\n secondary: \"#DE6161\",\n text: \"#2A0808\",\n },\n }\n })\n}"],"names":[],"mappings":";;AAGO,MAAM,YAAY,GAAG;IACxB,MAAM;IACN,oGAAoG;IACpG,oGAAoG;IACpG,oGAAoG;IACpG,qGAAqG;IACrG,qGAAqG;IACrG,sGAAsG;IACtG,sGAAsG;IACtG,sGAAsG;IACtG,sGAAsG;IACtG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAuG;IACvG,uGAAu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BAAA,OAAO,EAAE,SAAS;AAClB,gBAAA,SAAS,EAAE,SAAS;AACpB,gBAAA,IAAI,EAAE,SAAS;AAClB,aAAA;AAGD,YAAA,OAAO,EAAE;AACL,gBAAA,OAAO,EAAE,SAAS;AAClB,gBAAA,SAAS,EAAE,SAAS;AACpB,gBAAA,IAAI,EAAE,SAAS;AAClB,aAAA;AAED,YAAA,MAAM,EAAE;AACJ,gBAAA,OAAO,EAAE,SAAS;AAClB,gBAAA,SAAS,EAAE,SAAS;AACpB,gBAAA,IAAI,EAAE,SAAS;AAClB,aAAA;AACJ;AACJ,KAAA,CAAC;AACN;;;;"}
|
package/theme/ThemeProvider.js
CHANGED
|
@@ -1,4 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var tslib = require('tslib');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var index$1 = require('../Tag/index.js');
|
|
8
|
+
var core = require('./core.js');
|
|
9
|
+
var ThemeCssVars = require('./ThemeCssVars.js');
|
|
10
|
+
var index = require('../css/index.js');
|
|
11
|
+
var ThemeDefaultOptions = require('./ThemeDefaultOptions.js');
|
|
12
|
+
var ServerStyleTag = require('../Tag/ServerStyleTag.js');
|
|
13
|
+
|
|
14
|
+
function _interopNamespaceDefault(e) {
|
|
15
|
+
var n = Object.create(null);
|
|
16
|
+
if (e) {
|
|
17
|
+
Object.keys(e).forEach(function (k) {
|
|
18
|
+
if (k !== 'default') {
|
|
19
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
20
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return e[k]; }
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
n.default = e;
|
|
28
|
+
return Object.freeze(n);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
32
|
+
|
|
33
|
+
ThemeDefaultOptions.createDefaultThemes();
|
|
2
34
|
const ThemeProvider = (_a) => {
|
|
3
35
|
var { children, theme } = _a, props = tslib.__rest(_a, ["children", "theme"]);
|
|
4
36
|
let THEME = core.ThemeFactory.get(theme);
|
|
@@ -14,14 +46,17 @@ const ThemeProvider = (_a) => {
|
|
|
14
46
|
gstyles[`${root_cls} ${key}`] = THEME.globalStyle[key];
|
|
15
47
|
});
|
|
16
48
|
return index.css({
|
|
17
|
-
"@global": Object.assign(Object.assign({}, gstyles), { [root_cls]: ThemeCssVars
|
|
49
|
+
"@global": Object.assign(Object.assign({}, gstyles), { [root_cls]: ThemeCssVars(THEME) })
|
|
18
50
|
}, {
|
|
19
51
|
injectStyle: typeof window !== 'undefined'
|
|
20
52
|
});
|
|
21
53
|
}, [theme]);
|
|
22
|
-
return (jsxRuntime.jsxs(core.ThemeContex.Provider, { value: theme, children: [jsxRuntime.jsx(ServerStyleTag
|
|
54
|
+
return (jsxRuntime.jsxs(core.ThemeContex.Provider, { value: theme, children: [jsxRuntime.jsx(ServerStyleTag, { factory: globalStyle }), jsxRuntime.jsx(index$1, Object.assign({ minHeight: "100%", bgcolor: "background.primary", color: "text.primary", fontSize: "text", fontWeight: "text", lineHeight: "text", fontFamily: `system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif` }, props, { sxr: {
|
|
23
55
|
"& a": {
|
|
24
56
|
color: "brand.primary",
|
|
25
57
|
},
|
|
26
58
|
}, baseClass: `${theme}-theme-root`, direction: THEME.rtl ? "rtl" : "ltr", children: children }))] }));
|
|
27
|
-
};
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
module.exports = ThemeProvider;
|
|
62
|
+
//# sourceMappingURL=ThemeProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.js","sources":["../../src/theme/ThemeProvider.tsx"],"sourcesContent":["\"use client\";\nimport * as React from \"react\"\nimport { ThemeOptions } from \"./types\"\nimport Tag from \"../Tag\"\nimport { TagComponentType, TagProps } from \"../Tag/types\"\nimport { ThemeContex, ThemeFactory } from \"./core\"\nimport ThemeCssVars from \"./ThemeCssVars\"\nimport { css } from \"../css\"\nimport { createDefaultThemes } from \"./ThemeDefaultOptions\"\nimport ServerStyleTag from \"../Tag/ServerStyleTag\"\n\nexport type ThemeProviderProps<T extends TagComponentType = 'div'> = TagProps<T> & {\n theme: string;\n}\n\ncreateDefaultThemes()\n\nconst ThemeProvider = <T extends TagComponentType = 'div'>({ children, theme, ...props }: ThemeProviderProps<T>) => {\n let THEME = ThemeFactory.get(theme) as ThemeOptions\n if (!THEME) {\n console.error(`ThemeProvider: The theme '${theme}' is not defined. Please make sure to use a valid theme name.`)\n THEME = ThemeFactory.get(\"light\") as ThemeOptions\n }\n\n const globalStyle: any = React.useMemo(() => {\n const root_cls = `.xui-${theme}-theme-root`\n let gkeys = Object.keys(THEME.globalStyle || {})\n let gstyles: any = {}\n gkeys.forEach((key) => {\n gstyles[`${root_cls} ${key}`] = THEME.globalStyle[key as any]\n })\n\n return css({\n \"@global\": {\n ...gstyles,\n [root_cls]: ThemeCssVars(THEME)\n }\n }, {\n injectStyle: typeof window !== 'undefined'\n })\n }, [theme])\n\n return (\n <ThemeContex.Provider value={theme}>\n <ServerStyleTag factory={globalStyle} />\n <Tag\n minHeight=\"100%\"\n bgcolor=\"background.primary\"\n color=\"text.primary\"\n fontSize=\"text\"\n fontWeight=\"text\"\n lineHeight=\"text\"\n fontFamily={`system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif`}\n {...props}\n sxr={{\n \"& a\": {\n color: \"brand.primary\",\n },\n }}\n baseClass={`${theme}-theme-root`}\n direction={THEME.rtl ? \"rtl\" : \"ltr\"}\n >\n {children}\n </Tag>\n </ThemeContex.Provider>\n )\n}\n\nexport default ThemeProvider"],"names":["createDefaultThemes"
|
|
1
|
+
{"version":3,"file":"ThemeProvider.js","sources":["../../src/theme/ThemeProvider.tsx"],"sourcesContent":["\"use client\";\nimport * as React from \"react\"\nimport { ThemeOptions } from \"./types\"\nimport Tag from \"../Tag\"\nimport { TagComponentType, TagProps } from \"../Tag/types\"\nimport { ThemeContex, ThemeFactory } from \"./core\"\nimport ThemeCssVars from \"./ThemeCssVars\"\nimport { css } from \"../css\"\nimport { createDefaultThemes } from \"./ThemeDefaultOptions\"\nimport ServerStyleTag from \"../Tag/ServerStyleTag\"\n\nexport type ThemeProviderProps<T extends TagComponentType = 'div'> = TagProps<T> & {\n theme: string;\n}\n\ncreateDefaultThemes()\n\nconst ThemeProvider = <T extends TagComponentType = 'div'>({ children, theme, ...props }: ThemeProviderProps<T>) => {\n let THEME = ThemeFactory.get(theme) as ThemeOptions\n if (!THEME) {\n console.error(`ThemeProvider: The theme '${theme}' is not defined. Please make sure to use a valid theme name.`)\n THEME = ThemeFactory.get(\"light\") as ThemeOptions\n }\n\n const globalStyle: any = React.useMemo(() => {\n const root_cls = `.xui-${theme}-theme-root`\n let gkeys = Object.keys(THEME.globalStyle || {})\n let gstyles: any = {}\n gkeys.forEach((key) => {\n gstyles[`${root_cls} ${key}`] = THEME.globalStyle[key as any]\n })\n\n return css({\n \"@global\": {\n ...gstyles,\n [root_cls]: ThemeCssVars(THEME)\n }\n }, {\n injectStyle: typeof window !== 'undefined'\n })\n }, [theme])\n\n return (\n <ThemeContex.Provider value={theme}>\n <ServerStyleTag factory={globalStyle} />\n <Tag\n minHeight=\"100%\"\n bgcolor=\"background.primary\"\n color=\"text.primary\"\n fontSize=\"text\"\n fontWeight=\"text\"\n lineHeight=\"text\"\n fontFamily={`system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif`}\n {...props}\n sxr={{\n \"& a\": {\n color: \"brand.primary\",\n },\n }}\n baseClass={`${theme}-theme-root`}\n direction={THEME.rtl ? \"rtl\" : \"ltr\"}\n >\n {children}\n </Tag>\n </ThemeContex.Provider>\n )\n}\n\nexport default ThemeProvider"],"names":["createDefaultThemes"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeAA;AAEA;;;;AAGM;AACA;;AAGH;AACG;AACA;;AAEA;AACG;AACH;AAEA;;;AAMG;AACF;AACJ;;AAeY;AACG;AACF;;AAShB;;"}
|
package/theme/ThemeProvider.mjs
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { __rest } from 'tslib';
|
|
3
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import Tag from '../Tag/index.mjs';
|
|
6
|
+
import { ThemeFactory, ThemeContex } from './core.mjs';
|
|
7
|
+
import ThemeCssVars from './ThemeCssVars.mjs';
|
|
8
|
+
import { css } from '../css/index.mjs';
|
|
9
|
+
import { createDefaultThemes } from './ThemeDefaultOptions.mjs';
|
|
10
|
+
import ServerStyleTag from '../Tag/ServerStyleTag.mjs';
|
|
11
|
+
|
|
12
|
+
createDefaultThemes();
|
|
2
13
|
const ThemeProvider = (_a) => {
|
|
3
14
|
var { children, theme } = _a, props = __rest(_a, ["children", "theme"]);
|
|
4
15
|
let THEME = ThemeFactory.get(theme);
|
|
@@ -24,4 +35,7 @@ const ThemeProvider = (_a) => {
|
|
|
24
35
|
color: "brand.primary",
|
|
25
36
|
},
|
|
26
37
|
}, baseClass: `${theme}-theme-root`, direction: THEME.rtl ? "rtl" : "ltr", children: children }))] }));
|
|
27
|
-
};
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export { ThemeProvider as default };
|
|
41
|
+
//# sourceMappingURL=ThemeProvider.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.mjs","sources":["../../src/theme/ThemeProvider.tsx"],"sourcesContent":["\"use client\";\nimport * as React from \"react\"\nimport { ThemeOptions } from \"./types\"\nimport Tag from \"../Tag\"\nimport { TagComponentType, TagProps } from \"../Tag/types\"\nimport { ThemeContex, ThemeFactory } from \"./core\"\nimport ThemeCssVars from \"./ThemeCssVars\"\nimport { css } from \"../css\"\nimport { createDefaultThemes } from \"./ThemeDefaultOptions\"\nimport ServerStyleTag from \"../Tag/ServerStyleTag\"\n\nexport type ThemeProviderProps<T extends TagComponentType = 'div'> = TagProps<T> & {\n theme: string;\n}\n\ncreateDefaultThemes()\n\nconst ThemeProvider = <T extends TagComponentType = 'div'>({ children, theme, ...props }: ThemeProviderProps<T>) => {\n let THEME = ThemeFactory.get(theme) as ThemeOptions\n if (!THEME) {\n console.error(`ThemeProvider: The theme '${theme}' is not defined. Please make sure to use a valid theme name.`)\n THEME = ThemeFactory.get(\"light\") as ThemeOptions\n }\n\n const globalStyle: any = React.useMemo(() => {\n const root_cls = `.xui-${theme}-theme-root`\n let gkeys = Object.keys(THEME.globalStyle || {})\n let gstyles: any = {}\n gkeys.forEach((key) => {\n gstyles[`${root_cls} ${key}`] = THEME.globalStyle[key as any]\n })\n\n return css({\n \"@global\": {\n ...gstyles,\n [root_cls]: ThemeCssVars(THEME)\n }\n }, {\n injectStyle: typeof window !== 'undefined'\n })\n }, [theme])\n\n return (\n <ThemeContex.Provider value={theme}>\n <ServerStyleTag factory={globalStyle} />\n <Tag\n minHeight=\"100%\"\n bgcolor=\"background.primary\"\n color=\"text.primary\"\n fontSize=\"text\"\n fontWeight=\"text\"\n lineHeight=\"text\"\n fontFamily={`system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif`}\n {...props}\n sxr={{\n \"& a\": {\n color: \"brand.primary\",\n },\n }}\n baseClass={`${theme}-theme-root`}\n direction={THEME.rtl ? \"rtl\" : \"ltr\"}\n >\n {children}\n </Tag>\n </ThemeContex.Provider>\n )\n}\n\nexport default ThemeProvider"],"names":[
|
|
1
|
+
{"version":3,"file":"ThemeProvider.mjs","sources":["../../src/theme/ThemeProvider.tsx"],"sourcesContent":["\"use client\";\nimport * as React from \"react\"\nimport { ThemeOptions } from \"./types\"\nimport Tag from \"../Tag\"\nimport { TagComponentType, TagProps } from \"../Tag/types\"\nimport { ThemeContex, ThemeFactory } from \"./core\"\nimport ThemeCssVars from \"./ThemeCssVars\"\nimport { css } from \"../css\"\nimport { createDefaultThemes } from \"./ThemeDefaultOptions\"\nimport ServerStyleTag from \"../Tag/ServerStyleTag\"\n\nexport type ThemeProviderProps<T extends TagComponentType = 'div'> = TagProps<T> & {\n theme: string;\n}\n\ncreateDefaultThemes()\n\nconst ThemeProvider = <T extends TagComponentType = 'div'>({ children, theme, ...props }: ThemeProviderProps<T>) => {\n let THEME = ThemeFactory.get(theme) as ThemeOptions\n if (!THEME) {\n console.error(`ThemeProvider: The theme '${theme}' is not defined. Please make sure to use a valid theme name.`)\n THEME = ThemeFactory.get(\"light\") as ThemeOptions\n }\n\n const globalStyle: any = React.useMemo(() => {\n const root_cls = `.xui-${theme}-theme-root`\n let gkeys = Object.keys(THEME.globalStyle || {})\n let gstyles: any = {}\n gkeys.forEach((key) => {\n gstyles[`${root_cls} ${key}`] = THEME.globalStyle[key as any]\n })\n\n return css({\n \"@global\": {\n ...gstyles,\n [root_cls]: ThemeCssVars(THEME)\n }\n }, {\n injectStyle: typeof window !== 'undefined'\n })\n }, [theme])\n\n return (\n <ThemeContex.Provider value={theme}>\n <ServerStyleTag factory={globalStyle} />\n <Tag\n minHeight=\"100%\"\n bgcolor=\"background.primary\"\n color=\"text.primary\"\n fontSize=\"text\"\n fontWeight=\"text\"\n lineHeight=\"text\"\n fontFamily={`system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif`}\n {...props}\n sxr={{\n \"& a\": {\n color: \"brand.primary\",\n },\n }}\n baseClass={`${theme}-theme-root`}\n direction={THEME.rtl ? \"rtl\" : \"ltr\"}\n >\n {children}\n </Tag>\n </ThemeContex.Provider>\n )\n}\n\nexport default ThemeProvider"],"names":[],"mappings":";;;;;;;;;;;AAeA;AAEA;;;;AAGM;AACA;;AAGH;AACG;AACA;;AAEA;AACG;AACH;AAEA;;;AAMG;AACF;AACJ;;AAeY;AACG;AACF;;AAShB;;"}
|
package/theme/core.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
|
|
5
|
+
const ThemeFactory = new Map();
|
|
2
6
|
const ThemeContex = React.createContext("light");
|
|
3
7
|
const getTheme = (theme) => ThemeFactory.get(theme);
|
|
4
8
|
const useTheme = () => {
|
|
@@ -22,4 +26,11 @@ const mergeObject = (a, b) => {
|
|
|
22
26
|
}
|
|
23
27
|
}
|
|
24
28
|
return a;
|
|
25
|
-
};
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
exports.ThemeContex = ThemeContex;
|
|
32
|
+
exports.ThemeFactory = ThemeFactory;
|
|
33
|
+
exports.getTheme = getTheme;
|
|
34
|
+
exports.mergeObject = mergeObject;
|
|
35
|
+
exports.useTheme = useTheme;
|
|
36
|
+
//# sourceMappingURL=core.js.map
|
package/theme/core.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.js","sources":["../../src/theme/core.ts"],"sourcesContent":["import React from \"react\"\nimport { ObjectType, ThemeOptions } from \"./types\"\n\nexport const ThemeFactory = new Map<string, ThemeOptions>()\nexport const ThemeContex = React.createContext(\"light\")\nexport const getTheme = (theme: string) => ThemeFactory.get(theme)\nexport const useTheme = (): ThemeOptions => {\n const theme = ThemeFactory.get(React.useContext(ThemeContex)) as any\n if (!theme) {\n console.error(\"Theme not found, returning light theme as fallback\")\n return ThemeFactory.get(\"light\") as any\n }\n return theme\n}\n\nexport const mergeObject = (a: ObjectType, b: ObjectType) => {\n a = { ...a }\n b = { ...b }\n for (const key in b) {\n const v = (b as any)[key]\n if (typeof v === 'object' && !Array.isArray(v) && !React.isValidElement(v)) {\n a[key] = mergeObject(a[key], b[key])\n } else {\n a[key] = v\n }\n }\n return a\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"core.js","sources":["../../src/theme/core.ts"],"sourcesContent":["import React from \"react\"\nimport { ObjectType, ThemeOptions } from \"./types\"\n\nexport const ThemeFactory = new Map<string, ThemeOptions>()\nexport const ThemeContex = React.createContext(\"light\")\nexport const getTheme = (theme: string) => ThemeFactory.get(theme)\nexport const useTheme = (): ThemeOptions => {\n const theme = ThemeFactory.get(React.useContext(ThemeContex)) as any\n if (!theme) {\n console.error(\"Theme not found, returning light theme as fallback\")\n return ThemeFactory.get(\"light\") as any\n }\n return theme\n}\n\nexport const mergeObject = (a: ObjectType, b: ObjectType) => {\n a = { ...a }\n b = { ...b }\n for (const key in b) {\n const v = (b as any)[key]\n if (typeof v === 'object' && !Array.isArray(v) && !React.isValidElement(v)) {\n a[key] = mergeObject(a[key], b[key])\n } else {\n a[key] = v\n }\n }\n return a\n}\n"],"names":[],"mappings":";;;;AAGO,MAAM,YAAY,GAAG,IAAI,GAAG;AAC5B,MAAM,WAAW,GAAG,KAAK,CAAC,aAAa,CAAC,OAAO;AAC/C,MAAM,QAAQ,GAAG,CAAC,KAAa,KAAK,YAAY,CAAC,GAAG,CAAC,KAAK;AAC1D,MAAM,QAAQ,GAAG,MAAmB;AACxC,IAAA,MAAM,KAAK,GAAG,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAQ;IACpE,IAAI,CAAC,KAAK,EAAE;AACT,QAAA,OAAO,CAAC,KAAK,CAAC,oDAAoD,CAAC;AACnE,QAAA,OAAO,YAAY,CAAC,GAAG,CAAC,OAAO,CAAQ;IAC1C;AACA,IAAA,OAAO,KAAK;AACf;MAEa,WAAW,GAAG,CAAC,CAAa,EAAE,CAAa,KAAI;IACzD,CAAC,GAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAQ,CAAC,CAAE;IACZ,CAAC,GAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAQ,CAAC,CAAE;AACZ,IAAA,KAAK,MAAM,GAAG,IAAI,CAAC,EAAE;AAClB,QAAA,MAAM,CAAC,GAAI,CAAS,CAAC,GAAG,CAAC;QACzB,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE;AACzE,YAAA,CAAC,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;QACvC;aAAO;AACJ,YAAA,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;QACb;IACH;AACA,IAAA,OAAO,CAAC;AACX;;;;;;;;"}
|
package/theme/core.mjs
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import React__default from'react';
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
const ThemeFactory = new Map();
|
|
2
4
|
const ThemeContex = React__default.createContext("light");
|
|
3
5
|
const getTheme = (theme) => ThemeFactory.get(theme);
|
|
4
6
|
const useTheme = () => {
|
|
@@ -22,4 +24,7 @@ const mergeObject = (a, b) => {
|
|
|
22
24
|
}
|
|
23
25
|
}
|
|
24
26
|
return a;
|
|
25
|
-
};
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export { ThemeContex, ThemeFactory, getTheme, mergeObject, useTheme };
|
|
30
|
+
//# sourceMappingURL=core.mjs.map
|
package/theme/core.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.mjs","sources":["../../src/theme/core.ts"],"sourcesContent":["import React from \"react\"\nimport { ObjectType, ThemeOptions } from \"./types\"\n\nexport const ThemeFactory = new Map<string, ThemeOptions>()\nexport const ThemeContex = React.createContext(\"light\")\nexport const getTheme = (theme: string) => ThemeFactory.get(theme)\nexport const useTheme = (): ThemeOptions => {\n const theme = ThemeFactory.get(React.useContext(ThemeContex)) as any\n if (!theme) {\n console.error(\"Theme not found, returning light theme as fallback\")\n return ThemeFactory.get(\"light\") as any\n }\n return theme\n}\n\nexport const mergeObject = (a: ObjectType, b: ObjectType) => {\n a = { ...a }\n b = { ...b }\n for (const key in b) {\n const v = (b as any)[key]\n if (typeof v === 'object' && !Array.isArray(v) && !React.isValidElement(v)) {\n a[key] = mergeObject(a[key], b[key])\n } else {\n a[key] = v\n }\n }\n return a\n}\n"],"names":["React"],"mappings":"
|
|
1
|
+
{"version":3,"file":"core.mjs","sources":["../../src/theme/core.ts"],"sourcesContent":["import React from \"react\"\nimport { ObjectType, ThemeOptions } from \"./types\"\n\nexport const ThemeFactory = new Map<string, ThemeOptions>()\nexport const ThemeContex = React.createContext(\"light\")\nexport const getTheme = (theme: string) => ThemeFactory.get(theme)\nexport const useTheme = (): ThemeOptions => {\n const theme = ThemeFactory.get(React.useContext(ThemeContex)) as any\n if (!theme) {\n console.error(\"Theme not found, returning light theme as fallback\")\n return ThemeFactory.get(\"light\") as any\n }\n return theme\n}\n\nexport const mergeObject = (a: ObjectType, b: ObjectType) => {\n a = { ...a }\n b = { ...b }\n for (const key in b) {\n const v = (b as any)[key]\n if (typeof v === 'object' && !Array.isArray(v) && !React.isValidElement(v)) {\n a[key] = mergeObject(a[key], b[key])\n } else {\n a[key] = v\n }\n }\n return a\n}\n"],"names":["React"],"mappings":";;AAGO,MAAM,YAAY,GAAG,IAAI,GAAG;AAC5B,MAAM,WAAW,GAAGA,cAAK,CAAC,aAAa,CAAC,OAAO;AAC/C,MAAM,QAAQ,GAAG,CAAC,KAAa,KAAK,YAAY,CAAC,GAAG,CAAC,KAAK;AAC1D,MAAM,QAAQ,GAAG,MAAmB;AACxC,IAAA,MAAM,KAAK,GAAG,YAAY,CAAC,GAAG,CAACA,cAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAQ;IACpE,IAAI,CAAC,KAAK,EAAE;AACT,QAAA,OAAO,CAAC,KAAK,CAAC,oDAAoD,CAAC;AACnE,QAAA,OAAO,YAAY,CAAC,GAAG,CAAC,OAAO,CAAQ;IAC1C;AACA,IAAA,OAAO,KAAK;AACf;MAEa,WAAW,GAAG,CAAC,CAAa,EAAE,CAAa,KAAI;IACzD,CAAC,GAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAQ,CAAC,CAAE;IACZ,CAAC,GAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAQ,CAAC,CAAE;AACZ,IAAA,KAAK,MAAM,GAAG,IAAI,CAAC,EAAE;AAClB,QAAA,MAAM,CAAC,GAAI,CAAS,CAAC,GAAG,CAAC;QACzB,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAACA,cAAK,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE;AACzE,YAAA,CAAC,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;QACvC;aAAO;AACJ,YAAA,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;QACb;IACH;AACA,IAAA,OAAO,CAAC;AACX;;;;"}
|
package/theme/createTheme.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('./core.js');
|
|
4
|
+
var index = require('../css/index.js');
|
|
5
|
+
var ThemeDefaultOptions = require('./ThemeDefaultOptions.js');
|
|
6
|
+
|
|
7
|
+
const createTheme = (name, options) => {
|
|
2
8
|
if (core.ThemeFactory.has(name)) {
|
|
3
9
|
console.error(`createTheme: The theme '${name}' is already defined. Please choose a different name for the theme.`);
|
|
4
10
|
return core.ThemeFactory.get(name);
|
|
@@ -15,4 +21,7 @@
|
|
|
15
21
|
}
|
|
16
22
|
core.ThemeFactory.set(name, theme);
|
|
17
23
|
return theme;
|
|
18
|
-
};
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
exports.createTheme = createTheme;
|
|
27
|
+
//# sourceMappingURL=createTheme.js.map
|
package/theme/createTheme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTheme.js","sources":["../../src/theme/createTheme.ts"],"sourcesContent":["import { ThemeOptions, ThemeOptionInput, ThemeOptionsColor } from \"./types\"\nimport { mergeObject, ThemeFactory } from \"./core\"\nimport { alpha, breakpoints } from \"../css\"\nimport { lightThemeOptions } from \"./ThemeDefaultOptions\"\n\nexport const createTheme = (name: string, options: ThemeOptionInput): ThemeOptions => {\n if (ThemeFactory.has(name)) {\n console.error(`createTheme: The theme '${name}' is already defined. Please choose a different name for the theme.`)\n return ThemeFactory.get(name) as ThemeOptions\n }\n\n let theme: any = mergeObject(lightThemeOptions, {\n ...options,\n name,\n breakpoints: breakpoints\n })\n\n // add alpha colors\n for (let color in theme.colors) {\n const c = theme.colors[color] as ThemeOptionsColor\n const is_common = color === 'divider' || color === 'background' || color === 'text'\n c.soft = {\n primary: is_common ? alpha(c.primary, 0.60) : alpha(c.primary, 0.08),\n secondary: is_common ? alpha(c.primary, 0.90) : alpha(c.primary, 0.12)\n }\n }\n\n ThemeFactory.set(name, theme)\n\n return theme as ThemeOptions\n}\n"],"names":["ThemeFactory","mergeObject","lightThemeOptions","breakpoints","alpha"],"mappings":"
|
|
1
|
+
{"version":3,"file":"createTheme.js","sources":["../../src/theme/createTheme.ts"],"sourcesContent":["import { ThemeOptions, ThemeOptionInput, ThemeOptionsColor } from \"./types\"\nimport { mergeObject, ThemeFactory } from \"./core\"\nimport { alpha, breakpoints } from \"../css\"\nimport { lightThemeOptions } from \"./ThemeDefaultOptions\"\n\nexport const createTheme = (name: string, options: ThemeOptionInput): ThemeOptions => {\n if (ThemeFactory.has(name)) {\n console.error(`createTheme: The theme '${name}' is already defined. Please choose a different name for the theme.`)\n return ThemeFactory.get(name) as ThemeOptions\n }\n\n let theme: any = mergeObject(lightThemeOptions, {\n ...options,\n name,\n breakpoints: breakpoints\n })\n\n // add alpha colors\n for (let color in theme.colors) {\n const c = theme.colors[color] as ThemeOptionsColor\n const is_common = color === 'divider' || color === 'background' || color === 'text'\n c.soft = {\n primary: is_common ? alpha(c.primary, 0.60) : alpha(c.primary, 0.08),\n secondary: is_common ? alpha(c.primary, 0.90) : alpha(c.primary, 0.12)\n }\n }\n\n ThemeFactory.set(name, theme)\n\n return theme as ThemeOptions\n}\n"],"names":["ThemeFactory","mergeObject","lightThemeOptions","breakpoints","alpha"],"mappings":";;;;;;MAKa,WAAW,GAAG,CAAC,IAAY,EAAE,OAAyB,KAAkB;AAClF,IAAA,IAAIA,iBAAY,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;AACzB,QAAA,OAAO,CAAC,KAAK,CAAC,2BAA2B,IAAI,CAAA,mEAAA,CAAqE,CAAC;AACnH,QAAA,OAAOA,iBAAY,CAAC,GAAG,CAAC,IAAI,CAAiB;IAChD;AAEA,IAAA,IAAI,KAAK,GAAQC,gBAAW,CAACC,qCAAiB,EAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACxC,OAAO,CAAA,EAAA,EACV,IAAI,EACJ,WAAW,EAAEC,iBAAW,IACzB;;AAGF,IAAA,KAAK,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,EAAE;QAC7B,MAAM,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAsB;AAClD,QAAA,MAAM,SAAS,GAAG,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,YAAY,IAAI,KAAK,KAAK,MAAM;QACnF,CAAC,CAAC,IAAI,GAAG;YACN,OAAO,EAAE,SAAS,GAAGC,WAAK,CAAC,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC,GAAGA,WAAK,CAAC,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC;YACpE,SAAS,EAAE,SAAS,GAAGA,WAAK,CAAC,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC,GAAGA,WAAK,CAAC,CAAC,CAAC,OAAO,EAAE,IAAI;SACvE;IACJ;AAEA,IAAAJ,iBAAY,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC;AAE7B,IAAA,OAAO,KAAqB;AAC/B;;;;"}
|
package/theme/createTheme.mjs
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {ThemeFactory,mergeObject}
|
|
1
|
+
import { ThemeFactory, mergeObject } from './core.mjs';
|
|
2
|
+
import { breakpoints, alpha } from '../css/index.mjs';
|
|
3
|
+
import { lightThemeOptions } from './ThemeDefaultOptions.mjs';
|
|
4
|
+
|
|
5
|
+
const createTheme = (name, options) => {
|
|
2
6
|
if (ThemeFactory.has(name)) {
|
|
3
7
|
console.error(`createTheme: The theme '${name}' is already defined. Please choose a different name for the theme.`);
|
|
4
8
|
return ThemeFactory.get(name);
|
|
@@ -15,4 +19,7 @@ import {ThemeFactory,mergeObject}from'./core.mjs';import {breakpoints,alpha}from
|
|
|
15
19
|
}
|
|
16
20
|
ThemeFactory.set(name, theme);
|
|
17
21
|
return theme;
|
|
18
|
-
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { createTheme };
|
|
25
|
+
//# sourceMappingURL=createTheme.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTheme.mjs","sources":["../../src/theme/createTheme.ts"],"sourcesContent":["import { ThemeOptions, ThemeOptionInput, ThemeOptionsColor } from \"./types\"\nimport { mergeObject, ThemeFactory } from \"./core\"\nimport { alpha, breakpoints } from \"../css\"\nimport { lightThemeOptions } from \"./ThemeDefaultOptions\"\n\nexport const createTheme = (name: string, options: ThemeOptionInput): ThemeOptions => {\n if (ThemeFactory.has(name)) {\n console.error(`createTheme: The theme '${name}' is already defined. Please choose a different name for the theme.`)\n return ThemeFactory.get(name) as ThemeOptions\n }\n\n let theme: any = mergeObject(lightThemeOptions, {\n ...options,\n name,\n breakpoints: breakpoints\n })\n\n // add alpha colors\n for (let color in theme.colors) {\n const c = theme.colors[color] as ThemeOptionsColor\n const is_common = color === 'divider' || color === 'background' || color === 'text'\n c.soft = {\n primary: is_common ? alpha(c.primary, 0.60) : alpha(c.primary, 0.08),\n secondary: is_common ? alpha(c.primary, 0.90) : alpha(c.primary, 0.12)\n }\n }\n\n ThemeFactory.set(name, theme)\n\n return theme as ThemeOptions\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createTheme.mjs","sources":["../../src/theme/createTheme.ts"],"sourcesContent":["import { ThemeOptions, ThemeOptionInput, ThemeOptionsColor } from \"./types\"\nimport { mergeObject, ThemeFactory } from \"./core\"\nimport { alpha, breakpoints } from \"../css\"\nimport { lightThemeOptions } from \"./ThemeDefaultOptions\"\n\nexport const createTheme = (name: string, options: ThemeOptionInput): ThemeOptions => {\n if (ThemeFactory.has(name)) {\n console.error(`createTheme: The theme '${name}' is already defined. Please choose a different name for the theme.`)\n return ThemeFactory.get(name) as ThemeOptions\n }\n\n let theme: any = mergeObject(lightThemeOptions, {\n ...options,\n name,\n breakpoints: breakpoints\n })\n\n // add alpha colors\n for (let color in theme.colors) {\n const c = theme.colors[color] as ThemeOptionsColor\n const is_common = color === 'divider' || color === 'background' || color === 'text'\n c.soft = {\n primary: is_common ? alpha(c.primary, 0.60) : alpha(c.primary, 0.08),\n secondary: is_common ? alpha(c.primary, 0.90) : alpha(c.primary, 0.12)\n }\n }\n\n ThemeFactory.set(name, theme)\n\n return theme as ThemeOptions\n}\n"],"names":[],"mappings":";;;;MAKa,WAAW,GAAG,CAAC,IAAY,EAAE,OAAyB,KAAkB;AAClF,IAAA,IAAI,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;AACzB,QAAA,OAAO,CAAC,KAAK,CAAC,2BAA2B,IAAI,CAAA,mEAAA,CAAqE,CAAC;AACnH,QAAA,OAAO,YAAY,CAAC,GAAG,CAAC,IAAI,CAAiB;IAChD;AAEA,IAAA,IAAI,KAAK,GAAQ,WAAW,CAAC,iBAAiB,EAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACxC,OAAO,CAAA,EAAA,EACV,IAAI,EACJ,WAAW,EAAE,WAAW,IACzB;;AAGF,IAAA,KAAK,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,EAAE;QAC7B,MAAM,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAsB;AAClD,QAAA,MAAM,SAAS,GAAG,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,YAAY,IAAI,KAAK,KAAK,MAAM;QACnF,CAAC,CAAC,IAAI,GAAG;YACN,OAAO,EAAE,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC;YACpE,SAAS,EAAE,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,IAAI;SACvE;IACJ;AAEA,IAAA,YAAY,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC;AAE7B,IAAA,OAAO,KAAqB;AAC/B;;;;"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var reactStateBucket = require('react-state-bucket');
|
|
5
|
+
var core = require('./core.js');
|
|
6
|
+
|
|
7
|
+
const createThemeSwitcher = (defaultTheme, option) => {
|
|
2
8
|
const useThemeBucket = reactStateBucket.createBucket({ name: reactStateBucket.xv.string().default(defaultTheme) }, {
|
|
3
9
|
store: (option === null || option === void 0 ? void 0 : option.store) || "memory",
|
|
4
10
|
onChange: (_key, value) => {
|
|
@@ -14,4 +20,7 @@
|
|
|
14
20
|
};
|
|
15
21
|
};
|
|
16
22
|
return useThemeSwitcher;
|
|
17
|
-
};
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
module.exports = createThemeSwitcher;
|
|
26
|
+
//# sourceMappingURL=createThemeSwitcher.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createThemeSwitcher.js","sources":["../../src/theme/createThemeSwitcher.ts"],"sourcesContent":["\"use client\";\nimport { createBucket, xv } from \"react-state-bucket\"\nimport { getTheme } from \"./core\"\nimport { BucketOptions } from \"react-state-bucket\"\n\nexport type ThemeSwitcherOption = {\n store?: BucketOptions['store'],\n onChange?: (theme: string) => void\n}\n\nconst createThemeSwitcher = (defaultTheme: string, option?: ThemeSwitcherOption) => {\n\n const useThemeBucket = createBucket({ name: xv.string().default(defaultTheme) }, {\n store: option?.store || \"memory\",\n onChange: (_key, value) => {\n option?.onChange && option?.onChange(value)\n }\n })\n\n const useThemeSwitcher = () => {\n const bucket = useThemeBucket()\n return {\n name: bucket.state.name,\n theme: getTheme(bucket.state.name),\n change: (theme: string) => bucket.set('name', theme)\n }\n }\n return useThemeSwitcher\n}\n\nexport default createThemeSwitcher"],"names":[
|
|
1
|
+
{"version":3,"file":"createThemeSwitcher.js","sources":["../../src/theme/createThemeSwitcher.ts"],"sourcesContent":["\"use client\";\nimport { createBucket, xv } from \"react-state-bucket\"\nimport { getTheme } from \"./core\"\nimport { BucketOptions } from \"react-state-bucket\"\n\nexport type ThemeSwitcherOption = {\n store?: BucketOptions['store'],\n onChange?: (theme: string) => void\n}\n\nconst createThemeSwitcher = (defaultTheme: string, option?: ThemeSwitcherOption) => {\n\n const useThemeBucket = createBucket({ name: xv.string().default(defaultTheme) }, {\n store: option?.store || \"memory\",\n onChange: (_key, value) => {\n option?.onChange && option?.onChange(value)\n }\n })\n\n const useThemeSwitcher = () => {\n const bucket = useThemeBucket()\n return {\n name: bucket.state.name,\n theme: getTheme(bucket.state.name),\n change: (theme: string) => bucket.set('name', theme)\n }\n }\n return useThemeSwitcher\n}\n\nexport default createThemeSwitcher"],"names":[],"mappings":";;;;;;AAUA;AAEG;;AAEG;AACG;;AAEL;;AAGE;;AAEG;;AAEA;;AAEN;AACA;AACH;;"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { createBucket, xv } from 'react-state-bucket';
|
|
3
|
+
import { getTheme } from './core.mjs';
|
|
4
|
+
|
|
5
|
+
const createThemeSwitcher = (defaultTheme, option) => {
|
|
2
6
|
const useThemeBucket = createBucket({ name: xv.string().default(defaultTheme) }, {
|
|
3
7
|
store: (option === null || option === void 0 ? void 0 : option.store) || "memory",
|
|
4
8
|
onChange: (_key, value) => {
|
|
@@ -14,4 +18,7 @@ import {createBucket,xv}from'react-state-bucket';import {getTheme}from'./core.mj
|
|
|
14
18
|
};
|
|
15
19
|
};
|
|
16
20
|
return useThemeSwitcher;
|
|
17
|
-
};
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { createThemeSwitcher as default };
|
|
24
|
+
//# sourceMappingURL=createThemeSwitcher.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createThemeSwitcher.mjs","sources":["../../src/theme/createThemeSwitcher.ts"],"sourcesContent":["\"use client\";\nimport { createBucket, xv } from \"react-state-bucket\"\nimport { getTheme } from \"./core\"\nimport { BucketOptions } from \"react-state-bucket\"\n\nexport type ThemeSwitcherOption = {\n store?: BucketOptions['store'],\n onChange?: (theme: string) => void\n}\n\nconst createThemeSwitcher = (defaultTheme: string, option?: ThemeSwitcherOption) => {\n\n const useThemeBucket = createBucket({ name: xv.string().default(defaultTheme) }, {\n store: option?.store || \"memory\",\n onChange: (_key, value) => {\n option?.onChange && option?.onChange(value)\n }\n })\n\n const useThemeSwitcher = () => {\n const bucket = useThemeBucket()\n return {\n name: bucket.state.name,\n theme: getTheme(bucket.state.name),\n change: (theme: string) => bucket.set('name', theme)\n }\n }\n return useThemeSwitcher\n}\n\nexport default createThemeSwitcher"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createThemeSwitcher.mjs","sources":["../../src/theme/createThemeSwitcher.ts"],"sourcesContent":["\"use client\";\nimport { createBucket, xv } from \"react-state-bucket\"\nimport { getTheme } from \"./core\"\nimport { BucketOptions } from \"react-state-bucket\"\n\nexport type ThemeSwitcherOption = {\n store?: BucketOptions['store'],\n onChange?: (theme: string) => void\n}\n\nconst createThemeSwitcher = (defaultTheme: string, option?: ThemeSwitcherOption) => {\n\n const useThemeBucket = createBucket({ name: xv.string().default(defaultTheme) }, {\n store: option?.store || \"memory\",\n onChange: (_key, value) => {\n option?.onChange && option?.onChange(value)\n }\n })\n\n const useThemeSwitcher = () => {\n const bucket = useThemeBucket()\n return {\n name: bucket.state.name,\n theme: getTheme(bucket.state.name),\n change: (theme: string) => bucket.set('name', theme)\n }\n }\n return useThemeSwitcher\n}\n\nexport default createThemeSwitcher"],"names":[],"mappings":";;;;AAUA;AAEG;;AAEG;AACG;;AAEL;;AAGE;;AAEG;;AAEA;;AAEN;AACA;AACH;;"}
|