@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.
Files changed (37) hide show
  1. package/CHANGELOG.md +368 -141
  2. package/dist/cjs/components/interaction-surface.partial.js +2 -2
  3. package/dist/cjs/components/text.partial.js +4 -4
  4. package/dist/cjs/internal/color-map.js +2 -2
  5. package/dist/cjs/internal/spacing-scale.js +1 -1
  6. package/dist/es2019/components/interaction-surface.partial.js +2 -2
  7. package/dist/es2019/components/text.partial.js +4 -4
  8. package/dist/es2019/internal/color-map.js +2 -2
  9. package/dist/es2019/internal/spacing-scale.js +1 -1
  10. package/dist/esm/components/interaction-surface.partial.js +2 -2
  11. package/dist/esm/components/text.partial.js +4 -4
  12. package/dist/esm/internal/color-map.js +2 -2
  13. package/dist/esm/internal/spacing-scale.js +1 -1
  14. package/dist/types/components/interaction-surface.partial.d.ts +2 -2
  15. package/dist/types/components/text.partial.d.ts +5 -5
  16. package/dist/types/internal/color-map.d.ts +2 -2
  17. package/dist/types/internal/spacing-scale.d.ts +1 -1
  18. package/dist/types-ts4.5/components/interaction-surface.partial.d.ts +2 -2
  19. package/dist/types-ts4.5/components/text.partial.d.ts +5 -5
  20. package/dist/types-ts4.5/internal/color-map.d.ts +2 -2
  21. package/dist/types-ts4.5/internal/spacing-scale.d.ts +1 -1
  22. package/package.json +5 -4
  23. package/scripts/__tests__/__snapshots__/codegen.test.tsx.snap +540 -754
  24. package/scripts/color-codegen-template.tsx +4 -11
  25. package/scripts/color-map-template.tsx +3 -10
  26. package/scripts/dimension-codegen-template.tsx +3 -9
  27. package/scripts/interaction-codegen.tsx +3 -11
  28. package/scripts/misc-codegen-template.tsx +4 -10
  29. package/scripts/spacing-codegen-template.tsx +3 -11
  30. package/scripts/spacing-scale-template.tsx +3 -10
  31. package/scripts/typography-codegen-template.tsx +3 -11
  32. package/src/components/interaction-surface.partial.tsx +382 -596
  33. package/src/components/text.partial.tsx +143 -143
  34. package/src/internal/color-map.tsx +29 -29
  35. package/src/internal/spacing-scale.tsx +15 -15
  36. package/tsconfig.app.json +3 -0
  37. 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::203ec574e582b95619dc5a1ff65925c7>>
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::bfa028f044b5112b83b8e52861d48b2f>>
196
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-typography-adg3.tsx <<SignedSource::bf3349cf2247aa44fbac47c953fc03b5>>
197
197
  */
198
198
  const fontSizeMap = {
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
- }),
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
- 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
- }),
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
- 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
- }),
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
- '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
- }),
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::607a969c3ff0c84233d12412b1c104b4>>
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::eface03157c2df5c1b3b305911d3ed4d>>
327
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::f27d1519d51cc4a85383a00907847774>>
328
328
  */
329
329
  const textColorMap = {
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
- }),
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::6d974d81ce795e3ce5be6c5035a69fb4>>
6
+ * @codegen <<SignedSource::4069cec92f6504471d42a7c6cc0f7930>>
7
7
  * @codegenCommand yarn codegen-styles
8
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::eface03157c2df5c1b3b305911d3ed4d>>
8
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::f27d1519d51cc4a85383a00907847774>>
9
9
  */
10
10
  export default {
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',
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::885d6c601dfa9fccaf33a7bd461ef59d>>
6
+ * @codegen <<SignedSource::33634cd9767c59b9aaaf64fc6f44f852>>
7
7
  * @codegenCommand yarn codegen-styles
8
8
  */
9
9
  export const spacingScale = [
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',
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
@@ -32,6 +32,9 @@
32
32
  "outDir": "../../../tsDist/@atlaskit__ds-explorations/app"
33
33
  },
34
34
  "references": [
35
+ {
36
+ "path": "../../../build/formatting/tsconfig.app.json"
37
+ },
35
38
  {
36
39
  "path": "../tokens/tsconfig.app.json"
37
40
  },
package/tsconfig.dev.json CHANGED
@@ -36,6 +36,9 @@
36
36
  {
37
37
  "path": "tsconfig.app.json"
38
38
  },
39
+ {
40
+ "path": "../../../build/formatting/tsconfig.app.json"
41
+ },
39
42
  {
40
43
  "path": "../../../build/test-tooling/gemini-visual-regression/tsconfig.app.json"
41
44
  },