@atlaskit/tokens 13.0.2 → 13.0.4
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/CHANGELOG.md +18 -0
- package/codemods/css-to-design-tokens/lib/meta.tsx +1 -1
- package/codemods/css-to-design-tokens/lib/tokens.tsx +1 -1
- package/codemods/theme-to-design-tokens/transform.tsx +16 -14
- package/codemods/theme-to-design-tokens/utils/ast-meta.tsx +2 -151
- package/codemods/theme-to-design-tokens/utils/ast.tsx +3 -35
- package/codemods/theme-to-design-tokens/utils/clean-meta.tsx +63 -0
- package/codemods/theme-to-design-tokens/utils/color.tsx +3 -11
- package/codemods/theme-to-design-tokens/utils/contains-replaceable-css-declarations.tsx +13 -0
- package/codemods/theme-to-design-tokens/utils/css-utils.tsx +2 -35
- package/codemods/theme-to-design-tokens/utils/find-end-index-of-css-expression.tsx +21 -0
- package/codemods/theme-to-design-tokens/utils/find-first-nonspace-index-after.tsx +9 -0
- package/codemods/theme-to-design-tokens/utils/get-closest-decendant-of-type.tsx +10 -0
- package/codemods/theme-to-design-tokens/utils/get-meta-from-ancestors.tsx +87 -0
- package/codemods/theme-to-design-tokens/utils/is-bold-color.tsx +4 -0
- package/codemods/theme-to-design-tokens/utils/is-decendant-of-token.tsx +14 -0
- package/codemods/theme-to-design-tokens/utils/is-legacy-color.tsx +4 -0
- package/codemods/theme-to-design-tokens/utils/is-legacy-named-color.tsx +4 -0
- package/codemods/theme-to-design-tokens/utils/is-parent-of-token.tsx +13 -0
- package/codemods/theme-to-design-tokens/utils/kebabize.tsx +2 -0
- package/codemods/theme-to-design-tokens/utils/legacy-color-meta-map.tsx +88 -0
- package/codemods/theme-to-design-tokens/utils/legacy-color-mixins.tsx +26 -0
- package/codemods/theme-to-design-tokens/utils/legacy-colors.tsx +2 -115
- package/codemods/theme-to-design-tokens/utils/split-at-index.tsx +3 -0
- package/codemods/theme-to-design-tokens/utils/string-utils.tsx +3 -16
- package/codemods/utils/active-tokens.tsx +284 -0
- package/codemods/utils/tokens.tsx +2 -376
- package/codemods/utils/unique-words-from-tokens.tsx +91 -0
- package/dist/cjs/artifacts/replacement-mapping.js +5 -2
- package/dist/cjs/artifacts/tokens-raw/atlassian-motion.js +3 -3
- package/dist/cjs/custom-theme.js +10 -60
- package/dist/cjs/entry-points/token-metadata.codegen.js +1 -10
- package/dist/cjs/get-custom-theme-styles.js +57 -0
- package/dist/cjs/get-global-theme.js +2 -2
- package/dist/cjs/get-theme-html-attrs.js +2 -2
- package/dist/cjs/get-theme-styles.js +6 -5
- package/dist/cjs/load-custom-theme-styles.js +2 -2
- package/dist/cjs/set-global-theme.js +4 -3
- package/dist/cjs/theme-color-modes.js +13 -0
- package/dist/cjs/theme-config.js +19 -16
- package/dist/cjs/theme-ids.js +13 -0
- package/dist/cjs/theme-state-transformer.js +2 -2
- package/dist/cjs/utils/color-detection.js +9 -12
- package/dist/cjs/utils/color-utils.js +38 -47
- package/dist/cjs/utils/custom-theme-loading-utils.js +7 -11
- package/dist/cjs/utils/generate-custom-color-ramp.js +16 -19
- package/dist/cjs/utils/get-alpha.js +13 -0
- package/dist/cjs/utils/get-closest-color-index.js +20 -0
- package/dist/cjs/utils/get-css-custom-property.js +32 -0
- package/dist/cjs/utils/get-fully-qualified-token-id.js +19 -0
- package/dist/cjs/utils/get-theme-override-preferences.js +12 -0
- package/dist/cjs/utils/get-theme-preferences.js +8 -5
- package/dist/cjs/utils/get-token-id.js +26 -0
- package/dist/cjs/utils/hct-color-utils/argb-from-rgb.js +12 -0
- package/dist/cjs/utils/hct-color-utils/clamp-double.js +20 -0
- package/dist/cjs/utils/hct-color-utils/clamp-int.js +20 -0
- package/dist/cjs/utils/hct-color-utils/color-utils.js +34 -59
- package/dist/cjs/utils/hct-color-utils/delinearized.js +27 -0
- package/dist/cjs/utils/hct-color-utils/hct.js +19 -95
- package/dist/cjs/utils/hct-color-utils/lerp.js +14 -0
- package/dist/cjs/utils/hct-color-utils/linearized.js +22 -0
- package/dist/cjs/utils/hct-color-utils/math-utils.js +38 -107
- package/dist/cjs/utils/hct-color-utils/matrix-multiply.js +15 -0
- package/dist/cjs/utils/hct-color-utils/sanitize-degrees-double.js +19 -0
- package/dist/cjs/utils/hct-color-utils/signum.js +20 -0
- package/dist/cjs/utils/hct-color-utils/viewing-conditions.js +98 -0
- package/dist/cjs/utils/hex-to-rgba-values.js +15 -0
- package/dist/cjs/utils/hsl-to-rgb.js +18 -0
- package/dist/cjs/utils/is-valid-brand-hex.js +9 -0
- package/dist/cjs/utils/limit-size-of-custom-style-elements.js +16 -0
- package/dist/cjs/utils/load-theme-css.js +32 -0
- package/dist/cjs/utils/relative-luminance-w3-c.js +18 -0
- package/dist/cjs/utils/rgb-to-hex.js +9 -0
- package/dist/cjs/utils/theme-loading.js +10 -25
- package/dist/cjs/utils/token-ids.js +21 -62
- package/dist/es2019/artifacts/replacement-mapping.js +5 -2
- package/dist/es2019/artifacts/tokens-raw/atlassian-motion.js +3 -3
- package/dist/es2019/custom-theme.js +4 -66
- package/dist/es2019/entry-points/token-metadata.codegen.js +1 -10
- package/dist/es2019/get-custom-theme-styles.js +60 -0
- package/dist/es2019/get-global-theme.js +1 -1
- package/dist/es2019/get-theme-html-attrs.js +1 -1
- package/dist/es2019/get-theme-styles.js +4 -3
- package/dist/es2019/load-custom-theme-styles.js +1 -1
- package/dist/es2019/set-global-theme.js +3 -2
- package/dist/es2019/theme-color-modes.js +7 -0
- package/dist/es2019/theme-config.js +4 -16
- package/dist/es2019/theme-ids.js +7 -0
- package/dist/es2019/theme-state-transformer.js +1 -1
- package/dist/es2019/utils/color-detection.js +3 -11
- package/dist/es2019/utils/color-utils.js +8 -34
- package/dist/es2019/utils/custom-theme-loading-utils.js +2 -8
- package/dist/es2019/utils/generate-custom-color-ramp.js +7 -15
- package/dist/es2019/utils/get-alpha.js +7 -0
- package/dist/es2019/utils/get-closest-color-index.js +14 -0
- package/dist/es2019/utils/get-css-custom-property.js +23 -0
- package/dist/es2019/utils/get-fully-qualified-token-id.js +11 -0
- package/dist/es2019/utils/get-theme-override-preferences.js +4 -0
- package/dist/es2019/utils/get-theme-preferences.js +1 -4
- package/dist/es2019/utils/get-token-id.js +18 -0
- package/dist/es2019/utils/hct-color-utils/argb-from-rgb.js +6 -0
- package/dist/es2019/utils/hct-color-utils/clamp-double.js +14 -0
- package/dist/es2019/utils/hct-color-utils/clamp-int.js +14 -0
- package/dist/es2019/utils/hct-color-utils/color-utils.js +7 -45
- package/dist/es2019/utils/hct-color-utils/delinearized.js +20 -0
- package/dist/es2019/utils/hct-color-utils/hct.js +3 -76
- package/dist/es2019/utils/hct-color-utils/lerp.js +8 -0
- package/dist/es2019/utils/hct-color-utils/linearized.js +16 -0
- package/dist/es2019/utils/hct-color-utils/math-utils.js +6 -105
- package/dist/es2019/utils/hct-color-utils/matrix-multiply.js +9 -0
- package/dist/es2019/utils/hct-color-utils/sanitize-degrees-double.js +13 -0
- package/dist/es2019/utils/hct-color-utils/signum.js +14 -0
- package/dist/es2019/utils/hct-color-utils/viewing-conditions.js +78 -0
- package/dist/es2019/utils/hex-to-rgba-values.js +9 -0
- package/dist/es2019/utils/hsl-to-rgb.js +8 -0
- package/dist/es2019/utils/is-valid-brand-hex.js +1 -0
- package/dist/es2019/utils/limit-size-of-custom-style-elements.js +8 -0
- package/dist/es2019/utils/load-theme-css.js +7 -0
- package/dist/es2019/utils/relative-luminance-w3-c.js +12 -0
- package/dist/es2019/utils/rgb-to-hex.js +3 -0
- package/dist/es2019/utils/theme-loading.js +3 -8
- package/dist/es2019/utils/token-ids.js +3 -54
- package/dist/esm/artifacts/replacement-mapping.js +5 -2
- package/dist/esm/artifacts/tokens-raw/atlassian-motion.js +3 -3
- package/dist/esm/custom-theme.js +4 -58
- package/dist/esm/entry-points/token-metadata.codegen.js +1 -10
- package/dist/esm/get-custom-theme-styles.js +52 -0
- package/dist/esm/get-global-theme.js +1 -1
- package/dist/esm/get-theme-html-attrs.js +1 -1
- package/dist/esm/get-theme-styles.js +4 -3
- package/dist/esm/load-custom-theme-styles.js +1 -1
- package/dist/esm/set-global-theme.js +3 -2
- package/dist/esm/theme-color-modes.js +7 -0
- package/dist/esm/theme-config.js +6 -17
- package/dist/esm/theme-ids.js +7 -0
- package/dist/esm/theme-state-transformer.js +1 -1
- package/dist/esm/utils/color-detection.js +3 -11
- package/dist/esm/utils/color-utils.js +8 -40
- package/dist/esm/utils/custom-theme-loading-utils.js +2 -11
- package/dist/esm/utils/generate-custom-color-ramp.js +7 -15
- package/dist/esm/utils/get-alpha.js +7 -0
- package/dist/esm/utils/get-closest-color-index.js +14 -0
- package/dist/esm/utils/get-css-custom-property.js +26 -0
- package/dist/esm/utils/get-fully-qualified-token-id.js +13 -0
- package/dist/esm/utils/get-theme-override-preferences.js +5 -0
- package/dist/esm/utils/get-theme-preferences.js +1 -4
- package/dist/esm/utils/get-token-id.js +20 -0
- package/dist/esm/utils/hct-color-utils/argb-from-rgb.js +6 -0
- package/dist/esm/utils/hct-color-utils/clamp-double.js +14 -0
- package/dist/esm/utils/hct-color-utils/clamp-int.js +14 -0
- package/dist/esm/utils/hct-color-utils/color-utils.js +7 -45
- package/dist/esm/utils/hct-color-utils/delinearized.js +20 -0
- package/dist/esm/utils/hct-color-utils/hct.js +5 -87
- package/dist/esm/utils/hct-color-utils/lerp.js +8 -0
- package/dist/esm/utils/hct-color-utils/linearized.js +16 -0
- package/dist/esm/utils/hct-color-utils/math-utils.js +6 -105
- package/dist/esm/utils/hct-color-utils/matrix-multiply.js +9 -0
- package/dist/esm/utils/hct-color-utils/sanitize-degrees-double.js +13 -0
- package/dist/esm/utils/hct-color-utils/signum.js +14 -0
- package/dist/esm/utils/hct-color-utils/viewing-conditions.js +89 -0
- package/dist/esm/utils/hex-to-rgba-values.js +9 -0
- package/dist/esm/utils/hsl-to-rgb.js +12 -0
- package/dist/esm/utils/is-valid-brand-hex.js +3 -0
- package/dist/esm/utils/limit-size-of-custom-style-elements.js +10 -0
- package/dist/esm/utils/load-theme-css.js +25 -0
- package/dist/esm/utils/relative-luminance-w3-c.js +12 -0
- package/dist/esm/utils/rgb-to-hex.js +3 -0
- package/dist/esm/utils/theme-loading.js +3 -24
- package/dist/esm/utils/token-ids.js +3 -61
- package/dist/types/artifacts/replacement-mapping.d.ts +1 -1
- package/dist/types/artifacts/tokens-raw/atlassian-motion.d.ts +1 -1
- package/dist/types/artifacts/types-internal.d.ts +2 -2
- package/dist/types/artifacts/types.d.ts +2 -2
- package/dist/types/custom-theme.d.ts +1 -20
- package/dist/types/entry-points/css-type-schema.codegen.d.ts +2 -2
- package/dist/types/entry-points/token-metadata.codegen.d.ts +1 -1
- package/dist/types/get-custom-theme-styles.d.ts +16 -0
- package/dist/types/get-global-theme.d.ts +1 -1
- package/dist/types/theme-color-modes.d.ts +7 -0
- package/dist/types/theme-config.d.ts +4 -14
- package/dist/types/theme-ids.d.ts +7 -0
- package/dist/types/theme-state-transformer.d.ts +1 -1
- package/dist/types/utils/color-detection.d.ts +1 -6
- package/dist/types/utils/color-utils.d.ts +5 -5
- package/dist/types/utils/custom-theme-loading-utils.d.ts +1 -2
- package/dist/types/utils/generate-custom-color-ramp.d.ts +1 -2
- package/dist/types/utils/get-alpha.d.ts +1 -0
- package/dist/types/utils/get-closest-color-index.d.ts +2 -0
- package/dist/types/utils/get-css-custom-property.d.ts +15 -0
- package/dist/types/utils/get-fully-qualified-token-id.d.ts +11 -0
- package/dist/types/utils/get-theme-override-preferences.d.ts +2 -0
- package/dist/types/utils/get-theme-preferences.d.ts +1 -1
- package/dist/types/utils/get-token-id.d.ts +15 -0
- package/dist/types/utils/hct-color-utils/argb-from-rgb.d.ts +4 -0
- package/dist/types/utils/hct-color-utils/clamp-double.d.ts +7 -0
- package/dist/types/utils/hct-color-utils/clamp-int.d.ts +7 -0
- package/dist/types/utils/hct-color-utils/color-utils.d.ts +3 -23
- package/dist/types/utils/hct-color-utils/delinearized.d.ts +9 -0
- package/dist/types/utils/hct-color-utils/hct.d.ts +3 -48
- package/dist/types/utils/hct-color-utils/lerp.d.ts +6 -0
- package/dist/types/utils/hct-color-utils/linearized.d.ts +9 -0
- package/dist/types/utils/hct-color-utils/math-utils.d.ts +6 -60
- package/dist/types/utils/hct-color-utils/matrix-multiply.d.ts +4 -0
- package/dist/types/utils/hct-color-utils/sanitize-degrees-double.d.ts +7 -0
- package/dist/types/utils/hct-color-utils/signum.d.ts +6 -0
- package/dist/types/utils/hct-color-utils/viewing-conditions.d.ts +47 -0
- package/dist/types/utils/hex-to-rgba-values.d.ts +6 -0
- package/dist/types/utils/hsl-to-rgb.d.ts +1 -0
- package/dist/types/utils/is-valid-brand-hex.d.ts +1 -0
- package/dist/types/utils/limit-size-of-custom-style-elements.d.ts +1 -0
- package/dist/types/utils/load-theme-css.d.ts +2 -0
- package/dist/types/utils/relative-luminance-w3-c.d.ts +1 -0
- package/dist/types/utils/rgb-to-hex.d.ts +1 -0
- package/dist/types/utils/theme-loading.d.ts +1 -1
- package/dist/types/utils/token-ids.d.ts +3 -41
- package/dist/types-ts4.5/artifacts/replacement-mapping.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-motion.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/types-internal.d.ts +2 -2
- package/dist/types-ts4.5/artifacts/types.d.ts +2 -2
- package/dist/types-ts4.5/custom-theme.d.ts +1 -20
- package/dist/types-ts4.5/entry-points/css-type-schema.codegen.d.ts +2 -2
- package/dist/types-ts4.5/entry-points/token-metadata.codegen.d.ts +1 -1
- package/dist/types-ts4.5/get-custom-theme-styles.d.ts +16 -0
- package/dist/types-ts4.5/get-global-theme.d.ts +1 -1
- package/dist/types-ts4.5/theme-color-modes.d.ts +11 -0
- package/dist/types-ts4.5/theme-config.d.ts +4 -29
- package/dist/types-ts4.5/theme-ids.d.ts +18 -0
- package/dist/types-ts4.5/theme-state-transformer.d.ts +1 -1
- package/dist/types-ts4.5/utils/color-detection.d.ts +1 -6
- package/dist/types-ts4.5/utils/color-utils.d.ts +5 -9
- package/dist/types-ts4.5/utils/custom-theme-loading-utils.d.ts +1 -2
- package/dist/types-ts4.5/utils/generate-custom-color-ramp.d.ts +1 -2
- package/dist/types-ts4.5/utils/get-alpha.d.ts +1 -0
- package/dist/types-ts4.5/utils/get-closest-color-index.d.ts +2 -0
- package/dist/types-ts4.5/utils/get-css-custom-property.d.ts +15 -0
- package/dist/types-ts4.5/utils/get-fully-qualified-token-id.d.ts +11 -0
- package/dist/types-ts4.5/utils/get-theme-override-preferences.d.ts +2 -0
- package/dist/types-ts4.5/utils/get-theme-preferences.d.ts +1 -1
- package/dist/types-ts4.5/utils/get-token-id.d.ts +15 -0
- package/dist/types-ts4.5/utils/hct-color-utils/argb-from-rgb.d.ts +4 -0
- package/dist/types-ts4.5/utils/hct-color-utils/clamp-double.d.ts +7 -0
- package/dist/types-ts4.5/utils/hct-color-utils/clamp-int.d.ts +7 -0
- package/dist/types-ts4.5/utils/hct-color-utils/color-utils.d.ts +3 -23
- package/dist/types-ts4.5/utils/hct-color-utils/delinearized.d.ts +9 -0
- package/dist/types-ts4.5/utils/hct-color-utils/hct.d.ts +3 -48
- package/dist/types-ts4.5/utils/hct-color-utils/lerp.d.ts +6 -0
- package/dist/types-ts4.5/utils/hct-color-utils/linearized.d.ts +9 -0
- package/dist/types-ts4.5/utils/hct-color-utils/math-utils.d.ts +6 -60
- package/dist/types-ts4.5/utils/hct-color-utils/matrix-multiply.d.ts +4 -0
- package/dist/types-ts4.5/utils/hct-color-utils/sanitize-degrees-double.d.ts +7 -0
- package/dist/types-ts4.5/utils/hct-color-utils/signum.d.ts +6 -0
- package/dist/types-ts4.5/utils/hct-color-utils/viewing-conditions.d.ts +47 -0
- package/dist/types-ts4.5/utils/hex-to-rgba-values.d.ts +6 -0
- package/dist/types-ts4.5/utils/hsl-to-rgb.d.ts +5 -0
- package/dist/types-ts4.5/utils/is-valid-brand-hex.d.ts +1 -0
- package/dist/types-ts4.5/utils/limit-size-of-custom-style-elements.d.ts +1 -0
- package/dist/types-ts4.5/utils/load-theme-css.d.ts +2 -0
- package/dist/types-ts4.5/utils/relative-luminance-w3-c.d.ts +1 -0
- package/dist/types-ts4.5/utils/rgb-to-hex.d.ts +1 -0
- package/dist/types-ts4.5/utils/theme-loading.d.ts +1 -1
- package/dist/types-ts4.5/utils/token-ids.d.ts +3 -41
- package/package.json +7 -7
- package/offerings.json +0 -44
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::f47a2823b72e16da1663ec36c027bf22>>
|
|
4
4
|
* @codegenCommand yarn build tokens
|
|
5
5
|
*/
|
|
6
|
-
export type ActiveTokens = 'motion.avatar.enter' | 'motion.avatar.exit' | 'motion.avatar.hovered' | 'motion.blanket.enter' | 'motion.blanket.exit' | 'motion.duration.instant' | 'motion.duration.long' | 'motion.duration.medium' | 'motion.duration.short' | 'motion.duration.xlong' | 'motion.duration.xshort' | 'motion.duration.xxlong' | 'motion.duration.xxshort' | 'motion.easing.in.practical' | 'motion.easing.inout.bold' | 'motion.easing.out.practical' | 'motion.easing.out.bold' | 'motion.easing.spring' | 'motion.flag.enter' | 'motion.flag.exit' | 'motion.flag.reposition' | 'motion.keyframe.fade.in' | 'motion.keyframe.fade.out' | 'motion.keyframe.scale.in.medium' | 'motion.keyframe.scale.in.small' | 'motion.keyframe.scale.out.medium' | 'motion.keyframe.scale.out.small' | 'motion.keyframe.slide.in.bottom.short' | 'motion.keyframe.slide.in.left.half' | 'motion.keyframe.slide.in.left.short' | 'motion.keyframe.slide.in.right.short' | 'motion.keyframe.slide.in.top.short' | 'motion.keyframe.slide.out.bottom.short' | 'motion.keyframe.slide.out.left.half' | 'motion.keyframe.slide.out.left.short' | 'motion.keyframe.slide.out.right.short' | 'motion.keyframe.slide.out.top.short' | 'motion.modal.enter' | 'motion.modal.exit' | 'motion.popup.enter.bottom' | 'motion.popup.enter.left' | 'motion.popup.enter.right' | 'motion.popup.enter.top' | 'motion.popup.exit.bottom' | 'motion.popup.exit.left' | 'motion.popup.exit.right' | 'motion.popup.exit.top' | 'motion.spotlight.enter' | 'motion.spotlight.exit' | 'color.text' | 'color.text.accent.lime' | 'color.text.accent.lime.bolder' | 'color.text.accent.red' | 'color.text.accent.red.bolder' | 'color.text.accent.orange' | 'color.text.accent.orange.bolder' | 'color.text.accent.yellow' | 'color.text.accent.yellow.bolder' | 'color.text.accent.green' | 'color.text.accent.green.bolder' | 'color.text.accent.teal' | 'color.text.accent.teal.bolder' | 'color.text.accent.blue' | 'color.text.accent.blue.bolder' | 'color.text.accent.purple' | 'color.text.accent.purple.bolder' | 'color.text.accent.magenta' | 'color.text.accent.magenta.bolder' | 'color.text.accent.gray' | 'color.text.accent.gray.bolder' | 'color.text.disabled' | 'color.text.inverse' | 'color.text.selected' | 'color.text.brand' | 'color.text.danger' | 'color.text.danger.bolder' | 'color.text.warning' | 'color.text.warning.inverse' | 'color.text.warning.bolder' | 'color.text.success' | 'color.text.success.bolder' | 'color.text.discovery' | 'color.text.discovery.bolder' | 'color.text.information' | 'color.text.information.bolder' | 'color.text.subtlest' | 'color.text.subtle' | 'color.link' | 'color.link.pressed' | 'color.link.visited' | 'color.link.visited.pressed' | 'color.icon' | 'color.icon.accent.lime' | 'color.icon.accent.red' | 'color.icon.accent.orange' | 'color.icon.accent.yellow' | 'color.icon.accent.green' | 'color.icon.accent.teal' | 'color.icon.accent.blue' | 'color.icon.accent.purple' | 'color.icon.accent.magenta' | 'color.icon.accent.gray' | 'color.icon.disabled' | 'color.icon.inverse' | 'color.icon.selected' | 'color.icon.brand' | 'color.icon.danger' | 'color.icon.warning' | 'color.icon.warning.inverse' | 'color.icon.success' | 'color.icon.discovery' | 'color.icon.information' | 'color.icon.subtlest' | 'color.icon.subtle' | 'color.border' | 'color.border.accent.lime' | 'color.border.accent.red' | 'color.border.accent.orange' | 'color.border.accent.yellow' | 'color.border.accent.green' | 'color.border.accent.teal' | 'color.border.accent.blue' | 'color.border.accent.purple' | 'color.border.accent.magenta' | 'color.border.accent.gray' | 'color.border.disabled' | 'color.border.focused' | 'color.border.input' | 'color.border.inverse' | 'color.border.selected' | 'color.border.brand' | 'color.border.danger' | 'color.border.warning' | 'color.border.success' | 'color.border.discovery' | 'color.border.information' | 'color.border.bold' | 'color.background.accent.lime.subtlest' | 'color.background.accent.lime.subtlest.hovered' | 'color.background.accent.lime.subtlest.pressed' | 'color.background.accent.lime.subtler' | 'color.background.accent.lime.subtler.hovered' | 'color.background.accent.lime.subtler.pressed' | 'color.background.accent.lime.subtle' | 'color.background.accent.lime.subtle.hovered' | 'color.background.accent.lime.subtle.pressed' | 'color.background.accent.lime.bolder' | 'color.background.accent.lime.bolder.hovered' | 'color.background.accent.lime.bolder.pressed' | 'color.background.accent.red.subtlest' | 'color.background.accent.red.subtlest.hovered' | 'color.background.accent.red.subtlest.pressed' | 'color.background.accent.red.subtler' | 'color.background.accent.red.subtler.hovered' | 'color.background.accent.red.subtler.pressed' | 'color.background.accent.red.subtle' | 'color.background.accent.red.subtle.hovered' | 'color.background.accent.red.subtle.pressed' | 'color.background.accent.red.bolder' | 'color.background.accent.red.bolder.hovered' | 'color.background.accent.red.bolder.pressed' | 'color.background.accent.orange.subtlest' | 'color.background.accent.orange.subtlest.hovered' | 'color.background.accent.orange.subtlest.pressed' | 'color.background.accent.orange.subtler' | 'color.background.accent.orange.subtler.hovered' | 'color.background.accent.orange.subtler.pressed' | 'color.background.accent.orange.subtle' | 'color.background.accent.orange.subtle.hovered' | 'color.background.accent.orange.subtle.pressed' | 'color.background.accent.orange.bolder' | 'color.background.accent.orange.bolder.hovered' | 'color.background.accent.orange.bolder.pressed' | 'color.background.accent.yellow.subtlest' | 'color.background.accent.yellow.subtlest.hovered' | 'color.background.accent.yellow.subtlest.pressed' | 'color.background.accent.yellow.subtler' | 'color.background.accent.yellow.subtler.hovered' | 'color.background.accent.yellow.subtler.pressed' | 'color.background.accent.yellow.subtle' | 'color.background.accent.yellow.subtle.hovered' | 'color.background.accent.yellow.subtle.pressed' | 'color.background.accent.yellow.bolder' | 'color.background.accent.yellow.bolder.hovered' | 'color.background.accent.yellow.bolder.pressed' | 'color.background.accent.green.subtlest' | 'color.background.accent.green.subtlest.hovered' | 'color.background.accent.green.subtlest.pressed' | 'color.background.accent.green.subtler' | 'color.background.accent.green.subtler.hovered' | 'color.background.accent.green.subtler.pressed' | 'color.background.accent.green.subtle' | 'color.background.accent.green.subtle.hovered' | 'color.background.accent.green.subtle.pressed' | 'color.background.accent.green.bolder' | 'color.background.accent.green.bolder.hovered' | 'color.background.accent.green.bolder.pressed' | 'color.background.accent.teal.subtlest' | 'color.background.accent.teal.subtlest.hovered' | 'color.background.accent.teal.subtlest.pressed' | 'color.background.accent.teal.subtler' | 'color.background.accent.teal.subtler.hovered' | 'color.background.accent.teal.subtler.pressed' | 'color.background.accent.teal.subtle' | 'color.background.accent.teal.subtle.hovered' | 'color.background.accent.teal.subtle.pressed' | 'color.background.accent.teal.bolder' | 'color.background.accent.teal.bolder.hovered' | 'color.background.accent.teal.bolder.pressed' | 'color.background.accent.blue.subtlest' | 'color.background.accent.blue.subtlest.hovered' | 'color.background.accent.blue.subtlest.pressed' | 'color.background.accent.blue.subtler' | 'color.background.accent.blue.subtler.hovered' | 'color.background.accent.blue.subtler.pressed' | 'color.background.accent.blue.subtle' | 'color.background.accent.blue.subtle.hovered' | 'color.background.accent.blue.subtle.pressed' | 'color.background.accent.blue.bolder' | 'color.background.accent.blue.bolder.hovered' | 'color.background.accent.blue.bolder.pressed' | 'color.background.accent.purple.subtlest' | 'color.background.accent.purple.subtlest.hovered' | 'color.background.accent.purple.subtlest.pressed' | 'color.background.accent.purple.subtler' | 'color.background.accent.purple.subtler.hovered' | 'color.background.accent.purple.subtler.pressed' | 'color.background.accent.purple.subtle' | 'color.background.accent.purple.subtle.hovered' | 'color.background.accent.purple.subtle.pressed' | 'color.background.accent.purple.bolder' | 'color.background.accent.purple.bolder.hovered' | 'color.background.accent.purple.bolder.pressed' | 'color.background.accent.magenta.subtlest' | 'color.background.accent.magenta.subtlest.hovered' | 'color.background.accent.magenta.subtlest.pressed' | 'color.background.accent.magenta.subtler' | 'color.background.accent.magenta.subtler.hovered' | 'color.background.accent.magenta.subtler.pressed' | 'color.background.accent.magenta.subtle' | 'color.background.accent.magenta.subtle.hovered' | 'color.background.accent.magenta.subtle.pressed' | 'color.background.accent.magenta.bolder' | 'color.background.accent.magenta.bolder.hovered' | 'color.background.accent.magenta.bolder.pressed' | 'color.background.accent.gray.subtlest' | 'color.background.accent.gray.subtlest.hovered' | 'color.background.accent.gray.subtlest.pressed' | 'color.background.accent.gray.subtler' | 'color.background.accent.gray.subtler.hovered' | 'color.background.accent.gray.subtler.pressed' | 'color.background.accent.gray.subtle' | 'color.background.accent.gray.subtle.hovered' | 'color.background.accent.gray.subtle.pressed' | 'color.background.accent.gray.bolder' | 'color.background.accent.gray.bolder.hovered' | 'color.background.accent.gray.bolder.pressed' | 'color.background.disabled' | 'color.background.input' | 'color.background.input.hovered' | 'color.background.input.pressed' | 'color.background.inverse.subtle' | 'color.background.inverse.subtle.hovered' | 'color.background.inverse.subtle.pressed' | 'color.background.neutral' | 'color.background.neutral.hovered' | 'color.background.neutral.pressed' | 'color.background.neutral.subtle' | 'color.background.neutral.subtle.hovered' | 'color.background.neutral.subtle.pressed' | 'color.background.neutral.bold' | 'color.background.neutral.bold.hovered' | 'color.background.neutral.bold.pressed' | 'color.background.selected' | 'color.background.selected.hovered' | 'color.background.selected.pressed' | 'color.background.selected.bold' | 'color.background.selected.bold.hovered' | 'color.background.selected.bold.pressed' | 'color.background.brand.subtlest' | 'color.background.brand.subtlest.hovered' | 'color.background.brand.subtlest.pressed' | 'color.background.brand.bold' | 'color.background.brand.bold.hovered' | 'color.background.brand.bold.pressed' | 'color.background.brand.boldest' | 'color.background.brand.boldest.hovered' | 'color.background.brand.boldest.pressed' | 'color.background.danger' | 'color.background.danger.hovered' | 'color.background.danger.pressed' | 'color.background.danger.subtler' | 'color.background.danger.subtler.hovered' | 'color.background.danger.subtler.pressed' | 'color.background.danger.bold' | 'color.background.danger.bold.hovered' | 'color.background.danger.bold.pressed' | 'color.background.warning' | 'color.background.warning.hovered' | 'color.background.warning.pressed' | 'color.background.warning.subtler' | 'color.background.warning.subtler.hovered' | 'color.background.warning.subtler.pressed' | 'color.background.warning.bold' | 'color.background.warning.bold.hovered' | 'color.background.warning.bold.pressed' | 'color.background.success' | 'color.background.success.hovered' | 'color.background.success.pressed' | 'color.background.success.subtler' | 'color.background.success.subtler.hovered' | 'color.background.success.subtler.pressed' | 'color.background.success.bold' | 'color.background.success.bold.hovered' | 'color.background.success.bold.pressed' | 'color.background.discovery' | 'color.background.discovery.hovered' | 'color.background.discovery.pressed' | 'color.background.discovery.subtler' | 'color.background.discovery.subtler.hovered' | 'color.background.discovery.subtler.pressed' | 'color.background.discovery.bold' | 'color.background.discovery.bold.hovered' | 'color.background.discovery.bold.pressed' | 'color.background.information' | 'color.background.information.hovered' | 'color.background.information.pressed' | 'color.background.information.subtler' | 'color.background.information.subtler.hovered' | 'color.background.information.subtler.pressed' | 'color.background.information.bold' | 'color.background.information.bold.hovered' | 'color.background.information.bold.pressed' | 'color.blanket' | 'color.blanket.selected' | 'color.blanket.danger' | 'color.interaction.hovered' | 'color.interaction.pressed' | 'color.skeleton' | 'color.skeleton.subtle' | 'color.chart.categorical.1' | 'color.chart.categorical.1.hovered' | 'color.chart.categorical.2' | 'color.chart.categorical.2.hovered' | 'color.chart.categorical.3' | 'color.chart.categorical.3.hovered' | 'color.chart.categorical.4' | 'color.chart.categorical.4.hovered' | 'color.chart.categorical.5' | 'color.chart.categorical.5.hovered' | 'color.chart.categorical.6' | 'color.chart.categorical.6.hovered' | 'color.chart.categorical.7' | 'color.chart.categorical.7.hovered' | 'color.chart.categorical.8' | 'color.chart.categorical.8.hovered' | 'color.chart.lime.bold' | 'color.chart.lime.bold.hovered' | 'color.chart.lime.bolder' | 'color.chart.lime.bolder.hovered' | 'color.chart.lime.boldest' | 'color.chart.lime.boldest.hovered' | 'color.chart.neutral' | 'color.chart.neutral.hovered' | 'color.chart.red.bold' | 'color.chart.red.bold.hovered' | 'color.chart.red.bolder' | 'color.chart.red.bolder.hovered' | 'color.chart.red.boldest' | 'color.chart.red.boldest.hovered' | 'color.chart.orange.bold' | 'color.chart.orange.bold.hovered' | 'color.chart.orange.bolder' | 'color.chart.orange.bolder.hovered' | 'color.chart.orange.boldest' | 'color.chart.orange.boldest.hovered' | 'color.chart.yellow.bold' | 'color.chart.yellow.bold.hovered' | 'color.chart.yellow.bolder' | 'color.chart.yellow.bolder.hovered' | 'color.chart.yellow.boldest' | 'color.chart.yellow.boldest.hovered' | 'color.chart.green.bold' | 'color.chart.green.bold.hovered' | 'color.chart.green.bolder' | 'color.chart.green.bolder.hovered' | 'color.chart.green.boldest' | 'color.chart.green.boldest.hovered' | 'color.chart.teal.bold' | 'color.chart.teal.bold.hovered' | 'color.chart.teal.bolder' | 'color.chart.teal.bolder.hovered' | 'color.chart.teal.boldest' | 'color.chart.teal.boldest.hovered' | 'color.chart.blue.bold' | 'color.chart.blue.bold.hovered' | 'color.chart.blue.bolder' | 'color.chart.blue.bolder.hovered' | 'color.chart.blue.boldest' | 'color.chart.blue.boldest.hovered' | 'color.chart.purple.bold' | 'color.chart.purple.bold.hovered' | 'color.chart.purple.bolder' | 'color.chart.purple.bolder.hovered' | 'color.chart.purple.boldest' | 'color.chart.purple.boldest.hovered' | 'color.chart.magenta.bold' | 'color.chart.magenta.bold.hovered' | 'color.chart.magenta.bolder' | 'color.chart.magenta.bolder.hovered' | 'color.chart.magenta.boldest' | 'color.chart.magenta.boldest.hovered' | 'color.chart.gray.bold' | 'color.chart.gray.bold.hovered' | 'color.chart.gray.bolder' | 'color.chart.gray.bolder.hovered' | 'color.chart.gray.boldest' | 'color.chart.gray.boldest.hovered' | 'color.chart.brand' | 'color.chart.brand.hovered' | 'color.chart.danger' | 'color.chart.danger.hovered' | 'color.chart.danger.bold' | 'color.chart.danger.bold.hovered' | 'color.chart.warning' | 'color.chart.warning.hovered' | 'color.chart.warning.bold' | 'color.chart.warning.bold.hovered' | 'color.chart.success' | 'color.chart.success.hovered' | 'color.chart.success.bold' | 'color.chart.success.bold.hovered' | 'color.chart.discovery' | 'color.chart.discovery.hovered' | 'color.chart.discovery.bold' | 'color.chart.discovery.bold.hovered' | 'color.chart.information' | 'color.chart.information.hovered' | 'color.chart.information.bold' | 'color.chart.information.bold.hovered' | 'elevation.surface' | 'elevation.surface.hovered' | 'elevation.surface.pressed' | 'elevation.surface.overlay' | 'elevation.surface.overlay.hovered' | 'elevation.surface.overlay.pressed' | 'elevation.surface.raised' | 'elevation.surface.raised.hovered' | 'elevation.surface.raised.pressed' | 'elevation.surface.sunken' | 'elevation.shadow.overflow' | 'elevation.shadow.overflow.perimeter' | 'elevation.shadow.overflow.spread' | 'elevation.shadow.overlay' | 'elevation.shadow.raised' | 'opacity.disabled' | 'opacity.loading' | 'utility.UNSAFE.transparent' | 'utility.elevation.surface.current' | 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800' | 'space.1000' | 'space.negative.025' | 'space.negative.050' | 'space.negative.075' | 'space.negative.100' | 'space.negative.150' | 'space.negative.200' | 'space.negative.250' | 'space.negative.300' | 'space.negative.400' | 'font.heading.xxlarge' | 'font.heading.xlarge' | 'font.heading.large' | 'font.heading.medium' | 'font.heading.small' | 'font.heading.xsmall' | 'font.heading.xxsmall' | 'font.body.large' | 'font.body' | 'font.body.small' | 'font.metric.large' | 'font.metric.medium' | 'font.metric.small' | 'font.code' | 'font.weight.regular' | 'font.weight.medium' | 'font.weight.semibold' | 'font.weight.bold' | 'font.family.heading' | 'font.family.body' | 'font.family.code' | 'font.family.brand.heading' | 'font.family.brand.body' | 'radius.xsmall' | 'radius.small' | 'radius.medium' | 'radius.large' | 'radius.xlarge' | 'radius.xxlarge' | 'radius.full' | 'radius.tile' | 'border.width' | 'border.width.selected' | 'border.width.focused';
|
|
6
|
+
export type ActiveTokens = 'motion.avatar.enter' | 'motion.avatar.exit' | 'motion.avatar.hovered' | 'motion.blanket.enter' | 'motion.blanket.exit' | 'motion.duration.instant' | 'motion.duration.long' | 'motion.duration.medium' | 'motion.duration.short' | 'motion.duration.xlong' | 'motion.duration.xshort' | 'motion.duration.xxlong' | 'motion.duration.xxshort' | 'motion.easing.in.practical' | 'motion.easing.inout.bold' | 'motion.easing.out.practical' | 'motion.easing.out.bold' | 'motion.flag.enter' | 'motion.flag.exit' | 'motion.flag.reposition' | 'motion.keyframe.fade.in' | 'motion.keyframe.fade.out' | 'motion.keyframe.scale.in.medium' | 'motion.keyframe.scale.in.small' | 'motion.keyframe.scale.out.medium' | 'motion.keyframe.scale.out.small' | 'motion.keyframe.slide.in.bottom.short' | 'motion.keyframe.slide.in.left.half' | 'motion.keyframe.slide.in.left.short' | 'motion.keyframe.slide.in.right.short' | 'motion.keyframe.slide.in.top.short' | 'motion.keyframe.slide.out.bottom.short' | 'motion.keyframe.slide.out.left.half' | 'motion.keyframe.slide.out.left.short' | 'motion.keyframe.slide.out.right.short' | 'motion.keyframe.slide.out.top.short' | 'motion.modal.enter' | 'motion.modal.exit' | 'motion.popup.enter.bottom' | 'motion.popup.enter.left' | 'motion.popup.enter.right' | 'motion.popup.enter.top' | 'motion.popup.exit.bottom' | 'motion.popup.exit.left' | 'motion.popup.exit.right' | 'motion.popup.exit.top' | 'motion.spotlight.enter' | 'motion.spotlight.exit' | 'color.text' | 'color.text.accent.lime' | 'color.text.accent.lime.bolder' | 'color.text.accent.red' | 'color.text.accent.red.bolder' | 'color.text.accent.orange' | 'color.text.accent.orange.bolder' | 'color.text.accent.yellow' | 'color.text.accent.yellow.bolder' | 'color.text.accent.green' | 'color.text.accent.green.bolder' | 'color.text.accent.teal' | 'color.text.accent.teal.bolder' | 'color.text.accent.blue' | 'color.text.accent.blue.bolder' | 'color.text.accent.purple' | 'color.text.accent.purple.bolder' | 'color.text.accent.magenta' | 'color.text.accent.magenta.bolder' | 'color.text.accent.gray' | 'color.text.accent.gray.bolder' | 'color.text.disabled' | 'color.text.inverse' | 'color.text.selected' | 'color.text.brand' | 'color.text.danger' | 'color.text.danger.bolder' | 'color.text.warning' | 'color.text.warning.inverse' | 'color.text.warning.bolder' | 'color.text.success' | 'color.text.success.bolder' | 'color.text.discovery' | 'color.text.discovery.bolder' | 'color.text.information' | 'color.text.information.bolder' | 'color.text.subtlest' | 'color.text.subtle' | 'color.link' | 'color.link.pressed' | 'color.link.visited' | 'color.link.visited.pressed' | 'color.icon' | 'color.icon.accent.lime' | 'color.icon.accent.red' | 'color.icon.accent.orange' | 'color.icon.accent.yellow' | 'color.icon.accent.green' | 'color.icon.accent.teal' | 'color.icon.accent.blue' | 'color.icon.accent.purple' | 'color.icon.accent.magenta' | 'color.icon.accent.gray' | 'color.icon.disabled' | 'color.icon.inverse' | 'color.icon.selected' | 'color.icon.brand' | 'color.icon.danger' | 'color.icon.warning' | 'color.icon.warning.inverse' | 'color.icon.success' | 'color.icon.discovery' | 'color.icon.information' | 'color.icon.subtlest' | 'color.icon.subtle' | 'color.border' | 'color.border.accent.lime' | 'color.border.accent.red' | 'color.border.accent.orange' | 'color.border.accent.yellow' | 'color.border.accent.green' | 'color.border.accent.teal' | 'color.border.accent.blue' | 'color.border.accent.purple' | 'color.border.accent.magenta' | 'color.border.accent.gray' | 'color.border.disabled' | 'color.border.focused' | 'color.border.input' | 'color.border.inverse' | 'color.border.selected' | 'color.border.brand' | 'color.border.danger' | 'color.border.warning' | 'color.border.success' | 'color.border.discovery' | 'color.border.information' | 'color.border.bold' | 'color.background.accent.lime.subtlest' | 'color.background.accent.lime.subtlest.hovered' | 'color.background.accent.lime.subtlest.pressed' | 'color.background.accent.lime.subtler' | 'color.background.accent.lime.subtler.hovered' | 'color.background.accent.lime.subtler.pressed' | 'color.background.accent.lime.subtle' | 'color.background.accent.lime.subtle.hovered' | 'color.background.accent.lime.subtle.pressed' | 'color.background.accent.lime.bolder' | 'color.background.accent.lime.bolder.hovered' | 'color.background.accent.lime.bolder.pressed' | 'color.background.accent.red.subtlest' | 'color.background.accent.red.subtlest.hovered' | 'color.background.accent.red.subtlest.pressed' | 'color.background.accent.red.subtler' | 'color.background.accent.red.subtler.hovered' | 'color.background.accent.red.subtler.pressed' | 'color.background.accent.red.subtle' | 'color.background.accent.red.subtle.hovered' | 'color.background.accent.red.subtle.pressed' | 'color.background.accent.red.bolder' | 'color.background.accent.red.bolder.hovered' | 'color.background.accent.red.bolder.pressed' | 'color.background.accent.orange.subtlest' | 'color.background.accent.orange.subtlest.hovered' | 'color.background.accent.orange.subtlest.pressed' | 'color.background.accent.orange.subtler' | 'color.background.accent.orange.subtler.hovered' | 'color.background.accent.orange.subtler.pressed' | 'color.background.accent.orange.subtle' | 'color.background.accent.orange.subtle.hovered' | 'color.background.accent.orange.subtle.pressed' | 'color.background.accent.orange.bolder' | 'color.background.accent.orange.bolder.hovered' | 'color.background.accent.orange.bolder.pressed' | 'color.background.accent.yellow.subtlest' | 'color.background.accent.yellow.subtlest.hovered' | 'color.background.accent.yellow.subtlest.pressed' | 'color.background.accent.yellow.subtler' | 'color.background.accent.yellow.subtler.hovered' | 'color.background.accent.yellow.subtler.pressed' | 'color.background.accent.yellow.subtle' | 'color.background.accent.yellow.subtle.hovered' | 'color.background.accent.yellow.subtle.pressed' | 'color.background.accent.yellow.bolder' | 'color.background.accent.yellow.bolder.hovered' | 'color.background.accent.yellow.bolder.pressed' | 'color.background.accent.green.subtlest' | 'color.background.accent.green.subtlest.hovered' | 'color.background.accent.green.subtlest.pressed' | 'color.background.accent.green.subtler' | 'color.background.accent.green.subtler.hovered' | 'color.background.accent.green.subtler.pressed' | 'color.background.accent.green.subtle' | 'color.background.accent.green.subtle.hovered' | 'color.background.accent.green.subtle.pressed' | 'color.background.accent.green.bolder' | 'color.background.accent.green.bolder.hovered' | 'color.background.accent.green.bolder.pressed' | 'color.background.accent.teal.subtlest' | 'color.background.accent.teal.subtlest.hovered' | 'color.background.accent.teal.subtlest.pressed' | 'color.background.accent.teal.subtler' | 'color.background.accent.teal.subtler.hovered' | 'color.background.accent.teal.subtler.pressed' | 'color.background.accent.teal.subtle' | 'color.background.accent.teal.subtle.hovered' | 'color.background.accent.teal.subtle.pressed' | 'color.background.accent.teal.bolder' | 'color.background.accent.teal.bolder.hovered' | 'color.background.accent.teal.bolder.pressed' | 'color.background.accent.blue.subtlest' | 'color.background.accent.blue.subtlest.hovered' | 'color.background.accent.blue.subtlest.pressed' | 'color.background.accent.blue.subtler' | 'color.background.accent.blue.subtler.hovered' | 'color.background.accent.blue.subtler.pressed' | 'color.background.accent.blue.subtle' | 'color.background.accent.blue.subtle.hovered' | 'color.background.accent.blue.subtle.pressed' | 'color.background.accent.blue.bolder' | 'color.background.accent.blue.bolder.hovered' | 'color.background.accent.blue.bolder.pressed' | 'color.background.accent.purple.subtlest' | 'color.background.accent.purple.subtlest.hovered' | 'color.background.accent.purple.subtlest.pressed' | 'color.background.accent.purple.subtler' | 'color.background.accent.purple.subtler.hovered' | 'color.background.accent.purple.subtler.pressed' | 'color.background.accent.purple.subtle' | 'color.background.accent.purple.subtle.hovered' | 'color.background.accent.purple.subtle.pressed' | 'color.background.accent.purple.bolder' | 'color.background.accent.purple.bolder.hovered' | 'color.background.accent.purple.bolder.pressed' | 'color.background.accent.magenta.subtlest' | 'color.background.accent.magenta.subtlest.hovered' | 'color.background.accent.magenta.subtlest.pressed' | 'color.background.accent.magenta.subtler' | 'color.background.accent.magenta.subtler.hovered' | 'color.background.accent.magenta.subtler.pressed' | 'color.background.accent.magenta.subtle' | 'color.background.accent.magenta.subtle.hovered' | 'color.background.accent.magenta.subtle.pressed' | 'color.background.accent.magenta.bolder' | 'color.background.accent.magenta.bolder.hovered' | 'color.background.accent.magenta.bolder.pressed' | 'color.background.accent.gray.subtlest' | 'color.background.accent.gray.subtlest.hovered' | 'color.background.accent.gray.subtlest.pressed' | 'color.background.accent.gray.subtler' | 'color.background.accent.gray.subtler.hovered' | 'color.background.accent.gray.subtler.pressed' | 'color.background.accent.gray.subtle' | 'color.background.accent.gray.subtle.hovered' | 'color.background.accent.gray.subtle.pressed' | 'color.background.accent.gray.bolder' | 'color.background.accent.gray.bolder.hovered' | 'color.background.accent.gray.bolder.pressed' | 'color.background.disabled' | 'color.background.input' | 'color.background.input.hovered' | 'color.background.input.pressed' | 'color.background.inverse.subtle' | 'color.background.inverse.subtle.hovered' | 'color.background.inverse.subtle.pressed' | 'color.background.neutral' | 'color.background.neutral.hovered' | 'color.background.neutral.pressed' | 'color.background.neutral.subtle' | 'color.background.neutral.subtle.hovered' | 'color.background.neutral.subtle.pressed' | 'color.background.neutral.bold' | 'color.background.neutral.bold.hovered' | 'color.background.neutral.bold.pressed' | 'color.background.selected' | 'color.background.selected.hovered' | 'color.background.selected.pressed' | 'color.background.selected.bold' | 'color.background.selected.bold.hovered' | 'color.background.selected.bold.pressed' | 'color.background.brand.subtlest' | 'color.background.brand.subtlest.hovered' | 'color.background.brand.subtlest.pressed' | 'color.background.brand.bold' | 'color.background.brand.bold.hovered' | 'color.background.brand.bold.pressed' | 'color.background.brand.boldest' | 'color.background.brand.boldest.hovered' | 'color.background.brand.boldest.pressed' | 'color.background.danger' | 'color.background.danger.hovered' | 'color.background.danger.pressed' | 'color.background.danger.subtler' | 'color.background.danger.subtler.hovered' | 'color.background.danger.subtler.pressed' | 'color.background.danger.bold' | 'color.background.danger.bold.hovered' | 'color.background.danger.bold.pressed' | 'color.background.warning' | 'color.background.warning.hovered' | 'color.background.warning.pressed' | 'color.background.warning.subtler' | 'color.background.warning.subtler.hovered' | 'color.background.warning.subtler.pressed' | 'color.background.warning.bold' | 'color.background.warning.bold.hovered' | 'color.background.warning.bold.pressed' | 'color.background.success' | 'color.background.success.hovered' | 'color.background.success.pressed' | 'color.background.success.subtler' | 'color.background.success.subtler.hovered' | 'color.background.success.subtler.pressed' | 'color.background.success.bold' | 'color.background.success.bold.hovered' | 'color.background.success.bold.pressed' | 'color.background.discovery' | 'color.background.discovery.hovered' | 'color.background.discovery.pressed' | 'color.background.discovery.subtler' | 'color.background.discovery.subtler.hovered' | 'color.background.discovery.subtler.pressed' | 'color.background.discovery.bold' | 'color.background.discovery.bold.hovered' | 'color.background.discovery.bold.pressed' | 'color.background.information' | 'color.background.information.hovered' | 'color.background.information.pressed' | 'color.background.information.subtler' | 'color.background.information.subtler.hovered' | 'color.background.information.subtler.pressed' | 'color.background.information.bold' | 'color.background.information.bold.hovered' | 'color.background.information.bold.pressed' | 'color.blanket' | 'color.blanket.selected' | 'color.blanket.danger' | 'color.interaction.hovered' | 'color.interaction.pressed' | 'color.skeleton' | 'color.skeleton.subtle' | 'color.chart.categorical.1' | 'color.chart.categorical.1.hovered' | 'color.chart.categorical.2' | 'color.chart.categorical.2.hovered' | 'color.chart.categorical.3' | 'color.chart.categorical.3.hovered' | 'color.chart.categorical.4' | 'color.chart.categorical.4.hovered' | 'color.chart.categorical.5' | 'color.chart.categorical.5.hovered' | 'color.chart.categorical.6' | 'color.chart.categorical.6.hovered' | 'color.chart.categorical.7' | 'color.chart.categorical.7.hovered' | 'color.chart.categorical.8' | 'color.chart.categorical.8.hovered' | 'color.chart.lime.bold' | 'color.chart.lime.bold.hovered' | 'color.chart.lime.bolder' | 'color.chart.lime.bolder.hovered' | 'color.chart.lime.boldest' | 'color.chart.lime.boldest.hovered' | 'color.chart.neutral' | 'color.chart.neutral.hovered' | 'color.chart.red.bold' | 'color.chart.red.bold.hovered' | 'color.chart.red.bolder' | 'color.chart.red.bolder.hovered' | 'color.chart.red.boldest' | 'color.chart.red.boldest.hovered' | 'color.chart.orange.bold' | 'color.chart.orange.bold.hovered' | 'color.chart.orange.bolder' | 'color.chart.orange.bolder.hovered' | 'color.chart.orange.boldest' | 'color.chart.orange.boldest.hovered' | 'color.chart.yellow.bold' | 'color.chart.yellow.bold.hovered' | 'color.chart.yellow.bolder' | 'color.chart.yellow.bolder.hovered' | 'color.chart.yellow.boldest' | 'color.chart.yellow.boldest.hovered' | 'color.chart.green.bold' | 'color.chart.green.bold.hovered' | 'color.chart.green.bolder' | 'color.chart.green.bolder.hovered' | 'color.chart.green.boldest' | 'color.chart.green.boldest.hovered' | 'color.chart.teal.bold' | 'color.chart.teal.bold.hovered' | 'color.chart.teal.bolder' | 'color.chart.teal.bolder.hovered' | 'color.chart.teal.boldest' | 'color.chart.teal.boldest.hovered' | 'color.chart.blue.bold' | 'color.chart.blue.bold.hovered' | 'color.chart.blue.bolder' | 'color.chart.blue.bolder.hovered' | 'color.chart.blue.boldest' | 'color.chart.blue.boldest.hovered' | 'color.chart.purple.bold' | 'color.chart.purple.bold.hovered' | 'color.chart.purple.bolder' | 'color.chart.purple.bolder.hovered' | 'color.chart.purple.boldest' | 'color.chart.purple.boldest.hovered' | 'color.chart.magenta.bold' | 'color.chart.magenta.bold.hovered' | 'color.chart.magenta.bolder' | 'color.chart.magenta.bolder.hovered' | 'color.chart.magenta.boldest' | 'color.chart.magenta.boldest.hovered' | 'color.chart.gray.bold' | 'color.chart.gray.bold.hovered' | 'color.chart.gray.bolder' | 'color.chart.gray.bolder.hovered' | 'color.chart.gray.boldest' | 'color.chart.gray.boldest.hovered' | 'color.chart.brand' | 'color.chart.brand.hovered' | 'color.chart.danger' | 'color.chart.danger.hovered' | 'color.chart.danger.bold' | 'color.chart.danger.bold.hovered' | 'color.chart.warning' | 'color.chart.warning.hovered' | 'color.chart.warning.bold' | 'color.chart.warning.bold.hovered' | 'color.chart.success' | 'color.chart.success.hovered' | 'color.chart.success.bold' | 'color.chart.success.bold.hovered' | 'color.chart.discovery' | 'color.chart.discovery.hovered' | 'color.chart.discovery.bold' | 'color.chart.discovery.bold.hovered' | 'color.chart.information' | 'color.chart.information.hovered' | 'color.chart.information.bold' | 'color.chart.information.bold.hovered' | 'elevation.surface' | 'elevation.surface.hovered' | 'elevation.surface.pressed' | 'elevation.surface.overlay' | 'elevation.surface.overlay.hovered' | 'elevation.surface.overlay.pressed' | 'elevation.surface.raised' | 'elevation.surface.raised.hovered' | 'elevation.surface.raised.pressed' | 'elevation.surface.sunken' | 'elevation.shadow.overflow' | 'elevation.shadow.overflow.perimeter' | 'elevation.shadow.overflow.spread' | 'elevation.shadow.overlay' | 'elevation.shadow.raised' | 'opacity.disabled' | 'opacity.loading' | 'utility.UNSAFE.transparent' | 'utility.elevation.surface.current' | 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800' | 'space.1000' | 'space.negative.025' | 'space.negative.050' | 'space.negative.075' | 'space.negative.100' | 'space.negative.150' | 'space.negative.200' | 'space.negative.250' | 'space.negative.300' | 'space.negative.400' | 'font.heading.xxlarge' | 'font.heading.xlarge' | 'font.heading.large' | 'font.heading.medium' | 'font.heading.small' | 'font.heading.xsmall' | 'font.heading.xxsmall' | 'font.body.large' | 'font.body' | 'font.body.small' | 'font.metric.large' | 'font.metric.medium' | 'font.metric.small' | 'font.code' | 'font.weight.regular' | 'font.weight.medium' | 'font.weight.semibold' | 'font.weight.bold' | 'font.family.heading' | 'font.family.body' | 'font.family.code' | 'font.family.brand.heading' | 'font.family.brand.body' | 'radius.xsmall' | 'radius.small' | 'radius.medium' | 'radius.large' | 'radius.xlarge' | 'radius.xxlarge' | 'radius.full' | 'radius.tile' | 'border.width' | 'border.width.selected' | 'border.width.focused';
|
|
@@ -1,25 +1,6 @@
|
|
|
1
|
-
import { type ThemeStyles } from './get-theme-styles';
|
|
2
1
|
import { type ThemeOptionsSchema, type ThemeState } from './theme-config';
|
|
3
2
|
export declare const CUSTOM_STYLE_ELEMENTS_SIZE_THRESHOLD = 10;
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
* @param themeSchema The schema of available themes
|
|
7
|
-
* @returns a string with the CSS for the custom theme
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* Takes a color mode and custom branding options, and returns an array of objects for use in applying custom styles to the document head.
|
|
11
|
-
* Only supplies the color themes necessary for initial render, based on the current themeState. I.e. if in light mode, dark mode themes are not returned.
|
|
12
|
-
*
|
|
13
|
-
* @param {Object<string, string>} themeState The themes and color mode that should be applied.
|
|
14
|
-
* @param {string} themeState.colorMode Determines which color theme is applied
|
|
15
|
-
* @param {Object} themeState.UNSAFE_themeOptions The custom branding options to be used for custom theme generation
|
|
16
|
-
*
|
|
17
|
-
* @returns An object array, containing theme IDs, data-attributes to attach to the theme, and the theme CSS.
|
|
18
|
-
* If an error is encountered while loading themes, the themes array will be empty.
|
|
19
|
-
*/
|
|
20
|
-
export declare function getCustomThemeStyles(themeState: Partial<ThemeState> & {
|
|
21
|
-
UNSAFE_themeOptions: ThemeOptionsSchema;
|
|
22
|
-
}): ThemeStyles[];
|
|
23
3
|
export declare function loadAndAppendCustomThemeCss(themeState: Partial<ThemeState> & {
|
|
24
4
|
UNSAFE_themeOptions: ThemeOptionsSchema;
|
|
25
5
|
}): void;
|
|
6
|
+
export { getCustomThemeStyles } from './get-custom-theme-styles';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Strict design token based typedef representing a subset of safe CSS properties.
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::26cd14173782b5329f576f0f33e340ce>>
|
|
7
7
|
* @codegenCommand yarn build tokens
|
|
8
8
|
*/
|
|
9
9
|
export type BackgroundColorHovered = 'var(--ds-background-accent-lime-subtlest-hovered)' | 'var(--ds-background-accent-lime-subtler-hovered)' | 'var(--ds-background-accent-lime-subtle-hovered)' | 'var(--ds-background-accent-lime-bolder-hovered)' | 'var(--ds-background-accent-red-subtlest-hovered)' | 'var(--ds-background-accent-red-subtler-hovered)' | 'var(--ds-background-accent-red-subtle-hovered)' | 'var(--ds-background-accent-red-bolder-hovered)' | 'var(--ds-background-accent-orange-subtlest-hovered)' | 'var(--ds-background-accent-orange-subtler-hovered)' | 'var(--ds-background-accent-orange-subtle-hovered)' | 'var(--ds-background-accent-orange-bolder-hovered)' | 'var(--ds-background-accent-yellow-subtlest-hovered)' | 'var(--ds-background-accent-yellow-subtler-hovered)' | 'var(--ds-background-accent-yellow-subtle-hovered)' | 'var(--ds-background-accent-yellow-bolder-hovered)' | 'var(--ds-background-accent-green-subtlest-hovered)' | 'var(--ds-background-accent-green-subtler-hovered)' | 'var(--ds-background-accent-green-subtle-hovered)' | 'var(--ds-background-accent-green-bolder-hovered)' | 'var(--ds-background-accent-teal-subtlest-hovered)' | 'var(--ds-background-accent-teal-subtler-hovered)' | 'var(--ds-background-accent-teal-subtle-hovered)' | 'var(--ds-background-accent-teal-bolder-hovered)' | 'var(--ds-background-accent-blue-subtlest-hovered)' | 'var(--ds-background-accent-blue-subtler-hovered)' | 'var(--ds-background-accent-blue-subtle-hovered)' | 'var(--ds-background-accent-blue-bolder-hovered)' | 'var(--ds-background-accent-purple-subtlest-hovered)' | 'var(--ds-background-accent-purple-subtler-hovered)' | 'var(--ds-background-accent-purple-subtle-hovered)' | 'var(--ds-background-accent-purple-bolder-hovered)' | 'var(--ds-background-accent-magenta-subtlest-hovered)' | 'var(--ds-background-accent-magenta-subtler-hovered)' | 'var(--ds-background-accent-magenta-subtle-hovered)' | 'var(--ds-background-accent-magenta-bolder-hovered)' | 'var(--ds-background-accent-gray-subtlest-hovered)' | 'var(--ds-background-accent-gray-subtler-hovered)' | 'var(--ds-background-accent-gray-subtle-hovered)' | 'var(--ds-background-accent-gray-bolder-hovered)' | 'var(--ds-background-input-hovered)' | 'var(--ds-background-inverse-subtle-hovered)' | 'var(--ds-background-neutral-hovered)' | 'var(--ds-background-neutral-subtle-hovered)' | 'var(--ds-background-neutral-bold-hovered)' | 'var(--ds-background-selected-hovered)' | 'var(--ds-background-selected-bold-hovered)' | 'var(--ds-background-brand-subtlest-hovered)' | 'var(--ds-background-brand-bold-hovered)' | 'var(--ds-background-brand-boldest-hovered)' | 'var(--ds-background-danger-hovered)' | 'var(--ds-background-danger-subtler-hovered)' | 'var(--ds-background-danger-bold-hovered)' | 'var(--ds-background-warning-hovered)' | 'var(--ds-background-warning-subtler-hovered)' | 'var(--ds-background-warning-bold-hovered)' | 'var(--ds-background-success-hovered)' | 'var(--ds-background-success-subtler-hovered)' | 'var(--ds-background-success-bold-hovered)' | 'var(--ds-background-discovery-hovered)' | 'var(--ds-background-discovery-subtler-hovered)' | 'var(--ds-background-discovery-bold-hovered)' | 'var(--ds-background-information-hovered)' | 'var(--ds-background-information-subtler-hovered)' | 'var(--ds-background-information-bold-hovered)' | 'var(--ds-surface-hovered)' | 'var(--ds-surface-overlay-hovered)' | 'var(--ds-surface-raised-hovered)';
|
|
@@ -17,7 +17,7 @@ export type BorderRadius = 'var(--ds-radius-xsmall)' | 'var(--ds-radius-small)'
|
|
|
17
17
|
export type BorderWidth = 'var(--ds-border-width)' | 'var(--ds-border-width-selected)' | 'var(--ds-border-width-focused)' | 0 | '0';
|
|
18
18
|
export type BorderShorthand = 'none' | `${BorderWidth} solid ${BorderColor}`;
|
|
19
19
|
type NumericSize = `${number}px` | `${number}rem` | `${number}vh` | `${number}vw` | `${number}%`;
|
|
20
|
-
export type SizeIntrinsic = 'min-content' | 'max-content' | 'fit-content' | 'auto' | NumericSize | `min(${NumericSize}, ${NumericSize})` | `max(${NumericSize}, ${NumericSize})
|
|
20
|
+
export type SizeIntrinsic = 'min-content' | 'max-content' | 'fit-content' | 'auto' | NumericSize | `min(${NumericSize}, ${NumericSize})` | `max(${NumericSize}, ${NumericSize})` | 0 | '0';
|
|
21
21
|
export type Space = 'var(--ds-space-0)' | 'var(--ds-space-025)' | 'var(--ds-space-050)' | 'var(--ds-space-075)' | 'var(--ds-space-100)' | 'var(--ds-space-150)' | 'var(--ds-space-200)' | 'var(--ds-space-250)' | 'var(--ds-space-300)' | 'var(--ds-space-400)' | 'var(--ds-space-500)' | 'var(--ds-space-600)' | 'var(--ds-space-800)' | 'var(--ds-space-1000)' | 'var(--ds-space-negative-025)' | 'var(--ds-space-negative-050)' | 'var(--ds-space-negative-075)' | 'var(--ds-space-negative-100)' | 'var(--ds-space-negative-150)' | 'var(--ds-space-negative-200)' | 'var(--ds-space-negative-250)' | 'var(--ds-space-negative-300)' | 'var(--ds-space-negative-400)' | 0 | '0';
|
|
22
22
|
export type SpaceMargin = Space | 'auto' | '0 auto';
|
|
23
23
|
export type SpaceInset = Space | '50%';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Metadata for generation of `@atlaskit/ads-mcp` and https://atlassian.design/llms-tokens.txt.
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::8a97395137b2eee0fedb0ac95a7a2528>>
|
|
7
7
|
* @codegenCommand yarn build tokens
|
|
8
8
|
*/
|
|
9
9
|
export interface Token {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ThemeStyles } from './get-theme-styles';
|
|
2
|
+
import { type ThemeOptionsSchema, type ThemeState } from './theme-config';
|
|
3
|
+
/**
|
|
4
|
+
* Takes a color mode and custom branding options, and returns an array of objects for use in applying custom styles to the document head.
|
|
5
|
+
* Only supplies the color themes necessary for initial render, based on the current themeState. I.e. if in light mode, dark mode themes are not returned.
|
|
6
|
+
*
|
|
7
|
+
* @param {Object<string, string>} themeState The themes and color mode that should be applied.
|
|
8
|
+
* @param {string} themeState.colorMode Determines which color theme is applied
|
|
9
|
+
* @param {Object} themeState.UNSAFE_themeOptions The custom branding options to be used for custom theme generation
|
|
10
|
+
*
|
|
11
|
+
* @returns An object array, containing theme IDs, data-attributes to attach to the theme, and the theme CSS.
|
|
12
|
+
* If an error is encountered while loading themes, the themes array will be empty.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getCustomThemeStyles(themeState: Partial<ThemeState> & {
|
|
15
|
+
UNSAFE_themeOptions: ThemeOptionsSchema;
|
|
16
|
+
}): ThemeStyles[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme modes: The general purpose of a theme.
|
|
3
|
+
* This attr is used to apply the appropriate system-preference option
|
|
4
|
+
* It may also be used as a selector for mode-specific overrides such as light/dark images.
|
|
5
|
+
* The idea is there may exist many color themes, but every theme must either fit into light or dark.
|
|
6
|
+
*/
|
|
7
|
+
export declare const themeColorModes: readonly ["light", "dark", "auto"];
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type themeColorModes } from './theme-color-modes';
|
|
2
|
+
import { themeIds } from './theme-ids';
|
|
1
3
|
/**
|
|
2
4
|
* This file contains the source of truth for themes and all associated meta data.
|
|
3
5
|
*/
|
|
@@ -21,13 +23,6 @@ export type ThemeOverrides = Themes;
|
|
|
21
23
|
* In the future other types may be introduced such as typography.
|
|
22
24
|
*/
|
|
23
25
|
type ThemeKinds = 'color' | 'spacing' | 'typography' | 'shape' | 'motion';
|
|
24
|
-
/**
|
|
25
|
-
* Theme modes: The general purpose of a theme.
|
|
26
|
-
* This attr is used to apply the appropriate system-preference option
|
|
27
|
-
* It may also be used as a selector for mode-specific overrides such as light/dark images.
|
|
28
|
-
* The idea is there may exist many color themes, but every theme must either fit into light or dark.
|
|
29
|
-
*/
|
|
30
|
-
export declare const themeColorModes: readonly ["light", "dark", "auto"];
|
|
31
26
|
export type ThemeColorModes = (typeof themeColorModes)[number];
|
|
32
27
|
export type DataColorModes = Exclude<ThemeColorModes, 'auto'>;
|
|
33
28
|
/**
|
|
@@ -36,13 +31,6 @@ export type DataColorModes = Exclude<ThemeColorModes, 'auto'>;
|
|
|
36
31
|
declare const themeContrastModes: readonly ["more", "no-preference", "auto"];
|
|
37
32
|
export type ThemeContrastModes = (typeof themeContrastModes)[number];
|
|
38
33
|
export type DataContrastModes = 'more' | 'no-preference' | 'auto';
|
|
39
|
-
/**
|
|
40
|
-
* Theme ids: The value that will be mounted to the DOM as a data attr
|
|
41
|
-
* For example: `data-theme="light:light dark:dark spacing:spacing"
|
|
42
|
-
*
|
|
43
|
-
* These ids must be kebab case
|
|
44
|
-
*/
|
|
45
|
-
export declare const themeIds: readonly ["light-increased-contrast", "light", "light-future", "dark", "dark-future", "dark-increased-contrast", "spacing", "shape", "typography", "motion"];
|
|
46
34
|
export type ThemeIds = (typeof themeIds)[number];
|
|
47
35
|
/**
|
|
48
36
|
* Theme override ids: the equivalent of themeIds for theme overrides.
|
|
@@ -156,3 +144,5 @@ export interface ActiveThemeState extends ThemeState {
|
|
|
156
144
|
colorMode: DataColorModes;
|
|
157
145
|
}
|
|
158
146
|
export default themeConfig;
|
|
147
|
+
export { themeColorModes } from './theme-color-modes';
|
|
148
|
+
export { themeIds } from './theme-ids';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme ids: The value that will be mounted to the DOM as a data attr
|
|
3
|
+
* For example: `data-theme="light:light dark:dark spacing:spacing"
|
|
4
|
+
*
|
|
5
|
+
* These ids must be kebab case
|
|
6
|
+
*/
|
|
7
|
+
export declare const themeIds: readonly ["light-increased-contrast", "light", "light-future", "dark", "dark-future", "dark-increased-contrast", "spacing", "shape", "typography", "motion"];
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import { type ShadowToken } from '../types';
|
|
2
|
-
export declare const hexToRGBAValues: (hex: string) => {
|
|
3
|
-
r: number;
|
|
4
|
-
g: number;
|
|
5
|
-
b: number;
|
|
6
|
-
a: number;
|
|
7
|
-
};
|
|
8
2
|
/**
|
|
9
3
|
* Returns a box shadow formatted for CSS from a ShadowToken raw value.
|
|
10
4
|
*
|
|
11
5
|
* @param rawShadow - ShadowToken raw value
|
|
12
6
|
*/
|
|
13
7
|
export declare const getBoxShadow: (rawShadow: ShadowToken<string>["value"]) => string;
|
|
8
|
+
export { hexToRGBAValues } from './hex-to-rgba-values';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export declare const isValidBrandHex: (hex: string) => boolean;
|
|
2
|
-
export declare function rgbToHex(r: number, g: number, b: number): string;
|
|
3
|
-
export declare function getAlpha(hex: string): number;
|
|
4
1
|
export declare function hexToRgbA(hex: string): [number, number, number, number];
|
|
5
2
|
export declare function hexToRgb(hex: string): [number, number, number];
|
|
6
3
|
export declare function hexToHSL(hex: string): [number, number, number];
|
|
7
|
-
export declare function HSLToRGB(h: number, s: number, l: number): [number, number, number];
|
|
8
|
-
export declare function relativeLuminanceW3C(r: number, g: number, b: number): number;
|
|
9
4
|
export declare function getContrastRatio(foreground: string, background: string): number;
|
|
10
5
|
export declare function deltaE(rgbA: number[], rgbB: number[]): number;
|
|
6
|
+
export { isValidBrandHex } from './is-valid-brand-hex';
|
|
7
|
+
export { rgbToHex } from './rgb-to-hex';
|
|
8
|
+
export { getAlpha } from './get-alpha';
|
|
9
|
+
export { HSLToRGB } from './hsl-to-rgb';
|
|
10
|
+
export { relativeLuminanceW3C } from './relative-luminance-w3-c';
|
|
@@ -3,8 +3,7 @@ import { type ThemeColorModes, type ThemeOptionsSchema } from '../theme-config';
|
|
|
3
3
|
type Token = keyof typeof tokens;
|
|
4
4
|
type ThemeAttributeId = 'light' | 'dark';
|
|
5
5
|
export declare function findMissingCustomStyleElements(UNSAFE_themeOptions: ThemeOptionsSchema, mode: ThemeColorModes): ThemeAttributeId[];
|
|
6
|
-
export declare function limitSizeOfCustomStyleElements(sizeThreshold: number): void;
|
|
7
6
|
export declare function reduceTokenMap(tokenMap: {
|
|
8
7
|
[key in Token]?: number | string;
|
|
9
8
|
}, themeRamp: string[]): string;
|
|
10
|
-
export {};
|
|
9
|
+
export { limitSizeOfCustomStyleElements } from './limit-size-of-custom-style-elements';
|
|
@@ -5,11 +5,10 @@ type TokenMap = {
|
|
|
5
5
|
[key in Token]?: number | string;
|
|
6
6
|
};
|
|
7
7
|
type Mode = 'light' | 'dark';
|
|
8
|
-
export declare const getClosestColorIndex: (themeRamp: CSSColor[], brandColor: CSSColor) => number;
|
|
9
8
|
export declare const generateColors: (brandColor: CSSColor) => {
|
|
10
9
|
ramp: CSSColor[];
|
|
11
10
|
replacedColor: CSSColor;
|
|
12
11
|
};
|
|
13
12
|
export declare const generateTokenMap: (brandColor: CSSColor, mode: ThemeColorModes, themeRamp?: CSSColor[]) => { [mode in Mode]?: TokenMap; };
|
|
14
13
|
export declare const generateTokenMapWithContrastCheck: (brandColor: CSSColor, mode: ThemeColorModes, themeRamp?: CSSColor[]) => { [mode in Mode]?: TokenMap; };
|
|
15
|
-
export {};
|
|
14
|
+
export { getClosestColorIndex } from './get-closest-color-index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getAlpha(hex: string): number;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transforms a style dictionary token path to a CSS custom property.
|
|
3
|
+
*
|
|
4
|
+
* A css prefix will be prepended and all [default] key words will be omitted
|
|
5
|
+
* from the path
|
|
6
|
+
*
|
|
7
|
+
* @example <caption>Passing a path as an array</caption>
|
|
8
|
+
* // Returns ds-background-bold
|
|
9
|
+
* getCSSCustomProperty(['color', 'background', 'bold', '[default]'])
|
|
10
|
+
*
|
|
11
|
+
* @example <caption>Passing a path as a string</caption>
|
|
12
|
+
* // Returns ds-background-bold
|
|
13
|
+
* getCSSCustomProperty('color.background.bold.[default]')
|
|
14
|
+
*/
|
|
15
|
+
export declare const getCSSCustomProperty: (path: string | string[]) => string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transforms a style dictionary token path to a fully qualified token id
|
|
3
|
+
* These Ids are intended to be used internal to this package by style-dictionary
|
|
4
|
+
*
|
|
5
|
+
* [default] key words will NOT be omitted from the path
|
|
6
|
+
*
|
|
7
|
+
* @example <caption>Passing a path as a string</caption>
|
|
8
|
+
* // Returns color.background.bold.[default]
|
|
9
|
+
* getFullyQualifiedTokenId(['color', 'background', 'bold', '[default]'])
|
|
10
|
+
*/
|
|
11
|
+
export declare const getFullyQualifiedTokenId: (path: string[]) => string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type ThemeIdsWithOverrides, type ThemeState } from '../theme-config';
|
|
2
2
|
export declare const getThemePreferences: (themeState: ThemeState) => ThemeIdsWithOverrides[];
|
|
3
|
-
export
|
|
3
|
+
export { getThemeOverridePreferences } from './get-theme-override-preferences';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transforms a style dictionary token path to a shorthand token id
|
|
3
|
+
* These ids will be typically be how tokens are interacted with via typescript and css
|
|
4
|
+
*
|
|
5
|
+
* All [default] key words will be omitted from the path
|
|
6
|
+
*
|
|
7
|
+
* @example <caption>Passing a path as an array</caption>
|
|
8
|
+
* // Returns color.background.bold
|
|
9
|
+
* getTokenId(['color', 'background', 'bold', '[default]'])
|
|
10
|
+
*
|
|
11
|
+
* @example <caption>Passing a path as a string</caption>
|
|
12
|
+
* // Returns color.background.bold
|
|
13
|
+
* getTokenId('color.background.bold.[default]')
|
|
14
|
+
*/
|
|
15
|
+
export declare const getTokenId: (path: string | string[]) => string;
|
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
* Below lines are copied from @material/material-color-utilities.
|
|
3
3
|
* Do not modify it.
|
|
4
4
|
*/
|
|
5
|
-
/**
|
|
6
|
-
* Converts a color from RGB components to ARGB format.
|
|
7
|
-
*/
|
|
8
|
-
export declare function argbFromRgb(red: number, green: number, blue: number): number;
|
|
9
5
|
/**
|
|
10
6
|
* Converts a color from linear RGB components to ARGB format.
|
|
11
7
|
*/
|
|
@@ -53,24 +49,6 @@ export declare function yFromLstar(lstar: number): number;
|
|
|
53
49
|
* @return L* in L*a*b*
|
|
54
50
|
*/
|
|
55
51
|
export declare function lstarFromY(y: number): number;
|
|
56
|
-
/**
|
|
57
|
-
* Linearizes an RGB component.
|
|
58
|
-
*
|
|
59
|
-
* @param rgbComponent 0 <= rgb_component <= 255, represents R/G/B
|
|
60
|
-
* channel
|
|
61
|
-
* @return 0.0 <= output <= 100.0, color channel converted to
|
|
62
|
-
* linear RGB space
|
|
63
|
-
*/
|
|
64
|
-
export declare function linearized(rgbComponent: number): number;
|
|
65
|
-
/**
|
|
66
|
-
* Delinearizes an RGB component.
|
|
67
|
-
*
|
|
68
|
-
* @param rgbComponent 0.0 <= rgb_component <= 100.0, represents
|
|
69
|
-
* linear R/G/B channel
|
|
70
|
-
* @return 0 <= output <= 255, color channel converted to regular
|
|
71
|
-
* RGB space
|
|
72
|
-
*/
|
|
73
|
-
export declare function delinearized(rgbComponent: number): number;
|
|
74
52
|
/**
|
|
75
53
|
* Returns the standard white point; white on a sunny day.
|
|
76
54
|
*
|
|
@@ -105,4 +83,6 @@ export declare function rgbaFromArgb(argb: number): Rgba;
|
|
|
105
83
|
* @returns ARGB representation of a int32 color.
|
|
106
84
|
*/
|
|
107
85
|
export declare function argbFromRgba({ r, g, b, a }: Rgba): number;
|
|
108
|
-
export {};
|
|
86
|
+
export { argbFromRgb } from './argb-from-rgb';
|
|
87
|
+
export { linearized } from './linearized';
|
|
88
|
+
export { delinearized } from './delinearized';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Delinearizes an RGB component.
|
|
3
|
+
*
|
|
4
|
+
* @param rgbComponent 0.0 <= rgb_component <= 100.0, represents
|
|
5
|
+
* linear R/G/B channel
|
|
6
|
+
* @return 0 <= output <= 255, color channel converted to regular
|
|
7
|
+
* RGB space
|
|
8
|
+
*/
|
|
9
|
+
export declare function delinearized(rgbComponent: number): number;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Below lines are copied from @material/material-color-utilities.
|
|
3
3
|
* Do not modify it.
|
|
4
4
|
*/
|
|
5
|
+
import { ViewingConditions } from './viewing-conditions';
|
|
5
6
|
/**
|
|
6
7
|
* A color system built using CAM16 hue and chroma, and L* from
|
|
7
8
|
* L*a*b*.
|
|
@@ -23,7 +24,6 @@
|
|
|
23
24
|
* will appear as in different lighting environments.
|
|
24
25
|
*/
|
|
25
26
|
export declare class Hct {
|
|
26
|
-
private argb;
|
|
27
27
|
/**
|
|
28
28
|
* @param hue 0 <= hue < 360; invalid values are corrected.
|
|
29
29
|
* @param chroma 0 <= chroma < ?; Informally, colorfulness. The color
|
|
@@ -35,6 +35,7 @@ export declare class Hct {
|
|
|
35
35
|
internalHue: number;
|
|
36
36
|
internalChroma: number;
|
|
37
37
|
internalTone: number;
|
|
38
|
+
private argb;
|
|
38
39
|
static from(hue: number, chroma: number, tone: number): Hct;
|
|
39
40
|
/**
|
|
40
41
|
* @param argb ARGB representation of a color.
|
|
@@ -88,50 +89,4 @@ export declare class Hct {
|
|
|
88
89
|
*/
|
|
89
90
|
inViewingConditions(vc: ViewingConditions): Hct;
|
|
90
91
|
}
|
|
91
|
-
export
|
|
92
|
-
n: number;
|
|
93
|
-
aw: number;
|
|
94
|
-
nbb: number;
|
|
95
|
-
ncb: number;
|
|
96
|
-
c: number;
|
|
97
|
-
nc: number;
|
|
98
|
-
rgbD: number[];
|
|
99
|
-
fl: number;
|
|
100
|
-
fLRoot: number;
|
|
101
|
-
z: number;
|
|
102
|
-
/**
|
|
103
|
-
* sRGB-like viewing conditions.
|
|
104
|
-
*/
|
|
105
|
-
static DEFAULT: ViewingConditions;
|
|
106
|
-
/**
|
|
107
|
-
* Create ViewingConditions from a simple, physically relevant, set of
|
|
108
|
-
* parameters.
|
|
109
|
-
*
|
|
110
|
-
* @param whitePoint White point, measured in the XYZ color space.
|
|
111
|
-
* default = D65, or sunny day afternoon
|
|
112
|
-
* @param adaptingLuminance The luminance of the adapting field. Informally,
|
|
113
|
-
* how bright it is in the room where the color is viewed. Can be
|
|
114
|
-
* calculated from lux by multiplying lux by 0.0586. default = 11.72,
|
|
115
|
-
* or 200 lux.
|
|
116
|
-
* @param backgroundLstar The lightness of the area surrounding the color.
|
|
117
|
-
* measured by L* in L*a*b*. default = 50.0
|
|
118
|
-
* @param surround A general description of the lighting surrounding the
|
|
119
|
-
* color. 0 is pitch dark, like watching a movie in a theater. 1.0 is a
|
|
120
|
-
* dimly light room, like watching TV at home at night. 2.0 means there
|
|
121
|
-
* is no difference between the lighting on the color and around it.
|
|
122
|
-
* default = 2.0
|
|
123
|
-
* @param discountingIlluminant Whether the eye accounts for the tint of the
|
|
124
|
-
* ambient lighting, such as knowing an apple is still red in green light.
|
|
125
|
-
* default = false, the eye does not perform this process on
|
|
126
|
-
* self-luminous objects like displays.
|
|
127
|
-
*/
|
|
128
|
-
static make(whitePoint?: number[], adaptingLuminance?: number, backgroundLstar?: number, surround?: number, discountingIlluminant?: boolean): ViewingConditions;
|
|
129
|
-
/**
|
|
130
|
-
* Parameters are intermediate values of the CAM16 conversion process. Their
|
|
131
|
-
* names are shorthand for technical color science terminology, this class
|
|
132
|
-
* would not benefit from documenting them individually. A brief overview
|
|
133
|
-
* is available in the CAM16 specification, and a complete overview requires
|
|
134
|
-
* a color science textbook, such as Fairchild's Color Appearance Models.
|
|
135
|
-
*/
|
|
136
|
-
private constructor();
|
|
137
|
-
}
|
|
92
|
+
export { ViewingConditions } from './viewing-conditions';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Linearizes an RGB component.
|
|
3
|
+
*
|
|
4
|
+
* @param rgbComponent 0 <= rgb_component <= 255, represents R/G/B
|
|
5
|
+
* channel
|
|
6
|
+
* @return 0.0 <= output <= 100.0, color channel converted to
|
|
7
|
+
* linear RGB space
|
|
8
|
+
*/
|
|
9
|
+
export declare function linearized(rgbComponent: number): number;
|
|
@@ -1,60 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
* Copyright 2021 Google LLC
|
|
8
|
-
*
|
|
9
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
-
* you may not use this file except in compliance with the License.
|
|
11
|
-
* You may obtain a copy of the License at
|
|
12
|
-
*
|
|
13
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
-
*
|
|
15
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
-
* See the License for the specific language governing permissions and
|
|
19
|
-
* limitations under the License.
|
|
20
|
-
*/
|
|
21
|
-
/**
|
|
22
|
-
* Utility methods for mathematical operations.
|
|
23
|
-
*/
|
|
24
|
-
/**
|
|
25
|
-
* The signum function.
|
|
26
|
-
*
|
|
27
|
-
* @return 1 if num > 0, -1 if num < 0, and 0 if num = 0
|
|
28
|
-
*/
|
|
29
|
-
export declare function signum(num: number): number;
|
|
30
|
-
/**
|
|
31
|
-
* The linear interpolation function.
|
|
32
|
-
*
|
|
33
|
-
* @return start if amount = 0 and stop if amount = 1
|
|
34
|
-
*/
|
|
35
|
-
export declare function lerp(start: number, stop: number, amount: number): number;
|
|
36
|
-
/**
|
|
37
|
-
* Clamps an integer between two integers.
|
|
38
|
-
*
|
|
39
|
-
* @return input when min <= input <= max, and either min or max
|
|
40
|
-
* otherwise.
|
|
41
|
-
*/
|
|
42
|
-
export declare function clampInt(min: number, max: number, input: number): number;
|
|
43
|
-
/**
|
|
44
|
-
* Clamps an integer between two floating-point numbers.
|
|
45
|
-
*
|
|
46
|
-
* @return input when min <= input <= max, and either min or max
|
|
47
|
-
* otherwise.
|
|
48
|
-
*/
|
|
49
|
-
export declare function clampDouble(min: number, max: number, input: number): number;
|
|
50
|
-
/**
|
|
51
|
-
* Sanitizes a degree measure as a floating-point number.
|
|
52
|
-
*
|
|
53
|
-
* @return a degree measure between 0.0 (inclusive) and 360.0
|
|
54
|
-
* (exclusive).
|
|
55
|
-
*/
|
|
56
|
-
export declare function sanitizeDegreesDouble(degrees: number): number;
|
|
57
|
-
/**
|
|
58
|
-
* Multiplies a 1x3 row vector with a 3x3 matrix.
|
|
59
|
-
*/
|
|
60
|
-
export declare function matrixMultiply(row: number[], matrix: number[][]): number[];
|
|
1
|
+
export { signum } from './signum';
|
|
2
|
+
export { lerp } from './lerp';
|
|
3
|
+
export { clampInt } from './clamp-int';
|
|
4
|
+
export { clampDouble } from './clamp-double';
|
|
5
|
+
export { sanitizeDegreesDouble } from './sanitize-degrees-double';
|
|
6
|
+
export { matrixMultiply } from './matrix-multiply';
|