@atlaskit/page-layout 3.12.0 → 3.12.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 +12 -0
- package/dist/cjs/components/skip-links/skip-link-components.js +6 -6
- package/dist/esm/components/skip-links/skip-link-components.js +6 -6
- package/dist/types/components/slots/slot-dimensions.d.ts +2 -2
- package/dist/types-ts4.5/components/slots/slot-dimensions.d.ts +2 -2
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -52,11 +52,11 @@ var skipLinkListStyles = (0, _react.css)({
|
|
|
52
52
|
var skipLinkListItemStyles = (0, _react.css)({
|
|
53
53
|
marginBlockStart: 0
|
|
54
54
|
});
|
|
55
|
-
var
|
|
55
|
+
var _assignIndex = function assignIndex(num, arr) {
|
|
56
56
|
if (!arr.includes(num)) {
|
|
57
57
|
return num;
|
|
58
58
|
}
|
|
59
|
-
return
|
|
59
|
+
return _assignIndex(num + 1, arr);
|
|
60
60
|
};
|
|
61
61
|
|
|
62
62
|
/**
|
|
@@ -86,7 +86,7 @@ var SkipLinkWrapper = exports.SkipLinkWrapper = function SkipLinkWrapper(_ref) {
|
|
|
86
86
|
var regularLinksWithIdx = arr.filter(function (link) {
|
|
87
87
|
return link.listIndex === undefined;
|
|
88
88
|
}).map(function (link, idx, currArr) {
|
|
89
|
-
var listIndex =
|
|
89
|
+
var listIndex = _assignIndex(idx, usedIndexes);
|
|
90
90
|
usedIndexes.push(listIndex);
|
|
91
91
|
return _objectSpread(_objectSpread({}, link), {}, {
|
|
92
92
|
listIndex: listIndex
|
|
@@ -134,11 +134,11 @@ var SkipLinkWrapper = exports.SkipLinkWrapper = function SkipLinkWrapper(_ref) {
|
|
|
134
134
|
})))
|
|
135
135
|
);
|
|
136
136
|
};
|
|
137
|
-
var
|
|
137
|
+
var _handleBlur = function handleBlur(event) {
|
|
138
138
|
// @ts-ignore
|
|
139
139
|
event.target.removeAttribute('tabindex');
|
|
140
140
|
// @ts-ignore
|
|
141
|
-
event.target.removeEventListener('blur',
|
|
141
|
+
event.target.removeEventListener('blur', _handleBlur);
|
|
142
142
|
};
|
|
143
143
|
var focusTargetRef = function focusTargetRef(href) {
|
|
144
144
|
return function (event) {
|
|
@@ -155,7 +155,7 @@ var focusTargetRef = function focusTargetRef(href) {
|
|
|
155
155
|
if (targetRef) {
|
|
156
156
|
targetRef.setAttribute('tabindex', '-1');
|
|
157
157
|
// @ts-ignore
|
|
158
|
-
targetRef.addEventListener('blur',
|
|
158
|
+
targetRef.addEventListener('blur', _handleBlur);
|
|
159
159
|
// @ts-ignore
|
|
160
160
|
targetRef.focus();
|
|
161
161
|
document.activeElement && document.activeElement.scrollIntoView({
|
|
@@ -49,11 +49,11 @@ var skipLinkListStyles = css({
|
|
|
49
49
|
var skipLinkListItemStyles = css({
|
|
50
50
|
marginBlockStart: 0
|
|
51
51
|
});
|
|
52
|
-
var
|
|
52
|
+
var _assignIndex = function assignIndex(num, arr) {
|
|
53
53
|
if (!arr.includes(num)) {
|
|
54
54
|
return num;
|
|
55
55
|
}
|
|
56
|
-
return
|
|
56
|
+
return _assignIndex(num + 1, arr);
|
|
57
57
|
};
|
|
58
58
|
|
|
59
59
|
/**
|
|
@@ -83,7 +83,7 @@ export var SkipLinkWrapper = function SkipLinkWrapper(_ref) {
|
|
|
83
83
|
var regularLinksWithIdx = arr.filter(function (link) {
|
|
84
84
|
return link.listIndex === undefined;
|
|
85
85
|
}).map(function (link, idx, currArr) {
|
|
86
|
-
var listIndex =
|
|
86
|
+
var listIndex = _assignIndex(idx, usedIndexes);
|
|
87
87
|
usedIndexes.push(listIndex);
|
|
88
88
|
return _objectSpread(_objectSpread({}, link), {}, {
|
|
89
89
|
listIndex: listIndex
|
|
@@ -131,11 +131,11 @@ export var SkipLinkWrapper = function SkipLinkWrapper(_ref) {
|
|
|
131
131
|
})))
|
|
132
132
|
);
|
|
133
133
|
};
|
|
134
|
-
var
|
|
134
|
+
var _handleBlur = function handleBlur(event) {
|
|
135
135
|
// @ts-ignore
|
|
136
136
|
event.target.removeAttribute('tabindex');
|
|
137
137
|
// @ts-ignore
|
|
138
|
-
event.target.removeEventListener('blur',
|
|
138
|
+
event.target.removeEventListener('blur', _handleBlur);
|
|
139
139
|
};
|
|
140
140
|
var focusTargetRef = function focusTargetRef(href) {
|
|
141
141
|
return function (event) {
|
|
@@ -152,7 +152,7 @@ var focusTargetRef = function focusTargetRef(href) {
|
|
|
152
152
|
if (targetRef) {
|
|
153
153
|
targetRef.setAttribute('tabindex', '-1');
|
|
154
154
|
// @ts-ignore
|
|
155
|
-
targetRef.addEventListener('blur',
|
|
155
|
+
targetRef.addEventListener('blur', _handleBlur);
|
|
156
156
|
// @ts-ignore
|
|
157
157
|
targetRef.focus();
|
|
158
158
|
document.activeElement && document.activeElement.scrollIntoView({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
interface SlotDimensionsProps {
|
|
3
3
|
variableName: string;
|
|
4
4
|
value?: number;
|
|
@@ -7,5 +7,5 @@ interface SlotDimensionsProps {
|
|
|
7
7
|
/**
|
|
8
8
|
* Hoists slot dimension styles to the root element.
|
|
9
9
|
*/
|
|
10
|
-
declare const SlotDimensions: ({ variableName, value, mobileValue }: SlotDimensionsProps) => JSX.Element;
|
|
10
|
+
declare const SlotDimensions: ({ variableName, value, mobileValue }: SlotDimensionsProps) => React.JSX.Element;
|
|
11
11
|
export default SlotDimensions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
interface SlotDimensionsProps {
|
|
3
3
|
variableName: string;
|
|
4
4
|
value?: number;
|
|
@@ -7,5 +7,5 @@ interface SlotDimensionsProps {
|
|
|
7
7
|
/**
|
|
8
8
|
* Hoists slot dimension styles to the root element.
|
|
9
9
|
*/
|
|
10
|
-
declare const SlotDimensions: ({ variableName, value, mobileValue }: SlotDimensionsProps) => JSX.Element;
|
|
10
|
+
declare const SlotDimensions: ({ variableName, value, mobileValue }: SlotDimensionsProps) => React.JSX.Element;
|
|
11
11
|
export default SlotDimensions;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/page-layout",
|
|
3
|
-
"version": "3.12.
|
|
3
|
+
"version": "3.12.2",
|
|
4
4
|
"description": "A collection of components which let you compose an application's page layout.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"homepage": "https://atlassian.design/components/page-layout/",
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@atlaskit/ds-lib": "^3.5.0",
|
|
45
|
-
"@atlaskit/icon": "^23.
|
|
45
|
+
"@atlaskit/icon": "^23.7.0",
|
|
46
46
|
"@atlaskit/link": "^2.1.0",
|
|
47
47
|
"@atlaskit/motion": "^1.10.0",
|
|
48
|
-
"@atlaskit/platform-feature-flags": "^0.
|
|
48
|
+
"@atlaskit/platform-feature-flags": "^1.0.0",
|
|
49
49
|
"@atlaskit/primitives": "^13.4.0",
|
|
50
|
-
"@atlaskit/theme": "^
|
|
50
|
+
"@atlaskit/theme": "^15.0.0",
|
|
51
51
|
"@atlaskit/tokens": "^3.3.0",
|
|
52
52
|
"@babel/runtime": "^7.0.0",
|
|
53
53
|
"@emotion/react": "^11.7.1",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@atlaskit/notification-indicator": "^9.5.0",
|
|
70
70
|
"@atlaskit/notification-log-client": "^6.2.0",
|
|
71
71
|
"@atlaskit/popup": "^1.31.0",
|
|
72
|
-
"@atlaskit/side-navigation": "^4.
|
|
72
|
+
"@atlaskit/side-navigation": "^4.2.0",
|
|
73
73
|
"@atlaskit/ssr": "*",
|
|
74
74
|
"@atlaskit/toggle": "^14.1.0",
|
|
75
75
|
"@atlaskit/tooltip": "^19.1.0",
|