@atlaskit/primitives 7.0.0 → 7.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/.eslintrc.js +1 -1
- package/CHANGELOG.md +19 -1
- package/LICENSE.md +6 -8
- package/constellation/anchor/code.mdx +3 -3
- package/constellation/anchor/examples.mdx +33 -39
- package/constellation/anchor/usage.mdx +60 -30
- package/constellation/bleed/code.mdx +3 -3
- package/constellation/bleed/examples.mdx +17 -13
- package/constellation/box/code.mdx +3 -3
- package/constellation/box/examples.mdx +25 -19
- package/constellation/box/usage.mdx +15 -5
- package/constellation/flex/code.mdx +3 -3
- package/constellation/flex/examples.mdx +12 -11
- package/constellation/grid/code.mdx +3 -3
- package/constellation/grid/examples.mdx +15 -10
- package/constellation/inline/code.mdx +3 -3
- package/constellation/inline/examples.mdx +32 -38
- package/constellation/inline/usage.mdx +15 -6
- package/constellation/overview/index.mdx +29 -27
- package/constellation/pressable/code.mdx +5 -4
- package/constellation/pressable/examples.mdx +41 -55
- package/constellation/pressable/usage.mdx +59 -36
- package/constellation/responsive/01-show/code.mdx +3 -3
- package/constellation/responsive/01-show/examples.mdx +9 -13
- package/constellation/responsive/02-hide/code.mdx +3 -3
- package/constellation/responsive/02-hide/examples.mdx +9 -13
- package/constellation/responsive/03-breakpoints/examples.mdx +3 -3
- package/constellation/responsive/examples.mdx +10 -10
- package/constellation/responsive/usage.mdx +23 -15
- package/constellation/stack/code.mdx +3 -3
- package/constellation/stack/examples.mdx +26 -20
- package/constellation/stack/usage.mdx +13 -5
- package/constellation/text/code.mdx +3 -3
- package/constellation/text/examples.mdx +29 -15
- package/constellation/text/usage.mdx +6 -3
- package/constellation/xcss/examples.mdx +7 -5
- package/constellation/xcss/migration.mdx +32 -25
- package/constellation/xcss/usage.mdx +72 -60
- package/dist/cjs/components/anchor.js +4 -4
- package/dist/cjs/components/pressable.js +1 -1
- package/dist/cjs/xcss/style-maps.partial.js +13 -13
- package/dist/es2019/components/anchor.js +4 -4
- package/dist/es2019/components/pressable.js +1 -1
- package/dist/es2019/xcss/style-maps.partial.js +13 -13
- package/dist/esm/components/anchor.js +4 -4
- package/dist/esm/components/pressable.js +1 -1
- package/dist/esm/xcss/style-maps.partial.js +13 -13
- package/dist/types/components/anchor.d.ts +4 -4
- package/dist/types/responsive/index.d.ts +2 -2
- package/dist/types/xcss/style-maps.partial.d.ts +13 -13
- package/dist/types-ts4.5/components/anchor.d.ts +4 -4
- package/dist/types-ts4.5/responsive/index.d.ts +2 -2
- package/dist/types-ts4.5/xcss/style-maps.partial.d.ts +13 -13
- package/extract-react-types/anchor-props.tsx +108 -116
- package/extract-react-types/bleed-props.tsx +17 -22
- package/extract-react-types/box-props.tsx +67 -70
- package/extract-react-types/flex-props.tsx +61 -61
- package/extract-react-types/grid-props.tsx +92 -92
- package/extract-react-types/hide-props.tsx +35 -35
- package/extract-react-types/inline-props.tsx +68 -68
- package/extract-react-types/pressable-props.tsx +101 -107
- package/extract-react-types/show-props.tsx +35 -35
- package/extract-react-types/stack-props.tsx +55 -55
- package/package.json +2 -2
- package/report.api.md +940 -965
- package/scripts/border-codegen-template.tsx +40 -47
- package/scripts/codegen-file-templates/dimensions.tsx +8 -8
- package/scripts/codegen-file-templates/layer.tsx +9 -9
- package/scripts/codegen-styles.tsx +97 -103
- package/scripts/color-codegen-template.tsx +61 -73
- package/scripts/elevation-codegen-template.tsx +50 -62
- package/scripts/inverse-color-map-template.tsx +26 -31
- package/scripts/misc-codegen-template.tsx +4 -9
- package/scripts/spacing-codegen-template.tsx +25 -31
- package/scripts/typography-codegen-template.tsx +59 -65
- package/scripts/utils.tsx +36 -43
|
@@ -36,7 +36,7 @@ var focusRingStyles = xcss({
|
|
|
36
36
|
});
|
|
37
37
|
var IS_EXTERNAL_LINK_REGEX = /^(?:(http|https):\/\/)/;
|
|
38
38
|
var IS_NON_HTTP_BASED = /^(((mailto|tel|sms):)|(#))/;
|
|
39
|
-
var
|
|
39
|
+
var AnchorNoRef = function AnchorNoRef(_ref, ref) {
|
|
40
40
|
var href = _ref.href,
|
|
41
41
|
children = _ref.children,
|
|
42
42
|
backgroundColor = _ref.backgroundColor,
|
|
@@ -66,7 +66,7 @@ var Anchor = function Anchor(_ref, ref) {
|
|
|
66
66
|
action: 'clicked',
|
|
67
67
|
componentName: componentName || 'Anchor',
|
|
68
68
|
packageName: "@atlaskit/primitives",
|
|
69
|
-
packageVersion: "7.0.
|
|
69
|
+
packageVersion: "7.0.2",
|
|
70
70
|
analyticsData: analyticsContext,
|
|
71
71
|
actionSubject: 'link'
|
|
72
72
|
});
|
|
@@ -128,5 +128,5 @@ var Anchor = function Anchor(_ref, ref) {
|
|
|
128
128
|
* - [Code](https://atlassian.design/components/primitives/anchor/code)
|
|
129
129
|
* - [Usage](https://atlassian.design/components/primitives/anchor/usage)
|
|
130
130
|
*/
|
|
131
|
-
var
|
|
132
|
-
export default
|
|
131
|
+
var Anchor = /*#__PURE__*/forwardRef(AnchorNoRef);
|
|
132
|
+
export default Anchor;
|
|
@@ -68,7 +68,7 @@ var Pressable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
68
68
|
action: 'clicked',
|
|
69
69
|
componentName: componentName || 'Pressable',
|
|
70
70
|
packageName: "@atlaskit/primitives",
|
|
71
|
-
packageVersion: "7.0.
|
|
71
|
+
packageVersion: "7.0.2",
|
|
72
72
|
analyticsData: analyticsContext,
|
|
73
73
|
actionSubject: 'button'
|
|
74
74
|
});
|
|
@@ -6,11 +6,11 @@ import { CURRENT_SURFACE_CSS_VAR } from '@atlaskit/tokens';
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
9
|
-
* @codegen <<SignedSource::
|
|
9
|
+
* @codegen <<SignedSource::c98c944b8a999cfc194a2cfe851d2433>>
|
|
10
10
|
* @codegenId dimensions
|
|
11
11
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
12
12
|
* @codegenParams ["dimensions"]
|
|
13
|
-
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::
|
|
13
|
+
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::cc9b3f12104c6ede803da6a42daac0b0>>
|
|
14
14
|
*/
|
|
15
15
|
export var dimensionMap = {
|
|
16
16
|
'100%': '100%',
|
|
@@ -28,7 +28,7 @@ export var 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::0d3c08d703b8431712d7e238a3f7229b>>
|
|
32
32
|
* @codegenId spacing
|
|
33
33
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
34
34
|
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::55622b91aca9b3afac4bce440f222b71>>
|
|
@@ -67,7 +67,7 @@ export var allSpaceMap = _objectSpread(_objectSpread({}, positiveSpaceMap), nega
|
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
69
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
70
|
-
* @codegen <<SignedSource::
|
|
70
|
+
* @codegen <<SignedSource::dd33c75b34fe7374656f10b21ba9b161>>
|
|
71
71
|
* @codegenId inverse-colors
|
|
72
72
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
73
73
|
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::f27d1519d51cc4a85383a00907847774>>
|
|
@@ -108,7 +108,7 @@ export var inverseColorMap = {
|
|
|
108
108
|
|
|
109
109
|
/**
|
|
110
110
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
111
|
-
* @codegen <<SignedSource::
|
|
111
|
+
* @codegen <<SignedSource::fde38a9999e3a081afa4a517da815ede>>
|
|
112
112
|
* @codegenId elevation
|
|
113
113
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
114
114
|
* @codegenParams ["opacity", "shadow", "surface"]
|
|
@@ -143,7 +143,7 @@ export var surfaceColorMap = {
|
|
|
143
143
|
|
|
144
144
|
/**
|
|
145
145
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
146
|
-
* @codegen <<SignedSource::
|
|
146
|
+
* @codegen <<SignedSource::485e5a3659092381fa81ce940d43a939>>
|
|
147
147
|
* @codegenId colors
|
|
148
148
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
149
149
|
* @codegenParams ["border", "background", "text", "fill"]
|
|
@@ -440,12 +440,12 @@ export var fillMap = {
|
|
|
440
440
|
|
|
441
441
|
/**
|
|
442
442
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
443
|
-
* @codegen <<SignedSource::
|
|
443
|
+
* @codegen <<SignedSource::28920e82ff201211ac94808a1fd821d4>>
|
|
444
444
|
* @codegenId misc
|
|
445
445
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
446
446
|
* @codegenParams ["layer"]
|
|
447
|
-
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::
|
|
448
|
-
* @codegenDependency ../../scripts/codegen-file-templates/layer.tsx <<SignedSource::
|
|
447
|
+
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::cc9b3f12104c6ede803da6a42daac0b0>>
|
|
448
|
+
* @codegenDependency ../../scripts/codegen-file-templates/layer.tsx <<SignedSource::6f10945ad9139d0119003738c65ae40a>>
|
|
449
449
|
*/
|
|
450
450
|
export var layerMap = {
|
|
451
451
|
card: 100,
|
|
@@ -464,7 +464,7 @@ export var layerMap = {
|
|
|
464
464
|
|
|
465
465
|
/**
|
|
466
466
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
467
|
-
* @codegen <<SignedSource::
|
|
467
|
+
* @codegen <<SignedSource::957baf1fa3fc3fe5eb06b497a7ba6599>>
|
|
468
468
|
* @codegenId border
|
|
469
469
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
470
470
|
* @codegenParams ["width", "radius"]
|
|
@@ -491,12 +491,12 @@ export var borderRadiusMap = {
|
|
|
491
491
|
|
|
492
492
|
/**
|
|
493
493
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
494
|
-
* @codegen <<SignedSource::
|
|
494
|
+
* @codegen <<SignedSource::cd260411f17d54ff1ac7e627ef070ef4>>
|
|
495
495
|
* @codegenId typography
|
|
496
496
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
497
497
|
* @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "ui"]
|
|
498
|
-
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::
|
|
499
|
-
* @codegenDependency ../../scripts/codegen-file-templates/layer.tsx <<SignedSource::
|
|
498
|
+
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::cc9b3f12104c6ede803da6a42daac0b0>>
|
|
499
|
+
* @codegenDependency ../../scripts/codegen-file-templates/layer.tsx <<SignedSource::6f10945ad9139d0119003738c65ae40a>>
|
|
500
500
|
*/
|
|
501
501
|
export var fontSizeMap = {
|
|
502
502
|
medium: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
@@ -26,7 +26,7 @@ export type AnchorProps<RouterLinkConfig extends Record<string, any> = never> =
|
|
|
26
26
|
*/
|
|
27
27
|
analyticsContext?: Record<string, any>;
|
|
28
28
|
};
|
|
29
|
-
declare const
|
|
29
|
+
declare const AnchorNoRef: <RouterLinkConfig extends Record<string, any> = never>({ href, children, backgroundColor, padding, paddingBlock, paddingBlockStart, paddingBlockEnd, paddingInline, paddingInlineStart, paddingInlineEnd, testId, xcss: xcssStyles, target, onClick: providedOnClick, interactionName, componentName, analyticsContext, ...htmlAttributes }: AnchorProps<RouterLinkConfig>, ref: Ref<HTMLAnchorElement>) => JSX.Element;
|
|
30
30
|
/**
|
|
31
31
|
* __Anchor__
|
|
32
32
|
*
|
|
@@ -40,7 +40,7 @@ declare const Anchor: <RouterLinkConfig extends Record<string, any> = never>({ h
|
|
|
40
40
|
* - [Code](https://atlassian.design/components/primitives/anchor/code)
|
|
41
41
|
* - [Usage](https://atlassian.design/components/primitives/anchor/usage)
|
|
42
42
|
*/
|
|
43
|
-
declare const
|
|
43
|
+
declare const Anchor: <RouterLinkConfig extends Record<string, any> = never>(props: AnchorProps<RouterLinkConfig> & {
|
|
44
44
|
ref?: Ref<HTMLAnchorElement>;
|
|
45
|
-
}) => ReturnType<typeof
|
|
46
|
-
export default
|
|
45
|
+
}) => ReturnType<typeof AnchorNoRef>;
|
|
46
|
+
export default Anchor;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { media, UNSAFE_media } from './media-helper';
|
|
2
2
|
export { UNSAFE_buildAboveMediaQueryCSS } from './build-media-query-css';
|
|
3
|
-
export { UNSAFE_BREAKPOINTS_ORDERED_LIST, UNSAFE_BREAKPOINTS_CONFIG
|
|
4
|
-
export type { Breakpoint, ResponsiveObject, ResponsiveCSSObject, MediaQuery
|
|
3
|
+
export { UNSAFE_BREAKPOINTS_ORDERED_LIST, UNSAFE_BREAKPOINTS_CONFIG } from './constants';
|
|
4
|
+
export type { Breakpoint, ResponsiveObject, ResponsiveCSSObject, MediaQuery } from './types';
|
|
5
5
|
export { UNSAFE_useMediaQuery } from './use-media-query';
|
|
6
6
|
export { Show } from './show';
|
|
7
7
|
export { Hide } from './hide';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type SerializedStyles } from '@emotion/react';
|
|
2
2
|
/**
|
|
3
3
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
4
|
-
* @codegen <<SignedSource::
|
|
4
|
+
* @codegen <<SignedSource::c98c944b8a999cfc194a2cfe851d2433>>
|
|
5
5
|
* @codegenId dimensions
|
|
6
6
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
7
7
|
* @codegenParams ["dimensions"]
|
|
8
|
-
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::cc9b3f12104c6ede803da6a42daac0b0>>
|
|
9
9
|
*/
|
|
10
10
|
export declare const dimensionMap: {
|
|
11
11
|
readonly '100%': "100%";
|
|
@@ -23,7 +23,7 @@ export type Dimension = keyof typeof 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::0d3c08d703b8431712d7e238a3f7229b>>
|
|
27
27
|
* @codegenId spacing
|
|
28
28
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
29
29
|
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::55622b91aca9b3afac4bce440f222b71>>
|
|
@@ -88,7 +88,7 @@ export type AllSpace = keyof typeof allSpaceMap;
|
|
|
88
88
|
*/
|
|
89
89
|
/**
|
|
90
90
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
91
|
-
* @codegen <<SignedSource::
|
|
91
|
+
* @codegen <<SignedSource::dd33c75b34fe7374656f10b21ba9b161>>
|
|
92
92
|
* @codegenId inverse-colors
|
|
93
93
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
94
94
|
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::f27d1519d51cc4a85383a00907847774>>
|
|
@@ -127,7 +127,7 @@ export declare const inverseColorMap: {
|
|
|
127
127
|
*/
|
|
128
128
|
/**
|
|
129
129
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
130
|
-
* @codegen <<SignedSource::
|
|
130
|
+
* @codegen <<SignedSource::fde38a9999e3a081afa4a517da815ede>>
|
|
131
131
|
* @codegenId elevation
|
|
132
132
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
133
133
|
* @codegenParams ["opacity", "shadow", "surface"]
|
|
@@ -164,7 +164,7 @@ export type SurfaceColor = keyof typeof surfaceColorMap;
|
|
|
164
164
|
*/
|
|
165
165
|
/**
|
|
166
166
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
167
|
-
* @codegen <<SignedSource::
|
|
167
|
+
* @codegen <<SignedSource::485e5a3659092381fa81ce940d43a939>>
|
|
168
168
|
* @codegenId colors
|
|
169
169
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
170
170
|
* @codegenParams ["border", "background", "text", "fill"]
|
|
@@ -464,12 +464,12 @@ export type Fill = keyof typeof fillMap;
|
|
|
464
464
|
*/
|
|
465
465
|
/**
|
|
466
466
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
467
|
-
* @codegen <<SignedSource::
|
|
467
|
+
* @codegen <<SignedSource::28920e82ff201211ac94808a1fd821d4>>
|
|
468
468
|
* @codegenId misc
|
|
469
469
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
470
470
|
* @codegenParams ["layer"]
|
|
471
|
-
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::
|
|
472
|
-
* @codegenDependency ../../scripts/codegen-file-templates/layer.tsx <<SignedSource::
|
|
471
|
+
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::cc9b3f12104c6ede803da6a42daac0b0>>
|
|
472
|
+
* @codegenDependency ../../scripts/codegen-file-templates/layer.tsx <<SignedSource::6f10945ad9139d0119003738c65ae40a>>
|
|
473
473
|
*/
|
|
474
474
|
export declare const layerMap: {
|
|
475
475
|
readonly card: 100;
|
|
@@ -488,7 +488,7 @@ export type Layer = keyof typeof layerMap;
|
|
|
488
488
|
*/
|
|
489
489
|
/**
|
|
490
490
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
491
|
-
* @codegen <<SignedSource::
|
|
491
|
+
* @codegen <<SignedSource::957baf1fa3fc3fe5eb06b497a7ba6599>>
|
|
492
492
|
* @codegenId border
|
|
493
493
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
494
494
|
* @codegenParams ["width", "radius"]
|
|
@@ -516,12 +516,12 @@ export type BorderRadius = keyof typeof borderRadiusMap;
|
|
|
516
516
|
*/
|
|
517
517
|
/**
|
|
518
518
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
519
|
-
* @codegen <<SignedSource::
|
|
519
|
+
* @codegen <<SignedSource::cd260411f17d54ff1ac7e627ef070ef4>>
|
|
520
520
|
* @codegenId typography
|
|
521
521
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
522
522
|
* @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "ui"]
|
|
523
|
-
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::
|
|
524
|
-
* @codegenDependency ../../scripts/codegen-file-templates/layer.tsx <<SignedSource::
|
|
523
|
+
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::cc9b3f12104c6ede803da6a42daac0b0>>
|
|
524
|
+
* @codegenDependency ../../scripts/codegen-file-templates/layer.tsx <<SignedSource::6f10945ad9139d0119003738c65ae40a>>
|
|
525
525
|
*/
|
|
526
526
|
export declare const fontSizeMap: {
|
|
527
527
|
medium: "var(--ds-font-body)";
|
|
@@ -26,7 +26,7 @@ export type AnchorProps<RouterLinkConfig extends Record<string, any> = never> =
|
|
|
26
26
|
*/
|
|
27
27
|
analyticsContext?: Record<string, any>;
|
|
28
28
|
};
|
|
29
|
-
declare const
|
|
29
|
+
declare const AnchorNoRef: <RouterLinkConfig extends Record<string, any> = never>({ href, children, backgroundColor, padding, paddingBlock, paddingBlockStart, paddingBlockEnd, paddingInline, paddingInlineStart, paddingInlineEnd, testId, xcss: xcssStyles, target, onClick: providedOnClick, interactionName, componentName, analyticsContext, ...htmlAttributes }: AnchorProps<RouterLinkConfig>, ref: Ref<HTMLAnchorElement>) => JSX.Element;
|
|
30
30
|
/**
|
|
31
31
|
* __Anchor__
|
|
32
32
|
*
|
|
@@ -40,7 +40,7 @@ declare const Anchor: <RouterLinkConfig extends Record<string, any> = never>({ h
|
|
|
40
40
|
* - [Code](https://atlassian.design/components/primitives/anchor/code)
|
|
41
41
|
* - [Usage](https://atlassian.design/components/primitives/anchor/usage)
|
|
42
42
|
*/
|
|
43
|
-
declare const
|
|
43
|
+
declare const Anchor: <RouterLinkConfig extends Record<string, any> = never>(props: AnchorProps<RouterLinkConfig> & {
|
|
44
44
|
ref?: Ref<HTMLAnchorElement>;
|
|
45
|
-
}) => ReturnType<typeof
|
|
46
|
-
export default
|
|
45
|
+
}) => ReturnType<typeof AnchorNoRef>;
|
|
46
|
+
export default Anchor;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { media, UNSAFE_media } from './media-helper';
|
|
2
2
|
export { UNSAFE_buildAboveMediaQueryCSS } from './build-media-query-css';
|
|
3
|
-
export { UNSAFE_BREAKPOINTS_ORDERED_LIST, UNSAFE_BREAKPOINTS_CONFIG
|
|
4
|
-
export type { Breakpoint, ResponsiveObject, ResponsiveCSSObject, MediaQuery
|
|
3
|
+
export { UNSAFE_BREAKPOINTS_ORDERED_LIST, UNSAFE_BREAKPOINTS_CONFIG } from './constants';
|
|
4
|
+
export type { Breakpoint, ResponsiveObject, ResponsiveCSSObject, MediaQuery } from './types';
|
|
5
5
|
export { UNSAFE_useMediaQuery } from './use-media-query';
|
|
6
6
|
export { Show } from './show';
|
|
7
7
|
export { Hide } from './hide';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type SerializedStyles } from '@emotion/react';
|
|
2
2
|
/**
|
|
3
3
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
4
|
-
* @codegen <<SignedSource::
|
|
4
|
+
* @codegen <<SignedSource::c98c944b8a999cfc194a2cfe851d2433>>
|
|
5
5
|
* @codegenId dimensions
|
|
6
6
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
7
7
|
* @codegenParams ["dimensions"]
|
|
8
|
-
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::cc9b3f12104c6ede803da6a42daac0b0>>
|
|
9
9
|
*/
|
|
10
10
|
export declare const dimensionMap: {
|
|
11
11
|
readonly '100%': "100%";
|
|
@@ -23,7 +23,7 @@ export type Dimension = keyof typeof 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::0d3c08d703b8431712d7e238a3f7229b>>
|
|
27
27
|
* @codegenId spacing
|
|
28
28
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
29
29
|
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::55622b91aca9b3afac4bce440f222b71>>
|
|
@@ -88,7 +88,7 @@ export type AllSpace = keyof typeof allSpaceMap;
|
|
|
88
88
|
*/
|
|
89
89
|
/**
|
|
90
90
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
91
|
-
* @codegen <<SignedSource::
|
|
91
|
+
* @codegen <<SignedSource::dd33c75b34fe7374656f10b21ba9b161>>
|
|
92
92
|
* @codegenId inverse-colors
|
|
93
93
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
94
94
|
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::f27d1519d51cc4a85383a00907847774>>
|
|
@@ -127,7 +127,7 @@ export declare const inverseColorMap: {
|
|
|
127
127
|
*/
|
|
128
128
|
/**
|
|
129
129
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
130
|
-
* @codegen <<SignedSource::
|
|
130
|
+
* @codegen <<SignedSource::fde38a9999e3a081afa4a517da815ede>>
|
|
131
131
|
* @codegenId elevation
|
|
132
132
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
133
133
|
* @codegenParams ["opacity", "shadow", "surface"]
|
|
@@ -164,7 +164,7 @@ export type SurfaceColor = keyof typeof surfaceColorMap;
|
|
|
164
164
|
*/
|
|
165
165
|
/**
|
|
166
166
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
167
|
-
* @codegen <<SignedSource::
|
|
167
|
+
* @codegen <<SignedSource::485e5a3659092381fa81ce940d43a939>>
|
|
168
168
|
* @codegenId colors
|
|
169
169
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
170
170
|
* @codegenParams ["border", "background", "text", "fill"]
|
|
@@ -464,12 +464,12 @@ export type Fill = keyof typeof fillMap;
|
|
|
464
464
|
*/
|
|
465
465
|
/**
|
|
466
466
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
467
|
-
* @codegen <<SignedSource::
|
|
467
|
+
* @codegen <<SignedSource::28920e82ff201211ac94808a1fd821d4>>
|
|
468
468
|
* @codegenId misc
|
|
469
469
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
470
470
|
* @codegenParams ["layer"]
|
|
471
|
-
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::
|
|
472
|
-
* @codegenDependency ../../scripts/codegen-file-templates/layer.tsx <<SignedSource::
|
|
471
|
+
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::cc9b3f12104c6ede803da6a42daac0b0>>
|
|
472
|
+
* @codegenDependency ../../scripts/codegen-file-templates/layer.tsx <<SignedSource::6f10945ad9139d0119003738c65ae40a>>
|
|
473
473
|
*/
|
|
474
474
|
export declare const layerMap: {
|
|
475
475
|
readonly card: 100;
|
|
@@ -488,7 +488,7 @@ export type Layer = keyof typeof layerMap;
|
|
|
488
488
|
*/
|
|
489
489
|
/**
|
|
490
490
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
491
|
-
* @codegen <<SignedSource::
|
|
491
|
+
* @codegen <<SignedSource::957baf1fa3fc3fe5eb06b497a7ba6599>>
|
|
492
492
|
* @codegenId border
|
|
493
493
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
494
494
|
* @codegenParams ["width", "radius"]
|
|
@@ -516,12 +516,12 @@ export type BorderRadius = keyof typeof borderRadiusMap;
|
|
|
516
516
|
*/
|
|
517
517
|
/**
|
|
518
518
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
519
|
-
* @codegen <<SignedSource::
|
|
519
|
+
* @codegen <<SignedSource::cd260411f17d54ff1ac7e627ef070ef4>>
|
|
520
520
|
* @codegenId typography
|
|
521
521
|
* @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
|
|
522
522
|
* @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "ui"]
|
|
523
|
-
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::
|
|
524
|
-
* @codegenDependency ../../scripts/codegen-file-templates/layer.tsx <<SignedSource::
|
|
523
|
+
* @codegenDependency ../../scripts/codegen-file-templates/dimensions.tsx <<SignedSource::cc9b3f12104c6ede803da6a42daac0b0>>
|
|
524
|
+
* @codegenDependency ../../scripts/codegen-file-templates/layer.tsx <<SignedSource::6f10945ad9139d0119003738c65ae40a>>
|
|
525
525
|
*/
|
|
526
526
|
export declare const fontSizeMap: {
|
|
527
527
|
medium: "var(--ds-font-body)";
|
|
@@ -3,126 +3,118 @@ import type React from 'react';
|
|
|
3
3
|
|
|
4
4
|
import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
type BasePrimitiveProps,
|
|
8
|
-
type StyleProp,
|
|
9
|
-
} from '../src/components/types';
|
|
6
|
+
import { type BasePrimitiveProps, type StyleProp } from '../src/components/types';
|
|
10
7
|
|
|
11
8
|
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
12
9
|
namespace Token {
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
// BoxProps['backgroundColor'] uses keyof, which ERT does not understand
|
|
11
|
+
export type BackgroundColor = 'BackgroundColor';
|
|
15
12
|
}
|
|
16
13
|
|
|
17
14
|
type Space =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
export default function Anchor<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
* Forwarded ref element.
|
|
124
|
-
*/
|
|
125
|
-
ref?: React.ComponentPropsWithRef<'a'>['ref'];
|
|
126
|
-
} & BasePrimitiveProps &
|
|
127
|
-
StyleProp,
|
|
15
|
+
| 'space.0'
|
|
16
|
+
| 'space.025'
|
|
17
|
+
| 'space.050'
|
|
18
|
+
| 'space.075'
|
|
19
|
+
| 'space.100'
|
|
20
|
+
| 'space.150'
|
|
21
|
+
| 'space.200'
|
|
22
|
+
| 'space.250'
|
|
23
|
+
| 'space.300'
|
|
24
|
+
| 'space.400'
|
|
25
|
+
| 'space.500'
|
|
26
|
+
| 'space.600'
|
|
27
|
+
| 'space.800'
|
|
28
|
+
| 'space.1000';
|
|
29
|
+
|
|
30
|
+
export default function Anchor<RouterLinkConfig extends Record<string, any> = never>(
|
|
31
|
+
_: {
|
|
32
|
+
/**
|
|
33
|
+
* The URL or link location, which can be provided as a string if a router link configuration is set in the [app provider](https://atlassian.design/components/app-provider/examples). This can be mapped to an underlying router link component. For advanced usage, an object can be passed. See [routing examples](https://atlassian.design/components/primitives/anchor/examples#router-links) for more information.
|
|
34
|
+
*/
|
|
35
|
+
href: string | RouterLinkConfig;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The `target` attribute of the anchor HTML element.
|
|
39
|
+
*/
|
|
40
|
+
target?: React.AnchorHTMLAttributes<HTMLAnchorElement>['target'];
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* The `rel` attribute of the anchor HTML element.
|
|
44
|
+
*/
|
|
45
|
+
rel?: React.AnchorHTMLAttributes<HTMLAnchorElement>['rel'];
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Tokens representing CSS shorthand for `paddingBlock` and `paddingInline` together.
|
|
49
|
+
*/
|
|
50
|
+
padding?: Space;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Tokens representing CSS shorthand `paddingBlock`.
|
|
54
|
+
*/
|
|
55
|
+
paddingBlock?: Space;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Tokens representing CSS `paddingBlockStart`.
|
|
59
|
+
*/
|
|
60
|
+
paddingBlockStart?: Space;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Tokens representing CSS `paddingBlockEnd`.
|
|
64
|
+
*/
|
|
65
|
+
paddingBlockEnd?: Space;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Tokens representing CSS shorthand `paddingInline`.
|
|
69
|
+
*/
|
|
70
|
+
paddingInline?: Space;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Tokens representing CSS `paddingInlineStart`.
|
|
74
|
+
*/
|
|
75
|
+
paddingInlineStart?: Space;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Tokens representing CSS `paddingInlineEnd`.
|
|
79
|
+
*/
|
|
80
|
+
paddingInlineEnd?: Space;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Handler called on click. You can use the second argument to fire Atlaskit analytics events on custom channels. They could then be routed to GASv3 analytics. See examples for [firing Atlaskit analytics events](https://atlassian.design/components/primitives/anchor/examples#atlaskit-analytics) or [routing these to GASv3 analytics](https://atlassian.design/components/primitives/anchor/examples#gasv3-analytics).
|
|
84
|
+
*/
|
|
85
|
+
onClick?: (e: React.MouseEvent<HTMLButtonElement>, analyticsEvent: UIAnalyticsEvent) => void;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* An optional component name used to identify this component to Atlaskit analytics press listeners. This can be altered if a parent component's name is preferred rather than the default 'Anchor'. See [the Atlaskit analytics example](https://atlassian.design/components/primitives/anchor/examples#atlaskit-analytics) for more information.
|
|
89
|
+
*/
|
|
90
|
+
componentName?: string;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Additional information to be included in the `context` of Atlaskit analytics events that come from anchor. See [the analytics example](https://atlassian.design/components/primitives/anchor/examples#atlaskit-analytics) for more information.
|
|
94
|
+
*/
|
|
95
|
+
analyticsContext?: Record<string, any>;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* An optional name used to identify the anchor to interaction content listeners. By default, anchor fires React UFO (Unified Frontend Observability) press interactions for available listeners. This helps Atlassian measure performance and reliability. See [the React UFO press example](https://atlassian.design/components/primitives/anchor/examples#react-ufo-press-interactions) for more information.
|
|
99
|
+
*/
|
|
100
|
+
interactionName?: string;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* A token alias for background color ([background color tokens](https://atlassian.design/components/components/tokens/all-tokens#color-background)).
|
|
104
|
+
* When the background color is set to a [surface token](/components/tokens/all-tokens#elevation-surface),
|
|
105
|
+
* the [current surface](/components/tokens/code#current-surface-color) CSS variable will also be set to this value in the Box styles.
|
|
106
|
+
*/
|
|
107
|
+
backgroundColor?: Token.BackgroundColor;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Elements to be rendered inside the primitive.
|
|
111
|
+
*/
|
|
112
|
+
children: React.ReactNode;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Forwarded ref element.
|
|
116
|
+
*/
|
|
117
|
+
ref?: React.ComponentPropsWithRef<'a'>['ref'];
|
|
118
|
+
} & BasePrimitiveProps &
|
|
119
|
+
StyleProp,
|
|
128
120
|
) {}
|