@vettvangur/design-system 2.0.40 → 2.0.41
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 +22 -32
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2936,41 +2936,31 @@ async function generateHeadlines(sizes, lineHeights, config) {
|
|
|
2936
2936
|
message(`finished generating (${headlines.length}) headline utilities`);
|
|
2937
2937
|
}
|
|
2938
2938
|
|
|
2939
|
-
/**
|
|
2940
|
-
* design-system :: src/utility/remify.mjs.
|
|
2941
|
-
*
|
|
2942
|
-
* Design token tooling: pulls from Figma and generates platform outputs (Razor/Astro/Tailwind).
|
|
2943
|
-
*
|
|
2944
|
-
* These docs are generated from inline JSDoc in the repo and are intended for contributors.
|
|
2945
|
-
*
|
|
2946
|
-
* @generated
|
|
2947
|
-
* @module design-system
|
|
2939
|
+
/**
|
|
2940
|
+
* design-system :: src/utility/remify.mjs.
|
|
2941
|
+
*
|
|
2942
|
+
* Design token tooling: pulls from Figma and generates platform outputs (Razor/Astro/Tailwind).
|
|
2943
|
+
*
|
|
2944
|
+
* These docs are generated from inline JSDoc in the repo and are intended for contributors.
|
|
2945
|
+
*
|
|
2946
|
+
* @generated
|
|
2947
|
+
* @module design-system
|
|
2948
2948
|
*/
|
|
2949
2949
|
|
|
2950
|
-
/**
|
|
2951
|
-
* Rem.
|
|
2952
|
-
*
|
|
2953
|
-
* @param px - Value.
|
|
2954
|
-
* @returns Result of the operation.
|
|
2955
|
-
*
|
|
2956
|
-
* @example
|
|
2957
|
-
* // design-system (src/tools/javascript/design-system/src/utility/remify.mjs)
|
|
2958
|
-
* // import { rem } from '@vettvangur/design-system'
|
|
2959
|
-
*
|
|
2960
|
-
* rem(px)
|
|
2950
|
+
/**
|
|
2951
|
+
* Rem.
|
|
2952
|
+
*
|
|
2953
|
+
* @param px - Value.
|
|
2954
|
+
* @returns Result of the operation.
|
|
2955
|
+
*
|
|
2956
|
+
* @example
|
|
2957
|
+
* // design-system (src/tools/javascript/design-system/src/utility/remify.mjs)
|
|
2958
|
+
* // import { rem } from '@vettvangur/design-system'
|
|
2959
|
+
*
|
|
2960
|
+
* rem(px)
|
|
2961
2961
|
*/
|
|
2962
|
-
function rem(
|
|
2963
|
-
|
|
2964
|
-
if (!Number.isFinite(n)) {
|
|
2965
|
-
return String(px);
|
|
2966
|
-
}
|
|
2967
|
-
if (n === 0) {
|
|
2968
|
-
return '0';
|
|
2969
|
-
}
|
|
2970
|
-
const v = n / 16;
|
|
2971
|
-
// Keep output stable and readable (no long floats)
|
|
2972
|
-
const rounded = Math.round(v * 1000000) / 1000000;
|
|
2973
|
-
return `${rounded}rem`;
|
|
2962
|
+
function rem(value) {
|
|
2963
|
+
return `${value}rem`;
|
|
2974
2964
|
}
|
|
2975
2965
|
|
|
2976
2966
|
/**
|