@atlassian/aui 9.10.1 → 9.11.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/dist/aui/aui-prototyping-design-tokens-api-full.js +2 -2
- package/dist/aui/aui-prototyping-design-tokens-api-full.js.map +1 -1
- package/dist/aui/aui-prototyping-design-tokens-api.js +2 -2
- package/dist/aui/aui-prototyping-design-tokens-api.js.map +1 -1
- package/dist/aui/aui-prototyping-design-tokens-base-themes-css.css +2 -2
- package/dist/aui/aui-prototyping-design-tokens-base-themes-css.css.map +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 +2 -2
- package/dist/aui/aui-prototyping-design-tokens-base-themes.js.map +1 -1
- package/dist/aui/aui-prototyping.css +1 -1
- package/dist/aui/aui-prototyping.css.map +1 -1
- package/dist/aui/aui-prototyping.js +7 -7
- package/dist/aui/aui-prototyping.js.map +1 -1
- package/dist/aui/aui-prototyping.nodeps.css +1 -1
- package/dist/aui/aui-prototyping.nodeps.css.map +1 -1
- package/dist/aui/aui-prototyping.nodeps.js +15 -15
- package/dist/aui/aui-prototyping.nodeps.js.map +1 -1
- package/dist/aui/themes/dark.js +1 -1
- package/dist/aui/themes/dark.js.map +1 -1
- package/dist/aui/themes/legacy-dark.js +1 -1
- package/dist/aui/themes/legacy-dark.js.map +1 -1
- package/dist/aui/themes/legacy-light.js +1 -1
- package/dist/aui/themes/legacy-light.js.map +1 -1
- package/dist/aui/themes/light.js +1 -1
- package/dist/aui/themes/light.js.map +1 -1
- package/dist/aui/themes/typography-adg3.js +1 -1
- package/dist/aui/themes/typography-adg3.js.map +1 -1
- package/dist/aui/themes/typography-minor3.js +1 -1
- package/dist/aui/themes/typography-minor3.js.map +1 -1
- package/entry/token-themes-generated/npm/aui-prototyping-design-tokens-base-themes.css +2 -0
- package/entry/token-themes-generated/npm/themes/dark.js +1 -0
- package/entry/token-themes-generated/npm/themes/legacy-dark.js +1 -0
- package/entry/token-themes-generated/npm/themes/legacy-light.js +1 -0
- package/entry/token-themes-generated/npm/themes/light.js +1 -0
- package/entry/token-themes-generated/npm/themes/typography-adg3.js +18 -16
- package/entry/token-themes-generated/npm/themes/typography-minor3.js +27 -21
- package/entry/token-themes-generated/p2/aui-prototyping-design-tokens-theme.css +2 -0
- package/entry/token-themes-generated/p2/themes/dark.js +1 -0
- package/entry/token-themes-generated/p2/themes/legacy-dark.js +1 -0
- package/entry/token-themes-generated/p2/themes/legacy-light.js +1 -0
- package/entry/token-themes-generated/p2/themes/light.js +1 -0
- package/entry/token-themes-generated/p2/themes/typography-adg3.js +18 -16
- package/entry/token-themes-generated/p2/themes/typography-minor3.js +27 -21
- package/package.json +4 -4
- package/src/js/aui/flag.js +34 -8
- package/src/js/aui/focus-manager.js +3 -1
- package/src/js/aui/internal/a11y/focusable-query.js +4 -0
- package/src/js/aui/restful-table/edit-row.js +2 -2
- package/src/js/aui/tooltip.js +3 -2
|
@@ -1,35 +1,41 @@
|
|
|
1
1
|
export default `
|
|
2
2
|
html[data-theme~="typography:typography-minor3"] {
|
|
3
3
|
--ds-UNSAFE-textTransformUppercase: uppercase;
|
|
4
|
-
--ds-font-heading-xxlarge: normal 700 2rem/2.25rem
|
|
5
|
-
--ds-font-heading-xlarge: normal 700 1.75rem/2rem
|
|
6
|
-
--ds-font-heading-large: normal 700 1.5rem/1.75rem
|
|
7
|
-
--ds-font-heading-medium: normal 700 1.25rem/1.5rem
|
|
8
|
-
--ds-font-heading-small: normal 700 1rem/1.25rem
|
|
9
|
-
--ds-font-heading-xsmall: normal 700 0.875rem/1rem
|
|
10
|
-
--ds-font-heading-xxsmall: normal 700 0.75rem/1rem
|
|
11
|
-
--ds-font-body-large: normal 400 1rem/1.5rem
|
|
12
|
-
--ds-font-body: normal 400 0.875rem/1.25rem
|
|
13
|
-
--ds-font-body-small: normal 400 0.75rem/1rem
|
|
14
|
-
--ds-font-
|
|
15
|
-
--ds-font-ui
|
|
16
|
-
--ds-font-
|
|
4
|
+
--ds-font-heading-xxlarge: normal 700 2rem/2.25rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
5
|
+
--ds-font-heading-xlarge: normal 700 1.75rem/2rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
6
|
+
--ds-font-heading-large: normal 700 1.5rem/1.75rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
7
|
+
--ds-font-heading-medium: normal 700 1.25rem/1.5rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
8
|
+
--ds-font-heading-small: normal 700 1rem/1.25rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
9
|
+
--ds-font-heading-xsmall: normal 700 0.875rem/1rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
10
|
+
--ds-font-heading-xxsmall: normal 700 0.75rem/1rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
11
|
+
--ds-font-body-large: normal 400 1rem/1.5rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
12
|
+
--ds-font-body: normal 400 0.875rem/1.25rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
13
|
+
--ds-font-body-small: normal 400 0.75rem/1rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
14
|
+
--ds-font-body-UNSAFE_small: normal 400 0.75rem/1rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
15
|
+
--ds-font-ui: normal 500 0.875rem/1 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
16
|
+
--ds-font-ui-small: normal 400 0.75rem/1 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
17
|
+
--ds-font-code: normal 400 0.875em/1 ui-monospace, Menlo, "Segoe UI Mono", "Ubuntu Mono", monospace;
|
|
17
18
|
--ds-font-letterSpacing-0: 0;
|
|
18
19
|
--ds-font-letterSpacing-100: 0;
|
|
19
20
|
--ds-font-letterSpacing-200: 0;
|
|
20
21
|
--ds-font-letterSpacing-300: 0;
|
|
21
22
|
--ds-font-letterSpacing-400: 0;
|
|
22
|
-
--ds-font-family-body: ui-sans-serif, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
23
|
+
--ds-font-family-body: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
23
24
|
--ds-font-family-code: ui-monospace, Menlo, "Segoe UI Mono", "Ubuntu Mono", monospace;
|
|
24
|
-
--ds-font-family-heading: ui-sans-serif, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
25
|
+
--ds-font-family-heading: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
25
26
|
--ds-font-family-monospace: ui-monospace, Menlo, "Segoe UI Mono", "Ubuntu Mono", monospace;
|
|
26
|
-
--ds-font-family-sans: ui-sans-serif, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
27
|
-
--ds-font-family-brand: Charlie
|
|
27
|
+
--ds-font-family-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
28
|
+
--ds-font-family-brand-body: "Charlie Text", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
29
|
+
--ds-font-family-brand-heading: "Charlie Display", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
30
|
+
--ds-font-weight-bold: 700;
|
|
31
|
+
--ds-font-weight-medium: 500;
|
|
32
|
+
--ds-font-weight-regular: 400;
|
|
33
|
+
--ds-font-weight-semibold: 600;
|
|
28
34
|
@media not all and (min-width: 64rem) {
|
|
29
|
-
--ds-font-heading-xxlarge: normal 700 1.75rem/2rem
|
|
30
|
-
--ds-font-heading-xlarge: normal 700 1.5rem/1.75rem
|
|
31
|
-
--ds-font-heading-large: normal 700 1.25rem/1.5rem
|
|
32
|
-
--ds-font-heading-medium: normal 700 1rem/1.25rem
|
|
35
|
+
--ds-font-heading-xxlarge: normal 700 1.75rem/2rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
36
|
+
--ds-font-heading-xlarge: normal 700 1.5rem/1.75rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
37
|
+
--ds-font-heading-large: normal 700 1.25rem/1.5rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
38
|
+
--ds-font-heading-medium: normal 700 1rem/1.25rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
33
39
|
}
|
|
34
40
|
}
|
|
35
41
|
`
|
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.
|
|
4
|
+
"version": "9.11.0",
|
|
5
5
|
"author": "Atlassian Pty Ltd.",
|
|
6
6
|
"homepage": "https://aui.atlassian.com",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"jquery": "^2 || ^3"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@atlaskit/tokens": "1.
|
|
36
|
+
"@atlaskit/tokens": "1.43.0",
|
|
37
37
|
"@atlassian/tipsy": "1.3.3",
|
|
38
38
|
"@popperjs/core": "2.11.8",
|
|
39
|
-
"backbone": "1.
|
|
39
|
+
"backbone": "1.6.0",
|
|
40
40
|
"css.escape": "1.5.1",
|
|
41
|
-
"dompurify": "2.
|
|
41
|
+
"dompurify": "2.5.0",
|
|
42
42
|
"fancy-file-input": "2.0.4",
|
|
43
43
|
"jquery-ui": "1.13.2",
|
|
44
44
|
"skatejs": "0.13.17",
|
package/src/js/aui/flag.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import $ from './jquery';
|
|
2
|
+
import { defaults } from 'underscore';
|
|
2
3
|
import { recomputeStyle } from './internal/animation';
|
|
3
4
|
import amdify from './internal/amdify';
|
|
4
5
|
import globalize from './internal/globalize';
|
|
5
6
|
import keyCode from './key-code';
|
|
6
7
|
import CustomEvent from './polyfills/custom-event';
|
|
7
8
|
import escapeHtml from './escape-html';
|
|
8
|
-
import {CLOSE_BUTTON} from './close-button';
|
|
9
|
+
import { CLOSE_BUTTON } from './close-button';
|
|
10
|
+
import { FOCUSABLE_QUERY } from './internal/a11y/focusable-query';
|
|
11
|
+
import getFocusManager from './focus-manager';
|
|
9
12
|
|
|
10
13
|
const AUTO_CLOSE_TIME = 8000;
|
|
11
14
|
const ID_FLAG_CONTAINER = 'aui-flag-container';
|
|
@@ -15,24 +18,38 @@ const DEFAULT_OPTIONS = {
|
|
|
15
18
|
title: '',
|
|
16
19
|
type: 'info',
|
|
17
20
|
duration: AUTO_CLOSE_TIME,
|
|
21
|
+
ariaLive: 'polite'
|
|
18
22
|
};
|
|
19
23
|
|
|
20
24
|
function flag (flagOptions) {
|
|
21
|
-
const options =
|
|
25
|
+
const options = defaults(flagOptions, DEFAULT_OPTIONS);
|
|
22
26
|
options.title = (options.title || '').toString().trim();
|
|
23
|
-
|
|
24
27
|
const $flag = renderFlagElement(options);
|
|
25
28
|
extendFlagElement($flag);
|
|
26
29
|
|
|
27
30
|
if (options.close === 'auto') {
|
|
28
31
|
makeCloseable($flag);
|
|
29
|
-
|
|
32
|
+
|
|
33
|
+
if ($flag.attr('aui-focus-trap') === 'false') {
|
|
34
|
+
makeAutoClosable($flag, options.duration);
|
|
35
|
+
}
|
|
30
36
|
} else if (options.close === 'manual') {
|
|
31
37
|
makeCloseable($flag);
|
|
32
38
|
}
|
|
33
39
|
|
|
34
40
|
handleFlagContainer();
|
|
35
41
|
insertFlag($flag);
|
|
42
|
+
setTimeout(function () {
|
|
43
|
+
if ($flag.attr('aui-focus-trap') === 'true') {
|
|
44
|
+
getFocusManager.global.enter($flag);
|
|
45
|
+
}
|
|
46
|
+
}, 0);
|
|
47
|
+
|
|
48
|
+
setTimeout(function () {
|
|
49
|
+
$flag.attr({
|
|
50
|
+
'aria-hidden': false
|
|
51
|
+
});
|
|
52
|
+
}, 100)
|
|
36
53
|
|
|
37
54
|
return $flag.get(0);
|
|
38
55
|
}
|
|
@@ -45,15 +62,19 @@ function extendFlagElement ($flag) {
|
|
|
45
62
|
};
|
|
46
63
|
}
|
|
47
64
|
|
|
48
|
-
function renderFlagElement ({body, title, close, type}) {
|
|
65
|
+
function renderFlagElement ({ body, title, close, type, ariaLive }) {
|
|
49
66
|
const titleHtml = title ? `<p class="title"><strong>${escapeHtml(title)}</strong></p>` : '';
|
|
50
67
|
const html = `<div class="aui-message">${titleHtml}</div>`;
|
|
68
|
+
const ariaLabel = title ? escapeHtml(title) : '';
|
|
51
69
|
|
|
52
70
|
const $message = $(html)
|
|
53
71
|
.append($.parseHTML(body || ''))
|
|
54
72
|
.addClass(close === 'never' ? '' : 'closeable')
|
|
55
73
|
.addClass(`aui-message-${type}`);
|
|
56
|
-
|
|
74
|
+
const isFocusable = $message.find(FOCUSABLE_QUERY).length > 0;
|
|
75
|
+
const ariaRole = isFocusable ? 'alertdialog' : 'alert';
|
|
76
|
+
|
|
77
|
+
return $(`<div aui-focus-trap="${isFocusable}" class="aui-flag" aria-label="${ariaLabel}" aria-hidden="true" aria-live="${escapeHtml(ariaLive)}" role="${ariaRole}"></div>`).append($message);
|
|
57
78
|
}
|
|
58
79
|
|
|
59
80
|
function makeCloseable ($flag) {
|
|
@@ -84,7 +105,12 @@ function closeFlag ($flagToClose) {
|
|
|
84
105
|
const flag = $flagToClose.get(0);
|
|
85
106
|
|
|
86
107
|
flag.removeAttribute('open');
|
|
87
|
-
flag.
|
|
108
|
+
flag.setAttribute('inert', '');
|
|
109
|
+
flag.setAttribute('aria-hidden', true);
|
|
110
|
+
flag.dispatchEvent(new CustomEvent('aui-flag-close', { bubbles: true }));
|
|
111
|
+
if ($flagToClose.attr('aui-focus-trap')) {
|
|
112
|
+
getFocusManager.global.exit($flagToClose);
|
|
113
|
+
}
|
|
88
114
|
|
|
89
115
|
return flag;
|
|
90
116
|
}
|
|
@@ -113,7 +139,7 @@ function insertFlag ($flag) {
|
|
|
113
139
|
|
|
114
140
|
$flag
|
|
115
141
|
.removeAttr('hidden')
|
|
116
|
-
.attr('open','');
|
|
142
|
+
.attr('open', '');
|
|
117
143
|
}
|
|
118
144
|
|
|
119
145
|
amdify('aui/flag', flag);
|
|
@@ -105,7 +105,9 @@ FocusManager.prototype.enter = function ($el, $lastFocused) {
|
|
|
105
105
|
|
|
106
106
|
FocusManager.prototype.exit = function ($el) {
|
|
107
107
|
if (elementTrapsFocus($el)) {
|
|
108
|
-
this._focusTrapStack.
|
|
108
|
+
this._focusTrapStack.splice(
|
|
109
|
+
this._focusTrapStack.indexOf($el), 1
|
|
110
|
+
);
|
|
109
111
|
if (!this._focusTrapStack.length) {
|
|
110
112
|
$(document).off('.aui-focus-manager', this._handler);
|
|
111
113
|
delete this._handler;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// eslint-disable-next-line max-len
|
|
2
|
+
export const FOCUSABLE_QUERY = 'a[href], area[href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [contenteditable], audio[controls], video[controls], summary, [tabindex^="0"], [tabindex^="1"], [tabindex^="2"], [tabindex^="3"], [tabindex^="4"], [tabindex^="5"], [tabindex^="6"], [tabindex^="7"], [tabindex^="8"], [tabindex^="9"]';
|
|
3
|
+
|
|
4
|
+
|
|
@@ -227,7 +227,7 @@ export default Backbone.View.extend({
|
|
|
227
227
|
|
|
228
228
|
this.$el.addClass(this.classNames.DISABLED)
|
|
229
229
|
.find(':submit')
|
|
230
|
-
.
|
|
230
|
+
.prop('disabled', true);
|
|
231
231
|
|
|
232
232
|
return this;
|
|
233
233
|
},
|
|
@@ -254,7 +254,7 @@ export default Backbone.View.extend({
|
|
|
254
254
|
|
|
255
255
|
this.$el.removeClass(this.classNames.DISABLED)
|
|
256
256
|
.find(':submit')
|
|
257
|
-
.
|
|
257
|
+
.prop('disabled', false);
|
|
258
258
|
|
|
259
259
|
return this;
|
|
260
260
|
},
|
package/src/js/aui/tooltip.js
CHANGED
|
@@ -48,7 +48,8 @@ const getTipNode = () => {
|
|
|
48
48
|
const toggleTooltipVisibility = (shouldBeHidden = false) => {
|
|
49
49
|
const tipNode = getTipNode();
|
|
50
50
|
if (tipNode) {
|
|
51
|
-
tipNode.classList.toggle('
|
|
51
|
+
tipNode.classList.toggle('hidden', shouldBeHidden);
|
|
52
|
+
tipNode.setAttribute('aria-hidden', shouldBeHidden);
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
55
|
|
|
@@ -136,7 +137,7 @@ class Tooltip {
|
|
|
136
137
|
|
|
137
138
|
initContainer() {
|
|
138
139
|
if ($sharedTip === undefined || $sharedTip.get(0) && !$sharedTip.get(0).isConnected) {
|
|
139
|
-
$sharedTip = $(`<div id="${AUI_TOOLTIP_ID}" class="${AUI_TOOLTIP_CLASS_NAME}
|
|
140
|
+
$sharedTip = $(`<div id="${AUI_TOOLTIP_ID}" class="${AUI_TOOLTIP_CLASS_NAME} hidden" role="tooltip" aria-hidden="true"><p class="aui-tooltip-content"></p></div>`);
|
|
140
141
|
$(document.body).append($sharedTip);
|
|
141
142
|
}
|
|
142
143
|
}
|