@primer/primitives 9.1.2 → 10.0.0-rc.1d2317e6

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.
Files changed (314) hide show
  1. package/dist/build/PrimerStyleDictionary.d.ts +1 -2
  2. package/dist/build/PrimerStyleDictionary.js +52 -64
  3. package/dist/build/filters/index.d.ts +14 -13
  4. package/dist/build/filters/index.js +14 -29
  5. package/dist/build/filters/isBorder.d.ts +3 -3
  6. package/dist/build/filters/isBorder.js +2 -6
  7. package/dist/build/filters/isColor.d.ts +3 -3
  8. package/dist/build/filters/isColor.js +8 -7
  9. package/dist/build/filters/isColorWithAlpha.d.ts +3 -3
  10. package/dist/build/filters/isColorWithAlpha.js +4 -8
  11. package/dist/build/filters/isColorWithMix.d.ts +3 -3
  12. package/dist/build/filters/isColorWithMix.js +4 -8
  13. package/dist/build/filters/isCubicBezier.d.ts +7 -0
  14. package/dist/build/filters/isCubicBezier.js +10 -0
  15. package/dist/build/filters/isDeprecated.d.ts +3 -3
  16. package/dist/build/filters/isDeprecated.js +2 -6
  17. package/dist/build/filters/isDimension.d.ts +3 -3
  18. package/dist/build/filters/isDimension.js +2 -6
  19. package/dist/build/filters/isDuration.d.ts +3 -3
  20. package/dist/build/filters/isDuration.js +2 -6
  21. package/dist/build/filters/isFontFamily.d.ts +3 -3
  22. package/dist/build/filters/isFontFamily.js +2 -6
  23. package/dist/build/filters/isFontWeight.d.ts +3 -3
  24. package/dist/build/filters/isFontWeight.js +2 -6
  25. package/dist/build/filters/isFromFile.d.ts +3 -3
  26. package/dist/build/filters/isFromFile.js +2 -6
  27. package/dist/build/filters/isNumber.d.ts +3 -3
  28. package/dist/build/filters/isNumber.js +4 -6
  29. package/dist/build/filters/isShadow.d.ts +3 -3
  30. package/dist/build/filters/isShadow.js +2 -6
  31. package/dist/build/filters/isSource.d.ts +3 -3
  32. package/dist/build/filters/isSource.js +2 -6
  33. package/dist/build/filters/isTypography.d.ts +3 -3
  34. package/dist/build/filters/isTypography.js +2 -6
  35. package/dist/build/formats/cssAdvanced.d.ts +2 -2
  36. package/dist/build/formats/cssAdvanced.js +22 -20
  37. package/dist/build/formats/cssCustomMedia.d.ts +2 -2
  38. package/dist/build/formats/cssCustomMedia.js +16 -15
  39. package/dist/build/formats/index.d.ts +9 -9
  40. package/dist/build/formats/index.js +9 -21
  41. package/dist/build/formats/javascriptCommonJs.d.ts +2 -2
  42. package/dist/build/formats/javascriptCommonJs.js +17 -16
  43. package/dist/build/formats/javascriptEsm.d.ts +2 -2
  44. package/dist/build/formats/javascriptEsm.js +17 -16
  45. package/dist/build/formats/jsonFigma.d.ts +2 -2
  46. package/dist/build/formats/jsonFigma.js +27 -22
  47. package/dist/build/formats/jsonNestedPrefixed.d.ts +3 -3
  48. package/dist/build/formats/jsonNestedPrefixed.js +17 -15
  49. package/dist/build/formats/jsonOneDimensional.d.ts +3 -3
  50. package/dist/build/formats/jsonOneDimensional.js +24 -16
  51. package/dist/build/formats/jsonPostCssFallback.d.ts +3 -3
  52. package/dist/build/formats/jsonPostCssFallback.js +5 -12
  53. package/dist/build/formats/typescriptExportDefinition.d.ts +2 -2
  54. package/dist/build/formats/typescriptExportDefinition.js +48 -44
  55. package/dist/build/formats/utilities/getPropName.d.ts +1 -0
  56. package/dist/build/formats/utilities/getPropName.js +16 -0
  57. package/dist/build/formats/utilities/jsonToFlat.d.ts +2 -2
  58. package/dist/build/formats/utilities/jsonToFlat.js +1 -5
  59. package/dist/build/formats/utilities/jsonToNestedValue.d.ts +2 -2
  60. package/dist/build/formats/utilities/jsonToNestedValue.js +4 -6
  61. package/dist/build/formats/utilities/prefixTokens.d.ts +2 -2
  62. package/dist/build/formats/utilities/prefixTokens.js +1 -5
  63. package/dist/build/parsers/index.d.ts +1 -1
  64. package/dist/build/parsers/index.js +1 -5
  65. package/dist/build/parsers/w3cJsonParser.d.ts +2 -2
  66. package/dist/build/parsers/w3cJsonParser.js +5 -7
  67. package/dist/build/platforms/css.d.ts +1 -1
  68. package/dist/build/platforms/css.js +20 -11
  69. package/dist/build/platforms/deprecatedJson.d.ts +1 -1
  70. package/dist/build/platforms/deprecatedJson.js +3 -7
  71. package/dist/build/platforms/docJson.d.ts +1 -1
  72. package/dist/build/platforms/docJson.js +8 -7
  73. package/dist/build/platforms/fallbacks.d.ts +1 -1
  74. package/dist/build/platforms/fallbacks.js +3 -7
  75. package/dist/build/platforms/figma.d.ts +1 -1
  76. package/dist/build/platforms/figma.js +21 -14
  77. package/dist/build/platforms/index.d.ts +10 -10
  78. package/dist/build/platforms/index.js +10 -23
  79. package/dist/build/platforms/javascript.d.ts +1 -1
  80. package/dist/build/platforms/javascript.js +3 -7
  81. package/dist/build/platforms/json.d.ts +1 -1
  82. package/dist/build/platforms/json.js +3 -7
  83. package/dist/build/platforms/styleLint.d.ts +1 -1
  84. package/dist/build/platforms/styleLint.js +3 -7
  85. package/dist/build/platforms/typeDefinitions.d.ts +1 -1
  86. package/dist/build/platforms/typeDefinitions.js +6 -10
  87. package/dist/build/platforms/typescript.d.ts +1 -1
  88. package/dist/build/platforms/typescript.js +3 -7
  89. package/dist/build/schemas/alphaValue.js +4 -7
  90. package/dist/build/schemas/baseToken.d.ts +2 -2
  91. package/dist/build/schemas/baseToken.js +4 -7
  92. package/dist/build/schemas/borderToken.d.ts +5 -5
  93. package/dist/build/schemas/borderToken.js +13 -16
  94. package/dist/build/schemas/collections.js +8 -14
  95. package/dist/build/schemas/colorHexValue.js +4 -7
  96. package/dist/build/schemas/colorToken.d.ts +20 -15
  97. package/dist/build/schemas/colorToken.js +24 -24
  98. package/dist/build/schemas/cubicBezierToken.d.ts +18 -0
  99. package/dist/build/schemas/cubicBezierToken.js +8 -0
  100. package/dist/build/schemas/designToken.js +30 -31
  101. package/dist/build/schemas/dimensionToken.d.ts +5 -5
  102. package/dist/build/schemas/dimensionToken.js +14 -17
  103. package/dist/build/schemas/dimensionValue.js +7 -10
  104. package/dist/build/schemas/durationToken.d.ts +5 -5
  105. package/dist/build/schemas/durationToken.js +8 -11
  106. package/dist/build/schemas/durationValue.js +4 -7
  107. package/dist/build/schemas/fontFamilyToken.d.ts +5 -5
  108. package/dist/build/schemas/fontFamilyToken.js +13 -16
  109. package/dist/build/schemas/fontWeightToken.d.ts +5 -5
  110. package/dist/build/schemas/fontWeightToken.js +14 -17
  111. package/dist/build/schemas/fontWeightValue.js +4 -7
  112. package/dist/build/schemas/numberToken.d.ts +5 -5
  113. package/dist/build/schemas/numberToken.js +15 -18
  114. package/dist/build/schemas/referenceValue.js +4 -7
  115. package/dist/build/schemas/scopes.js +5 -10
  116. package/dist/build/schemas/shadowToken.d.ts +5 -5
  117. package/dist/build/schemas/shadowToken.js +23 -26
  118. package/dist/build/schemas/stringToken.d.ts +5 -5
  119. package/dist/build/schemas/stringToken.js +7 -10
  120. package/dist/build/schemas/tokenName.js +4 -7
  121. package/dist/build/schemas/tokenType.d.ts +2 -2
  122. package/dist/build/schemas/tokenType.js +2 -6
  123. package/dist/build/schemas/typographyToken.d.ts +5 -5
  124. package/dist/build/schemas/typographyToken.js +14 -17
  125. package/dist/build/schemas/validTokenType.d.ts +1 -1
  126. package/dist/build/schemas/validTokenType.js +10 -13
  127. package/dist/build/schemas/viewportRangeToken.d.ts +5 -5
  128. package/dist/build/schemas/viewportRangeToken.js +7 -10
  129. package/dist/build/transformers/borderToCss.d.ts +3 -3
  130. package/dist/build/transformers/borderToCss.js +16 -16
  131. package/dist/build/transformers/colorToHex.d.ts +2 -2
  132. package/dist/build/transformers/colorToHex.js +11 -13
  133. package/dist/build/transformers/colorToHexMix.d.ts +2 -2
  134. package/dist/build/transformers/colorToHexMix.js +10 -15
  135. package/dist/build/transformers/colorToRgbAlpha.d.ts +2 -2
  136. package/dist/build/transformers/colorToRgbAlpha.js +10 -12
  137. package/dist/build/transformers/colorToRgbaFloat.d.ts +2 -2
  138. package/dist/build/transformers/colorToRgbaFloat.js +24 -28
  139. package/dist/build/transformers/cubicBezierToCss.d.ts +8 -0
  140. package/dist/build/transformers/cubicBezierToCss.js +23 -0
  141. package/dist/build/transformers/dimensionToPixelUnitless.d.ts +2 -2
  142. package/dist/build/transformers/dimensionToPixelUnitless.js +13 -14
  143. package/dist/build/transformers/dimensionToRem.d.ts +2 -2
  144. package/dist/build/transformers/dimensionToRem.js +12 -13
  145. package/dist/build/transformers/dimensionToRemPxArray.d.ts +2 -2
  146. package/dist/build/transformers/dimensionToRemPxArray.js +11 -12
  147. package/dist/build/transformers/durationToCss.d.ts +2 -2
  148. package/dist/build/transformers/durationToCss.js +9 -10
  149. package/dist/build/transformers/figmaAttributes.d.ts +2 -2
  150. package/dist/build/transformers/figmaAttributes.js +3 -5
  151. package/dist/build/transformers/floatToPixel.d.ts +4 -4
  152. package/dist/build/transformers/floatToPixel.js +12 -14
  153. package/dist/build/transformers/fontFamilyToCss.d.ts +2 -2
  154. package/dist/build/transformers/fontFamilyToCss.js +10 -13
  155. package/dist/build/transformers/fontFamilyToFigma.d.ts +3 -3
  156. package/dist/build/transformers/fontFamilyToFigma.js +15 -17
  157. package/dist/build/transformers/fontWeightToNumber.d.ts +2 -2
  158. package/dist/build/transformers/fontWeightToNumber.js +8 -11
  159. package/dist/build/transformers/index.d.ts +25 -24
  160. package/dist/build/transformers/index.js +25 -51
  161. package/dist/build/transformers/jsonDeprecated.d.ts +2 -2
  162. package/dist/build/transformers/jsonDeprecated.js +6 -8
  163. package/dist/build/transformers/namePathToCamelCase.d.ts +2 -2
  164. package/dist/build/transformers/namePathToCamelCase.js +5 -7
  165. package/dist/build/transformers/namePathToDotNotation.d.ts +2 -2
  166. package/dist/build/transformers/namePathToDotNotation.js +6 -8
  167. package/dist/build/transformers/namePathToFigma.d.ts +3 -3
  168. package/dist/build/transformers/namePathToFigma.js +5 -8
  169. package/dist/build/transformers/namePathToKebabCase.d.ts +2 -2
  170. package/dist/build/transformers/namePathToKebabCase.js +4 -6
  171. package/dist/build/transformers/namePathToPascalCase.d.ts +2 -2
  172. package/dist/build/transformers/namePathToPascalCase.js +5 -7
  173. package/dist/build/transformers/namePathToSlashNotation.d.ts +2 -2
  174. package/dist/build/transformers/namePathToSlashNotation.js +4 -6
  175. package/dist/build/transformers/shadowToCss.d.ts +2 -2
  176. package/dist/build/transformers/shadowToCss.js +14 -15
  177. package/dist/build/transformers/typographyToCss.d.ts +2 -2
  178. package/dist/build/transformers/typographyToCss.js +13 -15
  179. package/dist/build/transformers/utilities/alpha.d.ts +1 -1
  180. package/dist/build/transformers/utilities/alpha.js +4 -8
  181. package/dist/build/transformers/utilities/checkRequiredTokenProperties.js +1 -5
  182. package/dist/build/transformers/utilities/getTokenValue.d.ts +2 -2
  183. package/dist/build/transformers/utilities/getTokenValue.js +10 -12
  184. package/dist/build/transformers/utilities/hasSpaceInString.js +1 -5
  185. package/dist/build/transformers/utilities/hexToRgbaFloat.d.ts +1 -1
  186. package/dist/build/transformers/utilities/hexToRgbaFloat.js +1 -5
  187. package/dist/build/transformers/utilities/invalidTokenError.d.ts +1 -1
  188. package/dist/build/transformers/utilities/invalidTokenError.js +11 -10
  189. package/dist/build/transformers/utilities/isRgbaFloat.js +1 -5
  190. package/dist/build/transformers/utilities/mix.js +5 -7
  191. package/dist/build/transformers/utilities/rgbaFloatToHex.js +1 -5
  192. package/dist/build/types/Border.d.ts +5 -0
  193. package/dist/build/types/BorderTokenValue.d.ts +10 -0
  194. package/dist/build/types/ColorHex.d.ts +4 -0
  195. package/dist/build/types/PlatformInitializer.d.ts +11 -0
  196. package/dist/build/types/Shadow.d.ts +5 -0
  197. package/dist/build/types/ShadowTokenValue.d.ts +14 -0
  198. package/dist/build/types/SizeEm.d.ts +4 -0
  199. package/dist/build/types/SizePx.d.ts +4 -0
  200. package/dist/build/types/SizeRem.d.ts +4 -0
  201. package/dist/build/types/StyleDictionaryConfigGenerator.d.ts +15 -0
  202. package/dist/build/types/TokenBuildInput.d.ts +8 -0
  203. package/dist/build/types/TypographyTokenValue.d.ts +12 -0
  204. package/dist/build/types/w3cTransformedToken.d.ts +8 -0
  205. package/dist/build/utilities/copyFromDir.d.ts +2 -2
  206. package/dist/build/utilities/copyFromDir.js +7 -10
  207. package/dist/build/utilities/filterStringArray.js +1 -5
  208. package/dist/build/utilities/getFlag.js +1 -5
  209. package/dist/build/utilities/index.d.ts +9 -3
  210. package/dist/build/utilities/index.js +9 -9
  211. package/dist/build/utilities/joinFriendly.js +1 -5
  212. package/dist/build/utilities/schemaErrorMessage.js +1 -5
  213. package/dist/build/utilities/toCamelCase.js +5 -9
  214. package/dist/build/utilities/toPascalCase.js +5 -9
  215. package/dist/build/utilities/treeWalker.js +2 -6
  216. package/dist/build/utilities/upperCaseFirstCharacter.js +1 -5
  217. package/dist/css/functional/themes/dark-colorblind.css +56 -38
  218. package/dist/css/functional/themes/dark-dimmed.css +42 -24
  219. package/dist/css/functional/themes/dark-high-contrast.css +60 -42
  220. package/dist/css/functional/themes/dark-tritanopia.css +42 -24
  221. package/dist/css/functional/themes/dark.css +40 -22
  222. package/dist/css/functional/themes/light-colorblind.css +58 -40
  223. package/dist/css/functional/themes/light-high-contrast.css +56 -38
  224. package/dist/css/functional/themes/light-tritanopia.css +40 -22
  225. package/dist/css/functional/themes/light.css +40 -22
  226. package/dist/docs/base/size/size.json +76 -76
  227. package/dist/docs/base/typography/typography.json +16 -16
  228. package/dist/docs/functional/motion/motion.json +18 -18
  229. package/dist/docs/functional/size/border.json +56 -56
  230. package/dist/docs/functional/size/breakpoints.json +24 -24
  231. package/dist/docs/functional/size/size-coarse.json +12 -12
  232. package/dist/docs/functional/size/size-fine.json +12 -12
  233. package/dist/docs/functional/size/size.json +264 -264
  234. package/dist/docs/functional/size/viewport.json +24 -24
  235. package/dist/docs/functional/themes/dark-colorblind.json +2761 -3384
  236. package/dist/docs/functional/themes/dark-dimmed.json +2809 -3028
  237. package/dist/docs/functional/themes/dark-high-contrast.json +2806 -5113
  238. package/dist/docs/functional/themes/dark-tritanopia.json +2800 -3203
  239. package/dist/docs/functional/themes/dark.json +2779 -2520
  240. package/dist/docs/functional/themes/light-colorblind.json +2597 -3172
  241. package/dist/docs/functional/themes/light-high-contrast.json +2642 -4627
  242. package/dist/docs/functional/themes/light-tritanopia.json +2517 -2960
  243. package/dist/docs/functional/themes/light.json +2561 -2312
  244. package/dist/docs/functional/typography/typography.json +206 -206
  245. package/dist/figma/dimension/dimension.json +489 -489
  246. package/dist/figma/figma.json +19 -11
  247. package/dist/figma/scales/dark-dimmed.json +2918 -38
  248. package/dist/figma/scales/dark-high-constrast.json +2918 -38
  249. package/dist/figma/scales/dark.json +2915 -35
  250. package/dist/figma/scales/light-high-constrast.json +2920 -40
  251. package/dist/figma/scales/light.json +2920 -40
  252. package/dist/figma/shadows/dark-colorblind.json +280 -280
  253. package/dist/figma/shadows/dark-dimmed.json +280 -280
  254. package/dist/figma/shadows/dark-high-contrast.json +280 -280
  255. package/dist/figma/shadows/dark-tritanopia.json +280 -280
  256. package/dist/figma/shadows/dark.json +280 -280
  257. package/dist/figma/shadows/light-colorblind.json +281 -281
  258. package/dist/figma/shadows/light-high-contrast.json +281 -281
  259. package/dist/figma/shadows/light-tritanopia.json +281 -281
  260. package/dist/figma/shadows/light.json +281 -281
  261. package/dist/figma/themes/dark-colorblind.json +5054 -5804
  262. package/dist/figma/themes/dark-dimmed.json +5284 -5610
  263. package/dist/figma/themes/dark-high-contrast.json +4249 -6624
  264. package/dist/figma/themes/dark-tritanopia.json +5223 -5763
  265. package/dist/figma/themes/dark.json +5561 -5421
  266. package/dist/figma/themes/light-colorblind.json +4986 -5639
  267. package/dist/figma/themes/light-high-contrast.json +4166 -6213
  268. package/dist/figma/themes/light-tritanopia.json +5082 -5600
  269. package/dist/figma/themes/light.json +5418 -5277
  270. package/dist/figma/typography/typography.json +112 -156
  271. package/dist/internalCss/dark-colorblind.css +56 -38
  272. package/dist/internalCss/dark-dimmed.css +42 -24
  273. package/dist/internalCss/dark-high-contrast.css +60 -42
  274. package/dist/internalCss/dark-tritanopia.css +42 -24
  275. package/dist/internalCss/dark.css +40 -22
  276. package/dist/internalCss/light-colorblind.css +58 -40
  277. package/dist/internalCss/light-high-contrast.css +56 -38
  278. package/dist/internalCss/light-tritanopia.css +40 -22
  279. package/dist/internalCss/light.css +40 -22
  280. package/dist/styleLint/base/size/size.json +38 -38
  281. package/dist/styleLint/base/typography/typography.json +8 -8
  282. package/dist/styleLint/functional/motion/motion.json +12 -12
  283. package/dist/styleLint/functional/size/border.json +30 -30
  284. package/dist/styleLint/functional/size/breakpoints.json +12 -12
  285. package/dist/styleLint/functional/size/size-coarse.json +6 -6
  286. package/dist/styleLint/functional/size/size-fine.json +6 -6
  287. package/dist/styleLint/functional/size/size.json +132 -132
  288. package/dist/styleLint/functional/size/viewport.json +12 -12
  289. package/dist/styleLint/functional/themes/dark-colorblind.json +1642 -2265
  290. package/dist/styleLint/functional/themes/dark-dimmed.json +1726 -1945
  291. package/dist/styleLint/functional/themes/dark-high-contrast.json +1610 -3917
  292. package/dist/styleLint/functional/themes/dark-tritanopia.json +1673 -2076
  293. package/dist/styleLint/functional/themes/dark.json +1663 -1404
  294. package/dist/styleLint/functional/themes/light-colorblind.json +1418 -1993
  295. package/dist/styleLint/functional/themes/light-high-contrast.json +1504 -3489
  296. package/dist/styleLint/functional/themes/light-tritanopia.json +1397 -1840
  297. package/dist/styleLint/functional/themes/light.json +1445 -1196
  298. package/dist/styleLint/functional/typography/typography.json +114 -114
  299. package/package.json +16 -13
  300. package/src/tokens/functional/color/dark/app-dark.json5 +203 -88
  301. package/src/tokens/functional/color/dark/data-vis-dark.json5 +20 -20
  302. package/src/tokens/functional/color/dark/display-dark.json5 +95 -95
  303. package/src/tokens/functional/color/dark/overrides/dark.dimmed.json5 +0 -8
  304. package/src/tokens/functional/color/dark/overrides/dark.high-contrast.json5 +43 -30
  305. package/src/tokens/functional/color/dark/overrides/dark.protanopia-deuteranopia.json5 +62 -30
  306. package/src/tokens/functional/color/dark/overrides/dark.tritanopia.json5 +53 -12
  307. package/src/tokens/functional/color/dark/patterns-dark.json5 +4 -4
  308. package/src/tokens/functional/color/dark/primitives-dark.json5 +4 -4
  309. package/src/tokens/functional/color/light/app-light.json5 +195 -85
  310. package/src/tokens/functional/color/light/data-vis-light.json5 +20 -20
  311. package/src/tokens/functional/color/light/overrides/light.high-contrast.json5 +25 -25
  312. package/src/tokens/functional/color/light/overrides/light.protanopia-deuteranopia.json5 +65 -34
  313. package/src/tokens/functional/color/light/overrides/light.tritanopia.json5 +66 -11
  314. package/src/tokens/functional/color/light/primitives-light.json5 +2 -2
@@ -0,0 +1,23 @@
1
+ import { isCubicBezier } from '../filters/isCubicBezier.js';
2
+ /**
3
+ * @description converts cubicBezeir tokens array value to a css cubic-bezier
4
+ * @type value transformer — [StyleDictionary.ValueTransform](https://github.com/amzn/style-dictionary/blob/main/types/Transform.d.ts)
5
+ * @matcher matches all tokens of $type `duration`
6
+ * @transformer returns a css cubic-bezier function
7
+ */
8
+ export const cubicBezierToCss = {
9
+ name: 'cubicBezeir/css',
10
+ type: 'value',
11
+ transitive: true,
12
+ filter: isCubicBezier,
13
+ transform: (token, _config) => {
14
+ var _a;
15
+ const value = (_a = token.$value) !== null && _a !== void 0 ? _a : token.value;
16
+ // throw value of more or less than 4 items in array
17
+ if (value.length !== 4 || value.some((item) => typeof item !== 'number')) {
18
+ throw new Error(`Invalid cubicBezier token ${token.path.join('.')}, must be an array with 4 numbers, but got this instead: ${JSON.stringify(value)}`);
19
+ }
20
+ // return value
21
+ return `cubic-bezier(${value.join(',')})`;
22
+ },
23
+ };
@@ -1,8 +1,8 @@
1
- import type StyleDictionary from 'style-dictionary';
1
+ import type { Transform } from 'style-dictionary/types';
2
2
  /**
3
3
  * @description converts dimension tokens value to pixel value without unit, ignores `em` as they are relative to the font size of the parent element
4
4
  * @type value transformer — [StyleDictionary.ValueTransform](https://github.com/amzn/style-dictionary/blob/main/types/Transform.d.ts)
5
5
  * @matcher matches all tokens of $type `dimension`
6
6
  * @transformer returns a float number
7
7
  */
8
- export declare const dimensionToPixelUnitless: StyleDictionary.Transform;
8
+ export declare const dimensionToPixelUnitless: Transform;
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dimensionToPixelUnitless = void 0;
4
- const filters_1 = require("../filters");
1
+ import { isDimension } from '../filters/index.js';
5
2
  /**
6
3
  * @description base font size from options or 16
7
4
  * @param options
@@ -26,25 +23,27 @@ const hasUnit = (value, unit) => {
26
23
  * @matcher matches all tokens of $type `dimension`
27
24
  * @transformer returns a float number
28
25
  */
29
- exports.dimensionToPixelUnitless = {
30
- type: `value`,
26
+ export const dimensionToPixelUnitless = {
27
+ name: 'dimension/pixelUnitless',
28
+ type: 'value',
31
29
  transitive: true,
32
- matcher: filters_1.isDimension,
33
- transformer: (token, options) => {
34
- const baseFont = getBasePxFontSize(options);
35
- const floatVal = parseFloat(token.value);
30
+ filter: isDimension,
31
+ transform: (token, config, options) => {
32
+ const valueProp = options.usesDtcg ? '$value' : 'value';
33
+ const baseFont = getBasePxFontSize(config);
34
+ const floatVal = parseFloat(token[valueProp]);
36
35
  if (isNaN(floatVal)) {
37
- throw new Error(`Invalid dimension token: '${token.name}: ${token.value}' is not valid and cannot be transform to 'float' \n`);
36
+ throw new Error(`Invalid dimension token: '${token.path.join('.')}: ${token[valueProp]}' is not valid and cannot be transform to 'float' \n`);
38
37
  }
39
38
  if (floatVal === 0) {
40
39
  return 0;
41
40
  }
42
- if (hasUnit(token.value, 'rem')) {
41
+ if (hasUnit(token[valueProp], 'rem')) {
43
42
  return floatVal * baseFont;
44
43
  }
45
- if (hasUnit(token.value, 'px')) {
44
+ if (hasUnit(token[valueProp], 'px')) {
46
45
  return floatVal;
47
46
  }
48
- return token.value;
47
+ return token[valueProp];
49
48
  },
50
49
  };
@@ -1,8 +1,8 @@
1
- import type StyleDictionary from 'style-dictionary';
1
+ import type { Transform } from 'style-dictionary/types';
2
2
  /**
3
3
  * @description converts dimension tokens value to `rem`, ignores `em` as they are relative to the font size of the parent element
4
4
  * @type value transformer — [StyleDictionary.ValueTransform](https://github.com/amzn/style-dictionary/blob/main/types/Transform.d.ts)
5
5
  * @matcher matches all tokens of $type `dimension`
6
6
  * @transformer returns a `rem` string
7
7
  */
8
- export declare const dimensionToRem: StyleDictionary.Transform;
8
+ export declare const dimensionToRem: Transform;
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dimensionToRem = void 0;
4
- const filters_1 = require("../filters");
1
+ import { isDimension } from '../filters/index.js';
5
2
  /**
6
3
  * @description base font size from options or 16
7
4
  * @param options
@@ -26,21 +23,23 @@ const hasUnit = (value, unit) => {
26
23
  * @matcher matches all tokens of $type `dimension`
27
24
  * @transformer returns a `rem` string
28
25
  */
29
- exports.dimensionToRem = {
30
- type: `value`,
26
+ export const dimensionToRem = {
27
+ name: 'dimension/rem',
28
+ type: 'value',
31
29
  transitive: true,
32
- matcher: filters_1.isDimension,
33
- transformer: (token, options) => {
34
- const baseFont = getBasePxFontSize(options);
35
- const floatVal = parseFloat(token.value);
30
+ filter: isDimension,
31
+ transform: (token, config, options) => {
32
+ const valueProp = options.usesDtcg ? '$value' : 'value';
33
+ const baseFont = getBasePxFontSize(config);
34
+ const floatVal = parseFloat(token[valueProp]);
36
35
  if (isNaN(floatVal)) {
37
- throw new Error(`Invalid dimension token: '${token.name}: ${token.value}' is not valid and cannot be transform to 'rem' \n`);
36
+ throw new Error(`Invalid dimension token: '${token.name}: ${token[valueProp]}' is not valid and cannot be transform to 'rem' \n`);
38
37
  }
39
38
  if (floatVal === 0) {
40
39
  return '0';
41
40
  }
42
- if (hasUnit(token.value, 'rem') || hasUnit(token.value, 'em')) {
43
- return token.value;
41
+ if (hasUnit(token[valueProp], 'rem') || hasUnit(token[valueProp], 'em')) {
42
+ return token[valueProp];
44
43
  }
45
44
  return `${floatVal / baseFont}rem`;
46
45
  },
@@ -1,8 +1,8 @@
1
- import type StyleDictionary from 'style-dictionary';
1
+ import type { Transform } from 'style-dictionary/types';
2
2
  /**
3
3
  * @description converts dimension tokens value to `rem`, ignores `em` as they are relative to the font size of the parent element
4
4
  * @type value transformer — [StyleDictionary.ValueTransform](https://github.com/amzn/style-dictionary/blob/main/types/Transform.d.ts)
5
5
  * @matcher matches all tokens of $type `dimension`
6
6
  * @transformer returns an array with the `rem` and `pixel` string
7
7
  */
8
- export declare const dimensionToRemPxArray: StyleDictionary.Transform;
8
+ export declare const dimensionToRemPxArray: Transform;
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dimensionToRemPxArray = void 0;
4
- const filters_1 = require("../filters");
1
+ import { isDimension } from '../filters/index.js';
5
2
  /**
6
3
  * @description base font size from options or 16
7
4
  * @param options
@@ -26,20 +23,22 @@ const hasUnit = (value, unit) => {
26
23
  * @matcher matches all tokens of $type `dimension`
27
24
  * @transformer returns an array with the `rem` and `pixel` string
28
25
  */
29
- exports.dimensionToRemPxArray = {
30
- type: `value`,
26
+ export const dimensionToRemPxArray = {
27
+ name: 'dimension/remPxArray',
28
+ type: 'value',
31
29
  transitive: true,
32
- matcher: filters_1.isDimension,
33
- transformer: (token, options) => {
34
- const baseFont = getBasePxFontSize(options);
35
- const floatVal = parseFloat(token.value);
30
+ filter: isDimension,
31
+ transform: (token, config, options) => {
32
+ const valueProp = options.usesDtcg ? '$value' : 'value';
33
+ const baseFont = getBasePxFontSize(config);
34
+ const floatVal = parseFloat(token[valueProp]);
36
35
  if (isNaN(floatVal)) {
37
- throw new Error(`Invalid dimension token: '${token.name}: ${token.value}' is not valid and cannot be transform to 'rem' \n`);
36
+ throw new Error(`Invalid dimension token: '${token.name}: ${token[valueProp]}' is not valid and cannot be transform to 'rem' \n`);
38
37
  }
39
38
  if (floatVal === 0) {
40
39
  return ['0', '0'];
41
40
  }
42
- if (hasUnit(token.value, 'rem') || hasUnit(token.value, 'em')) {
41
+ if (hasUnit(token[valueProp], 'rem') || hasUnit(token[valueProp], 'em')) {
43
42
  return [token.value, `${floatVal * baseFont}px`];
44
43
  }
45
44
  return [`${floatVal / baseFont}rem`, `${floatVal}px`];
@@ -1,8 +1,8 @@
1
- import type StyleDictionary from 'style-dictionary';
1
+ import type { Transform } from 'style-dictionary/types';
2
2
  /**
3
3
  * @description converts duration tokens string value to number with `ms` unit
4
4
  * @type value transformer — [StyleDictionary.ValueTransform](https://github.com/amzn/style-dictionary/blob/main/types/Transform.d.ts)
5
5
  * @matcher matches all tokens of $type `duration`
6
6
  * @transformer returns a css duration
7
7
  */
8
- export declare const durationToCss: StyleDictionary.Transform;
8
+ export declare const durationToCss: Transform;
@@ -1,24 +1,23 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.durationToCss = void 0;
4
- const isDuration_1 = require("../filters/isDuration");
1
+ import { isDuration } from '../filters/index.js';
5
2
  /**
6
3
  * @description converts duration tokens string value to number with `ms` unit
7
4
  * @type value transformer — [StyleDictionary.ValueTransform](https://github.com/amzn/style-dictionary/blob/main/types/Transform.d.ts)
8
5
  * @matcher matches all tokens of $type `duration`
9
6
  * @transformer returns a css duration
10
7
  */
11
- exports.durationToCss = {
12
- type: `value`,
8
+ export const durationToCss = {
9
+ name: 'duration/css',
10
+ type: 'value',
13
11
  transitive: true,
14
- matcher: isDuration_1.isDuration,
15
- transformer: (token, _options) => {
12
+ filter: isDuration,
13
+ transform: (token, _config, options) => {
14
+ const valueProp = options.usesDtcg ? '$value' : 'value';
16
15
  // throw an error if token value is not a string or does not end with `ms`
17
- if (typeof token.value !== `string` || !token.value.endsWith(`ms`)) {
16
+ if (typeof token[valueProp] !== `string` || !token[valueProp].endsWith(`ms`)) {
18
17
  throw new Error(`duration token value must be a string with an "ms" unit`);
19
18
  }
20
19
  // get value
21
- let value = parseInt(token.value.replace('ms', ''));
20
+ let value = parseInt(token[valueProp].replace('ms', ''));
22
21
  let unit = `ms`;
23
22
  if (value >= 1000) {
24
23
  value = value / 1000;
@@ -1,8 +1,8 @@
1
- import type StyleDictionary from 'style-dictionary';
1
+ import type { Transform } from 'style-dictionary/types';
2
2
  /**
3
3
  * @description retrieves figma attributes from token and adds them to attributes
4
4
  * @type attribute transformer — [StyleDictionary.AttributeTransform](https://github.com/amzn/style-dictionary/blob/main/types/Transform.d.ts)
5
5
  * @matcher matches all tokens
6
6
  * @transformer returns ab object of figma attributes
7
7
  */
8
- export declare const figmaAttributes: StyleDictionary.Transform;
8
+ export declare const figmaAttributes: Transform;
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.figmaAttributes = void 0;
4
1
  const figmaScopes = {
5
2
  all: ['ALL_SCOPES'],
6
3
  radius: ['CORNER_RADIUS'],
@@ -41,9 +38,10 @@ const getScopes = (scopes) => {
41
38
  * @matcher matches all tokens
42
39
  * @transformer returns ab object of figma attributes
43
40
  */
44
- exports.figmaAttributes = {
41
+ export const figmaAttributes = {
42
+ name: 'figma/attributes',
45
43
  type: `attribute`,
46
- transformer: (token, platform = {}) => {
44
+ transform: (token, platform = {}) => {
47
45
  var _a, _b;
48
46
  const { mode, collection, scopes, group, codeSyntax } = ((_a = token.$extensions) === null || _a === void 0 ? void 0 : _a['org.primer.figma']) || {};
49
47
  return {
@@ -1,15 +1,15 @@
1
- import type StyleDictionary from 'style-dictionary';
1
+ import type { Transform, TransformedToken } from 'style-dictionary/types';
2
2
  /**
3
3
  * takes a value and returns it if its a px string if it is a float and the token has a fontSize value in extensions['org.primer.data']
4
4
  * @param value
5
5
  * @returns string
6
6
  */
7
- export declare const convertFloatToPixel: (token: StyleDictionary.TransformedToken, unitless?: boolean) => any;
7
+ export declare const convertFloatToPixel: (token: TransformedToken, unitless?: boolean) => any;
8
8
  /**
9
9
  * @description converts a float value to a pixel value based on the provided fontSize on the tokersn extension
10
10
  * @type value transformer — [StyleDictionary.ValueTransform](https://github.com/amzn/style-dictionary/blob/main/types/Transform.d.ts)
11
11
  * @matcher matches all tokens of $type `isNumber`
12
12
  * @transformer returns a pixel string
13
13
  */
14
- export declare const floatToPixel: StyleDictionary.Transform;
15
- export declare const floatToPixelUnitless: StyleDictionary.Transform;
14
+ export declare const floatToPixel: Transform;
15
+ export declare const floatToPixelUnitless: Transform;
@@ -1,13 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.floatToPixelUnitless = exports.floatToPixel = exports.convertFloatToPixel = void 0;
4
- const filters_1 = require("../filters");
1
+ import { isNumber } from '../filters/index.js';
5
2
  /**
6
3
  * takes a value and returns it if its a px string if it is a float and the token has a fontSize value in extensions['org.primer.data']
7
4
  * @param value
8
5
  * @returns string
9
6
  */
10
- const convertFloatToPixel = (token, unitless = false) => {
7
+ export const convertFloatToPixel = (token, unitless = false) => {
11
8
  var _a, _b, _c, _d, _e, _f;
12
9
  // short circut if value is not a number
13
10
  if (typeof token.value !== 'number' ||
@@ -20,22 +17,23 @@ const convertFloatToPixel = (token, unitless = false) => {
20
17
  // return converted value
21
18
  return convertedValue === 0 ? 0 : unitless ? Math.round(convertedValue) : `${Math.round(convertedValue)}px`;
22
19
  };
23
- exports.convertFloatToPixel = convertFloatToPixel;
24
20
  /**
25
21
  * @description converts a float value to a pixel value based on the provided fontSize on the tokersn extension
26
22
  * @type value transformer — [StyleDictionary.ValueTransform](https://github.com/amzn/style-dictionary/blob/main/types/Transform.d.ts)
27
23
  * @matcher matches all tokens of $type `isNumber`
28
24
  * @transformer returns a pixel string
29
25
  */
30
- exports.floatToPixel = {
31
- type: `value`,
26
+ export const floatToPixel = {
27
+ name: 'float/pixel',
28
+ type: 'value',
32
29
  transitive: true,
33
- matcher: filters_1.isNumber,
34
- transformer: (token) => (0, exports.convertFloatToPixel)(token),
30
+ filter: isNumber,
31
+ transform: (token) => convertFloatToPixel(token),
35
32
  };
36
- exports.floatToPixelUnitless = {
37
- type: `value`,
33
+ export const floatToPixelUnitless = {
34
+ name: 'float/pixelUnitless',
35
+ type: 'value',
38
36
  transitive: true,
39
- matcher: filters_1.isNumber,
40
- transformer: (token) => (0, exports.convertFloatToPixel)(token, true),
37
+ filter: isNumber,
38
+ transform: (token) => convertFloatToPixel(token, true),
41
39
  };
@@ -1,4 +1,4 @@
1
- import type StyleDictionary from 'style-dictionary';
1
+ import type { Transform } from 'style-dictionary/types';
2
2
  /**
3
3
  * takes a value and returns it if its a string or concats strings in an array quoting strings with spaces
4
4
  * @param value
@@ -11,4 +11,4 @@ export declare const parseFontFamily: (value: unknown) => string;
11
11
  * @matcher matches all tokens of $type `fontFamily`
12
12
  * @transformer returns a string
13
13
  */
14
- export declare const fontFamilyToCss: StyleDictionary.Transform;
14
+ export declare const fontFamilyToCss: Transform;
@@ -1,15 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fontFamilyToCss = exports.parseFontFamily = void 0;
4
- const filters_1 = require("../filters");
5
- const getTokenValue_1 = require("./utilities/getTokenValue");
6
- const hasSpaceInString_1 = require("./utilities/hasSpaceInString");
1
+ import { isFontFamily } from '../filters/index.js';
2
+ import { getTokenValue } from './utilities/getTokenValue.js';
3
+ import { hasSpaceInString } from './utilities/hasSpaceInString.js';
7
4
  /**
8
5
  * takes a value and returns it if its a string or concats strings in an array quoting strings with spaces
9
6
  * @param value
10
7
  * @returns string
11
8
  */
12
- const parseFontFamily = (value) => {
9
+ export const parseFontFamily = (value) => {
13
10
  if (typeof value === 'string') {
14
11
  return value;
15
12
  }
@@ -19,22 +16,22 @@ const parseFontFamily = (value) => {
19
16
  if (typeof string !== 'string') {
20
17
  throw new Error(`Invalid value in array ${string}, must be a string`);
21
18
  }
22
- return (0, hasSpaceInString_1.hasSpaceInString)(string) ? `'${string}'` : string;
19
+ return hasSpaceInString(string) ? `'${string}'` : string;
23
20
  })
24
21
  .join(', ');
25
22
  }
26
23
  throw new Error(`Invalid value ${value}, should be a string or array of strings`);
27
24
  };
28
- exports.parseFontFamily = parseFontFamily;
29
25
  /**
30
26
  * @description converts fontFamily tokens value to string
31
27
  * @type value transformer — [StyleDictionary.ValueTransform](https://github.com/amzn/style-dictionary/blob/main/types/Transform.d.ts)
32
28
  * @matcher matches all tokens of $type `fontFamily`
33
29
  * @transformer returns a string
34
30
  */
35
- exports.fontFamilyToCss = {
36
- type: `value`,
31
+ export const fontFamilyToCss = {
32
+ name: 'fontFamily/css',
33
+ type: 'value',
37
34
  transitive: true,
38
- matcher: filters_1.isFontFamily,
39
- transformer: (token) => (0, exports.parseFontFamily)((0, getTokenValue_1.getTokenValue)(token)),
35
+ filter: isFontFamily,
36
+ transform: (token) => parseFontFamily(getTokenValue(token)),
40
37
  };
@@ -1,14 +1,14 @@
1
- import type StyleDictionary from 'style-dictionary';
1
+ import type { Config, Transform, TransformedToken } from 'style-dictionary/types';
2
2
  /**
3
3
  * takes a value and returns it if its a string or concats strings in an array quoting strings with spaces
4
4
  * @param value
5
5
  * @returns string
6
6
  */
7
- export declare const parseFontFamily: (token: StyleDictionary.TransformedToken, fontFamilies?: Record<string, string>) => string;
7
+ export declare const parseFontFamily: (token: TransformedToken, fontFamilies: Record<string, string> | undefined, options: Config) => string;
8
8
  /**
9
9
  * @description converts fontFamily tokens value to string
10
10
  * @type value transformer — [StyleDictionary.ValueTransform](https://github.com/amzn/style-dictionary/blob/main/types/Transform.d.ts)
11
11
  * @matcher matches all tokens of $type `fontFamily`
12
12
  * @transformer returns a string
13
13
  */
14
- export declare const fontFamilyToFigma: StyleDictionary.Transform;
14
+ export declare const fontFamilyToFigma: Transform;
@@ -1,46 +1,44 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fontFamilyToFigma = exports.parseFontFamily = void 0;
4
- const filters_1 = require("../filters");
5
- const hasSpaceInString_1 = require("./utilities/hasSpaceInString");
1
+ import { isFontFamily } from '../filters/index.js';
2
+ import { hasSpaceInString } from './utilities/hasSpaceInString.js';
6
3
  /**
7
4
  * takes a value and returns it if its a string or concats strings in an array quoting strings with spaces
8
5
  * @param value
9
6
  * @returns string
10
7
  */
11
- const parseFontFamily = (token, fontFamilies = {}) => {
8
+ export const parseFontFamily = (token, fontFamilies = {}, options) => {
9
+ const valueProp = options.usesDtcg ? '$value' : 'value';
12
10
  // return value from fontFamilies
13
11
  if (token.name in fontFamilies) {
14
12
  return fontFamilies[token.name];
15
13
  }
16
14
  // return string
17
- if (typeof token.value === 'string') {
18
- return token.value;
15
+ if (typeof token[valueProp] === 'string') {
16
+ return token[valueProp];
19
17
  }
20
18
  // return stringified array
21
- if (Array.isArray(token.value)) {
22
- return token.value
19
+ if (Array.isArray(token[valueProp])) {
20
+ return token[valueProp]
23
21
  .map((string) => {
24
22
  if (typeof string !== 'string') {
25
23
  throw new Error(`Invalid value in array ${string}, must be a string`);
26
24
  }
27
- return (0, hasSpaceInString_1.hasSpaceInString)(string) ? `'${string}'` : string;
25
+ return hasSpaceInString(string) ? `'${string}'` : string;
28
26
  })
29
27
  .join(', ');
30
28
  }
31
29
  // invalid value
32
- throw new Error(`Invalid value ${token.value}, should be a string or array of strings`);
30
+ throw new Error(`Invalid value ${token[valueProp]}, should be a string or array of strings`);
33
31
  };
34
- exports.parseFontFamily = parseFontFamily;
35
32
  /**
36
33
  * @description converts fontFamily tokens value to string
37
34
  * @type value transformer — [StyleDictionary.ValueTransform](https://github.com/amzn/style-dictionary/blob/main/types/Transform.d.ts)
38
35
  * @matcher matches all tokens of $type `fontFamily`
39
36
  * @transformer returns a string
40
37
  */
41
- exports.fontFamilyToFigma = {
42
- type: `value`,
38
+ export const fontFamilyToFigma = {
39
+ name: 'fontFamily/figma',
40
+ type: 'value',
43
41
  transitive: true,
44
- matcher: filters_1.isFontFamily,
45
- transformer: (token, platform) => { var _a; return (0, exports.parseFontFamily)(token, (_a = platform.options) === null || _a === void 0 ? void 0 : _a.fontFamilies); },
42
+ filter: isFontFamily,
43
+ transform: (token, platform, options) => { var _a; return parseFontFamily(token, (_a = platform.options) === null || _a === void 0 ? void 0 : _a.fontFamilies, options); },
46
44
  };
@@ -1,4 +1,4 @@
1
- import type StyleDictionary from 'style-dictionary';
1
+ import type { Transform } from 'style-dictionary/types';
2
2
  export declare const parseFontWeight: (value: unknown) => number;
3
3
  /**
4
4
  * @description converts fontWeight tokens value to numeric value
@@ -6,4 +6,4 @@ export declare const parseFontWeight: (value: unknown) => number;
6
6
  * @matcher matches all tokens of $type `fontWeight`
7
7
  * @transformer returns a number
8
8
  */
9
- export declare const fontWeightToNumber: StyleDictionary.Transform;
9
+ export declare const fontWeightToNumber: Transform;
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fontWeightToNumber = exports.parseFontWeight = void 0;
4
- const filters_1 = require("../filters");
5
- const getTokenValue_1 = require("./utilities/getTokenValue");
1
+ import { isFontWeight } from '../filters/index.js';
2
+ import { getTokenValue } from './utilities/getTokenValue.js';
6
3
  const fontWeightMatrix = {
7
4
  '100': ['thin', 'hairline'],
8
5
  '200': ['extra-light', 'ultra-light'],
@@ -15,7 +12,7 @@ const fontWeightMatrix = {
15
12
  '900': ['black', 'heavy'],
16
13
  '950': ['extra-black', 'ultra-black'],
17
14
  };
18
- const parseFontWeight = (value) => {
15
+ export const parseFontWeight = (value) => {
19
16
  // throw on anything but string and number
20
17
  if (typeof value !== 'string' && typeof value !== 'number') {
21
18
  throw new Error(`Invalid value ${value}, should be a number or fontWeight string`);
@@ -38,16 +35,16 @@ const parseFontWeight = (value) => {
38
35
  // invalid value
39
36
  throw new Error(`Invalid value ${value}, should be a number or fontWeight string`);
40
37
  };
41
- exports.parseFontWeight = parseFontWeight;
42
38
  /**
43
39
  * @description converts fontWeight tokens value to numeric value
44
40
  * @type value transformer — [StyleDictionary.ValueTransform](https://github.com/amzn/style-dictionary/blob/main/types/Transform.d.ts)
45
41
  * @matcher matches all tokens of $type `fontWeight`
46
42
  * @transformer returns a number
47
43
  */
48
- exports.fontWeightToNumber = {
49
- type: `value`,
44
+ export const fontWeightToNumber = {
45
+ name: 'fontWeight/number',
46
+ type: 'value',
50
47
  transitive: true,
51
- matcher: filters_1.isFontWeight,
52
- transformer: (token) => (0, exports.parseFontWeight)((0, getTokenValue_1.getTokenValue)(token)),
48
+ filter: isFontWeight,
49
+ transform: (token) => parseFontWeight(getTokenValue(token)),
53
50
  };
@@ -1,24 +1,25 @@
1
- export { borderToCss } from './borderToCss';
2
- export { colorToHex } from './colorToHex';
3
- export { colorToHexMix } from './colorToHexMix';
4
- export { colorToRgbAlpha } from './colorToRgbAlpha';
5
- export { colorToRgbaFloat } from './colorToRgbaFloat';
6
- export { floatToPixel } from './floatToPixel';
7
- export { floatToPixelUnitless } from './floatToPixel';
8
- export { dimensionToRem } from './dimensionToRem';
9
- export { dimensionToRemPxArray } from './dimensionToRemPxArray';
10
- export { dimensionToPixelUnitless } from './dimensionToPixelUnitless';
11
- export { durationToCss } from './durationToCss';
12
- export { figmaAttributes } from './figmaAttributes';
13
- export { fontFamilyToCss } from './fontFamilyToCss';
14
- export { fontFamilyToFigma } from './fontFamilyToFigma';
15
- export { fontWeightToNumber } from './fontWeightToNumber';
16
- export { jsonDeprecated } from './jsonDeprecated';
17
- export { namePathToCamelCase } from './namePathToCamelCase';
18
- export { namePathToPascalCase } from './namePathToPascalCase';
19
- export { namePathToDotNotation } from './namePathToDotNotation';
20
- export { namePathToFigma } from './namePathToFigma';
21
- export { namePathToKebabCase } from './namePathToKebabCase';
22
- export { namePathToSlashNotation } from './namePathToSlashNotation';
23
- export { shadowToCss } from './shadowToCss';
24
- export { typographyToCss } from './typographyToCss';
1
+ export { borderToCss } from './borderToCss.js';
2
+ export { colorToHex } from './colorToHex.js';
3
+ export { colorToHexMix } from './colorToHexMix.js';
4
+ export { colorToRgbAlpha } from './colorToRgbAlpha.js';
5
+ export { colorToRgbaFloat } from './colorToRgbaFloat.js';
6
+ export { cubicBezierToCss } from './cubicBezierToCss.js';
7
+ export { floatToPixel } from './floatToPixel.js';
8
+ export { floatToPixelUnitless } from './floatToPixel.js';
9
+ export { dimensionToRem } from './dimensionToRem.js';
10
+ export { dimensionToRemPxArray } from './dimensionToRemPxArray.js';
11
+ export { dimensionToPixelUnitless } from './dimensionToPixelUnitless.js';
12
+ export { durationToCss } from './durationToCss.js';
13
+ export { figmaAttributes } from './figmaAttributes.js';
14
+ export { fontFamilyToCss } from './fontFamilyToCss.js';
15
+ export { fontFamilyToFigma } from './fontFamilyToFigma.js';
16
+ export { fontWeightToNumber } from './fontWeightToNumber.js';
17
+ export { jsonDeprecated } from './jsonDeprecated.js';
18
+ export { namePathToCamelCase } from './namePathToCamelCase.js';
19
+ export { namePathToPascalCase } from './namePathToPascalCase.js';
20
+ export { namePathToDotNotation } from './namePathToDotNotation.js';
21
+ export { namePathToFigma } from './namePathToFigma.js';
22
+ export { namePathToKebabCase } from './namePathToKebabCase.js';
23
+ export { namePathToSlashNotation } from './namePathToSlashNotation.js';
24
+ export { shadowToCss } from './shadowToCss.js';
25
+ export { typographyToCss } from './typographyToCss.js';