@atlassian/aui 9.7.2 → 9.8.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 +257 -516
- package/dist/aui/aui-prototyping-darkmode.css +5 -267
- package/dist/aui/aui-prototyping-design-tokens-api.js +1 -1
- package/dist/aui/aui-prototyping.css +9 -9
- package/dist/aui/aui-prototyping.css.map +1 -1
- package/dist/aui/aui-prototyping.js +6 -6
- package/dist/aui/aui-prototyping.js.map +1 -1
- package/dist/aui/aui-prototyping.nodeps.css +9 -9
- package/dist/aui/aui-prototyping.nodeps.css.map +1 -1
- package/dist/aui/aui-prototyping.nodeps.js +2 -2
- package/dist/aui/aui-prototyping.nodeps.js.map +1 -1
- package/entry/styles/aui.page.reset.js +0 -1
- package/package.json +1 -1
- package/src/js/aui/avatar-group.js +99 -86
- package/src/js/aui/banner.js +41 -33
- package/src/js/aui/dialog2.js +2 -2
- package/src/js/aui/flag.js +14 -15
- package/src/less/aui-appheader.less +1 -1
- package/src/less/aui-avatars.less +34 -34
- package/src/less/aui-banner.less +24 -16
- package/src/less/aui-dark-mode.less +2 -3
- package/src/less/aui-reset.less +1 -6
- package/src/less/aui-sidebar-navigation.less +10 -4
- package/src/less/aui-sidebar-skeleton.less +2 -1
- package/src/less/flag.less +28 -19
- package/src/less/imports/aui-theme/components/flag.less +3 -1
- package/src/less/imports/aui-theme/components/navigation.less +0 -1
- package/src/less/imports/aui-theme/components/sidebar.less +0 -1
- package/src/less/imports/aui-theme/core/colors.less +251 -237
- package/src/less/imports/aui-theme/core/spaces.less +14 -0
- package/src/less/imports/aui-theme/core-variables.less +1 -0
- package/src/less/imports/aui-theme/theme.less +14 -0
- package/src/less/imports/mixins/shadows.less +9 -0
- package/entry/styles/aui.page.design-tokens-mode.js +0 -1
- package/src/less/themes/themes.less +0 -2
package/package.json
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import skate from './internal/skate';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_SIZE = 'medium';
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const getAvatarGroupSize = (value) => {
|
|
8
|
-
return Object.keys(sizes).includes(value) ? value : DEFAULT_SIZE;
|
|
9
|
-
}
|
|
4
|
+
const VISIBLE_AVATAR_COUNT = 4;
|
|
5
|
+
const OVERLAP_FACTOR = 0.25;
|
|
6
|
+
const SIZES = {xsmall: 16, small: 24, medium: 32, large: 48, xlarge: 64, xxlarge: 96, xxxlarge: 128};
|
|
10
7
|
|
|
11
8
|
const setAvatarGroupSize = (element, newValue, oldValue) => {
|
|
12
9
|
if (oldValue) {
|
|
@@ -15,117 +12,133 @@ const setAvatarGroupSize = (element, newValue, oldValue) => {
|
|
|
15
12
|
element.classList.add(`aui-avatar-group-${newValue}`);
|
|
16
13
|
}
|
|
17
14
|
|
|
18
|
-
const
|
|
19
|
-
return
|
|
15
|
+
const getAvatarGroupSize = (value) => {
|
|
16
|
+
return Object.keys(SIZES).includes(value) ? value : DEFAULT_SIZE;
|
|
20
17
|
}
|
|
21
18
|
|
|
22
|
-
const
|
|
23
|
-
element.
|
|
24
|
-
|
|
25
|
-
element.style.left = setLeftPosition(size, 4, multiplyNum);
|
|
26
|
-
element.style.zIndex = `${5 - multiplyNum}`;
|
|
27
|
-
}
|
|
19
|
+
const updateAvatarGroup = (element, size) => {
|
|
20
|
+
const avatars = element.querySelectorAll('aui-avatar');
|
|
21
|
+
const hiddenAvatars = [...avatars].slice(VISIBLE_AVATAR_COUNT);
|
|
28
22
|
|
|
29
|
-
|
|
30
|
-
const avatars = element.parentNode.querySelectorAll('aui-avatar');
|
|
31
|
-
const badgedDropdown = element.parentNode.querySelector('.aui-avatar-group-dropdown')
|
|
32
|
-
const hiddenAvatarsList = [... avatars].slice(4);
|
|
23
|
+
updateAvatarGroupItems(avatars, size);
|
|
33
24
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const avatarItemTitle = avatar.getAttribute('title');
|
|
25
|
+
const oldDropdown = element.querySelector('.aui-avatar-group-dropdown');
|
|
26
|
+
if (oldDropdown) {
|
|
27
|
+
oldDropdown.remove();
|
|
28
|
+
}
|
|
39
29
|
|
|
40
|
-
|
|
41
|
-
avatarWrapper.setAttribute('class', 'aui-avatar-group-dropdown-item');
|
|
30
|
+
if (hiddenAvatars.length === 0) { return };
|
|
42
31
|
|
|
43
|
-
|
|
44
|
-
avatarWrapper.innerHTML = `<aui-avatar id="avatar-item" src=${avatarItemSrc} alt=${avatarItemAlt} title=${avatarItemTitle}></aui-avatar>`;
|
|
45
|
-
} else {
|
|
46
|
-
avatarWrapper.innerHTML = '<aui-avatar></aui-avatar>';
|
|
47
|
-
}
|
|
32
|
+
const dropdown = createDropdown(size, hiddenAvatars);
|
|
48
33
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
} else {
|
|
52
|
-
hiddenAvatarsList.forEach(()=> {
|
|
53
|
-
const dropdownItems = document.querySelector('.aui-avatar-group-dropdown-item');
|
|
54
|
-
if (dropdownItems) {dropdownItems.remove();}
|
|
55
|
-
});
|
|
56
|
-
}
|
|
34
|
+
element.appendChild(dropdown);
|
|
35
|
+
}
|
|
57
36
|
|
|
37
|
+
const createDropdown = (size, hiddenAvatars) => {
|
|
38
|
+
const dropdown = document.createElement('div');
|
|
39
|
+
const button = createAvatarGroupDropdownButton(`+${hiddenAvatars.length}`);
|
|
40
|
+
const menu = createAvatarGroupDropdownMenu();
|
|
41
|
+
|
|
42
|
+
hiddenAvatars.forEach((hiddenAvatar) => {
|
|
43
|
+
menu.append(hiddenAvatar);
|
|
44
|
+
})
|
|
45
|
+
dropdown.classList.add('aui-avatar-group-dropdown');
|
|
46
|
+
dropdown.style.left = getLeftPosition(size, VISIBLE_AVATAR_COUNT + 0.2);
|
|
47
|
+
dropdown.appendChild(button);
|
|
48
|
+
dropdown.appendChild(menu);
|
|
49
|
+
return dropdown;
|
|
58
50
|
}
|
|
59
51
|
|
|
60
|
-
const
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
52
|
+
const createAvatarGroupDropdownButton = (content) => {
|
|
53
|
+
const button = document.createElement('button');
|
|
54
|
+
button.classList.add('aui-avatar-group-dropdown-button', 'aui-avatar-inner');
|
|
55
|
+
button.innerText = content;
|
|
56
|
+
button.setAttribute('aria-expanded', false);
|
|
57
|
+
button.setAttribute('aria-haspopup', 'dialog');
|
|
58
|
+
return button;
|
|
59
|
+
}
|
|
66
60
|
|
|
67
|
-
|
|
61
|
+
const createAvatarGroupDropdownMenu = () => {
|
|
62
|
+
const dropdown = document.createElement('div');
|
|
63
|
+
dropdown.classList.add('aui-avatar-group-dropdown-menu');
|
|
64
|
+
return dropdown;
|
|
68
65
|
}
|
|
69
66
|
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
const updateAvatarGroupItems = (avatars, size) => {
|
|
68
|
+
avatars.forEach((avatar, index) => {
|
|
69
|
+
const isHidden = index >= VISIBLE_AVATAR_COUNT;
|
|
70
|
+
avatar.classList.add(!isHidden ? 'aui-avatar-group-item' : 'aui-avatar-group-dropdown-item');
|
|
71
|
+
|
|
72
|
+
if (!isHidden) {
|
|
73
|
+
avatar.setAttribute('size', size);
|
|
74
|
+
avatar.style.left = getLeftPosition(size, index);
|
|
75
|
+
avatar.style.zIndex = `${VISIBLE_AVATAR_COUNT + 1 - index}`;
|
|
76
|
+
} else {
|
|
77
|
+
avatar.setAttribute('size', 'medium');
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
};
|
|
73
81
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
const
|
|
82
|
+
const getLeftPosition = (size, index) => {
|
|
83
|
+
const avatarSize = SIZES[size];
|
|
84
|
+
const overlapFactor = avatarSize * OVERLAP_FACTOR;
|
|
85
|
+
const leftPosition = (avatarSize - overlapFactor) * index;
|
|
86
|
+
return `${leftPosition}px`;
|
|
87
|
+
};
|
|
77
88
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
groupBadged.innerText = `+${amount}`;
|
|
82
|
-
groupBadged.setAttribute('aria-expanded', isButtonDropdownActive.toString());
|
|
83
|
-
groupBadged.setAttribute('aria-haspopup', 'dialog')
|
|
84
|
-
element.appendChild(groupBadged);
|
|
89
|
+
document.addEventListener('click', (e) => {
|
|
90
|
+
const isDropdownButton = e.target.matches('.aui-avatar-group-dropdown-button');
|
|
91
|
+
const closestDropdown = e.target.closest('.aui-avatar-group-dropdown');
|
|
85
92
|
|
|
86
|
-
|
|
93
|
+
if (!isDropdownButton && closestDropdown !== null) return;
|
|
87
94
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
element.appendChild(badgedDropdown);
|
|
92
|
-
}
|
|
95
|
+
if (isDropdownButton) {
|
|
96
|
+
closestDropdown.classList.contains('aui-avatar-group-dropdown-show') ? closeDropdown(closestDropdown) : openDropdown(closestDropdown);
|
|
97
|
+
}
|
|
93
98
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
let amountItems = avatars.length - 4;
|
|
99
|
+
document.querySelectorAll('.aui-avatar-group-dropdown-show').forEach(dropdown => {
|
|
100
|
+
if (dropdown === closestDropdown) return;
|
|
97
101
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
});
|
|
102
|
+
closeDropdown(dropdown)
|
|
103
|
+
})
|
|
104
|
+
});
|
|
102
105
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
document.addEventListener('keydown', (e) => {
|
|
107
|
+
if (e.key !== 'Escape') return;
|
|
108
|
+
const dropdown = document.querySelector('.aui-avatar-group-dropdown-show');
|
|
109
|
+
if (!dropdown) return;
|
|
110
|
+
|
|
111
|
+
closeDropdown(dropdown);
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
const closeDropdown = (dropdown) => {
|
|
115
|
+
const button = dropdown.querySelector('.aui-avatar-group-dropdown-button');
|
|
116
|
+
dropdown.classList.remove('aui-avatar-group-dropdown-show');
|
|
117
|
+
button.setAttribute('aria-expanded', 'false');
|
|
118
|
+
}
|
|
119
|
+
const openDropdown = (dropdown) => {
|
|
120
|
+
const button = dropdown.querySelector('.aui-avatar-group-dropdown-button');
|
|
121
|
+
dropdown.classList.add('aui-avatar-group-dropdown-show');
|
|
122
|
+
button.setAttribute('aria-expanded', 'true');
|
|
109
123
|
}
|
|
110
124
|
|
|
111
125
|
const AvatarGroupEl = skate('aui-avatar-group', {
|
|
112
126
|
attributes: {
|
|
113
127
|
size: {
|
|
114
128
|
value: DEFAULT_SIZE,
|
|
115
|
-
|
|
116
|
-
fallback(element, { newValue , oldValue }) {
|
|
129
|
+
fallback(element, { newValue, oldValue }) {
|
|
117
130
|
const size = getAvatarGroupSize(newValue);
|
|
131
|
+
setAvatarGroupSize(element, size, oldValue);
|
|
118
132
|
|
|
119
133
|
skate.init(element);
|
|
120
|
-
|
|
121
|
-
|
|
134
|
+
|
|
135
|
+
updateAvatarGroup(element, size);
|
|
122
136
|
}
|
|
123
|
-
}
|
|
137
|
+
},
|
|
124
138
|
},
|
|
125
|
-
|
|
126
139
|
created(element) {
|
|
127
140
|
element.classList.add('aui-avatar-group');
|
|
128
|
-
}
|
|
141
|
+
},
|
|
129
142
|
});
|
|
130
143
|
|
|
131
144
|
const wasNodeRemoved = (mutation, target) => {
|
|
@@ -141,12 +154,12 @@ const mutationObserver = new MutationObserver(function(mutation) {
|
|
|
141
154
|
const target = mutation.target;
|
|
142
155
|
|
|
143
156
|
if (wasNodeRemoved(mutation, target)) {
|
|
144
|
-
|
|
157
|
+
updateAvatarGroup(target, target.getAttribute('size'));
|
|
145
158
|
}
|
|
146
159
|
|
|
147
160
|
if (wasNodeAdded(mutation, target)) {
|
|
148
161
|
setTimeout(() => {
|
|
149
|
-
|
|
162
|
+
updateAvatarGroup(target, target.getAttribute('size'));
|
|
150
163
|
}, 0);
|
|
151
164
|
}
|
|
152
165
|
});
|
package/src/js/aui/banner.js
CHANGED
|
@@ -1,52 +1,60 @@
|
|
|
1
|
-
import $ from './jquery';
|
|
2
1
|
import { recomputeStyle } from './internal/animation';
|
|
3
2
|
import amdify from './internal/amdify';
|
|
4
3
|
import globalize from './internal/globalize';
|
|
4
|
+
import * as deprecate from './internal/deprecation';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
const ID_BANNER_CONTAINER = 'header';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
var $banner = renderBannerElement(options);
|
|
8
|
+
const getContainer = () => document.getElementById(ID_BANNER_CONTAINER);
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
function banner(options) {
|
|
11
|
+
const bannerContainer = getContainer();
|
|
12
|
+
if (!bannerContainer) {
|
|
13
|
+
throw new Error(
|
|
14
|
+
'Unable to find the application header. Please ensure that an element with the ID "header" is present in the DOM'
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
const bannerElement = createBannerElement(options);
|
|
13
18
|
|
|
14
|
-
|
|
19
|
+
renderBannerElement(bannerElement, bannerContainer);
|
|
20
|
+
removeHiddenBanners(bannerContainer);
|
|
21
|
+
return bannerElement;
|
|
15
22
|
}
|
|
16
23
|
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
24
|
+
function createBannerElement({ body = '', type = 'error' }) {
|
|
25
|
+
const banner = document.createElement('div');
|
|
26
|
+
banner.className = `aui-banner aui-banner-${type}`;
|
|
27
|
+
banner.setAttribute('role', 'alert');
|
|
28
|
+
banner.innerHTML = body;
|
|
29
|
+
|
|
30
|
+
const screenReaderInfo = document.createElement('div');
|
|
31
|
+
screenReaderInfo.innerText = `${type}`;
|
|
32
|
+
screenReaderInfo.classList.add('assistive')
|
|
33
|
+
banner.prepend(screenReaderInfo);
|
|
34
|
+
|
|
35
|
+
return banner;
|
|
21
36
|
}
|
|
22
37
|
|
|
23
|
-
function
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
$(banner).remove();
|
|
31
|
-
}
|
|
38
|
+
function removeHiddenBanners(bannerContainer) {
|
|
39
|
+
const hiddenBanners = bannerContainer.querySelectorAll('.aui-banner[hidden]');
|
|
40
|
+
const lazyDeprecate = deprecate.getMessageLogger('Banner [hidden] attribute', {
|
|
41
|
+
removeInVersion: '10.0.0',
|
|
42
|
+
sinceVersion: '9.8.0',
|
|
43
|
+
deprecationType: 'ATTRIBUTE',
|
|
44
|
+
extraInfo: 'The hidden attribute on the banner is no longer effective. Future banner function calls won\'t remove banners with this attribute.'
|
|
32
45
|
});
|
|
33
|
-
}
|
|
34
46
|
|
|
35
|
-
function
|
|
36
|
-
|
|
47
|
+
hiddenBanners.forEach(function (banner) {
|
|
48
|
+
lazyDeprecate();
|
|
49
|
+
banner.remove();
|
|
50
|
+
});
|
|
37
51
|
}
|
|
38
52
|
|
|
39
|
-
function
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
throw new Error('You must implement the application header');
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
$banner.prependTo($bannerContainer);
|
|
46
|
-
recomputeStyle($banner);
|
|
47
|
-
$banner[0].removeAttribute('hidden');
|
|
53
|
+
function renderBannerElement(bannerElement, bannerContainer) {
|
|
54
|
+
bannerContainer.prepend(bannerElement);
|
|
55
|
+
recomputeStyle(bannerElement);
|
|
48
56
|
}
|
|
49
57
|
|
|
50
58
|
amdify('aui/banner', banner);
|
|
51
59
|
globalize('banner', banner);
|
|
52
|
-
export default banner;
|
|
60
|
+
export default banner;
|
package/src/js/aui/dialog2.js
CHANGED
|
@@ -40,7 +40,7 @@ function handleInitialFocus(el) {
|
|
|
40
40
|
const closeButton = el.querySelector(CLOSE_BUTTON_CLASS_SELECTOR)
|
|
41
41
|
|
|
42
42
|
if (closeButton) {
|
|
43
|
-
const lazyDeprecate = deprecate.getMessageLogger(`Dialog2 [${CLOSE_BUTTON_CLASS_SELECTOR}]
|
|
43
|
+
const lazyDeprecate = deprecate.getMessageLogger(`Dialog2 [${CLOSE_BUTTON_CLASS_SELECTOR}]`, {
|
|
44
44
|
removeInVersion: '10.0.0',
|
|
45
45
|
sinceVersion: '9.6.0',
|
|
46
46
|
extraInfo: 'Replace it with another actionable element inside your Dialog which will trigger closing of the modal.',
|
|
@@ -55,7 +55,7 @@ function handleInitialFocus(el) {
|
|
|
55
55
|
// Print deprecation note for old custom focus selection if found
|
|
56
56
|
const deprecatedFocusSelector = el.hasAttribute('data-aui-focus-selector');
|
|
57
57
|
if (deprecatedFocusSelector) {
|
|
58
|
-
const lazyDeprecate = deprecate.getMessageLogger('Dialog2 [data-aui-focus-selector] attribute
|
|
58
|
+
const lazyDeprecate = deprecate.getMessageLogger('Dialog2 [data-aui-focus-selector] attribute', {
|
|
59
59
|
removeInVersion: '10.0.0',
|
|
60
60
|
alternativeName: 'initialisation on DOM insertion',
|
|
61
61
|
sinceVersion: '9.6.0',
|
package/src/js/aui/flag.js
CHANGED
|
@@ -7,27 +7,26 @@ import CustomEvent from './polyfills/custom-event';
|
|
|
7
7
|
import escapeHtml from './escape-html';
|
|
8
8
|
import {CLOSE_BUTTON} from './close-button';
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
const AUTO_CLOSE_TIME = 8000;
|
|
11
|
+
const ID_FLAG_CONTAINER = 'aui-flag-container';
|
|
12
|
+
const DEFAULT_OPTIONS = {
|
|
13
13
|
body: '',
|
|
14
14
|
close: 'manual',
|
|
15
15
|
title: '',
|
|
16
|
-
type: 'info'
|
|
16
|
+
type: 'info',
|
|
17
|
+
duration: AUTO_CLOSE_TIME,
|
|
17
18
|
};
|
|
18
19
|
|
|
19
|
-
function flag (
|
|
20
|
-
options =
|
|
21
|
-
|
|
22
|
-
// clean the title value
|
|
20
|
+
function flag (flagOptions) {
|
|
21
|
+
const options = { ...DEFAULT_OPTIONS, ...flagOptions };
|
|
23
22
|
options.title = (options.title || '').toString().trim();
|
|
24
23
|
|
|
25
|
-
|
|
24
|
+
const $flag = renderFlagElement(options);
|
|
26
25
|
extendFlagElement($flag);
|
|
27
26
|
|
|
28
27
|
if (options.close === 'auto') {
|
|
29
28
|
makeCloseable($flag);
|
|
30
|
-
makeAutoClosable($flag);
|
|
29
|
+
makeAutoClosable($flag, options.duration);
|
|
31
30
|
} else if (options.close === 'manual') {
|
|
32
31
|
makeCloseable($flag);
|
|
33
32
|
}
|
|
@@ -39,7 +38,7 @@ function flag (options) {
|
|
|
39
38
|
}
|
|
40
39
|
|
|
41
40
|
function extendFlagElement ($flag) {
|
|
42
|
-
|
|
41
|
+
const flag = $flag[0];
|
|
43
42
|
|
|
44
43
|
flag.close = function () {
|
|
45
44
|
closeFlag($flag);
|
|
@@ -58,7 +57,7 @@ function renderFlagElement ({body, title, close, type}) {
|
|
|
58
57
|
}
|
|
59
58
|
|
|
60
59
|
function makeCloseable ($flag) {
|
|
61
|
-
|
|
60
|
+
const $icon = $(CLOSE_BUTTON);
|
|
62
61
|
|
|
63
62
|
$icon.on('click', function () {
|
|
64
63
|
closeFlag($flag);
|
|
@@ -74,15 +73,15 @@ function makeCloseable ($flag) {
|
|
|
74
73
|
return $flag.find('.aui-message').append($icon)[0];
|
|
75
74
|
}
|
|
76
75
|
|
|
77
|
-
function makeAutoClosable ($flag) {
|
|
76
|
+
function makeAutoClosable ($flag, duration) {
|
|
78
77
|
$flag.find('.aui-message').addClass('aui-will-close');
|
|
79
78
|
setTimeout(function () {
|
|
80
79
|
$flag[0].close();
|
|
81
|
-
},
|
|
80
|
+
}, duration);
|
|
82
81
|
}
|
|
83
82
|
|
|
84
83
|
function closeFlag ($flagToClose) {
|
|
85
|
-
|
|
84
|
+
const flag = $flagToClose.get(0);
|
|
86
85
|
|
|
87
86
|
flag.removeAttribute('open');
|
|
88
87
|
flag.dispatchEvent(new CustomEvent('aui-flag-close', {bubbles: true}));
|
|
@@ -54,7 +54,6 @@ aui-header,
|
|
|
54
54
|
padding: 0;
|
|
55
55
|
height: var(--aui-appheader-logo-height, var(--aui-appheader-item-height));
|
|
56
56
|
line-height: 1;
|
|
57
|
-
text-wrap: none;
|
|
58
57
|
vertical-align: text-bottom;
|
|
59
58
|
white-space: nowrap;
|
|
60
59
|
|
|
@@ -109,6 +108,7 @@ aui-header,
|
|
|
109
108
|
// like modals and dropdowns, which would cause them to render funnily.
|
|
110
109
|
background: var(--aui-appheader-bg-color);
|
|
111
110
|
height: var(--aui-appheader-height, initial);
|
|
111
|
+
border-bottom: 1px solid var(--aui-border);
|
|
112
112
|
|
|
113
113
|
// Set color in locations where it will not bleed in to nested layered components.
|
|
114
114
|
.aui-header-before > :not(.aui-layer),
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
display: inline-block;
|
|
28
28
|
position: relative;
|
|
29
29
|
vertical-align: text-bottom;
|
|
30
|
-
|
|
30
|
+
line-height: 0;
|
|
31
31
|
|
|
32
32
|
&-inner {
|
|
33
33
|
display: flex;
|
|
@@ -40,6 +40,10 @@
|
|
|
40
40
|
width: var(--aui-avatar-size);
|
|
41
41
|
border-radius: 100%;
|
|
42
42
|
overflow: hidden;
|
|
43
|
+
|
|
44
|
+
#aui-themes.when-design-tokens({
|
|
45
|
+
box-shadow: 0 0 0 2px var(--ds-surface-overlay, #FFFFFF);
|
|
46
|
+
})
|
|
43
47
|
}
|
|
44
48
|
|
|
45
49
|
& img {
|
|
@@ -120,45 +124,41 @@
|
|
|
120
124
|
&-item {
|
|
121
125
|
position: absolute;
|
|
122
126
|
bottom: 0;
|
|
123
|
-
|
|
124
|
-
&-hidden {
|
|
125
|
-
display: none !important;
|
|
126
|
-
}
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
&-
|
|
129
|
+
&-dropdown {
|
|
130
130
|
position: absolute;
|
|
131
131
|
bottom: 0;
|
|
132
|
-
background-color: var(--aui-body-background);
|
|
133
|
-
z-index: 1;
|
|
134
|
-
font-size: calc(var(--aui-avatar-size) / 3);
|
|
135
|
-
align-items: center;
|
|
136
132
|
border: 0;
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
133
|
+
overflow: visible;
|
|
134
|
+
|
|
135
|
+
&-button {
|
|
136
|
+
cursor: pointer;
|
|
137
|
+
border: none;
|
|
138
|
+
color: var(--aui-avatar-text);
|
|
139
|
+
display: grid;
|
|
140
|
+
place-items: center;
|
|
141
|
+
background-color: var(--aui-body-background);
|
|
142
|
+
font-size: calc(var(--aui-avatar-size) / 3);
|
|
143
|
+
}
|
|
144
|
+
&-menu {
|
|
145
|
+
#aui.shadow.z200();
|
|
146
|
+
box-sizing: border-box;
|
|
147
|
+
width: max-content;
|
|
148
|
+
max-width: 300px;
|
|
149
|
+
padding: @aui-dropdown-group-spacing 0;
|
|
150
|
+
display: none;
|
|
151
|
+
background: var(--aui-dropdown-bg-color);
|
|
152
|
+
border: 0 solid var(--aui-dropdown-border-color);
|
|
153
|
+
border-radius: 3px;
|
|
154
|
+
position: absolute;
|
|
155
|
+
top: var(--aui-avatar-size);
|
|
156
|
+
z-index: 3000;
|
|
157
|
+
}
|
|
158
|
+
&-show > &-menu {
|
|
159
|
+
display: flex;
|
|
160
|
+
flex-wrap: wrap;
|
|
157
161
|
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
& > .aui-avatar > .aui-avatar > .aui-avatar-inner {
|
|
161
|
-
box-shadow: 0 0 0 3px var(--aui-avatar-outline);
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
.aui-avatar-group-size(xsmall, @aui-avatar-size-xsmall);
|
package/src/less/aui-banner.less
CHANGED
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
@import (reference) './imports/global';
|
|
2
2
|
|
|
3
3
|
.aui-banner {
|
|
4
|
+
--aui-message-padding: 10px;
|
|
5
|
+
--aui-message-gutter: 40px;
|
|
6
|
+
--aui-message-isize: @aui-icon-size-small;
|
|
7
|
+
--aui-focus: currentcolor;
|
|
8
|
+
--aui-link-color: currentcolor;
|
|
9
|
+
--aui-link-hover-color: currentcolor;
|
|
10
|
+
--aui-link-active-color: currentcolor;
|
|
11
|
+
border-radius: 0;
|
|
12
|
+
box-shadow: none;
|
|
13
|
+
margin-top: 0;
|
|
14
|
+
|
|
4
15
|
#aui-message.icon-bar(var(--aui-message-ig), var(--aui-message-icolor));
|
|
5
16
|
&::after {
|
|
6
17
|
left: 15px;
|
|
7
18
|
}
|
|
8
19
|
|
|
9
20
|
padding: var(--aui-message-padding);
|
|
10
|
-
padding-left: var(--aui-message-gutter);
|
|
11
21
|
position: relative;
|
|
12
22
|
|
|
13
23
|
a:not(.aui-button),
|
|
@@ -15,24 +25,22 @@
|
|
|
15
25
|
text-decoration: underline;
|
|
16
26
|
}
|
|
17
27
|
|
|
28
|
+
&.aui-banner-error, &.aui-banner-warning {
|
|
29
|
+
padding-left: var(--aui-message-gutter);
|
|
30
|
+
}
|
|
31
|
+
|
|
18
32
|
&.aui-banner-error {
|
|
19
33
|
--aui-message-ig: @aui-glyph-exclamation-circle;
|
|
20
34
|
background-color: var(--aui-banner-error-bg-color);
|
|
21
35
|
color: var(--aui-banner-error-text-color);
|
|
22
36
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
--aui-link-color: currentcolor;
|
|
33
|
-
--aui-link-hover-color: currentcolor;
|
|
34
|
-
--aui-link-active-color: currentcolor;
|
|
35
|
-
border-radius: 0;
|
|
36
|
-
box-shadow: none;
|
|
37
|
-
margin-top: 0;
|
|
37
|
+
&.aui-banner-warning {
|
|
38
|
+
--aui-message-ig: @aui-glyph-exclamation-triangle;
|
|
39
|
+
background-color: var(--aui-banner-warning-bg-color);
|
|
40
|
+
color: var(--aui-banner-warning-text-color);
|
|
41
|
+
}
|
|
42
|
+
&.aui-banner-announcement {
|
|
43
|
+
background-color: var(--aui-banner-announcement-bg-color);
|
|
44
|
+
color: var(--aui-banner-announcement-text-color);
|
|
45
|
+
}
|
|
38
46
|
}
|