@atlassian/aui 9.3.3 → 9.4.1
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-css-deprecations.js +1 -1
- package/dist/aui/aui-css-deprecations.js.map +1 -1
- package/dist/aui/aui-prototyping.css +13 -12
- package/dist/aui/aui-prototyping.css.map +1 -0
- package/dist/aui/aui-prototyping.js +45 -45
- package/dist/aui/aui-prototyping.js.map +1 -1
- package/dist/aui/aui-prototyping.nodeps.css +13 -12
- package/dist/aui/aui-prototyping.nodeps.css.map +1 -0
- package/dist/aui/aui-prototyping.nodeps.js +45 -45
- package/dist/aui/aui-prototyping.nodeps.js.map +1 -1
- package/entry/aui.batch.prototyping.js +2 -1
- package/entry/aui.component.form.date-select.js +1 -1
- package/entry/behaviours/aui.behaviour.i18n.js +1 -1
- package/package.json +10 -14
- package/src/js/aui/date-picker.js +15 -8
- package/src/js/aui/internal/globalize.js +13 -0
- package/src/js/aui/layer.js +54 -49
- package/src/js/aui/tooltip.js +19 -7
- package/src/js/aui/unique-id.js +1 -1
- package/src/js/aui-css-deprecations.js +9 -1
- package/src/less/aui-appheader.less +0 -1
- package/src/less/aui-experimental-tooltip.less +1 -1
- package/src/less/aui-page-typography.less +3 -1
- package/src/less/aui-select2.less +20 -10
- package/src/less/aui-sidebar-skeleton.less +5 -3
- package/src/less/flag.less +1 -1
- package/src/less/forms-current.less +5 -4
- package/src/less/forms.less +0 -1
- package/src/less/imports/aui-theme/core/layers.less +13 -4
- package/src/less/imports/mixins/dropdown2-trigger-chevron-icon.less +2 -2
- package/src/less/inline-dialog.less +0 -2
- package/src/less/layer.less +1 -1
- package/src/less/messages.less +0 -5
- package/src/less/single-select.less +0 -2
|
@@ -9,7 +9,7 @@ export * from './aui.batch.components';
|
|
|
9
9
|
import './aui.component.form-notification';
|
|
10
10
|
import './aui.component.form-validation';
|
|
11
11
|
import { Header } from './aui.component.async-header';
|
|
12
|
-
import { DatePicker } from './aui.component.form.date-select';
|
|
12
|
+
import { DatePicker, CalendarWidget } from './aui.component.form.date-select';
|
|
13
13
|
import { RestfulTable } from './aui.component.restful-table';
|
|
14
14
|
import { sidebar } from './aui.component.sidebar';
|
|
15
15
|
import { whenIType } from './behaviours/aui.behaviour.keyboard-shortcuts';
|
|
@@ -18,6 +18,7 @@ export {
|
|
|
18
18
|
I18n,
|
|
19
19
|
Header,
|
|
20
20
|
DatePicker,
|
|
21
|
+
CalendarWidget,
|
|
21
22
|
RestfulTable,
|
|
22
23
|
sidebar,
|
|
23
24
|
whenIType,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import './styles/aui.pattern.forms';
|
|
2
2
|
import './aui.component.inline-dialog2'; // so that the inline dialog styles get placed before date picker.
|
|
3
3
|
import '@atlassian/aui/src/less/aui-date-picker.less';
|
|
4
|
-
export { default as DatePicker } from '@atlassian/aui/src/js/aui/date-picker';
|
|
4
|
+
export { default as DatePicker, CalendarWidget } from '@atlassian/aui/src/js/aui/date-picker';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {I18n as i18n} from '@atlassian/aui/src/js/aui/i18n';
|
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.4.1",
|
|
5
5
|
"author": "Atlassian Pty Ltd.",
|
|
6
6
|
"homepage": "https://aui.atlassian.com",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -42,29 +42,25 @@
|
|
|
42
42
|
"skatejs": "0.13.17",
|
|
43
43
|
"skatejs-template-html": "0.0.0",
|
|
44
44
|
"trim-extra-html-whitespace": "1.3.0",
|
|
45
|
-
"underscore": "1.
|
|
45
|
+
"underscore": "1.13.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@atlassian/adg-server-iconfont": "3.1.0",
|
|
49
|
-
"@atlassian/aui-webpack-config": "
|
|
50
|
-
"@babel/core": "7.
|
|
51
|
-
"@babel/preset-env": "7.
|
|
52
|
-
"bundlesize": "
|
|
49
|
+
"@atlassian/aui-webpack-config": "3.0.1",
|
|
50
|
+
"@babel/core": "7.14.0",
|
|
51
|
+
"@babel/preset-env": "7.14.1",
|
|
52
|
+
"bundlesize": "1.0.0-beta.2",
|
|
53
53
|
"cross-env": "7.0.3",
|
|
54
|
-
"eslint": "7.
|
|
55
|
-
"glob": "7.1.
|
|
56
|
-
"ignore-emit-webpack-plugin": "
|
|
54
|
+
"eslint": "7.26.0",
|
|
55
|
+
"glob": "7.1.6",
|
|
56
|
+
"ignore-emit-webpack-plugin": "2.0.6",
|
|
57
57
|
"jquery": "3.5.1",
|
|
58
58
|
"jquery-migrate": "3.3.2",
|
|
59
|
-
"less": "3.
|
|
60
|
-
"webpack-cli": "3.3.12"
|
|
59
|
+
"less": "3.13.1"
|
|
61
60
|
},
|
|
62
61
|
"scripts": {
|
|
63
62
|
"prepublishOnly": "yarn clean && cross-env NODE_ENV=production yarn build",
|
|
64
63
|
"clean": "rm -rf ./dist",
|
|
65
|
-
"dist/build:core": "webpack --config webpack/dist.aui-lib.webpack.config.js",
|
|
66
|
-
"dist/build:exts": "webpack --config webpack/dist.aui-extensions.webpack.config.js",
|
|
67
|
-
"dist/build:legacy": "yarn dist/build:core && yarn dist/build:exts",
|
|
68
64
|
"dist/build:prototyping": "webpack --config webpack/dist.prototyping.webpack.config.js",
|
|
69
65
|
"build": "yarn dist/build:prototyping",
|
|
70
66
|
"watch": "yarn dist/build:prototyping --watch",
|
|
@@ -21,13 +21,13 @@ const makePopup = ({horizontalAlignment, datePickerUUID}) => {
|
|
|
21
21
|
return popup;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
const makeConfig = ({dateFormat, $field, onSelect, hide, onChangeMonthYear}) => ({
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
const makeConfig = ({ minDate, maxDate, dateFormat, $field, onSelect, hide, onChangeMonthYear}) => ({
|
|
25
|
+
dateFormat,
|
|
26
|
+
defaultDate: $field.val(),
|
|
27
|
+
maxDate: maxDate || $field.attr('max'),
|
|
28
|
+
minDate: minDate || $field.attr('min'),
|
|
29
|
+
nextText: '>',
|
|
30
|
+
onSelect: function (dateText) {
|
|
31
31
|
$field.val(dateText);
|
|
32
32
|
$field.trigger('change');
|
|
33
33
|
hide();
|
|
@@ -35,7 +35,7 @@ const makeConfig = ({dateFormat, $field, onSelect, hide, onChangeMonthYear}) =>
|
|
|
35
35
|
onSelect && onSelect.call(this, dateText);
|
|
36
36
|
},
|
|
37
37
|
onChangeMonthYear,
|
|
38
|
-
|
|
38
|
+
prevText: '<'
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
const initCalendar = ({config, popupContents, getCalendarNode, hint}) => {
|
|
@@ -287,6 +287,8 @@ const initPolyfill = function (datePicker) {
|
|
|
287
287
|
}
|
|
288
288
|
const baseConfig = makeConfig({
|
|
289
289
|
dateFormat: options.dateFormat,
|
|
290
|
+
minDate: options.minDate,
|
|
291
|
+
maxDate: options.maxDate,
|
|
290
292
|
$field,
|
|
291
293
|
onSelect: options.onSelect,
|
|
292
294
|
hide: datePicker.hide,
|
|
@@ -337,6 +339,11 @@ const initPolyfill = function (datePicker) {
|
|
|
337
339
|
// shows that changing the `type` of input does not erase its value.
|
|
338
340
|
// see https://codepen.io/chrisdarroch/pen/YzwgjyJ
|
|
339
341
|
$field.prop('type', 'text');
|
|
342
|
+
// Set default value on initialization to handle all date formats.
|
|
343
|
+
// It is possible, because of changing type to text on the line above.
|
|
344
|
+
$field.val($field.attr('value'));
|
|
345
|
+
// Trigger change to update calendar popup value.
|
|
346
|
+
$field.trigger('propertychange');
|
|
340
347
|
|
|
341
348
|
// demonstrate the polyfill is initialised
|
|
342
349
|
$field.attr('data-aui-dp-uuid', datePickerUUID);
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
const NAMESPACE = 'AJS';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Makes given value available globally under window[name] attribute.
|
|
5
|
+
* Keep in mind that this is needed for p2-plugin where chunks of AUI
|
|
6
|
+
* can be loaded separately.
|
|
7
|
+
*
|
|
8
|
+
* In order for global namespace to work in `aui.prototyping.js` and
|
|
9
|
+
* `aui.prototyping.nodeps.js` the proper exports need to be added to:
|
|
10
|
+
* `packages/core/entry/aui.batch.prototyping.js`
|
|
11
|
+
*
|
|
12
|
+
* @param {string} name Name of the attribute
|
|
13
|
+
* @param {any} value Value to expose globally
|
|
14
|
+
* @returns exposed value
|
|
15
|
+
*/
|
|
3
16
|
export default function globalize (name, value) {
|
|
4
17
|
if (typeof window[NAMESPACE] !== 'object') {
|
|
5
18
|
window[NAMESPACE] = {};
|
package/src/js/aui/layer.js
CHANGED
|
@@ -13,6 +13,7 @@ const LAYER_EVENT_PREFIX = 'aui-layer-';
|
|
|
13
13
|
const AUI_EVENT_PREFIX = 'aui-';
|
|
14
14
|
const ATTR_MODAL = 'modal';
|
|
15
15
|
const ATTR_DOM_CONTAINER = 'dom-container';
|
|
16
|
+
const ZINDEX_AUI_LAYER_MIN = 3000;
|
|
16
17
|
|
|
17
18
|
var $doc = $(document);
|
|
18
19
|
|
|
@@ -182,10 +183,6 @@ Layer.prototype = {
|
|
|
182
183
|
return this;
|
|
183
184
|
}
|
|
184
185
|
|
|
185
|
-
if (!triggerEvent(this.$el, 'beforeHide', 'hide')) {
|
|
186
|
-
return this;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
186
|
// AUI-3708
|
|
190
187
|
const thisLayer = this;
|
|
191
188
|
oneTransitionEnd(this.$el.get(0), 'opacity', function () {
|
|
@@ -194,7 +191,7 @@ Layer.prototype = {
|
|
|
194
191
|
}
|
|
195
192
|
});
|
|
196
193
|
|
|
197
|
-
LayerManager.global.popUntil(this.$el);
|
|
194
|
+
LayerManager.global.popUntil(this.$el, true);
|
|
198
195
|
|
|
199
196
|
return this;
|
|
200
197
|
},
|
|
@@ -259,13 +256,16 @@ Layer.prototype = {
|
|
|
259
256
|
},
|
|
260
257
|
|
|
261
258
|
_hideLayer: function (triggerBeforeEvents) {
|
|
259
|
+
if (triggerBeforeEvents) {
|
|
260
|
+
if (!triggerEvent(this.$el, 'beforeHide', 'hide')) {
|
|
261
|
+
return false;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
262
265
|
if (this.isPersistent() || this.isBlanketed()) {
|
|
263
266
|
FocusManager.global.exit(this.$el);
|
|
264
267
|
}
|
|
265
268
|
|
|
266
|
-
if (triggerBeforeEvents) {
|
|
267
|
-
triggerEvent(this.$el, 'beforeHide', 'hide');
|
|
268
|
-
}
|
|
269
269
|
// don't remove via jquery; that would cause this method to get re-called once or twice more :\
|
|
270
270
|
this.el.removeAttribute('open');
|
|
271
271
|
this.$el.removeData('_aui-layer-shown');
|
|
@@ -273,6 +273,7 @@ Layer.prototype = {
|
|
|
273
273
|
this.$el.data('_aui-layer-cached-z-index', '');
|
|
274
274
|
this.$el.trigger(EVENT_PREFIX + 'hide');
|
|
275
275
|
this.$el.trigger(GLOBAL_EVENT_PREFIX + 'hide', [this.$el]);
|
|
276
|
+
return true;
|
|
276
277
|
},
|
|
277
278
|
|
|
278
279
|
_showLayer: function (zIndex) {
|
|
@@ -368,7 +369,7 @@ function nextZIndex (layerArr) {
|
|
|
368
369
|
_nextZIndex = 0;
|
|
369
370
|
}
|
|
370
371
|
|
|
371
|
-
return Math.max(
|
|
372
|
+
return Math.max(ZINDEX_AUI_LAYER_MIN, _nextZIndex);
|
|
372
373
|
}
|
|
373
374
|
|
|
374
375
|
function updateBlanket (stack, oldBlanketIndex) {
|
|
@@ -383,20 +384,24 @@ function updateBlanket (stack, oldBlanketIndex) {
|
|
|
383
384
|
}
|
|
384
385
|
}
|
|
385
386
|
|
|
386
|
-
function popLayers (stack, stopIndex, forceClosePersistent) {
|
|
387
|
+
function popLayers (stack, stopIndex, forceClosePersistent, triggerBeforeEvents = true) {
|
|
387
388
|
if (stopIndex < 0) {
|
|
388
|
-
return;
|
|
389
|
+
return [false, null];
|
|
389
390
|
}
|
|
390
391
|
|
|
392
|
+
var $layer;
|
|
391
393
|
for (var a = stack.length - 1; a >= stopIndex; a--) {
|
|
392
|
-
|
|
394
|
+
$layer = stack[a];
|
|
393
395
|
var layer = createLayer($layer);
|
|
394
396
|
|
|
395
397
|
if (forceClosePersistent || !layer.isPersistent()) {
|
|
396
|
-
layer._hideLayer(
|
|
398
|
+
if (!layer._hideLayer(triggerBeforeEvents)) {
|
|
399
|
+
return [false, $layer];
|
|
400
|
+
}
|
|
397
401
|
stack.splice(a, 1);
|
|
398
402
|
}
|
|
399
403
|
}
|
|
404
|
+
return [true, $layer];
|
|
400
405
|
}
|
|
401
406
|
|
|
402
407
|
function getParentLayer (layer) {
|
|
@@ -561,14 +566,24 @@ LayerManager.prototype = {
|
|
|
561
566
|
},
|
|
562
567
|
|
|
563
568
|
/**
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
569
|
+
* Gets the top layer, if it exists.
|
|
570
|
+
*
|
|
571
|
+
* @returns The layer on top of the stack, if it exists, otherwise null.
|
|
572
|
+
*/
|
|
573
|
+
getTopLayer: function () {
|
|
574
|
+
return this._stack[this._stack.length - 1] || null;
|
|
575
|
+
},
|
|
576
|
+
|
|
577
|
+
/**
|
|
578
|
+
* Removes all non-modal layers above & including the given element. If the given element is not an active layer, this method
|
|
579
|
+
* is a no-op. The given element will be removed regardless of whether or not it is modal.
|
|
580
|
+
*
|
|
581
|
+
* @param {HTMLElement | String | jQuery} element layer to pop.
|
|
582
|
+
* @param {boolean} [triggerBeforeEvents=false]
|
|
583
|
+
*
|
|
584
|
+
* @returns {jQuery} The last layer that was popped, or null if no layer matching the given $el was found.
|
|
585
|
+
*/
|
|
586
|
+
popUntil: function (element, triggerBeforeEvents = false) {
|
|
572
587
|
var $el = (element instanceof $) ? element : $(element);
|
|
573
588
|
var index = layerIndex(this._stack, $el);
|
|
574
589
|
|
|
@@ -576,41 +591,31 @@ LayerManager.prototype = {
|
|
|
576
591
|
return null;
|
|
577
592
|
}
|
|
578
593
|
|
|
579
|
-
|
|
594
|
+
const oldTopBlanketedIndex = topBlanketedIndex(this._stack);
|
|
580
595
|
|
|
581
596
|
// Removes all layers above the current one.
|
|
582
|
-
|
|
597
|
+
const layer = createLayer($el);
|
|
598
|
+
const [success, $lastPopped] = popLayers(this._stack, index + 1, layer.isBlanketed(), triggerBeforeEvents)
|
|
599
|
+
if (!success) {
|
|
600
|
+
return $lastPopped;
|
|
601
|
+
}
|
|
583
602
|
|
|
584
603
|
// Removes the current layer.
|
|
604
|
+
if (!layer._hideLayer(triggerBeforeEvents)) {
|
|
605
|
+
return $lastPopped;
|
|
606
|
+
}
|
|
585
607
|
this._stack.splice(index, 1);
|
|
586
|
-
createLayer($el)._hideLayer();
|
|
587
|
-
|
|
588
608
|
updateBlanket(this._stack, oldTopBlanketedIndex);
|
|
589
609
|
|
|
590
610
|
return $el;
|
|
591
611
|
},
|
|
592
612
|
|
|
593
|
-
/**
|
|
594
|
-
* Gets the top layer, if it exists.
|
|
595
|
-
*
|
|
596
|
-
* @returns The layer on top of the stack, if it exists, otherwise null.
|
|
597
|
-
*/
|
|
598
|
-
getTopLayer: function () {
|
|
599
|
-
if (!this._stack.length) {
|
|
600
|
-
return null;
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
var $topLayer = this._stack[this._stack.length - 1];
|
|
604
|
-
|
|
605
|
-
return $topLayer;
|
|
606
|
-
},
|
|
607
|
-
|
|
608
613
|
/**
|
|
609
614
|
* Pops the top layer, if it exists and it is non modal and non persistent.
|
|
610
615
|
*
|
|
611
616
|
* @returns The layer that was popped, if it was popped.
|
|
612
617
|
*/
|
|
613
|
-
popTopIfNonPersistent: function () {
|
|
618
|
+
popTopIfNonPersistent: function (triggerBeforeEvents = false) {
|
|
614
619
|
var $topLayer = this.getTopLayer();
|
|
615
620
|
var layer = createLayer($topLayer);
|
|
616
621
|
|
|
@@ -618,7 +623,7 @@ LayerManager.prototype = {
|
|
|
618
623
|
return null;
|
|
619
624
|
}
|
|
620
625
|
|
|
621
|
-
return this.popUntil($topLayer);
|
|
626
|
+
return this.popUntil($topLayer, triggerBeforeEvents);
|
|
622
627
|
},
|
|
623
628
|
|
|
624
629
|
/**
|
|
@@ -627,7 +632,7 @@ LayerManager.prototype = {
|
|
|
627
632
|
*
|
|
628
633
|
* @returns The blanketed layer that was popped, if it exists, otherwise null.
|
|
629
634
|
*/
|
|
630
|
-
popUntilTopBlanketed: function () {
|
|
635
|
+
popUntilTopBlanketed: function (triggerBeforeEvents = false) {
|
|
631
636
|
var i = topBlanketedIndex(this._stack);
|
|
632
637
|
|
|
633
638
|
if (i < 0) {
|
|
@@ -642,7 +647,7 @@ LayerManager.prototype = {
|
|
|
642
647
|
var $next = this.getNextHigherNonPeristentAndNonBlanketedLayer($topBlanketedLayer);
|
|
643
648
|
if ($next) {
|
|
644
649
|
var stopIndex = layerIndex(this._stack, $next);
|
|
645
|
-
popLayers(this._stack, stopIndex, true);
|
|
650
|
+
popLayers(this._stack, stopIndex, true, triggerBeforeEvents);
|
|
646
651
|
return $next;
|
|
647
652
|
}
|
|
648
653
|
return null;
|
|
@@ -657,7 +662,7 @@ LayerManager.prototype = {
|
|
|
657
662
|
* Pops all layers above and including the top persistent layer. If layers exist but none are persistent, this method
|
|
658
663
|
* does nothing.
|
|
659
664
|
*/
|
|
660
|
-
popUntilTopPersistent: function () {
|
|
665
|
+
popUntilTopPersistent: function (triggerBeforeEvents = false) {
|
|
661
666
|
var $toPop = LayerManager.global.getTopLayer();
|
|
662
667
|
if (!$toPop) {
|
|
663
668
|
return;
|
|
@@ -677,7 +682,7 @@ LayerManager.prototype = {
|
|
|
677
682
|
|
|
678
683
|
if ($toPop && !toPop.isPersistent()) {
|
|
679
684
|
stopIndex = layerIndex(this._stack, $toPop);
|
|
680
|
-
popLayers(this._stack, stopIndex, true);
|
|
685
|
+
popLayers(this._stack, stopIndex, true, triggerBeforeEvents);
|
|
681
686
|
updateBlanket(this._stack, oldTopBlanketedIndex);
|
|
682
687
|
} else {
|
|
683
688
|
// Here we have a blanketed persistent layer
|
|
@@ -686,7 +691,7 @@ LayerManager.prototype = {
|
|
|
686
691
|
}
|
|
687
692
|
} else {
|
|
688
693
|
stopIndex = layerIndex(this._stack, $toPop);
|
|
689
|
-
popLayers(this._stack, stopIndex, true);
|
|
694
|
+
popLayers(this._stack, stopIndex, true, triggerBeforeEvents);
|
|
690
695
|
updateBlanket(this._stack, oldTopBlanketedIndex);
|
|
691
696
|
}
|
|
692
697
|
}
|
|
@@ -698,7 +703,7 @@ LayerManager.prototype = {
|
|
|
698
703
|
function initCloseLayerOnEscPress() {
|
|
699
704
|
$doc.on('keydown', function (e) {
|
|
700
705
|
if (e.keyCode === keyCode.ESCAPE) {
|
|
701
|
-
LayerManager.global.popUntilTopPersistent();
|
|
706
|
+
LayerManager.global.popUntilTopPersistent(true);
|
|
702
707
|
e.preventDefault();
|
|
703
708
|
}
|
|
704
709
|
});
|
|
@@ -706,7 +711,7 @@ function initCloseLayerOnEscPress() {
|
|
|
706
711
|
|
|
707
712
|
function initCloseLayerOnBlanketClick() {
|
|
708
713
|
$doc.on('click', '.aui-blanket', function (e) {
|
|
709
|
-
if (LayerManager.global.popUntilTopBlanketed()) {
|
|
714
|
+
if (LayerManager.global.popUntilTopBlanketed(true)) {
|
|
710
715
|
e.preventDefault();
|
|
711
716
|
}
|
|
712
717
|
});
|
package/src/js/aui/tooltip.js
CHANGED
|
@@ -31,6 +31,7 @@ const defaultOptions = {
|
|
|
31
31
|
gravity: 'n',
|
|
32
32
|
html: false,
|
|
33
33
|
live: false,
|
|
34
|
+
enabled: true,
|
|
34
35
|
suppress: () => false
|
|
35
36
|
}
|
|
36
37
|
|
|
@@ -41,6 +42,7 @@ class Tooltip {
|
|
|
41
42
|
this.triggerElement = triggerElement;
|
|
42
43
|
this.$triggerElement = $(this.triggerElement);
|
|
43
44
|
this.options = { ...defaultOptions, ...options };
|
|
45
|
+
this.enabled = this.options.enabled
|
|
44
46
|
this.moveTitleToTooltip()
|
|
45
47
|
}
|
|
46
48
|
|
|
@@ -102,12 +104,13 @@ class Tooltip {
|
|
|
102
104
|
return $sharedTip;
|
|
103
105
|
}
|
|
104
106
|
|
|
105
|
-
|
|
106
107
|
show() {
|
|
108
|
+
if (this.enabled === false) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
this.hide();
|
|
107
112
|
const triggerElement = this.triggerElement;
|
|
108
113
|
|
|
109
|
-
const $tip = this.getFloatingTip();
|
|
110
|
-
|
|
111
114
|
const placement = GRAVITY_MAP[this.options.gravity];
|
|
112
115
|
|
|
113
116
|
clearTimeout(this.popperTimeout);
|
|
@@ -119,8 +122,7 @@ class Tooltip {
|
|
|
119
122
|
}
|
|
120
123
|
|
|
121
124
|
this.popperTimeout = setTimeout(() => {
|
|
122
|
-
const tipNode =
|
|
123
|
-
// tipNode.setAttribute('data-show', '');
|
|
125
|
+
const tipNode = this.getFloatingTip().get(0);
|
|
124
126
|
tipNode.classList.remove('assistive');
|
|
125
127
|
|
|
126
128
|
this.popperInstance = createPopper(triggerElement, tipNode, {
|
|
@@ -141,7 +143,6 @@ class Tooltip {
|
|
|
141
143
|
|
|
142
144
|
hide() {
|
|
143
145
|
const tipNode = this.getFloatingTip().get(0);
|
|
144
|
-
// tipNode.removeAttribute('data-show');
|
|
145
146
|
tipNode.classList.add('assistive');
|
|
146
147
|
|
|
147
148
|
clearTimeout(this.popperTimeout);
|
|
@@ -152,6 +153,15 @@ class Tooltip {
|
|
|
152
153
|
}
|
|
153
154
|
$(window).off(`scroll.${pluginKey}`);
|
|
154
155
|
}
|
|
156
|
+
|
|
157
|
+
enable() {
|
|
158
|
+
this.enabled = true;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
disable() {
|
|
162
|
+
this.hide();
|
|
163
|
+
this.enabled = false;
|
|
164
|
+
}
|
|
155
165
|
}
|
|
156
166
|
|
|
157
167
|
const tooltipsByDomNode = new WeakMap();
|
|
@@ -163,7 +173,9 @@ const getTooltipInstance = (domNode, options) => {
|
|
|
163
173
|
let tooltip = tooltipsByDomNode.get(domNode);
|
|
164
174
|
if (tooltip === undefined) {
|
|
165
175
|
tooltip = new Tooltip(domNode, options);
|
|
166
|
-
|
|
176
|
+
if (typeof domNode === 'object') {
|
|
177
|
+
tooltipsByDomNode.set(domNode, tooltip);
|
|
178
|
+
}
|
|
167
179
|
}
|
|
168
180
|
return tooltip;
|
|
169
181
|
}
|
package/src/js/aui/unique-id.js
CHANGED
|
@@ -9,7 +9,7 @@ var uniqueIDcounter = 0;
|
|
|
9
9
|
* returning. Note uniqueID, uniqueIDstring, uniqueIDcounter = 0; set at top of
|
|
10
10
|
* file.
|
|
11
11
|
*
|
|
12
|
-
* @param {String} prefix String to prepend to ID instead of default AUI prefix.
|
|
12
|
+
* @param {String} [prefix] String to prepend to ID instead of default AUI prefix.
|
|
13
13
|
*
|
|
14
14
|
* @returns {String}
|
|
15
15
|
*/
|
|
@@ -116,10 +116,18 @@ Use CSS flexbox or grid to vertically align it.
|
|
|
116
116
|
See https://css-tricks.com/centering-css-complete-guide/ for techniques.`
|
|
117
117
|
});
|
|
118
118
|
|
|
119
|
-
//8.4.0
|
|
119
|
+
// 8.4.0
|
|
120
120
|
|
|
121
121
|
css('.aui-button-light', {
|
|
122
122
|
sinceVersion: '8.4.0',
|
|
123
123
|
removeInVersion: '10.0.0',
|
|
124
124
|
extraInfo: 'ADGS allows only for normal and subtle buttons.'
|
|
125
125
|
});
|
|
126
|
+
|
|
127
|
+
// 9.3.5
|
|
128
|
+
|
|
129
|
+
css('.aui-dropdown2-tailed', {
|
|
130
|
+
sinceVersion: '9.3.5',
|
|
131
|
+
removeInVersion: '10.0.0',
|
|
132
|
+
extraInfo: 'ADGS does not include tails on layered components'
|
|
133
|
+
})
|
|
@@ -28,8 +28,19 @@
|
|
|
28
28
|
@aui-select2-chosen-border-radius: @aui-border-radius-smallish;
|
|
29
29
|
@aui-select2-chosen-close-button-length: 17px;
|
|
30
30
|
|
|
31
|
+
.select2-drop-mask {
|
|
32
|
+
z-index: @aui-z-select2 - 2;
|
|
33
|
+
}
|
|
34
|
+
|
|
31
35
|
.aui-select2-drop {
|
|
32
36
|
--aui-item-border-radius: 0;
|
|
37
|
+
margin-top: @aui-dropdown-trigger-offset;
|
|
38
|
+
margin-bottom: 0;
|
|
39
|
+
z-index: @aui-z-select2 - 1; // override select2 z-indices to fit in AUI's ranges. sits above blanket but below suggestions.
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.aui-select2 .select2-search {
|
|
43
|
+
z-index: @aui-z-select2;
|
|
33
44
|
}
|
|
34
45
|
|
|
35
46
|
.aui-select2-drop .select2-result-selectable .select2-match,
|
|
@@ -48,12 +59,6 @@
|
|
|
48
59
|
padding: @aui-select2-search-input-padding+@aui-dropdown2-padding;
|
|
49
60
|
}
|
|
50
61
|
|
|
51
|
-
.aui-select2-drop {
|
|
52
|
-
margin-top: @aui-dropdown-trigger-offset;
|
|
53
|
-
margin-bottom: 0;
|
|
54
|
-
z-index: 9999; // re-instated style from core select2 style
|
|
55
|
-
}
|
|
56
|
-
|
|
57
62
|
.aui-select2-drop .select2-results ul.select2-result-sub > li .select2-result-label,
|
|
58
63
|
.aui-select2-drop .select2-results .select2-result-label,
|
|
59
64
|
.aui-select2-drop .select2-results .select2-searching,
|
|
@@ -233,14 +238,16 @@
|
|
|
233
238
|
.aui-select2-container.select2-container .select2-choice:after {
|
|
234
239
|
#aui.icon-pseudoelement();
|
|
235
240
|
content: @aui-glyph-chevron-down;
|
|
236
|
-
left: 100%; /* "left" + "margin-left" required because of webkit not working properly with "right" */
|
|
237
241
|
height: 0;
|
|
238
242
|
margin-left: -18px;
|
|
239
243
|
margin-top: -2px;
|
|
240
244
|
opacity: 1;
|
|
241
245
|
position: absolute;
|
|
242
|
-
top:
|
|
246
|
+
top: calc(50% - 10px);
|
|
243
247
|
width: 0;
|
|
248
|
+
font-size: 16px;
|
|
249
|
+
line-height: 24px;
|
|
250
|
+
right: 22px;
|
|
244
251
|
}
|
|
245
252
|
|
|
246
253
|
/* Set the default text color to inherit.
|
|
@@ -271,9 +278,12 @@
|
|
|
271
278
|
.aui-select2-container.select2-container-multi .select2-choices {
|
|
272
279
|
#aui-forms.aui-select2-input-field-style(normal);
|
|
273
280
|
#aui.icon(@aui-glyph-chevron-down, {
|
|
274
|
-
font-size:
|
|
281
|
+
font-size: 16.5px;
|
|
275
282
|
left: inherit;
|
|
276
|
-
|
|
283
|
+
color: var(--aui-button-default-text-color);
|
|
284
|
+
right: 3px;
|
|
285
|
+
top: 50%;
|
|
286
|
+
line-height: 16px;
|
|
277
287
|
});
|
|
278
288
|
|
|
279
289
|
min-height: 0;
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
#aui.box-sizing();
|
|
28
28
|
min-width: @aui-sidebar-collapsed-width;
|
|
29
29
|
position: absolute;
|
|
30
|
-
z-index: @aui-z-sidebar;
|
|
31
30
|
|
|
32
31
|
// when the sidebar sits over the content
|
|
33
32
|
&.aui-sidebar-fly-out {
|
|
@@ -56,11 +55,12 @@
|
|
|
56
55
|
position: absolute;
|
|
57
56
|
top: 0;
|
|
58
57
|
bottom: auto;
|
|
58
|
+
// explicit z-index needed in order to appear over the top of page layout's #content and #footer on the sidebar's RHS.
|
|
59
|
+
// they use padding-left to "make space" for sidebar, meaning their background-color bleeds over the top of sidebar.
|
|
60
|
+
z-index: 1;
|
|
59
61
|
|
|
60
62
|
&.aui-is-docked {
|
|
61
63
|
position: fixed;
|
|
62
|
-
top: 0;
|
|
63
|
-
bottom: auto;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -295,6 +295,8 @@
|
|
|
295
295
|
#content .aui-sidebar + main,
|
|
296
296
|
#content + #footer {
|
|
297
297
|
.aui-page-sidebar & {
|
|
298
|
+
// needs to be padding, not margin, so that horizontal scrollbars are not drawn.
|
|
299
|
+
// future iterations of page layout should use grid or flexbox and carve out explicit space for sidebar.
|
|
298
300
|
padding-left: var(--aui-sidebar-width);
|
|
299
301
|
}
|
|
300
302
|
|
package/src/less/flag.less
CHANGED
|
@@ -243,13 +243,14 @@ form.aui:not(.aui-legacy-forms) {
|
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
// both are @ak-color-N600
|
|
246
|
-
@chevron-dark: url('data:image/svg+xml,%3Csvg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath fill="%23A5ADBA" d="
|
|
247
|
-
@chevron-light: url('data:image/svg+xml,%3Csvg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath fill="%23344563" d="
|
|
246
|
+
@chevron-dark: url('data:image/svg+xml,%3Csvg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath fill="%23A5ADBA" d="M8.292 10.293a1.009 1.009 0 000 1.419l2.939 2.965c.218.215.5.322.779.322s.556-.107.769-.322l2.93-2.955a1.01 1.01 0 000-1.419.987.987 0 00-1.406 0l-2.298 2.317-2.307-2.327a.99.99 0 00-1.406 0z"/%3E%3C/svg%3E%0A');
|
|
247
|
+
@chevron-light: url('data:image/svg+xml,%3Csvg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath fill="%23344563" d="M8.292 10.293a1.009 1.009 0 000 1.419l2.939 2.965c.218.215.5.322.779.322s.556-.107.769-.322l2.93-2.955a1.01 1.01 0 000-1.419.987.987 0 00-1.406 0l-2.298 2.317-2.307-2.327a.99.99 0 00-1.406 0z"/%3E%3C/svg%3E%0A');
|
|
248
248
|
|
|
249
249
|
select[disabled]:not([size]),
|
|
250
250
|
.select:not([size]) {
|
|
251
251
|
background-repeat: no-repeat;
|
|
252
|
-
background-position: 100% 50%;
|
|
252
|
+
background-position: calc(100% + 1.5px) 50%;
|
|
253
|
+
background-size: 25px;
|
|
253
254
|
}
|
|
254
255
|
|
|
255
256
|
select.select[disabled]:not([size]) {
|
|
@@ -259,7 +260,7 @@ form.aui:not(.aui-legacy-forms) {
|
|
|
259
260
|
}
|
|
260
261
|
|
|
261
262
|
select.select:not([size]) {
|
|
262
|
-
padding-right:
|
|
263
|
+
padding-right: 20px;
|
|
263
264
|
background-image: @chevron-light;
|
|
264
265
|
}
|
|
265
266
|
|