@atlaskit/ds-explorations 1.6.4 → 2.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.
- package/CHANGELOG.md +24 -0
- package/dist/cjs/components/box.partial.js +48 -45
- package/dist/cjs/components/inline.partial.js +15 -15
- package/dist/cjs/components/interaction-surface.partial.js +2 -2
- package/dist/cjs/components/stack.partial.js +15 -15
- package/dist/cjs/components/text.partial.js +88 -58
- package/dist/cjs/internal/color-map.js +2 -2
- package/dist/cjs/internal/spacing-scale.js +2 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/box.partial.js +48 -45
- package/dist/es2019/components/inline.partial.js +15 -15
- package/dist/es2019/components/interaction-surface.partial.js +2 -2
- package/dist/es2019/components/stack.partial.js +15 -15
- package/dist/es2019/components/text.partial.js +87 -57
- package/dist/es2019/internal/color-map.js +2 -2
- package/dist/es2019/internal/spacing-scale.js +2 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/box.partial.js +48 -45
- package/dist/esm/components/inline.partial.js +15 -15
- package/dist/esm/components/interaction-surface.partial.js +2 -2
- package/dist/esm/components/stack.partial.js +15 -15
- package/dist/esm/components/text.partial.js +87 -57
- package/dist/esm/internal/color-map.js +2 -2
- package/dist/esm/internal/spacing-scale.js +2 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/components/box.partial.d.ts +46 -45
- package/dist/types/components/inline.partial.d.ts +15 -15
- package/dist/types/components/stack.partial.d.ts +15 -15
- package/dist/types/components/text.partial.d.ts +45 -25
- package/dist/types/internal/color-map.d.ts +2 -2
- package/dist/types/internal/spacing-scale.d.ts +2 -2
- package/examples/00-basic.tsx +3 -3
- package/examples/01-box.tsx +18 -18
- package/examples/02-text-advanced.tsx +9 -9
- package/examples/02-text.tsx +36 -16
- package/examples/03-stack.tsx +26 -26
- package/examples/04-inline.tsx +26 -26
- package/examples/05-badge.tsx +2 -2
- package/examples/06-section-message.tsx +6 -6
- package/examples/07-comment.tsx +5 -5
- package/examples/08-lozenge.tsx +4 -4
- package/examples/99-interactions.tsx +16 -16
- package/package.json +1 -1
- package/report.api.md +90 -85
- package/scripts/codegen-styles.tsx +27 -0
- package/scripts/spacing-codegen-template.tsx +3 -4
- package/scripts/spacing-scale-template.tsx +3 -5
- package/scripts/typography-codegen-template.tsx +80 -0
- package/src/components/__tests__/unit/inline.test.tsx +3 -3
- package/src/components/__tests__/unit/stack.test.tsx +2 -2
- package/src/components/__tests__/unit/text.test.tsx +3 -3
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-background-and-padding-block-should-match-snapshot-1-snap.png +2 -2
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-background-and-padding-inline-should-match-snapshot-1-snap.png +2 -2
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-background-and-padding-should-match-snapshot-1-snap.png +2 -2
- package/src/components/__tests__/visual-regression/__image_snapshots__/inline-snapshot-test-tsx-inline-spacing-example-should-match-snapshot-1-snap.png +2 -2
- package/src/components/__tests__/visual-regression/__image_snapshots__/stack-snapshot-test-tsx-stack-spacing-example-should-match-snapshot-1-snap.png +2 -2
- package/src/components/__tests__/visual-regression/__image_snapshots__/text-snapshot-test-tsx-text-example-with-font-sizes-should-match-snapshot-1-snap.png +2 -2
- package/src/components/__tests__/visual-regression/__image_snapshots__/text-snapshot-test-tsx-text-example-with-font-weights-should-match-snapshot-1-snap.png +2 -2
- package/src/components/__tests__/visual-regression/__image_snapshots__/text-snapshot-test-tsx-text-example-with-line-heights-should-match-snapshot-1-snap.png +2 -2
- package/src/components/box.partial.tsx +46 -45
- package/src/components/inline.partial.tsx +15 -15
- package/src/components/interaction-surface.partial.tsx +2 -2
- package/src/components/stack.partial.tsx +15 -15
- package/src/components/text.partial.tsx +103 -34
- package/src/internal/color-map.tsx +2 -2
- package/src/internal/spacing-scale.tsx +15 -15
- package/tmp/api-report-tmp.d.ts +90 -85
|
@@ -169,6 +169,9 @@ var displayMap = {
|
|
|
169
169
|
}),
|
|
170
170
|
inlineFlex: css({
|
|
171
171
|
display: 'inline-flex'
|
|
172
|
+
}),
|
|
173
|
+
inlineBlock: css({
|
|
174
|
+
display: 'inline-block'
|
|
172
175
|
})
|
|
173
176
|
};
|
|
174
177
|
var positionMap = {
|
|
@@ -265,141 +268,141 @@ var heightMap = {
|
|
|
265
268
|
|
|
266
269
|
/**
|
|
267
270
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
268
|
-
* @codegen <<SignedSource::
|
|
271
|
+
* @codegen <<SignedSource::99c5403dd8b57b15bf1240cc456b6b16>>
|
|
269
272
|
* @codegenId spacing
|
|
270
273
|
* @codegenCommand yarn codegen-styles
|
|
271
274
|
* @codegenParams ["padding", "paddingBlock", "paddingInline"]
|
|
272
275
|
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::a2b43f8447798dfdd9c6223bd22b78c7>>
|
|
273
276
|
*/
|
|
274
277
|
var paddingMap = {
|
|
275
|
-
'
|
|
278
|
+
'space.0': css({
|
|
276
279
|
padding: "var(--ds-space-0, 0px)"
|
|
277
280
|
}),
|
|
278
|
-
'
|
|
281
|
+
'space.025': css({
|
|
279
282
|
padding: "var(--ds-space-025, 2px)"
|
|
280
283
|
}),
|
|
281
|
-
'
|
|
284
|
+
'space.050': css({
|
|
282
285
|
padding: "var(--ds-space-050, 4px)"
|
|
283
286
|
}),
|
|
284
|
-
'
|
|
287
|
+
'space.075': css({
|
|
285
288
|
padding: "var(--ds-space-075, 6px)"
|
|
286
289
|
}),
|
|
287
|
-
'
|
|
290
|
+
'space.100': css({
|
|
288
291
|
padding: "var(--ds-space-100, 8px)"
|
|
289
292
|
}),
|
|
290
|
-
'
|
|
293
|
+
'space.1000': css({
|
|
291
294
|
padding: "var(--ds-space-1000, 80px)"
|
|
292
295
|
}),
|
|
293
|
-
'
|
|
296
|
+
'space.150': css({
|
|
294
297
|
padding: "var(--ds-space-150, 12px)"
|
|
295
298
|
}),
|
|
296
|
-
'
|
|
299
|
+
'space.200': css({
|
|
297
300
|
padding: "var(--ds-space-200, 16px)"
|
|
298
301
|
}),
|
|
299
|
-
'
|
|
302
|
+
'space.250': css({
|
|
300
303
|
padding: "var(--ds-space-250, 20px)"
|
|
301
304
|
}),
|
|
302
|
-
'
|
|
305
|
+
'space.300': css({
|
|
303
306
|
padding: "var(--ds-space-300, 24px)"
|
|
304
307
|
}),
|
|
305
|
-
'
|
|
308
|
+
'space.400': css({
|
|
306
309
|
padding: "var(--ds-space-400, 32px)"
|
|
307
310
|
}),
|
|
308
|
-
'
|
|
311
|
+
'space.500': css({
|
|
309
312
|
padding: "var(--ds-space-500, 40px)"
|
|
310
313
|
}),
|
|
311
|
-
'
|
|
314
|
+
'space.600': css({
|
|
312
315
|
padding: "var(--ds-space-600, 48px)"
|
|
313
316
|
}),
|
|
314
|
-
'
|
|
317
|
+
'space.800': css({
|
|
315
318
|
padding: "var(--ds-space-800, 64px)"
|
|
316
319
|
})
|
|
317
320
|
};
|
|
318
321
|
var paddingBlockMap = {
|
|
319
|
-
'
|
|
322
|
+
'space.0': css({
|
|
320
323
|
paddingBlock: "var(--ds-space-0, 0px)"
|
|
321
324
|
}),
|
|
322
|
-
'
|
|
325
|
+
'space.025': css({
|
|
323
326
|
paddingBlock: "var(--ds-space-025, 2px)"
|
|
324
327
|
}),
|
|
325
|
-
'
|
|
328
|
+
'space.050': css({
|
|
326
329
|
paddingBlock: "var(--ds-space-050, 4px)"
|
|
327
330
|
}),
|
|
328
|
-
'
|
|
331
|
+
'space.075': css({
|
|
329
332
|
paddingBlock: "var(--ds-space-075, 6px)"
|
|
330
333
|
}),
|
|
331
|
-
'
|
|
334
|
+
'space.100': css({
|
|
332
335
|
paddingBlock: "var(--ds-space-100, 8px)"
|
|
333
336
|
}),
|
|
334
|
-
'
|
|
337
|
+
'space.1000': css({
|
|
335
338
|
paddingBlock: "var(--ds-space-1000, 80px)"
|
|
336
339
|
}),
|
|
337
|
-
'
|
|
340
|
+
'space.150': css({
|
|
338
341
|
paddingBlock: "var(--ds-space-150, 12px)"
|
|
339
342
|
}),
|
|
340
|
-
'
|
|
343
|
+
'space.200': css({
|
|
341
344
|
paddingBlock: "var(--ds-space-200, 16px)"
|
|
342
345
|
}),
|
|
343
|
-
'
|
|
346
|
+
'space.250': css({
|
|
344
347
|
paddingBlock: "var(--ds-space-250, 20px)"
|
|
345
348
|
}),
|
|
346
|
-
'
|
|
349
|
+
'space.300': css({
|
|
347
350
|
paddingBlock: "var(--ds-space-300, 24px)"
|
|
348
351
|
}),
|
|
349
|
-
'
|
|
352
|
+
'space.400': css({
|
|
350
353
|
paddingBlock: "var(--ds-space-400, 32px)"
|
|
351
354
|
}),
|
|
352
|
-
'
|
|
355
|
+
'space.500': css({
|
|
353
356
|
paddingBlock: "var(--ds-space-500, 40px)"
|
|
354
357
|
}),
|
|
355
|
-
'
|
|
358
|
+
'space.600': css({
|
|
356
359
|
paddingBlock: "var(--ds-space-600, 48px)"
|
|
357
360
|
}),
|
|
358
|
-
'
|
|
361
|
+
'space.800': css({
|
|
359
362
|
paddingBlock: "var(--ds-space-800, 64px)"
|
|
360
363
|
})
|
|
361
364
|
};
|
|
362
365
|
var paddingInlineMap = {
|
|
363
|
-
'
|
|
366
|
+
'space.0': css({
|
|
364
367
|
paddingInline: "var(--ds-space-0, 0px)"
|
|
365
368
|
}),
|
|
366
|
-
'
|
|
369
|
+
'space.025': css({
|
|
367
370
|
paddingInline: "var(--ds-space-025, 2px)"
|
|
368
371
|
}),
|
|
369
|
-
'
|
|
372
|
+
'space.050': css({
|
|
370
373
|
paddingInline: "var(--ds-space-050, 4px)"
|
|
371
374
|
}),
|
|
372
|
-
'
|
|
375
|
+
'space.075': css({
|
|
373
376
|
paddingInline: "var(--ds-space-075, 6px)"
|
|
374
377
|
}),
|
|
375
|
-
'
|
|
378
|
+
'space.100': css({
|
|
376
379
|
paddingInline: "var(--ds-space-100, 8px)"
|
|
377
380
|
}),
|
|
378
|
-
'
|
|
381
|
+
'space.1000': css({
|
|
379
382
|
paddingInline: "var(--ds-space-1000, 80px)"
|
|
380
383
|
}),
|
|
381
|
-
'
|
|
384
|
+
'space.150': css({
|
|
382
385
|
paddingInline: "var(--ds-space-150, 12px)"
|
|
383
386
|
}),
|
|
384
|
-
'
|
|
387
|
+
'space.200': css({
|
|
385
388
|
paddingInline: "var(--ds-space-200, 16px)"
|
|
386
389
|
}),
|
|
387
|
-
'
|
|
390
|
+
'space.250': css({
|
|
388
391
|
paddingInline: "var(--ds-space-250, 20px)"
|
|
389
392
|
}),
|
|
390
|
-
'
|
|
393
|
+
'space.300': css({
|
|
391
394
|
paddingInline: "var(--ds-space-300, 24px)"
|
|
392
395
|
}),
|
|
393
|
-
'
|
|
396
|
+
'space.400': css({
|
|
394
397
|
paddingInline: "var(--ds-space-400, 32px)"
|
|
395
398
|
}),
|
|
396
|
-
'
|
|
399
|
+
'space.500': css({
|
|
397
400
|
paddingInline: "var(--ds-space-500, 40px)"
|
|
398
401
|
}),
|
|
399
|
-
'
|
|
402
|
+
'space.600': css({
|
|
400
403
|
paddingInline: "var(--ds-space-600, 48px)"
|
|
401
404
|
}),
|
|
402
|
-
'
|
|
405
|
+
'space.800': css({
|
|
403
406
|
paddingInline: "var(--ds-space-800, 64px)"
|
|
404
407
|
})
|
|
405
408
|
};
|
|
@@ -410,11 +413,11 @@ var paddingInlineMap = {
|
|
|
410
413
|
|
|
411
414
|
/**
|
|
412
415
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
413
|
-
* @codegen <<SignedSource::
|
|
416
|
+
* @codegen <<SignedSource::201c8a6c6ff88ac47cdb02365c643ff2>>
|
|
414
417
|
* @codegenId colors
|
|
415
418
|
* @codegenCommand yarn codegen-styles
|
|
416
419
|
* @codegenParams ["border", "background", "shadow"]
|
|
417
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::
|
|
420
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::db7a1282630a6e5b9424b807614086af>>
|
|
418
421
|
*/
|
|
419
422
|
var borderColorMap = {
|
|
420
423
|
'color.border': css({
|
|
@@ -111,7 +111,7 @@ Inline.displayName = 'Inline';
|
|
|
111
111
|
export default Inline;
|
|
112
112
|
/**
|
|
113
113
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
114
|
-
* @codegen <<SignedSource::
|
|
114
|
+
* @codegen <<SignedSource::0a2a4380b534d14cdad759ff2d33a6c8>>
|
|
115
115
|
* @codegenId spacing
|
|
116
116
|
* @codegenCommand yarn codegen-styles
|
|
117
117
|
* @codegenParams ["columnGap"]
|
|
@@ -119,46 +119,46 @@ export default Inline;
|
|
|
119
119
|
*/
|
|
120
120
|
|
|
121
121
|
var columnGapMap = {
|
|
122
|
-
'
|
|
122
|
+
'space.0': css({
|
|
123
123
|
columnGap: "var(--ds-space-0, 0px)"
|
|
124
124
|
}),
|
|
125
|
-
'
|
|
125
|
+
'space.025': css({
|
|
126
126
|
columnGap: "var(--ds-space-025, 2px)"
|
|
127
127
|
}),
|
|
128
|
-
'
|
|
128
|
+
'space.050': css({
|
|
129
129
|
columnGap: "var(--ds-space-050, 4px)"
|
|
130
130
|
}),
|
|
131
|
-
'
|
|
131
|
+
'space.075': css({
|
|
132
132
|
columnGap: "var(--ds-space-075, 6px)"
|
|
133
133
|
}),
|
|
134
|
-
'
|
|
134
|
+
'space.100': css({
|
|
135
135
|
columnGap: "var(--ds-space-100, 8px)"
|
|
136
136
|
}),
|
|
137
|
-
'
|
|
137
|
+
'space.1000': css({
|
|
138
138
|
columnGap: "var(--ds-space-1000, 80px)"
|
|
139
139
|
}),
|
|
140
|
-
'
|
|
140
|
+
'space.150': css({
|
|
141
141
|
columnGap: "var(--ds-space-150, 12px)"
|
|
142
142
|
}),
|
|
143
|
-
'
|
|
143
|
+
'space.200': css({
|
|
144
144
|
columnGap: "var(--ds-space-200, 16px)"
|
|
145
145
|
}),
|
|
146
|
-
'
|
|
146
|
+
'space.250': css({
|
|
147
147
|
columnGap: "var(--ds-space-250, 20px)"
|
|
148
148
|
}),
|
|
149
|
-
'
|
|
149
|
+
'space.300': css({
|
|
150
150
|
columnGap: "var(--ds-space-300, 24px)"
|
|
151
151
|
}),
|
|
152
|
-
'
|
|
152
|
+
'space.400': css({
|
|
153
153
|
columnGap: "var(--ds-space-400, 32px)"
|
|
154
154
|
}),
|
|
155
|
-
'
|
|
155
|
+
'space.500': css({
|
|
156
156
|
columnGap: "var(--ds-space-500, 40px)"
|
|
157
157
|
}),
|
|
158
|
-
'
|
|
158
|
+
'space.600': css({
|
|
159
159
|
columnGap: "var(--ds-space-600, 48px)"
|
|
160
160
|
}),
|
|
161
|
-
'
|
|
161
|
+
'space.800': css({
|
|
162
162
|
columnGap: "var(--ds-space-800, 64px)"
|
|
163
163
|
})
|
|
164
164
|
};
|
|
@@ -48,11 +48,11 @@ var InteractionSurface = function InteractionSurface(_ref) {
|
|
|
48
48
|
export default InteractionSurface;
|
|
49
49
|
/**
|
|
50
50
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
51
|
-
* @codegen <<SignedSource::
|
|
51
|
+
* @codegen <<SignedSource::46f9477bc75d77a16327328d1b49c35f>>
|
|
52
52
|
* @codegenId interactions
|
|
53
53
|
* @codegenCommand yarn codegen-styles
|
|
54
54
|
* @codegenParams ["background"]
|
|
55
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::
|
|
55
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::db7a1282630a6e5b9424b807614086af>>
|
|
56
56
|
*/
|
|
57
57
|
|
|
58
58
|
var backgroundActiveColorMap = {
|
|
@@ -75,7 +75,7 @@ Stack.displayName = 'Stack';
|
|
|
75
75
|
export default Stack;
|
|
76
76
|
/**
|
|
77
77
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
78
|
-
* @codegen <<SignedSource::
|
|
78
|
+
* @codegen <<SignedSource::ac9028ae231558f3eedd10f0db04a8fe>>
|
|
79
79
|
* @codegenId spacing
|
|
80
80
|
* @codegenCommand yarn codegen-styles
|
|
81
81
|
* @codegenParams ["rowGap"]
|
|
@@ -83,46 +83,46 @@ export default Stack;
|
|
|
83
83
|
*/
|
|
84
84
|
|
|
85
85
|
var rowGapMap = {
|
|
86
|
-
'
|
|
86
|
+
'space.0': css({
|
|
87
87
|
rowGap: "var(--ds-space-0, 0px)"
|
|
88
88
|
}),
|
|
89
|
-
'
|
|
89
|
+
'space.025': css({
|
|
90
90
|
rowGap: "var(--ds-space-025, 2px)"
|
|
91
91
|
}),
|
|
92
|
-
'
|
|
92
|
+
'space.050': css({
|
|
93
93
|
rowGap: "var(--ds-space-050, 4px)"
|
|
94
94
|
}),
|
|
95
|
-
'
|
|
95
|
+
'space.075': css({
|
|
96
96
|
rowGap: "var(--ds-space-075, 6px)"
|
|
97
97
|
}),
|
|
98
|
-
'
|
|
98
|
+
'space.100': css({
|
|
99
99
|
rowGap: "var(--ds-space-100, 8px)"
|
|
100
100
|
}),
|
|
101
|
-
'
|
|
101
|
+
'space.1000': css({
|
|
102
102
|
rowGap: "var(--ds-space-1000, 80px)"
|
|
103
103
|
}),
|
|
104
|
-
'
|
|
104
|
+
'space.150': css({
|
|
105
105
|
rowGap: "var(--ds-space-150, 12px)"
|
|
106
106
|
}),
|
|
107
|
-
'
|
|
107
|
+
'space.200': css({
|
|
108
108
|
rowGap: "var(--ds-space-200, 16px)"
|
|
109
109
|
}),
|
|
110
|
-
'
|
|
110
|
+
'space.250': css({
|
|
111
111
|
rowGap: "var(--ds-space-250, 20px)"
|
|
112
112
|
}),
|
|
113
|
-
'
|
|
113
|
+
'space.300': css({
|
|
114
114
|
rowGap: "var(--ds-space-300, 24px)"
|
|
115
115
|
}),
|
|
116
|
-
'
|
|
116
|
+
'space.400': css({
|
|
117
117
|
rowGap: "var(--ds-space-400, 32px)"
|
|
118
118
|
}),
|
|
119
|
-
'
|
|
119
|
+
'space.500': css({
|
|
120
120
|
rowGap: "var(--ds-space-500, 40px)"
|
|
121
121
|
}),
|
|
122
|
-
'
|
|
122
|
+
'space.600': css({
|
|
123
123
|
rowGap: "var(--ds-space-600, 48px)"
|
|
124
124
|
}),
|
|
125
|
-
'
|
|
125
|
+
'space.800': css({
|
|
126
126
|
rowGap: "var(--ds-space-800, 64px)"
|
|
127
127
|
})
|
|
128
128
|
};
|
|
@@ -8,56 +8,6 @@ import invariant from 'tiny-invariant';
|
|
|
8
8
|
import surfaceColorMap from '../internal/color-map';
|
|
9
9
|
import { useSurface } from './surface-provider';
|
|
10
10
|
var asAllowlist = ['span', 'div', 'p', 'strong'];
|
|
11
|
-
var fontFamily = "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif";
|
|
12
|
-
var fontSizeMap = {
|
|
13
|
-
'11px': css({
|
|
14
|
-
fontSize: '11px'
|
|
15
|
-
}),
|
|
16
|
-
'12px': css({
|
|
17
|
-
fontSize: '12px'
|
|
18
|
-
}),
|
|
19
|
-
'14px': css({
|
|
20
|
-
fontSize: '14px'
|
|
21
|
-
})
|
|
22
|
-
};
|
|
23
|
-
// NOTE: can't use numbers as keys or Constellation won't build. Weird one.
|
|
24
|
-
var fontWeightMap = {
|
|
25
|
-
'400': css({
|
|
26
|
-
fontWeight: 400
|
|
27
|
-
}),
|
|
28
|
-
'500': css({
|
|
29
|
-
fontWeight: 500
|
|
30
|
-
}),
|
|
31
|
-
'600': css({
|
|
32
|
-
fontWeight: 600
|
|
33
|
-
}),
|
|
34
|
-
'700': css({
|
|
35
|
-
fontWeight: 700
|
|
36
|
-
})
|
|
37
|
-
};
|
|
38
|
-
var lineHeightMap = {
|
|
39
|
-
'12px': css({
|
|
40
|
-
lineHeight: '12px'
|
|
41
|
-
}),
|
|
42
|
-
'16px': css({
|
|
43
|
-
lineHeight: '16px'
|
|
44
|
-
}),
|
|
45
|
-
'20px': css({
|
|
46
|
-
lineHeight: '20px'
|
|
47
|
-
}),
|
|
48
|
-
'24px': css({
|
|
49
|
-
lineHeight: '24px'
|
|
50
|
-
}),
|
|
51
|
-
'28px': css({
|
|
52
|
-
lineHeight: '28px'
|
|
53
|
-
}),
|
|
54
|
-
'32px': css({
|
|
55
|
-
lineHeight: '32px'
|
|
56
|
-
}),
|
|
57
|
-
'40px': css({
|
|
58
|
-
lineHeight: '40px'
|
|
59
|
-
})
|
|
60
|
-
};
|
|
61
11
|
var textAlignMap = {
|
|
62
12
|
center: css({
|
|
63
13
|
textAlign: 'center'
|
|
@@ -93,9 +43,8 @@ var verticalAlignMap = {
|
|
|
93
43
|
};
|
|
94
44
|
var baseStyles = css({
|
|
95
45
|
boxSizing: 'border-box',
|
|
96
|
-
margin:
|
|
97
|
-
padding:
|
|
98
|
-
fontFamily: fontFamily
|
|
46
|
+
margin: "var(--ds-space-0, 0px)",
|
|
47
|
+
padding: "var(--ds-space-0, 0px)"
|
|
99
48
|
});
|
|
100
49
|
var truncateStyles = css({
|
|
101
50
|
overflow: 'hidden',
|
|
@@ -166,7 +115,7 @@ var Text = function Text(_ref) {
|
|
|
166
115
|
|
|
167
116
|
var component = jsx(Component, {
|
|
168
117
|
style: UNSAFE_style,
|
|
169
|
-
css: [baseStyles, color && textColorMap[color], fontSize && fontSizeMap[fontSize], fontWeight && fontWeightMap[fontWeight], lineHeight && lineHeightMap[lineHeight], shouldTruncate && truncateStyles, textAlign && textAlignMap[textAlign], textTransform && textTransformMap[textTransform], verticalAlign && verticalAlignMap[verticalAlign]],
|
|
118
|
+
css: [baseStyles, fontFamilyMap.sans, color && textColorMap[color], fontSize && fontSizeMap[fontSize], fontWeight && fontWeightMap[fontWeight], lineHeight && lineHeightMap[lineHeight], shouldTruncate && truncateStyles, textAlign && textAlignMap[textAlign], textTransform && textTransformMap[textTransform], verticalAlign && verticalAlignMap[verticalAlign]],
|
|
170
119
|
"data-testid": testId,
|
|
171
120
|
id: id
|
|
172
121
|
}, children);
|
|
@@ -179,13 +128,94 @@ var Text = function Text(_ref) {
|
|
|
179
128
|
export default Text;
|
|
180
129
|
/**
|
|
181
130
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
182
|
-
* @codegen <<SignedSource::
|
|
131
|
+
* @codegen <<SignedSource::bd36caff8bedb3bdc89b6f2311c6160a>>
|
|
132
|
+
* @codegenId typography
|
|
133
|
+
* @codegenCommand yarn codegen-styles
|
|
134
|
+
* @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight"]
|
|
135
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-typography.tsx <<SignedSource::39bc8db0f376f5635a25be0137792642>>
|
|
136
|
+
*/
|
|
137
|
+
|
|
138
|
+
var fontSizeMap = {
|
|
139
|
+
'size.050': css({
|
|
140
|
+
fontSize: "var(--ds-font-size-050, 11px)"
|
|
141
|
+
}),
|
|
142
|
+
'size.075': css({
|
|
143
|
+
fontSize: "var(--ds-font-size-075, 12px)"
|
|
144
|
+
}),
|
|
145
|
+
'size.100': css({
|
|
146
|
+
fontSize: "var(--ds-font-size-100, 14px)"
|
|
147
|
+
}),
|
|
148
|
+
'size.200': css({
|
|
149
|
+
fontSize: "var(--ds-font-size-200, 16px)"
|
|
150
|
+
}),
|
|
151
|
+
'size.300': css({
|
|
152
|
+
fontSize: "var(--ds-font-size-300, 20px)"
|
|
153
|
+
}),
|
|
154
|
+
'size.400': css({
|
|
155
|
+
fontSize: "var(--ds-font-size-400, 24px)"
|
|
156
|
+
}),
|
|
157
|
+
'size.500': css({
|
|
158
|
+
fontSize: "var(--ds-font-size-500, 29px)"
|
|
159
|
+
}),
|
|
160
|
+
'size.600': css({
|
|
161
|
+
fontSize: "var(--ds-font-size-600, 35px)"
|
|
162
|
+
})
|
|
163
|
+
};
|
|
164
|
+
var fontWeightMap = {
|
|
165
|
+
bold: css({
|
|
166
|
+
fontWeight: "var(--ds-font-weight-bold, 700)"
|
|
167
|
+
}),
|
|
168
|
+
medium: css({
|
|
169
|
+
fontWeight: "var(--ds-font-weight-medium, 500)"
|
|
170
|
+
}),
|
|
171
|
+
regular: css({
|
|
172
|
+
fontWeight: "var(--ds-font-weight-regular, 400)"
|
|
173
|
+
}),
|
|
174
|
+
semibold: css({
|
|
175
|
+
fontWeight: "var(--ds-font-weight-semibold, 600)"
|
|
176
|
+
})
|
|
177
|
+
};
|
|
178
|
+
var fontFamilyMap = {
|
|
179
|
+
monospace: css({
|
|
180
|
+
fontFamily: "var(--ds-font-family-monospace, \"SFMono-Medium\", \"SF Mono\", \"Segoe UI Mono\", \"Roboto Mono\", \"Ubuntu Mono\", Menlo, Consolas, Courier, monospace)"
|
|
181
|
+
}),
|
|
182
|
+
sans: css({
|
|
183
|
+
fontFamily: "var(--ds-font-family-sans, -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif)"
|
|
184
|
+
})
|
|
185
|
+
};
|
|
186
|
+
var lineHeightMap = {
|
|
187
|
+
'lineHeight.100': css({
|
|
188
|
+
lineHeight: "var(--ds-font-lineHeight-100, 16px)"
|
|
189
|
+
}),
|
|
190
|
+
'lineHeight.200': css({
|
|
191
|
+
lineHeight: "var(--ds-font-lineHeight-200, 20px)"
|
|
192
|
+
}),
|
|
193
|
+
'lineHeight.300': css({
|
|
194
|
+
lineHeight: "var(--ds-font-lineHeight-300, 24px)"
|
|
195
|
+
}),
|
|
196
|
+
'lineHeight.400': css({
|
|
197
|
+
lineHeight: "var(--ds-font-lineHeight-400, 28px)"
|
|
198
|
+
}),
|
|
199
|
+
'lineHeight.500': css({
|
|
200
|
+
lineHeight: "var(--ds-font-lineHeight-500, 32px)"
|
|
201
|
+
}),
|
|
202
|
+
'lineHeight.600': css({
|
|
203
|
+
lineHeight: "var(--ds-font-lineHeight-600, 40px)"
|
|
204
|
+
})
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* @codegenEnd
|
|
209
|
+
*/
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
213
|
+
* @codegen <<SignedSource::d88a2527302fee634bec7ae405e9217b>>
|
|
183
214
|
* @codegenId colors
|
|
184
215
|
* @codegenCommand yarn codegen-styles
|
|
185
216
|
* @codegenParams ["text"]
|
|
186
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::
|
|
217
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::db7a1282630a6e5b9424b807614086af>>
|
|
187
218
|
*/
|
|
188
|
-
|
|
189
219
|
var textColorMap = {
|
|
190
220
|
'color.text': css({
|
|
191
221
|
color: "var(--ds-text, #172B4D)"
|
|
@@ -3,9 +3,9 @@
|
|
|
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::55412dc750db330e0a2a51918237e29f>>
|
|
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::db7a1282630a6e5b9424b807614086af>>
|
|
9
9
|
*/
|
|
10
10
|
export default {
|
|
11
11
|
'neutral.bold': 'inverse',
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Internal codegen of the spacing scale values. Only used for internal examples.
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::885d6c601dfa9fccaf33a7bd461ef59d>>
|
|
7
7
|
* @codegenCommand yarn codegen-styles
|
|
8
8
|
*/
|
|
9
|
-
export var spacingScale = ['
|
|
9
|
+
export var spacingScale = ['space.0', 'space.025', 'space.050', 'space.075', 'space.100', 'space.150', 'space.200', 'space.250', 'space.300', 'space.400', 'space.500', 'space.600', 'space.800', 'space.1000'];
|
package/dist/esm/version.json
CHANGED