@atlaskit/primitives 12.1.0 → 12.1.1

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,14 @@
1
1
  # @atlaskit/primitives
2
2
 
3
+ ## 12.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#137821](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/137821)
8
+ [`94620325283df`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/94620325283df) -
9
+ Remove `react-uid` and use an ID generator that is compatible with React16 and React 18; Strict
10
+ React 18 behind a flag.
11
+
3
12
  ## 12.1.0
4
13
 
5
14
  ### Minor Changes
@@ -10,11 +10,11 @@ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
10
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
11
  var _react = require("react");
12
12
  var _react2 = require("@emotion/react");
13
- var _reactUid = require("react-uid");
14
13
  var _tinyInvariant = _interopRequireDefault(require("tiny-invariant"));
15
14
  var _analyticsNext = require("@atlaskit/analytics-next");
16
15
  var _appProvider = require("@atlaskit/app-provider");
17
16
  var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
17
+ var _reactUid = require("@atlaskit/ds-lib/react-uid");
18
18
  var _interactionContext = _interopRequireDefault(require("@atlaskit/interaction-context"));
19
19
  var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
20
20
  var _styleMaps = require("../xcss/style-maps.partial");
@@ -94,18 +94,13 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
94
94
  interactionContext && interactionContext.tracePress(interactionName, e.timeStamp);
95
95
  providedOnClick(e, analyticsEvent);
96
96
  }, [providedOnClick, interactionContext, interactionName]);
97
-
98
- // TODO: Use React 18's useId() hook when we update.
99
- // eslint-disable-next-line @repo/internal/react/disallow-unstable-values
100
- var opensNewWindowLabelId = (0, _reactUid.uid)({
101
- ariaLabelledBy: ariaLabelledBy
102
- });
97
+ var opensNewWindowLabelId = (0, _reactUid.useId)();
103
98
  var onClick = (0, _analyticsNext.usePlatformLeafEventHandler)({
104
99
  fn: handleClick,
105
100
  action: 'clicked',
106
101
  componentName: componentName || 'Anchor',
107
102
  packageName: "@atlaskit/primitives",
108
- packageVersion: "12.1.0",
103
+ packageVersion: "12.1.1",
109
104
  analyticsData: analyticsContext,
110
105
  actionSubject: 'link'
111
106
  });
@@ -95,7 +95,7 @@ var Pressable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
95
95
  action: 'clicked',
96
96
  componentName: componentName || 'Pressable',
97
97
  packageName: "@atlaskit/primitives",
98
- packageVersion: "12.1.0",
98
+ packageVersion: "12.1.1",
99
99
  analyticsData: analyticsContext,
100
100
  actionSubject: 'button'
101
101
  });
@@ -7,11 +7,11 @@ import { forwardRef, useCallback, useContext } from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { css, jsx } from '@emotion/react';
10
- import { uid } from 'react-uid';
11
10
  import invariant from 'tiny-invariant';
12
11
  import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
13
12
  import { useRouterLink } from '@atlaskit/app-provider';
14
13
  import noop from '@atlaskit/ds-lib/noop';
14
+ import { useId } from '@atlaskit/ds-lib/react-uid';
15
15
  import InteractionContext from '@atlaskit/interaction-context';
16
16
  import VisuallyHidden from '@atlaskit/visually-hidden';
17
17
  import { backgroundColorStylesMap, borderColorMap, borderWidthMap, paddingStylesMap, positiveSpaceMap } from '../xcss/style-maps.partial';
@@ -84,18 +84,13 @@ const AnchorNoRef = ({
84
84
  interactionContext && interactionContext.tracePress(interactionName, e.timeStamp);
85
85
  providedOnClick(e, analyticsEvent);
86
86
  }, [providedOnClick, interactionContext, interactionName]);
87
-
88
- // TODO: Use React 18's useId() hook when we update.
89
- // eslint-disable-next-line @repo/internal/react/disallow-unstable-values
90
- const opensNewWindowLabelId = uid({
91
- ariaLabelledBy
92
- });
87
+ const opensNewWindowLabelId = useId();
93
88
  const onClick = usePlatformLeafEventHandler({
94
89
  fn: handleClick,
95
90
  action: 'clicked',
96
91
  componentName: componentName || 'Anchor',
97
92
  packageName: "@atlaskit/primitives",
98
- packageVersion: "12.1.0",
93
+ packageVersion: "12.1.1",
99
94
  analyticsData: analyticsContext,
100
95
  actionSubject: 'link'
101
96
  });
@@ -85,7 +85,7 @@ const Pressable = /*#__PURE__*/forwardRef(({
85
85
  action: 'clicked',
86
86
  componentName: componentName || 'Pressable',
87
87
  packageName: "@atlaskit/primitives",
88
- packageVersion: "12.1.0",
88
+ packageVersion: "12.1.1",
89
89
  analyticsData: analyticsContext,
90
90
  actionSubject: 'button'
91
91
  });
@@ -11,11 +11,11 @@ import { forwardRef, useCallback, useContext } from 'react';
11
11
 
12
12
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
13
13
  import { css, jsx } from '@emotion/react';
14
- import { uid } from 'react-uid';
15
14
  import invariant from 'tiny-invariant';
16
15
  import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
17
16
  import { useRouterLink } from '@atlaskit/app-provider';
18
17
  import noop from '@atlaskit/ds-lib/noop';
18
+ import { useId } from '@atlaskit/ds-lib/react-uid';
19
19
  import InteractionContext from '@atlaskit/interaction-context';
20
20
  import VisuallyHidden from '@atlaskit/visually-hidden';
21
21
  import { backgroundColorStylesMap, borderColorMap, borderWidthMap, paddingStylesMap, positiveSpaceMap } from '../xcss/style-maps.partial';
@@ -88,18 +88,13 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
88
88
  interactionContext && interactionContext.tracePress(interactionName, e.timeStamp);
89
89
  providedOnClick(e, analyticsEvent);
90
90
  }, [providedOnClick, interactionContext, interactionName]);
91
-
92
- // TODO: Use React 18's useId() hook when we update.
93
- // eslint-disable-next-line @repo/internal/react/disallow-unstable-values
94
- var opensNewWindowLabelId = uid({
95
- ariaLabelledBy: ariaLabelledBy
96
- });
91
+ var opensNewWindowLabelId = useId();
97
92
  var onClick = usePlatformLeafEventHandler({
98
93
  fn: handleClick,
99
94
  action: 'clicked',
100
95
  componentName: componentName || 'Anchor',
101
96
  packageName: "@atlaskit/primitives",
102
- packageVersion: "12.1.0",
97
+ packageVersion: "12.1.1",
103
98
  analyticsData: analyticsContext,
104
99
  actionSubject: 'link'
105
100
  });
@@ -89,7 +89,7 @@ var Pressable = /*#__PURE__*/forwardRef(function (_ref, ref) {
89
89
  action: 'clicked',
90
90
  componentName: componentName || 'Pressable',
91
91
  packageName: "@atlaskit/primitives",
92
- packageVersion: "12.1.0",
92
+ packageVersion: "12.1.1",
93
93
  analyticsData: analyticsContext,
94
94
  actionSubject: 'button'
95
95
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "12.1.0",
3
+ "version": "12.1.1",
4
4
  "description": "Primitives are token-backed low-level building blocks.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -16,11 +16,6 @@
16
16
  "atlaskit:src": "src/index.tsx",
17
17
  "atlassian": {
18
18
  "team": "Design System Team",
19
- "productPushConsumption": [
20
- "jira"
21
- ],
22
- "inPublicMirror": false,
23
- "releaseModel": "continuous",
24
19
  "website": {
25
20
  "category": "Primitives",
26
21
  "name": "Primitives",
@@ -128,7 +123,6 @@
128
123
  "@emotion/react": "^11.7.1",
129
124
  "@emotion/serialize": "^1.1.0",
130
125
  "bind-event-listener": "^3.0.0",
131
- "react-uid": "^2.2.0",
132
126
  "tiny-invariant": "^1.2.0"
133
127
  },
134
128
  "peerDependencies": {
@@ -138,7 +132,7 @@
138
132
  "@af/accessibility-testing": "*",
139
133
  "@af/formatting": "*",
140
134
  "@atlaskit/ssr": "*",
141
- "@atlaskit/toggle": "^13.3.0",
135
+ "@atlaskit/toggle": "^13.4.0",
142
136
  "@atlaskit/tooltip": "^18.7.0",
143
137
  "@atlaskit/visual-regression": "*",
144
138
  "@atlassian/codegen": "^0.1.0",