@vettvangur/design-system 2.0.51 → 2.0.53
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.
- package/dist/index.js +27 -56
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3983,69 +3983,40 @@ async function generateSources(config, target) {
|
|
|
3983
3983
|
message(`finished generating sources for (${target})`);
|
|
3984
3984
|
}
|
|
3985
3985
|
|
|
3986
|
-
/**
|
|
3987
|
-
* design-system :: src/generators/tailwind/index.mjs.
|
|
3988
|
-
*
|
|
3989
|
-
* Design token tooling: pulls from Figma and generates platform outputs (Razor/Astro/Tailwind).
|
|
3990
|
-
*
|
|
3991
|
-
* These docs are generated from inline JSDoc in the repo and are intended for contributors.
|
|
3992
|
-
*
|
|
3993
|
-
* @generated
|
|
3994
|
-
* @module design-system
|
|
3986
|
+
/**
|
|
3987
|
+
* design-system :: src/generators/tailwind/index.mjs.
|
|
3988
|
+
*
|
|
3989
|
+
* Design token tooling: pulls from Figma and generates platform outputs (Razor/Astro/Tailwind).
|
|
3990
|
+
*
|
|
3991
|
+
* These docs are generated from inline JSDoc in the repo and are intended for contributors.
|
|
3992
|
+
*
|
|
3993
|
+
* @generated
|
|
3994
|
+
* @module design-system
|
|
3995
3995
|
*/
|
|
3996
3996
|
|
|
3997
|
-
/**
|
|
3998
|
-
*
|
|
3999
|
-
*
|
|
4000
|
-
* @param
|
|
4001
|
-
* @
|
|
4002
|
-
*
|
|
4003
|
-
* @
|
|
4004
|
-
* @
|
|
4005
|
-
*
|
|
4006
|
-
*
|
|
4007
|
-
*
|
|
4008
|
-
*
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
} catch {
|
|
4015
|
-
return false;
|
|
4016
|
-
}
|
|
4017
|
-
}
|
|
4018
|
-
|
|
4019
|
-
/**
|
|
4020
|
-
* Generate tailwind.
|
|
4021
|
-
*
|
|
4022
|
-
* @param config - Configuration object.
|
|
4023
|
-
* @param projectType - Value.
|
|
4024
|
-
* @param typography - Value.
|
|
4025
|
-
* @param buttons - Value.
|
|
4026
|
-
* @param colors - Value.
|
|
4027
|
-
* @param scales - Value.
|
|
4028
|
-
* @param effects - Value.
|
|
4029
|
-
* @returns Nothing.
|
|
4030
|
-
*
|
|
4031
|
-
* @example
|
|
4032
|
-
* // design-system (src/tools/javascript/design-system/src/generators/tailwind/index.mjs)
|
|
4033
|
-
* // import { generateTailwind } from '@vettvangur/design-system'
|
|
4034
|
-
*
|
|
4035
|
-
* await generateTailwind({}, projectType, typography, buttons, colors, scales, effects)
|
|
3997
|
+
/**
|
|
3998
|
+
* Generate tailwind.
|
|
3999
|
+
*
|
|
4000
|
+
* @param config - Configuration object.
|
|
4001
|
+
* @param projectType - Value.
|
|
4002
|
+
* @param typography - Value.
|
|
4003
|
+
* @param buttons - Value.
|
|
4004
|
+
* @param colors - Value.
|
|
4005
|
+
* @param scales - Value.
|
|
4006
|
+
* @param effects - Value.
|
|
4007
|
+
* @returns Nothing.
|
|
4008
|
+
*
|
|
4009
|
+
* @example
|
|
4010
|
+
* // design-system (src/tools/javascript/design-system/src/generators/tailwind/index.mjs)
|
|
4011
|
+
* // import { generateTailwind } from '@vettvangur/design-system'
|
|
4012
|
+
*
|
|
4013
|
+
* await generateTailwind({}, projectType, typography, buttons, colors, scales, effects)
|
|
4036
4014
|
*/
|
|
4037
4015
|
async function generateTailwind(config, projectType, typography, buttons, colors, scales, effects, figmaVariables) {
|
|
4038
4016
|
message(pc.yellow('-=[ tailwind ]=-'));
|
|
4039
4017
|
await generateFontFamily(typography.families, config);
|
|
4040
4018
|
await generateFontWeight(typography.weights, config);
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
// only generate buttons if variants do NOT already exist
|
|
4044
|
-
if (!(await fileExists(buttonVariantsPath))) {
|
|
4045
|
-
await generateButtons$1(buttons, config);
|
|
4046
|
-
} else {
|
|
4047
|
-
message('button-variants.css exists, skipping generation');
|
|
4048
|
-
}
|
|
4019
|
+
await generateButtons$1(buttons, config);
|
|
4049
4020
|
await generateBodies(typography.sizes, typography.lineHeights, config);
|
|
4050
4021
|
await generateHeadlines(typography.sizes, typography.lineHeights, config);
|
|
4051
4022
|
await generateTypography$1(typography.sizes, typography.lineHeights, config);
|