/** * @file * Overrides vertical tabs theming to enable Claro designs. */ (($, Drupal) => { /** * Theme function for a vertical tab. * * @param {object} settings * An object with the following keys: * @param {string} settings.title * The name of the tab. * * @return {object} * This function has to return an object with at least these keys: * - item: The root tab jQuery element * - link: The anchor tag that acts as the clickable area of the tab * (jQuery version) * - summary: The jQuery element that contains the tab summary */ Drupal.theme.verticalTab = (settings) => { const tab = {}; tab.title = $(''); tab.title[0].textContent = settings.title; tab.item = $( '
  • ', ).append( (tab.link = $('').append( $('') .append(tab.title) .append( (tab.summary = $( '', )), ), )), ); return tab; }; })(jQuery, Drupal);