@atlaskit/flag 15.8.6 → 15.8.8
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 +15 -0
- package/dist/cjs/auto-dismiss-flag.js +1 -1
- package/dist/cjs/flag.js +9 -6
- package/dist/cjs/internal/dismiss-button.js +4 -3
- package/dist/es2019/auto-dismiss-flag.js +1 -1
- package/dist/es2019/flag.js +9 -6
- package/dist/es2019/internal/dismiss-button.js +4 -3
- package/dist/esm/auto-dismiss-flag.js +1 -1
- package/dist/esm/flag.js +9 -6
- package/dist/esm/internal/dismiss-button.js +4 -3
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/flag
|
|
2
2
|
|
|
3
|
+
## 15.8.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#162319](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/162319)
|
|
8
|
+
[`2ac6ec33aa35a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2ac6ec33aa35a) -
|
|
9
|
+
Added aria-hidden to title and description when delayAnnouncement enabled to avoid duplicate
|
|
10
|
+
announcement. Also removed condition for role alert
|
|
11
|
+
|
|
12
|
+
## 15.8.7
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 15.8.6
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -15,7 +15,7 @@ var _flagGroup = require("./flag-group");
|
|
|
15
15
|
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); }
|
|
16
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
17
|
var packageName = "@atlaskit/flag";
|
|
18
|
-
var packageVersion = "15.8.
|
|
18
|
+
var packageVersion = "15.8.8";
|
|
19
19
|
var AUTO_DISMISS_SECONDS = exports.AUTO_DISMISS_SECONDS = 8;
|
|
20
20
|
|
|
21
21
|
/**
|
package/dist/cjs/flag.js
CHANGED
|
@@ -57,7 +57,7 @@ var flagWrapperStyles = (0, _react2.css)({
|
|
|
57
57
|
var analyticsAttributes = {
|
|
58
58
|
componentName: 'flag',
|
|
59
59
|
packageName: "@atlaskit/flag",
|
|
60
|
-
packageVersion: "15.8.
|
|
60
|
+
packageVersion: "15.8.8"
|
|
61
61
|
};
|
|
62
62
|
var transitionStyles = (0, _react2.css)({
|
|
63
63
|
flexGrow: 1,
|
|
@@ -163,11 +163,9 @@ var Flag = function Flag(props) {
|
|
|
163
163
|
var isDismissable = isBold || isDismissAllowed;
|
|
164
164
|
var shouldRenderGap = !isBold && (description || actions.length) || isExpanded;
|
|
165
165
|
// when delayAnnouncement is available we will use a hidden content for announcement
|
|
166
|
-
var delayedAnnouncement = delayAnnouncement ? (0, _react2.jsx)(_visuallyHidden.default,
|
|
167
|
-
role: "alert"
|
|
168
|
-
}, title, description) : undefined;
|
|
166
|
+
var delayedAnnouncement = delayAnnouncement ? (0, _react2.jsx)(_visuallyHidden.default, null, title, description) : undefined;
|
|
169
167
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
170
|
-
role:
|
|
168
|
+
role: "alert",
|
|
171
169
|
css: flagWrapperStyles,
|
|
172
170
|
"data-testid": testId
|
|
173
171
|
}, autoDismissProps), (0, _react2.jsx)(_primitives.Box, {
|
|
@@ -198,7 +196,10 @@ var Flag = function Flag(props) {
|
|
|
198
196
|
as: "h".concat(headingLevel),
|
|
199
197
|
size: "xsmall",
|
|
200
198
|
color: textColor
|
|
201
|
-
},
|
|
199
|
+
}, (0, _react2.jsx)("span", {
|
|
200
|
+
/* if isDelayToAnnounce is true, we will hide the content form screen reader to avoid duplicate announcement */
|
|
201
|
+
"aria-hidden": isDelayToAnnounce
|
|
202
|
+
}, title))), isDismissable ? !(isBold && !description && !actions.length) && (0, _react2.jsx)(_internal.DismissButton, {
|
|
202
203
|
testId: testId,
|
|
203
204
|
appearance: appearance,
|
|
204
205
|
isBold: isBold,
|
|
@@ -214,6 +215,8 @@ var Flag = function Flag(props) {
|
|
|
214
215
|
},
|
|
215
216
|
css: descriptionStyles,
|
|
216
217
|
"data-testid": testId && "".concat(testId, "-description")
|
|
218
|
+
/* if isDelayToAnnounce is true, we will hide the content form screen reader to avoid duplicate announcement */,
|
|
219
|
+
"aria-hidden": isDelayToAnnounce
|
|
217
220
|
}, description), (0, _react2.jsx)(_flagActions.default, {
|
|
218
221
|
actions: actions,
|
|
219
222
|
appearance: appearance,
|
|
@@ -7,9 +7,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _cross = _interopRequireDefault(require("@atlaskit/icon/glyph/cross"));
|
|
10
11
|
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/glyph/hipchat/chevron-down"));
|
|
11
12
|
var _chevronUp = _interopRequireDefault(require("@atlaskit/icon/glyph/hipchat/chevron-up"));
|
|
12
|
-
var _cross = _interopRequireDefault(require("@atlaskit/icon/glyph/cross"));
|
|
13
13
|
var _primitives = require("@atlaskit/primitives");
|
|
14
14
|
var _theme = require("../theme");
|
|
15
15
|
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); }
|
|
@@ -47,9 +47,10 @@ var DismissButtonComponent = function DismissButtonComponent(_ref) {
|
|
|
47
47
|
xcss: buttonStyles,
|
|
48
48
|
onClick: onClick,
|
|
49
49
|
"aria-expanded": isBold ? isExpanded : undefined,
|
|
50
|
-
testId: buttonTestId
|
|
50
|
+
testId: buttonTestId,
|
|
51
|
+
"aria-label": buttonLabel
|
|
51
52
|
}, /*#__PURE__*/_react.default.createElement(ButtonIcon, {
|
|
52
|
-
label:
|
|
53
|
+
label: "",
|
|
53
54
|
size: size,
|
|
54
55
|
primaryColor: _theme.flagTextColorToken[appearance]
|
|
55
56
|
}));
|
|
@@ -5,7 +5,7 @@ import noop from '@atlaskit/ds-lib/noop';
|
|
|
5
5
|
import Flag from './flag';
|
|
6
6
|
import { useFlagGroup } from './flag-group';
|
|
7
7
|
const packageName = "@atlaskit/flag";
|
|
8
|
-
const packageVersion = "15.8.
|
|
8
|
+
const packageVersion = "15.8.8";
|
|
9
9
|
export const AUTO_DISMISS_SECONDS = 8;
|
|
10
10
|
|
|
11
11
|
/**
|
package/dist/es2019/flag.js
CHANGED
|
@@ -49,7 +49,7 @@ const flagWrapperStyles = css({
|
|
|
49
49
|
const analyticsAttributes = {
|
|
50
50
|
componentName: 'flag',
|
|
51
51
|
packageName: "@atlaskit/flag",
|
|
52
|
-
packageVersion: "15.8.
|
|
52
|
+
packageVersion: "15.8.8"
|
|
53
53
|
};
|
|
54
54
|
const transitionStyles = css({
|
|
55
55
|
flexGrow: 1,
|
|
@@ -147,11 +147,9 @@ const Flag = props => {
|
|
|
147
147
|
const isDismissable = isBold || isDismissAllowed;
|
|
148
148
|
const shouldRenderGap = !isBold && (description || actions.length) || isExpanded;
|
|
149
149
|
// when delayAnnouncement is available we will use a hidden content for announcement
|
|
150
|
-
const delayedAnnouncement = delayAnnouncement ? jsx(VisuallyHidden,
|
|
151
|
-
role: "alert"
|
|
152
|
-
}, title, description) : undefined;
|
|
150
|
+
const delayedAnnouncement = delayAnnouncement ? jsx(VisuallyHidden, null, title, description) : undefined;
|
|
153
151
|
return jsx("div", _extends({
|
|
154
|
-
role:
|
|
152
|
+
role: "alert",
|
|
155
153
|
css: flagWrapperStyles,
|
|
156
154
|
"data-testid": testId
|
|
157
155
|
}, autoDismissProps), jsx(Box, {
|
|
@@ -184,7 +182,10 @@ const Flag = props => {
|
|
|
184
182
|
as: `h${headingLevel}`,
|
|
185
183
|
size: "xsmall",
|
|
186
184
|
color: textColor
|
|
187
|
-
},
|
|
185
|
+
}, jsx("span", {
|
|
186
|
+
/* if isDelayToAnnounce is true, we will hide the content form screen reader to avoid duplicate announcement */
|
|
187
|
+
"aria-hidden": isDelayToAnnounce
|
|
188
|
+
}, title))), isDismissable ? !(isBold && !description && !actions.length) && jsx(DismissButton, {
|
|
188
189
|
testId: testId,
|
|
189
190
|
appearance: appearance,
|
|
190
191
|
isBold: isBold,
|
|
@@ -200,6 +201,8 @@ const Flag = props => {
|
|
|
200
201
|
},
|
|
201
202
|
css: descriptionStyles,
|
|
202
203
|
"data-testid": testId && `${testId}-description`
|
|
204
|
+
/* if isDelayToAnnounce is true, we will hide the content form screen reader to avoid duplicate announcement */,
|
|
205
|
+
"aria-hidden": isDelayToAnnounce
|
|
203
206
|
}, description), jsx(Actions, {
|
|
204
207
|
actions: actions,
|
|
205
208
|
appearance: appearance,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { memo } from 'react';
|
|
2
|
+
import CrossIcon from '@atlaskit/icon/glyph/cross';
|
|
2
3
|
import ChevronDownIcon from '@atlaskit/icon/glyph/hipchat/chevron-down';
|
|
3
4
|
import ChevronUpIcon from '@atlaskit/icon/glyph/hipchat/chevron-up';
|
|
4
|
-
import CrossIcon from '@atlaskit/icon/glyph/cross';
|
|
5
5
|
import { Pressable, xcss } from '@atlaskit/primitives';
|
|
6
6
|
import { flagTextColorToken } from '../theme';
|
|
7
7
|
const buttonStyles = xcss({
|
|
@@ -38,9 +38,10 @@ const DismissButtonComponent = ({
|
|
|
38
38
|
xcss: buttonStyles,
|
|
39
39
|
onClick: onClick,
|
|
40
40
|
"aria-expanded": isBold ? isExpanded : undefined,
|
|
41
|
-
testId: buttonTestId
|
|
41
|
+
testId: buttonTestId,
|
|
42
|
+
"aria-label": buttonLabel
|
|
42
43
|
}, /*#__PURE__*/React.createElement(ButtonIcon, {
|
|
43
|
-
label:
|
|
44
|
+
label: "",
|
|
44
45
|
size: size,
|
|
45
46
|
primaryColor: flagTextColorToken[appearance]
|
|
46
47
|
}));
|
|
@@ -5,7 +5,7 @@ import noop from '@atlaskit/ds-lib/noop';
|
|
|
5
5
|
import Flag from './flag';
|
|
6
6
|
import { useFlagGroup } from './flag-group';
|
|
7
7
|
var packageName = "@atlaskit/flag";
|
|
8
|
-
var packageVersion = "15.8.
|
|
8
|
+
var packageVersion = "15.8.8";
|
|
9
9
|
export var AUTO_DISMISS_SECONDS = 8;
|
|
10
10
|
|
|
11
11
|
/**
|
package/dist/esm/flag.js
CHANGED
|
@@ -53,7 +53,7 @@ var flagWrapperStyles = css({
|
|
|
53
53
|
var analyticsAttributes = {
|
|
54
54
|
componentName: 'flag',
|
|
55
55
|
packageName: "@atlaskit/flag",
|
|
56
|
-
packageVersion: "15.8.
|
|
56
|
+
packageVersion: "15.8.8"
|
|
57
57
|
};
|
|
58
58
|
var transitionStyles = css({
|
|
59
59
|
flexGrow: 1,
|
|
@@ -159,11 +159,9 @@ var Flag = function Flag(props) {
|
|
|
159
159
|
var isDismissable = isBold || isDismissAllowed;
|
|
160
160
|
var shouldRenderGap = !isBold && (description || actions.length) || isExpanded;
|
|
161
161
|
// when delayAnnouncement is available we will use a hidden content for announcement
|
|
162
|
-
var delayedAnnouncement = delayAnnouncement ? jsx(VisuallyHidden,
|
|
163
|
-
role: "alert"
|
|
164
|
-
}, title, description) : undefined;
|
|
162
|
+
var delayedAnnouncement = delayAnnouncement ? jsx(VisuallyHidden, null, title, description) : undefined;
|
|
165
163
|
return jsx("div", _extends({
|
|
166
|
-
role:
|
|
164
|
+
role: "alert",
|
|
167
165
|
css: flagWrapperStyles,
|
|
168
166
|
"data-testid": testId
|
|
169
167
|
}, autoDismissProps), jsx(Box, {
|
|
@@ -194,7 +192,10 @@ var Flag = function Flag(props) {
|
|
|
194
192
|
as: "h".concat(headingLevel),
|
|
195
193
|
size: "xsmall",
|
|
196
194
|
color: textColor
|
|
197
|
-
},
|
|
195
|
+
}, jsx("span", {
|
|
196
|
+
/* if isDelayToAnnounce is true, we will hide the content form screen reader to avoid duplicate announcement */
|
|
197
|
+
"aria-hidden": isDelayToAnnounce
|
|
198
|
+
}, title))), isDismissable ? !(isBold && !description && !actions.length) && jsx(DismissButton, {
|
|
198
199
|
testId: testId,
|
|
199
200
|
appearance: appearance,
|
|
200
201
|
isBold: isBold,
|
|
@@ -210,6 +211,8 @@ var Flag = function Flag(props) {
|
|
|
210
211
|
},
|
|
211
212
|
css: descriptionStyles,
|
|
212
213
|
"data-testid": testId && "".concat(testId, "-description")
|
|
214
|
+
/* if isDelayToAnnounce is true, we will hide the content form screen reader to avoid duplicate announcement */,
|
|
215
|
+
"aria-hidden": isDelayToAnnounce
|
|
213
216
|
}, description), jsx(Actions, {
|
|
214
217
|
actions: actions,
|
|
215
218
|
appearance: appearance,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { memo } from 'react';
|
|
2
|
+
import CrossIcon from '@atlaskit/icon/glyph/cross';
|
|
2
3
|
import ChevronDownIcon from '@atlaskit/icon/glyph/hipchat/chevron-down';
|
|
3
4
|
import ChevronUpIcon from '@atlaskit/icon/glyph/hipchat/chevron-up';
|
|
4
|
-
import CrossIcon from '@atlaskit/icon/glyph/cross';
|
|
5
5
|
import { Pressable, xcss } from '@atlaskit/primitives';
|
|
6
6
|
import { flagTextColorToken } from '../theme';
|
|
7
7
|
var buttonStyles = xcss({
|
|
@@ -37,9 +37,10 @@ var DismissButtonComponent = function DismissButtonComponent(_ref) {
|
|
|
37
37
|
xcss: buttonStyles,
|
|
38
38
|
onClick: onClick,
|
|
39
39
|
"aria-expanded": isBold ? isExpanded : undefined,
|
|
40
|
-
testId: buttonTestId
|
|
40
|
+
testId: buttonTestId,
|
|
41
|
+
"aria-label": buttonLabel
|
|
41
42
|
}, /*#__PURE__*/React.createElement(ButtonIcon, {
|
|
42
|
-
label:
|
|
43
|
+
label: "",
|
|
43
44
|
size: size,
|
|
44
45
|
primaryColor: flagTextColorToken[appearance]
|
|
45
46
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/flag",
|
|
3
|
-
"version": "15.8.
|
|
3
|
+
"version": "15.8.8",
|
|
4
4
|
"description": "A flag is used for confirmations, alerts, and acknowledgments that require minimal user interaction, often displayed using a flag group.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -43,15 +43,15 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
46
|
-
"@atlaskit/button": "^20.
|
|
47
|
-
"@atlaskit/ds-lib": "^3.
|
|
46
|
+
"@atlaskit/button": "^20.3.0",
|
|
47
|
+
"@atlaskit/ds-lib": "^3.2.0",
|
|
48
48
|
"@atlaskit/heading": "^2.4.0",
|
|
49
|
-
"@atlaskit/icon": "^22.
|
|
49
|
+
"@atlaskit/icon": "^22.24.0",
|
|
50
50
|
"@atlaskit/motion": "^1.9.0",
|
|
51
51
|
"@atlaskit/portal": "^4.9.0",
|
|
52
|
-
"@atlaskit/primitives": "^
|
|
52
|
+
"@atlaskit/primitives": "^13.1.0",
|
|
53
53
|
"@atlaskit/theme": "^14.0.0",
|
|
54
|
-
"@atlaskit/tokens": "^2.
|
|
54
|
+
"@atlaskit/tokens": "^2.2.0",
|
|
55
55
|
"@atlaskit/visually-hidden": "^1.5.0",
|
|
56
56
|
"@babel/runtime": "^7.0.0",
|
|
57
57
|
"@emotion/react": "^11.7.1"
|