@atlaskit/primitives 14.14.0 → 14.14.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 +7 -0
- package/dist/cjs/compiled/components/anchor.js +1 -2
- package/dist/cjs/components/anchor.js +1 -2
- package/dist/es2019/compiled/components/anchor.js +1 -2
- package/dist/es2019/components/anchor.js +1 -2
- package/dist/esm/compiled/components/anchor.js +1 -2
- package/dist/esm/components/anchor.js +1 -2
- package/package.json +1 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/primitives
|
|
2
2
|
|
|
3
|
+
## 14.14.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`e5f0ae472aa1f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e5f0ae472aa1f) -
|
|
8
|
+
Fix issue with positioning in the anchor primitive.
|
|
9
|
+
|
|
3
10
|
## 14.14.0
|
|
4
11
|
|
|
5
12
|
### Minor Changes
|
|
@@ -21,7 +21,6 @@ var _appProvider = require("@atlaskit/app-provider");
|
|
|
21
21
|
var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
22
22
|
var _useId = require("@atlaskit/ds-lib/use-id");
|
|
23
23
|
var _interactionContext = _interopRequireDefault(require("@atlaskit/interaction-context"));
|
|
24
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
25
24
|
var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
|
|
26
25
|
var _focusable = _interopRequireDefault(require("./focusable"));
|
|
27
26
|
var _excluded = ["href", "children", "onClick", "interactionName", "componentName", "analyticsContext", "aria-label", "aria-labelledby", "style", "target", "testId", "xcss", "newWindowLabel"],
|
|
@@ -111,7 +110,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
|
|
|
111
110
|
onClick: onClick,
|
|
112
111
|
"aria-label": ariaLabel && target === '_blank' && !ariaLabelledBy ? "".concat(ariaLabel, " , ").concat(newWindowLabel) : ariaLabel,
|
|
113
112
|
"aria-labelledby": ariaLabelledBy && target === '_blank' ? "".concat(ariaLabelledBy, " ").concat(opensNewWindowLabelId) : ariaLabelledBy,
|
|
114
|
-
xcss: (0, _react2.cx)(styles.root,
|
|
113
|
+
xcss: (0, _react2.cx)(styles.root, styles.position, xcss),
|
|
115
114
|
testId: testId,
|
|
116
115
|
"data-is-router-link": testId ? isRouterLink ? 'true' : 'false' : undefined
|
|
117
116
|
}), children, target === '_blank' && (children && !ariaLabel && !ariaLabelledBy || ariaLabelledBy) && /*#__PURE__*/React.createElement(_visuallyHidden.default, {
|
|
@@ -17,7 +17,6 @@ var _appProvider = require("@atlaskit/app-provider");
|
|
|
17
17
|
var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
18
18
|
var _useId = require("@atlaskit/ds-lib/use-id");
|
|
19
19
|
var _interactionContext = _interopRequireDefault(require("@atlaskit/interaction-context"));
|
|
20
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
21
20
|
var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
|
|
22
21
|
var _styleMaps = require("../xcss/style-maps.partial");
|
|
23
22
|
var _xcss = require("../xcss/xcss");
|
|
@@ -147,7 +146,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
|
|
|
147
146
|
"aria-label": ariaLabel && target === '_blank' && !ariaLabelledBy ? //`${ariaLabel} ${OPENS_NEW_WINDOW_LABEL}`
|
|
148
147
|
"".concat(ariaLabel, " , ").concat(newWindowLabel ? newWindowLabel : OPENS_NEW_WINDOW_LABEL) : ariaLabel,
|
|
149
148
|
"aria-labelledby": ariaLabelledBy && target === '_blank' ? "".concat(ariaLabelledBy, " ").concat(opensNewWindowLabelId) : ariaLabelledBy,
|
|
150
|
-
css: [baseStyles,
|
|
149
|
+
css: [baseStyles, positionStyles, focusRingStyles,
|
|
151
150
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
152
151
|
backgroundColor && _styleMaps.backgroundColorStylesMap[backgroundColor],
|
|
153
152
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
@@ -11,7 +11,6 @@ import { useRouterLink } from '@atlaskit/app-provider';
|
|
|
11
11
|
import noop from '@atlaskit/ds-lib/noop';
|
|
12
12
|
import { useId } from '@atlaskit/ds-lib/use-id';
|
|
13
13
|
import InteractionContext from '@atlaskit/interaction-context';
|
|
14
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
14
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
16
15
|
import Focusable from './focusable';
|
|
17
16
|
const styles = {
|
|
@@ -99,7 +98,7 @@ const AnchorNoRef = ({
|
|
|
99
98
|
onClick: onClick,
|
|
100
99
|
"aria-label": ariaLabel && target === '_blank' && !ariaLabelledBy ? `${ariaLabel} , ${newWindowLabel}` : ariaLabel,
|
|
101
100
|
"aria-labelledby": ariaLabelledBy && target === '_blank' ? `${ariaLabelledBy} ${opensNewWindowLabelId}` : ariaLabelledBy,
|
|
102
|
-
xcss: cx(styles.root,
|
|
101
|
+
xcss: cx(styles.root, styles.position, xcss),
|
|
103
102
|
testId: testId,
|
|
104
103
|
"data-is-router-link": testId ? isRouterLink ? 'true' : 'false' : undefined
|
|
105
104
|
}), children, target === '_blank' && (children && !ariaLabel && !ariaLabelledBy || ariaLabelledBy) && /*#__PURE__*/React.createElement(VisuallyHidden, {
|
|
@@ -13,7 +13,6 @@ import { useRouterLink } from '@atlaskit/app-provider';
|
|
|
13
13
|
import noop from '@atlaskit/ds-lib/noop';
|
|
14
14
|
import { useId } from '@atlaskit/ds-lib/use-id';
|
|
15
15
|
import InteractionContext from '@atlaskit/interaction-context';
|
|
16
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
16
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
18
17
|
import { backgroundColorStylesMap, borderColorMap, borderWidthMap, paddingStylesMap, positiveSpaceMap } from '../xcss/style-maps.partial';
|
|
19
18
|
import { parseXcss } from '../xcss/xcss';
|
|
@@ -139,7 +138,7 @@ const AnchorNoRef = ({
|
|
|
139
138
|
//`${ariaLabel} ${OPENS_NEW_WINDOW_LABEL}`
|
|
140
139
|
`${ariaLabel} , ${newWindowLabel ? newWindowLabel : OPENS_NEW_WINDOW_LABEL}` : ariaLabel,
|
|
141
140
|
"aria-labelledby": ariaLabelledBy && target === '_blank' ? `${ariaLabelledBy} ${opensNewWindowLabelId}` : ariaLabelledBy,
|
|
142
|
-
css: [baseStyles,
|
|
141
|
+
css: [baseStyles, positionStyles, focusRingStyles,
|
|
143
142
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
144
143
|
backgroundColor && backgroundColorStylesMap[backgroundColor],
|
|
145
144
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
@@ -15,7 +15,6 @@ import { useRouterLink } from '@atlaskit/app-provider';
|
|
|
15
15
|
import noop from '@atlaskit/ds-lib/noop';
|
|
16
16
|
import { useId } from '@atlaskit/ds-lib/use-id';
|
|
17
17
|
import InteractionContext from '@atlaskit/interaction-context';
|
|
18
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
18
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
20
19
|
import Focusable from './focusable';
|
|
21
20
|
var styles = {
|
|
@@ -102,7 +101,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
|
|
|
102
101
|
onClick: onClick,
|
|
103
102
|
"aria-label": ariaLabel && target === '_blank' && !ariaLabelledBy ? "".concat(ariaLabel, " , ").concat(newWindowLabel) : ariaLabel,
|
|
104
103
|
"aria-labelledby": ariaLabelledBy && target === '_blank' ? "".concat(ariaLabelledBy, " ").concat(opensNewWindowLabelId) : ariaLabelledBy,
|
|
105
|
-
xcss: cx(styles.root,
|
|
104
|
+
xcss: cx(styles.root, styles.position, xcss),
|
|
106
105
|
testId: testId,
|
|
107
106
|
"data-is-router-link": testId ? isRouterLink ? 'true' : 'false' : undefined
|
|
108
107
|
}), children, target === '_blank' && (children && !ariaLabel && !ariaLabelledBy || ariaLabelledBy) && /*#__PURE__*/React.createElement(VisuallyHidden, {
|
|
@@ -18,7 +18,6 @@ import { useRouterLink } from '@atlaskit/app-provider';
|
|
|
18
18
|
import noop from '@atlaskit/ds-lib/noop';
|
|
19
19
|
import { useId } from '@atlaskit/ds-lib/use-id';
|
|
20
20
|
import InteractionContext from '@atlaskit/interaction-context';
|
|
21
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
21
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
23
22
|
import { backgroundColorStylesMap, borderColorMap, borderWidthMap, paddingStylesMap, positiveSpaceMap } from '../xcss/style-maps.partial';
|
|
24
23
|
import { parseXcss } from '../xcss/xcss';
|
|
@@ -141,7 +140,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
|
|
|
141
140
|
"aria-label": ariaLabel && target === '_blank' && !ariaLabelledBy ? //`${ariaLabel} ${OPENS_NEW_WINDOW_LABEL}`
|
|
142
141
|
"".concat(ariaLabel, " , ").concat(newWindowLabel ? newWindowLabel : OPENS_NEW_WINDOW_LABEL) : ariaLabel,
|
|
143
142
|
"aria-labelledby": ariaLabelledBy && target === '_blank' ? "".concat(ariaLabelledBy, " ").concat(opensNewWindowLabelId) : ariaLabelledBy,
|
|
144
|
-
css: [baseStyles,
|
|
143
|
+
css: [baseStyles, positionStyles, focusRingStyles,
|
|
145
144
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
146
145
|
backgroundColor && backgroundColorStylesMap[backgroundColor],
|
|
147
146
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/primitives",
|
|
3
|
-
"version": "14.14.
|
|
3
|
+
"version": "14.14.1",
|
|
4
4
|
"description": "Primitives are token-backed low-level building blocks.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -137,7 +137,6 @@
|
|
|
137
137
|
"@atlaskit/css": "^0.14.0",
|
|
138
138
|
"@atlaskit/ds-lib": "^5.0.0",
|
|
139
139
|
"@atlaskit/interaction-context": "^3.0.0",
|
|
140
|
-
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
141
140
|
"@atlaskit/tokens": "^6.3.0",
|
|
142
141
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
143
142
|
"@babel/runtime": "^7.0.0",
|
|
@@ -221,10 +220,5 @@
|
|
|
221
220
|
"dist/types-ts4.5/index.d.ts"
|
|
222
221
|
]
|
|
223
222
|
}
|
|
224
|
-
},
|
|
225
|
-
"platform-feature-flags": {
|
|
226
|
-
"platform_design-system-team_anchor-positioning": {
|
|
227
|
-
"type": "boolean"
|
|
228
|
-
}
|
|
229
223
|
}
|
|
230
224
|
}
|