@atlaskit/ds-explorations 2.2.14 → 2.3.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.
Files changed (67) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/components/text.partial.js +8 -5
  3. package/dist/cjs/index.js +0 -21
  4. package/dist/es2019/components/text.partial.js +8 -5
  5. package/dist/es2019/index.js +0 -3
  6. package/dist/esm/components/text.partial.js +8 -5
  7. package/dist/esm/index.js +0 -3
  8. package/dist/types/components/surface-provider.d.ts +2 -2
  9. package/dist/types/components/text.partial.d.ts +4 -3
  10. package/dist/types/index.d.ts +0 -6
  11. package/dist/types-ts4.5/components/surface-provider.d.ts +2 -2
  12. package/dist/types-ts4.5/components/text.partial.d.ts +4 -3
  13. package/dist/types-ts4.5/index.d.ts +0 -6
  14. package/docs/01-basic.tsx +3 -2
  15. package/examples/02-text-advanced.tsx +11 -20
  16. package/examples/02-text.tsx +15 -10
  17. package/examples/05-badge.tsx +9 -5
  18. package/examples/06-section-message.tsx +2 -4
  19. package/examples/07-comment.tsx +1 -3
  20. package/examples/08-lozenge.tsx +8 -4
  21. package/examples/99-interactions.tsx +49 -33
  22. package/package.json +4 -6
  23. package/report.api.md +0 -465
  24. package/scripts/codegen-styles.tsx +16 -89
  25. package/src/components/__tests__/unit/interaction-suface.test.tsx +2 -2
  26. package/src/components/surface-provider.tsx +1 -1
  27. package/src/components/text.partial.tsx +14 -8
  28. package/src/index.tsx +0 -6
  29. package/tmp/api-report-tmp.d.ts +0 -451
  30. package/tsconfig.app.json +3 -0
  31. package/tsconfig.dev.json +0 -6
  32. package/box/package.json +0 -15
  33. package/dist/cjs/components/box.partial.js +0 -622
  34. package/dist/cjs/components/inline.partial.js +0 -183
  35. package/dist/cjs/components/stack.partial.js +0 -149
  36. package/dist/es2019/components/box.partial.js +0 -614
  37. package/dist/es2019/components/inline.partial.js +0 -177
  38. package/dist/es2019/components/stack.partial.js +0 -144
  39. package/dist/esm/components/box.partial.js +0 -617
  40. package/dist/esm/components/inline.partial.js +0 -177
  41. package/dist/esm/components/stack.partial.js +0 -143
  42. package/dist/types/components/box.partial.d.ts +0 -357
  43. package/dist/types/components/inline.partial.d.ts +0 -108
  44. package/dist/types/components/stack.partial.d.ts +0 -92
  45. package/dist/types-ts4.5/components/box.partial.d.ts +0 -357
  46. package/dist/types-ts4.5/components/inline.partial.d.ts +0 -108
  47. package/dist/types-ts4.5/components/stack.partial.d.ts +0 -92
  48. package/examples/00-basic.tsx +0 -22
  49. package/examples/01-box.tsx +0 -171
  50. package/examples/03-stack.tsx +0 -99
  51. package/examples/04-inline.tsx +0 -99
  52. package/inline/package.json +0 -15
  53. package/src/components/__tests__/unit/box.test.tsx +0 -55
  54. package/src/components/__tests__/unit/inline.test.tsx +0 -43
  55. package/src/components/__tests__/unit/stack.test.tsx +0 -31
  56. package/src/components/__tests__/visual-regression/__image_snapshots__/inline-snapshot-test-tsx-inline-alignment-example-should-match-snapshot-1-snap.png +0 -3
  57. package/src/components/__tests__/visual-regression/__image_snapshots__/inline-snapshot-test-tsx-inline-spacing-example-should-match-snapshot-1-snap.png +0 -3
  58. package/src/components/__tests__/visual-regression/__image_snapshots__/stack-snapshot-test-tsx-stack-alignment-example-should-match-snapshot-1-snap.png +0 -3
  59. package/src/components/__tests__/visual-regression/__image_snapshots__/stack-snapshot-test-tsx-stack-spacing-example-should-match-snapshot-1-snap.png +0 -3
  60. package/src/components/__tests__/visual-regression/inline-snapshot-test.tsx +0 -28
  61. package/src/components/__tests__/visual-regression/stack-snapshot-test.tsx +0 -28
  62. package/src/components/__tests__/vr-tests/__snapshots__/box--default.png +0 -0
  63. package/src/components/__tests__/vr-tests/box-snapshot-test.vr.tsx +0 -6
  64. package/src/components/box.partial.tsx +0 -706
  65. package/src/components/inline.partial.tsx +0 -218
  66. package/src/components/stack.partial.tsx +0 -174
  67. package/stack/package.json +0 -15
package/report.api.md CHANGED
@@ -15,17 +15,10 @@
15
15
  <!--SECTION START: Main Entry Types-->
16
16
 
17
17
  ```ts
18
- import { ComponentPropsWithoutRef } from 'react';
19
- import { ComponentPropsWithRef } from 'react';
20
18
  import type { CSSProperties } from 'react';
21
- import { ElementType } from 'react';
22
19
  import { FC } from 'react';
23
- import { ForwardRefExoticComponent } from 'react';
24
20
  import { jsx } from '@emotion/react';
25
- import { MemoExoticComponent } from 'react';
26
- import { ReactElement } from 'react';
27
21
  import { ReactNode } from 'react';
28
- import { RefAttributes } from 'react';
29
22
  import { SerializedStyles } from '@emotion/react';
30
23
 
31
24
  // @public (undocumented)
@@ -34,41 +27,6 @@ const asAllowlist: readonly ['span', 'div', 'p', 'strong'];
34
27
  // @public (undocumented)
35
28
  type AsElement = (typeof asAllowlist)[number];
36
29
 
37
- // @public (undocumented)
38
- type BackgroundColor = keyof typeof backgroundColorMap;
39
-
40
- // @public (undocumented)
41
- const backgroundColorMap: {
42
- readonly disabled: SerializedStyles;
43
- readonly input: SerializedStyles;
44
- readonly 'inverse.subtle': SerializedStyles;
45
- readonly neutral: SerializedStyles;
46
- readonly 'neutral.subtle': SerializedStyles;
47
- readonly 'neutral.bold': SerializedStyles;
48
- readonly selected: SerializedStyles;
49
- readonly 'selected.bold': SerializedStyles;
50
- readonly 'brand.subtlest': SerializedStyles;
51
- readonly 'brand.bold': SerializedStyles;
52
- readonly 'brand.boldest': SerializedStyles;
53
- readonly danger: SerializedStyles;
54
- readonly 'danger.bold': SerializedStyles;
55
- readonly warning: SerializedStyles;
56
- readonly 'warning.bold': SerializedStyles;
57
- readonly success: SerializedStyles;
58
- readonly 'success.bold': SerializedStyles;
59
- readonly discovery: SerializedStyles;
60
- readonly 'discovery.bold': SerializedStyles;
61
- readonly information: SerializedStyles;
62
- readonly 'information.bold': SerializedStyles;
63
- readonly 'color.blanket': SerializedStyles;
64
- readonly 'color.blanket.selected': SerializedStyles;
65
- readonly 'color.blanket.danger': SerializedStyles;
66
- readonly 'elevation.surface': SerializedStyles;
67
- readonly 'elevation.surface.overlay': SerializedStyles;
68
- readonly 'elevation.surface.raised': SerializedStyles;
69
- readonly 'elevation.surface.sunken': SerializedStyles;
70
- };
71
-
72
30
  // @public (undocumented)
73
31
  const backgroundHoverColorMap: {
74
32
  'accent.lime.subtlest': SerializedStyles;
@@ -142,227 +100,6 @@ interface BasePrimitiveProps {
142
100
  UNSAFE_style?: CSSProperties;
143
101
  }
144
102
 
145
- // @public (undocumented)
146
- type BorderColor = keyof typeof borderColorMap;
147
-
148
- // @public
149
- const borderColorMap: {
150
- readonly 'color.border': SerializedStyles;
151
- readonly disabled: SerializedStyles;
152
- readonly focused: SerializedStyles;
153
- readonly input: SerializedStyles;
154
- readonly inverse: SerializedStyles;
155
- readonly selected: SerializedStyles;
156
- readonly brand: SerializedStyles;
157
- readonly danger: SerializedStyles;
158
- readonly warning: SerializedStyles;
159
- readonly success: SerializedStyles;
160
- readonly discovery: SerializedStyles;
161
- readonly information: SerializedStyles;
162
- readonly bold: SerializedStyles;
163
- };
164
-
165
- // @public (undocumented)
166
- type BorderRadius = keyof typeof borderRadiusMap;
167
-
168
- // @public (undocumented)
169
- const borderRadiusMap: {
170
- normal: SerializedStyles;
171
- rounded: SerializedStyles;
172
- badge: SerializedStyles;
173
- };
174
-
175
- // @public (undocumented)
176
- type BorderStyle = keyof typeof borderStyleMap;
177
-
178
- // @public (undocumented)
179
- const borderStyleMap: {
180
- none: SerializedStyles;
181
- solid: SerializedStyles;
182
- dashed: SerializedStyles;
183
- dotted: SerializedStyles;
184
- };
185
-
186
- // @public (undocumented)
187
- type BorderWidth = keyof typeof borderWidthMap;
188
-
189
- // @public (undocumented)
190
- const borderWidthMap: {
191
- '0px': SerializedStyles;
192
- '1px': SerializedStyles;
193
- '2px': SerializedStyles;
194
- '3px': SerializedStyles;
195
- };
196
-
197
- // @public (undocumented)
198
- type BoxComponent<T extends ElementType = 'div'> = (<
199
- T extends ElementType = 'div',
200
- >(
201
- props: UNSAFE_BoxProps<T>,
202
- ) => ReactElement | null) &
203
- FC<UNSAFE_BoxProps<T>>;
204
-
205
- // @public (undocumented)
206
- type BoxPropsBase<T extends ElementType> = {
207
- as?: T;
208
- children?: ReactNode;
209
- className?: string;
210
- backgroundColor?: BackgroundColor;
211
- shadow?: Shadow;
212
- borderStyle?: BorderStyle;
213
- borderWidth?: BorderWidth;
214
- borderColor?: BorderColor;
215
- borderRadius?: BorderRadius;
216
- layer?: Layer;
217
- flexDirection?: FlexDirection;
218
- alignItems?: FlexAlignItems;
219
- justifyContent?: FlexJustifyContent;
220
- overflow?: Overflow;
221
- padding?: Padding;
222
- paddingBlock?: PaddingBlock;
223
- paddingInline?: PaddingInline;
224
- width?: Width;
225
- height?: Height;
226
- display?: Display;
227
- position?: Position;
228
- ref?: ComponentPropsWithRef<T>['ref'];
229
- };
230
-
231
- // @public (undocumented)
232
- type ColumnGap = keyof typeof columnGapMap;
233
-
234
- // @public
235
- const columnGapMap: {
236
- 'space.0': SerializedStyles;
237
- 'space.025': SerializedStyles;
238
- 'space.050': SerializedStyles;
239
- 'space.075': SerializedStyles;
240
- 'space.100': SerializedStyles;
241
- 'space.1000': SerializedStyles;
242
- 'space.150': SerializedStyles;
243
- 'space.200': SerializedStyles;
244
- 'space.250': SerializedStyles;
245
- 'space.300': SerializedStyles;
246
- 'space.400': SerializedStyles;
247
- 'space.500': SerializedStyles;
248
- 'space.600': SerializedStyles;
249
- 'space.800': SerializedStyles;
250
- };
251
-
252
- // @public (undocumented)
253
- type Display = keyof typeof displayMap;
254
-
255
- // @public (undocumented)
256
- const displayMap: {
257
- block: SerializedStyles;
258
- inline: SerializedStyles;
259
- flex: SerializedStyles;
260
- inlineFlex: SerializedStyles;
261
- inlineBlock: SerializedStyles;
262
- };
263
-
264
- // @public
265
- type FlexAlignItems = keyof typeof flexAlignItemsMap;
266
-
267
- // @public (undocumented)
268
- type FlexAlignItems_2 = keyof typeof flexAlignItemsMap_2;
269
-
270
- // @public (undocumented)
271
- type FlexAlignItems_3 = keyof typeof flexAlignItemsMap_3;
272
-
273
- // @public (undocumented)
274
- const flexAlignItemsMap: {
275
- center: SerializedStyles;
276
- baseline: SerializedStyles;
277
- flexStart: SerializedStyles;
278
- flexEnd: SerializedStyles;
279
- start: SerializedStyles;
280
- end: SerializedStyles;
281
- };
282
-
283
- // @public (undocumented)
284
- const flexAlignItemsMap_2: {
285
- center: SerializedStyles;
286
- baseline: SerializedStyles;
287
- flexStart: SerializedStyles;
288
- flexEnd: SerializedStyles;
289
- start: SerializedStyles;
290
- end: SerializedStyles;
291
- };
292
-
293
- // @public (undocumented)
294
- const flexAlignItemsMap_3: {
295
- center: SerializedStyles;
296
- baseline: SerializedStyles;
297
- flexStart: SerializedStyles;
298
- flexEnd: SerializedStyles;
299
- start: SerializedStyles;
300
- end: SerializedStyles;
301
- };
302
-
303
- // @public
304
- type FlexDirection = keyof typeof flexDirectionMap;
305
-
306
- // @public (undocumented)
307
- const flexDirectionMap: {
308
- column: SerializedStyles;
309
- row: SerializedStyles;
310
- };
311
-
312
- // @public
313
- type FlexJustifyContent = keyof typeof flexJustifyContentMap;
314
-
315
- // @public (undocumented)
316
- type FlexJustifyContent_2 = keyof typeof flexJustifyContentMap_2;
317
-
318
- // @public (undocumented)
319
- type FlexJustifyContent_3 = keyof typeof flexJustifyContentMap_3;
320
-
321
- // @public (undocumented)
322
- const flexJustifyContentMap: {
323
- center: SerializedStyles;
324
- flexStart: SerializedStyles;
325
- flexEnd: SerializedStyles;
326
- start: SerializedStyles;
327
- end: SerializedStyles;
328
- };
329
-
330
- // @public (undocumented)
331
- const flexJustifyContentMap_2: {
332
- center: SerializedStyles;
333
- flexStart: SerializedStyles;
334
- 'space-between': SerializedStyles;
335
- flexEnd: SerializedStyles;
336
- start: SerializedStyles;
337
- end: SerializedStyles;
338
- spaceBetween: SerializedStyles;
339
- };
340
-
341
- // @public (undocumented)
342
- const flexJustifyContentMap_3: {
343
- center: SerializedStyles;
344
- flexStart: SerializedStyles;
345
- flexEnd: SerializedStyles;
346
- start: SerializedStyles;
347
- end: SerializedStyles;
348
- };
349
-
350
- // @public (undocumented)
351
- type FlexWrap = keyof typeof flexWrapMap;
352
-
353
- // @public (undocumented)
354
- type FlexWrap_2 = keyof typeof flexWrapMap_2;
355
-
356
- // @public (undocumented)
357
- const flexWrapMap: {
358
- wrap: SerializedStyles;
359
- };
360
-
361
- // @public (undocumented)
362
- const flexWrapMap_2: {
363
- wrap: SerializedStyles;
364
- };
365
-
366
103
  // @public (undocumented)
367
104
  type FontSize = keyof typeof fontSizeMap;
368
105
 
@@ -389,21 +126,6 @@ const fontWeightMap: {
389
126
  semibold: SerializedStyles;
390
127
  };
391
128
 
392
- // @public (undocumented)
393
- type Height = keyof typeof heightMap;
394
-
395
- // @public (undocumented)
396
- const heightMap: {
397
- '100%': SerializedStyles;
398
- 'size.100': SerializedStyles;
399
- 'size.1000': SerializedStyles;
400
- 'size.200': SerializedStyles;
401
- 'size.300': SerializedStyles;
402
- 'size.400': SerializedStyles;
403
- 'size.500': SerializedStyles;
404
- 'size.600': SerializedStyles;
405
- };
406
-
407
129
  // @public (undocumented)
408
130
  type InteractionBackgroundColor = keyof typeof backgroundHoverColorMap;
409
131
 
@@ -415,22 +137,6 @@ interface InteractionSurfaceProps extends BasePrimitiveProps {
415
137
  children: ReactNode;
416
138
  }
417
139
 
418
- // @public (undocumented)
419
- type Layer = keyof typeof LAYERS;
420
-
421
- // @public (undocumented)
422
- const LAYERS: {
423
- readonly card: 100;
424
- readonly navigation: 200;
425
- readonly dialog: 300;
426
- readonly layer: 400;
427
- readonly blanket: 500;
428
- readonly modal: 510;
429
- readonly flag: 600;
430
- readonly spotlight: 700;
431
- readonly tooltip: 800;
432
- };
433
-
434
140
  // @public (undocumented)
435
141
  type LineHeight = keyof typeof lineHeightMap;
436
142
 
@@ -445,122 +151,6 @@ const lineHeightMap: {
445
151
  'lineHeight.600': SerializedStyles;
446
152
  };
447
153
 
448
- // @public (undocumented)
449
- type Overflow = keyof typeof overflowMap;
450
-
451
- // @public (undocumented)
452
- const overflowMap: {
453
- auto: SerializedStyles;
454
- hidden: SerializedStyles;
455
- };
456
-
457
- // @public (undocumented)
458
- type Padding = keyof typeof paddingMap;
459
-
460
- // @public (undocumented)
461
- type PaddingBlock = keyof typeof paddingBlockMap;
462
-
463
- // @public (undocumented)
464
- const paddingBlockMap: {
465
- 'space.0': SerializedStyles;
466
- 'space.025': SerializedStyles;
467
- 'space.050': SerializedStyles;
468
- 'space.075': SerializedStyles;
469
- 'space.100': SerializedStyles;
470
- 'space.1000': SerializedStyles;
471
- 'space.150': SerializedStyles;
472
- 'space.200': SerializedStyles;
473
- 'space.250': SerializedStyles;
474
- 'space.300': SerializedStyles;
475
- 'space.400': SerializedStyles;
476
- 'space.500': SerializedStyles;
477
- 'space.600': SerializedStyles;
478
- 'space.800': SerializedStyles;
479
- };
480
-
481
- // @public (undocumented)
482
- type PaddingInline = keyof typeof paddingInlineMap;
483
-
484
- // @public (undocumented)
485
- const paddingInlineMap: {
486
- 'space.0': SerializedStyles;
487
- 'space.025': SerializedStyles;
488
- 'space.050': SerializedStyles;
489
- 'space.075': SerializedStyles;
490
- 'space.100': SerializedStyles;
491
- 'space.1000': SerializedStyles;
492
- 'space.150': SerializedStyles;
493
- 'space.200': SerializedStyles;
494
- 'space.250': SerializedStyles;
495
- 'space.300': SerializedStyles;
496
- 'space.400': SerializedStyles;
497
- 'space.500': SerializedStyles;
498
- 'space.600': SerializedStyles;
499
- 'space.800': SerializedStyles;
500
- };
501
-
502
- // @public
503
- const paddingMap: {
504
- 'space.0': SerializedStyles;
505
- 'space.025': SerializedStyles;
506
- 'space.050': SerializedStyles;
507
- 'space.075': SerializedStyles;
508
- 'space.100': SerializedStyles;
509
- 'space.1000': SerializedStyles;
510
- 'space.150': SerializedStyles;
511
- 'space.200': SerializedStyles;
512
- 'space.250': SerializedStyles;
513
- 'space.300': SerializedStyles;
514
- 'space.400': SerializedStyles;
515
- 'space.500': SerializedStyles;
516
- 'space.600': SerializedStyles;
517
- 'space.800': SerializedStyles;
518
- };
519
-
520
- // @public (undocumented)
521
- type Position = keyof typeof positionMap;
522
-
523
- // @public (undocumented)
524
- const positionMap: {
525
- absolute: SerializedStyles;
526
- fixed: SerializedStyles;
527
- relative: SerializedStyles;
528
- static: SerializedStyles;
529
- };
530
-
531
- // @public (undocumented)
532
- type RowGap = keyof typeof rowGapMap;
533
-
534
- // @public
535
- const rowGapMap: {
536
- 'space.0': SerializedStyles;
537
- 'space.025': SerializedStyles;
538
- 'space.050': SerializedStyles;
539
- 'space.075': SerializedStyles;
540
- 'space.100': SerializedStyles;
541
- 'space.1000': SerializedStyles;
542
- 'space.150': SerializedStyles;
543
- 'space.200': SerializedStyles;
544
- 'space.250': SerializedStyles;
545
- 'space.300': SerializedStyles;
546
- 'space.400': SerializedStyles;
547
- 'space.500': SerializedStyles;
548
- 'space.600': SerializedStyles;
549
- 'space.800': SerializedStyles;
550
- };
551
-
552
- // @public (undocumented)
553
- type Shadow = keyof typeof shadowMap;
554
-
555
- // @public (undocumented)
556
- const shadowMap: {
557
- readonly overflow: SerializedStyles;
558
- readonly 'overflow.perimeter': SerializedStyles;
559
- readonly 'overflow.spread': SerializedStyles;
560
- readonly overlay: SerializedStyles;
561
- readonly raised: SerializedStyles;
562
- };
563
-
564
154
  // @public (undocumented)
565
155
  type TextAlign = keyof typeof textAlignMap;
566
156
 
@@ -601,32 +191,6 @@ const textTransformMap: {
601
191
  uppercase: SerializedStyles;
602
192
  };
603
193
 
604
- // @public @deprecated
605
- export const UNSAFE_Box: BoxComponent;
606
-
607
- // @public @deprecated (undocumented)
608
- export type UNSAFE_BoxProps<T extends ElementType = 'div'> = Omit<
609
- ComponentPropsWithoutRef<T>,
610
- 'as' | 'className' | 'style'
611
- > &
612
- BasePrimitiveProps &
613
- BoxPropsBase<T>;
614
-
615
- // @public @deprecated
616
- export const UNSAFE_Inline: MemoExoticComponent<
617
- ForwardRefExoticComponent<UNSAFE_InlineProps & RefAttributes<HTMLDivElement>>
618
- >;
619
-
620
- // @public @deprecated (undocumented)
621
- export interface UNSAFE_InlineProps extends BasePrimitiveProps {
622
- alignItems?: FlexAlignItems_2;
623
- children: ReactNode;
624
- divider?: ReactNode;
625
- flexWrap?: FlexWrap;
626
- gap: ColumnGap;
627
- justifyContent?: FlexJustifyContent_2;
628
- }
629
-
630
194
  // @public (undocumented)
631
195
  export const UNSAFE_InteractionSurface: ({
632
196
  appearance,
@@ -634,20 +198,6 @@ export const UNSAFE_InteractionSurface: ({
634
198
  testId,
635
199
  }: InteractionSurfaceProps) => jsx.JSX.Element;
636
200
 
637
- // @public @deprecated
638
- export const UNSAFE_Stack: MemoExoticComponent<
639
- ForwardRefExoticComponent<UNSAFE_StackProps & RefAttributes<HTMLDivElement>>
640
- >;
641
-
642
- // @public @deprecated (undocumented)
643
- export interface UNSAFE_StackProps extends BasePrimitiveProps {
644
- alignItems?: FlexAlignItems_3;
645
- children: ReactNode;
646
- flexWrap?: FlexWrap_2;
647
- gap: RowGap;
648
- justifyContent?: FlexJustifyContent_3;
649
- }
650
-
651
201
  // @internal
652
202
  export const UNSAFE_Text: FC<UNSAFE_TextProps>;
653
203
 
@@ -676,21 +226,6 @@ const verticalAlignMap: {
676
226
  bottom: SerializedStyles;
677
227
  };
678
228
 
679
- // @public (undocumented)
680
- type Width = keyof typeof widthMap;
681
-
682
- // @public
683
- const widthMap: {
684
- '100%': SerializedStyles;
685
- 'size.100': SerializedStyles;
686
- 'size.1000': SerializedStyles;
687
- 'size.200': SerializedStyles;
688
- 'size.300': SerializedStyles;
689
- 'size.400': SerializedStyles;
690
- 'size.500': SerializedStyles;
691
- 'size.600': SerializedStyles;
692
- };
693
-
694
229
  // (No @packageDocumentation comment for this package)
695
230
  ```
696
231
 
@@ -9,10 +9,7 @@ import {
9
9
 
10
10
  import { createColorStylesFromTemplate } from './color-codegen-template';
11
11
  import { createColorMapTemplate } from './color-map-template';
12
- import { createDimensionStylesFromTemplate } from './dimension-codegen-template';
13
12
  import { createInteractionStylesFromTemplate } from './interaction-codegen';
14
- import { createStylesFromTemplate } from './misc-codegen-template';
15
- import { createSpacingStylesFromTemplate } from './spacing-codegen-template';
16
13
  import { createSpacingScaleTemplate } from './spacing-scale-template';
17
14
  import { createTypographyStylesFromTemplate } from './typography-codegen-template';
18
15
 
@@ -20,9 +17,7 @@ const colorMapOutputFolder = join(__dirname, '../', 'src', 'internal');
20
17
  const colorTokensDependencyPath = require.resolve(
21
18
  '../../tokens/src/artifacts/tokens-raw/atlassian-light',
22
19
  );
23
- const spacingTokensDependencyPath = require.resolve(
24
- '../../tokens/src/artifacts/tokens-raw/atlassian-spacing',
25
- );
20
+
26
21
  const typographyTokensDependencyPath = require.resolve(
27
22
  '../../tokens/src/artifacts/tokens-raw/atlassian-typography',
28
23
  );
@@ -48,52 +43,24 @@ writeFile(
48
43
 
49
44
  // generate colors
50
45
  Promise.all(
51
- [{ target: 'text.partial.tsx' }, { target: 'box.partial.tsx' }].map(
52
- ({ target }) => {
53
- const targetPath = join(__dirname, '../', 'src', 'components', target);
54
-
55
- const source = createPartialSignedArtifact(
56
- (options) => options.map(createColorStylesFromTemplate).join('\n'),
57
- 'yarn codegen-styles',
58
- {
59
- id: 'colors',
60
- absoluteFilePath: targetPath,
61
- dependencies: [colorTokensDependencyPath],
62
- },
63
- );
64
-
65
- return writeFile(targetPath, source).then(() =>
66
- console.log(`${targetPath} written!`),
67
- );
68
- },
69
- ),
70
- )
71
- .then(() => {
72
- // generate spacing values
73
- return Promise.all(
74
- [
75
- { target: 'box.partial.tsx' },
76
- { target: 'stack.partial.tsx' },
77
- { target: 'inline.partial.tsx' },
78
- ].map(({ target }) => {
79
- const targetPath = join(__dirname, '../', 'src', 'components', target);
46
+ [{ target: 'text.partial.tsx' }].map(({ target }) => {
47
+ const targetPath = join(__dirname, '../', 'src', 'components', target);
80
48
 
81
- const source = createPartialSignedArtifact(
82
- (options) => options.map(createSpacingStylesFromTemplate).join('\n'),
83
- 'yarn codegen-styles',
84
- {
85
- id: 'spacing',
86
- absoluteFilePath: targetPath,
87
- dependencies: [spacingTokensDependencyPath],
88
- },
89
- );
49
+ const source = createPartialSignedArtifact(
50
+ (options) => options.map(createColorStylesFromTemplate).join('\n'),
51
+ 'yarn codegen-styles',
52
+ {
53
+ id: 'colors',
54
+ absoluteFilePath: targetPath,
55
+ dependencies: [colorTokensDependencyPath],
56
+ },
57
+ );
90
58
 
91
- return writeFile(targetPath, source).then(() =>
92
- console.log(`${targetPath} written!`),
93
- );
94
- }),
59
+ return writeFile(targetPath, source).then(() =>
60
+ console.log(`${targetPath} written!`),
95
61
  );
96
- })
62
+ }),
63
+ )
97
64
  .then(() => {
98
65
  // generate typography values
99
66
  return Promise.all(
@@ -117,24 +84,6 @@ Promise.all(
117
84
  }),
118
85
  );
119
86
  })
120
- .then(() => {
121
- // generate other values
122
- return Promise.all(
123
- [{ target: 'box.partial.tsx' }].map(({ target }) => {
124
- const targetPath = join(__dirname, '../', 'src', 'components', target);
125
-
126
- const source = createPartialSignedArtifact(
127
- (options) => options.map(createStylesFromTemplate).join('\n'),
128
- 'yarn codegen-styles',
129
- { id: 'misc', absoluteFilePath: targetPath },
130
- );
131
-
132
- return writeFile(targetPath, source).then(() =>
133
- console.log(`${targetPath} written!`),
134
- );
135
- }),
136
- );
137
- })
138
87
  .then(() => {
139
88
  const targetPath = join(
140
89
  __dirname,
@@ -154,28 +103,6 @@ Promise.all(
154
103
  },
155
104
  );
156
105
 
157
- return writeFile(targetPath, source).then(() =>
158
- console.log(`${targetPath} written!`),
159
- );
160
- })
161
- .then(() => {
162
- const targetPath = join(
163
- __dirname,
164
- '../',
165
- 'src',
166
- 'components',
167
- 'box.partial.tsx',
168
- );
169
-
170
- const source = createPartialSignedArtifact(
171
- (options) => options.map(createDimensionStylesFromTemplate).join('\n'),
172
- 'yarn codegen-styles',
173
- {
174
- id: 'dimensions',
175
- absoluteFilePath: targetPath,
176
- },
177
- );
178
-
179
106
  return writeFile(targetPath, source).then(() =>
180
107
  console.log(`${targetPath} written!`),
181
108
  );
@@ -2,10 +2,10 @@ import React from 'react';
2
2
 
3
3
  import { act, fireEvent, render } from '@testing-library/react';
4
4
 
5
+ import { Box } from '@atlaskit/primitives';
5
6
  import { token } from '@atlaskit/tokens';
6
7
 
7
8
  import {
8
- UNSAFE_Box as Box,
9
9
  UNSAFE_InteractionSurface as InteractionSurface,
10
10
  UNSAFE_Text as Text,
11
11
  } from '../../../index';
@@ -57,7 +57,7 @@ describe('InteractionSurface component', () => {
57
57
 
58
58
  it('should render an inherited hover state if a Box context is present', () => {
59
59
  const { getByTestId } = render(
60
- <Box backgroundColor="brand.bold">
60
+ <Box backgroundColor="color.background.brand.bold">
61
61
  <InteractionSurface testId="surface">
62
62
  <Text>hello</Text>
63
63
  </InteractionSurface>
@@ -1,6 +1,6 @@
1
1
  import { createContext, useContext } from 'react';
2
2
 
3
- import type { BackgroundColor } from './box.partial';
3
+ import type { BackgroundColor } from '@atlaskit/primitives';
4
4
 
5
5
  /**
6
6
  * __Surface context__