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