@atlaskit/primitives 0.8.3 → 0.8.4
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 +6 -0
- package/constellation/inline/code.mdx +9 -1
- package/constellation/inline/examples.mdx +2 -2
- package/constellation/overview/examples.mdx +2 -4
- package/constellation/stack/code.mdx +4 -2
- package/constellation/stack/examples.mdx +1 -1
- package/dist/cjs/components/internal/extract-react-types/inline-props.js +7 -0
- package/dist/cjs/components/internal/extract-react-types/stack-props.js +7 -0
- package/dist/cjs/internal/style-maps.partial.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/internal/extract-react-types/inline-props.js +1 -0
- package/dist/es2019/components/internal/extract-react-types/stack-props.js +1 -0
- package/dist/es2019/internal/style-maps.partial.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/internal/extract-react-types/inline-props.js +1 -0
- package/dist/esm/components/internal/extract-react-types/stack-props.js +1 -0
- package/dist/esm/internal/style-maps.partial.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/components/inline.d.ts +2 -2
- package/dist/types/components/internal/extract-react-types/inline-props.d.ts +2 -0
- package/dist/types/components/internal/extract-react-types/stack-props.d.ts +2 -0
- package/dist/types/components/stack.d.ts +2 -2
- package/dist/types/internal/style-maps.partial.d.ts +10 -10
- package/extract-react-types/stack-props.tsx +3 -0
- package/package.json +1 -10
- package/report.api.md +149 -59
- package/scripts/spacing-codegen-template.tsx +19 -20
- package/tmp/api-report-tmp.d.ts +11 -47
- package/constellation/inline/usage.mdx +0 -7
- package/constellation/stack/usage.mdx +0 -7
- /package/extract-react-types/{inline.tsx → inline-props.tsx} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/primitives
|
|
2
2
|
|
|
3
|
+
## 0.8.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`7127e85932a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7127e85932a) - Update codegen to explicitly list spacing prop values as string unions for compatibility with extract-react-types.
|
|
8
|
+
|
|
3
9
|
## 0.8.3
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Inline
|
|
3
|
+
description: Inline is a primitive component based on flexbox that manages the horizontal layout of direct children.
|
|
4
|
+
order: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
import InlineProps from '!!extract-react-types-loader!../../src/components/internal/extract-react-types/inline-props'
|
|
8
|
+
|
|
1
9
|
## Props
|
|
2
10
|
|
|
3
|
-
|
|
11
|
+
<PropsTable heading="" props={InlineProps} />
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Inline
|
|
3
|
-
description: Inline is
|
|
3
|
+
description: Inline is a primitive component based on flexbox that manages the horizontal layout of direct children.
|
|
4
4
|
order: 0
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -67,7 +67,7 @@ For logically related elements it's possible to specify a `separator` value.
|
|
|
67
67
|
|
|
68
68
|
## Width control
|
|
69
69
|
|
|
70
|
-
By default an `Inline` will have its width influenced by the context where it appears.
|
|
70
|
+
By default an `Inline` will have its width influenced by the context where it appears.
|
|
71
71
|
|
|
72
72
|
To control that the `grow` prop can be used with the values:
|
|
73
73
|
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Stack
|
|
3
|
-
description:
|
|
3
|
+
description: Stack is a primitive component based on flexbox that manages the vertical layout of direct children.
|
|
4
4
|
order: 1
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
import StackProps from '!!extract-react-types-loader!../../src/components/internal/extract-react-types/stack-props'
|
|
8
|
+
|
|
7
9
|
## Props
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
<PropsTable heading="" props={StackProps} />
|
|
@@ -32,7 +32,7 @@ exports.dimensionMap = dimensionMap;
|
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
35
|
-
* @codegen <<SignedSource::
|
|
35
|
+
* @codegen <<SignedSource::06b49ea9175072486628ad5a39dd0c4b>>
|
|
36
36
|
* @codegenId spacing
|
|
37
37
|
* @codegenCommand yarn codegen-styles
|
|
38
38
|
* @codegenParams ["padding", "space"]
|
package/dist/cjs/version.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function Inline(_) {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function Inline(_) {}
|
|
@@ -22,7 +22,7 @@ export const dimensionMap = {
|
|
|
22
22
|
*/
|
|
23
23
|
/**
|
|
24
24
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
25
|
-
* @codegen <<SignedSource::
|
|
25
|
+
* @codegen <<SignedSource::06b49ea9175072486628ad5a39dd0c4b>>
|
|
26
26
|
* @codegenId spacing
|
|
27
27
|
* @codegenCommand yarn codegen-styles
|
|
28
28
|
* @codegenParams ["padding", "space"]
|
package/dist/es2019/version.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function Inline(_) {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function Inline(_) {}
|
|
@@ -23,7 +23,7 @@ export var dimensionMap = {
|
|
|
23
23
|
*/
|
|
24
24
|
/**
|
|
25
25
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
26
|
-
* @codegen <<SignedSource::
|
|
26
|
+
* @codegen <<SignedSource::06b49ea9175072486628ad5a39dd0c4b>>
|
|
27
27
|
* @codegenId spacing
|
|
28
28
|
* @codegenCommand yarn codegen-styles
|
|
29
29
|
* @codegenParams ["padding", "space"]
|
package/dist/esm/version.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import {
|
|
2
|
+
import { ElementType, ReactNode } from 'react';
|
|
3
3
|
import { type Gap, type RowGap } from '../internal/style-maps.partial';
|
|
4
4
|
export interface InlineProps<T extends ElementType = 'div'> {
|
|
5
5
|
/**
|
|
@@ -50,7 +50,7 @@ export interface InlineProps<T extends ElementType = 'div'> {
|
|
|
50
50
|
/**
|
|
51
51
|
* Forwarded ref element
|
|
52
52
|
*/
|
|
53
|
-
ref?: ComponentPropsWithRef<T>['ref'];
|
|
53
|
+
ref?: React.ComponentPropsWithRef<T>['ref'];
|
|
54
54
|
}
|
|
55
55
|
export declare type AlignInline = 'start' | 'center' | 'end';
|
|
56
56
|
export declare type AlignBlock = 'start' | 'center' | 'end' | 'baseline';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import {
|
|
2
|
+
import { ElementType, ReactNode } from 'react';
|
|
3
3
|
import { type Gap } from '../internal/style-maps.partial';
|
|
4
4
|
export interface StackProps<T extends ElementType = 'div'> {
|
|
5
5
|
/**
|
|
@@ -37,7 +37,7 @@ export interface StackProps<T extends ElementType = 'div'> {
|
|
|
37
37
|
/**
|
|
38
38
|
* Forwarded ref element
|
|
39
39
|
*/
|
|
40
|
-
ref?: ComponentPropsWithRef<T>['ref'];
|
|
40
|
+
ref?: React.ComponentPropsWithRef<T>['ref'];
|
|
41
41
|
}
|
|
42
42
|
export declare type AlignInline = 'start' | 'center' | 'end';
|
|
43
43
|
export declare type AlignBlock = 'start' | 'center' | 'end';
|
|
@@ -28,7 +28,7 @@ export declare type MaxHeight = keyof typeof dimensionMap;
|
|
|
28
28
|
*/
|
|
29
29
|
/**
|
|
30
30
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
31
|
-
* @codegen <<SignedSource::
|
|
31
|
+
* @codegen <<SignedSource::06b49ea9175072486628ad5a39dd0c4b>>
|
|
32
32
|
* @codegenId spacing
|
|
33
33
|
* @codegenCommand yarn codegen-styles
|
|
34
34
|
* @codegenParams ["padding", "space"]
|
|
@@ -50,13 +50,13 @@ export declare const paddingMap: {
|
|
|
50
50
|
readonly 'space.800': "var(--ds-space-800)";
|
|
51
51
|
readonly 'space.1000': "var(--ds-space-1000)";
|
|
52
52
|
};
|
|
53
|
-
export declare type Padding =
|
|
54
|
-
export declare type PaddingBlock =
|
|
55
|
-
export declare type PaddingBlockStart =
|
|
56
|
-
export declare type PaddingBlockEnd =
|
|
57
|
-
export declare type PaddingInline =
|
|
58
|
-
export declare type PaddingInlineStart =
|
|
59
|
-
export declare type PaddingInlineEnd =
|
|
53
|
+
export declare type Padding = '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';
|
|
54
|
+
export declare type PaddingBlock = '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';
|
|
55
|
+
export declare type PaddingBlockStart = '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';
|
|
56
|
+
export declare type PaddingBlockEnd = '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';
|
|
57
|
+
export declare type PaddingInline = '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';
|
|
58
|
+
export declare type PaddingInlineStart = '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';
|
|
59
|
+
export declare type PaddingInlineEnd = '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';
|
|
60
60
|
export declare const spaceMap: {
|
|
61
61
|
readonly 'space.0': "var(--ds-space-0)";
|
|
62
62
|
readonly 'space.025': "var(--ds-space-025)";
|
|
@@ -73,8 +73,8 @@ export declare const spaceMap: {
|
|
|
73
73
|
readonly 'space.800': "var(--ds-space-800)";
|
|
74
74
|
readonly 'space.1000': "var(--ds-space-1000)";
|
|
75
75
|
};
|
|
76
|
-
export declare type Gap =
|
|
77
|
-
export declare type RowGap =
|
|
76
|
+
export declare type Gap = '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';
|
|
77
|
+
export declare type RowGap = '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';
|
|
78
78
|
/**
|
|
79
79
|
* @codegenEnd
|
|
80
80
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/primitives",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.4",
|
|
4
4
|
"description": "Primitives are token-backed low-level building blocks.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,15 +29,6 @@
|
|
|
29
29
|
"type": "alpha"
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
|
-
{
|
|
33
|
-
"title": "Box",
|
|
34
|
-
"folder": "box",
|
|
35
|
-
"slug": "primitives/box",
|
|
36
|
-
"id": "@atlaskit/primitives/box",
|
|
37
|
-
"status": {
|
|
38
|
-
"type": "alpha"
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
32
|
{
|
|
42
33
|
"title": "Inline",
|
|
43
34
|
"folder": "inline",
|
package/report.api.md
CHANGED
|
@@ -347,7 +347,21 @@ const flexShrinkMap: {
|
|
|
347
347
|
};
|
|
348
348
|
|
|
349
349
|
// @public (undocumented)
|
|
350
|
-
type Gap =
|
|
350
|
+
type Gap =
|
|
351
|
+
| 'space.0'
|
|
352
|
+
| 'space.025'
|
|
353
|
+
| 'space.050'
|
|
354
|
+
| 'space.075'
|
|
355
|
+
| 'space.100'
|
|
356
|
+
| 'space.1000'
|
|
357
|
+
| 'space.150'
|
|
358
|
+
| 'space.200'
|
|
359
|
+
| 'space.250'
|
|
360
|
+
| 'space.300'
|
|
361
|
+
| 'space.400'
|
|
362
|
+
| 'space.500'
|
|
363
|
+
| 'space.600'
|
|
364
|
+
| 'space.800';
|
|
351
365
|
|
|
352
366
|
// @public (undocumented)
|
|
353
367
|
type Grow = 'fill' | 'hug';
|
|
@@ -386,7 +400,7 @@ export interface InlineProps<T extends ElementType = 'div'> {
|
|
|
386
400
|
as?: 'div' | 'ol' | 'span' | 'ul';
|
|
387
401
|
children: ReactNode;
|
|
388
402
|
grow?: Grow;
|
|
389
|
-
ref?: ComponentPropsWithRef<T>['ref'];
|
|
403
|
+
ref?: React.ComponentPropsWithRef<T>['ref'];
|
|
390
404
|
rowSpace?: RowGap;
|
|
391
405
|
separator?: string;
|
|
392
406
|
shouldWrap?: boolean;
|
|
@@ -459,43 +473,123 @@ const overflowMap: {
|
|
|
459
473
|
};
|
|
460
474
|
|
|
461
475
|
// @public (undocumented)
|
|
462
|
-
type Padding =
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
476
|
+
type Padding =
|
|
477
|
+
| 'space.0'
|
|
478
|
+
| 'space.025'
|
|
479
|
+
| 'space.050'
|
|
480
|
+
| 'space.075'
|
|
481
|
+
| 'space.100'
|
|
482
|
+
| 'space.1000'
|
|
483
|
+
| 'space.150'
|
|
484
|
+
| 'space.200'
|
|
485
|
+
| 'space.250'
|
|
486
|
+
| 'space.300'
|
|
487
|
+
| 'space.400'
|
|
488
|
+
| 'space.500'
|
|
489
|
+
| 'space.600'
|
|
490
|
+
| 'space.800';
|
|
491
|
+
|
|
492
|
+
// @public (undocumented)
|
|
493
|
+
type PaddingBlock =
|
|
494
|
+
| 'space.0'
|
|
495
|
+
| 'space.025'
|
|
496
|
+
| 'space.050'
|
|
497
|
+
| 'space.075'
|
|
498
|
+
| 'space.100'
|
|
499
|
+
| 'space.1000'
|
|
500
|
+
| 'space.150'
|
|
501
|
+
| 'space.200'
|
|
502
|
+
| 'space.250'
|
|
503
|
+
| 'space.300'
|
|
504
|
+
| 'space.400'
|
|
505
|
+
| 'space.500'
|
|
506
|
+
| 'space.600'
|
|
507
|
+
| 'space.800';
|
|
508
|
+
|
|
509
|
+
// @public (undocumented)
|
|
510
|
+
type PaddingBlockEnd =
|
|
511
|
+
| 'space.0'
|
|
512
|
+
| 'space.025'
|
|
513
|
+
| 'space.050'
|
|
514
|
+
| 'space.075'
|
|
515
|
+
| 'space.100'
|
|
516
|
+
| 'space.1000'
|
|
517
|
+
| 'space.150'
|
|
518
|
+
| 'space.200'
|
|
519
|
+
| 'space.250'
|
|
520
|
+
| 'space.300'
|
|
521
|
+
| 'space.400'
|
|
522
|
+
| 'space.500'
|
|
523
|
+
| 'space.600'
|
|
524
|
+
| 'space.800';
|
|
525
|
+
|
|
526
|
+
// @public (undocumented)
|
|
527
|
+
type PaddingBlockStart =
|
|
528
|
+
| 'space.0'
|
|
529
|
+
| 'space.025'
|
|
530
|
+
| 'space.050'
|
|
531
|
+
| 'space.075'
|
|
532
|
+
| 'space.100'
|
|
533
|
+
| 'space.1000'
|
|
534
|
+
| 'space.150'
|
|
535
|
+
| 'space.200'
|
|
536
|
+
| 'space.250'
|
|
537
|
+
| 'space.300'
|
|
538
|
+
| 'space.400'
|
|
539
|
+
| 'space.500'
|
|
540
|
+
| 'space.600'
|
|
541
|
+
| 'space.800';
|
|
542
|
+
|
|
543
|
+
// @public (undocumented)
|
|
544
|
+
type PaddingInline =
|
|
545
|
+
| 'space.0'
|
|
546
|
+
| 'space.025'
|
|
547
|
+
| 'space.050'
|
|
548
|
+
| 'space.075'
|
|
549
|
+
| 'space.100'
|
|
550
|
+
| 'space.1000'
|
|
551
|
+
| 'space.150'
|
|
552
|
+
| 'space.200'
|
|
553
|
+
| 'space.250'
|
|
554
|
+
| 'space.300'
|
|
555
|
+
| 'space.400'
|
|
556
|
+
| 'space.500'
|
|
557
|
+
| 'space.600'
|
|
558
|
+
| 'space.800';
|
|
559
|
+
|
|
560
|
+
// @public (undocumented)
|
|
561
|
+
type PaddingInlineEnd =
|
|
562
|
+
| 'space.0'
|
|
563
|
+
| 'space.025'
|
|
564
|
+
| 'space.050'
|
|
565
|
+
| 'space.075'
|
|
566
|
+
| 'space.100'
|
|
567
|
+
| 'space.1000'
|
|
568
|
+
| 'space.150'
|
|
569
|
+
| 'space.200'
|
|
570
|
+
| 'space.250'
|
|
571
|
+
| 'space.300'
|
|
572
|
+
| 'space.400'
|
|
573
|
+
| 'space.500'
|
|
574
|
+
| 'space.600'
|
|
575
|
+
| 'space.800';
|
|
576
|
+
|
|
577
|
+
// @public (undocumented)
|
|
578
|
+
type PaddingInlineStart =
|
|
579
|
+
| 'space.0'
|
|
580
|
+
| 'space.025'
|
|
581
|
+
| 'space.050'
|
|
582
|
+
| 'space.075'
|
|
583
|
+
| 'space.100'
|
|
584
|
+
| 'space.1000'
|
|
585
|
+
| 'space.150'
|
|
586
|
+
| 'space.200'
|
|
587
|
+
| 'space.250'
|
|
588
|
+
| 'space.300'
|
|
589
|
+
| 'space.400'
|
|
590
|
+
| 'space.500'
|
|
591
|
+
| 'space.600'
|
|
592
|
+
| 'space.800';
|
|
499
593
|
|
|
500
594
|
// @public (undocumented)
|
|
501
595
|
type Position = keyof typeof positionMap;
|
|
@@ -514,7 +608,21 @@ type PublicBoxPropsBase = {
|
|
|
514
608
|
};
|
|
515
609
|
|
|
516
610
|
// @public (undocumented)
|
|
517
|
-
type RowGap =
|
|
611
|
+
type RowGap =
|
|
612
|
+
| 'space.0'
|
|
613
|
+
| 'space.025'
|
|
614
|
+
| 'space.050'
|
|
615
|
+
| 'space.075'
|
|
616
|
+
| 'space.100'
|
|
617
|
+
| 'space.1000'
|
|
618
|
+
| 'space.150'
|
|
619
|
+
| 'space.200'
|
|
620
|
+
| 'space.250'
|
|
621
|
+
| 'space.300'
|
|
622
|
+
| 'space.400'
|
|
623
|
+
| 'space.500'
|
|
624
|
+
| 'space.600'
|
|
625
|
+
| 'space.800';
|
|
518
626
|
|
|
519
627
|
// @public (undocumented)
|
|
520
628
|
type SafeCSSObject = CSSPseudos &
|
|
@@ -539,24 +647,6 @@ const shadowMap: {
|
|
|
539
647
|
readonly raised: 'var(--ds-shadow-raised)';
|
|
540
648
|
};
|
|
541
649
|
|
|
542
|
-
// @public (undocumented)
|
|
543
|
-
const spaceMap: {
|
|
544
|
-
readonly 'space.0': 'var(--ds-space-0)';
|
|
545
|
-
readonly 'space.025': 'var(--ds-space-025)';
|
|
546
|
-
readonly 'space.050': 'var(--ds-space-050)';
|
|
547
|
-
readonly 'space.075': 'var(--ds-space-075)';
|
|
548
|
-
readonly 'space.100': 'var(--ds-space-100)';
|
|
549
|
-
readonly 'space.150': 'var(--ds-space-150)';
|
|
550
|
-
readonly 'space.200': 'var(--ds-space-200)';
|
|
551
|
-
readonly 'space.250': 'var(--ds-space-250)';
|
|
552
|
-
readonly 'space.300': 'var(--ds-space-300)';
|
|
553
|
-
readonly 'space.400': 'var(--ds-space-400)';
|
|
554
|
-
readonly 'space.500': 'var(--ds-space-500)';
|
|
555
|
-
readonly 'space.600': 'var(--ds-space-600)';
|
|
556
|
-
readonly 'space.800': 'var(--ds-space-800)';
|
|
557
|
-
readonly 'space.1000': 'var(--ds-space-1000)';
|
|
558
|
-
};
|
|
559
|
-
|
|
560
650
|
// @public (undocumented)
|
|
561
651
|
type Spread = 'space-between';
|
|
562
652
|
|
|
@@ -588,7 +678,7 @@ export interface StackProps<T extends ElementType = 'div'> {
|
|
|
588
678
|
as?: 'div' | 'ol' | 'span' | 'ul';
|
|
589
679
|
children: ReactNode;
|
|
590
680
|
grow?: Grow_2;
|
|
591
|
-
ref?: ComponentPropsWithRef<T>['ref'];
|
|
681
|
+
ref?: React.ComponentPropsWithRef<T>['ref'];
|
|
592
682
|
space?: Gap;
|
|
593
683
|
spread?: Spread_2;
|
|
594
684
|
testId?: string;
|
|
@@ -48,9 +48,8 @@ export const createSpacingStylesFromTemplate = (
|
|
|
48
48
|
const { cssProperties, propNameFormatter } =
|
|
49
49
|
spacingProperties[spacingProperty]!;
|
|
50
50
|
|
|
51
|
-
return (
|
|
52
|
-
|
|
53
|
-
`
|
|
51
|
+
return prettier.format(
|
|
52
|
+
`
|
|
54
53
|
export const ${spacingProperty}Map = {
|
|
55
54
|
${activeTokens
|
|
56
55
|
.sort((a, b) =>
|
|
@@ -65,22 +64,22 @@ export const createSpacingStylesFromTemplate = (
|
|
|
65
64
|
token.fallback,
|
|
66
65
|
)}`;
|
|
67
66
|
})}
|
|
68
|
-
} as const
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
67
|
+
} as const;` +
|
|
68
|
+
(cssProperties
|
|
69
|
+
.map(
|
|
70
|
+
cssProperty =>
|
|
71
|
+
// TODO: Update to use `keyof` when ERT supports it: https://github.com/atlassian/extract-react-types/issues/149
|
|
72
|
+
`\nexport type ${capitalize(cssProperty)} = ${activeTokens
|
|
73
|
+
.map(token => `'${token.name}'`)
|
|
74
|
+
.join(' | ')}`,
|
|
75
|
+
)
|
|
76
|
+
.join('') +
|
|
77
|
+
'\n'),
|
|
78
|
+
{
|
|
79
|
+
singleQuote: true,
|
|
80
|
+
trailingComma: 'all',
|
|
81
|
+
parser: 'typescript',
|
|
82
|
+
plugins: [parserTypeScript],
|
|
83
|
+
},
|
|
85
84
|
);
|
|
86
85
|
};
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -322,7 +322,7 @@ const flexShrinkMap: {
|
|
|
322
322
|
};
|
|
323
323
|
|
|
324
324
|
// @public (undocumented)
|
|
325
|
-
type Gap =
|
|
325
|
+
type Gap = 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.1000' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800';
|
|
326
326
|
|
|
327
327
|
// @public (undocumented)
|
|
328
328
|
type Grow = 'fill' | 'hug';
|
|
@@ -343,7 +343,7 @@ export interface InlineProps<T extends ElementType = 'div'> {
|
|
|
343
343
|
as?: 'div' | 'ol' | 'span' | 'ul';
|
|
344
344
|
children: ReactNode;
|
|
345
345
|
grow?: Grow;
|
|
346
|
-
ref?: ComponentPropsWithRef<T>['ref'];
|
|
346
|
+
ref?: React.ComponentPropsWithRef<T>['ref'];
|
|
347
347
|
rowSpace?: RowGap;
|
|
348
348
|
separator?: string;
|
|
349
349
|
shouldWrap?: boolean;
|
|
@@ -416,43 +416,25 @@ const overflowMap: {
|
|
|
416
416
|
};
|
|
417
417
|
|
|
418
418
|
// @public (undocumented)
|
|
419
|
-
type Padding =
|
|
419
|
+
type Padding = 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.1000' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800';
|
|
420
420
|
|
|
421
421
|
// @public (undocumented)
|
|
422
|
-
type PaddingBlock =
|
|
422
|
+
type PaddingBlock = 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.1000' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800';
|
|
423
423
|
|
|
424
424
|
// @public (undocumented)
|
|
425
|
-
type PaddingBlockEnd =
|
|
425
|
+
type PaddingBlockEnd = 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.1000' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800';
|
|
426
426
|
|
|
427
427
|
// @public (undocumented)
|
|
428
|
-
type PaddingBlockStart =
|
|
428
|
+
type PaddingBlockStart = 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.1000' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800';
|
|
429
429
|
|
|
430
430
|
// @public (undocumented)
|
|
431
|
-
type PaddingInline =
|
|
431
|
+
type PaddingInline = 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.1000' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800';
|
|
432
432
|
|
|
433
433
|
// @public (undocumented)
|
|
434
|
-
type PaddingInlineEnd =
|
|
434
|
+
type PaddingInlineEnd = 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.1000' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800';
|
|
435
435
|
|
|
436
436
|
// @public (undocumented)
|
|
437
|
-
type PaddingInlineStart =
|
|
438
|
-
|
|
439
|
-
// @public
|
|
440
|
-
const paddingMap: {
|
|
441
|
-
readonly 'space.0': "var(--ds-space-0)";
|
|
442
|
-
readonly 'space.025': "var(--ds-space-025)";
|
|
443
|
-
readonly 'space.050': "var(--ds-space-050)";
|
|
444
|
-
readonly 'space.075': "var(--ds-space-075)";
|
|
445
|
-
readonly 'space.100': "var(--ds-space-100)";
|
|
446
|
-
readonly 'space.150': "var(--ds-space-150)";
|
|
447
|
-
readonly 'space.200': "var(--ds-space-200)";
|
|
448
|
-
readonly 'space.250': "var(--ds-space-250)";
|
|
449
|
-
readonly 'space.300': "var(--ds-space-300)";
|
|
450
|
-
readonly 'space.400': "var(--ds-space-400)";
|
|
451
|
-
readonly 'space.500': "var(--ds-space-500)";
|
|
452
|
-
readonly 'space.600': "var(--ds-space-600)";
|
|
453
|
-
readonly 'space.800': "var(--ds-space-800)";
|
|
454
|
-
readonly 'space.1000': "var(--ds-space-1000)";
|
|
455
|
-
};
|
|
437
|
+
type PaddingInlineStart = 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.1000' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800';
|
|
456
438
|
|
|
457
439
|
// @public (undocumented)
|
|
458
440
|
type Position = keyof typeof positionMap;
|
|
@@ -471,7 +453,7 @@ type PublicBoxPropsBase = {
|
|
|
471
453
|
};
|
|
472
454
|
|
|
473
455
|
// @public (undocumented)
|
|
474
|
-
type RowGap =
|
|
456
|
+
type RowGap = 'space.0' | 'space.025' | 'space.050' | 'space.075' | 'space.100' | 'space.1000' | 'space.150' | 'space.200' | 'space.250' | 'space.300' | 'space.400' | 'space.500' | 'space.600' | 'space.800';
|
|
475
457
|
|
|
476
458
|
// @public (undocumented)
|
|
477
459
|
type SafeCSSObject = CSSPseudos & TokenisedProps & Omit<CSSPropertiesWithMultiValues, keyof TokenisedProps>;
|
|
@@ -491,24 +473,6 @@ const shadowMap: {
|
|
|
491
473
|
readonly raised: "var(--ds-shadow-raised)";
|
|
492
474
|
};
|
|
493
475
|
|
|
494
|
-
// @public (undocumented)
|
|
495
|
-
const spaceMap: {
|
|
496
|
-
readonly 'space.0': "var(--ds-space-0)";
|
|
497
|
-
readonly 'space.025': "var(--ds-space-025)";
|
|
498
|
-
readonly 'space.050': "var(--ds-space-050)";
|
|
499
|
-
readonly 'space.075': "var(--ds-space-075)";
|
|
500
|
-
readonly 'space.100': "var(--ds-space-100)";
|
|
501
|
-
readonly 'space.150': "var(--ds-space-150)";
|
|
502
|
-
readonly 'space.200': "var(--ds-space-200)";
|
|
503
|
-
readonly 'space.250': "var(--ds-space-250)";
|
|
504
|
-
readonly 'space.300': "var(--ds-space-300)";
|
|
505
|
-
readonly 'space.400': "var(--ds-space-400)";
|
|
506
|
-
readonly 'space.500': "var(--ds-space-500)";
|
|
507
|
-
readonly 'space.600': "var(--ds-space-600)";
|
|
508
|
-
readonly 'space.800': "var(--ds-space-800)";
|
|
509
|
-
readonly 'space.1000': "var(--ds-space-1000)";
|
|
510
|
-
};
|
|
511
|
-
|
|
512
476
|
// @public (undocumented)
|
|
513
477
|
type Spread = 'space-between';
|
|
514
478
|
|
|
@@ -525,7 +489,7 @@ export interface StackProps<T extends ElementType = 'div'> {
|
|
|
525
489
|
as?: 'div' | 'ol' | 'span' | 'ul';
|
|
526
490
|
children: ReactNode;
|
|
527
491
|
grow?: Grow_2;
|
|
528
|
-
ref?: ComponentPropsWithRef<T>['ref'];
|
|
492
|
+
ref?: React.ComponentPropsWithRef<T>['ref'];
|
|
529
493
|
space?: Gap;
|
|
530
494
|
spread?: Spread_2;
|
|
531
495
|
testId?: string;
|
|
File without changes
|