@atlaskit/editor-palette 2.1.8 → 2.1.9

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,14 @@
1
1
  # @atlaskit/editor-palette
2
2
 
3
+ ## 2.1.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [#185643](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/185643)
8
+ [`5954e6c1fbac5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5954e6c1fbac5) -
9
+ [ux] [ED-28432] Add orange highlight color and reorder color swatches
10
+ - Updated dependencies
11
+
3
12
  ## 2.1.8
4
13
 
5
14
  ### Patch Changes
@@ -7,11 +7,12 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.hexToEditorTextBackgroundPaletteColor = hexToEditorTextBackgroundPaletteColor;
8
8
  exports.textBackgroundColorPalette = void 0;
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
10
11
  // This import will be stripped on build
11
12
 
12
13
  // Color tokens defined on https://hello.atlassian.net/wiki/spaces/EOU/pages/3587733210/Text+highlighting+-+designs#Colour-palette
13
14
  // values are asserted to improve generated type declarations
14
- var textBackgroundColorPalette = exports.textBackgroundColorPalette = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, '#DCDFE4', "var(--ds-background-accent-gray-subtler, #DCDFE4)"), '#C6EDFB', "var(--ds-background-accent-teal-subtler, #C6EDFB)"), '#D3F1A7', "var(--ds-background-accent-lime-subtler, #D3F1A7)"), '#FEDEC8', "var(--ds-background-accent-orange-subtler, #FEDEC8)"), '#FDD0EC', "var(--ds-background-accent-magenta-subtler, #FDD0EC)"), '#DFD8FD', "var(--ds-background-accent-purple-subtler, #DFD8FD)");
15
+ var textBackgroundColorPalette = exports.textBackgroundColorPalette = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, '#DCDFE4', "var(--ds-background-accent-gray-subtler, #DCDFE4)"), '#C6EDFB', "var(--ds-background-accent-teal-subtler, #C6EDFB)"), '#D3F1A7', "var(--ds-background-accent-lime-subtler, #D3F1A7)"), '#F8E6A0', "var(--ds-background-accent-yellow-subtler, #F8E6A0)"), '#FEDEC8', "var(--ds-background-accent-orange-subtler, #FEDEC8)"), '#FDD0EC', "var(--ds-background-accent-magenta-subtler, #FDD0EC)"), '#DFD8FD', "var(--ds-background-accent-purple-subtler, #DFD8FD)");
15
16
  /**
16
17
  * This takes an ADF hex color and returns a matching text background palette color.
17
18
  *
@@ -30,9 +31,11 @@ var textBackgroundColorPalette = exports.textBackgroundColorPalette = (0, _defin
30
31
  * - **DO**: store the ADF hex color, and use these utilities at render time to display the themed version of the color
31
32
  */
32
33
  function hexToEditorTextBackgroundPaletteColor(hexColor) {
33
- // @ts-expect-error Expect type error. Will modify production type
34
- // if experiment proceeds post-results.
35
- textBackgroundColorPalette['#FEDEC8'] = "var(--ds-background-accent-yellow-subtler, #F8E6A0)";
34
+ if (!(0, _expValEquals.expValEquals)('platform_editor_add_orange_highlight_color', 'cohort', 'test')) {
35
+ // @ts-expect-error Expect type error. Will modify production type
36
+ // if experiment proceeds post-results.
37
+ textBackgroundColorPalette['#FEDEC8'] = "var(--ds-background-accent-yellow-subtler, #F8E6A0)";
38
+ }
36
39
 
37
40
  // Ts ignore was used to allow use of conditional return type
38
41
  // (preferring better type on consumption over safety in implementation)
@@ -1,3 +1,4 @@
1
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
1
2
  // This import will be stripped on build
2
3
 
3
4
  // Color tokens defined on https://hello.atlassian.net/wiki/spaces/EOU/pages/3587733210/Text+highlighting+-+designs#Colour-palette
@@ -9,6 +10,8 @@ export const textBackgroundColorPalette = {
9
10
  ['#C6EDFB']: "var(--ds-background-accent-teal-subtler, #C6EDFB)",
10
11
  /** Lime - light */
11
12
  ['#D3F1A7']: "var(--ds-background-accent-lime-subtler, #D3F1A7)",
13
+ /** Yellow - light */
14
+ ['#F8E6A0']: "var(--ds-background-accent-yellow-subtler, #F8E6A0)",
12
15
  /** Orange - light */
13
16
  ['#FEDEC8']: "var(--ds-background-accent-orange-subtler, #FEDEC8)",
14
17
  /** Magenta - light */
@@ -34,9 +37,11 @@ export const textBackgroundColorPalette = {
34
37
  * - **DO**: store the ADF hex color, and use these utilities at render time to display the themed version of the color
35
38
  */
36
39
  export function hexToEditorTextBackgroundPaletteColor(hexColor) {
37
- // @ts-expect-error Expect type error. Will modify production type
38
- // if experiment proceeds post-results.
39
- textBackgroundColorPalette['#FEDEC8'] = "var(--ds-background-accent-yellow-subtler, #F8E6A0)";
40
+ if (!expValEquals('platform_editor_add_orange_highlight_color', 'cohort', 'test')) {
41
+ // @ts-expect-error Expect type error. Will modify production type
42
+ // if experiment proceeds post-results.
43
+ textBackgroundColorPalette['#FEDEC8'] = "var(--ds-background-accent-yellow-subtler, #F8E6A0)";
44
+ }
40
45
 
41
46
  // Ts ignore was used to allow use of conditional return type
42
47
  // (preferring better type on consumption over safety in implementation)
@@ -1,9 +1,10 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
2
3
  // This import will be stripped on build
3
4
 
4
5
  // Color tokens defined on https://hello.atlassian.net/wiki/spaces/EOU/pages/3587733210/Text+highlighting+-+designs#Colour-palette
5
6
  // values are asserted to improve generated type declarations
6
- export var textBackgroundColorPalette = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, '#DCDFE4', "var(--ds-background-accent-gray-subtler, #DCDFE4)"), '#C6EDFB', "var(--ds-background-accent-teal-subtler, #C6EDFB)"), '#D3F1A7', "var(--ds-background-accent-lime-subtler, #D3F1A7)"), '#FEDEC8', "var(--ds-background-accent-orange-subtler, #FEDEC8)"), '#FDD0EC', "var(--ds-background-accent-magenta-subtler, #FDD0EC)"), '#DFD8FD', "var(--ds-background-accent-purple-subtler, #DFD8FD)");
7
+ export var textBackgroundColorPalette = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, '#DCDFE4', "var(--ds-background-accent-gray-subtler, #DCDFE4)"), '#C6EDFB', "var(--ds-background-accent-teal-subtler, #C6EDFB)"), '#D3F1A7', "var(--ds-background-accent-lime-subtler, #D3F1A7)"), '#F8E6A0', "var(--ds-background-accent-yellow-subtler, #F8E6A0)"), '#FEDEC8', "var(--ds-background-accent-orange-subtler, #FEDEC8)"), '#FDD0EC', "var(--ds-background-accent-magenta-subtler, #FDD0EC)"), '#DFD8FD', "var(--ds-background-accent-purple-subtler, #DFD8FD)");
7
8
  /**
8
9
  * This takes an ADF hex color and returns a matching text background palette color.
9
10
  *
@@ -22,9 +23,11 @@ export var textBackgroundColorPalette = _defineProperty(_defineProperty(_defineP
22
23
  * - **DO**: store the ADF hex color, and use these utilities at render time to display the themed version of the color
23
24
  */
24
25
  export function hexToEditorTextBackgroundPaletteColor(hexColor) {
25
- // @ts-expect-error Expect type error. Will modify production type
26
- // if experiment proceeds post-results.
27
- textBackgroundColorPalette['#FEDEC8'] = "var(--ds-background-accent-yellow-subtler, #F8E6A0)";
26
+ if (!expValEquals('platform_editor_add_orange_highlight_color', 'cohort', 'test')) {
27
+ // @ts-expect-error Expect type error. Will modify production type
28
+ // if experiment proceeds post-results.
29
+ textBackgroundColorPalette['#FEDEC8'] = "var(--ds-background-accent-yellow-subtler, #F8E6A0)";
30
+ }
28
31
 
29
32
  // Ts ignore was used to allow use of conditional return type
30
33
  // (preferring better type on consumption over safety in implementation)
@@ -5,6 +5,8 @@ export declare const textBackgroundColorPalette: {
5
5
  "#C6EDFB": "var(--ds-background-accent-teal-subtler, #C6EDFB)";
6
6
  /** Lime - light */
7
7
  "#D3F1A7": "var(--ds-background-accent-lime-subtler, #D3F1A7)";
8
+ /** Yellow - light */
9
+ "#F8E6A0": "var(--ds-background-accent-yellow-subtler, #F8E6A0)";
8
10
  /** Orange - light */
9
11
  "#FEDEC8": "var(--ds-background-accent-orange-subtler, #FEDEC8)";
10
12
  /** Magenta - light */
@@ -5,6 +5,8 @@ export declare const textBackgroundColorPalette: {
5
5
  "#C6EDFB": "var(--ds-background-accent-teal-subtler, #C6EDFB)";
6
6
  /** Lime - light */
7
7
  "#D3F1A7": "var(--ds-background-accent-lime-subtler, #D3F1A7)";
8
+ /** Yellow - light */
9
+ "#F8E6A0": "var(--ds-background-accent-yellow-subtler, #F8E6A0)";
8
10
  /** Orange - light */
9
11
  "#FEDEC8": "var(--ds-background-accent-orange-subtler, #FEDEC8)";
10
12
  /** Magenta - light */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-palette",
3
- "version": "2.1.8",
3
+ "version": "2.1.9",
4
4
  "description": "The editor palette",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,8 +32,8 @@
32
32
  ".": "./src/index.ts"
33
33
  },
34
34
  "dependencies": {
35
- "@atlaskit/tmp-editor-statsig": "^9.3.0",
36
- "@atlaskit/tokens": "^5.4.0",
35
+ "@atlaskit/tmp-editor-statsig": "^9.6.0",
36
+ "@atlaskit/tokens": "^5.5.0",
37
37
  "@babel/runtime": "^7.0.0"
38
38
  },
39
39
  "devDependencies": {