print_render_attribute_string( 'wrapper' ); ?>>
print_render_attribute_string( 'progress-bar' ); ?>>
print_render_attribute_string( 'inner_text' ); ?>>print_unescaped_setting( 'inner_text' ); ?>
%
<#
if ( '' === settings.title && '' === settings.percent.size ) {
return;
}
const title_tag = elementor.helpers.validateHTMLTag( settings.title_tag );
const progressbar_id = 'elementor-progress-bar-get_id() ); ?>';
let progress_percentage = 0;
if ( ! isNaN( settings.percent.size ) ) {
progress_percentage = 100 < settings.percent.size ? 100 : settings.percent.size;
}
if ( settings.title ) {
view.addRenderAttribute(
'title',
{
'class': 'elementor-title',
'id': progressbar_id,
}
);
view.addInlineEditingAttributes( 'title' );
view.addRenderAttribute( 'wrapper', 'aria-labelledby', progressbar_id );
}
view.addRenderAttribute(
'progressWrapper',
{
'class': [ 'elementor-progress-wrapper', 'progress-' + settings.progress_type ],
'role': 'progressbar',
'aria-valuemin': '0',
'aria-valuemax': '100',
'aria-valuenow': progress_percentage,
}
);
if ( '' !== settings.inner_text ) {
view.addRenderAttribute( 'progressWrapper', 'aria-valuetext', progress_percentage + '% (' + settings.inner_text + ')' );
}
view.addRenderAttribute( 'inner_text', 'class', 'elementor-progress-text' );
view.addInlineEditingAttributes( 'inner_text' );
#>
<# if ( settings.title ) { #>
<{{ title_tag }} {{{ view.getRenderAttributeString( 'title' ) }}}>{{{ settings.title }}}{{ title_tag }}>
<# } #>