Update Composer, update everything
This commit is contained in:
parent
ea3e94409f
commit
dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions
29
web/core/themes/seven/js/mobile.install.es6.js
Normal file
29
web/core/themes/seven/js/mobile.install.es6.js
Normal file
|
@ -0,0 +1,29 @@
|
|||
(function() {
|
||||
function findActiveStep(steps) {
|
||||
for (let i = 0; i < steps.length; i++) {
|
||||
if (steps[i].className === 'is-active') {
|
||||
return i + 1;
|
||||
}
|
||||
}
|
||||
// The final "Finished" step is never "active".
|
||||
if (steps[steps.length - 1].className === 'done') {
|
||||
return steps.length;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
function installStepsSetup() {
|
||||
const steps = document.querySelectorAll('.task-list li');
|
||||
if (steps.length) {
|
||||
const header = document.querySelector('header[role="banner"]');
|
||||
const stepIndicator = document.createElement('div');
|
||||
stepIndicator.className = 'step-indicator';
|
||||
stepIndicator.innerHTML = `${findActiveStep(steps)}/${steps.length}`;
|
||||
header.appendChild(stepIndicator);
|
||||
}
|
||||
}
|
||||
|
||||
if (document.addEventListener) {
|
||||
document.addEventListener('DOMContentLoaded', installStepsSetup);
|
||||
}
|
||||
})();
|
|
@ -1,14 +1,18 @@
|
|||
/**
|
||||
* DO NOT EDIT THIS FILE.
|
||||
* See the following change record for more information,
|
||||
* https://www.drupal.org/node/2815083
|
||||
* @preserve
|
||||
**/
|
||||
|
||||
(function () {
|
||||
|
||||
'use strict';
|
||||
|
||||
function findActiveStep(steps) {
|
||||
for (var i = 0; i < steps.length; i++) {
|
||||
if (steps[i].className === 'is-active') {
|
||||
return i + 1;
|
||||
}
|
||||
}
|
||||
// The final "Finished" step is never "active".
|
||||
|
||||
if (steps[steps.length - 1].className === 'done') {
|
||||
return steps.length;
|
||||
}
|
||||
|
@ -29,5 +33,4 @@
|
|||
if (document.addEventListener) {
|
||||
document.addEventListener('DOMContentLoaded', installStepsSetup);
|
||||
}
|
||||
|
||||
})();
|
||||
})();
|
54
web/core/themes/seven/js/nav-tabs.es6.js
Normal file
54
web/core/themes/seven/js/nav-tabs.es6.js
Normal file
|
@ -0,0 +1,54 @@
|
|||
/**
|
||||
* @file
|
||||
* Responsive navigation tabs.
|
||||
*
|
||||
* This also supports collapsible navigable is the 'is-collapsible' class is
|
||||
* added to the main element, and a target element is included.
|
||||
*/
|
||||
(function($, Drupal) {
|
||||
function init(i, tab) {
|
||||
const $tab = $(tab);
|
||||
const $target = $tab.find('[data-drupal-nav-tabs-target]');
|
||||
const isCollapsible = $tab.hasClass('is-collapsible');
|
||||
|
||||
function openMenu(e) {
|
||||
$target.toggleClass('is-open');
|
||||
}
|
||||
|
||||
function handleResize(e) {
|
||||
$tab.addClass('is-horizontal');
|
||||
const $tabs = $tab.find('.tabs');
|
||||
const isHorizontal =
|
||||
$tabs.outerHeight() <= $tabs.find('.tabs__tab').outerHeight();
|
||||
$tab.toggleClass('is-horizontal', isHorizontal);
|
||||
if (isCollapsible) {
|
||||
$tab.toggleClass('is-collapse-enabled', !isHorizontal);
|
||||
}
|
||||
if (isHorizontal) {
|
||||
$target.removeClass('is-open');
|
||||
}
|
||||
}
|
||||
|
||||
$tab.addClass('position-container is-horizontal-enabled');
|
||||
|
||||
$tab.on('click.tabs', '[data-drupal-nav-tabs-trigger]', openMenu);
|
||||
$(window)
|
||||
.on('resize.tabs', Drupal.debounce(handleResize, 150))
|
||||
.trigger('resize.tabs');
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialise the tabs JS.
|
||||
*/
|
||||
Drupal.behaviors.navTabs = {
|
||||
attach(context, settings) {
|
||||
const $tabs = $(context).find('[data-drupal-nav-tabs]');
|
||||
if ($tabs.length) {
|
||||
const notSmartPhone = window.matchMedia('(min-width: 300px)');
|
||||
if (notSmartPhone.matches) {
|
||||
$tabs.once('nav-tabs').each(init);
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
})(jQuery, Drupal);
|
|
@ -1,14 +1,11 @@
|
|||
/**
|
||||
* @file
|
||||
* Responsive navigation tabs.
|
||||
*
|
||||
* This also supports collapsible navigable is the 'is-collapsible' class is
|
||||
* added to the main element, and a target element is included.
|
||||
*/
|
||||
* DO NOT EDIT THIS FILE.
|
||||
* See the following change record for more information,
|
||||
* https://www.drupal.org/node/2815083
|
||||
* @preserve
|
||||
**/
|
||||
|
||||
(function ($, Drupal) {
|
||||
|
||||
'use strict';
|
||||
|
||||
function init(i, tab) {
|
||||
var $tab = $(tab);
|
||||
var $target = $tab.find('[data-drupal-nav-tabs-target]');
|
||||
|
@ -37,11 +34,8 @@
|
|||
$(window).on('resize.tabs', Drupal.debounce(handleResize, 150)).trigger('resize.tabs');
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialise the tabs JS.
|
||||
*/
|
||||
Drupal.behaviors.navTabs = {
|
||||
attach: function (context, settings) {
|
||||
attach: function attach(context, settings) {
|
||||
var $tabs = $(context).find('[data-drupal-nav-tabs]');
|
||||
if ($tabs.length) {
|
||||
var notSmartPhone = window.matchMedia('(min-width: 300px)');
|
||||
|
@ -51,5 +45,4 @@
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
})(jQuery, Drupal);
|
||||
})(jQuery, Drupal);
|
52
web/core/themes/seven/js/responsive-details.es6.js
Normal file
52
web/core/themes/seven/js/responsive-details.es6.js
Normal file
|
@ -0,0 +1,52 @@
|
|||
/**
|
||||
* @file
|
||||
* Provides responsive behaviors to HTML details elements.
|
||||
*/
|
||||
|
||||
(function($, Drupal) {
|
||||
/**
|
||||
* Initializes the responsive behaviors for details elements.
|
||||
*
|
||||
* @type {Drupal~behavior}
|
||||
*
|
||||
* @prop {Drupal~behaviorAttach} attach
|
||||
* Attaches the responsive behavior to status report specific details elements.
|
||||
*/
|
||||
Drupal.behaviors.responsiveDetails = {
|
||||
attach(context) {
|
||||
const $details = $(context)
|
||||
.find('details')
|
||||
.once('responsive-details');
|
||||
|
||||
if (!$details.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
const $summaries = $details.find('> summary');
|
||||
|
||||
function detailsToggle(matches) {
|
||||
if (matches) {
|
||||
$details.attr('open', true);
|
||||
$summaries.attr('aria-expanded', true);
|
||||
$summaries.on('click.details-open', false);
|
||||
} else {
|
||||
// If user explicitly opened one, leave it alone.
|
||||
const $notPressed = $details
|
||||
.find('> summary[aria-pressed!=true]')
|
||||
.attr('aria-expanded', false);
|
||||
$notPressed.parent('details').attr('open', false);
|
||||
// After resize, allow user to close previously opened details.
|
||||
$summaries.off('.details-open');
|
||||
}
|
||||
}
|
||||
|
||||
function handleDetailsMQ(event) {
|
||||
detailsToggle(event.matches);
|
||||
}
|
||||
|
||||
const mql = window.matchMedia('(min-width:48em)');
|
||||
mql.addListener(handleDetailsMQ);
|
||||
detailsToggle(mql.matches);
|
||||
},
|
||||
};
|
||||
})(jQuery, Drupal);
|
|
@ -1,43 +1,30 @@
|
|||
/**
|
||||
* @file
|
||||
* Provides responsive behaviors to HTML details elements.
|
||||
*/
|
||||
* DO NOT EDIT THIS FILE.
|
||||
* See the following change record for more information,
|
||||
* https://www.drupal.org/node/2815083
|
||||
* @preserve
|
||||
**/
|
||||
|
||||
(function ($, Drupal) {
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Initializes the responsive behaviors for details elements.
|
||||
*
|
||||
* @type {Drupal~behavior}
|
||||
*
|
||||
* @prop {Drupal~behaviorAttach} attach
|
||||
* Attaches the responsive behavior to status report specific details elements.
|
||||
*/
|
||||
Drupal.behaviors.responsiveDetails = {
|
||||
attach: function (context) {
|
||||
attach: function attach(context) {
|
||||
var $details = $(context).find('details').once('responsive-details');
|
||||
|
||||
if (!$details.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
var $summaries = $details.find('> summary');
|
||||
|
||||
function detailsToggle(matches) {
|
||||
if (matches) {
|
||||
$details.attr('open', true);
|
||||
$summaries.attr('aria-expanded', true);
|
||||
$summaries.on('click.details-open', false);
|
||||
}
|
||||
else {
|
||||
// If user explicitly opened one, leave it alone.
|
||||
var $notPressed = $details
|
||||
.find('> summary[aria-pressed!=true]')
|
||||
.attr('aria-expanded', false);
|
||||
$notPressed
|
||||
.parent('details')
|
||||
.attr('open', false);
|
||||
// After resize, allow user to close previously opened details.
|
||||
} else {
|
||||
var $notPressed = $details.find('> summary[aria-pressed!=true]').attr('aria-expanded', false);
|
||||
$notPressed.parent('details').attr('open', false);
|
||||
|
||||
$summaries.off('.details-open');
|
||||
}
|
||||
}
|
||||
|
@ -46,12 +33,9 @@
|
|||
detailsToggle(event.matches);
|
||||
}
|
||||
|
||||
var $summaries = $details.find('> summary');
|
||||
var mql = window.matchMedia('(min-width:48em)');
|
||||
mql.addListener(handleDetailsMQ);
|
||||
detailsToggle(mql.matches);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
})(jQuery, Drupal);
|
||||
})(jQuery, Drupal);
|
Reference in a new issue