@atlassian/aui 9.10.0 → 9.10.2

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.
Files changed (30) hide show
  1. package/dist/aui/aui-prototyping-browserfocus.css +10 -10
  2. package/dist/aui/aui-prototyping-darkmode.css +6 -6
  3. package/dist/aui/aui-prototyping-design-tokens-api-full.js +1 -1
  4. package/dist/aui/aui-prototyping-design-tokens-api.js +1 -1
  5. package/dist/aui/aui-prototyping-design-tokens-base-themes-css.css +2 -2
  6. package/dist/aui/aui-prototyping-design-tokens-base-themes-css.css.map +1 -1
  7. package/dist/aui/aui-prototyping-design-tokens-base-themes-css.js +1 -1
  8. package/dist/aui/aui-prototyping-design-tokens-base-themes.js +1 -1
  9. package/dist/aui/aui-prototyping.css +4 -4
  10. package/dist/aui/aui-prototyping.css.map +1 -1
  11. package/dist/aui/aui-prototyping.js +21 -21
  12. package/dist/aui/aui-prototyping.js.map +1 -1
  13. package/dist/aui/aui-prototyping.nodeps.css +4 -4
  14. package/dist/aui/aui-prototyping.nodeps.css.map +1 -1
  15. package/dist/aui/aui-prototyping.nodeps.js +20 -20
  16. package/dist/aui/aui-prototyping.nodeps.js.map +1 -1
  17. package/entry/token-themes-generated/npm/aui-prototyping-design-tokens-base-themes.css +0 -981
  18. package/entry/token-themes-generated/p2/aui-prototyping-design-tokens-theme.css +0 -981
  19. package/package.json +2 -2
  20. package/src/js/aui/select2.js +13 -2
  21. package/src/js/aui/tables-sortable.js +1 -0
  22. package/src/js/aui/tooltip.js +41 -6
  23. package/src/js-vendor/jquery/jquery.tablesorter.js +1897 -1892
  24. package/src/less/aui-experimental-labels.less +13 -6
  25. package/src/less/forms-radios-and-checkboxes.less +27 -30
  26. package/src/less/imports/aui-theme/adg/adg-colors.less +1 -0
  27. package/src/less/imports/aui-theme/components/forms.less +8 -0
  28. package/src/less/imports/aui-theme/components/label.less +2 -0
  29. package/src/less/imports/aui-theme/core/colors.less +16 -16
  30. package/src/less/imports/aui-theme/core/layers.less +3 -1
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.10.0",
4
+ "version": "9.10.2",
5
5
  "author": "Atlassian Pty Ltd.",
6
6
  "homepage": "https://aui.atlassian.com",
7
7
  "license": "Apache-2.0",
@@ -38,7 +38,7 @@
38
38
  "@popperjs/core": "2.11.8",
39
39
  "backbone": "1.5.0",
40
40
  "css.escape": "1.5.1",
41
- "dompurify": "2.4.7",
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",
@@ -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
 
@@ -3,6 +3,7 @@ import '../../js-vendor/jquery/jquery.tablesorter';
3
3
  import globalize from './internal/globalize';
4
4
 
5
5
  const DEFAULT_SORT_OPTIONS = {
6
+ headerTemplate: '',
6
7
  sortMultiSortKey: '',
7
8
  headers: {},
8
9
  debug: false,
@@ -60,6 +60,7 @@ class Tooltip {
60
60
  this.enabled = this.options.enabled;
61
61
  this.moveTitleToTooltip();
62
62
  this.initContainer();
63
+ this.observeTriggerRemoval();
63
64
  }
64
65
 
65
66
  destroy() {
@@ -82,6 +83,38 @@ class Tooltip {
82
83
  });
83
84
  }
84
85
 
86
+ observeTriggerRemoval() {
87
+
88
+ const observedElements = [];
89
+
90
+ if (this.options.$delegationRoot && this.options.$delegationRoot.get(0)) {
91
+ observedElements.push(this.options.$delegationRoot.get(0));
92
+ }
93
+
94
+ if (this.triggerElement) {
95
+ observedElements.push(this.triggerElement);
96
+ }
97
+
98
+ this.triggerObservers = observedElements
99
+ .map(element => {
100
+ const parent = element.parentElement;
101
+ if (parent) {
102
+ const observer = new MutationObserver(() => {
103
+ const isToDestroy = !parent.contains(element);
104
+ if (isToDestroy) {
105
+ this.destroy();
106
+ }
107
+ });
108
+ observer.observe(parent, {
109
+ childList: true,
110
+ subtree: false // We take trigger parent, so we only care about direct children
111
+ });
112
+ return observer;
113
+ }
114
+ })
115
+ .filter(observer => !!observer);
116
+ }
117
+
85
118
  unbindHandlers() {
86
119
  const selector = this.options.live;
87
120
 
@@ -93,6 +126,10 @@ class Tooltip {
93
126
  return;
94
127
  }
95
128
 
129
+ if (this.triggerObservers.length > 0) {
130
+ this.triggerObservers.forEach(observer => observer.disconnect());
131
+ }
132
+
96
133
  // We only need to unbind event handlers from this particular element
97
134
  this.$triggerElement.off(`.${pluginKey}`);
98
135
  }
@@ -310,14 +347,12 @@ $.fn.tooltip = function (arg) {
310
347
  $collection.on(activationEvents, selector, show);
311
348
  $collection.on(deactivationEvents, selector, hide);
312
349
  $collection.on('keyup', selector, hideOnEsc);
313
-
314
- return $collection;
350
+ } else {
351
+ $collection.on(activationEvents, show);
352
+ $collection.on(deactivationEvents, hide);
353
+ $collection.on('keyup', hideOnEsc);
315
354
  }
316
355
 
317
- $collection.on(activationEvents, show);
318
- $collection.on(deactivationEvents, hide);
319
- $collection.on('keyup', hideOnEsc);
320
-
321
356
  return $collection;
322
357
  };
323
358