@atlaskit/editor-palette 1.5.1 → 1.5.2

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,46 +1,52 @@
1
1
  # @atlaskit/editor-palette
2
2
 
3
+ ## 1.5.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#42995](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42995) [`a527682dee6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a527682dee6) - add in missing dependencies for imported types
8
+
3
9
  ## 1.5.1
4
10
 
5
11
  ### Patch Changes
6
12
 
7
- - [`c5a5b4ec141`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c5a5b4ec141) - Reverted back the changes done as part of UTEST-643
13
+ - [#35804](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/35804) [`c5a5b4ec141`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c5a5b4ec141) - Reverted back the changes done as part of UTEST-643
8
14
 
9
15
  ## 1.5.0
10
16
 
11
17
  ### Minor Changes
12
18
 
13
- - [`f22911fb9be`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f22911fb9be) - ENGHEALTH-2667: Adjust table cell color logic to enable static analysis of token usages and follow eslint rules
19
+ - [#34036](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/34036) [`f22911fb9be`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f22911fb9be) - ENGHEALTH-2667: Adjust table cell color logic to enable static analysis of token usages and follow eslint rules
14
20
 
15
21
  ## 1.4.3
16
22
 
17
23
  ### Patch Changes
18
24
 
19
- - [`1add49b7bf7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1add49b7bf7) - Updated the babel config file extension to .cts to enable Parcel to support ts/tsx file extensions by default through parcel.
25
+ - [#35057](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/35057) [`1add49b7bf7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1add49b7bf7) - Updated the babel config file extension to .cts to enable Parcel to support ts/tsx file extensions by default through parcel.
20
26
 
21
27
  ## 1.4.2
22
28
 
23
29
  ### Patch Changes
24
30
 
25
- - [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
31
+ - [#33793](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33793) [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
26
32
 
27
33
  ## 1.4.1
28
34
 
29
35
  ### Patch Changes
30
36
 
31
- - [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
37
+ - [#33649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33649) [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
32
38
 
33
39
  ## 1.4.0
34
40
 
35
41
  ### Minor Changes
36
42
 
37
- - [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
43
+ - [#33258](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33258) [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
38
44
 
39
45
  ## 1.3.0
40
46
 
41
47
  ### Minor Changes
42
48
 
43
- - [`c2385dcb8f7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c2385dcb8f7) - [ux] ED-17043 Expanded table chart colors from 20 to 36 colors.
49
+ - [#32424](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32424) [`c2385dcb8f7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c2385dcb8f7) - [ux] ED-17043 Expanded table chart colors from 20 to 36 colors.
44
50
 
45
51
  ### Patch Changes
46
52
 
@@ -50,17 +56,17 @@
50
56
 
51
57
  ### Minor Changes
52
58
 
53
- - [`bf04c417bfd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bf04c417bfd) - Add "border" mark to stage0 ADF schema
59
+ - [#31891](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31891) [`bf04c417bfd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bf04c417bfd) - Add "border" mark to stage0 ADF schema
54
60
 
55
61
  ## 1.1.0
56
62
 
57
63
  ### Minor Changes
58
64
 
59
- - [`47934727661`](https://bitbucket.org/atlassian/atlassian-frontend/commits/47934727661) - ED-17042 - Add map hex colors to DST chart tokens
65
+ - [#31299](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31299) [`47934727661`](https://bitbucket.org/atlassian/atlassian-frontend/commits/47934727661) - ED-17042 - Add map hex colors to DST chart tokens
60
66
  - [`2367ba14aa0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2367ba14aa0) - [ux] ED-16758 Added support for theme tokens in table cell background color.
61
67
 
62
68
  ## 1.0.0
63
69
 
64
70
  ### Major Changes
65
71
 
66
- - [`0ea58bc9901`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0ea58bc9901) - Remove undocumented palette object entrypoints
72
+ - [#28932](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/28932) [`0ea58bc9901`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0ea58bc9901) - Remove undocumented palette object entrypoints
package/README.md CHANGED
@@ -55,3 +55,21 @@ The exact output of this function is an implementation detail and should only be
55
55
  content to the user, on a client with a matching major version of `@atlaskit/tokens`.
56
56
  - **DO NOT**: store the output of these functions in any user-generated content or back-end.
57
57
  - **DO**: store the ADF hex color, and use these utilities at render time to display the themed version of the color
58
+
59
+ #### hexToEditorBorderPaletteColor
60
+
61
+ This takes an adf hex color and returns a matching border palette color.
62
+
63
+ ```ts
64
+ import { hexToEditorBorderPaletteColor } from '@atlaskit/editor-palette';
65
+
66
+ const cssValue = hexToEditorBorderPaletteColor('#091E4224');
67
+ // ^? const cssValue: 'var(--ds-border, #091E4224)'
68
+ <span style={{borderColor: cssValue}} />
69
+ ```
70
+
71
+ The names of tokens can change over time, and the values of tokens will differ between themes.
72
+ The exact output of this function is an implementation detail and should only be used when rendering
73
+ content to the user, on a client with a matching major version of `@atlaskit/tokens`.
74
+ - **DO NOT**: store the output of these functions in any user-generated content or back-end.
75
+ - **DO**: store the ADF hex color, and use these utilities at render time to display the themed version of the color
@@ -10,7 +10,6 @@ exports.hexToEditorBackgroundPaletteRawValue = hexToEditorBackgroundPaletteRawVa
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
11
  var _tokens = require("@atlaskit/tokens");
12
12
  var _editorBackgroundPale; // This import will be stripped on build
13
- // eslint-disable-next-line import/no-extraneous-dependencies
14
13
  /**
15
14
  * This takes an adf hex color and returns a matching background palette
16
15
  * color.
@@ -66,7 +65,7 @@ function hexToEditorBackgroundPaletteRawValue(hexColor) {
66
65
  * Using object structure as getValue() function needed for table values, and other
67
66
  * properties may be needed in the future.
68
67
  */
69
- var editorBackgroundPalette = (_editorBackgroundPale = {}, (0, _defineProperty2.default)(_editorBackgroundPale, '#DEEBFF', {
68
+ var editorBackgroundPalette = exports.editorBackgroundPalette = (_editorBackgroundPale = {}, (0, _defineProperty2.default)(_editorBackgroundPale, '#DEEBFF', {
70
69
  getValue: function getValue(fallback) {
71
70
  return (0, _tokens.getTokenValue)('color.background.accent.blue.subtlest', fallback);
72
71
  },
@@ -171,5 +170,4 @@ var editorBackgroundPalette = (_editorBackgroundPale = {}, (0, _defineProperty2.
171
170
  return (0, _tokens.getTokenValue)('color.background.accent.gray.subtle', fallback);
172
171
  },
173
172
  token: "var(--ds-background-accent-gray-subtle, #B3BAC5)" // source for hex code was legacy token N60,
174
- }), _editorBackgroundPale);
175
- exports.editorBackgroundPalette = editorBackgroundPalette;
173
+ }), _editorBackgroundPale);
@@ -9,7 +9,6 @@ exports.hexToEditorBorderPaletteColor = hexToEditorBorderPaletteColor;
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _editorBorderPalette;
11
11
  // This import will be stripped on build
12
- // eslint-disable-next-line import/no-extraneous-dependencies
13
12
 
14
13
  /**
15
14
  * This takes an adf hex color and returns a matching border palette color.
@@ -35,5 +34,4 @@ function hexToEditorBorderPaletteColor(hexColor) {
35
34
  // @ts-ignore
36
35
  return editorBorderPalette[hexColor.toUpperCase()];
37
36
  }
38
- var editorBorderPalette = (_editorBorderPalette = {}, (0, _defineProperty2.default)(_editorBorderPalette, '#091E4224', "var(--ds-border, #091E4224)"), (0, _defineProperty2.default)(_editorBorderPalette, '#758195', "var(--ds-border-bold, #758195)"), (0, _defineProperty2.default)(_editorBorderPalette, '#172B4D', "var(--ds-text, #172B4D)"), _editorBorderPalette);
39
- exports.editorBorderPalette = editorBorderPalette;
37
+ var editorBorderPalette = exports.editorBorderPalette = (_editorBorderPalette = {}, (0, _defineProperty2.default)(_editorBorderPalette, '#091E4224', "var(--ds-border, #091E4224)"), (0, _defineProperty2.default)(_editorBorderPalette, '#758195', "var(--ds-border-bold, #758195)"), (0, _defineProperty2.default)(_editorBorderPalette, '#172B4D', "var(--ds-text, #172B4D)"), _editorBorderPalette);
@@ -9,7 +9,6 @@ exports.hexToEditorTableChartsPaletteRawValue = hexToEditorTableChartsPaletteRaw
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _tokens = require("@atlaskit/tokens");
11
11
  var _editorTableChartsPal; // This import will be stripped on build
12
- // eslint-disable-next-line import/no-extraneous-dependencies
13
12
  /**
14
13
  * This takes an adf hex color and returns a matching chart palette
15
14
  * color.
package/dist/cjs/text.js CHANGED
@@ -9,7 +9,6 @@ exports.hexToEditorTextPaletteColor = hexToEditorTextPaletteColor;
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _editorTextPalette;
11
11
  // This import will be stripped on build
12
- // eslint-disable-next-line import/no-extraneous-dependencies
13
12
 
14
13
  /**
15
14
  * This takes an adf hex color and returns a matching text palette color.
@@ -38,5 +37,4 @@ function hexToEditorTextPaletteColor(hexColor) {
38
37
  // Colors taken from
39
38
  // https://hello.atlassian.net/wiki/spaces/DST/pages/1790979421/DSTRFC-002+-+Shifting+Editor+s+color+palette+to+design+tokens
40
39
  // values are asserted to improve generated type declarations
41
- var editorTextPalette = (_editorTextPalette = {}, (0, _defineProperty2.default)(_editorTextPalette, '#B3D4FF', "var(--ds-background-accent-blue-subtler, #B3D4FF)"), (0, _defineProperty2.default)(_editorTextPalette, '#4C9AFF', "var(--ds-icon-accent-blue, #4C9AFF)"), (0, _defineProperty2.default)(_editorTextPalette, '#0747A6', "var(--ds-text-accent-blue, #0747A6)"), (0, _defineProperty2.default)(_editorTextPalette, '#B3F5FF', "var(--ds-background-accent-teal-subtler, #B3F5FF)"), (0, _defineProperty2.default)(_editorTextPalette, '#00B8D9', "var(--ds-icon-accent-teal, #00B8D9)"), (0, _defineProperty2.default)(_editorTextPalette, '#008DA6', "var(--ds-text-accent-teal, #008DA6)"), (0, _defineProperty2.default)(_editorTextPalette, '#ABF5D1', "var(--ds-background-accent-green-subtler, #ABF5D1)"), (0, _defineProperty2.default)(_editorTextPalette, '#36B37E', "var(--ds-icon-accent-green, #36B37E)"), (0, _defineProperty2.default)(_editorTextPalette, '#006644', "var(--ds-text-accent-green, #006644)"), (0, _defineProperty2.default)(_editorTextPalette, '#FFF0B3', "var(--ds-background-accent-yellow-subtler, #FFF0B3)"), (0, _defineProperty2.default)(_editorTextPalette, '#FFC400', "var(--ds-background-accent-orange-subtle, #FFC400)"), (0, _defineProperty2.default)(_editorTextPalette, '#FF991F', "var(--ds-icon-accent-orange, #FF991F)"), (0, _defineProperty2.default)(_editorTextPalette, '#FFBDAD', "var(--ds-background-accent-red-subtler, #FFBDAD)"), (0, _defineProperty2.default)(_editorTextPalette, '#FF5630', "var(--ds-icon-accent-red, #FF5630)"), (0, _defineProperty2.default)(_editorTextPalette, '#BF2600', "var(--ds-text-accent-red, #BF2600)"), (0, _defineProperty2.default)(_editorTextPalette, '#EAE6FF', "var(--ds-background-accent-purple-subtler, #EAE6FF)"), (0, _defineProperty2.default)(_editorTextPalette, '#6554C0', "var(--ds-icon-accent-purple, #6554C0)"), (0, _defineProperty2.default)(_editorTextPalette, '#403294', "var(--ds-text-accent-purple, #403294)"), (0, _defineProperty2.default)(_editorTextPalette, '#FFFFFF', "var(--ds-text-inverse, #FFFFFF)"), (0, _defineProperty2.default)(_editorTextPalette, '#97A0AF', "var(--ds-icon-accent-gray, #97A0AF)"), (0, _defineProperty2.default)(_editorTextPalette, '#172B4D', "var(--ds-text, #172B4D)"), _editorTextPalette);
42
- exports.editorTextPalette = editorTextPalette;
40
+ var editorTextPalette = exports.editorTextPalette = (_editorTextPalette = {}, (0, _defineProperty2.default)(_editorTextPalette, '#B3D4FF', "var(--ds-background-accent-blue-subtler, #B3D4FF)"), (0, _defineProperty2.default)(_editorTextPalette, '#4C9AFF', "var(--ds-icon-accent-blue, #4C9AFF)"), (0, _defineProperty2.default)(_editorTextPalette, '#0747A6', "var(--ds-text-accent-blue, #0747A6)"), (0, _defineProperty2.default)(_editorTextPalette, '#B3F5FF', "var(--ds-background-accent-teal-subtler, #B3F5FF)"), (0, _defineProperty2.default)(_editorTextPalette, '#00B8D9', "var(--ds-icon-accent-teal, #00B8D9)"), (0, _defineProperty2.default)(_editorTextPalette, '#008DA6', "var(--ds-text-accent-teal, #008DA6)"), (0, _defineProperty2.default)(_editorTextPalette, '#ABF5D1', "var(--ds-background-accent-green-subtler, #ABF5D1)"), (0, _defineProperty2.default)(_editorTextPalette, '#36B37E', "var(--ds-icon-accent-green, #36B37E)"), (0, _defineProperty2.default)(_editorTextPalette, '#006644', "var(--ds-text-accent-green, #006644)"), (0, _defineProperty2.default)(_editorTextPalette, '#FFF0B3', "var(--ds-background-accent-yellow-subtler, #FFF0B3)"), (0, _defineProperty2.default)(_editorTextPalette, '#FFC400', "var(--ds-background-accent-orange-subtle, #FFC400)"), (0, _defineProperty2.default)(_editorTextPalette, '#FF991F', "var(--ds-icon-accent-orange, #FF991F)"), (0, _defineProperty2.default)(_editorTextPalette, '#FFBDAD', "var(--ds-background-accent-red-subtler, #FFBDAD)"), (0, _defineProperty2.default)(_editorTextPalette, '#FF5630', "var(--ds-icon-accent-red, #FF5630)"), (0, _defineProperty2.default)(_editorTextPalette, '#BF2600', "var(--ds-text-accent-red, #BF2600)"), (0, _defineProperty2.default)(_editorTextPalette, '#EAE6FF', "var(--ds-background-accent-purple-subtler, #EAE6FF)"), (0, _defineProperty2.default)(_editorTextPalette, '#6554C0', "var(--ds-icon-accent-purple, #6554C0)"), (0, _defineProperty2.default)(_editorTextPalette, '#403294', "var(--ds-text-accent-purple, #403294)"), (0, _defineProperty2.default)(_editorTextPalette, '#FFFFFF', "var(--ds-text-inverse, #FFFFFF)"), (0, _defineProperty2.default)(_editorTextPalette, '#97A0AF', "var(--ds-icon-accent-gray, #97A0AF)"), (0, _defineProperty2.default)(_editorTextPalette, '#172B4D', "var(--ds-text, #172B4D)"), _editorTextPalette);
@@ -1,5 +1,4 @@
1
1
  // This import will be stripped on build
2
- // eslint-disable-next-line import/no-extraneous-dependencies
3
2
  import { getTokenValue } from '@atlaskit/tokens';
4
3
 
5
4
  /**
@@ -1,5 +1,4 @@
1
1
  // This import will be stripped on build
2
- // eslint-disable-next-line import/no-extraneous-dependencies
3
2
 
4
3
  /**
5
4
  * This takes an adf hex color and returns a matching border palette color.
@@ -1,5 +1,4 @@
1
1
  // This import will be stripped on build
2
- // eslint-disable-next-line import/no-extraneous-dependencies
3
2
  import { getTokenValue } from '@atlaskit/tokens';
4
3
 
5
4
  /**
@@ -1,5 +1,4 @@
1
1
  // This import will be stripped on build
2
- // eslint-disable-next-line import/no-extraneous-dependencies
3
2
 
4
3
  /**
5
4
  * This takes an adf hex color and returns a matching text palette color.
@@ -1,7 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  var _editorBackgroundPale;
3
3
  // This import will be stripped on build
4
- // eslint-disable-next-line import/no-extraneous-dependencies
5
4
  import { getTokenValue } from '@atlaskit/tokens';
6
5
 
7
6
  /**
@@ -1,7 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  var _editorBorderPalette;
3
3
  // This import will be stripped on build
4
- // eslint-disable-next-line import/no-extraneous-dependencies
5
4
 
6
5
  /**
7
6
  * This takes an adf hex color and returns a matching border palette color.
@@ -1,7 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  var _editorTableChartsPal;
3
3
  // This import will be stripped on build
4
- // eslint-disable-next-line import/no-extraneous-dependencies
5
4
  import { getTokenValue } from '@atlaskit/tokens';
6
5
 
7
6
  /**
package/dist/esm/text.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  var _editorTextPalette;
3
3
  // This import will be stripped on build
4
- // eslint-disable-next-line import/no-extraneous-dependencies
5
4
 
6
5
  /**
7
6
  * This takes an adf hex color and returns a matching text palette color.
package/docs/0-intro.tsx CHANGED
@@ -92,4 +92,18 @@ ${code`
92
92
  <div style={{backgroundColor: cssValue}} />
93
93
  `}
94
94
 
95
+ ### \`hexToEditorBorderPaletteColor\`
96
+
97
+ This takes an adf hex color and returns a matching border palette color.
98
+
99
+ By providing a design token, this enables ADF content to be rendered in new themes such as dark mode.
100
+
101
+ #### Example usage
102
+
103
+ ${code`
104
+ const cssValue = hexToEditorBorderPaletteColor('#091E4224');
105
+ // ^? const cssValue: string
106
+ <div style={{border-color: cssValue}} />
107
+ `}
108
+
95
109
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-palette",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "The editor palette",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -8,7 +8,7 @@
8
8
  "registry": "https://registry.npmjs.org/"
9
9
  },
10
10
  "atlassian": {
11
- "team": "Editor",
11
+ "team": "Editor: Lego",
12
12
  "releaseModel": "continuous",
13
13
  "inPublicMirror": true,
14
14
  "website": {
@@ -34,13 +34,10 @@
34
34
  ".": "./src/index.ts"
35
35
  },
36
36
  "dependencies": {
37
- "@atlaskit/tokens": "^1.9.0",
37
+ "@atlaskit/tokens": "^1.28.0",
38
38
  "@babel/runtime": "^7.0.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@atlaskit/docs": "*",
42
- "@atlaskit/section-message": "^6.4.0",
43
- "@atlaskit/tokens": "^1.9.0",
44
41
  "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
45
42
  "@testing-library/react": "^12.1.5",
46
43
  "react": "^16.8.0",
@@ -1,5 +0,0 @@
1
- {
2
- "name": "@atlaskit/editor-palette",
3
- "version": "1.5.1",
4
- "sideEffects": false
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "name": "@atlaskit/editor-palette",
3
- "version": "1.5.1",
4
- "sideEffects": false
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "name": "@atlaskit/editor-palette",
3
- "version": "1.5.1",
4
- "sideEffects": false
5
- }