@atlaskit/editor-palette 2.1.26 → 3.0.0

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 (34) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/background/package.json +8 -0
  3. package/border/package.json +8 -0
  4. package/dist/cjs/entry-points/background.js +18 -0
  5. package/dist/cjs/entry-points/border.js +12 -0
  6. package/dist/cjs/entry-points/table-charts.js +18 -0
  7. package/dist/cjs/entry-points/text-background-color.js +12 -0
  8. package/dist/cjs/entry-points/text.js +12 -0
  9. package/dist/es2019/entry-points/background.js +2 -0
  10. package/dist/es2019/entry-points/border.js +2 -0
  11. package/dist/es2019/entry-points/table-charts.js +2 -0
  12. package/dist/es2019/entry-points/text-background-color.js +2 -0
  13. package/dist/es2019/entry-points/text.js +2 -0
  14. package/dist/esm/entry-points/background.js +2 -0
  15. package/dist/esm/entry-points/border.js +2 -0
  16. package/dist/esm/entry-points/table-charts.js +2 -0
  17. package/dist/esm/entry-points/text-background-color.js +2 -0
  18. package/dist/esm/entry-points/text.js +2 -0
  19. package/dist/types/entry-points/background.d.ts +1 -0
  20. package/dist/types/entry-points/border.d.ts +1 -0
  21. package/dist/types/entry-points/table-charts.d.ts +1 -0
  22. package/dist/types/entry-points/text-background-color.d.ts +1 -0
  23. package/dist/types/entry-points/text.d.ts +1 -0
  24. package/docs/0-intro.tsx +5 -5
  25. package/package.json +4 -10
  26. package/table-charts/package.json +8 -0
  27. package/text/package.json +8 -0
  28. package/text-background-color/package.json +8 -0
  29. package/dist/types-ts4.5/background.d.ts +0 -149
  30. package/dist/types-ts4.5/border.d.ts +0 -29
  31. package/dist/types-ts4.5/index.d.ts +0 -5
  32. package/dist/types-ts4.5/table-charts.d.ts +0 -193
  33. package/dist/types-ts4.5/text-background-color.d.ts +0 -37
  34. package/dist/types-ts4.5/text.d.ts +0 -65
package/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # @atlaskit/editor-palette
2
2
 
3
+ ## 3.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
8
+ Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
9
+
10
+ Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
11
+
12
+ Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
13
+
14
+ ```diff
15
+ - "typesVersions": {
16
+ - ">=4.5 <4.9": {
17
+ - "*": [
18
+ - "dist/types-ts4.5/*",
19
+ - "dist/types-ts4.5/index.d.ts"
20
+ - ]
21
+ - }
22
+ - },
23
+ ```
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies
28
+
29
+ ## 2.2.0
30
+
31
+ ### Minor Changes
32
+
33
+ - [`ce30a31e6369d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ce30a31e6369d) -
34
+ Autofix: add explicit package exports (barrel removal)
35
+
3
36
  ## 2.1.26
4
37
 
5
38
  ### Patch Changes
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "@atlaskit/editor-palette/background",
3
+ "main": "../dist/cjs/entry-points/background.js",
4
+ "module": "../dist/esm/entry-points/background.js",
5
+ "module:es2019": "../dist/es2019/entry-points/background.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/entry-points/background.d.ts"
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "@atlaskit/editor-palette/border",
3
+ "main": "../dist/cjs/entry-points/border.js",
4
+ "module": "../dist/esm/entry-points/border.js",
5
+ "module:es2019": "../dist/es2019/entry-points/border.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/entry-points/border.d.ts"
8
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "hexToEditorBackgroundPaletteColor", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _background.hexToEditorBackgroundPaletteColor;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "hexToEditorBackgroundPaletteRawValue", {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _background.hexToEditorBackgroundPaletteRawValue;
16
+ }
17
+ });
18
+ var _background = require("../background");
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "hexToEditorBorderPaletteColor", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _border.hexToEditorBorderPaletteColor;
10
+ }
11
+ });
12
+ var _border = require("../border");
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "hexToEditorTableChartsPaletteColor", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _tableCharts.hexToEditorTableChartsPaletteColor;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "hexToEditorTableChartsPaletteRawValue", {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _tableCharts.hexToEditorTableChartsPaletteRawValue;
16
+ }
17
+ });
18
+ var _tableCharts = require("../table-charts");
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "hexToEditorTextBackgroundPaletteColor", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _textBackgroundColor.hexToEditorTextBackgroundPaletteColor;
10
+ }
11
+ });
12
+ var _textBackgroundColor = require("../text-background-color");
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "hexToEditorTextPaletteColor", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _text.hexToEditorTextPaletteColor;
10
+ }
11
+ });
12
+ var _text = require("../text");
@@ -0,0 +1,2 @@
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ export { hexToEditorBackgroundPaletteColor, hexToEditorBackgroundPaletteRawValue } from '../background';
@@ -0,0 +1,2 @@
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ export { hexToEditorBorderPaletteColor } from '../border';
@@ -0,0 +1,2 @@
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ export { hexToEditorTableChartsPaletteColor, hexToEditorTableChartsPaletteRawValue } from '../table-charts';
@@ -0,0 +1,2 @@
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ export { hexToEditorTextBackgroundPaletteColor } from '../text-background-color';
@@ -0,0 +1,2 @@
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ export { hexToEditorTextPaletteColor } from '../text';
@@ -0,0 +1,2 @@
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ export { hexToEditorBackgroundPaletteColor, hexToEditorBackgroundPaletteRawValue } from '../background';
@@ -0,0 +1,2 @@
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ export { hexToEditorBorderPaletteColor } from '../border';
@@ -0,0 +1,2 @@
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ export { hexToEditorTableChartsPaletteColor, hexToEditorTableChartsPaletteRawValue } from '../table-charts';
@@ -0,0 +1,2 @@
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ export { hexToEditorTextBackgroundPaletteColor } from '../text-background-color';
@@ -0,0 +1,2 @@
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ export { hexToEditorTextPaletteColor } from '../text';
@@ -0,0 +1 @@
1
+ export { hexToEditorBackgroundPaletteColor, hexToEditorBackgroundPaletteRawValue, } from '../background';
@@ -0,0 +1 @@
1
+ export { hexToEditorBorderPaletteColor } from '../border';
@@ -0,0 +1 @@
1
+ export { hexToEditorTableChartsPaletteColor, hexToEditorTableChartsPaletteRawValue, } from '../table-charts';
@@ -0,0 +1 @@
1
+ export { hexToEditorTextBackgroundPaletteColor } from '../text-background-color';
@@ -0,0 +1 @@
1
+ export { hexToEditorTextPaletteColor } from '../text';
package/docs/0-intro.tsx CHANGED
@@ -37,9 +37,9 @@ or reach out to the Design System Team via the [Atlassian Developer Community fo
37
37
 
38
38
  ## API documentation
39
39
 
40
- ${
41
- (
42
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
40
+ ${(
41
+ <>
42
+ {/* eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766 */}
43
43
  <div style={{ marginTop: token('space.100') }}>
44
44
  <SectionMessage
45
45
  title="Design token names and values are an implementation detail."
@@ -67,8 +67,8 @@ ${
67
67
  </ul>
68
68
  </SectionMessage>
69
69
  </div>
70
- )
71
- }
70
+ </>
71
+ )}
72
72
 
73
73
  ### \`hexToTextPaletteColor\`
74
74
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-palette",
3
- "version": "2.1.26",
3
+ "version": "3.0.0",
4
4
  "description": "The editor palette",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -18,22 +18,16 @@
18
18
  "module": "dist/esm/index.js",
19
19
  "module:es2019": "dist/es2019/index.js",
20
20
  "types": "dist/types/index.d.ts",
21
- "typesVersions": {
22
- ">=4.5 <4.9": {
23
- "*": [
24
- "dist/types-ts4.5/*",
25
- "dist/types-ts4.5/index.d.ts"
26
- ]
27
- }
28
- },
29
21
  "sideEffects": false,
30
22
  "atlaskit:src": "src/index.ts",
31
23
  "dependencies": {
32
- "@atlaskit/tokens": "^13.0.0",
24
+ "@atlaskit/tokens": "^14.0.0",
33
25
  "@babel/runtime": "^7.0.0"
34
26
  },
35
27
  "devDependencies": {
36
28
  "@testing-library/react": "^16.3.0",
29
+ "react": "^18.2.0",
30
+ "react-dom": "^18.2.0",
37
31
  "wait-for-expect": "^1.2.0"
38
32
  },
39
33
  "peerDependencies": {
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "@atlaskit/editor-palette/table-charts",
3
+ "main": "../dist/cjs/entry-points/table-charts.js",
4
+ "module": "../dist/esm/entry-points/table-charts.js",
5
+ "module:es2019": "../dist/es2019/entry-points/table-charts.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/entry-points/table-charts.d.ts"
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "@atlaskit/editor-palette/text",
3
+ "main": "../dist/cjs/entry-points/text.js",
4
+ "module": "../dist/esm/entry-points/text.js",
5
+ "module:es2019": "../dist/es2019/entry-points/text.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/entry-points/text.d.ts"
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "@atlaskit/editor-palette/text-background-color",
3
+ "main": "../dist/cjs/entry-points/text-background-color.js",
4
+ "module": "../dist/esm/entry-points/text-background-color.js",
5
+ "module:es2019": "../dist/es2019/entry-points/text-background-color.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/entry-points/text-background-color.d.ts"
8
+ }
@@ -1,149 +0,0 @@
1
- /**
2
- * This takes an adf hex color and returns a matching background palette
3
- * color.
4
- *
5
- * By providing a design token, this enables ADF content to be rendered in new themes such as dark mode.
6
- *
7
- * Example usage
8
- * ```tsx
9
- * const cssValue = hexToBackgroundPaletteColor('#FFFFFF');
10
- * // ^? const cssValue: string
11
- * <div style={{backgroundColor: cssValue}} />
12
- * ```
13
- *
14
- * The names of tokens can change over time, and the values of tokens will differ between themes.
15
- * The exact output of this function is an implementation detail and should only be used when rendering
16
- * content to the user, on a client with a matching major version of `@atlaskit/tokens`.
17
- * - **DO NOT**: store the output of these functions in any user-generated content or back-end.
18
- * - **DO**: store the ADF hex color, and use these utilities at render time to display the themed version of the color.
19
- */
20
- export declare function hexToEditorBackgroundPaletteColor<HexColor extends string>(hexColor: HexColor): HexColor extends EditorBackgroundPaletteKey ? EditorBackgroundPalette[HexColor]['token'] : string | undefined;
21
- /**
22
- * Takes an ADF hex color and returns the rendered hex code for the associated background palette design token using getTokenValue.
23
- * If the provided color does not exist in the Editor color palette, this function returns undefined.
24
- *
25
- * This should only be used when rendering content where CSS variables are not feasible, such as a non-CSS environment
26
- * or to enable cross-app copy/paste.
27
- *
28
- * WARNING: If the rendered theme changes (such as from light -> dark mode) the value returned here will no longer match
29
- * the surrounding UI and will need to be re-fetched.
30
- * In addition, the values of tokens will differ between themes and the value for a given theme can and will change.
31
- * - **DO NOT**: store the output of these functions in any user-generated content or back-end.
32
- * - **DO**: store the ADF hex color, and use these utilities at render time to display the themed version of the color.
33
- */
34
- export declare function hexToEditorBackgroundPaletteRawValue<HexColor extends string>(hexColor: HexColor): HexColor extends EditorBackgroundPaletteKey ? string : undefined;
35
- type EditorBackgroundPalette = typeof editorBackgroundPalette;
36
- export type EditorBackgroundPaletteKey = keyof EditorBackgroundPalette;
37
- /**
38
- * Values are asserted to improve generated type declarations
39
- * Using object structure as getValue() function needed for table values, and other
40
- * properties may be needed in the future.
41
- */
42
- export declare const editorBackgroundPalette: {
43
- /** blue - light */
44
- "#DEEBFF": {
45
- getValue: (fallback: string) => string;
46
- token: "var(--ds-background-accent-blue-subtlest, #DEEBFF)";
47
- };
48
- /** blue - medium */
49
- "#B3D4FF": {
50
- getValue: (fallback: string) => string;
51
- token: "var(--ds-background-accent-blue-subtler, #B3D4FF)";
52
- };
53
- /** blue - strong */
54
- "#4C9AFF": {
55
- getValue: (fallback: string) => string;
56
- token: "var(--ds-background-accent-blue-subtle, #4C9AFF)";
57
- };
58
- /** teal - light */
59
- "#E6FCFF": {
60
- getValue: (fallback: string) => string;
61
- token: "var(--ds-background-accent-teal-subtlest, #E6FCFF)";
62
- };
63
- /** teal - medium */
64
- "#B3F5FF": {
65
- getValue: (fallback: string) => string;
66
- token: "var(--ds-background-accent-teal-subtler, #B3F5FF)";
67
- };
68
- /** teal - strong */
69
- "#79E2F2": {
70
- getValue: (fallback: string) => string;
71
- token: "var(--ds-background-accent-teal-subtle, #79E2F2)";
72
- };
73
- /** green - light */
74
- "#E3FCEF": {
75
- getValue: (fallback: string) => string;
76
- token: "var(--ds-background-accent-green-subtlest, #E3FCEF)";
77
- };
78
- /** green - medium */
79
- "#ABF5D1": {
80
- getValue: (fallback: string) => string;
81
- token: "var(--ds-background-accent-green-subtler, #ABF5D1)";
82
- };
83
- /** green - strong */
84
- "#57D9A3": {
85
- getValue: (fallback: string) => string;
86
- token: "var(--ds-background-accent-green-subtle, #57D9A3)";
87
- };
88
- /** yellowOrange - light */
89
- "#FFFAE6": {
90
- getValue: (fallback: string) => string;
91
- token: "var(--ds-background-accent-yellow-subtlest, #FFFAE6)";
92
- };
93
- /** yellowOrange - medium */
94
- "#FFF0B3": {
95
- getValue: (fallback: string) => string;
96
- token: "var(--ds-background-accent-yellow-subtler, #FFF0B3)";
97
- };
98
- /** yellowOrange - strong */
99
- "#FFC400": {
100
- getValue: (fallback: string) => string;
101
- token: "var(--ds-background-accent-orange-subtle, #FFC400)";
102
- };
103
- /** red - light */
104
- "#FFEBE6": {
105
- getValue: (fallback: string) => string;
106
- token: "var(--ds-background-accent-red-subtlest, #FFEBE6)";
107
- };
108
- /** red - medium */
109
- "#FFBDAD": {
110
- getValue: (fallback: string) => string;
111
- token: "var(--ds-background-accent-red-subtler, #FFBDAD)";
112
- };
113
- /** red - strong */
114
- "#FF8F73": {
115
- getValue: (fallback: string) => string;
116
- token: "var(--ds-background-accent-red-subtle, #FF8F73)";
117
- };
118
- /** purple - light */
119
- "#EAE6FF": {
120
- getValue: (fallback: string) => string;
121
- token: "var(--ds-background-accent-purple-subtlest, #EAE6FF)";
122
- };
123
- /** purple - medium */
124
- "#C0B6F2": {
125
- getValue: (fallback: string) => string;
126
- token: "var(--ds-background-accent-purple-subtler, #C0B6F2)";
127
- };
128
- /** purple - strong */
129
- "#998DD9": {
130
- getValue: (fallback: string) => string;
131
- token: "var(--ds-background-accent-purple-subtle, #998DD9)";
132
- };
133
- /** whiteGray - light */
134
- "#FFFFFF": {
135
- getValue: (fallback: string) => string;
136
- token: "var(--ds-surface, #FFFFFF)";
137
- };
138
- /** whiteGray - medium */
139
- "#F4F5F7": {
140
- getValue: (fallback: string) => string;
141
- token: "var(--ds-background-accent-gray-subtlest, #F4F5F7)";
142
- };
143
- /** whiteGray - strong */
144
- "#B3BAC5": {
145
- getValue: (fallback: string) => string;
146
- token: "var(--ds-background-accent-gray-subtle, #B3BAC5)";
147
- };
148
- };
149
- export {};
@@ -1,29 +0,0 @@
1
- /**
2
- * This takes an adf hex color and returns a matching border palette color.
3
- *
4
- * By providing a design token, this enables ADF content to be rendered in new themes such as dark mode.
5
- *
6
- * Example usage
7
- * ```tsx
8
- * const cssValue = hexToEditorBorderPaletteColor('#091E4224');
9
- * // ^? const cssValue: string
10
- * <div style={{borderColor: cssValue}} />
11
- * ```
12
- * The names of tokens can change over time, and the values of tokens will differ between themes.
13
- * The exact output of this function is an implementation detail and should only be used when rendering
14
- * content to the user, on a client with a matching major version of `@atlaskit/tokens`.
15
- * - **DO NOT**: store the output of these functions in any user-generated content or back-end.
16
- * - **DO**: store the ADF hex color, and use these utilities at render time to display the themed version of the color
17
- */
18
- export declare function hexToEditorBorderPaletteColor<HexColor extends string>(hexColor: HexColor): HexColor extends EditorBorderPaletteKey ? EditorBorderPalette[HexColor] : string | undefined;
19
- type EditorBorderPalette = typeof editorBorderPalette;
20
- export type EditorBorderPaletteKey = keyof EditorBorderPalette;
21
- export declare const editorBorderPalette: {
22
- /** gray - subtle */
23
- "#091E4224": "var(--ds-border, #091E4224)";
24
- /** gray */
25
- "#758195": "var(--ds-border-bold, #758195)";
26
- /** gray - bold */
27
- "#172B4D": "var(--ds-text, #172B4D)";
28
- };
29
- export {};
@@ -1,5 +0,0 @@
1
- export { hexToEditorBackgroundPaletteColor, hexToEditorBackgroundPaletteRawValue, } from './background';
2
- export { hexToEditorBorderPaletteColor } from './border';
3
- export { hexToEditorTextPaletteColor } from './text';
4
- export { hexToEditorTableChartsPaletteColor, hexToEditorTableChartsPaletteRawValue, } from './table-charts';
5
- export { hexToEditorTextBackgroundPaletteColor } from './text-background-color';
@@ -1,193 +0,0 @@
1
- /**
2
- * This takes an adf hex color and returns a matching chart palette
3
- * color.
4
- *
5
- * By providing a design token, this enables ADF content to be rendered in new themes such as dark mode.
6
- *
7
- * Example usage
8
- * ```tsx
9
- * const cssValue = hexToEditorTableChartsPaletteColor('#FFFFFF');
10
- * // ^? const cssValue: string
11
- * <div style={{backgroundColor: cssValue}} />
12
- * ```
13
- *
14
- * The names of tokens can change over time, and the values of tokens will differ between themes.
15
- * The exact output of this function is an implementation detail and should only be used when rendering
16
- * content to the user, on a client with a matching major version of `@atlaskit/tokens`.
17
- * - **DO NOT**: store the output of these functions in any user-generated content or back-end.
18
- * - **DO**: store the ADF hex color, and use these utilities at render time to display the themed version of the color
19
- */
20
- export declare function hexToEditorTableChartsPaletteColor<HexColor extends string>(hexColor: HexColor): HexColor extends EditorTableChartsPaletteKey ? EditorTableChartsPalette[HexColor]['token'] : string | undefined;
21
- /**
22
- * Takes an ADF hex color and returns the rendered hex code for the associated chart palette design token using getTokenValue.
23
- * If the provided color does not exist in the Editor color palette, this function returns undefined.
24
- *
25
- * This should only be used when rendering content where CSS variables are not feasible, such as a non-CSS environment
26
- * or to enable cross-app copy/paste.
27
- *
28
- * WARNING: If the rendered theme changes (such as from light -> dark mode) the value returned here will no longer match
29
- * the surrounding UI and will need to be re-fetched.
30
- * In addition, the values of tokens will differ between themes and the value for a given theme can and will change.
31
- * - **DO NOT**: store the output of these functions in any user-generated content or back-end.
32
- * - **DO**: store the ADF hex color, and use these utilities at render time to display the themed version of the color.
33
- */
34
- export declare function hexToEditorTableChartsPaletteRawValue<HexColor extends string>(hexColor: HexColor): HexColor extends EditorTableChartsPaletteKey ? string : undefined;
35
- type EditorTableChartsPalette = typeof editorTableChartsPalette;
36
- export type EditorTableChartsPaletteKey = keyof EditorTableChartsPalette;
37
- /**
38
- * Tokenize hex codes into DST chart colors or
39
- * into DST background.accent colors.
40
- *
41
- * The hex codes do not match the DST tokens, they are
42
- * constants that are saved in the ADF that will be rendered
43
- * as the mapped DST token.
44
- *
45
- * https://product-fabric.atlassian.net/browse/ED-17042
46
- */
47
- declare const editorTableChartsPalette: {
48
- "#7AB2FF": {
49
- getValue: (fallback: string) => string;
50
- token: "var(--ds-background-accent-blue-subtle, #7AB2FF)";
51
- };
52
- "#60C6D2": {
53
- getValue: (fallback: string) => string;
54
- token: "var(--ds-background-accent-teal-subtle, #60C6D2)";
55
- };
56
- "#6BE1B0": {
57
- getValue: (fallback: string) => string;
58
- token: "var(--ds-background-accent-green-subtle, #6BE1B0)";
59
- };
60
- "#FFDB57": {
61
- getValue: (fallback: string) => string;
62
- token: "var(--ds-background-accent-yellow-subtle, #FFDB57)";
63
- };
64
- "#FAA53D": {
65
- getValue: (fallback: string) => string;
66
- token: "var(--ds-background-accent-orange-subtle, #FAA53D)";
67
- };
68
- "#FF8F73": {
69
- getValue: (fallback: string) => string;
70
- token: "var(--ds-background-accent-red-subtle, #FF8F73)";
71
- };
72
- "#E774BB": {
73
- getValue: (fallback: string) => string;
74
- token: "var(--ds-background-accent-magenta-subtle, #E774BB)";
75
- };
76
- "#B5A7FB": {
77
- getValue: (fallback: string) => string;
78
- token: "var(--ds-background-accent-purple-subtle, #B5A7FB)";
79
- };
80
- "#8993A5": {
81
- getValue: (fallback: string) => string;
82
- token: "var(--ds-background-accent-gray-subtler, #8993A5)";
83
- };
84
- "#247FFF": {
85
- getValue: (fallback: string) => string;
86
- token: "var(--ds-chart-blue-bold, #247FFF)";
87
- };
88
- "#1D9AAA": {
89
- getValue: (fallback: string) => string;
90
- token: "var(--ds-chart-teal-bold, #1D9AAA)";
91
- };
92
- "#23A971": {
93
- getValue: (fallback: string) => string;
94
- token: "var(--ds-chart-green-bold, #23A971)";
95
- };
96
- "#FFBE33": {
97
- getValue: (fallback: string) => string;
98
- token: "var(--ds-chart-yellow-bold, #FFBE33)";
99
- };
100
- "#D97008": {
101
- getValue: (fallback: string) => string;
102
- token: "var(--ds-chart-orange-bold, #D97008)";
103
- };
104
- "#FC552C": {
105
- getValue: (fallback: string) => string;
106
- token: "var(--ds-chart-red-bold, #FC552C)";
107
- };
108
- "#DA62AC": {
109
- getValue: (fallback: string) => string;
110
- token: "var(--ds-chart-magenta-bold, #DA62AC)";
111
- };
112
- "#8B77EE": {
113
- getValue: (fallback: string) => string;
114
- token: "var(--ds-chart-purple-bold, #8B77EE)";
115
- };
116
- "#8590A2": {
117
- getValue: (fallback: string) => string;
118
- token: "var(--ds-chart-gray-bold, #8590A2)";
119
- };
120
- "#0055CC": {
121
- getValue: (fallback: string) => string;
122
- token: "var(--ds-chart-blue-bolder, #0055CC)";
123
- };
124
- "#1D7F8C": {
125
- getValue: (fallback: string) => string;
126
- token: "var(--ds-chart-teal-bolder, #1D7F8C)";
127
- };
128
- "#177D52": {
129
- getValue: (fallback: string) => string;
130
- token: "var(--ds-chart-green-bolder, #177D52)";
131
- };
132
- "#FF9D00": {
133
- getValue: (fallback: string) => string;
134
- token: "var(--ds-chart-yellow-bolder, #FF9D00)";
135
- };
136
- "#B65C02": {
137
- getValue: (fallback: string) => string;
138
- token: "var(--ds-chart-orange-bolder, #B65C02)";
139
- };
140
- "#D32D03": {
141
- getValue: (fallback: string) => string;
142
- token: "var(--ds-chart-red-bolder, #D32D03)";
143
- };
144
- "#CD519D": {
145
- getValue: (fallback: string) => string;
146
- token: "var(--ds-chart-magenta-bolder, #CD519D)";
147
- };
148
- "#5A43D0": {
149
- getValue: (fallback: string) => string;
150
- token: "var(--ds-chart-purple-bolder, #5A43D0)";
151
- };
152
- "#758195": {
153
- getValue: (fallback: string) => string;
154
- token: "var(--ds-chart-gray-bolder, #758195)";
155
- };
156
- "#003884": {
157
- getValue: (fallback: string) => string;
158
- token: "var(--ds-chart-blue-boldest, #003884)";
159
- };
160
- "#206B74": {
161
- getValue: (fallback: string) => string;
162
- token: "var(--ds-chart-teal-boldest, #206B74)";
163
- };
164
- "#055C3F": {
165
- getValue: (fallback: string) => string;
166
- token: "var(--ds-chart-green-boldest, #055C3F)";
167
- };
168
- "#946104": {
169
- getValue: (fallback: string) => string;
170
- token: "var(--ds-chart-yellow-boldest, #946104)";
171
- };
172
- "#974F0C": {
173
- getValue: (fallback: string) => string;
174
- token: "var(--ds-chart-orange-boldest, #974F0C)";
175
- };
176
- "#A32000": {
177
- getValue: (fallback: string) => string;
178
- token: "var(--ds-chart-red-boldest, #A32000)";
179
- };
180
- "#943D73": {
181
- getValue: (fallback: string) => string;
182
- token: "var(--ds-chart-magenta-boldest, #943D73)";
183
- };
184
- "#44368B": {
185
- getValue: (fallback: string) => string;
186
- token: "var(--ds-chart-purple-boldest, #44368B)";
187
- };
188
- "#44546F": {
189
- getValue: (fallback: string) => string;
190
- token: "var(--ds-chart-gray-boldest, #44546F)";
191
- };
192
- };
193
- export {};
@@ -1,37 +0,0 @@
1
- export declare const textBackgroundColorPalette: {
2
- /** Gray - light */
3
- "#DCDFE4": "var(--ds-background-accent-gray-subtler, #DCDFE4)";
4
- /** Teal - light */
5
- "#C6EDFB": "var(--ds-background-accent-teal-subtler, #C6EDFB)";
6
- /** Lime - light */
7
- "#D3F1A7": "var(--ds-background-accent-lime-subtler, #D3F1A7)";
8
- /** Yellow - light */
9
- "#F8E6A0": "var(--ds-background-accent-yellow-subtler, #F8E6A0)";
10
- /** Orange - light */
11
- "#FEDEC8": "var(--ds-background-accent-orange-subtler, #FEDEC8)";
12
- /** Magenta - light */
13
- "#FDD0EC": "var(--ds-background-accent-magenta-subtler, #FDD0EC)";
14
- /** Purple - light */
15
- "#DFD8FD": "var(--ds-background-accent-purple-subtler, #DFD8FD)";
16
- };
17
- type TextBackgroundColorPalette = typeof textBackgroundColorPalette;
18
- export type TextBackgroundColorPaletteKey = keyof TextBackgroundColorPalette;
19
- /**
20
- * This takes an ADF hex color and returns a matching text background palette color.
21
- *
22
- * By providing a design token, this enables ADF content to be rendered in new themes such as dark mode.
23
- *
24
- * Example usage
25
- * ```tsx
26
- * const cssValue = hexToEditorTextBackgroundPaletteColor('#D3F1A7');
27
- *
28
- * <span style={{backgroundColor: cssValue}} />
29
- * ```
30
- * The names of tokens can change over time, and the values of tokens will differ between themes.
31
- * The exact output of this function is an implementation detail and should only be used when rendering
32
- * content to the user, on a client with a matching major version of `@atlaskit/tokens`.
33
- * - **DO NOT**: store the output of these functions in any user-generated content or back-end.
34
- * - **DO**: store the ADF hex color, and use these utilities at render time to display the themed version of the color
35
- */
36
- export declare function hexToEditorTextBackgroundPaletteColor<HexColor extends string>(hexColor: HexColor): HexColor extends TextBackgroundColorPaletteKey ? TextBackgroundColorPalette[HexColor] : string | undefined;
37
- export {};
@@ -1,65 +0,0 @@
1
- /**
2
- * This takes an adf hex color and returns a matching text palette color.
3
- *
4
- * By providing a design token, this enables ADF content to be rendered in new themes such as dark mode.
5
- *
6
- * Example usage
7
- * ```tsx
8
- * const cssValue = hexToTextPaletteColor('#0747A6');
9
- * // ^? const cssValue: string
10
- * <span style={{textColor: cssValue}} />
11
- * ```
12
- * The names of tokens can change over time, and the values of tokens will differ between themes.
13
- * The exact output of this function is an implementation detail and should only be used when rendering
14
- * content to the user, on a client with a matching major version of `@atlaskit/tokens`.
15
- * - **DO NOT**: store the output of these functions in any user-generated content or back-end.
16
- * - **DO**: store the ADF hex color, and use these utilities at render time to display the themed version of the color
17
- */
18
- export declare function hexToEditorTextPaletteColor<HexColor extends string>(hexColor: HexColor): HexColor extends EditorTextPaletteKey ? EditorTextPalette[HexColor] : string | undefined;
19
- type EditorTextPalette = typeof editorTextPalette;
20
- export type EditorTextPaletteKey = keyof EditorTextPalette;
21
- export declare const editorTextPalette: {
22
- /** blue - light */
23
- "#B3D4FF": "var(--ds-background-accent-blue-subtler, #B3D4FF)";
24
- /** blue - medium */
25
- "#4C9AFF": "var(--ds-icon-accent-blue, #4C9AFF)";
26
- /** blue - strong */
27
- "#0747A6": "var(--ds-text-accent-blue, #0747A6)";
28
- /** teal - light */
29
- "#B3F5FF": "var(--ds-background-accent-teal-subtler, #B3F5FF)";
30
- /** teal - medium */
31
- "#00B8D9": "var(--ds-icon-accent-teal, #00B8D9)";
32
- /** teal - strong */
33
- "#008DA6": "var(--ds-text-accent-teal, #008DA6)";
34
- /** green - light */
35
- "#ABF5D1": "var(--ds-background-accent-green-subtler, #ABF5D1)";
36
- /** green - medium */
37
- "#36B37E": "var(--ds-icon-accent-green, #36B37E)";
38
- /** green - strong */
39
- "#006644": "var(--ds-text-accent-green, #006644)";
40
- /** yellowOrange - light */
41
- "#FFF0B3": "var(--ds-background-accent-yellow-subtler, #FFF0B3)";
42
- /** yellowOrange - medium */
43
- "#FFC400": "var(--ds-background-accent-orange-subtle, #FFC400)";
44
- /** yellowOrange - strong */
45
- "#FF991F": "var(--ds-icon-accent-orange, #FF991F)";
46
- /** red - light */
47
- "#FFBDAD": "var(--ds-background-accent-red-subtler, #FFBDAD)";
48
- /** red - medium */
49
- "#FF5630": "var(--ds-icon-accent-red, #FF5630)";
50
- /** red - strong */
51
- "#BF2600": "var(--ds-text-accent-red, #BF2600)";
52
- /** purple - light */
53
- "#EAE6FF": "var(--ds-background-accent-purple-subtler, #EAE6FF)";
54
- /** purple - medium */
55
- "#6554C0": "var(--ds-icon-accent-purple, #6554C0)";
56
- /** purple - strong */
57
- "#403294": "var(--ds-text-accent-purple, #403294)";
58
- /** whiteGray - light */
59
- "#FFFFFF": "var(--ds-text-inverse, #FFFFFF)";
60
- /** whiteGray - medium */
61
- "#97A0AF": "var(--ds-icon-accent-gray, #97A0AF)";
62
- /** whiteGray - strong */
63
- "#172B4D": "var(--ds-text, #172B4D)";
64
- };
65
- export {};