@atlaskit/editor-plugin-alignment 9.1.10 → 9.1.11
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,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-alignment
|
|
2
2
|
|
|
3
|
+
## 9.1.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`292fe7483aeee`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/292fe7483aeee) -
|
|
8
|
+
[ux] Improved accessible names for color picker, remove status button, alignment toolbar, reaction
|
|
9
|
+
summary, and expand/collapse icons
|
|
10
|
+
|
|
3
11
|
## 9.1.10
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -88,7 +88,8 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
88
88
|
return (0, _createClass2.default)(AlignmentToolbar, [{
|
|
89
89
|
key: "render",
|
|
90
90
|
value: function render() {
|
|
91
|
-
var
|
|
91
|
+
var _alignmentLabelMap$al,
|
|
92
|
+
_this2 = this;
|
|
92
93
|
var isOpen = this.state.isOpen;
|
|
93
94
|
var _this$props = this.props,
|
|
94
95
|
popupsMountPoint = _this$props.popupsMountPoint,
|
|
@@ -101,6 +102,12 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
101
102
|
api = _this$props.api;
|
|
102
103
|
var alignment = align !== null && align !== void 0 ? align : 'start';
|
|
103
104
|
var title = intl.formatMessage(_messages.alignmentMessages.alignment);
|
|
105
|
+
var alignmentLabelMap = {
|
|
106
|
+
start: intl.formatMessage(_messages.alignmentMessages.alignLeft),
|
|
107
|
+
center: intl.formatMessage(_messages.alignmentMessages.alignCenter),
|
|
108
|
+
end: intl.formatMessage(_messages.alignmentMessages.alignRight)
|
|
109
|
+
};
|
|
110
|
+
var ariaLabel = "".concat(title, ", ").concat((_alignmentLabelMap$al = alignmentLabelMap[alignment]) !== null && _alignmentLabelMap$al !== void 0 ? _alignmentLabelMap$al : '');
|
|
104
111
|
var reducedSpacing = (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1', {
|
|
105
112
|
exposure: true
|
|
106
113
|
}) ? 'compact' : 'none';
|
|
@@ -167,7 +174,7 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
167
174
|
disabled: disabled,
|
|
168
175
|
selected: isOpen,
|
|
169
176
|
title: title,
|
|
170
|
-
"aria-label":
|
|
177
|
+
"aria-label": ariaLabel,
|
|
171
178
|
"aria-expanded": isOpen,
|
|
172
179
|
"aria-haspopup": true,
|
|
173
180
|
onClick: this.toggleOpen,
|
|
@@ -207,7 +214,7 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
207
214
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/design-system/no-unsafe-style-overrides -- Ignored via go/DSP-18766
|
|
208
215
|
,
|
|
209
216
|
className: "align-btn",
|
|
210
|
-
"aria-label":
|
|
217
|
+
"aria-label": ariaLabel,
|
|
211
218
|
"aria-expanded": isOpen,
|
|
212
219
|
"aria-haspopup": true,
|
|
213
220
|
onClick: this.toggleOpen,
|
|
@@ -63,6 +63,7 @@ class AlignmentToolbar extends React.Component {
|
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
render() {
|
|
66
|
+
var _alignmentLabelMap$al;
|
|
66
67
|
const {
|
|
67
68
|
isOpen
|
|
68
69
|
} = this.state;
|
|
@@ -78,6 +79,12 @@ class AlignmentToolbar extends React.Component {
|
|
|
78
79
|
} = this.props;
|
|
79
80
|
const alignment = align !== null && align !== void 0 ? align : 'start';
|
|
80
81
|
const title = intl.formatMessage(messages.alignment);
|
|
82
|
+
const alignmentLabelMap = {
|
|
83
|
+
start: intl.formatMessage(messages.alignLeft),
|
|
84
|
+
center: intl.formatMessage(messages.alignCenter),
|
|
85
|
+
end: intl.formatMessage(messages.alignRight)
|
|
86
|
+
};
|
|
87
|
+
const ariaLabel = `${title}, ${(_alignmentLabelMap$al = alignmentLabelMap[alignment]) !== null && _alignmentLabelMap$al !== void 0 ? _alignmentLabelMap$al : ''}`;
|
|
81
88
|
const reducedSpacing = editorExperiment('platform_editor_controls', 'variant1', {
|
|
82
89
|
exposure: true
|
|
83
90
|
}) ? 'compact' : 'none';
|
|
@@ -142,7 +149,7 @@ class AlignmentToolbar extends React.Component {
|
|
|
142
149
|
disabled: disabled,
|
|
143
150
|
selected: isOpen,
|
|
144
151
|
title: title,
|
|
145
|
-
"aria-label":
|
|
152
|
+
"aria-label": ariaLabel,
|
|
146
153
|
"aria-expanded": isOpen,
|
|
147
154
|
"aria-haspopup": true,
|
|
148
155
|
onClick: this.toggleOpen,
|
|
@@ -182,7 +189,7 @@ class AlignmentToolbar extends React.Component {
|
|
|
182
189
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/design-system/no-unsafe-style-overrides -- Ignored via go/DSP-18766
|
|
183
190
|
,
|
|
184
191
|
className: "align-btn",
|
|
185
|
-
"aria-label":
|
|
192
|
+
"aria-label": ariaLabel,
|
|
186
193
|
"aria-expanded": isOpen,
|
|
187
194
|
"aria-haspopup": true,
|
|
188
195
|
onClick: this.toggleOpen,
|
|
@@ -81,7 +81,8 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
81
81
|
return _createClass(AlignmentToolbar, [{
|
|
82
82
|
key: "render",
|
|
83
83
|
value: function render() {
|
|
84
|
-
var
|
|
84
|
+
var _alignmentLabelMap$al,
|
|
85
|
+
_this2 = this;
|
|
85
86
|
var isOpen = this.state.isOpen;
|
|
86
87
|
var _this$props = this.props,
|
|
87
88
|
popupsMountPoint = _this$props.popupsMountPoint,
|
|
@@ -94,6 +95,12 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
94
95
|
api = _this$props.api;
|
|
95
96
|
var alignment = align !== null && align !== void 0 ? align : 'start';
|
|
96
97
|
var title = intl.formatMessage(messages.alignment);
|
|
98
|
+
var alignmentLabelMap = {
|
|
99
|
+
start: intl.formatMessage(messages.alignLeft),
|
|
100
|
+
center: intl.formatMessage(messages.alignCenter),
|
|
101
|
+
end: intl.formatMessage(messages.alignRight)
|
|
102
|
+
};
|
|
103
|
+
var ariaLabel = "".concat(title, ", ").concat((_alignmentLabelMap$al = alignmentLabelMap[alignment]) !== null && _alignmentLabelMap$al !== void 0 ? _alignmentLabelMap$al : '');
|
|
97
104
|
var reducedSpacing = editorExperiment('platform_editor_controls', 'variant1', {
|
|
98
105
|
exposure: true
|
|
99
106
|
}) ? 'compact' : 'none';
|
|
@@ -160,7 +167,7 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
160
167
|
disabled: disabled,
|
|
161
168
|
selected: isOpen,
|
|
162
169
|
title: title,
|
|
163
|
-
"aria-label":
|
|
170
|
+
"aria-label": ariaLabel,
|
|
164
171
|
"aria-expanded": isOpen,
|
|
165
172
|
"aria-haspopup": true,
|
|
166
173
|
onClick: this.toggleOpen,
|
|
@@ -200,7 +207,7 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
200
207
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/design-system/no-unsafe-style-overrides -- Ignored via go/DSP-18766
|
|
201
208
|
,
|
|
202
209
|
className: "align-btn",
|
|
203
|
-
"aria-label":
|
|
210
|
+
"aria-label": ariaLabel,
|
|
204
211
|
"aria-expanded": isOpen,
|
|
205
212
|
"aria-haspopup": true,
|
|
206
213
|
onClick: this.toggleOpen,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-alignment",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.11",
|
|
4
4
|
"description": "Alignment plugin for @atlaskit/editor-core",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"@atlaskit/editor-toolbar": "^0.20.0",
|
|
38
38
|
"@atlaskit/icon": "^33.1.0",
|
|
39
39
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
40
|
-
"@atlaskit/tmp-editor-statsig": "^48.
|
|
41
|
-
"@atlaskit/tokens": "^11.
|
|
40
|
+
"@atlaskit/tmp-editor-statsig": "^48.1.0",
|
|
41
|
+
"@atlaskit/tokens": "^11.4.0",
|
|
42
42
|
"@babel/runtime": "^7.0.0",
|
|
43
43
|
"@compiled/react": "^0.20.0"
|
|
44
44
|
},
|