@nextui-org/system-rsc
Advanced tools
Comparing version 0.0.0-dev-v2-20231103145014 to 0.0.0-dev-v2-20231103151341
@@ -33,88 +33,4 @@ "use strict"; | ||
var React = __toESM(require("react")); | ||
var import_theme = require("@nextui-org/theme"); | ||
// ../theme/src/utils/tv.ts | ||
var import_tailwind_variants = require("tailwind-variants"); | ||
// ../theme/src/types.ts | ||
var spacingScaleKeys = [ | ||
"0", | ||
"xs", | ||
"sm", | ||
"md", | ||
"lg", | ||
"xl", | ||
"2xl", | ||
"3xl", | ||
"4xl", | ||
"5xl", | ||
"6xl", | ||
"7xl", | ||
"8xl", | ||
"9xl", | ||
"1", | ||
"2", | ||
"3", | ||
"3.5", | ||
"4", | ||
"5", | ||
"6", | ||
"7", | ||
"8", | ||
"9", | ||
"10", | ||
"11", | ||
"12", | ||
"13", | ||
"14", | ||
"15", | ||
"16", | ||
"17", | ||
"18", | ||
"20", | ||
"24", | ||
"28", | ||
"32", | ||
"36", | ||
"40", | ||
"44", | ||
"48", | ||
"52", | ||
"56", | ||
"60", | ||
"64", | ||
"72", | ||
"80", | ||
"96" | ||
]; | ||
var mappedSpacingScaleKeys = spacingScaleKeys.map((key) => `unit-${key}`); | ||
// ../theme/src/utils/tv.ts | ||
var COMMON_UNITS = ["small", "medium", "large"]; | ||
var tv = (0, import_tailwind_variants.createTV)({ | ||
twMerge: true, | ||
twMergeConfig: { | ||
theme: { | ||
opacity: ["disabled"], | ||
spacing: ["divider", "unit", ...mappedSpacingScaleKeys], | ||
borderWidth: COMMON_UNITS, | ||
borderRadius: COMMON_UNITS | ||
}, | ||
classGroups: { | ||
shadow: [{ shadow: COMMON_UNITS }], | ||
"font-size": [{ text: ["tiny", ...COMMON_UNITS] }], | ||
"bg-image": ["bg-stripe-gradient"], | ||
"min-w": [ | ||
{ | ||
"min-w": ["unit", ...mappedSpacingScaleKeys] | ||
} | ||
], | ||
"min-h": [ | ||
{ | ||
"min-h": ["unit", ...mappedSpacingScaleKeys] | ||
} | ||
] | ||
} | ||
} | ||
}); | ||
// src/utils.ts | ||
@@ -185,3 +101,3 @@ var import_clsx = __toESM(require("clsx")); | ||
const hasSlots = typeof slots === "object" && Object.keys(slots).length !== 0; | ||
const customTv = tv( | ||
const customTv = (0, import_theme.tv)( | ||
{ | ||
@@ -188,0 +104,0 @@ variants, |
@@ -94,89 +94,3 @@ "use strict"; | ||
var React = __toESM(require("react")); | ||
// ../theme/src/utils/tv.ts | ||
var import_tailwind_variants = require("tailwind-variants"); | ||
// ../theme/src/types.ts | ||
var spacingScaleKeys = [ | ||
"0", | ||
"xs", | ||
"sm", | ||
"md", | ||
"lg", | ||
"xl", | ||
"2xl", | ||
"3xl", | ||
"4xl", | ||
"5xl", | ||
"6xl", | ||
"7xl", | ||
"8xl", | ||
"9xl", | ||
"1", | ||
"2", | ||
"3", | ||
"3.5", | ||
"4", | ||
"5", | ||
"6", | ||
"7", | ||
"8", | ||
"9", | ||
"10", | ||
"11", | ||
"12", | ||
"13", | ||
"14", | ||
"15", | ||
"16", | ||
"17", | ||
"18", | ||
"20", | ||
"24", | ||
"28", | ||
"32", | ||
"36", | ||
"40", | ||
"44", | ||
"48", | ||
"52", | ||
"56", | ||
"60", | ||
"64", | ||
"72", | ||
"80", | ||
"96" | ||
]; | ||
var mappedSpacingScaleKeys = spacingScaleKeys.map((key) => `unit-${key}`); | ||
// ../theme/src/utils/tv.ts | ||
var COMMON_UNITS = ["small", "medium", "large"]; | ||
var tv = (0, import_tailwind_variants.createTV)({ | ||
twMerge: true, | ||
twMergeConfig: { | ||
theme: { | ||
opacity: ["disabled"], | ||
spacing: ["divider", "unit", ...mappedSpacingScaleKeys], | ||
borderWidth: COMMON_UNITS, | ||
borderRadius: COMMON_UNITS | ||
}, | ||
classGroups: { | ||
shadow: [{ shadow: COMMON_UNITS }], | ||
"font-size": [{ text: ["tiny", ...COMMON_UNITS] }], | ||
"bg-image": ["bg-stripe-gradient"], | ||
"min-w": [ | ||
{ | ||
"min-w": ["unit", ...mappedSpacingScaleKeys] | ||
} | ||
], | ||
"min-h": [ | ||
{ | ||
"min-h": ["unit", ...mappedSpacingScaleKeys] | ||
} | ||
] | ||
} | ||
} | ||
}); | ||
// src/extend-variants.js | ||
var import_theme = require("@nextui-org/theme"); | ||
function getSlots(variants) { | ||
@@ -223,3 +137,3 @@ return variants ? Object.values(variants).flatMap(Object.values).reduce((acc, slot) => { | ||
const hasSlots = typeof slots === "object" && Object.keys(slots).length !== 0; | ||
const customTv = tv( | ||
const customTv = (0, import_theme.tv)( | ||
{ | ||
@@ -226,0 +140,0 @@ variants, |
{ | ||
"name": "@nextui-org/system-rsc", | ||
"version": "0.0.0-dev-v2-20231103145014", | ||
"version": "0.0.0-dev-v2-20231103151341", | ||
"description": "NextUI system primitives compatibles with RSC imports", | ||
@@ -28,6 +28,7 @@ "keywords": [ | ||
"peerDependencies": { | ||
"react": ">=18" | ||
"react": ">=18", | ||
"@nextui-org/theme": "0.0.0-dev-v2-20231103151341", | ||
"tailwind-variants": ">=0.1.13" | ||
}, | ||
"dependencies": { | ||
"tailwind-variants": "^0.1.18", | ||
"clsx": "^1.2.1" | ||
@@ -34,0 +35,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
33937
4
863
+ Added@nextui-org/theme@0.0.0-dev-v2-20231103151341(transitive)
+ Addedcolor@4.2.3(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedcolor-string@1.9.1(transitive)
+ Addedcolor2k@2.0.3(transitive)
+ Addeddeepmerge@4.3.1(transitive)
+ Addedflat@5.0.2(transitive)
+ Addedis-arrayish@0.3.2(transitive)
+ Addedlodash.foreach@4.5.0(transitive)
+ Addedlodash.get@4.4.2(transitive)
+ Addedlodash.kebabcase@4.1.1(transitive)
+ Addedlodash.mapkeys@4.6.0(transitive)
+ Addedlodash.omit@4.5.0(transitive)
+ Addedsimple-swizzle@0.2.2(transitive)
+ Addedtailwind-merge@2.5.4(transitive)
+ Addedtailwind-variants@0.3.1(transitive)
- Removedtailwind-variants@^0.1.18