@atlassian/aui 9.10.0 → 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-browserfocus.css +10 -10
- package/dist/aui/aui-prototyping-darkmode.css +6 -6
- 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 +4 -4
- package/dist/aui/aui-prototyping.css.map +1 -1
- package/dist/aui/aui-prototyping.js +8 -8
- package/dist/aui/aui-prototyping.js.map +1 -1
- package/dist/aui/aui-prototyping.nodeps.css +4 -4
- 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 -981
- 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 -981
- 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/select2.js +13 -2
- package/src/js/aui/tooltip.js +44 -8
- package/src/less/aui-experimental-labels.less +13 -6
- package/src/less/forms-radios-and-checkboxes.less +27 -30
- package/src/less/imports/aui-theme/adg/adg-colors.less +1 -0
- package/src/less/imports/aui-theme/components/forms.less +8 -0
- package/src/less/imports/aui-theme/components/label.less +2 -0
- package/src/less/imports/aui-theme/core/colors.less +16 -16
- package/src/less/imports/aui-theme/core/layers.less +3 -1
|
@@ -38,6 +38,7 @@ html[data-color-mode="dark"][data-theme~="dark:dark"] {
|
|
|
38
38
|
--ds-link: #579DFF;
|
|
39
39
|
--ds-link-pressed: #85B8FF;
|
|
40
40
|
--ds-link-visited: #B8ACF6;
|
|
41
|
+
--ds-link-visited-pressed: #DFD8FD;
|
|
41
42
|
--ds-icon: #9FADBC;
|
|
42
43
|
--ds-icon-accent-lime: #82B536;
|
|
43
44
|
--ds-icon-accent-red: #E2483D;
|
|
@@ -38,6 +38,7 @@ html[data-color-mode="dark"][data-theme~="dark:legacy-dark"] {
|
|
|
38
38
|
--ds-link: #0052CC;
|
|
39
39
|
--ds-link-pressed: #0065FF;
|
|
40
40
|
--ds-link-visited: #6554C0;
|
|
41
|
+
--ds-link-visited-pressed: #6554C0;
|
|
41
42
|
--ds-icon: #DCE5F5;
|
|
42
43
|
--ds-icon-accent-lime: #6A9A23;
|
|
43
44
|
--ds-icon-accent-red: #BF2600;
|
|
@@ -38,6 +38,7 @@ html[data-color-mode="dark"][data-theme~="dark:legacy-light"] {
|
|
|
38
38
|
--ds-link: #0052CC;
|
|
39
39
|
--ds-link-pressed: #0747A6;
|
|
40
40
|
--ds-link-visited: #403294;
|
|
41
|
+
--ds-link-visited-pressed: #403294;
|
|
41
42
|
--ds-icon: #505F79;
|
|
42
43
|
--ds-icon-accent-lime: #6A9A23;
|
|
43
44
|
--ds-icon-accent-red: #FF5630;
|
|
@@ -38,6 +38,7 @@ html[data-color-mode="dark"][data-theme~="dark:light"] {
|
|
|
38
38
|
--ds-link: #0C66E4;
|
|
39
39
|
--ds-link-pressed: #0055CC;
|
|
40
40
|
--ds-link-visited: #5E4DB2;
|
|
41
|
+
--ds-link-visited-pressed: #352C63;
|
|
41
42
|
--ds-icon: #44546F;
|
|
42
43
|
--ds-icon-accent-lime: #6A9A23;
|
|
43
44
|
--ds-icon-accent-red: #C9372C;
|
|
@@ -1,30 +1,32 @@
|
|
|
1
1
|
export default `
|
|
2
2
|
html[data-theme~="typography:typography-adg3"] {
|
|
3
3
|
--ds-UNSAFE-textTransformUppercase: uppercase;
|
|
4
|
-
--ds-font-heading-xxlarge: normal 500 2.1875rem/2.5rem
|
|
5
|
-
--ds-font-heading-xlarge: normal 600 1.8125rem/2rem
|
|
6
|
-
--ds-font-heading-large: normal 500 1.5rem/1.75rem
|
|
7
|
-
--ds-font-heading-medium: normal 500 1.25rem/1.5rem
|
|
8
|
-
--ds-font-heading-small: normal 600 1rem/1.25rem
|
|
9
|
-
--ds-font-heading-xsmall: normal 600 0.875rem/1rem
|
|
10
|
-
--ds-font-heading-xxsmall: normal 600 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.6875rem/1rem
|
|
14
|
-
--ds-font-
|
|
15
|
-
--ds-font-ui
|
|
16
|
-
--ds-font-
|
|
4
|
+
--ds-font-heading-xxlarge: normal 500 2.1875rem/2.5rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
5
|
+
--ds-font-heading-xlarge: normal 600 1.8125rem/2rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
6
|
+
--ds-font-heading-large: normal 500 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 500 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 600 1rem/1.25rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
9
|
+
--ds-font-heading-xsmall: normal 600 0.875rem/1rem ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif;
|
|
10
|
+
--ds-font-heading-xxsmall: normal 600 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.6875rem/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.6875rem/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.003em;
|
|
19
20
|
--ds-font-letterSpacing-200: -0.006em;
|
|
20
21
|
--ds-font-letterSpacing-300: -0.008em;
|
|
21
22
|
--ds-font-letterSpacing-400: -0.01em;
|
|
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
27
|
--ds-font-family-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
|
|
27
|
-
--ds-font-family-brand: Charlie
|
|
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;
|
|
28
30
|
--ds-font-size-050: 0.6875rem;
|
|
29
31
|
--ds-font-size-075: 0.75rem;
|
|
30
32
|
--ds-font-size-100: 0.875rem;
|
|
@@ -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/select2.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import $ from './jquery';
|
|
2
2
|
import '../../js-vendor/jquery/plugins/jquery.select2';
|
|
3
|
+
import layer from "./layer";
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Wraps a vanilla Select2 with ADG _style_, as an auiSelect2 method on jQuery objects.
|
|
@@ -21,6 +22,7 @@ const auiHasAvatar = 'aui-has-avatar';
|
|
|
21
22
|
|
|
22
23
|
$.fn.auiSelect2 = function (first) {
|
|
23
24
|
let updatedArgs;
|
|
25
|
+
let dropdownLayer;
|
|
24
26
|
|
|
25
27
|
if ($.isPlainObject(first)) {
|
|
26
28
|
const auiOpts = $.extend({}, first);
|
|
@@ -79,14 +81,20 @@ $.fn.auiSelect2 = function (first) {
|
|
|
79
81
|
|
|
80
82
|
select2Instance.on('select2-open', function () {
|
|
81
83
|
const $selectInput = $(this);
|
|
84
|
+
const $selectDropdown = $selectInput.select2('dropdown');
|
|
85
|
+
|
|
86
|
+
if (!dropdownLayer) dropdownLayer = layer();
|
|
87
|
+
dropdownLayer.show(); // add layer to layer manager to get top z-index
|
|
88
|
+
|
|
89
|
+
$selectDropdown.css('z-index', dropdownLayer.$el.css('z-index'));
|
|
90
|
+
// mask is created during opening event, before open
|
|
91
|
+
$("#select2-drop-mask").css('z-index', dropdownLayer.$el.css('z-index'));
|
|
82
92
|
|
|
83
93
|
if (options.multiple || $selectInput.attr('multiple')) {
|
|
84
94
|
// This is a multi-select, exiting
|
|
85
95
|
return;
|
|
86
96
|
}
|
|
87
97
|
|
|
88
|
-
const $selectDropdown = $selectInput.select2('dropdown');
|
|
89
|
-
|
|
90
98
|
if (searchLabel) {
|
|
91
99
|
$selectDropdown.find('.select2-search label').text(searchLabel);
|
|
92
100
|
}
|
|
@@ -94,6 +102,9 @@ $.fn.auiSelect2 = function (first) {
|
|
|
94
102
|
|
|
95
103
|
select2Instance.on('select2-close', function () {
|
|
96
104
|
const $selectInput = $(this);
|
|
105
|
+
|
|
106
|
+
dropdownLayer.hide();
|
|
107
|
+
|
|
97
108
|
$selectInput.removeData('was-ariadescribedby-cleared');
|
|
98
109
|
});
|
|
99
110
|
|
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
|
|
|
@@ -60,6 +61,7 @@ class Tooltip {
|
|
|
60
61
|
this.enabled = this.options.enabled;
|
|
61
62
|
this.moveTitleToTooltip();
|
|
62
63
|
this.initContainer();
|
|
64
|
+
this.observeTriggerRemoval();
|
|
63
65
|
}
|
|
64
66
|
|
|
65
67
|
destroy() {
|
|
@@ -82,6 +84,38 @@ class Tooltip {
|
|
|
82
84
|
});
|
|
83
85
|
}
|
|
84
86
|
|
|
87
|
+
observeTriggerRemoval() {
|
|
88
|
+
|
|
89
|
+
const observedElements = [];
|
|
90
|
+
|
|
91
|
+
if (this.options.$delegationRoot && this.options.$delegationRoot.get(0)) {
|
|
92
|
+
observedElements.push(this.options.$delegationRoot.get(0));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (this.triggerElement) {
|
|
96
|
+
observedElements.push(this.triggerElement);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
this.triggerObservers = observedElements
|
|
100
|
+
.map(element => {
|
|
101
|
+
const parent = element.parentElement;
|
|
102
|
+
if (parent) {
|
|
103
|
+
const observer = new MutationObserver(() => {
|
|
104
|
+
const isToDestroy = !parent.contains(element);
|
|
105
|
+
if (isToDestroy) {
|
|
106
|
+
this.destroy();
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
observer.observe(parent, {
|
|
110
|
+
childList: true,
|
|
111
|
+
subtree: false // We take trigger parent, so we only care about direct children
|
|
112
|
+
});
|
|
113
|
+
return observer;
|
|
114
|
+
}
|
|
115
|
+
})
|
|
116
|
+
.filter(observer => !!observer);
|
|
117
|
+
}
|
|
118
|
+
|
|
85
119
|
unbindHandlers() {
|
|
86
120
|
const selector = this.options.live;
|
|
87
121
|
|
|
@@ -93,13 +127,17 @@ class Tooltip {
|
|
|
93
127
|
return;
|
|
94
128
|
}
|
|
95
129
|
|
|
130
|
+
if (this.triggerObservers.length > 0) {
|
|
131
|
+
this.triggerObservers.forEach(observer => observer.disconnect());
|
|
132
|
+
}
|
|
133
|
+
|
|
96
134
|
// We only need to unbind event handlers from this particular element
|
|
97
135
|
this.$triggerElement.off(`.${pluginKey}`);
|
|
98
136
|
}
|
|
99
137
|
|
|
100
138
|
initContainer() {
|
|
101
139
|
if ($sharedTip === undefined || $sharedTip.get(0) && !$sharedTip.get(0).isConnected) {
|
|
102
|
-
$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>`);
|
|
103
141
|
$(document.body).append($sharedTip);
|
|
104
142
|
}
|
|
105
143
|
}
|
|
@@ -310,14 +348,12 @@ $.fn.tooltip = function (arg) {
|
|
|
310
348
|
$collection.on(activationEvents, selector, show);
|
|
311
349
|
$collection.on(deactivationEvents, selector, hide);
|
|
312
350
|
$collection.on('keyup', selector, hideOnEsc);
|
|
313
|
-
|
|
314
|
-
|
|
351
|
+
} else {
|
|
352
|
+
$collection.on(activationEvents, show);
|
|
353
|
+
$collection.on(deactivationEvents, hide);
|
|
354
|
+
$collection.on('keyup', hideOnEsc);
|
|
315
355
|
}
|
|
316
356
|
|
|
317
|
-
$collection.on(activationEvents, show);
|
|
318
|
-
$collection.on(deactivationEvents, hide);
|
|
319
|
-
$collection.on('keyup', hideOnEsc);
|
|
320
|
-
|
|
321
357
|
return $collection;
|
|
322
358
|
};
|
|
323
359
|
|
|
@@ -36,7 +36,7 @@ a.aui-label:active {
|
|
|
36
36
|
|
|
37
37
|
.aui-label-split .aui-label-split-main:hover,
|
|
38
38
|
.aui-label-split .aui-label-split-main:active,
|
|
39
|
-
.aui-label-split .aui-label-split-main:focus{
|
|
39
|
+
.aui-label-split .aui-label-split-main:focus {
|
|
40
40
|
text-decoration: none;
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -55,7 +55,6 @@ a.aui-label:active {
|
|
|
55
55
|
top: 0;
|
|
56
56
|
bottom: 0;
|
|
57
57
|
width: @aui-label-close-button-width;
|
|
58
|
-
filter: opacity(0.5);
|
|
59
58
|
|
|
60
59
|
//The close cross
|
|
61
60
|
&::before {
|
|
@@ -64,10 +63,18 @@ a.aui-label:active {
|
|
|
64
63
|
font-size: 10px;
|
|
65
64
|
margin: auto;
|
|
66
65
|
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/*
|
|
69
|
+
* Hover pseudo class can't be triggered in automated tests
|
|
70
|
+
* As a workaround we use a normal css class for testing
|
|
71
|
+
*/
|
|
72
|
+
.aui-label-closeable:has(.aui-icon-close:hover),
|
|
73
|
+
.aui-label-closeable:has(.aui-icon-close.hover) {
|
|
74
|
+
background: @aui-label-closable-bg-color;
|
|
75
|
+
color: @aui-label-closable-text-color;
|
|
67
76
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
color: var(--aui-label-close-hover-text-color);
|
|
71
|
-
filter: none;
|
|
77
|
+
a.aui-label-split-main {
|
|
78
|
+
color: @aui-label-closable-text-color;
|
|
72
79
|
}
|
|
73
80
|
}
|
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
@import (reference) './imports/aui-theme/components/forms';
|
|
4
4
|
|
|
5
5
|
@label-left-offset: 20px;
|
|
6
|
-
@button-border-width:
|
|
6
|
+
@button-border-width: @aui-form-button-border-width;
|
|
7
7
|
@button-focus-size: 12px;
|
|
8
8
|
@button-focus-border-color: @aui-focus-ring-color;
|
|
9
9
|
@button-focus-border: @aui-form-button-focus-border-width solid @button-focus-border-color;
|
|
10
10
|
|
|
11
11
|
@radio-offset-top: 4px;
|
|
12
12
|
@radio-offset-left: 0px;
|
|
13
|
+
@radio-glyph-offset-adjustment: 2px;
|
|
13
14
|
|
|
14
15
|
@checkbox-offset-top: 3px;
|
|
15
16
|
@checkbox-offset-left: 0px;
|
|
@@ -48,26 +49,32 @@ form.aui:not(.aui-legacy-forms) {
|
|
|
48
49
|
top: @radio-offset-top - 1px;
|
|
49
50
|
}
|
|
50
51
|
.aui-radio-position(iconfont) {
|
|
51
|
-
@fudge: 2px; // the glyph renders in a slightly different position for font-related reasons.
|
|
52
52
|
position: absolute;
|
|
53
|
-
left: @radio-offset-left - @
|
|
54
|
-
top: @radio-offset-top - @
|
|
53
|
+
left: @radio-offset-left - @radio-glyph-offset-adjustment/2;
|
|
54
|
+
top: @radio-offset-top - @radio-glyph-offset-adjustment;
|
|
55
|
+
}
|
|
56
|
+
.aui-radio-outline-position() {
|
|
57
|
+
position: absolute;
|
|
58
|
+
left: @radio-offset-left - @aui-form-button-border-width - @aui-form-radio-checkbox-outline-padding-space;
|
|
59
|
+
top: @radio-offset-top - 1px - @aui-form-button-border-width - @aui-form-radio-checkbox-outline-padding-space;
|
|
55
60
|
}
|
|
56
61
|
.aui-checkbox-position() {
|
|
57
62
|
position: absolute;
|
|
58
63
|
left: @checkbox-offset-left;
|
|
59
64
|
top: @checkbox-offset-top;
|
|
60
65
|
}
|
|
61
|
-
.aui-checkbox-
|
|
66
|
+
.aui-checkbox-outline-position() {
|
|
62
67
|
position: absolute;
|
|
63
|
-
left: @checkbox-offset-left - @aui-form-button-
|
|
64
|
-
top: @checkbox-offset-top - @aui-form-button-
|
|
68
|
+
left: @checkbox-offset-left - @aui-form-button-border-width - @aui-form-radio-checkbox-outline-padding-space;
|
|
69
|
+
top: @checkbox-offset-top - @aui-form-button-border-width - @aui-form-radio-checkbox-outline-padding-space;
|
|
65
70
|
}
|
|
66
71
|
.aui-radio-disabled-style() {
|
|
67
72
|
& ~ label {
|
|
73
|
+
cursor: not-allowed;
|
|
68
74
|
color: @aui-form-disabled-field-label-color;
|
|
69
75
|
}
|
|
70
76
|
& + .aui-form-glyph::before {
|
|
77
|
+
cursor: not-allowed;
|
|
71
78
|
color: @radio-disabled-bg-color;
|
|
72
79
|
border-color: transparent;
|
|
73
80
|
background: transparent;
|
|
@@ -75,9 +82,11 @@ form.aui:not(.aui-legacy-forms) {
|
|
|
75
82
|
}
|
|
76
83
|
.aui-checkbox-disabled-style() {
|
|
77
84
|
& ~ label {
|
|
85
|
+
cursor: not-allowed;
|
|
78
86
|
color: @aui-form-disabled-field-label-color;
|
|
79
87
|
}
|
|
80
88
|
& + .aui-form-glyph::before {
|
|
89
|
+
cursor: not-allowed;
|
|
81
90
|
color: @checkbox-disabled-icon-color;
|
|
82
91
|
border-color: @checkbox-disabled-border-color;
|
|
83
92
|
background: @checkbox-disabled-bg-color;
|
|
@@ -200,8 +209,8 @@ form.aui:not(.aui-legacy-forms) {
|
|
|
200
209
|
}
|
|
201
210
|
|
|
202
211
|
&:focus + .aui-form-glyph::after {
|
|
203
|
-
.aui-radio-
|
|
204
|
-
.aui-radio-
|
|
212
|
+
#aui-forms.aui-radio-checkbox-outline-size();
|
|
213
|
+
.aui-radio-outline-position();
|
|
205
214
|
|
|
206
215
|
content: "";
|
|
207
216
|
|
|
@@ -209,10 +218,6 @@ form.aui:not(.aui-legacy-forms) {
|
|
|
209
218
|
border-radius: @aui-form-button-size;
|
|
210
219
|
background-color: transparent;
|
|
211
220
|
}
|
|
212
|
-
|
|
213
|
-
&:focus + .aui-form-glyph::before {
|
|
214
|
-
border-color: @button-focus-border-color;
|
|
215
|
-
}
|
|
216
221
|
}
|
|
217
222
|
}
|
|
218
223
|
|
|
@@ -269,25 +274,17 @@ form.aui:not(.aui-legacy-forms) {
|
|
|
269
274
|
}
|
|
270
275
|
}
|
|
271
276
|
|
|
272
|
-
&:focus + .aui-form-glyph::
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
+
&:focus + .aui-form-glyph::after {
|
|
278
|
+
#aui-forms.aui-radio-checkbox-outline-size();
|
|
279
|
+
.aui-checkbox-outline-position();
|
|
277
280
|
|
|
278
|
-
|
|
279
|
-
// Focus styles
|
|
280
|
-
//
|
|
281
|
+
content: "";
|
|
281
282
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
.aui-radio-focus-position() {
|
|
288
|
-
position: absolute;
|
|
289
|
-
left: @radio-offset-left;
|
|
290
|
-
top: @radio-offset-top - 1px;
|
|
283
|
+
border: @button-focus-border;
|
|
284
|
+
border-radius: @checkbox-border-radius;
|
|
285
|
+
background-color: transparent;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
291
288
|
}
|
|
292
289
|
|
|
293
290
|
}
|