@nextui-org/theme 0.0.0-dev-v2-20230716194106 → 0.0.0-dev-v2-20230718014939

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 (61) hide show
  1. package/dist/{chunk-H3WJKBMK.mjs → chunk-2T5RQ7SK.mjs} +3 -2
  2. package/dist/{chunk-NAXYVM2Y.mjs → chunk-3M6H25BL.mjs} +34 -18
  3. package/dist/{chunk-G4RCK475.mjs → chunk-7L2ZWDVP.mjs} +1 -1
  4. package/dist/{chunk-HK6FLMPL.mjs → chunk-7MCHEQXT.mjs} +2 -10
  5. package/dist/{chunk-TJL5HHMD.mjs → chunk-KO4T2DX4.mjs} +4 -5
  6. package/dist/{chunk-QZTWGJ72.mjs → chunk-QGHMGO5E.mjs} +2 -2
  7. package/dist/{chunk-WK6I5GT7.mjs → chunk-RUD4TZ7J.mjs} +4 -4
  8. package/dist/{chunk-HKDWTEHI.mjs → chunk-SJ7X4UT4.mjs} +29 -12
  9. package/dist/{chunk-4DKW2WAC.mjs → chunk-Y33ZY7KH.mjs} +2 -2
  10. package/dist/colors/common.mjs +3 -3
  11. package/dist/colors/index.mjs +5 -5
  12. package/dist/colors/semantic.mjs +4 -4
  13. package/dist/colors.mjs +5 -5
  14. package/dist/components/accordion.mjs +1 -1
  15. package/dist/components/avatar.mjs +2 -2
  16. package/dist/components/badge.mjs +2 -2
  17. package/dist/components/button.d.ts +4 -4
  18. package/dist/components/button.js +1 -2
  19. package/dist/components/button.mjs +2 -2
  20. package/dist/components/card.mjs +1 -1
  21. package/dist/components/checkbox.js +3 -2
  22. package/dist/components/checkbox.mjs +2 -2
  23. package/dist/components/chip.mjs +2 -2
  24. package/dist/components/code.mjs +2 -2
  25. package/dist/components/dropdown.mjs +1 -1
  26. package/dist/components/index.js +35 -18
  27. package/dist/components/index.mjs +40 -40
  28. package/dist/components/input.mjs +1 -1
  29. package/dist/components/link.mjs +1 -1
  30. package/dist/components/modal.mjs +1 -1
  31. package/dist/components/navbar.mjs +1 -1
  32. package/dist/components/pagination.d.ts +4 -4
  33. package/dist/components/pagination.js +1 -1
  34. package/dist/components/pagination.mjs +2 -2
  35. package/dist/components/popover.mjs +2 -2
  36. package/dist/components/radio.d.ts +4 -4
  37. package/dist/components/radio.js +2 -2
  38. package/dist/components/radio.mjs +2 -2
  39. package/dist/components/snippet.mjs +2 -2
  40. package/dist/components/table.mjs +1 -1
  41. package/dist/components/tabs.mjs +2 -2
  42. package/dist/components/toggle.js +34 -16
  43. package/dist/components/toggle.mjs +2 -2
  44. package/dist/components/user.mjs +1 -1
  45. package/dist/default-layout.d.ts +1 -5
  46. package/dist/default-layout.js +1 -10
  47. package/dist/default-layout.mjs +1 -3
  48. package/dist/index.js +64 -37
  49. package/dist/index.mjs +48 -48
  50. package/dist/plugin.js +29 -19
  51. package/dist/plugin.mjs +8 -8
  52. package/dist/types.d.ts +6 -2
  53. package/package.json +1 -1
  54. package/dist/{chunk-XCWQAA5D.mjs → chunk-3RZCOCFH.mjs} +3 -3
  55. package/dist/{chunk-IAS3SFA4.mjs → chunk-6TOTQSJE.mjs} +6 -6
  56. package/dist/{chunk-RHIZZ5XX.mjs → chunk-AWPGSFD6.mjs} +3 -3
  57. package/dist/{chunk-77O7KLUI.mjs → chunk-HDWYLUG3.mjs} +3 -3
  58. package/dist/{chunk-HFOW2Y4W.mjs → chunk-HREHHLTK.mjs} +3 -3
  59. package/dist/{chunk-B55QBA5E.mjs → chunk-O3IKQG57.mjs} +3 -3
  60. package/dist/{chunk-MYJVNM2A.mjs → chunk-QZOZ7UWM.mjs} +3 -3
  61. package/dist/{chunk-RPMLQF4Y.mjs → chunk-VB6YPWEW.mjs} +3 -3
@@ -1,12 +1,10 @@
1
1
  import {
2
2
  darkLayout,
3
3
  defaultLayout,
4
- layouts,
5
4
  lightLayout
6
- } from "./chunk-HK6FLMPL.mjs";
5
+ } from "./chunk-7MCHEQXT.mjs";
7
6
  export {
8
7
  darkLayout,
9
8
  defaultLayout,
10
- layouts,
11
9
  lightLayout
12
10
  };
package/dist/index.js CHANGED
@@ -735,7 +735,6 @@ var button = tv({
735
735
  "min-w-max",
736
736
  "font-normal",
737
737
  "subpixel-antialiased",
738
- "data-[pressed=true]:scale-95",
739
738
  "overflow-hidden",
740
739
  "tap-highlight-transparent",
741
740
  ...dataFocusVisibleClasses
@@ -788,7 +787,7 @@ var button = tv({
788
787
  },
789
788
  disableAnimation: {
790
789
  true: "!transition-none",
791
- false: "transition-transform-colors motion-reduce:transition-none"
790
+ false: "data-[pressed=true]:scale-95 transition-transform-colors motion-reduce:transition-none"
792
791
  }
793
792
  },
794
793
  defaultVariants: {
@@ -2457,7 +2456,7 @@ var badge = tv({
2457
2456
  // src/components/checkbox.ts
2458
2457
  var checkbox = tv({
2459
2458
  slots: {
2460
- base: "group relative max-w-fit inline-flex items-center justify-start cursor-pointer tap-highlight-transparent",
2459
+ base: "group relative max-w-fit inline-flex items-center justify-start cursor-pointer tap-highlight-transparent p-2 -m-2",
2461
2460
  wrapper: [
2462
2461
  "relative",
2463
2462
  "inline-flex",
@@ -2481,7 +2480,6 @@ var checkbox = tv({
2481
2480
  "group-data-[selected=true]:after:scale-100",
2482
2481
  "group-data-[selected=true]:after:opacity-100",
2483
2482
  "group-data-[hover=true]:before:bg-default-100",
2484
- "group-data-[hover=true]:before:bg-default-100",
2485
2483
  ...groupDataFocusVisibleClasses
2486
2484
  ],
2487
2485
  icon: "z-10 w-4 h-3 opacity-0 group-data-[selected=true]:opacity-100",
@@ -2599,6 +2597,8 @@ var checkbox = tv({
2599
2597
  false: {
2600
2598
  wrapper: [
2601
2599
  "before:transition-background",
2600
+ "group-data-[pressed=true]:scale-95",
2601
+ "transition-transform",
2602
2602
  "after:transition-transform-opacity",
2603
2603
  "after:!ease-linear",
2604
2604
  "after:!duration-200"
@@ -2629,7 +2629,7 @@ var checkboxGroup = tv({
2629
2629
  // src/components/radio.ts
2630
2630
  var radio = tv({
2631
2631
  slots: {
2632
- base: "group relative max-w-fit inline-flex items-center justify-start cursor-pointer tap-highlight-transparent",
2632
+ base: "group relative max-w-fit inline-flex items-center justify-start cursor-pointer tap-highlight-transparent p-2 -m-2",
2633
2633
  wrapper: [
2634
2634
  "relative",
2635
2635
  "inline-flex",
@@ -2726,7 +2726,7 @@ var radio = tv({
2726
2726
  disableAnimation: {
2727
2727
  true: {},
2728
2728
  false: {
2729
- wrapper: "transition-background",
2729
+ wrapper: ["group-data-[pressed=true]:scale-95", "transition-transform-background"],
2730
2730
  control: "transition-transform-opacity"
2731
2731
  }
2732
2732
  }
@@ -2864,7 +2864,7 @@ var pagination = tv({
2864
2864
  cursor: "transition-none"
2865
2865
  },
2866
2866
  false: {
2867
- item: "transition-background",
2867
+ item: ["data-[pressed=true]:scale-95", "transition-transform-background"],
2868
2868
  cursor: ["transition-transform", "!duration-300"]
2869
2869
  }
2870
2870
  }
@@ -3139,7 +3139,7 @@ var toggle = tv({
3139
3139
  "overflow-hidden",
3140
3140
  "bg-default-200",
3141
3141
  "rounded-full",
3142
- ...dataFocusVisibleClasses
3142
+ ...groupDataFocusVisibleClasses
3143
3143
  ],
3144
3144
  thumb: [
3145
3145
  "z-10",
@@ -3200,9 +3200,7 @@ var toggle = tv({
3200
3200
  wrapper: "w-10 h-6 mr-2",
3201
3201
  thumb: [
3202
3202
  "w-4 h-4 text-tiny",
3203
- "group-data-[selected=true]:ml-4",
3204
- "group-data-[pressed=true]:w-5",
3205
- "group-data-[selected]:group-data-[pressed]:ml-4"
3203
+ "group-data-[selected=true]:ml-4"
3206
3204
  ],
3207
3205
  endContent: "text-tiny",
3208
3206
  startContent: "text-tiny",
@@ -3212,9 +3210,7 @@ var toggle = tv({
3212
3210
  wrapper: "w-12 h-7 mr-2",
3213
3211
  thumb: [
3214
3212
  "w-5 h-5 text-small",
3215
- "group-data-[selected=true]:ml-5",
3216
- "group-data-[pressed=true]:w-6",
3217
- "group-data-[selected]:group-data-[pressed]:ml-4"
3213
+ "group-data-[selected=true]:ml-5"
3218
3214
  ],
3219
3215
  endContent: "text-small",
3220
3216
  startContent: "text-small",
@@ -3224,9 +3220,7 @@ var toggle = tv({
3224
3220
  wrapper: "w-14 h-8 mr-2",
3225
3221
  thumb: [
3226
3222
  "w-6 h-6 text-medium",
3227
- "group-data-[selected=true]:ml-6",
3228
- "group-data-[pressed=true]:w-7",
3229
- "group-data-[selected]:group-data-[pressed]:ml-5"
3223
+ "group-data-[selected=true]:ml-6"
3230
3224
  ],
3231
3225
  endContent: "text-medium",
3232
3226
  startContent: "text-medium",
@@ -3267,7 +3261,30 @@ var toggle = tv({
3267
3261
  size: "md",
3268
3262
  isDisabled: false,
3269
3263
  disableAnimation: false
3270
- }
3264
+ },
3265
+ compoundVariants: [
3266
+ {
3267
+ disableAnimation: false,
3268
+ size: "sm",
3269
+ class: {
3270
+ thumb: ["group-data-[pressed=true]:w-5", "group-data-[selected]:group-data-[pressed]:ml-4"]
3271
+ }
3272
+ },
3273
+ {
3274
+ disableAnimation: false,
3275
+ size: "md",
3276
+ class: {
3277
+ thumb: ["group-data-[pressed=true]:w-6", "group-data-[selected]:group-data-[pressed]:ml-4"]
3278
+ }
3279
+ },
3280
+ {
3281
+ disableAnimation: false,
3282
+ size: "lg",
3283
+ class: {
3284
+ thumb: ["group-data-[pressed=true]:w-7", "group-data-[selected]:group-data-[pressed]:ml-5"]
3285
+ }
3286
+ }
3287
+ ]
3271
3288
  });
3272
3289
 
3273
3290
  // src/components/accordion.ts
@@ -6350,21 +6367,14 @@ var defaultLayout = {
6350
6367
  large: "0px 0px 30px 0px rgb(0 0 0 / 0.04), 0px 30px 60px 0px rgb(0 0 0 / 0.12), 0px 0px 1px 0px rgb(0 0 0 / 0.3)"
6351
6368
  }
6352
6369
  };
6353
- var lightLayout = {
6354
- ...defaultLayout
6355
- };
6370
+ var lightLayout = {};
6356
6371
  var darkLayout = {
6357
- ...defaultLayout,
6358
6372
  boxShadow: {
6359
6373
  small: "0px 0px 5px 0px rgb(0 0 0 / 0.05), 0px 2px 10px 0px rgb(0 0 0 / 0.2), inset 0px 0px 1px 0px rgb(255 255 255 / 0.15)",
6360
6374
  medium: "0px 0px 15px 0px rgb(0 0 0 / 0.06), 0px 2px 30px 0px rgb(0 0 0 / 0.22), inset 0px 0px 1px 0px rgb(255 255 255 / 0.15)",
6361
6375
  large: "0px 0px 30px 0px rgb(0 0 0 / 0.07), 0px 30px 60px 0px rgb(0 0 0 / 0.26), inset 0px 0px 1px 0px rgb(255 255 255 / 0.15)"
6362
6376
  }
6363
6377
  };
6364
- var layouts = {
6365
- light: lightLayout,
6366
- dark: darkLayout
6367
- };
6368
6378
 
6369
6379
  // src/plugin.ts
6370
6380
  var DEFAULT_PREFIX = "nextui";
@@ -6437,7 +6447,7 @@ var resolveConfig = (themes = {}, defaultTheme, prefix) => {
6437
6447
  });
6438
6448
  return resolved;
6439
6449
  };
6440
- var corePlugin = (themes = {}, defaultTheme, prefix, omitCommonColors) => {
6450
+ var corePlugin = (themes = {}, defaultTheme, prefix, addCommonColors) => {
6441
6451
  const resolved = resolveConfig(themes, defaultTheme, prefix);
6442
6452
  const minSizes = {
6443
6453
  "unit-1": `var(--${prefix}-spacing-unit)`,
@@ -6473,7 +6483,7 @@ var corePlugin = (themes = {}, defaultTheme, prefix, omitCommonColors) => {
6473
6483
  theme: {
6474
6484
  extend: {
6475
6485
  colors: {
6476
- ...omitCommonColors ? {} : commonColors,
6486
+ ...addCommonColors ? commonColors : {},
6477
6487
  ...resolved.colors
6478
6488
  },
6479
6489
  height: {
@@ -6538,13 +6548,27 @@ var corePlugin = (themes = {}, defaultTheme, prefix, omitCommonColors) => {
6538
6548
  );
6539
6549
  };
6540
6550
  var nextui = (config = {}) => {
6541
- const themeObject = config.themes;
6551
+ const {
6552
+ themes: themeObject = {},
6553
+ defaultTheme = "light",
6554
+ layout: userLayout,
6555
+ defaultExtendTheme = "light",
6556
+ prefix: defaultPrefix = DEFAULT_PREFIX,
6557
+ addCommonColors = false
6558
+ } = config;
6542
6559
  const userLightColors = (0, import_lodash.default)(themeObject, "light.colors", {});
6543
6560
  const userDarkColors = (0, import_lodash.default)(themeObject, "dark.colors", {});
6544
- const defaultTheme = config.defaultTheme || "light";
6545
- const defaultExtendTheme = config.defaultExtendTheme || "light";
6546
- const defaultPrefix = config.prefix || DEFAULT_PREFIX;
6547
- const omitCommonColors = config.omitCommonColors || false;
6561
+ const defaultLayoutObj = userLayout && typeof userLayout === "object" ? (0, import_deepmerge.default)(defaultLayout, userLayout) : defaultLayout;
6562
+ const baseLayouts = {
6563
+ light: {
6564
+ ...defaultLayoutObj,
6565
+ ...lightLayout
6566
+ },
6567
+ dark: {
6568
+ ...defaultLayoutObj,
6569
+ ...darkLayout
6570
+ }
6571
+ };
6548
6572
  let otherThemes = (0, import_lodash2.default)(themeObject, ["light", "dark"]) || {};
6549
6573
  (0, import_lodash3.default)(otherThemes, ({ extend, colors: colors2, layout }, themeName) => {
6550
6574
  const baseTheme = extend && isBaseTheme(extend) ? extend : defaultExtendTheme;
@@ -6552,15 +6576,18 @@ var nextui = (config = {}) => {
6552
6576
  otherThemes[themeName].colors = (0, import_deepmerge.default)(semanticColors[baseTheme], colors2);
6553
6577
  }
6554
6578
  if (layout && typeof layout === "object") {
6555
- otherThemes[themeName].layout = (0, import_deepmerge.default)(extend ? layouts[extend] : defaultLayout, layout);
6579
+ otherThemes[themeName].layout = (0, import_deepmerge.default)(
6580
+ extend ? baseLayouts[extend] : defaultLayoutObj,
6581
+ layout
6582
+ );
6556
6583
  }
6557
6584
  });
6558
6585
  const light2 = {
6559
- layout: (0, import_deepmerge.default)(lightLayout, (0, import_lodash.default)(themeObject, "light.layout", {})),
6586
+ layout: (0, import_deepmerge.default)(baseLayouts.light, (0, import_lodash.default)(themeObject, "light.layout", {})),
6560
6587
  colors: (0, import_deepmerge.default)(semanticColors.light, userLightColors)
6561
6588
  };
6562
6589
  const dark = {
6563
- layout: (0, import_deepmerge.default)(darkLayout, (0, import_lodash.default)(themeObject, "dark.layout", {})),
6590
+ layout: (0, import_deepmerge.default)(baseLayouts.dark, (0, import_lodash.default)(themeObject, "dark.layout", {})),
6564
6591
  colors: (0, import_deepmerge.default)(semanticColors.dark, userDarkColors)
6565
6592
  };
6566
6593
  const themes = {
@@ -6568,7 +6595,7 @@ var nextui = (config = {}) => {
6568
6595
  dark,
6569
6596
  ...otherThemes
6570
6597
  };
6571
- return corePlugin(themes, defaultTheme, defaultPrefix, omitCommonColors);
6598
+ return corePlugin(themes, defaultTheme, defaultPrefix, addCommonColors);
6572
6599
  };
6573
6600
 
6574
6601
  // src/index.ts
package/dist/index.mjs CHANGED
@@ -1,17 +1,35 @@
1
1
  import "./chunk-PRWEADY4.mjs";
2
+ import {
3
+ table
4
+ } from "./chunk-ADNJ6GPZ.mjs";
5
+ import {
6
+ tabs
7
+ } from "./chunk-AWPGSFD6.mjs";
8
+ import {
9
+ toggle
10
+ } from "./chunk-SJ7X4UT4.mjs";
2
11
  import {
3
12
  user
4
13
  } from "./chunk-O24TFHPZ.mjs";
14
+ import {
15
+ pagination
16
+ } from "./chunk-RUD4TZ7J.mjs";
17
+ import {
18
+ popover
19
+ } from "./chunk-HREHHLTK.mjs";
20
+ import {
21
+ progress
22
+ } from "./chunk-LQGOKGQV.mjs";
5
23
  import {
6
24
  radio,
7
25
  radioGroup
8
- } from "./chunk-4DKW2WAC.mjs";
26
+ } from "./chunk-Y33ZY7KH.mjs";
9
27
  import {
10
28
  skeleton
11
29
  } from "./chunk-EUS2SEYI.mjs";
12
30
  import {
13
31
  snippet
14
- } from "./chunk-B55QBA5E.mjs";
32
+ } from "./chunk-O3IKQG57.mjs";
15
33
  import {
16
34
  spacer
17
35
  } from "./chunk-EC4F6RJF.mjs";
@@ -19,14 +37,14 @@ import {
19
37
  spinner
20
38
  } from "./chunk-NAY2XKLY.mjs";
21
39
  import {
22
- table
23
- } from "./chunk-ADNJ6GPZ.mjs";
24
- import {
25
- tabs
26
- } from "./chunk-RHIZZ5XX.mjs";
40
+ dropdown,
41
+ dropdownItem,
42
+ dropdownMenu,
43
+ dropdownSection
44
+ } from "./chunk-23KK2ZAZ.mjs";
27
45
  import {
28
- toggle
29
- } from "./chunk-HKDWTEHI.mjs";
46
+ image
47
+ } from "./chunk-WBNF66V7.mjs";
30
48
  import {
31
49
  input
32
50
  } from "./chunk-LIHSRRTN.mjs";
@@ -44,38 +62,31 @@ import {
44
62
  navbar
45
63
  } from "./chunk-LGRQRHJJ.mjs";
46
64
  import {
47
- pagination
48
- } from "./chunk-WK6I5GT7.mjs";
65
+ button,
66
+ buttonGroup
67
+ } from "./chunk-KO4T2DX4.mjs";
49
68
  import {
50
- popover
51
- } from "./chunk-HFOW2Y4W.mjs";
69
+ card
70
+ } from "./chunk-O5HCT4VI.mjs";
52
71
  import {
53
- progress
54
- } from "./chunk-LQGOKGQV.mjs";
72
+ checkbox,
73
+ checkboxGroup
74
+ } from "./chunk-2T5RQ7SK.mjs";
55
75
  import {
56
76
  chip
57
- } from "./chunk-MYJVNM2A.mjs";
77
+ } from "./chunk-QZOZ7UWM.mjs";
58
78
  import {
59
79
  circularProgress
60
80
  } from "./chunk-XPLXQDB3.mjs";
61
81
  import {
62
82
  code
63
- } from "./chunk-77O7KLUI.mjs";
83
+ } from "./chunk-HDWYLUG3.mjs";
64
84
  import {
65
85
  divider
66
86
  } from "./chunk-YSXRNNDV.mjs";
67
87
  import {
68
88
  drip
69
89
  } from "./chunk-GNLIYZAQ.mjs";
70
- import {
71
- dropdown,
72
- dropdownItem,
73
- dropdownMenu,
74
- dropdownSection
75
- } from "./chunk-23KK2ZAZ.mjs";
76
- import {
77
- image
78
- } from "./chunk-WBNF66V7.mjs";
79
90
  import {
80
91
  accordion,
81
92
  accordionItem
@@ -83,31 +94,21 @@ import {
83
94
  import {
84
95
  avatar,
85
96
  avatarGroup
86
- } from "./chunk-RPMLQF4Y.mjs";
97
+ } from "./chunk-VB6YPWEW.mjs";
87
98
  import {
88
99
  badge
89
- } from "./chunk-XCWQAA5D.mjs";
90
- import {
91
- button,
92
- buttonGroup
93
- } from "./chunk-TJL5HHMD.mjs";
94
- import {
95
- card
96
- } from "./chunk-O5HCT4VI.mjs";
97
- import {
98
- checkbox,
99
- checkboxGroup
100
- } from "./chunk-H3WJKBMK.mjs";
100
+ } from "./chunk-3RZCOCFH.mjs";
101
+ import "./chunk-6AEINX52.mjs";
101
102
  import "./chunk-CMYR6AOY.mjs";
102
103
  import "./chunk-K7LK7NCE.mjs";
103
104
  import {
104
105
  colorVariants
105
106
  } from "./chunk-2PIR7DFM.mjs";
106
- import "./chunk-6AEINX52.mjs";
107
107
  import {
108
108
  nextui
109
- } from "./chunk-NAXYVM2Y.mjs";
109
+ } from "./chunk-3M6H25BL.mjs";
110
110
  import "./chunk-XA5ALA4E.mjs";
111
+ import "./chunk-DMASP6FA.mjs";
111
112
  import "./chunk-DYIIRM5B.mjs";
112
113
  import "./chunk-DI2L75XK.mjs";
113
114
  import "./chunk-4Z22WXZX.mjs";
@@ -124,29 +125,28 @@ import {
124
125
  import "./chunk-WQEDQHKX.mjs";
125
126
  import {
126
127
  colors
127
- } from "./chunk-QZTWGJ72.mjs";
128
+ } from "./chunk-QGHMGO5E.mjs";
128
129
  import {
129
130
  semanticColors
130
- } from "./chunk-G4RCK475.mjs";
131
+ } from "./chunk-7L2ZWDVP.mjs";
131
132
  import "./chunk-KUNVFLXJ.mjs";
132
133
  import "./chunk-M63AFAHO.mjs";
133
- import "./chunk-HK6FLMPL.mjs";
134
+ import "./chunk-7MCHEQXT.mjs";
134
135
  import {
135
136
  mappedSpacingScaleKeys,
136
137
  spacingScaleKeys
137
138
  } from "./chunk-WA5F6AED.mjs";
138
- import "./chunk-DMASP6FA.mjs";
139
139
  import {
140
140
  commonColors
141
- } from "./chunk-IAS3SFA4.mjs";
142
- import "./chunk-JUEOCLA3.mjs";
141
+ } from "./chunk-6TOTQSJE.mjs";
143
142
  import "./chunk-3LKKH4AR.mjs";
144
- import "./chunk-T3GWIVAM.mjs";
145
143
  import "./chunk-OR5PUD24.mjs";
146
144
  import "./chunk-DCEG5LGX.mjs";
147
145
  import "./chunk-L2OL7R23.mjs";
148
146
  import "./chunk-YZYGFPNK.mjs";
147
+ import "./chunk-JUEOCLA3.mjs";
149
148
  import "./chunk-GHZ36ATJ.mjs";
149
+ import "./chunk-T3GWIVAM.mjs";
150
150
 
151
151
  // src/index.ts
152
152
  import { tv } from "tailwind-variants";
package/dist/plugin.js CHANGED
@@ -680,21 +680,14 @@ var defaultLayout = {
680
680
  large: "0px 0px 30px 0px rgb(0 0 0 / 0.04), 0px 30px 60px 0px rgb(0 0 0 / 0.12), 0px 0px 1px 0px rgb(0 0 0 / 0.3)"
681
681
  }
682
682
  };
683
- var lightLayout = {
684
- ...defaultLayout
685
- };
683
+ var lightLayout = {};
686
684
  var darkLayout = {
687
- ...defaultLayout,
688
685
  boxShadow: {
689
686
  small: "0px 0px 5px 0px rgb(0 0 0 / 0.05), 0px 2px 10px 0px rgb(0 0 0 / 0.2), inset 0px 0px 1px 0px rgb(255 255 255 / 0.15)",
690
687
  medium: "0px 0px 15px 0px rgb(0 0 0 / 0.06), 0px 2px 30px 0px rgb(0 0 0 / 0.22), inset 0px 0px 1px 0px rgb(255 255 255 / 0.15)",
691
688
  large: "0px 0px 30px 0px rgb(0 0 0 / 0.07), 0px 30px 60px 0px rgb(0 0 0 / 0.26), inset 0px 0px 1px 0px rgb(255 255 255 / 0.15)"
692
689
  }
693
690
  };
694
- var layouts = {
695
- light: lightLayout,
696
- dark: darkLayout
697
- };
698
691
 
699
692
  // src/utils/classes.ts
700
693
  var baseStyles = (prefix) => ({
@@ -773,7 +766,7 @@ var resolveConfig = (themes = {}, defaultTheme, prefix) => {
773
766
  });
774
767
  return resolved;
775
768
  };
776
- var corePlugin = (themes = {}, defaultTheme, prefix, omitCommonColors) => {
769
+ var corePlugin = (themes = {}, defaultTheme, prefix, addCommonColors) => {
777
770
  const resolved = resolveConfig(themes, defaultTheme, prefix);
778
771
  const minSizes = {
779
772
  "unit-1": `var(--${prefix}-spacing-unit)`,
@@ -809,7 +802,7 @@ var corePlugin = (themes = {}, defaultTheme, prefix, omitCommonColors) => {
809
802
  theme: {
810
803
  extend: {
811
804
  colors: {
812
- ...omitCommonColors ? {} : commonColors,
805
+ ...addCommonColors ? commonColors : {},
813
806
  ...resolved.colors
814
807
  },
815
808
  height: {
@@ -874,13 +867,27 @@ var corePlugin = (themes = {}, defaultTheme, prefix, omitCommonColors) => {
874
867
  );
875
868
  };
876
869
  var nextui = (config = {}) => {
877
- const themeObject = config.themes;
870
+ const {
871
+ themes: themeObject = {},
872
+ defaultTheme = "light",
873
+ layout: userLayout,
874
+ defaultExtendTheme = "light",
875
+ prefix: defaultPrefix = DEFAULT_PREFIX,
876
+ addCommonColors = false
877
+ } = config;
878
878
  const userLightColors = (0, import_lodash.default)(themeObject, "light.colors", {});
879
879
  const userDarkColors = (0, import_lodash.default)(themeObject, "dark.colors", {});
880
- const defaultTheme = config.defaultTheme || "light";
881
- const defaultExtendTheme = config.defaultExtendTheme || "light";
882
- const defaultPrefix = config.prefix || DEFAULT_PREFIX;
883
- const omitCommonColors = config.omitCommonColors || false;
880
+ const defaultLayoutObj = userLayout && typeof userLayout === "object" ? (0, import_deepmerge.default)(defaultLayout, userLayout) : defaultLayout;
881
+ const baseLayouts = {
882
+ light: {
883
+ ...defaultLayoutObj,
884
+ ...lightLayout
885
+ },
886
+ dark: {
887
+ ...defaultLayoutObj,
888
+ ...darkLayout
889
+ }
890
+ };
884
891
  let otherThemes = (0, import_lodash2.default)(themeObject, ["light", "dark"]) || {};
885
892
  (0, import_lodash3.default)(otherThemes, ({ extend, colors: colors2, layout }, themeName) => {
886
893
  const baseTheme = extend && isBaseTheme(extend) ? extend : defaultExtendTheme;
@@ -888,15 +895,18 @@ var nextui = (config = {}) => {
888
895
  otherThemes[themeName].colors = (0, import_deepmerge.default)(semanticColors[baseTheme], colors2);
889
896
  }
890
897
  if (layout && typeof layout === "object") {
891
- otherThemes[themeName].layout = (0, import_deepmerge.default)(extend ? layouts[extend] : defaultLayout, layout);
898
+ otherThemes[themeName].layout = (0, import_deepmerge.default)(
899
+ extend ? baseLayouts[extend] : defaultLayoutObj,
900
+ layout
901
+ );
892
902
  }
893
903
  });
894
904
  const light = {
895
- layout: (0, import_deepmerge.default)(lightLayout, (0, import_lodash.default)(themeObject, "light.layout", {})),
905
+ layout: (0, import_deepmerge.default)(baseLayouts.light, (0, import_lodash.default)(themeObject, "light.layout", {})),
896
906
  colors: (0, import_deepmerge.default)(semanticColors.light, userLightColors)
897
907
  };
898
908
  const dark = {
899
- layout: (0, import_deepmerge.default)(darkLayout, (0, import_lodash.default)(themeObject, "dark.layout", {})),
909
+ layout: (0, import_deepmerge.default)(baseLayouts.dark, (0, import_lodash.default)(themeObject, "dark.layout", {})),
900
910
  colors: (0, import_deepmerge.default)(semanticColors.dark, userDarkColors)
901
911
  };
902
912
  const themes = {
@@ -904,7 +914,7 @@ var nextui = (config = {}) => {
904
914
  dark,
905
915
  ...otherThemes
906
916
  };
907
- return corePlugin(themes, defaultTheme, defaultPrefix, omitCommonColors);
917
+ return corePlugin(themes, defaultTheme, defaultPrefix, addCommonColors);
908
918
  };
909
919
  // Annotate the CommonJS export names for ESM import in node:
910
920
  0 && (module.exports = {
package/dist/plugin.mjs CHANGED
@@ -1,29 +1,29 @@
1
1
  import {
2
2
  nextui
3
- } from "./chunk-NAXYVM2Y.mjs";
3
+ } from "./chunk-3M6H25BL.mjs";
4
4
  import "./chunk-XA5ALA4E.mjs";
5
+ import "./chunk-DMASP6FA.mjs";
5
6
  import "./chunk-DYIIRM5B.mjs";
6
7
  import "./chunk-DI2L75XK.mjs";
7
8
  import "./chunk-4Z22WXZX.mjs";
8
9
  import "./chunk-KPK2JQIF.mjs";
9
10
  import "./chunk-T7JNS25F.mjs";
10
11
  import "./chunk-WQEDQHKX.mjs";
11
- import "./chunk-QZTWGJ72.mjs";
12
- import "./chunk-G4RCK475.mjs";
12
+ import "./chunk-QGHMGO5E.mjs";
13
+ import "./chunk-7L2ZWDVP.mjs";
13
14
  import "./chunk-KUNVFLXJ.mjs";
14
15
  import "./chunk-M63AFAHO.mjs";
15
- import "./chunk-HK6FLMPL.mjs";
16
+ import "./chunk-7MCHEQXT.mjs";
16
17
  import "./chunk-WA5F6AED.mjs";
17
- import "./chunk-DMASP6FA.mjs";
18
- import "./chunk-IAS3SFA4.mjs";
19
- import "./chunk-JUEOCLA3.mjs";
18
+ import "./chunk-6TOTQSJE.mjs";
20
19
  import "./chunk-3LKKH4AR.mjs";
21
- import "./chunk-T3GWIVAM.mjs";
22
20
  import "./chunk-OR5PUD24.mjs";
23
21
  import "./chunk-DCEG5LGX.mjs";
24
22
  import "./chunk-L2OL7R23.mjs";
25
23
  import "./chunk-YZYGFPNK.mjs";
24
+ import "./chunk-JUEOCLA3.mjs";
26
25
  import "./chunk-GHZ36ATJ.mjs";
26
+ import "./chunk-T3GWIVAM.mjs";
27
27
  export {
28
28
  nextui
29
29
  };
package/dist/types.d.ts CHANGED
@@ -104,7 +104,7 @@ type ConfigTheme = {
104
104
  type ConfigThemes = Record<string, ConfigTheme>;
105
105
  /**
106
106
  * The NextUI config.
107
- * @see https://nextui.org/docs/theme/customize-theme
107
+ * @see https://nextui.org/docs/customization/customize-theme
108
108
  */
109
109
  type NextUIPluginConfig = {
110
110
  /**
@@ -116,7 +116,11 @@ type NextUIPluginConfig = {
116
116
  * If true, the common nextui colors (e.g. "blue", "green", "purple") will not be extended on the theme.
117
117
  * @default false
118
118
  */
119
- omitCommonColors?: boolean;
119
+ addCommonColors?: boolean;
120
+ /**
121
+ * Common layout definitions. These definitions are applied to all themes.
122
+ */
123
+ layout?: LayoutTheme;
120
124
  /**
121
125
  * The theme definitions.
122
126
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextui-org/theme",
3
- "version": "0.0.0-dev-v2-20230716194106",
3
+ "version": "0.0.0-dev-v2-20230718014939",
4
4
  "description": "The default theme for NextUI components",
5
5
  "keywords": [
6
6
  "theme",
@@ -1,9 +1,9 @@
1
- import {
2
- colorVariants
3
- } from "./chunk-2PIR7DFM.mjs";
4
1
  import {
5
2
  tv
6
3
  } from "./chunk-6AEINX52.mjs";
4
+ import {
5
+ colorVariants
6
+ } from "./chunk-2PIR7DFM.mjs";
7
7
 
8
8
  // src/components/badge.ts
9
9
  var badge = tv({
@@ -1,12 +1,6 @@
1
- import {
2
- yellow
3
- } from "./chunk-JUEOCLA3.mjs";
4
1
  import {
5
2
  zinc
6
3
  } from "./chunk-3LKKH4AR.mjs";
7
- import {
8
- cyan
9
- } from "./chunk-T3GWIVAM.mjs";
10
4
  import {
11
5
  green
12
6
  } from "./chunk-OR5PUD24.mjs";
@@ -19,9 +13,15 @@ import {
19
13
  import {
20
14
  red
21
15
  } from "./chunk-YZYGFPNK.mjs";
16
+ import {
17
+ yellow
18
+ } from "./chunk-JUEOCLA3.mjs";
22
19
  import {
23
20
  blue
24
21
  } from "./chunk-GHZ36ATJ.mjs";
22
+ import {
23
+ cyan
24
+ } from "./chunk-T3GWIVAM.mjs";
25
25
 
26
26
  // src/colors/common.ts
27
27
  var commonColors = {
@@ -1,9 +1,9 @@
1
- import {
2
- colorVariants
3
- } from "./chunk-2PIR7DFM.mjs";
4
1
  import {
5
2
  tv
6
3
  } from "./chunk-6AEINX52.mjs";
4
+ import {
5
+ colorVariants
6
+ } from "./chunk-2PIR7DFM.mjs";
7
7
  import {
8
8
  dataFocusVisibleClasses
9
9
  } from "./chunk-T7JNS25F.mjs";
@@ -1,9 +1,9 @@
1
- import {
2
- colorVariants
3
- } from "./chunk-2PIR7DFM.mjs";
4
1
  import {
5
2
  tv
6
3
  } from "./chunk-6AEINX52.mjs";
4
+ import {
5
+ colorVariants
6
+ } from "./chunk-2PIR7DFM.mjs";
7
7
 
8
8
  // src/components/code.ts
9
9
  var code = tv({