FileMaster
Search
Toggle Dark Mode
Home
/
.
/
wp-content
/
plugins
/
surecart
/
dist
/
components
/
surecart
Edit File: p-4277a00f.entry.js
import{r as t,h as e,a as o}from"./p-e97fde0a.js";const s=':host{display:block;--toggle-spacing:0}::slotted(*){margin-bottom:var(--toggle-spacing)}::slotted(:not(:first-child):not([style*="display: none"])){border-top:1px solid var(--sc-input-border-color)}';const i=s;const l=class{constructor(e){t(this,e);this.accordion=false;this.collapsible=true;this.theme="default"}getToggles(){var t,e,o;let s=this.el.shadowRoot.querySelector("slot");if(!s)return;return((o=(e=(t=s===null||s===void 0?void 0:s.assignedNodes)===null||t===void 0?void 0:t.call(s))===null||e===void 0?void 0:e.filter)===null||o===void 0?void 0:o.call(e,(t=>t.nodeName==="SC-TOGGLE")))||[]}handleShowChange(t){if(t.target.tagName!=="SC-TOGGLE")return;if(this.accordion){this.getToggles().map((e=>e.open=t.target===e))}}handleCollapibleChange(){this.getToggles().map((t=>t.collapsible=this.collapsible))}componentDidLoad(){this.handleCollapibleChange();const t=this.getToggles();if((t===null||t===void 0?void 0:t.length)&&!t.some((t=>t.open))){t[0].open=true}}render(){const t="container"===this.theme?"sc-card":"div";return e(t,{key:"369df9fbd5954956f2838fcd75388fa9469d5689",class:{toggles:true,[`toggles--theme-${this.theme}`]:true},part:"base","no-padding":true},e("slot",{key:"a2417ea4fee45b9c4dcd8ac46760fc237df0a96c"}))}get el(){return o(this)}static get watchers(){return{collapsible:["handleCollapibleChange"]}}};l.style=i;export{l as sc_toggles}; //# sourceMappingURL=p-4277a00f.entry.js.map
Save
Back