@atlaskit/inline-message 11.4.4 → 11.4.6

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/inline-message
2
2
 
3
+ ## 11.4.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`25902de2d93`](https://bitbucket.org/atlassian/atlassian-frontend/commits/25902de2d93) - [ux] Added pressed (active) state styles for the secondary text.
8
+
9
+ ## 11.4.5
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 11.4.4
4
16
 
5
17
  ### Patch Changes
@@ -9,6 +9,8 @@ Object.defineProperty(exports, "__esModule", {
9
9
  });
10
10
  exports.default = void 0;
11
11
 
12
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
13
+
12
14
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
13
15
 
14
16
  var _react = require("react");
@@ -23,6 +25,8 @@ var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
23
25
 
24
26
  var _components = require("@atlaskit/theme/components");
25
27
 
28
+ var _constants = require("../../constants");
29
+
26
30
  var _messageIcon = _interopRequireDefault(require("../message-icon"));
27
31
 
28
32
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -41,6 +45,7 @@ var titleStyles = (0, _react2.css)({
41
45
  });
42
46
  var textStyles = (0, _react2.css)({
43
47
  padding: "var(--ds-scale-0, 0px)".concat(" ", "var(--ds-scale-050, 4px)"),
48
+ color: "var(".concat(_constants.VAR_SECONDARY_TEXT_COLOR, ")"),
44
49
  overflow: 'hidden',
45
50
  textOverflow: 'ellipsis',
46
51
  whiteSpace: 'nowrap'
@@ -54,12 +59,19 @@ var rootStyles = (0, _react2.css)({
54
59
  '&:hover': {
55
60
  // eslint-disable-next-line @repo/internal/styles/no-nested-styles
56
61
  '[data-ds--inline-message--icon]': {
62
+ // Legacy style
57
63
  color: 'var(--icon-accent-color)'
58
64
  },
59
65
  // eslint-disable-next-line @repo/internal/styles/no-nested-styles
60
66
  '[data-ds--inline-message--button]': {
61
67
  textDecoration: 'underline'
62
68
  }
69
+ },
70
+ // eslint-disable-next-line @repo/internal/styles/no-nested-styles
71
+ '[data-ds--inline-message--button]': {
72
+ '&:active [data-ds--inline-message--secondary-text]': {
73
+ color: "var(--ds-text-subtle, ".concat("var(".concat(_constants.VAR_SECONDARY_TEXT_COLOR, ")"), ")")
74
+ }
63
75
  }
64
76
  });
65
77
  var titleColor = (0, _components.themed)({
@@ -184,11 +196,10 @@ var InlineMessage = function InlineMessage(_ref) {
184
196
  css: titleStyles,
185
197
  "data-testid": testId && "".concat(testId, "--title")
186
198
  }, title), secondaryText && (0, _react2.jsx)("span", {
187
- style: {
188
- color: textColor({
189
- theme: theme
190
- })
191
- },
199
+ "data-ds--inline-message--secondary-text": true,
200
+ style: (0, _defineProperty2.default)({}, _constants.VAR_SECONDARY_TEXT_COLOR, textColor({
201
+ theme: theme
202
+ })),
192
203
  css: textStyles,
193
204
  "data-testid": testId && "".concat(testId, "--text")
194
205
  }, secondaryText)))));
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.typesMapping = void 0;
8
+ exports.typesMapping = exports.VAR_SECONDARY_TEXT_COLOR = void 0;
9
9
 
10
10
  var _checkCircle = _interopRequireDefault(require("@atlaskit/icon/glyph/check-circle"));
11
11
 
@@ -37,4 +37,6 @@ var typesMapping = {
37
37
  defaultLabel: 'error inline message'
38
38
  }
39
39
  };
40
- exports.typesMapping = typesMapping;
40
+ exports.typesMapping = typesMapping;
41
+ var VAR_SECONDARY_TEXT_COLOR = '--secondary-text-color';
42
+ exports.VAR_SECONDARY_TEXT_COLOR = VAR_SECONDARY_TEXT_COLOR;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-message",
3
- "version": "11.4.4",
3
+ "version": "11.4.6",
4
4
  "sideEffects": false
5
5
  }
@@ -5,6 +5,7 @@ import Button from '@atlaskit/button/custom-theme-button';
5
5
  import InlineDialog from '@atlaskit/inline-dialog';
6
6
  import * as colors from '@atlaskit/theme/colors';
7
7
  import { themed, useGlobalTheme } from '@atlaskit/theme/components';
8
+ import { VAR_SECONDARY_TEXT_COLOR } from '../../constants';
8
9
  import MessageIcon from '../message-icon';
9
10
  const buttonContentsStyles = css({
10
11
  display: 'flex',
@@ -17,6 +18,7 @@ const titleStyles = css({
17
18
  });
18
19
  const textStyles = css({
19
20
  padding: `${"var(--ds-scale-0, 0px)"} ${"var(--ds-scale-050, 4px)"}`,
21
+ color: `var(${VAR_SECONDARY_TEXT_COLOR})`,
20
22
  overflow: 'hidden',
21
23
  textOverflow: 'ellipsis',
22
24
  whiteSpace: 'nowrap'
@@ -30,12 +32,19 @@ const rootStyles = css({
30
32
  '&:hover': {
31
33
  // eslint-disable-next-line @repo/internal/styles/no-nested-styles
32
34
  '[data-ds--inline-message--icon]': {
35
+ // Legacy style
33
36
  color: 'var(--icon-accent-color)'
34
37
  },
35
38
  // eslint-disable-next-line @repo/internal/styles/no-nested-styles
36
39
  '[data-ds--inline-message--button]': {
37
40
  textDecoration: 'underline'
38
41
  }
42
+ },
43
+ // eslint-disable-next-line @repo/internal/styles/no-nested-styles
44
+ '[data-ds--inline-message--button]': {
45
+ '&:active [data-ds--inline-message--secondary-text]': {
46
+ color: `var(--ds-text-subtle, ${`var(${VAR_SECONDARY_TEXT_COLOR})`})`
47
+ }
39
48
  }
40
49
  });
41
50
  const titleColor = themed({
@@ -148,8 +157,9 @@ const InlineMessage = ({
148
157
  css: titleStyles,
149
158
  "data-testid": testId && `${testId}--title`
150
159
  }, title), secondaryText && jsx("span", {
160
+ "data-ds--inline-message--secondary-text": true,
151
161
  style: {
152
- color: textColor({
162
+ [VAR_SECONDARY_TEXT_COLOR]: textColor({
153
163
  theme
154
164
  })
155
165
  },
@@ -23,4 +23,5 @@ export const typesMapping = {
23
23
  icon: ErrorIcon,
24
24
  defaultLabel: 'error inline message'
25
25
  }
26
- };
26
+ };
27
+ export const VAR_SECONDARY_TEXT_COLOR = '--secondary-text-color';
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-message",
3
- "version": "11.4.4",
3
+ "version": "11.4.6",
4
4
  "sideEffects": false
5
5
  }
@@ -1,3 +1,4 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
1
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
3
 
3
4
  /** @jsx jsx */
@@ -7,6 +8,7 @@ import Button from '@atlaskit/button/custom-theme-button';
7
8
  import InlineDialog from '@atlaskit/inline-dialog';
8
9
  import * as colors from '@atlaskit/theme/colors';
9
10
  import { themed, useGlobalTheme } from '@atlaskit/theme/components';
11
+ import { VAR_SECONDARY_TEXT_COLOR } from '../../constants';
10
12
  import MessageIcon from '../message-icon';
11
13
  var buttonContentsStyles = css({
12
14
  display: 'flex',
@@ -19,6 +21,7 @@ var titleStyles = css({
19
21
  });
20
22
  var textStyles = css({
21
23
  padding: "var(--ds-scale-0, 0px)".concat(" ", "var(--ds-scale-050, 4px)"),
24
+ color: "var(".concat(VAR_SECONDARY_TEXT_COLOR, ")"),
22
25
  overflow: 'hidden',
23
26
  textOverflow: 'ellipsis',
24
27
  whiteSpace: 'nowrap'
@@ -32,12 +35,19 @@ var rootStyles = css({
32
35
  '&:hover': {
33
36
  // eslint-disable-next-line @repo/internal/styles/no-nested-styles
34
37
  '[data-ds--inline-message--icon]': {
38
+ // Legacy style
35
39
  color: 'var(--icon-accent-color)'
36
40
  },
37
41
  // eslint-disable-next-line @repo/internal/styles/no-nested-styles
38
42
  '[data-ds--inline-message--button]': {
39
43
  textDecoration: 'underline'
40
44
  }
45
+ },
46
+ // eslint-disable-next-line @repo/internal/styles/no-nested-styles
47
+ '[data-ds--inline-message--button]': {
48
+ '&:active [data-ds--inline-message--secondary-text]': {
49
+ color: "var(--ds-text-subtle, ".concat("var(".concat(VAR_SECONDARY_TEXT_COLOR, ")"), ")")
50
+ }
41
51
  }
42
52
  });
43
53
  var titleColor = themed({
@@ -162,11 +172,10 @@ var InlineMessage = function InlineMessage(_ref) {
162
172
  css: titleStyles,
163
173
  "data-testid": testId && "".concat(testId, "--title")
164
174
  }, title), secondaryText && jsx("span", {
165
- style: {
166
- color: textColor({
167
- theme: theme
168
- })
169
- },
175
+ "data-ds--inline-message--secondary-text": true,
176
+ style: _defineProperty({}, VAR_SECONDARY_TEXT_COLOR, textColor({
177
+ theme: theme
178
+ })),
170
179
  css: textStyles,
171
180
  "data-testid": testId && "".concat(testId, "--text")
172
181
  }, secondaryText)))));
@@ -23,4 +23,5 @@ export var typesMapping = {
23
23
  icon: ErrorIcon,
24
24
  defaultLabel: 'error inline message'
25
25
  }
26
- };
26
+ };
27
+ export var VAR_SECONDARY_TEXT_COLOR = '--secondary-text-color';
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-message",
3
- "version": "11.4.4",
3
+ "version": "11.4.6",
4
4
  "sideEffects": false
5
5
  }
@@ -1,2 +1,3 @@
1
1
  import type { IconAppearanceMap } from './types';
2
2
  export declare const typesMapping: IconAppearanceMap;
3
+ export declare const VAR_SECONDARY_TEXT_COLOR = "--secondary-text-color";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-message",
3
- "version": "11.4.4",
3
+ "version": "11.4.6",
4
4
  "description": "An inline message lets users know when important information is available or when an action is required.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -28,7 +28,7 @@
28
28
  "@atlaskit/icon": "^21.11.0",
29
29
  "@atlaskit/inline-dialog": "^13.4.0",
30
30
  "@atlaskit/theme": "^12.2.0",
31
- "@atlaskit/tokens": "^0.12.0",
31
+ "@atlaskit/tokens": "^0.13.0",
32
32
  "@babel/runtime": "^7.0.0",
33
33
  "@emotion/react": "^11.7.1"
34
34
  },
package/report.api.md CHANGED
@@ -1,4 +1,4 @@
1
- <!-- API Report Version: 2.2 -->
1
+ <!-- API Report Version: 2.3 -->
2
2
 
3
3
  ## API Report File for "@atlaskit/inline-message"
4
4