@nextui-org/theme 2.1.18 → 2.2.0

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 (166) hide show
  1. package/README.md +1 -1
  2. package/dist/{chunk-XY766PDD.mjs → chunk-3FZU25GR.mjs} +2 -1
  3. package/dist/{chunk-CVU6I4IJ.mjs → chunk-4ZM6AI3H.mjs} +1 -1
  4. package/dist/{chunk-LQGOKGQV.mjs → chunk-524WVPFR.mjs} +1 -1
  5. package/dist/{chunk-RJKUWMDJ.mjs → chunk-6XJJCV76.mjs} +1 -1
  6. package/dist/{chunk-S7W5DQP2.mjs → chunk-726LN7M3.mjs} +1 -1
  7. package/dist/{chunk-PXVLYT7W.mjs → chunk-7ELFOVMX.mjs} +1 -1
  8. package/dist/{chunk-WODEC7EF.mjs → chunk-7ODIBITJ.mjs} +6 -6
  9. package/dist/chunk-7TJINK3S.mjs +390 -0
  10. package/dist/{chunk-NVOA7VPK.mjs → chunk-AC6F4DT6.mjs} +4 -4
  11. package/dist/{chunk-GNLIYZAQ.mjs → chunk-AGUZRGXC.mjs} +1 -1
  12. package/dist/{chunk-U4EMZ2CQ.mjs → chunk-AO2AAOEJ.mjs} +2 -2
  13. package/dist/{chunk-3BNHFA72.mjs → chunk-AT4OXKKK.mjs} +1 -1
  14. package/dist/chunk-BHDPFX6P.mjs +400 -0
  15. package/dist/chunk-BLAJANNW.mjs +43 -0
  16. package/dist/{chunk-5EJVI4V3.mjs → chunk-CTY7IP65.mjs} +29 -13
  17. package/dist/{chunk-DXTDUHS5.mjs → chunk-CUUGEIPA.mjs} +1 -1
  18. package/dist/chunk-D2XMP2NC.mjs +6 -0
  19. package/dist/{chunk-4JBYJQSP.mjs → chunk-ECP4S2VZ.mjs} +1 -1
  20. package/dist/{chunk-B55QBA5E.mjs → chunk-FRI2VDCA.mjs} +1 -1
  21. package/dist/{chunk-6AEINX52.mjs → chunk-GMMETTYU.mjs} +2 -16
  22. package/dist/{chunk-Y5VJSYKV.mjs → chunk-GMUSZ3YF.mjs} +1 -1
  23. package/dist/{chunk-FHNC7F3W.mjs → chunk-HGSHFC5N.mjs} +7 -1
  24. package/dist/{chunk-G3PB7L4N.mjs → chunk-HPFX3B3F.mjs} +1 -30
  25. package/dist/{chunk-VZI6SR6H.mjs → chunk-HUBDRSA4.mjs} +1 -2
  26. package/dist/{chunk-33DU6C7I.mjs → chunk-I6ESTKKY.mjs} +9 -9
  27. package/dist/{chunk-EGP3AT4R.mjs → chunk-IP3D7KVB.mjs} +3 -1
  28. package/dist/{chunk-Q3TEEYQJ.mjs → chunk-JQTFOIV7.mjs} +1 -1
  29. package/dist/{chunk-JBHEJMGV.mjs → chunk-KCOC3H6R.mjs} +1 -1
  30. package/dist/{chunk-ZWJMJMVY.mjs → chunk-KVPPQD2E.mjs} +27 -5
  31. package/dist/{chunk-WBNF66V7.mjs → chunk-LDBYFTHC.mjs} +1 -1
  32. package/dist/{chunk-GOHT67J3.mjs → chunk-MUWHEIW6.mjs} +13 -6
  33. package/dist/{chunk-2SNOAR5H.mjs → chunk-NAUU2OUH.mjs} +1 -1
  34. package/dist/{chunk-QYW2VWAB.mjs → chunk-NYSEAAK5.mjs} +4 -4
  35. package/dist/{chunk-LENRVMCD.mjs → chunk-OQIS4MXV.mjs} +1 -1
  36. package/dist/{chunk-NAY2XKLY.mjs → chunk-PSEUPXFL.mjs} +1 -1
  37. package/dist/{chunk-SPRRISBY.mjs → chunk-RNAP5C4C.mjs} +1 -1
  38. package/dist/{chunk-L37EV5TN.mjs → chunk-S573WUYY.mjs} +1 -1
  39. package/dist/{chunk-777XXWYS.mjs → chunk-SEKJ6A6T.mjs} +19 -2
  40. package/dist/{chunk-YSXRNNDV.mjs → chunk-UODOTC2G.mjs} +1 -1
  41. package/dist/{chunk-77O7KLUI.mjs → chunk-V5ZTBGGO.mjs} +1 -1
  42. package/dist/{chunk-MUPUMXL7.mjs → chunk-VDRJHB4F.mjs} +7 -4
  43. package/dist/{chunk-EC4F6RJF.mjs → chunk-W6DVXJB3.mjs} +1 -1
  44. package/dist/{chunk-XPLXQDB3.mjs → chunk-WAAJG22Y.mjs} +1 -1
  45. package/dist/chunk-WBQAMGXK.mjs +0 -0
  46. package/dist/{chunk-TDMF44G6.mjs → chunk-X7N3NQ6S.mjs} +1 -1
  47. package/dist/{chunk-5QVKTCUZ.mjs → chunk-YSA7EQBH.mjs} +12 -47
  48. package/dist/components/accordion.js +2 -67
  49. package/dist/components/accordion.mjs +2 -3
  50. package/dist/components/autocomplete.js +2 -67
  51. package/dist/components/autocomplete.mjs +2 -3
  52. package/dist/components/avatar.d.ts +14 -4
  53. package/dist/components/avatar.js +8 -70
  54. package/dist/components/avatar.mjs +2 -3
  55. package/dist/components/badge.js +2 -67
  56. package/dist/components/badge.mjs +2 -3
  57. package/dist/components/breadcrumbs.js +2 -67
  58. package/dist/components/breadcrumbs.mjs +2 -3
  59. package/dist/components/button.d.ts +35 -35
  60. package/dist/components/button.js +10 -75
  61. package/dist/components/button.mjs +2 -3
  62. package/dist/components/calendar.d.ts +495 -0
  63. package/dist/components/calendar.js +455 -0
  64. package/dist/components/calendar.mjs +11 -0
  65. package/dist/components/card.js +2 -67
  66. package/dist/components/card.mjs +2 -3
  67. package/dist/components/checkbox.js +5 -70
  68. package/dist/components/checkbox.mjs +2 -3
  69. package/dist/components/chip.js +5 -70
  70. package/dist/components/chip.mjs +2 -3
  71. package/dist/components/circular-progress.js +2 -67
  72. package/dist/components/circular-progress.mjs +2 -3
  73. package/dist/components/code.js +2 -67
  74. package/dist/components/code.mjs +2 -3
  75. package/dist/components/date-input.d.ts +815 -0
  76. package/dist/components/date-input.js +439 -0
  77. package/dist/components/date-input.mjs +7 -0
  78. package/dist/components/date-picker.d.ts +265 -0
  79. package/dist/components/date-picker.js +93 -0
  80. package/dist/components/date-picker.mjs +9 -0
  81. package/dist/components/divider.js +2 -67
  82. package/dist/components/divider.mjs +2 -3
  83. package/dist/components/drip.d.ts +2 -32
  84. package/dist/components/drip.js +2 -67
  85. package/dist/components/drip.mjs +2 -3
  86. package/dist/components/dropdown.d.ts +4 -64
  87. package/dist/components/dropdown.js +2 -67
  88. package/dist/components/dropdown.mjs +2 -3
  89. package/dist/components/image.js +2 -67
  90. package/dist/components/image.mjs +2 -3
  91. package/dist/components/index.d.ts +4 -1
  92. package/dist/components/index.js +937 -112
  93. package/dist/components/index.mjs +72 -59
  94. package/dist/components/input.js +14 -72
  95. package/dist/components/input.mjs +2 -3
  96. package/dist/components/kbd.js +3 -67
  97. package/dist/components/kbd.mjs +2 -3
  98. package/dist/components/link.js +2 -67
  99. package/dist/components/link.mjs +2 -3
  100. package/dist/components/listbox.js +2 -67
  101. package/dist/components/listbox.mjs +2 -3
  102. package/dist/components/menu.d.ts +2 -2
  103. package/dist/components/menu.js +2 -67
  104. package/dist/components/menu.mjs +2 -3
  105. package/dist/components/modal.js +4 -67
  106. package/dist/components/modal.mjs +2 -3
  107. package/dist/components/navbar.js +2 -67
  108. package/dist/components/navbar.mjs +2 -3
  109. package/dist/components/pagination.js +2 -67
  110. package/dist/components/pagination.mjs +2 -3
  111. package/dist/components/popover.d.ts +42 -0
  112. package/dist/components/popover.js +8 -67
  113. package/dist/components/popover.mjs +2 -3
  114. package/dist/components/progress.js +2 -67
  115. package/dist/components/progress.mjs +2 -3
  116. package/dist/components/radio.js +2 -67
  117. package/dist/components/radio.mjs +2 -3
  118. package/dist/components/scroll-shadow.js +2 -67
  119. package/dist/components/scroll-shadow.mjs +2 -3
  120. package/dist/components/select.js +30 -79
  121. package/dist/components/select.mjs +2 -3
  122. package/dist/components/skeleton.js +3 -68
  123. package/dist/components/skeleton.mjs +2 -3
  124. package/dist/components/slider.js +2 -67
  125. package/dist/components/slider.mjs +2 -3
  126. package/dist/components/snippet.js +2 -67
  127. package/dist/components/snippet.mjs +2 -3
  128. package/dist/components/spacer.js +2 -67
  129. package/dist/components/spacer.mjs +2 -3
  130. package/dist/components/spinner.js +2 -67
  131. package/dist/components/spinner.mjs +2 -3
  132. package/dist/components/table.js +28 -71
  133. package/dist/components/table.mjs +2 -3
  134. package/dist/components/tabs.d.ts +115 -0
  135. package/dist/components/tabs.js +20 -68
  136. package/dist/components/tabs.mjs +2 -3
  137. package/dist/components/toggle.js +7 -72
  138. package/dist/components/toggle.mjs +2 -3
  139. package/dist/components/user.d.ts +1 -1
  140. package/dist/components/user.js +2 -67
  141. package/dist/components/user.mjs +2 -3
  142. package/dist/default-layout.js +1 -2
  143. package/dist/default-layout.mjs +1 -1
  144. package/dist/index.d.ts +5 -2
  145. package/dist/index.js +1133 -430
  146. package/dist/index.mjs +78 -69
  147. package/dist/plugin.js +6 -177
  148. package/dist/plugin.mjs +5 -6
  149. package/dist/types.d.ts +1 -11
  150. package/dist/types.js +0 -64
  151. package/dist/types.mjs +1 -8
  152. package/dist/utilities/index.d.ts +0 -30
  153. package/dist/utilities/index.js +0 -30
  154. package/dist/utilities/index.mjs +2 -2
  155. package/dist/utilities/transition.d.ts +2 -31
  156. package/dist/utilities/transition.js +4 -31
  157. package/dist/utilities/transition.mjs +3 -1
  158. package/dist/utils/theme.d.ts +1 -3
  159. package/dist/utils/theme.js +0 -110
  160. package/dist/utils/theme.mjs +1 -6
  161. package/dist/utils/tv.js +2 -67
  162. package/dist/utils/tv.mjs +1 -2
  163. package/package.json +4 -4
  164. package/dist/chunk-DGMET46Q.mjs +0 -63
  165. package/dist/chunk-WA5F6AED.mjs +0 -57
  166. /package/dist/{chunk-T6HAGWX5.mjs → chunk-UVXYPGDZ.mjs} +0 -0
@@ -27,31 +27,11 @@ module.exports = __toCommonJS(utilities_exports);
27
27
  // src/utilities/transition.ts
28
28
  var DEFAULT_TRANSITION_DURATION = "250ms";
29
29
  var transition_default = {
30
- ".transition-all": {
31
- "transition-property": "all",
32
- "transition-timing-function": "ease",
33
- "transition-duration": DEFAULT_TRANSITION_DURATION
34
- },
35
30
  ".transition-background": {
36
31
  "transition-property": "background",
37
32
  "transition-timing-function": "ease",
38
33
  "transition-duration": DEFAULT_TRANSITION_DURATION
39
34
  },
40
- ".transition": {
41
- "transition-property": "color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",
42
- "transition-timing-function": "ease",
43
- "transition-duration": DEFAULT_TRANSITION_DURATION
44
- },
45
- ".transition-colors": {
46
- "transition-property": "color, background-color, border-color, text-decoration-color, fill, stroke",
47
- "transition-timing-function": "ease",
48
- "transition-duration": DEFAULT_TRANSITION_DURATION
49
- },
50
- ".transition-opacity": {
51
- "transition-property": "opacity",
52
- "transition-timing-function": "ease",
53
- "transition-duration": DEFAULT_TRANSITION_DURATION
54
- },
55
35
  ".transition-colors-opacity": {
56
36
  "transition-property": "color, background-color, border-color, text-decoration-color, fill, stroke, opacity",
57
37
  "transition-timing-function": "ease",
@@ -77,16 +57,6 @@ var transition_default = {
77
57
  "transition-timing-function": "ease",
78
58
  "transition-duration": DEFAULT_TRANSITION_DURATION
79
59
  },
80
- ".transition-shadow": {
81
- "transition-property": "box-shadow",
82
- "transition-timing-function": "ease",
83
- "transition-duration": DEFAULT_TRANSITION_DURATION
84
- },
85
- ".transition-transform": {
86
- "transition-property": "transform",
87
- "transition-timing-function": "ease",
88
- "transition-duration": DEFAULT_TRANSITION_DURATION
89
- },
90
60
  ".transition-transform-opacity": {
91
61
  "transition-property": "transform, opacity",
92
62
  "transition-timing-function": "ease",
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  utilities
3
- } from "../chunk-S7W5DQP2.mjs";
3
+ } from "../chunk-726LN7M3.mjs";
4
4
  import "../chunk-DI2L75XK.mjs";
5
5
  import "../chunk-4Z22WXZX.mjs";
6
- import "../chunk-G3PB7L4N.mjs";
6
+ import "../chunk-HPFX3B3F.mjs";
7
7
  export {
8
8
  utilities
9
9
  };
@@ -1,32 +1,13 @@
1
+ declare const DEFAULT_TRANSITION_DURATION = "250ms";
1
2
  declare const _default: {
2
3
  /**
3
4
  * Transition utilities
4
5
  */
5
- ".transition-all": {
6
- "transition-property": string;
7
- "transition-timing-function": string;
8
- "transition-duration": string;
9
- };
10
6
  ".transition-background": {
11
7
  "transition-property": string;
12
8
  "transition-timing-function": string;
13
9
  "transition-duration": string;
14
10
  };
15
- ".transition": {
16
- "transition-property": string;
17
- "transition-timing-function": string;
18
- "transition-duration": string;
19
- };
20
- ".transition-colors": {
21
- "transition-property": string;
22
- "transition-timing-function": string;
23
- "transition-duration": string;
24
- };
25
- ".transition-opacity": {
26
- "transition-property": string;
27
- "transition-timing-function": string;
28
- "transition-duration": string;
29
- };
30
11
  ".transition-colors-opacity": {
31
12
  "transition-property": string;
32
13
  "transition-timing-function": string;
@@ -52,16 +33,6 @@ declare const _default: {
52
33
  "transition-timing-function": string;
53
34
  "transition-duration": string;
54
35
  };
55
- ".transition-shadow": {
56
- "transition-property": string;
57
- "transition-timing-function": string;
58
- "transition-duration": string;
59
- };
60
- ".transition-transform": {
61
- "transition-property": string;
62
- "transition-timing-function": string;
63
- "transition-duration": string;
64
- };
65
36
  ".transition-transform-opacity": {
66
37
  "transition-property": string;
67
38
  "transition-timing-function": string;
@@ -84,4 +55,4 @@ declare const _default: {
84
55
  };
85
56
  };
86
57
 
87
- export { _default as default };
58
+ export { DEFAULT_TRANSITION_DURATION, _default as default };
@@ -20,36 +20,17 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/utilities/transition.ts
21
21
  var transition_exports = {};
22
22
  __export(transition_exports, {
23
+ DEFAULT_TRANSITION_DURATION: () => DEFAULT_TRANSITION_DURATION,
23
24
  default: () => transition_default
24
25
  });
25
26
  module.exports = __toCommonJS(transition_exports);
26
27
  var DEFAULT_TRANSITION_DURATION = "250ms";
27
28
  var transition_default = {
28
- ".transition-all": {
29
- "transition-property": "all",
30
- "transition-timing-function": "ease",
31
- "transition-duration": DEFAULT_TRANSITION_DURATION
32
- },
33
29
  ".transition-background": {
34
30
  "transition-property": "background",
35
31
  "transition-timing-function": "ease",
36
32
  "transition-duration": DEFAULT_TRANSITION_DURATION
37
33
  },
38
- ".transition": {
39
- "transition-property": "color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",
40
- "transition-timing-function": "ease",
41
- "transition-duration": DEFAULT_TRANSITION_DURATION
42
- },
43
- ".transition-colors": {
44
- "transition-property": "color, background-color, border-color, text-decoration-color, fill, stroke",
45
- "transition-timing-function": "ease",
46
- "transition-duration": DEFAULT_TRANSITION_DURATION
47
- },
48
- ".transition-opacity": {
49
- "transition-property": "opacity",
50
- "transition-timing-function": "ease",
51
- "transition-duration": DEFAULT_TRANSITION_DURATION
52
- },
53
34
  ".transition-colors-opacity": {
54
35
  "transition-property": "color, background-color, border-color, text-decoration-color, fill, stroke, opacity",
55
36
  "transition-timing-function": "ease",
@@ -75,16 +56,6 @@ var transition_default = {
75
56
  "transition-timing-function": "ease",
76
57
  "transition-duration": DEFAULT_TRANSITION_DURATION
77
58
  },
78
- ".transition-shadow": {
79
- "transition-property": "box-shadow",
80
- "transition-timing-function": "ease",
81
- "transition-duration": DEFAULT_TRANSITION_DURATION
82
- },
83
- ".transition-transform": {
84
- "transition-property": "transform",
85
- "transition-timing-function": "ease",
86
- "transition-duration": DEFAULT_TRANSITION_DURATION
87
- },
88
59
  ".transition-transform-opacity": {
89
60
  "transition-property": "transform, opacity",
90
61
  "transition-timing-function": "ease",
@@ -107,4 +78,6 @@ var transition_default = {
107
78
  }
108
79
  };
109
80
  // Annotate the CommonJS export names for ESM import in node:
110
- 0 && (module.exports = {});
81
+ 0 && (module.exports = {
82
+ DEFAULT_TRANSITION_DURATION
83
+ });
@@ -1,6 +1,8 @@
1
1
  import {
2
+ DEFAULT_TRANSITION_DURATION,
2
3
  transition_default
3
- } from "../chunk-G3PB7L4N.mjs";
4
+ } from "../chunk-HPFX3B3F.mjs";
4
5
  export {
6
+ DEFAULT_TRANSITION_DURATION,
5
7
  transition_default as default
6
8
  };
@@ -5,7 +5,5 @@
5
5
  * @returns "light" | "dark
6
6
  */
7
7
  declare const isBaseTheme: (theme: string) => boolean;
8
- declare const generateSpacingScale: (spacingUnit: number) => Partial<Record<string, string>>;
9
- declare function createSpacingUnits(prefix: string): Record<string, string>;
10
8
 
11
- export { createSpacingUnits, generateSpacingScale, isBaseTheme };
9
+ export { isBaseTheme };
@@ -20,121 +20,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/utils/theme.ts
21
21
  var theme_exports = {};
22
22
  __export(theme_exports, {
23
- createSpacingUnits: () => createSpacingUnits,
24
- generateSpacingScale: () => generateSpacingScale,
25
23
  isBaseTheme: () => isBaseTheme
26
24
  });
27
25
  module.exports = __toCommonJS(theme_exports);
28
-
29
- // src/types.ts
30
- var spacingScaleKeys = [
31
- "0",
32
- "xs",
33
- "sm",
34
- "md",
35
- "lg",
36
- "xl",
37
- "2xl",
38
- "3xl",
39
- "4xl",
40
- "5xl",
41
- "6xl",
42
- "7xl",
43
- "8xl",
44
- "9xl",
45
- "1",
46
- "2",
47
- "3",
48
- "3.5",
49
- "4",
50
- "5",
51
- "6",
52
- "7",
53
- "8",
54
- "9",
55
- "10",
56
- "11",
57
- "12",
58
- "13",
59
- "14",
60
- "15",
61
- "16",
62
- "17",
63
- "18",
64
- "20",
65
- "24",
66
- "28",
67
- "32",
68
- "36",
69
- "40",
70
- "44",
71
- "48",
72
- "52",
73
- "56",
74
- "60",
75
- "64",
76
- "72",
77
- "80",
78
- "96"
79
- ];
80
- var mappedSpacingScaleKeys = spacingScaleKeys.map((key) => `unit-${key}`);
81
-
82
- // src/utils/theme.ts
83
26
  var isBaseTheme = (theme) => theme === "light" || theme === "dark";
84
- var ROOT_FONT_SIZE = 16;
85
- var baseScale = [1, 2, 3, 3.5, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18];
86
- var extendedScale = [20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 72, 80, 96];
87
- var generateSpacingScale = (spacingUnit) => {
88
- const scaleLabels = {
89
- xs: 2,
90
- sm: 3,
91
- md: 4,
92
- lg: 5.5,
93
- xl: 9,
94
- "2xl": 12,
95
- "3xl": 20,
96
- "4xl": 30,
97
- "5xl": 56,
98
- "6xl": 72,
99
- "7xl": 96,
100
- "8xl": 128,
101
- "9xl": 160
102
- };
103
- const scale = { 0: "0px" };
104
- Object.entries(scaleLabels).forEach(([label, multiplier]) => {
105
- scale[label] = multiplier ? `${spacingUnit * multiplier / ROOT_FONT_SIZE}rem` : `${spacingUnit / ROOT_FONT_SIZE}rem`;
106
- });
107
- baseScale.forEach((i) => {
108
- let key = `${i}`;
109
- if (key.includes(".")) {
110
- const [first, second] = key.split(".");
111
- key = `${first}_${second}`;
112
- }
113
- scale[key] = `${spacingUnit * i / ROOT_FONT_SIZE}rem`;
114
- });
115
- extendedScale.forEach((i) => {
116
- const key = `${i}`;
117
- scale[key] = `${spacingUnit * i / ROOT_FONT_SIZE}rem`;
118
- });
119
- return scale;
120
- };
121
- function createSpacingUnits(prefix) {
122
- let result = spacingScaleKeys.reduce((acc, key) => {
123
- let value = `var(--${prefix}-spacing-unit-${key})`;
124
- if (key.includes(".")) {
125
- const [first, second] = key.split(".");
126
- value = `var(--${prefix}-spacing-unit-${first}_${second})`;
127
- }
128
- return {
129
- ...acc,
130
- [`unit-${key}`]: value
131
- };
132
- }, {});
133
- return result;
134
- }
135
27
  // Annotate the CommonJS export names for ESM import in node:
136
28
  0 && (module.exports = {
137
- createSpacingUnits,
138
- generateSpacingScale,
139
29
  isBaseTheme
140
30
  });
@@ -1,11 +1,6 @@
1
1
  import {
2
- createSpacingUnits,
3
- generateSpacingScale,
4
2
  isBaseTheme
5
- } from "../chunk-DGMET46Q.mjs";
6
- import "../chunk-WA5F6AED.mjs";
3
+ } from "../chunk-D2XMP2NC.mjs";
7
4
  export {
8
- createSpacingUnits,
9
- generateSpacingScale,
10
5
  isBaseTheme
11
6
  };
package/dist/utils/tv.js CHANGED
@@ -24,61 +24,6 @@ __export(tv_exports, {
24
24
  });
25
25
  module.exports = __toCommonJS(tv_exports);
26
26
  var import_tailwind_variants = require("tailwind-variants");
27
-
28
- // src/types.ts
29
- var spacingScaleKeys = [
30
- "0",
31
- "xs",
32
- "sm",
33
- "md",
34
- "lg",
35
- "xl",
36
- "2xl",
37
- "3xl",
38
- "4xl",
39
- "5xl",
40
- "6xl",
41
- "7xl",
42
- "8xl",
43
- "9xl",
44
- "1",
45
- "2",
46
- "3",
47
- "3.5",
48
- "4",
49
- "5",
50
- "6",
51
- "7",
52
- "8",
53
- "9",
54
- "10",
55
- "11",
56
- "12",
57
- "13",
58
- "14",
59
- "15",
60
- "16",
61
- "17",
62
- "18",
63
- "20",
64
- "24",
65
- "28",
66
- "32",
67
- "36",
68
- "40",
69
- "44",
70
- "48",
71
- "52",
72
- "56",
73
- "60",
74
- "64",
75
- "72",
76
- "80",
77
- "96"
78
- ];
79
- var mappedSpacingScaleKeys = spacingScaleKeys.map((key) => `unit-${key}`);
80
-
81
- // src/utils/tv.ts
82
27
  var COMMON_UNITS = ["small", "medium", "large"];
83
28
  var tv = (options, config) => {
84
29
  var _a, _b, _c;
@@ -90,7 +35,7 @@ var tv = (options, config) => {
90
35
  theme: {
91
36
  ...(_b = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _b.theme,
92
37
  opacity: ["disabled"],
93
- spacing: ["divider", "unit", ...mappedSpacingScaleKeys],
38
+ spacing: ["divider"],
94
39
  borderWidth: COMMON_UNITS,
95
40
  borderRadius: COMMON_UNITS
96
41
  },
@@ -98,17 +43,7 @@ var tv = (options, config) => {
98
43
  ...(_c = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _c.classGroups,
99
44
  shadow: [{ shadow: COMMON_UNITS }],
100
45
  "font-size": [{ text: ["tiny", ...COMMON_UNITS] }],
101
- "bg-image": ["bg-stripe-gradient"],
102
- "min-w": [
103
- {
104
- "min-w": ["unit", ...mappedSpacingScaleKeys]
105
- }
106
- ],
107
- "min-h": [
108
- {
109
- "min-h": ["unit", ...mappedSpacingScaleKeys]
110
- }
111
- ]
46
+ "bg-image": ["bg-stripe-gradient"]
112
47
  }
113
48
  }
114
49
  });
package/dist/utils/tv.mjs CHANGED
@@ -1,7 +1,6 @@
1
1
  import {
2
2
  tv
3
- } from "../chunk-6AEINX52.mjs";
4
- import "../chunk-WA5F6AED.mjs";
3
+ } from "../chunk-GMMETTYU.mjs";
5
4
  export {
6
5
  tv
7
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextui-org/theme",
3
- "version": "2.1.18",
3
+ "version": "2.2.0",
4
4
  "description": "The default theme for NextUI components",
5
5
  "keywords": [
6
6
  "theme",
@@ -46,10 +46,10 @@
46
46
  "lodash.kebabcase": "^4.1.1",
47
47
  "lodash.mapkeys": "^4.6.0",
48
48
  "lodash.omit": "^4.5.0",
49
- "tailwind-variants": "^0.1.18"
49
+ "tailwind-variants": "^0.1.20"
50
50
  },
51
51
  "peerDependencies": {
52
- "tailwindcss": "*"
52
+ "tailwindcss": ">=3.4.0"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@types/color": "^3.0.3",
@@ -59,7 +59,7 @@
59
59
  "@types/lodash.kebabcase": "^4.1.7",
60
60
  "@types/lodash.mapkeys": "^4.6.7",
61
61
  "@types/lodash.omit": "^4.5.7",
62
- "tailwindcss": "^3.3.5",
62
+ "tailwindcss": "^3.4.0",
63
63
  "clean-package": "2.2.0"
64
64
  },
65
65
  "tsup": {
@@ -1,63 +0,0 @@
1
- import {
2
- spacingScaleKeys
3
- } from "./chunk-WA5F6AED.mjs";
4
-
5
- // src/utils/theme.ts
6
- var isBaseTheme = (theme) => theme === "light" || theme === "dark";
7
- var ROOT_FONT_SIZE = 16;
8
- var baseScale = [1, 2, 3, 3.5, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18];
9
- var extendedScale = [20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 72, 80, 96];
10
- var generateSpacingScale = (spacingUnit) => {
11
- const scaleLabels = {
12
- xs: 2,
13
- sm: 3,
14
- md: 4,
15
- lg: 5.5,
16
- xl: 9,
17
- "2xl": 12,
18
- "3xl": 20,
19
- "4xl": 30,
20
- "5xl": 56,
21
- "6xl": 72,
22
- "7xl": 96,
23
- "8xl": 128,
24
- "9xl": 160
25
- };
26
- const scale = { 0: "0px" };
27
- Object.entries(scaleLabels).forEach(([label, multiplier]) => {
28
- scale[label] = multiplier ? `${spacingUnit * multiplier / ROOT_FONT_SIZE}rem` : `${spacingUnit / ROOT_FONT_SIZE}rem`;
29
- });
30
- baseScale.forEach((i) => {
31
- let key = `${i}`;
32
- if (key.includes(".")) {
33
- const [first, second] = key.split(".");
34
- key = `${first}_${second}`;
35
- }
36
- scale[key] = `${spacingUnit * i / ROOT_FONT_SIZE}rem`;
37
- });
38
- extendedScale.forEach((i) => {
39
- const key = `${i}`;
40
- scale[key] = `${spacingUnit * i / ROOT_FONT_SIZE}rem`;
41
- });
42
- return scale;
43
- };
44
- function createSpacingUnits(prefix) {
45
- let result = spacingScaleKeys.reduce((acc, key) => {
46
- let value = `var(--${prefix}-spacing-unit-${key})`;
47
- if (key.includes(".")) {
48
- const [first, second] = key.split(".");
49
- value = `var(--${prefix}-spacing-unit-${first}_${second})`;
50
- }
51
- return {
52
- ...acc,
53
- [`unit-${key}`]: value
54
- };
55
- }, {});
56
- return result;
57
- }
58
-
59
- export {
60
- isBaseTheme,
61
- generateSpacingScale,
62
- createSpacingUnits
63
- };
@@ -1,57 +0,0 @@
1
- // src/types.ts
2
- var spacingScaleKeys = [
3
- "0",
4
- "xs",
5
- "sm",
6
- "md",
7
- "lg",
8
- "xl",
9
- "2xl",
10
- "3xl",
11
- "4xl",
12
- "5xl",
13
- "6xl",
14
- "7xl",
15
- "8xl",
16
- "9xl",
17
- "1",
18
- "2",
19
- "3",
20
- "3.5",
21
- "4",
22
- "5",
23
- "6",
24
- "7",
25
- "8",
26
- "9",
27
- "10",
28
- "11",
29
- "12",
30
- "13",
31
- "14",
32
- "15",
33
- "16",
34
- "17",
35
- "18",
36
- "20",
37
- "24",
38
- "28",
39
- "32",
40
- "36",
41
- "40",
42
- "44",
43
- "48",
44
- "52",
45
- "56",
46
- "60",
47
- "64",
48
- "72",
49
- "80",
50
- "96"
51
- ];
52
- var mappedSpacingScaleKeys = spacingScaleKeys.map((key) => `unit-${key}`);
53
-
54
- export {
55
- spacingScaleKeys,
56
- mappedSpacingScaleKeys
57
- };
File without changes