@atlaskit/primitives 6.4.0 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # @atlaskit/primitives
2
2
 
3
+ ## 7.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#108387](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/108387)
8
+ [`0f3b7b4c63c6d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0f3b7b4c63c6d) -
9
+ `xcss`: Restrict valid chained pseudo-selectors a limited subset:
10
+
11
+ - `:visited:active`
12
+ - `:active:visited`
13
+ - `:hover::before`
14
+ - `:hover::after`
15
+ - `:focus-visible::before`
16
+ - `:focus-visible::after`
17
+
18
+ Previously, any combination of two pseudo-selectors was allowed. This decision was made to improve
19
+ performance for TypeScript compilation and IDE type hinting.
20
+
21
+ ## 6.5.0
22
+
23
+ ### Minor Changes
24
+
25
+ - [#107382](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/107382)
26
+ [`219600ccac79`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/219600ccac79) -
27
+ Adding safe exports for `Anchor` primitive in preparation for open beta. The `UNSAFE_` prefixed
28
+ exports have been deprecated and will be removed in an upcoming major release.
29
+
3
30
  ## 6.4.0
4
31
 
5
32
  ### Minor Changes
@@ -22,21 +22,21 @@ import SectionMessage from '@atlaskit/section-message';
22
22
  directoryName="primitives"
23
23
  />
24
24
 
25
- Anchor is a primitive used for building custom links with Atlassian Design System styling, routing support, and built-in event tracking. Ultimately it renders an anchor `<a>` element.
25
+ Anchor is a primitive for building custom links with Atlassian Design System styling, routing support, and built-in event tracking. It renders an anchor `<a>` element.
26
26
 
27
- Only use anchor when existing components such as [link](/components/link/examples) or [link button](/components/button/link-button/examples) are unsuitable and unable to be customized to fit your needs.
27
+ Only use anchor when existing components such as [link](/components/link/examples) or [link button](/components/button/link-button/examples) can't be customized to fit your needs.
28
28
 
29
29
  ## Default
30
30
 
31
- Anchor is unstyled besides a default underline. If you are using the [CSS reset](/components/css-reset/examples), it will also inherit some global styles.
31
+ Anchor is unstyled besides a default underline and consistent Atlassian Design System `:focus` styles.
32
+
33
+ If you are using the [CSS reset](/components/css-reset/examples), anchor will also inherit some global styles.
32
34
 
33
35
  <Example Component={AnchorDefault} packageName="@atlaskit/primitives/anchor" />
34
36
 
35
37
  ## Basic styling with XCSS
36
38
 
37
- Anchor can be styled using XCSS. It includes consistent Atlassian Design System `:focus` styles, so it's unnecessary to add your own.
38
-
39
- For more information on XCSS, see the [XCSS documentation](/components/primitives/xcss).
39
+ Anchor can be styled further using the design system styling API, [XCSS](/components/primitives/xcss).
40
40
 
41
41
  <Example Component={AnchorBasic} packageName="@atlaskit/primitives/anchor" />
42
42
 
@@ -48,7 +48,7 @@ Use a combination of XCSS and other primitives for more complex designs.
48
48
 
49
49
  ## HTML attributes
50
50
 
51
- Anchor passes through all valid HTML attributes to the underlying `<a>` element.
51
+ Anchor can pass all valid [anchor HTML attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attributes), such as `rel` or `download`, to the underlying `<a>` element.
52
52
 
53
53
  <Example
54
54
  Component={AnchorHtmlAttributes}
@@ -57,7 +57,7 @@ Anchor passes through all valid HTML attributes to the underlying `<a>` element.
57
57
 
58
58
  ## Router links
59
59
 
60
- Routing libraries often supply their own link components enhanced with routing support. This can be configured in the [AppProvider context](/components/app-provider/examples#router-links), and anchor will automatically use it.
60
+ Routing libraries often supply link components enhanced with routing support. You can configure this in the [AppProvider context](/components/app-provider/examples#router-links), and anchor will automatically use it.
61
61
 
62
62
  This example shows a configuration for [React Resource Router](https://github.com/atlassian-labs/react-resource-router), however any routing library can be used.
63
63
 
@@ -6,28 +6,30 @@ order: 2
6
6
 
7
7
  ## Usage
8
8
 
9
- Anchors help users navigate to another page or sections of a page. They can also download files or provide contact information such as phone numbers or email addresses.
9
+ Use an anchor to make elements that work like hyperlinks. Anchors can navigate to any linkable location such as a web page, a location on a page, a file download, or a `mailto` email address.
10
10
 
11
- Anchor has consistent focus styles and analytics built in. It works with design tokens to make it easy to compose Atlassian-styled links that aren't possible using the [link component](/components/link/examples), [link buttons](/components/button/link-button/examples), or other existing design system components.
12
11
 
13
- ## Use anchor when there aren't existing components that work for your experience
12
+ Anchor is based on the HTML `<a>` tag, but with Atlassian focus styles and analytics events built in. You can customize the anchor's appearance further using our styling APIs.
14
13
 
15
- Existing components such as the [link component](/components/link/examples) (for text-based links) should be used whenever possible for links to maintain visual consistency. Only use anchor when building custom links beyond the capabilities of the the link component.
14
+ For example, an anchor could be used to make [a link card](/components/primitives/anchor/examples#advanced-styling) with a larger clickable area than a typical [link](/components/link/examples).
16
15
 
17
- Do not use anchor to perform actions rather than navigation. Use the equivalent [pressable primitive](/components/primitives/pressable/examples) to build a custom button instead.
16
+
17
+ ### Use links, link buttons, or other existing components where possible
18
+
19
+ Anchor is meant for custom elements and styles that aren't possible using other components. For standard links or buttons that navigate users to a new location, use [link](/components/link/examples) or [link button](/components/button/link-button/examples).
20
+
21
+ Using [existing components](/components) wherever possible makes Atlassian's UI more visually consistent, and these components are faster to use for most basic use cases.
18
22
 
19
23
  ## Accessibility
20
24
 
21
- ### Underline links unless other context already indicates it is a link
25
+ ### Show what's clickable using underlines or other affordances
22
26
 
23
- Anchor has an underline by default but it can be disabled in some circumstances. Underlines help differentiate links from regular text and addresses a WCAG-A recommendation. Using color alone isn't accessible, especially if links are surrounded by other text.
27
+ Anchors have an underline by default. This helps differentiate links from regular text, which is an accessibility requirement. Using color alone to differentiate links isn't accessible, especially if links are surrounded by other text.
24
28
 
25
- Only remove underlines if the context surrounding the link makes it clear that it is interactive, such as in navigation. Anhor may also be used to create linkable areas such as a card, in which case the underline may be omitted.
29
+ Only remove underlines if the context surrounding the link makes it clear that it's interactive, such as in navigation or a card layout.
26
30
 
27
31
  Also, don't underline text that isn't a link. This makes the text look clickable because it looks a link.
28
32
 
29
- For more information see ['Understanding Use of Color (Level A)'](https://www.w3.org/WAI/WCAG22/Understanding/use-of-color.html) and ['Failure of Success Criterion 1.4.1 due to creating links that are not visually evident without color vision'](https://www.w3.org/WAI/WCAG22/Techniques/failures/F73).
30
-
31
33
  <!-- TODO: Add do/dont images once designed (if necessary?) -->
32
34
 
33
35
  <DoDont type="do">
@@ -37,13 +39,27 @@ For more information see ['Understanding Use of Color (Level A)'](https://www.w3
37
39
 
38
40
  <DoDont type="dont">Use underlined links in navigation.</DoDont>
39
41
 
42
+ For more information see ['Understanding Use of Color (Level A)'](https://www.w3.org/WAI/WCAG22/Understanding/use-of-color.html) and ['Failure of Success Criterion 1.4.1 due to creating links that are not visually evident without color vision'](https://www.w3.org/WAI/WCAG22/Techniques/failures/F73).
43
+
44
+ ### Use anchor for links and navigation, not on-page actions
45
+
46
+ Anchors are for navigation and URL changes, while buttons are for on-page actions such as form submissions or opening modals. These elements are treated differently by assistive technologies, so avoid using one in place of the other.
47
+
48
+ Don't use anchor to make custom actions rather than navigation elements. To build a custom action or button, use the [pressable primitive](/components/primitives/pressable/examples) instead.
49
+
50
+ More on [when to use links vs buttons](/components/button/usage#use-buttons-for-actions-and-links-for-navigation).
51
+
52
+
40
53
  ### Use descriptive link text that clarifies the purpose of the link
41
54
 
42
- Don't link vague words or phrases like “here” or “learn more.” Make sure the linked text clearly describes the purpose of the link.
55
+ Don't link vague words or phrases like “here” or “learn more.” Make sure the linked text clearly describes the purpose of the link for assistive technologies.
43
56
 
57
+ See [link content guidelines](/components/primitives/anchor/usage#content-guidelines) for details and examples.
58
+
59
+ <!-- TODO: Crosslink updated link content guidance. Should be info in language and grammar and link component. (snippet time?) -->
44
60
  <!-- TODO: Add some Do/Don't images as examples -->
45
61
 
46
- <DoDont type="do">Clearly describe the purpose of the link.</DoDont>
62
+ <DoDont type="do">Link text that describes the purpose of the link.</DoDont>
47
63
 
48
64
  <DoDont type="dont">Link vague words or phrases.</DoDont>
49
65
 
@@ -62,13 +78,6 @@ For more information see ['G200: Opening new windows and tabs from a link only w
62
78
 
63
79
  Make link text size at least 12px. Smaller text is harder to read and interact with. If anchor is not used for text-based links, ensure the clickable area is at least 24 by 24 pixels for accessibility unless exempt from [Target Size (Minimum) (Level AA)](https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum.html).
64
80
 
65
- ## Best practices
66
-
67
- ### Don't confuse links and buttons
68
-
69
- Anchors are for navigation and URL changes, while buttons are for on-page actions such as form submissions or opening modals. These elements are treated differently by assistive technologies, so avoid using one in place of the other.
70
-
71
- More details on [when to use links and buttons](/components/button/usage#use-buttons-for-actions-and-links-for-navigation).
72
81
 
73
82
  ## Content guidelines
74
83
 
@@ -80,6 +89,8 @@ Try not to repeat the same link text over and over on a page. Make sure link tex
80
89
 
81
90
  Always specify if a link triggers a download, and make the linked text clear about what exactly will be downloaded. Include file type and size as well.
82
91
 
92
+ <!-- TODO: add example of this -->
93
+
83
94
  ### Don't include unnecessary links
84
95
 
85
96
  Using too many links can overwhelm other, more important information on a page.
@@ -106,6 +117,6 @@ These type of links typically follow general button or other label content rules
106
117
 
107
118
  ## Related
108
119
 
109
- - [Counterpart pressable primitive for buttons](/components/primitives/button/usage)
110
- - Prefer to use existing components such as the [link component](/components/link/examples) or [link buttons](/components/button/link-button/examples)
111
- - Anchor is built on the same API as [box](/components/primitives/box/usage)
120
+ - Use existing components such as [link](/components/link/examples) or [link button](/components/button/link-button/examples) wherever possible.
121
+ - Use [pressable primitive for custom buttons](/components/primitives/button/usage).
122
+ - Anchor is built on the same API as [box](/components/primitives/box/usage).
@@ -76,7 +76,7 @@ var Anchor = function Anchor(_ref, ref) {
76
76
  action: 'clicked',
77
77
  componentName: componentName || 'Anchor',
78
78
  packageName: "@atlaskit/primitives",
79
- packageVersion: "6.4.0",
79
+ packageVersion: "7.0.0",
80
80
  analyticsData: analyticsContext,
81
81
  actionSubject: 'link'
82
82
  });
@@ -126,7 +126,7 @@ var Anchor = function Anchor(_ref, ref) {
126
126
 
127
127
  // Workarounds to support generic types with forwardRef
128
128
  /**
129
- * __UNSAFE_ANCHOR__
129
+ * __Anchor__
130
130
  *
131
131
  * @internal Still under development. Do not use.
132
132
  *
@@ -78,7 +78,7 @@ var Pressable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
78
78
  action: 'clicked',
79
79
  componentName: componentName || 'Pressable',
80
80
  packageName: "@atlaskit/primitives",
81
- packageVersion: "6.4.0",
81
+ packageVersion: "7.0.0",
82
82
  analyticsData: analyticsContext,
83
83
  actionSubject: 'button'
84
84
  });
package/dist/cjs/index.js CHANGED
@@ -4,6 +4,12 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
+ Object.defineProperty(exports, "Anchor", {
8
+ enumerable: true,
9
+ get: function get() {
10
+ return _anchor.default;
11
+ }
12
+ });
7
13
  Object.defineProperty(exports, "Bleed", {
8
14
  enumerable: true,
9
15
  get: function get() {
@@ -212,7 +212,7 @@ var parseXcss = exports.parseXcss = function parseXcss(args) {
212
212
 
213
213
  // Media queries should not contain nested media queries
214
214
 
215
- // Allow chained pseudos, e.g. `:visited:hover`
215
+ // Allow only a specific subset of chained selectors to maintain workable TypeScript performance
216
216
 
217
217
  // Pseudos should not contain nested pseudos, or media queries
218
218
 
@@ -62,7 +62,7 @@ const Anchor = ({
62
62
  action: 'clicked',
63
63
  componentName: componentName || 'Anchor',
64
64
  packageName: "@atlaskit/primitives",
65
- packageVersion: "6.4.0",
65
+ packageVersion: "7.0.0",
66
66
  analyticsData: analyticsContext,
67
67
  actionSubject: 'link'
68
68
  });
@@ -112,7 +112,7 @@ const Anchor = ({
112
112
 
113
113
  // Workarounds to support generic types with forwardRef
114
114
  /**
115
- * __UNSAFE_ANCHOR__
115
+ * __Anchor__
116
116
  *
117
117
  * @internal Still under development. Do not use.
118
118
  *
@@ -64,7 +64,7 @@ const Pressable = /*#__PURE__*/forwardRef(({
64
64
  action: 'clicked',
65
65
  componentName: componentName || 'Pressable',
66
66
  packageName: "@atlaskit/primitives",
67
- packageVersion: "6.4.0",
67
+ packageVersion: "7.0.0",
68
68
  analyticsData: analyticsContext,
69
69
  actionSubject: 'button'
70
70
  });
@@ -7,7 +7,11 @@ export { default as Grid } from './components/grid';
7
7
  export { default as Bleed } from './components/bleed';
8
8
  export { default as Text } from './components/text';
9
9
  export { default as Pressable } from './components/pressable';
10
- export { default as UNSAFE_ANCHOR } from './components/anchor';
10
+ export {
11
+ /**
12
+ * @deprecated Use `Anchor` instead. This will be removed in a future major release.
13
+ */
14
+ default as UNSAFE_ANCHOR, default as Anchor } from './components/anchor';
11
15
  export { media, UNSAFE_media, UNSAFE_BREAKPOINTS_CONFIG } from './responsive';
12
16
  export { useSurface as UNSAFE_useSurface } from './components/internal/surface-provider';
13
17
  export { inverseColorMap as UNSAFE_inverseColorMap } from './xcss/style-maps.partial';
@@ -190,7 +190,7 @@ export const parseXcss = args => {
190
190
 
191
191
  // Media queries should not contain nested media queries
192
192
 
193
- // Allow chained pseudos, e.g. `:visited:hover`
193
+ // Allow only a specific subset of chained selectors to maintain workable TypeScript performance
194
194
 
195
195
  // Pseudos should not contain nested pseudos, or media queries
196
196
 
@@ -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: "6.4.0",
69
+ packageVersion: "7.0.0",
70
70
  analyticsData: analyticsContext,
71
71
  actionSubject: 'link'
72
72
  });
@@ -116,7 +116,7 @@ var Anchor = function Anchor(_ref, ref) {
116
116
 
117
117
  // Workarounds to support generic types with forwardRef
118
118
  /**
119
- * __UNSAFE_ANCHOR__
119
+ * __Anchor__
120
120
  *
121
121
  * @internal Still under development. Do not use.
122
122
  *
@@ -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: "6.4.0",
71
+ packageVersion: "7.0.0",
72
72
  analyticsData: analyticsContext,
73
73
  actionSubject: 'button'
74
74
  });
package/dist/esm/index.js CHANGED
@@ -7,7 +7,11 @@ export { default as Grid } from './components/grid';
7
7
  export { default as Bleed } from './components/bleed';
8
8
  export { default as Text } from './components/text';
9
9
  export { default as Pressable } from './components/pressable';
10
- export { default as UNSAFE_ANCHOR } from './components/anchor';
10
+ export {
11
+ /**
12
+ * @deprecated Use `Anchor` instead. This will be removed in a future major release.
13
+ */
14
+ default as UNSAFE_ANCHOR, default as Anchor } from './components/anchor';
11
15
  export { media, UNSAFE_media, UNSAFE_BREAKPOINTS_CONFIG } from './responsive';
12
16
  export { useSurface as UNSAFE_useSurface } from './components/internal/surface-provider';
13
17
  export { inverseColorMap as UNSAFE_inverseColorMap } from './xcss/style-maps.partial';
@@ -208,7 +208,7 @@ export var parseXcss = function parseXcss(args) {
208
208
 
209
209
  // Media queries should not contain nested media queries
210
210
 
211
- // Allow chained pseudos, e.g. `:visited:hover`
211
+ // Allow only a specific subset of chained selectors to maintain workable TypeScript performance
212
212
 
213
213
  // Pseudos should not contain nested pseudos, or media queries
214
214
 
@@ -28,7 +28,7 @@ export type AnchorProps<RouterLinkConfig extends Record<string, any> = never> =
28
28
  };
29
29
  declare const Anchor: <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
- * __UNSAFE_ANCHOR__
31
+ * __Anchor__
32
32
  *
33
33
  * @internal Still under development. Do not use.
34
34
  *
@@ -17,8 +17,16 @@ export { default as Text } from './components/text';
17
17
  export type { TextProps } from './components/text';
18
18
  export { default as Pressable } from './components/pressable';
19
19
  export type { PressableProps } from './components/pressable';
20
- export { default as UNSAFE_ANCHOR } from './components/anchor';
21
- export type { AnchorProps as UNSAFE_AnchorProps } from './components/anchor';
20
+ export {
21
+ /**
22
+ * @deprecated Use `Anchor` instead. This will be removed in a future major release.
23
+ */
24
+ default as UNSAFE_ANCHOR, default as Anchor, } from './components/anchor';
25
+ export type {
26
+ /**
27
+ * @deprecated Use `AnchorProps` instead. This will be removed in a future major release.
28
+ */
29
+ AnchorProps as UNSAFE_AnchorProps, AnchorProps, } from './components/anchor';
22
30
  export { media, UNSAFE_media, UNSAFE_BREAKPOINTS_CONFIG } from './responsive';
23
31
  export type { Breakpoint, MediaQuery } from './responsive';
24
32
  export { useSurface as UNSAFE_useSurface } from './components/internal/surface-provider';
@@ -1643,7 +1643,7 @@ type AllMedia = MediaQuery | '@media screen and (forced-colors: active), screen
1643
1643
  type CSSMediaQueries = {
1644
1644
  [MQ in AllMedia]?: Omit<SafeCSSObject, AllMedia>;
1645
1645
  };
1646
- type ChainedCSSPseudos = `${CSS.Pseudos}${CSS.Pseudos}`;
1646
+ type ChainedCSSPseudos = ':visited:active' | ':active:visited' | ':hover::before' | ':hover::after' | ':focus-visible::before' | ':focus-visible::after';
1647
1647
  type CSSPseudos = {
1648
1648
  [Pseudo in CSS.Pseudos | ChainedCSSPseudos]?: Omit<SafeCSSObject, CSS.Pseudos | AllMedia>;
1649
1649
  };
@@ -28,7 +28,7 @@ export type AnchorProps<RouterLinkConfig extends Record<string, any> = never> =
28
28
  };
29
29
  declare const Anchor: <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
- * __UNSAFE_ANCHOR__
31
+ * __Anchor__
32
32
  *
33
33
  * @internal Still under development. Do not use.
34
34
  *
@@ -17,8 +17,16 @@ export { default as Text } from './components/text';
17
17
  export type { TextProps } from './components/text';
18
18
  export { default as Pressable } from './components/pressable';
19
19
  export type { PressableProps } from './components/pressable';
20
- export { default as UNSAFE_ANCHOR } from './components/anchor';
21
- export type { AnchorProps as UNSAFE_AnchorProps } from './components/anchor';
20
+ export {
21
+ /**
22
+ * @deprecated Use `Anchor` instead. This will be removed in a future major release.
23
+ */
24
+ default as UNSAFE_ANCHOR, default as Anchor, } from './components/anchor';
25
+ export type {
26
+ /**
27
+ * @deprecated Use `AnchorProps` instead. This will be removed in a future major release.
28
+ */
29
+ AnchorProps as UNSAFE_AnchorProps, AnchorProps, } from './components/anchor';
22
30
  export { media, UNSAFE_media, UNSAFE_BREAKPOINTS_CONFIG } from './responsive';
23
31
  export type { Breakpoint, MediaQuery } from './responsive';
24
32
  export { useSurface as UNSAFE_useSurface } from './components/internal/surface-provider';
@@ -1643,7 +1643,7 @@ type AllMedia = MediaQuery | '@media screen and (forced-colors: active), screen
1643
1643
  type CSSMediaQueries = {
1644
1644
  [MQ in AllMedia]?: Omit<SafeCSSObject, AllMedia>;
1645
1645
  };
1646
- type ChainedCSSPseudos = `${CSS.Pseudos}${CSS.Pseudos}`;
1646
+ type ChainedCSSPseudos = ':visited:active' | ':active:visited' | ':hover::before' | ':hover::after' | ':focus-visible::before' | ':focus-visible::after';
1647
1647
  type CSSPseudos = {
1648
1648
  [Pseudo in CSS.Pseudos | ChainedCSSPseudos]?: Omit<SafeCSSObject, CSS.Pseudos | AllMedia>;
1649
1649
  };
@@ -35,7 +35,7 @@ export default function Anchor<
35
35
  >(
36
36
  _: {
37
37
  /**
38
- * A link 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 [the code examples](https://atlassian.design/components/primitives/anchor/examples#router-links) for more information.
38
+ * 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.
39
39
  */
40
40
  href: string | RouterLinkConfig;
41
41
 
@@ -85,7 +85,7 @@ export default function Anchor<
85
85
  paddingInlineEnd?: Space;
86
86
 
87
87
  /**
88
- * 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 the code examples for information on [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).
88
+ * 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).
89
89
  */
90
90
  onClick?: (
91
91
  e: React.MouseEvent<HTMLButtonElement>,
@@ -93,23 +93,22 @@ export default function Anchor<
93
93
  ) => void;
94
94
 
95
95
  /**
96
- * 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 code example](https://atlassian.design/components/primitives/anchor/examples#atlaskit-analytics) for more information.
96
+ * 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.
97
97
  */
98
98
  componentName?: string;
99
99
 
100
100
  /**
101
- * Additional information to be included in the `context` of Atlaskit analytics events that come from anchor. See [the code example](https://atlassian.design/components/primitives/anchor/examples#atlaskit-analytics) for more information.
101
+ * 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.
102
102
  */
103
103
  analyticsContext?: Record<string, any>;
104
104
 
105
105
  /**
106
- * 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 code example](https://atlassian.design/components/primitives/anchor/examples#react-ufo-press-interactions) for more information.
106
+ * 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.
107
107
  */
108
108
  interactionName?: string;
109
109
 
110
110
  /**
111
- * A token alias for background color. See:<br>
112
- * [https://atlassian.design/components/tokens/all-tokens#color-background](https://atlassian.design/components/tokens/all-tokens#color-background)<br>
111
+ * A token alias for background color ([background color tokens](https://atlassian.design/components/components/tokens/all-tokens#color-background)).
113
112
  * When the background color is set to a [surface token](/components/tokens/all-tokens#elevation-surface),
114
113
  * the [current surface](/components/tokens/code#current-surface-color) CSS variable will also be set to this value in the Box styles.
115
114
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "6.4.0",
3
+ "version": "7.0.0",
4
4
  "description": "Primitives are token-backed low-level building blocks.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"