@atlaskit/primitives 2.0.1 → 2.0.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.
- package/CHANGELOG.md +6 -0
- package/constellation/bleed/code.mdx +5 -3
- package/constellation/box/code.mdx +5 -3
- package/constellation/flex/code.mdx +5 -3
- package/constellation/grid/code.mdx +5 -3
- package/constellation/inline/code.mdx +5 -3
- package/constellation/stack/code.mdx +5 -3
- package/dist/cjs/components/link.js +3 -2
- package/dist/cjs/responsive/media-helper.js +1 -1
- package/dist/cjs/xcss/style-maps.partial.js +8 -8
- package/dist/es2019/components/link.js +3 -2
- package/dist/es2019/responsive/media-helper.js +1 -1
- package/dist/es2019/xcss/style-maps.partial.js +8 -8
- package/dist/esm/components/link.js +3 -2
- package/dist/esm/responsive/media-helper.js +1 -1
- package/dist/esm/xcss/style-maps.partial.js +8 -8
- package/dist/types/components/box.d.ts +1 -1
- package/dist/types/components/flex.d.ts +2 -2
- package/dist/types/components/inline.d.ts +2 -2
- package/dist/types/components/link.d.ts +2 -2
- package/dist/types/components/stack.d.ts +2 -2
- package/dist/types/components/text.d.ts +6 -6
- package/dist/types/components/types.d.ts +5 -1
- package/dist/types/responsive/hide.d.ts +2 -2
- package/dist/types/responsive/media-helper.d.ts +1 -1
- package/dist/types/responsive/show.d.ts +2 -2
- package/dist/types/responsive/types.d.ts +3 -3
- package/dist/types/xcss/style-maps.partial.d.ts +1 -1
- package/dist/types-ts4.5/components/box.d.ts +1 -1
- package/dist/types-ts4.5/components/flex.d.ts +2 -2
- package/dist/types-ts4.5/components/inline.d.ts +2 -2
- package/dist/types-ts4.5/components/link.d.ts +2 -2
- package/dist/types-ts4.5/components/stack.d.ts +2 -2
- package/dist/types-ts4.5/components/text.d.ts +6 -6
- package/dist/types-ts4.5/components/types.d.ts +5 -1
- package/dist/types-ts4.5/responsive/hide.d.ts +2 -2
- package/dist/types-ts4.5/responsive/media-helper.d.ts +1 -1
- package/dist/types-ts4.5/responsive/show.d.ts +2 -2
- package/dist/types-ts4.5/responsive/types.d.ts +3 -3
- package/dist/types-ts4.5/xcss/style-maps.partial.d.ts +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/primitives
|
|
2
2
|
|
|
3
|
+
## 2.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#72557](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72557) [`0c78c9c18cb7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0c78c9c18cb7) - Fix font family not preferencing apple system fonts on macOS
|
|
8
|
+
|
|
3
9
|
## 2.0.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
title: Bleed
|
|
3
3
|
description: A bleed controls negative whitespace in layouts.
|
|
4
4
|
order: 1
|
|
5
|
+
props:
|
|
6
|
+
packageName: '@atlaskit/primitives'
|
|
7
|
+
exports:
|
|
8
|
+
- Bleed
|
|
5
9
|
---
|
|
6
10
|
|
|
7
11
|
import { CodeDocsHeader } from '@af/design-system-docs-ui';
|
|
@@ -12,8 +16,6 @@ import { CodeDocsHeader } from '@af/design-system-docs-ui';
|
|
|
12
16
|
directoryName="primitives"
|
|
13
17
|
/>
|
|
14
18
|
|
|
15
|
-
import ERTBleed from '!!extract-react-types-loader!../../extract-react-types/bleed-props';
|
|
16
|
-
|
|
17
19
|
## Props
|
|
18
20
|
|
|
19
|
-
<
|
|
21
|
+
<TSMorphProps exportName="Bleed" packageName="@atlaskit/primitives" />
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
title: Box
|
|
3
3
|
description: A box is a generic container that provides managed access to design tokens.
|
|
4
4
|
order: 1
|
|
5
|
+
props:
|
|
6
|
+
packageName: '@atlaskit/primitives'
|
|
7
|
+
exports:
|
|
8
|
+
- Box
|
|
5
9
|
---
|
|
6
10
|
|
|
7
11
|
import { CodeDocsHeader } from '@af/design-system-docs-ui';
|
|
@@ -12,8 +16,6 @@ import { CodeDocsHeader } from '@af/design-system-docs-ui';
|
|
|
12
16
|
directoryName="primitives"
|
|
13
17
|
/>
|
|
14
18
|
|
|
15
|
-
import ERTBox from '!!extract-react-types-loader!../../extract-react-types/box-props';
|
|
16
|
-
|
|
17
19
|
## Props
|
|
18
20
|
|
|
19
|
-
<
|
|
21
|
+
<TSMorphProps exportName="Box" packageName="@atlaskit/primitives" />
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
title: Flex
|
|
3
3
|
description: A flex implements the CSS flexbox API.
|
|
4
4
|
order: 1
|
|
5
|
+
props:
|
|
6
|
+
packageName: '@atlaskit/primitives'
|
|
7
|
+
exports:
|
|
8
|
+
- Flex
|
|
5
9
|
---
|
|
6
10
|
|
|
7
11
|
import { CodeDocsHeader } from '@af/design-system-docs-ui';
|
|
@@ -12,8 +16,6 @@ import { CodeDocsHeader } from '@af/design-system-docs-ui';
|
|
|
12
16
|
directoryName="primitives"
|
|
13
17
|
/>
|
|
14
18
|
|
|
15
|
-
import ERTFlex from '!!extract-react-types-loader!../../extract-react-types/flex-props';
|
|
16
|
-
|
|
17
19
|
## Props
|
|
18
20
|
|
|
19
|
-
<
|
|
21
|
+
<TSMorphProps exportName="Flex" packageName="@atlaskit/primitives" />
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
title: Grid
|
|
3
3
|
description: A grid uses the CSS grid API to create consistent layouts.
|
|
4
4
|
order: 1
|
|
5
|
+
props:
|
|
6
|
+
packageName: '@atlaskit/primitives'
|
|
7
|
+
exports:
|
|
8
|
+
- Grid
|
|
5
9
|
---
|
|
6
10
|
|
|
7
11
|
import { CodeDocsHeader } from '@af/design-system-docs-ui';
|
|
@@ -12,8 +16,6 @@ import { CodeDocsHeader } from '@af/design-system-docs-ui';
|
|
|
12
16
|
directoryName="primitives"
|
|
13
17
|
/>
|
|
14
18
|
|
|
15
|
-
import ERTGrid from '!!extract-react-types-loader!../../extract-react-types/grid-props';
|
|
16
|
-
|
|
17
19
|
## Props
|
|
18
20
|
|
|
19
|
-
<
|
|
21
|
+
<TSMorphProps exportName="Grid" packageName="@atlaskit/primitives" />
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
title: Inline
|
|
3
3
|
description: An inline manages the horizontal layout of direct children using flexbox.
|
|
4
4
|
order: 1
|
|
5
|
+
props:
|
|
6
|
+
packageName: '@atlaskit/primitives'
|
|
7
|
+
exports:
|
|
8
|
+
- Inline
|
|
5
9
|
---
|
|
6
10
|
|
|
7
11
|
import { CodeDocsHeader } from '@af/design-system-docs-ui';
|
|
@@ -12,8 +16,6 @@ import { CodeDocsHeader } from '@af/design-system-docs-ui';
|
|
|
12
16
|
directoryName="primitives"
|
|
13
17
|
/>
|
|
14
18
|
|
|
15
|
-
import ERTInline from '!!extract-react-types-loader!../../extract-react-types/inline-props';
|
|
16
|
-
|
|
17
19
|
## Props
|
|
18
20
|
|
|
19
|
-
<
|
|
21
|
+
<TSMorphProps exportName="Inline" packageName="@atlaskit/primitives" />
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
title: Stack
|
|
3
3
|
description: A stack manages the vertical layout of direct children using flexbox.
|
|
4
4
|
order: 1
|
|
5
|
+
props:
|
|
6
|
+
packageName: '@atlaskit/primitives'
|
|
7
|
+
exports:
|
|
8
|
+
- Stack
|
|
5
9
|
---
|
|
6
10
|
|
|
7
11
|
import { CodeDocsHeader } from '@af/design-system-docs-ui';
|
|
@@ -12,8 +16,6 @@ import { CodeDocsHeader } from '@af/design-system-docs-ui';
|
|
|
12
16
|
directoryName="primitives"
|
|
13
17
|
/>
|
|
14
18
|
|
|
15
|
-
import ERTStack from '!!extract-react-types-loader!../../extract-react-types/stack-props';
|
|
16
|
-
|
|
17
19
|
## Props
|
|
18
20
|
|
|
19
|
-
<
|
|
21
|
+
<TSMorphProps exportName="Stack" packageName="@atlaskit/primitives" />
|
|
@@ -64,9 +64,10 @@ var Link = function Link(_ref, ref) {
|
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
* Renders a router link if:
|
|
67
|
+
*
|
|
67
68
|
* - a link component is set in the app provider
|
|
68
|
-
* - it's not an external link (starting with http
|
|
69
|
-
* - it's not a non-HTTP-based link (e.g.
|
|
69
|
+
* - it's not an external link (starting with `http://` or `https://`)
|
|
70
|
+
* - it's not a non-HTTP-based link (e.g. Emails, phone numbers, hash links etc.).
|
|
70
71
|
*/
|
|
71
72
|
var isRouterLink = RouterLink && !isExternal && !isNonHttpBased;
|
|
72
73
|
var hrefObjectUsedWithoutRouterLink = RouterLink === undefined && (0, _typeof2.default)(href) === 'object';
|
|
@@ -12,7 +12,7 @@ exports.media = exports.UNSAFE_media = void 0;
|
|
|
12
12
|
* eg. ```{ [media.above.xs]: { color: 'red' }, [media.above.sm]: { color: 'green' }}```.
|
|
13
13
|
* Instead, make sure that only one breakpoint can take effect at a time,
|
|
14
14
|
* e.g, ```{ [media.only.xs]: { color: 'red' }, [media.above.sm]: { color: 'green' }}```.
|
|
15
|
-
* For more details, please see https://compiledcssinjs.com/docs/atomic-css#selector-specificity
|
|
15
|
+
* For more details, please see <https://compiledcssinjs.com/docs/atomic-css#selector-specificity>.
|
|
16
16
|
*/
|
|
17
17
|
var media = exports.media = {
|
|
18
18
|
above: {
|
|
@@ -496,7 +496,7 @@ var borderRadiusMap = exports.borderRadiusMap = {
|
|
|
496
496
|
|
|
497
497
|
/**
|
|
498
498
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
499
|
-
* @codegen <<SignedSource::
|
|
499
|
+
* @codegen <<SignedSource::648d0ff5e17d3a6a835c1119d0d5dc99>>
|
|
500
500
|
* @codegenId typography
|
|
501
501
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
502
502
|
* @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "ui"]
|
|
@@ -520,10 +520,10 @@ var fontWeightMap = exports.fontWeightMap = {
|
|
|
520
520
|
semibold: "var(--ds-font-weight-semibold, 600)"
|
|
521
521
|
};
|
|
522
522
|
var fontFamilyMap = exports.fontFamilyMap = {
|
|
523
|
-
'font.family.body': "var(--ds-font-family-body, ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
523
|
+
'font.family.body': "var(--ds-font-family-body, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
524
524
|
'font.family.brand': "var(--ds-font-family-brand, Charlie Sans)",
|
|
525
525
|
'font.family.code': "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
526
|
-
'font.family.heading': "var(--ds-font-family-heading, ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
526
|
+
'font.family.heading': "var(--ds-font-family-heading, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
527
527
|
'font.family.monospace': "var(--ds-font-family-monospace, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
528
528
|
'font.family.sans': "var(--ds-font-family-sans, -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif)"
|
|
529
529
|
};
|
|
@@ -537,13 +537,13 @@ var lineHeightMap = exports.lineHeightMap = {
|
|
|
537
537
|
'font.lineHeight.600': "var(--ds-font-lineHeight-600, 40px)"
|
|
538
538
|
};
|
|
539
539
|
var bodyTextMap = exports.bodyTextMap = {
|
|
540
|
-
body: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
541
|
-
'body.large': "var(--ds-font-body-large, normal 400 16px/24px ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
542
|
-
'body.small': "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
540
|
+
body: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
541
|
+
'body.large': "var(--ds-font-body-large, normal 400 16px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
542
|
+
'body.small': "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
543
543
|
};
|
|
544
544
|
var uiTextMap = exports.uiTextMap = {
|
|
545
|
-
ui: "var(--ds-font-ui, normal 500 14px/1 ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
546
|
-
'ui.small': "var(--ds-font-ui-small, normal 400 11px/1 ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
545
|
+
ui: "var(--ds-font-ui, normal 500 14px/1 ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
546
|
+
'ui.small': "var(--ds-font-ui-small, normal 400 11px/1 ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
547
547
|
};
|
|
548
548
|
|
|
549
549
|
/**
|
|
@@ -51,9 +51,10 @@ const Link = ({
|
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
53
|
* Renders a router link if:
|
|
54
|
+
*
|
|
54
55
|
* - a link component is set in the app provider
|
|
55
|
-
* - it's not an external link (starting with http
|
|
56
|
-
* - it's not a non-HTTP-based link (e.g.
|
|
56
|
+
* - it's not an external link (starting with `http://` or `https://`)
|
|
57
|
+
* - it's not a non-HTTP-based link (e.g. Emails, phone numbers, hash links etc.).
|
|
57
58
|
*/
|
|
58
59
|
const isRouterLink = RouterLink && !isExternal && !isNonHttpBased;
|
|
59
60
|
const hrefObjectUsedWithoutRouterLink = RouterLink === undefined && typeof href === 'object';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* eg. ```{ [media.above.xs]: { color: 'red' }, [media.above.sm]: { color: 'green' }}```.
|
|
7
7
|
* Instead, make sure that only one breakpoint can take effect at a time,
|
|
8
8
|
* e.g, ```{ [media.only.xs]: { color: 'red' }, [media.above.sm]: { color: 'green' }}```.
|
|
9
|
-
* For more details, please see https://compiledcssinjs.com/docs/atomic-css#selector-specificity
|
|
9
|
+
* For more details, please see <https://compiledcssinjs.com/docs/atomic-css#selector-specificity>.
|
|
10
10
|
*/
|
|
11
11
|
export const media = {
|
|
12
12
|
above: {
|
|
@@ -484,7 +484,7 @@ export const borderRadiusMap = {
|
|
|
484
484
|
*/
|
|
485
485
|
/**
|
|
486
486
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
487
|
-
* @codegen <<SignedSource::
|
|
487
|
+
* @codegen <<SignedSource::648d0ff5e17d3a6a835c1119d0d5dc99>>
|
|
488
488
|
* @codegenId typography
|
|
489
489
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
490
490
|
* @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "ui"]
|
|
@@ -508,10 +508,10 @@ export const fontWeightMap = {
|
|
|
508
508
|
semibold: "var(--ds-font-weight-semibold, 600)"
|
|
509
509
|
};
|
|
510
510
|
export const fontFamilyMap = {
|
|
511
|
-
'font.family.body': "var(--ds-font-family-body, ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
511
|
+
'font.family.body': "var(--ds-font-family-body, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
512
512
|
'font.family.brand': "var(--ds-font-family-brand, Charlie Sans)",
|
|
513
513
|
'font.family.code': "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
514
|
-
'font.family.heading': "var(--ds-font-family-heading, ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
514
|
+
'font.family.heading': "var(--ds-font-family-heading, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
515
515
|
'font.family.monospace': "var(--ds-font-family-monospace, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
516
516
|
'font.family.sans': "var(--ds-font-family-sans, -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif)"
|
|
517
517
|
};
|
|
@@ -525,13 +525,13 @@ export const lineHeightMap = {
|
|
|
525
525
|
'font.lineHeight.600': "var(--ds-font-lineHeight-600, 40px)"
|
|
526
526
|
};
|
|
527
527
|
export const bodyTextMap = {
|
|
528
|
-
body: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
529
|
-
'body.large': "var(--ds-font-body-large, normal 400 16px/24px ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
530
|
-
'body.small': "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
528
|
+
body: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
529
|
+
'body.large': "var(--ds-font-body-large, normal 400 16px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
530
|
+
'body.small': "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
531
531
|
};
|
|
532
532
|
export const uiTextMap = {
|
|
533
|
-
ui: "var(--ds-font-ui, normal 500 14px/1 ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
534
|
-
'ui.small': "var(--ds-font-ui-small, normal 400 11px/1 ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
533
|
+
ui: "var(--ds-font-ui, normal 500 14px/1 ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
534
|
+
'ui.small': "var(--ds-font-ui-small, normal 400 11px/1 ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
535
535
|
};
|
|
536
536
|
|
|
537
537
|
/**
|
|
@@ -54,9 +54,10 @@ var Link = function Link(_ref, ref) {
|
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* Renders a router link if:
|
|
57
|
+
*
|
|
57
58
|
* - a link component is set in the app provider
|
|
58
|
-
* - it's not an external link (starting with http
|
|
59
|
-
* - it's not a non-HTTP-based link (e.g.
|
|
59
|
+
* - it's not an external link (starting with `http://` or `https://`)
|
|
60
|
+
* - it's not a non-HTTP-based link (e.g. Emails, phone numbers, hash links etc.).
|
|
60
61
|
*/
|
|
61
62
|
var isRouterLink = RouterLink && !isExternal && !isNonHttpBased;
|
|
62
63
|
var hrefObjectUsedWithoutRouterLink = RouterLink === undefined && _typeof(href) === 'object';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* eg. ```{ [media.above.xs]: { color: 'red' }, [media.above.sm]: { color: 'green' }}```.
|
|
7
7
|
* Instead, make sure that only one breakpoint can take effect at a time,
|
|
8
8
|
* e.g, ```{ [media.only.xs]: { color: 'red' }, [media.above.sm]: { color: 'green' }}```.
|
|
9
|
-
* For more details, please see https://compiledcssinjs.com/docs/atomic-css#selector-specificity
|
|
9
|
+
* For more details, please see <https://compiledcssinjs.com/docs/atomic-css#selector-specificity>.
|
|
10
10
|
*/
|
|
11
11
|
export var media = {
|
|
12
12
|
above: {
|
|
@@ -484,7 +484,7 @@ export var borderRadiusMap = {
|
|
|
484
484
|
*/
|
|
485
485
|
/**
|
|
486
486
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
487
|
-
* @codegen <<SignedSource::
|
|
487
|
+
* @codegen <<SignedSource::648d0ff5e17d3a6a835c1119d0d5dc99>>
|
|
488
488
|
* @codegenId typography
|
|
489
489
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
490
490
|
* @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "ui"]
|
|
@@ -508,10 +508,10 @@ export var fontWeightMap = {
|
|
|
508
508
|
semibold: "var(--ds-font-weight-semibold, 600)"
|
|
509
509
|
};
|
|
510
510
|
export var fontFamilyMap = {
|
|
511
|
-
'font.family.body': "var(--ds-font-family-body, ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
511
|
+
'font.family.body': "var(--ds-font-family-body, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
512
512
|
'font.family.brand': "var(--ds-font-family-brand, Charlie Sans)",
|
|
513
513
|
'font.family.code': "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
514
|
-
'font.family.heading': "var(--ds-font-family-heading, ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
514
|
+
'font.family.heading': "var(--ds-font-family-heading, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
515
515
|
'font.family.monospace': "var(--ds-font-family-monospace, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
|
|
516
516
|
'font.family.sans': "var(--ds-font-family-sans, -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif)"
|
|
517
517
|
};
|
|
@@ -525,13 +525,13 @@ export var lineHeightMap = {
|
|
|
525
525
|
'font.lineHeight.600': "var(--ds-font-lineHeight-600, 40px)"
|
|
526
526
|
};
|
|
527
527
|
export var bodyTextMap = {
|
|
528
|
-
body: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
529
|
-
'body.large': "var(--ds-font-body-large, normal 400 16px/24px ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
530
|
-
'body.small': "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
528
|
+
body: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
529
|
+
'body.large': "var(--ds-font-body-large, normal 400 16px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
530
|
+
'body.small': "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
531
531
|
};
|
|
532
532
|
export var uiTextMap = {
|
|
533
|
-
ui: "var(--ds-font-ui, normal 500 14px/1 ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
534
|
-
'ui.small': "var(--ds-font-ui-small, normal 400 11px/1 ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
533
|
+
ui: "var(--ds-font-ui, normal 500 14px/1 ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
534
|
+
'ui.small': "var(--ds-font-ui-small, normal 400 11px/1 ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
535
535
|
};
|
|
536
536
|
|
|
537
537
|
/**
|
|
@@ -40,7 +40,7 @@ export type FlexProps<T extends ElementType = 'div'> = {
|
|
|
40
40
|
*/
|
|
41
41
|
children: ReactNode;
|
|
42
42
|
/**
|
|
43
|
-
* Forwarded ref element
|
|
43
|
+
* Forwarded ref element.
|
|
44
44
|
*/
|
|
45
45
|
ref?: React.ComponentPropsWithRef<T>['ref'];
|
|
46
46
|
} & BasePrimitiveProps;
|
|
@@ -130,7 +130,7 @@ declare const Flex: import("react").MemoExoticComponent<import("react").ForwardR
|
|
|
130
130
|
*/
|
|
131
131
|
children: ReactNode;
|
|
132
132
|
/**
|
|
133
|
-
* Forwarded ref element
|
|
133
|
+
* Forwarded ref element.
|
|
134
134
|
*/
|
|
135
135
|
ref?: any;
|
|
136
136
|
} & BasePrimitiveProps, "gap" | "rowGap" | "columnGap" | "alignItems" | "direction" | "justifyContent" | "wrap" | "children" | "as" | keyof BasePrimitiveProps> & import("react").RefAttributes<any>>>;
|
|
@@ -45,7 +45,7 @@ export type InlineProps<T extends ElementType = 'div'> = {
|
|
|
45
45
|
*/
|
|
46
46
|
children: ReactNode;
|
|
47
47
|
/**
|
|
48
|
-
* Forwarded ref element
|
|
48
|
+
* Forwarded ref element.
|
|
49
49
|
*/
|
|
50
50
|
ref?: React.ComponentPropsWithRef<T>['ref'];
|
|
51
51
|
} & BasePrimitiveProps;
|
|
@@ -106,7 +106,7 @@ declare const Inline: import("react").MemoExoticComponent<import("react").Forwar
|
|
|
106
106
|
*/
|
|
107
107
|
children: ReactNode;
|
|
108
108
|
/**
|
|
109
|
-
* Forwarded ref element
|
|
109
|
+
* Forwarded ref element.
|
|
110
110
|
*/
|
|
111
111
|
ref?: any;
|
|
112
112
|
} & BasePrimitiveProps, "space" | "separator" | "children" | "as" | keyof BasePrimitiveProps | "alignInline" | "alignBlock" | "shouldWrap" | "spread" | "grow" | "rowSpace"> & import("react").RefAttributes<any>>>;
|
|
@@ -3,7 +3,7 @@ import { type RouterLinkComponentProps } from '@atlaskit/app-provider';
|
|
|
3
3
|
import { type BoxProps } from './box';
|
|
4
4
|
export type LinkProps<RouterLinkConfig extends Record<string, any> = never> = RouterLinkComponentProps<RouterLinkConfig> & Omit<BoxProps<'a'>, 'href' | 'as' | 'children' | 'style'> & {
|
|
5
5
|
/**
|
|
6
|
-
* `children` should be defined to ensure links have text
|
|
6
|
+
* `children` should be defined to ensure links have text.
|
|
7
7
|
*/
|
|
8
8
|
children: ReactNode;
|
|
9
9
|
};
|
|
@@ -22,7 +22,7 @@ declare const Link: <RouterLinkConfig extends Record<string, any> = never>({ hre
|
|
|
22
22
|
*/
|
|
23
23
|
declare const UNSAFE_LINK: <RouterLinkConfig extends Record<string, any> = never>(props: RouterLinkComponentProps<RouterLinkConfig> & Omit<BoxProps<"a">, "style" | "children" | "as" | "href"> & {
|
|
24
24
|
/**
|
|
25
|
-
* `children` should be defined to ensure links have text
|
|
25
|
+
* `children` should be defined to ensure links have text.
|
|
26
26
|
*/
|
|
27
27
|
children: ReactNode;
|
|
28
28
|
} & {
|
|
@@ -32,7 +32,7 @@ export type StackProps<T extends ElementType = 'div'> = {
|
|
|
32
32
|
*/
|
|
33
33
|
children: ReactNode;
|
|
34
34
|
/**
|
|
35
|
-
* Forwarded ref element
|
|
35
|
+
* Forwarded ref element.
|
|
36
36
|
*/
|
|
37
37
|
ref?: React.ComponentPropsWithRef<T>['ref'];
|
|
38
38
|
} & BasePrimitiveProps;
|
|
@@ -80,7 +80,7 @@ declare const Stack: import("react").MemoExoticComponent<import("react").Forward
|
|
|
80
80
|
*/
|
|
81
81
|
children: ReactNode;
|
|
82
82
|
/**
|
|
83
|
-
* Forwarded ref element
|
|
83
|
+
* Forwarded ref element.
|
|
84
84
|
*/
|
|
85
85
|
ref?: any;
|
|
86
86
|
} & BasePrimitiveProps, "space" | "children" | "as" | keyof BasePrimitiveProps | "alignInline" | "alignBlock" | "spread" | "grow"> & import("react").RefAttributes<any>>>;
|
|
@@ -6,7 +6,7 @@ declare const asAllowlist: readonly ["span", "p", "strong", "em"];
|
|
|
6
6
|
type AsElement = (typeof asAllowlist)[number];
|
|
7
7
|
type TextPropsBody = {
|
|
8
8
|
/**
|
|
9
|
-
* Text variant
|
|
9
|
+
* Text variant.
|
|
10
10
|
*/
|
|
11
11
|
variant?: BodyText;
|
|
12
12
|
/**
|
|
@@ -20,7 +20,7 @@ type TextPropsBody = {
|
|
|
20
20
|
};
|
|
21
21
|
type TextPropsUi = {
|
|
22
22
|
/**
|
|
23
|
-
* Text variant
|
|
23
|
+
* Text variant.
|
|
24
24
|
*/
|
|
25
25
|
variant: UiText;
|
|
26
26
|
maxLines?: never;
|
|
@@ -31,7 +31,7 @@ type TextPropsBase = {
|
|
|
31
31
|
*/
|
|
32
32
|
as?: AsElement;
|
|
33
33
|
/**
|
|
34
|
-
* Elements rendered within the Text element
|
|
34
|
+
* Elements rendered within the Text element.
|
|
35
35
|
*/
|
|
36
36
|
children: ReactNode;
|
|
37
37
|
/**
|
|
@@ -41,15 +41,15 @@ type TextPropsBase = {
|
|
|
41
41
|
*/
|
|
42
42
|
color?: TextColor;
|
|
43
43
|
/**
|
|
44
|
-
* The HTML id attribute
|
|
44
|
+
* The [HTML `id` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).
|
|
45
45
|
*/
|
|
46
46
|
id?: string;
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
48
|
+
* The [HTML `text-align` attribute](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align).
|
|
49
49
|
*/
|
|
50
50
|
textAlign?: TextAlign;
|
|
51
51
|
/**
|
|
52
|
-
*
|
|
52
|
+
* The [HTML `font-weight` attribute](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight).
|
|
53
53
|
*/
|
|
54
54
|
weight?: FontWeight;
|
|
55
55
|
};
|
|
@@ -5,13 +5,17 @@ export type BasePrimitiveProps = {
|
|
|
5
5
|
* A unique string that appears as data attribute `data-testid` in the rendered code, serving as a hook for automated tests.
|
|
6
6
|
*/
|
|
7
7
|
testId?: string;
|
|
8
|
+
/**
|
|
9
|
+
* `data-testid` is strictly controlled through the `testId` prop.
|
|
10
|
+
* This lets consumers know that this data attribute will not be applied.
|
|
11
|
+
*/
|
|
8
12
|
'data-testid'?: never;
|
|
9
13
|
/**
|
|
10
14
|
* Apply a subset of permitted styles, powered by Atlassian Design System tokens.
|
|
11
15
|
*/
|
|
12
16
|
xcss?: XCSS | Array<XCSS | false | undefined>;
|
|
13
17
|
/**
|
|
14
|
-
* Accessible role
|
|
18
|
+
* Accessible role.
|
|
15
19
|
*/
|
|
16
20
|
role?: string;
|
|
17
21
|
};
|
|
@@ -12,7 +12,7 @@ type ResponsiveHideProps = {
|
|
|
12
12
|
* Apply CSS to hide this specifically **below** this breakpoint.
|
|
13
13
|
* The smallest breakpoint is not included as it would never be shown and this would not be performant.
|
|
14
14
|
*
|
|
15
|
-
* @important do not mix `above` and `below` (TypeScript should prevent this)
|
|
15
|
+
* @important do not mix `above` and `below` (TypeScript should prevent this).
|
|
16
16
|
*/
|
|
17
17
|
below: Exclude<Breakpoint, 'xxs'>;
|
|
18
18
|
} | {
|
|
@@ -20,7 +20,7 @@ type ResponsiveHideProps = {
|
|
|
20
20
|
* Apply CSS to hide this specifically **above** this breakpoint.
|
|
21
21
|
* The smallest breakpoint is not included as it would always be shown and this would not be performant.
|
|
22
22
|
*
|
|
23
|
-
* @important do not mix `above` and `below` (TypeScript should prevent this)
|
|
23
|
+
* @important do not mix `above` and `below` (TypeScript should prevent this).
|
|
24
24
|
*/
|
|
25
25
|
above: Exclude<Breakpoint, 'xxs'>;
|
|
26
26
|
below?: never;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* eg. ```{ [media.above.xs]: { color: 'red' }, [media.above.sm]: { color: 'green' }}```.
|
|
7
7
|
* Instead, make sure that only one breakpoint can take effect at a time,
|
|
8
8
|
* e.g, ```{ [media.only.xs]: { color: 'red' }, [media.above.sm]: { color: 'green' }}```.
|
|
9
|
-
* For more details, please see https://compiledcssinjs.com/docs/atomic-css#selector-specificity
|
|
9
|
+
* For more details, please see <https://compiledcssinjs.com/docs/atomic-css#selector-specificity>.
|
|
10
10
|
*/
|
|
11
11
|
export declare const media: {
|
|
12
12
|
above: {
|
|
@@ -12,7 +12,7 @@ type ResponsiveShowProps = {
|
|
|
12
12
|
* Apply CSS to show this specifically **below** this breakpoint.
|
|
13
13
|
* The smallest breakpoint is not included as it would never be shown and this would not be performant.
|
|
14
14
|
*
|
|
15
|
-
* @important do not mix `above` and `below` (TypeScript should prevent this)
|
|
15
|
+
* @important do not mix `above` and `below` (TypeScript should prevent this).
|
|
16
16
|
*/
|
|
17
17
|
below: Exclude<Breakpoint, 'xxs'>;
|
|
18
18
|
} | {
|
|
@@ -20,7 +20,7 @@ type ResponsiveShowProps = {
|
|
|
20
20
|
* Apply CSS to show this specifically **above** this breakpoint.
|
|
21
21
|
* The smallest breakpoint is not included as it would always be shown and this would not be performant.
|
|
22
22
|
*
|
|
23
|
-
* @important do not mix `above` and `below` (TypeScript should prevent this)
|
|
23
|
+
* @important do not mix `above` and `below` (TypeScript should prevent this).
|
|
24
24
|
*/
|
|
25
25
|
above: Exclude<Breakpoint, 'xxs'>;
|
|
26
26
|
below?: never;
|
|
@@ -6,13 +6,13 @@ import { media } from './media-helper';
|
|
|
6
6
|
*/
|
|
7
7
|
export type Breakpoint = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
8
8
|
/**
|
|
9
|
-
* All supported media queries for use as keys, eg. in `xcss({ [MediaQuery]: { … } })
|
|
9
|
+
* All supported media queries for use as keys, eg. in `xcss({ [MediaQuery]: { … } })`.
|
|
10
10
|
*
|
|
11
11
|
* TODO: Should this have `media.above.xxs`? This is explicitly `@media all`, which I believe is just additional specificity (which could lead to some mistakes)
|
|
12
12
|
*/
|
|
13
13
|
export type MediaQuery = (typeof media.above)[Breakpoint];
|
|
14
14
|
/**
|
|
15
|
-
* An object type mapping a value to each breakpoint (optionally)
|
|
15
|
+
* An object type mapping a value to each breakpoint (optionally).
|
|
16
16
|
*/
|
|
17
17
|
export type ResponsiveObject<T> = Partial<Record<Breakpoint, T>>;
|
|
18
18
|
/**
|
|
@@ -44,7 +44,7 @@ export type BreakpointConfig = {
|
|
|
44
44
|
*/
|
|
45
45
|
gridMargin: ReturnType<typeof token>;
|
|
46
46
|
/**
|
|
47
|
-
* The min-width used in media queries
|
|
47
|
+
* The min-width used in media queries.
|
|
48
48
|
*/
|
|
49
49
|
min: `${number}rem`;
|
|
50
50
|
/**
|
|
@@ -515,7 +515,7 @@ export type BorderRadius = keyof typeof borderRadiusMap;
|
|
|
515
515
|
*/
|
|
516
516
|
/**
|
|
517
517
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
518
|
-
* @codegen <<SignedSource::
|
|
518
|
+
* @codegen <<SignedSource::648d0ff5e17d3a6a835c1119d0d5dc99>>
|
|
519
519
|
* @codegenId typography
|
|
520
520
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
521
521
|
* @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "ui"]
|
|
@@ -40,7 +40,7 @@ export type FlexProps<T extends ElementType = 'div'> = {
|
|
|
40
40
|
*/
|
|
41
41
|
children: ReactNode;
|
|
42
42
|
/**
|
|
43
|
-
* Forwarded ref element
|
|
43
|
+
* Forwarded ref element.
|
|
44
44
|
*/
|
|
45
45
|
ref?: React.ComponentPropsWithRef<T>['ref'];
|
|
46
46
|
} & BasePrimitiveProps;
|
|
@@ -130,7 +130,7 @@ declare const Flex: import("react").MemoExoticComponent<import("react").ForwardR
|
|
|
130
130
|
*/
|
|
131
131
|
children: ReactNode;
|
|
132
132
|
/**
|
|
133
|
-
* Forwarded ref element
|
|
133
|
+
* Forwarded ref element.
|
|
134
134
|
*/
|
|
135
135
|
ref?: any;
|
|
136
136
|
} & BasePrimitiveProps, "gap" | "rowGap" | "columnGap" | "alignItems" | "direction" | "justifyContent" | "wrap" | "children" | "as" | keyof BasePrimitiveProps> & import("react").RefAttributes<any>>>;
|
|
@@ -45,7 +45,7 @@ export type InlineProps<T extends ElementType = 'div'> = {
|
|
|
45
45
|
*/
|
|
46
46
|
children: ReactNode;
|
|
47
47
|
/**
|
|
48
|
-
* Forwarded ref element
|
|
48
|
+
* Forwarded ref element.
|
|
49
49
|
*/
|
|
50
50
|
ref?: React.ComponentPropsWithRef<T>['ref'];
|
|
51
51
|
} & BasePrimitiveProps;
|
|
@@ -106,7 +106,7 @@ declare const Inline: import("react").MemoExoticComponent<import("react").Forwar
|
|
|
106
106
|
*/
|
|
107
107
|
children: ReactNode;
|
|
108
108
|
/**
|
|
109
|
-
* Forwarded ref element
|
|
109
|
+
* Forwarded ref element.
|
|
110
110
|
*/
|
|
111
111
|
ref?: any;
|
|
112
112
|
} & BasePrimitiveProps, "space" | "separator" | "children" | "as" | keyof BasePrimitiveProps | "alignInline" | "alignBlock" | "shouldWrap" | "spread" | "grow" | "rowSpace"> & import("react").RefAttributes<any>>>;
|
|
@@ -3,7 +3,7 @@ import { type RouterLinkComponentProps } from '@atlaskit/app-provider';
|
|
|
3
3
|
import { type BoxProps } from './box';
|
|
4
4
|
export type LinkProps<RouterLinkConfig extends Record<string, any> = never> = RouterLinkComponentProps<RouterLinkConfig> & Omit<BoxProps<'a'>, 'href' | 'as' | 'children' | 'style'> & {
|
|
5
5
|
/**
|
|
6
|
-
* `children` should be defined to ensure links have text
|
|
6
|
+
* `children` should be defined to ensure links have text.
|
|
7
7
|
*/
|
|
8
8
|
children: ReactNode;
|
|
9
9
|
};
|
|
@@ -22,7 +22,7 @@ declare const Link: <RouterLinkConfig extends Record<string, any> = never>({ hre
|
|
|
22
22
|
*/
|
|
23
23
|
declare const UNSAFE_LINK: <RouterLinkConfig extends Record<string, any> = never>(props: RouterLinkComponentProps<RouterLinkConfig> & Omit<BoxProps<"a">, "style" | "children" | "as" | "href"> & {
|
|
24
24
|
/**
|
|
25
|
-
* `children` should be defined to ensure links have text
|
|
25
|
+
* `children` should be defined to ensure links have text.
|
|
26
26
|
*/
|
|
27
27
|
children: ReactNode;
|
|
28
28
|
} & {
|
|
@@ -32,7 +32,7 @@ export type StackProps<T extends ElementType = 'div'> = {
|
|
|
32
32
|
*/
|
|
33
33
|
children: ReactNode;
|
|
34
34
|
/**
|
|
35
|
-
* Forwarded ref element
|
|
35
|
+
* Forwarded ref element.
|
|
36
36
|
*/
|
|
37
37
|
ref?: React.ComponentPropsWithRef<T>['ref'];
|
|
38
38
|
} & BasePrimitiveProps;
|
|
@@ -80,7 +80,7 @@ declare const Stack: import("react").MemoExoticComponent<import("react").Forward
|
|
|
80
80
|
*/
|
|
81
81
|
children: ReactNode;
|
|
82
82
|
/**
|
|
83
|
-
* Forwarded ref element
|
|
83
|
+
* Forwarded ref element.
|
|
84
84
|
*/
|
|
85
85
|
ref?: any;
|
|
86
86
|
} & BasePrimitiveProps, "space" | "children" | "as" | keyof BasePrimitiveProps | "alignInline" | "alignBlock" | "spread" | "grow"> & import("react").RefAttributes<any>>>;
|
|
@@ -11,7 +11,7 @@ declare const asAllowlist: readonly [
|
|
|
11
11
|
type AsElement = (typeof asAllowlist)[number];
|
|
12
12
|
type TextPropsBody = {
|
|
13
13
|
/**
|
|
14
|
-
* Text variant
|
|
14
|
+
* Text variant.
|
|
15
15
|
*/
|
|
16
16
|
variant?: BodyText;
|
|
17
17
|
/**
|
|
@@ -25,7 +25,7 @@ type TextPropsBody = {
|
|
|
25
25
|
};
|
|
26
26
|
type TextPropsUi = {
|
|
27
27
|
/**
|
|
28
|
-
* Text variant
|
|
28
|
+
* Text variant.
|
|
29
29
|
*/
|
|
30
30
|
variant: UiText;
|
|
31
31
|
maxLines?: never;
|
|
@@ -36,7 +36,7 @@ type TextPropsBase = {
|
|
|
36
36
|
*/
|
|
37
37
|
as?: AsElement;
|
|
38
38
|
/**
|
|
39
|
-
* Elements rendered within the Text element
|
|
39
|
+
* Elements rendered within the Text element.
|
|
40
40
|
*/
|
|
41
41
|
children: ReactNode;
|
|
42
42
|
/**
|
|
@@ -46,15 +46,15 @@ type TextPropsBase = {
|
|
|
46
46
|
*/
|
|
47
47
|
color?: TextColor;
|
|
48
48
|
/**
|
|
49
|
-
* The HTML id attribute
|
|
49
|
+
* The [HTML `id` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).
|
|
50
50
|
*/
|
|
51
51
|
id?: string;
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
53
|
+
* The [HTML `text-align` attribute](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align).
|
|
54
54
|
*/
|
|
55
55
|
textAlign?: TextAlign;
|
|
56
56
|
/**
|
|
57
|
-
*
|
|
57
|
+
* The [HTML `font-weight` attribute](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight).
|
|
58
58
|
*/
|
|
59
59
|
weight?: FontWeight;
|
|
60
60
|
};
|
|
@@ -5,13 +5,17 @@ export type BasePrimitiveProps = {
|
|
|
5
5
|
* A unique string that appears as data attribute `data-testid` in the rendered code, serving as a hook for automated tests.
|
|
6
6
|
*/
|
|
7
7
|
testId?: string;
|
|
8
|
+
/**
|
|
9
|
+
* `data-testid` is strictly controlled through the `testId` prop.
|
|
10
|
+
* This lets consumers know that this data attribute will not be applied.
|
|
11
|
+
*/
|
|
8
12
|
'data-testid'?: never;
|
|
9
13
|
/**
|
|
10
14
|
* Apply a subset of permitted styles, powered by Atlassian Design System tokens.
|
|
11
15
|
*/
|
|
12
16
|
xcss?: XCSS | Array<XCSS | false | undefined>;
|
|
13
17
|
/**
|
|
14
|
-
* Accessible role
|
|
18
|
+
* Accessible role.
|
|
15
19
|
*/
|
|
16
20
|
role?: string;
|
|
17
21
|
};
|
|
@@ -12,7 +12,7 @@ type ResponsiveHideProps = {
|
|
|
12
12
|
* Apply CSS to hide this specifically **below** this breakpoint.
|
|
13
13
|
* The smallest breakpoint is not included as it would never be shown and this would not be performant.
|
|
14
14
|
*
|
|
15
|
-
* @important do not mix `above` and `below` (TypeScript should prevent this)
|
|
15
|
+
* @important do not mix `above` and `below` (TypeScript should prevent this).
|
|
16
16
|
*/
|
|
17
17
|
below: Exclude<Breakpoint, 'xxs'>;
|
|
18
18
|
} | {
|
|
@@ -20,7 +20,7 @@ type ResponsiveHideProps = {
|
|
|
20
20
|
* Apply CSS to hide this specifically **above** this breakpoint.
|
|
21
21
|
* The smallest breakpoint is not included as it would always be shown and this would not be performant.
|
|
22
22
|
*
|
|
23
|
-
* @important do not mix `above` and `below` (TypeScript should prevent this)
|
|
23
|
+
* @important do not mix `above` and `below` (TypeScript should prevent this).
|
|
24
24
|
*/
|
|
25
25
|
above: Exclude<Breakpoint, 'xxs'>;
|
|
26
26
|
below?: never;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* eg. ```{ [media.above.xs]: { color: 'red' }, [media.above.sm]: { color: 'green' }}```.
|
|
7
7
|
* Instead, make sure that only one breakpoint can take effect at a time,
|
|
8
8
|
* e.g, ```{ [media.only.xs]: { color: 'red' }, [media.above.sm]: { color: 'green' }}```.
|
|
9
|
-
* For more details, please see https://compiledcssinjs.com/docs/atomic-css#selector-specificity
|
|
9
|
+
* For more details, please see <https://compiledcssinjs.com/docs/atomic-css#selector-specificity>.
|
|
10
10
|
*/
|
|
11
11
|
export declare const media: {
|
|
12
12
|
above: {
|
|
@@ -12,7 +12,7 @@ type ResponsiveShowProps = {
|
|
|
12
12
|
* Apply CSS to show this specifically **below** this breakpoint.
|
|
13
13
|
* The smallest breakpoint is not included as it would never be shown and this would not be performant.
|
|
14
14
|
*
|
|
15
|
-
* @important do not mix `above` and `below` (TypeScript should prevent this)
|
|
15
|
+
* @important do not mix `above` and `below` (TypeScript should prevent this).
|
|
16
16
|
*/
|
|
17
17
|
below: Exclude<Breakpoint, 'xxs'>;
|
|
18
18
|
} | {
|
|
@@ -20,7 +20,7 @@ type ResponsiveShowProps = {
|
|
|
20
20
|
* Apply CSS to show this specifically **above** this breakpoint.
|
|
21
21
|
* The smallest breakpoint is not included as it would always be shown and this would not be performant.
|
|
22
22
|
*
|
|
23
|
-
* @important do not mix `above` and `below` (TypeScript should prevent this)
|
|
23
|
+
* @important do not mix `above` and `below` (TypeScript should prevent this).
|
|
24
24
|
*/
|
|
25
25
|
above: Exclude<Breakpoint, 'xxs'>;
|
|
26
26
|
below?: never;
|
|
@@ -6,13 +6,13 @@ import { media } from './media-helper';
|
|
|
6
6
|
*/
|
|
7
7
|
export type Breakpoint = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
8
8
|
/**
|
|
9
|
-
* All supported media queries for use as keys, eg. in `xcss({ [MediaQuery]: { … } })
|
|
9
|
+
* All supported media queries for use as keys, eg. in `xcss({ [MediaQuery]: { … } })`.
|
|
10
10
|
*
|
|
11
11
|
* TODO: Should this have `media.above.xxs`? This is explicitly `@media all`, which I believe is just additional specificity (which could lead to some mistakes)
|
|
12
12
|
*/
|
|
13
13
|
export type MediaQuery = (typeof media.above)[Breakpoint];
|
|
14
14
|
/**
|
|
15
|
-
* An object type mapping a value to each breakpoint (optionally)
|
|
15
|
+
* An object type mapping a value to each breakpoint (optionally).
|
|
16
16
|
*/
|
|
17
17
|
export type ResponsiveObject<T> = Partial<Record<Breakpoint, T>>;
|
|
18
18
|
/**
|
|
@@ -44,7 +44,7 @@ export type BreakpointConfig = {
|
|
|
44
44
|
*/
|
|
45
45
|
gridMargin: ReturnType<typeof token>;
|
|
46
46
|
/**
|
|
47
|
-
* The min-width used in media queries
|
|
47
|
+
* The min-width used in media queries.
|
|
48
48
|
*/
|
|
49
49
|
min: `${number}rem`;
|
|
50
50
|
/**
|
|
@@ -515,7 +515,7 @@ export type BorderRadius = keyof typeof borderRadiusMap;
|
|
|
515
515
|
*/
|
|
516
516
|
/**
|
|
517
517
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
518
|
-
* @codegen <<SignedSource::
|
|
518
|
+
* @codegen <<SignedSource::648d0ff5e17d3a6a835c1119d0d5dc99>>
|
|
519
519
|
* @codegenId typography
|
|
520
520
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
521
521
|
* @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "ui"]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/primitives",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Primitives are token-backed low-level building blocks.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
},
|
|
106
106
|
"dependencies": {
|
|
107
107
|
"@atlaskit/app-provider": "^1.0.0",
|
|
108
|
-
"@atlaskit/tokens": "^1.
|
|
108
|
+
"@atlaskit/tokens": "^1.37.0",
|
|
109
109
|
"@babel/runtime": "^7.0.0",
|
|
110
110
|
"@emotion/react": "^11.7.1",
|
|
111
111
|
"@emotion/serialize": "^1.1.0",
|