@atlaskit/section-message 8.8.1 → 8.9.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/section-message
2
2
 
3
+ ## 8.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`0f1032d1ae484`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0f1032d1ae484) -
8
+ Updates to Section message actions:
9
+ - Actions that do not have `linkComponent` component overrides will no longer utilize the legacy
10
+ `Button` component, and now utilize either the `Pressable` primitive or `Link` component
11
+ depending on whether `onClick` or `href` props are set. The `linkComponent` prop otherwise
12
+ behaves as it did before, but remains deprecated and scheduled to be removed in a later version.
13
+ - Plain-text actions with a `onClick` or `href` now have body font styles applied by default.
14
+
3
15
  ## 8.8.1
4
16
 
5
17
  ### Patch Changes
@@ -1,18 +1,14 @@
1
-
2
1
  ._11c82smr{font:var(--ds-font-body,normal 400 14px/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
3
2
  ._19bvze3t{padding-left:var(--ds-space-0,0)}
4
3
  ._bfhk1j28{background-color:transparent}
5
- ._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
6
4
  ._ca0qze3t{padding-top:var(--ds-space-0,0)}
7
5
  ._k48p1wq8{font-weight:var(--ds-font-weight-medium,500)}
8
6
  ._k48pi7a9{font-weight:var(--ds-font-weight-regular,400)}
9
7
  ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
10
8
  ._syaz14q2{color:var(--ds-link,#0c66e4)}
11
- ._u5f3ze3t{padding-right:var(--ds-space-0,0)}._1053w7te:visited{color:var(--ds-link-visited,#5e4db2)}
9
+ ._u5f3ze3t{padding-right:var(--ds-space-0,0)}
12
10
  ._1bnx8stv:hover{text-decoration-line:underline}
13
11
  ._30l314q2:hover{color:var(--ds-link,#0c66e4)}
14
12
  ._9oik1r31:hover{text-decoration-color:currentColor}
15
13
  ._jf4cnqa1:hover{text-decoration-style:solid}
16
- ._n0fxw7te:visited:hover{color:var(--ds-link-visited,#5e4db2)}
17
- ._1vhvg3x0:visited:active{color:var(--ds-link-visited-pressed,#352c63)}
18
14
  ._9h8h16c2:active{color:var(--ds-link-pressed,#05c)}
@@ -14,14 +14,8 @@ var _runtime = require("@compiled/react/runtime");
14
14
  var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
15
15
  var _css = require("@atlaskit/css");
16
16
  var _link = _interopRequireDefault(require("@atlaskit/link"));
17
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
18
17
  var _compiled = require("@atlaskit/primitives/compiled");
19
18
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
20
- var stylesOld = {
21
- common: "_11c82smr _syaz14q2 _k48p1wq8 _30l314q2 _9h8h16c2",
22
- anchor: "_1053w7te _9oik1r31 _1bnx8stv _jf4cnqa1 _n0fxw7te _1vhvg3x0",
23
- pressable: "_bfhksm61 _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _9oik1r31 _1bnx8stv _jf4cnqa1"
24
- };
25
19
  var styles = {
26
20
  common: "_11c82smr",
27
21
  anchor: "_k48pi7a9",
@@ -44,38 +38,32 @@ var SectionMessageAction = /*#__PURE__*/(0, _react.memo)(function SectionMessage
44
38
  testId = _ref.testId,
45
39
  linkComponent = _ref.linkComponent,
46
40
  target = _ref.target;
47
- if (!linkComponent && (0, _platformFeatureFlags.fg)('platform_section_message_action_migration')) {
41
+ if (!linkComponent) {
48
42
  if (href) {
49
- if ((0, _platformFeatureFlags.fg)('platform_dst_section_message_actions_as_link')) {
50
- return /*#__PURE__*/React.createElement("span", {
51
- className: (0, _runtime.ax)([styles.common, styles.anchor])
52
- }, /*#__PURE__*/React.createElement(_link.default, {
53
- testId: testId,
54
- onClick: onClick,
55
- href: href,
56
- target: target
57
- }, children));
58
- }
59
- return /*#__PURE__*/React.createElement(_compiled.Anchor, {
43
+ return /*#__PURE__*/React.createElement("span", {
44
+ className: (0, _runtime.ax)([styles.common, styles.anchor])
45
+ }, /*#__PURE__*/React.createElement(_link.default, {
60
46
  testId: testId,
61
47
  onClick: onClick,
62
48
  href: href,
63
- xcss: (0, _css.cx)(stylesOld.common, stylesOld.anchor)
64
- }, children);
49
+ target: target
50
+ }, children));
65
51
  }
66
52
  if (onClick) {
67
53
  return /*#__PURE__*/React.createElement(_compiled.Pressable, {
68
54
  testId: testId,
69
55
  onClick: onClick,
70
- xcss: (0, _css.cx)((0, _platformFeatureFlags.fg)('platform_dst_section_message_actions_as_link') ? styles.common : stylesOld.common, (0, _platformFeatureFlags.fg)('platform_dst_section_message_actions_as_link') ? styles.pressable : stylesOld.pressable)
56
+ xcss: (0, _css.cx)(styles.common, styles.pressable)
71
57
  }, children);
72
58
  }
73
59
  return /*#__PURE__*/React.createElement(_compiled.Box, {
74
60
  as: "span",
75
61
  testId: testId,
76
- xcss: (0, _platformFeatureFlags.fg)('platform_dst_section_message_actions_as_link') && styles.common
62
+ xcss: styles.common
77
63
  }, children);
78
64
  }
65
+
66
+ // TODO: Remove this once the deprecated `linkComponent` prop is removed.
79
67
  return onClick || href ? /*#__PURE__*/React.createElement(_standardButton.default, {
80
68
  testId: testId,
81
69
  appearance: "link",
@@ -1,18 +1,14 @@
1
-
2
1
  ._11c82smr{font:var(--ds-font-body,normal 400 14px/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
3
2
  ._19bvze3t{padding-left:var(--ds-space-0,0)}
4
3
  ._bfhk1j28{background-color:transparent}
5
- ._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
6
4
  ._ca0qze3t{padding-top:var(--ds-space-0,0)}
7
5
  ._k48p1wq8{font-weight:var(--ds-font-weight-medium,500)}
8
6
  ._k48pi7a9{font-weight:var(--ds-font-weight-regular,400)}
9
7
  ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
10
8
  ._syaz14q2{color:var(--ds-link,#0c66e4)}
11
- ._u5f3ze3t{padding-right:var(--ds-space-0,0)}._1053w7te:visited{color:var(--ds-link-visited,#5e4db2)}
9
+ ._u5f3ze3t{padding-right:var(--ds-space-0,0)}
12
10
  ._1bnx8stv:hover{text-decoration-line:underline}
13
11
  ._30l314q2:hover{color:var(--ds-link,#0c66e4)}
14
12
  ._9oik1r31:hover{text-decoration-color:currentColor}
15
13
  ._jf4cnqa1:hover{text-decoration-style:solid}
16
- ._n0fxw7te:visited:hover{color:var(--ds-link-visited,#5e4db2)}
17
- ._1vhvg3x0:visited:active{color:var(--ds-link-visited-pressed,#352c63)}
18
14
  ._9h8h16c2:active{color:var(--ds-link-pressed,#05c)}
@@ -6,13 +6,7 @@ import { Fragment, memo } from 'react';
6
6
  import Button from '@atlaskit/button/standard-button';
7
7
  import { cx } from '@atlaskit/css';
8
8
  import Link from '@atlaskit/link';
9
- import { fg } from '@atlaskit/platform-feature-flags';
10
- import { Anchor, Box, Pressable } from '@atlaskit/primitives/compiled';
11
- const stylesOld = {
12
- common: "_11c82smr _syaz14q2 _k48p1wq8 _30l314q2 _9h8h16c2",
13
- anchor: "_1053w7te _9oik1r31 _1bnx8stv _jf4cnqa1 _n0fxw7te _1vhvg3x0",
14
- pressable: "_bfhksm61 _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _9oik1r31 _1bnx8stv _jf4cnqa1"
15
- };
9
+ import { Box, Pressable } from '@atlaskit/primitives/compiled';
16
10
  const styles = {
17
11
  common: "_11c82smr",
18
12
  anchor: "_k48pi7a9",
@@ -36,38 +30,32 @@ const SectionMessageAction = /*#__PURE__*/memo(function SectionMessageAction({
36
30
  linkComponent,
37
31
  target
38
32
  }) {
39
- if (!linkComponent && fg('platform_section_message_action_migration')) {
33
+ if (!linkComponent) {
40
34
  if (href) {
41
- if (fg('platform_dst_section_message_actions_as_link')) {
42
- return /*#__PURE__*/React.createElement("span", {
43
- className: ax([styles.common, styles.anchor])
44
- }, /*#__PURE__*/React.createElement(Link, {
45
- testId: testId,
46
- onClick: onClick,
47
- href: href,
48
- target: target
49
- }, children));
50
- }
51
- return /*#__PURE__*/React.createElement(Anchor, {
35
+ return /*#__PURE__*/React.createElement("span", {
36
+ className: ax([styles.common, styles.anchor])
37
+ }, /*#__PURE__*/React.createElement(Link, {
52
38
  testId: testId,
53
39
  onClick: onClick,
54
40
  href: href,
55
- xcss: cx(stylesOld.common, stylesOld.anchor)
56
- }, children);
41
+ target: target
42
+ }, children));
57
43
  }
58
44
  if (onClick) {
59
45
  return /*#__PURE__*/React.createElement(Pressable, {
60
46
  testId: testId,
61
47
  onClick: onClick,
62
- xcss: cx(fg('platform_dst_section_message_actions_as_link') ? styles.common : stylesOld.common, fg('platform_dst_section_message_actions_as_link') ? styles.pressable : stylesOld.pressable)
48
+ xcss: cx(styles.common, styles.pressable)
63
49
  }, children);
64
50
  }
65
51
  return /*#__PURE__*/React.createElement(Box, {
66
52
  as: "span",
67
53
  testId: testId,
68
- xcss: fg('platform_dst_section_message_actions_as_link') && styles.common
54
+ xcss: styles.common
69
55
  }, children);
70
56
  }
57
+
58
+ // TODO: Remove this once the deprecated `linkComponent` prop is removed.
71
59
  return onClick || href ? /*#__PURE__*/React.createElement(Button, {
72
60
  testId: testId,
73
61
  appearance: "link",
@@ -1,18 +1,14 @@
1
-
2
1
  ._11c82smr{font:var(--ds-font-body,normal 400 14px/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
3
2
  ._19bvze3t{padding-left:var(--ds-space-0,0)}
4
3
  ._bfhk1j28{background-color:transparent}
5
- ._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
6
4
  ._ca0qze3t{padding-top:var(--ds-space-0,0)}
7
5
  ._k48p1wq8{font-weight:var(--ds-font-weight-medium,500)}
8
6
  ._k48pi7a9{font-weight:var(--ds-font-weight-regular,400)}
9
7
  ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
10
8
  ._syaz14q2{color:var(--ds-link,#0c66e4)}
11
- ._u5f3ze3t{padding-right:var(--ds-space-0,0)}._1053w7te:visited{color:var(--ds-link-visited,#5e4db2)}
9
+ ._u5f3ze3t{padding-right:var(--ds-space-0,0)}
12
10
  ._1bnx8stv:hover{text-decoration-line:underline}
13
11
  ._30l314q2:hover{color:var(--ds-link,#0c66e4)}
14
12
  ._9oik1r31:hover{text-decoration-color:currentColor}
15
13
  ._jf4cnqa1:hover{text-decoration-style:solid}
16
- ._n0fxw7te:visited:hover{color:var(--ds-link-visited,#5e4db2)}
17
- ._1vhvg3x0:visited:active{color:var(--ds-link-visited-pressed,#352c63)}
18
14
  ._9h8h16c2:active{color:var(--ds-link-pressed,#05c)}
@@ -6,13 +6,7 @@ import { Fragment, memo } from 'react';
6
6
  import Button from '@atlaskit/button/standard-button';
7
7
  import { cx } from '@atlaskit/css';
8
8
  import Link from '@atlaskit/link';
9
- import { fg } from '@atlaskit/platform-feature-flags';
10
- import { Anchor, Box, Pressable } from '@atlaskit/primitives/compiled';
11
- var stylesOld = {
12
- common: "_11c82smr _syaz14q2 _k48p1wq8 _30l314q2 _9h8h16c2",
13
- anchor: "_1053w7te _9oik1r31 _1bnx8stv _jf4cnqa1 _n0fxw7te _1vhvg3x0",
14
- pressable: "_bfhksm61 _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _9oik1r31 _1bnx8stv _jf4cnqa1"
15
- };
9
+ import { Box, Pressable } from '@atlaskit/primitives/compiled';
16
10
  var styles = {
17
11
  common: "_11c82smr",
18
12
  anchor: "_k48pi7a9",
@@ -35,38 +29,32 @@ var SectionMessageAction = /*#__PURE__*/memo(function SectionMessageAction(_ref)
35
29
  testId = _ref.testId,
36
30
  linkComponent = _ref.linkComponent,
37
31
  target = _ref.target;
38
- if (!linkComponent && fg('platform_section_message_action_migration')) {
32
+ if (!linkComponent) {
39
33
  if (href) {
40
- if (fg('platform_dst_section_message_actions_as_link')) {
41
- return /*#__PURE__*/React.createElement("span", {
42
- className: ax([styles.common, styles.anchor])
43
- }, /*#__PURE__*/React.createElement(Link, {
44
- testId: testId,
45
- onClick: onClick,
46
- href: href,
47
- target: target
48
- }, children));
49
- }
50
- return /*#__PURE__*/React.createElement(Anchor, {
34
+ return /*#__PURE__*/React.createElement("span", {
35
+ className: ax([styles.common, styles.anchor])
36
+ }, /*#__PURE__*/React.createElement(Link, {
51
37
  testId: testId,
52
38
  onClick: onClick,
53
39
  href: href,
54
- xcss: cx(stylesOld.common, stylesOld.anchor)
55
- }, children);
40
+ target: target
41
+ }, children));
56
42
  }
57
43
  if (onClick) {
58
44
  return /*#__PURE__*/React.createElement(Pressable, {
59
45
  testId: testId,
60
46
  onClick: onClick,
61
- xcss: cx(fg('platform_dst_section_message_actions_as_link') ? styles.common : stylesOld.common, fg('platform_dst_section_message_actions_as_link') ? styles.pressable : stylesOld.pressable)
47
+ xcss: cx(styles.common, styles.pressable)
62
48
  }, children);
63
49
  }
64
50
  return /*#__PURE__*/React.createElement(Box, {
65
51
  as: "span",
66
52
  testId: testId,
67
- xcss: fg('platform_dst_section_message_actions_as_link') && styles.common
53
+ xcss: styles.common
68
54
  }, children);
69
55
  }
56
+
57
+ // TODO: Remove this once the deprecated `linkComponent` prop is removed.
70
58
  return onClick || href ? /*#__PURE__*/React.createElement(Button, {
71
59
  testId: testId,
72
60
  appearance: "link",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/section-message",
3
- "version": "8.8.1",
3
+ "version": "8.9.0",
4
4
  "description": "A section message is used to alert users to a particular section of the screen.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -38,7 +38,6 @@
38
38
  "@atlaskit/heading": "^5.2.0",
39
39
  "@atlaskit/icon": "^28.5.0",
40
40
  "@atlaskit/link": "^3.2.0",
41
- "@atlaskit/platform-feature-flags": "^1.1.0",
42
41
  "@atlaskit/primitives": "^16.1.0",
43
42
  "@atlaskit/theme": "^21.0.0",
44
43
  "@atlaskit/tokens": "^7.0.0",
@@ -57,7 +56,6 @@
57
56
  "@atlaskit/ds-lib": "^5.1.0",
58
57
  "@atlaskit/form": "^14.2.0",
59
58
  "@atlaskit/range": "^9.2.0",
60
- "@atlassian/feature-flags-test-utils": "^1.0.0",
61
59
  "@atlassian/ssr-tests": "^0.3.0",
62
60
  "@testing-library/react": "^13.4.0",
63
61
  "@testing-library/user-event": "^14.4.3",
@@ -85,13 +83,5 @@
85
83
  "deprecation": "no-deprecated-imports"
86
84
  }
87
85
  },
88
- "homepage": "https://atlassian.design/components/section-message/",
89
- "platform-feature-flags": {
90
- "platform_section_message_action_migration": {
91
- "type": "boolean"
92
- },
93
- "platform_dst_section_message_actions_as_link": {
94
- "type": "boolean"
95
- }
96
- }
86
+ "homepage": "https://atlassian.design/components/section-message/"
97
87
  }