@atlaskit/tokens 0.10.16 → 0.10.19

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 (173) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/css/atlassian-dark.css +3 -1
  3. package/css/atlassian-legacy-dark.css +292 -0
  4. package/css/atlassian-legacy-light.css +292 -0
  5. package/css/atlassian-light.css +3 -1
  6. package/dist/cjs/artifacts/palettes-raw/legacy-palette.js +120 -69
  7. package/dist/cjs/artifacts/palettes-raw/palette.js +35 -1
  8. package/dist/cjs/artifacts/token-default-values.js +3 -1
  9. package/dist/cjs/artifacts/token-names.js +3 -1
  10. package/dist/cjs/artifacts/tokens-raw/atlassian-dark.js +45 -3
  11. package/dist/cjs/artifacts/tokens-raw/atlassian-legacy-dark.js +6800 -0
  12. package/dist/cjs/artifacts/tokens-raw/atlassian-legacy-light.js +6760 -0
  13. package/dist/cjs/artifacts/tokens-raw/atlassian-light.js +45 -3
  14. package/dist/cjs/constants.js +9 -5
  15. package/dist/cjs/get-token.js +1 -1
  16. package/dist/cjs/palettes/legacy-palette.js +59 -34
  17. package/dist/cjs/palettes/palette.js +18 -0
  18. package/dist/cjs/tokens/atlassian-dark/opacity/opacity.js +18 -0
  19. package/dist/cjs/tokens/atlassian-legacy-dark/color/accent.js +296 -0
  20. package/dist/cjs/tokens/atlassian-legacy-dark/color/background.js +250 -0
  21. package/dist/cjs/tokens/atlassian-legacy-dark/color/border.js +53 -0
  22. package/dist/cjs/tokens/atlassian-legacy-dark/color/icon.js +52 -0
  23. package/dist/cjs/tokens/atlassian-legacy-dark/color/interaction.js +22 -0
  24. package/dist/cjs/tokens/atlassian-legacy-dark/color/skeleton.js +20 -0
  25. package/dist/cjs/tokens/atlassian-legacy-dark/color/text.js +63 -0
  26. package/dist/cjs/tokens/atlassian-legacy-dark/deprecated/deprecated.js +532 -0
  27. package/dist/cjs/tokens/atlassian-legacy-dark/elevation/shadow.js +89 -0
  28. package/dist/cjs/tokens/atlassian-legacy-dark/elevation/surface.js +26 -0
  29. package/dist/cjs/tokens/atlassian-legacy-dark/opacity/opacity.js +18 -0
  30. package/dist/cjs/tokens/atlassian-legacy-dark/utility/utility.js +20 -0
  31. package/dist/cjs/tokens/atlassian-legacy-light/color/accent.js +296 -0
  32. package/dist/cjs/tokens/atlassian-legacy-light/color/background.js +249 -0
  33. package/dist/cjs/tokens/atlassian-legacy-light/color/border.js +53 -0
  34. package/dist/cjs/tokens/atlassian-legacy-light/color/icon.js +52 -0
  35. package/dist/cjs/tokens/atlassian-legacy-light/color/interaction.js +22 -0
  36. package/dist/cjs/tokens/atlassian-legacy-light/color/skeleton.js +20 -0
  37. package/dist/cjs/tokens/atlassian-legacy-light/color/text.js +63 -0
  38. package/dist/cjs/tokens/atlassian-legacy-light/deprecated/deprecated.js +523 -0
  39. package/dist/cjs/tokens/atlassian-legacy-light/elevation/shadow.js +71 -0
  40. package/dist/cjs/tokens/atlassian-legacy-light/elevation/surface.js +26 -0
  41. package/dist/cjs/tokens/atlassian-legacy-light/opacity/opacity.js +18 -0
  42. package/dist/cjs/tokens/atlassian-legacy-light/utility/utility.js +20 -0
  43. package/dist/cjs/tokens/atlassian-light/opacity/opacity.js +18 -0
  44. package/dist/cjs/tokens/default/elevation/shadow.js +1 -1
  45. package/dist/cjs/tokens/default/opacity/opacity.js +28 -0
  46. package/dist/cjs/utils/token-ids.js +8 -5
  47. package/dist/cjs/version.json +1 -1
  48. package/dist/es2019/artifacts/palettes-raw/legacy-palette.js +120 -69
  49. package/dist/es2019/artifacts/palettes-raw/palette.js +35 -1
  50. package/dist/es2019/artifacts/token-default-values.js +3 -1
  51. package/dist/es2019/artifacts/token-names.js +3 -1
  52. package/dist/es2019/artifacts/tokens-raw/atlassian-dark.js +45 -3
  53. package/dist/es2019/artifacts/tokens-raw/atlassian-legacy-dark.js +6792 -0
  54. package/dist/es2019/artifacts/tokens-raw/atlassian-legacy-light.js +6752 -0
  55. package/dist/es2019/artifacts/tokens-raw/atlassian-light.js +45 -3
  56. package/dist/es2019/constants.js +6 -3
  57. package/dist/es2019/get-token.js +1 -1
  58. package/dist/es2019/palettes/legacy-palette.js +59 -34
  59. package/dist/es2019/palettes/palette.js +18 -0
  60. package/dist/es2019/tokens/atlassian-dark/opacity/opacity.js +11 -0
  61. package/dist/es2019/tokens/atlassian-legacy-dark/color/accent.js +289 -0
  62. package/dist/es2019/tokens/atlassian-legacy-dark/color/background.js +243 -0
  63. package/dist/es2019/tokens/atlassian-legacy-dark/color/border.js +46 -0
  64. package/dist/es2019/tokens/atlassian-legacy-dark/color/icon.js +45 -0
  65. package/dist/es2019/tokens/atlassian-legacy-dark/color/interaction.js +15 -0
  66. package/dist/es2019/tokens/atlassian-legacy-dark/color/skeleton.js +13 -0
  67. package/dist/es2019/tokens/atlassian-legacy-dark/color/text.js +56 -0
  68. package/dist/es2019/tokens/atlassian-legacy-dark/deprecated/deprecated.js +525 -0
  69. package/dist/es2019/tokens/atlassian-legacy-dark/elevation/shadow.js +82 -0
  70. package/dist/es2019/tokens/atlassian-legacy-dark/elevation/surface.js +19 -0
  71. package/dist/es2019/tokens/atlassian-legacy-dark/opacity/opacity.js +11 -0
  72. package/dist/es2019/tokens/atlassian-legacy-dark/utility/utility.js +13 -0
  73. package/dist/es2019/tokens/atlassian-legacy-light/color/accent.js +289 -0
  74. package/dist/es2019/tokens/atlassian-legacy-light/color/background.js +242 -0
  75. package/dist/es2019/tokens/atlassian-legacy-light/color/border.js +46 -0
  76. package/dist/es2019/tokens/atlassian-legacy-light/color/icon.js +45 -0
  77. package/dist/es2019/tokens/atlassian-legacy-light/color/interaction.js +15 -0
  78. package/dist/es2019/tokens/atlassian-legacy-light/color/skeleton.js +13 -0
  79. package/dist/es2019/tokens/atlassian-legacy-light/color/text.js +56 -0
  80. package/dist/es2019/tokens/atlassian-legacy-light/deprecated/deprecated.js +516 -0
  81. package/dist/es2019/tokens/atlassian-legacy-light/elevation/shadow.js +64 -0
  82. package/dist/es2019/tokens/atlassian-legacy-light/elevation/surface.js +19 -0
  83. package/dist/es2019/tokens/atlassian-legacy-light/opacity/opacity.js +11 -0
  84. package/dist/es2019/tokens/atlassian-legacy-light/utility/utility.js +13 -0
  85. package/dist/es2019/tokens/atlassian-light/opacity/opacity.js +11 -0
  86. package/dist/es2019/tokens/default/elevation/shadow.js +1 -1
  87. package/dist/es2019/tokens/default/opacity/opacity.js +21 -0
  88. package/dist/es2019/utils/token-ids.js +6 -4
  89. package/dist/es2019/version.json +1 -1
  90. package/dist/esm/artifacts/palettes-raw/legacy-palette.js +120 -69
  91. package/dist/esm/artifacts/palettes-raw/palette.js +35 -1
  92. package/dist/esm/artifacts/token-default-values.js +3 -1
  93. package/dist/esm/artifacts/token-names.js +3 -1
  94. package/dist/esm/artifacts/tokens-raw/atlassian-dark.js +45 -3
  95. package/dist/esm/artifacts/tokens-raw/atlassian-legacy-dark.js +6792 -0
  96. package/dist/esm/artifacts/tokens-raw/atlassian-legacy-light.js +6752 -0
  97. package/dist/esm/artifacts/tokens-raw/atlassian-light.js +45 -3
  98. package/dist/esm/constants.js +6 -3
  99. package/dist/esm/get-token.js +1 -1
  100. package/dist/esm/palettes/legacy-palette.js +59 -34
  101. package/dist/esm/palettes/palette.js +18 -0
  102. package/dist/esm/tokens/atlassian-dark/opacity/opacity.js +11 -0
  103. package/dist/esm/tokens/atlassian-legacy-dark/color/accent.js +289 -0
  104. package/dist/esm/tokens/atlassian-legacy-dark/color/background.js +243 -0
  105. package/dist/esm/tokens/atlassian-legacy-dark/color/border.js +46 -0
  106. package/dist/esm/tokens/atlassian-legacy-dark/color/icon.js +45 -0
  107. package/dist/esm/tokens/atlassian-legacy-dark/color/interaction.js +15 -0
  108. package/dist/esm/tokens/atlassian-legacy-dark/color/skeleton.js +13 -0
  109. package/dist/esm/tokens/atlassian-legacy-dark/color/text.js +56 -0
  110. package/dist/esm/tokens/atlassian-legacy-dark/deprecated/deprecated.js +525 -0
  111. package/dist/esm/tokens/atlassian-legacy-dark/elevation/shadow.js +82 -0
  112. package/dist/esm/tokens/atlassian-legacy-dark/elevation/surface.js +19 -0
  113. package/dist/esm/tokens/atlassian-legacy-dark/opacity/opacity.js +11 -0
  114. package/dist/esm/tokens/atlassian-legacy-dark/utility/utility.js +13 -0
  115. package/dist/esm/tokens/atlassian-legacy-light/color/accent.js +289 -0
  116. package/dist/esm/tokens/atlassian-legacy-light/color/background.js +242 -0
  117. package/dist/esm/tokens/atlassian-legacy-light/color/border.js +46 -0
  118. package/dist/esm/tokens/atlassian-legacy-light/color/icon.js +45 -0
  119. package/dist/esm/tokens/atlassian-legacy-light/color/interaction.js +15 -0
  120. package/dist/esm/tokens/atlassian-legacy-light/color/skeleton.js +13 -0
  121. package/dist/esm/tokens/atlassian-legacy-light/color/text.js +56 -0
  122. package/dist/esm/tokens/atlassian-legacy-light/deprecated/deprecated.js +516 -0
  123. package/dist/esm/tokens/atlassian-legacy-light/elevation/shadow.js +64 -0
  124. package/dist/esm/tokens/atlassian-legacy-light/elevation/surface.js +19 -0
  125. package/dist/esm/tokens/atlassian-legacy-light/opacity/opacity.js +11 -0
  126. package/dist/esm/tokens/atlassian-legacy-light/utility/utility.js +13 -0
  127. package/dist/esm/tokens/atlassian-light/opacity/opacity.js +11 -0
  128. package/dist/esm/tokens/default/elevation/shadow.js +1 -1
  129. package/dist/esm/tokens/default/opacity/opacity.js +21 -0
  130. package/dist/esm/utils/token-ids.js +6 -4
  131. package/dist/esm/version.json +1 -1
  132. package/dist/types/artifacts/palettes-raw/legacy-palette.d.ts +20 -3
  133. package/dist/types/artifacts/palettes-raw/palette.d.ts +20 -3
  134. package/dist/types/artifacts/token-default-values.d.ts +3 -1
  135. package/dist/types/artifacts/token-names.d.ts +5 -1
  136. package/dist/types/artifacts/tokens-raw/atlassian-dark.d.ts +28 -1
  137. package/dist/types/artifacts/tokens-raw/atlassian-legacy-dark.d.ts +222 -0
  138. package/dist/types/artifacts/tokens-raw/atlassian-legacy-light.d.ts +174 -0
  139. package/dist/types/artifacts/tokens-raw/atlassian-light.d.ts +28 -1
  140. package/dist/types/artifacts/types-internal.d.ts +2 -2
  141. package/dist/types/artifacts/types.d.ts +2 -2
  142. package/dist/types/constants.d.ts +4 -1
  143. package/dist/types/palettes/legacy-palette.d.ts +1 -1
  144. package/dist/types/tokens/atlassian-dark/opacity/opacity.d.ts +3 -0
  145. package/dist/types/tokens/atlassian-legacy-dark/color/accent.d.ts +4 -0
  146. package/dist/types/tokens/atlassian-legacy-dark/color/background.d.ts +4 -0
  147. package/dist/types/tokens/atlassian-legacy-dark/color/border.d.ts +4 -0
  148. package/dist/types/tokens/atlassian-legacy-dark/color/icon.d.ts +4 -0
  149. package/dist/types/tokens/atlassian-legacy-dark/color/interaction.d.ts +4 -0
  150. package/dist/types/tokens/atlassian-legacy-dark/color/skeleton.d.ts +4 -0
  151. package/dist/types/tokens/atlassian-legacy-dark/color/text.d.ts +4 -0
  152. package/dist/types/tokens/atlassian-legacy-dark/deprecated/deprecated.d.ts +4 -0
  153. package/dist/types/tokens/atlassian-legacy-dark/elevation/shadow.d.ts +4 -0
  154. package/dist/types/tokens/atlassian-legacy-dark/elevation/surface.d.ts +4 -0
  155. package/dist/types/tokens/atlassian-legacy-dark/opacity/opacity.d.ts +3 -0
  156. package/dist/types/tokens/atlassian-legacy-dark/utility/utility.d.ts +5 -0
  157. package/dist/types/tokens/atlassian-legacy-light/color/accent.d.ts +4 -0
  158. package/dist/types/tokens/atlassian-legacy-light/color/background.d.ts +4 -0
  159. package/dist/types/tokens/atlassian-legacy-light/color/border.d.ts +4 -0
  160. package/dist/types/tokens/atlassian-legacy-light/color/icon.d.ts +4 -0
  161. package/dist/types/tokens/atlassian-legacy-light/color/interaction.d.ts +4 -0
  162. package/dist/types/tokens/atlassian-legacy-light/color/skeleton.d.ts +4 -0
  163. package/dist/types/tokens/atlassian-legacy-light/color/text.d.ts +4 -0
  164. package/dist/types/tokens/atlassian-legacy-light/deprecated/deprecated.d.ts +4 -0
  165. package/dist/types/tokens/atlassian-legacy-light/elevation/shadow.d.ts +4 -0
  166. package/dist/types/tokens/atlassian-legacy-light/elevation/surface.d.ts +4 -0
  167. package/dist/types/tokens/atlassian-legacy-light/opacity/opacity.d.ts +3 -0
  168. package/dist/types/tokens/atlassian-legacy-light/utility/utility.d.ts +5 -0
  169. package/dist/types/tokens/atlassian-light/opacity/opacity.d.ts +3 -0
  170. package/dist/types/tokens/default/opacity/opacity.d.ts +3 -0
  171. package/dist/types/types.d.ts +29 -8
  172. package/dist/types/utils/token-ids.d.ts +1 -3
  173. package/package.json +16 -14
@@ -1,9 +1,12 @@
1
- export declare const THEMES: readonly ["light", "dark"];
1
+ export declare const THEMES: readonly ["light", "dark", "legacy-light", "legacy-dark"];
2
2
  export declare const THEME_DATA_ATTRIBUTE = "data-theme";
3
3
  export declare const DEFAULT_THEME = "light";
4
4
  export declare const CSS_PREFIX = "ds";
5
+ export declare const CSS_VAR_FULL: string[];
5
6
  export declare const THEME_NAME_MAP: {
6
7
  'atlassian-light': string;
7
8
  'atlassian-dark': string;
9
+ 'atlassian-legacy-light': string;
10
+ 'atlassian-legacy-dark': string;
8
11
  };
9
12
  export declare const TOKEN_NOT_FOUND_CSS_VAR: string;
@@ -4,7 +4,7 @@
4
4
  * This palette should be exclusively used for backwards compatible themes
5
5
  */
6
6
  import type { PaletteColorTokenSchema } from '../types';
7
- declare type PaletteValues = 'R50' | 'R75' | 'R100' | 'R200' | 'R300' | 'R400' | 'R500' | 'Y50' | 'Y75' | 'Y100' | 'Y200' | 'Y300' | 'Y400' | 'Y500' | 'G50' | 'G75' | 'G100' | 'G200' | 'G300' | 'G400' | 'G500' | 'B50' | 'B75' | 'B100' | 'B200' | 'B300' | 'B400' | 'B500' | 'P50' | 'P75' | 'P100' | 'P200' | 'P300' | 'P400' | 'P500' | 'T50' | 'T75' | 'T100' | 'T200' | 'T300' | 'T400' | 'T500' | 'N0' | 'N10' | 'N20' | 'N30' | 'N40' | 'N50' | 'N60' | 'N70' | 'N80' | 'N90' | 'N100' | 'N200' | 'N300' | 'N400' | 'N500' | 'N600' | 'N700' | 'N800' | 'N900' | 'N10A' | 'N20A' | 'N30A' | 'N40A' | 'N50A' | 'N60A' | 'N70A' | 'N80A' | 'N90A' | 'N100A' | 'N200A' | 'N300A' | 'N400A' | 'N500A' | 'N600A' | 'N700A' | 'N800A' | 'DN900' | 'DN800' | 'DN700' | 'DN600' | 'DN500' | 'DN400' | 'DN300' | 'DN200' | 'DN100' | 'DN90' | 'DN80' | 'DN70' | 'DN60' | 'DN50' | 'DN40' | 'DN30' | 'DN20' | 'DN10' | 'DN0' | 'DN800A' | 'DN700A' | 'DN600A' | 'DN500A' | 'DN400A' | 'DN300A' | 'DN200A' | 'DN100A' | 'DN90A' | 'DN80A' | 'DN70A' | 'DN60A' | 'DN50A' | 'DN40A' | 'DN30A' | 'DN20A' | 'DN10' | 'DN10A';
7
+ declare type PaletteValues = 'transparent' | 'R50' | 'R75' | 'R100' | 'R200' | 'R300' | 'R400' | 'R500' | 'Y50' | 'Y75' | 'Y100' | 'Y200' | 'Y300' | 'Y400' | 'Y500' | 'G50' | 'G75' | 'G100' | 'G200' | 'G300' | 'G400' | 'G500' | 'B50' | 'B75' | 'B100' | 'B200' | 'B300' | 'B400' | 'B500' | 'P50' | 'P75' | 'P100' | 'P200' | 'P300' | 'P400' | 'P500' | 'T50' | 'T75' | 'T100' | 'T200' | 'T300' | 'T400' | 'T500' | 'N0' | 'N10' | 'N20' | 'N30' | 'N40' | 'N50' | 'N60' | 'N70' | 'N80' | 'N90' | 'N100' | 'N200' | 'N300' | 'N400' | 'N500' | 'N600' | 'N700' | 'N800' | 'N900' | 'N10A' | 'N20A' | 'N30A' | 'N40A' | 'N50A' | 'N60A' | 'N70A' | 'N80A' | 'N90A' | 'N100A' | 'N200A' | 'N300A' | 'N400A' | 'N500A' | 'N600A' | 'N700A' | 'N800A' | 'DN900' | 'DN800' | 'DN700' | 'DN600' | 'DN500' | 'DN400' | 'DN300' | 'DN200' | 'DN100' | 'DN90' | 'DN80' | 'DN70' | 'DN60' | 'DN50' | 'DN40' | 'DN30' | 'DN20' | 'DN10' | 'DN0' | 'DN800A' | 'DN700A' | 'DN600A' | 'DN500A' | 'DN400A' | 'DN300A' | 'DN200A' | 'DN100A' | 'DN90A' | 'DN80A' | 'DN70A' | 'DN60A' | 'DN50A' | 'DN40A' | 'DN30A' | 'DN20A' | 'DN10' | 'DN10A';
8
8
  export declare type BaseToken = keyof PaletteColorTokenSchema<PaletteValues>['color']['palette'];
9
9
  declare const palette: PaletteColorTokenSchema<PaletteValues>;
10
10
  export default palette;
@@ -0,0 +1,3 @@
1
+ import type { OpacityTokenSchema, ValueSchema } from '../../../types';
2
+ declare const opacity: ValueSchema<OpacityTokenSchema>;
3
+ export default opacity;
@@ -0,0 +1,4 @@
1
+ import type { BaseToken } from '../../../palettes/legacy-palette';
2
+ import type { AccentColorTokenSchema, ValueSchema } from '../../../types';
3
+ declare const color: ValueSchema<AccentColorTokenSchema<BaseToken>>;
4
+ export default color;
@@ -0,0 +1,4 @@
1
+ import type { BaseToken } from '../../../palettes/legacy-palette';
2
+ import type { BackgroundColorTokenSchema, ValueSchema } from '../../../types';
3
+ declare const color: ValueSchema<BackgroundColorTokenSchema<BaseToken>>;
4
+ export default color;
@@ -0,0 +1,4 @@
1
+ import type { BaseToken } from '../../../palettes/legacy-palette';
2
+ import type { BorderColorTokenSchema, ValueSchema } from '../../../types';
3
+ declare const color: ValueSchema<BorderColorTokenSchema<BaseToken>>;
4
+ export default color;
@@ -0,0 +1,4 @@
1
+ import type { BaseToken } from '../../../palettes/legacy-palette';
2
+ import type { IconColorTokenSchema, ValueSchema } from '../../../types';
3
+ declare const color: ValueSchema<IconColorTokenSchema<BaseToken>>;
4
+ export default color;
@@ -0,0 +1,4 @@
1
+ import type { BaseToken } from '../../../palettes/legacy-palette';
2
+ import type { InteractionColorTokenSchema, ValueSchema } from '../../../types';
3
+ declare const color: ValueSchema<InteractionColorTokenSchema<BaseToken>>;
4
+ export default color;
@@ -0,0 +1,4 @@
1
+ import type { BaseToken } from '../../../palettes/legacy-palette';
2
+ import type { SkeletonColorTokenSchema, ValueSchema } from '../../../types';
3
+ declare const color: ValueSchema<SkeletonColorTokenSchema<BaseToken>>;
4
+ export default color;
@@ -0,0 +1,4 @@
1
+ import type { BaseToken } from '../../../palettes/legacy-palette';
2
+ import type { TextColorTokenSchema, ValueSchema } from '../../../types';
3
+ declare const color: ValueSchema<TextColorTokenSchema<BaseToken>>;
4
+ export default color;
@@ -0,0 +1,4 @@
1
+ import type { BaseToken } from '../../../palettes/legacy-palette';
2
+ import type { DeprecatedTokenSchema, ValueSchema } from '../../../types';
3
+ declare const color: ValueSchema<DeprecatedTokenSchema<BaseToken>>;
4
+ export default color;
@@ -0,0 +1,4 @@
1
+ import type { BaseToken } from '../../../palettes/legacy-palette';
2
+ import type { ShadowTokenSchema, ValueSchema } from '../../../types';
3
+ declare const shadow: ValueSchema<ShadowTokenSchema<BaseToken>>;
4
+ export default shadow;
@@ -0,0 +1,4 @@
1
+ import type { BaseToken } from '../../../palettes/legacy-palette';
2
+ import type { SurfaceTokenSchema, ValueSchema } from '../../../types';
3
+ declare const elevation: ValueSchema<SurfaceTokenSchema<BaseToken>>;
4
+ export default elevation;
@@ -0,0 +1,3 @@
1
+ import type { OpacityTokenSchema, ValueSchema } from '../../../types';
2
+ declare const opacity: ValueSchema<OpacityTokenSchema>;
3
+ export default opacity;
@@ -0,0 +1,5 @@
1
+ import type { UtilTokenSchema, ValueSchema } from '../../../types';
2
+ declare const _default: {
3
+ utility: ValueSchema<UtilTokenSchema<"transparent" | "R50" | "R75" | "R100" | "R200" | "R300" | "R400" | "R500" | "Y50" | "Y75" | "Y100" | "Y200" | "Y300" | "Y400" | "Y500" | "G50" | "G75" | "G100" | "G200" | "G300" | "G400" | "G500" | "B50" | "B75" | "B100" | "B200" | "B300" | "B400" | "B500" | "P50" | "P75" | "P100" | "P200" | "P300" | "P400" | "P500" | "T50" | "T75" | "T100" | "T200" | "T300" | "T400" | "T500" | "N0" | "N10" | "N20" | "N30" | "N40" | "N50" | "N60" | "N70" | "N80" | "N90" | "N100" | "N200" | "N300" | "N400" | "N500" | "N600" | "N700" | "N800" | "N900" | "N10A" | "N20A" | "N30A" | "N40A" | "N50A" | "N60A" | "N70A" | "N80A" | "N90A" | "N100A" | "N200A" | "N300A" | "N400A" | "N500A" | "N600A" | "N700A" | "N800A" | "DN900" | "DN800" | "DN700" | "DN600" | "DN500" | "DN400" | "DN300" | "DN200" | "DN100" | "DN90" | "DN80" | "DN70" | "DN60" | "DN50" | "DN40" | "DN30" | "DN20" | "DN10" | "DN0" | "DN800A" | "DN700A" | "DN600A" | "DN500A" | "DN400A" | "DN300A" | "DN200A" | "DN100A" | "DN90A" | "DN80A" | "DN70A" | "DN60A" | "DN50A" | "DN40A" | "DN30A" | "DN20A" | "DN10A">>;
4
+ };
5
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import type { BaseToken } from '../../../palettes/legacy-palette';
2
+ import type { AccentColorTokenSchema, ValueSchema } from '../../../types';
3
+ declare const color: ValueSchema<AccentColorTokenSchema<BaseToken>>;
4
+ export default color;
@@ -0,0 +1,4 @@
1
+ import type { BaseToken } from '../../../palettes/legacy-palette';
2
+ import type { BackgroundColorTokenSchema, ValueSchema } from '../../../types';
3
+ declare const color: ValueSchema<BackgroundColorTokenSchema<BaseToken>>;
4
+ export default color;
@@ -0,0 +1,4 @@
1
+ import type { BaseToken } from '../../../palettes/legacy-palette';
2
+ import type { BorderColorTokenSchema, ValueSchema } from '../../../types';
3
+ declare const color: ValueSchema<BorderColorTokenSchema<BaseToken>>;
4
+ export default color;
@@ -0,0 +1,4 @@
1
+ import type { BaseToken } from '../../../palettes/legacy-palette';
2
+ import type { IconColorTokenSchema, ValueSchema } from '../../../types';
3
+ declare const color: ValueSchema<IconColorTokenSchema<BaseToken>>;
4
+ export default color;
@@ -0,0 +1,4 @@
1
+ import type { BaseToken } from '../../../palettes/legacy-palette';
2
+ import type { InteractionColorTokenSchema, ValueSchema } from '../../../types';
3
+ declare const color: ValueSchema<InteractionColorTokenSchema<BaseToken>>;
4
+ export default color;
@@ -0,0 +1,4 @@
1
+ import type { BaseToken } from '../../../palettes/legacy-palette';
2
+ import type { SkeletonColorTokenSchema, ValueSchema } from '../../../types';
3
+ declare const color: ValueSchema<SkeletonColorTokenSchema<BaseToken>>;
4
+ export default color;
@@ -0,0 +1,4 @@
1
+ import type { BaseToken } from '../../../palettes/legacy-palette';
2
+ import type { TextColorTokenSchema, ValueSchema } from '../../../types';
3
+ declare const color: ValueSchema<TextColorTokenSchema<BaseToken>>;
4
+ export default color;
@@ -0,0 +1,4 @@
1
+ import type { BaseToken } from '../../../palettes/legacy-palette';
2
+ import type { DeprecatedTokenSchema, ValueSchema } from '../../../types';
3
+ declare const color: ValueSchema<DeprecatedTokenSchema<BaseToken>>;
4
+ export default color;
@@ -0,0 +1,4 @@
1
+ import type { BaseToken } from '../../../palettes/legacy-palette';
2
+ import type { ShadowTokenSchema, ValueSchema } from '../../../types';
3
+ declare const shadow: ValueSchema<ShadowTokenSchema<BaseToken>>;
4
+ export default shadow;
@@ -0,0 +1,4 @@
1
+ import type { BaseToken } from '../../../palettes/legacy-palette';
2
+ import type { SurfaceTokenSchema, ValueSchema } from '../../../types';
3
+ declare const elevation: ValueSchema<SurfaceTokenSchema<BaseToken>>;
4
+ export default elevation;
@@ -0,0 +1,3 @@
1
+ import type { OpacityTokenSchema, ValueSchema } from '../../../types';
2
+ declare const opacity: ValueSchema<OpacityTokenSchema>;
3
+ export default opacity;
@@ -0,0 +1,5 @@
1
+ import type { UtilTokenSchema, ValueSchema } from '../../../types';
2
+ declare const _default: {
3
+ utility: ValueSchema<UtilTokenSchema<"transparent" | "R50" | "R75" | "R100" | "R200" | "R300" | "R400" | "R500" | "Y50" | "Y75" | "Y100" | "Y200" | "Y300" | "Y400" | "Y500" | "G50" | "G75" | "G100" | "G200" | "G300" | "G400" | "G500" | "B50" | "B75" | "B100" | "B200" | "B300" | "B400" | "B500" | "P50" | "P75" | "P100" | "P200" | "P300" | "P400" | "P500" | "T50" | "T75" | "T100" | "T200" | "T300" | "T400" | "T500" | "N0" | "N10" | "N20" | "N30" | "N40" | "N50" | "N60" | "N70" | "N80" | "N90" | "N100" | "N200" | "N300" | "N400" | "N500" | "N600" | "N700" | "N800" | "N900" | "N10A" | "N20A" | "N30A" | "N40A" | "N50A" | "N60A" | "N70A" | "N80A" | "N90A" | "N100A" | "N200A" | "N300A" | "N400A" | "N500A" | "N600A" | "N700A" | "N800A" | "DN900" | "DN800" | "DN700" | "DN600" | "DN500" | "DN400" | "DN300" | "DN200" | "DN100" | "DN90" | "DN80" | "DN70" | "DN60" | "DN50" | "DN40" | "DN30" | "DN20" | "DN10" | "DN0" | "DN800A" | "DN700A" | "DN600A" | "DN500A" | "DN400A" | "DN300A" | "DN200A" | "DN100A" | "DN90A" | "DN80A" | "DN70A" | "DN60A" | "DN50A" | "DN40A" | "DN30A" | "DN20A" | "DN10A">>;
4
+ };
5
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import type { OpacityTokenSchema, ValueSchema } from '../../../types';
2
+ declare const opacity: ValueSchema<OpacityTokenSchema>;
3
+ export default opacity;
@@ -0,0 +1,3 @@
1
+ import type { AttributeSchema, OpacityTokenSchema } from '../../../types';
2
+ declare const opacity: AttributeSchema<OpacityTokenSchema>;
3
+ export default opacity;
@@ -1,11 +1,13 @@
1
1
  import { InternalTokenIds } from './artifacts/types-internal';
2
2
  import { THEME_NAME_MAP, THEMES } from './constants';
3
- export declare type Groups = 'raw' | 'paint' | 'shadow' | 'palette';
3
+ export declare type Groups = 'raw' | 'paint' | 'shadow' | 'opacity' | 'palette';
4
4
  export declare type ActiveTokenState = 'active';
5
5
  export declare type DeprecatedTokenState = 'deprecated';
6
6
  export declare type DeletedTokenState = 'deleted';
7
7
  export declare type TokenState = ActiveTokenState | DeprecatedTokenState | DeletedTokenState;
8
8
  export declare type Replacement = InternalTokenIds | InternalTokenIds[];
9
+ export declare type PaletteCategory = 'blue' | 'purple' | 'red' | 'magenta' | 'orange' | 'yellow' | 'green' | 'teal' | 'light mode neutral' | 'dark mode neutral';
10
+ export declare type ValueCategory = 'opacity';
9
11
  export declare type Themes = typeof THEMES[number];
10
12
  export declare type ThemesLongName = keyof typeof THEME_NAME_MAP;
11
13
  export interface Token<TValue, Group extends Groups> {
@@ -62,6 +64,19 @@ declare type DeepOmit<T extends any, K extends PropertyKey> = Omit<{
62
64
  }, K>;
63
65
  export declare type ValueSchema<Schema extends object> = DeepOmit<Schema, 'attributes'>;
64
66
  export declare type AttributeSchema<Schema extends object> = DeepOmit<Schema, 'value'>;
67
+ export interface PaletteToken extends BaseToken<string, 'palette'> {
68
+ attributes: {
69
+ group: 'palette';
70
+ category: PaletteCategory;
71
+ };
72
+ }
73
+ export interface ValueToken extends BaseToken<number, 'palette'> {
74
+ attributes: {
75
+ group: 'palette';
76
+ category: ValueCategory;
77
+ };
78
+ }
79
+ export declare type PaintToken<BaseToken> = DesignToken<BaseToken, 'paint'>;
65
80
  export declare type ShadowToken<BaseToken> = DesignToken<Array<{
66
81
  color: BaseToken;
67
82
  opacity: number;
@@ -73,15 +88,15 @@ export declare type ShadowToken<BaseToken> = DesignToken<Array<{
73
88
  spread?: number;
74
89
  inset?: boolean;
75
90
  }>, 'shadow'>;
76
- export declare type PaintToken<BaseToken> = DesignToken<BaseToken, 'paint'>;
91
+ export declare type OpacityToken = DesignToken<string, 'opacity'>;
77
92
  export declare type RawToken = DesignToken<string, 'raw'>;
78
- interface PaletteToken extends BaseToken<string, 'palette'> {
79
- attributes: {
80
- group: 'palette';
81
- category: 'blue' | 'purple' | 'red' | 'magenta' | 'orange' | 'yellow' | 'green' | 'teal' | 'light mode neutral' | 'dark mode neutral';
82
- };
83
- }
84
93
  export interface PaletteColorTokenSchema<PaletteValues extends string> {
94
+ value: {
95
+ opacity: {
96
+ Opacity20: ValueToken;
97
+ Opacity40: ValueToken;
98
+ };
99
+ };
85
100
  color: {
86
101
  palette: Record<PaletteValues, PaletteToken>;
87
102
  };
@@ -439,6 +454,12 @@ export interface ShadowTokenSchema<BaseToken> {
439
454
  };
440
455
  };
441
456
  }
457
+ export interface OpacityTokenSchema {
458
+ opacity: {
459
+ loading: OpacityToken;
460
+ disabled: OpacityToken;
461
+ };
462
+ }
442
463
  export interface DeprecatedTokenSchema<BaseToken> {
443
464
  color: {
444
465
  accent: {
@@ -12,8 +12,7 @@
12
12
  * // Returns ds-background-bold
13
13
  * getCSSCustomProperty('color.background.bold.[default]')
14
14
  */
15
- export declare const getCSSCustomProperty: GetCssCustomProperty;
16
- declare type GetCssCustomProperty = (path: string | string[]) => string;
15
+ export declare const getCSSCustomProperty: (path: string | string[]) => string;
17
16
  /**
18
17
  * Transforms a style dictionary token path to a shorthand token id
19
18
  * These ids will be typically be how tokens are interacted with via typescript and css
@@ -40,4 +39,3 @@ export declare const getTokenId: (path: string | string[]) => string;
40
39
  * getFullyQualifiedTokenId(['color', 'background', 'bold', '[default]'])
41
40
  */
42
41
  export declare const getFullyQualifiedTokenId: (path: string[]) => string;
43
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/tokens",
3
- "version": "0.10.16",
3
+ "version": "0.10.19",
4
4
  "author": "Atlassian Pty Ltd",
5
5
  "description": "Design tokens are the single source of truth to name and store design decisions.",
6
6
  "license": "Apache-2.0",
@@ -33,7 +33,9 @@
33
33
  "./rename-mapping": "./src/entry-points/rename-mapping.tsx",
34
34
  "./babel-plugin": "./src/entry-points/babel-plugin.tsx",
35
35
  "./css/atlassian-light.css": "./css/atlassian-light.css",
36
- "./css/atlassian-dark.css": "./css/atlassian-dark.css"
36
+ "./css/atlassian-dark.css": "./css/atlassian-dark.css",
37
+ "./css/atlassian-legacy-light.css": "./css/atlassian-legacy-light.css",
38
+ "./css/atlassian-legacy-dark.css": "./css/atlassian-legacy-dark.css"
37
39
  },
38
40
  "scripts": {
39
41
  "ak-postbuild": "cd ../../../ && yarn build @af/codegen && cd packages/design-system/tokens && yarn codegen-tokens && yarn check-clean-git",
@@ -59,24 +61,24 @@
59
61
  "@atlaskit/checkbox": "^12.3.9",
60
62
  "@atlaskit/code": "^14.3.0",
61
63
  "@atlaskit/docs": "^9.0.10",
62
- "@atlaskit/dropdown-menu": "^11.3.0",
63
- "@atlaskit/dynamic-table": "^14.7.0",
64
- "@atlaskit/empty-state": "^7.3.9",
64
+ "@atlaskit/dropdown-menu": "^11.5.0",
65
+ "@atlaskit/dynamic-table": "^14.8.0",
66
+ "@atlaskit/empty-state": "^7.4.0",
65
67
  "@atlaskit/focus-ring": "^1.0.0",
66
68
  "@atlaskit/heading": "*",
67
69
  "@atlaskit/icon": "^21.10.2",
68
- "@atlaskit/lozenge": "^11.0.0",
69
- "@atlaskit/modal-dialog": "^12.2.4",
70
- "@atlaskit/section-message": "^6.1.7",
71
- "@atlaskit/tabs": "^13.2.4",
72
- "@atlaskit/tag": "^11.3.1",
73
- "@atlaskit/textfield": "^5.1.5",
74
- "@atlaskit/theme": "^12.1.2",
75
- "@atlaskit/toggle": "^12.4.2",
70
+ "@atlaskit/lozenge": "^11.2.0",
71
+ "@atlaskit/modal-dialog": "^12.3.0",
72
+ "@atlaskit/section-message": "^6.2.0",
73
+ "@atlaskit/tabs": "^13.3.0",
74
+ "@atlaskit/tag": "^11.4.0",
75
+ "@atlaskit/textfield": "^5.2.0",
76
+ "@atlaskit/theme": "^12.2.0",
77
+ "@atlaskit/toggle": "^12.5.0",
76
78
  "@atlaskit/tooltip": "^17.5.7",
77
79
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
78
80
  "@babel/core": "^7.12.3",
79
- "@emotion/core": "^10.0.9",
81
+ "@emotion/react": "^11.7.1",
80
82
  "@testing-library/dom": "^7.7.3",
81
83
  "@testing-library/react": "^8.0.1",
82
84
  "@testing-library/react-hooks": "^1.0.4",