@servicetitan/hammer-token 0.6.0 → 1.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servicetitan/hammer-token",
3
- "version": "0.6.0",
3
+ "version": "1.0.0",
4
4
  "description": "",
5
5
  "main": "build/web/index.js",
6
6
  "types": "build/web/index.d.ts",
@@ -15,5 +15,5 @@
15
15
  "fs-extra": "^11.2.0",
16
16
  "style-dictionary": "latest"
17
17
  },
18
- "gitHead": "9ba1adf73891b157006273a81e1936682f75e3a6"
18
+ "gitHead": "937533e0797c06ac989753f81d264710816db70c"
19
19
  }
@@ -23,7 +23,7 @@ const getNewValueFromRef = (value, ref) => {
23
23
  if (ref.name === undefined) {
24
24
  return `${ref.value}`;
25
25
  } else {
26
- return `var(--${ref.name})`;
26
+ return `var(--${ref.name}, ${ref.value})`;
27
27
  }
28
28
  });
29
29
  };
@@ -150,7 +150,7 @@ const generateFontClasses = (name, value) => {
150
150
  return classes;
151
151
  };
152
152
 
153
- const generateSpacingClasses = (name) => {
153
+ const generateSpacingClasses = (name, value) => {
154
154
  const nameWithoutPrefix = name.substring(name.indexOf("-"));
155
155
 
156
156
  const directions = [
@@ -165,10 +165,10 @@ const generateSpacingClasses = (name) => {
165
165
 
166
166
  directions.forEach((direction) => {
167
167
  classes.push(
168
- `.m-${direction}${nameWithoutPrefix} {margin-${direction}: var(--${name})}`,
168
+ `.m-${direction}${nameWithoutPrefix} {margin-${direction}: var(--${name}, ${value})}`,
169
169
  );
170
170
  classes.push(
171
- `.p-${direction}${nameWithoutPrefix} {padding-${direction}: var(--${name})}`,
171
+ `.p-${direction}${nameWithoutPrefix} {padding-${direction}: var(--${name}, ${value})}`,
172
172
  );
173
173
  });
174
174
 
package/test.txt ADDED
@@ -0,0 +1 @@
1
+ v1.0.0!