@atlassian/aui 9.3.13 → 9.3.14

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@atlassian/aui",
3
3
  "description": "Atlassian User Interface library",
4
- "version": "9.3.13",
4
+ "version": "9.3.14",
5
5
  "author": "Atlassian Pty Ltd.",
6
6
  "homepage": "https://aui.atlassian.com",
7
7
  "license": "Apache-2.0",
@@ -37,6 +37,7 @@
37
37
  "@popperjs/core": "2.4.4",
38
38
  "backbone": "1.4.0",
39
39
  "css.escape": "1.5.0",
40
+ "dompurify": "2.4.0",
40
41
  "fancy-file-input": "2.0.4",
41
42
  "jquery-ui": "1.13.0",
42
43
  "skatejs": "0.13.17",
@@ -47,9 +48,9 @@
47
48
  "devDependencies": {
48
49
  "@atlassian/adg-server-iconfont": "3.1.0",
49
50
  "@atlassian/aui-webpack-config": "2.0.0",
50
- "@babel/core": "7.13.15",
51
- "@babel/preset-env": "7.13.15",
52
- "bundlesize": "^1.0.0-beta.2",
51
+ "@babel/core": "7.14.0",
52
+ "@babel/preset-env": "7.14.1",
53
+ "bundlesize": "1.0.0-beta.2",
53
54
  "cross-env": "7.0.3",
54
55
  "eslint": "7.24.0",
55
56
  "glob": "7.1.2",
@@ -5,9 +5,6 @@ Version: 3.4.4 Timestamp: Thu Oct 24 13:23:11 PDT 2013
5
5
  margin: 0;
6
6
  position: relative;
7
7
  display: inline-block;
8
- /* inline-block for ie7 */
9
- zoom: 1;
10
- *display: inline;
11
8
  vertical-align: middle;
12
9
  }
13
10
 
@@ -15,7 +15,7 @@ function enableAlignment (view) {
15
15
  if (view.anchor && !view._auiAlignment) {
16
16
  view._auiAlignment = new Alignment(view.el, view.anchor, {
17
17
  flipContainer: 'scrollParent',
18
- positionFixed: true,
18
+ positionFixed: false,
19
19
  preventOverflow: false,
20
20
  flip: false
21
21
  });
@@ -618,6 +618,7 @@ function initializeHandlers(sidebar) {
618
618
 
619
619
  sidebar.$el.tooltip({
620
620
  ...tooltipOptions,
621
+ aria: false,
621
622
  live: sidebar.toggleSelector,
622
623
  title: function () {
623
624
  return sidebar.isCollapsed() ?
@@ -1,5 +1,6 @@
1
1
  import $ from './jquery';
2
2
  import { createPopper } from '@popperjs/core';
3
+ import DOMPurify from 'dompurify';
3
4
 
4
5
  const AUI_TOOLTIP_CLASS_NAME = 'aui-tooltip';
5
6
  const AUI_TOOLTIP_ID = 'aui-tooltip';
@@ -32,7 +33,9 @@ const defaultOptions = {
32
33
  html: false,
33
34
  live: false,
34
35
  enabled: true,
35
- suppress: () => false
36
+ suppress: () => false,
37
+ aria: true,
38
+ sanitize: true
36
39
  }
37
40
 
38
41
  let $sharedTip;
@@ -70,7 +73,9 @@ class Tooltip {
70
73
 
71
74
  $triggerElement.attr('title', function (_, originalTitle) {
72
75
  tooltip.originalTitle = originalTitle;
73
- $triggerElement.attr('aria-describedby', AUI_TOOLTIP_ID);
76
+ if (tooltip.options.aria) {
77
+ $triggerElement.attr('aria-describedby', AUI_TOOLTIP_ID);
78
+ }
74
79
  return null;
75
80
  });
76
81
  }
@@ -99,11 +104,17 @@ class Tooltip {
99
104
  $(document.body).append($sharedTip);
100
105
  }
101
106
 
107
+ const tooltipContentElement = $sharedTip.find('.aui-tooltip-content');
108
+
102
109
  if (options.html) {
103
- $sharedTip.find('.aui-tooltip-content').html(title);
110
+ if (options.sanitize) {
111
+ title = DOMPurify.sanitize(title);
112
+ }
113
+ tooltipContentElement.html(title);
104
114
  } else {
105
- $sharedTip.find('.aui-tooltip-content').text(title);
115
+ tooltipContentElement.text(title);
106
116
  }
117
+
107
118
  return $sharedTip;
108
119
  }
109
120
 
@@ -117,7 +128,7 @@ class Tooltip {
117
128
  () => this.originalTitle || '';
118
129
 
119
130
  let actualTitle = title.call(this.triggerElement);
120
- return (actualTitle.trim().length === 0) ? undefined : actualTitle;
131
+ return (!actualTitle || !actualTitle.trim().length) ? undefined : actualTitle;
121
132
  }
122
133
 
123
134
  show() {
@@ -10,7 +10,7 @@
10
10
  @bg-color: var(--aui-appheader-quicksearch-bg-color);
11
11
  @border-color: var(--aui-appheader-quicksearch-border-color);
12
12
  @text-color: var(--aui-appheader-quicksearch-text-color);
13
- @placeholder-color: var(--aui-form-placeholder-text-color);
13
+ @placeholder-color: var(--aui-appheader-quicksearch-placeholder-text-color);
14
14
  @focus-bg-color: var(--aui-appheader-quicksearch-focus-bg-color);
15
15
  @focus-text-color: var(--aui-appheader-quicksearch-focus-text-color);
16
16
  @width: 170px;
@@ -1,7 +1,7 @@
1
1
  @ak-color-N0: #FFFFFF;
2
2
  @ak-color-N10: #FAFBFC;
3
3
  @ak-color-N20: #F4F5F7;
4
- @ak-color-N30: #EBECF0;
4
+ @ak-color-N30: #EBECF1;
5
5
  @ak-color-N40: #DFE1E6;
6
6
  @ak-color-N50: #C1C7D0;
7
7
  @ak-color-N60: #B3BAC5;
@@ -144,7 +144,7 @@
144
144
  --aui-label-close-hover-text-color: @ak-color-N800;
145
145
 
146
146
  // Forms
147
- --aui-form-placeholder-text-color: @ak-color-N100;
147
+ --aui-form-placeholder-text-color: @ak-color-N300;
148
148
  --aui-form-placeholder-disabled-text-color: @ak-color-N70;
149
149
  --aui-form-label-text-color: @ak-color-N200;
150
150
  --aui-form-error-text-color: @ak-color-R400;
@@ -218,6 +218,7 @@
218
218
  --aui-appheader-quicksearch-bg-color: @ak-color-N90A;
219
219
  --aui-appheader-quicksearch-border-color: transparent;
220
220
  --aui-appheader-quicksearch-text-color: @ak-color-B50;
221
+ --aui-appheader-quicksearch-placeholder-text-color: @ak-color-N80;
221
222
  --aui-appheader-quicksearch-focus-bg-color: var(--aui-appheader-quicksearch-bg-color);
222
223
  --aui-appheader-quicksearch-focus-text-color: @ak-color-B50;
223
224
 
@@ -535,6 +536,7 @@
535
536
  --aui-appheader-quicksearch-bg-color: @ak-color-N90A;
536
537
  --aui-appheader-quicksearch-border-color: transparent;
537
538
  --aui-appheader-quicksearch-text-color: @ak-color-B50;
539
+ --aui-appheader-quicksearch-placeholder-text-color: @ak-color-N400;
538
540
  --aui-appheader-quicksearch-focus-bg-color: var(--aui-appheader-quicksearch-bg-color);
539
541
  --aui-appheader-quicksearch-focus-text-color: @ak-color-B50;
540
542