@atlassian/aui 9.12.0 → 9.12.2
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/dist/aui/aui-prototyping-design-tokens-api-full.js +1 -1
- package/dist/aui/aui-prototyping-design-tokens-api.js +1 -1
- package/dist/aui/aui-prototyping-design-tokens-base-themes-css.css +1 -1
- package/dist/aui/aui-prototyping-design-tokens-base-themes-css.js +1 -1
- package/dist/aui/aui-prototyping-design-tokens-base-themes.js +1 -1
- package/dist/aui/aui-prototyping.css +2 -2
- package/dist/aui/aui-prototyping.css.map +1 -1
- package/dist/aui/aui-prototyping.js +4 -4
- package/dist/aui/aui-prototyping.js.map +1 -1
- package/dist/aui/aui-prototyping.nodeps.css +2 -2
- package/dist/aui/aui-prototyping.nodeps.css.map +1 -1
- package/dist/aui/aui-prototyping.nodeps.js +7 -7
- package/dist/aui/aui-prototyping.nodeps.js.map +1 -1
- package/package.json +6 -8
- package/src/js/aui/flag.js +39 -13
- package/src/js/aui/internal/i18n/aui.js +5 -1
- package/src/js/aui/select.js +0 -1
- package/src/js/aui/sidebar.js +0 -1
- package/src/less/aui-appheader.less +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlassian/aui",
|
|
3
3
|
"description": "Atlassian User Interface library",
|
|
4
|
-
"version": "9.12.
|
|
4
|
+
"version": "9.12.2",
|
|
5
5
|
"author": "Atlassian Pty Ltd.",
|
|
6
6
|
"homepage": "https://aui.atlassian.com",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -36,12 +36,13 @@
|
|
|
36
36
|
"jquery": "^2 || ^3"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
+
"@atlassian/adg-server-iconfont": "3.1.0",
|
|
39
40
|
"@atlaskit/tokens": "1.58.0",
|
|
40
41
|
"@atlassian/tipsy": "1.3.3",
|
|
41
42
|
"@popperjs/core": "2.11.8",
|
|
42
43
|
"backbone": "1.6.0",
|
|
43
44
|
"css.escape": "1.5.1",
|
|
44
|
-
"dompurify": "2.5.
|
|
45
|
+
"dompurify": "2.5.7",
|
|
45
46
|
"fancy-file-input": "2.0.4",
|
|
46
47
|
"jquery-ui": "1.13.3",
|
|
47
48
|
"skatejs": "0.13.17",
|
|
@@ -55,17 +56,14 @@
|
|
|
55
56
|
"jquery.hotkeys": "file:src/js-vendor/jquery.hotkeys"
|
|
56
57
|
},
|
|
57
58
|
"devDependencies": {
|
|
58
|
-
"@atlassian/adg-server-iconfont": "3.1.0",
|
|
59
59
|
"@atlassian/aui-webpack-config": "3.0.1",
|
|
60
|
-
"@babel/core": "7.
|
|
61
|
-
"@babel/preset-env": "7.
|
|
62
|
-
"cross-env": "7.0.3",
|
|
63
|
-
"eslint": "9.7.0",
|
|
60
|
+
"@babel/core": "7.24.9",
|
|
61
|
+
"@babel/preset-env": "7.24.8",
|
|
64
62
|
"fs-extra": "9.1.0",
|
|
65
63
|
"ignore-emit-webpack-plugin": "2.0.6",
|
|
66
64
|
"jquery": "3.5.1",
|
|
67
65
|
"jquery-migrate": "3.5.2",
|
|
68
|
-
"less": "
|
|
66
|
+
"less": "4.2.0",
|
|
69
67
|
"react": "18.3.1"
|
|
70
68
|
},
|
|
71
69
|
"scripts": {
|
package/src/js/aui/flag.js
CHANGED
|
@@ -9,6 +9,7 @@ import escapeHtml from './escape-html';
|
|
|
9
9
|
import { CLOSE_BUTTON } from './close-button';
|
|
10
10
|
import { FOCUSABLE_QUERY } from './internal/a11y/focusable-query';
|
|
11
11
|
import getFocusManager from './focus-manager';
|
|
12
|
+
import { I18n } from './i18n';
|
|
12
13
|
|
|
13
14
|
const AUTO_CLOSE_TIME = 8000;
|
|
14
15
|
const ID_FLAG_CONTAINER = 'aui-flag-container';
|
|
@@ -39,17 +40,12 @@ function flag (flagOptions) {
|
|
|
39
40
|
|
|
40
41
|
handleFlagContainer();
|
|
41
42
|
insertFlag($flag);
|
|
43
|
+
|
|
42
44
|
setTimeout(function () {
|
|
43
45
|
if ($flag.attr('aui-focus-trap') === 'true') {
|
|
44
46
|
getFocusManager.global.enter($flag);
|
|
45
47
|
}
|
|
46
|
-
}, 0)
|
|
47
|
-
|
|
48
|
-
setTimeout(function () {
|
|
49
|
-
$flag.attr({
|
|
50
|
-
'aria-hidden': false
|
|
51
|
-
});
|
|
52
|
-
}, 100)
|
|
48
|
+
}, 0)
|
|
53
49
|
|
|
54
50
|
return $flag.get(0);
|
|
55
51
|
}
|
|
@@ -62,10 +58,28 @@ function extendFlagElement ($flag) {
|
|
|
62
58
|
};
|
|
63
59
|
}
|
|
64
60
|
|
|
65
|
-
function
|
|
61
|
+
function getDefaultAriaLabelForFlagType(type) {
|
|
62
|
+
switch (type) {
|
|
63
|
+
case 'success':
|
|
64
|
+
return I18n.getText('aui.flag.default-aria-label.success');
|
|
65
|
+
case 'warning':
|
|
66
|
+
return I18n.getText('aui.flag.default-aria-label.warning');
|
|
67
|
+
case 'error':
|
|
68
|
+
return I18n.getText('aui.flag.default-aria-label.error');
|
|
69
|
+
default:
|
|
70
|
+
return I18n.getText('aui.flag.default-aria-label.info');
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function renderFlagElement ({ body, title, close, type, ariaLive, ariaLabel, ariaDescription }) {
|
|
66
75
|
const titleHtml = title ? `<p class="title"><strong>${escapeHtml(title)}</strong></p>` : '';
|
|
67
76
|
const html = `<div class="aui-message">${titleHtml}</div>`;
|
|
68
|
-
|
|
77
|
+
if (!ariaLabel) {
|
|
78
|
+
ariaLabel = getDefaultAriaLabelForFlagType(type);
|
|
79
|
+
}
|
|
80
|
+
if (!ariaDescription) {
|
|
81
|
+
ariaDescription = '';
|
|
82
|
+
}
|
|
69
83
|
|
|
70
84
|
const $message = $(html)
|
|
71
85
|
.append($.parseHTML(body || ''))
|
|
@@ -74,7 +88,16 @@ function renderFlagElement ({ body, title, close, type, ariaLive }) {
|
|
|
74
88
|
const isFocusable = $message.find(FOCUSABLE_QUERY).length > 0;
|
|
75
89
|
const ariaRole = isFocusable ? 'alertdialog' : 'alert';
|
|
76
90
|
|
|
77
|
-
return $(
|
|
91
|
+
return $('<div class="aui-flag"></div>')
|
|
92
|
+
.attr({
|
|
93
|
+
'aui-focus-trap': `${isFocusable}`,
|
|
94
|
+
'aria-label': escapeHtml(ariaLabel),
|
|
95
|
+
'aria-hidden': 'false',
|
|
96
|
+
'aria-live': escapeHtml(ariaLive),
|
|
97
|
+
'role': ariaRole,
|
|
98
|
+
...(!!ariaDescription ? {'aria-description': escapeHtml(ariaDescription)} : {}),
|
|
99
|
+
})
|
|
100
|
+
.append($message);
|
|
78
101
|
}
|
|
79
102
|
|
|
80
103
|
function makeCloseable ($flag) {
|
|
@@ -104,13 +127,16 @@ function makeAutoClosable ($flag, duration) {
|
|
|
104
127
|
function closeFlag ($flagToClose) {
|
|
105
128
|
const flag = $flagToClose.get(0);
|
|
106
129
|
|
|
130
|
+
if ($flagToClose.attr('aui-focus-trap')) {
|
|
131
|
+
getFocusManager.global.exit($flagToClose);
|
|
132
|
+
}
|
|
133
|
+
|
|
107
134
|
flag.removeAttribute('open');
|
|
108
135
|
flag.setAttribute('inert', '');
|
|
109
136
|
flag.setAttribute('aria-hidden', true);
|
|
137
|
+
flag.style.display = 'none';
|
|
110
138
|
flag.dispatchEvent(new CustomEvent('aui-flag-close', { bubbles: true }));
|
|
111
|
-
|
|
112
|
-
getFocusManager.global.exit($flagToClose);
|
|
113
|
-
}
|
|
139
|
+
|
|
114
140
|
|
|
115
141
|
return flag;
|
|
116
142
|
}
|
|
@@ -78,5 +78,9 @@ export default {
|
|
|
78
78
|
'ajs.datepicker.localisations.month-names.november': 'November',
|
|
79
79
|
'ajs.datepicker.localisations.month-names.december': 'December',
|
|
80
80
|
'ajs.datepicker.localisations.show-month-after-year': false,
|
|
81
|
-
'ajs.datepicker.localisations.year-suffix': ''
|
|
81
|
+
'ajs.datepicker.localisations.year-suffix': '',
|
|
82
|
+
'aui.flag.default-aria-label.info': 'New information message',
|
|
83
|
+
'aui.flag.default-aria-label.success': 'New confirmation message',
|
|
84
|
+
'aui.flag.default-aria-label.warning': 'New warning message',
|
|
85
|
+
'aui.flag.default-aria-label.error': 'New error message',
|
|
82
86
|
}
|
package/src/js/aui/select.js
CHANGED
|
@@ -219,7 +219,6 @@ function initialiseProgressiveDataSet (element) {
|
|
|
219
219
|
// Otherwise progressive data set can do everything else for us:
|
|
220
220
|
// 1. Sync matching
|
|
221
221
|
// 2. Async fetching and matching
|
|
222
|
-
/* eslint-disable complexity */
|
|
223
222
|
element._progressiveDataSet.on('respond', function (data) {
|
|
224
223
|
// This means that a query was made before the input was cleared and
|
|
225
224
|
// we should cancel the response.
|
package/src/js/aui/sidebar.js
CHANGED
|
@@ -211,7 +211,6 @@ Sidebar.prototype.responsiveReflow = function responsiveReflow(isInitialPageLoad
|
|
|
211
211
|
if (isAnimated) {
|
|
212
212
|
// We must trigger a CSS reflow (by accessing
|
|
213
213
|
// offsetHeight) otherwise the transition still runs.
|
|
214
|
-
// eslint-disable-next-line
|
|
215
214
|
this.$el[0].offsetHeight;
|
|
216
215
|
this.$el.addClass('aui-is-animated');
|
|
217
216
|
}
|