@atlaskit/tokens 1.25.0 → 1.25.2
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 +177 -165
- package/dist/cjs/artifacts/atlassian-dark-token-value-for-contrast-check.js +1 -2
- package/dist/cjs/artifacts/atlassian-light-token-value-for-contrast-check.js +1 -2
- package/dist/cjs/artifacts/generated-pairs.js +1 -1
- package/dist/cjs/artifacts/palettes-raw/legacy-palette.js +1 -2
- package/dist/cjs/artifacts/palettes-raw/palette.js +1 -2
- package/dist/cjs/artifacts/palettes-raw/shape-palette.js +1 -2
- package/dist/cjs/artifacts/palettes-raw/spacing-scale.js +1 -2
- package/dist/cjs/artifacts/palettes-raw/typography-palette.js +4 -5
- package/dist/cjs/artifacts/palettes-raw/updated-saturated-palette.js +1 -2
- package/dist/cjs/artifacts/replacement-mapping.js +1 -2
- package/dist/cjs/artifacts/theme-import-map.js +1 -2
- package/dist/cjs/artifacts/themes/atlassian-dark-new-input-border.js +1 -2
- package/dist/cjs/artifacts/themes/atlassian-dark-saturated-palette-changes.js +1 -2
- package/dist/cjs/artifacts/themes/atlassian-dark.js +1 -2
- package/dist/cjs/artifacts/themes/atlassian-legacy-dark.js +1 -2
- package/dist/cjs/artifacts/themes/atlassian-legacy-light.js +1 -2
- package/dist/cjs/artifacts/themes/atlassian-light-new-input-border.js +1 -2
- package/dist/cjs/artifacts/themes/atlassian-light-saturated-palette-changes.js +1 -2
- package/dist/cjs/artifacts/themes/atlassian-light.js +1 -2
- package/dist/cjs/artifacts/themes/atlassian-shape.js +1 -2
- package/dist/cjs/artifacts/themes/atlassian-spacing.js +1 -2
- package/dist/cjs/artifacts/themes/atlassian-typography-adg3.js +2 -3
- package/dist/cjs/artifacts/themes/atlassian-typography-minor3.js +2 -3
- package/dist/cjs/artifacts/themes/atlassian-typography.js +2 -3
- package/dist/cjs/artifacts/token-default-values.js +14 -15
- package/dist/cjs/artifacts/token-names.js +12 -13
- package/dist/cjs/artifacts/tokens-raw/atlassian-dark-new-input-border.js +1 -2
- package/dist/cjs/artifacts/tokens-raw/atlassian-dark-saturated-palette-changes.js +1 -2
- package/dist/cjs/artifacts/tokens-raw/atlassian-dark.js +1 -2
- package/dist/cjs/artifacts/tokens-raw/atlassian-legacy-dark.js +1 -2
- package/dist/cjs/artifacts/tokens-raw/atlassian-legacy-light.js +1 -2
- package/dist/cjs/artifacts/tokens-raw/atlassian-light-new-input-border.js +1 -2
- package/dist/cjs/artifacts/tokens-raw/atlassian-light-saturated-palette-changes.js +1 -2
- package/dist/cjs/artifacts/tokens-raw/atlassian-light.js +1 -2
- package/dist/cjs/artifacts/tokens-raw/atlassian-shape.js +1 -2
- package/dist/cjs/artifacts/tokens-raw/atlassian-spacing.js +1 -2
- package/dist/cjs/artifacts/tokens-raw/atlassian-typography-adg3.js +34 -35
- package/dist/cjs/artifacts/tokens-raw/atlassian-typography-minor3.js +35 -36
- package/dist/cjs/artifacts/tokens-raw/atlassian-typography.js +35 -36
- package/dist/cjs/artifacts/typescript/atlassian-dark-token-names.js +1 -2
- package/dist/cjs/artifacts/typescript/atlassian-light-token-names.js +1 -2
- package/dist/cjs/constants.js +8 -16
- package/dist/cjs/custom-theme.js +2 -3
- package/dist/cjs/enable-global-theme.js +1 -2
- package/dist/cjs/get-global-theme.js +1 -2
- package/dist/cjs/get-ssr-auto-script.js +1 -2
- package/dist/cjs/get-theme-html-attrs.js +1 -2
- package/dist/cjs/get-theme-styles.js +2 -3
- package/dist/cjs/get-token-value.js +2 -3
- package/dist/cjs/get-token.js +2 -3
- package/dist/cjs/load-custom-theme-styles.js +1 -2
- package/dist/cjs/palettes/legacy-palette.js +1 -2
- package/dist/cjs/palettes/palette.js +1 -2
- package/dist/cjs/palettes/shape-palette.js +1 -2
- package/dist/cjs/palettes/spacing-scale.js +1 -2
- package/dist/cjs/palettes/typography-palette.js +2 -3
- package/dist/cjs/palettes/updated-saturated-palette.js +1 -2
- package/dist/cjs/set-global-theme.js +1 -2
- package/dist/cjs/theme-config.js +7 -12
- package/dist/cjs/theme-mutation-observer.js +2 -3
- package/dist/cjs/theme-state-transformer.js +3 -5
- package/dist/cjs/tokens/atlassian-dark/color/accent.js +1 -2
- package/dist/cjs/tokens/atlassian-dark/color/background.js +1 -2
- package/dist/cjs/tokens/atlassian-dark/color/border.js +1 -2
- package/dist/cjs/tokens/atlassian-dark/color/chart.js +1 -2
- package/dist/cjs/tokens/atlassian-dark/color/icon.js +1 -2
- package/dist/cjs/tokens/atlassian-dark/color/interaction.js +1 -2
- package/dist/cjs/tokens/atlassian-dark/color/skeleton.js +1 -2
- package/dist/cjs/tokens/atlassian-dark/color/text.js +1 -2
- package/dist/cjs/tokens/atlassian-dark/elevation/shadow.js +1 -2
- package/dist/cjs/tokens/atlassian-dark/elevation/surface.js +1 -2
- package/dist/cjs/tokens/atlassian-dark/opacity/opacity.js +1 -2
- package/dist/cjs/tokens/atlassian-dark/utility/utility.js +2 -3
- package/dist/cjs/tokens/atlassian-dark-new-input-border/color/border.js +1 -2
- package/dist/cjs/tokens/atlassian-dark-saturated-palette-changes/color/accent.js +1 -2
- package/dist/cjs/tokens/atlassian-dark-saturated-palette-changes/color/background.js +1 -2
- package/dist/cjs/tokens/atlassian-dark-saturated-palette-changes/color/icon.js +1 -2
- package/dist/cjs/tokens/atlassian-legacy-dark/color/accent.js +1 -2
- package/dist/cjs/tokens/atlassian-legacy-dark/color/background.js +1 -2
- package/dist/cjs/tokens/atlassian-legacy-dark/color/border.js +1 -2
- package/dist/cjs/tokens/atlassian-legacy-dark/color/chart.js +1 -2
- package/dist/cjs/tokens/atlassian-legacy-dark/color/icon.js +1 -2
- package/dist/cjs/tokens/atlassian-legacy-dark/color/interaction.js +1 -2
- package/dist/cjs/tokens/atlassian-legacy-dark/color/skeleton.js +1 -2
- package/dist/cjs/tokens/atlassian-legacy-dark/color/text.js +1 -2
- package/dist/cjs/tokens/atlassian-legacy-dark/elevation/shadow.js +1 -2
- package/dist/cjs/tokens/atlassian-legacy-dark/elevation/surface.js +1 -2
- package/dist/cjs/tokens/atlassian-legacy-dark/opacity/opacity.js +1 -2
- package/dist/cjs/tokens/atlassian-legacy-dark/utility/utility.js +2 -3
- package/dist/cjs/tokens/atlassian-legacy-light/color/accent.js +1 -2
- package/dist/cjs/tokens/atlassian-legacy-light/color/background.js +1 -2
- package/dist/cjs/tokens/atlassian-legacy-light/color/border.js +1 -2
- package/dist/cjs/tokens/atlassian-legacy-light/color/chart.js +1 -2
- package/dist/cjs/tokens/atlassian-legacy-light/color/icon.js +1 -2
- package/dist/cjs/tokens/atlassian-legacy-light/color/interaction.js +1 -2
- package/dist/cjs/tokens/atlassian-legacy-light/color/skeleton.js +1 -2
- package/dist/cjs/tokens/atlassian-legacy-light/color/text.js +1 -2
- package/dist/cjs/tokens/atlassian-legacy-light/elevation/shadow.js +1 -2
- package/dist/cjs/tokens/atlassian-legacy-light/elevation/surface.js +1 -2
- package/dist/cjs/tokens/atlassian-legacy-light/opacity/opacity.js +1 -2
- package/dist/cjs/tokens/atlassian-legacy-light/utility/utility.js +2 -3
- package/dist/cjs/tokens/atlassian-light/color/accent.js +1 -2
- package/dist/cjs/tokens/atlassian-light/color/background.js +1 -2
- package/dist/cjs/tokens/atlassian-light/color/border.js +1 -2
- package/dist/cjs/tokens/atlassian-light/color/chart.js +1 -2
- package/dist/cjs/tokens/atlassian-light/color/icon.js +1 -2
- package/dist/cjs/tokens/atlassian-light/color/interaction.js +1 -2
- package/dist/cjs/tokens/atlassian-light/color/skeleton.js +1 -2
- package/dist/cjs/tokens/atlassian-light/color/text.js +1 -2
- package/dist/cjs/tokens/atlassian-light/elevation/shadow.js +1 -2
- package/dist/cjs/tokens/atlassian-light/elevation/surface.js +1 -2
- package/dist/cjs/tokens/atlassian-light/opacity/opacity.js +1 -2
- package/dist/cjs/tokens/atlassian-light/utility/utility.js +2 -3
- package/dist/cjs/tokens/atlassian-light-new-input-border/color/border.js +1 -2
- package/dist/cjs/tokens/atlassian-light-saturated-palette-changes/color/accent.js +1 -2
- package/dist/cjs/tokens/atlassian-light-saturated-palette-changes/color/background.js +1 -2
- package/dist/cjs/tokens/atlassian-light-saturated-palette-changes/color/icon.js +1 -2
- package/dist/cjs/tokens/atlassian-shape/shape.js +1 -2
- package/dist/cjs/tokens/atlassian-spacing/spacing.js +1 -2
- package/dist/cjs/tokens/atlassian-typography/font-family.js +1 -2
- package/dist/cjs/tokens/atlassian-typography/letter-spacing.js +1 -2
- package/dist/cjs/tokens/atlassian-typography/theme.js +11 -12
- package/dist/cjs/tokens/atlassian-typography-adg3/font-family.js +1 -2
- package/dist/cjs/tokens/atlassian-typography-adg3/font-size.js +1 -2
- package/dist/cjs/tokens/atlassian-typography-adg3/font-weight.js +1 -2
- package/dist/cjs/tokens/atlassian-typography-adg3/letter-spacing.js +1 -2
- package/dist/cjs/tokens/atlassian-typography-adg3/line-height.js +1 -2
- package/dist/cjs/tokens/atlassian-typography-adg3/theme.js +12 -13
- package/dist/cjs/tokens/atlassian-typography-minor3/font-family.js +1 -2
- package/dist/cjs/tokens/atlassian-typography-minor3/letter-spacing.js +1 -2
- package/dist/cjs/tokens/atlassian-typography-minor3/theme.js +12 -13
- package/dist/cjs/tokens/default/color/accent.js +1 -2
- package/dist/cjs/tokens/default/color/background.js +1 -2
- package/dist/cjs/tokens/default/color/border.js +1 -2
- package/dist/cjs/tokens/default/color/chart.js +1 -2
- package/dist/cjs/tokens/default/color/icon.js +1 -2
- package/dist/cjs/tokens/default/color/interaction.js +1 -2
- package/dist/cjs/tokens/default/color/skeleton.js +1 -2
- package/dist/cjs/tokens/default/color/text.js +1 -2
- package/dist/cjs/tokens/default/elevation/shadow.js +1 -2
- package/dist/cjs/tokens/default/elevation/surface.js +1 -2
- package/dist/cjs/tokens/default/opacity/opacity.js +1 -2
- package/dist/cjs/tokens/default/shape/shape.js +1 -2
- package/dist/cjs/tokens/default/spacing/spacing.js +1 -2
- package/dist/cjs/tokens/default/typography/font-family.js +1 -2
- package/dist/cjs/tokens/default/typography/font-size.js +1 -2
- package/dist/cjs/tokens/default/typography/font-weight.js +1 -2
- package/dist/cjs/tokens/default/typography/font.js +11 -12
- package/dist/cjs/tokens/default/typography/letter-spacing.js +1 -2
- package/dist/cjs/tokens/default/typography/line-height.js +1 -2
- package/dist/cjs/tokens/default/utility/utility.js +2 -3
- package/dist/cjs/use-theme-observer.js +1 -2
- package/dist/cjs/utils/color-detection.js +3 -5
- package/dist/cjs/utils/color-mode-listeners.js +1 -2
- package/dist/cjs/utils/color-utils.js +1 -2
- package/dist/cjs/utils/custom-theme-token-contrast-check.js +3 -5
- package/dist/cjs/utils/generate-custom-color-ramp.js +5 -9
- package/dist/cjs/utils/get-theme-preferences.js +3 -5
- package/dist/cjs/utils/hash.js +2 -3
- package/dist/cjs/utils/hct-color-utils/contrast.js +2 -3
- package/dist/cjs/utils/hct-color-utils/hct.js +7 -7
- package/dist/cjs/utils/theme-loading.js +3 -6
- package/dist/cjs/utils/token-ids.js +4 -7
- package/dist/cjs/utils/token-order.js +2 -3
- package/dist/es2019/artifacts/palettes-raw/typography-palette.js +3 -3
- package/dist/es2019/artifacts/themes/atlassian-typography-adg3.js +13 -13
- package/dist/es2019/artifacts/themes/atlassian-typography-minor3.js +14 -14
- package/dist/es2019/artifacts/themes/atlassian-typography.js +14 -14
- package/dist/es2019/artifacts/token-default-values.js +13 -13
- package/dist/es2019/artifacts/token-names.js +11 -11
- package/dist/es2019/artifacts/tokens-raw/atlassian-typography-adg3.js +33 -33
- package/dist/es2019/artifacts/tokens-raw/atlassian-typography-minor3.js +34 -34
- package/dist/es2019/artifacts/tokens-raw/atlassian-typography.js +34 -34
- package/dist/es2019/get-token-value.js +1 -1
- package/dist/es2019/get-token.js +1 -1
- package/dist/es2019/palettes/typography-palette.js +1 -1
- package/dist/es2019/tokens/atlassian-typography/theme.js +10 -10
- package/dist/es2019/tokens/atlassian-typography-adg3/theme.js +10 -10
- package/dist/es2019/tokens/atlassian-typography-minor3/theme.js +10 -10
- package/dist/es2019/tokens/default/typography/font.js +10 -10
- package/dist/es2019/utils/hct-color-utils/hct.js +3 -1
- package/dist/esm/artifacts/palettes-raw/typography-palette.js +3 -3
- package/dist/esm/artifacts/themes/atlassian-typography-adg3.js +2 -2
- package/dist/esm/artifacts/themes/atlassian-typography-minor3.js +2 -2
- package/dist/esm/artifacts/themes/atlassian-typography.js +2 -2
- package/dist/esm/artifacts/token-default-values.js +13 -13
- package/dist/esm/artifacts/token-names.js +11 -11
- package/dist/esm/artifacts/tokens-raw/atlassian-typography-adg3.js +33 -33
- package/dist/esm/artifacts/tokens-raw/atlassian-typography-minor3.js +34 -34
- package/dist/esm/artifacts/tokens-raw/atlassian-typography.js +34 -34
- package/dist/esm/custom-theme.js +1 -1
- package/dist/esm/get-theme-styles.js +1 -1
- package/dist/esm/get-token-value.js +1 -1
- package/dist/esm/get-token.js +1 -1
- package/dist/esm/palettes/typography-palette.js +1 -1
- package/dist/esm/tokens/atlassian-typography/theme.js +10 -10
- package/dist/esm/tokens/atlassian-typography-adg3/theme.js +10 -10
- package/dist/esm/tokens/atlassian-typography-minor3/theme.js +10 -10
- package/dist/esm/tokens/default/typography/font.js +10 -10
- package/dist/esm/utils/hct-color-utils/hct.js +3 -1
- package/dist/types/artifacts/palettes-raw/typography-palette.d.ts +1 -1
- package/dist/types/artifacts/themes/atlassian-typography-adg3.d.ts +2 -2
- package/dist/types/artifacts/themes/atlassian-typography-minor3.d.ts +2 -2
- package/dist/types/artifacts/themes/atlassian-typography.d.ts +2 -2
- package/dist/types/artifacts/token-default-values.d.ts +13 -13
- package/dist/types/artifacts/token-names.d.ts +21 -21
- 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/tokens/atlassian-typography-adg3/theme.d.ts +12 -12
- package/dist/types/tokens/atlassian-typography-minor3/theme.d.ts +12 -12
- package/dist/types/types.d.ts +10 -10
- package/dist/types-ts4.5/artifacts/palettes-raw/typography-palette.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/themes/atlassian-typography-adg3.d.ts +2 -2
- package/dist/types-ts4.5/artifacts/themes/atlassian-typography-minor3.d.ts +2 -2
- package/dist/types-ts4.5/artifacts/themes/atlassian-typography.d.ts +2 -2
- package/dist/types-ts4.5/artifacts/token-default-values.d.ts +13 -13
- package/dist/types-ts4.5/artifacts/token-names.d.ts +21 -21
- 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/tokens/atlassian-typography-adg3/theme.d.ts +12 -12
- package/dist/types-ts4.5/tokens/atlassian-typography-minor3/theme.d.ts +12 -12
- package/dist/types-ts4.5/types.d.ts +10 -10
- package/figma/atlassian-typography-adg3.json +2 -2
- package/figma/atlassian-typography-minor3.json +3 -3
- package/figma/atlassian-typography.json +3 -3
- package/package.json +1 -1
- package/report.api.md +20 -20
- package/tmp/api-report-tmp.d.ts +20 -20
|
@@ -15,7 +15,7 @@ var utility = {
|
|
|
15
15
|
var typography = {
|
|
16
16
|
font: {
|
|
17
17
|
heading: {
|
|
18
|
-
|
|
18
|
+
xxlarge: {
|
|
19
19
|
value: {
|
|
20
20
|
fontWeight: 'FontWeight500',
|
|
21
21
|
fontSize: 'LegacyFontSize35',
|
|
@@ -25,7 +25,7 @@ var typography = {
|
|
|
25
25
|
letterSpacing: 'LetterSpacing400'
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
|
-
|
|
28
|
+
xlarge: {
|
|
29
29
|
value: {
|
|
30
30
|
fontWeight: 'FontWeight600',
|
|
31
31
|
fontSize: 'LegacyFontSize29',
|
|
@@ -35,7 +35,7 @@ var typography = {
|
|
|
35
35
|
letterSpacing: 'LetterSpacing400'
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
|
-
|
|
38
|
+
large: {
|
|
39
39
|
value: {
|
|
40
40
|
fontWeight: 'FontWeight500',
|
|
41
41
|
fontSize: 'FontSize24',
|
|
@@ -45,7 +45,7 @@ var typography = {
|
|
|
45
45
|
letterSpacing: 'LetterSpacing400'
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
|
-
|
|
48
|
+
medium: {
|
|
49
49
|
value: {
|
|
50
50
|
fontWeight: 'FontWeight500',
|
|
51
51
|
fontSize: 'FontSize20',
|
|
@@ -55,7 +55,7 @@ var typography = {
|
|
|
55
55
|
letterSpacing: 'LetterSpacing300'
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
-
|
|
58
|
+
small: {
|
|
59
59
|
value: {
|
|
60
60
|
fontWeight: 'FontWeight600',
|
|
61
61
|
fontSize: 'FontSize16',
|
|
@@ -65,7 +65,7 @@ var typography = {
|
|
|
65
65
|
letterSpacing: 'LetterSpacing200'
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
|
-
|
|
68
|
+
xsmall: {
|
|
69
69
|
value: {
|
|
70
70
|
fontWeight: 'FontWeight600',
|
|
71
71
|
fontSize: 'FontSize14',
|
|
@@ -75,7 +75,7 @@ var typography = {
|
|
|
75
75
|
letterSpacing: 'LetterSpacing100'
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
|
-
|
|
78
|
+
xxsmall: {
|
|
79
79
|
value: {
|
|
80
80
|
fontWeight: 'FontWeight600',
|
|
81
81
|
fontSize: 'FontSize12',
|
|
@@ -109,7 +109,7 @@ var typography = {
|
|
|
109
109
|
letterSpacing: 'LetterSpacing0'
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
|
-
|
|
112
|
+
large: {
|
|
113
113
|
value: {
|
|
114
114
|
fontWeight: 'FontWeight400',
|
|
115
115
|
fontSize: 'FontSize16',
|
|
@@ -119,7 +119,7 @@ var typography = {
|
|
|
119
119
|
letterSpacing: 'LetterSpacing0'
|
|
120
120
|
}
|
|
121
121
|
},
|
|
122
|
-
|
|
122
|
+
small: {
|
|
123
123
|
value: {
|
|
124
124
|
fontWeight: 'FontWeight400',
|
|
125
125
|
fontSize: 'LegacyFontSize11',
|
|
@@ -141,7 +141,7 @@ var typography = {
|
|
|
141
141
|
letterSpacing: 'LetterSpacing0'
|
|
142
142
|
}
|
|
143
143
|
},
|
|
144
|
-
|
|
144
|
+
small: {
|
|
145
145
|
value: {
|
|
146
146
|
fontWeight: 'FontWeight400',
|
|
147
147
|
fontSize: 'LegacyFontSize11',
|
|
@@ -154,8 +154,7 @@ var typography = {
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
};
|
|
157
|
-
var _default = {
|
|
157
|
+
var _default = exports.default = {
|
|
158
158
|
font: typography.font,
|
|
159
159
|
utility: utility
|
|
160
|
-
};
|
|
161
|
-
exports.default = _default;
|
|
160
|
+
};
|
|
@@ -15,7 +15,7 @@ var utility = {
|
|
|
15
15
|
var typography = {
|
|
16
16
|
font: {
|
|
17
17
|
heading: {
|
|
18
|
-
|
|
18
|
+
xxlarge: {
|
|
19
19
|
value: {
|
|
20
20
|
fontWeight: 'FontWeight700',
|
|
21
21
|
fontSize: 'FontSize32',
|
|
@@ -25,7 +25,7 @@ var typography = {
|
|
|
25
25
|
letterSpacing: 'LetterSpacing0'
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
|
-
|
|
28
|
+
xlarge: {
|
|
29
29
|
value: {
|
|
30
30
|
fontWeight: 'FontWeight700',
|
|
31
31
|
fontSize: 'FontSize28',
|
|
@@ -35,7 +35,7 @@ var typography = {
|
|
|
35
35
|
letterSpacing: 'LetterSpacing0'
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
|
-
|
|
38
|
+
large: {
|
|
39
39
|
value: {
|
|
40
40
|
fontWeight: 'FontWeight700',
|
|
41
41
|
fontSize: 'FontSize24',
|
|
@@ -45,7 +45,7 @@ var typography = {
|
|
|
45
45
|
letterSpacing: 'LetterSpacing0'
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
|
-
|
|
48
|
+
medium: {
|
|
49
49
|
value: {
|
|
50
50
|
fontWeight: 'FontWeight700',
|
|
51
51
|
fontSize: 'FontSize20',
|
|
@@ -55,7 +55,7 @@ var typography = {
|
|
|
55
55
|
letterSpacing: 'LetterSpacing0'
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
-
|
|
58
|
+
small: {
|
|
59
59
|
value: {
|
|
60
60
|
fontWeight: 'FontWeight700',
|
|
61
61
|
fontSize: 'FontSize16',
|
|
@@ -65,7 +65,7 @@ var typography = {
|
|
|
65
65
|
letterSpacing: 'LetterSpacing0'
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
|
-
|
|
68
|
+
xsmall: {
|
|
69
69
|
value: {
|
|
70
70
|
fontWeight: 'FontWeight700',
|
|
71
71
|
fontSize: 'FontSize14',
|
|
@@ -75,7 +75,7 @@ var typography = {
|
|
|
75
75
|
letterSpacing: 'LetterSpacing0'
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
|
-
|
|
78
|
+
xxsmall: {
|
|
79
79
|
value: {
|
|
80
80
|
fontWeight: 'FontWeight700',
|
|
81
81
|
fontSize: 'FontSize12',
|
|
@@ -109,7 +109,7 @@ var typography = {
|
|
|
109
109
|
letterSpacing: 'LetterSpacing0'
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
|
-
|
|
112
|
+
large: {
|
|
113
113
|
value: {
|
|
114
114
|
fontWeight: 'FontWeight400',
|
|
115
115
|
fontSize: 'FontSize16',
|
|
@@ -119,7 +119,7 @@ var typography = {
|
|
|
119
119
|
letterSpacing: 'LetterSpacing0'
|
|
120
120
|
}
|
|
121
121
|
},
|
|
122
|
-
|
|
122
|
+
small: {
|
|
123
123
|
value: {
|
|
124
124
|
fontWeight: 'FontWeight400',
|
|
125
125
|
fontSize: 'FontSize12',
|
|
@@ -141,7 +141,7 @@ var typography = {
|
|
|
141
141
|
letterSpacing: 'LetterSpacing0'
|
|
142
142
|
}
|
|
143
143
|
},
|
|
144
|
-
|
|
144
|
+
small: {
|
|
145
145
|
value: {
|
|
146
146
|
fontWeight: 'FontWeight400',
|
|
147
147
|
fontSize: 'FontSize12',
|
|
@@ -154,8 +154,7 @@ var typography = {
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
};
|
|
157
|
-
var _default = {
|
|
157
|
+
var _default = exports.default = {
|
|
158
158
|
font: typography.font,
|
|
159
159
|
utility: utility
|
|
160
|
-
};
|
|
161
|
-
exports.default = _default;
|
|
160
|
+
};
|
|
@@ -34,7 +34,7 @@ var font = {
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
heading: {
|
|
37
|
-
|
|
37
|
+
xxlarge: {
|
|
38
38
|
attributes: {
|
|
39
39
|
group: 'typography',
|
|
40
40
|
state: 'experimental',
|
|
@@ -42,7 +42,7 @@ var font = {
|
|
|
42
42
|
description: 'TBD'
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
|
-
|
|
45
|
+
xlarge: {
|
|
46
46
|
attributes: {
|
|
47
47
|
group: 'typography',
|
|
48
48
|
state: 'experimental',
|
|
@@ -50,7 +50,7 @@ var font = {
|
|
|
50
50
|
description: 'TBD'
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
|
-
|
|
53
|
+
large: {
|
|
54
54
|
attributes: {
|
|
55
55
|
group: 'typography',
|
|
56
56
|
state: 'experimental',
|
|
@@ -58,7 +58,7 @@ var font = {
|
|
|
58
58
|
description: 'TBD'
|
|
59
59
|
}
|
|
60
60
|
},
|
|
61
|
-
|
|
61
|
+
medium: {
|
|
62
62
|
attributes: {
|
|
63
63
|
group: 'typography',
|
|
64
64
|
state: 'experimental',
|
|
@@ -66,7 +66,7 @@ var font = {
|
|
|
66
66
|
description: 'TBD'
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
|
-
|
|
69
|
+
small: {
|
|
70
70
|
attributes: {
|
|
71
71
|
group: 'typography',
|
|
72
72
|
state: 'experimental',
|
|
@@ -74,7 +74,7 @@ var font = {
|
|
|
74
74
|
description: 'TBD'
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
|
-
|
|
77
|
+
xsmall: {
|
|
78
78
|
attributes: {
|
|
79
79
|
group: 'typography',
|
|
80
80
|
state: 'experimental',
|
|
@@ -82,7 +82,7 @@ var font = {
|
|
|
82
82
|
description: 'TBD'
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
|
-
|
|
85
|
+
xxsmall: {
|
|
86
86
|
attributes: {
|
|
87
87
|
group: 'typography',
|
|
88
88
|
state: 'experimental',
|
|
@@ -92,7 +92,7 @@ var font = {
|
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
ui: {
|
|
95
|
-
|
|
95
|
+
small: {
|
|
96
96
|
attributes: {
|
|
97
97
|
group: 'typography',
|
|
98
98
|
state: 'experimental',
|
|
@@ -110,7 +110,7 @@ var font = {
|
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
112
|
body: {
|
|
113
|
-
|
|
113
|
+
large: {
|
|
114
114
|
attributes: {
|
|
115
115
|
group: 'typography',
|
|
116
116
|
state: 'experimental',
|
|
@@ -118,7 +118,7 @@ var font = {
|
|
|
118
118
|
description: 'Larger body font or default body font for text rich experiences.'
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
|
-
|
|
121
|
+
small: {
|
|
122
122
|
attributes: {
|
|
123
123
|
group: 'typography',
|
|
124
124
|
state: 'experimental',
|
|
@@ -137,5 +137,4 @@ var font = {
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
};
|
|
140
|
-
var _default = font;
|
|
141
|
-
exports.default = _default;
|
|
140
|
+
var _default = exports.default = font;
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.hexToRGBAValues = exports.getBoxShadow = void 0;
|
|
7
|
-
var hexToRGBAValues = function hexToRGBAValues(hex) {
|
|
7
|
+
var hexToRGBAValues = exports.hexToRGBAValues = function hexToRGBAValues(hex) {
|
|
8
8
|
var hexColor = hex.replace('#', '');
|
|
9
9
|
return {
|
|
10
10
|
r: parseInt(hexColor.slice(0, 2), 16),
|
|
@@ -19,8 +19,7 @@ var hexToRGBAValues = function hexToRGBAValues(hex) {
|
|
|
19
19
|
*
|
|
20
20
|
* @param rawShadow - ShadowToken raw value
|
|
21
21
|
*/
|
|
22
|
-
exports.
|
|
23
|
-
var getBoxShadow = function getBoxShadow(rawShadow) {
|
|
22
|
+
var getBoxShadow = exports.getBoxShadow = function getBoxShadow(rawShadow) {
|
|
24
23
|
return rawShadow.map(function (_ref) {
|
|
25
24
|
var radius = _ref.radius,
|
|
26
25
|
offset = _ref.offset,
|
|
@@ -32,5 +31,4 @@ var getBoxShadow = function getBoxShadow(rawShadow) {
|
|
|
32
31
|
b = _hexToRGBAValues.b;
|
|
33
32
|
return "".concat(offset.x, "px ").concat(offset.y, "px ").concat(radius, "px rgba(").concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(opacity, ")");
|
|
34
33
|
}).join(',');
|
|
35
|
-
};
|
|
36
|
-
exports.getBoxShadow = getBoxShadow;
|
|
34
|
+
};
|
|
@@ -62,5 +62,4 @@ var ColorModeObserver = /*#__PURE__*/function () {
|
|
|
62
62
|
* that can be unbound by any consumer when no longer needed.
|
|
63
63
|
*/
|
|
64
64
|
var SingletonColorModeObserver = new ColorModeObserver();
|
|
65
|
-
var _default = SingletonColorModeObserver;
|
|
66
|
-
exports.default = _default;
|
|
65
|
+
var _default = exports.default = SingletonColorModeObserver;
|
|
@@ -14,12 +14,11 @@ exports.isValidBrandHex = void 0;
|
|
|
14
14
|
exports.relativeLuminanceW3C = relativeLuminanceW3C;
|
|
15
15
|
exports.rgbToHex = rgbToHex;
|
|
16
16
|
// valid hex color with 6 digits
|
|
17
|
-
var isValidBrandHex = function isValidBrandHex(hex) {
|
|
17
|
+
var isValidBrandHex = exports.isValidBrandHex = function isValidBrandHex(hex) {
|
|
18
18
|
return /^#[0-9A-F]{6}$/i.test(hex);
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
// valid hex color with 4, 6 or 8 digits
|
|
22
|
-
exports.isValidBrandHex = isValidBrandHex;
|
|
23
22
|
var isValidHex = function isValidHex(hex) {
|
|
24
23
|
return /^#([A-Fa-f0-9]{3,4}){1,2}$/.test(hex);
|
|
25
24
|
};
|
|
@@ -8,7 +8,7 @@ exports.additionalContrastChecker = exports.additionalChecks = void 0;
|
|
|
8
8
|
var _atlassianDarkTokenValueForContrastCheck = _interopRequireDefault(require("../artifacts/atlassian-dark-token-value-for-contrast-check"));
|
|
9
9
|
var _atlassianLightTokenValueForContrastCheck = _interopRequireDefault(require("../artifacts/atlassian-light-token-value-for-contrast-check"));
|
|
10
10
|
var _colorUtils = require("./color-utils");
|
|
11
|
-
var additionalChecks = [{
|
|
11
|
+
var additionalChecks = exports.additionalChecks = [{
|
|
12
12
|
foreground: 'color.text.brand',
|
|
13
13
|
backgroundLight: 'elevation.surface.sunken',
|
|
14
14
|
backgroundDark: 'elevation.surface.overlay',
|
|
@@ -50,11 +50,10 @@ var additionalChecks = [{
|
|
|
50
50
|
// In dark mode: lighten the following tokens by one base token
|
|
51
51
|
updatedTokens: ['color.chart.brand', 'color.chart.brand.hovered']
|
|
52
52
|
}];
|
|
53
|
-
exports.additionalChecks = additionalChecks;
|
|
54
53
|
var getColorFromTokenRaw = function getColorFromTokenRaw(tokenName, mode) {
|
|
55
54
|
return mode === 'light' ? _atlassianLightTokenValueForContrastCheck.default[tokenName] : _atlassianDarkTokenValueForContrastCheck.default[tokenName];
|
|
56
55
|
};
|
|
57
|
-
var additionalContrastChecker = function additionalContrastChecker(_ref) {
|
|
56
|
+
var additionalContrastChecker = exports.additionalContrastChecker = function additionalContrastChecker(_ref) {
|
|
58
57
|
var customThemeTokenMap = _ref.customThemeTokenMap,
|
|
59
58
|
mode = _ref.mode,
|
|
60
59
|
themeRamp = _ref.themeRamp;
|
|
@@ -82,5 +81,4 @@ var additionalContrastChecker = function additionalContrastChecker(_ref) {
|
|
|
82
81
|
}
|
|
83
82
|
});
|
|
84
83
|
return updatedCustomThemeTokenMap;
|
|
85
|
-
};
|
|
86
|
-
exports.additionalContrastChecker = additionalContrastChecker;
|
|
84
|
+
};
|
|
@@ -16,7 +16,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
16
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; }
|
|
17
17
|
var lowLuminanceContrastRatios = [1.12, 1.33, 2.03, 2.73, 3.33, 4.27, 5.2, 6.62, 12.46, 14.25];
|
|
18
18
|
var highLuminanceContrastRatios = [1.08, 1.24, 1.55, 1.99, 2.45, 3.34, 4.64, 6.1, 10.19, 12.6];
|
|
19
|
-
var getClosestColorIndex = function getClosestColorIndex(themeRamp, brandColor) {
|
|
19
|
+
var getClosestColorIndex = exports.getClosestColorIndex = function getClosestColorIndex(themeRamp, brandColor) {
|
|
20
20
|
// Iterate over themeRamp and find whichever color is closest to brandColor
|
|
21
21
|
var closestColorIndex = 0;
|
|
22
22
|
var closestColorDistance = null;
|
|
@@ -29,8 +29,7 @@ var getClosestColorIndex = function getClosestColorIndex(themeRamp, brandColor)
|
|
|
29
29
|
});
|
|
30
30
|
return closestColorIndex;
|
|
31
31
|
};
|
|
32
|
-
exports.
|
|
33
|
-
var generateColors = function generateColors(brandColor) {
|
|
32
|
+
var generateColors = exports.generateColors = function generateColors(brandColor) {
|
|
34
33
|
// Determine luminance
|
|
35
34
|
var HSLBrandColorHue = (0, _colorUtils.hexToHSL)(brandColor)[0];
|
|
36
35
|
var baseRgb = (0, _colorUtils.HSLToRGB)(HSLBrandColorHue, 100, 60);
|
|
@@ -69,7 +68,6 @@ var generateColors = function generateColors(brandColor) {
|
|
|
69
68
|
*
|
|
70
69
|
* Returns an array of the resulting colors
|
|
71
70
|
*/
|
|
72
|
-
exports.generateColors = generateColors;
|
|
73
71
|
function getInteractionStates(rampPosition, number, colors) {
|
|
74
72
|
var result = [];
|
|
75
73
|
for (var i = 1; i <= number; i++) {
|
|
@@ -81,7 +79,7 @@ function getInteractionStates(rampPosition, number, colors) {
|
|
|
81
79
|
}
|
|
82
80
|
return result;
|
|
83
81
|
}
|
|
84
|
-
var generateTokenMap = function generateTokenMap(brandColor, mode, themeRamp) {
|
|
82
|
+
var generateTokenMap = exports.generateTokenMap = function generateTokenMap(brandColor, mode, themeRamp) {
|
|
85
83
|
var _generateColors = generateColors(brandColor),
|
|
86
84
|
ramp = _generateColors.ramp,
|
|
87
85
|
replacedColor = _generateColors.replacedColor;
|
|
@@ -220,8 +218,7 @@ var generateTokenMap = function generateTokenMap(brandColor, mode, themeRamp) {
|
|
|
220
218
|
dark: customThemeTokenMapDark
|
|
221
219
|
};
|
|
222
220
|
};
|
|
223
|
-
exports.
|
|
224
|
-
var generateTokenMapWithContrastCheck = function generateTokenMapWithContrastCheck(brandColor, mode, themeRamp) {
|
|
221
|
+
var generateTokenMapWithContrastCheck = exports.generateTokenMapWithContrastCheck = function generateTokenMapWithContrastCheck(brandColor, mode, themeRamp) {
|
|
225
222
|
var colors = themeRamp || generateColors(brandColor).ramp;
|
|
226
223
|
var tokenMaps = generateTokenMap(brandColor, mode, colors);
|
|
227
224
|
var result = {};
|
|
@@ -238,5 +235,4 @@ var generateTokenMapWithContrastCheck = function generateTokenMapWithContrastChe
|
|
|
238
235
|
}
|
|
239
236
|
});
|
|
240
237
|
return result;
|
|
241
|
-
};
|
|
242
|
-
exports.generateTokenMapWithContrastCheck = generateTokenMapWithContrastCheck;
|
|
238
|
+
};
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.getThemePreferences = exports.getThemeOverridePreferences = void 0;
|
|
8
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
9
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
|
-
var getThemePreferences = function getThemePreferences(themeState) {
|
|
10
|
+
var getThemePreferences = exports.getThemePreferences = function getThemePreferences(themeState) {
|
|
11
11
|
var colorMode = themeState.colorMode,
|
|
12
12
|
dark = themeState.dark,
|
|
13
13
|
light = themeState.light,
|
|
@@ -35,8 +35,7 @@ var getThemePreferences = function getThemePreferences(themeState) {
|
|
|
35
35
|
});
|
|
36
36
|
return (0, _toConsumableArray2.default)(new Set(themePreferences));
|
|
37
37
|
};
|
|
38
|
-
exports.
|
|
39
|
-
var getThemeOverridePreferences = function getThemeOverridePreferences(themeState) {
|
|
38
|
+
var getThemeOverridePreferences = exports.getThemeOverridePreferences = function getThemeOverridePreferences(themeState) {
|
|
40
39
|
var colorMode = themeState.colorMode,
|
|
41
40
|
dark = themeState.dark,
|
|
42
41
|
light = themeState.light;
|
|
@@ -47,5 +46,4 @@ var getThemeOverridePreferences = function getThemeOverridePreferences(themeStat
|
|
|
47
46
|
themePreferences.includes('dark') && themeOverridePreferences.push('dark-new-input-border');
|
|
48
47
|
}
|
|
49
48
|
return (0, _toConsumableArray2.default)(new Set(themeOverridePreferences));
|
|
50
|
-
};
|
|
51
|
-
exports.getThemeOverridePreferences = getThemeOverridePreferences;
|
|
49
|
+
};
|
package/dist/cjs/utils/hash.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.hash = void 0;
|
|
7
|
-
var hash = function hash(str) {
|
|
7
|
+
var hash = exports.hash = function hash(str) {
|
|
8
8
|
var hash = 0;
|
|
9
9
|
for (var i = 0; i < str.length; i++) {
|
|
10
10
|
var char = str.charCodeAt(i);
|
|
@@ -13,5 +13,4 @@ var hash = function hash(str) {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
return new Uint32Array([hash])[0].toString(36);
|
|
16
|
-
};
|
|
17
|
-
exports.hash = hash;
|
|
16
|
+
};
|