@atlassian/aui 9.2.0 → 9.2.4
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.css +4 -4
- package/dist/aui/aui-prototyping.js +12 -12
- package/dist/aui/aui-prototyping.js.map +1 -1
- package/dist/aui/aui-prototyping.nodeps.css +4 -4
- package/dist/aui/aui-prototyping.nodeps.js +12 -12
- package/dist/aui/aui-prototyping.nodeps.js.map +1 -1
- package/package.json +16 -15
- package/src/js/aui/date-picker.js +5 -0
- package/src/js/aui/dropdown2.js +1 -1
- package/src/js/aui/focus-manager.js +5 -3
- package/src/js/aui/i18n.js +6 -1
- package/src/js/aui/inline-dialog.js +1 -1
- package/src/js/aui/messages.js +1 -1
- package/src/js/aui/restful-table.js +3 -1
- package/src/js/aui/tabs.js +6 -4
- package/src/less/aui-buttons.less +16 -0
- package/src/less/aui-select2.less +9 -4
- package/src/less/forms-current.less +5 -4
- package/src/less/imports/mixins/dropdown2-trigger-chevron-icon.less +2 -2
- package/src/less/single-select.less +0 -2
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.2.
|
|
4
|
+
"version": "9.2.4",
|
|
5
5
|
"author": "Atlassian Pty Ltd.",
|
|
6
6
|
"homepage": "https://aui.atlassian.com",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -28,35 +28,36 @@
|
|
|
28
28
|
"README.md",
|
|
29
29
|
"yarn.lock"
|
|
30
30
|
],
|
|
31
|
+
"//": "AUI's publishConfig is managed by its build scripts.",
|
|
31
32
|
"peerDependencies": {
|
|
32
33
|
"jquery": "^2 || ^3"
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
35
|
-
"@atlassian/tipsy": "
|
|
36
|
-
"@popperjs/core": "
|
|
37
|
-
"backbone": "
|
|
36
|
+
"@atlassian/tipsy": "1.3.3",
|
|
37
|
+
"@popperjs/core": "2.4.4",
|
|
38
|
+
"backbone": "1.4.0",
|
|
38
39
|
"css.escape": "1.5.0",
|
|
39
|
-
"fancy-file-input": "
|
|
40
|
-
"jquery-ui": "
|
|
40
|
+
"fancy-file-input": "2.0.4",
|
|
41
|
+
"jquery-ui": "1.12.1",
|
|
41
42
|
"skatejs": "0.13.17",
|
|
42
43
|
"skatejs-template-html": "0.0.0",
|
|
43
44
|
"trim-extra-html-whitespace": "1.3.0",
|
|
44
|
-
"underscore": "
|
|
45
|
+
"underscore": "1.13.1"
|
|
45
46
|
},
|
|
46
47
|
"devDependencies": {
|
|
47
48
|
"@atlassian/adg-server-iconfont": "3.1.0",
|
|
48
49
|
"@atlassian/aui-webpack-config": "2.0.0",
|
|
49
|
-
"@babel/core": "
|
|
50
|
-
"@babel/preset-env": "
|
|
50
|
+
"@babel/core": "7.13.14",
|
|
51
|
+
"@babel/preset-env": "7.13.12",
|
|
51
52
|
"bundlesize": "^1.0.0-beta.2",
|
|
52
|
-
"cross-env": "
|
|
53
|
-
"eslint": "
|
|
54
|
-
"glob": "
|
|
53
|
+
"cross-env": "7.0.3",
|
|
54
|
+
"eslint": "7.24.0",
|
|
55
|
+
"glob": "7.1.2",
|
|
55
56
|
"ignore-emit-webpack-plugin": "^2.0.2",
|
|
56
|
-
"jquery": "
|
|
57
|
-
"jquery-migrate": "
|
|
57
|
+
"jquery": "3.5.1",
|
|
58
|
+
"jquery-migrate": "3.3.2",
|
|
58
59
|
"less": "3.11.1",
|
|
59
|
-
"webpack-cli": "
|
|
60
|
+
"webpack-cli": "3.3.12"
|
|
60
61
|
},
|
|
61
62
|
"scripts": {
|
|
62
63
|
"prepublishOnly": "yarn clean && cross-env NODE_ENV=production yarn build",
|
|
@@ -337,6 +337,11 @@ const initPolyfill = function (datePicker) {
|
|
|
337
337
|
// shows that changing the `type` of input does not erase its value.
|
|
338
338
|
// see https://codepen.io/chrisdarroch/pen/YzwgjyJ
|
|
339
339
|
$field.prop('type', 'text');
|
|
340
|
+
// Set default value on initialization to handle all date formats.
|
|
341
|
+
// It is possible, because of changing type to text on the line above.
|
|
342
|
+
$field.val($field.attr('value'));
|
|
343
|
+
// Trigger change to update calendar popup value.
|
|
344
|
+
$field.trigger('propertychange');
|
|
340
345
|
|
|
341
346
|
// demonstrate the polyfill is initialised
|
|
342
347
|
$field.attr('data-aui-dp-uuid', datePickerUUID);
|
package/src/js/aui/dropdown2.js
CHANGED
|
@@ -12,10 +12,10 @@ import keyCode from './key-code';
|
|
|
12
12
|
import layer from './layer';
|
|
13
13
|
import state from './internal/state';
|
|
14
14
|
import skate from './internal/skate';
|
|
15
|
+
import escapeHtml from './escape-html';
|
|
15
16
|
import {ifGone} from './internal/elements';
|
|
16
17
|
import {doIfTrigger, setTrigger} from './trigger';
|
|
17
18
|
import generateUniqueId from './unique-id';
|
|
18
|
-
import escapeHtml from './escape-html';
|
|
19
19
|
|
|
20
20
|
function isHidden(el) {
|
|
21
21
|
return el.hasAttribute('hidden') || el.classList.contains('hidden');
|
|
@@ -30,7 +30,7 @@ import {getTrigger} from './trigger';
|
|
|
30
30
|
}
|
|
31
31
|
return imageMap && visible(imageMap);
|
|
32
32
|
}
|
|
33
|
-
var isFormElement = /input|select|textarea|button|object/.test(nodeName);
|
|
33
|
+
var isFormElement = /input|select|textarea|button|object|iframe/.test(nodeName);
|
|
34
34
|
var isAnchor = nodeName === 'a';
|
|
35
35
|
var isAnchorTabbable = (element.href || isTabIndexNotNaN);
|
|
36
36
|
|
|
@@ -205,8 +205,10 @@ function focusTrapHandler(focusTrapStack, event) {
|
|
|
205
205
|
newFocusIdx = 0;
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
$tabbableElements.
|
|
209
|
-
|
|
208
|
+
if ($tabbableElements.get(newFocusIdx).nodeName !== 'IFRAME') {
|
|
209
|
+
$tabbableElements.eq(newFocusIdx).trigger('focus');
|
|
210
|
+
event.preventDefault();
|
|
211
|
+
}
|
|
210
212
|
}
|
|
211
213
|
|
|
212
214
|
// AUI-4403 - Previous maintainers pretended multiple FocusManager instances made sense.
|
package/src/js/aui/i18n.js
CHANGED
|
@@ -7,7 +7,7 @@ import keys from './internal/i18n/aui';
|
|
|
7
7
|
* the key is returned - this could occur in plugin mode if the I18n transform is not performed;
|
|
8
8
|
* or in flatpack mode if the i18n JS file is not loaded.
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
const I18n = {
|
|
11
11
|
keys: keys,
|
|
12
12
|
getText: function (key, ...params) {
|
|
13
13
|
if (Object.prototype.hasOwnProperty.call(this.keys, key)) {
|
|
@@ -18,6 +18,11 @@ export var I18n = {
|
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
+
export {
|
|
22
|
+
I18n,
|
|
23
|
+
format
|
|
24
|
+
}
|
|
25
|
+
|
|
21
26
|
/**
|
|
22
27
|
* Deprecated - do not use AJS.I18n.getText from global scope within AUI code. Use import { I18n } from '../i18n'
|
|
23
28
|
* Also keep in mind that WRM is looking for patterns like "I18n.getText" so do not create
|
|
@@ -6,7 +6,7 @@ import globalize from './internal/globalize';
|
|
|
6
6
|
import keyCode from './key-code';
|
|
7
7
|
import cssEscape from 'css.escape';
|
|
8
8
|
|
|
9
|
-
/* eslint
|
|
9
|
+
/* eslint quotes:off, eqeqeq:off, strict:off, complexity:off */
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Creates a new inline dialog.
|
package/src/js/aui/messages.js
CHANGED
|
@@ -207,7 +207,7 @@ $.fn.closeMessage = function () {
|
|
|
207
207
|
var $message = $(this);
|
|
208
208
|
if ($message.hasClass('aui-message') && $message.hasClass('closeable')) {
|
|
209
209
|
$message.stop(true); //Stop any running animation
|
|
210
|
-
$message.trigger('messageClose', [this]);
|
|
210
|
+
$message.trigger('messageClose', [this]); //messageClose event Deprecated as of 5.3
|
|
211
211
|
$message.remove();
|
|
212
212
|
$(document).trigger('aui-message-close', [this]); //must trigger on document since the element has been removed
|
|
213
213
|
}
|
|
@@ -251,7 +251,9 @@ var RestfulTable = Backbone.View.extend({
|
|
|
251
251
|
this._applyFocusCoordinator(this._createRow);
|
|
252
252
|
|
|
253
253
|
// focus create row
|
|
254
|
-
|
|
254
|
+
if (this.options.autoFocus) {
|
|
255
|
+
this._createRow.trigger(this._event.FOCUS);
|
|
256
|
+
}
|
|
255
257
|
}
|
|
256
258
|
|
|
257
259
|
// when a model is removed from the collection, remove it from the viewport also
|
package/src/js/aui/tabs.js
CHANGED
|
@@ -214,7 +214,7 @@ function calculateResponsiveTabs(tabsContainer, index) {
|
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
if (!$tabsContainer.hasClass('aui-tabs-disabled')) {
|
|
217
|
-
$dropdown.on('click', 'a', handleTabClick);
|
|
217
|
+
$dropdown.on('click.aui-tabs', 'a', handleTabClick);
|
|
218
218
|
}
|
|
219
219
|
|
|
220
220
|
/* Workaround for bug in Edge where the dom is just not being re-rendered properly
|
|
@@ -315,6 +315,7 @@ function updateTabsFromLocalStorage($tabGroups) {
|
|
|
315
315
|
if (persistentTabId) {
|
|
316
316
|
var anchor = tabs.querySelector(`a[href$="${persistentTabId}"]`);
|
|
317
317
|
|
|
318
|
+
// eslint-disable-next-line max-depth
|
|
318
319
|
if (anchor) {
|
|
319
320
|
switchToTab(anchor);
|
|
320
321
|
}
|
|
@@ -370,7 +371,7 @@ function getResponsiveTabs () {
|
|
|
370
371
|
function initWindow () {
|
|
371
372
|
const handler = debounce(responsiveResizeHandler, 200);
|
|
372
373
|
handler(getResponsiveTabs());
|
|
373
|
-
$(window).on('resize', () => handler(getResponsiveTabs()));
|
|
374
|
+
$(window).on('resize.aui-tabs', () => handler(getResponsiveTabs()));
|
|
374
375
|
}
|
|
375
376
|
|
|
376
377
|
function initTab (tab) {
|
|
@@ -391,7 +392,7 @@ function initTab (tab) {
|
|
|
391
392
|
});
|
|
392
393
|
|
|
393
394
|
// Set up click event for tabs
|
|
394
|
-
$tabMenu.on('click', 'a', handleTabClick);
|
|
395
|
+
$tabMenu.on('click.aui-tabs', 'a', handleTabClick);
|
|
395
396
|
$tab.data('aui-tab-events-bound', true);
|
|
396
397
|
|
|
397
398
|
initPanes(tab);
|
|
@@ -439,7 +440,8 @@ var tabs = {
|
|
|
439
440
|
},
|
|
440
441
|
|
|
441
442
|
change: function (a) {
|
|
442
|
-
var $a
|
|
443
|
+
var collection = a instanceof HTMLElement || a instanceof $ ? a : document.querySelector(a);
|
|
444
|
+
var $a = $(collection).first();
|
|
443
445
|
var $tabGroup = $a.closest('.aui-tabs');
|
|
444
446
|
|
|
445
447
|
switchToTab($a);
|
|
@@ -237,6 +237,22 @@ a.aui-button,
|
|
|
237
237
|
vertical-align: middle;
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
+
// Button link - icon and text
|
|
241
|
+
.aui-button.aui-button-link.aui-button-link-icon-text {
|
|
242
|
+
&:hover,
|
|
243
|
+
&:focus {
|
|
244
|
+
text-underline-position: under;
|
|
245
|
+
|
|
246
|
+
.aui-icon {
|
|
247
|
+
// Align icon with underline from parent (button)
|
|
248
|
+
text-underline-position: from-font;
|
|
249
|
+
// Safari works without above (but other browsers need it)
|
|
250
|
+
// It lowers underline on icon, but not on text (Safari)
|
|
251
|
+
text-underline-offset: 1px;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
240
256
|
// Icon Colours
|
|
241
257
|
// ----------
|
|
242
258
|
.aui-button .aui-icon {
|
|
@@ -234,14 +234,16 @@
|
|
|
234
234
|
.aui-select2-container.select2-container .select2-choice:after {
|
|
235
235
|
#aui.icon-pseudoelement();
|
|
236
236
|
content: @aui-glyph-chevron-down;
|
|
237
|
-
left: 100%; /* "left" + "margin-left" required because of webkit not working properly with "right" */
|
|
238
237
|
height: 0;
|
|
239
238
|
margin-left: -18px;
|
|
240
239
|
margin-top: -2px;
|
|
241
240
|
opacity: 1;
|
|
242
241
|
position: absolute;
|
|
243
|
-
top:
|
|
242
|
+
top: calc(50% - 10px);
|
|
244
243
|
width: 0;
|
|
244
|
+
font-size: 16px;
|
|
245
|
+
line-height: 24px;
|
|
246
|
+
right: 22px;
|
|
245
247
|
}
|
|
246
248
|
|
|
247
249
|
/* Set the default text color to inherit.
|
|
@@ -272,9 +274,12 @@
|
|
|
272
274
|
.aui-select2-container.select2-container-multi .select2-choices {
|
|
273
275
|
#aui-forms.aui-select2-input-field-style(normal);
|
|
274
276
|
#aui.icon(@aui-glyph-chevron-down, {
|
|
275
|
-
font-size:
|
|
277
|
+
font-size: 16.5px;
|
|
276
278
|
left: inherit;
|
|
277
|
-
|
|
279
|
+
color: var(--aui-button-default-text-color);
|
|
280
|
+
right: 3px;
|
|
281
|
+
top: 50%;
|
|
282
|
+
line-height: 16px;
|
|
278
283
|
});
|
|
279
284
|
|
|
280
285
|
min-height: 0;
|
|
@@ -243,13 +243,14 @@ form.aui:not(.aui-legacy-forms) {
|
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
// both are @ak-color-N600
|
|
246
|
-
@chevron-dark: url('data:image/svg+xml,%3Csvg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath fill="%23A5ADBA" d="
|
|
247
|
-
@chevron-light: url('data:image/svg+xml,%3Csvg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath fill="%23344563" d="
|
|
246
|
+
@chevron-dark: url('data:image/svg+xml,%3Csvg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath fill="%23A5ADBA" d="M8.292 10.293a1.009 1.009 0 000 1.419l2.939 2.965c.218.215.5.322.779.322s.556-.107.769-.322l2.93-2.955a1.01 1.01 0 000-1.419.987.987 0 00-1.406 0l-2.298 2.317-2.307-2.327a.99.99 0 00-1.406 0z"/%3E%3C/svg%3E%0A');
|
|
247
|
+
@chevron-light: url('data:image/svg+xml,%3Csvg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath fill="%23344563" d="M8.292 10.293a1.009 1.009 0 000 1.419l2.939 2.965c.218.215.5.322.779.322s.556-.107.769-.322l2.93-2.955a1.01 1.01 0 000-1.419.987.987 0 00-1.406 0l-2.298 2.317-2.307-2.327a.99.99 0 00-1.406 0z"/%3E%3C/svg%3E%0A');
|
|
248
248
|
|
|
249
249
|
select[disabled]:not([size]),
|
|
250
250
|
.select:not([size]) {
|
|
251
251
|
background-repeat: no-repeat;
|
|
252
|
-
background-position: 100% 50%;
|
|
252
|
+
background-position: calc(100% + 1.5px) 50%;
|
|
253
|
+
background-size: 25px;
|
|
253
254
|
}
|
|
254
255
|
|
|
255
256
|
select.select[disabled]:not([size]) {
|
|
@@ -259,7 +260,7 @@ form.aui:not(.aui-legacy-forms) {
|
|
|
259
260
|
}
|
|
260
261
|
|
|
261
262
|
select.select:not([size]) {
|
|
262
|
-
padding-right:
|
|
263
|
+
padding-right: 20px;
|
|
263
264
|
background-image: @chevron-light;
|
|
264
265
|
}
|
|
265
266
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
#aui {
|
|
4
4
|
.aui-dropdown2-trigger-chevron-icon(@glyphsize: @aui-icon-size-small; @canvassize: @aui-icon-size-small-canvas) {
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
#aui.icon-pseudoelement(@aui-icon-font-family);
|
|
7
7
|
content: @aui-glyph-chevron-down;
|
|
8
8
|
font-size: @glyphsize;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
line-height: 1;
|
|
11
11
|
margin-top: -(@glyphsize / 2);
|
|
12
12
|
position: absolute;
|
|
13
|
-
right:
|
|
13
|
+
right: 3.5px;
|
|
14
14
|
top: 50%;
|
|
15
15
|
text-indent: 0; // Reset indentation set by split button
|
|
16
16
|
width: @glyphsize;
|