@atlaskit/primitives 12.1.2 → 12.2.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 +18 -0
- package/dist/cjs/components/anchor.js +1 -1
- package/dist/cjs/components/pressable.js +1 -1
- package/dist/cjs/responsive/use-media-query.js +2 -1
- package/dist/es2019/components/anchor.js +1 -1
- package/dist/es2019/components/pressable.js +1 -1
- package/dist/es2019/responsive/use-media-query.js +2 -1
- package/dist/esm/components/anchor.js +1 -1
- package/dist/esm/components/pressable.js +1 -1
- package/dist/esm/responsive/use-media-query.js +2 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/primitives
|
|
2
2
|
|
|
3
|
+
## 12.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 12.2.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#143323](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/143323)
|
|
14
|
+
[`4fdf6347eb506`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4fdf6347eb506) -
|
|
15
|
+
Add new entrypoint called "use-layout-effect" to ds-lib and use it inside primitives pkg.
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 12.1.2
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -100,7 +100,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
|
|
|
100
100
|
action: 'clicked',
|
|
101
101
|
componentName: componentName || 'Anchor',
|
|
102
102
|
packageName: "@atlaskit/primitives",
|
|
103
|
-
packageVersion: "12.1
|
|
103
|
+
packageVersion: "12.2.1",
|
|
104
104
|
analyticsData: analyticsContext,
|
|
105
105
|
actionSubject: 'link'
|
|
106
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
|
|
98
|
+
packageVersion: "12.2.1",
|
|
99
99
|
analyticsData: analyticsContext,
|
|
100
100
|
actionSubject: 'button'
|
|
101
101
|
});
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.UNSAFE_useMediaQuery = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _bindEventListener = require("bind-event-listener");
|
|
9
|
+
var _useLayoutEffect = require("@atlaskit/ds-lib/use-layout-effect");
|
|
9
10
|
var _mediaHelper = require("./media-helper");
|
|
10
11
|
var _window, _window$matchMedia, _window2, _window2$matchMedia, _window3, _window3$matchMedia, _window4, _window4$matchMedia, _window5, _window5$matchMedia, _window6, _window6$matchMedia, _window7, _window7$matchMedia, _window8, _window8$matchMedia, _window9, _window9$matchMedia, _window10, _window10$matchMedia, _window11, _window11$matchMedia;
|
|
11
12
|
var queries = {
|
|
@@ -58,7 +59,7 @@ var UNSAFE_useMediaQuery = exports.UNSAFE_useMediaQuery = function UNSAFE_useMed
|
|
|
58
59
|
* The `matchMedia(…)` return value for our breakpoint query.
|
|
59
60
|
*/
|
|
60
61
|
var mq = queries[queryString];
|
|
61
|
-
(0,
|
|
62
|
+
(0, _useLayoutEffect.useLayoutEffect)(function () {
|
|
62
63
|
listenerRef.current = listener; // Bind the listener now in case the `useEffect` hasn't fired above yet
|
|
63
64
|
if (!mq || !hasListener || !listenerRef.current) {
|
|
64
65
|
return;
|
|
@@ -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.2.1",
|
|
89
89
|
analyticsData: analyticsContext,
|
|
90
90
|
actionSubject: 'button'
|
|
91
91
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
var _window, _window$matchMedia, _window2, _window2$matchMedia, _window3, _window3$matchMedia, _window4, _window4$matchMedia, _window5, _window5$matchMedia, _window6, _window6$matchMedia, _window7, _window7$matchMedia, _window8, _window8$matchMedia, _window9, _window9$matchMedia, _window10, _window10$matchMedia, _window11, _window11$matchMedia;
|
|
2
|
-
import { useEffect,
|
|
2
|
+
import { useEffect, useRef } from 'react';
|
|
3
3
|
import { bind } from 'bind-event-listener';
|
|
4
|
+
import { useLayoutEffect } from '@atlaskit/ds-lib/use-layout-effect';
|
|
4
5
|
import { UNSAFE_media } from './media-helper';
|
|
5
6
|
const queries = {
|
|
6
7
|
'above.xxs': typeof window === 'undefined' ? undefined : (_window = window) === null || _window === void 0 ? void 0 : (_window$matchMedia = _window.matchMedia) === null || _window$matchMedia === void 0 ? void 0 : _window$matchMedia.call(_window, UNSAFE_media.above.xxs.replace('@media ', '').trim()),
|
|
@@ -94,7 +94,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
|
|
|
94
94
|
action: 'clicked',
|
|
95
95
|
componentName: componentName || 'Anchor',
|
|
96
96
|
packageName: "@atlaskit/primitives",
|
|
97
|
-
packageVersion: "12.1
|
|
97
|
+
packageVersion: "12.2.1",
|
|
98
98
|
analyticsData: analyticsContext,
|
|
99
99
|
actionSubject: 'link'
|
|
100
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.2.1",
|
|
93
93
|
analyticsData: analyticsContext,
|
|
94
94
|
actionSubject: 'button'
|
|
95
95
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
var _window, _window$matchMedia, _window2, _window2$matchMedia, _window3, _window3$matchMedia, _window4, _window4$matchMedia, _window5, _window5$matchMedia, _window6, _window6$matchMedia, _window7, _window7$matchMedia, _window8, _window8$matchMedia, _window9, _window9$matchMedia, _window10, _window10$matchMedia, _window11, _window11$matchMedia;
|
|
2
|
-
import { useEffect,
|
|
2
|
+
import { useEffect, useRef } from 'react';
|
|
3
3
|
import { bind } from 'bind-event-listener';
|
|
4
|
+
import { useLayoutEffect } from '@atlaskit/ds-lib/use-layout-effect';
|
|
4
5
|
import { UNSAFE_media } from './media-helper';
|
|
5
6
|
var queries = {
|
|
6
7
|
'above.xxs': typeof window === 'undefined' ? undefined : (_window = window) === null || _window === void 0 || (_window$matchMedia = _window.matchMedia) === null || _window$matchMedia === void 0 ? void 0 : _window$matchMedia.call(_window, UNSAFE_media.above.xxs.replace('@media ', '').trim()),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/primitives",
|
|
3
|
-
"version": "12.1
|
|
3
|
+
"version": "12.2.1",
|
|
4
4
|
"description": "Primitives are token-backed low-level building blocks.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -115,9 +115,9 @@
|
|
|
115
115
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
116
116
|
"@atlaskit/app-provider": "^1.4.0",
|
|
117
117
|
"@atlaskit/css": "^0.5.0",
|
|
118
|
-
"@atlaskit/ds-lib": "^2.
|
|
118
|
+
"@atlaskit/ds-lib": "^2.6.0",
|
|
119
119
|
"@atlaskit/interaction-context": "^2.1.0",
|
|
120
|
-
"@atlaskit/tokens": "^
|
|
120
|
+
"@atlaskit/tokens": "^2.0.0",
|
|
121
121
|
"@atlaskit/visually-hidden": "^1.5.0",
|
|
122
122
|
"@babel/runtime": "^7.0.0",
|
|
123
123
|
"@emotion/react": "^11.7.1",
|