@atlaskit/primitives 13.4.1 → 13.5.0
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 +9 -0
- package/dist/cjs/compiled/components/anchor.js +1 -1
- package/dist/cjs/compiled/components/pressable.js +1 -1
- package/dist/cjs/compiled/components/text.js +1 -2
- package/dist/cjs/components/anchor.js +1 -1
- package/dist/cjs/components/pressable.js +1 -1
- package/dist/cjs/components/text.js +2 -3
- package/dist/es2019/compiled/components/anchor.js +1 -1
- package/dist/es2019/compiled/components/pressable.js +1 -1
- package/dist/es2019/compiled/components/text.js +1 -2
- package/dist/es2019/components/anchor.js +1 -1
- package/dist/es2019/components/pressable.js +1 -1
- package/dist/es2019/components/text.js +2 -3
- package/dist/esm/compiled/components/anchor.js +1 -1
- package/dist/esm/compiled/components/pressable.js +1 -1
- package/dist/esm/compiled/components/text.js +1 -2
- package/dist/esm/components/anchor.js +1 -1
- package/dist/esm/components/pressable.js +1 -1
- package/dist/esm/components/text.js +2 -3
- package/package.json +1 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/primitives
|
|
2
2
|
|
|
3
|
+
## 13.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#112172](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/112172)
|
|
8
|
+
[`54699aa47995b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/54699aa47995b) -
|
|
9
|
+
[ux] Removed feature flag `platform-primitives-nested-text-inherit-size` resulting in Text to
|
|
10
|
+
inherit size when nested in other Text component.
|
|
11
|
+
|
|
3
12
|
## 13.4.1
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -70,7 +70,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
|
|
|
70
70
|
action: 'clicked',
|
|
71
71
|
componentName: componentName || 'Anchor',
|
|
72
72
|
packageName: "@atlaskit/primitives",
|
|
73
|
-
packageVersion: "13.
|
|
73
|
+
packageVersion: "13.5.0",
|
|
74
74
|
analyticsData: analyticsContext,
|
|
75
75
|
actionSubject: 'link'
|
|
76
76
|
});
|
|
@@ -60,7 +60,7 @@ var Pressable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
60
60
|
action: 'clicked',
|
|
61
61
|
componentName: componentName || 'Pressable',
|
|
62
62
|
packageName: "@atlaskit/primitives",
|
|
63
|
-
packageVersion: "13.
|
|
63
|
+
packageVersion: "13.5.0",
|
|
64
64
|
analyticsData: analyticsContext,
|
|
65
65
|
actionSubject: 'button'
|
|
66
66
|
});
|
|
@@ -12,7 +12,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var React = _react;
|
|
13
13
|
var _runtime = require("@compiled/react/runtime");
|
|
14
14
|
var _tinyInvariant = _interopRequireDefault(require("tiny-invariant"));
|
|
15
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
15
|
var _hasTextAncestorContext = require("../../utils/has-text-ancestor-context");
|
|
17
16
|
var _surfaceProvider = require("../../utils/surface-provider");
|
|
18
17
|
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); }
|
|
@@ -153,7 +152,7 @@ var Text = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
153
152
|
(0, _tinyInvariant.default)(asAllowlist.includes(Component), "@atlaskit/primitives: Text received an invalid \"as\" value of \"".concat(Component, "\""));
|
|
154
153
|
var hasTextAncestor = (0, _hasTextAncestorContext.useHasTextAncestor)();
|
|
155
154
|
var color = useColor(colorProp, hasTextAncestor);
|
|
156
|
-
if (
|
|
155
|
+
if (!size && !hasTextAncestor) {
|
|
157
156
|
size = 'medium';
|
|
158
157
|
}
|
|
159
158
|
var component = /*#__PURE__*/React.createElement(Component, {
|
|
@@ -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: "13.
|
|
103
|
+
packageVersion: "13.5.0",
|
|
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: "13.
|
|
98
|
+
packageVersion: "13.5.0",
|
|
99
99
|
analyticsData: analyticsContext,
|
|
100
100
|
actionSubject: 'button'
|
|
101
101
|
});
|
|
@@ -8,7 +8,6 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _react2 = require("@emotion/react");
|
|
10
10
|
var _tinyInvariant = _interopRequireDefault(require("tiny-invariant"));
|
|
11
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
11
|
var _hasTextAncestorContext = require("../utils/has-text-ancestor-context");
|
|
13
12
|
var _surfaceProvider = require("../utils/surface-provider");
|
|
14
13
|
var _styleMaps = require("../xcss/style-maps.partial");
|
|
@@ -100,14 +99,14 @@ var Text = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
100
99
|
(0, _tinyInvariant.default)(asAllowlist.includes(Component), "@atlaskit/primitives: Text received an invalid \"as\" value of \"".concat(Component, "\""));
|
|
101
100
|
var hasTextAncestor = (0, _hasTextAncestorContext.useHasTextAncestor)();
|
|
102
101
|
var color = useColor(colorProp, hasTextAncestor);
|
|
103
|
-
if (!
|
|
102
|
+
if (!size && !hasTextAncestor) {
|
|
104
103
|
size = 'medium';
|
|
105
104
|
}
|
|
106
105
|
var component = (0, _react2.jsx)(Component, {
|
|
107
106
|
ref: ref,
|
|
108
107
|
css: [resetStyles,
|
|
109
108
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
110
|
-
size
|
|
109
|
+
size && _styleMaps.textSizeStylesMap[size],
|
|
111
110
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
112
111
|
color && _styleMaps.textColorStylesMap[color], maxLines && truncationStyles, maxLines === 1 && wordBreakMap.breakAll, align && textAlignMap[align],
|
|
113
112
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -46,7 +46,7 @@ const Pressable = /*#__PURE__*/forwardRef(({
|
|
|
46
46
|
action: 'clicked',
|
|
47
47
|
componentName: componentName || 'Pressable',
|
|
48
48
|
packageName: "@atlaskit/primitives",
|
|
49
|
-
packageVersion: "13.
|
|
49
|
+
packageVersion: "13.5.0",
|
|
50
50
|
analyticsData: analyticsContext,
|
|
51
51
|
actionSubject: 'button'
|
|
52
52
|
});
|
|
@@ -4,7 +4,6 @@ import * as React from 'react';
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { forwardRef } from 'react';
|
|
6
6
|
import invariant from 'tiny-invariant';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import { HasTextAncestorProvider, useHasTextAncestor } from '../../utils/has-text-ancestor-context';
|
|
9
8
|
import { useSurface } from '../../utils/surface-provider';
|
|
10
9
|
const asAllowlist = ['span', 'p', 'strong', 'em'];
|
|
@@ -143,7 +142,7 @@ const Text = /*#__PURE__*/forwardRef(({
|
|
|
143
142
|
invariant(asAllowlist.includes(Component), `@atlaskit/primitives: Text received an invalid "as" value of "${Component}"`);
|
|
144
143
|
const hasTextAncestor = useHasTextAncestor();
|
|
145
144
|
const color = useColor(colorProp, hasTextAncestor);
|
|
146
|
-
if (
|
|
145
|
+
if (!size && !hasTextAncestor) {
|
|
147
146
|
size = 'medium';
|
|
148
147
|
}
|
|
149
148
|
const component = /*#__PURE__*/React.createElement(Component, {
|
|
@@ -85,7 +85,7 @@ const Pressable = /*#__PURE__*/forwardRef(({
|
|
|
85
85
|
action: 'clicked',
|
|
86
86
|
componentName: componentName || 'Pressable',
|
|
87
87
|
packageName: "@atlaskit/primitives",
|
|
88
|
-
packageVersion: "13.
|
|
88
|
+
packageVersion: "13.5.0",
|
|
89
89
|
analyticsData: analyticsContext,
|
|
90
90
|
actionSubject: 'button'
|
|
91
91
|
});
|
|
@@ -7,7 +7,6 @@ import { forwardRef } from 'react';
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import invariant from 'tiny-invariant';
|
|
10
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
10
|
import { HasTextAncestorProvider, useHasTextAncestor } from '../utils/has-text-ancestor-context';
|
|
12
11
|
import { useSurface } from '../utils/surface-provider';
|
|
13
12
|
import { inverseColorMap, textColorStylesMap, textSizeStylesMap, textWeightStylesMap } from '../xcss/style-maps.partial';
|
|
@@ -92,14 +91,14 @@ const Text = /*#__PURE__*/forwardRef(({
|
|
|
92
91
|
invariant(asAllowlist.includes(Component), `@atlaskit/primitives: Text received an invalid "as" value of "${Component}"`);
|
|
93
92
|
const hasTextAncestor = useHasTextAncestor();
|
|
94
93
|
const color = useColor(colorProp, hasTextAncestor);
|
|
95
|
-
if (!
|
|
94
|
+
if (!size && !hasTextAncestor) {
|
|
96
95
|
size = 'medium';
|
|
97
96
|
}
|
|
98
97
|
const component = jsx(Component, {
|
|
99
98
|
ref: ref,
|
|
100
99
|
css: [resetStyles,
|
|
101
100
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
102
|
-
size
|
|
101
|
+
size && textSizeStylesMap[size],
|
|
103
102
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
104
103
|
color && textColorStylesMap[color], maxLines && truncationStyles, maxLines === 1 && wordBreakMap.breakAll, align && textAlignMap[align],
|
|
105
104
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -60,7 +60,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
|
|
|
60
60
|
action: 'clicked',
|
|
61
61
|
componentName: componentName || 'Anchor',
|
|
62
62
|
packageName: "@atlaskit/primitives",
|
|
63
|
-
packageVersion: "13.
|
|
63
|
+
packageVersion: "13.5.0",
|
|
64
64
|
analyticsData: analyticsContext,
|
|
65
65
|
actionSubject: 'link'
|
|
66
66
|
});
|
|
@@ -50,7 +50,7 @@ var Pressable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
50
50
|
action: 'clicked',
|
|
51
51
|
componentName: componentName || 'Pressable',
|
|
52
52
|
packageName: "@atlaskit/primitives",
|
|
53
|
-
packageVersion: "13.
|
|
53
|
+
packageVersion: "13.5.0",
|
|
54
54
|
analyticsData: analyticsContext,
|
|
55
55
|
actionSubject: 'button'
|
|
56
56
|
});
|
|
@@ -4,7 +4,6 @@ import * as React from 'react';
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { forwardRef } from 'react';
|
|
6
6
|
import invariant from 'tiny-invariant';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import { HasTextAncestorProvider, useHasTextAncestor } from '../../utils/has-text-ancestor-context';
|
|
9
8
|
import { useSurface } from '../../utils/surface-provider';
|
|
10
9
|
var asAllowlist = ['span', 'p', 'strong', 'em'];
|
|
@@ -143,7 +142,7 @@ var Text = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
143
142
|
invariant(asAllowlist.includes(Component), "@atlaskit/primitives: Text received an invalid \"as\" value of \"".concat(Component, "\""));
|
|
144
143
|
var hasTextAncestor = useHasTextAncestor();
|
|
145
144
|
var color = useColor(colorProp, hasTextAncestor);
|
|
146
|
-
if (
|
|
145
|
+
if (!size && !hasTextAncestor) {
|
|
147
146
|
size = 'medium';
|
|
148
147
|
}
|
|
149
148
|
var component = /*#__PURE__*/React.createElement(Component, {
|
|
@@ -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: "13.
|
|
97
|
+
packageVersion: "13.5.0",
|
|
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: "13.
|
|
92
|
+
packageVersion: "13.5.0",
|
|
93
93
|
analyticsData: analyticsContext,
|
|
94
94
|
actionSubject: 'button'
|
|
95
95
|
});
|
|
@@ -7,7 +7,6 @@ import { forwardRef } from 'react';
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import invariant from 'tiny-invariant';
|
|
10
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
10
|
import { HasTextAncestorProvider, useHasTextAncestor } from '../utils/has-text-ancestor-context';
|
|
12
11
|
import { useSurface } from '../utils/surface-provider';
|
|
13
12
|
import { inverseColorMap, textColorStylesMap, textSizeStylesMap, textWeightStylesMap } from '../xcss/style-maps.partial';
|
|
@@ -92,14 +91,14 @@ var Text = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
92
91
|
invariant(asAllowlist.includes(Component), "@atlaskit/primitives: Text received an invalid \"as\" value of \"".concat(Component, "\""));
|
|
93
92
|
var hasTextAncestor = useHasTextAncestor();
|
|
94
93
|
var color = useColor(colorProp, hasTextAncestor);
|
|
95
|
-
if (!
|
|
94
|
+
if (!size && !hasTextAncestor) {
|
|
96
95
|
size = 'medium';
|
|
97
96
|
}
|
|
98
97
|
var component = jsx(Component, {
|
|
99
98
|
ref: ref,
|
|
100
99
|
css: [resetStyles,
|
|
101
100
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
102
|
-
size
|
|
101
|
+
size && textSizeStylesMap[size],
|
|
103
102
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
104
103
|
color && textColorStylesMap[color], maxLines && truncationStyles, maxLines === 1 && wordBreakMap.breakAll, align && textAlignMap[align],
|
|
105
104
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/primitives",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.5.0",
|
|
4
4
|
"description": "Primitives are token-backed low-level building blocks.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -129,7 +129,6 @@
|
|
|
129
129
|
"@atlaskit/css": "^0.8.0",
|
|
130
130
|
"@atlaskit/ds-lib": "^3.5.0",
|
|
131
131
|
"@atlaskit/interaction-context": "^2.6.0",
|
|
132
|
-
"@atlaskit/platform-feature-flags": "^1.0.0",
|
|
133
132
|
"@atlaskit/tokens": "^3.3.0",
|
|
134
133
|
"@atlaskit/visually-hidden": "^1.6.0",
|
|
135
134
|
"@babel/runtime": "^7.0.0",
|
|
@@ -185,11 +184,6 @@
|
|
|
185
184
|
}
|
|
186
185
|
},
|
|
187
186
|
"homepage": "https://atlassian.design/components/primitives/overview/",
|
|
188
|
-
"platform-feature-flags": {
|
|
189
|
-
"platform-primitives-nested-text-inherit-size": {
|
|
190
|
-
"type": "boolean"
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
187
|
"typesVersions": {
|
|
194
188
|
">=4.5 <4.9": {
|
|
195
189
|
"*": [
|