@atlaskit/status 0.11.3 → 0.12.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,15 @@
1
1
  # @atlaskit/status
2
2
 
3
+ ## 0.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`42c7ac64c39`](https://bitbucket.org/atlassian/atlassian-frontend/commits/42c7ac64c39) - AK-654 Set a status link label with input
8
+
9
+ ### Patch Changes
10
+
11
+ - [`140df54164a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/140df54164a) - AK-570 Remove redundant title attribute for Status component
12
+
3
13
  ## 0.11.3
4
14
 
5
15
  ### Patch Changes
@@ -97,6 +97,7 @@ var StatusInternal = /*#__PURE__*/function (_PureComponent) {
97
97
  text = _this$props.text,
98
98
  color = _this$props.color,
99
99
  style = _this$props.style,
100
+ localId = _this$props.localId,
100
101
  onClick = _this$props.onClick;
101
102
 
102
103
  if (text.trim().length === 0) {
@@ -106,15 +107,14 @@ var StatusInternal = /*#__PURE__*/function (_PureComponent) {
106
107
  var appearance = colorToLozengeAppearanceMap[color] || DEFAULT_APPEARANCE; // Note: ommitted data-local-id attribute to avoid copying/pasting the same localId
107
108
 
108
109
  return /*#__PURE__*/_react.default.createElement("span", {
109
- className: "status-lozenge-span" // Using title here as `@atlaskit/tooltip` adds too much overhead
110
- ,
111
- title: text,
110
+ className: "status-lozenge-span",
112
111
  onClick: onClick,
113
112
  onMouseEnter: this.handleMouseEnter,
114
113
  onMouseLeave: this.handleMouseLeave,
115
114
  "data-node-type": "status",
116
115
  "data-color": color,
117
- "data-style": style
116
+ "data-style": style,
117
+ id: localId
118
118
  }, /*#__PURE__*/_react.default.createElement(_lozenge.default, {
119
119
  appearance: appearance,
120
120
  maxWidth: MAX_WIDTH
@@ -90,6 +90,7 @@ var StatusPicker = /*#__PURE__*/function (_PureComponent) {
90
90
  var _this$props = this.props,
91
91
  text = _this$props.text,
92
92
  selectedColor = _this$props.selectedColor,
93
+ localId = _this$props.localId,
93
94
  onColorClick = _this$props.onColorClick,
94
95
  onColorHover = _this$props.onColorHover; // Using <React.Fragment> instead of [] to workaround Enzyme
95
96
  // (https://github.com/airbnb/enzyme/issues/1149)
@@ -103,7 +104,8 @@ var StatusPicker = /*#__PURE__*/function (_PureComponent) {
103
104
  onChange: this.onChange,
104
105
  onKeyPress: this.onKeyPress,
105
106
  spellCheck: false,
106
- autoComplete: "off"
107
+ autoComplete: "off",
108
+ "aria-labelledby": localId
107
109
  })), /*#__PURE__*/_react.default.createElement(_colorPalette.default, {
108
110
  key: this.colorPaletteKey,
109
111
  onClick: onColorClick,
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/status",
3
- "version": "0.11.3"
3
+ "version": "0.12.0"
4
4
  }
@@ -49,6 +49,7 @@ class StatusInternal extends PureComponent {
49
49
  text,
50
50
  color,
51
51
  style,
52
+ localId,
52
53
  onClick
53
54
  } = this.props;
54
55
 
@@ -59,15 +60,14 @@ class StatusInternal extends PureComponent {
59
60
  const appearance = colorToLozengeAppearanceMap[color] || DEFAULT_APPEARANCE; // Note: ommitted data-local-id attribute to avoid copying/pasting the same localId
60
61
 
61
62
  return /*#__PURE__*/React.createElement("span", {
62
- className: "status-lozenge-span" // Using title here as `@atlaskit/tooltip` adds too much overhead
63
- ,
64
- title: text,
63
+ className: "status-lozenge-span",
65
64
  onClick: onClick,
66
65
  onMouseEnter: this.handleMouseEnter,
67
66
  onMouseLeave: this.handleMouseLeave,
68
67
  "data-node-type": "status",
69
68
  "data-color": color,
70
- "data-style": style
69
+ "data-style": style,
70
+ id: localId
71
71
  }, /*#__PURE__*/React.createElement(Lozenge, {
72
72
  appearance: appearance,
73
73
  maxWidth: MAX_WIDTH
@@ -41,6 +41,7 @@ export class StatusPicker extends PureComponent {
41
41
  const {
42
42
  text,
43
43
  selectedColor,
44
+ localId,
44
45
  onColorClick,
45
46
  onColorHover
46
47
  } = this.props; // Using <React.Fragment> instead of [] to workaround Enzyme
@@ -55,7 +56,8 @@ export class StatusPicker extends PureComponent {
55
56
  onChange: this.onChange,
56
57
  onKeyPress: this.onKeyPress,
57
58
  spellCheck: false,
58
- autoComplete: "off"
59
+ autoComplete: "off",
60
+ "aria-labelledby": localId
59
61
  })), /*#__PURE__*/React.createElement(ColorPalette, {
60
62
  key: this.colorPaletteKey,
61
63
  onClick: onColorClick,
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/status",
3
- "version": "0.11.3"
3
+ "version": "0.12.0"
4
4
  }
@@ -76,6 +76,7 @@ var StatusInternal = /*#__PURE__*/function (_PureComponent) {
76
76
  text = _this$props.text,
77
77
  color = _this$props.color,
78
78
  style = _this$props.style,
79
+ localId = _this$props.localId,
79
80
  onClick = _this$props.onClick;
80
81
 
81
82
  if (text.trim().length === 0) {
@@ -85,15 +86,14 @@ var StatusInternal = /*#__PURE__*/function (_PureComponent) {
85
86
  var appearance = colorToLozengeAppearanceMap[color] || DEFAULT_APPEARANCE; // Note: ommitted data-local-id attribute to avoid copying/pasting the same localId
86
87
 
87
88
  return /*#__PURE__*/React.createElement("span", {
88
- className: "status-lozenge-span" // Using title here as `@atlaskit/tooltip` adds too much overhead
89
- ,
90
- title: text,
89
+ className: "status-lozenge-span",
91
90
  onClick: onClick,
92
91
  onMouseEnter: this.handleMouseEnter,
93
92
  onMouseLeave: this.handleMouseLeave,
94
93
  "data-node-type": "status",
95
94
  "data-color": color,
96
- "data-style": style
95
+ "data-style": style,
96
+ id: localId
97
97
  }, /*#__PURE__*/React.createElement(Lozenge, {
98
98
  appearance: appearance,
99
99
  maxWidth: MAX_WIDTH
@@ -69,6 +69,7 @@ export var StatusPicker = /*#__PURE__*/function (_PureComponent) {
69
69
  var _this$props = this.props,
70
70
  text = _this$props.text,
71
71
  selectedColor = _this$props.selectedColor,
72
+ localId = _this$props.localId,
72
73
  onColorClick = _this$props.onColorClick,
73
74
  onColorHover = _this$props.onColorHover; // Using <React.Fragment> instead of [] to workaround Enzyme
74
75
  // (https://github.com/airbnb/enzyme/issues/1149)
@@ -82,7 +83,8 @@ export var StatusPicker = /*#__PURE__*/function (_PureComponent) {
82
83
  onChange: this.onChange,
83
84
  onKeyPress: this.onKeyPress,
84
85
  spellCheck: false,
85
- autoComplete: "off"
86
+ autoComplete: "off",
87
+ "aria-labelledby": localId
86
88
  })), /*#__PURE__*/React.createElement(ColorPalette, {
87
89
  key: this.colorPaletteKey,
88
90
  onClick: onColorClick,
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/status",
3
- "version": "0.11.3"
3
+ "version": "0.12.0"
4
4
  }
@@ -9,6 +9,7 @@ export interface Props {
9
9
  onColorHover?: (value: ColorType) => void;
10
10
  onTextChanged: (value: string) => void;
11
11
  autoFocus?: boolean;
12
+ localId?: string;
12
13
  }
13
14
  export declare class StatusPicker extends PureComponent<Props, any> {
14
15
  private fieldTextWrapperKey;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/status",
3
- "version": "0.11.3",
3
+ "version": "0.12.0",
4
4
  "description": "Fabric Status React Components",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "devDependencies": {
41
41
  "@atlaskit/docs": "^9.0.0",
42
- "@atlaskit/editor-test-helpers": "^15.0.0",
42
+ "@atlaskit/editor-test-helpers": "^15.6.0",
43
43
  "@atlaskit/elements-test-helpers": "^0.7.0",
44
44
  "@atlaskit/visual-regression": "*",
45
45
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",