@nextui-org/theme 0.0.0-dev-v2-20230706232536 → 0.0.0-dev-v2-20230707003639

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.
@@ -2,7 +2,7 @@ import {
2
2
  createSpacingUnits,
3
3
  generateSpacingScale,
4
4
  isBaseTheme
5
- } from "./chunk-FRQTTQVI.mjs";
5
+ } from "./chunk-XA5ALA4E.mjs";
6
6
  import {
7
7
  utilities
8
8
  } from "./chunk-UNQJ7BRW.mjs";
@@ -142,7 +142,7 @@ var corePlugin = (themes = {}, defaultTheme, prefix, omitCommonColors) => {
142
142
  "unit-1": `var(--${prefix}-spacing-unit)`,
143
143
  "unit-2": `var(--${prefix}-spacing-unit-2`,
144
144
  "unit-3": `var(--${prefix}-spacing-unit-3)`,
145
- "unit-3.5": `var(--${prefix}-spacing-unit-3.5)`,
145
+ "unit-3.5": `var(--${prefix}-spacing-unit-3_5)`,
146
146
  "unit-4": `var(--${prefix}-spacing-unit-4)`,
147
147
  "unit-5": `var(--${prefix}-spacing-unit-5)`,
148
148
  "unit-6": `var(--${prefix}-spacing-unit-6)`,
@@ -40,9 +40,9 @@ var button = tv({
40
40
  ghost: "border-medium bg-transparent"
41
41
  },
42
42
  size: {
43
- sm: "px-unit-3 min-w-16 h-unit-8 text-tiny gap-unit-2 rounded-small",
44
- md: "px-unit-4 min-w-20 h-unit-10 text-small gap-unit-2 rounded-medium",
45
- lg: "px-unit-6 min-w-24 h-unit-12 text-medium gap-unit-3 rounded-large"
43
+ sm: "px-unit-3 min-w-unit-16 h-unit-8 text-tiny gap-unit-2 rounded-small",
44
+ md: "px-unit-4 min-w-unit-20 h-unit-10 text-small gap-unit-2 rounded-medium",
45
+ lg: "px-unit-6 min-w-unit-24 h-unit-12 text-medium gap-unit-3 rounded-large"
46
46
  },
47
47
  color: {
48
48
  default: "",
@@ -27,7 +27,11 @@ var generateSpacingScale = (spacingUnit) => {
27
27
  scale[label] = multiplier ? `${spacingUnit * multiplier}px` : `${spacingUnit}px`;
28
28
  });
29
29
  baseScale.forEach((i) => {
30
- const key = `${i}`;
30
+ let key = `${i}`;
31
+ if (key.includes(".")) {
32
+ const [first, second] = key.split(".");
33
+ key = `${first}_${second}`;
34
+ }
31
35
  scale[key] = `${spacingUnit * i}px`;
32
36
  });
33
37
  extendedScale.forEach((i) => {
@@ -37,13 +41,17 @@ var generateSpacingScale = (spacingUnit) => {
37
41
  return scale;
38
42
  };
39
43
  function createSpacingUnits(prefix) {
40
- let result = spacingScaleKeys.reduce(
41
- (acc, key) => ({
44
+ let result = spacingScaleKeys.reduce((acc, key) => {
45
+ let value = `var(--${prefix}-spacing-unit-${key})`;
46
+ if (key.includes(".")) {
47
+ const [first, second] = key.split(".");
48
+ value = `var(--${prefix}-spacing-unit-${first}_${second})`;
49
+ }
50
+ return {
42
51
  ...acc,
43
- [`unit-${key}`]: `var(--${prefix}-spacing-unit-${key})`
44
- }),
45
- {}
46
- );
52
+ [`unit-${key}`]: value
53
+ };
54
+ }, {});
47
55
  return result;
48
56
  }
49
57
 
@@ -29,9 +29,9 @@ declare const button: tailwind_variants.TVReturnType<{
29
29
  ghost: "border-medium bg-transparent";
30
30
  };
31
31
  size: {
32
- sm: "px-unit-3 min-w-16 h-unit-8 text-tiny gap-unit-2 rounded-small";
33
- md: "px-unit-4 min-w-20 h-unit-10 text-small gap-unit-2 rounded-medium";
34
- lg: "px-unit-6 min-w-24 h-unit-12 text-medium gap-unit-3 rounded-large";
32
+ sm: "px-unit-3 min-w-unit-16 h-unit-8 text-tiny gap-unit-2 rounded-small";
33
+ md: "px-unit-4 min-w-unit-20 h-unit-10 text-small gap-unit-2 rounded-medium";
34
+ lg: "px-unit-6 min-w-unit-24 h-unit-12 text-medium gap-unit-3 rounded-large";
35
35
  };
36
36
  color: {
37
37
  default: "";
@@ -79,9 +79,9 @@ declare const button: tailwind_variants.TVReturnType<{
79
79
  ghost: "border-medium bg-transparent";
80
80
  };
81
81
  size: {
82
- sm: "px-unit-3 min-w-16 h-unit-8 text-tiny gap-unit-2 rounded-small";
83
- md: "px-unit-4 min-w-20 h-unit-10 text-small gap-unit-2 rounded-medium";
84
- lg: "px-unit-6 min-w-24 h-unit-12 text-medium gap-unit-3 rounded-large";
82
+ sm: "px-unit-3 min-w-unit-16 h-unit-8 text-tiny gap-unit-2 rounded-small";
83
+ md: "px-unit-4 min-w-unit-20 h-unit-10 text-small gap-unit-2 rounded-medium";
84
+ lg: "px-unit-6 min-w-unit-24 h-unit-12 text-medium gap-unit-3 rounded-large";
85
85
  };
86
86
  color: {
87
87
  default: "";
@@ -129,9 +129,9 @@ declare const button: tailwind_variants.TVReturnType<{
129
129
  ghost: "border-medium bg-transparent";
130
130
  };
131
131
  size: {
132
- sm: "px-unit-3 min-w-16 h-unit-8 text-tiny gap-unit-2 rounded-small";
133
- md: "px-unit-4 min-w-20 h-unit-10 text-small gap-unit-2 rounded-medium";
134
- lg: "px-unit-6 min-w-24 h-unit-12 text-medium gap-unit-3 rounded-large";
132
+ sm: "px-unit-3 min-w-unit-16 h-unit-8 text-tiny gap-unit-2 rounded-small";
133
+ md: "px-unit-4 min-w-unit-20 h-unit-10 text-small gap-unit-2 rounded-medium";
134
+ lg: "px-unit-6 min-w-unit-24 h-unit-12 text-medium gap-unit-3 rounded-large";
135
135
  };
136
136
  color: {
137
137
  default: "";
@@ -179,9 +179,9 @@ declare const button: tailwind_variants.TVReturnType<{
179
179
  ghost: "border-medium bg-transparent";
180
180
  };
181
181
  size: {
182
- sm: "px-unit-3 min-w-16 h-unit-8 text-tiny gap-unit-2 rounded-small";
183
- md: "px-unit-4 min-w-20 h-unit-10 text-small gap-unit-2 rounded-medium";
184
- lg: "px-unit-6 min-w-24 h-unit-12 text-medium gap-unit-3 rounded-large";
182
+ sm: "px-unit-3 min-w-unit-16 h-unit-8 text-tiny gap-unit-2 rounded-small";
183
+ md: "px-unit-4 min-w-unit-20 h-unit-10 text-small gap-unit-2 rounded-medium";
184
+ lg: "px-unit-6 min-w-unit-24 h-unit-12 text-medium gap-unit-3 rounded-large";
185
185
  };
186
186
  color: {
187
187
  default: "";
@@ -224,9 +224,9 @@ var button = tv({
224
224
  ghost: "border-medium bg-transparent"
225
225
  },
226
226
  size: {
227
- sm: "px-unit-3 min-w-16 h-unit-8 text-tiny gap-unit-2 rounded-small",
228
- md: "px-unit-4 min-w-20 h-unit-10 text-small gap-unit-2 rounded-medium",
229
- lg: "px-unit-6 min-w-24 h-unit-12 text-medium gap-unit-3 rounded-large"
227
+ sm: "px-unit-3 min-w-unit-16 h-unit-8 text-tiny gap-unit-2 rounded-small",
228
+ md: "px-unit-4 min-w-unit-20 h-unit-10 text-small gap-unit-2 rounded-medium",
229
+ lg: "px-unit-6 min-w-unit-24 h-unit-12 text-medium gap-unit-3 rounded-large"
230
230
  },
231
231
  color: {
232
232
  default: "",
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  button,
3
3
  buttonGroup
4
- } from "../chunk-3VIPA4KR.mjs";
4
+ } from "../chunk-TRZLWKEX.mjs";
5
5
  import "../chunk-CMYR6AOY.mjs";
6
6
  import "../chunk-K7LK7NCE.mjs";
7
7
  import "../chunk-2PIR7DFM.mjs";
@@ -710,9 +710,9 @@ var button = tv({
710
710
  ghost: "border-medium bg-transparent"
711
711
  },
712
712
  size: {
713
- sm: "px-unit-3 min-w-16 h-unit-8 text-tiny gap-unit-2 rounded-small",
714
- md: "px-unit-4 min-w-20 h-unit-10 text-small gap-unit-2 rounded-medium",
715
- lg: "px-unit-6 min-w-24 h-unit-12 text-medium gap-unit-3 rounded-large"
713
+ sm: "px-unit-3 min-w-unit-16 h-unit-8 text-tiny gap-unit-2 rounded-small",
714
+ md: "px-unit-4 min-w-unit-20 h-unit-10 text-small gap-unit-2 rounded-medium",
715
+ lg: "px-unit-6 min-w-unit-24 h-unit-12 text-medium gap-unit-3 rounded-large"
716
716
  },
717
717
  color: {
718
718
  default: "",
@@ -90,7 +90,7 @@ import {
90
90
  import {
91
91
  button,
92
92
  buttonGroup
93
- } from "../chunk-3VIPA4KR.mjs";
93
+ } from "../chunk-TRZLWKEX.mjs";
94
94
  import {
95
95
  card
96
96
  } from "../chunk-CLQQQIUB.mjs";
package/dist/index.js CHANGED
@@ -744,9 +744,9 @@ var button = tv({
744
744
  ghost: "border-medium bg-transparent"
745
745
  },
746
746
  size: {
747
- sm: "px-unit-3 min-w-16 h-unit-8 text-tiny gap-unit-2 rounded-small",
748
- md: "px-unit-4 min-w-20 h-unit-10 text-small gap-unit-2 rounded-medium",
749
- lg: "px-unit-6 min-w-24 h-unit-12 text-medium gap-unit-3 rounded-large"
747
+ sm: "px-unit-3 min-w-unit-16 h-unit-8 text-tiny gap-unit-2 rounded-small",
748
+ md: "px-unit-4 min-w-unit-20 h-unit-10 text-small gap-unit-2 rounded-medium",
749
+ lg: "px-unit-6 min-w-unit-24 h-unit-12 text-medium gap-unit-3 rounded-large"
750
750
  },
751
751
  color: {
752
752
  default: "",
@@ -6174,7 +6174,11 @@ var generateSpacingScale = (spacingUnit) => {
6174
6174
  scale[label] = multiplier ? `${spacingUnit * multiplier}px` : `${spacingUnit}px`;
6175
6175
  });
6176
6176
  baseScale.forEach((i) => {
6177
- const key = `${i}`;
6177
+ let key = `${i}`;
6178
+ if (key.includes(".")) {
6179
+ const [first, second] = key.split(".");
6180
+ key = `${first}_${second}`;
6181
+ }
6178
6182
  scale[key] = `${spacingUnit * i}px`;
6179
6183
  });
6180
6184
  extendedScale.forEach((i) => {
@@ -6184,13 +6188,17 @@ var generateSpacingScale = (spacingUnit) => {
6184
6188
  return scale;
6185
6189
  };
6186
6190
  function createSpacingUnits(prefix) {
6187
- let result = spacingScaleKeys.reduce(
6188
- (acc, key) => ({
6191
+ let result = spacingScaleKeys.reduce((acc, key) => {
6192
+ let value = `var(--${prefix}-spacing-unit-${key})`;
6193
+ if (key.includes(".")) {
6194
+ const [first, second] = key.split(".");
6195
+ value = `var(--${prefix}-spacing-unit-${first}_${second})`;
6196
+ }
6197
+ return {
6189
6198
  ...acc,
6190
- [`unit-${key}`]: `var(--${prefix}-spacing-unit-${key})`
6191
- }),
6192
- {}
6193
- );
6199
+ [`unit-${key}`]: value
6200
+ };
6201
+ }, {});
6194
6202
  return result;
6195
6203
  }
6196
6204
 
@@ -6349,7 +6357,7 @@ var corePlugin = (themes = {}, defaultTheme, prefix, omitCommonColors) => {
6349
6357
  "unit-1": `var(--${prefix}-spacing-unit)`,
6350
6358
  "unit-2": `var(--${prefix}-spacing-unit-2`,
6351
6359
  "unit-3": `var(--${prefix}-spacing-unit-3)`,
6352
- "unit-3.5": `var(--${prefix}-spacing-unit-3.5)`,
6360
+ "unit-3.5": `var(--${prefix}-spacing-unit-3_5)`,
6353
6361
  "unit-4": `var(--${prefix}-spacing-unit-4)`,
6354
6362
  "unit-5": `var(--${prefix}-spacing-unit-5)`,
6355
6363
  "unit-6": `var(--${prefix}-spacing-unit-6)`,
package/dist/index.mjs CHANGED
@@ -90,7 +90,7 @@ import {
90
90
  import {
91
91
  button,
92
92
  buttonGroup
93
- } from "./chunk-3VIPA4KR.mjs";
93
+ } from "./chunk-TRZLWKEX.mjs";
94
94
  import {
95
95
  card
96
96
  } from "./chunk-CLQQQIUB.mjs";
@@ -106,8 +106,8 @@ import {
106
106
  import "./chunk-UX2EEVVM.mjs";
107
107
  import {
108
108
  nextui
109
- } from "./chunk-ZCFEESNJ.mjs";
110
- import "./chunk-FRQTTQVI.mjs";
109
+ } from "./chunk-LUKNKAXA.mjs";
110
+ import "./chunk-XA5ALA4E.mjs";
111
111
  import "./chunk-UNQJ7BRW.mjs";
112
112
  import "./chunk-DI2L75XK.mjs";
113
113
  import "./chunk-4Z22WXZX.mjs";
package/dist/plugin.js CHANGED
@@ -614,7 +614,11 @@ var generateSpacingScale = (spacingUnit) => {
614
614
  scale[label] = multiplier ? `${spacingUnit * multiplier}px` : `${spacingUnit}px`;
615
615
  });
616
616
  baseScale.forEach((i) => {
617
- const key = `${i}`;
617
+ let key = `${i}`;
618
+ if (key.includes(".")) {
619
+ const [first, second] = key.split(".");
620
+ key = `${first}_${second}`;
621
+ }
618
622
  scale[key] = `${spacingUnit * i}px`;
619
623
  });
620
624
  extendedScale.forEach((i) => {
@@ -624,13 +628,17 @@ var generateSpacingScale = (spacingUnit) => {
624
628
  return scale;
625
629
  };
626
630
  function createSpacingUnits(prefix) {
627
- let result = spacingScaleKeys.reduce(
628
- (acc, key) => ({
631
+ let result = spacingScaleKeys.reduce((acc, key) => {
632
+ let value = `var(--${prefix}-spacing-unit-${key})`;
633
+ if (key.includes(".")) {
634
+ const [first, second] = key.split(".");
635
+ value = `var(--${prefix}-spacing-unit-${first}_${second})`;
636
+ }
637
+ return {
629
638
  ...acc,
630
- [`unit-${key}`]: `var(--${prefix}-spacing-unit-${key})`
631
- }),
632
- {}
633
- );
639
+ [`unit-${key}`]: value
640
+ };
641
+ }, {});
634
642
  return result;
635
643
  }
636
644
 
@@ -795,7 +803,7 @@ var corePlugin = (themes = {}, defaultTheme, prefix, omitCommonColors) => {
795
803
  "unit-1": `var(--${prefix}-spacing-unit)`,
796
804
  "unit-2": `var(--${prefix}-spacing-unit-2`,
797
805
  "unit-3": `var(--${prefix}-spacing-unit-3)`,
798
- "unit-3.5": `var(--${prefix}-spacing-unit-3.5)`,
806
+ "unit-3.5": `var(--${prefix}-spacing-unit-3_5)`,
799
807
  "unit-4": `var(--${prefix}-spacing-unit-4)`,
800
808
  "unit-5": `var(--${prefix}-spacing-unit-5)`,
801
809
  "unit-6": `var(--${prefix}-spacing-unit-6)`,
package/dist/plugin.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  nextui
3
- } from "./chunk-ZCFEESNJ.mjs";
4
- import "./chunk-FRQTTQVI.mjs";
3
+ } from "./chunk-LUKNKAXA.mjs";
4
+ import "./chunk-XA5ALA4E.mjs";
5
5
  import "./chunk-UNQJ7BRW.mjs";
6
6
  import "./chunk-DI2L75XK.mjs";
7
7
  import "./chunk-4Z22WXZX.mjs";
@@ -104,7 +104,11 @@ var generateSpacingScale = (spacingUnit) => {
104
104
  scale[label] = multiplier ? `${spacingUnit * multiplier}px` : `${spacingUnit}px`;
105
105
  });
106
106
  baseScale.forEach((i) => {
107
- const key = `${i}`;
107
+ let key = `${i}`;
108
+ if (key.includes(".")) {
109
+ const [first, second] = key.split(".");
110
+ key = `${first}_${second}`;
111
+ }
108
112
  scale[key] = `${spacingUnit * i}px`;
109
113
  });
110
114
  extendedScale.forEach((i) => {
@@ -114,13 +118,17 @@ var generateSpacingScale = (spacingUnit) => {
114
118
  return scale;
115
119
  };
116
120
  function createSpacingUnits(prefix) {
117
- let result = spacingScaleKeys.reduce(
118
- (acc, key) => ({
121
+ let result = spacingScaleKeys.reduce((acc, key) => {
122
+ let value = `var(--${prefix}-spacing-unit-${key})`;
123
+ if (key.includes(".")) {
124
+ const [first, second] = key.split(".");
125
+ value = `var(--${prefix}-spacing-unit-${first}_${second})`;
126
+ }
127
+ return {
119
128
  ...acc,
120
- [`unit-${key}`]: `var(--${prefix}-spacing-unit-${key})`
121
- }),
122
- {}
123
- );
129
+ [`unit-${key}`]: value
130
+ };
131
+ }, {});
124
132
  return result;
125
133
  }
126
134
  // Annotate the CommonJS export names for ESM import in node:
@@ -2,7 +2,7 @@ import {
2
2
  createSpacingUnits,
3
3
  generateSpacingScale,
4
4
  isBaseTheme
5
- } from "../chunk-FRQTTQVI.mjs";
5
+ } from "../chunk-XA5ALA4E.mjs";
6
6
  import "../chunk-WA5F6AED.mjs";
7
7
  export {
8
8
  createSpacingUnits,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextui-org/theme",
3
- "version": "0.0.0-dev-v2-20230706232536",
3
+ "version": "0.0.0-dev-v2-20230707003639",
4
4
  "description": "The default theme for NextUI components",
5
5
  "keywords": [
6
6
  "theme",