@nextui-org/theme 0.0.0-dev-v2-20230429140802 → 0.0.0-dev-v2-20230429142755

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.
@@ -4,15 +4,15 @@ import {
4
4
  import {
5
5
  baseStyles
6
6
  } from "./chunk-INZK6TTL.mjs";
7
- import {
8
- animations
9
- } from "./chunk-DMASP6FA.mjs";
10
7
  import {
11
8
  semanticColors
12
9
  } from "./chunk-LQHWK6UV.mjs";
13
10
  import {
14
11
  removeDefaultKeys
15
12
  } from "./chunk-37PIXVP4.mjs";
13
+ import {
14
+ animations
15
+ } from "./chunk-DMASP6FA.mjs";
16
16
  import {
17
17
  commonColors
18
18
  } from "./chunk-CRCBVLUP.mjs";
@@ -139,10 +139,11 @@ var corePlugin = (config = {}, defaultTheme) => {
139
139
  );
140
140
  };
141
141
  var nextui = (config = {}) => {
142
- const userLightColors = get(config.themes, "light", {});
143
- const userDarkColors = get(config.themes, "dark", {});
142
+ const themeObject = typeof config.themes === "function" ? config.themes({ dark, light }) : config.themes;
143
+ const userLightColors = get(themeObject, "light", {});
144
+ const userDarkColors = get(themeObject, "dark", {});
144
145
  const defaultTheme = config.defaultTheme || "light";
145
- const otherThemes = omit(config.themes, ["light", "dark"]) || {};
146
+ const otherThemes = omit(themeObject, ["light", "dark"]) || {};
146
147
  return corePlugin(
147
148
  {
148
149
  light: deepMerge(semanticColors.light, userLightColors),
package/dist/index.js CHANGED
@@ -6739,10 +6739,11 @@ var corePlugin = (config = {}, defaultTheme) => {
6739
6739
  );
6740
6740
  };
6741
6741
  var nextui = (config = {}) => {
6742
- const userLightColors = (0, import_lodash2.default)(config.themes, "light", {});
6743
- const userDarkColors = (0, import_lodash2.default)(config.themes, "dark", {});
6742
+ const themeObject = typeof config.themes === "function" ? config.themes({ dark, light: light2 }) : config.themes;
6743
+ const userLightColors = (0, import_lodash2.default)(themeObject, "light", {});
6744
+ const userDarkColors = (0, import_lodash2.default)(themeObject, "dark", {});
6744
6745
  const defaultTheme = config.defaultTheme || "light";
6745
- const otherThemes = (0, import_lodash3.default)(config.themes, ["light", "dark"]) || {};
6746
+ const otherThemes = (0, import_lodash3.default)(themeObject, ["light", "dark"]) || {};
6746
6747
  return corePlugin(
6747
6748
  {
6748
6749
  light: (0, import_deepmerge.default)(semanticColors.light, userLightColors),
package/dist/index.mjs CHANGED
@@ -117,7 +117,7 @@ import {
117
117
  } from "./chunk-XSFH4S4Y.mjs";
118
118
  import {
119
119
  nextui
120
- } from "./chunk-PTN3XJU3.mjs";
120
+ } from "./chunk-GDJKO7UA.mjs";
121
121
  import "./chunk-XLATS5QU.mjs";
122
122
  import {
123
123
  absoluteFullClasses,
@@ -126,7 +126,6 @@ import {
126
126
  ringClasses,
127
127
  translateCenterClasses
128
128
  } from "./chunk-INZK6TTL.mjs";
129
- import "./chunk-DMASP6FA.mjs";
130
129
  import "./chunk-WQEDQHKX.mjs";
131
130
  import {
132
131
  colors
@@ -136,6 +135,7 @@ import {
136
135
  } from "./chunk-LQHWK6UV.mjs";
137
136
  import "./chunk-37PIXVP4.mjs";
138
137
  import "./chunk-M63AFAHO.mjs";
138
+ import "./chunk-DMASP6FA.mjs";
139
139
  import {
140
140
  commonColors
141
141
  } from "./chunk-CRCBVLUP.mjs";
package/dist/plugin.js CHANGED
@@ -579,10 +579,11 @@ var corePlugin = (config = {}, defaultTheme) => {
579
579
  );
580
580
  };
581
581
  var nextui = (config = {}) => {
582
- const userLightColors = (0, import_lodash2.default)(config.themes, "light", {});
583
- const userDarkColors = (0, import_lodash2.default)(config.themes, "dark", {});
582
+ const themeObject = typeof config.themes === "function" ? config.themes({ dark, light }) : config.themes;
583
+ const userLightColors = (0, import_lodash2.default)(themeObject, "light", {});
584
+ const userDarkColors = (0, import_lodash2.default)(themeObject, "dark", {});
584
585
  const defaultTheme = config.defaultTheme || "light";
585
- const otherThemes = (0, import_lodash3.default)(config.themes, ["light", "dark"]) || {};
586
+ const otherThemes = (0, import_lodash3.default)(themeObject, ["light", "dark"]) || {};
586
587
  return corePlugin(
587
588
  {
588
589
  light: (0, import_deepmerge.default)(semanticColors.light, userLightColors),
package/dist/plugin.mjs CHANGED
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  nextui
3
- } from "./chunk-PTN3XJU3.mjs";
3
+ } from "./chunk-GDJKO7UA.mjs";
4
4
  import "./chunk-XLATS5QU.mjs";
5
5
  import "./chunk-INZK6TTL.mjs";
6
- import "./chunk-DMASP6FA.mjs";
7
6
  import "./chunk-WQEDQHKX.mjs";
8
7
  import "./chunk-M74ZSXB7.mjs";
9
8
  import "./chunk-LQHWK6UV.mjs";
10
9
  import "./chunk-37PIXVP4.mjs";
11
10
  import "./chunk-M63AFAHO.mjs";
11
+ import "./chunk-DMASP6FA.mjs";
12
12
  import "./chunk-CRCBVLUP.mjs";
13
13
  import "./chunk-DCEG5LGX.mjs";
14
14
  import "./chunk-L2OL7R23.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextui-org/theme",
3
- "version": "0.0.0-dev-v2-20230429140802",
3
+ "version": "0.0.0-dev-v2-20230429142755",
4
4
  "description": "The default theme for NextUI components",
5
5
  "keywords": [
6
6
  "theme",