@atlaskit/ds-explorations 3.5.0 → 3.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 +368 -141
- package/dist/cjs/components/interaction-surface.partial.js +2 -2
- package/dist/cjs/components/text.partial.js +4 -4
- package/dist/cjs/internal/color-map.js +2 -2
- package/dist/cjs/internal/spacing-scale.js +1 -1
- package/dist/es2019/components/interaction-surface.partial.js +2 -2
- package/dist/es2019/components/text.partial.js +4 -4
- package/dist/es2019/internal/color-map.js +2 -2
- package/dist/es2019/internal/spacing-scale.js +1 -1
- package/dist/esm/components/interaction-surface.partial.js +2 -2
- package/dist/esm/components/text.partial.js +4 -4
- package/dist/esm/internal/color-map.js +2 -2
- package/dist/esm/internal/spacing-scale.js +1 -1
- package/dist/types/components/interaction-surface.partial.d.ts +2 -2
- package/dist/types/components/text.partial.d.ts +5 -5
- package/dist/types/internal/color-map.d.ts +2 -2
- package/dist/types/internal/spacing-scale.d.ts +1 -1
- package/dist/types-ts4.5/components/interaction-surface.partial.d.ts +2 -2
- package/dist/types-ts4.5/components/text.partial.d.ts +5 -5
- package/dist/types-ts4.5/internal/color-map.d.ts +2 -2
- package/dist/types-ts4.5/internal/spacing-scale.d.ts +1 -1
- package/package.json +5 -4
- package/scripts/__tests__/__snapshots__/codegen.test.tsx.snap +540 -754
- package/scripts/color-codegen-template.tsx +4 -11
- package/scripts/color-map-template.tsx +3 -10
- package/scripts/dimension-codegen-template.tsx +3 -9
- package/scripts/interaction-codegen.tsx +3 -11
- package/scripts/misc-codegen-template.tsx +4 -10
- package/scripts/spacing-codegen-template.tsx +3 -11
- package/scripts/spacing-scale-template.tsx +3 -10
- package/scripts/typography-codegen-template.tsx +3 -11
- package/src/components/interaction-surface.partial.tsx +382 -596
- package/src/components/text.partial.tsx +143 -143
- package/src/internal/color-map.tsx +29 -29
- package/src/internal/spacing-scale.tsx +15 -15
- package/tsconfig.app.json +3 -0
- package/tsconfig.dev.json +3 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { createContext, FC, Fragment, ReactNode, useContext } from 'react';
|
|
2
|
+
import { createContext, type FC, Fragment, type ReactNode, useContext } from 'react';
|
|
3
3
|
|
|
4
4
|
import { css, jsx } from '@emotion/react';
|
|
5
5
|
import invariant from 'tiny-invariant';
|
|
@@ -189,127 +189,127 @@ export default Text;
|
|
|
189
189
|
|
|
190
190
|
/**
|
|
191
191
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
192
|
-
* @codegen <<SignedSource::
|
|
192
|
+
* @codegen <<SignedSource::c5a6cec604462dc4b48aaf1160b83e59>>
|
|
193
193
|
* @codegenId typography
|
|
194
194
|
* @codegenCommand yarn codegen-styles
|
|
195
195
|
* @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight"]
|
|
196
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-typography-adg3.tsx <<SignedSource::
|
|
196
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-typography-adg3.tsx <<SignedSource::bf3349cf2247aa44fbac47c953fc03b5>>
|
|
197
197
|
*/
|
|
198
198
|
const fontSizeMap = {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
199
|
+
'size.050': css({
|
|
200
|
+
fontSize: token('font.size.050', '11px'),
|
|
201
|
+
}),
|
|
202
|
+
'size.075': css({
|
|
203
|
+
fontSize: token('font.size.075', '12px'),
|
|
204
|
+
}),
|
|
205
|
+
'size.100': css({
|
|
206
|
+
fontSize: token('font.size.100', '14px'),
|
|
207
|
+
}),
|
|
208
|
+
'size.200': css({
|
|
209
|
+
fontSize: token('font.size.200', '16px'),
|
|
210
|
+
}),
|
|
211
|
+
'size.300': css({
|
|
212
|
+
fontSize: token('font.size.300', '20px'),
|
|
213
|
+
}),
|
|
214
|
+
'size.400': css({
|
|
215
|
+
fontSize: token('font.size.400', '24px'),
|
|
216
|
+
}),
|
|
217
|
+
'size.500': css({
|
|
218
|
+
fontSize: token('font.size.500', '29px'),
|
|
219
|
+
}),
|
|
220
|
+
'size.600': css({
|
|
221
|
+
fontSize: token('font.size.600', '35px'),
|
|
222
|
+
}),
|
|
223
223
|
};
|
|
224
224
|
|
|
225
225
|
export type FontSize = keyof typeof fontSizeMap;
|
|
226
226
|
|
|
227
227
|
const fontWeightMap = {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
228
|
+
bold: css({
|
|
229
|
+
fontWeight: token('font.weight.bold', '700'),
|
|
230
|
+
}),
|
|
231
|
+
medium: css({
|
|
232
|
+
fontWeight: token('font.weight.medium', '500'),
|
|
233
|
+
}),
|
|
234
|
+
regular: css({
|
|
235
|
+
fontWeight: token('font.weight.regular', '400'),
|
|
236
|
+
}),
|
|
237
|
+
semibold: css({
|
|
238
|
+
fontWeight: token('font.weight.semibold', '600'),
|
|
239
|
+
}),
|
|
240
240
|
};
|
|
241
241
|
|
|
242
242
|
export type FontWeight = keyof typeof fontWeightMap;
|
|
243
243
|
|
|
244
244
|
const fontFamilyMap = {
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
245
|
+
body: css({
|
|
246
|
+
fontFamily: token(
|
|
247
|
+
'font.family.body',
|
|
248
|
+
'ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
249
|
+
),
|
|
250
|
+
}),
|
|
251
|
+
'brand.body': css({
|
|
252
|
+
fontFamily: token(
|
|
253
|
+
'font.family.brand.body',
|
|
254
|
+
'"Charlie Text", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
255
|
+
),
|
|
256
|
+
}),
|
|
257
|
+
'brand.heading': css({
|
|
258
|
+
fontFamily: token(
|
|
259
|
+
'font.family.brand.heading',
|
|
260
|
+
'"Charlie Display", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
261
|
+
),
|
|
262
|
+
}),
|
|
263
|
+
code: css({
|
|
264
|
+
fontFamily: token(
|
|
265
|
+
'font.family.code',
|
|
266
|
+
'ui-monospace, Menlo, "Segoe UI Mono", "Ubuntu Mono", monospace',
|
|
267
|
+
),
|
|
268
|
+
}),
|
|
269
|
+
heading: css({
|
|
270
|
+
fontFamily: token(
|
|
271
|
+
'font.family.heading',
|
|
272
|
+
'ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
273
|
+
),
|
|
274
|
+
}),
|
|
275
|
+
monospace: css({
|
|
276
|
+
fontFamily: token(
|
|
277
|
+
'font.family.monospace',
|
|
278
|
+
'ui-monospace, Menlo, "Segoe UI Mono", "Ubuntu Mono", monospace',
|
|
279
|
+
),
|
|
280
|
+
}),
|
|
281
|
+
sans: css({
|
|
282
|
+
fontFamily: token(
|
|
283
|
+
'font.family.sans',
|
|
284
|
+
'-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif',
|
|
285
|
+
),
|
|
286
|
+
}),
|
|
287
287
|
};
|
|
288
288
|
|
|
289
289
|
export type FontFamily = keyof typeof fontFamilyMap;
|
|
290
290
|
|
|
291
291
|
const lineHeightMap = {
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
292
|
+
'lineHeight.1': css({
|
|
293
|
+
lineHeight: token('font.lineHeight.1', '1'),
|
|
294
|
+
}),
|
|
295
|
+
'lineHeight.100': css({
|
|
296
|
+
lineHeight: token('font.lineHeight.100', '16px'),
|
|
297
|
+
}),
|
|
298
|
+
'lineHeight.200': css({
|
|
299
|
+
lineHeight: token('font.lineHeight.200', '20px'),
|
|
300
|
+
}),
|
|
301
|
+
'lineHeight.300': css({
|
|
302
|
+
lineHeight: token('font.lineHeight.300', '24px'),
|
|
303
|
+
}),
|
|
304
|
+
'lineHeight.400': css({
|
|
305
|
+
lineHeight: token('font.lineHeight.400', '28px'),
|
|
306
|
+
}),
|
|
307
|
+
'lineHeight.500': css({
|
|
308
|
+
lineHeight: token('font.lineHeight.500', '32px'),
|
|
309
|
+
}),
|
|
310
|
+
'lineHeight.600': css({
|
|
311
|
+
lineHeight: token('font.lineHeight.600', '40px'),
|
|
312
|
+
}),
|
|
313
313
|
};
|
|
314
314
|
|
|
315
315
|
export type LineHeight = keyof typeof lineHeightMap;
|
|
@@ -320,52 +320,52 @@ export type LineHeight = keyof typeof lineHeightMap;
|
|
|
320
320
|
|
|
321
321
|
/**
|
|
322
322
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
323
|
-
* @codegen <<SignedSource::
|
|
323
|
+
* @codegen <<SignedSource::db9171c09481d187d83bb01192c16c41>>
|
|
324
324
|
* @codegenId colors
|
|
325
325
|
* @codegenCommand yarn codegen-styles
|
|
326
326
|
* @codegenParams ["text"]
|
|
327
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::
|
|
327
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::f27d1519d51cc4a85383a00907847774>>
|
|
328
328
|
*/
|
|
329
329
|
const textColorMap = {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
330
|
+
'color.text': css({
|
|
331
|
+
color: token('color.text', '#172B4D'),
|
|
332
|
+
}),
|
|
333
|
+
disabled: css({
|
|
334
|
+
color: token('color.text.disabled', '#A5ADBA'),
|
|
335
|
+
}),
|
|
336
|
+
inverse: css({
|
|
337
|
+
color: token('color.text.inverse', '#FFFFFF'),
|
|
338
|
+
}),
|
|
339
|
+
selected: css({
|
|
340
|
+
color: token('color.text.selected', '#0052CC'),
|
|
341
|
+
}),
|
|
342
|
+
brand: css({
|
|
343
|
+
color: token('color.text.brand', '#0065FF'),
|
|
344
|
+
}),
|
|
345
|
+
danger: css({
|
|
346
|
+
color: token('color.text.danger', '#DE350B'),
|
|
347
|
+
}),
|
|
348
|
+
warning: css({
|
|
349
|
+
color: token('color.text.warning', '#974F0C'),
|
|
350
|
+
}),
|
|
351
|
+
'warning.inverse': css({
|
|
352
|
+
color: token('color.text.warning.inverse', '#172B4D'),
|
|
353
|
+
}),
|
|
354
|
+
success: css({
|
|
355
|
+
color: token('color.text.success', '#006644'),
|
|
356
|
+
}),
|
|
357
|
+
discovery: css({
|
|
358
|
+
color: token('color.text.discovery', '#403294'),
|
|
359
|
+
}),
|
|
360
|
+
information: css({
|
|
361
|
+
color: token('color.text.information', '#0052CC'),
|
|
362
|
+
}),
|
|
363
|
+
subtlest: css({
|
|
364
|
+
color: token('color.text.subtlest', '#7A869A'),
|
|
365
|
+
}),
|
|
366
|
+
subtle: css({
|
|
367
|
+
color: token('color.text.subtle', '#42526E'),
|
|
368
|
+
}),
|
|
369
369
|
} as const;
|
|
370
370
|
|
|
371
371
|
export type TextColor = keyof typeof textColorMap;
|
|
@@ -3,36 +3,36 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The color map is used to map a background color token to a matching text color that will meet contrast.
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::4069cec92f6504471d42a7c6cc0f7930>>
|
|
7
7
|
* @codegenCommand yarn codegen-styles
|
|
8
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::f27d1519d51cc4a85383a00907847774>>
|
|
9
9
|
*/
|
|
10
10
|
export default {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
11
|
+
'neutral.bold': 'inverse',
|
|
12
|
+
'neutral.bold.hovered': 'inverse',
|
|
13
|
+
'neutral.bold.pressed': 'inverse',
|
|
14
|
+
'selected.bold': 'inverse',
|
|
15
|
+
'selected.bold.hovered': 'inverse',
|
|
16
|
+
'selected.bold.pressed': 'inverse',
|
|
17
|
+
'brand.bold': 'inverse',
|
|
18
|
+
'brand.bold.hovered': 'inverse',
|
|
19
|
+
'brand.bold.pressed': 'inverse',
|
|
20
|
+
'brand.boldest': 'inverse',
|
|
21
|
+
'brand.boldest.hovered': 'inverse',
|
|
22
|
+
'brand.boldest.pressed': 'inverse',
|
|
23
|
+
'danger.bold': 'inverse',
|
|
24
|
+
'danger.bold.hovered': 'inverse',
|
|
25
|
+
'danger.bold.pressed': 'inverse',
|
|
26
|
+
'warning.bold': 'warning.inverse',
|
|
27
|
+
'warning.bold.hovered': 'warning.inverse',
|
|
28
|
+
'warning.bold.pressed': 'warning.inverse',
|
|
29
|
+
'success.bold': 'inverse',
|
|
30
|
+
'success.bold.hovered': 'inverse',
|
|
31
|
+
'success.bold.pressed': 'inverse',
|
|
32
|
+
'discovery.bold': 'inverse',
|
|
33
|
+
'discovery.bold.hovered': 'inverse',
|
|
34
|
+
'discovery.bold.pressed': 'inverse',
|
|
35
|
+
'information.bold': 'inverse',
|
|
36
|
+
'information.bold.hovered': 'inverse',
|
|
37
|
+
'information.bold.pressed': 'inverse',
|
|
38
38
|
} as const;
|
|
@@ -3,22 +3,22 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Internal codegen of the spacing scale values. Only used for internal examples.
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::33634cd9767c59b9aaaf64fc6f44f852>>
|
|
7
7
|
* @codegenCommand yarn codegen-styles
|
|
8
8
|
*/
|
|
9
9
|
export const spacingScale = [
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
10
|
+
'space.0',
|
|
11
|
+
'space.025',
|
|
12
|
+
'space.050',
|
|
13
|
+
'space.075',
|
|
14
|
+
'space.100',
|
|
15
|
+
'space.150',
|
|
16
|
+
'space.200',
|
|
17
|
+
'space.250',
|
|
18
|
+
'space.300',
|
|
19
|
+
'space.400',
|
|
20
|
+
'space.500',
|
|
21
|
+
'space.600',
|
|
22
|
+
'space.800',
|
|
23
|
+
'space.1000',
|
|
24
24
|
] as const;
|
package/tsconfig.app.json
CHANGED