@atlaskit/primitives 6.2.0 → 6.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/CHANGELOG.md +593 -574
  2. package/constellation/anchor/examples.mdx +9 -21
  3. package/constellation/anchor/usage.mdx +91 -27
  4. package/constellation/pressable/examples.mdx +9 -21
  5. package/constellation/pressable/usage.mdx +7 -4
  6. package/dist/cjs/components/anchor.js +1 -1
  7. package/dist/cjs/components/bleed.js +1 -0
  8. package/dist/cjs/components/box.js +10 -3
  9. package/dist/cjs/components/flex.js +3 -1
  10. package/dist/cjs/components/grid.js +6 -2
  11. package/dist/cjs/components/pressable.js +1 -1
  12. package/dist/cjs/responsive/hide.js +3 -1
  13. package/dist/cjs/responsive/show.js +3 -1
  14. package/dist/es2019/components/anchor.js +1 -1
  15. package/dist/es2019/components/bleed.js +1 -0
  16. package/dist/es2019/components/box.js +10 -3
  17. package/dist/es2019/components/flex.js +3 -1
  18. package/dist/es2019/components/grid.js +6 -2
  19. package/dist/es2019/components/pressable.js +1 -1
  20. package/dist/es2019/responsive/hide.js +3 -1
  21. package/dist/es2019/responsive/show.js +3 -1
  22. package/dist/esm/components/anchor.js +1 -1
  23. package/dist/esm/components/bleed.js +1 -0
  24. package/dist/esm/components/box.js +10 -3
  25. package/dist/esm/components/flex.js +3 -1
  26. package/dist/esm/components/grid.js +6 -2
  27. package/dist/esm/components/pressable.js +1 -1
  28. package/dist/esm/responsive/hide.js +3 -1
  29. package/dist/esm/responsive/show.js +3 -1
  30. package/dist/types/components/bleed.d.ts +1 -1
  31. package/dist/types/components/box.d.ts +3 -3
  32. package/dist/types/components/flex.d.ts +1 -1
  33. package/dist/types/components/inline.d.ts +1 -1
  34. package/dist/types/components/stack.d.ts +1 -1
  35. package/dist/types/responsive/build-media-query-css.d.ts +1 -1
  36. package/dist/types/responsive/types.d.ts +3 -3
  37. package/dist/types/xcss/style-maps.partial.d.ts +21 -21
  38. package/dist/types/xcss/xcss.d.ts +1 -1
  39. package/dist/types-ts4.5/components/bleed.d.ts +1 -1
  40. package/dist/types-ts4.5/components/box.d.ts +3 -3
  41. package/dist/types-ts4.5/components/flex.d.ts +1 -1
  42. package/dist/types-ts4.5/components/inline.d.ts +1 -1
  43. package/dist/types-ts4.5/components/stack.d.ts +1 -1
  44. package/dist/types-ts4.5/responsive/build-media-query-css.d.ts +1 -1
  45. package/dist/types-ts4.5/responsive/types.d.ts +3 -3
  46. package/dist/types-ts4.5/xcss/style-maps.partial.d.ts +21 -21
  47. package/dist/types-ts4.5/xcss/xcss.d.ts +1 -1
  48. package/extract-react-types/bleed-props.tsx +2 -2
  49. package/extract-react-types/box-props.tsx +6 -3
  50. package/extract-react-types/flex-props.tsx +2 -2
  51. package/extract-react-types/grid-props.tsx +2 -2
  52. package/extract-react-types/hide-props.tsx +2 -2
  53. package/extract-react-types/inline-props.tsx +1 -1
  54. package/extract-react-types/show-props.tsx +2 -2
  55. package/extract-react-types/stack-props.tsx +1 -1
  56. package/package.json +4 -6
  57. package/scripts/color-codegen-template.tsx +1 -1
  58. package/scripts/elevation-codegen-template.tsx +1 -1
  59. /package/constellation/bleed/{example.mdx → examples.mdx} +0 -0
@@ -75,39 +75,27 @@ Anchor will only render a router link if:
75
75
  appearance="source-only"
76
76
  />
77
77
 
78
- ## Event tracking
79
-
80
- Anchor has utilities to make tracking events easier. Events will not be captured unless listeners are setup to handle them.
81
-
82
- ### Track events for any analytics provider
83
-
84
- Anchor comes with built-in Atlaskit analytics support using the [Analytics next package](https://atlaskit.atlassian.com/packages/analytics/analytics-next), and fires events for available listeners. Currently this is only available for `onClick`.
85
-
86
- It always fires events on the `atlaskit` channel. To also fire events on other channels, use the provided `analyticsEvent` in `onClick`. To configure event data, use `componentName` (defaults to 'Anchor') and `analyticsContext` for passing other metadata.
87
-
88
- See the event data in the console.
78
+ <Snippet
79
+ name="primitives-event-tracking-header"
80
+ variables={{ componentName: 'anchor' }}
81
+ />
89
82
 
90
83
  <Example
91
84
  Component={AnchorAnalytics}
92
85
  packageName="@atlaskit/primitives/anchor"
93
86
  />
94
87
 
95
- ### Track events for Atlassian internal services
96
-
97
- #### GASv3 analytics
98
-
99
- The Atlassian analytics bridge makes Atlaskit analytics events compatible with GASv3 (Global Analytics Service). This can also inject an `actionSubjectId` to the event if required.
100
-
101
- See the event data in the console.
88
+ <Snippet name="primitives-event-tracking-gasv3" />
102
89
 
103
90
  <Example
104
91
  Component={AnchorAnalyticsGASv3}
105
92
  packageName="@atlaskit/primitives/anchor"
106
93
  />
107
94
 
108
- #### React UFO press interactions
109
-
110
- By default, anchor fires [React UFO (Unified Frontend Observability) press interactions](https://developer.atlassian.com/platform/ufo/react-ufo/react-ufo/getting-started/#quick-start--press-interactions) for available listeners. This helps Atlassian measure performance and reliability. Additional detail can be provided using the `interactionName` prop.
95
+ <Snippet
96
+ name="primitives-event-tracking-ufo"
97
+ variables={{ componentName: 'anchor' }}
98
+ />
111
99
 
112
100
  <Example
113
101
  Component={AnchorPressTracing}
@@ -4,44 +4,108 @@ description: An anchor is a primitive for building custom links.
4
4
  order: 2
5
5
  ---
6
6
 
7
- ## When not to use Anchor
7
+ ## Usage
8
8
 
9
- The [Link component](/components/link/usage) should be used whenever possible for links to maintain visual consistency. Only use Anchor when building custom links beyond the capabilities of the Link component. The decision to use Anchor should involve checking if the Link component can be customized to fit your needs using [XCSS](/components/primitives/XCSS/usage).
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.
10
10
 
11
- Do not use Anchor for buttons that perform actions rather than navigation. Use the equivalent [Pressable primitive](/components/primitives/pressable/usage) instead.
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
12
 
13
- ## Link types
13
+ ## Use anchor when there aren't existing components that work for your experience
14
14
 
15
- External links starting with `http://` or `https://` will automatically render with `target="_blank"` and `rel="noopener noreferrer"` attributes.
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.
16
16
 
17
- ### Router links
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.
18
18
 
19
- Anchor supports automatic consumption of configured router link components through the [App Provider](/components/app-provider/examples#router-links). If an App Provider is not present or a router link component is not configured, the link will render as a standard anchor link.
19
+ ## Accessibility
20
20
 
21
- External links and non-HTTP-based links such as `tel:` and `mailto:` will not use router links and always render as standard anchor links.
21
+ ### Underline links unless other context already indicates it is a link
22
22
 
23
- Anchor accepts a generic type object matching the router link configuration, allowing advanced usage of `href` prop. These values can be mapped to the underlying router link component in the App Provider.
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.
24
24
 
25
- ```jsx
26
- <Anchor<MyRouterLinkConfig>
27
- href={{
28
- to: '/home',
29
- replace: true
30
- }}
31
- >
32
- Home
33
- </Anchor>
34
- ```
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.
35
26
 
36
- ## Styling
27
+ Also, don't underline text that isn't a link. This makes the text look clickable because it looks a link.
37
28
 
38
- Display behavior follows the same patterns as [Box](/components/primitives/box/usage). Use available props or [XCSS](/components/primitives/xcss/usage) to customize padding options, background color, and other styles.
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
+ <!-- TODO: Add do/dont images once designed (if necessary?) -->
32
+
33
+ <DoDont type="do">
34
+ Use underlined links in body copy. Only omit an underline if the context makes
35
+ it clear the link is selectable.
36
+ </DoDont>
37
+
38
+ <DoDont type="dont">Use underlined links in navigation.</DoDont>
39
+
40
+ ### Use descriptive link text that clarifies the purpose of the link
41
+
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.
43
+
44
+ <!-- TODO: Add some Do/Don't images as examples -->
45
+
46
+ <DoDont type="do">Clearly describe the purpose of the link.</DoDont>
47
+
48
+ <DoDont type="dont">Link vague words or phrases.</DoDont>
49
+
50
+ ### Only open links in a new window or tab when necessary
51
+
52
+ Opening links in a new window can be disorienting for people, so only do it when necessary.
53
+
54
+ It might make sense for a link to open in a new window if:
55
+
56
+ - There's a risk of someone losing their current place or task
57
+ - The link takes the person out of the current product or to an external website
58
+
59
+ For more information see ['G200: Opening new windows and tabs from a link only when necessary'](https://www.w3.org/TR/WCAG20-TECHS/G200.html).
60
+
61
+ ### Keep links large enough to interact with
62
+
63
+ 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
+
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
+
73
+ ## Content guidelines
74
+
75
+ ### Use clear and unique link text
76
+
77
+ Try not to repeat the same link text over and over on a page. Make sure link text is clear about where the link will go.
78
+
79
+ ### Specify download links, including file type and size
80
+
81
+ 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
+
83
+ ### Don't include unnecessary links
84
+
85
+ Using too many links can overwhelm other, more important information on a page.
86
+
87
+ Anchors take people to a new page or location. Be mindful of whether or not the linked resource is helpful or distracting to the current task.
88
+
89
+ ### Links in sentences or body copy
90
+
91
+ Only link the words that are necessary to clarify where the link goes. Don't link the entire sentence. (Linking smaller phrases can be better for internationalization when sentence structures change across languages.)
92
+
93
+ Only include the verb in the linked text if it better describes the purpose the link or differentiates it from other links and actions on the page.
94
+
95
+ For example:
96
+
97
+ > Update [Jira settings](/components/button/usage#use-buttons-for-actions-and-links-for-navigation) to turn off notifications. To upgrade, [sign up for Jira](/components/button/usage#use-buttons-for-actions-and-links-for-navigation).
98
+
99
+ If only Jira was linked, it wouldn't be clear that this was a sign up page.
100
+
101
+ ### Links on their own (UI elements or navigation)
102
+
103
+ For standalone links, link the whole phrase. Don't add punctuation.
104
+
105
+ These type of links typically follow general button or other label content rules (sentence case capitalization, no punctuation, etc.)
39
106
 
40
107
  ## Related
41
108
 
42
- - [Configuring router link components with AppProvider](/components/app-provider/examples#router-links)
43
- - [The underlying box component](/components/primitives/box/usage)
44
- - [Counterpart pressable primitive for button tags](/components/primitives/button/usage)
45
- - [Manage horizontal layout using an inline component](/components/primitives/inline/usage)
46
- - [Manage vertical layout using a stack component](/components/primitives/stack/usage)
47
- - [Use design tokens in code with XCSS](/components/primitives/XCSS/usage)
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)
@@ -87,39 +87,27 @@ Pressable passes through all valid HTML attributes to the underlying `<button>`
87
87
  packageName="@atlaskit/primitives/pressable"
88
88
  />
89
89
 
90
- ## Event tracking
91
-
92
- Pressable has utilities to make tracking events easier. Events will not be captured unless listeners are setup to handle them.
93
-
94
- ### Track events for any analytics provider
95
-
96
- Pressable comes with built-in Atlaskit analytics support using the [Analytics next package](https://atlaskit.atlassian.com/packages/analytics/analytics-next), and fires events for available listeners. Currently this is only available for `onClick`.
97
-
98
- It always fires events on the `atlaskit` channel. To also fire events on other channels, use the provided `analyticsEvent` in `onClick`. To configure event data, use `componentName` (defaults to 'Pressable') and `analyticsContext` for passing other metadata.
99
-
100
- See the event data in the console.
90
+ <Snippet
91
+ name="primitives-event-tracking-header"
92
+ variables={{ componentName: 'pressable' }}
93
+ />
101
94
 
102
95
  <Example
103
96
  Component={PressableAnalytics}
104
97
  packageName="@atlaskit/primitives/pressable"
105
98
  />
106
99
 
107
- ### Track events for Atlassian internal services
108
-
109
- #### GASv3 analytics
110
-
111
- The Atlassian analytics bridge makes Atlaskit analytics events compatible with GASv3 (Global Analytics Service). This can also inject an `actionSubjectId` to the event if required.
112
-
113
- See the event data in the console.
100
+ <Snippet name="primitives-event-tracking-gasv3" />
114
101
 
115
102
  <Example
116
103
  Component={PressableAnalyticsGASv3}
117
104
  packageName="@atlaskit/primitives/pressable"
118
105
  />
119
106
 
120
- #### React UFO press interactions
121
-
122
- By default, pressable fires [React UFO (Unified Frontend Observability) press interactions](https://developer.atlassian.com/platform/ufo/react-ufo/react-ufo/getting-started/#quick-start--press-interactions) for available listeners. This helps Atlassian measure performance and reliability. Additional detail can be provided using the `interactionName` prop.
107
+ <Snippet
108
+ name="primitives-event-tracking-ufo"
109
+ variables={{ componentName: 'pressable' }}
110
+ />
123
111
 
124
112
  <Example
125
113
  Component={PressablePressTracing}
@@ -7,6 +7,8 @@ order: 2
7
7
  import pressablePrimaryDo from './images/pressable-01a-do.png';
8
8
  import pressablePrimaryDont from './images/pressable-01b-dont.png';
9
9
 
10
+ ## Usage
11
+
10
12
  Pressable is a button with consistent focus styles and analytics built in. Pressable works with design tokens to make it easy to compose Atlassian-styled clickable elements that aren't possible using existing [buttons](/components/button/examples), [menus](/components/menu/examples), or other existing design system components.
11
13
 
12
14
  ![Pressable anatomy](./images/pressable-anatomy.png)
@@ -15,7 +17,7 @@ Pressable is a button with consistent focus styles and analytics built in. Press
15
17
  2. **Focus ring**: This is included in pressable and appears on keyboard focus.
16
18
  3. **Accessible label:** Pressable should always include a clear label for accessibility. Use this to communicate the action that occurs when the button is pressed.
17
19
 
18
- ## Use pressable when there aren't existing components that work for your experience
20
+ ### Use pressable when there aren't existing components that work for your experience
19
21
 
20
22
  Only use pressable when existing components such as [the button component](/components/button/examples), menus, or other existing design system components can't be customized to fit your case. Using existing components with safe customizations will prevent inconsistency as Atlassian UI evolves.
21
23
 
@@ -62,7 +64,7 @@ Pressable creates buttons that are available in focus order, and provides a visu
62
64
 
63
65
  ### Avoid disabling buttons
64
66
 
65
- Disabled buttons can cause accessibility problems. Avoid disabling buttons and [follow our disabled and tooltip button guidance](/components/button/button-new/usage#avoid-disabling-buttons).
67
+ Disabled buttons can cause accessibility problems. Avoid disabling buttons and [follow our disabled and tooltip button guidance](/components/button/usage#avoid-disabling-buttons).
66
68
 
67
69
  ## Best practices
68
70
 
@@ -91,9 +93,10 @@ For example, _Change issue color to yellow_ instead of _yellow_.
91
93
 
92
94
  ### Follow other label and UI content guidance
93
95
 
94
- Follow label and content guidelines for [buttons](/components/button/button-new/usage#content-guidelines). Review our [general UI text guidance](/foundations/accessibility/#meaningful-text) for specific question.
96
+ Follow label and content guidelines for [buttons](/components/button/usage#content-guidelines). Review our [general UI text guidance](/foundations/accessibility/#meaningful-text) for specific question.
95
97
 
96
98
  ## Related
97
99
 
98
- - Use existing components such as [buttons](/components/button/examples) or [menus](/components/menu/examples) for most actions in Atlassian products.
100
+ - [Counterpart anchor primitive for links](/components/primitives/button/usage)
101
+ - Prefer to use existing components such as [buttons](/components/button/examples) or [menus](/components/menu/examples) for most actions in Atlassian products
99
102
  - Pressable 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.2.0",
79
+ packageVersion: "6.4.0",
80
80
  analyticsData: analyticsContext,
81
81
  actionSubject: 'link'
82
82
  });
@@ -65,6 +65,7 @@ var Bleed = /*#__PURE__*/_react.default.memo(function (_ref) {
65
65
  xcss = _ref.xcss;
66
66
  var resolvedStyles = (0, _xcss.parseXcss)(xcss);
67
67
  return (0, _react2.jsx)("div", {
68
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
68
69
  className: resolvedStyles.static,
69
70
  css: [baseStyles, (inline || all) && inlineBleedMap[inline || all], (block || all) && blockBleedMap[block || all],
70
71
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
@@ -53,11 +53,15 @@ var Box = exports.Box = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
53
53
  var resolvedStyles = (0, _xcss.parseXcss)(xcss);
54
54
  var node =
55
55
  // @ts-expect-error Expression produces a union type that is too complex to represent. I think this is unavoidable
56
- (0, _react2.jsx)(Component, (0, _extends2.default)({
56
+ (0, _react2.jsx)(Component
57
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
58
+ , (0, _extends2.default)({
57
59
  style: style
58
60
  // @ts-expect-error Expression produces a union type that is too complex to represent. We may be able to narrow the type here but unsure.
59
61
  ,
60
- ref: ref,
62
+ ref: ref
63
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
64
+ ,
61
65
  className: resolvedStyles.static
62
66
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
63
67
  }, safeHtmlAttributes, {
@@ -69,7 +73,10 @@ var Box = exports.Box = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
69
73
  return backgroundColor ? (0, _react2.jsx)(_surfaceProvider.SurfaceContext.Provider, {
70
74
  value: backgroundColor
71
75
  }, node) : node;
72
- });
76
+ }
77
+ // @ts-ignore This typescript error has been surpessed while locally enrolling `@atlaskit/primitives` into Jira
78
+ // The return type of `BoxComponent` does not match the return type of `forwardRef` in React 18
79
+ );
73
80
  var _default = exports.default = Box;
74
81
  var baseStyles = (0, _react2.css)({
75
82
  boxSizing: 'border-box',
@@ -107,7 +107,9 @@ var Flex = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(fu
107
107
  xcss = _ref.xcss;
108
108
  var resolvedStyles = (0, _xcss.parseXcss)(xcss);
109
109
  return (0, _react2.jsx)(Component, {
110
- role: role,
110
+ role: role
111
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
112
+ ,
111
113
  className: resolvedStyles.static,
112
114
  css: [baseStyles, gap && _styleMaps.spaceStylesMap.gap[gap], columnGap && _styleMaps.spaceStylesMap.columnGap[columnGap], rowGap && _styleMaps.spaceStylesMap.rowGap[rowGap], alignItems && alignItemsMap[alignItems], direction && flexDirectionMap[direction], justifyContent && justifyContentMap[justifyContent], wrap && flexWrapMap[wrap],
113
115
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
@@ -170,8 +170,12 @@ var Grid = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(fu
170
170
  }, [gridTemplateAreas, gridTemplateColumns, gridTemplateRows]);
171
171
  return (0, _react2.jsx)(Component, {
172
172
  id: id,
173
- role: role,
174
- style: style,
173
+ role: role
174
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
175
+ ,
176
+ style: style
177
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
178
+ ,
175
179
  className: resolvedStyles.static,
176
180
  css: [baseStyles, gap && _styleMaps.spaceStylesMap.gap[gap], columnGap && _styleMaps.spaceStylesMap.columnGap[columnGap], rowGap && _styleMaps.spaceStylesMap.rowGap[rowGap], alignItems && alignItemsMap[alignItems], alignContent && alignContentMap[alignContent], justifyContent && justifyContentMap[justifyContent], autoFlow && gridAutoFlowMap[autoFlow],
177
181
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
@@ -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.2.0",
81
+ packageVersion: "6.4.0",
82
82
  analyticsData: analyticsContext,
83
83
  actionSubject: 'button'
84
84
  });
@@ -31,7 +31,9 @@ var Hide = exports.Hide = function Hide(_ref) {
31
31
  AsElement = _ref$as === void 0 ? 'div' : _ref$as,
32
32
  xcss = _ref.xcss;
33
33
  var resolvedStyles = (0, _xcss.parseXcss)(xcss);
34
- return (0, _react.jsx)(AsElement, {
34
+ return (0, _react.jsx)(AsElement
35
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
36
+ , {
35
37
  className: resolvedStyles.static,
36
38
  css: [above && hideAboveQueries[above], below && hideBelowQueries[below], resolvedStyles.emotion]
37
39
  }, children);
@@ -34,7 +34,9 @@ var Show = exports.Show = function Show(_ref) {
34
34
  AsElement = _ref$as === void 0 ? 'div' : _ref$as,
35
35
  xcss = _ref.xcss;
36
36
  var resolvedStyles = (0, _xcss.parseXcss)(xcss);
37
- return (0, _react.jsx)(AsElement, {
37
+ return (0, _react.jsx)(AsElement
38
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
39
+ , {
38
40
  className: resolvedStyles.static,
39
41
  css: [defaultHiddenStyles, above && showAboveQueries[above], below && showBelowQueries[below], resolvedStyles.emotion]
40
42
  }, children);
@@ -62,7 +62,7 @@ const Anchor = ({
62
62
  action: 'clicked',
63
63
  componentName: componentName || 'Anchor',
64
64
  packageName: "@atlaskit/primitives",
65
- packageVersion: "6.2.0",
65
+ packageVersion: "6.4.0",
66
66
  analyticsData: analyticsContext,
67
67
  actionSubject: 'link'
68
68
  });
@@ -58,6 +58,7 @@ const Bleed = /*#__PURE__*/React.memo(({
58
58
  }) => {
59
59
  const resolvedStyles = parseXcss(xcss);
60
60
  return jsx("div", {
61
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
61
62
  className: resolvedStyles.static,
62
63
  css: [baseStyles, (inline || all) && inlineBleedMap[inline || all], (block || all) && blockBleedMap[block || all],
63
64
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
@@ -46,11 +46,15 @@ export const Box = /*#__PURE__*/forwardRef(({
46
46
  const resolvedStyles = parseXcss(xcss);
47
47
  const node =
48
48
  // @ts-expect-error Expression produces a union type that is too complex to represent. I think this is unavoidable
49
- jsx(Component, _extends({
49
+ jsx(Component
50
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
51
+ , _extends({
50
52
  style: style
51
53
  // @ts-expect-error Expression produces a union type that is too complex to represent. We may be able to narrow the type here but unsure.
52
54
  ,
53
- ref: ref,
55
+ ref: ref
56
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
57
+ ,
54
58
  className: resolvedStyles.static
55
59
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
56
60
  }, safeHtmlAttributes, {
@@ -62,7 +66,10 @@ export const Box = /*#__PURE__*/forwardRef(({
62
66
  return backgroundColor ? jsx(SurfaceContext.Provider, {
63
67
  value: backgroundColor
64
68
  }, node) : node;
65
- });
69
+ }
70
+ // @ts-ignore This typescript error has been surpessed while locally enrolling `@atlaskit/primitives` into Jira
71
+ // The return type of `BoxComponent` does not match the return type of `forwardRef` in React 18
72
+ );
66
73
  export default Box;
67
74
  const baseStyles = css({
68
75
  boxSizing: 'border-box',
@@ -100,7 +100,9 @@ const Flex = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
100
100
  }, ref) => {
101
101
  const resolvedStyles = parseXcss(xcss);
102
102
  return jsx(Component, {
103
- role: role,
103
+ role: role
104
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
105
+ ,
104
106
  className: resolvedStyles.static,
105
107
  css: [baseStyles, gap && spaceStylesMap.gap[gap], columnGap && spaceStylesMap.columnGap[columnGap], rowGap && spaceStylesMap.rowGap[rowGap], alignItems && alignItemsMap[alignItems], direction && flexDirectionMap[direction], justifyContent && justifyContentMap[justifyContent], wrap && flexWrapMap[wrap],
106
108
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
@@ -161,8 +161,12 @@ const Grid = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
161
161
  }), [gridTemplateAreas, gridTemplateColumns, gridTemplateRows]);
162
162
  return jsx(Component, {
163
163
  id: id,
164
- role: role,
165
- style: style,
164
+ role: role
165
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
166
+ ,
167
+ style: style
168
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
169
+ ,
166
170
  className: resolvedStyles.static,
167
171
  css: [baseStyles, gap && spaceStylesMap.gap[gap], columnGap && spaceStylesMap.columnGap[columnGap], rowGap && spaceStylesMap.rowGap[rowGap], alignItems && alignItemsMap[alignItems], alignContent && alignContentMap[alignContent], justifyContent && justifyContentMap[justifyContent], autoFlow && gridAutoFlowMap[autoFlow],
168
172
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
@@ -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.2.0",
67
+ packageVersion: "6.4.0",
68
68
  analyticsData: analyticsContext,
69
69
  actionSubject: 'button'
70
70
  });
@@ -25,7 +25,9 @@ export const Hide = ({
25
25
  xcss
26
26
  }) => {
27
27
  const resolvedStyles = parseXcss(xcss);
28
- return jsx(AsElement, {
28
+ return jsx(AsElement
29
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
30
+ , {
29
31
  className: resolvedStyles.static,
30
32
  css: [above && hideAboveQueries[above], below && hideBelowQueries[below], resolvedStyles.emotion]
31
33
  }, children);
@@ -28,7 +28,9 @@ export const Show = ({
28
28
  xcss
29
29
  }) => {
30
30
  const resolvedStyles = parseXcss(xcss);
31
- return jsx(AsElement, {
31
+ return jsx(AsElement
32
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
33
+ , {
32
34
  className: resolvedStyles.static,
33
35
  css: [defaultHiddenStyles, above && showAboveQueries[above], below && showBelowQueries[below], resolvedStyles.emotion]
34
36
  }, children);
@@ -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.2.0",
69
+ packageVersion: "6.4.0",
70
70
  analyticsData: analyticsContext,
71
71
  actionSubject: 'link'
72
72
  });
@@ -57,6 +57,7 @@ var Bleed = /*#__PURE__*/React.memo(function (_ref) {
57
57
  xcss = _ref.xcss;
58
58
  var resolvedStyles = parseXcss(xcss);
59
59
  return jsx("div", {
60
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
60
61
  className: resolvedStyles.static,
61
62
  css: [baseStyles, (inline || all) && inlineBleedMap[inline || all], (block || all) && blockBleedMap[block || all],
62
63
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
@@ -47,11 +47,15 @@ export var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
47
47
  var resolvedStyles = parseXcss(xcss);
48
48
  var node =
49
49
  // @ts-expect-error Expression produces a union type that is too complex to represent. I think this is unavoidable
50
- jsx(Component, _extends({
50
+ jsx(Component
51
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
52
+ , _extends({
51
53
  style: style
52
54
  // @ts-expect-error Expression produces a union type that is too complex to represent. We may be able to narrow the type here but unsure.
53
55
  ,
54
- ref: ref,
56
+ ref: ref
57
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
58
+ ,
55
59
  className: resolvedStyles.static
56
60
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
57
61
  }, safeHtmlAttributes, {
@@ -63,7 +67,10 @@ export var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
63
67
  return backgroundColor ? jsx(SurfaceContext.Provider, {
64
68
  value: backgroundColor
65
69
  }, node) : node;
66
- });
70
+ }
71
+ // @ts-ignore This typescript error has been surpessed while locally enrolling `@atlaskit/primitives` into Jira
72
+ // The return type of `BoxComponent` does not match the return type of `forwardRef` in React 18
73
+ );
67
74
  export default Box;
68
75
  var baseStyles = css({
69
76
  boxSizing: 'border-box',
@@ -100,7 +100,9 @@ var Flex = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, ref) {
100
100
  xcss = _ref.xcss;
101
101
  var resolvedStyles = parseXcss(xcss);
102
102
  return jsx(Component, {
103
- role: role,
103
+ role: role
104
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
105
+ ,
104
106
  className: resolvedStyles.static,
105
107
  css: [baseStyles, gap && spaceStylesMap.gap[gap], columnGap && spaceStylesMap.columnGap[columnGap], rowGap && spaceStylesMap.rowGap[rowGap], alignItems && alignItemsMap[alignItems], direction && flexDirectionMap[direction], justifyContent && justifyContentMap[justifyContent], wrap && flexWrapMap[wrap],
106
108
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
@@ -162,8 +162,12 @@ var Grid = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, ref) {
162
162
  }, [gridTemplateAreas, gridTemplateColumns, gridTemplateRows]);
163
163
  return jsx(Component, {
164
164
  id: id,
165
- role: role,
166
- style: style,
165
+ role: role
166
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
167
+ ,
168
+ style: style
169
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
170
+ ,
167
171
  className: resolvedStyles.static,
168
172
  css: [baseStyles, gap && spaceStylesMap.gap[gap], columnGap && spaceStylesMap.columnGap[columnGap], rowGap && spaceStylesMap.rowGap[rowGap], alignItems && alignItemsMap[alignItems], alignContent && alignContentMap[alignContent], justifyContent && justifyContentMap[justifyContent], autoFlow && gridAutoFlowMap[autoFlow],
169
173
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
@@ -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.2.0",
71
+ packageVersion: "6.4.0",
72
72
  analyticsData: analyticsContext,
73
73
  actionSubject: 'button'
74
74
  });
@@ -25,7 +25,9 @@ export var Hide = function Hide(_ref) {
25
25
  AsElement = _ref$as === void 0 ? 'div' : _ref$as,
26
26
  xcss = _ref.xcss;
27
27
  var resolvedStyles = parseXcss(xcss);
28
- return jsx(AsElement, {
28
+ return jsx(AsElement
29
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
30
+ , {
29
31
  className: resolvedStyles.static,
30
32
  css: [above && hideAboveQueries[above], below && hideBelowQueries[below], resolvedStyles.emotion]
31
33
  }, children);
@@ -28,7 +28,9 @@ export var Show = function Show(_ref) {
28
28
  AsElement = _ref$as === void 0 ? 'div' : _ref$as,
29
29
  xcss = _ref.xcss;
30
30
  var resolvedStyles = parseXcss(xcss);
31
- return jsx(AsElement, {
31
+ return jsx(AsElement
32
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
33
+ , {
32
34
  className: resolvedStyles.static,
33
35
  css: [defaultHiddenStyles, above && showAboveQueries[above], below && showBelowQueries[below], resolvedStyles.emotion]
34
36
  }, children);
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import React, { ReactNode } from 'react';
2
+ import React, { type ReactNode } from 'react';
3
3
  import { jsx } from '@emotion/react';
4
4
  import type { BasePrimitiveProps } from './types';
5
5
  export type BleedProps = {