@atlaskit/badge 15.0.2 → 15.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # @atlaskit/badge
2
2
 
3
+ ## 15.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`f460cc7c411`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f460cc7c411) - Builds for this package now pass through a tokens babel plugin, removing runtime invocations of the tokens() function and improving bundle size.
8
+ - Updated dependencies
9
+
10
+ ## 15.0.5
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
16
+ ## 15.0.4
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies
21
+
22
+ ## 15.0.3
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies
27
+
3
28
  ## 15.0.2
4
29
 
5
30
  ### Patch Changes
@@ -7,59 +7,57 @@ exports.textColors = exports.backgroundColors = void 0;
7
7
 
8
8
  var _colors = require("@atlaskit/theme/colors");
9
9
 
10
- var _tokens = require("@atlaskit/tokens");
11
-
12
10
  var backgroundColors = {
13
11
  added: {
14
- light: (0, _tokens.token)('color.background.subtleSuccess.resting', _colors.G50),
15
- dark: (0, _tokens.token)('color.background.subtleSuccess.resting', _colors.G50)
12
+ light: "var(--ds-background-subtleSuccess-resting, ".concat(_colors.G50, ")"),
13
+ dark: "var(--ds-background-subtleSuccess-resting, ".concat(_colors.G50, ")")
16
14
  },
17
15
  default: {
18
- light: (0, _tokens.token)('color.background.subtleNeutral.resting', _colors.N40),
19
- dark: (0, _tokens.token)('color.background.subtleNeutral.resting', _colors.DN70)
16
+ light: "var(--ds-background-subtleNeutral-resting, ".concat(_colors.N40, ")"),
17
+ dark: "var(--ds-background-subtleNeutral-resting, ".concat(_colors.DN70, ")")
20
18
  },
21
19
  important: {
22
- light: (0, _tokens.token)('color.background.boldDanger.resting', _colors.R400),
23
- dark: (0, _tokens.token)('color.background.boldDanger.resting', _colors.R400)
20
+ light: "var(--ds-background-boldDanger-resting, ".concat(_colors.R400, ")"),
21
+ dark: "var(--ds-background-boldDanger-resting, ".concat(_colors.R400, ")")
24
22
  },
25
23
  primary: {
26
- light: (0, _tokens.token)('color.background.boldBrand.resting', _colors.B400),
27
- dark: (0, _tokens.token)('color.background.boldBrand.resting', _colors.B100)
24
+ light: "var(--ds-background-boldBrand-resting, ".concat(_colors.B400, ")"),
25
+ dark: "var(--ds-background-boldBrand-resting, ".concat(_colors.B100, ")")
28
26
  },
29
27
  primaryInverted: {
30
- light: (0, _tokens.token)('color.background.default', _colors.N0),
31
- dark: (0, _tokens.token)('color.background.default', _colors.DN400)
28
+ light: "var(--ds-background-default, ".concat(_colors.N0, ")"),
29
+ dark: "var(--ds-background-default, ".concat(_colors.DN400, ")")
32
30
  },
33
31
  removed: {
34
- light: (0, _tokens.token)('color.background.subtleDanger.resting', _colors.R50),
35
- dark: (0, _tokens.token)('color.background.subtleDanger.resting', _colors.R50)
32
+ light: "var(--ds-background-subtleDanger-resting, ".concat(_colors.R50, ")"),
33
+ dark: "var(--ds-background-subtleDanger-resting, ".concat(_colors.R50, ")")
36
34
  }
37
35
  };
38
36
  exports.backgroundColors = backgroundColors;
39
37
  var textColors = {
40
38
  added: {
41
- light: (0, _tokens.token)('color.text.success', _colors.G500),
42
- dark: (0, _tokens.token)('color.text.success', _colors.G500)
39
+ light: "var(--ds-text-success, ".concat(_colors.G500, ")"),
40
+ dark: "var(--ds-text-success, ".concat(_colors.G500, ")")
43
41
  },
44
42
  default: {
45
- light: (0, _tokens.token)('color.text.highEmphasis', _colors.N800),
46
- dark: (0, _tokens.token)('color.text.highEmphasis', _colors.DN900)
43
+ light: "var(--ds-text-highEmphasis, ".concat(_colors.N800, ")"),
44
+ dark: "var(--ds-text-highEmphasis, ".concat(_colors.DN900, ")")
47
45
  },
48
46
  important: {
49
- light: (0, _tokens.token)('color.text.onBold', _colors.N0),
50
- dark: (0, _tokens.token)('color.text.onBold', _colors.N0)
47
+ light: "var(--ds-text-onBold, ".concat(_colors.N0, ")"),
48
+ dark: "var(--ds-text-onBold, ".concat(_colors.N0, ")")
51
49
  },
52
50
  primary: {
53
- light: (0, _tokens.token)('color.text.onBold', _colors.N0),
54
- dark: (0, _tokens.token)('color.text.onBold', _colors.DN0)
51
+ light: "var(--ds-text-onBold, ".concat(_colors.N0, ")"),
52
+ dark: "var(--ds-text-onBold, ".concat(_colors.DN0, ")")
55
53
  },
56
54
  primaryInverted: {
57
- light: (0, _tokens.token)('color.text.brand', _colors.B500),
58
- dark: (0, _tokens.token)('color.text.brand', _colors.DN0)
55
+ light: "var(--ds-text-brand, ".concat(_colors.B500, ")"),
56
+ dark: "var(--ds-text-brand, ".concat(_colors.DN0, ")")
59
57
  },
60
58
  removed: {
61
- light: (0, _tokens.token)('color.text.danger', _colors.R500),
62
- dark: (0, _tokens.token)('color.text.danger', _colors.R500)
59
+ light: "var(--ds-text-danger, ".concat(_colors.R500, ")"),
60
+ dark: "var(--ds-text-danger, ".concat(_colors.R500, ")")
63
61
  }
64
62
  };
65
63
  exports.textColors = textColors;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/badge",
3
- "version": "15.0.2",
3
+ "version": "15.0.6",
4
4
  "sideEffects": false
5
5
  }
@@ -1,54 +1,53 @@
1
1
  import { B100, B400, B500, DN0, DN400, DN70, DN900, G50, G500, N0, N40, N800, R400, R50, R500 } from '@atlaskit/theme/colors';
2
- import { token } from '@atlaskit/tokens';
3
2
  export const backgroundColors = {
4
3
  added: {
5
- light: token('color.background.subtleSuccess.resting', G50),
6
- dark: token('color.background.subtleSuccess.resting', G50)
4
+ light: `var(--ds-background-subtleSuccess-resting, ${G50})`,
5
+ dark: `var(--ds-background-subtleSuccess-resting, ${G50})`
7
6
  },
8
7
  default: {
9
- light: token('color.background.subtleNeutral.resting', N40),
10
- dark: token('color.background.subtleNeutral.resting', DN70)
8
+ light: `var(--ds-background-subtleNeutral-resting, ${N40})`,
9
+ dark: `var(--ds-background-subtleNeutral-resting, ${DN70})`
11
10
  },
12
11
  important: {
13
- light: token('color.background.boldDanger.resting', R400),
14
- dark: token('color.background.boldDanger.resting', R400)
12
+ light: `var(--ds-background-boldDanger-resting, ${R400})`,
13
+ dark: `var(--ds-background-boldDanger-resting, ${R400})`
15
14
  },
16
15
  primary: {
17
- light: token('color.background.boldBrand.resting', B400),
18
- dark: token('color.background.boldBrand.resting', B100)
16
+ light: `var(--ds-background-boldBrand-resting, ${B400})`,
17
+ dark: `var(--ds-background-boldBrand-resting, ${B100})`
19
18
  },
20
19
  primaryInverted: {
21
- light: token('color.background.default', N0),
22
- dark: token('color.background.default', DN400)
20
+ light: `var(--ds-background-default, ${N0})`,
21
+ dark: `var(--ds-background-default, ${DN400})`
23
22
  },
24
23
  removed: {
25
- light: token('color.background.subtleDanger.resting', R50),
26
- dark: token('color.background.subtleDanger.resting', R50)
24
+ light: `var(--ds-background-subtleDanger-resting, ${R50})`,
25
+ dark: `var(--ds-background-subtleDanger-resting, ${R50})`
27
26
  }
28
27
  };
29
28
  export const textColors = {
30
29
  added: {
31
- light: token('color.text.success', G500),
32
- dark: token('color.text.success', G500)
30
+ light: `var(--ds-text-success, ${G500})`,
31
+ dark: `var(--ds-text-success, ${G500})`
33
32
  },
34
33
  default: {
35
- light: token('color.text.highEmphasis', N800),
36
- dark: token('color.text.highEmphasis', DN900)
34
+ light: `var(--ds-text-highEmphasis, ${N800})`,
35
+ dark: `var(--ds-text-highEmphasis, ${DN900})`
37
36
  },
38
37
  important: {
39
- light: token('color.text.onBold', N0),
40
- dark: token('color.text.onBold', N0)
38
+ light: `var(--ds-text-onBold, ${N0})`,
39
+ dark: `var(--ds-text-onBold, ${N0})`
41
40
  },
42
41
  primary: {
43
- light: token('color.text.onBold', N0),
44
- dark: token('color.text.onBold', DN0)
42
+ light: `var(--ds-text-onBold, ${N0})`,
43
+ dark: `var(--ds-text-onBold, ${DN0})`
45
44
  },
46
45
  primaryInverted: {
47
- light: token('color.text.brand', B500),
48
- dark: token('color.text.brand', DN0)
46
+ light: `var(--ds-text-brand, ${B500})`,
47
+ dark: `var(--ds-text-brand, ${DN0})`
49
48
  },
50
49
  removed: {
51
- light: token('color.text.danger', R500),
52
- dark: token('color.text.danger', R500)
50
+ light: `var(--ds-text-danger, ${R500})`,
51
+ dark: `var(--ds-text-danger, ${R500})`
53
52
  }
54
53
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/badge",
3
- "version": "15.0.2",
3
+ "version": "15.0.6",
4
4
  "sideEffects": false
5
5
  }
@@ -1,54 +1,53 @@
1
1
  import { B100, B400, B500, DN0, DN400, DN70, DN900, G50, G500, N0, N40, N800, R400, R50, R500 } from '@atlaskit/theme/colors';
2
- import { token } from '@atlaskit/tokens';
3
2
  export var backgroundColors = {
4
3
  added: {
5
- light: token('color.background.subtleSuccess.resting', G50),
6
- dark: token('color.background.subtleSuccess.resting', G50)
4
+ light: "var(--ds-background-subtleSuccess-resting, ".concat(G50, ")"),
5
+ dark: "var(--ds-background-subtleSuccess-resting, ".concat(G50, ")")
7
6
  },
8
7
  default: {
9
- light: token('color.background.subtleNeutral.resting', N40),
10
- dark: token('color.background.subtleNeutral.resting', DN70)
8
+ light: "var(--ds-background-subtleNeutral-resting, ".concat(N40, ")"),
9
+ dark: "var(--ds-background-subtleNeutral-resting, ".concat(DN70, ")")
11
10
  },
12
11
  important: {
13
- light: token('color.background.boldDanger.resting', R400),
14
- dark: token('color.background.boldDanger.resting', R400)
12
+ light: "var(--ds-background-boldDanger-resting, ".concat(R400, ")"),
13
+ dark: "var(--ds-background-boldDanger-resting, ".concat(R400, ")")
15
14
  },
16
15
  primary: {
17
- light: token('color.background.boldBrand.resting', B400),
18
- dark: token('color.background.boldBrand.resting', B100)
16
+ light: "var(--ds-background-boldBrand-resting, ".concat(B400, ")"),
17
+ dark: "var(--ds-background-boldBrand-resting, ".concat(B100, ")")
19
18
  },
20
19
  primaryInverted: {
21
- light: token('color.background.default', N0),
22
- dark: token('color.background.default', DN400)
20
+ light: "var(--ds-background-default, ".concat(N0, ")"),
21
+ dark: "var(--ds-background-default, ".concat(DN400, ")")
23
22
  },
24
23
  removed: {
25
- light: token('color.background.subtleDanger.resting', R50),
26
- dark: token('color.background.subtleDanger.resting', R50)
24
+ light: "var(--ds-background-subtleDanger-resting, ".concat(R50, ")"),
25
+ dark: "var(--ds-background-subtleDanger-resting, ".concat(R50, ")")
27
26
  }
28
27
  };
29
28
  export var textColors = {
30
29
  added: {
31
- light: token('color.text.success', G500),
32
- dark: token('color.text.success', G500)
30
+ light: "var(--ds-text-success, ".concat(G500, ")"),
31
+ dark: "var(--ds-text-success, ".concat(G500, ")")
33
32
  },
34
33
  default: {
35
- light: token('color.text.highEmphasis', N800),
36
- dark: token('color.text.highEmphasis', DN900)
34
+ light: "var(--ds-text-highEmphasis, ".concat(N800, ")"),
35
+ dark: "var(--ds-text-highEmphasis, ".concat(DN900, ")")
37
36
  },
38
37
  important: {
39
- light: token('color.text.onBold', N0),
40
- dark: token('color.text.onBold', N0)
38
+ light: "var(--ds-text-onBold, ".concat(N0, ")"),
39
+ dark: "var(--ds-text-onBold, ".concat(N0, ")")
41
40
  },
42
41
  primary: {
43
- light: token('color.text.onBold', N0),
44
- dark: token('color.text.onBold', DN0)
42
+ light: "var(--ds-text-onBold, ".concat(N0, ")"),
43
+ dark: "var(--ds-text-onBold, ".concat(DN0, ")")
45
44
  },
46
45
  primaryInverted: {
47
- light: token('color.text.brand', B500),
48
- dark: token('color.text.brand', DN0)
46
+ light: "var(--ds-text-brand, ".concat(B500, ")"),
47
+ dark: "var(--ds-text-brand, ".concat(DN0, ")")
49
48
  },
50
49
  removed: {
51
- light: token('color.text.danger', R500),
52
- dark: token('color.text.danger', R500)
50
+ light: "var(--ds-text-danger, ".concat(R500, ")"),
51
+ dark: "var(--ds-text-danger, ".concat(R500, ")")
53
52
  }
54
53
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/badge",
3
- "version": "15.0.2",
3
+ "version": "15.0.6",
4
4
  "sideEffects": false
5
5
  }
@@ -1,52 +1,52 @@
1
1
  export declare const backgroundColors: {
2
2
  added: {
3
- light: "var(--background-subtleSuccess-resting)";
4
- dark: "var(--background-subtleSuccess-resting)";
3
+ light: "var(--ds-background-subtleSuccess-resting)";
4
+ dark: "var(--ds-background-subtleSuccess-resting)";
5
5
  };
6
6
  default: {
7
- light: "var(--background-subtleNeutral-resting)";
8
- dark: "var(--background-subtleNeutral-resting)";
7
+ light: "var(--ds-background-subtleNeutral-resting)";
8
+ dark: "var(--ds-background-subtleNeutral-resting)";
9
9
  };
10
10
  important: {
11
- light: "var(--background-boldDanger-resting)";
12
- dark: "var(--background-boldDanger-resting)";
11
+ light: "var(--ds-background-boldDanger-resting)";
12
+ dark: "var(--ds-background-boldDanger-resting)";
13
13
  };
14
14
  primary: {
15
- light: "var(--background-boldBrand-resting)";
16
- dark: "var(--background-boldBrand-resting)";
15
+ light: "var(--ds-background-boldBrand-resting)";
16
+ dark: "var(--ds-background-boldBrand-resting)";
17
17
  };
18
18
  primaryInverted: {
19
- light: "var(--background-default)";
20
- dark: "var(--background-default)";
19
+ light: "var(--ds-background-default)";
20
+ dark: "var(--ds-background-default)";
21
21
  };
22
22
  removed: {
23
- light: "var(--background-subtleDanger-resting)";
24
- dark: "var(--background-subtleDanger-resting)";
23
+ light: "var(--ds-background-subtleDanger-resting)";
24
+ dark: "var(--ds-background-subtleDanger-resting)";
25
25
  };
26
26
  };
27
27
  export declare const textColors: {
28
28
  added: {
29
- light: "var(--text-success)";
30
- dark: "var(--text-success)";
29
+ light: "var(--ds-text-success)";
30
+ dark: "var(--ds-text-success)";
31
31
  };
32
32
  default: {
33
- light: "var(--text-highEmphasis)";
34
- dark: "var(--text-highEmphasis)";
33
+ light: "var(--ds-text-highEmphasis)";
34
+ dark: "var(--ds-text-highEmphasis)";
35
35
  };
36
36
  important: {
37
- light: "var(--text-onBold)";
38
- dark: "var(--text-onBold)";
37
+ light: "var(--ds-text-onBold)";
38
+ dark: "var(--ds-text-onBold)";
39
39
  };
40
40
  primary: {
41
- light: "var(--text-onBold)";
42
- dark: "var(--text-onBold)";
41
+ light: "var(--ds-text-onBold)";
42
+ dark: "var(--ds-text-onBold)";
43
43
  };
44
44
  primaryInverted: {
45
- light: "var(--text-brand)";
46
- dark: "var(--text-brand)";
45
+ light: "var(--ds-text-brand)";
46
+ dark: "var(--ds-text-brand)";
47
47
  };
48
48
  removed: {
49
- light: "var(--text-danger)";
50
- dark: "var(--text-danger)";
49
+ light: "var(--ds-text-danger)";
50
+ dark: "var(--ds-text-danger)";
51
51
  };
52
52
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/badge",
3
- "version": "15.0.2",
3
+ "version": "15.0.6",
4
4
  "description": "A badge is a visual indicator for numeric values such as tallies and scores.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -27,9 +27,9 @@
27
27
  ".": "./src/index.tsx"
28
28
  },
29
29
  "dependencies": {
30
- "@atlaskit/codemod-utils": "^3.2.0",
31
- "@atlaskit/theme": "^11.4.0",
32
- "@atlaskit/tokens": "^0.1.0",
30
+ "@atlaskit/codemod-utils": "^3.4.0",
31
+ "@atlaskit/theme": "^12.0.0",
32
+ "@atlaskit/tokens": "^0.4.0",
33
33
  "@babel/runtime": "^7.0.0",
34
34
  "@emotion/core": "^10.0.9"
35
35
  },
@@ -59,7 +59,10 @@
59
59
  },
60
60
  "@repo/internal": {
61
61
  "design-system": "v1",
62
- "styling": "emotion",
62
+ "styling": [
63
+ "static",
64
+ "emotion"
65
+ ],
63
66
  "ui-components": "lite-mode",
64
67
  "analytics": "analytics-next",
65
68
  "theming": "tokens",