@formio/uswds
Version:
US Web Design System templates for form.io
53 lines • 2.08 kB
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default=function(ctx) {
var __t, __p = '', __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
__p += '<div class="usa-accordion usa-accordion--bordered margin-bottom-205">\n <h2 class="usa-accordion__heading" ref="header">\n ';
if (ctx.component.collapsible) { ;
__p += '\n <div\n tabindex="0"\n role="button"\n class="usa-accordion__button"\n aria-expanded="' +
((__t = (ctx.component.collapsible ? !ctx.collapsed : true)) == null ? '' : __t) +
'"\n aria-controls="' +
((__t = (ctx.instance.id)) == null ? '' : __t) +
'-' +
((__t = (ctx.component.key)) == null ? '' : __t) +
'"\n >\n ' +
((__t = (ctx.t(ctx.component.title))) == null ? '' : __t) +
'\n ';
if (ctx.component.tooltip) { ;
__p += '\n <i ref="tooltip" data-tooltip="' +
((__t = (ctx.component.tooltip)) == null ? '' : __t) +
'" class="' +
((__t = (ctx.iconClass('question-sign'))) == null ? '' : __t) +
' text-based" tabindex="0"></i>\n ';
} ;
__p += '\n </div>\n ';
} else { ;
__p += '\n <div class="usa-accordion__button non-collapsible-panel--button">\n ' +
((__t = (ctx.t(ctx.component.title))) == null ? '' : __t) +
'\n ';
if (ctx.component.tooltip) { ;
__p += '\n <i ref="tooltip" data-tooltip="' +
((__t = (ctx.component.tooltip)) == null ? '' : __t) +
'" class="' +
((__t = (ctx.iconClass('question-sign'))) == null ? '' : __t) +
' text-based" tabindex="0"></i>\n ';
} ;
__p += '\n </div>\n ';
} ;
__p += '\n </h2>\n\n <div\n id="' +
((__t = (ctx.instance.id)) == null ? '' : __t) +
'-' +
((__t = (ctx.component.key)) == null ? '' : __t) +
'"\n class="formio-panel-content usa-accordion__content usa-prose"\n ref="' +
((__t = (ctx.nestedKey)) == null ? '' : __t) +
'"\n ';
if (ctx.component.collapsible && ctx.collapsed) { ;
__p += 'hidden';
} ;
__p += '\n >\n ' +
((__t = (ctx.children)) == null ? '' : __t) +
'\n </div>\n</div>\n';
return __p
}