@atlaskit/tokens 1.25.2 → 1.26.1
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 +12 -0
- package/dist/cjs/artifacts/palettes-raw/legacy-palette.js +119 -119
- package/dist/cjs/artifacts/palettes-raw/palette.js +133 -133
- package/dist/cjs/artifacts/palettes-raw/shape-palette.js +11 -11
- package/dist/cjs/artifacts/palettes-raw/spacing-scale.js +24 -24
- package/dist/cjs/artifacts/palettes-raw/typography-palette.js +40 -40
- package/dist/cjs/artifacts/palettes-raw/updated-saturated-palette.js +133 -133
- 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-dark-new-input-border.js +2 -2
- package/dist/cjs/artifacts/tokens-raw/atlassian-dark-saturated-palette-changes.js +389 -389
- package/dist/cjs/artifacts/tokens-raw/atlassian-dark.js +389 -389
- package/dist/cjs/artifacts/tokens-raw/atlassian-legacy-dark.js +389 -389
- package/dist/cjs/artifacts/tokens-raw/atlassian-legacy-light.js +389 -389
- package/dist/cjs/artifacts/tokens-raw/atlassian-light-increased-contrast.js +8653 -0
- package/dist/cjs/artifacts/tokens-raw/atlassian-light-new-input-border.js +2 -2
- package/dist/cjs/artifacts/tokens-raw/atlassian-light-saturated-palette-changes.js +389 -389
- package/dist/cjs/artifacts/tokens-raw/atlassian-light.js +389 -389
- package/dist/cjs/artifacts/tokens-raw/atlassian-shape.js +12 -12
- package/dist/cjs/artifacts/tokens-raw/atlassian-spacing.js +24 -24
- package/dist/cjs/artifacts/tokens-raw/atlassian-typography-adg3.js +45 -45
- package/dist/cjs/artifacts/tokens-raw/atlassian-typography-minor3.js +26 -26
- package/dist/cjs/artifacts/tokens-raw/atlassian-typography.js +25 -25
- 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/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/palettes-raw/legacy-palette.js +119 -119
- package/dist/es2019/artifacts/palettes-raw/palette.js +133 -133
- package/dist/es2019/artifacts/palettes-raw/shape-palette.js +11 -11
- package/dist/es2019/artifacts/palettes-raw/spacing-scale.js +24 -24
- package/dist/es2019/artifacts/palettes-raw/typography-palette.js +40 -40
- package/dist/es2019/artifacts/palettes-raw/updated-saturated-palette.js +133 -133
- 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-dark-new-input-border.js +2 -2
- package/dist/es2019/artifacts/tokens-raw/atlassian-dark-saturated-palette-changes.js +389 -389
- package/dist/es2019/artifacts/tokens-raw/atlassian-dark.js +389 -389
- package/dist/es2019/artifacts/tokens-raw/atlassian-legacy-dark.js +389 -389
- package/dist/es2019/artifacts/tokens-raw/atlassian-legacy-light.js +389 -389
- package/dist/es2019/artifacts/tokens-raw/atlassian-light-increased-contrast.js +8647 -0
- package/dist/es2019/artifacts/tokens-raw/atlassian-light-new-input-border.js +2 -2
- package/dist/es2019/artifacts/tokens-raw/atlassian-light-saturated-palette-changes.js +389 -389
- package/dist/es2019/artifacts/tokens-raw/atlassian-light.js +389 -389
- package/dist/es2019/artifacts/tokens-raw/atlassian-shape.js +12 -12
- package/dist/es2019/artifacts/tokens-raw/atlassian-spacing.js +24 -24
- package/dist/es2019/artifacts/tokens-raw/atlassian-typography-adg3.js +45 -45
- package/dist/es2019/artifacts/tokens-raw/atlassian-typography-minor3.js +26 -26
- package/dist/es2019/artifacts/tokens-raw/atlassian-typography.js +25 -25
- 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/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/palettes-raw/legacy-palette.js +119 -119
- package/dist/esm/artifacts/palettes-raw/palette.js +133 -133
- package/dist/esm/artifacts/palettes-raw/shape-palette.js +11 -11
- package/dist/esm/artifacts/palettes-raw/spacing-scale.js +24 -24
- package/dist/esm/artifacts/palettes-raw/typography-palette.js +40 -40
- package/dist/esm/artifacts/palettes-raw/updated-saturated-palette.js +133 -133
- 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-dark-new-input-border.js +2 -2
- package/dist/esm/artifacts/tokens-raw/atlassian-dark-saturated-palette-changes.js +389 -389
- package/dist/esm/artifacts/tokens-raw/atlassian-dark.js +389 -389
- package/dist/esm/artifacts/tokens-raw/atlassian-legacy-dark.js +389 -389
- package/dist/esm/artifacts/tokens-raw/atlassian-legacy-light.js +389 -389
- package/dist/esm/artifacts/tokens-raw/atlassian-light-increased-contrast.js +8647 -0
- package/dist/esm/artifacts/tokens-raw/atlassian-light-new-input-border.js +2 -2
- package/dist/esm/artifacts/tokens-raw/atlassian-light-saturated-palette-changes.js +389 -389
- package/dist/esm/artifacts/tokens-raw/atlassian-light.js +389 -389
- package/dist/esm/artifacts/tokens-raw/atlassian-shape.js +12 -12
- package/dist/esm/artifacts/tokens-raw/atlassian-spacing.js +24 -24
- package/dist/esm/artifacts/tokens-raw/atlassian-typography-adg3.js +45 -45
- package/dist/esm/artifacts/tokens-raw/atlassian-typography-minor3.js +26 -26
- package/dist/esm/artifacts/tokens-raw/atlassian-typography.js +25 -25
- 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/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/palettes-raw/legacy-palette.d.ts +1 -1
- package/dist/types/artifacts/palettes-raw/palette.d.ts +1 -1
- package/dist/types/artifacts/palettes-raw/shape-palette.d.ts +1 -1
- package/dist/types/artifacts/palettes-raw/spacing-scale.d.ts +1 -1
- package/dist/types/artifacts/palettes-raw/typography-palette.d.ts +1 -1
- package/dist/types/artifacts/palettes-raw/updated-saturated-palette.d.ts +1 -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-dark-new-input-border.d.ts +1 -1
- package/dist/types/artifacts/tokens-raw/atlassian-dark-saturated-palette-changes.d.ts +1 -1
- package/dist/types/artifacts/tokens-raw/atlassian-dark.d.ts +1 -1
- package/dist/types/artifacts/tokens-raw/atlassian-legacy-dark.d.ts +1 -1
- package/dist/types/artifacts/tokens-raw/atlassian-legacy-light.d.ts +1 -1
- package/dist/types/artifacts/tokens-raw/atlassian-light-increased-contrast.d.ts +113 -0
- package/dist/types/artifacts/tokens-raw/atlassian-light-new-input-border.d.ts +1 -1
- package/dist/types/artifacts/tokens-raw/atlassian-light-saturated-palette-changes.d.ts +1 -1
- package/dist/types/artifacts/tokens-raw/atlassian-light.d.ts +1 -1
- package/dist/types/artifacts/tokens-raw/atlassian-shape.d.ts +1 -1
- package/dist/types/artifacts/tokens-raw/atlassian-spacing.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/tokens-raw/atlassian-typography.d.ts +1 -1
- 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/types.d.ts +38 -40
- 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/palettes-raw/legacy-palette.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/palettes-raw/palette.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/palettes-raw/shape-palette.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/palettes-raw/spacing-scale.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/palettes-raw/typography-palette.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/palettes-raw/updated-saturated-palette.d.ts +1 -1
- 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-dark-new-input-border.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-dark-saturated-palette-changes.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-dark.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-legacy-dark.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-legacy-light.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-light-increased-contrast.d.ts +113 -0
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-light-new-input-border.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-light-saturated-palette-changes.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-light.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-shape.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-spacing.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/tokens-raw/atlassian-typography.d.ts +1 -1
- 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/types.d.ts +38 -40
- 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 +40 -229
- package/tmp/api-report-tmp.d.ts +21 -236
- package/dist/cjs/palettes/legacy-palette.js +0 -849
- package/dist/cjs/palettes/palette.js +0 -954
- package/dist/cjs/palettes/shape-palette.js +0 -82
- package/dist/cjs/palettes/spacing-scale.js +0 -154
- package/dist/cjs/palettes/typography-palette.js +0 -273
- package/dist/cjs/palettes/updated-saturated-palette.js +0 -320
- package/dist/cjs/tokens/atlassian-dark/color/accent.js +0 -627
- package/dist/cjs/tokens/atlassian-dark/color/background.js +0 -272
- package/dist/cjs/tokens/atlassian-dark/color/border.js +0 -52
- package/dist/cjs/tokens/atlassian-dark/color/chart.js +0 -445
- package/dist/cjs/tokens/atlassian-dark/color/icon.js +0 -51
- package/dist/cjs/tokens/atlassian-dark/color/interaction.js +0 -21
- package/dist/cjs/tokens/atlassian-dark/color/skeleton.js +0 -19
- package/dist/cjs/tokens/atlassian-dark/color/text.js +0 -65
- package/dist/cjs/tokens/atlassian-dark/elevation/shadow.js +0 -110
- package/dist/cjs/tokens/atlassian-dark/elevation/surface.js +0 -49
- package/dist/cjs/tokens/atlassian-dark/opacity/opacity.js +0 -17
- package/dist/cjs/tokens/atlassian-dark/utility/utility.js +0 -25
- package/dist/cjs/tokens/atlassian-dark-new-input-border/color/border.js +0 -16
- package/dist/cjs/tokens/atlassian-dark-saturated-palette-changes/color/accent.js +0 -21
- package/dist/cjs/tokens/atlassian-dark-saturated-palette-changes/color/background.js +0 -26
- package/dist/cjs/tokens/atlassian-dark-saturated-palette-changes/color/icon.js +0 -18
- package/dist/cjs/tokens/atlassian-legacy-dark/color/accent.js +0 -675
- package/dist/cjs/tokens/atlassian-legacy-dark/color/background.js +0 -271
- package/dist/cjs/tokens/atlassian-legacy-dark/color/border.js +0 -52
- package/dist/cjs/tokens/atlassian-legacy-dark/color/chart.js +0 -471
- package/dist/cjs/tokens/atlassian-legacy-dark/color/icon.js +0 -51
- package/dist/cjs/tokens/atlassian-legacy-dark/color/interaction.js +0 -21
- package/dist/cjs/tokens/atlassian-legacy-dark/color/skeleton.js +0 -19
- package/dist/cjs/tokens/atlassian-legacy-dark/color/text.js +0 -65
- package/dist/cjs/tokens/atlassian-legacy-dark/elevation/shadow.js +0 -110
- package/dist/cjs/tokens/atlassian-legacy-dark/elevation/surface.js +0 -49
- package/dist/cjs/tokens/atlassian-legacy-dark/opacity/opacity.js +0 -17
- package/dist/cjs/tokens/atlassian-legacy-dark/utility/utility.js +0 -25
- package/dist/cjs/tokens/atlassian-legacy-light/color/accent.js +0 -675
- package/dist/cjs/tokens/atlassian-legacy-light/color/background.js +0 -271
- package/dist/cjs/tokens/atlassian-legacy-light/color/border.js +0 -52
- package/dist/cjs/tokens/atlassian-legacy-light/color/chart.js +0 -471
- package/dist/cjs/tokens/atlassian-legacy-light/color/icon.js +0 -51
- package/dist/cjs/tokens/atlassian-legacy-light/color/interaction.js +0 -21
- package/dist/cjs/tokens/atlassian-legacy-light/color/skeleton.js +0 -19
- package/dist/cjs/tokens/atlassian-legacy-light/color/text.js +0 -65
- package/dist/cjs/tokens/atlassian-legacy-light/elevation/shadow.js +0 -80
- package/dist/cjs/tokens/atlassian-legacy-light/elevation/surface.js +0 -49
- package/dist/cjs/tokens/atlassian-legacy-light/opacity/opacity.js +0 -17
- package/dist/cjs/tokens/atlassian-legacy-light/utility/utility.js +0 -25
- package/dist/cjs/tokens/atlassian-light/color/accent.js +0 -627
- package/dist/cjs/tokens/atlassian-light/color/background.js +0 -271
- package/dist/cjs/tokens/atlassian-light/color/border.js +0 -52
- package/dist/cjs/tokens/atlassian-light/color/chart.js +0 -445
- package/dist/cjs/tokens/atlassian-light/color/icon.js +0 -51
- package/dist/cjs/tokens/atlassian-light/color/interaction.js +0 -21
- package/dist/cjs/tokens/atlassian-light/color/skeleton.js +0 -19
- package/dist/cjs/tokens/atlassian-light/color/text.js +0 -65
- package/dist/cjs/tokens/atlassian-light/elevation/shadow.js +0 -80
- package/dist/cjs/tokens/atlassian-light/elevation/surface.js +0 -49
- package/dist/cjs/tokens/atlassian-light/opacity/opacity.js +0 -17
- package/dist/cjs/tokens/atlassian-light/utility/utility.js +0 -25
- package/dist/cjs/tokens/atlassian-light-new-input-border/color/border.js +0 -16
- package/dist/cjs/tokens/atlassian-light-saturated-palette-changes/color/accent.js +0 -35
- package/dist/cjs/tokens/atlassian-light-saturated-palette-changes/color/background.js +0 -26
- package/dist/cjs/tokens/atlassian-light-saturated-palette-changes/color/icon.js +0 -16
- package/dist/cjs/tokens/atlassian-shape/shape.js +0 -52
- package/dist/cjs/tokens/atlassian-spacing/spacing.js +0 -89
- package/dist/cjs/tokens/atlassian-typography/font-family.js +0 -31
- package/dist/cjs/tokens/atlassian-typography/letter-spacing.js +0 -28
- package/dist/cjs/tokens/atlassian-typography/theme.js +0 -149
- package/dist/cjs/tokens/atlassian-typography-adg3/font-family.js +0 -31
- package/dist/cjs/tokens/atlassian-typography-adg3/font-size.js +0 -37
- package/dist/cjs/tokens/atlassian-typography-adg3/font-weight.js +0 -25
- package/dist/cjs/tokens/atlassian-typography-adg3/letter-spacing.js +0 -28
- package/dist/cjs/tokens/atlassian-typography-adg3/line-height.js +0 -34
- package/dist/cjs/tokens/atlassian-typography-adg3/theme.js +0 -160
- package/dist/cjs/tokens/atlassian-typography-minor3/font-family.js +0 -31
- package/dist/cjs/tokens/atlassian-typography-minor3/letter-spacing.js +0 -28
- package/dist/cjs/tokens/atlassian-typography-minor3/theme.js +0 -160
- package/dist/cjs/tokens/default/color/accent.js +0 -1427
- package/dist/cjs/tokens/default/color/background.js +0 -585
- package/dist/cjs/tokens/default/color/border.js +0 -117
- package/dist/cjs/tokens/default/color/chart.js +0 -945
- package/dist/cjs/tokens/default/color/icon.js +0 -111
- package/dist/cjs/tokens/default/color/interaction.js +0 -29
- package/dist/cjs/tokens/default/color/skeleton.js +0 -29
- package/dist/cjs/tokens/default/color/text.js +0 -145
- package/dist/cjs/tokens/default/elevation/shadow.js +0 -55
- package/dist/cjs/tokens/default/elevation/surface.js +0 -99
- package/dist/cjs/tokens/default/opacity/opacity.js +0 -27
- package/dist/cjs/tokens/default/shape/shape.js +0 -106
- package/dist/cjs/tokens/default/spacing/spacing.js +0 -220
- package/dist/cjs/tokens/default/typography/font-family.js +0 -61
- package/dist/cjs/tokens/default/typography/font-size.js +0 -77
- package/dist/cjs/tokens/default/typography/font-weight.js +0 -45
- package/dist/cjs/tokens/default/typography/font.js +0 -140
- package/dist/cjs/tokens/default/typography/letter-spacing.js +0 -53
- package/dist/cjs/tokens/default/typography/line-height.js +0 -69
- package/dist/cjs/tokens/default/utility/utility.js +0 -41
- package/dist/es2019/palettes/legacy-palette.js +0 -843
- package/dist/es2019/palettes/palette.js +0 -948
- package/dist/es2019/palettes/shape-palette.js +0 -76
- package/dist/es2019/palettes/spacing-scale.js +0 -148
- package/dist/es2019/palettes/typography-palette.js +0 -269
- package/dist/es2019/palettes/updated-saturated-palette.js +0 -312
- package/dist/es2019/tokens/atlassian-dark/color/accent.js +0 -621
- package/dist/es2019/tokens/atlassian-dark/color/background.js +0 -266
- package/dist/es2019/tokens/atlassian-dark/color/border.js +0 -46
- package/dist/es2019/tokens/atlassian-dark/color/chart.js +0 -439
- package/dist/es2019/tokens/atlassian-dark/color/icon.js +0 -45
- package/dist/es2019/tokens/atlassian-dark/color/interaction.js +0 -15
- package/dist/es2019/tokens/atlassian-dark/color/skeleton.js +0 -13
- package/dist/es2019/tokens/atlassian-dark/color/text.js +0 -59
- package/dist/es2019/tokens/atlassian-dark/elevation/shadow.js +0 -104
- package/dist/es2019/tokens/atlassian-dark/elevation/surface.js +0 -43
- package/dist/es2019/tokens/atlassian-dark/opacity/opacity.js +0 -11
- package/dist/es2019/tokens/atlassian-dark/utility/utility.js +0 -18
- package/dist/es2019/tokens/atlassian-dark-new-input-border/color/border.js +0 -10
- package/dist/es2019/tokens/atlassian-dark-saturated-palette-changes/color/accent.js +0 -15
- package/dist/es2019/tokens/atlassian-dark-saturated-palette-changes/color/background.js +0 -20
- package/dist/es2019/tokens/atlassian-dark-saturated-palette-changes/color/icon.js +0 -12
- package/dist/es2019/tokens/atlassian-legacy-dark/color/accent.js +0 -669
- package/dist/es2019/tokens/atlassian-legacy-dark/color/background.js +0 -265
- package/dist/es2019/tokens/atlassian-legacy-dark/color/border.js +0 -46
- package/dist/es2019/tokens/atlassian-legacy-dark/color/chart.js +0 -465
- package/dist/es2019/tokens/atlassian-legacy-dark/color/icon.js +0 -45
- package/dist/es2019/tokens/atlassian-legacy-dark/color/interaction.js +0 -15
- package/dist/es2019/tokens/atlassian-legacy-dark/color/skeleton.js +0 -13
- package/dist/es2019/tokens/atlassian-legacy-dark/color/text.js +0 -59
- package/dist/es2019/tokens/atlassian-legacy-dark/elevation/shadow.js +0 -104
- package/dist/es2019/tokens/atlassian-legacy-dark/elevation/surface.js +0 -43
- package/dist/es2019/tokens/atlassian-legacy-dark/opacity/opacity.js +0 -11
- package/dist/es2019/tokens/atlassian-legacy-dark/utility/utility.js +0 -18
- package/dist/es2019/tokens/atlassian-legacy-light/color/accent.js +0 -669
- package/dist/es2019/tokens/atlassian-legacy-light/color/background.js +0 -265
- package/dist/es2019/tokens/atlassian-legacy-light/color/border.js +0 -46
- package/dist/es2019/tokens/atlassian-legacy-light/color/chart.js +0 -465
- package/dist/es2019/tokens/atlassian-legacy-light/color/icon.js +0 -45
- package/dist/es2019/tokens/atlassian-legacy-light/color/interaction.js +0 -15
- package/dist/es2019/tokens/atlassian-legacy-light/color/skeleton.js +0 -13
- package/dist/es2019/tokens/atlassian-legacy-light/color/text.js +0 -59
- package/dist/es2019/tokens/atlassian-legacy-light/elevation/shadow.js +0 -74
- package/dist/es2019/tokens/atlassian-legacy-light/elevation/surface.js +0 -43
- package/dist/es2019/tokens/atlassian-legacy-light/opacity/opacity.js +0 -11
- package/dist/es2019/tokens/atlassian-legacy-light/utility/utility.js +0 -18
- package/dist/es2019/tokens/atlassian-light/color/accent.js +0 -621
- package/dist/es2019/tokens/atlassian-light/color/background.js +0 -265
- package/dist/es2019/tokens/atlassian-light/color/border.js +0 -46
- package/dist/es2019/tokens/atlassian-light/color/chart.js +0 -439
- package/dist/es2019/tokens/atlassian-light/color/icon.js +0 -45
- package/dist/es2019/tokens/atlassian-light/color/interaction.js +0 -15
- package/dist/es2019/tokens/atlassian-light/color/skeleton.js +0 -13
- package/dist/es2019/tokens/atlassian-light/color/text.js +0 -59
- package/dist/es2019/tokens/atlassian-light/elevation/shadow.js +0 -74
- package/dist/es2019/tokens/atlassian-light/elevation/surface.js +0 -43
- package/dist/es2019/tokens/atlassian-light/opacity/opacity.js +0 -11
- package/dist/es2019/tokens/atlassian-light/utility/utility.js +0 -18
- package/dist/es2019/tokens/atlassian-light-new-input-border/color/border.js +0 -10
- package/dist/es2019/tokens/atlassian-light-saturated-palette-changes/color/accent.js +0 -29
- package/dist/es2019/tokens/atlassian-light-saturated-palette-changes/color/background.js +0 -20
- package/dist/es2019/tokens/atlassian-light-saturated-palette-changes/color/icon.js +0 -10
- package/dist/es2019/tokens/atlassian-shape/shape.js +0 -46
- package/dist/es2019/tokens/atlassian-spacing/spacing.js +0 -83
- package/dist/es2019/tokens/atlassian-typography/font-family.js +0 -25
- package/dist/es2019/tokens/atlassian-typography/letter-spacing.js +0 -22
- package/dist/es2019/tokens/atlassian-typography/theme.js +0 -143
- package/dist/es2019/tokens/atlassian-typography-adg3/font-family.js +0 -25
- package/dist/es2019/tokens/atlassian-typography-adg3/font-size.js +0 -31
- package/dist/es2019/tokens/atlassian-typography-adg3/font-weight.js +0 -19
- package/dist/es2019/tokens/atlassian-typography-adg3/letter-spacing.js +0 -22
- package/dist/es2019/tokens/atlassian-typography-adg3/line-height.js +0 -28
- package/dist/es2019/tokens/atlassian-typography-adg3/theme.js +0 -154
- package/dist/es2019/tokens/atlassian-typography-minor3/font-family.js +0 -25
- package/dist/es2019/tokens/atlassian-typography-minor3/letter-spacing.js +0 -22
- package/dist/es2019/tokens/atlassian-typography-minor3/theme.js +0 -154
- package/dist/es2019/tokens/default/color/accent.js +0 -1421
- package/dist/es2019/tokens/default/color/background.js +0 -579
- package/dist/es2019/tokens/default/color/border.js +0 -111
- package/dist/es2019/tokens/default/color/chart.js +0 -939
- package/dist/es2019/tokens/default/color/icon.js +0 -105
- package/dist/es2019/tokens/default/color/interaction.js +0 -23
- package/dist/es2019/tokens/default/color/skeleton.js +0 -23
- package/dist/es2019/tokens/default/color/text.js +0 -139
- package/dist/es2019/tokens/default/elevation/shadow.js +0 -51
- package/dist/es2019/tokens/default/elevation/surface.js +0 -93
- package/dist/es2019/tokens/default/opacity/opacity.js +0 -21
- package/dist/es2019/tokens/default/shape/shape.js +0 -100
- package/dist/es2019/tokens/default/spacing/spacing.js +0 -214
- package/dist/es2019/tokens/default/typography/font-family.js +0 -55
- package/dist/es2019/tokens/default/typography/font-size.js +0 -71
- package/dist/es2019/tokens/default/typography/font-weight.js +0 -39
- package/dist/es2019/tokens/default/typography/font.js +0 -134
- package/dist/es2019/tokens/default/typography/letter-spacing.js +0 -47
- package/dist/es2019/tokens/default/typography/line-height.js +0 -63
- package/dist/es2019/tokens/default/utility/utility.js +0 -35
- package/dist/esm/palettes/legacy-palette.js +0 -843
- package/dist/esm/palettes/palette.js +0 -948
- package/dist/esm/palettes/shape-palette.js +0 -76
- package/dist/esm/palettes/spacing-scale.js +0 -148
- package/dist/esm/palettes/typography-palette.js +0 -266
- package/dist/esm/palettes/updated-saturated-palette.js +0 -313
- package/dist/esm/tokens/atlassian-dark/color/accent.js +0 -621
- package/dist/esm/tokens/atlassian-dark/color/background.js +0 -266
- package/dist/esm/tokens/atlassian-dark/color/border.js +0 -46
- package/dist/esm/tokens/atlassian-dark/color/chart.js +0 -439
- package/dist/esm/tokens/atlassian-dark/color/icon.js +0 -45
- package/dist/esm/tokens/atlassian-dark/color/interaction.js +0 -15
- package/dist/esm/tokens/atlassian-dark/color/skeleton.js +0 -13
- package/dist/esm/tokens/atlassian-dark/color/text.js +0 -59
- package/dist/esm/tokens/atlassian-dark/elevation/shadow.js +0 -104
- package/dist/esm/tokens/atlassian-dark/elevation/surface.js +0 -43
- package/dist/esm/tokens/atlassian-dark/opacity/opacity.js +0 -11
- package/dist/esm/tokens/atlassian-dark/utility/utility.js +0 -18
- package/dist/esm/tokens/atlassian-dark-new-input-border/color/border.js +0 -10
- package/dist/esm/tokens/atlassian-dark-saturated-palette-changes/color/accent.js +0 -15
- package/dist/esm/tokens/atlassian-dark-saturated-palette-changes/color/background.js +0 -20
- package/dist/esm/tokens/atlassian-dark-saturated-palette-changes/color/icon.js +0 -12
- package/dist/esm/tokens/atlassian-legacy-dark/color/accent.js +0 -669
- package/dist/esm/tokens/atlassian-legacy-dark/color/background.js +0 -265
- package/dist/esm/tokens/atlassian-legacy-dark/color/border.js +0 -46
- package/dist/esm/tokens/atlassian-legacy-dark/color/chart.js +0 -465
- package/dist/esm/tokens/atlassian-legacy-dark/color/icon.js +0 -45
- package/dist/esm/tokens/atlassian-legacy-dark/color/interaction.js +0 -15
- package/dist/esm/tokens/atlassian-legacy-dark/color/skeleton.js +0 -13
- package/dist/esm/tokens/atlassian-legacy-dark/color/text.js +0 -59
- package/dist/esm/tokens/atlassian-legacy-dark/elevation/shadow.js +0 -104
- package/dist/esm/tokens/atlassian-legacy-dark/elevation/surface.js +0 -43
- package/dist/esm/tokens/atlassian-legacy-dark/opacity/opacity.js +0 -11
- package/dist/esm/tokens/atlassian-legacy-dark/utility/utility.js +0 -18
- package/dist/esm/tokens/atlassian-legacy-light/color/accent.js +0 -669
- package/dist/esm/tokens/atlassian-legacy-light/color/background.js +0 -265
- package/dist/esm/tokens/atlassian-legacy-light/color/border.js +0 -46
- package/dist/esm/tokens/atlassian-legacy-light/color/chart.js +0 -465
- package/dist/esm/tokens/atlassian-legacy-light/color/icon.js +0 -45
- package/dist/esm/tokens/atlassian-legacy-light/color/interaction.js +0 -15
- package/dist/esm/tokens/atlassian-legacy-light/color/skeleton.js +0 -13
- package/dist/esm/tokens/atlassian-legacy-light/color/text.js +0 -59
- package/dist/esm/tokens/atlassian-legacy-light/elevation/shadow.js +0 -74
- package/dist/esm/tokens/atlassian-legacy-light/elevation/surface.js +0 -43
- package/dist/esm/tokens/atlassian-legacy-light/opacity/opacity.js +0 -11
- package/dist/esm/tokens/atlassian-legacy-light/utility/utility.js +0 -18
- package/dist/esm/tokens/atlassian-light/color/accent.js +0 -621
- package/dist/esm/tokens/atlassian-light/color/background.js +0 -265
- package/dist/esm/tokens/atlassian-light/color/border.js +0 -46
- package/dist/esm/tokens/atlassian-light/color/chart.js +0 -439
- package/dist/esm/tokens/atlassian-light/color/icon.js +0 -45
- package/dist/esm/tokens/atlassian-light/color/interaction.js +0 -15
- package/dist/esm/tokens/atlassian-light/color/skeleton.js +0 -13
- package/dist/esm/tokens/atlassian-light/color/text.js +0 -59
- package/dist/esm/tokens/atlassian-light/elevation/shadow.js +0 -74
- package/dist/esm/tokens/atlassian-light/elevation/surface.js +0 -43
- package/dist/esm/tokens/atlassian-light/opacity/opacity.js +0 -11
- package/dist/esm/tokens/atlassian-light/utility/utility.js +0 -18
- package/dist/esm/tokens/atlassian-light-new-input-border/color/border.js +0 -10
- package/dist/esm/tokens/atlassian-light-saturated-palette-changes/color/accent.js +0 -29
- package/dist/esm/tokens/atlassian-light-saturated-palette-changes/color/background.js +0 -20
- package/dist/esm/tokens/atlassian-light-saturated-palette-changes/color/icon.js +0 -10
- package/dist/esm/tokens/atlassian-shape/shape.js +0 -46
- package/dist/esm/tokens/atlassian-spacing/spacing.js +0 -83
- package/dist/esm/tokens/atlassian-typography/font-family.js +0 -25
- package/dist/esm/tokens/atlassian-typography/letter-spacing.js +0 -22
- package/dist/esm/tokens/atlassian-typography/theme.js +0 -143
- package/dist/esm/tokens/atlassian-typography-adg3/font-family.js +0 -25
- package/dist/esm/tokens/atlassian-typography-adg3/font-size.js +0 -31
- package/dist/esm/tokens/atlassian-typography-adg3/font-weight.js +0 -19
- package/dist/esm/tokens/atlassian-typography-adg3/letter-spacing.js +0 -22
- package/dist/esm/tokens/atlassian-typography-adg3/line-height.js +0 -28
- package/dist/esm/tokens/atlassian-typography-adg3/theme.js +0 -154
- package/dist/esm/tokens/atlassian-typography-minor3/font-family.js +0 -25
- package/dist/esm/tokens/atlassian-typography-minor3/letter-spacing.js +0 -22
- package/dist/esm/tokens/atlassian-typography-minor3/theme.js +0 -154
- package/dist/esm/tokens/default/color/accent.js +0 -1421
- package/dist/esm/tokens/default/color/background.js +0 -579
- package/dist/esm/tokens/default/color/border.js +0 -111
- package/dist/esm/tokens/default/color/chart.js +0 -939
- package/dist/esm/tokens/default/color/icon.js +0 -105
- package/dist/esm/tokens/default/color/interaction.js +0 -23
- package/dist/esm/tokens/default/color/skeleton.js +0 -23
- package/dist/esm/tokens/default/color/text.js +0 -139
- package/dist/esm/tokens/default/elevation/shadow.js +0 -49
- package/dist/esm/tokens/default/elevation/surface.js +0 -93
- package/dist/esm/tokens/default/opacity/opacity.js +0 -21
- package/dist/esm/tokens/default/shape/shape.js +0 -100
- package/dist/esm/tokens/default/spacing/spacing.js +0 -214
- package/dist/esm/tokens/default/typography/font-family.js +0 -55
- package/dist/esm/tokens/default/typography/font-size.js +0 -71
- package/dist/esm/tokens/default/typography/font-weight.js +0 -39
- package/dist/esm/tokens/default/typography/font.js +0 -134
- package/dist/esm/tokens/default/typography/letter-spacing.js +0 -47
- package/dist/esm/tokens/default/typography/line-height.js +0 -63
- package/dist/esm/tokens/default/utility/utility.js +0 -35
- package/dist/types/palettes/legacy-palette.d.ts +0 -10
- package/dist/types/palettes/palette.d.ts +0 -5
- package/dist/types/palettes/shape-palette.d.ts +0 -73
- package/dist/types/palettes/spacing-scale.d.ts +0 -147
- package/dist/types/palettes/typography-palette.d.ts +0 -16
- package/dist/types/palettes/updated-saturated-palette.d.ts +0 -10
- package/dist/types/tokens/atlassian-dark/color/accent.d.ts +0 -4
- package/dist/types/tokens/atlassian-dark/color/background.d.ts +0 -4
- package/dist/types/tokens/atlassian-dark/color/border.d.ts +0 -4
- package/dist/types/tokens/atlassian-dark/color/chart.d.ts +0 -4
- package/dist/types/tokens/atlassian-dark/color/icon.d.ts +0 -4
- package/dist/types/tokens/atlassian-dark/color/interaction.d.ts +0 -4
- package/dist/types/tokens/atlassian-dark/color/skeleton.d.ts +0 -4
- package/dist/types/tokens/atlassian-dark/color/text.d.ts +0 -4
- package/dist/types/tokens/atlassian-dark/elevation/shadow.d.ts +0 -4
- package/dist/types/tokens/atlassian-dark/elevation/surface.d.ts +0 -4
- package/dist/types/tokens/atlassian-dark/opacity/opacity.d.ts +0 -3
- package/dist/types/tokens/atlassian-dark/utility/utility.d.ts +0 -5
- package/dist/types/tokens/atlassian-dark-new-input-border/color/border.d.ts +0 -10
- package/dist/types/tokens/atlassian-dark-saturated-palette-changes/color/accent.d.ts +0 -4
- package/dist/types/tokens/atlassian-dark-saturated-palette-changes/color/background.d.ts +0 -4
- package/dist/types/tokens/atlassian-dark-saturated-palette-changes/color/icon.d.ts +0 -4
- package/dist/types/tokens/atlassian-legacy-dark/color/accent.d.ts +0 -4
- package/dist/types/tokens/atlassian-legacy-dark/color/background.d.ts +0 -4
- package/dist/types/tokens/atlassian-legacy-dark/color/border.d.ts +0 -4
- package/dist/types/tokens/atlassian-legacy-dark/color/chart.d.ts +0 -4
- package/dist/types/tokens/atlassian-legacy-dark/color/icon.d.ts +0 -4
- package/dist/types/tokens/atlassian-legacy-dark/color/interaction.d.ts +0 -4
- package/dist/types/tokens/atlassian-legacy-dark/color/skeleton.d.ts +0 -4
- package/dist/types/tokens/atlassian-legacy-dark/color/text.d.ts +0 -4
- package/dist/types/tokens/atlassian-legacy-dark/elevation/shadow.d.ts +0 -4
- package/dist/types/tokens/atlassian-legacy-dark/elevation/surface.d.ts +0 -4
- package/dist/types/tokens/atlassian-legacy-dark/opacity/opacity.d.ts +0 -3
- package/dist/types/tokens/atlassian-legacy-dark/utility/utility.d.ts +0 -5
- package/dist/types/tokens/atlassian-legacy-light/color/accent.d.ts +0 -4
- package/dist/types/tokens/atlassian-legacy-light/color/background.d.ts +0 -4
- package/dist/types/tokens/atlassian-legacy-light/color/border.d.ts +0 -4
- package/dist/types/tokens/atlassian-legacy-light/color/chart.d.ts +0 -4
- package/dist/types/tokens/atlassian-legacy-light/color/icon.d.ts +0 -4
- package/dist/types/tokens/atlassian-legacy-light/color/interaction.d.ts +0 -4
- package/dist/types/tokens/atlassian-legacy-light/color/skeleton.d.ts +0 -4
- package/dist/types/tokens/atlassian-legacy-light/color/text.d.ts +0 -4
- package/dist/types/tokens/atlassian-legacy-light/elevation/shadow.d.ts +0 -4
- package/dist/types/tokens/atlassian-legacy-light/elevation/surface.d.ts +0 -4
- package/dist/types/tokens/atlassian-legacy-light/opacity/opacity.d.ts +0 -3
- package/dist/types/tokens/atlassian-legacy-light/utility/utility.d.ts +0 -5
- package/dist/types/tokens/atlassian-light/color/accent.d.ts +0 -4
- package/dist/types/tokens/atlassian-light/color/background.d.ts +0 -4
- package/dist/types/tokens/atlassian-light/color/border.d.ts +0 -4
- package/dist/types/tokens/atlassian-light/color/chart.d.ts +0 -4
- package/dist/types/tokens/atlassian-light/color/icon.d.ts +0 -4
- package/dist/types/tokens/atlassian-light/color/interaction.d.ts +0 -4
- package/dist/types/tokens/atlassian-light/color/skeleton.d.ts +0 -4
- package/dist/types/tokens/atlassian-light/color/text.d.ts +0 -4
- package/dist/types/tokens/atlassian-light/elevation/shadow.d.ts +0 -4
- package/dist/types/tokens/atlassian-light/elevation/surface.d.ts +0 -4
- package/dist/types/tokens/atlassian-light/opacity/opacity.d.ts +0 -3
- package/dist/types/tokens/atlassian-light/utility/utility.d.ts +0 -5
- package/dist/types/tokens/atlassian-light-new-input-border/color/border.d.ts +0 -10
- package/dist/types/tokens/atlassian-light-saturated-palette-changes/color/accent.d.ts +0 -4
- package/dist/types/tokens/atlassian-light-saturated-palette-changes/color/background.d.ts +0 -4
- package/dist/types/tokens/atlassian-light-saturated-palette-changes/color/icon.d.ts +0 -4
- package/dist/types/tokens/atlassian-shape/shape.d.ts +0 -7
- package/dist/types/tokens/atlassian-spacing/spacing.d.ts +0 -10
- package/dist/types/tokens/atlassian-typography/font-family.d.ts +0 -4
- package/dist/types/tokens/atlassian-typography/letter-spacing.d.ts +0 -4
- package/dist/types/tokens/atlassian-typography/theme.d.ts +0 -10
- package/dist/types/tokens/atlassian-typography-adg3/font-family.d.ts +0 -4
- package/dist/types/tokens/atlassian-typography-adg3/font-size.d.ts +0 -4
- package/dist/types/tokens/atlassian-typography-adg3/font-weight.d.ts +0 -4
- package/dist/types/tokens/atlassian-typography-adg3/letter-spacing.d.ts +0 -4
- package/dist/types/tokens/atlassian-typography-adg3/line-height.d.ts +0 -4
- package/dist/types/tokens/atlassian-typography-adg3/theme.d.ts +0 -145
- package/dist/types/tokens/atlassian-typography-minor3/font-family.d.ts +0 -4
- package/dist/types/tokens/atlassian-typography-minor3/letter-spacing.d.ts +0 -4
- package/dist/types/tokens/atlassian-typography-minor3/theme.d.ts +0 -145
- package/dist/types/tokens/default/color/accent.d.ts +0 -4
- package/dist/types/tokens/default/color/background.d.ts +0 -4
- package/dist/types/tokens/default/color/border.d.ts +0 -4
- package/dist/types/tokens/default/color/chart.d.ts +0 -4
- package/dist/types/tokens/default/color/icon.d.ts +0 -4
- package/dist/types/tokens/default/color/interaction.d.ts +0 -4
- package/dist/types/tokens/default/color/skeleton.d.ts +0 -4
- package/dist/types/tokens/default/color/text.d.ts +0 -4
- package/dist/types/tokens/default/elevation/shadow.d.ts +0 -4
- package/dist/types/tokens/default/elevation/surface.d.ts +0 -4
- package/dist/types/tokens/default/opacity/opacity.d.ts +0 -3
- package/dist/types/tokens/default/shape/shape.d.ts +0 -3
- package/dist/types/tokens/default/spacing/spacing.d.ts +0 -8
- package/dist/types/tokens/default/typography/font-family.d.ts +0 -4
- package/dist/types/tokens/default/typography/font-size.d.ts +0 -4
- package/dist/types/tokens/default/typography/font-weight.d.ts +0 -4
- package/dist/types/tokens/default/typography/font.d.ts +0 -20
- package/dist/types/tokens/default/typography/letter-spacing.d.ts +0 -4
- package/dist/types/tokens/default/typography/line-height.d.ts +0 -4
- package/dist/types/tokens/default/utility/utility.d.ts +0 -5
- package/dist/types-ts4.5/palettes/legacy-palette.d.ts +0 -10
- package/dist/types-ts4.5/palettes/palette.d.ts +0 -5
- package/dist/types-ts4.5/palettes/shape-palette.d.ts +0 -73
- package/dist/types-ts4.5/palettes/spacing-scale.d.ts +0 -147
- package/dist/types-ts4.5/palettes/typography-palette.d.ts +0 -16
- package/dist/types-ts4.5/palettes/updated-saturated-palette.d.ts +0 -10
- package/dist/types-ts4.5/tokens/atlassian-dark/color/accent.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-dark/color/background.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-dark/color/border.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-dark/color/chart.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-dark/color/icon.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-dark/color/interaction.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-dark/color/skeleton.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-dark/color/text.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-dark/elevation/shadow.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-dark/elevation/surface.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-dark/opacity/opacity.d.ts +0 -3
- package/dist/types-ts4.5/tokens/atlassian-dark/utility/utility.d.ts +0 -5
- package/dist/types-ts4.5/tokens/atlassian-dark-new-input-border/color/border.d.ts +0 -10
- package/dist/types-ts4.5/tokens/atlassian-dark-saturated-palette-changes/color/accent.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-dark-saturated-palette-changes/color/background.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-dark-saturated-palette-changes/color/icon.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-legacy-dark/color/accent.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-legacy-dark/color/background.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-legacy-dark/color/border.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-legacy-dark/color/chart.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-legacy-dark/color/icon.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-legacy-dark/color/interaction.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-legacy-dark/color/skeleton.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-legacy-dark/color/text.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-legacy-dark/elevation/shadow.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-legacy-dark/elevation/surface.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-legacy-dark/opacity/opacity.d.ts +0 -3
- package/dist/types-ts4.5/tokens/atlassian-legacy-dark/utility/utility.d.ts +0 -5
- package/dist/types-ts4.5/tokens/atlassian-legacy-light/color/accent.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-legacy-light/color/background.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-legacy-light/color/border.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-legacy-light/color/chart.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-legacy-light/color/icon.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-legacy-light/color/interaction.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-legacy-light/color/skeleton.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-legacy-light/color/text.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-legacy-light/elevation/shadow.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-legacy-light/elevation/surface.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-legacy-light/opacity/opacity.d.ts +0 -3
- package/dist/types-ts4.5/tokens/atlassian-legacy-light/utility/utility.d.ts +0 -5
- package/dist/types-ts4.5/tokens/atlassian-light/color/accent.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-light/color/background.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-light/color/border.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-light/color/chart.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-light/color/icon.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-light/color/interaction.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-light/color/skeleton.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-light/color/text.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-light/elevation/shadow.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-light/elevation/surface.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-light/opacity/opacity.d.ts +0 -3
- package/dist/types-ts4.5/tokens/atlassian-light/utility/utility.d.ts +0 -5
- package/dist/types-ts4.5/tokens/atlassian-light-new-input-border/color/border.d.ts +0 -10
- package/dist/types-ts4.5/tokens/atlassian-light-saturated-palette-changes/color/accent.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-light-saturated-palette-changes/color/background.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-light-saturated-palette-changes/color/icon.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-shape/shape.d.ts +0 -7
- package/dist/types-ts4.5/tokens/atlassian-spacing/spacing.d.ts +0 -10
- package/dist/types-ts4.5/tokens/atlassian-typography/font-family.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-typography/letter-spacing.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-typography/theme.d.ts +0 -10
- package/dist/types-ts4.5/tokens/atlassian-typography-adg3/font-family.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-typography-adg3/font-size.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-typography-adg3/font-weight.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-typography-adg3/letter-spacing.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-typography-adg3/line-height.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-typography-adg3/theme.d.ts +0 -145
- package/dist/types-ts4.5/tokens/atlassian-typography-minor3/font-family.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-typography-minor3/letter-spacing.d.ts +0 -4
- package/dist/types-ts4.5/tokens/atlassian-typography-minor3/theme.d.ts +0 -145
- package/dist/types-ts4.5/tokens/default/color/accent.d.ts +0 -4
- package/dist/types-ts4.5/tokens/default/color/background.d.ts +0 -4
- package/dist/types-ts4.5/tokens/default/color/border.d.ts +0 -4
- package/dist/types-ts4.5/tokens/default/color/chart.d.ts +0 -4
- package/dist/types-ts4.5/tokens/default/color/icon.d.ts +0 -4
- package/dist/types-ts4.5/tokens/default/color/interaction.d.ts +0 -4
- package/dist/types-ts4.5/tokens/default/color/skeleton.d.ts +0 -4
- package/dist/types-ts4.5/tokens/default/color/text.d.ts +0 -4
- package/dist/types-ts4.5/tokens/default/elevation/shadow.d.ts +0 -4
- package/dist/types-ts4.5/tokens/default/elevation/surface.d.ts +0 -4
- package/dist/types-ts4.5/tokens/default/opacity/opacity.d.ts +0 -3
- package/dist/types-ts4.5/tokens/default/shape/shape.d.ts +0 -3
- package/dist/types-ts4.5/tokens/default/spacing/spacing.d.ts +0 -8
- package/dist/types-ts4.5/tokens/default/typography/font-family.d.ts +0 -4
- package/dist/types-ts4.5/tokens/default/typography/font-size.d.ts +0 -4
- package/dist/types-ts4.5/tokens/default/typography/font-weight.d.ts +0 -4
- package/dist/types-ts4.5/tokens/default/typography/font.d.ts +0 -20
- package/dist/types-ts4.5/tokens/default/typography/letter-spacing.d.ts +0 -4
- package/dist/types-ts4.5/tokens/default/typography/line-height.d.ts +0 -4
- package/dist/types-ts4.5/tokens/default/utility/utility.d.ts +0 -5
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
/**
|
|
8
8
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
9
|
-
* @codegen <<SignedSource::
|
|
9
|
+
* @codegen <<SignedSource::ecd63bab60b9c05c08973d35cc1989df>>
|
|
10
10
|
* @codegenCommand yarn build tokens
|
|
11
11
|
*/
|
|
12
12
|
var tokens = [{
|
|
@@ -17,7 +17,7 @@ var tokens = [{
|
|
|
17
17
|
"description": "The default body font."
|
|
18
18
|
},
|
|
19
19
|
"value": "normal 400 14px/20px var(--ds-font-family-body)",
|
|
20
|
-
"filePath": "
|
|
20
|
+
"filePath": "schema/themes/atlassian-typography/theme.tsx",
|
|
21
21
|
"isSource": true,
|
|
22
22
|
"original": {
|
|
23
23
|
"attributes": {
|
|
@@ -46,7 +46,7 @@ var tokens = [{
|
|
|
46
46
|
"description": "Larger body font or default body font for text rich experiences."
|
|
47
47
|
},
|
|
48
48
|
"value": "normal 400 16px/24px var(--ds-font-family-body)",
|
|
49
|
-
"filePath": "
|
|
49
|
+
"filePath": "schema/themes/atlassian-typography/theme.tsx",
|
|
50
50
|
"isSource": true,
|
|
51
51
|
"original": {
|
|
52
52
|
"attributes": {
|
|
@@ -75,7 +75,7 @@ var tokens = [{
|
|
|
75
75
|
"description": "Smaller body font."
|
|
76
76
|
},
|
|
77
77
|
"value": "normal 400 12px/20px var(--ds-font-family-body)",
|
|
78
|
-
"filePath": "
|
|
78
|
+
"filePath": "schema/themes/atlassian-typography/theme.tsx",
|
|
79
79
|
"isSource": true,
|
|
80
80
|
"original": {
|
|
81
81
|
"attributes": {
|
|
@@ -104,7 +104,7 @@ var tokens = [{
|
|
|
104
104
|
"description": "Used for monospace and code."
|
|
105
105
|
},
|
|
106
106
|
"value": "normal 400 0.875em/1 var(--ds-font-family-code)",
|
|
107
|
-
"filePath": "
|
|
107
|
+
"filePath": "schema/themes/atlassian-typography/theme.tsx",
|
|
108
108
|
"isSource": true,
|
|
109
109
|
"original": {
|
|
110
110
|
"attributes": {
|
|
@@ -133,7 +133,7 @@ var tokens = [{
|
|
|
133
133
|
"description": "TBD"
|
|
134
134
|
},
|
|
135
135
|
"value": "normal 700 24px/28px var(--ds-font-family-heading)",
|
|
136
|
-
"filePath": "
|
|
136
|
+
"filePath": "schema/themes/atlassian-typography/theme.tsx",
|
|
137
137
|
"isSource": true,
|
|
138
138
|
"original": {
|
|
139
139
|
"attributes": {
|
|
@@ -162,7 +162,7 @@ var tokens = [{
|
|
|
162
162
|
"description": "TBD"
|
|
163
163
|
},
|
|
164
164
|
"value": "normal 700 20px/24px var(--ds-font-family-heading)",
|
|
165
|
-
"filePath": "
|
|
165
|
+
"filePath": "schema/themes/atlassian-typography/theme.tsx",
|
|
166
166
|
"isSource": true,
|
|
167
167
|
"original": {
|
|
168
168
|
"attributes": {
|
|
@@ -191,7 +191,7 @@ var tokens = [{
|
|
|
191
191
|
"description": "TBD"
|
|
192
192
|
},
|
|
193
193
|
"value": "normal 700 16px/20px var(--ds-font-family-heading)",
|
|
194
|
-
"filePath": "
|
|
194
|
+
"filePath": "schema/themes/atlassian-typography/theme.tsx",
|
|
195
195
|
"isSource": true,
|
|
196
196
|
"original": {
|
|
197
197
|
"attributes": {
|
|
@@ -220,7 +220,7 @@ var tokens = [{
|
|
|
220
220
|
"description": "TBD"
|
|
221
221
|
},
|
|
222
222
|
"value": "normal 700 28px/32px var(--ds-font-family-heading)",
|
|
223
|
-
"filePath": "
|
|
223
|
+
"filePath": "schema/themes/atlassian-typography/theme.tsx",
|
|
224
224
|
"isSource": true,
|
|
225
225
|
"original": {
|
|
226
226
|
"attributes": {
|
|
@@ -249,7 +249,7 @@ var tokens = [{
|
|
|
249
249
|
"description": "TBD"
|
|
250
250
|
},
|
|
251
251
|
"value": "normal 700 14px/16px var(--ds-font-family-heading)",
|
|
252
|
-
"filePath": "
|
|
252
|
+
"filePath": "schema/themes/atlassian-typography/theme.tsx",
|
|
253
253
|
"isSource": true,
|
|
254
254
|
"original": {
|
|
255
255
|
"attributes": {
|
|
@@ -278,7 +278,7 @@ var tokens = [{
|
|
|
278
278
|
"description": "TBD"
|
|
279
279
|
},
|
|
280
280
|
"value": "normal 700 36px/40px var(--ds-font-family-heading)",
|
|
281
|
-
"filePath": "
|
|
281
|
+
"filePath": "schema/themes/atlassian-typography/theme.tsx",
|
|
282
282
|
"isSource": true,
|
|
283
283
|
"original": {
|
|
284
284
|
"attributes": {
|
|
@@ -307,7 +307,7 @@ var tokens = [{
|
|
|
307
307
|
"description": "TBD"
|
|
308
308
|
},
|
|
309
309
|
"value": "normal 700 12px/16px var(--ds-font-family-heading)",
|
|
310
|
-
"filePath": "
|
|
310
|
+
"filePath": "schema/themes/atlassian-typography/theme.tsx",
|
|
311
311
|
"isSource": true,
|
|
312
312
|
"original": {
|
|
313
313
|
"attributes": {
|
|
@@ -336,7 +336,7 @@ var tokens = [{
|
|
|
336
336
|
"description": "Helpful guidance goes here"
|
|
337
337
|
},
|
|
338
338
|
"value": "0",
|
|
339
|
-
"filePath": "
|
|
339
|
+
"filePath": "schema/themes/atlassian-typography/letter-spacing.tsx",
|
|
340
340
|
"isSource": true,
|
|
341
341
|
"original": {
|
|
342
342
|
"attributes": {
|
|
@@ -358,7 +358,7 @@ var tokens = [{
|
|
|
358
358
|
"description": "Helpful guidance goes here"
|
|
359
359
|
},
|
|
360
360
|
"value": "0",
|
|
361
|
-
"filePath": "
|
|
361
|
+
"filePath": "schema/themes/atlassian-typography/letter-spacing.tsx",
|
|
362
362
|
"isSource": true,
|
|
363
363
|
"original": {
|
|
364
364
|
"attributes": {
|
|
@@ -380,7 +380,7 @@ var tokens = [{
|
|
|
380
380
|
"description": "Helpful guidance goes here"
|
|
381
381
|
},
|
|
382
382
|
"value": "0",
|
|
383
|
-
"filePath": "
|
|
383
|
+
"filePath": "schema/themes/atlassian-typography/letter-spacing.tsx",
|
|
384
384
|
"isSource": true,
|
|
385
385
|
"original": {
|
|
386
386
|
"attributes": {
|
|
@@ -402,7 +402,7 @@ var tokens = [{
|
|
|
402
402
|
"description": "Helpful guidance goes here"
|
|
403
403
|
},
|
|
404
404
|
"value": "0",
|
|
405
|
-
"filePath": "
|
|
405
|
+
"filePath": "schema/themes/atlassian-typography/letter-spacing.tsx",
|
|
406
406
|
"isSource": true,
|
|
407
407
|
"original": {
|
|
408
408
|
"attributes": {
|
|
@@ -424,7 +424,7 @@ var tokens = [{
|
|
|
424
424
|
"description": "Helpful guidance goes here"
|
|
425
425
|
},
|
|
426
426
|
"value": "0",
|
|
427
|
-
"filePath": "
|
|
427
|
+
"filePath": "schema/themes/atlassian-typography/letter-spacing.tsx",
|
|
428
428
|
"isSource": true,
|
|
429
429
|
"original": {
|
|
430
430
|
"attributes": {
|
|
@@ -446,7 +446,7 @@ var tokens = [{
|
|
|
446
446
|
"description": "Single-line non-wrapping text like that in a button."
|
|
447
447
|
},
|
|
448
448
|
"value": "normal 400 14px/1 var(--ds-font-family-body)",
|
|
449
|
-
"filePath": "
|
|
449
|
+
"filePath": "schema/themes/atlassian-typography/theme.tsx",
|
|
450
450
|
"isSource": true,
|
|
451
451
|
"original": {
|
|
452
452
|
"attributes": {
|
|
@@ -475,7 +475,7 @@ var tokens = [{
|
|
|
475
475
|
"description": "Single-line non-wrapping supporting text like that in a smaller label."
|
|
476
476
|
},
|
|
477
477
|
"value": "normal 400 12px/1 var(--ds-font-family-body)",
|
|
478
|
-
"filePath": "
|
|
478
|
+
"filePath": "schema/themes/atlassian-typography/theme.tsx",
|
|
479
479
|
"isSource": true,
|
|
480
480
|
"original": {
|
|
481
481
|
"attributes": {
|
|
@@ -504,7 +504,7 @@ var tokens = [{
|
|
|
504
504
|
"description": "Helpful guidance goes here"
|
|
505
505
|
},
|
|
506
506
|
"value": "ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
|
|
507
|
-
"filePath": "
|
|
507
|
+
"filePath": "schema/themes/atlassian-typography/font-family.tsx",
|
|
508
508
|
"isSource": true,
|
|
509
509
|
"original": {
|
|
510
510
|
"attributes": {
|
|
@@ -526,7 +526,7 @@ var tokens = [{
|
|
|
526
526
|
"description": "Helpful guidance goes here"
|
|
527
527
|
},
|
|
528
528
|
"value": "ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace",
|
|
529
|
-
"filePath": "
|
|
529
|
+
"filePath": "schema/themes/atlassian-typography/font-family.tsx",
|
|
530
530
|
"isSource": true,
|
|
531
531
|
"original": {
|
|
532
532
|
"attributes": {
|
|
@@ -548,7 +548,7 @@ var tokens = [{
|
|
|
548
548
|
"description": "Helpful guidance goes here"
|
|
549
549
|
},
|
|
550
550
|
"value": "ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
|
|
551
|
-
"filePath": "
|
|
551
|
+
"filePath": "schema/themes/atlassian-typography/font-family.tsx",
|
|
552
552
|
"isSource": true,
|
|
553
553
|
"original": {
|
|
554
554
|
"attributes": {
|
|
@@ -570,7 +570,7 @@ var tokens = [{
|
|
|
570
570
|
"description": "Helpful guidance goes here"
|
|
571
571
|
},
|
|
572
572
|
"value": "ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace",
|
|
573
|
-
"filePath": "
|
|
573
|
+
"filePath": "schema/themes/atlassian-typography/font-family.tsx",
|
|
574
574
|
"isSource": true,
|
|
575
575
|
"original": {
|
|
576
576
|
"attributes": {
|
|
@@ -592,7 +592,7 @@ var tokens = [{
|
|
|
592
592
|
"description": "Helpful guidance goes here"
|
|
593
593
|
},
|
|
594
594
|
"value": "ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif",
|
|
595
|
-
"filePath": "
|
|
595
|
+
"filePath": "schema/themes/atlassian-typography/font-family.tsx",
|
|
596
596
|
"isSource": true,
|
|
597
597
|
"original": {
|
|
598
598
|
"attributes": {
|
|
@@ -614,7 +614,7 @@ var tokens = [{
|
|
|
614
614
|
"description": "Helpful guidance goes here"
|
|
615
615
|
},
|
|
616
616
|
"value": "Charlie Sans",
|
|
617
|
-
"filePath": "
|
|
617
|
+
"filePath": "schema/themes/atlassian-typography/font-family.tsx",
|
|
618
618
|
"isSource": true,
|
|
619
619
|
"original": {
|
|
620
620
|
"attributes": {
|
package/dist/cjs/constants.js
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.TOKEN_NOT_FOUND_CSS_VAR = exports.THEME_DATA_ATTRIBUTE = exports.DEFAULT_THEME = exports.CUSTOM_THEME_ATTRIBUTE = exports.CURRENT_SURFACE_CSS_VAR = exports.CSS_VAR_FULL = exports.CSS_PREFIX = exports.COLOR_MODE_ATTRIBUTE = void 0;
|
|
6
|
+
exports.TOKEN_NOT_FOUND_CSS_VAR = exports.THEME_DATA_ATTRIBUTE = exports.DEFAULT_THEME = exports.CUSTOM_THEME_ATTRIBUTE = exports.CURRENT_SURFACE_CSS_VAR = exports.CSS_VAR_FULL = exports.CSS_PREFIX = exports.CONTRAST_MODE_ATTRIBUTE = exports.COLOR_MODE_ATTRIBUTE = void 0;
|
|
7
7
|
var THEME_DATA_ATTRIBUTE = exports.THEME_DATA_ATTRIBUTE = 'data-theme';
|
|
8
8
|
var COLOR_MODE_ATTRIBUTE = exports.COLOR_MODE_ATTRIBUTE = 'data-color-mode';
|
|
9
|
+
var CONTRAST_MODE_ATTRIBUTE = exports.CONTRAST_MODE_ATTRIBUTE = 'data-contrast-mode';
|
|
9
10
|
var CUSTOM_THEME_ATTRIBUTE = exports.CUSTOM_THEME_ATTRIBUTE = 'data-custom-theme';
|
|
10
11
|
var DEFAULT_THEME = exports.DEFAULT_THEME = 'light';
|
|
11
12
|
var CSS_PREFIX = exports.CSS_PREFIX = 'ds';
|
|
@@ -33,6 +33,8 @@ var enableGlobalTheme = function enableGlobalTheme() {
|
|
|
33
33
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
34
34
|
_ref$colorMode = _ref.colorMode,
|
|
35
35
|
colorMode = _ref$colorMode === void 0 ? _themeConfig.themeStateDefaults['colorMode'] : _ref$colorMode,
|
|
36
|
+
_ref$contrastMode = _ref.contrastMode,
|
|
37
|
+
contrastMode = _ref$contrastMode === void 0 ? _themeConfig.themeStateDefaults['contrastMode'] : _ref$contrastMode,
|
|
36
38
|
_ref$dark = _ref.dark,
|
|
37
39
|
dark = _ref$dark === void 0 ? _themeConfig.themeStateDefaults['dark'] : _ref$dark,
|
|
38
40
|
_ref$light = _ref.light,
|
|
@@ -48,6 +50,7 @@ var enableGlobalTheme = function enableGlobalTheme() {
|
|
|
48
50
|
var themeLoader = arguments.length > 1 ? arguments[1] : undefined;
|
|
49
51
|
var themeState = {
|
|
50
52
|
colorMode: colorMode,
|
|
53
|
+
contrastMode: contrastMode,
|
|
51
54
|
dark: dark,
|
|
52
55
|
light: light,
|
|
53
56
|
shape: shape,
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
7
8
|
var _constants = require("./constants");
|
|
8
9
|
var _themeLoading = require("./utils/theme-loading");
|
|
9
10
|
/**
|
|
@@ -14,7 +15,12 @@ var _themeLoading = require("./utils/theme-loading");
|
|
|
14
15
|
*
|
|
15
16
|
* @returns {string} A string to be added to the innerHTML of a script tag in the document head
|
|
16
17
|
*/
|
|
17
|
-
var getSSRAutoScript = function getSSRAutoScript(colorMode) {
|
|
18
|
-
|
|
18
|
+
var getSSRAutoScript = function getSSRAutoScript(colorMode, contrastMode) {
|
|
19
|
+
if (colorMode !== 'auto' && contrastMode !== 'auto') {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
var setColorMode = colorMode === 'auto' ? "\n try {\n const darkModeMql = window.matchMedia('".concat(_themeLoading.darkModeMediaQuery, "');\n const colorMode = darkModeMql.matches ? 'dark' : 'light';\n document.documentElement.setAttribute('").concat(_constants.COLOR_MODE_ATTRIBUTE, "', colorMode);\n } catch (e) {}") : '';
|
|
23
|
+
var setContrastMode = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.increased-contrast-themes') && contrastMode === 'auto' ? "\n try {\n const contrastModeMql = window.matchMedia('".concat(_themeLoading.moreContrastMediaQuery, "');\n const contrastMode = contrastModeMql.matches ? 'more' : 'no-preference';\n document.documentElement.setAttribute('").concat(_constants.CONTRAST_MODE_ATTRIBUTE, "', contrastMode);\n } catch (e) {}") : '';
|
|
24
|
+
return "(() => {".concat(setColorMode).concat(setContrastMode, "})()");
|
|
19
25
|
};
|
|
20
26
|
var _default = exports.default = getSSRAutoScript;
|
|
@@ -6,12 +6,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
10
|
var _constants = require("./constants");
|
|
10
11
|
var _themeConfig = require("./theme-config");
|
|
11
12
|
var _themeStateTransformer = require("./theme-state-transformer");
|
|
12
13
|
var _colorUtils = require("./utils/color-utils");
|
|
13
14
|
var _hash = require("./utils/hash");
|
|
15
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
17
|
var defaultColorMode = 'light';
|
|
18
|
+
var defaultContrastMode = 'no-preference';
|
|
15
19
|
|
|
16
20
|
/**
|
|
17
21
|
* Server-side rendering utility. Generates the valid HTML attributes for a given theme.
|
|
@@ -36,6 +40,8 @@ var getThemeHtmlAttrs = function getThemeHtmlAttrs() {
|
|
|
36
40
|
dark = _ref$dark === void 0 ? _themeConfig.themeStateDefaults['dark'] : _ref$dark,
|
|
37
41
|
_ref$light = _ref.light,
|
|
38
42
|
light = _ref$light === void 0 ? _themeConfig.themeStateDefaults['light'] : _ref$light,
|
|
43
|
+
_ref$contrastMode = _ref.contrastMode,
|
|
44
|
+
contrastMode = _ref$contrastMode === void 0 ? _themeConfig.themeStateDefaults['contrastMode'] : _ref$contrastMode,
|
|
39
45
|
_ref$shape = _ref.shape,
|
|
40
46
|
shape = _ref$shape === void 0 ? _themeConfig.themeStateDefaults['shape'] : _ref$shape,
|
|
41
47
|
_ref$spacing = _ref.spacing,
|
|
@@ -52,6 +58,9 @@ var getThemeHtmlAttrs = function getThemeHtmlAttrs() {
|
|
|
52
58
|
typography: typography
|
|
53
59
|
});
|
|
54
60
|
var result = (_result = {}, (0, _defineProperty2.default)(_result, _constants.THEME_DATA_ATTRIBUTE, themeAttribute), (0, _defineProperty2.default)(_result, _constants.COLOR_MODE_ATTRIBUTE, colorMode === 'auto' ? defaultColorMode : colorMode), _result);
|
|
61
|
+
if ((0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.increased-contrast-themes')) {
|
|
62
|
+
result = _objectSpread(_objectSpread({}, result), {}, (0, _defineProperty2.default)({}, _constants.CONTRAST_MODE_ATTRIBUTE, contrastMode === 'auto' ? defaultContrastMode : contrastMode));
|
|
63
|
+
}
|
|
55
64
|
if (UNSAFE_themeOptions && (0, _colorUtils.isValidBrandHex)(UNSAFE_themeOptions.brandColor)) {
|
|
56
65
|
var optionString = JSON.stringify(UNSAFE_themeOptions);
|
|
57
66
|
var uniqueId = (0, _hash.hash)(optionString);
|
|
@@ -9,6 +9,7 @@ exports.default = void 0;
|
|
|
9
9
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
10
10
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
11
11
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
12
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
13
|
var _themeConfig = require("./theme-config");
|
|
13
14
|
var _colorUtils = require("./utils/color-utils");
|
|
14
15
|
var _getThemePreferences = require("./utils/get-theme-preferences");
|
|
@@ -40,9 +41,17 @@ var getThemeStyles = /*#__PURE__*/function () {
|
|
|
40
41
|
themeOverridePreferences = [];
|
|
41
42
|
if (preferences === 'all') {
|
|
42
43
|
themePreferences = _themeConfig.themeIdsWithOverrides;
|
|
44
|
+
|
|
45
|
+
// CLEANUP: Remove
|
|
46
|
+
if (!(0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.increased-contrast-themes')) {
|
|
47
|
+
themePreferences = themePreferences.filter(function (n) {
|
|
48
|
+
return n !== 'light-increased-contrast' && n !== 'dark-increased-contrast';
|
|
49
|
+
});
|
|
50
|
+
}
|
|
43
51
|
} else {
|
|
44
52
|
themeState = {
|
|
45
53
|
colorMode: (preferences === null || preferences === void 0 ? void 0 : preferences.colorMode) || _themeConfig.themeStateDefaults['colorMode'],
|
|
54
|
+
contrastMode: (preferences === null || preferences === void 0 ? void 0 : preferences.contrastMode) || _themeConfig.themeStateDefaults['contrastMode'],
|
|
46
55
|
dark: (preferences === null || preferences === void 0 ? void 0 : preferences.dark) || _themeConfig.themeStateDefaults['dark'],
|
|
47
56
|
light: (preferences === null || preferences === void 0 ? void 0 : preferences.light) || _themeConfig.themeStateDefaults['light'],
|
|
48
57
|
shape: (preferences === null || preferences === void 0 ? void 0 : preferences.shape) || _themeConfig.themeStateDefaults['shape'],
|
|
@@ -8,7 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
var _warnOnce = _interopRequireDefault(require("@atlaskit/ds-lib/warn-once"));
|
|
9
9
|
var _tokenNames = _interopRequireDefault(require("./artifacts/token-names"));
|
|
10
10
|
var name = "@atlaskit/tokens";
|
|
11
|
-
var version = "1.
|
|
11
|
+
var version = "1.26.1";
|
|
12
12
|
/**
|
|
13
13
|
* Takes a dot-separated token name and and an optional fallback, and returns the current computed CSS value for the
|
|
14
14
|
* resulting CSS Custom Property.
|
package/dist/cjs/get-token.js
CHANGED
|
@@ -9,7 +9,7 @@ var _warnOnce = _interopRequireDefault(require("@atlaskit/ds-lib/warn-once"));
|
|
|
9
9
|
var _tokenNames = _interopRequireDefault(require("./artifacts/token-names"));
|
|
10
10
|
var _constants = require("./constants");
|
|
11
11
|
var name = "@atlaskit/tokens";
|
|
12
|
-
var version = "1.
|
|
12
|
+
var version = "1.26.1";
|
|
13
13
|
/**
|
|
14
14
|
* Takes a dot-separated token name and an optional fallback, and returns the CSS custom property for the corresponding token.
|
|
15
15
|
* This should be used to implement design decisions throughout your application.
|
|
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
10
10
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
12
|
var _themeConfig = require("./theme-config");
|
|
12
13
|
var _colorUtils = require("./utils/color-utils");
|
|
13
14
|
var _configurePage = _interopRequireDefault(require("./utils/configure-page"));
|
|
@@ -24,6 +25,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
24
25
|
*
|
|
25
26
|
* @param {Object<string, string>} themeState The themes and color mode that should be applied.
|
|
26
27
|
* @param {string} themeState.colorMode Determines which color theme is applied. If set to `auto`, the theme applied will be determined by the OS setting.
|
|
28
|
+
* @param {string} themeState.contrastMode The contrast mode theme to be applied. If set to `auto`, the theme applied will be determined by the OS setting.set to `auto`, the theme applied will be determined by the OS setting.
|
|
27
29
|
* @param {string} themeState.dark The color theme to be applied when the color mode resolves to 'dark'.
|
|
28
30
|
* @param {string} themeState.light The color theme to be applied when the color mode resolves to 'light'.
|
|
29
31
|
* @param {string} themeState.shape The shape theme to be applied.
|
|
@@ -44,6 +46,8 @@ var setGlobalTheme = /*#__PURE__*/function () {
|
|
|
44
46
|
var _ref2,
|
|
45
47
|
_ref2$colorMode,
|
|
46
48
|
colorMode,
|
|
49
|
+
_ref2$contrastMode,
|
|
50
|
+
contrastMode,
|
|
47
51
|
_ref2$dark,
|
|
48
52
|
dark,
|
|
49
53
|
_ref2$light,
|
|
@@ -72,10 +76,21 @@ var setGlobalTheme = /*#__PURE__*/function () {
|
|
|
72
76
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
73
77
|
while (1) switch (_context3.prev = _context3.next) {
|
|
74
78
|
case 0:
|
|
75
|
-
_ref2 = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {}, _ref2$colorMode = _ref2.colorMode, colorMode = _ref2$colorMode === void 0 ? _themeConfig.themeStateDefaults['colorMode'] : _ref2$colorMode, _ref2$dark = _ref2.dark, dark = _ref2$dark === void 0 ? _themeConfig.themeStateDefaults['dark'] : _ref2$dark, _ref2$light = _ref2.light, light = _ref2$light === void 0 ? _themeConfig.themeStateDefaults['light'] : _ref2$light, _ref2$shape = _ref2.shape, shape = _ref2$shape === void 0 ? _themeConfig.themeStateDefaults['shape'] : _ref2$shape, _ref2$spacing = _ref2.spacing, spacing = _ref2$spacing === void 0 ? _themeConfig.themeStateDefaults['spacing'] : _ref2$spacing, _ref2$typography = _ref2.typography, typography = _ref2$typography === void 0 ? _themeConfig.themeStateDefaults['typography'] : _ref2$typography, _ref2$UNSAFE_themeOpt = _ref2.UNSAFE_themeOptions, UNSAFE_themeOptions = _ref2$UNSAFE_themeOpt === void 0 ? _themeConfig.themeStateDefaults['UNSAFE_themeOptions'] : _ref2$UNSAFE_themeOpt;
|
|
79
|
+
_ref2 = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {}, _ref2$colorMode = _ref2.colorMode, colorMode = _ref2$colorMode === void 0 ? _themeConfig.themeStateDefaults['colorMode'] : _ref2$colorMode, _ref2$contrastMode = _ref2.contrastMode, contrastMode = _ref2$contrastMode === void 0 ? _themeConfig.themeStateDefaults['contrastMode'] : _ref2$contrastMode, _ref2$dark = _ref2.dark, dark = _ref2$dark === void 0 ? _themeConfig.themeStateDefaults['dark'] : _ref2$dark, _ref2$light = _ref2.light, light = _ref2$light === void 0 ? _themeConfig.themeStateDefaults['light'] : _ref2$light, _ref2$shape = _ref2.shape, shape = _ref2$shape === void 0 ? _themeConfig.themeStateDefaults['shape'] : _ref2$shape, _ref2$spacing = _ref2.spacing, spacing = _ref2$spacing === void 0 ? _themeConfig.themeStateDefaults['spacing'] : _ref2$spacing, _ref2$typography = _ref2.typography, typography = _ref2$typography === void 0 ? _themeConfig.themeStateDefaults['typography'] : _ref2$typography, _ref2$UNSAFE_themeOpt = _ref2.UNSAFE_themeOptions, UNSAFE_themeOptions = _ref2$UNSAFE_themeOpt === void 0 ? _themeConfig.themeStateDefaults['UNSAFE_themeOptions'] : _ref2$UNSAFE_themeOpt;
|
|
76
80
|
themeLoader = _args3.length > 1 ? _args3[1] : undefined;
|
|
81
|
+
// CLEANUP: Remove. This blocks application of increased contrast themes
|
|
82
|
+
// without the feature flag enabled.
|
|
83
|
+
if (!(0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.increased-contrast-themes')) {
|
|
84
|
+
if (light === 'light-increased-contrast') {
|
|
85
|
+
light = 'light';
|
|
86
|
+
}
|
|
87
|
+
if (dark === 'dark-increased-contrast') {
|
|
88
|
+
dark = 'dark';
|
|
89
|
+
}
|
|
90
|
+
}
|
|
77
91
|
themeState = {
|
|
78
92
|
colorMode: colorMode,
|
|
93
|
+
contrastMode: contrastMode,
|
|
79
94
|
dark: dark,
|
|
80
95
|
light: light,
|
|
81
96
|
shape: shape,
|
|
@@ -136,44 +151,44 @@ var setGlobalTheme = /*#__PURE__*/function () {
|
|
|
136
151
|
}))());
|
|
137
152
|
}
|
|
138
153
|
}
|
|
139
|
-
_context3.next =
|
|
154
|
+
_context3.next = 10;
|
|
140
155
|
return Promise.all(loadingTasks);
|
|
141
|
-
case
|
|
156
|
+
case 10:
|
|
142
157
|
// Load override themes after standard themes
|
|
143
158
|
themeOverridePreferences = (0, _getThemePreferences.getThemeOverridePreferences)(themeState);
|
|
144
159
|
_iterator = _createForOfIteratorHelper(themeOverridePreferences);
|
|
145
|
-
_context3.prev =
|
|
160
|
+
_context3.prev = 12;
|
|
146
161
|
_iterator.s();
|
|
147
|
-
case
|
|
162
|
+
case 14:
|
|
148
163
|
if ((_step = _iterator.n()).done) {
|
|
149
|
-
_context3.next =
|
|
164
|
+
_context3.next = 20;
|
|
150
165
|
break;
|
|
151
166
|
}
|
|
152
167
|
themeId = _step.value;
|
|
153
|
-
_context3.next =
|
|
168
|
+
_context3.next = 18;
|
|
154
169
|
return loadingStrategy(themeId);
|
|
155
|
-
case
|
|
156
|
-
_context3.next =
|
|
170
|
+
case 18:
|
|
171
|
+
_context3.next = 14;
|
|
157
172
|
break;
|
|
158
|
-
case
|
|
159
|
-
_context3.next =
|
|
173
|
+
case 20:
|
|
174
|
+
_context3.next = 25;
|
|
160
175
|
break;
|
|
161
|
-
case
|
|
162
|
-
_context3.prev =
|
|
163
|
-
_context3.t0 = _context3["catch"](
|
|
176
|
+
case 22:
|
|
177
|
+
_context3.prev = 22;
|
|
178
|
+
_context3.t0 = _context3["catch"](12);
|
|
164
179
|
_iterator.e(_context3.t0);
|
|
165
|
-
case
|
|
166
|
-
_context3.prev =
|
|
180
|
+
case 25:
|
|
181
|
+
_context3.prev = 25;
|
|
167
182
|
_iterator.f();
|
|
168
|
-
return _context3.finish(
|
|
169
|
-
case
|
|
183
|
+
return _context3.finish(25);
|
|
184
|
+
case 28:
|
|
170
185
|
autoUnbind = (0, _configurePage.default)(themeState);
|
|
171
186
|
return _context3.abrupt("return", autoUnbind);
|
|
172
|
-
case
|
|
187
|
+
case 30:
|
|
173
188
|
case "end":
|
|
174
189
|
return _context3.stop();
|
|
175
190
|
}
|
|
176
|
-
}, _callee3, null, [[
|
|
191
|
+
}, _callee3, null, [[12, 22, 25, 28]]);
|
|
177
192
|
}));
|
|
178
193
|
return function setGlobalTheme() {
|
|
179
194
|
return _ref.apply(this, arguments);
|
package/dist/cjs/theme-config.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.themeStateDefaults = exports.themeOverrideIds = exports.themeIdsWithOverrides = exports.themeIds = exports.themeColorModes = exports.default = void 0;
|
|
6
|
+
exports.themeStateDefaults = exports.themeOverrideIds = exports.themeIdsWithOverrides = exports.themeIds = exports.themeContrastModes = exports.themeColorModes = exports.default = void 0;
|
|
7
7
|
/**
|
|
8
8
|
* This file contains the source of truth for themes and all associated meta data.
|
|
9
9
|
*/
|
|
@@ -34,13 +34,17 @@ exports.themeStateDefaults = exports.themeOverrideIds = exports.themeIdsWithOver
|
|
|
34
34
|
* The idea is there may exist many color themes, but every theme must either fit into light or dark.
|
|
35
35
|
*/
|
|
36
36
|
var themeColorModes = exports.themeColorModes = ['light', 'dark', 'auto'];
|
|
37
|
+
/**
|
|
38
|
+
* Contrast preferences: The system contrast preference
|
|
39
|
+
*/
|
|
40
|
+
var themeContrastModes = exports.themeContrastModes = ['more', 'no-preference', 'auto'];
|
|
37
41
|
/**
|
|
38
42
|
* Theme ids: The value that will be mounted to the DOM as a data attr
|
|
39
43
|
* For example: `data-theme="light:light dark:dark spacing:spacing"
|
|
40
44
|
*
|
|
41
45
|
* These ids must be kebab case
|
|
42
46
|
*/
|
|
43
|
-
var themeIds = exports.themeIds = ['light', 'dark', 'legacy-light', 'legacy-dark', 'spacing', 'typography', 'shape', 'typography-adg3', 'typography-minor3'];
|
|
47
|
+
var themeIds = exports.themeIds = ['light-increased-contrast', 'light', 'dark', 'dark-increased-contrast', 'legacy-light', 'legacy-dark', 'spacing', 'typography', 'shape', 'typography-adg3', 'typography-minor3'];
|
|
44
48
|
/**
|
|
45
49
|
* Theme override ids: the equivalent of themeIds for theme overrides.
|
|
46
50
|
* Theme overrides are temporary and there may not be any defined at times.
|
|
@@ -75,6 +79,17 @@ var themeConfig = {
|
|
|
75
79
|
mode: 'light'
|
|
76
80
|
}
|
|
77
81
|
},
|
|
82
|
+
'atlassian-light-increased-contrast': {
|
|
83
|
+
id: 'light-increased-contrast',
|
|
84
|
+
displayName: 'Light Theme (increased contrast)',
|
|
85
|
+
palette: 'defaultPalette',
|
|
86
|
+
attributes: {
|
|
87
|
+
type: 'color',
|
|
88
|
+
mode: 'light'
|
|
89
|
+
},
|
|
90
|
+
extends: 'light',
|
|
91
|
+
increasesContrastFor: 'light'
|
|
92
|
+
},
|
|
78
93
|
'atlassian-dark': {
|
|
79
94
|
id: 'dark',
|
|
80
95
|
displayName: 'Dark Theme',
|
|
@@ -84,6 +99,17 @@ var themeConfig = {
|
|
|
84
99
|
mode: 'dark'
|
|
85
100
|
}
|
|
86
101
|
},
|
|
102
|
+
'atlassian-dark-increased-contrast': {
|
|
103
|
+
id: 'dark-increased-contrast',
|
|
104
|
+
displayName: 'Dark Theme (increased contrast)',
|
|
105
|
+
palette: 'defaultPalette',
|
|
106
|
+
attributes: {
|
|
107
|
+
type: 'color',
|
|
108
|
+
mode: 'dark'
|
|
109
|
+
},
|
|
110
|
+
extends: 'dark',
|
|
111
|
+
increasesContrastFor: 'dark'
|
|
112
|
+
},
|
|
87
113
|
'atlassian-legacy-light': {
|
|
88
114
|
id: 'legacy-light',
|
|
89
115
|
displayName: 'Light Theme (legacy)',
|
|
@@ -201,6 +227,7 @@ var themeConfig = {
|
|
|
201
227
|
*/
|
|
202
228
|
var themeStateDefaults = exports.themeStateDefaults = {
|
|
203
229
|
colorMode: 'auto',
|
|
230
|
+
contrastMode: 'auto',
|
|
204
231
|
dark: 'dark',
|
|
205
232
|
light: 'light',
|
|
206
233
|
shape: undefined,
|
|
@@ -6,8 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = configurePage;
|
|
8
8
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
10
|
var _getThemeHtmlAttrs = _interopRequireDefault(require("../get-theme-html-attrs"));
|
|
10
11
|
var _colorModeListeners = _interopRequireDefault(require("./color-mode-listeners"));
|
|
12
|
+
var _contrastModeListeners = _interopRequireDefault(require("./contrast-mode-listeners"));
|
|
11
13
|
/**
|
|
12
14
|
* Given ThemeState, sets appropriate html attributes on the documentElement,
|
|
13
15
|
* adds a listener to keep colorMode updated, and returns a function to unbind.
|
|
@@ -21,6 +23,16 @@ function configurePage(themeState) {
|
|
|
21
23
|
} else {
|
|
22
24
|
_colorModeListeners.default.unbind();
|
|
23
25
|
}
|
|
26
|
+
if ((0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.increased-contrast-themes')) {
|
|
27
|
+
if (themeState.contrastMode === 'auto') {
|
|
28
|
+
// Set contrastMode based on the user preference
|
|
29
|
+
themeState.contrastMode = _contrastModeListeners.default.getContrastMode();
|
|
30
|
+
// Bind a listener (if one doesn't already exist) to keep contrastMode updated
|
|
31
|
+
_contrastModeListeners.default.bind();
|
|
32
|
+
} else {
|
|
33
|
+
_contrastModeListeners.default.unbind();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
24
36
|
var themeAttributes = (0, _getThemeHtmlAttrs.default)(themeState);
|
|
25
37
|
Object.entries(themeAttributes).forEach(function (_ref) {
|
|
26
38
|
var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
|
|
@@ -29,6 +41,9 @@ function configurePage(themeState) {
|
|
|
29
41
|
document.documentElement.setAttribute(key, value);
|
|
30
42
|
});
|
|
31
43
|
return function () {
|
|
32
|
-
|
|
44
|
+
_colorModeListeners.default.unbind();
|
|
45
|
+
if ((0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.increased-contrast-themes')) {
|
|
46
|
+
_contrastModeListeners.default.unbind();
|
|
47
|
+
}
|
|
33
48
|
};
|
|
34
49
|
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
var _bindEventListener = require("bind-event-listener");
|
|
12
|
+
var _constants = require("../constants");
|
|
13
|
+
var _themeLoading = require("./theme-loading");
|
|
14
|
+
var isMatchMediaAvailable = typeof window !== 'undefined' && 'matchMedia' in window;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Updates the current theme when the system contrast preference changes. Should be bound
|
|
18
|
+
* to an event listener listening on the '(prefers-contrast: more)' query
|
|
19
|
+
* @param e The event representing a change in system theme.
|
|
20
|
+
*/
|
|
21
|
+
function checkNativeListener(e) {
|
|
22
|
+
var element = document.documentElement;
|
|
23
|
+
element.setAttribute(_constants.CONTRAST_MODE_ATTRIBUTE, e.matches ? 'more' : 'no-preference');
|
|
24
|
+
}
|
|
25
|
+
var contrastModeMql = isMatchMediaAvailable && window.matchMedia(_themeLoading.moreContrastMediaQuery);
|
|
26
|
+
var ContrastModeObserver = /*#__PURE__*/function () {
|
|
27
|
+
function ContrastModeObserver() {
|
|
28
|
+
(0, _classCallCheck2.default)(this, ContrastModeObserver);
|
|
29
|
+
(0, _defineProperty2.default)(this, "unbindContrastChangeListener", null);
|
|
30
|
+
}
|
|
31
|
+
(0, _createClass2.default)(ContrastModeObserver, [{
|
|
32
|
+
key: "getContrastMode",
|
|
33
|
+
value: function getContrastMode() {
|
|
34
|
+
if (!contrastModeMql) {
|
|
35
|
+
return 'no-preference';
|
|
36
|
+
}
|
|
37
|
+
return contrastModeMql !== null && contrastModeMql !== void 0 && contrastModeMql.matches ? 'more' : 'no-preference';
|
|
38
|
+
}
|
|
39
|
+
}, {
|
|
40
|
+
key: "bind",
|
|
41
|
+
value: function bind() {
|
|
42
|
+
if (contrastModeMql && this.unbindContrastChangeListener === null) {
|
|
43
|
+
this.unbindContrastChangeListener = (0, _bindEventListener.bind)(contrastModeMql, {
|
|
44
|
+
type: 'change',
|
|
45
|
+
listener: checkNativeListener
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}, {
|
|
50
|
+
key: "unbind",
|
|
51
|
+
value: function unbind() {
|
|
52
|
+
if (this.unbindContrastChangeListener) {
|
|
53
|
+
this.unbindContrastChangeListener();
|
|
54
|
+
this.unbindContrastChangeListener = null;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}]);
|
|
58
|
+
return ContrastModeObserver;
|
|
59
|
+
}();
|
|
60
|
+
/**
|
|
61
|
+
* A singleton contrast mode observer - binds "auto" switching logic to a single `mediaQueryList` listener
|
|
62
|
+
* that can be unbound by any consumer when no longer needed.
|
|
63
|
+
*/
|
|
64
|
+
var SingletonContrastModeObserver = new ContrastModeObserver();
|
|
65
|
+
var _default = exports.default = SingletonContrastModeObserver;
|