@atlaskit/tokens 1.24.0 → 1.25.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.
Files changed (304) hide show
  1. package/CHANGELOG.md +178 -164
  2. package/dist/cjs/artifacts/atlassian-dark-token-value-for-contrast-check.js +1 -2
  3. package/dist/cjs/artifacts/atlassian-light-token-value-for-contrast-check.js +1 -2
  4. package/dist/cjs/artifacts/generated-pairs.js +1 -1
  5. package/dist/cjs/artifacts/palettes-raw/legacy-palette.js +1 -2
  6. package/dist/cjs/artifacts/palettes-raw/palette.js +1 -2
  7. package/dist/cjs/artifacts/palettes-raw/shape-palette.js +1 -2
  8. package/dist/cjs/artifacts/palettes-raw/spacing-scale.js +1 -2
  9. package/dist/cjs/artifacts/palettes-raw/typography-palette.js +4 -5
  10. package/dist/cjs/artifacts/palettes-raw/updated-saturated-palette.js +2257 -0
  11. package/dist/cjs/artifacts/replacement-mapping.js +1 -2
  12. package/dist/cjs/artifacts/theme-import-map.js +14 -3
  13. package/dist/cjs/artifacts/themes/atlassian-dark-new-input-border.js +1 -2
  14. package/dist/cjs/artifacts/themes/atlassian-dark-saturated-palette-changes.js +12 -0
  15. package/dist/cjs/artifacts/themes/atlassian-dark.js +1 -2
  16. package/dist/cjs/artifacts/themes/atlassian-legacy-dark.js +1 -2
  17. package/dist/cjs/artifacts/themes/atlassian-legacy-light.js +1 -2
  18. package/dist/cjs/artifacts/themes/atlassian-light-new-input-border.js +1 -2
  19. package/dist/cjs/artifacts/themes/atlassian-light-saturated-palette-changes.js +12 -0
  20. package/dist/cjs/artifacts/themes/atlassian-light.js +1 -2
  21. package/dist/cjs/artifacts/themes/atlassian-shape.js +1 -2
  22. package/dist/cjs/artifacts/themes/atlassian-spacing.js +1 -2
  23. package/dist/cjs/artifacts/themes/atlassian-typography-adg3.js +2 -3
  24. package/dist/cjs/artifacts/themes/atlassian-typography-minor3.js +2 -3
  25. package/dist/cjs/artifacts/themes/atlassian-typography.js +2 -3
  26. package/dist/cjs/artifacts/token-default-values.js +14 -15
  27. package/dist/cjs/artifacts/token-names.js +12 -13
  28. package/dist/cjs/artifacts/tokens-raw/atlassian-dark-new-input-border.js +1 -2
  29. package/dist/cjs/artifacts/tokens-raw/atlassian-dark-saturated-palette-changes.js +8683 -0
  30. package/dist/cjs/artifacts/tokens-raw/atlassian-dark.js +1 -2
  31. package/dist/cjs/artifacts/tokens-raw/atlassian-legacy-dark.js +1 -2
  32. package/dist/cjs/artifacts/tokens-raw/atlassian-legacy-light.js +1 -2
  33. package/dist/cjs/artifacts/tokens-raw/atlassian-light-new-input-border.js +1 -2
  34. package/dist/cjs/artifacts/tokens-raw/atlassian-light-saturated-palette-changes.js +8645 -0
  35. package/dist/cjs/artifacts/tokens-raw/atlassian-light.js +1 -2
  36. package/dist/cjs/artifacts/tokens-raw/atlassian-shape.js +1 -2
  37. package/dist/cjs/artifacts/tokens-raw/atlassian-spacing.js +1 -2
  38. package/dist/cjs/artifacts/tokens-raw/atlassian-typography-adg3.js +34 -35
  39. package/dist/cjs/artifacts/tokens-raw/atlassian-typography-minor3.js +35 -36
  40. package/dist/cjs/artifacts/tokens-raw/atlassian-typography.js +35 -36
  41. package/dist/cjs/artifacts/typescript/atlassian-dark-token-names.js +1 -2
  42. package/dist/cjs/artifacts/typescript/atlassian-light-token-names.js +1 -2
  43. package/dist/cjs/constants.js +8 -16
  44. package/dist/cjs/custom-theme.js +2 -3
  45. package/dist/cjs/enable-global-theme.js +1 -2
  46. package/dist/cjs/get-global-theme.js +1 -2
  47. package/dist/cjs/get-ssr-auto-script.js +1 -2
  48. package/dist/cjs/get-theme-html-attrs.js +1 -2
  49. package/dist/cjs/get-theme-styles.js +12 -10
  50. package/dist/cjs/get-token-value.js +2 -3
  51. package/dist/cjs/get-token.js +2 -3
  52. package/dist/cjs/load-custom-theme-styles.js +1 -2
  53. package/dist/cjs/palettes/legacy-palette.js +1 -2
  54. package/dist/cjs/palettes/palette.js +1 -2
  55. package/dist/cjs/palettes/shape-palette.js +1 -2
  56. package/dist/cjs/palettes/spacing-scale.js +1 -2
  57. package/dist/cjs/palettes/typography-palette.js +2 -3
  58. package/dist/cjs/palettes/updated-saturated-palette.js +320 -0
  59. package/dist/cjs/set-global-theme.js +38 -4
  60. package/dist/cjs/theme-config.js +31 -12
  61. package/dist/cjs/theme-mutation-observer.js +2 -3
  62. package/dist/cjs/theme-state-transformer.js +3 -5
  63. package/dist/cjs/tokens/atlassian-dark/color/accent.js +1 -2
  64. package/dist/cjs/tokens/atlassian-dark/color/background.js +1 -2
  65. package/dist/cjs/tokens/atlassian-dark/color/border.js +1 -2
  66. package/dist/cjs/tokens/atlassian-dark/color/chart.js +1 -2
  67. package/dist/cjs/tokens/atlassian-dark/color/icon.js +1 -2
  68. package/dist/cjs/tokens/atlassian-dark/color/interaction.js +1 -2
  69. package/dist/cjs/tokens/atlassian-dark/color/skeleton.js +1 -2
  70. package/dist/cjs/tokens/atlassian-dark/color/text.js +1 -2
  71. package/dist/cjs/tokens/atlassian-dark/elevation/shadow.js +1 -2
  72. package/dist/cjs/tokens/atlassian-dark/elevation/surface.js +1 -2
  73. package/dist/cjs/tokens/atlassian-dark/opacity/opacity.js +1 -2
  74. package/dist/cjs/tokens/atlassian-dark/utility/utility.js +2 -3
  75. package/dist/cjs/tokens/atlassian-dark-new-input-border/color/border.js +1 -2
  76. package/dist/cjs/tokens/atlassian-dark-saturated-palette-changes/color/accent.js +21 -0
  77. package/dist/cjs/tokens/atlassian-dark-saturated-palette-changes/color/background.js +26 -0
  78. package/dist/cjs/tokens/atlassian-dark-saturated-palette-changes/color/icon.js +18 -0
  79. package/dist/cjs/tokens/atlassian-legacy-dark/color/accent.js +1 -2
  80. package/dist/cjs/tokens/atlassian-legacy-dark/color/background.js +1 -2
  81. package/dist/cjs/tokens/atlassian-legacy-dark/color/border.js +1 -2
  82. package/dist/cjs/tokens/atlassian-legacy-dark/color/chart.js +1 -2
  83. package/dist/cjs/tokens/atlassian-legacy-dark/color/icon.js +1 -2
  84. package/dist/cjs/tokens/atlassian-legacy-dark/color/interaction.js +1 -2
  85. package/dist/cjs/tokens/atlassian-legacy-dark/color/skeleton.js +1 -2
  86. package/dist/cjs/tokens/atlassian-legacy-dark/color/text.js +1 -2
  87. package/dist/cjs/tokens/atlassian-legacy-dark/elevation/shadow.js +1 -2
  88. package/dist/cjs/tokens/atlassian-legacy-dark/elevation/surface.js +1 -2
  89. package/dist/cjs/tokens/atlassian-legacy-dark/opacity/opacity.js +1 -2
  90. package/dist/cjs/tokens/atlassian-legacy-dark/utility/utility.js +2 -3
  91. package/dist/cjs/tokens/atlassian-legacy-light/color/accent.js +1 -2
  92. package/dist/cjs/tokens/atlassian-legacy-light/color/background.js +1 -2
  93. package/dist/cjs/tokens/atlassian-legacy-light/color/border.js +1 -2
  94. package/dist/cjs/tokens/atlassian-legacy-light/color/chart.js +1 -2
  95. package/dist/cjs/tokens/atlassian-legacy-light/color/icon.js +1 -2
  96. package/dist/cjs/tokens/atlassian-legacy-light/color/interaction.js +1 -2
  97. package/dist/cjs/tokens/atlassian-legacy-light/color/skeleton.js +1 -2
  98. package/dist/cjs/tokens/atlassian-legacy-light/color/text.js +1 -2
  99. package/dist/cjs/tokens/atlassian-legacy-light/elevation/shadow.js +1 -2
  100. package/dist/cjs/tokens/atlassian-legacy-light/elevation/surface.js +1 -2
  101. package/dist/cjs/tokens/atlassian-legacy-light/opacity/opacity.js +1 -2
  102. package/dist/cjs/tokens/atlassian-legacy-light/utility/utility.js +2 -3
  103. package/dist/cjs/tokens/atlassian-light/color/accent.js +1 -2
  104. package/dist/cjs/tokens/atlassian-light/color/background.js +1 -2
  105. package/dist/cjs/tokens/atlassian-light/color/border.js +1 -2
  106. package/dist/cjs/tokens/atlassian-light/color/chart.js +1 -2
  107. package/dist/cjs/tokens/atlassian-light/color/icon.js +1 -2
  108. package/dist/cjs/tokens/atlassian-light/color/interaction.js +1 -2
  109. package/dist/cjs/tokens/atlassian-light/color/skeleton.js +1 -2
  110. package/dist/cjs/tokens/atlassian-light/color/text.js +1 -2
  111. package/dist/cjs/tokens/atlassian-light/elevation/shadow.js +1 -2
  112. package/dist/cjs/tokens/atlassian-light/elevation/surface.js +1 -2
  113. package/dist/cjs/tokens/atlassian-light/opacity/opacity.js +1 -2
  114. package/dist/cjs/tokens/atlassian-light/utility/utility.js +2 -3
  115. package/dist/cjs/tokens/atlassian-light-new-input-border/color/border.js +1 -2
  116. package/dist/cjs/tokens/atlassian-light-saturated-palette-changes/color/accent.js +35 -0
  117. package/dist/cjs/tokens/atlassian-light-saturated-palette-changes/color/background.js +26 -0
  118. package/dist/cjs/tokens/atlassian-light-saturated-palette-changes/color/icon.js +16 -0
  119. package/dist/cjs/tokens/atlassian-shape/shape.js +1 -2
  120. package/dist/cjs/tokens/atlassian-spacing/spacing.js +1 -2
  121. package/dist/cjs/tokens/atlassian-typography/font-family.js +1 -2
  122. package/dist/cjs/tokens/atlassian-typography/letter-spacing.js +1 -2
  123. package/dist/cjs/tokens/atlassian-typography/theme.js +11 -12
  124. package/dist/cjs/tokens/atlassian-typography-adg3/font-family.js +1 -2
  125. package/dist/cjs/tokens/atlassian-typography-adg3/font-size.js +1 -2
  126. package/dist/cjs/tokens/atlassian-typography-adg3/font-weight.js +1 -2
  127. package/dist/cjs/tokens/atlassian-typography-adg3/letter-spacing.js +1 -2
  128. package/dist/cjs/tokens/atlassian-typography-adg3/line-height.js +1 -2
  129. package/dist/cjs/tokens/atlassian-typography-adg3/theme.js +12 -13
  130. package/dist/cjs/tokens/atlassian-typography-minor3/font-family.js +1 -2
  131. package/dist/cjs/tokens/atlassian-typography-minor3/letter-spacing.js +1 -2
  132. package/dist/cjs/tokens/atlassian-typography-minor3/theme.js +12 -13
  133. package/dist/cjs/tokens/default/color/accent.js +1 -2
  134. package/dist/cjs/tokens/default/color/background.js +1 -2
  135. package/dist/cjs/tokens/default/color/border.js +1 -2
  136. package/dist/cjs/tokens/default/color/chart.js +1 -2
  137. package/dist/cjs/tokens/default/color/icon.js +1 -2
  138. package/dist/cjs/tokens/default/color/interaction.js +1 -2
  139. package/dist/cjs/tokens/default/color/skeleton.js +1 -2
  140. package/dist/cjs/tokens/default/color/text.js +1 -2
  141. package/dist/cjs/tokens/default/elevation/shadow.js +1 -2
  142. package/dist/cjs/tokens/default/elevation/surface.js +1 -2
  143. package/dist/cjs/tokens/default/opacity/opacity.js +1 -2
  144. package/dist/cjs/tokens/default/shape/shape.js +1 -2
  145. package/dist/cjs/tokens/default/spacing/spacing.js +1 -2
  146. package/dist/cjs/tokens/default/typography/font-family.js +1 -2
  147. package/dist/cjs/tokens/default/typography/font-size.js +1 -2
  148. package/dist/cjs/tokens/default/typography/font-weight.js +1 -2
  149. package/dist/cjs/tokens/default/typography/font.js +11 -12
  150. package/dist/cjs/tokens/default/typography/letter-spacing.js +1 -2
  151. package/dist/cjs/tokens/default/typography/line-height.js +1 -2
  152. package/dist/cjs/tokens/default/utility/utility.js +2 -3
  153. package/dist/cjs/use-theme-observer.js +1 -2
  154. package/dist/cjs/utils/color-detection.js +3 -5
  155. package/dist/cjs/utils/color-mode-listeners.js +1 -2
  156. package/dist/cjs/utils/color-utils.js +1 -2
  157. package/dist/cjs/utils/custom-theme-token-contrast-check.js +3 -5
  158. package/dist/cjs/utils/generate-custom-color-ramp.js +5 -9
  159. package/dist/cjs/utils/get-theme-preferences.js +27 -6
  160. package/dist/cjs/utils/hash.js +2 -3
  161. package/dist/cjs/utils/hct-color-utils/contrast.js +2 -3
  162. package/dist/cjs/utils/hct-color-utils/hct.js +7 -7
  163. package/dist/cjs/utils/theme-loading.js +3 -6
  164. package/dist/cjs/utils/token-ids.js +4 -7
  165. package/dist/cjs/utils/token-order.js +2 -3
  166. package/dist/es2019/artifacts/palettes-raw/typography-palette.js +3 -3
  167. package/dist/es2019/artifacts/palettes-raw/updated-saturated-palette.js +2251 -0
  168. package/dist/es2019/artifacts/theme-import-map.js +5 -1
  169. package/dist/es2019/artifacts/themes/atlassian-dark-saturated-palette-changes.js +399 -0
  170. package/dist/es2019/artifacts/themes/atlassian-light-saturated-palette-changes.js +399 -0
  171. package/dist/es2019/artifacts/themes/atlassian-typography-adg3.js +13 -13
  172. package/dist/es2019/artifacts/themes/atlassian-typography-minor3.js +14 -14
  173. package/dist/es2019/artifacts/themes/atlassian-typography.js +14 -14
  174. package/dist/es2019/artifacts/token-default-values.js +13 -13
  175. package/dist/es2019/artifacts/token-names.js +11 -11
  176. package/dist/es2019/artifacts/tokens-raw/atlassian-dark-saturated-palette-changes.js +8677 -0
  177. package/dist/es2019/artifacts/tokens-raw/atlassian-light-saturated-palette-changes.js +8639 -0
  178. package/dist/es2019/artifacts/tokens-raw/atlassian-typography-adg3.js +33 -33
  179. package/dist/es2019/artifacts/tokens-raw/atlassian-typography-minor3.js +34 -34
  180. package/dist/es2019/artifacts/tokens-raw/atlassian-typography.js +34 -34
  181. package/dist/es2019/get-theme-styles.js +7 -4
  182. package/dist/es2019/get-token-value.js +1 -1
  183. package/dist/es2019/get-token.js +1 -1
  184. package/dist/es2019/palettes/typography-palette.js +1 -1
  185. package/dist/es2019/palettes/updated-saturated-palette.js +312 -0
  186. package/dist/es2019/set-global-theme.js +8 -2
  187. package/dist/es2019/theme-config.js +25 -1
  188. package/dist/es2019/tokens/atlassian-dark-saturated-palette-changes/color/accent.js +15 -0
  189. package/dist/es2019/tokens/atlassian-dark-saturated-palette-changes/color/background.js +20 -0
  190. package/dist/es2019/tokens/atlassian-dark-saturated-palette-changes/color/icon.js +12 -0
  191. package/dist/es2019/tokens/atlassian-light-saturated-palette-changes/color/accent.js +29 -0
  192. package/dist/es2019/tokens/atlassian-light-saturated-palette-changes/color/background.js +20 -0
  193. package/dist/es2019/tokens/atlassian-light-saturated-palette-changes/color/icon.js +10 -0
  194. package/dist/es2019/tokens/atlassian-typography/theme.js +10 -10
  195. package/dist/es2019/tokens/atlassian-typography-adg3/theme.js +10 -10
  196. package/dist/es2019/tokens/atlassian-typography-minor3/theme.js +10 -10
  197. package/dist/es2019/tokens/default/typography/font.js +10 -10
  198. package/dist/es2019/utils/get-theme-preferences.js +26 -2
  199. package/dist/es2019/utils/hct-color-utils/hct.js +3 -1
  200. package/dist/esm/artifacts/palettes-raw/typography-palette.js +3 -3
  201. package/dist/esm/artifacts/palettes-raw/updated-saturated-palette.js +2251 -0
  202. package/dist/esm/artifacts/theme-import-map.js +9 -1
  203. package/dist/esm/artifacts/themes/atlassian-dark-saturated-palette-changes.js +6 -0
  204. package/dist/esm/artifacts/themes/atlassian-light-saturated-palette-changes.js +6 -0
  205. package/dist/esm/artifacts/themes/atlassian-typography-adg3.js +2 -2
  206. package/dist/esm/artifacts/themes/atlassian-typography-minor3.js +2 -2
  207. package/dist/esm/artifacts/themes/atlassian-typography.js +2 -2
  208. package/dist/esm/artifacts/token-default-values.js +13 -13
  209. package/dist/esm/artifacts/token-names.js +11 -11
  210. package/dist/esm/artifacts/tokens-raw/atlassian-dark-saturated-palette-changes.js +8677 -0
  211. package/dist/esm/artifacts/tokens-raw/atlassian-light-saturated-palette-changes.js +8639 -0
  212. package/dist/esm/artifacts/tokens-raw/atlassian-typography-adg3.js +33 -33
  213. package/dist/esm/artifacts/tokens-raw/atlassian-typography-minor3.js +34 -34
  214. package/dist/esm/artifacts/tokens-raw/atlassian-typography.js +34 -34
  215. package/dist/esm/custom-theme.js +1 -1
  216. package/dist/esm/get-theme-styles.js +12 -9
  217. package/dist/esm/get-token-value.js +1 -1
  218. package/dist/esm/get-token.js +1 -1
  219. package/dist/esm/palettes/typography-palette.js +1 -1
  220. package/dist/esm/palettes/updated-saturated-palette.js +313 -0
  221. package/dist/esm/set-global-theme.js +38 -3
  222. package/dist/esm/theme-config.js +25 -1
  223. package/dist/esm/tokens/atlassian-dark-saturated-palette-changes/color/accent.js +15 -0
  224. package/dist/esm/tokens/atlassian-dark-saturated-palette-changes/color/background.js +20 -0
  225. package/dist/esm/tokens/atlassian-dark-saturated-palette-changes/color/icon.js +12 -0
  226. package/dist/esm/tokens/atlassian-light-saturated-palette-changes/color/accent.js +29 -0
  227. package/dist/esm/tokens/atlassian-light-saturated-palette-changes/color/background.js +20 -0
  228. package/dist/esm/tokens/atlassian-light-saturated-palette-changes/color/icon.js +10 -0
  229. package/dist/esm/tokens/atlassian-typography/theme.js +10 -10
  230. package/dist/esm/tokens/atlassian-typography-adg3/theme.js +10 -10
  231. package/dist/esm/tokens/atlassian-typography-minor3/theme.js +10 -10
  232. package/dist/esm/tokens/default/typography/font.js +10 -10
  233. package/dist/esm/utils/get-theme-preferences.js +24 -2
  234. package/dist/esm/utils/hct-color-utils/hct.js +3 -1
  235. package/dist/types/artifacts/palettes-raw/typography-palette.d.ts +1 -1
  236. package/dist/types/artifacts/palettes-raw/updated-saturated-palette.d.ts +41 -0
  237. package/dist/types/artifacts/theme-import-map.d.ts +1 -1
  238. package/dist/types/artifacts/themes/atlassian-dark-saturated-palette-changes.d.ts +7 -0
  239. package/dist/types/artifacts/themes/atlassian-light-saturated-palette-changes.d.ts +7 -0
  240. package/dist/types/artifacts/themes/atlassian-typography-adg3.d.ts +2 -2
  241. package/dist/types/artifacts/themes/atlassian-typography-minor3.d.ts +2 -2
  242. package/dist/types/artifacts/themes/atlassian-typography.d.ts +2 -2
  243. package/dist/types/artifacts/token-default-values.d.ts +13 -13
  244. package/dist/types/artifacts/token-names.d.ts +21 -21
  245. package/dist/types/artifacts/tokens-raw/atlassian-dark-saturated-palette-changes.d.ts +109 -0
  246. package/dist/types/artifacts/tokens-raw/atlassian-light-saturated-palette-changes.d.ts +89 -0
  247. package/dist/types/artifacts/tokens-raw/atlassian-typography-adg3.d.ts +1 -1
  248. package/dist/types/artifacts/tokens-raw/atlassian-typography-minor3.d.ts +1 -1
  249. package/dist/types/artifacts/tokens-raw/atlassian-typography.d.ts +1 -1
  250. package/dist/types/palettes/palette.d.ts +1 -1
  251. package/dist/types/palettes/updated-saturated-palette.d.ts +10 -0
  252. package/dist/types/theme-config.d.ts +8 -4
  253. package/dist/types/tokens/atlassian-dark/utility/utility.d.ts +1 -1
  254. package/dist/types/tokens/atlassian-dark-saturated-palette-changes/color/accent.d.ts +4 -0
  255. package/dist/types/tokens/atlassian-dark-saturated-palette-changes/color/background.d.ts +4 -0
  256. package/dist/types/tokens/atlassian-dark-saturated-palette-changes/color/icon.d.ts +4 -0
  257. package/dist/types/tokens/atlassian-light/utility/utility.d.ts +1 -1
  258. package/dist/types/tokens/atlassian-light-saturated-palette-changes/color/accent.d.ts +4 -0
  259. package/dist/types/tokens/atlassian-light-saturated-palette-changes/color/background.d.ts +4 -0
  260. package/dist/types/tokens/atlassian-light-saturated-palette-changes/color/icon.d.ts +4 -0
  261. package/dist/types/tokens/atlassian-typography-adg3/theme.d.ts +13 -13
  262. package/dist/types/tokens/atlassian-typography-minor3/theme.d.ts +13 -13
  263. package/dist/types/tokens/default/utility/utility.d.ts +1 -1
  264. package/dist/types/types.d.ts +11 -11
  265. package/dist/types/utils/get-theme-preferences.d.ts +1 -0
  266. package/dist/types-ts4.5/artifacts/palettes-raw/typography-palette.d.ts +1 -1
  267. package/dist/types-ts4.5/artifacts/palettes-raw/updated-saturated-palette.d.ts +41 -0
  268. package/dist/types-ts4.5/artifacts/theme-import-map.d.ts +1 -1
  269. package/dist/types-ts4.5/artifacts/themes/atlassian-dark-saturated-palette-changes.d.ts +7 -0
  270. package/dist/types-ts4.5/artifacts/themes/atlassian-light-saturated-palette-changes.d.ts +7 -0
  271. package/dist/types-ts4.5/artifacts/themes/atlassian-typography-adg3.d.ts +2 -2
  272. package/dist/types-ts4.5/artifacts/themes/atlassian-typography-minor3.d.ts +2 -2
  273. package/dist/types-ts4.5/artifacts/themes/atlassian-typography.d.ts +2 -2
  274. package/dist/types-ts4.5/artifacts/token-default-values.d.ts +13 -13
  275. package/dist/types-ts4.5/artifacts/token-names.d.ts +21 -21
  276. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-dark-saturated-palette-changes.d.ts +109 -0
  277. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-light-saturated-palette-changes.d.ts +89 -0
  278. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-typography-adg3.d.ts +1 -1
  279. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-typography-minor3.d.ts +1 -1
  280. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-typography.d.ts +1 -1
  281. package/dist/types-ts4.5/palettes/palette.d.ts +1 -1
  282. package/dist/types-ts4.5/palettes/updated-saturated-palette.d.ts +10 -0
  283. package/dist/types-ts4.5/theme-config.d.ts +12 -4
  284. package/dist/types-ts4.5/tokens/atlassian-dark/utility/utility.d.ts +1 -1
  285. package/dist/types-ts4.5/tokens/atlassian-dark-saturated-palette-changes/color/accent.d.ts +4 -0
  286. package/dist/types-ts4.5/tokens/atlassian-dark-saturated-palette-changes/color/background.d.ts +4 -0
  287. package/dist/types-ts4.5/tokens/atlassian-dark-saturated-palette-changes/color/icon.d.ts +4 -0
  288. package/dist/types-ts4.5/tokens/atlassian-light/utility/utility.d.ts +1 -1
  289. package/dist/types-ts4.5/tokens/atlassian-light-saturated-palette-changes/color/accent.d.ts +4 -0
  290. package/dist/types-ts4.5/tokens/atlassian-light-saturated-palette-changes/color/background.d.ts +4 -0
  291. package/dist/types-ts4.5/tokens/atlassian-light-saturated-palette-changes/color/icon.d.ts +4 -0
  292. package/dist/types-ts4.5/tokens/atlassian-typography-adg3/theme.d.ts +13 -13
  293. package/dist/types-ts4.5/tokens/atlassian-typography-minor3/theme.d.ts +13 -13
  294. package/dist/types-ts4.5/tokens/default/utility/utility.d.ts +1 -1
  295. package/dist/types-ts4.5/types.d.ts +11 -11
  296. package/dist/types-ts4.5/utils/get-theme-preferences.d.ts +1 -0
  297. package/figma/atlassian-dark-saturated-palette-changes.json +3540 -0
  298. package/figma/atlassian-light-saturated-palette-changes.json +3519 -0
  299. package/figma/atlassian-typography-adg3.json +2 -2
  300. package/figma/atlassian-typography-minor3.json +3 -3
  301. package/figma/atlassian-typography.json +3 -3
  302. package/package.json +5 -1
  303. package/report.api.md +32 -22
  304. package/tmp/api-report-tmp.d.ts +26 -24
@@ -0,0 +1,312 @@
1
+ import defaultPalette from './palette';
2
+
3
+ /**
4
+ * Simple object check.
5
+ * @param item
6
+ * @returns {boolean}
7
+ */
8
+ export function isObject(item) {
9
+ return item && typeof item === 'object' && !Array.isArray(item);
10
+ }
11
+
12
+ /**
13
+ * Deep merge two objects.
14
+ * @param target
15
+ * @param ...sources
16
+ */
17
+ function mergeDeep(target, ...sources) {
18
+ if (!sources.length) {
19
+ return target;
20
+ }
21
+ const source = sources.shift();
22
+ if (isObject(target) && isObject(source)) {
23
+ for (const key in source) {
24
+ if (isObject(source[key])) {
25
+ if (!target[key]) {
26
+ Object.assign(target, {
27
+ [key]: {}
28
+ });
29
+ }
30
+ mergeDeep(target[key], source[key]);
31
+ } else {
32
+ Object.assign(target, {
33
+ [key]: source[key]
34
+ });
35
+ }
36
+ }
37
+ }
38
+ return mergeDeep(target, ...sources);
39
+ }
40
+ const palette = mergeDeep(JSON.parse(JSON.stringify(defaultPalette)), {
41
+ color: {
42
+ palette: {
43
+ Blue1000: {
44
+ value: '#1C2B41',
45
+ attributes: {
46
+ group: 'palette',
47
+ category: 'blue'
48
+ }
49
+ },
50
+ Red100: {
51
+ value: '#FFECEB',
52
+ attributes: {
53
+ group: 'palette',
54
+ category: 'red'
55
+ }
56
+ },
57
+ Red200: {
58
+ value: '#FFD5D2',
59
+ attributes: {
60
+ group: 'palette',
61
+ category: 'red'
62
+ }
63
+ },
64
+ Red300: {
65
+ value: '#FD9891',
66
+ attributes: {
67
+ group: 'palette',
68
+ category: 'red'
69
+ }
70
+ },
71
+ Red400: {
72
+ value: '#F87168',
73
+ attributes: {
74
+ group: 'palette',
75
+ category: 'red'
76
+ }
77
+ },
78
+ Red500: {
79
+ value: '#F15B50',
80
+ attributes: {
81
+ group: 'palette',
82
+ category: 'red'
83
+ }
84
+ },
85
+ Red600: {
86
+ value: '#E2483D',
87
+ attributes: {
88
+ group: 'palette',
89
+ category: 'red'
90
+ }
91
+ },
92
+ Red700: {
93
+ value: '#C9372C',
94
+ attributes: {
95
+ group: 'palette',
96
+ category: 'red'
97
+ }
98
+ },
99
+ Red800: {
100
+ value: '#AE2E24',
101
+ attributes: {
102
+ group: 'palette',
103
+ category: 'red'
104
+ }
105
+ },
106
+ Red900: {
107
+ value: '#5D1F1A',
108
+ attributes: {
109
+ group: 'palette',
110
+ category: 'red'
111
+ }
112
+ },
113
+ Red1000: {
114
+ value: '#42221F',
115
+ attributes: {
116
+ group: 'palette',
117
+ category: 'red'
118
+ }
119
+ },
120
+ Yellow1000: {
121
+ value: '#332E1B',
122
+ attributes: {
123
+ group: 'palette',
124
+ category: 'yellow'
125
+ }
126
+ },
127
+ Green100: {
128
+ value: '#DCFFF1',
129
+ attributes: {
130
+ group: 'palette',
131
+ category: 'green'
132
+ }
133
+ },
134
+ Green1000: {
135
+ value: '#1C3329',
136
+ attributes: {
137
+ group: 'palette',
138
+ category: 'green'
139
+ }
140
+ },
141
+ Purple1000: {
142
+ value: '#2B273F',
143
+ attributes: {
144
+ group: 'palette',
145
+ category: 'purple'
146
+ }
147
+ },
148
+ Teal100: {
149
+ value: '#E7F9FF',
150
+ attributes: {
151
+ group: 'palette',
152
+ category: 'teal'
153
+ }
154
+ },
155
+ Teal200: {
156
+ value: '#C6EDFB',
157
+ attributes: {
158
+ group: 'palette',
159
+ category: 'teal'
160
+ }
161
+ },
162
+ Teal300: {
163
+ value: '#9DD9EE',
164
+ attributes: {
165
+ group: 'palette',
166
+ category: 'teal'
167
+ }
168
+ },
169
+ Teal400: {
170
+ value: '#6CC3E0',
171
+ attributes: {
172
+ group: 'palette',
173
+ category: 'teal'
174
+ }
175
+ },
176
+ Teal500: {
177
+ value: '#42B2D7',
178
+ attributes: {
179
+ group: 'palette',
180
+ category: 'teal'
181
+ }
182
+ },
183
+ Teal600: {
184
+ value: '#2898BD',
185
+ attributes: {
186
+ group: 'palette',
187
+ category: 'teal'
188
+ }
189
+ },
190
+ Teal700: {
191
+ value: '#227D9B',
192
+ attributes: {
193
+ group: 'palette',
194
+ category: 'teal'
195
+ }
196
+ },
197
+ Teal800: {
198
+ value: '#206A83',
199
+ attributes: {
200
+ group: 'palette',
201
+ category: 'teal'
202
+ }
203
+ },
204
+ Teal900: {
205
+ value: '#164555',
206
+ attributes: {
207
+ group: 'palette',
208
+ category: 'teal'
209
+ }
210
+ },
211
+ Teal1000: {
212
+ value: '#1E3137',
213
+ attributes: {
214
+ group: 'palette',
215
+ category: 'teal'
216
+ }
217
+ },
218
+ Orange100: {
219
+ value: '#FFF3EB',
220
+ attributes: {
221
+ group: 'palette',
222
+ category: 'orange'
223
+ }
224
+ },
225
+ Orange200: {
226
+ value: '#FEDEC8',
227
+ attributes: {
228
+ group: 'palette',
229
+ category: 'orange'
230
+ }
231
+ },
232
+ Orange300: {
233
+ value: '#FEC195',
234
+ attributes: {
235
+ group: 'palette',
236
+ category: 'orange'
237
+ }
238
+ },
239
+ Orange400: {
240
+ value: '#FEA362',
241
+ attributes: {
242
+ group: 'palette',
243
+ category: 'orange'
244
+ }
245
+ },
246
+ Orange500: {
247
+ value: '#F38A3F',
248
+ attributes: {
249
+ group: 'palette',
250
+ category: 'orange'
251
+ }
252
+ },
253
+ Orange600: {
254
+ value: '#E56910',
255
+ attributes: {
256
+ group: 'palette',
257
+ category: 'orange'
258
+ }
259
+ },
260
+ Orange700: {
261
+ value: '#C25100',
262
+ attributes: {
263
+ group: 'palette',
264
+ category: 'orange'
265
+ }
266
+ },
267
+ Orange800: {
268
+ value: '#A54800',
269
+ attributes: {
270
+ group: 'palette',
271
+ category: 'orange'
272
+ }
273
+ },
274
+ Orange900: {
275
+ value: '#702E00',
276
+ attributes: {
277
+ group: 'palette',
278
+ category: 'orange'
279
+ }
280
+ },
281
+ Orange1000: {
282
+ value: '#38291E',
283
+ attributes: {
284
+ group: 'palette',
285
+ category: 'orange'
286
+ }
287
+ },
288
+ Magenta1000: {
289
+ value: '#3D2232',
290
+ attributes: {
291
+ group: 'palette',
292
+ category: 'magenta'
293
+ }
294
+ },
295
+ Lime100: {
296
+ value: '#EFFFD6',
297
+ attributes: {
298
+ group: 'palette',
299
+ category: 'lime'
300
+ }
301
+ },
302
+ Lime1000: {
303
+ value: '#28311B',
304
+ attributes: {
305
+ group: 'palette',
306
+ category: 'lime'
307
+ }
308
+ }
309
+ }
310
+ }
311
+ });
312
+ export default palette;
@@ -2,7 +2,7 @@ import { themeStateDefaults } from './theme-config';
2
2
  import { isValidBrandHex } from './utils/color-utils';
3
3
  import configurePage from './utils/configure-page';
4
4
  import { findMissingCustomStyleElements } from './utils/custom-theme-loading-utils';
5
- import { getThemePreferences } from './utils/get-theme-preferences';
5
+ import { getThemeOverridePreferences, getThemePreferences } from './utils/get-theme-preferences';
6
6
  import { loadAndAppendThemeCss } from './utils/theme-loading';
7
7
 
8
8
  /**
@@ -45,7 +45,7 @@ const setGlobalTheme = async ({
45
45
  };
46
46
 
47
47
  // Determine what to load and loading strategy
48
- const themePreferences = getThemePreferences(themeState);
48
+ let themePreferences = getThemePreferences(themeState);
49
49
  const loadingStrategy = themeLoader ? themeLoader : loadAndAppendThemeCss;
50
50
 
51
51
  // Load standard themes
@@ -72,6 +72,12 @@ const setGlobalTheme = async ({
72
72
  }
73
73
  }
74
74
  await Promise.all(loadingTasks);
75
+
76
+ // Load override themes after standard themes
77
+ const themeOverridePreferences = getThemeOverridePreferences(themeState);
78
+ for (const themeId of themeOverridePreferences) {
79
+ await loadingStrategy(themeId);
80
+ }
75
81
  const autoUnbind = configurePage(themeState);
76
82
  return autoUnbind;
77
83
  };
@@ -39,7 +39,7 @@ export const themeIds = ['light', 'dark', 'legacy-light', 'legacy-dark', 'spacin
39
39
  * Theme override ids: the equivalent of themeIds for theme overrides.
40
40
  * Theme overrides are temporary and there may not be any defined at times.
41
41
  */
42
- export const themeOverrideIds = ['light-new-input-border', 'dark-new-input-border'];
42
+ export const themeOverrideIds = ['light-new-input-border', 'dark-new-input-border', 'light-saturated-palette-changes', 'dark-saturated-palette-changes'];
43
43
  export const themeIdsWithOverrides = [...themeIds, ...themeOverrideIds];
44
44
 
45
45
  /**
@@ -140,6 +140,30 @@ const themeConfig = {
140
140
  mode: 'dark'
141
141
  }
142
142
  },
143
+ 'atlassian-light-saturated-palette-changes': {
144
+ id: 'light-saturated-palette-changes',
145
+ displayName: 'Light Theme Saturated Palette Change',
146
+ palette: 'updatedSaturatedPalette',
147
+ override: 'light',
148
+ extends: 'light',
149
+ attributes: {
150
+ type: 'color',
151
+ mode: 'light',
152
+ extends: 'light'
153
+ }
154
+ },
155
+ 'atlassian-dark-saturated-palette-changes': {
156
+ id: 'dark-saturated-palette-changes',
157
+ displayName: 'Dark Theme Saturated Palette Change',
158
+ palette: 'updatedSaturatedPalette',
159
+ override: 'dark',
160
+ extends: 'dark',
161
+ attributes: {
162
+ type: 'color',
163
+ mode: 'dark',
164
+ extends: 'dark'
165
+ }
166
+ },
143
167
  'atlassian-typography': {
144
168
  id: 'typography',
145
169
  displayName: 'Atlassian Typography (Minor Second)',
@@ -0,0 +1,15 @@
1
+ const color = {
2
+ color: {
3
+ icon: {
4
+ accent: {
5
+ red: {
6
+ value: 'Red600'
7
+ },
8
+ yellow: {
9
+ value: 'Yellow300'
10
+ }
11
+ }
12
+ }
13
+ }
14
+ };
15
+ export default color;
@@ -0,0 +1,20 @@
1
+ const color = {
2
+ color: {
3
+ background: {
4
+ warning: {
5
+ bold: {
6
+ '[default]': {
7
+ value: 'Yellow300'
8
+ },
9
+ hovered: {
10
+ value: 'Yellow400'
11
+ },
12
+ pressed: {
13
+ value: 'Yellow500'
14
+ }
15
+ }
16
+ }
17
+ }
18
+ }
19
+ };
20
+ export default color;
@@ -0,0 +1,12 @@
1
+ const color = {
2
+ color: {
3
+ icon: {
4
+ warning: {
5
+ '[default]': {
6
+ value: 'Yellow300'
7
+ }
8
+ }
9
+ }
10
+ }
11
+ };
12
+ export default color;
@@ -0,0 +1,29 @@
1
+ const color = {
2
+ color: {
3
+ icon: {
4
+ accent: {
5
+ red: {
6
+ value: 'Red700'
7
+ }
8
+ }
9
+ },
10
+ background: {
11
+ accent: {
12
+ yellow: {
13
+ subtle: {
14
+ '[default]': {
15
+ value: 'Yellow300'
16
+ },
17
+ hovered: {
18
+ value: 'Yellow400'
19
+ },
20
+ pressed: {
21
+ value: 'Yellow500'
22
+ }
23
+ }
24
+ }
25
+ }
26
+ }
27
+ }
28
+ };
29
+ export default color;
@@ -0,0 +1,20 @@
1
+ const color = {
2
+ color: {
3
+ background: {
4
+ warning: {
5
+ bold: {
6
+ '[default]': {
7
+ value: 'Yellow300'
8
+ },
9
+ hovered: {
10
+ value: 'Yellow400'
11
+ },
12
+ pressed: {
13
+ value: 'Yellow500'
14
+ }
15
+ }
16
+ }
17
+ }
18
+ }
19
+ };
20
+ export default color;
@@ -0,0 +1,10 @@
1
+ const color = {
2
+ color: {
3
+ icon: {
4
+ danger: {
5
+ value: 'Red700'
6
+ }
7
+ }
8
+ }
9
+ };
10
+ export default color;
@@ -1,7 +1,7 @@
1
1
  const typography = {
2
2
  font: {
3
3
  heading: {
4
- xxl: {
4
+ xxlarge: {
5
5
  value: {
6
6
  fontWeight: 'FontWeight700',
7
7
  fontSize: 'FontSize36',
@@ -11,7 +11,7 @@ const typography = {
11
11
  letterSpacing: 'LetterSpacing0'
12
12
  }
13
13
  },
14
- xl: {
14
+ xlarge: {
15
15
  value: {
16
16
  fontWeight: 'FontWeight700',
17
17
  fontSize: 'FontSize28',
@@ -21,7 +21,7 @@ const typography = {
21
21
  letterSpacing: 'LetterSpacing0'
22
22
  }
23
23
  },
24
- lg: {
24
+ large: {
25
25
  value: {
26
26
  fontWeight: 'FontWeight700',
27
27
  fontSize: 'FontSize24',
@@ -31,7 +31,7 @@ const typography = {
31
31
  letterSpacing: 'LetterSpacing0'
32
32
  }
33
33
  },
34
- md: {
34
+ medium: {
35
35
  value: {
36
36
  fontWeight: 'FontWeight700',
37
37
  fontSize: 'FontSize20',
@@ -41,7 +41,7 @@ const typography = {
41
41
  letterSpacing: 'LetterSpacing0'
42
42
  }
43
43
  },
44
- sm: {
44
+ small: {
45
45
  value: {
46
46
  fontWeight: 'FontWeight700',
47
47
  fontSize: 'FontSize16',
@@ -51,7 +51,7 @@ const typography = {
51
51
  letterSpacing: 'LetterSpacing0'
52
52
  }
53
53
  },
54
- xs: {
54
+ xsmall: {
55
55
  value: {
56
56
  fontWeight: 'FontWeight700',
57
57
  fontSize: 'FontSize14',
@@ -61,7 +61,7 @@ const typography = {
61
61
  letterSpacing: 'LetterSpacing0'
62
62
  }
63
63
  },
64
- xxs: {
64
+ xxsmall: {
65
65
  value: {
66
66
  fontWeight: 'FontWeight700',
67
67
  fontSize: 'FontSize12',
@@ -95,7 +95,7 @@ const typography = {
95
95
  letterSpacing: 'LetterSpacing0'
96
96
  }
97
97
  },
98
- sm: {
98
+ small: {
99
99
  value: {
100
100
  fontWeight: 'FontWeight400',
101
101
  fontSize: 'FontSize12',
@@ -105,7 +105,7 @@ const typography = {
105
105
  letterSpacing: 'LetterSpacing0'
106
106
  }
107
107
  },
108
- lg: {
108
+ large: {
109
109
  value: {
110
110
  fontWeight: 'FontWeight400',
111
111
  fontSize: 'FontSize16',
@@ -127,7 +127,7 @@ const typography = {
127
127
  letterSpacing: 'LetterSpacing0'
128
128
  }
129
129
  },
130
- sm: {
130
+ small: {
131
131
  value: {
132
132
  fontWeight: 'FontWeight400',
133
133
  fontSize: 'FontSize12',
@@ -9,7 +9,7 @@ const utility = {
9
9
  const typography = {
10
10
  font: {
11
11
  heading: {
12
- xxl: {
12
+ xxlarge: {
13
13
  value: {
14
14
  fontWeight: 'FontWeight500',
15
15
  fontSize: 'LegacyFontSize35',
@@ -19,7 +19,7 @@ const typography = {
19
19
  letterSpacing: 'LetterSpacing400'
20
20
  }
21
21
  },
22
- xl: {
22
+ xlarge: {
23
23
  value: {
24
24
  fontWeight: 'FontWeight600',
25
25
  fontSize: 'LegacyFontSize29',
@@ -29,7 +29,7 @@ const typography = {
29
29
  letterSpacing: 'LetterSpacing400'
30
30
  }
31
31
  },
32
- lg: {
32
+ large: {
33
33
  value: {
34
34
  fontWeight: 'FontWeight500',
35
35
  fontSize: 'FontSize24',
@@ -39,7 +39,7 @@ const typography = {
39
39
  letterSpacing: 'LetterSpacing400'
40
40
  }
41
41
  },
42
- md: {
42
+ medium: {
43
43
  value: {
44
44
  fontWeight: 'FontWeight500',
45
45
  fontSize: 'FontSize20',
@@ -49,7 +49,7 @@ const typography = {
49
49
  letterSpacing: 'LetterSpacing300'
50
50
  }
51
51
  },
52
- sm: {
52
+ small: {
53
53
  value: {
54
54
  fontWeight: 'FontWeight600',
55
55
  fontSize: 'FontSize16',
@@ -59,7 +59,7 @@ const typography = {
59
59
  letterSpacing: 'LetterSpacing200'
60
60
  }
61
61
  },
62
- xs: {
62
+ xsmall: {
63
63
  value: {
64
64
  fontWeight: 'FontWeight600',
65
65
  fontSize: 'FontSize14',
@@ -69,7 +69,7 @@ const typography = {
69
69
  letterSpacing: 'LetterSpacing100'
70
70
  }
71
71
  },
72
- xxs: {
72
+ xxsmall: {
73
73
  value: {
74
74
  fontWeight: 'FontWeight600',
75
75
  fontSize: 'FontSize12',
@@ -103,7 +103,7 @@ const typography = {
103
103
  letterSpacing: 'LetterSpacing0'
104
104
  }
105
105
  },
106
- lg: {
106
+ large: {
107
107
  value: {
108
108
  fontWeight: 'FontWeight400',
109
109
  fontSize: 'FontSize16',
@@ -113,7 +113,7 @@ const typography = {
113
113
  letterSpacing: 'LetterSpacing0'
114
114
  }
115
115
  },
116
- sm: {
116
+ small: {
117
117
  value: {
118
118
  fontWeight: 'FontWeight400',
119
119
  fontSize: 'LegacyFontSize11',
@@ -135,7 +135,7 @@ const typography = {
135
135
  letterSpacing: 'LetterSpacing0'
136
136
  }
137
137
  },
138
- sm: {
138
+ small: {
139
139
  value: {
140
140
  fontWeight: 'FontWeight400',
141
141
  fontSize: 'LegacyFontSize11',