@atlaskit/tokens 1.25.2 → 1.26.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 +6 -0
- package/dist/cjs/artifacts/theme-import-map.js +13 -1
- package/dist/cjs/artifacts/themes/atlassian-dark-increased-contrast.js +12 -0
- package/dist/cjs/artifacts/themes/atlassian-light-increased-contrast.js +12 -0
- package/dist/cjs/artifacts/tokens-raw/atlassian-dark-increased-contrast.js +8687 -0
- package/dist/cjs/artifacts/tokens-raw/atlassian-light-increased-contrast.js +8653 -0
- package/dist/cjs/constants.js +2 -1
- package/dist/cjs/enable-global-theme.js +3 -0
- package/dist/cjs/get-ssr-auto-script.js +8 -2
- package/dist/cjs/get-theme-html-attrs.js +9 -0
- package/dist/cjs/get-theme-styles.js +9 -0
- package/dist/cjs/get-token-value.js +1 -1
- package/dist/cjs/get-token.js +1 -1
- package/dist/cjs/set-global-theme.js +35 -20
- package/dist/cjs/theme-config.js +29 -2
- package/dist/cjs/tokens/atlassian-dark-increased-contrast/color/accent.js +271 -0
- package/dist/cjs/tokens/atlassian-dark-increased-contrast/color/background.js +104 -0
- package/dist/cjs/tokens/atlassian-dark-increased-contrast/color/border.js +46 -0
- package/dist/cjs/tokens/atlassian-dark-increased-contrast/color/chart.js +309 -0
- package/dist/cjs/tokens/atlassian-dark-increased-contrast/color/icon.js +45 -0
- package/dist/cjs/tokens/atlassian-dark-increased-contrast/color/interaction.js +22 -0
- package/dist/cjs/tokens/atlassian-dark-increased-contrast/color/skeleton.js +21 -0
- package/dist/cjs/tokens/atlassian-dark-increased-contrast/color/text.js +56 -0
- package/dist/cjs/tokens/atlassian-dark-increased-contrast/elevation/shadow.js +66 -0
- package/dist/cjs/tokens/atlassian-light-increased-contrast/color/accent.js +423 -0
- package/dist/cjs/tokens/atlassian-light-increased-contrast/color/background.js +145 -0
- package/dist/cjs/tokens/atlassian-light-increased-contrast/color/border.js +50 -0
- package/dist/cjs/tokens/atlassian-light-increased-contrast/color/chart.js +418 -0
- package/dist/cjs/tokens/atlassian-light-increased-contrast/color/icon.js +49 -0
- package/dist/cjs/tokens/atlassian-light-increased-contrast/color/interaction.js +22 -0
- package/dist/cjs/tokens/atlassian-light-increased-contrast/color/skeleton.js +21 -0
- package/dist/cjs/tokens/atlassian-light-increased-contrast/color/text.js +56 -0
- package/dist/cjs/tokens/atlassian-light-increased-contrast/elevation/shadow.js +62 -0
- package/dist/cjs/tokens/atlassian-light-increased-contrast/elevation/surface.js +18 -0
- package/dist/cjs/utils/configure-page.js +16 -1
- package/dist/cjs/utils/contrast-mode-listeners.js +65 -0
- package/dist/cjs/utils/get-increased-contrast-theme.js +20 -0
- package/dist/cjs/utils/get-theme-preferences.js +23 -1
- package/dist/cjs/utils/theme-loading.js +3 -2
- package/dist/es2019/artifacts/theme-import-map.js +5 -1
- package/dist/es2019/artifacts/themes/atlassian-dark-increased-contrast.js +401 -0
- package/dist/es2019/artifacts/themes/atlassian-light-increased-contrast.js +401 -0
- package/dist/es2019/artifacts/tokens-raw/atlassian-dark-increased-contrast.js +8681 -0
- package/dist/es2019/artifacts/tokens-raw/atlassian-light-increased-contrast.js +8647 -0
- package/dist/es2019/constants.js +1 -0
- package/dist/es2019/enable-global-theme.js +2 -0
- package/dist/es2019/get-ssr-auto-script.js +17 -11
- package/dist/es2019/get-theme-html-attrs.js +12 -2
- package/dist/es2019/get-theme-styles.js +7 -0
- package/dist/es2019/get-token-value.js +1 -1
- package/dist/es2019/get-token.js +1 -1
- package/dist/es2019/set-global-theme.js +14 -0
- package/dist/es2019/theme-config.js +28 -1
- package/dist/es2019/tokens/atlassian-dark-increased-contrast/color/accent.js +265 -0
- package/dist/es2019/tokens/atlassian-dark-increased-contrast/color/background.js +98 -0
- package/dist/es2019/tokens/atlassian-dark-increased-contrast/color/border.js +40 -0
- package/dist/es2019/tokens/atlassian-dark-increased-contrast/color/chart.js +303 -0
- package/dist/es2019/tokens/atlassian-dark-increased-contrast/color/icon.js +39 -0
- package/dist/es2019/tokens/atlassian-dark-increased-contrast/color/interaction.js +16 -0
- package/dist/es2019/tokens/atlassian-dark-increased-contrast/color/skeleton.js +15 -0
- package/dist/es2019/tokens/atlassian-dark-increased-contrast/color/text.js +50 -0
- package/dist/es2019/tokens/atlassian-dark-increased-contrast/elevation/shadow.js +60 -0
- package/dist/es2019/tokens/atlassian-light-increased-contrast/color/accent.js +417 -0
- package/dist/es2019/tokens/atlassian-light-increased-contrast/color/background.js +139 -0
- package/dist/es2019/tokens/atlassian-light-increased-contrast/color/border.js +44 -0
- package/dist/es2019/tokens/atlassian-light-increased-contrast/color/chart.js +412 -0
- package/dist/es2019/tokens/atlassian-light-increased-contrast/color/icon.js +43 -0
- package/dist/es2019/tokens/atlassian-light-increased-contrast/color/interaction.js +16 -0
- package/dist/es2019/tokens/atlassian-light-increased-contrast/color/skeleton.js +15 -0
- package/dist/es2019/tokens/atlassian-light-increased-contrast/color/text.js +50 -0
- package/dist/es2019/tokens/atlassian-light-increased-contrast/elevation/shadow.js +56 -0
- package/dist/es2019/tokens/atlassian-light-increased-contrast/elevation/surface.js +12 -0
- package/dist/es2019/utils/configure-page.js +18 -1
- package/dist/es2019/utils/contrast-mode-listeners.js +48 -0
- package/dist/es2019/utils/get-increased-contrast-theme.js +13 -0
- package/dist/es2019/utils/get-theme-preferences.js +23 -1
- package/dist/es2019/utils/theme-loading.js +2 -1
- package/dist/esm/artifacts/theme-import-map.js +9 -1
- package/dist/esm/artifacts/themes/atlassian-dark-increased-contrast.js +6 -0
- package/dist/esm/artifacts/themes/atlassian-light-increased-contrast.js +6 -0
- package/dist/esm/artifacts/tokens-raw/atlassian-dark-increased-contrast.js +8681 -0
- package/dist/esm/artifacts/tokens-raw/atlassian-light-increased-contrast.js +8647 -0
- package/dist/esm/constants.js +1 -0
- package/dist/esm/enable-global-theme.js +3 -0
- package/dist/esm/get-ssr-auto-script.js +10 -4
- package/dist/esm/get-theme-html-attrs.js +10 -1
- package/dist/esm/get-theme-styles.js +9 -0
- package/dist/esm/get-token-value.js +1 -1
- package/dist/esm/get-token.js +1 -1
- package/dist/esm/set-global-theme.js +35 -20
- package/dist/esm/theme-config.js +28 -1
- package/dist/esm/tokens/atlassian-dark-increased-contrast/color/accent.js +265 -0
- package/dist/esm/tokens/atlassian-dark-increased-contrast/color/background.js +98 -0
- package/dist/esm/tokens/atlassian-dark-increased-contrast/color/border.js +40 -0
- package/dist/esm/tokens/atlassian-dark-increased-contrast/color/chart.js +303 -0
- package/dist/esm/tokens/atlassian-dark-increased-contrast/color/icon.js +39 -0
- package/dist/esm/tokens/atlassian-dark-increased-contrast/color/interaction.js +16 -0
- package/dist/esm/tokens/atlassian-dark-increased-contrast/color/skeleton.js +15 -0
- package/dist/esm/tokens/atlassian-dark-increased-contrast/color/text.js +50 -0
- package/dist/esm/tokens/atlassian-dark-increased-contrast/elevation/shadow.js +60 -0
- package/dist/esm/tokens/atlassian-light-increased-contrast/color/accent.js +417 -0
- package/dist/esm/tokens/atlassian-light-increased-contrast/color/background.js +139 -0
- package/dist/esm/tokens/atlassian-light-increased-contrast/color/border.js +44 -0
- package/dist/esm/tokens/atlassian-light-increased-contrast/color/chart.js +412 -0
- package/dist/esm/tokens/atlassian-light-increased-contrast/color/icon.js +43 -0
- package/dist/esm/tokens/atlassian-light-increased-contrast/color/interaction.js +16 -0
- package/dist/esm/tokens/atlassian-light-increased-contrast/color/skeleton.js +15 -0
- package/dist/esm/tokens/atlassian-light-increased-contrast/color/text.js +50 -0
- package/dist/esm/tokens/atlassian-light-increased-contrast/elevation/shadow.js +56 -0
- package/dist/esm/tokens/atlassian-light-increased-contrast/elevation/surface.js +12 -0
- package/dist/esm/utils/configure-page.js +16 -1
- package/dist/esm/utils/contrast-mode-listeners.js +58 -0
- package/dist/esm/utils/get-increased-contrast-theme.js +14 -0
- package/dist/esm/utils/get-theme-preferences.js +23 -1
- package/dist/esm/utils/theme-loading.js +2 -1
- package/dist/types/artifacts/theme-import-map.d.ts +1 -1
- package/dist/types/artifacts/themes/atlassian-dark-increased-contrast.d.ts +7 -0
- package/dist/types/artifacts/themes/atlassian-light-increased-contrast.d.ts +7 -0
- package/dist/types/artifacts/tokens-raw/atlassian-dark-increased-contrast.d.ts +133 -0
- package/dist/types/artifacts/tokens-raw/atlassian-light-increased-contrast.d.ts +113 -0
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/enable-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/set-global-theme.d.ts +2 -1
- package/dist/types/theme-config.d.ts +29 -6
- package/dist/types/tokens/atlassian-dark-increased-contrast/color/accent.d.ts +4 -0
- package/dist/types/tokens/atlassian-dark-increased-contrast/color/background.d.ts +4 -0
- package/dist/types/tokens/atlassian-dark-increased-contrast/color/border.d.ts +4 -0
- package/dist/types/tokens/atlassian-dark-increased-contrast/color/chart.d.ts +4 -0
- package/dist/types/tokens/atlassian-dark-increased-contrast/color/icon.d.ts +4 -0
- package/dist/types/tokens/atlassian-dark-increased-contrast/color/interaction.d.ts +4 -0
- package/dist/types/tokens/atlassian-dark-increased-contrast/color/skeleton.d.ts +4 -0
- package/dist/types/tokens/atlassian-dark-increased-contrast/color/text.d.ts +4 -0
- package/dist/types/tokens/atlassian-dark-increased-contrast/elevation/shadow.d.ts +4 -0
- package/dist/types/tokens/atlassian-light-increased-contrast/color/accent.d.ts +4 -0
- package/dist/types/tokens/atlassian-light-increased-contrast/color/background.d.ts +4 -0
- package/dist/types/tokens/atlassian-light-increased-contrast/color/border.d.ts +4 -0
- package/dist/types/tokens/atlassian-light-increased-contrast/color/chart.d.ts +4 -0
- package/dist/types/tokens/atlassian-light-increased-contrast/color/icon.d.ts +4 -0
- package/dist/types/tokens/atlassian-light-increased-contrast/color/interaction.d.ts +4 -0
- package/dist/types/tokens/atlassian-light-increased-contrast/color/skeleton.d.ts +4 -0
- package/dist/types/tokens/atlassian-light-increased-contrast/color/text.d.ts +4 -0
- package/dist/types/tokens/atlassian-light-increased-contrast/elevation/shadow.d.ts +4 -0
- package/dist/types/tokens/atlassian-light-increased-contrast/elevation/surface.d.ts +4 -0
- package/dist/types/utils/configure-page.d.ts +1 -1
- package/dist/types/utils/contrast-mode-listeners.d.ts +13 -0
- package/dist/types/utils/get-increased-contrast-theme.d.ts +5 -0
- package/dist/types/utils/theme-loading.d.ts +1 -0
- package/dist/types-ts4.5/artifacts/theme-import-map.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/themes/atlassian-dark-increased-contrast.d.ts +7 -0
- package/dist/types-ts4.5/artifacts/themes/atlassian-light-increased-contrast.d.ts +7 -0
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-dark-increased-contrast.d.ts +133 -0
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-light-increased-contrast.d.ts +113 -0
- package/dist/types-ts4.5/constants.d.ts +1 -0
- package/dist/types-ts4.5/enable-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/set-global-theme.d.ts +2 -1
- package/dist/types-ts4.5/theme-config.d.ts +35 -4
- package/dist/types-ts4.5/tokens/atlassian-dark-increased-contrast/color/accent.d.ts +4 -0
- package/dist/types-ts4.5/tokens/atlassian-dark-increased-contrast/color/background.d.ts +4 -0
- package/dist/types-ts4.5/tokens/atlassian-dark-increased-contrast/color/border.d.ts +4 -0
- package/dist/types-ts4.5/tokens/atlassian-dark-increased-contrast/color/chart.d.ts +4 -0
- package/dist/types-ts4.5/tokens/atlassian-dark-increased-contrast/color/icon.d.ts +4 -0
- package/dist/types-ts4.5/tokens/atlassian-dark-increased-contrast/color/interaction.d.ts +4 -0
- package/dist/types-ts4.5/tokens/atlassian-dark-increased-contrast/color/skeleton.d.ts +4 -0
- package/dist/types-ts4.5/tokens/atlassian-dark-increased-contrast/color/text.d.ts +4 -0
- package/dist/types-ts4.5/tokens/atlassian-dark-increased-contrast/elevation/shadow.d.ts +4 -0
- package/dist/types-ts4.5/tokens/atlassian-light-increased-contrast/color/accent.d.ts +4 -0
- package/dist/types-ts4.5/tokens/atlassian-light-increased-contrast/color/background.d.ts +4 -0
- package/dist/types-ts4.5/tokens/atlassian-light-increased-contrast/color/border.d.ts +4 -0
- package/dist/types-ts4.5/tokens/atlassian-light-increased-contrast/color/chart.d.ts +4 -0
- package/dist/types-ts4.5/tokens/atlassian-light-increased-contrast/color/icon.d.ts +4 -0
- package/dist/types-ts4.5/tokens/atlassian-light-increased-contrast/color/interaction.d.ts +4 -0
- package/dist/types-ts4.5/tokens/atlassian-light-increased-contrast/color/skeleton.d.ts +4 -0
- package/dist/types-ts4.5/tokens/atlassian-light-increased-contrast/color/text.d.ts +4 -0
- package/dist/types-ts4.5/tokens/atlassian-light-increased-contrast/elevation/shadow.d.ts +4 -0
- package/dist/types-ts4.5/tokens/atlassian-light-increased-contrast/elevation/surface.d.ts +4 -0
- package/dist/types-ts4.5/utils/configure-page.d.ts +1 -1
- package/dist/types-ts4.5/utils/contrast-mode-listeners.d.ts +13 -0
- package/dist/types-ts4.5/utils/get-increased-contrast-theme.d.ts +5 -0
- package/dist/types-ts4.5/utils/theme-loading.d.ts +1 -0
- package/figma/atlassian-dark-increased-contrast.json +3542 -0
- package/figma/atlassian-light-increased-contrast.json +3523 -0
- package/package.json +4 -1
- package/report.api.md +38 -5
- package/tmp/api-report-tmp.d.ts +19 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/tokens",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.26.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/"
|
|
@@ -115,6 +115,9 @@
|
|
|
115
115
|
},
|
|
116
116
|
"platform.design-system-team.saturated-palette-changes_asoro": {
|
|
117
117
|
"type": "boolean"
|
|
118
|
+
},
|
|
119
|
+
"platform.design-system-team.increased-contrast-themes": {
|
|
120
|
+
"type": "boolean"
|
|
118
121
|
}
|
|
119
122
|
},
|
|
120
123
|
"homepage": "https://atlassian.design/components/tokens",
|
package/report.api.md
CHANGED
|
@@ -1230,6 +1230,7 @@ interface DesignToken<TValue, Group extends Groups>
|
|
|
1230
1230
|
export const enableGlobalTheme: (
|
|
1231
1231
|
{
|
|
1232
1232
|
colorMode,
|
|
1233
|
+
contrastMode,
|
|
1233
1234
|
dark,
|
|
1234
1235
|
light,
|
|
1235
1236
|
shape,
|
|
@@ -1281,6 +1282,7 @@ export const getGlobalTheme: () => Partial<ActiveThemeState>;
|
|
|
1281
1282
|
// @public
|
|
1282
1283
|
export const getSSRAutoScript: (
|
|
1283
1284
|
colorMode: ThemeState['colorMode'],
|
|
1285
|
+
contrastMode?: ThemeState['contrastMode'],
|
|
1284
1286
|
) => string | undefined;
|
|
1285
1287
|
|
|
1286
1288
|
// @public
|
|
@@ -1288,6 +1290,7 @@ export const getThemeHtmlAttrs: ({
|
|
|
1288
1290
|
colorMode,
|
|
1289
1291
|
dark,
|
|
1290
1292
|
light,
|
|
1293
|
+
contrastMode,
|
|
1291
1294
|
shape,
|
|
1292
1295
|
spacing,
|
|
1293
1296
|
typography,
|
|
@@ -1800,6 +1803,7 @@ type Replacement = InternalTokenIds | InternalTokenIds[];
|
|
|
1800
1803
|
export const setGlobalTheme: (
|
|
1801
1804
|
{
|
|
1802
1805
|
colorMode,
|
|
1806
|
+
contrastMode,
|
|
1803
1807
|
dark,
|
|
1804
1808
|
light,
|
|
1805
1809
|
shape,
|
|
@@ -1862,11 +1866,10 @@ interface ThemeConfig {
|
|
|
1862
1866
|
};
|
|
1863
1867
|
// (undocumented)
|
|
1864
1868
|
displayName: string;
|
|
1865
|
-
|
|
1866
|
-
extends?: ExtensionThemeId;
|
|
1869
|
+
extends?: ThemeIds;
|
|
1867
1870
|
// (undocumented)
|
|
1868
1871
|
id: ThemeIds | ThemeOverrideIds;
|
|
1869
|
-
|
|
1872
|
+
increasesContrastFor?: ThemeIds;
|
|
1870
1873
|
override?: ThemeIds;
|
|
1871
1874
|
// (undocumented)
|
|
1872
1875
|
palette: Palettes;
|
|
@@ -1875,13 +1878,21 @@ interface ThemeConfig {
|
|
|
1875
1878
|
// @public (undocumented)
|
|
1876
1879
|
export const themeConfig: Record<ThemeOverrides | Themes, ThemeConfig>;
|
|
1877
1880
|
|
|
1881
|
+
// @public (undocumented)
|
|
1882
|
+
type ThemeContrastModes = (typeof themeContrastModes)[number];
|
|
1883
|
+
|
|
1884
|
+
// @public
|
|
1885
|
+
const themeContrastModes: readonly ['more', 'no-preference', 'auto'];
|
|
1886
|
+
|
|
1878
1887
|
// @public (undocumented)
|
|
1879
1888
|
export type ThemeIds = (typeof themeIds)[number];
|
|
1880
1889
|
|
|
1881
1890
|
// @public
|
|
1882
1891
|
const themeIds: readonly [
|
|
1892
|
+
'light-increased-contrast',
|
|
1883
1893
|
'light',
|
|
1884
1894
|
'dark',
|
|
1895
|
+
'dark-increased-contrast',
|
|
1885
1896
|
'legacy-light',
|
|
1886
1897
|
'legacy-dark',
|
|
1887
1898
|
'spacing',
|
|
@@ -1896,8 +1907,10 @@ type ThemeIdsWithOverrides = (typeof themeIdsWithOverrides)[number];
|
|
|
1896
1907
|
|
|
1897
1908
|
// @public (undocumented)
|
|
1898
1909
|
const themeIdsWithOverrides: readonly [
|
|
1910
|
+
'light-increased-contrast',
|
|
1899
1911
|
'light',
|
|
1900
1912
|
'dark',
|
|
1913
|
+
'dark-increased-contrast',
|
|
1901
1914
|
'legacy-light',
|
|
1902
1915
|
'legacy-dark',
|
|
1903
1916
|
'spacing',
|
|
@@ -1957,9 +1970,11 @@ type ThemeOverrides =
|
|
|
1957
1970
|
// @public
|
|
1958
1971
|
export type Themes =
|
|
1959
1972
|
| 'atlassian-dark'
|
|
1973
|
+
| 'atlassian-dark-increased-contrast'
|
|
1960
1974
|
| 'atlassian-legacy-dark'
|
|
1961
1975
|
| 'atlassian-legacy-light'
|
|
1962
1976
|
| 'atlassian-light'
|
|
1977
|
+
| 'atlassian-light-increased-contrast'
|
|
1963
1978
|
| 'atlassian-shape'
|
|
1964
1979
|
| 'atlassian-spacing'
|
|
1965
1980
|
| 'atlassian-typography'
|
|
@@ -1971,9 +1986,27 @@ export interface ThemeState {
|
|
|
1971
1986
|
// (undocumented)
|
|
1972
1987
|
colorMode: ThemeColorModes;
|
|
1973
1988
|
// (undocumented)
|
|
1974
|
-
|
|
1989
|
+
contrastMode: ThemeContrastModes;
|
|
1975
1990
|
// (undocumented)
|
|
1976
|
-
|
|
1991
|
+
dark: Extract<
|
|
1992
|
+
ThemeIds,
|
|
1993
|
+
| 'dark'
|
|
1994
|
+
| 'dark-increased-contrast'
|
|
1995
|
+
| 'legacy-dark'
|
|
1996
|
+
| 'legacy-light'
|
|
1997
|
+
| 'light'
|
|
1998
|
+
| 'light-increased-contrast'
|
|
1999
|
+
>;
|
|
2000
|
+
// (undocumented)
|
|
2001
|
+
light: Extract<
|
|
2002
|
+
ThemeIds,
|
|
2003
|
+
| 'dark'
|
|
2004
|
+
| 'dark-increased-contrast'
|
|
2005
|
+
| 'legacy-dark'
|
|
2006
|
+
| 'legacy-light'
|
|
2007
|
+
| 'light'
|
|
2008
|
+
| 'light-increased-contrast'
|
|
2009
|
+
>;
|
|
1977
2010
|
// (undocumented)
|
|
1978
2011
|
shape?: Extract<ThemeIds, 'shape'>;
|
|
1979
2012
|
// (undocumented)
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -760,7 +760,7 @@ interface DesignToken<TValue, Group extends Groups> extends Token<TValue, Group>
|
|
|
760
760
|
}
|
|
761
761
|
|
|
762
762
|
// @public
|
|
763
|
-
export const enableGlobalTheme: ({ colorMode, dark, light, shape, spacing, typography, UNSAFE_themeOptions, }?: Partial<ThemeState>, themeLoader?: ((id: ThemeIdsWithOverrides) => void) | undefined) => UnbindFn;
|
|
763
|
+
export const enableGlobalTheme: ({ colorMode, contrastMode, dark, light, shape, spacing, typography, UNSAFE_themeOptions, }?: Partial<ThemeState>, themeLoader?: ((id: ThemeIdsWithOverrides) => void) | undefined) => UnbindFn;
|
|
764
764
|
|
|
765
765
|
// @public (undocumented)
|
|
766
766
|
type ExperimentalReplacement = InternalTokenIds | InternalTokenIds[] | string;
|
|
@@ -797,10 +797,10 @@ interface FontFamilyTokenSchema<BaseToken> {
|
|
|
797
797
|
export const getGlobalTheme: () => Partial<ActiveThemeState>;
|
|
798
798
|
|
|
799
799
|
// @public
|
|
800
|
-
export const getSSRAutoScript: (colorMode: ThemeState['colorMode']) => string | undefined;
|
|
800
|
+
export const getSSRAutoScript: (colorMode: ThemeState['colorMode'], contrastMode?: ThemeState['contrastMode']) => string | undefined;
|
|
801
801
|
|
|
802
802
|
// @public
|
|
803
|
-
export const getThemeHtmlAttrs: ({ colorMode, dark, light, shape, spacing, typography, UNSAFE_themeOptions, }?: Partial<ThemeState>) => Record<string, string>;
|
|
803
|
+
export const getThemeHtmlAttrs: ({ colorMode, dark, light, contrastMode, shape, spacing, typography, UNSAFE_themeOptions, }?: Partial<ThemeState>) => Record<string, string>;
|
|
804
804
|
|
|
805
805
|
// @public
|
|
806
806
|
export const getThemeStyles: (preferences?: 'all' | Partial<ThemeState>) => Promise<ThemeStyles[]>;
|
|
@@ -833,7 +833,7 @@ export type RawToken = DesignToken<string, 'raw'>;
|
|
|
833
833
|
type Replacement = InternalTokenIds | InternalTokenIds[];
|
|
834
834
|
|
|
835
835
|
// @public
|
|
836
|
-
export const setGlobalTheme: ({ colorMode, dark, light, shape, spacing, typography, UNSAFE_themeOptions, }?: Partial<ThemeState>, themeLoader?: ((id: ThemeIdsWithOverrides) => Promise<void> | void) | undefined) => Promise<UnbindFn>;
|
|
836
|
+
export const setGlobalTheme: ({ colorMode, contrastMode, dark, light, shape, spacing, typography, UNSAFE_themeOptions, }?: Partial<ThemeState>, themeLoader?: ((id: ThemeIdsWithOverrides) => Promise<void> | void) | undefined) => Promise<UnbindFn>;
|
|
837
837
|
|
|
838
838
|
// @public (undocumented)
|
|
839
839
|
export type ShadowToken<BaseToken> = DesignToken<Array<{
|
|
@@ -879,11 +879,10 @@ interface ThemeConfig {
|
|
|
879
879
|
};
|
|
880
880
|
// (undocumented)
|
|
881
881
|
displayName: string;
|
|
882
|
-
|
|
883
|
-
extends?: ExtensionThemeId;
|
|
882
|
+
extends?: ThemeIds;
|
|
884
883
|
// (undocumented)
|
|
885
884
|
id: ThemeIds | ThemeOverrideIds;
|
|
886
|
-
|
|
885
|
+
increasesContrastFor?: ThemeIds;
|
|
887
886
|
override?: ThemeIds;
|
|
888
887
|
// (undocumented)
|
|
889
888
|
palette: Palettes;
|
|
@@ -892,17 +891,23 @@ interface ThemeConfig {
|
|
|
892
891
|
// @public (undocumented)
|
|
893
892
|
export const themeConfig: Record<ThemeOverrides | Themes, ThemeConfig>;
|
|
894
893
|
|
|
894
|
+
// @public (undocumented)
|
|
895
|
+
type ThemeContrastModes = (typeof themeContrastModes)[number];
|
|
896
|
+
|
|
897
|
+
// @public
|
|
898
|
+
const themeContrastModes: readonly ["more", "no-preference", "auto"];
|
|
899
|
+
|
|
895
900
|
// @public (undocumented)
|
|
896
901
|
export type ThemeIds = (typeof themeIds)[number];
|
|
897
902
|
|
|
898
903
|
// @public
|
|
899
|
-
const themeIds: readonly ["light", "dark", "legacy-light", "legacy-dark", "spacing", "typography", "shape", "typography-adg3", "typography-minor3"];
|
|
904
|
+
const themeIds: readonly ["light-increased-contrast", "light", "dark", "dark-increased-contrast", "legacy-light", "legacy-dark", "spacing", "typography", "shape", "typography-adg3", "typography-minor3"];
|
|
900
905
|
|
|
901
906
|
// @public (undocumented)
|
|
902
907
|
type ThemeIdsWithOverrides = (typeof themeIdsWithOverrides)[number];
|
|
903
908
|
|
|
904
909
|
// @public (undocumented)
|
|
905
|
-
const themeIdsWithOverrides: readonly ["light", "dark", "legacy-light", "legacy-dark", "spacing", "typography", "shape", "typography-adg3", "typography-minor3", "light-new-input-border", "dark-new-input-border", "light-saturated-palette-changes", "dark-saturated-palette-changes"];
|
|
910
|
+
const themeIdsWithOverrides: readonly ["light-increased-contrast", "light", "dark", "dark-increased-contrast", "legacy-light", "legacy-dark", "spacing", "typography", "shape", "typography-adg3", "typography-minor3", "light-new-input-border", "dark-new-input-border", "light-saturated-palette-changes", "dark-saturated-palette-changes"];
|
|
906
911
|
|
|
907
912
|
// @public
|
|
908
913
|
type ThemeKinds = 'color' | 'shape' | 'spacing' | 'typography';
|
|
@@ -939,16 +944,18 @@ const themeOverrideIds: readonly ["light-new-input-border", "dark-new-input-bord
|
|
|
939
944
|
type ThemeOverrides = 'atlassian-dark-new-input-border' | 'atlassian-dark-saturated-palette-changes' | 'atlassian-light-new-input-border' | 'atlassian-light-saturated-palette-changes';
|
|
940
945
|
|
|
941
946
|
// @public
|
|
942
|
-
export type Themes = 'atlassian-dark' | 'atlassian-legacy-dark' | 'atlassian-legacy-light' | 'atlassian-light' | 'atlassian-shape' | 'atlassian-spacing' | 'atlassian-typography' | 'atlassian-typography-adg3' | 'atlassian-typography-minor3';
|
|
947
|
+
export type Themes = 'atlassian-dark' | 'atlassian-dark-increased-contrast' | 'atlassian-legacy-dark' | 'atlassian-legacy-light' | 'atlassian-light' | 'atlassian-light-increased-contrast' | 'atlassian-shape' | 'atlassian-spacing' | 'atlassian-typography' | 'atlassian-typography-adg3' | 'atlassian-typography-minor3';
|
|
943
948
|
|
|
944
949
|
// @public
|
|
945
950
|
export interface ThemeState {
|
|
946
951
|
// (undocumented)
|
|
947
952
|
colorMode: ThemeColorModes;
|
|
948
953
|
// (undocumented)
|
|
949
|
-
|
|
954
|
+
contrastMode: ThemeContrastModes;
|
|
955
|
+
// (undocumented)
|
|
956
|
+
dark: Extract<ThemeIds, 'dark' | 'dark-increased-contrast' | 'legacy-dark' | 'legacy-light' | 'light' | 'light-increased-contrast'>;
|
|
950
957
|
// (undocumented)
|
|
951
|
-
light: Extract<ThemeIds, 'dark' | 'legacy-dark' | 'legacy-light' | 'light'>;
|
|
958
|
+
light: Extract<ThemeIds, 'dark' | 'dark-increased-contrast' | 'legacy-dark' | 'legacy-light' | 'light' | 'light-increased-contrast'>;
|
|
952
959
|
// (undocumented)
|
|
953
960
|
shape?: Extract<ThemeIds, 'shape'>;
|
|
954
961
|
// (undocumented)
|