@nextui-org/theme 0.0.0-dev-v2-20230429142755 → 0.0.0-dev-v2-20230429213333
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/dist/{chunk-GDJKO7UA.mjs → chunk-DLSPUMD4.mjs} +15 -13
- package/dist/{chunk-MW7UVOSP.mjs → chunk-ZNBW4PQF.mjs} +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index.mjs +28 -28
- package/dist/components/user.js +1 -1
- package/dist/components/user.mjs +1 -1
- package/dist/index.js +13 -11
- package/dist/index.mjs +32 -32
- package/dist/plugin.d.ts +5 -0
- package/dist/plugin.js +12 -10
- package/dist/plugin.mjs +2 -2
- package/package.json +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
utilities
|
|
3
|
-
} from "./chunk-XLATS5QU.mjs";
|
|
4
1
|
import {
|
|
5
2
|
baseStyles
|
|
6
3
|
} from "./chunk-INZK6TTL.mjs";
|
|
4
|
+
import {
|
|
5
|
+
utilities
|
|
6
|
+
} from "./chunk-XLATS5QU.mjs";
|
|
7
7
|
import {
|
|
8
8
|
semanticColors
|
|
9
9
|
} from "./chunk-LQHWK6UV.mjs";
|
|
@@ -26,7 +26,7 @@ import get from "lodash.get";
|
|
|
26
26
|
import omit from "lodash.omit";
|
|
27
27
|
import deepMerge from "deepmerge";
|
|
28
28
|
var SCHEME = Symbol("color-scheme");
|
|
29
|
-
var
|
|
29
|
+
var DEFAULT_PREFIX = "nextui";
|
|
30
30
|
var dark = (colors) => {
|
|
31
31
|
return {
|
|
32
32
|
[SCHEME]: "dark",
|
|
@@ -39,7 +39,7 @@ var light = (colors) => {
|
|
|
39
39
|
...colors
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
|
-
var resolveConfig = (config = {}, defaultTheme) => {
|
|
42
|
+
var resolveConfig = (config = {}, defaultTheme, prefix) => {
|
|
43
43
|
const resolved = {
|
|
44
44
|
variants: [],
|
|
45
45
|
utilities: {},
|
|
@@ -47,7 +47,7 @@ var resolveConfig = (config = {}, defaultTheme) => {
|
|
|
47
47
|
};
|
|
48
48
|
const configObject = typeof config === "function" ? config({ dark, light }) : config;
|
|
49
49
|
forEach(configObject, (colors, themeName) => {
|
|
50
|
-
let cssSelector = `.${themeName}
|
|
50
|
+
let cssSelector = `.${themeName},[data-theme="${themeName}"]`;
|
|
51
51
|
if (themeName === defaultTheme) {
|
|
52
52
|
cssSelector = `:root,${cssSelector}`;
|
|
53
53
|
}
|
|
@@ -61,16 +61,16 @@ var resolveConfig = (config = {}, defaultTheme) => {
|
|
|
61
61
|
})
|
|
62
62
|
);
|
|
63
63
|
resolved.variants.push({
|
|
64
|
-
name:
|
|
65
|
-
definition: [`&.${themeName}`,
|
|
64
|
+
name: themeName,
|
|
65
|
+
definition: [`&.${themeName}`, `&[data-theme='${themeName}']`]
|
|
66
66
|
});
|
|
67
67
|
forEach(flatColors, (colorValue, colorName) => {
|
|
68
68
|
if (colorName === SCHEME || !colorValue)
|
|
69
69
|
return;
|
|
70
70
|
try {
|
|
71
71
|
const [h, s, l, defaultAlphaValue] = Color(colorValue).hsl().round().array();
|
|
72
|
-
const nextuiColorVariable = `--${
|
|
73
|
-
const nextuiOpacityVariable = `--${
|
|
72
|
+
const nextuiColorVariable = `--${prefix}-${colorName}`;
|
|
73
|
+
const nextuiOpacityVariable = `--${prefix}-${colorName}-opacity`;
|
|
74
74
|
resolved.utilities[cssSelector][nextuiColorVariable] = `${h} ${s}% ${l}%`;
|
|
75
75
|
if (typeof defaultAlphaValue === "number") {
|
|
76
76
|
resolved.utilities[cssSelector][nextuiOpacityVariable] = defaultAlphaValue.toFixed(2);
|
|
@@ -91,8 +91,8 @@ var resolveConfig = (config = {}, defaultTheme) => {
|
|
|
91
91
|
});
|
|
92
92
|
return resolved;
|
|
93
93
|
};
|
|
94
|
-
var corePlugin = (config = {}, defaultTheme) => {
|
|
95
|
-
const resolved = resolveConfig(config, defaultTheme);
|
|
94
|
+
var corePlugin = (config = {}, defaultTheme, prefix) => {
|
|
95
|
+
const resolved = resolveConfig(config, defaultTheme, prefix);
|
|
96
96
|
return plugin(
|
|
97
97
|
({ addBase, addUtilities, addVariant }) => {
|
|
98
98
|
addBase({
|
|
@@ -143,6 +143,7 @@ var nextui = (config = {}) => {
|
|
|
143
143
|
const userLightColors = get(themeObject, "light", {});
|
|
144
144
|
const userDarkColors = get(themeObject, "dark", {});
|
|
145
145
|
const defaultTheme = config.defaultTheme || "light";
|
|
146
|
+
const defaultPrefix = config.prefix || DEFAULT_PREFIX;
|
|
146
147
|
const otherThemes = omit(themeObject, ["light", "dark"]) || {};
|
|
147
148
|
return corePlugin(
|
|
148
149
|
{
|
|
@@ -150,7 +151,8 @@ var nextui = (config = {}) => {
|
|
|
150
151
|
dark: deepMerge(semanticColors.dark, userDarkColors),
|
|
151
152
|
...otherThemes
|
|
152
153
|
},
|
|
153
|
-
defaultTheme
|
|
154
|
+
defaultTheme,
|
|
155
|
+
defaultPrefix
|
|
154
156
|
);
|
|
155
157
|
};
|
|
156
158
|
|
|
@@ -3,7 +3,7 @@ import { tv } from "tailwind-variants";
|
|
|
3
3
|
var user = tv({
|
|
4
4
|
slots: {
|
|
5
5
|
base: [
|
|
6
|
-
"inline-flex items-center justify-center gap-2 rounded-sm",
|
|
6
|
+
"inline-flex items-center justify-center gap-2 rounded-sm outline-none",
|
|
7
7
|
"data-[focus-visible=true]:outline-none",
|
|
8
8
|
"data-[focus-visible=true]:ring-2",
|
|
9
9
|
"data-[focus-visible=true]:ring-primary",
|
package/dist/components/index.js
CHANGED
|
@@ -671,7 +671,7 @@ var import_tailwind_variants5 = require("tailwind-variants");
|
|
|
671
671
|
var user = (0, import_tailwind_variants5.tv)({
|
|
672
672
|
slots: {
|
|
673
673
|
base: [
|
|
674
|
-
"inline-flex items-center justify-center gap-2 rounded-sm",
|
|
674
|
+
"inline-flex items-center justify-center gap-2 rounded-sm outline-none",
|
|
675
675
|
"data-[focus-visible=true]:outline-none",
|
|
676
676
|
"data-[focus-visible=true]:ring-2",
|
|
677
677
|
"data-[focus-visible=true]:ring-primary",
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import "../chunk-T6HAGWX5.mjs";
|
|
2
|
-
import {
|
|
3
|
-
spinner
|
|
4
|
-
} from "../chunk-XUL76UJD.mjs";
|
|
5
|
-
import {
|
|
6
|
-
table
|
|
7
|
-
} from "../chunk-KWWWVBJL.mjs";
|
|
8
2
|
import {
|
|
9
3
|
tabs
|
|
10
4
|
} from "../chunk-UUJTS7XS.mjs";
|
|
@@ -13,13 +7,7 @@ import {
|
|
|
13
7
|
} from "../chunk-NCFXYR7C.mjs";
|
|
14
8
|
import {
|
|
15
9
|
user
|
|
16
|
-
} from "../chunk-
|
|
17
|
-
import {
|
|
18
|
-
navbar
|
|
19
|
-
} from "../chunk-U3BMJPED.mjs";
|
|
20
|
-
import {
|
|
21
|
-
pagination
|
|
22
|
-
} from "../chunk-3LME35GX.mjs";
|
|
10
|
+
} from "../chunk-ZNBW4PQF.mjs";
|
|
23
11
|
import {
|
|
24
12
|
popover
|
|
25
13
|
} from "../chunk-JWVJZEAT.mjs";
|
|
@@ -39,11 +27,11 @@ import {
|
|
|
39
27
|
spacer
|
|
40
28
|
} from "../chunk-3B4SYPW2.mjs";
|
|
41
29
|
import {
|
|
42
|
-
|
|
43
|
-
} from "../chunk-
|
|
30
|
+
spinner
|
|
31
|
+
} from "../chunk-XUL76UJD.mjs";
|
|
44
32
|
import {
|
|
45
|
-
|
|
46
|
-
} from "../chunk-
|
|
33
|
+
table
|
|
34
|
+
} from "../chunk-KWWWVBJL.mjs";
|
|
47
35
|
import {
|
|
48
36
|
image
|
|
49
37
|
} from "../chunk-6GGRJ6I7.mjs";
|
|
@@ -60,11 +48,11 @@ import {
|
|
|
60
48
|
modal
|
|
61
49
|
} from "../chunk-YMIOHWCD.mjs";
|
|
62
50
|
import {
|
|
63
|
-
|
|
64
|
-
} from "../chunk-
|
|
51
|
+
navbar
|
|
52
|
+
} from "../chunk-U3BMJPED.mjs";
|
|
65
53
|
import {
|
|
66
|
-
|
|
67
|
-
} from "../chunk-
|
|
54
|
+
pagination
|
|
55
|
+
} from "../chunk-3LME35GX.mjs";
|
|
68
56
|
import {
|
|
69
57
|
circularProgress
|
|
70
58
|
} from "../chunk-AU7WYHMP.mjs";
|
|
@@ -84,11 +72,11 @@ import {
|
|
|
84
72
|
dropdownMenu
|
|
85
73
|
} from "../chunk-FCYNUVAR.mjs";
|
|
86
74
|
import {
|
|
87
|
-
|
|
88
|
-
} from "../chunk-
|
|
75
|
+
dropdownSection
|
|
76
|
+
} from "../chunk-AVGEHFT4.mjs";
|
|
89
77
|
import {
|
|
90
|
-
|
|
91
|
-
} from "../chunk-
|
|
78
|
+
dropdown
|
|
79
|
+
} from "../chunk-UNMHV7HH.mjs";
|
|
92
80
|
import {
|
|
93
81
|
avatar
|
|
94
82
|
} from "../chunk-S7ZC2I7Y.mjs";
|
|
@@ -101,18 +89,30 @@ import {
|
|
|
101
89
|
import {
|
|
102
90
|
button
|
|
103
91
|
} from "../chunk-UM54LZPC.mjs";
|
|
104
|
-
import "../chunk-CMYR6AOY.mjs";
|
|
105
|
-
import "../chunk-K7LK7NCE.mjs";
|
|
106
|
-
import "../chunk-RO3WUCFF.mjs";
|
|
107
92
|
import {
|
|
108
93
|
card
|
|
109
94
|
} from "../chunk-6QKRZ3JE.mjs";
|
|
110
95
|
import {
|
|
111
96
|
checkboxGroup
|
|
112
97
|
} from "../chunk-U77YMEWM.mjs";
|
|
98
|
+
import {
|
|
99
|
+
checkbox
|
|
100
|
+
} from "../chunk-7EKGN7JP.mjs";
|
|
101
|
+
import {
|
|
102
|
+
chip
|
|
103
|
+
} from "../chunk-W5WYYDCM.mjs";
|
|
104
|
+
import "../chunk-CMYR6AOY.mjs";
|
|
105
|
+
import "../chunk-K7LK7NCE.mjs";
|
|
106
|
+
import "../chunk-RO3WUCFF.mjs";
|
|
113
107
|
import {
|
|
114
108
|
accordionItem
|
|
115
109
|
} from "../chunk-XSFH4S4Y.mjs";
|
|
110
|
+
import {
|
|
111
|
+
accordion
|
|
112
|
+
} from "../chunk-YYBLBQIV.mjs";
|
|
113
|
+
import {
|
|
114
|
+
avatarGroup
|
|
115
|
+
} from "../chunk-MLH3XSY7.mjs";
|
|
116
116
|
import "../chunk-INZK6TTL.mjs";
|
|
117
117
|
export {
|
|
118
118
|
accordion,
|
package/dist/components/user.js
CHANGED
|
@@ -27,7 +27,7 @@ var import_tailwind_variants = require("tailwind-variants");
|
|
|
27
27
|
var user = (0, import_tailwind_variants.tv)({
|
|
28
28
|
slots: {
|
|
29
29
|
base: [
|
|
30
|
-
"inline-flex items-center justify-center gap-2 rounded-sm",
|
|
30
|
+
"inline-flex items-center justify-center gap-2 rounded-sm outline-none",
|
|
31
31
|
"data-[focus-visible=true]:outline-none",
|
|
32
32
|
"data-[focus-visible=true]:ring-2",
|
|
33
33
|
"data-[focus-visible=true]:ring-primary",
|
package/dist/components/user.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -703,7 +703,7 @@ var import_tailwind_variants5 = require("tailwind-variants");
|
|
|
703
703
|
var user = (0, import_tailwind_variants5.tv)({
|
|
704
704
|
slots: {
|
|
705
705
|
base: [
|
|
706
|
-
"inline-flex items-center justify-center gap-2 rounded-sm",
|
|
706
|
+
"inline-flex items-center justify-center gap-2 rounded-sm outline-none",
|
|
707
707
|
"data-[focus-visible=true]:outline-none",
|
|
708
708
|
"data-[focus-visible=true]:ring-2",
|
|
709
709
|
"data-[focus-visible=true]:ring-primary",
|
|
@@ -6626,7 +6626,7 @@ var utilities = {
|
|
|
6626
6626
|
|
|
6627
6627
|
// src/plugin.ts
|
|
6628
6628
|
var SCHEME = Symbol("color-scheme");
|
|
6629
|
-
var
|
|
6629
|
+
var DEFAULT_PREFIX = "nextui";
|
|
6630
6630
|
var dark = (colors2) => {
|
|
6631
6631
|
return {
|
|
6632
6632
|
[SCHEME]: "dark",
|
|
@@ -6639,7 +6639,7 @@ var light2 = (colors2) => {
|
|
|
6639
6639
|
...colors2
|
|
6640
6640
|
};
|
|
6641
6641
|
};
|
|
6642
|
-
var resolveConfig = (config = {}, defaultTheme) => {
|
|
6642
|
+
var resolveConfig = (config = {}, defaultTheme, prefix) => {
|
|
6643
6643
|
const resolved = {
|
|
6644
6644
|
variants: [],
|
|
6645
6645
|
utilities: {},
|
|
@@ -6647,7 +6647,7 @@ var resolveConfig = (config = {}, defaultTheme) => {
|
|
|
6647
6647
|
};
|
|
6648
6648
|
const configObject = typeof config === "function" ? config({ dark, light: light2 }) : config;
|
|
6649
6649
|
(0, import_lodash.default)(configObject, (colors2, themeName) => {
|
|
6650
|
-
let cssSelector = `.${themeName}
|
|
6650
|
+
let cssSelector = `.${themeName},[data-theme="${themeName}"]`;
|
|
6651
6651
|
if (themeName === defaultTheme) {
|
|
6652
6652
|
cssSelector = `:root,${cssSelector}`;
|
|
6653
6653
|
}
|
|
@@ -6661,16 +6661,16 @@ var resolveConfig = (config = {}, defaultTheme) => {
|
|
|
6661
6661
|
})
|
|
6662
6662
|
);
|
|
6663
6663
|
resolved.variants.push({
|
|
6664
|
-
name:
|
|
6665
|
-
definition: [`&.${themeName}`,
|
|
6664
|
+
name: themeName,
|
|
6665
|
+
definition: [`&.${themeName}`, `&[data-theme='${themeName}']`]
|
|
6666
6666
|
});
|
|
6667
6667
|
(0, import_lodash.default)(flatColors, (colorValue, colorName) => {
|
|
6668
6668
|
if (colorName === SCHEME || !colorValue)
|
|
6669
6669
|
return;
|
|
6670
6670
|
try {
|
|
6671
6671
|
const [h, s, l, defaultAlphaValue] = (0, import_color.default)(colorValue).hsl().round().array();
|
|
6672
|
-
const nextuiColorVariable = `--${
|
|
6673
|
-
const nextuiOpacityVariable = `--${
|
|
6672
|
+
const nextuiColorVariable = `--${prefix}-${colorName}`;
|
|
6673
|
+
const nextuiOpacityVariable = `--${prefix}-${colorName}-opacity`;
|
|
6674
6674
|
resolved.utilities[cssSelector][nextuiColorVariable] = `${h} ${s}% ${l}%`;
|
|
6675
6675
|
if (typeof defaultAlphaValue === "number") {
|
|
6676
6676
|
resolved.utilities[cssSelector][nextuiOpacityVariable] = defaultAlphaValue.toFixed(2);
|
|
@@ -6691,8 +6691,8 @@ var resolveConfig = (config = {}, defaultTheme) => {
|
|
|
6691
6691
|
});
|
|
6692
6692
|
return resolved;
|
|
6693
6693
|
};
|
|
6694
|
-
var corePlugin = (config = {}, defaultTheme) => {
|
|
6695
|
-
const resolved = resolveConfig(config, defaultTheme);
|
|
6694
|
+
var corePlugin = (config = {}, defaultTheme, prefix) => {
|
|
6695
|
+
const resolved = resolveConfig(config, defaultTheme, prefix);
|
|
6696
6696
|
return (0, import_plugin.default)(
|
|
6697
6697
|
({ addBase, addUtilities, addVariant }) => {
|
|
6698
6698
|
addBase({
|
|
@@ -6743,6 +6743,7 @@ var nextui = (config = {}) => {
|
|
|
6743
6743
|
const userLightColors = (0, import_lodash2.default)(themeObject, "light", {});
|
|
6744
6744
|
const userDarkColors = (0, import_lodash2.default)(themeObject, "dark", {});
|
|
6745
6745
|
const defaultTheme = config.defaultTheme || "light";
|
|
6746
|
+
const defaultPrefix = config.prefix || DEFAULT_PREFIX;
|
|
6746
6747
|
const otherThemes = (0, import_lodash3.default)(themeObject, ["light", "dark"]) || {};
|
|
6747
6748
|
return corePlugin(
|
|
6748
6749
|
{
|
|
@@ -6750,7 +6751,8 @@ var nextui = (config = {}) => {
|
|
|
6750
6751
|
dark: (0, import_deepmerge.default)(semanticColors.dark, userDarkColors),
|
|
6751
6752
|
...otherThemes
|
|
6752
6753
|
},
|
|
6753
|
-
defaultTheme
|
|
6754
|
+
defaultTheme,
|
|
6755
|
+
defaultPrefix
|
|
6754
6756
|
);
|
|
6755
6757
|
};
|
|
6756
6758
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import "./chunk-T6HAGWX5.mjs";
|
|
2
|
-
import {
|
|
3
|
-
spinner
|
|
4
|
-
} from "./chunk-XUL76UJD.mjs";
|
|
5
|
-
import {
|
|
6
|
-
table
|
|
7
|
-
} from "./chunk-KWWWVBJL.mjs";
|
|
8
2
|
import {
|
|
9
3
|
tabs
|
|
10
4
|
} from "./chunk-UUJTS7XS.mjs";
|
|
@@ -13,13 +7,7 @@ import {
|
|
|
13
7
|
} from "./chunk-NCFXYR7C.mjs";
|
|
14
8
|
import {
|
|
15
9
|
user
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import {
|
|
18
|
-
navbar
|
|
19
|
-
} from "./chunk-U3BMJPED.mjs";
|
|
20
|
-
import {
|
|
21
|
-
pagination
|
|
22
|
-
} from "./chunk-3LME35GX.mjs";
|
|
10
|
+
} from "./chunk-ZNBW4PQF.mjs";
|
|
23
11
|
import {
|
|
24
12
|
popover
|
|
25
13
|
} from "./chunk-JWVJZEAT.mjs";
|
|
@@ -39,11 +27,11 @@ import {
|
|
|
39
27
|
spacer
|
|
40
28
|
} from "./chunk-3B4SYPW2.mjs";
|
|
41
29
|
import {
|
|
42
|
-
|
|
43
|
-
} from "./chunk-
|
|
30
|
+
spinner
|
|
31
|
+
} from "./chunk-XUL76UJD.mjs";
|
|
44
32
|
import {
|
|
45
|
-
|
|
46
|
-
} from "./chunk-
|
|
33
|
+
table
|
|
34
|
+
} from "./chunk-KWWWVBJL.mjs";
|
|
47
35
|
import {
|
|
48
36
|
image
|
|
49
37
|
} from "./chunk-6GGRJ6I7.mjs";
|
|
@@ -60,11 +48,11 @@ import {
|
|
|
60
48
|
modal
|
|
61
49
|
} from "./chunk-YMIOHWCD.mjs";
|
|
62
50
|
import {
|
|
63
|
-
|
|
64
|
-
} from "./chunk-
|
|
51
|
+
navbar
|
|
52
|
+
} from "./chunk-U3BMJPED.mjs";
|
|
65
53
|
import {
|
|
66
|
-
|
|
67
|
-
} from "./chunk-
|
|
54
|
+
pagination
|
|
55
|
+
} from "./chunk-3LME35GX.mjs";
|
|
68
56
|
import {
|
|
69
57
|
circularProgress
|
|
70
58
|
} from "./chunk-AU7WYHMP.mjs";
|
|
@@ -84,11 +72,11 @@ import {
|
|
|
84
72
|
dropdownMenu
|
|
85
73
|
} from "./chunk-FCYNUVAR.mjs";
|
|
86
74
|
import {
|
|
87
|
-
|
|
88
|
-
} from "./chunk-
|
|
75
|
+
dropdownSection
|
|
76
|
+
} from "./chunk-AVGEHFT4.mjs";
|
|
89
77
|
import {
|
|
90
|
-
|
|
91
|
-
} from "./chunk-
|
|
78
|
+
dropdown
|
|
79
|
+
} from "./chunk-UNMHV7HH.mjs";
|
|
92
80
|
import {
|
|
93
81
|
avatar
|
|
94
82
|
} from "./chunk-S7ZC2I7Y.mjs";
|
|
@@ -101,24 +89,35 @@ import {
|
|
|
101
89
|
import {
|
|
102
90
|
button
|
|
103
91
|
} from "./chunk-UM54LZPC.mjs";
|
|
104
|
-
import "./chunk-CMYR6AOY.mjs";
|
|
105
|
-
import "./chunk-K7LK7NCE.mjs";
|
|
106
|
-
import {
|
|
107
|
-
colorVariants
|
|
108
|
-
} from "./chunk-RO3WUCFF.mjs";
|
|
109
92
|
import {
|
|
110
93
|
card
|
|
111
94
|
} from "./chunk-6QKRZ3JE.mjs";
|
|
112
95
|
import {
|
|
113
96
|
checkboxGroup
|
|
114
97
|
} from "./chunk-U77YMEWM.mjs";
|
|
98
|
+
import {
|
|
99
|
+
checkbox
|
|
100
|
+
} from "./chunk-7EKGN7JP.mjs";
|
|
101
|
+
import {
|
|
102
|
+
chip
|
|
103
|
+
} from "./chunk-W5WYYDCM.mjs";
|
|
104
|
+
import "./chunk-CMYR6AOY.mjs";
|
|
105
|
+
import "./chunk-K7LK7NCE.mjs";
|
|
106
|
+
import {
|
|
107
|
+
colorVariants
|
|
108
|
+
} from "./chunk-RO3WUCFF.mjs";
|
|
115
109
|
import {
|
|
116
110
|
accordionItem
|
|
117
111
|
} from "./chunk-XSFH4S4Y.mjs";
|
|
112
|
+
import {
|
|
113
|
+
accordion
|
|
114
|
+
} from "./chunk-YYBLBQIV.mjs";
|
|
115
|
+
import {
|
|
116
|
+
avatarGroup
|
|
117
|
+
} from "./chunk-MLH3XSY7.mjs";
|
|
118
118
|
import {
|
|
119
119
|
nextui
|
|
120
|
-
} from "./chunk-
|
|
121
|
-
import "./chunk-XLATS5QU.mjs";
|
|
120
|
+
} from "./chunk-DLSPUMD4.mjs";
|
|
122
121
|
import {
|
|
123
122
|
absoluteFullClasses,
|
|
124
123
|
baseStyles,
|
|
@@ -126,6 +125,7 @@ import {
|
|
|
126
125
|
ringClasses,
|
|
127
126
|
translateCenterClasses
|
|
128
127
|
} from "./chunk-INZK6TTL.mjs";
|
|
128
|
+
import "./chunk-XLATS5QU.mjs";
|
|
129
129
|
import "./chunk-WQEDQHKX.mjs";
|
|
130
130
|
import {
|
|
131
131
|
colors
|
package/dist/plugin.d.ts
CHANGED
|
@@ -21,6 +21,11 @@ type ConfigFunction = ({ light, dark, }: {
|
|
|
21
21
|
dark: SchemerFn<"dark">;
|
|
22
22
|
}) => ConfigObject;
|
|
23
23
|
type NextUIConfig = {
|
|
24
|
+
/**
|
|
25
|
+
* The prefix for the css variables.
|
|
26
|
+
* @default "nextui"
|
|
27
|
+
*/
|
|
28
|
+
prefix?: string;
|
|
24
29
|
/**
|
|
25
30
|
* The theme definitions.
|
|
26
31
|
*/
|
package/dist/plugin.js
CHANGED
|
@@ -466,7 +466,7 @@ var baseStyles = {
|
|
|
466
466
|
|
|
467
467
|
// src/plugin.ts
|
|
468
468
|
var SCHEME = Symbol("color-scheme");
|
|
469
|
-
var
|
|
469
|
+
var DEFAULT_PREFIX = "nextui";
|
|
470
470
|
var dark = (colors2) => {
|
|
471
471
|
return {
|
|
472
472
|
[SCHEME]: "dark",
|
|
@@ -479,7 +479,7 @@ var light = (colors2) => {
|
|
|
479
479
|
...colors2
|
|
480
480
|
};
|
|
481
481
|
};
|
|
482
|
-
var resolveConfig = (config = {}, defaultTheme) => {
|
|
482
|
+
var resolveConfig = (config = {}, defaultTheme, prefix) => {
|
|
483
483
|
const resolved = {
|
|
484
484
|
variants: [],
|
|
485
485
|
utilities: {},
|
|
@@ -487,7 +487,7 @@ var resolveConfig = (config = {}, defaultTheme) => {
|
|
|
487
487
|
};
|
|
488
488
|
const configObject = typeof config === "function" ? config({ dark, light }) : config;
|
|
489
489
|
(0, import_lodash.default)(configObject, (colors2, themeName) => {
|
|
490
|
-
let cssSelector = `.${themeName}
|
|
490
|
+
let cssSelector = `.${themeName},[data-theme="${themeName}"]`;
|
|
491
491
|
if (themeName === defaultTheme) {
|
|
492
492
|
cssSelector = `:root,${cssSelector}`;
|
|
493
493
|
}
|
|
@@ -501,16 +501,16 @@ var resolveConfig = (config = {}, defaultTheme) => {
|
|
|
501
501
|
})
|
|
502
502
|
);
|
|
503
503
|
resolved.variants.push({
|
|
504
|
-
name:
|
|
505
|
-
definition: [`&.${themeName}`,
|
|
504
|
+
name: themeName,
|
|
505
|
+
definition: [`&.${themeName}`, `&[data-theme='${themeName}']`]
|
|
506
506
|
});
|
|
507
507
|
(0, import_lodash.default)(flatColors, (colorValue, colorName) => {
|
|
508
508
|
if (colorName === SCHEME || !colorValue)
|
|
509
509
|
return;
|
|
510
510
|
try {
|
|
511
511
|
const [h, s, l, defaultAlphaValue] = (0, import_color.default)(colorValue).hsl().round().array();
|
|
512
|
-
const nextuiColorVariable = `--${
|
|
513
|
-
const nextuiOpacityVariable = `--${
|
|
512
|
+
const nextuiColorVariable = `--${prefix}-${colorName}`;
|
|
513
|
+
const nextuiOpacityVariable = `--${prefix}-${colorName}-opacity`;
|
|
514
514
|
resolved.utilities[cssSelector][nextuiColorVariable] = `${h} ${s}% ${l}%`;
|
|
515
515
|
if (typeof defaultAlphaValue === "number") {
|
|
516
516
|
resolved.utilities[cssSelector][nextuiOpacityVariable] = defaultAlphaValue.toFixed(2);
|
|
@@ -531,8 +531,8 @@ var resolveConfig = (config = {}, defaultTheme) => {
|
|
|
531
531
|
});
|
|
532
532
|
return resolved;
|
|
533
533
|
};
|
|
534
|
-
var corePlugin = (config = {}, defaultTheme) => {
|
|
535
|
-
const resolved = resolveConfig(config, defaultTheme);
|
|
534
|
+
var corePlugin = (config = {}, defaultTheme, prefix) => {
|
|
535
|
+
const resolved = resolveConfig(config, defaultTheme, prefix);
|
|
536
536
|
return (0, import_plugin.default)(
|
|
537
537
|
({ addBase, addUtilities, addVariant }) => {
|
|
538
538
|
addBase({
|
|
@@ -583,6 +583,7 @@ var nextui = (config = {}) => {
|
|
|
583
583
|
const userLightColors = (0, import_lodash2.default)(themeObject, "light", {});
|
|
584
584
|
const userDarkColors = (0, import_lodash2.default)(themeObject, "dark", {});
|
|
585
585
|
const defaultTheme = config.defaultTheme || "light";
|
|
586
|
+
const defaultPrefix = config.prefix || DEFAULT_PREFIX;
|
|
586
587
|
const otherThemes = (0, import_lodash3.default)(themeObject, ["light", "dark"]) || {};
|
|
587
588
|
return corePlugin(
|
|
588
589
|
{
|
|
@@ -590,7 +591,8 @@ var nextui = (config = {}) => {
|
|
|
590
591
|
dark: (0, import_deepmerge.default)(semanticColors.dark, userDarkColors),
|
|
591
592
|
...otherThemes
|
|
592
593
|
},
|
|
593
|
-
defaultTheme
|
|
594
|
+
defaultTheme,
|
|
595
|
+
defaultPrefix
|
|
594
596
|
);
|
|
595
597
|
};
|
|
596
598
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/plugin.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
nextui
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-XLATS5QU.mjs";
|
|
3
|
+
} from "./chunk-DLSPUMD4.mjs";
|
|
5
4
|
import "./chunk-INZK6TTL.mjs";
|
|
5
|
+
import "./chunk-XLATS5QU.mjs";
|
|
6
6
|
import "./chunk-WQEDQHKX.mjs";
|
|
7
7
|
import "./chunk-M74ZSXB7.mjs";
|
|
8
8
|
import "./chunk-LQHWK6UV.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextui-org/theme",
|
|
3
|
-
"version": "0.0.0-dev-v2-
|
|
3
|
+
"version": "0.0.0-dev-v2-20230429213333",
|
|
4
4
|
"description": "The default theme for NextUI components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"theme",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"lodash.get": "^4.4.2",
|
|
47
47
|
"lodash.isempty": "^4.4.0",
|
|
48
48
|
"lodash.omit": "^4.5.0",
|
|
49
|
-
"tailwind-variants": "^0.1.
|
|
49
|
+
"tailwind-variants": "^0.1.5",
|
|
50
50
|
"tailwindcss": "^3.2.7"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|