UNPKG

@hcflgov/vue-html-wrapper

Version:
1 lines 2.02 kB
(("undefined"!==typeof self?self:this)["webpackJsonpHcHtmlWrapper"]=("undefined"!==typeof self?self:this)["webpackJsonpHcHtmlWrapper"]||[]).push([[5],{7594:function(e,t,s){"use strict";s.r(t);var a=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("li",{staticClass:"list-group-item p-0"},[s("a",{staticClass:"list-group-item list-group-item-action d-flex align-items-center justify-content-between",attrs:{href:"#collapse"+e._uid,"aria-controls":"collapse"+e._uid,"aria-expanded":e.expanded},on:{click:function(t){return t.preventDefault(),e.toggle(t)}}},[s("div",{attrs:{id:"heading"+e._uid}},[e._t("header")],2),s("i",{staticClass:"icon",class:[e.icon,e.expandedClass]})]),s("div",{ref:"collapse",staticClass:"collapse",attrs:{id:"collapse"+e._uid,"aria-labelledby":"heading"+e._uid,"data-parent":e.parentAttr}},[s("div",{staticClass:"card-body",class:e.flush?"p-0":null},[e._t("default")],2)])])},l=[],i={name:"hc-accordion-item",props:{icon:{type:String,default:"fa fa-chevron-down"},open:{type:Boolean,default:!1},flush:{type:Boolean,default:!1}},data:function(){return{expanded:!1}},computed:{expandedClass:function(){return this.expanded?"expanded":null},parentAttr:function(){return this.$parent.multiple?null:"#accordion".concat(this.$parent._uid)}},created:function(){this.$slots.header||console.warn("The accordion item has no header")},methods:{toggle:function(){this.expanded?this.hide():this.show()},hide:function(){this.expanded=!1,this.$refs.collapse.classList.toggle("collapsing"),this.$refs.collapse.classList.remove("show"),this.$refs.collapse.classList.toggle("collapsing")},show:function(){this.expanded=!0,this.$refs.collapse.classList.toggle("collapsing"),this.$refs.collapse.classList.add("show"),this.$refs.collapse.classList.toggle("collapsing")}},mounted:function(){this.open&&this.show()}},n=i,o=(s("ead9"),s("2877")),c=Object(o["a"])(n,a,l,!1,null,"73c17e1e",null);t["default"]=c.exports},e313:function(e,t,s){},ead9:function(e,t,s){"use strict";var a=s("e313"),l=s.n(a);l.a}}]);