@primer/primitives 9.0.3 → 9.1.0-rc.c6c17c46
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/build/PrimerStyleDictionary.d.ts +9 -0
- package/dist/build/PrimerStyleDictionary.js +92 -0
- package/dist/build/filters/index.d.ts +13 -0
- package/dist/build/filters/index.js +29 -0
- package/{src/filters/isBorder.ts → dist/build/filters/isBorder.d.ts} +2 -5
- package/dist/build/filters/isBorder.js +12 -0
- package/{src/filters/isColor.ts → dist/build/filters/isColor.d.ts} +2 -5
- package/dist/build/filters/isColor.js +12 -0
- package/dist/build/filters/isColorWithAlpha.d.ts +7 -0
- package/dist/build/filters/isColorWithAlpha.js +13 -0
- package/dist/build/filters/isColorWithMix.d.ts +7 -0
- package/dist/build/filters/isColorWithMix.js +28 -0
- package/{src/filters/isDeprecated.ts → dist/build/filters/isDeprecated.d.ts} +2 -5
- package/dist/build/filters/isDeprecated.js +12 -0
- package/{src/filters/isDimension.ts → dist/build/filters/isDimension.d.ts} +2 -5
- package/dist/build/filters/isDimension.js +12 -0
- package/{src/filters/isDuration.ts → dist/build/filters/isDuration.d.ts} +2 -5
- package/dist/build/filters/isDuration.js +12 -0
- package/{src/filters/isFontFamily.ts → dist/build/filters/isFontFamily.d.ts} +2 -5
- package/dist/build/filters/isFontFamily.js +12 -0
- package/{src/filters/isFontWeight.ts → dist/build/filters/isFontWeight.d.ts} +2 -5
- package/dist/build/filters/isFontWeight.js +12 -0
- package/dist/build/filters/isFromFile.d.ts +8 -0
- package/dist/build/filters/isFromFile.js +14 -0
- package/{src/filters/isNumber.ts → dist/build/filters/isNumber.d.ts} +2 -3
- package/dist/build/filters/isNumber.js +10 -0
- package/{src/filters/isShadow.ts → dist/build/filters/isShadow.d.ts} +2 -5
- package/dist/build/filters/isShadow.js +12 -0
- package/{src/filters/isSource.ts → dist/build/filters/isSource.d.ts} +2 -5
- package/dist/build/filters/isSource.js +12 -0
- package/{src/filters/isTypography.ts → dist/build/filters/isTypography.d.ts} +2 -5
- package/dist/build/filters/isTypography.js +12 -0
- package/dist/build/formats/cssAdvanced.d.ts +2 -0
- package/dist/build/formats/cssAdvanced.js +85 -0
- package/dist/build/formats/cssCustomMedia.d.ts +7 -0
- package/dist/build/formats/cssCustomMedia.js +25 -0
- package/dist/build/formats/index.d.ts +9 -0
- package/dist/build/formats/index.js +21 -0
- package/dist/build/formats/javascriptCommonJs.d.ts +7 -0
- package/dist/build/formats/javascriptCommonJs.js +25 -0
- package/dist/build/formats/javascriptEsm.d.ts +7 -0
- package/dist/build/formats/javascriptEsm.js +25 -0
- package/dist/build/formats/jsonFigma.d.ts +7 -0
- package/dist/build/formats/jsonFigma.js +116 -0
- package/dist/build/formats/jsonNestedPrefixed.d.ts +8 -0
- package/dist/build/formats/jsonNestedPrefixed.js +28 -0
- package/dist/build/formats/jsonOneDimensional.d.ts +8 -0
- package/dist/build/formats/jsonOneDimensional.js +24 -0
- package/dist/build/formats/jsonPostCssFallback.d.ts +8 -0
- package/dist/build/formats/jsonPostCssFallback.js +21 -0
- package/dist/build/formats/typescriptExportDefinition.d.ts +7 -0
- package/dist/build/formats/typescriptExportDefinition.js +166 -0
- package/{src/formats/utilities/jsonToFlat.ts → dist/build/formats/utilities/jsonToFlat.d.ts} +4 -3
- package/dist/build/formats/utilities/jsonToFlat.js +12 -0
- package/dist/build/formats/utilities/jsonToNestedValue.d.ts +8 -0
- package/dist/build/formats/utilities/jsonToNestedValue.js +25 -0
- package/dist/build/formats/utilities/prefixTokens.d.ts +8 -0
- package/dist/build/formats/utilities/prefixTokens.js +17 -0
- package/dist/build/parsers/index.d.ts +1 -0
- package/dist/build/parsers/index.js +5 -0
- package/dist/build/parsers/w3cJsonParser.d.ts +6 -0
- package/dist/build/parsers/w3cJsonParser.js +27 -0
- package/dist/build/platforms/css.d.ts +2 -0
- package/dist/build/platforms/css.js +88 -0
- package/dist/build/platforms/deprecatedJson.d.ts +2 -0
- package/dist/build/platforms/deprecatedJson.js +17 -0
- package/dist/build/platforms/docJson.d.ts +2 -0
- package/dist/build/platforms/docJson.js +35 -0
- package/dist/build/platforms/fallbacks.d.ts +2 -0
- package/dist/build/platforms/fallbacks.js +35 -0
- package/dist/build/platforms/figma.d.ts +2 -0
- package/dist/build/platforms/figma.js +53 -0
- package/dist/build/platforms/index.d.ts +10 -0
- package/dist/build/platforms/index.js +23 -0
- package/dist/build/platforms/javascript.d.ts +2 -0
- package/dist/build/platforms/javascript.js +31 -0
- package/dist/build/platforms/json.d.ts +2 -0
- package/dist/build/platforms/json.js +33 -0
- package/dist/build/platforms/styleLint.d.ts +2 -0
- package/dist/build/platforms/styleLint.js +35 -0
- package/dist/build/platforms/typeDefinitions.d.ts +2 -0
- package/dist/build/platforms/typeDefinitions.js +31 -0
- package/dist/build/platforms/typescript.d.ts +2 -0
- package/dist/build/platforms/typescript.js +31 -0
- package/dist/build/schemas/alphaValue.d.ts +2 -0
- package/dist/build/schemas/alphaValue.js +8 -0
- package/dist/build/schemas/baseToken.d.ts +11 -0
- package/dist/build/schemas/baseToken.js +10 -0
- package/dist/build/schemas/borderToken.d.ts +51 -0
- package/dist/build/schemas/borderToken.js +20 -0
- package/dist/build/schemas/collections.d.ts +6 -0
- package/dist/build/schemas/collections.js +18 -0
- package/dist/build/schemas/colorHexValue.d.ts +2 -0
- package/dist/build/schemas/colorHexValue.js +12 -0
- package/dist/build/schemas/colorToken.d.ts +80 -0
- package/dist/build/schemas/colorToken.js +52 -0
- package/dist/build/schemas/designToken.d.ts +2 -0
- package/dist/build/schemas/designToken.js +37 -0
- package/dist/build/schemas/dimensionToken.d.ts +52 -0
- package/dist/build/schemas/dimensionToken.js +36 -0
- package/dist/build/schemas/dimensionValue.d.ts +2 -0
- package/dist/build/schemas/dimensionValue.js +12 -0
- package/dist/build/schemas/durationToken.d.ts +18 -0
- package/dist/build/schemas/durationToken.js +14 -0
- package/dist/build/schemas/durationValue.d.ts +2 -0
- package/dist/build/schemas/durationValue.js +8 -0
- package/dist/build/schemas/fontFamilyToken.d.ts +52 -0
- package/dist/build/schemas/fontFamilyToken.js +23 -0
- package/dist/build/schemas/fontWeightToken.d.ts +52 -0
- package/dist/build/schemas/fontWeightToken.js +24 -0
- package/dist/build/schemas/fontWeightValue.d.ts +2 -0
- package/dist/build/schemas/fontWeightValue.js +9 -0
- package/dist/build/schemas/numberToken.d.ts +71 -0
- package/dist/build/schemas/numberToken.js +30 -0
- package/dist/build/schemas/referenceValue.d.ts +2 -0
- package/dist/build/schemas/referenceValue.js +8 -0
- package/dist/build/schemas/scopes.d.ts +5 -0
- package/dist/build/schemas/scopes.js +34 -0
- package/dist/build/schemas/shadowToken.d.ts +157 -0
- package/dist/build/schemas/shadowToken.js +46 -0
- package/dist/build/schemas/stringToken.d.ts +18 -0
- package/dist/build/schemas/stringToken.js +13 -0
- package/dist/build/schemas/tokenName.d.ts +2 -0
- package/dist/build/schemas/tokenName.js +8 -0
- package/dist/build/schemas/tokenType.d.ts +3 -0
- package/dist/build/schemas/tokenType.js +6 -0
- package/dist/build/schemas/typographyToken.d.ts +59 -0
- package/dist/build/schemas/typographyToken.js +21 -0
- package/dist/build/schemas/validTokenType.d.ts +5 -0
- package/dist/build/schemas/validTokenType.js +34 -0
- package/dist/build/schemas/viewportRangeToken.d.ts +18 -0
- package/dist/build/schemas/viewportRangeToken.js +13 -0
- package/dist/build/transformers/borderToCss.d.ts +8 -0
- package/dist/build/transformers/borderToCss.js +38 -0
- package/dist/build/transformers/colorToHex.d.ts +8 -0
- package/dist/build/transformers/colorToHex.js +18 -0
- package/dist/build/transformers/colorToHexAlpha.d.ts +8 -0
- package/dist/build/transformers/colorToHexAlpha.js +25 -0
- package/dist/build/transformers/colorToHexMix.d.ts +8 -0
- package/dist/build/transformers/colorToHexMix.js +25 -0
- package/dist/build/transformers/colorToRgbAlpha.d.ts +8 -0
- package/dist/build/transformers/colorToRgbAlpha.js +22 -0
- package/dist/build/transformers/colorToRgbaFloat.d.ts +8 -0
- package/dist/build/transformers/colorToRgbaFloat.js +50 -0
- package/dist/build/transformers/dimensionToPixelUnitless.d.ts +8 -0
- package/dist/build/transformers/dimensionToPixelUnitless.js +50 -0
- package/dist/build/transformers/dimensionToRem.d.ts +8 -0
- package/dist/build/transformers/dimensionToRem.js +47 -0
- package/dist/build/transformers/dimensionToRemPxArray.d.ts +8 -0
- package/dist/build/transformers/dimensionToRemPxArray.js +47 -0
- package/dist/build/transformers/durationToCss.d.ts +8 -0
- package/dist/build/transformers/durationToCss.js +30 -0
- package/dist/build/transformers/figmaAttributes.d.ts +8 -0
- package/dist/build/transformers/figmaAttributes.js +57 -0
- package/dist/build/transformers/floatToPixel.d.ts +15 -0
- package/dist/build/transformers/floatToPixel.js +41 -0
- package/dist/build/transformers/fontFamilyToCss.d.ts +14 -0
- package/dist/build/transformers/fontFamilyToCss.js +40 -0
- package/dist/build/transformers/fontFamilyToFigma.d.ts +14 -0
- package/dist/build/transformers/fontFamilyToFigma.js +46 -0
- package/dist/build/transformers/fontWeightToNumber.d.ts +9 -0
- package/dist/build/transformers/fontWeightToNumber.js +53 -0
- package/dist/build/transformers/index.d.ts +24 -0
- package/dist/build/transformers/index.js +51 -0
- package/dist/build/transformers/jsonDeprecated.d.ts +8 -0
- package/dist/build/transformers/jsonDeprecated.js +16 -0
- package/{src/transformers/namePathToCamelCase.ts → dist/build/transformers/namePathToCamelCase.d.ts} +2 -8
- package/dist/build/transformers/namePathToCamelCase.js +14 -0
- package/dist/build/transformers/namePathToDotNotation.d.ts +8 -0
- package/dist/build/transformers/namePathToDotNotation.js +33 -0
- package/dist/build/transformers/namePathToFigma.d.ts +9 -0
- package/dist/build/transformers/namePathToFigma.js +24 -0
- package/dist/build/transformers/namePathToKebabCase.d.ts +8 -0
- package/dist/build/transformers/namePathToKebabCase.js +18 -0
- package/dist/build/transformers/namePathToPascalCase.d.ts +8 -0
- package/dist/build/transformers/namePathToPascalCase.js +14 -0
- package/dist/build/transformers/namePathToSlashNotation.d.ts +8 -0
- package/dist/build/transformers/namePathToSlashNotation.js +18 -0
- package/dist/build/transformers/shadowToCss.d.ts +8 -0
- package/dist/build/transformers/shadowToCss.js +35 -0
- package/dist/build/transformers/typographyToCss.d.ts +8 -0
- package/dist/build/transformers/typographyToCss.js +29 -0
- package/dist/build/transformers/utilities/alpha.d.ts +9 -0
- package/dist/build/transformers/utilities/alpha.js +20 -0
- package/dist/build/transformers/utilities/checkRequiredTokenProperties.d.ts +7 -0
- package/dist/build/transformers/utilities/checkRequiredTokenProperties.js +17 -0
- package/dist/build/transformers/utilities/getTokenValue.d.ts +2 -0
- package/dist/build/transformers/utilities/getTokenValue.js +18 -0
- package/dist/build/transformers/utilities/hasSpaceInString.d.ts +1 -0
- package/dist/build/transformers/utilities/hasSpaceInString.js +10 -0
- package/dist/build/transformers/utilities/hexToRgbaFloat.d.ts +2 -0
- package/dist/build/transformers/utilities/hexToRgbaFloat.js +33 -0
- package/dist/build/transformers/utilities/invalidTokenError.d.ts +7 -0
- package/dist/build/transformers/utilities/invalidTokenError.js +26 -0
- package/dist/build/transformers/utilities/isRgbaFloat.d.ts +7 -0
- package/dist/build/transformers/utilities/isRgbaFloat.js +24 -0
- package/dist/build/transformers/utilities/mix.d.ts +5 -0
- package/dist/build/transformers/utilities/mix.js +40 -0
- package/dist/build/transformers/utilities/rgbaFloatToHex.d.ts +6 -0
- package/dist/build/transformers/utilities/rgbaFloatToHex.js +15 -0
- package/dist/build/utilities/copyFromDir.d.ts +8 -0
- package/dist/build/utilities/copyFromDir.js +34 -0
- package/dist/build/utilities/filterStringArray.d.ts +1 -0
- package/dist/build/utilities/filterStringArray.js +17 -0
- package/{src/utilities/getFlag.ts → dist/build/utilities/getFlag.d.ts} +1 -5
- package/dist/build/utilities/getFlag.js +16 -0
- package/dist/build/utilities/index.d.ts +3 -0
- package/dist/build/utilities/index.js +9 -0
- package/dist/build/utilities/joinFriendly.d.ts +1 -0
- package/dist/build/utilities/joinFriendly.js +5 -0
- package/dist/build/utilities/schemaErrorMessage.d.ts +1 -0
- package/dist/build/utilities/schemaErrorMessage.js +5 -0
- package/dist/build/utilities/toCamelCase.d.ts +1 -0
- package/dist/build/utilities/toCamelCase.js +20 -0
- package/dist/build/utilities/toPascalCase.d.ts +1 -0
- package/dist/build/utilities/toPascalCase.js +17 -0
- package/dist/build/utilities/treeWalker.d.ts +8 -0
- package/dist/build/utilities/treeWalker.js +27 -0
- package/{src/utilities/upperCaseFirstCharacter.ts → dist/build/utilities/upperCaseFirstCharacter.d.ts} +1 -3
- package/dist/build/utilities/upperCaseFirstCharacter.js +14 -0
- package/package.json +4 -5
- package/src/PrimerStyleDictionary.ts +0 -232
- package/src/filters/index.ts +0 -13
- package/src/filters/isColorWithAlpha.ts +0 -11
- package/src/filters/isColorWithMix.ts +0 -33
- package/src/filters/isFromFile.ts +0 -12
- package/src/formats/cssAdvanced.ts +0 -99
- package/src/formats/cssCustomMedia.ts +0 -24
- package/src/formats/index.ts +0 -9
- package/src/formats/javascriptCommonJs.ts +0 -21
- package/src/formats/javascriptEsm.ts +0 -21
- package/src/formats/jsonFigma.ts +0 -134
- package/src/formats/jsonNestedPrefixed.ts +0 -23
- package/src/formats/jsonOneDimensional.ts +0 -18
- package/src/formats/jsonPostCssFallback.ts +0 -16
- package/src/formats/typescriptExportDefinition.ts +0 -170
- package/src/formats/utilities/jsonToNestedValue.ts +0 -20
- package/src/formats/utilities/prefixTokens.ts +0 -17
- package/src/parsers/index.ts +0 -1
- package/src/parsers/w3cJsonParser.ts +0 -25
- package/src/platforms/css.ts +0 -101
- package/src/platforms/deprecatedJson.ts +0 -16
- package/src/platforms/docJson.ts +0 -34
- package/src/platforms/fallbacks.ts +0 -34
- package/src/platforms/figma.ts +0 -58
- package/src/platforms/index.ts +0 -10
- package/src/platforms/javascript.ts +0 -30
- package/src/platforms/json.ts +0 -32
- package/src/platforms/styleLint.ts +0 -34
- package/src/platforms/typeDefinitions.ts +0 -30
- package/src/platforms/typescript.ts +0 -30
- package/src/schemas/alphaValue.ts +0 -12
- package/src/schemas/baseToken.ts +0 -8
- package/src/schemas/borderToken.ts +0 -19
- package/src/schemas/collections.ts +0 -49
- package/src/schemas/colorHexValue.ts +0 -18
- package/src/schemas/colorToken.ts +0 -50
- package/src/schemas/designToken.ts +0 -38
- package/src/schemas/dimensionToken.ts +0 -34
- package/src/schemas/dimensionValue.ts +0 -16
- package/src/schemas/durationToken.ts +0 -12
- package/src/schemas/durationValue.ts +0 -9
- package/src/schemas/fontFamilyToken.ts +0 -21
- package/src/schemas/fontWeightToken.ts +0 -22
- package/src/schemas/fontWeightValue.ts +0 -14
- package/src/schemas/numberToken.ts +0 -28
- package/src/schemas/referenceValue.ts +0 -12
- package/src/schemas/scopes.ts +0 -40
- package/src/schemas/shadowToken.ts +0 -45
- package/src/schemas/stringToken.ts +0 -11
- package/src/schemas/tokenName.ts +0 -12
- package/src/schemas/tokenType.ts +0 -4
- package/src/schemas/typographyToken.ts +0 -20
- package/src/schemas/validTokenType.ts +0 -44
- package/src/schemas/viewportRangeToken.ts +0 -11
- package/src/test-utilities/getMockDictionary.ts +0 -22
- package/src/test-utilities/getMockFormatterArguments.ts +0 -21
- package/src/test-utilities/getMockParserInput.ts +0 -72
- package/src/test-utilities/getMockToken.ts +0 -25
- package/src/test-utilities/index.ts +0 -4
- package/src/tokens/base/color/dark/dark.dimmed.json5 +0 -1164
- package/src/tokens/base/color/dark/dark.high-contrast.json5 +0 -764
- package/src/tokens/base/color/dark/dark.json5 +0 -911
- package/src/tokens/base/color/dark/display-dark.json5 +0 -1774
- package/src/tokens/base/color/light/display-light.json5 +0 -1774
- package/src/tokens/base/color/light/light.high-contrast.json5 +0 -755
- package/src/tokens/base/color/light/light.json5 +0 -911
- package/src/tokens/base/size/size.json +0 -196
- package/src/tokens/base/typography/typography.json +0 -48
- package/src/tokens/fallback/color-fallbacks.json +0 -270
- package/src/tokens/functional/border/dark.json5 +0 -12
- package/src/tokens/functional/border/light.json5 +0 -12
- package/src/tokens/functional/color/dark/app-dark.json5 +0 -554
- package/src/tokens/functional/color/dark/data-vis-dark.json5 +0 -284
- package/src/tokens/functional/color/dark/display-dark.json5 +0 -1258
- package/src/tokens/functional/color/dark/overrides/dark.dimmed.json5 +0 -194
- package/src/tokens/functional/color/dark/overrides/dark.high-contrast.json5 +0 -935
- package/src/tokens/functional/color/dark/overrides/dark.protanopia-deuteranopia.json5 +0 -310
- package/src/tokens/functional/color/dark/overrides/dark.tritanopia.json5 +0 -224
- package/src/tokens/functional/color/dark/patterns-dark.json5 +0 -3097
- package/src/tokens/functional/color/dark/primitives-dark.json5 +0 -1200
- package/src/tokens/functional/color/dark/syntax-dark.json5 +0 -559
- package/src/tokens/functional/color/light/app-light.json5 +0 -551
- package/src/tokens/functional/color/light/data-vis-light.json5 +0 -284
- package/src/tokens/functional/color/light/display-light.json5 +0 -1258
- package/src/tokens/functional/color/light/overrides/light.high-contrast.json5 +0 -819
- package/src/tokens/functional/color/light/overrides/light.protanopia-deuteranopia.json5 +0 -327
- package/src/tokens/functional/color/light/overrides/light.tritanopia.json5 +0 -237
- package/src/tokens/functional/color/light/patterns-light.json5 +0 -3091
- package/src/tokens/functional/color/light/primitives-light.json5 +0 -1193
- package/src/tokens/functional/color/light/syntax-light.json5 +0 -559
- package/src/tokens/functional/motion/loading.json5 +0 -17
- package/src/tokens/functional/motion/patterns.json5 +0 -28
- package/src/tokens/functional/shadow/dark.json5 +0 -383
- package/src/tokens/functional/shadow/light.json5 +0 -376
- package/src/tokens/functional/size/border.json +0 -111
- package/src/tokens/functional/size/breakpoints.json +0 -64
- package/src/tokens/functional/size/size-coarse.json +0 -28
- package/src/tokens/functional/size/size-fine.json +0 -28
- package/src/tokens/functional/size/size.json +0 -740
- package/src/tokens/functional/size/viewport.json +0 -28
- package/src/tokens/functional/typography/typography.json +0 -527
- package/src/tokens/removed/color.json +0 -421
- package/src/tokens/removed/testing.json5 +0 -4
- package/src/transformers/borderToCss.ts +0 -38
- package/src/transformers/colorToHex.ts +0 -16
- package/src/transformers/colorToHexAlpha.ts +0 -23
- package/src/transformers/colorToHexMix.ts +0 -19
- package/src/transformers/colorToRgbAlpha.ts +0 -19
- package/src/transformers/colorToRgbaFloat.ts +0 -45
- package/src/transformers/dimensionToPixelUnitless.ts +0 -60
- package/src/transformers/dimensionToRem.ts +0 -56
- package/src/transformers/dimensionToRemPxArray.ts +0 -60
- package/src/transformers/durationToCss.ts +0 -29
- package/src/transformers/figmaAttributes.ts +0 -79
- package/src/transformers/floatToPixel.ts +0 -40
- package/src/transformers/fontFamilyToCss.ts +0 -37
- package/src/transformers/fontFamilyToFigma.ts +0 -47
- package/src/transformers/fontWeightToNumber.ts +0 -53
- package/src/transformers/index.ts +0 -24
- package/src/transformers/jsonDeprecated.ts +0 -15
- package/src/transformers/namePathToDotNotation.ts +0 -34
- package/src/transformers/namePathToFigma.ts +0 -28
- package/src/transformers/namePathToKebabCase.ts +0 -19
- package/src/transformers/namePathToSlashNotation.ts +0 -19
- package/src/transformers/shadowToCss.ts +0 -37
- package/src/transformers/typographyToCss.ts +0 -31
- package/src/transformers/utilities/alpha.ts +0 -23
- package/src/transformers/utilities/checkRequiredTokenProperties.ts +0 -16
- package/src/transformers/utilities/getTokenValue.ts +0 -18
- package/src/transformers/utilities/hasSpaceInString.ts +0 -6
- package/src/transformers/utilities/hexToRgbaFloat.ts +0 -31
- package/src/transformers/utilities/invalidTokenError.ts +0 -34
- package/src/transformers/utilities/isRgbaFloat.ts +0 -29
- package/src/transformers/utilities/mix.ts +0 -46
- package/src/transformers/utilities/rgbaFloatToHex.ts +0 -15
- package/src/types/Border.d.ts +0 -5
- package/src/types/BorderTokenValue.d.ts +0 -10
- package/src/types/ColorHex.d.ts +0 -4
- package/src/types/PlatformInitializer.d.ts +0 -11
- package/src/types/Shadow.d.ts +0 -5
- package/src/types/ShadowTokenValue.d.ts +0 -14
- package/src/types/SizeEm.d.ts +0 -4
- package/src/types/SizePx.d.ts +0 -4
- package/src/types/SizeRem.d.ts +0 -4
- package/src/types/StyleDictionaryConfigGenerator.d.ts +0 -15
- package/src/types/TokenBuildInput.d.ts +0 -8
- package/src/types/TypographyTokenValue.d.ts +0 -12
- package/src/types/w3cTransformedToken.d.ts +0 -8
- package/src/utilities/copyFromDir.ts +0 -21
- package/src/utilities/index.ts +0 -3
- package/src/utilities/joinFriendly.ts +0 -2
- package/src/utilities/schemaErrorMessage.ts +0 -2
- package/src/utilities/toCamelCase.ts +0 -29
- package/src/utilities/treeWalker.ts +0 -27
|
@@ -1,421 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"auto.black": null,
|
|
3
|
-
"auto.white": null,
|
|
4
|
-
"auto.gray.0": null,
|
|
5
|
-
"auto.gray.1": null,
|
|
6
|
-
"auto.gray.2": null,
|
|
7
|
-
"auto.gray.3": null,
|
|
8
|
-
"auto.gray.4": null,
|
|
9
|
-
"auto.gray.5": null,
|
|
10
|
-
"auto.gray.6": null,
|
|
11
|
-
"auto.gray.7": null,
|
|
12
|
-
"auto.gray.8": null,
|
|
13
|
-
"auto.gray.9": null,
|
|
14
|
-
"auto.blue.0": null,
|
|
15
|
-
"auto.blue.1": null,
|
|
16
|
-
"auto.blue.2": null,
|
|
17
|
-
"auto.blue.3": null,
|
|
18
|
-
"auto.blue.4": null,
|
|
19
|
-
"auto.blue.5": null,
|
|
20
|
-
"auto.blue.6": null,
|
|
21
|
-
"auto.blue.7": null,
|
|
22
|
-
"auto.blue.8": null,
|
|
23
|
-
"auto.blue.9": null,
|
|
24
|
-
"auto.green.0": null,
|
|
25
|
-
"auto.green.1": null,
|
|
26
|
-
"auto.green.2": null,
|
|
27
|
-
"auto.green.3": null,
|
|
28
|
-
"auto.green.4": null,
|
|
29
|
-
"auto.green.5": null,
|
|
30
|
-
"auto.green.6": null,
|
|
31
|
-
"auto.green.7": null,
|
|
32
|
-
"auto.green.8": null,
|
|
33
|
-
"auto.green.9": null,
|
|
34
|
-
"auto.yellow.0": null,
|
|
35
|
-
"auto.yellow.1": null,
|
|
36
|
-
"auto.yellow.2": null,
|
|
37
|
-
"auto.yellow.3": null,
|
|
38
|
-
"auto.yellow.4": null,
|
|
39
|
-
"auto.yellow.5": null,
|
|
40
|
-
"auto.yellow.6": null,
|
|
41
|
-
"auto.yellow.7": null,
|
|
42
|
-
"auto.yellow.8": null,
|
|
43
|
-
"auto.yellow.9": null,
|
|
44
|
-
"auto.orange.0": null,
|
|
45
|
-
"auto.orange.1": null,
|
|
46
|
-
"auto.orange.2": null,
|
|
47
|
-
"auto.orange.3": null,
|
|
48
|
-
"auto.orange.4": null,
|
|
49
|
-
"auto.orange.5": null,
|
|
50
|
-
"auto.orange.6": null,
|
|
51
|
-
"auto.orange.7": null,
|
|
52
|
-
"auto.orange.8": null,
|
|
53
|
-
"auto.orange.9": null,
|
|
54
|
-
"auto.red.0": null,
|
|
55
|
-
"auto.red.1": null,
|
|
56
|
-
"auto.red.2": null,
|
|
57
|
-
"auto.red.3": null,
|
|
58
|
-
"auto.red.4": null,
|
|
59
|
-
"auto.red.5": null,
|
|
60
|
-
"auto.red.6": null,
|
|
61
|
-
"auto.red.7": null,
|
|
62
|
-
"auto.red.8": null,
|
|
63
|
-
"auto.red.9": null,
|
|
64
|
-
"auto.purple.0": null,
|
|
65
|
-
"auto.purple.1": null,
|
|
66
|
-
"auto.purple.2": null,
|
|
67
|
-
"auto.purple.3": null,
|
|
68
|
-
"auto.purple.4": null,
|
|
69
|
-
"auto.purple.5": null,
|
|
70
|
-
"auto.purple.6": null,
|
|
71
|
-
"auto.purple.7": null,
|
|
72
|
-
"auto.purple.8": null,
|
|
73
|
-
"auto.purple.9": null,
|
|
74
|
-
"auto.pink.0": null,
|
|
75
|
-
"auto.pink.1": null,
|
|
76
|
-
"auto.pink.2": null,
|
|
77
|
-
"auto.pink.3": null,
|
|
78
|
-
"auto.pink.4": null,
|
|
79
|
-
"auto.pink.5": null,
|
|
80
|
-
"auto.pink.6": null,
|
|
81
|
-
"auto.pink.7": null,
|
|
82
|
-
"auto.pink.8": null,
|
|
83
|
-
"auto.pink.9": null,
|
|
84
|
-
"text.primary": "fg.default",
|
|
85
|
-
"text.secondary": "fg.muted",
|
|
86
|
-
"text.tertiary": "fg.muted",
|
|
87
|
-
"text.placeholder": "fg.subtle",
|
|
88
|
-
"text.disabled": "fg.muted",
|
|
89
|
-
"text.inverse": "fg.onEmphasis",
|
|
90
|
-
"text.link": "accent.fg",
|
|
91
|
-
"text.danger": "danger.fg",
|
|
92
|
-
"text.success": "success.fg",
|
|
93
|
-
"text.warning": "attention.fg",
|
|
94
|
-
"text.white": null,
|
|
95
|
-
"icon.primary": "fg.default",
|
|
96
|
-
"icon.secondary": "fg.muted",
|
|
97
|
-
"icon.tertiary": "fg.muted",
|
|
98
|
-
"icon.info": "accent.fg",
|
|
99
|
-
"icon.danger": "danger.fg",
|
|
100
|
-
"icon.success": "success.fg",
|
|
101
|
-
"icon.warning": "attention.fg",
|
|
102
|
-
"border.primary": "border.default",
|
|
103
|
-
"border.secondary": "border.muted",
|
|
104
|
-
"border.tertiary": "border.default",
|
|
105
|
-
"border.overlay": "border.default",
|
|
106
|
-
"border.inverse": "fg.onEmphasis",
|
|
107
|
-
"border.info": "accent.emphasis",
|
|
108
|
-
"border.danger": "danger.emphasis",
|
|
109
|
-
"border.success": "success.emphasis",
|
|
110
|
-
"border.warning": "attention.emphasis",
|
|
111
|
-
"bg.canvas": "canvas.default",
|
|
112
|
-
"bg.canvasMobile": null,
|
|
113
|
-
"bg.canvasInverse": "neutral.emphasis",
|
|
114
|
-
"bg.canvasInset": "canvas.inset",
|
|
115
|
-
"bg.primary": "canvas.default",
|
|
116
|
-
"bg.secondary": "canvas.subtle",
|
|
117
|
-
"bg.tertiary": "canvas.subtle",
|
|
118
|
-
"bg.overlay": "canvas.overlay",
|
|
119
|
-
"bg.backdrop": "primer.canvas.backdrop",
|
|
120
|
-
"bg.info": "accent.subtle",
|
|
121
|
-
"bg.infoInverse": "accent.emphasis",
|
|
122
|
-
"bg.danger": "danger.subtle",
|
|
123
|
-
"bg.dangerInverse": "danger.emphasis",
|
|
124
|
-
"bg.success": "success.subtle",
|
|
125
|
-
"bg.successInverse": "success.emphasis",
|
|
126
|
-
"bg.warning": "attention.subtle",
|
|
127
|
-
"bg.warningInverse": "attention.emphasis",
|
|
128
|
-
"shadow.highlight": "primer.shadow.highlight",
|
|
129
|
-
"shadow.inset": "primer.shadow.inset",
|
|
130
|
-
"state.hover.primaryBg": "accent.emphasis",
|
|
131
|
-
"state.hover.primaryBorder": "accent.emphasis",
|
|
132
|
-
"state.hover.primaryText": "fg.onEmphasis",
|
|
133
|
-
"state.hover.primaryIcon": "fg.onEmphasis",
|
|
134
|
-
"state.hover.secondaryBg": "neutral.subtle",
|
|
135
|
-
"state.hover.secondaryBorder": "neutral.subtle",
|
|
136
|
-
"state.selected.primaryBg": "accent.emphasis",
|
|
137
|
-
"state.selected.primaryBorder": "accent.emphasis",
|
|
138
|
-
"state.selected.primaryText": "fg.onEmphasis",
|
|
139
|
-
"state.selected.primaryIcon": "fg.onEmphasis",
|
|
140
|
-
"state.focus.border": "accent.emphasis",
|
|
141
|
-
"state.focus.shadow": "primer.shadow.focus",
|
|
142
|
-
"fade.fg10": null,
|
|
143
|
-
"fade.fg15": null,
|
|
144
|
-
"fade.fg30": null,
|
|
145
|
-
"fade.fg50": null,
|
|
146
|
-
"fade.fg70": null,
|
|
147
|
-
"fade.fg85": null,
|
|
148
|
-
"fade.black10": null,
|
|
149
|
-
"fade.black15": null,
|
|
150
|
-
"fade.black30": null,
|
|
151
|
-
"fade.black50": null,
|
|
152
|
-
"fade.black70": null,
|
|
153
|
-
"fade.black85": null,
|
|
154
|
-
"fade.white10": null,
|
|
155
|
-
"fade.white15": null,
|
|
156
|
-
"fade.white30": null,
|
|
157
|
-
"fade.white50": null,
|
|
158
|
-
"fade.white70": null,
|
|
159
|
-
"fade.white85": null,
|
|
160
|
-
"alert.info.text": "fg.default",
|
|
161
|
-
"alert.info.icon": "accent.fg",
|
|
162
|
-
"alert.info.bg": "accent.subtle",
|
|
163
|
-
"alert.info.border": "accent.muted",
|
|
164
|
-
"alert.warn.text": "fg.default",
|
|
165
|
-
"alert.warn.icon": "attention.fg",
|
|
166
|
-
"alert.warn.bg": "attention.subtle",
|
|
167
|
-
"alert.warn.border": "attention.muted",
|
|
168
|
-
"alert.error.text": "fg.default",
|
|
169
|
-
"alert.error.icon": "danger.fg",
|
|
170
|
-
"alert.error.bg": "danger.subtle",
|
|
171
|
-
"alert.error.border": "danger.muted",
|
|
172
|
-
"alert.success.text": "fg.default",
|
|
173
|
-
"alert.success.icon": "success.fg",
|
|
174
|
-
"alert.success.bg": "success.subtle",
|
|
175
|
-
"alert.success.border": "success.muted",
|
|
176
|
-
"autocomplete.shadow": "shadow.medium",
|
|
177
|
-
"autocomplete.rowBorder": "border.muted",
|
|
178
|
-
"blankslate.icon": "fg.muted",
|
|
179
|
-
"counter.text": "fg.default",
|
|
180
|
-
"counter.bg": "neutral.muted",
|
|
181
|
-
"counter.primary.text": "fg.onEmphasis",
|
|
182
|
-
"counter.primary.bg": "neutral.emphasis",
|
|
183
|
-
"counter.secondary.text": "fg.muted",
|
|
184
|
-
"counter.secondary.bg": "neutral.subtle",
|
|
185
|
-
"box.blueBorder": "accent.muted",
|
|
186
|
-
"box.rowYellowBg": "attention.subtle",
|
|
187
|
-
"box.rowBlueBg": "accent.subtle",
|
|
188
|
-
"box.headerBlueBg": "accent.subtle",
|
|
189
|
-
"box.headerBlueBorder": "accent.muted",
|
|
190
|
-
"box.borderInfo": "accent.muted",
|
|
191
|
-
"box.bgInfo": "accent.subtle",
|
|
192
|
-
"box.borderWarning": "attention.muted",
|
|
193
|
-
"box.bgWarning": "attention.subtle",
|
|
194
|
-
"branchName.text": "fg.muted",
|
|
195
|
-
"branchName.icon": "fg.muted",
|
|
196
|
-
"branchName.bg": "accent.subtle",
|
|
197
|
-
"branchName.link.text": "accent.fg",
|
|
198
|
-
"branchName.link.icon": "accent.fg",
|
|
199
|
-
"branchName.link.bg": "accent.subtle",
|
|
200
|
-
"markdown.codeBg": "neutral.muted",
|
|
201
|
-
"markdown.frameBorder": "border.default",
|
|
202
|
-
"markdown.blockquoteBorder": "border.default",
|
|
203
|
-
"markdown.tableBorder": "border.default",
|
|
204
|
-
"markdown.tableTrBorder": "border.muted",
|
|
205
|
-
"filterItem.barBg": "neutral.subtle",
|
|
206
|
-
"hiddenTextExpander.bg": "neutral.muted",
|
|
207
|
-
"hiddenTextExpander.bgHover": "accent.muted",
|
|
208
|
-
"dragAndDrop.border": "border.default",
|
|
209
|
-
"uploadEnabled.border": "border.default",
|
|
210
|
-
"uploadEnabled.borderFocused": "accent.emphasis",
|
|
211
|
-
"previewableCommentForm.border": "border.default",
|
|
212
|
-
"verifiedBadge.text": "success.fg",
|
|
213
|
-
"verifiedBadge.bg": "canvas.default",
|
|
214
|
-
"verifiedBadge.border": "border.default",
|
|
215
|
-
"socialCount.bg": "canvas.default",
|
|
216
|
-
"tooltip.text": "fg.onEmphasis",
|
|
217
|
-
"tooltip.bg": "neutral.emphasisPlus",
|
|
218
|
-
"filesExplorerIcon": "accent.fg",
|
|
219
|
-
"hlAuthorBg": "accent.subtle",
|
|
220
|
-
"hlAuthorBorder": "accent.muted",
|
|
221
|
-
"logoSubdued": "neutral.muted",
|
|
222
|
-
"discussionBorder": "success.muted",
|
|
223
|
-
"discussionBgSuccess": "success.emphasis",
|
|
224
|
-
"actionsWorkflowTableStickyBg": "primer.canvas.sticky",
|
|
225
|
-
"repoLanguageColorBorder": "primer.border.contrast",
|
|
226
|
-
"codeSelectionBg": "accent.muted",
|
|
227
|
-
"highlight.text": "fg.default",
|
|
228
|
-
"highlight.bg": "attention.subtle",
|
|
229
|
-
"blob.lineHighlightBg": "attention.subtle",
|
|
230
|
-
"blob.lineHighlightBorder": "attention.muted",
|
|
231
|
-
"topicTag.text": "accent.fg",
|
|
232
|
-
"topicTag.bg": "accent.subtle",
|
|
233
|
-
"topicTag.hoverBg": "accent.emphasis",
|
|
234
|
-
"topicTag.activeBg": "accent.subtle",
|
|
235
|
-
"footerInvertocat.octicon": "fg.subtle",
|
|
236
|
-
"footerInvertocat.octiconHover": "fg.muted",
|
|
237
|
-
"dropdown.shadow": "shadow.large",
|
|
238
|
-
"label.border": "border.default",
|
|
239
|
-
"label.primary.text": "fg.default",
|
|
240
|
-
"label.primary.border": "neutral.emphasis",
|
|
241
|
-
"label.secondary.text": "fg.muted",
|
|
242
|
-
"label.secondary.border": "border.default",
|
|
243
|
-
"label.info.text": "accent.fg",
|
|
244
|
-
"label.info.border": "accent.emphasis",
|
|
245
|
-
"label.success.text": "success.fg",
|
|
246
|
-
"label.success.border": "success.emphasis",
|
|
247
|
-
"label.warning.text": "attention.fg",
|
|
248
|
-
"label.warning.border": "attention.emphasis",
|
|
249
|
-
"label.danger.text": "danger.fg",
|
|
250
|
-
"label.danger.border": "danger.emphasis",
|
|
251
|
-
"label.orange.text": "severe.fg",
|
|
252
|
-
"label.orange.border": "severe.emphasis",
|
|
253
|
-
"input.bg": "canvas.default",
|
|
254
|
-
"input.contrastBg": "canvas.inset",
|
|
255
|
-
"input.border": "border.default",
|
|
256
|
-
"input.shadow": "primer.shadow.inset",
|
|
257
|
-
"input.disabledBorder": "border.default",
|
|
258
|
-
"input.warningBorder": "attention.emphasis",
|
|
259
|
-
"input.errorBorder": "danger.emphasis",
|
|
260
|
-
"input.tooltip.success.text": "fg.default",
|
|
261
|
-
"input.tooltip.success.bg": "success.subtle",
|
|
262
|
-
"input.tooltip.success.border": "success.muted",
|
|
263
|
-
"input.tooltip.warning.text": "fg.default",
|
|
264
|
-
"input.tooltip.warning.bg": "attention.subtle",
|
|
265
|
-
"input.tooltip.warning.border": "attention.muted",
|
|
266
|
-
"input.tooltip.error.text": "fg.default",
|
|
267
|
-
"input.tooltip.error.bg": "danger.subtle",
|
|
268
|
-
"input.tooltip.error.border": "danger.muted",
|
|
269
|
-
"toast.text": "fg.default",
|
|
270
|
-
"toast.bg": "canvas.default",
|
|
271
|
-
"toast.border": "border.default",
|
|
272
|
-
"toast.shadow": "shadow.large",
|
|
273
|
-
"toast.icon": "fg.onEmphasis",
|
|
274
|
-
"toast.iconBg": "accent.emphasis",
|
|
275
|
-
"toast.iconBorder": null,
|
|
276
|
-
"toast.success.text": "fg.default",
|
|
277
|
-
"toast.success.border": "border.default",
|
|
278
|
-
"toast.success.icon": "fg.onEmphasis",
|
|
279
|
-
"toast.success.iconBg": "success.emphasis",
|
|
280
|
-
"toast.success.iconBorder": null,
|
|
281
|
-
"toast.warning.text": "fg.default",
|
|
282
|
-
"toast.warning.border": "border.default",
|
|
283
|
-
"toast.warning.icon": "fg.default",
|
|
284
|
-
"toast.warning.iconBg": "attention.emphasis",
|
|
285
|
-
"toast.warning.iconBorder": null,
|
|
286
|
-
"toast.danger.text": "fg.default",
|
|
287
|
-
"toast.danger.border": "border.default",
|
|
288
|
-
"toast.danger.icon": "fg.onEmphasis",
|
|
289
|
-
"toast.danger.iconBg": "danger.emphasis",
|
|
290
|
-
"toast.danger.iconBorder": null,
|
|
291
|
-
"toast.loading.text": "fg.default",
|
|
292
|
-
"toast.loading.border": "border.default",
|
|
293
|
-
"toast.loading.icon": "fg.onEmphasis",
|
|
294
|
-
"toast.loading.iconBg": "neutral.emphasis",
|
|
295
|
-
"toast.loading.iconBorder": null,
|
|
296
|
-
"timeline.text": "fg.muted",
|
|
297
|
-
"timeline.badgeSuccessBorder": null,
|
|
298
|
-
"timeline.targetBadgeBorder": "accent.emphasis",
|
|
299
|
-
"timeline.targetBadgeShadow": "accent.muted",
|
|
300
|
-
"diffstat.neutralBg": "neutral.muted",
|
|
301
|
-
"diffstat.neutralBorder": "border.subtle",
|
|
302
|
-
"diffstat.deletionBg": "danger.emphasis",
|
|
303
|
-
"diff.addition.text": "fg.default",
|
|
304
|
-
"diff.addition.bg": "success.subtle",
|
|
305
|
-
"diff.addition.border": "success.muted",
|
|
306
|
-
"diff.deletion.text": "fg.default",
|
|
307
|
-
"diff.deletion.bg": "danger.subtle",
|
|
308
|
-
"diff.deletion.border": "danger.muted",
|
|
309
|
-
"diff.change.text": "attention.fg",
|
|
310
|
-
"diff.change.bg": "attention.subtle",
|
|
311
|
-
"diff.change.border": "attention.muted",
|
|
312
|
-
"mergeBox.successIconBg": "success.emphasis",
|
|
313
|
-
"mergeBox.successIconText": "fg.onEmphasis",
|
|
314
|
-
"mergeBox.successIconBorder": null,
|
|
315
|
-
"mergeBox.successIndicatorBg": "success.emphasis",
|
|
316
|
-
"mergeBox.successIndicatorBorder": null,
|
|
317
|
-
"mergeBox.mergedIconBg": "done.emphasis",
|
|
318
|
-
"mergeBox.mergedIconText": "fg.onEmphasis",
|
|
319
|
-
"mergeBox.mergedIconBorder": null,
|
|
320
|
-
"mergeBox.mergedBoxBorder": "done.emphasis",
|
|
321
|
-
"mergeBox.neutralIconBg": "neutral.emphasis",
|
|
322
|
-
"mergeBox.neutralIconText": "fg.onEmphasis",
|
|
323
|
-
"mergeBox.neutralIconBorder": null,
|
|
324
|
-
"mergeBox.neutralIndicatorBg": "neutral.emphasis",
|
|
325
|
-
"mergeBox.neutralIndicatorBorder": null,
|
|
326
|
-
"mergeBox.warningIconBg": "attention.emphasis",
|
|
327
|
-
"mergeBox.warningIconText": "fg.onEmphasis",
|
|
328
|
-
"mergeBox.warningIconBorder": null,
|
|
329
|
-
"mergeBox.warningBoxBorder": "attention.emphasis",
|
|
330
|
-
"mergeBox.warningMergeHighlight": null,
|
|
331
|
-
"mergeBox.errorIconBg": "danger.emphasis",
|
|
332
|
-
"mergeBox.errorIconText": "fg.onEmphasis",
|
|
333
|
-
"mergeBox.errorIconBorder": null,
|
|
334
|
-
"mergeBox.errorIndicatorBg": "danger.emphasis",
|
|
335
|
-
"mergeBox.errorIndicatorBorder": null,
|
|
336
|
-
"underlinenav.border": null,
|
|
337
|
-
"underlinenav.borderActive": "primer.border.active",
|
|
338
|
-
"underlinenav.text": "fg.default",
|
|
339
|
-
"underlinenav.textHover": "fg.default",
|
|
340
|
-
"underlinenav.textActive": "fg.default",
|
|
341
|
-
"underlinenav.iconHover": "fg.subtle",
|
|
342
|
-
"underlinenav.iconActive": "fg.default",
|
|
343
|
-
"underlinenav.counterText": "fg.default",
|
|
344
|
-
"underlinenav.counterBg": "neutral.muted",
|
|
345
|
-
"selectMenu.borderSecondary": "border.muted",
|
|
346
|
-
"selectMenu.shadow": "shadow.large",
|
|
347
|
-
"selectMenu.backdropBg": "primer.canvas.backdrop",
|
|
348
|
-
"sidenav.borderActive": "primer.border.active",
|
|
349
|
-
"menu.headingText": "fg.default",
|
|
350
|
-
"menu.borderActive": "primer.border.active",
|
|
351
|
-
"project.cardBg": "canvas.overlay",
|
|
352
|
-
"prState.draft.text": "fg.onEmphasis",
|
|
353
|
-
"prState.draft.bg": "neutral.emphasis",
|
|
354
|
-
"prState.draft.border": null,
|
|
355
|
-
"prState.open.text": "fg.onEmphasis",
|
|
356
|
-
"prState.open.bg": "success.emphasis",
|
|
357
|
-
"prState.open.border": null,
|
|
358
|
-
"prState.merged.text": "fg.onEmphasis",
|
|
359
|
-
"prState.merged.bg": "done.emphasis",
|
|
360
|
-
"prState.merged.border": null,
|
|
361
|
-
"prState.closed.text": "fg.onEmphasis",
|
|
362
|
-
"prState.closed.bg": "danger.emphasis",
|
|
363
|
-
"prState.closed.border": null,
|
|
364
|
-
"diffBlob.numText": "fg.subtle",
|
|
365
|
-
"diffBlob.numHoverText": "fg.default",
|
|
366
|
-
"diffBlob.addition.numHoverText": "fg.default",
|
|
367
|
-
"diffBlob.deletion.numHoverText": "fg.default",
|
|
368
|
-
"diffBlob.hunk.text": "fg.muted",
|
|
369
|
-
"diffBlob.hunk.lineBg": "accent.subtle",
|
|
370
|
-
"diffBlob.emptyBlockBg": "neutral.subtle",
|
|
371
|
-
"diffBlob.selectedLineHighlightBg": "attention.subtle",
|
|
372
|
-
"diffBlob.selectedLineHighlightBorder": "attention.muted",
|
|
373
|
-
"diffBlob.expander.hoverIcon": "fg.onEmphasis",
|
|
374
|
-
"diffBlob.expander.hoverBg": "accent.emphasis",
|
|
375
|
-
"diffBlob.commentButton.icon": "fg.onEmphasis",
|
|
376
|
-
"diffBlob.commentButton.bg": "accent.emphasis",
|
|
377
|
-
"diffBlob.commentButton.gradientBg": null,
|
|
378
|
-
"globalNav.logo": null,
|
|
379
|
-
"globalNav.bg": null,
|
|
380
|
-
"globalNav.text": null,
|
|
381
|
-
"globalNav.icon": null,
|
|
382
|
-
"globalNav.inputBg": null,
|
|
383
|
-
"globalNav.inputBorder": null,
|
|
384
|
-
"globalNav.inputIcon": null,
|
|
385
|
-
"globalNav.inputPlaceholder": null,
|
|
386
|
-
"introShelf.gradientLeft": "accent.subtle",
|
|
387
|
-
"introShelf.gradientRight": "success.subtle",
|
|
388
|
-
"introShelf.gradientIn": "canvas.default",
|
|
389
|
-
"introShelf.gradientOut": null,
|
|
390
|
-
"mktg.success": null,
|
|
391
|
-
"mktg.info": null,
|
|
392
|
-
"mktg.bgShadeGradient.top": null,
|
|
393
|
-
"mktg.bgShadeGradient.bottom": null,
|
|
394
|
-
"mktg.btn.bg.top": null,
|
|
395
|
-
"mktg.btn.bg.bottom": null,
|
|
396
|
-
"mktg.btn.bgOverlay.top": null,
|
|
397
|
-
"mktg.btn.bgOverlay.bottom": null,
|
|
398
|
-
"mktg.btn.text": null,
|
|
399
|
-
"mktg.btn.primary.bg.top": null,
|
|
400
|
-
"mktg.btn.primary.bg.bottom": null,
|
|
401
|
-
"mktg.btn.primary.bgOverlay.top": null,
|
|
402
|
-
"mktg.btn.primary.bgOverlay.bottom": null,
|
|
403
|
-
"mktg.btn.primary.text": null,
|
|
404
|
-
"mktg.btn.enterprise.bg.top": null,
|
|
405
|
-
"mktg.btn.enterprise.bg.bottom": null,
|
|
406
|
-
"mktg.btn.enterprise.bgOverlay.top": null,
|
|
407
|
-
"mktg.btn.enterprise.bgOverlay.bottom": null,
|
|
408
|
-
"mktg.btn.enterprise.text": null,
|
|
409
|
-
"mktg.btn.outline.text": null,
|
|
410
|
-
"mktg.btn.outline.border": null,
|
|
411
|
-
"mktg.btn.outline.hover.text": null,
|
|
412
|
-
"mktg.btn.outline.hover.border": null,
|
|
413
|
-
"mktg.btn.outline.focus.border": null,
|
|
414
|
-
"mktg.btn.outline.focus.borderInset": null,
|
|
415
|
-
"mktg.btn.dark.text": null,
|
|
416
|
-
"mktg.btn.dark.border": null,
|
|
417
|
-
"mktg.btn.dark.hover.text": null,
|
|
418
|
-
"mktg.btn.dark.hover.border": null,
|
|
419
|
-
"mktg.btn.dark.focus.border": null,
|
|
420
|
-
"mktg.btn.dark.focus.borderInset": null
|
|
421
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import {isBorder} from '../filters/isBorder'
|
|
2
|
-
import type StyleDictionary from 'style-dictionary'
|
|
3
|
-
import type {BorderTokenValue} from '../types/BorderTokenValue'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* checks if all required properties exist on shadow token
|
|
7
|
-
* @param object - BorderTokenValue
|
|
8
|
-
* @returns void or throws error
|
|
9
|
-
*/
|
|
10
|
-
const checkForBorderTokenProperties = (border: BorderTokenValue) => {
|
|
11
|
-
const requiredProperties = ['color', 'width', 'style']
|
|
12
|
-
for (const prop of requiredProperties) {
|
|
13
|
-
if (prop in border === false) {
|
|
14
|
-
throw new Error(`Missing propery: ${prop} on border token ${JSON.stringify(border)}`)
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* @description converts w3c border tokens in css border string
|
|
20
|
-
* @type value transformer — [StyleDictionary.ValueTransform](https://github.com/amzn/style-dictionary/blob/main/types/Transform.d.ts)
|
|
21
|
-
* @matcher matches all tokens of $type `border`
|
|
22
|
-
* @transformer returns css border `string`
|
|
23
|
-
*/
|
|
24
|
-
export const borderToCss: StyleDictionary.Transform = {
|
|
25
|
-
type: `value`,
|
|
26
|
-
transitive: true,
|
|
27
|
-
matcher: isBorder,
|
|
28
|
-
transformer: ({value}: {value: BorderTokenValue}) => {
|
|
29
|
-
//
|
|
30
|
-
checkForBorderTokenProperties(value)
|
|
31
|
-
// if value === string it was probably already transformed
|
|
32
|
-
if (typeof value === 'string') {
|
|
33
|
-
return value
|
|
34
|
-
}
|
|
35
|
-
/* color | style | width */
|
|
36
|
-
return `${value.color} ${value.style} ${value.width}`
|
|
37
|
-
},
|
|
38
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import {toHex} from 'color2k'
|
|
2
|
-
import {isColor} from '../filters'
|
|
3
|
-
import type StyleDictionary from 'style-dictionary'
|
|
4
|
-
import {getTokenValue} from './utilities/getTokenValue'
|
|
5
|
-
/**
|
|
6
|
-
* @description converts color tokens value to `hex6` or `hex8`
|
|
7
|
-
* @type value transformer — [StyleDictionary.ValueTransform](https://github.com/amzn/style-dictionary/blob/main/types/Transform.d.ts)
|
|
8
|
-
* @matcher matches all tokens of $type `color`
|
|
9
|
-
* @transformer returns a `hex` string
|
|
10
|
-
*/
|
|
11
|
-
export const colorToHex: StyleDictionary.Transform = {
|
|
12
|
-
type: `value`,
|
|
13
|
-
transitive: true,
|
|
14
|
-
matcher: isColor,
|
|
15
|
-
transformer: (token: StyleDictionary.TransformedToken) => toHex(getTokenValue(token)),
|
|
16
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import {toHex} from 'color2k'
|
|
2
|
-
import {alpha} from './utilities/alpha'
|
|
3
|
-
import {isColorWithAlpha} from '../filters'
|
|
4
|
-
import type StyleDictionary from 'style-dictionary'
|
|
5
|
-
import {getTokenValue} from './utilities/getTokenValue'
|
|
6
|
-
/**
|
|
7
|
-
* @description replaces tokens value with `hex8` color using the tokens `alpha` property to specify the value used for alpha
|
|
8
|
-
* @type value transformer — [StyleDictionary.ValueTransform](https://github.com/amzn/style-dictionary/blob/main/types/Transform.d.ts)
|
|
9
|
-
* @matcher matches all tokens of $type `color` with an `alpha` property
|
|
10
|
-
* @transformer returns `hex8` string
|
|
11
|
-
*/
|
|
12
|
-
export const colorToHexAlpha: StyleDictionary.Transform = {
|
|
13
|
-
type: `value`,
|
|
14
|
-
transitive: true,
|
|
15
|
-
matcher: isColorWithAlpha,
|
|
16
|
-
transformer: (token: StyleDictionary.TransformedToken) => {
|
|
17
|
-
// don't change if alpha is null
|
|
18
|
-
if (token.alpha === null) {
|
|
19
|
-
return toHex(getTokenValue(token))
|
|
20
|
-
}
|
|
21
|
-
return toHex(alpha(getTokenValue(token), token.alpha, token))
|
|
22
|
-
},
|
|
23
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import {toHex} from 'color2k'
|
|
2
|
-
import {isColorWithMix} from '../filters'
|
|
3
|
-
import type StyleDictionary from 'style-dictionary'
|
|
4
|
-
import {getTokenValue} from './utilities/getTokenValue'
|
|
5
|
-
import mix from './utilities/mix'
|
|
6
|
-
/**
|
|
7
|
-
* @description replaces tokens value with `hex8` color using the tokens `alpha` property to specify the value used for alpha
|
|
8
|
-
* @type value transformer — [StyleDictionary.ValueTransform](https://github.com/amzn/style-dictionary/blob/main/types/Transform.d.ts)
|
|
9
|
-
* @matcher matches all tokens of $type `color` with an `alpha` property
|
|
10
|
-
* @transformer returns `hex8` string
|
|
11
|
-
*/
|
|
12
|
-
export const colorToHexMix: StyleDictionary.Transform = {
|
|
13
|
-
type: `value`,
|
|
14
|
-
transitive: true,
|
|
15
|
-
matcher: isColorWithMix,
|
|
16
|
-
transformer: (token: StyleDictionary.TransformedToken) => {
|
|
17
|
-
return toHex(mix(getTokenValue(token), token.mix?.color || getTokenValue(token), token.mix?.weight || 0))
|
|
18
|
-
},
|
|
19
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import {isColorWithAlpha} from '../filters'
|
|
2
|
-
import {alpha} from './utilities/alpha'
|
|
3
|
-
import type StyleDictionary from 'style-dictionary'
|
|
4
|
-
import {getTokenValue} from './utilities/getTokenValue'
|
|
5
|
-
/**
|
|
6
|
-
* @description replaces tokens value with `rgba` color using the tokens `alpha` property to specify the value used for alpha
|
|
7
|
-
* @type value transformer — [StyleDictionary.ValueTransform](https://github.com/amzn/style-dictionary/blob/main/types/Transform.d.ts)
|
|
8
|
-
* @matcher matches all tokens of $type `color` with an `alpha` property
|
|
9
|
-
* @transformer returns `rgba` string
|
|
10
|
-
*/
|
|
11
|
-
export const colorToRgbAlpha: StyleDictionary.Transform = {
|
|
12
|
-
type: `value`,
|
|
13
|
-
transitive: true,
|
|
14
|
-
matcher: isColorWithAlpha,
|
|
15
|
-
transformer: (token: StyleDictionary.TransformedToken) => {
|
|
16
|
-
if (token.alpha === null) return getTokenValue(token)
|
|
17
|
-
return alpha(getTokenValue(token), token.alpha, token)
|
|
18
|
-
},
|
|
19
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import {toHex} from 'color2k'
|
|
2
|
-
import {isColor} from '../filters'
|
|
3
|
-
import type StyleDictionary from 'style-dictionary'
|
|
4
|
-
import {getTokenValue} from './utilities/getTokenValue'
|
|
5
|
-
import {rgbaFloatToHex} from './utilities/rgbaFloatToHex'
|
|
6
|
-
import mix from './utilities/mix'
|
|
7
|
-
import {hexToRgbaFloat} from './utilities/hexToRgbaFloat'
|
|
8
|
-
import {isRgbaFloat} from './utilities/isRgbaFloat'
|
|
9
|
-
|
|
10
|
-
const toRgbaFloat = (token: StyleDictionary.TransformedToken, alpha?: number) => {
|
|
11
|
-
let tokenValue = getTokenValue(token)
|
|
12
|
-
let tokenMixColor = token.mix?.color
|
|
13
|
-
// get hex value from color string
|
|
14
|
-
if (isRgbaFloat(tokenValue)) {
|
|
15
|
-
tokenValue = rgbaFloatToHex(tokenValue, false)
|
|
16
|
-
}
|
|
17
|
-
if (tokenMixColor && isRgbaFloat(tokenMixColor)) {
|
|
18
|
-
tokenMixColor = rgbaFloatToHex(tokenMixColor, false)
|
|
19
|
-
}
|
|
20
|
-
let hex = toHex(tokenValue)
|
|
21
|
-
// mix color with mix color and weight
|
|
22
|
-
if (token.mix && token.mix.color && token.mix.weight) {
|
|
23
|
-
hex = toHex(mix(tokenValue, tokenMixColor, token.mix.weight))
|
|
24
|
-
}
|
|
25
|
-
// return color as RgbaFloat
|
|
26
|
-
return hexToRgbaFloat(hex, alpha)
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* @description converts color tokens rgba float with values from 0 - 1
|
|
31
|
-
* @type value transformer — [StyleDictionary.ValueTransform](https://github.com/amzn/style-dictionary/blob/main/types/Transform.d.ts)
|
|
32
|
-
* @matcher matches all tokens of $type `color`
|
|
33
|
-
* @transformer returns a `rgb` float object
|
|
34
|
-
*/
|
|
35
|
-
export const colorToRgbaFloat: StyleDictionary.Transform = {
|
|
36
|
-
type: `value`,
|
|
37
|
-
transitive: true,
|
|
38
|
-
matcher: isColor,
|
|
39
|
-
transformer: (token: StyleDictionary.TransformedToken) => {
|
|
40
|
-
// skip if value is already rgb float
|
|
41
|
-
if (isRgbaFloat(token.value) && !('mix' in token) && !('alpha' in token)) return token.value
|
|
42
|
-
// convert hex or rgb values to rgba float
|
|
43
|
-
return toRgbaFloat(token, token.alpha)
|
|
44
|
-
},
|
|
45
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import {isDimension} from '../filters'
|
|
2
|
-
import type StyleDictionary from 'style-dictionary'
|
|
3
|
-
import type {Platform} from 'style-dictionary'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @description base font size from options or 16
|
|
7
|
-
* @param options
|
|
8
|
-
* @returns number
|
|
9
|
-
*/
|
|
10
|
-
const getBasePxFontSize = (options?: Platform): number => (options && options.basePxFontSize) || 16
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description checks if token value has a specific unit
|
|
14
|
-
* @param value token value
|
|
15
|
-
* @param unit unit string like px or value
|
|
16
|
-
* @returns boolean
|
|
17
|
-
*/
|
|
18
|
-
const hasUnit = (value: string | number, unit: string): boolean => {
|
|
19
|
-
if (typeof value === 'number') {
|
|
20
|
-
return false
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
return value.indexOf(unit) > -1
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @description converts dimension tokens value to pixel value without unit, ignores `em` as they are relative to the font size of the parent element
|
|
28
|
-
* @type value transformer — [StyleDictionary.ValueTransform](https://github.com/amzn/style-dictionary/blob/main/types/Transform.d.ts)
|
|
29
|
-
* @matcher matches all tokens of $type `dimension`
|
|
30
|
-
* @transformer returns a float number
|
|
31
|
-
*/
|
|
32
|
-
export const dimensionToPixelUnitless: StyleDictionary.Transform = {
|
|
33
|
-
type: `value`,
|
|
34
|
-
transitive: true,
|
|
35
|
-
matcher: isDimension,
|
|
36
|
-
transformer: (token: StyleDictionary.TransformedToken, options?: Platform) => {
|
|
37
|
-
const baseFont = getBasePxFontSize(options)
|
|
38
|
-
const floatVal = parseFloat(token.value)
|
|
39
|
-
|
|
40
|
-
if (isNaN(floatVal)) {
|
|
41
|
-
throw new Error(
|
|
42
|
-
`Invalid dimension token: '${token.name}: ${token.value}' is not valid and cannot be transform to 'float' \n`,
|
|
43
|
-
)
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if (floatVal === 0) {
|
|
47
|
-
return 0
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
if (hasUnit(token.value, 'rem')) {
|
|
51
|
-
return floatVal * baseFont
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
if (hasUnit(token.value, 'px')) {
|
|
55
|
-
return floatVal
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return token.value
|
|
59
|
-
},
|
|
60
|
-
}
|