@atlaskit/tokens 1.49.0 → 1.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1589 -1591
- package/README.md +14 -8
- package/codemods/css-to-design-tokens/lib/colors.tsx +47 -49
- package/codemods/css-to-design-tokens/lib/declaration.tsx +26 -26
- package/codemods/css-to-design-tokens/lib/legacy-colors.tsx +326 -326
- package/codemods/css-to-design-tokens/lib/meta.tsx +116 -122
- package/codemods/css-to-design-tokens/lib/tokens.tsx +28 -35
- package/codemods/css-to-design-tokens/lib/value.tsx +70 -72
- package/codemods/css-to-design-tokens/transform.tsx +68 -72
- package/codemods/hypermod.config.tsx +5 -5
- package/codemods/remove-fallbacks-color/transform.tsx +16 -18
- package/codemods/theme-to-design-tokens/transform.tsx +505 -588
- package/codemods/theme-to-design-tokens/utils/ast-meta.tsx +139 -147
- package/codemods/theme-to-design-tokens/utils/ast.tsx +23 -34
- package/codemods/theme-to-design-tokens/utils/color.tsx +25 -26
- package/codemods/theme-to-design-tokens/utils/css-utils.tsx +27 -30
- package/codemods/theme-to-design-tokens/utils/fuzzy-search.tsx +272 -290
- package/codemods/theme-to-design-tokens/utils/legacy-colors.tsx +224 -224
- package/codemods/theme-to-design-tokens/utils/named-colors.tsx +148 -148
- package/codemods/theme-to-design-tokens/utils/string-utils.tsx +10 -16
- package/codemods/utils/tokens.tsx +371 -371
- package/dist/cjs/artifacts/atlassian-dark-token-value-for-contrast-check.js +1 -1
- package/dist/cjs/artifacts/atlassian-light-token-value-for-contrast-check.js +1 -1
- package/dist/cjs/artifacts/generated-pairs.js +1 -1
- package/dist/cjs/artifacts/palettes-raw/typography-palette.js +45 -30
- package/dist/cjs/artifacts/theme-import-map.js +1 -1
- package/dist/cjs/artifacts/themes/atlassian-typography-minor3.js +2 -2
- package/dist/cjs/artifacts/token-default-values.js +1 -1
- package/dist/cjs/artifacts/token-names.js +1 -1
- package/dist/cjs/artifacts/tokens-raw/atlassian-typography-adg3.js +20 -20
- package/dist/cjs/artifacts/tokens-raw/atlassian-typography-minor3.js +13 -13
- package/dist/es2019/artifacts/atlassian-dark-token-value-for-contrast-check.js +1 -1
- package/dist/es2019/artifacts/atlassian-light-token-value-for-contrast-check.js +1 -1
- package/dist/es2019/artifacts/generated-pairs.js +1 -1
- package/dist/es2019/artifacts/palettes-raw/typography-palette.js +45 -30
- package/dist/es2019/artifacts/theme-import-map.js +1 -1
- package/dist/es2019/artifacts/themes/atlassian-typography-minor3.js +2 -2
- package/dist/es2019/artifacts/token-default-values.js +1 -1
- package/dist/es2019/artifacts/token-names.js +1 -1
- package/dist/es2019/artifacts/tokens-raw/atlassian-typography-adg3.js +20 -20
- package/dist/es2019/artifacts/tokens-raw/atlassian-typography-minor3.js +13 -13
- package/dist/esm/artifacts/atlassian-dark-token-value-for-contrast-check.js +1 -1
- package/dist/esm/artifacts/atlassian-light-token-value-for-contrast-check.js +1 -1
- package/dist/esm/artifacts/generated-pairs.js +1 -1
- package/dist/esm/artifacts/palettes-raw/typography-palette.js +45 -30
- package/dist/esm/artifacts/theme-import-map.js +1 -1
- package/dist/esm/artifacts/themes/atlassian-typography-minor3.js +2 -2
- package/dist/esm/artifacts/token-default-values.js +1 -1
- package/dist/esm/artifacts/token-names.js +1 -1
- package/dist/esm/artifacts/tokens-raw/atlassian-typography-adg3.js +20 -20
- package/dist/esm/artifacts/tokens-raw/atlassian-typography-minor3.js +13 -13
- package/dist/types/artifacts/atlassian-dark-token-value-for-contrast-check.d.ts +1 -1
- package/dist/types/artifacts/atlassian-light-token-value-for-contrast-check.d.ts +1 -1
- package/dist/types/artifacts/generated-pairs.d.ts +1 -1
- package/dist/types/artifacts/palettes-raw/typography-palette.d.ts +1 -1
- package/dist/types/artifacts/theme-import-map.d.ts +2 -2
- package/dist/types/artifacts/themes/atlassian-typography-minor3.d.ts +2 -2
- package/dist/types/artifacts/token-default-values.d.ts +1 -1
- package/dist/types/artifacts/token-names.d.ts +1 -1
- package/dist/types/artifacts/tokens-raw/atlassian-typography-adg3.d.ts +1 -1
- package/dist/types/artifacts/tokens-raw/atlassian-typography-minor3.d.ts +1 -1
- package/dist/types/artifacts/types-internal.d.ts +1 -1
- package/dist/types/artifacts/types.d.ts +1 -1
- package/dist/types/babel-plugin/plugin.d.ts +1 -1
- package/dist/types/custom-theme.d.ts +2 -2
- package/dist/types/enable-global-theme.d.ts +2 -2
- package/dist/types/entry-points/css-type-schema.codegen.d.ts +1 -1
- package/dist/types/entry-points/token-ids.d.ts +1 -1
- package/dist/types/get-global-theme.d.ts +1 -1
- package/dist/types/get-ssr-auto-script.d.ts +1 -1
- package/dist/types/get-theme-html-attrs.d.ts +1 -1
- package/dist/types/get-theme-styles.d.ts +1 -1
- package/dist/types/get-token.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/load-custom-theme-styles.d.ts +1 -1
- package/dist/types/set-global-theme.d.ts +2 -2
- package/dist/types/theme-state-transformer.d.ts +1 -1
- package/dist/types/utils/color-detection.d.ts +1 -1
- package/dist/types/utils/color-mode-listeners.d.ts +1 -1
- package/dist/types/utils/configure-page.d.ts +1 -1
- package/dist/types/utils/contrast-mode-listeners.d.ts +1 -1
- package/dist/types/utils/custom-theme-loading-utils.d.ts +1 -1
- package/dist/types/utils/custom-theme-token-contrast-check.d.ts +1 -1
- package/dist/types/utils/generate-custom-color-ramp.d.ts +2 -2
- package/dist/types/utils/get-increased-contrast-theme.d.ts +1 -1
- package/dist/types/utils/get-theme-preferences.d.ts +1 -1
- package/dist/types/utils/theme-loading.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/atlassian-dark-token-value-for-contrast-check.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/atlassian-light-token-value-for-contrast-check.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/generated-pairs.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/palettes-raw/typography-palette.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/theme-import-map.d.ts +2 -2
- package/dist/types-ts4.5/artifacts/themes/atlassian-typography-minor3.d.ts +2 -2
- package/dist/types-ts4.5/artifacts/token-default-values.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/token-names.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-typography-adg3.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-typography-minor3.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/types-internal.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/types.d.ts +1 -1
- package/dist/types-ts4.5/babel-plugin/plugin.d.ts +1 -1
- package/dist/types-ts4.5/custom-theme.d.ts +2 -2
- package/dist/types-ts4.5/enable-global-theme.d.ts +2 -2
- package/dist/types-ts4.5/entry-points/css-type-schema.codegen.d.ts +1 -1
- package/dist/types-ts4.5/entry-points/token-ids.d.ts +1 -1
- package/dist/types-ts4.5/get-global-theme.d.ts +1 -1
- package/dist/types-ts4.5/get-ssr-auto-script.d.ts +1 -1
- package/dist/types-ts4.5/get-theme-html-attrs.d.ts +1 -1
- package/dist/types-ts4.5/get-theme-styles.d.ts +1 -1
- package/dist/types-ts4.5/get-token.d.ts +1 -1
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/load-custom-theme-styles.d.ts +1 -1
- package/dist/types-ts4.5/set-global-theme.d.ts +2 -2
- package/dist/types-ts4.5/theme-state-transformer.d.ts +1 -1
- package/dist/types-ts4.5/utils/color-detection.d.ts +1 -1
- package/dist/types-ts4.5/utils/color-mode-listeners.d.ts +1 -1
- package/dist/types-ts4.5/utils/configure-page.d.ts +1 -1
- package/dist/types-ts4.5/utils/contrast-mode-listeners.d.ts +1 -1
- package/dist/types-ts4.5/utils/custom-theme-loading-utils.d.ts +1 -1
- package/dist/types-ts4.5/utils/custom-theme-token-contrast-check.d.ts +1 -1
- package/dist/types-ts4.5/utils/generate-custom-color-ramp.d.ts +2 -2
- package/dist/types-ts4.5/utils/get-increased-contrast-theme.d.ts +1 -1
- package/dist/types-ts4.5/utils/get-theme-preferences.d.ts +1 -1
- package/dist/types-ts4.5/utils/theme-loading.d.ts +1 -1
- package/package.json +3 -5
- package/report.api.md +2071 -2090
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import tokens, { CSSTokenMap } from './artifacts/token-names';
|
|
1
|
+
import tokens, { type CSSTokenMap } from './artifacts/token-names';
|
|
2
2
|
type Tokens = typeof tokens;
|
|
3
3
|
/**
|
|
4
4
|
* Takes a dot-separated token name and an optional fallback, and returns the CSS custom property for the corresponding token.
|
|
@@ -9,7 +9,7 @@ export { default as getSSRAutoScript } from './get-ssr-auto-script';
|
|
|
9
9
|
export { default as useThemeObserver } from './use-theme-observer';
|
|
10
10
|
export { default as ThemeMutationObserver } from './theme-mutation-observer';
|
|
11
11
|
export { default as getGlobalTheme } from './get-global-theme';
|
|
12
|
-
export { themeStringToObject, themeObjectToString
|
|
12
|
+
export { themeStringToObject, themeObjectToString } from './theme-state-transformer';
|
|
13
13
|
export type { CSSToken } from './artifacts/token-names';
|
|
14
14
|
export type { ActiveTokens } from './artifacts/types';
|
|
15
15
|
export type { ThemeColorModes, Themes, ThemeFileNames, ThemeIds, ThemeOptionsSchema, ThemeState, } from './theme-config';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { UnbindFn } from 'bind-event-listener';
|
|
2
|
-
import { ThemeIdsWithOverrides, ThemeState } from './theme-config';
|
|
1
|
+
import { type UnbindFn } from 'bind-event-listener';
|
|
2
|
+
import { type ThemeIdsWithOverrides, type ThemeState } from './theme-config';
|
|
3
3
|
/**
|
|
4
4
|
* Sets the theme globally at runtime. This updates the `data-theme` and `data-color-mode` attributes on your page's <html> tag.
|
|
5
5
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import tokens from '../artifacts/token-names';
|
|
2
|
-
import { ThemeColorModes, ThemeOptionsSchema } from '../theme-config';
|
|
2
|
+
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[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import tokens from '../artifacts/token-names';
|
|
2
|
-
import { CSSColor, ThemeColorModes } from '../theme-config';
|
|
1
|
+
import type tokens from '../artifacts/token-names';
|
|
2
|
+
import { type CSSColor, type ThemeColorModes } from '../theme-config';
|
|
3
3
|
type Token = keyof typeof tokens;
|
|
4
4
|
type TokenMap = {
|
|
5
5
|
[key in Token]?: number | string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ThemeIdsWithOverrides, ThemeState } from '../theme-config';
|
|
1
|
+
import { type ThemeIdsWithOverrides, type ThemeState } from '../theme-config';
|
|
2
2
|
export declare const getThemePreferences: (themeState: ThemeState) => ThemeIdsWithOverrides[];
|
|
3
3
|
export declare const getThemeOverridePreferences: (themeState: ThemeState) => ThemeIdsWithOverrides[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ThemeIdsWithOverrides } from '../theme-config';
|
|
1
|
+
import { type ThemeIdsWithOverrides } from '../theme-config';
|
|
2
2
|
export declare const loadAndAppendThemeCss: (themeId: ThemeIdsWithOverrides) => Promise<void>;
|
|
3
3
|
export declare const loadThemeCss: (themeId: ThemeIdsWithOverrides) => Promise<string>;
|
|
4
4
|
export declare const darkModeMediaQuery = "(prefers-color-scheme: dark)";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/tokens",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.50.0",
|
|
4
4
|
"description": "Design tokens are the single source of truth to name and store design decisions.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -49,12 +49,11 @@
|
|
|
49
49
|
"@af/accessibility-testing": "*",
|
|
50
50
|
"@af/formatting": "*",
|
|
51
51
|
"@atlaskit/calendar": "^14.2.0",
|
|
52
|
-
"@atlaskit/checkbox": "^13.
|
|
52
|
+
"@atlaskit/checkbox": "^13.4.0",
|
|
53
53
|
"@atlaskit/radio": "^6.3.0",
|
|
54
54
|
"@atlaskit/textfield": "^6.3.0",
|
|
55
55
|
"@atlaskit/tooltip": "^18.4.0",
|
|
56
56
|
"@atlaskit/visual-regression": "*",
|
|
57
|
-
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
58
57
|
"@atlassian/codegen": "^0.1.0",
|
|
59
58
|
"@atlassian/feature-flags-test-utils": "*",
|
|
60
59
|
"@babel/core": "^7.20.0",
|
|
@@ -136,6 +135,5 @@
|
|
|
136
135
|
"type": "boolean"
|
|
137
136
|
}
|
|
138
137
|
},
|
|
139
|
-
"homepage": "https://atlassian.design/components/tokens"
|
|
140
|
-
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
138
|
+
"homepage": "https://atlassian.design/components/tokens"
|
|
141
139
|
}
|