index of
/
home
/
thefkyzp
/
hulmvisaadvisor.com
/
wp-content
/
plugins
/
surecart
/
dist
/
components
/
esm
/
File: /home/thefkyzp/hulmvisaadvisor.com/wp-content/plugins/surecart/dist/components/esm/sc-tab.entry.js
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-745b6bec.js'; import { i as isRtl } from './page-align-0cdacf32.js'; const scTabCss = ":host{display:block}.tab{font-family:var(--sc-font-sans);color:var(--sc-color-gray-600);display:flex;align-items:center;justify-content:flex-start;line-height:1;padding:var(--sc-spacing-small) var(--sc-spacing-small);font-size:var(--sc-font-size-medium);font-weight:var(--sc-font-weight-semibold);border-radius:var(--sc-border-radius-small);cursor:pointer;transition:color 0.35s ease, background-color 0.35s ease;user-select:none;text-decoration:none}.tab.tab--active,.tab:hover{color:var(--sc-tab-active-color, var(--sc-color-gray-900));background-color:var(--sc-tab-active-background, var(--sc-color-gray-100))}.tab.tab--disabled{cursor:not-allowed;color:var(--sc-color-gray-400)}.tab__content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:var(--sc-line-height-dense)}.tab__prefix,.tab__suffix{flex:0 0 auto;display:flex;align-items:center}.tab__suffix{margin-left:auto}.tab__counter{background:var(--sc-color-gray-200);display:inline-block;padding:var(--sc-spacing-xx-small) var(--sc-spacing-small);border-radius:var(--sc-border-radius-pill);font-size:var(--sc-font-size-small);text-align:center;line-height:1;transition:color 0.35s ease, background-color 0.35s ease}.tab.tab--active .tab__counter,.tab:hover .tab__counter{background:var(--sc-color-white)}.tab--has-prefix{padding-left:var(--sc-spacing-small)}.tab--has-prefix .tab__content{padding-left:var(--sc-spacing-small)}.tab--has-suffix{padding-right:var(--sc-spacing-small)}.tab--has-suffix .tab__label{padding-right:var(--sc-spacing-small)}.tab--is-rtl.tab--has-prefix .tab__content{padding-left:0;padding-right:var(--sc-spacing-small)}"; const ScTabStyle0 = scTabCss; let id = 0; const ScTab = class { constructor(hostRef) { registerInstance(this, hostRef); this.scClose = createEvent(this, "scClose", 7); this.componentId = `tab-${++id}`; this.panel = ''; this.href = undefined; this.active = false; this.disabled = false; this.count = undefined; this.hasPrefix = false; this.hasSuffix = false; } /** Sets focus to the tab. */ async triggerFocus(options) { this.tab.focus(options); } /** Removes focus from the tab. */ async triggerBlur() { this.tab.blur(); } handleSlotChange() { this.hasPrefix = !!this.el.querySelector('[slot="prefix"]'); this.hasSuffix = !!this.el.querySelector('[slot="suffix"]'); } render() { // If the user didn't provide an ID, we'll set one so we can link tabs and tab panels with aria labels this.el.id = this.el.id || this.componentId; const Tag = this.href ? 'a' : 'div'; return (h(Tag, { key: '2cf5bb1143886b64d50d4e6f0b370b57a0cb8209', part: `base ${this.active ? `active` : ``}`, href: this.href, class: { 'tab': true, 'tab--active': this.active, 'tab--disabled': this.disabled, 'tab--has-prefix': this.hasPrefix, 'tab--has-suffix': this.hasSuffix, 'tab--is-rtl': isRtl(), }, ref: el => (this.tab = el), role: "tab", "aria-disabled": this.disabled ? 'true' : 'false', "aria-selected": this.active ? 'true' : 'false', tabindex: this.disabled ? '-1' : '0' }, h("span", { key: '90777d24bf4e9e477481edfe9e63669211a2af44', part: "prefix", class: "tab__prefix" }, h("slot", { key: 'f2c1347884bd6e2566c4af0900143b369b6a988c', onSlotchange: () => this.handleSlotChange(), name: "prefix" })), h("div", { key: '321d33962dd136fe0bc1a7ca4a61152d2225aeda', class: "tab__content", part: "content" }, h("slot", { key: '947c15259d3835803c29165462d6a89651d1665e' })), h("span", { key: 'bd751760dab881c052e6caed0f60162c147f458e', part: "suffix", class: "tab__suffix" }, h("slot", { key: '09d10a1cb0c19156403e85be30a7ab64c2959fe6', onSlotchange: () => this.handleSlotChange(), name: "suffix" })), h("slot", { key: '4897bf8809e8ea5f8da265913da2e5cc7b8e9e73', name: "suffix" }, !!this.count && (h("div", { key: '6a0826562463e2e005de6b9313c7787f27d7feca', class: "tab__counter", part: "counter" }, this.count))))); } get el() { return getElement(this); } }; ScTab.style = ScTabStyle0; export { ScTab as sc_tab }; //# sourceMappingURL=sc-tab.entry.js.map