@nextui-org/theme 0.0.0-dev-v2-20230429140802 → 0.0.0-dev-v2-20230429144144
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-LQHWK6UV.mjs → chunk-BQIK46CL.mjs} +3 -3
- package/dist/{chunk-PTN3XJU3.mjs → chunk-ICY3VMUC.mjs} +22 -19
- package/dist/{chunk-M74ZSXB7.mjs → chunk-RJPRNGM4.mjs} +2 -2
- package/dist/colors/common.mjs +4 -4
- package/dist/colors/index.mjs +8 -8
- package/dist/colors/semantic.mjs +6 -6
- package/dist/colors.mjs +8 -8
- package/dist/components/index.mjs +44 -44
- package/dist/index.js +16 -13
- package/dist/index.mjs +65 -65
- package/dist/plugin.d.ts +5 -0
- package/dist/plugin.js +16 -13
- package/dist/plugin.mjs +9 -9
- package/package.json +1 -1
- package/dist/{chunk-CRCBVLUP.mjs → chunk-H3O7TP7Y.mjs} +9 -9
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
utilities
|
|
3
3
|
} from "./chunk-XLATS5QU.mjs";
|
|
4
|
-
import {
|
|
5
|
-
baseStyles
|
|
6
|
-
} from "./chunk-INZK6TTL.mjs";
|
|
7
4
|
import {
|
|
8
5
|
animations
|
|
9
6
|
} from "./chunk-DMASP6FA.mjs";
|
|
10
7
|
import {
|
|
11
8
|
semanticColors
|
|
12
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BQIK46CL.mjs";
|
|
10
|
+
import {
|
|
11
|
+
commonColors
|
|
12
|
+
} from "./chunk-H3O7TP7Y.mjs";
|
|
13
13
|
import {
|
|
14
14
|
removeDefaultKeys
|
|
15
15
|
} from "./chunk-37PIXVP4.mjs";
|
|
16
16
|
import {
|
|
17
|
-
|
|
18
|
-
} from "./chunk-
|
|
17
|
+
baseStyles
|
|
18
|
+
} from "./chunk-INZK6TTL.mjs";
|
|
19
19
|
|
|
20
20
|
// src/plugin.ts
|
|
21
21
|
import Color from "color";
|
|
@@ -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({
|
|
@@ -139,17 +139,20 @@ var corePlugin = (config = {}, defaultTheme) => {
|
|
|
139
139
|
);
|
|
140
140
|
};
|
|
141
141
|
var nextui = (config = {}) => {
|
|
142
|
-
const
|
|
143
|
-
const
|
|
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
|
|
146
|
+
const defaultPrefix = config.prefix || DEFAULT_PREFIX;
|
|
147
|
+
const otherThemes = omit(themeObject, ["light", "dark"]) || {};
|
|
146
148
|
return corePlugin(
|
|
147
149
|
{
|
|
148
150
|
light: deepMerge(semanticColors.light, userLightColors),
|
|
149
151
|
dark: deepMerge(semanticColors.dark, userDarkColors),
|
|
150
152
|
...otherThemes
|
|
151
153
|
},
|
|
152
|
-
defaultTheme
|
|
154
|
+
defaultTheme,
|
|
155
|
+
defaultPrefix
|
|
153
156
|
);
|
|
154
157
|
};
|
|
155
158
|
|
package/dist/colors/common.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
commonColors
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-H3O7TP7Y.mjs";
|
|
4
|
+
import "../chunk-Y4YW5MKL.mjs";
|
|
5
|
+
import "../chunk-T3GWIVAM.mjs";
|
|
6
|
+
import "../chunk-OR5PUD24.mjs";
|
|
4
7
|
import "../chunk-DCEG5LGX.mjs";
|
|
5
8
|
import "../chunk-L2OL7R23.mjs";
|
|
6
9
|
import "../chunk-YZYGFPNK.mjs";
|
|
7
|
-
import "../chunk-Y4YW5MKL.mjs";
|
|
8
10
|
import "../chunk-KZJBCC2H.mjs";
|
|
9
|
-
import "../chunk-T3GWIVAM.mjs";
|
|
10
|
-
import "../chunk-OR5PUD24.mjs";
|
|
11
11
|
export {
|
|
12
12
|
commonColors
|
|
13
13
|
};
|
package/dist/colors/index.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
colors
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-RJPRNGM4.mjs";
|
|
4
|
+
import "../chunk-M63AFAHO.mjs";
|
|
4
5
|
import {
|
|
5
6
|
semanticColors
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-37PIXVP4.mjs";
|
|
8
|
-
import "../chunk-M63AFAHO.mjs";
|
|
7
|
+
} from "../chunk-BQIK46CL.mjs";
|
|
9
8
|
import {
|
|
10
9
|
commonColors
|
|
11
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-H3O7TP7Y.mjs";
|
|
11
|
+
import "../chunk-Y4YW5MKL.mjs";
|
|
12
|
+
import "../chunk-T3GWIVAM.mjs";
|
|
13
|
+
import "../chunk-OR5PUD24.mjs";
|
|
12
14
|
import "../chunk-DCEG5LGX.mjs";
|
|
13
15
|
import "../chunk-L2OL7R23.mjs";
|
|
14
16
|
import "../chunk-YZYGFPNK.mjs";
|
|
15
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-37PIXVP4.mjs";
|
|
16
18
|
import "../chunk-KZJBCC2H.mjs";
|
|
17
|
-
import "../chunk-T3GWIVAM.mjs";
|
|
18
|
-
import "../chunk-OR5PUD24.mjs";
|
|
19
19
|
export {
|
|
20
20
|
colors,
|
|
21
21
|
commonColors,
|
package/dist/colors/semantic.mjs
CHANGED
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
semanticColors,
|
|
3
3
|
semanticColorsDark,
|
|
4
4
|
semanticColorsLight
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-BQIK46CL.mjs";
|
|
6
|
+
import "../chunk-H3O7TP7Y.mjs";
|
|
7
|
+
import "../chunk-Y4YW5MKL.mjs";
|
|
8
|
+
import "../chunk-T3GWIVAM.mjs";
|
|
9
|
+
import "../chunk-OR5PUD24.mjs";
|
|
8
10
|
import "../chunk-DCEG5LGX.mjs";
|
|
9
11
|
import "../chunk-L2OL7R23.mjs";
|
|
10
12
|
import "../chunk-YZYGFPNK.mjs";
|
|
11
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-37PIXVP4.mjs";
|
|
12
14
|
import "../chunk-KZJBCC2H.mjs";
|
|
13
|
-
import "../chunk-T3GWIVAM.mjs";
|
|
14
|
-
import "../chunk-OR5PUD24.mjs";
|
|
15
15
|
export {
|
|
16
16
|
semanticColors,
|
|
17
17
|
semanticColorsDark,
|
package/dist/colors.mjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import "./chunk-WQEDQHKX.mjs";
|
|
2
2
|
import {
|
|
3
3
|
colors
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RJPRNGM4.mjs";
|
|
5
|
+
import "./chunk-M63AFAHO.mjs";
|
|
5
6
|
import {
|
|
6
7
|
semanticColors
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-37PIXVP4.mjs";
|
|
9
|
-
import "./chunk-M63AFAHO.mjs";
|
|
8
|
+
} from "./chunk-BQIK46CL.mjs";
|
|
10
9
|
import {
|
|
11
10
|
commonColors
|
|
12
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-H3O7TP7Y.mjs";
|
|
12
|
+
import "./chunk-Y4YW5MKL.mjs";
|
|
13
|
+
import "./chunk-T3GWIVAM.mjs";
|
|
14
|
+
import "./chunk-OR5PUD24.mjs";
|
|
13
15
|
import "./chunk-DCEG5LGX.mjs";
|
|
14
16
|
import "./chunk-L2OL7R23.mjs";
|
|
15
17
|
import "./chunk-YZYGFPNK.mjs";
|
|
16
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-37PIXVP4.mjs";
|
|
17
19
|
import "./chunk-KZJBCC2H.mjs";
|
|
18
|
-
import "./chunk-T3GWIVAM.mjs";
|
|
19
|
-
import "./chunk-OR5PUD24.mjs";
|
|
20
20
|
export {
|
|
21
21
|
colors,
|
|
22
22
|
commonColors,
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import "../chunk-T6HAGWX5.mjs";
|
|
2
|
+
import {
|
|
3
|
+
user
|
|
4
|
+
} from "../chunk-MW7UVOSP.mjs";
|
|
5
|
+
import {
|
|
6
|
+
radioGroup
|
|
7
|
+
} from "../chunk-HHWXPWYN.mjs";
|
|
8
|
+
import {
|
|
9
|
+
radio
|
|
10
|
+
} from "../chunk-OZPCO5UB.mjs";
|
|
11
|
+
import {
|
|
12
|
+
snippet
|
|
13
|
+
} from "../chunk-4XSCIGTZ.mjs";
|
|
14
|
+
import {
|
|
15
|
+
spacer
|
|
16
|
+
} from "../chunk-3B4SYPW2.mjs";
|
|
2
17
|
import {
|
|
3
18
|
spinner
|
|
4
19
|
} from "../chunk-XUL76UJD.mjs";
|
|
@@ -12,8 +27,17 @@ import {
|
|
|
12
27
|
toggle
|
|
13
28
|
} from "../chunk-NCFXYR7C.mjs";
|
|
14
29
|
import {
|
|
15
|
-
|
|
16
|
-
} from "../chunk-
|
|
30
|
+
input
|
|
31
|
+
} from "../chunk-PH4OFVEH.mjs";
|
|
32
|
+
import {
|
|
33
|
+
kbd
|
|
34
|
+
} from "../chunk-KUQBSI5S.mjs";
|
|
35
|
+
import {
|
|
36
|
+
link
|
|
37
|
+
} from "../chunk-XICTHLAR.mjs";
|
|
38
|
+
import {
|
|
39
|
+
modal
|
|
40
|
+
} from "../chunk-YMIOHWCD.mjs";
|
|
17
41
|
import {
|
|
18
42
|
navbar
|
|
19
43
|
} from "../chunk-U3BMJPED.mjs";
|
|
@@ -27,17 +51,17 @@ import {
|
|
|
27
51
|
progress
|
|
28
52
|
} from "../chunk-O42UMOT5.mjs";
|
|
29
53
|
import {
|
|
30
|
-
|
|
31
|
-
} from "../chunk-
|
|
54
|
+
divider
|
|
55
|
+
} from "../chunk-5HKM2D3Z.mjs";
|
|
32
56
|
import {
|
|
33
|
-
|
|
34
|
-
} from "../chunk-
|
|
57
|
+
drip
|
|
58
|
+
} from "../chunk-OIVGIOVG.mjs";
|
|
35
59
|
import {
|
|
36
|
-
|
|
37
|
-
} from "../chunk-
|
|
60
|
+
dropdownItem
|
|
61
|
+
} from "../chunk-Z6VEZVD6.mjs";
|
|
38
62
|
import {
|
|
39
|
-
|
|
40
|
-
} from "../chunk-
|
|
63
|
+
dropdownMenu
|
|
64
|
+
} from "../chunk-FCYNUVAR.mjs";
|
|
41
65
|
import {
|
|
42
66
|
dropdownSection
|
|
43
67
|
} from "../chunk-AVGEHFT4.mjs";
|
|
@@ -48,17 +72,17 @@ import {
|
|
|
48
72
|
image
|
|
49
73
|
} from "../chunk-6GGRJ6I7.mjs";
|
|
50
74
|
import {
|
|
51
|
-
|
|
52
|
-
} from "../chunk-
|
|
75
|
+
buttonGroup
|
|
76
|
+
} from "../chunk-VKFQ7EZN.mjs";
|
|
53
77
|
import {
|
|
54
|
-
|
|
55
|
-
} from "../chunk-
|
|
78
|
+
button
|
|
79
|
+
} from "../chunk-UM54LZPC.mjs";
|
|
56
80
|
import {
|
|
57
|
-
|
|
58
|
-
} from "../chunk-
|
|
81
|
+
card
|
|
82
|
+
} from "../chunk-6QKRZ3JE.mjs";
|
|
59
83
|
import {
|
|
60
|
-
|
|
61
|
-
} from "../chunk-
|
|
84
|
+
checkboxGroup
|
|
85
|
+
} from "../chunk-U77YMEWM.mjs";
|
|
62
86
|
import {
|
|
63
87
|
checkbox
|
|
64
88
|
} from "../chunk-7EKGN7JP.mjs";
|
|
@@ -72,17 +96,8 @@ import {
|
|
|
72
96
|
code
|
|
73
97
|
} from "../chunk-WFCALVUC.mjs";
|
|
74
98
|
import {
|
|
75
|
-
|
|
76
|
-
} from "../chunk-
|
|
77
|
-
import {
|
|
78
|
-
drip
|
|
79
|
-
} from "../chunk-OIVGIOVG.mjs";
|
|
80
|
-
import {
|
|
81
|
-
dropdownItem
|
|
82
|
-
} from "../chunk-Z6VEZVD6.mjs";
|
|
83
|
-
import {
|
|
84
|
-
dropdownMenu
|
|
85
|
-
} from "../chunk-FCYNUVAR.mjs";
|
|
99
|
+
accordionItem
|
|
100
|
+
} from "../chunk-XSFH4S4Y.mjs";
|
|
86
101
|
import {
|
|
87
102
|
accordion
|
|
88
103
|
} from "../chunk-YYBLBQIV.mjs";
|
|
@@ -95,24 +110,9 @@ import {
|
|
|
95
110
|
import {
|
|
96
111
|
badge
|
|
97
112
|
} from "../chunk-CPWIXBDM.mjs";
|
|
98
|
-
import {
|
|
99
|
-
buttonGroup
|
|
100
|
-
} from "../chunk-VKFQ7EZN.mjs";
|
|
101
|
-
import {
|
|
102
|
-
button
|
|
103
|
-
} from "../chunk-UM54LZPC.mjs";
|
|
104
113
|
import "../chunk-CMYR6AOY.mjs";
|
|
105
114
|
import "../chunk-K7LK7NCE.mjs";
|
|
106
115
|
import "../chunk-RO3WUCFF.mjs";
|
|
107
|
-
import {
|
|
108
|
-
card
|
|
109
|
-
} from "../chunk-6QKRZ3JE.mjs";
|
|
110
|
-
import {
|
|
111
|
-
checkboxGroup
|
|
112
|
-
} from "../chunk-U77YMEWM.mjs";
|
|
113
|
-
import {
|
|
114
|
-
accordionItem
|
|
115
|
-
} from "../chunk-XSFH4S4Y.mjs";
|
|
116
116
|
import "../chunk-INZK6TTL.mjs";
|
|
117
117
|
export {
|
|
118
118
|
accordion,
|
package/dist/index.js
CHANGED
|
@@ -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({
|
|
@@ -6739,17 +6739,20 @@ var corePlugin = (config = {}, defaultTheme) => {
|
|
|
6739
6739
|
);
|
|
6740
6740
|
};
|
|
6741
6741
|
var nextui = (config = {}) => {
|
|
6742
|
-
const
|
|
6743
|
-
const
|
|
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
|
|
6746
|
+
const defaultPrefix = config.prefix || DEFAULT_PREFIX;
|
|
6747
|
+
const otherThemes = (0, import_lodash3.default)(themeObject, ["light", "dark"]) || {};
|
|
6746
6748
|
return corePlugin(
|
|
6747
6749
|
{
|
|
6748
6750
|
light: (0, import_deepmerge.default)(semanticColors.light, userLightColors),
|
|
6749
6751
|
dark: (0, import_deepmerge.default)(semanticColors.dark, userDarkColors),
|
|
6750
6752
|
...otherThemes
|
|
6751
6753
|
},
|
|
6752
|
-
defaultTheme
|
|
6754
|
+
defaultTheme,
|
|
6755
|
+
defaultPrefix
|
|
6753
6756
|
);
|
|
6754
6757
|
};
|
|
6755
6758
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import "./chunk-T6HAGWX5.mjs";
|
|
2
|
+
import {
|
|
3
|
+
user
|
|
4
|
+
} from "./chunk-MW7UVOSP.mjs";
|
|
5
|
+
import {
|
|
6
|
+
radioGroup
|
|
7
|
+
} from "./chunk-HHWXPWYN.mjs";
|
|
8
|
+
import {
|
|
9
|
+
radio
|
|
10
|
+
} from "./chunk-OZPCO5UB.mjs";
|
|
11
|
+
import {
|
|
12
|
+
snippet
|
|
13
|
+
} from "./chunk-4XSCIGTZ.mjs";
|
|
14
|
+
import {
|
|
15
|
+
spacer
|
|
16
|
+
} from "./chunk-3B4SYPW2.mjs";
|
|
2
17
|
import {
|
|
3
18
|
spinner
|
|
4
19
|
} from "./chunk-XUL76UJD.mjs";
|
|
@@ -12,8 +27,17 @@ import {
|
|
|
12
27
|
toggle
|
|
13
28
|
} from "./chunk-NCFXYR7C.mjs";
|
|
14
29
|
import {
|
|
15
|
-
|
|
16
|
-
} from "./chunk-
|
|
30
|
+
input
|
|
31
|
+
} from "./chunk-PH4OFVEH.mjs";
|
|
32
|
+
import {
|
|
33
|
+
kbd
|
|
34
|
+
} from "./chunk-KUQBSI5S.mjs";
|
|
35
|
+
import {
|
|
36
|
+
link
|
|
37
|
+
} from "./chunk-XICTHLAR.mjs";
|
|
38
|
+
import {
|
|
39
|
+
modal
|
|
40
|
+
} from "./chunk-YMIOHWCD.mjs";
|
|
17
41
|
import {
|
|
18
42
|
navbar
|
|
19
43
|
} from "./chunk-U3BMJPED.mjs";
|
|
@@ -27,17 +51,17 @@ import {
|
|
|
27
51
|
progress
|
|
28
52
|
} from "./chunk-O42UMOT5.mjs";
|
|
29
53
|
import {
|
|
30
|
-
|
|
31
|
-
} from "./chunk-
|
|
54
|
+
divider
|
|
55
|
+
} from "./chunk-5HKM2D3Z.mjs";
|
|
32
56
|
import {
|
|
33
|
-
|
|
34
|
-
} from "./chunk-
|
|
57
|
+
drip
|
|
58
|
+
} from "./chunk-OIVGIOVG.mjs";
|
|
35
59
|
import {
|
|
36
|
-
|
|
37
|
-
} from "./chunk-
|
|
60
|
+
dropdownItem
|
|
61
|
+
} from "./chunk-Z6VEZVD6.mjs";
|
|
38
62
|
import {
|
|
39
|
-
|
|
40
|
-
} from "./chunk-
|
|
63
|
+
dropdownMenu
|
|
64
|
+
} from "./chunk-FCYNUVAR.mjs";
|
|
41
65
|
import {
|
|
42
66
|
dropdownSection
|
|
43
67
|
} from "./chunk-AVGEHFT4.mjs";
|
|
@@ -48,17 +72,17 @@ import {
|
|
|
48
72
|
image
|
|
49
73
|
} from "./chunk-6GGRJ6I7.mjs";
|
|
50
74
|
import {
|
|
51
|
-
|
|
52
|
-
} from "./chunk-
|
|
75
|
+
buttonGroup
|
|
76
|
+
} from "./chunk-VKFQ7EZN.mjs";
|
|
53
77
|
import {
|
|
54
|
-
|
|
55
|
-
} from "./chunk-
|
|
78
|
+
button
|
|
79
|
+
} from "./chunk-UM54LZPC.mjs";
|
|
56
80
|
import {
|
|
57
|
-
|
|
58
|
-
} from "./chunk-
|
|
81
|
+
card
|
|
82
|
+
} from "./chunk-6QKRZ3JE.mjs";
|
|
59
83
|
import {
|
|
60
|
-
|
|
61
|
-
} from "./chunk-
|
|
84
|
+
checkboxGroup
|
|
85
|
+
} from "./chunk-U77YMEWM.mjs";
|
|
62
86
|
import {
|
|
63
87
|
checkbox
|
|
64
88
|
} from "./chunk-7EKGN7JP.mjs";
|
|
@@ -72,17 +96,32 @@ import {
|
|
|
72
96
|
code
|
|
73
97
|
} from "./chunk-WFCALVUC.mjs";
|
|
74
98
|
import {
|
|
75
|
-
|
|
76
|
-
} from "./chunk-
|
|
99
|
+
nextui
|
|
100
|
+
} from "./chunk-ICY3VMUC.mjs";
|
|
101
|
+
import "./chunk-XLATS5QU.mjs";
|
|
102
|
+
import "./chunk-DMASP6FA.mjs";
|
|
103
|
+
import "./chunk-WQEDQHKX.mjs";
|
|
77
104
|
import {
|
|
78
|
-
|
|
79
|
-
} from "./chunk-
|
|
105
|
+
colors
|
|
106
|
+
} from "./chunk-RJPRNGM4.mjs";
|
|
107
|
+
import "./chunk-M63AFAHO.mjs";
|
|
80
108
|
import {
|
|
81
|
-
|
|
82
|
-
} from "./chunk-
|
|
109
|
+
semanticColors
|
|
110
|
+
} from "./chunk-BQIK46CL.mjs";
|
|
83
111
|
import {
|
|
84
|
-
|
|
85
|
-
} from "./chunk-
|
|
112
|
+
commonColors
|
|
113
|
+
} from "./chunk-H3O7TP7Y.mjs";
|
|
114
|
+
import "./chunk-Y4YW5MKL.mjs";
|
|
115
|
+
import "./chunk-T3GWIVAM.mjs";
|
|
116
|
+
import "./chunk-OR5PUD24.mjs";
|
|
117
|
+
import "./chunk-DCEG5LGX.mjs";
|
|
118
|
+
import "./chunk-L2OL7R23.mjs";
|
|
119
|
+
import "./chunk-YZYGFPNK.mjs";
|
|
120
|
+
import "./chunk-37PIXVP4.mjs";
|
|
121
|
+
import "./chunk-KZJBCC2H.mjs";
|
|
122
|
+
import {
|
|
123
|
+
accordionItem
|
|
124
|
+
} from "./chunk-XSFH4S4Y.mjs";
|
|
86
125
|
import {
|
|
87
126
|
accordion
|
|
88
127
|
} from "./chunk-YYBLBQIV.mjs";
|
|
@@ -95,30 +134,11 @@ import {
|
|
|
95
134
|
import {
|
|
96
135
|
badge
|
|
97
136
|
} from "./chunk-CPWIXBDM.mjs";
|
|
98
|
-
import {
|
|
99
|
-
buttonGroup
|
|
100
|
-
} from "./chunk-VKFQ7EZN.mjs";
|
|
101
|
-
import {
|
|
102
|
-
button
|
|
103
|
-
} from "./chunk-UM54LZPC.mjs";
|
|
104
137
|
import "./chunk-CMYR6AOY.mjs";
|
|
105
138
|
import "./chunk-K7LK7NCE.mjs";
|
|
106
139
|
import {
|
|
107
140
|
colorVariants
|
|
108
141
|
} from "./chunk-RO3WUCFF.mjs";
|
|
109
|
-
import {
|
|
110
|
-
card
|
|
111
|
-
} from "./chunk-6QKRZ3JE.mjs";
|
|
112
|
-
import {
|
|
113
|
-
checkboxGroup
|
|
114
|
-
} from "./chunk-U77YMEWM.mjs";
|
|
115
|
-
import {
|
|
116
|
-
accordionItem
|
|
117
|
-
} from "./chunk-XSFH4S4Y.mjs";
|
|
118
|
-
import {
|
|
119
|
-
nextui
|
|
120
|
-
} from "./chunk-PTN3XJU3.mjs";
|
|
121
|
-
import "./chunk-XLATS5QU.mjs";
|
|
122
142
|
import {
|
|
123
143
|
absoluteFullClasses,
|
|
124
144
|
baseStyles,
|
|
@@ -126,26 +146,6 @@ import {
|
|
|
126
146
|
ringClasses,
|
|
127
147
|
translateCenterClasses
|
|
128
148
|
} from "./chunk-INZK6TTL.mjs";
|
|
129
|
-
import "./chunk-DMASP6FA.mjs";
|
|
130
|
-
import "./chunk-WQEDQHKX.mjs";
|
|
131
|
-
import {
|
|
132
|
-
colors
|
|
133
|
-
} from "./chunk-M74ZSXB7.mjs";
|
|
134
|
-
import {
|
|
135
|
-
semanticColors
|
|
136
|
-
} from "./chunk-LQHWK6UV.mjs";
|
|
137
|
-
import "./chunk-37PIXVP4.mjs";
|
|
138
|
-
import "./chunk-M63AFAHO.mjs";
|
|
139
|
-
import {
|
|
140
|
-
commonColors
|
|
141
|
-
} from "./chunk-CRCBVLUP.mjs";
|
|
142
|
-
import "./chunk-DCEG5LGX.mjs";
|
|
143
|
-
import "./chunk-L2OL7R23.mjs";
|
|
144
|
-
import "./chunk-YZYGFPNK.mjs";
|
|
145
|
-
import "./chunk-Y4YW5MKL.mjs";
|
|
146
|
-
import "./chunk-KZJBCC2H.mjs";
|
|
147
|
-
import "./chunk-T3GWIVAM.mjs";
|
|
148
|
-
import "./chunk-OR5PUD24.mjs";
|
|
149
149
|
|
|
150
150
|
// src/index.ts
|
|
151
151
|
import { cn as cnBase } from "tailwind-variants";
|
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({
|
|
@@ -579,17 +579,20 @@ var corePlugin = (config = {}, defaultTheme) => {
|
|
|
579
579
|
);
|
|
580
580
|
};
|
|
581
581
|
var nextui = (config = {}) => {
|
|
582
|
-
const
|
|
583
|
-
const
|
|
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
|
|
586
|
+
const defaultPrefix = config.prefix || DEFAULT_PREFIX;
|
|
587
|
+
const otherThemes = (0, import_lodash3.default)(themeObject, ["light", "dark"]) || {};
|
|
586
588
|
return corePlugin(
|
|
587
589
|
{
|
|
588
590
|
light: (0, import_deepmerge.default)(semanticColors.light, userLightColors),
|
|
589
591
|
dark: (0, import_deepmerge.default)(semanticColors.dark, userDarkColors),
|
|
590
592
|
...otherThemes
|
|
591
593
|
},
|
|
592
|
-
defaultTheme
|
|
594
|
+
defaultTheme,
|
|
595
|
+
defaultPrefix
|
|
593
596
|
);
|
|
594
597
|
};
|
|
595
598
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/plugin.mjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
nextui
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ICY3VMUC.mjs";
|
|
4
4
|
import "./chunk-XLATS5QU.mjs";
|
|
5
|
-
import "./chunk-INZK6TTL.mjs";
|
|
6
5
|
import "./chunk-DMASP6FA.mjs";
|
|
7
6
|
import "./chunk-WQEDQHKX.mjs";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-LQHWK6UV.mjs";
|
|
10
|
-
import "./chunk-37PIXVP4.mjs";
|
|
7
|
+
import "./chunk-RJPRNGM4.mjs";
|
|
11
8
|
import "./chunk-M63AFAHO.mjs";
|
|
12
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-BQIK46CL.mjs";
|
|
10
|
+
import "./chunk-H3O7TP7Y.mjs";
|
|
11
|
+
import "./chunk-Y4YW5MKL.mjs";
|
|
12
|
+
import "./chunk-T3GWIVAM.mjs";
|
|
13
|
+
import "./chunk-OR5PUD24.mjs";
|
|
13
14
|
import "./chunk-DCEG5LGX.mjs";
|
|
14
15
|
import "./chunk-L2OL7R23.mjs";
|
|
15
16
|
import "./chunk-YZYGFPNK.mjs";
|
|
16
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-37PIXVP4.mjs";
|
|
17
18
|
import "./chunk-KZJBCC2H.mjs";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-OR5PUD24.mjs";
|
|
19
|
+
import "./chunk-INZK6TTL.mjs";
|
|
20
20
|
export {
|
|
21
21
|
nextui
|
|
22
22
|
};
|
package/package.json
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
yellow
|
|
3
|
+
} from "./chunk-Y4YW5MKL.mjs";
|
|
4
|
+
import {
|
|
5
|
+
cyan
|
|
6
|
+
} from "./chunk-T3GWIVAM.mjs";
|
|
7
|
+
import {
|
|
8
|
+
green
|
|
9
|
+
} from "./chunk-OR5PUD24.mjs";
|
|
1
10
|
import {
|
|
2
11
|
pink
|
|
3
12
|
} from "./chunk-DCEG5LGX.mjs";
|
|
@@ -7,18 +16,9 @@ import {
|
|
|
7
16
|
import {
|
|
8
17
|
red
|
|
9
18
|
} from "./chunk-YZYGFPNK.mjs";
|
|
10
|
-
import {
|
|
11
|
-
yellow
|
|
12
|
-
} from "./chunk-Y4YW5MKL.mjs";
|
|
13
19
|
import {
|
|
14
20
|
blue
|
|
15
21
|
} from "./chunk-KZJBCC2H.mjs";
|
|
16
|
-
import {
|
|
17
|
-
cyan
|
|
18
|
-
} from "./chunk-T3GWIVAM.mjs";
|
|
19
|
-
import {
|
|
20
|
-
green
|
|
21
|
-
} from "./chunk-OR5PUD24.mjs";
|
|
22
22
|
|
|
23
23
|
// src/colors/common.ts
|
|
24
24
|
var commonColors = {
|