@atlaskit/editor-palette 1.5.2 → 1.6.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.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/index.js +8 -1
- package/dist/cjs/table-charts.js +1 -0
- package/dist/cjs/text-background-color.js +38 -0
- package/dist/es2019/background.js +1 -17
- package/dist/es2019/index.js +2 -1
- package/dist/es2019/table-charts.js +1 -0
- package/dist/es2019/text-background-color.js +41 -0
- package/dist/esm/background.js +1 -0
- package/dist/esm/index.js +2 -1
- package/dist/esm/table-charts.js +1 -0
- package/dist/esm/text-background-color.js +30 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/text-background-color.d.ts +35 -0
- package/dist/types-ts4.5/index.d.ts +1 -0
- package/dist/types-ts4.5/text-background-color.d.ts +35 -0
- package/docs/0-intro.tsx +2 -1
- package/package.json +11 -9
- package/tmp/api-report-tmp.d.ts +0 -319
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-palette
|
|
2
2
|
|
|
3
|
+
## 1.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#95631](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/95631) [`8514eacd7c0e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8514eacd7c0e) - [ED-23111] Add text background color palette to editor palettes
|
|
8
|
+
|
|
9
|
+
## 1.5.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116) [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) - Upgrade Typescript from `4.9.5` to `5.4.2`
|
|
14
|
+
|
|
3
15
|
## 1.5.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -33,6 +33,12 @@ Object.defineProperty(exports, "hexToEditorTableChartsPaletteRawValue", {
|
|
|
33
33
|
return _tableCharts.hexToEditorTableChartsPaletteRawValue;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
+
Object.defineProperty(exports, "hexToEditorTextBackgroundPaletteColor", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function get() {
|
|
39
|
+
return _textBackgroundColor.hexToEditorTextBackgroundPaletteColor;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
36
42
|
Object.defineProperty(exports, "hexToEditorTextPaletteColor", {
|
|
37
43
|
enumerable: true,
|
|
38
44
|
get: function get() {
|
|
@@ -42,4 +48,5 @@ Object.defineProperty(exports, "hexToEditorTextPaletteColor", {
|
|
|
42
48
|
var _background = require("./background");
|
|
43
49
|
var _border = require("./border");
|
|
44
50
|
var _text = require("./text");
|
|
45
|
-
var _tableCharts = require("./table-charts");
|
|
51
|
+
var _tableCharts = require("./table-charts");
|
|
52
|
+
var _textBackgroundColor = require("./text-background-color");
|
package/dist/cjs/table-charts.js
CHANGED
|
@@ -59,6 +59,7 @@ function hexToEditorTableChartsPaletteRawValue(hexColor) {
|
|
|
59
59
|
// Colors taken from
|
|
60
60
|
// https://hello.atlassian.net/wiki/spaces/DST/pages/1790979421/DSTRFC-002+-+Shifting+Editor+s+color+palette+to+design+tokens
|
|
61
61
|
// values are asserted to improve generated type declarations
|
|
62
|
+
|
|
62
63
|
/**
|
|
63
64
|
* Tokenize hex codes into DST chart colors or
|
|
64
65
|
* into DST background.accent colors.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.hexToEditorTextBackgroundPaletteColor = hexToEditorTextBackgroundPaletteColor;
|
|
8
|
+
exports.textBackgroundColorPalette = void 0;
|
|
9
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
+
var _textBackgroundColorP;
|
|
11
|
+
// This import will be stripped on build
|
|
12
|
+
|
|
13
|
+
// Color tokens defined on https://hello.atlassian.net/wiki/spaces/EOU/pages/3587733210/Text+highlighting+-+designs#Colour-palette
|
|
14
|
+
// values are asserted to improve generated type declarations
|
|
15
|
+
var textBackgroundColorPalette = exports.textBackgroundColorPalette = (_textBackgroundColorP = {}, (0, _defineProperty2.default)(_textBackgroundColorP, '#DCDFE4', "var(--ds-background-accent-gray-subtler, #DCDFE4)"), (0, _defineProperty2.default)(_textBackgroundColorP, '#C6EDFB', "var(--ds-background-accent-teal-subtler, #C6EDFB)"), (0, _defineProperty2.default)(_textBackgroundColorP, '#D3F1A7', "var(--ds-background-accent-lime-subtler, #D3F1A7)"), (0, _defineProperty2.default)(_textBackgroundColorP, '#FEDEC8', "var(--ds-background-accent-orange-subtler, #FEDEC8)"), (0, _defineProperty2.default)(_textBackgroundColorP, '#FDD0EC', "var(--ds-background-accent-magenta-subtler, #FDD0EC)"), (0, _defineProperty2.default)(_textBackgroundColorP, '#DFD8FD', "var(--ds-background-accent-purple-subtler, #DFD8FD)"), _textBackgroundColorP);
|
|
16
|
+
/**
|
|
17
|
+
* This takes an ADF hex color and returns a matching text background palette color.
|
|
18
|
+
*
|
|
19
|
+
* By providing a design token, this enables ADF content to be rendered in new themes such as dark mode.
|
|
20
|
+
*
|
|
21
|
+
* Example usage
|
|
22
|
+
* ```tsx
|
|
23
|
+
* const cssValue = hexToEditorTextBackgroundPaletteColor('#D3F1A7');
|
|
24
|
+
*
|
|
25
|
+
* <span style={{backgroundColor: cssValue}} />
|
|
26
|
+
* ```
|
|
27
|
+
* The names of tokens can change over time, and the values of tokens will differ between themes.
|
|
28
|
+
* The exact output of this function is an implementation detail and should only be used when rendering
|
|
29
|
+
* content to the user, on a client with a matching major version of `@atlaskit/tokens`.
|
|
30
|
+
* - **DO NOT**: store the output of these functions in any user-generated content or back-end.
|
|
31
|
+
* - **DO**: store the ADF hex color, and use these utilities at render time to display the themed version of the color
|
|
32
|
+
*/
|
|
33
|
+
function hexToEditorTextBackgroundPaletteColor(hexColor) {
|
|
34
|
+
// Ts ignore was used to allow use of conditional return type
|
|
35
|
+
// (preferring better type on consumption over safety in implementation)
|
|
36
|
+
// @ts-ignore
|
|
37
|
+
return textBackgroundColorPalette[hexColor.toUpperCase()];
|
|
38
|
+
}
|
|
@@ -50,6 +50,7 @@ export function hexToEditorBackgroundPaletteRawValue(hexColor) {
|
|
|
50
50
|
}
|
|
51
51
|
// Colors taken from
|
|
52
52
|
// https://hello.atlassian.net/wiki/spaces/DST/pages/1790979421/DSTRFC-002+-+Shifting+Editor+s+color+palette+to+design+tokens
|
|
53
|
+
|
|
53
54
|
/**
|
|
54
55
|
* Values are asserted to improve generated type declarations
|
|
55
56
|
* Using object structure as getValue() function needed for table values, and other
|
|
@@ -82,108 +83,91 @@ export const editorBackgroundPalette = {
|
|
|
82
83
|
getValue: fallback => getTokenValue('color.background.accent.teal.subtlest', fallback),
|
|
83
84
|
token: "var(--ds-background-accent-teal-subtlest, #E6FCFF)" // source for hex code was legacy token T50,
|
|
84
85
|
},
|
|
85
|
-
|
|
86
86
|
/** teal - medium */
|
|
87
87
|
['#B3F5FF']: {
|
|
88
88
|
getValue: fallback => getTokenValue('color.background.accent.teal.subtler', fallback),
|
|
89
89
|
token: "var(--ds-background-accent-teal-subtler, #B3F5FF)" // source for hex code was legacy token T75,
|
|
90
90
|
},
|
|
91
|
-
|
|
92
91
|
/** teal - strong */
|
|
93
92
|
['#79E2F2']: {
|
|
94
93
|
getValue: fallback => getTokenValue('color.background.accent.teal.subtle', fallback),
|
|
95
94
|
token: "var(--ds-background-accent-teal-subtle, #79E2F2)" // source for hex code was legacy token T100,
|
|
96
95
|
},
|
|
97
|
-
|
|
98
96
|
// green
|
|
99
97
|
/** green - light */
|
|
100
98
|
['#E3FCEF']: {
|
|
101
99
|
getValue: fallback => getTokenValue('color.background.accent.green.subtlest', fallback),
|
|
102
100
|
token: "var(--ds-background-accent-green-subtlest, #E3FCEF)" // source for hex code was legacy token G50,
|
|
103
101
|
},
|
|
104
|
-
|
|
105
102
|
/** green - medium */
|
|
106
103
|
['#ABF5D1']: {
|
|
107
104
|
getValue: fallback => getTokenValue('color.background.accent.green.subtler', fallback),
|
|
108
105
|
token: "var(--ds-background-accent-green-subtler, #ABF5D1)" // source for hex code was legacy token G75,
|
|
109
106
|
},
|
|
110
|
-
|
|
111
107
|
/** green - strong */
|
|
112
108
|
['#57D9A3']: {
|
|
113
109
|
getValue: fallback => getTokenValue('color.background.accent.green.subtle', fallback),
|
|
114
110
|
token: "var(--ds-background-accent-green-subtle, #57D9A3)" // source for hex code was legacy token G200,
|
|
115
111
|
},
|
|
116
|
-
|
|
117
112
|
// yellowOrange
|
|
118
113
|
/** yellowOrange - light */
|
|
119
114
|
['#FFFAE6']: {
|
|
120
115
|
getValue: fallback => getTokenValue('color.background.accent.yellow.subtlest', fallback),
|
|
121
116
|
token: "var(--ds-background-accent-yellow-subtlest, #FFFAE6)" // source for hex code was legacy token Y50,
|
|
122
117
|
},
|
|
123
|
-
|
|
124
118
|
/** yellowOrange - medium */
|
|
125
119
|
['#FFF0B3']: {
|
|
126
120
|
getValue: fallback => getTokenValue('color.background.accent.yellow.subtler', fallback),
|
|
127
121
|
token: "var(--ds-background-accent-yellow-subtler, #FFF0B3)" // source for hex code was legacy token Y75,
|
|
128
122
|
},
|
|
129
|
-
|
|
130
123
|
/** yellowOrange - strong */
|
|
131
124
|
['#FFC400']: {
|
|
132
125
|
getValue: fallback => getTokenValue('color.background.accent.orange.subtle', fallback),
|
|
133
126
|
token: "var(--ds-background-accent-orange-subtle, #FFC400)" // source for hex code was legacy token Y200,
|
|
134
127
|
},
|
|
135
|
-
|
|
136
128
|
// red
|
|
137
129
|
/** red - light */
|
|
138
130
|
['#FFEBE6']: {
|
|
139
131
|
getValue: fallback => getTokenValue('color.background.accent.red.subtlest', fallback),
|
|
140
132
|
token: "var(--ds-background-accent-red-subtlest, #FFEBE6)" // source for hex code was legacy token R50,
|
|
141
133
|
},
|
|
142
|
-
|
|
143
134
|
/** red - medium */
|
|
144
135
|
['#FFBDAD']: {
|
|
145
136
|
getValue: fallback => getTokenValue('color.background.accent.red.subtler', fallback),
|
|
146
137
|
token: "var(--ds-background-accent-red-subtler, #FFBDAD)" // source for hex code was legacy token R75,
|
|
147
138
|
},
|
|
148
|
-
|
|
149
139
|
/** red - strong */
|
|
150
140
|
['#FF8F73']: {
|
|
151
141
|
getValue: fallback => getTokenValue('color.background.accent.red.subtle', fallback),
|
|
152
142
|
token: "var(--ds-background-accent-red-subtle, #FF8F73)" // source for hex code was legacy token R100,
|
|
153
143
|
},
|
|
154
|
-
|
|
155
144
|
// purple
|
|
156
145
|
/** purple - light */
|
|
157
146
|
['#EAE6FF']: {
|
|
158
147
|
getValue: fallback => getTokenValue('color.background.accent.purple.subtlest', fallback),
|
|
159
148
|
token: "var(--ds-background-accent-purple-subtlest, #EAE6FF)" // source for hex code was legacy token P50,
|
|
160
149
|
},
|
|
161
|
-
|
|
162
150
|
/** purple - medium */
|
|
163
151
|
['#C0B6F2']: {
|
|
164
152
|
getValue: fallback => getTokenValue('color.background.accent.purple.subtler', fallback),
|
|
165
153
|
token: "var(--ds-background-accent-purple-subtler, #C0B6F2)" // source for hex code was legacy token P75,
|
|
166
154
|
},
|
|
167
|
-
|
|
168
155
|
/** purple - strong */
|
|
169
156
|
['#998DD9']: {
|
|
170
157
|
getValue: fallback => getTokenValue('color.background.accent.purple.subtle', fallback),
|
|
171
158
|
token: "var(--ds-background-accent-purple-subtle, #998DD9)" // source for hex code was legacy token P100,
|
|
172
159
|
},
|
|
173
|
-
|
|
174
160
|
// whiteGray
|
|
175
161
|
/** whiteGray - light */
|
|
176
162
|
['#FFFFFF']: {
|
|
177
163
|
getValue: fallback => getTokenValue('elevation.surface', fallback),
|
|
178
164
|
token: "var(--ds-surface, #FFFFFF)" // source for hex code was legacy token N0,
|
|
179
165
|
},
|
|
180
|
-
|
|
181
166
|
/** whiteGray - medium */
|
|
182
167
|
['#F4F5F7']: {
|
|
183
168
|
getValue: fallback => getTokenValue('color.background.accent.gray.subtlest', fallback),
|
|
184
169
|
token: "var(--ds-background-accent-gray-subtlest, #F4F5F7)" // source for hex code was legacy token N20,
|
|
185
170
|
},
|
|
186
|
-
|
|
187
171
|
/** whiteGray - strong */
|
|
188
172
|
['#B3BAC5']: {
|
|
189
173
|
getValue: fallback => getTokenValue('color.background.accent.gray.subtle', fallback),
|
package/dist/es2019/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { hexToEditorBackgroundPaletteColor, hexToEditorBackgroundPaletteRawValue } from './background';
|
|
2
2
|
export { hexToEditorBorderPaletteColor } from './border';
|
|
3
3
|
export { hexToEditorTextPaletteColor } from './text';
|
|
4
|
-
export { hexToEditorTableChartsPaletteColor, hexToEditorTableChartsPaletteRawValue } from './table-charts';
|
|
4
|
+
export { hexToEditorTableChartsPaletteColor, hexToEditorTableChartsPaletteRawValue } from './table-charts';
|
|
5
|
+
export { hexToEditorTextBackgroundPaletteColor } from './text-background-color';
|
|
@@ -51,6 +51,7 @@ export function hexToEditorTableChartsPaletteRawValue(hexColor) {
|
|
|
51
51
|
// Colors taken from
|
|
52
52
|
// https://hello.atlassian.net/wiki/spaces/DST/pages/1790979421/DSTRFC-002+-+Shifting+Editor+s+color+palette+to+design+tokens
|
|
53
53
|
// values are asserted to improve generated type declarations
|
|
54
|
+
|
|
54
55
|
/**
|
|
55
56
|
* Tokenize hex codes into DST chart colors or
|
|
56
57
|
* into DST background.accent colors.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// This import will be stripped on build
|
|
2
|
+
|
|
3
|
+
// Color tokens defined on https://hello.atlassian.net/wiki/spaces/EOU/pages/3587733210/Text+highlighting+-+designs#Colour-palette
|
|
4
|
+
// values are asserted to improve generated type declarations
|
|
5
|
+
export const textBackgroundColorPalette = {
|
|
6
|
+
/** Gray - light */
|
|
7
|
+
['#DCDFE4']: "var(--ds-background-accent-gray-subtler, #DCDFE4)",
|
|
8
|
+
/** Teal - light */
|
|
9
|
+
['#C6EDFB']: "var(--ds-background-accent-teal-subtler, #C6EDFB)",
|
|
10
|
+
/** Lime - light */
|
|
11
|
+
['#D3F1A7']: "var(--ds-background-accent-lime-subtler, #D3F1A7)",
|
|
12
|
+
/** Orange - light */
|
|
13
|
+
['#FEDEC8']: "var(--ds-background-accent-orange-subtler, #FEDEC8)",
|
|
14
|
+
/** Magenta - light */
|
|
15
|
+
['#FDD0EC']: "var(--ds-background-accent-magenta-subtler, #FDD0EC)",
|
|
16
|
+
/** Purple - light */
|
|
17
|
+
['#DFD8FD']: "var(--ds-background-accent-purple-subtler, #DFD8FD)"
|
|
18
|
+
};
|
|
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 function hexToEditorTextBackgroundPaletteColor(hexColor) {
|
|
37
|
+
// Ts ignore was used to allow use of conditional return type
|
|
38
|
+
// (preferring better type on consumption over safety in implementation)
|
|
39
|
+
// @ts-ignore
|
|
40
|
+
return textBackgroundColorPalette[hexColor.toUpperCase()];
|
|
41
|
+
}
|
package/dist/esm/background.js
CHANGED
|
@@ -52,6 +52,7 @@ export function hexToEditorBackgroundPaletteRawValue(hexColor) {
|
|
|
52
52
|
}
|
|
53
53
|
// Colors taken from
|
|
54
54
|
// https://hello.atlassian.net/wiki/spaces/DST/pages/1790979421/DSTRFC-002+-+Shifting+Editor+s+color+palette+to+design+tokens
|
|
55
|
+
|
|
55
56
|
/**
|
|
56
57
|
* Values are asserted to improve generated type declarations
|
|
57
58
|
* Using object structure as getValue() function needed for table values, and other
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { hexToEditorBackgroundPaletteColor, hexToEditorBackgroundPaletteRawValue } from './background';
|
|
2
2
|
export { hexToEditorBorderPaletteColor } from './border';
|
|
3
3
|
export { hexToEditorTextPaletteColor } from './text';
|
|
4
|
-
export { hexToEditorTableChartsPaletteColor, hexToEditorTableChartsPaletteRawValue } from './table-charts';
|
|
4
|
+
export { hexToEditorTableChartsPaletteColor, hexToEditorTableChartsPaletteRawValue } from './table-charts';
|
|
5
|
+
export { hexToEditorTextBackgroundPaletteColor } from './text-background-color';
|
package/dist/esm/table-charts.js
CHANGED
|
@@ -53,6 +53,7 @@ export function hexToEditorTableChartsPaletteRawValue(hexColor) {
|
|
|
53
53
|
// Colors taken from
|
|
54
54
|
// https://hello.atlassian.net/wiki/spaces/DST/pages/1790979421/DSTRFC-002+-+Shifting+Editor+s+color+palette+to+design+tokens
|
|
55
55
|
// values are asserted to improve generated type declarations
|
|
56
|
+
|
|
56
57
|
/**
|
|
57
58
|
* Tokenize hex codes into DST chart colors or
|
|
58
59
|
* into DST background.accent colors.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
var _textBackgroundColorP;
|
|
3
|
+
// This import will be stripped on build
|
|
4
|
+
|
|
5
|
+
// Color tokens defined on https://hello.atlassian.net/wiki/spaces/EOU/pages/3587733210/Text+highlighting+-+designs#Colour-palette
|
|
6
|
+
// values are asserted to improve generated type declarations
|
|
7
|
+
export var textBackgroundColorPalette = (_textBackgroundColorP = {}, _defineProperty(_textBackgroundColorP, '#DCDFE4', "var(--ds-background-accent-gray-subtler, #DCDFE4)"), _defineProperty(_textBackgroundColorP, '#C6EDFB', "var(--ds-background-accent-teal-subtler, #C6EDFB)"), _defineProperty(_textBackgroundColorP, '#D3F1A7', "var(--ds-background-accent-lime-subtler, #D3F1A7)"), _defineProperty(_textBackgroundColorP, '#FEDEC8', "var(--ds-background-accent-orange-subtler, #FEDEC8)"), _defineProperty(_textBackgroundColorP, '#FDD0EC', "var(--ds-background-accent-magenta-subtler, #FDD0EC)"), _defineProperty(_textBackgroundColorP, '#DFD8FD', "var(--ds-background-accent-purple-subtler, #DFD8FD)"), _textBackgroundColorP);
|
|
8
|
+
/**
|
|
9
|
+
* This takes an ADF hex color and returns a matching text background palette color.
|
|
10
|
+
*
|
|
11
|
+
* By providing a design token, this enables ADF content to be rendered in new themes such as dark mode.
|
|
12
|
+
*
|
|
13
|
+
* Example usage
|
|
14
|
+
* ```tsx
|
|
15
|
+
* const cssValue = hexToEditorTextBackgroundPaletteColor('#D3F1A7');
|
|
16
|
+
*
|
|
17
|
+
* <span style={{backgroundColor: cssValue}} />
|
|
18
|
+
* ```
|
|
19
|
+
* The names of tokens can change over time, and the values of tokens will differ between themes.
|
|
20
|
+
* The exact output of this function is an implementation detail and should only be used when rendering
|
|
21
|
+
* content to the user, on a client with a matching major version of `@atlaskit/tokens`.
|
|
22
|
+
* - **DO NOT**: store the output of these functions in any user-generated content or back-end.
|
|
23
|
+
* - **DO**: store the ADF hex color, and use these utilities at render time to display the themed version of the color
|
|
24
|
+
*/
|
|
25
|
+
export function hexToEditorTextBackgroundPaletteColor(hexColor) {
|
|
26
|
+
// Ts ignore was used to allow use of conditional return type
|
|
27
|
+
// (preferring better type on consumption over safety in implementation)
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
return textBackgroundColorPalette[hexColor.toUpperCase()];
|
|
30
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ export { hexToEditorBackgroundPaletteColor, hexToEditorBackgroundPaletteRawValue
|
|
|
2
2
|
export { hexToEditorBorderPaletteColor } from './border';
|
|
3
3
|
export { hexToEditorTextPaletteColor } from './text';
|
|
4
4
|
export { hexToEditorTableChartsPaletteColor, hexToEditorTableChartsPaletteRawValue, } from './table-charts';
|
|
5
|
+
export { hexToEditorTextBackgroundPaletteColor } from './text-background-color';
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
/** Orange - light */
|
|
9
|
+
"#FEDEC8": "var(--ds-background-accent-orange-subtler, #FEDEC8)";
|
|
10
|
+
/** Magenta - light */
|
|
11
|
+
"#FDD0EC": "var(--ds-background-accent-magenta-subtler, #FDD0EC)";
|
|
12
|
+
/** Purple - light */
|
|
13
|
+
"#DFD8FD": "var(--ds-background-accent-purple-subtler, #DFD8FD)";
|
|
14
|
+
};
|
|
15
|
+
type TextBackgroundColorPalette = typeof textBackgroundColorPalette;
|
|
16
|
+
export type TextBackgroundColorPaletteKey = keyof TextBackgroundColorPalette;
|
|
17
|
+
/**
|
|
18
|
+
* This takes an ADF hex color and returns a matching text background palette color.
|
|
19
|
+
*
|
|
20
|
+
* By providing a design token, this enables ADF content to be rendered in new themes such as dark mode.
|
|
21
|
+
*
|
|
22
|
+
* Example usage
|
|
23
|
+
* ```tsx
|
|
24
|
+
* const cssValue = hexToEditorTextBackgroundPaletteColor('#D3F1A7');
|
|
25
|
+
*
|
|
26
|
+
* <span style={{backgroundColor: cssValue}} />
|
|
27
|
+
* ```
|
|
28
|
+
* The names of tokens can change over time, and the values of tokens will differ between themes.
|
|
29
|
+
* The exact output of this function is an implementation detail and should only be used when rendering
|
|
30
|
+
* content to the user, on a client with a matching major version of `@atlaskit/tokens`.
|
|
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 hexToEditorTextBackgroundPaletteColor<HexColor extends string>(hexColor: HexColor): HexColor extends TextBackgroundColorPaletteKey ? TextBackgroundColorPalette[HexColor] : string | undefined;
|
|
35
|
+
export {};
|
|
@@ -2,3 +2,4 @@ export { hexToEditorBackgroundPaletteColor, hexToEditorBackgroundPaletteRawValue
|
|
|
2
2
|
export { hexToEditorBorderPaletteColor } from './border';
|
|
3
3
|
export { hexToEditorTextPaletteColor } from './text';
|
|
4
4
|
export { hexToEditorTableChartsPaletteColor, hexToEditorTableChartsPaletteRawValue, } from './table-charts';
|
|
5
|
+
export { hexToEditorTextBackgroundPaletteColor } from './text-background-color';
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
/** Orange - light */
|
|
9
|
+
"#FEDEC8": "var(--ds-background-accent-orange-subtler, #FEDEC8)";
|
|
10
|
+
/** Magenta - light */
|
|
11
|
+
"#FDD0EC": "var(--ds-background-accent-magenta-subtler, #FDD0EC)";
|
|
12
|
+
/** Purple - light */
|
|
13
|
+
"#DFD8FD": "var(--ds-background-accent-purple-subtler, #DFD8FD)";
|
|
14
|
+
};
|
|
15
|
+
type TextBackgroundColorPalette = typeof textBackgroundColorPalette;
|
|
16
|
+
export type TextBackgroundColorPaletteKey = keyof TextBackgroundColorPalette;
|
|
17
|
+
/**
|
|
18
|
+
* This takes an ADF hex color and returns a matching text background palette color.
|
|
19
|
+
*
|
|
20
|
+
* By providing a design token, this enables ADF content to be rendered in new themes such as dark mode.
|
|
21
|
+
*
|
|
22
|
+
* Example usage
|
|
23
|
+
* ```tsx
|
|
24
|
+
* const cssValue = hexToEditorTextBackgroundPaletteColor('#D3F1A7');
|
|
25
|
+
*
|
|
26
|
+
* <span style={{backgroundColor: cssValue}} />
|
|
27
|
+
* ```
|
|
28
|
+
* The names of tokens can change over time, and the values of tokens will differ between themes.
|
|
29
|
+
* The exact output of this function is an implementation detail and should only be used when rendering
|
|
30
|
+
* content to the user, on a client with a matching major version of `@atlaskit/tokens`.
|
|
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 hexToEditorTextBackgroundPaletteColor<HexColor extends string>(hexColor: HexColor): HexColor extends TextBackgroundColorPaletteKey ? TextBackgroundColorPalette[HexColor] : string | undefined;
|
|
35
|
+
export {};
|
package/docs/0-intro.tsx
CHANGED
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { AtlassianInternalWarning, code, md } from '@atlaskit/docs';
|
|
4
4
|
import SectionMessage from '@atlaskit/section-message';
|
|
5
|
+
import { token } from '@atlaskit/tokens';
|
|
5
6
|
|
|
6
7
|
export default md`
|
|
7
8
|
${(<AtlassianInternalWarning />)}
|
|
@@ -36,7 +37,7 @@ or reach out to the Design System Team via the [Atlassian Developer Community fo
|
|
|
36
37
|
## API documentation
|
|
37
38
|
|
|
38
39
|
${(
|
|
39
|
-
<div style={{ marginTop: '
|
|
40
|
+
<div style={{ marginTop: token('space.100', '8px') }}>
|
|
40
41
|
<SectionMessage
|
|
41
42
|
title="Design token names and values are an implementation detail."
|
|
42
43
|
appearance="warning"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-palette",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "The editor palette",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -13,9 +13,10 @@
|
|
|
13
13
|
"inPublicMirror": true,
|
|
14
14
|
"website": {
|
|
15
15
|
"name": "Editor Palette"
|
|
16
|
-
}
|
|
16
|
+
},
|
|
17
|
+
"runReact18": false
|
|
17
18
|
},
|
|
18
|
-
"repository": "https://bitbucket.org/atlassian/atlassian-frontend",
|
|
19
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
19
20
|
"main": "dist/cjs/index.js",
|
|
20
21
|
"module": "dist/esm/index.js",
|
|
21
22
|
"module:es2019": "dist/es2019/index.js",
|
|
@@ -34,7 +35,7 @@
|
|
|
34
35
|
".": "./src/index.ts"
|
|
35
36
|
},
|
|
36
37
|
"dependencies": {
|
|
37
|
-
"@atlaskit/tokens": "^1.
|
|
38
|
+
"@atlaskit/tokens": "^1.44.0",
|
|
38
39
|
"@babel/runtime": "^7.0.0"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
@@ -42,7 +43,7 @@
|
|
|
42
43
|
"@testing-library/react": "^12.1.5",
|
|
43
44
|
"react": "^16.8.0",
|
|
44
45
|
"react-dom": "^16.8.0",
|
|
45
|
-
"typescript": "~4.
|
|
46
|
+
"typescript": "~5.4.2",
|
|
46
47
|
"wait-for-expect": "^1.2.0"
|
|
47
48
|
},
|
|
48
49
|
"techstack": {
|
|
@@ -55,13 +56,14 @@
|
|
|
55
56
|
]
|
|
56
57
|
},
|
|
57
58
|
"@repo/internal": {
|
|
58
|
-
"deprecation":
|
|
59
|
-
"no-deprecated-imports"
|
|
60
|
-
],
|
|
59
|
+
"deprecation": "no-deprecated-imports",
|
|
61
60
|
"design-tokens": [
|
|
62
61
|
"color"
|
|
62
|
+
],
|
|
63
|
+
"styling": [
|
|
64
|
+
"emotion"
|
|
63
65
|
]
|
|
64
66
|
}
|
|
65
67
|
},
|
|
66
68
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0"
|
|
67
|
-
}
|
|
69
|
+
}
|
package/tmp/api-report-tmp.d.ts
DELETED
|
@@ -1,319 +0,0 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/editor-palette"
|
|
2
|
-
|
|
3
|
-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
|
|
7
|
-
// @public (undocumented)
|
|
8
|
-
type EditorBackgroundPalette = typeof editorBackgroundPalette;
|
|
9
|
-
|
|
10
|
-
// @public
|
|
11
|
-
const editorBackgroundPalette: {
|
|
12
|
-
"#DEEBFF": {
|
|
13
|
-
getValue: (fallback: string) => string;
|
|
14
|
-
token: "var(--ds-background-accent-blue-subtlest, #DEEBFF)";
|
|
15
|
-
};
|
|
16
|
-
"#B3D4FF": {
|
|
17
|
-
getValue: (fallback: string) => string;
|
|
18
|
-
token: "var(--ds-background-accent-blue-subtler, #B3D4FF)";
|
|
19
|
-
};
|
|
20
|
-
"#4C9AFF": {
|
|
21
|
-
getValue: (fallback: string) => string;
|
|
22
|
-
token: "var(--ds-background-accent-blue-subtle, #4C9AFF)";
|
|
23
|
-
};
|
|
24
|
-
"#E6FCFF": {
|
|
25
|
-
getValue: (fallback: string) => string;
|
|
26
|
-
token: "var(--ds-background-accent-teal-subtlest, #E6FCFF)";
|
|
27
|
-
};
|
|
28
|
-
"#B3F5FF": {
|
|
29
|
-
getValue: (fallback: string) => string;
|
|
30
|
-
token: "var(--ds-background-accent-teal-subtler, #B3F5FF)";
|
|
31
|
-
};
|
|
32
|
-
"#79E2F2": {
|
|
33
|
-
getValue: (fallback: string) => string;
|
|
34
|
-
token: "var(--ds-background-accent-teal-subtle, #79E2F2)";
|
|
35
|
-
};
|
|
36
|
-
"#E3FCEF": {
|
|
37
|
-
getValue: (fallback: string) => string;
|
|
38
|
-
token: "var(--ds-background-accent-green-subtlest, #E3FCEF)";
|
|
39
|
-
};
|
|
40
|
-
"#ABF5D1": {
|
|
41
|
-
getValue: (fallback: string) => string;
|
|
42
|
-
token: "var(--ds-background-accent-green-subtler, #ABF5D1)";
|
|
43
|
-
};
|
|
44
|
-
"#57D9A3": {
|
|
45
|
-
getValue: (fallback: string) => string;
|
|
46
|
-
token: "var(--ds-background-accent-green-subtle, #57D9A3)";
|
|
47
|
-
};
|
|
48
|
-
"#FFFAE6": {
|
|
49
|
-
getValue: (fallback: string) => string;
|
|
50
|
-
token: "var(--ds-background-accent-yellow-subtlest, #FFFAE6)";
|
|
51
|
-
};
|
|
52
|
-
"#FFF0B3": {
|
|
53
|
-
getValue: (fallback: string) => string;
|
|
54
|
-
token: "var(--ds-background-accent-yellow-subtler, #FFF0B3)";
|
|
55
|
-
};
|
|
56
|
-
"#FFC400": {
|
|
57
|
-
getValue: (fallback: string) => string;
|
|
58
|
-
token: "var(--ds-background-accent-orange-subtle, #FFC400)";
|
|
59
|
-
};
|
|
60
|
-
"#FFEBE6": {
|
|
61
|
-
getValue: (fallback: string) => string;
|
|
62
|
-
token: "var(--ds-background-accent-red-subtlest, #FFEBE6)";
|
|
63
|
-
};
|
|
64
|
-
"#FFBDAD": {
|
|
65
|
-
getValue: (fallback: string) => string;
|
|
66
|
-
token: "var(--ds-background-accent-red-subtler, #FFBDAD)";
|
|
67
|
-
};
|
|
68
|
-
"#FF8F73": {
|
|
69
|
-
getValue: (fallback: string) => string;
|
|
70
|
-
token: "var(--ds-background-accent-red-subtle, #FF8F73)";
|
|
71
|
-
};
|
|
72
|
-
"#EAE6FF": {
|
|
73
|
-
getValue: (fallback: string) => string;
|
|
74
|
-
token: "var(--ds-background-accent-purple-subtlest, #EAE6FF)";
|
|
75
|
-
};
|
|
76
|
-
"#C0B6F2": {
|
|
77
|
-
getValue: (fallback: string) => string;
|
|
78
|
-
token: "var(--ds-background-accent-purple-subtler, #C0B6F2)";
|
|
79
|
-
};
|
|
80
|
-
"#998DD9": {
|
|
81
|
-
getValue: (fallback: string) => string;
|
|
82
|
-
token: "var(--ds-background-accent-purple-subtle, #998DD9)";
|
|
83
|
-
};
|
|
84
|
-
"#FFFFFF": {
|
|
85
|
-
getValue: (fallback: string) => string;
|
|
86
|
-
token: "var(--ds-surface, #FFFFFF)";
|
|
87
|
-
};
|
|
88
|
-
"#F4F5F7": {
|
|
89
|
-
getValue: (fallback: string) => string;
|
|
90
|
-
token: "var(--ds-background-accent-gray-subtlest, #F4F5F7)";
|
|
91
|
-
};
|
|
92
|
-
"#B3BAC5": {
|
|
93
|
-
getValue: (fallback: string) => string;
|
|
94
|
-
token: "var(--ds-background-accent-gray-subtle, #B3BAC5)";
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
// @public (undocumented)
|
|
99
|
-
type EditorBackgroundPaletteKey = keyof EditorBackgroundPalette;
|
|
100
|
-
|
|
101
|
-
// @public (undocumented)
|
|
102
|
-
type EditorBorderPalette = typeof editorBorderPalette;
|
|
103
|
-
|
|
104
|
-
// @public (undocumented)
|
|
105
|
-
const editorBorderPalette: {
|
|
106
|
-
"#091E4224": "var(--ds-border, #091E4224)";
|
|
107
|
-
"#758195": "var(--ds-border-bold, #758195)";
|
|
108
|
-
"#172B4D": "var(--ds-text, #172B4D)";
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
// @public (undocumented)
|
|
112
|
-
type EditorBorderPaletteKey = keyof EditorBorderPalette;
|
|
113
|
-
|
|
114
|
-
// @public (undocumented)
|
|
115
|
-
type EditorTableChartsPalette = typeof editorTableChartsPalette;
|
|
116
|
-
|
|
117
|
-
// @public
|
|
118
|
-
const editorTableChartsPalette: {
|
|
119
|
-
"#7AB2FF": {
|
|
120
|
-
getValue: (fallback: string) => string;
|
|
121
|
-
token: "var(--ds-background-accent-blue-subtle, #7AB2FF)";
|
|
122
|
-
};
|
|
123
|
-
"#60C6D2": {
|
|
124
|
-
getValue: (fallback: string) => string;
|
|
125
|
-
token: "var(--ds-background-accent-teal-subtle, #60C6D2)";
|
|
126
|
-
};
|
|
127
|
-
"#6BE1B0": {
|
|
128
|
-
getValue: (fallback: string) => string;
|
|
129
|
-
token: "var(--ds-background-accent-green-subtle, #6BE1B0)";
|
|
130
|
-
};
|
|
131
|
-
"#FFDB57": {
|
|
132
|
-
getValue: (fallback: string) => string;
|
|
133
|
-
token: "var(--ds-background-accent-yellow-subtle, #FFDB57)";
|
|
134
|
-
};
|
|
135
|
-
"#FAA53D": {
|
|
136
|
-
getValue: (fallback: string) => string;
|
|
137
|
-
token: "var(--ds-background-accent-orange-subtle, #FAA53D)";
|
|
138
|
-
};
|
|
139
|
-
"#FF8F73": {
|
|
140
|
-
getValue: (fallback: string) => string;
|
|
141
|
-
token: "var(--ds-background-accent-red-subtle, #FF8F73)";
|
|
142
|
-
};
|
|
143
|
-
"#E774BB": {
|
|
144
|
-
getValue: (fallback: string) => string;
|
|
145
|
-
token: "var(--ds-background-accent-magenta-subtle, #E774BB)";
|
|
146
|
-
};
|
|
147
|
-
"#B5A7FB": {
|
|
148
|
-
getValue: (fallback: string) => string;
|
|
149
|
-
token: "var(--ds-background-accent-purple-subtle, #B5A7FB)";
|
|
150
|
-
};
|
|
151
|
-
"#8993A5": {
|
|
152
|
-
getValue: (fallback: string) => string;
|
|
153
|
-
token: "var(--ds-background-accent-gray-subtler, #8993A5)";
|
|
154
|
-
};
|
|
155
|
-
"#247FFF": {
|
|
156
|
-
getValue: (fallback: string) => string;
|
|
157
|
-
token: "var(--ds-chart-blue-bold, #247FFF)";
|
|
158
|
-
};
|
|
159
|
-
"#1D9AAA": {
|
|
160
|
-
getValue: (fallback: string) => string;
|
|
161
|
-
token: "var(--ds-chart-teal-bold, #1D9AAA)";
|
|
162
|
-
};
|
|
163
|
-
"#23A971": {
|
|
164
|
-
getValue: (fallback: string) => string;
|
|
165
|
-
token: "var(--ds-chart-green-bold, #23A971)";
|
|
166
|
-
};
|
|
167
|
-
"#FFBE33": {
|
|
168
|
-
getValue: (fallback: string) => string;
|
|
169
|
-
token: "var(--ds-chart-yellow-bold, #FFBE33)";
|
|
170
|
-
};
|
|
171
|
-
"#D97008": {
|
|
172
|
-
getValue: (fallback: string) => string;
|
|
173
|
-
token: "var(--ds-chart-orange-bold, #D97008)";
|
|
174
|
-
};
|
|
175
|
-
"#FC552C": {
|
|
176
|
-
getValue: (fallback: string) => string;
|
|
177
|
-
token: "var(--ds-chart-red-bold, #FC552C)";
|
|
178
|
-
};
|
|
179
|
-
"#DA62AC": {
|
|
180
|
-
getValue: (fallback: string) => string;
|
|
181
|
-
token: "var(--ds-chart-magenta-bold, #DA62AC)";
|
|
182
|
-
};
|
|
183
|
-
"#8B77EE": {
|
|
184
|
-
getValue: (fallback: string) => string;
|
|
185
|
-
token: "var(--ds-chart-purple-bold, #8B77EE)";
|
|
186
|
-
};
|
|
187
|
-
"#8590A2": {
|
|
188
|
-
getValue: (fallback: string) => string;
|
|
189
|
-
token: "var(--ds-chart-gray-bold, #8590A2)";
|
|
190
|
-
};
|
|
191
|
-
"#0055CC": {
|
|
192
|
-
getValue: (fallback: string) => string;
|
|
193
|
-
token: "var(--ds-chart-blue-bolder, #0055CC)";
|
|
194
|
-
};
|
|
195
|
-
"#1D7F8C": {
|
|
196
|
-
getValue: (fallback: string) => string;
|
|
197
|
-
token: "var(--ds-chart-teal-bolder, #1D7F8C)";
|
|
198
|
-
};
|
|
199
|
-
"#177D52": {
|
|
200
|
-
getValue: (fallback: string) => string;
|
|
201
|
-
token: "var(--ds-chart-green-bolder, #177D52)";
|
|
202
|
-
};
|
|
203
|
-
"#FF9D00": {
|
|
204
|
-
getValue: (fallback: string) => string;
|
|
205
|
-
token: "var(--ds-chart-yellow-bolder, #FF9D00)";
|
|
206
|
-
};
|
|
207
|
-
"#B65C02": {
|
|
208
|
-
getValue: (fallback: string) => string;
|
|
209
|
-
token: "var(--ds-chart-orange-bolder, #B65C02)";
|
|
210
|
-
};
|
|
211
|
-
"#D32D03": {
|
|
212
|
-
getValue: (fallback: string) => string;
|
|
213
|
-
token: "var(--ds-chart-red-bolder, #D32D03)";
|
|
214
|
-
};
|
|
215
|
-
"#CD519D": {
|
|
216
|
-
getValue: (fallback: string) => string;
|
|
217
|
-
token: "var(--ds-chart-magenta-bolder, #CD519D)";
|
|
218
|
-
};
|
|
219
|
-
"#5A43D0": {
|
|
220
|
-
getValue: (fallback: string) => string;
|
|
221
|
-
token: "var(--ds-chart-purple-bolder, #5A43D0)";
|
|
222
|
-
};
|
|
223
|
-
"#758195": {
|
|
224
|
-
getValue: (fallback: string) => string;
|
|
225
|
-
token: "var(--ds-chart-gray-bolder, #758195)";
|
|
226
|
-
};
|
|
227
|
-
"#003884": {
|
|
228
|
-
getValue: (fallback: string) => string;
|
|
229
|
-
token: "var(--ds-chart-blue-boldest, #003884)";
|
|
230
|
-
};
|
|
231
|
-
"#206B74": {
|
|
232
|
-
getValue: (fallback: string) => string;
|
|
233
|
-
token: "var(--ds-chart-teal-boldest, #206B74)";
|
|
234
|
-
};
|
|
235
|
-
"#055C3F": {
|
|
236
|
-
getValue: (fallback: string) => string;
|
|
237
|
-
token: "var(--ds-chart-green-boldest, #055C3F)";
|
|
238
|
-
};
|
|
239
|
-
"#946104": {
|
|
240
|
-
getValue: (fallback: string) => string;
|
|
241
|
-
token: "var(--ds-chart-yellow-boldest, #946104)";
|
|
242
|
-
};
|
|
243
|
-
"#974F0C": {
|
|
244
|
-
getValue: (fallback: string) => string;
|
|
245
|
-
token: "var(--ds-chart-orange-boldest, #974F0C)";
|
|
246
|
-
};
|
|
247
|
-
"#A32000": {
|
|
248
|
-
getValue: (fallback: string) => string;
|
|
249
|
-
token: "var(--ds-chart-red-boldest, #A32000)";
|
|
250
|
-
};
|
|
251
|
-
"#943D73": {
|
|
252
|
-
getValue: (fallback: string) => string;
|
|
253
|
-
token: "var(--ds-chart-magenta-boldest, #943D73)";
|
|
254
|
-
};
|
|
255
|
-
"#44368B": {
|
|
256
|
-
getValue: (fallback: string) => string;
|
|
257
|
-
token: "var(--ds-chart-purple-boldest, #44368B)";
|
|
258
|
-
};
|
|
259
|
-
"#44546F": {
|
|
260
|
-
getValue: (fallback: string) => string;
|
|
261
|
-
token: "var(--ds-chart-gray-boldest, #44546F)";
|
|
262
|
-
};
|
|
263
|
-
};
|
|
264
|
-
|
|
265
|
-
// @public (undocumented)
|
|
266
|
-
type EditorTableChartsPaletteKey = keyof EditorTableChartsPalette;
|
|
267
|
-
|
|
268
|
-
// @public (undocumented)
|
|
269
|
-
type EditorTextPalette = typeof editorTextPalette;
|
|
270
|
-
|
|
271
|
-
// @public (undocumented)
|
|
272
|
-
const editorTextPalette: {
|
|
273
|
-
"#B3D4FF": "var(--ds-background-accent-blue-subtler, #B3D4FF)";
|
|
274
|
-
"#4C9AFF": "var(--ds-icon-accent-blue, #4C9AFF)";
|
|
275
|
-
"#0747A6": "var(--ds-text-accent-blue, #0747A6)";
|
|
276
|
-
"#B3F5FF": "var(--ds-background-accent-teal-subtler, #B3F5FF)";
|
|
277
|
-
"#00B8D9": "var(--ds-icon-accent-teal, #00B8D9)";
|
|
278
|
-
"#008DA6": "var(--ds-text-accent-teal, #008DA6)";
|
|
279
|
-
"#ABF5D1": "var(--ds-background-accent-green-subtler, #ABF5D1)";
|
|
280
|
-
"#36B37E": "var(--ds-icon-accent-green, #36B37E)";
|
|
281
|
-
"#006644": "var(--ds-text-accent-green, #006644)";
|
|
282
|
-
"#FFF0B3": "var(--ds-background-accent-yellow-subtler, #FFF0B3)";
|
|
283
|
-
"#FFC400": "var(--ds-background-accent-orange-subtle, #FFC400)";
|
|
284
|
-
"#FF991F": "var(--ds-icon-accent-orange, #FF991F)";
|
|
285
|
-
"#FFBDAD": "var(--ds-background-accent-red-subtler, #FFBDAD)";
|
|
286
|
-
"#FF5630": "var(--ds-icon-accent-red, #FF5630)";
|
|
287
|
-
"#BF2600": "var(--ds-text-accent-red, #BF2600)";
|
|
288
|
-
"#EAE6FF": "var(--ds-background-accent-purple-subtler, #EAE6FF)";
|
|
289
|
-
"#6554C0": "var(--ds-icon-accent-purple, #6554C0)";
|
|
290
|
-
"#403294": "var(--ds-text-accent-purple, #403294)";
|
|
291
|
-
"#FFFFFF": "var(--ds-text-inverse, #FFFFFF)";
|
|
292
|
-
"#97A0AF": "var(--ds-icon-accent-gray, #97A0AF)";
|
|
293
|
-
"#172B4D": "var(--ds-text, #172B4D)";
|
|
294
|
-
};
|
|
295
|
-
|
|
296
|
-
// @public (undocumented)
|
|
297
|
-
type EditorTextPaletteKey = keyof EditorTextPalette;
|
|
298
|
-
|
|
299
|
-
// @public
|
|
300
|
-
export function hexToEditorBackgroundPaletteColor<HexColor extends string>(hexColor: HexColor): HexColor extends EditorBackgroundPaletteKey ? EditorBackgroundPalette[HexColor]['token'] : string | undefined;
|
|
301
|
-
|
|
302
|
-
// @public
|
|
303
|
-
export function hexToEditorBackgroundPaletteRawValue<HexColor extends string>(hexColor: HexColor): HexColor extends EditorBackgroundPaletteKey ? string : undefined;
|
|
304
|
-
|
|
305
|
-
// @public
|
|
306
|
-
export function hexToEditorBorderPaletteColor<HexColor extends string>(hexColor: HexColor): HexColor extends EditorBorderPaletteKey ? EditorBorderPalette[HexColor] : string | undefined;
|
|
307
|
-
|
|
308
|
-
// @public
|
|
309
|
-
export function hexToEditorTableChartsPaletteColor<HexColor extends string>(hexColor: HexColor): HexColor extends EditorTableChartsPaletteKey ? EditorTableChartsPalette[HexColor]['token'] : string | undefined;
|
|
310
|
-
|
|
311
|
-
// @public
|
|
312
|
-
export function hexToEditorTableChartsPaletteRawValue<HexColor extends string>(hexColor: HexColor): HexColor extends EditorTableChartsPaletteKey ? string : undefined;
|
|
313
|
-
|
|
314
|
-
// @public
|
|
315
|
-
export function hexToEditorTextPaletteColor<HexColor extends string>(hexColor: HexColor): HexColor extends EditorTextPaletteKey ? EditorTextPalette[HexColor] : string | undefined;
|
|
316
|
-
|
|
317
|
-
// (No @packageDocumentation comment for this package)
|
|
318
|
-
|
|
319
|
-
```
|