@nextui-org/theme 0.0.0-dev-v2-20230326012034

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.
Files changed (181) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +24 -0
  3. package/colors.d.ts +1 -0
  4. package/colors.js +1 -0
  5. package/dist/animations/index.d.ts +57 -0
  6. package/dist/animations/index.js +84 -0
  7. package/dist/animations/index.mjs +6 -0
  8. package/dist/chunk-37PIXVP4.mjs +33 -0
  9. package/dist/chunk-45FXWIO6.mjs +70 -0
  10. package/dist/chunk-5OE5CWK6.mjs +84 -0
  11. package/dist/chunk-5SJ7B53O.mjs +0 -0
  12. package/dist/chunk-5Z3NCB7W.mjs +391 -0
  13. package/dist/chunk-7BYRB2YS.mjs +386 -0
  14. package/dist/chunk-7MQD7UA2.mjs +16 -0
  15. package/dist/chunk-B5S7HT6N.mjs +44 -0
  16. package/dist/chunk-CMYR6AOY.mjs +0 -0
  17. package/dist/chunk-CO6ANWRA.mjs +125 -0
  18. package/dist/chunk-CRCBVLUP.mjs +38 -0
  19. package/dist/chunk-D4TJV7NY.mjs +206 -0
  20. package/dist/chunk-DCEG5LGX.mjs +17 -0
  21. package/dist/chunk-FS36US4S.mjs +25 -0
  22. package/dist/chunk-HHWXPWYN.mjs +13 -0
  23. package/dist/chunk-IJCHUO4J.mjs +38 -0
  24. package/dist/chunk-K7LK7NCE.mjs +0 -0
  25. package/dist/chunk-KZJBCC2H.mjs +17 -0
  26. package/dist/chunk-L2OL7R23.mjs +17 -0
  27. package/dist/chunk-LGGZKBOO.mjs +77 -0
  28. package/dist/chunk-M63AFAHO.mjs +0 -0
  29. package/dist/chunk-MLH3XSY7.mjs +14 -0
  30. package/dist/chunk-NJQP2VWT.mjs +160 -0
  31. package/dist/chunk-OIVGIOVG.mjs +9 -0
  32. package/dist/chunk-OR5PUD24.mjs +17 -0
  33. package/dist/chunk-OSARGUKT.mjs +326 -0
  34. package/dist/chunk-QIC7EALL.mjs +277 -0
  35. package/dist/chunk-QMP2FDFR.mjs +240 -0
  36. package/dist/chunk-QPN3H4E3.mjs +60 -0
  37. package/dist/chunk-RD42SVXB.mjs +90 -0
  38. package/dist/chunk-T3GWIVAM.mjs +17 -0
  39. package/dist/chunk-TV7EJNXI.mjs +457 -0
  40. package/dist/chunk-U77YMEWM.mjs +13 -0
  41. package/dist/chunk-VB4T62HR.mjs +159 -0
  42. package/dist/chunk-VKFQ7EZN.mjs +17 -0
  43. package/dist/chunk-WQEDQHKX.mjs +0 -0
  44. package/dist/chunk-Y37XC5QN.mjs +169 -0
  45. package/dist/chunk-Y4YW5MKL.mjs +17 -0
  46. package/dist/chunk-Y52EXP4A.mjs +142 -0
  47. package/dist/chunk-YYBLBQIV.mjs +16 -0
  48. package/dist/chunk-YZYGFPNK.mjs +17 -0
  49. package/dist/chunk-Z5OKZPNV.mjs +190 -0
  50. package/dist/colors/blue.d.ts +14 -0
  51. package/dist/colors/blue.js +41 -0
  52. package/dist/colors/blue.mjs +6 -0
  53. package/dist/colors/common.d.ts +91 -0
  54. package/dist/colors/common.js +140 -0
  55. package/dist/colors/common.mjs +13 -0
  56. package/dist/colors/cyan.d.ts +14 -0
  57. package/dist/colors/cyan.js +41 -0
  58. package/dist/colors/cyan.mjs +6 -0
  59. package/dist/colors/green.d.ts +14 -0
  60. package/dist/colors/green.js +41 -0
  61. package/dist/colors/green.mjs +6 -0
  62. package/dist/colors/index.d.ts +97 -0
  63. package/dist/colors/index.js +306 -0
  64. package/dist/colors/index.mjs +23 -0
  65. package/dist/colors/pink.d.ts +14 -0
  66. package/dist/colors/pink.js +41 -0
  67. package/dist/colors/pink.mjs +6 -0
  68. package/dist/colors/purple.d.ts +14 -0
  69. package/dist/colors/purple.js +41 -0
  70. package/dist/colors/purple.mjs +6 -0
  71. package/dist/colors/red.d.ts +14 -0
  72. package/dist/colors/red.js +41 -0
  73. package/dist/colors/red.mjs +6 -0
  74. package/dist/colors/semantic.d.ts +10 -0
  75. package/dist/colors/semantic.js +298 -0
  76. package/dist/colors/semantic.mjs +19 -0
  77. package/dist/colors/types.d.ts +37 -0
  78. package/dist/colors/types.js +18 -0
  79. package/dist/colors/types.mjs +1 -0
  80. package/dist/colors/yellow.d.ts +14 -0
  81. package/dist/colors/yellow.js +41 -0
  82. package/dist/colors/yellow.mjs +6 -0
  83. package/dist/colors.d.ts +4 -0
  84. package/dist/colors.js +306 -0
  85. package/dist/colors.mjs +24 -0
  86. package/dist/components/accordion-item.d.ts +135 -0
  87. package/dist/components/accordion-item.js +122 -0
  88. package/dist/components/accordion-item.mjs +10 -0
  89. package/dist/components/accordion.d.ts +30 -0
  90. package/dist/components/accordion.js +40 -0
  91. package/dist/components/accordion.mjs +6 -0
  92. package/dist/components/avatar-group.d.ts +26 -0
  93. package/dist/components/avatar-group.js +38 -0
  94. package/dist/components/avatar-group.mjs +6 -0
  95. package/dist/components/avatar.d.ts +211 -0
  96. package/dist/components/avatar.js +315 -0
  97. package/dist/components/avatar.mjs +10 -0
  98. package/dist/components/badge.d.ts +235 -0
  99. package/dist/components/badge.js +487 -0
  100. package/dist/components/badge.mjs +10 -0
  101. package/dist/components/button-group.d.ts +26 -0
  102. package/dist/components/button-group.js +41 -0
  103. package/dist/components/button-group.mjs +6 -0
  104. package/dist/components/button.d.ts +122 -0
  105. package/dist/components/button.js +429 -0
  106. package/dist/components/button.mjs +10 -0
  107. package/dist/components/card.d.ts +239 -0
  108. package/dist/components/card.js +222 -0
  109. package/dist/components/card.mjs +10 -0
  110. package/dist/components/checkbox-group.d.ts +32 -0
  111. package/dist/components/checkbox-group.js +37 -0
  112. package/dist/components/checkbox-group.mjs +6 -0
  113. package/dist/components/checkbox.d.ts +226 -0
  114. package/dist/components/checkbox.js +192 -0
  115. package/dist/components/checkbox.mjs +10 -0
  116. package/dist/components/chip.d.ts +274 -0
  117. package/dist/components/chip.js +560 -0
  118. package/dist/components/chip.mjs +10 -0
  119. package/dist/components/code.d.ts +68 -0
  120. package/dist/components/code.js +140 -0
  121. package/dist/components/code.mjs +10 -0
  122. package/dist/components/drip.d.ts +14 -0
  123. package/dist/components/drip.js +33 -0
  124. package/dist/components/drip.mjs +6 -0
  125. package/dist/components/index.d.ts +24 -0
  126. package/dist/components/index.js +3442 -0
  127. package/dist/components/index.mjs +95 -0
  128. package/dist/components/link.d.ts +74 -0
  129. package/dist/components/link.js +117 -0
  130. package/dist/components/link.mjs +10 -0
  131. package/dist/components/pagination.d.ts +201 -0
  132. package/dist/components/pagination.js +489 -0
  133. package/dist/components/pagination.mjs +10 -0
  134. package/dist/components/radio-group.d.ts +32 -0
  135. package/dist/components/radio-group.js +37 -0
  136. package/dist/components/radio-group.mjs +6 -0
  137. package/dist/components/radio.d.ts +271 -0
  138. package/dist/components/radio.js +201 -0
  139. package/dist/components/radio.mjs +10 -0
  140. package/dist/components/snippet.d.ts +184 -0
  141. package/dist/components/snippet.js +343 -0
  142. package/dist/components/snippet.mjs +10 -0
  143. package/dist/components/spinner.d.ts +192 -0
  144. package/dist/components/spinner.js +149 -0
  145. package/dist/components/spinner.mjs +6 -0
  146. package/dist/components/toggle.d.ts +197 -0
  147. package/dist/components/toggle.js +191 -0
  148. package/dist/components/toggle.mjs +10 -0
  149. package/dist/components/tooltip.d.ts +176 -0
  150. package/dist/components/tooltip.js +373 -0
  151. package/dist/components/tooltip.mjs +10 -0
  152. package/dist/components/user.d.ts +40 -0
  153. package/dist/components/user.js +57 -0
  154. package/dist/components/user.mjs +10 -0
  155. package/dist/index.d.ts +35 -0
  156. package/dist/index.js +3747 -0
  157. package/dist/index.mjs +138 -0
  158. package/dist/plugin.d.ts +38 -0
  159. package/dist/plugin.js +564 -0
  160. package/dist/plugin.mjs +151 -0
  161. package/dist/utilities/index.d.ts +72 -0
  162. package/dist/utilities/index.js +94 -0
  163. package/dist/utilities/index.mjs +6 -0
  164. package/dist/utils/index.d.ts +4 -0
  165. package/dist/utils/index.js +144 -0
  166. package/dist/utils/index.mjs +20 -0
  167. package/dist/utils/object.d.ts +4 -0
  168. package/dist/utils/object.js +58 -0
  169. package/dist/utils/object.mjs +8 -0
  170. package/dist/utils/styles.d.ts +20 -0
  171. package/dist/utils/styles.js +66 -0
  172. package/dist/utils/styles.mjs +14 -0
  173. package/dist/utils/types.d.ts +10 -0
  174. package/dist/utils/types.js +18 -0
  175. package/dist/utils/types.mjs +1 -0
  176. package/dist/utils/variants.d.ts +67 -0
  177. package/dist/utils/variants.js +101 -0
  178. package/dist/utils/variants.mjs +6 -0
  179. package/package.json +85 -0
  180. package/plugin.d.ts +1 -0
  181. package/plugin.js +1 -0
package/dist/plugin.js ADDED
@@ -0,0 +1,564 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
+
26
+ // src/plugin.ts
27
+ var plugin_exports = {};
28
+ __export(plugin_exports, {
29
+ nextui: () => nextui,
30
+ resolveConfig: () => resolveConfig
31
+ });
32
+ module.exports = __toCommonJS(plugin_exports);
33
+ var import_color = __toESM(require("color"));
34
+ var import_plugin = __toESM(require("tailwindcss/plugin"));
35
+ var import_lodash = __toESM(require("lodash.foreach"));
36
+ var import_flat = __toESM(require("flat"));
37
+ var import_lodash2 = __toESM(require("lodash.get"));
38
+ var import_deepmerge = __toESM(require("deepmerge"));
39
+
40
+ // src/colors/blue.ts
41
+ var blue = {
42
+ 50: "#e6f1fe",
43
+ 100: "#cce3fd",
44
+ 200: "#99c7fb",
45
+ 300: "#66aaf9",
46
+ 400: "#338ef7",
47
+ 500: "#0072f5",
48
+ 600: "#005bc4",
49
+ 700: "#004493",
50
+ 800: "#002e62",
51
+ 900: "#001731"
52
+ };
53
+
54
+ // src/colors/green.ts
55
+ var green = {
56
+ 50: "#e8faf0",
57
+ 100: "#d1f4e0",
58
+ 200: "#a2e9c1",
59
+ 300: "#74dfa2",
60
+ 400: "#45d483",
61
+ 500: "#17c964",
62
+ 600: "#12a150",
63
+ 700: "#0e793c",
64
+ 800: "#095028",
65
+ 900: "#052814"
66
+ };
67
+
68
+ // src/colors/pink.ts
69
+ var pink = {
70
+ 50: "#ffedfa",
71
+ 100: "#ffdcf5",
72
+ 200: "#ffb8eb",
73
+ 300: "#ff95e1",
74
+ 400: "#ff71d7",
75
+ 500: "#ff4ecd",
76
+ 600: "#cc3ea4",
77
+ 700: "#992f7b",
78
+ 800: "#661f52",
79
+ 900: "#331029"
80
+ };
81
+
82
+ // src/colors/purple.ts
83
+ var purple = {
84
+ 50: "#f2eafa",
85
+ 100: "#e4d4f4",
86
+ 200: "#c9a9e9",
87
+ 300: "#ae7ede",
88
+ 400: "#9353d3",
89
+ 500: "#7828c8",
90
+ 600: "#6020a0",
91
+ 700: "#481878",
92
+ 800: "#301050",
93
+ 900: "#180828"
94
+ };
95
+
96
+ // src/colors/red.ts
97
+ var red = {
98
+ 50: "#fee7ef",
99
+ 100: "#fdd0df",
100
+ 200: "#faa0bf",
101
+ 300: "#f871a0",
102
+ 400: "#f54180",
103
+ 500: "#f31260",
104
+ 600: "#c20e4d",
105
+ 700: "#920b3a",
106
+ 800: "#610726",
107
+ 900: "#310413"
108
+ };
109
+
110
+ // src/colors/yellow.ts
111
+ var yellow = {
112
+ 50: "#fef6e9",
113
+ 100: "#fdedd3",
114
+ 200: "#fbdba7",
115
+ 300: "#f9c97c",
116
+ 400: "#f7b750",
117
+ 500: "#f5a524",
118
+ 600: "#c4841d",
119
+ 700: "#936316",
120
+ 800: "#62420e",
121
+ 900: "#312107"
122
+ };
123
+
124
+ // src/colors/cyan.ts
125
+ var cyan = {
126
+ 50: "#F0FCFF",
127
+ 100: "#E6FAFE",
128
+ 200: "#D7F8FE",
129
+ 300: "#C3F4FD",
130
+ 400: "#A5EEFD",
131
+ 500: "#7EE7FC",
132
+ 600: "#06B7DB",
133
+ 700: "#09AACD",
134
+ 800: "#0E8AAA",
135
+ 900: "#053B48"
136
+ };
137
+
138
+ // src/colors/common.ts
139
+ var commonColors = {
140
+ white: "#ffffff",
141
+ black: "#000000",
142
+ blue,
143
+ green,
144
+ pink,
145
+ purple,
146
+ red,
147
+ yellow,
148
+ cyan
149
+ };
150
+
151
+ // src/colors/semantic.ts
152
+ var import_colors = __toESM(require("tailwindcss/colors"));
153
+ var import_color2k = require("color2k");
154
+
155
+ // src/utils/object.ts
156
+ function swapColorValues(colors2) {
157
+ const swappedColors = {};
158
+ const keys = Object.keys(colors2);
159
+ const length = keys.length;
160
+ for (let i = 0; i < length / 2; i++) {
161
+ const key1 = keys[i];
162
+ const key2 = keys[length - 1 - i];
163
+ swappedColors[key1] = colors2[key2];
164
+ swappedColors[key2] = colors2[key1];
165
+ }
166
+ if (length % 2 !== 0) {
167
+ const middleKey = keys[Math.floor(length / 2)];
168
+ swappedColors[middleKey] = colors2[middleKey];
169
+ }
170
+ return swappedColors;
171
+ }
172
+ function removeDefaultKeys(obj) {
173
+ const newObj = {};
174
+ for (const key in obj) {
175
+ if (key.endsWith("-DEFAULT")) {
176
+ newObj[key.replace("-DEFAULT", "")] = obj[key];
177
+ continue;
178
+ }
179
+ newObj[key] = obj[key];
180
+ }
181
+ return newObj;
182
+ }
183
+
184
+ // src/colors/semantic.ts
185
+ var base = {
186
+ light: {
187
+ background: {
188
+ DEFAULT: "#ffffff"
189
+ },
190
+ foreground: {
191
+ DEFAULT: "#11181C"
192
+ },
193
+ border: {
194
+ DEFAULT: "#00000026"
195
+ },
196
+ content1: {
197
+ DEFAULT: import_colors.default.zinc[50],
198
+ contrastText: import_colors.default.zinc[900]
199
+ },
200
+ content2: {
201
+ DEFAULT: import_colors.default.zinc[100],
202
+ contrastText: import_colors.default.zinc[800]
203
+ },
204
+ content3: {
205
+ DEFAULT: import_colors.default.zinc[200],
206
+ contrastText: import_colors.default.zinc[700]
207
+ },
208
+ content4: {
209
+ DEFAULT: import_colors.default.zinc[300],
210
+ contrastText: import_colors.default.zinc[600]
211
+ }
212
+ },
213
+ dark: {
214
+ background: {
215
+ DEFAULT: "#000000"
216
+ },
217
+ foreground: {
218
+ DEFAULT: "#ECEDEE"
219
+ },
220
+ border: {
221
+ DEFAULT: "#ffffff26"
222
+ },
223
+ content1: {
224
+ DEFAULT: import_colors.default.zinc[900],
225
+ contrastText: import_colors.default.zinc[50]
226
+ },
227
+ content2: {
228
+ DEFAULT: import_colors.default.zinc[800],
229
+ contrastText: import_colors.default.zinc[100]
230
+ },
231
+ content3: {
232
+ DEFAULT: import_colors.default.zinc[700],
233
+ contrastText: import_colors.default.zinc[200]
234
+ },
235
+ content4: {
236
+ DEFAULT: import_colors.default.zinc[600],
237
+ contrastText: import_colors.default.zinc[300]
238
+ }
239
+ }
240
+ };
241
+ var semanticColorsLight = {
242
+ ...base.light,
243
+ neutral: {
244
+ ...import_colors.default.zinc,
245
+ contrastText: (0, import_color2k.readableColor)(import_colors.default.zinc[300]),
246
+ DEFAULT: import_colors.default.zinc[300]
247
+ },
248
+ primary: {
249
+ ...commonColors.blue,
250
+ contrastText: commonColors.white,
251
+ DEFAULT: commonColors.blue[500]
252
+ },
253
+ secondary: {
254
+ ...commonColors.purple,
255
+ contrastText: commonColors.white,
256
+ DEFAULT: commonColors.purple[500]
257
+ },
258
+ success: {
259
+ ...commonColors.green,
260
+ contrastText: commonColors.white,
261
+ DEFAULT: commonColors.green[500]
262
+ },
263
+ warning: {
264
+ ...commonColors.yellow,
265
+ contrastText: commonColors.white,
266
+ DEFAULT: commonColors.yellow[500]
267
+ },
268
+ danger: {
269
+ ...commonColors.red,
270
+ contrastText: commonColors.white,
271
+ DEFAULT: commonColors.red[500]
272
+ }
273
+ };
274
+ var semanticColorsDark = {
275
+ ...base.dark,
276
+ neutral: {
277
+ ...swapColorValues(import_colors.default.zinc),
278
+ contrastText: (0, import_color2k.readableColor)(import_colors.default.zinc[700]),
279
+ DEFAULT: import_colors.default.zinc[700]
280
+ },
281
+ primary: {
282
+ ...swapColorValues(commonColors.blue),
283
+ DEFAULT: commonColors.blue[500],
284
+ contrastText: commonColors.white
285
+ },
286
+ secondary: {
287
+ ...swapColorValues(commonColors.purple),
288
+ contrastText: commonColors.white,
289
+ DEFAULT: commonColors.purple[400]
290
+ },
291
+ success: {
292
+ ...swapColorValues(commonColors.green),
293
+ contrastText: (0, import_color2k.readableColor)(commonColors.green[500]),
294
+ DEFAULT: commonColors.green[500]
295
+ },
296
+ warning: {
297
+ ...swapColorValues(commonColors.yellow),
298
+ contrastText: (0, import_color2k.readableColor)(commonColors.yellow[500]),
299
+ DEFAULT: commonColors.yellow[500]
300
+ },
301
+ danger: {
302
+ ...swapColorValues(commonColors.red),
303
+ contrastText: commonColors.white,
304
+ DEFAULT: commonColors.red[500]
305
+ }
306
+ };
307
+ var semanticColors = {
308
+ light: semanticColorsLight,
309
+ dark: semanticColorsDark
310
+ };
311
+
312
+ // src/colors/index.ts
313
+ var colors = {
314
+ ...commonColors,
315
+ ...semanticColors
316
+ };
317
+
318
+ // src/animations/index.ts
319
+ var animations = {
320
+ animation: {
321
+ "drip-expand": "drip-expand 350ms linear",
322
+ "spinner-ease-spin": "spinner-spin 0.8s ease infinite",
323
+ "spinner-linear-spin": "spinner-spin 0.8s linear infinite",
324
+ "appearance-in": "appearance-in 250ms ease-out normal both",
325
+ "appearance-out": "appearance-out 60ms ease-in normal both"
326
+ },
327
+ keyframes: {
328
+ "spinner-spin": {
329
+ "0%": {
330
+ transform: "rotate(0deg)"
331
+ },
332
+ "100%": {
333
+ transform: "rotate(360deg)"
334
+ }
335
+ },
336
+ "drip-expand": {
337
+ "0%": {
338
+ opacity: "0.4",
339
+ transform: "scale(0)"
340
+ },
341
+ "100%": {
342
+ opacity: "0",
343
+ transform: "scale(2)"
344
+ }
345
+ },
346
+ "appearance-in": {
347
+ "0%": {
348
+ opacity: "0",
349
+ transform: "translateZ(0) scale(0.95)"
350
+ },
351
+ "60%": {
352
+ opacity: "0.75",
353
+ backfaceVisibility: "hidden",
354
+ webkitFontSmoothing: "antialiased",
355
+ transform: "translateZ(0) scale(1.05)"
356
+ },
357
+ "100%": {
358
+ opacity: "1",
359
+ transform: "translateZ(0) scale(1)"
360
+ }
361
+ },
362
+ "appearance-out": {
363
+ "0%": {
364
+ opacity: "1",
365
+ transform: "scale(1)"
366
+ },
367
+ "100%": {
368
+ opacity: "0",
369
+ transform: "scale(0.85)"
370
+ }
371
+ }
372
+ }
373
+ };
374
+
375
+ // src/utilities/index.ts
376
+ var DEFAULT_TRANSITION_DURATION = "250ms";
377
+ var utilities = {
378
+ ".leading-inherit": {
379
+ "line-height": "inherit"
380
+ },
381
+ ".bg-img-inherit": {
382
+ "background-image": "inherit"
383
+ },
384
+ ".bg-clip-inherit": {
385
+ "background-clip": "inherit"
386
+ },
387
+ ".text-fill-inherit": {
388
+ "-webkit-text-fill-color": "inherit"
389
+ },
390
+ ".transition-background": {
391
+ "transition-property": "background",
392
+ "transition-timing-function": "ease",
393
+ "transition-duration": DEFAULT_TRANSITION_DURATION
394
+ },
395
+ ".transition-all": {
396
+ "transition-property": "all",
397
+ "transition-timing-function": "ease",
398
+ "transition-duration": DEFAULT_TRANSITION_DURATION
399
+ },
400
+ ".transition": {
401
+ "transition-property": "color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",
402
+ "transition-timing-function": "ease",
403
+ "transition-duration": DEFAULT_TRANSITION_DURATION
404
+ },
405
+ ".transition-colors": {
406
+ "transition-property": "color, background-color, border-color, text-decoration-color, fill, stroke",
407
+ "transition-timing-function": "ease",
408
+ "transition-duration": DEFAULT_TRANSITION_DURATION
409
+ },
410
+ ".transition-opacity": {
411
+ "transition-property": "opacity",
412
+ "transition-timing-function": "ease",
413
+ "transition-duration": DEFAULT_TRANSITION_DURATION
414
+ },
415
+ ".transition-width": {
416
+ "transition-property": "width",
417
+ "transition-timing-function": "ease",
418
+ "transition-duration": DEFAULT_TRANSITION_DURATION
419
+ },
420
+ ".transition-shadow": {
421
+ "transition-property": "box-shadow",
422
+ "transition-timing-function": "ease",
423
+ "transition-duration": DEFAULT_TRANSITION_DURATION
424
+ },
425
+ ".transition-transform": {
426
+ "transition-property": "transform",
427
+ "transition-timing-function": "ease",
428
+ "transition-duration": DEFAULT_TRANSITION_DURATION
429
+ },
430
+ ".transition-transform-opacity": {
431
+ "transition-property": "transform, opacity",
432
+ "transition-timing-function": "ease",
433
+ "transition-duration": DEFAULT_TRANSITION_DURATION
434
+ },
435
+ ".transition-transform-background": {
436
+ "transition-property": "transform, background",
437
+ "transition-timing-function": "ease",
438
+ "transition-duration": DEFAULT_TRANSITION_DURATION
439
+ }
440
+ };
441
+
442
+ // src/utils/styles.ts
443
+ var baseStyles = {
444
+ color: "hsl(var(--nextui-foreground))",
445
+ backgroundColor: "hsl(var(--nextui-background))"
446
+ };
447
+
448
+ // src/plugin.ts
449
+ var SCHEME = Symbol("color-scheme");
450
+ var VAR_PREFIX = "nextui";
451
+ var dark = (colors2) => {
452
+ return {
453
+ [SCHEME]: "dark",
454
+ ...colors2
455
+ };
456
+ };
457
+ var light = (colors2) => {
458
+ return {
459
+ [SCHEME]: "light",
460
+ ...colors2
461
+ };
462
+ };
463
+ var resolveConfig = (config = {}) => {
464
+ const resolved = {
465
+ variants: [],
466
+ utilities: {},
467
+ colors: {}
468
+ };
469
+ const configObject = typeof config === "function" ? config({ dark, light }) : config;
470
+ (0, import_lodash.default)(configObject, (colors2, themeName) => {
471
+ const cssSelector = `.${themeName},.theme-${themeName},[data-theme="${themeName}"]`;
472
+ resolved.utilities[cssSelector] = colors2[SCHEME] ? {
473
+ "color-scheme": colors2[SCHEME]
474
+ } : {};
475
+ const flatColors = removeDefaultKeys(
476
+ (0, import_flat.default)(colors2, {
477
+ safe: true,
478
+ delimiter: "-"
479
+ })
480
+ );
481
+ resolved.variants.push({
482
+ name: `theme-${themeName}`,
483
+ definition: [`&.${themeName}`, `&.theme-${themeName}`, `&[data-theme='${themeName}']`]
484
+ });
485
+ (0, import_lodash.default)(flatColors, (colorValue, colorName) => {
486
+ if (colorName === SCHEME || !colorValue)
487
+ return;
488
+ try {
489
+ const [h, s, l, defaultAlphaValue] = (0, import_color.default)(colorValue).hsl().round().array();
490
+ const nextuiColorVariable = `--${VAR_PREFIX}-${colorName}`;
491
+ const nextuiOpacityVariable = `--${VAR_PREFIX}-${colorName}-opacity`;
492
+ resolved.utilities[cssSelector][nextuiColorVariable] = `${h} ${s}% ${l}%`;
493
+ if (typeof defaultAlphaValue === "number") {
494
+ resolved.utilities[cssSelector][nextuiOpacityVariable] = defaultAlphaValue.toFixed(2);
495
+ }
496
+ resolved.colors[colorName] = ({ opacityVariable, opacityValue }) => {
497
+ if (!isNaN(+opacityValue)) {
498
+ return `hsl(var(${nextuiColorVariable}) / ${opacityValue})`;
499
+ }
500
+ if (opacityVariable) {
501
+ return `hsl(var(${nextuiColorVariable}) / var(${nextuiOpacityVariable}, var(${opacityVariable})))`;
502
+ }
503
+ return `hsl(var(${nextuiColorVariable}) / var(${nextuiOpacityVariable}, 1))`;
504
+ };
505
+ } catch (error) {
506
+ console.log("error", error == null ? void 0 : error.message);
507
+ }
508
+ });
509
+ });
510
+ return resolved;
511
+ };
512
+ var corePlugin = (config = {}) => {
513
+ const resolved = resolveConfig(config);
514
+ return (0, import_plugin.default)(
515
+ ({ addBase, addUtilities, addVariant }) => {
516
+ addBase({
517
+ [":root, [data-theme]"]: {
518
+ ...baseStyles
519
+ }
520
+ });
521
+ addUtilities({ ...resolved.utilities, ...utilities });
522
+ resolved.variants.forEach((variant) => {
523
+ addVariant(variant.name, variant.definition);
524
+ });
525
+ },
526
+ {
527
+ theme: {
528
+ extend: {
529
+ colors: {
530
+ ...commonColors,
531
+ ...resolved.colors
532
+ },
533
+ fontSize: {
534
+ tiny: "0.625rem"
535
+ },
536
+ borderWidth: {
537
+ 1: "1px",
538
+ 1.5: "1.5px",
539
+ 3: "3px",
540
+ 5: "5px"
541
+ },
542
+ transitionDuration: {
543
+ 0: "0ms",
544
+ 250: "250ms"
545
+ },
546
+ ...animations
547
+ }
548
+ }
549
+ }
550
+ );
551
+ };
552
+ var nextui = (config = {}) => {
553
+ const userLightColors = (0, import_lodash2.default)(config, "light", {});
554
+ const userDarkColors = (0, import_lodash2.default)(config, "dark", {});
555
+ return corePlugin({
556
+ light: (0, import_deepmerge.default)(semanticColors.light, userLightColors),
557
+ dark: (0, import_deepmerge.default)(semanticColors.dark, userDarkColors)
558
+ });
559
+ };
560
+ // Annotate the CommonJS export names for ESM import in node:
561
+ 0 && (module.exports = {
562
+ nextui,
563
+ resolveConfig
564
+ });
@@ -0,0 +1,151 @@
1
+ import {
2
+ utilities
3
+ } from "./chunk-45FXWIO6.mjs";
4
+ import {
5
+ baseStyles
6
+ } from "./chunk-IJCHUO4J.mjs";
7
+ import "./chunk-WQEDQHKX.mjs";
8
+ import "./chunk-7MQD7UA2.mjs";
9
+ import {
10
+ semanticColors
11
+ } from "./chunk-Y52EXP4A.mjs";
12
+ import {
13
+ removeDefaultKeys
14
+ } from "./chunk-37PIXVP4.mjs";
15
+ import "./chunk-M63AFAHO.mjs";
16
+ import {
17
+ animations
18
+ } from "./chunk-QPN3H4E3.mjs";
19
+ import {
20
+ commonColors
21
+ } from "./chunk-CRCBVLUP.mjs";
22
+ import "./chunk-DCEG5LGX.mjs";
23
+ import "./chunk-L2OL7R23.mjs";
24
+ import "./chunk-YZYGFPNK.mjs";
25
+ import "./chunk-Y4YW5MKL.mjs";
26
+ import "./chunk-KZJBCC2H.mjs";
27
+ import "./chunk-T3GWIVAM.mjs";
28
+ import "./chunk-OR5PUD24.mjs";
29
+
30
+ // src/plugin.ts
31
+ import Color from "color";
32
+ import plugin from "tailwindcss/plugin";
33
+ import forEach from "lodash.foreach";
34
+ import flatten from "flat";
35
+ import get from "lodash.get";
36
+ import deepMerge from "deepmerge";
37
+ var SCHEME = Symbol("color-scheme");
38
+ var VAR_PREFIX = "nextui";
39
+ var dark = (colors) => {
40
+ return {
41
+ [SCHEME]: "dark",
42
+ ...colors
43
+ };
44
+ };
45
+ var light = (colors) => {
46
+ return {
47
+ [SCHEME]: "light",
48
+ ...colors
49
+ };
50
+ };
51
+ var resolveConfig = (config = {}) => {
52
+ const resolved = {
53
+ variants: [],
54
+ utilities: {},
55
+ colors: {}
56
+ };
57
+ const configObject = typeof config === "function" ? config({ dark, light }) : config;
58
+ forEach(configObject, (colors, themeName) => {
59
+ const cssSelector = `.${themeName},.theme-${themeName},[data-theme="${themeName}"]`;
60
+ resolved.utilities[cssSelector] = colors[SCHEME] ? {
61
+ "color-scheme": colors[SCHEME]
62
+ } : {};
63
+ const flatColors = removeDefaultKeys(
64
+ flatten(colors, {
65
+ safe: true,
66
+ delimiter: "-"
67
+ })
68
+ );
69
+ resolved.variants.push({
70
+ name: `theme-${themeName}`,
71
+ definition: [`&.${themeName}`, `&.theme-${themeName}`, `&[data-theme='${themeName}']`]
72
+ });
73
+ forEach(flatColors, (colorValue, colorName) => {
74
+ if (colorName === SCHEME || !colorValue)
75
+ return;
76
+ try {
77
+ const [h, s, l, defaultAlphaValue] = Color(colorValue).hsl().round().array();
78
+ const nextuiColorVariable = `--${VAR_PREFIX}-${colorName}`;
79
+ const nextuiOpacityVariable = `--${VAR_PREFIX}-${colorName}-opacity`;
80
+ resolved.utilities[cssSelector][nextuiColorVariable] = `${h} ${s}% ${l}%`;
81
+ if (typeof defaultAlphaValue === "number") {
82
+ resolved.utilities[cssSelector][nextuiOpacityVariable] = defaultAlphaValue.toFixed(2);
83
+ }
84
+ resolved.colors[colorName] = ({ opacityVariable, opacityValue }) => {
85
+ if (!isNaN(+opacityValue)) {
86
+ return `hsl(var(${nextuiColorVariable}) / ${opacityValue})`;
87
+ }
88
+ if (opacityVariable) {
89
+ return `hsl(var(${nextuiColorVariable}) / var(${nextuiOpacityVariable}, var(${opacityVariable})))`;
90
+ }
91
+ return `hsl(var(${nextuiColorVariable}) / var(${nextuiOpacityVariable}, 1))`;
92
+ };
93
+ } catch (error) {
94
+ console.log("error", error == null ? void 0 : error.message);
95
+ }
96
+ });
97
+ });
98
+ return resolved;
99
+ };
100
+ var corePlugin = (config = {}) => {
101
+ const resolved = resolveConfig(config);
102
+ return plugin(
103
+ ({ addBase, addUtilities, addVariant }) => {
104
+ addBase({
105
+ [":root, [data-theme]"]: {
106
+ ...baseStyles
107
+ }
108
+ });
109
+ addUtilities({ ...resolved.utilities, ...utilities });
110
+ resolved.variants.forEach((variant) => {
111
+ addVariant(variant.name, variant.definition);
112
+ });
113
+ },
114
+ {
115
+ theme: {
116
+ extend: {
117
+ colors: {
118
+ ...commonColors,
119
+ ...resolved.colors
120
+ },
121
+ fontSize: {
122
+ tiny: "0.625rem"
123
+ },
124
+ borderWidth: {
125
+ 1: "1px",
126
+ 1.5: "1.5px",
127
+ 3: "3px",
128
+ 5: "5px"
129
+ },
130
+ transitionDuration: {
131
+ 0: "0ms",
132
+ 250: "250ms"
133
+ },
134
+ ...animations
135
+ }
136
+ }
137
+ }
138
+ );
139
+ };
140
+ var nextui = (config = {}) => {
141
+ const userLightColors = get(config, "light", {});
142
+ const userDarkColors = get(config, "dark", {});
143
+ return corePlugin({
144
+ light: deepMerge(semanticColors.light, userLightColors),
145
+ dark: deepMerge(semanticColors.dark, userDarkColors)
146
+ });
147
+ };
148
+ export {
149
+ nextui,
150
+ resolveConfig
151
+ };