@atlaskit/primitives 12.1.0 → 12.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/cjs/components/anchor.js +3 -8
- package/dist/cjs/components/inline.js +1 -1
- package/dist/cjs/components/pressable.js +1 -1
- package/dist/cjs/xcss/xcss.js +3 -3
- package/dist/es2019/components/anchor.js +3 -8
- package/dist/es2019/components/pressable.js +1 -1
- package/dist/esm/components/anchor.js +3 -8
- package/dist/esm/components/pressable.js +1 -1
- package/dist/esm/xcss/xcss.js +3 -3
- package/package.json +4 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/primitives
|
|
2
2
|
|
|
3
|
+
## 12.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 12.1.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#137821](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/137821)
|
|
14
|
+
[`94620325283df`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/94620325283df) -
|
|
15
|
+
Remove `react-uid` and use an ID generator that is compatible with React16 and React 18; Strict
|
|
16
|
+
React 18 behind a flag.
|
|
17
|
+
|
|
3
18
|
## 12.1.0
|
|
4
19
|
|
|
5
20
|
### 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.
|
|
103
|
+
packageVersion: "12.1.2",
|
|
109
104
|
analyticsData: analyticsContext,
|
|
110
105
|
actionSubject: 'link'
|
|
111
106
|
});
|
|
@@ -12,7 +12,7 @@ var _react2 = require("@emotion/react");
|
|
|
12
12
|
var _xcss = require("../xcss/xcss");
|
|
13
13
|
var _flex = _interopRequireDefault(require("./flex"));
|
|
14
14
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
15
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
15
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
16
|
/* eslint-disable @repo/internal/styles/no-exported-styles */
|
|
17
17
|
/**
|
|
18
18
|
* @jsxRuntime classic
|
|
@@ -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.
|
|
98
|
+
packageVersion: "12.1.2",
|
|
99
99
|
analyticsData: analyticsContext,
|
|
100
100
|
actionSubject: 'button'
|
|
101
101
|
});
|
package/dist/cjs/xcss/xcss.js
CHANGED
|
@@ -12,9 +12,9 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
12
12
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
13
13
|
var _react = require("@emotion/react");
|
|
14
14
|
var _styleMaps = require("./style-maps.partial");
|
|
15
|
-
function _createForOfIteratorHelper(
|
|
16
|
-
function _unsupportedIterableToArray(
|
|
17
|
-
function _arrayLikeToArray(
|
|
15
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
16
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
17
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
18
18
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
19
19
|
var tokensMap = exports.tokensMap = {
|
|
20
20
|
backgroundColor: _styleMaps.backgroundColorMap,
|
|
@@ -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.
|
|
93
|
+
packageVersion: "12.1.2",
|
|
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.
|
|
88
|
+
packageVersion: "12.1.2",
|
|
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.
|
|
97
|
+
packageVersion: "12.1.2",
|
|
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.
|
|
92
|
+
packageVersion: "12.1.2",
|
|
93
93
|
analyticsData: analyticsContext,
|
|
94
94
|
actionSubject: 'button'
|
|
95
95
|
});
|
package/dist/esm/xcss/xcss.js
CHANGED
|
@@ -2,9 +2,9 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
5
|
-
function _createForOfIteratorHelper(
|
|
6
|
-
function _unsupportedIterableToArray(
|
|
7
|
-
function _arrayLikeToArray(
|
|
5
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
6
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
7
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
8
8
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
10
|
import { css as cssEmotion } from '@emotion/react';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/primitives",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.2",
|
|
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",
|
|
@@ -119,16 +114,15 @@
|
|
|
119
114
|
"dependencies": {
|
|
120
115
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
121
116
|
"@atlaskit/app-provider": "^1.4.0",
|
|
122
|
-
"@atlaskit/css": "^0.
|
|
117
|
+
"@atlaskit/css": "^0.5.0",
|
|
123
118
|
"@atlaskit/ds-lib": "^2.5.0",
|
|
124
119
|
"@atlaskit/interaction-context": "^2.1.0",
|
|
125
|
-
"@atlaskit/tokens": "^1.
|
|
120
|
+
"@atlaskit/tokens": "^1.60.0",
|
|
126
121
|
"@atlaskit/visually-hidden": "^1.5.0",
|
|
127
122
|
"@babel/runtime": "^7.0.0",
|
|
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.
|
|
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",
|