@xanui/core 1.2.62 → 1.2.63
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/package.json +1 -1
- package/theme/createTheme.cjs +1 -0
- package/theme/createTheme.cjs.map +1 -1
- package/theme/createTheme.js +1 -0
- package/theme/createTheme.js.map +1 -1
- package/theme/index.cjs +1 -0
- package/theme/index.cjs.map +1 -1
- package/theme/index.js +1 -0
- package/theme/index.js.map +1 -1
package/package.json
CHANGED
package/theme/createTheme.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTheme.cjs","sources":["../../src/theme/createTheme.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"createTheme.cjs","sources":["../../src/theme/createTheme.ts"],"sourcesContent":["\"use client\"\nimport { ThemeOptions, ThemeOptionInput, ThemeOptionsColor } from \"./types\"\nimport { mergeObject, ThemeFactory } from \"./core\"\nimport { alpha, breakpoints } from \"../css\"\nimport { darkThemeOptions, lightThemeOptions } from \"./ThemeDefaultOptions\"\n\nexport const createTheme = (name: string, options: ThemeOptionInput, mode: \"light\" | \"dark\" = \"light\"): 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 const defaultOptions = mode === 'light' ? lightThemeOptions : darkThemeOptions\n let theme: any = mergeObject(defaultOptions, {\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":";;;;;;;AAMO;AACJ;AACG;AACA;;AAEH;AACA;;AAOA;;AAEG;;;;;;AAOH;AAEA;AACH;;"}
|
package/theme/createTheme.js
CHANGED
package/theme/createTheme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTheme.js","sources":["../../src/theme/createTheme.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"createTheme.js","sources":["../../src/theme/createTheme.ts"],"sourcesContent":["\"use client\"\nimport { ThemeOptions, ThemeOptionInput, ThemeOptionsColor } from \"./types\"\nimport { mergeObject, ThemeFactory } from \"./core\"\nimport { alpha, breakpoints } from \"../css\"\nimport { darkThemeOptions, lightThemeOptions } from \"./ThemeDefaultOptions\"\n\nexport const createTheme = (name: string, options: ThemeOptionInput, mode: \"light\" | \"dark\" = \"light\"): 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 const defaultOptions = mode === 'light' ? lightThemeOptions : darkThemeOptions\n let theme: any = mergeObject(defaultOptions, {\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":";;;;;AAMO;AACJ;AACG;AACA;;AAEH;AACA;;AAOA;;AAEG;;;;;;AAOH;AAEA;AACH;;"}
|
package/theme/index.cjs
CHANGED
package/theme/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/theme/index.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/theme/index.tsx"],"sourcesContent":["\"use client\"\nimport { createTheme } from \"./createTheme\"\nimport ThemeProvider from './ThemeProvider'\nimport { getTheme, useTheme } from './core'\nimport { lightThemeOptions, darkThemeOptions } from './ThemeDefaultOptions'\nexport type { ThemeProviderProps } from './ThemeProvider'\n\nexport const themeRootClass = (theme: string) => `.xui-${theme}-theme-root`\n\nexport {\n ThemeProvider,\n createTheme,\n getTheme,\n useTheme,\n lightThemeOptions,\n darkThemeOptions\n}\n\n"],"names":[],"mappings":";;;;;;;;AAOO;;;;;"}
|
package/theme/index.js
CHANGED
package/theme/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/theme/index.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/theme/index.tsx"],"sourcesContent":["\"use client\"\nimport { createTheme } from \"./createTheme\"\nimport ThemeProvider from './ThemeProvider'\nimport { getTheme, useTheme } from './core'\nimport { lightThemeOptions, darkThemeOptions } from './ThemeDefaultOptions'\nexport type { ThemeProviderProps } from './ThemeProvider'\n\nexport const themeRootClass = (theme: string) => `.xui-${theme}-theme-root`\n\nexport {\n ThemeProvider,\n createTheme,\n getTheme,\n useTheme,\n lightThemeOptions,\n darkThemeOptions\n}\n\n"],"names":[],"mappings":";;;;;;AAOO;;"}
|