@atlaskit/tokens 1.25.2 → 1.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/artifacts/theme-import-map.js +13 -1
  3. package/dist/cjs/artifacts/themes/atlassian-dark-increased-contrast.js +12 -0
  4. package/dist/cjs/artifacts/themes/atlassian-light-increased-contrast.js +12 -0
  5. package/dist/cjs/artifacts/tokens-raw/atlassian-dark-increased-contrast.js +8687 -0
  6. package/dist/cjs/artifacts/tokens-raw/atlassian-light-increased-contrast.js +8653 -0
  7. package/dist/cjs/constants.js +2 -1
  8. package/dist/cjs/enable-global-theme.js +3 -0
  9. package/dist/cjs/get-ssr-auto-script.js +8 -2
  10. package/dist/cjs/get-theme-html-attrs.js +9 -0
  11. package/dist/cjs/get-theme-styles.js +9 -0
  12. package/dist/cjs/get-token-value.js +1 -1
  13. package/dist/cjs/get-token.js +1 -1
  14. package/dist/cjs/set-global-theme.js +35 -20
  15. package/dist/cjs/theme-config.js +29 -2
  16. package/dist/cjs/tokens/atlassian-dark-increased-contrast/color/accent.js +271 -0
  17. package/dist/cjs/tokens/atlassian-dark-increased-contrast/color/background.js +104 -0
  18. package/dist/cjs/tokens/atlassian-dark-increased-contrast/color/border.js +46 -0
  19. package/dist/cjs/tokens/atlassian-dark-increased-contrast/color/chart.js +309 -0
  20. package/dist/cjs/tokens/atlassian-dark-increased-contrast/color/icon.js +45 -0
  21. package/dist/cjs/tokens/atlassian-dark-increased-contrast/color/interaction.js +22 -0
  22. package/dist/cjs/tokens/atlassian-dark-increased-contrast/color/skeleton.js +21 -0
  23. package/dist/cjs/tokens/atlassian-dark-increased-contrast/color/text.js +56 -0
  24. package/dist/cjs/tokens/atlassian-dark-increased-contrast/elevation/shadow.js +66 -0
  25. package/dist/cjs/tokens/atlassian-light-increased-contrast/color/accent.js +423 -0
  26. package/dist/cjs/tokens/atlassian-light-increased-contrast/color/background.js +145 -0
  27. package/dist/cjs/tokens/atlassian-light-increased-contrast/color/border.js +50 -0
  28. package/dist/cjs/tokens/atlassian-light-increased-contrast/color/chart.js +418 -0
  29. package/dist/cjs/tokens/atlassian-light-increased-contrast/color/icon.js +49 -0
  30. package/dist/cjs/tokens/atlassian-light-increased-contrast/color/interaction.js +22 -0
  31. package/dist/cjs/tokens/atlassian-light-increased-contrast/color/skeleton.js +21 -0
  32. package/dist/cjs/tokens/atlassian-light-increased-contrast/color/text.js +56 -0
  33. package/dist/cjs/tokens/atlassian-light-increased-contrast/elevation/shadow.js +62 -0
  34. package/dist/cjs/tokens/atlassian-light-increased-contrast/elevation/surface.js +18 -0
  35. package/dist/cjs/utils/configure-page.js +16 -1
  36. package/dist/cjs/utils/contrast-mode-listeners.js +65 -0
  37. package/dist/cjs/utils/get-increased-contrast-theme.js +20 -0
  38. package/dist/cjs/utils/get-theme-preferences.js +23 -1
  39. package/dist/cjs/utils/theme-loading.js +3 -2
  40. package/dist/es2019/artifacts/theme-import-map.js +5 -1
  41. package/dist/es2019/artifacts/themes/atlassian-dark-increased-contrast.js +401 -0
  42. package/dist/es2019/artifacts/themes/atlassian-light-increased-contrast.js +401 -0
  43. package/dist/es2019/artifacts/tokens-raw/atlassian-dark-increased-contrast.js +8681 -0
  44. package/dist/es2019/artifacts/tokens-raw/atlassian-light-increased-contrast.js +8647 -0
  45. package/dist/es2019/constants.js +1 -0
  46. package/dist/es2019/enable-global-theme.js +2 -0
  47. package/dist/es2019/get-ssr-auto-script.js +17 -11
  48. package/dist/es2019/get-theme-html-attrs.js +12 -2
  49. package/dist/es2019/get-theme-styles.js +7 -0
  50. package/dist/es2019/get-token-value.js +1 -1
  51. package/dist/es2019/get-token.js +1 -1
  52. package/dist/es2019/set-global-theme.js +14 -0
  53. package/dist/es2019/theme-config.js +28 -1
  54. package/dist/es2019/tokens/atlassian-dark-increased-contrast/color/accent.js +265 -0
  55. package/dist/es2019/tokens/atlassian-dark-increased-contrast/color/background.js +98 -0
  56. package/dist/es2019/tokens/atlassian-dark-increased-contrast/color/border.js +40 -0
  57. package/dist/es2019/tokens/atlassian-dark-increased-contrast/color/chart.js +303 -0
  58. package/dist/es2019/tokens/atlassian-dark-increased-contrast/color/icon.js +39 -0
  59. package/dist/es2019/tokens/atlassian-dark-increased-contrast/color/interaction.js +16 -0
  60. package/dist/es2019/tokens/atlassian-dark-increased-contrast/color/skeleton.js +15 -0
  61. package/dist/es2019/tokens/atlassian-dark-increased-contrast/color/text.js +50 -0
  62. package/dist/es2019/tokens/atlassian-dark-increased-contrast/elevation/shadow.js +60 -0
  63. package/dist/es2019/tokens/atlassian-light-increased-contrast/color/accent.js +417 -0
  64. package/dist/es2019/tokens/atlassian-light-increased-contrast/color/background.js +139 -0
  65. package/dist/es2019/tokens/atlassian-light-increased-contrast/color/border.js +44 -0
  66. package/dist/es2019/tokens/atlassian-light-increased-contrast/color/chart.js +412 -0
  67. package/dist/es2019/tokens/atlassian-light-increased-contrast/color/icon.js +43 -0
  68. package/dist/es2019/tokens/atlassian-light-increased-contrast/color/interaction.js +16 -0
  69. package/dist/es2019/tokens/atlassian-light-increased-contrast/color/skeleton.js +15 -0
  70. package/dist/es2019/tokens/atlassian-light-increased-contrast/color/text.js +50 -0
  71. package/dist/es2019/tokens/atlassian-light-increased-contrast/elevation/shadow.js +56 -0
  72. package/dist/es2019/tokens/atlassian-light-increased-contrast/elevation/surface.js +12 -0
  73. package/dist/es2019/utils/configure-page.js +18 -1
  74. package/dist/es2019/utils/contrast-mode-listeners.js +48 -0
  75. package/dist/es2019/utils/get-increased-contrast-theme.js +13 -0
  76. package/dist/es2019/utils/get-theme-preferences.js +23 -1
  77. package/dist/es2019/utils/theme-loading.js +2 -1
  78. package/dist/esm/artifacts/theme-import-map.js +9 -1
  79. package/dist/esm/artifacts/themes/atlassian-dark-increased-contrast.js +6 -0
  80. package/dist/esm/artifacts/themes/atlassian-light-increased-contrast.js +6 -0
  81. package/dist/esm/artifacts/tokens-raw/atlassian-dark-increased-contrast.js +8681 -0
  82. package/dist/esm/artifacts/tokens-raw/atlassian-light-increased-contrast.js +8647 -0
  83. package/dist/esm/constants.js +1 -0
  84. package/dist/esm/enable-global-theme.js +3 -0
  85. package/dist/esm/get-ssr-auto-script.js +10 -4
  86. package/dist/esm/get-theme-html-attrs.js +10 -1
  87. package/dist/esm/get-theme-styles.js +9 -0
  88. package/dist/esm/get-token-value.js +1 -1
  89. package/dist/esm/get-token.js +1 -1
  90. package/dist/esm/set-global-theme.js +35 -20
  91. package/dist/esm/theme-config.js +28 -1
  92. package/dist/esm/tokens/atlassian-dark-increased-contrast/color/accent.js +265 -0
  93. package/dist/esm/tokens/atlassian-dark-increased-contrast/color/background.js +98 -0
  94. package/dist/esm/tokens/atlassian-dark-increased-contrast/color/border.js +40 -0
  95. package/dist/esm/tokens/atlassian-dark-increased-contrast/color/chart.js +303 -0
  96. package/dist/esm/tokens/atlassian-dark-increased-contrast/color/icon.js +39 -0
  97. package/dist/esm/tokens/atlassian-dark-increased-contrast/color/interaction.js +16 -0
  98. package/dist/esm/tokens/atlassian-dark-increased-contrast/color/skeleton.js +15 -0
  99. package/dist/esm/tokens/atlassian-dark-increased-contrast/color/text.js +50 -0
  100. package/dist/esm/tokens/atlassian-dark-increased-contrast/elevation/shadow.js +60 -0
  101. package/dist/esm/tokens/atlassian-light-increased-contrast/color/accent.js +417 -0
  102. package/dist/esm/tokens/atlassian-light-increased-contrast/color/background.js +139 -0
  103. package/dist/esm/tokens/atlassian-light-increased-contrast/color/border.js +44 -0
  104. package/dist/esm/tokens/atlassian-light-increased-contrast/color/chart.js +412 -0
  105. package/dist/esm/tokens/atlassian-light-increased-contrast/color/icon.js +43 -0
  106. package/dist/esm/tokens/atlassian-light-increased-contrast/color/interaction.js +16 -0
  107. package/dist/esm/tokens/atlassian-light-increased-contrast/color/skeleton.js +15 -0
  108. package/dist/esm/tokens/atlassian-light-increased-contrast/color/text.js +50 -0
  109. package/dist/esm/tokens/atlassian-light-increased-contrast/elevation/shadow.js +56 -0
  110. package/dist/esm/tokens/atlassian-light-increased-contrast/elevation/surface.js +12 -0
  111. package/dist/esm/utils/configure-page.js +16 -1
  112. package/dist/esm/utils/contrast-mode-listeners.js +58 -0
  113. package/dist/esm/utils/get-increased-contrast-theme.js +14 -0
  114. package/dist/esm/utils/get-theme-preferences.js +23 -1
  115. package/dist/esm/utils/theme-loading.js +2 -1
  116. package/dist/types/artifacts/theme-import-map.d.ts +1 -1
  117. package/dist/types/artifacts/themes/atlassian-dark-increased-contrast.d.ts +7 -0
  118. package/dist/types/artifacts/themes/atlassian-light-increased-contrast.d.ts +7 -0
  119. package/dist/types/artifacts/tokens-raw/atlassian-dark-increased-contrast.d.ts +133 -0
  120. package/dist/types/artifacts/tokens-raw/atlassian-light-increased-contrast.d.ts +113 -0
  121. package/dist/types/constants.d.ts +1 -0
  122. package/dist/types/enable-global-theme.d.ts +1 -1
  123. package/dist/types/get-ssr-auto-script.d.ts +1 -1
  124. package/dist/types/get-theme-html-attrs.d.ts +1 -1
  125. package/dist/types/set-global-theme.d.ts +2 -1
  126. package/dist/types/theme-config.d.ts +29 -6
  127. package/dist/types/tokens/atlassian-dark-increased-contrast/color/accent.d.ts +4 -0
  128. package/dist/types/tokens/atlassian-dark-increased-contrast/color/background.d.ts +4 -0
  129. package/dist/types/tokens/atlassian-dark-increased-contrast/color/border.d.ts +4 -0
  130. package/dist/types/tokens/atlassian-dark-increased-contrast/color/chart.d.ts +4 -0
  131. package/dist/types/tokens/atlassian-dark-increased-contrast/color/icon.d.ts +4 -0
  132. package/dist/types/tokens/atlassian-dark-increased-contrast/color/interaction.d.ts +4 -0
  133. package/dist/types/tokens/atlassian-dark-increased-contrast/color/skeleton.d.ts +4 -0
  134. package/dist/types/tokens/atlassian-dark-increased-contrast/color/text.d.ts +4 -0
  135. package/dist/types/tokens/atlassian-dark-increased-contrast/elevation/shadow.d.ts +4 -0
  136. package/dist/types/tokens/atlassian-light-increased-contrast/color/accent.d.ts +4 -0
  137. package/dist/types/tokens/atlassian-light-increased-contrast/color/background.d.ts +4 -0
  138. package/dist/types/tokens/atlassian-light-increased-contrast/color/border.d.ts +4 -0
  139. package/dist/types/tokens/atlassian-light-increased-contrast/color/chart.d.ts +4 -0
  140. package/dist/types/tokens/atlassian-light-increased-contrast/color/icon.d.ts +4 -0
  141. package/dist/types/tokens/atlassian-light-increased-contrast/color/interaction.d.ts +4 -0
  142. package/dist/types/tokens/atlassian-light-increased-contrast/color/skeleton.d.ts +4 -0
  143. package/dist/types/tokens/atlassian-light-increased-contrast/color/text.d.ts +4 -0
  144. package/dist/types/tokens/atlassian-light-increased-contrast/elevation/shadow.d.ts +4 -0
  145. package/dist/types/tokens/atlassian-light-increased-contrast/elevation/surface.d.ts +4 -0
  146. package/dist/types/utils/configure-page.d.ts +1 -1
  147. package/dist/types/utils/contrast-mode-listeners.d.ts +13 -0
  148. package/dist/types/utils/get-increased-contrast-theme.d.ts +5 -0
  149. package/dist/types/utils/theme-loading.d.ts +1 -0
  150. package/dist/types-ts4.5/artifacts/theme-import-map.d.ts +1 -1
  151. package/dist/types-ts4.5/artifacts/themes/atlassian-dark-increased-contrast.d.ts +7 -0
  152. package/dist/types-ts4.5/artifacts/themes/atlassian-light-increased-contrast.d.ts +7 -0
  153. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-dark-increased-contrast.d.ts +133 -0
  154. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-light-increased-contrast.d.ts +113 -0
  155. package/dist/types-ts4.5/constants.d.ts +1 -0
  156. package/dist/types-ts4.5/enable-global-theme.d.ts +1 -1
  157. package/dist/types-ts4.5/get-ssr-auto-script.d.ts +1 -1
  158. package/dist/types-ts4.5/get-theme-html-attrs.d.ts +1 -1
  159. package/dist/types-ts4.5/set-global-theme.d.ts +2 -1
  160. package/dist/types-ts4.5/theme-config.d.ts +35 -4
  161. package/dist/types-ts4.5/tokens/atlassian-dark-increased-contrast/color/accent.d.ts +4 -0
  162. package/dist/types-ts4.5/tokens/atlassian-dark-increased-contrast/color/background.d.ts +4 -0
  163. package/dist/types-ts4.5/tokens/atlassian-dark-increased-contrast/color/border.d.ts +4 -0
  164. package/dist/types-ts4.5/tokens/atlassian-dark-increased-contrast/color/chart.d.ts +4 -0
  165. package/dist/types-ts4.5/tokens/atlassian-dark-increased-contrast/color/icon.d.ts +4 -0
  166. package/dist/types-ts4.5/tokens/atlassian-dark-increased-contrast/color/interaction.d.ts +4 -0
  167. package/dist/types-ts4.5/tokens/atlassian-dark-increased-contrast/color/skeleton.d.ts +4 -0
  168. package/dist/types-ts4.5/tokens/atlassian-dark-increased-contrast/color/text.d.ts +4 -0
  169. package/dist/types-ts4.5/tokens/atlassian-dark-increased-contrast/elevation/shadow.d.ts +4 -0
  170. package/dist/types-ts4.5/tokens/atlassian-light-increased-contrast/color/accent.d.ts +4 -0
  171. package/dist/types-ts4.5/tokens/atlassian-light-increased-contrast/color/background.d.ts +4 -0
  172. package/dist/types-ts4.5/tokens/atlassian-light-increased-contrast/color/border.d.ts +4 -0
  173. package/dist/types-ts4.5/tokens/atlassian-light-increased-contrast/color/chart.d.ts +4 -0
  174. package/dist/types-ts4.5/tokens/atlassian-light-increased-contrast/color/icon.d.ts +4 -0
  175. package/dist/types-ts4.5/tokens/atlassian-light-increased-contrast/color/interaction.d.ts +4 -0
  176. package/dist/types-ts4.5/tokens/atlassian-light-increased-contrast/color/skeleton.d.ts +4 -0
  177. package/dist/types-ts4.5/tokens/atlassian-light-increased-contrast/color/text.d.ts +4 -0
  178. package/dist/types-ts4.5/tokens/atlassian-light-increased-contrast/elevation/shadow.d.ts +4 -0
  179. package/dist/types-ts4.5/tokens/atlassian-light-increased-contrast/elevation/surface.d.ts +4 -0
  180. package/dist/types-ts4.5/utils/configure-page.d.ts +1 -1
  181. package/dist/types-ts4.5/utils/contrast-mode-listeners.d.ts +13 -0
  182. package/dist/types-ts4.5/utils/get-increased-contrast-theme.d.ts +5 -0
  183. package/dist/types-ts4.5/utils/theme-loading.d.ts +1 -0
  184. package/figma/atlassian-dark-increased-contrast.json +3542 -0
  185. package/figma/atlassian-light-increased-contrast.json +3523 -0
  186. package/package.json +4 -1
  187. package/report.api.md +38 -5
  188. package/tmp/api-report-tmp.d.ts +19 -12
@@ -0,0 +1,412 @@
1
+ var color = {
2
+ color: {
3
+ chart: {
4
+ brand: {
5
+ '[default]': {
6
+ value: 'Blue700'
7
+ },
8
+ // TODO: Confirm. This token wasn't included in theme design, but color.chart.brand.bold was... and that token doesn't exist?
9
+ // Assuming it's meant to be color.chart.brand.hovered
10
+ hovered: {
11
+ value: 'Blue800'
12
+ }
13
+ },
14
+ neutral: {
15
+ '[default]': {
16
+ value: 'Neutral700'
17
+ },
18
+ hovered: {
19
+ value: 'Neutral800'
20
+ }
21
+ },
22
+ success: {
23
+ '[default]': {
24
+ '[default]': {
25
+ value: 'Green800'
26
+ },
27
+ // TODO: Confirm. No hovered colors included in theme design for many tokens here but I've stepped them up by one
28
+ // or they won't have a color difference to default states
29
+ hovered: {
30
+ value: 'Green900'
31
+ }
32
+ },
33
+ bold: {
34
+ '[default]': {
35
+ value: 'Green900'
36
+ },
37
+ hovered: {
38
+ value: 'Green1000'
39
+ }
40
+ }
41
+ },
42
+ danger: {
43
+ '[default]': {
44
+ '[default]': {
45
+ value: 'Red700'
46
+ },
47
+ hovered: {
48
+ value: 'Red800'
49
+ }
50
+ },
51
+ bold: {
52
+ '[default]': {
53
+ value: 'Red900'
54
+ },
55
+ hovered: {
56
+ value: 'Red1000'
57
+ }
58
+ }
59
+ },
60
+ warning: {
61
+ '[default]': {
62
+ '[default]': {
63
+ value: 'Yellow800'
64
+ },
65
+ hovered: {
66
+ value: 'Yellow900'
67
+ }
68
+ },
69
+ bold: {
70
+ '[default]': {
71
+ value: 'Yellow900'
72
+ },
73
+ hovered: {
74
+ value: 'Yellow1000'
75
+ }
76
+ }
77
+ },
78
+ information: {
79
+ '[default]': {
80
+ '[default]': {
81
+ value: 'Blue700'
82
+ },
83
+ hovered: {
84
+ value: 'Blue800'
85
+ }
86
+ },
87
+ bold: {
88
+ '[default]': {
89
+ value: 'Blue900'
90
+ },
91
+ hovered: {
92
+ value: 'Blue1000'
93
+ }
94
+ }
95
+ },
96
+ discovery: {
97
+ '[default]': {
98
+ '[default]': {
99
+ value: 'Purple700'
100
+ },
101
+ hovered: {
102
+ value: 'Purple800'
103
+ }
104
+ },
105
+ bold: {
106
+ '[default]': {
107
+ value: 'Purple900'
108
+ },
109
+ hovered: {
110
+ value: 'Purple1000'
111
+ }
112
+ }
113
+ },
114
+ categorical: {
115
+ 1: {
116
+ '[default]': {
117
+ value: 'Teal800'
118
+ },
119
+ hovered: {
120
+ value: 'Teal900'
121
+ }
122
+ },
123
+ 3: {
124
+ '[default]': {
125
+ value: 'Orange800'
126
+ },
127
+ hovered: {
128
+ value: 'Orange900'
129
+ }
130
+ },
131
+ 6: {
132
+ '[default]': {
133
+ value: 'Purple800'
134
+ },
135
+ hovered: {
136
+ value: 'Purple900'
137
+ }
138
+ }
139
+ },
140
+ blue: {
141
+ bold: {
142
+ '[default]': {
143
+ value: 'Blue800'
144
+ },
145
+ hovered: {
146
+ value: 'Blue900'
147
+ }
148
+ },
149
+ bolder: {
150
+ '[default]': {
151
+ value: 'Blue900'
152
+ },
153
+ hovered: {
154
+ value: 'Blue1000'
155
+ }
156
+ },
157
+ boldest: {
158
+ '[default]': {
159
+ value: 'Blue1000'
160
+ },
161
+ hovered: {
162
+ // @ts-expect-error TODO: Consider extending palette. Uses value outside range of palettes (would be Blue1100).
163
+ value: '#022353'
164
+ }
165
+ }
166
+ },
167
+ red: {
168
+ bold: {
169
+ '[default]': {
170
+ value: 'Red800'
171
+ },
172
+ hovered: {
173
+ value: 'Red900'
174
+ }
175
+ },
176
+ bolder: {
177
+ '[default]': {
178
+ value: 'Red900'
179
+ },
180
+ hovered: {
181
+ value: 'Red1000'
182
+ }
183
+ },
184
+ boldest: {
185
+ '[default]': {
186
+ value: 'Red1000'
187
+ },
188
+ hovered: {
189
+ // @ts-expect-error TODO: Consider extending palette. Uses value outside range of palettes (would be Red1100).
190
+ value: '#49120C'
191
+ }
192
+ }
193
+ },
194
+ orange: {
195
+ bold: {
196
+ '[default]': {
197
+ value: 'Orange800'
198
+ },
199
+ hovered: {
200
+ value: 'Orange900'
201
+ }
202
+ },
203
+ bolder: {
204
+ '[default]': {
205
+ value: 'Orange900'
206
+ },
207
+ hovered: {
208
+ value: 'Orange1000'
209
+ }
210
+ },
211
+ boldest: {
212
+ '[default]': {
213
+ value: 'Orange1000'
214
+ },
215
+ hovered: {
216
+ // @ts-expect-error TODO: Consider extending palette. Uses value outside range of palettes (would be Orange1100).
217
+ value: '#3E2108'
218
+ }
219
+ }
220
+ },
221
+ yellow: {
222
+ bold: {
223
+ '[default]': {
224
+ value: 'Yellow800'
225
+ },
226
+ hovered: {
227
+ value: 'Yellow900'
228
+ }
229
+ },
230
+ bolder: {
231
+ '[default]': {
232
+ value: 'Yellow900'
233
+ },
234
+ hovered: {
235
+ value: 'Yellow1000'
236
+ }
237
+ },
238
+ boldest: {
239
+ '[default]': {
240
+ value: 'Yellow1000'
241
+ },
242
+ hovered: {
243
+ // @ts-expect-error TODO: Consider extending palette. Uses value outside range of palettes (would be Yellow1100).
244
+ value: '#342800'
245
+ }
246
+ }
247
+ },
248
+ green: {
249
+ bold: {
250
+ '[default]': {
251
+ value: 'Green800'
252
+ },
253
+ hovered: {
254
+ value: 'Green900'
255
+ }
256
+ },
257
+ bolder: {
258
+ '[default]': {
259
+ value: 'Green900'
260
+ },
261
+ hovered: {
262
+ value: 'Green1000'
263
+ }
264
+ },
265
+ boldest: {
266
+ '[default]': {
267
+ value: 'Green1000'
268
+ },
269
+ hovered: {
270
+ // @ts-expect-error TODO: Consider extending palette. Uses value outside range of palettes (would be Green1100).
271
+ value: '#0F3324'
272
+ }
273
+ }
274
+ },
275
+ teal: {
276
+ bold: {
277
+ '[default]': {
278
+ value: 'Teal800'
279
+ },
280
+ hovered: {
281
+ value: 'Teal900'
282
+ }
283
+ },
284
+ bolder: {
285
+ '[default]': {
286
+ value: 'Teal900'
287
+ },
288
+ hovered: {
289
+ value: 'Teal1000'
290
+ }
291
+ },
292
+ boldest: {
293
+ '[default]': {
294
+ value: 'Teal1000'
295
+ },
296
+ hovered: {
297
+ // @ts-expect-error TODO: Consider extending palette. Uses value outside range of palettes (would be Teal1100).
298
+ value: '#103034'
299
+ }
300
+ }
301
+ },
302
+ purple: {
303
+ bold: {
304
+ '[default]': {
305
+ value: 'Purple800'
306
+ },
307
+ hovered: {
308
+ value: 'Purple900'
309
+ }
310
+ },
311
+ bolder: {
312
+ '[default]': {
313
+ value: 'Purple900'
314
+ },
315
+ hovered: {
316
+ value: 'Purple1000'
317
+ }
318
+ },
319
+ boldest: {
320
+ '[default]': {
321
+ value: 'Purple1000'
322
+ },
323
+ hovered: {
324
+ // @ts-expect-error TODO: Consider extending palette. Uses value outside range of palettes (would be Purple1100).
325
+ value: '#211A47'
326
+ }
327
+ }
328
+ },
329
+ magenta: {
330
+ bold: {
331
+ '[default]': {
332
+ value: 'Magenta800'
333
+ },
334
+ hovered: {
335
+ value: 'Magenta900'
336
+ }
337
+ },
338
+ bolder: {
339
+ '[default]': {
340
+ value: 'Magenta900'
341
+ },
342
+ hovered: {
343
+ value: 'Magenta1000'
344
+ }
345
+ },
346
+ boldest: {
347
+ '[default]': {
348
+ value: 'Magenta1000'
349
+ },
350
+ hovered: {
351
+ // @ts-expect-error TODO: Consider extending palette. Uses value outside range of palettes (would be Magenta1100).
352
+ value: '#37172A'
353
+ }
354
+ }
355
+ },
356
+ lime: {
357
+ bold: {
358
+ '[default]': {
359
+ value: 'Lime800'
360
+ },
361
+ hovered: {
362
+ value: 'Lime900'
363
+ }
364
+ },
365
+ bolder: {
366
+ '[default]': {
367
+ value: 'Lime900'
368
+ },
369
+ hovered: {
370
+ value: 'Lime1000'
371
+ }
372
+ },
373
+ boldest: {
374
+ '[default]': {
375
+ value: 'Lime1000'
376
+ },
377
+ hovered: {
378
+ // @ts-expect-error TODO: Consider extending palette. Uses value outside range of palettes (would be Lime1100).
379
+ value: '#233013'
380
+ }
381
+ }
382
+ },
383
+ gray: {
384
+ bold: {
385
+ '[default]': {
386
+ value: 'Neutral700'
387
+ },
388
+ hovered: {
389
+ value: 'Neutral800'
390
+ }
391
+ },
392
+ bolder: {
393
+ '[default]': {
394
+ value: 'Neutral800'
395
+ },
396
+ hovered: {
397
+ value: 'Neutral900'
398
+ }
399
+ },
400
+ boldest: {
401
+ '[default]': {
402
+ value: 'Neutral900'
403
+ },
404
+ hovered: {
405
+ value: 'Neutral1000'
406
+ }
407
+ }
408
+ }
409
+ }
410
+ }
411
+ };
412
+ export default color;
@@ -0,0 +1,43 @@
1
+ var color = {
2
+ color: {
3
+ icon: {
4
+ '[default]': {
5
+ value: 'Neutral1000'
6
+ },
7
+ subtle: {
8
+ value: 'Neutral900'
9
+ },
10
+ // TODO: Confirm - was not included in theme design but seems like it should be darker
11
+ // disabled: {
12
+ // value: 'Neutral400A',
13
+ // },
14
+ brand: {
15
+ value: 'Blue800'
16
+ },
17
+ selected: {
18
+ value: 'Blue800'
19
+ },
20
+ danger: {
21
+ value: 'Red700'
22
+ },
23
+ warning: {
24
+ '[default]': {
25
+ value: 'Orange800'
26
+ },
27
+ inverse: {
28
+ value: 'Neutral0'
29
+ }
30
+ },
31
+ success: {
32
+ value: 'Green800'
33
+ },
34
+ discovery: {
35
+ value: 'Purple700'
36
+ },
37
+ information: {
38
+ value: 'Blue800'
39
+ }
40
+ }
41
+ }
42
+ };
43
+ export default color;
@@ -0,0 +1,16 @@
1
+ var color = {
2
+ color: {
3
+ interaction: {
4
+ // TODO: Confirm - was not included in theme design but seems like it should be darker
5
+ // hovered: {
6
+ // // @ts-ignore temporary values
7
+ // value: '#00000029',
8
+ // },
9
+ // pressed: {
10
+ // // @ts-ignore temporary values
11
+ // value: '#00000052',
12
+ // },
13
+ }
14
+ }
15
+ };
16
+ export default color;
@@ -0,0 +1,15 @@
1
+ var color = {
2
+ color: {
3
+ skeleton: {
4
+ // TODO: Confirm - was not included in theme design but seems like it should be darker
5
+ // but I think they should definitely be darker?
6
+ // '[default]': {
7
+ // value: 'Neutral200A',
8
+ // },
9
+ // subtle: {
10
+ // value: 'Neutral100A',
11
+ // },
12
+ }
13
+ }
14
+ };
15
+ export default color;
@@ -0,0 +1,50 @@
1
+ var color = {
2
+ color: {
3
+ text: {
4
+ '[default]': {
5
+ value: 'Neutral1100'
6
+ },
7
+ subtle: {
8
+ value: 'Neutral1000'
9
+ },
10
+ subtlest: {
11
+ value: 'Neutral900'
12
+ },
13
+ brand: {
14
+ value: 'Blue900'
15
+ },
16
+ selected: {
17
+ value: 'Blue900'
18
+ },
19
+ danger: {
20
+ value: 'Red900'
21
+ },
22
+ warning: {
23
+ '[default]': {
24
+ value: 'Orange900'
25
+ },
26
+ inverse: {
27
+ value: 'Neutral0'
28
+ }
29
+ },
30
+ success: {
31
+ value: 'Green900'
32
+ },
33
+ information: {
34
+ value: 'Blue900'
35
+ },
36
+ discovery: {
37
+ value: 'Purple900'
38
+ }
39
+ },
40
+ link: {
41
+ '[default]': {
42
+ value: 'Blue900'
43
+ },
44
+ pressed: {
45
+ value: 'Blue1000'
46
+ }
47
+ }
48
+ }
49
+ };
50
+ export default color;
@@ -0,0 +1,56 @@
1
+ var shadow = {
2
+ elevation: {
3
+ shadow: {
4
+ raised: {
5
+ value: [{
6
+ radius: 0,
7
+ spread: 1,
8
+ offset: {
9
+ x: 0,
10
+ y: 0
11
+ },
12
+ color: 'Neutral1100',
13
+ opacity: 0.5,
14
+ inset: true
15
+ }]
16
+ },
17
+ // TODO: Confirm - overflow not included in theme design
18
+ // overflow: {
19
+ // '[default]': {
20
+ // value: [
21
+ // {
22
+ // radius: 8,
23
+ // offset: { x: 0, y: 0 },
24
+ // color: 'Neutral1100',
25
+ // opacity: 0.16,
26
+ // },
27
+ // {
28
+ // radius: 1,
29
+ // offset: { x: 0, y: 0 },
30
+ // color: 'Neutral1100',
31
+ // opacity: 0.12,
32
+ // },
33
+ // ],
34
+ // },
35
+ // // @ts-ignore no current palette colour for this yet
36
+ // spread: { value: '#091e4229' },
37
+ // // @ts-ignore no current palette colour for this yet
38
+ // perimeter: { value: '#091e421f' },
39
+ // },
40
+ overlay: {
41
+ value: [{
42
+ radius: 0,
43
+ spread: 1,
44
+ offset: {
45
+ x: 0,
46
+ y: 0
47
+ },
48
+ color: 'Neutral1100',
49
+ opacity: 0.5,
50
+ inset: true
51
+ }]
52
+ }
53
+ }
54
+ }
55
+ };
56
+ export default shadow;
@@ -0,0 +1,12 @@
1
+ var elevation = {
2
+ elevation: {
3
+ surface: {
4
+ // TODO: Confirm - seems too light in Jira issue view. Difficult to identify columns
5
+ sunken: {
6
+ // @ts-expect-error TODO: Consider extending palette. Uses value outside range of palettes (would be Neutral50).
7
+ value: '#FCFDFE'
8
+ }
9
+ }
10
+ }
11
+ };
12
+ export default elevation;
@@ -1,6 +1,8 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
2
3
  import getThemeHtmlAttrs from '../get-theme-html-attrs';
3
4
  import ColorModeObserver from './color-mode-listeners';
5
+ import ContrastModeObserver from './contrast-mode-listeners';
4
6
 
5
7
  /**
6
8
  * Given ThemeState, sets appropriate html attributes on the documentElement,
@@ -15,6 +17,16 @@ export default function configurePage(themeState) {
15
17
  } else {
16
18
  ColorModeObserver.unbind();
17
19
  }
20
+ if (getBooleanFF('platform.design-system-team.increased-contrast-themes')) {
21
+ if (themeState.contrastMode === 'auto') {
22
+ // Set contrastMode based on the user preference
23
+ themeState.contrastMode = ContrastModeObserver.getContrastMode();
24
+ // Bind a listener (if one doesn't already exist) to keep contrastMode updated
25
+ ContrastModeObserver.bind();
26
+ } else {
27
+ ContrastModeObserver.unbind();
28
+ }
29
+ }
18
30
  var themeAttributes = getThemeHtmlAttrs(themeState);
19
31
  Object.entries(themeAttributes).forEach(function (_ref) {
20
32
  var _ref2 = _slicedToArray(_ref, 2),
@@ -23,6 +35,9 @@ export default function configurePage(themeState) {
23
35
  document.documentElement.setAttribute(key, value);
24
36
  });
25
37
  return function () {
26
- return ColorModeObserver.unbind;
38
+ ColorModeObserver.unbind();
39
+ if (getBooleanFF('platform.design-system-team.increased-contrast-themes')) {
40
+ ContrastModeObserver.unbind();
41
+ }
27
42
  };
28
43
  }
@@ -0,0 +1,58 @@
1
+ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
+ import _createClass from "@babel/runtime/helpers/createClass";
3
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
+ import { bind as _bind } from 'bind-event-listener';
5
+ import { CONTRAST_MODE_ATTRIBUTE } from '../constants';
6
+ import { moreContrastMediaQuery } from './theme-loading';
7
+ var isMatchMediaAvailable = typeof window !== 'undefined' && 'matchMedia' in window;
8
+
9
+ /**
10
+ * Updates the current theme when the system contrast preference changes. Should be bound
11
+ * to an event listener listening on the '(prefers-contrast: more)' query
12
+ * @param e The event representing a change in system theme.
13
+ */
14
+ function checkNativeListener(e) {
15
+ var element = document.documentElement;
16
+ element.setAttribute(CONTRAST_MODE_ATTRIBUTE, e.matches ? 'more' : 'no-preference');
17
+ }
18
+ var contrastModeMql = isMatchMediaAvailable && window.matchMedia(moreContrastMediaQuery);
19
+ var ContrastModeObserver = /*#__PURE__*/function () {
20
+ function ContrastModeObserver() {
21
+ _classCallCheck(this, ContrastModeObserver);
22
+ _defineProperty(this, "unbindContrastChangeListener", null);
23
+ }
24
+ _createClass(ContrastModeObserver, [{
25
+ key: "getContrastMode",
26
+ value: function getContrastMode() {
27
+ if (!contrastModeMql) {
28
+ return 'no-preference';
29
+ }
30
+ return contrastModeMql !== null && contrastModeMql !== void 0 && contrastModeMql.matches ? 'more' : 'no-preference';
31
+ }
32
+ }, {
33
+ key: "bind",
34
+ value: function bind() {
35
+ if (contrastModeMql && this.unbindContrastChangeListener === null) {
36
+ this.unbindContrastChangeListener = _bind(contrastModeMql, {
37
+ type: 'change',
38
+ listener: checkNativeListener
39
+ });
40
+ }
41
+ }
42
+ }, {
43
+ key: "unbind",
44
+ value: function unbind() {
45
+ if (this.unbindContrastChangeListener) {
46
+ this.unbindContrastChangeListener();
47
+ this.unbindContrastChangeListener = null;
48
+ }
49
+ }
50
+ }]);
51
+ return ContrastModeObserver;
52
+ }();
53
+ /**
54
+ * A singleton contrast mode observer - binds "auto" switching logic to a single `mediaQueryList` listener
55
+ * that can be unbound by any consumer when no longer needed.
56
+ */
57
+ var SingletonContrastModeObserver = new ContrastModeObserver();
58
+ export default SingletonContrastModeObserver;