@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,313 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import _typeof from "@babel/runtime/helpers/typeof";
3
+ import defaultPalette from './palette';
4
+
5
+ /**
6
+ * Simple object check.
7
+ * @param item
8
+ * @returns {boolean}
9
+ */
10
+ export function isObject(item) {
11
+ return item && _typeof(item) === 'object' && !Array.isArray(item);
12
+ }
13
+
14
+ /**
15
+ * Deep merge two objects.
16
+ * @param target
17
+ * @param ...sources
18
+ */
19
+ function mergeDeep(target) {
20
+ for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
21
+ sources[_key - 1] = arguments[_key];
22
+ }
23
+ if (!sources.length) {
24
+ return target;
25
+ }
26
+ var source = sources.shift();
27
+ if (isObject(target) && isObject(source)) {
28
+ for (var key in source) {
29
+ if (isObject(source[key])) {
30
+ if (!target[key]) {
31
+ Object.assign(target, _defineProperty({}, key, {}));
32
+ }
33
+ mergeDeep(target[key], source[key]);
34
+ } else {
35
+ Object.assign(target, _defineProperty({}, key, source[key]));
36
+ }
37
+ }
38
+ }
39
+ return mergeDeep.apply(void 0, [target].concat(sources));
40
+ }
41
+ var palette = mergeDeep(JSON.parse(JSON.stringify(defaultPalette)), {
42
+ color: {
43
+ palette: {
44
+ Blue1000: {
45
+ value: '#1C2B41',
46
+ attributes: {
47
+ group: 'palette',
48
+ category: 'blue'
49
+ }
50
+ },
51
+ Red100: {
52
+ value: '#FFECEB',
53
+ attributes: {
54
+ group: 'palette',
55
+ category: 'red'
56
+ }
57
+ },
58
+ Red200: {
59
+ value: '#FFD5D2',
60
+ attributes: {
61
+ group: 'palette',
62
+ category: 'red'
63
+ }
64
+ },
65
+ Red300: {
66
+ value: '#FD9891',
67
+ attributes: {
68
+ group: 'palette',
69
+ category: 'red'
70
+ }
71
+ },
72
+ Red400: {
73
+ value: '#F87168',
74
+ attributes: {
75
+ group: 'palette',
76
+ category: 'red'
77
+ }
78
+ },
79
+ Red500: {
80
+ value: '#F15B50',
81
+ attributes: {
82
+ group: 'palette',
83
+ category: 'red'
84
+ }
85
+ },
86
+ Red600: {
87
+ value: '#E2483D',
88
+ attributes: {
89
+ group: 'palette',
90
+ category: 'red'
91
+ }
92
+ },
93
+ Red700: {
94
+ value: '#C9372C',
95
+ attributes: {
96
+ group: 'palette',
97
+ category: 'red'
98
+ }
99
+ },
100
+ Red800: {
101
+ value: '#AE2E24',
102
+ attributes: {
103
+ group: 'palette',
104
+ category: 'red'
105
+ }
106
+ },
107
+ Red900: {
108
+ value: '#5D1F1A',
109
+ attributes: {
110
+ group: 'palette',
111
+ category: 'red'
112
+ }
113
+ },
114
+ Red1000: {
115
+ value: '#42221F',
116
+ attributes: {
117
+ group: 'palette',
118
+ category: 'red'
119
+ }
120
+ },
121
+ Yellow1000: {
122
+ value: '#332E1B',
123
+ attributes: {
124
+ group: 'palette',
125
+ category: 'yellow'
126
+ }
127
+ },
128
+ Green100: {
129
+ value: '#DCFFF1',
130
+ attributes: {
131
+ group: 'palette',
132
+ category: 'green'
133
+ }
134
+ },
135
+ Green1000: {
136
+ value: '#1C3329',
137
+ attributes: {
138
+ group: 'palette',
139
+ category: 'green'
140
+ }
141
+ },
142
+ Purple1000: {
143
+ value: '#2B273F',
144
+ attributes: {
145
+ group: 'palette',
146
+ category: 'purple'
147
+ }
148
+ },
149
+ Teal100: {
150
+ value: '#E7F9FF',
151
+ attributes: {
152
+ group: 'palette',
153
+ category: 'teal'
154
+ }
155
+ },
156
+ Teal200: {
157
+ value: '#C6EDFB',
158
+ attributes: {
159
+ group: 'palette',
160
+ category: 'teal'
161
+ }
162
+ },
163
+ Teal300: {
164
+ value: '#9DD9EE',
165
+ attributes: {
166
+ group: 'palette',
167
+ category: 'teal'
168
+ }
169
+ },
170
+ Teal400: {
171
+ value: '#6CC3E0',
172
+ attributes: {
173
+ group: 'palette',
174
+ category: 'teal'
175
+ }
176
+ },
177
+ Teal500: {
178
+ value: '#42B2D7',
179
+ attributes: {
180
+ group: 'palette',
181
+ category: 'teal'
182
+ }
183
+ },
184
+ Teal600: {
185
+ value: '#2898BD',
186
+ attributes: {
187
+ group: 'palette',
188
+ category: 'teal'
189
+ }
190
+ },
191
+ Teal700: {
192
+ value: '#227D9B',
193
+ attributes: {
194
+ group: 'palette',
195
+ category: 'teal'
196
+ }
197
+ },
198
+ Teal800: {
199
+ value: '#206A83',
200
+ attributes: {
201
+ group: 'palette',
202
+ category: 'teal'
203
+ }
204
+ },
205
+ Teal900: {
206
+ value: '#164555',
207
+ attributes: {
208
+ group: 'palette',
209
+ category: 'teal'
210
+ }
211
+ },
212
+ Teal1000: {
213
+ value: '#1E3137',
214
+ attributes: {
215
+ group: 'palette',
216
+ category: 'teal'
217
+ }
218
+ },
219
+ Orange100: {
220
+ value: '#FFF3EB',
221
+ attributes: {
222
+ group: 'palette',
223
+ category: 'orange'
224
+ }
225
+ },
226
+ Orange200: {
227
+ value: '#FEDEC8',
228
+ attributes: {
229
+ group: 'palette',
230
+ category: 'orange'
231
+ }
232
+ },
233
+ Orange300: {
234
+ value: '#FEC195',
235
+ attributes: {
236
+ group: 'palette',
237
+ category: 'orange'
238
+ }
239
+ },
240
+ Orange400: {
241
+ value: '#FEA362',
242
+ attributes: {
243
+ group: 'palette',
244
+ category: 'orange'
245
+ }
246
+ },
247
+ Orange500: {
248
+ value: '#F38A3F',
249
+ attributes: {
250
+ group: 'palette',
251
+ category: 'orange'
252
+ }
253
+ },
254
+ Orange600: {
255
+ value: '#E56910',
256
+ attributes: {
257
+ group: 'palette',
258
+ category: 'orange'
259
+ }
260
+ },
261
+ Orange700: {
262
+ value: '#C25100',
263
+ attributes: {
264
+ group: 'palette',
265
+ category: 'orange'
266
+ }
267
+ },
268
+ Orange800: {
269
+ value: '#A54800',
270
+ attributes: {
271
+ group: 'palette',
272
+ category: 'orange'
273
+ }
274
+ },
275
+ Orange900: {
276
+ value: '#702E00',
277
+ attributes: {
278
+ group: 'palette',
279
+ category: 'orange'
280
+ }
281
+ },
282
+ Orange1000: {
283
+ value: '#38291E',
284
+ attributes: {
285
+ group: 'palette',
286
+ category: 'orange'
287
+ }
288
+ },
289
+ Magenta1000: {
290
+ value: '#3D2232',
291
+ attributes: {
292
+ group: 'palette',
293
+ category: 'magenta'
294
+ }
295
+ },
296
+ Lime100: {
297
+ value: '#EFFFD6',
298
+ attributes: {
299
+ group: 'palette',
300
+ category: 'lime'
301
+ }
302
+ },
303
+ Lime1000: {
304
+ value: '#28311B',
305
+ attributes: {
306
+ group: 'palette',
307
+ category: 'lime'
308
+ }
309
+ }
310
+ }
311
+ }
312
+ });
313
+ export default palette;
@@ -1,10 +1,13 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
2
5
  import _regeneratorRuntime from "@babel/runtime/regenerator";
3
6
  import { themeStateDefaults } from './theme-config';
4
7
  import { isValidBrandHex } from './utils/color-utils';
5
8
  import configurePage from './utils/configure-page';
6
9
  import { findMissingCustomStyleElements } from './utils/custom-theme-loading-utils';
7
- import { getThemePreferences } from './utils/get-theme-preferences';
10
+ import { getThemeOverridePreferences, getThemePreferences } from './utils/get-theme-preferences';
8
11
  import { loadAndAppendThemeCss } from './utils/theme-loading';
9
12
 
10
13
  /**
@@ -51,6 +54,10 @@ var setGlobalTheme = /*#__PURE__*/function () {
51
54
  loadingTasks,
52
55
  mode,
53
56
  attrOfMissingCustomStyles,
57
+ themeOverridePreferences,
58
+ _iterator,
59
+ _step,
60
+ themeId,
54
61
  autoUnbind,
55
62
  _args3 = arguments;
56
63
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
@@ -121,13 +128,41 @@ var setGlobalTheme = /*#__PURE__*/function () {
121
128
  _context3.next = 9;
122
129
  return Promise.all(loadingTasks);
123
130
  case 9:
131
+ // Load override themes after standard themes
132
+ themeOverridePreferences = getThemeOverridePreferences(themeState);
133
+ _iterator = _createForOfIteratorHelper(themeOverridePreferences);
134
+ _context3.prev = 11;
135
+ _iterator.s();
136
+ case 13:
137
+ if ((_step = _iterator.n()).done) {
138
+ _context3.next = 19;
139
+ break;
140
+ }
141
+ themeId = _step.value;
142
+ _context3.next = 17;
143
+ return loadingStrategy(themeId);
144
+ case 17:
145
+ _context3.next = 13;
146
+ break;
147
+ case 19:
148
+ _context3.next = 24;
149
+ break;
150
+ case 21:
151
+ _context3.prev = 21;
152
+ _context3.t0 = _context3["catch"](11);
153
+ _iterator.e(_context3.t0);
154
+ case 24:
155
+ _context3.prev = 24;
156
+ _iterator.f();
157
+ return _context3.finish(24);
158
+ case 27:
124
159
  autoUnbind = configurePage(themeState);
125
160
  return _context3.abrupt("return", autoUnbind);
126
- case 11:
161
+ case 29:
127
162
  case "end":
128
163
  return _context3.stop();
129
164
  }
130
- }, _callee3);
165
+ }, _callee3, null, [[11, 21, 24, 27]]);
131
166
  }));
132
167
  return function setGlobalTheme() {
133
168
  return _ref.apply(this, arguments);
@@ -39,7 +39,7 @@ export var themeIds = ['light', 'dark', 'legacy-light', 'legacy-dark', 'spacing'
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 var themeOverrideIds = ['light-new-input-border', 'dark-new-input-border'];
42
+ export var themeOverrideIds = ['light-new-input-border', 'dark-new-input-border', 'light-saturated-palette-changes', 'dark-saturated-palette-changes'];
43
43
  export var themeIdsWithOverrides = [].concat(themeIds, themeOverrideIds);
44
44
 
45
45
  /**
@@ -140,6 +140,30 @@ var 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
+ var 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
+ var 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
+ var 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
+ var 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
+ var 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
+ var color = {
2
+ color: {
3
+ icon: {
4
+ danger: {
5
+ value: 'Red700'
6
+ }
7
+ }
8
+ }
9
+ };
10
+ export default color;
@@ -1,7 +1,7 @@
1
1
  var 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 @@ var 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 @@ var 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 @@ var 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 @@ var 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 @@ var 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 @@ var 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 @@ var 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 @@ var 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 @@ var typography = {
127
127
  letterSpacing: 'LetterSpacing0'
128
128
  }
129
129
  },
130
- sm: {
130
+ small: {
131
131
  value: {
132
132
  fontWeight: 'FontWeight400',
133
133
  fontSize: 'FontSize12',